module.editorial
Versioned editorial review and publication workflows.
@lssm-tech/module.editorialbun add @lssm-tech/module.editorialManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
Bind ten standard editorial operations (plus optional listing, recovery discovery and reviewed preparation resume) into an existing ContractSpec registry with registerEditorialOperations. The module composes only library contracts and runtimes; publishers and storage are supplied by the host bundle.
Create → revise → submit → review → schedule → publish. Every accepted revision has immutable history. Edits invalidate review and scheduling. Publication claims the record with CAS before calling an injected CMS or social publisher; unknown outcomes are reconciled without re-dispatch. Published items require a separate withdrawal workflow before removal.
The authority port verifies current actor rights, review evidence, brand claims, asset rights and destination access. The host supplies HandlerCtx authentication and scoped approval receipts for publication. No default permitting authority or publication provider is supplied. The SQL store lives in growth-persistence/marketing.
/marketing/editorial/due lists bounded scheduled work due at the server clock. Discovery and individual records require read authorization; invalid scope/schedule output is rejected. It does not invoke publication or imply publication approval.
The optional /marketing/editorial/recovery REST/MCP operation is registered only when the injected store implements listRecovery. It discovers unsettled claims for the existing reconcile operation; minimum age defaults to 60 seconds.
The optional /marketing/editorial/resume-preparation command is registered only for publishers advertising preparation recovery. Fresh exact-input approval is mandatory; it does not change ordinary reconciliation into a write-capable action.
/marketing/editorial/list and editorial_list are available when the store implements listPage. Discovery is read-only and supports agent/workspace browsing without a known record ID.
The revise handler maps a runtime revision conflict to the canonical REVISION_CONFLICT response (409), including conflicts at the compare-and-swap write.
Submission revision conflicts now use canonical HTTP 409 responses, matching revision-save conflict behavior.
Review decision revision conflicts are mapped to canonical HTTP 409 without weakening reviewer/current-authority checks.
Scheduling revision conflicts return canonical HTTP 409 responses.
Existing editorial creation IDs now return canonical ALREADY_EXISTS / HTTP 409 without changing the stored record.
Archival revision conflicts use canonical HTTP 409. Provider withdrawal remains a separate workflow for published or uncertain content.
History REST/MCP registration is conditional on store.listHistory. Missing support remains unavailable.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
4 declarations
@lssm-tech/lib.contracts-runtime-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.growth-specworkspace:^
Read the package manual ↗@lssm-tech/lib.growth-runtimeworkspace:^
Read the package manual ↗
Declared capabilities
Reusable editorial workflow module.
Scripts
buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typeslint:checknode ../../../../scripts/biome.cjs check .prebuildcontractspec-bun-build prebuildtestbun testtypechecktsgo --noEmitpublish:pkgbun publish --tolerate-republish --ignore-scripts --verbose