Echo/Docs

CLI command

content review

Approval before publishing: a blog surface can require that each post's current revision is approved before it is published, with every request, approval and rejection recorded with who made it.

Invocation#

Shell
echo-cli content review require --surface <surface-slug> --by <who> | waive --surface <surface-slug> | policies | request --post <post-id> --by <who> [--note <text>] | approve --post <post-id> --by <who> [--note <text>] | reject --post <post-id> --by <who> --note <text> | history --post <post-id>

Inputs and output#

require and waive write the policy (surface_slug, required_by, required_at); policies writes { policies } by surface. request, approve and reject write the transition: id, post_id, revision_number (the post's current revision), state (requested, approved or rejected), actor, note and at. history writes { history }, the post's transitions oldest first.

State effect#

Every verb calls Echo Web's authenticated /api/analytics/reviews-content with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Review before publishing section of the blog admin and of Echo Desktop's GEO screen call the same operations, and echo-mcp runs them as echo_content_review_require, echo_content_review_waive, echo_content_review_policies, echo_content_request, echo_content_approve, echo_content_reject and echo_content_review_history. Policies are kept in content_review_policies, transitions in blog_post_reviews. Before a post of a surface requiring review is published — by the blog admin's publish button or by an approved publish_blog_post in the approval queue — the latest transition of its current revision must be an approval; editing the post makes a new revision, which needs its own. Approving a publish_blog_post request does not approve the post's content: that is this review's approve. A surface that does not require review publishes as before.

Refusals#

  • A wrong invocation is refused before anything is sent: "content review takes <every verb's usage, separated by semicolons>; got <word>", "content review <verb> does not take <flag>; it takes …", "<flag> needs a value" and "content review <verb> needs <flag>".
  • Echo Web answers a bad request with "surface is required: the blog surface whose posts need approval before publishing", "post_id is required: the blog post under review", "verb must be one of request, approve, reject; got <value>", "note is required to reject: what has to change before the post can be approved" or "surface is required: the surface that no longer requires review"; not found with "no blog surface is named <slug>", "no blog post has id <id>" or "<surface> does not require review; echo-cli content review policies lists those that do"; and a conflict with "revision <n> of post <id> is already <state> by <actor>". Publishing an unapproved post of such a surface is refused — by the blog admin as a conflict starting "not published:", by the approval queue as the failed action — with "post <id> revision <n> is never reviewed, and <surface> requires approval; echo-cli content review approve --post <id> --by <who> approves it", or naming the requested or rejected state and its actor instead of never reviewed. The command prints Echo Web's sentence and exits 1.