Versions in this module Expand all Collapse all v0 v0.3.0 Sep 18, 2026 Changes in this version type Peer + Title string v0.2.1 Aug 28, 2026 v0.2.0 Aug 20, 2026 Changes in this version + var ErrInvalidName = errors.New("invalid agent name") + var ErrNameLost = errors.New("agent name now held by another session") type Client + func (c *Client) ClaimWithFallback(ctx context.Context, p Peer) (Peer, error) + func (c *Client) DeleteInbox(ctx context.Context, name string) error + func (c *Client) OnReconnect(f func()) type ConsumerStatus + Waiting int + type DeliveryStatus string + const DeliveredLive + const NoInbox + const Queued + func (d DeliveryStatus) Human(to string) string v0.1.0 Jul 1, 2026 Changes in this version + var ErrNameTaken = errors.New("agent name already held") + func ResolveIdentity(cwd, explicit string) (name, source string) + func SanitizeName(s string) string + func URLFromEnv() string + type Client struct + func Connect(url, creds, token string) (*Client, error) + func ConnectFromEnv() (*Client, error) + func (c *Client) Claim(ctx context.Context, p Peer) (*Peer, error) + func (c *Client) Close() + func (c *Client) Consumers(ctx context.Context) ([]ConsumerStatus, error) + func (c *Client) Deregister(ctx context.Context, agent string) error + func (c *Client) Heartbeat(ctx context.Context, agent string) error + func (c *Client) NATS() *nats.Conn + func (c *Client) Peers(ctx context.Context) ([]Peer, error) + func (c *Client) Register(ctx context.Context, p Peer) error + func (c *Client) Send(ctx context.Context, m Message) error + func (c *Client) SetSummary(ctx context.Context, agent, summary string) error + func (c *Client) Setup(ctx context.Context) error + func (c *Client) Subscribe(ctx context.Context, agent string, h func(Message)) error + func (c *Client) Watch(ctx context.Context, fromStart bool, h func(Envelope)) error + type ConsumerStatus struct + AckPending int + LastDelivery *time.Time + Name string + Pending uint64 + type Envelope struct + Actor string + Data json.RawMessage + ID string + TS int64 + Type EventType + V int + type EventType string + const EventDelivered + const EventDeregister + const EventMessage + const EventPresence + const EventRegister + type Message struct + Content string + DeliverAs string + From string + ID string + TS int64 + To string + type Peer struct + Agent string + Cwd string + Machine string + Session string + Summary string + TS int64