Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const ToolAgentStatus + const ToolConnectAgent + const ToolDescribeCapability + const ToolDisconnectAgent + const ToolDiscoverProvider + const ToolExecuteCapability + const ToolListCapabilities + const ToolRequestCapability + var ErrNoKey = errors.New("agentclient: the key has no private key") + var ErrUnknownAgent = errors.New("agentclient: unknown agent_id; call connect_agent first") + func SignAgentJWT(a Agent, now time.Time, aud, method, target string, body []byte) (string, error) + type Agent struct + HostID string + ID string + Key Key + Provider Provider + type Client struct + func New(host Key, opts ...Option) *Client + func (c *Client) CIBAAuthorize(ctx context.Context, a Agent, loginHint, bindingMessage string, caps []string) (agentauth.CIBAAuthorizeResult, error) + func (c *Client) Connect(ctx context.Context, p Provider, in ConnectRequest) (Agent, agentauth.RegisterResult, error) + func (c *Client) DescribeCapability(ctx context.Context, p Provider, name string) (agentauth.CapabilityView, error) + func (c *Client) Disconnect(ctx context.Context, a Agent) error + func (c *Client) Discover(ctx context.Context, providerURL string) (Provider, error) + func (c *Client) Execute(ctx context.Context, a Agent, capability, location string, args map[string]any) (json.RawMessage, error) + func (c *Client) ListCapabilities(ctx context.Context, p Provider, a *Agent) (agentauth.CapabilityList, error) + func (c *Client) OptionErr() error + func (c *Client) RequestCapability(ctx context.Context, a Agent, caps []agentauth.CapabilityRequest, ...) (agentauth.RequestCapabilityResult, error) + func (c *Client) Status(ctx context.Context, a Agent) (agentauth.AgentStatusView, error) + func (c *Client) Tools(store Store) []Tool + func (c *Client) WaitForApproval(ctx context.Context, a Agent, interval time.Duration) (agentauth.AgentStatusView, error) + type ConnectRequest struct + Capabilities []agentauth.CapabilityRequest + ForceApproval bool + Mode agentauth.Mode + Name string + Reason string + type Error struct + Code string + Message string + Status int + func (e *Error) Error() string + type Key struct + Public agentauth.PublicKey + func KeyFrom(priv ed25519.PrivateKey) Key + func NewKey() (Key, error) + func (k Key) PrivateKey() ed25519.PrivateKey + type MemoryStore struct + func (m *MemoryStore) LoadAgent(_ context.Context, id string) (Agent, error) + func (m *MemoryStore) SaveAgent(_ context.Context, a Agent) error + type Option func(*Client) + func WithClock(now func() time.Time) Option + func WithHTTPClient(hc *http.Client) Option + func WithHostName(name string) Option + type Provider = agentauth.Configuration + type Store interface + LoadAgent func(ctx context.Context, id string) (Agent, error) + SaveAgent func(ctx context.Context, a Agent) error + type Tool struct + Call func(ctx context.Context, args json.RawMessage) (any, error) + Description string + InputSchema json.RawMessage + Name string