Documentation
¶
Index ¶
- Constants
- Variables
- func A2AProfileV02Files() fs.FS
- func CanonicalRouterAgentAudience(endpoint string) (string, error)
- func ContractFiles() fs.FS
- func ReadA2AConformanceFixtureV02(fixturePath string) ([]byte, error)
- func RouterAgentContextHeadersV1(context RouterInvocationCredentialContextV1) map[string]string
- func ValidateA2AMessageResult(message *a2a.Message) error
- func ValidateInstallationImmutablePin(before, after Installation) error
- func ValidateInvocationReleaseProvenance(releaseID, cardDigest string) error
- func ValidateNestedInvocationCorrelation(parent InvocationRecordV1, child InvocationEventV03) error
- func ValidateResolveAgentRequestV1(request ResolveAgentRequestV1) error
- func ValidateRouterAgentAudience(value string) error
- func ValidateRouterAgentIssuer(value string) error
- func ValidateRouterAgentKeyID(value string) error
- func ValidateRouterInstancePortNameV1(value string) error
- func ValidateRouterInvocationCredentialClaimsV1(claims RouterInvocationCredentialClaimsV1, now time.Time) error
- func ValidateRouterTopologyStatusV1(status RouterTopologyStatusV1) error
- func ValidateTraceResponseV1(workspaceID string, traceID TraceID, response TraceResponseV1) error
- type A2AConformanceAssertionErrorV02
- type A2AConformanceCaseV02
- type A2AConformanceManifestV02
- type A2AConformanceRuleIDV02
- type A2AContextHeaders
- type A2AProfile
- type A2AProfileConformanceV02
- type A2AProfileMessageError
- type A2AProfileOperationV02
- type A2AProfileStateError
- type A2AProfileTaskError
- type A2AProfileTaskStateV02
- type A2AProfileTaskStatesV02
- type A2AProfileV02
- type A2AProtocolErrorV02
- type A2ASDK
- type A2ATaskStateClassification
- type A2ATaskStateMapping
- type AgentAuthentication
- type AgentCard
- type AgentCardConformanceCase
- type AgentCardConformanceManifest
- type AgentCardSemanticRuleID
- type AgentCardSemanticViolation
- type AgentLimits
- type AgentOwner
- type AgentProtocol
- type AgentReleaseResponse
- type AgentSkill
- type Caller
- type CatalogEntry
- type CorrelatedPlatformErrorV4
- type CreateAgentReleaseRequest
- type CreateEndpointBindingRequest
- type CreateWorkspaceRequest
- type DispatchInvocationRequest
- type DispatchInvocationRequestV1
- type EndpointBindingResponse
- type InstallAgentRequest
- type Installation
- type InstallationList
- type InstallationSemanticRuleID
- type InstallationSemanticValidationError
- type InvocationContractKind
- type InvocationDetailResponse
- type InvocationDetailResponseV1
- type InvocationEvent
- type InvocationEventV02
- type InvocationEventV03
- type InvocationRecord
- type InvocationRecordV1
- type InvocationResult
- type InvocationResultMode
- type InvocationResultStreamEvent
- type InvocationResultStreamEventV2
- type InvocationSemanticRuleID
- type InvocationSemanticValidationError
- type InvokeAgentRequest
- type JSONSchema
- type NestedInvocationRequestV1
- type PermissionDeclaration
- type PlatformError
- type PlatformErrorCode
- type PlatformErrorV2
- type PlatformErrorV3
- type PlatformErrorV4
- type PreCorrelationPlatformErrorV4
- type PublicAgentRelease
- type PublicAgentShare
- type RegisterAgentRequest
- type ResolveAgentRequest
- type ResolveAgentRequestV1
- type ResolveAgentRequestV2
- type ResolveAgentResponse
- type ResolveInstalledVersionRequest
- type ResolveInstalledVersionResponse
- type ResolvedInstallation
- type ResultContractValidator
- func (v *ResultContractValidator) ValidateInvocationEvent(event InvocationEventV02) error
- func (v *ResultContractValidator) ValidateInvocationResult(result InvocationResult) error
- func (v *ResultContractValidator) ValidateInvocationResultForRequest(result InvocationResult, invocationID string, rootTaskID string, ...) error
- func (v *ResultContractValidator) ValidateInvocationResultStreamEvent(event InvocationResultStreamEvent) error
- func (v *ResultContractValidator) ValidatePlatformError(platformError PlatformErrorV2) error
- func (v *ResultContractValidator) ValidatePlatformErrorV3(platformError PlatformErrorV3) error
- func (v *ResultContractValidator) ValidateResolveAgentErrorCorrelation(request ResolveAgentRequestV1, platformError PlatformErrorV2) error
- func (v *ResultContractValidator) ValidateResolveAgentErrorCorrelationV3(request ResolveAgentRequestV2, platformError PlatformErrorV3) error
- type ResultStreamEventType
- type ResultStreamSequenceValidator
- type RouterAgentAuthenticationErrorV1
- type RouterAgentCredentialConformanceCase
- type RouterAgentCredentialConformanceManifestV1
- type RouterEventEnvelope
- type RouterEventEnvelopeV02
- type RouterInstanceDirectoryTargetV1
- type RouterInstanceDirectoryV1
- type RouterInstanceV1
- type RouterInvocationCredentialClaimsV1
- type RouterInvocationCredentialContextV1
- type RouterNacosInstanceBindingTargetV1
- type RouterNacosInstanceBindingsV1
- type RouterNetworkEndpointV1
- type RouterTopologyObservationState
- type RouterTopologyStatusObservationV1
- type RouterTopologyStatusV1
- type RuntimeContractValidator
- func (v *RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4(platformError CorrelatedPlatformErrorV4) error
- func (v *RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4JSON(data []byte) error
- func (v *RuntimeContractValidator) ValidateInvocationDetailResponseV1(workspaceID string, detail InvocationDetailResponseV1) error
- func (v *RuntimeContractValidator) ValidateInvocationEventV03(event InvocationEventV03) error
- func (v *RuntimeContractValidator) ValidateInvocationResultStreamEventV2(event InvocationResultStreamEventV2) error
- func (v *RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4(platformError PreCorrelationPlatformErrorV4) error
- func (v *RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4JSON(data []byte) error
- type RuntimeInvocationSequenceValidator
- type RuntimeResultStreamSequenceValidator
- type SchemaValidationError
- type SearchAgentsQuery
- type SearchAgentsResponse
- type SemanticIssue
- type SemanticValidationError
- type TraceID
- type TraceResponse
- type TraceResponseV1
- type TrustedPublicationError
- type TrustedPublicationErrorCode
- type UpdateInstallationRequest
- type Validator
- func (v *Validator) DecodeAgentCard(data []byte) (AgentCard, error)
- func (v *Validator) DecodeRegisterAgentRequest(data []byte) (RegisterAgentRequest, error)
- func (v *Validator) ValidateA2AProfile(profile A2AProfile) error
- func (v *Validator) ValidateAgentCard(card AgentCard) error
- func (v *Validator) ValidateInstallation(installation Installation) error
- func (v *Validator) ValidateInvocationEvent(event InvocationEvent) error
- func (v *Validator) ValidateInvocationResult(result InvocationResult) error
- func (v *Validator) ValidateInvocationResultForRequest(result InvocationResult, invocationID string, rootTaskID string, ...) error
- func (v *Validator) ValidateInvocationResultStreamEvent(event InvocationResultStreamEvent) error
- func (v *Validator) ValidatePlatformError(platformError PlatformError) error
- func (v *Validator) ValidatePlatformErrorV3(platformError PlatformErrorV3) error
- func (v *Validator) ValidateResolveAgentResponseForRequest(request ResolveAgentRequestV2, response ResolveAgentResponse) error
- func (v *Validator) ValidateWorkspace(workspace Workspace) error
- type VerificationChallengeResponse
- type Workspace
Constants ¶
const ( A2AProfileSchemaVersionV02 = "0.2" A2AProfileProtocolVersion = "0.3.0" A2AProfileSDKModule = "github.com/a2aproject/a2a-go" A2AProfileSDKVersion = "v0.3.15" A2AConformanceSchemaV01 = "0.1" )
const ( AgentCardSchemaVersion = "0.2" WorkspaceSchemaVersion = "1" InstallationSchemaVersion = "2" InvocationEventSchemaVersion = InvocationEventV02SchemaVersion PlatformErrorSchemaVersion = "2" WorkspacePlatformErrorSchemaVersion = "3" A2AProfileSchemaVersion = A2AProfileSchemaVersionV02 A2AProtocolVersion = A2AProfileProtocolVersion NorthboundAPIVersion = "1" ControlPlaneInternalAPIVersion = "1" RouterInternalAPIVersion = "1" DiscoveryDefaultLimit = 25 DiscoveryMinimumLimit = 1 DiscoveryMaximumLimit = 100 InstallationMinimumLimit = 1 InstallationMaximumLimit = 100 RegistrationMaximumBodyBytes = 16 << 20 WorkspaceRequestMaximumBodyBytes = 1 << 20 )
const ( PublicAgentAvailabilityInstallable = "installable" PublicAgentAvailabilityNotInstallable = "not_installable" )
const ( InvocationResultSchemaVersion = "1" InvocationResultStreamEventSchemaVersion = "1" InvocationEventV02SchemaVersion = "0.2" ErrorCodeNotAcceptable PlatformErrorCode = "NOT_ACCEPTABLE" )
const ( RouterAgentCredentialSchemaVersion = "1" RouterAgentCredentialAlgorithm = "EdDSA" RouterAgentCredentialType = "nekiro-router+jwt" RouterAgentCredentialMaximumTTL = 300 * time.Second RouterAgentAuthorizationHeader = "Authorization" RouterAgentTraceHeader = "x-nek-trace-id" RouterAgentInvocationHeader = "x-nek-invocation-id" RouterAgentRootTaskHeader = "x-nek-root-task-id" RouterAgentParentInvocationHeader = "x-nek-parent-invocation-id" RouterAgentWorkspaceHeader = "x-nek-workspace-id" RouterAgentTargetAgentHeader = "x-nek-target-agent-id" RouterAgentCardVersionHeader = "x-nek-agent-card-version" RouterAgentReleaseHeader = "x-nek-agent-release-id" RouterAgentCardDigestHeader = "x-nek-agent-card-digest" RouterAgentCapabilityHeader = "x-nek-capability" )
const ( RouterTopologyStatusSchemaVersion = "1" RouterTopologyStatusObservationMaximum = 65536 )
const ( NorthboundInvocationAPIVersion = "1" RouterInternalMetadataAPIVersion = "1" RouterInternalRuntimeAPIVersion = "1" AgentRouterAPIVersion = "1" ControlPlaneInstalledVersionAPIVersion = "1" RuntimePlatformErrorSchemaVersion = "4" RuntimeInvocationEventSchemaVersion = "0.3" RuntimeResultStreamEventSchemaVersion = "2" RuntimeDeadlineMinimumMS int64 = 1 RuntimeDeadlineMaximumMS int64 = 600000 RuntimeByteLimitMinimum int64 = 1 RuntimeByteLimitMaximum int64 = 2147483647 ErrorCodePayloadTooLarge PlatformErrorCode = "PAYLOAD_TOO_LARGE" ErrorCodeAgentAuthUnsupported PlatformErrorCode = "AGENT_AUTH_UNSUPPORTED" ErrorCodeAgentResponseTooLarge PlatformErrorCode = "AGENT_RESPONSE_TOO_LARGE" )
const ( ReleaseStateDraft = "draft" ReleaseStatePendingVerification = "pending_verification" ReleaseStateVerified = "verified" ReleaseStatePublished = "published" ReleaseStateSuspended = "suspended" ReleaseStateRevoked = "revoked" )
const RouterInstanceDirectorySchemaVersion = "1"
const RouterNacosInstanceBindingsSchemaVersion = "1"
Variables ¶
var ( ErrResultStreamInterrupted = errors.New("result stream ended before a terminal event") ErrResultStreamTerminated = errors.New("result stream already has a terminal event") ErrResultStreamClosed = errors.New("result stream validation is closed") )
var ( ErrRuntimeMediaNotAcceptable = errors.New("invocation result media is not acceptable") ErrRuntimeSequenceTerminal = errors.New("invocation lifecycle already has a terminal event") ErrRuntimeStreamInterrupted = errors.New("result stream ended before a terminal event") ErrRuntimeStreamClosed = errors.New("result stream validation is closed") )
Functions ¶
func A2AProfileV02Files ¶
func ContractFiles ¶
func RouterAgentContextHeadersV1 ¶
func RouterAgentContextHeadersV1(context RouterInvocationCredentialContextV1) map[string]string
func ValidateInstallationImmutablePin ¶
func ValidateInstallationImmutablePin(before, after Installation) error
func ValidateInvocationReleaseProvenance ¶
ValidateInvocationReleaseProvenance keeps the additive release metadata truthful: legacy invocations carry neither field, while trusted invocations carry a safe Release ID and the canonical lower-case SHA-256 Card digest. The absent pair is the wire-level legacy/unverified encoding retained by Invocation Event 0.3; it is never inferred by Catalog for new versions.
func ValidateNestedInvocationCorrelation ¶
func ValidateNestedInvocationCorrelation(parent InvocationRecordV1, child InvocationEventV03) error
func ValidateResolveAgentRequestV1 ¶
func ValidateResolveAgentRequestV1(request ResolveAgentRequestV1) error
func ValidateRouterInstancePortNameV1 ¶
ValidateRouterInstancePortNameV1 validates the shared port-name identifier used by Router bootstrap configuration and directory documents.
func ValidateRouterInvocationCredentialClaimsV1 ¶
func ValidateRouterInvocationCredentialClaimsV1(claims RouterInvocationCredentialClaimsV1, now time.Time) error
func ValidateRouterTopologyStatusV1 ¶
func ValidateRouterTopologyStatusV1(status RouterTopologyStatusV1) error
func ValidateTraceResponseV1 ¶
func ValidateTraceResponseV1(workspaceID string, traceID TraceID, response TraceResponseV1) error
Types ¶
type A2AConformanceAssertionErrorV02 ¶
type A2AConformanceAssertionErrorV02 struct {
Rule A2AConformanceRuleIDV02
Classification A2AProtocolErrorV02
Cause error
}
func (*A2AConformanceAssertionErrorV02) Error ¶
func (e *A2AConformanceAssertionErrorV02) Error() string
func (*A2AConformanceAssertionErrorV02) Unwrap ¶
func (e *A2AConformanceAssertionErrorV02) Unwrap() error
type A2AConformanceCaseV02 ¶
type A2AConformanceCaseV02 struct {
ID string `json:"id"`
File string `json:"file"`
RequestFile string `json:"requestFile,omitempty"`
Operation string `json:"operation"`
FixtureKind string `json:"fixtureKind"`
ExpectedValid bool `json:"expectedValid"`
WireResultKind string `json:"wireResultKind,omitempty"`
GoConcreteType string `json:"goConcreteType,omitempty"`
ProtocolError A2AProtocolErrorV02 `json:"protocolError,omitempty"`
MediaType string `json:"mediaType"`
Rules []A2AConformanceRuleIDV02 `json:"rules"`
}
type A2AConformanceManifestV02 ¶
type A2AConformanceManifestV02 struct {
SchemaVersion string `json:"schemaVersion"`
ProfileSchemaVersion string `json:"profileSchemaVersion"`
ProtocolVersion string `json:"protocolVersion"`
Cases []A2AConformanceCaseV02 `json:"cases"`
}
func DecodeA2AConformanceManifestV02 ¶
func DecodeA2AConformanceManifestV02(data []byte, corpus fs.FS) (A2AConformanceManifestV02, error)
func LoadA2AConformanceManifestV02 ¶
func LoadA2AConformanceManifestV02() (A2AConformanceManifestV02, error)
type A2AConformanceRuleIDV02 ¶
type A2AConformanceRuleIDV02 string
const ( A2ARuleJSONRPCEnvelope A2AConformanceRuleIDV02 = "jsonrpc-envelope" A2ARuleRequestParams A2AConformanceRuleIDV02 = "request-params" A2ARuleRequestResponseID A2AConformanceRuleIDV02 = "request-response-id" A2ARuleResultXORError A2AConformanceRuleIDV02 = "result-xor-error" A2ARuleResultUnion A2AConformanceRuleIDV02 = "result-union" A2ARuleResultType A2AConformanceRuleIDV02 = "result-type" A2ARuleMessageResult A2AConformanceRuleIDV02 = "message-result" A2ARuleTaskIdentity A2AConformanceRuleIDV02 = "task-identity" A2ARuleTaskState A2AConformanceRuleIDV02 = "task-state" A2ARuleSSEFraming A2AConformanceRuleIDV02 = "sse-framing" A2ARuleEventKinds A2AConformanceRuleIDV02 = "event-kinds" A2ARuleTaskContextStability A2AConformanceRuleIDV02 = "task-context-stability" A2ARuleTerminalRequired A2AConformanceRuleIDV02 = "terminal-required" A2ARuleTerminalLast A2AConformanceRuleIDV02 = "terminal-last" A2ARuleArtifactOrder A2AConformanceRuleIDV02 = "artifact-order" A2ARuleArtifactLastChunk A2AConformanceRuleIDV02 = "artifact-last-chunk" A2ARuleHistoryLength A2AConformanceRuleIDV02 = "history-length" A2ARuleErrorOnly A2AConformanceRuleIDV02 = "error-only" A2ARuleRejectedMapping A2AConformanceRuleIDV02 = "rejected-mapping" A2ARuleUnsupportedStateMapping A2AConformanceRuleIDV02 = "unsupported-state-mapping" A2ARuleSameTask A2AConformanceRuleIDV02 = "same-task" A2ARuleCanceledState A2AConformanceRuleIDV02 = "canceled-state" A2ARuleFiveContextHeaders A2AConformanceRuleIDV02 = "five-context-headers" )
type A2AContextHeaders ¶
type A2AProfile ¶
type A2AProfile = A2AProfileV02
func LoadA2AProfile ¶
func LoadA2AProfile() (A2AProfile, error)
type A2AProfileMessageError ¶
type A2AProfileMessageError struct {
Reason string
ErrorCode PlatformErrorCode
}
func (*A2AProfileMessageError) Error ¶
func (e *A2AProfileMessageError) Error() string
type A2AProfileOperationV02 ¶
type A2AProfileOperationV02 struct {
Method string `json:"method"`
ClientMethod string `json:"clientMethod"`
ServerMethod string `json:"serverMethod"`
Interaction string `json:"interaction"`
RequestType string `json:"requestType"`
AcceptedResultKinds []string `json:"acceptedResultKinds,omitempty"`
AcceptedEventKinds []string `json:"acceptedEventKinds,omitempty"`
ExpectedErrors []string `json:"expectedErrors,omitempty"`
}
type A2AProfileStateError ¶
type A2AProfileStateError struct {
State a2a.TaskState
Reason string
ErrorCode PlatformErrorCode
}
func (*A2AProfileStateError) Error ¶
func (e *A2AProfileStateError) Error() string
type A2AProfileTaskError ¶
type A2AProfileTaskError struct {
Reason string
ErrorCode PlatformErrorCode
}
func (*A2AProfileTaskError) Error ¶
func (e *A2AProfileTaskError) Error() string
type A2AProfileTaskStateV02 ¶
type A2AProfileTaskStateV02 struct {
State string `json:"state"`
InvocationStatus string `json:"invocationStatus"`
ErrorCode PlatformErrorCode `json:"errorCode,omitempty"`
}
type A2AProfileTaskStatesV02 ¶
type A2AProfileTaskStatesV02 struct {
Transient []A2AProfileTaskStateV02 `json:"transient"`
Terminal []A2AProfileTaskStateV02 `json:"terminal"`
Unsupported []A2AProfileTaskStateV02 `json:"unsupported"`
Unspecified A2AProfileTaskStateV02 `json:"unspecified"`
}
type A2AProfileV02 ¶
type A2AProfileV02 struct {
SchemaVersion string `json:"schemaVersion"`
ProtocolVersion string `json:"protocolVersion"`
SDK A2ASDK `json:"sdk"`
Transport string `json:"transport"`
AgentCardPath string `json:"agentCardPath"`
Operations []A2AProfileOperationV02 `json:"operations"`
TaskStates A2AProfileTaskStatesV02 `json:"taskStates"`
ContextHeaders A2AContextHeaders `json:"contextHeaders"`
Conformance A2AProfileConformanceV02 `json:"conformance"`
}
func LoadA2AProfileV02 ¶
func LoadA2AProfileV02() (A2AProfileV02, error)
type A2AProtocolErrorV02 ¶
type A2AProtocolErrorV02 string
const ( A2AProtocolErrorInvalidJSONRPCEnvelope A2AProtocolErrorV02 = "invalid-jsonrpc-envelope" A2AProtocolErrorInvalidJSONRPCVersion A2AProtocolErrorV02 = "invalid-jsonrpc-version" A2AProtocolErrorInvalidResponseIDType A2AProtocolErrorV02 = "invalid-response-id-type" A2AProtocolErrorResponseIDMismatch A2AProtocolErrorV02 = "response-id-mismatch" A2AProtocolErrorResultErrorExclusivity A2AProtocolErrorV02 = "result-error-exclusivity" A2AProtocolErrorResultErrorRequired A2AProtocolErrorV02 = "result-error-required" A2AProtocolErrorInvalidResultKind A2AProtocolErrorV02 = "invalid-result-kind" A2AProtocolErrorInvalidMessageResult A2AProtocolErrorV02 = "invalid-message-result" A2AProtocolErrorInvalidTask A2AProtocolErrorV02 = "invalid-task" A2AProtocolErrorUnsupportedTaskState A2AProtocolErrorV02 = "unsupported-task-state" A2AProtocolErrorTaskContextMismatch A2AProtocolErrorV02 = "task-context-mismatch" A2AProtocolErrorEventAfterTerminal A2AProtocolErrorV02 = "event-after-terminal" A2AProtocolErrorEOFWithoutTerminal A2AProtocolErrorV02 = "eof-without-terminal" A2AProtocolErrorArtifactAppendWithoutBase A2AProtocolErrorV02 = "artifact-append-without-base" A2AProtocolErrorArtifactAfterLastChunk A2AProtocolErrorV02 = "artifact-after-last-chunk" A2AProtocolErrorTaskNotFound A2AProtocolErrorV02 = "task-not-found" A2AProtocolErrorTaskNotCancelable A2AProtocolErrorV02 = "task-not-cancelable" A2AProtocolErrorAssertionPrerequisite A2AProtocolErrorV02 = "assertion-prerequisite-failed" )
type A2ATaskStateClassification ¶
type A2ATaskStateClassification string
const ( A2ATaskStateTransient A2ATaskStateClassification = "transient" A2ATaskStateTerminal A2ATaskStateClassification = "terminal" )
type A2ATaskStateMapping ¶
type A2ATaskStateMapping struct {
State a2a.TaskState
Classification A2ATaskStateClassification
InvocationStatus string
ErrorCode PlatformErrorCode
}
func MapA2ATaskState ¶
func MapA2ATaskState(state a2a.TaskState) (A2ATaskStateMapping, error)
func ValidateA2ATask ¶
func ValidateA2ATask(task *a2a.Task) (A2ATaskStateMapping, error)
type AgentAuthentication ¶
type AgentAuthentication struct {
Type string `json:"type"`
}
type AgentCard ¶
type AgentCard struct {
SchemaVersion string `json:"schemaVersion"`
AgentID string `json:"agentId"`
Name string `json:"name"`
Description string `json:"description"`
Owner AgentOwner `json:"owner"`
Version string `json:"version"`
Protocol AgentProtocol `json:"protocol"`
Skills []AgentSkill `json:"skills"`
Authentication AgentAuthentication `json:"authentication"`
Permissions []PermissionDeclaration `json:"permissions"`
Limits AgentLimits `json:"limits"`
}
type AgentCardConformanceCase ¶
type AgentCardConformanceCase struct {
ID string `json:"id"`
File string `json:"file"`
Valid bool `json:"valid"`
ViolatedRules []AgentCardSemanticRuleID `json:"violatedRules"`
ContextFiles []string `json:"contextFiles"`
}
type AgentCardConformanceManifest ¶
type AgentCardConformanceManifest struct {
Cases []AgentCardConformanceCase `json:"cases"`
}
func DecodeAgentCardConformanceManifest ¶
func DecodeAgentCardConformanceManifest(data []byte) (AgentCardConformanceManifest, error)
type AgentCardSemanticRuleID ¶
type AgentCardSemanticRuleID string
const ( AgentCardRuleUniqueSkillIDs AgentCardSemanticRuleID = "AC-SEM-001" AgentCardRuleUniquePermissionIDs AgentCardSemanticRuleID = "AC-SEM-002" AgentCardRuleRequiredPermissionDeclared AgentCardSemanticRuleID = "AC-SEM-003" )
type AgentCardSemanticViolation ¶
type AgentCardSemanticViolation struct {
RuleID AgentCardSemanticRuleID
Path string
}
func EvaluateAgentCardSemantics ¶
func EvaluateAgentCardSemantics(card AgentCard) []AgentCardSemanticViolation
EvaluateAgentCardSemantics evaluates rules that are outside JSON Schema's portable structural guarantees. Callers remain responsible for structural validation before treating an empty result as full Agent Card conformance.
type AgentLimits ¶
type AgentOwner ¶
type AgentProtocol ¶
type AgentReleaseResponse ¶
type AgentReleaseResponse struct {
ReleaseID string `json:"releaseId"`
ProviderID string `json:"providerId"`
AgentID string `json:"agentId"`
AgentCardVersion string `json:"agentCardVersion"`
CardDigest string `json:"cardDigest"`
EndpointBindingID string `json:"endpointBindingId"`
EndpointOrigin string `json:"endpointOrigin"`
EndpointPath string `json:"endpointPath"`
VerificationMethod string `json:"verificationMethod"`
VerificationEvidenceDigest *string `json:"verificationEvidenceDigest,omitempty"`
State string `json:"state"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
VerifiedAt *time.Time `json:"verifiedAt,omitempty"`
PublishedAt *time.Time `json:"publishedAt,omitempty"`
SuspendedAt *time.Time `json:"suspendedAt,omitempty"`
RevokedAt *time.Time `json:"revokedAt,omitempty"`
}
type AgentSkill ¶
type AgentSkill struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
InputSchema JSONSchema `json:"inputSchema"`
OutputSchema JSONSchema `json:"outputSchema"`
RequiredPermissions []string `json:"requiredPermissions"`
}
type CatalogEntry ¶
type CatalogEntry struct {
Card AgentCard `json:"card"`
PublicationStatus string `json:"publicationStatus"`
RegisteredAt time.Time `json:"registeredAt"`
PublishedAt *time.Time `json:"publishedAt,omitempty"`
PublicAgentID string `json:"publicAgentId,omitempty"`
PublicURL string `json:"publicUrl,omitempty"`
}
type CorrelatedPlatformErrorV4 ¶
type CorrelatedPlatformErrorV4 struct {
}
func NewCorrelatedPlatformErrorV4 ¶
func NewCorrelatedPlatformErrorV4(code PlatformErrorCode, traceID TraceID, invocationID, rootTaskID string) (CorrelatedPlatformErrorV4, error)
type CreateWorkspaceRequest ¶
type CreateWorkspaceRequest struct {
WorkspaceID string `json:"workspaceId"`
}
type DispatchInvocationRequest ¶
type DispatchInvocationRequest struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
Capability string `json:"capability"`
Input map[string]any `json:"input"`
Stream bool `json:"stream"`
}
type DispatchInvocationRequestV1 ¶
type DispatchInvocationRequestV1 struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
// ParentInvocationID is trusted in-process lineage for DispatchChild. It
// is deliberately excluded from the Router Internal v1 root HTTP contract.
ParentInvocationID string `json:"-"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
AgentReleaseID string `json:"agentReleaseId,omitempty"`
AgentCardDigest string `json:"agentCardDigest,omitempty"`
Capability string `json:"capability"`
Input json.RawMessage `json:"input"`
Stream bool `json:"stream"`
}
type EndpointBindingResponse ¶
type EndpointBindingResponse struct {
BindingID string `json:"bindingId"`
ProviderID string `json:"providerId"`
AgentID string `json:"agentId"`
AgentCardVersion string `json:"agentCardVersion"`
Endpoint string `json:"endpoint"`
VerificationMethod string `json:"verificationMethod"`
VerificationStatus string `json:"verificationStatus"`
VerificationFailureCode *string `json:"verificationFailureCode,omitempty"`
VerificationEvidenceDigest *string `json:"verificationEvidenceDigest,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
VerifiedAt *time.Time `json:"verifiedAt,omitempty"`
RevokedAt *time.Time `json:"revokedAt,omitempty"`
}
type InstallAgentRequest ¶
type Installation ¶
type Installation struct {
InstallationID string `json:"installationId"`
WorkspaceID string `json:"workspaceId"`
AgentID string `json:"agentId"`
VersionConstraint string `json:"versionConstraint"`
InstalledVersion string `json:"installedVersion"`
InstalledReleaseID string `json:"installedReleaseId,omitempty"`
AcceptedPermissions []string `json:"acceptedPermissions"`
Status string `json:"status"`
InstalledAt time.Time `json:"installedAt"`
UpdatedAt time.Time `json:"updatedAt"`
UninstalledAt *time.Time `json:"uninstalledAt,omitempty"`
}
type InstallationList ¶
type InstallationList struct {
Items []Installation `json:"items"`
NextCursor *string `json:"nextCursor,omitempty"`
}
type InstallationSemanticRuleID ¶
type InstallationSemanticRuleID string
const ( InstallationRuleCanonicalPermissions InstallationSemanticRuleID = "INST-SEM-001" InstallationRuleMonotonicUpdate InstallationSemanticRuleID = "INST-SEM-002" InstallationRuleTerminalTimestamp InstallationSemanticRuleID = "INST-SEM-003" InstallationRuleImmutablePin InstallationSemanticRuleID = "INST-SEM-004" InstallationRulePinnedVersionMatches InstallationSemanticRuleID = "INST-SEM-005" )
type InstallationSemanticValidationError ¶
type InstallationSemanticValidationError struct {
RuleID InstallationSemanticRuleID
}
func (*InstallationSemanticValidationError) Error ¶
func (validationError *InstallationSemanticValidationError) Error() string
type InvocationContractKind ¶
type InvocationContractKind string
const ( InvocationContractEventV02 InvocationContractKind = "invocation-event-v0.2" InvocationContractStreamEventV1 InvocationContractKind = "invocation-result-stream-event-v1" )
type InvocationDetailResponse ¶
type InvocationDetailResponse struct {
Invocation InvocationRecord `json:"invocation"`
Events []InvocationEvent `json:"events"`
}
type InvocationDetailResponseV1 ¶
type InvocationDetailResponseV1 struct {
Invocation InvocationRecordV1 `json:"invocation"`
Events []InvocationEventV03 `json:"events"`
}
type InvocationEvent ¶
type InvocationEvent = InvocationEventV02
type InvocationEventV02 ¶
type InvocationEventV02 struct {
SchemaVersion string `json:"schemaVersion"`
EventID string `json:"eventId"`
Sequence int64 `json:"sequence"`
OccurredAt time.Time `json:"occurredAt"`
Type string `json:"type"`
Status string `json:"status"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
Capability string `json:"capability"`
ChunkIndex *int64 `json:"chunkIndex,omitempty"`
ChunkBytes *int64 `json:"chunkBytes,omitempty"`
LatencyMS *int64 `json:"latencyMs,omitempty"`
Error *PlatformErrorV2 `json:"error,omitempty"`
}
func (*InvocationEventV02) UnmarshalJSON ¶
func (event *InvocationEventV02) UnmarshalJSON(data []byte) error
type InvocationEventV03 ¶
type InvocationEventV03 struct {
SchemaVersion string `json:"schemaVersion"`
EventID string `json:"eventId"`
Sequence int64 `json:"sequence"`
OccurredAt string `json:"occurredAt"`
Type string `json:"type"`
Status string `json:"status"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
AgentReleaseID string `json:"agentReleaseId,omitempty"`
AgentCardDigest string `json:"agentCardDigest,omitempty"`
Capability string `json:"capability"`
ChunkIndex *int64 `json:"chunkIndex,omitempty"`
ChunkBytes *int64 `json:"chunkBytes,omitempty"`
LatencyMS *int64 `json:"latencyMs,omitempty"`
Error *PlatformErrorV4 `json:"error,omitempty"`
}
type InvocationRecord ¶
type InvocationRecord struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
Capability string `json:"capability"`
Status string `json:"status"`
LatencyMS *int64 `json:"latencyMs,omitempty"`
ErrorCode PlatformErrorCode `json:"errorCode,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type InvocationRecordV1 ¶
type InvocationRecordV1 struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
Caller Caller `json:"caller"`
WorkspaceID string `json:"workspaceId"`
TargetAgentID string `json:"targetAgentId"`
AgentCardVersion string `json:"agentCardVersion"`
AgentReleaseID string `json:"agentReleaseId,omitempty"`
AgentCardDigest string `json:"agentCardDigest,omitempty"`
Capability string `json:"capability"`
Status string `json:"status"`
LatencyMS *int64 `json:"latencyMs,omitempty"`
ErrorCode PlatformErrorCode `json:"errorCode,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type InvocationResult ¶
type InvocationResult struct {
SchemaVersion string `json:"schemaVersion"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
TraceID TraceID `json:"traceId"`
Status string `json:"status"`
Result json.RawMessage `json:"result"`
}
func (*InvocationResult) UnmarshalJSON ¶
func (result *InvocationResult) UnmarshalJSON(data []byte) error
type InvocationResultMode ¶
type InvocationResultMode string
const ( InvocationResultModeJSON InvocationResultMode = "json" InvocationResultModeSSE InvocationResultMode = "sse" )
func NegotiateInvocationResultMode ¶
func NegotiateInvocationResultMode(stream bool, accept string) (InvocationResultMode, error)
type InvocationResultStreamEvent ¶
type InvocationResultStreamEvent struct {
SchemaVersion string `json:"schemaVersion"`
Sequence int64 `json:"sequence"`
Type ResultStreamEventType `json:"type"`
Status string `json:"status"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
TraceID TraceID `json:"traceId"`
ChunkIndex *int64 `json:"chunkIndex,omitempty"`
Chunk json.RawMessage `json:"chunk,omitempty"`
Error *PlatformErrorV2 `json:"error,omitempty"`
}
func (*InvocationResultStreamEvent) UnmarshalJSON ¶
func (event *InvocationResultStreamEvent) UnmarshalJSON(data []byte) error
type InvocationResultStreamEventV2 ¶
type InvocationResultStreamEventV2 struct {
SchemaVersion string `json:"schemaVersion"`
Sequence int64 `json:"sequence"`
Type ResultStreamEventType `json:"type"`
Status string `json:"status"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
TraceID TraceID `json:"traceId"`
ChunkIndex *int64 `json:"chunkIndex,omitempty"`
Chunk json.RawMessage `json:"chunk,omitempty"`
Error *PlatformErrorV4 `json:"error,omitempty"`
}
type InvocationSemanticRuleID ¶
type InvocationSemanticRuleID string
const InvocationRuleCorrelationMatches InvocationSemanticRuleID = "INV-CORR-001"
type InvocationSemanticValidationError ¶
type InvocationSemanticValidationError struct {
RuleID InvocationSemanticRuleID
}
func (*InvocationSemanticValidationError) Error ¶
func (validationError *InvocationSemanticValidationError) Error() string
type InvokeAgentRequest ¶
type JSONSchema ¶
type NestedInvocationRequestV1 ¶
type NestedInvocationRequestV1 struct {
ParentInvocationID string `json:"parentInvocationId"`
TargetAgentID string `json:"targetAgentId"`
Capability string `json:"capability"`
Input json.RawMessage `json:"input"`
Stream bool `json:"stream"`
}
NestedInvocationRequestV1 intentionally has no trusted caller, Workspace, correlation, Card-version, endpoint, or credential field.
type PermissionDeclaration ¶
type PlatformError ¶
type PlatformError = PlatformErrorV2
func NewPlatformError ¶
func NewPlatformError(code PlatformErrorCode, traceID TraceID) (PlatformError, error)
type PlatformErrorCode ¶
type PlatformErrorCode string
const ( ErrorCodeValidationError PlatformErrorCode = "VALIDATION_ERROR" ErrorCodeUnauthenticated PlatformErrorCode = "UNAUTHENTICATED" ErrorCodeForbidden PlatformErrorCode = "FORBIDDEN" ErrorCodeNotFound PlatformErrorCode = "NOT_FOUND" ErrorCodeConflict PlatformErrorCode = "CONFLICT" ErrorCodeAgentNotInstalled PlatformErrorCode = "AGENT_NOT_INSTALLED" ErrorCodeInstallationDisabled PlatformErrorCode = "INSTALLATION_DISABLED" ErrorCodeAgentDisabled PlatformErrorCode = "AGENT_DISABLED" ErrorCodeAgentReleaseUnpublished PlatformErrorCode = "AGENT_RELEASE_UNPUBLISHED" ErrorCodeAgentReleaseSuspended PlatformErrorCode = "AGENT_RELEASE_SUSPENDED" ErrorCodeAgentReleaseRevoked PlatformErrorCode = "AGENT_RELEASE_REVOKED" ErrorCodeCapabilityNotAllowed PlatformErrorCode = "CAPABILITY_NOT_ALLOWED" ErrorCodeRouteNotFound PlatformErrorCode = "ROUTE_NOT_FOUND" ErrorCodeA2AProtocol PlatformErrorCode = "A2A_PROTOCOL_ERROR" ErrorCodeAgentExecutionFailed PlatformErrorCode = "AGENT_EXECUTION_FAILED" ErrorCodeDependency PlatformErrorCode = "DEPENDENCY_ERROR" ErrorCodeTimeout PlatformErrorCode = "TIMEOUT" ErrorCodeCanceled PlatformErrorCode = "CANCELED" ErrorCodeInternal PlatformErrorCode = "INTERNAL_ERROR" )
type PlatformErrorV2 ¶
type PlatformErrorV2 struct {
Code PlatformErrorCode `json:"code"`
Message string `json:"message"`
TraceID TraceID `json:"traceId"`
InvocationID string `json:"invocationId,omitempty"`
RootTaskID string `json:"rootTaskId,omitempty"`
}
func NewCorrelatedPlatformErrorV2 ¶
func NewCorrelatedPlatformErrorV2( code PlatformErrorCode, traceID TraceID, invocationID string, rootTaskID string, ) (PlatformErrorV2, error)
func NewPlatformErrorV2 ¶
func NewPlatformErrorV2(code PlatformErrorCode, traceID TraceID) (PlatformErrorV2, error)
func (*PlatformErrorV2) UnmarshalJSON ¶
func (platformError *PlatformErrorV2) UnmarshalJSON(data []byte) error
type PlatformErrorV3 ¶
type PlatformErrorV3 struct {
Code PlatformErrorCode `json:"code"`
Message string `json:"message"`
TraceID TraceID `json:"traceId"`
InvocationID string `json:"invocationId,omitempty"`
RootTaskID string `json:"rootTaskId,omitempty"`
}
func NewCorrelatedPlatformErrorV3 ¶
func NewCorrelatedPlatformErrorV3( code PlatformErrorCode, traceID TraceID, invocationID string, rootTaskID string, ) (PlatformErrorV3, error)
func NewPlatformErrorV3 ¶
func NewPlatformErrorV3(code PlatformErrorCode, traceID TraceID) (PlatformErrorV3, error)
func (*PlatformErrorV3) UnmarshalJSON ¶
func (platformError *PlatformErrorV3) UnmarshalJSON(data []byte) error
type PlatformErrorV4 ¶
type PlatformErrorV4 = CorrelatedPlatformErrorV4
type PreCorrelationPlatformErrorV4 ¶
type PreCorrelationPlatformErrorV4 struct {
Code PlatformErrorCode `json:"code"`
Message string `json:"message"`
TraceID TraceID `json:"traceId"`
}
func NewPreCorrelationPlatformErrorV4 ¶
func NewPreCorrelationPlatformErrorV4(code PlatformErrorCode, traceID TraceID) (PreCorrelationPlatformErrorV4, error)
type PublicAgentRelease ¶
type PublicAgentRelease struct {
ReleaseID string `json:"releaseId"`
AgentID string `json:"agentId"`
Name string `json:"name"`
Description string `json:"description"`
Owner AgentOwner `json:"owner"`
AgentCardVersion string `json:"agentCardVersion"`
CardDigest string `json:"cardDigest"`
PublishedAt time.Time `json:"publishedAt"`
AuthenticationType string `json:"authenticationType"`
Skills []AgentSkill `json:"skills"`
Permissions []PermissionDeclaration `json:"permissions"`
Limits AgentLimits `json:"limits"`
}
type PublicAgentShare ¶
type PublicAgentShare struct {
}
type RegisterAgentRequest ¶
type RegisterAgentRequest struct {
Card AgentCard `json:"card"`
}
type ResolveAgentRequest ¶
type ResolveAgentRequest = ResolveAgentRequestV2
type ResolveAgentRequestV1 ¶
type ResolveAgentRequestV1 struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
TraceID TraceID `json:"traceId"`
WorkspaceID string `json:"workspaceId"`
AgentID string `json:"agentId"`
Version string `json:"version"`
Capability string `json:"capability"`
}
func (*ResolveAgentRequestV1) UnmarshalJSON ¶
func (request *ResolveAgentRequestV1) UnmarshalJSON(data []byte) error
type ResolveAgentRequestV2 ¶
type ResolveAgentRequestV2 = ResolveAgentRequestV1
type ResolveAgentResponse ¶
type ResolveAgentResponse struct {
Card AgentCard `json:"card"`
Installation ResolvedInstallation `json:"installation"`
}
type ResolveInstalledVersionRequest ¶
type ResolveInstalledVersionRequest struct {
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
TraceID TraceID `json:"traceId"`
WorkspaceID string `json:"workspaceId"`
AgentID string `json:"agentId"`
Capability string `json:"capability"`
}
ResolveInstalledVersionRequest is the Control Plane Internal v1 request for resolving the deterministic installed Agent Card version from the enabled Installation. It intentionally has no version field; the Control Plane derives it from the pinned installedVersion.
type ResolveInstalledVersionResponse ¶
type ResolveInstalledVersionResponse struct {
Version string `json:"version"`
ReleaseID string `json:"releaseId,omitempty"`
AgentCardDigest string `json:"agentCardDigest,omitempty"`
}
ResolveInstalledVersionResponse carries the exact pinned installedVersion.
type ResolvedInstallation ¶
type ResolvedInstallation struct {
InstallationID string `json:"installationId"`
WorkspaceID string `json:"workspaceId"`
AgentID string `json:"agentId"`
InstalledVersion string `json:"installedVersion"`
InstalledReleaseID string `json:"installedReleaseId,omitempty"`
AgentCardDigest string `json:"agentCardDigest,omitempty"`
AcceptedPermissions []string `json:"acceptedPermissions"`
Status string `json:"status"`
}
type ResultContractValidator ¶
type ResultContractValidator struct {
// contains filtered or unexported fields
}
func NewResultContractValidator ¶
func NewResultContractValidator() (*ResultContractValidator, error)
func (*ResultContractValidator) ValidateInvocationEvent ¶
func (v *ResultContractValidator) ValidateInvocationEvent(event InvocationEventV02) error
func (*ResultContractValidator) ValidateInvocationResult ¶
func (v *ResultContractValidator) ValidateInvocationResult(result InvocationResult) error
func (*ResultContractValidator) ValidateInvocationResultForRequest ¶
func (v *ResultContractValidator) ValidateInvocationResultForRequest( result InvocationResult, invocationID string, rootTaskID string, traceID TraceID, ) error
func (*ResultContractValidator) ValidateInvocationResultStreamEvent ¶
func (v *ResultContractValidator) ValidateInvocationResultStreamEvent(event InvocationResultStreamEvent) error
func (*ResultContractValidator) ValidatePlatformError ¶
func (v *ResultContractValidator) ValidatePlatformError(platformError PlatformErrorV2) error
func (*ResultContractValidator) ValidatePlatformErrorV3 ¶
func (v *ResultContractValidator) ValidatePlatformErrorV3(platformError PlatformErrorV3) error
func (*ResultContractValidator) ValidateResolveAgentErrorCorrelation ¶
func (v *ResultContractValidator) ValidateResolveAgentErrorCorrelation( request ResolveAgentRequestV1, platformError PlatformErrorV2, ) error
func (*ResultContractValidator) ValidateResolveAgentErrorCorrelationV3 ¶
func (v *ResultContractValidator) ValidateResolveAgentErrorCorrelationV3( request ResolveAgentRequestV2, platformError PlatformErrorV3, ) error
type ResultStreamEventType ¶
type ResultStreamEventType string
const ( ResultStreamEventAccepted ResultStreamEventType = "accepted" ResultStreamEventChunk ResultStreamEventType = "chunk" ResultStreamEventCompleted ResultStreamEventType = "completed" ResultStreamEventFailed ResultStreamEventType = "failed" ResultStreamEventCanceled ResultStreamEventType = "canceled" ResultStreamEventTimedOut ResultStreamEventType = "timed_out" )
type ResultStreamSequenceValidator ¶
type ResultStreamSequenceValidator struct {
// contains filtered or unexported fields
}
func NewResultStreamSequenceValidator ¶
func NewResultStreamSequenceValidator( contracts *ResultContractValidator, invocationID string, rootTaskID string, traceID TraceID, ) (*ResultStreamSequenceValidator, error)
func (*ResultStreamSequenceValidator) Accept ¶
func (v *ResultStreamSequenceValidator) Accept(event InvocationResultStreamEvent) error
func (*ResultStreamSequenceValidator) Finish ¶
func (v *ResultStreamSequenceValidator) Finish() error
func (*ResultStreamSequenceValidator) TerminalType ¶
func (v *ResultStreamSequenceValidator) TerminalType() ResultStreamEventType
type RouterAgentAuthenticationErrorV1 ¶
type RouterAgentAuthenticationErrorV1 struct {
Code PlatformErrorCode `json:"code"`
Message string `json:"message"`
}
func NewRouterAgentAuthenticationErrorV1 ¶
func NewRouterAgentAuthenticationErrorV1(code PlatformErrorCode) (RouterAgentAuthenticationErrorV1, error)
type RouterAgentCredentialConformanceManifestV1 ¶
type RouterAgentCredentialConformanceManifestV1 struct {
SchemaVersion string `json:"schemaVersion"`
Cases []RouterAgentCredentialConformanceCase `json:"cases"`
}
func LoadRouterAgentCredentialConformanceManifestV1 ¶
func LoadRouterAgentCredentialConformanceManifestV1() (RouterAgentCredentialConformanceManifestV1, error)
type RouterEventEnvelope ¶
type RouterEventEnvelope = RouterEventEnvelopeV02
type RouterEventEnvelopeV02 ¶
type RouterEventEnvelopeV02 struct {
Event InvocationEventV02 `json:"event"`
}
func (*RouterEventEnvelopeV02) UnmarshalJSON ¶
func (envelope *RouterEventEnvelopeV02) UnmarshalJSON(data []byte) error
type RouterInstanceDirectoryTargetV1 ¶
type RouterInstanceDirectoryTargetV1 struct {
AgentID string `json:"agentId"`
AgentCardVersion string `json:"agentCardVersion"`
ReleaseID string `json:"releaseId"`
CardDigest string `json:"cardDigest"`
CanonicalEndpoint string `json:"canonicalEndpoint"`
Audience string `json:"audience"`
Instances []RouterInstanceV1 `json:"instances"`
}
type RouterInstanceDirectoryV1 ¶
type RouterInstanceDirectoryV1 struct {
SchemaVersion string `json:"schemaVersion"`
Revision string `json:"revision"`
Targets []RouterInstanceDirectoryTargetV1 `json:"targets"`
}
RouterInstanceDirectoryV1 is the Router-owned dynamic routing document. Every entry is scoped to one exact, already-authorized Agent Release.
func DecodeRouterInstanceDirectoryV1 ¶
func DecodeRouterInstanceDirectoryV1(data []byte) (RouterInstanceDirectoryV1, error)
DecodeRouterInstanceDirectoryV1 rejects unknown and duplicate members. The registry package performs the provider-neutral semantic validation when it turns these wire values into immutable topology values.
type RouterInstanceV1 ¶
type RouterInstanceV1 struct {
InstanceID string `json:"instanceId"`
Ready bool `json:"ready"`
Serving bool `json:"serving"`
Terminating bool `json:"terminating"`
Endpoints []RouterNetworkEndpointV1 `json:"endpoints"`
}
type RouterInvocationCredentialClaimsV1 ¶
type RouterInvocationCredentialClaimsV1 struct {
Issuer string `json:"iss"`
Audience []string `json:"aud"`
ExpiresAt int64 `json:"exp"`
IssuedAt int64 `json:"iat"`
JWTID string `json:"jti"`
WorkspaceID string `json:"workspaceId"`
AgentID string `json:"agentId"`
AgentVersion string `json:"agentVersion"`
ReleaseID string `json:"releaseId"`
CardDigest string `json:"cardDigest"`
Capability string `json:"capability"`
InvocationID string `json:"invocationId"`
RootTaskID string `json:"rootTaskId"`
ParentInvocationID string `json:"parentInvocationId,omitempty"`
TraceID TraceID `json:"traceId"`
}
type RouterNacosInstanceBindingTargetV1 ¶
type RouterNacosInstanceBindingTargetV1 struct {
AgentID string `json:"agentId"`
AgentCardVersion string `json:"agentCardVersion"`
ReleaseID string `json:"releaseId"`
CardDigest string `json:"cardDigest"`
CanonicalEndpoint string `json:"canonicalEndpoint"`
Audience string `json:"audience"`
ServiceName string `json:"serviceName"`
GroupName string `json:"groupName"`
ClusterName string `json:"clusterName"`
}
type RouterNacosInstanceBindingsV1 ¶
type RouterNacosInstanceBindingsV1 struct {
SchemaVersion string `json:"schemaVersion"`
Revision string `json:"revision"`
Targets []RouterNacosInstanceBindingTargetV1 `json:"targets"`
}
func DecodeRouterNacosInstanceBindingsV1 ¶
func DecodeRouterNacosInstanceBindingsV1(data []byte) (RouterNacosInstanceBindingsV1, error)
type RouterNetworkEndpointV1 ¶
type RouterTopologyObservationState ¶
type RouterTopologyObservationState string
const ( RouterTopologyStateInitializing RouterTopologyObservationState = "initializing" RouterTopologyStateMissing RouterTopologyObservationState = "missing" RouterTopologyStateEmpty RouterTopologyObservationState = "empty" RouterTopologyStatePopulated RouterTopologyObservationState = "populated" )
type RouterTopologyStatusObservationV1 ¶
type RouterTopologyStatusObservationV1 struct {
AgentID string `json:"agentId"`
AgentCardVersion string `json:"agentCardVersion"`
ReleaseID string `json:"releaseId"`
State RouterTopologyObservationState `json:"state"`
LocalRevision uint64 `json:"localRevision"`
ObservedAt time.Time `json:"observedAt"`
}
type RouterTopologyStatusV1 ¶
type RouterTopologyStatusV1 struct {
SchemaVersion string `json:"schemaVersion"`
Provider string `json:"provider"`
Observations []RouterTopologyStatusObservationV1 `json:"observations"`
}
RouterTopologyStatusV1 is a secrecy-safe projection of the Router's local watched topology. It intentionally excludes endpoints and provider tokens.
type RuntimeContractValidator ¶
type RuntimeContractValidator struct {
// contains filtered or unexported fields
}
func NewRuntimeContractValidator ¶
func NewRuntimeContractValidator() (*RuntimeContractValidator, error)
func (*RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4 ¶
func (v *RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4(platformError CorrelatedPlatformErrorV4) error
func (*RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4JSON ¶
func (v *RuntimeContractValidator) ValidateCorrelatedPlatformErrorV4JSON(data []byte) error
func (*RuntimeContractValidator) ValidateInvocationDetailResponseV1 ¶
func (v *RuntimeContractValidator) ValidateInvocationDetailResponseV1(workspaceID string, detail InvocationDetailResponseV1) error
func (*RuntimeContractValidator) ValidateInvocationEventV03 ¶
func (v *RuntimeContractValidator) ValidateInvocationEventV03(event InvocationEventV03) error
func (*RuntimeContractValidator) ValidateInvocationResultStreamEventV2 ¶
func (v *RuntimeContractValidator) ValidateInvocationResultStreamEventV2(event InvocationResultStreamEventV2) error
func (*RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4 ¶
func (v *RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4(platformError PreCorrelationPlatformErrorV4) error
func (*RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4JSON ¶
func (v *RuntimeContractValidator) ValidatePreCorrelationPlatformErrorV4JSON(data []byte) error
type RuntimeInvocationSequenceValidator ¶
type RuntimeInvocationSequenceValidator struct {
// contains filtered or unexported fields
}
func NewRuntimeInvocationSequenceValidator ¶
func NewRuntimeInvocationSequenceValidator(contracts *RuntimeContractValidator) (*RuntimeInvocationSequenceValidator, error)
func (*RuntimeInvocationSequenceValidator) Accept ¶
func (v *RuntimeInvocationSequenceValidator) Accept(event InvocationEventV03) error
func (*RuntimeInvocationSequenceValidator) IsTerminal ¶
func (v *RuntimeInvocationSequenceValidator) IsTerminal() bool
type RuntimeResultStreamSequenceValidator ¶
type RuntimeResultStreamSequenceValidator struct {
// contains filtered or unexported fields
}
func NewRuntimeResultStreamSequenceValidator ¶
func NewRuntimeResultStreamSequenceValidator(contracts *RuntimeContractValidator, invocationID, rootTaskID string, traceID TraceID) (*RuntimeResultStreamSequenceValidator, error)
func (*RuntimeResultStreamSequenceValidator) Accept ¶
func (v *RuntimeResultStreamSequenceValidator) Accept(event InvocationResultStreamEventV2) error
func (*RuntimeResultStreamSequenceValidator) Finish ¶
func (v *RuntimeResultStreamSequenceValidator) Finish() error
func (*RuntimeResultStreamSequenceValidator) IsTerminal ¶
func (v *RuntimeResultStreamSequenceValidator) IsTerminal() bool
type SchemaValidationError ¶
func (*SchemaValidationError) Error ¶
func (e *SchemaValidationError) Error() string
type SearchAgentsQuery ¶
type SearchAgentsResponse ¶
type SearchAgentsResponse struct {
Items []CatalogEntry `json:"items"`
NextCursor *string `json:"nextCursor,omitempty"`
}
type SemanticIssue ¶
type SemanticIssue struct {
RuleID AgentCardSemanticRuleID
Path string
Message string
}
type SemanticValidationError ¶
type SemanticValidationError struct {
Issues []SemanticIssue
}
func (*SemanticValidationError) Error ¶
func (e *SemanticValidationError) Error() string
type TraceResponse ¶
type TraceResponse struct {
TraceID TraceID `json:"traceId"`
Invocations []InvocationRecord `json:"invocations"`
}
type TraceResponseV1 ¶
type TraceResponseV1 struct {
TraceID TraceID `json:"traceId"`
Invocations []InvocationRecordV1 `json:"invocations"`
}
type TrustedPublicationError ¶
type TrustedPublicationError struct {
Code TrustedPublicationErrorCode `json:"code"`
Message string `json:"message"`
TraceID TraceID `json:"traceId"`
}
func NewTrustedPublicationError ¶
func NewTrustedPublicationError(code TrustedPublicationErrorCode, traceID TraceID) (TrustedPublicationError, error)
type TrustedPublicationErrorCode ¶
type TrustedPublicationErrorCode string
const ( TrustedErrorValidation TrustedPublicationErrorCode = "VALIDATION_ERROR" TrustedErrorUnauthenticated TrustedPublicationErrorCode = "UNAUTHENTICATED" TrustedErrorForbidden TrustedPublicationErrorCode = "FORBIDDEN" TrustedErrorNotFound TrustedPublicationErrorCode = "NOT_FOUND" TrustedErrorConflict TrustedPublicationErrorCode = "CONFLICT" TrustedErrorInvalidEndpoint TrustedPublicationErrorCode = "INVALID_ENDPOINT" TrustedErrorDisallowedNetwork TrustedPublicationErrorCode = "DISALLOWED_NETWORK" TrustedErrorWrongProof TrustedPublicationErrorCode = "WRONG_PROOF" TrustedErrorChallengeExpired TrustedPublicationErrorCode = "CHALLENGE_EXPIRED" TrustedErrorChallengeReused TrustedPublicationErrorCode = "CHALLENGE_REUSED" TrustedErrorRedirectNotAllowed TrustedPublicationErrorCode = "REDIRECT_NOT_ALLOWED" TrustedErrorDependency TrustedPublicationErrorCode = "DEPENDENCY_ERROR" TrustedErrorInternal TrustedPublicationErrorCode = "INTERNAL_ERROR" )
type UpdateInstallationRequest ¶
type UpdateInstallationRequest struct {
Status string `json:"status"`
}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func (*Validator) DecodeAgentCard ¶
func (*Validator) DecodeRegisterAgentRequest ¶
func (v *Validator) DecodeRegisterAgentRequest(data []byte) (RegisterAgentRequest, error)
func (*Validator) ValidateA2AProfile ¶
func (v *Validator) ValidateA2AProfile(profile A2AProfile) error
func (*Validator) ValidateAgentCard ¶
func (*Validator) ValidateInstallation ¶
func (v *Validator) ValidateInstallation(installation Installation) error
func (*Validator) ValidateInvocationEvent ¶
func (v *Validator) ValidateInvocationEvent(event InvocationEvent) error
func (*Validator) ValidateInvocationResult ¶
func (v *Validator) ValidateInvocationResult(result InvocationResult) error
func (*Validator) ValidateInvocationResultForRequest ¶
func (*Validator) ValidateInvocationResultStreamEvent ¶
func (v *Validator) ValidateInvocationResultStreamEvent(event InvocationResultStreamEvent) error
func (*Validator) ValidatePlatformError ¶
func (v *Validator) ValidatePlatformError(platformError PlatformError) error
func (*Validator) ValidatePlatformErrorV3 ¶
func (v *Validator) ValidatePlatformErrorV3(platformError PlatformErrorV3) error
func (*Validator) ValidateResolveAgentResponseForRequest ¶
func (v *Validator) ValidateResolveAgentResponseForRequest(request ResolveAgentRequestV2, response ResolveAgentResponse) error
func (*Validator) ValidateWorkspace ¶
Source Files
¶
- a2a_profile_v02.go
- agent_card_semantics.go
- contracts.go
- installation_contracts.go
- public_agent_share.go
- result_contracts.go
- router_agent_credential.go
- router_instance_directory.go
- router_nacos_instance_bindings.go
- router_topology_status.go
- runtime_contracts.go
- runtime_contracts_validation.go
- trusted_publication.go
- validate.go