@ggui-ai/ui-visual-tester 0.9.0 → 0.11.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.
@@ -19836,7 +19836,7 @@
19836
19836
  case "warning":
19837
19837
  case "error":
19838
19838
  case "info":
19839
- return `var(--ggui-color-${tone}, ${SEMANTIC_TONE_FALLBACK[tone]})`;
19839
+ return `var(--ggui-color-${tone}-500, ${SEMANTIC_TONE_FALLBACK[tone]})`;
19840
19840
  case "inverse":
19841
19841
  return "var(--ggui-color-surface, #ffffff)";
19842
19842
  case "inherit":
@@ -27817,7 +27817,7 @@
27817
27817
  }
27818
27818
 
27819
27819
  // ../protocol/dist/version.js
27820
- var PROTOCOL_VERSION = "draft-2026-06-12";
27820
+ var PROTOCOL_VERSION = "draft-2026-08-19";
27821
27821
  var PROTOCOL_SCHEMA_VERSION = PROTOCOL_VERSION;
27822
27822
  var CLIENT_SUPPORTED_VERSIONS = Object.freeze([
27823
27823
  PROTOCOL_SCHEMA_VERSION
@@ -42344,7 +42344,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42344
42344
 
42345
42345
  // ../protocol/dist/gadgets/stdlib-gadgets.js
42346
42346
  var STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
42347
- var STDLIB_GADGETS_VERSION = "0.9.0";
42347
+ var STDLIB_GADGETS_VERSION = "0.11.0";
42348
42348
  var STDLIB_GADGETS = [
42349
42349
  {
42350
42350
  package: STDLIB_GADGETS_PACKAGE,
@@ -42495,15 +42495,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42495
42495
  // surface as `undefined` at runtime which JSON.stringify drops.
42496
42496
  external_exports.record(external_exports.string(), jsonValueSchema)
42497
42497
  ]));
42498
+ var jsonSchemaTypeNameSchema = external_exports.enum([
42499
+ "string",
42500
+ "number",
42501
+ "integer",
42502
+ "boolean",
42503
+ "array",
42504
+ "object",
42505
+ "null"
42506
+ ]);
42498
42507
  var jsonSchemaSchema = external_exports.lazy(() => external_exports.object({
42499
- type: external_exports.enum([
42500
- "string",
42501
- "number",
42502
- "integer",
42503
- "boolean",
42504
- "array",
42505
- "object",
42506
- "null"
42508
+ // Single type OR a draft-07 type array (`['string','null']` —
42509
+ // the canonical nullability form the enforced-props-schema
42510
+ // emission produces). Mirrors `JsonSchemaTypeName | JsonSchemaTypeName[]`
42511
+ // on the TS type — the zod and TS sides are an SSoT pair; widen
42512
+ // both or neither.
42513
+ type: external_exports.union([
42514
+ jsonSchemaTypeNameSchema,
42515
+ external_exports.array(jsonSchemaTypeNameSchema)
42507
42516
  ]).optional(),
42508
42517
  description: external_exports.string().optional(),
42509
42518
  enum: external_exports.array(jsonValueSchema).optional(),
@@ -42671,12 +42680,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42671
42680
  }).strict();
42672
42681
  var appPublicEnvSchema = external_exports.record(external_exports.string().regex(PUBLIC_ENV_APP_KEY_RE), external_exports.string()).readonly();
42673
42682
  var dataContractSchema = external_exports.object({
42674
- propsSpec: propsSpecSchema.optional(),
42675
- actionSpec: actionSpecSchema.optional(),
42676
- streamSpec: streamSpecSchema.optional(),
42677
- contextSpec: contextSpecSchema.optional(),
42678
- agentCapabilities: agentCapabilitiesSpecSchema.optional(),
42679
- clientCapabilities: clientCapabilitiesSpecSchema.optional()
42683
+ propsSpec: propsSpecSchema.optional().describe("Initial render data: {description?, properties: {<name>: {schema: <JSON Schema>, required?: boolean, description?, default?, example?}}}. A prop is required at the wire gate ONLY when `required: true`; omitted \u21D2 optional (declare `required: true` for props the render must always pass)."),
42684
+ actionSpec: actionSpecSchema.optional().describe("User gestures the agent reacts to on its next turn: {<action>: {label: string (REQUIRED \u2014 button copy / accessible name), schema?: <payload JSON Schema>, description?, example?, icon?, confirm?, nextStep?: '<agentCapabilities.tools key>'}}. Every action is agent-routed; `nextStep` is a hint, not a dispatch."),
42685
+ streamSpec: streamSpecSchema.optional().describe("Live update channels the agent emits into: {<channel>: {schema: <JSON Schema>, description?, example?, mode?: append|replace, replay?: latest|all|none, complete?, source?: {tool, args?}}}. `source.tool` must be declared in agentCapabilities.tools."),
42686
+ contextSpec: contextSpecSchema.optional().describe("Observable client state the agent reads alongside each action: {<slot>: {schema: <JSON Schema>, description?, default?, debounceMs?, example?}}. State that needs no next-turn reasoning belongs here, not in actionSpec."),
42687
+ agentCapabilities: agentCapabilitiesSpecSchema.optional().describe("MCP tools the AGENT may call: {tools: {<bareToolName>: {toolInfo: {inputSchema (REQUIRED), description?, outputSchema?}, serverInfo?: {name, version?}, usage?, example?: {input, output}}}}. Key by the BARE tool name (after any `mcp__<server>__` prefix); the component never calls these."),
42688
+ clientCapabilities: clientCapabilitiesSpecSchema.optional().describe("Browser-capability gadgets the COMPONENT imports: {gadgets: {<npm package>: {<exportName>: {description?, usage?}}}} \u2014 `use`-prefixed export keys are hooks, PascalCase keys are components; version and transport resolve from the app's registered catalog, never on the wire.")
42680
42689
  }).passthrough();
42681
42690
 
42682
42691
  // ../protocol/dist/schemas/blueprint.js
@@ -42692,11 +42701,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42692
42701
  userBlueprintSourceSchema,
42693
42702
  curatedBlueprintSourceSchema
42694
42703
  ]);
42704
+ var BLUEPRINT_VARIANCE_KEYS = ["persona", "aesthetic", "context", "seedPrompt"];
42695
42705
  var blueprintVarianceSchema = external_exports.object({
42696
42706
  persona: external_exports.string().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),
42697
42707
  aesthetic: external_exports.string().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),
42698
42708
  context: external_exports.record(external_exports.string(), jsonValueSchema).optional().describe('Deliberate design-shaping signals (e.g. {situation:"sad"}) \u2014 part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.'),
42699
42709
  seedPrompt: external_exports.string().optional().describe("Generation seed directive. Part of cache identity.")
42710
+ }, {
42711
+ // A rejection that teaches (ggui#523 item 2): the first live guest
42712
+ // turn sent `mood` and got a bare "Unrecognized key" — name the
42713
+ // legal set and where the misplaced intent belongs.
42714
+ error: (issue2) => issue2.code === "unrecognized_keys" ? `variance: unknown key(s) ${issue2.keys.map((k) => JSON.stringify(k)).join(", ")} \u2014 variance is EXACTLY {${BLUEPRINT_VARIANCE_KEYS.join(", ")}}; put tonal intent in \`aesthetic\`, and per-user runtime data in props / contextSpec, never in variance` : void 0
42700
42715
  }).strict();
42701
42716
  var blueprintSchema = external_exports.object({
42702
42717
  blueprintId: external_exports.string().min(1),
@@ -42757,15 +42772,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42757
42772
  }).strict()
42758
42773
  ]);
42759
42774
  var jsonPatchSchema = external_exports.array(jsonPatchOpSchema);
42775
+ var BLUEPRINT_DRAFT_KEYS = ["contract", "variance", "generator"];
42760
42776
  var blueprintDraftObjectSchema = external_exports.object({
42761
42777
  contract: dataContractSchema,
42762
- variance: external_exports.object({
42763
- persona: external_exports.string().optional(),
42764
- aesthetic: external_exports.string().optional(),
42765
- context: external_exports.record(external_exports.string(), jsonValueSchema).optional(),
42766
- seedPrompt: external_exports.string().optional()
42767
- }).strict().optional(),
42778
+ // ONE declaration of the variance shape, protocol-wide: the same
42779
+ // schema (with its `.describe()` teaching and its legal-set
42780
+ // rejection message) that `blueprintMeta.variance` projects on the
42781
+ // way back out (ggui#523 item 1 — the mirror-of-a-mirror is gone).
42782
+ variance: blueprintVarianceSchema.optional(),
42768
42783
  generator: external_exports.string().optional()
42784
+ }, {
42785
+ error: (issue2) => issue2.code === "unrecognized_keys" ? `blueprintDraft: unknown key(s) ${issue2.keys.map((k) => JSON.stringify(k)).join(", ")} \u2014 a draft is EXACTLY {${BLUEPRINT_DRAFT_KEYS.join(", ")}}; \`intent\` is a top-level ggui_handshake field, not a draft field, and the four specs live INSIDE \`contract\`` : void 0
42769
42786
  }).strict();
42770
42787
  var blueprintDraftSchema = blueprintDraftObjectSchema;
42771
42788
  var blueprintMetaSchema = external_exports.object({
@@ -42827,6 +42844,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42827
42844
  sessionId: external_exports.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")
42828
42845
  };
42829
42846
  var getSessionInputSchema = external_exports.object(getSessionInputShape);
42847
+ var getRenderSourceInputShape = {
42848
+ sessionId: external_exports.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")
42849
+ };
42850
+ var getRenderSourceInputSchema = external_exports.object(getRenderSourceInputShape);
42830
42851
  var listFeaturedBlueprintsInputShape = {};
42831
42852
  var listFeaturedBlueprintsInputSchema = external_exports.object(listFeaturedBlueprintsInputShape);
42832
42853
  var searchBlueprintsInputShape = {
@@ -42861,7 +42882,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
42861
42882
  * and the contract validators; variance feeds the variance axis
42862
42883
  * and rides through to the suggestion's `blueprintMeta`.
42863
42884
  */
42864
- blueprintDraft: blueprintDraftSchema.describe("Agent's draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth)."),
42885
+ blueprintDraft: blueprintDraftSchema.describe(`Agent's draft \u2014 a JSON OBJECT, never a JSON-encoded string (pass {contract: {...}}, not "{\\"contract\\":...}"; a string fails input validation with -32602). Fields: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth).`),
42865
42886
  /**
42866
42887
  * Skip blueprint-search on step-2 and route straight to validation
42867
42888
  * + (if validation passes) agent-mode suggestion against the draft.
@@ -43267,87 +43288,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
43267
43288
  // ../protocol/dist/registry/canonicalize-contract.js
43268
43289
  var import_canonicalize = __toESM(require_canonicalize(), 1);
43269
43290
 
43291
+ // ../protocol/dist/validation/enforced-props-schema.js
43292
+ var import_canonicalize2 = __toESM(require_canonicalize(), 1);
43293
+
43270
43294
  // ../protocol/dist/types/data-contract.js
43271
43295
  var CONTEXT_SLOT_VALUE_MAX_BYTES = 16 * 1024;
43272
43296
  var CONTEXT_SNAPSHOT_MAX_BYTES = 64 * 1024;
43273
43297
 
43274
- // ../protocol/dist/schemas/ops-blueprint.js
43275
- var opsGenerateBlueprintInputSchema = external_exports.object({
43276
- contract: dataContractSchema,
43277
- generator: external_exports.string().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),
43278
- persona: external_exports.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),
43279
- aesthetic: external_exports.string().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona \u2014 persona names the user mental model; aesthetic names the visual treatment."),
43280
- context: external_exports.record(external_exports.string(), jsonValueSchema).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),
43281
- seedPrompt: external_exports.string().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),
43282
- setAsOperatorDefault: external_exports.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")
43283
- }).strict();
43284
- var opsGenerateBlueprintOutputSchema = external_exports.object({
43285
- blueprintId: external_exports.string().min(1),
43286
- codeHash: external_exports.string().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped \u2014 the failure mode is surfaced through generator-level error reporting elsewhere."),
43287
- validatorScore: external_exports.number().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),
43288
- source: llmBlueprintSourceSchema.describe("Provenance stamped on the persisted `Blueprint.source` \u2014 always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")
43289
- }).strict();
43290
- var opsRegisterBlueprintInputSchema = external_exports.object({
43291
- contract: dataContractSchema,
43292
- componentCode: external_exports.string().min(1).describe("Verbatim component-code body to persist. Stored as-is \u2014 no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),
43293
- persona: external_exports.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),
43294
- aesthetic: external_exports.string().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),
43295
- context: external_exports.record(external_exports.string(), jsonValueSchema).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),
43296
- seedPrompt: external_exports.string().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),
43297
- setAsOperatorDefault: external_exports.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")
43298
- }).strict();
43299
- var opsRegisterBlueprintOutputSchema = external_exports.object({
43300
- blueprintId: external_exports.string().min(1),
43301
- codeHash: external_exports.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),
43302
- source: userBlueprintSourceSchema.describe('Provenance stamped on the persisted `Blueprint.source` \u2014 always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')
43303
- }).strict();
43304
- var opsListBlueprintsInputSchema = external_exports.object({
43305
- contractHash: external_exports.string().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),
43306
- generator: external_exports.string().min(1).optional().describe('Filter to engine-generated blueprints (`source.kind === "llm"`) whose `source.generator` equals this slug. `user`-sourced rows never match (they carry no engine provenance).'),
43307
- persona: external_exports.string().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),
43308
- intentKeywords: external_exports.array(external_exports.string().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")
43309
- }).strict();
43310
- var opsListBlueprintsOutputSchema = external_exports.object({
43311
- blueprints: external_exports.array(blueprintSchema)
43312
- }).strict();
43313
- var opsUpdateBlueprintInputSchema = external_exports.object({
43314
- blueprintId: external_exports.string().min(1),
43315
- isOperatorDefault: external_exports.literal(true).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` \u2014 to unpin, set another blueprint in the same group as default, or delete this one."),
43316
- variance: blueprintVarianceSchema.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')
43317
- }).strict();
43318
- var opsUpdateBlueprintOutputSchema = external_exports.object({
43319
- blueprintId: external_exports.string().min(1),
43320
- updatedAt: external_exports.string().min(1)
43321
- }).strict();
43322
- var opsDeleteBlueprintInputSchema = external_exports.object({
43323
- blueprintId: external_exports.string().min(1)
43324
- }).strict();
43325
- var opsDeleteBlueprintOutputSchema = external_exports.object({
43326
- deleted: external_exports.literal(true)
43327
- }).strict();
43328
-
43329
- // ../protocol/dist/envelopes/builders.js
43330
- function resolveSchemaVersion(parts) {
43331
- if ("schemaVersion" in parts) {
43332
- return parts.schemaVersion;
43333
- }
43334
- return PROTOCOL_SCHEMA_VERSION;
43335
- }
43336
- function makeActionEnvelope(parts) {
43337
- const envelope = {
43338
- sessionId: parts.sessionId,
43339
- type: parts.type
43340
- };
43341
- if (parts.payload !== void 0)
43342
- envelope.payload = parts.payload;
43343
- if (parts.clientSeq !== void 0)
43344
- envelope.clientSeq = parts.clientSeq;
43345
- const stamp = resolveSchemaVersion(parts);
43346
- if (stamp !== void 0)
43347
- envelope.schemaVersion = stamp;
43348
- return envelope;
43349
- }
43350
-
43351
43298
  // ../protocol/dist/validation/ajv-runtime.js
43352
43299
  var import_ajv = __toESM(require_ajv(), 1);
43353
43300
  var import_ajv_formats = __toESM(require_dist(), 1);
@@ -43390,8 +43337,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
43390
43337
  if (!standaloneAjv.getKeyword("nullable")) {
43391
43338
  standaloneAjv.addKeyword({ keyword: "nullable" });
43392
43339
  }
43340
+ var standaloneCjsAjv = new import_ajv.default({
43341
+ ...AJV_OPTIONS,
43342
+ code: { source: true }
43343
+ });
43344
+ (0, import_ajv_formats.default)(standaloneCjsAjv);
43345
+ if (!standaloneCjsAjv.getKeyword("example")) {
43346
+ standaloneCjsAjv.addKeyword({ keyword: "example" });
43347
+ }
43348
+ if (!standaloneCjsAjv.getKeyword("nullable")) {
43349
+ standaloneCjsAjv.addKeyword({ keyword: "nullable" });
43350
+ }
43393
43351
  function injectClosedShape(schema) {
43394
- const isObjectNode = schema.type === "object" || schema.properties !== void 0;
43352
+ const typeSet = new Set(Array.isArray(schema.type) ? schema.type : schema.type ? [schema.type] : []);
43353
+ const isObjectNode = typeSet.has("object") || schema.properties !== void 0;
43395
43354
  if (isObjectNode) {
43396
43355
  const out = { ...schema };
43397
43356
  if (out.properties) {
@@ -43412,7 +43371,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
43412
43371
  out.anyOf = out.anyOf.map(injectClosedShape);
43413
43372
  return out;
43414
43373
  }
43415
- if (schema.type === "array" && schema.items) {
43374
+ if (typeSet.has("array") && schema.items) {
43416
43375
  return { ...schema, items: injectClosedShape(schema.items) };
43417
43376
  }
43418
43377
  if (schema.oneOf || schema.anyOf) {
@@ -43432,7 +43391,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
43432
43391
  function mapAjvErrorsToViolations(errors, data) {
43433
43392
  if (!errors)
43434
43393
  return [];
43435
- return errors.map((err) => mapOne(err, data));
43394
+ return errors.map((err) => ({
43395
+ ...mapOne(err, data),
43396
+ ...err.keyword ? { keyword: err.keyword } : {}
43397
+ }));
43436
43398
  }
43437
43399
  function prefixViolations(violations, prefix) {
43438
43400
  if (!prefix)
@@ -43779,6 +43741,88 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
43779
43741
  return validateActionData(envelope.payload, spec, precompiledActions);
43780
43742
  }
43781
43743
 
43744
+ // ../protocol/dist/schemas/ops-blueprint.js
43745
+ var opsGenerateBlueprintInputSchema = external_exports.object({
43746
+ appId: external_exports.string().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),
43747
+ contract: dataContractSchema,
43748
+ generator: external_exports.string().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),
43749
+ persona: external_exports.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),
43750
+ aesthetic: external_exports.string().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona \u2014 persona names the user mental model; aesthetic names the visual treatment."),
43751
+ context: external_exports.record(external_exports.string(), jsonValueSchema).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),
43752
+ seedPrompt: external_exports.string().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),
43753
+ setAsOperatorDefault: external_exports.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")
43754
+ }).strict();
43755
+ var opsGenerateBlueprintOutputSchema = external_exports.object({
43756
+ blueprintId: external_exports.string().min(1),
43757
+ codeHash: external_exports.string().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped \u2014 the failure mode is surfaced through generator-level error reporting elsewhere."),
43758
+ validatorScore: external_exports.number().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),
43759
+ source: llmBlueprintSourceSchema.describe("Provenance stamped on the persisted `Blueprint.source` \u2014 always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")
43760
+ }).strict();
43761
+ var opsRegisterBlueprintInputSchema = external_exports.object({
43762
+ appId: external_exports.string().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),
43763
+ contract: dataContractSchema,
43764
+ componentCode: external_exports.string().min(1).describe("Verbatim component-code body to persist. Stored as-is \u2014 no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),
43765
+ persona: external_exports.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),
43766
+ aesthetic: external_exports.string().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),
43767
+ context: external_exports.record(external_exports.string(), jsonValueSchema).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),
43768
+ seedPrompt: external_exports.string().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),
43769
+ setAsOperatorDefault: external_exports.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")
43770
+ }).strict();
43771
+ var opsRegisterBlueprintOutputSchema = external_exports.object({
43772
+ blueprintId: external_exports.string().min(1),
43773
+ codeHash: external_exports.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),
43774
+ source: userBlueprintSourceSchema.describe('Provenance stamped on the persisted `Blueprint.source` \u2014 always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')
43775
+ }).strict();
43776
+ var opsListBlueprintsInputSchema = external_exports.object({
43777
+ appId: external_exports.string().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app."),
43778
+ contractHash: external_exports.string().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),
43779
+ generator: external_exports.string().min(1).optional().describe('Filter to engine-generated blueprints (`source.kind === "llm"`) whose `source.generator` equals this slug. `user`-sourced rows never match (they carry no engine provenance).'),
43780
+ persona: external_exports.string().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),
43781
+ intentKeywords: external_exports.array(external_exports.string().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")
43782
+ }).strict();
43783
+ var opsListBlueprintsOutputSchema = external_exports.object({
43784
+ blueprints: external_exports.array(blueprintSchema)
43785
+ }).strict();
43786
+ var opsUpdateBlueprintInputSchema = external_exports.object({
43787
+ appId: external_exports.string().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to."),
43788
+ blueprintId: external_exports.string().min(1),
43789
+ isOperatorDefault: external_exports.literal(true).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` \u2014 to unpin, set another blueprint in the same group as default, or delete this one."),
43790
+ variance: blueprintVarianceSchema.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')
43791
+ }).strict();
43792
+ var opsUpdateBlueprintOutputSchema = external_exports.object({
43793
+ blueprintId: external_exports.string().min(1),
43794
+ updatedAt: external_exports.string().min(1)
43795
+ }).strict();
43796
+ var opsDeleteBlueprintInputSchema = external_exports.object({
43797
+ appId: external_exports.string().min(1).optional().describe("Target app for this curation call. Defaults to the caller's bound app identity; callers not bound to an app must provide it. The deployment's authorization policy decides whether the caller may curate the named app. Must match the app the addressed blueprint belongs to."),
43798
+ blueprintId: external_exports.string().min(1)
43799
+ }).strict();
43800
+ var opsDeleteBlueprintOutputSchema = external_exports.object({
43801
+ deleted: external_exports.literal(true)
43802
+ }).strict();
43803
+
43804
+ // ../protocol/dist/envelopes/builders.js
43805
+ function resolveSchemaVersion(parts) {
43806
+ if ("schemaVersion" in parts) {
43807
+ return parts.schemaVersion;
43808
+ }
43809
+ return PROTOCOL_SCHEMA_VERSION;
43810
+ }
43811
+ function makeActionEnvelope(parts) {
43812
+ const envelope = {
43813
+ sessionId: parts.sessionId,
43814
+ type: parts.type
43815
+ };
43816
+ if (parts.payload !== void 0)
43817
+ envelope.payload = parts.payload;
43818
+ if (parts.clientSeq !== void 0)
43819
+ envelope.clientSeq = parts.clientSeq;
43820
+ const stamp = resolveSchemaVersion(parts);
43821
+ if (stamp !== void 0)
43822
+ envelope.schemaVersion = stamp;
43823
+ return envelope;
43824
+ }
43825
+
43782
43826
  // ../wire/dist/contract.js
43783
43827
  var ClientContractViolationError = class extends Error {
43784
43828
  direction;
@@ -46650,6 +46694,349 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46650
46694
  zIndex: standardZIndex
46651
46695
  };
46652
46696
 
46697
+ // ../design/dist/themes/definitions/guuey-brand.js
46698
+ var shared8 = {
46699
+ font: {
46700
+ family: {
46701
+ sans: {
46702
+ $value: '"DM Sans", system-ui, -apple-system, sans-serif',
46703
+ $type: "fontFamily"
46704
+ },
46705
+ mono: {
46706
+ $value: '"JetBrains Mono", ui-monospace, monospace',
46707
+ $type: "fontFamily"
46708
+ }
46709
+ },
46710
+ size: {
46711
+ sm: { $value: "0.875rem", $type: "dimension" },
46712
+ base: { $value: "1rem", $type: "dimension" },
46713
+ lg: { $value: "1.125rem", $type: "dimension" },
46714
+ xl: { $value: "1.25rem", $type: "dimension" },
46715
+ "2xl": { $value: "1.5rem", $type: "dimension" }
46716
+ },
46717
+ weight: {
46718
+ normal: { $value: "400", $type: "fontWeight" },
46719
+ medium: { $value: "500", $type: "fontWeight" },
46720
+ semibold: { $value: "600", $type: "fontWeight" },
46721
+ bold: { $value: "700", $type: "fontWeight" }
46722
+ },
46723
+ lineHeight: {
46724
+ tight: { $value: "1.25", $type: "number" },
46725
+ normal: { $value: "1.5", $type: "number" },
46726
+ relaxed: { $value: "1.75", $type: "number" }
46727
+ }
46728
+ },
46729
+ spacing: {
46730
+ "1": { $value: "0.25rem", $type: "dimension" },
46731
+ "2": { $value: "0.5rem", $type: "dimension" },
46732
+ "3": { $value: "0.75rem", $type: "dimension" },
46733
+ "4": { $value: "1rem", $type: "dimension" },
46734
+ "5": { $value: "1.25rem", $type: "dimension" },
46735
+ "6": { $value: "1.5rem", $type: "dimension" },
46736
+ "8": { $value: "2rem", $type: "dimension" },
46737
+ "10": { $value: "2.5rem", $type: "dimension" },
46738
+ "12": { $value: "3rem", $type: "dimension" }
46739
+ },
46740
+ // NOTE: `shape` is per-mode (round 4) — radius is shared via
46741
+ // `sharedRadius` below, but shadows split: dark wants near-none ink
46742
+ // (a visible black blob under a card on a dark surface was the
46743
+ // round-3 "borders looking ugly" residual's shadow half), light
46744
+ // wants classic soft grey.
46745
+ motion: {
46746
+ duration: {
46747
+ fast: { $value: "120ms", $type: "duration" },
46748
+ normal: { $value: "200ms", $type: "duration" },
46749
+ slow: { $value: "400ms", $type: "duration" },
46750
+ ambient: { $value: "2000ms", $type: "duration" }
46751
+ },
46752
+ easing: {
46753
+ default: { $value: "cubic-bezier(0.4, 0, 0.2, 1)", $type: "cubicBezier" },
46754
+ bounce: {
46755
+ $value: "cubic-bezier(0.68, -0.55, 0.27, 1.55)",
46756
+ $type: "cubicBezier"
46757
+ },
46758
+ spring: { $value: "cubic-bezier(0.22, 1, 0.36, 1)", $type: "cubicBezier" }
46759
+ },
46760
+ transition: {
46761
+ fast: { $value: "120ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
46762
+ normal: { $value: "200ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
46763
+ slow: { $value: "400ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
46764
+ colors: {
46765
+ $value: "color 200ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms cubic-bezier(0.4, 0, 0.2, 1), border-color 200ms cubic-bezier(0.4, 0, 0.2, 1)",
46766
+ $type: "transition"
46767
+ },
46768
+ opacity: { $value: "opacity 200ms cubic-bezier(0.4, 0, 0.2, 1)", $type: "transition" },
46769
+ transform: { $value: "transform 200ms cubic-bezier(0.22, 1, 0.36, 1)", $type: "transition" }
46770
+ },
46771
+ keyframes: {
46772
+ "fade-in": {
46773
+ $value: "0%{opacity:0}100%{opacity:1}",
46774
+ $type: "keyframes"
46775
+ },
46776
+ "slide-up": {
46777
+ $value: "0%{opacity:0;transform:translateY(8px)}100%{opacity:1;transform:translateY(0)}",
46778
+ $type: "keyframes"
46779
+ },
46780
+ "pulse-soft": {
46781
+ $value: "0%{opacity:1}50%{opacity:0.65}100%{opacity:1}",
46782
+ $type: "keyframes"
46783
+ }
46784
+ }
46785
+ },
46786
+ accessibility: {
46787
+ focusRing: {
46788
+ color: { $value: "#B8FF3A", $type: "color" },
46789
+ width: { $value: "2px", $type: "dimension" },
46790
+ offset: { $value: "2px", $type: "dimension" }
46791
+ },
46792
+ reducedMotion: {
46793
+ duration: { $value: "0ms", $type: "duration" }
46794
+ },
46795
+ highContrast: {
46796
+ borderWidth: { $value: "2px", $type: "dimension" },
46797
+ textColor: { $value: "#FFFFFF", $type: "color" },
46798
+ backgroundColor: { $value: "#000000", $type: "color" },
46799
+ linkColor: { $value: "#CCFF66", $type: "color" }
46800
+ }
46801
+ },
46802
+ zIndex: standardZIndex
46803
+ };
46804
+ var sharedRadius = {
46805
+ sm: { $value: "0.375rem", $type: "dimension" },
46806
+ md: { $value: "0.5rem", $type: "dimension" },
46807
+ lg: { $value: "0.75rem", $type: "dimension" },
46808
+ xl: { $value: "1rem", $type: "dimension" },
46809
+ full: { $value: "9999px", $type: "dimension" }
46810
+ };
46811
+ var darkShadows = {
46812
+ sm: { $value: "0 1px 2px rgba(0, 0, 0, 0.2)", $type: "shadow" },
46813
+ md: { $value: "0 2px 8px rgba(0, 0, 0, 0.25)", $type: "shadow" },
46814
+ lg: { $value: "0 6px 16px rgba(0, 0, 0, 0.28)", $type: "shadow" },
46815
+ xl: { $value: "0 10px 24px rgba(0, 0, 0, 0.3)", $type: "shadow" }
46816
+ };
46817
+ var lightShadows = {
46818
+ sm: { $value: "0 1px 2px rgba(26, 29, 36, 0.06)", $type: "shadow" },
46819
+ md: { $value: "0 2px 8px rgba(26, 29, 36, 0.08)", $type: "shadow" },
46820
+ lg: { $value: "0 6px 16px rgba(26, 29, 36, 0.1)", $type: "shadow" },
46821
+ xl: { $value: "0 12px 28px rgba(26, 29, 36, 0.12)", $type: "shadow" }
46822
+ };
46823
+ var guueyBrandDark = {
46824
+ $name: "guuey-brand-v1",
46825
+ $description: "The guuey product brand (dark) \u2014 slate-ink surfaces, slime #B8FF3A accent, DM Sans.",
46826
+ $metadata: {
46827
+ font: "DM Sans",
46828
+ fontUrl: "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap",
46829
+ philosophy: "Agent-native. Slime on slate.",
46830
+ // Round 5 (founder-ruled): the guuey host clips the view with its
46831
+ // own rounded rim — the HOST owns the card silhouette; the theme
46832
+ // paints no border on the root layer. Inner hairlines stay.
46833
+ frameless: true
46834
+ },
46835
+ color: {
46836
+ // Inverted dark ladder — 50 darkest, 900 lightest; slime pinned at
46837
+ // 500, the portal's lifted #CCFF66 at the hover stop (600).
46838
+ primary: {
46839
+ "50": { $value: "#141D05", $type: "color" },
46840
+ "100": { $value: "#28390B", $type: "color" },
46841
+ "200": { $value: "#3F5A11", $type: "color" },
46842
+ "300": { $value: "#5F8719", $type: "color" },
46843
+ "400": { $value: "#8CC627", $type: "color" },
46844
+ "500": { $value: "#B8FF3A", $type: "color" },
46845
+ // slime (brand)
46846
+ "600": { $value: "#CCFF66", $type: "color" },
46847
+ // lifted hover (portal)
46848
+ "700": { $value: "#DBFF8F", $type: "color" },
46849
+ // pressed / emphasized
46850
+ "800": { $value: "#E9FFB8", $type: "color" },
46851
+ "900": { $value: "#F6FFE0", $type: "color" }
46852
+ },
46853
+ // Slate-ink foundation from the portal surface family: sunken →
46854
+ // surface → elevated → surfaceVariant, then up through the greys
46855
+ // to paper (#F6F5EE).
46856
+ neutral: {
46857
+ "50": { $value: "#0E1014", $type: "color" },
46858
+ // sunken
46859
+ "100": { $value: "#1A1D24", $type: "color" },
46860
+ // surface
46861
+ "200": { $value: "#232630", $type: "color" },
46862
+ // elevated
46863
+ "300": { $value: "#242938", $type: "color" },
46864
+ // surfaceVariant
46865
+ "400": { $value: "#3B4152", $type: "color" },
46866
+ "500": { $value: "#878C99", $type: "color" },
46867
+ // hint text
46868
+ "600": { $value: "#B7BAC4", $type: "color" },
46869
+ // secondary text
46870
+ "700": { $value: "#D5D6DC", $type: "color" },
46871
+ "800": { $value: "#E8E7E2", $type: "color" },
46872
+ "900": { $value: "#F6F5EE", $type: "color" }
46873
+ // paper (text)
46874
+ },
46875
+ // BRAND RULE: success IS slime — never green. Same family as
46876
+ // primary so an "Available" pill and a slime CTA read as one brand.
46877
+ success: {
46878
+ "50": { $value: "#141D05", $type: "color" },
46879
+ "100": { $value: "#28390B", $type: "color" },
46880
+ "200": { $value: "#3F5A11", $type: "color" },
46881
+ "500": { $value: "#B8FF3A", $type: "color" },
46882
+ // slime (brand rule)
46883
+ "600": { $value: "#CCFF66", $type: "color" },
46884
+ "700": { $value: "#DBFF8F", $type: "color" },
46885
+ "800": { $value: "#E9FFB8", $type: "color" }
46886
+ },
46887
+ warning: {
46888
+ "50": { $value: "#33240A", $type: "color" },
46889
+ "100": { $value: "#5C420F", $type: "color" },
46890
+ "200": { $value: "#8A6318", $type: "color" },
46891
+ "500": { $value: "#FFB020", $type: "color" },
46892
+ // portal warning
46893
+ "600": { $value: "#FFC24D", $type: "color" },
46894
+ "700": { $value: "#FFD37D", $type: "color" },
46895
+ "800": { $value: "#FFE5AE", $type: "color" }
46896
+ },
46897
+ error: {
46898
+ "50": { $value: "#33110E", $type: "color" },
46899
+ "100": { $value: "#5E1F1B", $type: "color" },
46900
+ "200": { $value: "#8F2F2A", $type: "color" },
46901
+ "500": { $value: "#FF5B5B", $type: "color" },
46902
+ // portal error
46903
+ "600": { $value: "#FF7D7A", $type: "color" },
46904
+ "700": { $value: "#FF9F9C", $type: "color" },
46905
+ "800": { $value: "#FFC3C0", $type: "color" }
46906
+ },
46907
+ info: {
46908
+ "50": { $value: "#0A2733", $type: "color" },
46909
+ "100": { $value: "#12455C", $type: "color" },
46910
+ "200": { $value: "#1E6A8A", $type: "color" },
46911
+ "500": { $value: "#3AC8FF", $type: "color" },
46912
+ // portal info
46913
+ "600": { $value: "#66D4FF", $type: "color" },
46914
+ "700": { $value: "#92E0FF", $type: "color" },
46915
+ "800": { $value: "#BFECFF", $type: "color" }
46916
+ },
46917
+ // M3 roles — portal values verbatim.
46918
+ surface: { $value: "#1A1D24", $type: "color" },
46919
+ onSurface: { $value: "#F6F5EE", $type: "color" },
46920
+ surfaceVariant: { $value: "#242938", $type: "color" },
46921
+ onSurfaceVariant: { $value: "#B7BAC4", $type: "color" },
46922
+ container: { $value: "#232630", $type: "color" },
46923
+ // elevated
46924
+ onContainer: { $value: "#F6F5EE", $type: "color" },
46925
+ // Round 4 (portal stops): .14 IS the base hairline; .18 is the
46926
+ // STRONG stop (no DtcgTheme slot — strong/interactive strokes
46927
+ // ride primary borders + the slime focusRing, receipted by the
46928
+ // Select button). Dividers sit softer still.
46929
+ outline: { $value: "rgba(246, 245, 238, 0.14)", $type: "color" },
46930
+ outlineVariant: { $value: "rgba(246, 245, 238, 0.1)", $type: "color" },
46931
+ onPrimary: { $value: "#0E1014", $type: "color" },
46932
+ // ink on slime
46933
+ primaryContainer: { $value: "#242938", $type: "color" },
46934
+ // portal
46935
+ onPrimaryContainer: { $value: "#CCFF66", $type: "color" },
46936
+ // portal
46937
+ onError: { $value: "#33110E", $type: "color" },
46938
+ errorContainer: { $value: "#5E1F1B", $type: "color" },
46939
+ onErrorContainer: { $value: "#FFC3C0", $type: "color" },
46940
+ // Pink accent — the portal's tertiary. (Purple #9B6AFF has no
46941
+ // DtcgTheme slot; see the file docstring.)
46942
+ tertiary: { $value: "#FF4FB0", $type: "color" },
46943
+ onTertiary: { $value: "#0E1014", $type: "color" },
46944
+ tertiaryContainer: { $value: "#451A35", $type: "color" },
46945
+ onTertiaryContainer: { $value: "#FFC1E4", $type: "color" }
46946
+ },
46947
+ ...shared8,
46948
+ shape: { radius: sharedRadius, shadow: darkShadows }
46949
+ };
46950
+ var guueyBrandLight = {
46951
+ $name: "guuey-brand-v1",
46952
+ $description: "The guuey product brand (light, provisional) \u2014 paper surfaces, slime accent held for fills, darkened slime for text emphasis.",
46953
+ $metadata: guueyBrandDark.$metadata,
46954
+ color: {
46955
+ // Normal (non-inverted) ramps; slime stays the 500 fill anchor,
46956
+ // text-emphasis stops (600/700) darken for contrast on paper.
46957
+ primary: {
46958
+ "50": { $value: "#F6FFE0", $type: "color" },
46959
+ "100": { $value: "#E9FFB8", $type: "color" },
46960
+ "200": { $value: "#DBFF8F", $type: "color" },
46961
+ "300": { $value: "#CCFF66", $type: "color" },
46962
+ "400": { $value: "#B8FF3A", $type: "color" },
46963
+ "500": { $value: "#9FE01C", $type: "color" },
46964
+ "600": { $value: "#7DB214", $type: "color" },
46965
+ "700": { $value: "#5C850D", $type: "color" },
46966
+ "800": { $value: "#3F5A11", $type: "color" },
46967
+ "900": { $value: "#28390B", $type: "color" }
46968
+ },
46969
+ neutral: {
46970
+ "50": { $value: "#FBFAF6", $type: "color" },
46971
+ "100": { $value: "#F6F5EE", $type: "color" },
46972
+ "200": { $value: "#E8E7E2", $type: "color" },
46973
+ "300": { $value: "#D5D6DC", $type: "color" },
46974
+ "400": { $value: "#B7BAC4", $type: "color" },
46975
+ "500": { $value: "#6E7380", $type: "color" },
46976
+ "600": { $value: "#4A4F5C", $type: "color" },
46977
+ "700": { $value: "#333846", $type: "color" },
46978
+ "800": { $value: "#242938", $type: "color" },
46979
+ "900": { $value: "#1A1D24", $type: "color" }
46980
+ },
46981
+ success: {
46982
+ "50": { $value: "#F6FFE0", $type: "color" },
46983
+ "100": { $value: "#E9FFB8", $type: "color" },
46984
+ "200": { $value: "#DBFF8F", $type: "color" },
46985
+ "500": { $value: "#7DB214", $type: "color" },
46986
+ "600": { $value: "#5C850D", $type: "color" },
46987
+ "700": { $value: "#476809", $type: "color" },
46988
+ "800": { $value: "#28390B", $type: "color" }
46989
+ },
46990
+ warning: {
46991
+ "50": { $value: "#FFF4DD", $type: "color" },
46992
+ "100": { $value: "#FFE5AE", $type: "color" },
46993
+ "200": { $value: "#FFD37D", $type: "color" },
46994
+ "500": { $value: "#D98A0A", $type: "color" },
46995
+ "600": { $value: "#A96A06", $type: "color" },
46996
+ "700": { $value: "#7C4D04", $type: "color" },
46997
+ "800": { $value: "#523203", $type: "color" }
46998
+ },
46999
+ error: {
47000
+ "50": { $value: "#FFE9E8", $type: "color" },
47001
+ "100": { $value: "#FFC3C0", $type: "color" },
47002
+ "200": { $value: "#FF9F9C", $type: "color" },
47003
+ "500": { $value: "#E23B3B", $type: "color" },
47004
+ "600": { $value: "#B62C2C", $type: "color" },
47005
+ "700": { $value: "#8A1F1F", $type: "color" },
47006
+ "800": { $value: "#5E1F1B", $type: "color" }
47007
+ },
47008
+ info: {
47009
+ "50": { $value: "#E5F7FF", $type: "color" },
47010
+ "100": { $value: "#BFECFF", $type: "color" },
47011
+ "200": { $value: "#92E0FF", $type: "color" },
47012
+ "500": { $value: "#0E93C9", $type: "color" },
47013
+ "600": { $value: "#0B739E", $type: "color" },
47014
+ "700": { $value: "#085572", $type: "color" },
47015
+ "800": { $value: "#12455C", $type: "color" }
47016
+ },
47017
+ surface: { $value: "#FFFFFF", $type: "color" },
47018
+ onSurface: { $value: "#1A1D24", $type: "color" },
47019
+ surfaceVariant: { $value: "#F6F5EE", $type: "color" },
47020
+ onSurfaceVariant: { $value: "#4A4F5C", $type: "color" },
47021
+ container: { $value: "#FBFAF6", $type: "color" },
47022
+ onContainer: { $value: "#1A1D24", $type: "color" },
47023
+ outline: { $value: "rgba(26, 29, 36, 0.18)", $type: "color" },
47024
+ outlineVariant: { $value: "rgba(26, 29, 36, 0.10)", $type: "color" },
47025
+ onPrimary: { $value: "#0E1014", $type: "color" },
47026
+ primaryContainer: { $value: "#E9FFB8", $type: "color" },
47027
+ onPrimaryContainer: { $value: "#28390B", $type: "color" },
47028
+ onError: { $value: "#FFFFFF", $type: "color" },
47029
+ errorContainer: { $value: "#FFE9E8", $type: "color" },
47030
+ onErrorContainer: { $value: "#8A1F1F", $type: "color" },
47031
+ tertiary: { $value: "#D6247F", $type: "color" },
47032
+ onTertiary: { $value: "#FFFFFF", $type: "color" },
47033
+ tertiaryContainer: { $value: "#FFDCEE", $type: "color" },
47034
+ onTertiaryContainer: { $value: "#6B1240", $type: "color" }
47035
+ },
47036
+ ...shared8,
47037
+ shape: { radius: sharedRadius, shadow: lightShadows }
47038
+ };
47039
+
46653
47040
  // ../design/dist/themes/ThemeProvider.js
46654
47041
  var import_jsx_runtime56 = __toESM(require_jsx_runtime(), 1);
46655
47042
  var import_react37 = __toESM(require_react(), 1);
@@ -46849,19 +47236,26 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46849
47236
  function globalExpr(gguiKey, legacyName) {
46850
47237
  return `(globalThis.__ggui__&&globalThis.__ggui__["${gguiKey}"]||window["${legacyName}"])`;
46851
47238
  }
46852
- function buildDataUrlReactShim(globalName) {
47239
+ function toDataUrl(js) {
47240
+ return `data:text/javascript,${encodeURIComponent(js)}`;
47241
+ }
47242
+ function jsReactShim(globalName) {
46853
47243
  const namedExports = REACT_EXPORTS.map((e) => `export const ${e} = R.${e};`).join(" ");
46854
47244
  const resolve = globalExpr("react", globalName);
46855
- const js = `const R = ${resolve}; export default R; ${namedExports}`;
46856
- return `data:text/javascript,${encodeURIComponent(js)}`;
47245
+ return `const R = ${resolve}; export default R; ${namedExports}`;
46857
47246
  }
46858
- function buildDataUrlReactDomShim() {
47247
+ function buildDataUrlReactShim(globalName) {
47248
+ return toDataUrl(jsReactShim(globalName));
47249
+ }
47250
+ function jsReactDomShim() {
46859
47251
  const REACT_DOM_EXPORTS = ["createPortal", "flushSync", "unstable_batchedUpdates"];
46860
47252
  const namedExports = REACT_DOM_EXPORTS.map((e) => `export const ${e} = D.${e};`).join(" ");
46861
- const js = `const D = globalThis.__ggui__["reactDom"]; export default D; ${namedExports}`;
46862
- return `data:text/javascript,${encodeURIComponent(js)}`;
47253
+ return `const D = globalThis.__ggui__["reactDom"]; export default D; ${namedExports}`;
46863
47254
  }
46864
- function buildDataUrlJsxShim(globalName) {
47255
+ function buildDataUrlReactDomShim() {
47256
+ return toDataUrl(jsReactDomShim());
47257
+ }
47258
+ function jsJsxShim(globalName) {
46865
47259
  const resolve = globalExpr("react", globalName);
46866
47260
  const js = [
46867
47261
  `const R = ${resolve};`,
@@ -46874,9 +47268,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46874
47268
  `export{jsx,jsx as jsxs,jsx as jsxDEV};`,
46875
47269
  `export const Fragment=R.Fragment;`
46876
47270
  ].join("");
46877
- return `data:text/javascript,${encodeURIComponent(js)}`;
47271
+ return js;
46878
47272
  }
46879
- function buildDataUrlGlobalShim(globalName, gguiKey, exportNames, fallbackGlobals, fallbackGguiKeys) {
47273
+ function buildDataUrlJsxShim(globalName) {
47274
+ return toDataUrl(jsJsxShim(globalName));
47275
+ }
47276
+ function jsGlobalShim(globalName, gguiKey, exportNames, fallbackGlobals, fallbackGguiKeys) {
46880
47277
  if (exportNames && exportNames.length > 0) {
46881
47278
  const globals = [globalName, ...fallbackGlobals || []];
46882
47279
  const gguiKeys = [gguiKey, ...fallbackGguiKeys || []];
@@ -46887,17 +47284,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46887
47284
  ));
46888
47285
  const mergeExpr = resolveExprs.join(",");
46889
47286
  const named = exportNames.map((n) => `export const ${n} = M["${n}"];`).join(" ");
46890
- const js2 = resolveExprs.length > 1 ? `const M = Object.assign({}, ${mergeExpr}); ${named} export default M;` : `const M = ${resolveExprs[0]}; ${named} export default M;`;
46891
- return `data:text/javascript,${encodeURIComponent(js2)}`;
47287
+ return resolveExprs.length > 1 ? `const M = Object.assign({}, ${mergeExpr}); ${named} export default M;` : `const M = ${resolveExprs[0]}; ${named} export default M;`;
46892
47288
  }
46893
47289
  const resolve = globalExpr(gguiKey, globalName);
46894
- const js = `const M = ${resolve} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`;
46895
- return `data:text/javascript,${encodeURIComponent(js)}`;
47290
+ return `const M = ${resolve} || {}; const handler = { get(_, key) { return M[key]; } }; export default new Proxy({}, handler);`;
46896
47291
  }
46897
- function buildDataUrlWireShim() {
47292
+ function buildDataUrlGlobalShim(globalName, gguiKey, exportNames, fallbackGlobals, fallbackGguiKeys) {
47293
+ return toDataUrl(jsGlobalShim(globalName, gguiKey, exportNames, fallbackGlobals, fallbackGguiKeys));
47294
+ }
47295
+ function jsWireShim() {
46898
47296
  const named = WIRE_EXPORTS.map((e) => `export const ${e} = w.${e};`).join(" ");
46899
- const js = `const w = globalThis.__ggui__.wire; ${named} export default w;`;
46900
- return `data:text/javascript,${encodeURIComponent(js)}`;
47297
+ return `const w = globalThis.__ggui__.wire; ${named} export default w;`;
47298
+ }
47299
+ function buildDataUrlWireShim() {
47300
+ return toDataUrl(jsWireShim());
46901
47301
  }
46902
47302
  function extractNamedImports(code, specifier) {
46903
47303
  const esc2 = specifier.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -46914,7 +47314,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46914
47314
  }
46915
47315
  return [...names];
46916
47316
  }
46917
- function buildGadgetPackageShim(packageName, exportNames) {
47317
+ function jsGadgetPackageShim(packageName, exportNames) {
46918
47318
  const pkgLit = JSON.stringify(packageName);
46919
47319
  const hasComponent = exportNames.some((n) => /^[A-Z]/.test(n));
46920
47320
  const parts = [];
@@ -46931,7 +47331,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46931
47331
  parts.push(`export const ${name}=${factory}(${JSON.stringify(name)});`);
46932
47332
  }
46933
47333
  parts.push(`export default new Proxy({},{get:function(_,k){return NS()[k];}});`);
46934
- return `data:text/javascript,${encodeURIComponent(parts.join(""))}`;
47334
+ return parts.join("");
47335
+ }
47336
+ function buildGadgetPackageShim(packageName, exportNames) {
47337
+ return toDataUrl(jsGadgetPackageShim(packageName, exportNames));
46935
47338
  }
46936
47339
  function rewriteDataUrl(code, opts) {
46937
47340
  const reactGlobal = opts.reactGlobal ?? "__REACT";
@@ -46966,6 +47369,29 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46966
47369
  }
46967
47370
  return code;
46968
47371
  }
47372
+ var ASSET_SHIM_FOR_SPECIFIER = {
47373
+ "react/jsx-runtime": "jsx-runtime",
47374
+ "react/jsx-dev-runtime": "jsx-runtime",
47375
+ "react-dom": "react-dom",
47376
+ react: "react",
47377
+ "@ggui-ai/design/primitives": "primitives",
47378
+ "@ggui-ai/design/components": "components",
47379
+ "@ggui-ai/design/compositions": "compositions",
47380
+ "@ggui-ai/design/interact": "interact",
47381
+ "@ggui-ai/design/templates": "templates",
47382
+ "@ggui-ai/design/app-components": "app-components",
47383
+ "@ggui-ai/design/tokens": "tokens",
47384
+ "@ggui-ai/design": "design",
47385
+ "@ggui-ai/wire": "wire",
47386
+ "@ggui-ai/gadgets": "gadgets"
47387
+ };
47388
+ function rewriteAssetUrl(code, opts) {
47389
+ const base = opts.shimBaseUrl.replace(/\/$/, "");
47390
+ for (const [specifier, shimName] of Object.entries(ASSET_SHIM_FOR_SPECIFIER)) {
47391
+ code = replaceSpecifier(code, specifier, `${base}/${shimName}.js`);
47392
+ }
47393
+ return code;
47394
+ }
46969
47395
  function rewriteImportmap(code, opts) {
46970
47396
  const base = opts.reactBaseUrl ?? "https://esm.sh/react@18.2.0";
46971
47397
  code = replaceSpecifier(code, "react/jsx-runtime", `${base}/jsx-runtime`);
@@ -46979,6 +47405,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
46979
47405
  return rewriteDataUrl(code, options);
46980
47406
  case "importmap":
46981
47407
  return rewriteImportmap(code, options);
47408
+ case "asset-url":
47409
+ return rewriteAssetUrl(code, options);
46982
47410
  }
46983
47411
  }
46984
47412
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/ui-visual-tester",
3
- "version": "0.9.0",
3
+ "version": "0.11.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/design": "0.9.0",
52
- "@ggui-ai/protocol": "0.9.0",
53
- "@ggui-ai/wire": "0.9.0"
51
+ "@ggui-ai/design": "0.11.0",
52
+ "@ggui-ai/protocol": "0.11.0",
53
+ "@ggui-ai/wire": "0.11.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@playwright/test": "^1.60.0",