Versions in this module Expand all Collapse all v0 v0.1.0 Apr 16, 2026 Changes in this version + func FilePath(parts ...string) string + type APIError struct + Body string + StatusCode int + func (e *APIError) Error() string + type AsyncRunResponse struct + RunID string + Status string + Workspace string + type CacheCreation struct + Ephemeral1hInputTokens int + Ephemeral5mInputTokens int + type CancelResponse struct + RunID string + Status string + Workspace string + type Claudebox interface + Cancel func(ctx context.Context, workspace string) (*CancelResponse, error) + CancelRun func(ctx context.Context, runID string) (*CancelResponse, error) + DeleteFile func(ctx context.Context, filePath string) (*DeleteFileResponse, error) + Health func(ctx context.Context) (*HealthResponse, error) + ListFiles func(ctx context.Context, dirPath string) (*ListFilesResponse, error) + ReadFile func(ctx context.Context, filePath string) (*ReadFileResponse, error) + Run func(ctx context.Context, req *RunRequest) (*RunResponse, error) + RunAsync func(ctx context.Context, req *RunRequest) (*AsyncRunResponse, error) + RunResult func(ctx context.Context, runID string) (*RunResultResponse, error) + Status func(ctx context.Context) (*StatusResponse, error) + WriteFile func(ctx context.Context, filePath string, content []byte) (*WriteFileResponse, error) + type Client struct + func New(baseURL string, opts ...Option) *Client + func (c *Client) Cancel(ctx context.Context, workspace string) (*CancelResponse, error) + func (c *Client) CancelRun(ctx context.Context, runID string) (*CancelResponse, error) + func (c *Client) DeleteFile(ctx context.Context, filePath string) (*DeleteFileResponse, error) + func (c *Client) Health(ctx context.Context) (*HealthResponse, error) + func (c *Client) ListFiles(ctx context.Context, dirPath string) (*ListFilesResponse, error) + func (c *Client) ReadFile(ctx context.Context, filePath string) (*ReadFileResponse, error) + func (c *Client) Run(ctx context.Context, req *RunRequest) (*RunResponse, error) + func (c *Client) RunAsync(ctx context.Context, req *RunRequest) (*AsyncRunResponse, error) + func (c *Client) RunResult(ctx context.Context, runID string) (*RunResultResponse, error) + func (c *Client) Status(ctx context.Context) (*StatusResponse, error) + func (c *Client) WriteFile(ctx context.Context, filePath string, content []byte) (*WriteFileResponse, error) + type ContentBlock struct + Content string + ID string + Input json.RawMessage + IsError bool + Name string + SHA256 string + Text string + ToolUseID string + TotalLength int + Truncated bool + Type string + type DeleteFileResponse struct + Path string + Status string + type FileEntry struct + Name string + Size int64 + Type string + type HealthResponse struct + Status string + type ListFilesResponse struct + Entries []FileEntry + Path string + type ModelStats struct + CacheCreationInputTokens int + CacheReadInputTokens int + ContextWindow int + CostUSD float64 + InputTokens int + MaxOutputTokens int + OutputTokens int + WebSearchRequests int + type Option func(*Client) + func WithHTTPClient(hc *http.Client) Option + func WithToken(token string) Option + type ReadFileResponse struct + Body io.ReadCloser + ContentLength int64 + ContentType string + type RunInfo struct + RunID string + Status string + Workspace string + type RunRequest struct + AppendSystemPrompt string + Effort string + FireAndForget bool + JSONSchema string + Model string + NoContinue bool + OutputFormat string + Prompt string + Resume string + SystemPrompt string + Workspace string + type RunResponse struct + DurationAPIMs int64 + DurationMs int64 + FastModeState string + IsError bool + ModelUsage map[string]ModelStats + NumTurns int + PermissionDenials []json.RawMessage + Result string + RunID string + SessionID string + StopReason string + Subtype string + System *SystemInfo + TotalCostUSD float64 + Turns []Turn + Type string + UUID string + Usage Usage + func (r *RunResponse) Raw() json.RawMessage + type RunResultResponse struct + Error string + Result *RunResponse + RunID string + Status string + Workspace string + type ServerToolUse struct + WebFetchRequests int + WebSearchRequests int + type StatusResponse struct + BusyWorkspaces []string + Runs []RunInfo + type SystemInfo struct + Cwd string + Model string + SessionID string + Tools []string + type Turn struct + Content []ContentBlock + Role string + type Usage struct + CacheCreation *CacheCreation + CacheCreationInputTokens int + CacheReadInputTokens int + InferenceGeo string + InputTokens int + Iterations []json.RawMessage + OutputTokens int + ServerToolUse *ServerToolUse + ServiceTier string + Speed string + type WriteFileResponse struct + Path string + Size int + Status string