Documentation
¶
Index ¶
- Constants
- func ConfigDir() string
- func From(pool []sessions.Session, sg Sign) string
- func IsAssistant(pool []sessions.Session) bool
- func Ref(s sessions.Session) string
- func Resolve(q string, pool []sessions.Session) (sessions.Session, error)
- func SaveLogin(u, token, ca string) error
- func Self(pool []sessions.Session) (sessions.Session, bool)
- func ServerTokenPath() string
- func Signed(pool []sessions.Session, sg Sign, text string) (string, error)
- type Agent
- type Client
- func (c *Client) AddBacklog(host string, req map[string]any) (it backlog.Item, err error)
- func (c *Client) AgentLine(agent string) (int, []byte, error)
- func (c *Client) Agents() (list []Agent, err error)
- func (c *Client) Attach(id string) error
- func (c *Client) Backlog() (items []backlog.Item, err error)
- func (c *Client) Begin(host string, req map[string]any) (string, error)
- func (c *Client) Call(req map[string]any) (string, error)
- func (c *Client) Caps(out any) error
- func (c *Client) Days(n int) ([]usage.Day, error)
- func (c *Client) Deliver(ctx context.Context, x sessions.Session, text string, ...) (id string, resumed bool, err error)
- func (c *Client) Detached(id, title string) string
- func (c *Client) Dirs(host string) (list []Dir, err error)
- func (c *Client) Events(ctx context.Context, fn func([]sessions.Session)) error
- func (c *Client) Feed(since int64, full bool) (text string, seq int64, err error)
- func (c *Client) Find(q string, withPast bool) (sessions.Session, error)
- func (c *Client) GuestEdit(op, name, number string) error
- func (c *Client) Guests() (map[string]string, error)
- func (c *Client) HidePage(sid, name string) error
- func (c *Client) History(q, dir string, limit int) (list []sessions.Session, err error)
- func (c *Client) Launch(ctx context.Context, l Launch) (id, dir string, err error)
- func (c *Client) Limits() (l usage.Limits, err error)
- func (c *Client) Live() (list []sessions.Session, err error)
- func (c *Client) Me() Me
- func (c *Client) Message(agent, text string) (string, error)
- func (c *Client) Notify(sid string, req map[string]any) (string, error)
- func (c *Client) OpenPage(sid string, req map[string]any) (r struct{ ... }, err error)
- func (c *Client) Outputs(sid string) (o Outputs, err error)
- func (c *Client) PageState(sid, name string) (st json.RawMessage, err error)
- func (c *Client) Pages(sid string) (list []pages.Page, err error)
- func (c *Client) Pairing(url string) (text string, err error)
- func (c *Client) Patch(sid string, fields map[string]any) error
- func (c *Client) PatchBacklog(host, id string, fields map[string]any) (it backlog.Item, err error)
- func (c *Client) Presets() (ps []Preset, err error)
- func (c *Client) Recent() (list []sessions.Session, err error)
- func (c *Client) Remove(id string) error
- func (c *Client) Resources(host string) (r resources.Report, err error)
- func (c *Client) Resume(sid string) (string, error)
- func (c *Client) Send(id, text string) error
- func (c *Client) ServerHome() string
- func (c *Client) SessionUsage(sid string) (st usage.Stats, err error)
- func (c *Client) SetPageState(sid, name string, st json.RawMessage) error
- func (c *Client) Shelve(sid, title string) (it backlog.Item, err error)
- func (c *Client) Show(sid string, req map[string]any) (r struct{ ... }, err error)
- func (c *Client) Start(dir, name, prompt string) (string, error)
- func (c *Client) StartOn(host, dir, name, prompt string, worktree bool) (string, error)
- func (c *Client) StartPreset(name, prompt string) (string, string, error)
- func (c *Client) Stop(id string) error
- func (c *Client) Summary(sid string, wait int, again bool) (s Summary, err error)
- func (c *Client) Transcript(sid string) (p history.Page, err error)
- func (c *Client) Trust(u *Untrusted) error
- func (c *Client) Turns(sid string) (turns []history.Turn, waiting []history.Waiting, err error)
- func (c *Client) Until(ctx context.Context, key string, limit time.Duration, ...) error
- func (c *Client) WhatsApp(req map[string]any) ([]string, error)
- type Dir
- type File
- type Launch
- type Me
- type Outputs
- type Preset
- type Server
- type Sign
- type Summary
- type Untrusted
Constants ¶
const ( DefaultAddr = "127.0.0.1:7272" DefaultListen = ":7272" )
const HubAgent = "assistant"
HubAgent is the assistant's name as an agent: its live conversation, whichever that is now.
Variables ¶
This section is empty.
Functions ¶
func IsAssistant ¶
IsAssistant is whether this is the assistant's conversation; the hub's other one, the guests', speaks for the user's guests and never for the user.
func ServerTokenPath ¶
func ServerTokenPath() string
Types ¶
type Agent ¶
type Agent struct {
Name string `json:"name"`
Title string `json:"title,omitempty"`
Host string `json:"host"`
Page string `json:"page"`
About string `json:"about,omitempty"`
} `json:"share,omitempty"`
Badge any `json:"badge,omitempty"`
Headline string `json:"headline,omitempty"`
Talk bool `json:"talk,omitempty"`
}
type Client ¶
type Client struct {
URL string `json:"url"`
Token string `json:"token"`
CA string `json:"ca,omitempty"`
// contains filtered or unexported fields
}
func (*Client) AddBacklog ¶
func (*Client) AgentLine ¶
AgentLine asks atc for an agent's conversation to put on a call, for the hub: the status and body as they came.
func (*Client) Caps ¶
Caps asks the server for the feature list, briefly: `atc doctor` does the checks itself when no server answers.
func (*Client) Feed ¶
Feed is what changed in atc after seq since, or with full how things stand now: one short try, since the assistant's message waits on it.
func (*Client) Message ¶
Message wakes an agent with text: its conversation, resumed or started as needed.
func (*Client) PageState ¶
func (c *Client) PageState(sid, name string) (st json.RawMessage, err error)
func (*Client) Pairing ¶
Pairing is a one-time code to let a new device in, as text. url overrides the address it carries.
func (*Client) PatchBacklog ¶
func (*Client) Recent ¶
Recent is Live as of the server's last poll when that is a few seconds old at most: for looking, not acting.
func (*Client) Send ¶
Send types text into a session. From inside a Claude session it says which one sent it, so the hub hears it as another session rather than the user typing.
func (*Client) ServerHome ¶
func (*Client) SetPageState ¶
func (c *Client) SetPageState(sid, name string, st json.RawMessage) error
func (*Client) Shelve ¶
Shelve sends a session to the backlog: stopped and off the list, its item resuming it.
func (*Client) StartPreset ¶
func (*Client) Trust ¶
Trust puts Claude Code's own trust prompt for the folder in this terminal, and returns once it is answered.