@cloudhal/core-contracts 0.3.13 → 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.
@@ -146,10 +146,11 @@ export declare const SiteSchema: {
146
146
  };
147
147
  readonly collections: {
148
148
  readonly type: "object";
149
- readonly description: "RFC-0038: per-collection settings, keyed by collection (ContentEntry.collection). A collection without an entry here uses the defaults.";
149
+ readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
150
150
  readonly propertyNames: {
151
151
  readonly $ref: "#/$defs/Slug";
152
152
  };
153
+ readonly maxProperties: 50;
153
154
  readonly additionalProperties: {
154
155
  readonly $ref: "#/$defs/CollectionSettings";
155
156
  };
@@ -451,6 +452,27 @@ export declare const SiteSchema: {
451
452
  };
452
453
  };
453
454
  };
455
+ readonly CollectionLabel: {
456
+ readonly type: "object";
457
+ readonly additionalProperties: false;
458
+ readonly required: readonly ["singular", "plural"];
459
+ readonly properties: {
460
+ readonly singular: {
461
+ readonly type: "string";
462
+ readonly minLength: 1;
463
+ readonly maxLength: 100;
464
+ };
465
+ readonly plural: {
466
+ readonly type: "string";
467
+ readonly minLength: 1;
468
+ readonly maxLength: 100;
469
+ };
470
+ readonly description: {
471
+ readonly type: "string";
472
+ readonly maxLength: 1000;
473
+ };
474
+ };
475
+ };
454
476
  readonly CollectionSettings: {
455
477
  readonly type: "object";
456
478
  readonly additionalProperties: false;
@@ -460,6 +482,45 @@ export declare const SiteSchema: {
460
482
  readonly description: "RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.";
461
483
  readonly pattern: "^(/[a-z0-9]+(-[a-z0-9]+)*)+/\\{slug\\}$";
462
484
  };
485
+ readonly labels: {
486
+ readonly type: "object";
487
+ readonly description: "RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.";
488
+ readonly propertyNames: {
489
+ readonly $ref: "#/$defs/Locale";
490
+ };
491
+ readonly minProperties: 1;
492
+ readonly additionalProperties: {
493
+ readonly $ref: "#/$defs/CollectionLabel";
494
+ };
495
+ };
496
+ readonly icon: {
497
+ readonly type: "string";
498
+ readonly description: "RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.";
499
+ readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
500
+ readonly maxLength: 40;
501
+ };
502
+ readonly feed: {
503
+ readonly type: "boolean";
504
+ readonly description: "RFC-0040: entries appear in the site's RSS feeds. Absent: true.";
505
+ };
506
+ readonly sitemap: {
507
+ readonly type: "boolean";
508
+ readonly description: "RFC-0040: published entries appear in sitemap.xml. Absent: true.";
509
+ };
510
+ readonly sort: {
511
+ readonly type: "string";
512
+ readonly description: "RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.";
513
+ readonly enum: readonly ["newest", "oldest", "title"];
514
+ };
515
+ readonly fields: {
516
+ readonly type: "array";
517
+ readonly description: "RFC-0041: the collection's typed custom fields, in form order. Values live in ContentEntry.fields under each key. At most 200 per site and unique keys (checked in code).";
518
+ readonly minItems: 1;
519
+ readonly maxItems: 30;
520
+ readonly items: {
521
+ readonly $ref: "#/$defs/FieldDefinition";
522
+ };
523
+ };
463
524
  };
464
525
  };
465
526
  readonly Consent: {
@@ -504,612 +565,426 @@ export declare const SiteSchema: {
504
565
  };
505
566
  };
506
567
  };
507
- readonly FooterColumn: {
508
- readonly type: "object";
509
- readonly additionalProperties: false;
510
- readonly required: readonly ["heading", "menu"];
511
- readonly properties: {
512
- readonly heading: {
513
- readonly type: "string";
514
- readonly minLength: 1;
515
- readonly maxLength: 60;
516
- };
517
- readonly menu: {
518
- readonly $ref: "#/$defs/Slug";
519
- readonly description: "A menu key (RFC-0003).";
520
- };
521
- };
522
- };
523
- readonly HeaderAction: {
524
- readonly type: "object";
525
- readonly additionalProperties: false;
526
- readonly required: readonly ["kind"];
527
- readonly properties: {
528
- readonly kind: {
529
- readonly type: "string";
530
- readonly enum: readonly ["button", "search", "locale", "theme-toggle", "motion-toggle"];
531
- };
532
- readonly label: {
533
- readonly type: "string";
534
- readonly minLength: 1;
535
- readonly maxLength: 40;
536
- };
537
- readonly href: {
538
- readonly type: "string";
539
- readonly minLength: 1;
540
- readonly maxLength: 2048;
541
- };
542
- readonly variant: {
543
- readonly type: "string";
544
- readonly enum: readonly ["primary", "secondary"];
545
- };
546
- };
547
- };
548
- readonly Id: {
549
- readonly type: "string";
550
- readonly description: "Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles.";
551
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
552
- readonly minLength: 8;
553
- readonly maxLength: 48;
554
- };
555
- readonly ImageRef: {
556
- readonly type: "object";
557
- readonly description: "Reference to an image. With `assetId` the image is an Asset node (RFC-0004): the store writes its media URL into `src`, and its size into `width` and `height`, as a fallback for readers that do not resolve assets. Without it, `src` is a relative path or an absolute URL, as before.";
558
- readonly additionalProperties: false;
559
- readonly required: readonly ["src", "alt"];
560
- readonly properties: {
561
- readonly assetId: {
562
- readonly $ref: "#/$defs/Id";
563
- readonly description: "The Asset node shown (RFC-0004). Renderers that know assets resolve it and ignore `src`.";
564
- };
565
- readonly src: {
566
- readonly type: "string";
567
- readonly minLength: 1;
568
- readonly maxLength: 2048;
569
- };
570
- readonly alt: {
571
- readonly type: "string";
572
- readonly maxLength: 500;
573
- };
574
- readonly width: {
575
- readonly type: "integer";
576
- readonly minimum: 1;
577
- };
578
- readonly height: {
579
- readonly type: "integer";
580
- readonly minimum: 1;
581
- };
582
- };
583
- };
584
- readonly Link: {
585
- readonly type: "object";
586
- readonly additionalProperties: false;
587
- readonly required: readonly ["label", "href"];
588
- readonly properties: {
589
- readonly label: {
590
- readonly type: "string";
591
- readonly minLength: 1;
592
- readonly maxLength: 200;
593
- };
594
- readonly href: {
595
- readonly type: "string";
596
- readonly minLength: 1;
597
- readonly maxLength: 2048;
598
- };
599
- readonly external: {
600
- readonly type: "boolean";
601
- };
602
- };
603
- };
604
- readonly Locale: {
605
- readonly type: "string";
606
- readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
607
- readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
608
- };
609
- readonly Localization: {
610
- readonly type: "object";
611
- readonly description: "How the site serves its locales (RFC-0033 §2). Absent fields mean: prefix-except-default routing, no fallback, no required review, the machine-translation notice until reviewed.";
612
- readonly additionalProperties: false;
613
- readonly properties: {
614
- readonly routing: {
615
- readonly type: "string";
616
- readonly description: "prefix-except-default: the default locale at the root, the others under /<locale>/. prefix-all: every locale prefixed, / is a language chooser (x-default).";
617
- readonly enum: readonly ["prefix-except-default", "prefix-all"];
618
- };
619
- readonly domains: {
620
- readonly type: "object";
621
- readonly description: "Optional hostname per locale; that locale is then served at the host's root.";
622
- readonly propertyNames: {
623
- readonly $ref: "#/$defs/Locale";
624
- };
625
- readonly additionalProperties: {
626
- readonly type: "string";
627
- readonly pattern: "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$";
628
- readonly maxLength: 253;
629
- };
630
- };
631
- readonly fallback: {
632
- readonly type: "string";
633
- readonly description: "none: a missing translation is not found. default-with-notice: the default locale's page is served with a notice and noindex.";
634
- readonly enum: readonly ["none", "default-with-notice"];
635
- };
636
- readonly review: {
637
- readonly type: "object";
638
- readonly description: "Collections whose machine translations need a person's review before they publish ('pages' stands for pages).";
639
- readonly additionalProperties: false;
640
- readonly properties: {
641
- readonly required: {
642
- readonly type: "array";
643
- readonly items: {
644
- readonly type: "string";
645
- readonly minLength: 1;
646
- readonly maxLength: 100;
647
- };
648
- readonly uniqueItems: true;
649
- };
650
- };
651
- };
652
- readonly label: {
653
- readonly type: "string";
654
- readonly description: "When readers see the machine-translation notice: unreviewed (until a person reviews) or always.";
655
- readonly enum: readonly ["unreviewed", "always"];
656
- };
657
- };
658
- };
659
- readonly Metadata: {
660
- readonly type: "object";
661
- readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
662
- readonly additionalProperties: {
663
- readonly type: "string";
664
- };
665
- };
666
- readonly Path: {
667
- readonly type: "string";
668
- readonly description: "Absolute URL path of a route the site owns: starts with '/', lower-case slug segments, no trailing slash except root.";
669
- readonly pattern: "^/(?:[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$";
670
- readonly maxLength: 1024;
671
- };
672
- readonly Revision: {
673
- readonly type: "integer";
674
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
675
- readonly minimum: 0;
676
- };
677
- readonly SchemaVersion: {
678
- readonly type: "integer";
679
- readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
680
- readonly enum: readonly [1];
681
- };
682
- readonly Section: {
683
- readonly title: "Section";
684
- readonly description: "A block inside a page, discriminated by `kind`. Variants are written inline (not via $ref) and `kind` is a single-value string enum so that TypeScript gets a literal union and Rust gets a serde internally-tagged enum.";
568
+ readonly FieldDefinition: {
569
+ readonly description: "RFC-0041: one typed custom field of a collection, discriminated by `type`.";
685
570
  readonly oneOf: readonly [{
571
+ readonly title: "TextField";
686
572
  readonly type: "object";
687
- readonly title: "HeroSection";
573
+ readonly description: "Plain text: a string of at most maxLength characters.";
688
574
  readonly additionalProperties: false;
689
- readonly required: readonly ["id", "kind", "heading"];
575
+ readonly required: readonly ["key", "type", "labels", "localized"];
690
576
  readonly properties: {
691
- readonly id: {
692
- readonly $ref: "#/$defs/Id";
577
+ readonly key: {
578
+ readonly $ref: "#/$defs/FieldKey";
693
579
  };
694
- readonly kind: {
580
+ readonly type: {
695
581
  readonly type: "string";
696
- readonly enum: readonly ["hero"];
582
+ readonly enum: readonly ["text"];
697
583
  };
698
- readonly heading: {
699
- readonly type: "string";
700
- readonly minLength: 1;
701
- readonly maxLength: 300;
584
+ readonly labels: {
585
+ readonly $ref: "#/$defs/FieldLabels";
702
586
  };
703
- readonly subheading: {
704
- readonly type: "string";
705
- readonly maxLength: 1000;
587
+ readonly localized: {
588
+ readonly type: "boolean";
589
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
706
590
  };
707
- readonly image: {
708
- readonly $ref: "#/$defs/ImageRef";
591
+ readonly requiredToPublish: {
592
+ readonly type: "boolean";
593
+ readonly description: "An entry in review or published needs a value. Absent: false.";
709
594
  };
710
- readonly cta: {
711
- readonly $ref: "#/$defs/Link";
595
+ readonly migration: {
596
+ readonly $ref: "#/$defs/FieldMigration";
597
+ };
598
+ readonly maxLength: {
599
+ readonly type: "integer";
600
+ readonly description: "Absent: 5000.";
601
+ readonly minimum: 1;
602
+ readonly maximum: 5000;
603
+ };
604
+ readonly multiline: {
605
+ readonly type: "boolean";
606
+ readonly description: "Line breaks allowed. Absent: false.";
607
+ };
608
+ readonly searchable: {
609
+ readonly type: "boolean";
610
+ readonly description: "Its words go into site search. Absent: false.";
712
611
  };
713
612
  };
714
613
  }, {
614
+ readonly title: "RichTextField";
715
615
  readonly type: "object";
716
- readonly title: "RichTextSection";
616
+ readonly description: "Cloudhal Markdown v1 (ADR-0028), at most 50 000 characters.";
717
617
  readonly additionalProperties: false;
718
- readonly required: readonly ["id", "kind", "format", "body"];
618
+ readonly required: readonly ["key", "type", "labels", "localized"];
719
619
  readonly properties: {
720
- readonly id: {
721
- readonly $ref: "#/$defs/Id";
620
+ readonly key: {
621
+ readonly $ref: "#/$defs/FieldKey";
722
622
  };
723
- readonly kind: {
623
+ readonly type: {
724
624
  readonly type: "string";
725
625
  readonly enum: readonly ["richText"];
726
626
  };
727
- readonly format: {
728
- readonly type: "string";
729
- readonly enum: readonly ["markdown", "html"];
627
+ readonly labels: {
628
+ readonly $ref: "#/$defs/FieldLabels";
730
629
  };
731
- readonly body: {
732
- readonly type: "string";
733
- readonly maxLength: 200000;
630
+ readonly localized: {
631
+ readonly type: "boolean";
632
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
734
633
  };
735
- readonly profile: {
736
- readonly $ref: "#/$defs/BodyProfile";
634
+ readonly requiredToPublish: {
635
+ readonly type: "boolean";
636
+ readonly description: "An entry in review or published needs a value. Absent: false.";
737
637
  };
738
- readonly blocks: {
739
- readonly $ref: "#/$defs/BodyBlocks";
638
+ readonly migration: {
639
+ readonly $ref: "#/$defs/FieldMigration";
640
+ };
641
+ readonly searchable: {
642
+ readonly type: "boolean";
643
+ readonly description: "Its words go into site search. Absent: false.";
740
644
  };
741
645
  };
742
646
  }, {
647
+ readonly title: "NumberField";
743
648
  readonly type: "object";
744
- readonly title: "ImageSection";
649
+ readonly description: "A finite number.";
745
650
  readonly additionalProperties: false;
746
- readonly required: readonly ["id", "kind", "image"];
651
+ readonly required: readonly ["key", "type", "labels", "localized"];
747
652
  readonly properties: {
748
- readonly id: {
749
- readonly $ref: "#/$defs/Id";
653
+ readonly key: {
654
+ readonly $ref: "#/$defs/FieldKey";
750
655
  };
751
- readonly kind: {
656
+ readonly type: {
752
657
  readonly type: "string";
753
- readonly enum: readonly ["image"];
658
+ readonly enum: readonly ["number"];
754
659
  };
755
- readonly image: {
756
- readonly $ref: "#/$defs/ImageRef";
660
+ readonly labels: {
661
+ readonly $ref: "#/$defs/FieldLabels";
757
662
  };
758
- readonly caption: {
759
- readonly type: "string";
760
- readonly maxLength: 1000;
663
+ readonly localized: {
664
+ readonly type: "boolean";
665
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
666
+ };
667
+ readonly requiredToPublish: {
668
+ readonly type: "boolean";
669
+ readonly description: "An entry in review or published needs a value. Absent: false.";
670
+ };
671
+ readonly migration: {
672
+ readonly $ref: "#/$defs/FieldMigration";
673
+ };
674
+ readonly integer: {
675
+ readonly type: "boolean";
676
+ readonly description: "Whole numbers only. Absent: false.";
677
+ };
678
+ readonly minimum: {
679
+ readonly type: "number";
680
+ };
681
+ readonly maximum: {
682
+ readonly type: "number";
761
683
  };
762
684
  };
763
685
  }, {
686
+ readonly title: "BooleanField";
764
687
  readonly type: "object";
765
- readonly title: "ContentListSection";
766
- readonly description: "Renders the newest entries of a content collection (e.g. blog posts).";
688
+ readonly description: "true or false; absent reads as false, so it cannot be required to publish.";
767
689
  readonly additionalProperties: false;
768
- readonly required: readonly ["id", "kind", "collection", "limit", "sort"];
690
+ readonly required: readonly ["key", "type", "labels", "localized"];
769
691
  readonly properties: {
770
- readonly id: {
771
- readonly $ref: "#/$defs/Id";
692
+ readonly key: {
693
+ readonly $ref: "#/$defs/FieldKey";
772
694
  };
773
- readonly kind: {
695
+ readonly type: {
774
696
  readonly type: "string";
775
- readonly enum: readonly ["contentList"];
697
+ readonly enum: readonly ["boolean"];
776
698
  };
777
- readonly collection: {
778
- readonly $ref: "#/$defs/Slug";
699
+ readonly labels: {
700
+ readonly $ref: "#/$defs/FieldLabels";
779
701
  };
780
- readonly limit: {
781
- readonly type: "integer";
782
- readonly minimum: 1;
783
- readonly maximum: 100;
702
+ readonly localized: {
703
+ readonly type: "boolean";
704
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
784
705
  };
785
- readonly sort: {
786
- readonly type: "string";
787
- readonly enum: readonly ["newest", "oldest", "title"];
706
+ readonly migration: {
707
+ readonly $ref: "#/$defs/FieldMigration";
788
708
  };
789
- readonly filter: {
709
+ };
710
+ }, {
711
+ readonly title: "DateField";
712
+ readonly type: "object";
713
+ readonly description: "A calendar day without a zone (YYYY-MM-DD).";
714
+ readonly additionalProperties: false;
715
+ readonly required: readonly ["key", "type", "labels", "localized"];
716
+ readonly properties: {
717
+ readonly key: {
718
+ readonly $ref: "#/$defs/FieldKey";
719
+ };
720
+ readonly type: {
790
721
  readonly type: "string";
791
- readonly description: "Filter expression over term assignments (RFC-0002), e.g. 'category:news+tag:ai' or 'category:news>*'.";
792
- readonly minLength: 1;
793
- readonly maxLength: 512;
722
+ readonly enum: readonly ["date"];
723
+ };
724
+ readonly labels: {
725
+ readonly $ref: "#/$defs/FieldLabels";
726
+ };
727
+ readonly localized: {
728
+ readonly type: "boolean";
729
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
730
+ };
731
+ readonly requiredToPublish: {
732
+ readonly type: "boolean";
733
+ readonly description: "An entry in review or published needs a value. Absent: false.";
734
+ };
735
+ readonly migration: {
736
+ readonly $ref: "#/$defs/FieldMigration";
794
737
  };
795
738
  };
796
739
  }, {
740
+ readonly title: "DateTimeField";
797
741
  readonly type: "object";
798
- readonly title: "ComponentSection";
799
- readonly description: "A typed block from the block registry (RFC-0015): `type` names a registered block type (one global namespace of English names), `props` follow that type's props schema, which the store validates.";
742
+ readonly description: "An instant with the zone it was entered in: {at, timeZone} (RFC-0008 §9.1).";
800
743
  readonly additionalProperties: false;
801
- readonly required: readonly ["id", "kind", "type", "props"];
744
+ readonly required: readonly ["key", "type", "labels", "localized"];
802
745
  readonly properties: {
803
- readonly id: {
804
- readonly $ref: "#/$defs/Id";
746
+ readonly key: {
747
+ readonly $ref: "#/$defs/FieldKey";
805
748
  };
806
- readonly kind: {
749
+ readonly type: {
807
750
  readonly type: "string";
808
- readonly enum: readonly ["component"];
751
+ readonly enum: readonly ["datetime"];
752
+ };
753
+ readonly labels: {
754
+ readonly $ref: "#/$defs/FieldLabels";
755
+ };
756
+ readonly localized: {
757
+ readonly type: "boolean";
758
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
759
+ };
760
+ readonly requiredToPublish: {
761
+ readonly type: "boolean";
762
+ readonly description: "An entry in review or published needs a value. Absent: false.";
763
+ };
764
+ readonly migration: {
765
+ readonly $ref: "#/$defs/FieldMigration";
766
+ };
767
+ };
768
+ }, {
769
+ readonly title: "UrlField";
770
+ readonly type: "object";
771
+ readonly description: "A link: https, http, mailto, tel, a site-relative path or a #fragment; at most 2048 characters.";
772
+ readonly additionalProperties: false;
773
+ readonly required: readonly ["key", "type", "labels", "localized"];
774
+ readonly properties: {
775
+ readonly key: {
776
+ readonly $ref: "#/$defs/FieldKey";
809
777
  };
810
778
  readonly type: {
811
779
  readonly type: "string";
812
- readonly pattern: "^[a-z][a-z0-9-]{1,40}$";
780
+ readonly enum: readonly ["url"];
813
781
  };
814
- readonly props: {
815
- readonly type: "object";
816
- readonly description: "Validated against the type's props schema by the store, not by this contract.";
817
- readonly additionalProperties: true;
782
+ readonly labels: {
783
+ readonly $ref: "#/$defs/FieldLabels";
784
+ };
785
+ readonly localized: {
786
+ readonly type: "boolean";
787
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
788
+ };
789
+ readonly requiredToPublish: {
790
+ readonly type: "boolean";
791
+ readonly description: "An entry in review or published needs a value. Absent: false.";
792
+ };
793
+ readonly migration: {
794
+ readonly $ref: "#/$defs/FieldMigration";
818
795
  };
819
796
  };
820
797
  }, {
798
+ readonly title: "ImageField";
821
799
  readonly type: "object";
822
- readonly title: "SurfaceSection";
823
- readonly description: "A generative UI surface (RFC-0020): a flat list of catalog components with a `root`, plus a data model their props may bind to. Written and streamed by agents as data, never code; the store checks the tree, the catalog and the limits.";
800
+ readonly description: "An image Asset of the same site, by id (asset_…).";
824
801
  readonly additionalProperties: false;
825
- readonly required: readonly ["id", "kind", "catalog", "components"];
802
+ readonly required: readonly ["key", "type", "labels", "localized"];
826
803
  readonly properties: {
827
- readonly id: {
828
- readonly $ref: "#/$defs/Id";
804
+ readonly key: {
805
+ readonly $ref: "#/$defs/FieldKey";
829
806
  };
830
- readonly kind: {
807
+ readonly type: {
831
808
  readonly type: "string";
832
- readonly enum: readonly ["surface"];
809
+ readonly enum: readonly ["image"];
833
810
  };
834
- readonly catalog: {
811
+ readonly labels: {
812
+ readonly $ref: "#/$defs/FieldLabels";
813
+ };
814
+ readonly localized: {
815
+ readonly type: "boolean";
816
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
817
+ };
818
+ readonly requiredToPublish: {
819
+ readonly type: "boolean";
820
+ readonly description: "An entry in review or published needs a value. Absent: false.";
821
+ };
822
+ readonly migration: {
823
+ readonly $ref: "#/$defs/FieldMigration";
824
+ };
825
+ };
826
+ }, {
827
+ readonly title: "SelectField";
828
+ readonly type: "object";
829
+ readonly description: "One of a closed list of options, or several when multiple.";
830
+ readonly additionalProperties: false;
831
+ readonly required: readonly ["key", "type", "labels", "localized", "options"];
832
+ readonly properties: {
833
+ readonly key: {
834
+ readonly $ref: "#/$defs/FieldKey";
835
+ };
836
+ readonly type: {
835
837
  readonly type: "string";
836
- readonly description: "The catalog the surface was written for: `<theme>@<major>` (RFC-0018 manifest).";
837
- readonly pattern: "^[a-z][a-z0-9-]{0,40}@[0-9]{1,4}$";
838
+ readonly enum: readonly ["select"];
838
839
  };
839
- readonly components: {
840
+ readonly labels: {
841
+ readonly $ref: "#/$defs/FieldLabels";
842
+ };
843
+ readonly localized: {
844
+ readonly type: "boolean";
845
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
846
+ };
847
+ readonly requiredToPublish: {
848
+ readonly type: "boolean";
849
+ readonly description: "An entry in review or published needs a value. Absent: false.";
850
+ };
851
+ readonly migration: {
852
+ readonly $ref: "#/$defs/FieldMigration";
853
+ };
854
+ readonly options: {
840
855
  readonly type: "array";
841
856
  readonly minItems: 1;
842
- readonly maxItems: 200;
857
+ readonly maxItems: 50;
843
858
  readonly items: {
844
- readonly $ref: "#/$defs/SurfaceComponent";
859
+ readonly $ref: "#/$defs/FieldOption";
845
860
  };
846
861
  };
847
- readonly data: {
848
- readonly type: "object";
849
- readonly description: "The surface's data model: JSON its components bind to with `{path}` (at most 64 KB serialized; the store enforces the size).";
850
- readonly additionalProperties: true;
862
+ readonly multiple: {
863
+ readonly type: "boolean";
864
+ readonly description: "The value is a list of option values. Absent: false.";
851
865
  };
852
866
  };
853
867
  }];
854
868
  };
855
- readonly Slug: {
869
+ readonly FieldKey: {
856
870
  readonly type: "string";
857
- readonly description: "Lower-case URL segment.";
858
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
859
- readonly minLength: 1;
860
- readonly maxLength: 128;
871
+ readonly description: "The field's key in ContentEntry.fields: lower camelCase, a JavaScript identifier. Unique in its collection; built-in entry property names are reserved (checked in code).";
872
+ readonly pattern: "^[a-z][A-Za-z0-9]{0,39}$";
861
873
  };
862
- readonly SocialLink: {
874
+ readonly FieldLabel: {
863
875
  readonly type: "object";
864
876
  readonly additionalProperties: false;
865
- readonly required: readonly ["network", "href"];
877
+ readonly required: readonly ["label"];
866
878
  readonly properties: {
867
- readonly network: {
879
+ readonly label: {
868
880
  readonly type: "string";
869
- readonly enum: readonly ["x", "bluesky", "mastodon", "github", "linkedin", "instagram", "facebook", "youtube", "tiktok", "threads", "rss", "email"];
881
+ readonly minLength: 1;
882
+ readonly maxLength: 100;
870
883
  };
871
- readonly href: {
884
+ readonly help: {
872
885
  readonly type: "string";
873
- readonly minLength: 1;
874
- readonly maxLength: 2048;
886
+ readonly maxLength: 300;
875
887
  };
876
888
  };
877
889
  };
878
- readonly SurfaceComponent: {
890
+ readonly FieldLabels: {
879
891
  readonly type: "object";
880
- readonly description: "One element of a generative UI surface (RFC-0020 §1), in a flat list: `component` names a catalog entry (a PascalCase built-in primitive such as `Stack`, or a registry block type such as `callout`), `children` refer to other ids of the same surface, and `props` follow the entry's schema, which the store checks. Field names follow A2UI v0.9.";
892
+ readonly description: "The field's label and help per locale. Missing a locale: the default locale's, then the key.";
893
+ readonly propertyNames: {
894
+ readonly $ref: "#/$defs/Locale";
895
+ };
896
+ readonly minProperties: 1;
897
+ readonly additionalProperties: {
898
+ readonly $ref: "#/$defs/FieldLabel";
899
+ };
900
+ };
901
+ readonly FieldMigration: {
902
+ readonly type: "object";
903
+ readonly description: "RFC-0041 §6: present only while a field operation rewrites entries.";
881
904
  readonly additionalProperties: false;
882
- readonly required: readonly ["id", "component"];
905
+ readonly required: readonly ["id"];
883
906
  readonly properties: {
884
907
  readonly id: {
885
- readonly $ref: "#/$defs/SurfaceComponentId";
908
+ readonly $ref: "#/$defs/Id";
909
+ readonly description: "The operation's \"before\" snapshot.";
886
910
  };
887
- readonly component: {
888
- readonly type: "string";
889
- readonly pattern: "^(?:[A-Z][A-Za-z0-9]{1,40}|[a-z][a-z0-9-]{1,40})$";
911
+ readonly fromKey: {
912
+ readonly $ref: "#/$defs/FieldKey";
890
913
  };
891
- readonly children: {
892
- readonly type: "array";
893
- readonly maxItems: 200;
894
- readonly items: {
895
- readonly $ref: "#/$defs/SurfaceComponentId";
896
- };
914
+ readonly fromType: {
915
+ readonly type: "string";
916
+ readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select"];
897
917
  };
898
- readonly props: {
899
- readonly type: "object";
900
- readonly description: "Literal values, `{path}` bindings into the surface's data, or `{call}` named functions; validated by the store against the catalog, not by this contract.";
901
- readonly additionalProperties: true;
918
+ readonly fromLocalized: {
919
+ readonly type: "boolean";
902
920
  };
903
- readonly visible: {
904
- readonly type: "object";
905
- readonly description: "A visibility condition over the surface's data (`eq`, `ne`, `gt`, `lt`, `and`, `or`, `not`); validated by the store.";
906
- readonly additionalProperties: true;
921
+ };
922
+ };
923
+ readonly FieldOption: {
924
+ readonly type: "object";
925
+ readonly description: "One option of a select field. Values are unique in the field (checked in code).";
926
+ readonly additionalProperties: false;
927
+ readonly required: readonly ["value", "labels"];
928
+ readonly properties: {
929
+ readonly value: {
930
+ readonly $ref: "#/$defs/Slug";
931
+ readonly description: "Stored in entries, never shown.";
907
932
  };
908
- readonly motion: {
933
+ readonly labels: {
909
934
  readonly type: "object";
910
- readonly description: "Motion presets for this component (RFC-0024 §2): `reveal`, `hover`, `speed`, `delay`, `stagger`, `replay` and later `scroll`, `loop`; enums and clamped numbers only, validated by the store against the catalog. The renderer turns them into CSS; agents never write CSS.";
911
- readonly additionalProperties: true;
935
+ readonly propertyNames: {
936
+ readonly $ref: "#/$defs/Locale";
937
+ };
938
+ readonly minProperties: 1;
939
+ readonly additionalProperties: {
940
+ readonly type: "string";
941
+ readonly minLength: 1;
942
+ readonly maxLength: 100;
943
+ };
912
944
  };
913
945
  };
914
946
  };
915
- readonly SurfaceComponentId: {
916
- readonly type: "string";
917
- readonly description: "A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1).";
918
- readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
919
- };
920
- readonly ThemeRef: {
947
+ readonly FooterColumn: {
921
948
  readonly type: "object";
922
- readonly description: "Theme (a.k.a. Experience) applied by the renderer. Config is theme-defined and validated by the theme's own schema, not here.";
923
949
  readonly additionalProperties: false;
924
- readonly required: readonly ["name"];
950
+ readonly required: readonly ["heading", "menu"];
925
951
  readonly properties: {
926
- readonly name: {
927
- readonly $ref: "#/$defs/Slug";
928
- };
929
- readonly version: {
952
+ readonly heading: {
930
953
  readonly type: "string";
931
- readonly maxLength: 64;
954
+ readonly minLength: 1;
955
+ readonly maxLength: 60;
932
956
  };
933
- readonly config: {
934
- readonly type: "object";
935
- readonly additionalProperties: true;
957
+ readonly menu: {
958
+ readonly $ref: "#/$defs/Slug";
959
+ readonly description: "A menu key (RFC-0003).";
936
960
  };
937
961
  };
938
962
  };
939
- readonly Timestamp: {
940
- readonly type: "string";
941
- readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
942
- readonly format: "date-time";
943
- };
944
- readonly TimeZone: {
945
- readonly type: "string";
946
- readonly description: "IANA time zone name from the tz database (RFC-0008), e.g. Europe/Istanbul, America/Argentina/Buenos_Aires, Etc/GMT+3 or UTC. Wall-clock times a person enters are kept with their zone, so the instant is recomputed when governments change the rules. The pattern bounds the shape only; writers also check the name against the runtime's Intl zone list.";
947
- readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
948
- readonly maxLength: 64;
949
- };
950
- };
951
- };
952
- export declare const PageSchema: {
953
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
954
- readonly $id: "https://cloudhal.dev/schemas/v1/page.schema.json";
955
- readonly title: "Page";
956
- readonly description: "A routable page of a site: a path, editorial status and an ordered list of sections. Sections are embedded (not separate nodes) so a page is the unit of locking, snapshotting and diffing.";
957
- readonly type: "object";
958
- readonly additionalProperties: false;
959
- readonly required: readonly ["schemaVersion", "id", "siteId", "path", "title", "locale", "status", "sections", "rev", "createdAt", "updatedAt"];
960
- readonly properties: {
961
- readonly schemaVersion: {
962
- readonly $ref: "#/$defs/SchemaVersion";
963
- };
964
- readonly id: {
965
- readonly $ref: "#/$defs/Id";
966
- };
967
- readonly siteId: {
968
- readonly $ref: "#/$defs/Id";
969
- };
970
- readonly path: {
971
- readonly type: "string";
972
- readonly description: "Absolute URL path, starting with '/', no trailing slash except root.";
973
- readonly pattern: "^/(?:[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$";
974
- readonly maxLength: 1024;
975
- };
976
- readonly title: {
977
- readonly type: "string";
978
- readonly minLength: 1;
979
- readonly maxLength: 300;
980
- };
981
- readonly locale: {
982
- readonly $ref: "#/$defs/Locale";
983
- };
984
- readonly status: {
985
- readonly $ref: "#/$defs/PublishStatus";
986
- };
987
- readonly sections: {
988
- readonly type: "array";
989
- readonly items: {
990
- readonly $ref: "#/$defs/Section";
991
- };
992
- };
993
- readonly seo: {
994
- readonly $ref: "#/$defs/Seo";
995
- };
996
- readonly availability: {
997
- readonly $ref: "#/$defs/Availability";
998
- };
999
- readonly chrome: {
1000
- readonly type: "object";
1001
- readonly description: "This page's own header and footer (RFC-0025 §1): a landing page without the menu, a checkout without the footer.";
1002
- readonly additionalProperties: false;
1003
- readonly properties: {
1004
- readonly header: {
1005
- readonly type: "string";
1006
- readonly enum: readonly ["default", "transparent", "hidden"];
1007
- };
1008
- readonly footer: {
1009
- readonly type: "string";
1010
- readonly enum: readonly ["default", "minimal", "hidden"];
1011
- };
1012
- };
1013
- };
1014
- readonly motion: {
1015
- readonly $ref: "#/$defs/MotionLevel";
1016
- readonly description: "Overrides the site's motion level for this page, up or down (RFC-0024 §1); absent follows the site.";
1017
- };
1018
- readonly rev: {
1019
- readonly $ref: "#/$defs/Revision";
1020
- };
1021
- readonly createdAt: {
1022
- readonly $ref: "#/$defs/Timestamp";
1023
- };
1024
- readonly updatedAt: {
1025
- readonly $ref: "#/$defs/Timestamp";
1026
- };
1027
- readonly translation: {
1028
- readonly $ref: "#/$defs/Translation";
1029
- };
1030
- readonly metadata: {
1031
- readonly $ref: "#/$defs/Metadata";
1032
- };
1033
- };
1034
- readonly $defs: {
1035
- readonly Actor: {
963
+ readonly HeaderAction: {
1036
964
  readonly type: "object";
1037
965
  readonly additionalProperties: false;
1038
- readonly required: readonly ["kind", "id"];
966
+ readonly required: readonly ["kind"];
1039
967
  readonly properties: {
1040
968
  readonly kind: {
1041
- readonly $ref: "#/$defs/ActorKind";
1042
- };
1043
- readonly id: {
1044
- readonly $ref: "#/$defs/Id";
1045
- };
1046
- readonly name: {
1047
969
  readonly type: "string";
1048
- readonly maxLength: 200;
1049
- };
1050
- };
1051
- };
1052
- readonly ActorKind: {
1053
- readonly type: "string";
1054
- readonly description: "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.";
1055
- readonly enum: readonly ["human", "agent", "system"];
1056
- };
1057
- readonly Availability: {
1058
- readonly type: "object";
1059
- readonly description: "Time gates of a page or content entry (RFC-0008): the published site shows the node only from `from` (inclusive: an embargo) until `until` (exclusive: an expiry), checked at render time, so the gates hold even when no scheduler runs. Before `from` and from `until` on, the node is absent from every public route, list, feed, sitemap and search output; previews still show it. At least one gate; writers check that `from` is before `until`.";
1060
- readonly additionalProperties: false;
1061
- readonly minProperties: 1;
1062
- readonly properties: {
1063
- readonly from: {
1064
- readonly $ref: "#/$defs/Timestamp";
1065
- };
1066
- readonly until: {
1067
- readonly $ref: "#/$defs/Timestamp";
970
+ readonly enum: readonly ["button", "search", "locale", "theme-toggle", "motion-toggle"];
1068
971
  };
1069
- };
1070
- };
1071
- readonly BodyBlock: {
1072
- readonly type: "object";
1073
- readonly description: "One top-level block of a markdown body in the store's index (RFC-0014 §3). Written by the store only: a client's values are replaced on every write. `by`, `via` and `at` say who last changed the block's content, through which channel and when; they are absent for content written before the index existed.";
1074
- readonly additionalProperties: false;
1075
- readonly required: readonly ["id", "hash"];
1076
- readonly properties: {
1077
- readonly id: {
972
+ readonly label: {
1078
973
  readonly type: "string";
1079
- readonly pattern: "^blk_[0-9A-Za-z]{8,24}$";
1080
- readonly description: "Stable across writes that keep the block's content or its place among unchanged blocks.";
974
+ readonly minLength: 1;
975
+ readonly maxLength: 40;
1081
976
  };
1082
- readonly hash: {
977
+ readonly href: {
1083
978
  readonly type: "string";
1084
- readonly pattern: "^[0-9a-f]{64}$";
1085
- readonly description: "SHA-256 (hex) of the block's markdown without trailing whitespace.";
1086
- };
1087
- readonly by: {
1088
- readonly $ref: "#/$defs/Actor";
979
+ readonly minLength: 1;
980
+ readonly maxLength: 2048;
1089
981
  };
1090
- readonly via: {
982
+ readonly variant: {
1091
983
  readonly type: "string";
1092
- readonly enum: readonly ["studio", "mcp", "api", "import", "ai-command", "proposal"];
1093
- readonly description: "The channel of that change.";
1094
- };
1095
- readonly at: {
1096
- readonly $ref: "#/$defs/Timestamp";
984
+ readonly enum: readonly ["primary", "secondary"];
1097
985
  };
1098
986
  };
1099
987
  };
1100
- readonly BodyBlocks: {
1101
- readonly type: "array";
1102
- readonly description: "A markdown body's block index, in body order (RFC-0014 §3). Absent means not indexed (yet, or an HTML body), never empty.";
1103
- readonly maxItems: 5000;
1104
- readonly items: {
1105
- readonly $ref: "#/$defs/BodyBlock";
1106
- };
1107
- };
1108
- readonly BodyProfile: {
1109
- readonly type: "integer";
1110
- readonly enum: readonly [1];
1111
- readonly description: "The markdown dialect a body follows (RFC-0014 §1): 1 = Cloudhal Markdown v1 (CommonMark + GFM + `asset:` + directives; raw HTML escaped). Set by the store on markdown bodies.";
1112
- };
1113
988
  readonly Id: {
1114
989
  readonly type: "string";
1115
990
  readonly description: "Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles.";
@@ -1171,6 +1046,56 @@ export declare const PageSchema: {
1171
1046
  readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
1172
1047
  readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
1173
1048
  };
1049
+ readonly Localization: {
1050
+ readonly type: "object";
1051
+ readonly description: "How the site serves its locales (RFC-0033 §2). Absent fields mean: prefix-except-default routing, no fallback, no required review, the machine-translation notice until reviewed.";
1052
+ readonly additionalProperties: false;
1053
+ readonly properties: {
1054
+ readonly routing: {
1055
+ readonly type: "string";
1056
+ readonly description: "prefix-except-default: the default locale at the root, the others under /<locale>/. prefix-all: every locale prefixed, / is a language chooser (x-default).";
1057
+ readonly enum: readonly ["prefix-except-default", "prefix-all"];
1058
+ };
1059
+ readonly domains: {
1060
+ readonly type: "object";
1061
+ readonly description: "Optional hostname per locale; that locale is then served at the host's root.";
1062
+ readonly propertyNames: {
1063
+ readonly $ref: "#/$defs/Locale";
1064
+ };
1065
+ readonly additionalProperties: {
1066
+ readonly type: "string";
1067
+ readonly pattern: "^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$";
1068
+ readonly maxLength: 253;
1069
+ };
1070
+ };
1071
+ readonly fallback: {
1072
+ readonly type: "string";
1073
+ readonly description: "none: a missing translation is not found. default-with-notice: the default locale's page is served with a notice and noindex.";
1074
+ readonly enum: readonly ["none", "default-with-notice"];
1075
+ };
1076
+ readonly review: {
1077
+ readonly type: "object";
1078
+ readonly description: "Collections whose machine translations need a person's review before they publish ('pages' stands for pages).";
1079
+ readonly additionalProperties: false;
1080
+ readonly properties: {
1081
+ readonly required: {
1082
+ readonly type: "array";
1083
+ readonly items: {
1084
+ readonly type: "string";
1085
+ readonly minLength: 1;
1086
+ readonly maxLength: 100;
1087
+ };
1088
+ readonly uniqueItems: true;
1089
+ };
1090
+ };
1091
+ };
1092
+ readonly label: {
1093
+ readonly type: "string";
1094
+ readonly description: "When readers see the machine-translation notice: unreviewed (until a person reviews) or always.";
1095
+ readonly enum: readonly ["unreviewed", "always"];
1096
+ };
1097
+ };
1098
+ };
1174
1099
  readonly Metadata: {
1175
1100
  readonly type: "object";
1176
1101
  readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
@@ -1178,15 +1103,11 @@ export declare const PageSchema: {
1178
1103
  readonly type: "string";
1179
1104
  };
1180
1105
  };
1181
- readonly MotionLevel: {
1182
- readonly type: "string";
1183
- readonly description: "How much a page may move (RFC-0024 §1); the reader's reduced-motion preference and pause control can only lower it.";
1184
- readonly enum: readonly ["none", "subtle", "standard", "expressive"];
1185
- };
1186
- readonly PublishStatus: {
1106
+ readonly Path: {
1187
1107
  readonly type: "string";
1188
- readonly description: "Editorial lifecycle of a page or content entry.";
1189
- readonly enum: readonly ["draft", "review", "published", "archived"];
1108
+ readonly description: "Absolute URL path of a route the site owns: starts with '/', lower-case slug segments, no trailing slash except root.";
1109
+ readonly pattern: "^/(?:[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$";
1110
+ readonly maxLength: 1024;
1190
1111
  };
1191
1112
  readonly Revision: {
1192
1113
  readonly type: "integer";
@@ -1371,38 +1292,29 @@ export declare const PageSchema: {
1371
1292
  };
1372
1293
  }];
1373
1294
  };
1374
- readonly Seo: {
1295
+ readonly Slug: {
1296
+ readonly type: "string";
1297
+ readonly description: "Lower-case URL segment.";
1298
+ readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
1299
+ readonly minLength: 1;
1300
+ readonly maxLength: 128;
1301
+ };
1302
+ readonly SocialLink: {
1375
1303
  readonly type: "object";
1376
- readonly description: "Search and social metadata of a routable node (page, term archive).";
1377
1304
  readonly additionalProperties: false;
1305
+ readonly required: readonly ["network", "href"];
1378
1306
  readonly properties: {
1379
- readonly title: {
1380
- readonly type: "string";
1381
- readonly maxLength: 300;
1382
- };
1383
- readonly description: {
1307
+ readonly network: {
1384
1308
  readonly type: "string";
1385
- readonly maxLength: 500;
1386
- };
1387
- readonly noindex: {
1388
- readonly type: "boolean";
1309
+ readonly enum: readonly ["x", "bluesky", "mastodon", "github", "linkedin", "instagram", "facebook", "youtube", "tiktok", "threads", "rss", "email"];
1389
1310
  };
1390
- readonly canonical: {
1311
+ readonly href: {
1391
1312
  readonly type: "string";
1313
+ readonly minLength: 1;
1392
1314
  readonly maxLength: 2048;
1393
1315
  };
1394
- readonly ogImage: {
1395
- readonly $ref: "#/$defs/ImageRef";
1396
- };
1397
1316
  };
1398
1317
  };
1399
- readonly Slug: {
1400
- readonly type: "string";
1401
- readonly description: "Lower-case URL segment.";
1402
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
1403
- readonly minLength: 1;
1404
- readonly maxLength: 128;
1405
- };
1406
1318
  readonly SurfaceComponent: {
1407
1319
  readonly type: "object";
1408
1320
  readonly description: "One element of a generative UI surface (RFC-0020 §1), in a flat list: `component` names a catalog entry (a PascalCase built-in primitive such as `Stack`, or a registry block type such as `callout`), `children` refer to other ids of the same surface, and `props` follow the entry's schema, which the store checks. Field names follow A2UI v0.9.";
@@ -1445,11 +1357,539 @@ export declare const PageSchema: {
1445
1357
  readonly description: "A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1).";
1446
1358
  readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
1447
1359
  };
1448
- readonly Timestamp: {
1449
- readonly type: "string";
1450
- readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
1451
- readonly format: "date-time";
1452
- };
1360
+ readonly ThemeRef: {
1361
+ readonly type: "object";
1362
+ readonly description: "Theme (a.k.a. Experience) applied by the renderer. Config is theme-defined and validated by the theme's own schema, not here.";
1363
+ readonly additionalProperties: false;
1364
+ readonly required: readonly ["name"];
1365
+ readonly properties: {
1366
+ readonly name: {
1367
+ readonly $ref: "#/$defs/Slug";
1368
+ };
1369
+ readonly version: {
1370
+ readonly type: "string";
1371
+ readonly maxLength: 64;
1372
+ };
1373
+ readonly config: {
1374
+ readonly type: "object";
1375
+ readonly additionalProperties: true;
1376
+ };
1377
+ };
1378
+ };
1379
+ readonly Timestamp: {
1380
+ readonly type: "string";
1381
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
1382
+ readonly format: "date-time";
1383
+ };
1384
+ readonly TimeZone: {
1385
+ readonly type: "string";
1386
+ readonly description: "IANA time zone name from the tz database (RFC-0008), e.g. Europe/Istanbul, America/Argentina/Buenos_Aires, Etc/GMT+3 or UTC. Wall-clock times a person enters are kept with their zone, so the instant is recomputed when governments change the rules. The pattern bounds the shape only; writers also check the name against the runtime's Intl zone list.";
1387
+ readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
1388
+ readonly maxLength: 64;
1389
+ };
1390
+ };
1391
+ };
1392
+ export declare const PageSchema: {
1393
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
1394
+ readonly $id: "https://cloudhal.dev/schemas/v1/page.schema.json";
1395
+ readonly title: "Page";
1396
+ readonly description: "A routable page of a site: a path, editorial status and an ordered list of sections. Sections are embedded (not separate nodes) so a page is the unit of locking, snapshotting and diffing.";
1397
+ readonly type: "object";
1398
+ readonly additionalProperties: false;
1399
+ readonly required: readonly ["schemaVersion", "id", "siteId", "path", "title", "locale", "status", "sections", "rev", "createdAt", "updatedAt"];
1400
+ readonly properties: {
1401
+ readonly schemaVersion: {
1402
+ readonly $ref: "#/$defs/SchemaVersion";
1403
+ };
1404
+ readonly id: {
1405
+ readonly $ref: "#/$defs/Id";
1406
+ };
1407
+ readonly siteId: {
1408
+ readonly $ref: "#/$defs/Id";
1409
+ };
1410
+ readonly path: {
1411
+ readonly type: "string";
1412
+ readonly description: "Absolute URL path, starting with '/', no trailing slash except root.";
1413
+ readonly pattern: "^/(?:[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)*)?$";
1414
+ readonly maxLength: 1024;
1415
+ };
1416
+ readonly title: {
1417
+ readonly type: "string";
1418
+ readonly minLength: 1;
1419
+ readonly maxLength: 300;
1420
+ };
1421
+ readonly locale: {
1422
+ readonly $ref: "#/$defs/Locale";
1423
+ };
1424
+ readonly status: {
1425
+ readonly $ref: "#/$defs/PublishStatus";
1426
+ };
1427
+ readonly sections: {
1428
+ readonly type: "array";
1429
+ readonly items: {
1430
+ readonly $ref: "#/$defs/Section";
1431
+ };
1432
+ };
1433
+ readonly seo: {
1434
+ readonly $ref: "#/$defs/Seo";
1435
+ };
1436
+ readonly availability: {
1437
+ readonly $ref: "#/$defs/Availability";
1438
+ };
1439
+ readonly chrome: {
1440
+ readonly type: "object";
1441
+ readonly description: "This page's own header and footer (RFC-0025 §1): a landing page without the menu, a checkout without the footer.";
1442
+ readonly additionalProperties: false;
1443
+ readonly properties: {
1444
+ readonly header: {
1445
+ readonly type: "string";
1446
+ readonly enum: readonly ["default", "transparent", "hidden"];
1447
+ };
1448
+ readonly footer: {
1449
+ readonly type: "string";
1450
+ readonly enum: readonly ["default", "minimal", "hidden"];
1451
+ };
1452
+ };
1453
+ };
1454
+ readonly motion: {
1455
+ readonly $ref: "#/$defs/MotionLevel";
1456
+ readonly description: "Overrides the site's motion level for this page, up or down (RFC-0024 §1); absent follows the site.";
1457
+ };
1458
+ readonly rev: {
1459
+ readonly $ref: "#/$defs/Revision";
1460
+ };
1461
+ readonly createdAt: {
1462
+ readonly $ref: "#/$defs/Timestamp";
1463
+ };
1464
+ readonly updatedAt: {
1465
+ readonly $ref: "#/$defs/Timestamp";
1466
+ };
1467
+ readonly translation: {
1468
+ readonly $ref: "#/$defs/Translation";
1469
+ };
1470
+ readonly metadata: {
1471
+ readonly $ref: "#/$defs/Metadata";
1472
+ };
1473
+ };
1474
+ readonly $defs: {
1475
+ readonly Actor: {
1476
+ readonly type: "object";
1477
+ readonly additionalProperties: false;
1478
+ readonly required: readonly ["kind", "id"];
1479
+ readonly properties: {
1480
+ readonly kind: {
1481
+ readonly $ref: "#/$defs/ActorKind";
1482
+ };
1483
+ readonly id: {
1484
+ readonly $ref: "#/$defs/Id";
1485
+ };
1486
+ readonly name: {
1487
+ readonly type: "string";
1488
+ readonly maxLength: 200;
1489
+ };
1490
+ };
1491
+ };
1492
+ readonly ActorKind: {
1493
+ readonly type: "string";
1494
+ readonly description: "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.";
1495
+ readonly enum: readonly ["human", "agent", "system"];
1496
+ };
1497
+ readonly Availability: {
1498
+ readonly type: "object";
1499
+ readonly description: "Time gates of a page or content entry (RFC-0008): the published site shows the node only from `from` (inclusive: an embargo) until `until` (exclusive: an expiry), checked at render time, so the gates hold even when no scheduler runs. Before `from` and from `until` on, the node is absent from every public route, list, feed, sitemap and search output; previews still show it. At least one gate; writers check that `from` is before `until`.";
1500
+ readonly additionalProperties: false;
1501
+ readonly minProperties: 1;
1502
+ readonly properties: {
1503
+ readonly from: {
1504
+ readonly $ref: "#/$defs/Timestamp";
1505
+ };
1506
+ readonly until: {
1507
+ readonly $ref: "#/$defs/Timestamp";
1508
+ };
1509
+ };
1510
+ };
1511
+ readonly BodyBlock: {
1512
+ readonly type: "object";
1513
+ readonly description: "One top-level block of a markdown body in the store's index (RFC-0014 §3). Written by the store only: a client's values are replaced on every write. `by`, `via` and `at` say who last changed the block's content, through which channel and when; they are absent for content written before the index existed.";
1514
+ readonly additionalProperties: false;
1515
+ readonly required: readonly ["id", "hash"];
1516
+ readonly properties: {
1517
+ readonly id: {
1518
+ readonly type: "string";
1519
+ readonly pattern: "^blk_[0-9A-Za-z]{8,24}$";
1520
+ readonly description: "Stable across writes that keep the block's content or its place among unchanged blocks.";
1521
+ };
1522
+ readonly hash: {
1523
+ readonly type: "string";
1524
+ readonly pattern: "^[0-9a-f]{64}$";
1525
+ readonly description: "SHA-256 (hex) of the block's markdown without trailing whitespace.";
1526
+ };
1527
+ readonly by: {
1528
+ readonly $ref: "#/$defs/Actor";
1529
+ };
1530
+ readonly via: {
1531
+ readonly type: "string";
1532
+ readonly enum: readonly ["studio", "mcp", "api", "import", "ai-command", "proposal"];
1533
+ readonly description: "The channel of that change.";
1534
+ };
1535
+ readonly at: {
1536
+ readonly $ref: "#/$defs/Timestamp";
1537
+ };
1538
+ };
1539
+ };
1540
+ readonly BodyBlocks: {
1541
+ readonly type: "array";
1542
+ readonly description: "A markdown body's block index, in body order (RFC-0014 §3). Absent means not indexed (yet, or an HTML body), never empty.";
1543
+ readonly maxItems: 5000;
1544
+ readonly items: {
1545
+ readonly $ref: "#/$defs/BodyBlock";
1546
+ };
1547
+ };
1548
+ readonly BodyProfile: {
1549
+ readonly type: "integer";
1550
+ readonly enum: readonly [1];
1551
+ readonly description: "The markdown dialect a body follows (RFC-0014 §1): 1 = Cloudhal Markdown v1 (CommonMark + GFM + `asset:` + directives; raw HTML escaped). Set by the store on markdown bodies.";
1552
+ };
1553
+ readonly Id: {
1554
+ readonly type: "string";
1555
+ readonly description: "Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles.";
1556
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
1557
+ readonly minLength: 8;
1558
+ readonly maxLength: 48;
1559
+ };
1560
+ readonly ImageRef: {
1561
+ readonly type: "object";
1562
+ readonly description: "Reference to an image. With `assetId` the image is an Asset node (RFC-0004): the store writes its media URL into `src`, and its size into `width` and `height`, as a fallback for readers that do not resolve assets. Without it, `src` is a relative path or an absolute URL, as before.";
1563
+ readonly additionalProperties: false;
1564
+ readonly required: readonly ["src", "alt"];
1565
+ readonly properties: {
1566
+ readonly assetId: {
1567
+ readonly $ref: "#/$defs/Id";
1568
+ readonly description: "The Asset node shown (RFC-0004). Renderers that know assets resolve it and ignore `src`.";
1569
+ };
1570
+ readonly src: {
1571
+ readonly type: "string";
1572
+ readonly minLength: 1;
1573
+ readonly maxLength: 2048;
1574
+ };
1575
+ readonly alt: {
1576
+ readonly type: "string";
1577
+ readonly maxLength: 500;
1578
+ };
1579
+ readonly width: {
1580
+ readonly type: "integer";
1581
+ readonly minimum: 1;
1582
+ };
1583
+ readonly height: {
1584
+ readonly type: "integer";
1585
+ readonly minimum: 1;
1586
+ };
1587
+ };
1588
+ };
1589
+ readonly Link: {
1590
+ readonly type: "object";
1591
+ readonly additionalProperties: false;
1592
+ readonly required: readonly ["label", "href"];
1593
+ readonly properties: {
1594
+ readonly label: {
1595
+ readonly type: "string";
1596
+ readonly minLength: 1;
1597
+ readonly maxLength: 200;
1598
+ };
1599
+ readonly href: {
1600
+ readonly type: "string";
1601
+ readonly minLength: 1;
1602
+ readonly maxLength: 2048;
1603
+ };
1604
+ readonly external: {
1605
+ readonly type: "boolean";
1606
+ };
1607
+ };
1608
+ };
1609
+ readonly Locale: {
1610
+ readonly type: "string";
1611
+ readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
1612
+ readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
1613
+ };
1614
+ readonly Metadata: {
1615
+ readonly type: "object";
1616
+ readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
1617
+ readonly additionalProperties: {
1618
+ readonly type: "string";
1619
+ };
1620
+ };
1621
+ readonly MotionLevel: {
1622
+ readonly type: "string";
1623
+ readonly description: "How much a page may move (RFC-0024 §1); the reader's reduced-motion preference and pause control can only lower it.";
1624
+ readonly enum: readonly ["none", "subtle", "standard", "expressive"];
1625
+ };
1626
+ readonly PublishStatus: {
1627
+ readonly type: "string";
1628
+ readonly description: "Editorial lifecycle of a page or content entry.";
1629
+ readonly enum: readonly ["draft", "review", "published", "archived"];
1630
+ };
1631
+ readonly Revision: {
1632
+ readonly type: "integer";
1633
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
1634
+ readonly minimum: 0;
1635
+ };
1636
+ readonly SchemaVersion: {
1637
+ readonly type: "integer";
1638
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
1639
+ readonly enum: readonly [1];
1640
+ };
1641
+ readonly Section: {
1642
+ readonly title: "Section";
1643
+ readonly description: "A block inside a page, discriminated by `kind`. Variants are written inline (not via $ref) and `kind` is a single-value string enum so that TypeScript gets a literal union and Rust gets a serde internally-tagged enum.";
1644
+ readonly oneOf: readonly [{
1645
+ readonly type: "object";
1646
+ readonly title: "HeroSection";
1647
+ readonly additionalProperties: false;
1648
+ readonly required: readonly ["id", "kind", "heading"];
1649
+ readonly properties: {
1650
+ readonly id: {
1651
+ readonly $ref: "#/$defs/Id";
1652
+ };
1653
+ readonly kind: {
1654
+ readonly type: "string";
1655
+ readonly enum: readonly ["hero"];
1656
+ };
1657
+ readonly heading: {
1658
+ readonly type: "string";
1659
+ readonly minLength: 1;
1660
+ readonly maxLength: 300;
1661
+ };
1662
+ readonly subheading: {
1663
+ readonly type: "string";
1664
+ readonly maxLength: 1000;
1665
+ };
1666
+ readonly image: {
1667
+ readonly $ref: "#/$defs/ImageRef";
1668
+ };
1669
+ readonly cta: {
1670
+ readonly $ref: "#/$defs/Link";
1671
+ };
1672
+ };
1673
+ }, {
1674
+ readonly type: "object";
1675
+ readonly title: "RichTextSection";
1676
+ readonly additionalProperties: false;
1677
+ readonly required: readonly ["id", "kind", "format", "body"];
1678
+ readonly properties: {
1679
+ readonly id: {
1680
+ readonly $ref: "#/$defs/Id";
1681
+ };
1682
+ readonly kind: {
1683
+ readonly type: "string";
1684
+ readonly enum: readonly ["richText"];
1685
+ };
1686
+ readonly format: {
1687
+ readonly type: "string";
1688
+ readonly enum: readonly ["markdown", "html"];
1689
+ };
1690
+ readonly body: {
1691
+ readonly type: "string";
1692
+ readonly maxLength: 200000;
1693
+ };
1694
+ readonly profile: {
1695
+ readonly $ref: "#/$defs/BodyProfile";
1696
+ };
1697
+ readonly blocks: {
1698
+ readonly $ref: "#/$defs/BodyBlocks";
1699
+ };
1700
+ };
1701
+ }, {
1702
+ readonly type: "object";
1703
+ readonly title: "ImageSection";
1704
+ readonly additionalProperties: false;
1705
+ readonly required: readonly ["id", "kind", "image"];
1706
+ readonly properties: {
1707
+ readonly id: {
1708
+ readonly $ref: "#/$defs/Id";
1709
+ };
1710
+ readonly kind: {
1711
+ readonly type: "string";
1712
+ readonly enum: readonly ["image"];
1713
+ };
1714
+ readonly image: {
1715
+ readonly $ref: "#/$defs/ImageRef";
1716
+ };
1717
+ readonly caption: {
1718
+ readonly type: "string";
1719
+ readonly maxLength: 1000;
1720
+ };
1721
+ };
1722
+ }, {
1723
+ readonly type: "object";
1724
+ readonly title: "ContentListSection";
1725
+ readonly description: "Renders the newest entries of a content collection (e.g. blog posts).";
1726
+ readonly additionalProperties: false;
1727
+ readonly required: readonly ["id", "kind", "collection", "limit", "sort"];
1728
+ readonly properties: {
1729
+ readonly id: {
1730
+ readonly $ref: "#/$defs/Id";
1731
+ };
1732
+ readonly kind: {
1733
+ readonly type: "string";
1734
+ readonly enum: readonly ["contentList"];
1735
+ };
1736
+ readonly collection: {
1737
+ readonly $ref: "#/$defs/Slug";
1738
+ };
1739
+ readonly limit: {
1740
+ readonly type: "integer";
1741
+ readonly minimum: 1;
1742
+ readonly maximum: 100;
1743
+ };
1744
+ readonly sort: {
1745
+ readonly type: "string";
1746
+ readonly enum: readonly ["newest", "oldest", "title"];
1747
+ };
1748
+ readonly filter: {
1749
+ readonly type: "string";
1750
+ readonly description: "Filter expression over term assignments (RFC-0002), e.g. 'category:news+tag:ai' or 'category:news>*'.";
1751
+ readonly minLength: 1;
1752
+ readonly maxLength: 512;
1753
+ };
1754
+ };
1755
+ }, {
1756
+ readonly type: "object";
1757
+ readonly title: "ComponentSection";
1758
+ readonly description: "A typed block from the block registry (RFC-0015): `type` names a registered block type (one global namespace of English names), `props` follow that type's props schema, which the store validates.";
1759
+ readonly additionalProperties: false;
1760
+ readonly required: readonly ["id", "kind", "type", "props"];
1761
+ readonly properties: {
1762
+ readonly id: {
1763
+ readonly $ref: "#/$defs/Id";
1764
+ };
1765
+ readonly kind: {
1766
+ readonly type: "string";
1767
+ readonly enum: readonly ["component"];
1768
+ };
1769
+ readonly type: {
1770
+ readonly type: "string";
1771
+ readonly pattern: "^[a-z][a-z0-9-]{1,40}$";
1772
+ };
1773
+ readonly props: {
1774
+ readonly type: "object";
1775
+ readonly description: "Validated against the type's props schema by the store, not by this contract.";
1776
+ readonly additionalProperties: true;
1777
+ };
1778
+ };
1779
+ }, {
1780
+ readonly type: "object";
1781
+ readonly title: "SurfaceSection";
1782
+ readonly description: "A generative UI surface (RFC-0020): a flat list of catalog components with a `root`, plus a data model their props may bind to. Written and streamed by agents as data, never code; the store checks the tree, the catalog and the limits.";
1783
+ readonly additionalProperties: false;
1784
+ readonly required: readonly ["id", "kind", "catalog", "components"];
1785
+ readonly properties: {
1786
+ readonly id: {
1787
+ readonly $ref: "#/$defs/Id";
1788
+ };
1789
+ readonly kind: {
1790
+ readonly type: "string";
1791
+ readonly enum: readonly ["surface"];
1792
+ };
1793
+ readonly catalog: {
1794
+ readonly type: "string";
1795
+ readonly description: "The catalog the surface was written for: `<theme>@<major>` (RFC-0018 manifest).";
1796
+ readonly pattern: "^[a-z][a-z0-9-]{0,40}@[0-9]{1,4}$";
1797
+ };
1798
+ readonly components: {
1799
+ readonly type: "array";
1800
+ readonly minItems: 1;
1801
+ readonly maxItems: 200;
1802
+ readonly items: {
1803
+ readonly $ref: "#/$defs/SurfaceComponent";
1804
+ };
1805
+ };
1806
+ readonly data: {
1807
+ readonly type: "object";
1808
+ readonly description: "The surface's data model: JSON its components bind to with `{path}` (at most 64 KB serialized; the store enforces the size).";
1809
+ readonly additionalProperties: true;
1810
+ };
1811
+ };
1812
+ }];
1813
+ };
1814
+ readonly Seo: {
1815
+ readonly type: "object";
1816
+ readonly description: "Search and social metadata of a routable node (page, term archive).";
1817
+ readonly additionalProperties: false;
1818
+ readonly properties: {
1819
+ readonly title: {
1820
+ readonly type: "string";
1821
+ readonly maxLength: 300;
1822
+ };
1823
+ readonly description: {
1824
+ readonly type: "string";
1825
+ readonly maxLength: 500;
1826
+ };
1827
+ readonly noindex: {
1828
+ readonly type: "boolean";
1829
+ };
1830
+ readonly canonical: {
1831
+ readonly type: "string";
1832
+ readonly maxLength: 2048;
1833
+ };
1834
+ readonly ogImage: {
1835
+ readonly $ref: "#/$defs/ImageRef";
1836
+ };
1837
+ };
1838
+ };
1839
+ readonly Slug: {
1840
+ readonly type: "string";
1841
+ readonly description: "Lower-case URL segment.";
1842
+ readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
1843
+ readonly minLength: 1;
1844
+ readonly maxLength: 128;
1845
+ };
1846
+ readonly SurfaceComponent: {
1847
+ readonly type: "object";
1848
+ readonly description: "One element of a generative UI surface (RFC-0020 §1), in a flat list: `component` names a catalog entry (a PascalCase built-in primitive such as `Stack`, or a registry block type such as `callout`), `children` refer to other ids of the same surface, and `props` follow the entry's schema, which the store checks. Field names follow A2UI v0.9.";
1849
+ readonly additionalProperties: false;
1850
+ readonly required: readonly ["id", "component"];
1851
+ readonly properties: {
1852
+ readonly id: {
1853
+ readonly $ref: "#/$defs/SurfaceComponentId";
1854
+ };
1855
+ readonly component: {
1856
+ readonly type: "string";
1857
+ readonly pattern: "^(?:[A-Z][A-Za-z0-9]{1,40}|[a-z][a-z0-9-]{1,40})$";
1858
+ };
1859
+ readonly children: {
1860
+ readonly type: "array";
1861
+ readonly maxItems: 200;
1862
+ readonly items: {
1863
+ readonly $ref: "#/$defs/SurfaceComponentId";
1864
+ };
1865
+ };
1866
+ readonly props: {
1867
+ readonly type: "object";
1868
+ readonly description: "Literal values, `{path}` bindings into the surface's data, or `{call}` named functions; validated by the store against the catalog, not by this contract.";
1869
+ readonly additionalProperties: true;
1870
+ };
1871
+ readonly visible: {
1872
+ readonly type: "object";
1873
+ readonly description: "A visibility condition over the surface's data (`eq`, `ne`, `gt`, `lt`, `and`, `or`, `not`); validated by the store.";
1874
+ readonly additionalProperties: true;
1875
+ };
1876
+ readonly motion: {
1877
+ readonly type: "object";
1878
+ readonly description: "Motion presets for this component (RFC-0024 §2): `reveal`, `hover`, `speed`, `delay`, `stagger`, `replay` and later `scroll`, `loop`; enums and clamped numbers only, validated by the store against the catalog. The renderer turns them into CSS; agents never write CSS.";
1879
+ readonly additionalProperties: true;
1880
+ };
1881
+ };
1882
+ };
1883
+ readonly SurfaceComponentId: {
1884
+ readonly type: "string";
1885
+ readonly description: "A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1).";
1886
+ readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
1887
+ };
1888
+ readonly Timestamp: {
1889
+ readonly type: "string";
1890
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
1891
+ readonly format: "date-time";
1892
+ };
1453
1893
  readonly Translation: {
1454
1894
  readonly type: "object";
1455
1895
  readonly description: "Links a page or entry to the other language versions of the same work (RFC-0033 §2). Staleness is computed: the source's current hash differs from source.hash.";
@@ -1945,7 +2385,7 @@ export declare const ContentEntrySchema: {
1945
2385
  };
1946
2386
  readonly fields: {
1947
2387
  readonly type: "object";
1948
- readonly description: "Collection-specific values; any JSON.";
2388
+ readonly description: "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value.";
1949
2389
  readonly additionalProperties: true;
1950
2390
  };
1951
2391
  readonly tags: {
@@ -5973,10 +6413,11 @@ export declare const schemas: {
5973
6413
  };
5974
6414
  readonly collections: {
5975
6415
  readonly type: "object";
5976
- readonly description: "RFC-0038: per-collection settings, keyed by collection (ContentEntry.collection). A collection without an entry here uses the defaults.";
6416
+ readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
5977
6417
  readonly propertyNames: {
5978
6418
  readonly $ref: "#/$defs/Slug";
5979
6419
  };
6420
+ readonly maxProperties: 50;
5980
6421
  readonly additionalProperties: {
5981
6422
  readonly $ref: "#/$defs/CollectionSettings";
5982
6423
  };
@@ -6278,6 +6719,27 @@ export declare const schemas: {
6278
6719
  };
6279
6720
  };
6280
6721
  };
6722
+ readonly CollectionLabel: {
6723
+ readonly type: "object";
6724
+ readonly additionalProperties: false;
6725
+ readonly required: readonly ["singular", "plural"];
6726
+ readonly properties: {
6727
+ readonly singular: {
6728
+ readonly type: "string";
6729
+ readonly minLength: 1;
6730
+ readonly maxLength: 100;
6731
+ };
6732
+ readonly plural: {
6733
+ readonly type: "string";
6734
+ readonly minLength: 1;
6735
+ readonly maxLength: 100;
6736
+ };
6737
+ readonly description: {
6738
+ readonly type: "string";
6739
+ readonly maxLength: 1000;
6740
+ };
6741
+ };
6742
+ };
6281
6743
  readonly CollectionSettings: {
6282
6744
  readonly type: "object";
6283
6745
  readonly additionalProperties: false;
@@ -6287,6 +6749,45 @@ export declare const schemas: {
6287
6749
  readonly description: "RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means /<collection>/{slug}.";
6288
6750
  readonly pattern: "^(/[a-z0-9]+(-[a-z0-9]+)*)+/\\{slug\\}$";
6289
6751
  };
6752
+ readonly labels: {
6753
+ readonly type: "object";
6754
+ readonly description: "RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key.";
6755
+ readonly propertyNames: {
6756
+ readonly $ref: "#/$defs/Locale";
6757
+ };
6758
+ readonly minProperties: 1;
6759
+ readonly additionalProperties: {
6760
+ readonly $ref: "#/$defs/CollectionLabel";
6761
+ };
6762
+ };
6763
+ readonly icon: {
6764
+ readonly type: "string";
6765
+ readonly description: "RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup.";
6766
+ readonly pattern: "^[a-z0-9]+(-[a-z0-9]+)*$";
6767
+ readonly maxLength: 40;
6768
+ };
6769
+ readonly feed: {
6770
+ readonly type: "boolean";
6771
+ readonly description: "RFC-0040: entries appear in the site's RSS feeds. Absent: true.";
6772
+ };
6773
+ readonly sitemap: {
6774
+ readonly type: "boolean";
6775
+ readonly description: "RFC-0040: published entries appear in sitemap.xml. Absent: true.";
6776
+ };
6777
+ readonly sort: {
6778
+ readonly type: "string";
6779
+ readonly description: "RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest.";
6780
+ readonly enum: readonly ["newest", "oldest", "title"];
6781
+ };
6782
+ readonly fields: {
6783
+ readonly type: "array";
6784
+ readonly description: "RFC-0041: the collection's typed custom fields, in form order. Values live in ContentEntry.fields under each key. At most 200 per site and unique keys (checked in code).";
6785
+ readonly minItems: 1;
6786
+ readonly maxItems: 30;
6787
+ readonly items: {
6788
+ readonly $ref: "#/$defs/FieldDefinition";
6789
+ };
6790
+ };
6290
6791
  };
6291
6792
  };
6292
6793
  readonly Consent: {
@@ -6331,6 +6832,385 @@ export declare const schemas: {
6331
6832
  };
6332
6833
  };
6333
6834
  };
6835
+ readonly FieldDefinition: {
6836
+ readonly description: "RFC-0041: one typed custom field of a collection, discriminated by `type`.";
6837
+ readonly oneOf: readonly [{
6838
+ readonly title: "TextField";
6839
+ readonly type: "object";
6840
+ readonly description: "Plain text: a string of at most maxLength characters.";
6841
+ readonly additionalProperties: false;
6842
+ readonly required: readonly ["key", "type", "labels", "localized"];
6843
+ readonly properties: {
6844
+ readonly key: {
6845
+ readonly $ref: "#/$defs/FieldKey";
6846
+ };
6847
+ readonly type: {
6848
+ readonly type: "string";
6849
+ readonly enum: readonly ["text"];
6850
+ };
6851
+ readonly labels: {
6852
+ readonly $ref: "#/$defs/FieldLabels";
6853
+ };
6854
+ readonly localized: {
6855
+ readonly type: "boolean";
6856
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
6857
+ };
6858
+ readonly requiredToPublish: {
6859
+ readonly type: "boolean";
6860
+ readonly description: "An entry in review or published needs a value. Absent: false.";
6861
+ };
6862
+ readonly migration: {
6863
+ readonly $ref: "#/$defs/FieldMigration";
6864
+ };
6865
+ readonly maxLength: {
6866
+ readonly type: "integer";
6867
+ readonly description: "Absent: 5000.";
6868
+ readonly minimum: 1;
6869
+ readonly maximum: 5000;
6870
+ };
6871
+ readonly multiline: {
6872
+ readonly type: "boolean";
6873
+ readonly description: "Line breaks allowed. Absent: false.";
6874
+ };
6875
+ readonly searchable: {
6876
+ readonly type: "boolean";
6877
+ readonly description: "Its words go into site search. Absent: false.";
6878
+ };
6879
+ };
6880
+ }, {
6881
+ readonly title: "RichTextField";
6882
+ readonly type: "object";
6883
+ readonly description: "Cloudhal Markdown v1 (ADR-0028), at most 50 000 characters.";
6884
+ readonly additionalProperties: false;
6885
+ readonly required: readonly ["key", "type", "labels", "localized"];
6886
+ readonly properties: {
6887
+ readonly key: {
6888
+ readonly $ref: "#/$defs/FieldKey";
6889
+ };
6890
+ readonly type: {
6891
+ readonly type: "string";
6892
+ readonly enum: readonly ["richText"];
6893
+ };
6894
+ readonly labels: {
6895
+ readonly $ref: "#/$defs/FieldLabels";
6896
+ };
6897
+ readonly localized: {
6898
+ readonly type: "boolean";
6899
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
6900
+ };
6901
+ readonly requiredToPublish: {
6902
+ readonly type: "boolean";
6903
+ readonly description: "An entry in review or published needs a value. Absent: false.";
6904
+ };
6905
+ readonly migration: {
6906
+ readonly $ref: "#/$defs/FieldMigration";
6907
+ };
6908
+ readonly searchable: {
6909
+ readonly type: "boolean";
6910
+ readonly description: "Its words go into site search. Absent: false.";
6911
+ };
6912
+ };
6913
+ }, {
6914
+ readonly title: "NumberField";
6915
+ readonly type: "object";
6916
+ readonly description: "A finite number.";
6917
+ readonly additionalProperties: false;
6918
+ readonly required: readonly ["key", "type", "labels", "localized"];
6919
+ readonly properties: {
6920
+ readonly key: {
6921
+ readonly $ref: "#/$defs/FieldKey";
6922
+ };
6923
+ readonly type: {
6924
+ readonly type: "string";
6925
+ readonly enum: readonly ["number"];
6926
+ };
6927
+ readonly labels: {
6928
+ readonly $ref: "#/$defs/FieldLabels";
6929
+ };
6930
+ readonly localized: {
6931
+ readonly type: "boolean";
6932
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
6933
+ };
6934
+ readonly requiredToPublish: {
6935
+ readonly type: "boolean";
6936
+ readonly description: "An entry in review or published needs a value. Absent: false.";
6937
+ };
6938
+ readonly migration: {
6939
+ readonly $ref: "#/$defs/FieldMigration";
6940
+ };
6941
+ readonly integer: {
6942
+ readonly type: "boolean";
6943
+ readonly description: "Whole numbers only. Absent: false.";
6944
+ };
6945
+ readonly minimum: {
6946
+ readonly type: "number";
6947
+ };
6948
+ readonly maximum: {
6949
+ readonly type: "number";
6950
+ };
6951
+ };
6952
+ }, {
6953
+ readonly title: "BooleanField";
6954
+ readonly type: "object";
6955
+ readonly description: "true or false; absent reads as false, so it cannot be required to publish.";
6956
+ readonly additionalProperties: false;
6957
+ readonly required: readonly ["key", "type", "labels", "localized"];
6958
+ readonly properties: {
6959
+ readonly key: {
6960
+ readonly $ref: "#/$defs/FieldKey";
6961
+ };
6962
+ readonly type: {
6963
+ readonly type: "string";
6964
+ readonly enum: readonly ["boolean"];
6965
+ };
6966
+ readonly labels: {
6967
+ readonly $ref: "#/$defs/FieldLabels";
6968
+ };
6969
+ readonly localized: {
6970
+ readonly type: "boolean";
6971
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
6972
+ };
6973
+ readonly migration: {
6974
+ readonly $ref: "#/$defs/FieldMigration";
6975
+ };
6976
+ };
6977
+ }, {
6978
+ readonly title: "DateField";
6979
+ readonly type: "object";
6980
+ readonly description: "A calendar day without a zone (YYYY-MM-DD).";
6981
+ readonly additionalProperties: false;
6982
+ readonly required: readonly ["key", "type", "labels", "localized"];
6983
+ readonly properties: {
6984
+ readonly key: {
6985
+ readonly $ref: "#/$defs/FieldKey";
6986
+ };
6987
+ readonly type: {
6988
+ readonly type: "string";
6989
+ readonly enum: readonly ["date"];
6990
+ };
6991
+ readonly labels: {
6992
+ readonly $ref: "#/$defs/FieldLabels";
6993
+ };
6994
+ readonly localized: {
6995
+ readonly type: "boolean";
6996
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
6997
+ };
6998
+ readonly requiredToPublish: {
6999
+ readonly type: "boolean";
7000
+ readonly description: "An entry in review or published needs a value. Absent: false.";
7001
+ };
7002
+ readonly migration: {
7003
+ readonly $ref: "#/$defs/FieldMigration";
7004
+ };
7005
+ };
7006
+ }, {
7007
+ readonly title: "DateTimeField";
7008
+ readonly type: "object";
7009
+ readonly description: "An instant with the zone it was entered in: {at, timeZone} (RFC-0008 §9.1).";
7010
+ readonly additionalProperties: false;
7011
+ readonly required: readonly ["key", "type", "labels", "localized"];
7012
+ readonly properties: {
7013
+ readonly key: {
7014
+ readonly $ref: "#/$defs/FieldKey";
7015
+ };
7016
+ readonly type: {
7017
+ readonly type: "string";
7018
+ readonly enum: readonly ["datetime"];
7019
+ };
7020
+ readonly labels: {
7021
+ readonly $ref: "#/$defs/FieldLabels";
7022
+ };
7023
+ readonly localized: {
7024
+ readonly type: "boolean";
7025
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
7026
+ };
7027
+ readonly requiredToPublish: {
7028
+ readonly type: "boolean";
7029
+ readonly description: "An entry in review or published needs a value. Absent: false.";
7030
+ };
7031
+ readonly migration: {
7032
+ readonly $ref: "#/$defs/FieldMigration";
7033
+ };
7034
+ };
7035
+ }, {
7036
+ readonly title: "UrlField";
7037
+ readonly type: "object";
7038
+ readonly description: "A link: https, http, mailto, tel, a site-relative path or a #fragment; at most 2048 characters.";
7039
+ readonly additionalProperties: false;
7040
+ readonly required: readonly ["key", "type", "labels", "localized"];
7041
+ readonly properties: {
7042
+ readonly key: {
7043
+ readonly $ref: "#/$defs/FieldKey";
7044
+ };
7045
+ readonly type: {
7046
+ readonly type: "string";
7047
+ readonly enum: readonly ["url"];
7048
+ };
7049
+ readonly labels: {
7050
+ readonly $ref: "#/$defs/FieldLabels";
7051
+ };
7052
+ readonly localized: {
7053
+ readonly type: "boolean";
7054
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
7055
+ };
7056
+ readonly requiredToPublish: {
7057
+ readonly type: "boolean";
7058
+ readonly description: "An entry in review or published needs a value. Absent: false.";
7059
+ };
7060
+ readonly migration: {
7061
+ readonly $ref: "#/$defs/FieldMigration";
7062
+ };
7063
+ };
7064
+ }, {
7065
+ readonly title: "ImageField";
7066
+ readonly type: "object";
7067
+ readonly description: "An image Asset of the same site, by id (asset_…).";
7068
+ readonly additionalProperties: false;
7069
+ readonly required: readonly ["key", "type", "labels", "localized"];
7070
+ readonly properties: {
7071
+ readonly key: {
7072
+ readonly $ref: "#/$defs/FieldKey";
7073
+ };
7074
+ readonly type: {
7075
+ readonly type: "string";
7076
+ readonly enum: readonly ["image"];
7077
+ };
7078
+ readonly labels: {
7079
+ readonly $ref: "#/$defs/FieldLabels";
7080
+ };
7081
+ readonly localized: {
7082
+ readonly type: "boolean";
7083
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
7084
+ };
7085
+ readonly requiredToPublish: {
7086
+ readonly type: "boolean";
7087
+ readonly description: "An entry in review or published needs a value. Absent: false.";
7088
+ };
7089
+ readonly migration: {
7090
+ readonly $ref: "#/$defs/FieldMigration";
7091
+ };
7092
+ };
7093
+ }, {
7094
+ readonly title: "SelectField";
7095
+ readonly type: "object";
7096
+ readonly description: "One of a closed list of options, or several when multiple.";
7097
+ readonly additionalProperties: false;
7098
+ readonly required: readonly ["key", "type", "labels", "localized", "options"];
7099
+ readonly properties: {
7100
+ readonly key: {
7101
+ readonly $ref: "#/$defs/FieldKey";
7102
+ };
7103
+ readonly type: {
7104
+ readonly type: "string";
7105
+ readonly enum: readonly ["select"];
7106
+ };
7107
+ readonly labels: {
7108
+ readonly $ref: "#/$defs/FieldLabels";
7109
+ };
7110
+ readonly localized: {
7111
+ readonly type: "boolean";
7112
+ readonly description: "true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it.";
7113
+ };
7114
+ readonly requiredToPublish: {
7115
+ readonly type: "boolean";
7116
+ readonly description: "An entry in review or published needs a value. Absent: false.";
7117
+ };
7118
+ readonly migration: {
7119
+ readonly $ref: "#/$defs/FieldMigration";
7120
+ };
7121
+ readonly options: {
7122
+ readonly type: "array";
7123
+ readonly minItems: 1;
7124
+ readonly maxItems: 50;
7125
+ readonly items: {
7126
+ readonly $ref: "#/$defs/FieldOption";
7127
+ };
7128
+ };
7129
+ readonly multiple: {
7130
+ readonly type: "boolean";
7131
+ readonly description: "The value is a list of option values. Absent: false.";
7132
+ };
7133
+ };
7134
+ }];
7135
+ };
7136
+ readonly FieldKey: {
7137
+ readonly type: "string";
7138
+ readonly description: "The field's key in ContentEntry.fields: lower camelCase, a JavaScript identifier. Unique in its collection; built-in entry property names are reserved (checked in code).";
7139
+ readonly pattern: "^[a-z][A-Za-z0-9]{0,39}$";
7140
+ };
7141
+ readonly FieldLabel: {
7142
+ readonly type: "object";
7143
+ readonly additionalProperties: false;
7144
+ readonly required: readonly ["label"];
7145
+ readonly properties: {
7146
+ readonly label: {
7147
+ readonly type: "string";
7148
+ readonly minLength: 1;
7149
+ readonly maxLength: 100;
7150
+ };
7151
+ readonly help: {
7152
+ readonly type: "string";
7153
+ readonly maxLength: 300;
7154
+ };
7155
+ };
7156
+ };
7157
+ readonly FieldLabels: {
7158
+ readonly type: "object";
7159
+ readonly description: "The field's label and help per locale. Missing a locale: the default locale's, then the key.";
7160
+ readonly propertyNames: {
7161
+ readonly $ref: "#/$defs/Locale";
7162
+ };
7163
+ readonly minProperties: 1;
7164
+ readonly additionalProperties: {
7165
+ readonly $ref: "#/$defs/FieldLabel";
7166
+ };
7167
+ };
7168
+ readonly FieldMigration: {
7169
+ readonly type: "object";
7170
+ readonly description: "RFC-0041 §6: present only while a field operation rewrites entries.";
7171
+ readonly additionalProperties: false;
7172
+ readonly required: readonly ["id"];
7173
+ readonly properties: {
7174
+ readonly id: {
7175
+ readonly $ref: "#/$defs/Id";
7176
+ readonly description: "The operation's \"before\" snapshot.";
7177
+ };
7178
+ readonly fromKey: {
7179
+ readonly $ref: "#/$defs/FieldKey";
7180
+ };
7181
+ readonly fromType: {
7182
+ readonly type: "string";
7183
+ readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select"];
7184
+ };
7185
+ readonly fromLocalized: {
7186
+ readonly type: "boolean";
7187
+ };
7188
+ };
7189
+ };
7190
+ readonly FieldOption: {
7191
+ readonly type: "object";
7192
+ readonly description: "One option of a select field. Values are unique in the field (checked in code).";
7193
+ readonly additionalProperties: false;
7194
+ readonly required: readonly ["value", "labels"];
7195
+ readonly properties: {
7196
+ readonly value: {
7197
+ readonly $ref: "#/$defs/Slug";
7198
+ readonly description: "Stored in entries, never shown.";
7199
+ };
7200
+ readonly labels: {
7201
+ readonly type: "object";
7202
+ readonly propertyNames: {
7203
+ readonly $ref: "#/$defs/Locale";
7204
+ };
7205
+ readonly minProperties: 1;
7206
+ readonly additionalProperties: {
7207
+ readonly type: "string";
7208
+ readonly minLength: 1;
7209
+ readonly maxLength: 100;
7210
+ };
7211
+ };
7212
+ };
7213
+ };
6334
7214
  readonly FooterColumn: {
6335
7215
  readonly type: "object";
6336
7216
  readonly additionalProperties: false;
@@ -7772,7 +8652,7 @@ export declare const schemas: {
7772
8652
  };
7773
8653
  readonly fields: {
7774
8654
  readonly type: "object";
7775
- readonly description: "Collection-specific values; any JSON.";
8655
+ readonly description: "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value.";
7776
8656
  readonly additionalProperties: true;
7777
8657
  };
7778
8658
  readonly tags: {