1 Commits
Author SHA1 Message Date
VeillaxandClaude Sonnet 5.5 4bde85ea33 model: terminal sessions in the site config, and the agent's SSH server in its report
CI / test (push) Successful in 1m23s
SiteConfig.Terminals lists terminal sessions waiting for the agent, which calls
back to Hammerhead and joins the connection to its SSH server. SiteReport and
Site carry the SSH server's address and whether the agent can relay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 01:38:16 -06:00
+13
View File
@@ -82,6 +82,10 @@ type Site struct {
Tags []string `json:"tags,omitempty"` // labels for grouping and filtering in the dashboard Tags []string `json:"tags,omitempty"` // labels for grouping and filtering in the dashboard
// What the agent last said about its SSH server (see SiteReport.SSH and SSHRelay).
SSH string `json:"ssh,omitempty"`
SSHRelay bool `json:"sshRelay,omitempty"`
TunnelIP string `json:"tunnelIp,omitempty"` // the site's address inside the tunnel network TunnelIP string `json:"tunnelIp,omitempty"` // the site's address inside the tunnel network
PublicKey string `json:"publicKey,omitempty"` // WireGuard public key, reported by the agent PublicKey string `json:"publicKey,omitempty"` // WireGuard public key, reported by the agent
@@ -462,6 +466,11 @@ type SiteConfig struct {
Edges []EdgeRef `json:"edges"` Edges []EdgeRef `json:"edges"`
UpdateID string `json:"updateId,omitempty"` // an administrator asked this agent to update itself now; echoed back in its report UpdateID string `json:"updateId,omitempty"` // an administrator asked this agent to update itself now; echoed back in its report
// Terminals lists terminal sessions waiting for this agent. For each, the agent opens a connection
// to hammerhead at /site/terminal/<id> and joins it to its own SSH server, so a shell can be opened
// from the dashboard without any port being open on an edge.
Terminals []string `json:"terminals,omitempty"`
MailEgress []MailSpec `json:"mailEgress"` MailEgress []MailSpec `json:"mailEgress"`
} }
@@ -476,6 +485,10 @@ type SiteReport struct {
AutoUpdate bool `json:"autoUpdate,omitempty"` AutoUpdate bool `json:"autoUpdate,omitempty"`
UpdateMsg string `json:"updateMsg,omitempty"` UpdateMsg string `json:"updateMsg,omitempty"`
UpdateID string `json:"updateId,omitempty"` UpdateID string `json:"updateId,omitempty"`
// SSH is where this machine's SSH server listens ("" when it is not running). SSHRelay says this
// agent can answer SiteConfig.Terminals, which is how an agent that is too old to relay shows itself.
SSH string `json:"ssh,omitempty"`
SSHRelay bool `json:"sshRelay,omitempty"`
// progress of that update, for the dashboard's progress bar and log // progress of that update, for the dashboard's progress bar and log
UpdateStage string `json:"updateStage,omitempty"` UpdateStage string `json:"updateStage,omitempty"`
UpdatePct int `json:"updatePct,omitempty"` UpdatePct int `json:"updatePct,omitempty"`