Documentation
¶
Index ¶
- Constants
- func CanonicalPayload(card map[string]any) ([]byte, error)
- func CheckOrigins(raw []byte, cardURL, repository, canonicalGit string, declared []string) error
- func Export(base map[string]any, binding Binding) (map[string]any, error)
- func FileName(name string) string
- func JWKThumbprint(jwk map[string]any) (string, error)
- func Marshal(card map[string]any) ([]byte, error)
- func Parse(b []byte) (map[string]any, error)
- func Read(location, base string) (map[string]any, []byte, error)
- func Snapshot(m *manifest.Manifest, dir string, readPath PathReader) (map[string]string, []error)
- func Validate(card map[string]any) error
- type Binding
- type Capabilities
- type Card
- type Extension
- type Interface
- type LocationError
- type PathReader
- type Provider
- type SecurityRequirement
- type Signature
- type Skill
- type StringList
- type Verification
- type VerifyOptions
Constants ¶
View Source
const ExtensionURI = "https://git-a2a.com/ext/module/v1"
Variables ¶
This section is empty.
Functions ¶
func CanonicalPayload ¶
CanonicalPayload returns the RFC 8785 JSON representation signed by A2A.
func CheckOrigins ¶ added in v1.3.0
CheckOrigins binds card discovery and interface URLs to the module repository or to explicit owner-declared origins.
func JWKThumbprint ¶ added in v1.3.0
JWKThumbprint returns the RFC 7638 SHA-256 thumbprint for a public JWK.
Types ¶
type Capabilities ¶
type Card ¶
type Card struct {
Name string `json:"name"`
Description string `json:"description"`
SupportedInterfaces []Interface `json:"supportedInterfaces"`
Provider *Provider `json:"provider,omitempty"`
Version string `json:"version"`
DocumentationURL string `json:"documentationUrl,omitempty"`
Capabilities Capabilities `json:"capabilities"`
SecuritySchemes map[string]any `json:"securitySchemes,omitempty"`
SecurityRequirements []SecurityRequirement `json:"securityRequirements,omitempty"`
DefaultInputModes []string `json:"defaultInputModes"`
DefaultOutputModes []string `json:"defaultOutputModes"`
Skills []Skill `json:"skills"`
Signatures []Signature `json:"signatures,omitempty"`
IconURL string `json:"iconUrl,omitempty"`
}
type LocationError ¶
LocationError reports that a card location could not be retrieved. It is distinct from errors returned while parsing or validating retrieved bytes.
func (*LocationError) Error ¶
func (e *LocationError) Error() string
func (*LocationError) Unwrap ¶
func (e *LocationError) Unwrap() error
type PathReader ¶
type SecurityRequirement ¶
type SecurityRequirement struct {
Schemes map[string]StringList `json:"schemes"`
}
type Skill ¶
type Skill struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Tags []string `json:"tags"`
Examples []string `json:"examples,omitempty"`
InputModes []string `json:"inputModes,omitempty"`
OutputModes []string `json:"outputModes,omitempty"`
SecurityRequirements []SecurityRequirement `json:"securityRequirements,omitempty"`
}
type StringList ¶
type StringList struct {
List []string `json:"list"`
}
type Verification ¶
type Verification struct {
KeyID string
Algorithm string
JWKS string
Thumbprint string
CacheAge time.Duration
UnpinnedKey bool
}
func VerifySignatures ¶
func VerifySignatures(raw []byte, options VerifyOptions) (Verification, error)
VerifySignatures verifies at least one detached JWS signature over the RFC 8785 canonical Agent Card payload. The signatures property is not signed.
Click to show internal directories.
Click to hide internal directories.