Alex Dunmow
e663b77b47
content: add Content.ListPosts capability for blog listing
...
Adds ListPosts(ctx, ListPostsParams) to the content.Content capability so
wasm plugins can list posts with bodies — the per-plugin Postgres role
denies direct public.blog_posts reads (42501) and GetPost only fetches a
single post's metadata. Extends PostInfo with Body, AuthorName, AuthorSlug
and PublishedAt (additive; existing get_post golden unchanged). Wires all
layers: interface, ABI PostInfo/ContentListPosts{Request,Response} messages
(buf breaking clean), guest stub, and a deterministic content_list_posts
golden replayed by the cms host parity test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 01:00:14 +08:00
Alex Dunmow
704b046727
feat(abi): wasm plugin ABI protobuf schema v1 (WO-WZ-001)
...
Defines the host<->guest wire contract for the .so -> wazero migration as a
repo-local buf module (abi/proto/v1, generated Go in abi/v1):
- manifest.proto: PluginManifest mirroring every static field of
plugin.PluginRegistration (abi_version, deps, block/template registrations,
admin pages, settings schema, theme presets, fonts, master pages, AI
actions, RBAC method roles, CSS manifest, icon packs, directory
extensions, job types, RAG fetcher types, settings panel, hook flags,
core service bindings)
- invoke.proto: bn_invoke envelope, Hook catalog (RENDER_BLOCK,
RENDER_TEMPLATE, HANDLE_HTTP, JOB, LOAD, UNLOAD, RAG_FETCH, MEDIA_HOOK,
DESCRIBE), AbiError, and job/lifecycle/rag/media/describe payloads
- render.proto: RenderBlock/RenderTemplate payloads + RenderContext
enumerating every ctx value from blocks/context.go (incl. BlockContext 1:1)
- http.proto: buffered HttpRequest/HttpResponse for HANDLE_HTTP
- db.proto: guest sql-driver messages (DbValue oneof over pgx-mappable
types, query/exec/tx with host-side tx handles, SQLSTATE-carrying DbError)
- capability.proto: HostCall envelope + one request/response pair per
CoreServices interface method (content, settings+update, gating, crypto,
menus, datasources, users, subscriptions, media.deposit, email.send,
ai.text_call, ai.tools.register, bridge, jobs.submit, embeddings, rag,
reviews, badges.refresh)
The abi/ buf module is deliberately separate from the repo-root config:
proto/ is the shared block/proto submodule (service API contracts); the ABI
is SDK-internal and versions in lockstep with the guest shim. New `make abi`
target runs buf lint + generate. docs/wasm-abi.md documents the ptr+len
calling convention (bn_alloc, bn_invoke, packed u64), hook catalog, error
semantics, abi_version evolution rules, and the full registration/
CoreServices coverage tables.
Verified: `cd abi && buf lint` exit 0; `go build ./...` exit 0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 12:47:00 +08:00