Versions in this module Expand all Collapse all v0 v0.1.1 Sep 7, 2026 v0.1.0 Sep 7, 2026 Changes in this version + const DefaultBaseURL + const Version + var ErrReceipt = errors.New("humanforai: invalid receipt") + var OutputFormats = []string + var TaskTypes = []string + func SHA256Hex(text string) string + type APIError struct + Body map[string]any + Code string + Details []string + Message string + RateLimit RateLimit + Status int + func IsAPIError(err error) (*APIError, bool) + func (e *APIError) Error() string + type Client struct + BaseURL string + HTTPClient *http.Client + Requester string + UserAgent string + func New(opts ...Option) *Client + func (c *Client) AgentManifest(ctx context.Context) (map[string]any, error) + func (c *Client) AllServices(ctx context.Context) ([]Service, error) + func (c *Client) Do(ctx context.Context, method, path string, query url.Values, body any, ...) error + func (c *Client) GetTask(ctx context.Context, taskID string) (*Task, error) + func (c *Client) GetThread(ctx context.Context, messageID, accessToken string) (*Thread, error) + func (c *Client) Health(ctx context.Context) (*Health, error) + func (c *Client) JWKS(ctx context.Context) (*JWKS, error) + func (c *Client) LastRateLimit() RateLimit + func (c *Client) ListServices(ctx context.Context, limit int, cursor string) (*ServicesPage, error) + func (c *Client) ReplyInThread(ctx context.Context, messageID, accessToken, message string) (*ReplyResult, error) + func (c *Client) SendMessage(ctx context.Context, req MessageRequest) (*MessageResponse, error) + func (c *Client) SubmitTask(ctx context.Context, req TaskRequest) (*TaskSubmission, error) + func (c *Client) WaitForTask(ctx context.Context, taskID string, interval time.Duration, ...) (*Task, error) + type Health struct + APIVersion string + Service string + Status string + Time string + type JWK struct + Alg string + Crv string + Kid string + Kty string + Use string + X string + type JWKS struct + Keys []JWK + type MessageRequest struct + From string + IdempotencyKey string + Message string + ReplyTo string + Subject string + type MessageResponse struct + AccessToken string + CreatedAt string + Message string + MessageID string + ThreadURL string + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithRequester(r string) Option + func WithUserAgent(ua string) Option + type RateLimit struct + Limit int + Policy string + Remaining int + ResetSeconds int + RetryAfter int + type ReceiptPayload struct + DeliverableSHA256 string + Issuer string + Raw map[string]any + TaskID string + Timeline map[string]any + func VerifyReceipt(receipt string, jwks *JWKS, opts *VerifyOptions) (*ReceiptPayload, error) + type Reply struct + Author string + CreatedAt string + Message string + type ReplyResult struct + Message string + MessageID string + ReplyCount int + type Service struct + Description string + ID string + Name string + type ServicesPage struct + Items []Service + NextCursor string + Total int + type StatusEvent struct + At string + Status string + type Task struct + CreatedAt string + Deadline string + DeliverableSHA256 string + Description string + ETA string + LocationDetail string + LocationRequired bool + OperatorNotes string + OutputFormat string + Receipt string + ReceiptIssuedAt string + RejectionReason string + Requester string + SeenByOperatorAt string + Source string + Status string + StatusHistory []StatusEvent + TaskID string + TaskType string + UpdatedAt string + func (t *Task) Terminal() bool + type TaskRequest struct + ContactEmail string + Deadline string + Delivery string + Description string + IdempotencyKey string + LocationDetail string + LocationRequired *bool + OutputFormat string + Requester string + TaskType string + type TaskSubmission struct + CreatedAt string + Message string + Status string + StatusPage string + StatusURL string + TaskID string + type Thread struct + CreatedAt string + From string + LastReplyAt string + Message string + MessageID string + Note string + Replies []Reply + ReplyCount int + Status string + Subject string + type VerifyOptions struct + DeliverableText *string + Issuer string