Documentation
¶
Index ¶
- func DefaultAssistDir() string
- func GuestsArgs(dir string) []string
- func HubArgs(dir string) []string
- func Priced(model string, u history.Usage) float64
- func PrivateOnly(next http.Handler) http.Handler
- func ReachableIP() string
- func SavePeer(path string, p Peer) error
- type Agent
- type AgentView
- type CapsMachine
- type CapsReport
- type Engine
- type Identity
- type Look
- type Peer
- type Person
- type Persons
- type Preset
- type Proxies
- type Server
- type Speaker
- type Voice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAssistDir ¶
func DefaultAssistDir() string
DefaultAssistDir is the assistant's own folder, the hub's and atc's, so it never starts in the home folder: Claude Code refuses a background session there unless it already has a yes on record.
func GuestsArgs ¶
GuestsArgs are the flags for the guests' conversation: its own brief, only atc's tools (no WhatsApp, mail or browser of the user's), no approvals to pass on, and allowed only what its brief asks of it: answering a guest, the guests' folder and looking things up.
func HubArgs ¶
HubArgs are the flags for the hub's Claude: the same tools and switchboard as atc's standing sessions, plus how the channels work, and what the user lets it do alone, in its folder dir.
func PrivateOnly ¶ added in v0.1.1
PrivateOnly refuses anyone not on this machine, a local network or a tailnet. It is what lets atc listen on every interface by default without answering the internet on a machine with a public address.
func ReachableIP ¶ added in v0.1.1
func ReachableIP() string
ReachableIP is the address another device is most likely to reach this machine at: its tailnet address, else its local network's, else "".
Types ¶
type Agent ¶
type Agent struct {
Name string `json:"name"`
Folder string `json:"folder"`
Host string `json:"host"`
Title string `json:"title,omitempty"`
Icon string `json:"icon,omitempty"`
Color string `json:"color,omitempty"`
Dir string `json:"dir,omitempty"`
Args []string `json:"args,omitempty"`
Every string `json:"every,omitempty"`
From string `json:"from,omitempty"`
Check string `json:"check,omitempty"`
Prompt string `json:"prompt,omitempty"`
Reset *resetSpec `json:"reset,omitempty"`
// Talk lets the user talk to it directly on a call; Person is who it sounds and looks like there, and Background
// replaces the background of whoever that is.
Talk bool `json:"talk,omitempty"`
Person string `json:"person,omitempty"`
Background string `json:"background,omitempty"`
Err string `json:"error,omitempty"`
}
Agent is a standing conversation defined by a folder: agent.json, brief.md, and settings.json and mcp.json when they are there, all read fresh each time it starts or resumes.
type AgentView ¶
type AgentView struct {
Agent
Rule startover.Policy `json:"rule"`
Next time.Time `json:"next,omitzero"`
LastReset time.Time `json:"lastReset,omitzero"`
Session string `json:"sessionId,omitempty"`
ID string `json:"id,omitempty"`
State string `json:"state,omitempty"`
Parked bool `json:"parked,omitempty"`
Context int `json:"context,omitempty"`
Last time.Time `json:"last,omitzero"`
Pages []pages.Page `json:"pages"`
Badge json.RawMessage `json:"badge,omitempty"`
Headline string `json:"headline,omitempty"`
Trust *agentTrust `json:"trust,omitempty"`
}
type CapsMachine ¶
type CapsMachine struct {
Host string `json:"host"`
Version string `json:"version,omitempty"`
Rows []caps.Row `json:"rows,omitempty"`
Identity Identity `json:"identity"`
Restart []string `json:"restart,omitempty"`
RestartCmd string `json:"restartCommand,omitempty"`
SettingsFile string `json:"settingsFile,omitempty"`
SettingsError string `json:"settingsError,omitempty"`
Error string `json:"error,omitempty"`
}
CapsMachine is the list as one machine sees it.
type CapsReport ¶
type CapsReport struct {
Groups []string `json:"groups"`
Machines []CapsMachine `json:"machines"`
}
type Engine ¶
type Engine struct {
Name string `json:"name"`
Harness string `json:"harness,omitempty"`
Model string `json:"model"`
URL string `json:"url,omitempty"`
Token string `json:"token,omitempty"`
Env map[string]string `json:"env,omitempty"`
Host string `json:"host,omitempty"`
}
func LoadEngines ¶
type Peer ¶
type Person ¶
type Person struct {
ID string `json:"id"`
Name string `json:"name"`
Character string `json:"character"`
// Background is a room: a picture in /app/personas/_rooms, with its settings in a .json beside it when it has any,
// that replaces the character's own room; empty keeps that room.
Background string `json:"background,omitempty"`
Voices map[string]string `json:"voices"`
}
Person is who a call shows and speaks as: a name, a character from /app/personas (or "orb") and a voice per language. How the assistant behaves stays out of it. Nothing here is tied to the assistant, so an agent can name a person too.
type Preset ¶
type Preset struct {
Name string `json:"name"`
Dir string `json:"dir"`
Brief string `json:"brief,omitempty"`
Args []string `json:"args,omitempty"`
Worktree bool `json:"worktree,omitempty"`
Host string `json:"host,omitempty"`
}
func LoadPresets ¶
type Proxies ¶
type Proxies struct {
// contains filtered or unexported fields
}
func ParseProxies ¶
type Server ¶
type Server struct {
M *sessions.Manager
Res *resources.Sampler
Term *attach.Hub
Web fs.FS
Token string
Roots []string
Host string
Push *push.Pusher
Pages *pages.Store
Backlog *backlog.Store
Browser *browser.Browser
Peers []Peer
Presets []Preset
Paired *pair.Store
// AgentsDir holds a folder per agent; every machine reads it and runs the ones naming it.
AgentsDir string
Engines []Engine
// Settings is settings.json, and Version this build; capsRunner keeps the feature checks' results briefly.
Settings *settings.Settings
Version string
Voice Voice
WhatsApp *whatsapp.Client
Hub *hub.Client
// CallLine is the call line service, whose app line the phone app's calls go through; calls from
// CallTestFrom go to CallTestLine.
CallLine, CallTestLine string
CallTestFrom []string
// CallNumber is the assistant's own phone line, which the app logs its calls under.
CallNumber string
// CallVoices is the voice service, which lists the voices calls can speak with and keeps the pick.
CallVoices string
Reachable func() string
// PublicURL is where the user reaches atc (links in messages), LocalURL where this
// machine's own browser does.
PublicURL, LocalURL string
AppDir string
AssistDir string
StateDir string
TrustTailnet string
TrustedProxies *Proxies
// contains filtered or unexported fields
}
func (*Server) SeedAgents ¶ added in v0.1.2
SeedAgents writes the starter agents when this machine has no agents folder yet, each on this machine and with no schedule, so they spend nothing until the user wakes one or gives it one. A folder that exists stays as it is.
func (*Server) SeedPersons ¶ added in v0.1.2
SeedPersons saves the built-in persons when nobody has ever been saved. Deleting them all later leaves an empty list, which stays.
Source Files
¶
- agents.go
- answered.go
- backlog.go
- browser.go
- callline.go
- callvoices.go
- caps.go
- devices.go
- engines.go
- feed.go
- hub.go
- line.go
- look.go
- notes.go
- opencode.go
- outputs.go
- pages.go
- peers.go
- persons.go
- prefs.go
- presence.go
- presets.go
- private.go
- resources.go
- retire.go
- revive.go
- server.go
- summary.go
- tailnet.go
- termlog.go
- triggers.go
- trust.go
- usage.go
- voice.go
- whatsapp.go
- whatsapp_hub.go
- whatsapp_out.go
- whatsapp_turn.go