apiv1

package
v0.1.147 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpServerBaseRoute string = "/api/v1"
	HttpServerRootRoute string = ""
)

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(c echo.Context, code int, message string) error

ErrorResponse returns an error response

func HTTPBadRequest

func HTTPBadRequest(message string) error

func HTTPConflict

func HTTPConflict(message string) error

func HTTPForbidden

func HTTPForbidden(message string) error

func HTTPInternalServerError

func HTTPInternalServerError(message string) error

func HTTPNotFound

func HTTPNotFound() error

func HTTPUnauthorized

func HTTPUnauthorized(message string) error

func NewFilesystemAuthMiddleware

func NewFilesystemAuthMiddleware(cfg FilesystemAuthConfig) echo.MiddlewareFunc

NewFilesystemAuthMiddleware creates middleware that validates workspace access It accepts both admin tokens and workspace tokens

func NewHTTPError

func NewHTTPError(code int, message string) error

func NewWorkspaceAuthMiddleware

func NewWorkspaceAuthMiddleware(cfg WorkspaceAuthConfig) echo.MiddlewareFunc

NewWorkspaceAuthMiddleware validates workspace access for admin and member tokens.

func RequireAdmin

func RequireAdmin() echo.MiddlewareFunc

RequireAdmin middleware requires admin role or cluster admin.

func SuccessResponse

func SuccessResponse(c echo.Context, data interface{}) error

SuccessResponse returns a successful response

func WithAuthContext

func WithAuthContext(ctx context.Context, workspaceID string, workspaceExt string) context.Context

WithAuthContext is a helper to wrap handlers that need auth context

Types

type AccessLogGroup added in v0.1.47

type AccessLogGroup struct {
	// contains filtered or unexported fields
}

AccessLogGroup exposes workspace access logs from S2 streams.

func NewAccessLogGroup added in v0.1.47

func NewAccessLogGroup(
	routerGroup *echo.Group,
	backend repository.BackendRepository,
	s2Client *common.S2Client,
	sourceService *services.SourceService,
) *AccessLogGroup

NewAccessLogGroup creates and registers the access log API group.

func (*AccessLogGroup) GetSummary added in v0.1.47

func (g *AccessLogGroup) GetSummary(c echo.Context) error

GetSummary aggregates access log entries within a time window.

GET /api/v1/workspaces/:workspace_id/access-log/summary
Query params: start, end (unix ms), session

func (*AccessLogGroup) ListReads added in v0.1.47

func (g *AccessLogGroup) ListReads(c echo.Context) error

ListReads returns a page of access log entries from S2.

GET /api/v1/workspaces/:workspace_id/access-log
Query params: start, end (unix ms), cursor (seq_num), limit, session

func (*AccessLogGroup) ListSessions added in v0.1.48

func (g *AccessLogGroup) ListSessions(c echo.Context) error

ListSessions returns distinct session IDs that have access log streams.

GET /api/v1/workspaces/:workspace_id/access-log/sessions

It lists S2 streams matching the workspace-scoped prefix and extracts the session ID component from stream names (format: access.{workspace}.{session}.events).

func (*AccessLogGroup) ReadSource added in v0.1.47

func (g *AccessLogGroup) ReadSource(c echo.Context) error

ReadSource fetches content directly from an upstream integration using a source_uri. This bypasses the source-view layer, so it works even if the query results have changed since the original read.

GET /api/v1/workspaces/:workspace_id/access-log/read?uri=github://abc123

type AgentsGroup added in v0.1.60

type AgentsGroup struct {
	// contains filtered or unexported fields
}

func NewAgentsGroup added in v0.1.60

func NewAgentsGroup(routerGroup *echo.Group, agents *orchestration.AgentAPI, hooksSvc *hooks.Service, emailCh *channels.Email) *AgentsGroup

func (*AgentsGroup) CreateAgent added in v0.1.60

func (g *AgentsGroup) CreateAgent(c echo.Context) error

func (*AgentsGroup) DeleteAgent added in v0.1.73

func (g *AgentsGroup) DeleteAgent(c echo.Context) error

func (*AgentsGroup) DeleteChannel added in v0.1.96

func (g *AgentsGroup) DeleteChannel(c echo.Context) error

func (*AgentsGroup) GetAgent added in v0.1.60

func (g *AgentsGroup) GetAgent(c echo.Context) error

func (*AgentsGroup) GetAgentStats added in v0.1.96

func (g *AgentsGroup) GetAgentStats(c echo.Context) error

func (*AgentsGroup) GetDefaults added in v0.1.66

func (g *AgentsGroup) GetDefaults(c echo.Context) error

func (*AgentsGroup) ListAgents added in v0.1.60

func (g *AgentsGroup) ListAgents(c echo.Context) error

func (*AgentsGroup) ListChannels added in v0.1.96

func (g *AgentsGroup) ListChannels(c echo.Context) error

func (*AgentsGroup) UpdateAgent added in v0.1.66

func (g *AgentsGroup) UpdateAgent(c echo.Context) error

func (*AgentsGroup) UpsertChannels added in v0.1.96

func (g *AgentsGroup) UpsertChannels(c echo.Context) error

type AuthGroup added in v0.1.43

type AuthGroup struct {
	// contains filtered or unexported fields
}

func NewAuthGroup added in v0.1.43

func NewAuthGroup(routerGroup *echo.Group, backend repository.BackendRepository) *AuthGroup

func (*AuthGroup) Whoami added in v0.1.43

func (g *AuthGroup) Whoami(c echo.Context) error

Whoami resolves the caller's identity from its Bearer token. Works with workspace, org, and service tokens alike.

type CacheGroup added in v0.1.44

type CacheGroup struct {
	// contains filtered or unexported fields
}

CacheGroup provides cache management endpoints.

func NewCacheGroup added in v0.1.44

func NewCacheGroup(routerGroup *echo.Group, compressedStore *compression.CompressedStore) *CacheGroup

NewCacheGroup registers cache management routes. compressedStore may be nil if compression caching is disabled.

func (*CacheGroup) FlushCompressionCache added in v0.1.44

func (g *CacheGroup) FlushCompressionCache(c echo.Context) error

FlushCompressionCache deletes all compressed content and pointer keys for the authenticated workspace.

type ConnectionsGroup

type ConnectionsGroup struct {
	// contains filtered or unexported fields
}

func NewConnectionsGroup

func NewConnectionsGroup(g *echo.Group, backend repository.BackendRepository, sourceRegistry *sources.Registry, storage *clients.StorageClient) *ConnectionsGroup

func (*ConnectionsGroup) Create

func (cg *ConnectionsGroup) Create(c echo.Context) error

func (*ConnectionsGroup) Delete

func (cg *ConnectionsGroup) Delete(c echo.Context) error

func (*ConnectionsGroup) List

func (cg *ConnectionsGroup) List(c echo.Context) error

type CreateConnectionRequest

type CreateConnectionRequest struct {
	MemberId        string            `json:"member_id,omitempty"` // Empty = shared
	IntegrationType string            `json:"integration_type"`
	Scope           string            `json:"scope,omitempty"`
	AccessToken     string            `json:"access_token,omitempty"`
	RefreshToken    string            `json:"refresh_token,omitempty"`
	APIKey          string            `json:"api_key,omitempty"`
	Extra           map[string]string `json:"extra,omitempty"`
}

type CreateMemberRequest

type CreateMemberRequest struct {
	Email string           `json:"email"`
	Name  string           `json:"name"`
	Role  types.MemberRole `json:"role"`
}

type CreateOrgTokenRequest added in v0.1.39

type CreateOrgTokenRequest struct {
	Name      string `json:"name"`
	TenantId  string `json:"tenant_id"`
	ExpiresIn int    `json:"expires_in"` // seconds; 0 = no expiration
}

CreateOrgTokenRequest is the request body for creating an organization token.

type CreateSessionRequest

type CreateSessionRequest struct {
	IntegrationType string `json:"integration_type"`
	WorkspaceId     string `json:"workspace_id,omitempty"`
	ReturnTo        string `json:"return_to,omitempty"`
}

type CreateSessionResponse

type CreateSessionResponse struct {
	SessionID    string `json:"session_id"`
	AuthorizeURL string `json:"authorize_url"`
}

type CreateTokenRequest

type CreateTokenRequest struct {
	MemberId  string `json:"member_id"`
	Email     string `json:"email"`
	Name      string `json:"name"`
	ExpiresIn int    `json:"expires_in"`
}

type CreateToolProviderRequest

type CreateToolProviderRequest struct {
	Name           string                 `json:"name"`
	ProviderType   string                 `json:"provider_type"` // "mcp"
	MCP            *types.MCPServerConfig `json:"mcp,omitempty"`
	SkipValidation bool                   `json:"skip_validation,omitempty"` // Skip connection validation
}

CreateToolProviderRequest represents a request to create a workspace tool provider

type CreateViewRequest added in v0.1.50

type CreateViewRequest struct {
	Integration  string          `json:"integration"`   // e.g., "gmail", "gdrive"
	Name         string          `json:"name"`          // Folder/file name
	Guidance     string          `json:"guidance"`      // Natural language guidance (smart mode)
	Filter       json.RawMessage `json:"filter"`        // Structured filter JSON (query mode)
	OutputFormat string          `json:"output_format"` // "folder" or "file" (default: "folder")
	FileExt      string          `json:"file_ext"`      // For files: ".json", ".md"
}

CreateViewRequest represents a request to create a source view. If Filter is non-empty, the view uses query mode; otherwise smart mode (LLM inference).

type CreateWorkerTokenRequest

type CreateWorkerTokenRequest struct {
	Name      string  `json:"name"`
	PoolName  *string `json:"pool_name,omitempty"`
	ExpiresIn int     `json:"expires_in"`
}

type CreateWorkspaceRequest

type CreateWorkspaceRequest struct {
	Name     string `json:"name" validate:"required"`
	TenantId string `json:"tenant_id,omitempty"`
}

type DebugGroup added in v0.1.142

type DebugGroup struct {
	// contains filtered or unexported fields
}

func NewDebugGroup added in v0.1.142

func NewDebugGroup(g *echo.Group, sourceService interface{ SetEventInjector(sources.EventInjector) }, poller *hooks.SourcePoller) *DebugGroup

func (*DebugGroup) InjectSourceItems added in v0.1.142

func (d *DebugGroup) InjectSourceItems(c echo.Context) error

func (*DebugGroup) PollNow added in v0.1.142

func (d *DebugGroup) PollNow(c echo.Context) error

type DownloadURLResponse

type DownloadURLResponse struct {
	DownloadURL string `json:"download_url"`
}

DownloadURLResponse contains the presigned download URL

type FilesystemAuthConfig

type FilesystemAuthConfig struct {
	AdminToken string
	Backend    repository.BackendRepository
}

FilesystemAuthConfig holds auth configuration for the filesystem API

type FilesystemGroup

type FilesystemGroup struct {
	// contains filtered or unexported fields
}

FilesystemGroup handles filesystem API endpoints

func NewFilesystemGroup

func NewFilesystemGroup(
	routerGroup *echo.Group,
	backend repository.BackendRepository,
	storageService *services.StorageService,
	sourceService *services.SourceService,
	sourceRegistry *sources.Registry,
	toolRegistry *tools.Registry,
	s2Client *common.S2Client,
) *FilesystemGroup

NewFilesystemGroup creates a new filesystem API group. storageService handles all S3-backed paths (skills and user-created folders).

func (*FilesystemGroup) CountViews added in v0.1.50

func (g *FilesystemGroup) CountViews(c echo.Context) error

CountViews returns the count of source views in the workspace.

func (*FilesystemGroup) CreateToolProvider

func (g *FilesystemGroup) CreateToolProvider(c echo.Context) error

CreateToolProvider creates a new workspace tool provider (MCP server)

func (*FilesystemGroup) CreateView added in v0.1.50

func (g *FilesystemGroup) CreateView(c echo.Context) error

CreateView creates a new source view via LLM inference or structured filter.

func (*FilesystemGroup) DeletePath

func (g *FilesystemGroup) DeletePath(c echo.Context) error

DeletePath deletes a file or directory (optionally recursive for directories)

func (*FilesystemGroup) DeleteToolProvider

func (g *FilesystemGroup) DeleteToolProvider(c echo.Context) error

DeleteToolProvider deletes a workspace tool provider

func (*FilesystemGroup) DeleteView added in v0.1.50

func (g *FilesystemGroup) DeleteView(c echo.Context) error

DeleteView removes a source view by external_id.

func (*FilesystemGroup) GetDownloadURL

func (g *FilesystemGroup) GetDownloadURL(c echo.Context) error

GetDownloadURL returns a presigned URL for downloading a file

func (*FilesystemGroup) GetToolProvider

func (g *FilesystemGroup) GetToolProvider(c echo.Context) error

GetToolProvider retrieves a workspace tool provider by name

func (*FilesystemGroup) GetToolSetting

func (g *FilesystemGroup) GetToolSetting(c echo.Context) error

GetToolSetting returns the setting for a specific tool

func (*FilesystemGroup) GetUploadURL

func (g *FilesystemGroup) GetUploadURL(c echo.Context) error

GetUploadURL returns a presigned URL for uploading a file

func (*FilesystemGroup) GetView added in v0.1.50

func (g *FilesystemGroup) GetView(c echo.Context) error

GetView retrieves a source view by path.

func (*FilesystemGroup) List

func (g *FilesystemGroup) List(c echo.Context) error

List returns directory contents as VirtualFile entries

func (*FilesystemGroup) ListResources added in v0.1.50

func (g *FilesystemGroup) ListResources(c echo.Context) error

ListResources returns available resources for an integration (repos, channels, etc.).

func (*FilesystemGroup) ListToolProviders

func (g *FilesystemGroup) ListToolProviders(c echo.Context) error

ListToolProviders returns all workspace-defined tool providers

func (*FilesystemGroup) ListToolSettings

func (g *FilesystemGroup) ListToolSettings(c echo.Context) error

ListToolSettings returns all tools with their enabled/disabled state for the workspace

func (*FilesystemGroup) ListViews added in v0.1.50

func (g *FilesystemGroup) ListViews(c echo.Context) error

ListViews lists all source views in the workspace.

func (*FilesystemGroup) Mkdir

func (g *FilesystemGroup) Mkdir(c echo.Context) error

Mkdir creates a new directory

func (*FilesystemGroup) NotifyUploadComplete

func (g *FilesystemGroup) NotifyUploadComplete(c echo.Context) error

NotifyUploadComplete invalidates caches after a file upload

func (*FilesystemGroup) Read

func (g *FilesystemGroup) Read(c echo.Context) error

Read returns file contents

func (*FilesystemGroup) RenamePath added in v0.1.32

func (g *FilesystemGroup) RenamePath(c echo.Context) error

RenamePath renames or moves a file or directory

func (*FilesystemGroup) Search added in v0.1.10

func (g *FilesystemGroup) Search(c echo.Context) error

Search performs filename search across the workspace

func (*FilesystemGroup) Stat

func (g *FilesystemGroup) Stat(c echo.Context) error

Stat returns file/directory info as VirtualFile

func (*FilesystemGroup) SyncView added in v0.1.50

func (g *FilesystemGroup) SyncView(c echo.Context) error

SyncView triggers a sync (re-execution) of a source view.

func (*FilesystemGroup) Tree

func (g *FilesystemGroup) Tree(c echo.Context) error

Tree returns a flat listing of a subtree

func (*FilesystemGroup) UpdateToolProvider

func (g *FilesystemGroup) UpdateToolProvider(c echo.Context) error

UpdateToolProvider updates a workspace tool provider's config

func (*FilesystemGroup) UpdateToolSetting

func (g *FilesystemGroup) UpdateToolSetting(c echo.Context) error

UpdateToolSetting updates the enabled/disabled state of a tool

func (*FilesystemGroup) UpdateView added in v0.1.50

func (g *FilesystemGroup) UpdateView(c echo.Context) error

UpdateView updates an existing source view by external_id.

type GenerateRequest added in v0.1.97

type GenerateRequest struct {
	Description string `json:"description"`
}

GenerateRequest is the payload for AI skill generation (backwards-compatible endpoint).

type GetSessionResponse

type GetSessionResponse struct {
	Status       string `json:"status"`
	Error        string `json:"error,omitempty"`
	ConnectionID string `json:"connection_id,omitempty"`
}

type HealthGroup

type HealthGroup struct {
	// contains filtered or unexported fields
}

func NewHealthGroup

func NewHealthGroup(g *echo.Group, redisProbe func(context.Context) error, postgresProbe func(context.Context) error, migrationsReady func() bool) *HealthGroup

func (*HealthGroup) LivenessCheck added in v0.1.64

func (h *HealthGroup) LivenessCheck(c echo.Context) error

func (*HealthGroup) ReadinessCheck added in v0.1.64

func (h *HealthGroup) ReadinessCheck(c echo.Context) error

type HooksGroup added in v0.1.28

type HooksGroup struct {
	// contains filtered or unexported fields
}

func NewHooksGroup added in v0.1.28

func NewHooksGroup(g *echo.Group, backend repository.BackendRepository, svc *hooks.Service) *HooksGroup

func (*HooksGroup) Create added in v0.1.28

func (hg *HooksGroup) Create(c echo.Context) error

func (*HooksGroup) Delete added in v0.1.28

func (hg *HooksGroup) Delete(c echo.Context) error

func (*HooksGroup) Get added in v0.1.28

func (hg *HooksGroup) Get(c echo.Context) error

func (*HooksGroup) List added in v0.1.28

func (hg *HooksGroup) List(c echo.Context) error

func (*HooksGroup) Update added in v0.1.28

func (hg *HooksGroup) Update(c echo.Context) error

type InboundChannelsGroup added in v0.1.96

type InboundChannelsGroup struct {
	// contains filtered or unexported fields
}

func NewInboundChannelsGroup added in v0.1.96

func NewInboundChannelsGroup(
	routerGroup *echo.Group,
	registry *channels.Registry,
	processor *inbound.Processor,
	mail *clients.AgentMailClient,
	agents *orchestration.AgentAPI,
) *InboundChannelsGroup

func (*InboundChannelsGroup) InboundEmail added in v0.1.96

func (g *InboundChannelsGroup) InboundEmail(c echo.Context) error

func (*InboundChannelsGroup) InboundSMS added in v0.1.96

func (g *InboundChannelsGroup) InboundSMS(c echo.Context) error

type InstallRequest added in v0.1.97

type InstallRequest struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

InstallRequest is the payload for installing a skill from catalog content.

type MembersGroup

type MembersGroup struct {
	// contains filtered or unexported fields
}

func NewMembersGroup

func NewMembersGroup(g *echo.Group, backend repository.BackendRepository) *MembersGroup

func (*MembersGroup) Create

func (mg *MembersGroup) Create(c echo.Context) error

func (*MembersGroup) Delete

func (mg *MembersGroup) Delete(c echo.Context) error

func (*MembersGroup) Get

func (mg *MembersGroup) Get(c echo.Context) error

func (*MembersGroup) List

func (mg *MembersGroup) List(c echo.Context) error

func (*MembersGroup) Update

func (mg *MembersGroup) Update(c echo.Context) error

type MkdirRequest

type MkdirRequest struct {
	Path string `json:"path"`
}

MkdirRequest represents a request to create a directory

type OAuthGroup

type OAuthGroup struct {
	// contains filtered or unexported fields
}

OAuthGroup handles OAuth endpoints for workspace integrations.

func NewOAuthGroup

func NewOAuthGroup(g *echo.Group, store *oauth.Store, registry *oauth.Registry, backend repository.BackendRepository, storage *clients.StorageClient, adminToken string) *OAuthGroup

NewOAuthGroup creates and registers OAuth routes. adminToken is the cluster-admin bearer token so that trusted callers (e.g. the dashboard backend) can create sessions without a per-workspace member token.

func (*OAuthGroup) Callback added in v0.1.15

func (og *OAuthGroup) Callback(c echo.Context) error

Callback handles OAuth callbacks from all providers. Provider is determined from session state, not URL path.

func (*OAuthGroup) CreateSession

func (og *OAuthGroup) CreateSession(c echo.Context) error

CreateSession creates a new OAuth session and returns the authorization URL.

Auth: accepts either a workspace-scoped member token (workspace derived from the token) or the cluster admin / org token (workspace_id must be in the request body).

func (*OAuthGroup) GetSession

func (og *OAuthGroup) GetSession(c echo.Context) error

GetSession returns the status of an OAuth session.

type OrgTokenInfo added in v0.1.39

type OrgTokenInfo struct {
	ExternalId string  `json:"external_id"`
	Name       string  `json:"name"`
	TokenType  string  `json:"token_type"`
	TenantId   *string `json:"tenant_id,omitempty"`
	ExpiresAt  *string `json:"expires_at,omitempty"`
	CreatedAt  string  `json:"created_at"`
	LastUsedAt *string `json:"last_used_at,omitempty"`
}

OrgTokenInfo is the public-facing token metadata returned in API responses. It intentionally omits sensitive fields like token_hash and internal IDs.

type OrgTokenResponse added in v0.1.39

type OrgTokenResponse struct {
	Token string       `json:"token"`
	Info  OrgTokenInfo `json:"info"`
}

OrgTokenResponse is the response body for token creation (includes raw token value).

type OrgTokensGroup added in v0.1.39

type OrgTokensGroup struct {
	// contains filtered or unexported fields
}

OrgTokensGroup handles tenant-scoped organization tokens (cluster_admin only).

func NewOrgTokensGroup added in v0.1.39

func NewOrgTokensGroup(g *echo.Group, backend repository.BackendRepository) *OrgTokensGroup

NewOrgTokensGroup registers routes for managing organization tokens.

func (*OrgTokensGroup) Create added in v0.1.39

func (ot *OrgTokensGroup) Create(c echo.Context) error

Create creates a new tenant-scoped organization token.

func (*OrgTokensGroup) List added in v0.1.39

func (ot *OrgTokensGroup) List(c echo.Context) error

List returns all organization tokens, optionally filtered by tenant_id query param.

func (*OrgTokensGroup) Revoke added in v0.1.39

func (ot *OrgTokensGroup) Revoke(c echo.Context) error

Revoke deletes an organization token by its external ID.

type RenameRequest added in v0.1.32

type RenameRequest struct {
	OldPath string `json:"old_path"`
	NewPath string `json:"new_path"`
}

RenameRequest represents a request to rename or move a file/directory

type Response

type Response struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data,omitempty"`
	Error   string      `json:"error,omitempty"`
}

Response is a standard API response structure

type RunsGroup added in v0.1.60

type RunsGroup struct {
	// contains filtered or unexported fields
}

func NewRunsGroup added in v0.1.60

func NewRunsGroup(routerGroup *echo.Group, agents *orchestration.AgentAPI) *RunsGroup

func (*RunsGroup) CancelRun added in v0.1.60

func (g *RunsGroup) CancelRun(c echo.Context) error

func (*RunsGroup) GetRun added in v0.1.60

func (g *RunsGroup) GetRun(c echo.Context) error

func (*RunsGroup) ListRunEvents added in v0.1.60

func (g *RunsGroup) ListRunEvents(c echo.Context) error

func (*RunsGroup) ListRunSnapshots added in v0.1.60

func (g *RunsGroup) ListRunSnapshots(c echo.Context) error

func (*RunsGroup) ListRuns added in v0.1.60

func (g *RunsGroup) ListRuns(c echo.Context) error

type SkillDetail added in v0.1.103

type SkillDetail struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Path        string `json:"path"`
	Content     string `json:"content"`
}

SkillDetail includes the full SKILL.md content alongside basic info.

type SkillInfo added in v0.1.32

type SkillInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Path        string `json:"path"`
}

SkillInfo is the API representation of an installed skill.

type SkillsGroup added in v0.1.32

type SkillsGroup struct {
	// contains filtered or unexported fields
}

func NewSkillsGroup added in v0.1.32

func NewSkillsGroup(g *echo.Group, backend repository.BackendRepository, storage *clients.StorageClient, copilot *skills.Copilot) *SkillsGroup

func (*SkillsGroup) ChatDraft added in v0.1.97

func (sg *SkillsGroup) ChatDraft(c echo.Context) error

ChatDraft streams draft updates over SSE while the copilot edits the skill.

func (*SkillsGroup) CreateDraft added in v0.1.97

func (sg *SkillsGroup) CreateDraft(c echo.Context) error

CreateDraft creates a persisted draft session for iterative skill editing.

func (*SkillsGroup) DeleteDraft added in v0.1.144

func (sg *SkillsGroup) DeleteDraft(c echo.Context) error

DeleteDraft removes a draft session and marks it as installed in the index.

func (*SkillsGroup) Generate added in v0.1.97

func (sg *SkillsGroup) Generate(c echo.Context) error

Generate uses the BAML-backed copilot to produce a SKILL.md from a description. This is the backwards-compatible single-shot endpoint; prefer /drafts for iterative editing.

func (*SkillsGroup) Get added in v0.1.103

func (sg *SkillsGroup) Get(c echo.Context) error

Get returns a single installed skill including its full content.

func (*SkillsGroup) GetDraft added in v0.1.97

func (sg *SkillsGroup) GetDraft(c echo.Context) error

GetDraft returns the current draft state for an existing draft.

func (*SkillsGroup) Install added in v0.1.97

func (sg *SkillsGroup) Install(c echo.Context) error

Install writes a SKILL.md to the workspace skills folder.

func (*SkillsGroup) InstallDraft added in v0.1.97

func (sg *SkillsGroup) InstallDraft(c echo.Context) error

InstallDraft installs the current draft contents into the workspace.

func (*SkillsGroup) List added in v0.1.32

func (sg *SkillsGroup) List(c echo.Context) error

List returns all skills installed in the workspace.

func (*SkillsGroup) ListDrafts added in v0.1.97

func (sg *SkillsGroup) ListDrafts(c echo.Context) error

ListDrafts returns draft summaries for a workspace.

func (*SkillsGroup) Uninstall added in v0.1.97

func (sg *SkillsGroup) Uninstall(c echo.Context) error

Uninstall removes a skill and all its files from the workspace.

type TaskOutputsGroup added in v0.1.96

type TaskOutputsGroup struct {
	// contains filtered or unexported fields
}

func NewTaskOutputsGroup added in v0.1.96

func NewTaskOutputsGroup(routerGroup *echo.Group, backend repository.BackendRepository, redis *common.RedisClient, viewSync *views.ViewSync) *TaskOutputsGroup

func (*TaskOutputsGroup) AppendRows added in v0.1.96

func (g *TaskOutputsGroup) AppendRows(c echo.Context) error

AppendRows appends rows to an output. Ownership is enforced by withOutputOwnership.

func (*TaskOutputsGroup) CreateOutput added in v0.1.96

func (g *TaskOutputsGroup) CreateOutput(c echo.Context) error

func (*TaskOutputsGroup) DeleteOutput added in v0.1.96

func (g *TaskOutputsGroup) DeleteOutput(c echo.Context) error

DeleteOutput deletes an output. Ownership is enforced by withOutputOwnership.

func (*TaskOutputsGroup) GetOutput added in v0.1.96

func (g *TaskOutputsGroup) GetOutput(c echo.Context) error

GetOutput returns a single output. Ownership is enforced by withOutputOwnership.

func (*TaskOutputsGroup) ListOutputs added in v0.1.96

func (g *TaskOutputsGroup) ListOutputs(c echo.Context) error

type TokenResponse

type TokenResponse struct {
	Token    string      `json:"token"`
	Info     interface{} `json:"info"`
	MemberId string      `json:"member_id,omitempty"`
}

type TokensGroup

type TokensGroup struct {
	// contains filtered or unexported fields
}

TokensGroup handles workspace-scoped token management.

func NewTokensGroup

func NewTokensGroup(g *echo.Group, backend repository.BackendRepository) *TokensGroup

func (*TokensGroup) Create

func (tg *TokensGroup) Create(c echo.Context) error

func (*TokensGroup) List

func (tg *TokensGroup) List(c echo.Context) error

func (*TokensGroup) Revoke

func (tg *TokensGroup) Revoke(c echo.Context) error

type ToolProviderResponse

type ToolProviderResponse struct {
	ExternalId   string `json:"external_id"`
	Name         string `json:"name"`
	ProviderType string `json:"provider_type"`
	ToolCount    int    `json:"tool_count,omitempty"`
	Warning      string `json:"warning,omitempty"` // Validation warning if any
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
}

ToolProviderResponse represents a workspace tool provider in API responses

type ToolSettingResponse

type ToolSettingResponse struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
	Origin      string `json:"origin,omitempty"`
	ExternalId  string `json:"external_id,omitempty"`
}

ToolSettingResponse represents a tool with its enabled state

type UpdateMemberRequest

type UpdateMemberRequest struct {
	Name string           `json:"name"`
	Role types.MemberRole `json:"role"`
}

type UpdateToolSettingRequest

type UpdateToolSettingRequest struct {
	Enabled bool `json:"enabled"`
}

UpdateToolSettingRequest represents a request to update tool settings

type UpdateViewRequest added in v0.1.50

type UpdateViewRequest struct {
	Name     string          `json:"name"`     // New name (optional)
	Guidance string          `json:"guidance"` // New guidance (optional)
	Filter   json.RawMessage `json:"filter"`   // New filter (optional, query mode)
	Mode     string          `json:"mode"`     // Explicit mode: "smart" or "query"
}

UpdateViewRequest represents a request to update a source view.

type UploadURLRequest

type UploadURLRequest struct {
	Path        string `json:"path"`
	ContentType string `json:"content_type,omitempty"`
}

UploadURLRequest represents a request to get a presigned upload URL

type UploadURLResponse

type UploadURLResponse struct {
	UploadURL string `json:"upload_url"`
	Key       string `json:"key"`
}

UploadURLResponse contains the presigned upload URL and key

type ViewResponse added in v0.1.50

type ViewResponse struct {
	ExternalID   string           `json:"external_id"`
	Integration  string           `json:"integration"`
	Path         string           `json:"path"`
	Name         string           `json:"name"`
	Mode         string           `json:"mode"`
	QuerySpec    string           `json:"query_spec,omitempty"`
	Guidance     string           `json:"guidance,omitempty"`
	Filter       *json.RawMessage `json:"filter,omitempty"`
	OutputFormat string           `json:"output_format"`
	FileExt      string           `json:"file_ext,omitempty"`
	CacheTTL     int              `json:"cache_ttl"`
	CreatedAt    int64            `json:"created_at"`
	UpdatedAt    int64            `json:"updated_at"`
}

ViewResponse represents a source view in API responses.

type ViewsGroup added in v0.1.103

type ViewsGroup struct {
	// contains filtered or unexported fields
}

func NewViewsGroup added in v0.1.103

func NewViewsGroup(g *echo.Group, backend repository.BackendRepository, copilot *views.Copilot, store *views.ViewStore, storage *clients.StorageClient, viewSync *views.ViewSync, compactor *views.ContextCompactor) *ViewsGroup

func (*ViewsGroup) ChatMessages added in v0.1.112

func (vg *ViewsGroup) ChatMessages(c echo.Context) error

ChatMessages returns the persisted chat history for a view.

func (*ViewsGroup) ChatView added in v0.1.112

func (vg *ViewsGroup) ChatView(c echo.Context) error

ChatView streams copilot updates over SSE for a published view.

func (*ViewsGroup) Create added in v0.1.103

func (vg *ViewsGroup) Create(c echo.Context) error

func (*ViewsGroup) Delete added in v0.1.103

func (vg *ViewsGroup) Delete(c echo.Context) error

func (*ViewsGroup) ExcludeRow added in v0.1.103

func (vg *ViewsGroup) ExcludeRow(c echo.Context) error

func (*ViewsGroup) Get added in v0.1.103

func (vg *ViewsGroup) Get(c echo.Context) error

func (*ViewsGroup) GetContext added in v0.1.131

func (vg *ViewsGroup) GetContext(c echo.Context) error

func (*ViewsGroup) ImportData added in v0.1.112

func (vg *ViewsGroup) ImportData(c echo.Context) error

func (*ViewsGroup) IngestContext added in v0.1.131

func (vg *ViewsGroup) IngestContext(c echo.Context) error

func (*ViewsGroup) List added in v0.1.103

func (vg *ViewsGroup) List(c echo.Context) error

func (*ViewsGroup) Mailbox added in v0.1.125

func (vg *ViewsGroup) Mailbox(c echo.Context) error

func (*ViewsGroup) RegenerateRow added in v0.1.103

func (vg *ViewsGroup) RegenerateRow(c echo.Context) error

func (*ViewsGroup) ResolveData added in v0.1.103

func (vg *ViewsGroup) ResolveData(c echo.Context) error

func (*ViewsGroup) ResolveWidgets added in v0.1.108

func (vg *ViewsGroup) ResolveWidgets(c echo.Context) error

func (*ViewsGroup) RestoreRow added in v0.1.103

func (vg *ViewsGroup) RestoreRow(c echo.Context) error

func (*ViewsGroup) RowDetail added in v0.1.110

func (vg *ViewsGroup) RowDetail(c echo.Context) error

func (*ViewsGroup) RunRows added in v0.1.123

func (vg *ViewsGroup) RunRows(c echo.Context) error

func (*ViewsGroup) Update added in v0.1.103

func (vg *ViewsGroup) Update(c echo.Context) error

func (*ViewsGroup) UpdateRow added in v0.1.103

func (vg *ViewsGroup) UpdateRow(c echo.Context) error

type WorkerTokensGroup

type WorkerTokensGroup struct {
	// contains filtered or unexported fields
}

WorkerTokensGroup handles cluster-level worker tokens (admin only).

func NewWorkerTokensGroup

func NewWorkerTokensGroup(g *echo.Group, backend repository.BackendRepository) *WorkerTokensGroup

func (*WorkerTokensGroup) Create

func (wt *WorkerTokensGroup) Create(c echo.Context) error

func (*WorkerTokensGroup) List

func (wt *WorkerTokensGroup) List(c echo.Context) error

func (*WorkerTokensGroup) Revoke

func (wt *WorkerTokensGroup) Revoke(c echo.Context) error

type WorkspaceAuthConfig

type WorkspaceAuthConfig struct {
	AdminToken string
	Backend    repository.BackendRepository
}

WorkspaceAuthConfig for workspace-scoped API routes.

type WorkspaceChannelsGroup added in v0.1.66

type WorkspaceChannelsGroup struct {
	// contains filtered or unexported fields
}

func NewWorkspaceChannelsGroup added in v0.1.66

func NewWorkspaceChannelsGroup(routerGroup *echo.Group, registry *channels.Registry, agents *orchestration.AgentAPI, emailCh *channels.Email) *WorkspaceChannelsGroup

func (*WorkspaceChannelsGroup) DeleteChannel added in v0.1.96

func (g *WorkspaceChannelsGroup) DeleteChannel(c echo.Context) error

DeleteChannel removes a workspace-level channel binding by type.

func (*WorkspaceChannelsGroup) ListChannels added in v0.1.96

func (g *WorkspaceChannelsGroup) ListChannels(c echo.Context) error

ListChannels returns workspace-level channel bindings (agent_id IS NULL).

func (*WorkspaceChannelsGroup) SendAgentMessage added in v0.1.66

func (g *WorkspaceChannelsGroup) SendAgentMessage(c echo.Context) error

func (*WorkspaceChannelsGroup) SendRunMessage added in v0.1.66

func (g *WorkspaceChannelsGroup) SendRunMessage(c echo.Context) error

func (*WorkspaceChannelsGroup) UpsertChannels added in v0.1.96

func (g *WorkspaceChannelsGroup) UpsertChannels(c echo.Context) error

UpsertChannels creates or updates workspace-level channel bindings.

type WorkspaceOutputsGroup added in v0.1.96

type WorkspaceOutputsGroup struct {
	// contains filtered or unexported fields
}

func NewWorkspaceOutputsGroup added in v0.1.96

func NewWorkspaceOutputsGroup(routerGroup *echo.Group, backend repository.BackendRepository, redis *common.RedisClient) *WorkspaceOutputsGroup

func (*WorkspaceOutputsGroup) ArchiveAllOutputs added in v0.1.96

func (g *WorkspaceOutputsGroup) ArchiveAllOutputs(c echo.Context) error

func (*WorkspaceOutputsGroup) ArchiveOutput added in v0.1.96

func (g *WorkspaceOutputsGroup) ArchiveOutput(c echo.Context) error

func (*WorkspaceOutputsGroup) ListOutputs added in v0.1.96

func (g *WorkspaceOutputsGroup) ListOutputs(c echo.Context) error

type WorkspaceResponse

type WorkspaceResponse struct {
	ExternalID string  `json:"external_id"`
	Name       string  `json:"name"`
	TenantId   *string `json:"tenant_id,omitempty"`
	CreatedAt  string  `json:"created_at"`
	UpdatedAt  string  `json:"updated_at"`
}

type WorkspaceTasksGroup added in v0.1.60

type WorkspaceTasksGroup struct {
	// contains filtered or unexported fields
}

func NewWorkspaceTasksGroup added in v0.1.60

func NewWorkspaceTasksGroup(routerGroup *echo.Group, agents *orchestration.AgentAPI) *WorkspaceTasksGroup

func (*WorkspaceTasksGroup) ArchiveTask added in v0.1.71

func (g *WorkspaceTasksGroup) ArchiveTask(c echo.Context) error

func (*WorkspaceTasksGroup) CancelTask added in v0.1.66

func (g *WorkspaceTasksGroup) CancelTask(c echo.Context) error

func (*WorkspaceTasksGroup) CreateSchedule added in v0.1.89

func (g *WorkspaceTasksGroup) CreateSchedule(c echo.Context) error

func (*WorkspaceTasksGroup) CreateTask added in v0.1.60

func (g *WorkspaceTasksGroup) CreateTask(c echo.Context) error

func (*WorkspaceTasksGroup) DeleteSchedule added in v0.1.89

func (g *WorkspaceTasksGroup) DeleteSchedule(c echo.Context) error

func (*WorkspaceTasksGroup) GetSchedule added in v0.1.89

func (g *WorkspaceTasksGroup) GetSchedule(c echo.Context) error

func (*WorkspaceTasksGroup) GetTask added in v0.1.60

func (g *WorkspaceTasksGroup) GetTask(c echo.Context) error

func (*WorkspaceTasksGroup) ListSchedules added in v0.1.89

func (g *WorkspaceTasksGroup) ListSchedules(c echo.Context) error

func (*WorkspaceTasksGroup) ListSubtasks added in v0.1.110

func (g *WorkspaceTasksGroup) ListSubtasks(c echo.Context) error

func (*WorkspaceTasksGroup) ListTaskLogs added in v0.1.66

func (g *WorkspaceTasksGroup) ListTaskLogs(c echo.Context) error

func (*WorkspaceTasksGroup) ListTasks added in v0.1.66

func (g *WorkspaceTasksGroup) ListTasks(c echo.Context) error

func (*WorkspaceTasksGroup) RetryTask added in v0.1.130

func (g *WorkspaceTasksGroup) RetryTask(c echo.Context) error

func (*WorkspaceTasksGroup) StreamTaskEvents added in v0.1.66

func (g *WorkspaceTasksGroup) StreamTaskEvents(c echo.Context) error

func (*WorkspaceTasksGroup) StreamWorkspaceTasks added in v0.1.98

func (g *WorkspaceTasksGroup) StreamWorkspaceTasks(c echo.Context) error

func (*WorkspaceTasksGroup) SubmitInput added in v0.1.98

func (g *WorkspaceTasksGroup) SubmitInput(c echo.Context) error

func (*WorkspaceTasksGroup) UpdateSchedule added in v0.1.89

func (g *WorkspaceTasksGroup) UpdateSchedule(c echo.Context) error

func (*WorkspaceTasksGroup) UpdateTask added in v0.1.96

func (g *WorkspaceTasksGroup) UpdateTask(c echo.Context) error

type WorkspacesGroup

type WorkspacesGroup struct {
	// contains filtered or unexported fields
}

func NewWorkspacesGroup

func NewWorkspacesGroup(routerGroup *echo.Group, backend repository.BackendRepository, storageClient *clients.StorageClient) *WorkspacesGroup

NewWorkspacesGroup creates a new workspaces API group. storageClient can be nil if workspace storage is not configured.

func (*WorkspacesGroup) CreateWorkspace

func (g *WorkspacesGroup) CreateWorkspace(c echo.Context) error

CreateWorkspace creates a new workspace and its S3 storage bucket. When called by an org token, the workspace is auto-tagged with the token's tenant_id.

func (*WorkspacesGroup) DeleteWorkspace

func (g *WorkspacesGroup) DeleteWorkspace(c echo.Context) error

DeleteWorkspace deletes a workspace by external ID.

func (*WorkspacesGroup) GetWorkspace

func (g *WorkspacesGroup) GetWorkspace(c echo.Context) error

GetWorkspace returns a workspace by external ID.

func (*WorkspacesGroup) ListWorkspaces

func (g *WorkspacesGroup) ListWorkspaces(c echo.Context) error

ListWorkspaces returns all workspaces. Org tokens only see their tenant's workspaces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL