api

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DirectionBefore = data.DirectionBefore
	DirectionAfter  = data.DirectionAfter
	DirectionLatest = data.DirectionLatest
)
View Source
const ApprovalTimeoutErrorMessage = "approval request timed out"

ApprovalTimeoutErrorMessage is the canonical error_message stored on a queue row that the backend producer transitioned to timed_out.

View Source
const ApprovalTimeoutOutcomeAction = "timeout"

ApprovalTimeoutOutcomeAction is the canonical Action value for a timeout outcome produced by the backend sweep.

View Source
const ApprovalTimeoutOutcomeDecision = "timeout"

ApprovalTimeoutOutcomeDecision is the canonical Decision value persisted on a queue row that was transitioned by the sweep.

View Source
const ApprovalTimeoutOutcomeStatus = "timed_out"

ApprovalTimeoutOutcomeStatus is the canonical Status value for a timeout outcome produced by the backend sweep.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateSkillInput added in v0.1.8

type ActivateSkillInput struct {
	ConversationID string `json:"conversationId,omitempty"`
	Name           string `json:"name,omitempty"`
	Args           string `json:"args,omitempty"`
}

type ActivateSkillOutput added in v0.1.8

type ActivateSkillOutput struct {
	Name string `json:"name,omitempty"`
	Body string `json:"body,omitempty"`
}

type ActiveFeedState

type ActiveFeedState struct {
	FeedID    string          `json:"feedId"`
	Title     string          `json:"title"`
	ItemCount int             `json:"itemCount"`
	Data      json.RawMessage `json:"data,omitempty"`
}

type ApprovalCallback

type ApprovalCallback struct {
	ElementID string `json:"elementId,omitempty"`
	Event     string `json:"event,omitempty"`
	Handler   string `json:"handler,omitempty"`
}

type ApprovalCallbackPayload

type ApprovalCallbackPayload struct {
	Approval     *ApprovalMeta          `json:"approval,omitempty"`
	EditedFields map[string]interface{} `json:"editedFields,omitempty"`
	OriginalArgs map[string]interface{} `json:"originalArgs,omitempty"`
}

type ApprovalCallbackResult

type ApprovalCallbackResult struct {
	Allow   bool                   `json:"allow"`
	Message string                 `json:"message,omitempty"`
	Payload map[string]interface{} `json:"payload,omitempty"`
}

type ApprovalEditor

type ApprovalEditor struct {
	Name        string            `json:"name"`
	Kind        string            `json:"kind"`
	Path        string            `json:"path,omitempty"`
	Label       string            `json:"label,omitempty"`
	Description string            `json:"description,omitempty"`
	Options     []*ApprovalOption `json:"options,omitempty"`
}

type ApprovalForgeView

type ApprovalForgeView struct {
	WindowRef    string              `json:"windowRef,omitempty"`
	ContainerRef string              `json:"containerRef,omitempty"`
	DataSource   string              `json:"dataSource,omitempty"`
	Callbacks    []*ApprovalCallback `json:"callbacks,omitempty"`
}

type ApprovalMeta

type ApprovalMeta struct {
	Type        string             `json:"type,omitempty"`
	ToolName    string             `json:"toolName,omitempty"`
	Title       string             `json:"title,omitempty"`
	Message     string             `json:"message,omitempty"`
	AcceptLabel string             `json:"acceptLabel,omitempty"`
	RejectLabel string             `json:"rejectLabel,omitempty"`
	CancelLabel string             `json:"cancelLabel,omitempty"`
	Editors     []*ApprovalEditor  `json:"editors,omitempty"`
	Forge       *ApprovalForgeView `json:"forge,omitempty"`
}

type ApprovalOption

type ApprovalOption struct {
	ID          string      `json:"id"`
	Label       string      `json:"label"`
	Description string      `json:"description,omitempty"`
	Item        interface{} `json:"item,omitempty"`
	Selected    bool        `json:"selected"`
}

type AssistantMessageState

type AssistantMessageState struct {
	MessageID string    `json:"messageId"`
	Content   string    `json:"content,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

type AssistantState

type AssistantState struct {
	Narration *AssistantMessageState   `json:"narration,omitempty"`
	Final     *AssistantMessageState   `json:"final,omitempty"`
	Messages  []*AssistantMessageState `json:"messages,omitempty"`
}

type AsyncOperationState

type AsyncOperationState struct {
	OperationID string          `json:"operationId"`
	Status      string          `json:"status,omitempty"`
	Message     string          `json:"message,omitempty"`
	Error       string          `json:"error,omitempty"`
	Response    json.RawMessage `json:"response,omitempty"`
}

type ConversationPage

type ConversationPage = data.ConversationPage

type ConversationState

type ConversationState struct {
	ConversationID string             `json:"conversationId"`
	Turns          []*TurnState       `json:"turns"`
	Feeds          []*ActiveFeedState `json:"feeds,omitempty"`
}

type ConversationStateResponse

type ConversationStateResponse struct {
	SchemaVersion string             `json:"schemaVersion"`
	Conversation  *ConversationState `json:"conversation"`
	Feeds         []*ActiveFeedState `json:"feeds,omitempty"`
	Usage         *UsageSummary      `json:"usage,omitempty"`
	EventCursor   string             `json:"eventCursor,omitempty"`
}

type CreateConversationInput

type CreateConversationInput struct {
	AgentID              string                 `json:"agentId,omitempty"`
	Title                string                 `json:"title,omitempty"`
	Metadata             map[string]interface{} `json:"metadata,omitempty"`
	ParentConversationID string                 `json:"parentConversationId,omitempty"`
	ParentTurnID         string                 `json:"parentTurnId,omitempty"`
}

type DatasourceCacheHints added in v0.1.8

type DatasourceCacheHints struct {
	BypassCache  bool `json:"bypassCache,omitempty"`
	WriteThrough bool `json:"writeThrough,omitempty"`
}

DatasourceCacheHints carries per-call overrides on cache behaviour.

type DatasourceCacheMeta added in v0.1.8

type DatasourceCacheMeta struct {
	Hit        bool   `json:"hit"`
	Stale      bool   `json:"stale,omitempty"`
	FetchedAt  string `json:"fetchedAt"`
	TTLSeconds int    `json:"ttlSeconds,omitempty"`
}

DatasourceCacheMeta mirrors protocol/datasource.CacheMeta for HTTP clients that do not import the Go protocol packages.

type DecideToolApprovalInput

type DecideToolApprovalInput struct {
	ID            string                 `json:"id,omitempty"`
	Action        string                 `json:"action,omitempty"`
	UserID        string                 `json:"userId,omitempty"`
	Reason        string                 `json:"reason,omitempty"`
	Note          string                 `json:"note,omitempty"`
	Decision      string                 `json:"decision,omitempty"`
	EditedFields  map[string]interface{} `json:"editedFields,omitempty"`
	CallbackState map[string]interface{} `json:"callbackState,omitempty"`
	Payload       map[string]interface{} `json:"payload,omitempty"`
}

type DecideToolApprovalOutcome added in v0.1.9

type DecideToolApprovalOutcome struct {
	ApprovalID     string     `json:"approvalId"`
	Action         string     `json:"action"`
	Status         string     `json:"status,omitempty"`
	Decision       string     `json:"decision,omitempty"`
	ConversationID string     `json:"conversationId,omitempty"`
	TurnID         string     `json:"turnId,omitempty"`
	MessageID      string     `json:"messageId,omitempty"`
	ToolName       string     `json:"toolName,omitempty"`
	Result         string     `json:"result,omitempty"`
	ErrorMessage   string     `json:"errorMessage,omitempty"`
	ExpiresAt      *time.Time `json:"expiresAt,omitempty"`
	TimedOutAt     *time.Time `json:"timedOutAt,omitempty"`
}

DecideToolApprovalOutcome describes the resolved approval outcome after the canonical decide path has finished writing the queue row and (for the approve action) running the real tool execution. It is the canonical payload the host propagates to UI surfaces that were waiting on the approval; UI code must not invent these fields locally.

The timed_out outcome is produced by the canonical backend sweep that transitions a pending row past its expires_at deadline. Its Action and Decision are both "timeout", Status is "timed_out", and TimedOutAt carries the instant at which the producer recorded the transition.

type DecideToolApprovalOutput

type DecideToolApprovalOutput struct {
	Status  string                     `json:"status"`
	Message string                     `json:"message,omitempty"`
	Outcome *DecideToolApprovalOutcome `json:"outcome,omitempty"`
}

type Direction

type Direction = data.Direction

type DownloadFileInput

type DownloadFileInput struct {
	ConversationID string
	FileID         string
	URI            string
}

type DownloadFileOutput

type DownloadFileOutput struct {
	Name        string
	ContentType string
	Data        []byte
}

type EditQueuedTurnInput

type EditQueuedTurnInput struct {
	ConversationID string `json:"conversationId"`
	TurnID         string `json:"turnId"`
	Content        string `json:"content"`
}

type ElicitationState

type ElicitationState struct {
	ElicitationID   string            `json:"elicitationId"`
	Status          ElicitationStatus `json:"status"`
	Message         string            `json:"message,omitempty"`
	RequestedSchema json.RawMessage   `json:"requestedSchema,omitempty"`
	CallbackURL     string            `json:"callbackUrl,omitempty"`
	ResponsePayload json.RawMessage   `json:"responsePayload,omitempty"`
}

type ElicitationStatus

type ElicitationStatus string
const (
	ElicitationStatusPending  ElicitationStatus = "pending"
	ElicitationStatusAccepted ElicitationStatus = "accepted"
	ElicitationStatusDeclined ElicitationStatus = "declined"
	ElicitationStatusCanceled ElicitationStatus = "canceled"
)

type ExecutionPageState

type ExecutionPageState struct {
	PageID                  string            `json:"pageId"`
	AssistantMessageID      string            `json:"assistantMessageId"`
	ParentMessageID         string            `json:"parentMessageId"`
	TurnID                  string            `json:"turnId"`
	Iteration               int               `json:"iteration"`
	Sequence                int               `json:"sequence,omitempty"`
	ExecutionRole           string            `json:"executionRole,omitempty"`
	Phase                   string            `json:"phase,omitempty"`
	Mode                    string            `json:"mode,omitempty"`
	Status                  string            `json:"status,omitempty"`
	ModelSteps              []*ModelStepState `json:"modelSteps,omitempty"`
	ToolSteps               []*ToolStepState  `json:"toolSteps,omitempty"`
	NarrationMessageID      string            `json:"narrationMessageId,omitempty"`
	FinalAssistantMessageID string            `json:"finalAssistantMessageId,omitempty"`
	Narration               string            `json:"narration,omitempty"`
	Content                 string            `json:"content,omitempty"`
	FinalResponse           bool              `json:"finalResponse"`
}

type ExecutionState

type ExecutionState struct {
	Pages          []*ExecutionPageState `json:"pages"`
	ActivePageIdx  int                   `json:"activePageIndex"`
	TotalElapsedMs int64                 `json:"totalElapsedMs"`
}

type ExportResourcesInput

type ExportResourcesInput struct {
	Kinds []string `json:"kinds,omitempty"`
}

type ExportResourcesOutput

type ExportResourcesOutput struct {
	Data      []byte     `json:"data,omitempty"`
	Resources []Resource `json:"resources,omitempty"`
}

type FeedActivation

type FeedActivation struct {
	Kind    string `yaml:"kind,omitempty" json:"kind,omitempty"`
	Scope   string `yaml:"scope,omitempty" json:"scope,omitempty"`
	Service string `yaml:"service,omitempty" json:"service,omitempty"`
	Method  string `yaml:"method,omitempty" json:"method,omitempty"`
}

FeedActivation controls how feed data is gathered.

type FeedMatch

type FeedMatch struct {
	Service string `yaml:"service" json:"service"`
	Method  string `yaml:"method" json:"method"`
}

FeedMatch defines which tool calls trigger this feed.

type FeedSpec

type FeedSpec struct {
	ID         string                 `yaml:"id" json:"id"`
	Title      string                 `yaml:"title,omitempty" json:"title,omitempty"`
	Match      FeedMatch              `yaml:"match" json:"match"`
	Activation FeedActivation         `yaml:"activation,omitempty" json:"activation,omitempty"`
	DataSource map[string]interface{} `yaml:"dataSource,omitempty" json:"dataSource,omitempty"`
	UI         interface{}            `yaml:"ui,omitempty" json:"ui,omitempty"`
}

FeedSpec describes a tool feed loaded from workspace YAML.

type FeedState

type FeedState struct {
	FeedID    string `json:"feedId"`
	Title     string `json:"title"`
	ItemCount int    `json:"itemCount"`
	ToolName  string `json:"toolName,omitempty"`
}

FeedState tracks active feeds for a conversation.

type FetchDatasourceInput added in v0.1.8

type FetchDatasourceInput struct {
	ID     string                 `json:"id"`
	Inputs map[string]interface{} `json:"inputs,omitempty"`
	Cache  *DatasourceCacheHints  `json:"cache,omitempty"`
}

FetchDatasourceInput is the wire request for POST /v1/api/datasources/{id}/fetch.

type FetchDatasourceOutput added in v0.1.8

type FetchDatasourceOutput struct {
	Rows     []map[string]interface{} `json:"rows"`
	DataInfo map[string]interface{}   `json:"dataInfo,omitempty"`
	Metrics  map[string]interface{}   `json:"metrics,omitempty"`
	Cache    *DatasourceCacheMeta     `json:"cache,omitempty"`
}

FetchDatasourceOutput is the wire response.

type FileEntry

type FileEntry struct {
	ID          string    `json:"id,omitempty"`
	URI         string    `json:"uri"`
	Name        string    `json:"name"`
	Size        int64     `json:"size"`
	IsDir       bool      `json:"isDir"`
	ContentType string    `json:"contentType,omitempty"`
	ModifiedAt  time.Time `json:"modifiedAt,omitempty"`
}

type GetMessagesInput

type GetMessagesInput struct {
	ConversationID string
	Page           *PageInput
	ID             string
	TurnID         string
	Roles          []string
	Types          []string
}

type GetResourceOutput

type GetResourceOutput struct {
	Kind     string    `json:"kind,omitempty"`
	Name     string    `json:"name,omitempty"`
	Data     []byte    `json:"data,omitempty"`
	Resource *Resource `json:"resource,omitempty"`
}

type GetTemplateInput

type GetTemplateInput struct {
	Name            string `json:"name"`
	IncludeDocument *bool  `json:"includeDocument,omitempty"`
}

type GetTemplateOutput

type GetTemplateOutput struct {
	Name             string                   `json:"name,omitempty"`
	Format           string                   `json:"format,omitempty"`
	Description      string                   `json:"description,omitempty"`
	Instructions     string                   `json:"instructions,omitempty"`
	Fences           []map[string]interface{} `json:"fences,omitempty"`
	Schema           map[string]interface{}   `json:"schema,omitempty"`
	Examples         []map[string]interface{} `json:"examples,omitempty"`
	IncludedDocument bool                     `json:"includedDocument,omitempty"`
}

type GetTranscriptInput

type GetTranscriptInput struct {
	ConversationID    string
	Since             string
	IncludeModelCalls bool
	IncludeToolCalls  bool
}

type HostedWorkspaceRestoreState added in v0.1.9

type HostedWorkspaceRestoreState struct {
	Windows          []WorkspaceWindowSnapshot `json:"windows,omitempty"`
	SelectedWindowID string                    `json:"selectedWindowId,omitempty"`
}

type ImportResourcesInput

type ImportResourcesInput struct {
	Data      []byte     `json:"data,omitempty"`
	Resources []Resource `json:"resources,omitempty"`
	Replace   bool       `json:"replace,omitempty"`
}

type ImportResourcesOutput

type ImportResourcesOutput struct {
	Skipped  int `json:"skipped,omitempty"`
	Imported int `json:"imported"`
}

type InvalidateDatasourceCacheInput added in v0.1.8

type InvalidateDatasourceCacheInput struct {
	ID         string `json:"id"`
	InputsHash string `json:"inputsHash,omitempty"`
}

InvalidateDatasourceCacheInput — DELETE /v1/api/datasources/{id}/cache[?inputsHash=…].

type LinkedConversationEntry

type LinkedConversationEntry struct {
	ConversationID       string     `json:"conversationId"`
	ParentConversationID string     `json:"parentConversationId,omitempty"`
	ParentTurnID         string     `json:"parentTurnId,omitempty"`
	AgentID              string     `json:"agentId,omitempty"`
	Title                string     `json:"title,omitempty"`
	Status               string     `json:"status,omitempty"`
	Response             string     `json:"response,omitempty"`
	CreatedAt            time.Time  `json:"createdAt"`
	UpdatedAt            *time.Time `json:"updatedAt,omitempty"`
}

type LinkedConversationPage

type LinkedConversationPage struct {
	Rows       []*LinkedConversationEntry `json:"rows"`
	NextCursor string                     `json:"nextCursor,omitempty"`
	PrevCursor string                     `json:"prevCursor,omitempty"`
	HasMore    bool                       `json:"hasMore"`
}

type LinkedConversationState

type LinkedConversationState struct {
	ConversationID       string     `json:"conversationId"`
	ParentConversationID string     `json:"parentConversationId,omitempty"`
	ParentTurnID         string     `json:"parentTurnId,omitempty"`
	ToolCallID           string     `json:"toolCallId,omitempty"`
	AgentID              string     `json:"agentId,omitempty"`
	Title                string     `json:"title,omitempty"`
	Status               string     `json:"status,omitempty"`
	Response             string     `json:"response,omitempty"`
	CreatedAt            time.Time  `json:"createdAt,omitempty"`
	UpdatedAt            *time.Time `json:"updatedAt,omitempty"`
}

type ListConversationsInput

type ListConversationsInput struct {
	AgentID          string
	ParentID         string
	ParentTurnID     string
	ExcludeScheduled bool
	Query            string
	Status           string
	Page             *PageInput
}

type ListFilesInput

type ListFilesInput struct {
	ConversationID string
	Prefix         string
	Page           *PageInput
}

type ListFilesOutput

type ListFilesOutput struct {
	Files []*FileEntry `json:"files,omitempty"`
	Rows  []*FileEntry `json:"rows,omitempty"`
	Page  *PageInput   `json:"page,omitempty"`
}

type ListLinkedConversationsInput

type ListLinkedConversationsInput struct {
	ParentConversationID string
	ParentTurnID         string
	Page                 *PageInput
}

type ListLookupRegistryInput added in v0.1.8

type ListLookupRegistryInput struct {
	Context string `json:"context"`
}

ListLookupRegistryInput — GET /v1/api/lookups/registry?context=<target-kind>:<target-id>.

type ListLookupRegistryOutput added in v0.1.8

type ListLookupRegistryOutput struct {
	Entries []LookupRegistryEntry `json:"entries"`
}

ListLookupRegistryOutput is the wire response.

type ListPendingElicitationsInput

type ListPendingElicitationsInput struct {
	ConversationID string
}

type ListPendingToolApprovalsInput

type ListPendingToolApprovalsInput struct {
	UserID         string
	ConversationID string
	Status         string
	Limit          int
	Offset         int
	OutcomeSince   string
}

type ListResourcesInput

type ListResourcesInput struct {
	Kind string
}

type ListResourcesOutput

type ListResourcesOutput struct {
	Names     []string       `json:"names,omitempty"`
	Resources []*ResourceRef `json:"resources"`
}

type ListSkillsInput added in v0.1.8

type ListSkillsInput struct {
	ConversationID string `json:"conversationId,omitempty"`
}

type ListSkillsOutput added in v0.1.8

type ListSkillsOutput struct {
	Items       []SkillItem `json:"items,omitempty"`
	Diagnostics []string    `json:"diagnostics,omitempty"`
}

type ListTemplatesInput

type ListTemplatesInput struct{}

type ListTemplatesOutput

type ListTemplatesOutput struct {
	Items []TemplateListItem `json:"items"`
}

type LookupParameter added in v0.1.8

type LookupParameter struct {
	From     string `json:"from,omitempty"`
	To       string `json:"to,omitempty"`
	Name     string `json:"name"`
	Location string `json:"location,omitempty"`
}

LookupParameter is a wire mirror of forge Parameter — enough to round-trip Inputs/Outputs to any client without pulling in forge types.

type LookupRegistryEntry added in v0.1.8

type LookupRegistryEntry struct {
	Name       string            `json:"name"`
	Title      string            `json:"title,omitempty"`
	DataSource string            `json:"dataSource"`
	DialogId   string            `json:"dialogId,omitempty"`
	WindowId   string            `json:"windowId,omitempty"`
	Trigger    string            `json:"trigger,omitempty"`
	Required   bool              `json:"required,omitempty"`
	Display    string            `json:"display,omitempty"`
	Token      *TokenFormat      `json:"token,omitempty"`
	Inputs     []LookupParameter `json:"inputs,omitempty"`
	Outputs    []LookupParameter `json:"outputs,omitempty"`
}

LookupRegistryEntry describes a single named-token binding available in a render context.

type MCPUIToolCallInput added in v0.1.9

type MCPUIToolCallInput struct {
	ConversationID string                 `json:"conversationId,omitempty"`
	ToolName       string                 `json:"toolName"`
	Arguments      map[string]interface{} `json:"arguments,omitempty"`
	AssistantText  string                 `json:"assistantText,omitempty"`
	ToolBundles    []string               `json:"toolBundles,omitempty"`
}

type MCPUIToolCallOutput added in v0.1.9

type MCPUIToolCallOutput struct {
	ConversationID string               `json:"conversationId,omitempty"`
	TurnID         string               `json:"turnId,omitempty"`
	Status         string               `json:"status"`
	Result         string               `json:"result,omitempty"`
	Source         string               `json:"source,omitempty"`
	Approval       *PendingToolApproval `json:"approval,omitempty"`
}

type MessagePage

type MessagePage = data.MessagePage

type ModelStepState

type ModelStepState struct {
	ModelCallID               string          `json:"modelCallId"`
	AssistantMessageID        string          `json:"assistantMessageId"`
	ExecutionRole             string          `json:"executionRole,omitempty"`
	Phase                     string          `json:"phase,omitempty"`
	Provider                  string          `json:"provider,omitempty"`
	Model                     string          `json:"model,omitempty"`
	Status                    string          `json:"status,omitempty"`
	RequestPayloadID          string          `json:"requestPayloadId,omitempty"`
	ResponsePayloadID         string          `json:"responsePayloadId,omitempty"`
	ProviderRequestPayloadID  string          `json:"providerRequestPayloadId,omitempty"`
	ProviderResponsePayloadID string          `json:"providerResponsePayloadId,omitempty"`
	StreamPayloadID           string          `json:"streamPayloadId,omitempty"`
	RequestPayload            json.RawMessage `json:"requestPayload,omitempty"`
	ResponsePayload           json.RawMessage `json:"responsePayload,omitempty"`
	ProviderRequestPayload    json.RawMessage `json:"providerRequestPayload,omitempty"`
	ProviderResponsePayload   json.RawMessage `json:"providerResponsePayload,omitempty"`
	StreamPayload             json.RawMessage `json:"streamPayload,omitempty"`
	StartedAt                 *time.Time      `json:"startedAt,omitempty"`
	CompletedAt               *time.Time      `json:"completedAt,omitempty"`
}

type MoveQueuedTurnInput

type MoveQueuedTurnInput struct {
	ConversationID string `json:"conversationId"`
	TurnID         string `json:"turnId"`
	Direction      string `json:"direction"`
}

type PageInput

type PageInput = data.PageInput

Pagination re-exports from data layer.

type PendingElicitation

type PendingElicitation struct {
	ConversationID string                 `json:"conversationId"`
	ElicitationID  string                 `json:"elicitationId"`
	MessageID      string                 `json:"messageId"`
	Status         string                 `json:"status"`
	Role           string                 `json:"role"`
	Type           string                 `json:"type"`
	CreatedAt      time.Time              `json:"createdAt"`
	Content        string                 `json:"content,omitempty"`
	Elicitation    map[string]interface{} `json:"elicitation,omitempty"`
}

type PendingToolApproval

type PendingToolApproval struct {
	ID             string                 `json:"id"`
	UserID         string                 `json:"userId"`
	ConversationID string                 `json:"conversationId,omitempty"`
	TurnID         string                 `json:"turnId,omitempty"`
	MessageID      string                 `json:"messageId,omitempty"`
	ToolName       string                 `json:"toolName"`
	Title          string                 `json:"title,omitempty"`
	Arguments      map[string]interface{} `json:"arguments,omitempty"`
	Metadata       map[string]interface{} `json:"metadata,omitempty"`
	Status         string                 `json:"status"`
	Decision       string                 `json:"decision,omitempty"`
	ExpiresAt      *time.Time             `json:"expiresAt,omitempty"`
	TimedOutAt     *time.Time             `json:"timedOutAt,omitempty"`
	CreatedAt      time.Time              `json:"createdAt"`
	UpdatedAt      *time.Time             `json:"updatedAt,omitempty"`
	ErrorMessage   string                 `json:"errorMessage,omitempty"`
}

type PendingToolApprovalPage

type PendingToolApprovalPage struct {
	Rows          []*PendingToolApproval       `json:"rows"`
	Total         int                          `json:"total"`
	Limit         int                          `json:"limit"`
	Offset        int                          `json:"offset,omitempty"`
	HasMore       bool                         `json:"hasMore,omitempty"`
	Outcomes      []*DecideToolApprovalOutcome `json:"outcomes,omitempty"`
	OutcomeCursor string                       `json:"outcomeCursor,omitempty"`
}

type PlanFeedPayload

type PlanFeedPayload struct {
	Explanation string      `json:"explanation,omitempty"`
	Steps       []*PlanStep `json:"steps,omitempty"`
}

type PlanStep

type PlanStep struct {
	ID      string `json:"id,omitempty"`
	Step    string `json:"step"`
	Status  string `json:"status,omitempty"`
	Details string `json:"details,omitempty"`
}

type PlannerState added in v0.1.8

type PlannerState struct {
	Status          string `json:"status,omitempty"`
	Trigger         string `json:"trigger,omitempty"`
	StaticProfile   string `json:"staticProfile,omitempty"`
	StrategyFamily  string `json:"strategyFamily,omitempty"`
	Attempt         int    `json:"attempt,omitempty"`
	SecondPolicy    string `json:"secondPolicy,omitempty"`
	OutputPayloadID string `json:"outputPayloadId,omitempty"`
	Validated       *bool  `json:"validated,omitempty"`
}

type QuerySelector

type QuerySelector struct {
	Path    string `json:"path,omitempty"`
	Limit   int    `json:"limit,omitempty"`
	Offset  int    `json:"offset,omitempty"`
	OrderBy string `json:"orderBy,omitempty"`
}

type ResolveElicitationInput

type ResolveElicitationInput struct {
	ConversationID string
	ElicitationID  string
	Action         string
	Payload        map[string]interface{}
}

type Resource

type Resource struct {
	Kind        string    `json:"kind"`
	Name        string    `json:"name"`
	Data        []byte    `json:"data,omitempty"`
	ContentType string    `json:"contentType,omitempty"`
	Content     []byte    `json:"content,omitempty"`
	UpdatedAt   time.Time `json:"updatedAt,omitempty"`
}

type ResourceRef

type ResourceRef struct {
	Kind string `json:"kind"`
	Name string `json:"name"`
}

type SaveResourceInput

type SaveResourceInput struct {
	Kind        string
	Name        string
	Data        []byte
	Content     []byte
	ContentType string
}

type SkillDiagnosticsOutput added in v0.1.8

type SkillDiagnosticsOutput struct {
	Items []string `json:"items,omitempty"`
}

type SkillItem added in v0.1.8

type SkillItem struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type StarterTask

type StarterTask struct {
	ID              string   `json:"id,omitempty"`
	Title           string   `json:"title,omitempty"`
	Prompt          string   `json:"prompt,omitempty"`
	Description     string   `json:"description,omitempty"`
	Icon            string   `json:"icon,omitempty"`
	CoverageEvalIDs []string `json:"coverageEvalIds,omitempty"`
}

type SteerTurnInput

type SteerTurnInput struct {
	ConversationID string `json:"conversationId"`
	TurnID         string `json:"turnId"`
	Content        string `json:"content"`
	Role           string `json:"role,omitempty"`
}

type SteerTurnOutput

type SteerTurnOutput struct {
	MessageID      string `json:"messageId"`
	TurnID         string `json:"turnId,omitempty"`
	Status         string `json:"status,omitempty"`
	CanceledTurnID string `json:"canceledTurnId,omitempty"`
}

type StreamEventsInput

type StreamEventsInput struct {
	ConversationID string
	Filter         streaming.Filter
}

type TemplateListItem

type TemplateListItem struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Format      string `json:"format,omitempty"`
}

type TokenFormat added in v0.1.8

type TokenFormat struct {
	Store        string `json:"store,omitempty"`
	Display      string `json:"display,omitempty"`
	ModelForm    string `json:"modelForm,omitempty"`
	QueryInput   string `json:"queryInput,omitempty"`
	ResolveInput string `json:"resolveInput,omitempty"`
}

TokenFormat is the client-facing token template set.

type ToolDefinitionInfo

type ToolDefinitionInfo struct {
	Name         string                 `json:"name"`
	Description  string                 `json:"description,omitempty"`
	Parameters   map[string]interface{} `json:"parameters,omitempty"`
	Required     []string               `json:"required,omitempty"`
	OutputSchema map[string]interface{} `json:"output_schema,omitempty"`
	Cacheable    bool                   `json:"cacheable,omitempty"`
}

type ToolStepState

type ToolStepState struct {
	ToolCallID                string               `json:"toolCallId"`
	ToolMessageID             string               `json:"toolMessageId"`
	ParentMessageID           string               `json:"parentMessageId,omitempty"`
	ToolName                  string               `json:"toolName"`
	Content                   string               `json:"content,omitempty"`
	UIResourceURI             string               `json:"uiResourceUri,omitempty"`
	ExecutionRole             string               `json:"executionRole,omitempty"`
	OperationID               string               `json:"operationId,omitempty"`
	Status                    string               `json:"status,omitempty"`
	RequestPayloadID          string               `json:"requestPayloadId,omitempty"`
	ResponsePayloadID         string               `json:"responsePayloadId,omitempty"`
	RequestPayload            json.RawMessage      `json:"requestPayload,omitempty"`
	ResponsePayload           json.RawMessage      `json:"responsePayload,omitempty"`
	LinkedConversationID      string               `json:"linkedConversationId,omitempty"`
	LinkedConversationAgentID string               `json:"linkedConversationAgentId,omitempty"`
	LinkedConversationTitle   string               `json:"linkedConversationTitle,omitempty"`
	StartedAt                 *time.Time           `json:"startedAt,omitempty"`
	CompletedAt               *time.Time           `json:"completedAt,omitempty"`
	AsyncOperation            *AsyncOperationState `json:"asyncOperation,omitempty"`
}

type TurnMessageState added in v0.1.8

type TurnMessageState struct {
	MessageID string    `json:"messageId"`
	Role      string    `json:"role"`
	Content   string    `json:"content,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
	Sequence  int       `json:"sequence,omitempty"`
	Interim   int       `json:"interim,omitempty"`
	Mode      string    `json:"mode,omitempty"`
	Status    string    `json:"status,omitempty"`
}

type TurnState

type TurnState struct {
	TurnID              string                     `json:"turnId"`
	Status              TurnStatus                 `json:"status"`
	User                *UserMessageState          `json:"user,omitempty"`
	Users               []*UserMessageState        `json:"users,omitempty"`
	Messages            []*TurnMessageState        `json:"messages,omitempty"`
	Execution           *ExecutionState            `json:"execution,omitempty"`
	Assistant           *AssistantState            `json:"assistant,omitempty"`
	Planner             *PlannerState              `json:"planner,omitempty"`
	Elicitation         *ElicitationState          `json:"elicitation,omitempty"`
	LinkedConversations []*LinkedConversationState `json:"linkedConversations,omitempty"`
	CreatedAt           time.Time                  `json:"createdAt,omitempty"`
	QueueSeq            int                        `json:"queueSeq,omitempty"`
	StartedByMessageID  string                     `json:"startedByMessageId,omitempty"`
}

type TurnStatus

type TurnStatus string
const (
	TurnStatusQueued         TurnStatus = "queued"
	TurnStatusRunning        TurnStatus = "running"
	TurnStatusWaitingForUser TurnStatus = "waiting_for_user"
	TurnStatusCompleted      TurnStatus = "completed"
	TurnStatusFailed         TurnStatus = "failed"
	TurnStatusCanceled       TurnStatus = "canceled"
)

type UpdateConversationInput

type UpdateConversationInput struct {
	ConversationID string `json:"-"`
	Title          string `json:"title,omitempty"`
	Visibility     string `json:"visibility,omitempty"`
	Shareable      *bool  `json:"shareable,omitempty"`
}

type UploadFileInput

type UploadFileInput struct {
	ConversationID string
	Path           string
	Name           string
	ContentType    string
	Data           []byte
}

type UploadFileOutput

type UploadFileOutput struct {
	ID       string `json:"id,omitempty"`
	URI      string `json:"uri"`
	Name     string `json:"name"`
	Size     int64  `json:"size"`
	MimeType string `json:"mimeType,omitempty"`
}

type UsageSummary

type UsageSummary struct {
	TotalInputTokens  int `json:"totalInputTokens,omitempty"`
	TotalOutputTokens int `json:"totalOutputTokens,omitempty"`
}

type UserMessageState

type UserMessageState struct {
	MessageID string `json:"messageId"`
	Content   string `json:"content,omitempty"`
}

type WorkspaceAgentInfo

type WorkspaceAgentInfo struct {
	ID           string        `json:"id,omitempty"`
	Name         string        `json:"name,omitempty"`
	ModelRef     string        `json:"modelRef,omitempty"`
	StarterTasks []StarterTask `json:"starterTasks,omitempty"`
}

type WorkspaceCapabilities

type WorkspaceCapabilities struct {
	AgentAutoSelection    bool `json:"agentAutoSelection,omitempty"`
	ModelAutoSelection    bool `json:"modelAutoSelection,omitempty"`
	ToolAutoSelection     bool `json:"toolAutoSelection,omitempty"`
	CompactConversation   bool `json:"compactConversation,omitempty"`
	PruneConversation     bool `json:"pruneConversation,omitempty"`
	AnonymousSession      bool `json:"anonymousSession,omitempty"`
	MessageCursor         bool `json:"messageCursor,omitempty"`
	StructuredElicitation bool `json:"structuredElicitation,omitempty"`
	TurnStartedEvent      bool `json:"turnStartedEvent,omitempty"`
}

type WorkspaceDefaults

type WorkspaceDefaults struct {
	Agent           string `json:"agent,omitempty"`
	Model           string `json:"model,omitempty"`
	Embedder        string `json:"embedder,omitempty"`
	AutoSelectTools bool   `json:"autoSelectTools,omitempty"`
	// ElicitationTimeoutSec is the per-prompt response timeout applied by
	// interactive clients when waiting for a user to respond to an
	// elicitation. Zero means the client should use its built-in default.
	ElicitationTimeoutSec int `json:"elicitationTimeoutSec,omitempty"`
}

type WorkspaceMetadata

type WorkspaceMetadata struct {
	WorkspaceRoot    string                `json:"workspaceRoot,omitempty"`
	WorkspaceVersion string                `json:"workspaceVersion,omitempty"`
	MetadataVersion  string                `json:"metadataVersion,omitempty"`
	DefaultAgent     string                `json:"defaultAgent,omitempty"`
	DefaultModel     string                `json:"defaultModel,omitempty"`
	DefaultEmbedder  string                `json:"defaultEmbedder,omitempty"`
	Defaults         *WorkspaceDefaults    `json:"defaults,omitempty"`
	Capabilities     WorkspaceCapabilities `json:"capabilities,omitempty"`
	Agents           []string              `json:"agents,omitempty"`
	Models           []string              `json:"models,omitempty"`
	AgentInfos       []WorkspaceAgentInfo  `json:"agentInfos,omitempty"`
	ModelInfos       []WorkspaceModelInfo  `json:"modelInfos,omitempty"`
	Version          string                `json:"version,omitempty"`
}

type WorkspaceModelInfo

type WorkspaceModelInfo struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type WorkspaceWindowSnapshot added in v0.1.9

type WorkspaceWindowSnapshot struct {
	WindowID       string                 `json:"windowId,omitempty"`
	ConversationID string                 `json:"conversationId,omitempty"`
	WindowKey      string                 `json:"windowKey,omitempty"`
	WindowTitle    string                 `json:"windowTitle,omitempty"`
	Presentation   string                 `json:"presentation,omitempty"`
	Region         string                 `json:"region,omitempty"`
	ParentKey      string                 `json:"parentKey,omitempty"`
	InTab          bool                   `json:"inTab,omitempty"`
	Parameters     map[string]interface{} `json:"parameters,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL