Documentation
¶
Index ¶
- Constants
- Variables
- func AsValidatedCapabilityBusinessError(err error) (capability.BusinessError, bool)
- func HasUnattestedRPCStructuredError(err error) bool
- func ImportLocalPackageBytes(ctx context.Context, h *Host, pluginInstanceID string, data []byte) (registry.PluginRecord, error)
- func MarshalRuntimeDescriptorJSON(descriptor RuntimeDescriptor) ([]byte, error)
- type AcknowledgeStreamRequest
- type ActionDeniedError
- type AuditEvent
- type AuditSink
- type AuthorizationAdapter
- type AuthorizationRequest
- type AuthorizationTarget
- type BindRetainedDataRequest
- type CallMethodRequest
- type CallMethodResult
- type CancelOperationRequest
- type CancelSurfaceOperationRequest
- type CapabilityArtifactFetchHop
- type CapabilityContractArtifactResolver
- type CapabilityContractArtifactSet
- type CapabilityContractResolveRequest
- type CapabilityModule
- type CleanupExpiredRetainedDataRequest
- type CommitExternalPackageRequest
- type CommitSessionScopeCloseRequest
- type Config
- type ConnectivityModule
- type CoreActionAdapter
- type CoreActionModule
- type CoreAdapters
- type DeleteExportDataRequest
- type DeleteRetainedDataRequest
- type DeleteSecurityPolicyRequest
- type DiagnosticDetails
- type DiagnosticEvent
- type DiagnosticLister
- type DiagnosticsSink
- type DisableRequest
- type DisposeSurfaceRequest
- type DowngradeRequest
- type EnableRequest
- type ExportDataRequest
- type ExportDataResult
- type ExternalPackageCancelSummary
- type ExternalPackageCapabilityContractSummary
- type ExternalPackageCommitReceipt
- type ExternalPackageCommitResult
- type ExternalPackageConfirmationSummary
- type ExternalPackageCoreActionSummary
- type ExternalPackageExecutionApproval
- type ExternalPackageFetcher
- type ExternalPackageGitHubResolver
- type ExternalPackageInspection
- type ExternalPackageIntent
- type ExternalPackageIntentSummary
- type ExternalPackageMethodRouteSummary
- type ExternalPackageMethodSummary
- type ExternalPackageModule
- type ExternalPackageNetworkMethodAccessSummary
- type ExternalPackageNetworkSummary
- type ExternalPackagePermissionSummary
- type ExternalPackageRedirectHop
- type ExternalPackageSecretRefSummary
- type ExternalPackageSecuritySummary
- type ExternalPackageSignatureAssessment
- type ExternalPackageSignatureAssessmentRequest
- type ExternalPackageSignatureAssessor
- type ExternalPackageSignatureFreshnessAssessor
- type ExternalPackageSignatureFreshnessRequest
- type ExternalPackageSizeSummary
- type ExternalPackageSource
- type ExternalPackageSourceProvenance
- type ExternalPackageStageStore
- type ExternalPackageStorageMethodAccessSummary
- type ExternalPackageStorageSummary
- type ExternalPackageSurfaceSummary
- type ExternalPackageUpdateEligibility
- type ExternalPackageWorkerSummary
- type Feature
- type FeatureNotConfiguredError
- type FinalizeSessionScopeRequest
- type GetSecurityPolicyRequest
- type GetSettingsRequest
- type GrantPermissionRequest
- type Host
- func (h *Host) AcknowledgeStream(ctx context.Context, req AcknowledgeStreamRequest) (stream.Record, error)
- func (h *Host) BindRetainedData(ctx context.Context, req BindRetainedDataRequest) (result plugindata.Binding, retErr error)
- func (h *Host) BindSecretRef(ctx context.Context, req SecretBindRequest) (retErr error)
- func (h *Host) CallPluginMethod(ctx context.Context, req CallMethodRequest) (result CallMethodResult, resultErr error)
- func (h *Host) CancelOperation(ctx context.Context, req CancelOperationRequest) (result operation.Record, retErr error)
- func (h *Host) CancelSurfaceOperation(ctx context.Context, req CancelSurfaceOperationRequest) (operation.Record, error)
- func (h *Host) Capabilities() *capability.Registry
- func (h *Host) CleanupExpiredRetainedData(ctx context.Context, req CleanupExpiredRetainedDataRequest) (RetainedDataCleanupResult, error)
- func (h *Host) Close() error
- func (h *Host) CommitExternalPackage(ctx context.Context, req CommitExternalPackageRequest) (result ExternalPackageCommitResult, retErr error)
- func (h *Host) DeleteExportedPluginData(ctx context.Context, req DeleteExportDataRequest) error
- func (h *Host) DeleteRetainedData(ctx context.Context, req DeleteRetainedDataRequest) (result plugindata.Binding, retErr error)
- func (h *Host) DeleteSecretRef(ctx context.Context, req SecretDeleteRequest) (retErr error)
- func (h *Host) DeleteSecurityPolicy(ctx context.Context, req DeleteSecurityPolicyRequest) (result registry.AuthorizationRevisions, retErr error)
- func (h *Host) DisablePlugin(ctx context.Context, req DisableRequest) (result registry.PluginRecord, retErr error)
- func (h *Host) DisposeSurface(ctx context.Context, req DisposeSurfaceRequest) error
- func (h *Host) DowngradePlugin(ctx context.Context, req DowngradeRequest) (result registry.PluginRecord, retErr error)
- func (h *Host) EnablePlugin(ctx context.Context, req EnableRequest) (result registry.PluginRecord, retErr error)
- func (h *Host) ExportPluginData(ctx context.Context, req ExportDataRequest) (result ExportDataResult, retErr error)
- func (h *Host) Features(ctx context.Context) ([]Feature, error)
- func (h *Host) FinalizeSessionScope(ctx context.Context, req FinalizeSessionScopeRequest) (retErr error)
- func (h *Host) GetCompatibility(ctx context.Context) (version.CompatibilityManifest, error)
- func (h *Host) GetOperation(ctx context.Context, operationID string) (operation.Record, error)
- func (h *Host) GetPluginSettings(ctx context.Context, req GetSettingsRequest) (SettingsResult, error)
- func (h *Host) GetSecurityPolicy(ctx context.Context, req GetSecurityPolicyRequest) (SecurityPolicyResult, error)
- func (h *Host) GetSettingsSchema(ctx context.Context, req GetSettingsRequest) (SettingsSchemaResult, error)
- func (h *Host) GrantPermission(ctx context.Context, req GrantPermissionRequest) (result PermissionMutationResult, retErr error)
- func (h *Host) ImportLocalPackage(ctx context.Context, req ImportLocalPackageRequest) (registry.PluginRecord, error)
- func (h *Host) ImportPluginData(ctx context.Context, req ImportDataRequest) (result registry.PluginRecord, retErr error)
- func (h *Host) InspectExternalPackage(ctx context.Context, req InspectExternalPackageRequest) (result ExternalPackageInspection, retErr error)
- func (h *Host) InspectUploadedExternalPackage(ctx context.Context, req InspectUploadedExternalPackageRequest) (ExternalPackageInspection, error)
- func (h *Host) InstallReleaseRef(ctx context.Context, req InstallReleaseRefRequest) (registry.PluginRecord, error)
- func (h *Host) InvokeIntent(ctx context.Context, req InvokeIntentRequest) (response CallMethodResult, resultErr error)
- func (h *Host) ListDiagnosticEvents(ctx context.Context, req ListDiagnosticEventsRequest) ([]DiagnosticEvent, error)
- func (h *Host) ListIntents(ctx context.Context, req ListIntentsRequest) ([]IntentRecord, error)
- func (h *Host) ListOperations(ctx context.Context, req ListOperationsRequest) (ListOperationsResult, error)
- func (h *Host) ListPermissionGrants(ctx context.Context, req ListPermissionGrantsRequest) ([]permissions.Record, error)
- func (h *Host) ListPlugins(ctx context.Context) ([]registry.PluginRecord, error)
- func (h *Host) ListRetainedData(ctx context.Context, req ListRetainedDataRequest) ([]plugindata.Binding, error)
- func (h *Host) ListSecurityPolicies(ctx context.Context) ([]SecurityPolicyResult, error)
- func (h *Host) MintBridgeToken(ctx context.Context, req MintBridgeTokenRequest) (result bridge.GatewayTokenResult, retErr error)
- func (h *Host) MintConnectionGrant(ctx context.Context, req MintConnectionGrantRequest) (result connectivity.ConnectionGrant, retErr error)
- func (h *Host) MintNetworkHandleGrant(ctx context.Context, req MintConnectionGrantRequest) (result NetworkHandleGrantResult, retErr error)
- func (h *Host) MintStorageHandleGrant(ctx context.Context, req MintStorageHandleGrantRequest) (result StorageHandleGrantResult, retErr error)
- func (h *Host) OpenSurface(ctx context.Context, req OpenSurfaceRequest) (result bridge.SurfaceBootstrap, retErr error)
- func (h *Host) PatchPluginSettings(ctx context.Context, req PatchSettingsRequest) (result SettingsResult, retErr error)
- func (h *Host) PrepareMethodConfirmation(ctx context.Context, req PrepareMethodConfirmationRequest) (response PrepareMethodConfirmationResult, resultErr error)
- func (h *Host) PrepareSurface(ctx context.Context, req PrepareSurfaceRequest) (result PrepareSurfaceResult, err error)
- func (h *Host) PutSecurityPolicy(ctx context.Context, req PutSecurityPolicyRequest) (result SecurityPolicyResult, retErr error)
- func (h *Host) QueryExternalPackageCommit(ctx context.Context, req QueryExternalPackageCommitRequest) (ExternalPackageCommitResult, error)
- func (h *Host) ReadStream(ctx context.Context, req ReadStreamRequest) (ReadStreamResult, error)
- func (h *Host) ReadSurfaceAsset(ctx context.Context, req ReadSurfaceAssetRequest) (ReadSurfaceAssetResult, error)
- func (h *Host) RefreshEnabledPlugins(ctx context.Context) ([]RefreshEnabledPluginResult, error)
- func (h *Host) RejectMethodConfirmation(ctx context.Context, req RejectMethodConfirmationRequest) (response RejectMethodConfirmationResult, resultErr error)
- func (h *Host) ReportHTTPAdapterFailure(ctx context.Context, operation string, code security.ErrorCode, err error)
- func (h *Host) RevokePermission(ctx context.Context, req RevokePermissionRequest) (result PermissionMutationResult, retErr error)
- func (h *Host) RevokeSessionScope(ctx context.Context, req RevokeSessionScopeRequest) (result RevokeSessionScopeResult, retErr error)
- func (h *Host) RuntimeHealth(ctx context.Context) (RuntimeHealth, error)
- func (h *Host) StartRuntime(ctx context.Context, req StartRuntimeRequest) (result RuntimeHealth, retErr error)
- func (h *Host) StopRuntime(ctx context.Context) (retErr error)
- func (h *Host) TestSecretRef(ctx context.Context, req SecretTestRequest) (retErr error)
- func (h *Host) UninstallPlugin(ctx context.Context, req UninstallRequest) (result registry.PluginRecord, retErr error)
- func (h *Host) UpdateLocalPackage(ctx context.Context, req UpdateLocalPackageRequest) (registry.PluginRecord, error)
- func (h *Host) UpdateReleaseRef(ctx context.Context, req UpdateReleaseRefRequest) (registry.PluginRecord, error)
- type HostCapabilityContractRef
- type HostCapabilityRequirement
- type HostConfigError
- type HostRequirement
- type HostRequirementPolicy
- type HostRequirementSelection
- type HostRequirementSelectionRequest
- type ImportDataRequest
- type ImportLocalPackageRequest
- type InspectExternalPackageRequest
- type InspectUploadedExternalPackageRequest
- type InstallReleaseRefRequest
- type IntentRecord
- type InvokeIntentRequest
- type ListDiagnosticEventsRequest
- type ListIntentsRequest
- type ListOperationsRequest
- type ListOperationsResult
- type ListPermissionGrantsRequest
- type ListRetainedDataRequest
- type ManagementAction
- type ManagementRevisionMismatchError
- type MintBridgeTokenRequest
- type MintConnectionGrantRequest
- type MintStorageHandleGrantRequest
- type MutationOutcome
- type NetworkHandleGrantResult
- type OpenSurfaceRequest
- type PackageDistribution
- type PackageDistributionRef
- type PackageHashSet
- type PackageReleaseSignature
- type PackageTrustAction
- type PackageTrustVerificationRequest
- type PackageTrustVerificationResult
- type PackageTrustVerifier
- type PatchSettingsRequest
- type PermissionMutationResult
- type PluginData
- type PluginPackageRelease
- type PluginRef
- type PluginReleaseRef
- type PolicyAdapter
- type PolicyDecision
- type PrepareMethodConfirmationRequest
- type PrepareMethodConfirmationResult
- type PrepareSessionScopeCloseRequest
- type PrepareSurfaceRequest
- type PrepareSurfaceResult
- type PutSecurityPolicyRequest
- type QueryExternalPackageCommitRequest
- type ReadStreamRequest
- type ReadStreamResult
- type ReadSurfaceAssetRequest
- type ReadSurfaceAssetResult
- type ReconcileRetainedSessionScopesRequest
- type RefreshEnabledPluginPublicError
- type RefreshEnabledPluginResult
- type RefreshEnabledPluginStatus
- type RejectMethodConfirmationRequest
- type RejectMethodConfirmationResult
- type ReleaseArtifactResolveRequest
- type ReleaseArtifactResolver
- type ReleaseCompatibility
- type ReleaseEvidence
- type ReleaseMetadataSignature
- type ReleaseModule
- type ResolvedCapabilityContractArtifact
- type ResolvedCapabilityContractFile
- type ResolvedPackageArtifact
- type ResourceRef
- type RetainedDataCleanupResult
- type RevokePermissionRequest
- type RevokeSessionScopeRequest
- type RevokeSessionScopeResult
- type RuntimeAdmissionTarget
- type RuntimeBinaryName
- type RuntimeDescriptor
- func (descriptor RuntimeDescriptor) BinarySHA256() SHA256Digest
- func (descriptor RuntimeDescriptor) CompatibleWithPlatform() error
- func (descriptor RuntimeDescriptor) ContractSetSHA256() SHA256Digest
- func (descriptor RuntimeDescriptor) PlatformVersion() platformversion.SemVer
- func (descriptor RuntimeDescriptor) RustIPCVersion() RustIPCVersion
- func (descriptor RuntimeDescriptor) Target() RuntimeAdmissionTarget
- func (descriptor RuntimeDescriptor) WASMABIVersion() WASMABIVersion
- type RuntimeDescriptorOptions
- type RuntimeHealth
- type RuntimeLimits
- type RuntimeModule
- type RuntimeModuleCacheMetrics
- type RuntimeModuleCloseResult
- type RuntimeModuleDisposition
- type RuntimeModuleOptions
- type RuntimeProcessHealth
- type RuntimeShardHealth
- type RustIPCVersion
- type SHA256Digest
- type SecretBindRequest
- type SecretDeleteRequest
- type SecretStoreAdapter
- type SecretTestRequest
- type SecretsModule
- type SecurityPolicyResult
- type SessionLifecycleAdapter
- type SettingsResult
- type SettingsSchemaResult
- type SettingsSecretMetadata
- type StartRuntimeRequest
- type StorageHandleGrantResult
- type SurfaceCatalogSink
- type SurfaceSnapshot
- type UninstallRequest
- type UpdateLocalPackageRequest
- type UpdateReleaseRefRequest
- type ValidateClosedSessionScopeRequest
- type VerifiedExecutable
- type VerifiedExecutableOptions
- type WASMABIVersion
- type WorkerErrorOrigin
- type WorkerExecutionError
Constants ¶
const ( MutationOutcomeCommitted = mutation.OutcomeCommitted MutationOutcomeNotCommitted = mutation.OutcomeNotCommitted MutationOutcomeUnknown = mutation.OutcomeUnknown )
const ( WorkerErrorOriginRuntime = runtimeclient.WorkerErrorOriginRuntime WorkerErrorOriginHostcall = runtimeclient.WorkerErrorOriginHostcall WorkerErrorOriginPlugin = runtimeclient.WorkerErrorOriginPlugin )
const ( DefaultRuntimeStartupTimeout = 10 * time.Second DefaultRuntimeShutdownTimeout = 5 * time.Second MinimumRuntimeTimeout = 100 * time.Millisecond MaximumRuntimeTimeout = 2 * time.Minute )
Variables ¶
var ( ErrExternalPackageInspectionNotFound = errors.New("external package inspection not found") ErrExternalPackageInspectionExpired = errors.New("external package inspection expired") ErrExternalPackageConfirmation = errors.New("external package confirmation does not match inspection") ErrExternalPackageCommitBlocked = errors.New("external package commit is blocked by integrity assessment") ErrExternalPackageCommitInProgress = errors.New("external package commit is in progress") ErrExternalPackageInspectionStale = errors.New("external package signature assessment changed after inspection") ErrExternalPackageRequestInvalid = errors.New("external package request is invalid") )
var ( ErrStreamTicketRequired = errors.New("stream ticket is required") ErrPluginDataNotDeclared = errors.New("plugin does not declare exportable data") ErrPluginStorageNotDeclared = errors.New("target plugin does not declare storage") ErrPluginSettingsNotDeclared = errors.New("target plugin does not declare settings") ErrPluginDataContractChanged = errors.New("plugin data contract changed") ErrOperationCancelDispatchFailed = errors.New("operation cancel dispatch failed") ErrMethodRequestContract = errors.New("plugin method request contract validation failed") ErrMethodResponseContract = errors.New("plugin method response contract validation failed") ErrMethodAdapterPanic = errors.New("plugin method adapter panicked") ErrConfirmationInvalid = errors.New("plugin confirmation is invalid") ErrConfirmationRejected = errors.New("plugin confirmation was rejected") ErrManagementRevisionMismatch = errors.New("management revision mismatch") ErrPluginAlreadyInstalled = errors.New("plugin instance is already installed") ErrPluginTrustDenied = errors.New("plugin trust does not allow execution") ErrPluginUIProtocolUnsupported = errors.New("plugin UI protocol is unsupported") ErrPluginRuntimeNotConfigured = errors.New("plugin runtime is not configured") ErrPluginRuntimeIncompatible = errors.New("plugin runtime is incompatible") ErrSecurityEventPersistence = errors.New("plugin security event persistence failed") ErrAdapterFailure = errors.New("plugin host adapter failed") ErrOwnerScopeMismatch = errors.New("plugin owner scope mismatch") ErrSecretScopeMismatch = errors.New("plugin secret scope mismatch") ErrStorageScopeMismatch = errors.New("plugin storage scope mismatch") ErrHostClosed = errors.New("plugin host is closed") ErrHostConfig = errors.New("plugin host configuration is invalid") ErrFeatureNotConfigured = errors.New("plugin feature is not configured") ErrReleaseModuleRequired = errors.New("release module is required") ErrRuntimeModuleRequired = errors.New("runtime module is required") ErrCapabilityModuleRequired = errors.New("capability module is required") ErrConnectivityModuleRequired = errors.New("connectivity module is required") ErrSecretsModuleRequired = errors.New("secrets module is required") ErrCoreActionModuleRequired = errors.New("core action module is required") ErrExternalPackageModuleRequired = errors.New("external package module is required") ErrDurableSessionScopeRequired = errors.New("durable session scope coordinator is required") ErrSessionTeardownIncomplete = errors.New("plugin session teardown is incomplete") )
var ( ErrSecretStoreRequired = errors.New("secret store adapter is required") ErrInvalidSecretRef = secrets.ErrInvalidSecretRef ErrPackageTrustVerifierRequired = errors.New("package trust verifier is required for requested trust state") ErrPackageTrustVerificationInvalid = errors.New("package trust verifier returned invalid trust state") ErrReleaseArtifactResolverRequired = errors.New("release artifact resolver is required") ErrReleaseRefVerificationFailed = errors.New("release ref verification failed") ErrReleaseRefPolicyDenied = errors.New("release ref source policy denied") )
var ( ErrRuntimeAdmissionUnsupported = errors.New("runtime admission is unsupported on this platform") ErrRuntimeAdmissionInvalid = errors.New("runtime executable admission failed") ErrVerifiedExecutableClosed = errors.New("verified runtime executable is closed") )
var ( ErrRuntimeNotReady = runtimeclient.ErrRuntimeNotReady ErrRuntimeRequestFailed = runtimeclient.ErrRuntimeRequestFailed ErrRuntimeHandshake = runtimeclient.ErrRuntimeHandshake )
var ( ErrRuntimeDescriptorInvalid = errors.New("runtime descriptor is invalid") ErrRuntimeDescriptorMismatch = errors.New("runtime descriptor does not match the platform") ErrRuntimeAdmissionTargetInvalid = errors.New("runtime admission target is invalid") ErrRuntimeProtocolVersionInvalid = errors.New("runtime protocol version is invalid") ErrSHA256DigestInvalid = errors.New("sha256 digest is invalid") ErrRuntimeBinaryNameInvalid = errors.New("runtime binary name is invalid") )
var ( RuntimeAdmissionLinuxAMD64 = RuntimeAdmissionTarget{/* contains filtered or unexported fields */} RuntimeAdmissionLinuxARM64 = RuntimeAdmissionTarget{/* contains filtered or unexported fields */} )
var ( ErrVerifiedExecutableRequired = errors.New("verified runtime executable is required") ErrRuntimeModuleOptionsInvalid = errors.New("runtime module options are invalid") ErrRuntimeModuleClosed = errors.New("runtime module is closed") ErrRuntimeModuleConsumed = errors.New("runtime module ownership was transferred to a host") )
var ErrActionDenied = errors.New("host platform action is denied")
var ErrConfirmationRequired = errors.New("plugin method confirmation required")
Functions ¶
func AsValidatedCapabilityBusinessError ¶ added in v0.5.0
func AsValidatedCapabilityBusinessError(err error) (capability.BusinessError, bool)
AsValidatedCapabilityBusinessError returns a copy of a published business error attested by Host.
func HasUnattestedRPCStructuredError ¶ added in v0.5.0
HasUnattestedRPCStructuredError reports whether an unprojected error graph contains a business- or worker-error claim that did not pass its Host-owned attestation boundary.
func ImportLocalPackageBytes ¶
func MarshalRuntimeDescriptorJSON ¶ added in v0.6.0
func MarshalRuntimeDescriptorJSON(descriptor RuntimeDescriptor) ([]byte, error)
Types ¶
type AcknowledgeStreamRequest ¶ added in v0.5.0
type ActionDeniedError ¶ added in v0.5.0
type ActionDeniedError struct {
Action ManagementAction
Target AuthorizationTarget
}
func (ActionDeniedError) Error ¶ added in v0.5.0
func (e ActionDeniedError) Error() string
func (ActionDeniedError) Unwrap ¶ added in v0.5.0
func (e ActionDeniedError) Unwrap() error
type AuditEvent ¶
type AuditEvent = observability.AuditEvent
type AuditSink ¶
type AuditSink = observability.AuditSink
type AuthorizationAdapter ¶ added in v0.5.0
type AuthorizationAdapter interface {
// Authorize returns ErrActionDenied only for an explicit policy denial.
// Any other error is treated as an operational adapter failure.
Authorize(ctx context.Context, req AuthorizationRequest) error
}
type AuthorizationRequest ¶ added in v0.5.0
type AuthorizationRequest struct {
// Session is derived from the authenticated context by Host and is never
// accepted from a command, HTTP payload, or plugin IPC request.
Session sessionctx.Context `json:"-"`
Action ManagementAction `json:"action"`
Target AuthorizationTarget `json:"target"`
RelatedTargets []AuthorizationTarget `json:"related_targets,omitempty"`
}
type AuthorizationTarget ¶ added in v0.5.0
type AuthorizationTarget struct {
Kind ResourceRef `json:"kind"`
ID string `json:"id,omitempty"`
Collection bool `json:"collection,omitempty"`
Scope *sessionctx.ResourceScope `json:"-"`
}
AuthorizationTarget is one canonical resource presented to an embedding product's authorization policy. ResourceScope is always derived by Host from the authenticated session and is never accepted from wire or plugin input.
type BindRetainedDataRequest ¶
type BindRetainedDataRequest struct {
SourcePluginInstanceID string `json:"source_plugin_instance_id"`
ExpectedSourceBindingRevision uint64 `json:"expected_source_binding_revision"`
TargetPluginInstanceID string `json:"target_plugin_instance_id"`
TargetExpectedManagementRevision uint64 `json:"target_expected_management_revision"`
Now time.Time `json:"-"`
}
type CallMethodRequest ¶
type CallMethodRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
SurfaceInstanceID string `json:"surface_instance_id"`
BridgeChannelID string `json:"bridge_channel_id"`
GatewayToken string `json:"plugin_gateway_token"`
ConfirmationID string `json:"confirmation_id,omitempty"`
Method string `json:"method"`
Params map[string]any `json:"params,omitempty"`
Now time.Time `json:"-"`
// contains filtered or unexported fields
}
type CallMethodResult ¶
type CallMethodResult struct {
Data any `json:"data"`
OperationID string `json:"operation_id,omitempty"`
StreamID string `json:"stream_id,omitempty"`
StreamTicket string `json:"stream_ticket,omitempty"`
StreamTicketID string `json:"stream_ticket_id,omitempty"`
StreamExpiresAt *time.Time `json:"stream_expires_at,omitempty"`
ConfirmationRequired bool `json:"confirmation_required,omitempty"`
ConfirmationTokenID string `json:"confirmation_token_id,omitempty"`
RequestHash string `json:"request_hash,omitempty"`
PlanHash string `json:"plan_hash,omitempty"`
}
type CancelOperationRequest ¶
type CancelSurfaceOperationRequest ¶ added in v0.3.0
type CapabilityArtifactFetchHop ¶ added in v0.3.0
type CapabilityContractArtifactResolver ¶ added in v0.3.0
type CapabilityContractArtifactResolver interface {
ResolveCapabilityContract(ctx context.Context, req CapabilityContractResolveRequest) (ResolvedCapabilityContractArtifact, error)
}
type CapabilityContractArtifactSet ¶ added in v0.3.0
type CapabilityContractArtifactSet interface {
OpenCapabilityContractArtifact(ctx context.Context, ref string) (ResolvedCapabilityContractFile, error)
}
type CapabilityContractResolveRequest ¶ added in v0.3.0
type CapabilityContractResolveRequest struct {
SourceID string `json:"source_id"`
PluginPublisherID string `json:"plugin_publisher_id"`
Pin capabilitycontract.Pin `json:"pin"`
SourcePolicy releasecontract.SourcePolicyV2 `json:"source_policy"`
}
type CapabilityModule ¶ added in v0.5.0
type CapabilityModule struct {
Registry *capability.Registry
}
type CommitExternalPackageRequest ¶ added in v0.6.8
type CommitSessionScopeCloseRequest ¶ added in v0.6.0
type CommitSessionScopeCloseRequest struct {
Session sessionctx.Context `json:"-"`
Identity sessionscope.TeardownIdentity `json:"-"`
}
type Config ¶ added in v0.5.0
type Config struct {
Core CoreAdapters
Release *ReleaseModule
Runtime *RuntimeModule
Capability *CapabilityModule
Connectivity *ConnectivityModule
Secrets *SecretsModule
CoreAction *CoreActionModule
ExternalPackage *ExternalPackageModule
}
type ConnectivityModule ¶ added in v0.5.0
type ConnectivityModule struct {
Broker connectivity.Broker
NetworkExecutor connectivity.NetworkExecutor
}
type CoreActionAdapter ¶
type CoreActionAdapter interface {
ResolveCoreActionTarget(ctx context.Context, req capability.TargetResolutionRequest) (capability.TargetDescriptor, error)
InvokeCoreAction(ctx context.Context, req capability.Invocation) (capability.Result, error)
}
type CoreActionModule ¶ added in v0.5.0
type CoreActionModule struct {
Adapter CoreActionAdapter
}
type CoreAdapters ¶ added in v0.5.0
type CoreAdapters struct {
Policy PolicyAdapter
Authorization AuthorizationAdapter
PackageTrustVerifier PackageTrustVerifier
Registry registry.Store
Audit AuditSink
SecurityAudit observability.SecurityAuditJournal
Diagnostics DiagnosticsSink
SurfaceCatalog SurfaceCatalogSink
SurfaceTokens *bridge.SurfaceTokenService
PluginData PluginData
Assets pluginpkg.AssetStore
InstallStages installstage.Store
Operations operation.Store
ConfirmationIntents security.ConfirmationIntentStore
Streams stream.Store
SessionLifecycle SessionLifecycleAdapter
SessionScopes *sessionscope.Coordinator
}
CoreAdapters contains the dependencies required by every Host instance. Optional capabilities are intentionally kept out of this structure so a host can expose only the integrations it actually provides. Package trust is core because every package mutation crosses the same trust boundary.
type DeleteExportDataRequest ¶ added in v0.5.0
type DeleteSecurityPolicyRequest ¶
type DeleteSecurityPolicyRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
ExpectedPolicyRevision uint64 `json:"expected_policy_revision"`
ExpectedManagementRevision uint64 `json:"expected_management_revision"`
ExpectedRevokeEpoch uint64 `json:"expected_revoke_epoch"`
Now time.Time `json:"-"`
}
type DiagnosticDetails ¶ added in v0.5.0
type DiagnosticDetails struct {
OperationsDeleted int64 `json:"operations_deleted,omitempty"`
StreamsDeleted int64 `json:"streams_deleted,omitempty"`
InvocationID string `json:"invocation_id,omitempty"`
Method string `json:"method,omitempty"`
FailureCode string `json:"failure_code,omitempty"`
RuntimeProcessFailureCode observability.RuntimeProcessFailureCode `json:"runtime_process_failure_code,omitempty"`
OperationID string `json:"operation_id,omitempty"`
StreamID string `json:"stream_id,omitempty"`
RuntimeInstanceID string `json:"runtime_instance_id,omitempty"`
RuntimeGenerationID string `json:"runtime_generation_id,omitempty"`
RuntimeVersion string `json:"runtime_version,omitempty"`
RustIPCVersion string `json:"rust_ipc_version,omitempty"`
WASMABIVersion string `json:"wasm_abi_version,omitempty"`
ContractSetSHA256 string `json:"contract_set_sha256,omitempty"`
RuntimeTargetOS string `json:"runtime_target_os,omitempty"`
RuntimeTargetArch string `json:"runtime_target_arch,omitempty"`
RuntimeBinarySHA256 string `json:"runtime_binary_sha256,omitempty"`
OS string `json:"os,omitempty"`
Arch string `json:"arch,omitempty"`
Stream string `json:"stream,omitempty"`
PackageHash string `json:"package_hash,omitempty"`
Artifact string `json:"artifact,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
StoreID string `json:"store_id,omitempty"`
Operation string `json:"operation,omitempty"`
Hostcall string `json:"hostcall,omitempty"`
Code string `json:"code,omitempty"`
ConnectorID string `json:"connector_id,omitempty"`
Transport string `json:"transport,omitempty"`
RevokeEpoch uint64 `json:"revoke_epoch,omitempty"`
StageID string `json:"stage_id,omitempty"`
Reason string `json:"reason,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
}
type DiagnosticEvent ¶
type DiagnosticEvent struct {
EventID string `json:"event_id,omitempty"`
Type string `json:"type"`
Severity observability.DiagnosticSeverity `json:"severity"`
Message string `json:"message"`
PluginID string `json:"plugin_id,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
SurfaceID string `json:"surface_id,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
ActiveFingerprint string `json:"active_fingerprint,omitempty"`
RequestID string `json:"request_id,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
MutationOutcome mutation.Outcome `json:"mutation_outcome,omitempty"`
OccurredAt time.Time `json:"occurred_at,omitempty"`
Details DiagnosticDetails `json:"details,omitzero"`
}
type DiagnosticLister ¶
type DiagnosticLister = observability.DiagnosticLister
type DiagnosticsSink ¶
type DiagnosticsSink = observability.DiagnosticsSink
type DisableRequest ¶
type DisposeSurfaceRequest ¶
type DowngradeRequest ¶
type EnableRequest ¶
type ExportDataRequest ¶
type ExportDataRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
}
type ExportDataResult ¶
type ExternalPackageCancelSummary ¶ added in v0.6.8
type ExternalPackageCapabilityContractSummary ¶ added in v0.6.8
type ExternalPackageCommitReceipt ¶ added in v0.6.8
type ExternalPackageCommitResult ¶ added in v0.6.8
type ExternalPackageCommitResult struct {
Status string `json:"status"`
InspectionID string `json:"inspection_id"`
Intent ExternalPackageIntent `json:"intent"`
Receipt *ExternalPackageCommitReceipt `json:"receipt,omitempty"`
Plugin *registry.PluginRecord `json:"plugin,omitempty"`
SignatureAssessment *ExternalPackageSignatureAssessment `json:"signature_assessment,omitempty"`
SourceProvenance *ExternalPackageSourceProvenance `json:"source_provenance,omitempty"`
ExecutionApproval *ExternalPackageExecutionApproval `json:"execution_approval,omitempty"`
UpdateEligibility *ExternalPackageUpdateEligibility `json:"update_eligibility,omitempty"`
SecuritySummary *ExternalPackageSecuritySummary `json:"security_summary,omitempty"`
FailureCode string `json:"failure_code,omitempty"`
RetryAfterMS int `json:"retry_after_ms,omitempty"`
}
type ExternalPackageConfirmationSummary ¶ added in v0.6.8
type ExternalPackageCoreActionSummary ¶ added in v0.6.8
type ExternalPackageExecutionApproval ¶ added in v0.6.8
type ExternalPackageFetcher ¶ added in v0.6.8
type ExternalPackageFetcher interface {
FetchPackage(context.Context, externalsource.FetchRequest) (externalsource.FetchResult, error)
}
type ExternalPackageGitHubResolver ¶ added in v0.6.8
type ExternalPackageGitHubResolver interface {
ResolvePackage(context.Context, externalsource.GitHubRepositorySource) (externalsource.ResolvedGitHubAsset, error)
}
type ExternalPackageInspection ¶ added in v0.6.8
type ExternalPackageInspection struct {
InspectionID string `json:"inspection_id"`
ExpiresAt time.Time `json:"expires_at"`
Intent ExternalPackageIntent `json:"intent"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
Version string `json:"version"`
InspectedHashes PackageHashSet `json:"inspected_hashes"`
SignatureAssessment ExternalPackageSignatureAssessment `json:"signature_assessment"`
SourceProvenance ExternalPackageSourceProvenance `json:"source_provenance"`
ExecutionApproval ExternalPackageExecutionApproval `json:"execution_approval"`
UpdateEligibility ExternalPackageUpdateEligibility `json:"update_eligibility"`
SecuritySummary ExternalPackageSecuritySummary `json:"security_summary"`
ConfirmationDigest string `json:"confirmation_digest"`
}
type ExternalPackageIntent ¶ added in v0.6.8
type ExternalPackageIntentSummary ¶ added in v0.6.8
type ExternalPackageMethodRouteSummary ¶ added in v0.6.8
type ExternalPackageMethodSummary ¶ added in v0.6.8
type ExternalPackageMethodSummary struct {
Method string `json:"method"`
Route ExternalPackageMethodRouteSummary `json:"route"`
Effect string `json:"effect"`
Execution string `json:"execution"`
Dangerous bool `json:"dangerous"`
PreflightOnly bool `json:"preflight_only"`
RequiredPermissions []string `json:"required_permissions"`
Confirmation ExternalPackageConfirmationSummary `json:"confirmation"`
Cancel *ExternalPackageCancelSummary `json:"cancel,omitempty"`
}
type ExternalPackageModule ¶ added in v0.6.8
type ExternalPackageModule struct {
StageStore ExternalPackageStageStore
PackageFetcher ExternalPackageFetcher
GitHubResolver ExternalPackageGitHubResolver
SignatureAssessor ExternalPackageSignatureAssessor
}
ExternalPackageModule configures the host-neutral public HTTPS and GitHub Release admission pipeline. Pending inspections are process-local and expire on Host restart; committed receipts remain durable in the registry store.
type ExternalPackageNetworkMethodAccessSummary ¶ added in v0.6.8
type ExternalPackageNetworkSummary ¶ added in v0.6.8
type ExternalPackageNetworkSummary struct {
ConnectorID string `json:"connector_id"`
Transport string `json:"transport"`
Scope string `json:"scope"`
Destinations []string `json:"destinations"`
AuthDeclared bool `json:"auth_declared"`
TLSDeclared bool `json:"tls_declared"`
MethodAccess []ExternalPackageNetworkMethodAccessSummary `json:"method_access"`
}
type ExternalPackagePermissionSummary ¶ added in v0.6.8
type ExternalPackageRedirectHop ¶ added in v0.6.8
type ExternalPackageSecretRefSummary ¶ added in v0.6.8
type ExternalPackageSecuritySummary ¶ added in v0.6.8
type ExternalPackageSecuritySummary struct {
SummarySHA256 string `json:"summary_sha256"`
Permissions []ExternalPackagePermissionSummary `json:"permissions"`
Methods []ExternalPackageMethodSummary `json:"methods"`
CapabilityContracts []ExternalPackageCapabilityContractSummary `json:"capability_contracts"`
Workers []ExternalPackageWorkerSummary `json:"workers"`
Network []ExternalPackageNetworkSummary `json:"network"`
Storage []ExternalPackageStorageSummary `json:"storage"`
SecretRefs []ExternalPackageSecretRefSummary `json:"secret_refs"`
CoreActions []ExternalPackageCoreActionSummary `json:"core_actions"`
Intents []ExternalPackageIntentSummary `json:"intents"`
Surfaces []ExternalPackageSurfaceSummary `json:"surfaces"`
}
type ExternalPackageSignatureAssessment ¶ added in v0.6.8
type ExternalPackageSignatureAssessment struct {
State string `json:"state"`
ReasonCodes []string `json:"reason_codes"`
AssessedHashes PackageHashSet `json:"assessed_hashes"`
Algorithm string `json:"algorithm,omitempty"`
KeyID string `json:"key_id,omitempty"`
AssessedAt time.Time `json:"assessed_at"`
AssessmentEpoch string `json:"assessment_epoch,omitempty"`
}
type ExternalPackageSignatureAssessmentRequest ¶ added in v0.6.8
type ExternalPackageSignatureAssessor ¶ added in v0.6.8
type ExternalPackageSignatureAssessor interface {
AssessExternalPackageSignature(context.Context, ExternalPackageSignatureAssessmentRequest) (registry.SignatureAssessment, error)
}
ExternalPackageSignatureAssessor returns a closed signature fact. Expected outcomes such as unknown signer, invalid signature, and revocation belong in the result; errors are reserved for unavailable assessment dependencies.
type ExternalPackageSignatureFreshnessAssessor ¶ added in v0.6.8
type ExternalPackageSignatureFreshnessAssessor interface {
AssessExternalPackageSignatureFreshness(context.Context, ExternalPackageSignatureFreshnessRequest) (registry.SignatureAssessment, error)
}
ExternalPackageSignatureFreshnessAssessor checks mutable keyring and revocation facts without requiring the package payload again.
type ExternalPackageSignatureFreshnessRequest ¶ added in v0.6.8
type ExternalPackageSignatureFreshnessRequest struct {
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
PackageSHA256 string `json:"package_sha256"`
ManifestSHA256 string `json:"manifest_sha256"`
EntriesSHA256 string `json:"entries_sha256"`
Assessment registry.SignatureAssessment `json:"assessment"`
Now time.Time `json:"-"`
}
type ExternalPackageSizeSummary ¶ added in v0.6.8
type ExternalPackageSource ¶ added in v0.6.8
type ExternalPackageSourceProvenance ¶ added in v0.6.8
type ExternalPackageSourceProvenance struct {
Kind string `json:"kind"`
UploadID string `json:"upload_id,omitempty"`
SourceOrigin string `json:"source_origin,omitempty"`
SourcePath string `json:"source_path,omitempty"`
RedirectChain []ExternalPackageRedirectHop `json:"redirect_chain,omitempty"`
RepositoryID string `json:"repository_id,omitempty"`
ReleaseID string `json:"release_id,omitempty"`
AssetID string `json:"asset_id,omitempty"`
RepositoryURL string `json:"repository_url,omitempty"`
Owner string `json:"owner,omitempty"`
Repository string `json:"repository,omitempty"`
ResolvedCommitSHA string `json:"resolved_commit_sha,omitempty"`
ReleaseTag string `json:"release_tag,omitempty"`
AssetName string `json:"asset_name,omitempty"`
PackageSHA256 string `json:"package_sha256"`
ResolvedAt time.Time `json:"resolved_at"`
}
type ExternalPackageStageStore ¶ added in v0.6.8
type ExternalPackageStageStore interface {
StageUpload(context.Context, string, io.Reader, int64) (externalsource.StagedArtifact, error)
VerifyPackage(context.Context, externalsource.StagedArtifact, pluginpkg.ReadLimits) (pluginpkg.Package, error)
Remove(externalsource.StagedArtifact) error
}
type ExternalPackageStorageMethodAccessSummary ¶ added in v0.6.8
type ExternalPackageStorageSummary ¶ added in v0.6.8
type ExternalPackageStorageSummary struct {
StoreID string `json:"store_id"`
Kind string `json:"kind"`
Scope string `json:"scope"`
QuotaBytes int64 `json:"quota_bytes"`
QuotaFiles *int64 `json:"quota_files,omitempty"`
SchemaVersion int `json:"schema_version"`
MethodAccess []ExternalPackageStorageMethodAccessSummary `json:"method_access"`
}
type ExternalPackageSurfaceSummary ¶ added in v0.6.8
type ExternalPackageSurfaceSummary struct {
SurfaceID string `json:"surface_id"`
Kind string `json:"kind"`
Intent string `json:"intent"`
Label string `json:"label"`
Entry string `json:"entry"`
Icon string `json:"icon,omitempty"`
DefaultSize *ExternalPackageSizeSummary `json:"default_size,omitempty"`
}
type ExternalPackageUpdateEligibility ¶ added in v0.6.8
type ExternalPackageWorkerSummary ¶ added in v0.6.8
type Feature ¶ added in v0.5.0
type Feature string
Feature identifies an optional host integration module. The values are part of the host contract and must remain a closed, sorted set.
type FeatureNotConfiguredError ¶ added in v0.5.0
type FeatureNotConfiguredError struct {
Features []Feature
}
FeatureNotConfiguredError identifies an optional module that was not installed in the host configuration.
func (FeatureNotConfiguredError) Error ¶ added in v0.5.0
func (e FeatureNotConfiguredError) Error() string
func (FeatureNotConfiguredError) MissingFeatures ¶ added in v0.5.0
func (e FeatureNotConfiguredError) MissingFeatures() []Feature
func (FeatureNotConfiguredError) Unwrap ¶ added in v0.5.0
func (e FeatureNotConfiguredError) Unwrap() error
type FinalizeSessionScopeRequest ¶ added in v0.6.0
type FinalizeSessionScopeRequest struct {
Identity sessionscope.TeardownIdentity `json:"-"`
}
type GetSecurityPolicyRequest ¶
type GetSecurityPolicyRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
}
type GetSettingsRequest ¶
type GetSettingsRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
Scope sessionctx.ScopeKind `json:"scope"`
}
type GrantPermissionRequest ¶
type GrantPermissionRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
PermissionID string `json:"permission_id"`
ExpectedPolicyRevision uint64 `json:"expected_policy_revision"`
ExpectedManagementRevision uint64 `json:"expected_management_revision"`
ExpectedRevokeEpoch uint64 `json:"expected_revoke_epoch"`
Now time.Time `json:"-"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
type Host ¶
type Host struct {
// contains filtered or unexported fields
}
func (*Host) AcknowledgeStream ¶ added in v0.5.0
func (*Host) BindRetainedData ¶
func (h *Host) BindRetainedData(ctx context.Context, req BindRetainedDataRequest) (result plugindata.Binding, retErr error)
func (*Host) BindSecretRef ¶
func (h *Host) BindSecretRef(ctx context.Context, req SecretBindRequest) (retErr error)
func (*Host) CallPluginMethod ¶
func (h *Host) CallPluginMethod(ctx context.Context, req CallMethodRequest) (result CallMethodResult, resultErr error)
func (*Host) CancelOperation ¶
func (*Host) CancelSurfaceOperation ¶ added in v0.3.0
func (*Host) Capabilities ¶
func (h *Host) Capabilities() *capability.Registry
func (*Host) CleanupExpiredRetainedData ¶
func (h *Host) CleanupExpiredRetainedData(ctx context.Context, req CleanupExpiredRetainedDataRequest) (RetainedDataCleanupResult, error)
func (*Host) CommitExternalPackage ¶ added in v0.6.8
func (h *Host) CommitExternalPackage(ctx context.Context, req CommitExternalPackageRequest) (result ExternalPackageCommitResult, retErr error)
func (*Host) DeleteExportedPluginData ¶ added in v0.5.0
func (h *Host) DeleteExportedPluginData(ctx context.Context, req DeleteExportDataRequest) error
func (*Host) DeleteRetainedData ¶
func (h *Host) DeleteRetainedData(ctx context.Context, req DeleteRetainedDataRequest) (result plugindata.Binding, retErr error)
func (*Host) DeleteSecretRef ¶
func (h *Host) DeleteSecretRef(ctx context.Context, req SecretDeleteRequest) (retErr error)
func (*Host) DeleteSecurityPolicy ¶
func (h *Host) DeleteSecurityPolicy(ctx context.Context, req DeleteSecurityPolicyRequest) (result registry.AuthorizationRevisions, retErr error)
func (*Host) DisablePlugin ¶
func (h *Host) DisablePlugin(ctx context.Context, req DisableRequest) (result registry.PluginRecord, retErr error)
func (*Host) DisposeSurface ¶
func (h *Host) DisposeSurface(ctx context.Context, req DisposeSurfaceRequest) error
func (*Host) DowngradePlugin ¶
func (h *Host) DowngradePlugin(ctx context.Context, req DowngradeRequest) (result registry.PluginRecord, retErr error)
func (*Host) EnablePlugin ¶
func (h *Host) EnablePlugin(ctx context.Context, req EnableRequest) (result registry.PluginRecord, retErr error)
func (*Host) ExportPluginData ¶
func (h *Host) ExportPluginData(ctx context.Context, req ExportDataRequest) (result ExportDataResult, retErr error)
func (*Host) Features ¶ added in v0.5.0
Features returns the configured platform modules after host authorization.
func (*Host) FinalizeSessionScope ¶ added in v0.6.0
func (h *Host) FinalizeSessionScope(ctx context.Context, req FinalizeSessionScopeRequest) (retErr error)
func (*Host) GetCompatibility ¶ added in v0.5.0
GetCompatibility returns the current platform contract after host authorization.
func (*Host) GetOperation ¶
func (*Host) GetPluginSettings ¶
func (h *Host) GetPluginSettings(ctx context.Context, req GetSettingsRequest) (SettingsResult, error)
func (*Host) GetSecurityPolicy ¶
func (h *Host) GetSecurityPolicy(ctx context.Context, req GetSecurityPolicyRequest) (SecurityPolicyResult, error)
func (*Host) GetSettingsSchema ¶
func (h *Host) GetSettingsSchema(ctx context.Context, req GetSettingsRequest) (SettingsSchemaResult, error)
func (*Host) GrantPermission ¶
func (h *Host) GrantPermission(ctx context.Context, req GrantPermissionRequest) (result PermissionMutationResult, retErr error)
func (*Host) ImportLocalPackage ¶
func (h *Host) ImportLocalPackage(ctx context.Context, req ImportLocalPackageRequest) (registry.PluginRecord, error)
func (*Host) ImportPluginData ¶
func (h *Host) ImportPluginData(ctx context.Context, req ImportDataRequest) (result registry.PluginRecord, retErr error)
func (*Host) InspectExternalPackage ¶ added in v0.6.8
func (h *Host) InspectExternalPackage(ctx context.Context, req InspectExternalPackageRequest) (result ExternalPackageInspection, retErr error)
func (*Host) InspectUploadedExternalPackage ¶ added in v0.6.8
func (h *Host) InspectUploadedExternalPackage(ctx context.Context, req InspectUploadedExternalPackageRequest) (ExternalPackageInspection, error)
func (*Host) InstallReleaseRef ¶
func (h *Host) InstallReleaseRef(ctx context.Context, req InstallReleaseRefRequest) (registry.PluginRecord, error)
func (*Host) InvokeIntent ¶
func (h *Host) InvokeIntent(ctx context.Context, req InvokeIntentRequest) (response CallMethodResult, resultErr error)
func (*Host) ListDiagnosticEvents ¶
func (h *Host) ListDiagnosticEvents(ctx context.Context, req ListDiagnosticEventsRequest) ([]DiagnosticEvent, error)
func (*Host) ListIntents ¶
func (h *Host) ListIntents(ctx context.Context, req ListIntentsRequest) ([]IntentRecord, error)
func (*Host) ListOperations ¶
func (h *Host) ListOperations(ctx context.Context, req ListOperationsRequest) (ListOperationsResult, error)
func (*Host) ListPermissionGrants ¶
func (h *Host) ListPermissionGrants(ctx context.Context, req ListPermissionGrantsRequest) ([]permissions.Record, error)
func (*Host) ListPlugins ¶
func (*Host) ListRetainedData ¶
func (h *Host) ListRetainedData(ctx context.Context, req ListRetainedDataRequest) ([]plugindata.Binding, error)
func (*Host) ListSecurityPolicies ¶
func (h *Host) ListSecurityPolicies(ctx context.Context) ([]SecurityPolicyResult, error)
func (*Host) MintBridgeToken ¶
func (h *Host) MintBridgeToken(ctx context.Context, req MintBridgeTokenRequest) (result bridge.GatewayTokenResult, retErr error)
func (*Host) MintConnectionGrant ¶
func (h *Host) MintConnectionGrant(ctx context.Context, req MintConnectionGrantRequest) (result connectivity.ConnectionGrant, retErr error)
func (*Host) MintNetworkHandleGrant ¶
func (h *Host) MintNetworkHandleGrant(ctx context.Context, req MintConnectionGrantRequest) (result NetworkHandleGrantResult, retErr error)
func (*Host) MintStorageHandleGrant ¶
func (h *Host) MintStorageHandleGrant(ctx context.Context, req MintStorageHandleGrantRequest) (result StorageHandleGrantResult, retErr error)
func (*Host) OpenSurface ¶
func (h *Host) OpenSurface(ctx context.Context, req OpenSurfaceRequest) (result bridge.SurfaceBootstrap, retErr error)
func (*Host) PatchPluginSettings ¶
func (h *Host) PatchPluginSettings(ctx context.Context, req PatchSettingsRequest) (result SettingsResult, retErr error)
func (*Host) PrepareMethodConfirmation ¶
func (h *Host) PrepareMethodConfirmation(ctx context.Context, req PrepareMethodConfirmationRequest) (response PrepareMethodConfirmationResult, resultErr error)
func (*Host) PrepareSurface ¶
func (h *Host) PrepareSurface(ctx context.Context, req PrepareSurfaceRequest) (result PrepareSurfaceResult, err error)
func (*Host) PutSecurityPolicy ¶
func (h *Host) PutSecurityPolicy(ctx context.Context, req PutSecurityPolicyRequest) (result SecurityPolicyResult, retErr error)
func (*Host) QueryExternalPackageCommit ¶ added in v0.6.8
func (h *Host) QueryExternalPackageCommit(ctx context.Context, req QueryExternalPackageCommitRequest) (ExternalPackageCommitResult, error)
func (*Host) ReadStream ¶
func (h *Host) ReadStream(ctx context.Context, req ReadStreamRequest) (ReadStreamResult, error)
func (*Host) ReadSurfaceAsset ¶
func (h *Host) ReadSurfaceAsset(ctx context.Context, req ReadSurfaceAssetRequest) (ReadSurfaceAssetResult, error)
func (*Host) RefreshEnabledPlugins ¶
func (h *Host) RefreshEnabledPlugins(ctx context.Context) ([]RefreshEnabledPluginResult, error)
func (*Host) RejectMethodConfirmation ¶ added in v0.3.0
func (h *Host) RejectMethodConfirmation(ctx context.Context, req RejectMethodConfirmationRequest) (response RejectMethodConfirmationResult, resultErr error)
func (*Host) ReportHTTPAdapterFailure ¶ added in v0.5.0
func (*Host) RevokePermission ¶
func (h *Host) RevokePermission(ctx context.Context, req RevokePermissionRequest) (result PermissionMutationResult, retErr error)
func (*Host) RevokeSessionScope ¶ added in v0.6.0
func (h *Host) RevokeSessionScope(ctx context.Context, req RevokeSessionScopeRequest) (result RevokeSessionScopeResult, retErr error)
func (*Host) RuntimeHealth ¶
func (h *Host) RuntimeHealth(ctx context.Context) (RuntimeHealth, error)
func (*Host) StartRuntime ¶
func (h *Host) StartRuntime(ctx context.Context, req StartRuntimeRequest) (result RuntimeHealth, retErr error)
func (*Host) TestSecretRef ¶
func (h *Host) TestSecretRef(ctx context.Context, req SecretTestRequest) (retErr error)
func (*Host) UninstallPlugin ¶
func (h *Host) UninstallPlugin(ctx context.Context, req UninstallRequest) (result registry.PluginRecord, retErr error)
func (*Host) UpdateLocalPackage ¶
func (h *Host) UpdateLocalPackage(ctx context.Context, req UpdateLocalPackageRequest) (registry.PluginRecord, error)
func (*Host) UpdateReleaseRef ¶
func (h *Host) UpdateReleaseRef(ctx context.Context, req UpdateReleaseRefRequest) (registry.PluginRecord, error)
type HostCapabilityContractRef ¶
type HostCapabilityContractRef = capabilitycontract.Pin
type HostCapabilityRequirement ¶
type HostCapabilityRequirement struct {
CapabilityID string `json:"capability_id"`
CapabilityVersion string `json:"capability_version"`
Contract HostCapabilityContractRef `json:"contract"`
}
type HostConfigError ¶ added in v0.5.0
type HostConfigError struct {
Module string
Adapter string
Cause error
// contains filtered or unexported fields
}
HostConfigError identifies the module and adapter that made a host configuration invalid. Cause preserves legacy module-required sentinels.
func (*HostConfigError) Error ¶ added in v0.5.0
func (e *HostConfigError) Error() string
func (*HostConfigError) Is ¶ added in v0.5.0
func (e *HostConfigError) Is(target error) bool
func (*HostConfigError) RuntimeModuleDisposition ¶ added in v0.6.0
func (e *HostConfigError) RuntimeModuleDisposition() RuntimeModuleDisposition
func (*HostConfigError) Unwrap ¶ added in v0.5.0
func (e *HostConfigError) Unwrap() error
type HostRequirement ¶
type HostRequirement struct {
HostID string `json:"host_id"`
MinHostVersion string `json:"min_host_version,omitempty"`
RequiredCapabilityContracts []HostCapabilityRequirement `json:"required_capability_contracts,omitempty"`
}
type HostRequirementPolicy ¶ added in v0.3.0
type HostRequirementPolicy interface {
SelectHostRequirement(ctx context.Context, req HostRequirementSelectionRequest) (HostRequirementSelection, error)
}
type HostRequirementSelection ¶ added in v0.3.0
type HostRequirementSelection struct {
HostID string `json:"host_id"`
}
type HostRequirementSelectionRequest ¶ added in v0.3.0
type HostRequirementSelectionRequest struct {
SourceID string `json:"source_id"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
PluginVersion string `json:"plugin_version"`
Requirements []HostRequirement `json:"requirements"`
}
type ImportDataRequest ¶
type InspectExternalPackageRequest ¶ added in v0.6.8
type InspectExternalPackageRequest struct {
Intent ExternalPackageIntent `json:"intent"`
Source ExternalPackageSource `json:"source"`
Now time.Time `json:"-"`
}
type InspectUploadedExternalPackageRequest ¶ added in v0.6.8
type InstallReleaseRefRequest ¶
type InstallReleaseRefRequest struct {
ReleaseRef PluginReleaseRef `json:"release_ref"`
PluginInstanceID string `json:"plugin_instance_id"`
Now time.Time `json:"-"`
}
type IntentRecord ¶
type IntentRecord struct {
PluginID string `json:"plugin_id"`
PluginInstanceID string `json:"plugin_instance_id"`
PublisherID string `json:"publisher_id"`
DisplayName string `json:"display_name"`
Version string `json:"version"`
ActiveFingerprint string `json:"active_fingerprint"`
IntentID string `json:"intent_id"`
Method string `json:"method"`
Effect manifest.MethodEffect `json:"effect"`
Execution manifest.MethodExecutionMode `json:"execution"`
PayloadSchema map[string]any `json:"payload_schema,omitempty"`
}
type InvokeIntentRequest ¶
type ListDiagnosticEventsRequest ¶
type ListDiagnosticEventsRequest struct {
PluginID string `json:"plugin_id,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
Type string `json:"type,omitempty"`
Severity observability.DiagnosticSeverity `json:"severity,omitempty"`
Limit int `json:"limit,omitempty"`
}
type ListIntentsRequest ¶
type ListOperationsRequest ¶
type ListOperationsResult ¶ added in v0.5.0
type ListRetainedDataRequest ¶
type ListRetainedDataRequest struct {
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
}
type ManagementAction ¶ added in v0.5.0
type ManagementAction string
ManagementAction identifies one direct Host platform operation. The set is closed so embedding products can implement exhaustive authorization policy.
const ( ManagementActionOpenSurface ManagementAction = "surface.open" ManagementActionPrepareSurface ManagementAction = "surface.prepare" ManagementActionMintBridgeToken ManagementAction = "surface.mint_bridge_token" ManagementActionReadSurfaceAsset ManagementAction = "surface.read_asset" ManagementActionReadSurfaceStream ManagementAction = "surface.read_stream" ManagementActionAcknowledgeSurfaceStream ManagementAction = "surface.acknowledge_stream" ManagementActionCancelSurfaceOperation ManagementAction = "surface.cancel_operation" ManagementActionRejectSurfaceConfirmation ManagementAction = "surface.reject_confirmation" ManagementActionDisposeSurface ManagementAction = "surface.dispose" ManagementActionRevokeSessionScope ManagementAction = "session.revoke_scope" ManagementActionFinalizeSessionScope ManagementAction = "session.finalize_scope" ManagementActionCallPluginMethod ManagementAction = "plugin.call_method" ManagementActionPrepareMethodConfirmation ManagementAction = "plugin.prepare_method_confirmation" ManagementActionListIntents ManagementAction = "intent.list" ManagementActionInvokeIntent ManagementAction = "intent.invoke" ManagementActionImportLocalPackage ManagementAction = "plugin.import_local_package" ManagementActionInstallReleaseRef ManagementAction = "plugin.install_release_ref" ManagementActionInspectExternalPackage ManagementAction = "plugin.inspect_external_package" ManagementActionCommitExternalPackage ManagementAction = "plugin.commit_external_package" ManagementActionQueryExternalPackageCommit ManagementAction = "plugin.query_external_package_commit" ManagementActionUpdateLocalPackage ManagementAction = "plugin.update_local_package" ManagementActionUpdateReleaseRef ManagementAction = "plugin.update_release_ref" ManagementActionDowngradePlugin ManagementAction = "plugin.downgrade" ManagementActionListPlugins ManagementAction = "plugin.list" ManagementActionListFeatures ManagementAction = "platform.list_features" ManagementActionGetCompatibility ManagementAction = "platform.get_compatibility" ManagementActionRefreshEnabledPlugins ManagementAction = "runtime.refresh_enabled" ManagementActionGrantPermission ManagementAction = "permission.grant" ManagementActionRevokePermission ManagementAction = "permission.revoke" ManagementActionListPermissionGrants ManagementAction = "permission.list" ManagementActionPutSecurityPolicy ManagementAction = "security_policy.put" ManagementActionGetSecurityPolicy ManagementAction = "security_policy.get" ManagementActionListSecurityPolicies ManagementAction = "security_policy.list" ManagementActionDeleteSecurityPolicy ManagementAction = "security_policy.delete" ManagementActionListDiagnosticEvents ManagementAction = "diagnostic.list" ManagementActionListOperations ManagementAction = "operation.list" ManagementActionGetOperation ManagementAction = "operation.get" ManagementActionCancelOperation ManagementAction = "operation.cancel" ManagementActionStartRuntime ManagementAction = "runtime.start" ManagementActionStopRuntime ManagementAction = "runtime.stop" ManagementActionGetRuntimeHealth ManagementAction = "runtime.get_health" ManagementActionMintConnectionGrant ManagementAction = "connectivity.mint_grant" ManagementActionMintNetworkHandleGrant ManagementAction = "connectivity.mint_handle_grant" ManagementActionMintStorageHandleGrant ManagementAction = "storage.mint_handle_grant" ManagementActionEnablePlugin ManagementAction = "plugin.enable" ManagementActionDisablePlugin ManagementAction = "plugin.disable" ManagementActionUninstallPlugin ManagementAction = "plugin.uninstall" ManagementActionListRetainedData ManagementAction = "retained_data.list" ManagementActionDeleteRetainedData ManagementAction = "retained_data.delete" ManagementActionBindRetainedData ManagementAction = "retained_data.bind" ManagementActionCleanupExpiredRetainedData ManagementAction = "retained_data.cleanup_expired" ManagementActionExportPluginData ManagementAction = "data.export" ManagementActionDeleteExportedPluginData ManagementAction = "data.delete_export" ManagementActionImportPluginData ManagementAction = "data.import" ManagementActionGetSettingsSchema ManagementAction = "settings.get_schema" ManagementActionGetPluginSettings ManagementAction = "settings.get" ManagementActionPatchPluginSettings ManagementAction = "settings.patch" ManagementActionBindSecretRef ManagementAction = "secret.bind" ManagementActionTestSecretRef ManagementAction = "secret.test" ManagementActionDeleteSecretRef ManagementAction = "secret.delete" )
func (ManagementAction) Resource ¶ added in v0.5.0
func (action ManagementAction) Resource() ResourceRef
func (ManagementAction) Valid ¶ added in v0.5.0
func (action ManagementAction) Valid() bool
type ManagementRevisionMismatchError ¶ added in v0.5.0
type ManagementRevisionMismatchError struct {
PluginInstanceID string `json:"plugin_instance_id"`
Expected uint64 `json:"expected_management_revision"`
Actual uint64 `json:"actual_management_revision"`
}
func (*ManagementRevisionMismatchError) Error ¶ added in v0.5.0
func (e *ManagementRevisionMismatchError) Error() string
func (*ManagementRevisionMismatchError) Unwrap ¶ added in v0.5.0
func (e *ManagementRevisionMismatchError) Unwrap() error
type MintBridgeTokenRequest ¶
type MintBridgeTokenRequest struct {
Handshake bridge.Handshake `json:"handshake"`
BridgeChannelID string `json:"bridge_channel_id"`
HandshakeTranscriptSHA256 string `json:"handshake_transcript_sha256"`
PreviousGatewayToken string `json:"previous_plugin_gateway_token,omitempty"`
Now time.Time `json:"-"`
}
type MintConnectionGrantRequest ¶
type MintConnectionGrantRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
ConnectorID string `json:"connector_id"`
Transport connectivity.Transport `json:"transport"`
Destination string `json:"destination"`
RuntimeInstanceID string `json:"runtime_instance_id,omitempty"`
RuntimeGenerationID string `json:"runtime_generation_id,omitempty"`
RuntimeShardID string `json:"runtime_shard_id,omitempty"`
Now time.Time `json:"-"`
TTL time.Duration `json:"-"`
}
type MintStorageHandleGrantRequest ¶
type MintStorageHandleGrantRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
StoreID string `json:"store_id"`
RuntimeInstanceID string `json:"runtime_instance_id,omitempty"`
RuntimeGenerationID string `json:"runtime_generation_id"`
RuntimeShardID string `json:"runtime_shard_id,omitempty"`
Now time.Time `json:"-"`
TTL time.Duration `json:"-"`
}
type MutationOutcome ¶ added in v0.6.0
type NetworkHandleGrantResult ¶
type NetworkHandleGrantResult struct {
ConnectionGrant connectivity.ConnectionGrant `json:"connection_grant"`
HandleGrant bridge.HandleGrantResult `json:"handle_grant"`
}
type OpenSurfaceRequest ¶
type PackageDistribution ¶
type PackageDistribution string
const ( PackageDistributionRegistryRef PackageDistribution = "registry_ref" PackageDistributionHostArtifactRef PackageDistribution = "host_artifact_ref" PackageDistributionLocalImport PackageDistribution = "local_import" )
type PackageDistributionRef ¶
type PackageDistributionRef struct {
Distribution PackageDistribution `json:"distribution"`
ArtifactRef string `json:"artifact_ref,omitempty"`
ImportID string `json:"import_id,omitempty"`
}
type PackageHashSet ¶
type PackageReleaseSignature ¶
type PackageTrustAction ¶
type PackageTrustAction string
const ( PackageTrustActionInstall PackageTrustAction = "install" PackageTrustActionUpdate PackageTrustAction = "update" )
type PackageTrustVerificationRequest ¶
type PackageTrustVerificationRequest struct {
Action PackageTrustAction `json:"action"`
Package pluginpkg.Package `json:"package"`
LocalImport bool `json:"local_import,omitempty"`
ReleaseRef *PluginReleaseRef `json:"release_ref,omitempty"`
Release *PluginPackageRelease `json:"release,omitempty"`
CurrentRecord *registry.PluginRecord `json:"current_record,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
Now time.Time `json:"-"`
}
type PackageTrustVerificationResult ¶
type PackageTrustVerificationResult = registry.TrustAssessment
type PackageTrustVerifier ¶
type PackageTrustVerifier interface {
VerifyPackageTrust(ctx context.Context, req PackageTrustVerificationRequest) (PackageTrustVerificationResult, error)
}
PackageTrustVerifier is the install/update trust decision boundary. Runnable trust states must come from this verifier or the release/local import provenance handled by Host core.
type PatchSettingsRequest ¶
type PermissionMutationResult ¶ added in v0.5.0
type PermissionMutationResult struct {
Permission permissions.Record `json:"permission"`
Revisions registry.AuthorizationRevisions `json:"revisions"`
}
type PluginData ¶ added in v0.5.0
type PluginData interface {
plugindata.Store
storage.FilesBroker
storage.KVBroker
storage.SQLiteBroker
storage.Inspector
Close() error
}
type PluginPackageRelease ¶
type PluginPackageRelease struct {
SourceID string `json:"source_id"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
Version string `json:"version"`
DistributionRef PackageDistributionRef `json:"distribution_ref"`
ReleaseMetadataSHA256 string `json:"release_metadata_sha256"`
ReleaseMetadataSignature *ReleaseMetadataSignature `json:"release_metadata_signature,omitempty"`
Hashes PackageHashSet `json:"hashes"`
PackageSignature *PackageReleaseSignature `json:"package_signature,omitempty"`
Compatibility *ReleaseCompatibility `json:"compatibility,omitempty"`
HostRequirements []HostRequirement `json:"host_requirements,omitempty"`
ReleaseEvidence *ReleaseEvidence `json:"release_evidence,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type PluginReleaseRef ¶
type PluginReleaseRef struct {
SourceID string `json:"source_id"`
Channel string `json:"channel"`
ReleaseMetadataRef string `json:"release_metadata_ref"`
ReleaseMetadataSHA256 string `json:"release_metadata_sha256"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
Version string `json:"version"`
ExpectedHashes PackageHashSet `json:"expected_hashes"`
}
type PolicyAdapter ¶
type PolicyAdapter interface {
EvaluateLocalPolicy(ctx context.Context, session sessionctx.Context, plugin PluginRef, method manifest.MethodSpec) (PolicyDecision, error)
DeveloperModeEnabled(ctx context.Context, session sessionctx.Context) (bool, error)
LocalGeneratedPluginsEnabled(ctx context.Context, session sessionctx.Context) (bool, error)
}
type PolicyDecision ¶
type PolicyDecision string
const ( PolicyAllow PolicyDecision = "allow" PolicyDeny PolicyDecision = "deny" )
type PrepareMethodConfirmationRequest ¶ added in v0.5.0
type PrepareMethodConfirmationRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
SurfaceInstanceID string `json:"surface_instance_id"`
BridgeChannelID string `json:"bridge_channel_id"`
GatewayToken string `json:"plugin_gateway_token"`
Method string `json:"method"`
Params map[string]any `json:"params,omitempty"`
Now time.Time `json:"-"`
}
type PrepareMethodConfirmationResult ¶ added in v0.5.0
type PrepareMethodConfirmationResult struct {
ConfirmationID string `json:"confirmation_id"`
ConfirmationTokenID string `json:"confirmation_token_id"`
RequestHash string `json:"request_hash"`
PlanHash string `json:"plan_hash"`
Plan any `json:"plan,omitempty"`
ExpiresAt time.Time `json:"expires_at"`
}
type PrepareSessionScopeCloseRequest ¶ added in v0.6.0
type PrepareSessionScopeCloseRequest struct {
Session sessionctx.Context `json:"-"`
}
type PrepareSurfaceRequest ¶ added in v0.5.0
type PrepareSurfaceResult ¶
type PrepareSurfaceResult struct {
bridge.AssetSessionResult
Document pluginpkg.OpaqueSurfaceDocument `json:"document"`
}
type PutSecurityPolicyRequest ¶
type PutSecurityPolicyRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
ExpectedPolicyRevision uint64 `json:"expected_policy_revision"`
ExpectedManagementRevision uint64 `json:"expected_management_revision"`
ExpectedRevokeEpoch uint64 `json:"expected_revoke_epoch"`
AllowedPermissions []string `json:"allowed_permissions,omitempty"`
DeniedMethods []string `json:"denied_methods,omitempty"`
Now time.Time `json:"-"`
}
type QueryExternalPackageCommitRequest ¶ added in v0.6.8
type ReadStreamRequest ¶
type ReadStreamRequest struct {
StreamID string `json:"stream_id"`
StreamTicket string `json:"stream_ticket,omitempty"`
ReadID string `json:"read_id"`
SurfaceInstanceID string `json:"surface_instance_id,omitempty"`
MaxEvents int `json:"max_events,omitempty"`
MaxBytes int64 `json:"max_bytes,omitempty"`
WaitTimeout time.Duration `json:"-"`
Now time.Time `json:"-"`
}
type ReadStreamResult ¶
type ReadSurfaceAssetRequest ¶
type ReadSurfaceAssetResult ¶
type ReadSurfaceAssetResult struct {
Entry pluginpkg.Entry
Content []byte
Session bridge.SurfaceSession
}
type ReconcileRetainedSessionScopesRequest ¶ added in v0.6.0
type ReconcileRetainedSessionScopesRequest struct {
Scopes []sessionscope.RetainedScope `json:"-"`
}
type RefreshEnabledPluginPublicError ¶ added in v0.5.0
type RefreshEnabledPluginResult ¶ added in v0.5.0
type RefreshEnabledPluginResult struct {
PluginInstanceID string `json:"plugin_instance_id"`
Status RefreshEnabledPluginStatus `json:"status"`
Error *RefreshEnabledPluginPublicError `json:"error,omitempty"`
}
func (RefreshEnabledPluginResult) MarshalJSON ¶ added in v0.5.0
func (result RefreshEnabledPluginResult) MarshalJSON() ([]byte, error)
type RefreshEnabledPluginStatus ¶ added in v0.5.0
type RefreshEnabledPluginStatus string
const ( RefreshEnabledPluginStatusRefreshed RefreshEnabledPluginStatus = "refreshed" RefreshEnabledPluginStatusFailed RefreshEnabledPluginStatus = "failed" )
type RejectMethodConfirmationRequest ¶ added in v0.3.0
type RejectMethodConfirmationRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
SurfaceInstanceID string `json:"surface_instance_id"`
BridgeChannelID string `json:"bridge_channel_id"`
GatewayToken string `json:"plugin_gateway_token"`
ConfirmationID string `json:"confirmation_id"`
Now time.Time `json:"-"`
}
type RejectMethodConfirmationResult ¶ added in v0.3.0
type RejectMethodConfirmationResult struct {
Rejected bool `json:"rejected"`
}
type ReleaseArtifactResolveRequest ¶
type ReleaseArtifactResolveRequest struct {
Action PackageTrustAction `json:"action"`
ReleaseRef PluginReleaseRef `json:"release_ref"`
SourcePolicy releasecontract.SourcePolicyV2 `json:"source_policy"`
CurrentRecord *registry.PluginRecord `json:"current_record,omitempty"`
PluginInstanceID string `json:"plugin_instance_id,omitempty"`
Now time.Time `json:"-"`
}
type ReleaseArtifactResolver ¶
type ReleaseArtifactResolver interface {
ResolveReleaseArtifact(ctx context.Context, req ReleaseArtifactResolveRequest) (ResolvedPackageArtifact, error)
}
type ReleaseCompatibility ¶
type ReleaseCompatibility struct {
MinReDevPluginVersion string `json:"min_redevplugin_version,omitempty"`
MinRuntimeVersion string `json:"min_runtime_version,omitempty"`
UIProtocolVersion string `json:"ui_protocol_version,omitempty"`
SupportedTargets []runtimetarget.Target `json:"supported_targets,omitempty"`
}
type ReleaseEvidence ¶
type ReleaseModule ¶ added in v0.5.0
type ReleaseModule struct {
Trust *releasetrust.ServiceSet
ReleaseArtifactResolver ReleaseArtifactResolver
HostRequirements HostRequirementPolicy
CapabilityContractArtifacts CapabilityContractArtifactResolver
}
type ResolvedCapabilityContractArtifact ¶ added in v0.3.0
type ResolvedCapabilityContractArtifact struct {
Artifacts CapabilityContractArtifactSet `json:"-"`
}
type ResolvedCapabilityContractFile ¶ added in v0.3.0
type ResolvedCapabilityContractFile struct {
Reader io.ReadCloser `json:"-"`
Size int64 `json:"size"`
MediaType string `json:"media_type"`
FetchChain []CapabilityArtifactFetchHop `json:"fetch_chain"`
}
type ResolvedPackageArtifact ¶
type ResourceRef ¶ added in v0.5.0
type ResourceRef string
ResourceRef identifies one closed host-neutral resource family.
const ( ResourcePlugin ResourceRef = "plugin" ResourcePlatform ResourceRef = "platform" ResourceSurface ResourceRef = "surface" ResourceSurfaceDefinition ResourceRef = "surface_definition" ResourceSurfaceAsset ResourceRef = "surface_asset" ResourceAssetSession ResourceRef = "asset_session" ResourceBridgeChannel ResourceRef = "bridge_channel" ResourceStream ResourceRef = "stream" ResourceConfirmation ResourceRef = "confirmation" ResourceMethod ResourceRef = "method" ResourceIntent ResourceRef = "intent" ResourcePermission ResourceRef = "permission" ResourceSecurityPolicy ResourceRef = "security_policy" ResourceDiagnostic ResourceRef = "diagnostic" ResourceOperation ResourceRef = "operation" ResourceRuntime ResourceRef = "runtime" ResourceConnector ResourceRef = "connector" ResourceStore ResourceRef = "store" ResourceRetainedData ResourceRef = "retained_data" ResourcePluginData ResourceRef = "plugin_data" ResourceDataExport ResourceRef = "data_export" ResourceSettings ResourceRef = "settings" ResourceSecret ResourceRef = "secret" ResourceSessionScope ResourceRef = "session_scope" )
func (ResourceRef) Valid ¶ added in v0.5.0
func (resource ResourceRef) Valid() bool
type RetainedDataCleanupResult ¶
type RetainedDataCleanupResult struct {
Deleted []plugindata.Binding `json:"deleted,omitempty"`
}
type RevokePermissionRequest ¶
type RevokePermissionRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
PermissionID string `json:"permission_id"`
ExpectedPolicyRevision uint64 `json:"expected_policy_revision"`
ExpectedManagementRevision uint64 `json:"expected_management_revision"`
ExpectedRevokeEpoch uint64 `json:"expected_revoke_epoch"`
Reason string `json:"reason,omitempty"`
Now time.Time `json:"-"`
}
type RevokeSessionScopeRequest ¶ added in v0.6.0
type RevokeSessionScopeRequest struct {
Identity sessionscope.TeardownIdentity `json:"-"`
Now time.Time `json:"-"`
}
type RevokeSessionScopeResult ¶ added in v0.6.0
type RevokeSessionScopeResult struct {
State sessionscope.State `json:"state"`
Fenced bool `json:"fenced"`
Complete bool `json:"complete"`
Counts sessionscope.Counts `json:"counts"`
}
type RuntimeAdmissionTarget ¶ added in v0.6.0
type RuntimeAdmissionTarget struct {
// contains filtered or unexported fields
}
RuntimeAdmissionTarget is the closed runtime target set supported by the fd-backed v0.6 runtime admission path.
func ParseRuntimeAdmissionTarget ¶ added in v0.6.0
func ParseRuntimeAdmissionTarget(value string) (RuntimeAdmissionTarget, error)
func (RuntimeAdmissionTarget) String ¶ added in v0.6.0
func (target RuntimeAdmissionTarget) String() string
type RuntimeBinaryName ¶ added in v0.6.0
type RuntimeBinaryName struct {
// contains filtered or unexported fields
}
RuntimeBinaryName is the closed executable basename accepted by v0.6.
func NewRuntimeBinaryName ¶ added in v0.6.0
func NewRuntimeBinaryName(value string) (RuntimeBinaryName, error)
func (RuntimeBinaryName) String ¶ added in v0.6.0
func (name RuntimeBinaryName) String() string
type RuntimeDescriptor ¶ added in v0.6.0
type RuntimeDescriptor struct {
// contains filtered or unexported fields
}
RuntimeDescriptor is immutable and intentionally does not implement json.Marshaler or json.Unmarshaler. Wire boundaries use the explicit mapper below so domain values cannot silently accept alternate JSON shapes.
func NewRuntimeDescriptor ¶ added in v0.6.0
func NewRuntimeDescriptor(options RuntimeDescriptorOptions) (RuntimeDescriptor, error)
func UnmarshalRuntimeDescriptorJSON ¶ added in v0.6.0
func UnmarshalRuntimeDescriptorJSON(raw []byte) (RuntimeDescriptor, error)
func (RuntimeDescriptor) BinarySHA256 ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) BinarySHA256() SHA256Digest
func (RuntimeDescriptor) CompatibleWithPlatform ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) CompatibleWithPlatform() error
func (RuntimeDescriptor) ContractSetSHA256 ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) ContractSetSHA256() SHA256Digest
func (RuntimeDescriptor) PlatformVersion ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) PlatformVersion() platformversion.SemVer
func (RuntimeDescriptor) RustIPCVersion ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) RustIPCVersion() RustIPCVersion
func (RuntimeDescriptor) Target ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) Target() RuntimeAdmissionTarget
func (RuntimeDescriptor) WASMABIVersion ¶ added in v0.6.0
func (descriptor RuntimeDescriptor) WASMABIVersion() WASMABIVersion
type RuntimeDescriptorOptions ¶ added in v0.6.0
type RuntimeDescriptorOptions struct {
PlatformVersion platformversion.SemVer
Target RuntimeAdmissionTarget
RustIPCVersion RustIPCVersion
WASMABIVersion WASMABIVersion
ContractSetSHA256 SHA256Digest
BinarySHA256 SHA256Digest
}
RuntimeDescriptorOptions is the only constructor input for the public v2 runtime identity.
type RuntimeHealth ¶ added in v0.6.0
type RuntimeHealth struct {
Ready bool `json:"ready"`
Descriptor RuntimeDescriptor `json:"descriptor"`
Shards []RuntimeShardHealth `json:"shards"`
}
RuntimeHealth is the Host-owned public runtime health response.
type RuntimeLimits ¶ added in v0.6.0
type RuntimeLimits = runtimeclient.RuntimeLimits
type RuntimeModule ¶ added in v0.5.0
type RuntimeModule struct {
// contains filtered or unexported fields
}
func NewRuntimeModule ¶ added in v0.6.0
func NewRuntimeModule(executable *VerifiedExecutable, options RuntimeModuleOptions) (*RuntimeModule, error)
func (*RuntimeModule) Close ¶ added in v0.6.0
func (module *RuntimeModule) Close(ctx context.Context) (RuntimeModuleCloseResult, error)
func (*RuntimeModule) Descriptor ¶ added in v0.6.0
func (module *RuntimeModule) Descriptor() RuntimeDescriptor
type RuntimeModuleCacheMetrics ¶ added in v0.6.0
type RuntimeModuleCacheMetrics struct {
Hits uint64 `json:"hits"`
Misses uint64 `json:"misses"`
Compiles uint64 `json:"compiles"`
Entries int `json:"entries"`
SourceBytes int64 `json:"source_bytes"`
}
RuntimeModuleCacheMetrics reports the bounded runtime module cache state.
type RuntimeModuleCloseResult ¶ added in v0.6.0
type RuntimeModuleCloseResult struct {
Disposition RuntimeModuleDisposition
Outcome MutationOutcome
}
type RuntimeModuleDisposition ¶ added in v0.6.0
type RuntimeModuleDisposition string
const ( RuntimeModuleCallerOwned RuntimeModuleDisposition = "caller_owned" RuntimeModuleAlreadyClosed RuntimeModuleDisposition = "already_closed" RuntimeModuleConsumedAndClosed RuntimeModuleDisposition = "consumed_and_closed" )
type RuntimeModuleOptions ¶ added in v0.6.0
type RuntimeModuleOptions struct {
Limits RuntimeLimits
StartupTimeout time.Duration
ShutdownTimeout time.Duration
}
type RuntimeProcessHealth ¶ added in v0.6.0
type RuntimeProcessHealth struct {
RuntimeInstanceID string `json:"runtime_instance_id"`
RuntimeGenerationID string `json:"runtime_generation_id"`
IPCChannelID string `json:"ipc_channel_id,omitempty"`
ConnectionNonce string `json:"connection_nonce,omitempty"`
Descriptor RuntimeDescriptor `json:"descriptor"`
Ready bool `json:"ready"`
ActiveInvocations int `json:"active_invocations"`
QueuedInvocations int `json:"queued_invocations"`
Limits RuntimeLimits `json:"limits"`
ModuleCache RuntimeModuleCacheMetrics `json:"module_cache"`
}
RuntimeProcessHealth is the observable state of one admitted runtime process.
type RuntimeShardHealth ¶ added in v0.6.0
type RuntimeShardHealth struct {
RuntimeShardID string `json:"runtime_shard_id"`
RuntimeProcessHealth
}
RuntimeShardHealth identifies one process within the Host-owned runtime module.
type RustIPCVersion ¶ added in v0.6.0
type RustIPCVersion struct {
// contains filtered or unexported fields
}
RustIPCVersion and WASMABIVersion are generated-version-bound newtypes. A host cannot construct an unconstrained protocol string.
func ParseRustIPCVersion ¶ added in v0.6.0
func ParseRustIPCVersion(value string) (RustIPCVersion, error)
func (RustIPCVersion) String ¶ added in v0.6.0
func (version RustIPCVersion) String() string
type SHA256Digest ¶ added in v0.6.0
type SHA256Digest struct {
// contains filtered or unexported fields
}
SHA256Digest is a validated lowercase SHA-256 digest without an algorithm prefix. Its zero value is invalid.
func ParseSHA256Digest ¶ added in v0.6.0
func ParseSHA256Digest(value string) (SHA256Digest, error)
func (SHA256Digest) String ¶ added in v0.6.0
func (digest SHA256Digest) String() string
type SecretBindRequest ¶
type SecretBindRequest = secrets.BindRequest
type SecretDeleteRequest ¶
type SecretDeleteRequest = secrets.DeleteRequest
type SecretStoreAdapter ¶
type SecretTestRequest ¶
type SecretTestRequest = secrets.TestRequest
type SecretsModule ¶ added in v0.5.0
type SecretsModule struct {
Store SecretStoreAdapter
}
type SecurityPolicyResult ¶ added in v0.5.0
type SecurityPolicyResult struct {
Policy security.PolicyRecord `json:"policy"`
Revisions registry.AuthorizationRevisions `json:"revisions"`
}
type SessionLifecycleAdapter ¶ added in v0.6.0
type SessionLifecycleAdapter interface {
ReconcileRetainedSessionScopes(context.Context, ReconcileRetainedSessionScopesRequest) error
PrepareSessionScopeClose(context.Context, PrepareSessionScopeCloseRequest) (sessionscope.TeardownIdentity, error)
CommitSessionScopeClose(context.Context, CommitSessionScopeCloseRequest) error
ValidateClosedSessionScope(context.Context, ValidateClosedSessionScopeRequest) error
}
SessionLifecycleAdapter owns durable closed-session identities. Startup reconciliation must verify that every retained platform fence still has its exact host-side closed-session record. Prepare and Commit are idempotent for one exact SessionScope: repeated Prepare calls return the same identity, and repeated Commit calls preserve the same irreversibly closed session. The identity never crosses HTTP, plugin IPC, or runtime payloads.
type SettingsResult ¶
type SettingsResult struct {
PluginInstanceID string `json:"plugin_instance_id"`
Scope sessionctx.ScopeKind `json:"scope"`
SchemaVersion int `json:"schema_version"`
ValuesRevision uint64 `json:"values_revision"`
Values map[string]any `json:"values"`
SecretMetadata []SettingsSecretMetadata `json:"secret_metadata"`
}
type SettingsSchemaResult ¶
type SettingsSchemaResult struct {
PluginInstanceID string `json:"plugin_instance_id"`
Scope sessionctx.ScopeKind `json:"scope"`
SchemaVersion int `json:"schema_version"`
Fields []manifest.SettingFieldSpec `json:"fields"`
ValuesRevision uint64 `json:"values_revision"`
}
type SettingsSecretMetadata ¶ added in v0.5.0
type SettingsSecretMetadata struct {
Key string `json:"key"`
SecretRef string `json:"secret_ref"`
Scope string `json:"scope"`
Bound bool `json:"bound"`
LastTestStatus string `json:"last_test_status,omitempty"`
BoundAt *time.Time `json:"bound_at,omitempty"`
TestedAt *time.Time `json:"tested_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
type StartRuntimeRequest ¶
type StartRuntimeRequest struct {
Target runtimetarget.Target `json:"-"`
}
type StorageHandleGrantResult ¶
type StorageHandleGrantResult struct {
Namespace storage.Namespace `json:"namespace"`
HandleGrant bridge.HandleGrantResult `json:"handle_grant"`
}
type SurfaceCatalogSink ¶
type SurfaceCatalogSink interface {
PublishSurfaces(ctx context.Context, snapshot SurfaceSnapshot) error
}
type SurfaceSnapshot ¶
type SurfaceSnapshot struct {
PluginInstanceID string `json:"plugin_instance_id"`
ActiveFingerprint string `json:"active_fingerprint"`
Surfaces []manifest.SurfaceSpec `json:"surfaces"`
}
type UninstallRequest ¶
type UpdateReleaseRefRequest ¶
type UpdateReleaseRefRequest struct {
PluginInstanceID string `json:"plugin_instance_id"`
ExpectedManagementRevision uint64 `json:"expected_management_revision"`
ReleaseRef PluginReleaseRef `json:"release_ref"`
Now time.Time `json:"-"`
}
type ValidateClosedSessionScopeRequest ¶ added in v0.6.0
type ValidateClosedSessionScopeRequest struct {
Session sessionctx.Context `json:"-"`
Identity sessionscope.TeardownIdentity `json:"-"`
}
type VerifiedExecutable ¶ added in v0.6.0
type VerifiedExecutable struct {
// contains filtered or unexported fields
}
VerifiedExecutable is an owned, sealed runtime executable capability. The underlying file descriptors are never exposed to callers.
func OpenVerifiedExecutable ¶ added in v0.6.0
func OpenVerifiedExecutable(ctx context.Context, options VerifiedExecutableOptions) (*VerifiedExecutable, error)
func (*VerifiedExecutable) Close ¶ added in v0.6.0
func (executable *VerifiedExecutable) Close() (MutationOutcome, error)
func (*VerifiedExecutable) Descriptor ¶ added in v0.6.0
func (executable *VerifiedExecutable) Descriptor() RuntimeDescriptor
type VerifiedExecutableOptions ¶ added in v0.6.0
type VerifiedExecutableOptions struct {
RootDir *os.File
ExecutionRoot *os.File
RelativeName RuntimeBinaryName
ExpectedDescriptor RuntimeDescriptor
}
type WASMABIVersion ¶ added in v0.6.0
type WASMABIVersion struct {
// contains filtered or unexported fields
}
func ParseWASMABIVersion ¶ added in v0.6.0
func ParseWASMABIVersion(value string) (WASMABIVersion, error)
func (WASMABIVersion) String ¶ added in v0.6.0
func (version WASMABIVersion) String() string
type WorkerErrorOrigin ¶ added in v0.6.0
type WorkerErrorOrigin = runtimeclient.WorkerErrorOrigin
type WorkerExecutionError ¶ added in v0.6.0
type WorkerExecutionError = runtimeclient.WorkerExecutionError
func AsValidatedWorkerExecutionError ¶ added in v0.5.0
func AsValidatedWorkerExecutionError(err error) (WorkerExecutionError, bool)
AsValidatedWorkerExecutionError returns a copy of a worker failure attested by Host.
Source Files
¶
- authorization.go
- capability_business_error.go
- capability_execution.go
- external_package.go
- external_package_projection.go
- host.go
- method_schema_cache.go
- plugin_lifecycle_lock.go
- release_trust.go
- runtime_exec_journal.go
- runtime_exec_journal_linux.go
- runtime_executable.go
- runtime_executable_linux.go
- runtime_health.go
- runtime_identity.go
- runtime_module.go
- security_audit.go
- stream_read.go
- surface_cache.go