host

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 55 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginRecoveryReady  = "ready"
	PluginRecoveryFailed = "failed"
)
View Source
const (
	MutationOutcomeCommitted    = mutation.OutcomeCommitted
	MutationOutcomeNotCommitted = mutation.OutcomeNotCommitted
	MutationOutcomeUnknown      = mutation.OutcomeUnknown
)
View Source
const (
	WorkerErrorOriginRuntime  = runtimeclient.WorkerErrorOriginRuntime
	WorkerErrorOriginHostcall = runtimeclient.WorkerErrorOriginHostcall
	WorkerErrorOriginPlugin   = runtimeclient.WorkerErrorOriginPlugin
)
View Source
const (
	DefaultRuntimeStartupTimeout  = 10 * time.Second
	DefaultRuntimeShutdownTimeout = 5 * time.Second
	MinimumRuntimeTimeout         = 100 * time.Millisecond
	MaximumRuntimeTimeout         = 2 * time.Minute
)

Variables

View Source
var (
	ErrExternalPackageInspectionNotFound = errors.New("external package inspection not found")
	ErrExternalPackageInspectionExpired  = errors.New("external package inspection expired")
	ErrExternalPackageConfirmation       = errors.New("external package hash does not match inspection")
	ErrExternalPackageInstallBlocked     = errors.New("external package install is blocked by integrity assessment")
	ErrExternalPackageInstallInProgress  = errors.New("external package install is in progress")
	ErrExternalPackageInspectionStale    = errors.New("external package signature assessment changed after inspection")
	ErrExternalPackageRequestInvalid     = errors.New("external package request is invalid")
)
View Source
var (
	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")
	ErrExecutionDeleteBlocked        = errors.New("execution blocks data deletion")
	ErrPluginRecoveryNotEnabled      = errors.New("plugin runtime recovery requires an enabled plugin")
	ErrExecutionCancelDispatchFailed = errors.New("execution 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")
	ErrPluginTrustUnavailable        = errors.New("plugin trust is unavailable")
	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")
	ErrIOModuleRequired              = errors.New("I/O 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")
	ErrSessionMaintenanceState       = errors.New("session lifecycle maintenance state is invalid")
)
View Source
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")
)
View Source
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")
)
View Source
var (
	ErrRuntimeNotReady       = runtimeclient.ErrRuntimeNotReady
	ErrRuntimeIPCUnavailable = runtimeclient.ErrRuntimeIPCUnavailable
	ErrRuntimeRequestFailed  = runtimeclient.ErrRuntimeRequestFailed
	ErrRuntimeHandshake      = runtimeclient.ErrRuntimeHandshake
)
View Source
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")
)
View Source
var (
	RuntimeAdmissionLinuxAMD64 = RuntimeAdmissionTarget{/* contains filtered or unexported fields */}
	RuntimeAdmissionLinuxARM64 = RuntimeAdmissionTarget{/* contains filtered or unexported fields */}
)
View Source
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")
)
View Source
var ErrActionDenied = errors.New("host platform action is denied")
View Source
var ErrConfirmationRequired = errors.New("plugin method confirmation required")
View Source
var ErrControlStoreRequired = errors.New("Host control store is required")
View Source
var ErrMountUnavailable = errors.New("filesystem mount is unavailable")

ErrMountUnavailable tells ReDevPlugin that a valid mount class is not present in the authenticated Host session.

Functions

func AsValidatedCapabilityBusinessError

func AsValidatedCapabilityBusinessError(err error) (capability.BusinessError, bool)

AsValidatedCapabilityBusinessError returns a copy of a published business error attested by Host.

func HasUnattestedRPCStructuredError

func HasUnattestedRPCStructuredError(err error) bool

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 ImportLocalPackageBytes(ctx context.Context, h *Host, pluginInstanceID string, data []byte) (registry.PluginRecord, error)

func MarshalRuntimeDescriptorJSON

func MarshalRuntimeDescriptorJSON(descriptor RuntimeDescriptor) ([]byte, error)

Types

type ActionDeniedError

type ActionDeniedError struct {
	Action ManagementAction
	Target AuthorizationTarget
}

func (ActionDeniedError) Error

func (e ActionDeniedError) Error() string

func (ActionDeniedError) Unwrap

func (e ActionDeniedError) Unwrap() error

type AuditEvent

type AuditEvent = observability.AuditEvent

type AuditSink

type AuditSink = observability.AuditSink

type AuthorizationAdapter

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

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

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"`
	ExecutionID          string `json:"execution_id,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 CapabilityModule

type CapabilityModule struct {
	Registry *capability.Registry
}

type CleanupExpiredRetainedDataRequest

type CleanupExpiredRetainedDataRequest struct {
	Now time.Time `json:"-"`
}

type CloseAuthenticatedSessionScopeRequest

type CloseAuthenticatedSessionScopeRequest struct {
	Session sessionctx.Context `json:"-"`
	Now     time.Time          `json:"-"`
}

CloseAuthenticatedSessionScopeRequest starts Host-owned teardown for one exact authenticated session.

type Config

type Config struct {
	// StateRoot is the Host-owned persistent control-plane root. When set, Open
	// creates, migrates, verifies, retains, and closes exactly one control DB at
	// StateRoot/control.sqlite.
	StateRoot       string
	Core            CoreAdapters
	Release         *ReleaseModule
	Runtime         *RuntimeModule
	Capability      *CapabilityModule
	IO              *IOModule
	Connectivity    *ConnectivityModule
	Secrets         *SecretsModule
	CoreAction      *CoreActionModule
	ExternalPackage *ExternalPackageModule
}

type ConnectivityModule

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

type CoreActionModule struct {
	Adapter CoreActionAdapter
}

type CoreAdapters

type CoreAdapters struct {
	Policy               PolicyAdapter
	Authorization        AuthorizationAdapter
	PackageTrustVerifier PackageTrustVerifier
	Audit                AuditSink
	SecurityAudit        observability.SecurityAuditJournal
	Diagnostics          DiagnosticsSink
	SurfaceCatalog       SurfaceCatalogSink
	Assets               pluginpkg.AssetStore
	// contains filtered or unexported fields
}

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

type DeleteExportDataRequest struct {
	PluginInstanceID string `json:"plugin_instance_id"`
	BundleRef        string `json:"bundle_ref"`
}

type DeleteRetainedDataRequest

type DeleteRetainedDataRequest struct {
	PluginInstanceID        string `json:"plugin_instance_id"`
	ExpectedBindingRevision uint64 `json:"expected_binding_revision"`
}

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

type DiagnosticDetails struct {
	ExecutionsDeleted         int64                                   `json:"executions_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"`
	ExecutionID               string                                  `json:"execution_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 DisableRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	Reason                     string    `json:"reason,omitempty"`
	Now                        time.Time `json:"-"`
}

type DisposeSurfaceRequest

type DisposeSurfaceRequest struct {
	SurfaceInstanceID string    `json:"surface_instance_id"`
	BridgeNonce       string    `json:"bridge_nonce"`
	Now               time.Time `json:"-"`
}

type DowngradeRequest

type DowngradeRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	Version                    string    `json:"version,omitempty"`
	PackageHash                string    `json:"package_hash,omitempty"`
	Now                        time.Time `json:"-"`
}

type EnableRequest

type EnableRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	Now                        time.Time `json:"-"`
}

type ExportDataRequest

type ExportDataRequest struct {
	PluginInstanceID string `json:"plugin_instance_id"`
}

type ExportDataResult

type ExportDataResult struct {
	BundleRef   string `json:"bundle_ref"`
	ContentHash string `json:"content_hash"`
	SizeBytes   int64  `json:"size_bytes"`
}

type ExternalPackageCancelSummary

type ExternalPackageCancelSummary struct {
	Cancelable        bool   `json:"cancelable"`
	DisableBehavior   string `json:"disable_behavior"`
	UninstallBehavior string `json:"uninstall_behavior"`
	AckTimeoutMS      int    `json:"ack_timeout_ms"`
}

type ExternalPackageCapabilityContractSummary

type ExternalPackageCapabilityContractSummary struct {
	BindingID         string `json:"binding_id"`
	CapabilityID      string `json:"capability_id"`
	CapabilityVersion string `json:"capability_version"`
	ContractSHA256    string `json:"contract_sha256"`
}

type ExternalPackageConfirmationSummary

type ExternalPackageConfirmationSummary struct {
	Mode              string   `json:"mode"`
	PreflightMethod   string   `json:"preflight_method,omitempty"`
	RequestHashFields []string `json:"request_hash_fields"`
	PlanHashRequired  bool     `json:"plan_hash_required"`
}

type ExternalPackageCoreActionSummary

type ExternalPackageCoreActionSummary struct {
	Method   string `json:"method"`
	ActionID string `json:"action_id"`
	Effect   string `json:"effect"`
}

type ExternalPackageExecutionApproval

type ExternalPackageExecutionApproval struct {
	State       string     `json:"state"`
	ReasonCodes []string   `json:"reason_codes"`
	AssessedAt  time.Time  `json:"assessed_at"`
	ApprovedAt  *time.Time `json:"approved_at,omitempty"`
}

type ExternalPackageInspection

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"`
	Presentation        manifest.PresentationCatalog       `json:"presentation"`
	PresentationSHA256  string                             `json:"presentation_sha256"`
	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"`
}

type ExternalPackageIntent

type ExternalPackageIntent struct {
	Action                     string `json:"action"`
	PluginInstanceID           string `json:"plugin_instance_id,omitempty"`
	ExpectedManagementRevision uint64 `json:"expected_management_revision,omitempty"`
}

type ExternalPackageIntentSummary

type ExternalPackageIntentSummary struct {
	IntentID string `json:"intent_id"`
	Method   string `json:"method"`
}

type ExternalPackageMethodRouteSummary

type ExternalPackageMethodRouteSummary struct {
	Kind         string `json:"kind"`
	BindingID    string `json:"binding_id,omitempty"`
	TargetMethod string `json:"target_method,omitempty"`
	WorkerID     string `json:"worker_id,omitempty"`
	ActionID     string `json:"action_id,omitempty"`
}

type ExternalPackageMethodSummary

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

type ExternalPackageModule struct {
	SignatureAssessor ExternalPackageSignatureAssessor
	AddressResolver   externalsource.AddressResolver
	Credentials       externalsource.CredentialProvider
	SourceID          string
	TotalTimeout      time.Duration
	GitHub            externalsource.GitHubRESTReleaseClientOptions
	// contains filtered or unexported fields
}

ExternalPackageModule configures the host-neutral public HTTPS and GitHub Release admission pipeline. Pending inspections are process-local and expire on Host restart; only installed plugin facts become durable.

type ExternalPackageNetworkMethodAccessSummary

type ExternalPackageNetworkMethodAccessSummary struct {
	Method      string   `json:"method"`
	Operations  []string `json:"operations"`
	HTTPMethods []string `json:"http_methods"`
}

type ExternalPackageNetworkSummary

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

type ExternalPackagePermissionSummary struct {
	PermissionID string   `json:"permission_id"`
	Methods      []string `json:"methods"`
}

type ExternalPackageRedirectHop

type ExternalPackageRedirectHop struct {
	Origin string `json:"origin"`
	Path   string `json:"path"`
}

type ExternalPackageSecretRefSummary

type ExternalPackageSecretRefSummary struct {
	SettingKey string `json:"setting_key"`
	SecretRef  string `json:"secret_ref"`
	Scope      string `json:"scope"`
}

type ExternalPackageSecuritySummary

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

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

type ExternalPackageSignatureAssessmentRequest struct {
	Package pluginpkg.Package `json:"package"`
	Now     time.Time         `json:"-"`
}

type ExternalPackageSignatureAssessor

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

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

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

type ExternalPackageSizeSummary struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type ExternalPackageSource

type ExternalPackageSource struct {
	Kind string `json:"kind"`
	URL  string `json:"url"`
	Tag  string `json:"tag,omitempty"`
}

type ExternalPackageSourceProvenance

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"`
}

func (ExternalPackageSourceProvenance) MarshalJSON

func (provenance ExternalPackageSourceProvenance) MarshalJSON() ([]byte, error)

type ExternalPackageStorageMethodAccessSummary

type ExternalPackageStorageMethodAccessSummary struct {
	Method     string   `json:"method"`
	Operations []string `json:"operations"`
}

type ExternalPackageStorageSummary

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

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

type ExternalPackageUpdateEligibility struct {
	State       string    `json:"state"`
	ReasonCodes []string  `json:"reason_codes"`
	AssessedAt  time.Time `json:"assessed_at"`
}

type ExternalPackageWorkerSummary

type ExternalPackageWorkerSummary struct {
	WorkerID         string `json:"worker_id"`
	Artifact         string `json:"artifact"`
	ABI              string `json:"abi"`
	Mode             string `json:"mode"`
	Scope            string `json:"scope"`
	MemoryLimitBytes int64  `json:"memory_limit_bytes"`
	IdleTimeoutMS    int    `json:"idle_timeout_ms"`
}

type Feature

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.

const (
	FeatureRelease         Feature = "release"
	FeatureRuntime         Feature = "runtime"
	FeatureCapability      Feature = "capability"
	FeatureIO              Feature = "io"
	FeatureConnectivity    Feature = "connectivity"
	FeatureSecrets         Feature = "secrets"
	FeatureCoreAction      Feature = "core_action"
	FeatureExternalPackage Feature = "external_package"
)

type FeatureNotConfiguredError

type FeatureNotConfiguredError struct {
	Features []Feature
}

FeatureNotConfiguredError identifies an optional module that was not installed in the host configuration.

func (FeatureNotConfiguredError) Error

func (FeatureNotConfiguredError) MissingFeatures

func (e FeatureNotConfiguredError) MissingFeatures() []Feature

func (FeatureNotConfiguredError) Unwrap

func (e FeatureNotConfiguredError) Unwrap() error

type FileSystemAdapter

type FileSystemAdapter interface {
	// ResolveMount returns ErrMountUnavailable when the requested mount does
	// not exist in the authenticated Host context.
	ResolveMount(context.Context, MountRequest) (Mount, error)
	ListMounts(context.Context, MountListRequest) ([]Mount, error)
}

type FinalizeClosedSessionScopeRequest

type FinalizeClosedSessionScopeRequest struct {
	Session  sessionctx.Context            `json:"-"`
	Identity sessionscope.TeardownIdentity `json:"-"`
}

FinalizeClosedSessionScopeRequest finalizes a complete exact teardown after the adapter independently validates durable terminal evidence.

type FinalizeSessionScopeRequest

type FinalizeSessionScopeRequest struct {
	Identity sessionscope.TeardownIdentity `json:"-"`
}

type GetPermissionRequirementsRequest

type GetPermissionRequirementsRequest struct {
	PluginInstanceID string `json:"plugin_instance_id"`
}

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 New

func New(config Config) (*Host, error)

func Open

func Open(ctx context.Context, config Config) (openedHost *Host, retErr error)

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) CancelExecution

func (h *Host) CancelExecution(ctx context.Context, id, reason string) (execution.Execution, error)

CancelExecution idempotently requests cancellation through the sole Execution state machine. reason is accepted for the command/audit boundary; it does not create a second durable status field.

func (*Host) Capabilities

func (h *Host) Capabilities() *capability.Registry

func (*Host) Close

func (h *Host) Close() error

func (*Host) CloseAuthenticatedSessionScope

CloseAuthenticatedSessionScope starts Host-owned teardown for one exact authenticated session scope. It is a Go maintenance API and never consults browser authorization state.

func (*Host) DeleteExportedPluginData

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) EventsAfter

func (h *Host) EventsAfter(ctx context.Context, id string, cursor uint64, limit int) ([]execution.Event, error)

EventsAfter returns the unified event envelope for one exact owner-bound execution and cursor.

func (*Host) ExportPluginData

func (h *Host) ExportPluginData(ctx context.Context, req ExportDataRequest) (result ExportDataResult, retErr error)

func (*Host) Features

func (h *Host) Features(ctx context.Context) ([]Feature, error)

Features returns the configured platform modules after host authorization.

func (*Host) FinalizeClosedSessionScope

func (h *Host) FinalizeClosedSessionScope(
	ctx context.Context,
	req FinalizeClosedSessionScopeRequest,
) (SessionScopeFinalizationResult, error)

FinalizeClosedSessionScope validates the Host-owned identity and deletes the complete platform fence as the finalization commit point.

func (*Host) FinalizeSessionScope

func (h *Host) FinalizeSessionScope(ctx context.Context, req FinalizeSessionScopeRequest) error

func (*Host) GetCompatibility

func (h *Host) GetCompatibility(ctx context.Context) (version.CompatibilityManifest, error)

GetCompatibility returns the current platform contract after host authorization.

func (*Host) GetExecution

func (h *Host) GetExecution(ctx context.Context, id string) (execution.Execution, error)

GetExecution returns one execution only when it belongs to the exact authenticated session owner. Cross-owner identities are indistinguishable from absent records.

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

func (h *Host) InspectExternalPackage(ctx context.Context, req InspectExternalPackageRequest) (result ExternalPackageInspection, retErr error)

func (*Host) InspectPluginData

func (h *Host) InspectPluginData(ctx context.Context, req InspectPluginDataRequest) (PluginDataInspection, error)

func (*Host) InspectReleasePackage

func (h *Host) InspectReleasePackage(ctx context.Context, req InspectReleasePackageRequest) (ReleasePackageInspection, error)

func (*Host) InstallInspectedPackage

func (h *Host) InstallInspectedPackage(ctx context.Context, req InstallInspectedPackageRequest) (result InstalledExternalPackage, retErr 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) ListExecutions

func (h *Host) ListExecutions(ctx context.Context, pluginInstanceID string, cursor uint64, limit int) ([]execution.Execution, uint64, error)

ListExecutions returns one owner-scoped page ordered by the control store's durable execution identity. A zero next cursor means the page is terminal.

func (*Host) ListIntents

func (h *Host) ListIntents(ctx context.Context, req ListIntentsRequest) ([]IntentRecord, error)

func (*Host) ListPermissionGrants

func (h *Host) ListPermissionGrants(ctx context.Context, req ListPermissionGrantsRequest) ([]permissions.Record, error)

func (*Host) ListPluginInventory

func (h *Host) ListPluginInventory(ctx context.Context) ([]PluginInventoryRecord, error)

func (*Host) ListPlugins

func (h *Host) ListPlugins(ctx context.Context) ([]registry.PluginRecord, error)

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) ReadPluginDataFile

func (h *Host) ReadPluginDataFile(ctx context.Context, req ReadPluginDataFileRequest) (storage.FileReadResult, error)

func (*Host) ReadPluginIcon

func (h *Host) ReadPluginIcon(ctx context.Context, req ReadPluginIconRequest) (ReadPluginIconResult, error)

ReadPluginIcon returns the content-addressed presentation icon from an installed package. Hosts may expose the verified bytes through their local authenticated asset transport without depending on a marketplace service.

func (*Host) ReadSurfaceAsset

func (h *Host) ReadSurfaceAsset(ctx context.Context, req ReadSurfaceAssetRequest) (ReadSurfaceAssetResult, error)

func (*Host) ReconcileSurfaceRevocation

func (h *Host) ReconcileSurfaceRevocation(ctx context.Context, req DisposeSurfaceRequest) (ReconcileSurfaceRevocationResult, error)

func (*Host) RecoverEnabled

func (h *Host) RecoverEnabled(ctx context.Context) (RecoverySnapshot, error)

RecoverEnabled reconciles enabled plugin runtime state once per Host startup revision. Repeated calls return the same immutable snapshot.

func (*Host) RejectMethodConfirmation

func (h *Host) RejectMethodConfirmation(ctx context.Context, req RejectMethodConfirmationRequest) (response RejectMethodConfirmationResult, resultErr error)

func (*Host) ReportHTTPAdapterFailure

func (h *Host) ReportHTTPAdapterFailure(ctx context.Context, operation string, code security.ErrorCode, err error)

func (*Host) ResumeClosedSessionScopeTeardown

func (h *Host) ResumeClosedSessionScopeTeardown(
	ctx context.Context,
	req ResumeClosedSessionScopeTeardownRequest,
) (SessionScopeTeardownMaintenanceResult, error)

ResumeClosedSessionScopeTeardown continues an exact prepared, draining, or incomplete teardown without consulting browser authorization state.

func (*Host) RetryPluginRecovery

func (h *Host) RetryPluginRecovery(ctx context.Context, pluginInstanceID string) (PluginRecoveryResult, error)

func (*Host) RevokePermission

func (h *Host) RevokePermission(ctx context.Context, req RevokePermissionRequest) (result PermissionMutationResult, retErr error)

func (*Host) RevokeSessionScope

func (h *Host) RevokeSessionScope(ctx context.Context, req RevokeSessionScopeRequest) (RevokeSessionScopeResult, error)

func (*Host) RuntimeHealth

func (h *Host) RuntimeHealth(ctx context.Context) (RuntimeHealth, error)

func (*Host) StartReleaseInstallExecution

func (h *Host) StartReleaseInstallExecution(ctx context.Context, req StartReleaseInstallExecutionRequest) (execution.Execution, error)

func (*Host) StartRuntime

func (h *Host) StartRuntime(ctx context.Context, req StartRuntimeRequest) (result RuntimeHealth, retErr error)

func (*Host) StopRuntime

func (h *Host) StopRuntime(ctx context.Context) (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)

func (*Host) WritePluginDataFile

func (h *Host) WritePluginDataFile(ctx context.Context, req WritePluginDataFileRequest) (storage.FileWriteResult, error)

type HostCapabilityRequirement

type HostCapabilityRequirement struct {
	CapabilityID      string `json:"capability_id"`
	CapabilityVersion string `json:"capability_version"`
}

type HostConfigError

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

func (e *HostConfigError) Error() string

func (*HostConfigError) Is

func (e *HostConfigError) Is(target error) bool

func (*HostConfigError) RuntimeModuleDisposition

func (e *HostConfigError) RuntimeModuleDisposition() RuntimeModuleDisposition

func (*HostConfigError) Unwrap

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

type HostRequirementPolicy interface {
	SelectHostRequirement(ctx context.Context, req HostRequirementSelectionRequest) (HostRequirementSelection, error)
}

type HostRequirementSelection

type HostRequirementSelection struct {
	HostID string `json:"host_id"`
}

type HostRequirementSelectionRequest

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 IOModule

type IOModule struct {
	FileSystem    FileSystemAdapter
	NetworkPolicy NetworkPolicyAdapter
}

IOModule supplies Host product placement and policy while ReDevPlugin owns resource handles, rooted filesystem operations, networking, and revocation.

type ImportDataRequest

type ImportDataRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	BundleRef                  string    `json:"bundle_ref"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	Now                        time.Time `json:"-"`
}

type ImportLocalPackageRequest

type ImportLocalPackageRequest struct {
	PackageReader    io.ReaderAt `json:"-"`
	PackageSize      int64       `json:"-"`
	PluginInstanceID string      `json:"plugin_instance_id"`
	Now              time.Time   `json:"-"`
}

type InspectExternalPackageRequest

type InspectExternalPackageRequest struct {
	Intent ExternalPackageIntent `json:"intent"`
	Source ExternalPackageSource `json:"source"`
	Now    time.Time             `json:"-"`
}

type InspectPluginDataRequest

type InspectPluginDataRequest struct {
	PluginInstanceID string `json:"plugin_instance_id,omitempty"`
}

type InspectReleasePackageRequest

type InspectReleasePackageRequest struct {
	PluginInstanceID string           `json:"plugin_instance_id"`
	ReleaseRef       PluginReleaseRef `json:"release_ref"`
	Now              time.Time        `json:"-"`
}

type InspectUploadedExternalPackageRequest

type InspectUploadedExternalPackageRequest struct {
	Intent       ExternalPackageIntent `json:"intent"`
	Package      io.Reader             `json:"-"`
	DeclaredSize int64                 `json:"-"`
	Now          time.Time             `json:"-"`
}

type InstallInspectedPackageRequest

type InstallInspectedPackageRequest struct {
	InspectionID          string    `json:"inspection_id"`
	ExpectedPackageSHA256 string    `json:"expected_package_sha256"`
	ActivateAfterInstall  *bool     `json:"activate_after_install,omitempty"`
	ApprovedPermissionIDs []string  `json:"approved_permission_ids,omitempty"`
	Now                   time.Time `json:"-"`
}

type InstallReleaseRefRequest

type InstallReleaseRefRequest struct {
	ReleaseRef       PluginReleaseRef `json:"release_ref"`
	PluginInstanceID string           `json:"plugin_instance_id"`
	Now              time.Time        `json:"-"`
}

type InstalledExternalPackage

type InstalledExternalPackage struct {
	Plugin              *registry.PluginRecord              `json:"plugin"`
	Activation          registry.ReleaseInstallActivation   `json:"activation"`
	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"`
}

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 InvokeIntentRequest struct {
	PluginInstanceID string         `json:"plugin_instance_id,omitempty"`
	IntentID         string         `json:"intent_id"`
	Params           map[string]any `json:"params,omitempty"`
	Now              time.Time      `json:"-"`
	// contains filtered or unexported fields
}

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 ListIntentsRequest struct {
	IntentID         string `json:"intent_id,omitempty"`
	PluginInstanceID string `json:"plugin_instance_id,omitempty"`
}

type ListPermissionGrantsRequest

type ListPermissionGrantsRequest struct {
	PluginInstanceID string `json:"plugin_instance_id,omitempty"`
	ActiveOnly       bool   `json:"active_only,omitempty"`
}

type ListRetainedDataRequest

type ListRetainedDataRequest struct {
	PluginInstanceID string `json:"plugin_instance_id,omitempty"`
}

type ManagementAction

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"
	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"
	ManagementActionInstallInspectedPackage    ManagementAction = "plugin.install_inspected_package"
	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"
	ManagementActionRecoverEnabledPlugins      ManagementAction = "runtime.recover_enabled"
	ManagementActionGrantPermission            ManagementAction = "permission.grant"
	ManagementActionRevokePermission           ManagementAction = "permission.revoke"
	ManagementActionListPermissionGrants       ManagementAction = "permission.list"
	ManagementActionGetPermissionRequirements  ManagementAction = "permission.requirements.get"
	ManagementActionPutSecurityPolicy          ManagementAction = "security_policy.put"
	ManagementActionGetSecurityPolicy          ManagementAction = "security_policy.get"
	ManagementActionListSecurityPolicies       ManagementAction = "security_policy.list"
	ManagementActionDeleteSecurityPolicy       ManagementAction = "security_policy.delete"
	ManagementActionListDiagnosticEvents       ManagementAction = "diagnostic.list"
	ManagementActionListExecutions             ManagementAction = "execution.list"
	ManagementActionGetExecution               ManagementAction = "execution.get"
	ManagementActionCancelExecution            ManagementAction = "execution.cancel"
	ManagementActionListExecutionEvents        ManagementAction = "execution.events"
	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"
	ManagementActionInspectPluginData          ManagementAction = "data.inspect"
	ManagementActionReadPluginDataFile         ManagementAction = "data.file.read"
	ManagementActionWritePluginDataFile        ManagementAction = "data.file.write"
	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

func (action ManagementAction) Resource() ResourceRef

func (ManagementAction) Valid

func (action ManagementAction) Valid() bool

type ManagementRevisionMismatchError

type ManagementRevisionMismatchError struct {
	PluginInstanceID string `json:"plugin_instance_id"`
	Expected         uint64 `json:"expected_management_revision"`
	Actual           uint64 `json:"actual_management_revision"`
}

func (*ManagementRevisionMismatchError) Error

func (*ManagementRevisionMismatchError) Unwrap

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 Mount

type Mount struct {
	ID       string `json:"id"`
	Path     string `json:"-"`
	ReadOnly bool   `json:"read_only"`
}

Mount is returned only across the Host adapter boundary. Path must never be serialized or projected to a plugin; ReDevPlugin opens it with os.OpenRoot.

type MountListRequest

type MountListRequest struct {
	Session sessionctx.Context
	Plugin  PluginRef
}

type MountRequest

type MountRequest struct {
	Session sessionctx.Context
	Plugin  PluginRef
	MountID string
}

MountRequest identifies one Host-owned filesystem mount for a trusted plugin invocation. Path resolution remains entirely inside the adapter.

type MutationOutcome

type MutationOutcome = mutation.Outcome

type NetworkAuthorizationRequest

type NetworkAuthorizationRequest struct {
	Session     sessionctx.Context
	Plugin      PluginRef
	Operation   string
	Destination NetworkDestination
	Listen      bool
}

type NetworkDestination

type NetworkDestination struct {
	Transport string `json:"transport"`
	Scheme    string `json:"scheme,omitempty"`
	Host      string `json:"host"`
	Port      int    `json:"port"`
	URL       string `json:"url,omitempty"`
}

NetworkDestination is the normalized target presented to optional Host policy. URL is populated for URL transports; Host, Port, Scheme, and Transport are populated for every transport where they apply.

type NetworkHandleGrantResult

type NetworkHandleGrantResult struct {
	ConnectionGrant connectivity.ConnectionGrant `json:"connection_grant"`
	HandleGrant     bridge.HandleGrantResult     `json:"handle_grant"`
}

type NetworkPolicyAdapter

type NetworkPolicyAdapter interface {
	AuthorizeNetwork(context.Context, NetworkAuthorizationRequest) error
}

type OpenSurfaceRequest

type OpenSurfaceRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	SurfaceID                  string    `json:"surface_id"`
	SurfaceInstanceID          string    `json:"surface_instance_id"`
	Now                        time.Time `json:"-"`
}

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 PackageHashSet struct {
	PackageSHA256  string `json:"package_sha256"`
	ManifestSHA256 string `json:"manifest_sha256"`
	EntriesSHA256  string `json:"entries_sha256"`
}

type PackageReleaseSignature

type PackageReleaseSignature struct {
	Algorithm          string `json:"algorithm"`
	KeyID              string `json:"key_id"`
	SignatureBundleRef string `json:"signature_bundle_ref"`
	SourcePolicyEpoch  string `json:"source_policy_epoch"`
	RevocationEpoch    string `json:"revocation_epoch"`
}

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 PatchSettingsRequest struct {
	PluginInstanceID       string               `json:"plugin_instance_id"`
	Scope                  sessionctx.ScopeKind `json:"scope"`
	ExpectedValuesRevision uint64               `json:"expected_values_revision"`
	Set                    map[string]any       `json:"set"`
	Remove                 []string             `json:"remove,omitempty"`
}

type PermissionMutationResult

type PermissionMutationResult struct {
	Permission permissions.Record              `json:"permission"`
	Revisions  registry.AuthorizationRevisions `json:"revisions"`
}

type PermissionRequirementContract

type PermissionRequirementContract struct {
	ContractID        string                        `json:"contract_id"`
	ContractVersion   string                        `json:"contract_version"`
	ContractSHA256    string                        `json:"contract_sha256"`
	CapabilityID      string                        `json:"capability_id"`
	CapabilityVersion string                        `json:"capability_version"`
	Methods           []PermissionRequirementMethod `json:"methods"`
}

type PermissionRequirementMethod

type PermissionRequirementMethod struct {
	Method              string   `json:"method"`
	RequiredPermissions []string `json:"required_permissions"`
}

type PermissionRequirementsResult

type PermissionRequirementsResult struct {
	PluginInstanceID    string                          `json:"plugin_instance_id"`
	PluginVersion       string                          `json:"plugin_version"`
	ActiveFingerprint   string                          `json:"active_fingerprint"`
	ManagementRevision  uint64                          `json:"management_revision"`
	Contracts           []PermissionRequirementContract `json:"contracts"`
	RequiredPermissions []string                        `json:"required_permissions"`
}

type PluginActionBlockedReason

type PluginActionBlockedReason string

PluginActionBlockedReason is the closed set of reasons an installed plugin cannot be opened. The Host computes this once from authoritative state.

const (
	PluginActionBlockedDisabled           PluginActionBlockedReason = "disabled"
	PluginActionBlockedPermission         PluginActionBlockedReason = "permission_required"
	PluginActionBlockedPolicy             PluginActionBlockedReason = "policy_restricted"
	PluginActionBlockedPackageInvalid     PluginActionBlockedReason = "package_invalid"
	PluginActionBlockedSignatureInvalid   PluginActionBlockedReason = "signature_invalid"
	PluginActionBlockedSignatureRevoked   PluginActionBlockedReason = "signature_revoked"
	PluginActionBlockedRuntimeUnavailable PluginActionBlockedReason = "runtime_unavailable"
	PluginActionBlockedIncompatible       PluginActionBlockedReason = "incompatible"
)

type PluginActionState

type PluginActionState struct {
	CanOpen        bool                      `json:"can_open"`
	CanEnable      bool                      `json:"can_enable"`
	CanDisable     bool                      `json:"can_disable"`
	CanUninstall   bool                      `json:"can_uninstall"`
	BlockedReason  PluginActionBlockedReason `json:"blocked_reason,omitempty"`
	RecoveryAction string                    `json:"recovery_action,omitempty"`
}

PluginActionState is the only Host-owned action projection consumed by host products. UI clients may present it, but must not recompute it.

type PluginDataInspection

type PluginDataInspection struct {
	Bindings        []plugindata.Binding         `json:"bindings"`
	Objects         []PluginDataObjectInspection `json:"objects"`
	Namespaces      []storage.NamespaceRecord    `json:"namespaces"`
	TotalUsageBytes int64                        `json:"total_usage_bytes"`
	TotalUsageFiles int64                        `json:"total_usage_files"`
}

type PluginDataObjectInspection

type PluginDataObjectInspection struct {
	Scope  sessionctx.ScopeKind `json:"scope"`
	Object plugindata.Object    `json:"object"`
}

type PluginInventoryRecord

type PluginInventoryRecord struct {
	Plugin      registry.PluginRecord `json:"plugin"`
	ActionState PluginActionState     `json:"action_state"`
}

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 PluginRecoveryResult

type PluginRecoveryResult struct {
	PluginInstanceID string `json:"plugin_instance_id"`
	Status           string `json:"status"`
	Reason           string `json:"reason,omitempty"`
	Action           string `json:"action,omitempty"`
}

type PluginRef

type PluginRef struct {
	PluginID          string `json:"plugin_id"`
	PluginInstanceID  string `json:"plugin_instance_id"`
	Version           string `json:"version"`
	ActiveFingerprint string `json:"active_fingerprint"`
}

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

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

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 PrepareSurfaceRequest

type PrepareSurfaceRequest struct {
	SurfaceInstanceID string    `json:"surface_instance_id"`
	AssetTicket       string    `json:"asset_ticket"`
	Now               time.Time `json:"-"`
}

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 ReadPluginDataFileRequest

type ReadPluginDataFileRequest struct {
	PluginInstanceID string               `json:"plugin_instance_id"`
	Scope            sessionctx.ScopeKind `json:"scope"`
	StoreID          string               `json:"store_id"`
	Path             string               `json:"path"`
	MaxBytes         int64                `json:"max_bytes,omitempty"`
}

type ReadPluginIconRequest

type ReadPluginIconRequest struct {
	PluginInstanceID string `json:"plugin_instance_id"`
	ExpectedSHA256   string `json:"expected_sha256"`
}

type ReadPluginIconResult

type ReadPluginIconResult struct {
	Entry   pluginpkg.Entry
	Content []byte
}

type ReadSurfaceAssetRequest

type ReadSurfaceAssetRequest struct {
	SurfaceInstanceID string    `json:"surface_instance_id"`
	AssetSession      string    `json:"asset_session"`
	AssetSessionID    string    `json:"asset_session_id"`
	BindingID         string    `json:"binding_id"`
	Now               time.Time `json:"-"`
}

type ReadSurfaceAssetResult

type ReadSurfaceAssetResult struct {
	Entry   pluginpkg.Entry
	Content []byte
	Session bridge.SurfaceSession
}

type ReconcileSurfaceRevocationResult

type ReconcileSurfaceRevocationResult = bridge.ReconcileSurfaceRevocationResult

type RecoverySnapshot

type RecoverySnapshot struct {
	Revision int64                  `json:"revision"`
	Complete bool                   `json:"complete"`
	Results  []PluginRecoveryResult `json:"results"`
}

type RejectMethodConfirmationRequest

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

type RejectMethodConfirmationResult struct {
	Rejected bool `json:"rejected"`
}

type ReleaseArtifactFailure

type ReleaseArtifactFailure struct {
	Phase         string
	ArtifactRole  string
	Retryable     bool
	Attempts      int
	LocatorSHA256 string
}

type ReleaseArtifactFailureProvider

type ReleaseArtifactFailureProvider interface {
	ReleaseArtifactFailure() ReleaseArtifactFailure
}

type ReleaseArtifactProgress

type ReleaseArtifactProgress struct {
	Phase        string
	ArtifactRole string
	Attempt      int
	RetryAfter   time.Duration
	Completed    int64
	Total        int64
	CacheHit     bool
}

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:"-"`
	Observe          func(ReleaseArtifactProgress)  `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 ReleaseEvidence struct {
	NoticesSHA256    string `json:"notices_sha256,omitempty"`
	ProvenanceSHA256 string `json:"provenance_sha256,omitempty"`
	GeneratedAt      string `json:"generated_at,omitempty"`
}

type ReleaseMetadataSignature

type ReleaseMetadataSignature struct {
	Algorithm         string `json:"algorithm"`
	KeyID             string `json:"key_id"`
	SignatureRef      string `json:"signature_ref"`
	SourcePolicyEpoch string `json:"source_policy_epoch"`
	RevocationEpoch   string `json:"revocation_epoch"`
}

type ReleaseModule

type ReleaseModule struct {
	Trust                   *releasetrust.ServiceSet
	ReleaseArtifactResolver ReleaseArtifactResolver
	HostRequirements        HostRequirementPolicy
}

type ReleasePackageInspection

type ReleasePackageInspection struct {
	PluginInstanceID   string                         `json:"plugin_instance_id"`
	ReleaseRef         PluginReleaseRef               `json:"release_ref"`
	InspectedHashes    PackageHashSet                 `json:"inspected_hashes"`
	Presentation       manifest.PresentationCatalog   `json:"presentation"`
	PresentationSHA256 string                         `json:"presentation_sha256"`
	SecuritySummary    ExternalPackageSecuritySummary `json:"security_summary"`
}

type ResolvedPackageArtifact

type ResolvedPackageArtifact struct {
	ReleaseMetadataBytes     []byte      `json:"-"`
	ReleaseMetadataSignature []byte      `json:"-"`
	Reader                   io.ReaderAt `json:"-"`
	Size                     int64       `json:"size"`
	ArtifactSHA256           string      `json:"artifact_sha256"`
}

type ResourceRef

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"
	ResourceConfirmation      ResourceRef = "confirmation"
	ResourceMethod            ResourceRef = "method"
	ResourceIntent            ResourceRef = "intent"
	ResourcePermission        ResourceRef = "permission"
	ResourceSecurityPolicy    ResourceRef = "security_policy"
	ResourceDiagnostic        ResourceRef = "diagnostic"
	ResourceExecution         ResourceRef = "execution"
	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

func (resource ResourceRef) Valid() bool

type ResumeClosedSessionScopeTeardownRequest

type ResumeClosedSessionScopeTeardownRequest struct {
	Session  sessionctx.Context            `json:"-"`
	Identity sessionscope.TeardownIdentity `json:"-"`
	Now      time.Time                     `json:"-"`
}

ResumeClosedSessionScopeTeardownRequest continues an existing exact teardown without requiring an active browser authorization context.

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

type RevokeSessionScopeRequest struct {
	Identity sessionscope.TeardownIdentity `json:"-"`
	Now      time.Time                     `json:"-"`
}

type RevokeSessionScopeResult

type RevokeSessionScopeResult struct {
	State    sessionscope.State  `json:"state"`
	Fenced   bool                `json:"fenced"`
	Complete bool                `json:"complete"`
	Counts   sessionscope.Counts `json:"counts"`
}

type RuntimeAdmissionTarget

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

func ParseRuntimeAdmissionTarget(value string) (RuntimeAdmissionTarget, error)

func (RuntimeAdmissionTarget) String

func (target RuntimeAdmissionTarget) String() string

type RuntimeBinaryName

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

RuntimeBinaryName is the closed executable basename accepted by v0.6.

func NewRuntimeBinaryName

func NewRuntimeBinaryName(value string) (RuntimeBinaryName, error)

func (RuntimeBinaryName) String

func (name RuntimeBinaryName) String() string

type RuntimeDescriptor

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

func NewRuntimeDescriptor(options RuntimeDescriptorOptions) (RuntimeDescriptor, error)

func UnmarshalRuntimeDescriptorJSON

func UnmarshalRuntimeDescriptorJSON(raw []byte) (RuntimeDescriptor, error)

func (RuntimeDescriptor) BinarySHA256

func (descriptor RuntimeDescriptor) BinarySHA256() SHA256Digest

func (RuntimeDescriptor) CompatibleWithPlatform

func (descriptor RuntimeDescriptor) CompatibleWithPlatform() error

func (RuntimeDescriptor) ContractSetSHA256

func (descriptor RuntimeDescriptor) ContractSetSHA256() SHA256Digest

func (RuntimeDescriptor) PlatformVersion

func (descriptor RuntimeDescriptor) PlatformVersion() platformversion.SemVer

func (RuntimeDescriptor) RustIPCVersion

func (descriptor RuntimeDescriptor) RustIPCVersion() RustIPCVersion

func (RuntimeDescriptor) Target

func (descriptor RuntimeDescriptor) Target() RuntimeAdmissionTarget

func (RuntimeDescriptor) WASMABIVersion

func (descriptor RuntimeDescriptor) WASMABIVersion() WASMABIVersion

type RuntimeDescriptorOptions

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

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

type RuntimeLimits = runtimeclient.RuntimeLimits

type RuntimeModule

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

func NewRuntimeModule

func NewRuntimeModule(executable *VerifiedExecutable, options RuntimeModuleOptions) (*RuntimeModule, error)

func (*RuntimeModule) Close

func (*RuntimeModule) Descriptor

func (module *RuntimeModule) Descriptor() RuntimeDescriptor

type RuntimeModuleCacheMetrics

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

type RuntimeModuleCloseResult struct {
	Disposition RuntimeModuleDisposition
	Outcome     MutationOutcome
}

type RuntimeModuleDisposition

type RuntimeModuleDisposition string
const (
	RuntimeModuleCallerOwned       RuntimeModuleDisposition = "caller_owned"
	RuntimeModuleAlreadyClosed     RuntimeModuleDisposition = "already_closed"
	RuntimeModuleConsumedAndClosed RuntimeModuleDisposition = "consumed_and_closed"
)

type RuntimeModuleOptions

type RuntimeModuleOptions struct {
	Limits          RuntimeLimits
	StartupTimeout  time.Duration
	ShutdownTimeout time.Duration
}

type RuntimeProcessHealth

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

type RuntimeShardHealth struct {
	RuntimeShardID string `json:"runtime_shard_id"`
	RuntimeProcessHealth
}

RuntimeShardHealth identifies one process within the Host-owned runtime module.

type RustIPCVersion

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

func ParseRustIPCVersion(value string) (RustIPCVersion, error)

func (RustIPCVersion) String

func (version RustIPCVersion) String() string

type SHA256Digest

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

func ParseSHA256Digest(value string) (SHA256Digest, error)

func (SHA256Digest) String

func (digest SHA256Digest) String() string

type SecretBindRequest

type SecretBindRequest = secrets.BindRequest

type SecretDeleteRequest

type SecretDeleteRequest = secrets.DeleteRequest

type SecretStoreAdapter

type SecretStoreAdapter interface {
	secrets.Store
	secrets.Lister
	secrets.PluginDeleter
}

type SecretTestRequest

type SecretTestRequest = secrets.TestRequest

type SecretsModule

type SecretsModule struct {
	Store SecretStoreAdapter
}

type SecurityPolicyResult

type SecurityPolicyResult struct {
	Policy    security.PolicyRecord           `json:"policy"`
	Revisions registry.AuthorizationRevisions `json:"revisions"`
}

type SessionScopeFinalizationResult

type SessionScopeFinalizationResult struct {
	Status SessionScopeFinalizationStatus `json:"status"`
}

SessionScopeFinalizationResult distinguishes a newly finalized scope from a scope for which both durable evidence stores were already absent.

type SessionScopeFinalizationStatus

type SessionScopeFinalizationStatus string

SessionScopeFinalizationStatus reports whether this call finalized an exact scope or found no Host-owned platform fence.

const (
	SessionScopeFinalized          SessionScopeFinalizationStatus = "finalized"
	SessionScopeFinalizationAbsent SessionScopeFinalizationStatus = "absent"
)

type SessionScopeTeardownMaintenanceResult

type SessionScopeTeardownMaintenanceResult struct {
	Status   SessionScopeTeardownMaintenanceStatus `json:"status"`
	Identity sessionscope.TeardownIdentity         `json:"-"`
	Teardown RevokeSessionScopeResult              `json:"teardown"`
}

SessionScopeTeardownMaintenanceResult contains the opaque identity required for host-side continuation. Identity is never part of a JSON projection.

type SessionScopeTeardownMaintenanceStatus

type SessionScopeTeardownMaintenanceStatus string

SessionScopeTeardownMaintenanceStatus reports whether teardown is pending, complete, or has no remaining durable evidence.

const (
	SessionScopeTeardownIncomplete SessionScopeTeardownMaintenanceStatus = "incomplete"
	SessionScopeTeardownComplete   SessionScopeTeardownMaintenanceStatus = "complete"
	SessionScopeTeardownAbsent     SessionScopeTeardownMaintenanceStatus = "absent"
)

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

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 StartReleaseInstallExecutionRequest

type StartReleaseInstallExecutionRequest struct {
	RequestID             string           `json:"request_id"`
	PluginInstanceID      string           `json:"plugin_instance_id"`
	ReleaseRef            PluginReleaseRef `json:"release_ref"`
	ActivateAfterInstall  *bool            `json:"activate_after_install,omitempty"`
	ApprovedPermissionIDs []string         `json:"approved_permission_ids,omitempty"`
	Now                   time.Time        `json:"-"`
}

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 UninstallRequest struct {
	PluginInstanceID           string    `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64    `json:"expected_management_revision"`
	DeleteData                 bool      `json:"delete_data,omitempty"`
	Now                        time.Time `json:"-"`
}

type UpdateLocalPackageRequest

type UpdateLocalPackageRequest struct {
	PluginInstanceID           string      `json:"plugin_instance_id"`
	ExpectedManagementRevision uint64      `json:"expected_management_revision"`
	PackageReader              io.ReaderAt `json:"-"`
	PackageSize                int64       `json:"-"`
	Now                        time.Time   `json:"-"`
}

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 VerifiedExecutable

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

func OpenVerifiedExecutable(ctx context.Context, options VerifiedExecutableOptions) (*VerifiedExecutable, error)

func (*VerifiedExecutable) Close

func (executable *VerifiedExecutable) Close() (MutationOutcome, error)

func (*VerifiedExecutable) Descriptor

func (executable *VerifiedExecutable) Descriptor() RuntimeDescriptor

type VerifiedExecutableOptions

type VerifiedExecutableOptions struct {
	RootDir            *os.File
	ExecutionRoot      *os.File
	RelativeName       RuntimeBinaryName
	ExpectedDescriptor RuntimeDescriptor
}

type WASMABIVersion

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

func ParseWASMABIVersion

func ParseWASMABIVersion(value string) (WASMABIVersion, error)

func (WASMABIVersion) String

func (version WASMABIVersion) String() string

type WorkerErrorOrigin

type WorkerErrorOrigin = runtimeclient.WorkerErrorOrigin

type WorkerExecutionError

type WorkerExecutionError = runtimeclient.WorkerExecutionError

func AsValidatedWorkerExecutionError

func AsValidatedWorkerExecutionError(err error) (WorkerExecutionError, bool)

AsValidatedWorkerExecutionError returns a copy of a worker failure attested by Host.

type WritePluginDataFileRequest

type WritePluginDataFileRequest struct {
	PluginInstanceID string               `json:"plugin_instance_id"`
	Scope            sessionctx.ScopeKind `json:"scope"`
	StoreID          string               `json:"store_id"`
	Path             string               `json:"path"`
	Data             []byte               `json:"-"`
}

Jump to

Keyboard shortcuts

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