Skip to content

Validate and prepare distribution

Delivery review answers one question: is this exact artifact bundle, with these exact destination variants, ready to ask a human to approve?

Validate the artifact bundle

Invoke creator.validate_delivery@1.0.0 with the accepted brief, generic artifact manifest, matching publication profile and synthesis, and proposed channel plan.

The review separates blocking findings from advisory findings and reports five top-level checks:

Check Protects against
Identity match Wrong brief, revision, artifact, organization, or publication
Required-attestation coverage Missing or failed checks declared by the brief
Source-claim traceability Unsupported or omitted factual claims
Brand constraints Wrong profile, prohibited claims, or unapproved channels
Artifact integrity Missing or invalid byte-digest proof

Understand the approval digest

The digest includes:

brief ID + brief digest + revision
artifact references + artifact digests
artifact manifest ID + manifest digest
channel-plan digest, including every destination variant
selected artifact references + content + accessibility text + extension + schedule

Change any one of these and the earlier approval no longer applies.

Prepare proposals

Only a review with no blocking findings can enter creator.prepare_distribution@1.0.0. Each DistributionVariant becomes one ProposedPublicationOperation with:

  • explicit channel and typed destination;
  • only the artifact references selected for that destination;
  • a destination-specific ContentDocument;
  • optional accessibility text and opaque extension;
  • schedule;
  • exact required effects;
  • approval digest; and
  • deterministic idempotency key.

Runnable example

"""Validate a synthetic artifact bundle, then prepare—but do not execute—distribution."""

import json

from zeo_core.tools import invoke_sync

from zeo_creator.capabilities.prepare_distribution import (
    PrepareDistributionRequest,
    PrepareDistributionResponse,
)
from zeo_creator.capabilities.validate_delivery import (
    ValidateDeliveryRequest,
    ValidateDeliveryResponse,
)
from zeo_creator.registry import capability_registry
from zeo_creator.runtime import make_context


def main() -> None:
    registry = capability_registry()
    validate = registry.get("creator.validate_delivery@1.0.0")
    validate_request = ValidateDeliveryRequest.model_validate(
        validate.definition.examples[0].request
    )
    validation = invoke_sync(
        validate,
        validate_request,
        make_context(capability_name="validate_delivery"),
    )
    if not isinstance(validation.data, ValidateDeliveryResponse):
        raise RuntimeError(validation.human_message)

    review = validation.data.review
    if not review.ready_for_approval:
        raise RuntimeError("example artifact unexpectedly failed validation")

    prepare = registry.get("creator.prepare_distribution@1.0.0")
    preparation = invoke_sync(
        prepare,
        PrepareDistributionRequest(
            brief=validate_request.brief,
            manifest=validate_request.manifest,
            review=review,
            channel_plan=validate_request.channel_plan,
            created_at=validate_request.created_at,
        ),
        make_context(capability_name="prepare_distribution"),
    )
    if not isinstance(preparation.data, PrepareDistributionResponse):
        raise RuntimeError(preparation.human_message)

    print(
        json.dumps(
            {
                "ready_for_approval": review.ready_for_approval,
                "approval_digest": review.approval_digest,
                "proposals": [
                    {
                        "operation_id": item.operation_id,
                        "channel": item.channel,
                        "provider_kind": item.destination.provider_kind,
                        "selected_artifact_refs": item.selected_artifact_refs,
                        "idempotency_key": item.idempotency_key,
                    }
                    for item in preparation.data.operations
                ],
                "executed_operations": 0,
            },
            indent=2,
        )
    )


if __name__ == "__main__":
    main()
python -m zeo_creator.examples.validate_and_prepare

The example always reports "executed_operations": 0. Proposal construction has no provider-write effect.

Runtime handoff

After human approval, the controlling runtime must:

  1. verify the proposal is still current;
  2. resolve the referenced connection and destination;
  3. check organizational policy;
  4. mint exact, bounded write and external-communication authority;
  5. execute through an authorized connector;
  6. retain a secret-safe receipt; and
  7. reconcile the provider outcome.

None of those responsibilities should be moved into ZEO Creator to simplify a demo.

Exact email delivery

For email use creator.prepare_email_delivery@4.0.0 with an EmailMessagePlan, EmailMessageDraft, EmailEditorialReview, opaque audience snapshot and externally supplied preview/test receipts. Supply the exact EmailCampaignRelease, EmailExecutionContext, template mapping digest and preparation timestamp as well. The package binds subject, preheader, both body representations, links, sender/reply-to, audience, tracking, schedule intent, campaign and sequence revisions, review and compliance. Each change requires a new digest.

The digest is a proposed approval target, not proof of human approval. Draft, test, broadcast, sequence activation, enrolment, pause, cancellation and retirement require separate operation proposals. Runtime resolves the public Zeocore CapabilityId, verifies the operation schema digest and supported semantics, and authorizes each exact effect. See email marketing.