Signed skill result envelope — provenance you can verify but not forge.
Envelope is a frozen return type: handlers (and later skill.tool) return
it,negotiate()serializes the wire dict as JSON, and callers verify the
Ed25519 signature over all metadata fields.
alg is reserved for a future HMAC mode; only Ed25519is accepted now.
skill.envelope
| Name | Type | Default | Description |
|---|---|---|---|
type
|
|
— | |
qualified_name
|
|
— | |
element_type
|
|
— | |
description
|
|
— | |
source_file
|
|
— | |
line_number
|
|
— | |
is_autodoc
|
|
— | |
autodoc_element
|
|
— | |
_autodoc_template
|
|
— | |
_autodoc_url_path
|
|
— | |
_autodoc_page_type
|
|
— | |
title
|
|
— | |
doc_content_hash
|
|
— |
Symbols on this page
Signed skill-tool result with verifiable provenance metadata.
Build a signedEnvelopecovering all metadata fields.
nonce defaults to a fresh url-safe token. alg must be Ed25519until HMAC mode lands; the…
ReturnTrue when env's Ed25519 signature matches public_key.
Tampered metadata or payload, wrong key, or unsupportedalgyields
False. Malformed base64…
Envelope
class
Signed skill-tool result with verifiable provenance metadata.
sign_envelope
function
def sign_envelope(*, payload: Any, skill: str, version: str, tool: str, input_digest: str, private_key: Any, key_id: str, nonce: str | None = None, alg: str = _ALG_ED25519) -> Envelope
Build a signedEnvelopecovering all metadata fields.
nonce defaults to a fresh url-safe token. alg must be Ed25519
until HMAC mode lands; the field is retained for that later mode.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
payload
|
Any
|
— | |
skill
|
str
|
— | |
version
|
str
|
— | |
tool
|
str
|
— | |
input_digest
|
str
|
— | |
private_key
|
Any
|
— | |
key_id
|
str
|
— | |
nonce
|
str | None
|
None
|
|
alg
|
str
|
_ALG_ED25519
|
verify_envelope
function
def verify_envelope(env: Envelope, public_key: Any) -> bool
ReturnTrue when env's Ed25519 signature matches public_key.
Tampered metadata or payload, wrong key, or unsupportedalgyields
False. Malformed base64 signatures also fail closed.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
env
|
Envelope
|
— | |
public_key
|
Any
|
— |
View source · /home/runner/work/chirp/chirp/site/../src/chirp/skill/envelope.py:1