| 开发者 | stephen1204paul |
|---|---|
| 更新时间 | 2026年10月14日 09:14 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
core/* module that runs on every site, and a
WooCommerce module that wires in automatically when WooCommerce is active. Neither one trusts a
tool's own "read-only" or "safe" label; classification comes from the plugin's own policy map.
Capability packs and tiers
Every governed ability maps to a tier: reversible (read), side-effecting (write), or
irreversible (delete, refund, cancel). A capability pack is a named, scoped view of the verb
catalog for one identity — a WordPress application password, a user or role, or a WooCommerce
REST API key — with an allow list, a hard-denied tier class, a per-tier approval requirement, and
optional rate and spend limits. A credential with no explicit binding falls back to a safe
default pack rather than inheriting full access.
Human approval
When a pack requires approval for a tier (the starter packs do for irreversible calls), a call
at that tier doesn't execute. It is queued under Tools → Pending Agent Actions for a human
to approve or reject. When an
Approval is requested, Belayline Agent Governance captures a fingerprint of the target's current state; when
the approval is claimed, it re-checks that fingerprint. A mismatch means the target changed
between request and claim, so the old approval is marked stale and a fresh request is filed. This
narrows the gap between a human's approval and the write — it does not close it, because the
short window between claiming an approval and executing the call still exists.
Self-service approval status
An agent can call belayline/check-approval with an approval_id to poll its own request
without a human in the loop. It reports a reduced, public status (pending, approved, rejected,
expired, used, or superseded) and a plain-English next_action, and never returns the approver's
identity, the original arguments, or any token.
Hash-chained audit log
Every gate decision and executed action is appended to an append-only, hash-chained log under
Tools → Agent Audit Log, with a tamper-evidence check that re-verifies the chain on load.
Core coverage
Governs the three abilities WordPress core registers today. Any other core/* ability is denied
until Belayline Agent Governance maps it, so future core write abilities fail closed rather than run
ungoverned.
WooCommerce coverage
When WooCommerce is active, Belayline Agent Governance governs exactly these 16 abilities:
woocommerce/products-listwoocommerce/products-getwoocommerce/products-createwoocommerce/products-updatewoocommerce/products-deletewoocommerce/products-querywoocommerce/product-createwoocommerce/product-updatewoocommerce/product-deletewoocommerce/orders-listwoocommerce/orders-getwoocommerce/orders-createwoocommerce/orders-updatewoocommerce/orders-querywoocommerce/order-add-notewoocommerce/order-update-statuswoocommerce/ is refused as an unknown verb. Deleting a product with
force: true is classed irreversible; a plain delete (trash) is side-effecting.
Which MCP endpoint to use
WooCommerce's own MCP endpoint (/wp-json/woocommerce/mcp) is deprecated by WooCommerce itself,
which points clients at the shared mcp-adapter server instead. Belayline Agent Governance governs both the
same way, through the ability permission check, but the two endpoints don't expose the same
information to an agent:
mcp-adapter server, an agent that hits approval_required gets the full error
data, including approval_id, and can call belayline/check-approval to poll it.mcp-adapter 0.3.0 only forwards the error message
text to the client, not the structured error data. An agent sees the message "needs human
approval" but not the approval_id, and belayline/check-approval isn't reachable on that
transport at all — the approval still exists and is visible on the Pending Actions page, but
the agent can't self-serve it.wp_get_environment_type() === 'production', WordPress's own default) never default to shadow mode and cap any shadow window at
24 hours.
Multisite
WordPress multisite is not supported. Activation is refused on a multisite install, network-wide
or per site.
/wp-content/plugins/belayline-agent-governance, or install it through the Plugins
screen.No. The plugin is WordPress-general and governs the core Abilities API on any site. WooCommerce support is a self-contained module that loads only when WooCommerce is active.
No. Activation is refused on a multisite install, both network-wide and per site.
It's governed the same way as the shared mcp-adapter server, but WooCommerce's bundled
mcp-adapter version doesn't forward the structured approval_required error data to the client,
so an agent on that endpoint can see the approval message but not the approval_id, and can't
reach belayline/check-approval. See the Description for details. We recommend the shared
mcp-adapter server; WooCommerce's own endpoint is supported while WooCommerce continues to ship
it.
Nothing, by default. Deleting the plugin from the Plugins screen leaves the audit log, approval
tables, and plugin options in place, because the audit log is a tamper-evident security record.
To have uninstall remove everything (all three tables, every option, every scheduled cron event),
define BELAYLINE_REMOVE_DATA as true (for example in wp-config.php) before deleting the
plugin.
By whichever credential authenticated the request: a WordPress application password, a logged-in user or their role, or — when WooCommerce is active — the WooCommerce REST API key used to authenticate the request. Each is bound to a capability pack independently under Tools → Agent Capability Packs.
belayline-agent-governance, and a belayline_ prefix for hooks, options and tables.agent-safety folder, then
install this one. Deleting the old plugin keeps your tables and settings unless
BELAYLINE_REMOVE_DATA is defined as true in wp-config.php, so they carry over.core/* module narrowed to the three abilities WordPress core actually registers
(get-site-info, get-user-info, get-environment-info); any other core/* ability is now
refused as an unknown verb instead of matching a speculative merge-proposal verb.woocommerce/ is refused.woocommerce/product-delete is now side-effecting, and irreversible only with force: true,
matching products-delete.belayline/check-approval lets an agent poll the
status of its own pending request.belayline_grants.