Skip to content

WordPress plugin v0.2.0: @state.content + GitHub-releases self-updater#6

Open
webdevtodayjason wants to merge 2 commits into
mainfrom
wp/state-content
Open

WordPress plugin v0.2.0: @state.content + GitHub-releases self-updater#6
webdevtodayjason wants to merge 2 commits into
mainfrom
wp/state-content

Conversation

@webdevtodayjason

Copy link
Copy Markdown
Contributor

What

WordPress plugin v0.2.0 — post .agent views now carry the page's real content. @state.content is the block-rendered (do_blocks, not the_content), tag-stripped, word-boundary-preserving body — ~220-word cap with an ellipsis marker, omitted when empty — so Gutenberg / Divi 5 / classic pages carry content, not just a 40-word excerpt.

Changes (avl-agent-view-layer.php, readme.txt)

  • avl_wp_rendered_text(): memoized per post; password-gated (surface-equivalence, spec §10.5); strips—not-runs—shortcodes; new avl_agent_view_rendered_text filter so membership/visibility plugins can redact (AVL renders blocks directly, bypassing the the_content chain).
  • Excerpt: block-aware fallback, 40-word cap, de-duped (auto-excerpt dropped when @state.content is present; author-written excerpt kept), single entity decode.
  • @context: neutral line for password-protected posts (no publish-date leak).
  • avl_wp_scalar: quotes strings that would otherwise parse back as bool / number / null.
  • @state.taxonomies: term names HTML-entity decoded.
  • Version 0.1.0 → 0.2.0 + changelog.

Verification

Local Docker WP loop (plugins/WordPress/scripts): avl validate --level L3 clean, test-plugin.sh passing. Reviewed by a 3-lens adversarial pass (security / conformance / regression): 10 findings fixed, 5 owned as follow-ups (protected-post dates, dynamic-nav-blocks-in-body, cross-adapter body-field naming, CJK cap, centralizing the password gate).

Out of scope

GitHub-releases updater, other CMS adapters, spec changes, nlbbs.net prod re-baseline.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FLHUJBz8p4pxPf5ssBUgcu

webdevtodayjason and others added 2 commits June 27, 2026 08:11
…ty fixes

Post agent views now carry the page's real content. @state.content is the
block-rendered (do_blocks, not the_content), tag-stripped, word-boundary-preserving
body — ~220-word cap with an ellipsis marker, omitted when empty — so Gutenberg /
Divi 5 / classic pages carry content, not just a 40-word excerpt.

- avl_wp_rendered_text(): memoized per post; password-gated (surface-equivalence,
  spec 10.5); strips—not-runs—shortcodes; new avl_agent_view_rendered_text filter
  so membership/visibility plugins can redact (AVL renders blocks directly and
  bypasses the the_content filter chain).
- Excerpt: block-aware fallback, 40-word cap, de-duped (auto-excerpt dropped when
  @state.content is present; author-written excerpt kept), single entity decode.
- @context: neutral line for password-protected posts (no publish-date leak).
- avl_wp_scalar: quote strings that would otherwise parse back as bool/number/null.
- @state.taxonomies: term names HTML-entity decoded.

Verified on a local Docker WP loop: `avl validate --level L3` clean, scripts/
test-plugin.sh passing. Reviewed by a 3-lens adversarial pass (security /
conformance / regression): 10 findings fixed, 5 owned as follow-ups.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FLHUJBz8p4pxPf5ssBUgcu
Bundles Plugin Update Checker v5.7 under lib/ and wires it to this repo's GitHub
releases so the Plugins screen offers "Update Now" for new AVL builds:

- Release-asset mode (REQUIRE_RELEASE_ASSETS): installs the built
  avl-agent-view-layer.zip, never the whole-monorepo source zipball.
- Per-plugin release filter (tag prefix avl-wp-v) so monorepo releases (v1.0.0)
  are ignored; a request_info_result filter strips the prefix so version_compare
  sees a clean semver (a subdir plugin defeats PUC's repo-root header read).
- Update URI header.
- package.sh: keep PUC's bundled Parsedown (only strip a top-level vendor/).
- .github/workflows/wp-plugin-release.yml: on an avl-wp-v* tag, build the zip and
  create the GitHub Release with the asset attached; guards header Version == tag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FLHUJBz8p4pxPf5ssBUgcu
@webdevtodayjason webdevtodayjason changed the title WordPress plugin v0.2.0: block-rendered @state.content + safety/quality fixes WordPress plugin v0.2.0: @state.content + GitHub-releases self-updater Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant