Documentation
¶
Overview ¶
Package v1 contains the supported wire types from the pinned Agents API.
Index ¶
- Constants
- func ModelProviderAllowed(environment, source string) bool
- func ModelProviderRequired(environment string) bool
- func ResolvedHarnessConfig(raw json.RawMessage) json.RawMessage
- func TerminalTurnEvent(eventType string) bool
- func ValidateHarnessConfig(harness string, raw json.RawMessage) error
- func ValidateModelProtocol(protocol, harness string) error
- func ValidateNativeModelConfiguration(harness, model string, raw json.RawMessage) error
- type APIError
- type Agent
- type AgentContent
- type AgentDeleted
- type AgentMessageItem
- type AgentsCore
- type CreateAgentRequest
- type CreateCredentialRequest
- type CreateEventsRequest
- type CreateSessionRequest
- type CreateSubagentCallItem
- type CreateVaultRequest
- type Credential
- type CredentialAuth
- type CredentialAuthInput
- type CredentialAuthReplacement
- type CredentialDeleted
- type CredentialList
- type Environment
- type EnvironmentConnectionAction
- type EnvironmentFile
- type EnvironmentFileCreateRequest
- type EnvironmentFileList
- type EnvironmentInfo
- type EnvironmentInstallation
- type EnvironmentNetwork
- type EnvironmentNetworkInput
- type EnvironmentPackages
- type EnvironmentPackagesInput
- type EnvironmentPackagesResponse
- type EnvironmentTemplate
- type EnvironmentTemplateDeleted
- type EnvironmentTemplateList
- type EnvironmentTemplateRequest
- type ErrorResponse
- type ExecutionHarnessConfigSelection
- type ExecutionProviderSelection
- type ExecutionSelection
- type FunctionCallAction
- type FunctionToolInput
- type InlineAgent
- type InputContent
- type InputMessage
- type InputTokenDetails
- type Item
- type ItemContent
- type ItemList
- type MCPHTTPTransport
- type MCPTool
- type MCPToolInput
- type ModelConfigurationInput
- type ModelConfigurationSupport
- type ModelConfigurationView
- type ModelProviderError
- type ModelProviderInput
- func (p *ModelProviderInput) SafeView() *ModelProviderView
- func (p *ModelProviderInput) Validate() error
- func (p *ModelProviderInput) ValidateConfiguration(harness string, native json.RawMessage) error
- func (p *ModelProviderInput) ValidateHarness(harness string) error
- func (p *ModelProviderInput) ValidateHarnessWithRegistry(harness string, registry harnessconfig.Registry) error
- type ModelProviderView
- type MultiAgentConfig
- type NativeInstallationContext
- type OAuthCredentialRefresh
- type OAuthCredentialRefreshInput
- type OAuthCredentialRefreshReplacement
- type OAuthEndpointAuth
- type OAuthEndpointAuthInput
- type OAuthEndpointAuthReplacement
- type OutputTokenDetails
- type Reasoning
- type ReasoningItem
- type RequiredAction
- type RuntimeCPUObservation
- type RuntimeHistory
- type RuntimeHistoryCPU
- type RuntimeHistoryCoverage
- type RuntimeHistoryCoveragePoint
- type RuntimeHistoryMemory
- type RuntimeHistoryPoint
- type RuntimeHistoryRange
- type RuntimeHistorySeries
- type RuntimeHistoryTime
- type RuntimeHistoryTokenUsagePoint
- type RuntimeInstance
- type RuntimeMemoryObservation
- type RuntimeObservation
- type SavedAgent
- type SavedAgentConfiguration
- type SavedAgentCore
- type SavedAgentCoreInput
- type SavedAgentList
- type SavedAgentText
- type SavedAgentTextFormat
- type SavedAgentTextInput
- type SendSubagentInputCallItem
- type Session
- type SessionArtifact
- type SessionArtifactDeleted
- type SessionArtifactList
- type SessionCore
- type SessionDeleted
- type SessionEnvironment
- type SessionEnvironmentState
- type SessionEvent
- type SessionExecutionConfiguration
- type SessionExecutionInput
- type SessionInput
- type SessionList
- type Skill
- type SkillDeleted
- type SkillList
- type SkillUpdateRequest
- type SkillVersion
- type SkillVersionDeleted
- type SkillVersionList
- type SourceFile
- type SourceFileDeleted
- type SourceFileList
- type StreamError
- type Subagent
- type SubagentControlCallItem
- type SubagentList
- type SummaryText
- type TextConfig
- type TextConfigInput
- type TextFormat
- type TokenUsage
- type Turn
- type TurnError
- type TurnList
- type UpdateAgentRequest
- type UpdateCredentialRequest
- type UpdateSessionRequest
- type Vault
- type VaultDeleted
- type VaultList
- type WaitForSubagentsCallItem
- type WebSearchAction
Constants ¶
const ( ModelProviderSourceSession = "session" ModelProviderSourceAgent = "agent" ModelProviderSourceDeployment = "deployment" )
Model provider sources, as recorded in a Session's execution configuration.
Variables ¶
This section is empty.
Functions ¶
func ModelProviderAllowed ¶
ModelProviderAllowed reports whether a provider bundle from source may be frozen into a Session placed in environment. Caller bundles (Session or saved Agent) run on Core-managed or caller-owned compute. The deployment default holds the operator's key, so it stays on operator compute: openai_hosted and operator-registered none devices. An unknown source is allowed only where every source is.
func ModelProviderRequired ¶
ModelProviderRequired reports whether a Session in environment cannot run without a frozen provider bundle. Hosted and self-hosted Runtimes carry no model configuration of their own; a none device may use its own environment.
func ResolvedHarnessConfig ¶
func ResolvedHarnessConfig(raw json.RawMessage) json.RawMessage
func TerminalTurnEvent ¶
TerminalTurnEvent reports whether an event type settles a Turn.
func ValidateHarnessConfig ¶
func ValidateHarnessConfig(harness string, raw json.RawMessage) error
func ValidateModelProtocol ¶
func ValidateNativeModelConfiguration ¶
func ValidateNativeModelConfiguration(harness, model string, raw json.RawMessage) error
ValidateNativeModelConfiguration checks the resolved public execution inputs through the same adapter validation used by deployment administration.
Types ¶
type Agent ¶
type Agent struct {
XAgentsCore *AgentsCore `json:"x_agents_core,omitempty" extensions:"x-nullable"`
ID string `json:"id" binding:"required"`
Instructions *string `json:"instructions" extensions:"x-nullable"`
Model string `json:"model" binding:"required"`
MultiAgent MultiAgentConfig `json:"multi_agent" binding:"required"`
Name *string `json:"name" extensions:"x-nullable"`
Reasoning Reasoning `json:"reasoning" binding:"required"`
ServiceTier string `json:"service_tier" enums:"auto" binding:"required"`
Text TextConfig `json:"text" binding:"required"`
Tools []json.RawMessage `json:"tools" swaggertype:"array,object" binding:"required"`
}
type AgentContent ¶
type AgentContent struct {
Type string `json:"type" binding:"required" enums:"output_text,encrypted_content"`
Text *string `json:"text,omitempty"`
EncryptedContent *string `json:"encrypted_content,omitempty"`
}
AgentContent is the pinned content union used for inter-agent instructions and messages.
type AgentDeleted ¶
type AgentDeleted struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"agent.deleted"`
Deleted bool `json:"deleted" binding:"required" enums:"true"`
}
AgentDeleted is the pinned successful saved-resource deletion response.
type AgentMessageItem ¶
type AgentMessageItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"agent_message"`
SenderAgentID string `json:"sender_agent_id" binding:"required"`
RecipientAgentID string `json:"recipient_agent_id" binding:"required"`
Content []AgentContent `json:"content" binding:"required"`
}
type AgentsCore ¶
type AgentsCore struct {
Harness string `json:"harness,omitempty"`
HarnessConfig json.RawMessage `json:"harness_config,omitempty" swaggertype:"object"`
}
AgentsCore selects an existing Core harness independently of model identity.
func (*AgentsCore) Validate ¶
func (x *AgentsCore) Validate() error
type CreateAgentRequest ¶
type CreateAgentRequest struct {
XAgentsCore *SavedAgentCoreInput `json:"x_agents_core,omitempty" extensions:"x-nullable"`
Model *string `json:"model" binding:"required"`
Name *string `json:"name,omitempty" extensions:"x-nullable" maxLength:"128"`
Instructions *string `json:"instructions,omitempty" extensions:"x-nullable"`
Metadata map[string]*string `json:"metadata,omitempty" swaggertype:"object,string" extensions:"x-nullable"`
MultiAgent json.RawMessage `json:"multi_agent,omitempty" swaggertype:"object" extensions:"x-nullable"`
Reasoning *Reasoning `json:"reasoning,omitempty" extensions:"x-nullable"`
ServiceTier *string `json:"service_tier,omitempty" enums:"auto,default,flex,priority,fast" extensions:"x-nullable"`
Text *SavedAgentTextInput `json:"text,omitempty" extensions:"x-nullable"`
Tools []json.RawMessage `json:"tools,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
}
CreateAgentRequest describes reusable configuration, not an execution request. MCP/web-search tools and model-derived reasoning defaults remain incomplete.
type CreateCredentialRequest ¶
type CreateCredentialRequest struct {
Name *string `json:"name" binding:"required"`
Auth *CredentialAuthInput `json:"auth" binding:"required"`
}
type CreateEventsRequest ¶
type CreateEventsRequest struct {
Events []SessionInput `json:"events" binding:"required"`
}
type CreateSessionRequest ¶
type CreateSessionRequest struct {
XAgentsCore *SessionExecutionInput `json:"x_agents_core,omitempty"`
Agent *InlineAgent `json:"agent,omitempty"`
AgentID *string `json:"agent_id,omitempty"`
Environment *Environment `json:"environment" binding:"required"`
// Input accepts a string or an ordered array of user InputMessage objects.
// Required for none and streamed creation outside self_hosted; otherwise optional.
Input any `json:"input,omitempty" extensions:"x-nullable"`
Metadata map[string]string `json:"metadata,omitempty" extensions:"x-nullable"`
Stream bool `json:"stream,omitempty" default:"false"`
VaultIDs []string `json:"vault_ids,omitempty"`
}
CreateSessionRequest supports inline configuration or a saved Agent reference. Initial text input is accepted with ordinary or streaming responses.
type CreateSubagentCallItem ¶
type CreateSubagentCallItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"create_subagent_call"`
Status string `json:"status" binding:"required" enums:"in_progress,completed,failed,incomplete"`
AgentID string `json:"agent_id" binding:"required"`
Content []AgentContent `json:"content" binding:"required"`
Model *string `json:"model" extensions:"x-nullable"`
ReasoningEffort *string `json:"reasoning_effort" extensions:"x-nullable"`
}
type CreateVaultRequest ¶
type CreateVaultRequest struct {
Name *string `json:"name,omitempty"`
Metadata map[string]*string `json:"metadata,omitempty" swaggertype:"object,string" extensions:"x-nullable"`
}
CreateVaultRequest creates a project-owned credential container. An omitted name stays null; a supplied name must be a string with 1–256 UTF-8 bytes after trimming.
type Credential ¶
type Credential struct {
ID string `json:"id" binding:"required"`
VaultID string `json:"vault_id" binding:"required"`
Name string `json:"name" binding:"required"`
Object string `json:"object" binding:"required" enums:"vault.credential"`
Auth CredentialAuth `json:"auth" binding:"required"`
CreatedAt int64 `json:"created_at" binding:"required"`
UpdatedAt int64 `json:"updated_at" binding:"required"`
}
type CredentialAuth ¶
type CredentialAuth struct {
Type string `json:"type" binding:"required" enums:"static_bearer,mcp_oauth"`
MCPServerURL string `json:"mcp_server_url" binding:"required"`
ExpiresAt *string `json:"expires_at" extensions:"x-nullable"`
Refresh *OAuthCredentialRefresh `json:"refresh" extensions:"x-nullable"`
}
CredentialAuth contains safe metadata only. OAuth nullable fields are emitted for OAuth credentials and excluded entirely from static bearer resources.
func (CredentialAuth) MarshalJSON ¶
func (a CredentialAuth) MarshalJSON() ([]byte, error)
type CredentialAuthInput ¶
type CredentialAuthInput struct {
Type string `json:"type" binding:"required" enums:"static_bearer,mcp_oauth"`
MCPServerURL *string `json:"mcp_server_url" binding:"required"`
Token *string `json:"token,omitempty" minLength:"1"`
AccessToken *string `json:"access_token,omitempty" minLength:"1"`
ExpiresAt *string `json:"expires_at,omitempty" extensions:"x-nullable"`
Refresh *OAuthCredentialRefreshInput `json:"refresh,omitempty" extensions:"x-nullable"`
}
CredentialAuthInput represents the pinned create union. The API validates each discriminator separately so fields cannot cross authentication variants.
type CredentialAuthReplacement ¶
type CredentialAuthReplacement struct {
Type string `json:"type" binding:"required" enums:"static_bearer,mcp_oauth"`
Token *string `json:"token,omitempty" minLength:"1"`
AccessToken *string `json:"access_token,omitempty" extensions:"x-nullable" minLength:"1"`
ExpiresAt json.RawMessage `json:"expires_at,omitempty" swaggertype:"string" extensions:"x-nullable"`
Refresh *OAuthCredentialRefreshReplacement `json:"refresh,omitempty" extensions:"x-nullable"`
}
Raw nullable fields retain omission separately from explicit null.
type CredentialDeleted ¶
type CredentialList ¶
type CredentialList struct {
Object string `json:"object" binding:"required" enums:"list"`
Data []Credential `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
}
type Environment ¶
type Environment struct {
Plugins []json.RawMessage `json:"plugins,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
Skills []json.RawMessage `json:"skills,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
Env map[string]string `json:"env,omitempty" extensions:"x-nullable"`
SetupCommands []json.RawMessage `json:"setup_commands,omitempty" extensions:"x-nullable" swaggertype:"array,object"`
Packages *EnvironmentPackages `json:"packages,omitempty" extensions:"x-nullable"`
Files []json.RawMessage `json:"files,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
EnvironmentTemplateID string `json:"environment_template_id,omitempty"`
Type string `json:"type" enums:"none,self_hosted,openai_hosted" binding:"required"`
WorkspaceDirectory string `json:"workspace_directory,omitempty"`
CapabilityDirectories []string `json:"capability_directories,omitempty" extensions:"x-nullable"`
Network *EnvironmentNetworkInput `json:"network,omitempty" extensions:"x-nullable"`
}
Environment contains supported request variants; self-hosted creation requires a workspace directory.
type EnvironmentFile ¶
type EnvironmentFileCreateRequest ¶
type EnvironmentFileCreateRequest struct {
Type string `json:"type" binding:"required" enums:"inline,file_id"`
Data *string `json:"data,omitempty"`
FileID *string `json:"file_id,omitempty"`
Path *string `json:"path" binding:"required"`
}
EnvironmentFileCreateRequest represents the pinned inline/file_id union.
type EnvironmentFileList ¶
type EnvironmentFileList struct {
Object string `json:"object" binding:"required" enums:"page"`
Data []EnvironmentFile `json:"data" binding:"required"`
Next *string `json:"next" extensions:"x-nullable"`
HasMore bool `json:"has_more" binding:"required"`
}
EnvironmentFileList is the official token page: has_more is true exactly when next carries a continuation token.
type EnvironmentInfo ¶
type EnvironmentInfo struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"agent.environment"`
Type string `json:"type" binding:"required" enums:"openai_hosted,self_hosted"`
Status string `json:"status" binding:"required" enums:"pending,connected,disconnected,expired,failed"`
Files []json.RawMessage `json:"files" binding:"required" swaggertype:"array,object"`
Plugins []json.RawMessage `json:"plugins" binding:"required" swaggertype:"array,object"`
Skills []json.RawMessage `json:"skills" binding:"required" swaggertype:"array,object"`
}
EnvironmentInfo contains safe installed metadata; populated installation variants remain unsupported.
type EnvironmentInstallation ¶
type EnvironmentInstallation struct {
Status string `json:"status" enums:"available,unavailable"`
Version string `json:"version"`
ExpiresAt int64 `json:"expires_at,omitempty"`
Commands map[string]string `json:"commands,omitempty"`
Message string `json:"message,omitempty"`
}
EnvironmentInstallation contains short-lived, Environment-scoped commands. Only authenticated creation and detail responses include this authorization.
type EnvironmentNetwork ¶
type EnvironmentNetwork struct {
Access string `json:"access" binding:"required" enums:"enabled,disabled,restricted"`
AllowedDomains []string `json:"allowed_domains" binding:"required"`
}
EnvironmentNetwork is the effective hosted network policy.
type EnvironmentNetworkInput ¶
type EnvironmentNetworkInput struct {
Access string `json:"access" binding:"required" enums:"enabled,disabled,restricted"`
AllowedDomains []string `json:"allowed_domains,omitempty" extensions:"x-nullable"`
}
EnvironmentNetworkInput preserves the optional request domain list.
type EnvironmentPackages ¶
type EnvironmentPackagesInput ¶
type EnvironmentPackagesInput struct {
NPM []string `json:"npm,omitempty" extensions:"x-nullable"`
Python []string `json:"python,omitempty" extensions:"x-nullable"`
}
EnvironmentPackagesInput keeps optional nullable request defaults separate from the complete package lists returned by resource responses.
type EnvironmentPackagesResponse ¶
type EnvironmentPackagesResponse struct {
NPM []string `json:"npm" binding:"required"`
Python []string `json:"python" binding:"required"`
System []string `json:"system" binding:"required"`
}
EnvironmentPackagesResponse preserves the official response schema. System is always empty: Runtime system-package requests are unsupported.
type EnvironmentTemplate ¶
type EnvironmentTemplate struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"agent.environment.template"`
Name *string `json:"name" extensions:"x-nullable"`
CreatedAt int64 `json:"created_at" binding:"required"`
UpdatedAt int64 `json:"updated_at" binding:"required"`
CapabilityDirectories []string `json:"capability_directories" binding:"required"`
Network EnvironmentNetwork `json:"network" binding:"required"`
Packages EnvironmentPackagesResponse `json:"packages" binding:"required"`
Files []json.RawMessage `json:"files" binding:"required" swaggertype:"array,object"`
Plugins []json.RawMessage `json:"plugins" binding:"required" swaggertype:"array,object"`
Skills []json.RawMessage `json:"skills" binding:"required" swaggertype:"array,object"`
}
EnvironmentTemplate returns safe configuration metadata only.
type EnvironmentTemplateList ¶
type EnvironmentTemplateList struct {
Object string `json:"object" binding:"required" enums:"list"`
Data []EnvironmentTemplate `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
}
type EnvironmentTemplateRequest ¶
type EnvironmentTemplateRequest struct {
Name *string `json:"name,omitempty" extensions:"x-nullable"`
Network *EnvironmentNetworkInput `json:"network,omitempty" extensions:"x-nullable"`
CapabilityDirectories []string `json:"capability_directories,omitempty" extensions:"x-nullable"`
Env map[string]string `json:"env,omitempty" extensions:"x-nullable"`
Files []json.RawMessage `json:"files,omitempty" extensions:"x-nullable" swaggertype:"array,object"`
Packages *EnvironmentPackagesInput `json:"packages,omitempty" extensions:"x-nullable"`
Plugins []json.RawMessage `json:"plugins,omitempty" extensions:"x-nullable" swaggertype:"array,object"`
Skills []json.RawMessage `json:"skills,omitempty" extensions:"x-nullable" swaggertype:"array,object"`
SetupCommands []json.RawMessage `json:"setup_commands,omitempty" extensions:"x-nullable" swaggertype:"array,object"`
}
EnvironmentTemplateRequest exposes pinned input fields; only qualified installations execute.
type ErrorResponse ¶
type ErrorResponse struct {
Error APIError `json:"error" binding:"required"`
}
type ExecutionHarnessConfigSelection ¶
type ExecutionHarnessConfigSelection struct {
Value json.RawMessage `json:"value" swaggertype:"object" binding:"required"`
Source string `json:"source" binding:"required" enums:"session,agent,deployment,unknown"`
}
ExecutionHarnessConfigSelection records the immutable adapter parameters.
type ExecutionProviderSelection ¶
type ExecutionProviderSelection struct {
Source string `json:"source" binding:"required" enums:"session,agent,deployment,unknown"`
Status string `json:"status" binding:"required" enums:"available,redacted,unavailable"`
Configuration *ModelProviderView `json:"configuration" binding:"required" extensions:"x-nullable"`
}
Deployment credentials have no public endpoint projection. Unavailable means no trustworthy safe provider snapshot was recorded, not failed readiness.
type ExecutionSelection ¶
type FunctionCallAction ¶
type FunctionCallAction struct {
Arguments any `json:"arguments" binding:"required"`
CallID string `json:"call_id" binding:"required"`
Name string `json:"name" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" enums:"function_call" binding:"required"`
}
FunctionCallAction is the supported function-call variant of required_actions.
type FunctionToolInput ¶
type FunctionToolInput struct {
Type string `json:"type" enums:"function" binding:"required"`
Name *string `json:"name" binding:"required"`
Description *string `json:"description" binding:"required"`
Parameters json.RawMessage `json:"parameters" swaggertype:"object" binding:"required"`
DeferLoading json.RawMessage `json:"defer_loading,omitempty" swaggertype:"boolean"`
}
FunctionToolInput is the supported application-defined tool configuration.
type InlineAgent ¶
type InlineAgent struct {
XAgentsCore *AgentsCore `json:"x_agents_core,omitempty" extensions:"x-nullable"`
Model *string `json:"model,omitempty"`
Instructions *string `json:"instructions,omitempty" extensions:"x-nullable"`
MultiAgent json.RawMessage `json:"multi_agent,omitempty" swaggertype:"object" extensions:"x-nullable"`
Reasoning *Reasoning `json:"reasoning,omitempty" extensions:"x-nullable"`
ServiceTier *string `json:"service_tier,omitempty" enums:"auto,default,flex,priority,fast" extensions:"x-nullable"`
Text *SavedAgentTextInput `json:"text,omitempty" extensions:"x-nullable"`
Tools []json.RawMessage `json:"tools,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
}
InlineAgent supplies a complete inline configuration or per-Session overrides. With agent_id, omitted fields inherit and supplied fields replace saved values.
type InputContent ¶
type InputMessage ¶
type InputMessage struct {
Type string `json:"type,omitempty" enums:"message"`
Role string `json:"role" enums:"user" binding:"required"`
Content []InputContent `json:"content" binding:"required"`
}
type InputTokenDetails ¶
type InputTokenDetails struct {
CachedTokens int64 `json:"cached_tokens" binding:"required"`
}
type Item ¶
type Item struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `` /* 283-byte string literal not displayed */
Status string `json:"status" enums:"in_progress,completed,failed,incomplete"`
Role string `json:"role,omitempty" enums:"user,assistant"`
Phase string `json:"phase,omitempty" enums:"commentary,final_answer" extensions:"x-nullable"`
Content []ItemContent `json:"content,omitempty"`
Command string `json:"command,omitempty"`
Cwd *string `json:"cwd,omitempty"`
DurationMS *int64 `json:"duration_ms,omitempty"`
ExitCode *int64 `json:"exit_code,omitempty"`
Name string `json:"name,omitempty"`
CallID string `json:"call_id,omitempty"`
ServerLabel string `json:"server_label,omitempty"`
Arguments any `json:"arguments,omitempty"`
Output any `json:"output,omitempty"`
Error any `json:"error,omitempty"`
Action *WebSearchAction `json:"action,omitempty"`
AgentID string `json:"agent_id,omitempty"`
SenderAgentID string `json:"sender_agent_id,omitempty"`
RecipientAgentID string `json:"recipient_agent_id,omitempty"`
RecipientAgentIDs []string `json:"recipient_agent_ids,omitempty"`
Model *string `json:"model,omitempty"`
ReasoningEffort *string `json:"reasoning_effort,omitempty"`
Summary []SummaryText `json:"summary,omitempty"`
}
Item contains the supported variants of the pinned Session Item union.
func (Item) MarshalJSON ¶
MarshalJSON renders the wire shape. Messages always carry content and a nullable phase, and function results a nullable output and error, as in the pinned responses (EVT-09, SES-25). Other variants use the stored encoding.
func (Item) MarshalStored ¶
MarshalStored encodes a persisted Item payload. It keeps the encoding used before the wire nulls above, so stored payloads and the byte comparison of replayed child Items do not change. Coordination variants keep their required fields and nulls in both forms.
func (*Item) UnmarshalJSON ¶
UnmarshalJSON preserves integer precision in tool arguments and structured results.
type ItemContent ¶
type MCPHTTPTransport ¶
type MCPTool ¶
type MCPTool struct {
Type string `json:"type"`
ServerLabel string `json:"server_label"`
Transport MCPHTTPTransport `json:"transport"`
AllowedTools *[]string `json:"allowed_tools"`
ConnectionOrigin string `json:"connection_origin"`
CredentialID *string `json:"credential_id"`
RequestMetadata map[string]json.RawMessage `json:"request_metadata"`
Required bool `json:"required"`
}
MCPTool is the supported HTTP resource shape. Headers belong only to saved configuration; effective Session transports expose type and server_url.
type MCPToolInput ¶
type MCPToolInput struct {
Type string `json:"type"`
ServerLabel *string `json:"server_label"`
Transport json.RawMessage `json:"transport"`
AllowedTools json.RawMessage `json:"allowed_tools"`
ConnectionOrigin *string `json:"connection_origin"`
CredentialID *string `json:"credential_id"`
RequestMetadata json.RawMessage `json:"request_metadata"`
Required json.RawMessage `json:"required"`
}
MCPToolInput preserves presence for the pinned MCP configuration union.
type ModelConfigurationInput ¶
type ModelConfigurationInput struct {
ModelProvider ModelProviderInput `json:"model_provider" binding:"required"`
Model string `json:"model" binding:"required"`
HarnessConfig json.RawMessage `json:"harness_config,omitempty" swaggertype:"object"`
}
ModelConfigurationInput combines the existing provider contract with a model and adapter-owned native model parameters. It is never a model catalog entry.
func (ModelConfigurationInput) SafeView ¶
func (c ModelConfigurationInput) SafeView() ModelConfigurationView
func (ModelConfigurationInput) ValidateHarness ¶
func (c ModelConfigurationInput) ValidateHarness(harness string) error
type ModelConfigurationSupport ¶
type ModelConfigurationSupport struct {
Protocols []string `json:"protocols" binding:"required"`
AcceptsHarnessConfig bool `json:"accepts_harness_config" binding:"required"`
TokenLimitsRequired bool `json:"token_limits_required" binding:"required"`
}
ModelConfigurationSupport describes this build, not remote-model availability.
type ModelConfigurationView ¶
type ModelConfigurationView struct {
ModelProvider *ModelProviderView `json:"model_provider" binding:"required"`
Model string `json:"model" binding:"required"`
HarnessConfig json.RawMessage `json:"harness_config" swaggertype:"object" binding:"required"`
}
type ModelProviderError ¶
type ModelProviderError struct {
Code, Param string
// contains filtered or unexported fields
}
ModelProviderError preserves the shared validation message while allowing Core administration to identify a field. It contains no submitted values.
func (*ModelProviderError) Error ¶
func (e *ModelProviderError) Error() string
type ModelProviderInput ¶
type ModelProviderInput struct {
Protocol string `json:"protocol" enums:"anthropic,responses,chat_completions" binding:"required"`
BaseURL string `json:"base_url" binding:"required"`
APIKey string `json:"api_key" binding:"required"`
ContextWindow int32 `json:"context_window,omitempty"`
MaxOutputTokens int32 `json:"max_output_tokens,omitempty"`
}
func (*ModelProviderInput) SafeView ¶
func (p *ModelProviderInput) SafeView() *ModelProviderView
func (*ModelProviderInput) Validate ¶
func (p *ModelProviderInput) Validate() error
func (*ModelProviderInput) ValidateConfiguration ¶
func (p *ModelProviderInput) ValidateConfiguration(harness string, native json.RawMessage) error
func (*ModelProviderInput) ValidateHarness ¶
func (p *ModelProviderInput) ValidateHarness(harness string) error
func (*ModelProviderInput) ValidateHarnessWithRegistry ¶
func (p *ModelProviderInput) ValidateHarnessWithRegistry(harness string, registry harnessconfig.Registry) error
ValidateHarnessWithRegistry validates provider input against adapter-owned rules. It does not enable an execution engine or placement.
type ModelProviderView ¶
type ModelProviderView struct {
Protocol string `json:"protocol" enums:"anthropic,responses,chat_completions" binding:"required"`
BaseURL string `json:"base_url" binding:"required"`
ContextWindow int32 `json:"context_window,omitempty"`
MaxOutputTokens int32 `json:"max_output_tokens,omitempty"`
APIKeyConfigured bool `json:"api_key_configured" binding:"required"`
}
func (*ModelProviderView) ValidateHarness ¶
func (p *ModelProviderView) ValidateHarness(harness string) error
ValidateHarness checks non-confidential protocol and limit compatibility.
func (*ModelProviderView) ValidateHarnessWithRegistry ¶
func (p *ModelProviderView) ValidateHarnessWithRegistry(harness string, registry harnessconfig.Registry) error
type MultiAgentConfig ¶
type NativeInstallationContext ¶
type NativeInstallationContext struct {
Version string `json:"version"`
ProtocolVersion string `json:"protocol_version"`
EnvironmentID string `json:"environment_id"`
RemoteURL string `json:"remote_url"`
Workspace string `json:"workspace_directory"`
Harness string `json:"harness"`
}
NativeInstallationContext is bootstrap metadata, not an execution protocol.
type OAuthCredentialRefresh ¶
type OAuthCredentialRefresh struct {
ClientID string `json:"client_id" binding:"required"`
TokenEndpoint string `json:"token_endpoint" binding:"required"`
TokenEndpointAuth OAuthEndpointAuth `json:"token_endpoint_auth" binding:"required"`
Resource *string `json:"resource" extensions:"x-nullable"`
Scope *string `json:"scope" extensions:"x-nullable"`
}
type OAuthCredentialRefreshInput ¶
type OAuthCredentialRefreshInput struct {
ClientID *string `json:"client_id" binding:"required"`
RefreshToken *string `json:"refresh_token" binding:"required"`
TokenEndpoint *string `json:"token_endpoint" binding:"required"`
TokenEndpointAuth *OAuthEndpointAuthInput `json:"token_endpoint_auth" binding:"required"`
Resource *string `json:"resource,omitempty" extensions:"x-nullable"`
Scope *string `json:"scope,omitempty" extensions:"x-nullable"`
}
type OAuthCredentialRefreshReplacement ¶
type OAuthCredentialRefreshReplacement struct {
RefreshToken *string `json:"refresh_token,omitempty" extensions:"x-nullable"`
Scope json.RawMessage `json:"scope,omitempty" swaggertype:"string" extensions:"x-nullable"`
TokenEndpointAuth *OAuthEndpointAuthReplacement `json:"token_endpoint_auth,omitempty" extensions:"x-nullable"`
}
type OAuthEndpointAuth ¶
type OAuthEndpointAuth struct {
Type string `json:"type" binding:"required" enums:"none,client_secret_basic,client_secret_post"`
}
type OAuthEndpointAuthInput ¶
type OutputTokenDetails ¶
type OutputTokenDetails struct {
ReasoningTokens int64 `json:"reasoning_tokens" binding:"required"`
}
type ReasoningItem ¶
type ReasoningItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"reasoning"`
Status *string `json:"status" extensions:"x-nullable" enums:"in_progress,completed,incomplete"`
Summary []SummaryText `json:"summary" binding:"required"`
}
type RequiredAction ¶
type RequiredAction struct {
Type string `json:"type" enums:"function_call,environment_connection" binding:"required"`
Arguments any `json:"arguments,omitempty"`
CallID string `json:"call_id,omitempty"`
Name string `json:"name,omitempty"`
TurnID string `json:"turn_id,omitempty"`
EnvironmentID string `json:"environment_id,omitempty"`
}
RequiredAction contains the supported variants of the Session action union.
func (RequiredAction) MarshalJSON ¶
func (a RequiredAction) MarshalJSON() ([]byte, error)
MarshalJSON preserves required null function arguments without exposing function fields on connection actions.
func (*RequiredAction) UnmarshalJSON ¶
func (a *RequiredAction) UnmarshalJSON(raw []byte) error
UnmarshalJSON preserves function argument integer precision.
type RuntimeCPUObservation ¶
type RuntimeCPUObservation struct {
UsageSecondsTotal *float64 `json:"usage_seconds_total" extensions:"x-nullable" binding:"required" minimum:"0"`
CapacityCores *float64 `json:"capacity_cores" extensions:"x-nullable" binding:"required" minimum:"5e-324"`
UsageCores *float64 `json:"usage_cores" extensions:"x-nullable" binding:"required" minimum:"0"`
UtilizationRatio *float64 `json:"utilization_ratio" extensions:"x-nullable" binding:"required" minimum:"0"`
}
type RuntimeHistory ¶
type RuntimeHistory struct {
Object string `json:"object" enums:"agent.runtime_history" binding:"required"`
Source string `json:"source" enums:"durable" binding:"required"`
SessionID string `json:"session_id" binding:"required" format:"uuid"`
RequestedRange RuntimeHistoryRange `json:"requested_range" binding:"required"`
ResolutionSeconds int64 `json:"resolution_seconds" binding:"required" minimum:"1" maximum:"9007199254740991"`
GeneratedAt int64 `json:"generated_at" binding:"required" minimum:"0" maximum:"9007199254740991"`
Coverage RuntimeHistoryCoverage `json:"coverage" binding:"required"`
Series []RuntimeHistorySeries `json:"series" binding:"required" validate:"max=1000"`
TokenUsage []RuntimeHistoryTokenUsagePoint `json:"token_usage" binding:"required" validate:"max=10000"`
}
type RuntimeHistoryCPU ¶
type RuntimeHistoryCPU struct {
ContributorCount int `json:"contributor_count" binding:"required" minimum:"1" maximum:"9007199254740991"`
UtilizationRatio *float64 `json:"utilization_ratio" extensions:"x-nullable" binding:"required" minimum:"0"`
CapacityCores *float64 `json:"capacity_cores" extensions:"x-nullable" binding:"required" minimum:"5e-324"`
}
type RuntimeHistoryCoverage ¶
type RuntimeHistoryCoverage struct {
RetainedStart int64 `json:"retained_start" binding:"required" minimum:"0" maximum:"9007199254740991"`
FirstSampleAt *int64 `json:"first_sample_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
LastSampleAt *int64 `json:"last_sample_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
SampleCount int64 `json:"sample_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
ExpectedSampleCount int64 `json:"expected_sample_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
Buckets []RuntimeHistoryCoveragePoint `json:"buckets" binding:"required" validate:"max=10000"`
}
type RuntimeHistoryCoveragePoint ¶
type RuntimeHistoryCoveragePoint struct {
Start int64 `json:"start" binding:"required" minimum:"0" maximum:"9007199254740991"`
End int64 `json:"end" binding:"required" minimum:"1" maximum:"9007199254740991"`
FirstObservedAt *int64 `json:"first_observed_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
LastObservedAt *int64 `json:"last_observed_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
ObservationCount int `json:"observation_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
ObservedCount int `json:"observed_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
}
type RuntimeHistoryMemory ¶
type RuntimeHistoryMemory struct {
ContributorCount int `json:"contributor_count" binding:"required" minimum:"1" maximum:"9007199254740991"`
UsageBytes *uint64 `json:"usage_bytes" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
LimitBytes *uint64 `json:"limit_bytes" extensions:"x-nullable" binding:"required" minimum:"1" maximum:"9007199254740991"`
}
type RuntimeHistoryPoint ¶
type RuntimeHistoryPoint struct {
Start int64 `json:"start" binding:"required" minimum:"0" maximum:"9007199254740991"`
End int64 `json:"end" binding:"required" minimum:"1" maximum:"9007199254740991"`
FirstObservedAt *int64 `json:"first_observed_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
LastObservedAt *int64 `json:"last_observed_at" extensions:"x-nullable" binding:"required" minimum:"0" maximum:"9007199254740991"`
ObservationCount int `json:"observation_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
ObservedCount int `json:"observed_count" binding:"required" minimum:"0" maximum:"9007199254740991"`
CPU *RuntimeHistoryCPU `json:"cpu" extensions:"x-nullable" binding:"required"`
Memory *RuntimeHistoryMemory `json:"memory" extensions:"x-nullable" binding:"required"`
}
type RuntimeHistoryRange ¶
type RuntimeHistorySeries ¶
type RuntimeHistorySeries struct {
EnvironmentID string `json:"environment_id" binding:"required" format:"uuid"`
AllocationID string `json:"allocation_id" binding:"required" format:"uuid"`
StartedAt RuntimeHistoryTime `json:"started_at" binding:"required"`
ProviderType string `json:"provider_type" binding:"required" pattern:"^[a-z][a-z0-9_]{0,31}$"`
Points []RuntimeHistoryPoint `json:"points" binding:"required" validate:"max=10000"`
}
type RuntimeHistoryTime ¶
type RuntimeHistoryTime struct {
Seconds int64 `json:"seconds" binding:"required" minimum:"0" maximum:"9007199254740991"`
Nanoseconds int `json:"nanoseconds" binding:"required" minimum:"0" maximum:"999999999"`
}
RuntimeHistoryTime preserves the earliest retained provider start estimate. It is not a per-bucket compute start. AllocationID is the series identity.
type RuntimeHistoryTokenUsagePoint ¶
type RuntimeHistoryTokenUsagePoint struct {
Start int64 `json:"start" binding:"required" minimum:"0" maximum:"9007199254740991"`
End int64 `json:"end" binding:"required" minimum:"1" maximum:"9007199254740991"`
SampledAt int64 `json:"sampled_at" binding:"required" minimum:"0" maximum:"9007199254740991"`
InputTokens uint64 `json:"input_tokens" binding:"required" minimum:"0" maximum:"9007199254740991"`
OutputTokens uint64 `json:"output_tokens" binding:"required" minimum:"0" maximum:"9007199254740991"`
}
RuntimeHistoryTokenUsagePoint is the final cumulative measured Session usage observed in one server-selected bucket. It counts every recorded root Turn snapshot, active Turns included, unlike public Session usage.
type RuntimeInstance ¶
type RuntimeInstance struct {
Kind string `json:"kind" enums:"managed_allocation,self_hosted_connection,none" binding:"required"`
AllocationID *string `json:"allocation_id" extensions:"x-nullable" binding:"required" format:"uuid"`
DeviceID *string `json:"device_id" extensions:"x-nullable" binding:"required" format:"uuid"`
ConnectionGeneration *string `json:"connection_generation" extensions:"x-nullable" binding:"required" format:"uuid"`
}
type RuntimeObservation ¶
type RuntimeObservation struct {
ID string `json:"id" binding:"required" format:"uuid"`
Object string `json:"object" enums:"agent.runtime_observation" binding:"required"`
SessionID string `json:"session_id" binding:"required" format:"uuid"`
EnvironmentID *string `json:"environment_id" extensions:"x-nullable" binding:"required" format:"uuid"`
Mode string `json:"mode" enums:"none,self_hosted,openai_hosted" binding:"required"`
ProviderType *string `json:"provider_type" extensions:"x-nullable" binding:"required" pattern:"^[a-z][a-z0-9_]{0,31}$"`
Instance RuntimeInstance `json:"instance" binding:"required"`
LifecycleState *string `json:"lifecycle_state" extensions:"x-nullable" binding:"required" enums:"active,sleeping,transitioning,pending,stopped"`
Status string `json:"status" enums:"observed,unsupported,unavailable" binding:"required"`
Reason *string `` /* 187-byte string literal not displayed */
AllocationCreatedAt *int64 `json:"allocation_created_at" extensions:"x-nullable" binding:"required" minimum:"0"`
ResolvedAt int64 `json:"resolved_at" binding:"required" minimum:"0"`
ObservedAt *int64 `json:"observed_at" extensions:"x-nullable" binding:"required" minimum:"0"`
StartedAt *int64 `json:"started_at" extensions:"x-nullable" binding:"required" minimum:"0"`
CPU *RuntimeCPUObservation `json:"cpu" extensions:"x-nullable" binding:"required"`
Memory *RuntimeMemoryObservation `json:"memory" extensions:"x-nullable" binding:"required"`
}
type SavedAgent ¶
type SavedAgent struct {
SavedAgentConfiguration
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"agent"`
Metadata map[string]string `json:"metadata" binding:"required"`
CreatedAt int64 `json:"created_at" binding:"required"`
UpdatedAt int64 `json:"updated_at" binding:"required"`
}
func (SavedAgent) MarshalJSON ¶
func (a SavedAgent) MarshalJSON() ([]byte, error)
MarshalJSON renders reasoning with explicit null keys. The stored SavedAgentConfiguration keeps its original encoding.
type SavedAgentConfiguration ¶
type SavedAgentConfiguration struct {
XAgentsCore *SavedAgentCore `json:"x_agents_core,omitempty" extensions:"x-nullable"`
Model string `json:"model" binding:"required"`
Name *string `json:"name" extensions:"x-nullable"`
Instructions *string `json:"instructions" extensions:"x-nullable"`
MultiAgent MultiAgentConfig `json:"multi_agent" binding:"required"`
Reasoning Reasoning `json:"reasoning" binding:"required"`
ServiceTier string `json:"service_tier" binding:"required" enums:"auto,default,flex,priority,fast"`
Text SavedAgentText `json:"text" binding:"required"`
Tools []json.RawMessage `json:"tools" binding:"required" swaggertype:"array,object"`
}
SavedAgentConfiguration excludes resource identity and mutable metadata. It is not the immutable effective configuration of an execution Session.
type SavedAgentCore ¶
type SavedAgentCore struct {
HarnessConfig json.RawMessage `json:"harness_config,omitempty" swaggertype:"object"`
Harness string `json:"harness,omitempty"`
ModelProvider *ModelProviderView `json:"model_provider,omitempty"`
}
SavedAgentCore is the non-confidential representation of saved defaults.
type SavedAgentCoreInput ¶
type SavedAgentCoreInput struct {
HarnessConfig json.RawMessage `json:"harness_config,omitempty" swaggertype:"object"`
Harness string `json:"harness,omitempty"`
ModelProvider *ModelProviderInput `json:"model_provider,omitempty" extensions:"x-nullable"`
}
SavedAgentCoreInput carries defaults for future Sessions. The provider bundle is replaced as a whole; its API key is write-only.
func (*SavedAgentCoreInput) SafeView ¶
func (x *SavedAgentCoreInput) SafeView() *SavedAgentCore
func (*SavedAgentCoreInput) Validate ¶
func (x *SavedAgentCoreInput) Validate() error
type SavedAgentList ¶
type SavedAgentList struct {
Object string `json:"object" binding:"required" enums:"list"`
Data []SavedAgent `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
}
type SavedAgentText ¶
type SavedAgentText struct {
Format SavedAgentTextFormat `json:"format" binding:"required"`
Verbosity string `json:"verbosity" binding:"required" enums:"low,medium,high"`
}
type SavedAgentTextFormat ¶
type SavedAgentTextFormat struct {
Type string `json:"type" binding:"required" enums:"text,json_schema"`
Schema json.RawMessage `json:"schema,omitempty" swaggertype:"object"`
}
type SavedAgentTextInput ¶
type SavedAgentTextInput struct {
Format json.RawMessage `json:"format,omitempty" swaggertype:"object" extensions:"x-nullable"`
Verbosity *string `json:"verbosity,omitempty" enums:"low,medium,high" extensions:"x-nullable"`
}
type SendSubagentInputCallItem ¶
type SendSubagentInputCallItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"send_subagent_input_call"`
Status string `json:"status" binding:"required" enums:"in_progress,completed,failed,incomplete"`
SenderAgentID string `json:"sender_agent_id" binding:"required"`
RecipientAgentID string `json:"recipient_agent_id" binding:"required"`
Content []AgentContent `json:"content" binding:"required"`
}
type Session ¶
type Session struct {
XAgentsCore *SessionCore `json:"x_agents_core,omitempty"`
ID string `json:"id" binding:"required"`
Agent Agent `json:"agent" binding:"required"`
CreatedAt int64 `json:"created_at" binding:"required"`
Environment SessionEnvironment `json:"environment" binding:"required"`
Error *string `json:"error" extensions:"x-nullable"`
LastActiveAt int64 `json:"last_active_at" binding:"required"`
Metadata map[string]string `json:"metadata" binding:"required"`
Object string `json:"object" enums:"agent.session" binding:"required"`
RequiredActions []RequiredAction `json:"required_actions" binding:"required"`
Status string `json:"status" enums:"idle,in_progress,requires_action,failed" binding:"required"`
Usage *TokenUsage `json:"usage" extensions:"x-nullable"`
VaultIDs []string `json:"vault_ids" binding:"required"`
}
func (Session) MarshalJSON ¶
MarshalJSON renders the Session Agent's reasoning with explicit null keys. The stored Session configuration keeps its original encoding.
type SessionArtifact ¶
type SessionArtifact struct {
ID string `json:"id" binding:"required"`
CreatedAt int64 `json:"created_at" binding:"required"`
EnvironmentID string `json:"environment_id" binding:"required"`
Object string `json:"object" enums:"agent.session.artifact" binding:"required"`
Path string `json:"path" binding:"required"`
SessionID string `json:"session_id" binding:"required"`
SizeBytes int64 `json:"size_bytes" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
}
type SessionArtifactDeleted ¶
type SessionArtifactList ¶
type SessionArtifactList struct {
Object string `json:"object" enums:"list" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
Data []SessionArtifact `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
}
type SessionCore ¶
type SessionCore struct {
Installation *EnvironmentInstallation `json:"installation,omitempty"`
}
SessionCore exposes optional Core additions without changing official fields.
type SessionDeleted ¶
type SessionEnvironment ¶
type SessionEnvironment struct {
Type string `json:"type" enums:"none,self_hosted,openai_hosted" binding:"required"`
ID string `json:"id,omitempty"`
CapabilityDirectories *[]string `json:"capability_directories,omitempty"`
RemoteURL string `json:"remote_url,omitempty"`
WorkspaceDirectory string `json:"workspace_directory,omitempty"`
Network *EnvironmentNetwork `json:"network,omitempty"`
Packages *EnvironmentPackagesResponse `json:"packages,omitempty"`
Files *[]json.RawMessage `json:"files,omitempty" swaggertype:"array,object"`
Plugins *[]json.RawMessage `json:"plugins,omitempty" swaggertype:"array,object"`
Skills *[]json.RawMessage `json:"skills,omitempty" swaggertype:"array,object"`
}
SessionEnvironment contains supported output variants, independently of request admission.
type SessionEnvironmentState ¶
type SessionEnvironmentState struct {
ID string `json:"id" binding:"required"`
Type string `json:"type" binding:"required"`
Status string `json:"status" enums:"pending,ready,connected,disconnected,failed" binding:"required"`
Error *StreamError `json:"error" extensions:"x-nullable"`
}
SessionEnvironmentState is the pinned event snapshot, not EnvironmentInfo. The event vocabulary includes ready; the resource vocabulary instead includes expired.
type SessionEvent ¶
type SessionEvent struct {
Subagent *Subagent `json:"subagent,omitempty"`
Type string `json:"type" binding:"required"`
EventID string `json:"event_id" binding:"required"`
SessionID string `json:"session_id,omitempty"`
TurnID string `json:"turn_id,omitempty"`
Session *Session `json:"session,omitempty"`
Turn *Turn `json:"turn,omitempty"`
Item *Item `json:"item,omitempty"`
ItemID string `json:"item_id,omitempty"`
OutputIndex *int32 `json:"output_index,omitempty" extensions:"x-nullable"`
ContentIndex *int `json:"content_index,omitempty"`
Part *ItemContent `json:"part,omitempty"`
Delta *string `json:"delta,omitempty"`
Text *string `json:"text,omitempty"`
Error *StreamError `json:"error,omitempty"`
Environment *SessionEnvironmentState `json:"environment,omitempty"`
// Usage is present only on terminal Turn events, where it mirrors the Turn
// snapshot and is null when unknown. Other events omit it.
Usage *TokenUsage `json:"usage,omitempty" extensions:"x-nullable"`
}
SessionEvent contains the supported live event variants of the pinned protocol.
func (SessionEvent) MarshalJSON ¶
func (e SessionEvent) MarshalJSON() ([]byte, error)
MarshalJSON keeps the nullable top-level usage on terminal Turn events only, a nullable output_index on every Item event (EVT-09) and a nullable error param on error events.
type SessionExecutionConfiguration ¶
type SessionExecutionConfiguration struct {
Object string `json:"object" binding:"required" enums:"agent.session.execution_configuration"`
SchemaVersion int `json:"schema_version" binding:"required" enums:"1"`
SessionID string `json:"session_id" binding:"required"`
Model ExecutionSelection `json:"model" binding:"required"`
Harness ExecutionSelection `json:"harness" binding:"required"`
HarnessConfig ExecutionHarnessConfigSelection `json:"harness_config" binding:"required"`
ModelProvider ExecutionProviderSelection `json:"model_provider" binding:"required"`
}
SessionExecutionConfiguration describes committed configuration, not live execution health. Unknown provenance is never reconstructed from defaults.
type SessionExecutionInput ¶
type SessionExecutionInput struct {
// Environment supplies placement-independent preparation through the Core extension.
Environment json.RawMessage `json:"environment,omitempty" swaggertype:"object"`
ModelProvider *ModelProviderInput `json:"model_provider,omitempty"`
HarnessConfig json.RawMessage `json:"harness_config,omitempty" swaggertype:"object"`
}
SessionExecutionInput is a write-only execution extension, not a provider resource.
type SessionInput ¶
type SessionInput struct {
Type string `json:"type" enums:"agent.session.input.message,agent.session.input.cancel,agent.session.input.tool_result" binding:"required"`
Input []InputMessage `json:"input,omitempty"`
CallID string `json:"call_id,omitempty"`
TurnID string `json:"turn_id,omitempty"`
Success *bool `json:"success,omitempty"`
Error json.RawMessage `json:"error,omitempty" swaggertype:"string" extensions:"x-nullable"`
Output any `json:"output,omitempty" extensions:"x-nullable"`
}
SessionInput contains the message, cancellation and function-result event variants.
type SessionList ¶
type SessionList struct {
Object string `json:"object" enums:"list" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
Data []Session `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
}
type Skill ¶
type Skill struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"skill"`
CreatedAt int64 `json:"created_at" binding:"required"`
Name string `json:"name" binding:"required"`
Description string `json:"description" binding:"required"`
DefaultVersion string `json:"default_version" binding:"required"`
LatestVersion string `json:"latest_version" binding:"required"`
}
Skill describes a tenant-owned, versioned bundle without exposing its contents.
type SkillDeleted ¶
type SkillUpdateRequest ¶
type SkillUpdateRequest struct {
DefaultVersion string `json:"default_version" binding:"required"`
}
type SkillVersion ¶
type SkillVersion struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"skill.version"`
CreatedAt int64 `json:"created_at" binding:"required"`
SkillID string `json:"skill_id" binding:"required"`
Version string `json:"version" binding:"required"`
Name string `json:"name" binding:"required"`
Description string `json:"description" binding:"required"`
}
type SkillVersionDeleted ¶
type SkillVersionList ¶
type SkillVersionList struct {
Object string `json:"object" binding:"required" enums:"list"`
Data []SkillVersion `json:"data" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
HasMore bool `json:"has_more" binding:"required"`
}
type SourceFile ¶
type SourceFile struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"file"`
Bytes int64 `json:"bytes" binding:"required" minimum:"0"`
CreatedAt int64 `json:"created_at" binding:"required"`
Filename string `json:"filename" binding:"required"`
Purpose string `json:"purpose" binding:"required" enums:"user_data"`
Status string `json:"status" binding:"required" enums:"processed"`
ExpiresAt *int64 `json:"expires_at" extensions:"x-nullable"`
StatusDetails *string `json:"status_details" extensions:"x-nullable"`
}
type SourceFileDeleted ¶
type SourceFileList ¶
type SourceFileList struct {
Object string `json:"object" binding:"required" enums:"list"`
Data []SourceFile `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
}
type StreamError ¶
type StreamError struct {
Code string `json:"code"`
Type string `json:"type"`
Message string `json:"message"`
// Param is the pinned SessionError field. An error SessionEvent always
// carries it, null when unset; Environment state errors and Core's own
// stream_interrupted frame omit it.
Param *string `json:"param,omitempty" extensions:"x-nullable"`
}
type Subagent ¶
type Subagent struct {
ID string `json:"id" binding:"required"`
Object string `json:"object" binding:"required" enums:"agent.session.subagent"`
SessionID string `json:"session_id" binding:"required"`
ParentAgentID string `json:"parent_agent_id" binding:"required"`
OpenedAt int64 `json:"opened_at" binding:"required"`
ClosedAt *int64 `json:"closed_at" extensions:"x-nullable"`
Name *string `json:"name" extensions:"x-nullable"`
Instructions []AgentContent `json:"instructions" extensions:"x-nullable"`
Status string `json:"status" binding:"required" enums:"active,closed"`
}
type SubagentControlCallItem ¶
type SubagentControlCallItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"resume_subagent_call,interrupt_subagent_call,close_subagent_call"`
Status string `json:"status" binding:"required" enums:"in_progress,completed,failed,incomplete"`
SenderAgentID string `json:"sender_agent_id" binding:"required"`
RecipientAgentID string `json:"recipient_agent_id" binding:"required"`
}
SubagentControlCallItem is the common wire shape of resume, interrupt and close calls.
type SubagentList ¶
type SubagentList struct {
Object string `json:"object" enums:"list" binding:"required"`
FirstID *string `json:"first_id" extensions:"x-nullable"`
LastID *string `json:"last_id" extensions:"x-nullable"`
Data []Subagent `json:"data" binding:"required"`
HasMore bool `json:"has_more" binding:"required"`
}
type SummaryText ¶
type TextConfig ¶
type TextConfig struct {
Format TextFormat `json:"format" binding:"required"`
Verbosity string `json:"verbosity" enums:"low,medium,high" binding:"required"`
}
type TextConfigInput ¶
type TextConfigInput struct {
Format *TextFormat `json:"format,omitempty" extensions:"x-nullable"`
Verbosity *string `json:"verbosity,omitempty" enums:"low,medium,high" extensions:"x-nullable"`
}
type TextFormat ¶
type TextFormat struct {
Type string `json:"type" enums:"text,json_schema" binding:"required"`
Schema json.RawMessage `json:"schema,omitempty" swaggertype:"object"`
}
type TokenUsage ¶
type TokenUsage struct {
InputTokens int64 `json:"input_tokens" binding:"required"`
InputTokensDetails InputTokenDetails `json:"input_tokens_details" binding:"required"`
OutputTokens int64 `json:"output_tokens" binding:"required"`
OutputTokensDetails OutputTokenDetails `json:"output_tokens_details" binding:"required"`
TotalTokens int64 `json:"total_tokens" binding:"required"`
}
type Turn ¶
type Turn struct {
ID string `json:"id" binding:"required"`
AgentID string `json:"agent_id" binding:"required"`
SubagentID *string `json:"subagent_id" extensions:"x-nullable"`
SessionID string `json:"session_id" binding:"required"`
Object string `json:"object" enums:"agent.session.turn" binding:"required"`
Status string `json:"status" enums:"queued,in_progress,waiting,completed,failed,cancelled" binding:"required"`
CreatedAt int64 `json:"created_at" binding:"required"`
StartedAt *int64 `json:"started_at" extensions:"x-nullable"`
CompletedAt *int64 `json:"completed_at" extensions:"x-nullable"`
Error *TurnError `json:"error" extensions:"x-nullable"`
Usage *TokenUsage `json:"usage" extensions:"x-nullable"`
}
type UpdateAgentRequest ¶
type UpdateAgentRequest struct {
XAgentsCore *SavedAgentCoreInput `json:"x_agents_core,omitempty" extensions:"x-nullable"`
Model *string `json:"model,omitempty"`
Name *string `json:"name,omitempty" extensions:"x-nullable" maxLength:"128"`
Instructions *string `json:"instructions,omitempty" extensions:"x-nullable"`
Metadata map[string]*string `json:"metadata,omitempty" swaggertype:"object,string" extensions:"x-nullable"`
MultiAgent json.RawMessage `json:"multi_agent,omitempty" swaggertype:"object" extensions:"x-nullable"`
Reasoning *Reasoning `json:"reasoning,omitempty" extensions:"x-nullable"`
ServiceTier *string `json:"service_tier,omitempty" enums:"auto,default,flex,priority,fast" extensions:"x-nullable"`
Text *SavedAgentTextInput `json:"text,omitempty" extensions:"x-nullable"`
Tools []json.RawMessage `json:"tools,omitempty" swaggertype:"array,object" extensions:"x-nullable"`
}
UpdateAgentRequest replaces supplied fields and preserves omitted fields.
type UpdateCredentialRequest ¶
type UpdateCredentialRequest struct {
Auth *CredentialAuthReplacement `json:"auth" binding:"required"`
}
type UpdateSessionRequest ¶
type UpdateSessionRequest struct {
Metadata map[string]string `json:"metadata" extensions:"x-nullable" binding:"required"`
}
UpdateSessionRequest requires metadata; null and an empty object clear it.
type VaultDeleted ¶
type WaitForSubagentsCallItem ¶
type WaitForSubagentsCallItem struct {
ID string `json:"id" binding:"required"`
TurnID string `json:"turn_id" binding:"required"`
Type string `json:"type" binding:"required" enums:"wait_for_subagents_call"`
Status string `json:"status" binding:"required" enums:"in_progress,completed,failed,incomplete"`
SenderAgentID string `json:"sender_agent_id" binding:"required"`
RecipientAgentIDs []string `json:"recipient_agent_ids" binding:"required"`
}
type WebSearchAction ¶
Source Files
¶
- agents.go
- core_extension.go
- credentials.go
- environment_events.go
- environment_files.go
- environment_templates.go
- environments.go
- events.go
- function_actions.go
- function_tools.go
- inputs.go
- installation.go
- items.go
- mcp_tools.go
- model_configuration.go
- model_execution.go
- model_provider_admission.go
- required_actions.go
- runtime_history.go
- runtime_observations.go
- saved_core_extension.go
- session_artifacts.go
- session_deletion.go
- session_environment.go
- session_execution_configuration.go
- sessions.go
- skills.go
- source_files.go
- subagent_items.go
- subagents.go
- turns.go
- usage.go
- vaults.go