Skip to main content

Module capability

Module capability 

Source
Expand description

Pure capability-card verification primitives, shared by the CLI (treeship verify-capability) and the WASM verifier (browser receipt viewer) so both agree by construction. No I/O: callers supply the parsed card, the action statements, and the trust roots.

See docs/specs/agent-capability-cards.md. The honest contract holds here too: this checks consistency over captured evidence (the actions the caller passes in), never completeness.

Functionsยง

action_in_scope
Is an action within a declared capability set? Checks the action label and the optional meta.tool against each declared capability (exact, or a family.* glob).
declared_tools
Extract the declared capabilities.tools from an agent_card.v1 payload.
is_key_bound
A card is key-bound only when its keyid is the envelope signer AND that key is pinned under AgentCert. Anything else is self-asserted.
matched_capability
The first declared capability an action matches, if any. Same matching as action_in_scope, but returns which capability matched, so callers can grade each declared capability by whether captured receipts exercise it.
tool_matches
family.* matches family.write; otherwise an exact match. A bare * matches anything.