@40rty/ams-sdk 0.4.3 → 0.5.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/dist/index.js CHANGED
@@ -33,6 +33,11 @@ __export(src_exports3, {
33
33
  AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
34
34
  AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
35
35
  AvailabilityStatusSchema: () => AvailabilityStatusSchema,
36
+ BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
37
+ BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
38
+ BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
39
+ BrandMarkImageSchema: () => BrandMarkImageSchema,
40
+ BrandMarkSchema: () => BrandMarkSchema,
36
41
  BugLocationSchema: () => BugLocationSchema,
37
42
  BugSeveritySchema: () => BugSeveritySchema,
38
43
  CANVAS_ARRANGEMENTS: () => CANVAS_ARRANGEMENTS,
@@ -216,6 +221,7 @@ __export(src_exports3, {
216
221
  ShellRootContext: () => ShellRootContext,
217
222
  ShimmerSweep: () => ShimmerSweep,
218
223
  SiblingProductSchema: () => SiblingProductSchema,
224
+ SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
219
225
  SpaceBugSchema: () => SpaceBugSchema,
220
226
  SpacefrontCanvas: () => SpacefrontCanvas,
221
227
  SpacefrontPreviewProvider: () => SpacefrontPreviewProvider,
@@ -1400,6 +1406,11 @@ __export(src_exports, {
1400
1406
  AttributeDefSchema: () => AttributeDefSchema,
1401
1407
  AttributeScopeBucketSchema: () => AttributeScopeBucketSchema,
1402
1408
  AttributeScopeConfigSchema: () => AttributeScopeConfigSchema,
1409
+ BRAND_MARK_MAX_BYTES: () => BRAND_MARK_MAX_BYTES,
1410
+ BRAND_MARK_SLOTS: () => BRAND_MARK_SLOTS,
1411
+ BRAND_MARK_TYPES: () => BRAND_MARK_TYPES,
1412
+ BrandMarkImageSchema: () => BrandMarkImageSchema,
1413
+ BrandMarkSchema: () => BrandMarkSchema,
1403
1414
  BugLocationSchema: () => BugLocationSchema,
1404
1415
  BugSeveritySchema: () => BugSeveritySchema,
1405
1416
  CANVAS_ARRANGEMENTS: () => CANVAS_ARRANGEMENTS,
@@ -1498,6 +1509,7 @@ __export(src_exports, {
1498
1509
  SessionVerdictSchema: () => SessionVerdictSchema,
1499
1510
  ShellConfigSchema: () => ShellConfigSchema,
1500
1511
  ShellMenuItemSchema: () => ShellMenuItemSchema,
1512
+ SpaceBrandMarkSchema: () => SpaceBrandMarkSchema,
1501
1513
  SpaceBugSchema: () => SpaceBugSchema,
1502
1514
  SpecSchema: () => SpecSchema,
1503
1515
  StateSnapshotFrameSchema: () => StateSnapshotFrameSchema,
@@ -3300,20 +3312,41 @@ function catalogFromWire(wire) {
3300
3312
  }
3301
3313
 
3302
3314
  // ../spacestation/src/catalog/wire/package-release.ts
3315
+ import { z as z26 } from "zod";
3316
+
3317
+ // ../spacestation/src/catalog/wire/brand-mark.ts
3303
3318
  import { z as z25 } from "zod";
3319
+ var BRAND_MARK_TYPES = ["svg", "png"];
3320
+ var BRAND_MARK_MAX_BYTES = 256 * 1024;
3321
+ var MAX_BASE64_LENGTH = Math.ceil(BRAND_MARK_MAX_BYTES / 3) * 4;
3322
+ var BrandMarkUploadSchema = z25.object({
3323
+ type: z25.enum(BRAND_MARK_TYPES),
3324
+ data: z25.string().base64().min(1).max(MAX_BASE64_LENGTH, `a mark file is at most ${BRAND_MARK_MAX_BYTES / 1024} KB`)
3325
+ }).strict();
3326
+ var BrandMarkStoredSchema = z25.object({
3327
+ type: z25.enum(BRAND_MARK_TYPES),
3328
+ sha256: z25.string().regex(/^[0-9a-f]{64}$/, "a stored mark is named by its sha256")
3329
+ }).strict();
3330
+ var BrandMarkFileSchema = z25.union([BrandMarkUploadSchema, BrandMarkStoredSchema]);
3331
+ var BRAND_MARK_SLOTS = ["square", "wordmark"];
3332
+ var BrandMarkSchema = z25.object({ square: BrandMarkFileSchema.optional(), wordmark: BrandMarkFileSchema.optional() }).strict().refine((mark) => mark.square !== void 0 || mark.wordmark !== void 0, "a mark names a square, a wordmark, or both");
3333
+ var BrandMarkImageSchema = z25.object({ src: z25.string().min(1), type: z25.enum(BRAND_MARK_TYPES) }).strict();
3334
+ var SpaceBrandMarkSchema = z25.object({ square: BrandMarkImageSchema.nullable(), wordmark: BrandMarkImageSchema.nullable() }).strict();
3335
+
3336
+ // ../spacestation/src/catalog/wire/package-release.ts
3304
3337
  var RESERVED_SCOPES = ["@fourty/", "@40rty/"];
3305
3338
  var BUNDLE_ASSET_PATH = /^assets\/[A-Za-z0-9_-]+\.(woff2?|ttf|otf|png|jpe?g|svg|gif|webp)$/;
3306
- var PackageReleaseSchema = z25.object({
3339
+ var PackageReleaseSchema = z26.object({
3307
3340
  /** The id spaces name in `componentSources` — an npm-style package name. */
3308
- sourceId: z25.string().regex(/^(@[a-z0-9][a-z0-9-]*\/)?[a-z0-9][a-z0-9-]*$/, "sourceId must be an npm-style package name").refine((id) => !RESERVED_SCOPES.some((scope2) => id.startsWith(scope2)), `the ${RESERVED_SCOPES.join(" and ")} scopes are reserved`),
3309
- label: z25.string().min(1).max(120),
3341
+ sourceId: z26.string().regex(/^(@[a-z0-9][a-z0-9-]*\/)?[a-z0-9][a-z0-9-]*$/, "sourceId must be an npm-style package name").refine((id) => !RESERVED_SCOPES.some((scope2) => id.startsWith(scope2)), `the ${RESERVED_SCOPES.join(" and ")} scopes are reserved`),
3342
+ label: z26.string().min(1).max(120),
3310
3343
  /** The package's own version, as its repository states it — shown in the console. */
3311
- version: z25.string().min(1).max(40),
3344
+ version: z26.string().min(1).max(40),
3312
3345
  /** What this release changed, in the publisher's words (`forty publish --message`) — shown in the console's version list. */
3313
- description: z25.string().min(1).max(500).optional(),
3346
+ description: z26.string().min(1).max(500).optional(),
3314
3347
  catalog: WireCatalogSchema,
3315
3348
  /** Component manifests by path under `catalogs/`, e.g. `catalogs/product/productGrid.md`. */
3316
- manifests: z25.record(z25.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z25.string()),
3349
+ manifests: z26.record(z26.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z26.string()),
3317
3350
  /**
3318
3351
  * The brand's components, built — present when the PLATFORM hosts this
3319
3352
  * brand's spacefront, absent when the brand hosts it in its own app. One
@@ -3322,34 +3355,40 @@ var PackageReleaseSchema = z25.object({
3322
3355
  * images — base64, keyed by the path the stylesheet's `url()` names, beside
3323
3356
  * it). It is served to browsers; the platform's servers never run it.
3324
3357
  */
3325
- bundle: z25.object({
3326
- js: z25.string().min(1),
3327
- css: z25.string(),
3328
- assets: z25.record(z25.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z25.string().base64()).optional()
3358
+ bundle: z26.object({
3359
+ js: z26.string().min(1),
3360
+ css: z26.string(),
3361
+ assets: z26.record(z26.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z26.string().base64()).optional()
3329
3362
  }).strict().optional(),
3330
3363
  /**
3331
3364
  * The class the spacefront root carries while this package is the space's.
3332
3365
  * The package's own stylesheet styles under it. Absent = the platform's
3333
3366
  * default theme class.
3334
3367
  */
3335
- theme: z25.object({ themeClass: z25.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
3368
+ theme: z26.object({ themeClass: z26.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
3369
+ /**
3370
+ * The brand's mark (`brand-mark.ts`). Sent as the files themselves; the
3371
+ * platform stores them content-addressed at ingest and keeps only their
3372
+ * addresses here.
3373
+ */
3374
+ mark: BrandMarkSchema.optional(),
3336
3375
  /** The canvas a fresh session opens on, before the visitor has asked anything. */
3337
3376
  seedLayout: SpecSchema.optional(),
3338
3377
  /**
3339
3378
  * The package's own composition guidance for its own components — prompt
3340
3379
  * markdown the agent reads, gated on the capabilities it names (`requires`).
3341
3380
  */
3342
- promptSections: z25.array(z25.object({ id: z25.string().regex(/^[a-z0-9-]+$/), order: z25.number().int(), content: z25.string().min(1).max(2e4), requires: z25.array(z25.string()) }).strict()).max(10).optional(),
3381
+ promptSections: z26.array(z26.object({ id: z26.string().regex(/^[a-z0-9-]+$/), order: z26.number().int(), content: z26.string().min(1).max(2e4), requires: z26.array(z26.string()) }).strict()).max(10).optional(),
3343
3382
  /**
3344
3383
  * Opaque per-vertical extension data (`BrandDefinition.config`): the
3345
3384
  * platform stays vertical-agnostic and the vertical's own code reads its keys.
3346
3385
  */
3347
- config: z25.record(z25.string(), z25.unknown()).optional(),
3386
+ config: z26.record(z26.string(), z26.unknown()).optional(),
3348
3387
  /**
3349
3388
  * Set by the platform, never by a publisher: this release is a DRAFT of the
3350
3389
  * package `of`, previewed on the space `space`. See `draftSourceId`.
3351
3390
  */
3352
- draft: z25.object({ of: z25.string().min(1), space: z25.string().min(1) }).strict().optional()
3391
+ draft: z26.object({ of: z26.string().min(1), space: z26.string().min(1) }).strict().optional()
3353
3392
  }).strict();
3354
3393
  var DRAFT_SEPARATOR = "--";
3355
3394
  function draftSourceId(sourceId, spaceSlug, developer) {
@@ -3368,36 +3407,36 @@ function parseReleasePreview(id) {
3368
3407
  }
3369
3408
 
3370
3409
  // ../spacestation/src/projection/projection.ts
3371
- import { z as z26 } from "zod";
3372
- var LateBoundValueSchema = z26.object({ fact: z26.literal(true) });
3373
- var DirectiveValueSchema = z26.union([
3374
- z26.string(),
3375
- z26.number(),
3376
- z26.boolean(),
3410
+ import { z as z27 } from "zod";
3411
+ var LateBoundValueSchema = z27.object({ fact: z27.literal(true) });
3412
+ var DirectiveValueSchema = z27.union([
3413
+ z27.string(),
3414
+ z27.number(),
3415
+ z27.boolean(),
3377
3416
  LateBoundValueSchema
3378
3417
  ]);
3379
3418
  function isLateBound(v) {
3380
3419
  return typeof v === "object" && v !== null && "fact" in v;
3381
3420
  }
3382
- var ProjectionDirectiveSchema = z26.object({
3421
+ var ProjectionDirectiveSchema = z27.object({
3383
3422
  /** Keep only items whose axis values all match. Keyed by axis name
3384
3423
  * (e.g. `Size`); value is a literal or the `{fact:true}` marker. */
3385
- isolateTo: z26.record(DirectiveValueSchema).optional(),
3424
+ isolateTo: z27.record(DirectiveValueSchema).optional(),
3386
3425
  /** Isolate to EVERY axis the visitor has a stored fact for. The agent
3387
3426
  * emits this (it is vertical-agnostic — it cannot name axes); the
3388
3427
  * entity binding expands it against the entity's own axes + facts. */
3389
- isolateToFacts: z26.boolean().optional(),
3428
+ isolateToFacts: z27.boolean().optional(),
3390
3429
  /** Keep only items the entity binding reports as available. */
3391
- availableOnly: z26.boolean().optional(),
3430
+ availableOnly: z27.boolean().optional(),
3392
3431
  /** Cap the rendered count after filtering. */
3393
- limit: z26.number().int().positive().optional()
3432
+ limit: z27.number().int().positive().optional()
3394
3433
  });
3395
- var ProjectionPreferencesSchema = z26.record(
3396
- z26.union([ProjectionDirectiveSchema, z26.null()])
3434
+ var ProjectionPreferencesSchema = z27.record(
3435
+ z27.union([ProjectionDirectiveSchema, z27.null()])
3397
3436
  );
3398
3437
  var PROJECTION_SET_SIGNAL = "projection.set";
3399
- var ProjectionSetPayloadSchema = z26.object({
3400
- setAll: z26.union([ProjectionDirectiveSchema, z26.null()]).optional(),
3438
+ var ProjectionSetPayloadSchema = z27.object({
3439
+ setAll: z27.union([ProjectionDirectiveSchema, z27.null()]).optional(),
3401
3440
  set: ProjectionPreferencesSchema.optional()
3402
3441
  });
3403
3442
  function norm(v) {
@@ -3431,23 +3470,23 @@ function isActiveDirective(directive) {
3431
3470
  }
3432
3471
 
3433
3472
  // ../spacestation/src/focus/focus.ts
3434
- import { z as z27 } from "zod";
3473
+ import { z as z28 } from "zod";
3435
3474
  var VIEW_FOCUS_ELEMENT_SIGNAL = "view.focus.element";
3436
- var FocusElementPayloadSchema = z27.object({
3437
- elementId: z27.string().min(1)
3475
+ var FocusElementPayloadSchema = z28.object({
3476
+ elementId: z28.string().min(1)
3438
3477
  });
3439
3478
 
3440
3479
  // ../spacestation/src/view/continuation.ts
3441
- import { z as z28 } from "zod";
3480
+ import { z as z29 } from "zod";
3442
3481
  var VIEW_EXTEND_SIGNAL = "view.extend";
3443
- var ViewExtendPayloadSchema = z28.object({
3444
- reason: z28.enum(["scroll_near_bottom"])
3482
+ var ViewExtendPayloadSchema = z29.object({
3483
+ reason: z29.enum(["scroll_near_bottom"])
3445
3484
  });
3446
3485
  var VIEW_EXHAUSTED_SIGNAL = "view.exhausted";
3447
3486
  var CONTINUATION_ENABLED = false;
3448
3487
 
3449
3488
  // ../spacestation/src/attachment/attachment.ts
3450
- import { z as z29 } from "zod";
3489
+ import { z as z30 } from "zod";
3451
3490
  var ALLOWED_ATTACHMENT_TYPES = [
3452
3491
  "image/jpeg",
3453
3492
  "image/png",
@@ -3462,34 +3501,34 @@ function isAllowedAttachmentType(mime) {
3462
3501
  function isImageAttachment(mime) {
3463
3502
  return mime.startsWith("image/");
3464
3503
  }
3465
- var AttachmentRefSchema = z29.object({
3466
- id: z29.string().min(1),
3467
- mimeType: z29.string().refine(isAllowedAttachmentType, {
3504
+ var AttachmentRefSchema = z30.object({
3505
+ id: z30.string().min(1),
3506
+ mimeType: z30.string().refine(isAllowedAttachmentType, {
3468
3507
  message: "mimeType not on the attachment allow-list"
3469
3508
  }),
3470
- name: z29.string().min(1),
3471
- size: z29.number().int().positive().max(MAX_ATTACHMENT_BYTES),
3472
- url: z29.string().min(1)
3509
+ name: z30.string().min(1),
3510
+ size: z30.number().int().positive().max(MAX_ATTACHMENT_BYTES),
3511
+ url: z30.string().min(1)
3473
3512
  });
3474
- var AttachmentRefsSchema = z29.array(AttachmentRefSchema);
3513
+ var AttachmentRefsSchema = z30.array(AttachmentRefSchema);
3475
3514
 
3476
3515
  // ../spacestation/src/contracts/entry-context.ts
3477
- import { z as z30 } from "zod";
3516
+ import { z as z31 } from "zod";
3478
3517
  var ENTRY_CONTEXT_MAX_VALUE_CHARS = 200;
3479
3518
  var ENTRY_CONTEXT_MAX_KEYS = 12;
3480
3519
  var ENTRY_CONTEXT_MAX_NAMESPACES = 8;
3481
3520
  var ENTRY_CONTEXT_MAX_NAME_CHARS = 64;
3482
- var EntryContextValueSchema = z30.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
3483
- var EntryContextNameSchema = z30.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
3484
- var EntryContextNamespaceSchema = z30.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries3) => Object.keys(entries3).length <= ENTRY_CONTEXT_MAX_KEYS, {
3521
+ var EntryContextValueSchema = z31.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
3522
+ var EntryContextNameSchema = z31.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
3523
+ var EntryContextNamespaceSchema = z31.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries3) => Object.keys(entries3).length <= ENTRY_CONTEXT_MAX_KEYS, {
3485
3524
  message: `at most ${ENTRY_CONTEXT_MAX_KEYS} entries per namespace`
3486
3525
  });
3487
- var EntryContextSchema = z30.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
3526
+ var EntryContextSchema = z31.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
3488
3527
  message: `at most ${ENTRY_CONTEXT_MAX_NAMESPACES} entry-context namespaces`
3489
3528
  });
3490
3529
 
3491
3530
  // ../spacestation/src/contracts/session-arrival.ts
3492
- import { z as z31 } from "zod";
3531
+ import { z as z32 } from "zod";
3493
3532
  var SURFACES = [
3494
3533
  "spacefront",
3495
3534
  "embed",
@@ -3499,11 +3538,11 @@ var SURFACES = [
3499
3538
  "playground",
3500
3539
  "automation"
3501
3540
  ];
3502
- var SurfaceSchema = z31.enum(SURFACES);
3541
+ var SurfaceSchema = z32.enum(SURFACES);
3503
3542
  var CLICK_ID_KINDS = ["gclid", "fbclid", "msclkid", "wbraid", "gbraid"];
3504
- var ClickIdKindSchema = z31.enum(CLICK_ID_KINDS);
3543
+ var ClickIdKindSchema = z32.enum(CLICK_ID_KINDS);
3505
3544
  var VISITOR_ID_DURABILITIES = ["persisted", "ephemeral", "host_supplied"];
3506
- var VisitorIdDurabilitySchema = z31.enum(VISITOR_ID_DURABILITIES);
3545
+ var VisitorIdDurabilitySchema = z32.enum(VISITOR_ID_DURABILITIES);
3507
3546
  var TRAFFIC_BUCKETS = [
3508
3547
  "paid_google",
3509
3548
  "paid_meta",
@@ -3515,10 +3554,10 @@ var TRAFFIC_BUCKETS = [
3515
3554
  "direct",
3516
3555
  "unknown"
3517
3556
  ];
3518
- var TrafficBucketSchema = z31.enum(TRAFFIC_BUCKETS);
3557
+ var TrafficBucketSchema = z32.enum(TRAFFIC_BUCKETS);
3519
3558
  var ARRIVAL_MAX_VALUE_CHARS = 200;
3520
- var ArrivalValueSchema = z31.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
3521
- var SessionArrivalSchema = z31.object({
3559
+ var ArrivalValueSchema = z32.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
3560
+ var SessionArrivalSchema = z32.object({
3522
3561
  utmSource: ArrivalValueSchema.optional(),
3523
3562
  utmMedium: ArrivalValueSchema.optional(),
3524
3563
  utmCampaign: ArrivalValueSchema.optional(),
@@ -3605,36 +3644,36 @@ function arrivalToParams(arrival, into) {
3605
3644
  }
3606
3645
 
3607
3646
  // ../spacestation/src/catalog/attribute-registry.ts
3608
- import { z as z32 } from "zod";
3609
- var AttributeScopeBucketSchema = z32.object({
3610
- scope: z32.string(),
3611
- needles: z32.array(z32.string()).readonly(),
3612
- label: z32.string().optional()
3647
+ import { z as z33 } from "zod";
3648
+ var AttributeScopeBucketSchema = z33.object({
3649
+ scope: z33.string(),
3650
+ needles: z33.array(z33.string()).readonly(),
3651
+ label: z33.string().optional()
3613
3652
  });
3614
- var AttributeScopeConfigSchema = z32.object({
3615
- facet: z32.string(),
3616
- buckets: z32.array(AttributeScopeBucketSchema).readonly(),
3617
- emptyScope: z32.string(),
3618
- noMatchScope: z32.string(),
3619
- ignoreValues: z32.array(z32.string()).readonly(),
3620
- emptyScopeLabel: z32.string().optional(),
3621
- noMatchScopeLabel: z32.string().optional()
3653
+ var AttributeScopeConfigSchema = z33.object({
3654
+ facet: z33.string(),
3655
+ buckets: z33.array(AttributeScopeBucketSchema).readonly(),
3656
+ emptyScope: z33.string(),
3657
+ noMatchScope: z33.string(),
3658
+ ignoreValues: z33.array(z33.string()).readonly(),
3659
+ emptyScopeLabel: z33.string().optional(),
3660
+ noMatchScopeLabel: z33.string().optional()
3622
3661
  });
3623
- var AttributeDefBaseSchema = z32.object({
3624
- description: z32.string().optional(),
3625
- durable: z32.boolean().optional(),
3626
- label: z32.string().optional()
3662
+ var AttributeDefBaseSchema = z33.object({
3663
+ description: z33.string().optional(),
3664
+ durable: z33.boolean().optional(),
3665
+ label: z33.string().optional()
3627
3666
  });
3628
- var AttributeDefSchema = z32.discriminatedUnion("kind", [
3629
- AttributeDefBaseSchema.extend({ kind: z32.literal("enum"), values: z32.array(z32.string()) }),
3630
- AttributeDefBaseSchema.extend({ kind: z32.literal("free_text") }),
3631
- AttributeDefBaseSchema.extend({ kind: z32.literal("date_or_season") }),
3632
- AttributeDefBaseSchema.extend({ kind: z32.literal("money_or_band") }),
3667
+ var AttributeDefSchema = z33.discriminatedUnion("kind", [
3668
+ AttributeDefBaseSchema.extend({ kind: z33.literal("enum"), values: z33.array(z33.string()) }),
3669
+ AttributeDefBaseSchema.extend({ kind: z33.literal("free_text") }),
3670
+ AttributeDefBaseSchema.extend({ kind: z33.literal("date_or_season") }),
3671
+ AttributeDefBaseSchema.extend({ kind: z33.literal("money_or_band") }),
3633
3672
  AttributeDefBaseSchema.extend({
3634
- kind: z32.literal("number"),
3635
- min: z32.number().optional(),
3636
- max: z32.number().optional(),
3637
- unit: z32.string().optional()
3673
+ kind: z33.literal("number"),
3674
+ min: z33.number().optional(),
3675
+ max: z33.number().optional(),
3676
+ unit: z33.string().optional()
3638
3677
  })
3639
3678
  ]);
3640
3679
  var EXTRAS_PREFIX = "extras.";
@@ -3734,30 +3773,30 @@ function hostingAllows(hosting, surface) {
3734
3773
  }
3735
3774
 
3736
3775
  // ../spacestation/src/space/trace.ts
3737
- import { z as z33 } from "zod";
3738
- var RunTokenUsageSchema = z33.object({
3739
- input_tokens: z33.number().optional(),
3740
- output_tokens: z33.number().optional(),
3741
- cache_read_tokens: z33.number().optional()
3776
+ import { z as z34 } from "zod";
3777
+ var RunTokenUsageSchema = z34.object({
3778
+ input_tokens: z34.number().optional(),
3779
+ output_tokens: z34.number().optional(),
3780
+ cache_read_tokens: z34.number().optional()
3742
3781
  });
3743
- var TraceRecordSchema = z33.object({
3744
- id: z33.string().uuid(),
3745
- spaceId: z33.string().uuid().nullable(),
3746
- sessionId: z33.string(),
3782
+ var TraceRecordSchema = z34.object({
3783
+ id: z34.string().uuid(),
3784
+ spaceId: z34.string().uuid().nullable(),
3785
+ sessionId: z34.string(),
3747
3786
  /** OTP-verified visitor email the session was unlocked with, or `null`
3748
3787
  * for an unlocked space / anonymous unlock. */
3749
- visitorEmail: z33.string().nullable(),
3750
- userPrompt: z33.string(),
3751
- branch: z33.string().nullable(),
3752
- responseText: z33.string().nullable(),
3753
- layout: z33.unknown().nullable(),
3754
- phaseTimings: z33.record(z33.number()).nullable(),
3755
- tokensByModel: z33.record(RunTokenUsageSchema).nullable(),
3756
- toolCalls: z33.array(z33.unknown()).nullable(),
3757
- diagnostics: z33.array(z33.unknown()).nullable(),
3758
- latencyFirstText: z33.number().int().nullable(),
3759
- latencyFirstPatch: z33.number().int().nullable(),
3760
- latencyTotal: z33.number().int().nullable(),
3788
+ visitorEmail: z34.string().nullable(),
3789
+ userPrompt: z34.string(),
3790
+ branch: z34.string().nullable(),
3791
+ responseText: z34.string().nullable(),
3792
+ layout: z34.unknown().nullable(),
3793
+ phaseTimings: z34.record(z34.number()).nullable(),
3794
+ tokensByModel: z34.record(RunTokenUsageSchema).nullable(),
3795
+ toolCalls: z34.array(z34.unknown()).nullable(),
3796
+ diagnostics: z34.array(z34.unknown()).nullable(),
3797
+ latencyFirstText: z34.number().int().nullable(),
3798
+ latencyFirstPatch: z34.number().int().nullable(),
3799
+ latencyTotal: z34.number().int().nullable(),
3761
3800
  /**
3762
3801
  * The CLIENT's turn id for this run, or `null`.
3763
3802
  *
@@ -3773,29 +3812,29 @@ var TraceRecordSchema = z33.object({
3773
3812
  * a turn whose ack the client never saw — none of which is evidence that a
3774
3813
  * visitor asked something and got nothing.
3775
3814
  */
3776
- turnId: z33.string().nullable(),
3815
+ turnId: z34.string().nullable(),
3777
3816
  /** Serialized `TraceTracker.exportState()` payload (parsed object) —
3778
3817
  * lets the inspector rehydrate this run verbatim after a reload. */
3779
- trackerState: z33.unknown().nullable(),
3780
- createdAt: z33.string()
3818
+ trackerState: z34.unknown().nullable(),
3819
+ createdAt: z34.string()
3781
3820
  });
3782
- var MillisecondsSchema = z33.number().nullable().transform((v) => v === null ? null : Math.round(v));
3783
- var CreateTraceInputSchema = z33.object({
3784
- spaceId: z33.string().uuid().nullable(),
3785
- sessionId: z33.string(),
3786
- visitorEmail: z33.string().nullable(),
3787
- userPrompt: z33.string(),
3788
- branch: z33.string().nullable(),
3789
- responseText: z33.string().nullable(),
3790
- layout: z33.unknown().nullable(),
3791
- phaseTimings: z33.record(z33.number()).nullable(),
3792
- tokensByModel: z33.record(RunTokenUsageSchema).nullable(),
3793
- toolCalls: z33.array(z33.unknown()).nullable(),
3794
- diagnostics: z33.array(z33.unknown()).nullable(),
3821
+ var MillisecondsSchema = z34.number().nullable().transform((v) => v === null ? null : Math.round(v));
3822
+ var CreateTraceInputSchema = z34.object({
3823
+ spaceId: z34.string().uuid().nullable(),
3824
+ sessionId: z34.string(),
3825
+ visitorEmail: z34.string().nullable(),
3826
+ userPrompt: z34.string(),
3827
+ branch: z34.string().nullable(),
3828
+ responseText: z34.string().nullable(),
3829
+ layout: z34.unknown().nullable(),
3830
+ phaseTimings: z34.record(z34.number()).nullable(),
3831
+ tokensByModel: z34.record(RunTokenUsageSchema).nullable(),
3832
+ toolCalls: z34.array(z34.unknown()).nullable(),
3833
+ diagnostics: z34.array(z34.unknown()).nullable(),
3795
3834
  latencyFirstText: MillisecondsSchema,
3796
3835
  latencyFirstPatch: MillisecondsSchema,
3797
3836
  latencyTotal: MillisecondsSchema,
3798
- trackerState: z33.unknown().nullable(),
3837
+ trackerState: z34.unknown().nullable(),
3799
3838
  /**
3800
3839
  * The CLIENT's turn id for this run, or `null`.
3801
3840
  *
@@ -3811,37 +3850,37 @@ var CreateTraceInputSchema = z33.object({
3811
3850
  * a turn whose ack the client never saw — none of which is evidence that a
3812
3851
  * visitor asked something and got nothing.
3813
3852
  */
3814
- turnId: z33.string().nullable()
3853
+ turnId: z34.string().nullable()
3815
3854
  });
3816
- var AgentSessionSummarySchema = z33.object({
3817
- sessionId: z33.string(),
3855
+ var AgentSessionSummarySchema = z34.object({
3856
+ sessionId: z34.string(),
3818
3857
  /** Turn rows only; background/secondary runs are excluded by the aggregate. */
3819
- turnCount: z33.number().int(),
3858
+ turnCount: z34.number().int(),
3820
3859
  /** The session's opening prompt — titles the row in the UI. */
3821
- firstPrompt: z33.string(),
3822
- startedAt: z33.string(),
3823
- lastRunAt: z33.string(),
3860
+ firstPrompt: z34.string(),
3861
+ startedAt: z34.string(),
3862
+ lastRunAt: z34.string(),
3824
3863
  /** Summed `latency_total` across the session's turns. */
3825
- totalLatencyMs: z33.number().int()
3864
+ totalLatencyMs: z34.number().int()
3826
3865
  });
3827
- var SessionTurnSchema = z33.object({
3828
- id: z33.string().uuid(),
3829
- userPrompt: z33.string(),
3830
- responseText: z33.string().nullable(),
3866
+ var SessionTurnSchema = z34.object({
3867
+ id: z34.string().uuid(),
3868
+ userPrompt: z34.string(),
3869
+ responseText: z34.string().nullable(),
3831
3870
  /** Full cumulative Spec committed by this turn — never a patch delta. */
3832
- layout: z33.unknown().nullable(),
3833
- createdAt: z33.string(),
3834
- latencyTotal: z33.number().int().nullable(),
3835
- phaseTimings: z33.record(z33.number()).nullable(),
3836
- tokensByModel: z33.record(z33.object({
3837
- input_tokens: z33.number().optional(),
3838
- output_tokens: z33.number().optional()
3871
+ layout: z34.unknown().nullable(),
3872
+ createdAt: z34.string(),
3873
+ latencyTotal: z34.number().int().nullable(),
3874
+ phaseTimings: z34.record(z34.number()).nullable(),
3875
+ tokensByModel: z34.record(z34.object({
3876
+ input_tokens: z34.number().optional(),
3877
+ output_tokens: z34.number().optional()
3839
3878
  })).nullable(),
3840
- toolCalls: z33.array(z33.unknown()).nullable(),
3841
- diagnostics: z33.array(z33.unknown()).nullable()
3879
+ toolCalls: z34.array(z34.unknown()).nullable(),
3880
+ diagnostics: z34.array(z34.unknown()).nullable()
3842
3881
  });
3843
- var SessionReplaySchema = z33.object({
3844
- turns: z33.array(SessionTurnSchema),
3882
+ var SessionReplaySchema = z34.object({
3883
+ turns: z34.array(SessionTurnSchema),
3845
3884
  /**
3846
3885
  * The session's own last-committed layout, read straight off the durable
3847
3886
  * session record (`sessions.blob.layout`) rather than derived from `turns`.
@@ -3852,20 +3891,20 @@ var SessionReplaySchema = z33.object({
3852
3891
  * a perfectly real layout; only this field can show it. Null exclusively
3853
3892
  * when the durable session row itself could not be read.
3854
3893
  */
3855
- sessionLayout: z33.record(z33.string(), z33.unknown()).nullable()
3894
+ sessionLayout: z34.record(z34.string(), z34.unknown()).nullable()
3856
3895
  });
3857
- var SessionTraceSchema = z33.object({
3858
- trackerState: z33.string().nullable()
3896
+ var SessionTraceSchema = z34.object({
3897
+ trackerState: z34.string().nullable()
3859
3898
  });
3860
- var LlmUsageDailySchema = z33.object({
3861
- day: z33.string(),
3899
+ var LlmUsageDailySchema = z34.object({
3900
+ day: z34.string(),
3862
3901
  /** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
3863
- environment: z33.string(),
3864
- feature: z33.string(),
3865
- model: z33.string(),
3866
- provider: z33.string(),
3902
+ environment: z34.string(),
3903
+ feature: z34.string(),
3904
+ model: z34.string(),
3905
+ provider: z34.string(),
3867
3906
  /** Masked tail of the key actually billed, or null when unknown/non-Google. */
3868
- keyFingerprint: z33.string().nullable(),
3907
+ keyFingerprint: z34.string().nullable(),
3869
3908
  /**
3870
3909
  * The space the call served, or null when it served none.
3871
3910
  *
@@ -3874,91 +3913,91 @@ var LlmUsageDailySchema = z33.object({
3874
3913
  * report that share rather than dropping it, or a per-space total reads as
3875
3914
  * the platform total.
3876
3915
  */
3877
- spaceId: z33.string().nullable(),
3916
+ spaceId: z34.string().nullable(),
3878
3917
  /**
3879
3918
  * The surface of the session the call served (`sessions.surface`), or null
3880
3919
  * when it served no session or the session predates surface recording.
3881
3920
  * `automation` is the eval harness — the signal that files an ordinary
3882
3921
  * `agent-turn` as testing spend rather than as a visitor's.
3883
3922
  */
3884
- surface: z33.string().nullable(),
3885
- inputTokens: z33.number(),
3886
- outputTokens: z33.number(),
3923
+ surface: z34.string().nullable(),
3924
+ inputTokens: z34.number(),
3925
+ outputTokens: z34.number(),
3887
3926
  /** Subset of inputTokens, never additional to it. */
3888
- cachedInputTokens: z33.number(),
3889
- reasoningTokens: z33.number(),
3890
- callCount: z33.number(),
3891
- errorCount: z33.number(),
3892
- estimatedCostUsd: z33.number().nullable()
3927
+ cachedInputTokens: z34.number(),
3928
+ reasoningTokens: z34.number(),
3929
+ callCount: z34.number(),
3930
+ errorCount: z34.number(),
3931
+ estimatedCostUsd: z34.number().nullable()
3893
3932
  });
3894
- var LlmUsageBySessionSchema = z33.object({
3895
- sessionId: z33.string(),
3896
- environment: z33.string(),
3897
- model: z33.string(),
3933
+ var LlmUsageBySessionSchema = z34.object({
3934
+ sessionId: z34.string(),
3935
+ environment: z34.string(),
3936
+ model: z34.string(),
3898
3937
  /** The space this session belongs to, or null for a session with no space. */
3899
- spaceId: z33.string().nullable(),
3938
+ spaceId: z34.string().nullable(),
3900
3939
  /** The session's surface — see `LlmUsageDailySchema.surface`. */
3901
- surface: z33.string().nullable(),
3940
+ surface: z34.string().nullable(),
3902
3941
  /** Label only — the first feature seen in the session. */
3903
- firstFeature: z33.string(),
3904
- startedAt: z33.string(),
3905
- endedAt: z33.string(),
3906
- inputTokens: z33.number(),
3907
- outputTokens: z33.number(),
3908
- cachedInputTokens: z33.number(),
3909
- reasoningTokens: z33.number(),
3910
- callCount: z33.number(),
3911
- errorCount: z33.number(),
3942
+ firstFeature: z34.string(),
3943
+ startedAt: z34.string(),
3944
+ endedAt: z34.string(),
3945
+ inputTokens: z34.number(),
3946
+ outputTokens: z34.number(),
3947
+ cachedInputTokens: z34.number(),
3948
+ reasoningTokens: z34.number(),
3949
+ callCount: z34.number(),
3950
+ errorCount: z34.number(),
3912
3951
  /** Priced server-side, like the daily rollup — the browser never carries a
3913
3952
  * rate table, so there is exactly one place a price can be wrong. Null when
3914
3953
  * the model is unpriced; never 0, which would read as free. */
3915
- estimatedCostUsd: z33.number().nullable()
3954
+ estimatedCostUsd: z34.number().nullable()
3916
3955
  });
3917
- var LlmSessionsDailySchema = z33.object({
3918
- day: z33.string(),
3919
- environment: z33.string(),
3920
- sessionCount: z33.number()
3956
+ var LlmSessionsDailySchema = z34.object({
3957
+ day: z34.string(),
3958
+ environment: z34.string(),
3959
+ sessionCount: z34.number()
3921
3960
  });
3922
3961
 
3923
3962
  // ../spacestation/src/space/session-queue.ts
3924
- import { z as z35 } from "zod";
3963
+ import { z as z36 } from "zod";
3925
3964
 
3926
3965
  // ../spacestation/src/space/session-activity.ts
3927
- import { z as z34 } from "zod";
3928
- var SessionActivityEventSchema = z34.object({
3929
- id: z34.string(),
3930
- kind: z34.string(),
3931
- occurredAt: z34.string(),
3932
- source: z34.string(),
3933
- surface: z34.string(),
3934
- payload: z34.record(z34.unknown())
3966
+ import { z as z35 } from "zod";
3967
+ var SessionActivityEventSchema = z35.object({
3968
+ id: z35.string(),
3969
+ kind: z35.string(),
3970
+ occurredAt: z35.string(),
3971
+ source: z35.string(),
3972
+ surface: z35.string(),
3973
+ payload: z35.record(z35.unknown())
3935
3974
  });
3936
- var SessionActivitySchema = z34.object({
3937
- events: z34.array(SessionActivityEventSchema),
3938
- hasMore: z34.boolean()
3975
+ var SessionActivitySchema = z35.object({
3976
+ events: z35.array(SessionActivityEventSchema),
3977
+ hasMore: z35.boolean()
3939
3978
  });
3940
3979
 
3941
3980
  // ../spacestation/src/space/session-queue.ts
3942
- var SessionVerdictSchema = z35.enum(["unreviewed", "viewed", "bug"]);
3943
- var RecordableVerdictSchema = z35.enum(["viewed", "bug"]);
3944
- var SessionReviewEventSchema = z35.object({
3945
- id: z35.string().uuid(),
3981
+ var SessionVerdictSchema = z36.enum(["unreviewed", "viewed", "bug"]);
3982
+ var RecordableVerdictSchema = z36.enum(["viewed", "bug"]);
3983
+ var SessionReviewEventSchema = z36.object({
3984
+ id: z36.string().uuid(),
3946
3985
  verdict: RecordableVerdictSchema,
3947
3986
  /** Account email of the operator who judged it. Attribution is the reason the
3948
3987
  * log is append-only rather than a mutable current-state row. */
3949
- reviewer: z35.string(),
3950
- note: z35.string().nullable(),
3951
- createdAt: z35.string()
3988
+ reviewer: z36.string(),
3989
+ note: z36.string().nullable(),
3990
+ createdAt: z36.string()
3952
3991
  });
3953
- var BugSeveritySchema = z35.enum(["high", "medium", "low"]);
3954
- var BugLocationSchema = z35.object({
3955
- elementId: z35.string().nullable(),
3992
+ var BugSeveritySchema = z36.enum(["high", "medium", "low"]);
3993
+ var BugLocationSchema = z36.object({
3994
+ elementId: z36.string().nullable(),
3956
3995
  /** Display only — the catalog component type, e.g. "productGrid". Null
3957
3996
  * alongside a null `elementId`. */
3958
- elementType: z35.string().nullable(),
3997
+ elementType: z36.string().nullable(),
3959
3998
  /** Fraction of the ELEMENT's own box. Null for a page anchor. */
3960
- offsetXPct: z35.number().min(0).max(100).nullable(),
3961
- offsetYPct: z35.number().min(0).max(100).nullable(),
3999
+ offsetXPct: z36.number().min(0).max(100).nullable(),
4000
+ offsetYPct: z36.number().min(0).max(100).nullable(),
3962
4001
  /**
3963
4002
  * ABSOLUTE document pixels, for a pin with no element under it. Null for an
3964
4003
  * element anchor.
@@ -3969,8 +4008,8 @@ var BugLocationSchema = z35.object({
3969
4008
  * on the page with it. Measured before this was fixed: growing the page 9%
3970
4009
  * slid a pin 32px, so a pin ran away from the cursor reaching for it.
3971
4010
  */
3972
- pageX: z35.number().nullable(),
3973
- pageY: z35.number().nullable()
4011
+ pageX: z36.number().nullable(),
4012
+ pageY: z36.number().nullable()
3974
4013
  }).refine(
3975
4014
  (loc) => {
3976
4015
  const hasOffsets = loc.offsetXPct !== null && loc.offsetYPct !== null;
@@ -3984,24 +4023,24 @@ var BugLocationSchema = z35.object({
3984
4023
  message: "location must be one complete anchor: an element (elementId + elementType + both offsets), a page position (pageX + pageY), or a legacy page fraction (both offsets)"
3985
4024
  }
3986
4025
  );
3987
- var SessionBugSchema = z35.object({
3988
- id: z35.string().uuid(),
4026
+ var SessionBugSchema = z36.object({
4027
+ id: z36.string().uuid(),
3989
4028
  /** 1-based turn the fault was observed on; null when the fault is session-wide. */
3990
- turnIndex: z35.number().int().nullable(),
4029
+ turnIndex: z36.number().int().nullable(),
3991
4030
  /** Where on that turn's canvas the pin was dropped; null for a bug filed
3992
4031
  * without pinning a spot. */
3993
4032
  location: BugLocationSchema.nullable(),
3994
- provider: z35.string(),
3995
- issueKey: z35.string().nullable(),
3996
- issueUrl: z35.string().nullable(),
4033
+ provider: z36.string(),
4034
+ issueKey: z36.string().nullable(),
4035
+ issueUrl: z36.string().nullable(),
3997
4036
  /** The tracker's own state word ('Todo', 'Done', …) — their vocabulary, so
3998
4037
  * open text. Null until first synced. */
3999
- issueState: z35.string().nullable(),
4000
- title: z35.string(),
4001
- body: z35.string(),
4038
+ issueState: z36.string().nullable(),
4039
+ title: z36.string(),
4040
+ body: z36.string(),
4002
4041
  severity: BugSeveritySchema,
4003
- createdBy: z35.string(),
4004
- createdAt: z35.string(),
4042
+ createdBy: z36.string(),
4043
+ createdAt: z36.string(),
4005
4044
  /**
4006
4045
  * When this bug was resolved from the console; null means still OPEN.
4007
4046
  *
@@ -4010,60 +4049,60 @@ var SessionBugSchema = z35.object({
4010
4049
  * whether a particular fault is still live. The timestamp IS the state, so
4011
4050
  * no boolean can contradict it.
4012
4051
  */
4013
- resolvedAt: z35.string().nullable(),
4014
- resolvedBy: z35.string().nullable()
4052
+ resolvedAt: z36.string().nullable(),
4053
+ resolvedBy: z36.string().nullable()
4015
4054
  });
4016
- var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z35.string() });
4017
- var SessionCommentSchema = z35.object({
4018
- id: z35.string().uuid(),
4055
+ var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z36.string() });
4056
+ var SessionCommentSchema = z36.object({
4057
+ id: z36.string().uuid(),
4019
4058
  /** Set = a reply in that bug's thread. Null = a standalone comment pin. */
4020
- bugId: z35.string().uuid().nullable(),
4059
+ bugId: z36.string().uuid().nullable(),
4021
4060
  /** 1-based turn the comment was left on; null for a reply (it reads its
4022
4061
  * parent bug's turn). */
4023
- turnIndex: z35.number().int().nullable(),
4062
+ turnIndex: z36.number().int().nullable(),
4024
4063
  /** The canvas anchor for a STANDALONE comment's own pin; null for a reply. */
4025
4064
  location: BugLocationSchema.nullable(),
4026
- body: z35.string(),
4027
- createdBy: z35.string(),
4028
- createdAt: z35.string()
4065
+ body: z36.string(),
4066
+ createdBy: z36.string(),
4067
+ createdAt: z36.string()
4029
4068
  });
4030
- var CreateCommentInputSchema = z35.object({
4031
- bugId: z35.string().uuid().nullable(),
4032
- turnIndex: z35.number().int().positive().nullable(),
4069
+ var CreateCommentInputSchema = z36.object({
4070
+ bugId: z36.string().uuid().nullable(),
4071
+ turnIndex: z36.number().int().positive().nullable(),
4033
4072
  location: BugLocationSchema.nullable(),
4034
4073
  // Trimmed, so whitespace is not content: `.min(1)` alone accepted a comment
4035
4074
  // of three spaces, which renders as an empty bubble nobody can interpret.
4036
- body: z35.string().trim().min(1)
4075
+ body: z36.string().trim().min(1)
4037
4076
  }).refine((input) => input.bugId === null !== (input.location === null), {
4038
4077
  message: "a comment is either a reply (bugId, no location) or a standalone pin (location, no bugId)"
4039
4078
  });
4040
- var UpdateCommentInputSchema = z35.object({
4041
- body: z35.string().trim().min(1).optional(),
4042
- bugId: z35.string().uuid().nullable().optional(),
4079
+ var UpdateCommentInputSchema = z36.object({
4080
+ body: z36.string().trim().min(1).optional(),
4081
+ bugId: z36.string().uuid().nullable().optional(),
4043
4082
  location: BugLocationSchema.nullable().optional()
4044
4083
  });
4045
4084
  var MOBILE_VIEWPORT_MAX = 720;
4046
- var SessionFormFactorSchema = z35.enum(["mobile", "desktop"]).nullable();
4085
+ var SessionFormFactorSchema = z36.enum(["mobile", "desktop"]).nullable();
4047
4086
  function formFactorFromViewport(width) {
4048
4087
  if (width === null) return null;
4049
4088
  return width <= MOBILE_VIEWPORT_MAX ? "mobile" : "desktop";
4050
4089
  }
4051
- var SessionSummarySchema = z35.object({
4052
- sessionId: z35.string(),
4090
+ var SessionSummarySchema = z36.object({
4091
+ sessionId: z36.string(),
4053
4092
  /** Stable per-browser id — the join key across a visitor's sessions. Null when
4054
4093
  * the session row is gone (pruned) or predates the `sessions` table. */
4055
- visitorId: z35.string().nullable(),
4094
+ visitorId: z36.string().nullable(),
4056
4095
  /** Provider-qualified identity anchor, present only once the visitor
4057
4096
  * identified themselves. Both null together means "not identified yet". */
4058
- identityProvider: z35.string().nullable(),
4059
- identityKey: z35.string().nullable(),
4097
+ identityProvider: z36.string().nullable(),
4098
+ identityKey: z36.string().nullable(),
4060
4099
  /** Team/test traffic. The queue hides these by default. */
4061
- isInternal: z35.boolean(),
4100
+ isInternal: z36.boolean(),
4062
4101
  /** Build that served the session. Null = not captured; a version filter must
4063
4102
  * therefore EXCLUDE it rather than let it match an arbitrary bucket. */
4064
- clientVersion: z35.string().nullable(),
4103
+ clientVersion: z36.string().nullable(),
4065
4104
  /** Commit-shaped interaction signals, counted, keyed by open `SignalType`. */
4066
- signalCounts: z35.record(z35.number()),
4105
+ signalCounts: z36.record(z36.number()),
4067
4106
  /**
4068
4107
  * Did this conversation ACQUIRE anything, and how many times?
4069
4108
  *
@@ -4080,7 +4119,7 @@ var SessionSummarySchema = z35.object({
4080
4119
  * predates the column — and renders as no mark at all. It never means zero:
4081
4120
  * zero is a real, recorded answer and the rail reports it as one.
4082
4121
  */
4083
- conversionAttempts: z35.number().int().nullable(),
4122
+ conversionAttempts: z36.number().int().nullable(),
4084
4123
  /**
4085
4124
  * The same attempts split by EVENT KIND, keyed by the kind's own name
4086
4125
  * (`commerce.cart_line_added`, `commerce.registry_clicked`), counted distinct
@@ -4096,7 +4135,7 @@ var SessionSummarySchema = z35.object({
4096
4135
  * kinds together, and one attempt id appearing under both would be counted
4097
4136
  * once there and twice here.
4098
4137
  */
4099
- conversionKinds: z35.record(z35.number()),
4138
+ conversionKinds: z36.record(z36.number()),
4100
4139
  /**
4101
4140
  * Every analytics funnel step this session reached, in funnel order — the
4102
4141
  * dashboard's own step ids, read by the same per-step predicates, so a queue
@@ -4104,20 +4143,20 @@ var SessionSummarySchema = z35.object({
4104
4143
  * set of strings for the reason `conversionKinds` is: the contract does not
4105
4144
  * learn what a step means. Empty only when read from a pre-column database.
4106
4145
  */
4107
- funnelSteps: z35.array(z35.string()),
4146
+ funnelSteps: z36.array(z36.string()),
4108
4147
  /**
4109
4148
  * The connector's opaque handle for what this session produced in its back
4110
4149
  * office — present only once a checkout actually reached the platform. The
4111
4150
  * console hands it to the back-office link registry; nothing else reads it.
4112
4151
  */
4113
- backOfficeRef: z35.string().nullable(),
4152
+ backOfficeRef: z36.string().nullable(),
4114
4153
  /**
4115
4154
  * The order this session produced, when the connector's back office reported
4116
4155
  * it (`session_orders`): its opaque id and the back office's own name for it.
4117
4156
  * Both null when no order is known — the cart handle above is then the door.
4118
4157
  */
4119
- orderRef: z35.string().nullable(),
4120
- orderLabel: z35.string().nullable(),
4158
+ orderRef: z36.string().nullable(),
4159
+ orderLabel: z36.string().nullable(),
4121
4160
  /**
4122
4161
  * Which shell this session rendered — the one thing about the CAPTURE a list
4123
4162
  * needs.
@@ -4130,12 +4169,12 @@ var SessionSummarySchema = z35.object({
4130
4169
  * on a desktop are not the same session.
4131
4170
  */
4132
4171
  formFactor: SessionFormFactorSchema,
4133
- turnCount: z35.number().int(),
4172
+ turnCount: z36.number().int(),
4134
4173
  /** The visitor's opening message — the single most informative field for
4135
4174
  * deciding whether a session is worth opening, hence the widest column. */
4136
- firstPrompt: z35.string(),
4137
- startedAt: z35.string(),
4138
- lastRunAt: z35.string(),
4175
+ firstPrompt: z36.string(),
4176
+ startedAt: z36.string(),
4177
+ lastRunAt: z36.string(),
4139
4178
  /**
4140
4179
  * The VISITOR's own IANA zone (`America/New_York`), read from their browser
4141
4180
  * at session create — what the two timestamps above should be read in.
@@ -4163,7 +4202,7 @@ var SessionSummarySchema = z35.object({
4163
4202
  * Client-asserted and never validated against a zone table, so every consumer
4164
4203
  * must tolerate an unknown name: `Intl` throws a RangeError on one.
4165
4204
  */
4166
- visitorTimeZone: z35.string().nullable(),
4205
+ visitorTimeZone: z36.string().nullable(),
4167
4206
  /**
4168
4207
  * Mean TIME TO FIRST PATCH, over the turns that recorded one — the first
4169
4208
  * layout op reaching the visitor, and THE latency the project is managed on.
@@ -4171,31 +4210,31 @@ var SessionSummarySchema = z35.object({
4171
4210
  * `totalLatencyMs` carries the chip-gen tail that runs after the visitor is
4172
4211
  * already reading. Null when no turn in the session recorded a patch.
4173
4212
  */
4174
- avgTtftMs: z35.number().int().nullable(),
4213
+ avgTtftMs: z36.number().int().nullable(),
4175
4214
  /** Mean `main_done_ms` — layout + prose complete. Context for the TTFT, not
4176
4215
  * a budget: null on sessions older than the mark's recording. */
4177
- avgMainDoneMs: z35.number().int().nullable(),
4216
+ avgMainDoneMs: z36.number().int().nullable(),
4178
4217
  /** Mean `chip_gen_ms` — the pass that runs AFTER mainDone and is out of the
4179
4218
  * budget. On the row only to explain the gap to `totalLatencyMs`. */
4180
- avgChipGenMs: z35.number().int().nullable(),
4181
- totalLatencyMs: z35.number().int(),
4182
- durationMs: z35.number().int(),
4219
+ avgChipGenMs: z36.number().int().nullable(),
4220
+ totalLatencyMs: z36.number().int(),
4221
+ durationMs: z36.number().int(),
4183
4222
  /** Inferred from recent activity — nothing writes a session-end marker. A
4184
4223
  * live session streams and cannot be given a verdict until it ends. */
4185
- isLive: z35.boolean(),
4224
+ isLive: z36.boolean(),
4186
4225
  verdict: SessionVerdictSchema,
4187
- reviewedBy: z35.string().nullable(),
4188
- reviewedAt: z35.string().nullable(),
4226
+ reviewedBy: z36.string().nullable(),
4227
+ reviewedAt: z36.string().nullable(),
4189
4228
  /** Latest filed bug, flattened onto the row so the queue can show its live
4190
4229
  * state without a second request. */
4191
- bugIssueKey: z35.string().nullable(),
4192
- bugIssueUrl: z35.string().nullable(),
4193
- bugIssueState: z35.string().nullable()
4230
+ bugIssueKey: z36.string().nullable(),
4231
+ bugIssueUrl: z36.string().nullable(),
4232
+ bugIssueState: z36.string().nullable()
4194
4233
  });
4195
- var SessionQueuePageSchema = z35.object({
4196
- sessions: z35.array(SessionSummarySchema),
4197
- totalCount: z35.number().int(),
4198
- hiddenInternalCount: z35.number().int(),
4234
+ var SessionQueuePageSchema = z36.object({
4235
+ sessions: z36.array(SessionSummarySchema),
4236
+ totalCount: z36.number().int(),
4237
+ hiddenInternalCount: z36.number().int(),
4199
4238
  /**
4200
4239
  * Bounced sessions the queue left out — no turn and no add, the default.
4201
4240
  *
@@ -4205,61 +4244,61 @@ var SessionQueuePageSchema = z35.object({
4205
4244
  * `totalCount + hiddenBouncedCount` is that population, and this count is the
4206
4245
  * analytics dashboard's bounce over the same window.
4207
4246
  */
4208
- hiddenBouncedCount: z35.number().int()
4247
+ hiddenBouncedCount: z36.number().int()
4209
4248
  });
4210
- var SessionQueueFacetsSchema = z35.object({
4211
- review: z35.record(z35.number()),
4212
- version: z35.record(z35.number()),
4213
- turns: z35.record(z35.number()),
4214
- durationS: z35.record(z35.number()),
4249
+ var SessionQueueFacetsSchema = z36.object({
4250
+ review: z36.record(z36.number()),
4251
+ version: z36.record(z36.number()),
4252
+ turns: z36.record(z36.number()),
4253
+ durationS: z36.record(z36.number()),
4215
4254
  /** Sessions per funnel step reached — a session counts under every step it reached. */
4216
- funnel: z35.record(z35.number())
4255
+ funnel: z36.record(z36.number())
4217
4256
  });
4218
- var SessionCaptureSchema = z35.object({
4219
- viewportWidth: z35.number().int().nullable(),
4220
- viewportHeight: z35.number().int().nullable(),
4221
- userAgent: z35.string().nullable(),
4222
- locale: z35.string().nullable(),
4257
+ var SessionCaptureSchema = z36.object({
4258
+ viewportWidth: z36.number().int().nullable(),
4259
+ viewportHeight: z36.number().int().nullable(),
4260
+ userAgent: z36.string().nullable(),
4261
+ locale: z36.string().nullable(),
4223
4262
  /** Referrer at session create — separates agentic traffic from organic. */
4224
- referrer: z35.string().nullable()
4263
+ referrer: z36.string().nullable()
4225
4264
  });
4226
- var SessionCaptureInputSchema = z35.object({
4227
- viewportWidth: z35.number().int().positive().max(2e4).optional(),
4228
- viewportHeight: z35.number().int().positive().max(2e4).optional(),
4229
- userAgent: z35.string().max(1e3).optional(),
4230
- locale: z35.string().max(35).optional(),
4265
+ var SessionCaptureInputSchema = z36.object({
4266
+ viewportWidth: z36.number().int().positive().max(2e4).optional(),
4267
+ viewportHeight: z36.number().int().positive().max(2e4).optional(),
4268
+ userAgent: z36.string().max(1e3).optional(),
4269
+ locale: z36.string().max(35).optional(),
4231
4270
  /** IANA zone name from the visitor's browser. Bounded rather than validated:
4232
4271
  * the zone database grows, and refusing a name this build has not heard of
4233
4272
  * would drop a real session's capture over a table that is out of date. */
4234
- timeZone: z35.string().max(64).optional(),
4235
- referrer: z35.string().max(2048).optional(),
4236
- clientVersion: z35.string().max(100).optional(),
4237
- isInternal: z35.boolean().optional()
4273
+ timeZone: z36.string().max(64).optional(),
4274
+ referrer: z36.string().max(2048).optional(),
4275
+ clientVersion: z36.string().max(100).optional(),
4276
+ isInternal: z36.boolean().optional()
4238
4277
  });
4239
- var SessionDetailSchema = z35.object({
4278
+ var SessionDetailSchema = z36.object({
4240
4279
  session: SessionSummarySchema,
4241
4280
  capture: SessionCaptureSchema,
4242
4281
  /** Full verdict history, newest first. Verdicts are revisable, and a session
4243
4282
  * re-judged after a fix is the evidence the fix worked. */
4244
- reviews: z35.array(SessionReviewEventSchema),
4245
- bugs: z35.array(SessionBugSchema),
4246
- comments: z35.array(SessionCommentSchema),
4283
+ reviews: z36.array(SessionReviewEventSchema),
4284
+ bugs: z36.array(SessionBugSchema),
4285
+ comments: z36.array(SessionCommentSchema),
4247
4286
  /** Optional during API/console rolling deployment. Absent is unavailable,
4248
4287
  * not evidence of zero visitor activity. */
4249
4288
  activity: SessionActivitySchema.optional()
4250
4289
  });
4251
- var RecordVerdictInputSchema = z35.object({
4290
+ var RecordVerdictInputSchema = z36.object({
4252
4291
  verdict: RecordableVerdictSchema,
4253
- note: z35.string().max(2e3).optional()
4292
+ note: z36.string().max(2e3).optional()
4254
4293
  });
4255
- var FileBugInputSchema = z35.object({
4256
- turnIndex: z35.number().int().positive().nullable(),
4294
+ var FileBugInputSchema = z36.object({
4295
+ turnIndex: z36.number().int().positive().nullable(),
4257
4296
  /** Optional — a bug filed without dropping a pin has no location. */
4258
4297
  location: BugLocationSchema.nullable().optional(),
4259
- title: z35.string().min(1).max(300),
4260
- body: z35.string().min(1),
4298
+ title: z36.string().min(1).max(300),
4299
+ body: z36.string().min(1),
4261
4300
  severity: BugSeveritySchema,
4262
- payload: z35.record(z35.unknown())
4301
+ payload: z36.record(z36.unknown())
4263
4302
  });
4264
4303
 
4265
4304
  // ../spacestation/src/contracts/retrieval/ecommerce/option-values.ts
@@ -4539,60 +4578,60 @@ __export(src_exports2, {
4539
4578
  });
4540
4579
 
4541
4580
  // ../ecommerce/src/commerce-schemas.ts
4542
- import { z as z36 } from "zod";
4543
- var MoneySchema = z36.object({
4544
- amount: z36.number(),
4545
- currencyCode: z36.string()
4581
+ import { z as z37 } from "zod";
4582
+ var MoneySchema = z37.object({
4583
+ amount: z37.number(),
4584
+ currencyCode: z37.string()
4546
4585
  });
4547
- var ImageSchema = z36.object({
4548
- url: z36.string(),
4549
- altText: z36.string(),
4550
- width: z36.number().optional(),
4551
- height: z36.number().optional(),
4586
+ var ImageSchema = z37.object({
4587
+ url: z37.string(),
4588
+ altText: z37.string(),
4589
+ width: z37.number().optional(),
4590
+ height: z37.number().optional(),
4552
4591
  /** Responsive candidate set, resolved at the commerce-adapter boundary —
4553
4592
  * never computed in a component. Renderers use it as `<img srcSet>` paired
4554
4593
  * with a layout `sizes`. Absent for non-CDN / unsizable images. */
4555
- srcSet: z36.string().optional()
4594
+ srcSet: z37.string().optional()
4556
4595
  });
4557
- var AssetSchema = z36.object({
4596
+ var AssetSchema = z37.object({
4558
4597
  /** Opaque asset id — the `resolved()` ref the agent emitted. */
4559
- id: z36.string(),
4560
- url: z36.string(),
4561
- altText: z36.string(),
4562
- srcSet: z36.string().optional()
4598
+ id: z37.string(),
4599
+ url: z37.string(),
4600
+ altText: z37.string(),
4601
+ srcSet: z37.string().optional()
4563
4602
  });
4564
- var SelectedOptionSchema = z36.object({
4565
- name: z36.string(),
4566
- value: z36.string()
4603
+ var SelectedOptionSchema = z37.object({
4604
+ name: z37.string(),
4605
+ value: z37.string()
4567
4606
  });
4568
- var VideoSourceSchema = z36.object({
4569
- url: z36.string(),
4570
- mimeType: z36.string(),
4571
- width: z36.number().optional(),
4572
- height: z36.number().optional()
4607
+ var VideoSourceSchema = z37.object({
4608
+ url: z37.string(),
4609
+ mimeType: z37.string(),
4610
+ width: z37.number().optional(),
4611
+ height: z37.number().optional()
4573
4612
  });
4574
- var ProductVideoSchema = z36.object({
4575
- kind: z36.enum(["hosted", "external"]),
4613
+ var ProductVideoSchema = z37.object({
4614
+ kind: z37.enum(["hosted", "external"]),
4576
4615
  previewImage: ImageSchema.optional(),
4577
- altText: z36.string().default(""),
4616
+ altText: z37.string().default(""),
4578
4617
  /** `kind: 'hosted'` only — empty for external embeds. */
4579
- sources: z36.array(VideoSourceSchema).default([]),
4618
+ sources: z37.array(VideoSourceSchema).default([]),
4580
4619
  /** `kind: 'external'` only — iframe embed URL. */
4581
- embedUrl: z36.string().optional(),
4620
+ embedUrl: z37.string().optional(),
4582
4621
  /** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
4583
- host: z36.string().optional()
4622
+ host: z37.string().optional()
4584
4623
  });
4585
- var AvailabilityStatusSchema = z36.enum([
4624
+ var AvailabilityStatusSchema = z37.enum([
4586
4625
  "in_stock",
4587
4626
  "backorder",
4588
4627
  "preorder",
4589
4628
  "out_of_stock",
4590
4629
  "discontinued"
4591
4630
  ]);
4592
- var ProductVariantSchema = z36.object({
4593
- id: z36.string(),
4594
- title: z36.string(),
4595
- available: z36.boolean(),
4631
+ var ProductVariantSchema = z37.object({
4632
+ id: z37.string(),
4633
+ title: z37.string(),
4634
+ available: z37.boolean(),
4596
4635
  /**
4597
4636
  * Qualifies `available` with the fulfillment state behind it. Absent means
4598
4637
  * the backend did not say — which is NOT the same as in stock, and must not
@@ -4607,7 +4646,7 @@ var ProductVariantSchema = z36.object({
4607
4646
  availabilityStatus: AvailabilityStatusSchema.optional(),
4608
4647
  price: MoneySchema,
4609
4648
  compareAtPrice: MoneySchema.optional(),
4610
- selectedOptions: z36.array(SelectedOptionSchema).optional(),
4649
+ selectedOptions: z37.array(SelectedOptionSchema).optional(),
4611
4650
  image: ImageSchema.optional()
4612
4651
  });
4613
4652
  var MP4_MIME = "video/mp4";
@@ -4618,34 +4657,34 @@ function orderedVideoSources(video) {
4618
4657
  const hls = video.sources.filter((s) => s.mimeType === HLS_MIME);
4619
4658
  return [...mp4, ...hls];
4620
4659
  }
4621
- var SiblingProductSchema = z36.object({
4622
- id: z36.string(),
4623
- handle: z36.string(),
4624
- title: z36.string(),
4660
+ var SiblingProductSchema = z37.object({
4661
+ id: z37.string(),
4662
+ handle: z37.string(),
4663
+ title: z37.string(),
4625
4664
  /** The differentiating value across siblings — typically the color
4626
4665
  * label ("OLIVE", "STONE"). Rendered next to the swatch row. */
4627
- color: z36.string(),
4666
+ color: z37.string(),
4628
4667
  /** Swatch artwork. Hydrators populate from the sibling product's
4629
4668
  * first image; renderers crop / fit to the swatch tile. */
4630
4669
  swatchImage: ImageSchema.optional(),
4631
- available: z36.boolean().default(true),
4670
+ available: z37.boolean().default(true),
4632
4671
  /** Marks the sibling that IS the currently-rendered product. The
4633
4672
  * picker uses this to highlight the active swatch without an
4634
4673
  * external id comparison. */
4635
- current: z36.boolean().default(false)
4674
+ current: z37.boolean().default(false)
4636
4675
  });
4637
- var ProductSchema = z36.object({
4638
- id: z36.string(),
4639
- handle: z36.string().default(""),
4640
- title: z36.string(),
4641
- description: z36.string().default(""),
4642
- descriptionHtml: z36.string().optional(),
4643
- vendor: z36.string().default(""),
4644
- productType: z36.string().optional(),
4645
- tags: z36.array(z36.string()).default([]),
4676
+ var ProductSchema = z37.object({
4677
+ id: z37.string(),
4678
+ handle: z37.string().default(""),
4679
+ title: z37.string(),
4680
+ description: z37.string().default(""),
4681
+ descriptionHtml: z37.string().optional(),
4682
+ vendor: z37.string().default(""),
4683
+ productType: z37.string().optional(),
4684
+ tags: z37.array(z37.string()).default([]),
4646
4685
  price: MoneySchema.default({ amount: 0, currencyCode: "USD" }),
4647
4686
  compareAtPrice: MoneySchema.optional(),
4648
- images: z36.array(ImageSchema).default([]),
4687
+ images: z37.array(ImageSchema).default([]),
4649
4688
  /**
4650
4689
  * Product videos (`Video` + `ExternalVideo` media). Shopify's MCP
4651
4690
  * catalog drops video media — it only surfaces through the Storefront
@@ -4653,21 +4692,21 @@ var ProductSchema = z36.object({
4653
4692
  * boundary. Default `[]` so renderers gate on `length > 0` without a
4654
4693
  * presence guard.
4655
4694
  */
4656
- videos: z36.array(ProductVideoSchema).default([]),
4657
- variants: z36.array(ProductVariantSchema).default([]),
4658
- availableForSale: z36.boolean().default(true),
4659
- options: z36.array(z36.object({
4660
- name: z36.string(),
4661
- values: z36.array(z36.string())
4695
+ videos: z37.array(ProductVideoSchema).default([]),
4696
+ variants: z37.array(ProductVariantSchema).default([]),
4697
+ availableForSale: z37.boolean().default(true),
4698
+ options: z37.array(z37.object({
4699
+ name: z37.string(),
4700
+ values: z37.array(z37.string())
4662
4701
  })).optional(),
4663
- collections: z36.array(z36.string()).optional(),
4702
+ collections: z37.array(z37.string()).optional(),
4664
4703
  /** See `SiblingProductSchema`. Default `[]` so renderers can check
4665
4704
  * `length > 1` to decide whether to draw the swatch row without a
4666
4705
  * presence guard. */
4667
- colorVariants: z36.array(SiblingProductSchema).default([]),
4668
- rating: z36.object({
4669
- value: z36.number(),
4670
- count: z36.number()
4706
+ colorVariants: z37.array(SiblingProductSchema).default([]),
4707
+ rating: z37.object({
4708
+ value: z37.number(),
4709
+ count: z37.number()
4671
4710
  }).optional(),
4672
4711
  /**
4673
4712
  * Product reviews surfaced from the brand's review store. SDK
@@ -4676,12 +4715,12 @@ var ProductSchema = z36.object({
4676
4715
  * review bodies. Renderers (`Reviews` component, `ProductDetail`,
4677
4716
  * etc.) consume directly.
4678
4717
  */
4679
- reviews: z36.array(z36.object({
4680
- author: z36.string(),
4681
- rating: z36.number(),
4682
- content: z36.string(),
4683
- date: z36.string(),
4684
- verified: z36.boolean().optional()
4718
+ reviews: z37.array(z37.object({
4719
+ author: z37.string(),
4720
+ rating: z37.number(),
4721
+ content: z37.string(),
4722
+ date: z37.string(),
4723
+ verified: z37.boolean().optional()
4685
4724
  })).optional(),
4686
4725
  /**
4687
4726
  * Ghost-entity flag — `true` when the Storefront API could not hydrate
@@ -4693,7 +4732,7 @@ var ProductSchema = z36.object({
4693
4732
  * Set exclusively by `createUnavailableProduct()` — never by the
4694
4733
  * Storefront mapper.
4695
4734
  */
4696
- unavailable: z36.boolean().default(false)
4735
+ unavailable: z37.boolean().default(false)
4697
4736
  });
4698
4737
  function createUnavailableProduct(gid) {
4699
4738
  return {
@@ -4715,68 +4754,68 @@ function createUnavailableProduct(gid) {
4715
4754
  function isGhostEntity(value) {
4716
4755
  return typeof value === "object" && value !== null && "unavailable" in value && value.unavailable === true;
4717
4756
  }
4718
- var ReviewSchema = z36.object({
4719
- id: z36.string(),
4720
- productId: z36.string(),
4721
- author: z36.string(),
4722
- rating: z36.number(),
4723
- text: z36.string(),
4724
- date: z36.string(),
4725
- verified: z36.boolean()
4757
+ var ReviewSchema = z37.object({
4758
+ id: z37.string(),
4759
+ productId: z37.string(),
4760
+ author: z37.string(),
4761
+ rating: z37.number(),
4762
+ text: z37.string(),
4763
+ date: z37.string(),
4764
+ verified: z37.boolean()
4726
4765
  });
4727
- var ArticleSchema = z36.object({
4728
- id: z36.string(),
4729
- handle: z36.string().default(""),
4730
- title: z36.string(),
4731
- excerpt: z36.string().default(""),
4732
- content: z36.string().default(""),
4733
- contentHtml: z36.string().optional(),
4734
- author: z36.string().default(""),
4735
- publishedAt: z36.string().default(""),
4766
+ var ArticleSchema = z37.object({
4767
+ id: z37.string(),
4768
+ handle: z37.string().default(""),
4769
+ title: z37.string(),
4770
+ excerpt: z37.string().default(""),
4771
+ content: z37.string().default(""),
4772
+ contentHtml: z37.string().optional(),
4773
+ author: z37.string().default(""),
4774
+ publishedAt: z37.string().default(""),
4736
4775
  image: ImageSchema.optional(),
4737
- blogHandle: z36.string().default(""),
4738
- tags: z36.array(z36.string()).default([])
4776
+ blogHandle: z37.string().default(""),
4777
+ tags: z37.array(z37.string()).default([])
4739
4778
  });
4740
- var CmsPageSchema = z36.object({
4741
- id: z36.string(),
4742
- handle: z36.string().default(""),
4743
- title: z36.string(),
4744
- body: z36.string().default(""),
4745
- bodyHtml: z36.string().optional(),
4746
- bodySummary: z36.string().default(""),
4747
- updatedAt: z36.string().default(""),
4748
- seoTitle: z36.string().optional(),
4749
- seoDescription: z36.string().optional()
4779
+ var CmsPageSchema = z37.object({
4780
+ id: z37.string(),
4781
+ handle: z37.string().default(""),
4782
+ title: z37.string(),
4783
+ body: z37.string().default(""),
4784
+ bodyHtml: z37.string().optional(),
4785
+ bodySummary: z37.string().default(""),
4786
+ updatedAt: z37.string().default(""),
4787
+ seoTitle: z37.string().optional(),
4788
+ seoDescription: z37.string().optional()
4750
4789
  });
4751
- var CmsPolicySchema = z36.object({
4752
- id: z36.string(),
4790
+ var CmsPolicySchema = z37.object({
4791
+ id: z37.string(),
4753
4792
  /** Stable policy slot identifier: 'refund' | 'privacy' | 'terms' |
4754
4793
  * 'shipping' | 'subscription' | 'warranty' | custom string. Open so
4755
4794
  * platforms with custom policy types can extend. */
4756
- kind: z36.string(),
4795
+ kind: z37.string(),
4757
4796
  /** Slug-shaped handle the platform exposes for storefront URLs
4758
4797
  * (e.g. `refund-policy`). Empty string when the backend doesn't
4759
4798
  * surface one. */
4760
- handle: z36.string().default(""),
4761
- title: z36.string(),
4762
- body: z36.string().default(""),
4763
- bodyHtml: z36.string().optional(),
4764
- url: z36.string().default("")
4799
+ handle: z37.string().default(""),
4800
+ title: z37.string(),
4801
+ body: z37.string().default(""),
4802
+ bodyHtml: z37.string().optional(),
4803
+ url: z37.string().default("")
4765
4804
  });
4766
- var CollectionSchema = z36.object({
4767
- id: z36.string(),
4768
- handle: z36.string().default(""),
4769
- title: z36.string(),
4770
- description: z36.string().default(""),
4805
+ var CollectionSchema = z37.object({
4806
+ id: z37.string(),
4807
+ handle: z37.string().default(""),
4808
+ title: z37.string(),
4809
+ description: z37.string().default(""),
4771
4810
  image: ImageSchema.optional(),
4772
- productCount: z36.number().int().nonnegative().optional()
4811
+ productCount: z37.number().int().nonnegative().optional()
4773
4812
  });
4774
- var CartLineSchema = z36.object({
4775
- id: z36.string(),
4776
- merchandiseId: z36.string(),
4777
- productId: z36.string(),
4778
- title: z36.string(),
4779
- variantTitle: z36.string().optional(),
4813
+ var CartLineSchema = z37.object({
4814
+ id: z37.string(),
4815
+ merchandiseId: z37.string(),
4816
+ productId: z37.string(),
4817
+ title: z37.string(),
4818
+ variantTitle: z37.string().optional(),
4780
4819
  /**
4781
4820
  * The variant's option axes as structured pairs (e.g.
4782
4821
  * `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
@@ -4785,10 +4824,10 @@ var CartLineSchema = z36.object({
4785
4824
  * single-variant products (the degenerate `Title: Default Title` axis
4786
4825
  * is normalized away at the adapter boundary).
4787
4826
  */
4788
- selectedOptions: z36.array(SelectedOptionSchema).optional(),
4789
- vendor: z36.string().optional(),
4790
- sku: z36.string().optional(),
4791
- quantity: z36.number().int().positive(),
4827
+ selectedOptions: z37.array(SelectedOptionSchema).optional(),
4828
+ vendor: z37.string().optional(),
4829
+ sku: z37.string().optional(),
4830
+ quantity: z37.number().int().positive(),
4792
4831
  unitPrice: MoneySchema,
4793
4832
  totalPrice: MoneySchema,
4794
4833
  image: ImageSchema.optional(),
@@ -4808,26 +4847,26 @@ var CartLineSchema = z36.object({
4808
4847
  * client-minted id the backend rejects, line-tap navigation is
4809
4848
  * suppressed, and the money never folds into a settled-looking total.
4810
4849
  */
4811
- pending: z36.boolean().optional()
4850
+ pending: z37.boolean().optional()
4812
4851
  });
4813
4852
  function isPendingCartLine(line) {
4814
4853
  return line.pending === true;
4815
4854
  }
4816
- var CartDiscountCodeSchema = z36.object({
4817
- code: z36.string(),
4818
- applicable: z36.boolean()
4855
+ var CartDiscountCodeSchema = z37.object({
4856
+ code: z37.string(),
4857
+ applicable: z37.boolean()
4819
4858
  });
4820
- var CartMessageSchema = z36.object({
4821
- kind: z36.enum(["error", "warning", "info"]),
4859
+ var CartMessageSchema = z37.object({
4860
+ kind: z37.enum(["error", "warning", "info"]),
4822
4861
  /** Machine code for branching; opaque and backend-defined. */
4823
- code: z36.string(),
4862
+ code: z37.string(),
4824
4863
  /** Human-readable text, meant to be shown as-is. */
4825
- content: z36.string()
4864
+ content: z37.string()
4826
4865
  });
4827
- var CartSchema = z36.object({
4828
- id: z36.string(),
4829
- lines: z36.array(CartLineSchema),
4830
- totalQuantity: z36.number().int().nonnegative(),
4866
+ var CartSchema = z37.object({
4867
+ id: z37.string(),
4868
+ lines: z37.array(CartLineSchema),
4869
+ totalQuantity: z37.number().int().nonnegative(),
4831
4870
  subtotal: MoneySchema,
4832
4871
  /**
4833
4872
  * Cart total after discounts (pre-shipping/tax). Absent when the
@@ -4837,11 +4876,11 @@ var CartSchema = z36.object({
4837
4876
  */
4838
4877
  total: MoneySchema.optional(),
4839
4878
  /** Discount codes currently attached to the cart. */
4840
- discountCodes: z36.array(CartDiscountCodeSchema).default([]),
4879
+ discountCodes: z37.array(CartDiscountCodeSchema).default([]),
4841
4880
  /** Notices the backend attached to this cart — see `CartMessageSchema`.
4842
4881
  * Empty when the backend said nothing or does not report them. */
4843
- messages: z36.array(CartMessageSchema).default([]),
4844
- checkoutUrl: z36.string().optional(),
4882
+ messages: z37.array(CartMessageSchema).default([]),
4883
+ checkoutUrl: z37.string().optional(),
4845
4884
  /**
4846
4885
  * Opaque handle this cart is known by in the connector's BACK OFFICE — the
4847
4886
  * value a space owner searches there to find the order this cart became.
@@ -4854,14 +4893,14 @@ var CartSchema = z36.object({
4854
4893
  * Absent when the platform has no such handle, or while the cart is still the
4855
4894
  * client's optimistic paint and its id is client-minted.
4856
4895
  */
4857
- backOfficeRef: z36.string().optional(),
4896
+ backOfficeRef: z37.string().optional(),
4858
4897
  /**
4859
4898
  * URL that recreates this cart on the merchant's own store website
4860
4899
  * (replace semantics — overwrites any cart the visitor already has
4861
4900
  * there). Populated by platform adapters that support it; absent when
4862
4901
  * the cart is empty or the URL cannot be built.
4863
4902
  */
4864
- storeCartUrl: z36.string().optional(),
4903
+ storeCartUrl: z37.string().optional(),
4865
4904
  /**
4866
4905
  * True while this cart exists only in the client's optimistic paint —
4867
4906
  * no backend cart has been created yet, so its `id` is client-minted and
@@ -4869,7 +4908,7 @@ var CartSchema = z36.object({
4869
4908
  * `CartLineSchema.pending`: the adapter never sets it, and callers that
4870
4909
  * need a real cart id read THIS rather than sniffing the id's shape.
4871
4910
  */
4872
- pending: z36.boolean().optional()
4911
+ pending: z37.boolean().optional()
4873
4912
  });
4874
4913
  function settledCart(cart) {
4875
4914
  if (cart === null || cart === void 0) return null;
@@ -4877,27 +4916,27 @@ function settledCart(cart) {
4877
4916
  }
4878
4917
 
4879
4918
  // ../ecommerce/src/review-schemas.ts
4880
- import { z as z37 } from "zod";
4919
+ import { z as z38 } from "zod";
4881
4920
  var PRODUCT_REVIEWS_RESOLVER_KEY = "productReviews";
4882
- var ProductReviewItemSchema = z37.object({
4883
- author: z37.string(),
4884
- rating: z37.number(),
4921
+ var ProductReviewItemSchema = z38.object({
4922
+ author: z38.string(),
4923
+ rating: z38.number(),
4885
4924
  /** The reviewer's own headline ("love"), when they wrote one — the site shows it above `content`. */
4886
- title: z37.string().optional(),
4887
- content: z37.string(),
4888
- date: z37.string(),
4889
- verified: z37.boolean().optional(),
4925
+ title: z38.string().optional(),
4926
+ content: z38.string(),
4927
+ date: z38.string(),
4928
+ verified: z38.boolean().optional(),
4890
4929
  /**
4891
4930
  * Non-empty when the review was written for a grouped SIBLING product rather
4892
4931
  * than this one (brands pool reviews across a product line). A surface can
4893
4932
  * attribute it; empty / absent ⇒ the product's own review.
4894
4933
  */
4895
- writtenFor: z37.string().optional()
4934
+ writtenFor: z38.string().optional()
4896
4935
  });
4897
4936
  var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
4898
4937
  /** The sentence(s) the ranking fired on. Descriptive — it is what the matcher
4899
4938
  * scored, NOT necessarily text that occurs in `content`. */
4900
- highlight: z37.string().optional(),
4939
+ highlight: z38.string().optional(),
4901
4940
  /**
4902
4941
  * `highlight` resolved back into `content` as a VERBATIM substring, so a
4903
4942
  * surface can mark it with a plain `indexOf` and no matcher of its own.
@@ -4912,24 +4951,29 @@ var ProductReviewHighlightSchema = ProductReviewItemSchema.extend({
4912
4951
  * Absent when the passage genuinely has no home in the body (one cut from the
4913
4952
  * title). A surface then marks NOTHING rather than guessing at a span.
4914
4953
  */
4915
- mark: z37.string().optional()
4954
+ mark: z38.string().optional()
4916
4955
  });
4917
- var ReviewAggregateSchema = z37.object({
4918
- value: z37.number(),
4919
- count: z37.number()
4956
+ var ReviewAggregateSchema = z38.object({
4957
+ value: z38.number(),
4958
+ count: z38.number()
4920
4959
  });
4921
- var ProductReviewDataSchema = z37.object({
4922
- id: z37.string(),
4960
+ var ProductReviewDataSchema = z38.object({
4961
+ id: z38.string(),
4923
4962
  /** The product's FULL retrieved set — what a filterable list renders. */
4924
- reviews: z37.array(ProductReviewItemSchema).default([]),
4963
+ reviews: z38.array(ProductReviewItemSchema).default([]),
4925
4964
  aggregate: ReviewAggregateSchema.default({ value: 0, count: 0 }),
4926
4965
  /** 5★→1★ star COUNTS over the full set (index 0 = 5-star). */
4927
- distribution: z37.array(z37.number()).default([]),
4966
+ distribution: z38.array(z38.number()).default([]),
4928
4967
  /**
4929
4968
  * The reviews that ANSWER the surface's intent, best first. Empty when no
4930
4969
  * intent was asked for — never a silent copy of `reviews`.
4931
4970
  */
4932
- highlights: z37.array(ProductReviewHighlightSchema).default([])
4971
+ highlights: z38.array(ProductReviewHighlightSchema).default([]),
4972
+ /**
4973
+ * True when the review provider could not be read and nothing is indexed —
4974
+ * the empty lists mean "not loaded", NOT "this product has no reviews".
4975
+ */
4976
+ unavailable: z38.boolean().optional()
4933
4977
  });
4934
4978
  var ProductReviewPayloadSchema = ProductReviewDataSchema.omit({ id: true });
4935
4979
 
@@ -5223,9 +5267,9 @@ function readPdpCompanions(config) {
5223
5267
  }
5224
5268
 
5225
5269
  // ../ecommerce/src/base-attributes.ts
5226
- import { z as z38 } from "zod";
5270
+ import { z as z39 } from "zod";
5227
5271
  var BASE_ATTRIBUTES_CONFIG_KEY = "baseAttributes";
5228
- var BaseAttributesRecordSchema = z38.record(z38.string(), AttributeDefSchema);
5272
+ var BaseAttributesRecordSchema = z39.record(z39.string(), AttributeDefSchema);
5229
5273
  function buildBaseAttributesConfig(attributes) {
5230
5274
  return { [BASE_ATTRIBUTES_CONFIG_KEY]: attributes };
5231
5275
  }
@@ -5236,9 +5280,9 @@ function readBaseAttributesConfig(config) {
5236
5280
  }
5237
5281
 
5238
5282
  // ../ecommerce/src/bucket-labels.ts
5239
- import { z as z39 } from "zod";
5283
+ import { z as z40 } from "zod";
5240
5284
  var BUCKET_LABELS_CONFIG_KEY = "bucketLabels";
5241
- var BucketLabelsRecordSchema = z39.record(z39.string(), z39.string());
5285
+ var BucketLabelsRecordSchema = z40.record(z40.string(), z40.string());
5242
5286
  function buildBucketLabelsConfig(labels) {
5243
5287
  return { [BUCKET_LABELS_CONFIG_KEY]: labels };
5244
5288
  }
@@ -6388,8 +6432,8 @@ var PRESENCE_LIFECYCLE = {
6388
6432
  };
6389
6433
 
6390
6434
  // ../spacestation/src/widgets/presence/profile.ts
6391
- import { z as z40 } from "zod";
6392
- var PresenceProfileSchema = z40.object({
6435
+ import { z as z41 } from "zod";
6436
+ var PresenceProfileSchema = z41.object({
6393
6437
  /**
6394
6438
  * How much the agent SPEAKS in presence.
6395
6439
  * - 'off' the faculty generates no prose at all. Zero tokens, and
@@ -6399,14 +6443,14 @@ var PresenceProfileSchema = z40.object({
6399
6443
  * - 'terse' one lead line per turn. The default — see below.
6400
6444
  * - 'full' a lead line plus asides beside individual elements.
6401
6445
  */
6402
- voice: z40.enum(["off", "terse", "full"]),
6446
+ voice: z41.enum(["off", "terse", "full"]),
6403
6447
  /**
6404
6448
  * Which source kinds this space surfaces. 'all' = every tool that declares a
6405
6449
  * `sourceKind`. An explicit list lets a space stay quiet about lookups its
6406
6450
  * visitors would find uninteresting (policy checks on a fashion space)
6407
6451
  * without the tool having to lie about what it is.
6408
6452
  */
6409
- sources: z40.union([z40.array(z40.string()), z40.literal("all")]),
6453
+ sources: z41.union([z41.array(z41.string()), z41.literal("all")]),
6410
6454
  /**
6411
6455
  * Which facts render.
6412
6456
  * - 'inferred-only' hides `provenance: 'stated'` facts. The default and the
@@ -6415,7 +6459,7 @@ var PresenceProfileSchema = z40.object({
6415
6459
  * - 'all' shows stated facts too — for spaces where confirming the brief
6416
6460
  * back is itself the product (intake, configuration).
6417
6461
  */
6418
- facts: z40.enum(["inferred-only", "all"])
6462
+ facts: z41.enum(["inferred-only", "all"])
6419
6463
  });
6420
6464
  var DEFAULT_PRESENCE_PROFILE = {
6421
6465
  voice: "terse",
@@ -6772,6 +6816,8 @@ function useConversationPage() {
6772
6816
  const session = useFourtySession();
6773
6817
  const reply = useTurnAskReply();
6774
6818
  const presence = useConversationPresence();
6819
+ const suggestions = useSuggestionsWithDefaults();
6820
+ const followUp = useComposerChipSelect();
6775
6821
  const onWelcomePage = React16.useMemo(
6776
6822
  () => seedLayout !== null && JSON.stringify(layout) === JSON.stringify(seedLayout),
6777
6823
  [layout, seedLayout]
@@ -6785,12 +6831,15 @@ function useConversationPage() {
6785
6831
  if (live !== null) phase = liveTurnTouched(layout, live, messages) ? "composing" : "thinking";
6786
6832
  const inConversation = messages.length > 0 || pending2 !== null;
6787
6833
  const canvasHidden = inConversation && onWelcomePage && !away;
6788
- const base = { phase, hasPage, canvasHidden, presence, reply, goHome, startOver: session.newConversation, visitedHome: onWelcomePage && away };
6834
+ const noFollowUps = [];
6835
+ const base = { phase, hasPage, canvasHidden, presence, reply, followUp, followUps: noFollowUps, goHome, startOver: session.newConversation, visitedHome: onWelcomePage && away };
6789
6836
  if (shown === void 0 || onSeedHome && live === null && !away) {
6790
6837
  return { ...base, place: "welcome", turn: null, crumbs: [] };
6791
6838
  }
6792
6839
  const newest = messages.length === 0 ? void 0 : messages[messages.length - 1];
6793
6840
  const answer = splitAnswer(shown.streams.prose);
6841
+ const settledNewest = live === null && newest !== void 0 && newest.messageId === shown.messageId;
6842
+ const followUps = settledNewest && suggestions !== null ? suggestions.actions.filter((a) => typeof a.label === "string" && a.label.trim().length > 0) : [];
6794
6843
  const turn = {
6795
6844
  key: shown.messageId,
6796
6845
  index: shown.index,
@@ -6798,7 +6847,7 @@ function useConversationPage() {
6798
6847
  headline: answer.headline,
6799
6848
  body: answer.body,
6800
6849
  ask: shown.streams.ask,
6801
- answerable: live === null && newest !== void 0 && newest.messageId === shown.messageId,
6850
+ answerable: settledNewest,
6802
6851
  live: live !== null,
6803
6852
  failed: "error" in shown && shown.error !== void 0
6804
6853
  };
@@ -6811,7 +6860,7 @@ function useConversationPage() {
6811
6860
  { key: shown.messageId, kind: "turn", label: shown.visitorText, open: () => selectMessage(shown.index) },
6812
6861
  ...visited ? [] : [here]
6813
6862
  ];
6814
- return { ...base, place: "away", turn, crumbs: crumbs2 };
6863
+ return { ...base, place: "away", turn, crumbs: crumbs2, followUps };
6815
6864
  }
6816
6865
  const pages = pageTurns(messages, shown.index);
6817
6866
  const liveOpensPage = live !== null && phase === "composing" && !messages.some((m) => m.index === live.index);
@@ -6826,7 +6875,7 @@ function useConversationPage() {
6826
6875
  }))
6827
6876
  ];
6828
6877
  if (liveOpensPage) crumbs.push({ key: live.messageId, kind: "turn", label: live.visitorText, open: null });
6829
- return { ...base, place: "turn", turn, crumbs };
6878
+ return { ...base, place: "turn", turn, crumbs, followUps };
6830
6879
  }
6831
6880
 
6832
6881
  // src/shell/thread-scroll/headroom.ts
@@ -8340,22 +8389,22 @@ function buildComponentLibrary(catalog, componentMap) {
8340
8389
  }
8341
8390
 
8342
8391
  // src/catalog/define.ts
8343
- import { z as z41 } from "zod";
8392
+ import { z as z42 } from "zod";
8344
8393
  function entity(resolverKey, opts) {
8345
- return resolved(z41.string(), resolverKey, opts);
8394
+ return resolved(z42.string(), resolverKey, opts);
8346
8395
  }
8347
- var text = prose(z41.string());
8396
+ var text = prose(z42.string());
8348
8397
  function plain() {
8349
- return z41.string();
8398
+ return z42.string();
8350
8399
  }
8351
8400
  function token(values) {
8352
- return z41.enum(values);
8401
+ return z42.enum(values);
8353
8402
  }
8354
8403
  function catalogComponent(meta, render) {
8355
8404
  const { props, requires, ...rest } = meta;
8356
8405
  return {
8357
8406
  ...rest,
8358
- propsSchema: z41.object(props),
8407
+ propsSchema: z42.object(props),
8359
8408
  ...requires !== void 0 ? { requires } : {},
8360
8409
  component: adaptComponent(render)
8361
8410
  };
@@ -8443,10 +8492,9 @@ function resolveHydrators(platform, platformConfig, context) {
8443
8492
  if (platform === "" || platform === "none") return services;
8444
8493
  const factory = getPlatformHydratorFactory(platform);
8445
8494
  if (!factory) {
8446
- console.error(
8447
- `[resolveHydrators] no hydrators registered for platform "${platform}" \u2014 entity hydration is DISABLED and the canvas will render blank. Registered: [${listRegisteredPlatforms().join(", ")}]. Did you forget to import the built-in registration (e.g. \`@fourty/shopify/sdk-bindings\`)?`
8495
+ throw new Error(
8496
+ `[resolveHydrators] no hydrators registered for platform "${platform}". Registered: [${listRegisteredPlatforms().join(", ")}]. The runtime must import its connector bindings at its entry point.`
8448
8497
  );
8449
- return services;
8450
8498
  }
8451
8499
  const platformContext = context === void 0 ? void 0 : { locale: context.locale };
8452
8500
  return { ...services, ...factory(platformConfig, platformContext) };
@@ -10392,18 +10440,18 @@ __export(ecommerce_exports, {
10392
10440
  });
10393
10441
 
10394
10442
  // ../spacestation/src/analytics/ecommerce/surfacing.ts
10395
- import { z as z42 } from "zod";
10443
+ import { z as z43 } from "zod";
10396
10444
  var PRODUCTS_SURFACED = defineEventKind(
10397
10445
  "commerce.products_surfaced",
10398
10446
  "client",
10399
- z42.object({
10447
+ z43.object({
10400
10448
  /** The turn whose commit this describes. Minted where the prompt signal
10401
10449
  * is built and shared with `agent_runs`, so the read layer can line a
10402
10450
  * surfacing up against the prompt that asked for it. */
10403
- turnId: z42.string().min(1).max(128),
10451
+ turnId: z43.string().min(1).max(128),
10404
10452
  /** Distinct entity refs this turn placed that were not on the canvas
10405
10453
  * before it. ZERO IS A REAL VALUE — see the header. */
10406
- productCount: z42.number().int().nonnegative()
10454
+ productCount: z43.number().int().nonnegative()
10407
10455
  }).strict()
10408
10456
  );
10409
10457
 
@@ -11903,7 +11951,7 @@ function useContentActions() {
11903
11951
  import { useEffect as useEffect19, useState as useState18 } from "react";
11904
11952
 
11905
11953
  // package.json
11906
- var version = "0.4.3";
11954
+ var version = "0.5.0";
11907
11955
 
11908
11956
  // src/host/host-modules.ts
11909
11957
  import * as react from "react";
@@ -11990,7 +12038,7 @@ function Spacefront(props) {
11990
12038
  }
11991
12039
 
11992
12040
  // src/npm.ts
11993
- import { z as z44 } from "zod";
12041
+ import { z as z45 } from "zod";
11994
12042
  export {
11995
12043
  ACQUISITION_KIND_LABELS,
11996
12044
  ACTIVE_PANEL_ATTR,
@@ -12015,6 +12063,11 @@ export {
12015
12063
  AttributeScopeBucketSchema,
12016
12064
  AttributeScopeConfigSchema,
12017
12065
  AvailabilityStatusSchema,
12066
+ BRAND_MARK_MAX_BYTES,
12067
+ BRAND_MARK_SLOTS,
12068
+ BRAND_MARK_TYPES,
12069
+ BrandMarkImageSchema,
12070
+ BrandMarkSchema,
12018
12071
  BugLocationSchema,
12019
12072
  BugSeveritySchema,
12020
12073
  CANVAS_ARRANGEMENTS,
@@ -12200,6 +12253,7 @@ export {
12200
12253
  ShellRootContext,
12201
12254
  ShimmerSweep,
12202
12255
  SiblingProductSchema,
12256
+ SpaceBrandMarkSchema,
12203
12257
  SpaceBugSchema,
12204
12258
  Spacefront,
12205
12259
  SpacefrontCanvas,
@@ -12635,5 +12689,5 @@ export {
12635
12689
  wipeProfile,
12636
12690
  withCartActorOrigin,
12637
12691
  withInteractionTracking,
12638
- z44 as z
12692
+ z45 as z
12639
12693
  };