@cloudhal/core-contracts 0.7.3 → 0.9.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.
@@ -940,6 +940,112 @@ export declare const SiteSchema: {
940
940
  readonly description: "The value is a list of option values. Absent: false.";
941
941
  };
942
942
  };
943
+ }, {
944
+ readonly title: "ReferenceField";
945
+ readonly type: "object";
946
+ readonly description: "RFC-0045: entries of other (or this) collections of the same site, by translation group id (entry_…): the id of the group's original, which every language version and edition carries in translation.group.";
947
+ readonly additionalProperties: false;
948
+ readonly required: readonly ["key", "type", "labels", "localized", "collections"];
949
+ readonly properties: {
950
+ readonly key: {
951
+ readonly $ref: "#/$defs/FieldKey";
952
+ };
953
+ readonly type: {
954
+ readonly type: "string";
955
+ readonly enum: readonly ["reference"];
956
+ };
957
+ readonly labels: {
958
+ readonly $ref: "#/$defs/FieldLabels";
959
+ };
960
+ readonly localized: {
961
+ readonly type: "boolean";
962
+ readonly description: "true: each language version picks its own targets; false: only the translation group's original holds them, and every version resolves them in its own language.";
963
+ };
964
+ readonly requiredToPublish: {
965
+ readonly type: "boolean";
966
+ readonly description: "An entry in review or published needs at least one target. Absent: false.";
967
+ };
968
+ readonly migration: {
969
+ readonly $ref: "#/$defs/FieldMigration";
970
+ };
971
+ readonly collections: {
972
+ readonly type: "array";
973
+ readonly description: "The collections a target may belong to: declared collections of this site (checked in code).";
974
+ readonly minItems: 1;
975
+ readonly maxItems: 5;
976
+ readonly uniqueItems: true;
977
+ readonly items: {
978
+ readonly $ref: "#/$defs/Slug";
979
+ };
980
+ };
981
+ readonly multiple: {
982
+ readonly type: "boolean";
983
+ readonly description: "The value is an ordered list of targets. Absent: false.";
984
+ };
985
+ readonly maxItems: {
986
+ readonly type: "integer";
987
+ readonly description: "With multiple: at most this many targets. Absent: 20.";
988
+ readonly minimum: 1;
989
+ readonly maximum: 50;
990
+ };
991
+ readonly where: {
992
+ readonly type: "array";
993
+ readonly description: "Only with one target collection: conditions on its list fields that a newly chosen target must meet (no `now`; checked in code). Narrows the picker; not re-checked when the target changes later.";
994
+ readonly minItems: 1;
995
+ readonly maxItems: 4;
996
+ readonly items: {
997
+ readonly $ref: "#/$defs/FieldCondition";
998
+ };
999
+ };
1000
+ };
1001
+ }, {
1002
+ readonly title: "RepeaterField";
1003
+ readonly type: "object";
1004
+ readonly description: "RFC-0045: an ordered list of items, each a flat object of sub-fields. A repeater cannot contain a repeater.";
1005
+ readonly additionalProperties: false;
1006
+ readonly required: readonly ["key", "type", "labels", "localized", "fields"];
1007
+ readonly properties: {
1008
+ readonly key: {
1009
+ readonly $ref: "#/$defs/FieldKey";
1010
+ };
1011
+ readonly type: {
1012
+ readonly type: "string";
1013
+ readonly enum: readonly ["repeater"];
1014
+ };
1015
+ readonly labels: {
1016
+ readonly $ref: "#/$defs/FieldLabels";
1017
+ };
1018
+ readonly localized: {
1019
+ readonly type: "boolean";
1020
+ readonly description: "true: each language version has its own list (missing reads the original's); false: only the original holds the list.";
1021
+ };
1022
+ readonly requiredToPublish: {
1023
+ readonly type: "boolean";
1024
+ readonly description: "An entry in review or published needs at least one item. Absent: false.";
1025
+ };
1026
+ readonly migration: {
1027
+ readonly $ref: "#/$defs/FieldMigration";
1028
+ };
1029
+ readonly fields: {
1030
+ readonly type: "array";
1031
+ readonly description: "The sub-fields of every item, in form order. Unique keys (checked in code).";
1032
+ readonly minItems: 1;
1033
+ readonly maxItems: 10;
1034
+ readonly items: {
1035
+ readonly $ref: "#/$defs/SubFieldDefinition";
1036
+ };
1037
+ };
1038
+ readonly maxItems: {
1039
+ readonly type: "integer";
1040
+ readonly description: "At most this many items. Absent: 20.";
1041
+ readonly minimum: 1;
1042
+ readonly maximum: 50;
1043
+ };
1044
+ readonly itemLabel: {
1045
+ readonly $ref: "#/$defs/FieldKey";
1046
+ readonly description: "The text, select or reference sub-field that names an item in Studio and approval prompts. Absent: the first such sub-field.";
1047
+ };
1048
+ };
943
1049
  }];
944
1050
  };
945
1051
  readonly FieldKey: {
@@ -989,11 +1095,15 @@ export declare const SiteSchema: {
989
1095
  };
990
1096
  readonly fromType: {
991
1097
  readonly type: "string";
992
- readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select"];
1098
+ readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select", "reference", "repeater"];
993
1099
  };
994
1100
  readonly fromLocalized: {
995
1101
  readonly type: "boolean";
996
1102
  };
1103
+ readonly sub: {
1104
+ readonly $ref: "#/$defs/FieldKey";
1105
+ readonly description: "RFC-0045: the repeater's sub-field the operation rewrites (its key once the operation is done); fromKey and fromType then describe the sub-field.";
1106
+ };
997
1107
  };
998
1108
  };
999
1109
  readonly FieldOption: {
@@ -1517,70 +1627,297 @@ export declare const SiteSchema: {
1517
1627
  };
1518
1628
  }];
1519
1629
  };
1520
- readonly SurfaceComponent: {
1521
- readonly type: "object";
1522
- 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.";
1523
- readonly additionalProperties: false;
1524
- readonly required: readonly ["id", "component"];
1525
- readonly properties: {
1526
- readonly id: {
1527
- readonly $ref: "#/$defs/SurfaceComponentId";
1528
- };
1529
- readonly component: {
1530
- readonly type: "string";
1531
- readonly pattern: "^(?:[A-Z][A-Za-z0-9]{1,40}|[a-z][a-z0-9-]{1,40})$";
1532
- };
1533
- readonly children: {
1534
- readonly type: "array";
1535
- readonly maxItems: 200;
1536
- readonly items: {
1537
- readonly $ref: "#/$defs/SurfaceComponentId";
1630
+ readonly SubFieldDefinition: {
1631
+ readonly description: "RFC-0045: one sub-field of a repeater item, discriminated by `type`. Only types whose value is a scalar: no datetime, no multiple select or reference, no repeater. No localized and no migration: the repeater's apply.";
1632
+ readonly oneOf: readonly [{
1633
+ readonly title: "TextSubField";
1634
+ readonly type: "object";
1635
+ readonly additionalProperties: false;
1636
+ readonly required: readonly ["key", "type", "labels"];
1637
+ readonly properties: {
1638
+ readonly key: {
1639
+ readonly $ref: "#/$defs/FieldKey";
1640
+ };
1641
+ readonly type: {
1642
+ readonly type: "string";
1643
+ readonly enum: readonly ["text"];
1644
+ };
1645
+ readonly labels: {
1646
+ readonly $ref: "#/$defs/FieldLabels";
1647
+ };
1648
+ readonly requiredToPublish: {
1649
+ readonly type: "boolean";
1650
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1651
+ };
1652
+ readonly maxLength: {
1653
+ readonly type: "integer";
1654
+ readonly description: "Absent: 5000.";
1655
+ readonly minimum: 1;
1656
+ readonly maximum: 5000;
1657
+ };
1658
+ readonly multiline: {
1659
+ readonly type: "boolean";
1660
+ readonly description: "Line breaks allowed. Absent: false.";
1538
1661
  };
1539
1662
  };
1540
- readonly props: {
1541
- readonly type: "object";
1542
- 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.";
1543
- readonly additionalProperties: true;
1544
- };
1545
- readonly visible: {
1546
- readonly type: "object";
1547
- readonly description: "A visibility condition over the surface's data (`eq`, `ne`, `gt`, `lt`, `and`, `or`, `not`); validated by the store.";
1548
- readonly additionalProperties: true;
1663
+ }, {
1664
+ readonly title: "RichTextSubField";
1665
+ readonly type: "object";
1666
+ readonly additionalProperties: false;
1667
+ readonly required: readonly ["key", "type", "labels"];
1668
+ readonly properties: {
1669
+ readonly key: {
1670
+ readonly $ref: "#/$defs/FieldKey";
1671
+ };
1672
+ readonly type: {
1673
+ readonly type: "string";
1674
+ readonly enum: readonly ["richText"];
1675
+ };
1676
+ readonly labels: {
1677
+ readonly $ref: "#/$defs/FieldLabels";
1678
+ };
1679
+ readonly requiredToPublish: {
1680
+ readonly type: "boolean";
1681
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1682
+ };
1549
1683
  };
1550
- readonly motion: {
1551
- readonly type: "object";
1552
- 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.";
1553
- readonly additionalProperties: true;
1684
+ }, {
1685
+ readonly title: "NumberSubField";
1686
+ readonly type: "object";
1687
+ readonly additionalProperties: false;
1688
+ readonly required: readonly ["key", "type", "labels"];
1689
+ readonly properties: {
1690
+ readonly key: {
1691
+ readonly $ref: "#/$defs/FieldKey";
1692
+ };
1693
+ readonly type: {
1694
+ readonly type: "string";
1695
+ readonly enum: readonly ["number"];
1696
+ };
1697
+ readonly labels: {
1698
+ readonly $ref: "#/$defs/FieldLabels";
1699
+ };
1700
+ readonly requiredToPublish: {
1701
+ readonly type: "boolean";
1702
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1703
+ };
1704
+ readonly integer: {
1705
+ readonly type: "boolean";
1706
+ readonly description: "Whole numbers only. Absent: false.";
1707
+ };
1708
+ readonly minimum: {
1709
+ readonly type: "number";
1710
+ };
1711
+ readonly maximum: {
1712
+ readonly type: "number";
1713
+ };
1554
1714
  };
1555
- };
1556
- };
1557
- readonly SurfaceComponentId: {
1558
- readonly type: "string";
1559
- readonly description: "A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1).";
1560
- readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
1561
- };
1562
- readonly ThemeRef: {
1563
- readonly type: "object";
1564
- 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.";
1565
- readonly additionalProperties: false;
1566
- readonly required: readonly ["name"];
1567
- readonly properties: {
1568
- readonly name: {
1569
- readonly $ref: "#/$defs/Slug";
1715
+ }, {
1716
+ readonly title: "BooleanSubField";
1717
+ readonly type: "object";
1718
+ readonly additionalProperties: false;
1719
+ readonly required: readonly ["key", "type", "labels"];
1720
+ readonly properties: {
1721
+ readonly key: {
1722
+ readonly $ref: "#/$defs/FieldKey";
1723
+ };
1724
+ readonly type: {
1725
+ readonly type: "string";
1726
+ readonly enum: readonly ["boolean"];
1727
+ };
1728
+ readonly labels: {
1729
+ readonly $ref: "#/$defs/FieldLabels";
1730
+ };
1570
1731
  };
1571
- readonly version: {
1572
- readonly type: "string";
1573
- readonly maxLength: 64;
1732
+ }, {
1733
+ readonly title: "DateSubField";
1734
+ readonly type: "object";
1735
+ readonly additionalProperties: false;
1736
+ readonly required: readonly ["key", "type", "labels"];
1737
+ readonly properties: {
1738
+ readonly key: {
1739
+ readonly $ref: "#/$defs/FieldKey";
1740
+ };
1741
+ readonly type: {
1742
+ readonly type: "string";
1743
+ readonly enum: readonly ["date"];
1744
+ };
1745
+ readonly labels: {
1746
+ readonly $ref: "#/$defs/FieldLabels";
1747
+ };
1748
+ readonly requiredToPublish: {
1749
+ readonly type: "boolean";
1750
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1751
+ };
1574
1752
  };
1575
- readonly config: {
1576
- readonly type: "object";
1577
- readonly additionalProperties: true;
1753
+ }, {
1754
+ readonly title: "UrlSubField";
1755
+ readonly type: "object";
1756
+ readonly additionalProperties: false;
1757
+ readonly required: readonly ["key", "type", "labels"];
1758
+ readonly properties: {
1759
+ readonly key: {
1760
+ readonly $ref: "#/$defs/FieldKey";
1761
+ };
1762
+ readonly type: {
1763
+ readonly type: "string";
1764
+ readonly enum: readonly ["url"];
1765
+ };
1766
+ readonly labels: {
1767
+ readonly $ref: "#/$defs/FieldLabels";
1768
+ };
1769
+ readonly requiredToPublish: {
1770
+ readonly type: "boolean";
1771
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1772
+ };
1578
1773
  };
1579
- };
1580
- };
1581
- readonly Timestamp: {
1582
- readonly type: "string";
1583
- readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
1774
+ }, {
1775
+ readonly title: "ImageSubField";
1776
+ readonly type: "object";
1777
+ readonly additionalProperties: false;
1778
+ readonly required: readonly ["key", "type", "labels"];
1779
+ readonly properties: {
1780
+ readonly key: {
1781
+ readonly $ref: "#/$defs/FieldKey";
1782
+ };
1783
+ readonly type: {
1784
+ readonly type: "string";
1785
+ readonly enum: readonly ["image"];
1786
+ };
1787
+ readonly labels: {
1788
+ readonly $ref: "#/$defs/FieldLabels";
1789
+ };
1790
+ readonly requiredToPublish: {
1791
+ readonly type: "boolean";
1792
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1793
+ };
1794
+ };
1795
+ }, {
1796
+ readonly title: "SelectSubField";
1797
+ readonly type: "object";
1798
+ readonly additionalProperties: false;
1799
+ readonly required: readonly ["key", "type", "labels", "options"];
1800
+ readonly properties: {
1801
+ readonly key: {
1802
+ readonly $ref: "#/$defs/FieldKey";
1803
+ };
1804
+ readonly type: {
1805
+ readonly type: "string";
1806
+ readonly enum: readonly ["select"];
1807
+ };
1808
+ readonly labels: {
1809
+ readonly $ref: "#/$defs/FieldLabels";
1810
+ };
1811
+ readonly requiredToPublish: {
1812
+ readonly type: "boolean";
1813
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1814
+ };
1815
+ readonly options: {
1816
+ readonly type: "array";
1817
+ readonly minItems: 1;
1818
+ readonly maxItems: 50;
1819
+ readonly items: {
1820
+ readonly $ref: "#/$defs/FieldOption";
1821
+ };
1822
+ };
1823
+ };
1824
+ }, {
1825
+ readonly title: "ReferenceSubField";
1826
+ readonly type: "object";
1827
+ readonly additionalProperties: false;
1828
+ readonly required: readonly ["key", "type", "labels", "collections"];
1829
+ readonly properties: {
1830
+ readonly key: {
1831
+ readonly $ref: "#/$defs/FieldKey";
1832
+ };
1833
+ readonly type: {
1834
+ readonly type: "string";
1835
+ readonly enum: readonly ["reference"];
1836
+ };
1837
+ readonly labels: {
1838
+ readonly $ref: "#/$defs/FieldLabels";
1839
+ };
1840
+ readonly requiredToPublish: {
1841
+ readonly type: "boolean";
1842
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
1843
+ };
1844
+ readonly collections: {
1845
+ readonly type: "array";
1846
+ readonly description: "The collections a target may belong to (checked in code).";
1847
+ readonly minItems: 1;
1848
+ readonly maxItems: 5;
1849
+ readonly uniqueItems: true;
1850
+ readonly items: {
1851
+ readonly $ref: "#/$defs/Slug";
1852
+ };
1853
+ };
1854
+ };
1855
+ }];
1856
+ };
1857
+ readonly SurfaceComponent: {
1858
+ readonly type: "object";
1859
+ 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.";
1860
+ readonly additionalProperties: false;
1861
+ readonly required: readonly ["id", "component"];
1862
+ readonly properties: {
1863
+ readonly id: {
1864
+ readonly $ref: "#/$defs/SurfaceComponentId";
1865
+ };
1866
+ readonly component: {
1867
+ readonly type: "string";
1868
+ readonly pattern: "^(?:[A-Z][A-Za-z0-9]{1,40}|[a-z][a-z0-9-]{1,40})$";
1869
+ };
1870
+ readonly children: {
1871
+ readonly type: "array";
1872
+ readonly maxItems: 200;
1873
+ readonly items: {
1874
+ readonly $ref: "#/$defs/SurfaceComponentId";
1875
+ };
1876
+ };
1877
+ readonly props: {
1878
+ readonly type: "object";
1879
+ 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.";
1880
+ readonly additionalProperties: true;
1881
+ };
1882
+ readonly visible: {
1883
+ readonly type: "object";
1884
+ readonly description: "A visibility condition over the surface's data (`eq`, `ne`, `gt`, `lt`, `and`, `or`, `not`); validated by the store.";
1885
+ readonly additionalProperties: true;
1886
+ };
1887
+ readonly motion: {
1888
+ readonly type: "object";
1889
+ 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.";
1890
+ readonly additionalProperties: true;
1891
+ };
1892
+ };
1893
+ };
1894
+ readonly SurfaceComponentId: {
1895
+ readonly type: "string";
1896
+ readonly description: "A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1).";
1897
+ readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
1898
+ };
1899
+ readonly ThemeRef: {
1900
+ readonly type: "object";
1901
+ 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.";
1902
+ readonly additionalProperties: false;
1903
+ readonly required: readonly ["name"];
1904
+ readonly properties: {
1905
+ readonly name: {
1906
+ readonly $ref: "#/$defs/Slug";
1907
+ };
1908
+ readonly version: {
1909
+ readonly type: "string";
1910
+ readonly maxLength: 64;
1911
+ };
1912
+ readonly config: {
1913
+ readonly type: "object";
1914
+ readonly additionalProperties: true;
1915
+ };
1916
+ };
1917
+ };
1918
+ readonly Timestamp: {
1919
+ readonly type: "string";
1920
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
1584
1921
  readonly format: "date-time";
1585
1922
  };
1586
1923
  readonly TimeZone: {
@@ -2711,7 +3048,7 @@ export declare const ContentEntrySchema: {
2711
3048
  };
2712
3049
  readonly fields: {
2713
3050
  readonly type: "object";
2714
- 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.";
3051
+ 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. A reference value is a translation group id or a list of them, a repeater value a list of flat objects (RFC-0045).";
2715
3052
  readonly additionalProperties: true;
2716
3053
  };
2717
3054
  readonly tags: {
@@ -6594,47 +6931,677 @@ export declare const GlossarySchema: {
6594
6931
  };
6595
6932
  };
6596
6933
  };
6597
- export declare const schemas: {
6598
- readonly project: {
6599
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
6600
- readonly $id: "https://cloudhal.dev/schemas/v1/project.schema.json";
6601
- readonly title: "Project";
6602
- readonly description: "Top-level ownership boundary. A project belongs to one owner (human or organisation) and groups one or more sites. In Cloud it maps to a tenant.";
6603
- readonly type: "object";
6604
- readonly additionalProperties: false;
6605
- readonly required: readonly ["schemaVersion", "id", "name", "slug", "ownerId", "siteIds", "rev", "createdAt", "updatedAt"];
6606
- readonly properties: {
6607
- readonly schemaVersion: {
6608
- readonly $ref: "#/$defs/SchemaVersion";
6609
- };
6610
- readonly id: {
6611
- readonly $ref: "#/$defs/Id";
6612
- };
6613
- readonly name: {
6614
- readonly type: "string";
6615
- readonly minLength: 1;
6616
- readonly maxLength: 200;
6934
+ export declare const ReleaseManifestSchema: {
6935
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
6936
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-manifest.schema.json";
6937
+ readonly title: "ReleaseManifest";
6938
+ readonly description: "cloudhal.release-manifest@1 (RFC-0046): the manifest of one Cloudhal release bundle, published as the release asset manifest.json next to the gzip tarball cloudhal-release-<version>.tar.gz. A project release is signed through release-statement.json, which pins this file's SHA-256 and size (signing.signature = release-statement.sig); the legacy form manifest.sig, a raw 64-byte Ed25519 signature over these exact bytes, is for development keys only. It describes every built Worker module and static asset by size and SHA-256, the binding templates, feature levels, migration range and rollback facts a remote deployer needs to install, update or refuse a version without running a build. Portable on purpose: it references common only for SchemaVersion and Timestamp; every other definition is local.";
6939
+ readonly type: "object";
6940
+ readonly additionalProperties: false;
6941
+ readonly required: readonly ["schemaVersion", "format", "version", "channel", "securityRelease", "commit", "createdAt", "contracts", "levels", "migrations", "durableObjects", "runtime", "toolchain", "theme", "skills", "workers", "bindingTemplates", "requiredScopes", "optionalScopes", "requiredCapabilities", "optionalCapabilities", "starter", "features", "planVersion", "signing"];
6942
+ readonly properties: {
6943
+ readonly schemaVersion: {
6944
+ readonly $ref: "#/$defs/SchemaVersion";
6945
+ };
6946
+ readonly format: {
6947
+ readonly type: "string";
6948
+ readonly enum: readonly ["cloudhal.release-manifest@1"];
6949
+ };
6950
+ readonly version: {
6951
+ readonly $ref: "#/$defs/CloudhalVersion";
6952
+ };
6953
+ readonly channel: {
6954
+ readonly type: "string";
6955
+ readonly enum: readonly ["stable", "next"];
6956
+ };
6957
+ readonly securityRelease: {
6958
+ readonly type: "boolean";
6959
+ };
6960
+ readonly commit: {
6961
+ readonly type: "string";
6962
+ readonly pattern: "^[0-9a-f]{40}$";
6963
+ };
6964
+ readonly createdAt: {
6965
+ readonly $ref: "#/$defs/Timestamp";
6966
+ };
6967
+ readonly contracts: {
6968
+ readonly type: "object";
6969
+ readonly additionalProperties: false;
6970
+ readonly required: readonly ["schemaVersion"];
6971
+ readonly properties: {
6972
+ readonly schemaVersion: {
6973
+ readonly type: "integer";
6974
+ readonly enum: readonly [1];
6975
+ };
6617
6976
  };
6618
- readonly slug: {
6619
- readonly $ref: "#/$defs/Slug";
6977
+ };
6978
+ readonly levels: {
6979
+ readonly type: "object";
6980
+ readonly additionalProperties: false;
6981
+ readonly required: readonly ["schedules", "gates"];
6982
+ readonly properties: {
6983
+ readonly schedules: {
6984
+ readonly type: "integer";
6985
+ readonly minimum: 0;
6986
+ };
6987
+ readonly gates: {
6988
+ readonly type: "integer";
6989
+ readonly minimum: 0;
6990
+ };
6620
6991
  };
6621
- readonly ownerId: {
6622
- readonly $ref: "#/$defs/Id";
6992
+ };
6993
+ readonly migrations: {
6994
+ readonly type: "object";
6995
+ readonly additionalProperties: false;
6996
+ readonly required: readonly ["first", "last", "count", "names", "compatibleWithPrevious"];
6997
+ readonly properties: {
6998
+ readonly first: {
6999
+ readonly $ref: "#/$defs/MigrationName";
7000
+ };
7001
+ readonly last: {
7002
+ readonly $ref: "#/$defs/MigrationName";
7003
+ };
7004
+ readonly count: {
7005
+ readonly type: "integer";
7006
+ readonly minimum: 1;
7007
+ };
7008
+ readonly names: {
7009
+ readonly type: "array";
7010
+ readonly minItems: 1;
7011
+ readonly uniqueItems: true;
7012
+ readonly items: {
7013
+ readonly $ref: "#/$defs/MigrationName";
7014
+ };
7015
+ };
7016
+ readonly compatibleWithPrevious: {
7017
+ readonly type: "boolean";
7018
+ };
6623
7019
  };
6624
- readonly siteIds: {
6625
- readonly type: "array";
6626
- readonly items: {
6627
- readonly $ref: "#/$defs/Id";
7020
+ };
7021
+ readonly durableObjects: {
7022
+ readonly type: "object";
7023
+ readonly additionalProperties: false;
7024
+ readonly required: readonly ["bindings", "lifecycleChange"];
7025
+ readonly properties: {
7026
+ readonly bindings: {
7027
+ readonly type: "array";
7028
+ readonly items: {
7029
+ readonly type: "object";
7030
+ readonly additionalProperties: false;
7031
+ readonly required: readonly ["name", "className", "migration"];
7032
+ readonly properties: {
7033
+ readonly name: {
7034
+ readonly $ref: "#/$defs/BindingName";
7035
+ };
7036
+ readonly className: {
7037
+ readonly type: "string";
7038
+ readonly pattern: "^[A-Z][A-Za-z0-9]*$";
7039
+ };
7040
+ readonly migration: {
7041
+ readonly type: "string";
7042
+ readonly pattern: "^v[1-9][0-9]*$";
7043
+ };
7044
+ };
7045
+ };
7046
+ };
7047
+ readonly lifecycleChange: {
7048
+ readonly type: "boolean";
6628
7049
  };
6629
- readonly uniqueItems: true;
6630
7050
  };
6631
- readonly rev: {
6632
- readonly $ref: "#/$defs/Revision";
7051
+ };
7052
+ readonly runtime: {
7053
+ readonly type: "object";
7054
+ readonly additionalProperties: false;
7055
+ readonly required: readonly ["compatibilityDate", "compatibilityFlags"];
7056
+ readonly properties: {
7057
+ readonly compatibilityDate: {
7058
+ readonly type: "string";
7059
+ readonly pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
7060
+ };
7061
+ readonly compatibilityFlags: {
7062
+ readonly type: "array";
7063
+ readonly uniqueItems: true;
7064
+ readonly items: {
7065
+ readonly type: "string";
7066
+ readonly pattern: "^[a-z0-9_]+$";
7067
+ };
7068
+ };
6633
7069
  };
6634
- readonly createdAt: {
6635
- readonly $ref: "#/$defs/Timestamp";
7070
+ };
7071
+ readonly toolchain: {
7072
+ readonly type: "object";
7073
+ readonly additionalProperties: {
7074
+ readonly type: "string";
7075
+ readonly maxLength: 64;
6636
7076
  };
6637
- readonly updatedAt: {
7077
+ };
7078
+ readonly theme: {
7079
+ readonly type: "object";
7080
+ readonly additionalProperties: false;
7081
+ readonly required: readonly ["name", "version", "blockTypes", "settingsSha256", "designSha256"];
7082
+ readonly properties: {
7083
+ readonly name: {
7084
+ readonly type: "string";
7085
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
7086
+ };
7087
+ readonly version: {
7088
+ readonly type: "string";
7089
+ readonly maxLength: 64;
7090
+ };
7091
+ readonly blockTypes: {
7092
+ readonly type: "array";
7093
+ readonly uniqueItems: true;
7094
+ readonly items: {
7095
+ readonly type: "string";
7096
+ };
7097
+ };
7098
+ readonly settingsSha256: {
7099
+ readonly $ref: "#/$defs/Sha256Hex";
7100
+ };
7101
+ readonly designSha256: {
7102
+ readonly $ref: "#/$defs/Sha256Hex";
7103
+ };
7104
+ };
7105
+ };
7106
+ readonly skills: {
7107
+ readonly type: "array";
7108
+ readonly items: {
7109
+ readonly type: "object";
7110
+ readonly additionalProperties: false;
7111
+ readonly required: readonly ["name", "sha256"];
7112
+ readonly properties: {
7113
+ readonly name: {
7114
+ readonly type: "string";
7115
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
7116
+ };
7117
+ readonly sha256: {
7118
+ readonly $ref: "#/$defs/Sha256Hex";
7119
+ };
7120
+ };
7121
+ };
7122
+ };
7123
+ readonly workers: {
7124
+ readonly type: "object";
7125
+ readonly additionalProperties: false;
7126
+ readonly required: readonly ["site", "admin"];
7127
+ readonly properties: {
7128
+ readonly site: {
7129
+ readonly $ref: "#/$defs/WorkerArtifact";
7130
+ };
7131
+ readonly admin: {
7132
+ readonly $ref: "#/$defs/WorkerArtifact";
7133
+ };
7134
+ };
7135
+ };
7136
+ readonly bindingTemplates: {
7137
+ readonly type: "object";
7138
+ readonly additionalProperties: false;
7139
+ readonly required: readonly ["site", "admin"];
7140
+ readonly properties: {
7141
+ readonly site: {
7142
+ readonly $ref: "#/$defs/BindingTemplate";
7143
+ };
7144
+ readonly admin: {
7145
+ readonly $ref: "#/$defs/BindingTemplate";
7146
+ };
7147
+ };
7148
+ };
7149
+ readonly requiredScopes: {
7150
+ readonly type: "array";
7151
+ readonly uniqueItems: true;
7152
+ readonly items: {
7153
+ readonly $ref: "#/$defs/ScopeId";
7154
+ };
7155
+ };
7156
+ readonly optionalScopes: {
7157
+ readonly type: "array";
7158
+ readonly uniqueItems: true;
7159
+ readonly items: {
7160
+ readonly $ref: "#/$defs/ScopeId";
7161
+ };
7162
+ };
7163
+ readonly requiredCapabilities: {
7164
+ readonly type: "array";
7165
+ readonly uniqueItems: true;
7166
+ readonly items: {
7167
+ readonly $ref: "#/$defs/Capability";
7168
+ };
7169
+ };
7170
+ readonly optionalCapabilities: {
7171
+ readonly type: "array";
7172
+ readonly uniqueItems: true;
7173
+ readonly items: {
7174
+ readonly $ref: "#/$defs/Capability";
7175
+ };
7176
+ };
7177
+ readonly starter: {
7178
+ readonly oneOf: readonly [{
7179
+ readonly type: "object";
7180
+ readonly additionalProperties: false;
7181
+ readonly required: readonly ["kind"];
7182
+ readonly properties: {
7183
+ readonly kind: {
7184
+ readonly type: "string";
7185
+ readonly enum: readonly ["admin-api"];
7186
+ };
7187
+ };
7188
+ }, {
7189
+ readonly type: "object";
7190
+ readonly additionalProperties: false;
7191
+ readonly required: readonly ["kind", "path", "bytes", "sha256", "siteId"];
7192
+ readonly properties: {
7193
+ readonly kind: {
7194
+ readonly type: "string";
7195
+ readonly enum: readonly ["bundle"];
7196
+ };
7197
+ readonly path: {
7198
+ readonly type: "string";
7199
+ readonly pattern: "^starter/[A-Za-z0-9._-]+$";
7200
+ };
7201
+ readonly bytes: {
7202
+ readonly type: "integer";
7203
+ readonly minimum: 1;
7204
+ };
7205
+ readonly sha256: {
7206
+ readonly $ref: "#/$defs/Sha256Hex";
7207
+ };
7208
+ readonly siteId: {
7209
+ readonly $ref: "#/$defs/SiteId";
7210
+ };
7211
+ };
7212
+ }];
7213
+ };
7214
+ readonly features: {
7215
+ readonly type: "object";
7216
+ readonly additionalProperties: {
7217
+ readonly type: "boolean";
7218
+ };
7219
+ readonly required: readonly ["adminSitesAcceptsSiteId", "healthReportsVersion", "mediaTransformVar"];
7220
+ readonly properties: {
7221
+ readonly adminSitesAcceptsSiteId: {
7222
+ readonly type: "boolean";
7223
+ };
7224
+ readonly healthReportsVersion: {
7225
+ readonly type: "boolean";
7226
+ };
7227
+ readonly mediaTransformVar: {
7228
+ readonly type: "boolean";
7229
+ };
7230
+ };
7231
+ };
7232
+ readonly planVersion: {
7233
+ readonly type: "integer";
7234
+ readonly minimum: 1;
7235
+ };
7236
+ readonly signing: {
7237
+ readonly type: "object";
7238
+ readonly additionalProperties: false;
7239
+ readonly required: readonly ["keyId", "algorithm", "signature"];
7240
+ readonly properties: {
7241
+ readonly keyId: {
7242
+ readonly type: "string";
7243
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
7244
+ };
7245
+ readonly algorithm: {
7246
+ readonly type: "string";
7247
+ readonly enum: readonly ["Ed25519"];
7248
+ };
7249
+ readonly signature: {
7250
+ readonly type: "string";
7251
+ readonly enum: readonly ["manifest.sig", "release-statement.sig"];
7252
+ };
7253
+ };
7254
+ };
7255
+ };
7256
+ readonly $defs: {
7257
+ readonly BindingName: {
7258
+ readonly type: "string";
7259
+ readonly pattern: "^[A-Z][A-Z0-9_]*(_\\*)?$";
7260
+ };
7261
+ readonly BindingTemplate: {
7262
+ readonly type: "object";
7263
+ readonly additionalProperties: false;
7264
+ readonly required: readonly ["bindings", "vars", "secrets"];
7265
+ readonly properties: {
7266
+ readonly bindings: {
7267
+ readonly type: "array";
7268
+ readonly items: {
7269
+ readonly type: "object";
7270
+ readonly additionalProperties: false;
7271
+ readonly required: readonly ["name", "type", "required"];
7272
+ readonly properties: {
7273
+ readonly name: {
7274
+ readonly $ref: "#/$defs/BindingName";
7275
+ };
7276
+ readonly type: {
7277
+ readonly type: "string";
7278
+ readonly enum: readonly ["d1", "r2_bucket", "assets", "service", "durable_object_namespace", "analytics_engine", "analytics_sql", "ratelimit", "ai_search", "send_email", "ai", "browser"];
7279
+ };
7280
+ readonly required: {
7281
+ readonly type: "boolean";
7282
+ };
7283
+ readonly aliases: {
7284
+ readonly type: "array";
7285
+ readonly items: {
7286
+ readonly $ref: "#/$defs/BindingName";
7287
+ };
7288
+ };
7289
+ };
7290
+ };
7291
+ };
7292
+ readonly vars: {
7293
+ readonly type: "array";
7294
+ readonly uniqueItems: true;
7295
+ readonly items: {
7296
+ readonly $ref: "#/$defs/BindingName";
7297
+ };
7298
+ };
7299
+ readonly secrets: {
7300
+ readonly type: "array";
7301
+ readonly uniqueItems: true;
7302
+ readonly items: {
7303
+ readonly $ref: "#/$defs/SecretName";
7304
+ };
7305
+ };
7306
+ readonly cache: {
7307
+ readonly type: "boolean";
7308
+ };
7309
+ readonly cron: {
7310
+ readonly type: "string";
7311
+ readonly pattern: "^[0-9*/,\\- ]+$";
7312
+ };
7313
+ };
7314
+ };
7315
+ readonly Capability: {
7316
+ readonly type: "string";
7317
+ readonly enum: readonly ["account", "workers", "d1", "r2", "analytics", "domains"];
7318
+ };
7319
+ readonly CloudhalVersion: {
7320
+ readonly type: "string";
7321
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
7322
+ };
7323
+ readonly MigrationName: {
7324
+ readonly type: "string";
7325
+ readonly pattern: "^[0-9]{4}_[a-z0-9_]+$";
7326
+ };
7327
+ readonly SchemaVersion: {
7328
+ readonly type: "integer";
7329
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7330
+ readonly enum: readonly [1];
7331
+ };
7332
+ readonly ScopeId: {
7333
+ readonly type: "string";
7334
+ readonly pattern: "^[a-z0-9-]+(\\.[a-z0-9-]+)+$";
7335
+ };
7336
+ readonly SecretName: {
7337
+ readonly type: "string";
7338
+ readonly enum: readonly ["BETTER_AUTH_SECRET", "MCP_STATE_KEY", "CLOUDHAL_PREVIEW_SECRET", "CLOUDHAL_PURGE_TOKEN", "CLOUDHAL_DEPLOY_TOKEN", "CLOUDHAL_SETUP_TOKEN", "CLOUDHAL_COMMENTS_KEY"];
7339
+ };
7340
+ readonly Sha256Hex: {
7341
+ readonly type: "string";
7342
+ readonly pattern: "^[0-9a-f]{64}$";
7343
+ };
7344
+ readonly SiteId: {
7345
+ readonly type: "string";
7346
+ readonly pattern: "^site_[A-Za-z0-9]{6,32}$";
7347
+ };
7348
+ readonly Timestamp: {
7349
+ readonly type: "string";
7350
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7351
+ readonly format: "date-time";
7352
+ };
7353
+ readonly WorkerArtifact: {
7354
+ readonly type: "object";
7355
+ readonly additionalProperties: false;
7356
+ readonly required: readonly ["mainModule", "modules", "assets"];
7357
+ readonly properties: {
7358
+ readonly mainModule: {
7359
+ readonly type: "string";
7360
+ readonly pattern: "^[A-Za-z0-9._/-]+$";
7361
+ };
7362
+ readonly modules: {
7363
+ readonly type: "array";
7364
+ readonly minItems: 1;
7365
+ readonly items: {
7366
+ readonly type: "object";
7367
+ readonly additionalProperties: false;
7368
+ readonly required: readonly ["path", "type", "bytes", "sha256"];
7369
+ readonly properties: {
7370
+ readonly path: {
7371
+ readonly type: "string";
7372
+ readonly pattern: "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*$";
7373
+ };
7374
+ readonly type: {
7375
+ readonly type: "string";
7376
+ readonly enum: readonly ["esm", "cjs", "wasm", "text", "data"];
7377
+ };
7378
+ readonly bytes: {
7379
+ readonly type: "integer";
7380
+ readonly minimum: 1;
7381
+ };
7382
+ readonly sha256: {
7383
+ readonly $ref: "#/$defs/Sha256Hex";
7384
+ };
7385
+ };
7386
+ };
7387
+ };
7388
+ readonly assets: {
7389
+ readonly type: "object";
7390
+ readonly additionalProperties: false;
7391
+ readonly required: readonly ["count", "bytes", "files", "headers"];
7392
+ readonly properties: {
7393
+ readonly count: {
7394
+ readonly type: "integer";
7395
+ readonly minimum: 0;
7396
+ readonly maximum: 20000;
7397
+ };
7398
+ readonly bytes: {
7399
+ readonly type: "integer";
7400
+ readonly minimum: 0;
7401
+ };
7402
+ readonly files: {
7403
+ readonly type: "array";
7404
+ readonly maxItems: 20000;
7405
+ readonly items: {
7406
+ readonly type: "object";
7407
+ readonly additionalProperties: false;
7408
+ readonly required: readonly ["path", "bytes", "sha256", "assetHash", "contentType"];
7409
+ readonly properties: {
7410
+ readonly path: {
7411
+ readonly type: "string";
7412
+ readonly pattern: "^/[^\\s]*$";
7413
+ readonly maxLength: 1024;
7414
+ };
7415
+ readonly bytes: {
7416
+ readonly type: "integer";
7417
+ readonly minimum: 0;
7418
+ readonly maximum: 26214400;
7419
+ };
7420
+ readonly sha256: {
7421
+ readonly $ref: "#/$defs/Sha256Hex";
7422
+ };
7423
+ readonly assetHash: {
7424
+ readonly type: "string";
7425
+ readonly pattern: "^[0-9a-f]{32}$";
7426
+ };
7427
+ readonly contentType: {
7428
+ readonly type: "string";
7429
+ readonly maxLength: 128;
7430
+ };
7431
+ };
7432
+ };
7433
+ };
7434
+ readonly headers: {
7435
+ readonly type: "string";
7436
+ readonly maxLength: 100000;
7437
+ };
7438
+ readonly config: {
7439
+ readonly type: "object";
7440
+ readonly additionalProperties: false;
7441
+ readonly properties: {
7442
+ readonly not_found_handling: {
7443
+ readonly type: "string";
7444
+ readonly enum: readonly ["none", "404-page", "single-page-application"];
7445
+ };
7446
+ readonly run_worker_first: {
7447
+ readonly type: "array";
7448
+ readonly items: {
7449
+ readonly type: "string";
7450
+ readonly pattern: "^/";
7451
+ };
7452
+ };
7453
+ };
7454
+ };
7455
+ };
7456
+ };
7457
+ readonly bindingTemplate: {
7458
+ readonly type: "string";
7459
+ readonly enum: readonly ["site", "admin"];
7460
+ };
7461
+ };
7462
+ };
7463
+ };
7464
+ };
7465
+ export declare const ReleaseStatementSchema: {
7466
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7467
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-statement.schema.json";
7468
+ readonly title: "ReleaseStatement";
7469
+ readonly description: "cloudhal.release-statement@1 (RFC-0046): the small canonical document a Cloudhal release signs, published as the release asset release-statement.json next to release-statement.sig (a raw 64-byte Ed25519 signature over the exact bytes, at most 4096 of them). It names the version, channel, commit and key id and pins the SHA-256 and size of manifest.json and of the tarball, so a remote deployer verifies one small file and then checks every other asset by digest. Canonical bytes: keys sorted recursively, 2-space indent, a trailing newline; a consumer verifies the bytes it downloaded and never re-serialises them. Portable on purpose: it references common only for SchemaVersion and Timestamp.";
7470
+ readonly type: "object";
7471
+ readonly additionalProperties: false;
7472
+ readonly required: readonly ["schemaVersion", "format", "version", "channel", "securityRelease", "commit", "createdAt", "signing", "manifest", "tarball"];
7473
+ readonly properties: {
7474
+ readonly schemaVersion: {
7475
+ readonly $ref: "#/$defs/SchemaVersion";
7476
+ };
7477
+ readonly format: {
7478
+ readonly type: "string";
7479
+ readonly enum: readonly ["cloudhal.release-statement@1"];
7480
+ };
7481
+ readonly version: {
7482
+ readonly $ref: "#/$defs/CloudhalVersion";
7483
+ };
7484
+ readonly channel: {
7485
+ readonly type: "string";
7486
+ readonly enum: readonly ["stable", "next"];
7487
+ };
7488
+ readonly securityRelease: {
7489
+ readonly type: "boolean";
7490
+ };
7491
+ readonly commit: {
7492
+ readonly type: "string";
7493
+ readonly pattern: "^[0-9a-f]{40}$";
7494
+ };
7495
+ readonly createdAt: {
7496
+ readonly $ref: "#/$defs/Timestamp";
7497
+ };
7498
+ readonly signing: {
7499
+ readonly type: "object";
7500
+ readonly additionalProperties: false;
7501
+ readonly required: readonly ["keyId", "algorithm", "signature"];
7502
+ readonly properties: {
7503
+ readonly keyId: {
7504
+ readonly type: "string";
7505
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
7506
+ };
7507
+ readonly algorithm: {
7508
+ readonly type: "string";
7509
+ readonly enum: readonly ["Ed25519"];
7510
+ };
7511
+ readonly signature: {
7512
+ readonly type: "string";
7513
+ readonly enum: readonly ["release-statement.sig"];
7514
+ };
7515
+ };
7516
+ };
7517
+ readonly manifest: {
7518
+ readonly $ref: "#/$defs/StatementAsset";
7519
+ };
7520
+ readonly tarball: {
7521
+ readonly $ref: "#/$defs/StatementAsset";
7522
+ };
7523
+ };
7524
+ readonly $defs: {
7525
+ readonly CloudhalVersion: {
7526
+ readonly type: "string";
7527
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
7528
+ };
7529
+ readonly SchemaVersion: {
7530
+ readonly type: "integer";
7531
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7532
+ readonly enum: readonly [1];
7533
+ };
7534
+ readonly Sha256Hex: {
7535
+ readonly type: "string";
7536
+ readonly pattern: "^[0-9a-f]{64}$";
7537
+ };
7538
+ readonly StatementAsset: {
7539
+ readonly type: "object";
7540
+ readonly additionalProperties: false;
7541
+ readonly required: readonly ["name", "sha256", "bytes"];
7542
+ readonly properties: {
7543
+ readonly name: {
7544
+ readonly type: "string";
7545
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$";
7546
+ };
7547
+ readonly sha256: {
7548
+ readonly $ref: "#/$defs/Sha256Hex";
7549
+ };
7550
+ readonly bytes: {
7551
+ readonly type: "integer";
7552
+ readonly minimum: 1;
7553
+ readonly maximum: 104857600;
7554
+ };
7555
+ };
7556
+ };
7557
+ readonly Timestamp: {
7558
+ readonly type: "string";
7559
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7560
+ readonly format: "date-time";
7561
+ };
7562
+ };
7563
+ };
7564
+ export declare const schemas: {
7565
+ readonly project: {
7566
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7567
+ readonly $id: "https://cloudhal.dev/schemas/v1/project.schema.json";
7568
+ readonly title: "Project";
7569
+ readonly description: "Top-level ownership boundary. A project belongs to one owner (human or organisation) and groups one or more sites. In Cloud it maps to a tenant.";
7570
+ readonly type: "object";
7571
+ readonly additionalProperties: false;
7572
+ readonly required: readonly ["schemaVersion", "id", "name", "slug", "ownerId", "siteIds", "rev", "createdAt", "updatedAt"];
7573
+ readonly properties: {
7574
+ readonly schemaVersion: {
7575
+ readonly $ref: "#/$defs/SchemaVersion";
7576
+ };
7577
+ readonly id: {
7578
+ readonly $ref: "#/$defs/Id";
7579
+ };
7580
+ readonly name: {
7581
+ readonly type: "string";
7582
+ readonly minLength: 1;
7583
+ readonly maxLength: 200;
7584
+ };
7585
+ readonly slug: {
7586
+ readonly $ref: "#/$defs/Slug";
7587
+ };
7588
+ readonly ownerId: {
7589
+ readonly $ref: "#/$defs/Id";
7590
+ };
7591
+ readonly siteIds: {
7592
+ readonly type: "array";
7593
+ readonly items: {
7594
+ readonly $ref: "#/$defs/Id";
7595
+ };
7596
+ readonly uniqueItems: true;
7597
+ };
7598
+ readonly rev: {
7599
+ readonly $ref: "#/$defs/Revision";
7600
+ };
7601
+ readonly createdAt: {
7602
+ readonly $ref: "#/$defs/Timestamp";
7603
+ };
7604
+ readonly updatedAt: {
6638
7605
  readonly $ref: "#/$defs/Timestamp";
6639
7606
  };
6640
7607
  readonly metadata: {
@@ -7533,6 +8500,112 @@ export declare const schemas: {
7533
8500
  readonly description: "The value is a list of option values. Absent: false.";
7534
8501
  };
7535
8502
  };
8503
+ }, {
8504
+ readonly title: "ReferenceField";
8505
+ readonly type: "object";
8506
+ readonly description: "RFC-0045: entries of other (or this) collections of the same site, by translation group id (entry_…): the id of the group's original, which every language version and edition carries in translation.group.";
8507
+ readonly additionalProperties: false;
8508
+ readonly required: readonly ["key", "type", "labels", "localized", "collections"];
8509
+ readonly properties: {
8510
+ readonly key: {
8511
+ readonly $ref: "#/$defs/FieldKey";
8512
+ };
8513
+ readonly type: {
8514
+ readonly type: "string";
8515
+ readonly enum: readonly ["reference"];
8516
+ };
8517
+ readonly labels: {
8518
+ readonly $ref: "#/$defs/FieldLabels";
8519
+ };
8520
+ readonly localized: {
8521
+ readonly type: "boolean";
8522
+ readonly description: "true: each language version picks its own targets; false: only the translation group's original holds them, and every version resolves them in its own language.";
8523
+ };
8524
+ readonly requiredToPublish: {
8525
+ readonly type: "boolean";
8526
+ readonly description: "An entry in review or published needs at least one target. Absent: false.";
8527
+ };
8528
+ readonly migration: {
8529
+ readonly $ref: "#/$defs/FieldMigration";
8530
+ };
8531
+ readonly collections: {
8532
+ readonly type: "array";
8533
+ readonly description: "The collections a target may belong to: declared collections of this site (checked in code).";
8534
+ readonly minItems: 1;
8535
+ readonly maxItems: 5;
8536
+ readonly uniqueItems: true;
8537
+ readonly items: {
8538
+ readonly $ref: "#/$defs/Slug";
8539
+ };
8540
+ };
8541
+ readonly multiple: {
8542
+ readonly type: "boolean";
8543
+ readonly description: "The value is an ordered list of targets. Absent: false.";
8544
+ };
8545
+ readonly maxItems: {
8546
+ readonly type: "integer";
8547
+ readonly description: "With multiple: at most this many targets. Absent: 20.";
8548
+ readonly minimum: 1;
8549
+ readonly maximum: 50;
8550
+ };
8551
+ readonly where: {
8552
+ readonly type: "array";
8553
+ readonly description: "Only with one target collection: conditions on its list fields that a newly chosen target must meet (no `now`; checked in code). Narrows the picker; not re-checked when the target changes later.";
8554
+ readonly minItems: 1;
8555
+ readonly maxItems: 4;
8556
+ readonly items: {
8557
+ readonly $ref: "#/$defs/FieldCondition";
8558
+ };
8559
+ };
8560
+ };
8561
+ }, {
8562
+ readonly title: "RepeaterField";
8563
+ readonly type: "object";
8564
+ readonly description: "RFC-0045: an ordered list of items, each a flat object of sub-fields. A repeater cannot contain a repeater.";
8565
+ readonly additionalProperties: false;
8566
+ readonly required: readonly ["key", "type", "labels", "localized", "fields"];
8567
+ readonly properties: {
8568
+ readonly key: {
8569
+ readonly $ref: "#/$defs/FieldKey";
8570
+ };
8571
+ readonly type: {
8572
+ readonly type: "string";
8573
+ readonly enum: readonly ["repeater"];
8574
+ };
8575
+ readonly labels: {
8576
+ readonly $ref: "#/$defs/FieldLabels";
8577
+ };
8578
+ readonly localized: {
8579
+ readonly type: "boolean";
8580
+ readonly description: "true: each language version has its own list (missing reads the original's); false: only the original holds the list.";
8581
+ };
8582
+ readonly requiredToPublish: {
8583
+ readonly type: "boolean";
8584
+ readonly description: "An entry in review or published needs at least one item. Absent: false.";
8585
+ };
8586
+ readonly migration: {
8587
+ readonly $ref: "#/$defs/FieldMigration";
8588
+ };
8589
+ readonly fields: {
8590
+ readonly type: "array";
8591
+ readonly description: "The sub-fields of every item, in form order. Unique keys (checked in code).";
8592
+ readonly minItems: 1;
8593
+ readonly maxItems: 10;
8594
+ readonly items: {
8595
+ readonly $ref: "#/$defs/SubFieldDefinition";
8596
+ };
8597
+ };
8598
+ readonly maxItems: {
8599
+ readonly type: "integer";
8600
+ readonly description: "At most this many items. Absent: 20.";
8601
+ readonly minimum: 1;
8602
+ readonly maximum: 50;
8603
+ };
8604
+ readonly itemLabel: {
8605
+ readonly $ref: "#/$defs/FieldKey";
8606
+ readonly description: "The text, select or reference sub-field that names an item in Studio and approval prompts. Absent: the first such sub-field.";
8607
+ };
8608
+ };
7536
8609
  }];
7537
8610
  };
7538
8611
  readonly FieldKey: {
@@ -7582,11 +8655,15 @@ export declare const schemas: {
7582
8655
  };
7583
8656
  readonly fromType: {
7584
8657
  readonly type: "string";
7585
- readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select"];
8658
+ readonly enum: readonly ["text", "richText", "number", "boolean", "date", "datetime", "url", "image", "select", "reference", "repeater"];
7586
8659
  };
7587
8660
  readonly fromLocalized: {
7588
8661
  readonly type: "boolean";
7589
8662
  };
8663
+ readonly sub: {
8664
+ readonly $ref: "#/$defs/FieldKey";
8665
+ readonly description: "RFC-0045: the repeater's sub-field the operation rewrites (its key once the operation is done); fromKey and fromType then describe the sub-field.";
8666
+ };
7590
8667
  };
7591
8668
  };
7592
8669
  readonly FieldOption: {
@@ -8084,28 +9161,255 @@ export declare const schemas: {
8084
9161
  readonly properties: {
8085
9162
  readonly kind: {
8086
9163
  readonly type: "string";
8087
- readonly enum: readonly ["site"];
9164
+ readonly enum: readonly ["site"];
9165
+ };
9166
+ readonly property: {
9167
+ readonly $ref: "#/$defs/SiteValueProperty";
9168
+ };
9169
+ };
9170
+ }, {
9171
+ readonly title: "ConstantValueSource";
9172
+ readonly type: "object";
9173
+ readonly description: "A plain-text constant: no control characters, no markup meaning; vocabulary-checked on enum paths (in code).";
9174
+ readonly additionalProperties: false;
9175
+ readonly required: readonly ["kind", "value"];
9176
+ readonly properties: {
9177
+ readonly kind: {
9178
+ readonly type: "string";
9179
+ readonly enum: readonly ["constant"];
9180
+ };
9181
+ readonly value: {
9182
+ readonly type: "string";
9183
+ readonly minLength: 1;
9184
+ readonly maxLength: 200;
9185
+ readonly pattern: "^[^\\x00-\\x1F\\x7F]+$";
9186
+ };
9187
+ };
9188
+ }];
9189
+ };
9190
+ readonly SubFieldDefinition: {
9191
+ readonly description: "RFC-0045: one sub-field of a repeater item, discriminated by `type`. Only types whose value is a scalar: no datetime, no multiple select or reference, no repeater. No localized and no migration: the repeater's apply.";
9192
+ readonly oneOf: readonly [{
9193
+ readonly title: "TextSubField";
9194
+ readonly type: "object";
9195
+ readonly additionalProperties: false;
9196
+ readonly required: readonly ["key", "type", "labels"];
9197
+ readonly properties: {
9198
+ readonly key: {
9199
+ readonly $ref: "#/$defs/FieldKey";
9200
+ };
9201
+ readonly type: {
9202
+ readonly type: "string";
9203
+ readonly enum: readonly ["text"];
9204
+ };
9205
+ readonly labels: {
9206
+ readonly $ref: "#/$defs/FieldLabels";
9207
+ };
9208
+ readonly requiredToPublish: {
9209
+ readonly type: "boolean";
9210
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9211
+ };
9212
+ readonly maxLength: {
9213
+ readonly type: "integer";
9214
+ readonly description: "Absent: 5000.";
9215
+ readonly minimum: 1;
9216
+ readonly maximum: 5000;
9217
+ };
9218
+ readonly multiline: {
9219
+ readonly type: "boolean";
9220
+ readonly description: "Line breaks allowed. Absent: false.";
9221
+ };
9222
+ };
9223
+ }, {
9224
+ readonly title: "RichTextSubField";
9225
+ readonly type: "object";
9226
+ readonly additionalProperties: false;
9227
+ readonly required: readonly ["key", "type", "labels"];
9228
+ readonly properties: {
9229
+ readonly key: {
9230
+ readonly $ref: "#/$defs/FieldKey";
9231
+ };
9232
+ readonly type: {
9233
+ readonly type: "string";
9234
+ readonly enum: readonly ["richText"];
9235
+ };
9236
+ readonly labels: {
9237
+ readonly $ref: "#/$defs/FieldLabels";
9238
+ };
9239
+ readonly requiredToPublish: {
9240
+ readonly type: "boolean";
9241
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9242
+ };
9243
+ };
9244
+ }, {
9245
+ readonly title: "NumberSubField";
9246
+ readonly type: "object";
9247
+ readonly additionalProperties: false;
9248
+ readonly required: readonly ["key", "type", "labels"];
9249
+ readonly properties: {
9250
+ readonly key: {
9251
+ readonly $ref: "#/$defs/FieldKey";
9252
+ };
9253
+ readonly type: {
9254
+ readonly type: "string";
9255
+ readonly enum: readonly ["number"];
9256
+ };
9257
+ readonly labels: {
9258
+ readonly $ref: "#/$defs/FieldLabels";
9259
+ };
9260
+ readonly requiredToPublish: {
9261
+ readonly type: "boolean";
9262
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9263
+ };
9264
+ readonly integer: {
9265
+ readonly type: "boolean";
9266
+ readonly description: "Whole numbers only. Absent: false.";
9267
+ };
9268
+ readonly minimum: {
9269
+ readonly type: "number";
9270
+ };
9271
+ readonly maximum: {
9272
+ readonly type: "number";
9273
+ };
9274
+ };
9275
+ }, {
9276
+ readonly title: "BooleanSubField";
9277
+ readonly type: "object";
9278
+ readonly additionalProperties: false;
9279
+ readonly required: readonly ["key", "type", "labels"];
9280
+ readonly properties: {
9281
+ readonly key: {
9282
+ readonly $ref: "#/$defs/FieldKey";
9283
+ };
9284
+ readonly type: {
9285
+ readonly type: "string";
9286
+ readonly enum: readonly ["boolean"];
9287
+ };
9288
+ readonly labels: {
9289
+ readonly $ref: "#/$defs/FieldLabels";
9290
+ };
9291
+ };
9292
+ }, {
9293
+ readonly title: "DateSubField";
9294
+ readonly type: "object";
9295
+ readonly additionalProperties: false;
9296
+ readonly required: readonly ["key", "type", "labels"];
9297
+ readonly properties: {
9298
+ readonly key: {
9299
+ readonly $ref: "#/$defs/FieldKey";
9300
+ };
9301
+ readonly type: {
9302
+ readonly type: "string";
9303
+ readonly enum: readonly ["date"];
9304
+ };
9305
+ readonly labels: {
9306
+ readonly $ref: "#/$defs/FieldLabels";
9307
+ };
9308
+ readonly requiredToPublish: {
9309
+ readonly type: "boolean";
9310
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9311
+ };
9312
+ };
9313
+ }, {
9314
+ readonly title: "UrlSubField";
9315
+ readonly type: "object";
9316
+ readonly additionalProperties: false;
9317
+ readonly required: readonly ["key", "type", "labels"];
9318
+ readonly properties: {
9319
+ readonly key: {
9320
+ readonly $ref: "#/$defs/FieldKey";
9321
+ };
9322
+ readonly type: {
9323
+ readonly type: "string";
9324
+ readonly enum: readonly ["url"];
9325
+ };
9326
+ readonly labels: {
9327
+ readonly $ref: "#/$defs/FieldLabels";
9328
+ };
9329
+ readonly requiredToPublish: {
9330
+ readonly type: "boolean";
9331
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9332
+ };
9333
+ };
9334
+ }, {
9335
+ readonly title: "ImageSubField";
9336
+ readonly type: "object";
9337
+ readonly additionalProperties: false;
9338
+ readonly required: readonly ["key", "type", "labels"];
9339
+ readonly properties: {
9340
+ readonly key: {
9341
+ readonly $ref: "#/$defs/FieldKey";
9342
+ };
9343
+ readonly type: {
9344
+ readonly type: "string";
9345
+ readonly enum: readonly ["image"];
9346
+ };
9347
+ readonly labels: {
9348
+ readonly $ref: "#/$defs/FieldLabels";
9349
+ };
9350
+ readonly requiredToPublish: {
9351
+ readonly type: "boolean";
9352
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9353
+ };
9354
+ };
9355
+ }, {
9356
+ readonly title: "SelectSubField";
9357
+ readonly type: "object";
9358
+ readonly additionalProperties: false;
9359
+ readonly required: readonly ["key", "type", "labels", "options"];
9360
+ readonly properties: {
9361
+ readonly key: {
9362
+ readonly $ref: "#/$defs/FieldKey";
9363
+ };
9364
+ readonly type: {
9365
+ readonly type: "string";
9366
+ readonly enum: readonly ["select"];
8088
9367
  };
8089
- readonly property: {
8090
- readonly $ref: "#/$defs/SiteValueProperty";
9368
+ readonly labels: {
9369
+ readonly $ref: "#/$defs/FieldLabels";
9370
+ };
9371
+ readonly requiredToPublish: {
9372
+ readonly type: "boolean";
9373
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9374
+ };
9375
+ readonly options: {
9376
+ readonly type: "array";
9377
+ readonly minItems: 1;
9378
+ readonly maxItems: 50;
9379
+ readonly items: {
9380
+ readonly $ref: "#/$defs/FieldOption";
9381
+ };
8091
9382
  };
8092
9383
  };
8093
9384
  }, {
8094
- readonly title: "ConstantValueSource";
9385
+ readonly title: "ReferenceSubField";
8095
9386
  readonly type: "object";
8096
- readonly description: "A plain-text constant: no control characters, no markup meaning; vocabulary-checked on enum paths (in code).";
8097
9387
  readonly additionalProperties: false;
8098
- readonly required: readonly ["kind", "value"];
9388
+ readonly required: readonly ["key", "type", "labels", "collections"];
8099
9389
  readonly properties: {
8100
- readonly kind: {
8101
- readonly type: "string";
8102
- readonly enum: readonly ["constant"];
9390
+ readonly key: {
9391
+ readonly $ref: "#/$defs/FieldKey";
8103
9392
  };
8104
- readonly value: {
9393
+ readonly type: {
8105
9394
  readonly type: "string";
8106
- readonly minLength: 1;
8107
- readonly maxLength: 200;
8108
- readonly pattern: "^[^\\x00-\\x1F\\x7F]+$";
9395
+ readonly enum: readonly ["reference"];
9396
+ };
9397
+ readonly labels: {
9398
+ readonly $ref: "#/$defs/FieldLabels";
9399
+ };
9400
+ readonly requiredToPublish: {
9401
+ readonly type: "boolean";
9402
+ readonly description: "Every item of an entry in review or published needs a value. Absent: false.";
9403
+ };
9404
+ readonly collections: {
9405
+ readonly type: "array";
9406
+ readonly description: "The collections a target may belong to (checked in code).";
9407
+ readonly minItems: 1;
9408
+ readonly maxItems: 5;
9409
+ readonly uniqueItems: true;
9410
+ readonly items: {
9411
+ readonly $ref: "#/$defs/Slug";
9412
+ };
8109
9413
  };
8110
9414
  };
8111
9415
  }];
@@ -9304,7 +10608,7 @@ export declare const schemas: {
9304
10608
  };
9305
10609
  readonly fields: {
9306
10610
  readonly type: "object";
9307
- 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.";
10611
+ 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. A reference value is a translation group id or a list of them, a repeater value a list of flat objects (RFC-0045).";
9308
10612
  readonly additionalProperties: true;
9309
10613
  };
9310
10614
  readonly tags: {
@@ -12458,32 +13762,279 @@ export declare const schemas: {
12458
13762
  };
12459
13763
  readonly reason: {
12460
13764
  readonly type: "string";
12461
- readonly enum: readonly ["unapproved", "approval_lost", "auto_window_ended", "creator_removed"];
13765
+ readonly enum: readonly ["unapproved", "approval_lost", "auto_window_ended", "creator_removed"];
13766
+ };
13767
+ };
13768
+ }, {
13769
+ readonly type: "object";
13770
+ readonly title: "ReleaseCanceledOutcome";
13771
+ readonly description: "Withdrawn by a person or an agent; its nodes are unlocked.";
13772
+ readonly additionalProperties: false;
13773
+ readonly required: readonly ["kind", "at", "by"];
13774
+ readonly properties: {
13775
+ readonly kind: {
13776
+ readonly type: "string";
13777
+ readonly enum: readonly ["canceled"];
13778
+ };
13779
+ readonly at: {
13780
+ readonly $ref: "#/$defs/Timestamp";
13781
+ };
13782
+ readonly by: {
13783
+ readonly $ref: "#/$defs/Actor";
13784
+ };
13785
+ };
13786
+ }];
13787
+ };
13788
+ readonly ReleasePerson: {
13789
+ readonly type: "object";
13790
+ readonly description: "A staff person (`user_…`). Agents never appear here.";
13791
+ readonly additionalProperties: false;
13792
+ readonly required: readonly ["id"];
13793
+ readonly properties: {
13794
+ readonly id: {
13795
+ readonly type: "string";
13796
+ readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
13797
+ };
13798
+ readonly name: {
13799
+ readonly type: "string";
13800
+ readonly maxLength: 200;
13801
+ };
13802
+ };
13803
+ };
13804
+ readonly ReleaseState: {
13805
+ readonly type: "string";
13806
+ readonly description: "Lifecycle. `draft`: proposed or being assembled, nothing locked. `awaiting_approval`: waiting for a person; its nodes are locked. `scheduled`: approved (or allowed by `auto` mode) and locked until it runs. `running`: claimed by the scheduler. `published`: applied; `outcome` names the snapshot. `conflict`: a pinned node or its live base changed; held, nothing published. `missed`: the scheduler reached it more than an hour late; nothing published. `expired`: no valid approval at its time. `failed`: refused at run time (e.g. a dependency is missing). `canceled`: withdrawn.";
13807
+ readonly enum: readonly ["draft", "awaiting_approval", "scheduled", "running", "published", "conflict", "missed", "expired", "failed", "canceled"];
13808
+ };
13809
+ readonly ReleaseWhen: {
13810
+ readonly description: "When the release runs, discriminated by `kind`. Absent while a draft has no time yet.";
13811
+ readonly oneOf: readonly [{
13812
+ readonly type: "object";
13813
+ readonly title: "ReleaseAt";
13814
+ readonly description: "At an instant. `at` is what the scheduler compares with the clock; when a person entered a wall-clock time, `localTime` keeps it and `at` is recomputed from it and `timeZone` before the release runs, never earlier than the wall-clock time.";
13815
+ readonly additionalProperties: false;
13816
+ readonly required: readonly ["kind", "at", "timeZone"];
13817
+ readonly properties: {
13818
+ readonly kind: {
13819
+ readonly type: "string";
13820
+ readonly enum: readonly ["at"];
13821
+ };
13822
+ readonly at: {
13823
+ readonly $ref: "#/$defs/Timestamp";
13824
+ };
13825
+ readonly timeZone: {
13826
+ readonly $ref: "#/$defs/TimeZone";
13827
+ };
13828
+ readonly localTime: {
13829
+ readonly $ref: "#/$defs/LocalDateTime";
13830
+ };
13831
+ };
13832
+ }, {
13833
+ readonly type: "object";
13834
+ readonly title: "ReleaseOnApproval";
13835
+ readonly description: "As soon as it is approved (a gate-only change such as setting an expiry on live content, or \"publish when approved\").";
13836
+ readonly additionalProperties: false;
13837
+ readonly required: readonly ["kind"];
13838
+ readonly properties: {
13839
+ readonly kind: {
13840
+ readonly type: "string";
13841
+ readonly enum: readonly ["on-approval"];
13842
+ };
13843
+ };
13844
+ }];
13845
+ };
13846
+ readonly Revision: {
13847
+ readonly type: "integer";
13848
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
13849
+ readonly minimum: 0;
13850
+ };
13851
+ readonly SchemaVersion: {
13852
+ readonly type: "integer";
13853
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
13854
+ readonly enum: readonly [1];
13855
+ };
13856
+ readonly Timestamp: {
13857
+ readonly type: "string";
13858
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
13859
+ readonly format: "date-time";
13860
+ };
13861
+ readonly TimeZone: {
13862
+ readonly type: "string";
13863
+ 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.";
13864
+ readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
13865
+ readonly maxLength: 64;
13866
+ };
13867
+ };
13868
+ };
13869
+ readonly automation: {
13870
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
13871
+ readonly $id: "https://cloudhal.dev/schemas/v1/automation.schema.json";
13872
+ readonly title: "Automation";
13873
+ readonly description: "A recurring job on a site (RFC-0008), created by a person in Studio: either a built-in deterministic job that Cloudhal runs itself (reports, findings and notifications; it never publishes), or a scheduled agent task that an external agent picks up over MCP with the automation's own key, inside a run window, under a mode cap and budgets. No language model runs inside Cloudhal. Scheduling never grants rights: every call of a task runs with the key's scopes narrowed to its owner's current role. Automations live in D1 next to the graph; they are not graph nodes and are not part of site bundles.";
13874
+ readonly type: "object";
13875
+ readonly additionalProperties: false;
13876
+ readonly required: readonly ["schemaVersion", "id", "siteId", "name", "job", "recurrence", "state", "consecutiveFailures", "owner", "createdAt", "updatedAt", "rev"];
13877
+ readonly properties: {
13878
+ readonly schemaVersion: {
13879
+ readonly $ref: "#/$defs/SchemaVersion";
13880
+ };
13881
+ readonly id: {
13882
+ readonly $ref: "#/$defs/AutomationId";
13883
+ };
13884
+ readonly siteId: {
13885
+ readonly $ref: "#/$defs/Id";
13886
+ };
13887
+ readonly name: {
13888
+ readonly type: "string";
13889
+ readonly minLength: 1;
13890
+ readonly maxLength: 120;
13891
+ readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
13892
+ };
13893
+ readonly job: {
13894
+ readonly $ref: "#/$defs/AutomationJob";
13895
+ };
13896
+ readonly recurrence: {
13897
+ readonly $ref: "#/$defs/AutomationRecurrence";
13898
+ };
13899
+ readonly state: {
13900
+ readonly $ref: "#/$defs/AutomationState";
13901
+ };
13902
+ readonly pausedReason: {
13903
+ readonly type: "string";
13904
+ readonly description: "Why the automation is not `active`: a person paused it; its agent paused it; three consecutive failures; a run exceeded its budget; the site's kill switch; its key was revoked; its owner left or no longer holds the scopes it needs.";
13905
+ readonly enum: readonly ["person", "agent", "failures", "budget", "kill-switch", "key-revoked", "owner-removed", "role-changed"];
13906
+ };
13907
+ readonly consecutiveFailures: {
13908
+ readonly type: "integer";
13909
+ readonly minimum: 0;
13910
+ };
13911
+ readonly owner: {
13912
+ readonly $ref: "#/$defs/AutomationOwner";
13913
+ };
13914
+ readonly nextRunAt: {
13915
+ readonly $ref: "#/$defs/Timestamp";
13916
+ };
13917
+ readonly createdAt: {
13918
+ readonly $ref: "#/$defs/Timestamp";
13919
+ };
13920
+ readonly updatedAt: {
13921
+ readonly $ref: "#/$defs/Timestamp";
13922
+ };
13923
+ readonly rev: {
13924
+ readonly $ref: "#/$defs/Revision";
13925
+ };
13926
+ readonly metadata: {
13927
+ readonly $ref: "#/$defs/Metadata";
13928
+ };
13929
+ };
13930
+ readonly $defs: {
13931
+ readonly AutomationBudget: {
13932
+ readonly type: "object";
13933
+ readonly description: "Per-run limits Cloudhal counts and enforces for an agent task: tool calls, mutations, approval requests filed and minutes since the run began. Exceeding one ends the run (`budget-exceeded`) and pauses the automation.";
13934
+ readonly additionalProperties: false;
13935
+ readonly required: readonly ["maxToolCalls", "maxWrites", "maxApprovalRequests", "maxMinutes"];
13936
+ readonly properties: {
13937
+ readonly maxToolCalls: {
13938
+ readonly type: "integer";
13939
+ readonly minimum: 1;
13940
+ readonly maximum: 500;
13941
+ };
13942
+ readonly maxWrites: {
13943
+ readonly type: "integer";
13944
+ readonly minimum: 0;
13945
+ readonly maximum: 200;
13946
+ };
13947
+ readonly maxApprovalRequests: {
13948
+ readonly type: "integer";
13949
+ readonly minimum: 0;
13950
+ readonly maximum: 20;
13951
+ };
13952
+ readonly maxMinutes: {
13953
+ readonly type: "integer";
13954
+ readonly minimum: 1;
13955
+ readonly maximum: 240;
13956
+ };
13957
+ };
13958
+ };
13959
+ readonly AutomationId: {
13960
+ readonly type: "string";
13961
+ readonly description: "An automation id: `aut_` and 6 to 32 letters or digits.";
13962
+ readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
13963
+ };
13964
+ readonly AutomationJob: {
13965
+ readonly description: "What runs, discriminated by `kind`.";
13966
+ readonly oneOf: readonly [{
13967
+ readonly type: "object";
13968
+ readonly title: "BuiltinAutomationJob";
13969
+ readonly description: "A deterministic job Cloudhal runs itself, in bounded steps. Its outputs are findings, reports and Studio notifications; it never changes or publishes content.";
13970
+ readonly additionalProperties: false;
13971
+ readonly required: readonly ["kind", "builtin"];
13972
+ readonly properties: {
13973
+ readonly kind: {
13974
+ readonly type: "string";
13975
+ readonly enum: readonly ["builtin"];
13976
+ };
13977
+ readonly builtin: {
13978
+ readonly type: "string";
13979
+ readonly enum: readonly ["broken-links", "stale-content", "feed-check", "weekly-digest", "cleanup"];
13980
+ };
13981
+ readonly staleAfterDays: {
13982
+ readonly type: "integer";
13983
+ readonly description: "`stale-content` only: entries not updated for this many days are listed for review.";
13984
+ readonly minimum: 30;
13985
+ readonly maximum: 1095;
12462
13986
  };
12463
13987
  };
12464
13988
  }, {
12465
13989
  readonly type: "object";
12466
- readonly title: "ReleaseCanceledOutcome";
12467
- readonly description: "Withdrawn by a person or an agent; its nodes are unlocked.";
13990
+ readonly title: "AgentTaskAutomationJob";
13991
+ readonly description: "A task an external agent performs over MCP. At each occurrence a run window opens for `windowMinutes`; the automation's key (`keyId`, owned by the automation's owner) is valid only inside an open run, which the agent starts with `begin_run` and ends with `end_run`. The run's mode is the key's effective mode capped by `modeCap`; it never waits for a person: calls that need one leave an approval request and the run ends. `readsUntrustedText` declares that the task reads visitor-supplied text (comments, 404 paths, fetched pages); such an automation's key cannot hold write scopes, and any run that reads such text is limited to reading, labelling and hiding from then on.";
12468
13992
  readonly additionalProperties: false;
12469
- readonly required: readonly ["kind", "at", "by"];
13993
+ readonly required: readonly ["kind", "keyId", "instructions", "modeCap", "readsUntrustedText", "windowMinutes", "budget"];
12470
13994
  readonly properties: {
12471
13995
  readonly kind: {
12472
13996
  readonly type: "string";
12473
- readonly enum: readonly ["canceled"];
13997
+ readonly enum: readonly ["agent-task"];
12474
13998
  };
12475
- readonly at: {
12476
- readonly $ref: "#/$defs/Timestamp";
13999
+ readonly keyId: {
14000
+ readonly type: "string";
14001
+ readonly pattern: "^[A-Za-z0-9_-]{6,64}$";
12477
14002
  };
12478
- readonly by: {
12479
- readonly $ref: "#/$defs/Actor";
14003
+ readonly instructions: {
14004
+ readonly type: "string";
14005
+ readonly description: "What the owner asks the agent to do, shown to the agent by `begin_run`. Plain text.";
14006
+ readonly minLength: 1;
14007
+ readonly maxLength: 2000;
14008
+ readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
14009
+ };
14010
+ readonly skill: {
14011
+ readonly type: "string";
14012
+ readonly description: "A skill the run declares (its scopes and approval list narrow the run further).";
14013
+ readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
14014
+ readonly maxLength: 64;
14015
+ };
14016
+ readonly modeCap: {
14017
+ readonly type: "string";
14018
+ readonly description: "The most autonomous mode a run may use; never `bypass`.";
14019
+ readonly enum: readonly ["plan", "manual", "edits", "auto"];
14020
+ };
14021
+ readonly readsUntrustedText: {
14022
+ readonly type: "boolean";
14023
+ };
14024
+ readonly windowMinutes: {
14025
+ readonly type: "integer";
14026
+ readonly minimum: 5;
14027
+ readonly maximum: 240;
14028
+ };
14029
+ readonly budget: {
14030
+ readonly $ref: "#/$defs/AutomationBudget";
12480
14031
  };
12481
14032
  };
12482
14033
  }];
12483
14034
  };
12484
- readonly ReleasePerson: {
14035
+ readonly AutomationOwner: {
12485
14036
  readonly type: "object";
12486
- readonly description: "A staff person (`user_…`). Agents never appear here.";
14037
+ readonly description: "The person who created the automation and owns its key (`user_…`). Agents never own automations.";
12487
14038
  readonly additionalProperties: false;
12488
14039
  readonly required: readonly ["id"];
12489
14040
  readonly properties: {
@@ -12497,47 +14048,56 @@ export declare const schemas: {
12497
14048
  };
12498
14049
  };
12499
14050
  };
12500
- readonly ReleaseState: {
12501
- readonly type: "string";
12502
- readonly description: "Lifecycle. `draft`: proposed or being assembled, nothing locked. `awaiting_approval`: waiting for a person; its nodes are locked. `scheduled`: approved (or allowed by `auto` mode) and locked until it runs. `running`: claimed by the scheduler. `published`: applied; `outcome` names the snapshot. `conflict`: a pinned node or its live base changed; held, nothing published. `missed`: the scheduler reached it more than an hour late; nothing published. `expired`: no valid approval at its time. `failed`: refused at run time (e.g. a dependency is missing). `canceled`: withdrawn.";
12503
- readonly enum: readonly ["draft", "awaiting_approval", "scheduled", "running", "published", "conflict", "missed", "expired", "failed", "canceled"];
12504
- };
12505
- readonly ReleaseWhen: {
12506
- readonly description: "When the release runs, discriminated by `kind`. Absent while a draft has no time yet.";
12507
- readonly oneOf: readonly [{
12508
- readonly type: "object";
12509
- readonly title: "ReleaseAt";
12510
- readonly description: "At an instant. `at` is what the scheduler compares with the clock; when a person entered a wall-clock time, `localTime` keeps it and `at` is recomputed from it and `timeZone` before the release runs, never earlier than the wall-clock time.";
12511
- readonly additionalProperties: false;
12512
- readonly required: readonly ["kind", "at", "timeZone"];
12513
- readonly properties: {
12514
- readonly kind: {
12515
- readonly type: "string";
12516
- readonly enum: readonly ["at"];
12517
- };
12518
- readonly at: {
12519
- readonly $ref: "#/$defs/Timestamp";
12520
- };
12521
- readonly timeZone: {
12522
- readonly $ref: "#/$defs/TimeZone";
12523
- };
12524
- readonly localTime: {
12525
- readonly $ref: "#/$defs/LocalDateTime";
12526
- };
14051
+ readonly AutomationRecurrence: {
14052
+ readonly type: "object";
14053
+ readonly description: "When the automation runs: the first occurrence as a wall-clock time in `timeZone`, repeated by `rule` (absent: once). Occurrences are computed in the zone, so \"Mondays 09:07\" stays 09:07 across daylight-saving changes; a time that does not exist on a given day (a spring-forward gap) runs at the next valid minute, and a time that occurs twice runs once, at the first (a documented deviation from RFC 5545 §3.3.10, which drops such occurrences). `preset` records which Studio choice produced the rule.";
14054
+ readonly additionalProperties: false;
14055
+ readonly required: readonly ["start", "timeZone", "preset"];
14056
+ readonly properties: {
14057
+ readonly start: {
14058
+ readonly $ref: "#/$defs/LocalDateTime";
12527
14059
  };
12528
- }, {
12529
- readonly type: "object";
12530
- readonly title: "ReleaseOnApproval";
12531
- readonly description: "As soon as it is approved (a gate-only change such as setting an expiry on live content, or \"publish when approved\").";
12532
- readonly additionalProperties: false;
12533
- readonly required: readonly ["kind"];
12534
- readonly properties: {
12535
- readonly kind: {
12536
- readonly type: "string";
12537
- readonly enum: readonly ["on-approval"];
12538
- };
14060
+ readonly timeZone: {
14061
+ readonly $ref: "#/$defs/TimeZone";
12539
14062
  };
12540
- }];
14063
+ readonly rule: {
14064
+ readonly $ref: "#/$defs/AutomationRule";
14065
+ };
14066
+ readonly preset: {
14067
+ readonly type: "string";
14068
+ readonly enum: readonly ["once", "hourly", "daily", "weekdays", "weekly", "monthly", "custom"];
14069
+ };
14070
+ };
14071
+ };
14072
+ readonly AutomationRule: {
14073
+ readonly type: "string";
14074
+ readonly description: "The recurrence as an RFC 5545 RRULE value in Cloudhal's subset, without the `RRULE:` prefix: FREQ DAILY, WEEKLY or MONTHLY; INTERVAL; BYDAY (ordinals such as 2TU or -1FR only with MONTHLY); BYMONTHDAY (1–31 or -1); BYHOUR; BYMINUTE; COUNT or UNTIL. The pattern bounds the vocabulary; the parser refuses repeated parts, COUNT with UNTIL, ordinals outside MONTHLY and runs closer than the job's minimum interval.";
14075
+ readonly maxLength: 300;
14076
+ readonly pattern: "^FREQ=(?:DAILY|WEEKLY|MONTHLY)(?:;(?:INTERVAL=[1-9][0-9]{0,2}|BYDAY=(?:[+-]?[1-5])?(?:MO|TU|WE|TH|FR|SA|SU)(?:,(?:[+-]?[1-5])?(?:MO|TU|WE|TH|FR|SA|SU)){0,6}|BYMONTHDAY=(?:-1|[1-9]|[12][0-9]|3[01])(?:,(?:-1|[1-9]|[12][0-9]|3[01])){0,30}|BYHOUR=(?:[01]?[0-9]|2[0-3])(?:,(?:[01]?[0-9]|2[0-3])){0,23}|BYMINUTE=[0-5]?[0-9](?:,[0-5]?[0-9]){0,3}|COUNT=[1-9][0-9]{0,3}|UNTIL=[0-9]{8}T[0-9]{6}Z))*$";
14077
+ };
14078
+ readonly AutomationState: {
14079
+ readonly type: "string";
14080
+ readonly description: "`active` runs on its recurrence; `paused` and `auto-paused` (by failures or a budget) wait for a person to resume; `broken` needs a person to repair it (key revoked, owner gone); `ended` reached its COUNT or UNTIL.";
14081
+ readonly enum: readonly ["active", "paused", "auto-paused", "broken", "ended"];
14082
+ };
14083
+ readonly Id: {
14084
+ readonly type: "string";
14085
+ 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.";
14086
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
14087
+ readonly minLength: 8;
14088
+ readonly maxLength: 48;
14089
+ };
14090
+ readonly LocalDateTime: {
14091
+ readonly type: "string";
14092
+ readonly description: "A wall-clock date and time without an offset, to the minute (YYYY-MM-DDTHH:mm), as a person entered it; always paired with a TimeZone (RFC-0008).";
14093
+ readonly pattern: "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]$";
14094
+ };
14095
+ readonly Metadata: {
14096
+ readonly type: "object";
14097
+ readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
14098
+ readonly additionalProperties: {
14099
+ readonly type: "string";
14100
+ };
12541
14101
  };
12542
14102
  readonly Revision: {
12543
14103
  readonly type: "integer";
@@ -12562,54 +14122,102 @@ export declare const schemas: {
12562
14122
  };
12563
14123
  };
12564
14124
  };
12565
- readonly automation: {
14125
+ readonly "schedule-run": {
12566
14126
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
12567
- readonly $id: "https://cloudhal.dev/schemas/v1/automation.schema.json";
12568
- readonly title: "Automation";
12569
- readonly description: "A recurring job on a site (RFC-0008), created by a person in Studio: either a built-in deterministic job that Cloudhal runs itself (reports, findings and notifications; it never publishes), or a scheduled agent task that an external agent picks up over MCP with the automation's own key, inside a run window, under a mode cap and budgets. No language model runs inside Cloudhal. Scheduling never grants rights: every call of a task runs with the key's scopes narrowed to its owner's current role. Automations live in D1 next to the graph; they are not graph nodes and are not part of site bundles.";
14127
+ readonly $id: "https://cloudhal.dev/schemas/v1/schedule-run.schema.json";
14128
+ readonly title: "ScheduleRun";
14129
+ readonly description: "One occurrence of something scheduled (RFC-0008): a release's execution or an automation's run. Its id is derived from the subject and `occurrenceAt`, so a second scheduler tick that reaches the same occurrence finds the same row and the effect happens at most once. `state` says whether the run itself completed; `outcome` says whether it did any work, because a run that ended cleanly may still have done nothing. Runs live in D1 and are kept 90 days; the audit log keeps what each call did.";
12570
14130
  readonly type: "object";
12571
14131
  readonly additionalProperties: false;
12572
- readonly required: readonly ["schemaVersion", "id", "siteId", "name", "job", "recurrence", "state", "consecutiveFailures", "owner", "createdAt", "updatedAt", "rev"];
14132
+ readonly required: readonly ["schemaVersion", "id", "siteId", "subject", "occurrenceAt", "state", "attempt", "createdAt", "updatedAt", "rev"];
12573
14133
  readonly properties: {
12574
14134
  readonly schemaVersion: {
12575
14135
  readonly $ref: "#/$defs/SchemaVersion";
12576
14136
  };
12577
14137
  readonly id: {
12578
- readonly $ref: "#/$defs/AutomationId";
14138
+ readonly $ref: "#/$defs/ScheduleRunId";
12579
14139
  };
12580
14140
  readonly siteId: {
12581
14141
  readonly $ref: "#/$defs/Id";
12582
14142
  };
12583
- readonly name: {
12584
- readonly type: "string";
12585
- readonly minLength: 1;
12586
- readonly maxLength: 120;
12587
- readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
12588
- };
12589
- readonly job: {
12590
- readonly $ref: "#/$defs/AutomationJob";
14143
+ readonly subject: {
14144
+ readonly $ref: "#/$defs/ScheduleRunSubject";
12591
14145
  };
12592
- readonly recurrence: {
12593
- readonly $ref: "#/$defs/AutomationRecurrence";
14146
+ readonly occurrenceAt: {
14147
+ readonly $ref: "#/$defs/Timestamp";
12594
14148
  };
12595
14149
  readonly state: {
12596
- readonly $ref: "#/$defs/AutomationState";
14150
+ readonly $ref: "#/$defs/ScheduleRunState";
12597
14151
  };
12598
- readonly pausedReason: {
14152
+ readonly outcome: {
12599
14153
  readonly type: "string";
12600
- readonly description: "Why the automation is not `active`: a person paused it; its agent paused it; three consecutive failures; a run exceeded its budget; the site's kill switch; its key was revoked; its owner left or no longer holds the scopes it needs.";
12601
- readonly enum: readonly ["person", "agent", "failures", "budget", "kill-switch", "key-revoked", "owner-removed", "role-changed"];
14154
+ readonly description: "What the run achieved, separately from whether it completed: `did-work` changed something or produced findings; `nothing-to-do`; `proposed` left drafts or proposals for people; `waiting-approval` filed requests a person must decide.";
14155
+ readonly enum: readonly ["did-work", "nothing-to-do", "proposed", "waiting-approval"];
12602
14156
  };
12603
- readonly consecutiveFailures: {
14157
+ readonly trigger: {
14158
+ readonly type: "string";
14159
+ readonly description: "What woke the scheduler: the every-minute cron trigger, the Durable Object clock's alarm, an admin request (backstop), the Node timer, or a person (\"Run now\", \"Publish now\").";
14160
+ readonly enum: readonly ["cron", "alarm", "request", "node", "manual"];
14161
+ };
14162
+ readonly attempt: {
12604
14163
  readonly type: "integer";
12605
- readonly minimum: 0;
14164
+ readonly minimum: 1;
12606
14165
  };
12607
- readonly owner: {
12608
- readonly $ref: "#/$defs/AutomationOwner";
14166
+ readonly startedAt: {
14167
+ readonly $ref: "#/$defs/Timestamp";
12609
14168
  };
12610
- readonly nextRunAt: {
14169
+ readonly endedAt: {
12611
14170
  readonly $ref: "#/$defs/Timestamp";
12612
14171
  };
14172
+ readonly latenessSeconds: {
14173
+ readonly type: "integer";
14174
+ readonly minimum: 0;
14175
+ };
14176
+ readonly adjusted: {
14177
+ readonly type: "string";
14178
+ readonly description: "The occurrence was moved: `dst-gap` (the wall-clock time did not exist that day, so it ran at the next valid minute) or `tzdata` (the zone's rules changed after it was planned).";
14179
+ readonly enum: readonly ["dst-gap", "tzdata"];
14180
+ };
14181
+ readonly window: {
14182
+ readonly $ref: "#/$defs/ScheduleRunWindow";
14183
+ };
14184
+ readonly usage: {
14185
+ readonly $ref: "#/$defs/ScheduleRunUsage";
14186
+ };
14187
+ readonly taint: {
14188
+ readonly $ref: "#/$defs/ScheduleRunTaint";
14189
+ };
14190
+ readonly summary: {
14191
+ readonly type: "string";
14192
+ readonly description: "The agent's own account of the run (`end_run`) or the built-in job's report line. Plain text written by an agent: Studio renders it as text and never as an instruction.";
14193
+ readonly maxLength: 2000;
14194
+ readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
14195
+ };
14196
+ readonly counts: {
14197
+ readonly type: "object";
14198
+ readonly description: "Findings by name (e.g. `broken-links`, `stale-entries`, `proposals`).";
14199
+ readonly propertyNames: {
14200
+ readonly type: "string";
14201
+ readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
14202
+ };
14203
+ readonly maxProperties: 20;
14204
+ readonly additionalProperties: {
14205
+ readonly type: "integer";
14206
+ readonly minimum: 0;
14207
+ };
14208
+ };
14209
+ readonly approvalIds: {
14210
+ readonly type: "array";
14211
+ readonly description: "Approval requests the run filed.";
14212
+ readonly items: {
14213
+ readonly $ref: "#/$defs/Id";
14214
+ };
14215
+ readonly uniqueItems: true;
14216
+ readonly maxItems: 50;
14217
+ };
14218
+ readonly error: {
14219
+ readonly $ref: "#/$defs/ScheduleRunError";
14220
+ };
12613
14221
  readonly createdAt: {
12614
14222
  readonly $ref: "#/$defs/Timestamp";
12615
14223
  };
@@ -12619,162 +14227,233 @@ export declare const schemas: {
12619
14227
  readonly rev: {
12620
14228
  readonly $ref: "#/$defs/Revision";
12621
14229
  };
12622
- readonly metadata: {
12623
- readonly $ref: "#/$defs/Metadata";
12624
- };
12625
14230
  };
12626
14231
  readonly $defs: {
12627
- readonly AutomationBudget: {
14232
+ readonly Id: {
14233
+ readonly type: "string";
14234
+ 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.";
14235
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
14236
+ readonly minLength: 8;
14237
+ readonly maxLength: 48;
14238
+ };
14239
+ readonly Revision: {
14240
+ readonly type: "integer";
14241
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
14242
+ readonly minimum: 0;
14243
+ };
14244
+ readonly ScheduleRunError: {
12628
14245
  readonly type: "object";
12629
- readonly description: "Per-run limits Cloudhal counts and enforces for an agent task: tool calls, mutations, approval requests filed and minutes since the run began. Exceeding one ends the run (`budget-exceeded`) and pauses the automation.";
12630
14246
  readonly additionalProperties: false;
12631
- readonly required: readonly ["maxToolCalls", "maxWrites", "maxApprovalRequests", "maxMinutes"];
14247
+ readonly required: readonly ["code"];
12632
14248
  readonly properties: {
12633
- readonly maxToolCalls: {
12634
- readonly type: "integer";
12635
- readonly minimum: 1;
12636
- readonly maximum: 500;
12637
- };
12638
- readonly maxWrites: {
12639
- readonly type: "integer";
12640
- readonly minimum: 0;
12641
- readonly maximum: 200;
12642
- };
12643
- readonly maxApprovalRequests: {
12644
- readonly type: "integer";
12645
- readonly minimum: 0;
12646
- readonly maximum: 20;
14249
+ readonly code: {
14250
+ readonly type: "string";
14251
+ readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
12647
14252
  };
12648
- readonly maxMinutes: {
12649
- readonly type: "integer";
12650
- readonly minimum: 1;
12651
- readonly maximum: 240;
14253
+ readonly message: {
14254
+ readonly type: "string";
14255
+ readonly maxLength: 500;
14256
+ readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
12652
14257
  };
12653
14258
  };
12654
14259
  };
12655
- readonly AutomationId: {
14260
+ readonly ScheduleRunId: {
12656
14261
  readonly type: "string";
12657
- readonly description: "An automation id: `aut_` and 6 to 32 letters or digits.";
12658
- readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
14262
+ readonly description: "A run id: `run_` and 6 to 32 letters or digits, derived from the subject id and `occurrenceAt` (the occurrence's idempotency key).";
14263
+ readonly pattern: "^run_[A-Za-z0-9]{6,32}$";
12659
14264
  };
12660
- readonly AutomationJob: {
12661
- readonly description: "What runs, discriminated by `kind`.";
14265
+ readonly ScheduleRunState: {
14266
+ readonly type: "string";
14267
+ readonly description: "`due`: claimed occurrence not started yet; `ready`: an agent task's window is open and waits for `begin_run`; `running`; `succeeded`; `failed`; `missed`: the window closed or the scheduler came too late; `skipped`: a missed occurrence coalesced into a later one; `budget-exceeded`; `killed`: stopped by a pause or a kill switch.";
14268
+ readonly enum: readonly ["due", "ready", "running", "succeeded", "failed", "missed", "skipped", "budget-exceeded", "killed"];
14269
+ };
14270
+ readonly ScheduleRunSubject: {
14271
+ readonly description: "What ran, discriminated by `kind`.";
12662
14272
  readonly oneOf: readonly [{
12663
14273
  readonly type: "object";
12664
- readonly title: "BuiltinAutomationJob";
12665
- readonly description: "A deterministic job Cloudhal runs itself, in bounded steps. Its outputs are findings, reports and Studio notifications; it never changes or publishes content.";
14274
+ readonly title: "ReleaseRunSubject";
12666
14275
  readonly additionalProperties: false;
12667
- readonly required: readonly ["kind", "builtin"];
14276
+ readonly required: readonly ["kind", "releaseId"];
12668
14277
  readonly properties: {
12669
14278
  readonly kind: {
12670
14279
  readonly type: "string";
12671
- readonly enum: readonly ["builtin"];
14280
+ readonly enum: readonly ["release"];
12672
14281
  };
12673
- readonly builtin: {
14282
+ readonly releaseId: {
12674
14283
  readonly type: "string";
12675
- readonly enum: readonly ["broken-links", "stale-content", "feed-check", "weekly-digest", "cleanup"];
12676
- };
12677
- readonly staleAfterDays: {
12678
- readonly type: "integer";
12679
- readonly description: "`stale-content` only: entries not updated for this many days are listed for review.";
12680
- readonly minimum: 30;
12681
- readonly maximum: 1095;
14284
+ readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
12682
14285
  };
12683
14286
  };
12684
14287
  }, {
12685
14288
  readonly type: "object";
12686
- readonly title: "AgentTaskAutomationJob";
12687
- readonly description: "A task an external agent performs over MCP. At each occurrence a run window opens for `windowMinutes`; the automation's key (`keyId`, owned by the automation's owner) is valid only inside an open run, which the agent starts with `begin_run` and ends with `end_run`. The run's mode is the key's effective mode capped by `modeCap`; it never waits for a person: calls that need one leave an approval request and the run ends. `readsUntrustedText` declares that the task reads visitor-supplied text (comments, 404 paths, fetched pages); such an automation's key cannot hold write scopes, and any run that reads such text is limited to reading, labelling and hiding from then on.";
14289
+ readonly title: "AutomationRunSubject";
12688
14290
  readonly additionalProperties: false;
12689
- readonly required: readonly ["kind", "keyId", "instructions", "modeCap", "readsUntrustedText", "windowMinutes", "budget"];
14291
+ readonly required: readonly ["kind", "automationId", "job"];
12690
14292
  readonly properties: {
12691
14293
  readonly kind: {
12692
14294
  readonly type: "string";
12693
- readonly enum: readonly ["agent-task"];
12694
- };
12695
- readonly keyId: {
12696
- readonly type: "string";
12697
- readonly pattern: "^[A-Za-z0-9_-]{6,64}$";
12698
- };
12699
- readonly instructions: {
12700
- readonly type: "string";
12701
- readonly description: "What the owner asks the agent to do, shown to the agent by `begin_run`. Plain text.";
12702
- readonly minLength: 1;
12703
- readonly maxLength: 2000;
12704
- readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
14295
+ readonly enum: readonly ["automation"];
12705
14296
  };
12706
- readonly skill: {
14297
+ readonly automationId: {
12707
14298
  readonly type: "string";
12708
- readonly description: "A skill the run declares (its scopes and approval list narrow the run further).";
12709
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
12710
- readonly maxLength: 64;
14299
+ readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
12711
14300
  };
12712
- readonly modeCap: {
14301
+ readonly job: {
12713
14302
  readonly type: "string";
12714
- readonly description: "The most autonomous mode a run may use; never `bypass`.";
12715
- readonly enum: readonly ["plan", "manual", "edits", "auto"];
12716
- };
12717
- readonly readsUntrustedText: {
12718
- readonly type: "boolean";
12719
- };
12720
- readonly windowMinutes: {
12721
- readonly type: "integer";
12722
- readonly minimum: 5;
12723
- readonly maximum: 240;
12724
- };
12725
- readonly budget: {
12726
- readonly $ref: "#/$defs/AutomationBudget";
14303
+ readonly enum: readonly ["builtin", "agent-task"];
12727
14304
  };
12728
14305
  };
12729
14306
  }];
12730
14307
  };
12731
- readonly AutomationOwner: {
14308
+ readonly ScheduleRunTaint: {
12732
14309
  readonly type: "object";
12733
- readonly description: "The person who created the automation and owns its key (`user_…`). Agents never own automations.";
14310
+ readonly description: "The run read visitor-supplied text at `at` through `tool`; from then on it may only read, label, hide and pause.";
12734
14311
  readonly additionalProperties: false;
12735
- readonly required: readonly ["id"];
14312
+ readonly required: readonly ["at", "tool"];
12736
14313
  readonly properties: {
12737
- readonly id: {
12738
- readonly type: "string";
12739
- readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
14314
+ readonly at: {
14315
+ readonly $ref: "#/$defs/Timestamp";
12740
14316
  };
12741
- readonly name: {
14317
+ readonly tool: {
12742
14318
  readonly type: "string";
12743
- readonly maxLength: 200;
14319
+ readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
12744
14320
  };
12745
14321
  };
12746
14322
  };
12747
- readonly AutomationRecurrence: {
14323
+ readonly ScheduleRunUsage: {
12748
14324
  readonly type: "object";
12749
- readonly description: "When the automation runs: the first occurrence as a wall-clock time in `timeZone`, repeated by `rule` (absent: once). Occurrences are computed in the zone, so \"Mondays 09:07\" stays 09:07 across daylight-saving changes; a time that does not exist on a given day (a spring-forward gap) runs at the next valid minute, and a time that occurs twice runs once, at the first (a documented deviation from RFC 5545 §3.3.10, which drops such occurrences). `preset` records which Studio choice produced the rule.";
14325
+ readonly description: "What the run used against its budget, counted by the server.";
12750
14326
  readonly additionalProperties: false;
12751
- readonly required: readonly ["start", "timeZone", "preset"];
14327
+ readonly required: readonly ["toolCalls", "writes", "approvalRequests"];
12752
14328
  readonly properties: {
12753
- readonly start: {
12754
- readonly $ref: "#/$defs/LocalDateTime";
14329
+ readonly toolCalls: {
14330
+ readonly type: "integer";
14331
+ readonly minimum: 0;
12755
14332
  };
12756
- readonly timeZone: {
12757
- readonly $ref: "#/$defs/TimeZone";
14333
+ readonly writes: {
14334
+ readonly type: "integer";
14335
+ readonly minimum: 0;
12758
14336
  };
12759
- readonly rule: {
12760
- readonly $ref: "#/$defs/AutomationRule";
14337
+ readonly approvalRequests: {
14338
+ readonly type: "integer";
14339
+ readonly minimum: 0;
12761
14340
  };
12762
- readonly preset: {
12763
- readonly type: "string";
12764
- readonly enum: readonly ["once", "hourly", "daily", "weekdays", "weekly", "monthly", "custom"];
14341
+ };
14342
+ };
14343
+ readonly ScheduleRunWindow: {
14344
+ readonly type: "object";
14345
+ readonly description: "An agent task's run window: the automation's key is valid only between `opensAt` and `closesAt`, and only inside a run it began.";
14346
+ readonly additionalProperties: false;
14347
+ readonly required: readonly ["opensAt", "closesAt"];
14348
+ readonly properties: {
14349
+ readonly opensAt: {
14350
+ readonly $ref: "#/$defs/Timestamp";
14351
+ };
14352
+ readonly closesAt: {
14353
+ readonly $ref: "#/$defs/Timestamp";
12765
14354
  };
12766
14355
  };
12767
14356
  };
12768
- readonly AutomationRule: {
12769
- readonly type: "string";
12770
- readonly description: "The recurrence as an RFC 5545 RRULE value in Cloudhal's subset, without the `RRULE:` prefix: FREQ DAILY, WEEKLY or MONTHLY; INTERVAL; BYDAY (ordinals such as 2TU or -1FR only with MONTHLY); BYMONTHDAY (1–31 or -1); BYHOUR; BYMINUTE; COUNT or UNTIL. The pattern bounds the vocabulary; the parser refuses repeated parts, COUNT with UNTIL, ordinals outside MONTHLY and runs closer than the job's minimum interval.";
12771
- readonly maxLength: 300;
12772
- readonly pattern: "^FREQ=(?:DAILY|WEEKLY|MONTHLY)(?:;(?:INTERVAL=[1-9][0-9]{0,2}|BYDAY=(?:[+-]?[1-5])?(?:MO|TU|WE|TH|FR|SA|SU)(?:,(?:[+-]?[1-5])?(?:MO|TU|WE|TH|FR|SA|SU)){0,6}|BYMONTHDAY=(?:-1|[1-9]|[12][0-9]|3[01])(?:,(?:-1|[1-9]|[12][0-9]|3[01])){0,30}|BYHOUR=(?:[01]?[0-9]|2[0-3])(?:,(?:[01]?[0-9]|2[0-3])){0,23}|BYMINUTE=[0-5]?[0-9](?:,[0-5]?[0-9]){0,3}|COUNT=[1-9][0-9]{0,3}|UNTIL=[0-9]{8}T[0-9]{6}Z))*$";
14357
+ readonly SchemaVersion: {
14358
+ readonly type: "integer";
14359
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
14360
+ readonly enum: readonly [1];
12773
14361
  };
12774
- readonly AutomationState: {
14362
+ readonly Timestamp: {
12775
14363
  readonly type: "string";
12776
- readonly description: "`active` runs on its recurrence; `paused` and `auto-paused` (by failures or a budget) wait for a person to resume; `broken` needs a person to repair it (key revoked, owner gone); `ended` reached its COUNT or UNTIL.";
12777
- readonly enum: readonly ["active", "paused", "auto-paused", "broken", "ended"];
14364
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
14365
+ readonly format: "date-time";
14366
+ };
14367
+ };
14368
+ };
14369
+ readonly glossary: {
14370
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
14371
+ readonly $id: "https://cloudhal.dev/schemas/v1/glossary.schema.json";
14372
+ readonly title: "Glossary";
14373
+ readonly description: "A site's translation glossary (RFC-0033 §2): terms with their approved translation per locale, and terms never to translate (brand and product names). Agents translating content read it as hard constraints; the checks flag drafts that break it. One per site, snapshotted like every node.";
14374
+ readonly type: "object";
14375
+ readonly additionalProperties: false;
14376
+ readonly required: readonly ["schemaVersion", "id", "siteId", "entries", "rev", "createdAt", "updatedAt"];
14377
+ readonly properties: {
14378
+ readonly schemaVersion: {
14379
+ readonly $ref: "#/$defs/SchemaVersion";
14380
+ };
14381
+ readonly id: {
14382
+ readonly $ref: "#/$defs/Id";
14383
+ };
14384
+ readonly siteId: {
14385
+ readonly $ref: "#/$defs/Id";
14386
+ };
14387
+ readonly entries: {
14388
+ readonly type: "array";
14389
+ readonly description: "Unique by term (case-insensitive); order is the editor's.";
14390
+ readonly items: {
14391
+ readonly $ref: "#/$defs/GlossaryEntry";
14392
+ };
14393
+ readonly maxItems: 2000;
14394
+ };
14395
+ readonly rev: {
14396
+ readonly $ref: "#/$defs/Revision";
14397
+ };
14398
+ readonly createdAt: {
14399
+ readonly $ref: "#/$defs/Timestamp";
14400
+ };
14401
+ readonly updatedAt: {
14402
+ readonly $ref: "#/$defs/Timestamp";
14403
+ };
14404
+ readonly metadata: {
14405
+ readonly $ref: "#/$defs/Metadata";
14406
+ };
14407
+ };
14408
+ readonly $defs: {
14409
+ readonly GlossaryEntry: {
14410
+ readonly type: "object";
14411
+ readonly additionalProperties: false;
14412
+ readonly required: readonly ["term"];
14413
+ readonly properties: {
14414
+ readonly term: {
14415
+ readonly type: "string";
14416
+ readonly description: "The term as written in the site's default locale.";
14417
+ readonly minLength: 1;
14418
+ readonly maxLength: 200;
14419
+ };
14420
+ readonly note: {
14421
+ readonly type: "string";
14422
+ readonly description: "Context for translators and agents: meaning, part of speech, where it appears.";
14423
+ readonly maxLength: 500;
14424
+ };
14425
+ readonly doNotTranslate: {
14426
+ readonly type: "boolean";
14427
+ readonly description: "Keep the term as written in every locale (brand, product or proper names). Such an entry has no translations.";
14428
+ };
14429
+ readonly caseSensitive: {
14430
+ readonly type: "boolean";
14431
+ readonly description: "Match the term only with this exact capitalisation.";
14432
+ };
14433
+ readonly translations: {
14434
+ readonly type: "object";
14435
+ readonly description: "The approved translation per locale (never the default locale).";
14436
+ readonly propertyNames: {
14437
+ readonly $ref: "#/$defs/Locale";
14438
+ };
14439
+ readonly additionalProperties: {
14440
+ readonly type: "object";
14441
+ readonly additionalProperties: false;
14442
+ readonly required: readonly ["text"];
14443
+ readonly properties: {
14444
+ readonly text: {
14445
+ readonly type: "string";
14446
+ readonly minLength: 1;
14447
+ readonly maxLength: 200;
14448
+ };
14449
+ readonly note: {
14450
+ readonly type: "string";
14451
+ readonly maxLength: 500;
14452
+ };
14453
+ };
14454
+ };
14455
+ };
14456
+ };
12778
14457
  };
12779
14458
  readonly Id: {
12780
14459
  readonly type: "string";
@@ -12783,10 +14462,10 @@ export declare const schemas: {
12783
14462
  readonly minLength: 8;
12784
14463
  readonly maxLength: 48;
12785
14464
  };
12786
- readonly LocalDateTime: {
14465
+ readonly Locale: {
12787
14466
  readonly type: "string";
12788
- readonly description: "A wall-clock date and time without an offset, to the minute (YYYY-MM-DDTHH:mm), as a person entered it; always paired with a TimeZone (RFC-0008).";
12789
- readonly pattern: "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]$";
14467
+ readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
14468
+ readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
12790
14469
  };
12791
14470
  readonly Metadata: {
12792
14471
  readonly type: "object";
@@ -12810,376 +14489,631 @@ export declare const schemas: {
12810
14489
  readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
12811
14490
  readonly format: "date-time";
12812
14491
  };
12813
- readonly TimeZone: {
12814
- readonly type: "string";
12815
- 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.";
12816
- readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
12817
- readonly maxLength: 64;
12818
- };
12819
14492
  };
12820
14493
  };
12821
- readonly "schedule-run": {
14494
+ readonly "release-manifest": {
12822
14495
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
12823
- readonly $id: "https://cloudhal.dev/schemas/v1/schedule-run.schema.json";
12824
- readonly title: "ScheduleRun";
12825
- readonly description: "One occurrence of something scheduled (RFC-0008): a release's execution or an automation's run. Its id is derived from the subject and `occurrenceAt`, so a second scheduler tick that reaches the same occurrence finds the same row and the effect happens at most once. `state` says whether the run itself completed; `outcome` says whether it did any work, because a run that ended cleanly may still have done nothing. Runs live in D1 and are kept 90 days; the audit log keeps what each call did.";
14496
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-manifest.schema.json";
14497
+ readonly title: "ReleaseManifest";
14498
+ readonly description: "cloudhal.release-manifest@1 (RFC-0046): the manifest of one Cloudhal release bundle, published as the release asset manifest.json next to the gzip tarball cloudhal-release-<version>.tar.gz. A project release is signed through release-statement.json, which pins this file's SHA-256 and size (signing.signature = release-statement.sig); the legacy form manifest.sig, a raw 64-byte Ed25519 signature over these exact bytes, is for development keys only. It describes every built Worker module and static asset by size and SHA-256, the binding templates, feature levels, migration range and rollback facts a remote deployer needs to install, update or refuse a version without running a build. Portable on purpose: it references common only for SchemaVersion and Timestamp; every other definition is local.";
12826
14499
  readonly type: "object";
12827
14500
  readonly additionalProperties: false;
12828
- readonly required: readonly ["schemaVersion", "id", "siteId", "subject", "occurrenceAt", "state", "attempt", "createdAt", "updatedAt", "rev"];
14501
+ readonly required: readonly ["schemaVersion", "format", "version", "channel", "securityRelease", "commit", "createdAt", "contracts", "levels", "migrations", "durableObjects", "runtime", "toolchain", "theme", "skills", "workers", "bindingTemplates", "requiredScopes", "optionalScopes", "requiredCapabilities", "optionalCapabilities", "starter", "features", "planVersion", "signing"];
12829
14502
  readonly properties: {
12830
14503
  readonly schemaVersion: {
12831
14504
  readonly $ref: "#/$defs/SchemaVersion";
12832
14505
  };
12833
- readonly id: {
12834
- readonly $ref: "#/$defs/ScheduleRunId";
12835
- };
12836
- readonly siteId: {
12837
- readonly $ref: "#/$defs/Id";
12838
- };
12839
- readonly subject: {
12840
- readonly $ref: "#/$defs/ScheduleRunSubject";
12841
- };
12842
- readonly occurrenceAt: {
12843
- readonly $ref: "#/$defs/Timestamp";
12844
- };
12845
- readonly state: {
12846
- readonly $ref: "#/$defs/ScheduleRunState";
12847
- };
12848
- readonly outcome: {
14506
+ readonly format: {
12849
14507
  readonly type: "string";
12850
- readonly description: "What the run achieved, separately from whether it completed: `did-work` changed something or produced findings; `nothing-to-do`; `proposed` left drafts or proposals for people; `waiting-approval` filed requests a person must decide.";
12851
- readonly enum: readonly ["did-work", "nothing-to-do", "proposed", "waiting-approval"];
14508
+ readonly enum: readonly ["cloudhal.release-manifest@1"];
12852
14509
  };
12853
- readonly trigger: {
14510
+ readonly version: {
14511
+ readonly $ref: "#/$defs/CloudhalVersion";
14512
+ };
14513
+ readonly channel: {
12854
14514
  readonly type: "string";
12855
- readonly description: "What woke the scheduler: the every-minute cron trigger, the Durable Object clock's alarm, an admin request (backstop), the Node timer, or a person (\"Run now\", \"Publish now\").";
12856
- readonly enum: readonly ["cron", "alarm", "request", "node", "manual"];
14515
+ readonly enum: readonly ["stable", "next"];
12857
14516
  };
12858
- readonly attempt: {
12859
- readonly type: "integer";
12860
- readonly minimum: 1;
14517
+ readonly securityRelease: {
14518
+ readonly type: "boolean";
12861
14519
  };
12862
- readonly startedAt: {
12863
- readonly $ref: "#/$defs/Timestamp";
14520
+ readonly commit: {
14521
+ readonly type: "string";
14522
+ readonly pattern: "^[0-9a-f]{40}$";
12864
14523
  };
12865
- readonly endedAt: {
14524
+ readonly createdAt: {
12866
14525
  readonly $ref: "#/$defs/Timestamp";
12867
14526
  };
12868
- readonly latenessSeconds: {
12869
- readonly type: "integer";
12870
- readonly minimum: 0;
12871
- };
12872
- readonly adjusted: {
12873
- readonly type: "string";
12874
- readonly description: "The occurrence was moved: `dst-gap` (the wall-clock time did not exist that day, so it ran at the next valid minute) or `tzdata` (the zone's rules changed after it was planned).";
12875
- readonly enum: readonly ["dst-gap", "tzdata"];
14527
+ readonly contracts: {
14528
+ readonly type: "object";
14529
+ readonly additionalProperties: false;
14530
+ readonly required: readonly ["schemaVersion"];
14531
+ readonly properties: {
14532
+ readonly schemaVersion: {
14533
+ readonly type: "integer";
14534
+ readonly enum: readonly [1];
14535
+ };
14536
+ };
12876
14537
  };
12877
- readonly window: {
12878
- readonly $ref: "#/$defs/ScheduleRunWindow";
14538
+ readonly levels: {
14539
+ readonly type: "object";
14540
+ readonly additionalProperties: false;
14541
+ readonly required: readonly ["schedules", "gates"];
14542
+ readonly properties: {
14543
+ readonly schedules: {
14544
+ readonly type: "integer";
14545
+ readonly minimum: 0;
14546
+ };
14547
+ readonly gates: {
14548
+ readonly type: "integer";
14549
+ readonly minimum: 0;
14550
+ };
14551
+ };
12879
14552
  };
12880
- readonly usage: {
12881
- readonly $ref: "#/$defs/ScheduleRunUsage";
14553
+ readonly migrations: {
14554
+ readonly type: "object";
14555
+ readonly additionalProperties: false;
14556
+ readonly required: readonly ["first", "last", "count", "names", "compatibleWithPrevious"];
14557
+ readonly properties: {
14558
+ readonly first: {
14559
+ readonly $ref: "#/$defs/MigrationName";
14560
+ };
14561
+ readonly last: {
14562
+ readonly $ref: "#/$defs/MigrationName";
14563
+ };
14564
+ readonly count: {
14565
+ readonly type: "integer";
14566
+ readonly minimum: 1;
14567
+ };
14568
+ readonly names: {
14569
+ readonly type: "array";
14570
+ readonly minItems: 1;
14571
+ readonly uniqueItems: true;
14572
+ readonly items: {
14573
+ readonly $ref: "#/$defs/MigrationName";
14574
+ };
14575
+ };
14576
+ readonly compatibleWithPrevious: {
14577
+ readonly type: "boolean";
14578
+ };
14579
+ };
12882
14580
  };
12883
- readonly taint: {
12884
- readonly $ref: "#/$defs/ScheduleRunTaint";
14581
+ readonly durableObjects: {
14582
+ readonly type: "object";
14583
+ readonly additionalProperties: false;
14584
+ readonly required: readonly ["bindings", "lifecycleChange"];
14585
+ readonly properties: {
14586
+ readonly bindings: {
14587
+ readonly type: "array";
14588
+ readonly items: {
14589
+ readonly type: "object";
14590
+ readonly additionalProperties: false;
14591
+ readonly required: readonly ["name", "className", "migration"];
14592
+ readonly properties: {
14593
+ readonly name: {
14594
+ readonly $ref: "#/$defs/BindingName";
14595
+ };
14596
+ readonly className: {
14597
+ readonly type: "string";
14598
+ readonly pattern: "^[A-Z][A-Za-z0-9]*$";
14599
+ };
14600
+ readonly migration: {
14601
+ readonly type: "string";
14602
+ readonly pattern: "^v[1-9][0-9]*$";
14603
+ };
14604
+ };
14605
+ };
14606
+ };
14607
+ readonly lifecycleChange: {
14608
+ readonly type: "boolean";
14609
+ };
14610
+ };
12885
14611
  };
12886
- readonly summary: {
12887
- readonly type: "string";
12888
- readonly description: "The agent's own account of the run (`end_run`) or the built-in job's report line. Plain text written by an agent: Studio renders it as text and never as an instruction.";
12889
- readonly maxLength: 2000;
12890
- readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
14612
+ readonly runtime: {
14613
+ readonly type: "object";
14614
+ readonly additionalProperties: false;
14615
+ readonly required: readonly ["compatibilityDate", "compatibilityFlags"];
14616
+ readonly properties: {
14617
+ readonly compatibilityDate: {
14618
+ readonly type: "string";
14619
+ readonly pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
14620
+ };
14621
+ readonly compatibilityFlags: {
14622
+ readonly type: "array";
14623
+ readonly uniqueItems: true;
14624
+ readonly items: {
14625
+ readonly type: "string";
14626
+ readonly pattern: "^[a-z0-9_]+$";
14627
+ };
14628
+ };
14629
+ };
12891
14630
  };
12892
- readonly counts: {
14631
+ readonly toolchain: {
12893
14632
  readonly type: "object";
12894
- readonly description: "Findings by name (e.g. `broken-links`, `stale-entries`, `proposals`).";
12895
- readonly propertyNames: {
14633
+ readonly additionalProperties: {
12896
14634
  readonly type: "string";
12897
- readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
14635
+ readonly maxLength: 64;
12898
14636
  };
12899
- readonly maxProperties: 20;
12900
- readonly additionalProperties: {
12901
- readonly type: "integer";
12902
- readonly minimum: 0;
14637
+ };
14638
+ readonly theme: {
14639
+ readonly type: "object";
14640
+ readonly additionalProperties: false;
14641
+ readonly required: readonly ["name", "version", "blockTypes", "settingsSha256", "designSha256"];
14642
+ readonly properties: {
14643
+ readonly name: {
14644
+ readonly type: "string";
14645
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
14646
+ };
14647
+ readonly version: {
14648
+ readonly type: "string";
14649
+ readonly maxLength: 64;
14650
+ };
14651
+ readonly blockTypes: {
14652
+ readonly type: "array";
14653
+ readonly uniqueItems: true;
14654
+ readonly items: {
14655
+ readonly type: "string";
14656
+ };
14657
+ };
14658
+ readonly settingsSha256: {
14659
+ readonly $ref: "#/$defs/Sha256Hex";
14660
+ };
14661
+ readonly designSha256: {
14662
+ readonly $ref: "#/$defs/Sha256Hex";
14663
+ };
12903
14664
  };
12904
14665
  };
12905
- readonly approvalIds: {
14666
+ readonly skills: {
12906
14667
  readonly type: "array";
12907
- readonly description: "Approval requests the run filed.";
12908
14668
  readonly items: {
12909
- readonly $ref: "#/$defs/Id";
14669
+ readonly type: "object";
14670
+ readonly additionalProperties: false;
14671
+ readonly required: readonly ["name", "sha256"];
14672
+ readonly properties: {
14673
+ readonly name: {
14674
+ readonly type: "string";
14675
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
14676
+ };
14677
+ readonly sha256: {
14678
+ readonly $ref: "#/$defs/Sha256Hex";
14679
+ };
14680
+ };
12910
14681
  };
12911
- readonly uniqueItems: true;
12912
- readonly maxItems: 50;
12913
- };
12914
- readonly error: {
12915
- readonly $ref: "#/$defs/ScheduleRunError";
12916
- };
12917
- readonly createdAt: {
12918
- readonly $ref: "#/$defs/Timestamp";
12919
- };
12920
- readonly updatedAt: {
12921
- readonly $ref: "#/$defs/Timestamp";
12922
- };
12923
- readonly rev: {
12924
- readonly $ref: "#/$defs/Revision";
12925
- };
12926
- };
12927
- readonly $defs: {
12928
- readonly Id: {
12929
- readonly type: "string";
12930
- 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.";
12931
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
12932
- readonly minLength: 8;
12933
- readonly maxLength: 48;
12934
14682
  };
12935
- readonly Revision: {
12936
- readonly type: "integer";
12937
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
12938
- readonly minimum: 0;
14683
+ readonly workers: {
14684
+ readonly type: "object";
14685
+ readonly additionalProperties: false;
14686
+ readonly required: readonly ["site", "admin"];
14687
+ readonly properties: {
14688
+ readonly site: {
14689
+ readonly $ref: "#/$defs/WorkerArtifact";
14690
+ };
14691
+ readonly admin: {
14692
+ readonly $ref: "#/$defs/WorkerArtifact";
14693
+ };
14694
+ };
12939
14695
  };
12940
- readonly ScheduleRunError: {
14696
+ readonly bindingTemplates: {
12941
14697
  readonly type: "object";
12942
14698
  readonly additionalProperties: false;
12943
- readonly required: readonly ["code"];
14699
+ readonly required: readonly ["site", "admin"];
12944
14700
  readonly properties: {
12945
- readonly code: {
12946
- readonly type: "string";
12947
- readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
14701
+ readonly site: {
14702
+ readonly $ref: "#/$defs/BindingTemplate";
12948
14703
  };
12949
- readonly message: {
12950
- readonly type: "string";
12951
- readonly maxLength: 500;
12952
- readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
14704
+ readonly admin: {
14705
+ readonly $ref: "#/$defs/BindingTemplate";
12953
14706
  };
12954
14707
  };
12955
14708
  };
12956
- readonly ScheduleRunId: {
12957
- readonly type: "string";
12958
- readonly description: "A run id: `run_` and 6 to 32 letters or digits, derived from the subject id and `occurrenceAt` (the occurrence's idempotency key).";
12959
- readonly pattern: "^run_[A-Za-z0-9]{6,32}$";
14709
+ readonly requiredScopes: {
14710
+ readonly type: "array";
14711
+ readonly uniqueItems: true;
14712
+ readonly items: {
14713
+ readonly $ref: "#/$defs/ScopeId";
14714
+ };
12960
14715
  };
12961
- readonly ScheduleRunState: {
12962
- readonly type: "string";
12963
- readonly description: "`due`: claimed occurrence not started yet; `ready`: an agent task's window is open and waits for `begin_run`; `running`; `succeeded`; `failed`; `missed`: the window closed or the scheduler came too late; `skipped`: a missed occurrence coalesced into a later one; `budget-exceeded`; `killed`: stopped by a pause or a kill switch.";
12964
- readonly enum: readonly ["due", "ready", "running", "succeeded", "failed", "missed", "skipped", "budget-exceeded", "killed"];
14716
+ readonly optionalScopes: {
14717
+ readonly type: "array";
14718
+ readonly uniqueItems: true;
14719
+ readonly items: {
14720
+ readonly $ref: "#/$defs/ScopeId";
14721
+ };
12965
14722
  };
12966
- readonly ScheduleRunSubject: {
12967
- readonly description: "What ran, discriminated by `kind`.";
14723
+ readonly requiredCapabilities: {
14724
+ readonly type: "array";
14725
+ readonly uniqueItems: true;
14726
+ readonly items: {
14727
+ readonly $ref: "#/$defs/Capability";
14728
+ };
14729
+ };
14730
+ readonly optionalCapabilities: {
14731
+ readonly type: "array";
14732
+ readonly uniqueItems: true;
14733
+ readonly items: {
14734
+ readonly $ref: "#/$defs/Capability";
14735
+ };
14736
+ };
14737
+ readonly starter: {
12968
14738
  readonly oneOf: readonly [{
12969
14739
  readonly type: "object";
12970
- readonly title: "ReleaseRunSubject";
12971
14740
  readonly additionalProperties: false;
12972
- readonly required: readonly ["kind", "releaseId"];
12973
- readonly properties: {
12974
- readonly kind: {
12975
- readonly type: "string";
12976
- readonly enum: readonly ["release"];
12977
- };
12978
- readonly releaseId: {
14741
+ readonly required: readonly ["kind"];
14742
+ readonly properties: {
14743
+ readonly kind: {
12979
14744
  readonly type: "string";
12980
- readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
14745
+ readonly enum: readonly ["admin-api"];
12981
14746
  };
12982
14747
  };
12983
14748
  }, {
12984
14749
  readonly type: "object";
12985
- readonly title: "AutomationRunSubject";
12986
14750
  readonly additionalProperties: false;
12987
- readonly required: readonly ["kind", "automationId", "job"];
14751
+ readonly required: readonly ["kind", "path", "bytes", "sha256", "siteId"];
12988
14752
  readonly properties: {
12989
14753
  readonly kind: {
12990
14754
  readonly type: "string";
12991
- readonly enum: readonly ["automation"];
14755
+ readonly enum: readonly ["bundle"];
12992
14756
  };
12993
- readonly automationId: {
14757
+ readonly path: {
12994
14758
  readonly type: "string";
12995
- readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
14759
+ readonly pattern: "^starter/[A-Za-z0-9._-]+$";
12996
14760
  };
12997
- readonly job: {
12998
- readonly type: "string";
12999
- readonly enum: readonly ["builtin", "agent-task"];
14761
+ readonly bytes: {
14762
+ readonly type: "integer";
14763
+ readonly minimum: 1;
14764
+ };
14765
+ readonly sha256: {
14766
+ readonly $ref: "#/$defs/Sha256Hex";
14767
+ };
14768
+ readonly siteId: {
14769
+ readonly $ref: "#/$defs/SiteId";
13000
14770
  };
13001
14771
  };
13002
14772
  }];
13003
14773
  };
13004
- readonly ScheduleRunTaint: {
14774
+ readonly features: {
13005
14775
  readonly type: "object";
13006
- readonly description: "The run read visitor-supplied text at `at` through `tool`; from then on it may only read, label, hide and pause.";
13007
- readonly additionalProperties: false;
13008
- readonly required: readonly ["at", "tool"];
14776
+ readonly additionalProperties: {
14777
+ readonly type: "boolean";
14778
+ };
14779
+ readonly required: readonly ["adminSitesAcceptsSiteId", "healthReportsVersion", "mediaTransformVar"];
13009
14780
  readonly properties: {
13010
- readonly at: {
13011
- readonly $ref: "#/$defs/Timestamp";
14781
+ readonly adminSitesAcceptsSiteId: {
14782
+ readonly type: "boolean";
13012
14783
  };
13013
- readonly tool: {
13014
- readonly type: "string";
13015
- readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
14784
+ readonly healthReportsVersion: {
14785
+ readonly type: "boolean";
14786
+ };
14787
+ readonly mediaTransformVar: {
14788
+ readonly type: "boolean";
13016
14789
  };
13017
14790
  };
13018
14791
  };
13019
- readonly ScheduleRunUsage: {
14792
+ readonly planVersion: {
14793
+ readonly type: "integer";
14794
+ readonly minimum: 1;
14795
+ };
14796
+ readonly signing: {
13020
14797
  readonly type: "object";
13021
- readonly description: "What the run used against its budget, counted by the server.";
13022
14798
  readonly additionalProperties: false;
13023
- readonly required: readonly ["toolCalls", "writes", "approvalRequests"];
14799
+ readonly required: readonly ["keyId", "algorithm", "signature"];
13024
14800
  readonly properties: {
13025
- readonly toolCalls: {
13026
- readonly type: "integer";
13027
- readonly minimum: 0;
14801
+ readonly keyId: {
14802
+ readonly type: "string";
14803
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
13028
14804
  };
13029
- readonly writes: {
13030
- readonly type: "integer";
13031
- readonly minimum: 0;
14805
+ readonly algorithm: {
14806
+ readonly type: "string";
14807
+ readonly enum: readonly ["Ed25519"];
13032
14808
  };
13033
- readonly approvalRequests: {
13034
- readonly type: "integer";
13035
- readonly minimum: 0;
14809
+ readonly signature: {
14810
+ readonly type: "string";
14811
+ readonly enum: readonly ["manifest.sig", "release-statement.sig"];
13036
14812
  };
13037
14813
  };
13038
14814
  };
13039
- readonly ScheduleRunWindow: {
14815
+ };
14816
+ readonly $defs: {
14817
+ readonly BindingName: {
14818
+ readonly type: "string";
14819
+ readonly pattern: "^[A-Z][A-Z0-9_]*(_\\*)?$";
14820
+ };
14821
+ readonly BindingTemplate: {
13040
14822
  readonly type: "object";
13041
- readonly description: "An agent task's run window: the automation's key is valid only between `opensAt` and `closesAt`, and only inside a run it began.";
13042
14823
  readonly additionalProperties: false;
13043
- readonly required: readonly ["opensAt", "closesAt"];
14824
+ readonly required: readonly ["bindings", "vars", "secrets"];
13044
14825
  readonly properties: {
13045
- readonly opensAt: {
13046
- readonly $ref: "#/$defs/Timestamp";
14826
+ readonly bindings: {
14827
+ readonly type: "array";
14828
+ readonly items: {
14829
+ readonly type: "object";
14830
+ readonly additionalProperties: false;
14831
+ readonly required: readonly ["name", "type", "required"];
14832
+ readonly properties: {
14833
+ readonly name: {
14834
+ readonly $ref: "#/$defs/BindingName";
14835
+ };
14836
+ readonly type: {
14837
+ readonly type: "string";
14838
+ readonly enum: readonly ["d1", "r2_bucket", "assets", "service", "durable_object_namespace", "analytics_engine", "analytics_sql", "ratelimit", "ai_search", "send_email", "ai", "browser"];
14839
+ };
14840
+ readonly required: {
14841
+ readonly type: "boolean";
14842
+ };
14843
+ readonly aliases: {
14844
+ readonly type: "array";
14845
+ readonly items: {
14846
+ readonly $ref: "#/$defs/BindingName";
14847
+ };
14848
+ };
14849
+ };
14850
+ };
13047
14851
  };
13048
- readonly closesAt: {
13049
- readonly $ref: "#/$defs/Timestamp";
14852
+ readonly vars: {
14853
+ readonly type: "array";
14854
+ readonly uniqueItems: true;
14855
+ readonly items: {
14856
+ readonly $ref: "#/$defs/BindingName";
14857
+ };
14858
+ };
14859
+ readonly secrets: {
14860
+ readonly type: "array";
14861
+ readonly uniqueItems: true;
14862
+ readonly items: {
14863
+ readonly $ref: "#/$defs/SecretName";
14864
+ };
14865
+ };
14866
+ readonly cache: {
14867
+ readonly type: "boolean";
14868
+ };
14869
+ readonly cron: {
14870
+ readonly type: "string";
14871
+ readonly pattern: "^[0-9*/,\\- ]+$";
13050
14872
  };
13051
14873
  };
13052
14874
  };
14875
+ readonly Capability: {
14876
+ readonly type: "string";
14877
+ readonly enum: readonly ["account", "workers", "d1", "r2", "analytics", "domains"];
14878
+ };
14879
+ readonly CloudhalVersion: {
14880
+ readonly type: "string";
14881
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
14882
+ };
14883
+ readonly MigrationName: {
14884
+ readonly type: "string";
14885
+ readonly pattern: "^[0-9]{4}_[a-z0-9_]+$";
14886
+ };
13053
14887
  readonly SchemaVersion: {
13054
14888
  readonly type: "integer";
13055
14889
  readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
13056
14890
  readonly enum: readonly [1];
13057
14891
  };
14892
+ readonly ScopeId: {
14893
+ readonly type: "string";
14894
+ readonly pattern: "^[a-z0-9-]+(\\.[a-z0-9-]+)+$";
14895
+ };
14896
+ readonly SecretName: {
14897
+ readonly type: "string";
14898
+ readonly enum: readonly ["BETTER_AUTH_SECRET", "MCP_STATE_KEY", "CLOUDHAL_PREVIEW_SECRET", "CLOUDHAL_PURGE_TOKEN", "CLOUDHAL_DEPLOY_TOKEN", "CLOUDHAL_SETUP_TOKEN", "CLOUDHAL_COMMENTS_KEY"];
14899
+ };
14900
+ readonly Sha256Hex: {
14901
+ readonly type: "string";
14902
+ readonly pattern: "^[0-9a-f]{64}$";
14903
+ };
14904
+ readonly SiteId: {
14905
+ readonly type: "string";
14906
+ readonly pattern: "^site_[A-Za-z0-9]{6,32}$";
14907
+ };
13058
14908
  readonly Timestamp: {
13059
14909
  readonly type: "string";
13060
14910
  readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
13061
14911
  readonly format: "date-time";
13062
14912
  };
14913
+ readonly WorkerArtifact: {
14914
+ readonly type: "object";
14915
+ readonly additionalProperties: false;
14916
+ readonly required: readonly ["mainModule", "modules", "assets"];
14917
+ readonly properties: {
14918
+ readonly mainModule: {
14919
+ readonly type: "string";
14920
+ readonly pattern: "^[A-Za-z0-9._/-]+$";
14921
+ };
14922
+ readonly modules: {
14923
+ readonly type: "array";
14924
+ readonly minItems: 1;
14925
+ readonly items: {
14926
+ readonly type: "object";
14927
+ readonly additionalProperties: false;
14928
+ readonly required: readonly ["path", "type", "bytes", "sha256"];
14929
+ readonly properties: {
14930
+ readonly path: {
14931
+ readonly type: "string";
14932
+ readonly pattern: "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*$";
14933
+ };
14934
+ readonly type: {
14935
+ readonly type: "string";
14936
+ readonly enum: readonly ["esm", "cjs", "wasm", "text", "data"];
14937
+ };
14938
+ readonly bytes: {
14939
+ readonly type: "integer";
14940
+ readonly minimum: 1;
14941
+ };
14942
+ readonly sha256: {
14943
+ readonly $ref: "#/$defs/Sha256Hex";
14944
+ };
14945
+ };
14946
+ };
14947
+ };
14948
+ readonly assets: {
14949
+ readonly type: "object";
14950
+ readonly additionalProperties: false;
14951
+ readonly required: readonly ["count", "bytes", "files", "headers"];
14952
+ readonly properties: {
14953
+ readonly count: {
14954
+ readonly type: "integer";
14955
+ readonly minimum: 0;
14956
+ readonly maximum: 20000;
14957
+ };
14958
+ readonly bytes: {
14959
+ readonly type: "integer";
14960
+ readonly minimum: 0;
14961
+ };
14962
+ readonly files: {
14963
+ readonly type: "array";
14964
+ readonly maxItems: 20000;
14965
+ readonly items: {
14966
+ readonly type: "object";
14967
+ readonly additionalProperties: false;
14968
+ readonly required: readonly ["path", "bytes", "sha256", "assetHash", "contentType"];
14969
+ readonly properties: {
14970
+ readonly path: {
14971
+ readonly type: "string";
14972
+ readonly pattern: "^/[^\\s]*$";
14973
+ readonly maxLength: 1024;
14974
+ };
14975
+ readonly bytes: {
14976
+ readonly type: "integer";
14977
+ readonly minimum: 0;
14978
+ readonly maximum: 26214400;
14979
+ };
14980
+ readonly sha256: {
14981
+ readonly $ref: "#/$defs/Sha256Hex";
14982
+ };
14983
+ readonly assetHash: {
14984
+ readonly type: "string";
14985
+ readonly pattern: "^[0-9a-f]{32}$";
14986
+ };
14987
+ readonly contentType: {
14988
+ readonly type: "string";
14989
+ readonly maxLength: 128;
14990
+ };
14991
+ };
14992
+ };
14993
+ };
14994
+ readonly headers: {
14995
+ readonly type: "string";
14996
+ readonly maxLength: 100000;
14997
+ };
14998
+ readonly config: {
14999
+ readonly type: "object";
15000
+ readonly additionalProperties: false;
15001
+ readonly properties: {
15002
+ readonly not_found_handling: {
15003
+ readonly type: "string";
15004
+ readonly enum: readonly ["none", "404-page", "single-page-application"];
15005
+ };
15006
+ readonly run_worker_first: {
15007
+ readonly type: "array";
15008
+ readonly items: {
15009
+ readonly type: "string";
15010
+ readonly pattern: "^/";
15011
+ };
15012
+ };
15013
+ };
15014
+ };
15015
+ };
15016
+ };
15017
+ readonly bindingTemplate: {
15018
+ readonly type: "string";
15019
+ readonly enum: readonly ["site", "admin"];
15020
+ };
15021
+ };
15022
+ };
13063
15023
  };
13064
15024
  };
13065
- readonly glossary: {
15025
+ readonly "release-statement": {
13066
15026
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
13067
- readonly $id: "https://cloudhal.dev/schemas/v1/glossary.schema.json";
13068
- readonly title: "Glossary";
13069
- readonly description: "A site's translation glossary (RFC-0033 §2): terms with their approved translation per locale, and terms never to translate (brand and product names). Agents translating content read it as hard constraints; the checks flag drafts that break it. One per site, snapshotted like every node.";
15027
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-statement.schema.json";
15028
+ readonly title: "ReleaseStatement";
15029
+ readonly description: "cloudhal.release-statement@1 (RFC-0046): the small canonical document a Cloudhal release signs, published as the release asset release-statement.json next to release-statement.sig (a raw 64-byte Ed25519 signature over the exact bytes, at most 4096 of them). It names the version, channel, commit and key id and pins the SHA-256 and size of manifest.json and of the tarball, so a remote deployer verifies one small file and then checks every other asset by digest. Canonical bytes: keys sorted recursively, 2-space indent, a trailing newline; a consumer verifies the bytes it downloaded and never re-serialises them. Portable on purpose: it references common only for SchemaVersion and Timestamp.";
13070
15030
  readonly type: "object";
13071
15031
  readonly additionalProperties: false;
13072
- readonly required: readonly ["schemaVersion", "id", "siteId", "entries", "rev", "createdAt", "updatedAt"];
15032
+ readonly required: readonly ["schemaVersion", "format", "version", "channel", "securityRelease", "commit", "createdAt", "signing", "manifest", "tarball"];
13073
15033
  readonly properties: {
13074
15034
  readonly schemaVersion: {
13075
15035
  readonly $ref: "#/$defs/SchemaVersion";
13076
15036
  };
13077
- readonly id: {
13078
- readonly $ref: "#/$defs/Id";
15037
+ readonly format: {
15038
+ readonly type: "string";
15039
+ readonly enum: readonly ["cloudhal.release-statement@1"];
13079
15040
  };
13080
- readonly siteId: {
13081
- readonly $ref: "#/$defs/Id";
15041
+ readonly version: {
15042
+ readonly $ref: "#/$defs/CloudhalVersion";
13082
15043
  };
13083
- readonly entries: {
13084
- readonly type: "array";
13085
- readonly description: "Unique by term (case-insensitive); order is the editor's.";
13086
- readonly items: {
13087
- readonly $ref: "#/$defs/GlossaryEntry";
13088
- };
13089
- readonly maxItems: 2000;
15044
+ readonly channel: {
15045
+ readonly type: "string";
15046
+ readonly enum: readonly ["stable", "next"];
13090
15047
  };
13091
- readonly rev: {
13092
- readonly $ref: "#/$defs/Revision";
15048
+ readonly securityRelease: {
15049
+ readonly type: "boolean";
13093
15050
  };
13094
- readonly createdAt: {
13095
- readonly $ref: "#/$defs/Timestamp";
15051
+ readonly commit: {
15052
+ readonly type: "string";
15053
+ readonly pattern: "^[0-9a-f]{40}$";
13096
15054
  };
13097
- readonly updatedAt: {
15055
+ readonly createdAt: {
13098
15056
  readonly $ref: "#/$defs/Timestamp";
13099
15057
  };
13100
- readonly metadata: {
13101
- readonly $ref: "#/$defs/Metadata";
13102
- };
13103
- };
13104
- readonly $defs: {
13105
- readonly GlossaryEntry: {
15058
+ readonly signing: {
13106
15059
  readonly type: "object";
13107
15060
  readonly additionalProperties: false;
13108
- readonly required: readonly ["term"];
15061
+ readonly required: readonly ["keyId", "algorithm", "signature"];
13109
15062
  readonly properties: {
13110
- readonly term: {
15063
+ readonly keyId: {
13111
15064
  readonly type: "string";
13112
- readonly description: "The term as written in the site's default locale.";
13113
- readonly minLength: 1;
13114
- readonly maxLength: 200;
15065
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
13115
15066
  };
13116
- readonly note: {
15067
+ readonly algorithm: {
13117
15068
  readonly type: "string";
13118
- readonly description: "Context for translators and agents: meaning, part of speech, where it appears.";
13119
- readonly maxLength: 500;
13120
- };
13121
- readonly doNotTranslate: {
13122
- readonly type: "boolean";
13123
- readonly description: "Keep the term as written in every locale (brand, product or proper names). Such an entry has no translations.";
13124
- };
13125
- readonly caseSensitive: {
13126
- readonly type: "boolean";
13127
- readonly description: "Match the term only with this exact capitalisation.";
15069
+ readonly enum: readonly ["Ed25519"];
13128
15070
  };
13129
- readonly translations: {
13130
- readonly type: "object";
13131
- readonly description: "The approved translation per locale (never the default locale).";
13132
- readonly propertyNames: {
13133
- readonly $ref: "#/$defs/Locale";
13134
- };
13135
- readonly additionalProperties: {
13136
- readonly type: "object";
13137
- readonly additionalProperties: false;
13138
- readonly required: readonly ["text"];
13139
- readonly properties: {
13140
- readonly text: {
13141
- readonly type: "string";
13142
- readonly minLength: 1;
13143
- readonly maxLength: 200;
13144
- };
13145
- readonly note: {
13146
- readonly type: "string";
13147
- readonly maxLength: 500;
13148
- };
13149
- };
13150
- };
15071
+ readonly signature: {
15072
+ readonly type: "string";
15073
+ readonly enum: readonly ["release-statement.sig"];
13151
15074
  };
13152
15075
  };
13153
15076
  };
13154
- readonly Id: {
13155
- readonly type: "string";
13156
- 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.";
13157
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
13158
- readonly minLength: 8;
13159
- readonly maxLength: 48;
13160
- };
13161
- readonly Locale: {
13162
- readonly type: "string";
13163
- readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
13164
- readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
15077
+ readonly manifest: {
15078
+ readonly $ref: "#/$defs/StatementAsset";
13165
15079
  };
13166
- readonly Metadata: {
13167
- readonly type: "object";
13168
- readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
13169
- readonly additionalProperties: {
13170
- readonly type: "string";
13171
- };
15080
+ readonly tarball: {
15081
+ readonly $ref: "#/$defs/StatementAsset";
13172
15082
  };
13173
- readonly Revision: {
13174
- readonly type: "integer";
13175
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
13176
- readonly minimum: 0;
15083
+ };
15084
+ readonly $defs: {
15085
+ readonly CloudhalVersion: {
15086
+ readonly type: "string";
15087
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
13177
15088
  };
13178
15089
  readonly SchemaVersion: {
13179
15090
  readonly type: "integer";
13180
15091
  readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
13181
15092
  readonly enum: readonly [1];
13182
15093
  };
15094
+ readonly Sha256Hex: {
15095
+ readonly type: "string";
15096
+ readonly pattern: "^[0-9a-f]{64}$";
15097
+ };
15098
+ readonly StatementAsset: {
15099
+ readonly type: "object";
15100
+ readonly additionalProperties: false;
15101
+ readonly required: readonly ["name", "sha256", "bytes"];
15102
+ readonly properties: {
15103
+ readonly name: {
15104
+ readonly type: "string";
15105
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$";
15106
+ };
15107
+ readonly sha256: {
15108
+ readonly $ref: "#/$defs/Sha256Hex";
15109
+ };
15110
+ readonly bytes: {
15111
+ readonly type: "integer";
15112
+ readonly minimum: 1;
15113
+ readonly maximum: 104857600;
15114
+ };
15115
+ };
15116
+ };
13183
15117
  readonly Timestamp: {
13184
15118
  readonly type: "string";
13185
15119
  readonly description: "RFC 3339 / ISO 8601 instant in UTC.";