@cloudhal/core-contracts 0.8.0 → 0.10.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.
@@ -6931,376 +6931,1216 @@ export declare const GlossarySchema: {
6931
6931
  };
6932
6932
  };
6933
6933
  };
6934
- export declare const schemas: {
6935
- readonly project: {
6936
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
6937
- readonly $id: "https://cloudhal.dev/schemas/v1/project.schema.json";
6938
- readonly title: "Project";
6939
- 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.";
6940
- readonly type: "object";
6941
- readonly additionalProperties: false;
6942
- readonly required: readonly ["schemaVersion", "id", "name", "slug", "ownerId", "siteIds", "rev", "createdAt", "updatedAt"];
6943
- readonly properties: {
6944
- readonly schemaVersion: {
6945
- readonly $ref: "#/$defs/SchemaVersion";
6946
- };
6947
- readonly id: {
6948
- readonly $ref: "#/$defs/Id";
6949
- };
6950
- readonly name: {
6951
- readonly type: "string";
6952
- readonly minLength: 1;
6953
- readonly maxLength: 200;
6954
- };
6955
- readonly slug: {
6956
- readonly $ref: "#/$defs/Slug";
6957
- };
6958
- readonly ownerId: {
6959
- readonly $ref: "#/$defs/Id";
6960
- };
6961
- readonly siteIds: {
6962
- readonly type: "array";
6963
- readonly items: {
6964
- readonly $ref: "#/$defs/Id";
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];
6965
6975
  };
6966
- readonly uniqueItems: true;
6967
6976
  };
6968
- readonly rev: {
6969
- readonly $ref: "#/$defs/Revision";
6970
- };
6971
- readonly createdAt: {
6972
- readonly $ref: "#/$defs/Timestamp";
6973
- };
6974
- readonly updatedAt: {
6975
- readonly $ref: "#/$defs/Timestamp";
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
+ };
6976
6991
  };
6977
- readonly metadata: {
6978
- readonly $ref: "#/$defs/Metadata";
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
+ };
6979
7019
  };
6980
7020
  };
6981
- readonly $defs: {
6982
- readonly Id: {
6983
- readonly type: "string";
6984
- 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.";
6985
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
6986
- readonly minLength: 8;
6987
- readonly maxLength: 48;
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";
7049
+ };
6988
7050
  };
6989
- readonly Metadata: {
6990
- readonly type: "object";
6991
- readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
6992
- readonly additionalProperties: {
7051
+ };
7052
+ readonly runtime: {
7053
+ readonly type: "object";
7054
+ readonly additionalProperties: false;
7055
+ readonly required: readonly ["compatibilityDate", "compatibilityFlags"];
7056
+ readonly properties: {
7057
+ readonly compatibilityDate: {
6993
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
+ };
6994
7068
  };
6995
- };
6996
- readonly Revision: {
6997
- readonly type: "integer";
6998
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
6999
- readonly minimum: 0;
7000
- };
7001
- readonly SchemaVersion: {
7002
- readonly type: "integer";
7003
- readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7004
- readonly enum: readonly [1];
7005
- };
7006
- readonly Slug: {
7007
- readonly type: "string";
7008
- readonly description: "Lower-case URL segment.";
7009
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
7010
- readonly minLength: 1;
7011
- readonly maxLength: 128;
7012
- };
7013
- readonly Timestamp: {
7014
- readonly type: "string";
7015
- readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7016
- readonly format: "date-time";
7017
7069
  };
7018
7070
  };
7019
- };
7020
- readonly site: {
7021
- readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7022
- readonly $id: "https://cloudhal.dev/schemas/v1/site.schema.json";
7023
- readonly title: "Site";
7024
- readonly description: "Root node of a Site Graph: one deployable website with its locales, domains, theme and page index. Pages and content entries are separate nodes referenced by id so they can be versioned and locked independently.";
7025
- readonly type: "object";
7026
- readonly additionalProperties: false;
7027
- readonly required: readonly ["schemaVersion", "id", "projectId", "name", "slug", "defaultLocale", "locales", "domains", "pageIds", "theme", "rev", "createdAt", "updatedAt"];
7028
- readonly properties: {
7029
- readonly schemaVersion: {
7030
- readonly $ref: "#/$defs/SchemaVersion";
7031
- };
7032
- readonly id: {
7033
- readonly $ref: "#/$defs/Id";
7034
- };
7035
- readonly projectId: {
7036
- readonly $ref: "#/$defs/Id";
7037
- };
7038
- readonly name: {
7071
+ readonly toolchain: {
7072
+ readonly type: "object";
7073
+ readonly additionalProperties: {
7039
7074
  readonly type: "string";
7040
- readonly minLength: 1;
7041
- readonly maxLength: 200;
7042
- };
7043
- readonly slug: {
7044
- readonly $ref: "#/$defs/Slug";
7045
- };
7046
- readonly defaultLocale: {
7047
- readonly $ref: "#/$defs/Locale";
7075
+ readonly maxLength: 64;
7048
7076
  };
7049
- readonly locales: {
7050
- readonly type: "array";
7051
- readonly items: {
7052
- readonly $ref: "#/$defs/Locale";
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}$";
7053
7086
  };
7054
- readonly minItems: 1;
7055
- readonly uniqueItems: true;
7056
- };
7057
- readonly domains: {
7058
- readonly type: "array";
7059
- readonly description: "Hostnames serving this site. Exactly one should be primary: the address canonical links, feeds and previews use. Sites run on their own domains or their Cloudflare account's workers.dev address, never on a Cloudhal domain (ADR-0037).";
7060
- readonly items: {
7061
- readonly $ref: "#/$defs/Domain";
7087
+ readonly version: {
7088
+ readonly type: "string";
7089
+ readonly maxLength: 64;
7062
7090
  };
7063
- };
7064
- readonly pageIds: {
7065
- readonly type: "array";
7066
- readonly items: {
7067
- readonly $ref: "#/$defs/Id";
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";
7068
7103
  };
7069
- readonly uniqueItems: true;
7070
- };
7071
- readonly homePageId: {
7072
- readonly $ref: "#/$defs/Id";
7073
- };
7074
- readonly localization: {
7075
- readonly $ref: "#/$defs/Localization";
7076
7104
  };
7077
- readonly collections: {
7105
+ };
7106
+ readonly skills: {
7107
+ readonly type: "array";
7108
+ readonly items: {
7078
7109
  readonly type: "object";
7079
- readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
7080
- readonly propertyNames: {
7081
- readonly $ref: "#/$defs/Slug";
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
+ };
7082
7120
  };
7083
- readonly maxProperties: 50;
7084
- readonly additionalProperties: {
7085
- readonly $ref: "#/$defs/CollectionSettings";
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";
7086
7133
  };
7087
7134
  };
7088
- readonly theme: {
7089
- readonly $ref: "#/$defs/ThemeRef";
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
+ };
7090
7147
  };
7091
- readonly design: {
7092
- readonly $ref: "#/$defs/Design";
7093
- };
7094
- readonly brand: {
7095
- readonly $ref: "#/$defs/Brand";
7096
- };
7097
- readonly chrome: {
7098
- readonly $ref: "#/$defs/Chrome";
7099
- };
7100
- readonly timeZone: {
7101
- readonly $ref: "#/$defs/TimeZone";
7102
- readonly description: "The site's time zone (RFC-0008): Studio's calendar, schedules entered as wall-clock times and recurring automations use it. Absent means UTC.";
7103
- };
7104
- readonly publishedSnapshotId: {
7105
- readonly $ref: "#/$defs/Id";
7106
- readonly description: "Snapshot currently serving production. Rollback = pointing this at an older snapshot.";
7107
- };
7108
- readonly rev: {
7109
- readonly $ref: "#/$defs/Revision";
7148
+ };
7149
+ readonly requiredScopes: {
7150
+ readonly type: "array";
7151
+ readonly uniqueItems: true;
7152
+ readonly items: {
7153
+ readonly $ref: "#/$defs/ScopeId";
7110
7154
  };
7111
- readonly createdAt: {
7112
- readonly $ref: "#/$defs/Timestamp";
7155
+ };
7156
+ readonly optionalScopes: {
7157
+ readonly type: "array";
7158
+ readonly uniqueItems: true;
7159
+ readonly items: {
7160
+ readonly $ref: "#/$defs/ScopeId";
7113
7161
  };
7114
- readonly updatedAt: {
7115
- readonly $ref: "#/$defs/Timestamp";
7162
+ };
7163
+ readonly requiredCapabilities: {
7164
+ readonly type: "array";
7165
+ readonly uniqueItems: true;
7166
+ readonly items: {
7167
+ readonly $ref: "#/$defs/Capability";
7116
7168
  };
7117
- readonly metadata: {
7118
- readonly $ref: "#/$defs/Metadata";
7169
+ };
7170
+ readonly optionalCapabilities: {
7171
+ readonly type: "array";
7172
+ readonly uniqueItems: true;
7173
+ readonly items: {
7174
+ readonly $ref: "#/$defs/Capability";
7119
7175
  };
7120
7176
  };
7121
- readonly $defs: {
7122
- readonly Actor: {
7177
+ readonly starter: {
7178
+ readonly oneOf: readonly [{
7123
7179
  readonly type: "object";
7124
7180
  readonly additionalProperties: false;
7125
- readonly required: readonly ["kind", "id"];
7181
+ readonly required: readonly ["kind"];
7126
7182
  readonly properties: {
7127
7183
  readonly kind: {
7128
- readonly $ref: "#/$defs/ActorKind";
7129
- };
7130
- readonly id: {
7131
- readonly $ref: "#/$defs/Id";
7132
- };
7133
- readonly name: {
7134
7184
  readonly type: "string";
7135
- readonly maxLength: 200;
7185
+ readonly enum: readonly ["admin-api"];
7136
7186
  };
7137
7187
  };
7138
- };
7139
- readonly ActorKind: {
7140
- readonly type: "string";
7141
- readonly description: "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.";
7142
- readonly enum: readonly ["human", "agent", "system"];
7143
- };
7144
- readonly Announcement: {
7188
+ }, {
7145
7189
  readonly type: "object";
7146
7190
  readonly additionalProperties: false;
7147
- readonly required: readonly ["id", "text"];
7191
+ readonly required: readonly ["kind", "path", "bytes", "sha256", "siteId"];
7148
7192
  readonly properties: {
7149
- readonly id: {
7150
- readonly type: "string";
7151
- readonly pattern: "^[a-z0-9][a-z0-9-]{0,40}$";
7152
- readonly description: "Change it when the text changes, so readers who dismissed the old one see the new one.";
7153
- };
7154
- readonly text: {
7193
+ readonly kind: {
7155
7194
  readonly type: "string";
7156
- readonly minLength: 1;
7157
- readonly maxLength: 200;
7195
+ readonly enum: readonly ["bundle"];
7158
7196
  };
7159
- readonly label: {
7197
+ readonly path: {
7160
7198
  readonly type: "string";
7161
- readonly minLength: 1;
7162
- readonly maxLength: 40;
7199
+ readonly pattern: "^starter/[A-Za-z0-9._-]+$";
7163
7200
  };
7164
- readonly href: {
7165
- readonly type: "string";
7166
- readonly minLength: 1;
7167
- readonly maxLength: 2048;
7201
+ readonly bytes: {
7202
+ readonly type: "integer";
7203
+ readonly minimum: 1;
7168
7204
  };
7169
- readonly tone: {
7170
- readonly type: "string";
7171
- readonly enum: readonly ["info", "brand", "warning"];
7205
+ readonly sha256: {
7206
+ readonly $ref: "#/$defs/Sha256Hex";
7172
7207
  };
7173
- readonly dismissible: {
7174
- readonly type: "boolean";
7208
+ readonly siteId: {
7209
+ readonly $ref: "#/$defs/SiteId";
7175
7210
  };
7176
7211
  };
7212
+ }];
7213
+ };
7214
+ readonly features: {
7215
+ readonly type: "object";
7216
+ readonly additionalProperties: {
7217
+ readonly type: "boolean";
7177
7218
  };
7178
- readonly BodyBlock: {
7179
- readonly type: "object";
7180
- readonly description: "One top-level block of a markdown body in the store's index (RFC-0014 §3). Written by the store only: a client's values are replaced on every write. `by`, `via` and `at` say who last changed the block's content, through which channel and when; they are absent for content written before the index existed.";
7181
- readonly additionalProperties: false;
7182
- readonly required: readonly ["id", "hash"];
7183
- readonly properties: {
7184
- readonly id: {
7185
- readonly type: "string";
7186
- readonly pattern: "^blk_[0-9A-Za-z]{8,24}$";
7187
- readonly description: "Stable across writes that keep the block's content or its place among unchanged blocks.";
7188
- };
7189
- readonly hash: {
7190
- readonly type: "string";
7191
- readonly pattern: "^[0-9a-f]{64}$";
7192
- readonly description: "SHA-256 (hex) of the block's markdown without trailing whitespace.";
7193
- };
7194
- readonly by: {
7195
- readonly $ref: "#/$defs/Actor";
7196
- };
7197
- readonly via: {
7198
- readonly type: "string";
7199
- readonly enum: readonly ["studio", "mcp", "api", "import", "ai-command", "proposal"];
7200
- readonly description: "The channel of that change.";
7201
- };
7202
- readonly at: {
7203
- readonly $ref: "#/$defs/Timestamp";
7204
- };
7219
+ readonly required: readonly ["adminSitesAcceptsSiteId", "healthReportsVersion", "mediaTransformVar"];
7220
+ readonly properties: {
7221
+ readonly adminSitesAcceptsSiteId: {
7222
+ readonly type: "boolean";
7205
7223
  };
7206
- };
7207
- readonly BodyBlocks: {
7208
- readonly type: "array";
7209
- readonly description: "A markdown body's block index, in body order (RFC-0014 §3). Absent means not indexed (yet, or an HTML body), never empty.";
7210
- readonly maxItems: 5000;
7211
- readonly items: {
7212
- readonly $ref: "#/$defs/BodyBlock";
7224
+ readonly healthReportsVersion: {
7225
+ readonly type: "boolean";
7226
+ };
7227
+ readonly mediaTransformVar: {
7228
+ readonly type: "boolean";
7213
7229
  };
7214
7230
  };
7215
- readonly BodyProfile: {
7216
- readonly type: "integer";
7217
- readonly enum: readonly [1];
7218
- readonly description: "The markdown dialect a body follows (RFC-0014 §1): 1 = Cloudhal Markdown v1 (CommonMark + GFM + `asset:` + directives; raw HTML escaped). Set by the store on markdown bodies.";
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
+ };
7219
7253
  };
7220
- readonly Brand: {
7221
- readonly type: "object";
7222
- readonly description: "The site's logo and social links (RFC-0025 §1), shared by the header, the footer and SEO.";
7223
- readonly additionalProperties: false;
7224
- readonly properties: {
7225
- readonly logo: {
7226
- readonly $ref: "#/$defs/ImageRef";
7227
- };
7228
- readonly logoDark: {
7229
- readonly $ref: "#/$defs/ImageRef";
7230
- };
7231
- readonly logoHeight: {
7232
- readonly type: "string";
7233
- readonly enum: readonly ["s", "m", "l"];
7234
- };
7235
- readonly social: {
7236
- readonly type: "array";
7237
- readonly maxItems: 8;
7238
- readonly items: {
7239
- readonly $ref: "#/$defs/SocialLink";
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
+ };
7240
7289
  };
7241
7290
  };
7242
7291
  };
7243
- };
7244
- readonly Chrome: {
7245
- readonly type: "object";
7246
- readonly description: "The site's header, footer and bars as data (RFC-0025): enums, menu keys and short texts; the theme renders them with landmarks, focus and contrast guaranteed.";
7247
- readonly additionalProperties: false;
7248
- readonly properties: {
7249
- readonly header: {
7250
- readonly $ref: "#/$defs/ChromeHeader";
7251
- };
7252
- readonly footer: {
7253
- readonly $ref: "#/$defs/ChromeFooter";
7254
- };
7255
- readonly announcement: {
7256
- readonly $ref: "#/$defs/Announcement";
7292
+ readonly vars: {
7293
+ readonly type: "array";
7294
+ readonly uniqueItems: true;
7295
+ readonly items: {
7296
+ readonly $ref: "#/$defs/BindingName";
7257
7297
  };
7258
- readonly consent: {
7259
- readonly $ref: "#/$defs/Consent";
7298
+ };
7299
+ readonly secrets: {
7300
+ readonly type: "array";
7301
+ readonly uniqueItems: true;
7302
+ readonly items: {
7303
+ readonly $ref: "#/$defs/SecretName";
7260
7304
  };
7261
7305
  };
7306
+ readonly cache: {
7307
+ readonly type: "boolean";
7308
+ };
7309
+ readonly cron: {
7310
+ readonly type: "string";
7311
+ readonly pattern: "^[0-9*/,\\- ]+$";
7312
+ };
7262
7313
  };
7263
- readonly ChromeFooter: {
7264
- readonly type: "object";
7265
- readonly additionalProperties: false;
7266
- readonly properties: {
7267
- readonly layout: {
7268
- readonly type: "string";
7269
- readonly enum: readonly ["simple", "columns", "cta-band", "minimal"];
7270
- };
7271
- readonly surface: {
7272
- readonly type: "string";
7273
- readonly enum: readonly ["plain", "muted", "inverse"];
7274
- };
7275
- readonly tagline: {
7276
- readonly type: "string";
7277
- readonly minLength: 1;
7278
- readonly maxLength: 200;
7279
- };
7280
- readonly columns: {
7281
- readonly type: "array";
7282
- readonly maxItems: 5;
7283
- readonly items: {
7284
- readonly $ref: "#/$defs/FooterColumn";
7285
- };
7286
- };
7287
- readonly ctaHeading: {
7288
- readonly type: "string";
7289
- readonly minLength: 1;
7290
- readonly maxLength: 120;
7291
- };
7292
- readonly ctaLabel: {
7293
- readonly type: "string";
7294
- readonly minLength: 1;
7295
- readonly maxLength: 40;
7296
- };
7297
- readonly ctaHref: {
7298
- readonly type: "string";
7299
- readonly minLength: 1;
7300
- readonly maxLength: 2048;
7301
- };
7302
- readonly social: {
7303
- readonly type: "boolean";
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 ReleaseKeysSchema: {
7565
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7566
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-keys.schema.json";
7567
+ readonly title: "ReleaseKeys";
7568
+ readonly description: "cloudhal.release-keys@1 (RFC-0046 §9): the root-signed list of Cloudhal's release and yank keys, published as keys.json at https://cloudhal.dev/.well-known/cloudhal/keys.json next to keys.json.sig (a raw 64-byte Ed25519 signature by the offline root over the exact bytes). A consumer uses it only to reduce trust in the keys it pins: revoke, mark retiring, narrow a validity window; it never adds a key. Canonical bytes as for the release statement.";
7569
+ readonly type: "object";
7570
+ readonly additionalProperties: false;
7571
+ readonly required: readonly ["schemaVersion", "format", "issuedAt", "expires", "signing", "keys"];
7572
+ readonly properties: {
7573
+ readonly schemaVersion: {
7574
+ readonly $ref: "#/$defs/SchemaVersion";
7575
+ };
7576
+ readonly format: {
7577
+ readonly type: "string";
7578
+ readonly enum: readonly ["cloudhal.release-keys@1"];
7579
+ };
7580
+ readonly issuedAt: {
7581
+ readonly $ref: "#/$defs/Timestamp";
7582
+ };
7583
+ readonly expires: {
7584
+ readonly description: "At most 13 months after issuedAt; a consumer refuses an expired list.";
7585
+ readonly $ref: "#/$defs/Timestamp";
7586
+ };
7587
+ readonly signing: {
7588
+ readonly type: "object";
7589
+ readonly additionalProperties: false;
7590
+ readonly required: readonly ["keyId", "algorithm", "signature"];
7591
+ readonly properties: {
7592
+ readonly keyId: {
7593
+ readonly description: "The root key that signed this list.";
7594
+ readonly $ref: "#/$defs/KeyId";
7595
+ };
7596
+ readonly algorithm: {
7597
+ readonly type: "string";
7598
+ readonly enum: readonly ["Ed25519"];
7599
+ };
7600
+ readonly signature: {
7601
+ readonly type: "string";
7602
+ readonly enum: readonly ["keys.json.sig"];
7603
+ };
7604
+ };
7605
+ };
7606
+ readonly keys: {
7607
+ readonly type: "array";
7608
+ readonly maxItems: 64;
7609
+ readonly items: {
7610
+ readonly $ref: "#/$defs/ListedKey";
7611
+ };
7612
+ };
7613
+ };
7614
+ readonly $defs: {
7615
+ readonly KeyId: {
7616
+ readonly type: "string";
7617
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
7618
+ };
7619
+ readonly ListedKey: {
7620
+ readonly type: "object";
7621
+ readonly additionalProperties: false;
7622
+ readonly required: readonly ["keyId", "publicKey", "role", "notBefore", "notAfter", "status"];
7623
+ readonly properties: {
7624
+ readonly keyId: {
7625
+ readonly $ref: "#/$defs/KeyId";
7626
+ };
7627
+ readonly publicKey: {
7628
+ readonly description: "The raw 32-byte Ed25519 public key, base64.";
7629
+ readonly type: "string";
7630
+ readonly pattern: "^[A-Za-z0-9+/]{43}=$";
7631
+ };
7632
+ readonly role: {
7633
+ readonly type: "string";
7634
+ readonly enum: readonly ["release", "yank"];
7635
+ };
7636
+ readonly notBefore: {
7637
+ readonly $ref: "#/$defs/Timestamp";
7638
+ };
7639
+ readonly notAfter: {
7640
+ readonly $ref: "#/$defs/Timestamp";
7641
+ };
7642
+ readonly status: {
7643
+ readonly type: "string";
7644
+ readonly enum: readonly ["active", "retiring", "revoked"];
7645
+ };
7646
+ };
7647
+ };
7648
+ readonly SchemaVersion: {
7649
+ readonly type: "integer";
7650
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7651
+ readonly enum: readonly [1];
7652
+ };
7653
+ readonly Timestamp: {
7654
+ readonly type: "string";
7655
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7656
+ readonly format: "date-time";
7657
+ };
7658
+ };
7659
+ };
7660
+ export declare const ReleaseYankListSchema: {
7661
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7662
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-yank-list.schema.json";
7663
+ readonly title: "ReleaseYankList";
7664
+ readonly description: "cloudhal.release-yank-list@1 (RFC-0046 §9): the yank list, published as yanked.json at https://cloudhal.dev/.well-known/cloudhal/yanked.json next to yanked.json.sig (a raw 64-byte Ed25519 signature by a yank-role key from keys.json over the exact bytes). It only reduces trust: versions no consumer may install, and release key ids every consumer must refuse. Re-signed weekly; it expires 30 days after issuedAt, and a stale list blocks new installs only.";
7665
+ readonly type: "object";
7666
+ readonly additionalProperties: false;
7667
+ readonly required: readonly ["schemaVersion", "format", "serial", "issuedAt", "expires", "signing", "versions", "revokedKeys"];
7668
+ readonly properties: {
7669
+ readonly schemaVersion: {
7670
+ readonly $ref: "#/$defs/SchemaVersion";
7671
+ };
7672
+ readonly format: {
7673
+ readonly type: "string";
7674
+ readonly enum: readonly ["cloudhal.release-yank-list@1"];
7675
+ };
7676
+ readonly serial: {
7677
+ readonly description: "Increases by one at every signing. A consumer that keeps state refuses a serial lower than the last one it saw (a rollback to an older, validly signed list).";
7678
+ readonly type: "integer";
7679
+ readonly minimum: 1;
7680
+ readonly maximum: 9007199254740991;
7681
+ };
7682
+ readonly issuedAt: {
7683
+ readonly $ref: "#/$defs/Timestamp";
7684
+ };
7685
+ readonly expires: {
7686
+ readonly description: "Exactly 30 days after issuedAt.";
7687
+ readonly $ref: "#/$defs/Timestamp";
7688
+ };
7689
+ readonly signing: {
7690
+ readonly type: "object";
7691
+ readonly additionalProperties: false;
7692
+ readonly required: readonly ["keyId", "algorithm", "signature"];
7693
+ readonly properties: {
7694
+ readonly keyId: {
7695
+ readonly description: "The yank-role key that signed this list.";
7696
+ readonly $ref: "#/$defs/KeyId";
7697
+ };
7698
+ readonly algorithm: {
7699
+ readonly type: "string";
7700
+ readonly enum: readonly ["Ed25519"];
7701
+ };
7702
+ readonly signature: {
7703
+ readonly type: "string";
7704
+ readonly enum: readonly ["yanked.json.sig"];
7705
+ };
7706
+ };
7707
+ };
7708
+ readonly versions: {
7709
+ readonly type: "array";
7710
+ readonly maxItems: 1000;
7711
+ readonly items: {
7712
+ readonly type: "object";
7713
+ readonly additionalProperties: false;
7714
+ readonly required: readonly ["version", "yankedAt", "reason"];
7715
+ readonly properties: {
7716
+ readonly version: {
7717
+ readonly $ref: "#/$defs/CloudhalVersion";
7718
+ };
7719
+ readonly yankedAt: {
7720
+ readonly $ref: "#/$defs/Timestamp";
7721
+ };
7722
+ readonly reason: {
7723
+ readonly type: "string";
7724
+ readonly minLength: 1;
7725
+ readonly maxLength: 500;
7726
+ };
7727
+ };
7728
+ };
7729
+ };
7730
+ readonly revokedKeys: {
7731
+ readonly type: "array";
7732
+ readonly maxItems: 64;
7733
+ readonly items: {
7734
+ readonly type: "object";
7735
+ readonly additionalProperties: false;
7736
+ readonly required: readonly ["keyId", "revokedAt", "reason"];
7737
+ readonly properties: {
7738
+ readonly keyId: {
7739
+ readonly $ref: "#/$defs/KeyId";
7740
+ };
7741
+ readonly revokedAt: {
7742
+ readonly $ref: "#/$defs/Timestamp";
7743
+ };
7744
+ readonly reason: {
7745
+ readonly type: "string";
7746
+ readonly minLength: 1;
7747
+ readonly maxLength: 500;
7748
+ };
7749
+ };
7750
+ };
7751
+ };
7752
+ };
7753
+ readonly $defs: {
7754
+ readonly CloudhalVersion: {
7755
+ readonly type: "string";
7756
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
7757
+ };
7758
+ readonly KeyId: {
7759
+ readonly type: "string";
7760
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
7761
+ };
7762
+ readonly SchemaVersion: {
7763
+ readonly type: "integer";
7764
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7765
+ readonly enum: readonly [1];
7766
+ };
7767
+ readonly Timestamp: {
7768
+ readonly type: "string";
7769
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7770
+ readonly format: "date-time";
7771
+ };
7772
+ };
7773
+ };
7774
+ export declare const schemas: {
7775
+ readonly project: {
7776
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7777
+ readonly $id: "https://cloudhal.dev/schemas/v1/project.schema.json";
7778
+ readonly title: "Project";
7779
+ 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.";
7780
+ readonly type: "object";
7781
+ readonly additionalProperties: false;
7782
+ readonly required: readonly ["schemaVersion", "id", "name", "slug", "ownerId", "siteIds", "rev", "createdAt", "updatedAt"];
7783
+ readonly properties: {
7784
+ readonly schemaVersion: {
7785
+ readonly $ref: "#/$defs/SchemaVersion";
7786
+ };
7787
+ readonly id: {
7788
+ readonly $ref: "#/$defs/Id";
7789
+ };
7790
+ readonly name: {
7791
+ readonly type: "string";
7792
+ readonly minLength: 1;
7793
+ readonly maxLength: 200;
7794
+ };
7795
+ readonly slug: {
7796
+ readonly $ref: "#/$defs/Slug";
7797
+ };
7798
+ readonly ownerId: {
7799
+ readonly $ref: "#/$defs/Id";
7800
+ };
7801
+ readonly siteIds: {
7802
+ readonly type: "array";
7803
+ readonly items: {
7804
+ readonly $ref: "#/$defs/Id";
7805
+ };
7806
+ readonly uniqueItems: true;
7807
+ };
7808
+ readonly rev: {
7809
+ readonly $ref: "#/$defs/Revision";
7810
+ };
7811
+ readonly createdAt: {
7812
+ readonly $ref: "#/$defs/Timestamp";
7813
+ };
7814
+ readonly updatedAt: {
7815
+ readonly $ref: "#/$defs/Timestamp";
7816
+ };
7817
+ readonly metadata: {
7818
+ readonly $ref: "#/$defs/Metadata";
7819
+ };
7820
+ };
7821
+ readonly $defs: {
7822
+ readonly Id: {
7823
+ readonly type: "string";
7824
+ 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.";
7825
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
7826
+ readonly minLength: 8;
7827
+ readonly maxLength: 48;
7828
+ };
7829
+ readonly Metadata: {
7830
+ readonly type: "object";
7831
+ readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
7832
+ readonly additionalProperties: {
7833
+ readonly type: "string";
7834
+ };
7835
+ };
7836
+ readonly Revision: {
7837
+ readonly type: "integer";
7838
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
7839
+ readonly minimum: 0;
7840
+ };
7841
+ readonly SchemaVersion: {
7842
+ readonly type: "integer";
7843
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
7844
+ readonly enum: readonly [1];
7845
+ };
7846
+ readonly Slug: {
7847
+ readonly type: "string";
7848
+ readonly description: "Lower-case URL segment.";
7849
+ readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
7850
+ readonly minLength: 1;
7851
+ readonly maxLength: 128;
7852
+ };
7853
+ readonly Timestamp: {
7854
+ readonly type: "string";
7855
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
7856
+ readonly format: "date-time";
7857
+ };
7858
+ };
7859
+ };
7860
+ readonly site: {
7861
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
7862
+ readonly $id: "https://cloudhal.dev/schemas/v1/site.schema.json";
7863
+ readonly title: "Site";
7864
+ readonly description: "Root node of a Site Graph: one deployable website with its locales, domains, theme and page index. Pages and content entries are separate nodes referenced by id so they can be versioned and locked independently.";
7865
+ readonly type: "object";
7866
+ readonly additionalProperties: false;
7867
+ readonly required: readonly ["schemaVersion", "id", "projectId", "name", "slug", "defaultLocale", "locales", "domains", "pageIds", "theme", "rev", "createdAt", "updatedAt"];
7868
+ readonly properties: {
7869
+ readonly schemaVersion: {
7870
+ readonly $ref: "#/$defs/SchemaVersion";
7871
+ };
7872
+ readonly id: {
7873
+ readonly $ref: "#/$defs/Id";
7874
+ };
7875
+ readonly projectId: {
7876
+ readonly $ref: "#/$defs/Id";
7877
+ };
7878
+ readonly name: {
7879
+ readonly type: "string";
7880
+ readonly minLength: 1;
7881
+ readonly maxLength: 200;
7882
+ };
7883
+ readonly slug: {
7884
+ readonly $ref: "#/$defs/Slug";
7885
+ };
7886
+ readonly defaultLocale: {
7887
+ readonly $ref: "#/$defs/Locale";
7888
+ };
7889
+ readonly locales: {
7890
+ readonly type: "array";
7891
+ readonly items: {
7892
+ readonly $ref: "#/$defs/Locale";
7893
+ };
7894
+ readonly minItems: 1;
7895
+ readonly uniqueItems: true;
7896
+ };
7897
+ readonly domains: {
7898
+ readonly type: "array";
7899
+ readonly description: "Hostnames serving this site. Exactly one should be primary: the address canonical links, feeds and previews use. Sites run on their own domains or their Cloudflare account's workers.dev address, never on a Cloudhal domain (ADR-0037).";
7900
+ readonly items: {
7901
+ readonly $ref: "#/$defs/Domain";
7902
+ };
7903
+ };
7904
+ readonly pageIds: {
7905
+ readonly type: "array";
7906
+ readonly items: {
7907
+ readonly $ref: "#/$defs/Id";
7908
+ };
7909
+ readonly uniqueItems: true;
7910
+ };
7911
+ readonly homePageId: {
7912
+ readonly $ref: "#/$defs/Id";
7913
+ };
7914
+ readonly localization: {
7915
+ readonly $ref: "#/$defs/Localization";
7916
+ };
7917
+ readonly collections: {
7918
+ readonly type: "object";
7919
+ readonly description: "RFC-0038, RFC-0040: the site's declared collections and their settings, keyed by collection (ContentEntry.collection). A key here declares the collection, even with no settings ({}). A collection with entries but no key is inferred and uses the defaults.";
7920
+ readonly propertyNames: {
7921
+ readonly $ref: "#/$defs/Slug";
7922
+ };
7923
+ readonly maxProperties: 50;
7924
+ readonly additionalProperties: {
7925
+ readonly $ref: "#/$defs/CollectionSettings";
7926
+ };
7927
+ };
7928
+ readonly theme: {
7929
+ readonly $ref: "#/$defs/ThemeRef";
7930
+ };
7931
+ readonly design: {
7932
+ readonly $ref: "#/$defs/Design";
7933
+ };
7934
+ readonly brand: {
7935
+ readonly $ref: "#/$defs/Brand";
7936
+ };
7937
+ readonly chrome: {
7938
+ readonly $ref: "#/$defs/Chrome";
7939
+ };
7940
+ readonly timeZone: {
7941
+ readonly $ref: "#/$defs/TimeZone";
7942
+ readonly description: "The site's time zone (RFC-0008): Studio's calendar, schedules entered as wall-clock times and recurring automations use it. Absent means UTC.";
7943
+ };
7944
+ readonly publishedSnapshotId: {
7945
+ readonly $ref: "#/$defs/Id";
7946
+ readonly description: "Snapshot currently serving production. Rollback = pointing this at an older snapshot.";
7947
+ };
7948
+ readonly rev: {
7949
+ readonly $ref: "#/$defs/Revision";
7950
+ };
7951
+ readonly createdAt: {
7952
+ readonly $ref: "#/$defs/Timestamp";
7953
+ };
7954
+ readonly updatedAt: {
7955
+ readonly $ref: "#/$defs/Timestamp";
7956
+ };
7957
+ readonly metadata: {
7958
+ readonly $ref: "#/$defs/Metadata";
7959
+ };
7960
+ };
7961
+ readonly $defs: {
7962
+ readonly Actor: {
7963
+ readonly type: "object";
7964
+ readonly additionalProperties: false;
7965
+ readonly required: readonly ["kind", "id"];
7966
+ readonly properties: {
7967
+ readonly kind: {
7968
+ readonly $ref: "#/$defs/ActorKind";
7969
+ };
7970
+ readonly id: {
7971
+ readonly $ref: "#/$defs/Id";
7972
+ };
7973
+ readonly name: {
7974
+ readonly type: "string";
7975
+ readonly maxLength: 200;
7976
+ };
7977
+ };
7978
+ };
7979
+ readonly ActorKind: {
7980
+ readonly type: "string";
7981
+ readonly description: "Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly.";
7982
+ readonly enum: readonly ["human", "agent", "system"];
7983
+ };
7984
+ readonly Announcement: {
7985
+ readonly type: "object";
7986
+ readonly additionalProperties: false;
7987
+ readonly required: readonly ["id", "text"];
7988
+ readonly properties: {
7989
+ readonly id: {
7990
+ readonly type: "string";
7991
+ readonly pattern: "^[a-z0-9][a-z0-9-]{0,40}$";
7992
+ readonly description: "Change it when the text changes, so readers who dismissed the old one see the new one.";
7993
+ };
7994
+ readonly text: {
7995
+ readonly type: "string";
7996
+ readonly minLength: 1;
7997
+ readonly maxLength: 200;
7998
+ };
7999
+ readonly label: {
8000
+ readonly type: "string";
8001
+ readonly minLength: 1;
8002
+ readonly maxLength: 40;
8003
+ };
8004
+ readonly href: {
8005
+ readonly type: "string";
8006
+ readonly minLength: 1;
8007
+ readonly maxLength: 2048;
8008
+ };
8009
+ readonly tone: {
8010
+ readonly type: "string";
8011
+ readonly enum: readonly ["info", "brand", "warning"];
8012
+ };
8013
+ readonly dismissible: {
8014
+ readonly type: "boolean";
8015
+ };
8016
+ };
8017
+ };
8018
+ readonly BodyBlock: {
8019
+ readonly type: "object";
8020
+ readonly description: "One top-level block of a markdown body in the store's index (RFC-0014 §3). Written by the store only: a client's values are replaced on every write. `by`, `via` and `at` say who last changed the block's content, through which channel and when; they are absent for content written before the index existed.";
8021
+ readonly additionalProperties: false;
8022
+ readonly required: readonly ["id", "hash"];
8023
+ readonly properties: {
8024
+ readonly id: {
8025
+ readonly type: "string";
8026
+ readonly pattern: "^blk_[0-9A-Za-z]{8,24}$";
8027
+ readonly description: "Stable across writes that keep the block's content or its place among unchanged blocks.";
8028
+ };
8029
+ readonly hash: {
8030
+ readonly type: "string";
8031
+ readonly pattern: "^[0-9a-f]{64}$";
8032
+ readonly description: "SHA-256 (hex) of the block's markdown without trailing whitespace.";
8033
+ };
8034
+ readonly by: {
8035
+ readonly $ref: "#/$defs/Actor";
8036
+ };
8037
+ readonly via: {
8038
+ readonly type: "string";
8039
+ readonly enum: readonly ["studio", "mcp", "api", "import", "ai-command", "proposal"];
8040
+ readonly description: "The channel of that change.";
8041
+ };
8042
+ readonly at: {
8043
+ readonly $ref: "#/$defs/Timestamp";
8044
+ };
8045
+ };
8046
+ };
8047
+ readonly BodyBlocks: {
8048
+ readonly type: "array";
8049
+ readonly description: "A markdown body's block index, in body order (RFC-0014 §3). Absent means not indexed (yet, or an HTML body), never empty.";
8050
+ readonly maxItems: 5000;
8051
+ readonly items: {
8052
+ readonly $ref: "#/$defs/BodyBlock";
8053
+ };
8054
+ };
8055
+ readonly BodyProfile: {
8056
+ readonly type: "integer";
8057
+ readonly enum: readonly [1];
8058
+ readonly description: "The markdown dialect a body follows (RFC-0014 §1): 1 = Cloudhal Markdown v1 (CommonMark + GFM + `asset:` + directives; raw HTML escaped). Set by the store on markdown bodies.";
8059
+ };
8060
+ readonly Brand: {
8061
+ readonly type: "object";
8062
+ readonly description: "The site's logo and social links (RFC-0025 §1), shared by the header, the footer and SEO.";
8063
+ readonly additionalProperties: false;
8064
+ readonly properties: {
8065
+ readonly logo: {
8066
+ readonly $ref: "#/$defs/ImageRef";
8067
+ };
8068
+ readonly logoDark: {
8069
+ readonly $ref: "#/$defs/ImageRef";
8070
+ };
8071
+ readonly logoHeight: {
8072
+ readonly type: "string";
8073
+ readonly enum: readonly ["s", "m", "l"];
8074
+ };
8075
+ readonly social: {
8076
+ readonly type: "array";
8077
+ readonly maxItems: 8;
8078
+ readonly items: {
8079
+ readonly $ref: "#/$defs/SocialLink";
8080
+ };
8081
+ };
8082
+ };
8083
+ };
8084
+ readonly Chrome: {
8085
+ readonly type: "object";
8086
+ readonly description: "The site's header, footer and bars as data (RFC-0025): enums, menu keys and short texts; the theme renders them with landmarks, focus and contrast guaranteed.";
8087
+ readonly additionalProperties: false;
8088
+ readonly properties: {
8089
+ readonly header: {
8090
+ readonly $ref: "#/$defs/ChromeHeader";
8091
+ };
8092
+ readonly footer: {
8093
+ readonly $ref: "#/$defs/ChromeFooter";
8094
+ };
8095
+ readonly announcement: {
8096
+ readonly $ref: "#/$defs/Announcement";
8097
+ };
8098
+ readonly consent: {
8099
+ readonly $ref: "#/$defs/Consent";
8100
+ };
8101
+ };
8102
+ };
8103
+ readonly ChromeFooter: {
8104
+ readonly type: "object";
8105
+ readonly additionalProperties: false;
8106
+ readonly properties: {
8107
+ readonly layout: {
8108
+ readonly type: "string";
8109
+ readonly enum: readonly ["simple", "columns", "cta-band", "minimal"];
8110
+ };
8111
+ readonly surface: {
8112
+ readonly type: "string";
8113
+ readonly enum: readonly ["plain", "muted", "inverse"];
8114
+ };
8115
+ readonly tagline: {
8116
+ readonly type: "string";
8117
+ readonly minLength: 1;
8118
+ readonly maxLength: 200;
8119
+ };
8120
+ readonly columns: {
8121
+ readonly type: "array";
8122
+ readonly maxItems: 5;
8123
+ readonly items: {
8124
+ readonly $ref: "#/$defs/FooterColumn";
8125
+ };
8126
+ };
8127
+ readonly ctaHeading: {
8128
+ readonly type: "string";
8129
+ readonly minLength: 1;
8130
+ readonly maxLength: 120;
8131
+ };
8132
+ readonly ctaLabel: {
8133
+ readonly type: "string";
8134
+ readonly minLength: 1;
8135
+ readonly maxLength: 40;
8136
+ };
8137
+ readonly ctaHref: {
8138
+ readonly type: "string";
8139
+ readonly minLength: 1;
8140
+ readonly maxLength: 2048;
8141
+ };
8142
+ readonly social: {
8143
+ readonly type: "boolean";
7304
8144
  };
7305
8145
  readonly copyright: {
7306
8146
  readonly type: "string";
@@ -12914,304 +13754,935 @@ export declare const schemas: {
12914
13754
  };
12915
13755
  }];
12916
13756
  };
12917
- readonly ReleaseConflict: {
13757
+ readonly ReleaseConflict: {
13758
+ readonly type: "object";
13759
+ readonly description: "A node whose live version was not the pinned base when the release ran. `expected` absent: the node was not expected to be live; `found` absent: it was not live.";
13760
+ readonly additionalProperties: false;
13761
+ readonly required: readonly ["nodeId"];
13762
+ readonly properties: {
13763
+ readonly nodeId: {
13764
+ readonly $ref: "#/$defs/Id";
13765
+ };
13766
+ readonly expected: {
13767
+ readonly $ref: "#/$defs/ReleaseNodeVersion";
13768
+ };
13769
+ readonly found: {
13770
+ readonly $ref: "#/$defs/ReleaseNodeVersion";
13771
+ };
13772
+ };
13773
+ };
13774
+ readonly ReleaseHash: {
13775
+ readonly type: "string";
13776
+ readonly description: "`rl1:` and the lower-case hex SHA-256 of the release's canonical item lines (site id, then one line per item sorted by node id: kind, node id, target and base versions). The prefix keeps it apart from the graph state hash and from comment bindings (`cm1:`); approvals store it as their state.";
13777
+ readonly pattern: "^rl1:[0-9a-f]{64}$";
13778
+ };
13779
+ readonly ReleaseId: {
13780
+ readonly type: "string";
13781
+ readonly description: "A release id: `rel_` and 6 to 32 letters or digits.";
13782
+ readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
13783
+ };
13784
+ readonly ReleaseItem: {
13785
+ readonly description: "One pinned change, discriminated by `kind`.";
13786
+ readonly oneOf: readonly [{
13787
+ readonly type: "object";
13788
+ readonly title: "ReleaseSetItem";
13789
+ readonly description: "Make `target` the live version of the node. `base` is the version that was live when the item was pinned; absent when the node was not live (a new entry or page).";
13790
+ readonly additionalProperties: false;
13791
+ readonly required: readonly ["kind", "nodeId", "nodeKind", "target"];
13792
+ readonly properties: {
13793
+ readonly kind: {
13794
+ readonly type: "string";
13795
+ readonly enum: readonly ["set"];
13796
+ };
13797
+ readonly nodeId: {
13798
+ readonly $ref: "#/$defs/Id";
13799
+ };
13800
+ readonly nodeKind: {
13801
+ readonly $ref: "#/$defs/ReleaseNodeKind";
13802
+ };
13803
+ readonly target: {
13804
+ readonly $ref: "#/$defs/ReleaseNodeVersion";
13805
+ };
13806
+ readonly base: {
13807
+ readonly $ref: "#/$defs/ReleaseNodeVersion";
13808
+ };
13809
+ };
13810
+ }, {
13811
+ readonly type: "object";
13812
+ readonly title: "ReleaseRemoveItem";
13813
+ readonly description: "Take the node out of the live snapshot. `base` is the live version that is removed.";
13814
+ readonly additionalProperties: false;
13815
+ readonly required: readonly ["kind", "nodeId", "nodeKind", "base"];
13816
+ readonly properties: {
13817
+ readonly kind: {
13818
+ readonly type: "string";
13819
+ readonly enum: readonly ["remove"];
13820
+ };
13821
+ readonly nodeId: {
13822
+ readonly $ref: "#/$defs/Id";
13823
+ };
13824
+ readonly nodeKind: {
13825
+ readonly $ref: "#/$defs/ReleaseNodeKind";
13826
+ };
13827
+ readonly base: {
13828
+ readonly $ref: "#/$defs/ReleaseNodeVersion";
13829
+ };
13830
+ };
13831
+ }];
13832
+ };
13833
+ readonly ReleaseNodeKind: {
13834
+ readonly type: "string";
13835
+ readonly description: "Kinds of graph node a release may carry. The site node is never one of them.";
13836
+ readonly enum: readonly ["page", "contentEntry", "taxonomy", "term", "redirect", "menu", "asset"];
13837
+ };
13838
+ readonly ReleaseNodeVersion: {
13839
+ readonly type: "object";
13840
+ readonly description: "One version of a node: its revision and the SHA-256 of its canonical JSON, whose body the blob store keeps under `nodes/<hash>.json`.";
13841
+ readonly additionalProperties: false;
13842
+ readonly required: readonly ["rev", "hash"];
13843
+ readonly properties: {
13844
+ readonly rev: {
13845
+ readonly $ref: "#/$defs/Revision";
13846
+ };
13847
+ readonly hash: {
13848
+ readonly type: "string";
13849
+ readonly pattern: "^[0-9a-f]{64}$";
13850
+ };
13851
+ };
13852
+ };
13853
+ readonly ReleaseOutcome: {
13854
+ readonly description: "What happened when the release was due, discriminated by `kind` (it matches the terminal `state`).";
13855
+ readonly oneOf: readonly [{
13856
+ readonly type: "object";
13857
+ readonly title: "ReleasePublishedOutcome";
13858
+ readonly description: "Applied: `snapshotId` is the new live snapshot (reason `scheduled`), composed from `baseSnapshotId` and the items. `purge` says how the edge cache followed.";
13859
+ readonly additionalProperties: false;
13860
+ readonly required: readonly ["kind", "runId", "at", "snapshotId", "baseSnapshotId", "latenessSeconds", "purge"];
13861
+ readonly properties: {
13862
+ readonly kind: {
13863
+ readonly type: "string";
13864
+ readonly enum: readonly ["published"];
13865
+ };
13866
+ readonly runId: {
13867
+ readonly $ref: "#/$defs/Id";
13868
+ };
13869
+ readonly at: {
13870
+ readonly $ref: "#/$defs/Timestamp";
13871
+ };
13872
+ readonly snapshotId: {
13873
+ readonly $ref: "#/$defs/Id";
13874
+ };
13875
+ readonly baseSnapshotId: {
13876
+ readonly $ref: "#/$defs/Id";
13877
+ };
13878
+ readonly latenessSeconds: {
13879
+ readonly type: "integer";
13880
+ readonly minimum: 0;
13881
+ };
13882
+ readonly purge: {
13883
+ readonly type: "string";
13884
+ readonly enum: readonly ["tags", "everything", "deferred", "failed", "none"];
13885
+ };
13886
+ };
13887
+ }, {
13888
+ readonly type: "object";
13889
+ readonly title: "ReleaseConflictOutcome";
13890
+ readonly description: "Held: these nodes changed since the release was pinned. Nothing was published.";
13891
+ readonly additionalProperties: false;
13892
+ readonly required: readonly ["kind", "at", "conflicts"];
13893
+ readonly properties: {
13894
+ readonly kind: {
13895
+ readonly type: "string";
13896
+ readonly enum: readonly ["conflict"];
13897
+ };
13898
+ readonly runId: {
13899
+ readonly $ref: "#/$defs/Id";
13900
+ };
13901
+ readonly at: {
13902
+ readonly $ref: "#/$defs/Timestamp";
13903
+ };
13904
+ readonly conflicts: {
13905
+ readonly type: "array";
13906
+ readonly items: {
13907
+ readonly $ref: "#/$defs/ReleaseConflict";
13908
+ };
13909
+ readonly minItems: 1;
13910
+ readonly maxItems: 100;
13911
+ };
13912
+ };
13913
+ }, {
13914
+ readonly type: "object";
13915
+ readonly title: "ReleaseFailedOutcome";
13916
+ readonly description: "Refused at run time; nothing was published.";
13917
+ readonly additionalProperties: false;
13918
+ readonly required: readonly ["kind", "at", "code"];
13919
+ readonly properties: {
13920
+ readonly kind: {
13921
+ readonly type: "string";
13922
+ readonly enum: readonly ["failed"];
13923
+ };
13924
+ readonly runId: {
13925
+ readonly $ref: "#/$defs/Id";
13926
+ };
13927
+ readonly at: {
13928
+ readonly $ref: "#/$defs/Timestamp";
13929
+ };
13930
+ readonly code: {
13931
+ readonly type: "string";
13932
+ readonly enum: readonly ["dependency_missing", "invalid_snapshot", "site_missing", "node_body_missing", "store_error"];
13933
+ };
13934
+ readonly message: {
13935
+ readonly type: "string";
13936
+ readonly maxLength: 500;
13937
+ readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
13938
+ };
13939
+ };
13940
+ }, {
13941
+ readonly type: "object";
13942
+ readonly title: "ReleaseMissedOutcome";
13943
+ readonly description: "The scheduler reached the release more than an hour after its time; nothing was published. A person may publish it now.";
13944
+ readonly additionalProperties: false;
13945
+ readonly required: readonly ["kind", "at", "latenessSeconds"];
13946
+ readonly properties: {
13947
+ readonly kind: {
13948
+ readonly type: "string";
13949
+ readonly enum: readonly ["missed"];
13950
+ };
13951
+ readonly at: {
13952
+ readonly $ref: "#/$defs/Timestamp";
13953
+ };
13954
+ readonly latenessSeconds: {
13955
+ readonly type: "integer";
13956
+ readonly minimum: 0;
13957
+ };
13958
+ };
13959
+ }, {
13960
+ readonly type: "object";
13961
+ readonly title: "ReleaseExpiredOutcome";
13962
+ readonly description: "No valid approval when the release was due: never approved, the approver can no longer publish it, the agent's `auto` window ended, or its creator left.";
13963
+ readonly additionalProperties: false;
13964
+ readonly required: readonly ["kind", "at", "reason"];
13965
+ readonly properties: {
13966
+ readonly kind: {
13967
+ readonly type: "string";
13968
+ readonly enum: readonly ["expired"];
13969
+ };
13970
+ readonly at: {
13971
+ readonly $ref: "#/$defs/Timestamp";
13972
+ };
13973
+ readonly reason: {
13974
+ readonly type: "string";
13975
+ readonly enum: readonly ["unapproved", "approval_lost", "auto_window_ended", "creator_removed"];
13976
+ };
13977
+ };
13978
+ }, {
13979
+ readonly type: "object";
13980
+ readonly title: "ReleaseCanceledOutcome";
13981
+ readonly description: "Withdrawn by a person or an agent; its nodes are unlocked.";
13982
+ readonly additionalProperties: false;
13983
+ readonly required: readonly ["kind", "at", "by"];
13984
+ readonly properties: {
13985
+ readonly kind: {
13986
+ readonly type: "string";
13987
+ readonly enum: readonly ["canceled"];
13988
+ };
13989
+ readonly at: {
13990
+ readonly $ref: "#/$defs/Timestamp";
13991
+ };
13992
+ readonly by: {
13993
+ readonly $ref: "#/$defs/Actor";
13994
+ };
13995
+ };
13996
+ }];
13997
+ };
13998
+ readonly ReleasePerson: {
12918
13999
  readonly type: "object";
12919
- readonly description: "A node whose live version was not the pinned base when the release ran. `expected` absent: the node was not expected to be live; `found` absent: it was not live.";
14000
+ readonly description: "A staff person (`user_…`). Agents never appear here.";
12920
14001
  readonly additionalProperties: false;
12921
- readonly required: readonly ["nodeId"];
14002
+ readonly required: readonly ["id"];
12922
14003
  readonly properties: {
12923
- readonly nodeId: {
12924
- readonly $ref: "#/$defs/Id";
12925
- };
12926
- readonly expected: {
12927
- readonly $ref: "#/$defs/ReleaseNodeVersion";
14004
+ readonly id: {
14005
+ readonly type: "string";
14006
+ readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
12928
14007
  };
12929
- readonly found: {
12930
- readonly $ref: "#/$defs/ReleaseNodeVersion";
14008
+ readonly name: {
14009
+ readonly type: "string";
14010
+ readonly maxLength: 200;
12931
14011
  };
12932
14012
  };
12933
14013
  };
12934
- readonly ReleaseHash: {
12935
- readonly type: "string";
12936
- readonly description: "`rl1:` and the lower-case hex SHA-256 of the release's canonical item lines (site id, then one line per item sorted by node id: kind, node id, target and base versions). The prefix keeps it apart from the graph state hash and from comment bindings (`cm1:`); approvals store it as their state.";
12937
- readonly pattern: "^rl1:[0-9a-f]{64}$";
12938
- };
12939
- readonly ReleaseId: {
14014
+ readonly ReleaseState: {
12940
14015
  readonly type: "string";
12941
- readonly description: "A release id: `rel_` and 6 to 32 letters or digits.";
12942
- readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
14016
+ 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.";
14017
+ readonly enum: readonly ["draft", "awaiting_approval", "scheduled", "running", "published", "conflict", "missed", "expired", "failed", "canceled"];
12943
14018
  };
12944
- readonly ReleaseItem: {
12945
- readonly description: "One pinned change, discriminated by `kind`.";
14019
+ readonly ReleaseWhen: {
14020
+ readonly description: "When the release runs, discriminated by `kind`. Absent while a draft has no time yet.";
12946
14021
  readonly oneOf: readonly [{
12947
14022
  readonly type: "object";
12948
- readonly title: "ReleaseSetItem";
12949
- readonly description: "Make `target` the live version of the node. `base` is the version that was live when the item was pinned; absent when the node was not live (a new entry or page).";
14023
+ readonly title: "ReleaseAt";
14024
+ 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.";
12950
14025
  readonly additionalProperties: false;
12951
- readonly required: readonly ["kind", "nodeId", "nodeKind", "target"];
14026
+ readonly required: readonly ["kind", "at", "timeZone"];
12952
14027
  readonly properties: {
12953
14028
  readonly kind: {
12954
14029
  readonly type: "string";
12955
- readonly enum: readonly ["set"];
12956
- };
12957
- readonly nodeId: {
12958
- readonly $ref: "#/$defs/Id";
14030
+ readonly enum: readonly ["at"];
12959
14031
  };
12960
- readonly nodeKind: {
12961
- readonly $ref: "#/$defs/ReleaseNodeKind";
14032
+ readonly at: {
14033
+ readonly $ref: "#/$defs/Timestamp";
12962
14034
  };
12963
- readonly target: {
12964
- readonly $ref: "#/$defs/ReleaseNodeVersion";
14035
+ readonly timeZone: {
14036
+ readonly $ref: "#/$defs/TimeZone";
12965
14037
  };
12966
- readonly base: {
12967
- readonly $ref: "#/$defs/ReleaseNodeVersion";
14038
+ readonly localTime: {
14039
+ readonly $ref: "#/$defs/LocalDateTime";
12968
14040
  };
12969
14041
  };
12970
14042
  }, {
12971
14043
  readonly type: "object";
12972
- readonly title: "ReleaseRemoveItem";
12973
- readonly description: "Take the node out of the live snapshot. `base` is the live version that is removed.";
14044
+ readonly title: "ReleaseOnApproval";
14045
+ readonly description: "As soon as it is approved (a gate-only change such as setting an expiry on live content, or \"publish when approved\").";
12974
14046
  readonly additionalProperties: false;
12975
- readonly required: readonly ["kind", "nodeId", "nodeKind", "base"];
14047
+ readonly required: readonly ["kind"];
12976
14048
  readonly properties: {
12977
14049
  readonly kind: {
12978
14050
  readonly type: "string";
12979
- readonly enum: readonly ["remove"];
12980
- };
12981
- readonly nodeId: {
12982
- readonly $ref: "#/$defs/Id";
12983
- };
12984
- readonly nodeKind: {
12985
- readonly $ref: "#/$defs/ReleaseNodeKind";
12986
- };
12987
- readonly base: {
12988
- readonly $ref: "#/$defs/ReleaseNodeVersion";
14051
+ readonly enum: readonly ["on-approval"];
12989
14052
  };
12990
14053
  };
12991
14054
  }];
12992
14055
  };
12993
- readonly ReleaseNodeKind: {
14056
+ readonly Revision: {
14057
+ readonly type: "integer";
14058
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
14059
+ readonly minimum: 0;
14060
+ };
14061
+ readonly SchemaVersion: {
14062
+ readonly type: "integer";
14063
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
14064
+ readonly enum: readonly [1];
14065
+ };
14066
+ readonly Timestamp: {
12994
14067
  readonly type: "string";
12995
- readonly description: "Kinds of graph node a release may carry. The site node is never one of them.";
12996
- readonly enum: readonly ["page", "contentEntry", "taxonomy", "term", "redirect", "menu", "asset"];
14068
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
14069
+ readonly format: "date-time";
12997
14070
  };
12998
- readonly ReleaseNodeVersion: {
14071
+ readonly TimeZone: {
14072
+ readonly type: "string";
14073
+ 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.";
14074
+ readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
14075
+ readonly maxLength: 64;
14076
+ };
14077
+ };
14078
+ };
14079
+ readonly automation: {
14080
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
14081
+ readonly $id: "https://cloudhal.dev/schemas/v1/automation.schema.json";
14082
+ readonly title: "Automation";
14083
+ 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.";
14084
+ readonly type: "object";
14085
+ readonly additionalProperties: false;
14086
+ readonly required: readonly ["schemaVersion", "id", "siteId", "name", "job", "recurrence", "state", "consecutiveFailures", "owner", "createdAt", "updatedAt", "rev"];
14087
+ readonly properties: {
14088
+ readonly schemaVersion: {
14089
+ readonly $ref: "#/$defs/SchemaVersion";
14090
+ };
14091
+ readonly id: {
14092
+ readonly $ref: "#/$defs/AutomationId";
14093
+ };
14094
+ readonly siteId: {
14095
+ readonly $ref: "#/$defs/Id";
14096
+ };
14097
+ readonly name: {
14098
+ readonly type: "string";
14099
+ readonly minLength: 1;
14100
+ readonly maxLength: 120;
14101
+ readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
14102
+ };
14103
+ readonly job: {
14104
+ readonly $ref: "#/$defs/AutomationJob";
14105
+ };
14106
+ readonly recurrence: {
14107
+ readonly $ref: "#/$defs/AutomationRecurrence";
14108
+ };
14109
+ readonly state: {
14110
+ readonly $ref: "#/$defs/AutomationState";
14111
+ };
14112
+ readonly pausedReason: {
14113
+ readonly type: "string";
14114
+ 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.";
14115
+ readonly enum: readonly ["person", "agent", "failures", "budget", "kill-switch", "key-revoked", "owner-removed", "role-changed"];
14116
+ };
14117
+ readonly consecutiveFailures: {
14118
+ readonly type: "integer";
14119
+ readonly minimum: 0;
14120
+ };
14121
+ readonly owner: {
14122
+ readonly $ref: "#/$defs/AutomationOwner";
14123
+ };
14124
+ readonly nextRunAt: {
14125
+ readonly $ref: "#/$defs/Timestamp";
14126
+ };
14127
+ readonly createdAt: {
14128
+ readonly $ref: "#/$defs/Timestamp";
14129
+ };
14130
+ readonly updatedAt: {
14131
+ readonly $ref: "#/$defs/Timestamp";
14132
+ };
14133
+ readonly rev: {
14134
+ readonly $ref: "#/$defs/Revision";
14135
+ };
14136
+ readonly metadata: {
14137
+ readonly $ref: "#/$defs/Metadata";
14138
+ };
14139
+ };
14140
+ readonly $defs: {
14141
+ readonly AutomationBudget: {
12999
14142
  readonly type: "object";
13000
- readonly description: "One version of a node: its revision and the SHA-256 of its canonical JSON, whose body the blob store keeps under `nodes/<hash>.json`.";
14143
+ 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.";
13001
14144
  readonly additionalProperties: false;
13002
- readonly required: readonly ["rev", "hash"];
14145
+ readonly required: readonly ["maxToolCalls", "maxWrites", "maxApprovalRequests", "maxMinutes"];
13003
14146
  readonly properties: {
13004
- readonly rev: {
13005
- readonly $ref: "#/$defs/Revision";
14147
+ readonly maxToolCalls: {
14148
+ readonly type: "integer";
14149
+ readonly minimum: 1;
14150
+ readonly maximum: 500;
13006
14151
  };
13007
- readonly hash: {
13008
- readonly type: "string";
13009
- readonly pattern: "^[0-9a-f]{64}$";
14152
+ readonly maxWrites: {
14153
+ readonly type: "integer";
14154
+ readonly minimum: 0;
14155
+ readonly maximum: 200;
14156
+ };
14157
+ readonly maxApprovalRequests: {
14158
+ readonly type: "integer";
14159
+ readonly minimum: 0;
14160
+ readonly maximum: 20;
14161
+ };
14162
+ readonly maxMinutes: {
14163
+ readonly type: "integer";
14164
+ readonly minimum: 1;
14165
+ readonly maximum: 240;
13010
14166
  };
13011
14167
  };
13012
14168
  };
13013
- readonly ReleaseOutcome: {
13014
- readonly description: "What happened when the release was due, discriminated by `kind` (it matches the terminal `state`).";
14169
+ readonly AutomationId: {
14170
+ readonly type: "string";
14171
+ readonly description: "An automation id: `aut_` and 6 to 32 letters or digits.";
14172
+ readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
14173
+ };
14174
+ readonly AutomationJob: {
14175
+ readonly description: "What runs, discriminated by `kind`.";
13015
14176
  readonly oneOf: readonly [{
13016
14177
  readonly type: "object";
13017
- readonly title: "ReleasePublishedOutcome";
13018
- readonly description: "Applied: `snapshotId` is the new live snapshot (reason `scheduled`), composed from `baseSnapshotId` and the items. `purge` says how the edge cache followed.";
14178
+ readonly title: "BuiltinAutomationJob";
14179
+ 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.";
13019
14180
  readonly additionalProperties: false;
13020
- readonly required: readonly ["kind", "runId", "at", "snapshotId", "baseSnapshotId", "latenessSeconds", "purge"];
14181
+ readonly required: readonly ["kind", "builtin"];
13021
14182
  readonly properties: {
13022
14183
  readonly kind: {
13023
14184
  readonly type: "string";
13024
- readonly enum: readonly ["published"];
13025
- };
13026
- readonly runId: {
13027
- readonly $ref: "#/$defs/Id";
13028
- };
13029
- readonly at: {
13030
- readonly $ref: "#/$defs/Timestamp";
13031
- };
13032
- readonly snapshotId: {
13033
- readonly $ref: "#/$defs/Id";
13034
- };
13035
- readonly baseSnapshotId: {
13036
- readonly $ref: "#/$defs/Id";
13037
- };
13038
- readonly latenessSeconds: {
13039
- readonly type: "integer";
13040
- readonly minimum: 0;
13041
- };
13042
- readonly purge: {
13043
- readonly type: "string";
13044
- readonly enum: readonly ["tags", "everything", "deferred", "failed", "none"];
14185
+ readonly enum: readonly ["builtin"];
13045
14186
  };
13046
- };
13047
- }, {
13048
- readonly type: "object";
13049
- readonly title: "ReleaseConflictOutcome";
13050
- readonly description: "Held: these nodes changed since the release was pinned. Nothing was published.";
13051
- readonly additionalProperties: false;
13052
- readonly required: readonly ["kind", "at", "conflicts"];
13053
- readonly properties: {
13054
- readonly kind: {
14187
+ readonly builtin: {
13055
14188
  readonly type: "string";
13056
- readonly enum: readonly ["conflict"];
13057
- };
13058
- readonly runId: {
13059
- readonly $ref: "#/$defs/Id";
13060
- };
13061
- readonly at: {
13062
- readonly $ref: "#/$defs/Timestamp";
14189
+ readonly enum: readonly ["broken-links", "stale-content", "feed-check", "weekly-digest", "cleanup"];
13063
14190
  };
13064
- readonly conflicts: {
13065
- readonly type: "array";
13066
- readonly items: {
13067
- readonly $ref: "#/$defs/ReleaseConflict";
13068
- };
13069
- readonly minItems: 1;
13070
- readonly maxItems: 100;
14191
+ readonly staleAfterDays: {
14192
+ readonly type: "integer";
14193
+ readonly description: "`stale-content` only: entries not updated for this many days are listed for review.";
14194
+ readonly minimum: 30;
14195
+ readonly maximum: 1095;
13071
14196
  };
13072
14197
  };
13073
14198
  }, {
13074
14199
  readonly type: "object";
13075
- readonly title: "ReleaseFailedOutcome";
13076
- readonly description: "Refused at run time; nothing was published.";
14200
+ readonly title: "AgentTaskAutomationJob";
14201
+ 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.";
13077
14202
  readonly additionalProperties: false;
13078
- readonly required: readonly ["kind", "at", "code"];
14203
+ readonly required: readonly ["kind", "keyId", "instructions", "modeCap", "readsUntrustedText", "windowMinutes", "budget"];
13079
14204
  readonly properties: {
13080
14205
  readonly kind: {
13081
14206
  readonly type: "string";
13082
- readonly enum: readonly ["failed"];
14207
+ readonly enum: readonly ["agent-task"];
13083
14208
  };
13084
- readonly runId: {
13085
- readonly $ref: "#/$defs/Id";
14209
+ readonly keyId: {
14210
+ readonly type: "string";
14211
+ readonly pattern: "^[A-Za-z0-9_-]{6,64}$";
13086
14212
  };
13087
- readonly at: {
13088
- readonly $ref: "#/$defs/Timestamp";
14213
+ readonly instructions: {
14214
+ readonly type: "string";
14215
+ readonly description: "What the owner asks the agent to do, shown to the agent by `begin_run`. Plain text.";
14216
+ readonly minLength: 1;
14217
+ readonly maxLength: 2000;
14218
+ readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
13089
14219
  };
13090
- readonly code: {
14220
+ readonly skill: {
13091
14221
  readonly type: "string";
13092
- readonly enum: readonly ["dependency_missing", "invalid_snapshot", "site_missing", "node_body_missing", "store_error"];
14222
+ readonly description: "A skill the run declares (its scopes and approval list narrow the run further).";
14223
+ readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
14224
+ readonly maxLength: 64;
13093
14225
  };
13094
- readonly message: {
14226
+ readonly modeCap: {
13095
14227
  readonly type: "string";
13096
- readonly maxLength: 500;
13097
- readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
14228
+ readonly description: "The most autonomous mode a run may use; never `bypass`.";
14229
+ readonly enum: readonly ["plan", "manual", "edits", "auto"];
14230
+ };
14231
+ readonly readsUntrustedText: {
14232
+ readonly type: "boolean";
14233
+ };
14234
+ readonly windowMinutes: {
14235
+ readonly type: "integer";
14236
+ readonly minimum: 5;
14237
+ readonly maximum: 240;
14238
+ };
14239
+ readonly budget: {
14240
+ readonly $ref: "#/$defs/AutomationBudget";
13098
14241
  };
13099
14242
  };
13100
- }, {
13101
- readonly type: "object";
13102
- readonly title: "ReleaseMissedOutcome";
13103
- readonly description: "The scheduler reached the release more than an hour after its time; nothing was published. A person may publish it now.";
13104
- readonly additionalProperties: false;
13105
- readonly required: readonly ["kind", "at", "latenessSeconds"];
13106
- readonly properties: {
13107
- readonly kind: {
13108
- readonly type: "string";
13109
- readonly enum: readonly ["missed"];
13110
- };
13111
- readonly at: {
13112
- readonly $ref: "#/$defs/Timestamp";
13113
- };
13114
- readonly latenessSeconds: {
13115
- readonly type: "integer";
13116
- readonly minimum: 0;
13117
- };
14243
+ }];
14244
+ };
14245
+ readonly AutomationOwner: {
14246
+ readonly type: "object";
14247
+ readonly description: "The person who created the automation and owns its key (`user_…`). Agents never own automations.";
14248
+ readonly additionalProperties: false;
14249
+ readonly required: readonly ["id"];
14250
+ readonly properties: {
14251
+ readonly id: {
14252
+ readonly type: "string";
14253
+ readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
14254
+ };
14255
+ readonly name: {
14256
+ readonly type: "string";
14257
+ readonly maxLength: 200;
14258
+ };
14259
+ };
14260
+ };
14261
+ readonly AutomationRecurrence: {
14262
+ readonly type: "object";
14263
+ 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.";
14264
+ readonly additionalProperties: false;
14265
+ readonly required: readonly ["start", "timeZone", "preset"];
14266
+ readonly properties: {
14267
+ readonly start: {
14268
+ readonly $ref: "#/$defs/LocalDateTime";
14269
+ };
14270
+ readonly timeZone: {
14271
+ readonly $ref: "#/$defs/TimeZone";
14272
+ };
14273
+ readonly rule: {
14274
+ readonly $ref: "#/$defs/AutomationRule";
14275
+ };
14276
+ readonly preset: {
14277
+ readonly type: "string";
14278
+ readonly enum: readonly ["once", "hourly", "daily", "weekdays", "weekly", "monthly", "custom"];
14279
+ };
14280
+ };
14281
+ };
14282
+ readonly AutomationRule: {
14283
+ readonly type: "string";
14284
+ 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.";
14285
+ readonly maxLength: 300;
14286
+ 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))*$";
14287
+ };
14288
+ readonly AutomationState: {
14289
+ readonly type: "string";
14290
+ 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.";
14291
+ readonly enum: readonly ["active", "paused", "auto-paused", "broken", "ended"];
14292
+ };
14293
+ readonly Id: {
14294
+ readonly type: "string";
14295
+ 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.";
14296
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
14297
+ readonly minLength: 8;
14298
+ readonly maxLength: 48;
14299
+ };
14300
+ readonly LocalDateTime: {
14301
+ readonly type: "string";
14302
+ 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).";
14303
+ 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]$";
14304
+ };
14305
+ readonly Metadata: {
14306
+ readonly type: "object";
14307
+ readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
14308
+ readonly additionalProperties: {
14309
+ readonly type: "string";
14310
+ };
14311
+ };
14312
+ readonly Revision: {
14313
+ readonly type: "integer";
14314
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
14315
+ readonly minimum: 0;
14316
+ };
14317
+ readonly SchemaVersion: {
14318
+ readonly type: "integer";
14319
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
14320
+ readonly enum: readonly [1];
14321
+ };
14322
+ readonly Timestamp: {
14323
+ readonly type: "string";
14324
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
14325
+ readonly format: "date-time";
14326
+ };
14327
+ readonly TimeZone: {
14328
+ readonly type: "string";
14329
+ 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.";
14330
+ readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
14331
+ readonly maxLength: 64;
14332
+ };
14333
+ };
14334
+ };
14335
+ readonly "schedule-run": {
14336
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
14337
+ readonly $id: "https://cloudhal.dev/schemas/v1/schedule-run.schema.json";
14338
+ readonly title: "ScheduleRun";
14339
+ 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.";
14340
+ readonly type: "object";
14341
+ readonly additionalProperties: false;
14342
+ readonly required: readonly ["schemaVersion", "id", "siteId", "subject", "occurrenceAt", "state", "attempt", "createdAt", "updatedAt", "rev"];
14343
+ readonly properties: {
14344
+ readonly schemaVersion: {
14345
+ readonly $ref: "#/$defs/SchemaVersion";
14346
+ };
14347
+ readonly id: {
14348
+ readonly $ref: "#/$defs/ScheduleRunId";
14349
+ };
14350
+ readonly siteId: {
14351
+ readonly $ref: "#/$defs/Id";
14352
+ };
14353
+ readonly subject: {
14354
+ readonly $ref: "#/$defs/ScheduleRunSubject";
14355
+ };
14356
+ readonly occurrenceAt: {
14357
+ readonly $ref: "#/$defs/Timestamp";
14358
+ };
14359
+ readonly state: {
14360
+ readonly $ref: "#/$defs/ScheduleRunState";
14361
+ };
14362
+ readonly outcome: {
14363
+ readonly type: "string";
14364
+ 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.";
14365
+ readonly enum: readonly ["did-work", "nothing-to-do", "proposed", "waiting-approval"];
14366
+ };
14367
+ readonly trigger: {
14368
+ readonly type: "string";
14369
+ 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\").";
14370
+ readonly enum: readonly ["cron", "alarm", "request", "node", "manual"];
14371
+ };
14372
+ readonly attempt: {
14373
+ readonly type: "integer";
14374
+ readonly minimum: 1;
14375
+ };
14376
+ readonly startedAt: {
14377
+ readonly $ref: "#/$defs/Timestamp";
14378
+ };
14379
+ readonly endedAt: {
14380
+ readonly $ref: "#/$defs/Timestamp";
14381
+ };
14382
+ readonly latenessSeconds: {
14383
+ readonly type: "integer";
14384
+ readonly minimum: 0;
14385
+ };
14386
+ readonly adjusted: {
14387
+ readonly type: "string";
14388
+ 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).";
14389
+ readonly enum: readonly ["dst-gap", "tzdata"];
14390
+ };
14391
+ readonly window: {
14392
+ readonly $ref: "#/$defs/ScheduleRunWindow";
14393
+ };
14394
+ readonly usage: {
14395
+ readonly $ref: "#/$defs/ScheduleRunUsage";
14396
+ };
14397
+ readonly taint: {
14398
+ readonly $ref: "#/$defs/ScheduleRunTaint";
14399
+ };
14400
+ readonly summary: {
14401
+ readonly type: "string";
14402
+ 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.";
14403
+ readonly maxLength: 2000;
14404
+ readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
14405
+ };
14406
+ readonly counts: {
14407
+ readonly type: "object";
14408
+ readonly description: "Findings by name (e.g. `broken-links`, `stale-entries`, `proposals`).";
14409
+ readonly propertyNames: {
14410
+ readonly type: "string";
14411
+ readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
14412
+ };
14413
+ readonly maxProperties: 20;
14414
+ readonly additionalProperties: {
14415
+ readonly type: "integer";
14416
+ readonly minimum: 0;
14417
+ };
14418
+ };
14419
+ readonly approvalIds: {
14420
+ readonly type: "array";
14421
+ readonly description: "Approval requests the run filed.";
14422
+ readonly items: {
14423
+ readonly $ref: "#/$defs/Id";
14424
+ };
14425
+ readonly uniqueItems: true;
14426
+ readonly maxItems: 50;
14427
+ };
14428
+ readonly error: {
14429
+ readonly $ref: "#/$defs/ScheduleRunError";
14430
+ };
14431
+ readonly createdAt: {
14432
+ readonly $ref: "#/$defs/Timestamp";
14433
+ };
14434
+ readonly updatedAt: {
14435
+ readonly $ref: "#/$defs/Timestamp";
14436
+ };
14437
+ readonly rev: {
14438
+ readonly $ref: "#/$defs/Revision";
14439
+ };
14440
+ };
14441
+ readonly $defs: {
14442
+ readonly Id: {
14443
+ readonly type: "string";
14444
+ 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.";
14445
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
14446
+ readonly minLength: 8;
14447
+ readonly maxLength: 48;
14448
+ };
14449
+ readonly Revision: {
14450
+ readonly type: "integer";
14451
+ readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
14452
+ readonly minimum: 0;
14453
+ };
14454
+ readonly ScheduleRunError: {
14455
+ readonly type: "object";
14456
+ readonly additionalProperties: false;
14457
+ readonly required: readonly ["code"];
14458
+ readonly properties: {
14459
+ readonly code: {
14460
+ readonly type: "string";
14461
+ readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
14462
+ };
14463
+ readonly message: {
14464
+ readonly type: "string";
14465
+ readonly maxLength: 500;
14466
+ readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
13118
14467
  };
13119
- }, {
14468
+ };
14469
+ };
14470
+ readonly ScheduleRunId: {
14471
+ readonly type: "string";
14472
+ 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).";
14473
+ readonly pattern: "^run_[A-Za-z0-9]{6,32}$";
14474
+ };
14475
+ readonly ScheduleRunState: {
14476
+ readonly type: "string";
14477
+ 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.";
14478
+ readonly enum: readonly ["due", "ready", "running", "succeeded", "failed", "missed", "skipped", "budget-exceeded", "killed"];
14479
+ };
14480
+ readonly ScheduleRunSubject: {
14481
+ readonly description: "What ran, discriminated by `kind`.";
14482
+ readonly oneOf: readonly [{
13120
14483
  readonly type: "object";
13121
- readonly title: "ReleaseExpiredOutcome";
13122
- readonly description: "No valid approval when the release was due: never approved, the approver can no longer publish it, the agent's `auto` window ended, or its creator left.";
14484
+ readonly title: "ReleaseRunSubject";
13123
14485
  readonly additionalProperties: false;
13124
- readonly required: readonly ["kind", "at", "reason"];
14486
+ readonly required: readonly ["kind", "releaseId"];
13125
14487
  readonly properties: {
13126
14488
  readonly kind: {
13127
14489
  readonly type: "string";
13128
- readonly enum: readonly ["expired"];
13129
- };
13130
- readonly at: {
13131
- readonly $ref: "#/$defs/Timestamp";
14490
+ readonly enum: readonly ["release"];
13132
14491
  };
13133
- readonly reason: {
14492
+ readonly releaseId: {
13134
14493
  readonly type: "string";
13135
- readonly enum: readonly ["unapproved", "approval_lost", "auto_window_ended", "creator_removed"];
14494
+ readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
13136
14495
  };
13137
14496
  };
13138
14497
  }, {
13139
14498
  readonly type: "object";
13140
- readonly title: "ReleaseCanceledOutcome";
13141
- readonly description: "Withdrawn by a person or an agent; its nodes are unlocked.";
14499
+ readonly title: "AutomationRunSubject";
13142
14500
  readonly additionalProperties: false;
13143
- readonly required: readonly ["kind", "at", "by"];
14501
+ readonly required: readonly ["kind", "automationId", "job"];
13144
14502
  readonly properties: {
13145
14503
  readonly kind: {
13146
14504
  readonly type: "string";
13147
- readonly enum: readonly ["canceled"];
14505
+ readonly enum: readonly ["automation"];
13148
14506
  };
13149
- readonly at: {
13150
- readonly $ref: "#/$defs/Timestamp";
14507
+ readonly automationId: {
14508
+ readonly type: "string";
14509
+ readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
13151
14510
  };
13152
- readonly by: {
13153
- readonly $ref: "#/$defs/Actor";
14511
+ readonly job: {
14512
+ readonly type: "string";
14513
+ readonly enum: readonly ["builtin", "agent-task"];
13154
14514
  };
13155
14515
  };
13156
14516
  }];
13157
14517
  };
13158
- readonly ReleasePerson: {
14518
+ readonly ScheduleRunTaint: {
13159
14519
  readonly type: "object";
13160
- readonly description: "A staff person (`user_…`). Agents never appear here.";
14520
+ readonly description: "The run read visitor-supplied text at `at` through `tool`; from then on it may only read, label, hide and pause.";
13161
14521
  readonly additionalProperties: false;
13162
- readonly required: readonly ["id"];
14522
+ readonly required: readonly ["at", "tool"];
13163
14523
  readonly properties: {
13164
- readonly id: {
13165
- readonly type: "string";
13166
- readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
14524
+ readonly at: {
14525
+ readonly $ref: "#/$defs/Timestamp";
13167
14526
  };
13168
- readonly name: {
14527
+ readonly tool: {
13169
14528
  readonly type: "string";
13170
- readonly maxLength: 200;
14529
+ readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
13171
14530
  };
13172
14531
  };
13173
14532
  };
13174
- readonly ReleaseState: {
14533
+ readonly ScheduleRunUsage: {
14534
+ readonly type: "object";
14535
+ readonly description: "What the run used against its budget, counted by the server.";
14536
+ readonly additionalProperties: false;
14537
+ readonly required: readonly ["toolCalls", "writes", "approvalRequests"];
14538
+ readonly properties: {
14539
+ readonly toolCalls: {
14540
+ readonly type: "integer";
14541
+ readonly minimum: 0;
14542
+ };
14543
+ readonly writes: {
14544
+ readonly type: "integer";
14545
+ readonly minimum: 0;
14546
+ };
14547
+ readonly approvalRequests: {
14548
+ readonly type: "integer";
14549
+ readonly minimum: 0;
14550
+ };
14551
+ };
14552
+ };
14553
+ readonly ScheduleRunWindow: {
14554
+ readonly type: "object";
14555
+ 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.";
14556
+ readonly additionalProperties: false;
14557
+ readonly required: readonly ["opensAt", "closesAt"];
14558
+ readonly properties: {
14559
+ readonly opensAt: {
14560
+ readonly $ref: "#/$defs/Timestamp";
14561
+ };
14562
+ readonly closesAt: {
14563
+ readonly $ref: "#/$defs/Timestamp";
14564
+ };
14565
+ };
14566
+ };
14567
+ readonly SchemaVersion: {
14568
+ readonly type: "integer";
14569
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
14570
+ readonly enum: readonly [1];
14571
+ };
14572
+ readonly Timestamp: {
13175
14573
  readonly type: "string";
13176
- 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.";
13177
- readonly enum: readonly ["draft", "awaiting_approval", "scheduled", "running", "published", "conflict", "missed", "expired", "failed", "canceled"];
14574
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
14575
+ readonly format: "date-time";
13178
14576
  };
13179
- readonly ReleaseWhen: {
13180
- readonly description: "When the release runs, discriminated by `kind`. Absent while a draft has no time yet.";
13181
- readonly oneOf: readonly [{
13182
- readonly type: "object";
13183
- readonly title: "ReleaseAt";
13184
- 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.";
13185
- readonly additionalProperties: false;
13186
- readonly required: readonly ["kind", "at", "timeZone"];
13187
- readonly properties: {
13188
- readonly kind: {
13189
- readonly type: "string";
13190
- readonly enum: readonly ["at"];
13191
- };
13192
- readonly at: {
13193
- readonly $ref: "#/$defs/Timestamp";
13194
- };
13195
- readonly timeZone: {
13196
- readonly $ref: "#/$defs/TimeZone";
13197
- };
13198
- readonly localTime: {
13199
- readonly $ref: "#/$defs/LocalDateTime";
13200
- };
14577
+ };
14578
+ };
14579
+ readonly glossary: {
14580
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
14581
+ readonly $id: "https://cloudhal.dev/schemas/v1/glossary.schema.json";
14582
+ readonly title: "Glossary";
14583
+ 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.";
14584
+ readonly type: "object";
14585
+ readonly additionalProperties: false;
14586
+ readonly required: readonly ["schemaVersion", "id", "siteId", "entries", "rev", "createdAt", "updatedAt"];
14587
+ readonly properties: {
14588
+ readonly schemaVersion: {
14589
+ readonly $ref: "#/$defs/SchemaVersion";
14590
+ };
14591
+ readonly id: {
14592
+ readonly $ref: "#/$defs/Id";
14593
+ };
14594
+ readonly siteId: {
14595
+ readonly $ref: "#/$defs/Id";
14596
+ };
14597
+ readonly entries: {
14598
+ readonly type: "array";
14599
+ readonly description: "Unique by term (case-insensitive); order is the editor's.";
14600
+ readonly items: {
14601
+ readonly $ref: "#/$defs/GlossaryEntry";
14602
+ };
14603
+ readonly maxItems: 2000;
14604
+ };
14605
+ readonly rev: {
14606
+ readonly $ref: "#/$defs/Revision";
14607
+ };
14608
+ readonly createdAt: {
14609
+ readonly $ref: "#/$defs/Timestamp";
14610
+ };
14611
+ readonly updatedAt: {
14612
+ readonly $ref: "#/$defs/Timestamp";
14613
+ };
14614
+ readonly metadata: {
14615
+ readonly $ref: "#/$defs/Metadata";
14616
+ };
14617
+ };
14618
+ readonly $defs: {
14619
+ readonly GlossaryEntry: {
14620
+ readonly type: "object";
14621
+ readonly additionalProperties: false;
14622
+ readonly required: readonly ["term"];
14623
+ readonly properties: {
14624
+ readonly term: {
14625
+ readonly type: "string";
14626
+ readonly description: "The term as written in the site's default locale.";
14627
+ readonly minLength: 1;
14628
+ readonly maxLength: 200;
13201
14629
  };
13202
- }, {
13203
- readonly type: "object";
13204
- readonly title: "ReleaseOnApproval";
13205
- readonly description: "As soon as it is approved (a gate-only change such as setting an expiry on live content, or \"publish when approved\").";
13206
- readonly additionalProperties: false;
13207
- readonly required: readonly ["kind"];
13208
- readonly properties: {
13209
- readonly kind: {
13210
- readonly type: "string";
13211
- readonly enum: readonly ["on-approval"];
14630
+ readonly note: {
14631
+ readonly type: "string";
14632
+ readonly description: "Context for translators and agents: meaning, part of speech, where it appears.";
14633
+ readonly maxLength: 500;
14634
+ };
14635
+ readonly doNotTranslate: {
14636
+ readonly type: "boolean";
14637
+ readonly description: "Keep the term as written in every locale (brand, product or proper names). Such an entry has no translations.";
14638
+ };
14639
+ readonly caseSensitive: {
14640
+ readonly type: "boolean";
14641
+ readonly description: "Match the term only with this exact capitalisation.";
14642
+ };
14643
+ readonly translations: {
14644
+ readonly type: "object";
14645
+ readonly description: "The approved translation per locale (never the default locale).";
14646
+ readonly propertyNames: {
14647
+ readonly $ref: "#/$defs/Locale";
14648
+ };
14649
+ readonly additionalProperties: {
14650
+ readonly type: "object";
14651
+ readonly additionalProperties: false;
14652
+ readonly required: readonly ["text"];
14653
+ readonly properties: {
14654
+ readonly text: {
14655
+ readonly type: "string";
14656
+ readonly minLength: 1;
14657
+ readonly maxLength: 200;
14658
+ };
14659
+ readonly note: {
14660
+ readonly type: "string";
14661
+ readonly maxLength: 500;
14662
+ };
14663
+ };
13212
14664
  };
13213
14665
  };
13214
- }];
14666
+ };
14667
+ };
14668
+ readonly Id: {
14669
+ readonly type: "string";
14670
+ 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.";
14671
+ readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
14672
+ readonly minLength: 8;
14673
+ readonly maxLength: 48;
14674
+ };
14675
+ readonly Locale: {
14676
+ readonly type: "string";
14677
+ readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
14678
+ readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
14679
+ };
14680
+ readonly Metadata: {
14681
+ readonly type: "object";
14682
+ readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
14683
+ readonly additionalProperties: {
14684
+ readonly type: "string";
14685
+ };
13215
14686
  };
13216
14687
  readonly Revision: {
13217
14688
  readonly type: "integer";
@@ -13228,500 +14699,720 @@ export declare const schemas: {
13228
14699
  readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
13229
14700
  readonly format: "date-time";
13230
14701
  };
13231
- readonly TimeZone: {
13232
- readonly type: "string";
13233
- 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.";
13234
- readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
13235
- readonly maxLength: 64;
13236
- };
13237
14702
  };
13238
14703
  };
13239
- readonly automation: {
14704
+ readonly "release-manifest": {
13240
14705
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
13241
- readonly $id: "https://cloudhal.dev/schemas/v1/automation.schema.json";
13242
- readonly title: "Automation";
13243
- 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.";
14706
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-manifest.schema.json";
14707
+ readonly title: "ReleaseManifest";
14708
+ 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.";
13244
14709
  readonly type: "object";
13245
14710
  readonly additionalProperties: false;
13246
- readonly required: readonly ["schemaVersion", "id", "siteId", "name", "job", "recurrence", "state", "consecutiveFailures", "owner", "createdAt", "updatedAt", "rev"];
14711
+ 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"];
13247
14712
  readonly properties: {
13248
14713
  readonly schemaVersion: {
13249
14714
  readonly $ref: "#/$defs/SchemaVersion";
13250
14715
  };
13251
- readonly id: {
13252
- readonly $ref: "#/$defs/AutomationId";
13253
- };
13254
- readonly siteId: {
13255
- readonly $ref: "#/$defs/Id";
13256
- };
13257
- readonly name: {
14716
+ readonly format: {
13258
14717
  readonly type: "string";
13259
- readonly minLength: 1;
13260
- readonly maxLength: 120;
13261
- readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
13262
- };
13263
- readonly job: {
13264
- readonly $ref: "#/$defs/AutomationJob";
13265
- };
13266
- readonly recurrence: {
13267
- readonly $ref: "#/$defs/AutomationRecurrence";
14718
+ readonly enum: readonly ["cloudhal.release-manifest@1"];
13268
14719
  };
13269
- readonly state: {
13270
- readonly $ref: "#/$defs/AutomationState";
14720
+ readonly version: {
14721
+ readonly $ref: "#/$defs/CloudhalVersion";
13271
14722
  };
13272
- readonly pausedReason: {
14723
+ readonly channel: {
13273
14724
  readonly type: "string";
13274
- 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.";
13275
- readonly enum: readonly ["person", "agent", "failures", "budget", "kill-switch", "key-revoked", "owner-removed", "role-changed"];
13276
- };
13277
- readonly consecutiveFailures: {
13278
- readonly type: "integer";
13279
- readonly minimum: 0;
14725
+ readonly enum: readonly ["stable", "next"];
13280
14726
  };
13281
- readonly owner: {
13282
- readonly $ref: "#/$defs/AutomationOwner";
14727
+ readonly securityRelease: {
14728
+ readonly type: "boolean";
13283
14729
  };
13284
- readonly nextRunAt: {
13285
- readonly $ref: "#/$defs/Timestamp";
14730
+ readonly commit: {
14731
+ readonly type: "string";
14732
+ readonly pattern: "^[0-9a-f]{40}$";
13286
14733
  };
13287
14734
  readonly createdAt: {
13288
14735
  readonly $ref: "#/$defs/Timestamp";
13289
14736
  };
13290
- readonly updatedAt: {
13291
- readonly $ref: "#/$defs/Timestamp";
13292
- };
13293
- readonly rev: {
13294
- readonly $ref: "#/$defs/Revision";
13295
- };
13296
- readonly metadata: {
13297
- readonly $ref: "#/$defs/Metadata";
13298
- };
13299
- };
13300
- readonly $defs: {
13301
- readonly AutomationBudget: {
14737
+ readonly contracts: {
13302
14738
  readonly type: "object";
13303
- 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.";
13304
14739
  readonly additionalProperties: false;
13305
- readonly required: readonly ["maxToolCalls", "maxWrites", "maxApprovalRequests", "maxMinutes"];
14740
+ readonly required: readonly ["schemaVersion"];
13306
14741
  readonly properties: {
13307
- readonly maxToolCalls: {
14742
+ readonly schemaVersion: {
13308
14743
  readonly type: "integer";
13309
- readonly minimum: 1;
13310
- readonly maximum: 500;
14744
+ readonly enum: readonly [1];
13311
14745
  };
13312
- readonly maxWrites: {
14746
+ };
14747
+ };
14748
+ readonly levels: {
14749
+ readonly type: "object";
14750
+ readonly additionalProperties: false;
14751
+ readonly required: readonly ["schedules", "gates"];
14752
+ readonly properties: {
14753
+ readonly schedules: {
13313
14754
  readonly type: "integer";
13314
14755
  readonly minimum: 0;
13315
- readonly maximum: 200;
13316
14756
  };
13317
- readonly maxApprovalRequests: {
14757
+ readonly gates: {
13318
14758
  readonly type: "integer";
13319
14759
  readonly minimum: 0;
13320
- readonly maximum: 20;
13321
14760
  };
13322
- readonly maxMinutes: {
14761
+ };
14762
+ };
14763
+ readonly migrations: {
14764
+ readonly type: "object";
14765
+ readonly additionalProperties: false;
14766
+ readonly required: readonly ["first", "last", "count", "names", "compatibleWithPrevious"];
14767
+ readonly properties: {
14768
+ readonly first: {
14769
+ readonly $ref: "#/$defs/MigrationName";
14770
+ };
14771
+ readonly last: {
14772
+ readonly $ref: "#/$defs/MigrationName";
14773
+ };
14774
+ readonly count: {
13323
14775
  readonly type: "integer";
13324
14776
  readonly minimum: 1;
13325
- readonly maximum: 240;
14777
+ };
14778
+ readonly names: {
14779
+ readonly type: "array";
14780
+ readonly minItems: 1;
14781
+ readonly uniqueItems: true;
14782
+ readonly items: {
14783
+ readonly $ref: "#/$defs/MigrationName";
14784
+ };
14785
+ };
14786
+ readonly compatibleWithPrevious: {
14787
+ readonly type: "boolean";
13326
14788
  };
13327
14789
  };
13328
14790
  };
13329
- readonly AutomationId: {
13330
- readonly type: "string";
13331
- readonly description: "An automation id: `aut_` and 6 to 32 letters or digits.";
13332
- readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
14791
+ readonly durableObjects: {
14792
+ readonly type: "object";
14793
+ readonly additionalProperties: false;
14794
+ readonly required: readonly ["bindings", "lifecycleChange"];
14795
+ readonly properties: {
14796
+ readonly bindings: {
14797
+ readonly type: "array";
14798
+ readonly items: {
14799
+ readonly type: "object";
14800
+ readonly additionalProperties: false;
14801
+ readonly required: readonly ["name", "className", "migration"];
14802
+ readonly properties: {
14803
+ readonly name: {
14804
+ readonly $ref: "#/$defs/BindingName";
14805
+ };
14806
+ readonly className: {
14807
+ readonly type: "string";
14808
+ readonly pattern: "^[A-Z][A-Za-z0-9]*$";
14809
+ };
14810
+ readonly migration: {
14811
+ readonly type: "string";
14812
+ readonly pattern: "^v[1-9][0-9]*$";
14813
+ };
14814
+ };
14815
+ };
14816
+ };
14817
+ readonly lifecycleChange: {
14818
+ readonly type: "boolean";
14819
+ };
14820
+ };
13333
14821
  };
13334
- readonly AutomationJob: {
13335
- readonly description: "What runs, discriminated by `kind`.";
13336
- readonly oneOf: readonly [{
13337
- readonly type: "object";
13338
- readonly title: "BuiltinAutomationJob";
13339
- 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.";
13340
- readonly additionalProperties: false;
13341
- readonly required: readonly ["kind", "builtin"];
13342
- readonly properties: {
13343
- readonly kind: {
14822
+ readonly runtime: {
14823
+ readonly type: "object";
14824
+ readonly additionalProperties: false;
14825
+ readonly required: readonly ["compatibilityDate", "compatibilityFlags"];
14826
+ readonly properties: {
14827
+ readonly compatibilityDate: {
14828
+ readonly type: "string";
14829
+ readonly pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
14830
+ };
14831
+ readonly compatibilityFlags: {
14832
+ readonly type: "array";
14833
+ readonly uniqueItems: true;
14834
+ readonly items: {
13344
14835
  readonly type: "string";
13345
- readonly enum: readonly ["builtin"];
14836
+ readonly pattern: "^[a-z0-9_]+$";
13346
14837
  };
13347
- readonly builtin: {
14838
+ };
14839
+ };
14840
+ };
14841
+ readonly toolchain: {
14842
+ readonly type: "object";
14843
+ readonly additionalProperties: {
14844
+ readonly type: "string";
14845
+ readonly maxLength: 64;
14846
+ };
14847
+ };
14848
+ readonly theme: {
14849
+ readonly type: "object";
14850
+ readonly additionalProperties: false;
14851
+ readonly required: readonly ["name", "version", "blockTypes", "settingsSha256", "designSha256"];
14852
+ readonly properties: {
14853
+ readonly name: {
14854
+ readonly type: "string";
14855
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
14856
+ };
14857
+ readonly version: {
14858
+ readonly type: "string";
14859
+ readonly maxLength: 64;
14860
+ };
14861
+ readonly blockTypes: {
14862
+ readonly type: "array";
14863
+ readonly uniqueItems: true;
14864
+ readonly items: {
13348
14865
  readonly type: "string";
13349
- readonly enum: readonly ["broken-links", "stale-content", "feed-check", "weekly-digest", "cleanup"];
13350
- };
13351
- readonly staleAfterDays: {
13352
- readonly type: "integer";
13353
- readonly description: "`stale-content` only: entries not updated for this many days are listed for review.";
13354
- readonly minimum: 30;
13355
- readonly maximum: 1095;
13356
14866
  };
13357
14867
  };
13358
- }, {
14868
+ readonly settingsSha256: {
14869
+ readonly $ref: "#/$defs/Sha256Hex";
14870
+ };
14871
+ readonly designSha256: {
14872
+ readonly $ref: "#/$defs/Sha256Hex";
14873
+ };
14874
+ };
14875
+ };
14876
+ readonly skills: {
14877
+ readonly type: "array";
14878
+ readonly items: {
13359
14879
  readonly type: "object";
13360
- readonly title: "AgentTaskAutomationJob";
13361
- 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.";
13362
14880
  readonly additionalProperties: false;
13363
- readonly required: readonly ["kind", "keyId", "instructions", "modeCap", "readsUntrustedText", "windowMinutes", "budget"];
14881
+ readonly required: readonly ["name", "sha256"];
13364
14882
  readonly properties: {
13365
- readonly kind: {
13366
- readonly type: "string";
13367
- readonly enum: readonly ["agent-task"];
13368
- };
13369
- readonly keyId: {
14883
+ readonly name: {
13370
14884
  readonly type: "string";
13371
- readonly pattern: "^[A-Za-z0-9_-]{6,64}$";
14885
+ readonly pattern: "^[a-z][a-z0-9-]{0,63}$";
13372
14886
  };
13373
- readonly instructions: {
13374
- readonly type: "string";
13375
- readonly description: "What the owner asks the agent to do, shown to the agent by `begin_run`. Plain text.";
13376
- readonly minLength: 1;
13377
- readonly maxLength: 2000;
13378
- readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]+$";
14887
+ readonly sha256: {
14888
+ readonly $ref: "#/$defs/Sha256Hex";
13379
14889
  };
13380
- readonly skill: {
14890
+ };
14891
+ };
14892
+ };
14893
+ readonly workers: {
14894
+ readonly type: "object";
14895
+ readonly additionalProperties: false;
14896
+ readonly required: readonly ["site", "admin"];
14897
+ readonly properties: {
14898
+ readonly site: {
14899
+ readonly $ref: "#/$defs/WorkerArtifact";
14900
+ };
14901
+ readonly admin: {
14902
+ readonly $ref: "#/$defs/WorkerArtifact";
14903
+ };
14904
+ };
14905
+ };
14906
+ readonly bindingTemplates: {
14907
+ readonly type: "object";
14908
+ readonly additionalProperties: false;
14909
+ readonly required: readonly ["site", "admin"];
14910
+ readonly properties: {
14911
+ readonly site: {
14912
+ readonly $ref: "#/$defs/BindingTemplate";
14913
+ };
14914
+ readonly admin: {
14915
+ readonly $ref: "#/$defs/BindingTemplate";
14916
+ };
14917
+ };
14918
+ };
14919
+ readonly requiredScopes: {
14920
+ readonly type: "array";
14921
+ readonly uniqueItems: true;
14922
+ readonly items: {
14923
+ readonly $ref: "#/$defs/ScopeId";
14924
+ };
14925
+ };
14926
+ readonly optionalScopes: {
14927
+ readonly type: "array";
14928
+ readonly uniqueItems: true;
14929
+ readonly items: {
14930
+ readonly $ref: "#/$defs/ScopeId";
14931
+ };
14932
+ };
14933
+ readonly requiredCapabilities: {
14934
+ readonly type: "array";
14935
+ readonly uniqueItems: true;
14936
+ readonly items: {
14937
+ readonly $ref: "#/$defs/Capability";
14938
+ };
14939
+ };
14940
+ readonly optionalCapabilities: {
14941
+ readonly type: "array";
14942
+ readonly uniqueItems: true;
14943
+ readonly items: {
14944
+ readonly $ref: "#/$defs/Capability";
14945
+ };
14946
+ };
14947
+ readonly starter: {
14948
+ readonly oneOf: readonly [{
14949
+ readonly type: "object";
14950
+ readonly additionalProperties: false;
14951
+ readonly required: readonly ["kind"];
14952
+ readonly properties: {
14953
+ readonly kind: {
13381
14954
  readonly type: "string";
13382
- readonly description: "A skill the run declares (its scopes and approval list narrow the run further).";
13383
- readonly pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$";
13384
- readonly maxLength: 64;
14955
+ readonly enum: readonly ["admin-api"];
13385
14956
  };
13386
- readonly modeCap: {
14957
+ };
14958
+ }, {
14959
+ readonly type: "object";
14960
+ readonly additionalProperties: false;
14961
+ readonly required: readonly ["kind", "path", "bytes", "sha256", "siteId"];
14962
+ readonly properties: {
14963
+ readonly kind: {
13387
14964
  readonly type: "string";
13388
- readonly description: "The most autonomous mode a run may use; never `bypass`.";
13389
- readonly enum: readonly ["plan", "manual", "edits", "auto"];
14965
+ readonly enum: readonly ["bundle"];
13390
14966
  };
13391
- readonly readsUntrustedText: {
13392
- readonly type: "boolean";
14967
+ readonly path: {
14968
+ readonly type: "string";
14969
+ readonly pattern: "^starter/[A-Za-z0-9._-]+$";
13393
14970
  };
13394
- readonly windowMinutes: {
14971
+ readonly bytes: {
13395
14972
  readonly type: "integer";
13396
- readonly minimum: 5;
13397
- readonly maximum: 240;
14973
+ readonly minimum: 1;
13398
14974
  };
13399
- readonly budget: {
13400
- readonly $ref: "#/$defs/AutomationBudget";
14975
+ readonly sha256: {
14976
+ readonly $ref: "#/$defs/Sha256Hex";
14977
+ };
14978
+ readonly siteId: {
14979
+ readonly $ref: "#/$defs/SiteId";
13401
14980
  };
13402
14981
  };
13403
14982
  }];
13404
14983
  };
13405
- readonly AutomationOwner: {
14984
+ readonly features: {
14985
+ readonly type: "object";
14986
+ readonly additionalProperties: {
14987
+ readonly type: "boolean";
14988
+ };
14989
+ readonly required: readonly ["adminSitesAcceptsSiteId", "healthReportsVersion", "mediaTransformVar"];
14990
+ readonly properties: {
14991
+ readonly adminSitesAcceptsSiteId: {
14992
+ readonly type: "boolean";
14993
+ };
14994
+ readonly healthReportsVersion: {
14995
+ readonly type: "boolean";
14996
+ };
14997
+ readonly mediaTransformVar: {
14998
+ readonly type: "boolean";
14999
+ };
15000
+ };
15001
+ };
15002
+ readonly planVersion: {
15003
+ readonly type: "integer";
15004
+ readonly minimum: 1;
15005
+ };
15006
+ readonly signing: {
13406
15007
  readonly type: "object";
13407
- readonly description: "The person who created the automation and owns its key (`user_…`). Agents never own automations.";
13408
15008
  readonly additionalProperties: false;
13409
- readonly required: readonly ["id"];
15009
+ readonly required: readonly ["keyId", "algorithm", "signature"];
13410
15010
  readonly properties: {
13411
- readonly id: {
15011
+ readonly keyId: {
13412
15012
  readonly type: "string";
13413
- readonly pattern: "^user_[A-Za-z0-9]{6,32}$";
15013
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
13414
15014
  };
13415
- readonly name: {
15015
+ readonly algorithm: {
13416
15016
  readonly type: "string";
13417
- readonly maxLength: 200;
15017
+ readonly enum: readonly ["Ed25519"];
15018
+ };
15019
+ readonly signature: {
15020
+ readonly type: "string";
15021
+ readonly enum: readonly ["manifest.sig", "release-statement.sig"];
13418
15022
  };
13419
15023
  };
13420
15024
  };
13421
- readonly AutomationRecurrence: {
15025
+ };
15026
+ readonly $defs: {
15027
+ readonly BindingName: {
15028
+ readonly type: "string";
15029
+ readonly pattern: "^[A-Z][A-Z0-9_]*(_\\*)?$";
15030
+ };
15031
+ readonly BindingTemplate: {
13422
15032
  readonly type: "object";
13423
- 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.";
13424
15033
  readonly additionalProperties: false;
13425
- readonly required: readonly ["start", "timeZone", "preset"];
15034
+ readonly required: readonly ["bindings", "vars", "secrets"];
13426
15035
  readonly properties: {
13427
- readonly start: {
13428
- readonly $ref: "#/$defs/LocalDateTime";
15036
+ readonly bindings: {
15037
+ readonly type: "array";
15038
+ readonly items: {
15039
+ readonly type: "object";
15040
+ readonly additionalProperties: false;
15041
+ readonly required: readonly ["name", "type", "required"];
15042
+ readonly properties: {
15043
+ readonly name: {
15044
+ readonly $ref: "#/$defs/BindingName";
15045
+ };
15046
+ readonly type: {
15047
+ readonly type: "string";
15048
+ readonly enum: readonly ["d1", "r2_bucket", "assets", "service", "durable_object_namespace", "analytics_engine", "analytics_sql", "ratelimit", "ai_search", "send_email", "ai", "browser"];
15049
+ };
15050
+ readonly required: {
15051
+ readonly type: "boolean";
15052
+ };
15053
+ readonly aliases: {
15054
+ readonly type: "array";
15055
+ readonly items: {
15056
+ readonly $ref: "#/$defs/BindingName";
15057
+ };
15058
+ };
15059
+ };
15060
+ };
13429
15061
  };
13430
- readonly timeZone: {
13431
- readonly $ref: "#/$defs/TimeZone";
15062
+ readonly vars: {
15063
+ readonly type: "array";
15064
+ readonly uniqueItems: true;
15065
+ readonly items: {
15066
+ readonly $ref: "#/$defs/BindingName";
15067
+ };
13432
15068
  };
13433
- readonly rule: {
13434
- readonly $ref: "#/$defs/AutomationRule";
15069
+ readonly secrets: {
15070
+ readonly type: "array";
15071
+ readonly uniqueItems: true;
15072
+ readonly items: {
15073
+ readonly $ref: "#/$defs/SecretName";
15074
+ };
13435
15075
  };
13436
- readonly preset: {
15076
+ readonly cache: {
15077
+ readonly type: "boolean";
15078
+ };
15079
+ readonly cron: {
13437
15080
  readonly type: "string";
13438
- readonly enum: readonly ["once", "hourly", "daily", "weekdays", "weekly", "monthly", "custom"];
15081
+ readonly pattern: "^[0-9*/,\\- ]+$";
13439
15082
  };
13440
15083
  };
13441
15084
  };
13442
- readonly AutomationRule: {
13443
- readonly type: "string";
13444
- 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.";
13445
- readonly maxLength: 300;
13446
- 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))*$";
13447
- };
13448
- readonly AutomationState: {
15085
+ readonly Capability: {
13449
15086
  readonly type: "string";
13450
- 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.";
13451
- readonly enum: readonly ["active", "paused", "auto-paused", "broken", "ended"];
15087
+ readonly enum: readonly ["account", "workers", "d1", "r2", "analytics", "domains"];
13452
15088
  };
13453
- readonly Id: {
15089
+ readonly CloudhalVersion: {
13454
15090
  readonly type: "string";
13455
- 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.";
13456
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
13457
- readonly minLength: 8;
13458
- readonly maxLength: 48;
15091
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
13459
15092
  };
13460
- readonly LocalDateTime: {
15093
+ readonly MigrationName: {
13461
15094
  readonly type: "string";
13462
- 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).";
13463
- 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]$";
13464
- };
13465
- readonly Metadata: {
13466
- readonly type: "object";
13467
- readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
13468
- readonly additionalProperties: {
13469
- readonly type: "string";
13470
- };
13471
- };
13472
- readonly Revision: {
13473
- readonly type: "integer";
13474
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
13475
- readonly minimum: 0;
15095
+ readonly pattern: "^[0-9]{4}_[a-z0-9_]+$";
13476
15096
  };
13477
15097
  readonly SchemaVersion: {
13478
15098
  readonly type: "integer";
13479
15099
  readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
13480
15100
  readonly enum: readonly [1];
13481
15101
  };
15102
+ readonly ScopeId: {
15103
+ readonly type: "string";
15104
+ readonly pattern: "^[a-z0-9-]+(\\.[a-z0-9-]+)+$";
15105
+ };
15106
+ readonly SecretName: {
15107
+ readonly type: "string";
15108
+ readonly enum: readonly ["BETTER_AUTH_SECRET", "MCP_STATE_KEY", "CLOUDHAL_PREVIEW_SECRET", "CLOUDHAL_PURGE_TOKEN", "CLOUDHAL_DEPLOY_TOKEN", "CLOUDHAL_SETUP_TOKEN", "CLOUDHAL_COMMENTS_KEY"];
15109
+ };
15110
+ readonly Sha256Hex: {
15111
+ readonly type: "string";
15112
+ readonly pattern: "^[0-9a-f]{64}$";
15113
+ };
15114
+ readonly SiteId: {
15115
+ readonly type: "string";
15116
+ readonly pattern: "^site_[A-Za-z0-9]{6,32}$";
15117
+ };
13482
15118
  readonly Timestamp: {
13483
15119
  readonly type: "string";
13484
15120
  readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
13485
15121
  readonly format: "date-time";
13486
15122
  };
13487
- readonly TimeZone: {
13488
- readonly type: "string";
13489
- 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.";
13490
- readonly pattern: "^(?:UTC|[A-Z][A-Za-z_-]+(?:/[A-Za-z0-9_+-]+){1,2})$";
13491
- readonly maxLength: 64;
15123
+ readonly WorkerArtifact: {
15124
+ readonly type: "object";
15125
+ readonly additionalProperties: false;
15126
+ readonly required: readonly ["mainModule", "modules", "assets"];
15127
+ readonly properties: {
15128
+ readonly mainModule: {
15129
+ readonly type: "string";
15130
+ readonly pattern: "^[A-Za-z0-9._/-]+$";
15131
+ };
15132
+ readonly modules: {
15133
+ readonly type: "array";
15134
+ readonly minItems: 1;
15135
+ readonly items: {
15136
+ readonly type: "object";
15137
+ readonly additionalProperties: false;
15138
+ readonly required: readonly ["path", "type", "bytes", "sha256"];
15139
+ readonly properties: {
15140
+ readonly path: {
15141
+ readonly type: "string";
15142
+ readonly pattern: "^[A-Za-z0-9._-]+(/[A-Za-z0-9._-]+)*$";
15143
+ };
15144
+ readonly type: {
15145
+ readonly type: "string";
15146
+ readonly enum: readonly ["esm", "cjs", "wasm", "text", "data"];
15147
+ };
15148
+ readonly bytes: {
15149
+ readonly type: "integer";
15150
+ readonly minimum: 1;
15151
+ };
15152
+ readonly sha256: {
15153
+ readonly $ref: "#/$defs/Sha256Hex";
15154
+ };
15155
+ };
15156
+ };
15157
+ };
15158
+ readonly assets: {
15159
+ readonly type: "object";
15160
+ readonly additionalProperties: false;
15161
+ readonly required: readonly ["count", "bytes", "files", "headers"];
15162
+ readonly properties: {
15163
+ readonly count: {
15164
+ readonly type: "integer";
15165
+ readonly minimum: 0;
15166
+ readonly maximum: 20000;
15167
+ };
15168
+ readonly bytes: {
15169
+ readonly type: "integer";
15170
+ readonly minimum: 0;
15171
+ };
15172
+ readonly files: {
15173
+ readonly type: "array";
15174
+ readonly maxItems: 20000;
15175
+ readonly items: {
15176
+ readonly type: "object";
15177
+ readonly additionalProperties: false;
15178
+ readonly required: readonly ["path", "bytes", "sha256", "assetHash", "contentType"];
15179
+ readonly properties: {
15180
+ readonly path: {
15181
+ readonly type: "string";
15182
+ readonly pattern: "^/[^\\s]*$";
15183
+ readonly maxLength: 1024;
15184
+ };
15185
+ readonly bytes: {
15186
+ readonly type: "integer";
15187
+ readonly minimum: 0;
15188
+ readonly maximum: 26214400;
15189
+ };
15190
+ readonly sha256: {
15191
+ readonly $ref: "#/$defs/Sha256Hex";
15192
+ };
15193
+ readonly assetHash: {
15194
+ readonly type: "string";
15195
+ readonly pattern: "^[0-9a-f]{32}$";
15196
+ };
15197
+ readonly contentType: {
15198
+ readonly type: "string";
15199
+ readonly maxLength: 128;
15200
+ };
15201
+ };
15202
+ };
15203
+ };
15204
+ readonly headers: {
15205
+ readonly type: "string";
15206
+ readonly maxLength: 100000;
15207
+ };
15208
+ readonly config: {
15209
+ readonly type: "object";
15210
+ readonly additionalProperties: false;
15211
+ readonly properties: {
15212
+ readonly not_found_handling: {
15213
+ readonly type: "string";
15214
+ readonly enum: readonly ["none", "404-page", "single-page-application"];
15215
+ };
15216
+ readonly run_worker_first: {
15217
+ readonly type: "array";
15218
+ readonly items: {
15219
+ readonly type: "string";
15220
+ readonly pattern: "^/";
15221
+ };
15222
+ };
15223
+ };
15224
+ };
15225
+ };
15226
+ };
15227
+ readonly bindingTemplate: {
15228
+ readonly type: "string";
15229
+ readonly enum: readonly ["site", "admin"];
15230
+ };
15231
+ };
13492
15232
  };
13493
15233
  };
13494
15234
  };
13495
- readonly "schedule-run": {
15235
+ readonly "release-statement": {
13496
15236
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
13497
- readonly $id: "https://cloudhal.dev/schemas/v1/schedule-run.schema.json";
13498
- readonly title: "ScheduleRun";
13499
- 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.";
15237
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-statement.schema.json";
15238
+ readonly title: "ReleaseStatement";
15239
+ 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.";
13500
15240
  readonly type: "object";
13501
15241
  readonly additionalProperties: false;
13502
- readonly required: readonly ["schemaVersion", "id", "siteId", "subject", "occurrenceAt", "state", "attempt", "createdAt", "updatedAt", "rev"];
15242
+ readonly required: readonly ["schemaVersion", "format", "version", "channel", "securityRelease", "commit", "createdAt", "signing", "manifest", "tarball"];
13503
15243
  readonly properties: {
13504
15244
  readonly schemaVersion: {
13505
15245
  readonly $ref: "#/$defs/SchemaVersion";
13506
15246
  };
13507
- readonly id: {
13508
- readonly $ref: "#/$defs/ScheduleRunId";
13509
- };
13510
- readonly siteId: {
13511
- readonly $ref: "#/$defs/Id";
13512
- };
13513
- readonly subject: {
13514
- readonly $ref: "#/$defs/ScheduleRunSubject";
13515
- };
13516
- readonly occurrenceAt: {
13517
- readonly $ref: "#/$defs/Timestamp";
13518
- };
13519
- readonly state: {
13520
- readonly $ref: "#/$defs/ScheduleRunState";
13521
- };
13522
- readonly outcome: {
13523
- readonly type: "string";
13524
- 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.";
13525
- readonly enum: readonly ["did-work", "nothing-to-do", "proposed", "waiting-approval"];
13526
- };
13527
- readonly trigger: {
15247
+ readonly format: {
13528
15248
  readonly type: "string";
13529
- 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\").";
13530
- readonly enum: readonly ["cron", "alarm", "request", "node", "manual"];
13531
- };
13532
- readonly attempt: {
13533
- readonly type: "integer";
13534
- readonly minimum: 1;
13535
- };
13536
- readonly startedAt: {
13537
- readonly $ref: "#/$defs/Timestamp";
13538
- };
13539
- readonly endedAt: {
13540
- readonly $ref: "#/$defs/Timestamp";
15249
+ readonly enum: readonly ["cloudhal.release-statement@1"];
13541
15250
  };
13542
- readonly latenessSeconds: {
13543
- readonly type: "integer";
13544
- readonly minimum: 0;
15251
+ readonly version: {
15252
+ readonly $ref: "#/$defs/CloudhalVersion";
13545
15253
  };
13546
- readonly adjusted: {
15254
+ readonly channel: {
13547
15255
  readonly type: "string";
13548
- 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).";
13549
- readonly enum: readonly ["dst-gap", "tzdata"];
13550
- };
13551
- readonly window: {
13552
- readonly $ref: "#/$defs/ScheduleRunWindow";
13553
- };
13554
- readonly usage: {
13555
- readonly $ref: "#/$defs/ScheduleRunUsage";
15256
+ readonly enum: readonly ["stable", "next"];
13556
15257
  };
13557
- readonly taint: {
13558
- readonly $ref: "#/$defs/ScheduleRunTaint";
15258
+ readonly securityRelease: {
15259
+ readonly type: "boolean";
13559
15260
  };
13560
- readonly summary: {
15261
+ readonly commit: {
13561
15262
  readonly type: "string";
13562
- 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.";
13563
- readonly maxLength: 2000;
13564
- readonly pattern: "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
13565
- };
13566
- readonly counts: {
13567
- readonly type: "object";
13568
- readonly description: "Findings by name (e.g. `broken-links`, `stale-entries`, `proposals`).";
13569
- readonly propertyNames: {
13570
- readonly type: "string";
13571
- readonly pattern: "^[a-z][a-z0-9-]{0,40}$";
13572
- };
13573
- readonly maxProperties: 20;
13574
- readonly additionalProperties: {
13575
- readonly type: "integer";
13576
- readonly minimum: 0;
13577
- };
13578
- };
13579
- readonly approvalIds: {
13580
- readonly type: "array";
13581
- readonly description: "Approval requests the run filed.";
13582
- readonly items: {
13583
- readonly $ref: "#/$defs/Id";
13584
- };
13585
- readonly uniqueItems: true;
13586
- readonly maxItems: 50;
13587
- };
13588
- readonly error: {
13589
- readonly $ref: "#/$defs/ScheduleRunError";
15263
+ readonly pattern: "^[0-9a-f]{40}$";
13590
15264
  };
13591
15265
  readonly createdAt: {
13592
15266
  readonly $ref: "#/$defs/Timestamp";
13593
15267
  };
13594
- readonly updatedAt: {
13595
- readonly $ref: "#/$defs/Timestamp";
15268
+ readonly signing: {
15269
+ readonly type: "object";
15270
+ readonly additionalProperties: false;
15271
+ readonly required: readonly ["keyId", "algorithm", "signature"];
15272
+ readonly properties: {
15273
+ readonly keyId: {
15274
+ readonly type: "string";
15275
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
15276
+ };
15277
+ readonly algorithm: {
15278
+ readonly type: "string";
15279
+ readonly enum: readonly ["Ed25519"];
15280
+ };
15281
+ readonly signature: {
15282
+ readonly type: "string";
15283
+ readonly enum: readonly ["release-statement.sig"];
15284
+ };
15285
+ };
15286
+ };
15287
+ readonly manifest: {
15288
+ readonly $ref: "#/$defs/StatementAsset";
13596
15289
  };
13597
- readonly rev: {
13598
- readonly $ref: "#/$defs/Revision";
15290
+ readonly tarball: {
15291
+ readonly $ref: "#/$defs/StatementAsset";
13599
15292
  };
13600
15293
  };
13601
15294
  readonly $defs: {
13602
- readonly Id: {
15295
+ readonly CloudhalVersion: {
13603
15296
  readonly type: "string";
13604
- 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.";
13605
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
13606
- readonly minLength: 8;
13607
- readonly maxLength: 48;
15297
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
13608
15298
  };
13609
- readonly Revision: {
15299
+ readonly SchemaVersion: {
13610
15300
  readonly type: "integer";
13611
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
13612
- readonly minimum: 0;
15301
+ readonly description: "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.";
15302
+ readonly enum: readonly [1];
13613
15303
  };
13614
- readonly ScheduleRunError: {
15304
+ readonly Sha256Hex: {
15305
+ readonly type: "string";
15306
+ readonly pattern: "^[0-9a-f]{64}$";
15307
+ };
15308
+ readonly StatementAsset: {
13615
15309
  readonly type: "object";
13616
15310
  readonly additionalProperties: false;
13617
- readonly required: readonly ["code"];
15311
+ readonly required: readonly ["name", "sha256", "bytes"];
13618
15312
  readonly properties: {
13619
- readonly code: {
15313
+ readonly name: {
13620
15314
  readonly type: "string";
13621
- readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
15315
+ readonly pattern: "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$";
13622
15316
  };
13623
- readonly message: {
13624
- readonly type: "string";
13625
- readonly maxLength: 500;
13626
- readonly pattern: "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$";
15317
+ readonly sha256: {
15318
+ readonly $ref: "#/$defs/Sha256Hex";
15319
+ };
15320
+ readonly bytes: {
15321
+ readonly type: "integer";
15322
+ readonly minimum: 1;
15323
+ readonly maximum: 104857600;
13627
15324
  };
13628
15325
  };
13629
15326
  };
13630
- readonly ScheduleRunId: {
15327
+ readonly Timestamp: {
13631
15328
  readonly type: "string";
13632
- 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).";
13633
- readonly pattern: "^run_[A-Za-z0-9]{6,32}$";
15329
+ readonly description: "RFC 3339 / ISO 8601 instant in UTC.";
15330
+ readonly format: "date-time";
13634
15331
  };
13635
- readonly ScheduleRunState: {
15332
+ };
15333
+ };
15334
+ readonly "release-keys": {
15335
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
15336
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-keys.schema.json";
15337
+ readonly title: "ReleaseKeys";
15338
+ readonly description: "cloudhal.release-keys@1 (RFC-0046 §9): the root-signed list of Cloudhal's release and yank keys, published as keys.json at https://cloudhal.dev/.well-known/cloudhal/keys.json next to keys.json.sig (a raw 64-byte Ed25519 signature by the offline root over the exact bytes). A consumer uses it only to reduce trust in the keys it pins: revoke, mark retiring, narrow a validity window; it never adds a key. Canonical bytes as for the release statement.";
15339
+ readonly type: "object";
15340
+ readonly additionalProperties: false;
15341
+ readonly required: readonly ["schemaVersion", "format", "issuedAt", "expires", "signing", "keys"];
15342
+ readonly properties: {
15343
+ readonly schemaVersion: {
15344
+ readonly $ref: "#/$defs/SchemaVersion";
15345
+ };
15346
+ readonly format: {
13636
15347
  readonly type: "string";
13637
- 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.";
13638
- readonly enum: readonly ["due", "ready", "running", "succeeded", "failed", "missed", "skipped", "budget-exceeded", "killed"];
15348
+ readonly enum: readonly ["cloudhal.release-keys@1"];
13639
15349
  };
13640
- readonly ScheduleRunSubject: {
13641
- readonly description: "What ran, discriminated by `kind`.";
13642
- readonly oneOf: readonly [{
13643
- readonly type: "object";
13644
- readonly title: "ReleaseRunSubject";
13645
- readonly additionalProperties: false;
13646
- readonly required: readonly ["kind", "releaseId"];
13647
- readonly properties: {
13648
- readonly kind: {
13649
- readonly type: "string";
13650
- readonly enum: readonly ["release"];
13651
- };
13652
- readonly releaseId: {
13653
- readonly type: "string";
13654
- readonly pattern: "^rel_[A-Za-z0-9]{6,32}$";
13655
- };
13656
- };
13657
- }, {
13658
- readonly type: "object";
13659
- readonly title: "AutomationRunSubject";
13660
- readonly additionalProperties: false;
13661
- readonly required: readonly ["kind", "automationId", "job"];
13662
- readonly properties: {
13663
- readonly kind: {
13664
- readonly type: "string";
13665
- readonly enum: readonly ["automation"];
13666
- };
13667
- readonly automationId: {
13668
- readonly type: "string";
13669
- readonly pattern: "^aut_[A-Za-z0-9]{6,32}$";
13670
- };
13671
- readonly job: {
13672
- readonly type: "string";
13673
- readonly enum: readonly ["builtin", "agent-task"];
13674
- };
13675
- };
13676
- }];
15350
+ readonly issuedAt: {
15351
+ readonly $ref: "#/$defs/Timestamp";
13677
15352
  };
13678
- readonly ScheduleRunTaint: {
15353
+ readonly expires: {
15354
+ readonly description: "At most 13 months after issuedAt; a consumer refuses an expired list.";
15355
+ readonly $ref: "#/$defs/Timestamp";
15356
+ };
15357
+ readonly signing: {
13679
15358
  readonly type: "object";
13680
- readonly description: "The run read visitor-supplied text at `at` through `tool`; from then on it may only read, label, hide and pause.";
13681
15359
  readonly additionalProperties: false;
13682
- readonly required: readonly ["at", "tool"];
15360
+ readonly required: readonly ["keyId", "algorithm", "signature"];
13683
15361
  readonly properties: {
13684
- readonly at: {
13685
- readonly $ref: "#/$defs/Timestamp";
15362
+ readonly keyId: {
15363
+ readonly description: "The root key that signed this list.";
15364
+ readonly $ref: "#/$defs/KeyId";
13686
15365
  };
13687
- readonly tool: {
15366
+ readonly algorithm: {
13688
15367
  readonly type: "string";
13689
- readonly pattern: "^[a-z][a-z0-9_]{0,63}$";
15368
+ readonly enum: readonly ["Ed25519"];
15369
+ };
15370
+ readonly signature: {
15371
+ readonly type: "string";
15372
+ readonly enum: readonly ["keys.json.sig"];
13690
15373
  };
13691
15374
  };
13692
15375
  };
13693
- readonly ScheduleRunUsage: {
15376
+ readonly keys: {
15377
+ readonly type: "array";
15378
+ readonly maxItems: 64;
15379
+ readonly items: {
15380
+ readonly $ref: "#/$defs/ListedKey";
15381
+ };
15382
+ };
15383
+ };
15384
+ readonly $defs: {
15385
+ readonly KeyId: {
15386
+ readonly type: "string";
15387
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
15388
+ };
15389
+ readonly ListedKey: {
13694
15390
  readonly type: "object";
13695
- readonly description: "What the run used against its budget, counted by the server.";
13696
15391
  readonly additionalProperties: false;
13697
- readonly required: readonly ["toolCalls", "writes", "approvalRequests"];
15392
+ readonly required: readonly ["keyId", "publicKey", "role", "notBefore", "notAfter", "status"];
13698
15393
  readonly properties: {
13699
- readonly toolCalls: {
13700
- readonly type: "integer";
13701
- readonly minimum: 0;
15394
+ readonly keyId: {
15395
+ readonly $ref: "#/$defs/KeyId";
13702
15396
  };
13703
- readonly writes: {
13704
- readonly type: "integer";
13705
- readonly minimum: 0;
15397
+ readonly publicKey: {
15398
+ readonly description: "The raw 32-byte Ed25519 public key, base64.";
15399
+ readonly type: "string";
15400
+ readonly pattern: "^[A-Za-z0-9+/]{43}=$";
13706
15401
  };
13707
- readonly approvalRequests: {
13708
- readonly type: "integer";
13709
- readonly minimum: 0;
15402
+ readonly role: {
15403
+ readonly type: "string";
15404
+ readonly enum: readonly ["release", "yank"];
13710
15405
  };
13711
- };
13712
- };
13713
- readonly ScheduleRunWindow: {
13714
- readonly type: "object";
13715
- 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.";
13716
- readonly additionalProperties: false;
13717
- readonly required: readonly ["opensAt", "closesAt"];
13718
- readonly properties: {
13719
- readonly opensAt: {
15406
+ readonly notBefore: {
13720
15407
  readonly $ref: "#/$defs/Timestamp";
13721
15408
  };
13722
- readonly closesAt: {
15409
+ readonly notAfter: {
13723
15410
  readonly $ref: "#/$defs/Timestamp";
13724
15411
  };
15412
+ readonly status: {
15413
+ readonly type: "string";
15414
+ readonly enum: readonly ["active", "retiring", "revoked"];
15415
+ };
13725
15416
  };
13726
15417
  };
13727
15418
  readonly SchemaVersion: {
@@ -13736,118 +15427,107 @@ export declare const schemas: {
13736
15427
  };
13737
15428
  };
13738
15429
  };
13739
- readonly glossary: {
15430
+ readonly "release-yank-list": {
13740
15431
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
13741
- readonly $id: "https://cloudhal.dev/schemas/v1/glossary.schema.json";
13742
- readonly title: "Glossary";
13743
- 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.";
15432
+ readonly $id: "https://cloudhal.dev/schemas/v1/release-yank-list.schema.json";
15433
+ readonly title: "ReleaseYankList";
15434
+ readonly description: "cloudhal.release-yank-list@1 (RFC-0046 §9): the yank list, published as yanked.json at https://cloudhal.dev/.well-known/cloudhal/yanked.json next to yanked.json.sig (a raw 64-byte Ed25519 signature by a yank-role key from keys.json over the exact bytes). It only reduces trust: versions no consumer may install, and release key ids every consumer must refuse. Re-signed weekly; it expires 30 days after issuedAt, and a stale list blocks new installs only.";
13744
15435
  readonly type: "object";
13745
15436
  readonly additionalProperties: false;
13746
- readonly required: readonly ["schemaVersion", "id", "siteId", "entries", "rev", "createdAt", "updatedAt"];
15437
+ readonly required: readonly ["schemaVersion", "format", "serial", "issuedAt", "expires", "signing", "versions", "revokedKeys"];
13747
15438
  readonly properties: {
13748
15439
  readonly schemaVersion: {
13749
15440
  readonly $ref: "#/$defs/SchemaVersion";
13750
15441
  };
13751
- readonly id: {
13752
- readonly $ref: "#/$defs/Id";
13753
- };
13754
- readonly siteId: {
13755
- readonly $ref: "#/$defs/Id";
13756
- };
13757
- readonly entries: {
13758
- readonly type: "array";
13759
- readonly description: "Unique by term (case-insensitive); order is the editor's.";
13760
- readonly items: {
13761
- readonly $ref: "#/$defs/GlossaryEntry";
13762
- };
13763
- readonly maxItems: 2000;
15442
+ readonly format: {
15443
+ readonly type: "string";
15444
+ readonly enum: readonly ["cloudhal.release-yank-list@1"];
13764
15445
  };
13765
- readonly rev: {
13766
- readonly $ref: "#/$defs/Revision";
15446
+ readonly serial: {
15447
+ readonly description: "Increases by one at every signing. A consumer that keeps state refuses a serial lower than the last one it saw (a rollback to an older, validly signed list).";
15448
+ readonly type: "integer";
15449
+ readonly minimum: 1;
15450
+ readonly maximum: 9007199254740991;
13767
15451
  };
13768
- readonly createdAt: {
15452
+ readonly issuedAt: {
13769
15453
  readonly $ref: "#/$defs/Timestamp";
13770
15454
  };
13771
- readonly updatedAt: {
15455
+ readonly expires: {
15456
+ readonly description: "Exactly 30 days after issuedAt.";
13772
15457
  readonly $ref: "#/$defs/Timestamp";
13773
15458
  };
13774
- readonly metadata: {
13775
- readonly $ref: "#/$defs/Metadata";
13776
- };
13777
- };
13778
- readonly $defs: {
13779
- readonly GlossaryEntry: {
15459
+ readonly signing: {
13780
15460
  readonly type: "object";
13781
15461
  readonly additionalProperties: false;
13782
- readonly required: readonly ["term"];
15462
+ readonly required: readonly ["keyId", "algorithm", "signature"];
13783
15463
  readonly properties: {
13784
- readonly term: {
13785
- readonly type: "string";
13786
- readonly description: "The term as written in the site's default locale.";
13787
- readonly minLength: 1;
13788
- readonly maxLength: 200;
15464
+ readonly keyId: {
15465
+ readonly description: "The yank-role key that signed this list.";
15466
+ readonly $ref: "#/$defs/KeyId";
13789
15467
  };
13790
- readonly note: {
15468
+ readonly algorithm: {
13791
15469
  readonly type: "string";
13792
- readonly description: "Context for translators and agents: meaning, part of speech, where it appears.";
13793
- readonly maxLength: 500;
15470
+ readonly enum: readonly ["Ed25519"];
13794
15471
  };
13795
- readonly doNotTranslate: {
13796
- readonly type: "boolean";
13797
- readonly description: "Keep the term as written in every locale (brand, product or proper names). Such an entry has no translations.";
15472
+ readonly signature: {
15473
+ readonly type: "string";
15474
+ readonly enum: readonly ["yanked.json.sig"];
13798
15475
  };
13799
- readonly caseSensitive: {
13800
- readonly type: "boolean";
13801
- readonly description: "Match the term only with this exact capitalisation.";
15476
+ };
15477
+ };
15478
+ readonly versions: {
15479
+ readonly type: "array";
15480
+ readonly maxItems: 1000;
15481
+ readonly items: {
15482
+ readonly type: "object";
15483
+ readonly additionalProperties: false;
15484
+ readonly required: readonly ["version", "yankedAt", "reason"];
15485
+ readonly properties: {
15486
+ readonly version: {
15487
+ readonly $ref: "#/$defs/CloudhalVersion";
15488
+ };
15489
+ readonly yankedAt: {
15490
+ readonly $ref: "#/$defs/Timestamp";
15491
+ };
15492
+ readonly reason: {
15493
+ readonly type: "string";
15494
+ readonly minLength: 1;
15495
+ readonly maxLength: 500;
15496
+ };
13802
15497
  };
13803
- readonly translations: {
13804
- readonly type: "object";
13805
- readonly description: "The approved translation per locale (never the default locale).";
13806
- readonly propertyNames: {
13807
- readonly $ref: "#/$defs/Locale";
15498
+ };
15499
+ };
15500
+ readonly revokedKeys: {
15501
+ readonly type: "array";
15502
+ readonly maxItems: 64;
15503
+ readonly items: {
15504
+ readonly type: "object";
15505
+ readonly additionalProperties: false;
15506
+ readonly required: readonly ["keyId", "revokedAt", "reason"];
15507
+ readonly properties: {
15508
+ readonly keyId: {
15509
+ readonly $ref: "#/$defs/KeyId";
13808
15510
  };
13809
- readonly additionalProperties: {
13810
- readonly type: "object";
13811
- readonly additionalProperties: false;
13812
- readonly required: readonly ["text"];
13813
- readonly properties: {
13814
- readonly text: {
13815
- readonly type: "string";
13816
- readonly minLength: 1;
13817
- readonly maxLength: 200;
13818
- };
13819
- readonly note: {
13820
- readonly type: "string";
13821
- readonly maxLength: 500;
13822
- };
13823
- };
15511
+ readonly revokedAt: {
15512
+ readonly $ref: "#/$defs/Timestamp";
15513
+ };
15514
+ readonly reason: {
15515
+ readonly type: "string";
15516
+ readonly minLength: 1;
15517
+ readonly maxLength: 500;
13824
15518
  };
13825
15519
  };
13826
15520
  };
13827
15521
  };
13828
- readonly Id: {
15522
+ };
15523
+ readonly $defs: {
15524
+ readonly CloudhalVersion: {
13829
15525
  readonly type: "string";
13830
- 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.";
13831
- readonly pattern: "^[a-z]+_[A-Za-z0-9]{6,32}$";
13832
- readonly minLength: 8;
13833
- readonly maxLength: 48;
15526
+ readonly pattern: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$";
13834
15527
  };
13835
- readonly Locale: {
15528
+ readonly KeyId: {
13836
15529
  readonly type: "string";
13837
- readonly description: "BCP 47 language tag, e.g. en, tr, en-US.";
13838
- readonly pattern: "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$";
13839
- };
13840
- readonly Metadata: {
13841
- readonly type: "object";
13842
- readonly description: "Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source).";
13843
- readonly additionalProperties: {
13844
- readonly type: "string";
13845
- };
13846
- };
13847
- readonly Revision: {
13848
- readonly type: "integer";
13849
- readonly description: "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).";
13850
- readonly minimum: 0;
15530
+ readonly pattern: "^[a-z0-9][a-z0-9-]{2,63}$";
13851
15531
  };
13852
15532
  readonly SchemaVersion: {
13853
15533
  readonly type: "integer";