Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentStatus ¶
type AgentStatus string
AgentStatus represents the current status of an agent.
const ( StatusOnline AgentStatus = "online" StatusOffline AgentStatus = "offline" StatusDegraded AgentStatus = "degraded" )
type AuthInfo ¶
type AuthInfo struct {
Type string `json:"type,omitempty"` // bearer, mtls, api_key, none
Params map[string]string `json:"params,omitempty"`
}
AuthInfo describes the authentication method for an agent.
type Card ¶
type Card struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Version string `json:"version,omitempty"`
PublicKey string `json:"public_key,omitempty"`
Capabilities []string `json:"capabilities,omitempty"`
Skills []Skill `json:"skills,omitempty"` // A2A-compatible structured skills
Tools []Tool `json:"tools,omitempty"` // MCP-compatible tool definitions
Endpoint Endpoint `json:"endpoint"`
Protocols []protocol.Protocol `json:"protocols"`
Auth AuthInfo `json:"auth,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
PeerClaw PeerClawExtension `json:"peerclaw,omitempty"`
Status AgentStatus `json:"status"`
RegisteredAt time.Time `json:"registered_at"`
LastHeartbeat time.Time `json:"last_heartbeat"`
}
Card represents an AI agent's identity and capabilities, compatible with the A2A Agent Card standard with PeerClaw extensions.
func (*Card) HasCapability ¶
HasCapability checks if the agent advertises a given capability.
type Endpoint ¶
type Endpoint struct {
URL string `json:"url"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
Transport protocol.Transport `json:"transport,omitempty"`
}
Endpoint defines the network location for reaching an agent.
type PeerClawExtension ¶
type PeerClawExtension struct {
NATType string `json:"nat_type,omitempty"` // full_cone, restricted, symmetric, none
RelayPreference string `json:"relay_preference,omitempty"` // direct, relay, auto
Priority int `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
NostrPubKey string `json:"nostr_pubkey,omitempty"`
DHTNodeID string `json:"dht_node_id,omitempty"`
ReputationScore float64 `json:"reputation_score,omitempty"`
NostrRelays []string `json:"nostr_relays,omitempty"`
IdentityAnchor string `json:"identity_anchor,omitempty"`
PublicEndpoint bool `json:"public_endpoint,omitempty"` // Owner opts-in to expose endpoint URL publicly
}
PeerClawExtension contains PeerClaw-specific fields beyond the A2A standard.
Click to show internal directories.
Click to hide internal directories.