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.toolagainst each declared capability (exact, or afamily.*glob). - declared_
tools - Extract the declared
capabilities.toolsfrom an agent_card.v1 payload. - is_
key_ bound - A card is key-bound only when its
keyidis the envelope signer AND that key is pinned underAgentCert. 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.*matchesfamily.write; otherwise an exact match. A bare*matches anything.