a2a

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgentRuntimeProxyMiddleware added in v0.1.56

func AgentRuntimeProxyMiddleware(
	authenticator AgentRuntimeRequestAuthenticator,
	resolver AgentRuntimeIdentityResolver,
) echo.MiddlewareFunc

AgentRuntimeProxyMiddleware turns a validated Runtime principal into the existing first-party A2A handler identity. The caller-provided slug is intentionally replaced by the slug bound to the authenticated Agent Token.

Types

type A2AArtifact

type A2AArtifact struct {
	ArtifactID string                   `json:"artifactId"`
	Name       string                   `json:"name,omitempty"`
	Extensions []string                 `json:"extensions,omitempty"`
	Parts      []map[string]interface{} `json:"parts,omitempty"`
	Metadata   map[string]interface{}   `json:"metadata,omitempty"`
}

type A2AContextRef

type A2AContextRef struct {
	ProtocolContextID string   `json:"protocol_context_id,omitempty"`
	ProtocolTaskID    string   `json:"protocol_task_id,omitempty"`
	RootContextID     string   `json:"root_context_id,omitempty"`
	ParentContextID   string   `json:"parent_context_id,omitempty"`
	ParentTaskID      string   `json:"parent_task_id,omitempty"`
	TraceID           string   `json:"trace_id,omitempty"`
	ReferenceTaskIDs  []string `json:"reference_task_ids,omitempty"`
	Source            string   `json:"source,omitempty"`
}

type A2AMessage

type A2AMessage struct {
	Kind             string                   `json:"kind,omitempty"`
	MessageID        string                   `json:"messageId,omitempty"`
	ContextID        string                   `json:"contextId,omitempty"`
	TaskID           string                   `json:"taskId,omitempty"`
	ReferenceTaskIDs []string                 `json:"referenceTaskIds,omitempty"`
	Extensions       []string                 `json:"extensions,omitempty"`
	Role             string                   `json:"role,omitempty"`
	Parts            []map[string]interface{} `json:"parts,omitempty"`
	Metadata         map[string]interface{}   `json:"metadata,omitempty"`
}

type A2AMessageSendParams

type A2AMessageSendParams struct {
	Message       A2AMessage             `json:"message"`
	Configuration *A2ASendConfiguration  `json:"configuration,omitempty"`
	Metadata      map[string]interface{} `json:"metadata,omitempty"`
}

A2AMessageSendParams maps the A2A message/send params onto an OpenLinker run.

type A2APushAuthenticationInfo

type A2APushAuthenticationInfo struct {
	Scheme      string `json:"scheme,omitempty"`
	Credentials string `json:"credentials,omitempty"`
}

type A2APushNotificationConfig

type A2APushNotificationConfig struct {
	ID              string                     `json:"id,omitempty"`
	URL             string                     `json:"url,omitempty"`
	Token           string                     `json:"token,omitempty"`
	Secret          string                     `json:"secret,omitempty"`
	Authentication  *A2APushAuthenticationInfo `json:"authentication,omitempty"`
	Metadata        map[string]interface{}     `json:"metadata,omitempty"`
	EventTypes      []string                   `json:"eventTypes,omitempty"`
	EventTypesAlias []string                   `json:"event_types,omitempty"`
}

type A2ASendConfiguration

type A2ASendConfiguration struct {
	AcceptedOutputModes        []string                       `json:"acceptedOutputModes,omitempty"`
	Blocking                   *bool                          `json:"blocking,omitempty"`
	ReturnImmediately          *bool                          `json:"returnImmediately,omitempty"`
	PushNotificationConfig     *A2APushNotificationConfig     `json:"pushNotificationConfig,omitempty"`
	TaskPushNotificationConfig *A2ATaskPushNotificationConfig `json:"taskPushNotificationConfig,omitempty"`
	HistoryLength              *int                           `json:"historyLength,omitempty"`
	Visibility                 string                         `json:"visibility,omitempty"`
	Options                    map[string]interface{}         `json:"options,omitempty"`
}

type A2ASendMessageResponse

type A2ASendMessageResponse struct {
	Task    *A2ATask    `json:"task,omitempty"`
	Message *A2AMessage `json:"message,omitempty"`
}

type A2AStreamResponse

type A2AStreamResponse struct {
	Task           *A2ATask                    `json:"task,omitempty"`
	Message        *A2AMessage                 `json:"message,omitempty"`
	StatusUpdate   *A2ATaskStatusUpdateEvent   `json:"statusUpdate,omitempty"`
	ArtifactUpdate *A2ATaskArtifactUpdateEvent `json:"artifactUpdate,omitempty"`
}

type A2ATask

type A2ATask struct {
	Kind            string                 `json:"kind"`
	ID              string                 `json:"id"`
	ContextID       string                 `json:"contextId,omitempty"`
	Status          A2ATaskStatus          `json:"status"`
	Artifacts       []A2AArtifact          `json:"artifacts,omitempty"`
	History         []A2AMessage           `json:"history,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
	ResponseMessage *A2AMessage            `json:"-"`
}

type A2ATaskArtifactUpdateEvent

type A2ATaskArtifactUpdateEvent struct {
	Kind      string                 `json:"kind"`
	TaskID    string                 `json:"taskId"`
	ContextID string                 `json:"contextId"`
	Artifact  A2AArtifact            `json:"artifact"`
	Append    bool                   `json:"append,omitempty"`
	LastChunk bool                   `json:"lastChunk,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type A2ATaskListParams

type A2ATaskListParams struct {
	ContextID            string `json:"contextId,omitempty"`
	Status               string `json:"status,omitempty"`
	PageSize             *int   `json:"pageSize,omitempty"`
	PageToken            string `json:"pageToken,omitempty"`
	HistoryLength        *int   `json:"historyLength,omitempty"`
	StatusTimestampAfter string `json:"statusTimestampAfter,omitempty"`
	IncludeArtifacts     *bool  `json:"includeArtifacts,omitempty"`
}

type A2ATaskListResponse

type A2ATaskListResponse struct {
	Tasks         []A2ATask `json:"tasks"`
	NextPageToken string    `json:"nextPageToken"`
	PageSize      int32     `json:"pageSize"`
	TotalSize     int32     `json:"totalSize"`
}

type A2ATaskPushConfigList

type A2ATaskPushConfigList struct {
	Configs       []A2ATaskPushNotificationConfig `json:"configs,omitempty"`
	NextPageToken string                          `json:"nextPageToken,omitempty"`
	Items         []A2ATaskPushNotificationConfig `json:"items,omitempty"`
}

type A2ATaskPushConfigParams

type A2ATaskPushConfigParams struct {
	ID                            string                     `json:"id,omitempty"`
	TaskID                        string                     `json:"taskId,omitempty"`
	TaskIDAlias                   string                     `json:"task_id,omitempty"`
	PushNotificationConfigID      string                     `json:"pushNotificationConfigId,omitempty"`
	PushNotificationConfigIDAlias string                     `json:"push_notification_config_id,omitempty"`
	PushNotificationConfig        A2APushNotificationConfig  `json:"pushNotificationConfig,omitempty"`
	URL                           string                     `json:"url,omitempty"`
	Token                         string                     `json:"token,omitempty"`
	Secret                        string                     `json:"secret,omitempty"`
	Authentication                *A2APushAuthenticationInfo `json:"authentication,omitempty"`
	Metadata                      map[string]interface{}     `json:"metadata,omitempty"`
	EventTypes                    []string                   `json:"eventTypes,omitempty"`
	EventTypesAlias               []string                   `json:"event_types,omitempty"`
	PageSize                      *int                       `json:"pageSize,omitempty"`
	PageToken                     string                     `json:"pageToken,omitempty"`
}

type A2ATaskPushNotificationConfig

type A2ATaskPushNotificationConfig struct {
	Tenant                 string                     `json:"tenant,omitempty"`
	ID                     string                     `json:"id,omitempty"`
	TaskID                 string                     `json:"taskId,omitempty"`
	TaskIDAlias            string                     `json:"task_id,omitempty"`
	URL                    string                     `json:"url,omitempty"`
	Token                  string                     `json:"token,omitempty"`
	Secret                 string                     `json:"secret,omitempty"`
	Authentication         *A2APushAuthenticationInfo `json:"authentication,omitempty"`
	Metadata               map[string]interface{}     `json:"metadata,omitempty"`
	EventTypes             []string                   `json:"eventTypes,omitempty"`
	EventTypesAlias        []string                   `json:"event_types,omitempty"`
	PushNotificationConfig A2APushNotificationConfig  `json:"pushNotificationConfig,omitempty"`
}

type A2ATaskQueryParams

type A2ATaskQueryParams struct {
	ID            string `json:"id"`
	HistoryLength *int   `json:"historyLength,omitempty"`
}

type A2ATaskStatus

type A2ATaskStatus struct {
	State     string      `json:"state"`
	Timestamp string      `json:"timestamp,omitempty"`
	Message   *A2AMessage `json:"message,omitempty"`
}

type A2ATaskStatusUpdateEvent

type A2ATaskStatusUpdateEvent struct {
	Kind      string                 `json:"kind"`
	TaskID    string                 `json:"taskId"`
	ContextID string                 `json:"contextId"`
	Status    A2ATaskStatus          `json:"status"`
	Final     bool                   `json:"final"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
}

type AgentCardProvider

type AgentCardProvider interface {
	GetAgentCardBySlug(ctx context.Context, slug string) (*agent.AgentCardResponse, error)
	GetExtendedAgentCardBySlug(ctx context.Context, slug string) (*agent.AgentCardResponse, error)
}

type AgentRuntimeIdentityResolver added in v0.1.56

type AgentRuntimeIdentityResolver interface {
	GetAgentByID(context.Context, uuid.UUID) (db.Agent, error)
}

AgentRuntimeIdentityResolver resolves ownership from Core's authoritative Agent record. A compatibility adapter can never nominate the acting user.

type AgentRuntimeRequestAuthenticator added in v0.1.56

type AgentRuntimeRequestAuthenticator interface {
	AuthenticateAgentRequest(echo.Context) (runtime.AuthenticatedRuntimePrincipal, *runtime.RuntimeTransportError)
}

AgentRuntimeRequestAuthenticator verifies the same Agent Token plus device mTLS pair used by the canonical Runtime transport.

type BearerGRPCAuthenticator

type BearerGRPCAuthenticator struct {
	// contains filtered or unexported fields
}

func NewBearerGRPCAuthenticator

func NewBearerGRPCAuthenticator(jwtSecret string, verifier auth.ApiKeyVerifier) *BearerGRPCAuthenticator

func NewBearerGRPCAuthenticatorWithUserStatus added in v0.1.41

func NewBearerGRPCAuthenticatorWithUserStatus(jwtSecret string, verifier auth.ApiKeyVerifier, users auth.UserStatusChecker) (*BearerGRPCAuthenticator, error)

func (*BearerGRPCAuthenticator) AuthenticateA2AGRPC

func (a *BearerGRPCAuthenticator) AuthenticateA2AGRPC(ctx context.Context) (*GRPCAuthInfo, error)

type CallPolicyResponse

type CallPolicyResponse struct {
	AgentID    string `json:"agent_id"`
	CallableBy string `json:"callable_by"`
	UpdatedAt  string `json:"updated_at,omitempty"`
}

type ChildRunResponse

type ChildRunResponse struct {
	ChildRunID      string             `json:"child_run_id"`
	ParentRunID     string             `json:"parent_run_id"`
	CallerAgentID   string             `json:"caller_agent_id"`
	CallerAgentSlug string             `json:"caller_agent_slug"`
	CallerAgentName string             `json:"caller_agent_name"`
	CallerAgentTags []string           `json:"caller_agent_tags"`
	CallerSkills    []SkillRef         `json:"caller_skills"`
	TargetAgentID   string             `json:"target_agent_id"`
	TargetAgentSlug string             `json:"target_agent_slug"`
	TargetAgentName string             `json:"target_agent_name"`
	TargetAgentTags []string           `json:"target_agent_tags"`
	TargetSkills    []SkillRef         `json:"target_skills"`
	Reason          string             `json:"reason"`
	Status          string             `json:"status"`
	CostCents       int32              `json:"cost_cents"`
	DurationMs      *int32             `json:"duration_ms,omitempty"`
	StartedAt       string             `json:"started_at"`
	FinishedAt      *string            `json:"finished_at,omitempty"`
	Source          string             `json:"source"`
	BillingMode     string             `json:"billing_mode"`
	A2AContext      *A2AContextRef     `json:"a2a_context,omitempty"`
	Children        []ChildRunResponse `json:"children,omitempty"`
}

type GRPCAuthInfo

type GRPCAuthInfo struct {
	UserID     uuid.UUID
	AuthMethod string
	Scopes     []string
	Principal  *auth.AuthPrincipal
}

type GRPCAuthenticator

type GRPCAuthenticator interface {
	AuthenticateA2AGRPC(ctx context.Context) (*GRPCAuthInfo, error)
}

type GRPCServer

type GRPCServer struct {
	a2apb.UnimplementedA2AServiceServer
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(svc service, cardProvider AgentCardProvider, auth GRPCAuthenticator) *GRPCServer

func (*GRPCServer) CancelTask

func (s *GRPCServer) CancelTask(ctx context.Context, req *a2apb.CancelTaskRequest) (*a2apb.Task, error)

func (*GRPCServer) CreateTaskPushNotificationConfig

func (s *GRPCServer) CreateTaskPushNotificationConfig(ctx context.Context, req *a2apb.TaskPushNotificationConfig) (*a2apb.TaskPushNotificationConfig, error)

func (*GRPCServer) DeleteTaskPushNotificationConfig

func (s *GRPCServer) DeleteTaskPushNotificationConfig(ctx context.Context, req *a2apb.DeleteTaskPushNotificationConfigRequest) (*emptypb.Empty, error)

func (*GRPCServer) GetExtendedAgentCard

func (s *GRPCServer) GetExtendedAgentCard(ctx context.Context, req *a2apb.GetExtendedAgentCardRequest) (*a2apb.AgentCard, error)

func (*GRPCServer) GetTask

func (s *GRPCServer) GetTask(ctx context.Context, req *a2apb.GetTaskRequest) (*a2apb.Task, error)

func (*GRPCServer) ListTasks

func (*GRPCServer) SendMessage

func (*GRPCServer) SendStreamingMessage

func (*GRPCServer) SetRunUpdateSource added in v0.1.56

func (s *GRPCServer) SetRunUpdateSource(source coreruntime.RunUpdateSource)

func (*GRPCServer) SubscribeToTask

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc service) *Handler

func (*Handler) CancelTaskHTTP

func (h *Handler) CancelTaskHTTP(c echo.Context) error

CancelTaskHTTP handles the A2A HTTP+JSON alias POST /tasks/:taskID:cancel.

func (*Handler) DeleteTaskPushNotificationHTTP

func (h *Handler) DeleteTaskPushNotificationHTTP(c echo.Context) error

func (*Handler) GetCallPolicy

func (h *Handler) GetCallPolicy(c echo.Context) error

func (*Handler) GetExtendedAgentCardHTTP

func (h *Handler) GetExtendedAgentCardHTTP(c echo.Context) error

func (*Handler) GetPublicAgentCardHTTP

func (h *Handler) GetPublicAgentCardHTTP(c echo.Context) error

GetPublicAgentCardHTTP exposes the A2A well-known Agent Card beneath the agent's protocol base URL while keeping the existing marketplace card URL.

func (*Handler) GetRuntimeWorkbench

func (h *Handler) GetRuntimeWorkbench(c echo.Context) error

func (*Handler) GetTaskHTTP

func (h *Handler) GetTaskHTTP(c echo.Context) error

GetTaskHTTP handles the A2A HTTP+JSON alias GET /tasks/:taskID.

func (*Handler) GetTaskPushNotificationHTTP

func (h *Handler) GetTaskPushNotificationHTTP(c echo.Context) error

func (*Handler) JSONRPC

func (h *Handler) JSONRPC(c echo.Context) error

JSONRPC handles the A2A JSON-RPC binding for one public Agent slug.

func (*Handler) ListChildren

func (h *Handler) ListChildren(c echo.Context) error

func (*Handler) ListParentRuns

func (h *Handler) ListParentRuns(c echo.Context) error

func (*Handler) ListTaskPushNotificationsHTTP

func (h *Handler) ListTaskPushNotificationsHTTP(c echo.Context) error

func (*Handler) ListTasksHTTP

func (h *Handler) ListTasksHTTP(c echo.Context) error

func (*Handler) MessageHTTP

func (h *Handler) MessageHTTP(c echo.Context) error

MessageHTTP dispatches literal A2A colon actions such as /message:send and /message:stream.

func (*Handler) Register

func (h *Handler) Register(api *echo.Group, jwtMiddleware, queryMiddleware echo.MiddlewareFunc)

Register mounts creator controls and user-visible A2A trace lookup. Runtime credentials are issued and rotated by the Agent registration API, not by a second A2A-owned token surface.

func (*Handler) RegisterAgentRuntimeProxy added in v0.1.56

func (h *Handler) RegisterAgentRuntimeProxy(api *echo.Group, runtimeIdentity echo.MiddlewareFunc)

RegisterAgentRuntimeProxy mounts the legacy AgentNode A2A surface on the dedicated Runtime mTLS listener. The supplied middleware must derive the creator and target Agent from the authenticated Runtime principal.

func (*Handler) SendMessageHTTP

func (h *Handler) SendMessageHTTP(c echo.Context) error

SendMessageHTTP handles the A2A HTTP+JSON alias POST /message:send.

func (*Handler) SetAgentCardProvider

func (h *Handler) SetAgentCardProvider(provider AgentCardProvider)

func (*Handler) SetRunUpdateSource added in v0.1.56

func (h *Handler) SetRunUpdateSource(source runtime.RunUpdateSource)

func (*Handler) SetTaskPushNotificationHTTP

func (h *Handler) SetTaskPushNotificationHTTP(c echo.Context) error

func (*Handler) StreamMessageHTTP

func (h *Handler) StreamMessageHTTP(c echo.Context) error

StreamMessageHTTP handles the A2A HTTP+JSON alias POST /message:stream.

func (*Handler) SubscribeTaskHTTP

func (h *Handler) SubscribeTaskHTTP(c echo.Context) error

SubscribeTaskHTTP handles the A2A HTTP+JSON task subscription alias.

func (*Handler) TaskActionHTTP

func (h *Handler) TaskActionHTTP(c echo.Context) error

TaskActionHTTP dispatches literal A2A task colon actions such as /tasks/{id}:subscribe and /tasks/{id}:cancel.

func (*Handler) UpdateCallPolicy

func (h *Handler) UpdateCallPolicy(c echo.Context) error

type JSONRPCError

type JSONRPCError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type JSONRPCRequest

type JSONRPCRequest struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      json.RawMessage `json:"id"`
	Method  string          `json:"method"`
	Params  json.RawMessage `json:"params,omitempty"`
}

JSONRPCRequest is the minimal JSON-RPC envelope used by the A2A adapter.

type JSONRPCResponse

type JSONRPCResponse struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      json.RawMessage `json:"id"`
	Result  interface{}     `json:"result,omitempty"`
	Error   *JSONRPCError   `json:"error,omitempty"`
}

type ParentRunListResponse

type ParentRunListResponse struct {
	Items []ParentRunSummary `json:"items"`
	Total int32              `json:"total"`
	Page  int32              `json:"page"`
	Size  int32              `json:"size"`
}

ParentRunListResponse is the user's A2A entry directory.

type ParentRunSummary

type ParentRunSummary struct {
	ParentRunID           string         `json:"parent_run_id"`
	CallerAgentID         string         `json:"caller_agent_id"`
	CallerAgentSlug       string         `json:"caller_agent_slug"`
	CallerAgentName       string         `json:"caller_agent_name"`
	CallerAgentTags       []string       `json:"caller_agent_tags"`
	CallerSkills          []SkillRef     `json:"caller_skills"`
	Source                string         `json:"source"`
	Status                string         `json:"status"`
	DurationMs            *int32         `json:"duration_ms,omitempty"`
	StartedAt             string         `json:"started_at"`
	FinishedAt            *string        `json:"finished_at,omitempty"`
	ChildCount            int32          `json:"child_count"`
	SuccessfulChildCount  int32          `json:"successful_child_count"`
	RunningChildCount     int32          `json:"running_child_count"`
	ActiveAgentTokenCount int32          `json:"active_agent_token_count"`
	LastAgentTokenUsedAt  *string        `json:"last_agent_token_used_at,omitempty"`
	A2AContext            *A2AContextRef `json:"a2a_context,omitempty"`
}

ParentRunSummary identifies one user-owned run that delegated work to child Agents.

type RuntimeWorkbenchAgent

type RuntimeWorkbenchAgent struct {
	ID                  string `json:"id"`
	Slug                string `json:"slug"`
	Name                string `json:"name"`
	ConnectionMode      string `json:"connection_mode"`
	LifecycleStatus     string `json:"lifecycle_status"`
	Visibility          string `json:"visibility"`
	CertificationStatus string `json:"certification_status"`
	ReadinessCallable   bool   `json:"readiness_callable"`
	AvailabilityStatus  string `json:"availability_status"`
}

type RuntimeWorkbenchDiagnostic

type RuntimeWorkbenchDiagnostic struct {
	Code            string `json:"code"`
	Severity        string `json:"severity"`
	Summary         string `json:"summary"`
	TechnicalDetail string `json:"technical_detail"`
	NextAction      string `json:"next_action"`
}

type RuntimeWorkbenchResponse

type RuntimeWorkbenchResponse struct {
	Agent       RuntimeWorkbenchAgent        `json:"agent"`
	Runtime     RuntimeWorkbenchRuntime      `json:"runtime"`
	RecentRuns  []RuntimeWorkbenchRun        `json:"recent_runs"`
	Diagnostics []RuntimeWorkbenchDiagnostic `json:"diagnostics"`
}

type RuntimeWorkbenchRun

type RuntimeWorkbenchRun struct {
	RunID                string  `json:"run_id"`
	Status               string  `json:"status"`
	DispatchState        string  `json:"dispatch_state"`
	AttemptCount         int32   `json:"attempt_count"`
	MaxAttempts          int32   `json:"max_attempts"`
	NextAttemptAt        *string `json:"next_attempt_at,omitempty"`
	Source               string  `json:"source"`
	StartedAt            string  `json:"started_at"`
	FinishedAt           *string `json:"finished_at,omitempty"`
	LatestAttemptID      *string `json:"latest_attempt_id,omitempty"`
	LatestAttemptState   *string `json:"latest_attempt_state,omitempty"`
	LastAssignmentAt     *string `json:"last_assignment_at,omitempty"`
	LatestAttemptEndedAt *string `json:"latest_attempt_ended_at,omitempty"`
	ErrorCode            *string `json:"error_code,omitempty"`
	ErrorMessage         *string `json:"error_message,omitempty"`
	DetailURL            string  `json:"detail_url"`
}

type RuntimeWorkbenchRuntime

type RuntimeWorkbenchRuntime struct {
	RuntimeContractID     string           `json:"runtime_contract_id"`
	RuntimeContractDigest string           `json:"runtime_contract_digest"`
	TransportPolicy       string           `json:"transport_policy"`
	PrimaryTransport      string           `json:"primary_transport"`
	FallbackTransport     string           `json:"fallback_transport"`
	CurrentTransport      string           `json:"current_transport"`
	TransportCounts       map[string]int32 `json:"transport_counts"`
	TransportChangedAt    *string          `json:"transport_changed_at,omitempty"`
	FallbackReason        *string          `json:"fallback_reason,omitempty"`
	ConnectionStatus      string           `json:"connection_status"`
	ActiveNodeCount       int32            `json:"active_node_count"`
	ActiveSessionCount    int32            `json:"active_session_count"`
	ReadySessionCount     int32            `json:"ready_session_count"`
	WorkerFeatures        []string         `json:"worker_features"`
	DrainingSessionCount  int32            `json:"draining_session_count"`
	TotalCapacity         int32            `json:"total_capacity"`
	TotalInflight         int32            `json:"total_inflight"`
	PendingRunCount       int32            `json:"pending_run_count"`
	RetryWaitRunCount     int32            `json:"retry_wait_run_count"`
	OfferedRunCount       int32            `json:"offered_run_count"`
	ExecutingRunCount     int32            `json:"executing_run_count"`
	LastSessionActivityAt *string          `json:"last_session_activity_at,omitempty"`
	LastAssignmentAt      *string          `json:"last_assignment_at,omitempty"`
	LastResultAt          *string          `json:"last_result_at,omitempty"`
}

type SQLAgentRuntimeIdentityResolver added in v0.1.56

type SQLAgentRuntimeIdentityResolver struct {
	// contains filtered or unexported fields
}

func NewSQLAgentRuntimeIdentityResolver added in v0.1.56

func NewSQLAgentRuntimeIdentityResolver(pool *pgxpool.Pool) *SQLAgentRuntimeIdentityResolver

func (*SQLAgentRuntimeIdentityResolver) GetAgentByID added in v0.1.56

func (r *SQLAgentRuntimeIdentityResolver) GetAgentByID(ctx context.Context, agentID uuid.UUID) (db.Agent, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(pool *pgxpool.Pool, runtimeSvc *runtime.Service) *Service

func (*Service) CancelProtocolTask

func (s *Service) CancelProtocolTask(ctx context.Context, userID uuid.UUID, slug, taskID string) (*A2ATask, error)

CancelProtocolTask maps A2A tasks/cancel onto a real OpenLinker run cancellation.

func (*Service) DeletePushNotificationConfig

func (s *Service) DeletePushNotificationConfig(ctx context.Context, userID uuid.UUID, slug string, params *A2ATaskPushConfigParams) error

func (*Service) GetCallPolicy

func (s *Service) GetCallPolicy(ctx context.Context, userID, agentID uuid.UUID) (*CallPolicyResponse, error)

func (*Service) GetProtocolTask

func (s *Service) GetProtocolTask(ctx context.Context, userID uuid.UUID, slug, taskID string, historyLength *int) (*A2ATask, error)

GetProtocolTask maps an owner-readable OpenLinker run back to the A2A Task shape.

func (*Service) GetPushNotificationConfig

func (s *Service) GetPushNotificationConfig(ctx context.Context, userID uuid.UUID, slug string, params *A2ATaskPushConfigParams) (*A2ATaskPushNotificationConfig, error)

func (*Service) GetRuntimeWorkbench

func (s *Service) GetRuntimeWorkbench(
	ctx context.Context,
	userID, agentID uuid.UUID,
) (*RuntimeWorkbenchResponse, error)

func (*Service) ListChildren

func (s *Service) ListChildren(ctx context.Context, userID, parentRunID uuid.UUID) ([]ChildRunResponse, error)

func (*Service) ListParentRuns

func (s *Service) ListParentRuns(ctx context.Context, userID uuid.UUID, page, size int32, search string) (*ParentRunListResponse, error)

func (*Service) ListProtocolTaskEvents

func (s *Service) ListProtocolTaskEvents(ctx context.Context, userID uuid.UUID, slug, taskID string, afterSequence int32) ([]interface{}, bool, int32, error)

func (*Service) ListProtocolTasks

func (s *Service) ListProtocolTasks(ctx context.Context, userID uuid.UUID, slug string, params *A2ATaskListParams) (*A2ATaskListResponse, error)

func (*Service) ListPushNotificationConfigs

func (s *Service) ListPushNotificationConfigs(ctx context.Context, userID uuid.UUID, slug string, params *A2ATaskPushConfigParams) (*A2ATaskPushConfigList, error)

func (*Service) SendProtocolMessage

func (s *Service) SendProtocolMessage(ctx context.Context, userID uuid.UUID, slug string, params *A2AMessageSendParams) (*A2ATask, error)

SendProtocolMessage accepts an external A2A message/send request and runs the target Agent.

func (*Service) SetPushNotificationConfig

func (s *Service) SetPushNotificationConfig(ctx context.Context, userID uuid.UUID, slug string, params *A2ATaskPushConfigParams) (*A2ATaskPushNotificationConfig, error)

func (*Service) SetRunUpdateSource added in v0.1.56

func (s *Service) SetRunUpdateSource(source runtime.RunUpdateSource)

SetRunUpdateSource enables advisory event-driven waits for blocking A2A message/send requests. PostgreSQL remains the authoritative Run state.

func (*Service) SetRuntimePresenceStore added in v0.1.56

func (s *Service) SetRuntimePresenceStore(store runtime.RuntimePresenceStore)

SetRuntimePresenceStore lets owner diagnostics reuse the same expiring lease-backed presence that Runtime dispatch uses. PostgreSQL identity, attachment, contract, Node and credential rows remain authoritative.

func (*Service) SetTaskCallbackManager

func (s *Service) SetTaskCallbackManager(manager taskCallbackManager)

func (*Service) StartProtocolMessage

func (s *Service) StartProtocolMessage(ctx context.Context, userID uuid.UUID, slug string, params *A2AMessageSendParams) (*A2ATask, error)

StartProtocolMessage starts an A2A message/stream request and returns the initial Task.

func (*Service) UpdateCallPolicy

func (s *Service) UpdateCallPolicy(ctx context.Context, userID, agentID uuid.UUID, req *UpdateCallPolicyRequest) (*CallPolicyResponse, error)

type SkillRef

type SkillRef struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

SkillRef is the small capability badge shown in A2A call-chain views.

type UpdateCallPolicyRequest

type UpdateCallPolicyRequest struct {
	CallableBy string `json:"callable_by" validate:"required,oneof=public same_creator private"`
}

UpdateCallPolicyRequest configures which Agents may call the target through OpenLinker.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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