@40rty/ams-cli 0.5.18 → 0.5.20

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/wire.js CHANGED
@@ -423,68 +423,97 @@ var CartAddSignalPayloadSchema = z10.object({
423
423
  acknowledgeInDrawer: z10.boolean().optional()
424
424
  });
425
425
 
426
- // ../spacestation/src/signal/turn-ask.ts
426
+ // ../spacestation/src/signal/visitor-view.ts
427
427
  import { z as z11 } from "zod";
428
+ var Ref = z11.string().trim().min(1).max(200);
429
+ var Label = z11.string().trim().min(1).max(160);
430
+ var SeenSchema = z11.object({
431
+ /** The entity's id as the agent knows it (a product id), when the thing is an entity. */
432
+ ref: Ref.optional(),
433
+ label: Label,
434
+ /** One short fact the visitor can see on it ("$48", "sold out"). */
435
+ note: z11.string().trim().max(80).optional()
436
+ });
437
+ var AttentionSchema = z11.object({
438
+ /** On the visitor's screen now, in reading order. */
439
+ onScreen: z11.array(SeenSchema).max(24),
440
+ /** Where the visitor rested longest, most first. */
441
+ lingered: z11.array(SeenSchema.extend({ seconds: z11.number().nonnegative() })).max(6),
442
+ /** Sections the visitor has scrolled through, in order (titles the page showed). */
443
+ passed: z11.array(Label).max(12)
444
+ });
445
+ var PointedAtSchema = z11.object({
446
+ ref: Ref.optional(),
447
+ /** What the element is ("Faherty linen shirt", "the page headline"). */
448
+ label: Label,
449
+ /** Which of its facets the visitor tapped ("price", "colour", "style", "section"). */
450
+ field: z11.string().trim().min(1).max(40),
451
+ /** That facet's value as shown ("$128", "Navy"). */
452
+ value: z11.string().trim().max(160).optional()
453
+ });
454
+
455
+ // ../spacestation/src/signal/turn-ask.ts
456
+ import { z as z12 } from "zod";
428
457
  var MIN_CHOICE_ANSWERS = 2;
429
458
  var MAX_CHOICE_ANSWERS = 4;
430
- var AnswerPartSchema = z11.object({ answer: z11.string().trim().min(1) });
431
- var PartSchema = z11.union([z11.string(), AnswerPartSchema]);
459
+ var AnswerPartSchema = z12.object({ answer: z12.string().trim().min(1) });
460
+ var PartSchema = z12.union([z12.string(), AnswerPartSchema]);
432
461
  function partsText(parts) {
433
462
  return parts.map((p) => typeof p === "string" ? p : p.answer).join("");
434
463
  }
435
- var ModelTurnAskSchema = z11.object({
436
- kind: z11.enum(["choice", "open"]),
437
- parts: z11.array(PartSchema).min(1)
464
+ var ModelTurnAskSchema = z12.object({
465
+ kind: z12.enum(["choice", "open"]),
466
+ parts: z12.array(PartSchema).min(1)
438
467
  }).refine((ask) => partsText(ask.parts).trim().length > 0, { message: "the question reads as nothing" }).refine((ask) => /\?["'”’*)\s]*$/.test(partsText(ask.parts)), { message: "an ask is a question" }).transform((ask) => {
439
468
  const answers = ask.parts.filter((p) => typeof p !== "string").length;
440
469
  if (ask.kind === "choice" && answers >= MIN_CHOICE_ANSWERS && answers <= MAX_CHOICE_ANSWERS) return ask;
441
470
  if (ask.kind === "open" && answers === 0) return ask;
442
471
  return { kind: "open", parts: [partsText(ask.parts)] };
443
472
  });
444
- var PersistedQuestionSchema = z11.object({ question: z11.string().trim().min(1) }).transform((row) => ({ kind: "open", parts: [row.question.replace(/[[\]]/g, "")] }));
445
- var TurnAskSchema = z11.union([ModelTurnAskSchema, PersistedQuestionSchema]);
473
+ var PersistedQuestionSchema = z12.object({ question: z12.string().trim().min(1) }).transform((row) => ({ kind: "open", parts: [row.question.replace(/[[\]]/g, "")] }));
474
+ var TurnAskSchema = z12.union([ModelTurnAskSchema, PersistedQuestionSchema]);
446
475
 
447
476
  // ../spacestation/src/types.ts
448
- import { z as z12 } from "zod";
449
- var StateSnapshotFrameSchema = z12.object({
450
- rev: z12.number(),
451
- state: z12.record(z12.unknown())
477
+ import { z as z13 } from "zod";
478
+ var StateSnapshotFrameSchema = z13.object({
479
+ rev: z13.number(),
480
+ state: z13.record(z13.unknown())
452
481
  });
453
482
 
454
483
  // ../spacestation/src/catalog/canvas-arrangement.ts
455
484
  var CANVAS_BLOCK_SIZES = ["full", "wide", "half", "narrow"];
456
485
 
457
486
  // ../spacestation/src/catalog/structural-baseline.ts
458
- import { z as z13 } from "zod";
459
- var agentTextProps = z13.object({
460
- text: z13.string().optional().describe("Plain prose. Used by the streaming text.delta slot binding so the agent can flow words in without choosing emphasis spans up front."),
461
- parts: z13.array(z13.object({
462
- type: z13.enum(["text", "em"]).describe("text = sans body; em = italic emphasis."),
463
- value: z13.string()
487
+ import { z as z14 } from "zod";
488
+ var agentTextProps = z14.object({
489
+ text: z14.string().optional().describe("Plain prose. Used by the streaming text.delta slot binding so the agent can flow words in without choosing emphasis spans up front."),
490
+ parts: z14.array(z14.object({
491
+ type: z14.enum(["text", "em"]).describe("text = sans body; em = italic emphasis."),
492
+ value: z14.string()
464
493
  })).optional().describe("Pre-segmented prose with mixed sans + italic spans. When present, takes precedence over `text`. Use sparingly \u2014 italic carries weight, save it for the human moment in the answer."),
465
- size: z13.enum(["sm", "md", "lg"]).optional().describe("Visual scale. lg for hero prose at the top of a turn; md (default) for body; sm for trailing footnote prose.")
494
+ size: z14.enum(["sm", "md", "lg"]).optional().describe("Visual scale. lg for hero prose at the top of a turn; md (default) for body; sm for trailing footnote prose.")
466
495
  });
467
- var turnProps = z13.object({
468
- prompt: z13.string().describe("The user's prompt for this turn, rendered as a quoted lede above the agent's response. Required so the conversation reads."),
469
- index: z13.number().optional().describe("Turn index (0-based). When omitted the runtime infers from sibling turns."),
470
- timestamp: z13.string().optional().describe("ISO timestamp for the small turn header. Omit to skip the header."),
471
- thinking: z13.string().optional().describe("Short status line shown while the response streams in. Hidden once the first block lands.")
496
+ var turnProps = z14.object({
497
+ prompt: z14.string().describe("The user's prompt for this turn, rendered as a quoted lede above the agent's response. Required so the conversation reads."),
498
+ index: z14.number().optional().describe("Turn index (0-based). When omitted the runtime infers from sibling turns."),
499
+ timestamp: z14.string().optional().describe("ISO timestamp for the small turn header. Omit to skip the header."),
500
+ thinking: z14.string().optional().describe("Short status line shown while the response streams in. Hidden once the first block lands.")
472
501
  });
473
- var backdropProps = z13.object({
474
- variant: z13.enum(["ridges", "sky", "video", "none"]).optional().describe(
502
+ var backdropProps = z14.object({
503
+ variant: z14.enum(["ridges", "sky", "video", "none"]).optional().describe(
475
504
  "Background variant. `ridges` = parallax silhouettes + sky gradient. `sky` = gradient + grain + vignette only. `video` = full-bleed autoplay-loop-muted video sourced from `videoUrl`. `none` = nothing rendered."
476
505
  ),
477
- ridgeColor: z13.string().optional().describe("Hex color of the ridge silhouettes. Defaults to surface fg1."),
478
- videoUrl: z13.string().optional().describe(
506
+ ridgeColor: z14.string().optional().describe("Hex color of the ridge silhouettes. Defaults to surface fg1."),
507
+ videoUrl: z14.string().optional().describe(
479
508
  'Direct mp4/webm URL for the `video` variant. Loaded with preload="metadata", muted, looped, playsInline.'
480
509
  ),
481
- posterUrl: z13.string().optional().describe("Optional poster frame shown while video buffers.")
510
+ posterUrl: z14.string().optional().describe("Optional poster frame shown while video buffers.")
482
511
  });
483
512
  var STRUCTURAL_BASELINE_CATALOG = {
484
513
  page: {
485
514
  type: "page",
486
515
  alwaysInclude: true,
487
- propsSchema: z13.object({}),
516
+ propsSchema: z14.object({}),
488
517
  layout: "fullbleed",
489
518
  progressLabel: "Composing the page"
490
519
  },
@@ -537,7 +566,7 @@ var STRUCTURAL_BASELINE_CATALOG = {
537
566
  var STRUCTURAL_BASELINE_TYPES = Object.keys(STRUCTURAL_BASELINE_CATALOG);
538
567
 
539
568
  // ../spacestation/src/catalog/resolved.ts
540
- import { z as z14 } from "zod";
569
+ import { z as z15 } from "zod";
541
570
  function readResolvedMeta(schema) {
542
571
  const def = schema._def;
543
572
  if (!("_resolved" in def)) return void 0;
@@ -553,17 +582,17 @@ function readResolvedMeta(schema) {
553
582
  }
554
583
 
555
584
  // ../spacestation/src/catalog/prose.ts
556
- import { z as z15 } from "zod";
585
+ import { z as z16 } from "zod";
557
586
  function readProseMeta(schema) {
558
587
  const def = schema._def;
559
588
  return "_prose" in def && def._prose === true;
560
589
  }
561
590
 
562
591
  // ../spacestation/src/catalog/required-props.ts
563
- import { z as z16 } from "zod";
592
+ import { z as z17 } from "zod";
564
593
 
565
594
  // ../spacestation/src/catalog/function-props.ts
566
- import { z as z17 } from "zod";
595
+ import { z as z18 } from "zod";
567
596
 
568
597
  // ../spacestation/src/catalog/shape-tokens.ts
569
598
  var SHAPE_TOKEN = /<(?![/!])[^<>=]*\s[^<>=]*(?<!\/)>/;
@@ -673,47 +702,47 @@ function readAtPath(doc, path) {
673
702
  }
674
703
 
675
704
  // ../spacestation/src/catalog/wire/wire-schema.ts
676
- import { z as z18 } from "zod";
705
+ import { z as z19 } from "zod";
677
706
  var common = {
678
- description: z18.string().optional(),
679
- resolved: z18.object({
680
- resolverKey: z18.string(),
681
- min: z18.number().optional(),
682
- max: z18.number().optional(),
683
- renderFloor: z18.number().optional(),
684
- derivedFrom: z18.string().optional()
707
+ description: z19.string().optional(),
708
+ resolved: z19.object({
709
+ resolverKey: z19.string(),
710
+ min: z19.number().optional(),
711
+ max: z19.number().optional(),
712
+ renderFloor: z19.number().optional(),
713
+ derivedFrom: z19.string().optional()
685
714
  }).strict().optional(),
686
- prose: z18.literal(true).optional()
715
+ prose: z19.literal(true).optional()
687
716
  };
688
- var WireSchemaSchema = z18.lazy(
689
- () => z18.discriminatedUnion("t", [
690
- z18.object({ ...common, t: z18.literal("string"), min: z18.number().optional(), max: z18.number().optional() }).strict(),
691
- z18.object({
717
+ var WireSchemaSchema = z19.lazy(
718
+ () => z19.discriminatedUnion("t", [
719
+ z19.object({ ...common, t: z19.literal("string"), min: z19.number().optional(), max: z19.number().optional() }).strict(),
720
+ z19.object({
692
721
  ...common,
693
- t: z18.literal("number"),
694
- int: z18.literal(true).optional(),
695
- min: z18.number().optional(),
696
- minExclusive: z18.literal(true).optional(),
697
- max: z18.number().optional(),
698
- maxExclusive: z18.literal(true).optional()
722
+ t: z19.literal("number"),
723
+ int: z19.literal(true).optional(),
724
+ min: z19.number().optional(),
725
+ minExclusive: z19.literal(true).optional(),
726
+ max: z19.number().optional(),
727
+ maxExclusive: z19.literal(true).optional()
699
728
  }).strict(),
700
- z18.object({ ...common, t: z18.literal("boolean") }).strict(),
701
- z18.object({ ...common, t: z18.literal("unknown") }).strict(),
702
- z18.object({ ...common, t: z18.literal("literal"), value: z18.union([z18.string(), z18.number(), z18.boolean()]) }).strict(),
703
- z18.object({ ...common, t: z18.literal("enum"), values: z18.array(z18.string()).min(1) }).strict(),
704
- z18.object({ ...common, t: z18.literal("array"), element: WireSchemaSchema, min: z18.number().optional(), max: z18.number().optional() }).strict(),
705
- z18.object({ ...common, t: z18.literal("object"), shape: z18.record(WireSchemaSchema), unknownKeys: z18.enum(["strip", "passthrough", "strict"]) }).strict(),
706
- z18.object({ ...common, t: z18.literal("union"), options: z18.array(WireSchemaSchema).min(2) }).strict(),
707
- z18.object({ ...common, t: z18.literal("discriminatedUnion"), discriminator: z18.string(), options: z18.array(WireSchemaSchema).min(2) }).strict(),
708
- z18.object({ ...common, t: z18.literal("record"), value: WireSchemaSchema }).strict(),
709
- z18.object({ ...common, t: z18.literal("optional"), inner: WireSchemaSchema }).strict(),
710
- z18.object({ ...common, t: z18.literal("nullable"), inner: WireSchemaSchema }).strict(),
711
- z18.object({ ...common, t: z18.literal("default"), inner: WireSchemaSchema, value: z18.unknown() }).strict()
729
+ z19.object({ ...common, t: z19.literal("boolean") }).strict(),
730
+ z19.object({ ...common, t: z19.literal("unknown") }).strict(),
731
+ z19.object({ ...common, t: z19.literal("literal"), value: z19.union([z19.string(), z19.number(), z19.boolean()]) }).strict(),
732
+ z19.object({ ...common, t: z19.literal("enum"), values: z19.array(z19.string()).min(1) }).strict(),
733
+ z19.object({ ...common, t: z19.literal("array"), element: WireSchemaSchema, min: z19.number().optional(), max: z19.number().optional() }).strict(),
734
+ z19.object({ ...common, t: z19.literal("object"), shape: z19.record(WireSchemaSchema), unknownKeys: z19.enum(["strip", "passthrough", "strict"]) }).strict(),
735
+ z19.object({ ...common, t: z19.literal("union"), options: z19.array(WireSchemaSchema).min(2) }).strict(),
736
+ z19.object({ ...common, t: z19.literal("discriminatedUnion"), discriminator: z19.string(), options: z19.array(WireSchemaSchema).min(2) }).strict(),
737
+ z19.object({ ...common, t: z19.literal("record"), value: WireSchemaSchema }).strict(),
738
+ z19.object({ ...common, t: z19.literal("optional"), inner: WireSchemaSchema }).strict(),
739
+ z19.object({ ...common, t: z19.literal("nullable"), inner: WireSchemaSchema }).strict(),
740
+ z19.object({ ...common, t: z19.literal("default"), inner: WireSchemaSchema, value: z19.unknown() }).strict()
712
741
  ])
713
742
  );
714
743
 
715
744
  // ../spacestation/src/catalog/wire/schema-to-wire.ts
716
- import { z as z19 } from "zod";
745
+ import { z as z20 } from "zod";
717
746
  var UnsupportedSchemaError = class extends Error {
718
747
  constructor(path, what) {
719
748
  super(`Cannot publish the schema at ${path === "" ? "<root>" : path}: ${what}.`);
@@ -751,7 +780,7 @@ function arrayNode(schema, path) {
751
780
  return node;
752
781
  }
753
782
  function objectNode(schema, path) {
754
- if (!(schema._def.catchall instanceof z19.ZodNever)) throw new UnsupportedSchemaError(path, "object .catchall() is not supported");
783
+ if (!(schema._def.catchall instanceof z20.ZodNever)) throw new UnsupportedSchemaError(path, "object .catchall() is not supported");
755
784
  const shape = {};
756
785
  for (const [key, child] of Object.entries(schema.shape)) shape[key] = toNode(child, path === "" ? key : `${path}.${key}`);
757
786
  return { t: "object", shape, unknownKeys: schema._def.unknownKeys };
@@ -762,19 +791,19 @@ function literalNode(schema, path) {
762
791
  throw new UnsupportedSchemaError(path, "only string, number and boolean literals are supported");
763
792
  }
764
793
  function bare(schema, path) {
765
- if (schema instanceof z19.ZodString) return stringNode(schema, path);
766
- if (schema instanceof z19.ZodNumber) return numberNode(schema, path);
767
- if (schema instanceof z19.ZodBoolean) return { t: "boolean" };
768
- if (schema instanceof z19.ZodUnknown || schema instanceof z19.ZodAny) return { t: "unknown" };
769
- if (schema instanceof z19.ZodLiteral) return literalNode(schema, path);
770
- if (schema instanceof z19.ZodEnum) return { t: "enum", values: [...schema.options] };
771
- if (schema instanceof z19.ZodArray) return arrayNode(schema, path);
772
- if (schema instanceof z19.ZodObject) return objectNode(schema, path);
773
- if (schema instanceof z19.ZodUnion) {
794
+ if (schema instanceof z20.ZodString) return stringNode(schema, path);
795
+ if (schema instanceof z20.ZodNumber) return numberNode(schema, path);
796
+ if (schema instanceof z20.ZodBoolean) return { t: "boolean" };
797
+ if (schema instanceof z20.ZodUnknown || schema instanceof z20.ZodAny) return { t: "unknown" };
798
+ if (schema instanceof z20.ZodLiteral) return literalNode(schema, path);
799
+ if (schema instanceof z20.ZodEnum) return { t: "enum", values: [...schema.options] };
800
+ if (schema instanceof z20.ZodArray) return arrayNode(schema, path);
801
+ if (schema instanceof z20.ZodObject) return objectNode(schema, path);
802
+ if (schema instanceof z20.ZodUnion) {
774
803
  const options = schema.options;
775
804
  return { t: "union", options: options.map((option, i) => toNode(option, `${path}|${i}`)) };
776
805
  }
777
- if (schema instanceof z19.ZodDiscriminatedUnion) {
806
+ if (schema instanceof z20.ZodDiscriminatedUnion) {
778
807
  const options = schema.options;
779
808
  return {
780
809
  t: "discriminatedUnion",
@@ -782,13 +811,13 @@ function bare(schema, path) {
782
811
  options: options.map((option, i) => toNode(option, `${path}|${i}`))
783
812
  };
784
813
  }
785
- if (schema instanceof z19.ZodRecord) {
786
- if (!(schema.keySchema instanceof z19.ZodString)) throw new UnsupportedSchemaError(path, "only string-keyed records are supported");
814
+ if (schema instanceof z20.ZodRecord) {
815
+ if (!(schema.keySchema instanceof z20.ZodString)) throw new UnsupportedSchemaError(path, "only string-keyed records are supported");
787
816
  return { t: "record", value: toNode(schema.valueSchema, `${path}{}`) };
788
817
  }
789
- if (schema instanceof z19.ZodOptional) return { t: "optional", inner: toNode(schema.unwrap(), path) };
790
- if (schema instanceof z19.ZodNullable) return { t: "nullable", inner: toNode(schema.unwrap(), path) };
791
- if (schema instanceof z19.ZodDefault) {
818
+ if (schema instanceof z20.ZodOptional) return { t: "optional", inner: toNode(schema.unwrap(), path) };
819
+ if (schema instanceof z20.ZodNullable) return { t: "nullable", inner: toNode(schema.unwrap(), path) };
820
+ if (schema instanceof z20.ZodDefault) {
792
821
  return { t: "default", inner: toNode(schema._def.innerType, path), value: schema._def.defaultValue() };
793
822
  }
794
823
  throw new UnsupportedSchemaError(path, `${schema.constructor.name} is not supported`);
@@ -806,41 +835,41 @@ function schemaToWire(schema) {
806
835
  }
807
836
 
808
837
  // ../spacestation/src/catalog/wire/schema-from-wire.ts
809
- import { z as z20 } from "zod";
838
+ import { z as z21 } from "zod";
810
839
 
811
840
  // ../spacestation/src/catalog/wire/catalog-wire.ts
812
- import { z as z21 } from "zod";
813
- var WireCatalogEntrySchema = z21.object({
814
- type: z21.string().min(1),
841
+ import { z as z22 } from "zod";
842
+ var WireCatalogEntrySchema = z22.object({
843
+ type: z22.string().min(1),
815
844
  propsSchema: WireSchemaSchema.optional(),
816
- examples: z21.array(z21.record(z21.unknown())).optional(),
817
- renderedBy: z21.string().optional(),
818
- alwaysInclude: z21.boolean().optional(),
819
- asks: z21.boolean().optional(),
820
- whenToUse: z21.string().optional(),
821
- dontUseWhen: z21.string().optional(),
822
- variants: z21.string().optional(),
823
- dependencies: z21.string().optional(),
824
- layout: z21.enum(["section", "fullbleed"]).optional(),
825
- size: z21.enum(CANVAS_BLOCK_SIZES).optional(),
826
- extendsPage: z21.boolean().optional(),
827
- bindings: z21.array(
828
- z21.object({
829
- source: z21.string(),
830
- prop: z21.string(),
831
- accumulate: z21.enum(["replace", "append", "concat-text"]).optional(),
832
- mountAt: z21.string().optional()
845
+ examples: z22.array(z22.record(z22.unknown())).optional(),
846
+ renderedBy: z22.string().optional(),
847
+ alwaysInclude: z22.boolean().optional(),
848
+ asks: z22.boolean().optional(),
849
+ whenToUse: z22.string().optional(),
850
+ dontUseWhen: z22.string().optional(),
851
+ variants: z22.string().optional(),
852
+ dependencies: z22.string().optional(),
853
+ layout: z22.enum(["section", "fullbleed"]).optional(),
854
+ size: z22.enum(CANVAS_BLOCK_SIZES).optional(),
855
+ extendsPage: z22.boolean().optional(),
856
+ bindings: z22.array(
857
+ z22.object({
858
+ source: z22.string(),
859
+ prop: z22.string(),
860
+ accumulate: z22.enum(["replace", "append", "concat-text"]).optional(),
861
+ mountAt: z22.string().optional()
833
862
  })
834
863
  ).optional(),
835
- defaultLayoutWeight: z21.number().optional(),
836
- defaultMaxHeight: z21.enum(["sm", "md", "lg", "full"]).optional(),
837
- category: z21.string().optional(),
838
- progressLabel: z21.string().optional(),
839
- isExperience: z21.boolean().optional(),
840
- requires: z21.array(z21.string()).optional(),
841
- provides: z21.array(z21.string()).optional()
864
+ defaultLayoutWeight: z22.number().optional(),
865
+ defaultMaxHeight: z22.enum(["sm", "md", "lg", "full"]).optional(),
866
+ category: z22.string().optional(),
867
+ progressLabel: z22.string().optional(),
868
+ isExperience: z22.boolean().optional(),
869
+ requires: z22.array(z22.string()).optional(),
870
+ provides: z22.array(z22.string()).optional()
842
871
  }).strict();
843
- var WireCatalogSchema = z21.record(WireCatalogEntrySchema);
872
+ var WireCatalogSchema = z22.record(WireCatalogEntrySchema);
844
873
  function propsToWire(type, schema) {
845
874
  try {
846
875
  return schemaToWire(schema);
@@ -858,36 +887,36 @@ function catalogToWire(catalog) {
858
887
  }
859
888
 
860
889
  // ../spacestation/src/catalog/wire/package-release.ts
861
- import { z as z25 } from "zod";
890
+ import { z as z26 } from "zod";
862
891
 
863
892
  // ../spacestation/src/catalog/wire/brand-mark.ts
864
- import { z as z22 } from "zod";
893
+ import { z as z23 } from "zod";
865
894
  var BRAND_MARK_TYPES = ["svg", "png"];
866
895
  var BRAND_MARK_MAX_BYTES = 256 * 1024;
867
896
  var MAX_BASE64_LENGTH = Math.ceil(BRAND_MARK_MAX_BYTES / 3) * 4;
868
- var BrandMarkUploadSchema = z22.object({
869
- type: z22.enum(BRAND_MARK_TYPES),
870
- data: z22.string().base64().min(1).max(MAX_BASE64_LENGTH, `a mark file is at most ${BRAND_MARK_MAX_BYTES / 1024} KB`)
897
+ var BrandMarkUploadSchema = z23.object({
898
+ type: z23.enum(BRAND_MARK_TYPES),
899
+ data: z23.string().base64().min(1).max(MAX_BASE64_LENGTH, `a mark file is at most ${BRAND_MARK_MAX_BYTES / 1024} KB`)
871
900
  }).strict();
872
- var BrandMarkStoredSchema = z22.object({
873
- type: z22.enum(BRAND_MARK_TYPES),
874
- sha256: z22.string().regex(/^[0-9a-f]{64}$/, "a stored mark is named by its sha256")
901
+ var BrandMarkStoredSchema = z23.object({
902
+ type: z23.enum(BRAND_MARK_TYPES),
903
+ sha256: z23.string().regex(/^[0-9a-f]{64}$/, "a stored mark is named by its sha256")
875
904
  }).strict();
876
- var BrandMarkFileSchema = z22.union([BrandMarkUploadSchema, BrandMarkStoredSchema]);
877
- var BrandMarkSchema = z22.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");
878
- var BrandMarkImageSchema = z22.object({ src: z22.string().min(1), type: z22.enum(BRAND_MARK_TYPES) }).strict();
879
- var SpaceBrandMarkSchema = z22.object({ square: BrandMarkImageSchema.nullable(), wordmark: BrandMarkImageSchema.nullable() }).strict();
905
+ var BrandMarkFileSchema = z23.union([BrandMarkUploadSchema, BrandMarkStoredSchema]);
906
+ var BrandMarkSchema = z23.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");
907
+ var BrandMarkImageSchema = z23.object({ src: z23.string().min(1), type: z23.enum(BRAND_MARK_TYPES) }).strict();
908
+ var SpaceBrandMarkSchema = z23.object({ square: BrandMarkImageSchema.nullable(), wordmark: BrandMarkImageSchema.nullable() }).strict();
880
909
 
881
910
  // ../spacestation/src/catalog/wire/sdk-compat.ts
882
- import { z as z23 } from "zod";
911
+ import { z as z24 } from "zod";
883
912
  var SDK_VERSION_PATTERN = /^\d{1,4}\.\d{1,4}\.\d{1,4}(-[0-9A-Za-z.]{1,32})?$/;
884
- var SdkVersionSchema = z23.string().regex(SDK_VERSION_PATTERN, "an sdk version is major.minor.patch");
913
+ var SdkVersionSchema = z24.string().regex(SDK_VERSION_PATTERN, "an sdk version is major.minor.patch");
885
914
 
886
915
  // ../spacestation/src/catalog/wire/host-imports.ts
887
- import { z as z24 } from "zod";
888
- var SpecifierSchema = z24.string().min(1).max(200);
889
- var HostImportsSchema = z24.record(SpecifierSchema, z24.array(z24.string().min(1).max(200)).max(5e3));
890
- var HostExportsSchema = z24.record(SpecifierSchema, z24.array(z24.string()));
916
+ import { z as z25 } from "zod";
917
+ var SpecifierSchema = z25.string().min(1).max(200);
918
+ var HostImportsSchema = z25.record(SpecifierSchema, z25.array(z25.string().min(1).max(200)).max(5e3));
919
+ var HostExportsSchema = z25.record(SpecifierSchema, z25.array(z25.string()));
891
920
  function hostImportProblems(imports, provided) {
892
921
  const problems = [];
893
922
  for (const [specifier, names] of Object.entries(imports)) {
@@ -910,15 +939,15 @@ function hostImportsRefusal(commit) {
910
939
  var RESERVED_SCOPES = ["@fourty/", "@40rty/"];
911
940
  var BUNDLE_ASSET_PATH = /^assets\/[A-Za-z0-9_-]+\.(woff2?|ttf|otf|png|jpe?g|svg|gif|webp)$/;
912
941
  var RELEASE_MESSAGE_MAX = 140;
913
- var ReleaseMessageSchema = z25.string().trim().min(1, "say what this release changes").max(RELEASE_MESSAGE_MAX, `keep the message to one line of ${RELEASE_MESSAGE_MAX} characters or fewer`);
914
- var PackageReleaseSchema = z25.object({
942
+ var ReleaseMessageSchema = z26.string().trim().min(1, "say what this release changes").max(RELEASE_MESSAGE_MAX, `keep the message to one line of ${RELEASE_MESSAGE_MAX} characters or fewer`);
943
+ var PackageReleaseSchema = z26.object({
915
944
  /** The id spaces name in `componentSources` — an npm-style package name. */
916
- 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((scope) => id.startsWith(scope)), `the ${RESERVED_SCOPES.join(" and ")} scopes are reserved`),
917
- label: z25.string().min(1).max(120),
945
+ 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((scope) => id.startsWith(scope)), `the ${RESERVED_SCOPES.join(" and ")} scopes are reserved`),
946
+ label: z26.string().min(1).max(120),
918
947
  /** The package's own version, as its repository states it — shown in the console. */
919
- version: z25.string().min(1).max(40),
948
+ version: z26.string().min(1).max(40),
920
949
  /** What this release changed, in the publisher's words (`forty publish --message`) — shown in the console's version list. */
921
- description: z25.string().min(1).max(500).optional(),
950
+ description: z26.string().min(1).max(500).optional(),
922
951
  /**
923
952
  * The `@40rty/ams-sdk` version the brand project resolved when `forty
924
953
  * publish` built this release. A bundle takes the sdk from the page at
@@ -938,7 +967,7 @@ var PackageReleaseSchema = z25.object({
938
967
  hostImports: HostImportsSchema.optional(),
939
968
  catalog: WireCatalogSchema,
940
969
  /** Component manifests by path under `catalogs/`, e.g. `catalogs/product/productGrid.md`. */
941
- manifests: z25.record(z25.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z25.string()),
970
+ manifests: z26.record(z26.string().regex(/^catalogs\/.+\.md$/, "a manifest path is catalogs/<\u2026>.md"), z26.string()),
942
971
  /**
943
972
  * The brand's components, built — present when the PLATFORM hosts this
944
973
  * brand's spacefront, absent when the brand hosts it in its own app. One
@@ -947,17 +976,17 @@ var PackageReleaseSchema = z25.object({
947
976
  * images — base64, keyed by the path the stylesheet's `url()` names, beside
948
977
  * it). It is served to browsers; the platform's servers never run it.
949
978
  */
950
- bundle: z25.object({
951
- js: z25.string().min(1),
952
- css: z25.string(),
953
- assets: z25.record(z25.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z25.string().base64()).optional()
979
+ bundle: z26.object({
980
+ js: z26.string().min(1),
981
+ css: z26.string(),
982
+ assets: z26.record(z26.string().regex(BUNDLE_ASSET_PATH, "an asset is assets/<name>.<font or image extension>"), z26.string().base64()).optional()
954
983
  }).strict().optional(),
955
984
  /**
956
985
  * The class the spacefront root carries while this package is the space's.
957
986
  * The package's own stylesheet styles under it. Absent = the platform's
958
987
  * default theme class.
959
988
  */
960
- theme: z25.object({ themeClass: z25.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
989
+ theme: z26.object({ themeClass: z26.string().regex(/^[a-z][a-z0-9-]*$/, "a theme class is lowercase letters, digits and hyphens") }).strict().optional(),
961
990
  /**
962
991
  * The brand's mark (`brand-mark.ts`). Sent as the files themselves; the
963
992
  * platform stores them content-addressed at ingest and keeps only their
@@ -970,7 +999,7 @@ var PackageReleaseSchema = z25.object({
970
999
  * The package's own composition guidance for its own components — prompt
971
1000
  * markdown the agent reads, gated on the capabilities it names (`requires`).
972
1001
  */
973
- 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(),
1002
+ 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(),
974
1003
  /**
975
1004
  * The brand's SPACE prompt — its `prompts/space.md`, verbatim: sections split
976
1005
  * by `<!-- section:<id> -->` markers, the same format as the platform's
@@ -978,85 +1007,85 @@ var PackageReleaseSchema = z25.object({
978
1007
  * package. How the brand speaks, what it sells and what it never claims ship
979
1008
  * with the brand, and a release changes them with no platform deploy.
980
1009
  */
981
- spacePrompt: z25.string().min(1).max(2e5).optional(),
1010
+ spacePrompt: z26.string().min(1).max(2e5).optional(),
982
1011
  /**
983
1012
  * Opaque per-vertical extension data (`BrandDefinition.config`): the
984
1013
  * platform stays vertical-agnostic and the vertical's own code reads its keys.
985
1014
  */
986
- config: z25.record(z25.string(), z25.unknown()).optional(),
1015
+ config: z26.record(z26.string(), z26.unknown()).optional(),
987
1016
  /**
988
1017
  * Set by the platform, never by a publisher: this release is a DRAFT of the
989
1018
  * package `of`, previewed on the space `space`. See `draftSourceId`.
990
1019
  */
991
- draft: z25.object({ of: z25.string().min(1), space: z25.string().min(1) }).strict().optional()
1020
+ draft: z26.object({ of: z26.string().min(1), space: z26.string().min(1) }).strict().optional()
992
1021
  }).strict();
993
1022
 
994
1023
  // ../spacestation/src/catalog/wire/package-bundle-ref.ts
995
- import { z as z26 } from "zod";
996
- var PackageBundleRefSchema = z26.object({
997
- sourceId: z26.string(),
998
- js: z26.string(),
999
- css: z26.string(),
1024
+ import { z as z27 } from "zod";
1025
+ var PackageBundleRefSchema = z27.object({
1026
+ sourceId: z27.string(),
1027
+ js: z27.string(),
1028
+ css: z27.string(),
1000
1029
  /** The brand's name for itself, and its package's version. */
1001
- label: z26.string(),
1002
- version: z26.string(),
1030
+ label: z27.string(),
1031
+ version: z27.string(),
1003
1032
  /** The sdk the bundle was built against (`PackageRelease.builtWithSdk`) — absent for a legacy release. Picks its compat shims. */
1004
1033
  builtWithSdk: SdkVersionSchema.optional()
1005
1034
  });
1006
1035
 
1007
1036
  // ../spacestation/src/projection/projection.ts
1008
- import { z as z27 } from "zod";
1009
- var LateBoundValueSchema = z27.object({ fact: z27.literal(true) });
1010
- var DirectiveValueSchema = z27.union([
1011
- z27.string(),
1012
- z27.number(),
1013
- z27.boolean(),
1037
+ import { z as z28 } from "zod";
1038
+ var LateBoundValueSchema = z28.object({ fact: z28.literal(true) });
1039
+ var DirectiveValueSchema = z28.union([
1040
+ z28.string(),
1041
+ z28.number(),
1042
+ z28.boolean(),
1014
1043
  LateBoundValueSchema
1015
1044
  ]);
1016
- var ProjectionDirectiveSchema = z27.object({
1045
+ var ProjectionDirectiveSchema = z28.object({
1017
1046
  /** Keep only items whose axis values all match. Keyed by axis name
1018
1047
  * (e.g. `Size`); value is a literal or the `{fact:true}` marker. */
1019
- isolateTo: z27.record(DirectiveValueSchema).optional(),
1048
+ isolateTo: z28.record(DirectiveValueSchema).optional(),
1020
1049
  /** Isolate to EVERY axis the visitor has a stored fact for. The agent
1021
1050
  * emits this (it is vertical-agnostic — it cannot name axes); the
1022
1051
  * entity binding expands it against the entity's own axes + facts. */
1023
- isolateToFacts: z27.boolean().optional(),
1052
+ isolateToFacts: z28.boolean().optional(),
1024
1053
  /** Keep only items the entity binding reports as available. */
1025
- availableOnly: z27.boolean().optional(),
1054
+ availableOnly: z28.boolean().optional(),
1026
1055
  /** Cap the rendered count after filtering. */
1027
- limit: z27.number().int().positive().optional()
1056
+ limit: z28.number().int().positive().optional()
1028
1057
  });
1029
- var ProjectionPreferencesSchema = z27.record(
1030
- z27.union([ProjectionDirectiveSchema, z27.null()])
1058
+ var ProjectionPreferencesSchema = z28.record(
1059
+ z28.union([ProjectionDirectiveSchema, z28.null()])
1031
1060
  );
1032
- var ProjectionSetPayloadSchema = z27.object({
1033
- setAll: z27.union([ProjectionDirectiveSchema, z27.null()]).optional(),
1061
+ var ProjectionSetPayloadSchema = z28.object({
1062
+ setAll: z28.union([ProjectionDirectiveSchema, z28.null()]).optional(),
1034
1063
  set: ProjectionPreferencesSchema.optional()
1035
1064
  });
1036
1065
 
1037
1066
  // ../spacestation/src/host/host-page.ts
1038
- import { z as z28 } from "zod";
1039
- var HostPayloadSchema = z28.object({
1067
+ import { z as z29 } from "zod";
1068
+ var HostPayloadSchema = z29.object({
1040
1069
  page: PageSchema.nullable(),
1041
- maxSections: z28.number().int().positive().nullable(),
1042
- surface: z28.enum(["page", "slot"])
1070
+ maxSections: z29.number().int().positive().nullable(),
1071
+ surface: z29.enum(["page", "slot"])
1043
1072
  });
1044
- var HostClearedSchema = z28.object({ cleared: z28.literal(true) });
1073
+ var HostClearedSchema = z29.object({ cleared: z29.literal(true) });
1045
1074
 
1046
1075
  // ../spacestation/src/focus/focus.ts
1047
- import { z as z29 } from "zod";
1048
- var FocusElementPayloadSchema = z29.object({
1049
- elementId: z29.string().min(1)
1076
+ import { z as z30 } from "zod";
1077
+ var FocusElementPayloadSchema = z30.object({
1078
+ elementId: z30.string().min(1)
1050
1079
  });
1051
1080
 
1052
1081
  // ../spacestation/src/view/continuation.ts
1053
- import { z as z30 } from "zod";
1054
- var ViewExtendPayloadSchema = z30.object({
1055
- reason: z30.enum(["scroll_near_bottom"])
1082
+ import { z as z31 } from "zod";
1083
+ var ViewExtendPayloadSchema = z31.object({
1084
+ reason: z31.enum(["scroll_near_bottom"])
1056
1085
  });
1057
1086
 
1058
1087
  // ../spacestation/src/attachment/attachment.ts
1059
- import { z as z31 } from "zod";
1088
+ import { z as z32 } from "zod";
1060
1089
  var ALLOWED_ATTACHMENT_TYPES = [
1061
1090
  "image/jpeg",
1062
1091
  "image/png",
@@ -1068,39 +1097,39 @@ var MAX_ATTACHMENT_BYTES = 10 * 1024 * 1024;
1068
1097
  function isAllowedAttachmentType(mime) {
1069
1098
  return ALLOWED_ATTACHMENT_TYPES.includes(mime);
1070
1099
  }
1071
- var AttachmentRefSchema = z31.object({
1100
+ var AttachmentRefSchema = z32.object({
1072
1101
  // A UUID, as `storeAttachment` mints it: the id becomes a storage path segment,
1073
1102
  // so nothing else — no `/`, no `..` — may reach that lookup.
1074
- id: z31.string().uuid(),
1075
- mimeType: z31.string().refine(isAllowedAttachmentType, {
1103
+ id: z32.string().uuid(),
1104
+ mimeType: z32.string().refine(isAllowedAttachmentType, {
1076
1105
  message: "mimeType not on the attachment allow-list"
1077
1106
  }),
1078
- name: z31.string().min(1),
1079
- size: z31.number().int().positive().max(MAX_ATTACHMENT_BYTES),
1080
- url: z31.string().min(1)
1107
+ name: z32.string().min(1),
1108
+ size: z32.number().int().positive().max(MAX_ATTACHMENT_BYTES),
1109
+ url: z32.string().min(1)
1081
1110
  });
1082
- var AttachmentRefsSchema = z31.array(AttachmentRefSchema);
1111
+ var AttachmentRefsSchema = z32.array(AttachmentRefSchema);
1083
1112
 
1084
1113
  // ../spacestation/src/attachment/attachment-failure.ts
1085
1114
  var MAX_ATTACHMENT_MB = Math.round(MAX_ATTACHMENT_BYTES / (1024 * 1024));
1086
1115
 
1087
1116
  // ../spacestation/src/contracts/entry-context.ts
1088
- import { z as z32 } from "zod";
1117
+ import { z as z33 } from "zod";
1089
1118
  var ENTRY_CONTEXT_MAX_VALUE_CHARS = 200;
1090
1119
  var ENTRY_CONTEXT_MAX_KEYS = 12;
1091
1120
  var ENTRY_CONTEXT_MAX_NAMESPACES = 8;
1092
1121
  var ENTRY_CONTEXT_MAX_NAME_CHARS = 64;
1093
- var EntryContextValueSchema = z32.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
1094
- var EntryContextNameSchema = z32.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
1095
- var EntryContextNamespaceSchema = z32.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries) => Object.keys(entries).length <= ENTRY_CONTEXT_MAX_KEYS, {
1122
+ var EntryContextValueSchema = z33.string().trim().min(1).max(ENTRY_CONTEXT_MAX_VALUE_CHARS);
1123
+ var EntryContextNameSchema = z33.string().trim().min(1).max(ENTRY_CONTEXT_MAX_NAME_CHARS);
1124
+ var EntryContextNamespaceSchema = z33.record(EntryContextNameSchema, EntryContextValueSchema).refine((entries) => Object.keys(entries).length <= ENTRY_CONTEXT_MAX_KEYS, {
1096
1125
  message: `at most ${ENTRY_CONTEXT_MAX_KEYS} entries per namespace`
1097
1126
  });
1098
- var EntryContextSchema = z32.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
1127
+ var EntryContextSchema = z33.record(EntryContextNameSchema, EntryContextNamespaceSchema).refine((namespaces) => Object.keys(namespaces).length <= ENTRY_CONTEXT_MAX_NAMESPACES, {
1099
1128
  message: `at most ${ENTRY_CONTEXT_MAX_NAMESPACES} entry-context namespaces`
1100
1129
  });
1101
1130
 
1102
1131
  // ../spacestation/src/contracts/session-arrival.ts
1103
- import { z as z33 } from "zod";
1132
+ import { z as z34 } from "zod";
1104
1133
  var SURFACES = [
1105
1134
  "spacefront",
1106
1135
  "embed",
@@ -1110,11 +1139,11 @@ var SURFACES = [
1110
1139
  "playground",
1111
1140
  "automation"
1112
1141
  ];
1113
- var SurfaceSchema = z33.enum(SURFACES);
1142
+ var SurfaceSchema = z34.enum(SURFACES);
1114
1143
  var CLICK_ID_KINDS = ["gclid", "fbclid", "msclkid", "wbraid", "gbraid"];
1115
- var ClickIdKindSchema = z33.enum(CLICK_ID_KINDS);
1144
+ var ClickIdKindSchema = z34.enum(CLICK_ID_KINDS);
1116
1145
  var VISITOR_ID_DURABILITIES = ["persisted", "ephemeral", "host_supplied"];
1117
- var VisitorIdDurabilitySchema = z33.enum(VISITOR_ID_DURABILITIES);
1146
+ var VisitorIdDurabilitySchema = z34.enum(VISITOR_ID_DURABILITIES);
1118
1147
  var TRAFFIC_BUCKETS = [
1119
1148
  "paid_google",
1120
1149
  "paid_meta",
@@ -1126,10 +1155,10 @@ var TRAFFIC_BUCKETS = [
1126
1155
  "direct",
1127
1156
  "unknown"
1128
1157
  ];
1129
- var TrafficBucketSchema = z33.enum(TRAFFIC_BUCKETS);
1158
+ var TrafficBucketSchema = z34.enum(TRAFFIC_BUCKETS);
1130
1159
  var ARRIVAL_MAX_VALUE_CHARS = 200;
1131
- var ArrivalValueSchema = z33.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
1132
- var SessionArrivalSchema = z33.object({
1160
+ var ArrivalValueSchema = z34.string().trim().min(1).max(ARRIVAL_MAX_VALUE_CHARS);
1161
+ var SessionArrivalSchema = z34.object({
1133
1162
  utmSource: ArrivalValueSchema.optional(),
1134
1163
  utmMedium: ArrivalValueSchema.optional(),
1135
1164
  utmCampaign: ArrivalValueSchema.optional(),
@@ -1167,92 +1196,92 @@ var WIRE_PROTOCOL_VERSION = 1;
1167
1196
  var WIRE_PROTOCOL_PARAM = "protocol";
1168
1197
 
1169
1198
  // ../spacestation/src/catalog/attribute-registry.ts
1170
- import { z as z34 } from "zod";
1171
- var AttributeScopeBucketSchema = z34.object({
1172
- scope: z34.string(),
1173
- needles: z34.array(z34.string()).readonly(),
1174
- label: z34.string().optional()
1175
- });
1176
- var AttributeScopeConfigSchema = z34.object({
1177
- facet: z34.string(),
1178
- buckets: z34.array(AttributeScopeBucketSchema).readonly(),
1179
- emptyScope: z34.string(),
1180
- noMatchScope: z34.string(),
1181
- ignoreValues: z34.array(z34.string()).readonly(),
1182
- emptyScopeLabel: z34.string().optional(),
1183
- noMatchScopeLabel: z34.string().optional()
1184
- });
1185
- var AttributeDefBaseSchema = z34.object({
1186
- description: z34.string().optional(),
1187
- durable: z34.boolean().optional(),
1188
- label: z34.string().optional()
1189
- });
1190
- var AttributeDefSchema = z34.discriminatedUnion("kind", [
1191
- AttributeDefBaseSchema.extend({ kind: z34.literal("enum"), values: z34.array(z34.string()) }),
1192
- AttributeDefBaseSchema.extend({ kind: z34.literal("free_text") }),
1193
- AttributeDefBaseSchema.extend({ kind: z34.literal("date_or_season") }),
1194
- AttributeDefBaseSchema.extend({ kind: z34.literal("money_or_band") }),
1199
+ import { z as z35 } from "zod";
1200
+ var AttributeScopeBucketSchema = z35.object({
1201
+ scope: z35.string(),
1202
+ needles: z35.array(z35.string()).readonly(),
1203
+ label: z35.string().optional()
1204
+ });
1205
+ var AttributeScopeConfigSchema = z35.object({
1206
+ facet: z35.string(),
1207
+ buckets: z35.array(AttributeScopeBucketSchema).readonly(),
1208
+ emptyScope: z35.string(),
1209
+ noMatchScope: z35.string(),
1210
+ ignoreValues: z35.array(z35.string()).readonly(),
1211
+ emptyScopeLabel: z35.string().optional(),
1212
+ noMatchScopeLabel: z35.string().optional()
1213
+ });
1214
+ var AttributeDefBaseSchema = z35.object({
1215
+ description: z35.string().optional(),
1216
+ durable: z35.boolean().optional(),
1217
+ label: z35.string().optional()
1218
+ });
1219
+ var AttributeDefSchema = z35.discriminatedUnion("kind", [
1220
+ AttributeDefBaseSchema.extend({ kind: z35.literal("enum"), values: z35.array(z35.string()) }),
1221
+ AttributeDefBaseSchema.extend({ kind: z35.literal("free_text") }),
1222
+ AttributeDefBaseSchema.extend({ kind: z35.literal("date_or_season") }),
1223
+ AttributeDefBaseSchema.extend({ kind: z35.literal("money_or_band") }),
1195
1224
  AttributeDefBaseSchema.extend({
1196
- kind: z34.literal("number"),
1197
- min: z34.number().optional(),
1198
- max: z34.number().optional(),
1199
- unit: z34.string().optional()
1225
+ kind: z35.literal("number"),
1226
+ min: z35.number().optional(),
1227
+ max: z35.number().optional(),
1228
+ unit: z35.string().optional()
1200
1229
  })
1201
1230
  ]);
1202
1231
 
1203
1232
  // ../spacestation/src/space/agent-directive.ts
1204
- import { z as z35 } from "zod";
1233
+ import { z as z36 } from "zod";
1205
1234
  var AGENT_DIRECTIVE_KINDS = ["preference", "pairing", "order of things", "promise", "threshold"];
1206
1235
  var AGENT_DIRECTIVE_SEVERITIES = ["a missed opportunity", "a problem", "unacceptable"];
1207
1236
  var AGENT_DIRECTIVE_SOURCES = ["owner", "operator", "session-lesson"];
1208
1237
  var AGENT_DIRECTIVE_STATUSES = ["proposed", "active", "rejected", "retired"];
1209
- var AgentDirectiveSchema = z35.object({
1210
- name: z35.string().trim().min(1).max(80),
1211
- kind: z35.enum(AGENT_DIRECTIVE_KINDS),
1212
- severity: z35.enum(AGENT_DIRECTIVE_SEVERITIES),
1238
+ var AgentDirectiveSchema = z36.object({
1239
+ name: z36.string().trim().min(1).max(80),
1240
+ kind: z36.enum(AGENT_DIRECTIVE_KINDS),
1241
+ severity: z36.enum(AGENT_DIRECTIVE_SEVERITIES),
1213
1242
  /** No bare URL: a URL is a hallucination surface, and a handle is not a
1214
1243
  * product name. */
1215
- text: z35.string().trim().min(1).max(1e3).refine((t) => !/https?:\/\//.test(t), "a directive names things by name, never by URL")
1244
+ text: z36.string().trim().min(1).max(1e3).refine((t) => !/https?:\/\//.test(t), "a directive names things by name, never by URL")
1216
1245
  }).strict();
1217
- var SpaceAgentDirectiveSchema = z35.object({
1218
- id: z35.string(),
1219
- position: z35.number().int(),
1220
- name: z35.string(),
1221
- kind: z35.enum(AGENT_DIRECTIVE_KINDS),
1222
- severity: z35.enum(AGENT_DIRECTIVE_SEVERITIES),
1223
- text: z35.string(),
1224
- source: z35.enum(AGENT_DIRECTIVE_SOURCES),
1225
- status: z35.enum(AGENT_DIRECTIVE_STATUSES),
1246
+ var SpaceAgentDirectiveSchema = z36.object({
1247
+ id: z36.string(),
1248
+ position: z36.number().int(),
1249
+ name: z36.string(),
1250
+ kind: z36.enum(AGENT_DIRECTIVE_KINDS),
1251
+ severity: z36.enum(AGENT_DIRECTIVE_SEVERITIES),
1252
+ text: z36.string(),
1253
+ source: z36.enum(AGENT_DIRECTIVE_SOURCES),
1254
+ status: z36.enum(AGENT_DIRECTIVE_STATUSES),
1226
1255
  /** Who wrote it; null for a lesson the system proposed. */
1227
- createdBy: z35.string().nullable(),
1256
+ createdBy: z36.string().nullable(),
1228
1257
  /** Why a mined lesson was proposed; null for a directive a person wrote. */
1229
- evidence: z35.record(z35.unknown()).nullable(),
1230
- decidedBy: z35.string().nullable(),
1231
- decidedAt: z35.string().nullable(),
1232
- createdAt: z35.string()
1258
+ evidence: z36.record(z36.unknown()).nullable(),
1259
+ decidedBy: z36.string().nullable(),
1260
+ decidedAt: z36.string().nullable(),
1261
+ createdAt: z36.string()
1233
1262
  });
1234
- var OutcomeTallySchema = z35.object({ turns: z35.number().int(), acted: z35.number().int() });
1263
+ var OutcomeTallySchema = z36.object({ turns: z36.number().int(), acted: z36.number().int() });
1235
1264
  var SpaceAgentDirectiveListItemSchema = SpaceAgentDirectiveSchema.extend({
1236
- impact: z35.object({ before: OutcomeTallySchema, after: OutcomeTallySchema }).nullable()
1265
+ impact: z36.object({ before: OutcomeTallySchema, after: OutcomeTallySchema }).nullable()
1237
1266
  });
1238
- var UpdateAgentDirectiveInputSchema = z35.object({
1267
+ var UpdateAgentDirectiveInputSchema = z36.object({
1239
1268
  name: AgentDirectiveSchema.shape.name.optional(),
1240
1269
  kind: AgentDirectiveSchema.shape.kind.optional(),
1241
1270
  severity: AgentDirectiveSchema.shape.severity.optional(),
1242
1271
  text: AgentDirectiveSchema.shape.text.optional(),
1243
- status: z35.enum(AGENT_DIRECTIVE_STATUSES).optional()
1272
+ status: z36.enum(AGENT_DIRECTIVE_STATUSES).optional()
1244
1273
  }).strict();
1245
- var ReorderAgentDirectivesInputSchema = z35.object({ ids: z35.array(z35.string()).min(1) }).strict();
1274
+ var ReorderAgentDirectivesInputSchema = z36.object({ ids: z36.array(z36.string()).min(1) }).strict();
1246
1275
 
1247
1276
  // ../spacestation/src/shell/bot-check-notice.ts
1248
- import { z as z36 } from "zod";
1249
- var BotCheckNoticeSchema = z36.object({
1277
+ import { z as z37 } from "zod";
1278
+ var BotCheckNoticeSchema = z37.object({
1250
1279
  /** Read in order: plain text, and links the notice must keep linked. */
1251
- segments: z36.array(z36.union([z36.string(), z36.object({ text: z36.string(), href: z36.string().url() })])).min(1)
1280
+ segments: z37.array(z37.union([z37.string(), z37.object({ text: z37.string(), href: z37.string().url() })])).min(1)
1252
1281
  });
1253
1282
 
1254
1283
  // ../spacestation/src/space/space-locale.ts
1255
- import { z as z37 } from "zod";
1284
+ import { z as z38 } from "zod";
1256
1285
  function isBcp47(tag) {
1257
1286
  try {
1258
1287
  return new Intl.Locale(tag).language.length > 0;
@@ -1261,7 +1290,7 @@ function isBcp47(tag) {
1261
1290
  throw err;
1262
1291
  }
1263
1292
  }
1264
- var SpaceLocaleSchema = z37.string().refine(isBcp47, { message: "locale must be a BCP 47 language tag, e.g. he-IL" });
1293
+ var SpaceLocaleSchema = z38.string().refine(isBcp47, { message: "locale must be a BCP 47 language tag, e.g. he-IL" });
1265
1294
 
1266
1295
  // ../spacestation/src/space/workspace-catalog.ts
1267
1296
  var COMPONENT_SOURCE = {
@@ -1291,30 +1320,30 @@ var DEFAULT_SPACE_CONFIG = {
1291
1320
  };
1292
1321
 
1293
1322
  // ../spacestation/src/space/trace.ts
1294
- import { z as z38 } from "zod";
1295
- var RunTokenUsageSchema = z38.object({
1296
- input_tokens: z38.number().optional(),
1297
- output_tokens: z38.number().optional(),
1298
- cache_read_tokens: z38.number().optional()
1299
- });
1300
- var TraceRecordSchema = z38.object({
1301
- id: z38.string().uuid(),
1302
- spaceId: z38.string().uuid().nullable(),
1303
- sessionId: z38.string(),
1323
+ import { z as z39 } from "zod";
1324
+ var RunTokenUsageSchema = z39.object({
1325
+ input_tokens: z39.number().optional(),
1326
+ output_tokens: z39.number().optional(),
1327
+ cache_read_tokens: z39.number().optional()
1328
+ });
1329
+ var TraceRecordSchema = z39.object({
1330
+ id: z39.string().uuid(),
1331
+ spaceId: z39.string().uuid().nullable(),
1332
+ sessionId: z39.string(),
1304
1333
  /** OTP-verified visitor email the session was unlocked with, or `null`
1305
1334
  * for an unlocked space / anonymous unlock. */
1306
- visitorEmail: z38.string().nullable(),
1307
- userPrompt: z38.string(),
1308
- branch: z38.string().nullable(),
1309
- responseText: z38.string().nullable(),
1310
- layout: z38.unknown().nullable(),
1311
- phaseTimings: z38.record(z38.number()).nullable(),
1312
- tokensByModel: z38.record(RunTokenUsageSchema).nullable(),
1313
- toolCalls: z38.array(z38.unknown()).nullable(),
1314
- diagnostics: z38.array(z38.unknown()).nullable(),
1315
- latencyFirstText: z38.number().int().nullable(),
1316
- latencyFirstPatch: z38.number().int().nullable(),
1317
- latencyTotal: z38.number().int().nullable(),
1335
+ visitorEmail: z39.string().nullable(),
1336
+ userPrompt: z39.string(),
1337
+ branch: z39.string().nullable(),
1338
+ responseText: z39.string().nullable(),
1339
+ layout: z39.unknown().nullable(),
1340
+ phaseTimings: z39.record(z39.number()).nullable(),
1341
+ tokensByModel: z39.record(RunTokenUsageSchema).nullable(),
1342
+ toolCalls: z39.array(z39.unknown()).nullable(),
1343
+ diagnostics: z39.array(z39.unknown()).nullable(),
1344
+ latencyFirstText: z39.number().int().nullable(),
1345
+ latencyFirstPatch: z39.number().int().nullable(),
1346
+ latencyTotal: z39.number().int().nullable(),
1318
1347
  /**
1319
1348
  * The CLIENT's turn id for this run, or `null`.
1320
1349
  *
@@ -1330,29 +1359,29 @@ var TraceRecordSchema = z38.object({
1330
1359
  * a turn whose ack the client never saw — none of which is evidence that a
1331
1360
  * visitor asked something and got nothing.
1332
1361
  */
1333
- turnId: z38.string().nullable(),
1362
+ turnId: z39.string().nullable(),
1334
1363
  /** Serialized `TraceTracker.exportState()` payload (parsed object) —
1335
1364
  * lets the inspector rehydrate this run verbatim after a reload. */
1336
- trackerState: z38.unknown().nullable(),
1337
- createdAt: z38.string()
1338
- });
1339
- var MillisecondsSchema = z38.number().nullable().transform((v) => v === null ? null : Math.round(v));
1340
- var CreateTraceInputSchema = z38.object({
1341
- spaceId: z38.string().uuid().nullable(),
1342
- sessionId: z38.string(),
1343
- visitorEmail: z38.string().nullable(),
1344
- userPrompt: z38.string(),
1345
- branch: z38.string().nullable(),
1346
- responseText: z38.string().nullable(),
1347
- layout: z38.unknown().nullable(),
1348
- phaseTimings: z38.record(z38.number()).nullable(),
1349
- tokensByModel: z38.record(RunTokenUsageSchema).nullable(),
1350
- toolCalls: z38.array(z38.unknown()).nullable(),
1351
- diagnostics: z38.array(z38.unknown()).nullable(),
1365
+ trackerState: z39.unknown().nullable(),
1366
+ createdAt: z39.string()
1367
+ });
1368
+ var MillisecondsSchema = z39.number().nullable().transform((v) => v === null ? null : Math.round(v));
1369
+ var CreateTraceInputSchema = z39.object({
1370
+ spaceId: z39.string().uuid().nullable(),
1371
+ sessionId: z39.string(),
1372
+ visitorEmail: z39.string().nullable(),
1373
+ userPrompt: z39.string(),
1374
+ branch: z39.string().nullable(),
1375
+ responseText: z39.string().nullable(),
1376
+ layout: z39.unknown().nullable(),
1377
+ phaseTimings: z39.record(z39.number()).nullable(),
1378
+ tokensByModel: z39.record(RunTokenUsageSchema).nullable(),
1379
+ toolCalls: z39.array(z39.unknown()).nullable(),
1380
+ diagnostics: z39.array(z39.unknown()).nullable(),
1352
1381
  latencyFirstText: MillisecondsSchema,
1353
1382
  latencyFirstPatch: MillisecondsSchema,
1354
1383
  latencyTotal: MillisecondsSchema,
1355
- trackerState: z38.unknown().nullable(),
1384
+ trackerState: z39.unknown().nullable(),
1356
1385
  /**
1357
1386
  * The CLIENT's turn id for this run, or `null`.
1358
1387
  *
@@ -1368,37 +1397,37 @@ var CreateTraceInputSchema = z38.object({
1368
1397
  * a turn whose ack the client never saw — none of which is evidence that a
1369
1398
  * visitor asked something and got nothing.
1370
1399
  */
1371
- turnId: z38.string().nullable()
1400
+ turnId: z39.string().nullable()
1372
1401
  });
1373
- var AgentSessionSummarySchema = z38.object({
1374
- sessionId: z38.string(),
1402
+ var AgentSessionSummarySchema = z39.object({
1403
+ sessionId: z39.string(),
1375
1404
  /** Turn rows only; background/secondary runs are excluded by the aggregate. */
1376
- turnCount: z38.number().int(),
1405
+ turnCount: z39.number().int(),
1377
1406
  /** The session's opening prompt — titles the row in the UI. */
1378
- firstPrompt: z38.string(),
1379
- startedAt: z38.string(),
1380
- lastRunAt: z38.string(),
1407
+ firstPrompt: z39.string(),
1408
+ startedAt: z39.string(),
1409
+ lastRunAt: z39.string(),
1381
1410
  /** Summed `latency_total` across the session's turns. */
1382
- totalLatencyMs: z38.number().int()
1411
+ totalLatencyMs: z39.number().int()
1383
1412
  });
1384
- var SessionTurnSchema = z38.object({
1385
- id: z38.string().uuid(),
1386
- userPrompt: z38.string(),
1387
- responseText: z38.string().nullable(),
1413
+ var SessionTurnSchema = z39.object({
1414
+ id: z39.string().uuid(),
1415
+ userPrompt: z39.string(),
1416
+ responseText: z39.string().nullable(),
1388
1417
  /** Full cumulative Spec committed by this turn — never a patch delta. */
1389
- layout: z38.unknown().nullable(),
1390
- createdAt: z38.string(),
1391
- latencyTotal: z38.number().int().nullable(),
1392
- phaseTimings: z38.record(z38.number()).nullable(),
1393
- tokensByModel: z38.record(z38.object({
1394
- input_tokens: z38.number().optional(),
1395
- output_tokens: z38.number().optional()
1418
+ layout: z39.unknown().nullable(),
1419
+ createdAt: z39.string(),
1420
+ latencyTotal: z39.number().int().nullable(),
1421
+ phaseTimings: z39.record(z39.number()).nullable(),
1422
+ tokensByModel: z39.record(z39.object({
1423
+ input_tokens: z39.number().optional(),
1424
+ output_tokens: z39.number().optional()
1396
1425
  })).nullable(),
1397
- toolCalls: z38.array(z38.unknown()).nullable(),
1398
- diagnostics: z38.array(z38.unknown()).nullable()
1426
+ toolCalls: z39.array(z39.unknown()).nullable(),
1427
+ diagnostics: z39.array(z39.unknown()).nullable()
1399
1428
  });
1400
- var SessionReplaySchema = z38.object({
1401
- turns: z38.array(SessionTurnSchema),
1429
+ var SessionReplaySchema = z39.object({
1430
+ turns: z39.array(SessionTurnSchema),
1402
1431
  /**
1403
1432
  * The session's own last-committed layout, read straight off the durable
1404
1433
  * session record (`sessions.blob.layout`) rather than derived from `turns`.
@@ -1409,20 +1438,20 @@ var SessionReplaySchema = z38.object({
1409
1438
  * a perfectly real layout; only this field can show it. Null exclusively
1410
1439
  * when the durable session row itself could not be read.
1411
1440
  */
1412
- sessionLayout: z38.record(z38.string(), z38.unknown()).nullable()
1441
+ sessionLayout: z39.record(z39.string(), z39.unknown()).nullable()
1413
1442
  });
1414
- var SessionTraceSchema = z38.object({
1415
- trackerState: z38.string().nullable()
1443
+ var SessionTraceSchema = z39.object({
1444
+ trackerState: z39.string().nullable()
1416
1445
  });
1417
- var LlmUsageDailySchema = z38.object({
1418
- day: z38.string(),
1446
+ var LlmUsageDailySchema = z39.object({
1447
+ day: z39.string(),
1419
1448
  /** Deployment that made the call — 'production', 'staging', 'pr-123', 'development'. */
1420
- environment: z38.string(),
1421
- feature: z38.string(),
1422
- model: z38.string(),
1423
- provider: z38.string(),
1449
+ environment: z39.string(),
1450
+ feature: z39.string(),
1451
+ model: z39.string(),
1452
+ provider: z39.string(),
1424
1453
  /** Masked tail of the key actually billed, or null when unknown/non-Google. */
1425
- keyFingerprint: z38.string().nullable(),
1454
+ keyFingerprint: z39.string().nullable(),
1426
1455
  /**
1427
1456
  * The space the call served, or null when it served none.
1428
1457
  *
@@ -1431,91 +1460,91 @@ var LlmUsageDailySchema = z38.object({
1431
1460
  * report that share rather than dropping it, or a per-space total reads as
1432
1461
  * the platform total.
1433
1462
  */
1434
- spaceId: z38.string().nullable(),
1463
+ spaceId: z39.string().nullable(),
1435
1464
  /**
1436
1465
  * The surface of the session the call served (`sessions.surface`), or null
1437
1466
  * when it served no session or the session predates surface recording.
1438
1467
  * `automation` is the eval harness — the signal that files an ordinary
1439
1468
  * `agent-turn` as testing spend rather than as a visitor's.
1440
1469
  */
1441
- surface: z38.string().nullable(),
1442
- inputTokens: z38.number(),
1443
- outputTokens: z38.number(),
1470
+ surface: z39.string().nullable(),
1471
+ inputTokens: z39.number(),
1472
+ outputTokens: z39.number(),
1444
1473
  /** Subset of inputTokens, never additional to it. */
1445
- cachedInputTokens: z38.number(),
1446
- reasoningTokens: z38.number(),
1447
- callCount: z38.number(),
1448
- errorCount: z38.number(),
1449
- estimatedCostUsd: z38.number().nullable()
1450
- });
1451
- var LlmUsageBySessionSchema = z38.object({
1452
- sessionId: z38.string(),
1453
- environment: z38.string(),
1454
- model: z38.string(),
1474
+ cachedInputTokens: z39.number(),
1475
+ reasoningTokens: z39.number(),
1476
+ callCount: z39.number(),
1477
+ errorCount: z39.number(),
1478
+ estimatedCostUsd: z39.number().nullable()
1479
+ });
1480
+ var LlmUsageBySessionSchema = z39.object({
1481
+ sessionId: z39.string(),
1482
+ environment: z39.string(),
1483
+ model: z39.string(),
1455
1484
  /** The space this session belongs to, or null for a session with no space. */
1456
- spaceId: z38.string().nullable(),
1485
+ spaceId: z39.string().nullable(),
1457
1486
  /** The session's surface — see `LlmUsageDailySchema.surface`. */
1458
- surface: z38.string().nullable(),
1487
+ surface: z39.string().nullable(),
1459
1488
  /** Label only — the first feature seen in the session. */
1460
- firstFeature: z38.string(),
1461
- startedAt: z38.string(),
1462
- endedAt: z38.string(),
1463
- inputTokens: z38.number(),
1464
- outputTokens: z38.number(),
1465
- cachedInputTokens: z38.number(),
1466
- reasoningTokens: z38.number(),
1467
- callCount: z38.number(),
1468
- errorCount: z38.number(),
1489
+ firstFeature: z39.string(),
1490
+ startedAt: z39.string(),
1491
+ endedAt: z39.string(),
1492
+ inputTokens: z39.number(),
1493
+ outputTokens: z39.number(),
1494
+ cachedInputTokens: z39.number(),
1495
+ reasoningTokens: z39.number(),
1496
+ callCount: z39.number(),
1497
+ errorCount: z39.number(),
1469
1498
  /** Priced server-side, like the daily rollup — the browser never carries a
1470
1499
  * rate table, so there is exactly one place a price can be wrong. Null when
1471
1500
  * the model is unpriced; never 0, which would read as free. */
1472
- estimatedCostUsd: z38.number().nullable()
1501
+ estimatedCostUsd: z39.number().nullable()
1473
1502
  });
1474
- var LlmSessionsDailySchema = z38.object({
1475
- day: z38.string(),
1476
- environment: z38.string(),
1477
- sessionCount: z38.number()
1503
+ var LlmSessionsDailySchema = z39.object({
1504
+ day: z39.string(),
1505
+ environment: z39.string(),
1506
+ sessionCount: z39.number()
1478
1507
  });
1479
1508
 
1480
1509
  // ../spacestation/src/space/session-queue.ts
1481
- import { z as z40 } from "zod";
1510
+ import { z as z41 } from "zod";
1482
1511
 
1483
1512
  // ../spacestation/src/space/session-activity.ts
1484
- import { z as z39 } from "zod";
1485
- var SessionActivityEventSchema = z39.object({
1486
- id: z39.string(),
1487
- kind: z39.string(),
1488
- occurredAt: z39.string(),
1489
- source: z39.string(),
1490
- surface: z39.string(),
1491
- payload: z39.record(z39.unknown())
1492
- });
1493
- var SessionActivitySchema = z39.object({
1494
- events: z39.array(SessionActivityEventSchema),
1495
- hasMore: z39.boolean()
1513
+ import { z as z40 } from "zod";
1514
+ var SessionActivityEventSchema = z40.object({
1515
+ id: z40.string(),
1516
+ kind: z40.string(),
1517
+ occurredAt: z40.string(),
1518
+ source: z40.string(),
1519
+ surface: z40.string(),
1520
+ payload: z40.record(z40.unknown())
1521
+ });
1522
+ var SessionActivitySchema = z40.object({
1523
+ events: z40.array(SessionActivityEventSchema),
1524
+ hasMore: z40.boolean()
1496
1525
  });
1497
1526
 
1498
1527
  // ../spacestation/src/space/session-queue.ts
1499
- var SessionVerdictSchema = z40.enum(["unreviewed", "viewed", "bug"]);
1500
- var RecordableVerdictSchema = z40.enum(["viewed", "bug"]);
1501
- var SessionReviewEventSchema = z40.object({
1502
- id: z40.string().uuid(),
1528
+ var SessionVerdictSchema = z41.enum(["unreviewed", "viewed", "bug"]);
1529
+ var RecordableVerdictSchema = z41.enum(["viewed", "bug"]);
1530
+ var SessionReviewEventSchema = z41.object({
1531
+ id: z41.string().uuid(),
1503
1532
  verdict: RecordableVerdictSchema,
1504
1533
  /** Account email of the operator who judged it. Attribution is the reason the
1505
1534
  * log is append-only rather than a mutable current-state row. */
1506
- reviewer: z40.string(),
1507
- note: z40.string().nullable(),
1508
- createdAt: z40.string()
1535
+ reviewer: z41.string(),
1536
+ note: z41.string().nullable(),
1537
+ createdAt: z41.string()
1509
1538
  });
1510
- var BugSeveritySchema = z40.enum(["high", "medium", "low"]);
1511
- var BugLocationSchema = z40.object({
1512
- elementId: z40.string().nullable(),
1539
+ var BugSeveritySchema = z41.enum(["high", "medium", "low"]);
1540
+ var BugLocationSchema = z41.object({
1541
+ elementId: z41.string().nullable(),
1513
1542
  /** Display only — the catalog component type, e.g. "productGrid". Null
1514
1543
  * alongside a null `elementId`. */
1515
- elementType: z40.string().nullable(),
1544
+ elementType: z41.string().nullable(),
1516
1545
  /** Fraction of the ELEMENT's own box. Null for a page anchor. */
1517
- offsetXPct: z40.number().min(0).max(100).nullable(),
1518
- offsetYPct: z40.number().min(0).max(100).nullable(),
1546
+ offsetXPct: z41.number().min(0).max(100).nullable(),
1547
+ offsetYPct: z41.number().min(0).max(100).nullable(),
1519
1548
  /**
1520
1549
  * ABSOLUTE document pixels, for a pin with no element under it. Null for an
1521
1550
  * element anchor.
@@ -1526,8 +1555,8 @@ var BugLocationSchema = z40.object({
1526
1555
  * on the page with it. Measured before this was fixed: growing the page 9%
1527
1556
  * slid a pin 32px, so a pin ran away from the cursor reaching for it.
1528
1557
  */
1529
- pageX: z40.number().nullable(),
1530
- pageY: z40.number().nullable()
1558
+ pageX: z41.number().nullable(),
1559
+ pageY: z41.number().nullable()
1531
1560
  }).refine(
1532
1561
  (loc) => {
1533
1562
  const hasOffsets = loc.offsetXPct !== null && loc.offsetYPct !== null;
@@ -1541,24 +1570,24 @@ var BugLocationSchema = z40.object({
1541
1570
  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)"
1542
1571
  }
1543
1572
  );
1544
- var SessionBugSchema = z40.object({
1545
- id: z40.string().uuid(),
1573
+ var SessionBugSchema = z41.object({
1574
+ id: z41.string().uuid(),
1546
1575
  /** 1-based turn the fault was observed on; null when the fault is session-wide. */
1547
- turnIndex: z40.number().int().nullable(),
1576
+ turnIndex: z41.number().int().nullable(),
1548
1577
  /** Where on that turn's canvas the pin was dropped; null for a bug filed
1549
1578
  * without pinning a spot. */
1550
1579
  location: BugLocationSchema.nullable(),
1551
- provider: z40.string(),
1552
- issueKey: z40.string().nullable(),
1553
- issueUrl: z40.string().nullable(),
1580
+ provider: z41.string(),
1581
+ issueKey: z41.string().nullable(),
1582
+ issueUrl: z41.string().nullable(),
1554
1583
  /** The tracker's own state word ('Todo', 'Done', …) — their vocabulary, so
1555
1584
  * open text. Null until first synced. */
1556
- issueState: z40.string().nullable(),
1557
- title: z40.string(),
1558
- body: z40.string(),
1585
+ issueState: z41.string().nullable(),
1586
+ title: z41.string(),
1587
+ body: z41.string(),
1559
1588
  severity: BugSeveritySchema,
1560
- createdBy: z40.string(),
1561
- createdAt: z40.string(),
1589
+ createdBy: z41.string(),
1590
+ createdAt: z41.string(),
1562
1591
  /**
1563
1592
  * When this bug was resolved from the console; null means still OPEN.
1564
1593
  *
@@ -1567,55 +1596,55 @@ var SessionBugSchema = z40.object({
1567
1596
  * whether a particular fault is still live. The timestamp IS the state, so
1568
1597
  * no boolean can contradict it.
1569
1598
  */
1570
- resolvedAt: z40.string().nullable(),
1571
- resolvedBy: z40.string().nullable()
1599
+ resolvedAt: z41.string().nullable(),
1600
+ resolvedBy: z41.string().nullable()
1572
1601
  });
1573
- var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z40.string() });
1574
- var SessionCommentSchema = z40.object({
1575
- id: z40.string().uuid(),
1602
+ var SpaceBugSchema = SessionBugSchema.extend({ sessionId: z41.string() });
1603
+ var SessionCommentSchema = z41.object({
1604
+ id: z41.string().uuid(),
1576
1605
  /** Set = a reply in that bug's thread. Null = a standalone comment pin. */
1577
- bugId: z40.string().uuid().nullable(),
1606
+ bugId: z41.string().uuid().nullable(),
1578
1607
  /** 1-based turn the comment was left on; null for a reply (it reads its
1579
1608
  * parent bug's turn). */
1580
- turnIndex: z40.number().int().nullable(),
1609
+ turnIndex: z41.number().int().nullable(),
1581
1610
  /** The canvas anchor for a STANDALONE comment's own pin; null for a reply. */
1582
1611
  location: BugLocationSchema.nullable(),
1583
- body: z40.string(),
1584
- createdBy: z40.string(),
1585
- createdAt: z40.string()
1612
+ body: z41.string(),
1613
+ createdBy: z41.string(),
1614
+ createdAt: z41.string()
1586
1615
  });
1587
- var CreateCommentInputSchema = z40.object({
1588
- bugId: z40.string().uuid().nullable(),
1589
- turnIndex: z40.number().int().positive().nullable(),
1616
+ var CreateCommentInputSchema = z41.object({
1617
+ bugId: z41.string().uuid().nullable(),
1618
+ turnIndex: z41.number().int().positive().nullable(),
1590
1619
  location: BugLocationSchema.nullable(),
1591
1620
  // Trimmed, so whitespace is not content: `.min(1)` alone accepted a comment
1592
1621
  // of three spaces, which renders as an empty bubble nobody can interpret.
1593
- body: z40.string().trim().min(1)
1622
+ body: z41.string().trim().min(1)
1594
1623
  }).refine((input) => input.bugId === null !== (input.location === null), {
1595
1624
  message: "a comment is either a reply (bugId, no location) or a standalone pin (location, no bugId)"
1596
1625
  });
1597
- var UpdateCommentInputSchema = z40.object({
1598
- body: z40.string().trim().min(1).optional(),
1599
- bugId: z40.string().uuid().nullable().optional(),
1626
+ var UpdateCommentInputSchema = z41.object({
1627
+ body: z41.string().trim().min(1).optional(),
1628
+ bugId: z41.string().uuid().nullable().optional(),
1600
1629
  location: BugLocationSchema.nullable().optional()
1601
1630
  });
1602
- var SessionFormFactorSchema = z40.enum(["mobile", "desktop"]).nullable();
1603
- var SessionSummarySchema = z40.object({
1604
- sessionId: z40.string(),
1631
+ var SessionFormFactorSchema = z41.enum(["mobile", "desktop"]).nullable();
1632
+ var SessionSummarySchema = z41.object({
1633
+ sessionId: z41.string(),
1605
1634
  /** Stable per-browser id — the join key across a visitor's sessions. Null when
1606
1635
  * the session row is gone (pruned) or predates the `sessions` table. */
1607
- visitorId: z40.string().nullable(),
1636
+ visitorId: z41.string().nullable(),
1608
1637
  /** Provider-qualified identity anchor, present only once the visitor
1609
1638
  * identified themselves. Both null together means "not identified yet". */
1610
- identityProvider: z40.string().nullable(),
1611
- identityKey: z40.string().nullable(),
1639
+ identityProvider: z41.string().nullable(),
1640
+ identityKey: z41.string().nullable(),
1612
1641
  /** Team/test traffic. The queue hides these by default. */
1613
- isInternal: z40.boolean(),
1642
+ isInternal: z41.boolean(),
1614
1643
  /** Build that served the session. Null = not captured; a version filter must
1615
1644
  * therefore EXCLUDE it rather than let it match an arbitrary bucket. */
1616
- clientVersion: z40.string().nullable(),
1645
+ clientVersion: z41.string().nullable(),
1617
1646
  /** Commit-shaped interaction signals, counted, keyed by open `SignalType`. */
1618
- signalCounts: z40.record(z40.number()),
1647
+ signalCounts: z41.record(z41.number()),
1619
1648
  /**
1620
1649
  * Did this conversation ACQUIRE anything, and how many times?
1621
1650
  *
@@ -1632,7 +1661,7 @@ var SessionSummarySchema = z40.object({
1632
1661
  * predates the column — and renders as no mark at all. It never means zero:
1633
1662
  * zero is a real, recorded answer and the rail reports it as one.
1634
1663
  */
1635
- conversionAttempts: z40.number().int().nullable(),
1664
+ conversionAttempts: z41.number().int().nullable(),
1636
1665
  /**
1637
1666
  * The same attempts split by EVENT KIND, keyed by the kind's own name
1638
1667
  * (`commerce.cart_line_added`, `commerce.registry_clicked`), counted distinct
@@ -1648,7 +1677,7 @@ var SessionSummarySchema = z40.object({
1648
1677
  * kinds together, and one attempt id appearing under both would be counted
1649
1678
  * once there and twice here.
1650
1679
  */
1651
- conversionKinds: z40.record(z40.number()),
1680
+ conversionKinds: z41.record(z41.number()),
1652
1681
  /**
1653
1682
  * Every analytics funnel step this session reached, in funnel order — the
1654
1683
  * dashboard's own step ids, read by the same per-step predicates, so a queue
@@ -1656,20 +1685,20 @@ var SessionSummarySchema = z40.object({
1656
1685
  * set of strings for the reason `conversionKinds` is: the contract does not
1657
1686
  * learn what a step means. Empty only when read from a pre-column database.
1658
1687
  */
1659
- funnelSteps: z40.array(z40.string()),
1688
+ funnelSteps: z41.array(z41.string()),
1660
1689
  /**
1661
1690
  * The connector's opaque handle for what this session produced in its back
1662
1691
  * office — present only once a checkout actually reached the platform. The
1663
1692
  * console hands it to the back-office link registry; nothing else reads it.
1664
1693
  */
1665
- backOfficeRef: z40.string().nullable(),
1694
+ backOfficeRef: z41.string().nullable(),
1666
1695
  /**
1667
1696
  * The order this session produced, when the connector's back office reported
1668
1697
  * it (`session_orders`): its opaque id and the back office's own name for it.
1669
1698
  * Both null when no order is known — the cart handle above is then the door.
1670
1699
  */
1671
- orderRef: z40.string().nullable(),
1672
- orderLabel: z40.string().nullable(),
1700
+ orderRef: z41.string().nullable(),
1701
+ orderLabel: z41.string().nullable(),
1673
1702
  /**
1674
1703
  * Which shell this session rendered — the one thing about the CAPTURE a list
1675
1704
  * needs.
@@ -1682,12 +1711,12 @@ var SessionSummarySchema = z40.object({
1682
1711
  * on a desktop are not the same session.
1683
1712
  */
1684
1713
  formFactor: SessionFormFactorSchema,
1685
- turnCount: z40.number().int(),
1714
+ turnCount: z41.number().int(),
1686
1715
  /** The visitor's opening message — the single most informative field for
1687
1716
  * deciding whether a session is worth opening, hence the widest column. */
1688
- firstPrompt: z40.string(),
1689
- startedAt: z40.string(),
1690
- lastRunAt: z40.string(),
1717
+ firstPrompt: z41.string(),
1718
+ startedAt: z41.string(),
1719
+ lastRunAt: z41.string(),
1691
1720
  /**
1692
1721
  * The VISITOR's own IANA zone (`America/New_York`), read from their browser
1693
1722
  * at session create — what the two timestamps above should be read in.
@@ -1715,7 +1744,7 @@ var SessionSummarySchema = z40.object({
1715
1744
  * Client-asserted and never validated against a zone table, so every consumer
1716
1745
  * must tolerate an unknown name: `Intl` throws a RangeError on one.
1717
1746
  */
1718
- visitorTimeZone: z40.string().nullable(),
1747
+ visitorTimeZone: z41.string().nullable(),
1719
1748
  /**
1720
1749
  * Mean TIME TO FIRST PATCH, over the turns that recorded one — the first
1721
1750
  * layout op reaching the visitor, and THE latency the project is managed on.
@@ -1723,31 +1752,31 @@ var SessionSummarySchema = z40.object({
1723
1752
  * `totalLatencyMs` carries the chip-gen tail that runs after the visitor is
1724
1753
  * already reading. Null when no turn in the session recorded a patch.
1725
1754
  */
1726
- avgTtftMs: z40.number().int().nullable(),
1755
+ avgTtftMs: z41.number().int().nullable(),
1727
1756
  /** Mean `main_done_ms` — layout + prose complete. Context for the TTFT, not
1728
1757
  * a budget: null on sessions older than the mark's recording. */
1729
- avgMainDoneMs: z40.number().int().nullable(),
1758
+ avgMainDoneMs: z41.number().int().nullable(),
1730
1759
  /** Mean `chip_gen_ms` — the pass that runs AFTER mainDone and is out of the
1731
1760
  * budget. On the row only to explain the gap to `totalLatencyMs`. */
1732
- avgChipGenMs: z40.number().int().nullable(),
1733
- totalLatencyMs: z40.number().int(),
1734
- durationMs: z40.number().int(),
1761
+ avgChipGenMs: z41.number().int().nullable(),
1762
+ totalLatencyMs: z41.number().int(),
1763
+ durationMs: z41.number().int(),
1735
1764
  /** Inferred from recent activity — nothing writes a session-end marker. A
1736
1765
  * live session streams and cannot be given a verdict until it ends. */
1737
- isLive: z40.boolean(),
1766
+ isLive: z41.boolean(),
1738
1767
  verdict: SessionVerdictSchema,
1739
- reviewedBy: z40.string().nullable(),
1740
- reviewedAt: z40.string().nullable(),
1768
+ reviewedBy: z41.string().nullable(),
1769
+ reviewedAt: z41.string().nullable(),
1741
1770
  /** Latest filed bug, flattened onto the row so the queue can show its live
1742
1771
  * state without a second request. */
1743
- bugIssueKey: z40.string().nullable(),
1744
- bugIssueUrl: z40.string().nullable(),
1745
- bugIssueState: z40.string().nullable()
1746
- });
1747
- var SessionQueuePageSchema = z40.object({
1748
- sessions: z40.array(SessionSummarySchema),
1749
- totalCount: z40.number().int(),
1750
- hiddenInternalCount: z40.number().int(),
1772
+ bugIssueKey: z41.string().nullable(),
1773
+ bugIssueUrl: z41.string().nullable(),
1774
+ bugIssueState: z41.string().nullable()
1775
+ });
1776
+ var SessionQueuePageSchema = z41.object({
1777
+ sessions: z41.array(SessionSummarySchema),
1778
+ totalCount: z41.number().int(),
1779
+ hiddenInternalCount: z41.number().int(),
1751
1780
  /**
1752
1781
  * Bounced sessions the queue left out — no turn and no add, the default.
1753
1782
  *
@@ -1757,61 +1786,61 @@ var SessionQueuePageSchema = z40.object({
1757
1786
  * `totalCount + hiddenBouncedCount` is that population, and this count is the
1758
1787
  * analytics dashboard's bounce over the same window.
1759
1788
  */
1760
- hiddenBouncedCount: z40.number().int()
1789
+ hiddenBouncedCount: z41.number().int()
1761
1790
  });
1762
- var SessionQueueFacetsSchema = z40.object({
1763
- review: z40.record(z40.number()),
1764
- version: z40.record(z40.number()),
1765
- turns: z40.record(z40.number()),
1766
- durationS: z40.record(z40.number()),
1791
+ var SessionQueueFacetsSchema = z41.object({
1792
+ review: z41.record(z41.number()),
1793
+ version: z41.record(z41.number()),
1794
+ turns: z41.record(z41.number()),
1795
+ durationS: z41.record(z41.number()),
1767
1796
  /** Sessions per funnel step reached — a session counts under every step it reached. */
1768
- funnel: z40.record(z40.number())
1797
+ funnel: z41.record(z41.number())
1769
1798
  });
1770
- var SessionCaptureSchema = z40.object({
1771
- viewportWidth: z40.number().int().nullable(),
1772
- viewportHeight: z40.number().int().nullable(),
1773
- userAgent: z40.string().nullable(),
1774
- locale: z40.string().nullable(),
1799
+ var SessionCaptureSchema = z41.object({
1800
+ viewportWidth: z41.number().int().nullable(),
1801
+ viewportHeight: z41.number().int().nullable(),
1802
+ userAgent: z41.string().nullable(),
1803
+ locale: z41.string().nullable(),
1775
1804
  /** Referrer at session create — separates agentic traffic from organic. */
1776
- referrer: z40.string().nullable()
1805
+ referrer: z41.string().nullable()
1777
1806
  });
1778
- var SessionCaptureInputSchema = z40.object({
1779
- viewportWidth: z40.number().int().positive().max(2e4).optional(),
1780
- viewportHeight: z40.number().int().positive().max(2e4).optional(),
1781
- userAgent: z40.string().max(1e3).optional(),
1782
- locale: z40.string().max(35).optional(),
1807
+ var SessionCaptureInputSchema = z41.object({
1808
+ viewportWidth: z41.number().int().positive().max(2e4).optional(),
1809
+ viewportHeight: z41.number().int().positive().max(2e4).optional(),
1810
+ userAgent: z41.string().max(1e3).optional(),
1811
+ locale: z41.string().max(35).optional(),
1783
1812
  /** IANA zone name from the visitor's browser. Bounded rather than validated:
1784
1813
  * the zone database grows, and refusing a name this build has not heard of
1785
1814
  * would drop a real session's capture over a table that is out of date. */
1786
- timeZone: z40.string().max(64).optional(),
1787
- referrer: z40.string().max(2048).optional(),
1788
- clientVersion: z40.string().max(100).optional(),
1789
- isInternal: z40.boolean().optional()
1815
+ timeZone: z41.string().max(64).optional(),
1816
+ referrer: z41.string().max(2048).optional(),
1817
+ clientVersion: z41.string().max(100).optional(),
1818
+ isInternal: z41.boolean().optional()
1790
1819
  });
1791
- var SessionDetailSchema = z40.object({
1820
+ var SessionDetailSchema = z41.object({
1792
1821
  session: SessionSummarySchema,
1793
1822
  capture: SessionCaptureSchema,
1794
1823
  /** Full verdict history, newest first. Verdicts are revisable, and a session
1795
1824
  * re-judged after a fix is the evidence the fix worked. */
1796
- reviews: z40.array(SessionReviewEventSchema),
1797
- bugs: z40.array(SessionBugSchema),
1798
- comments: z40.array(SessionCommentSchema),
1825
+ reviews: z41.array(SessionReviewEventSchema),
1826
+ bugs: z41.array(SessionBugSchema),
1827
+ comments: z41.array(SessionCommentSchema),
1799
1828
  /** Optional during API/console rolling deployment. Absent is unavailable,
1800
1829
  * not evidence of zero visitor activity. */
1801
1830
  activity: SessionActivitySchema.optional()
1802
1831
  });
1803
- var RecordVerdictInputSchema = z40.object({
1832
+ var RecordVerdictInputSchema = z41.object({
1804
1833
  verdict: RecordableVerdictSchema,
1805
- note: z40.string().max(2e3).optional()
1834
+ note: z41.string().max(2e3).optional()
1806
1835
  });
1807
- var FileBugInputSchema = z40.object({
1808
- turnIndex: z40.number().int().positive().nullable(),
1836
+ var FileBugInputSchema = z41.object({
1837
+ turnIndex: z41.number().int().positive().nullable(),
1809
1838
  /** Optional — a bug filed without dropping a pin has no location. */
1810
1839
  location: BugLocationSchema.nullable().optional(),
1811
- title: z40.string().min(1).max(300),
1812
- body: z40.string().min(1),
1840
+ title: z41.string().min(1).max(300),
1841
+ body: z41.string().min(1),
1813
1842
  severity: BugSeveritySchema,
1814
- payload: z40.record(z40.unknown())
1843
+ payload: z41.record(z41.unknown())
1815
1844
  });
1816
1845
  export {
1817
1846
  EMPTY_SPEC,