cercago

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

README

Cerca Go API Library

Go Reference

The Cerca Go library provides convenient access to the Cerca REST API from applications written in Go.

It is generated with Stainless.

Installation

import (
	"github.com/matrices/cerca-go" // imported as cercago
)

Or to pin the version:

go get -u 'github.com/matrices/cerca-go@v0.2.1'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/matrices/cerca-go"
	"github.com/matrices/cerca-go/option"
)

func main() {
	client := cercago.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("CERCA_API_KEY")
	)
	thread, err := client.Threads.New(
		context.TODO(),
		"agent_abc123",
		cercago.ThreadNewParams{
			Message: cercago.F("What's on my calendar today?"),
		},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", thread.ID)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: cercago.F("hello"),

	// Explicitly send `"description": null`
	Description: cercago.Null[string](),

	Point: cercago.F(cercago.Point{
		X: cercago.Int(0),
		Y: cercago.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: cercago.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := cercago.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Agents.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Agents.ListAutoPaging(context.TODO(), cercago.AgentListParams{})
// Automatically fetches more pages as needed.
for iter.Next() {
	agentSummary := iter.Current()
	fmt.Printf("%+v\n", agentSummary)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Agents.List(context.TODO(), cercago.AgentListParams{})
for page != nil {
	for _, agent := range page.Agents {
		fmt.Printf("%+v\n", agent)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *cercago.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Agents.New(context.TODO(), cercago.AgentNewParams{
	UserID: cercago.F("user_abc123"),
})
if err != nil {
	var apierr *cercago.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/agents": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Agents.New(
	ctx,
	cercago.AgentNewParams{
		UserID: cercago.F("user_abc123"),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper cercago.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := cercago.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Agents.New(
	context.TODO(),
	cercago.AgentNewParams{
		UserID: cercago.F("user_abc123"),
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
agent, err := client.Agents.New(
	context.TODO(),
	cercago.AgentNewParams{
		UserID: cercago.F("user_abc123"),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", agent)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   cercago.F("id_xxxx"),
    Data: cercago.F(FooNewParamsData{
        FirstName: cercago.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := cercago.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const ApprovalModeAlways = shared.ApprovalModeAlways

This is an alias to an internal value.

View Source
const ApprovalModeNever = shared.ApprovalModeNever

This is an alias to an internal value.

View Source
const ToolNameAgentApprovalsCancel = shared.ToolNameAgentApprovalsCancel

This is an alias to an internal value.

View Source
const ToolNameAgentApprovalsGrantAgent = shared.ToolNameAgentApprovalsGrantAgent

This is an alias to an internal value.

View Source
const ToolNameAgentApprovalsGrantThread = shared.ToolNameAgentApprovalsGrantThread

This is an alias to an internal value.

View Source
const ToolNameAgentApprovalsUpdate = shared.ToolNameAgentApprovalsUpdate

This is an alias to an internal value.

View Source
const ToolNameAgentCreate = shared.ToolNameAgentCreate

This is an alias to an internal value.

View Source
const ToolNameAgentScheduleCreate = shared.ToolNameAgentScheduleCreate

This is an alias to an internal value.

View Source
const ToolNameAgentScheduleDelete = shared.ToolNameAgentScheduleDelete

This is an alias to an internal value.

View Source
const ToolNameAgentScheduleList = shared.ToolNameAgentScheduleList

This is an alias to an internal value.

View Source
const ToolNameAgentScheduleTrigger = shared.ToolNameAgentScheduleTrigger

This is an alias to an internal value.

View Source
const ToolNameAgentScheduleUpdate = shared.ToolNameAgentScheduleUpdate

This is an alias to an internal value.

View Source
const ToolNameAgentThreadsGet = shared.ToolNameAgentThreadsGet

This is an alias to an internal value.

View Source
const ToolNameAgentThreadsList = shared.ToolNameAgentThreadsList

This is an alias to an internal value.

View Source
const ToolNameArtifactRead = shared.ToolNameArtifactRead

This is an alias to an internal value.

View Source
const ToolNameDBQuery = shared.ToolNameDBQuery

This is an alias to an internal value.

View Source
const ToolNameGetTime = shared.ToolNameGetTime

This is an alias to an internal value.

View Source
const ToolNameMemoryDelete = shared.ToolNameMemoryDelete

This is an alias to an internal value.

View Source
const ToolNameMemoryList = shared.ToolNameMemoryList

This is an alias to an internal value.

View Source
const ToolNameMemoryRead = shared.ToolNameMemoryRead

This is an alias to an internal value.

View Source
const ToolNameMemorySearch = shared.ToolNameMemorySearch

This is an alias to an internal value.

View Source
const ToolNameMemoryWrite = shared.ToolNameMemoryWrite

This is an alias to an internal value.

View Source
const ToolNameSandboxExec = shared.ToolNameSandboxExec

This is an alias to an internal value.

View Source
const ToolNameSandboxKill = shared.ToolNameSandboxKill

This is an alias to an internal value.

View Source
const ToolNameSandboxListSessions = shared.ToolNameSandboxListSessions

This is an alias to an internal value.

View Source
const ToolNameSandboxRead = shared.ToolNameSandboxRead

This is an alias to an internal value.

View Source
const ToolNameSandboxReadFile = shared.ToolNameSandboxReadFile

This is an alias to an internal value.

View Source
const ToolNameSandboxSessionRead = shared.ToolNameSandboxSessionRead

This is an alias to an internal value.

View Source
const ToolNameSandboxSpawn = shared.ToolNameSandboxSpawn

This is an alias to an internal value.

View Source
const ToolNameSandboxStdin = shared.ToolNameSandboxStdin

This is an alias to an internal value.

View Source
const ToolNameSandboxSyncArtifact = shared.ToolNameSandboxSyncArtifact

This is an alias to an internal value.

View Source
const ToolNameSandboxWriteFile = shared.ToolNameSandboxWriteFile

This is an alias to an internal value.

View Source
const ToolNameSubThread = shared.ToolNameSubThread

This is an alias to an internal value.

View Source
const ToolNameToolCall = shared.ToolNameToolCall

This is an alias to an internal value.

View Source
const ToolNameToolConnect = shared.ToolNameToolConnect

This is an alias to an internal value.

View Source
const ToolNameToolDiscover = shared.ToolNameToolDiscover

This is an alias to an internal value.

View Source
const ToolNameWait = shared.ToolNameWait

This is an alias to an internal value.

View Source
const ToolNameWebFetch = shared.ToolNameWebFetch

This is an alias to an internal value.

View Source
const ToolNameWebSearch = shared.ToolNameWebSearch

This is an alias to an internal value.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (CERCA_API_KEY, CERCA_BASE_URL). This should be used to initialize new clients.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type APIKeyToolSourceAuth

type APIKeyToolSourceAuth struct {
	ConnectionID string `json:"connectionId" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject AuthInjection            `json:"inject" api:"required"`
	Kind   APIKeyToolSourceAuthKind `json:"kind" api:"required"`
	JSON   apiKeyToolSourceAuthJSON `json:"-"`
}

func (*APIKeyToolSourceAuth) UnmarshalJSON

func (r *APIKeyToolSourceAuth) UnmarshalJSON(data []byte) (err error)

type APIKeyToolSourceAuthKind

type APIKeyToolSourceAuthKind string
const (
	APIKeyToolSourceAuthKindAPIKey APIKeyToolSourceAuthKind = "api_key"
)

func (APIKeyToolSourceAuthKind) IsKnown

func (r APIKeyToolSourceAuthKind) IsKnown() bool

type APIKeyToolSourceAuthParam

type APIKeyToolSourceAuthParam struct {
	ConnectionID param.Field[string] `json:"connectionId" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject param.Field[AuthInjectionUnionParam]  `json:"inject" api:"required"`
	Kind   param.Field[APIKeyToolSourceAuthKind] `json:"kind" api:"required"`
}

func (APIKeyToolSourceAuthParam) MarshalJSON

func (r APIKeyToolSourceAuthParam) MarshalJSON() (data []byte, err error)

type ActivityDetail added in v0.2.0

type ActivityDetail struct {
	Error       string              `json:"error" api:"required,nullable"`
	RecentTurns []ThreadTurnSummary `json:"recentTurns" api:"required"`
	JSON        activityDetailJSON  `json:"-"`
	ActivitySummary
}

func (*ActivityDetail) UnmarshalJSON added in v0.2.0

func (r *ActivityDetail) UnmarshalJSON(data []byte) (err error)

type ActivitySummary added in v0.2.0

type ActivitySummary struct {
	ID             string  `json:"id" api:"required"`
	CompletedAt    string  `json:"completedAt" api:"required,nullable"`
	CreatedAt      string  `json:"createdAt" api:"required"`
	Goal           string  `json:"goal" api:"required"`
	LatestActivity string  `json:"latestActivity" api:"required,nullable"`
	MessageCount   float64 `json:"messageCount" api:"required"`
	Model          string  `json:"model" api:"required"`
	NextStep       string  `json:"nextStep" api:"required,nullable"`
	ParentThreadID string  `json:"parentThreadId" api:"required,nullable"`
	Result         string  `json:"result" api:"required,nullable"`
	ScheduleID     string  `json:"scheduleId" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status    Status              `json:"status" api:"required"`
	StepCount float64             `json:"stepCount" api:"required"`
	UpdatedAt string              `json:"updatedAt" api:"required"`
	JSON      activitySummaryJSON `json:"-"`
}

func (*ActivitySummary) UnmarshalJSON added in v0.2.0

func (r *ActivitySummary) UnmarshalJSON(data []byte) (err error)

type Agent

type Agent struct {
	ID                 string             `json:"id" api:"required"`
	Configuration      Configuration      `json:"configuration" api:"required"`
	CreatedAt          string             `json:"createdAt" api:"required"`
	ExecutionPrincipal ExecutionPrincipal `json:"executionPrincipal" api:"required,nullable"`
	FleetID            string             `json:"fleetId" api:"required"`
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata  Metadata               `json:"metadata" api:"required"`
	OrgID     string                 `json:"orgId" api:"required"`
	UpdatedAt string                 `json:"updatedAt" api:"required"`
	UserID    string                 `json:"userId" api:"required"`
	Effective EffectiveConfiguration `json:"effective"`
	JSON      agentJSON              `json:"-"`
}

func (*Agent) UnmarshalJSON

func (r *Agent) UnmarshalJSON(data []byte) (err error)

type AgentDeleteResponse

type AgentDeleteResponse struct {
	Success AgentDeleteResponseSuccess `json:"success" api:"required"`
	JSON    agentDeleteResponseJSON    `json:"-"`
}

func (*AgentDeleteResponse) UnmarshalJSON

func (r *AgentDeleteResponse) UnmarshalJSON(data []byte) (err error)

type AgentDeleteResponseSuccess

type AgentDeleteResponseSuccess bool
const (
	AgentDeleteResponseSuccessTrue AgentDeleteResponseSuccess = true
)

func (AgentDeleteResponseSuccess) IsKnown

func (r AgentDeleteResponseSuccess) IsKnown() bool

type AgentListParams

type AgentListParams struct {
	// When set to true, lists only agents with active or awaiting threads.
	Active param.Field[AgentListParamsActive] `query:"active"`
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Fleet to list agents from. Defaults to the API key's default fleet when omitted.
	FleetID param.Field[string] `query:"fleetId"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (AgentListParams) URLQuery

func (r AgentListParams) URLQuery() (v url.Values)

URLQuery serializes AgentListParams's query parameters as `url.Values`.

type AgentListParamsActive

type AgentListParamsActive string

When set to true, lists only agents with active or awaiting threads.

const (
	AgentListParamsActiveTrue  AgentListParamsActive = "true"
	AgentListParamsActiveFalse AgentListParamsActive = "false"
)

func (AgentListParamsActive) IsKnown

func (r AgentListParamsActive) IsKnown() bool

type AgentListToolsResponse

type AgentListToolsResponse struct {
	// Unified list of runtime and external tools currently available to the agent.
	Tools          []Tool                     `json:"tools" api:"required"`
	SourceWarnings []SourceWarning            `json:"sourceWarnings"`
	JSON           agentListToolsResponseJSON `json:"-"`
}

Response for GET /agents/{agentId}/tools. The tools field is an inspection list, not a configuration request field.

func (*AgentListToolsResponse) UnmarshalJSON

func (r *AgentListToolsResponse) UnmarshalJSON(data []byte) (err error)

type AgentNewParams

type AgentNewParams struct {
	Configuration param.Field[ConfigurationParam] `json:"configuration"`
	FleetID       param.Field[string]             `json:"fleetId"`
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata param.Field[MetadataParam] `json:"metadata"`
	UserID   param.Field[string]        `json:"userId"`
}

func (AgentNewParams) MarshalJSON

func (r AgentNewParams) MarshalJSON() (data []byte, err error)

type AgentService

type AgentService struct {
	Options []option.RequestOption
}

AgentService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentService method instead.

func NewAgentService

func NewAgentService(opts ...option.RequestOption) (r *AgentService)

NewAgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AgentService) Delete

func (r *AgentService) Delete(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentDeleteResponse, err error)

Delete agent

func (*AgentService) Get

func (r *AgentService) Get(ctx context.Context, agentID string, opts ...option.RequestOption) (res *Agent, err error)

Retrieve agent

func (*AgentService) GetConfig

func (r *AgentService) GetConfig(ctx context.Context, agentID string, opts ...option.RequestOption) (res *EffectiveConfiguration, err error)

Retrieve config

func (*AgentService) List

List agents

func (*AgentService) ListAutoPaging

List agents

func (*AgentService) ListTools

func (r *AgentService) ListTools(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentListToolsResponse, err error)

List tools

func (*AgentService) New

func (r *AgentService) New(ctx context.Context, body AgentNewParams, opts ...option.RequestOption) (res *Agent, err error)

Create agent

func (*AgentService) Update

func (r *AgentService) Update(ctx context.Context, agentID string, body AgentUpdateParams, opts ...option.RequestOption) (res *Agent, err error)

Update agent

func (*AgentService) UpdateMetadata

func (r *AgentService) UpdateMetadata(ctx context.Context, agentID string, body AgentUpdateMetadataParams, opts ...option.RequestOption) (res *Agent, err error)

Update metadata

type AgentSummary

type AgentSummary struct {
	ID                  string  `json:"id" api:"required"`
	ActiveThreadCount   float64 `json:"activeThreadCount" api:"required"`
	AwaitingThreadCount float64 `json:"awaitingThreadCount" api:"required"`
	CreatedAt           string  `json:"createdAt" api:"required"`
	DefaultModel        string  `json:"defaultModel" api:"required,nullable"`
	FleetID             string  `json:"fleetId" api:"required"`
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata  Metadata         `json:"metadata" api:"required"`
	OrgID     string           `json:"orgId" api:"required"`
	UpdatedAt string           `json:"updatedAt" api:"required"`
	UserID    string           `json:"userId" api:"required"`
	JSON      agentSummaryJSON `json:"-"`
}

func (*AgentSummary) UnmarshalJSON

func (r *AgentSummary) UnmarshalJSON(data []byte) (err error)

type AgentUpdateMetadataParams

type AgentUpdateMetadataParams struct {
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata param.Field[MetadataParam] `json:"metadata" api:"required"`
}

func (AgentUpdateMetadataParams) MarshalJSON

func (r AgentUpdateMetadataParams) MarshalJSON() (data []byte, err error)

type AgentUpdateParams

type AgentUpdateParams struct {
	Configuration param.Field[ConfigurationParam] `json:"configuration" api:"required"`
}

func (AgentUpdateParams) MarshalJSON

func (r AgentUpdateParams) MarshalJSON() (data []byte, err error)

type ApprovalGrant

type ApprovalGrant struct {
	ID        string             `json:"id" api:"required"`
	CreatedAt string             `json:"createdAt" api:"required"`
	CreatedBy string             `json:"createdBy" api:"required,nullable"`
	ExpiresAt string             `json:"expiresAt" api:"required,nullable"`
	GrantKey  string             `json:"grantKey" api:"required"`
	Scope     ApprovalGrantScope `json:"scope" api:"required"`
	JSON      approvalGrantJSON  `json:"-"`
}

func (*ApprovalGrant) UnmarshalJSON

func (r *ApprovalGrant) UnmarshalJSON(data []byte) (err error)

type ApprovalGrantDeleteForThreadResponse

type ApprovalGrantDeleteForThreadResponse struct {
	Ok   ApprovalGrantDeleteForThreadResponseOk   `json:"ok" api:"required"`
	JSON approvalGrantDeleteForThreadResponseJSON `json:"-"`
}

func (*ApprovalGrantDeleteForThreadResponse) UnmarshalJSON

func (r *ApprovalGrantDeleteForThreadResponse) UnmarshalJSON(data []byte) (err error)

type ApprovalGrantDeleteForThreadResponseOk

type ApprovalGrantDeleteForThreadResponseOk bool
const (
	ApprovalGrantDeleteForThreadResponseOkTrue ApprovalGrantDeleteForThreadResponseOk = true
)

func (ApprovalGrantDeleteForThreadResponseOk) IsKnown

type ApprovalGrantDeleteResponse

type ApprovalGrantDeleteResponse struct {
	Ok   ApprovalGrantDeleteResponseOk   `json:"ok" api:"required"`
	JSON approvalGrantDeleteResponseJSON `json:"-"`
}

func (*ApprovalGrantDeleteResponse) UnmarshalJSON

func (r *ApprovalGrantDeleteResponse) UnmarshalJSON(data []byte) (err error)

type ApprovalGrantDeleteResponseOk

type ApprovalGrantDeleteResponseOk bool
const (
	ApprovalGrantDeleteResponseOkTrue ApprovalGrantDeleteResponseOk = true
)

func (ApprovalGrantDeleteResponseOk) IsKnown

func (r ApprovalGrantDeleteResponseOk) IsKnown() bool

type ApprovalGrantListParams

type ApprovalGrantListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (ApprovalGrantListParams) URLQuery

func (r ApprovalGrantListParams) URLQuery() (v url.Values)

URLQuery serializes ApprovalGrantListParams's query parameters as `url.Values`.

type ApprovalGrantScope

type ApprovalGrantScope string
const (
	ApprovalGrantScopeThread ApprovalGrantScope = "thread"
	ApprovalGrantScopeAgent  ApprovalGrantScope = "agent"
)

func (ApprovalGrantScope) IsKnown

func (r ApprovalGrantScope) IsKnown() bool

type ApprovalGrantService

type ApprovalGrantService struct {
	Options []option.RequestOption
}

ApprovalGrantService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApprovalGrantService method instead.

func NewApprovalGrantService

func NewApprovalGrantService(opts ...option.RequestOption) (r *ApprovalGrantService)

NewApprovalGrantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ApprovalGrantService) Delete

func (r *ApprovalGrantService) Delete(ctx context.Context, agentID string, grantID string, opts ...option.RequestOption) (res *ApprovalGrantDeleteResponse, err error)

Delete approval grant

func (*ApprovalGrantService) DeleteForThread

func (r *ApprovalGrantService) DeleteForThread(ctx context.Context, agentID string, threadID string, grantID string, opts ...option.RequestOption) (res *ApprovalGrantDeleteForThreadResponse, err error)

Delete approval grant

func (*ApprovalGrantService) List

List approval grants

func (*ApprovalGrantService) ListAutoPaging

List approval grants

func (*ApprovalGrantService) ListForThread

func (r *ApprovalGrantService) ListForThread(ctx context.Context, agentID string, threadID string, opts ...option.RequestOption) (res *[]ApprovalGrant, err error)

List approval grants

type ApprovalMode

type ApprovalMode = shared.ApprovalMode

This is an alias to an internal type.

type ApprovalPolicy

type ApprovalPolicy struct {
	TimeoutMs float64                        `json:"timeoutMs"`
	Tools     map[string]shared.ApprovalMode `json:"tools"`
	JSON      approvalPolicyJSON             `json:"-"`
}

func (*ApprovalPolicy) UnmarshalJSON

func (r *ApprovalPolicy) UnmarshalJSON(data []byte) (err error)

type ApprovalPolicyParam

type ApprovalPolicyParam struct {
	TimeoutMs param.Field[float64]                        `json:"timeoutMs"`
	Tools     param.Field[map[string]shared.ApprovalMode] `json:"tools"`
}

func (ApprovalPolicyParam) MarshalJSON

func (r ApprovalPolicyParam) MarshalJSON() (data []byte, err error)

type ApprovalRequest

type ApprovalRequest struct {
	ID        string `json:"id" api:"required"`
	CreatedAt string `json:"createdAt" api:"required"`
	// Parsed JSON tool input from the original tool call. Generated SDKs may expose
	// this as unknown or Any.
	Input             interface{}           `json:"input" api:"required"`
	ResolvedAt        string                `json:"resolvedAt" api:"required,nullable"`
	RuntimeToolName   shared.ToolName       `json:"runtimeToolName" api:"required"`
	Status            ApprovalRequestStatus `json:"status" api:"required"`
	ThreadID          string                `json:"threadId" api:"required"`
	TimeoutAt         string                `json:"timeoutAt" api:"required,nullable"`
	TimeoutMs         float64               `json:"timeoutMs" api:"required,nullable"`
	ToolIndex         float64               `json:"toolIndex" api:"required"`
	ToolName          string                `json:"toolName" api:"required"`
	ToolUseID         string                `json:"toolUseId" api:"required"`
	TurnID            string                `json:"turnId" api:"required"`
	ToolSourceID      string                `json:"toolSourceId"`
	ToolSourceVersion float64               `json:"toolSourceVersion"`
	JSON              approvalRequestJSON   `json:"-"`
}

func (*ApprovalRequest) UnmarshalJSON

func (r *ApprovalRequest) UnmarshalJSON(data []byte) (err error)

type ApprovalRequestListParams

type ApprovalRequestListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
	// Optional thread id filter.
	ThreadID param.Field[string] `query:"threadId"`
}

func (ApprovalRequestListParams) URLQuery

func (r ApprovalRequestListParams) URLQuery() (v url.Values)

URLQuery serializes ApprovalRequestListParams's query parameters as `url.Values`.

type ApprovalRequestResolveParams

type ApprovalRequestResolveParams struct {
	Decision param.Field[ApprovalRequestResolveParamsDecision] `json:"decision" api:"required"`
	Grant    param.Field[ApprovalRequestResolveParamsGrant]    `json:"grant"`
}

func (ApprovalRequestResolveParams) MarshalJSON

func (r ApprovalRequestResolveParams) MarshalJSON() (data []byte, err error)

type ApprovalRequestResolveParamsDecision

type ApprovalRequestResolveParamsDecision string
const (
	ApprovalRequestResolveParamsDecisionApprove ApprovalRequestResolveParamsDecision = "approve"
	ApprovalRequestResolveParamsDecisionDeny    ApprovalRequestResolveParamsDecision = "deny"
	ApprovalRequestResolveParamsDecisionCancel  ApprovalRequestResolveParamsDecision = "cancel"
)

func (ApprovalRequestResolveParamsDecision) IsKnown

type ApprovalRequestResolveParamsGrant

type ApprovalRequestResolveParamsGrant string
const (
	ApprovalRequestResolveParamsGrantThread ApprovalRequestResolveParamsGrant = "thread"
	ApprovalRequestResolveParamsGrantAgent  ApprovalRequestResolveParamsGrant = "agent"
)

func (ApprovalRequestResolveParamsGrant) IsKnown

type ApprovalRequestService

type ApprovalRequestService struct {
	Options []option.RequestOption
}

ApprovalRequestService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApprovalRequestService method instead.

func NewApprovalRequestService

func NewApprovalRequestService(opts ...option.RequestOption) (r *ApprovalRequestService)

NewApprovalRequestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ApprovalRequestService) List

List approvals

func (*ApprovalRequestService) ListAutoPaging

List approvals

func (*ApprovalRequestService) Resolve

func (r *ApprovalRequestService) Resolve(ctx context.Context, agentID string, threadID string, approvalID string, body ApprovalRequestResolveParams, opts ...option.RequestOption) (res *ApprovalRequest, err error)

Create approval

type ApprovalRequestStatus

type ApprovalRequestStatus string
const (
	ApprovalRequestStatusPending   ApprovalRequestStatus = "pending"
	ApprovalRequestStatusApproved  ApprovalRequestStatus = "approved"
	ApprovalRequestStatusDenied    ApprovalRequestStatus = "denied"
	ApprovalRequestStatusCancelled ApprovalRequestStatus = "cancelled"
	ApprovalRequestStatusTimedOut  ApprovalRequestStatus = "timed_out"
)

func (ApprovalRequestStatus) IsKnown

func (r ApprovalRequestStatus) IsKnown() bool

type AttachedConnection

type AttachedConnection struct {
	AttachedAt string                 `json:"attachedAt" api:"required"`
	Metadata   ToolConnectionMetadata `json:"metadata"`
	JSON       attachedConnectionJSON `json:"-"`
	Connection
}

func (*AttachedConnection) UnmarshalJSON

func (r *AttachedConnection) UnmarshalJSON(data []byte) (err error)

type AuthContextResponse

type AuthContextResponse struct {
	KeyID string                  `json:"keyId" api:"required"`
	OrgID string                  `json:"orgId" api:"required"`
	JSON  authContextResponseJSON `json:"-"`
}

func (*AuthContextResponse) UnmarshalJSON

func (r *AuthContextResponse) UnmarshalJSON(data []byte) (err error)

type AuthFleetsResponse

type AuthFleetsResponse struct {
	Cursor  string                 `json:"cursor" api:"required,nullable"`
	Fleets  []Fleet                `json:"fleets" api:"required"`
	HasMore bool                   `json:"hasMore" api:"required"`
	JSON    authFleetsResponseJSON `json:"-"`
}

func (*AuthFleetsResponse) UnmarshalJSON

func (r *AuthFleetsResponse) UnmarshalJSON(data []byte) (err error)

type AuthInjection

type AuthInjection struct {
	Location AuthInjectionLocation `json:"location" api:"required"`
	Name     string                `json:"name" api:"required"`
	// Optional value template. For OAuth connection auth, use values such as
	// `Bearer ${token}`.
	Value string            `json:"value"`
	JSON  authInjectionJSON `json:"-"`
	// contains filtered or unexported fields
}

Where an API key or OAuth access token should be injected into outgoing tool-source requests.

func (AuthInjection) AsUnion

func (r AuthInjection) AsUnion() AuthInjectionUnion

AsUnion returns a AuthInjectionUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are AuthInjectionHeaderAuthInjection, AuthInjectionQueryAuthInjection.

func (*AuthInjection) UnmarshalJSON

func (r *AuthInjection) UnmarshalJSON(data []byte) (err error)

type AuthInjectionHeaderAuthInjection

type AuthInjectionHeaderAuthInjection struct {
	Location AuthInjectionHeaderAuthInjectionLocation `json:"location" api:"required"`
	Name     string                                   `json:"name" api:"required"`
	// Optional value template. For OAuth connection auth, use values such as
	// `Bearer ${token}`.
	Value string                               `json:"value"`
	JSON  authInjectionHeaderAuthInjectionJSON `json:"-"`
}

func (*AuthInjectionHeaderAuthInjection) UnmarshalJSON

func (r *AuthInjectionHeaderAuthInjection) UnmarshalJSON(data []byte) (err error)

type AuthInjectionHeaderAuthInjectionLocation

type AuthInjectionHeaderAuthInjectionLocation string
const (
	AuthInjectionHeaderAuthInjectionLocationHeader AuthInjectionHeaderAuthInjectionLocation = "header"
)

func (AuthInjectionHeaderAuthInjectionLocation) IsKnown

type AuthInjectionHeaderAuthInjectionParam

type AuthInjectionHeaderAuthInjectionParam struct {
	Location param.Field[AuthInjectionHeaderAuthInjectionLocation] `json:"location" api:"required"`
	Name     param.Field[string]                                   `json:"name" api:"required"`
	// Optional value template. For OAuth connection auth, use values such as
	// `Bearer ${token}`.
	Value param.Field[string] `json:"value"`
}

func (AuthInjectionHeaderAuthInjectionParam) MarshalJSON

func (r AuthInjectionHeaderAuthInjectionParam) MarshalJSON() (data []byte, err error)

type AuthInjectionLocation

type AuthInjectionLocation string
const (
	AuthInjectionLocationHeader AuthInjectionLocation = "header"
	AuthInjectionLocationQuery  AuthInjectionLocation = "query"
)

func (AuthInjectionLocation) IsKnown

func (r AuthInjectionLocation) IsKnown() bool

type AuthInjectionParam

type AuthInjectionParam struct {
	Location param.Field[AuthInjectionLocation] `json:"location" api:"required"`
	Name     param.Field[string]                `json:"name" api:"required"`
	// Optional value template. For OAuth connection auth, use values such as
	// `Bearer ${token}`.
	Value param.Field[string] `json:"value"`
}

Where an API key or OAuth access token should be injected into outgoing tool-source requests.

func (AuthInjectionParam) MarshalJSON

func (r AuthInjectionParam) MarshalJSON() (data []byte, err error)

type AuthInjectionQueryAuthInjection

type AuthInjectionQueryAuthInjection struct {
	Location AuthInjectionQueryAuthInjectionLocation `json:"location" api:"required"`
	Name     string                                  `json:"name" api:"required"`
	JSON     authInjectionQueryAuthInjectionJSON     `json:"-"`
}

func (*AuthInjectionQueryAuthInjection) UnmarshalJSON

func (r *AuthInjectionQueryAuthInjection) UnmarshalJSON(data []byte) (err error)

type AuthInjectionQueryAuthInjectionLocation

type AuthInjectionQueryAuthInjectionLocation string
const (
	AuthInjectionQueryAuthInjectionLocationQuery AuthInjectionQueryAuthInjectionLocation = "query"
)

func (AuthInjectionQueryAuthInjectionLocation) IsKnown

type AuthInjectionQueryAuthInjectionParam

type AuthInjectionQueryAuthInjectionParam struct {
	Location param.Field[AuthInjectionQueryAuthInjectionLocation] `json:"location" api:"required"`
	Name     param.Field[string]                                  `json:"name" api:"required"`
}

func (AuthInjectionQueryAuthInjectionParam) MarshalJSON

func (r AuthInjectionQueryAuthInjectionParam) MarshalJSON() (data []byte, err error)

type AuthInjectionUnion

type AuthInjectionUnion interface {
	// contains filtered or unexported methods
}

Where an API key or OAuth access token should be injected into outgoing tool-source requests.

Union satisfied by AuthInjectionHeaderAuthInjection or AuthInjectionQueryAuthInjection.

type AuthInjectionUnionParam

type AuthInjectionUnionParam interface {
	// contains filtered or unexported methods
}

Where an API key or OAuth access token should be injected into outgoing tool-source requests.

Satisfied by AuthInjectionHeaderAuthInjectionParam, AuthInjectionQueryAuthInjectionParam, AuthInjectionParam.

type AuthListFleetsParams

type AuthListFleetsParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (AuthListFleetsParams) URLQuery

func (r AuthListFleetsParams) URLQuery() (v url.Values)

URLQuery serializes AuthListFleetsParams's query parameters as `url.Values`.

type AuthService

type AuthService struct {
	Options []option.RequestOption
}

AuthService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthService method instead.

func NewAuthService

func NewAuthService(opts ...option.RequestOption) (r *AuthService)

NewAuthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthService) Context

func (r *AuthService) Context(ctx context.Context, opts ...option.RequestOption) (res *AuthContextResponse, err error)

Retrieve context

func (*AuthService) ListFleets

List fleets

func (*AuthService) ListFleetsAutoPaging

List fleets

type Client

type Client struct {
	Options          []option.RequestOption
	Auth             *AuthService
	OAuth            *OAuthService
	Connections      *ConnectionService
	Fleets           *FleetService
	Tools            *ToolService
	Webhooks         *WebhookService
	Events           *EventService
	Agents           *AgentService
	Threads          *ThreadService
	Context          *ContextService
	Schedules        *ScheduleService
	ApprovalRequests *ApprovalRequestService
	ApprovalGrants   *ApprovalGrantService
	Sandbox          *SandboxService
	Models           *ModelService
}

Client creates a struct with services and top level methods that help with interacting with the cerca API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r *Client)

NewClient generates a new client with the default option read from the environment (CERCA_API_KEY, CERCA_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type CompiledContext

type CompiledContext struct {
	EnabledTools []shared.ToolName   `json:"enabledTools" api:"required,nullable"`
	SystemPrompt string              `json:"systemPrompt" api:"required,nullable"`
	TurnID       string              `json:"turnId" api:"required,nullable"`
	JSON         compiledContextJSON `json:"-"`
}

func (*CompiledContext) UnmarshalJSON

func (r *CompiledContext) UnmarshalJSON(data []byte) (err error)

type Configuration

type Configuration struct {
	Approvals    ApprovalPolicy `json:"approvals"`
	DefaultModel string         `json:"defaultModel"`
	Instructions string         `json:"instructions"`
	// Agent tool allowlist. These tools are subject to fleet defaults and locks, and
	// thread or turn requests may only narrow the resulting effective tools.
	Tools []shared.ToolSpec `json:"tools"`
	JSON  configurationJSON `json:"-"`
}

func (*Configuration) UnmarshalJSON

func (r *Configuration) UnmarshalJSON(data []byte) (err error)

type ConfigurationFieldName

type ConfigurationFieldName string
const (
	ConfigurationFieldNameDefaultModel ConfigurationFieldName = "defaultModel"
	ConfigurationFieldNameInstructions ConfigurationFieldName = "instructions"
	ConfigurationFieldNameTools        ConfigurationFieldName = "tools"
	ConfigurationFieldNameApprovals    ConfigurationFieldName = "approvals"
)

func (ConfigurationFieldName) IsKnown

func (r ConfigurationFieldName) IsKnown() bool

type ConfigurationParam

type ConfigurationParam struct {
	Approvals    param.Field[ApprovalPolicyParam] `json:"approvals"`
	DefaultModel param.Field[string]              `json:"defaultModel"`
	Instructions param.Field[string]              `json:"instructions"`
	// Agent tool allowlist. These tools are subject to fleet defaults and locks, and
	// thread or turn requests may only narrow the resulting effective tools.
	Tools param.Field[[]shared.ToolSpecParam] `json:"tools"`
}

func (ConfigurationParam) MarshalJSON

func (r ConfigurationParam) MarshalJSON() (data []byte, err error)

type Connection

type Connection struct {
	ID           string `json:"id" api:"required" format:"uuid"`
	AccountLabel string `json:"accountLabel" api:"required,nullable"`
	CreatedAt    string `json:"createdAt" api:"required"`
	// Public owner for a reusable connection. Organization owners use the
	// authenticated organization; fleet owners add a fleetId.
	Owner     ConnectionOwner    `json:"owner" api:"required"`
	Provider  CredentialProvider `json:"provider" api:"required"`
	Scopes    []string           `json:"scopes" api:"required"`
	Type      CredentialType     `json:"type" api:"required"`
	UpdatedAt string             `json:"updatedAt" api:"required"`
	JSON      connectionJSON     `json:"-"`
}

func (*Connection) UnmarshalJSON

func (r *Connection) UnmarshalJSON(data []byte) (err error)

type ConnectionAttachParams

type ConnectionAttachParams struct {
	ConnectionID param.Field[string]                      `json:"connectionId" api:"required" format:"uuid"`
	Metadata     param.Field[ToolConnectionMetadataParam] `json:"metadata"`
}

func (ConnectionAttachParams) MarshalJSON

func (r ConnectionAttachParams) MarshalJSON() (data []byte, err error)

type ConnectionDeleteParams

type ConnectionDeleteParams struct {
	// Public connection owner type.
	OwnerType param.Field[ConnectionDeleteParamsOwnerType] `query:"ownerType" api:"required"`
	// Required when ownerType is fleet.
	FleetID param.Field[string] `query:"fleetId"`
}

func (ConnectionDeleteParams) URLQuery

func (r ConnectionDeleteParams) URLQuery() (v url.Values)

URLQuery serializes ConnectionDeleteParams's query parameters as `url.Values`.

type ConnectionDeleteParamsOwnerType

type ConnectionDeleteParamsOwnerType string

Public connection owner type.

const (
	ConnectionDeleteParamsOwnerTypeOrganization ConnectionDeleteParamsOwnerType = "organization"
	ConnectionDeleteParamsOwnerTypeFleet        ConnectionDeleteParamsOwnerType = "fleet"
)

func (ConnectionDeleteParamsOwnerType) IsKnown

type ConnectionDeleteResponse

type ConnectionDeleteResponse struct {
	Success ConnectionDeleteResponseSuccess `json:"success" api:"required"`
	JSON    connectionDeleteResponseJSON    `json:"-"`
}

func (*ConnectionDeleteResponse) UnmarshalJSON

func (r *ConnectionDeleteResponse) UnmarshalJSON(data []byte) (err error)

type ConnectionDeleteResponseSuccess

type ConnectionDeleteResponseSuccess bool
const (
	ConnectionDeleteResponseSuccessTrue ConnectionDeleteResponseSuccess = true
)

func (ConnectionDeleteResponseSuccess) IsKnown

type ConnectionDetachResponse

type ConnectionDetachResponse struct {
	Success ConnectionDetachResponseSuccess `json:"success" api:"required"`
	JSON    connectionDetachResponseJSON    `json:"-"`
}

func (*ConnectionDetachResponse) UnmarshalJSON

func (r *ConnectionDetachResponse) UnmarshalJSON(data []byte) (err error)

type ConnectionDetachResponseSuccess

type ConnectionDetachResponseSuccess bool
const (
	ConnectionDetachResponseSuccessTrue ConnectionDetachResponseSuccess = true
)

func (ConnectionDetachResponseSuccess) IsKnown

type ConnectionListForAgentResponse

type ConnectionListForAgentResponse struct {
	Connections []AttachedConnection               `json:"connections" api:"required"`
	Cursor      string                             `json:"cursor" api:"required,nullable"`
	HasMore     bool                               `json:"hasMore" api:"required"`
	JSON        connectionListForAgentResponseJSON `json:"-"`
}

func (*ConnectionListForAgentResponse) UnmarshalJSON

func (r *ConnectionListForAgentResponse) UnmarshalJSON(data []byte) (err error)

type ConnectionListParams

type ConnectionListParams struct {
	// Public connection owner type.
	OwnerType param.Field[ConnectionListParamsOwnerType] `query:"ownerType" api:"required"`
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Required when ownerType is fleet.
	FleetID param.Field[string] `query:"fleetId"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (ConnectionListParams) URLQuery

func (r ConnectionListParams) URLQuery() (v url.Values)

URLQuery serializes ConnectionListParams's query parameters as `url.Values`.

type ConnectionListParamsOwnerType

type ConnectionListParamsOwnerType string

Public connection owner type.

const (
	ConnectionListParamsOwnerTypeOrganization ConnectionListParamsOwnerType = "organization"
	ConnectionListParamsOwnerTypeFleet        ConnectionListParamsOwnerType = "fleet"
)

func (ConnectionListParamsOwnerType) IsKnown

func (r ConnectionListParamsOwnerType) IsKnown() bool

type ConnectionNewParams

type ConnectionNewParams struct {
	// API key secret. It is stored securely and is not returned.
	APIKey param.Field[string] `json:"apiKey" api:"required"`
	// Public owner for a reusable connection. Organization owners use the
	// authenticated organization; fleet owners add a fleetId.
	Owner param.Field[ConnectionOwnerUnionParam] `json:"owner" api:"required"`
	// Credential provider to store an API key for.
	Provider param.Field[string] `json:"provider" api:"required"`
	// Optional human-readable account label.
	AccountLabel param.Field[string] `json:"accountLabel"`
}

func (ConnectionNewParams) MarshalJSON

func (r ConnectionNewParams) MarshalJSON() (data []byte, err error)

type ConnectionOwner

type ConnectionOwner struct {
	Type    ConnectionOwnerType `json:"type" api:"required"`
	FleetID string              `json:"fleetId"`
	JSON    connectionOwnerJSON `json:"-"`
	// contains filtered or unexported fields
}

Public owner for a reusable connection. Organization owners use the authenticated organization; fleet owners add a fleetId.

func (ConnectionOwner) AsUnion

AsUnion returns a ConnectionOwnerUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ConnectionOwnerOrganizationConnectionOwner, ConnectionOwnerFleetConnectionOwner.

func (*ConnectionOwner) UnmarshalJSON

func (r *ConnectionOwner) UnmarshalJSON(data []byte) (err error)

type ConnectionOwnerFleetConnectionOwner

type ConnectionOwnerFleetConnectionOwner struct {
	FleetID string                                  `json:"fleetId" api:"required"`
	Type    ConnectionOwnerFleetConnectionOwnerType `json:"type" api:"required"`
	JSON    connectionOwnerFleetConnectionOwnerJSON `json:"-"`
}

func (*ConnectionOwnerFleetConnectionOwner) UnmarshalJSON

func (r *ConnectionOwnerFleetConnectionOwner) UnmarshalJSON(data []byte) (err error)

type ConnectionOwnerFleetConnectionOwnerParam

type ConnectionOwnerFleetConnectionOwnerParam struct {
	FleetID param.Field[string]                                  `json:"fleetId" api:"required"`
	Type    param.Field[ConnectionOwnerFleetConnectionOwnerType] `json:"type" api:"required"`
}

func (ConnectionOwnerFleetConnectionOwnerParam) MarshalJSON

func (r ConnectionOwnerFleetConnectionOwnerParam) MarshalJSON() (data []byte, err error)

type ConnectionOwnerFleetConnectionOwnerType

type ConnectionOwnerFleetConnectionOwnerType string
const (
	ConnectionOwnerFleetConnectionOwnerTypeFleet ConnectionOwnerFleetConnectionOwnerType = "fleet"
)

func (ConnectionOwnerFleetConnectionOwnerType) IsKnown

type ConnectionOwnerOrganizationConnectionOwner

type ConnectionOwnerOrganizationConnectionOwner struct {
	Type ConnectionOwnerOrganizationConnectionOwnerType `json:"type" api:"required"`
	JSON connectionOwnerOrganizationConnectionOwnerJSON `json:"-"`
}

func (*ConnectionOwnerOrganizationConnectionOwner) UnmarshalJSON

func (r *ConnectionOwnerOrganizationConnectionOwner) UnmarshalJSON(data []byte) (err error)

type ConnectionOwnerOrganizationConnectionOwnerParam

type ConnectionOwnerOrganizationConnectionOwnerParam struct {
	Type param.Field[ConnectionOwnerOrganizationConnectionOwnerType] `json:"type" api:"required"`
}

func (ConnectionOwnerOrganizationConnectionOwnerParam) MarshalJSON

func (r ConnectionOwnerOrganizationConnectionOwnerParam) MarshalJSON() (data []byte, err error)

type ConnectionOwnerOrganizationConnectionOwnerType

type ConnectionOwnerOrganizationConnectionOwnerType string
const (
	ConnectionOwnerOrganizationConnectionOwnerTypeOrganization ConnectionOwnerOrganizationConnectionOwnerType = "organization"
)

func (ConnectionOwnerOrganizationConnectionOwnerType) IsKnown

type ConnectionOwnerParam

type ConnectionOwnerParam struct {
	Type    param.Field[ConnectionOwnerType] `json:"type" api:"required"`
	FleetID param.Field[string]              `json:"fleetId"`
}

Public owner for a reusable connection. Organization owners use the authenticated organization; fleet owners add a fleetId.

func (ConnectionOwnerParam) MarshalJSON

func (r ConnectionOwnerParam) MarshalJSON() (data []byte, err error)

type ConnectionOwnerType

type ConnectionOwnerType string
const (
	ConnectionOwnerTypeOrganization ConnectionOwnerType = "organization"
	ConnectionOwnerTypeFleet        ConnectionOwnerType = "fleet"
)

func (ConnectionOwnerType) IsKnown

func (r ConnectionOwnerType) IsKnown() bool

type ConnectionOwnerUnion

type ConnectionOwnerUnion interface {
	// contains filtered or unexported methods
}

Public owner for a reusable connection. Organization owners use the authenticated organization; fleet owners add a fleetId.

Union satisfied by ConnectionOwnerOrganizationConnectionOwner or ConnectionOwnerFleetConnectionOwner.

type ConnectionOwnerUnionParam

type ConnectionOwnerUnionParam interface {
	// contains filtered or unexported methods
}

Public owner for a reusable connection. Organization owners use the authenticated organization; fleet owners add a fleetId.

Satisfied by ConnectionOwnerOrganizationConnectionOwnerParam, ConnectionOwnerFleetConnectionOwnerParam, ConnectionOwnerParam.

type ConnectionService

type ConnectionService struct {
	Options []option.RequestOption
}

ConnectionService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConnectionService method instead.

func NewConnectionService

func NewConnectionService(opts ...option.RequestOption) (r *ConnectionService)

NewConnectionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ConnectionService) Attach

func (r *ConnectionService) Attach(ctx context.Context, agentID string, body ConnectionAttachParams, opts ...option.RequestOption) (res *AttachedConnection, err error)

Attach connection

func (*ConnectionService) Delete

func (r *ConnectionService) Delete(ctx context.Context, connectionID string, body ConnectionDeleteParams, opts ...option.RequestOption) (res *ConnectionDeleteResponse, err error)

Delete connection

func (*ConnectionService) Detach

func (r *ConnectionService) Detach(ctx context.Context, agentID string, connectionID string, opts ...option.RequestOption) (res *ConnectionDetachResponse, err error)

Detach connection

func (*ConnectionService) List

List connections

func (*ConnectionService) ListAutoPaging

List connections

func (*ConnectionService) ListForAgent

func (r *ConnectionService) ListForAgent(ctx context.Context, agentID string, opts ...option.RequestOption) (res *ConnectionListForAgentResponse, err error)

List connections

func (*ConnectionService) New

Create API key

type ContentBlock

type ContentBlock struct {
	Type ContentBlockType `json:"type" api:"required"`
	ID   string           `json:"id"`
	// This field can have the runtime type of [string], [interface{}].
	Content      interface{} `json:"content"`
	DeniedByUser bool        `json:"deniedByUser"`
	// This field can have the runtime type of [interface{}].
	Input   interface{}     `json:"input"`
	IsError bool            `json:"isError"`
	Name    shared.ToolName `json:"name"`
	// This field can have the runtime type of [map[string]map[string]string].
	ProviderMetadata interface{}      `json:"providerMetadata"`
	Text             string           `json:"text"`
	ToolUseID        string           `json:"toolUseId"`
	JSON             contentBlockJSON `json:"-"`
	// contains filtered or unexported fields
}

Message content block. The `type` field distinguishes text, tool use, tool result, server tool use, and web search result blocks.

func (ContentBlock) AsUnion

func (r ContentBlock) AsUnion() ContentBlockUnion

AsUnion returns a ContentBlockUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ContentBlockTextContentBlock, ContentBlockToolUseContentBlock, ContentBlockToolResultContentBlock, ContentBlockServerToolUseContentBlock, ContentBlockWebSearchToolResultContentBlock.

func (*ContentBlock) UnmarshalJSON

func (r *ContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockServerToolUseContentBlock

type ContentBlockServerToolUseContentBlock struct {
	ID string `json:"id" api:"required"`
	// Any JSON value. Generated SDKs may expose this value boundary as unknown or Any.
	Input            interface{}                               `json:"input" api:"required"`
	Name             string                                    `json:"name" api:"required"`
	Type             ContentBlockServerToolUseContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string              `json:"providerMetadata"`
	JSON             contentBlockServerToolUseContentBlockJSON `json:"-"`
}

func (*ContentBlockServerToolUseContentBlock) UnmarshalJSON

func (r *ContentBlockServerToolUseContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockServerToolUseContentBlockType

type ContentBlockServerToolUseContentBlockType string
const (
	ContentBlockServerToolUseContentBlockTypeServerToolUse ContentBlockServerToolUseContentBlockType = "server_tool_use"
)

func (ContentBlockServerToolUseContentBlockType) IsKnown

type ContentBlockTextContentBlock

type ContentBlockTextContentBlock struct {
	Text             string                           `json:"text" api:"required"`
	Type             ContentBlockTextContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string     `json:"providerMetadata"`
	JSON             contentBlockTextContentBlockJSON `json:"-"`
}

func (*ContentBlockTextContentBlock) UnmarshalJSON

func (r *ContentBlockTextContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockTextContentBlockType

type ContentBlockTextContentBlockType string
const (
	ContentBlockTextContentBlockTypeText ContentBlockTextContentBlockType = "text"
)

func (ContentBlockTextContentBlockType) IsKnown

type ContentBlockToolResultContentBlock

type ContentBlockToolResultContentBlock struct {
	Content          string                                 `json:"content" api:"required"`
	IsError          bool                                   `json:"isError" api:"required"`
	ToolUseID        string                                 `json:"toolUseId" api:"required"`
	Type             ContentBlockToolResultContentBlockType `json:"type" api:"required"`
	DeniedByUser     bool                                   `json:"deniedByUser"`
	ProviderMetadata map[string]map[string]string           `json:"providerMetadata"`
	JSON             contentBlockToolResultContentBlockJSON `json:"-"`
}

func (*ContentBlockToolResultContentBlock) UnmarshalJSON

func (r *ContentBlockToolResultContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockToolResultContentBlockType

type ContentBlockToolResultContentBlockType string
const (
	ContentBlockToolResultContentBlockTypeToolResult ContentBlockToolResultContentBlockType = "tool_result"
)

func (ContentBlockToolResultContentBlockType) IsKnown

type ContentBlockToolUseContentBlock

type ContentBlockToolUseContentBlock struct {
	ID string `json:"id" api:"required"`
	// Any JSON value. Generated SDKs may expose this value boundary as unknown or Any.
	Input            interface{}                         `json:"input" api:"required"`
	Name             shared.ToolName                     `json:"name" api:"required"`
	Type             ContentBlockToolUseContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string        `json:"providerMetadata"`
	JSON             contentBlockToolUseContentBlockJSON `json:"-"`
}

func (*ContentBlockToolUseContentBlock) UnmarshalJSON

func (r *ContentBlockToolUseContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockToolUseContentBlockType

type ContentBlockToolUseContentBlockType string
const (
	ContentBlockToolUseContentBlockTypeToolUse ContentBlockToolUseContentBlockType = "tool_use"
)

func (ContentBlockToolUseContentBlockType) IsKnown

type ContentBlockType

type ContentBlockType string
const (
	ContentBlockTypeText                ContentBlockType = "text"
	ContentBlockTypeToolUse             ContentBlockType = "tool_use"
	ContentBlockTypeToolResult          ContentBlockType = "tool_result"
	ContentBlockTypeServerToolUse       ContentBlockType = "server_tool_use"
	ContentBlockTypeWebSearchToolResult ContentBlockType = "web_search_tool_result"
)

func (ContentBlockType) IsKnown

func (r ContentBlockType) IsKnown() bool

type ContentBlockUnion

type ContentBlockUnion interface {
	// contains filtered or unexported methods
}

Message content block. The `type` field distinguishes text, tool use, tool result, server tool use, and web search result blocks.

Union satisfied by ContentBlockTextContentBlock, ContentBlockToolUseContentBlock, ContentBlockToolResultContentBlock, ContentBlockServerToolUseContentBlock or ContentBlockWebSearchToolResultContentBlock.

type ContentBlockWebSearchToolResultContentBlock

type ContentBlockWebSearchToolResultContentBlock struct {
	// Web search result payload. The runtime returns either an array of web search
	// results or an error object.
	Content   interface{}                                     `json:"content" api:"required"`
	ToolUseID string                                          `json:"toolUseId" api:"required"`
	Type      ContentBlockWebSearchToolResultContentBlockType `json:"type" api:"required"`
	JSON      contentBlockWebSearchToolResultContentBlockJSON `json:"-"`
}

func (*ContentBlockWebSearchToolResultContentBlock) UnmarshalJSON

func (r *ContentBlockWebSearchToolResultContentBlock) UnmarshalJSON(data []byte) (err error)

type ContentBlockWebSearchToolResultContentBlockType

type ContentBlockWebSearchToolResultContentBlockType string
const (
	ContentBlockWebSearchToolResultContentBlockTypeWebSearchToolResult ContentBlockWebSearchToolResultContentBlockType = "web_search_tool_result"
)

func (ContentBlockWebSearchToolResultContentBlockType) IsKnown

type ContextDeleteParams

type ContextDeleteParams struct {
	// Context entry key.
	Key param.Field[string] `query:"key" api:"required"`
}

func (ContextDeleteParams) URLQuery

func (r ContextDeleteParams) URLQuery() (v url.Values)

URLQuery serializes ContextDeleteParams's query parameters as `url.Values`.

type ContextDeleteResponse

type ContextDeleteResponse struct {
	Success ContextDeleteResponseSuccess `json:"success" api:"required"`
	JSON    contextDeleteResponseJSON    `json:"-"`
}

func (*ContextDeleteResponse) UnmarshalJSON

func (r *ContextDeleteResponse) UnmarshalJSON(data []byte) (err error)

type ContextDeleteResponseSuccess

type ContextDeleteResponseSuccess bool
const (
	ContextDeleteResponseSuccessTrue ContextDeleteResponseSuccess = true
)

func (ContextDeleteResponseSuccess) IsKnown

func (r ContextDeleteResponseSuccess) IsKnown() bool

type ContextGetParams

type ContextGetParams struct {
	// Context entry key.
	Key param.Field[string] `query:"key" api:"required"`
}

func (ContextGetParams) URLQuery

func (r ContextGetParams) URLQuery() (v url.Values)

URLQuery serializes ContextGetParams's query parameters as `url.Values`.

type ContextListParams

type ContextListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
	// Optional key prefix filter.
	Prefix param.Field[string] `query:"prefix"`
}

func (ContextListParams) URLQuery

func (r ContextListParams) URLQuery() (v url.Values)

URLQuery serializes ContextListParams's query parameters as `url.Values`.

type ContextSearchParams

type ContextSearchParams struct {
	// Search query.
	Q param.Field[string] `query:"q" api:"required"`
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
	// Optional key prefix filter.
	Prefix param.Field[string] `query:"prefix"`
}

func (ContextSearchParams) URLQuery

func (r ContextSearchParams) URLQuery() (v url.Values)

URLQuery serializes ContextSearchParams's query parameters as `url.Values`.

type ContextService

type ContextService struct {
	Options []option.RequestOption
}

ContextService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewContextService method instead.

func NewContextService

func NewContextService(opts ...option.RequestOption) (r *ContextService)

NewContextService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ContextService) Delete

func (r *ContextService) Delete(ctx context.Context, agentID string, body ContextDeleteParams, opts ...option.RequestOption) (res *ContextDeleteResponse, err error)

Delete context entry

func (*ContextService) Get

func (r *ContextService) Get(ctx context.Context, agentID string, query ContextGetParams, opts ...option.RequestOption) (res *Entry, err error)

Retrieve context entry

func (*ContextService) List

List context entries

func (*ContextService) ListAutoPaging

List context entries

func (*ContextService) Search

Search context

func (*ContextService) SearchAutoPaging

Search context

func (*ContextService) Write

func (r *ContextService) Write(ctx context.Context, agentID string, body ContextWriteParams, opts ...option.RequestOption) (res *Entry, err error)

Update context entry

type ContextWriteParams

type ContextWriteParams struct {
	Content         param.Field[string]  `json:"content" api:"required"`
	Key             param.Field[string]  `json:"key" api:"required"`
	ExpectedVersion param.Field[float64] `json:"expectedVersion"`
	MimeType        param.Field[string]  `json:"mimeType"`
}

func (ContextWriteParams) MarshalJSON

func (r ContextWriteParams) MarshalJSON() (data []byte, err error)

type CredentialProvider

type CredentialProvider string
const (
	CredentialProviderGoogle  CredentialProvider = "google"
	CredentialProviderGitHub  CredentialProvider = "github"
	CredentialProviderSlack   CredentialProvider = "slack"
	CredentialProviderLinear  CredentialProvider = "linear"
	CredentialProviderNotion  CredentialProvider = "notion"
	CredentialProviderCustom  CredentialProvider = "custom"
	CredentialProviderWebhook CredentialProvider = "webhook"
)

func (CredentialProvider) IsKnown

func (r CredentialProvider) IsKnown() bool

type CredentialType

type CredentialType string
const (
	CredentialTypeOAuth  CredentialType = "oauth"
	CredentialTypeAPIKey CredentialType = "api_key"
)

func (CredentialType) IsKnown

func (r CredentialType) IsKnown() bool

type DiscoveredTool

type DiscoveredTool struct {
	Approval    DiscoveredToolApproval `json:"approval" api:"required"`
	Category    DiscoveredToolCategory `json:"category" api:"required"`
	Description string                 `json:"description" api:"required"`
	// JSON Schema object describing tool input parameters.
	InputSchema        map[string]interface{} `json:"inputSchema" api:"required"`
	Name               string                 `json:"name" api:"required"`
	Origin             DiscoveredToolOrigin   `json:"origin" api:"required"`
	Source             string                 `json:"source" api:"required"`
	AccountLabel       string                 `json:"accountLabel"`
	ConnectionID       string                 `json:"connectionId"`
	ConnectionMetadata ToolConnectionMetadata `json:"connectionMetadata"`
	SourceID           string                 `json:"sourceId"`
	SourceVersion      float64                `json:"sourceVersion"`
	JSON               discoveredToolJSON     `json:"-"`
}

An external provider or tool-source tool currently available to the agent.

func (*DiscoveredTool) UnmarshalJSON

func (r *DiscoveredTool) UnmarshalJSON(data []byte) (err error)

type DiscoveredToolApproval

type DiscoveredToolApproval string
const (
	DiscoveredToolApprovalAlways DiscoveredToolApproval = "always"
	DiscoveredToolApprovalNever  DiscoveredToolApproval = "never"
)

func (DiscoveredToolApproval) IsKnown

func (r DiscoveredToolApproval) IsKnown() bool

type DiscoveredToolCategory

type DiscoveredToolCategory string
const (
	DiscoveredToolCategoryExternal DiscoveredToolCategory = "external"
)

func (DiscoveredToolCategory) IsKnown

func (r DiscoveredToolCategory) IsKnown() bool

type DiscoveredToolOrigin

type DiscoveredToolOrigin string
const (
	DiscoveredToolOriginBuiltin    DiscoveredToolOrigin = "builtin"
	DiscoveredToolOriginToolSource DiscoveredToolOrigin = "tool_source"
)

func (DiscoveredToolOrigin) IsKnown

func (r DiscoveredToolOrigin) IsKnown() bool

type EffectiveConfiguration

type EffectiveConfiguration struct {
	Approvals                EffectiveConfigurationApprovals `json:"approvals" api:"required"`
	ApprovalsWritableByAgent bool                            `json:"approvalsWritableByAgent" api:"required"`
	DefaultModel             string                          `json:"defaultModel" api:"required"`
	LockedByFleet            []ConfigurationFieldName        `json:"lockedByFleet" api:"required"`
	ResolvedFromFleet        []ConfigurationFieldName        `json:"resolvedFromFleet" api:"required"`
	// Effective internal runtime tools after applying fleet defaults, fleet locks, and
	// the agent allowlist.
	Tools        []shared.ToolName          `json:"tools" api:"required"`
	Instructions string                     `json:"instructions"`
	JSON         effectiveConfigurationJSON `json:"-"`
}

func (*EffectiveConfiguration) UnmarshalJSON

func (r *EffectiveConfiguration) UnmarshalJSON(data []byte) (err error)

type EffectiveConfigurationApprovals

type EffectiveConfigurationApprovals struct {
	TimeoutMs float64                             `json:"timeoutMs" api:"required"`
	Tools     map[string]shared.ApprovalMode      `json:"tools" api:"required"`
	JSON      effectiveConfigurationApprovalsJSON `json:"-"`
}

func (*EffectiveConfigurationApprovals) UnmarshalJSON

func (r *EffectiveConfigurationApprovals) UnmarshalJSON(data []byte) (err error)

type Entry

type Entry struct {
	Content   string    `json:"content" api:"required"`
	Key       string    `json:"key" api:"required"`
	UpdatedAt string    `json:"updatedAt" api:"required"`
	Version   float64   `json:"version" api:"required"`
	MimeType  string    `json:"mimeType"`
	JSON      entryJSON `json:"-"`
}

func (*Entry) UnmarshalJSON

func (r *Entry) UnmarshalJSON(data []byte) (err error)

type EntrySummary

type EntrySummary struct {
	ByteLength float64          `json:"byteLength" api:"required"`
	Key        string           `json:"key" api:"required"`
	UpdatedAt  string           `json:"updatedAt" api:"required"`
	Version    float64          `json:"version" api:"required"`
	MimeType   string           `json:"mimeType"`
	JSON       entrySummaryJSON `json:"-"`
}

func (*EntrySummary) UnmarshalJSON

func (r *EntrySummary) UnmarshalJSON(data []byte) (err error)

type Error

type Error = apierror.Error

type EventListForAgentParams

type EventListForAgentParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventListForAgentParamsHistory] `query:"history"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (EventListForAgentParams) URLQuery

func (r EventListForAgentParams) URLQuery() (v url.Values)

URLQuery serializes EventListForAgentParams's query parameters as `url.Values`.

type EventListForAgentParamsHistory

type EventListForAgentParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventListForAgentParamsHistoryTrue  EventListForAgentParamsHistory = "true"
	EventListForAgentParamsHistoryFalse EventListForAgentParamsHistory = "false"
)

func (EventListForAgentParamsHistory) IsKnown

type EventListForFleetParams

type EventListForFleetParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventListForFleetParamsHistory] `query:"history"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (EventListForFleetParams) URLQuery

func (r EventListForFleetParams) URLQuery() (v url.Values)

URLQuery serializes EventListForFleetParams's query parameters as `url.Values`.

type EventListForFleetParamsHistory

type EventListForFleetParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventListForFleetParamsHistoryTrue  EventListForFleetParamsHistory = "true"
	EventListForFleetParamsHistoryFalse EventListForFleetParamsHistory = "false"
)

func (EventListForFleetParamsHistory) IsKnown

type EventListForThreadParams

type EventListForThreadParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventListForThreadParamsHistory] `query:"history"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (EventListForThreadParams) URLQuery

func (r EventListForThreadParams) URLQuery() (v url.Values)

URLQuery serializes EventListForThreadParams's query parameters as `url.Values`.

type EventListForThreadParamsHistory

type EventListForThreadParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventListForThreadParamsHistoryTrue  EventListForThreadParamsHistory = "true"
	EventListForThreadParamsHistoryFalse EventListForThreadParamsHistory = "false"
)

func (EventListForThreadParamsHistory) IsKnown

type EventService

type EventService struct {
	Options []option.RequestOption
}

EventService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.

func NewEventService

func NewEventService(opts ...option.RequestOption) (r *EventService)

NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EventService) ListForAgent

List events

func (*EventService) ListForAgentAutoPaging

List events

func (*EventService) ListForFleet

List events

func (*EventService) ListForFleetAutoPaging

List events

func (*EventService) ListForThread

func (r *EventService) ListForThread(ctx context.Context, agentID string, threadID string, query EventListForThreadParams, opts ...option.RequestOption) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)

List events

func (*EventService) ListForThreadAutoPaging

List events

func (*EventService) StreamForAgentStreaming

func (r *EventService) StreamForAgentStreaming(ctx context.Context, agentID string, params EventStreamForAgentParams, opts ...option.RequestOption) (stream *ssestream.Stream[SubscriptionEvent])

Server-Sent Events stream. Each SSE data frame is JSON matching this response schema.

func (*EventService) StreamForFleetStreaming

func (r *EventService) StreamForFleetStreaming(ctx context.Context, fleetID string, params EventStreamForFleetParams, opts ...option.RequestOption) (stream *ssestream.Stream[SubscriptionEvent])

Server-Sent Events stream. Each SSE data frame is JSON matching this response schema.

func (*EventService) StreamForThreadEventsStreaming

func (r *EventService) StreamForThreadEventsStreaming(ctx context.Context, agentID string, threadID string, params EventStreamForThreadEventsParams, opts ...option.RequestOption) (stream *ssestream.Stream[SubscriptionEvent])

Server-Sent Events stream. Each SSE data frame is JSON matching this response schema.

func (*EventService) StreamForThreadStreaming

func (r *EventService) StreamForThreadStreaming(ctx context.Context, agentID string, threadID string, opts ...option.RequestOption) (stream *ssestream.Stream[ThreadStreamEvent])

Server-Sent Events stream. Each SSE data frame is JSON matching this response schema.

type EventStreamForAgentParams

type EventStreamForAgentParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventStreamForAgentParamsHistory] `query:"history"`
	// Resume an event-log stream after the last received SSE event id.
	LastEventID param.Field[string] `header:"Last-Event-ID"`
}

func (EventStreamForAgentParams) URLQuery

func (r EventStreamForAgentParams) URLQuery() (v url.Values)

URLQuery serializes EventStreamForAgentParams's query parameters as `url.Values`.

type EventStreamForAgentParamsHistory

type EventStreamForAgentParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventStreamForAgentParamsHistoryTrue  EventStreamForAgentParamsHistory = "true"
	EventStreamForAgentParamsHistoryFalse EventStreamForAgentParamsHistory = "false"
)

func (EventStreamForAgentParamsHistory) IsKnown

type EventStreamForFleetParams

type EventStreamForFleetParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventStreamForFleetParamsHistory] `query:"history"`
	// Resume an event-log stream after the last received SSE event id.
	LastEventID param.Field[string] `header:"Last-Event-ID"`
}

func (EventStreamForFleetParams) URLQuery

func (r EventStreamForFleetParams) URLQuery() (v url.Values)

URLQuery serializes EventStreamForFleetParams's query parameters as `url.Values`.

type EventStreamForFleetParamsHistory

type EventStreamForFleetParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventStreamForFleetParamsHistoryTrue  EventStreamForFleetParamsHistory = "true"
	EventStreamForFleetParamsHistoryFalse EventStreamForFleetParamsHistory = "false"
)

func (EventStreamForFleetParamsHistory) IsKnown

type EventStreamForThreadEventsParams

type EventStreamForThreadEventsParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Comma-separated event type filter.
	Events param.Field[string] `query:"events"`
	// When true, starts from the beginning of the retained buffer.
	History param.Field[EventStreamForThreadEventsParamsHistory] `query:"history"`
	// Resume an event-log stream after the last received SSE event id.
	LastEventID param.Field[string] `header:"Last-Event-ID"`
}

func (EventStreamForThreadEventsParams) URLQuery

func (r EventStreamForThreadEventsParams) URLQuery() (v url.Values)

URLQuery serializes EventStreamForThreadEventsParams's query parameters as `url.Values`.

type EventStreamForThreadEventsParamsHistory

type EventStreamForThreadEventsParamsHistory string

When true, starts from the beginning of the retained buffer.

const (
	EventStreamForThreadEventsParamsHistoryTrue  EventStreamForThreadEventsParamsHistory = "true"
	EventStreamForThreadEventsParamsHistoryFalse EventStreamForThreadEventsParamsHistory = "false"
)

func (EventStreamForThreadEventsParamsHistory) IsKnown

type ExecResult

type ExecResult struct {
	ExitCode     float64         `json:"exitCode" api:"required,nullable"`
	Handle       string          `json:"handle" api:"required"`
	State        ExecResultState `json:"state" api:"required"`
	Stderr       string          `json:"stderr" api:"required"`
	StderrOffset float64         `json:"stderrOffset" api:"required"`
	Stdout       string          `json:"stdout" api:"required"`
	StdoutOffset float64         `json:"stdoutOffset" api:"required"`
	JSON         execResultJSON  `json:"-"`
}

func (*ExecResult) UnmarshalJSON

func (r *ExecResult) UnmarshalJSON(data []byte) (err error)

type ExecResultState

type ExecResultState string
const (
	ExecResultStateRunning ExecResultState = "running"
	ExecResultStateExited  ExecResultState = "exited"
)

func (ExecResultState) IsKnown

func (r ExecResultState) IsKnown() bool

type ExecutionPrincipal

type ExecutionPrincipal struct {
	Kind    ExecutionPrincipalKind `json:"kind" api:"required"`
	FleetID string                 `json:"fleetId" api:"nullable"`
	KeyID   string                 `json:"keyId"`
	UserID  string                 `json:"userId"`
	JSON    executionPrincipalJSON `json:"-"`
	// contains filtered or unexported fields
}

func (ExecutionPrincipal) AsUnion

AsUnion returns a ExecutionPrincipalUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ExecutionPrincipalUserExecutionPrincipal, ExecutionPrincipalAPIKeyExecutionPrincipal.

func (*ExecutionPrincipal) UnmarshalJSON

func (r *ExecutionPrincipal) UnmarshalJSON(data []byte) (err error)

type ExecutionPrincipalAPIKeyExecutionPrincipal

type ExecutionPrincipalAPIKeyExecutionPrincipal struct {
	FleetID string                                         `json:"fleetId" api:"required,nullable"`
	KeyID   string                                         `json:"keyId" api:"required"`
	Kind    ExecutionPrincipalAPIKeyExecutionPrincipalKind `json:"kind" api:"required"`
	JSON    executionPrincipalAPIKeyExecutionPrincipalJSON `json:"-"`
}

func (*ExecutionPrincipalAPIKeyExecutionPrincipal) UnmarshalJSON

func (r *ExecutionPrincipalAPIKeyExecutionPrincipal) UnmarshalJSON(data []byte) (err error)

type ExecutionPrincipalAPIKeyExecutionPrincipalKind

type ExecutionPrincipalAPIKeyExecutionPrincipalKind string
const (
	ExecutionPrincipalAPIKeyExecutionPrincipalKindAPIKey ExecutionPrincipalAPIKeyExecutionPrincipalKind = "apiKey"
)

func (ExecutionPrincipalAPIKeyExecutionPrincipalKind) IsKnown

type ExecutionPrincipalKind

type ExecutionPrincipalKind string
const (
	ExecutionPrincipalKindUser   ExecutionPrincipalKind = "user"
	ExecutionPrincipalKindAPIKey ExecutionPrincipalKind = "apiKey"
)

func (ExecutionPrincipalKind) IsKnown

func (r ExecutionPrincipalKind) IsKnown() bool

type ExecutionPrincipalUnion

type ExecutionPrincipalUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by ExecutionPrincipalUserExecutionPrincipal or ExecutionPrincipalAPIKeyExecutionPrincipal.

type ExecutionPrincipalUserExecutionPrincipal

type ExecutionPrincipalUserExecutionPrincipal struct {
	Kind   ExecutionPrincipalUserExecutionPrincipalKind `json:"kind" api:"required"`
	UserID string                                       `json:"userId" api:"required"`
	JSON   executionPrincipalUserExecutionPrincipalJSON `json:"-"`
}

func (*ExecutionPrincipalUserExecutionPrincipal) UnmarshalJSON

func (r *ExecutionPrincipalUserExecutionPrincipal) UnmarshalJSON(data []byte) (err error)

type ExecutionPrincipalUserExecutionPrincipalKind

type ExecutionPrincipalUserExecutionPrincipalKind string
const (
	ExecutionPrincipalUserExecutionPrincipalKindUser ExecutionPrincipalUserExecutionPrincipalKind = "user"
)

func (ExecutionPrincipalUserExecutionPrincipalKind) IsKnown

type Fleet

type Fleet struct {
	ID        string    `json:"id" api:"required"`
	CreatedAt string    `json:"createdAt" api:"required"`
	Name      string    `json:"name" api:"required"`
	OrgID     string    `json:"orgId" api:"required"`
	UpdatedAt string    `json:"updatedAt" api:"required"`
	JSON      fleetJSON `json:"-"`
}

func (*Fleet) UnmarshalJSON

func (r *Fleet) UnmarshalJSON(data []byte) (err error)

type FleetService

type FleetService struct {
	Options []option.RequestOption
}

FleetService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFleetService method instead.

func NewFleetService

func NewFleetService(opts ...option.RequestOption) (r *FleetService)

NewFleetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type HTTPEndpoint

type HTTPEndpoint struct {
	Method  HTTPEndpointMethod `json:"method" api:"required"`
	URL     string             `json:"url" api:"required"`
	Body    HTTPEndpointBody   `json:"body"`
	Headers map[string]string  `json:"headers"`
	Path    map[string]string  `json:"path"`
	Query   map[string]string  `json:"query"`
	JSON    httpEndpointJSON   `json:"-"`
}

HTTP endpoint invoked when the tool is called.

func (*HTTPEndpoint) UnmarshalJSON

func (r *HTTPEndpoint) UnmarshalJSON(data []byte) (err error)

type HTTPEndpointBody

type HTTPEndpointBody string
const (
	HTTPEndpointBodyJsonParams HTTPEndpointBody = "json_params"
)

func (HTTPEndpointBody) IsKnown

func (r HTTPEndpointBody) IsKnown() bool

type HTTPEndpointMethod

type HTTPEndpointMethod string
const (
	HTTPEndpointMethodGet    HTTPEndpointMethod = "GET"
	HTTPEndpointMethodPost   HTTPEndpointMethod = "POST"
	HTTPEndpointMethodPut    HTTPEndpointMethod = "PUT"
	HTTPEndpointMethodPatch  HTTPEndpointMethod = "PATCH"
	HTTPEndpointMethodDelete HTTPEndpointMethod = "DELETE"
)

func (HTTPEndpointMethod) IsKnown

func (r HTTPEndpointMethod) IsKnown() bool

type HTTPEndpointParam

type HTTPEndpointParam struct {
	Method  param.Field[HTTPEndpointMethod] `json:"method" api:"required"`
	URL     param.Field[string]             `json:"url" api:"required"`
	Body    param.Field[HTTPEndpointBody]   `json:"body"`
	Headers param.Field[map[string]string]  `json:"headers"`
	Path    param.Field[map[string]string]  `json:"path"`
	Query   param.Field[map[string]string]  `json:"query"`
}

HTTP endpoint invoked when the tool is called.

func (HTTPEndpointParam) MarshalJSON

func (r HTTPEndpointParam) MarshalJSON() (data []byte, err error)

type HTTPToolDefinition

type HTTPToolDefinition struct {
	Description string `json:"description" api:"required"`
	// HTTP endpoint invoked when the tool is called.
	Endpoint HTTPEndpoint `json:"endpoint" api:"required"`
	// JSON Schema object describing tool input parameters.
	InputSchema map[string]interface{} `json:"inputSchema" api:"required"`
	Name        string                 `json:"name" api:"required"`
	Approval    ToolApprovalMode       `json:"approval"`
	// HTTP tool execution retry and timeout policy.
	Execution HTTPToolExecutionPolicy `json:"execution"`
	// How the HTTP response should be normalized for the agent.
	Response ResponseNormalizationHint `json:"response"`
	JSON     httpToolDefinitionJSON    `json:"-"`
}

Definition for a single HTTP tool exposed by a tool source.

func (*HTTPToolDefinition) UnmarshalJSON

func (r *HTTPToolDefinition) UnmarshalJSON(data []byte) (err error)

type HTTPToolDefinitionParam

type HTTPToolDefinitionParam struct {
	Description param.Field[string] `json:"description" api:"required"`
	// HTTP endpoint invoked when the tool is called.
	Endpoint param.Field[HTTPEndpointParam] `json:"endpoint" api:"required"`
	// JSON Schema object describing tool input parameters.
	InputSchema param.Field[map[string]interface{}] `json:"inputSchema" api:"required"`
	Name        param.Field[string]                 `json:"name" api:"required"`
	Approval    param.Field[ToolApprovalMode]       `json:"approval"`
	// HTTP tool execution retry and timeout policy.
	Execution param.Field[HTTPToolExecutionPolicyParam] `json:"execution"`
	// How the HTTP response should be normalized for the agent.
	Response param.Field[ResponseNormalizationHintParam] `json:"response"`
}

Definition for a single HTTP tool exposed by a tool source.

func (HTTPToolDefinitionParam) MarshalJSON

func (r HTTPToolDefinitionParam) MarshalJSON() (data []byte, err error)

type HTTPToolExecutionPolicy

type HTTPToolExecutionPolicy struct {
	IdempotencyKeyHeader string                           `json:"idempotencyKeyHeader"`
	MaxAttempts          float64                          `json:"maxAttempts"`
	RetryMode            HTTPToolExecutionPolicyRetryMode `json:"retryMode"`
	TimeoutMs            float64                          `json:"timeoutMs"`
	JSON                 httpToolExecutionPolicyJSON      `json:"-"`
}

HTTP tool execution retry and timeout policy.

func (*HTTPToolExecutionPolicy) UnmarshalJSON

func (r *HTTPToolExecutionPolicy) UnmarshalJSON(data []byte) (err error)

type HTTPToolExecutionPolicyParam

type HTTPToolExecutionPolicyParam struct {
	IdempotencyKeyHeader param.Field[string]                           `json:"idempotencyKeyHeader"`
	MaxAttempts          param.Field[float64]                          `json:"maxAttempts"`
	RetryMode            param.Field[HTTPToolExecutionPolicyRetryMode] `json:"retryMode"`
	TimeoutMs            param.Field[float64]                          `json:"timeoutMs"`
}

HTTP tool execution retry and timeout policy.

func (HTTPToolExecutionPolicyParam) MarshalJSON

func (r HTTPToolExecutionPolicyParam) MarshalJSON() (data []byte, err error)

type HTTPToolExecutionPolicyRetryMode

type HTTPToolExecutionPolicyRetryMode string
const (
	HTTPToolExecutionPolicyRetryModeDisabled HTTPToolExecutionPolicyRetryMode = "disabled"
	HTTPToolExecutionPolicyRetryModeSafeOnly HTTPToolExecutionPolicyRetryMode = "safe_only"
	HTTPToolExecutionPolicyRetryModeEnabled  HTTPToolExecutionPolicyRetryMode = "enabled"
)

func (HTTPToolExecutionPolicyRetryMode) IsKnown

type HTTPToolSource

type HTTPToolSource struct {
	ID string `json:"id" api:"required"`
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      ToolSourceAuth       `json:"auth" api:"required"`
	CreatedAt string               `json:"createdAt" api:"required"`
	Enabled   bool                 `json:"enabled" api:"required"`
	FleetID   string               `json:"fleetId" api:"required"`
	Namespace string               `json:"namespace" api:"required"`
	Tools     []HTTPToolDefinition `json:"tools" api:"required"`
	Type      HTTPToolSourceType   `json:"type" api:"required"`
	UpdatedAt string               `json:"updatedAt" api:"required"`
	Version   float64              `json:"version" api:"required"`
	Approval  ToolApprovalMode     `json:"approval"`
	// HTTP tool execution retry and timeout policy.
	Execution HTTPToolExecutionPolicy `json:"execution"`
	JSON      httpToolSourceJSON      `json:"-"`
}

func (*HTTPToolSource) UnmarshalJSON

func (r *HTTPToolSource) UnmarshalJSON(data []byte) (err error)

type HTTPToolSourceType

type HTTPToolSourceType string
const (
	HTTPToolSourceTypeHTTP HTTPToolSourceType = "http"
)

func (HTTPToolSourceType) IsKnown

func (r HTTPToolSourceType) IsKnown() bool

type McpToolExecutionPolicy

type McpToolExecutionPolicy struct {
	DiscoveryTimeoutMs float64                         `json:"discoveryTimeoutMs"`
	ExecutionTimeoutMs float64                         `json:"executionTimeoutMs"`
	MaxAttempts        float64                         `json:"maxAttempts"`
	RetryMode          McpToolExecutionPolicyRetryMode `json:"retryMode"`
	JSON               mcpToolExecutionPolicyJSON      `json:"-"`
}

MCP discovery and execution retry/timeout policy.

func (*McpToolExecutionPolicy) UnmarshalJSON

func (r *McpToolExecutionPolicy) UnmarshalJSON(data []byte) (err error)

type McpToolExecutionPolicyParam

type McpToolExecutionPolicyParam struct {
	DiscoveryTimeoutMs param.Field[float64]                         `json:"discoveryTimeoutMs"`
	ExecutionTimeoutMs param.Field[float64]                         `json:"executionTimeoutMs"`
	MaxAttempts        param.Field[float64]                         `json:"maxAttempts"`
	RetryMode          param.Field[McpToolExecutionPolicyRetryMode] `json:"retryMode"`
}

MCP discovery and execution retry/timeout policy.

func (McpToolExecutionPolicyParam) MarshalJSON

func (r McpToolExecutionPolicyParam) MarshalJSON() (data []byte, err error)

type McpToolExecutionPolicyRetryMode

type McpToolExecutionPolicyRetryMode string
const (
	McpToolExecutionPolicyRetryModeDisabled    McpToolExecutionPolicyRetryMode = "disabled"
	McpToolExecutionPolicyRetryModeConnectOnly McpToolExecutionPolicyRetryMode = "connect_only"
	McpToolExecutionPolicyRetryModeEnabled     McpToolExecutionPolicyRetryMode = "enabled"
)

func (McpToolExecutionPolicyRetryMode) IsKnown

type McpToolSource

type McpToolSource struct {
	ID string `json:"id" api:"required"`
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      ToolSourceAuth    `json:"auth" api:"required"`
	CreatedAt string            `json:"createdAt" api:"required"`
	Enabled   bool              `json:"enabled" api:"required"`
	FleetID   string            `json:"fleetId" api:"required"`
	Namespace string            `json:"namespace" api:"required"`
	Type      McpToolSourceType `json:"type" api:"required"`
	UpdatedAt string            `json:"updatedAt" api:"required"`
	URL       string            `json:"url" api:"required"`
	Version   float64           `json:"version" api:"required"`
	Approval  ToolApprovalMode  `json:"approval"`
	// MCP discovery and execution retry/timeout policy.
	Execution McpToolExecutionPolicy `json:"execution"`
	JSON      mcpToolSourceJSON      `json:"-"`
}

func (*McpToolSource) UnmarshalJSON

func (r *McpToolSource) UnmarshalJSON(data []byte) (err error)

type McpToolSourceType

type McpToolSourceType string
const (
	McpToolSourceTypeMcp McpToolSourceType = "mcp"
)

func (McpToolSourceType) IsKnown

func (r McpToolSourceType) IsKnown() bool

type Message

type Message struct {
	Content   []ContentBlock `json:"content" api:"required"`
	CreatedAt string         `json:"createdAt" api:"required"`
	Role      MessageRole    `json:"role" api:"required"`
	Seq       float64        `json:"seq" api:"required"`
	JSON      messageJSON    `json:"-"`
}

func (*Message) UnmarshalJSON

func (r *Message) UnmarshalJSON(data []byte) (err error)

type MessagePage added in v0.2.0

type MessagePage struct {
	Cursor   string          `json:"cursor" api:"required,nullable"`
	HasMore  bool            `json:"hasMore" api:"required"`
	Messages []Message       `json:"messages" api:"required"`
	JSON     messagePageJSON `json:"-"`
}

func (*MessagePage) UnmarshalJSON added in v0.2.0

func (r *MessagePage) UnmarshalJSON(data []byte) (err error)

type MessageRole

type MessageRole string
const (
	MessageRoleUser      MessageRole = "user"
	MessageRoleAssistant MessageRole = "assistant"
)

func (MessageRole) IsKnown

func (r MessageRole) IsKnown() bool

type Metadata

type Metadata map[string]string

type MetadataParam

type MetadataParam map[string]string

type ModelDescriptor

type ModelDescriptor struct {
	ID                     string                  `json:"id" api:"required"`
	Capabilities           []string                `json:"capabilities" api:"required"`
	ContextWindowTokens    float64                 `json:"contextWindowTokens" api:"required"`
	DefaultMaxOutputTokens float64                 `json:"defaultMaxOutputTokens" api:"required"`
	Name                   string                  `json:"name" api:"required"`
	Provider               ModelDescriptorProvider `json:"provider" api:"required"`
	RequestHeadroomTokens  float64                 `json:"requestHeadroomTokens" api:"required"`
	JSON                   modelDescriptorJSON     `json:"-"`
}

func (*ModelDescriptor) UnmarshalJSON

func (r *ModelDescriptor) UnmarshalJSON(data []byte) (err error)

type ModelDescriptorProvider

type ModelDescriptorProvider string
const (
	ModelDescriptorProviderAnthropic ModelDescriptorProvider = "anthropic"
	ModelDescriptorProviderOpenAI    ModelDescriptorProvider = "openai"
	ModelDescriptorProviderGoogle    ModelDescriptorProvider = "google"
	ModelDescriptorProviderFireworks ModelDescriptorProvider = "fireworks"
)

func (ModelDescriptorProvider) IsKnown

func (r ModelDescriptorProvider) IsKnown() bool

type ModelListResponse

type ModelListResponse struct {
	Models []ModelDescriptor     `json:"models" api:"required"`
	JSON   modelListResponseJSON `json:"-"`
}

func (*ModelListResponse) UnmarshalJSON

func (r *ModelListResponse) UnmarshalJSON(data []byte) (err error)

type ModelService

type ModelService struct {
	Options []option.RequestOption
}

ModelService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelService method instead.

func NewModelService

func NewModelService(opts ...option.RequestOption) (r *ModelService)

NewModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ModelService) List

func (r *ModelService) List(ctx context.Context, opts ...option.RequestOption) (res *ModelListResponse, err error)

List models

type NoToolSourceAuth

type NoToolSourceAuth struct {
	Kind NoToolSourceAuthKind `json:"kind" api:"required"`
	JSON noToolSourceAuthJSON `json:"-"`
}

func (*NoToolSourceAuth) UnmarshalJSON

func (r *NoToolSourceAuth) UnmarshalJSON(data []byte) (err error)

type NoToolSourceAuthKind

type NoToolSourceAuthKind string
const (
	NoToolSourceAuthKindNone NoToolSourceAuthKind = "none"
)

func (NoToolSourceAuthKind) IsKnown

func (r NoToolSourceAuthKind) IsKnown() bool

type NoToolSourceAuthParam

type NoToolSourceAuthParam struct {
	Kind param.Field[NoToolSourceAuthKind] `json:"kind" api:"required"`
}

func (NoToolSourceAuthParam) MarshalJSON

func (r NoToolSourceAuthParam) MarshalJSON() (data []byte, err error)

type OAuthConnectParams

type OAuthConnectParams struct {
	// Public owner for a reusable connection. Organization owners use the
	// authenticated organization; fleet owners add a fleetId.
	Owner param.Field[ConnectionOwnerUnionParam] `json:"owner" api:"required"`
	// HTTP(S) origin that receives the OAuth completion message.
	ReturnOrigin param.Field[string] `json:"returnOrigin" api:"required"`
	// Provider-specific OAuth scopes. Empty entries are ignored after trimming.
	Scopes param.Field[[]string] `json:"scopes"`
}

func (OAuthConnectParams) MarshalJSON

func (r OAuthConnectParams) MarshalJSON() (data []byte, err error)

type OAuthConnectResponse

type OAuthConnectResponse struct {
	// Provider authorization URL that the client should open.
	AuthorizationURL string `json:"authorizationUrl" api:"required"`
	// Origin hosting the OAuth callback endpoint.
	CallbackOrigin string `json:"callbackOrigin" api:"required"`
	// OAuth state expiration timestamp, when returned.
	ExpiresAt string `json:"expiresAt"`
	// OAuth state nonce, when returned.
	StateNonce string                   `json:"stateNonce"`
	JSON       oauthConnectResponseJSON `json:"-"`
}

func (*OAuthConnectResponse) UnmarshalJSON

func (r *OAuthConnectResponse) UnmarshalJSON(data []byte) (err error)

type OAuthConnectionToolSourceAuth

type OAuthConnectionToolSourceAuth struct {
	Kind     OAuthConnectionToolSourceAuthKind `json:"kind" api:"required"`
	Provider string                            `json:"provider" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject         AuthInjection                     `json:"inject"`
	RequiredScopes []string                          `json:"requiredScopes"`
	JSON           oauthConnectionToolSourceAuthJSON `json:"-"`
}

func (*OAuthConnectionToolSourceAuth) UnmarshalJSON

func (r *OAuthConnectionToolSourceAuth) UnmarshalJSON(data []byte) (err error)

type OAuthConnectionToolSourceAuthKind

type OAuthConnectionToolSourceAuthKind string
const (
	OAuthConnectionToolSourceAuthKindOAuthConnection OAuthConnectionToolSourceAuthKind = "oauth_connection"
)

func (OAuthConnectionToolSourceAuthKind) IsKnown

type OAuthConnectionToolSourceAuthParam

type OAuthConnectionToolSourceAuthParam struct {
	Kind     param.Field[OAuthConnectionToolSourceAuthKind] `json:"kind" api:"required"`
	Provider param.Field[string]                            `json:"provider" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject         param.Field[AuthInjectionUnionParam] `json:"inject"`
	RequiredScopes param.Field[[]string]                `json:"requiredScopes"`
}

func (OAuthConnectionToolSourceAuthParam) MarshalJSON

func (r OAuthConnectionToolSourceAuthParam) MarshalJSON() (data []byte, err error)

type OAuthExchangeConfig

type OAuthExchangeConfig struct {
	GrantType                OAuthExchangeConfigGrantType `json:"grantType" api:"required"`
	TokenURL                 string                       `json:"tokenUrl" api:"required"`
	AssertionConnectionID    string                       `json:"assertionConnectionId"`
	Audience                 string                       `json:"audience"`
	ClientID                 string                       `json:"clientId"`
	ClientSecretConnectionID string                       `json:"clientSecretConnectionId"`
	// This field can have the runtime type of [map[string]string].
	ExtraParams interface{} `json:"extraParams"`
	Issuer      string      `json:"issuer"`
	// This field can have the runtime type of [[]string].
	Scopes  interface{}             `json:"scopes"`
	Subject string                  `json:"subject"`
	JSON    oauthExchangeConfigJSON `json:"-"`
	// contains filtered or unexported fields
}

Source-owned OAuth exchange configuration. Public schemas use connection IDs for stored client secrets and assertions.

func (OAuthExchangeConfig) AsUnion

AsUnion returns a OAuthExchangeConfigUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are OAuthExchangeConfigClientCredentialsOAuthExchange, OAuthExchangeConfigJwtBearerOAuthExchange.

func (*OAuthExchangeConfig) UnmarshalJSON

func (r *OAuthExchangeConfig) UnmarshalJSON(data []byte) (err error)

type OAuthExchangeConfigClientCredentialsOAuthExchange

type OAuthExchangeConfigClientCredentialsOAuthExchange struct {
	ClientID                 string                                                     `json:"clientId" api:"required"`
	ClientSecretConnectionID string                                                     `json:"clientSecretConnectionId" api:"required"`
	GrantType                OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType `json:"grantType" api:"required"`
	TokenURL                 string                                                     `json:"tokenUrl" api:"required"`
	Audience                 string                                                     `json:"audience"`
	ExtraParams              map[string]string                                          `json:"extraParams"`
	Scopes                   []string                                                   `json:"scopes"`
	JSON                     oauthExchangeConfigClientCredentialsOAuthExchangeJSON      `json:"-"`
}

func (*OAuthExchangeConfigClientCredentialsOAuthExchange) UnmarshalJSON

func (r *OAuthExchangeConfigClientCredentialsOAuthExchange) UnmarshalJSON(data []byte) (err error)

type OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType

type OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType string
const (
	OAuthExchangeConfigClientCredentialsOAuthExchangeGrantTypeClientCredentials OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType = "client_credentials"
)

func (OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType) IsKnown

type OAuthExchangeConfigClientCredentialsOAuthExchangeParam

type OAuthExchangeConfigClientCredentialsOAuthExchangeParam struct {
	ClientID                 param.Field[string]                                                     `json:"clientId" api:"required"`
	ClientSecretConnectionID param.Field[string]                                                     `json:"clientSecretConnectionId" api:"required"`
	GrantType                param.Field[OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType] `json:"grantType" api:"required"`
	TokenURL                 param.Field[string]                                                     `json:"tokenUrl" api:"required"`
	Audience                 param.Field[string]                                                     `json:"audience"`
	ExtraParams              param.Field[map[string]string]                                          `json:"extraParams"`
	Scopes                   param.Field[[]string]                                                   `json:"scopes"`
}

func (OAuthExchangeConfigClientCredentialsOAuthExchangeParam) MarshalJSON

type OAuthExchangeConfigGrantType

type OAuthExchangeConfigGrantType string
const (
	OAuthExchangeConfigGrantTypeClientCredentials OAuthExchangeConfigGrantType = "client_credentials"
	OAuthExchangeConfigGrantTypeJwtBearer         OAuthExchangeConfigGrantType = "jwt_bearer"
)

func (OAuthExchangeConfigGrantType) IsKnown

func (r OAuthExchangeConfigGrantType) IsKnown() bool

type OAuthExchangeConfigJwtBearerOAuthExchange

type OAuthExchangeConfigJwtBearerOAuthExchange struct {
	AssertionConnectionID string                                             `json:"assertionConnectionId" api:"required"`
	Audience              string                                             `json:"audience" api:"required"`
	GrantType             OAuthExchangeConfigJwtBearerOAuthExchangeGrantType `json:"grantType" api:"required"`
	Issuer                string                                             `json:"issuer" api:"required"`
	TokenURL              string                                             `json:"tokenUrl" api:"required"`
	ExtraParams           map[string]string                                  `json:"extraParams"`
	Scopes                []string                                           `json:"scopes"`
	Subject               string                                             `json:"subject"`
	JSON                  oauthExchangeConfigJwtBearerOAuthExchangeJSON      `json:"-"`
}

func (*OAuthExchangeConfigJwtBearerOAuthExchange) UnmarshalJSON

func (r *OAuthExchangeConfigJwtBearerOAuthExchange) UnmarshalJSON(data []byte) (err error)

type OAuthExchangeConfigJwtBearerOAuthExchangeGrantType

type OAuthExchangeConfigJwtBearerOAuthExchangeGrantType string
const (
	OAuthExchangeConfigJwtBearerOAuthExchangeGrantTypeJwtBearer OAuthExchangeConfigJwtBearerOAuthExchangeGrantType = "jwt_bearer"
)

func (OAuthExchangeConfigJwtBearerOAuthExchangeGrantType) IsKnown

type OAuthExchangeConfigJwtBearerOAuthExchangeParam

type OAuthExchangeConfigJwtBearerOAuthExchangeParam struct {
	AssertionConnectionID param.Field[string]                                             `json:"assertionConnectionId" api:"required"`
	Audience              param.Field[string]                                             `json:"audience" api:"required"`
	GrantType             param.Field[OAuthExchangeConfigJwtBearerOAuthExchangeGrantType] `json:"grantType" api:"required"`
	Issuer                param.Field[string]                                             `json:"issuer" api:"required"`
	TokenURL              param.Field[string]                                             `json:"tokenUrl" api:"required"`
	ExtraParams           param.Field[map[string]string]                                  `json:"extraParams"`
	Scopes                param.Field[[]string]                                           `json:"scopes"`
	Subject               param.Field[string]                                             `json:"subject"`
}

func (OAuthExchangeConfigJwtBearerOAuthExchangeParam) MarshalJSON

func (r OAuthExchangeConfigJwtBearerOAuthExchangeParam) MarshalJSON() (data []byte, err error)

type OAuthExchangeConfigParam

type OAuthExchangeConfigParam struct {
	GrantType                param.Field[OAuthExchangeConfigGrantType] `json:"grantType" api:"required"`
	TokenURL                 param.Field[string]                       `json:"tokenUrl" api:"required"`
	AssertionConnectionID    param.Field[string]                       `json:"assertionConnectionId"`
	Audience                 param.Field[string]                       `json:"audience"`
	ClientID                 param.Field[string]                       `json:"clientId"`
	ClientSecretConnectionID param.Field[string]                       `json:"clientSecretConnectionId"`
	ExtraParams              param.Field[interface{}]                  `json:"extraParams"`
	Issuer                   param.Field[string]                       `json:"issuer"`
	Scopes                   param.Field[interface{}]                  `json:"scopes"`
	Subject                  param.Field[string]                       `json:"subject"`
}

Source-owned OAuth exchange configuration. Public schemas use connection IDs for stored client secrets and assertions.

func (OAuthExchangeConfigParam) MarshalJSON

func (r OAuthExchangeConfigParam) MarshalJSON() (data []byte, err error)

type OAuthExchangeConfigUnion

type OAuthExchangeConfigUnion interface {
	// contains filtered or unexported methods
}

Source-owned OAuth exchange configuration. Public schemas use connection IDs for stored client secrets and assertions.

Union satisfied by OAuthExchangeConfigClientCredentialsOAuthExchange or OAuthExchangeConfigJwtBearerOAuthExchange.

type OAuthExchangeConfigUnionParam

type OAuthExchangeConfigUnionParam interface {
	// contains filtered or unexported methods
}

Source-owned OAuth exchange configuration. Public schemas use connection IDs for stored client secrets and assertions.

Satisfied by OAuthExchangeConfigClientCredentialsOAuthExchangeParam, OAuthExchangeConfigJwtBearerOAuthExchangeParam, OAuthExchangeConfigParam.

type OAuthExchangeToolSourceAuth

type OAuthExchangeToolSourceAuth struct {
	// Source-owned OAuth exchange configuration. Public schemas use connection IDs for
	// stored client secrets and assertions.
	Exchange OAuthExchangeConfig `json:"exchange" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject AuthInjection                   `json:"inject" api:"required"`
	Kind   OAuthExchangeToolSourceAuthKind `json:"kind" api:"required"`
	JSON   oauthExchangeToolSourceAuthJSON `json:"-"`
}

func (*OAuthExchangeToolSourceAuth) UnmarshalJSON

func (r *OAuthExchangeToolSourceAuth) UnmarshalJSON(data []byte) (err error)

type OAuthExchangeToolSourceAuthKind

type OAuthExchangeToolSourceAuthKind string
const (
	OAuthExchangeToolSourceAuthKindOAuthExchange OAuthExchangeToolSourceAuthKind = "oauth_exchange"
)

func (OAuthExchangeToolSourceAuthKind) IsKnown

type OAuthExchangeToolSourceAuthParam

type OAuthExchangeToolSourceAuthParam struct {
	// Source-owned OAuth exchange configuration. Public schemas use connection IDs for
	// stored client secrets and assertions.
	Exchange param.Field[OAuthExchangeConfigUnionParam] `json:"exchange" api:"required"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject param.Field[AuthInjectionUnionParam]         `json:"inject" api:"required"`
	Kind   param.Field[OAuthExchangeToolSourceAuthKind] `json:"kind" api:"required"`
}

func (OAuthExchangeToolSourceAuthParam) MarshalJSON

func (r OAuthExchangeToolSourceAuthParam) MarshalJSON() (data []byte, err error)

type OAuthService

type OAuthService struct {
	Options []option.RequestOption
}

OAuthService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOAuthService method instead.

func NewOAuthService

func NewOAuthService(opts ...option.RequestOption) (r *OAuthService)

NewOAuthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OAuthService) Connect

func (r *OAuthService) Connect(ctx context.Context, provider string, body OAuthConnectParams, opts ...option.RequestOption) (res *OAuthConnectResponse, err error)

Start OAuth authorization

type ReadResponse

type ReadResponse struct {
	BytesRead float64          `json:"bytesRead" api:"required"`
	Content   string           `json:"content" api:"required"`
	JSON      readResponseJSON `json:"-"`
}

func (*ReadResponse) UnmarshalJSON

func (r *ReadResponse) UnmarshalJSON(data []byte) (err error)

type ResponseNormalizationHint

type ResponseNormalizationHint struct {
	Mode ResponseNormalizationHintMode `json:"mode" api:"required"`
	JSON responseNormalizationHintJSON `json:"-"`
}

How the HTTP response should be normalized for the agent.

func (*ResponseNormalizationHint) UnmarshalJSON

func (r *ResponseNormalizationHint) UnmarshalJSON(data []byte) (err error)

type ResponseNormalizationHintMode

type ResponseNormalizationHintMode string
const (
	ResponseNormalizationHintModeAuto     ResponseNormalizationHintMode = "auto"
	ResponseNormalizationHintModeJson     ResponseNormalizationHintMode = "json"
	ResponseNormalizationHintModeMarkdown ResponseNormalizationHintMode = "markdown"
	ResponseNormalizationHintModeBlob     ResponseNormalizationHintMode = "blob"
)

func (ResponseNormalizationHintMode) IsKnown

func (r ResponseNormalizationHintMode) IsKnown() bool

type ResponseNormalizationHintParam

type ResponseNormalizationHintParam struct {
	Mode param.Field[ResponseNormalizationHintMode] `json:"mode" api:"required"`
}

How the HTTP response should be normalized for the agent.

func (ResponseNormalizationHintParam) MarshalJSON

func (r ResponseNormalizationHintParam) MarshalJSON() (data []byte, err error)

type RuntimeWebhookEvent

type RuntimeWebhookEvent struct {
	ID      string `json:"id" api:"required"`
	AgentID string `json:"agentId" api:"required"`
	// This field can have the runtime type of
	// [RuntimeWebhookEventAgentCreatedWebhookEventData],
	// [RuntimeWebhookEventAgentUpdatedWebhookEventData],
	// [RuntimeWebhookEventAgentDeletedWebhookEventData],
	// [RuntimeWebhookEventThreadCreatedWebhookEventData],
	// [RuntimeWebhookEventThreadStatusChangedWebhookEventData],
	// [RuntimeWebhookEventThreadCompletedWebhookEventData],
	// [RuntimeWebhookEventThreadFailedWebhookEventData],
	// [RuntimeWebhookEventTurnCreatedWebhookEventData],
	// [RuntimeWebhookEventTurnCompletedWebhookEventData],
	// [RuntimeWebhookEventTurnFailedWebhookEventData],
	// [RuntimeWebhookEventMessageCreatedWebhookEventData],
	// [RuntimeWebhookEventApprovalRequestedWebhookEventData],
	// [RuntimeWebhookEventApprovalResolvedWebhookEventData],
	// [RuntimeWebhookEventApprovalGrantedWebhookEventData],
	// [RuntimeWebhookEventScheduleCreatedWebhookEventData],
	// [RuntimeWebhookEventScheduleDeletedWebhookEventData],
	// [RuntimeWebhookEventScheduleTriggeredWebhookEventData],
	// [RuntimeWebhookEventConnectionAttachedWebhookEventData],
	// [RuntimeWebhookEventConnectionDetachedWebhookEventData],
	// [RuntimeWebhookEventWebhookTestWebhookEventData].
	Data      interface{}              `json:"data" api:"required"`
	Event     RuntimeWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                   `json:"fleetId" api:"required"`
	OrgID     string                   `json:"orgId" api:"required"`
	ThreadID  string                   `json:"threadId" api:"required,nullable"`
	Timestamp string                   `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventJSON  `json:"-"`
	// contains filtered or unexported fields
}

func (*RuntimeWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentCreatedWebhookEvent

type RuntimeWebhookEventAgentCreatedWebhookEvent struct {
	ID        string                                           `json:"id" api:"required"`
	AgentID   string                                           `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventAgentCreatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventAgentCreatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                           `json:"fleetId" api:"required"`
	OrgID     string                                           `json:"orgId" api:"required"`
	ThreadID  string                                           `json:"threadId" api:"required,nullable"`
	Timestamp string                                           `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventAgentCreatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventAgentCreatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventAgentCreatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentCreatedWebhookEventData

type RuntimeWebhookEventAgentCreatedWebhookEventData struct {
	Agent RuntimeWebhookEventAgentCreatedWebhookEventDataAgent `json:"agent" api:"required"`
	JSON  runtimeWebhookEventAgentCreatedWebhookEventDataJSON  `json:"-"`
}

func (*RuntimeWebhookEventAgentCreatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventAgentCreatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentCreatedWebhookEventDataAgent

type RuntimeWebhookEventAgentCreatedWebhookEventDataAgent struct {
	ID            string        `json:"id" api:"required"`
	Configuration Configuration `json:"configuration" api:"required"`
	CreatedAt     string        `json:"createdAt" api:"required"`
	FleetID       string        `json:"fleetId" api:"required"`
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata  Metadata                                                 `json:"metadata" api:"required"`
	OrgID     string                                                   `json:"orgId" api:"required"`
	UpdatedAt string                                                   `json:"updatedAt" api:"required"`
	UserID    string                                                   `json:"userId" api:"required"`
	Effective EffectiveConfiguration                                   `json:"effective"`
	JSON      runtimeWebhookEventAgentCreatedWebhookEventDataAgentJSON `json:"-"`
}

func (*RuntimeWebhookEventAgentCreatedWebhookEventDataAgent) UnmarshalJSON

func (r *RuntimeWebhookEventAgentCreatedWebhookEventDataAgent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentCreatedWebhookEventEvent

type RuntimeWebhookEventAgentCreatedWebhookEventEvent string
const (
	RuntimeWebhookEventAgentCreatedWebhookEventEventAgentCreated RuntimeWebhookEventAgentCreatedWebhookEventEvent = "agent.created"
)

func (RuntimeWebhookEventAgentCreatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventAgentDeletedWebhookEvent

type RuntimeWebhookEventAgentDeletedWebhookEvent struct {
	ID        string                                           `json:"id" api:"required"`
	AgentID   string                                           `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventAgentDeletedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventAgentDeletedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                           `json:"fleetId" api:"required"`
	OrgID     string                                           `json:"orgId" api:"required"`
	ThreadID  string                                           `json:"threadId" api:"required,nullable"`
	Timestamp string                                           `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventAgentDeletedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventAgentDeletedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventAgentDeletedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentDeletedWebhookEventData

type RuntimeWebhookEventAgentDeletedWebhookEventData struct {
	AgentID string                                              `json:"agentId" api:"required"`
	JSON    runtimeWebhookEventAgentDeletedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventAgentDeletedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventAgentDeletedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentDeletedWebhookEventEvent

type RuntimeWebhookEventAgentDeletedWebhookEventEvent string
const (
	RuntimeWebhookEventAgentDeletedWebhookEventEventAgentDeleted RuntimeWebhookEventAgentDeletedWebhookEventEvent = "agent.deleted"
)

func (RuntimeWebhookEventAgentDeletedWebhookEventEvent) IsKnown

type RuntimeWebhookEventAgentUpdatedWebhookEvent

type RuntimeWebhookEventAgentUpdatedWebhookEvent struct {
	ID        string                                           `json:"id" api:"required"`
	AgentID   string                                           `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventAgentUpdatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventAgentUpdatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                           `json:"fleetId" api:"required"`
	OrgID     string                                           `json:"orgId" api:"required"`
	ThreadID  string                                           `json:"threadId" api:"required,nullable"`
	Timestamp string                                           `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventAgentUpdatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventAgentUpdatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventAgentUpdatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentUpdatedWebhookEventData

type RuntimeWebhookEventAgentUpdatedWebhookEventData struct {
	Agent   RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent   `json:"agent" api:"required"`
	Trigger RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger `json:"trigger" api:"required"`
	JSON    runtimeWebhookEventAgentUpdatedWebhookEventDataJSON    `json:"-"`
}

func (*RuntimeWebhookEventAgentUpdatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventAgentUpdatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent

type RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent struct {
	ID            string        `json:"id" api:"required"`
	Configuration Configuration `json:"configuration" api:"required"`
	CreatedAt     string        `json:"createdAt" api:"required"`
	FleetID       string        `json:"fleetId" api:"required"`
	// Arbitrary string metadata stored on an agent. Runtime enforces maximum key and
	// value sizes.
	Metadata  Metadata                                                 `json:"metadata" api:"required"`
	OrgID     string                                                   `json:"orgId" api:"required"`
	UpdatedAt string                                                   `json:"updatedAt" api:"required"`
	UserID    string                                                   `json:"userId" api:"required"`
	Effective EffectiveConfiguration                                   `json:"effective"`
	JSON      runtimeWebhookEventAgentUpdatedWebhookEventDataAgentJSON `json:"-"`
}

func (*RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent) UnmarshalJSON

func (r *RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger

type RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger string
const (
	RuntimeWebhookEventAgentUpdatedWebhookEventDataTriggerConfiguration RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger = "configuration"
	RuntimeWebhookEventAgentUpdatedWebhookEventDataTriggerMetadata      RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger = "metadata"
)

func (RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger) IsKnown

type RuntimeWebhookEventAgentUpdatedWebhookEventEvent

type RuntimeWebhookEventAgentUpdatedWebhookEventEvent string
const (
	RuntimeWebhookEventAgentUpdatedWebhookEventEventAgentUpdated RuntimeWebhookEventAgentUpdatedWebhookEventEvent = "agent.updated"
)

func (RuntimeWebhookEventAgentUpdatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventApprovalGrantedWebhookEvent

type RuntimeWebhookEventApprovalGrantedWebhookEvent struct {
	ID        string                                              `json:"id" api:"required"`
	AgentID   string                                              `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventApprovalGrantedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventApprovalGrantedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                              `json:"fleetId" api:"required"`
	OrgID     string                                              `json:"orgId" api:"required"`
	ThreadID  string                                              `json:"threadId" api:"required,nullable"`
	Timestamp string                                              `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventApprovalGrantedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventApprovalGrantedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalGrantedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalGrantedWebhookEventData

type RuntimeWebhookEventApprovalGrantedWebhookEventData struct {
	GrantID  string                                                  `json:"grantId" api:"required"`
	Scope    RuntimeWebhookEventApprovalGrantedWebhookEventDataScope `json:"scope" api:"required"`
	ToolName string                                                  `json:"toolName" api:"required"`
	ThreadID string                                                  `json:"threadId"`
	JSON     runtimeWebhookEventApprovalGrantedWebhookEventDataJSON  `json:"-"`
}

func (*RuntimeWebhookEventApprovalGrantedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalGrantedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalGrantedWebhookEventDataScope

type RuntimeWebhookEventApprovalGrantedWebhookEventDataScope string
const (
	RuntimeWebhookEventApprovalGrantedWebhookEventDataScopeThread RuntimeWebhookEventApprovalGrantedWebhookEventDataScope = "thread"
	RuntimeWebhookEventApprovalGrantedWebhookEventDataScopeAgent  RuntimeWebhookEventApprovalGrantedWebhookEventDataScope = "agent"
)

func (RuntimeWebhookEventApprovalGrantedWebhookEventDataScope) IsKnown

type RuntimeWebhookEventApprovalGrantedWebhookEventEvent

type RuntimeWebhookEventApprovalGrantedWebhookEventEvent string
const (
	RuntimeWebhookEventApprovalGrantedWebhookEventEventApprovalGranted RuntimeWebhookEventApprovalGrantedWebhookEventEvent = "approval.granted"
)

func (RuntimeWebhookEventApprovalGrantedWebhookEventEvent) IsKnown

type RuntimeWebhookEventApprovalRequestedWebhookEvent

type RuntimeWebhookEventApprovalRequestedWebhookEvent struct {
	ID        string                                                `json:"id" api:"required"`
	AgentID   string                                                `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventApprovalRequestedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventApprovalRequestedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                                `json:"fleetId" api:"required"`
	OrgID     string                                                `json:"orgId" api:"required"`
	ThreadID  string                                                `json:"threadId" api:"required,nullable"`
	Timestamp string                                                `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventApprovalRequestedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventApprovalRequestedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalRequestedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalRequestedWebhookEventData

type RuntimeWebhookEventApprovalRequestedWebhookEventData struct {
	Approval RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval `json:"approval" api:"required"`
	JSON     runtimeWebhookEventApprovalRequestedWebhookEventDataJSON     `json:"-"`
}

func (*RuntimeWebhookEventApprovalRequestedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalRequestedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval

type RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval struct {
	ID        string `json:"id" api:"required"`
	CreatedAt string `json:"createdAt" api:"required"`
	// JSON value payload. Generated SDKs may expose this as unknown or Any.
	Input             interface{}                                                        `json:"input" api:"required"`
	ResolvedAt        string                                                             `json:"resolvedAt" api:"required,nullable"`
	RuntimeToolName   shared.ToolName                                                    `json:"runtimeToolName" api:"required"`
	Status            RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus `json:"status" api:"required"`
	ThreadID          string                                                             `json:"threadId" api:"required,nullable"`
	TimeoutAt         string                                                             `json:"timeoutAt" api:"required,nullable"`
	TimeoutMs         float64                                                            `json:"timeoutMs" api:"required,nullable"`
	ToolIndex         float64                                                            `json:"toolIndex" api:"required"`
	ToolName          string                                                             `json:"toolName" api:"required"`
	ToolUseID         string                                                             `json:"toolUseId" api:"required"`
	TurnID            string                                                             `json:"turnId" api:"required"`
	ToolSourceID      string                                                             `json:"toolSourceId"`
	ToolSourceVersion float64                                                            `json:"toolSourceVersion"`
	JSON              runtimeWebhookEventApprovalRequestedWebhookEventDataApprovalJSON   `json:"-"`
}

func (*RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval) UnmarshalJSON

type RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus

type RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus string
const (
	RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatusPending   RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus = "pending"
	RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatusApproved  RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus = "approved"
	RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatusDenied    RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus = "denied"
	RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatusCancelled RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus = "cancelled"
	RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatusTimedOut  RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus = "timed_out"
)

func (RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus) IsKnown

type RuntimeWebhookEventApprovalRequestedWebhookEventEvent

type RuntimeWebhookEventApprovalRequestedWebhookEventEvent string
const (
	RuntimeWebhookEventApprovalRequestedWebhookEventEventApprovalRequested RuntimeWebhookEventApprovalRequestedWebhookEventEvent = "approval.requested"
)

func (RuntimeWebhookEventApprovalRequestedWebhookEventEvent) IsKnown

type RuntimeWebhookEventApprovalResolvedWebhookEvent

type RuntimeWebhookEventApprovalResolvedWebhookEvent struct {
	ID        string                                               `json:"id" api:"required"`
	AgentID   string                                               `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventApprovalResolvedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventApprovalResolvedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                               `json:"fleetId" api:"required"`
	OrgID     string                                               `json:"orgId" api:"required"`
	ThreadID  string                                               `json:"threadId" api:"required,nullable"`
	Timestamp string                                               `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventApprovalResolvedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventApprovalResolvedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalResolvedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalResolvedWebhookEventData

type RuntimeWebhookEventApprovalResolvedWebhookEventData struct {
	ApprovalID string                                                      `json:"approvalId" api:"required"`
	Decision   RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision `json:"decision" api:"required"`
	JSON       runtimeWebhookEventApprovalResolvedWebhookEventDataJSON     `json:"-"`
}

func (*RuntimeWebhookEventApprovalResolvedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventApprovalResolvedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision

type RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision string
const (
	RuntimeWebhookEventApprovalResolvedWebhookEventDataDecisionApproved  RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision = "approved"
	RuntimeWebhookEventApprovalResolvedWebhookEventDataDecisionDenied    RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision = "denied"
	RuntimeWebhookEventApprovalResolvedWebhookEventDataDecisionTimedOut  RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision = "timed_out"
	RuntimeWebhookEventApprovalResolvedWebhookEventDataDecisionCancelled RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision = "cancelled"
)

func (RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision) IsKnown

type RuntimeWebhookEventApprovalResolvedWebhookEventEvent

type RuntimeWebhookEventApprovalResolvedWebhookEventEvent string
const (
	RuntimeWebhookEventApprovalResolvedWebhookEventEventApprovalResolved RuntimeWebhookEventApprovalResolvedWebhookEventEvent = "approval.resolved"
)

func (RuntimeWebhookEventApprovalResolvedWebhookEventEvent) IsKnown

type RuntimeWebhookEventConnectionAttachedWebhookEvent

type RuntimeWebhookEventConnectionAttachedWebhookEvent struct {
	ID        string                                                 `json:"id" api:"required"`
	AgentID   string                                                 `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventConnectionAttachedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventConnectionAttachedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                                 `json:"fleetId" api:"required"`
	OrgID     string                                                 `json:"orgId" api:"required"`
	ThreadID  string                                                 `json:"threadId" api:"required,nullable"`
	Timestamp string                                                 `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventConnectionAttachedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventConnectionAttachedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventConnectionAttachedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventConnectionAttachedWebhookEventData

type RuntimeWebhookEventConnectionAttachedWebhookEventData struct {
	ConnectionID string                                                    `json:"connectionId" api:"required"`
	Provider     string                                                    `json:"provider" api:"required"`
	JSON         runtimeWebhookEventConnectionAttachedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventConnectionAttachedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventConnectionAttachedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventConnectionAttachedWebhookEventEvent

type RuntimeWebhookEventConnectionAttachedWebhookEventEvent string
const (
	RuntimeWebhookEventConnectionAttachedWebhookEventEventConnectionAttached RuntimeWebhookEventConnectionAttachedWebhookEventEvent = "connection.attached"
)

func (RuntimeWebhookEventConnectionAttachedWebhookEventEvent) IsKnown

type RuntimeWebhookEventConnectionDetachedWebhookEvent

type RuntimeWebhookEventConnectionDetachedWebhookEvent struct {
	ID        string                                                 `json:"id" api:"required"`
	AgentID   string                                                 `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventConnectionDetachedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventConnectionDetachedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                                 `json:"fleetId" api:"required"`
	OrgID     string                                                 `json:"orgId" api:"required"`
	ThreadID  string                                                 `json:"threadId" api:"required,nullable"`
	Timestamp string                                                 `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventConnectionDetachedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventConnectionDetachedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventConnectionDetachedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventConnectionDetachedWebhookEventData

type RuntimeWebhookEventConnectionDetachedWebhookEventData struct {
	ConnectionID string                                                    `json:"connectionId" api:"required"`
	Provider     string                                                    `json:"provider" api:"required"`
	JSON         runtimeWebhookEventConnectionDetachedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventConnectionDetachedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventConnectionDetachedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventConnectionDetachedWebhookEventEvent

type RuntimeWebhookEventConnectionDetachedWebhookEventEvent string
const (
	RuntimeWebhookEventConnectionDetachedWebhookEventEventConnectionDetached RuntimeWebhookEventConnectionDetachedWebhookEventEvent = "connection.detached"
)

func (RuntimeWebhookEventConnectionDetachedWebhookEventEvent) IsKnown

type RuntimeWebhookEventEvent

type RuntimeWebhookEventEvent string
const (
	RuntimeWebhookEventEventAgentCreated        RuntimeWebhookEventEvent = "agent.created"
	RuntimeWebhookEventEventAgentUpdated        RuntimeWebhookEventEvent = "agent.updated"
	RuntimeWebhookEventEventAgentDeleted        RuntimeWebhookEventEvent = "agent.deleted"
	RuntimeWebhookEventEventThreadCreated       RuntimeWebhookEventEvent = "thread.created"
	RuntimeWebhookEventEventThreadStatusChanged RuntimeWebhookEventEvent = "thread.status.changed"
	RuntimeWebhookEventEventThreadCompleted     RuntimeWebhookEventEvent = "thread.completed"
	RuntimeWebhookEventEventThreadFailed        RuntimeWebhookEventEvent = "thread.failed"
	RuntimeWebhookEventEventTurnCreated         RuntimeWebhookEventEvent = "turn.created"
	RuntimeWebhookEventEventTurnCompleted       RuntimeWebhookEventEvent = "turn.completed"
	RuntimeWebhookEventEventTurnFailed          RuntimeWebhookEventEvent = "turn.failed"
	RuntimeWebhookEventEventMessageCreated      RuntimeWebhookEventEvent = "message.created"
	RuntimeWebhookEventEventApprovalRequested   RuntimeWebhookEventEvent = "approval.requested"
	RuntimeWebhookEventEventApprovalResolved    RuntimeWebhookEventEvent = "approval.resolved"
	RuntimeWebhookEventEventApprovalGranted     RuntimeWebhookEventEvent = "approval.granted"
	RuntimeWebhookEventEventScheduleCreated     RuntimeWebhookEventEvent = "schedule.created"
	RuntimeWebhookEventEventScheduleDeleted     RuntimeWebhookEventEvent = "schedule.deleted"
	RuntimeWebhookEventEventScheduleTriggered   RuntimeWebhookEventEvent = "schedule.triggered"
	RuntimeWebhookEventEventConnectionAttached  RuntimeWebhookEventEvent = "connection.attached"
	RuntimeWebhookEventEventConnectionDetached  RuntimeWebhookEventEvent = "connection.detached"
	RuntimeWebhookEventEventWebhookTest         RuntimeWebhookEventEvent = "webhook.test"
)

func (RuntimeWebhookEventEvent) IsKnown

func (r RuntimeWebhookEventEvent) IsKnown() bool

type RuntimeWebhookEventMessageCreatedWebhookEvent

type RuntimeWebhookEventMessageCreatedWebhookEvent struct {
	ID        string                                             `json:"id" api:"required"`
	AgentID   string                                             `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventMessageCreatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventMessageCreatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                             `json:"fleetId" api:"required"`
	OrgID     string                                             `json:"orgId" api:"required"`
	ThreadID  string                                             `json:"threadId" api:"required,nullable"`
	Timestamp string                                             `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventMessageCreatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventMessageCreatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventMessageCreatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventMessageCreatedWebhookEventData

type RuntimeWebhookEventMessageCreatedWebhookEventData struct {
	CreatedAt string                                                `json:"createdAt" api:"required"`
	Role      RuntimeWebhookEventMessageCreatedWebhookEventDataRole `json:"role" api:"required"`
	Seq       float64                                               `json:"seq" api:"required"`
	TurnID    string                                                `json:"turnId" api:"required,nullable"`
	JSON      runtimeWebhookEventMessageCreatedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventMessageCreatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventMessageCreatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventMessageCreatedWebhookEventDataRole

type RuntimeWebhookEventMessageCreatedWebhookEventDataRole string
const (
	RuntimeWebhookEventMessageCreatedWebhookEventDataRoleUser      RuntimeWebhookEventMessageCreatedWebhookEventDataRole = "user"
	RuntimeWebhookEventMessageCreatedWebhookEventDataRoleAssistant RuntimeWebhookEventMessageCreatedWebhookEventDataRole = "assistant"
)

func (RuntimeWebhookEventMessageCreatedWebhookEventDataRole) IsKnown

type RuntimeWebhookEventMessageCreatedWebhookEventEvent

type RuntimeWebhookEventMessageCreatedWebhookEventEvent string
const (
	RuntimeWebhookEventMessageCreatedWebhookEventEventMessageCreated RuntimeWebhookEventMessageCreatedWebhookEventEvent = "message.created"
)

func (RuntimeWebhookEventMessageCreatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventScheduleCreatedWebhookEvent

type RuntimeWebhookEventScheduleCreatedWebhookEvent struct {
	ID        string                                              `json:"id" api:"required"`
	AgentID   string                                              `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventScheduleCreatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventScheduleCreatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                              `json:"fleetId" api:"required"`
	OrgID     string                                              `json:"orgId" api:"required"`
	ThreadID  string                                              `json:"threadId" api:"required,nullable"`
	Timestamp string                                              `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventScheduleCreatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventScheduleCreatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleCreatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleCreatedWebhookEventData

type RuntimeWebhookEventScheduleCreatedWebhookEventData struct {
	Name       string                                                 `json:"name" api:"required"`
	ScheduleID string                                                 `json:"scheduleId" api:"required"`
	Cron       string                                                 `json:"cron"`
	RunAt      string                                                 `json:"runAt"`
	JSON       runtimeWebhookEventScheduleCreatedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventScheduleCreatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleCreatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleCreatedWebhookEventEvent

type RuntimeWebhookEventScheduleCreatedWebhookEventEvent string
const (
	RuntimeWebhookEventScheduleCreatedWebhookEventEventScheduleCreated RuntimeWebhookEventScheduleCreatedWebhookEventEvent = "schedule.created"
)

func (RuntimeWebhookEventScheduleCreatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventScheduleDeletedWebhookEvent

type RuntimeWebhookEventScheduleDeletedWebhookEvent struct {
	ID        string                                              `json:"id" api:"required"`
	AgentID   string                                              `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventScheduleDeletedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventScheduleDeletedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                              `json:"fleetId" api:"required"`
	OrgID     string                                              `json:"orgId" api:"required"`
	ThreadID  string                                              `json:"threadId" api:"required,nullable"`
	Timestamp string                                              `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventScheduleDeletedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventScheduleDeletedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleDeletedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleDeletedWebhookEventData

type RuntimeWebhookEventScheduleDeletedWebhookEventData struct {
	ScheduleID string                                                 `json:"scheduleId" api:"required"`
	JSON       runtimeWebhookEventScheduleDeletedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventScheduleDeletedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleDeletedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleDeletedWebhookEventEvent

type RuntimeWebhookEventScheduleDeletedWebhookEventEvent string
const (
	RuntimeWebhookEventScheduleDeletedWebhookEventEventScheduleDeleted RuntimeWebhookEventScheduleDeletedWebhookEventEvent = "schedule.deleted"
)

func (RuntimeWebhookEventScheduleDeletedWebhookEventEvent) IsKnown

type RuntimeWebhookEventScheduleTriggeredWebhookEvent

type RuntimeWebhookEventScheduleTriggeredWebhookEvent struct {
	ID        string                                                `json:"id" api:"required"`
	AgentID   string                                                `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventScheduleTriggeredWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventScheduleTriggeredWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                                `json:"fleetId" api:"required"`
	OrgID     string                                                `json:"orgId" api:"required"`
	ThreadID  string                                                `json:"threadId" api:"required,nullable"`
	Timestamp string                                                `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventScheduleTriggeredWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventScheduleTriggeredWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleTriggeredWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleTriggeredWebhookEventData

type RuntimeWebhookEventScheduleTriggeredWebhookEventData struct {
	ScheduleID string                                                   `json:"scheduleId" api:"required"`
	ThreadID   string                                                   `json:"threadId" api:"required"`
	JSON       runtimeWebhookEventScheduleTriggeredWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventScheduleTriggeredWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventScheduleTriggeredWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventScheduleTriggeredWebhookEventEvent

type RuntimeWebhookEventScheduleTriggeredWebhookEventEvent string
const (
	RuntimeWebhookEventScheduleTriggeredWebhookEventEventScheduleTriggered RuntimeWebhookEventScheduleTriggeredWebhookEventEvent = "schedule.triggered"
)

func (RuntimeWebhookEventScheduleTriggeredWebhookEventEvent) IsKnown

type RuntimeWebhookEventThreadCompletedWebhookEvent

type RuntimeWebhookEventThreadCompletedWebhookEvent struct {
	ID        string                                              `json:"id" api:"required"`
	AgentID   string                                              `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventThreadCompletedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventThreadCompletedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                              `json:"fleetId" api:"required"`
	OrgID     string                                              `json:"orgId" api:"required"`
	ThreadID  string                                              `json:"threadId" api:"required,nullable"`
	Timestamp string                                              `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventThreadCompletedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventThreadCompletedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventThreadCompletedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadCompletedWebhookEventData

type RuntimeWebhookEventThreadCompletedWebhookEventData struct {
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	PreviousStatus Status `json:"previousStatus" api:"required"`
	Result         string `json:"result" api:"required"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status Status                                                 `json:"status" api:"required"`
	JSON   runtimeWebhookEventThreadCompletedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventThreadCompletedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventThreadCompletedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadCompletedWebhookEventEvent

type RuntimeWebhookEventThreadCompletedWebhookEventEvent string
const (
	RuntimeWebhookEventThreadCompletedWebhookEventEventThreadCompleted RuntimeWebhookEventThreadCompletedWebhookEventEvent = "thread.completed"
)

func (RuntimeWebhookEventThreadCompletedWebhookEventEvent) IsKnown

type RuntimeWebhookEventThreadCreatedWebhookEvent

type RuntimeWebhookEventThreadCreatedWebhookEvent struct {
	ID        string                                            `json:"id" api:"required"`
	AgentID   string                                            `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventThreadCreatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventThreadCreatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                            `json:"fleetId" api:"required"`
	OrgID     string                                            `json:"orgId" api:"required"`
	ThreadID  string                                            `json:"threadId" api:"required,nullable"`
	Timestamp string                                            `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventThreadCreatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventThreadCreatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventThreadCreatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadCreatedWebhookEventData

type RuntimeWebhookEventThreadCreatedWebhookEventData struct {
	Message string                                               `json:"message" api:"required"`
	Model   string                                               `json:"model" api:"required"`
	JSON    runtimeWebhookEventThreadCreatedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventThreadCreatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventThreadCreatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadCreatedWebhookEventEvent

type RuntimeWebhookEventThreadCreatedWebhookEventEvent string
const (
	RuntimeWebhookEventThreadCreatedWebhookEventEventThreadCreated RuntimeWebhookEventThreadCreatedWebhookEventEvent = "thread.created"
)

func (RuntimeWebhookEventThreadCreatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventThreadFailedWebhookEvent

type RuntimeWebhookEventThreadFailedWebhookEvent struct {
	ID        string                                           `json:"id" api:"required"`
	AgentID   string                                           `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventThreadFailedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventThreadFailedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                           `json:"fleetId" api:"required"`
	OrgID     string                                           `json:"orgId" api:"required"`
	ThreadID  string                                           `json:"threadId" api:"required,nullable"`
	Timestamp string                                           `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventThreadFailedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventThreadFailedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventThreadFailedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadFailedWebhookEventData

type RuntimeWebhookEventThreadFailedWebhookEventData struct {
	Error string `json:"error" api:"required"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	PreviousStatus Status `json:"previousStatus" api:"required"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status Status                                              `json:"status" api:"required"`
	JSON   runtimeWebhookEventThreadFailedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventThreadFailedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventThreadFailedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadFailedWebhookEventEvent

type RuntimeWebhookEventThreadFailedWebhookEventEvent string
const (
	RuntimeWebhookEventThreadFailedWebhookEventEventThreadFailed RuntimeWebhookEventThreadFailedWebhookEventEvent = "thread.failed"
)

func (RuntimeWebhookEventThreadFailedWebhookEventEvent) IsKnown

type RuntimeWebhookEventThreadStatusChangedWebhookEvent

type RuntimeWebhookEventThreadStatusChangedWebhookEvent struct {
	ID        string                                                  `json:"id" api:"required"`
	AgentID   string                                                  `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventThreadStatusChangedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventThreadStatusChangedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                                  `json:"fleetId" api:"required"`
	OrgID     string                                                  `json:"orgId" api:"required"`
	ThreadID  string                                                  `json:"threadId" api:"required,nullable"`
	Timestamp string                                                  `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventThreadStatusChangedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventThreadStatusChangedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventThreadStatusChangedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadStatusChangedWebhookEventData

type RuntimeWebhookEventThreadStatusChangedWebhookEventData struct {
	Error string `json:"error" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	PreviousStatus Status `json:"previousStatus" api:"required"`
	Result         string `json:"result" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status Status                                                     `json:"status" api:"required"`
	JSON   runtimeWebhookEventThreadStatusChangedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventThreadStatusChangedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventThreadStatusChangedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventThreadStatusChangedWebhookEventEvent

type RuntimeWebhookEventThreadStatusChangedWebhookEventEvent string
const (
	RuntimeWebhookEventThreadStatusChangedWebhookEventEventThreadStatusChanged RuntimeWebhookEventThreadStatusChangedWebhookEventEvent = "thread.status.changed"
)

func (RuntimeWebhookEventThreadStatusChangedWebhookEventEvent) IsKnown

type RuntimeWebhookEventTurnCompletedWebhookEvent

type RuntimeWebhookEventTurnCompletedWebhookEvent struct {
	ID        string                                            `json:"id" api:"required"`
	AgentID   string                                            `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventTurnCompletedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventTurnCompletedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                            `json:"fleetId" api:"required"`
	OrgID     string                                            `json:"orgId" api:"required"`
	ThreadID  string                                            `json:"threadId" api:"required,nullable"`
	Timestamp string                                            `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventTurnCompletedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventTurnCompletedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventTurnCompletedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnCompletedWebhookEventData

type RuntimeWebhookEventTurnCompletedWebhookEventData struct {
	CompletedAt string                                                 `json:"completedAt" api:"required"`
	Error       string                                                 `json:"error" api:"required,nullable"`
	Result      string                                                 `json:"result" api:"required,nullable"`
	Seq         float64                                                `json:"seq" api:"required"`
	Status      RuntimeWebhookEventTurnCompletedWebhookEventDataStatus `json:"status" api:"required"`
	TokenUsage  TokenUsage                                             `json:"tokenUsage" api:"required,nullable"`
	TurnID      string                                                 `json:"turnId" api:"required"`
	JSON        runtimeWebhookEventTurnCompletedWebhookEventDataJSON   `json:"-"`
}

func (*RuntimeWebhookEventTurnCompletedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventTurnCompletedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnCompletedWebhookEventDataStatus

type RuntimeWebhookEventTurnCompletedWebhookEventDataStatus string
const (
	RuntimeWebhookEventTurnCompletedWebhookEventDataStatusCompleted RuntimeWebhookEventTurnCompletedWebhookEventDataStatus = "completed"
)

func (RuntimeWebhookEventTurnCompletedWebhookEventDataStatus) IsKnown

type RuntimeWebhookEventTurnCompletedWebhookEventEvent

type RuntimeWebhookEventTurnCompletedWebhookEventEvent string
const (
	RuntimeWebhookEventTurnCompletedWebhookEventEventTurnCompleted RuntimeWebhookEventTurnCompletedWebhookEventEvent = "turn.completed"
)

func (RuntimeWebhookEventTurnCompletedWebhookEventEvent) IsKnown

type RuntimeWebhookEventTurnCreatedWebhookEvent

type RuntimeWebhookEventTurnCreatedWebhookEvent struct {
	ID        string                                          `json:"id" api:"required"`
	AgentID   string                                          `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventTurnCreatedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventTurnCreatedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                          `json:"fleetId" api:"required"`
	OrgID     string                                          `json:"orgId" api:"required"`
	ThreadID  string                                          `json:"threadId" api:"required,nullable"`
	Timestamp string                                          `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventTurnCreatedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventTurnCreatedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventTurnCreatedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnCreatedWebhookEventData

type RuntimeWebhookEventTurnCreatedWebhookEventData struct {
	Message   string                                             `json:"message" api:"required"`
	Seq       float64                                            `json:"seq" api:"required"`
	StartedAt string                                             `json:"startedAt" api:"required"`
	TurnID    string                                             `json:"turnId" api:"required"`
	JSON      runtimeWebhookEventTurnCreatedWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventTurnCreatedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventTurnCreatedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnCreatedWebhookEventEvent

type RuntimeWebhookEventTurnCreatedWebhookEventEvent string
const (
	RuntimeWebhookEventTurnCreatedWebhookEventEventTurnCreated RuntimeWebhookEventTurnCreatedWebhookEventEvent = "turn.created"
)

func (RuntimeWebhookEventTurnCreatedWebhookEventEvent) IsKnown

type RuntimeWebhookEventTurnFailedWebhookEvent

type RuntimeWebhookEventTurnFailedWebhookEvent struct {
	ID        string                                         `json:"id" api:"required"`
	AgentID   string                                         `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventTurnFailedWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventTurnFailedWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                         `json:"fleetId" api:"required"`
	OrgID     string                                         `json:"orgId" api:"required"`
	ThreadID  string                                         `json:"threadId" api:"required,nullable"`
	Timestamp string                                         `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventTurnFailedWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventTurnFailedWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventTurnFailedWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnFailedWebhookEventData

type RuntimeWebhookEventTurnFailedWebhookEventData struct {
	CompletedAt string                                              `json:"completedAt" api:"required"`
	Error       string                                              `json:"error" api:"required,nullable"`
	Result      string                                              `json:"result" api:"required,nullable"`
	Seq         float64                                             `json:"seq" api:"required"`
	Status      RuntimeWebhookEventTurnFailedWebhookEventDataStatus `json:"status" api:"required"`
	TokenUsage  TokenUsage                                          `json:"tokenUsage" api:"required,nullable"`
	TurnID      string                                              `json:"turnId" api:"required"`
	JSON        runtimeWebhookEventTurnFailedWebhookEventDataJSON   `json:"-"`
}

func (*RuntimeWebhookEventTurnFailedWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventTurnFailedWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventTurnFailedWebhookEventDataStatus

type RuntimeWebhookEventTurnFailedWebhookEventDataStatus string
const (
	RuntimeWebhookEventTurnFailedWebhookEventDataStatusFailed RuntimeWebhookEventTurnFailedWebhookEventDataStatus = "failed"
)

func (RuntimeWebhookEventTurnFailedWebhookEventDataStatus) IsKnown

type RuntimeWebhookEventTurnFailedWebhookEventEvent

type RuntimeWebhookEventTurnFailedWebhookEventEvent string
const (
	RuntimeWebhookEventTurnFailedWebhookEventEventTurnFailed RuntimeWebhookEventTurnFailedWebhookEventEvent = "turn.failed"
)

func (RuntimeWebhookEventTurnFailedWebhookEventEvent) IsKnown

type RuntimeWebhookEventWebhookTestWebhookEvent

type RuntimeWebhookEventWebhookTestWebhookEvent struct {
	ID        string                                          `json:"id" api:"required"`
	AgentID   string                                          `json:"agentId" api:"required"`
	Data      RuntimeWebhookEventWebhookTestWebhookEventData  `json:"data" api:"required"`
	Event     RuntimeWebhookEventWebhookTestWebhookEventEvent `json:"event" api:"required"`
	FleetID   string                                          `json:"fleetId" api:"required"`
	OrgID     string                                          `json:"orgId" api:"required"`
	ThreadID  string                                          `json:"threadId" api:"required,nullable"`
	Timestamp string                                          `json:"timestamp" api:"required"`
	JSON      runtimeWebhookEventWebhookTestWebhookEventJSON  `json:"-"`
}

func (*RuntimeWebhookEventWebhookTestWebhookEvent) UnmarshalJSON

func (r *RuntimeWebhookEventWebhookTestWebhookEvent) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventWebhookTestWebhookEventData

type RuntimeWebhookEventWebhookTestWebhookEventData struct {
	JSON runtimeWebhookEventWebhookTestWebhookEventDataJSON `json:"-"`
}

func (*RuntimeWebhookEventWebhookTestWebhookEventData) UnmarshalJSON

func (r *RuntimeWebhookEventWebhookTestWebhookEventData) UnmarshalJSON(data []byte) (err error)

type RuntimeWebhookEventWebhookTestWebhookEventEvent

type RuntimeWebhookEventWebhookTestWebhookEventEvent string
const (
	RuntimeWebhookEventWebhookTestWebhookEventEventWebhookTest RuntimeWebhookEventWebhookTestWebhookEventEvent = "webhook.test"
)

func (RuntimeWebhookEventWebhookTestWebhookEventEvent) IsKnown

type SandboxExecParams

type SandboxExecParams struct {
	Command   param.Field[string]  `json:"command" api:"required"`
	MaxBuffer param.Field[float64] `json:"maxBuffer"`
	// Timeout in seconds. Runtime converts this to milliseconds.
	ExecutionTimeout param.Field[float64] `json:"timeout"`
	// Optional sandbox working directory.
	Workdir param.Field[string] `json:"workdir"`
}

func (SandboxExecParams) MarshalJSON

func (r SandboxExecParams) MarshalJSON() (data []byte, err error)

type SandboxReadParams

type SandboxReadParams struct {
	Path   param.Field[string]  `json:"path" api:"required"`
	Limit  param.Field[float64] `json:"limit"`
	Offset param.Field[float64] `json:"offset"`
}

func (SandboxReadParams) MarshalJSON

func (r SandboxReadParams) MarshalJSON() (data []byte, err error)

type SandboxService

type SandboxService struct {
	Options []option.RequestOption
}

SandboxService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSandboxService method instead.

func NewSandboxService

func NewSandboxService(opts ...option.RequestOption) (r *SandboxService)

NewSandboxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SandboxService) Exec

func (r *SandboxService) Exec(ctx context.Context, agentID string, body SandboxExecParams, opts ...option.RequestOption) (res *ExecResult, err error)

Execute sandbox command

func (*SandboxService) Read

func (r *SandboxService) Read(ctx context.Context, agentID string, body SandboxReadParams, opts ...option.RequestOption) (res *ReadResponse, err error)

Read sandbox file

func (*SandboxService) Write

func (r *SandboxService) Write(ctx context.Context, agentID string, body SandboxWriteParams, opts ...option.RequestOption) (res *SandboxWriteResponse, err error)

Write sandbox file

type SandboxWriteParams

type SandboxWriteParams struct {
	Content param.Field[string] `json:"content" api:"required"`
	Path    param.Field[string] `json:"path" api:"required"`
}

func (SandboxWriteParams) MarshalJSON

func (r SandboxWriteParams) MarshalJSON() (data []byte, err error)

type SandboxWriteResponse

type SandboxWriteResponse struct {
	Success SandboxWriteResponseSuccess `json:"success" api:"required"`
	JSON    sandboxWriteResponseJSON    `json:"-"`
}

func (*SandboxWriteResponse) UnmarshalJSON

func (r *SandboxWriteResponse) UnmarshalJSON(data []byte) (err error)

type SandboxWriteResponseSuccess

type SandboxWriteResponseSuccess bool
const (
	SandboxWriteResponseSuccessTrue SandboxWriteResponseSuccess = true
)

func (SandboxWriteResponseSuccess) IsKnown

func (r SandboxWriteResponseSuccess) IsKnown() bool

type Schedule

type Schedule struct {
	ID           string    `json:"id" api:"required"`
	CreatedAt    string    `json:"createdAt" api:"required"`
	Enabled      bool      `json:"enabled" api:"required"`
	Message      string    `json:"message" api:"required"`
	Name         string    `json:"name" api:"required"`
	NextAt       string    `json:"nextAt" api:"required,nullable"`
	Timezone     string    `json:"timezone" api:"required"`
	UpdatedAt    string    `json:"updatedAt" api:"required"`
	Cron         string    `json:"cron"`
	Instructions string    `json:"instructions"`
	Model        string    `json:"model"`
	RunAt        time.Time `json:"runAt" format:"date-time"`
	// Per-schedule tool subset. Scheduled threads inherit the agent's effective tools
	// when omitted and can only narrow them when provided.
	Tools []shared.ToolSpec `json:"tools"`
	JSON  scheduleJSON      `json:"-"`
}

func (*Schedule) UnmarshalJSON

func (r *Schedule) UnmarshalJSON(data []byte) (err error)

type ScheduleDeleteResponse

type ScheduleDeleteResponse struct {
	Success ScheduleDeleteResponseSuccess `json:"success" api:"required"`
	JSON    scheduleDeleteResponseJSON    `json:"-"`
}

func (*ScheduleDeleteResponse) UnmarshalJSON

func (r *ScheduleDeleteResponse) UnmarshalJSON(data []byte) (err error)

type ScheduleDeleteResponseSuccess

type ScheduleDeleteResponseSuccess bool
const (
	ScheduleDeleteResponseSuccessTrue ScheduleDeleteResponseSuccess = true
)

func (ScheduleDeleteResponseSuccess) IsKnown

func (r ScheduleDeleteResponseSuccess) IsKnown() bool

type ScheduleListResponse

type ScheduleListResponse struct {
	Schedules []Schedule               `json:"schedules" api:"required"`
	JSON      scheduleListResponseJSON `json:"-"`
}

func (*ScheduleListResponse) UnmarshalJSON

func (r *ScheduleListResponse) UnmarshalJSON(data []byte) (err error)

type ScheduleNewParams

type ScheduleNewParams struct {
	Message      param.Field[string]    `json:"message" api:"required"`
	Name         param.Field[string]    `json:"name" api:"required"`
	Cron         param.Field[string]    `json:"cron"`
	Instructions param.Field[string]    `json:"instructions"`
	Model        param.Field[string]    `json:"model"`
	RunAt        param.Field[time.Time] `json:"runAt" format:"date-time"`
	Timezone     param.Field[string]    `json:"timezone"`
	// Per-schedule tool subset. When the schedule starts a thread, these tools can
	// only narrow the agent's effective tools.
	Tools param.Field[[]shared.ToolSpecParam] `json:"tools"`
}

func (ScheduleNewParams) MarshalJSON

func (r ScheduleNewParams) MarshalJSON() (data []byte, err error)

type ScheduleService

type ScheduleService struct {
	Options []option.RequestOption
}

ScheduleService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewScheduleService method instead.

func NewScheduleService

func NewScheduleService(opts ...option.RequestOption) (r *ScheduleService)

NewScheduleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ScheduleService) Delete

func (r *ScheduleService) Delete(ctx context.Context, agentID string, scheduleID string, opts ...option.RequestOption) (res *ScheduleDeleteResponse, err error)

Delete schedule

func (*ScheduleService) List

func (r *ScheduleService) List(ctx context.Context, agentID string, opts ...option.RequestOption) (res *ScheduleListResponse, err error)

List schedules

func (*ScheduleService) New

func (r *ScheduleService) New(ctx context.Context, agentID string, body ScheduleNewParams, opts ...option.RequestOption) (res *Schedule, err error)

Create schedule

func (*ScheduleService) Trigger

func (r *ScheduleService) Trigger(ctx context.Context, agentID string, scheduleID string, opts ...option.RequestOption) (res *ScheduleTriggerResponse, err error)

Trigger schedule

func (*ScheduleService) Update

func (r *ScheduleService) Update(ctx context.Context, agentID string, scheduleID string, body ScheduleUpdateParams, opts ...option.RequestOption) (res *Schedule, err error)

Update schedule

type ScheduleTriggerResponse

type ScheduleTriggerResponse struct {
	ThreadID string                      `json:"threadId" api:"required"`
	JSON     scheduleTriggerResponseJSON `json:"-"`
}

func (*ScheduleTriggerResponse) UnmarshalJSON

func (r *ScheduleTriggerResponse) UnmarshalJSON(data []byte) (err error)

type ScheduleUpdateParams

type ScheduleUpdateParams struct {
	Cron         param.Field[string]    `json:"cron"`
	Enabled      param.Field[bool]      `json:"enabled"`
	Instructions param.Field[string]    `json:"instructions"`
	Message      param.Field[string]    `json:"message"`
	Model        param.Field[string]    `json:"model"`
	Name         param.Field[string]    `json:"name"`
	RunAt        param.Field[time.Time] `json:"runAt" format:"date-time"`
	Timezone     param.Field[string]    `json:"timezone"`
	// Per-schedule tool subset. When updated, these tools can only narrow the agent's
	// effective tools for future scheduled threads.
	Tools param.Field[[]shared.ToolSpecParam] `json:"tools"`
}

func (ScheduleUpdateParams) MarshalJSON

func (r ScheduleUpdateParams) MarshalJSON() (data []byte, err error)

type SearchResult

type SearchResult struct {
	ByteLength float64          `json:"byteLength" api:"required"`
	Key        string           `json:"key" api:"required"`
	Score      float64          `json:"score" api:"required"`
	Snippet    string           `json:"snippet" api:"required"`
	UpdatedAt  string           `json:"updatedAt" api:"required"`
	Version    float64          `json:"version" api:"required"`
	MimeType   string           `json:"mimeType"`
	JSON       searchResultJSON `json:"-"`
}

func (*SearchResult) UnmarshalJSON

func (r *SearchResult) UnmarshalJSON(data []byte) (err error)

type SourceWarning

type SourceWarning struct {
	Message  string            `json:"message" api:"required"`
	Source   string            `json:"source" api:"required"`
	SourceID string            `json:"sourceId"`
	JSON     sourceWarningJSON `json:"-"`
}

func (*SourceWarning) UnmarshalJSON

func (r *SourceWarning) UnmarshalJSON(data []byte) (err error)

type Status

type Status string

`idle` threads can accept a new turn or be closed. `running` threads have an active turn. `awaiting` threads are paused on external input such as approvals. `closed` threads are terminal.

const (
	StatusIdle     Status = "idle"
	StatusRunning  Status = "running"
	StatusAwaiting Status = "awaiting"
	StatusClosed   Status = "closed"
)

func (Status) IsKnown

func (r Status) IsKnown() bool

type SteerResult

type SteerResult struct {
	Status SteerResultStatus `json:"status" api:"required"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	ThreadStatus Status          `json:"threadStatus" api:"required"`
	TurnID       string          `json:"turnId" api:"required"`
	JSON         steerResultJSON `json:"-"`
}

func (*SteerResult) UnmarshalJSON

func (r *SteerResult) UnmarshalJSON(data []byte) (err error)

type SteerResultStatus

type SteerResultStatus string
const (
	SteerResultStatusEnqueued    SteerResultStatus = "enqueued"
	SteerResultStatusTurnStarted SteerResultStatus = "turn_started"
)

func (SteerResultStatus) IsKnown

func (r SteerResultStatus) IsKnown() bool

type SubThreadSummary

type SubThreadSummary struct {
	ID             string  `json:"id" api:"required"`
	CompletedAt    string  `json:"completedAt" api:"required,nullable"`
	CreatedAt      string  `json:"createdAt" api:"required"`
	MessageCount   float64 `json:"messageCount" api:"required"`
	Model          string  `json:"model" api:"required"`
	ParentThreadID string  `json:"parentThreadId" api:"required,nullable"`
	Result         string  `json:"result" api:"required,nullable"`
	ScheduleID     string  `json:"scheduleId" api:"required,nullable"`
	ScheduleSeq    float64 `json:"scheduleSeq" api:"required,nullable"`
	// `pending` means the parent thread is still waiting on this sub-thread. Other
	// values are the child thread lifecycle state.
	State     SubThreadSummaryState `json:"state" api:"required"`
	StepCount float64               `json:"stepCount" api:"required"`
	ToolUseID string                `json:"toolUseId" api:"required,nullable"`
	JSON      subThreadSummaryJSON  `json:"-"`
}

func (*SubThreadSummary) UnmarshalJSON

func (r *SubThreadSummary) UnmarshalJSON(data []byte) (err error)

type SubThreadSummaryState

type SubThreadSummaryState string

`pending` means the parent thread is still waiting on this sub-thread. Other values are the child thread lifecycle state.

const (
	SubThreadSummaryStatePending  SubThreadSummaryState = "pending"
	SubThreadSummaryStateIdle     SubThreadSummaryState = "idle"
	SubThreadSummaryStateRunning  SubThreadSummaryState = "running"
	SubThreadSummaryStateAwaiting SubThreadSummaryState = "awaiting"
	SubThreadSummaryStateClosed   SubThreadSummaryState = "closed"
)

func (SubThreadSummaryState) IsKnown

func (r SubThreadSummaryState) IsKnown() bool

type SubscriptionEvent

type SubscriptionEvent struct {
	Event RuntimeWebhookEvent   `json:"event" api:"required"`
	Seq   float64               `json:"seq" api:"required"`
	JSON  subscriptionEventJSON `json:"-"`
}

func (*SubscriptionEvent) UnmarshalJSON

func (r *SubscriptionEvent) UnmarshalJSON(data []byte) (err error)

type Thread

type Thread struct {
	ID              string               `json:"id" api:"required"`
	AgentID         string               `json:"agentId" api:"required"`
	CompiledContext CompiledContext      `json:"compiledContext" api:"required,nullable"`
	CompletedAt     string               `json:"completedAt" api:"required,nullable"`
	CreatedAt       string               `json:"createdAt" api:"required"`
	Depth           float64              `json:"depth" api:"required"`
	Error           string               `json:"error" api:"required,nullable"`
	HasMoreMessages bool                 `json:"hasMoreMessages" api:"required"`
	Instructions    string               `json:"instructions" api:"required,nullable"`
	LastTurnStatus  ThreadLastTurnStatus `json:"lastTurnStatus" api:"required,nullable"`
	Message         string               `json:"message" api:"required"`
	MessageCursor   float64              `json:"messageCursor" api:"required,nullable"`
	Messages        []Message            `json:"messages" api:"required"`
	Model           string               `json:"model" api:"required"`
	ParentThreadID  string               `json:"parentThreadId" api:"required,nullable"`
	Result          string               `json:"result" api:"required,nullable"`
	ScheduleID      string               `json:"scheduleId" api:"required,nullable"`
	ScheduleSeq     float64              `json:"scheduleSeq" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status                 Status                            `json:"status" api:"required"`
	SubThreads             []SubThreadSummary                `json:"subThreads" api:"required"`
	Tools                  []shared.ToolName                 `json:"tools" api:"required"`
	Turns                  []Turn                            `json:"turns" api:"required"`
	UpdatedAt              string                            `json:"updatedAt" api:"required"`
	ExternalToolNamespaces ThreadExternalToolNamespacesUnion `json:"externalToolNamespaces"`
	JSON                   threadJSON                        `json:"-"`
}

func (*Thread) UnmarshalJSON

func (r *Thread) UnmarshalJSON(data []byte) (err error)

type ThreadActivityParams added in v0.2.0

type ThreadActivityParams struct {
	// Optional fleet id for index-backed authorization.
	FleetID param.Field[string] `query:"fleetId"`
}

func (ThreadActivityParams) URLQuery added in v0.2.0

func (r ThreadActivityParams) URLQuery() (v url.Values)

URLQuery serializes ThreadActivityParams's query parameters as `url.Values`.

type ThreadExternalToolNamespacesArray

type ThreadExternalToolNamespacesArray []string

type ThreadExternalToolNamespacesString

type ThreadExternalToolNamespacesString string
const (
	ThreadExternalToolNamespacesStringAll ThreadExternalToolNamespacesString = "all"
)

func (ThreadExternalToolNamespacesString) IsKnown

type ThreadExternalToolNamespacesUnion

type ThreadExternalToolNamespacesUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by ThreadExternalToolNamespacesString or ThreadExternalToolNamespacesArray.

type ThreadGetParams

type ThreadGetParams struct {
	// When true, includes debug-only compiled context fields.
	Debug param.Field[ThreadGetParamsDebug] `query:"debug"`
	// Deprecated compatibility flag. Thread detail includes a bounded recent message
	// page by default; pass `false` only to opt out when no message pagination params
	// are present.
	IncludeMessages param.Field[ThreadGetParamsIncludeMessages] `query:"includeMessages"`
}

func (ThreadGetParams) URLQuery

func (r ThreadGetParams) URLQuery() (v url.Values)

URLQuery serializes ThreadGetParams's query parameters as `url.Values`.

type ThreadGetParamsDebug

type ThreadGetParamsDebug string

When true, includes debug-only compiled context fields.

const (
	ThreadGetParamsDebugTrue  ThreadGetParamsDebug = "true"
	ThreadGetParamsDebugFalse ThreadGetParamsDebug = "false"
)

func (ThreadGetParamsDebug) IsKnown

func (r ThreadGetParamsDebug) IsKnown() bool

type ThreadGetParamsIncludeMessages

type ThreadGetParamsIncludeMessages string

Deprecated compatibility flag. Thread detail includes a bounded recent message page by default; pass `false` only to opt out when no message pagination params are present.

const (
	ThreadGetParamsIncludeMessagesTrue  ThreadGetParamsIncludeMessages = "true"
	ThreadGetParamsIncludeMessagesFalse ThreadGetParamsIncludeMessages = "false"
)

func (ThreadGetParamsIncludeMessages) IsKnown

type ThreadLastTurnStatus

type ThreadLastTurnStatus string
const (
	ThreadLastTurnStatusCompleted ThreadLastTurnStatus = "completed"
	ThreadLastTurnStatusFailed    ThreadLastTurnStatus = "failed"
)

func (ThreadLastTurnStatus) IsKnown

func (r ThreadLastTurnStatus) IsKnown() bool

type ThreadListMessagesParams added in v0.2.0

type ThreadListMessagesParams struct {
	// Cursor returned by a previous thread messages response.
	Cursor param.Field[string] `query:"cursor"`
	// Optional fleet id for index-backed authorization.
	FleetID param.Field[string] `query:"fleetId"`
	// Maximum number of messages to include, capped at 500.
	Limit param.Field[string] `query:"limit"`
}

func (ThreadListMessagesParams) URLQuery added in v0.2.0

func (r ThreadListMessagesParams) URLQuery() (v url.Values)

URLQuery serializes ThreadListMessagesParams's query parameters as `url.Values`.

type ThreadListParams

type ThreadListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
	// Optional schedule id filter.
	ScheduleID param.Field[string] `query:"scheduleId"`
	// Optional thread status filter.
	Status param.Field[Status] `query:"status"`
}

func (ThreadListParams) URLQuery

func (r ThreadListParams) URLQuery() (v url.Values)

URLQuery serializes ThreadListParams's query parameters as `url.Values`.

type ThreadNewParams

type ThreadNewParams struct {
	Instructions param.Field[string] `json:"instructions"`
	Message      param.Field[string] `json:"message"`
	Model        param.Field[string] `json:"model"`
	// Deprecated alias for `instructions`; accepted for backwards compatibility.
	SystemPrompt param.Field[string] `json:"systemPrompt"`
	// Per-thread tool subset. Omit to inherit the agent's full effective tools; pass
	// [] to run with no configurable tools. Provided entries can only narrow the
	// agent's effective tools.
	Tools param.Field[[]shared.ToolSpecParam] `json:"tools"`
}

func (ThreadNewParams) MarshalJSON

func (r ThreadNewParams) MarshalJSON() (data []byte, err error)

type ThreadService

type ThreadService struct {
	Options []option.RequestOption
}

ThreadService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewThreadService method instead.

func NewThreadService

func NewThreadService(opts ...option.RequestOption) (r *ThreadService)

NewThreadService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ThreadService) Activity added in v0.2.0

func (r *ThreadService) Activity(ctx context.Context, agentID string, threadID string, query ThreadActivityParams, opts ...option.RequestOption) (res *ActivityDetail, err error)

Fetch compact current and recent activity for a thread without returning transcript content or runtime debug state.

func (*ThreadService) Cancel

func (r *ThreadService) Cancel(ctx context.Context, agentID string, threadID string, opts ...option.RequestOption) (res *Thread, err error)

Cancel a running or awaiting thread. The underlying runtime treats repeat cancellation as an idempotent lifecycle operation when possible.

func (*ThreadService) Close

func (r *ThreadService) Close(ctx context.Context, agentID string, threadID string, opts ...option.RequestOption) (res *Thread, err error)

Close an idle thread. Closing a running, awaiting, or already-closed thread returns a lifecycle conflict.

func (*ThreadService) Compact

func (r *ThreadService) Compact(ctx context.Context, agentID string, threadID string, opts ...option.RequestOption) (res *Thread, err error)

Force context compaction for an idle thread. Compacting a running thread returns a lifecycle conflict.

func (*ThreadService) Get

func (r *ThreadService) Get(ctx context.Context, agentID string, threadID string, query ThreadGetParams, opts ...option.RequestOption) (res *Thread, err error)

Retrieve thread

func (*ThreadService) List

List threads

func (*ThreadService) ListAutoPaging

List threads

func (*ThreadService) ListMessages added in v0.2.0

func (r *ThreadService) ListMessages(ctx context.Context, agentID string, threadID string, query ThreadListMessagesParams, opts ...option.RequestOption) (res *pagination.ThreadMessagesCursorPage[Message], err error)

List a bounded page of transcript messages for a thread, newest first. Use the returned `cursor` to page older messages.

func (*ThreadService) ListMessagesAutoPaging added in v0.2.0

List a bounded page of transcript messages for a thread, newest first. Use the returned `cursor` to page older messages.

func (*ThreadService) New

func (r *ThreadService) New(ctx context.Context, agentID string, body ThreadNewParams, opts ...option.RequestOption) (res *Thread, err error)

Create thread

func (*ThreadService) StartTurn

func (r *ThreadService) StartTurn(ctx context.Context, agentID string, threadID string, body ThreadStartTurnParams, opts ...option.RequestOption) (res *Turn, err error)

Create turn

func (*ThreadService) Steer

func (r *ThreadService) Steer(ctx context.Context, agentID string, threadID string, body ThreadSteerParams, opts ...option.RequestOption) (res *SteerResult, err error)

Steer a thread with another user message. Steering a closed thread returns a conflict; steering a running or awaiting thread queues the message.

type ThreadStartTurnParams

type ThreadStartTurnParams struct {
	Message param.Field[string] `json:"message" api:"required"`
	Model   param.Field[string] `json:"model"`
	// Per-turn tool subset. Omit to inherit the thread's current tools; pass [] to run
	// this turn with no configurable tools. Provided entries can only narrow the
	// agent/thread effective tools.
	Tools param.Field[[]shared.ToolSpecParam] `json:"tools"`
}

func (ThreadStartTurnParams) MarshalJSON

func (r ThreadStartTurnParams) MarshalJSON() (data []byte, err error)

type ThreadSteerParams

type ThreadSteerParams struct {
	Message param.Field[string] `json:"message" api:"required"`
}

func (ThreadSteerParams) MarshalJSON

func (r ThreadSteerParams) MarshalJSON() (data []byte, err error)

type ThreadStreamEvent

type ThreadStreamEvent struct {
	EventSeq float64               `json:"eventSeq" api:"required"`
	TurnID   string                `json:"turnId" api:"required"`
	Type     ThreadStreamEventType `json:"type" api:"required"`
	// This field can have the runtime type of
	// [ThreadStreamEventThreadStreamApprovalRequestedMessageApproval].
	Approval               interface{}               `json:"approval"`
	ApprovalID             string                    `json:"approvalId"`
	CumulativeInputTokens  float64                   `json:"cumulativeInputTokens"`
	CumulativeOutputTokens float64                   `json:"cumulativeOutputTokens"`
	Decision               ThreadStreamEventDecision `json:"decision"`
	DurationMs             float64                   `json:"durationMs"`
	Error                  string                    `json:"error" api:"nullable"`
	InputTokens            float64                   `json:"inputTokens"`
	IsError                bool                      `json:"isError"`
	ItemID                 string                    `json:"itemId"`
	ItemType               ThreadStreamEventItemType `json:"itemType"`
	// This field can have the runtime type of
	// [ThreadStreamEventThreadStreamContentMessageMessage].
	Message           interface{} `json:"message"`
	MessageCount      float64     `json:"messageCount"`
	OutputTokens      float64     `json:"outputTokens"`
	RequestedToolName string      `json:"requestedToolName"`
	Result            string      `json:"result" api:"nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status      Status                `json:"status"`
	StepCount   float64               `json:"stepCount"`
	StepSeq     float64               `json:"stepSeq"`
	SubThreadID string                `json:"subThreadId"`
	ToolName    shared.ToolName       `json:"toolName"`
	TurnSeq     float64               `json:"turnSeq"`
	JSON        threadStreamEventJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*ThreadStreamEvent) UnmarshalJSON

func (r *ThreadStreamEvent) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventDecision

type ThreadStreamEventDecision string
const (
	ThreadStreamEventDecisionApprove ThreadStreamEventDecision = "approve"
	ThreadStreamEventDecisionDeny    ThreadStreamEventDecision = "deny"
	ThreadStreamEventDecisionCancel  ThreadStreamEventDecision = "cancel"
	ThreadStreamEventDecisionTimeout ThreadStreamEventDecision = "timeout"
)

func (ThreadStreamEventDecision) IsKnown

func (r ThreadStreamEventDecision) IsKnown() bool

type ThreadStreamEventItemType

type ThreadStreamEventItemType string
const (
	ThreadStreamEventItemTypeToolCall     ThreadStreamEventItemType = "tool_call"
	ThreadStreamEventItemTypeAgentMessage ThreadStreamEventItemType = "agent_message"
	ThreadStreamEventItemTypeLlmCall      ThreadStreamEventItemType = "llm_call"
	ThreadStreamEventItemTypeSubThread    ThreadStreamEventItemType = "sub_thread"
)

func (ThreadStreamEventItemType) IsKnown

func (r ThreadStreamEventItemType) IsKnown() bool

type ThreadStreamEventThreadStreamApprovalRequestedMessage

type ThreadStreamEventThreadStreamApprovalRequestedMessage struct {
	Approval ThreadStreamEventThreadStreamApprovalRequestedMessageApproval `json:"approval" api:"required"`
	EventSeq float64                                                       `json:"eventSeq" api:"required"`
	TurnID   string                                                        `json:"turnId" api:"required"`
	Type     ThreadStreamEventThreadStreamApprovalRequestedMessageType     `json:"type" api:"required"`
	JSON     threadStreamEventThreadStreamApprovalRequestedMessageJSON     `json:"-"`
}

func (*ThreadStreamEventThreadStreamApprovalRequestedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamApprovalRequestedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamApprovalRequestedMessageApproval

type ThreadStreamEventThreadStreamApprovalRequestedMessageApproval struct {
	ID                string                                                              `json:"id" api:"required"`
	CreatedAt         string                                                              `json:"createdAt" api:"required"`
	RequestedToolName string                                                              `json:"requestedToolName" api:"required"`
	ResolvedAt        string                                                              `json:"resolvedAt" api:"required,nullable"`
	Status            ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus `json:"status" api:"required"`
	ThreadID          string                                                              `json:"threadId" api:"required"`
	TimeoutAt         string                                                              `json:"timeoutAt" api:"required,nullable"`
	TimeoutMs         float64                                                             `json:"timeoutMs" api:"required,nullable"`
	ToolIndex         float64                                                             `json:"toolIndex" api:"required"`
	// JSON-serialized tool input payload. Parse as JSON before reading tool-specific
	// fields.
	ToolInput         string                                                            `json:"toolInput" api:"required"`
	ToolName          shared.ToolName                                                   `json:"toolName" api:"required"`
	ToolUseID         string                                                            `json:"toolUseId" api:"required"`
	TurnID            string                                                            `json:"turnId" api:"required"`
	ToolSourceID      string                                                            `json:"toolSourceId"`
	ToolSourceVersion float64                                                           `json:"toolSourceVersion"`
	JSON              threadStreamEventThreadStreamApprovalRequestedMessageApprovalJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamApprovalRequestedMessageApproval) UnmarshalJSON

type ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus

type ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus string
const (
	ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatusPending   ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus = "pending"
	ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatusApproved  ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus = "approved"
	ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatusDenied    ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus = "denied"
	ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatusCancelled ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus = "cancelled"
	ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatusTimedOut  ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus = "timed_out"
)

func (ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus) IsKnown

type ThreadStreamEventThreadStreamApprovalRequestedMessageType

type ThreadStreamEventThreadStreamApprovalRequestedMessageType string
const (
	ThreadStreamEventThreadStreamApprovalRequestedMessageTypeApprovalRequested ThreadStreamEventThreadStreamApprovalRequestedMessageType = "approval/requested"
)

func (ThreadStreamEventThreadStreamApprovalRequestedMessageType) IsKnown

type ThreadStreamEventThreadStreamApprovalResolvedMessage

type ThreadStreamEventThreadStreamApprovalResolvedMessage struct {
	ApprovalID string                                                       `json:"approvalId" api:"required"`
	Decision   ThreadStreamEventThreadStreamApprovalResolvedMessageDecision `json:"decision" api:"required"`
	EventSeq   float64                                                      `json:"eventSeq" api:"required"`
	TurnID     string                                                       `json:"turnId" api:"required"`
	Type       ThreadStreamEventThreadStreamApprovalResolvedMessageType     `json:"type" api:"required"`
	JSON       threadStreamEventThreadStreamApprovalResolvedMessageJSON     `json:"-"`
}

func (*ThreadStreamEventThreadStreamApprovalResolvedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamApprovalResolvedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamApprovalResolvedMessageDecision

type ThreadStreamEventThreadStreamApprovalResolvedMessageDecision string
const (
	ThreadStreamEventThreadStreamApprovalResolvedMessageDecisionApprove ThreadStreamEventThreadStreamApprovalResolvedMessageDecision = "approve"
	ThreadStreamEventThreadStreamApprovalResolvedMessageDecisionDeny    ThreadStreamEventThreadStreamApprovalResolvedMessageDecision = "deny"
	ThreadStreamEventThreadStreamApprovalResolvedMessageDecisionCancel  ThreadStreamEventThreadStreamApprovalResolvedMessageDecision = "cancel"
	ThreadStreamEventThreadStreamApprovalResolvedMessageDecisionTimeout ThreadStreamEventThreadStreamApprovalResolvedMessageDecision = "timeout"
)

func (ThreadStreamEventThreadStreamApprovalResolvedMessageDecision) IsKnown

type ThreadStreamEventThreadStreamApprovalResolvedMessageType

type ThreadStreamEventThreadStreamApprovalResolvedMessageType string
const (
	ThreadStreamEventThreadStreamApprovalResolvedMessageTypeApprovalResolved ThreadStreamEventThreadStreamApprovalResolvedMessageType = "approval/resolved"
)

func (ThreadStreamEventThreadStreamApprovalResolvedMessageType) IsKnown

type ThreadStreamEventThreadStreamContentMessage

type ThreadStreamEventThreadStreamContentMessage struct {
	EventSeq float64                                            `json:"eventSeq" api:"required"`
	Message  ThreadStreamEventThreadStreamContentMessageMessage `json:"message" api:"required"`
	StepSeq  float64                                            `json:"stepSeq" api:"required"`
	TurnID   string                                             `json:"turnId" api:"required"`
	Type     ThreadStreamEventThreadStreamContentMessageType    `json:"type" api:"required"`
	JSON     threadStreamEventThreadStreamContentMessageJSON    `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamContentMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamContentMessageMessage

type ThreadStreamEventThreadStreamContentMessageMessage struct {
	Content   []ThreadStreamEventThreadStreamContentMessageMessageContent `json:"content" api:"required"`
	CreatedAt string                                                      `json:"createdAt" api:"required"`
	Role      ThreadStreamEventThreadStreamContentMessageMessageRole      `json:"role" api:"required"`
	Seq       float64                                                     `json:"seq" api:"required"`
	JSON      threadStreamEventThreadStreamContentMessageMessageJSON      `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamContentMessageMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamContentMessageMessageContent

type ThreadStreamEventThreadStreamContentMessageMessageContent struct {
	Type ThreadStreamEventThreadStreamContentMessageMessageContentType `json:"type" api:"required"`
	ID   string                                                        `json:"id"`
	// This field can have the runtime type of [string], [interface{}].
	Content      interface{} `json:"content"`
	DeniedByUser bool        `json:"deniedByUser"`
	// JSON-serialized tool input payload. Parse as JSON before reading tool-specific
	// fields.
	Input   string          `json:"input"`
	IsError bool            `json:"isError"`
	Name    shared.ToolName `json:"name"`
	// This field can have the runtime type of [map[string]map[string]string].
	ProviderMetadata interface{}                                                   `json:"providerMetadata"`
	Text             string                                                        `json:"text"`
	ToolUseID        string                                                        `json:"toolUseId"`
	JSON             threadStreamEventThreadStreamContentMessageMessageContentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContent) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock struct {
	ID string `json:"id" api:"required"`
	// JSON-serialized tool input payload. Parse as JSON before reading tool-specific
	// fields.
	Input            string                                                                                             `json:"input" api:"required"`
	Name             string                                                                                             `json:"name" api:"required"`
	Type             ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string                                                                       `json:"providerMetadata"`
	JSON             threadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockTypeServerToolUse ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType = "server_tool_use"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock struct {
	Text             string                                                                                    `json:"text" api:"required"`
	Type             ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string                                                              `json:"providerMetadata"`
	JSON             threadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockTypeText ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType = "text"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock struct {
	Content          string                                                                                          `json:"content" api:"required"`
	IsError          bool                                                                                            `json:"isError" api:"required"`
	ToolUseID        string                                                                                          `json:"toolUseId" api:"required"`
	Type             ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType `json:"type" api:"required"`
	DeniedByUser     bool                                                                                            `json:"deniedByUser"`
	ProviderMetadata map[string]map[string]string                                                                    `json:"providerMetadata"`
	JSON             threadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockTypeToolResult ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType = "tool_result"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock struct {
	ID string `json:"id" api:"required"`
	// JSON-serialized tool input payload. Parse as JSON before reading tool-specific
	// fields.
	Input            string                                                                                       `json:"input" api:"required"`
	Name             shared.ToolName                                                                              `json:"name" api:"required"`
	Type             ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType `json:"type" api:"required"`
	ProviderMetadata map[string]map[string]string                                                                 `json:"providerMetadata"`
	JSON             threadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockTypeToolUse ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType = "tool_use"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock struct {
	// Web search result payload. The runtime returns either an array of web search
	// results or an error object.
	Content   interface{}                                                                                              `json:"content" api:"required"`
	ToolUseID string                                                                                                   `json:"toolUseId" api:"required"`
	Type      ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType `json:"type" api:"required"`
	JSON      threadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock) UnmarshalJSON

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType

type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockTypeWebSearchToolResult ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType = "web_search_tool_result"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageContentType

type ThreadStreamEventThreadStreamContentMessageMessageContentType string
const (
	ThreadStreamEventThreadStreamContentMessageMessageContentTypeText                ThreadStreamEventThreadStreamContentMessageMessageContentType = "text"
	ThreadStreamEventThreadStreamContentMessageMessageContentTypeToolUse             ThreadStreamEventThreadStreamContentMessageMessageContentType = "tool_use"
	ThreadStreamEventThreadStreamContentMessageMessageContentTypeToolResult          ThreadStreamEventThreadStreamContentMessageMessageContentType = "tool_result"
	ThreadStreamEventThreadStreamContentMessageMessageContentTypeServerToolUse       ThreadStreamEventThreadStreamContentMessageMessageContentType = "server_tool_use"
	ThreadStreamEventThreadStreamContentMessageMessageContentTypeWebSearchToolResult ThreadStreamEventThreadStreamContentMessageMessageContentType = "web_search_tool_result"
)

func (ThreadStreamEventThreadStreamContentMessageMessageContentType) IsKnown

type ThreadStreamEventThreadStreamContentMessageMessageRole

type ThreadStreamEventThreadStreamContentMessageMessageRole string
const (
	ThreadStreamEventThreadStreamContentMessageMessageRoleUser      ThreadStreamEventThreadStreamContentMessageMessageRole = "user"
	ThreadStreamEventThreadStreamContentMessageMessageRoleAssistant ThreadStreamEventThreadStreamContentMessageMessageRole = "assistant"
)

func (ThreadStreamEventThreadStreamContentMessageMessageRole) IsKnown

type ThreadStreamEventThreadStreamContentMessageType

type ThreadStreamEventThreadStreamContentMessageType string
const (
	ThreadStreamEventThreadStreamContentMessageTypeMessage ThreadStreamEventThreadStreamContentMessageType = "message"
)

func (ThreadStreamEventThreadStreamContentMessageType) IsKnown

type ThreadStreamEventThreadStreamItemCompletedMessage

type ThreadStreamEventThreadStreamItemCompletedMessage struct {
	DurationMs        float64                                                   `json:"durationMs" api:"required"`
	EventSeq          float64                                                   `json:"eventSeq" api:"required"`
	ItemID            string                                                    `json:"itemId" api:"required"`
	ItemType          ThreadStreamEventThreadStreamItemCompletedMessageItemType `json:"itemType" api:"required"`
	TurnID            string                                                    `json:"turnId" api:"required"`
	Type              ThreadStreamEventThreadStreamItemCompletedMessageType     `json:"type" api:"required"`
	IsError           bool                                                      `json:"isError"`
	RequestedToolName string                                                    `json:"requestedToolName"`
	JSON              threadStreamEventThreadStreamItemCompletedMessageJSON     `json:"-"`
}

func (*ThreadStreamEventThreadStreamItemCompletedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamItemCompletedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamItemCompletedMessageItemType

type ThreadStreamEventThreadStreamItemCompletedMessageItemType string
const (
	ThreadStreamEventThreadStreamItemCompletedMessageItemTypeToolCall     ThreadStreamEventThreadStreamItemCompletedMessageItemType = "tool_call"
	ThreadStreamEventThreadStreamItemCompletedMessageItemTypeAgentMessage ThreadStreamEventThreadStreamItemCompletedMessageItemType = "agent_message"
	ThreadStreamEventThreadStreamItemCompletedMessageItemTypeLlmCall      ThreadStreamEventThreadStreamItemCompletedMessageItemType = "llm_call"
	ThreadStreamEventThreadStreamItemCompletedMessageItemTypeSubThread    ThreadStreamEventThreadStreamItemCompletedMessageItemType = "sub_thread"
)

func (ThreadStreamEventThreadStreamItemCompletedMessageItemType) IsKnown

type ThreadStreamEventThreadStreamItemCompletedMessageType

type ThreadStreamEventThreadStreamItemCompletedMessageType string
const (
	ThreadStreamEventThreadStreamItemCompletedMessageTypeItemCompleted ThreadStreamEventThreadStreamItemCompletedMessageType = "item/completed"
)

func (ThreadStreamEventThreadStreamItemCompletedMessageType) IsKnown

type ThreadStreamEventThreadStreamItemStartedMessage

type ThreadStreamEventThreadStreamItemStartedMessage struct {
	EventSeq          float64                                                 `json:"eventSeq" api:"required"`
	ItemID            string                                                  `json:"itemId" api:"required"`
	ItemType          ThreadStreamEventThreadStreamItemStartedMessageItemType `json:"itemType" api:"required"`
	TurnID            string                                                  `json:"turnId" api:"required"`
	Type              ThreadStreamEventThreadStreamItemStartedMessageType     `json:"type" api:"required"`
	RequestedToolName string                                                  `json:"requestedToolName"`
	SubThreadID       string                                                  `json:"subThreadId"`
	ToolName          shared.ToolName                                         `json:"toolName"`
	JSON              threadStreamEventThreadStreamItemStartedMessageJSON     `json:"-"`
}

func (*ThreadStreamEventThreadStreamItemStartedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamItemStartedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamItemStartedMessageItemType

type ThreadStreamEventThreadStreamItemStartedMessageItemType string
const (
	ThreadStreamEventThreadStreamItemStartedMessageItemTypeToolCall     ThreadStreamEventThreadStreamItemStartedMessageItemType = "tool_call"
	ThreadStreamEventThreadStreamItemStartedMessageItemTypeAgentMessage ThreadStreamEventThreadStreamItemStartedMessageItemType = "agent_message"
	ThreadStreamEventThreadStreamItemStartedMessageItemTypeLlmCall      ThreadStreamEventThreadStreamItemStartedMessageItemType = "llm_call"
	ThreadStreamEventThreadStreamItemStartedMessageItemTypeSubThread    ThreadStreamEventThreadStreamItemStartedMessageItemType = "sub_thread"
)

func (ThreadStreamEventThreadStreamItemStartedMessageItemType) IsKnown

type ThreadStreamEventThreadStreamItemStartedMessageType

type ThreadStreamEventThreadStreamItemStartedMessageType string
const (
	ThreadStreamEventThreadStreamItemStartedMessageTypeItemStarted ThreadStreamEventThreadStreamItemStartedMessageType = "item/started"
)

func (ThreadStreamEventThreadStreamItemStartedMessageType) IsKnown

type ThreadStreamEventThreadStreamProgressMessage

type ThreadStreamEventThreadStreamProgressMessage struct {
	EventSeq     float64                                          `json:"eventSeq" api:"required"`
	MessageCount float64                                          `json:"messageCount" api:"required"`
	StepCount    float64                                          `json:"stepCount" api:"required"`
	StepSeq      float64                                          `json:"stepSeq" api:"required"`
	TurnID       string                                           `json:"turnId" api:"required"`
	Type         ThreadStreamEventThreadStreamProgressMessageType `json:"type" api:"required"`
	JSON         threadStreamEventThreadStreamProgressMessageJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamProgressMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamProgressMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamProgressMessageType

type ThreadStreamEventThreadStreamProgressMessageType string
const (
	ThreadStreamEventThreadStreamProgressMessageTypeProgress ThreadStreamEventThreadStreamProgressMessageType = "progress"
)

func (ThreadStreamEventThreadStreamProgressMessageType) IsKnown

type ThreadStreamEventThreadStreamStatusMessage

type ThreadStreamEventThreadStreamStatusMessage struct {
	Error    string  `json:"error" api:"required,nullable"`
	EventSeq float64 `json:"eventSeq" api:"required"`
	Result   string  `json:"result" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status  Status                                         `json:"status" api:"required"`
	StepSeq float64                                        `json:"stepSeq" api:"required"`
	TurnID  string                                         `json:"turnId" api:"required"`
	Type    ThreadStreamEventThreadStreamStatusMessageType `json:"type" api:"required"`
	JSON    threadStreamEventThreadStreamStatusMessageJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamStatusMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamStatusMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamStatusMessageType

type ThreadStreamEventThreadStreamStatusMessageType string
const (
	ThreadStreamEventThreadStreamStatusMessageTypeStatus ThreadStreamEventThreadStreamStatusMessageType = "status"
)

func (ThreadStreamEventThreadStreamStatusMessageType) IsKnown

type ThreadStreamEventThreadStreamTokenUsageMessage

type ThreadStreamEventThreadStreamTokenUsageMessage struct {
	CumulativeInputTokens  float64                                            `json:"cumulativeInputTokens" api:"required"`
	CumulativeOutputTokens float64                                            `json:"cumulativeOutputTokens" api:"required"`
	EventSeq               float64                                            `json:"eventSeq" api:"required"`
	InputTokens            float64                                            `json:"inputTokens" api:"required"`
	OutputTokens           float64                                            `json:"outputTokens" api:"required"`
	TurnID                 string                                             `json:"turnId" api:"required"`
	Type                   ThreadStreamEventThreadStreamTokenUsageMessageType `json:"type" api:"required"`
	JSON                   threadStreamEventThreadStreamTokenUsageMessageJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamTokenUsageMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamTokenUsageMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamTokenUsageMessageType

type ThreadStreamEventThreadStreamTokenUsageMessageType string
const (
	ThreadStreamEventThreadStreamTokenUsageMessageTypeTokenUsage ThreadStreamEventThreadStreamTokenUsageMessageType = "token_usage"
)

func (ThreadStreamEventThreadStreamTokenUsageMessageType) IsKnown

type ThreadStreamEventThreadStreamTurnCompletedMessage

type ThreadStreamEventThreadStreamTurnCompletedMessage struct {
	Error    string                                                  `json:"error" api:"required,nullable"`
	EventSeq float64                                                 `json:"eventSeq" api:"required"`
	Result   string                                                  `json:"result" api:"required,nullable"`
	Status   ThreadStreamEventThreadStreamTurnCompletedMessageStatus `json:"status" api:"required"`
	TurnID   string                                                  `json:"turnId" api:"required"`
	TurnSeq  float64                                                 `json:"turnSeq" api:"required"`
	Type     ThreadStreamEventThreadStreamTurnCompletedMessageType   `json:"type" api:"required"`
	JSON     threadStreamEventThreadStreamTurnCompletedMessageJSON   `json:"-"`
}

func (*ThreadStreamEventThreadStreamTurnCompletedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamTurnCompletedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamTurnCompletedMessageStatus

type ThreadStreamEventThreadStreamTurnCompletedMessageStatus string
const (
	ThreadStreamEventThreadStreamTurnCompletedMessageStatusCompleted ThreadStreamEventThreadStreamTurnCompletedMessageStatus = "completed"
	ThreadStreamEventThreadStreamTurnCompletedMessageStatusFailed    ThreadStreamEventThreadStreamTurnCompletedMessageStatus = "failed"
)

func (ThreadStreamEventThreadStreamTurnCompletedMessageStatus) IsKnown

type ThreadStreamEventThreadStreamTurnCompletedMessageType

type ThreadStreamEventThreadStreamTurnCompletedMessageType string
const (
	ThreadStreamEventThreadStreamTurnCompletedMessageTypeTurnCompleted ThreadStreamEventThreadStreamTurnCompletedMessageType = "turn/completed"
)

func (ThreadStreamEventThreadStreamTurnCompletedMessageType) IsKnown

type ThreadStreamEventThreadStreamTurnStartedMessage

type ThreadStreamEventThreadStreamTurnStartedMessage struct {
	EventSeq float64                                             `json:"eventSeq" api:"required"`
	TurnID   string                                              `json:"turnId" api:"required"`
	TurnSeq  float64                                             `json:"turnSeq" api:"required"`
	Type     ThreadStreamEventThreadStreamTurnStartedMessageType `json:"type" api:"required"`
	JSON     threadStreamEventThreadStreamTurnStartedMessageJSON `json:"-"`
}

func (*ThreadStreamEventThreadStreamTurnStartedMessage) UnmarshalJSON

func (r *ThreadStreamEventThreadStreamTurnStartedMessage) UnmarshalJSON(data []byte) (err error)

type ThreadStreamEventThreadStreamTurnStartedMessageType

type ThreadStreamEventThreadStreamTurnStartedMessageType string
const (
	ThreadStreamEventThreadStreamTurnStartedMessageTypeTurnStarted ThreadStreamEventThreadStreamTurnStartedMessageType = "turn/started"
)

func (ThreadStreamEventThreadStreamTurnStartedMessageType) IsKnown

type ThreadStreamEventType

type ThreadStreamEventType string
const (
	ThreadStreamEventTypeStatus            ThreadStreamEventType = "status"
	ThreadStreamEventTypeMessage           ThreadStreamEventType = "message"
	ThreadStreamEventTypeProgress          ThreadStreamEventType = "progress"
	ThreadStreamEventTypeTurnStarted       ThreadStreamEventType = "turn/started"
	ThreadStreamEventTypeTurnCompleted     ThreadStreamEventType = "turn/completed"
	ThreadStreamEventTypeItemStarted       ThreadStreamEventType = "item/started"
	ThreadStreamEventTypeItemCompleted     ThreadStreamEventType = "item/completed"
	ThreadStreamEventTypeTokenUsage        ThreadStreamEventType = "token_usage"
	ThreadStreamEventTypeApprovalRequested ThreadStreamEventType = "approval/requested"
	ThreadStreamEventTypeApprovalResolved  ThreadStreamEventType = "approval/resolved"
)

func (ThreadStreamEventType) IsKnown

func (r ThreadStreamEventType) IsKnown() bool

type ThreadSummary

type ThreadSummary struct {
	ID             string  `json:"id" api:"required"`
	CompletedAt    string  `json:"completedAt" api:"required,nullable"`
	CreatedAt      string  `json:"createdAt" api:"required"`
	MessageCount   float64 `json:"messageCount" api:"required"`
	Model          string  `json:"model" api:"required"`
	ParentThreadID string  `json:"parentThreadId" api:"required,nullable"`
	Result         string  `json:"result" api:"required,nullable"`
	ScheduleID     string  `json:"scheduleId" api:"required,nullable"`
	ScheduleSeq    float64 `json:"scheduleSeq" api:"required,nullable"`
	// `idle` threads can accept a new turn or be closed. `running` threads have an
	// active turn. `awaiting` threads are paused on external input such as approvals.
	// `closed` threads are terminal.
	Status    Status            `json:"status" api:"required"`
	StepCount float64           `json:"stepCount" api:"required"`
	JSON      threadSummaryJSON `json:"-"`
}

func (*ThreadSummary) UnmarshalJSON

func (r *ThreadSummary) UnmarshalJSON(data []byte) (err error)

type ThreadTurnSummary added in v0.2.0

type ThreadTurnSummary struct {
	Activity     string                  `json:"activity" api:"required,nullable"`
	CompletedAt  string                  `json:"completedAt" api:"required"`
	MessageCount float64                 `json:"messageCount" api:"required"`
	NextStep     string                  `json:"nextStep" api:"required,nullable"`
	Status       ThreadTurnSummaryStatus `json:"status" api:"required"`
	TurnSeq      float64                 `json:"turnSeq" api:"required"`
	JSON         threadTurnSummaryJSON   `json:"-"`
}

func (*ThreadTurnSummary) UnmarshalJSON added in v0.2.0

func (r *ThreadTurnSummary) UnmarshalJSON(data []byte) (err error)

type ThreadTurnSummaryStatus added in v0.2.0

type ThreadTurnSummaryStatus string
const (
	ThreadTurnSummaryStatusCompleted ThreadTurnSummaryStatus = "completed"
	ThreadTurnSummaryStatusFailed    ThreadTurnSummaryStatus = "failed"
)

func (ThreadTurnSummaryStatus) IsKnown added in v0.2.0

func (r ThreadTurnSummaryStatus) IsKnown() bool

type TokenUsage

type TokenUsage struct {
	InputTokens  float64        `json:"inputTokens" api:"required"`
	OutputTokens float64        `json:"outputTokens" api:"required"`
	JSON         tokenUsageJSON `json:"-"`
}

func (*TokenUsage) UnmarshalJSON

func (r *TokenUsage) UnmarshalJSON(data []byte) (err error)

type Tool

type Tool struct {
	Category    ToolCategory `json:"category" api:"required"`
	Description string       `json:"description" api:"required"`
	// This field can have the runtime type of [map[string]interface{}].
	InputSchema        interface{}            `json:"inputSchema" api:"required"`
	Name               shared.ToolName        `json:"name" api:"required"`
	AccountLabel       string                 `json:"accountLabel"`
	Approval           ToolApproval           `json:"approval"`
	ApprovalSource     ToolApprovalSource     `json:"approvalSource"`
	ConnectionID       string                 `json:"connectionId"`
	ConnectionMetadata ToolConnectionMetadata `json:"connectionMetadata"`
	Origin             ToolOrigin             `json:"origin"`
	RequiresApproval   bool                   `json:"requiresApproval"`
	Source             string                 `json:"source"`
	SourceID           string                 `json:"sourceId"`
	SourceVersion      float64                `json:"sourceVersion"`
	JSON               toolJSON               `json:"-"`
	// contains filtered or unexported fields
}

A unified available tool entry. Runtime tools include requiresApproval; external tools include approval.

func (Tool) AsUnion

func (r Tool) AsUnion() ToolUnion

AsUnion returns a ToolUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ToolDescriptor, DiscoveredTool.

func (*Tool) UnmarshalJSON

func (r *Tool) UnmarshalJSON(data []byte) (err error)

type ToolApproval

type ToolApproval string
const (
	ToolApprovalAlways ToolApproval = "always"
	ToolApprovalNever  ToolApproval = "never"
)

func (ToolApproval) IsKnown

func (r ToolApproval) IsKnown() bool

type ToolApprovalMode

type ToolApprovalMode string
const (
	ToolApprovalModeAlways ToolApprovalMode = "always"
	ToolApprovalModeNever  ToolApprovalMode = "never"
)

func (ToolApprovalMode) IsKnown

func (r ToolApprovalMode) IsKnown() bool

type ToolApprovalSource

type ToolApprovalSource string
const (
	ToolApprovalSourceAgent   ToolApprovalSource = "agent"
	ToolApprovalSourceEnv     ToolApprovalSource = "env"
	ToolApprovalSourceCatalog ToolApprovalSource = "catalog"
)

func (ToolApprovalSource) IsKnown

func (r ToolApprovalSource) IsKnown() bool

type ToolCategory

type ToolCategory string
const (
	ToolCategoryBuiltIn      ToolCategory = "builtIn"
	ToolCategoryConfigurable ToolCategory = "configurable"
	ToolCategoryExternal     ToolCategory = "external"
)

func (ToolCategory) IsKnown

func (r ToolCategory) IsKnown() bool

type ToolConnectionMetadata

type ToolConnectionMetadata map[string]string

type ToolConnectionMetadataParam

type ToolConnectionMetadataParam map[string]string

type ToolDescriptor

type ToolDescriptor struct {
	ApprovalSource ToolDescriptorApprovalSource `json:"approvalSource" api:"required"`
	Category       ToolDescriptorCategory       `json:"category" api:"required"`
	Description    string                       `json:"description" api:"required"`
	// JSON Schema object describing tool input parameters.
	InputSchema      map[string]interface{} `json:"inputSchema" api:"required"`
	Name             shared.ToolName        `json:"name" api:"required"`
	RequiresApproval bool                   `json:"requiresApproval" api:"required"`
	JSON             toolDescriptorJSON     `json:"-"`
}

A built-in or configurable runtime tool currently available to the agent.

func (*ToolDescriptor) UnmarshalJSON

func (r *ToolDescriptor) UnmarshalJSON(data []byte) (err error)

type ToolDescriptorApprovalSource

type ToolDescriptorApprovalSource string
const (
	ToolDescriptorApprovalSourceAgent   ToolDescriptorApprovalSource = "agent"
	ToolDescriptorApprovalSourceEnv     ToolDescriptorApprovalSource = "env"
	ToolDescriptorApprovalSourceCatalog ToolDescriptorApprovalSource = "catalog"
)

func (ToolDescriptorApprovalSource) IsKnown

func (r ToolDescriptorApprovalSource) IsKnown() bool

type ToolDescriptorCategory

type ToolDescriptorCategory string
const (
	ToolDescriptorCategoryBuiltIn      ToolDescriptorCategory = "builtIn"
	ToolDescriptorCategoryConfigurable ToolDescriptorCategory = "configurable"
)

func (ToolDescriptorCategory) IsKnown

func (r ToolDescriptorCategory) IsKnown() bool

type ToolListParams

type ToolListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (ToolListParams) URLQuery

func (r ToolListParams) URLQuery() (v url.Values)

URLQuery serializes ToolListParams's query parameters as `url.Values`.

type ToolName

type ToolName = shared.ToolName

This is an alias to an internal type.

type ToolNewParams

type ToolNewParams struct {
	Body ToolNewParamsBodyUnion `json:"body" api:"required"`
}

func (ToolNewParams) MarshalJSON

func (r ToolNewParams) MarshalJSON() (data []byte, err error)

type ToolNewParamsBody

type ToolNewParamsBody struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam] `json:"auth" api:"required"`
	Namespace param.Field[string]                   `json:"namespace" api:"required"`
	Type      param.Field[ToolNewParamsBodyType]    `json:"type" api:"required"`
	Approval  param.Field[ToolApprovalMode]         `json:"approval"`
	Enabled   param.Field[bool]                     `json:"enabled"`
	Execution param.Field[interface{}]              `json:"execution"`
	Tools     param.Field[interface{}]              `json:"tools"`
	URL       param.Field[string]                   `json:"url"`
}

func (ToolNewParamsBody) MarshalJSON

func (r ToolNewParamsBody) MarshalJSON() (data []byte, err error)

type ToolNewParamsBodyCreateHTTPToolSourceRequest

type ToolNewParamsBodyCreateHTTPToolSourceRequest struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam]                         `json:"auth" api:"required"`
	Namespace param.Field[string]                                           `json:"namespace" api:"required"`
	Tools     param.Field[[]HTTPToolDefinitionParam]                        `json:"tools" api:"required"`
	Type      param.Field[ToolNewParamsBodyCreateHTTPToolSourceRequestType] `json:"type" api:"required"`
	Approval  param.Field[ToolApprovalMode]                                 `json:"approval"`
	Enabled   param.Field[bool]                                             `json:"enabled"`
	// HTTP tool execution retry and timeout policy.
	Execution   param.Field[HTTPToolExecutionPolicyParam] `json:"execution"`
	ExtraFields map[string]interface{}                    `json:"-,extras"`
}

func (ToolNewParamsBodyCreateHTTPToolSourceRequest) MarshalJSON

func (r ToolNewParamsBodyCreateHTTPToolSourceRequest) MarshalJSON() (data []byte, err error)

type ToolNewParamsBodyCreateHTTPToolSourceRequestType

type ToolNewParamsBodyCreateHTTPToolSourceRequestType string
const (
	ToolNewParamsBodyCreateHTTPToolSourceRequestTypeHTTP ToolNewParamsBodyCreateHTTPToolSourceRequestType = "http"
)

func (ToolNewParamsBodyCreateHTTPToolSourceRequestType) IsKnown

type ToolNewParamsBodyCreateMcpToolSourceRequest

type ToolNewParamsBodyCreateMcpToolSourceRequest struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam]                        `json:"auth" api:"required"`
	Namespace param.Field[string]                                          `json:"namespace" api:"required"`
	Type      param.Field[ToolNewParamsBodyCreateMcpToolSourceRequestType] `json:"type" api:"required"`
	URL       param.Field[string]                                          `json:"url" api:"required"`
	Approval  param.Field[ToolApprovalMode]                                `json:"approval"`
	Enabled   param.Field[bool]                                            `json:"enabled"`
	// MCP discovery and execution retry/timeout policy.
	Execution   param.Field[McpToolExecutionPolicyParam] `json:"execution"`
	ExtraFields map[string]interface{}                   `json:"-,extras"`
}

func (ToolNewParamsBodyCreateMcpToolSourceRequest) MarshalJSON

func (r ToolNewParamsBodyCreateMcpToolSourceRequest) MarshalJSON() (data []byte, err error)

type ToolNewParamsBodyCreateMcpToolSourceRequestType

type ToolNewParamsBodyCreateMcpToolSourceRequestType string
const (
	ToolNewParamsBodyCreateMcpToolSourceRequestTypeMcp ToolNewParamsBodyCreateMcpToolSourceRequestType = "mcp"
)

func (ToolNewParamsBodyCreateMcpToolSourceRequestType) IsKnown

type ToolNewParamsBodyType

type ToolNewParamsBodyType string
const (
	ToolNewParamsBodyTypeHTTP ToolNewParamsBodyType = "http"
	ToolNewParamsBodyTypeMcp  ToolNewParamsBodyType = "mcp"
)

func (ToolNewParamsBodyType) IsKnown

func (r ToolNewParamsBodyType) IsKnown() bool

type ToolNewParamsBodyUnion

type ToolNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by ToolNewParamsBodyCreateHTTPToolSourceRequest, ToolNewParamsBodyCreateMcpToolSourceRequest, ToolNewParamsBody.

type ToolOrigin

type ToolOrigin string
const (
	ToolOriginBuiltin    ToolOrigin = "builtin"
	ToolOriginToolSource ToolOrigin = "tool_source"
)

func (ToolOrigin) IsKnown

func (r ToolOrigin) IsKnown() bool

type ToolService

type ToolService struct {
	Options []option.RequestOption
}

ToolService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToolService method instead.

func NewToolService

func NewToolService(opts ...option.RequestOption) (r *ToolService)

NewToolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ToolService) Delete

func (r *ToolService) Delete(ctx context.Context, fleetID string, sourceID string, opts ...option.RequestOption) (err error)

Delete tool source

func (*ToolService) Get

func (r *ToolService) Get(ctx context.Context, fleetID string, sourceID string, opts ...option.RequestOption) (res *ToolSource, err error)

Retrieve tool source

func (*ToolService) List

List tools

func (*ToolService) ListAutoPaging

List tools

func (*ToolService) New

func (r *ToolService) New(ctx context.Context, fleetID string, body ToolNewParams, opts ...option.RequestOption) (res *ToolSource, err error)

Create tool

func (*ToolService) Update

func (r *ToolService) Update(ctx context.Context, fleetID string, sourceID string, body ToolUpdateParams, opts ...option.RequestOption) (res *ToolSource, err error)

Update tool source

type ToolSource

type ToolSource struct {
	ID string `json:"id" api:"required"`
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      ToolSourceAuth   `json:"auth" api:"required"`
	CreatedAt string           `json:"createdAt" api:"required"`
	Enabled   bool             `json:"enabled" api:"required"`
	FleetID   string           `json:"fleetId" api:"required"`
	Namespace string           `json:"namespace" api:"required"`
	Type      ToolSourceType   `json:"type" api:"required"`
	UpdatedAt string           `json:"updatedAt" api:"required"`
	Version   float64          `json:"version" api:"required"`
	Approval  ToolApprovalMode `json:"approval"`
	// This field can have the runtime type of [HTTPToolExecutionPolicy],
	// [McpToolExecutionPolicy].
	Execution interface{} `json:"execution"`
	// This field can have the runtime type of [[]HTTPToolDefinition].
	Tools interface{}    `json:"tools"`
	URL   string         `json:"url"`
	JSON  toolSourceJSON `json:"-"`
	// contains filtered or unexported fields
}

func (ToolSource) AsUnion

func (r ToolSource) AsUnion() ToolSourceUnion

AsUnion returns a ToolSourceUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are HTTPToolSource, McpToolSource.

func (*ToolSource) UnmarshalJSON

func (r *ToolSource) UnmarshalJSON(data []byte) (err error)

type ToolSourceAuth

type ToolSourceAuth struct {
	Kind         ToolSourceAuthKind `json:"kind" api:"required"`
	ConnectionID string             `json:"connectionId"`
	// Source-owned OAuth exchange configuration. Public schemas use connection IDs for
	// stored client secrets and assertions.
	Exchange OAuthExchangeConfig `json:"exchange"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject   AuthInjection `json:"inject"`
	Provider string        `json:"provider"`
	// This field can have the runtime type of [[]string].
	RequiredScopes interface{}        `json:"requiredScopes"`
	JSON           toolSourceAuthJSON `json:"-"`
	// contains filtered or unexported fields
}

Tool source authentication configuration. The `kind` field selects one of `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.

func (ToolSourceAuth) AsUnion

func (r ToolSourceAuth) AsUnion() ToolSourceAuthUnion

AsUnion returns a ToolSourceAuthUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are NoToolSourceAuth, APIKeyToolSourceAuth, OAuthExchangeToolSourceAuth, OAuthConnectionToolSourceAuth.

func (*ToolSourceAuth) UnmarshalJSON

func (r *ToolSourceAuth) UnmarshalJSON(data []byte) (err error)

type ToolSourceAuthKind

type ToolSourceAuthKind string
const (
	ToolSourceAuthKindNone            ToolSourceAuthKind = "none"
	ToolSourceAuthKindAPIKey          ToolSourceAuthKind = "api_key"
	ToolSourceAuthKindOAuthExchange   ToolSourceAuthKind = "oauth_exchange"
	ToolSourceAuthKindOAuthConnection ToolSourceAuthKind = "oauth_connection"
)

func (ToolSourceAuthKind) IsKnown

func (r ToolSourceAuthKind) IsKnown() bool

type ToolSourceAuthParam

type ToolSourceAuthParam struct {
	Kind         param.Field[ToolSourceAuthKind] `json:"kind" api:"required"`
	ConnectionID param.Field[string]             `json:"connectionId"`
	// Source-owned OAuth exchange configuration. Public schemas use connection IDs for
	// stored client secrets and assertions.
	Exchange param.Field[OAuthExchangeConfigUnionParam] `json:"exchange"`
	// Where an API key or OAuth access token should be injected into outgoing
	// tool-source requests.
	Inject         param.Field[AuthInjectionUnionParam] `json:"inject"`
	Provider       param.Field[string]                  `json:"provider"`
	RequiredScopes param.Field[interface{}]             `json:"requiredScopes"`
}

Tool source authentication configuration. The `kind` field selects one of `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.

func (ToolSourceAuthParam) MarshalJSON

func (r ToolSourceAuthParam) MarshalJSON() (data []byte, err error)

type ToolSourceAuthUnion

type ToolSourceAuthUnion interface {
	// contains filtered or unexported methods
}

Tool source authentication configuration. The `kind` field selects one of `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.

Union satisfied by NoToolSourceAuth, APIKeyToolSourceAuth, OAuthExchangeToolSourceAuth or OAuthConnectionToolSourceAuth.

type ToolSourceAuthUnionParam

type ToolSourceAuthUnionParam interface {
	// contains filtered or unexported methods
}

Tool source authentication configuration. The `kind` field selects one of `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.

Satisfied by NoToolSourceAuthParam, APIKeyToolSourceAuthParam, OAuthExchangeToolSourceAuthParam, OAuthConnectionToolSourceAuthParam, ToolSourceAuthParam.

type ToolSourceType

type ToolSourceType string
const (
	ToolSourceTypeHTTP ToolSourceType = "http"
	ToolSourceTypeMcp  ToolSourceType = "mcp"
)

func (ToolSourceType) IsKnown

func (r ToolSourceType) IsKnown() bool

type ToolSourceUnion

type ToolSourceUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by HTTPToolSource or McpToolSource.

type ToolSpec

type ToolSpec = shared.ToolSpec

Configurable runtime tool name, configurable namespace wildcard such as sandbox._, or external namespace wildcard such as google._. At thread and turn scope, entries can only narrow the agent's effective tools.

This is an alias to an internal type.

type ToolSpecParam

type ToolSpecParam = shared.ToolSpecParam

Configurable runtime tool name, configurable namespace wildcard such as sandbox._, or external namespace wildcard such as google._. At thread and turn scope, entries can only narrow the agent's effective tools.

This is an alias to an internal type.

type ToolUnion

type ToolUnion interface {
	// contains filtered or unexported methods
}

A unified available tool entry. Runtime tools include requiresApproval; external tools include approval.

Union satisfied by ToolDescriptor or DiscoveredTool.

type ToolUpdateParams

type ToolUpdateParams struct {
	Body ToolUpdateParamsBodyUnion `json:"body" api:"required"`
}

func (ToolUpdateParams) MarshalJSON

func (r ToolUpdateParams) MarshalJSON() (data []byte, err error)

type ToolUpdateParamsBody

type ToolUpdateParamsBody struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam] `json:"auth" api:"required"`
	Namespace param.Field[string]                   `json:"namespace" api:"required"`
	Type      param.Field[ToolUpdateParamsBodyType] `json:"type" api:"required"`
	Approval  param.Field[ToolApprovalMode]         `json:"approval"`
	Enabled   param.Field[bool]                     `json:"enabled"`
	Execution param.Field[interface{}]              `json:"execution"`
	Tools     param.Field[interface{}]              `json:"tools"`
	URL       param.Field[string]                   `json:"url"`
}

func (ToolUpdateParamsBody) MarshalJSON

func (r ToolUpdateParamsBody) MarshalJSON() (data []byte, err error)

type ToolUpdateParamsBodyType

type ToolUpdateParamsBodyType string
const (
	ToolUpdateParamsBodyTypeHTTP ToolUpdateParamsBodyType = "http"
	ToolUpdateParamsBodyTypeMcp  ToolUpdateParamsBodyType = "mcp"
)

func (ToolUpdateParamsBodyType) IsKnown

func (r ToolUpdateParamsBodyType) IsKnown() bool

type ToolUpdateParamsBodyUnion

type ToolUpdateParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by ToolUpdateParamsBodyUpdateHTTPToolSourceRequest, ToolUpdateParamsBodyUpdateMcpToolSourceRequest, ToolUpdateParamsBody.

type ToolUpdateParamsBodyUpdateHTTPToolSourceRequest

type ToolUpdateParamsBodyUpdateHTTPToolSourceRequest struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam]                            `json:"auth" api:"required"`
	Namespace param.Field[string]                                              `json:"namespace" api:"required"`
	Tools     param.Field[[]HTTPToolDefinitionParam]                           `json:"tools" api:"required"`
	Type      param.Field[ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType] `json:"type" api:"required"`
	Approval  param.Field[ToolApprovalMode]                                    `json:"approval"`
	Enabled   param.Field[bool]                                                `json:"enabled"`
	// HTTP tool execution retry and timeout policy.
	Execution   param.Field[HTTPToolExecutionPolicyParam] `json:"execution"`
	ExtraFields map[string]interface{}                    `json:"-,extras"`
}

func (ToolUpdateParamsBodyUpdateHTTPToolSourceRequest) MarshalJSON

func (r ToolUpdateParamsBodyUpdateHTTPToolSourceRequest) MarshalJSON() (data []byte, err error)

type ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType

type ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType string
const (
	ToolUpdateParamsBodyUpdateHTTPToolSourceRequestTypeHTTP ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType = "http"
)

func (ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType) IsKnown

type ToolUpdateParamsBodyUpdateMcpToolSourceRequest

type ToolUpdateParamsBodyUpdateMcpToolSourceRequest struct {
	// Tool source authentication configuration. The `kind` field selects one of
	// `none`, `api_key`, `oauth_exchange`, or `oauth_connection`.
	Auth      param.Field[ToolSourceAuthUnionParam]                           `json:"auth" api:"required"`
	Namespace param.Field[string]                                             `json:"namespace" api:"required"`
	Type      param.Field[ToolUpdateParamsBodyUpdateMcpToolSourceRequestType] `json:"type" api:"required"`
	URL       param.Field[string]                                             `json:"url" api:"required"`
	Approval  param.Field[ToolApprovalMode]                                   `json:"approval"`
	Enabled   param.Field[bool]                                               `json:"enabled"`
	// MCP discovery and execution retry/timeout policy.
	Execution   param.Field[McpToolExecutionPolicyParam] `json:"execution"`
	ExtraFields map[string]interface{}                   `json:"-,extras"`
}

func (ToolUpdateParamsBodyUpdateMcpToolSourceRequest) MarshalJSON

func (r ToolUpdateParamsBodyUpdateMcpToolSourceRequest) MarshalJSON() (data []byte, err error)

type ToolUpdateParamsBodyUpdateMcpToolSourceRequestType

type ToolUpdateParamsBodyUpdateMcpToolSourceRequestType string
const (
	ToolUpdateParamsBodyUpdateMcpToolSourceRequestTypeMcp ToolUpdateParamsBodyUpdateMcpToolSourceRequestType = "mcp"
)

func (ToolUpdateParamsBodyUpdateMcpToolSourceRequestType) IsKnown

type Turn

type Turn struct {
	ID              string     `json:"id" api:"required"`
	CompletedAt     string     `json:"completedAt" api:"required,nullable"`
	EndMessageSeq   float64    `json:"endMessageSeq" api:"required,nullable"`
	Error           string     `json:"error" api:"required,nullable"`
	Message         string     `json:"message" api:"required"`
	Result          string     `json:"result" api:"required,nullable"`
	Seq             float64    `json:"seq" api:"required"`
	StartedAt       string     `json:"startedAt" api:"required"`
	StartMessageSeq float64    `json:"startMessageSeq" api:"required"`
	Status          TurnStatus `json:"status" api:"required"`
	ThreadID        string     `json:"threadId" api:"required"`
	TokenUsage      TokenUsage `json:"tokenUsage" api:"required,nullable"`
	JSON            turnJSON   `json:"-"`
}

func (*Turn) UnmarshalJSON

func (r *Turn) UnmarshalJSON(data []byte) (err error)

type TurnStatus

type TurnStatus string
const (
	TurnStatusRunning   TurnStatus = "running"
	TurnStatusCompleted TurnStatus = "completed"
	TurnStatusFailed    TurnStatus = "failed"
)

func (TurnStatus) IsKnown

func (r TurnStatus) IsKnown() bool

type WebhookEventType

type WebhookEventType string
const (
	WebhookEventTypeAgentCreated        WebhookEventType = "agent.created"
	WebhookEventTypeAgentUpdated        WebhookEventType = "agent.updated"
	WebhookEventTypeAgentDeleted        WebhookEventType = "agent.deleted"
	WebhookEventTypeThreadCreated       WebhookEventType = "thread.created"
	WebhookEventTypeThreadStatusChanged WebhookEventType = "thread.status.changed"
	WebhookEventTypeThreadCompleted     WebhookEventType = "thread.completed"
	WebhookEventTypeThreadFailed        WebhookEventType = "thread.failed"
	WebhookEventTypeTurnCreated         WebhookEventType = "turn.created"
	WebhookEventTypeTurnCompleted       WebhookEventType = "turn.completed"
	WebhookEventTypeTurnFailed          WebhookEventType = "turn.failed"
	WebhookEventTypeMessageCreated      WebhookEventType = "message.created"
	WebhookEventTypeApprovalRequested   WebhookEventType = "approval.requested"
	WebhookEventTypeApprovalResolved    WebhookEventType = "approval.resolved"
	WebhookEventTypeApprovalGranted     WebhookEventType = "approval.granted"
	WebhookEventTypeScheduleCreated     WebhookEventType = "schedule.created"
	WebhookEventTypeScheduleDeleted     WebhookEventType = "schedule.deleted"
	WebhookEventTypeScheduleTriggered   WebhookEventType = "schedule.triggered"
	WebhookEventTypeConnectionAttached  WebhookEventType = "connection.attached"
	WebhookEventTypeConnectionDetached  WebhookEventType = "connection.detached"
	WebhookEventTypeWebhookTest         WebhookEventType = "webhook.test"
)

func (WebhookEventType) IsKnown

func (r WebhookEventType) IsKnown() bool

type WebhookListParams

type WebhookListParams struct {
	// Opaque pagination cursor returned by a previous request.
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of items to return. Defaults to 20 and preserves parseInt
	// semantics.
	Limit param.Field[string] `query:"limit"`
}

func (WebhookListParams) URLQuery

func (r WebhookListParams) URLQuery() (v url.Values)

URLQuery serializes WebhookListParams's query parameters as `url.Values`.

type WebhookNewParams

type WebhookNewParams struct {
	// HTTPS endpoint that will receive webhook deliveries.
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Event names to deliver. Omit to subscribe to all non-test events.
	Events param.Field[[]WebhookSubscriptionEventType] `json:"events"`
}

func (WebhookNewParams) MarshalJSON

func (r WebhookNewParams) MarshalJSON() (data []byte, err error)

type WebhookService

type WebhookService struct {
	Options []option.RequestOption
}

WebhookService contains methods and other services that help with interacting with the cerca API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.

func NewWebhookService

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*WebhookService) Delete

func (r *WebhookService) Delete(ctx context.Context, fleetID string, webhookID string, opts ...option.RequestOption) (err error)

Delete webhook

func (*WebhookService) Get

func (r *WebhookService) Get(ctx context.Context, fleetID string, webhookID string, opts ...option.RequestOption) (res *WebhookSubscription, err error)

Retrieve webhook

func (*WebhookService) List

List webhooks

func (*WebhookService) ListAutoPaging

List webhooks

func (*WebhookService) New

Create webhook

func (*WebhookService) Rotate

func (r *WebhookService) Rotate(ctx context.Context, fleetID string, webhookID string, opts ...option.RequestOption) (res *WebhookSubscriptionCreated, err error)

Rotate webhook secret

func (*WebhookService) Test

func (r *WebhookService) Test(ctx context.Context, fleetID string, webhookID string, opts ...option.RequestOption) (res *WebhookTestResponse, err error)

Send test webhook

func (*WebhookService) Update

func (r *WebhookService) Update(ctx context.Context, fleetID string, webhookID string, body WebhookUpdateParams, opts ...option.RequestOption) (res *WebhookSubscription, err error)

Update webhook

type WebhookSubscription

type WebhookSubscription struct {
	ID        string                  `json:"id" api:"required"`
	CreatedAt string                  `json:"createdAt" api:"required"`
	Enabled   bool                    `json:"enabled" api:"required"`
	Events    []WebhookEventType      `json:"events" api:"required"`
	FleetID   string                  `json:"fleetId" api:"required"`
	UpdatedAt string                  `json:"updatedAt" api:"required"`
	URL       string                  `json:"url" api:"required"`
	JSON      webhookSubscriptionJSON `json:"-"`
}

Webhook subscription metadata returned by list, get, and update. The one-time signing secret is not returned here.

func (*WebhookSubscription) UnmarshalJSON

func (r *WebhookSubscription) UnmarshalJSON(data []byte) (err error)

type WebhookSubscriptionCreated

type WebhookSubscriptionCreated struct {
	ID        string             `json:"id" api:"required"`
	CreatedAt string             `json:"createdAt" api:"required"`
	Enabled   bool               `json:"enabled" api:"required"`
	Events    []WebhookEventType `json:"events" api:"required"`
	FleetID   string             `json:"fleetId" api:"required"`
	// One-time webhook signing secret returned only by create and rotate responses.
	// The field name is `secret`.
	Secret    string                         `json:"secret" api:"required"`
	UpdatedAt string                         `json:"updatedAt" api:"required"`
	URL       string                         `json:"url" api:"required"`
	JSON      webhookSubscriptionCreatedJSON `json:"-"`
}

Webhook subscription response for create and rotate. Includes the one-time `secret` field.

func (*WebhookSubscriptionCreated) UnmarshalJSON

func (r *WebhookSubscriptionCreated) UnmarshalJSON(data []byte) (err error)

type WebhookSubscriptionEventType

type WebhookSubscriptionEventType string

`webhook.test` is reserved for the test endpoint and cannot be subscribed to.

const (
	WebhookSubscriptionEventTypeAgentCreated        WebhookSubscriptionEventType = "agent.created"
	WebhookSubscriptionEventTypeAgentUpdated        WebhookSubscriptionEventType = "agent.updated"
	WebhookSubscriptionEventTypeAgentDeleted        WebhookSubscriptionEventType = "agent.deleted"
	WebhookSubscriptionEventTypeThreadCreated       WebhookSubscriptionEventType = "thread.created"
	WebhookSubscriptionEventTypeThreadStatusChanged WebhookSubscriptionEventType = "thread.status.changed"
	WebhookSubscriptionEventTypeThreadCompleted     WebhookSubscriptionEventType = "thread.completed"
	WebhookSubscriptionEventTypeThreadFailed        WebhookSubscriptionEventType = "thread.failed"
	WebhookSubscriptionEventTypeTurnCreated         WebhookSubscriptionEventType = "turn.created"
	WebhookSubscriptionEventTypeTurnCompleted       WebhookSubscriptionEventType = "turn.completed"
	WebhookSubscriptionEventTypeTurnFailed          WebhookSubscriptionEventType = "turn.failed"
	WebhookSubscriptionEventTypeMessageCreated      WebhookSubscriptionEventType = "message.created"
	WebhookSubscriptionEventTypeApprovalRequested   WebhookSubscriptionEventType = "approval.requested"
	WebhookSubscriptionEventTypeApprovalResolved    WebhookSubscriptionEventType = "approval.resolved"
	WebhookSubscriptionEventTypeApprovalGranted     WebhookSubscriptionEventType = "approval.granted"
	WebhookSubscriptionEventTypeScheduleCreated     WebhookSubscriptionEventType = "schedule.created"
	WebhookSubscriptionEventTypeScheduleDeleted     WebhookSubscriptionEventType = "schedule.deleted"
	WebhookSubscriptionEventTypeScheduleTriggered   WebhookSubscriptionEventType = "schedule.triggered"
	WebhookSubscriptionEventTypeConnectionAttached  WebhookSubscriptionEventType = "connection.attached"
	WebhookSubscriptionEventTypeConnectionDetached  WebhookSubscriptionEventType = "connection.detached"
)

func (WebhookSubscriptionEventType) IsKnown

func (r WebhookSubscriptionEventType) IsKnown() bool

type WebhookTestResponse

type WebhookTestResponse struct {
	Error      string                  `json:"error" api:"required,nullable"`
	StatusCode int64                   `json:"statusCode" api:"required,nullable"`
	Success    bool                    `json:"success" api:"required"`
	JSON       webhookTestResponseJSON `json:"-"`
}

func (*WebhookTestResponse) UnmarshalJSON

func (r *WebhookTestResponse) UnmarshalJSON(data []byte) (err error)

type WebhookUpdateParams

type WebhookUpdateParams struct {
	// Whether deliveries are enabled for this subscription.
	Enabled param.Field[bool] `json:"enabled"`
	// Event names to deliver. Omit to subscribe to all non-test events.
	Events param.Field[[]WebhookSubscriptionEventType] `json:"events"`
	// HTTPS endpoint that will receive webhook deliveries.
	URL param.Field[string] `json:"url" format:"uri"`
}

func (WebhookUpdateParams) MarshalJSON

func (r WebhookUpdateParams) MarshalJSON() (data []byte, err error)

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

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