docs: agent storefront deployment — admission validity backbone + typed MCP front door#710
Draft
bussyjd wants to merge 1 commit into
Draft
Conversation
…ed MCP front door Stacks on proposal/multistore-storefront-routing. Lets a permissioned obol-stack agent deploy/manage storefront offers with structured design + metadata control, plan/apply semantics, and — the load-bearing part — validity enforced at ADMISSION for every writer. Split after adversarial review (3 reviewers vs be0a237, all cites re-verified): (1) a ValidatingWebhookConfiguration is the validity backbone — it runs price-required / cross-offer path first-claimant / grant-bound / logo checks synchronously at write time for the CLI, the existing raw-agent apiserver path (monetize.py POSTs offers today with zero validation), and the MCP alike; a webhook (unlike the CEL-only VAP already in-tree, which cannot list other objects) can do the cross-object lookups. (2) storefront-mcp is the ergonomic layer on top: 9 typed tools (whoami/list/get/plan/apply/status/preview_landing/set_profile/retire), grant-scoped via a StorefrontGrant CRD + minted bearer token, whose unique value over 'just kubectl --dry-run=server' is rendered buyer-byte preview, charter discovery, and convergence probes. Design control is structured tokens (template enum + accent + bounded hero copy + icon), never agent-supplied HTML — with a copy-safe reject-not-mangle validator (the existing sanitizeDisplayToken allowlist is identifier-scoped and would strip spaces). Includes machine-readable storefront-mcp-tools.json and phasing where Phase 0 (webhook + in-cluster offer record, no orphaning on stack up) delivers the robustness win with no MCP at all. Claude-Session: https://claude.ai/code/session_01VquWN9UMaSHH7MHGcG8bw1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lets a permissioned obol-stack agent deploy and manage storefront offers — spec,
pricing, metadata, and structured design — with plan/apply semantics, and with
validity enforced at admission for every writer. Two files:
docs/proposals/storefront-mcp-surface.md+ a machine-readabledocs/proposals/storefront-mcp-tools.json.The core idea (two parts)
Agents can already create ServiceOffers — the mother agent via
obol-agent-monetize-rbac.yaml:52, and thesellskill POSTs raw CRs at theapiserver from inside the pod (
monetize.py:472). What's missing on that path isany validation at all: the CLI's path-conflict/price checks are
package main,unexported, never run for a non-CLI writer, and
price: {}is admitted and gates at$0 (
payment.go:141,serviceoffer-crd.yaml:192-221).ValidatingWebhookConfiguration. Runs the full battery(price-required, cross-offer path first-claimant, grant bounds, reserved paths,
logo/contact, design tokens) synchronously at write time, for the CLI, the raw
agent path, and the MCP alike. A webhook — unlike the CEL-only VAP already
in-tree, which "cannot list other cluster objects" (
pathconflict.go:17) — can dothe cross-object lookups. This is what makes deployment predictable-to-be-valid;
it needs no MCP to land (Phase 0).
storefront-mcp. 9 typed tools(
whoami/list/get/plan/apply/status/preview_landing/set_profile/retire),grant-scoped via a
StorefrontGrantCRD + minted bearer token. Its unique valueover "just
kubectl apply --dry-run=server" is what a webhook can't give:rendered buyer-byte preview of landing/openapi/402, charter discovery, and
convergence probes (applied ≠ serving).
Structured design control
A
spec.designblock:templateenum +accenthex + boundedheroTitle/heroTagline+icon— tokens, never agent-supplied HTML (predictability +injection surface). Copy is HTML-escaped on render with a reject-not-mangle validator
(the existing
sanitizeDisplayTokenallowlist is identifier-scoped and would stripspaces from every real title). Renders via the existing controller ConfigMap/route
machinery (
catalog.go,scalar_html.go) and threadsaccent/iconthroughRouteRule → PaymentDisplay— turning the 402 page's hand-mirrored palette(
paymentrequired.go:278) into data.Reviewed
Drafted, then adversarially reviewed by 3 independent reviewers vs
be0a237(trustmodel / code-fact accuracy / agent ergonomics). The review reshaped it: the original
MCP-broker-only framing was replaced by the webhook+MCP split above (a maintainer's
first question is "why not native primitives?" — §2 answers it head-on), RBAC honesty
(the MCP SA is necessarily cluster-scoped; tenant isolation is webhook/app logic, not
RBAC), the resume-ledger orphaning fix moved into Phase 0 (an in-cluster offer record
so MCP-created offers survive
stack up),validatefolded intoplan --dry-run,the design-copy sanitizer corrected, and every flagged citation fixed
(
obol sell approve/gas preflight don't exist yet; auth.go 55/69; crd 192-221).Phasing
Phase 0 = webhook + in-cluster record + grant CRD (robustness win, no MCP).
Phase 1 = the MCP server + tools. Phase 2 = design render + preview (needs parent
P1 origins). Phase 3 = registration approvals + token rotation.
https://claude.ai/code/session_01VquWN9UMaSHH7MHGcG8bw1