Documentation
¶
Index ¶
- Constants
- type ACPController
- type AssetController
- type AssetResponse
- type AuthController
- type AuthInfoController
- type AuthMiddleware
- type AuthServiceForPersonalAPIKey
- type AuthStatusResponse
- type AvailableManagerEntry
- type AvailableManagersResponse
- type BedrockSettingsRequest
- type BedrockSettingsResponse
- type CodexAuthConfigResponse
- type CodexDeviceAuthController
- type CreateAssetRequest
- type CreateFileRequest
- type CreateMemoryRequest
- type CreateSandboxPolicyRequest
- type CreateSessionProfileRequest
- type CreateSubscriptionRequest
- type CreateTaskGroupRequest
- type CreateTaskRequest
- type CredentialsController
- type CredentialsFileInfo
- type CredentialsResponse
- type ExternalSessionManagerRequest
- type ExternalSessionManagerResponse
- type FileController
- func (c *FileController) CreateFile(ctx echo.Context) error
- func (c *FileController) DeleteFile(ctx echo.Context) error
- func (c *FileController) GetFile(ctx echo.Context) error
- func (c *FileController) GetName() string
- func (c *FileController) ListFiles(ctx echo.Context) error
- func (c *FileController) UpdateFile(ctx echo.Context) error
- type FileResponse
- type FrontendIntegration
- type FrontendIntegrationScope
- type GetOrCreatePersonalAPIKeyUseCase
- type GitHubLoginRequest
- type GitSyncConfigRequest
- type GitSyncConfigResponse
- type GitSyncEncryptionResponse
- type GoogleOAuthController
- func (c *GoogleOAuthController) CreateAuthorizationURL(ctx echo.Context) error
- func (c *GoogleOAuthController) GetIntegrations(ctx echo.Context) error
- func (c *GoogleOAuthController) GetName() string
- func (c *GoogleOAuthController) GetStatus(ctx echo.Context) error
- func (c *GoogleOAuthController) RevokeIntegration(ctx echo.Context) error
- func (c *GoogleOAuthController) WithPersonalAPIKeyRepository(repo portrepos.PersonalAPIKeyRepository) *GoogleOAuthController
- type GoogleOAuthStatusResponse
- type HealthController
- type IntegrationAuthorizationURLRequest
- type IntegrationAuthorizationURLResponse
- type IntegrationRevokeResponse
- type IntegrationsResponse
- type ListCredentialsResponse
- type ListFilesResponse
- type LoginRequest
- type MCPServerRequest
- type MCPServerResponse
- type MarketplaceRequest
- type MarketplaceResponse
- type MemoryController
- func (c *MemoryController) CreateMemory(ctx echo.Context) error
- func (c *MemoryController) DeleteMemory(ctx echo.Context) error
- func (c *MemoryController) GetMemory(ctx echo.Context) error
- func (c *MemoryController) GetName() string
- func (c *MemoryController) ListMemories(ctx echo.Context) error
- func (c *MemoryController) UpdateMemory(ctx echo.Context) error
- type MemoryListResponse
- type MemoryResponse
- type NotificationController
- type NotificationHandlers
- func (h *NotificationHandlers) DeleteSubscription(c echo.Context) error
- func (h *NotificationHandlers) GetHistory(c echo.Context) error
- func (h *NotificationHandlers) GetSubscriptions(c echo.Context) error
- func (h *NotificationHandlers) SendNotification(c echo.Context) error
- func (h *NotificationHandlers) Subscribe(c echo.Context) error
- func (h *NotificationHandlers) Webhook(c echo.Context) error
- type PersonalAPIKeyController
- type PollDeviceAuthResponse
- type ProvisionerController
- func (pc *ProvisionerController) CompleteExternalSessionAllocation(c echo.Context) error
- func (pc *ProvisionerController) CompleteSessionAllocation(c echo.Context) error
- func (pc *ProvisionerController) Connect(c echo.Context) error
- func (pc *ProvisionerController) GetNextExternalSessionAllocation(c echo.Context) error
- func (pc *ProvisionerController) GetNextSessionAllocation(c echo.Context) error
- func (pc *ProvisionerController) GetProvisionRequest(c echo.Context) error
- func (pc *ProvisionerController) UpdateProvisionRequestStatus(c echo.Context) error
- type ProxyMessageWatcher
- type ProxyStatusWatcher
- type ResourceTransferController
- type SandboxDomainsResponse
- type SandboxPolicyController
- func (c *SandboxPolicyController) CreateSandboxPolicy(ctx echo.Context) error
- func (c *SandboxPolicyController) DeleteSandboxPolicy(ctx echo.Context) error
- func (c *SandboxPolicyController) GetName() string
- func (c *SandboxPolicyController) GetSandboxPolicy(ctx echo.Context) error
- func (c *SandboxPolicyController) GetSandboxPolicyDomains(ctx echo.Context) error
- func (c *SandboxPolicyController) ListSandboxPolicies(ctx echo.Context) error
- func (c *SandboxPolicyController) UpdateIgnoredDomains(ctx echo.Context) error
- func (c *SandboxPolicyController) UpdateSandboxPolicy(ctx echo.Context) error
- type SandboxPolicyDomainsResponse
- type SandboxPolicyListResponse
- type SandboxPolicyResponse
- type SendNotificationRequest
- type SessionController
- func (c *SessionController) DeleteSession(ctx echo.Context) error
- func (c *SessionController) GetName() string
- func (c *SessionController) GetSessionSandboxDomains(ctx echo.Context) error
- func (c *SessionController) RegisterRoutes(e *echo.Echo) error
- func (c *SessionController) RouteToSession(ctx echo.Context) error
- func (c *SessionController) SearchSessions(ctx echo.Context) error
- func (c *SessionController) StartSession(ctx echo.Context) error
- func (c *SessionController) StreamSessionsStatus(ctx echo.Context) error
- func (c *SessionController) UpdateSessionAnnotations(ctx echo.Context) error
- func (c *SessionController) WaitSessionMessages(ctx echo.Context) error
- func (c *SessionController) WaitSessionsStatus(ctx echo.Context) error
- type SessionControllerOption
- type SessionCreator
- type SessionManagerProvider
- type SessionProfileConfigRequest
- type SessionProfileConfigResponse
- type SessionProfileController
- func (c *SessionProfileController) CreateSessionProfile(ctx echo.Context) error
- func (c *SessionProfileController) DeleteSessionProfile(ctx echo.Context) error
- func (c *SessionProfileController) GetName() string
- func (c *SessionProfileController) GetSessionProfile(ctx echo.Context) error
- func (c *SessionProfileController) ListSessionProfiles(ctx echo.Context) error
- func (c *SessionProfileController) UpdateSessionProfile(ctx echo.Context) error
- type SessionProfileResponse
- type SettingsController
- func (c *SettingsController) DeleteGitSync(ctx echo.Context) error
- func (c *SettingsController) DeleteSettings(ctx echo.Context) error
- func (c *SettingsController) GetAvailableManagers(ctx echo.Context) error
- func (c *SettingsController) GetName() string
- func (c *SettingsController) GetSettings(ctx echo.Context) error
- func (c *SettingsController) UpdateSettings(ctx echo.Context) error
- type SettingsResponse
- type ShareController
- type StartDeviceAuthResponse
- type TaskController
- func (c *TaskController) CreateTask(ctx echo.Context) error
- func (c *TaskController) DeleteTask(ctx echo.Context) error
- func (c *TaskController) GetName() string
- func (c *TaskController) GetTask(ctx echo.Context) error
- func (c *TaskController) ListTasks(ctx echo.Context) error
- func (c *TaskController) UpdateTask(ctx echo.Context) error
- type TaskGroupController
- func (c *TaskGroupController) CreateTaskGroup(ctx echo.Context) error
- func (c *TaskGroupController) DeleteTaskGroup(ctx echo.Context) error
- func (c *TaskGroupController) GetName() string
- func (c *TaskGroupController) GetTaskGroup(ctx echo.Context) error
- func (c *TaskGroupController) ListTaskGroups(ctx echo.Context) error
- func (c *TaskGroupController) UpdateTaskGroup(ctx echo.Context) error
- type TaskGroupListResponse
- type TaskGroupResponse
- type TaskLinkRequest
- type TaskLinkResponse
- type TaskListResponse
- type TaskResponse
- type TransferResourceRequest
- type UpdateFileRequest
- type UpdateIgnoredDomainsRequest
- type UpdateMemoryRequest
- type UpdateSandboxPolicyRequest
- type UpdateSessionProfileRequest
- type UpdateSettingsRequest
- type UpdateTaskGroupRequest
- type UpdateTaskRequest
- type UserController
- type UserInfoResponse
Constants ¶
const BaseSettingsName = "base"
BaseSettingsName is the reserved name for global base settings (admin-only)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACPController ¶ added in v1.395.0
type ACPController struct {
// contains filtered or unexported fields
}
ACPController handles ACP (Agent Client Protocol) JSON-RPC 2.0 endpoints. POST /acp – JSON-RPC request/response GET /acp/sse – SSE stream of session/update notifications
func NewACPController ¶ added in v1.395.0
func NewACPController( sessionManagerProvider SessionManagerProvider, sessionCreator SessionCreator, ) *ACPController
NewACPController creates a new ACPController.
func (*ACPController) HandleRPC ¶ added in v1.395.0
func (c *ACPController) HandleRPC(ctx echo.Context) error
HandleRPC handles POST /acp (JSON-RPC 2.0).
func (*ACPController) HandleSessionSSE ¶ added in v1.396.0
func (c *ACPController) HandleSessionSSE(ctx echo.Context) error
HandleSessionSSE handles GET /acp with Acp-Session-Id header. Streams live session/update notifications from the per-session bridge until the client disconnects. History is NOT replayed here; clients fetch it separately.
type AssetController ¶ added in v1.468.0
type AssetController struct {
// contains filtered or unexported fields
}
AssetController handles static asset uploads.
func NewAssetController ¶ added in v1.468.0
func NewAssetController(store services.AssetStore) *AssetController
NewAssetController creates a new AssetController.
func (*AssetController) CreateAsset ¶ added in v1.468.0
func (c *AssetController) CreateAsset(ctx echo.Context) error
CreateAsset handles POST /assets.
type AssetResponse ¶ added in v1.468.0
AssetResponse is returned after uploading an asset.
type AuthController ¶
type AuthController struct {
// contains filtered or unexported fields
}
AuthController handles HTTP requests for authentication operations
func NewAuthController ¶
func NewAuthController( authenticateUserUC *auth.AuthenticateUserUseCase, validateAPIKeyUC *auth.ValidateAPIKeyUseCase, githubAuthenticateUC *auth.GitHubAuthenticateUseCase, validatePermissionUC *auth.ValidatePermissionUseCase, authPresenter presenters.AuthPresenter, ) *AuthController
NewAuthController creates a new AuthController
func (*AuthController) GitHubLogin ¶
func (c *AuthController) GitHubLogin(w http.ResponseWriter, r *http.Request)
GitHubLogin handles POST /auth/github
func (*AuthController) Login ¶
func (c *AuthController) Login(w http.ResponseWriter, r *http.Request)
Login handles POST /auth/login
func (*AuthController) Logout ¶
func (c *AuthController) Logout(w http.ResponseWriter, r *http.Request)
Logout handles POST /auth/logout
func (*AuthController) ValidateAPIKey ¶
func (c *AuthController) ValidateAPIKey(w http.ResponseWriter, r *http.Request)
ValidateAPIKey handles POST /auth/validate
type AuthInfoController ¶ added in v1.148.0
type AuthInfoController struct {
// contains filtered or unexported fields
}
AuthInfoController handles auth info-related HTTP requests
func NewAuthInfoController ¶ added in v1.148.0
func NewAuthInfoController(cfg *config.Config) *AuthInfoController
NewAuthInfoController creates a new AuthInfoController
func (*AuthInfoController) GetAuthStatus ¶ added in v1.148.0
func (c *AuthInfoController) GetAuthStatus(ctx echo.Context) error
GetAuthStatus returns current authentication status
type AuthMiddleware ¶
type AuthMiddleware struct {
// contains filtered or unexported fields
}
AuthMiddleware provides authentication middleware
func NewAuthMiddleware ¶
func NewAuthMiddleware( validateAPIKeyUC *auth.ValidateAPIKeyUseCase, authPresenter presenters.AuthPresenter, ) *AuthMiddleware
NewAuthMiddleware creates a new AuthMiddleware
func (*AuthMiddleware) Authenticate ¶
func (m *AuthMiddleware) Authenticate(next http.Handler) http.Handler
Authenticate is a middleware that validates API keys and sets user context
type AuthServiceForPersonalAPIKey ¶ added in v1.219.0
type AuthServiceForPersonalAPIKey interface {
LoadPersonalAPIKey(ctx context.Context, apiKey *entities.PersonalAPIKey) error
}
AuthServiceForPersonalAPIKey defines the interface for auth service methods needed by this controller
type AuthStatusResponse ¶ added in v1.148.0
type AuthStatusResponse struct {
Authenticated bool `json:"authenticated"`
AuthType string `json:"auth_type,omitempty"`
UserID string `json:"user_id,omitempty"`
Role string `json:"role,omitempty"`
Permissions []string `json:"permissions,omitempty"`
GitHubUser *auth.GitHubUserInfo `json:"github_user,omitempty"`
}
AuthStatusResponse represents the response for auth status
type AvailableManagerEntry ¶ added in v1.348.0
type AvailableManagerEntry struct {
ID string `json:"id"`
Name string `json:"name"`
Default bool `json:"default,omitempty"` // true if this manager is used when no manager_id is specified
Source string `json:"source"` // "user" or "team"
SourceName string `json:"source_name"` // user ID or team ID
}
AvailableManagerEntry represents a single available ESM entry returned by GET /settings/managers
type AvailableManagersResponse ¶ added in v1.348.0
type AvailableManagersResponse struct {
Managers []AvailableManagerEntry `json:"managers"`
}
AvailableManagersResponse is the response body for GET /settings/managers
type BedrockSettingsRequest ¶ added in v1.148.0
type BedrockSettingsRequest struct {
Enabled bool `json:"enabled"`
Model string `json:"model,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
RoleARN string `json:"role_arn,omitempty"`
Profile string `json:"profile,omitempty"`
}
BedrockSettingsRequest is the request body for Bedrock settings
type BedrockSettingsResponse ¶ added in v1.148.0
type BedrockSettingsResponse struct {
Enabled bool `json:"enabled"`
Model string `json:"model,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
RoleARN string `json:"role_arn,omitempty"`
Profile string `json:"profile,omitempty"`
}
BedrockSettingsResponse is the response body for Bedrock settings
type CodexAuthConfigResponse ¶ added in v1.425.0
type CodexAuthConfigResponse struct {
Configured bool `json:"configured"`
}
CodexAuthConfigResponse is returned by GET /codex/device-auth/config.
type CodexDeviceAuthController ¶ added in v1.425.0
type CodexDeviceAuthController struct {
// contains filtered or unexported fields
}
CodexDeviceAuthController runs `codex login --device-auth` and proxies the result to the credentials store. No OAuth app registration required.
func NewCodexDeviceAuthController ¶ added in v1.425.0
func NewCodexDeviceAuthController(repo repositories.CredentialsRepository) *CodexDeviceAuthController
NewCodexDeviceAuthController creates a new CodexDeviceAuthController.
func (*CodexDeviceAuthController) GetConfig ¶ added in v1.425.0
func (c *CodexDeviceAuthController) GetConfig(ctx echo.Context) error
GetConfig handles GET /codex/device-auth/config. Returns whether the codex CLI is available for device auth.
func (*CodexDeviceAuthController) GetName ¶ added in v1.425.0
func (c *CodexDeviceAuthController) GetName() string
GetName returns the controller name for logging.
func (*CodexDeviceAuthController) PollDeviceAuth ¶ added in v1.425.0
func (c *CodexDeviceAuthController) PollDeviceAuth(ctx echo.Context) error
PollDeviceAuth handles POST /codex/device-auth/token. Returns the current status for the calling user's in-progress auth session.
func (*CodexDeviceAuthController) StartDeviceAuth ¶ added in v1.425.0
func (c *CodexDeviceAuthController) StartDeviceAuth(ctx echo.Context) error
StartDeviceAuth handles POST /codex/device-auth. Runs `codex login --device-auth` and returns the user_code and verification_uri.
type CreateAssetRequest ¶ added in v1.468.0
type CreateAssetRequest struct {
HTML string `json:"html"`
}
CreateAssetRequest is the JSON request body for creating an HTML asset.
type CreateFileRequest ¶ added in v1.378.0
type CreateFileRequest struct {
Name string `json:"name"`
Path string `json:"path"`
Content string `json:"content"`
Permissions string `json:"permissions"`
}
CreateFileRequest is the request body for creating or updating a file.
type CreateMemoryRequest ¶ added in v1.242.0
type CreateMemoryRequest struct {
Title string `json:"title"`
Content string `json:"content"`
Scope string `json:"scope"` // "user" or "team"
TeamID string `json:"team_id,omitempty"` // required when scope=="team"
Tags map[string]string `json:"tags,omitempty"`
}
CreateMemoryRequest is the JSON body for POST /memories
type CreateSandboxPolicyRequest ¶ added in v1.432.0
type CreateSandboxPolicyRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
AllowedDomains []string `json:"allowed_domains,omitempty"`
DeniedDomains []string `json:"denied_domains,omitempty"`
CountMode bool `json:"count_mode,omitempty"`
Scope string `json:"scope"`
TeamID string `json:"team_id,omitempty"`
}
type CreateSessionProfileRequest ¶ added in v1.416.0
type CreateSessionProfileRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Scope entities.ResourceScope `json:"scope,omitempty"`
TeamID string `json:"team_id,omitempty"`
IsDefault bool `json:"is_default,omitempty"`
SelectorTags map[string]string `json:"selector_tags,omitempty"`
Config SessionProfileConfigRequest `json:"config"`
}
CreateSessionProfileRequest is the request body for creating a session profile
type CreateSubscriptionRequest ¶
type CreateSubscriptionRequest struct {
Type string `json:"type"`
Endpoint string `json:"endpoint"`
Keys map[string]string `json:"keys,omitempty"`
}
CreateSubscriptionRequest represents the HTTP request for creating a subscription
type CreateTaskGroupRequest ¶ added in v1.246.0
type CreateTaskGroupRequest struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Scope string `json:"scope"` // "user" or "team"
TeamID string `json:"team_id,omitempty"` // required when scope=="team"
}
CreateTaskGroupRequest is the JSON body for POST /task-groups
type CreateTaskRequest ¶ added in v1.246.0
type CreateTaskRequest struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
TaskType string `json:"task_type"` // "user" or "agent"
Scope string `json:"scope"` // "user" or "team"
TeamID string `json:"team_id,omitempty"` // required when scope=="team"
GroupID string `json:"group_id,omitempty"` // optional
SessionID string `json:"session_id,omitempty"` // optional, for agent tasks
Links []TaskLinkRequest `json:"links,omitempty"`
}
CreateTaskRequest is the JSON body for POST /tasks
type CredentialsController ¶ added in v1.362.0
type CredentialsController struct {
// contains filtered or unexported fields
}
CredentialsController handles credentials-related HTTP requests
func NewCredentialsController ¶ added in v1.362.0
func NewCredentialsController(repo repositories.CredentialsRepository) *CredentialsController
NewCredentialsController creates a new CredentialsController
func (*CredentialsController) DeleteCredentials ¶ added in v1.362.0
func (c *CredentialsController) DeleteCredentials(ctx echo.Context) error
DeleteCredentials handles DELETE /credentials/:name
func (*CredentialsController) GetCredentials ¶ added in v1.362.0
func (c *CredentialsController) GetCredentials(ctx echo.Context) error
GetCredentials handles GET /credentials/:name Returns metadata only — the raw credential data is never exposed via the API
func (*CredentialsController) GetName ¶ added in v1.362.0
func (c *CredentialsController) GetName() string
GetName returns the name of this controller for logging
func (*CredentialsController) UploadCredentials ¶ added in v1.362.0
func (c *CredentialsController) UploadCredentials(ctx echo.Context) error
UploadCredentials handles PUT /credentials/:name?type=<file_type> Accepts raw JSON body as credential data. The optional `type` query parameter selects which file to update:
- "codex_auth" → ~/.codex/auth.json (default)
- "claude_credentials" → ~/.claude/.credentials.json
type CredentialsFileInfo ¶ added in v1.363.0
type CredentialsFileInfo struct {
Type string `json:"type"` // e.g. "codex_auth" or "claude_credentials"
Path string `json:"path"` // absolute path inside the agent container
HasData bool `json:"has_data"` // whether content has been uploaded
}
CredentialsFileInfo holds per-file-type metadata in a CredentialsResponse.
type CredentialsResponse ¶ added in v1.362.0
type CredentialsResponse struct {
Name string `json:"name"`
HasData bool `json:"has_data"` // true if any file has been uploaded
Files []CredentialsFileInfo `json:"files"` // per-file-type status
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
CredentialsResponse is the response body for credentials (raw data is never returned).
type ExternalSessionManagerRequest ¶ added in v1.347.0
type ExternalSessionManagerRequest struct {
ID string `json:"id,omitempty"` // Auto-generated if empty
Name string `json:"name"` // Human-readable name
HMACSecret string `json:"hmac_secret,omitempty"` // Connection token; auto-generated if empty, omit to keep existing
Default bool `json:"default,omitempty"` // Use as default manager when no manager_id is specified
}
ExternalSessionManagerRequest represents a single external session manager registration
type ExternalSessionManagerResponse ¶ added in v1.347.0
type ExternalSessionManagerResponse struct {
ID string `json:"id"`
Name string `json:"name"`
HasConnectionToken bool `json:"has_connection_token"` // true if a connection token is configured
ConnectionToken string `json:"connection_token,omitempty"` // returned only immediately after generation or rotation
Default bool `json:"default,omitempty"` // true if this manager is used when no manager_id is specified
}
ExternalSessionManagerResponse represents a single external session manager in responses
type FileController ¶ added in v1.378.0
type FileController struct {
// contains filtered or unexported fields
}
FileController handles user-managed file endpoints.
func NewFileController ¶ added in v1.378.0
func NewFileController(repo portrepos.UserFileRepository) *FileController
NewFileController creates a new FileController.
func (*FileController) CreateFile ¶ added in v1.378.0
func (c *FileController) CreateFile(ctx echo.Context) error
CreateFile handles POST /files
func (*FileController) DeleteFile ¶ added in v1.378.0
func (c *FileController) DeleteFile(ctx echo.Context) error
DeleteFile handles DELETE /files/:fileId
func (*FileController) GetFile ¶ added in v1.378.0
func (c *FileController) GetFile(ctx echo.Context) error
GetFile handles GET /files/:fileId
func (*FileController) GetName ¶ added in v1.378.0
func (c *FileController) GetName() string
GetName returns the controller name for logging.
func (*FileController) ListFiles ¶ added in v1.378.0
func (c *FileController) ListFiles(ctx echo.Context) error
ListFiles handles GET /files
func (*FileController) UpdateFile ¶ added in v1.378.0
func (c *FileController) UpdateFile(ctx echo.Context) error
UpdateFile handles PUT /files/:fileId
type FileResponse ¶ added in v1.378.0
type FileResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Content string `json:"content"`
Permissions string `json:"permissions"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
FileResponse is the response body for a single file.
type FrontendIntegration ¶ added in v1.484.0
type FrontendIntegration struct {
ID string `json:"id"`
Provider string `json:"provider"`
Namespace string `json:"namespace,omitempty"`
CredentialID string `json:"credential_id"`
Name string `json:"name"`
IconURL string `json:"icon_url,omitempty"`
Description string `json:"description,omitempty"`
Released bool `json:"released"`
Source string `json:"source,omitempty"`
StartURL string `json:"start_url"`
AuthorizationURLEndpoint string `json:"authorization_url_endpoint,omitempty"`
Setup map[string]string `json:"setup,omitempty"`
Scopes []FrontendIntegrationScope `json:"scopes"`
Connected bool `json:"connected"`
}
FrontendIntegration mirrors scia's non-secret frontend metadata with proxy status.
type FrontendIntegrationScope ¶ added in v1.484.0
type FrontendIntegrationScope struct {
ID string `json:"id"`
Name string `json:"name"`
Desc string `json:"desc,omitempty"`
Group string `json:"group,omitempty"`
GroupName string `json:"group_name,omitempty"`
GroupDesc string `json:"group_desc,omitempty"`
Enabled bool `json:"enabled"`
}
FrontendIntegrationScope is one selectable OAuth scope in scia metadata.
type GetOrCreatePersonalAPIKeyUseCase ¶ added in v1.218.0
type GetOrCreatePersonalAPIKeyUseCase interface {
Execute(ctx context.Context, userID entities.UserID) (*entities.PersonalAPIKey, error)
}
GetOrCreatePersonalAPIKeyUseCase defines the interface for personal API key use case
type GitHubLoginRequest ¶
type GitHubLoginRequest struct {
Token string `json:"token"`
}
GitHubLoginRequest represents the HTTP request for GitHub login
type GitSyncConfigRequest ¶ added in v1.403.0
type GitSyncConfigRequest struct {
Enabled bool `json:"enabled"`
RepoFullName string `json:"repo_full_name"`
Branch string `json:"branch,omitempty"`
RootPath string `json:"root_path,omitempty"`
AutoPush bool `json:"auto_push"`
GitHubToken string `json:"github_token,omitempty"`
}
GitSyncConfigRequest is the request body for GitHub sync configuration
type GitSyncConfigResponse ¶ added in v1.403.0
type GitSyncConfigResponse struct {
Enabled bool `json:"enabled"`
RepoFullName string `json:"repo_full_name,omitempty"`
Branch string `json:"branch,omitempty"`
RootPath string `json:"root_path,omitempty"`
AutoPush bool `json:"auto_push"`
HasGitHubToken bool `json:"has_github_token"`
Encryption GitSyncEncryptionResponse `json:"encryption"`
}
GitSyncConfigResponse is the response for GitHub sync configuration (token redacted)
type GitSyncEncryptionResponse ¶ added in v1.403.0
type GitSyncEncryptionResponse struct {
DEKVersion int `json:"dek_version,omitempty"`
DEKReady bool `json:"dek_ready"`
}
GitSyncEncryptionResponse is the public encryption info for GitHub sync (no secrets)
type GoogleOAuthController ¶ added in v1.482.0
type GoogleOAuthController struct {
// contains filtered or unexported fields
}
GoogleOAuthController exposes non-secret scia Google OAuth integration status.
func NewGoogleOAuthController ¶ added in v1.482.0
func NewGoogleOAuthController(scia config.SciaConfig, client kubernetes.Interface, namespace string) *GoogleOAuthController
NewGoogleOAuthController creates a GoogleOAuthController.
func (*GoogleOAuthController) CreateAuthorizationURL ¶ added in v1.484.0
func (c *GoogleOAuthController) CreateAuthorizationURL(ctx echo.Context) error
CreateAuthorizationURL returns a scia-built OAuth authorization URL for one integration.
func (*GoogleOAuthController) GetIntegrations ¶ added in v1.484.0
func (c *GoogleOAuthController) GetIntegrations(ctx echo.Context) error
GetIntegrations returns scia frontend integration metadata for the current user.
func (*GoogleOAuthController) GetName ¶ added in v1.482.0
func (c *GoogleOAuthController) GetName() string
GetName returns the controller name.
func (*GoogleOAuthController) GetStatus ¶ added in v1.482.0
func (c *GoogleOAuthController) GetStatus(ctx echo.Context) error
GetStatus returns the user's scia Google OAuth integration status.
func (*GoogleOAuthController) RevokeIntegration ¶ added in v1.488.0
func (c *GoogleOAuthController) RevokeIntegration(ctx echo.Context) error
RevokeIntegration removes the stored OAuth token for one scia integration.
func (*GoogleOAuthController) WithPersonalAPIKeyRepository ¶ added in v1.489.0
func (c *GoogleOAuthController) WithPersonalAPIKeyRepository(repo portrepos.PersonalAPIKeyRepository) *GoogleOAuthController
WithPersonalAPIKeyRepository wires the user's personal API key into scia dynamic user authorization.
type GoogleOAuthStatusResponse ¶ added in v1.482.0
type GoogleOAuthStatusResponse struct {
Enabled bool `json:"enabled"`
HealthOK bool `json:"health_ok"`
HealthStatus string `json:"health_status,omitempty"`
ClientConfigured bool `json:"client_configured"`
Connected bool `json:"connected"`
Credential string `json:"credential,omitempty"`
UserNamespace string `json:"user_namespace,omitempty"`
OAuthStartURL string `json:"oauth_start_url,omitempty"`
AuthorizationURL string `json:"authorization_url_endpoint,omitempty"`
ProxyConfigured bool `json:"proxy_configured"`
}
GoogleOAuthStatusResponse is returned by GET /integrations/google-oauth/status.
type HealthController ¶ added in v1.148.0
type HealthController struct{}
HealthController handles health check endpoints
func NewHealthController ¶ added in v1.148.0
func NewHealthController() *HealthController
NewHealthController creates a new HealthController instance
func (*HealthController) GetName ¶ added in v1.148.0
func (c *HealthController) GetName() string
GetName returns the name of this controller for logging
func (*HealthController) HealthCheck ¶ added in v1.148.0
func (c *HealthController) HealthCheck(ctx echo.Context) error
HealthCheck handles GET /health requests to check server health
type IntegrationAuthorizationURLRequest ¶ added in v1.484.0
type IntegrationAuthorizationURLRequest struct {
RedirectURI string `json:"redirect_uri"`
ScopeIDs []string `json:"scope_ids"`
Scope string `json:"scope,omitempty"`
State string `json:"state,omitempty"`
}
IntegrationAuthorizationURLRequest asks scia to build a provider authorization URL.
type IntegrationAuthorizationURLResponse ¶ added in v1.484.0
type IntegrationAuthorizationURLResponse struct {
CredentialID string `json:"credential_id"`
AuthorizationURL string `json:"authorization_url"`
AuthURL string `json:"auth_url,omitempty"`
RedirectURI string `json:"redirect_uri,omitempty"`
Scope string `json:"scope,omitempty"`
}
IntegrationAuthorizationURLResponse is returned by scia's authorization-url endpoint.
type IntegrationRevokeResponse ¶ added in v1.488.0
type IntegrationRevokeResponse struct {
Revoked bool `json:"revoked"`
CredentialID string `json:"credential_id,omitempty"`
}
IntegrationRevokeResponse is returned after disconnecting a scia integration.
type IntegrationsResponse ¶ added in v1.484.0
type IntegrationsResponse struct {
Enabled bool `json:"enabled"`
HealthOK bool `json:"health_ok"`
HealthStatus string `json:"health_status,omitempty"`
Integrations []FrontendIntegration `json:"integrations"`
}
IntegrationsResponse is returned by GET /integrations.
type ListCredentialsResponse ¶ added in v1.362.0
type ListCredentialsResponse struct {
Credentials []CredentialsResponse `json:"credentials"`
}
ListCredentialsResponse is the response for listing credentials
type ListFilesResponse ¶ added in v1.378.0
type ListFilesResponse struct {
Files []FileResponse `json:"files"`
}
ListFilesResponse is the response body for listing files.
type LoginRequest ¶
type LoginRequest struct {
Type string `json:"type"` // "password", "token", "api_key"
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Token string `json:"token,omitempty"`
APIKey string `json:"api_key,omitempty"`
}
LoginRequest represents the HTTP request for user login
type MCPServerRequest ¶ added in v1.148.0
type MCPServerRequest struct {
Type string `json:"type"` // "stdio", "http", "sse"
URL string `json:"url,omitempty"` // for http/sse
Command string `json:"command,omitempty"` // for stdio
Args []string `json:"args,omitempty"` // for stdio
Env map[string]string `json:"env,omitempty"` // environment variables
Headers map[string]string `json:"headers,omitempty"` // for http/sse
}
MCPServerRequest is the request body for a single MCP server
type MCPServerResponse ¶ added in v1.148.0
type MCPServerResponse struct {
Type string `json:"type"`
URL string `json:"url,omitempty"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
EnvKeys []string `json:"env_keys,omitempty"` // only keys, not values
HeaderKeys []string `json:"header_keys,omitempty"` // only keys, not values
}
MCPServerResponse is the response body for a single MCP server
type MarketplaceRequest ¶ added in v1.148.0
type MarketplaceRequest struct {
URL string `json:"url"`
}
MarketplaceRequest is the request body for a single marketplace
type MarketplaceResponse ¶ added in v1.148.0
type MarketplaceResponse struct {
URL string `json:"url"`
}
MarketplaceResponse is the response body for a single marketplace
type MemoryController ¶ added in v1.242.0
type MemoryController struct {
// contains filtered or unexported fields
}
MemoryController handles memory entry HTTP requests
func NewMemoryController ¶ added in v1.242.0
func NewMemoryController(repo portrepos.MemoryRepository) *MemoryController
NewMemoryController creates a new MemoryController
func (*MemoryController) CreateMemory ¶ added in v1.242.0
func (c *MemoryController) CreateMemory(ctx echo.Context) error
CreateMemory handles POST /memories
func (*MemoryController) DeleteMemory ¶ added in v1.242.0
func (c *MemoryController) DeleteMemory(ctx echo.Context) error
DeleteMemory handles DELETE /memories/:memoryId
func (*MemoryController) GetMemory ¶ added in v1.242.0
func (c *MemoryController) GetMemory(ctx echo.Context) error
GetMemory handles GET /memories/:memoryId
func (*MemoryController) GetName ¶ added in v1.242.0
func (c *MemoryController) GetName() string
GetName returns the name of this controller for logging
func (*MemoryController) ListMemories ¶ added in v1.242.0
func (c *MemoryController) ListMemories(ctx echo.Context) error
ListMemories handles GET /memories Query params: scope, team_id, include_tag.*, exclude_tag.*, q
func (*MemoryController) UpdateMemory ¶ added in v1.242.0
func (c *MemoryController) UpdateMemory(ctx echo.Context) error
UpdateMemory handles PUT /memories/:memoryId
type MemoryListResponse ¶ added in v1.242.0
type MemoryListResponse struct {
Memories []*MemoryResponse `json:"memories"`
Total int `json:"total"`
}
MemoryListResponse wraps a list of memory entries
type MemoryResponse ¶ added in v1.242.0
type MemoryResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Scope string `json:"scope"`
OwnerID string `json:"owner_id"`
TeamID string `json:"team_id,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
MemoryResponse is the response for a single memory entry
type NotificationController ¶
type NotificationController struct {
// contains filtered or unexported fields
}
NotificationController handles HTTP requests for notification operations
func NewNotificationController ¶
func NewNotificationController( sendNotificationUC *notification.SendNotificationUseCase, manageSubscriptionUC *notification.ManageSubscriptionUseCase, notificationPresenter presenters.NotificationPresenter, ) *NotificationController
NewNotificationController creates a new NotificationController
func (*NotificationController) CreateSubscription ¶
func (c *NotificationController) CreateSubscription(w http.ResponseWriter, r *http.Request)
CreateSubscription handles POST /subscriptions
func (*NotificationController) DeleteSubscription ¶
func (c *NotificationController) DeleteSubscription(w http.ResponseWriter, r *http.Request)
DeleteSubscription handles DELETE /subscriptions/{id}
func (*NotificationController) SendNotification ¶
func (c *NotificationController) SendNotification(w http.ResponseWriter, r *http.Request)
SendNotification handles POST /notifications
type NotificationHandlers ¶ added in v1.148.0
type NotificationHandlers struct {
// contains filtered or unexported fields
}
NotificationHandlers handles notification-related HTTP requests This is a simpler handler that uses the notification.Service directly
func NewNotificationHandlers ¶ added in v1.148.0
func NewNotificationHandlers(service *notification.Service, sessionManager portrepos.SessionManager) *NotificationHandlers
NewNotificationHandlers creates new notification handlers
func (*NotificationHandlers) DeleteSubscription ¶ added in v1.148.0
func (h *NotificationHandlers) DeleteSubscription(c echo.Context) error
DeleteSubscription handles DELETE /notification/subscribe
func (*NotificationHandlers) GetHistory ¶ added in v1.148.0
func (h *NotificationHandlers) GetHistory(c echo.Context) error
GetHistory handles GET /notifications/history
func (*NotificationHandlers) GetSubscriptions ¶ added in v1.148.0
func (h *NotificationHandlers) GetSubscriptions(c echo.Context) error
GetSubscriptions handles GET /notification/subscribe
func (*NotificationHandlers) SendNotification ¶ added in v1.336.0
func (h *NotificationHandlers) SendNotification(c echo.Context) error
SendNotification handles POST /notifications/send
Routing logic:
- session_id provided: look up the session via SessionManager.
- team-scoped session → no notification is sent (return success).
- user-scoped session → resolve to the session owner's user_id and send.
- user_id provided: send directly to that user.
type PersonalAPIKeyController ¶ added in v1.218.0
type PersonalAPIKeyController struct {
// contains filtered or unexported fields
}
PersonalAPIKeyController handles personal API key related requests
func NewPersonalAPIKeyController ¶ added in v1.218.0
func NewPersonalAPIKeyController( getOrCreateAPIKeyUC GetOrCreatePersonalAPIKeyUseCase, authService AuthServiceForPersonalAPIKey, ) *PersonalAPIKeyController
NewPersonalAPIKeyController creates a new PersonalAPIKeyController
func (*PersonalAPIKeyController) GetOrCreatePersonalAPIKey ¶ added in v1.218.0
func (c *PersonalAPIKeyController) GetOrCreatePersonalAPIKey(ctx echo.Context) error
GetOrCreatePersonalAPIKey handles GET /users/me/api-key and POST /users/me/api-key requests GET returns the existing API key (without revealing the key value for security) POST creates a new API key or regenerates if one already exists
type PollDeviceAuthResponse ¶ added in v1.425.0
type PollDeviceAuthResponse struct {
// Status is one of "pending", "authorized", "denied".
Status string `json:"status"`
}
PollDeviceAuthResponse is returned by POST /codex/device-auth/token.
type ProvisionerController ¶ added in v1.448.0
type ProvisionerController struct {
// contains filtered or unexported fields
}
func NewProvisionerController ¶ added in v1.448.0
func NewProvisionerController(manager *services.KubernetesSessionManager, allocationQueue sessionallocation.Queue, settingsRepo repositories.SettingsRepository, sessionRouteRepo repositories.SessionRouteRepository) *ProvisionerController
func (*ProvisionerController) CompleteExternalSessionAllocation ¶ added in v1.450.0
func (pc *ProvisionerController) CompleteExternalSessionAllocation(c echo.Context) error
func (*ProvisionerController) CompleteSessionAllocation ¶ added in v1.448.0
func (pc *ProvisionerController) CompleteSessionAllocation(c echo.Context) error
func (*ProvisionerController) Connect ¶ added in v1.448.0
func (pc *ProvisionerController) Connect(c echo.Context) error
func (*ProvisionerController) GetNextExternalSessionAllocation ¶ added in v1.450.0
func (pc *ProvisionerController) GetNextExternalSessionAllocation(c echo.Context) error
func (*ProvisionerController) GetNextSessionAllocation ¶ added in v1.448.0
func (pc *ProvisionerController) GetNextSessionAllocation(c echo.Context) error
func (*ProvisionerController) GetProvisionRequest ¶ added in v1.448.0
func (pc *ProvisionerController) GetProvisionRequest(c echo.Context) error
func (*ProvisionerController) UpdateProvisionRequestStatus ¶ added in v1.448.0
func (pc *ProvisionerController) UpdateProvisionRequestStatus(c echo.Context) error
type ProxyMessageWatcher ¶ added in v1.386.0
type ProxyMessageWatcher interface {
SubscribeMessageEvents(sessionID string) (<-chan services.SessionMessageEvent, func())
}
ProxyMessageWatcher is implemented by session managers that support per-session real-time message update notifications via long polling. KubernetesSessionManager implements this interface.
type ProxyStatusWatcher ¶ added in v1.385.0
type ProxyStatusWatcher interface {
SubscribeStatusEvents() (<-chan services.SessionStatusEvent, func())
}
ProxyStatusWatcher is implemented by session managers that support proxy-wide real-time status change notifications. KubernetesSessionManager implements this. The session controller uses a type-assertion to obtain this capability, keeping the core SessionManager interface unchanged.
type ResourceTransferController ¶ added in v1.469.0
type ResourceTransferController struct {
// contains filtered or unexported fields
}
func NewResourceTransferController ¶ added in v1.469.0
func NewResourceTransferController(uc *resource_transfer.UseCase) *ResourceTransferController
func (*ResourceTransferController) GetName ¶ added in v1.469.0
func (c *ResourceTransferController) GetName() string
func (*ResourceTransferController) TransferResource ¶ added in v1.469.0
func (c *ResourceTransferController) TransferResource(ctx echo.Context) error
type SandboxDomainsResponse ¶ added in v1.434.0
type SandboxDomainsResponse struct {
Allowed []string `json:"allowed"`
Denied []string `json:"denied"`
}
SandboxDomainsResponse is the JSON body returned by GET /sessions/:sessionId/sandbox-domains.
type SandboxPolicyController ¶ added in v1.432.0
type SandboxPolicyController struct {
// contains filtered or unexported fields
}
SandboxPolicyController handles sandbox policy HTTP requests.
func NewSandboxPolicyController ¶ added in v1.432.0
func NewSandboxPolicyController(repo portrepos.SandboxPolicyRepository, domainRepo *repositories.KubernetesSandboxDomainRepository) *SandboxPolicyController
func (*SandboxPolicyController) CreateSandboxPolicy ¶ added in v1.432.0
func (c *SandboxPolicyController) CreateSandboxPolicy(ctx echo.Context) error
CreateSandboxPolicy handles POST /sandbox-policies
func (*SandboxPolicyController) DeleteSandboxPolicy ¶ added in v1.432.0
func (c *SandboxPolicyController) DeleteSandboxPolicy(ctx echo.Context) error
DeleteSandboxPolicy handles DELETE /sandbox-policies/:id
func (*SandboxPolicyController) GetName ¶ added in v1.432.0
func (c *SandboxPolicyController) GetName() string
func (*SandboxPolicyController) GetSandboxPolicy ¶ added in v1.432.0
func (c *SandboxPolicyController) GetSandboxPolicy(ctx echo.Context) error
GetSandboxPolicy handles GET /sandbox-policies/:id
func (*SandboxPolicyController) GetSandboxPolicyDomains ¶ added in v1.434.0
func (c *SandboxPolicyController) GetSandboxPolicyDomains(ctx echo.Context) error
GetSandboxPolicyDomains handles GET /sandbox-policies/:id/domains. Returns the aggregated domain log collected by the background worker.
func (*SandboxPolicyController) ListSandboxPolicies ¶ added in v1.432.0
func (c *SandboxPolicyController) ListSandboxPolicies(ctx echo.Context) error
ListSandboxPolicies handles GET /sandbox-policies
func (*SandboxPolicyController) UpdateIgnoredDomains ¶ added in v1.436.0
func (c *SandboxPolicyController) UpdateIgnoredDomains(ctx echo.Context) error
UpdateIgnoredDomains handles PUT /sandbox-policies/:id/domains/ignored. Replaces the ignored domain list for the given policy's collected domain data.
func (*SandboxPolicyController) UpdateSandboxPolicy ¶ added in v1.432.0
func (c *SandboxPolicyController) UpdateSandboxPolicy(ctx echo.Context) error
UpdateSandboxPolicy handles PUT /sandbox-policies/:id
type SandboxPolicyDomainsResponse ¶ added in v1.434.0
type SandboxPolicyDomainsResponse struct {
Allowed []string `json:"allowed"`
Denied []string `json:"denied"`
Ignored []string `json:"ignored"`
UpdatedAt string `json:"updated_at,omitempty"`
}
SandboxPolicyDomainsResponse is the JSON body returned by GET /sandbox-policies/:id/domains.
type SandboxPolicyListResponse ¶ added in v1.432.0
type SandboxPolicyListResponse struct {
SandboxPolicies []*SandboxPolicyResponse `json:"sandbox_policies"`
Total int `json:"total"`
}
type SandboxPolicyResponse ¶ added in v1.432.0
type SandboxPolicyResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
AllowedDomains []string `json:"allowed_domains,omitempty"`
DeniedDomains []string `json:"denied_domains,omitempty"`
CountMode bool `json:"count_mode,omitempty"`
Scope string `json:"scope"`
OwnerID string `json:"owner_id"`
TeamID string `json:"team_id,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type SendNotificationRequest ¶
type SendNotificationRequest struct {
Title string `json:"title"`
Body string `json:"body"`
URL *string `json:"url,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
IconURL *string `json:"icon_url,omitempty"`
}
SendNotificationRequest represents the HTTP request for sending a notification
type SessionController ¶
type SessionController struct {
// contains filtered or unexported fields
}
SessionController handles session management endpoints
func NewSessionController ¶
func NewSessionController( sessionManagerProvider SessionManagerProvider, sessionCreator SessionCreator, opts ...SessionControllerOption, ) *SessionController
NewSessionController creates a new SessionController instance
func (*SessionController) DeleteSession ¶
func (c *SessionController) DeleteSession(ctx echo.Context) error
DeleteSession handles DELETE /sessions/:sessionId requests to terminate a session
func (*SessionController) GetName ¶ added in v1.148.0
func (c *SessionController) GetName() string
GetName returns the name of this handler for logging
func (*SessionController) GetSessionSandboxDomains ¶ added in v1.434.0
func (c *SessionController) GetSessionSandboxDomains(ctx echo.Context) error
GetSessionSandboxDomains handles GET /sessions/:sessionId/sandbox-domains. It forwards the request to the session's agent-provisioner /sandbox-domains endpoint, which in turn queries the network filter control server (127.0.0.1:3129/domains). Returns 404 when the session does not exist, 503 when the network filter is unavailable.
func (*SessionController) RegisterRoutes ¶ added in v1.148.0
func (c *SessionController) RegisterRoutes(e *echo.Echo) error
RegisterRoutes registers session management routes
func (*SessionController) RouteToSession ¶ added in v1.148.0
func (c *SessionController) RouteToSession(ctx echo.Context) error
RouteToSession routes requests to the appropriate agentapi server instance
func (*SessionController) SearchSessions ¶ added in v1.148.0
func (c *SessionController) SearchSessions(ctx echo.Context) error
SearchSessions handles GET /search requests to list and filter active sessions
func (*SessionController) StartSession ¶ added in v1.148.0
func (c *SessionController) StartSession(ctx echo.Context) error
StartSession handles POST /start requests to start a new agentapi server
func (*SessionController) StreamSessionsStatus ¶ added in v1.385.0
func (c *SessionController) StreamSessionsStatus(ctx echo.Context) error
StreamSessionsStatus handles GET /sessions/status/stream. It opens a Server-Sent Events stream that pushes a SessionStatusEvent whenever any session accessible to the authenticated user changes its status. A heartbeat comment is sent every 30 seconds to keep the connection alive.
func (*SessionController) UpdateSessionAnnotations ¶ added in v1.499.0
func (c *SessionController) UpdateSessionAnnotations(ctx echo.Context) error
UpdateSessionAnnotations handles PATCH /sessions/:sessionId/annotations.
func (*SessionController) WaitSessionMessages ¶ added in v1.386.0
func (c *SessionController) WaitSessionMessages(ctx echo.Context) error
WaitSessionMessages handles GET /sessions/:sessionId/messages/wait. It blocks until a message_update event is received from the agentapi backend for the specified session, then returns {"updated": true, "session_id": "...", "timestamp": "..."}. If the timeout elapses before any message update, it returns {"updated": false}.
Query parameters:
- timeout: max wait time in seconds (default 30, max 60)
- since: Unix timestamp in milliseconds (or RFC3339 string) of the last known update. If the session has received a message_update after this timestamp, the response is returned immediately without waiting. This allows clients that were inactive to catch up to the latest state on their next poll.
func (*SessionController) WaitSessionsStatus ¶ added in v1.385.0
func (c *SessionController) WaitSessionsStatus(ctx echo.Context) error
WaitSessionsStatus handles GET /sessions/status/wait. It blocks until any session accessible to the authenticated user changes status, then returns the event as JSON. If the timeout elapses before any change, it returns `{"events": []}`.
Query parameters:
- timeout: max wait time in seconds (default 30, max 60)
type SessionControllerOption ¶ added in v1.347.0
type SessionControllerOption func(*SessionController)
SessionControllerOption is a functional option for SessionController
func WithSessionProfileRepository ¶ added in v1.416.0
func WithSessionProfileRepository(repo repositories.SessionProfileRepository) SessionControllerOption
WithSessionProfileRepository sets the session profile repository on the controller
func WithSessionRouteRepository ¶ added in v1.347.0
func WithSessionRouteRepository(repo repositories.SessionRouteRepository) SessionControllerOption
WithSessionRouteRepository sets the session route repository on the controller
func WithSettingsRepository ¶ added in v1.347.0
func WithSettingsRepository(repo repositories.SettingsRepository) SessionControllerOption
WithSettingsRepository sets the settings repository on the controller
type SessionCreator ¶ added in v1.148.0
type SessionCreator interface {
CreateSession(sessionID string, req entities.StartRequest, userID, userRole string, teams []string) (entities.Session, error)
DeleteSessionByID(sessionID string) error
}
SessionCreator is an interface for creating sessions
type SessionManagerProvider ¶ added in v1.148.0
type SessionManagerProvider interface {
GetSessionManager() repositories.SessionManager
}
SessionManagerProvider provides access to the session manager This allows the session manager to be swapped at runtime (e.g., for testing)
type SessionProfileConfigRequest ¶ added in v1.416.0
type SessionProfileConfigRequest struct {
Environment map[string]string `json:"environment,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
InitialMessageTemplate string `json:"initial_message_template,omitempty"`
ReuseMessageTemplate string `json:"reuse_message_template,omitempty"`
Params *entities.SessionParams `json:"params,omitempty"`
ReuseSession bool `json:"reuse_session,omitempty"`
MemoryKey map[string]string `json:"memory_key,omitempty"`
SandboxPolicyID string `json:"sandbox_policy_id,omitempty"`
SessionTTL string `json:"session_ttl,omitempty"`
UnsyncedFilePaths []string `json:"unsynced_file_paths,omitempty"`
}
SessionProfileConfigRequest represents session profile config in requests
type SessionProfileConfigResponse ¶ added in v1.416.0
type SessionProfileConfigResponse struct {
Environment map[string]string `json:"environment,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
InitialMessageTemplate string `json:"initial_message_template,omitempty"`
ReuseMessageTemplate string `json:"reuse_message_template,omitempty"`
Params *entities.SessionParams `json:"params,omitempty"`
ReuseSession bool `json:"reuse_session,omitempty"`
MemoryKey map[string]string `json:"memory_key,omitempty"`
SandboxPolicyID string `json:"sandbox_policy_id,omitempty"`
SessionTTL string `json:"session_ttl,omitempty"`
UnsyncedFilePaths []string `json:"unsynced_file_paths,omitempty"`
}
SessionProfileConfigResponse represents session profile config in responses
type SessionProfileController ¶ added in v1.416.0
type SessionProfileController struct {
// contains filtered or unexported fields
}
SessionProfileController handles session profile CRUD endpoints
func NewSessionProfileController ¶ added in v1.416.0
func NewSessionProfileController(repo repositories.SessionProfileRepository) *SessionProfileController
NewSessionProfileController creates a new SessionProfileController
func (*SessionProfileController) CreateSessionProfile ¶ added in v1.416.0
func (c *SessionProfileController) CreateSessionProfile(ctx echo.Context) error
CreateSessionProfile handles POST /session-profiles
func (*SessionProfileController) DeleteSessionProfile ¶ added in v1.416.0
func (c *SessionProfileController) DeleteSessionProfile(ctx echo.Context) error
DeleteSessionProfile handles DELETE /session-profiles/:id
func (*SessionProfileController) GetName ¶ added in v1.416.0
func (c *SessionProfileController) GetName() string
GetName returns the name of this controller for logging
func (*SessionProfileController) GetSessionProfile ¶ added in v1.416.0
func (c *SessionProfileController) GetSessionProfile(ctx echo.Context) error
GetSessionProfile handles GET /session-profiles/:id
func (*SessionProfileController) ListSessionProfiles ¶ added in v1.416.0
func (c *SessionProfileController) ListSessionProfiles(ctx echo.Context) error
ListSessionProfiles handles GET /session-profiles
func (*SessionProfileController) UpdateSessionProfile ¶ added in v1.416.0
func (c *SessionProfileController) UpdateSessionProfile(ctx echo.Context) error
UpdateSessionProfile handles PUT /session-profiles/:id
type SessionProfileResponse ¶ added in v1.416.0
type SessionProfileResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
UserID string `json:"user_id"`
Scope entities.ResourceScope `json:"scope,omitempty"`
TeamID string `json:"team_id,omitempty"`
IsDefault bool `json:"is_default,omitempty"`
SelectorTags map[string]string `json:"selector_tags,omitempty"`
Config SessionProfileConfigResponse `json:"config"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
SessionProfileResponse is the response for a session profile
type SettingsController ¶ added in v1.148.0
type SettingsController struct {
// contains filtered or unexported fields
}
SettingsController handles settings-related HTTP requests
func NewSettingsController ¶ added in v1.148.0
func NewSettingsController(repo repositories.SettingsRepository, notificationSvc *notification.Service, gitSyncKMSKeyARN, gitSyncAWSRegion string) *SettingsController
NewSettingsController creates new settings controller
func (*SettingsController) DeleteGitSync ¶ added in v1.403.0
func (c *SettingsController) DeleteGitSync(ctx echo.Context) error
DeleteGitSync handles DELETE /settings/:name/sync Removes only the GitHub sync configuration from the specified settings.
func (*SettingsController) DeleteSettings ¶ added in v1.148.0
func (c *SettingsController) DeleteSettings(ctx echo.Context) error
DeleteSettings handles DELETE /settings/:name
func (*SettingsController) GetAvailableManagers ¶ added in v1.348.0
func (c *SettingsController) GetAvailableManagers(ctx echo.Context) error
GetAvailableManagers handles GET /settings/managers Returns all external session managers available to the authenticated user: managers from their own settings plus managers from every team they belong to. HMAC secrets are NOT included in this response.
func (*SettingsController) GetName ¶ added in v1.148.0
func (c *SettingsController) GetName() string
GetName returns the name of this controller for logging
func (*SettingsController) GetSettings ¶ added in v1.148.0
func (c *SettingsController) GetSettings(ctx echo.Context) error
GetSettings handles GET /settings/:name
func (*SettingsController) UpdateSettings ¶ added in v1.148.0
func (c *SettingsController) UpdateSettings(ctx echo.Context) error
UpdateSettings handles PUT /settings/:name
type SettingsResponse ¶ added in v1.148.0
type SettingsResponse struct {
Name string `json:"name"`
Bedrock *BedrockSettingsResponse `json:"bedrock,omitempty"`
MCPServers map[string]*MCPServerResponse `json:"mcp_servers,omitempty"`
Marketplaces map[string]*MarketplaceResponse `json:"marketplaces,omitempty"`
HasClaudeCodeOAuthToken bool `json:"has_claude_code_oauth_token"`
AuthMode string `json:"auth_mode,omitempty"`
EnabledPlugins []string `json:"enabled_plugins,omitempty"` // plugin@marketplace format
EnvVarKeys []string `json:"env_var_keys,omitempty"` // only keys, not values
PreferredTeamID string `json:"preferred_team_id,omitempty"` // "org/team-slug" format
SlackUserID string `json:"slack_user_id,omitempty"` // Slack DM notification user ID
NotificationChannels []string `json:"notification_channels,omitempty"` // Active notification channels
ExternalSessionManagers []ExternalSessionManagerResponse `json:"external_session_managers,omitempty"` // Registered external session managers
GitSync *GitSyncConfigResponse `json:"git_sync,omitempty"` // GitHub sync configuration (token redacted)
DefaultSessionProfileID string `json:"default_session_profile_id,omitempty"` // Default session profile ID for this settings scope
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
SettingsResponse is the response body for settings
type ShareController ¶ added in v1.148.0
type ShareController struct {
// contains filtered or unexported fields
}
ShareController handles session sharing endpoints
func NewShareController ¶ added in v1.148.0
func NewShareController( sessionManagerProvider SessionManagerProvider, shareRepo repositories.ShareRepository, ) *ShareController
NewShareController creates a new ShareController instance
func (*ShareController) CreateShare ¶ added in v1.148.0
func (c *ShareController) CreateShare(ctx echo.Context) error
CreateShare handles POST /sessions/:sessionId/share to create a share URL
func (*ShareController) DeleteShare ¶ added in v1.148.0
func (c *ShareController) DeleteShare(ctx echo.Context) error
DeleteShare handles DELETE /sessions/:sessionId/share to revoke share
func (*ShareController) GetName ¶ added in v1.148.0
func (c *ShareController) GetName() string
GetName returns the name of this handler for logging
func (*ShareController) GetShare ¶ added in v1.148.0
func (c *ShareController) GetShare(ctx echo.Context) error
GetShare handles GET /sessions/:sessionId/share to get share status
func (*ShareController) RouteToSharedSession ¶ added in v1.148.0
func (c *ShareController) RouteToSharedSession(ctx echo.Context) error
RouteToSharedSession handles ANY /s/:shareToken/* to access shared session
type StartDeviceAuthResponse ¶ added in v1.425.0
type StartDeviceAuthResponse struct {
UserCode string `json:"user_code"`
VerificationURI string `json:"verification_uri"`
}
StartDeviceAuthResponse is returned by POST /codex/device-auth.
type TaskController ¶ added in v1.246.0
type TaskController struct {
// contains filtered or unexported fields
}
TaskController handles task HTTP requests
func NewTaskController ¶ added in v1.246.0
func NewTaskController(repo portrepos.TaskRepository) *TaskController
NewTaskController creates a new TaskController
func (*TaskController) CreateTask ¶ added in v1.246.0
func (c *TaskController) CreateTask(ctx echo.Context) error
CreateTask handles POST /tasks
func (*TaskController) DeleteTask ¶ added in v1.246.0
func (c *TaskController) DeleteTask(ctx echo.Context) error
DeleteTask handles DELETE /tasks/:taskId
func (*TaskController) GetName ¶ added in v1.246.0
func (c *TaskController) GetName() string
GetName returns the name of this controller for logging
func (*TaskController) GetTask ¶ added in v1.246.0
func (c *TaskController) GetTask(ctx echo.Context) error
GetTask handles GET /tasks/:taskId
func (*TaskController) ListTasks ¶ added in v1.246.0
func (c *TaskController) ListTasks(ctx echo.Context) error
ListTasks handles GET /tasks Query params: scope, team_id, group_id, status, task_type
func (*TaskController) UpdateTask ¶ added in v1.246.0
func (c *TaskController) UpdateTask(ctx echo.Context) error
UpdateTask handles PUT /tasks/:taskId
type TaskGroupController ¶ added in v1.246.0
type TaskGroupController struct {
// contains filtered or unexported fields
}
TaskGroupController handles task group HTTP requests
func NewTaskGroupController ¶ added in v1.246.0
func NewTaskGroupController(repo portrepos.TaskGroupRepository) *TaskGroupController
NewTaskGroupController creates a new TaskGroupController
func (*TaskGroupController) CreateTaskGroup ¶ added in v1.246.0
func (c *TaskGroupController) CreateTaskGroup(ctx echo.Context) error
CreateTaskGroup handles POST /task-groups
func (*TaskGroupController) DeleteTaskGroup ¶ added in v1.246.0
func (c *TaskGroupController) DeleteTaskGroup(ctx echo.Context) error
DeleteTaskGroup handles DELETE /task-groups/:groupId
func (*TaskGroupController) GetName ¶ added in v1.246.0
func (c *TaskGroupController) GetName() string
GetName returns the name of this controller for logging
func (*TaskGroupController) GetTaskGroup ¶ added in v1.246.0
func (c *TaskGroupController) GetTaskGroup(ctx echo.Context) error
GetTaskGroup handles GET /task-groups/:groupId
func (*TaskGroupController) ListTaskGroups ¶ added in v1.246.0
func (c *TaskGroupController) ListTaskGroups(ctx echo.Context) error
ListTaskGroups handles GET /task-groups Query params: scope, team_id
func (*TaskGroupController) UpdateTaskGroup ¶ added in v1.246.0
func (c *TaskGroupController) UpdateTaskGroup(ctx echo.Context) error
UpdateTaskGroup handles PUT /task-groups/:groupId
type TaskGroupListResponse ¶ added in v1.246.0
type TaskGroupListResponse struct {
TaskGroups []*TaskGroupResponse `json:"task_groups"`
Total int `json:"total"`
}
TaskGroupListResponse wraps a list of task groups
type TaskGroupResponse ¶ added in v1.246.0
type TaskGroupResponse struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Scope string `json:"scope"`
OwnerID string `json:"owner_id"`
TeamID string `json:"team_id,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
TaskGroupResponse is the response for a single task group
type TaskLinkRequest ¶ added in v1.246.0
TaskLinkRequest is the JSON body for a task link
type TaskLinkResponse ¶ added in v1.246.0
type TaskLinkResponse struct {
ID string `json:"id"`
URL string `json:"url"`
Title string `json:"title,omitempty"`
}
TaskLinkResponse is the response for a single task link
type TaskListResponse ¶ added in v1.246.0
type TaskListResponse struct {
Tasks []*TaskResponse `json:"tasks"`
Total int `json:"total"`
}
TaskListResponse wraps a list of tasks
type TaskResponse ¶ added in v1.246.0
type TaskResponse struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Status string `json:"status"`
TaskType string `json:"task_type"`
Scope string `json:"scope"`
OwnerID string `json:"owner_id"`
TeamID string `json:"team_id,omitempty"`
GroupID string `json:"group_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
Links []TaskLinkResponse `json:"links"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
TaskResponse is the response for a single task
type TransferResourceRequest ¶ added in v1.469.0
type TransferResourceRequest struct {
ResourceType string `json:"resource_type"`
ResourceID string `json:"resource_id"`
TargetScope string `json:"target_scope"`
TargetUserID string `json:"target_user_id,omitempty"`
TargetTeamID string `json:"target_team_id,omitempty"`
DryRun bool `json:"dry_run,omitempty"`
}
type UpdateFileRequest ¶ added in v1.378.0
type UpdateFileRequest struct {
Name *string `json:"name"`
Path *string `json:"path"`
Content *string `json:"content"`
Permissions *string `json:"permissions"`
}
UpdateFileRequest is the request body for updating an existing file.
type UpdateIgnoredDomainsRequest ¶ added in v1.436.0
type UpdateIgnoredDomainsRequest struct {
Ignored []string `json:"ignored"`
}
UpdateIgnoredDomainsRequest is the JSON body for PUT /sandbox-policies/:id/domains/ignored.
type UpdateMemoryRequest ¶ added in v1.242.0
type UpdateMemoryRequest struct {
Title *string `json:"title,omitempty"`
Content *string `json:"content,omitempty"`
// Tags, when present (even as {}), replaces ALL existing tags.
// When the field is absent from the JSON body, existing tags are preserved.
Tags *map[string]string `json:"tags,omitempty"`
}
UpdateMemoryRequest is the JSON body for PUT /memories/:memoryId. All fields are optional; omitted/null fields are not changed.
type UpdateSandboxPolicyRequest ¶ added in v1.432.0
type UpdateSessionProfileRequest ¶ added in v1.416.0
type UpdateSessionProfileRequest struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
IsDefault *bool `json:"is_default,omitempty"`
SelectorTags map[string]string `json:"selector_tags,omitempty"`
Config *SessionProfileConfigRequest `json:"config,omitempty"`
}
UpdateSessionProfileRequest is the request body for updating a session profile
type UpdateSettingsRequest ¶ added in v1.148.0
type UpdateSettingsRequest struct {
Bedrock *BedrockSettingsRequest `json:"bedrock"`
MCPServers map[string]*MCPServerRequest `json:"mcp_servers,omitempty"`
Marketplaces map[string]*MarketplaceRequest `json:"marketplaces,omitempty"`
ClaudeCodeOAuthToken *string `json:"claude_code_oauth_token,omitempty"`
AuthMode *string `json:"auth_mode,omitempty"` // "oauth" or "bedrock"
EnabledPlugins []string `json:"enabled_plugins,omitempty"` // plugin@marketplace format
EnvVars map[string]string `json:"env_vars,omitempty"` // Custom environment variables
PreferredTeamID *string `json:"preferred_team_id,omitempty"` // "org/team-slug" format; "" to clear
SlackUserID *string `json:"slack_user_id,omitempty"` // Slack DM notification user ID
NotificationChannels *[]string `json:"notification_channels,omitempty"` // Active notification channels (e.g. ["web", "slack"])
ExternalSessionManagers *[]ExternalSessionManagerRequest `json:"external_session_managers,omitempty"` // External session managers (External Session Manager registrations)
GitSync *GitSyncConfigRequest `json:"git_sync,omitempty"` // GitHub sync configuration
DefaultSessionProfileID *string `json:"default_session_profile_id,omitempty"` // Default session profile ID for this settings scope
}
UpdateSettingsRequest is the request body for updating settings
type UpdateTaskGroupRequest ¶ added in v1.246.0
type UpdateTaskGroupRequest struct {
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
}
UpdateTaskGroupRequest is the JSON body for PUT /task-groups/:groupId
type UpdateTaskRequest ¶ added in v1.246.0
type UpdateTaskRequest struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
Status *string `json:"status,omitempty"`
GroupID *string `json:"group_id,omitempty"`
SessionID *string `json:"session_id,omitempty"`
Links *[]TaskLinkRequest `json:"links,omitempty"`
}
UpdateTaskRequest is the JSON body for PUT /tasks/:taskId. All fields are optional; omitted/null fields are not changed.
type UserController ¶ added in v1.148.0
type UserController struct{}
UserController handles user-related endpoints
func NewUserController ¶ added in v1.148.0
func NewUserController() *UserController
NewUserController creates a new UserController instance
func (*UserController) GetName ¶ added in v1.148.0
func (c *UserController) GetName() string
GetName returns the name of this controller for logging
func (*UserController) GetUserInfo ¶ added in v1.148.0
func (c *UserController) GetUserInfo(ctx echo.Context) error
GetUserInfo handles GET /user/info requests
type UserInfoResponse ¶ added in v1.148.0
type UserInfoResponse struct {
Username string `json:"username"`
Teams []string `json:"teams"`
IsAdmin bool `json:"is_admin"`
}
UserInfoResponse represents the response for /user/info endpoint
Source Files
¶
- acp_controller.go
- asset_controller.go
- auth_controller.go
- auth_info_controller.go
- codex_device_auth_controller.go
- credentials_controller.go
- file_controller.go
- google_oauth_controller.go
- health_controller.go
- helpers.go
- memory_controller.go
- notification_controller.go
- notification_handlers.go
- personal_api_key_controller.go
- provisioner_controller.go
- resource_transfer_controller.go
- sandbox_policy_controller.go
- session_controller.go
- session_message_controller.go
- session_profile_controller.go
- session_status_controller.go
- settings_controller.go
- share_controller.go
- task_controller.go
- task_group_controller.go
- user_controller.go