/* eslint-disable */ /* biome-ignore-all lint: generated */ /** * GENERATED FILE — DO NOT EDIT. * Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`) */ /** * Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SchemaVersion". */ export type SchemaVersion = 1; /** * Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Id". */ export type Id = string; /** * Lower-case URL segment. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Slug". */ export type Slug = string; /** * BCP 47 language tag, e.g. en, tr, en-US. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Locale". */ export type Locale = string; /** * RFC-0041: one typed custom field of a collection, discriminated by `type`. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldDefinition". */ export type FieldDefinition = | TextField | RichTextField | NumberField | BooleanField | DateField | DateTimeField | UrlField | ImageField | SelectField | ReferenceField | RepeaterField; /** * The field's key in ContentEntry.fields: lower camelCase, a JavaScript identifier. Unique in its collection; built-in entry property names are reserved (checked in code). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldKey". */ export type FieldKey = string; /** * RFC-0045: one sub-field of a repeater item, discriminated by `type`. Only types whose value is a scalar: no datetime, no multiple select or reference, no repeater. No localized and no migration: the repeater's apply. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SubFieldDefinition". */ export type SubFieldDefinition = | TextSubField | RichTextSubField | NumberSubField | BooleanSubField | DateSubField | UrlSubField | ImageSubField | SelectSubField | ReferenceSubField; /** * RFC-0042: where one JSON-LD property's value comes from, discriminated by `kind`. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "StructuredDataSource". */ export type StructuredDataSource = FieldValueSource | EntryValueSource | SiteValueSource | ConstantValueSource; /** * RFC-0042: entry properties a structured-data property may read. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "EntryValueProperty". */ export type EntryValueProperty = "title" | "summary" | "body" | "coverImage" | "url" | "publishedAt" | "updatedAt"; /** * RFC-0042: site properties a structured-data property may read. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SiteValueProperty". */ export type SiteValueProperty = "name" | "url" | "logo"; /** * RFC-0025 §2: one optional surface (kind `surface`) above the footer's columns, built and checked like any surface; the store refuses other section kinds. */ export type Section = | HeroSection | RichTextSection | ImageSection | ContentListSection | ComponentSection | SurfaceSection; /** * 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. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "BodyProfile". */ export type BodyProfile = 1; /** * Who performed an action. Humans and agents share one actor model so the policy engine treats them uniformly. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "ActorKind". */ export type ActorKind = "human" | "agent" | "system"; /** * RFC 3339 / ISO 8601 instant in UTC. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Timestamp". */ export type Timestamp = string; /** * A markdown body's block index, in body order (RFC-0014 §3). Absent means not indexed (yet, or an HTML body), never empty. * * @maxItems 5000 * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "BodyBlocks". */ export type BodyBlocks = BodyBlock[]; /** * A component's id, unique within its surface; `root` is the tree's root (RFC-0020 §1). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SurfaceComponentId". */ export type SurfaceComponentId = string; /** * Absolute URL path of a route the site owns: starts with '/', lower-case slug segments, no trailing slash except root. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Path". */ export type Path = string; /** * Monotonic per-node revision used for optimistic locking (compare-and-swap on write). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Revision". */ export type Revision = number; /** * A block inside a page, discriminated by `kind`. Variants are written inline (not via $ref) and `kind` is a single-value string enum so that TypeScript gets a literal union and Rust gets a serde internally-tagged enum. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Section". */ export type Section1 = | HeroSection | RichTextSection | ImageSection | ContentListSection | ComponentSection | SurfaceSection; /** * 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. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "TimeZone". */ export type TimeZone = string; /** * 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. */ export interface Site { schemaVersion: SchemaVersion; id: Id; projectId: Id; name: string; slug: Slug; defaultLocale: Locale; /** * @minItems 1 */ locales: [Locale, ...Locale[]]; /** * 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). */ domains: Domain[]; pageIds: Id[]; homePageId?: Id; localization?: Localization; /** * 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. */ collections?: { [k: string]: CollectionSettings | undefined; }; theme: ThemeRef; design?: Design; brand?: Brand; chrome?: Chrome; /** * The site's time zone (RFC-0008): Studio's calendar, schedules entered as wall-clock times and recurring automations use it. Absent means UTC. */ timeZone?: string; /** * Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles. */ publishedSnapshotId?: string; rev: Revision; createdAt: Timestamp; updatedAt: Timestamp; metadata?: Metadata; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Domain". */ export interface Domain { hostname: string; primary: boolean; } /** * How the site serves its locales (RFC-0033 §2). Absent fields mean: prefix-except-default routing, no fallback, no required review, the machine-translation notice until reviewed. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Localization". */ export interface Localization { /** * prefix-except-default: the default locale at the root, the others under //. prefix-all: every locale prefixed, / is a language chooser (x-default). */ routing?: "prefix-except-default" | "prefix-all"; /** * Optional hostname per locale; that locale is then served at the host's root. */ domains?: { [k: string]: string | undefined; }; /** * none: a missing translation is not found. default-with-notice: the default locale's page is served with a notice and noindex. */ fallback?: "none" | "default-with-notice"; /** * Collections whose machine translations need a person's review before they publish ('pages' stands for pages). */ review?: { required?: string[]; }; /** * When readers see the machine-translation notice: unreviewed (until a person reviews) or always. */ label?: "unreviewed" | "always"; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "CollectionSettings". */ export interface CollectionSettings { /** * RFC-0038: where the collection's entries live, as a template with a closed token set. Version 1: one or more fixed lower-case path segments followed by /{slug}, e.g. /blog/{slug}. Absent means //{slug}. */ permalink?: string; /** * RFC-0040: display names per locale (Studio, agents, themes). Absent or missing a locale: the default locale's, then the key. */ labels?: { [k: string]: CollectionLabel | undefined; }; /** * RFC-0040: a name from Studio's closed icon set (e.g. calendar, briefcase, users). Unknown names show the default icon. Never a URL or markup. */ icon?: string; /** * RFC-0040: entries appear in the site's RSS feeds. Absent: true. */ feed?: boolean; /** * RFC-0040: published entries appear in sitemap.xml. Absent: true. */ sitemap?: boolean; /** * RFC-0040: default order where none is given (Studio's list, entry queries without sort, MCP list_entries). Absent: newest. */ sort?: "newest" | "oldest" | "title"; /** * RFC-0041: the collection's typed custom fields, in form order. Values live in ContentEntry.fields under each key. At most 200 per site and unique keys (checked in code). * * @minItems 1 * @maxItems 30 */ fields?: [FieldDefinition, ...FieldDefinition[]]; /** * RFC-0042: fields that listings, queries, Studio columns and MCP may filter and sort by, in column order. Keys of this collection's fields (checked in code). * * @minItems 1 * @maxItems 4 */ listFields?: | [FieldKey] | [FieldKey, FieldKey] | [FieldKey, FieldKey, FieldKey] | [FieldKey, FieldKey, FieldKey, FieldKey]; expiry?: CollectionExpiry; structuredData?: StructuredDataPreset; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "CollectionLabel". */ export interface CollectionLabel { singular: string; plural: string; description?: string; } /** * Plain text: a string of at most maxLength characters. */ export interface TextField { key: FieldKey; type: "text"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * Absent: 5000. */ maxLength?: number; /** * Line breaks allowed. Absent: false. */ multiline?: boolean; /** * Its words go into site search. Absent: false. */ searchable?: boolean; } /** * The field's label and help per locale. Missing a locale: the default locale's, then the key. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldLabels". */ export interface FieldLabels { [k: string]: FieldLabel | undefined; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldLabel". */ export interface FieldLabel { label: string; help?: string; } /** * RFC-0041 §6: present only while a field operation rewrites entries. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldMigration". */ export interface FieldMigration { /** * Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles. */ id: string; fromKey?: FieldKey; fromType?: | "text" | "richText" | "number" | "boolean" | "date" | "datetime" | "url" | "image" | "select" | "reference" | "repeater"; fromLocalized?: boolean; /** * The field's key in ContentEntry.fields: lower camelCase, a JavaScript identifier. Unique in its collection; built-in entry property names are reserved (checked in code). */ sub?: string; } /** * Cloudhal Markdown v1 (ADR-0028), at most 50 000 characters. */ export interface RichTextField { key: FieldKey; type: "richText"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * Its words go into site search. Absent: false. */ searchable?: boolean; } /** * A finite number. */ export interface NumberField { key: FieldKey; type: "number"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * Whole numbers only. Absent: false. */ integer?: boolean; minimum?: number; maximum?: number; } /** * true or false; absent reads as false, so it cannot be required to publish. */ export interface BooleanField { key: FieldKey; type: "boolean"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; migration?: FieldMigration; } /** * A calendar day without a zone (YYYY-MM-DD). */ export interface DateField { key: FieldKey; type: "date"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; } /** * An instant with the zone it was entered in: {at, timeZone} (RFC-0008 §9.1). */ export interface DateTimeField { key: FieldKey; type: "datetime"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; } /** * A link: https, http, mailto, tel, a site-relative path or a #fragment; at most 2048 characters. */ export interface UrlField { key: FieldKey; type: "url"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; } /** * An image Asset of the same site, by id (asset_…). */ export interface ImageField { key: FieldKey; type: "image"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; } /** * One of a closed list of options, or several when multiple. */ export interface SelectField { key: FieldKey; type: "select"; labels: FieldLabels; /** * true: each language version has its own value (missing reads the original's); false: only the translation group's original holds it. */ localized: boolean; /** * An entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * @minItems 1 * @maxItems 50 */ options: [FieldOption, ...FieldOption[]]; /** * The value is a list of option values. Absent: false. */ multiple?: boolean; } /** * One option of a select field. Values are unique in the field (checked in code). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldOption". */ export interface FieldOption { /** * Lower-case URL segment. */ value: string; labels: { [k: string]: string | undefined; }; } /** * RFC-0045: entries of other (or this) collections of the same site, by translation group id (entry_…): the id of the group's original, which every language version and edition carries in translation.group. */ export interface ReferenceField { key: FieldKey; type: "reference"; labels: FieldLabels; /** * true: each language version picks its own targets; false: only the translation group's original holds them, and every version resolves them in its own language. */ localized: boolean; /** * An entry in review or published needs at least one target. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * The collections a target may belong to: declared collections of this site (checked in code). * * @minItems 1 * @maxItems 5 */ collections: | [Slug] | [Slug, Slug] | [Slug, Slug, Slug] | [Slug, Slug, Slug, Slug] | [Slug, Slug, Slug, Slug, Slug]; /** * The value is an ordered list of targets. Absent: false. */ multiple?: boolean; /** * With multiple: at most this many targets. Absent: 20. */ maxItems?: number; /** * Only with one target collection: conditions on its list fields that a newly chosen target must meet (no `now`; checked in code). Narrows the picker; not re-checked when the target changes later. * * @minItems 1 * @maxItems 4 */ where?: | [FieldCondition] | [FieldCondition, FieldCondition] | [FieldCondition, FieldCondition, FieldCondition] | [FieldCondition, FieldCondition, FieldCondition, FieldCondition]; } /** * RFC-0042: one condition on a typed field of the listed collection. `value` is read by the field's type: a number, YYYY-MM-DD, an RFC 3339 instant, true/false, an option value, or `now`. `values` only with `in`. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldCondition". */ export interface FieldCondition { /** * A field key (site.schema.json FieldKey's pattern, repeated). */ field: string; op: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "set" | "unset"; value?: string; /** * @minItems 1 * @maxItems 20 */ values?: | [string] | [string, string] | [string, string, string] | [string, string, string, string] | [string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string, string] | [ string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ] | [ string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, ]; } /** * RFC-0045: an ordered list of items, each a flat object of sub-fields. A repeater cannot contain a repeater. */ export interface RepeaterField { key: FieldKey; type: "repeater"; labels: FieldLabels; /** * true: each language version has its own list (missing reads the original's); false: only the original holds the list. */ localized: boolean; /** * An entry in review or published needs at least one item. Absent: false. */ requiredToPublish?: boolean; migration?: FieldMigration; /** * The sub-fields of every item, in form order. Unique keys (checked in code). * * @minItems 1 * @maxItems 10 */ fields: | [SubFieldDefinition] | [SubFieldDefinition, SubFieldDefinition] | [SubFieldDefinition, SubFieldDefinition, SubFieldDefinition] | [SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ] | [ SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, SubFieldDefinition, ]; /** * At most this many items. Absent: 20. */ maxItems?: number; /** * The field's key in ContentEntry.fields: lower camelCase, a JavaScript identifier. Unique in its collection; built-in entry property names are reserved (checked in code). */ itemLabel?: string; } export interface TextSubField { key: FieldKey; type: "text"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; /** * Absent: 5000. */ maxLength?: number; /** * Line breaks allowed. Absent: false. */ multiline?: boolean; } export interface RichTextSubField { key: FieldKey; type: "richText"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; } export interface NumberSubField { key: FieldKey; type: "number"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; /** * Whole numbers only. Absent: false. */ integer?: boolean; minimum?: number; maximum?: number; } export interface BooleanSubField { key: FieldKey; type: "boolean"; labels: FieldLabels; } export interface DateSubField { key: FieldKey; type: "date"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; } export interface UrlSubField { key: FieldKey; type: "url"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; } export interface ImageSubField { key: FieldKey; type: "image"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; } export interface SelectSubField { key: FieldKey; type: "select"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; /** * @minItems 1 * @maxItems 50 */ options: [FieldOption, ...FieldOption[]]; } export interface ReferenceSubField { key: FieldKey; type: "reference"; labels: FieldLabels; /** * Every item of an entry in review or published needs a value. Absent: false. */ requiredToPublish?: boolean; /** * The collections a target may belong to (checked in code). * * @minItems 1 * @maxItems 5 */ collections: | [Slug] | [Slug, Slug] | [Slug, Slug, Slug] | [Slug, Slug, Slug, Slug] | [Slug, Slug, Slug, Slug, Slug]; } /** * RFC-0042: a time gate every entry derives from one of its date or datetime fields, checked at render time like Availability.until. A date ends at the start of the next day in the site's time zone. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "CollectionExpiry". */ export interface CollectionExpiry { field: FieldKey; /** * unlist: the page stays, the entry leaves listings, feeds, the sitemap and search. hide: every public route answers 404. */ action: "unlist" | "hide"; /** * Grace after the field's instant. Absent: 0. */ afterMinutes?: number; } /** * RFC-0042: the JSON-LD type an entry page emits in place of BlogPosting, with its properties mapped to value sources. Paths, fitting field types and required properties are a closed table in code (@cloudhal/core-ts/structured-data). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "StructuredDataPreset". */ export interface StructuredDataPreset { type: "Event" | "JobPosting" | "Product" | "Recipe"; /** * Keyed by property path, e.g. startDate or location.address.addressLocality. */ properties: { [k: string]: StructuredDataSource | undefined; }; } /** * A typed field of this collection, converted by its type. */ export interface FieldValueSource { kind: "field"; field: FieldKey; } /** * A built-in property of the entry. */ export interface EntryValueSource { kind: "entry"; property: EntryValueProperty; } /** * A property of the site. */ export interface SiteValueSource { kind: "site"; property: SiteValueProperty; } /** * A plain-text constant: no control characters, no markup meaning; vocabulary-checked on enum paths (in code). */ export interface ConstantValueSource { kind: "constant"; value: string; } /** * Theme (a.k.a. Experience) applied by the renderer. Config is theme-defined and validated by the theme's own schema, not here. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "ThemeRef". */ export interface ThemeRef { name: Slug; version?: string; config?: { [k: string]: unknown | undefined; }; } /** * The site's design rules for people and agents (RFC-0021): Markdown that agents read with the theme's DESIGN.md before they build. Guidance only: it changes neither rendering nor permissions. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Design". */ export interface Design { markdown: string; } /** * The site's logo and social links (RFC-0025 §1), shared by the header, the footer and SEO. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Brand". */ export interface Brand { logo?: ImageRef; logoDark?: ImageRef; logoHeight?: "s" | "m" | "l"; /** * @maxItems 8 */ social?: | [] | [SocialLink] | [SocialLink, SocialLink] | [SocialLink, SocialLink, SocialLink] | [SocialLink, SocialLink, SocialLink, SocialLink] | [SocialLink, SocialLink, SocialLink, SocialLink, SocialLink] | [SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink] | [SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink] | [ SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, SocialLink, ]; } /** * Reference to an image. With `assetId` the image is an Asset node (RFC-0004): the store writes its media URL into `src`, and its size into `width` and `height`, as a fallback for readers that do not resolve assets. Without it, `src` is a relative path or an absolute URL, as before. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "ImageRef". */ export interface ImageRef { /** * Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles. */ assetId?: string; src: string; alt: string; width?: number; height?: number; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SocialLink". */ export interface SocialLink { network: | "x" | "bluesky" | "mastodon" | "github" | "linkedin" | "instagram" | "facebook" | "youtube" | "tiktok" | "threads" | "rss" | "email"; href: string; } /** * 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. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Chrome". */ export interface Chrome { header?: ChromeHeader; footer?: ChromeFooter; announcement?: Announcement; consent?: Consent; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "ChromeHeader". */ export interface ChromeHeader { layout?: "logo-left" | "logo-left-nav-center" | "centered" | "split" | "minimal"; behavior?: "static" | "sticky" | "hide-on-scroll" | "fixed"; shrink?: boolean; overHero?: "solid" | "transparent"; width?: "content" | "wide" | "full"; surface?: "plain" | "muted" | "raised" | "inverse" | "brand"; mobileStyle?: "dropdown" | "drawer-start" | "drawer-end" | "fullscreen"; collapseAt?: "sm" | "md" | "lg" | "always"; /** * Lower-case URL segment. */ nav?: string; /** * Lower-case URL segment. */ utility?: string; /** * @maxItems 3 */ actions?: [] | [HeaderAction] | [HeaderAction, HeaderAction] | [HeaderAction, HeaderAction, HeaderAction]; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "HeaderAction". */ export interface HeaderAction { kind: "button" | "search" | "locale" | "theme-toggle" | "motion-toggle"; label?: string; href?: string; variant?: "primary" | "secondary"; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "ChromeFooter". */ export interface ChromeFooter { layout?: "simple" | "columns" | "cta-band" | "minimal"; surface?: "plain" | "muted" | "inverse"; tagline?: string; /** * @maxItems 5 */ columns?: | [] | [FooterColumn] | [FooterColumn, FooterColumn] | [FooterColumn, FooterColumn, FooterColumn] | [FooterColumn, FooterColumn, FooterColumn, FooterColumn] | [FooterColumn, FooterColumn, FooterColumn, FooterColumn, FooterColumn]; ctaHeading?: string; ctaLabel?: string; ctaHref?: string; social?: boolean; /** * The legal line; {year} and {site} are the only placeholders. */ copyright?: string; /** * Lower-case URL segment. */ legal?: string; /** * @maxItems 3 */ extras?: | [] | ["locale" | "theme-toggle" | "motion-toggle"] | ["locale" | "theme-toggle" | "motion-toggle", "locale" | "theme-toggle" | "motion-toggle"] | [ "locale" | "theme-toggle" | "motion-toggle", "locale" | "theme-toggle" | "motion-toggle", "locale" | "theme-toggle" | "motion-toggle", ]; credit?: boolean; region?: Section; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FooterColumn". */ export interface FooterColumn { heading: string; /** * Lower-case URL segment. */ menu: string; } export interface HeroSection { id: Id; kind: "hero"; heading: string; subheading?: string; image?: ImageRef; cta?: Link; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Link". */ export interface Link { label: string; href: string; external?: boolean; } export interface RichTextSection { id: Id; kind: "richText"; format: "markdown" | "html"; body: string; profile?: BodyProfile; blocks?: BodyBlocks; } /** * 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. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "BodyBlock". */ export interface BodyBlock { /** * Stable across writes that keep the block's content or its place among unchanged blocks. */ id: string; /** * SHA-256 (hex) of the block's markdown without trailing whitespace. */ hash: string; by?: Actor; /** * The channel of that change. */ via?: "studio" | "mcp" | "api" | "import" | "ai-command" | "proposal"; at?: Timestamp; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Actor". */ export interface Actor { kind: ActorKind; id: Id; name?: string; } export interface ImageSection { id: Id; kind: "image"; image: ImageRef; caption?: string; } /** * Renders the newest entries of a content collection (e.g. blog posts). */ export interface ContentListSection { id: Id; kind: "contentList"; collection: Slug; limit: number; sort: "newest" | "oldest" | "title"; /** * Filter expression over term assignments (RFC-0002), e.g. 'category:news+tag:ai' or 'category:news>*'. */ filter?: string; /** * RFC-0042: conditions on the collection's list fields, ANDed. * * @minItems 1 * @maxItems 4 */ where?: | [FieldCondition] | [FieldCondition, FieldCondition] | [FieldCondition, FieldCondition, FieldCondition] | [FieldCondition, FieldCondition, FieldCondition, FieldCondition]; orderBy?: FieldOrder; } /** * RFC-0042: order a listing by a number, date or datetime field. Entries without a value sort last. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "FieldOrder". */ export interface FieldOrder { /** * A field key (site.schema.json FieldKey's pattern, repeated). */ field: string; direction: "asc" | "desc"; } /** * A typed block from the block registry (RFC-0015): `type` names a registered block type (one global namespace of English names), `props` follow that type's props schema, which the store validates. */ export interface ComponentSection { id: Id; kind: "component"; type: string; /** * Validated against the type's props schema by the store, not by this contract. */ props: { [k: string]: unknown | undefined; }; } /** * A generative UI surface (RFC-0020): a flat list of catalog components with a `root`, plus a data model their props may bind to. Written and streamed by agents as data, never code; the store checks the tree, the catalog and the limits. */ export interface SurfaceSection { id: Id; kind: "surface"; /** * The catalog the surface was written for: `@` (RFC-0018 manifest). */ catalog: string; /** * @minItems 1 * @maxItems 200 */ components: [SurfaceComponent, ...SurfaceComponent[]]; /** * The surface's data model: JSON its components bind to with `{path}` (at most 64 KB serialized; the store enforces the size). */ data?: { [k: string]: unknown | undefined; }; } /** * One element of a generative UI surface (RFC-0020 §1), in a flat list: `component` names a catalog entry (a PascalCase built-in primitive such as `Stack`, or a registry block type such as `callout`), `children` refer to other ids of the same surface, and `props` follow the entry's schema, which the store checks. Field names follow A2UI v0.9. * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "SurfaceComponent". */ export interface SurfaceComponent { id: SurfaceComponentId; component: string; /** * @maxItems 200 */ children?: SurfaceComponentId[]; /** * Literal values, `{path}` bindings into the surface's data, or `{call}` named functions; validated by the store against the catalog, not by this contract. */ props?: { [k: string]: unknown | undefined; }; /** * A visibility condition over the surface's data (`eq`, `ne`, `gt`, `lt`, `and`, `or`, `not`); validated by the store. */ visible?: { [k: string]: unknown | undefined; }; /** * Motion presets for this component (RFC-0024 §2): `reveal`, `hover`, `speed`, `delay`, `stagger`, `replay` and later `scroll`, `loop`; enums and clamped numbers only, validated by the store against the catalog. The renderer turns them into CSS; agents never write CSS. */ motion?: { [k: string]: unknown | undefined; }; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Announcement". */ export interface Announcement { /** * Change it when the text changes, so readers who dismissed the old one see the new one. */ id: string; text: string; label?: string; href?: string; tone?: "info" | "brand" | "warning"; dismissible?: boolean; } /** * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Consent". */ export interface Consent { mode: "none" | "notice" | "choices"; policy?: Path; } /** * Free-form string-to-string map for extensions. Keys should be namespaced (e.g. cloudhal.source). * * This interface was referenced by `Site`'s JSON-Schema * via the `definition` "Metadata". */ export interface Metadata { [k: string]: string | undefined; }