Publication operations

6 operations named publication.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
publication.publishPublish the site: snapshot the draft (pages whose status is published, their trees, menus, collections with their published items, design system, settings, fonts) into a new live version, so the public site serves it.content.publishpublish
publication.activateMake an earlier published version of the site live again (roll back).versions.activatepublish
publication.rollbackPageRestore one page of the draft to how an earlier published version held it: its page fields, its tree and its scenes, through the tree commit, so an open editor replays it.site.editdestructive
publication.versionsList the site's published versions, newest first, limit of them (20 by default): each with its id (the versionId of publication.activate and publication.rollbackPage), its shortId (the first 8 characters, the id Pubblicazione e versioni shows: name a version to the person by it), its date (timestamp), its status, its note and whether it is the live one (isActive).site.readnone
publication.versionPagesList the pages of one published version: each with its id in that version (the pageId of publication.rollbackPage), its title and path, the draft page at the same path, and what a rollback of it would change in the draft (title, settings, content, animations; empty when the draft already matches).site.readnone
publication.pendingSay what changed since the live version, newest first: one entry per area (pages, designSystem, siteSettings, navigation, collections, fonts, ...) with the date of its latest draft edit and, for pages and collections, the changed rows.site.readnone

publication.publish

Publish the site: snapshot the draft (pages whose status is published, their trees, menus, collections with their published items, design system, settings, fonts) into a new live version, so the public site serves it. Run it alone in a batch with confirmed: ["publish"] and, as baseRevisions, the publishBaseRevisions of publication.pending (read the pending changes first, and publish what you read; a change after that read refuses it as stale); it cannot be dry-run. The answer is the new live version (shortId as Pubblicazione e versioni shows it) and changedAreas, the areas it changed against the version live before it (designSystem alone for a design-system-only change; empty when nothing changed); check the live result with render_preview target: "live". External effects (cache purge, screenshots) run after the commit.

permission: content.publishwrites: publication, pages, designSystem, settings, environment, apiConfig, fonts, brand, navigation, collectionsclass: externalconfirm: publishundo: explicit recovery

Example input

{
  "note": "Opening section and team page"
}

Input

FieldTypeRequiredNotes
notestringnoAt most 2000 characters.

Output

FieldTypeRequiredNotes
versionobjectyes
version.idstring (uuid)yes
version.shortIdstringyesAt least 8 characters. At most 8 characters.
version.timestampstringyes
version.statusstringyesOne of "building", "ready", "failed".
version.isActivebooleanyes
version.notestringno
version.hasScreenshotbooleanno
version.hasMultipleScreenshotsbooleanno
changedAreasarray of stringyes

A dry run refuses an external operation, so it has no dry-run line: run it alone in a batch.

publication.activate

Make an earlier published version of the site live again (roll back). Run it alone in a batch with confirmed: ["publish"]; check the live result with render_preview target: "live". External effects (cache purge, screenshots) run after the commit.

permission: versions.activatewrites: publication, pages, designSystem, settings, environment, apiConfig, fonts, brand, navigation, collectionsclass: externalconfirm: publishundo: explicit recovery

Example input

{
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
successtrueyes
versionIdstring (uuid)yes

A dry run refuses an external operation, so it has no dry-run line: run it alone in a batch.

publication.rollbackPage

Restore one page of the draft to how an earlier published version held it: its page fields, its tree and its scenes, through the tree commit, so an open editor replays it. A page the draft no longer has is recreated at the same slug and parent path. The rest of the site is unchanged; publish to serve it. Run it alone in a batch with confirmed: ["destructive"]. pageId is the version's page, so the batch locks pages only; to guard the draft tree it rewrites, also pass tree:<draft page id> in baseRevisions, and a stale one is refused with 409 stale_revision.

permission: site.editwrites: pagesclass: transactionconfirm: destructiveundo: explicit recovery

Example input

{
  "pageId": "6f1d2c3b-4a59-4e8d-9c7b-1a2b3c4d5e6f",
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character.
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
pageIdstringyesAt least 1 character.
treeRevisionintegeryesAt least 0.
recreatedbooleanyes

Needs confirmed: ["destructive"] on the batch, which the single-operation CLI form does not set: put it in a batch file and run yarn splash apply <file> --dry-run.

publication.versions

List the site's published versions, newest first, limit of them (20 by default): each with its id (the versionId of publication.activate and publication.rollbackPage), its shortId (the first 8 characters, the id Pubblicazione e versioni shows: name a version to the person by it), its date (timestamp), its status, its note and whether it is the live one (isActive). Read the pages of one with publication.versionPages.

permission: site.readreads onlyclass: read

Example input

{
  "limit": 10
}

Input

FieldTypeRequiredNotes
limitintegernoAt least 1. At most 100. Default 20.

Output

FieldTypeRequiredNotes
versionsarray of objectyes
versions[].idstring (uuid)yes
versions[].shortIdstringyesAt least 8 characters. At most 8 characters.
versions[].timestampstringyes
versions[].statusstringyesOne of "building", "ready", "failed".
versions[].isActivebooleanyes
versions[].notestringno
versions[].hasScreenshotbooleanno
versions[].hasMultipleScreenshotsbooleanno

Try it

yarn splash publication.versions '{"limit":10}' --dry-run

publication.versionPages

List the pages of one published version: each with its id in that version (the pageId of publication.rollbackPage), its title and path, the draft page at the same path, and what a rollback of it would change in the draft (title, settings, content, animations; empty when the draft already matches).

permission: site.readreads onlyclass: read

Example input

{
  "versionId": "8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"
}

Input

FieldTypeRequiredNotes
versionIdstring (uuid)yes

Output

FieldTypeRequiredNotes
versionIdstring (uuid)yes
pagesarray of objectyes
pages[].idstringyesAt least 1 character.
pages[].kindstringyesOne of "page", "region", "template", "component".
pages[].titlestringyes
pages[].pathstringyes
pages[].draftobject | nullyes
pages[].changesarray of stringyes

Try it

yarn splash publication.versionPages '{"versionId":"8b9c0d1e-2f3a-4b4c-8d5e-6f7a8b9c0d1e"}' --dry-run

publication.pending

Say what changed since the live version, newest first: one entry per area (pages, designSystem, siteSettings, navigation, collections, fonts, ...) with the date of its latest draft edit and, for pages and collections, the changed rows. A changed page whose status is draft stays out of publication.publish until it is published itself; mark it with page.update. publishBaseRevisions is the baseRevisions record a publication.publish batch needs, as it is now: pass it unchanged, and a draft edit made after this read refuses the publish as stale.

permission: site.readreads onlyclass: read

Example input

{}

Input

The input is a record; see the schema below.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
neverPublishedbooleanyes
publishedAtstring (date-time) | nullyes
areasarray of objectyes
areas[].areastringyesOne of "pages", "designSystem", "siteSettings", "brandIdentity", "envVariables", "apiConfigs", "animationScenes", "navigation", "collections", "fonts".
areas[].changedAtstring (date-time)yes
areas[].itemsarray of object | objectyes
publishBaseRevisionsrecord of integeryes

Try it

yarn splash publication.pending '{}' --dry-run

Generated from the operation registry and the MCP tool catalogue (source 2dc0cc9bd914bca4).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search