feat(api): organization-owned regions, checkers and status page servers

Organizations create regions and agents for themselves under Regions &
checkers; an org checker only receives its org's monitors. Platform admins
manage shared regions and agents in the admin panel or with the CLI,
which gains 'api admin grant|revoke'. The first user of a self-hosted
installation becomes a platform admin. Region lists show the org's own
regions first.

Closes #52
Refs #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 01:36:02 +01:00
1 parent 607798d742
commit 22f0740056
19 files changed
+1932 -301

No files matched your search

+10 -5
View File
@@ -33,11 +33,16 @@ const (
// Hello describes the agent the token belongs to.
type Hello struct {
AgentID uuid.UUID `json:"agent_id"`
Name string `json:"name"`
Kind string `json:"kind"`
Region string `json:"region,omitempty"`
Protocol int `json:"protocol"`
AgentID uuid.UUID `json:"agent_id"`
Name string `json:"name"`
Kind string `json:"kind"`
// Region is the region key; RegionID identifies it uniquely.
Region string `json:"region,omitempty"`
RegionID *uuid.UUID `json:"region_id,omitempty"`
RegionName string `json:"region_name,omitempty"`
// OrgOwned is set for agents that serve a single organization.
OrgOwned bool `json:"org_owned"`
Protocol int `json:"protocol"`
}
// JobsRequest asks for up to Max jobs, waiting up to WaitMS if none are