Skip to content

Cloudhal 0.4.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 21:07
· 90 commits to main since this release
Immutable release. Only release title and notes can be modified.
bcd6105

All @cloudhal/* packages and create-cloudhal at 0.4.0.

Changes

  • First-class collections, step 1 (RFC-0040 / ADR-0042). Site.collections.<key> takes optional labels (singular and plural per locale), icon, feed, sitemap and sort next to permalink, with at most 50 collections per site. SiteGraphStore.listCollections(siteId) returns the registry: declared collections, those inferred from existing entries, and posts, with entry counts per status. The new @cloudhal/core-ts/collections subpath adds collectionLabel and collectionSettings for themes. Nothing changes for existing sites.
  • First-class collections, step 2 (RFC-0040 / ADR-0042).
    • Store: the first entry of a new collection is refused (path_conflict, reserved_path) when its default prefix /<collection> overlaps another collection's permalink, a taxonomy archive, /search or a locale prefix. This closes the gap RFC-0038 left. A site update that declares a new collection runs the same check, and a declared collection that still has entries, or that a taxonomy names, cannot be undeclared (collection_in_use).

    • API: new routes under /api/sites/:id/collections:

      • GET (content:read) lists the registry;
      • PUT /:key { settings, rev } declares or changes a collection (site:settings), with ?dryRun=1;
      • DELETE /:key?rev= undeclares an empty one.

      Creating an entry in a collection outside the registry is refused with collection_undeclared (422).

    • Renderer: RSS feeds leave out collections with feed: false, and sitemap.xml leaves out those with sitemap: false. The defaults are unchanged. collectionLabel and collectionSettings are re-exported from ./routing for themes.

    • MCP: resetting a permalink with set_collection_permalink keeps the collection declared. Agents get hints for the new error codes.

Patch Changes

  • MCP collection tools (RFC-0040 step 4):
    • list_collections (content:read) lists every collection with its names, icon, entry counts by status, permalink, feed, sitemap and sort settings, and the taxonomies that apply.
    • create_collection declares a collection. It needs names in the default locale and optionally takes an icon, permalink, feed, sitemap and sort.
    • update_collection changes a collection's names (merged by locale), icon, feed, sitemap or sort.
    • Both write tools need site:write and wait for a person in every mode, and that person must hold site:settings. Overlaps, duplicates and missing names are refused before anyone is asked; dryRun checks without asking.
    • create_entry now refuses a collection outside the registry (collection_undeclared) and points to create_collection. Collections that already have entries keep working.

Patch Changes

  • First-class collections, step 2 (RFC-0040 / ADR-0042).
    • Store: the first entry of a new collection is refused (path_conflict, reserved_path) when its default prefix /<collection> overlaps another collection's permalink, a taxonomy archive, /search or a locale prefix. This closes the gap RFC-0038 left. A site update that declares a new collection runs the same check, and a declared collection that still has entries, or that a taxonomy names, cannot be undeclared (collection_in_use).

    • API: new routes under /api/sites/:id/collections:

      • GET (content:read) lists the registry;
      • PUT /:key { settings, rev } declares or changes a collection (site:settings), with ?dryRun=1;
      • DELETE /:key?rev= undeclares an empty one.

      Creating an entry in a collection outside the registry is refused with collection_undeclared (422).

    • Renderer: RSS feeds leave out collections with feed: false, and sitemap.xml leaves out those with sitemap: false. The defaults are unchanged. collectionLabel and collectionSettings are re-exported from ./routing for themes.

    • MCP: resetting a permalink with set_collection_permalink keeps the collection declared. Agents get hints for the new error codes.

  • Studio: first-class collections (RFC-0040 step 3).
    • Sidebar: lists every collection of the site, declared ones and those that agents or imports filled. Each shows its name in Studio's language, its icon and its entry count, followed by Collections.
    • Collections screen: shows each collection's address, entry count and whether it is named. It has a New collection dialog with plural and singular name, key, icon and address, and the API checks the address for overlaps.
    • Collection list: each collection gets the Articles list (/collections/<key>, where /articles now redirects). Category and tag columns and filters appear only where those taxonomies apply.
    • Collection settings: names in every site language, icon, RSS feed, sitemap, default order, and which categories and tags apply.
    • Editor: its breadcrumb leads back to the entry's own collection.
    • Elsewhere: the comments queue, the language review options and the taxonomy dialog cover every collection.
    • Translations: new strings in all 19 languages; every language except English is an AI draft awaiting review.

Patch Changes

  • render_page on Node: a Chrome that hangs or crashes on a cold start is launched once more with a fresh profile instead of failing the render.
  • Studio loads about 32 kB (gzip) less before the first screen: the notification panel's items, the agent-mode and elevation views and the taxonomy helpers now load when they are needed.

Upgrade

npm install @cloudhal/cli@0.4.0 @cloudhal/core-ts@0.4.0 @cloudhal/astro-renderer@0.4.0 @cloudhal/cloudflare@0.4.0
npx cloudhal deploy

Docs: https://cloudhal.dev/docs/start/installation#upgrading