Documentation
¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type APIKeyToolSourceAuth
- type APIKeyToolSourceAuthKind
- type APIKeyToolSourceAuthParam
- type ActivityDetail
- type ActivitySummary
- type Agent
- type AgentDeleteResponse
- type AgentDeleteResponseSuccess
- type AgentListParams
- type AgentListParamsActive
- type AgentListToolsResponse
- type AgentNewParams
- type AgentService
- func (r *AgentService) Delete(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentDeleteResponse, err error)
- func (r *AgentService) Get(ctx context.Context, agentID string, opts ...option.RequestOption) (res *Agent, err error)
- func (r *AgentService) GetConfig(ctx context.Context, agentID string, opts ...option.RequestOption) (res *EffectiveConfiguration, err error)
- func (r *AgentService) List(ctx context.Context, query AgentListParams, opts ...option.RequestOption) (res *pagination.AgentsCursorPage[AgentSummary], err error)
- func (r *AgentService) ListAutoPaging(ctx context.Context, query AgentListParams, opts ...option.RequestOption) *pagination.AgentsCursorPageAutoPager[AgentSummary]
- func (r *AgentService) ListTools(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentListToolsResponse, err error)
- func (r *AgentService) New(ctx context.Context, body AgentNewParams, opts ...option.RequestOption) (res *Agent, err error)
- func (r *AgentService) Update(ctx context.Context, agentID string, body AgentUpdateParams, ...) (res *Agent, err error)
- func (r *AgentService) UpdateMetadata(ctx context.Context, agentID string, body AgentUpdateMetadataParams, ...) (res *Agent, err error)
- type AgentSummary
- type AgentUpdateMetadataParams
- type AgentUpdateParams
- type ApprovalGrant
- type ApprovalGrantDeleteForThreadResponse
- type ApprovalGrantDeleteForThreadResponseOk
- type ApprovalGrantDeleteResponse
- type ApprovalGrantDeleteResponseOk
- type ApprovalGrantListParams
- type ApprovalGrantScope
- type ApprovalGrantService
- func (r *ApprovalGrantService) Delete(ctx context.Context, agentID string, grantID string, ...) (res *ApprovalGrantDeleteResponse, err error)
- func (r *ApprovalGrantService) DeleteForThread(ctx context.Context, agentID string, threadID string, grantID string, ...) (res *ApprovalGrantDeleteForThreadResponse, err error)
- func (r *ApprovalGrantService) List(ctx context.Context, agentID string, query ApprovalGrantListParams, ...) (res *pagination.GrantsCursorPage[ApprovalGrant], err error)
- func (r *ApprovalGrantService) ListAutoPaging(ctx context.Context, agentID string, query ApprovalGrantListParams, ...) *pagination.GrantsCursorPageAutoPager[ApprovalGrant]
- func (r *ApprovalGrantService) ListForThread(ctx context.Context, agentID string, threadID string, ...) (res *[]ApprovalGrant, err error)
- type ApprovalMode
- type ApprovalPolicy
- type ApprovalPolicyParam
- type ApprovalRequest
- type ApprovalRequestListParams
- type ApprovalRequestResolveParams
- type ApprovalRequestResolveParamsDecision
- type ApprovalRequestResolveParamsGrant
- type ApprovalRequestService
- func (r *ApprovalRequestService) List(ctx context.Context, agentID string, query ApprovalRequestListParams, ...) (res *pagination.ApprovalRequestsCursorPage[ApprovalRequest], err error)
- func (r *ApprovalRequestService) ListAutoPaging(ctx context.Context, agentID string, query ApprovalRequestListParams, ...) *pagination.ApprovalRequestsCursorPageAutoPager[ApprovalRequest]
- func (r *ApprovalRequestService) Resolve(ctx context.Context, agentID string, threadID string, approvalID string, ...) (res *ApprovalRequest, err error)
- type ApprovalRequestStatus
- type AttachedConnection
- type AuthContextResponse
- type AuthFleetsResponse
- type AuthInjection
- type AuthInjectionHeaderAuthInjection
- type AuthInjectionHeaderAuthInjectionLocation
- type AuthInjectionHeaderAuthInjectionParam
- type AuthInjectionLocation
- type AuthInjectionParam
- type AuthInjectionQueryAuthInjection
- type AuthInjectionQueryAuthInjectionLocation
- type AuthInjectionQueryAuthInjectionParam
- type AuthInjectionUnion
- type AuthInjectionUnionParam
- type AuthListFleetsParams
- type AuthService
- func (r *AuthService) Context(ctx context.Context, opts ...option.RequestOption) (res *AuthContextResponse, err error)
- func (r *AuthService) ListFleets(ctx context.Context, query AuthListFleetsParams, opts ...option.RequestOption) (res *pagination.FleetsCursorPage[Fleet], err error)
- func (r *AuthService) ListFleetsAutoPaging(ctx context.Context, query AuthListFleetsParams, opts ...option.RequestOption) *pagination.FleetsCursorPageAutoPager[Fleet]
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type CompiledContext
- type Configuration
- type ConfigurationFieldName
- type ConfigurationParam
- type Connection
- type ConnectionAttachParams
- type ConnectionDeleteParams
- type ConnectionDeleteParamsOwnerType
- type ConnectionDeleteResponse
- type ConnectionDeleteResponseSuccess
- type ConnectionDetachResponse
- type ConnectionDetachResponseSuccess
- type ConnectionListForAgentResponse
- type ConnectionListParams
- type ConnectionListParamsOwnerType
- type ConnectionNewParams
- type ConnectionOwner
- type ConnectionOwnerFleetConnectionOwner
- type ConnectionOwnerFleetConnectionOwnerParam
- type ConnectionOwnerFleetConnectionOwnerType
- type ConnectionOwnerOrganizationConnectionOwner
- type ConnectionOwnerOrganizationConnectionOwnerParam
- type ConnectionOwnerOrganizationConnectionOwnerType
- type ConnectionOwnerParam
- type ConnectionOwnerType
- type ConnectionOwnerUnion
- type ConnectionOwnerUnionParam
- type ConnectionService
- func (r *ConnectionService) Attach(ctx context.Context, agentID string, body ConnectionAttachParams, ...) (res *AttachedConnection, err error)
- func (r *ConnectionService) Delete(ctx context.Context, connectionID string, body ConnectionDeleteParams, ...) (res *ConnectionDeleteResponse, err error)
- func (r *ConnectionService) Detach(ctx context.Context, agentID string, connectionID string, ...) (res *ConnectionDetachResponse, err error)
- func (r *ConnectionService) List(ctx context.Context, query ConnectionListParams, opts ...option.RequestOption) (res *pagination.ConnectionsCursorPage[Connection], err error)
- func (r *ConnectionService) ListAutoPaging(ctx context.Context, query ConnectionListParams, opts ...option.RequestOption) *pagination.ConnectionsCursorPageAutoPager[Connection]
- func (r *ConnectionService) ListForAgent(ctx context.Context, agentID string, opts ...option.RequestOption) (res *ConnectionListForAgentResponse, err error)
- func (r *ConnectionService) New(ctx context.Context, body ConnectionNewParams, opts ...option.RequestOption) (res *Connection, err error)
- type ContentBlock
- type ContentBlockServerToolUseContentBlock
- type ContentBlockServerToolUseContentBlockType
- type ContentBlockTextContentBlock
- type ContentBlockTextContentBlockType
- type ContentBlockToolResultContentBlock
- type ContentBlockToolResultContentBlockType
- type ContentBlockToolUseContentBlock
- type ContentBlockToolUseContentBlockType
- type ContentBlockType
- type ContentBlockUnion
- type ContentBlockWebSearchToolResultContentBlock
- type ContentBlockWebSearchToolResultContentBlockType
- type ContextDeleteParams
- type ContextDeleteResponse
- type ContextDeleteResponseSuccess
- type ContextGetParams
- type ContextListParams
- type ContextSearchParams
- type ContextService
- func (r *ContextService) Delete(ctx context.Context, agentID string, body ContextDeleteParams, ...) (res *ContextDeleteResponse, err error)
- func (r *ContextService) Get(ctx context.Context, agentID string, query ContextGetParams, ...) (res *Entry, err error)
- func (r *ContextService) List(ctx context.Context, agentID string, query ContextListParams, ...) (res *pagination.EntriesCursorPage[EntrySummary], err error)
- func (r *ContextService) ListAutoPaging(ctx context.Context, agentID string, query ContextListParams, ...) *pagination.EntriesCursorPageAutoPager[EntrySummary]
- func (r *ContextService) Search(ctx context.Context, agentID string, query ContextSearchParams, ...) (res *pagination.ResultsCursorPage[SearchResult], err error)
- func (r *ContextService) SearchAutoPaging(ctx context.Context, agentID string, query ContextSearchParams, ...) *pagination.ResultsCursorPageAutoPager[SearchResult]
- func (r *ContextService) Write(ctx context.Context, agentID string, body ContextWriteParams, ...) (res *Entry, err error)
- type ContextWriteParams
- type CredentialProvider
- type CredentialType
- type DiscoveredTool
- type DiscoveredToolApproval
- type DiscoveredToolCategory
- type DiscoveredToolOrigin
- type EffectiveConfiguration
- type EffectiveConfigurationApprovals
- type Entry
- type EntrySummary
- type Error
- type EventListForAgentParams
- type EventListForAgentParamsHistory
- type EventListForFleetParams
- type EventListForFleetParamsHistory
- type EventListForThreadParams
- type EventListForThreadParamsHistory
- type EventService
- func (r *EventService) ListForAgent(ctx context.Context, agentID string, query EventListForAgentParams, ...) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)
- func (r *EventService) ListForAgentAutoPaging(ctx context.Context, agentID string, query EventListForAgentParams, ...) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
- func (r *EventService) ListForFleet(ctx context.Context, fleetID string, query EventListForFleetParams, ...) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)
- func (r *EventService) ListForFleetAutoPaging(ctx context.Context, fleetID string, query EventListForFleetParams, ...) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
- func (r *EventService) ListForThread(ctx context.Context, agentID string, threadID string, ...) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)
- func (r *EventService) ListForThreadAutoPaging(ctx context.Context, agentID string, threadID string, ...) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
- func (r *EventService) StreamForAgentStreaming(ctx context.Context, agentID string, params EventStreamForAgentParams, ...) (stream *ssestream.Stream[SubscriptionEvent])
- func (r *EventService) StreamForFleetStreaming(ctx context.Context, fleetID string, params EventStreamForFleetParams, ...) (stream *ssestream.Stream[SubscriptionEvent])
- func (r *EventService) StreamForThreadEventsStreaming(ctx context.Context, agentID string, threadID string, ...) (stream *ssestream.Stream[SubscriptionEvent])
- func (r *EventService) StreamForThreadStreaming(ctx context.Context, agentID string, threadID string, ...) (stream *ssestream.Stream[ThreadStreamEvent])
- type EventStreamForAgentParams
- type EventStreamForAgentParamsHistory
- type EventStreamForFleetParams
- type EventStreamForFleetParamsHistory
- type EventStreamForThreadEventsParams
- type EventStreamForThreadEventsParamsHistory
- type ExecResult
- type ExecResultState
- type ExecutionPrincipal
- type ExecutionPrincipalAPIKeyExecutionPrincipal
- type ExecutionPrincipalAPIKeyExecutionPrincipalKind
- type ExecutionPrincipalKind
- type ExecutionPrincipalUnion
- type ExecutionPrincipalUserExecutionPrincipal
- type ExecutionPrincipalUserExecutionPrincipalKind
- type Fleet
- type FleetService
- type HTTPEndpoint
- type HTTPEndpointBody
- type HTTPEndpointMethod
- type HTTPEndpointParam
- type HTTPToolDefinition
- type HTTPToolDefinitionParam
- type HTTPToolExecutionPolicy
- type HTTPToolExecutionPolicyParam
- type HTTPToolExecutionPolicyRetryMode
- type HTTPToolSource
- type HTTPToolSourceType
- type McpToolExecutionPolicy
- type McpToolExecutionPolicyParam
- type McpToolExecutionPolicyRetryMode
- type McpToolSource
- type McpToolSourceType
- type Message
- type MessagePage
- type MessageRole
- type Metadata
- type MetadataParam
- type ModelDescriptor
- type ModelDescriptorProvider
- type ModelListResponse
- type ModelService
- type NoToolSourceAuth
- type NoToolSourceAuthKind
- type NoToolSourceAuthParam
- type OAuthConnectParams
- type OAuthConnectResponse
- type OAuthConnectionToolSourceAuth
- type OAuthConnectionToolSourceAuthKind
- type OAuthConnectionToolSourceAuthParam
- type OAuthExchangeConfig
- type OAuthExchangeConfigClientCredentialsOAuthExchange
- type OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType
- type OAuthExchangeConfigClientCredentialsOAuthExchangeParam
- type OAuthExchangeConfigGrantType
- type OAuthExchangeConfigJwtBearerOAuthExchange
- type OAuthExchangeConfigJwtBearerOAuthExchangeGrantType
- type OAuthExchangeConfigJwtBearerOAuthExchangeParam
- type OAuthExchangeConfigParam
- type OAuthExchangeConfigUnion
- type OAuthExchangeConfigUnionParam
- type OAuthExchangeToolSourceAuth
- type OAuthExchangeToolSourceAuthKind
- type OAuthExchangeToolSourceAuthParam
- type OAuthService
- type ReadResponse
- type ResponseNormalizationHint
- type ResponseNormalizationHintMode
- type ResponseNormalizationHintParam
- type RuntimeWebhookEvent
- type RuntimeWebhookEventAgentCreatedWebhookEvent
- type RuntimeWebhookEventAgentCreatedWebhookEventData
- type RuntimeWebhookEventAgentCreatedWebhookEventDataAgent
- type RuntimeWebhookEventAgentCreatedWebhookEventEvent
- type RuntimeWebhookEventAgentDeletedWebhookEvent
- type RuntimeWebhookEventAgentDeletedWebhookEventData
- type RuntimeWebhookEventAgentDeletedWebhookEventEvent
- type RuntimeWebhookEventAgentUpdatedWebhookEvent
- type RuntimeWebhookEventAgentUpdatedWebhookEventData
- type RuntimeWebhookEventAgentUpdatedWebhookEventDataAgent
- type RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger
- type RuntimeWebhookEventAgentUpdatedWebhookEventEvent
- type RuntimeWebhookEventApprovalGrantedWebhookEvent
- type RuntimeWebhookEventApprovalGrantedWebhookEventData
- type RuntimeWebhookEventApprovalGrantedWebhookEventDataScope
- type RuntimeWebhookEventApprovalGrantedWebhookEventEvent
- type RuntimeWebhookEventApprovalRequestedWebhookEvent
- type RuntimeWebhookEventApprovalRequestedWebhookEventData
- type RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval
- type RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus
- type RuntimeWebhookEventApprovalRequestedWebhookEventEvent
- type RuntimeWebhookEventApprovalResolvedWebhookEvent
- type RuntimeWebhookEventApprovalResolvedWebhookEventData
- type RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision
- type RuntimeWebhookEventApprovalResolvedWebhookEventEvent
- type RuntimeWebhookEventConnectionAttachedWebhookEvent
- type RuntimeWebhookEventConnectionAttachedWebhookEventData
- type RuntimeWebhookEventConnectionAttachedWebhookEventEvent
- type RuntimeWebhookEventConnectionDetachedWebhookEvent
- type RuntimeWebhookEventConnectionDetachedWebhookEventData
- type RuntimeWebhookEventConnectionDetachedWebhookEventEvent
- type RuntimeWebhookEventEvent
- type RuntimeWebhookEventMessageCreatedWebhookEvent
- type RuntimeWebhookEventMessageCreatedWebhookEventData
- type RuntimeWebhookEventMessageCreatedWebhookEventDataRole
- type RuntimeWebhookEventMessageCreatedWebhookEventEvent
- type RuntimeWebhookEventScheduleCreatedWebhookEvent
- type RuntimeWebhookEventScheduleCreatedWebhookEventData
- type RuntimeWebhookEventScheduleCreatedWebhookEventEvent
- type RuntimeWebhookEventScheduleDeletedWebhookEvent
- type RuntimeWebhookEventScheduleDeletedWebhookEventData
- type RuntimeWebhookEventScheduleDeletedWebhookEventEvent
- type RuntimeWebhookEventScheduleTriggeredWebhookEvent
- type RuntimeWebhookEventScheduleTriggeredWebhookEventData
- type RuntimeWebhookEventScheduleTriggeredWebhookEventEvent
- type RuntimeWebhookEventThreadCompletedWebhookEvent
- type RuntimeWebhookEventThreadCompletedWebhookEventData
- type RuntimeWebhookEventThreadCompletedWebhookEventEvent
- type RuntimeWebhookEventThreadCreatedWebhookEvent
- type RuntimeWebhookEventThreadCreatedWebhookEventData
- type RuntimeWebhookEventThreadCreatedWebhookEventEvent
- type RuntimeWebhookEventThreadFailedWebhookEvent
- type RuntimeWebhookEventThreadFailedWebhookEventData
- type RuntimeWebhookEventThreadFailedWebhookEventEvent
- type RuntimeWebhookEventThreadStatusChangedWebhookEvent
- type RuntimeWebhookEventThreadStatusChangedWebhookEventData
- type RuntimeWebhookEventThreadStatusChangedWebhookEventEvent
- type RuntimeWebhookEventTurnCompletedWebhookEvent
- type RuntimeWebhookEventTurnCompletedWebhookEventData
- type RuntimeWebhookEventTurnCompletedWebhookEventDataStatus
- type RuntimeWebhookEventTurnCompletedWebhookEventEvent
- type RuntimeWebhookEventTurnCreatedWebhookEvent
- type RuntimeWebhookEventTurnCreatedWebhookEventData
- type RuntimeWebhookEventTurnCreatedWebhookEventEvent
- type RuntimeWebhookEventTurnFailedWebhookEvent
- type RuntimeWebhookEventTurnFailedWebhookEventData
- type RuntimeWebhookEventTurnFailedWebhookEventDataStatus
- type RuntimeWebhookEventTurnFailedWebhookEventEvent
- type RuntimeWebhookEventUnion
- type RuntimeWebhookEventWebhookTestWebhookEvent
- type RuntimeWebhookEventWebhookTestWebhookEventData
- type RuntimeWebhookEventWebhookTestWebhookEventEvent
- type SandboxExecParams
- type SandboxReadParams
- type SandboxService
- func (r *SandboxService) Exec(ctx context.Context, agentID string, body SandboxExecParams, ...) (res *ExecResult, err error)
- func (r *SandboxService) Read(ctx context.Context, agentID string, body SandboxReadParams, ...) (res *ReadResponse, err error)
- func (r *SandboxService) Write(ctx context.Context, agentID string, body SandboxWriteParams, ...) (res *SandboxWriteResponse, err error)
- type SandboxWriteParams
- type SandboxWriteResponse
- type SandboxWriteResponseSuccess
- type Schedule
- type ScheduleDeleteResponse
- type ScheduleDeleteResponseSuccess
- type ScheduleListResponse
- type ScheduleNewParams
- type ScheduleService
- func (r *ScheduleService) Delete(ctx context.Context, agentID string, scheduleID string, ...) (res *ScheduleDeleteResponse, err error)
- func (r *ScheduleService) List(ctx context.Context, agentID string, opts ...option.RequestOption) (res *ScheduleListResponse, err error)
- func (r *ScheduleService) New(ctx context.Context, agentID string, body ScheduleNewParams, ...) (res *Schedule, err error)
- func (r *ScheduleService) Trigger(ctx context.Context, agentID string, scheduleID string, ...) (res *ScheduleTriggerResponse, err error)
- func (r *ScheduleService) Update(ctx context.Context, agentID string, scheduleID string, ...) (res *Schedule, err error)
- type ScheduleTriggerResponse
- type ScheduleUpdateParams
- type SearchResult
- type SourceWarning
- type Status
- type SteerResult
- type SteerResultStatus
- type SubThreadSummary
- type SubThreadSummaryState
- type SubscriptionEvent
- type Thread
- type ThreadActivityParams
- type ThreadExternalToolNamespacesArray
- type ThreadExternalToolNamespacesString
- type ThreadExternalToolNamespacesUnion
- type ThreadGetParams
- type ThreadGetParamsDebug
- type ThreadGetParamsIncludeMessages
- type ThreadLastTurnStatus
- type ThreadListMessagesParams
- type ThreadListParams
- type ThreadNewParams
- type ThreadService
- func (r *ThreadService) Activity(ctx context.Context, agentID string, threadID string, ...) (res *ActivityDetail, err error)
- func (r *ThreadService) Cancel(ctx context.Context, agentID string, threadID string, ...) (res *Thread, err error)
- func (r *ThreadService) Close(ctx context.Context, agentID string, threadID string, ...) (res *Thread, err error)
- func (r *ThreadService) Compact(ctx context.Context, agentID string, threadID string, ...) (res *Thread, err error)
- func (r *ThreadService) Get(ctx context.Context, agentID string, threadID string, query ThreadGetParams, ...) (res *Thread, err error)
- func (r *ThreadService) List(ctx context.Context, agentID string, query ThreadListParams, ...) (res *pagination.ThreadsCursorPage[ThreadSummary], err error)
- func (r *ThreadService) ListAutoPaging(ctx context.Context, agentID string, query ThreadListParams, ...) *pagination.ThreadsCursorPageAutoPager[ThreadSummary]
- func (r *ThreadService) ListMessages(ctx context.Context, agentID string, threadID string, ...) (res *pagination.ThreadMessagesCursorPage[Message], err error)
- func (r *ThreadService) ListMessagesAutoPaging(ctx context.Context, agentID string, threadID string, ...) *pagination.ThreadMessagesCursorPageAutoPager[Message]
- func (r *ThreadService) New(ctx context.Context, agentID string, body ThreadNewParams, ...) (res *Thread, err error)
- func (r *ThreadService) StartTurn(ctx context.Context, agentID string, threadID string, ...) (res *Turn, err error)
- func (r *ThreadService) Steer(ctx context.Context, agentID string, threadID string, body ThreadSteerParams, ...) (res *SteerResult, err error)
- type ThreadStartTurnParams
- type ThreadSteerParams
- type ThreadStreamEvent
- type ThreadStreamEventDecision
- type ThreadStreamEventItemType
- type ThreadStreamEventThreadStreamApprovalRequestedMessage
- type ThreadStreamEventThreadStreamApprovalRequestedMessageApproval
- type ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus
- type ThreadStreamEventThreadStreamApprovalRequestedMessageType
- type ThreadStreamEventThreadStreamApprovalResolvedMessage
- type ThreadStreamEventThreadStreamApprovalResolvedMessageDecision
- type ThreadStreamEventThreadStreamApprovalResolvedMessageType
- type ThreadStreamEventThreadStreamContentMessage
- type ThreadStreamEventThreadStreamContentMessageMessage
- type ThreadStreamEventThreadStreamContentMessageMessageContent
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock
- type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType
- type ThreadStreamEventThreadStreamContentMessageMessageContentType
- type ThreadStreamEventThreadStreamContentMessageMessageContentUnion
- type ThreadStreamEventThreadStreamContentMessageMessageRole
- type ThreadStreamEventThreadStreamContentMessageType
- type ThreadStreamEventThreadStreamItemCompletedMessage
- type ThreadStreamEventThreadStreamItemCompletedMessageItemType
- type ThreadStreamEventThreadStreamItemCompletedMessageType
- type ThreadStreamEventThreadStreamItemStartedMessage
- type ThreadStreamEventThreadStreamItemStartedMessageItemType
- type ThreadStreamEventThreadStreamItemStartedMessageType
- type ThreadStreamEventThreadStreamProgressMessage
- type ThreadStreamEventThreadStreamProgressMessageType
- type ThreadStreamEventThreadStreamStatusMessage
- type ThreadStreamEventThreadStreamStatusMessageType
- type ThreadStreamEventThreadStreamTokenUsageMessage
- type ThreadStreamEventThreadStreamTokenUsageMessageType
- type ThreadStreamEventThreadStreamTurnCompletedMessage
- type ThreadStreamEventThreadStreamTurnCompletedMessageStatus
- type ThreadStreamEventThreadStreamTurnCompletedMessageType
- type ThreadStreamEventThreadStreamTurnStartedMessage
- type ThreadStreamEventThreadStreamTurnStartedMessageType
- type ThreadStreamEventType
- type ThreadStreamEventUnion
- type ThreadSummary
- type ThreadTurnSummary
- type ThreadTurnSummaryStatus
- type TokenUsage
- type Tool
- type ToolApproval
- type ToolApprovalMode
- type ToolApprovalSource
- type ToolCategory
- type ToolConnectionMetadata
- type ToolConnectionMetadataParam
- type ToolDescriptor
- type ToolDescriptorApprovalSource
- type ToolDescriptorCategory
- type ToolListParams
- type ToolName
- type ToolNewParams
- type ToolNewParamsBody
- type ToolNewParamsBodyCreateHTTPToolSourceRequest
- type ToolNewParamsBodyCreateHTTPToolSourceRequestType
- type ToolNewParamsBodyCreateMcpToolSourceRequest
- type ToolNewParamsBodyCreateMcpToolSourceRequestType
- type ToolNewParamsBodyType
- type ToolNewParamsBodyUnion
- type ToolOrigin
- type ToolService
- func (r *ToolService) Delete(ctx context.Context, fleetID string, sourceID string, ...) (err error)
- func (r *ToolService) Get(ctx context.Context, fleetID string, sourceID string, ...) (res *ToolSource, err error)
- func (r *ToolService) List(ctx context.Context, fleetID string, query ToolListParams, ...) (res *pagination.SourcesCursorPage[ToolSource], err error)
- func (r *ToolService) ListAutoPaging(ctx context.Context, fleetID string, query ToolListParams, ...) *pagination.SourcesCursorPageAutoPager[ToolSource]
- func (r *ToolService) New(ctx context.Context, fleetID string, body ToolNewParams, ...) (res *ToolSource, err error)
- func (r *ToolService) Update(ctx context.Context, fleetID string, sourceID string, body ToolUpdateParams, ...) (res *ToolSource, err error)
- type ToolSource
- type ToolSourceAuth
- type ToolSourceAuthKind
- type ToolSourceAuthParam
- type ToolSourceAuthUnion
- type ToolSourceAuthUnionParam
- type ToolSourceType
- type ToolSourceUnion
- type ToolSpec
- type ToolSpecParam
- type ToolUnion
- type ToolUpdateParams
- type ToolUpdateParamsBody
- type ToolUpdateParamsBodyType
- type ToolUpdateParamsBodyUnion
- type ToolUpdateParamsBodyUpdateHTTPToolSourceRequest
- type ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType
- type ToolUpdateParamsBodyUpdateMcpToolSourceRequest
- type ToolUpdateParamsBodyUpdateMcpToolSourceRequestType
- type Turn
- type TurnStatus
- type WebhookEventType
- type WebhookListParams
- type WebhookNewParams
- type WebhookService
- func (r *WebhookService) Delete(ctx context.Context, fleetID string, webhookID string, ...) (err error)
- func (r *WebhookService) Get(ctx context.Context, fleetID string, webhookID string, ...) (res *WebhookSubscription, err error)
- func (r *WebhookService) List(ctx context.Context, fleetID string, query WebhookListParams, ...) (res *pagination.SubscriptionsCursorPage[WebhookSubscription], err error)
- func (r *WebhookService) ListAutoPaging(ctx context.Context, fleetID string, query WebhookListParams, ...) *pagination.SubscriptionsCursorPageAutoPager[WebhookSubscription]
- func (r *WebhookService) New(ctx context.Context, fleetID string, body WebhookNewParams, ...) (res *WebhookSubscriptionCreated, err error)
- func (r *WebhookService) Rotate(ctx context.Context, fleetID string, webhookID string, ...) (res *WebhookSubscriptionCreated, err error)
- func (r *WebhookService) Test(ctx context.Context, fleetID string, webhookID string, ...) (res *WebhookTestResponse, err error)
- func (r *WebhookService) Update(ctx context.Context, fleetID string, webhookID string, ...) (res *WebhookSubscription, err error)
- type WebhookSubscription
- type WebhookSubscriptionCreated
- type WebhookSubscriptionEventType
- type WebhookTestResponse
- type WebhookUpdateParams
Constants ¶
const ApprovalModeAlways = shared.ApprovalModeAlways
This is an alias to an internal value.
const ApprovalModeNever = shared.ApprovalModeNever
This is an alias to an internal value.
const ToolNameAgentApprovalsCancel = shared.ToolNameAgentApprovalsCancel
This is an alias to an internal value.
const ToolNameAgentApprovalsGrantAgent = shared.ToolNameAgentApprovalsGrantAgent
This is an alias to an internal value.
const ToolNameAgentApprovalsGrantThread = shared.ToolNameAgentApprovalsGrantThread
This is an alias to an internal value.
const ToolNameAgentApprovalsUpdate = shared.ToolNameAgentApprovalsUpdate
This is an alias to an internal value.
const ToolNameAgentCreate = shared.ToolNameAgentCreate
This is an alias to an internal value.
const ToolNameAgentScheduleCreate = shared.ToolNameAgentScheduleCreate
This is an alias to an internal value.
const ToolNameAgentScheduleDelete = shared.ToolNameAgentScheduleDelete
This is an alias to an internal value.
const ToolNameAgentScheduleList = shared.ToolNameAgentScheduleList
This is an alias to an internal value.
const ToolNameAgentScheduleTrigger = shared.ToolNameAgentScheduleTrigger
This is an alias to an internal value.
const ToolNameAgentScheduleUpdate = shared.ToolNameAgentScheduleUpdate
This is an alias to an internal value.
const ToolNameAgentThreadsGet = shared.ToolNameAgentThreadsGet
This is an alias to an internal value.
const ToolNameAgentThreadsList = shared.ToolNameAgentThreadsList
This is an alias to an internal value.
const ToolNameArtifactRead = shared.ToolNameArtifactRead
This is an alias to an internal value.
const ToolNameDBQuery = shared.ToolNameDBQuery
This is an alias to an internal value.
const ToolNameGetTime = shared.ToolNameGetTime
This is an alias to an internal value.
const ToolNameMemoryDelete = shared.ToolNameMemoryDelete
This is an alias to an internal value.
const ToolNameMemoryList = shared.ToolNameMemoryList
This is an alias to an internal value.
const ToolNameMemoryRead = shared.ToolNameMemoryRead
This is an alias to an internal value.
const ToolNameMemorySearch = shared.ToolNameMemorySearch
This is an alias to an internal value.
const ToolNameMemoryWrite = shared.ToolNameMemoryWrite
This is an alias to an internal value.
const ToolNameSandboxExec = shared.ToolNameSandboxExec
This is an alias to an internal value.
const ToolNameSandboxKill = shared.ToolNameSandboxKill
This is an alias to an internal value.
const ToolNameSandboxListSessions = shared.ToolNameSandboxListSessions
This is an alias to an internal value.
const ToolNameSandboxRead = shared.ToolNameSandboxRead
This is an alias to an internal value.
const ToolNameSandboxReadFile = shared.ToolNameSandboxReadFile
This is an alias to an internal value.
const ToolNameSandboxSessionRead = shared.ToolNameSandboxSessionRead
This is an alias to an internal value.
const ToolNameSandboxSpawn = shared.ToolNameSandboxSpawn
This is an alias to an internal value.
const ToolNameSandboxStdin = shared.ToolNameSandboxStdin
This is an alias to an internal value.
const ToolNameSandboxSyncArtifact = shared.ToolNameSandboxSyncArtifact
This is an alias to an internal value.
const ToolNameSandboxWriteFile = shared.ToolNameSandboxWriteFile
This is an alias to an internal value.
const ToolNameSubThread = shared.ToolNameSubThread
This is an alias to an internal value.
const ToolNameToolCall = shared.ToolNameToolCall
This is an alias to an internal value.
const ToolNameToolConnect = shared.ToolNameToolConnect
This is an alias to an internal value.
const ToolNameToolDiscover = shared.ToolNameToolDiscover
This is an alias to an internal value.
const ToolNameWait = shared.ToolNameWait
This is an alias to an internal value.
const ToolNameWebFetch = shared.ToolNameWebFetch
This is an alias to an internal value.
const ToolNameWebSearch = shared.ToolNameWebSearch
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
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).
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 ¶
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 ¶
func (r *AgentService) List(ctx context.Context, query AgentListParams, opts ...option.RequestOption) (res *pagination.AgentsCursorPage[AgentSummary], err error)
List agents
func (*AgentService) ListAutoPaging ¶
func (r *AgentService) ListAutoPaging(ctx context.Context, query AgentListParams, opts ...option.RequestOption) *pagination.AgentsCursorPageAutoPager[AgentSummary]
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 ¶
func (r ApprovalGrantDeleteForThreadResponseOk) IsKnown() bool
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 ¶
func (r *ApprovalGrantService) List(ctx context.Context, agentID string, query ApprovalGrantListParams, opts ...option.RequestOption) (res *pagination.GrantsCursorPage[ApprovalGrant], err error)
List approval grants
func (*ApprovalGrantService) ListAutoPaging ¶
func (r *ApprovalGrantService) ListAutoPaging(ctx context.Context, agentID string, query ApprovalGrantListParams, opts ...option.RequestOption) *pagination.GrantsCursorPageAutoPager[ApprovalGrant]
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 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 ¶
func (r ApprovalRequestResolveParamsDecision) IsKnown() bool
type ApprovalRequestResolveParamsGrant ¶
type ApprovalRequestResolveParamsGrant string
const ( ApprovalRequestResolveParamsGrantThread ApprovalRequestResolveParamsGrant = "thread" ApprovalRequestResolveParamsGrantAgent ApprovalRequestResolveParamsGrant = "agent" )
func (ApprovalRequestResolveParamsGrant) IsKnown ¶
func (r ApprovalRequestResolveParamsGrant) IsKnown() bool
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 ¶
func (r *ApprovalRequestService) List(ctx context.Context, agentID string, query ApprovalRequestListParams, opts ...option.RequestOption) (res *pagination.ApprovalRequestsCursorPage[ApprovalRequest], err error)
List approvals
func (*ApprovalRequestService) ListAutoPaging ¶
func (r *ApprovalRequestService) ListAutoPaging(ctx context.Context, agentID string, query ApprovalRequestListParams, opts ...option.RequestOption) *pagination.ApprovalRequestsCursorPageAutoPager[ApprovalRequest]
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 ¶
func (r AuthInjectionHeaderAuthInjectionLocation) IsKnown() bool
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 ¶
func (r AuthInjectionQueryAuthInjectionLocation) IsKnown() bool
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 ¶
func (r *AuthService) ListFleets(ctx context.Context, query AuthListFleetsParams, opts ...option.RequestOption) (res *pagination.FleetsCursorPage[Fleet], err error)
List fleets
func (*AuthService) ListFleetsAutoPaging ¶
func (r *AuthService) ListFleetsAutoPaging(ctx context.Context, query AuthListFleetsParams, opts ...option.RequestOption) *pagination.FleetsCursorPageAutoPager[Fleet]
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.
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 ¶
func (r ConnectionDeleteParamsOwnerType) IsKnown() bool
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 ¶
func (r ConnectionDeleteResponseSuccess) IsKnown() bool
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 ¶
func (r ConnectionDetachResponseSuccess) IsKnown() bool
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 ¶
func (r ConnectionOwner) AsUnion() ConnectionOwnerUnion
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 ¶
func (r ConnectionOwnerFleetConnectionOwnerType) IsKnown() bool
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 ¶
func (r ConnectionOwnerOrganizationConnectionOwnerType) IsKnown() bool
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 ¶
func (r *ConnectionService) List(ctx context.Context, query ConnectionListParams, opts ...option.RequestOption) (res *pagination.ConnectionsCursorPage[Connection], err error)
List connections
func (*ConnectionService) ListAutoPaging ¶
func (r *ConnectionService) ListAutoPaging(ctx context.Context, query ConnectionListParams, opts ...option.RequestOption) *pagination.ConnectionsCursorPageAutoPager[Connection]
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 ¶
func (r *ConnectionService) New(ctx context.Context, body ConnectionNewParams, opts ...option.RequestOption) (res *Connection, err error)
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 ¶
func (r ContentBlockServerToolUseContentBlockType) IsKnown() bool
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 ¶
func (r ContentBlockTextContentBlockType) IsKnown() bool
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 ¶
func (r ContentBlockToolResultContentBlockType) IsKnown() bool
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 ¶
func (r ContentBlockToolUseContentBlockType) IsKnown() bool
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 ¶
func (r ContentBlockWebSearchToolResultContentBlockType) IsKnown() bool
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 ¶
func (r *ContextService) List(ctx context.Context, agentID string, query ContextListParams, opts ...option.RequestOption) (res *pagination.EntriesCursorPage[EntrySummary], err error)
List context entries
func (*ContextService) ListAutoPaging ¶
func (r *ContextService) ListAutoPaging(ctx context.Context, agentID string, query ContextListParams, opts ...option.RequestOption) *pagination.EntriesCursorPageAutoPager[EntrySummary]
List context entries
func (*ContextService) Search ¶
func (r *ContextService) Search(ctx context.Context, agentID string, query ContextSearchParams, opts ...option.RequestOption) (res *pagination.ResultsCursorPage[SearchResult], err error)
Search context
func (*ContextService) SearchAutoPaging ¶
func (r *ContextService) SearchAutoPaging(ctx context.Context, agentID string, query ContextSearchParams, opts ...option.RequestOption) *pagination.ResultsCursorPageAutoPager[SearchResult]
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 ¶
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 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 ¶
func (r EventListForAgentParamsHistory) IsKnown() bool
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 ¶
func (r EventListForFleetParamsHistory) IsKnown() bool
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 ¶
func (r EventListForThreadParamsHistory) IsKnown() bool
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 ¶
func (r *EventService) ListForAgent(ctx context.Context, agentID string, query EventListForAgentParams, opts ...option.RequestOption) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)
List events
func (*EventService) ListForAgentAutoPaging ¶
func (r *EventService) ListForAgentAutoPaging(ctx context.Context, agentID string, query EventListForAgentParams, opts ...option.RequestOption) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
List events
func (*EventService) ListForFleet ¶
func (r *EventService) ListForFleet(ctx context.Context, fleetID string, query EventListForFleetParams, opts ...option.RequestOption) (res *pagination.EventsCursorPage[SubscriptionEvent], err error)
List events
func (*EventService) ListForFleetAutoPaging ¶
func (r *EventService) ListForFleetAutoPaging(ctx context.Context, fleetID string, query EventListForFleetParams, opts ...option.RequestOption) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
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 ¶
func (r *EventService) ListForThreadAutoPaging(ctx context.Context, agentID string, threadID string, query EventListForThreadParams, opts ...option.RequestOption) *pagination.EventsCursorPageAutoPager[SubscriptionEvent]
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 ¶
func (r EventStreamForAgentParamsHistory) IsKnown() bool
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 ¶
func (r EventStreamForFleetParamsHistory) IsKnown() bool
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 ¶
func (r EventStreamForThreadEventsParamsHistory) IsKnown() bool
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 ¶
func (r ExecutionPrincipal) AsUnion() ExecutionPrincipalUnion
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 ¶
func (r ExecutionPrincipalAPIKeyExecutionPrincipalKind) IsKnown() bool
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 ¶
func (r ExecutionPrincipalUserExecutionPrincipalKind) IsKnown() bool
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 ¶
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 ¶
func (r HTTPToolExecutionPolicyRetryMode) IsKnown() bool
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 ¶
func (r McpToolExecutionPolicyRetryMode) IsKnown() bool
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 ¶
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 MetadataParam ¶
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 ¶
func (r OAuthConnectionToolSourceAuthKind) IsKnown() bool
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 ¶
func (r OAuthExchangeConfig) AsUnion() OAuthExchangeConfigUnion
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 ¶
func (r OAuthExchangeConfigClientCredentialsOAuthExchangeGrantType) IsKnown() bool
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 ¶
func (r OAuthExchangeConfigClientCredentialsOAuthExchangeParam) MarshalJSON() (data []byte, err error)
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 ¶
func (r OAuthExchangeConfigJwtBearerOAuthExchangeGrantType) IsKnown() bool
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 ¶
func (r OAuthExchangeToolSourceAuthKind) IsKnown() bool
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) AsUnion ¶
func (r RuntimeWebhookEvent) AsUnion() RuntimeWebhookEventUnion
AsUnion returns a RuntimeWebhookEventUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are RuntimeWebhookEventAgentCreatedWebhookEvent, RuntimeWebhookEventAgentUpdatedWebhookEvent, RuntimeWebhookEventAgentDeletedWebhookEvent, RuntimeWebhookEventThreadCreatedWebhookEvent, RuntimeWebhookEventThreadStatusChangedWebhookEvent, RuntimeWebhookEventThreadCompletedWebhookEvent, RuntimeWebhookEventThreadFailedWebhookEvent, RuntimeWebhookEventTurnCreatedWebhookEvent, RuntimeWebhookEventTurnCompletedWebhookEvent, RuntimeWebhookEventTurnFailedWebhookEvent, RuntimeWebhookEventMessageCreatedWebhookEvent, RuntimeWebhookEventApprovalRequestedWebhookEvent, RuntimeWebhookEventApprovalResolvedWebhookEvent, RuntimeWebhookEventApprovalGrantedWebhookEvent, RuntimeWebhookEventScheduleCreatedWebhookEvent, RuntimeWebhookEventScheduleDeletedWebhookEvent, RuntimeWebhookEventScheduleTriggeredWebhookEvent, RuntimeWebhookEventConnectionAttachedWebhookEvent, RuntimeWebhookEventConnectionDetachedWebhookEvent, RuntimeWebhookEventWebhookTestWebhookEvent.
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 ¶
func (r RuntimeWebhookEventAgentCreatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventAgentDeletedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventAgentUpdatedWebhookEventDataTrigger) IsKnown() bool
type RuntimeWebhookEventAgentUpdatedWebhookEventEvent ¶
type RuntimeWebhookEventAgentUpdatedWebhookEventEvent string
const (
RuntimeWebhookEventAgentUpdatedWebhookEventEventAgentUpdated RuntimeWebhookEventAgentUpdatedWebhookEventEvent = "agent.updated"
)
func (RuntimeWebhookEventAgentUpdatedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventAgentUpdatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventApprovalGrantedWebhookEventDataScope) IsKnown() bool
type RuntimeWebhookEventApprovalGrantedWebhookEventEvent ¶
type RuntimeWebhookEventApprovalGrantedWebhookEventEvent string
const (
RuntimeWebhookEventApprovalGrantedWebhookEventEventApprovalGranted RuntimeWebhookEventApprovalGrantedWebhookEventEvent = "approval.granted"
)
func (RuntimeWebhookEventApprovalGrantedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventApprovalGrantedWebhookEventEvent) IsKnown() bool
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 ¶
func (r *RuntimeWebhookEventApprovalRequestedWebhookEventDataApproval) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r RuntimeWebhookEventApprovalRequestedWebhookEventDataApprovalStatus) IsKnown() bool
type RuntimeWebhookEventApprovalRequestedWebhookEventEvent ¶
type RuntimeWebhookEventApprovalRequestedWebhookEventEvent string
const (
RuntimeWebhookEventApprovalRequestedWebhookEventEventApprovalRequested RuntimeWebhookEventApprovalRequestedWebhookEventEvent = "approval.requested"
)
func (RuntimeWebhookEventApprovalRequestedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventApprovalRequestedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventApprovalResolvedWebhookEventDataDecision) IsKnown() bool
type RuntimeWebhookEventApprovalResolvedWebhookEventEvent ¶
type RuntimeWebhookEventApprovalResolvedWebhookEventEvent string
const (
RuntimeWebhookEventApprovalResolvedWebhookEventEventApprovalResolved RuntimeWebhookEventApprovalResolvedWebhookEventEvent = "approval.resolved"
)
func (RuntimeWebhookEventApprovalResolvedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventApprovalResolvedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventConnectionAttachedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventConnectionDetachedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventMessageCreatedWebhookEventDataRole) IsKnown() bool
type RuntimeWebhookEventMessageCreatedWebhookEventEvent ¶
type RuntimeWebhookEventMessageCreatedWebhookEventEvent string
const (
RuntimeWebhookEventMessageCreatedWebhookEventEventMessageCreated RuntimeWebhookEventMessageCreatedWebhookEventEvent = "message.created"
)
func (RuntimeWebhookEventMessageCreatedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventMessageCreatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventScheduleCreatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventScheduleDeletedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventScheduleTriggeredWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventThreadCompletedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventThreadCreatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventThreadFailedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventThreadStatusChangedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventTurnCompletedWebhookEventDataStatus) IsKnown() bool
type RuntimeWebhookEventTurnCompletedWebhookEventEvent ¶
type RuntimeWebhookEventTurnCompletedWebhookEventEvent string
const (
RuntimeWebhookEventTurnCompletedWebhookEventEventTurnCompleted RuntimeWebhookEventTurnCompletedWebhookEventEvent = "turn.completed"
)
func (RuntimeWebhookEventTurnCompletedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventTurnCompletedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventTurnCreatedWebhookEventEvent) IsKnown() bool
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 ¶
func (r RuntimeWebhookEventTurnFailedWebhookEventDataStatus) IsKnown() bool
type RuntimeWebhookEventTurnFailedWebhookEventEvent ¶
type RuntimeWebhookEventTurnFailedWebhookEventEvent string
const (
RuntimeWebhookEventTurnFailedWebhookEventEventTurnFailed RuntimeWebhookEventTurnFailedWebhookEventEvent = "turn.failed"
)
func (RuntimeWebhookEventTurnFailedWebhookEventEvent) IsKnown ¶
func (r RuntimeWebhookEventTurnFailedWebhookEventEvent) IsKnown() bool
type RuntimeWebhookEventUnion ¶
type RuntimeWebhookEventUnion interface {
// contains filtered or unexported methods
}
Union satisfied by RuntimeWebhookEventAgentCreatedWebhookEvent, RuntimeWebhookEventAgentUpdatedWebhookEvent, RuntimeWebhookEventAgentDeletedWebhookEvent, RuntimeWebhookEventThreadCreatedWebhookEvent, RuntimeWebhookEventThreadStatusChangedWebhookEvent, RuntimeWebhookEventThreadCompletedWebhookEvent, RuntimeWebhookEventThreadFailedWebhookEvent, RuntimeWebhookEventTurnCreatedWebhookEvent, RuntimeWebhookEventTurnCompletedWebhookEvent, RuntimeWebhookEventTurnFailedWebhookEvent, RuntimeWebhookEventMessageCreatedWebhookEvent, RuntimeWebhookEventApprovalRequestedWebhookEvent, RuntimeWebhookEventApprovalResolvedWebhookEvent, RuntimeWebhookEventApprovalGrantedWebhookEvent, RuntimeWebhookEventScheduleCreatedWebhookEvent, RuntimeWebhookEventScheduleDeletedWebhookEvent, RuntimeWebhookEventScheduleTriggeredWebhookEvent, RuntimeWebhookEventConnectionAttachedWebhookEvent, RuntimeWebhookEventConnectionDetachedWebhookEvent or RuntimeWebhookEventWebhookTestWebhookEvent.
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 ¶
func (r RuntimeWebhookEventWebhookTestWebhookEventEvent) IsKnown() bool
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 ¶
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.
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 ¶
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 ¶
func (r ThreadExternalToolNamespacesString) IsKnown() bool
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 ¶
func (r ThreadGetParamsIncludeMessages) IsKnown() bool
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 ¶
func (r *ThreadService) List(ctx context.Context, agentID string, query ThreadListParams, opts ...option.RequestOption) (res *pagination.ThreadsCursorPage[ThreadSummary], err error)
List threads
func (*ThreadService) ListAutoPaging ¶
func (r *ThreadService) ListAutoPaging(ctx context.Context, agentID string, query ThreadListParams, opts ...option.RequestOption) *pagination.ThreadsCursorPageAutoPager[ThreadSummary]
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
func (r *ThreadService) ListMessagesAutoPaging(ctx context.Context, agentID string, threadID string, query ThreadListMessagesParams, opts ...option.RequestOption) *pagination.ThreadMessagesCursorPageAutoPager[Message]
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 ¶
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) AsUnion ¶
func (r ThreadStreamEvent) AsUnion() ThreadStreamEventUnion
AsUnion returns a ThreadStreamEventUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ThreadStreamEventThreadStreamStatusMessage, ThreadStreamEventThreadStreamContentMessage, ThreadStreamEventThreadStreamProgressMessage, ThreadStreamEventThreadStreamTurnStartedMessage, ThreadStreamEventThreadStreamTurnCompletedMessage, ThreadStreamEventThreadStreamItemStartedMessage, ThreadStreamEventThreadStreamItemCompletedMessage, ThreadStreamEventThreadStreamTokenUsageMessage, ThreadStreamEventThreadStreamApprovalRequestedMessage, ThreadStreamEventThreadStreamApprovalResolvedMessage.
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 ¶
func (r *ThreadStreamEventThreadStreamApprovalRequestedMessageApproval) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r ThreadStreamEventThreadStreamApprovalRequestedMessageApprovalStatus) IsKnown() bool
type ThreadStreamEventThreadStreamApprovalRequestedMessageType ¶
type ThreadStreamEventThreadStreamApprovalRequestedMessageType string
const (
ThreadStreamEventThreadStreamApprovalRequestedMessageTypeApprovalRequested ThreadStreamEventThreadStreamApprovalRequestedMessageType = "approval/requested"
)
func (ThreadStreamEventThreadStreamApprovalRequestedMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamApprovalRequestedMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamApprovalResolvedMessageDecision) IsKnown() bool
type ThreadStreamEventThreadStreamApprovalResolvedMessageType ¶
type ThreadStreamEventThreadStreamApprovalResolvedMessageType string
const (
ThreadStreamEventThreadStreamApprovalResolvedMessageTypeApprovalResolved ThreadStreamEventThreadStreamApprovalResolvedMessageType = "approval/resolved"
)
func (ThreadStreamEventThreadStreamApprovalResolvedMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamApprovalResolvedMessageType) IsKnown() bool
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) AsUnion ¶
func (r ThreadStreamEventThreadStreamContentMessageMessageContent) AsUnion() ThreadStreamEventThreadStreamContentMessageMessageContentUnion
AsUnion returns a ThreadStreamEventThreadStreamContentMessageMessageContentUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock.
func (*ThreadStreamEventThreadStreamContentMessageMessageContent) UnmarshalJSON ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContent) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock) UnmarshalJSON(data []byte) (err error)
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType string
const (
ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockTypeServerToolUse ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlockType = "server_tool_use"
)
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 ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock) UnmarshalJSON(data []byte) (err error)
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType string
const (
ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockTypeText ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlockType = "text"
)
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 ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock) UnmarshalJSON(data []byte) (err error)
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType string
const (
ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockTypeToolResult ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlockType = "tool_result"
)
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 ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock) UnmarshalJSON(data []byte) (err error)
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType string
const (
ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockTypeToolUse ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlockType = "tool_use"
)
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 ¶
func (r *ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock) UnmarshalJSON(data []byte) (err error)
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType string
const (
ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockTypeWebSearchToolResult ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlockType = "web_search_tool_result"
)
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 ¶
func (r ThreadStreamEventThreadStreamContentMessageMessageContentType) IsKnown() bool
type ThreadStreamEventThreadStreamContentMessageMessageContentUnion ¶
type ThreadStreamEventThreadStreamContentMessageMessageContentUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamTextContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolUseContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamToolResultContentBlock, ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamServerToolUseContentBlock or ThreadStreamEventThreadStreamContentMessageMessageContentThreadStreamWebSearchToolResultContentBlock.
type ThreadStreamEventThreadStreamContentMessageMessageRole ¶
type ThreadStreamEventThreadStreamContentMessageMessageRole string
const ( ThreadStreamEventThreadStreamContentMessageMessageRoleUser ThreadStreamEventThreadStreamContentMessageMessageRole = "user" ThreadStreamEventThreadStreamContentMessageMessageRoleAssistant ThreadStreamEventThreadStreamContentMessageMessageRole = "assistant" )
func (ThreadStreamEventThreadStreamContentMessageMessageRole) IsKnown ¶
func (r ThreadStreamEventThreadStreamContentMessageMessageRole) IsKnown() bool
type ThreadStreamEventThreadStreamContentMessageType ¶
type ThreadStreamEventThreadStreamContentMessageType string
const (
ThreadStreamEventThreadStreamContentMessageTypeMessage ThreadStreamEventThreadStreamContentMessageType = "message"
)
func (ThreadStreamEventThreadStreamContentMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamContentMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamItemCompletedMessageItemType) IsKnown() bool
type ThreadStreamEventThreadStreamItemCompletedMessageType ¶
type ThreadStreamEventThreadStreamItemCompletedMessageType string
const (
ThreadStreamEventThreadStreamItemCompletedMessageTypeItemCompleted ThreadStreamEventThreadStreamItemCompletedMessageType = "item/completed"
)
func (ThreadStreamEventThreadStreamItemCompletedMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamItemCompletedMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamItemStartedMessageItemType) IsKnown() bool
type ThreadStreamEventThreadStreamItemStartedMessageType ¶
type ThreadStreamEventThreadStreamItemStartedMessageType string
const (
ThreadStreamEventThreadStreamItemStartedMessageTypeItemStarted ThreadStreamEventThreadStreamItemStartedMessageType = "item/started"
)
func (ThreadStreamEventThreadStreamItemStartedMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamItemStartedMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamProgressMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamStatusMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamTokenUsageMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamTurnCompletedMessageStatus) IsKnown() bool
type ThreadStreamEventThreadStreamTurnCompletedMessageType ¶
type ThreadStreamEventThreadStreamTurnCompletedMessageType string
const (
ThreadStreamEventThreadStreamTurnCompletedMessageTypeTurnCompleted ThreadStreamEventThreadStreamTurnCompletedMessageType = "turn/completed"
)
func (ThreadStreamEventThreadStreamTurnCompletedMessageType) IsKnown ¶
func (r ThreadStreamEventThreadStreamTurnCompletedMessageType) IsKnown() bool
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 ¶
func (r ThreadStreamEventThreadStreamTurnStartedMessageType) IsKnown() bool
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 ThreadStreamEventUnion ¶
type ThreadStreamEventUnion interface {
// contains filtered or unexported methods
}
Union satisfied by ThreadStreamEventThreadStreamStatusMessage, ThreadStreamEventThreadStreamContentMessage, ThreadStreamEventThreadStreamProgressMessage, ThreadStreamEventThreadStreamTurnStartedMessage, ThreadStreamEventThreadStreamTurnCompletedMessage, ThreadStreamEventThreadStreamItemStartedMessage, ThreadStreamEventThreadStreamItemCompletedMessage, ThreadStreamEventThreadStreamTokenUsageMessage, ThreadStreamEventThreadStreamApprovalRequestedMessage or ThreadStreamEventThreadStreamApprovalResolvedMessage.
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 ¶
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 ¶
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 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 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 ¶
func (r ToolNewParamsBodyCreateHTTPToolSourceRequestType) IsKnown() bool
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 ¶
func (r ToolNewParamsBodyCreateMcpToolSourceRequestType) IsKnown() bool
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 ¶
func (r *ToolService) List(ctx context.Context, fleetID string, query ToolListParams, opts ...option.RequestOption) (res *pagination.SourcesCursorPage[ToolSource], err error)
List tools
func (*ToolService) ListAutoPaging ¶
func (r *ToolService) ListAutoPaging(ctx context.Context, fleetID string, query ToolListParams, opts ...option.RequestOption) *pagination.SourcesCursorPageAutoPager[ToolSource]
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 ¶
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 ¶
func (r ToolUpdateParamsBodyUpdateHTTPToolSourceRequestType) IsKnown() bool
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 ¶
func (r ToolUpdateParamsBodyUpdateMcpToolSourceRequestType) IsKnown() bool
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 ¶
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 ¶
func (r *WebhookService) List(ctx context.Context, fleetID string, query WebhookListParams, opts ...option.RequestOption) (res *pagination.SubscriptionsCursorPage[WebhookSubscription], err error)
List webhooks
func (*WebhookService) ListAutoPaging ¶
func (r *WebhookService) ListAutoPaging(ctx context.Context, fleetID string, query WebhookListParams, opts ...option.RequestOption) *pagination.SubscriptionsCursorPageAutoPager[WebhookSubscription]
List webhooks
func (*WebhookService) New ¶
func (r *WebhookService) New(ctx context.Context, fleetID string, body WebhookNewParams, opts ...option.RequestOption) (res *WebhookSubscriptionCreated, err error)
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)