Expand description
Per-tenant cms_page_type seeding.
At boot time the framework hooks Cli::seed(rcms::ensure_seeded),
which fans out across every active Org and upserts one row per
PageTypeHandler registered via crate::register_page_type!
(or by hand via crate::PageTypeHandlerRegistration).
Idempotent — re-running on an already-seeded tenant overwrites
the metadata fields (verbose_name, default_template,
allowed_parent_types) but never touches the surrogate id, so
existing FKs from cms_page.page_type_id remain valid.
Structs§
- Tenant
Seeder - A host-registered per-tenant seeding pass.
Enums§
- Seed
Error - Errors from
ensure_seeded. Propagates the underlying tenancy / driver errors verbatim so callers can match on them.
Functions§
- ensure_
mcp_ skills - Seed (or reconcile) the built-in MCP skills for one tenant. Idempotent:
create_skill_poolis create-only, so onDuplicatewe reconcile by adding any tool rows a newer CMS version introduced (never removing — operator customizations survive); the skill↔permission mappings are idempotent upserts. - ensure_
seeded - Walk every active
Organd ensure the tenant has onecms_page_typerow per registeredPageTypeHandler. - ensure_
tenant_ seeded - Seed
orgif this process hasn’t yet. A tenant provisioned while the server runs — operator console, provisioning webhook,create-tenant— gets its tracked migrations but missed the boot-time seed, so it had no page types, roles or locale until a restart. One tenant is seeded at a time, and a second request for it waits rather than seeding again. - grant_
codename - Grant
codenameto the role namedrole_name, if it isn’t already. - seed_
tenant - Everything a tenant needs beyond its tracked migrations: registry rows for page, library and taxonomy types, themes, roles, the default locale, the ensure-only tables and columns, MCP skills and the host’s seeders. Idempotent. Run for every tenant at boot, and for a tenant provisioned while the server runs on its first request.
Type Aliases§
- Seed
Future - Boxed future returned by a
TenantSeeder.