Versions in this module Expand all Collapse all v0 v0.1.0 Jul 15, 2026 Changes in this version + const DefaultBaseURL + const DefaultPublicBaseURL + var ErrRunTimeout = errors.New("catentio: run did not reach a terminal state in time") + var TerminalRunStates = []string + var WebhookEventTypes = []string + type APIError struct + Detail string + StatusCode int + func (e *APIError) Error() string + type APIKeysResource struct + func (r *APIKeysResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *APIKeysResource) Delete(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *APIKeysResource) List(ctx context.Context, token string) (json.RawMessage, error) + type AgentsResource struct + func (r *AgentsResource) Get(ctx context.Context, slug, token string) (json.RawMessage, error) + func (r *AgentsResource) Invoke(ctx context.Context, slug string, input Body, token string) (json.RawMessage, error) + func (r *AgentsResource) List(ctx context.Context, token string) (json.RawMessage, error) + type ApiClient struct + BaseURL string + DefaultHeaders map[string]string + HTTP *http.Client + RefreshBufferSec int64 + RetryOn5xx int + Session *Session + func NewApiClient(opts ApiClientOptions) *ApiClient + func (a *ApiClient) Delete(ctx context.Context, path string, opts *RequestOptions) (json.RawMessage, error) + func (a *ApiClient) Get(ctx context.Context, path string, opts *RequestOptions) (json.RawMessage, error) + func (a *ApiClient) Patch(ctx context.Context, path string, opts *RequestOptions) (json.RawMessage, error) + func (a *ApiClient) Post(ctx context.Context, path string, opts *RequestOptions) (json.RawMessage, error) + func (a *ApiClient) Put(ctx context.Context, path string, opts *RequestOptions) (json.RawMessage, error) + type ApiClientOptions struct + BaseURL string + DefaultHeaders map[string]string + HTTP *http.Client + RefreshBufferSec int64 + RetryOn5xx int + Session *Session + type BillingResource struct + func (r *BillingResource) Catalog(ctx context.Context, token string) (json.RawMessage, error) + func (r *BillingResource) Subscribe(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *BillingResource) Summary(ctx context.Context, token string) (json.RawMessage, error) + type Body = map[string]any + type ChatResource struct + func (r *ChatResource) History(ctx context.Context, sessionID, token string) (json.RawMessage, error) + func (r *ChatResource) Send(ctx context.Context, input Body, token string) (json.RawMessage, error) + type Client struct + API *ApiClient + APIKey string + APIKeys *APIKeysResource + Agents *AgentsResource + Billing *BillingResource + Chat *ChatResource + Cost *CostResource + Discord *DiscordResource + Events *EventsResource + FeatureFlags *FeatureFlagsResource + Files *FilesResource + Gojo *GojoResource + Heartbeats *HeartbeatsResource + InboundWebhooks *InboundWebhooksResource + Integrations *IntegrationsResource + Memory *MemoryResource + OutputDestinations *OutputDestinationsResource + Projects *ProjectsResource + Runs *RunsResource + ScheduledJobs *ScheduledJobsResource + Skills *SkillsResource + System *SystemResource + Templates *TemplatesResource + Tools *ToolsResource + Webhooks *WebhooksResource + Workspaces *WorkspacesResource + func NewClient(opts ClientOptions) *Client + type ClientOptions struct + APIKey string + BaseURL string + HTTP *http.Client + Session *Session + type CostResource struct + func (r *CostResource) Summary(ctx context.Context, query Query, token string) (json.RawMessage, error) + type CreateProjectParams struct + Brief string + CostBudgetUSD *float64 + Params map[string]any + TemplateSlug string + TemplateVersion *int + Title string + type CreateRunParams struct + Agent string + Message string + ThreadID string + type CreateWebhookParams struct + Description string + Events []string + URL string + type DiscordResource struct + func (r *DiscordResource) SendMessage(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *DiscordResource) Status(ctx context.Context, token string) (json.RawMessage, error) + type Error struct + Code string + Details map[string]any + Message string + RequestID string + Status int + func (e *Error) Error() string + type EventsResource struct + func (r *EventsResource) List(ctx context.Context, query Query, token string) (json.RawMessage, error) + type FeatureFlagsResource struct + func (r *FeatureFlagsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *FeatureFlagsResource) Set(ctx context.Context, flag string, input Body, token string) (json.RawMessage, error) + type FilesResource struct + func (r *FilesResource) Delete(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *FilesResource) List(ctx context.Context, query Query, token string) (json.RawMessage, error) + func (r *FilesResource) Upload(ctx context.Context, input Body, token string) (json.RawMessage, error) + type GojoResource struct + func (r *GojoResource) Sessions(ctx context.Context, token string) (json.RawMessage, error) + type HeartbeatsResource struct + func (r *HeartbeatsResource) Config(ctx context.Context, token string) (json.RawMessage, error) + func (r *HeartbeatsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *HeartbeatsResource) UpdateConfig(ctx context.Context, patch Body, token string) (json.RawMessage, error) + type InboundWebhooksResource struct + func (r *InboundWebhooksResource) List(ctx context.Context, token string) (json.RawMessage, error) + type IntegrationsResource struct + func (r *IntegrationsResource) Configure(ctx context.Context, kind string, input Body, token string) (json.RawMessage, error) + func (r *IntegrationsResource) Delete(ctx context.Context, kind, token string) (json.RawMessage, error) + func (r *IntegrationsResource) List(ctx context.Context, token string) (json.RawMessage, error) + type MemoryResource struct + func (r *MemoryResource) CreateEntry(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *MemoryResource) GetEntry(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *MemoryResource) ListEntries(ctx context.Context, query Query, token string) (json.RawMessage, error) + func (r *MemoryResource) Stats(ctx context.Context, token string) (json.RawMessage, error) + func (r *MemoryResource) UpdateEntry(ctx context.Context, id string, patch Body, token string) (json.RawMessage, error) + type NetworkError struct + Message string + func (e *NetworkError) Error() string + type OutputDestinationsResource struct + func (r *OutputDestinationsResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *OutputDestinationsResource) Delete(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *OutputDestinationsResource) Get(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *OutputDestinationsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *OutputDestinationsResource) Update(ctx context.Context, id string, patch Body, token string) (json.RawMessage, error) + type ProfileData struct + AccessToken string + ClientID string + ExpiresAt int64 + Issuer string + RefreshToken string + Scope string + type Project = json.RawMessage + type ProjectsResource struct + func (r *ProjectsResource) Abandon(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) AddAttachment(ctx context.Context, id string, input Body, token string) (json.RawMessage, error) + func (r *ProjectsResource) Cost(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *ProjectsResource) Get(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) GetSubtask(ctx context.Context, id, taskID, subtaskID, token string) (json.RawMessage, error) + func (r *ProjectsResource) GetTask(ctx context.Context, id, taskID, token string) (json.RawMessage, error) + func (r *ProjectsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListArtifacts(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListAttachments(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListAttempts(ctx context.Context, id, subtaskID, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListEvents(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListSubtasks(ctx context.Context, id, taskID, token string) (json.RawMessage, error) + func (r *ProjectsResource) ListTasks(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) Pause(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) Resume(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ProjectsResource) RetrySubtask(ctx context.Context, id, subtaskID, token string) (json.RawMessage, error) + func (r *ProjectsResource) RunStep(ctx context.Context, id string, input Body, token string) (json.RawMessage, error) + type PublicAgent struct + Description string + Slug string + type PublicAgentsResource struct + func (r *PublicAgentsResource) List(ctx context.Context) ([]PublicAgent, error) + type PublicClient struct + Agents *PublicAgentsResource + BaseURL string + HTTPClient *http.Client + Projects *PublicProjectsResource + Runs *PublicRunsResource + Templates *PublicTemplatesResource + Webhooks *PublicWebhooksResource + func NewPublicClient(apiKey string, opts ...PublicOption) (*PublicClient, error) + type PublicOption func(*PublicClient) + func WithPublicBaseURL(baseURL string) PublicOption + func WithPublicHTTPClient(hc *http.Client) PublicOption + type PublicProjectsResource struct + func (r *PublicProjectsResource) Create(ctx context.Context, p CreateProjectParams) (Project, error) + func (r *PublicProjectsResource) Get(ctx context.Context, projectID string) (Project, error) + type PublicRunsResource struct + func (r *PublicRunsResource) Create(ctx context.Context, p CreateRunParams) (*RunRef, error) + func (r *PublicRunsResource) Get(ctx context.Context, runID string) (*Run, error) + func (r *PublicRunsResource) Wait(ctx context.Context, runID string, opts *WaitOptions) (*Run, error) + type PublicTemplate struct + Description string + Params []TemplateParam + Slug string + Version int + type PublicTemplatesResource struct + func (r *PublicTemplatesResource) List(ctx context.Context) ([]PublicTemplate, error) + type PublicWebhooksResource struct + func (r *PublicWebhooksResource) Create(ctx context.Context, p CreateWebhookParams) (*WebhookEndpointCreated, error) + func (r *PublicWebhooksResource) Delete(ctx context.Context, endpointID int) error + func (r *PublicWebhooksResource) List(ctx context.Context) ([]WebhookEndpoint, error) + type Query = map[string]any + type RefreshError struct + Code string + Message string + func (e *RefreshError) Error() string + type RefreshFn func(current ProfileData) (ProfileData, error) + type RequestOptions struct + AuthToken string + Body any + Headers map[string]string + Query map[string]any + type Run struct + Agent string + CompletedAt string + Error string + Output string + RunID string + StartedAt string + Status string + type RunRef struct + RunID string + Status string + type RunsResource struct + func (r *RunsResource) Cancel(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *RunsResource) Get(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *RunsResource) List(ctx context.Context, query Query, token string) (json.RawMessage, error) + type ScheduledJobsResource struct + func (r *ScheduledJobsResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *ScheduledJobsResource) Delete(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *ScheduledJobsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *ScheduledJobsResource) Update(ctx context.Context, id string, patch Body, token string) (json.RawMessage, error) + type Session struct + func NewSession(opts SessionOptions) *Session + func (s *Session) Data() *ProfileData + func (s *Session) IsExpired() bool + func (s *Session) Refresh() error + func (s *Session) SetData(d ProfileData) + func (s *Session) WillExpireSoon(bufferSec int64) bool + type SessionOptions struct + AccessToken string + ClientID string + ExpiresAt int64 + Issuer string + RefreshFn RefreshFn + RefreshToken string + Scope string + type SkillsResource struct + func (r *SkillsResource) Get(ctx context.Context, slug, token string) (json.RawMessage, error) + func (r *SkillsResource) List(ctx context.Context, token string) (json.RawMessage, error) + type SystemResource struct + func (r *SystemResource) Health(ctx context.Context) (json.RawMessage, error) + func (r *SystemResource) Info(ctx context.Context, token string) (json.RawMessage, error) + type TemplateParam struct + Default json.RawMessage + Description string + EnumValues []any + Key string + Label string + Required bool + Type string + Validation json.RawMessage + type TemplatesResource struct + func (r *TemplatesResource) List(ctx context.Context, token string) (json.RawMessage, error) + type TimeoutError struct + LastStatus string + RunID string + Timeout time.Duration + func (e *TimeoutError) Error() string + func (e *TimeoutError) Unwrap() error + type ToolsResource struct + func (r *ToolsResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *ToolsResource) Delete(ctx context.Context, slug, token string) (json.RawMessage, error) + func (r *ToolsResource) Get(ctx context.Context, slug, token string) (json.RawMessage, error) + func (r *ToolsResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *ToolsResource) Update(ctx context.Context, slug string, patch Body, token string) (json.RawMessage, error) + type WaitOptions struct + PollInterval time.Duration + Timeout time.Duration + type WebhookEndpoint struct + Active bool + Description string + Events []string + ID int + URL string + type WebhookEndpointCreated struct + Secret string + type WebhooksResource struct + func (r *WebhooksResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *WebhooksResource) Delete(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *WebhooksResource) List(ctx context.Context, token string) (json.RawMessage, error) + type WorkspacesResource struct + func (r *WorkspacesResource) Create(ctx context.Context, input Body, token string) (json.RawMessage, error) + func (r *WorkspacesResource) Destroy(ctx context.Context, id, token string) (json.RawMessage, error) + func (r *WorkspacesResource) List(ctx context.Context, token string) (json.RawMessage, error) + func (r *WorkspacesResource) SetState(ctx context.Context, id string, input Body, token string) (json.RawMessage, error) + func (r *WorkspacesResource) Show(ctx context.Context, id, token string) (json.RawMessage, error)