Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentHealthMonitor ¶ added in v0.30.0
type AgentHealthMonitor struct {
// contains filtered or unexported fields
}
AgentHealthMonitor periodically marks stale agents as offline.
func NewAgentHealthMonitor ¶ added in v0.30.0
func NewAgentHealthMonitor(database *db.DB) *AgentHealthMonitor
func (*AgentHealthMonitor) Run ¶ added in v0.30.0
func (m *AgentHealthMonitor) Run(ctx context.Context)
Run blocks until ctx is cancelled.
type IMInboundMessage ¶ added in v0.40.0
type IMInboundMessage struct {
ChatJID string `json:"chat_jid"`
SenderName string `json:"sender_name"`
Content string `json:"content"`
Provider string `json:"provider"`
ChannelID string `json:"channel_id"`
}
IMInboundMessage represents an inbound message from an IM channel.
type LeakWorker ¶ added in v0.47.0
type LeakWorker struct {
// contains filtered or unexported fields
}
LeakWorker is a background goroutine that cleans up stale active turns and responders.
func NewLeakWorker ¶ added in v0.47.0
func NewLeakWorker(s *Server, cfg LeakWorkerConfig) *LeakWorker
NewLeakWorker creates a new LeakWorker with defaults applied to zero values.
func (*LeakWorker) Run ¶ added in v0.47.0
func (l *LeakWorker) Run(ctx context.Context)
Run starts the ticker loop until ctx is cancelled.
func (*LeakWorker) RunOnce ¶ added in v0.47.0
func (l *LeakWorker) RunOnce(ctx context.Context)
RunOnce runs both cleanup sweeps once. Exposed for testing.
type LeakWorkerConfig ¶ added in v0.47.0
type LeakWorkerConfig struct {
StaleTurnAfter time.Duration // default 5m
ResponderTTL time.Duration // default 90s
Period time.Duration // default 1m
}
LeakWorkerConfig holds configuration for the leak worker.
type ResourceDefaults ¶ added in v0.7.0
type ResourceDefaults struct {
MaxWorkspacesPerUser int
MaxSandboxesPerWorkspace int
MaxWorkspaceDriveSize int64 // bytes
MaxSandboxCPU int // millicores
MaxSandboxMemory int64 // bytes
MaxIdleTimeout int // seconds
WsMaxTotalCPU int // millicores
WsMaxTotalMemory int64 // bytes
WsMaxIdleTimeout int // seconds
}
ResourceDefaults holds all resolved system-wide defaults.
type Server ¶
type Server struct {
Auth *auth.Auth
OIDC *auth.OIDCManager
DB *db.DB
Sandboxes *sbxstore.Store
ProcessManager process.Manager
DriveManager storage.DriveManager
NamespaceManager *namespace.Manager
TunnelRegistry *tunnel.Registry
StaticFS fs.FS
BaseDomains []string // e.g. ["agentserver.dev", "agent.cs.ac.cn"] (first is primary)
OpencodeSubdomainPrefix string // e.g. "code" — subdomain: code-{id}.{baseDomain}
OpenclawSubdomainPrefix string // e.g. "claw" — subdomain: claw-{id}.{baseDomain}
ClaudeCodeSubdomainPrefix string // e.g. "claude" — subdomain: claude-{id}.{baseDomain}
PasswordAuthEnabled bool // when false, /api/auth/login and /api/auth/register are not registered
LLMProxyURL string // base URL for the llmproxy service (e.g. "http://agentserver-llmproxy:8081")
// IMBridgeURL is the base URL of the standalone imbridge service
// (e.g. "http://agentserver-imbridge:8083"). When set, IM API routes
// are reverse-proxied to the imbridge service.
IMBridgeURL string
// ModelServer OAuth
ModelserverOAuthClientID string
ModelserverOAuthClientSecret string
ModelserverOAuthAuthURL string
ModelserverOAuthTokenURL string
ModelserverOAuthIntrospectURL string
ModelserverOAuthRedirectURI string
ModelserverProxyURL string
DatabaseURL string // PostgreSQL connection URL (needed for Matrix E2EE crypto DB)
// Hydra OAuth2 (for agent Device Flow)
HydraClient *auth.HydraClient
HydraPublicURL string // internal URL for reverse proxy (e.g. "http://hydra-public:4444")
// BridgeHandler provides CCR V2-compatible bridge API for agent sessions.
BridgeHandler *bridge.Handler
// CCBrokerURL is the base URL of the cc-broker service for stateless
// Claude Code sessions (e.g. "http://cc-broker:8090").
CCBrokerURL string
// ExecutorRegistryURL is the base URL of the executor-registry service
// (e.g. "http://executor-registry:8091"). Used by the /control agents command.
ExecutorRegistryURL string
// Credential proxy
EncryptionKey []byte // AES-256 key for credential_bindings auth_blob
CredproxyPublicURL string // URL sandboxes use to reach credentialproxy
// contains filtered or unexported fields
}
func (*Server) GetEffectiveIdleTimeout ¶ added in v0.7.0
GetEffectiveIdleTimeout is the exported version for use by cmd/serve.go.
type WorkspaceDefaults ¶ added in v0.9.0
type WorkspaceDefaults struct {
MaxSandboxes int
MaxSandboxCPU int // millicores
MaxSandboxMemory int64 // bytes
MaxIdleTimeout int // seconds
MaxTotalCPU int // millicores
MaxTotalMemory int64 // bytes
MaxDriveSize int64 // bytes
}
WorkspaceDefaults holds workspace-level resolved defaults (system defaults <- workspace_quotas override).
Source Files
¶
- admin.go
- agent_discovery.go
- agent_health.go
- agent_interactions.go
- agent_mailbox.go
- agent_proxy_routes.go
- agent_register.go
- agent_tasks.go
- credential_bindings.go
- handler_tui_control.go
- handler_tui_events.go
- handler_tui_inbound.go
- handler_tui_internal.go
- handler_tui_proxy.go
- handler_tui_session.go
- im_inbound.go
- im_inbound_parse.go
- leak_worker.go
- modelserver_oauth.go
- modelserver_token.go
- oauth_provider.go
- quota.go
- server.go
- task_output.go
- validate_proxy_token.go
- workspace_token.go