Documentation
¶
Index ¶
- Constants
- Variables
- func BoundedProviderDocumentRevalidator(ctx context.Context, schema string, document map[string]any) error
- func BuildLifecycleIdentityPublication(extension extensions.Extension, binding extensions.LifecycleRuntimeBinding) (*identityregistry.Publication, error)
- func BuildLifecycleQueryPublication(extension extensions.Extension, binding extensions.LifecycleRuntimeBinding) (*queryregistry.Publication, error)
- func ExtensionDatabaseMigrationRoleFor(extensionID string, planDigest string) (string, error)
- func ExtensionDatabaseRuntimeLeaseRoleFor(extensionID string, runtimeInstanceID string, leaseID string) (string, error)
- func IsSiteSearchProvider(extensionID string) bool
- func NewCompositeQueryProviderResolver(core queryregistry.ExecutableProviderResolver, manager *Manager, ...) (queryregistry.ExecutableProviderResolver, error)
- func NewProtocolV2QueryResultFilterSource(manager *Manager, registry *queryregistry.Registry) (queryregistry.ResultFilterSource, error)
- func NewProtocolV2SEOProviderResolver(manager *Manager) seoregistry.ProviderResolver
- func NewSEOExecutionAdmission(manager *Manager) seoregistry.ExecutionAdmission
- func RegisterEventDeliveryWorker(registry *supportjobs.Registry, manager *Manager)
- func ServeProtocolV2Plugin(server pluginwire.PluginRuntimeServiceServer, config ProtocolV2ServerConfig)
- func ValidateLifecycleCleanupPurgeReceipt(request LifecycleCleanupPurgeRequest, receipt LifecycleCleanupPurgeReceipt) ([]byte, string, error)
- func ValidateProtocolV2InvocationIdempotencyKey(value string) error
- type AIToolRuntimeInvoker
- type AdminSurfaceContract
- type AdminSurfaceInvocation
- type AdminSurfaceInvocationResult
- type AdminSurfaceRegistry
- func (r *AdminSurfaceRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
- func (r *AdminSurfaceRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *AdminSurfaceRegistry) Resolve(id string) (AdminSurfaceContract, error)
- func (r *AdminSurfaceRegistry) Snapshot(kind string) AdminSurfaceRegistrySnapshot
- func (r *AdminSurfaceRegistry) ValidateDocument(contract AdminSurfaceContract, document map[string]any) error
- func (r *AdminSurfaceRegistry) ValidateProps(contract AdminSurfaceContract, document map[string]any) error
- func (r *AdminSurfaceRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
- func (r *AdminSurfaceRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *AdminSurfaceRegistry) ValidateResult(contract AdminSurfaceContract, document map[string]any) error
- type AdminSurfaceRegistrySnapshot
- type ComponentActorAuthority
- type ComponentCallPolicy
- type ComponentCallPolicyResolver
- type ComponentCompositionContract
- type ComponentCompositionExecutor
- type ComponentCompositionExecutorConfig
- type ComponentCompositionInspector
- type ComponentCompositionRequest
- type ComponentCompositionResult
- type ComponentCompositionTrace
- type ComponentCompositionTraceStep
- type ComponentContribution
- type ComponentDocumentValidator
- type ComponentFallbackCall
- type ComponentFallbackEvidence
- type ComponentFallbackRenderer
- type ComponentPermissionAuthorizer
- type ComponentPermissionAuthorizerFunc
- type ComponentProviderConflict
- type ComponentProviderSelection
- type ComponentRegistry
- func (r *ComponentRegistry) AdmitPublicComponent(extension extensions.Extension, declaration extensions.ManifestComponent) bool
- func (r *ComponentRegistry) PublishComponentPackageRuntime(extension extensions.Extension) error
- func (r *ComponentRegistry) PublishThemeTransition(target, source *extensions.Extension, publicationRevision int64) error
- func (r *ComponentRegistry) RemoveComponentPackageRuntime(extensionID string) (bool, error)
- func (r *ComponentRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
- func (r *ComponentRegistry) ReplaceAll(snapshots []ComponentRuntimeSnapshot) error
- func (r *ComponentRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *ComponentRegistry) ResetReplaceProvider(request ResetComponentProviderRequest) (bool, error)
- func (r *ComponentRegistry) ResolvePlan(targetID, contractVersion string) (ComponentResolvePlan, error)
- func (r *ComponentRegistry) RestoreRuntimes(items []extensions.Extension, safeMode bool) error
- func (r *ComponentRegistry) RollbackThemeTransition(target, source *extensions.Extension, publicationRevision int64) error
- func (r *ComponentRegistry) RuntimeSnapshot(extensionID string) (ComponentRuntimeSnapshot, bool)
- func (r *ComponentRegistry) SelectReplaceProvider(request SelectComponentProviderRequest) (ComponentProviderSelection, error)
- func (r *ComponentRegistry) Snapshot() ComponentRegistrySnapshot
- func (r *ComponentRegistry) ValidateProps(contribution ComponentContribution, document any) error
- func (r *ComponentRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
- func (r *ComponentRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *ComponentRegistry) ValidateResult(contribution ComponentContribution, document any) error
- func (r *ComponentRegistry) ValidateThemeTransition(target, source *extensions.Extension) error
- type ComponentRegistrySnapshot
- type ComponentRenderCall
- type ComponentRenderFragment
- type ComponentRenderResponse
- type ComponentRenderSegment
- type ComponentRendererTermination
- type ComponentRendererTerminator
- type ComponentResolvePlan
- type ComponentRuntimeAdmission
- type ComponentRuntimeAdmissionLease
- type ComponentRuntimeAdmissionProduction
- type ComponentRuntimeAdmissionRequest
- type ComponentRuntimeSnapshot
- type ComponentSSRRenderer
- type ComponentSSRRendererFunc
- type ComponentSSRRendererProduction
- type ComponentTarget
- type ComponentTargetBinding
- type ComponentTargetBindingResolver
- type ComposedLifecycleHostBoundary
- func (b *ComposedLifecycleHostBoundary) CanResumeLifecycleHostSources(ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest) (bool, error)
- func (b *ComposedLifecycleHostBoundary) DrainLifecycleHostSources(ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest) error
- func (b *ComposedLifecycleHostBoundary) ResumeLifecycleHostSources(ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest) error
- func (b *ComposedLifecycleHostBoundary) RunLifecycleHostBoundary(ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest) (LifecycleHostBoundaryResult, error)
- type ComposedLifecycleHostBoundaryDependencies
- type ContentRegistryProtocolRuntime
- func (r *ContentRegistryProtocolRuntime) AcquireContentRegistryRuntime(ctx context.Context, claim hostapi.ContentRegistryRuntimeIdentity) (hostapi.ContentRegistryRuntimeLease, error)
- func (r *ContentRegistryProtocolRuntime) ResolveContentProviders(contribution contentregistry.Contribution) (contentregistry.ProviderSet, error)
- type DeliveryStore
- type EventDeliveryArgs
- type EventDeliveryWorker
- type EventDispatcher
- type ExactLifecycleCoordinatorHost
- type ExactLifecycleCoordinatorRuntimeAdapter
- type ExecutableTrustRevocationFence
- type ExtensionDatabaseArtifact
- type ExtensionDatabaseCredential
- type ExtensionDatabaseDisposition
- type ExtensionDatabaseDispositionReceipt
- type ExtensionDatabaseDispositionRequest
- type ExtensionDatabaseGrantRequest
- type ExtensionDatabaseGrantSnapshot
- type ExtensionDatabaseIdentifiers
- type ExtensionDatabaseLeaseAuthority
- type ExtensionDatabaseRuntimeCredential
- type ExtensionDatabaseRuntimeLeaseIssue
- type ExtensionDatabaseRuntimeLeaseRef
- type ExtensionDatabaseRuntimeLeaseSnapshot
- type ExtensionEventPublisher
- type HookArtifact
- type HookBus
- func (b *HookBus) AdminSurfaces() *AdminSurfaceRegistry
- func (b *HookBus) Commands() *PluginCommandRegistry
- func (b *HookBus) Emit(ctx context.Context, input HookInput) []HookResult
- func (b *HookBus) Listeners(name string) []extensions.Extension
- func (b *HookBus) ProviderSlots() *VersionedProviderSlotRegistry
- func (b *HookBus) Register(extension extensions.Extension)
- func (b *HookBus) RegisterRuntime(extension extensions.Extension, instanceID string) error
- func (b *HookBus) RuntimeRegistryGeneration() RuntimeRegistryGenerationSnapshot
- func (b *HookBus) RuntimeSnapshot(extensionID string) (HookRuntimeSnapshot, bool)
- func (b *HookBus) Unregister(extensionID string)
- func (b *HookBus) UnregisterRuntime(extensionID, instanceID string) bool
- func (b *HookBus) VersionedRegistry() *VersionedHookRegistry
- type HookBusConfig
- type HookDocumentRevalidator
- type HookInput
- type HookInvoker
- type HookInvokerFunc
- type HookResult
- type HookRuntimeSnapshot
- type HostAPIRegistrar
- type IdentityProviderAccept
- type IdentityProviderCommitFence
- type IdentityProviderInvocation
- type IdentityProviderInvocationResult
- type IdentityProviderRuntime
- func (r *IdentityProviderRuntime) Invoke(ctx context.Context, input IdentityProviderInvocation, ...) (IdentityProviderInvocationResult, error)
- func (r *IdentityProviderRuntime) InvokeExact(ctx context.Context, expected identityregistry.ProviderContribution, ...) (IdentityProviderInvocationResult, error)
- type IdentitySessionEvaluateInvoker
- type InstanceAdmission
- func (m *InstanceAdmission) AcquireActiveRuntimeCall(ctx context.Context, extensionID string, class RuntimeCallClass) (RuntimeInstanceSnapshot, *RuntimeAdmissionLease, error)
- func (m *InstanceAdmission) AcquireRuntimeCall(ctx context.Context, identity RuntimeInstanceIdentity, class RuntimeCallClass) (*RuntimeAdmissionLease, error)
- func (m *InstanceAdmission) ActiveRuntimeInstance(extensionID string) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) BeginDrain(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) BeginDrainContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) DiscardRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (m *InstanceAdmission) ForceDrain(identity RuntimeInstanceIdentity, cause error) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) HealthRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) InspectRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) NewExactLifecycleCoordinatorRuntimeAdapter() (*ExactLifecycleCoordinatorRuntimeAdapter, error)
- func (m *InstanceAdmission) PublishDrainedRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) PublishRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) PublishRuntimeInstanceFrom(ctx context.Context, identity RuntimeInstanceIdentity, ...) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) PublishRuntimeInstanceIfNoActive(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) QuarantineRuntimeArtifact(exact RuntimeInstanceArtifactIdentity, cause error) ([]RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) QuarantineRuntimeInstance(exact RuntimeInstanceArtifactIdentity, cause error) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) RemoveRuntimeInstance(identity RuntimeInstanceIdentity) error
- func (m *InstanceAdmission) ResumeRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) ResumeRuntimeInstanceContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *InstanceAdmission) RuntimeInstanceAvailable(identity RuntimeInstanceIdentity) bool
- func (m *InstanceAdmission) StageRuntimeInstance(ctx context.Context, extension extensions.Extension) (RuntimeInstanceSnapshot, error)
- func (m *InstanceAdmission) StopRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (m *InstanceAdmission) WaitDrain(ctx context.Context, identity RuntimeInstanceIdentity) error
- type InvalidateProviderSlotRequest
- type JobDispatcherAdapter
- type LifecycleAction
- type LifecycleAssetAdmission
- type LifecycleAssetAuthority
- type LifecycleAssetOperationRepository
- type LifecycleBoundaryArtifactTrust
- type LifecycleBoundaryCleanup
- type LifecycleBoundaryCleanupFinalizer
- type LifecycleBoundaryCleanupMode
- type LifecycleBoundaryCleanupPurger
- type LifecycleBoundaryCleanupResult
- type LifecycleBoundaryCommittedJobs
- type LifecycleBoundaryExtensionInventory
- type LifecycleBoundaryJobMigrationSource
- type LifecycleBoundaryJobMode
- type LifecycleBoundaryJobRuntime
- type LifecycleBoundaryJobs
- type LifecycleBoundaryMigrationFacts
- type LifecycleBoundaryMigrationMode
- type LifecycleBoundaryMigrations
- type LifecycleBoundaryPreflight
- type LifecycleBoundaryPublicationJournal
- type LifecycleBoundaryPublicationMode
- type LifecycleBoundaryRegistries
- type LifecycleBoundaryRequest
- type LifecycleBoundaryRuntime
- type LifecycleBoundaryState
- type LifecycleBoundaryStaticPreflight
- type LifecycleBoundaryTransaction
- type LifecycleBoundaryTransactionState
- type LifecycleCleanupFinalizationResult
- type LifecycleCleanupPurgeReceipt
- type LifecycleCleanupPurgeRequest
- type LifecycleCoordinatorRuntimeAdapter
- type LifecycleCoordinatorRuntimeAdmission
- type LifecycleHostBoundary
- type LifecycleHostBoundaryResult
- type LifecycleHostDrainBoundary
- type LifecycleHostRuntime
- type LifecycleIdentityStartupRecovery
- type LifecycleInvocation
- type LifecycleMigrationArtifact
- type LifecycleMigrationBackupRequirement
- type LifecycleMigrationEngine
- type LifecycleMigrationEnginePlan
- type LifecycleMigrationEngineProof
- type LifecycleMigrationPreflight
- type LifecycleMigrationPreflightArtifact
- type LifecycleMigrationPreflightResult
- type LifecycleMigrationPreflightStep
- type LifecycleProgress
- type LifecycleProgressState
- type LifecycleRegistryBoundaryConfig
- type LifecycleRegistryPublicationPhase
- type LifecycleRegistryPublicationRef
- type LifecycleRegistryPublicationRepository
- type LifecycleRemoteError
- type LifecycleRunResult
- type LifecycleStaticPreflightRequest
- type MailProviderInvoker
- type MailProviderRegistry
- func (r *MailProviderRegistry) EnsureDefault(ctx context.Context) (string, error)
- func (r *MailProviderRegistry) Resolve(ctx context.Context) (MailProviderSelection, MailProviderState, error)
- func (r *MailProviderRegistry) RestoreDefault(ctx context.Context) error
- func (r *MailProviderRegistry) Select(ctx context.Context, extensionID string) error
- func (r *MailProviderRegistry) Selected(ctx context.Context) (MailProviderSelection, bool, error)
- type MailProviderRequest
- type MailProviderResponse
- type MailProviderSelection
- type MailProviderState
- type MailProviderStore
- type Manager
- func (m *Manager) AcquireActiveRuntimeCall(ctx context.Context, extensionID string, class RuntimeCallClass) (RuntimeInstanceSnapshot, *RuntimeAdmissionLease, error)
- func (m *Manager) AcquireRuntimeCall(ctx context.Context, identity RuntimeInstanceIdentity, class RuntimeCallClass) (*RuntimeAdmissionLease, error)
- func (m *Manager) ActiveRuntimeInstance(extensionID string) (RuntimeInstanceSnapshot, error)
- func (m *Manager) AdminSurfaceSnapshot(kind string) AdminSurfaceRegistrySnapshot
- func (m *Manager) BeginDrain(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) BeginDrainContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) BindProviderSlotSelections(store ProviderSlotSelectionStore)
- func (m *Manager) Check(arg0 context.Context, extension extensions.Extension) error
- func (m *Manager) Close(ctx context.Context)
- func (m *Manager) Deliver(ctx context.Context, extensionID string, deliveryID int64, ...) appevents.Result
- func (m *Manager) DiscardRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (m *Manager) Emit(ctx context.Context, envelope appevents.Envelope) appevents.Result
- func (m *Manager) EmitHook(ctx context.Context, name string, payload map[string]any)
- func (m *Manager) ExecutePluginCommand(ctx context.Context, commandID string, input map[string]any, safeMode bool) (PluginCommandExecutionResult, error)
- func (m *Manager) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
- func (m *Manager) FilterQueryResultInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (m *Manager) ForceDrain(identity RuntimeInstanceIdentity, cause error) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) HealthRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
- func (m *Manager) HookBus() *HookBus
- func (m *Manager) InspectRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *Manager) InvokeAdminSurface(ctx context.Context, input AdminSurfaceInvocation) (AdminSurfaceInvocationResult, error)
- func (m *Manager) InvokeGuardInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) error
- func (m *Manager) InvokeQueryInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (m *Manager) InvokeRouteInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (ProtocolV2RouteResponse, error)
- func (m *Manager) InvokeVersionedHook(ctx context.Context, input VersionedHookInvocation) VersionedHookResult
- func (m *Manager) InvokeVersionedProvider(ctx context.Context, input VersionedProviderInvocation) (VersionedProviderInvocationResult, error)
- func (m *Manager) NewExactLifecycleCoordinatorRuntimeAdapter() (*ExactLifecycleCoordinatorRuntimeAdapter, error)
- func (m *Manager) OpenRouteStreamInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (*ProtocolV2RouteStream, error)
- func (m *Manager) ProbeProviderSlotCandidate(ctx context.Context, contractID, candidateID string) (ProviderSlotProbeResult, error)
- func (m *Manager) ProbeSettingsAction(ctx context.Context, extension extensions.Extension, ...) (extensions.SettingsActionProbeResult, error)
- func (m *Manager) ProtocolV2ProviderBroker() (hostapi.ProtocolV2ProviderBroker, error)
- func (m *Manager) ProviderSlotInspection(ctx context.Context) (extensions.ProviderSlotInspection, error)
- func (m *Manager) ProviderSlotSelections() *ProviderSlotSelectionAPI
- func (m *Manager) PublishDrainedRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *Manager) PublishRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *Manager) PublishRuntimeInstanceFrom(ctx context.Context, identity RuntimeInstanceIdentity, ...) (RuntimeInstanceSnapshot, error)
- func (m *Manager) PublishRuntimeInstanceIfNoActive(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
- func (m *Manager) QuarantineRuntimeArtifact(exact RuntimeInstanceArtifactIdentity, cause error) ([]RuntimeAdmissionSnapshot, error)
- func (m *Manager) QuarantineRuntimeInstance(exact RuntimeInstanceArtifactIdentity, cause error) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) Reconcile(ctx context.Context, items []extensions.Extension)
- func (m *Manager) RefreshMailProvider(ctx context.Context, extensionID string) error
- func (m *Manager) RemoveRuntimeInstance(identity RuntimeInstanceIdentity) error
- func (m *Manager) ResolveAdminSurface(id string) (AdminSurfaceContract, error)
- func (m *Manager) ResumeRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) ResumeRuntimeInstanceContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
- func (m *Manager) RouteTarget(extensionID string) (RouteTarget, bool)
- func (m *Manager) RuntimeInstanceAvailable(identity RuntimeInstanceIdentity) bool
- func (m *Manager) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
- func (m *Manager) SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
- func (m *Manager) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
- func (m *Manager) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
- func (m *Manager) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
- func (m *Manager) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
- func (m *Manager) SetStartPreparer(preparer func(context.Context, extensions.Extension) error)
- func (m *Manager) StageRuntimeInstance(ctx context.Context, extension extensions.Extension) (RuntimeInstanceSnapshot, error)
- func (m *Manager) Start(ctx context.Context, extension extensions.Extension) error
- func (m *Manager) Status(arg0 context.Context, extension extensions.Extension) extensions.RuntimeStatus
- func (m *Manager) Stop(ctx context.Context, extension extensions.Extension) error
- func (m *Manager) StopRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (m *Manager) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
- func (m *Manager) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
- func (m *Manager) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
- func (m *Manager) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
- func (m *Manager) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
- func (m *Manager) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
- func (m *Manager) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
- func (m *Manager) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
- func (m *Manager) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
- func (m *Manager) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
- func (m *Manager) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
- func (m *Manager) WaitDrain(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (m *Manager) WithActivation(coordinator *extensions.ActivationCoordinator, bootID string) *Manager
- type ManagerConfig
- type ManagerPluginRuntimeFullSetApplier
- type PackageLocalComponentSSRRenderer
- func (r *PackageLocalComponentSSRRenderer) Count() int
- func (r *PackageLocalComponentSSRRenderer) Publish(extension extensions.Extension) error
- func (r *PackageLocalComponentSSRRenderer) RemoveExtension(extensionID string)
- func (r *PackageLocalComponentSSRRenderer) RemovePackage(packageDigest string)
- func (r *PackageLocalComponentSSRRenderer) RenderComponent(ctx context.Context, call ComponentRenderCall) (ComponentRenderResponse, error)
- type PluginCommandContract
- type PluginCommandExecutionResult
- type PluginCommandRegistry
- func (r *PluginCommandRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
- func (r *PluginCommandRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *PluginCommandRegistry) Resolve(id string, safeMode bool) (PluginCommandContract, error)
- func (r *PluginCommandRegistry) Snapshot() PluginCommandRegistrySnapshot
- func (r *PluginCommandRegistry) ValidateInput(contract PluginCommandContract, document map[string]any) error
- func (r *PluginCommandRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
- func (r *PluginCommandRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *PluginCommandRegistry) ValidateResult(contract PluginCommandContract, document map[string]any) error
- type PluginCommandRegistrySnapshot
- type PluginHealth
- type PluginHookRequest
- type PluginHookResponse
- type PluginProtocol
- type PluginRouteTarget
- type PluginRuntimeFullSetInventory
- type PluginSearchEngine
- func (e *PluginSearchEngine) Delete(ctx context.Context, topicID int64) error
- func (e *PluginSearchEngine) EnsureIndex(ctx context.Context) error
- func (e *PluginSearchEngine) Index(ctx context.Context, doc search.TopicSearchDoc) error
- func (e *PluginSearchEngine) Probe(ctx context.Context) error
- func (e *PluginSearchEngine) Search(ctx context.Context, input search.SearchInput) (search.SearchResult, error)
- type PluginSettings
- type PluginStorageAdapter
- func (a *PluginStorageAdapter) Delete(ctx context.Context, key string) error
- func (a *PluginStorageAdapter) Exists(ctx context.Context, key string) (bool, error)
- func (a *PluginStorageAdapter) Open(ctx context.Context, key string) (io.ReadCloser, error)
- func (a *PluginStorageAdapter) Probe(ctx context.Context) error
- func (a *PluginStorageAdapter) PublicURL(key string) string
- func (a *PluginStorageAdapter) Put(ctx context.Context, key string, input storage.PutInput) error
- func (a *PluginStorageAdapter) SignedURL(ctx context.Context, key string, ttl time.Duration) (string, error)
- func (a *PluginStorageAdapter) Stat(ctx context.Context, key string) (storage.ObjectInfo, error)
- type PluginStorageAdapterFactory
- func (f *PluginStorageAdapterFactory) NewStorageAdapter(extensionID string) (storage.Adapter, error)
- func (f *PluginStorageAdapterFactory) NewStorageInstanceAdapter(ctx context.Context, extensionID, instanceID string, ...) (storage.Adapter, error)
- func (f *PluginStorageAdapterFactory) ProbeStorageInstance(ctx context.Context, extensionID string, settings map[string]string) error
- func (f *PluginStorageAdapterFactory) RemoveStorageInstance(ctx context.Context, extensionID, instanceID string) error
- type PostgresExtensionDatabaseDisposition
- type PostgresExtensionDatabaseRegistry
- func (r *PostgresExtensionDatabaseRegistry) BeginRuntimeLeaseDrain(ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, ...) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
- func (r *PostgresExtensionDatabaseRegistry) HeartbeatRuntimeLease(ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, ...) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
- func (r *PostgresExtensionDatabaseRegistry) InspectOwnSchemaGrant(ctx context.Context, artifact ExtensionDatabaseArtifact) (ExtensionDatabaseGrantSnapshot, error)
- func (r *PostgresExtensionDatabaseRegistry) InspectRuntimeLease(ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
- func (r *PostgresExtensionDatabaseRegistry) IssueRuntimeLease(ctx context.Context, request ExtensionDatabaseRuntimeLeaseIssue) (ExtensionDatabaseRuntimeCredential, error)
- func (r *PostgresExtensionDatabaseRegistry) ProvisionOwnSchema(ctx context.Context, request ExtensionDatabaseGrantRequest) (ExtensionDatabaseCredential, error)
- func (r *PostgresExtensionDatabaseRegistry) ReapExpiredRuntimeLeases(ctx context.Context, limit int) (int, error)
- func (r *PostgresExtensionDatabaseRegistry) RevokeOwnSchema(ctx context.Context, request ExtensionDatabaseGrantRequest) error
- func (r *PostgresExtensionDatabaseRegistry) RevokeRuntimeLease(ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, ...) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
- func (r *PostgresExtensionDatabaseRegistry) RotateOwnSchemaCredential(ctx context.Context, request ExtensionDatabaseGrantRequest) (ExtensionDatabaseCredential, error)
- type PostgresLifecycleAssetAuthority
- type PostgresLifecycleBoundaryCleanup
- type PostgresLifecycleBoundaryCleanupFinalizer
- type PostgresLifecycleBoundaryJobs
- func (b *PostgresLifecycleBoundaryJobs) DrainLifecycleJobs(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- func (b *PostgresLifecycleBoundaryJobs) PrepareLifecycleJobPublication(ctx context.Context, request LifecycleBoundaryRequest, ...) (LifecycleBoundaryTransaction, error)
- func (b *PostgresLifecycleBoundaryJobs) ReconcileCommittedLifecycleJobs(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- func (b *PostgresLifecycleBoundaryJobs) ResumeLifecycleJobs(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- func (b *PostgresLifecycleBoundaryJobs) ValidateLifecycleJobs(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- type PostgresLifecycleBoundaryJobsConfig
- type PostgresLifecycleBoundaryPublicationJournal
- func (j *PostgresLifecycleBoundaryPublicationJournal) CommitLifecyclePublication(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- func (j *PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommitted(ctx context.Context, request LifecycleBoundaryRequest, ...) (bool, error)
- func (j *PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommittedForOperation(ctx context.Context, request LifecycleBoundaryRequest, ...) (bool, error)
- func (j *PostgresLifecycleBoundaryPublicationJournal) PrepareLifecyclePublication(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- type PostgresLifecycleBoundaryRegistries
- func (b *PostgresLifecycleBoundaryRegistries) AssetRegistry() *assetregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) CacheRegistry() *cacheregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) ComponentRegistry() *ComponentRegistry
- func (b *PostgresLifecycleBoundaryRegistries) ContentRegistry() *contentregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) EditorRegistry() *editorregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) EntityRegistry() *entityregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) IdentityRegistry() *identityregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) MediaRegistry() *mediaregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) NavigationRegistry() *navigationregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) PrepareLifecycleRegistryPublication(ctx context.Context, request LifecycleBoundaryRequest, ...) (LifecycleBoundaryTransaction, error)
- func (b *PostgresLifecycleBoundaryRegistries) PrepareRuntimeQueriesForSettings(ctx context.Context, extension extensions.Extension) (extensions.RuntimeQuerySettingsRestartTransaction, error)
- func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeCaches(ctx context.Context, extension extensions.Extension) (extensions.RuntimeCachePublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeContent(ctx context.Context, extension extensions.Extension) (extensions.RuntimeContentPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeEditor(ctx context.Context, extension extensions.Extension) (extensions.RuntimeEditorPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeIdentity(ctx context.Context, extension extensions.Extension, actorUserID int64, ...) (extensions.RuntimeIdentityPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeQueries(ctx context.Context, extension extensions.Extension) (extensions.RuntimeQueryPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeCaches(ctx context.Context, extension extensions.Extension) (extensions.RuntimeCachePublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeContent(ctx context.Context, extension extensions.Extension) (extensions.RuntimeContentPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeEditor(ctx context.Context, extension extensions.Extension) (extensions.RuntimeEditorPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeIdentity(ctx context.Context, extension extensions.Extension, actorUserID int64, ...) (extensions.RuntimeIdentityPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeQueries(ctx context.Context, extension extensions.Extension) (extensions.RuntimeQueryPublicationMutation, error)
- func (b *PostgresLifecycleBoundaryRegistries) QueryRegistry() *queryregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) RestoreCachePublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreContentPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreEditorPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreEntityPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreMediaPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreNavigationPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreRoutePublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) RestoreSEOPublications(ctx context.Context, items []extensions.Extension, safeMode bool) error
- func (b *PostgresLifecycleBoundaryRegistries) SEORegistry() *seoregistry.Registry
- func (b *PostgresLifecycleBoundaryRegistries) SuppressedIdentityExtensions() []string
- func (b *PostgresLifecycleBoundaryRegistries) ValidateLifecycleRegistries(ctx context.Context, request LifecycleBoundaryRequest) error
- type PostgresLifecycleBoundaryState
- type PostgresLifecycleMigrationEngine
- func (e *PostgresLifecycleMigrationEngine) InspectLifecycleMigration(ctx context.Context, plan LifecycleMigrationEnginePlan) (LifecycleMigrationEngineProof, error)
- func (e *PostgresLifecycleMigrationEngine) PreflightLifecycleMigration(ctx context.Context, plan LifecycleMigrationEnginePlan) (LifecycleMigrationPreflightResult, error)
- func (e *PostgresLifecycleMigrationEngine) ReconcileLifecycleMigration(ctx context.Context, plan LifecycleMigrationEnginePlan) error
- type PostgresLifecycleRegistryPublicationRepository
- func (r *PostgresLifecycleRegistryPublicationRepository) InspectLifecycleRegistryPublication(ctx context.Context, ref LifecycleRegistryPublicationRef) (LifecycleRegistryPublicationPhase, error)
- func (r *PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublication(ctx context.Context, ref LifecycleRegistryPublicationRef, ...) error
- func (r *PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublicationTx(ctx context.Context, ref LifecycleRegistryPublicationRef, ...) error
- func (r *PostgresLifecycleRegistryPublicationRepository) PrepareLifecycleRegistryPublication(ctx context.Context, input PrepareLifecycleRegistryPublicationInput) (LifecycleRegistryPublicationRef, error)
- type PostgresProviderSlotSelectionStore
- func (s *PostgresProviderSlotSelectionStore) Desired(ctx context.Context, contractID string) (ProviderSlotSelection, error)
- func (s *PostgresProviderSlotSelectionStore) InvalidateExtension(ctx context.Context, request InvalidateProviderSlotRequest) (int64, error)
- func (s *PostgresProviderSlotSelectionStore) ListEvents(ctx context.Context, contractID string, limit int) ([]ProviderSlotSelectionEvent, error)
- func (s *PostgresProviderSlotSelectionStore) Reset(ctx context.Context, request ResetProviderSlotRequest) error
- func (s *PostgresProviderSlotSelectionStore) Select(ctx context.Context, request SelectProviderSlotRequest) (ProviderSlotSelection, error)
- func (s *PostgresProviderSlotSelectionStore) Selected(ctx context.Context, contractID string) (ProviderSlotSelection, error)
- type PrepareLifecycleRegistryPublicationInput
- type ProductionComponentComposition
- func (s *ProductionComponentComposition) Compose(ctx context.Context, request ComponentCompositionRequest) (ComponentCompositionResult, error)
- func (s *ProductionComponentComposition) ComposePageHTML(ctx context.Context, pageID string, props map[string]any) ([]string, error)
- func (s *ProductionComponentComposition) ComposePageTarget(ctx context.Context, pageID string, props map[string]any, ...) ([]string, error)
- func (s *ProductionComponentComposition) InspectorTraces() []ComponentCompositionTrace
- func (s *ProductionComponentComposition) PublishPackageSSR(extension extensions.Extension) error
- func (s *ProductionComponentComposition) RemovePackageSSR(extensionID, packageDigest string)
- func (s *ProductionComponentComposition) ResolveTarget(_ context.Context, target ComponentTarget) (ComponentTargetBinding, error)
- type ProductionComponentCompositionConfig
- type ProductionLifecycleBoundaryMigrations
- func (m *ProductionLifecycleBoundaryMigrations) CanPrepareLifecycleMigrations(ctx context.Context, request LifecycleStaticPreflightRequest) (bool, error)
- func (m *ProductionLifecycleBoundaryMigrations) CanResumeLifecycleSource(ctx context.Context, request LifecycleBoundaryRequest, ...) (bool, error)
- func (m *ProductionLifecycleBoundaryMigrations) LifecycleArtifactMigrationReady(ctx context.Context, artifact extensions.Extension) (bool, error)
- func (m *ProductionLifecycleBoundaryMigrations) ReconcileLifecycleMigrations(ctx context.Context, request LifecycleBoundaryRequest, ...) error
- type ProductionLifecycleBoundaryPreflight
- type ProductionLifecycleBoundaryPreflightConfig
- type ProtocolNoop
- func (ProtocolNoop) Health() (PluginHealth, error)
- func (ProtocolNoop) InvokeHook(PluginHookRequest) (PluginHookResponse, error)
- func (ProtocolNoop) ProviderProbe(ProviderProbeRequest) (ProviderProbeResponse, error)
- func (ProtocolNoop) RouteTarget() (PluginRouteTarget, error)
- func (ProtocolNoop) SendMail(MailProviderRequest) (MailProviderResponse, error)
- func (ProtocolNoop) StorageClose(StorageCloseRequest) (StorageResult, error)
- func (ProtocolNoop) StorageConfigureInstance(StorageConfigureInstanceRequest) (StorageResult, error)
- func (ProtocolNoop) StorageDelete(StorageObjectRequest) (StorageResult, error)
- func (ProtocolNoop) StorageExists(StorageExistsRequest) (StorageExistsResponse, error)
- func (ProtocolNoop) StorageGetChunk(StorageGetChunkRequest) (StorageGetChunkResponse, error)
- func (ProtocolNoop) StorageOpen(StorageOpenRequest) (StorageSessionResponse, error)
- func (ProtocolNoop) StorageProbe(StorageProbeRequest) (StorageProbeResponse, error)
- func (ProtocolNoop) StorageProbeConfig(StorageProbeConfigRequest) (StorageProbeResponse, error)
- func (ProtocolNoop) StoragePublicURL(StoragePublicURLRequest) (StorageURLResponse, error)
- func (ProtocolNoop) StoragePutBegin(StoragePutBeginRequest) (StorageSessionResponse, error)
- func (ProtocolNoop) StoragePutChunk(StoragePutChunkRequest) (StorageResult, error)
- func (ProtocolNoop) StorageRemoveInstance(StorageRemoveInstanceRequest) (StorageResult, error)
- func (ProtocolNoop) StorageSignedURL(StorageSignedURLRequest) (StorageURLResponse, error)
- func (ProtocolNoop) StorageStat(StorageStatRequest) (StorageStatResponse, error)
- type ProtocolRuntimeInstanceSnapshot
- type ProtocolRuntimeInstanceState
- type ProtocolRuntimeSetLease
- type ProtocolStarter
- func (s *ProtocolStarter) DiscardInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (s *ProtocolStarter) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
- func (s *ProtocolStarter) FilterQueryResult(ctx context.Context, extension extensions.Extension, ...) ([]queryregistry.QueryRow, error)
- func (s *ProtocolStarter) FilterQueryResultInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (s *ProtocolStarter) HealthInstance(ctx context.Context, identity RuntimeInstanceIdentity) (PluginHealth, error)
- func (s *ProtocolStarter) InspectInstance(identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
- func (s *ProtocolStarter) InvokeAdminSurface(ctx context.Context, identity RuntimeInstanceIdentity, ...) (map[string]any, error)
- func (s *ProtocolStarter) InvokeContentInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (VersionedContentResponse, error)
- func (s *ProtocolStarter) InvokeGuardInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) error
- func (s *ProtocolStarter) InvokeHook(ctx context.Context, extension extensions.Extension, input HookInput) HookResult
- func (s *ProtocolStarter) InvokeIdentityProviderInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (VersionedIdentityProviderResponse, error)
- func (s *ProtocolStarter) InvokePluginCommand(ctx context.Context, identity RuntimeInstanceIdentity, ...) (map[string]any, error)
- func (s *ProtocolStarter) InvokeQuery(ctx context.Context, extension extensions.Extension, ...) ([]queryregistry.QueryRow, error)
- func (s *ProtocolStarter) InvokeQueryInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (s *ProtocolStarter) InvokeRouteInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (ProtocolV2RouteResponse, error)
- func (s *ProtocolStarter) InvokeVersionedAITool(ctx context.Context, extension extensions.Extension, ...) (VersionedAIToolResponse, error)
- func (s *ProtocolStarter) InvokeVersionedProvider(ctx context.Context, extension extensions.Extension, ...) (VersionedProviderResponse, error)
- func (s *ProtocolStarter) InvokeVersionedSEO(ctx context.Context, extension extensions.Extension, input VersionedSEORequest) (VersionedSEOResponse, error)
- func (s *ProtocolStarter) OpenRouteStreamInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (*ProtocolV2RouteStream, error)
- func (s *ProtocolStarter) ProtocolTelemetry(extensionID string) ProtocolTelemetrySnapshot
- func (s *ProtocolStarter) ProviderProbe(ctx context.Context, extensionID string, request ProviderProbeRequest) (ProviderProbeResponse, error)
- func (s *ProtocolStarter) PublishInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
- func (s *ProtocolStarter) PublishInstanceSet(ctx context.Context, identities []RuntimeInstanceIdentity) ([]ProtocolRuntimeInstanceSnapshot, *ProtocolRuntimeSetLease, error)
- func (s *ProtocolStarter) RunLifecycle(ctx context.Context, extension extensions.Extension, ...) (LifecycleRunResult, error)
- func (s *ProtocolStarter) RunLifecycleInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (LifecycleRunResult, error)
- func (s *ProtocolStarter) RuntimeInstanceSetVisible(ctx context.Context, identities []RuntimeInstanceIdentity) bool
- func (s *ProtocolStarter) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
- func (s *ProtocolStarter) SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
- func (s *ProtocolStarter) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
- func (s *ProtocolStarter) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
- func (s *ProtocolStarter) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
- func (s *ProtocolStarter) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
- func (s *ProtocolStarter) Start(ctx context.Context, extension extensions.Extension) (RouteTarget, error)
- func (s *ProtocolStarter) StartInstance(ctx context.Context, extension extensions.Extension) (RouteTarget, error)
- func (s *ProtocolStarter) Stop(ctx context.Context, extension extensions.Extension) error
- func (s *ProtocolStarter) StopInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (s *ProtocolStarter) StopRetainedInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
- func (s *ProtocolStarter) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
- func (s *ProtocolStarter) StorageConfigureInstance(ctx context.Context, extensionID string, ...) (StorageResult, error)
- func (s *ProtocolStarter) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
- func (s *ProtocolStarter) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
- func (s *ProtocolStarter) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
- func (s *ProtocolStarter) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
- func (s *ProtocolStarter) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
- func (s *ProtocolStarter) StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
- func (s *ProtocolStarter) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
- func (s *ProtocolStarter) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
- func (s *ProtocolStarter) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
- func (s *ProtocolStarter) StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
- func (s *ProtocolStarter) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
- func (s *ProtocolStarter) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
- type ProtocolStarterConfig
- type ProtocolTelemetrySnapshot
- type ProtocolTelemetrySource
- type ProtocolV2Error
- type ProtocolV2GuardCallFailure
- type ProtocolV2GuardFailureKind
- type ProtocolV2GuardRequest
- type ProtocolV2HostRegistrar
- type ProtocolV2InvocationActor
- type ProtocolV2ProviderBroker
- type ProtocolV2RequestAuthority
- type ProtocolV2RequestAuthorityMode
- type ProtocolV2RequestGuardKind
- type ProtocolV2RouteActor
- type ProtocolV2RouteInvocationStage
- type ProtocolV2RoutePatchKind
- type ProtocolV2RoutePatchOperation
- type ProtocolV2RouteRequest
- type ProtocolV2RouteResponse
- type ProtocolV2RouteResponseDocument
- type ProtocolV2RouteStream
- func (s *ProtocolV2RouteStream) Cancel()
- func (s *ProtocolV2RouteStream) CloseRequest() error
- func (s *ProtocolV2RouteStream) Context() context.Context
- func (s *ProtocolV2RouteStream) Recv() (ProtocolV2RouteStreamChunk, error)
- func (s *ProtocolV2RouteStream) Response() (ProtocolV2RouteStreamResponse, bool)
- func (s *ProtocolV2RouteStream) Send(data []byte, final bool) error
- type ProtocolV2RouteStreamChunk
- type ProtocolV2RouteStreamRequest
- type ProtocolV2RouteStreamResponse
- type ProtocolV2SEOApplyRequest
- type ProtocolV2SEOApplyResponse
- type ProtocolV2SEOContribution
- type ProtocolV2ServerConfig
- type ProviderProbeRequest
- type ProviderProbeResponse
- type ProviderRegistry
- type ProviderSelection
- type ProviderSlotCaller
- type ProviderSlotCandidate
- type ProviderSlotContract
- type ProviderSlotProbeResult
- type ProviderSlotRegistrySnapshot
- type ProviderSlotResolution
- type ProviderSlotSelection
- type ProviderSlotSelectionAPI
- func (a *ProviderSlotSelectionAPI) Current(ctx context.Context, contractID string) (ProviderSlotSelection, error)
- func (a *ProviderSlotSelectionAPI) Events(ctx context.Context, contractID string, limit int) ([]ProviderSlotSelectionEvent, error)
- func (a *ProviderSlotSelectionAPI) InvalidateExtension(ctx context.Context, request InvalidateProviderSlotRequest) (int64, error)
- func (a *ProviderSlotSelectionAPI) InvalidateProviderSlotSelections(ctx context.Context, extensionID string, actorUserID int64, auditEventID int64, ...) error
- func (a *ProviderSlotSelectionAPI) Reset(ctx context.Context, request ResetProviderSlotRequest) error
- func (a *ProviderSlotSelectionAPI) Resolve(ctx context.Context, caller ProviderSlotCaller, ...) (ProviderSlotResolution, string, error)
- func (a *ProviderSlotSelectionAPI) Select(ctx context.Context, contractID, candidateID string, ...) (ProviderSlotSelection, error)
- type ProviderSlotSelectionEvent
- type ProviderSlotSelectionStore
- type ProxyInput
- type ResetComponentProviderRequest
- type ResetProviderSlotRequest
- type ResilienceConfig
- type ResolvingSearchEngine
- func (e *ResolvingSearchEngine) Delete(ctx context.Context, topicID int64) error
- func (e *ResolvingSearchEngine) Enabled(ctx context.Context) bool
- func (e *ResolvingSearchEngine) EnsureIndex(ctx context.Context) error
- func (e *ResolvingSearchEngine) Index(ctx context.Context, doc search.TopicSearchDoc) error
- func (e *ResolvingSearchEngine) Probe(ctx context.Context) error
- func (e *ResolvingSearchEngine) Search(ctx context.Context, input search.SearchInput) (search.SearchResult, error)
- func (e *ResolvingSearchEngine) SelectedID(ctx context.Context) (string, bool, error)
- type RouteGateway
- type RouteTarget
- type RuntimeAdmissionGate
- type RuntimeAdmissionLease
- type RuntimeAdmissionSnapshot
- type RuntimeCallClass
- type RuntimeDatabaseLeaseRegistry
- type RuntimeEventsProviders
- func (m *RuntimeEventsProviders) AdminSurfaceSnapshot(kind string) AdminSurfaceRegistrySnapshot
- func (m *RuntimeEventsProviders) Deliver(ctx context.Context, extensionID string, deliveryID int64, ...) appevents.Result
- func (m *RuntimeEventsProviders) Emit(ctx context.Context, envelope appevents.Envelope) appevents.Result
- func (m *RuntimeEventsProviders) EmitHook(ctx context.Context, name string, payload map[string]any)
- func (m *RuntimeEventsProviders) HookBus() *HookBus
- func (m *RuntimeEventsProviders) InvokeVersionedHook(ctx context.Context, input VersionedHookInvocation) VersionedHookResult
- func (m *RuntimeEventsProviders) ProbeProviderSlotCandidate(ctx context.Context, contractID, candidateID string) (ProviderSlotProbeResult, error)
- func (m *RuntimeEventsProviders) ProtocolV2ProviderBroker() (hostapi.ProtocolV2ProviderBroker, error)
- func (m *RuntimeEventsProviders) ProviderSlotInspection(ctx context.Context) (extensions.ProviderSlotInspection, error)
- func (m *RuntimeEventsProviders) ProviderSlotSelections() *ProviderSlotSelectionAPI
- func (m *RuntimeEventsProviders) ResolveAdminSurface(id string) (AdminSurfaceContract, error)
- type RuntimeInstanceArtifactIdentity
- type RuntimeInstanceIdentity
- type RuntimeInstanceSnapshot
- type RuntimeInvoker
- func (m *RuntimeInvoker) ExecutePluginCommand(ctx context.Context, commandID string, input map[string]any, safeMode bool) (PluginCommandExecutionResult, error)
- func (m *RuntimeInvoker) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
- func (m *RuntimeInvoker) FilterQueryResultInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (m *RuntimeInvoker) InvokeAdminSurface(ctx context.Context, input AdminSurfaceInvocation) (AdminSurfaceInvocationResult, error)
- func (m *RuntimeInvoker) InvokeGuardInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) error
- func (m *RuntimeInvoker) InvokeQueryInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) ([]queryregistry.QueryRow, error)
- func (m *RuntimeInvoker) InvokeRouteInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (ProtocolV2RouteResponse, error)
- func (m *RuntimeInvoker) InvokeVersionedProvider(ctx context.Context, input VersionedProviderInvocation) (VersionedProviderInvocationResult, error)
- func (m *RuntimeInvoker) OpenRouteStreamInstance(ctx context.Context, identity RuntimeInstanceIdentity, ...) (*ProtocolV2RouteStream, error)
- func (m *RuntimeInvoker) ProbeSettingsAction(ctx context.Context, extension extensions.Extension, ...) (extensions.SettingsActionProbeResult, error)
- func (m *RuntimeInvoker) RefreshMailProvider(ctx context.Context, extensionID string) error
- func (m *RuntimeInvoker) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
- func (m *RuntimeInvoker) SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
- func (m *RuntimeInvoker) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
- func (m *RuntimeInvoker) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
- func (m *RuntimeInvoker) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
- func (m *RuntimeInvoker) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
- func (m *RuntimeInvoker) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
- func (m *RuntimeInvoker) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
- func (m *RuntimeInvoker) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
- func (m *RuntimeInvoker) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
- func (m *RuntimeInvoker) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
- func (m *RuntimeInvoker) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
- func (m *RuntimeInvoker) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
- func (m *RuntimeInvoker) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
- func (m *RuntimeInvoker) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
- func (m *RuntimeInvoker) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
- func (m *RuntimeInvoker) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
- type RuntimeRegistryGenerationSnapshot
- type RuntimeSupervisor
- func (m *RuntimeSupervisor) Check(_ context.Context, extension extensions.Extension) error
- func (m *RuntimeSupervisor) Close(ctx context.Context)
- func (m *RuntimeSupervisor) Reconcile(ctx context.Context, items []extensions.Extension)
- func (m *RuntimeSupervisor) RouteTarget(extensionID string) (RouteTarget, bool)
- func (m *RuntimeSupervisor) Start(ctx context.Context, extension extensions.Extension) error
- func (m *RuntimeSupervisor) Status(_ context.Context, extension extensions.Extension) extensions.RuntimeStatus
- func (m *RuntimeSupervisor) Stop(ctx context.Context, extension extensions.Extension) error
- type RuntimeTrustSource
- type SearchEngineDeleteRequest
- type SearchEngineIndexRequest
- type SearchEngineInvoker
- type SearchEngineProbeRequest
- type SearchEngineProbeResponse
- type SearchEngineResult
- type SearchEngineSearchRequest
- type SearchEngineSearchResponse
- type SearchProviderCandidate
- type SearchProviderRegistry
- func (r *SearchProviderRegistry) Candidates(ctx context.Context) ([]SearchProviderCandidate, error)
- func (r *SearchProviderRegistry) IsPinned(ctx context.Context) (bool, error)
- func (r *SearchProviderRegistry) RestoreDefault(ctx context.Context) error
- func (r *SearchProviderRegistry) Select(ctx context.Context, extensionID string) error
- func (r *SearchProviderRegistry) Selected(ctx context.Context) (SearchProviderSelection, bool, error)
- type SearchProviderSelection
- type SearchProviderStore
- type SearchRuntime
- type SelectComponentProviderRequest
- type SelectProviderSlotRequest
- type StagedRuntimeSetStarter
- type StagedRuntimeStarter
- type Starter
- type StorageCloseRequest
- type StorageConfigureInstanceRequest
- type StorageExistsRequest
- type StorageExistsResponse
- type StorageGetChunkRequest
- type StorageGetChunkResponse
- type StorageInstanceInvoker
- func (m *StorageInstanceInvoker) StorageConfigureInstance(ctx context.Context, extensionID string, ...) (StorageResult, error)
- func (m *StorageInstanceInvoker) StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
- func (m *StorageInstanceInvoker) StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
- type StorageInstanceProtocol
- type StorageInstanceRuntime
- type StorageObjectRequest
- type StorageOpenRequest
- type StorageProbeConfigRequest
- type StorageProbeRequest
- type StorageProbeResponse
- type StorageProviderInvoker
- type StoragePublicURLRequest
- type StoragePutBeginRequest
- type StoragePutChunkRequest
- type StorageRPCError
- type StorageRemoveInstanceRequest
- type StorageResult
- type StorageRuntime
- type StorageSessionResponse
- type StorageSignedURLRequest
- type StorageStatRequest
- type StorageStatResponse
- type StorageURLResponse
- type VersionedAIToolRequest
- type VersionedAIToolResponse
- type VersionedContentRequest
- type VersionedContentResponse
- type VersionedHookContract
- type VersionedHookInvocation
- type VersionedHookListener
- type VersionedHookRegistry
- func (r *VersionedHookRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
- func (r *VersionedHookRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *VersionedHookRegistry) Resolve(id, contractVersion string) (VersionedHookContract, []VersionedHookListener, error)
- func (r *VersionedHookRegistry) Snapshot() VersionedHookRegistrySnapshot
- func (r *VersionedHookRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
- func (r *VersionedHookRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
- type VersionedHookRegistrySnapshot
- type VersionedHookResult
- type VersionedIdentityProviderRequest
- type VersionedIdentityProviderResponse
- type VersionedProviderInvocation
- type VersionedProviderInvocationResult
- type VersionedProviderRequest
- type VersionedProviderResponse
- type VersionedProviderSlotRegistry
- func (r *VersionedProviderSlotRegistry) Discover(caller ProviderSlotCaller, id, contractVersion string) (ProviderSlotResolution, error)
- func (r *VersionedProviderSlotRegistry) HasCompiledSchemas(id, contractVersion string) bool
- func (r *VersionedProviderSlotRegistry) HasContract(id, contractVersion string) bool
- func (r *VersionedProviderSlotRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
- func (r *VersionedProviderSlotRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
- func (r *VersionedProviderSlotRegistry) Snapshot() ProviderSlotRegistrySnapshot
- func (r *VersionedProviderSlotRegistry) ValidateDocument(contractID, schema string, document map[string]any) error
- func (r *VersionedProviderSlotRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
- func (r *VersionedProviderSlotRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
- type VersionedQueryRequest
- type VersionedQueryResultFilterRequest
- type VersionedSEORequest
- type VersionedSEOResponse
Constants ¶
const ( DefaultComponentCompositionTimeout = 2 * time.Second DefaultComponentCompositionMaxTimeout = 5 * time.Second DefaultComponentCompositionMaxDepth = 16 DefaultComponentCompositionMaxSegments = 256 DefaultComponentCompositionMaxBytes = 1 << 20 DefaultComponentCompositionMaxCalls = 32 DefaultComponentCompositionTraceLimit = 256 )
const ( ComponentRenderEncodingEscapedText = "html-escaped-text" ComponentRenderEncodingSanitizedHTML = "sanitized-html" )
const ( ExtensionDatabaseLeaseIssuerActor = "actor" ExtensionDatabaseLeaseIssuerHost = "host" ExtensionDatabaseLeaseActive = "active" ExtensionDatabaseLeaseDraining = "draining" ExtensionDatabaseLeaseRevoked = "revoked" ExtensionDatabaseLeaseFailed = "failed" )
const ( DefaultExtensionDatabaseRuntimeLeaseReapLimit = 64 RecommendedExtensionDatabaseRuntimeLeaseReapInterval = 30 * time.Second )
const ( ProtocolV2ContentProviderSlot = "sforum.content" ProtocolV2ContentRequestSchema = "sforum.content.call.request@1" ProtocolV2ContentResponseSchema = "sforum.content.call.response@1" )
const ( ProtocolV2SEOProviderSlot = "sforum.seo" ProtocolV2SEOProviderOperation = "apply" ProtocolV2SEORequestSchema = "sforum.seo.apply.request@1" ProtocolV2SEOResponseSchema = "sforum.seo.apply.response@1" )
const ( RecommendedProtocolDatabaseLeaseHeartbeatInterval = 30 * time.Second RecommendedProtocolDatabaseLeaseOperationTimeout = 10 * time.Second )
const ( LifecycleActionInstallPlan = protocolv2.LifecycleAction_LIFECYCLE_ACTION_INSTALL_PLAN LifecycleActionInstall = protocolv2.LifecycleAction_LIFECYCLE_ACTION_INSTALL LifecycleActionEnable = protocolv2.LifecycleAction_LIFECYCLE_ACTION_ENABLE LifecycleActionDisable = protocolv2.LifecycleAction_LIFECYCLE_ACTION_DISABLE LifecycleActionUpgradePlan = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UPGRADE_PLAN LifecycleActionUpgradeBefore = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UPGRADE_BEFORE LifecycleActionUpgradeAfter = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UPGRADE_AFTER LifecycleActionRollback = protocolv2.LifecycleAction_LIFECYCLE_ACTION_ROLLBACK LifecycleActionUninstallPlan = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UNINSTALL_PLAN LifecycleActionUninstall = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UNINSTALL LifecycleActionUninstallAfter = protocolv2.LifecycleAction_LIFECYCLE_ACTION_UNINSTALL_AFTER LifecycleProgressPlanned = protocolv2.ProgressState_PROGRESS_STATE_PLANNED LifecycleProgressRunning = protocolv2.ProgressState_PROGRESS_STATE_RUNNING LifecycleProgressWaiting = protocolv2.ProgressState_PROGRESS_STATE_WAITING LifecycleProgressSucceeded = protocolv2.ProgressState_PROGRESS_STATE_SUCCEEDED LifecycleProgressFailed = protocolv2.ProgressState_PROGRESS_STATE_FAILED LifecycleProgressCancelled = protocolv2.ProgressState_PROGRESS_STATE_CANCELLED )
const ( ProtocolV2AIToolProviderSlot = "sforum.ai.tool" ProtocolV2AIToolProviderOperation = "invoke" ProtocolV2AIToolRequestSchema = "sforum.ai.tool.invoke.request@1" ProtocolV2AIToolResponseSchema = "sforum.ai.tool.invoke.response@1" )
AI 工具调用复用既有的 versioned ProviderCall 传输。
为什么不新增一个 proto 服务:ProviderCall 已经带有精确声明绑定、契约版本、 超时与错误信封,新增 RPC 会把这套边界复制一遍并引入第二处漂移。工具只是 一个 slot 下的 operation,与 SEO 的做法完全一致。
const ( DefaultProtocolV2MaxMessageBytes = pluginv2sdk.DefaultMaxMessageBytes DefaultProtocolV2ConcurrentCalls = pluginv2sdk.DefaultConcurrentCalls DefaultProtocolV2RequestTimeout = pluginv2sdk.DefaultRequestTimeout DefaultProtocolV2HandshakeTimeout = pluginv2sdk.DefaultHandshakeTimeout ProtocolV2RuntimeTokenMetadataKey = pluginv2sdk.RuntimeTokenMetadataKey )
const ( DefaultMaxConcurrentRPC = 4 DefaultFailureThreshold = 5 DefaultCircuitOpenSeconds = 30 DefaultMailTimeoutMS = 15000 // 存储 Put/Open 可跨多块 RPC;单次调用默认上限 120s(E6.2)。 DefaultStorageTimeoutMS = 120000 )
F2.3 默认韧性参数。后续可接 runtime option,当前用稳定宿主默认。
const ( RuntimeCallRoute = extensionruntime.RuntimeCallRoute RuntimeCallGuard = extensionruntime.RuntimeCallGuard RuntimeCallPage = extensionruntime.RuntimeCallPage RuntimeCallHook = extensionruntime.RuntimeCallHook RuntimeCallProvider = extensionruntime.RuntimeCallProvider RuntimeCallService = extensionruntime.RuntimeCallService RuntimeCallHost = extensionruntime.RuntimeCallHost RuntimeCallJob = extensionruntime.RuntimeCallJob RuntimeCallSchedule = extensionruntime.RuntimeCallSchedule RuntimeCallCommand = extensionruntime.RuntimeCallCommand RuntimeCallAdminSurface = extensionruntime.RuntimeCallAdminSurface RuntimeCallLifecycleCleanup = extensionruntime.RuntimeCallLifecycleCleanup )
const DefaultPluginChunkSize = 1 << 20
DefaultPluginChunkSize 默认分块大小(E6.2 决策:1 MiB)。
const DefaultProtocolV2RouteStreamTimeout = 24 * time.Hour
DefaultProtocolV2RouteStreamTimeout bounds abandoned long-lived connections while leaving ordinary disconnect and runtime-drain cancellation immediate.
const DefaultSiteSearchExtensionID = search.DefaultSiteSearchExtensionID
DefaultSiteSearchExtensionID 与 search 包默认站内扩展 id 一致。
const (
MailProviderSlot = "mail.provider"
)
const MaxProtocolV2RouteChunkSize = 1 << 20
const ProtocolV2IdentityProviderSlot = "sforum.identity"
const RecommendedPluginRuntimeFullSetDrainTimeout = 30 * time.Second
const SearchProviderSlot = search.ProviderSlot
SearchProviderSlot 与 search.ProviderSlot 一致。
const VersionedProviderOperationInvoke = "invoke"
Variables ¶
var ( ErrAdminSurfaceNotInvokable = errors.New("admin surface has no typed runtime handler") ErrAdminSurfaceRuntimeStale = errors.New("admin surface runtime contract is stale") )
var ( ErrAdminSurfaceRegistryInvalid = errors.New("admin surface registry declaration is invalid") ErrAdminSurfaceRegistryConflict = errors.New("admin surface registry contract conflicts with the active snapshot") ErrAdminSurfaceNotFound = errors.New("admin surface is not found") )
var ( ErrComponentCompositionInvalid = errors.New("component composition request is invalid") ErrComponentCompositionStale = errors.New("component composition snapshot is stale") ErrComponentCompositionTimeout = errors.New("component composition call timed out") ErrComponentCompositionCrash = errors.New("component composition renderer crashed") ErrComponentCompositionCycle = errors.New("component composition cycle detected") ErrComponentCompositionDepth = errors.New("component composition depth exceeded") ErrComponentCompositionOutput = errors.New("component composition output exceeds Host bounds") ErrComponentCompositionMutation = errors.New("component composition changed a protected field") ErrComponentCompositionSEO = errors.New("component composition removed primary SSR content") ErrComponentCompositionBusy = errors.New("component composition renderer capacity is exhausted") )
var ( ErrComponentRegistryInvalid = errors.New("component registry declaration is invalid") ErrComponentRegistryConflict = errors.New("component registry contract conflicts with the active snapshot") ErrComponentRegistryTargetNotFound = errors.New("component registry target is not found") ErrComponentRegistryProviderNotFound = errors.New("component registry replace provider is not found") ErrComponentRegistryRevisionConflict = errors.New("component registry revision conflict") ErrComponentRegistrySafeMode = errors.New("component registry publication is disabled by Safe Mode") )
var ( ErrExtensionDatabaseDispositionInvalid = errors.New("extension database disposition input is invalid") ErrExtensionDatabaseDispositionConflict = errors.New("extension database disposition exact fence conflict") )
var ( ErrExtensionDatabaseMigrationInvalid = errors.New("extension database migration plan is invalid") ErrExtensionDatabaseMigrationArtifactConflict = errors.New("extension database migration exact artifact conflict") ErrExtensionDatabaseMigrationPackage = errors.New("extension database migration package is invalid") ErrExtensionDatabaseMigrationChecksumDrift = errors.New("extension database migration checksum drift") )
var ( ErrExtensionDatabaseMigrationParse = errors.New("extension database migration parse failed") ErrExtensionDatabaseMigrationPolicy = errors.New("extension database migration transaction policy mismatch") )
var ( ErrExtensionDatabaseRegistryInvalid = errors.New("extension database registry input is invalid") ErrExtensionDatabaseArtifactConflict = errors.New("extension database exact artifact conflict") ErrExtensionDatabaseGrantNotFound = errors.New("extension database exact grant not found") ErrExtensionDatabaseAuthority = errors.New("extension database authority is not supported") ErrExtensionDatabaseCoreIncompatible = errors.New("extension database authority is incompatible with migrated Core") ErrExtensionDatabaseResourceConflict = errors.New("extension database physical resource conflict") ErrExtensionDatabaseCredential = errors.New("extension database credential operation failed") )
var ( ErrExtensionDatabaseRuntimeLeaseNotFound = errors.New("extension database runtime lease not found") ErrExtensionDatabaseRuntimeLeaseConflict = errors.New("extension database runtime lease conflict") )
var ( ErrHookRegistryInvalid = errors.New("extension hook registry declaration is invalid") ErrHookRegistryConflict = errors.New("extension hook registry contract conflicts with the active snapshot") ErrHookRegistryDependency = errors.New("extension hook registry dependency is not declared") ErrHookRegistryContractNotFound = errors.New("extension hook registry contract is not found") )
var ( ErrLifecycleBoundaryFenceInvalid = errors.New("extension lifecycle boundary fence is invalid") ErrLifecycleBoundaryFenceConflict = errors.New("extension lifecycle boundary exact fence conflict") )
var ( ErrLifecycleCleanupNotStaged = errors.New("extension lifecycle cleanup tombstone is not staged") ErrLifecycleCleanupNotTerminal = errors.New("extension lifecycle cleanup operation has not succeeded") ErrLifecycleCleanupPurgeInvalid = errors.New("extension lifecycle cleanup purge receipt is invalid") )
var ( ErrLifecycleCleanupInvalid = errors.New("extension lifecycle cleanup input is invalid") ErrLifecycleCleanupConflict = errors.New("extension lifecycle cleanup exact fence conflict") ErrLifecycleCleanupExportEvidenceMissing = errors.New("extension lifecycle cleanup export evidence is missing") )
var ( ErrLifecycleBoundaryInvalid = errors.New("extension lifecycle composed boundary is invalid") ErrLifecycleBoundaryDependencyMissing = errors.New("extension lifecycle composed boundary dependency is unavailable") ErrLifecycleBoundaryCompensationFailed = errors.New("extension lifecycle composed boundary compensation failed") ErrLifecycleBoundarySourceResumeUnsafe = errors.New("extension lifecycle source resume is not proven safe") )
var ( ErrLifecycleHostGateInvalid = errors.New("extension lifecycle Host gate is invalid") ErrLifecycleHostBoundaryMissing = errors.New("extension lifecycle Host boundary is unavailable") // ErrLifecycleHostRuntimeDiverged means the active process for an extension // does not run the artifact the Host records as its active version. The // source role must never stage a replacement for that case: the drain and // publication fences are keyed to the recorded artifact, so a staged decoy // can be drained while the real process stays open, and every later // publication fails closed on an unsatisfiable fence. ErrLifecycleHostRuntimeDiverged = errors.New("extension lifecycle active runtime diverged from the recorded active artifact") )
var ( ErrLifecycleBoundaryJobsInvalid = errors.New("extension lifecycle jobs boundary input is invalid") ErrLifecycleBoundaryJobsConflict = errors.New("extension lifecycle jobs publication conflict") ErrLifecycleBoundaryJobsUncommitted = errors.New("extension lifecycle jobs publication is not committed") ErrLifecycleBoundaryJobsCommitted = errors.New("extension lifecycle jobs publication is already committed") )
var ( ErrLifecycleMigrationsInvalid = errors.New("extension lifecycle migration boundary input is invalid") ErrLifecycleMigrationsConflict = errors.New("extension lifecycle migration exact proof conflict") ErrLifecycleMigrationProofRequired = errors.New("extension lifecycle real migration proof is required") ErrLifecycleMigrationEngineProofBad = errors.New("extension lifecycle migration engine returned an invalid proof") )
var ( ErrLifecyclePreflightUntrusted = errors.New("extension lifecycle target artifact is not trusted") ErrLifecyclePreflightMigrations = errors.New("extension lifecycle target migration state is not ready") )
var ( ErrLifecyclePublicationJournalInvalid = errors.New("extension lifecycle publication journal input is invalid") ErrLifecyclePublicationJournalNotPrepared = errors.New("extension lifecycle publication is not prepared") ErrLifecyclePublicationJournalConflict = errors.New("extension lifecycle publication exact fence conflict") )
var ( ErrLifecycleRegistryPublicationInvalid = errors.New("extension lifecycle registry publication input is invalid") ErrLifecycleRegistryPublicationConflict = errors.New("extension lifecycle registry publication exact fence conflict") ErrLifecycleRegistryPublicationNotPrepared = errors.New("extension lifecycle registry publication is not prepared") ErrLifecycleRegistryPublicationCommitted = errors.New("extension lifecycle registry publication marker is committed") )
var ( ErrIdentityProviderInvocationInvalid = errors.New("identity provider invocation is invalid") ErrIdentityProviderStale = errors.New("identity provider exact contract is stale") ErrIdentityProviderAcceptFailed = errors.New("identity provider Host acceptance failed") )
var ( ErrPluginCommandRegistryInvalid = errors.New("plugin command registry declaration is invalid") ErrPluginCommandRegistryConflict = errors.New("plugin command registry contract conflicts with the active snapshot") ErrPluginCommandNotFound = errors.New("plugin command is not found") ErrPluginCommandSafeMode = errors.New("plugin command is unavailable in safe mode") )
var ( // ErrPluginRuntimeFullSetInvalid 表示 full-set 适配器入参或 durable publication 不合法。 ErrPluginRuntimeFullSetInvalid = errors.New("extensions: plugin runtime full set is invalid") // ErrPluginRuntimeFullSetConflict 表示 exact artifact / Manager 指针与期望 full set 不一致。 ErrPluginRuntimeFullSetConflict = errors.New("extensions: plugin runtime full set conflict") )
var ( ErrUnsupportedProtocol = errors.New("unsupported plugin protocol") ErrInvalidPluginJobStream = errors.New("invalid protocol v2 plugin job progress stream") // ErrUnsafePluginRouteTarget 插件回报的 BaseURL 不允许被 API 代理(SSRF 防护)。 ErrUnsafePluginRouteTarget = errors.New("plugin route target is not allowed") )
var ( ErrProtocolInstanceUnsupported = errors.New("protocol runtime instance operation is unsupported") ErrProtocolInstancePublished = errors.New("protocol runtime instance has been published") ErrProtocolInstanceUnhealthy = errors.New("protocol runtime instance is unhealthy") ErrProtocolInstanceNotReady = errors.New("protocol runtime instance is not ready") )
var ( ErrLifecycleV2Unsupported = errors.New("protocol v2 lifecycle is not supported by this runtime") ErrInvalidLifecycleRun = errors.New("invalid protocol v2 lifecycle run") ErrInvalidLifecycleStream = errors.New("invalid protocol v2 lifecycle progress stream") )
var ( ErrProtocolV2ActorDelegationInvalid = errors.New("protocol v2 actor delegation is invalid") )
var ( ErrProtocolV2GuardInvalid = errors.New("protocol v2 guard invocation is invalid") ErrProtocolV2GuardDenied = errors.New("protocol v2 guard denied the request") ErrProtocolV2GuardRuntimeFailed = errors.New("protocol v2 guard runtime failed") )
var ( ErrProtocolV2RouteStreamInvalid = errors.New("protocol v2 route stream is invalid") ErrProtocolV2RouteStreamMissingTerminal = errors.New("protocol v2 route stream terminal is missing") )
var ( ErrProtocolV2RouteInvalid = errors.New("protocol v2 route invocation is invalid") ErrProtocolV2RouteResponseInvalid = errors.New("protocol v2 route response is invalid") ErrProtocolV2RouteUnsupported = errors.New("protocol v2 unary route is unsupported") ErrProtocolV2RouteStream = errors.New("protocol v2 route requires the streaming transport") )
var ( ErrProviderSlotInvalid = errors.New("extension provider slot declaration is invalid") ErrProviderSlotConflict = errors.New("extension provider slot contract conflicts with the active snapshot") ErrProviderSlotNotFound = errors.New("extension provider slot is not found") ErrProviderSlotDenied = errors.New("extension provider slot caller is denied") ErrProviderSlotNoProvider = errors.New("extension provider slot has no available provider") ErrProviderSlotInputInvalid = errors.New("extension provider slot input is invalid") ErrProviderSlotOutputInvalid = errors.New("extension provider slot output is invalid") )
var ( ErrProviderSlotSelectionInvalid = errors.New("extension provider slot selection is invalid") ErrProviderSlotSelectionNotFound = errors.New("extension provider slot selection is not found") ErrProviderSlotSelectionRevisionConflict = errors.New("extension provider slot selection revision conflict") ErrProviderSlotSelectionStale = errors.New("extension provider slot selection is stale") )
var ( ErrRuntimeAdmissionInvalid = extensionruntime.ErrRuntimeAdmissionInvalid ErrRuntimeAdmissionDraining = extensionruntime.ErrRuntimeAdmissionDraining ErrRuntimeAdmissionQuarantined = extensionruntime.ErrRuntimeAdmissionQuarantined ErrRuntimeAdmissionForced = extensionruntime.ErrRuntimeAdmissionForced ErrRuntimeAdmissionBusy = extensionruntime.ErrRuntimeAdmissionBusy )
var ( ErrRuntimeInstanceNotFound = extensionruntime.ErrRuntimeInstanceNotFound ErrRuntimeInstanceNotActive = extensionruntime.ErrRuntimeInstanceNotActive ErrRuntimeInstanceActive = extensionruntime.ErrRuntimeInstanceActive ErrRuntimeInstanceBusy = extensionruntime.ErrRuntimeInstanceBusy ErrRuntimeInstanceConflict = extensionruntime.ErrRuntimeInstanceConflict ErrRuntimeInstanceNotDrained = extensionruntime.ErrRuntimeInstanceNotDrained ErrRuntimeTrustRevoked = extensionruntime.ErrRuntimeTrustRevoked )
var ( ErrStorageCircuitOpen = extensionruntime.ErrStorageCircuitOpen ErrStorageTimeout = extensionruntime.ErrStorageTimeout )
宿主侧可识别的存储 RPC 拒绝(PluginStorageAdapter 映射为 fail-closed)。
var ErrComponentCompositionPermissionDenied = errors.New("component composition permission denied")
var (
ErrExtensionDatabaseIdentifier = extensiondatabase.ErrIdentifier
)
var ErrExtensionDatabaseMigrationRecoveryRequired = errors.New("extension database migration requires explicit recovery")
var ErrPluginCommandRuntimeStale = errors.New("plugin command runtime contract is stale")
var ErrPluginExecutableUntrusted = errors.New("plugin executable is not the trusted artifact")
ErrPluginExecutableUntrusted 表示 exec 被拒绝:制品与受信结论不一致,或启动 环境落在不该允许的位置。
var ErrProtocolV2ContentInvalid = errors.New("protocol v2 content invocation is invalid")
var ErrProtocolV2IdentityProviderInvalid = errors.New("protocol v2 identity provider invocation is invalid")
var ErrProtocolV2RequestAuthorityInvalid = errors.New("protocol v2 request authority is invalid")
var ErrRuntimeRouteIncident = errors.New("extension runtime quarantined after route execution incident")
var ErrVersionedRuntimeContractInvalid = errors.New("extension versioned runtime contract is invalid")
var NewRuntimeAdmissionGate = extensionruntime.NewRuntimeAdmissionGate
Functions ¶
func BuildLifecycleIdentityPublication ¶
func BuildLifecycleIdentityPublication( extension extensions.Extension, binding extensions.LifecycleRuntimeBinding, ) (*identityregistry.Publication, error)
BuildLifecycleIdentityPublication constructs the exact lifecycle Identity Registry publication used by enable/restore paths. Integration tests call this to prove the same Schema/provider metadata path without driving the full coordinator.
func BuildLifecycleQueryPublication ¶
func BuildLifecycleQueryPublication( extension extensions.Extension, binding extensions.LifecycleRuntimeBinding, ) (*queryregistry.Publication, error)
BuildLifecycleQueryPublication constructs the exact lifecycle Query Registry publication used by enable/restore paths. Integration tests call this to prove the same Schema/filter metadata path without driving the full coordinator.
func IsSiteSearchProvider ¶
IsSiteSearchProvider 判断扩展 id 是否为 Host 短路的站内搜索。
func NewCompositeQueryProviderResolver ¶
func NewCompositeQueryProviderResolver( core queryregistry.ExecutableProviderResolver, manager *Manager, registry *queryregistry.Registry, ) (queryregistry.ExecutableProviderResolver, error)
NewCompositeQueryProviderResolver keeps Core HostAPI providers authoritative and resolves third-party executable handlers through Protocol V2 at call time. Composition uses the Query Registry package-private resolve surface via NewFallbackProviderResolver so Extensions never type-asserts unexported methods.
func NewProtocolV2QueryResultFilterSource ¶
func NewProtocolV2QueryResultFilterSource( manager *Manager, registry *queryregistry.Registry, ) (queryregistry.ResultFilterSource, error)
NewProtocolV2QueryResultFilterSource builds Protocol V2 filter adapters from published ResultFilter declarations. Callables are resolved at execution time against the exact active runtime, not captured at process start.
func NewProtocolV2SEOProviderResolver ¶
func NewProtocolV2SEOProviderResolver(manager *Manager) seoregistry.ProviderResolver
NewProtocolV2SEOProviderResolver maps immutable SEO Registry declarations to the existing Protocol V2 ProviderCall transport. Resolution performs no database work and never captures a startup-only runtime instance.
func NewSEOExecutionAdmission ¶
func NewSEOExecutionAdmission(manager *Manager) seoregistry.ExecutionAdmission
NewSEOExecutionAdmission holds an exact Manager runtime lease across all SEO callbacks and the non-overridable Host final-policy fence.
func RegisterEventDeliveryWorker ¶
func RegisterEventDeliveryWorker(registry *supportjobs.Registry, manager *Manager)
func ServeProtocolV2Plugin ¶
func ServeProtocolV2Plugin(server pluginwire.PluginRuntimeServiceServer, config ProtocolV2ServerConfig)
ServeProtocolV2Plugin is retained for Host integration fixtures. Plugin authors should call pluginv2.Serve directly.
func ValidateLifecycleCleanupPurgeReceipt ¶
func ValidateLifecycleCleanupPurgeReceipt( request LifecycleCleanupPurgeRequest, receipt LifecycleCleanupPurgeReceipt, ) ([]byte, string, error)
func ValidateProtocolV2InvocationIdempotencyKey ¶
ValidateProtocolV2InvocationIdempotencyKey lets HTTP adapters reject a bad key before audit or plugin execution. Empty means the optional header was not supplied and remains valid.
Types ¶
type AIToolRuntimeInvoker ¶
type AIToolRuntimeInvoker struct {
// contains filtered or unexported fields
}
AIToolRuntimeInvoker 是 AI 工具派发的聚焦协作者。
为什么单独一类:Manager(72) 与 RuntimeInvoker(28) 的接收者方法数都是不可增长 的架构基线,而 AI 工具派发是独立职责。与 events_publish.go 的 ExtensionEventPublisher 同一手法:新职责进新协作者,不往 God object 上堆。
它自己不做超时、schema 或身份判定——那些都在 protocolV2Client 的冻结声明校验 里;这里只负责从 Manager 拿到当前进程的 Starter 并转发一次。
func NewAIToolRuntimeInvoker ¶
func NewAIToolRuntimeInvoker(manager *Manager) *AIToolRuntimeInvoker
NewAIToolRuntimeInvoker 绑定 Manager 持有的 Starter。 manager 为 nil 时构造出的协作者一律报告不可用,而不是静默成功。
func (*AIToolRuntimeInvoker) InvokeVersionedAITool ¶
func (i *AIToolRuntimeInvoker) InvokeVersionedAITool( ctx context.Context, extension extensions.Extension, input VersionedAIToolRequest, ) (VersionedAIToolResponse, error)
type AdminSurfaceContract ¶
type AdminSurfaceContract struct {
ID string `json:"id"`
ContractVersion string `json:"contractVersion"`
ExtensionID string `json:"extensionId"`
ExtensionVersion string `json:"extensionVersion"`
ArtifactDigest string `json:"artifactDigest"`
InstanceID string `json:"runtimeInstanceId"`
Kind string `json:"kind"`
Action string `json:"action"`
TargetID string `json:"targetId,omitempty"`
PlacementID string `json:"placementId,omitempty"`
PlacementContractVersion string `json:"placementContractVersion,omitempty"`
Label string `json:"label"`
Handler string `json:"handler,omitempty"`
PropsSchema string `json:"propsSchema,omitempty"`
PropsSchemaDigest string `json:"propsSchemaDigest,omitempty"`
ResultSchema string `json:"resultSchema,omitempty"`
ResultSchemaDigest string `json:"resultSchemaDigest,omitempty"`
Operation string `json:"operation"`
// Schema fields preserve the old catalog response until P13 removes the
// single-document compatibility contract.
Schema string `json:"schema,omitempty"`
SchemaDigest string `json:"schemaDigest,omitempty"`
Permission string `json:"permission,omitempty"`
Priority int `json:"priority"`
// contains filtered or unexported fields
}
type AdminSurfaceInvocation ¶
type AdminSurfaceInvocation struct {
ExpectedContract AdminSurfaceContract
ContractVersion string
Input map[string]any
Actor *ProtocolV2InvocationActor
IdempotencyKey string
}
type AdminSurfaceInvocationResult ¶
type AdminSurfaceInvocationResult struct {
Contract AdminSurfaceContract
Output map[string]any
}
type AdminSurfaceRegistry ¶
type AdminSurfaceRegistry struct {
// contains filtered or unexported fields
}
AdminSurfaceRegistry freezes the complete operator UI contribution catalog to exact runtime instances. Rendering and handler invocation consume only a snapshot, so an upgrade cannot mutate contracts underneath an admin request.
func NewAdminSurfaceRegistry ¶
func NewAdminSurfaceRegistry() *AdminSurfaceRegistry
func (*AdminSurfaceRegistry) RemoveRuntime ¶
func (r *AdminSurfaceRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
func (*AdminSurfaceRegistry) ReplaceRuntime ¶
func (r *AdminSurfaceRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*AdminSurfaceRegistry) Resolve ¶
func (r *AdminSurfaceRegistry) Resolve(id string) (AdminSurfaceContract, error)
func (*AdminSurfaceRegistry) Snapshot ¶
func (r *AdminSurfaceRegistry) Snapshot(kind string) AdminSurfaceRegistrySnapshot
func (*AdminSurfaceRegistry) ValidateDocument ¶
func (r *AdminSurfaceRegistry) ValidateDocument(contract AdminSurfaceContract, document map[string]any) error
ValidateDocument preserves the pre-split API as a props validation alias.
func (*AdminSurfaceRegistry) ValidateProps ¶
func (r *AdminSurfaceRegistry) ValidateProps(contract AdminSurfaceContract, document map[string]any) error
func (*AdminSurfaceRegistry) ValidateRemoveRuntime ¶
func (r *AdminSurfaceRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
func (*AdminSurfaceRegistry) ValidateReplaceRuntime ¶
func (r *AdminSurfaceRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*AdminSurfaceRegistry) ValidateResult ¶
func (r *AdminSurfaceRegistry) ValidateResult(contract AdminSurfaceContract, document map[string]any) error
type AdminSurfaceRegistrySnapshot ¶
type AdminSurfaceRegistrySnapshot struct {
Revision uint64 `json:"revision"`
Surfaces []AdminSurfaceContract `json:"surfaces"`
}
type ComponentActorAuthority ¶
ComponentActorAuthority is the Host-authenticated credential ceiling for one composition. The live authorizer intersects it with current RBAC; reloading a user must never restore permissions removed by a scoped PAT or other caller.
type ComponentCallPolicy ¶
type ComponentCallPolicyResolver ¶
type ComponentCallPolicyResolver func(ComponentContribution) ComponentCallPolicy
type ComponentCompositionContract ¶
type ComponentCompositionContract struct {
ValidateProps ComponentDocumentValidator
ValidateResult ComponentDocumentValidator
MutablePropsFields []string
MutableResultFields []string
RetainPrimaryContent bool
}
type ComponentCompositionExecutor ¶
type ComponentCompositionExecutor struct {
// contains filtered or unexported fields
}
func NewComponentCompositionExecutor ¶
func NewComponentCompositionExecutor(config ComponentCompositionExecutorConfig) (*ComponentCompositionExecutor, error)
func (*ComponentCompositionExecutor) Compose ¶
func (e *ComponentCompositionExecutor) Compose( ctx context.Context, request ComponentCompositionRequest, ) (result ComponentCompositionResult, err error)
func (*ComponentCompositionExecutor) InspectorTraces ¶
func (e *ComponentCompositionExecutor) InspectorTraces() []ComponentCompositionTrace
type ComponentCompositionExecutorConfig ¶
type ComponentCompositionExecutorConfig struct {
Registry *ComponentRegistry
Renderer ComponentSSRRenderer
ResolveTarget ComponentTargetBindingResolver
Admission ComponentRuntimeAdmission
PermissionAuthorizer ComponentPermissionAuthorizer
Terminator ComponentRendererTerminator
ResolvePolicy ComponentCallPolicyResolver
DefaultTimeout time.Duration
MaxTimeout time.Duration
MaxDepth int
MaxSegments int
MaxOutputBytes int
MaxConcurrentCalls int
TraceLimit int
}
type ComponentCompositionInspector ¶
type ComponentCompositionInspector struct {
// contains filtered or unexported fields
}
ComponentCompositionInspector projects runtime state into the stable, redacted admin inspection contract.
func NewComponentCompositionInspector ¶
func NewComponentCompositionInspector(registry *ComponentRegistry, composition *ProductionComponentComposition) *ComponentCompositionInspector
func (*ComponentCompositionInspector) Inspect ¶
func (i *ComponentCompositionInspector) Inspect(limit int) extensioncomposition.Snapshot
type ComponentCompositionRequest ¶
type ComponentCompositionRequest struct {
TargetID string
TargetContractVersion string
ExpectedRevision uint64
Actor ComponentActorAuthority
Props map[string]any
Binding ComponentTargetBinding
}
type ComponentCompositionResult ¶
type ComponentCompositionResult struct {
Revision uint64 `json:"revision"`
Target ComponentTarget `json:"target"`
Props map[string]any `json:"props"`
Result map[string]any `json:"result"`
Segments []ComponentRenderSegment `json:"segments"`
Hidden bool `json:"hidden"`
TraceID string `json:"traceId"`
}
type ComponentCompositionTrace ¶
type ComponentCompositionTrace struct {
ID string `json:"id"`
Revision uint64 `json:"revision"`
TargetID string `json:"targetId"`
TargetContractVersion string `json:"targetContractVersion"`
StartedAt time.Time `json:"startedAt"`
DurationMicros int64 `json:"durationMicros"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
Steps []ComponentCompositionTraceStep `json:"steps"`
}
type ComponentCompositionTraceStep ¶
type ComponentCompositionTraceStep struct {
Sequence int `json:"sequence"`
TargetID string `json:"targetId"`
ContributionID string `json:"contributionId,omitempty"`
Action string `json:"action"`
Artifact HookArtifact `json:"artifact"`
Status string `json:"status"`
FailurePolicy string `json:"failurePolicy,omitempty"`
TimeoutMS int64 `json:"timeoutMs,omitempty"`
FallbackReason string `json:"fallbackReason,omitempty"`
DurationMicros int64 `json:"durationMicros"`
}
type ComponentContribution ¶
type ComponentContribution struct {
ID string `json:"id"`
ContractVersion string `json:"contractVersion"`
Action string `json:"action"`
TargetID string `json:"targetId,omitempty"`
TargetContractVersion string `json:"targetContractVersion,omitempty"`
Priority int `json:"priority"`
Permission string `json:"permission,omitempty"`
SSRTemplate string `json:"ssrTemplate,omitempty"`
L2Component string `json:"l2Component,omitempty"`
PropsSchema string `json:"propsSchema,omitempty"`
PropsSchemaDigest string `json:"propsSchemaDigest,omitempty"`
ResultSchema string `json:"resultSchema,omitempty"`
ResultSchemaDigest string `json:"resultSchemaDigest,omitempty"`
ThemeOverrideKey string `json:"themeOverrideKey,omitempty"`
Artifact HookArtifact `json:"artifact"`
// contains filtered or unexported fields
}
type ComponentDocumentValidator ¶
ComponentDocumentValidator is supplied by the owner of the target contract. Core and plugin business schemas therefore remain authoritative; the composition executor does not infer a wider contract from a contribution.
type ComponentFallbackCall ¶
type ComponentFallbackRenderer ¶
type ComponentFallbackRenderer func(context.Context, ComponentFallbackCall) (ComponentRenderResponse, error)
type ComponentPermissionAuthorizerFunc ¶
func (ComponentPermissionAuthorizerFunc) AuthorizeComponent ¶
type ComponentProviderConflict ¶
type ComponentProviderConflict struct {
TargetID string `json:"targetId"`
TargetContractVersion string `json:"targetContractVersion"`
Candidates []ComponentContribution `json:"candidates"`
Winner *ComponentContribution `json:"winner,omitempty"`
ExplicitSelection bool `json:"explicitSelection"`
}
type ComponentProviderSelection ¶
type ComponentProviderSelection struct {
TargetID string `json:"targetId"`
TargetContractVersion string `json:"targetContractVersion"`
ContributionID string `json:"contributionId"`
Artifact HookArtifact `json:"artifact"`
SelectedAtRevision uint64 `json:"selectedAtRevision"`
}
type ComponentRegistry ¶
type ComponentRegistry struct {
// contains filtered or unexported fields
}
ComponentRegistry publishes one complete component graph. Writers rebuild off to the side and readers observe either the old or the new exact-runtime snapshot, never a partially removed target or modifier chain.
func NewComponentRegistry ¶
func NewComponentRegistry() *ComponentRegistry
func (*ComponentRegistry) AdmitPublicComponent ¶
func (r *ComponentRegistry) AdmitPublicComponent( extension extensions.Extension, declaration extensions.ManifestComponent, ) bool
AdmitPublicComponent is the fail-closed bridge used by the public L2 descriptor service. It admits only the exact active artifact and, for a replacement, only the current winner. A hidden target never exposes an L2 descriptor even if its package manifest still contains the declaration.
func (*ComponentRegistry) PublishComponentPackageRuntime ¶
func (r *ComponentRegistry) PublishComponentPackageRuntime(extension extensions.Extension) error
PublishComponentPackageRuntime 注册一个扩展包的公开 L2 组件运行时。 实例 id 由 componentPackageRuntimeInstanceID 按 type+id+version+digest 派生, 因此「启动恢复」(RestoreRuntimes)与「生命周期启用」得到同一注册结果。 无组件声明的包是空操作,便于调用方无条件下发。
func (*ComponentRegistry) PublishThemeTransition ¶
func (r *ComponentRegistry) PublishThemeTransition( target, source *extensions.Extension, publicationRevision int64, ) error
PublishThemeTransition atomically replaces the exact active theme component publication. The durable theme publication revision makes two transitions from the same source deterministic even when they arrive out of order.
func (*ComponentRegistry) RemoveComponentPackageRuntime ¶
func (r *ComponentRegistry) RemoveComponentPackageRuntime(extensionID string) (bool, error)
RemoveComponentPackageRuntime 移除该包的组件运行时注册(禁用/卸载收敛)。 未注册时返回 false,不视为错误。
func (*ComponentRegistry) RemoveRuntime ¶
func (r *ComponentRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
func (*ComponentRegistry) ReplaceAll ¶
func (r *ComponentRegistry) ReplaceAll(snapshots []ComponentRuntimeSnapshot) error
ReplaceAll validates and publishes one complete component graph. The graph is built once, so required cross-plugin targets do not depend on input order.
func (*ComponentRegistry) ReplaceRuntime ¶
func (r *ComponentRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*ComponentRegistry) ResetReplaceProvider ¶
func (r *ComponentRegistry) ResetReplaceProvider(request ResetComponentProviderRequest) (bool, error)
func (*ComponentRegistry) ResolvePlan ¶
func (r *ComponentRegistry) ResolvePlan(targetID, contractVersion string) (ComponentResolvePlan, error)
func (*ComponentRegistry) RestoreRuntimes ¶
func (r *ComponentRegistry) RestoreRuntimes(items []extensions.Extension, safeMode bool) error
RestoreRuntimes reconstructs enabled Manifest V3 component packages without requiring an executable backend. Safe Mode atomically removes all extension registrations while retaining the Host-owned Core target catalog.
func (*ComponentRegistry) RollbackThemeTransition ¶
func (r *ComponentRegistry) RollbackThemeTransition( target, source *extensions.Extension, publicationRevision int64, ) error
RollbackThemeTransition restores a process-local transition whose later Page publication failed. It succeeds only while that exact durable revision is still current, so a delayed rollback cannot revoke a newer artifact.
func (*ComponentRegistry) RuntimeSnapshot ¶
func (r *ComponentRegistry) RuntimeSnapshot(extensionID string) (ComponentRuntimeSnapshot, bool)
func (*ComponentRegistry) SelectReplaceProvider ¶
func (r *ComponentRegistry) SelectReplaceProvider( request SelectComponentProviderRequest, ) (ComponentProviderSelection, error)
SelectReplaceProvider applies an exact, revision-fenced in-memory selection. The admin/lifecycle owner must separately authorize the actor and durably audit the decision before calling this leaf; the Registry does not invent a second persistence or permission model.
func (*ComponentRegistry) Snapshot ¶
func (r *ComponentRegistry) Snapshot() ComponentRegistrySnapshot
func (*ComponentRegistry) ValidateProps ¶
func (r *ComponentRegistry) ValidateProps(contribution ComponentContribution, document any) error
func (*ComponentRegistry) ValidateRemoveRuntime ¶
func (r *ComponentRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
func (*ComponentRegistry) ValidateReplaceRuntime ¶
func (r *ComponentRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*ComponentRegistry) ValidateResult ¶
func (r *ComponentRegistry) ValidateResult(contribution ComponentContribution, document any) error
func (*ComponentRegistry) ValidateThemeTransition ¶
func (r *ComponentRegistry) ValidateThemeTransition(target, source *extensions.Extension) error
ValidateThemeTransition builds the exact post-switch component graph without publishing it. Theme activation calls this before its database CAS.
type ComponentRegistrySnapshot ¶
type ComponentRegistrySnapshot struct {
Revision uint64 `json:"revision"`
SafeMode bool `json:"safeMode"`
Targets []ComponentTarget `json:"targets"`
Contributions []ComponentContribution `json:"contributions"`
Conflicts []ComponentProviderConflict `json:"conflicts"`
Selections []ComponentProviderSelection `json:"selections"`
}
type ComponentRenderCall ¶
type ComponentRenderCall struct {
TargetID string `json:"targetId"`
TargetContractVersion string `json:"targetContractVersion"`
Contribution ComponentContribution `json:"contribution"`
Artifact HookArtifact `json:"artifact"`
Props map[string]any `json:"props"`
Result map[string]any `json:"result"`
Children []ComponentRenderSegment `json:"children,omitempty"`
Depth int `json:"depth"`
}
type ComponentRenderFragment ¶
type ComponentRenderFragment struct {
// Text is ordinary text and is escaped by html/template before release.
Text string `json:"text,omitempty"`
// ReviewedHTML is still untrusted transport input. The Host sanitizes it
// with its component HTML policy before it can become a render segment.
ReviewedHTML string `json:"reviewedHtml,omitempty"`
PrimaryContent bool `json:"primaryContent,omitempty"`
// contains filtered or unexported fields
}
type ComponentRenderResponse ¶
type ComponentRenderResponse struct {
Artifact HookArtifact `json:"artifact"`
Document map[string]any `json:"document,omitempty"`
Fragments []ComponentRenderFragment `json:"fragments,omitempty"`
}
ComponentRenderResponse contains only data a renderer may produce. Owner, contract, action, order, and fallback attribution are assigned by the Host.
type ComponentRenderSegment ¶
type ComponentRenderSegment struct {
OwnerID string `json:"ownerId"`
ComponentID string `json:"componentId"`
ContractVersion string `json:"contractVersion"`
Action string `json:"action"`
Order int `json:"order"`
Depth int `json:"depth"`
// HTML is safe for an HTML text node/fragment according to Encoding. It is
// never copied directly from a renderer response.
HTML string `json:"html"`
Encoding string `json:"encoding"`
PrimaryContent bool `json:"primaryContent,omitempty"`
L2Component string `json:"l2Component,omitempty"`
Artifact *HookArtifact `json:"artifact,omitempty"`
Fallback []ComponentFallbackEvidence `json:"fallback,omitempty"`
Children []ComponentRenderSegment `json:"children,omitempty"`
}
ComponentRenderSegment is an SSR-first render tree. Children on wrap segments retain nested composition evidence; browser L2 identifiers are descriptive only and are never invoked by this executor.
type ComponentRendererTermination ¶
type ComponentRendererTermination struct {
Request ComponentRuntimeAdmissionRequest
Cause error
}
ComponentRendererTermination is a Host-owned, non-blocking signal to the process adapter. It does not grant permission to release a runtime lease: the lease remains held until RenderComponent really returns.
type ComponentRendererTerminator ¶
type ComponentRendererTerminator interface {
TerminateComponentCall(ComponentRendererTermination)
}
type ComponentResolvePlan ¶
type ComponentResolvePlan struct {
Revision uint64 `json:"revision"`
Target ComponentTarget `json:"target"`
Contributions []ComponentContribution `json:"contributions"`
ReplaceCandidates []ComponentContribution `json:"replaceCandidates,omitempty"`
ReplaceWinner *ComponentContribution `json:"replaceWinner,omitempty"`
Conflict *ComponentProviderConflict `json:"conflict,omitempty"`
Selection *ComponentProviderSelection `json:"selection,omitempty"`
}
type ComponentRuntimeAdmission ¶
type ComponentRuntimeAdmission interface {
AcquireComponentRuntime(context.Context, ComponentRuntimeAdmissionRequest) (ComponentRuntimeAdmissionLease, error)
}
type ComponentRuntimeAdmissionLease ¶
type ComponentRuntimeAdmissionLease interface {
Context() context.Context
Validate(context.Context) error
Release()
}
ComponentRuntimeAdmissionLease is exact-artifact authority for one composition. Release must be idempotent. Validate is the final Host-owned trust fence and must recheck the same artifact/revision represented by the acquisition request.
type ComponentRuntimeAdmissionProduction ¶
type ComponentRuntimeAdmissionProduction struct {
Manager *Manager
}
ComponentRuntimeAdmissionProduction acquires exact Manager leases for plugin artifacts and returns a no-op lease for Host Core.
func (*ComponentRuntimeAdmissionProduction) AcquireComponentRuntime ¶
func (a *ComponentRuntimeAdmissionProduction) AcquireComponentRuntime( ctx context.Context, request ComponentRuntimeAdmissionRequest, ) (ComponentRuntimeAdmissionLease, error)
type ComponentRuntimeSnapshot ¶
type ComponentRuntimeSnapshot struct {
Extension extensions.Extension `json:"extension"`
InstanceID string `json:"instanceId"`
}
ComponentRuntimeSnapshot identifies one exact Host-published package graph. Component publication is declarative and therefore does not borrow a plugin process identity, including for packages that have no backend process.
type ComponentSSRRenderer ¶
type ComponentSSRRenderer interface {
RenderComponent(context.Context, ComponentRenderCall) (ComponentRenderResponse, error)
}
type ComponentSSRRendererFunc ¶
type ComponentSSRRendererFunc func(context.Context, ComponentRenderCall) (ComponentRenderResponse, error)
func (ComponentSSRRendererFunc) RenderComponent ¶
func (f ComponentSSRRendererFunc) RenderComponent( ctx context.Context, call ComponentRenderCall, ) (ComponentRenderResponse, error)
type ComponentSSRRendererProduction ¶
type ComponentSSRRendererProduction struct {
PluginRenderer ComponentSSRRenderer
}
ComponentSSRRendererProduction is the Host Core-safe renderer. Core artifacts never leave the Host process; plugins are fail-closed unless PluginRenderer is supplied by a later transport seam.
func (*ComponentSSRRendererProduction) RenderComponent ¶
func (r *ComponentSSRRendererProduction) RenderComponent( ctx context.Context, call ComponentRenderCall, ) (ComponentRenderResponse, error)
type ComponentTarget ¶
type ComponentTarget struct {
ID string `json:"id"`
ContractVersion string `json:"contractVersion"`
Core bool `json:"core"`
Kind componentcatalog.Kind `json:"kind,omitempty"`
Owners []componentcatalog.Owner `json:"owners,omitempty"`
Route string `json:"route,omitempty"`
Source string `json:"source,omitempty"`
Provider *ComponentContribution `json:"provider,omitempty"`
}
type ComponentTargetBinding ¶
type ComponentTargetBinding struct {
Contract ComponentCompositionContract
Fallback ComponentFallbackRenderer
}
type ComponentTargetBindingResolver ¶
type ComponentTargetBindingResolver func( context.Context, ComponentTarget, ) (ComponentTargetBinding, error)
type ComposedLifecycleHostBoundary ¶
type ComposedLifecycleHostBoundary struct {
// contains filtered or unexported fields
}
func NewComposedLifecycleHostBoundary ¶
func NewComposedLifecycleHostBoundary(dependencies ComposedLifecycleHostBoundaryDependencies) *ComposedLifecycleHostBoundary
func (*ComposedLifecycleHostBoundary) CanResumeLifecycleHostSources ¶
func (b *ComposedLifecycleHostBoundary) CanResumeLifecycleHostSources( ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest, ) (bool, error)
func (*ComposedLifecycleHostBoundary) DrainLifecycleHostSources ¶
func (b *ComposedLifecycleHostBoundary) DrainLifecycleHostSources( ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest, ) error
func (*ComposedLifecycleHostBoundary) ResumeLifecycleHostSources ¶
func (b *ComposedLifecycleHostBoundary) ResumeLifecycleHostSources( ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest, ) error
func (*ComposedLifecycleHostBoundary) RunLifecycleHostBoundary ¶
func (b *ComposedLifecycleHostBoundary) RunLifecycleHostBoundary( ctx context.Context, gate extensions.LifecycleCoordinatorGateRequest, ) (LifecycleHostBoundaryResult, error)
type ComposedLifecycleHostBoundaryDependencies ¶
type ComposedLifecycleHostBoundaryDependencies struct {
Runtime LifecycleBoundaryRuntime
Preflight LifecycleBoundaryPreflight
Migrations LifecycleBoundaryMigrations
Jobs LifecycleBoundaryJobs
Registries LifecycleBoundaryRegistries
State LifecycleBoundaryState
Journal LifecycleBoundaryPublicationJournal
Cleanup LifecycleBoundaryCleanup
}
type ContentRegistryProtocolRuntime ¶
type ContentRegistryProtocolRuntime struct {
// contains filtered or unexported fields
}
ContentRegistryProtocolRuntime is the single production adapter for HostAPI admission and Content Registry provider callbacks. It captures one Manager; callers cannot substitute a different runtime authority per invocation.
func NewContentRegistryProtocolRuntime ¶
func NewContentRegistryProtocolRuntime(manager *Manager) (*ContentRegistryProtocolRuntime, error)
func (*ContentRegistryProtocolRuntime) AcquireContentRegistryRuntime ¶
func (r *ContentRegistryProtocolRuntime) AcquireContentRegistryRuntime( ctx context.Context, claim hostapi.ContentRegistryRuntimeIdentity, ) (hostapi.ContentRegistryRuntimeLease, error)
func (*ContentRegistryProtocolRuntime) ResolveContentProviders ¶
func (r *ContentRegistryProtocolRuntime) ResolveContentProviders( contribution contentregistry.Contribution, ) (contentregistry.ProviderSet, error)
type DeliveryStore ¶
type DeliveryStore interface {
CreateEventDelivery(ctx context.Context, input extensions.EventDeliveryInput) (extensions.ExtensionEventDelivery, error)
UpdateEventDelivery(ctx context.Context, input extensions.EventDeliveryUpdateInput) error
}
type EventDeliveryArgs ¶
type EventDeliveryArgs struct {
DeliveryID int64 `json:"delivery_id" river:"unique"`
ExtensionID string `json:"extension_id"`
EventName string `json:"event_name"`
EventKind string `json:"event_kind"`
CorrelationID string `json:"correlation_id"`
Payload map[string]any `json:"payload,omitempty"`
PatchFields []string `json:"patch_fields,omitempty"`
DeclarationID string `json:"declaration_id,omitempty"`
HookID string `json:"hook_id,omitempty"`
ContractVersion string `json:"contract_version,omitempty"`
RuntimeInstanceID string `json:"runtime_instance_id,omitempty"`
PackageDigest string `json:"package_digest,omitempty"`
}
func (EventDeliveryArgs) EnqueueOptions ¶
func (EventDeliveryArgs) EnqueueOptions() supportjobs.EnqueueOptions
func (EventDeliveryArgs) Kind ¶
func (EventDeliveryArgs) Kind() string
type EventDeliveryWorker ¶
type EventDeliveryWorker struct {
river.WorkerDefaults[EventDeliveryArgs]
Manager *Manager
}
func (*EventDeliveryWorker) Work ¶
func (w *EventDeliveryWorker) Work(ctx context.Context, job *river.Job[EventDeliveryArgs]) error
type EventDispatcher ¶
type EventDispatcher interface {
Enqueue(ctx context.Context, args EventDeliveryArgs, opts supportjobs.EnqueueOptions) error
}
type ExactLifecycleCoordinatorHost ¶
type ExactLifecycleCoordinatorHost struct {
// contains filtered or unexported fields
}
ExactLifecycleCoordinatorHost dispatches every Host gate in the authoritative lifecycle path. It owns exact process preparation, health, and drain; composed publication/migration/cleanup remains an explicit mandatory boundary.
func NewExactLifecycleCoordinatorHost ¶
func NewExactLifecycleCoordinatorHost(runtime LifecycleHostRuntime, boundary LifecycleHostBoundary) *ExactLifecycleCoordinatorHost
func (*ExactLifecycleCoordinatorHost) RunLifecycleHostGate ¶
func (h *ExactLifecycleCoordinatorHost) RunLifecycleHostGate( ctx context.Context, request extensions.LifecycleCoordinatorGateRequest, ) (extensions.LifecycleCoordinatorGateResult, error)
type ExactLifecycleCoordinatorRuntimeAdapter ¶
type ExactLifecycleCoordinatorRuntimeAdapter struct {
// contains filtered or unexported fields
}
ExactLifecycleCoordinatorRuntimeAdapter dispatches lifecycle work only to the process identity persisted by the Host gate. It deliberately has no extension-level runner, so a stale binding can never fall back to the active process for the same extension id.
func NewExactLifecycleCoordinatorRuntimeAdapter ¶
func NewExactLifecycleCoordinatorRuntimeAdapter( admission LifecycleCoordinatorRuntimeAdmission, starter *ProtocolStarter, ) *ExactLifecycleCoordinatorRuntimeAdapter
func (*ExactLifecycleCoordinatorRuntimeAdapter) RunLifecycleAction ¶
func (a *ExactLifecycleCoordinatorRuntimeAdapter) RunLifecycleAction( ctx context.Context, request extensions.LifecycleCoordinatorActionRequest, onProgress func(extensions.LifecycleCoordinatorActionProgress) error, ) (extensions.LifecycleCoordinatorActionResult, error)
type ExecutableTrustRevocationFence ¶
type ExecutableTrustRevocationFence struct {
// contains filtered or unexported fields
}
ExecutableTrustRevocationFence serializes the durable revoke with the local runtime full-set. PostgreSQL publication converges other API/worker nodes; this fence closes the exact process on the initiating node before returning.
func NewExecutableTrustRevocationFence ¶
func NewExecutableTrustRevocationFence( runtime *Manager, policies executableTrustPolicyInvalidator, ) *ExecutableTrustRevocationFence
type ExtensionDatabaseDisposition ¶
type ExtensionDatabaseDisposition interface {
ApplyLifecycleDataDisposition(
context.Context,
ExtensionDatabaseDispositionRequest,
) (ExtensionDatabaseDispositionReceipt, error)
}
ExtensionDatabaseDisposition is the only supported physical database cleanup boundary. Lifecycle purgers must not reproduce its private Registry SQL.
ApplyLifecycleDataDisposition 的 exact-artifact 授予校验只回答「本次要抹除的 artifact 自己还挂着 active grant 吗」,不再替调用方判定「有没有别的 artifact 的 grant 还活着」。调用方必须先完成 exact identity fence(例如 purger 的 lockExactExtension 比对 extensions.active_version_id,以及 disposition 之后 extension 级撤销 + active==0 断言),否则新的调用者可能跳过那道防线。
type ExtensionDatabaseDispositionReceipt ¶
type ExtensionDatabaseDispositionReceipt struct {
CleanupID string
OperationID int64
CleanupMode LifecycleBoundaryCleanupMode
Artifact ExtensionDatabaseArtifact
ExportArtifactID string
ExportDigest string
ExportEvidenceDigest string
DataDisposition string
CredentialRevoked bool
SchemaRetained bool
// RolesRemoved means owner, runtime, and migration roles are all absent.
// Preserve mode keeps the NOLOGIN owner with its retained schema.
RolesRemoved bool
ResourceExisted bool
ReceiptID string
Proof json.RawMessage
ProofDigest string
}
type ExtensionDatabaseDispositionRequest ¶
type ExtensionDatabaseDispositionRequest struct {
CleanupID string
OperationID int64
CleanupMode LifecycleBoundaryCleanupMode
Artifact ExtensionDatabaseArtifact
ExportArtifactID string
ExportDigest string
}
type ExtensionDatabaseGrantRequest ¶
type ExtensionDatabaseGrantRequest struct {
Artifact ExtensionDatabaseArtifact
ActorUserID int64
AuditEventID int64
}
type ExtensionDatabaseIdentifiers ¶
type ExtensionDatabaseIdentifiers = extensiondatabase.Identifiers
ExtensionDatabaseIdentifiers are Host-owned physical PostgreSQL names. A manifest may describe a logical schema or role, but it cannot select a core or another extension's physical identity.
func ExtensionDatabaseIdentifiersFor ¶
func ExtensionDatabaseIdentifiersFor(extensionID string) (ExtensionDatabaseIdentifiers, error)
type ExtensionDatabaseRuntimeCredential ¶
type ExtensionDatabaseRuntimeCredential struct {
LeaseID string
GrantID int64
Artifact ExtensionDatabaseArtifact
RuntimeInstanceID string
Powers []string
SchemaName string
OwnerRoleName string
RoleName string
DatabaseName string
SearchPath string
ConnectionURL string
Password string
ExpiresAt time.Time
Revision int64
}
type ExtensionDatabaseRuntimeLeaseIssue ¶
type ExtensionDatabaseRuntimeLeaseIssue struct {
Artifact ExtensionDatabaseArtifact
RuntimeInstanceID string
Authority ExtensionDatabaseLeaseAuthority
}
type ExtensionDatabaseRuntimeLeaseRef ¶
type ExtensionDatabaseRuntimeLeaseRef struct {
Artifact ExtensionDatabaseArtifact
RuntimeInstanceID string
LeaseID string
}
type ExtensionDatabaseRuntimeLeaseSnapshot ¶
type ExtensionDatabaseRuntimeLeaseSnapshot struct {
ID int64
LeaseID string
GrantID int64
Artifact ExtensionDatabaseArtifact
RuntimeInstanceID string
RoleName string
Status string
IssuerKind string
IssuedByUserID int64
IssueAuditEventID int64
IssuedAt time.Time
LastHeartbeatAt time.Time
ExpiresAt time.Time
DrainingAt *time.Time
RevokedAt *time.Time
FailureCode string
Revision int64
}
type ExtensionEventPublisher ¶
type ExtensionEventPublisher struct {
// contains filtered or unexported fields
}
ExtensionEventPublisher 是 Manager 对外暴露的事件发布协作者。
它从 manager.go 拆出来是为了守住两条架构基线:Manager 的接收者方法数与 RuntimeEventsProviders 的方法数都是不可增长的 ratchet。事件发布是独立职责, 放在这里比继续往 Manager 上堆方法更合适。
func NewExtensionEventPublisher ¶
func NewExtensionEventPublisher(manager *Manager) *ExtensionEventPublisher
NewExtensionEventPublisher 绑定 Manager 拥有的事件 providers。 providers 为 nil 时发布一律报告不可用,而不是静默成功。
刻意给 Manager 加一个包内取值器而不是新增导出方法:Manager 与 RuntimeEventsProviders 的接收者方法数都是不可增长的架构基线。
func (*ExtensionEventPublisher) EmitFromExtension ¶
func (p *ExtensionEventPublisher) EmitFromExtension( ctx context.Context, extensionID string, envelope appevents.Envelope, ) appevents.Result
EmitFromExtension 以调用方身份发布事件。extensionID 非空时,不在 Core 目录中、 但落在该扩展命名空间下的事件名同样被接受 —— 与 Manifest V3 的声明侧规则 (knownOrNamespacedContract)保持一致,否则会出现「能声明、不能发布」的规则分裂。
type HookArtifact ¶
type HookBus ¶
type HookBus struct {
// contains filtered or unexported fields
}
func NewHookBus ¶
func NewHookBus(config HookBusConfig) *HookBus
func (*HookBus) AdminSurfaces ¶
func (b *HookBus) AdminSurfaces() *AdminSurfaceRegistry
func (*HookBus) Commands ¶
func (b *HookBus) Commands() *PluginCommandRegistry
func (*HookBus) ProviderSlots ¶
func (b *HookBus) ProviderSlots() *VersionedProviderSlotRegistry
func (*HookBus) Register ¶
func (b *HookBus) Register(extension extensions.Extension)
func (*HookBus) RegisterRuntime ¶
func (b *HookBus) RegisterRuntime(extension extensions.Extension, instanceID string) error
RegisterRuntime atomically replaces one extension's hook declarations with the declarations owned by an exact process. Manager admission remains the execution gate, so registering a drained target does not open ordinary calls.
func (*HookBus) RuntimeRegistryGeneration ¶
func (b *HookBus) RuntimeRegistryGeneration() RuntimeRegistryGenerationSnapshot
RuntimeRegistryGeneration returns one coherent cross-family observation. Every production HookBus writer owns b.mu for its whole multi-registry transaction, so this method never exposes an in-progress family swap.
func (*HookBus) RuntimeSnapshot ¶
func (b *HookBus) RuntimeSnapshot(extensionID string) (HookRuntimeSnapshot, bool)
func (*HookBus) Unregister ¶
func (*HookBus) UnregisterRuntime ¶
UnregisterRuntime removes declarations only while they still belong to the stopping process. A retained source can therefore never clear its published replacement.
func (*HookBus) VersionedRegistry ¶
func (b *HookBus) VersionedRegistry() *VersionedHookRegistry
type HookBusConfig ¶
type HookBusConfig struct {
Invoker HookInvoker
}
type HookDocumentRevalidator ¶
type HookInvoker ¶
type HookInvoker interface {
InvokeHook(ctx context.Context, extension extensions.Extension, input HookInput) HookResult
}
type HookInvokerFunc ¶
type HookInvokerFunc func(context.Context, extensions.Extension, HookInput) HookResult
func (HookInvokerFunc) InvokeHook ¶
func (fn HookInvokerFunc) InvokeHook(ctx context.Context, extension extensions.Extension, input HookInput) HookResult
type HookResult ¶
type HookRuntimeSnapshot ¶
type HookRuntimeSnapshot struct {
Extension extensions.Extension
InstanceID string
}
HookRuntimeSnapshot binds the visible hook declarations to one exact runtime. InstanceID is empty only for the legacy compatibility path.
type HostAPIRegistrar ¶
type HostAPIRegistrar interface {
RegisterExtension(extensionID string) (token string, env []string, err error)
UnregisterExtension(extensionID string)
}
HostAPIRegistrar 在插件启动时签发 Host API 凭证(F2.2)。
type IdentityProviderAccept ¶
type IdentityProviderAccept func( context.Context, IdentityProviderInvocationResult, IdentityProviderCommitFence, ) error
IdentityProviderAccept applies the Host-owned effect and audit while the exact runtime admission lease is still held. The callback must keep its own transaction rollback-capable when the fence rejects, honor ctx, and wait for every fence/effect operation before returning.
type IdentityProviderCommitFence ¶
type IdentityProviderCommitFence func() error
IdentityProviderCommitFence is a one-shot final admission validation. Accept must call it inside its Host transaction immediately before committing the effect and audit. It does not provide a cross-system CAS: the Host store must keep its own exact-artifact checks and commit rollback-capable. The fence and transaction must remain synchronous and must not escape the Accept callback.
type IdentityProviderInvocation ¶
type IdentityProviderInvocation struct {
ProviderID string
Operation string
ActorUserID int64
Input map[string]any
}
IdentityProviderInvocation contains only Host-selected workflow input. The executable declaration, timeout, failure policy, and Schema references are always resolved from the immutable Identity Registry publication.
type IdentityProviderInvocationResult ¶
type IdentityProviderInvocationResult struct {
RegistryRevision uint64
RegistryDigest string
Provider identityregistry.ProviderContribution
Operation identityregistry.ProviderOperation
Output map[string]any
}
IdentityProviderInvocationResult is the exact proposal presented to the Host acceptance boundary. A provider response is never authority by itself.
type IdentityProviderRuntime ¶
type IdentityProviderRuntime struct {
// contains filtered or unexported fields
}
IdentityProviderRuntime binds one Manager to one authoritative Identity Registry. Callers cannot substitute a different Registry per invocation.
func NewIdentityProviderRuntime ¶
func NewIdentityProviderRuntime( manager *Manager, registry *identityregistry.Registry, ) (*IdentityProviderRuntime, error)
func (*IdentityProviderRuntime) Invoke ¶
func (r *IdentityProviderRuntime) Invoke( ctx context.Context, input IdentityProviderInvocation, accept IdentityProviderAccept, ) (IdentityProviderInvocationResult, error)
Invoke resolves and invokes one currently active Identity provider. It deliberately has no Core or generic-provider fallback. Callers that already hold an immutable Registry claim must use InvokeExact so a same-id artifact replacement is rejected before any subprocess call.
func (*IdentityProviderRuntime) InvokeExact ¶
func (r *IdentityProviderRuntime) InvokeExact( ctx context.Context, expected identityregistry.ProviderContribution, input IdentityProviderInvocation, accept IdentityProviderAccept, ) (IdentityProviderInvocationResult, error)
InvokeExact invokes only the supplied immutable provider claim. The current Registry must still contain that exact artifact and contract before Schema validation, runtime admission, or subprocess transport begins.
type IdentitySessionEvaluateInvoker ¶
type IdentitySessionEvaluateInvoker struct {
// contains filtered or unexported fields
}
IdentitySessionEvaluateInvoker adapts IdentityProviderRuntime to the Host session-policy evaluation boundary. It only ever invokes the exact provider claim supplied by ProviderResolution; callers cannot substitute Core or a generic provider slot.
func NewIdentitySessionEvaluateInvoker ¶
func NewIdentitySessionEvaluateInvoker( runtime *IdentityProviderRuntime, ) (*IdentitySessionEvaluateInvoker, error)
func (*IdentitySessionEvaluateInvoker) InvokeExact ¶
func (i *IdentitySessionEvaluateInvoker) InvokeExact( ctx context.Context, provider identityregistry.ProviderContribution, operation string, actorUserID int64, input map[string]any, accept func(context.Context, map[string]any, func() error) error, ) error
InvokeExact holds exact runtime admission through Accept and requires the Host accept callback to call the commit fence exactly once.
type InstanceAdmission ¶
type InstanceAdmission struct {
*Manager
// contains filtered or unexported fields
}
func (*InstanceAdmission) AcquireActiveRuntimeCall ¶
func (m *InstanceAdmission) AcquireActiveRuntimeCall(ctx context.Context, extensionID string, class RuntimeCallClass) (RuntimeInstanceSnapshot, *RuntimeAdmissionLease, error)
AcquireActiveRuntimeCall 在线性化边界内捕获活动实例并取得普通调用 lease。 返回的 target 与 lease 始终属于同一个 exact instance,调用方必须 Release。
func (*InstanceAdmission) AcquireRuntimeCall ¶
func (m *InstanceAdmission) AcquireRuntimeCall(ctx context.Context, identity RuntimeInstanceIdentity, class RuntimeCallClass) (*RuntimeAdmissionLease, error)
AcquireRuntimeCall 只允许普通调用进入活动实例;cleanup 可显式进入保留的 draining 实例。
func (*InstanceAdmission) ActiveRuntimeInstance ¶
func (m *InstanceAdmission) ActiveRuntimeInstance(extensionID string) (RuntimeInstanceSnapshot, error)
func (*InstanceAdmission) BeginDrain ¶
func (m *InstanceAdmission) BeginDrain(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
func (*InstanceAdmission) BeginDrainContext ¶
func (m *InstanceAdmission) BeginDrainContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
BeginDrainContext preserves the legacy BeginDrain surface while allowing multi-step transactions to bound runtime-set barrier contention.
func (*InstanceAdmission) DiscardRuntimeInstance ¶
func (m *InstanceAdmission) DiscardRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
DiscardRuntimeInstance destroys only an unpublished inactive candidate.
func (*InstanceAdmission) ForceDrain ¶
func (m *InstanceAdmission) ForceDrain(identity RuntimeInstanceIdentity, cause error) (RuntimeAdmissionSnapshot, error)
func (*InstanceAdmission) HealthRuntimeInstance ¶
func (m *InstanceAdmission) HealthRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
HealthRuntimeInstance performs health and readiness against one exact staged/published/retained process and verifies the frozen artifact again.
func (*InstanceAdmission) InspectRuntimeInstance ¶
func (m *InstanceAdmission) InspectRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
func (*InstanceAdmission) NewExactLifecycleCoordinatorRuntimeAdapter ¶
func (m *InstanceAdmission) NewExactLifecycleCoordinatorRuntimeAdapter() (*ExactLifecycleCoordinatorRuntimeAdapter, error)
NewExactLifecycleCoordinatorRuntimeAdapter returns the only production coordinator adapter allowed to use this Manager's private process starter. Bootstrap therefore cannot accidentally pair admission from one Manager with process execution from another ProtocolStarter.
func (*InstanceAdmission) PublishDrainedRuntimeInstance ¶
func (m *InstanceAdmission) PublishDrainedRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
PublishDrainedRuntimeInstance selects the exact process in ProtocolStarter and Manager while keeping its ordinary admission gate closed. Composed lifecycle publication opens it only after durable state and every registry snapshot have committed.
func (*InstanceAdmission) PublishRuntimeInstance ¶
func (m *InstanceAdmission) PublishRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
PublishRuntimeInstance switches ProtocolStarter first while the old Manager gate is closed, then publishes the same exact identity to Manager callers. The tiny cross-registry window is fail-closed because service/job admission still resolves the drained old Manager pointer until this method commits.
func (*InstanceAdmission) PublishRuntimeInstanceFrom ¶
func (m *InstanceAdmission) PublishRuntimeInstanceFrom( ctx context.Context, identity RuntimeInstanceIdentity, source RuntimeInstanceArtifactIdentity, ) (RuntimeInstanceSnapshot, error)
PublishRuntimeInstanceFrom atomically proves the exact drained source is still authoritative before a staged replacement can become active.
func (*InstanceAdmission) PublishRuntimeInstanceIfNoActive ¶
func (m *InstanceAdmission) PublishRuntimeInstanceIfNoActive( ctx context.Context, identity RuntimeInstanceIdentity, ) (RuntimeInstanceSnapshot, error)
PublishRuntimeInstanceIfNoActive restores a retained runtime only while no concurrent replacement owns the active pointer.
func (*InstanceAdmission) QuarantineRuntimeArtifact ¶
func (m *InstanceAdmission) QuarantineRuntimeArtifact( exact RuntimeInstanceArtifactIdentity, cause error, ) ([]RuntimeAdmissionSnapshot, error)
QuarantineRuntimeArtifact closes every retained process for one exact package. Trust is artifact-scoped, so a staged settings replacement and its source must not be able to reopen each other after revocation.
func (*InstanceAdmission) QuarantineRuntimeInstance ¶
func (m *InstanceAdmission) QuarantineRuntimeInstance( exact RuntimeInstanceArtifactIdentity, cause error, ) (RuntimeAdmissionSnapshot, error)
QuarantineRuntimeInstance deliberately bypasses runtime-set and lifecycle transition locks. Its only lock order is Manager -> exact gate, so an incident can close admission promptly even while publication is blocked.
func (*InstanceAdmission) RemoveRuntimeInstance ¶
func (m *InstanceAdmission) RemoveRuntimeInstance(identity RuntimeInstanceIdentity) error
RemoveRuntimeInstance 只删除已停用且完全 idle 的精确实例;不会回退到当前活动实例。
func (*InstanceAdmission) ResumeRuntimeInstance ¶
func (m *InstanceAdmission) ResumeRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
ResumeRuntimeInstance 只重开仍为活动指针的 exact instance,候选发布失败时可恢复旧版本。
func (*InstanceAdmission) ResumeRuntimeInstanceContext ¶
func (m *InstanceAdmission) ResumeRuntimeInstanceContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
ResumeRuntimeInstanceContext bounds compensation waits on the Manager-wide transition barrier. It retains the exact-active-only resume fence.
func (*InstanceAdmission) RuntimeInstanceAvailable ¶
func (m *InstanceAdmission) RuntimeInstanceAvailable(identity RuntimeInstanceIdentity) bool
RuntimeInstanceAvailable is the read-side visibility predicate used by in-process registries. It never opens admission: execution must still acquire a lease, but a staged or drained target is hidden before the durable marker.
func (*InstanceAdmission) StageRuntimeInstance ¶
func (m *InstanceAdmission) StageRuntimeInstance(ctx context.Context, extension extensions.Extension) (RuntimeInstanceSnapshot, error)
StageRuntimeInstance starts one inert Protocol V2 process and retains its Manager admission gate without changing the active runtime pointer.
func (*InstanceAdmission) StopRuntimeInstance ¶
func (m *InstanceAdmission) StopRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
StopRuntimeInstance stops one exact V2 process after its gate is drained and idle. Stopping a retained instance cannot clear the active replacement.
func (*InstanceAdmission) WaitDrain ¶
func (m *InstanceAdmission) WaitDrain(ctx context.Context, identity RuntimeInstanceIdentity) error
type JobDispatcherAdapter ¶
type JobDispatcherAdapter struct {
Dispatcher *supportjobs.Dispatcher
}
func (JobDispatcherAdapter) Enqueue ¶
func (a JobDispatcherAdapter) Enqueue(ctx context.Context, args EventDeliveryArgs, opts supportjobs.EnqueueOptions) error
type LifecycleAction ¶
type LifecycleAction = protocolv2.LifecycleAction
type LifecycleAssetAdmission ¶
type LifecycleAssetAdmission interface {
ValidatePublishedIdentity(context.Context, extensions.Extension, assetregistry.Artifact) error
}
LifecycleAssetAdmission checks the frozen publication against current trust. The production implementation performs an exact grant lookup without package I/O.
type LifecycleAssetAuthority ¶
type LifecycleAssetAuthority interface {
OperationImpactDigest(context.Context, int64, extensions.Extension) (string, error)
RestoreImpactDigest(context.Context, extensions.Extension) (string, error)
}
LifecycleAssetAuthority supplies an impact digest from durable Host state. Implementations must never rebuild trust impact by scanning package bytes.
type LifecycleAssetOperationRepository ¶
type LifecycleAssetOperationRepository interface {
Operation(context.Context, string, int64) (extensions.LifecycleOperation, error)
LastSuccessfulLifecycleAuthority(
context.Context,
extensions.ExactExtensionVersionInput,
) (extensions.LifecycleAuthoritySnapshot, error)
}
LifecycleAssetOperationRepository is the durable operation/authority subset needed to reconstruct exact registry material after a process restart.
type LifecycleBoundaryCleanup ¶
type LifecycleBoundaryCleanup interface {
StageLifecycleHostCleanup(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryCleanupMode) (LifecycleBoundaryCleanupResult, error)
}
Uninstall cleanup only stages a durable pending purge. The exact extension identity, package bytes, and recovery material must remain until the coordinator has durably committed the terminal operation; a later finalizer owns irreversible deletion.
type LifecycleBoundaryCleanupFinalizer ¶
type LifecycleBoundaryCleanupFinalizer interface {
FinalizeLifecycleHostCleanup(context.Context, int64) (LifecycleCleanupFinalizationResult, error)
}
LifecycleBoundaryCleanupFinalizer may run only after the operation ledger is durably succeeded. "finalized" means the physical purger returned a valid exact receipt; terminal acknowledgement alone never advances the tombstone.
type LifecycleBoundaryCleanupMode ¶
type LifecycleBoundaryCleanupMode string
const ( LifecycleBoundaryCleanupDisable LifecycleBoundaryCleanupMode = "disable" LifecycleBoundaryCleanupRetiredSource LifecycleBoundaryCleanupMode = "retired_source" LifecycleBoundaryCleanupPreserve LifecycleBoundaryCleanupMode = "uninstall_preserve" LifecycleBoundaryCleanupExport LifecycleBoundaryCleanupMode = "uninstall_export_then_remove" LifecycleBoundaryCleanupComplete LifecycleBoundaryCleanupMode = "uninstall_complete_removal" )
type LifecycleBoundaryCleanupPurger ¶
type LifecycleBoundaryCleanupPurger interface {
PurgeLifecycleHostCleanup(context.Context, LifecycleCleanupPurgeRequest) (LifecycleCleanupPurgeReceipt, error)
}
type LifecycleBoundaryCommittedJobs ¶
type LifecycleBoundaryCommittedJobs interface {
ReconcileCommittedLifecycleJobs(
context.Context,
LifecycleBoundaryRequest,
LifecycleBoundaryJobMode,
LifecycleBoundaryPublicationMode,
) error
}
LifecycleBoundaryCommittedJobs is intentionally separate from the prepared transaction. River cancel/migrate is irreversible and may run only after the shared publication marker has durably selected the target.
type LifecycleBoundaryExtensionInventory ¶
type LifecycleBoundaryExtensionInventory interface {
List(context.Context) ([]extensions.Extension, error)
}
type LifecycleBoundaryJobMigrationSource ¶
type LifecycleBoundaryJobMigrationSource interface {
LifecycleJobMigrations(
context.Context,
LifecycleBoundaryRequest,
LifecycleBoundaryJobMode,
) ([]supportjobs.PluginJobMigration, map[string]hostapi.PluginJobPayloadMigrator, error)
}
LifecycleBoundaryJobMigrationSource resolves only the already accepted payload migration contract. River row access and replacement remain owned by HostAPI's PluginJobLifecycleCoordinator.
type LifecycleBoundaryJobMode ¶
type LifecycleBoundaryJobMode string
const ( LifecycleBoundaryJobsInstall LifecycleBoundaryJobMode = "install" LifecycleBoundaryJobsEnable LifecycleBoundaryJobMode = "enable" LifecycleBoundaryJobsDisable LifecycleBoundaryJobMode = "disable" LifecycleBoundaryJobsUpgrade LifecycleBoundaryJobMode = "upgrade" LifecycleBoundaryJobsRollback LifecycleBoundaryJobMode = "rollback" LifecycleBoundaryJobsUninstall LifecycleBoundaryJobMode = "uninstall" )
type LifecycleBoundaryJobRuntime ¶
type LifecycleBoundaryJobRuntime interface {
InspectRuntimeInstance(RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
BeginDrain(RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
WaitDrain(context.Context, RuntimeInstanceIdentity) error
ResumeRuntimeInstance(RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
}
LifecycleBoundaryJobRuntime is the Manager surface shared by direct enqueue admission and lifecycle drain. There is deliberately no second job gate.
type LifecycleBoundaryJobs ¶
type LifecycleBoundaryJobs interface {
// Drain/Resume atomically cover queued-job enqueue admission and schedule
// trigger admission for the exact source/target artifact. Resume publishes
// schedules while RuntimeCallJob remains drained, then opens that exact
// runtime once as the final action.
DrainLifecycleJobs(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryJobMode, extensions.LifecycleCoordinatorRuntimeRole) error
ResumeLifecycleJobs(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryJobMode, extensions.LifecycleCoordinatorRuntimeRole) error
ValidateLifecycleJobs(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryJobMode) error
PrepareLifecycleJobPublication(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) (LifecycleBoundaryTransaction, error)
// River cancel/migrate is intentionally outside the reversible prepared
// transaction and may execute only after the shared marker commits.
ReconcileCommittedLifecycleJobs(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryJobMode, LifecycleBoundaryPublicationMode) error
}
type LifecycleBoundaryMigrationMode ¶
type LifecycleBoundaryMigrationMode string
const ( LifecycleBoundaryMigrationInstall LifecycleBoundaryMigrationMode = "install" LifecycleBoundaryMigrationUpgrade LifecycleBoundaryMigrationMode = "upgrade" LifecycleBoundaryMigrationRollback LifecycleBoundaryMigrationMode = "rollback" )
type LifecycleBoundaryMigrations ¶
type LifecycleBoundaryMigrations interface {
ReconcileLifecycleMigrations(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryMigrationMode) error
// CanResumeLifecycleSource is a durable proof that migration state is either
// rolled back or backward-compatible with the frozen source artifact.
CanResumeLifecycleSource(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryMigrationMode) (bool, error)
}
Migration and cleanup delegates own durable idempotency by OperationID and StepID. A retry must resume or prove the exact step complete; it may not infer success from a different artifact or attempt.
type LifecycleBoundaryPreflight ¶
type LifecycleBoundaryPreflight interface {
CheckLifecycleBoundary(context.Context, LifecycleBoundaryRequest) error
}
type LifecycleBoundaryPublicationJournal ¶
type LifecycleBoundaryPublicationJournal interface {
PrepareLifecyclePublication(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) error
LifecyclePublicationCommitted(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) (bool, error)
// LifecyclePublicationCommittedForOperation is used by earlier Host gates
// whose per-step attempt is unrelated to the publication step attempt. It
// still validates the canonical publication step and both exact artifacts.
LifecyclePublicationCommittedForOperation(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) (bool, error)
CommitLifecyclePublication(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) error
}
LifecycleBoundaryPublicationJournal is stored outside the deletable extensions row. Prepare durably fences operation/step/mode and both exact artifacts before publication. Committed is the sole authority deciding whether crash recovery converges backward or forward.
type LifecycleBoundaryPublicationMode ¶
type LifecycleBoundaryPublicationMode string
const ( LifecycleBoundaryActivate LifecycleBoundaryPublicationMode = "activate" LifecycleBoundaryDeactivate LifecycleBoundaryPublicationMode = "deactivate" )
type LifecycleBoundaryRegistries ¶
type LifecycleBoundaryRegistries interface {
ValidateLifecycleRegistries(context.Context, LifecycleBoundaryRequest) error
PrepareLifecycleRegistryPublication(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) (LifecycleBoundaryTransaction, error)
}
LifecycleBoundaryRegistries is an aggregate transaction over every registry affected by one artifact (routes, pages, services, schedules, and later V3 families). Adapters must not expose a partially published family snapshot.
type LifecycleBoundaryRequest ¶
type LifecycleBoundaryRequest struct {
OperationID int64
Operation extensions.LifecycleMachineOperation
Position int
StepID string
Attempt int
SourceExtension *extensions.Extension
TargetExtension extensions.Extension
SourceBinding extensions.LifecycleRuntimeBinding
TargetBinding extensions.LifecycleRuntimeBinding
RemovalMode string
Forced bool
ActorUserID int64
AuditEventID int64
// contains filtered or unexported fields
}
LifecycleBoundaryRequest is the allowlisted Host input passed to composed delegates. Trust grants, authority snapshots, opaque coordinator checkpoints, and previous Host results deliberately never cross this boundary.
func (LifecycleBoundaryRequest) ActionNames ¶
func (r LifecycleBoundaryRequest) ActionNames() []extensions.LifecycleMachineAction
func (LifecycleBoundaryRequest) ActionResult ¶
func (r LifecycleBoundaryRequest) ActionResult(action extensions.LifecycleMachineAction) (json.RawMessage, bool)
ActionResult returns a fresh copy on every read. Delegates can inspect a durable plugin result but cannot mutate another delegate's view or the coordinator-owned ledger copy.
type LifecycleBoundaryRuntime ¶
type LifecycleBoundaryRuntime interface {
PublishDrainedRuntimeInstance(context.Context, RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
PublishRuntimeInstance(context.Context, RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
BeginDrain(RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
WaitDrain(context.Context, RuntimeInstanceIdentity) error
ResumeRuntimeInstance(RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
StopRuntimeInstance(context.Context, RuntimeInstanceIdentity) error
}
type LifecycleBoundaryState ¶
type LifecycleBoundaryState interface {
PrepareLifecycleStatePublication(context.Context, LifecycleBoundaryRequest, LifecycleBoundaryPublicationMode) (LifecycleBoundaryTransaction, error)
}
LifecycleBoundaryState prepares the exact durable extension-version/status CAS. It must restore only the captured source state and reject stale writers.
type LifecycleBoundaryStaticPreflight ¶
type LifecycleBoundaryStaticPreflight interface {
CheckLifecycleStaticPreflight(context.Context, LifecycleStaticPreflightRequest) error
}
type LifecycleBoundaryTransaction ¶
type LifecycleBoundaryTransaction interface {
Inspect(context.Context) (LifecycleBoundaryTransactionState, error)
Publish(context.Context) error
Restore(context.Context) error
}
LifecycleBoundaryTransaction is prepared without side effects. Publish and Restore must be idempotent and exact-operation fenced. Publish may return an error after changing state, so callers always invoke Restore after a failed publication attempt. Inspect and Restore must reconstruct prior-attempt state from durable operation/step identity, not an in-memory closure. Job/schedule transactions switch desired snapshots while keeping admission closed; only ResumeLifecycleJobs may open an exact source or target role.
type LifecycleBoundaryTransactionState ¶
type LifecycleBoundaryTransactionState string
const ( LifecycleBoundaryTransactionSource LifecycleBoundaryTransactionState = "source" LifecycleBoundaryTransactionTarget LifecycleBoundaryTransactionState = "target" )
type LifecycleCleanupPurgeRequest ¶
type LifecycleCleanupPurgeRequest struct {
CleanupID string
OperationID int64
CleanupMode LifecycleBoundaryCleanupMode
RetainedExtensionID string
RetainedExtensionVersion string
RetainedPackageDigest string
RetainedVersionID int64
RetainedPackagePath string
RetentionMarker string
ExportArtifactID string
ExportDigest string
}
LifecycleCleanupPurgeRequest is an immutable exact-artifact instruction. Implementations must be idempotent by CleanupID and return the same durable receipt after a process or database-commit failure.
type LifecycleCoordinatorRuntimeAdapter ¶
type LifecycleCoordinatorRuntimeAdapter struct {
// contains filtered or unexported fields
}
LifecycleCoordinatorRuntimeAdapter connects the durable Host coordinator to the exact protocol-v2 runtime already frozen by ProtocolStarter.Start.
func NewLifecycleCoordinatorRuntimeAdapter ¶
func NewLifecycleCoordinatorRuntimeAdapter(starter *ProtocolStarter) *LifecycleCoordinatorRuntimeAdapter
func (*LifecycleCoordinatorRuntimeAdapter) RunLifecycleAction ¶
func (a *LifecycleCoordinatorRuntimeAdapter) RunLifecycleAction( ctx context.Context, request extensions.LifecycleCoordinatorActionRequest, onProgress func(extensions.LifecycleCoordinatorActionProgress) error, ) (extensions.LifecycleCoordinatorActionResult, error)
type LifecycleCoordinatorRuntimeAdmission ¶
type LifecycleCoordinatorRuntimeAdmission interface {
AcquireRuntimeCall(context.Context, RuntimeInstanceIdentity, RuntimeCallClass) (*RuntimeAdmissionLease, error)
}
LifecycleCoordinatorRuntimeAdmission is the Manager-owned exact-instance admission boundary required before lifecycle cleanup reaches a process.
type LifecycleHostBoundary ¶
type LifecycleHostBoundary interface {
RunLifecycleHostBoundary(context.Context, extensions.LifecycleCoordinatorGateRequest) (LifecycleHostBoundaryResult, error)
}
LifecycleHostBoundary executes Host-owned boundaries that require composed database, registry, job, schedule, or removal state. A missing implementation fails closed instead of treating an unimplemented safety gate as a no-op.
type LifecycleHostBoundaryResult ¶
type LifecycleHostBoundaryResult struct {
Checkpoint string
ResultDocument json.RawMessage
}
LifecycleHostBoundaryResult deliberately excludes runtime bindings. Exact process selection belongs to this dispatcher; database/registry/job/removal boundaries may only return their durable checkpoint and typed result.
type LifecycleHostDrainBoundary ¶
type LifecycleHostDrainBoundary interface {
DrainLifecycleHostSources(context.Context, extensions.LifecycleCoordinatorGateRequest) error
CanResumeLifecycleHostSources(context.Context, extensions.LifecycleCoordinatorGateRequest) (bool, error)
ResumeLifecycleHostSources(context.Context, extensions.LifecycleCoordinatorGateRequest) error
}
LifecycleHostDrainBoundary extends the dispatcher at its earlier draining gate, before plugin upgrade/uninstall actions run. Production paths require this capability; runtime drain alone cannot close schedules or job enqueue.
type LifecycleHostRuntime ¶
type LifecycleHostRuntime interface {
StageRuntimeInstance(context.Context, extensions.Extension) (RuntimeInstanceSnapshot, error)
InspectRuntimeInstance(RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
ActiveRuntimeInstance(string) (RuntimeInstanceSnapshot, error)
HealthRuntimeInstance(context.Context, RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
BeginDrain(RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
WaitDrain(context.Context, RuntimeInstanceIdentity) error
ForceDrain(RuntimeInstanceIdentity, error) (RuntimeAdmissionSnapshot, error)
}
LifecycleHostRuntime is the exact-instance process surface used by Host lifecycle gates. Manager implements it directly.
type LifecycleIdentityStartupRecovery ¶
type LifecycleIdentityStartupRecovery interface {
RecoverStaleIdentityPublication(
context.Context,
identityregistry.Publication,
) (identityregistry.DurableState, bool, error)
}
LifecycleIdentityStartupRecovery repairs only an exact source publication whose failed deactivation never committed and whose aggregate registry and extension-state transactions both durably returned to source.
type LifecycleInvocation ¶
type LifecycleInvocation struct {
Action LifecycleAction
PlanVersion string
StepID string
Checkpoint string
Input *protocolv2.TypedDocument
DryRun bool
Forced bool
OnProgress func(LifecycleProgress) error
}
LifecycleInvocation is one stable, resumable lifecycle step. Checkpoint is opaque to the Host; the owning state machine persists and returns it.
type LifecycleMigrationArtifact ¶
type LifecycleMigrationArtifact struct {
ExtensionID string
Version string
PackageDigest string
VersionID int64
MigrationsDigest string
Migrations []extensions.ManifestMigration
}
type LifecycleMigrationEngine ¶
type LifecycleMigrationEngine interface {
ReconcileLifecycleMigration(context.Context, LifecycleMigrationEnginePlan) error
InspectLifecycleMigration(context.Context, LifecycleMigrationEnginePlan) (LifecycleMigrationEngineProof, error)
}
LifecycleMigrationEngine is the stable P5 handoff. Reconcile must be idempotent by PlanDigest and Inspect must read a durable exact-plan ledger. A one-shot success return or the legacy checksum-only ledger is insufficient.
type LifecycleMigrationEnginePlan ¶
type LifecycleMigrationEnginePlan struct {
OperationID int64
Operation extensions.LifecycleMachineOperation
StepID string
Attempt int
Mode LifecycleBoundaryMigrationMode
PlanDigest string
Source *LifecycleMigrationArtifact
Target LifecycleMigrationArtifact
}
type LifecycleMigrationPreflight ¶
type LifecycleMigrationPreflight interface {
PreflightLifecycleMigration(context.Context, LifecycleMigrationEnginePlan) (LifecycleMigrationPreflightResult, error)
}
LifecycleMigrationPreflight exposes the exact migration plan without acquiring an execution lock, provisioning PostgreSQL resources, or writing migration state. Implementations must not execute package migration SQL.
type LifecycleMigrationPreflightResult ¶
type LifecycleMigrationPreflightResult struct {
OperationID int64
Operation extensions.LifecycleMachineOperation
Mode LifecycleBoundaryMigrationMode
StepID string
Attempt int
PlanDigest string
DryRunDigest string
SchemaName string
OwnerRoleName string
Source *LifecycleMigrationPreflightArtifact
Target LifecycleMigrationPreflightArtifact
Steps []LifecycleMigrationPreflightStep
Warnings []string
HasNonTransactional bool
Backup LifecycleMigrationBackupRequirement
}
type LifecycleMigrationPreflightStep ¶
type LifecycleMigrationPreflightStep struct {
Position int
Direction string
MigrationID string
ContractVersion string
PackagePath string
Checksum string
TransactionPolicy string
ExecutionMode string
NoTransaction bool
WarningCode string
Artifact LifecycleMigrationPreflightArtifact
StatementDigests []string
}
type LifecycleProgress ¶
type LifecycleProgress struct {
State LifecycleProgressState
CompletedUnits uint32
TotalUnits uint32
Checkpoint string
Message string
Result *protocolv2.TypedDocument
}
type LifecycleProgressState ¶
type LifecycleProgressState = protocolv2.ProgressState
type LifecycleRegistryBoundaryConfig ¶
type LifecycleRegistryBoundaryConfig struct {
Repository LifecycleRegistryPublicationRepository
Manager *Manager
Pages *pages.Registry
ThemeRuntime *pages.ThemeRuntimeRegistry
PageSiteName string
PageLocales []string
Routes *routes.Registry
RouteSchemas *extensionopenapi.RouteSchemaPublication
Services *hostapi.ServiceRegistry
Components *ComponentRegistry
// ComponentComposition 可选:组件发布成功后同步编译包本地 SSR。
ComponentComposition *ProductionComponentComposition
Assets *assetregistry.Registry
Caches *cacheregistry.Registry
Queries *queryregistry.Registry
SEO *seoregistry.Registry
Identity *identityregistry.Registry
IdentityStore identityregistry.PublicationStore
IdentityRecovery LifecycleIdentityStartupRecovery
Notifications *notifications.Registry
// Content is the P10 Content Registry (block/shortcode/embed/node/mark/…).
Content *contentregistry.Registry
// Media is the P10 Media Pipeline Registry (MIME policy/processors/variants).
Media *mediaregistry.Registry
// Editor is the P10 Tiptap node/mark/command/toolbar registry.
Editor *editorregistry.Registry
// Entity is the P10 Entity Type / Taxonomy / Field Schema registry.
Entity *entityregistry.Registry
AssetAuthority LifecycleAssetAuthority
AssetAdmission LifecycleAssetAdmission
}
type LifecycleRegistryPublicationPhase ¶
type LifecycleRegistryPublicationPhase string
const ( LifecycleRegistryPublicationSource LifecycleRegistryPublicationPhase = "source" LifecycleRegistryPublicationTarget LifecycleRegistryPublicationPhase = "target" )
type LifecycleRegistryPublicationRef ¶
type LifecycleRegistryPublicationRef struct {
OperationID int64
StepID string
Mode LifecycleBoundaryPublicationMode
Attempt int
}
type LifecycleRegistryPublicationRepository ¶
type LifecycleRegistryPublicationRepository interface {
PrepareLifecycleRegistryPublication(context.Context, PrepareLifecycleRegistryPublicationInput) (LifecycleRegistryPublicationRef, error)
InspectLifecycleRegistryPublication(context.Context, LifecycleRegistryPublicationRef) (LifecycleRegistryPublicationPhase, error)
MoveLifecycleRegistryPublication(
context.Context,
LifecycleRegistryPublicationRef,
LifecycleRegistryPublicationPhase,
func() error,
) error
}
LifecycleRegistryPublicationRepository owns the durable aggregate phase. Move keeps the PostgreSQL fence locked while one node reconciles its local immutable snapshots, so an opposite or stale attempt cannot commit midway.
type LifecycleRemoteError ¶
type LifecycleRemoteError struct {
StepID string
Checkpoint string
State LifecycleProgressState
Code protocolv2.ErrorCode
Reason string
Message string
Retryable bool
RetryAfter time.Time
Metadata map[string]string
}
LifecycleRemoteError preserves a plugin's terminal typed failure while allowing cancellation/deadline handling through errors.Is.
func (*LifecycleRemoteError) Error ¶
func (e *LifecycleRemoteError) Error() string
func (*LifecycleRemoteError) LifecycleCoordinatorFailure ¶
func (e *LifecycleRemoteError) LifecycleCoordinatorFailure() extensions.LifecycleExecutionError
func (*LifecycleRemoteError) Unwrap ¶
func (e *LifecycleRemoteError) Unwrap() error
type LifecycleRunResult ¶
type LifecycleRunResult struct {
StepID string
State LifecycleProgressState
Checkpoint string
// CheckpointSchema preserves the frozen manifest association. Checkpoint is
// still an opaque wire string and is not structurally validated against it.
CheckpointSchema string
Result *protocolv2.TypedDocument
Progress []LifecycleProgress
}
type LifecycleStaticPreflightRequest ¶
type LifecycleStaticPreflightRequest struct {
Operation extensions.LifecycleMachineOperation
SourceExtension *extensions.Extension
TargetExtension extensions.Extension
}
LifecycleStaticPreflightRequest intentionally has no runtime binding or coordinator step. Service calls this same immutable fact check before coordinator.Run and therefore before StageRuntimeInstance. Position-level boundary replay calls it again after validating the durable Host step.
type MailProviderInvoker ¶
type MailProviderInvoker interface {
SendMail(context.Context, string, MailProviderRequest) (MailProviderResponse, error)
}
type MailProviderRegistry ¶
type MailProviderRegistry struct {
// contains filtered or unexported fields
}
func NewMailProviderRegistry ¶
func NewMailProviderRegistry(store MailProviderStore) *MailProviderRegistry
func (*MailProviderRegistry) EnsureDefault ¶
func (r *MailProviderRegistry) EnsureDefault(ctx context.Context) (string, error)
EnsureDefault persists the recommended provider when no explicit selection exists. It is idempotent and safe to run from both API and worker startup.
func (*MailProviderRegistry) Resolve ¶
func (r *MailProviderRegistry) Resolve(ctx context.Context) (MailProviderSelection, MailProviderState, error)
Resolve is the authoritative read used by delivery and the admin surface. It applies the recommended default only when no explicit row exists; a row that points at a disabled plugin stays a preference and reports unavailable.
func (*MailProviderRegistry) RestoreDefault ¶
func (r *MailProviderRegistry) RestoreDefault(ctx context.Context) error
func (*MailProviderRegistry) Select ¶
func (r *MailProviderRegistry) Select(ctx context.Context, extensionID string) error
func (*MailProviderRegistry) Selected ¶
func (r *MailProviderRegistry) Selected(ctx context.Context) (MailProviderSelection, bool, error)
Selected keeps the pre-default callers working. Delivery should use Resolve so a temporarily unavailable provider is retried instead of skipped.
type MailProviderRequest ¶
type MailProviderResponse ¶
type MailProviderSelection ¶
type MailProviderState ¶
type MailProviderState string
MailProviderState separates "nobody chose a provider" from "a provider was chosen but cannot run right now". Delivery treats the two differently: unconfigured is terminal, unavailable is retryable.
const ( MailProviderReady MailProviderState = "ready" MailProviderUnconfigured MailProviderState = "unconfigured" )
type MailProviderStore ¶
type MailProviderStore interface {
GetMailProviderExtension(context.Context, string) (extensions.Extension, error)
List(context.Context) ([]extensions.Extension, error)
SelectedMailProvider(context.Context) (string, error)
SelectMailProvider(context.Context, string) error
RestoreMailProvider(context.Context) error
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager 保留历史 runtime 契约,并将业务入口委托给 focused collaborators。
func NewManager ¶
func NewManager(config ManagerConfig) *Manager
func (*Manager) AcquireActiveRuntimeCall ¶
func (m *Manager) AcquireActiveRuntimeCall(ctx context.Context, extensionID string, class RuntimeCallClass) (RuntimeInstanceSnapshot, *RuntimeAdmissionLease, error)
func (*Manager) AcquireRuntimeCall ¶
func (m *Manager) AcquireRuntimeCall(ctx context.Context, identity RuntimeInstanceIdentity, class RuntimeCallClass) (*RuntimeAdmissionLease, error)
func (*Manager) ActiveRuntimeInstance ¶
func (m *Manager) ActiveRuntimeInstance(extensionID string) (RuntimeInstanceSnapshot, error)
func (*Manager) AdminSurfaceSnapshot ¶
func (m *Manager) AdminSurfaceSnapshot(kind string) AdminSurfaceRegistrySnapshot
func (*Manager) BeginDrain ¶
func (m *Manager) BeginDrain(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
func (*Manager) BeginDrainContext ¶
func (m *Manager) BeginDrainContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
func (*Manager) BindProviderSlotSelections ¶
func (m *Manager) BindProviderSlotSelections(store ProviderSlotSelectionStore)
BindProviderSlotSelections attaches the durable exact-artifact choice to the already constructed registry. API and worker bootstrap call this before any provider invocation; registry publication itself remains database-free.
func (*Manager) DiscardRuntimeInstance ¶
func (m *Manager) DiscardRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
func (*Manager) ExecutePluginCommand ¶
func (*Manager) ExecutePluginJob ¶
func (m *Manager) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
func (*Manager) FilterQueryResultInstance ¶
func (m *Manager) FilterQueryResultInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryResultFilterRequest, ) ([]queryregistry.QueryRow, error)
func (*Manager) ForceDrain ¶
func (m *Manager) ForceDrain(identity RuntimeInstanceIdentity, cause error) (RuntimeAdmissionSnapshot, error)
func (*Manager) HealthRuntimeInstance ¶
func (m *Manager) HealthRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
func (*Manager) InspectRuntimeInstance ¶
func (m *Manager) InspectRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
func (*Manager) InvokeAdminSurface ¶
func (m *Manager) InvokeAdminSurface( ctx context.Context, input AdminSurfaceInvocation, ) (AdminSurfaceInvocationResult, error)
func (*Manager) InvokeGuardInstance ¶
func (m *Manager) InvokeGuardInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2GuardRequest, ) error
func (*Manager) InvokeQueryInstance ¶
func (m *Manager) InvokeQueryInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryRequest, ) ([]queryregistry.QueryRow, error)
func (*Manager) InvokeRouteInstance ¶
func (m *Manager) InvokeRouteInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteRequest, ) (ProtocolV2RouteResponse, error)
func (*Manager) InvokeVersionedHook ¶
func (m *Manager) InvokeVersionedHook(ctx context.Context, input VersionedHookInvocation) VersionedHookResult
func (*Manager) InvokeVersionedProvider ¶
func (m *Manager) InvokeVersionedProvider( ctx context.Context, input VersionedProviderInvocation, ) (VersionedProviderInvocationResult, error)
func (*Manager) NewExactLifecycleCoordinatorRuntimeAdapter ¶
func (m *Manager) NewExactLifecycleCoordinatorRuntimeAdapter() (*ExactLifecycleCoordinatorRuntimeAdapter, error)
func (*Manager) OpenRouteStreamInstance ¶
func (m *Manager) OpenRouteStreamInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteStreamRequest, ) (*ProtocolV2RouteStream, error)
func (*Manager) ProbeProviderSlotCandidate ¶
func (*Manager) ProbeSettingsAction ¶
func (m *Manager) ProbeSettingsAction(ctx context.Context, extension extensions.Extension, request extensions.SettingsActionProbeRequest) (extensions.SettingsActionProbeResult, error)
func (*Manager) ProtocolV2ProviderBroker ¶
func (m *Manager) ProtocolV2ProviderBroker() (hostapi.ProtocolV2ProviderBroker, error)
func (*Manager) ProviderSlotInspection ¶
func (m *Manager) ProviderSlotInspection(ctx context.Context) (extensions.ProviderSlotInspection, error)
func (*Manager) ProviderSlotSelections ¶
func (m *Manager) ProviderSlotSelections() *ProviderSlotSelectionAPI
func (*Manager) PublishDrainedRuntimeInstance ¶
func (m *Manager) PublishDrainedRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
func (*Manager) PublishRuntimeInstance ¶
func (m *Manager) PublishRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeInstanceSnapshot, error)
func (*Manager) PublishRuntimeInstanceFrom ¶
func (m *Manager) PublishRuntimeInstanceFrom( ctx context.Context, identity RuntimeInstanceIdentity, source RuntimeInstanceArtifactIdentity, ) (RuntimeInstanceSnapshot, error)
func (*Manager) PublishRuntimeInstanceIfNoActive ¶
func (m *Manager) PublishRuntimeInstanceIfNoActive( ctx context.Context, identity RuntimeInstanceIdentity, ) (RuntimeInstanceSnapshot, error)
func (*Manager) QuarantineRuntimeArtifact ¶
func (m *Manager) QuarantineRuntimeArtifact( exact RuntimeInstanceArtifactIdentity, cause error, ) ([]RuntimeAdmissionSnapshot, error)
func (*Manager) QuarantineRuntimeInstance ¶
func (m *Manager) QuarantineRuntimeInstance( exact RuntimeInstanceArtifactIdentity, cause error, ) (RuntimeAdmissionSnapshot, error)
func (*Manager) Reconcile ¶
func (m *Manager) Reconcile(ctx context.Context, items []extensions.Extension)
func (*Manager) RefreshMailProvider ¶
func (*Manager) RemoveRuntimeInstance ¶
func (m *Manager) RemoveRuntimeInstance(identity RuntimeInstanceIdentity) error
func (*Manager) ResolveAdminSurface ¶
func (m *Manager) ResolveAdminSurface(id string) (AdminSurfaceContract, error)
func (*Manager) ResumeRuntimeInstance ¶
func (m *Manager) ResumeRuntimeInstance(identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
func (*Manager) ResumeRuntimeInstanceContext ¶
func (m *Manager) ResumeRuntimeInstanceContext(ctx context.Context, identity RuntimeInstanceIdentity) (RuntimeAdmissionSnapshot, error)
func (*Manager) RouteTarget ¶
func (m *Manager) RouteTarget(extensionID string) (RouteTarget, bool)
func (*Manager) RuntimeInstanceAvailable ¶
func (m *Manager) RuntimeInstanceAvailable(identity RuntimeInstanceIdentity) bool
func (*Manager) SearchEngineDelete ¶
func (m *Manager) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
func (*Manager) SearchEngineEnsure ¶
func (*Manager) SearchEngineIndex ¶
func (m *Manager) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
func (*Manager) SearchEngineProbe ¶
func (m *Manager) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
func (*Manager) SearchEngineSearch ¶
func (m *Manager) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
func (*Manager) SendMail ¶
func (m *Manager) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
func (*Manager) SetStartPreparer ¶
func (*Manager) StageRuntimeInstance ¶
func (m *Manager) StageRuntimeInstance(ctx context.Context, extension extensions.Extension) (RuntimeInstanceSnapshot, error)
func (*Manager) Status ¶
func (m *Manager) Status(arg0 context.Context, extension extensions.Extension) extensions.RuntimeStatus
func (*Manager) StopRuntimeInstance ¶
func (m *Manager) StopRuntimeInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
func (*Manager) StorageClose ¶
func (m *Manager) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
func (*Manager) StorageDelete ¶
func (m *Manager) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
func (*Manager) StorageExists ¶
func (m *Manager) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
func (*Manager) StorageGetChunk ¶
func (m *Manager) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
func (*Manager) StorageOpen ¶
func (m *Manager) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
func (*Manager) StorageProbe ¶
func (m *Manager) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
func (*Manager) StoragePublicURL ¶
func (m *Manager) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
func (*Manager) StoragePutBegin ¶
func (m *Manager) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
func (*Manager) StoragePutChunk ¶
func (m *Manager) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
func (*Manager) StorageSignedURL ¶
func (m *Manager) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
func (*Manager) StorageStat ¶
func (m *Manager) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
func (*Manager) WaitDrain ¶
func (m *Manager) WaitDrain(ctx context.Context, identity RuntimeInstanceIdentity) error
func (*Manager) WithActivation ¶
func (m *Manager) WithActivation(coordinator *extensions.ActivationCoordinator, bootID string) *Manager
type ManagerConfig ¶
type ManagerConfig struct {
Starter Starter
HookBus *HookBus
DeliveryStore DeliveryStore
Dispatcher EventDispatcher
// Resilience 可选;nil 使用默认 F2.3 参数。
Resilience ResilienceConfig
Activation *extensions.ActivationCoordinator
BootID string
}
type ManagerPluginRuntimeFullSetApplier ¶
type ManagerPluginRuntimeFullSetApplier struct {
// contains filtered or unexported fields
}
ManagerPluginRuntimeFullSetApplier 是 process-local 的 PluginRuntimeFullSetApplier。 它把一条 durable full-set publication 收敛到 *Manager 的 exact 活动集合。
func NewManagerPluginRuntimeFullSetApplier ¶
func NewManagerPluginRuntimeFullSetApplier( manager *Manager, inventory PluginRuntimeFullSetInventory, tierOrders ...[]string, ) (*ManagerPluginRuntimeFullSetApplier, error)
NewManagerPluginRuntimeFullSetApplier 构造 Protocol V2 full-set 适配器。
func (*ManagerPluginRuntimeFullSetApplier) ApplyPluginRuntimeFullSet ¶
func (a *ManagerPluginRuntimeFullSetApplier) ApplyPluginRuntimeFullSet( ctx context.Context, publication extensions.PluginRuntimePublication, ) (applied []extensions.PluginRuntimeAppliedMember, err error)
ApplyPluginRuntimeFullSet 将 Manager 收敛到 publication 描述的完整 exact 集合。 成功时返回完整 applied evidence(含 node-local runtime instance id)。
type PackageLocalComponentSSRRenderer ¶
type PackageLocalComponentSSRRenderer struct {
// contains filtered or unexported fields
}
PackageLocalComponentSSRRenderer 在 Host 进程内编译并执行插件/主题包的 声明式 SSR 模板。模板在 Publish 时按 exact digest 读入并缓存,请求路径 不再访问包文件系统。
这是生产 PluginRenderer 的第一阶段:覆盖 package-local html/template 片段, 以及 filter_props/filter_result 的 text/template JSON 文档变换。 Protocol V2 子进程渲染可在后续阶段替换同一接口。
func NewPackageLocalComponentSSRRenderer ¶
func NewPackageLocalComponentSSRRenderer() *PackageLocalComponentSSRRenderer
NewPackageLocalComponentSSRRenderer 创建空的包本地 SSR 渲染器。
func (*PackageLocalComponentSSRRenderer) Count ¶
func (r *PackageLocalComponentSSRRenderer) Count() int
Count 返回当前缓存的模板数(测试/检查器用)。
func (*PackageLocalComponentSSRRenderer) Publish ¶
func (r *PackageLocalComponentSSRRenderer) Publish(extension extensions.Extension) error
Publish 编译 extension 中所有组件引用到的 SSR 模板。digest 不匹配或 路径越界时 fail closed。同一 packageDigest 的重复 Publish 是幂等替换。
func (*PackageLocalComponentSSRRenderer) RemoveExtension ¶
func (r *PackageLocalComponentSSRRenderer) RemoveExtension(extensionID string)
RemoveExtension 删除某扩展 id 下全部包版本的模板(禁用/卸载时使用)。
func (*PackageLocalComponentSSRRenderer) RemovePackage ¶
func (r *PackageLocalComponentSSRRenderer) RemovePackage(packageDigest string)
RemovePackage 删除指定 packageDigest 的全部已编译模板。
func (*PackageLocalComponentSSRRenderer) RenderComponent ¶
func (r *PackageLocalComponentSSRRenderer) RenderComponent( ctx context.Context, call ComponentRenderCall, ) (ComponentRenderResponse, error)
RenderComponent 实现 ComponentSSRRenderer。按 exact package digest + SSR 模板 id 查找已编译模板;未发布时 fail closed。
type PluginCommandContract ¶
type PluginCommandContract struct {
ID string
ContractVersion string
ExtensionID string
ExtensionVersion string
ArtifactDigest string
InstanceID string
Handler string
Permission string
InputSchema string
ResultSchema string
InputSchemaDigest string
ResultSchemaDigest string
Description string
RecoverySafe bool
Timeout time.Duration
// contains filtered or unexported fields
}
type PluginCommandExecutionResult ¶
type PluginCommandExecutionResult struct {
Contract PluginCommandContract
Output map[string]any
}
type PluginCommandRegistry ¶
type PluginCommandRegistry struct {
// contains filtered or unexported fields
}
PluginCommandRegistry publishes one immutable command namespace across all exact protocol-v2 runtime instances.
func NewPluginCommandRegistry ¶
func NewPluginCommandRegistry() *PluginCommandRegistry
func (*PluginCommandRegistry) RemoveRuntime ¶
func (r *PluginCommandRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
func (*PluginCommandRegistry) ReplaceRuntime ¶
func (r *PluginCommandRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*PluginCommandRegistry) Resolve ¶
func (r *PluginCommandRegistry) Resolve(id string, safeMode bool) (PluginCommandContract, error)
func (*PluginCommandRegistry) Snapshot ¶
func (r *PluginCommandRegistry) Snapshot() PluginCommandRegistrySnapshot
func (*PluginCommandRegistry) ValidateInput ¶
func (r *PluginCommandRegistry) ValidateInput(contract PluginCommandContract, document map[string]any) error
func (*PluginCommandRegistry) ValidateRemoveRuntime ¶
func (r *PluginCommandRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
func (*PluginCommandRegistry) ValidateReplaceRuntime ¶
func (r *PluginCommandRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*PluginCommandRegistry) ValidateResult ¶
func (r *PluginCommandRegistry) ValidateResult(contract PluginCommandContract, document map[string]any) error
type PluginCommandRegistrySnapshot ¶
type PluginCommandRegistrySnapshot struct {
Revision uint64
Commands []PluginCommandContract
}
type PluginHealth ¶
type PluginHealth struct {
OK bool
}
type PluginHookRequest ¶
type PluginHookResponse ¶
type PluginProtocol ¶
type PluginProtocol interface {
Health() (PluginHealth, error)
RouteTarget() (PluginRouteTarget, error)
InvokeHook(PluginHookRequest) (PluginHookResponse, error)
ProviderProbe(ProviderProbeRequest) (ProviderProbeResponse, error)
SendMail(MailProviderRequest) (MailProviderResponse, error)
// 附件存储槽 attachment.storage.provider(E6.2,分块 Put/Open)。
StoragePutBegin(StoragePutBeginRequest) (StorageSessionResponse, error)
StoragePutChunk(StoragePutChunkRequest) (StorageResult, error)
StorageOpen(StorageOpenRequest) (StorageSessionResponse, error)
StorageGetChunk(StorageGetChunkRequest) (StorageGetChunkResponse, error)
StorageClose(StorageCloseRequest) (StorageResult, error)
StorageDelete(StorageObjectRequest) (StorageResult, error)
StorageStat(StorageStatRequest) (StorageStatResponse, error)
StorageExists(StorageExistsRequest) (StorageExistsResponse, error)
StoragePublicURL(StoragePublicURLRequest) (StorageURLResponse, error)
StorageSignedURL(StorageSignedURLRequest) (StorageURLResponse, error)
StorageProbe(StorageProbeRequest) (StorageProbeResponse, error)
StorageInstanceProtocol
}
type PluginRouteTarget ¶
type PluginRouteTarget struct {
BaseURL string
}
type PluginRuntimeFullSetInventory ¶
type PluginRuntimeFullSetInventory interface {
Get(context.Context, string) (extensions.Extension, error)
GetExtensionVersion(context.Context, extensions.ExactExtensionVersionInput) (extensions.ExtensionVersion, error)
LatestPluginRuntimePublication(context.Context) (extensions.PluginRuntimePublication, error)
}
PluginRuntimeFullSetInventory 提供 exact-artifact 元数据,不信任当前活动版本字段。 Get 只用于扩展身份元数据;不可变包内容必须以 GetExtensionVersion 为准。
type PluginSearchEngine ¶
type PluginSearchEngine struct {
// contains filtered or unexported fields
}
PluginSearchEngine 将 search.Engine 翻译为扩展 runtime 的 ProviderCall。
func NewPluginSearchEngine ¶
func NewPluginSearchEngine(extensionID string, runtime SearchRuntime) (*PluginSearchEngine, error)
NewPluginSearchEngine 构造插件搜索引擎适配器。
func (*PluginSearchEngine) Delete ¶
func (e *PluginSearchEngine) Delete(ctx context.Context, topicID int64) error
func (*PluginSearchEngine) EnsureIndex ¶
func (e *PluginSearchEngine) EnsureIndex(ctx context.Context) error
func (*PluginSearchEngine) Index ¶
func (e *PluginSearchEngine) Index(ctx context.Context, doc search.TopicSearchDoc) error
func (*PluginSearchEngine) Search ¶
func (e *PluginSearchEngine) Search(ctx context.Context, input search.SearchInput) (search.SearchResult, error)
type PluginSettings ¶
type PluginStorageAdapter ¶
type PluginStorageAdapter struct {
// contains filtered or unexported fields
}
PluginStorageAdapter 将 storage.Adapter 翻译为扩展 runtime 的分块存储 RPC。 放在 Extensions 包以避免 Support/Storage ↔ Extensions 的 import 环。 业务代码只依赖 storage.Adapter 接口。
func NewPluginStorageAdapter ¶
func NewPluginStorageAdapter(extensionID string, runtime StorageRuntime, chunkSize int) (*PluginStorageAdapter, error)
NewPluginStorageAdapter 构造插件后端适配器。chunkSize<=0 时用 1 MiB。
func (*PluginStorageAdapter) Delete ¶
func (a *PluginStorageAdapter) Delete(ctx context.Context, key string) error
func (*PluginStorageAdapter) Open ¶
func (a *PluginStorageAdapter) Open(ctx context.Context, key string) (io.ReadCloser, error)
func (*PluginStorageAdapter) Probe ¶
func (a *PluginStorageAdapter) Probe(ctx context.Context) error
func (*PluginStorageAdapter) PublicURL ¶
func (a *PluginStorageAdapter) PublicURL(key string) string
func (*PluginStorageAdapter) Stat ¶
func (a *PluginStorageAdapter) Stat(ctx context.Context, key string) (storage.ObjectInfo, error)
type PluginStorageAdapterFactory ¶
type PluginStorageAdapterFactory struct {
// contains filtered or unexported fields
}
PluginStorageAdapterFactory keeps concrete runtime RPCs behind the stable ExtensionRuntime adapter-factory boundary used by product models.
func NewPluginStorageAdapterFactory ¶
func NewPluginStorageAdapterFactory(runtime StorageRuntime, chunkSize int) *PluginStorageAdapterFactory
func (*PluginStorageAdapterFactory) NewStorageAdapter ¶
func (f *PluginStorageAdapterFactory) NewStorageAdapter(extensionID string) (storage.Adapter, error)
func (*PluginStorageAdapterFactory) NewStorageInstanceAdapter ¶
func (*PluginStorageAdapterFactory) ProbeStorageInstance ¶
func (*PluginStorageAdapterFactory) RemoveStorageInstance ¶
func (f *PluginStorageAdapterFactory) RemoveStorageInstance(ctx context.Context, extensionID, instanceID string) error
type PostgresExtensionDatabaseDisposition ¶
type PostgresExtensionDatabaseDisposition struct {
// contains filtered or unexported fields
}
func NewPostgresExtensionDatabaseDisposition ¶
func NewPostgresExtensionDatabaseDisposition(pool *pgxpool.Pool) *PostgresExtensionDatabaseDisposition
func (*PostgresExtensionDatabaseDisposition) ApplyLifecycleDataDisposition ¶
func (d *PostgresExtensionDatabaseDisposition) ApplyLifecycleDataDisposition( ctx context.Context, request ExtensionDatabaseDispositionRequest, ) (ExtensionDatabaseDispositionReceipt, error)
type PostgresExtensionDatabaseRegistry ¶
type PostgresExtensionDatabaseRegistry struct {
// contains filtered or unexported fields
}
func NewPostgresExtensionDatabaseRegistry ¶
func NewPostgresExtensionDatabaseRegistry( pool *pgxpool.Pool, random io.Reader, ) *PostgresExtensionDatabaseRegistry
func (*PostgresExtensionDatabaseRegistry) BeginRuntimeLeaseDrain ¶
func (r *PostgresExtensionDatabaseRegistry) BeginRuntimeLeaseDrain( ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, expectedRevision int64, ) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
func (*PostgresExtensionDatabaseRegistry) HeartbeatRuntimeLease ¶
func (r *PostgresExtensionDatabaseRegistry) HeartbeatRuntimeLease( ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, expectedRevision int64, ) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
func (*PostgresExtensionDatabaseRegistry) InspectOwnSchemaGrant ¶
func (r *PostgresExtensionDatabaseRegistry) InspectOwnSchemaGrant( ctx context.Context, artifact ExtensionDatabaseArtifact, ) (ExtensionDatabaseGrantSnapshot, error)
func (*PostgresExtensionDatabaseRegistry) InspectRuntimeLease ¶
func (r *PostgresExtensionDatabaseRegistry) InspectRuntimeLease( ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, ) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
func (*PostgresExtensionDatabaseRegistry) IssueRuntimeLease ¶
func (r *PostgresExtensionDatabaseRegistry) IssueRuntimeLease( ctx context.Context, request ExtensionDatabaseRuntimeLeaseIssue, ) (ExtensionDatabaseRuntimeCredential, error)
func (*PostgresExtensionDatabaseRegistry) ProvisionOwnSchema ¶
func (r *PostgresExtensionDatabaseRegistry) ProvisionOwnSchema( ctx context.Context, request ExtensionDatabaseGrantRequest, ) (ExtensionDatabaseCredential, error)
func (*PostgresExtensionDatabaseRegistry) ReapExpiredRuntimeLeases ¶
func (r *PostgresExtensionDatabaseRegistry) ReapExpiredRuntimeLeases( ctx context.Context, limit int, ) (int, error)
ReapExpiredRuntimeLeases retires physical login roles left behind when a Host process exits before it can revoke an exact runtime lease.
func (*PostgresExtensionDatabaseRegistry) RevokeOwnSchema ¶
func (r *PostgresExtensionDatabaseRegistry) RevokeOwnSchema( ctx context.Context, request ExtensionDatabaseGrantRequest, ) error
func (*PostgresExtensionDatabaseRegistry) RevokeRuntimeLease ¶
func (r *PostgresExtensionDatabaseRegistry) RevokeRuntimeLease( ctx context.Context, ref ExtensionDatabaseRuntimeLeaseRef, authority ExtensionDatabaseLeaseAuthority, ) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
func (*PostgresExtensionDatabaseRegistry) RotateOwnSchemaCredential ¶
func (r *PostgresExtensionDatabaseRegistry) RotateOwnSchemaCredential( ctx context.Context, request ExtensionDatabaseGrantRequest, ) (ExtensionDatabaseCredential, error)
type PostgresLifecycleAssetAuthority ¶
type PostgresLifecycleAssetAuthority struct {
// contains filtered or unexported fields
}
PostgresLifecycleAssetAuthority reads immutable lifecycle authority first and falls back to an unambiguous exact live grant for asset-only extensions.
func NewPostgresLifecycleAssetAuthority ¶
func NewPostgresLifecycleAssetAuthority( pool *pgxpool.Pool, operations LifecycleAssetOperationRepository, ) *PostgresLifecycleAssetAuthority
func (*PostgresLifecycleAssetAuthority) OperationImpactDigest ¶
func (a *PostgresLifecycleAssetAuthority) OperationImpactDigest( ctx context.Context, operationID int64, extension extensions.Extension, ) (string, error)
func (*PostgresLifecycleAssetAuthority) RestoreImpactDigest ¶
func (a *PostgresLifecycleAssetAuthority) RestoreImpactDigest( ctx context.Context, extension extensions.Extension, ) (string, error)
type PostgresLifecycleBoundaryCleanup ¶
type PostgresLifecycleBoundaryCleanup struct {
// contains filtered or unexported fields
}
PostgresLifecycleBoundaryCleanup only persists cleanup intent and recovery evidence. It deliberately has no filesystem remover or extension store dependency, so staging can never delete an extension row or package.
func NewPostgresLifecycleBoundaryCleanup ¶
func NewPostgresLifecycleBoundaryCleanup(pool *pgxpool.Pool) *PostgresLifecycleBoundaryCleanup
func (*PostgresLifecycleBoundaryCleanup) StageLifecycleHostCleanup ¶
func (c *PostgresLifecycleBoundaryCleanup) StageLifecycleHostCleanup( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryCleanupMode, ) (LifecycleBoundaryCleanupResult, error)
type PostgresLifecycleBoundaryCleanupFinalizer ¶
type PostgresLifecycleBoundaryCleanupFinalizer struct {
// contains filtered or unexported fields
}
func NewPostgresLifecycleBoundaryCleanupFinalizer ¶
func NewPostgresLifecycleBoundaryCleanupFinalizer( pool *pgxpool.Pool, purger LifecycleBoundaryCleanupPurger, ) *PostgresLifecycleBoundaryCleanupFinalizer
func (*PostgresLifecycleBoundaryCleanupFinalizer) FinalizeLifecycleHostCleanup ¶
func (f *PostgresLifecycleBoundaryCleanupFinalizer) FinalizeLifecycleHostCleanup( ctx context.Context, operationID int64, ) (LifecycleCleanupFinalizationResult, error)
type PostgresLifecycleBoundaryJobs ¶
type PostgresLifecycleBoundaryJobs struct {
// contains filtered or unexported fields
}
PostgresLifecycleBoundaryJobs composes River's existing lifecycle planner, Manager exact-runtime admission, and the schedule trigger admission registry. PostgreSQL stores only desired snapshots and sanitized reconciliation proof.
func NewPostgresLifecycleBoundaryJobs ¶
func NewPostgresLifecycleBoundaryJobs(config PostgresLifecycleBoundaryJobsConfig) *PostgresLifecycleBoundaryJobs
func (*PostgresLifecycleBoundaryJobs) DrainLifecycleJobs ¶
func (b *PostgresLifecycleBoundaryJobs) DrainLifecycleJobs( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryJobMode, role extensions.LifecycleCoordinatorRuntimeRole, ) error
func (*PostgresLifecycleBoundaryJobs) PrepareLifecycleJobPublication ¶
func (b *PostgresLifecycleBoundaryJobs) PrepareLifecycleJobPublication( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) (LifecycleBoundaryTransaction, error)
func (*PostgresLifecycleBoundaryJobs) ReconcileCommittedLifecycleJobs ¶
func (b *PostgresLifecycleBoundaryJobs) ReconcileCommittedLifecycleJobs( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryJobMode, publicationMode LifecycleBoundaryPublicationMode, ) error
func (*PostgresLifecycleBoundaryJobs) ResumeLifecycleJobs ¶
func (b *PostgresLifecycleBoundaryJobs) ResumeLifecycleJobs( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryJobMode, role extensions.LifecycleCoordinatorRuntimeRole, ) error
func (*PostgresLifecycleBoundaryJobs) ValidateLifecycleJobs ¶
func (b *PostgresLifecycleBoundaryJobs) ValidateLifecycleJobs( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryJobMode, ) error
type PostgresLifecycleBoundaryJobsConfig ¶
type PostgresLifecycleBoundaryJobsConfig struct {
Pool *pgxpool.Pool
Runtime LifecycleBoundaryJobRuntime
Schedules *supportjobs.PluginScheduleAdmissionRegistry
Coordinator *hostapi.PluginJobLifecycleCoordinator
Trust RuntimeTrustSource
Migrations LifecycleBoundaryJobMigrationSource
Journal LifecycleBoundaryPublicationJournal
}
type PostgresLifecycleBoundaryPublicationJournal ¶
type PostgresLifecycleBoundaryPublicationJournal struct {
// contains filtered or unexported fields
}
PostgresLifecycleBoundaryPublicationJournal is the durable decision point for crash recovery. It records only exact artifact identities; extension rows and mutable manifests are deliberately not part of the retained authority.
func NewPostgresLifecycleBoundaryPublicationJournal ¶
func NewPostgresLifecycleBoundaryPublicationJournal(pool *pgxpool.Pool) *PostgresLifecycleBoundaryPublicationJournal
func (*PostgresLifecycleBoundaryPublicationJournal) CommitLifecyclePublication ¶
func (j *PostgresLifecycleBoundaryPublicationJournal) CommitLifecyclePublication( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) error
func (*PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommitted ¶
func (j *PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommitted( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) (bool, error)
func (*PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommittedForOperation ¶
func (j *PostgresLifecycleBoundaryPublicationJournal) LifecyclePublicationCommittedForOperation( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) (bool, error)
LifecyclePublicationCommittedForOperation is the read-only recovery query used by an earlier source-drain step. Gate attempts are per-step, so this query deliberately ignores Attempt while retaining every logical and exact- artifact fence. It never prepares or advances the publication row.
func (*PostgresLifecycleBoundaryPublicationJournal) PrepareLifecyclePublication ¶
func (j *PostgresLifecycleBoundaryPublicationJournal) PrepareLifecyclePublication( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) error
type PostgresLifecycleBoundaryRegistries ¶
type PostgresLifecycleBoundaryRegistries struct {
// contains filtered or unexported fields
}
PostgresLifecycleBoundaryRegistries composes the production HookBus, Protocol-v2 Service Registry, Page, Route, Component, and Asset registries, plus the exact package schema publication consumed by the Route dispatcher.
func NewPostgresLifecycleBoundaryRegistries ¶
func NewPostgresLifecycleBoundaryRegistries(config LifecycleRegistryBoundaryConfig) *PostgresLifecycleBoundaryRegistries
func (*PostgresLifecycleBoundaryRegistries) AssetRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) AssetRegistry() *assetregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) CacheRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) CacheRegistry() *cacheregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) ComponentRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) ComponentRegistry() *ComponentRegistry
func (*PostgresLifecycleBoundaryRegistries) ContentRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) ContentRegistry() *contentregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) EditorRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) EditorRegistry() *editorregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) EntityRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) EntityRegistry() *entityregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) IdentityRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) IdentityRegistry() *identityregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) MediaRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) MediaRegistry() *mediaregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) NavigationRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) NavigationRegistry() *navigationregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) PrepareLifecycleRegistryPublication ¶
func (b *PostgresLifecycleBoundaryRegistries) PrepareLifecycleRegistryPublication( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) (LifecycleBoundaryTransaction, error)
func (*PostgresLifecycleBoundaryRegistries) PrepareRuntimeQueriesForSettings ¶
func (b *PostgresLifecycleBoundaryRegistries) PrepareRuntimeQueriesForSettings( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeQuerySettingsRestartTransaction, error)
PrepareRuntimeQueriesForSettings closes source admission before Service persists new settings. The returned transaction owns publicationMu until it either commits the exact replacement or restores/keeps the source closed.
func (*PostgresLifecycleBoundaryRegistries) PublishRuntimeCaches ¶
func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeCaches( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeCachePublicationMutation, error)
PublishRuntimeCaches production-binds a cache-bearing plugin that uses the legacy Service Enable path because it declares no Lifecycle V2 hook contract.
func (*PostgresLifecycleBoundaryRegistries) PublishRuntimeContent ¶
func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeContent( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeContentPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) PublishRuntimeEditor ¶
func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeEditor( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeEditorPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) PublishRuntimeIdentity ¶
func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeIdentity( ctx context.Context, extension extensions.Extension, actorUserID int64, auditEventID int64, ) (extensions.RuntimeIdentityPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) PublishRuntimeQueries ¶
func (b *PostgresLifecycleBoundaryRegistries) PublishRuntimeQueries( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeQueryPublicationMutation, error)
PublishRuntimeQueries production-binds a Query Registry plugin that uses the legacy Service Enable path because it declares no Lifecycle V2 hook contract.
func (*PostgresLifecycleBoundaryRegistries) QuarantineRuntimeCaches ¶
func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeCaches( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeCachePublicationMutation, error)
QuarantineRuntimeCaches closes exact runtime admission and removes only the observed complete publication. Rollback restores publication before admission.
func (*PostgresLifecycleBoundaryRegistries) QuarantineRuntimeContent ¶
func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeContent( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeContentPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) QuarantineRuntimeEditor ¶
func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeEditor( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeEditorPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) QuarantineRuntimeIdentity ¶
func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeIdentity( ctx context.Context, extension extensions.Extension, actorUserID int64, auditEventID int64, ) (extensions.RuntimeIdentityPublicationMutation, error)
func (*PostgresLifecycleBoundaryRegistries) QuarantineRuntimeQueries ¶
func (b *PostgresLifecycleBoundaryRegistries) QuarantineRuntimeQueries( ctx context.Context, extension extensions.Extension, ) (extensions.RuntimeQueryPublicationMutation, error)
QuarantineRuntimeQueries closes exact runtime admission and removes only the observed publication. The returned mutation retains enough Host state to restore publication-before-resume if Store.Disable fails.
func (*PostgresLifecycleBoundaryRegistries) QueryRegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) QueryRegistry() *queryregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) RestoreCachePublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreCachePublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
RestoreCachePublications exposes the cache-only startup boundary used by the standalone worker, which does not construct public Route/Page registries.
func (*PostgresLifecycleBoundaryRegistries) RestoreContentPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreContentPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreEditorPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreEditorPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreEntityPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreEntityPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreMediaPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreMediaPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreNavigationPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreNavigationPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreRoutePublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreRoutePublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) RestoreSEOPublications ¶
func (b *PostgresLifecycleBoundaryRegistries) RestoreSEOPublications( ctx context.Context, items []extensions.Extension, safeMode bool, ) error
func (*PostgresLifecycleBoundaryRegistries) SEORegistry ¶
func (b *PostgresLifecycleBoundaryRegistries) SEORegistry() *seoregistry.Registry
func (*PostgresLifecycleBoundaryRegistries) SuppressedIdentityExtensions ¶
func (b *PostgresLifecycleBoundaryRegistries) SuppressedIdentityExtensions() []string
SuppressedIdentityExtensions reports the plugins whose durable Identity publication was suppressed during this boot. They are published nowhere until a lifecycle operation republishes them.
func (*PostgresLifecycleBoundaryRegistries) ValidateLifecycleRegistries ¶
func (b *PostgresLifecycleBoundaryRegistries) ValidateLifecycleRegistries( ctx context.Context, request LifecycleBoundaryRequest, ) error
type PostgresLifecycleBoundaryState ¶
type PostgresLifecycleBoundaryState struct {
// contains filtered or unexported fields
}
PostgresLifecycleBoundaryState adapts the Models exact-state repository to the composed boundary. Returned transactions retain only a durable row key; every method reloads source/target facts from PostgreSQL.
func NewPostgresLifecycleBoundaryState ¶
func NewPostgresLifecycleBoundaryState( repository extensions.LifecycleStatePublicationRepository, ) *PostgresLifecycleBoundaryState
func (*PostgresLifecycleBoundaryState) PrepareLifecycleStatePublication ¶
func (s *PostgresLifecycleBoundaryState) PrepareLifecycleStatePublication( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryPublicationMode, ) (LifecycleBoundaryTransaction, error)
type PostgresLifecycleMigrationEngine ¶
type PostgresLifecycleMigrationEngine struct {
// contains filtered or unexported fields
}
func NewPostgresLifecycleMigrationEngine ¶
func NewPostgresLifecycleMigrationEngine( pool *pgxpool.Pool, random io.Reader, ) *PostgresLifecycleMigrationEngine
func (*PostgresLifecycleMigrationEngine) InspectLifecycleMigration ¶
func (e *PostgresLifecycleMigrationEngine) InspectLifecycleMigration( ctx context.Context, plan LifecycleMigrationEnginePlan, ) (LifecycleMigrationEngineProof, error)
func (*PostgresLifecycleMigrationEngine) PreflightLifecycleMigration ¶
func (e *PostgresLifecycleMigrationEngine) PreflightLifecycleMigration( ctx context.Context, plan LifecycleMigrationEnginePlan, ) (LifecycleMigrationPreflightResult, error)
PreflightLifecycleMigration performs the same exact-artifact discovery and Goose parsing used by execution. Goose is connected only to the in-memory statement recorder, so package SQL is inspected but never sent to PostgreSQL.
func (*PostgresLifecycleMigrationEngine) ReconcileLifecycleMigration ¶
func (e *PostgresLifecycleMigrationEngine) ReconcileLifecycleMigration( ctx context.Context, plan LifecycleMigrationEnginePlan, ) error
type PostgresLifecycleRegistryPublicationRepository ¶
type PostgresLifecycleRegistryPublicationRepository struct {
// contains filtered or unexported fields
}
func NewPostgresLifecycleRegistryPublicationRepository ¶
func NewPostgresLifecycleRegistryPublicationRepository( pool *pgxpool.Pool, ) *PostgresLifecycleRegistryPublicationRepository
func (*PostgresLifecycleRegistryPublicationRepository) InspectLifecycleRegistryPublication ¶
func (r *PostgresLifecycleRegistryPublicationRepository) InspectLifecycleRegistryPublication( ctx context.Context, ref LifecycleRegistryPublicationRef, ) (LifecycleRegistryPublicationPhase, error)
func (*PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublication ¶
func (r *PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublication( ctx context.Context, ref LifecycleRegistryPublicationRef, destination LifecycleRegistryPublicationPhase, apply func() error, ) error
func (*PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublicationTx ¶
func (r *PostgresLifecycleRegistryPublicationRepository) MoveLifecycleRegistryPublicationTx( ctx context.Context, ref LifecycleRegistryPublicationRef, destination LifecycleRegistryPublicationPhase, apply func(pgx.Tx) error, ) error
func (*PostgresLifecycleRegistryPublicationRepository) PrepareLifecycleRegistryPublication ¶
func (r *PostgresLifecycleRegistryPublicationRepository) PrepareLifecycleRegistryPublication( ctx context.Context, input PrepareLifecycleRegistryPublicationInput, ) (LifecycleRegistryPublicationRef, error)
type PostgresProviderSlotSelectionStore ¶
type PostgresProviderSlotSelectionStore struct {
// contains filtered or unexported fields
}
func NewPostgresProviderSlotSelectionStore ¶
func NewPostgresProviderSlotSelectionStore(pool *pgxpool.Pool) *PostgresProviderSlotSelectionStore
func (*PostgresProviderSlotSelectionStore) Desired ¶
func (s *PostgresProviderSlotSelectionStore) Desired(ctx context.Context, contractID string) (ProviderSlotSelection, error)
func (*PostgresProviderSlotSelectionStore) InvalidateExtension ¶
func (s *PostgresProviderSlotSelectionStore) InvalidateExtension(ctx context.Context, request InvalidateProviderSlotRequest) (int64, error)
func (*PostgresProviderSlotSelectionStore) ListEvents ¶
func (s *PostgresProviderSlotSelectionStore) ListEvents(ctx context.Context, contractID string, limit int) ([]ProviderSlotSelectionEvent, error)
func (*PostgresProviderSlotSelectionStore) Reset ¶
func (s *PostgresProviderSlotSelectionStore) Reset(ctx context.Context, request ResetProviderSlotRequest) error
func (*PostgresProviderSlotSelectionStore) Select ¶
func (s *PostgresProviderSlotSelectionStore) Select(ctx context.Context, request SelectProviderSlotRequest) (ProviderSlotSelection, error)
func (*PostgresProviderSlotSelectionStore) Selected ¶
func (s *PostgresProviderSlotSelectionStore) Selected(ctx context.Context, contractID string) (ProviderSlotSelection, error)
type ProductionComponentComposition ¶
type ProductionComponentComposition struct {
// contains filtered or unexported fields
}
ProductionComponentComposition is the production-bound ComponentCompositionExecutor service. Bootstrap owns one instance on the lifecycle stack.
func NewProductionComponentComposition ¶
func NewProductionComponentComposition( config ProductionComponentCompositionConfig, ) (*ProductionComponentComposition, error)
NewProductionComponentComposition builds the production executor with Core renderer, Manager admission, and default target bindings.
func (*ProductionComponentComposition) Compose ¶
func (s *ProductionComponentComposition) Compose( ctx context.Context, request ComponentCompositionRequest, ) (ComponentCompositionResult, error)
Compose is the stable production entrypoint for Host composition. Callers may omit Binding; production resolves the Host default for the target.
func (*ProductionComponentComposition) ComposePageHTML ¶
func (s *ProductionComponentComposition) ComposePageHTML( ctx context.Context, pageID string, props map[string]any, ) ([]string, error)
ComposePageHTML implements pages.PageCompositionRenderer without importing the pages package (Extensions already depends on Pages in lifecycle code).
func (*ProductionComponentComposition) ComposePageTarget ¶
func (s *ProductionComponentComposition) ComposePageTarget( ctx context.Context, pageID string, props map[string]any, actor ComponentActorAuthority, ) ([]string, error)
ComposePageTarget maps a Page Registry id (e.g. forum.home) to the Host component target (core.component.page.forum.home) and composes it. Returned HTML is only non-Core contribution output so theme primary content is never replaced by this helper.
func (*ProductionComponentComposition) InspectorTraces ¶
func (s *ProductionComponentComposition) InspectorTraces() []ComponentCompositionTrace
InspectorTraces exposes the detached composition trace ring for admin tools.
func (*ProductionComponentComposition) PublishPackageSSR ¶
func (s *ProductionComponentComposition) PublishPackageSSR(extension extensions.Extension) error
PublishPackageSSR 在组件生命周期发布成功后编译包本地 SSR 模板。 外部自定义 PluginRenderer 时仍会更新内部缓存,以便后续切回默认渲染器。
func (*ProductionComponentComposition) RemovePackageSSR ¶
func (s *ProductionComponentComposition) RemovePackageSSR(extensionID, packageDigest string)
RemovePackageSSR 在组件禁用/卸载时丢弃包本地 SSR 缓存。
func (*ProductionComponentComposition) ResolveTarget ¶
func (s *ProductionComponentComposition) ResolveTarget( _ context.Context, target ComponentTarget, ) (ComponentTargetBinding, error)
ResolveTarget supplies Host-owned bindings. Page targets retain primary SSR content; validators deliberately accept any props/result until a target owner publishes a stricter contract.
type ProductionComponentCompositionConfig ¶
type ProductionComponentCompositionConfig struct {
Registry *ComponentRegistry
Manager *Manager
PluginRenderer ComponentSSRRenderer
PermissionAuthorizer ComponentPermissionAuthorizer
ResolvePolicy ComponentCallPolicyResolver
}
ProductionComponentCompositionConfig wires the Host-owned composition stack. PermissionAuthorizer 为 nil 时仅依赖 Actor 上限(SuperAdmin / 空 permission)。
type ProductionLifecycleBoundaryMigrations ¶
type ProductionLifecycleBoundaryMigrations struct {
// contains filtered or unexported fields
}
ProductionLifecycleBoundaryMigrations is deliberately fail-closed until P5 installs a real engine. It never reads extension_migration_ledger because that v1 table did not execute SQL.
func NewProductionLifecycleBoundaryMigrations ¶
func NewProductionLifecycleBoundaryMigrations( pool *pgxpool.Pool, engine LifecycleMigrationEngine, ) *ProductionLifecycleBoundaryMigrations
func (*ProductionLifecycleBoundaryMigrations) CanPrepareLifecycleMigrations ¶
func (m *ProductionLifecycleBoundaryMigrations) CanPrepareLifecycleMigrations( ctx context.Context, request LifecycleStaticPreflightRequest, ) (bool, error)
CanPrepareLifecycleMigrations is safe to call before coordinator.Run. It never invokes the engine. Declared SQL can proceed only when the exact target already has a durable V3 proof or a real P5 engine is configured for the later fenced boundary step.
func (*ProductionLifecycleBoundaryMigrations) CanResumeLifecycleSource ¶
func (m *ProductionLifecycleBoundaryMigrations) CanResumeLifecycleSource( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryMigrationMode, ) (bool, error)
func (*ProductionLifecycleBoundaryMigrations) LifecycleArtifactMigrationReady ¶
func (m *ProductionLifecycleBoundaryMigrations) LifecycleArtifactMigrationReady( ctx context.Context, artifact extensions.Extension, ) (bool, error)
func (*ProductionLifecycleBoundaryMigrations) ReconcileLifecycleMigrations ¶
func (m *ProductionLifecycleBoundaryMigrations) ReconcileLifecycleMigrations( ctx context.Context, request LifecycleBoundaryRequest, mode LifecycleBoundaryMigrationMode, ) error
type ProductionLifecycleBoundaryPreflight ¶
type ProductionLifecycleBoundaryPreflight struct {
// contains filtered or unexported fields
}
ProductionLifecycleBoundaryPreflight uses only Host-owned static facts: installed manifests, feature flags, exact trust rows, package/Host protocol compatibility, and durable migration readiness. No dependency exposes a process start method through this adapter.
func NewProductionLifecycleBoundaryPreflight ¶
func NewProductionLifecycleBoundaryPreflight( config ProductionLifecycleBoundaryPreflightConfig, ) *ProductionLifecycleBoundaryPreflight
func (*ProductionLifecycleBoundaryPreflight) CheckLifecycleBoundary ¶
func (p *ProductionLifecycleBoundaryPreflight) CheckLifecycleBoundary( ctx context.Context, request LifecycleBoundaryRequest, ) error
func (*ProductionLifecycleBoundaryPreflight) CheckLifecycleStaticPreflight ¶
func (p *ProductionLifecycleBoundaryPreflight) CheckLifecycleStaticPreflight( ctx context.Context, request LifecycleStaticPreflightRequest, ) error
type ProductionLifecycleBoundaryPreflightConfig ¶
type ProductionLifecycleBoundaryPreflightConfig struct {
Pool *pgxpool.Pool
Inventory LifecycleBoundaryExtensionInventory
Features extensions.FeatureFlagSource
Compatibility extensions.RuntimePreflight
Trust LifecycleBoundaryArtifactTrust
Migrations LifecycleBoundaryMigrationFacts
}
type ProtocolNoop ¶
type ProtocolNoop struct{}
ProtocolNoop 提供 PluginProtocol 全部方法的安全默认实现。 插件可嵌入后只覆盖需要的 RPC(与 sdk/plugin.Noop 一致)。
func (ProtocolNoop) Health ¶
func (ProtocolNoop) Health() (PluginHealth, error)
func (ProtocolNoop) InvokeHook ¶
func (ProtocolNoop) InvokeHook(PluginHookRequest) (PluginHookResponse, error)
func (ProtocolNoop) ProviderProbe ¶
func (ProtocolNoop) ProviderProbe(ProviderProbeRequest) (ProviderProbeResponse, error)
func (ProtocolNoop) RouteTarget ¶
func (ProtocolNoop) RouteTarget() (PluginRouteTarget, error)
func (ProtocolNoop) SendMail ¶
func (ProtocolNoop) SendMail(MailProviderRequest) (MailProviderResponse, error)
func (ProtocolNoop) StorageClose ¶
func (ProtocolNoop) StorageClose(StorageCloseRequest) (StorageResult, error)
func (ProtocolNoop) StorageConfigureInstance ¶
func (ProtocolNoop) StorageConfigureInstance(StorageConfigureInstanceRequest) (StorageResult, error)
func (ProtocolNoop) StorageDelete ¶
func (ProtocolNoop) StorageDelete(StorageObjectRequest) (StorageResult, error)
func (ProtocolNoop) StorageExists ¶
func (ProtocolNoop) StorageExists(StorageExistsRequest) (StorageExistsResponse, error)
func (ProtocolNoop) StorageGetChunk ¶
func (ProtocolNoop) StorageGetChunk(StorageGetChunkRequest) (StorageGetChunkResponse, error)
func (ProtocolNoop) StorageOpen ¶
func (ProtocolNoop) StorageOpen(StorageOpenRequest) (StorageSessionResponse, error)
func (ProtocolNoop) StorageProbe ¶
func (ProtocolNoop) StorageProbe(StorageProbeRequest) (StorageProbeResponse, error)
func (ProtocolNoop) StorageProbeConfig ¶
func (ProtocolNoop) StorageProbeConfig(StorageProbeConfigRequest) (StorageProbeResponse, error)
func (ProtocolNoop) StoragePublicURL ¶
func (ProtocolNoop) StoragePublicURL(StoragePublicURLRequest) (StorageURLResponse, error)
func (ProtocolNoop) StoragePutBegin ¶
func (ProtocolNoop) StoragePutBegin(StoragePutBeginRequest) (StorageSessionResponse, error)
func (ProtocolNoop) StoragePutChunk ¶
func (ProtocolNoop) StoragePutChunk(StoragePutChunkRequest) (StorageResult, error)
func (ProtocolNoop) StorageRemoveInstance ¶
func (ProtocolNoop) StorageRemoveInstance(StorageRemoveInstanceRequest) (StorageResult, error)
func (ProtocolNoop) StorageSignedURL ¶
func (ProtocolNoop) StorageSignedURL(StorageSignedURLRequest) (StorageURLResponse, error)
func (ProtocolNoop) StorageStat ¶
func (ProtocolNoop) StorageStat(StorageStatRequest) (StorageStatResponse, error)
type ProtocolRuntimeInstanceSnapshot ¶
type ProtocolRuntimeInstanceSnapshot struct {
Identity RuntimeInstanceIdentity
ExtensionVersion string
ArtifactDigest string
ManifestDigest string
ProtocolVersion int
Target RouteTarget
State ProtocolRuntimeInstanceState
Healthy bool
Ready bool
ReadinessChecked bool
StartedAt time.Time
}
ProtocolRuntimeInstanceSnapshot 只暴露宿主可安全检查的 exact process 元数据。
type ProtocolRuntimeInstanceState ¶
type ProtocolRuntimeInstanceState string
const ( ProtocolRuntimeStaged ProtocolRuntimeInstanceState = "staged" ProtocolRuntimePublished ProtocolRuntimeInstanceState = "published" ProtocolRuntimeRetained ProtocolRuntimeInstanceState = "retained" )
type ProtocolRuntimeSetLease ¶
type ProtocolRuntimeSetLease struct {
// contains filtered or unexported fields
}
ProtocolRuntimeSetLease keeps ProtocolStarter membership and the HostAPI service writer fence continuous across an aggregate Manager commit/rollback.
func (*ProtocolRuntimeSetLease) Release ¶
func (l *ProtocolRuntimeSetLease) Release()
func (*ProtocolRuntimeSetLease) Restore ¶
func (l *ProtocolRuntimeSetLease) Restore( ctx context.Context, identities []RuntimeInstanceIdentity, ) ([]ProtocolRuntimeInstanceSnapshot, error)
func (*ProtocolRuntimeSetLease) Validate ¶
func (l *ProtocolRuntimeSetLease) Validate(ctx context.Context, identities []RuntimeInstanceIdentity) error
Validate proves that the complete published process set is still the exact live set while the ProtocolStarter and ServiceRegistry writer fences remain held. It is the final candidate fence immediately before Manager commit.
type ProtocolStarter ¶
type ProtocolStarter struct {
// contains filtered or unexported fields
}
func NewProtocolStarter ¶
func NewProtocolStarter(config ProtocolStarterConfig) *ProtocolStarter
func (*ProtocolStarter) DiscardInstance ¶
func (s *ProtocolStarter) DiscardInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
DiscardInstance 只销毁从未发布的 V2 候选,不能误删活动或 rollback 保留实例。
func (*ProtocolStarter) ExecutePluginJob ¶
func (s *ProtocolStarter) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
func (*ProtocolStarter) FilterQueryResult ¶
func (s *ProtocolStarter) FilterQueryResult( ctx context.Context, extension extensions.Extension, input VersionedQueryResultFilterRequest, ) ([]queryregistry.QueryRow, error)
func (*ProtocolStarter) FilterQueryResultInstance ¶
func (s *ProtocolStarter) FilterQueryResultInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryResultFilterRequest, ) ([]queryregistry.QueryRow, error)
func (*ProtocolStarter) HealthInstance ¶
func (s *ProtocolStarter) HealthInstance(ctx context.Context, identity RuntimeInstanceIdentity) (PluginHealth, error)
HealthInstance 对 exact V2 进程重新执行 health+readiness,不读取活动回退实例。
func (*ProtocolStarter) InspectInstance ¶
func (s *ProtocolStarter) InspectInstance(identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
func (*ProtocolStarter) InvokeAdminSurface ¶
func (s *ProtocolStarter) InvokeAdminSurface( ctx context.Context, identity RuntimeInstanceIdentity, contract AdminSurfaceContract, input map[string]any, actor *ProtocolV2InvocationActor, idempotencyKey string, ) (map[string]any, error)
func (*ProtocolStarter) InvokeContentInstance ¶
func (s *ProtocolStarter) InvokeContentInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedContentRequest, ) (VersionedContentResponse, error)
func (*ProtocolStarter) InvokeGuardInstance ¶
func (s *ProtocolStarter) InvokeGuardInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2GuardRequest, ) error
func (*ProtocolStarter) InvokeHook ¶
func (s *ProtocolStarter) InvokeHook(ctx context.Context, extension extensions.Extension, input HookInput) HookResult
func (*ProtocolStarter) InvokeIdentityProviderInstance ¶
func (s *ProtocolStarter) InvokeIdentityProviderInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedIdentityProviderRequest, ) (VersionedIdentityProviderResponse, error)
func (*ProtocolStarter) InvokePluginCommand ¶
func (s *ProtocolStarter) InvokePluginCommand( ctx context.Context, identity RuntimeInstanceIdentity, contract PluginCommandContract, input map[string]any, ) (map[string]any, error)
func (*ProtocolStarter) InvokeQuery ¶
func (s *ProtocolStarter) InvokeQuery( ctx context.Context, extension extensions.Extension, input VersionedQueryRequest, ) ([]queryregistry.QueryRow, error)
func (*ProtocolStarter) InvokeQueryInstance ¶
func (s *ProtocolStarter) InvokeQueryInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryRequest, ) ([]queryregistry.QueryRow, error)
func (*ProtocolStarter) InvokeRouteInstance ¶
func (s *ProtocolStarter) InvokeRouteInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteRequest, ) (ProtocolV2RouteResponse, error)
InvokeRouteInstance never selects the active process as a fallback. Staged, published, and retained instances remain distinguishable by exact identity.
func (*ProtocolStarter) InvokeVersionedAITool ¶
func (s *ProtocolStarter) InvokeVersionedAITool( ctx context.Context, extension extensions.Extension, input VersionedAIToolRequest, ) (VersionedAIToolResponse, error)
InvokeVersionedAITool 把一次工具调用派发到精确 runtime。 与 SEO 同一手法:先在运行时表里取到该插件的 Protocol V2 客户端,再调它。
func (*ProtocolStarter) InvokeVersionedProvider ¶
func (s *ProtocolStarter) InvokeVersionedProvider( ctx context.Context, extension extensions.Extension, input VersionedProviderRequest, ) (VersionedProviderResponse, error)
func (*ProtocolStarter) InvokeVersionedSEO ¶
func (s *ProtocolStarter) InvokeVersionedSEO( ctx context.Context, extension extensions.Extension, input VersionedSEORequest, ) (VersionedSEOResponse, error)
func (*ProtocolStarter) OpenRouteStreamInstance ¶
func (s *ProtocolStarter) OpenRouteStreamInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteStreamRequest, ) (*ProtocolV2RouteStream, error)
OpenRouteStreamInstance never re-selects the active runtime. A retained source process and its replacement may both drain streams under distinct exact identities during a rolling upgrade.
func (*ProtocolStarter) ProtocolTelemetry ¶
func (s *ProtocolStarter) ProtocolTelemetry(extensionID string) ProtocolTelemetrySnapshot
func (*ProtocolStarter) ProviderProbe ¶
func (s *ProtocolStarter) ProviderProbe(ctx context.Context, extensionID string, request ProviderProbeRequest) (ProviderProbeResponse, error)
func (*ProtocolStarter) PublishInstance ¶
func (s *ProtocolStarter) PublishInstance(ctx context.Context, identity RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
PublishInstance 健康检查后原子替换 V2 Service Registry,再切换活动 transport 指针。 调用方在此边界外负责关闭 Manager admission,避免跨 Registry 的新 ordinary 调用。
func (*ProtocolStarter) PublishInstanceSet ¶
func (s *ProtocolStarter) PublishInstanceSet( ctx context.Context, identities []RuntimeInstanceIdentity, ) ([]ProtocolRuntimeInstanceSnapshot, *ProtocolRuntimeSetLease, error)
PublishInstanceSet validates and publishes exactly identities. Service discovery/dependency readers and ProtocolStarter pointer readers can observe only the complete previous set or the complete desired set.
func (*ProtocolStarter) RunLifecycle ¶
func (s *ProtocolStarter) RunLifecycle(ctx context.Context, extension extensions.Extension, invocation LifecycleInvocation) (LifecycleRunResult, error)
RunLifecycle invokes only the typed v2 lifecycle surface. Protocol-v1 packages remain runnable, but never report lifecycle v2 as supported.
func (*ProtocolStarter) RunLifecycleInstance ¶
func (s *ProtocolStarter) RunLifecycleInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, invocation LifecycleInvocation, ) (LifecycleRunResult, error)
RunLifecycleInstance invokes lifecycle code on one staged/published/retained V2 process. It never falls back to the extension's current active instance.
func (*ProtocolStarter) RuntimeInstanceSetVisible ¶
func (s *ProtocolStarter) RuntimeInstanceSetVisible(ctx context.Context, identities []RuntimeInstanceIdentity) bool
RuntimeInstanceSetVisible checks both active process pointers and the exact Protocol V2 service/dependency snapshot for idempotent full-set replay.
func (*ProtocolStarter) SearchEngineDelete ¶
func (s *ProtocolStarter) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
func (*ProtocolStarter) SearchEngineEnsure ¶
func (s *ProtocolStarter) SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
func (*ProtocolStarter) SearchEngineIndex ¶
func (s *ProtocolStarter) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
func (*ProtocolStarter) SearchEngineProbe ¶
func (s *ProtocolStarter) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
func (*ProtocolStarter) SearchEngineSearch ¶
func (s *ProtocolStarter) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
func (*ProtocolStarter) SendMail ¶
func (s *ProtocolStarter) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
func (*ProtocolStarter) Start ¶
func (s *ProtocolStarter) Start(ctx context.Context, extension extensions.Extension) (RouteTarget, error)
Start 内部完成 stage+publish。需要跨 health/drain 边界编排时,调用方应使用 StartInstance + PublishInstance。
func (*ProtocolStarter) StartInstance ¶
func (s *ProtocolStarter) StartInstance(ctx context.Context, extension extensions.Extension) (RouteTarget, error)
StartInstance 启动并验证一个未发布的 V2 进程;不会改变活动指针或 Registry。
func (*ProtocolStarter) Stop ¶
func (s *ProtocolStarter) Stop(ctx context.Context, extension extensions.Extension) error
func (*ProtocolStarter) StopInstance ¶
func (s *ProtocolStarter) StopInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
StopInstance 停止任意 staged/published/retained V2 exact process。
func (*ProtocolStarter) StopRetainedInstance ¶
func (s *ProtocolStarter) StopRetainedInstance(ctx context.Context, identity RuntimeInstanceIdentity) error
StopRetainedInstance stops one exact V2 process only after complete-set publication has made it unreachable. It cannot stop an active or staged candidate.
func (*ProtocolStarter) StorageClose ¶
func (s *ProtocolStarter) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
func (*ProtocolStarter) StorageConfigureInstance ¶
func (s *ProtocolStarter) StorageConfigureInstance(ctx context.Context, extensionID string, request StorageConfigureInstanceRequest) (StorageResult, error)
func (*ProtocolStarter) StorageDelete ¶
func (s *ProtocolStarter) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
func (*ProtocolStarter) StorageExists ¶
func (s *ProtocolStarter) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
func (*ProtocolStarter) StorageGetChunk ¶
func (s *ProtocolStarter) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
func (*ProtocolStarter) StorageOpen ¶
func (s *ProtocolStarter) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
func (*ProtocolStarter) StorageProbe ¶
func (s *ProtocolStarter) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
func (*ProtocolStarter) StorageProbeConfig ¶
func (s *ProtocolStarter) StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
func (*ProtocolStarter) StoragePublicURL ¶
func (s *ProtocolStarter) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
func (*ProtocolStarter) StoragePutBegin ¶
func (s *ProtocolStarter) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
func (*ProtocolStarter) StoragePutChunk ¶
func (s *ProtocolStarter) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
func (*ProtocolStarter) StorageRemoveInstance ¶
func (s *ProtocolStarter) StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
func (*ProtocolStarter) StorageSignedURL ¶
func (s *ProtocolStarter) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
func (*ProtocolStarter) StorageStat ¶
func (s *ProtocolStarter) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
type ProtocolStarterConfig ¶
type ProtocolStarterConfig struct {
Settings PluginSettings
// HostAPI 可选;注入后向子进程写入 SFORUM_HOST_API_* 环境变量。
HostAPI HostAPIRegistrar
// Trust 为 v2 握手解析精确 artifact grant;上传包不可省略。
Trust RuntimeTrustSource
// DatabaseLeases 为声明直接数据库权限的 exact runtime 签发独立短租约。
DatabaseLeases RuntimeDatabaseLeaseRegistry
// 测试可缩短心跳;生产零值使用推荐值。
DatabaseLeaseHeartbeatInterval time.Duration
DatabaseLeaseOperationTimeout time.Duration
}
type ProtocolTelemetrySnapshot ¶
type ProtocolTelemetrySnapshot struct {
ProtocolVersion int
Transport string
Deprecated bool
StartCount uint64
CallCount uint64
LastCallAt *time.Time
}
ProtocolTelemetrySnapshot is the operator-visible transport/deprecation metric for one extension runtime.
type ProtocolTelemetrySource ¶
type ProtocolTelemetrySource interface {
ProtocolTelemetry(extensionID string) ProtocolTelemetrySnapshot
}
ProtocolTelemetrySource lets Manager merge transport metrics into status.
type ProtocolV2Error ¶
type ProtocolV2Error struct {
Code protocolv2.ErrorCode
Reason string
Message string
Retryable bool
}
ProtocolV2Error preserves the stable typed error returned by a plugin.
func (*ProtocolV2Error) Error ¶
func (e *ProtocolV2Error) Error() string
type ProtocolV2GuardCallFailure ¶
type ProtocolV2GuardCallFailure struct {
// contains filtered or unexported fields
}
ProtocolV2GuardCallFailure is created only after InvokeRoute has been called. Error text is deliberately detached from plugin-controlled error details.
func NewProtocolV2GuardCallFailure ¶
func NewProtocolV2GuardCallFailure(kind ProtocolV2GuardFailureKind, cause error) *ProtocolV2GuardCallFailure
func (*ProtocolV2GuardCallFailure) Error ¶
func (e *ProtocolV2GuardCallFailure) Error() string
func (*ProtocolV2GuardCallFailure) Kind ¶
func (e *ProtocolV2GuardCallFailure) Kind() ProtocolV2GuardFailureKind
func (*ProtocolV2GuardCallFailure) RuntimeExecutionObserved ¶
func (e *ProtocolV2GuardCallFailure) RuntimeExecutionObserved() bool
func (*ProtocolV2GuardCallFailure) Unwrap ¶
func (e *ProtocolV2GuardCallFailure) Unwrap() error
type ProtocolV2GuardFailureKind ¶
type ProtocolV2GuardFailureKind string
const ( ProtocolV2GuardFailureDenied ProtocolV2GuardFailureKind = "denied" ProtocolV2GuardFailureCrash ProtocolV2GuardFailureKind = "crash" ProtocolV2GuardFailureTimeout ProtocolV2GuardFailureKind = "timeout" ProtocolV2GuardFailureProtocol ProtocolV2GuardFailureKind = "protocol" ProtocolV2GuardFailureCanceled ProtocolV2GuardFailureKind = "canceled" )
type ProtocolV2GuardRequest ¶
type ProtocolV2GuardRequest struct {
GuardID string
GuardContractVersion string
RouteID string
RouteContractVersion string
Method string
Path string
Headers http.Header
PathParameters map[string]string
QueryParameters map[string]string
QueryParameterValues map[string][]string
RequestSchema string
Body map[string]any
BodyPresent bool
Authority ProtocolV2RequestAuthority
Actor *ProtocolV2RouteActor
CorrelationID string
Timeout time.Duration
}
ProtocolV2GuardRequest binds a custom guard to one exact frozen route. The request headers are projected only after the exact frozen guard and explicit Host authority agree.
type ProtocolV2HostRegistrar ¶
type ProtocolV2HostRegistrar interface {
RegisterProtocolV2(grpc.ServiceRegistrar)
}
ProtocolV2HostRegistrar registers host-owned generated services on one runtime-scoped broker server. Authentication remains owned by the runtime.
type ProtocolV2InvocationActor ¶
ProtocolV2InvocationActor is Host-authored request authority shared by route and admin invocations. Plugin output can never add actor or permission data.
func NewProtocolV2InvocationActor ¶
func NewProtocolV2InvocationActor(userID int64, authenticated bool, permissions map[string]bool) *ProtocolV2InvocationActor
type ProtocolV2ProviderBroker ¶
type ProtocolV2ProviderBroker struct {
// contains filtered or unexported fields
}
func NewProtocolV2ProviderBroker ¶
func NewProtocolV2ProviderBroker(manager *Manager, revalidate HookDocumentRevalidator) (*ProtocolV2ProviderBroker, error)
func (*ProtocolV2ProviderBroker) InvokeProtocolV2Provider ¶
func (b *ProtocolV2ProviderBroker) InvokeProtocolV2Provider( ctx context.Context, input hostapi.ProtocolV2ProviderInvocation, ) (hostapi.ProtocolV2ProviderResult, error)
type ProtocolV2RequestAuthority ¶
type ProtocolV2RequestAuthority struct {
Mode ProtocolV2RequestAuthorityMode
GuardKind ProtocolV2RequestGuardKind
}
func ProtocolV2RouteRequestAuthority ¶
func ProtocolV2RouteRequestAuthority( route extensions.ManifestRoute, guards []extensions.ManifestGuard, ) (ProtocolV2RequestAuthority, error)
ProtocolV2RouteRequestAuthority 返回一条清单路由在 Protocol V2 线路上冻结的请求权威。
宿主侧所有 V2 入口(声明路由派发、legacy 代理前缀回落)必须用这一份实现推导: 运行时会用同一份清单重算并逐字段比对,推导结果不一致的调用只会被 ErrProtocolV2RequestAuthorityInvalid 拒绝,而不是被悄悄降级成另一种权威。
type ProtocolV2RequestAuthorityMode ¶
type ProtocolV2RequestAuthorityMode string
const ( ProtocolV2RequestAuthorityFiltered ProtocolV2RequestAuthorityMode = "filtered" ProtocolV2RequestAuthorityRaw ProtocolV2RequestAuthorityMode = "raw" )
type ProtocolV2RequestGuardKind ¶
type ProtocolV2RequestGuardKind string
const ( ProtocolV2RequestGuardHost ProtocolV2RequestGuardKind = "host" ProtocolV2RequestGuardCustom ProtocolV2RequestGuardKind = "custom" ProtocolV2RequestGuardRawRequest ProtocolV2RequestGuardKind = "raw_request" )
type ProtocolV2RouteActor ¶
type ProtocolV2RouteActor = ProtocolV2InvocationActor
ProtocolV2RouteActor preserves the route transport API name.
func NewProtocolV2RouteActor ¶
func NewProtocolV2RouteActor(userID int64, authenticated bool, permissions map[string]bool) *ProtocolV2RouteActor
NewProtocolV2RouteActor converts an authenticated Host dispatch snapshot to the wire actor. Anonymous and inactive actors are represented by nil.
type ProtocolV2RouteInvocationStage ¶
type ProtocolV2RouteInvocationStage string
const ( ProtocolV2RouteInvocationStageHandler ProtocolV2RouteInvocationStage = "handler" ProtocolV2RouteInvocationStageRequest ProtocolV2RouteInvocationStage = "request" ProtocolV2RouteInvocationStageResponse ProtocolV2RouteInvocationStage = "response" )
type ProtocolV2RoutePatchKind ¶
type ProtocolV2RoutePatchKind string
const ( ProtocolV2RoutePatchAdd ProtocolV2RoutePatchKind = "add" ProtocolV2RoutePatchReplace ProtocolV2RoutePatchKind = "replace" ProtocolV2RoutePatchRemove ProtocolV2RoutePatchKind = "remove" )
type ProtocolV2RoutePatchOperation ¶
type ProtocolV2RoutePatchOperation struct {
Kind ProtocolV2RoutePatchKind
Path string
Value json.RawMessage
}
ProtocolV2RoutePatchOperation is decoded transport data. Routes remains authoritative for applying the ordered operations to Host-owned documents.
type ProtocolV2RouteRequest ¶
type ProtocolV2RouteRequest struct {
RouteID string
ContractVersion string
RouteAction string
InvocationStage ProtocolV2RouteInvocationStage
Method string
Path string
Headers http.Header
PathParameters map[string]string
QueryParameters map[string]string
QueryParameterValues map[string][]string
RequestSchema string
ResponseSchema string
MutableRequestFields []string
MutableResponseFields []string
Body map[string]any
BodyPresent bool
PriorResponse *ProtocolV2RouteResponseDocument
Authority ProtocolV2RequestAuthority
Actor *ProtocolV2RouteActor
IdempotencyKey string
CorrelationID string
Timeout time.Duration
}
ProtocolV2RouteRequest is transport-neutral and binds one unary call to the immutable Route Registry step selected by the Host.
type ProtocolV2RouteResponse ¶
type ProtocolV2RouteResponse struct {
StatusCode int
Headers http.Header
Body map[string]any
BodyPresent bool
StreamFollows bool
RequestPatch []ProtocolV2RoutePatchOperation
ResponsePatch []ProtocolV2RoutePatchOperation
}
type ProtocolV2RouteStream ¶
type ProtocolV2RouteStream struct {
// contains filtered or unexported fields
}
ProtocolV2RouteStream owns the child deadline until the peer sends a valid terminal frame or the Host explicitly cancels the stream.
func (*ProtocolV2RouteStream) Cancel ¶
func (s *ProtocolV2RouteStream) Cancel()
Cancel propagates browser disconnects and Host shutdown to the gRPC stream.
func (*ProtocolV2RouteStream) CloseRequest ¶
func (s *ProtocolV2RouteStream) CloseRequest() error
CloseRequest half-closes the Host request direction while leaving the peer response readable. A final data chunk is optional for an empty request body.
func (*ProtocolV2RouteStream) Context ¶
func (s *ProtocolV2RouteStream) Context() context.Context
func (*ProtocolV2RouteStream) Recv ¶
func (s *ProtocolV2RouteStream) Recv() (ProtocolV2RouteStreamChunk, error)
func (*ProtocolV2RouteStream) Response ¶
func (s *ProtocolV2RouteStream) Response() (ProtocolV2RouteStreamResponse, bool)
type ProtocolV2RouteStreamRequest ¶
type ProtocolV2RouteStreamRequest struct {
RouteID string
ContractVersion string
Method string
Path string
Mode string
Headers http.Header
Authority ProtocolV2RequestAuthority
Actor *ProtocolV2RouteActor
IdempotencyKey string
CorrelationID string
Timeout time.Duration
}
ProtocolV2RouteStreamRequest binds a bidirectional stream to one exact non-buffered route declaration. Path may include the raw query because the v2 stream open frame deliberately carries the original request target.
type ProtocolV2SEOApplyRequest ¶
type ProtocolV2SEOApplyRequest struct {
Scope string `json:"scope"`
Contribution ProtocolV2SEOContribution `json:"contribution"`
Current seoregistry.Document `json:"current"`
}
type ProtocolV2SEOApplyResponse ¶
type ProtocolV2SEOApplyResponse struct {
Document seoregistry.Document `json:"document"`
}
type ProtocolV2SEOContribution ¶
type ProtocolV2SEOContribution struct {
ID string `json:"id"`
ContractVersion string `json:"contractVersion"`
Scope string `json:"scope"`
Kind string `json:"kind"`
Action string `json:"action"`
Handler string `json:"handler"`
Priority int `json:"priority,omitempty"`
FailurePolicy string `json:"failurePolicy"`
TimeoutMS int `json:"timeoutMs"`
}
ProtocolV2SEOContribution is the public wire projection of a frozen SEO declaration. Exact artifact identity remains in RequestContext and the Host admission lease; PostgreSQL ids and trust digests are not duplicated through google.protobuf.Struct numbers.
type ProtocolV2ServerConfig ¶
type ProtocolV2ServerConfig = pluginv2sdk.ServeOptions
ProtocolV2ServerConfig is retained for Host-side compatibility. Plugin subprocesses own this transport contract through the public SDK.
type ProviderProbeRequest ¶
type ProviderProbeRequest struct {
Slot string
}
type ProviderProbeResponse ¶
type ProviderRegistry ¶
type ProviderRegistry struct {
// contains filtered or unexported fields
}
func NewProviderRegistry ¶
func NewProviderRegistry() *ProviderRegistry
func (*ProviderRegistry) RestoreDefault ¶
func (r *ProviderRegistry) RestoreDefault(slot string)
func (*ProviderRegistry) Select ¶
func (r *ProviderRegistry) Select(slot string, selection ProviderSelection)
func (*ProviderRegistry) Selected ¶
func (r *ProviderRegistry) Selected(slot string) ProviderSelection
type ProviderSelection ¶
type ProviderSlotCaller ¶
type ProviderSlotCandidate ¶
type ProviderSlotContract ¶
type ProviderSlotContract struct {
ID string `json:"id"`
Slot string `json:"slot"`
ContractVersion string `json:"contractVersion"`
RequestSchema string `json:"requestSchema"`
ResponseSchema string `json:"responseSchema"`
RequestSchemaDigest string `json:"requestSchemaDigest,omitempty"`
ResponseSchemaDigest string `json:"responseSchemaDigest,omitempty"`
Fallback string `json:"fallback"`
TimeoutMS int `json:"timeoutMs"`
Artifact HookArtifact `json:"artifact"`
// contains filtered or unexported fields
}
type ProviderSlotProbeResult ¶
type ProviderSlotProbeResult struct {
ContractID string `json:"contractId"`
CandidateID string `json:"candidateId"`
Artifact HookArtifact `json:"artifact"`
OK bool `json:"ok"`
Reason string `json:"reason"`
Message string `json:"message"`
Details map[string]string `json:"details,omitempty"`
Suggestions []string `json:"suggestions,omitempty"`
DurationMS int64 `json:"durationMs"`
}
type ProviderSlotRegistrySnapshot ¶
type ProviderSlotRegistrySnapshot struct {
Revision uint64 `json:"revision"`
Contracts []ProviderSlotContract `json:"contracts"`
Candidates []ProviderSlotCandidate `json:"candidates"`
}
type ProviderSlotResolution ¶
type ProviderSlotResolution struct {
Revision uint64
Contract ProviderSlotContract
Candidates []ProviderSlotCandidate
}
type ProviderSlotSelection ¶
type ProviderSlotSelection struct {
ContractID string `json:"contractId"`
ContractVersion string `json:"contractVersion"`
Slot string `json:"slot"`
ContractArtifact HookArtifact `json:"contractArtifact"`
ContractVersionID int64 `json:"-"`
CandidateID string `json:"candidateId"`
ProviderArtifact HookArtifact `json:"providerArtifact"`
ProviderVersionID int64 `json:"-"`
SelectedByUserID int64 `json:"selectedByUserId"`
SelectionAuditID int64 `json:"selectionAuditEventId"`
Revision int64 `json:"revision"`
SelectedAt time.Time `json:"selectedAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type ProviderSlotSelectionAPI ¶
type ProviderSlotSelectionAPI struct {
// contains filtered or unexported fields
}
ProviderSlotSelectionAPI validates every write against one immutable registry snapshot. The store then binds the chosen pair to active immutable extension-version rows with a revision compare-and-swap.
func NewProviderSlotSelectionAPI ¶
func NewProviderSlotSelectionAPI(registry *VersionedProviderSlotRegistry, store ProviderSlotSelectionStore) *ProviderSlotSelectionAPI
func (*ProviderSlotSelectionAPI) Current ¶
func (a *ProviderSlotSelectionAPI) Current(ctx context.Context, contractID string) (ProviderSlotSelection, error)
func (*ProviderSlotSelectionAPI) Events ¶
func (a *ProviderSlotSelectionAPI) Events(ctx context.Context, contractID string, limit int) ([]ProviderSlotSelectionEvent, error)
func (*ProviderSlotSelectionAPI) InvalidateExtension ¶
func (a *ProviderSlotSelectionAPI) InvalidateExtension(ctx context.Context, request InvalidateProviderSlotRequest) (int64, error)
func (*ProviderSlotSelectionAPI) InvalidateProviderSlotSelections ¶
func (a *ProviderSlotSelectionAPI) InvalidateProviderSlotSelections( ctx context.Context, extensionID string, actorUserID int64, auditEventID int64, reasonCode string, ) error
InvalidateProviderSlotSelections is the narrow lifecycle adapter used by Models/Extensions without importing registry or PostgreSQL implementation details.
func (*ProviderSlotSelectionAPI) Reset ¶
func (a *ProviderSlotSelectionAPI) Reset(ctx context.Context, request ResetProviderSlotRequest) error
func (*ProviderSlotSelectionAPI) Resolve ¶
func (a *ProviderSlotSelectionAPI) Resolve(ctx context.Context, caller ProviderSlotCaller, contractID, contractVersion string) (ProviderSlotResolution, string, error)
func (*ProviderSlotSelectionAPI) Select ¶
func (a *ProviderSlotSelectionAPI) Select(ctx context.Context, contractID, candidateID string, expectedRevision, actorUserID, auditEventID int64) (ProviderSlotSelection, error)
type ProviderSlotSelectionEvent ¶
type ProviderSlotSelectionEvent struct {
ID int64 `json:"id"`
ContractID string `json:"contractId"`
ContractVersion string `json:"contractVersion"`
Slot string `json:"slot"`
Action string `json:"action"`
PreviousSelection *ProviderSlotSelection `json:"previousSelection,omitempty"`
SelectedSelection *ProviderSlotSelection `json:"selectedSelection,omitempty"`
ActorUserID int64 `json:"actorUserId,omitempty"`
AuditEventID int64 `json:"auditEventId"`
ReasonCode string `json:"reasonCode,omitempty"`
SelectionRevision int64 `json:"selectionRevision"`
CreatedAt time.Time `json:"createdAt"`
}
type ProviderSlotSelectionStore ¶
type ProviderSlotSelectionStore interface {
Desired(context.Context, string) (ProviderSlotSelection, error)
Selected(context.Context, string) (ProviderSlotSelection, error)
Select(context.Context, SelectProviderSlotRequest) (ProviderSlotSelection, error)
Reset(context.Context, ResetProviderSlotRequest) error
InvalidateExtension(context.Context, InvalidateProviderSlotRequest) (int64, error)
ListEvents(context.Context, string, int) ([]ProviderSlotSelectionEvent, error)
}
type ProxyInput ¶
type ProxyInput = extensionprotocol.ProxyInput
type ResilienceConfig ¶
type ResilienceConfig struct {
MaxConcurrent int
FailureThreshold int
CircuitOpenFor time.Duration
DefaultMailTimeout time.Duration
DefaultStorageTimeout time.Duration
}
ResilienceConfig 控制每扩展 RPC 闸门与熔断。
type ResolvingSearchEngine ¶
type ResolvingSearchEngine struct {
// contains filtered or unexported fields
}
ResolvingSearchEngine 按运营选择解析 search.provider。 站内默认(sforum.search-site)短路到进程内 site 引擎;外部插件走 RPC。
func NewResolvingSearchEngine ¶
func NewResolvingSearchEngine(registry *SearchProviderRegistry, runtime SearchRuntime, site search.Engine) *ResolvingSearchEngine
NewResolvingSearchEngine 构造解析引擎。site 为站内引擎(必填生产路径);nil 时站内回落 Unavailable。
func (*ResolvingSearchEngine) Delete ¶
func (e *ResolvingSearchEngine) Delete(ctx context.Context, topicID int64) error
func (*ResolvingSearchEngine) Enabled ¶
func (e *ResolvingSearchEngine) Enabled(ctx context.Context) bool
Enabled 站内默认始终可用;外部 pin 时只要 Selected 成功即 true。
func (*ResolvingSearchEngine) EnsureIndex ¶
func (e *ResolvingSearchEngine) EnsureIndex(ctx context.Context) error
func (*ResolvingSearchEngine) Index ¶
func (e *ResolvingSearchEngine) Index(ctx context.Context, doc search.TopicSearchDoc) error
func (*ResolvingSearchEngine) Probe ¶
func (e *ResolvingSearchEngine) Probe(ctx context.Context) error
func (*ResolvingSearchEngine) Search ¶
func (e *ResolvingSearchEngine) Search(ctx context.Context, input search.SearchInput) (search.SearchResult, error)
func (*ResolvingSearchEngine) SelectedID ¶
SelectedID 返回当前解析到的扩展 id。
type RouteGateway ¶
type RouteGateway struct {
// contains filtered or unexported fields
}
func NewRouteGateway ¶
func NewRouteGateway() *RouteGateway
func (*RouteGateway) Proxy ¶
func (g *RouteGateway) Proxy(input *ProxyInput) error
type RouteTarget ¶
type RouteTarget = extensionprotocol.RouteTarget
type RuntimeAdmissionGate ¶
type RuntimeAdmissionGate = extensionruntime.RuntimeAdmissionGate
type RuntimeAdmissionLease ¶
type RuntimeAdmissionLease = extensionruntime.RuntimeAdmissionLease
type RuntimeAdmissionSnapshot ¶
type RuntimeAdmissionSnapshot = extensionruntime.RuntimeAdmissionSnapshot
type RuntimeCallClass ¶
type RuntimeCallClass = extensionruntime.RuntimeCallClass
type RuntimeDatabaseLeaseRegistry ¶
type RuntimeDatabaseLeaseRegistry interface {
IssueRuntimeLease(context.Context, ExtensionDatabaseRuntimeLeaseIssue) (ExtensionDatabaseRuntimeCredential, error)
HeartbeatRuntimeLease(context.Context, ExtensionDatabaseRuntimeLeaseRef, int64) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
BeginRuntimeLeaseDrain(context.Context, ExtensionDatabaseRuntimeLeaseRef, int64) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
RevokeRuntimeLease(context.Context, ExtensionDatabaseRuntimeLeaseRef, ExtensionDatabaseLeaseAuthority) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
InspectRuntimeLease(context.Context, ExtensionDatabaseRuntimeLeaseRef) (ExtensionDatabaseRuntimeLeaseSnapshot, error)
}
type RuntimeEventsProviders ¶
type RuntimeEventsProviders struct {
*Manager
// contains filtered or unexported fields
}
func (*RuntimeEventsProviders) AdminSurfaceSnapshot ¶
func (m *RuntimeEventsProviders) AdminSurfaceSnapshot(kind string) AdminSurfaceRegistrySnapshot
AdminSurfaceSnapshot returns only contracts whose exact runtime instance is active and accepting ordinary calls. The immutable registry may already hold a drained target during lifecycle publication, but consumers must not observe it before the durable lifecycle marker opens admission.
func (*RuntimeEventsProviders) HookBus ¶
func (m *RuntimeEventsProviders) HookBus() *HookBus
HookBus exposes the Manager-owned exact hook snapshot to the lifecycle aggregate. Callers must still use Manager admission for execution.
func (*RuntimeEventsProviders) InvokeVersionedHook ¶
func (m *RuntimeEventsProviders) InvokeVersionedHook(ctx context.Context, input VersionedHookInvocation) VersionedHookResult
InvokeVersionedHook composes one frozen listener chain. A filter cannot run without a Host revalidator, and every accepted patch is rechecked before the next listener observes it.
func (*RuntimeEventsProviders) ProbeProviderSlotCandidate ¶
func (m *RuntimeEventsProviders) ProbeProviderSlotCandidate(ctx context.Context, contractID, candidateID string) (ProviderSlotProbeResult, error)
ProbeProviderSlotCandidate checks the active exact runtime through the provider's side-effect-free probe RPC. It never sends a business invocation document and therefore cannot accidentally create provider-owned work.
func (*RuntimeEventsProviders) ProtocolV2ProviderBroker ¶
func (m *RuntimeEventsProviders) ProtocolV2ProviderBroker() (hostapi.ProtocolV2ProviderBroker, error)
func (*RuntimeEventsProviders) ProviderSlotInspection ¶
func (m *RuntimeEventsProviders) ProviderSlotInspection(ctx context.Context) (extensions.ProviderSlotInspection, error)
func (*RuntimeEventsProviders) ProviderSlotSelections ¶
func (m *RuntimeEventsProviders) ProviderSlotSelections() *ProviderSlotSelectionAPI
func (*RuntimeEventsProviders) ResolveAdminSurface ¶
func (m *RuntimeEventsProviders) ResolveAdminSurface(id string) (AdminSurfaceContract, error)
ResolveAdminSurface applies the same exact-runtime visibility fence as the catalog read. Invocation still acquires admission after resolution so a concurrent drain fails closed.
type RuntimeInstanceArtifactIdentity ¶
type RuntimeInstanceArtifactIdentity = extensionruntime.RuntimeInstanceArtifactIdentity
type RuntimeInstanceIdentity ¶
type RuntimeInstanceIdentity = extensionruntime.RuntimeInstanceIdentity
type RuntimeInstanceSnapshot ¶
type RuntimeInstanceSnapshot = extensionruntime.RuntimeInstanceSnapshot
type RuntimeInvoker ¶
type RuntimeInvoker struct{ *Manager }
func (*RuntimeInvoker) ExecutePluginCommand ¶
func (m *RuntimeInvoker) ExecutePluginCommand( ctx context.Context, commandID string, input map[string]any, safeMode bool, ) (PluginCommandExecutionResult, error)
ExecutePluginCommand resolves an immutable Registry contract, validates both typed documents, and holds exact runtime admission for the complete RPC.
func (*RuntimeInvoker) ExecutePluginJob ¶
func (m *RuntimeInvoker) ExecutePluginJob(ctx context.Context, invocation supportjobs.PluginJobInvocation) error
ExecutePluginJob rechecks the running manifest immediately before transport dispatch so an upgrade cannot race a worker's earlier database resolution.
func (*RuntimeInvoker) FilterQueryResultInstance ¶
func (m *RuntimeInvoker) FilterQueryResultInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryResultFilterRequest, ) ([]queryregistry.QueryRow, error)
FilterQueryResultInstance has the same exact-instance boundary as the owner query call; cross-plugin filters therefore cannot drift to a replacement.
func (*RuntimeInvoker) InvokeAdminSurface ¶
func (m *RuntimeInvoker) InvokeAdminSurface( ctx context.Context, input AdminSurfaceInvocation, ) (AdminSurfaceInvocationResult, error)
InvokeAdminSurface resolves one exact Registry contract and holds runtime admission while the typed props/result round trip crosses Protocol V2.
func (*RuntimeInvoker) InvokeGuardInstance ¶
func (m *RuntimeInvoker) InvokeGuardInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2GuardRequest, ) error
InvokeGuardInstance uses only the exact process selected by the immutable Route Registry step. The caller owns the separate guard admission lease.
func (*RuntimeInvoker) InvokeQueryInstance ¶
func (m *RuntimeInvoker) InvokeQueryInstance( ctx context.Context, identity RuntimeInstanceIdentity, extension extensions.Extension, request VersionedQueryRequest, ) ([]queryregistry.QueryRow, error)
InvokeQueryInstance dispatches through the exact process protected by the caller's Manager admission lease. It never falls back to the active pointer.
func (*RuntimeInvoker) InvokeRouteInstance ¶
func (m *RuntimeInvoker) InvokeRouteInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteRequest, ) (ProtocolV2RouteResponse, error)
InvokeRouteInstance dispatches through the exact process selected by a caller that already owns the Manager route admission lease. It must not open another lease, otherwise drain accounting becomes double-counted.
func (*RuntimeInvoker) InvokeVersionedProvider ¶
func (m *RuntimeInvoker) InvokeVersionedProvider( ctx context.Context, input VersionedProviderInvocation, ) (VersionedProviderInvocationResult, error)
func (*RuntimeInvoker) OpenRouteStreamInstance ¶
func (m *RuntimeInvoker) OpenRouteStreamInstance( ctx context.Context, identity RuntimeInstanceIdentity, request ProtocolV2RouteStreamRequest, ) (*ProtocolV2RouteStream, error)
OpenRouteStreamInstance delegates only after the caller has acquired the exact runtime's route admission lease. The stream lifetime therefore remains visible to drain and upgrade coordination without double-counting leases.
func (*RuntimeInvoker) ProbeSettingsAction ¶
func (m *RuntimeInvoker) ProbeSettingsAction(ctx context.Context, extension extensions.Extension, request extensions.SettingsActionProbeRequest) (extensions.SettingsActionProbeResult, error)
ProbeSettingsAction starts an isolated short-lived RPC runtime. It receives no Host API token and is never registered in Manager routes, hooks, jobs, schedules, or providers.
两条探测路径共用一个方法:provider_probe 走 provider slot,ai_tool_probe 走 插件自己声明的 AI 工具(保留槽 sforum.ai.tool/invoke)。请求对象化是为了不 触碰 RuntimeInvoker 的接收者方法数基线。
func (*RuntimeInvoker) RefreshMailProvider ¶
func (m *RuntimeInvoker) RefreshMailProvider(ctx context.Context, extensionID string) error
func (*RuntimeInvoker) SearchEngineDelete ¶
func (m *RuntimeInvoker) SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
func (*RuntimeInvoker) SearchEngineEnsure ¶
func (m *RuntimeInvoker) SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
func (*RuntimeInvoker) SearchEngineIndex ¶
func (m *RuntimeInvoker) SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
func (*RuntimeInvoker) SearchEngineProbe ¶
func (m *RuntimeInvoker) SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
func (*RuntimeInvoker) SearchEngineSearch ¶
func (m *RuntimeInvoker) SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
func (*RuntimeInvoker) SendMail ¶
func (m *RuntimeInvoker) SendMail(ctx context.Context, extensionID string, request MailProviderRequest) (MailProviderResponse, error)
func (*RuntimeInvoker) StorageClose ¶
func (m *RuntimeInvoker) StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
func (*RuntimeInvoker) StorageDelete ¶
func (m *RuntimeInvoker) StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
func (*RuntimeInvoker) StorageExists ¶
func (m *RuntimeInvoker) StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
func (*RuntimeInvoker) StorageGetChunk ¶
func (m *RuntimeInvoker) StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
func (*RuntimeInvoker) StorageOpen ¶
func (m *RuntimeInvoker) StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
func (*RuntimeInvoker) StorageProbe ¶
func (m *RuntimeInvoker) StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
func (*RuntimeInvoker) StoragePublicURL ¶
func (m *RuntimeInvoker) StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
func (*RuntimeInvoker) StoragePutBegin ¶
func (m *RuntimeInvoker) StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
func (*RuntimeInvoker) StoragePutChunk ¶
func (m *RuntimeInvoker) StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
func (*RuntimeInvoker) StorageSignedURL ¶
func (m *RuntimeInvoker) StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
func (*RuntimeInvoker) StorageStat ¶
func (m *RuntimeInvoker) StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
type RuntimeRegistryGenerationSnapshot ¶
type RuntimeRegistryGenerationSnapshot struct {
Generation uint64
PublicationRevision int64
RuntimeMembers []RuntimeInstanceIdentity
HookMembers []RuntimeInstanceIdentity
ProviderMembers []RuntimeInstanceIdentity
CommandMembers []RuntimeInstanceIdentity
AdminSurfaceMembers []RuntimeInstanceIdentity
HookRevision uint64
ProviderRevision uint64
CommandRevision uint64
AdminSurfaceRevision uint64
}
RuntimeRegistryGenerationSnapshot is one outer-lock observation of every Manager-owned HookBus registry family. Individual registries stay available for compatibility, while coordinators and inspectors can pin one generation.
type RuntimeSupervisor ¶
type RuntimeSupervisor struct{ *Manager }
func (*RuntimeSupervisor) Check ¶
func (m *RuntimeSupervisor) Check(_ context.Context, extension extensions.Extension) error
func (*RuntimeSupervisor) Close ¶
func (m *RuntimeSupervisor) Close(ctx context.Context)
func (*RuntimeSupervisor) Reconcile ¶
func (m *RuntimeSupervisor) Reconcile(ctx context.Context, items []extensions.Extension)
func (*RuntimeSupervisor) RouteTarget ¶
func (m *RuntimeSupervisor) RouteTarget(extensionID string) (RouteTarget, bool)
func (*RuntimeSupervisor) Start ¶
func (m *RuntimeSupervisor) Start(ctx context.Context, extension extensions.Extension) error
func (*RuntimeSupervisor) Status ¶
func (m *RuntimeSupervisor) Status(_ context.Context, extension extensions.Extension) extensions.RuntimeStatus
func (*RuntimeSupervisor) Stop ¶
func (m *RuntimeSupervisor) Stop(ctx context.Context, extension extensions.Extension) error
type RuntimeTrustSource ¶
type RuntimeTrustSource interface {
RuntimeIdentity(context.Context, extensions.Extension) (extensions.RuntimeTrustIdentity, error)
}
RuntimeTrustSource resolves the live exact-artifact grant before process start. The wire identity is disclosure only; this host lookup is authoritative.
type SearchEngineDeleteRequest ¶
type SearchEngineDeleteRequest struct {
TopicID int64
}
SearchEngineDeleteRequest 按主题 id 删除。
type SearchEngineIndexRequest ¶
type SearchEngineIndexRequest struct {
Document search.TopicSearchDoc
}
SearchEngineIndexRequest 写入一篇主题文档。
type SearchEngineInvoker ¶
type SearchEngineInvoker interface {
SearchEngineProbe(context.Context, string, SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
SearchEngineEnsure(context.Context, string) (SearchEngineResult, error)
SearchEngineIndex(context.Context, string, SearchEngineIndexRequest) (SearchEngineResult, error)
SearchEngineDelete(context.Context, string, SearchEngineDeleteRequest) (SearchEngineResult, error)
SearchEngineSearch(context.Context, string, SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
}
SearchEngineInvoker 由 ProtocolStarter 实现,供 Manager 做准入后转发。
type SearchEngineProbeRequest ¶
type SearchEngineProbeRequest struct{}
SearchEngineProbeRequest 预留;当前无输入。
type SearchEngineProbeResponse ¶
SearchEngineProbeResponse 探测结果。
type SearchEngineResult ¶
SearchEngineResult 无载荷写操作结果。
type SearchEngineSearchRequest ¶
type SearchEngineSearchRequest struct {
Query string
CategorySlug string
TagSlug string
Page int
PerPage int
}
SearchEngineSearchRequest / SearchEngineSearchResponse 公开检索。
type SearchProviderCandidate ¶
SearchProviderCandidate 运营可选的 search.provider 候选。
type SearchProviderRegistry ¶
type SearchProviderRegistry struct {
// contains filtered or unexported fields
}
SearchProviderRegistry 管理 search.provider 槽位的运营选择。 默认:受保护内置站内搜索 sforum.search-site(无显式 pin 时始终可用)。
func NewSearchProviderRegistry ¶
func NewSearchProviderRegistry(store SearchProviderStore) *SearchProviderRegistry
func (*SearchProviderRegistry) Candidates ¶
func (r *SearchProviderRegistry) Candidates(ctx context.Context) ([]SearchProviderCandidate, error)
Candidates 列出已启用的 search.provider 候选;始终包含站内默认。
func (*SearchProviderRegistry) IsPinned ¶
func (r *SearchProviderRegistry) IsPinned(ctx context.Context) (bool, error)
IsPinned 是否存在运营显式 pin(与解析后的 Selected 不同:无 pin 时仍可能解析到站内默认)。
func (*SearchProviderRegistry) RestoreDefault ¶
func (r *SearchProviderRegistry) RestoreDefault(ctx context.Context) error
RestoreDefault 清除显式 pin;Selected 随后解析为站内搜索。
func (*SearchProviderRegistry) Select ¶
func (r *SearchProviderRegistry) Select(ctx context.Context, extensionID string) error
func (*SearchProviderRegistry) Selected ¶
func (r *SearchProviderRegistry) Selected(ctx context.Context) (SearchProviderSelection, bool, error)
type SearchProviderSelection ¶
type SearchProviderStore ¶
type SearchProviderStore interface {
GetSearchProviderExtension(context.Context, string) (extensions.Extension, error)
SelectedSearchProvider(context.Context) (string, error)
SelectSearchProvider(context.Context, string) error
RestoreSearchProvider(context.Context) error
// List 用于在无显式选择时回退到唯一已启用的 search.provider 插件。
List(context.Context) ([]extensions.Extension, error)
}
type SearchRuntime ¶
type SearchRuntime interface {
SearchEngineProbe(ctx context.Context, extensionID string, request SearchEngineProbeRequest) (SearchEngineProbeResponse, error)
SearchEngineEnsure(ctx context.Context, extensionID string) (SearchEngineResult, error)
SearchEngineIndex(ctx context.Context, extensionID string, request SearchEngineIndexRequest) (SearchEngineResult, error)
SearchEngineDelete(ctx context.Context, extensionID string, request SearchEngineDeleteRequest) (SearchEngineResult, error)
SearchEngineSearch(ctx context.Context, extensionID string, request SearchEngineSearchRequest) (SearchEngineSearchResponse, error)
}
SearchRuntime 是插件搜索引擎 RPC 入口(Manager / ProtocolStarter)。
type SelectProviderSlotRequest ¶
type SelectProviderSlotRequest struct {
Contract ProviderSlotContract
Candidate ProviderSlotCandidate
ExpectedRevision int64
ActorUserID int64
AuditEventID int64
}
type StagedRuntimeSetStarter ¶
type StagedRuntimeSetStarter interface {
StagedRuntimeStarter
PublishInstanceSet(context.Context, []RuntimeInstanceIdentity) ([]ProtocolRuntimeInstanceSnapshot, *ProtocolRuntimeSetLease, error)
RuntimeInstanceSetVisible(context.Context, []RuntimeInstanceIdentity) bool
}
StagedRuntimeSetStarter publishes the complete desired V2 process set at one ProtocolStarter and ServiceRegistry linearization boundary.
type StagedRuntimeStarter ¶
type StagedRuntimeStarter interface {
StartInstance(context.Context, extensions.Extension) (RouteTarget, error)
InspectInstance(RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
HealthInstance(context.Context, RuntimeInstanceIdentity) (PluginHealth, error)
PublishInstance(context.Context, RuntimeInstanceIdentity) (ProtocolRuntimeInstanceSnapshot, error)
RunLifecycleInstance(context.Context, RuntimeInstanceIdentity, extensions.Extension, LifecycleInvocation) (LifecycleRunResult, error)
StopInstance(context.Context, RuntimeInstanceIdentity) error
DiscardInstance(context.Context, RuntimeInstanceIdentity) error
}
StagedRuntimeStarter 是 lifecycle coordinator 使用的 V2 exact-process 最小契约。
type Starter ¶
type Starter interface {
Start(ctx context.Context, extension extensions.Extension) (RouteTarget, error)
Stop(ctx context.Context, extension extensions.Extension) error
}
type StorageCloseRequest ¶
type StorageCloseRequest struct {
SessionID string
}
StorageCloseRequest 关闭读/写会话(Abort 未完成 Put,或释放 Open)。
type StorageConfigureInstanceRequest ¶
StorageConfigureInstanceRequest installs or replaces one Host-owned provider instance in the running plugin. Settings may contain resolved secrets and must never be logged or included in telemetry.
type StorageExistsRequest ¶
StorageExistsRequest / StorageExistsResponse 存在性查询。
type StorageExistsResponse ¶
type StorageGetChunkRequest ¶
type StorageGetChunkRequest struct {
SessionID string
// MaxBytes 宿主希望的最大块;插件可返回更短。0 表示由插件默认。
MaxBytes int
}
StorageGetChunkRequest 从读会话拉取下一块。
type StorageGetChunkResponse ¶
StorageGetChunkResponse 读块结果;EOF=true 表示无更多数据。
type StorageInstanceInvoker ¶
type StorageInstanceInvoker struct{ *Manager }
StorageInstanceInvoker owns Host-side multi-instance storage calls without growing the legacy Manager or RuntimeInvoker facades.
func (*StorageInstanceInvoker) StorageConfigureInstance ¶
func (m *StorageInstanceInvoker) StorageConfigureInstance(ctx context.Context, extensionID string, request StorageConfigureInstanceRequest) (StorageResult, error)
func (*StorageInstanceInvoker) StorageProbeConfig ¶
func (m *StorageInstanceInvoker) StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
func (*StorageInstanceInvoker) StorageRemoveInstance ¶
func (m *StorageInstanceInvoker) StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
type StorageInstanceProtocol ¶
type StorageInstanceProtocol interface {
StorageConfigureInstance(StorageConfigureInstanceRequest) (StorageResult, error)
StorageRemoveInstance(StorageRemoveInstanceRequest) (StorageResult, error)
StorageProbeConfig(StorageProbeConfigRequest) (StorageProbeResponse, error)
}
type StorageInstanceRuntime ¶
type StorageInstanceRuntime interface {
StorageConfigureInstance(ctx context.Context, extensionID string, request StorageConfigureInstanceRequest) (StorageResult, error)
StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
}
type StorageObjectRequest ¶
StorageObjectRequest 仅含对象 key 的操作(Delete)。
type StorageOpenRequest ¶
StorageOpenRequest 按 key 打开对象读会话。
type StorageProbeConfigRequest ¶
StorageProbeConfigRequest validates draft configuration without changing the active in-process instance map.
type StorageProbeRequest ¶
type StorageProbeRequest struct {
InstanceID string
}
StorageProbeRequest / StorageProbeResponse 管理端「测试连接」。
type StorageProbeResponse ¶
type StorageProviderInvoker ¶
type StorageProviderInvoker interface {
StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
StorageConfigureInstance(ctx context.Context, extensionID string, request StorageConfigureInstanceRequest) (StorageResult, error)
StorageRemoveInstance(ctx context.Context, extensionID string, request StorageRemoveInstanceRequest) (StorageResult, error)
StorageProbeConfig(ctx context.Context, extensionID string, request StorageProbeConfigRequest) (StorageProbeResponse, error)
}
StorageProviderInvoker 是 ProtocolStarter / 测试替身对存储 RPC 的宿主入口。 Manager 在闸门/熔断之后调用此接口。
type StoragePublicURLRequest ¶
StoragePublicURLRequest / StorageSignedURLRequest / StorageURLResponse URL 辅助。
type StoragePutBeginRequest ¶
type StoragePutBeginRequest struct {
InstanceID string
Key string
ContentType string
// Size 为对象总字节;未知时为 0。宿主在流结束前仍以 Final 标记结束。
Size int64
}
StoragePutBeginRequest 开启一次 Put 会话。
type StoragePutChunkRequest ¶
StoragePutChunkRequest 写入一块数据;Final=true 表示对象写完并提交。
type StorageRPCError ¶
type StorageRPCError = extensionruntime.StorageRPCError
StorageRPCError 把插件返回的 !OK 转成带 Reason 的错误,供 Adapter 使用。
type StorageRemoveInstanceRequest ¶
type StorageRemoveInstanceRequest struct {
InstanceID string
}
type StorageResult ¶
StorageResult 是无载荷写操作的通用结果(PutChunk / Close / Delete)。
type StorageRuntime ¶
type StorageRuntime interface {
StoragePutBegin(ctx context.Context, extensionID string, request StoragePutBeginRequest) (StorageSessionResponse, error)
StoragePutChunk(ctx context.Context, extensionID string, request StoragePutChunkRequest) (StorageResult, error)
StorageOpen(ctx context.Context, extensionID string, request StorageOpenRequest) (StorageSessionResponse, error)
StorageGetChunk(ctx context.Context, extensionID string, request StorageGetChunkRequest) (StorageGetChunkResponse, error)
StorageClose(ctx context.Context, extensionID string, request StorageCloseRequest) (StorageResult, error)
StorageDelete(ctx context.Context, extensionID string, request StorageObjectRequest) (StorageResult, error)
StorageStat(ctx context.Context, extensionID string, request StorageStatRequest) (StorageStatResponse, error)
StorageExists(ctx context.Context, extensionID string, request StorageExistsRequest) (StorageExistsResponse, error)
StoragePublicURL(ctx context.Context, extensionID string, request StoragePublicURLRequest) (StorageURLResponse, error)
StorageSignedURL(ctx context.Context, extensionID string, request StorageSignedURLRequest) (StorageURLResponse, error)
StorageProbe(ctx context.Context, extensionID string, request StorageProbeRequest) (StorageProbeResponse, error)
}
StorageRuntime 是 Attachments / PluginStorageAdapter 依赖的最小 runtime 面。 Manager 实现本接口;bootstrap 把 extensionRuntime 注入附件服务。
type StorageSessionResponse ¶
type StorageSessionResponse struct {
OK bool
SessionID string
Size int64
ContentType string
Reason string
Message string
}
StorageSessionResponse 返回会话 id(PutBegin / Open)。
type StorageSignedURLRequest ¶
type StorageStatRequest ¶
StorageStatRequest / StorageStatResponse 元数据查询。
type StorageStatResponse ¶
type StorageURLResponse ¶
type VersionedAIToolRequest ¶
type VersionedAIToolRequest struct {
DeclarationID string
ContractVersion string
Handler string
Timeout time.Duration
// Name 是模型要求的工具名。它必须与声明一致:宿主不会把一次调用改派给
// 同一个 handler 下的另一个工具名。
Name string
Arguments string
// Locale / TopicID / ViewerUserID 是清单 aiTools[].context 声明过的会话事实。
// 未声明的项保持零值,不会出现在请求文档里——声明即授权,宿主不做隐式披露。
Locale string
TopicID int64
ViewerUserID int64
}
VersionedAIToolRequest freezes one tool call to an exact declaration carried by this runtime. The Host never asks the plugin "which tools do you have or what is your timeout" — both come from the frozen manifest declaration.
type VersionedAIToolResponse ¶
VersionedAIToolResponse 是插件给出的结果。
IsError 区分「工具可解释的失败」与「调用本身失败」:前者原样给模型(它可以 据此换参数重试),后者由宿主替换成一句通用说明,避免插件内部错误串借模型之口 发布到社区。
type VersionedContentRequest ¶
type VersionedContentRequest struct {
DeclarationID string
ContractVersion string
Kind string
Handler string
Schema string
Renderer string
Migration string
Operation string
Timeout time.Duration
Input map[string]any
// ActorUserID is Host-internal delegation input. It is never serialized in
// the content call document or RequestContext actor field. Zero is anonymous.
ActorUserID int64
// SuppressHostDelegations is Host-internal and never enters the content
// document. Protected rendering sets it after Host authorization.
SuppressHostDelegations bool
}
type VersionedHookContract ¶
type VersionedHookContract struct {
ID string `json:"id"`
Name string `json:"name"`
ContractVersion string `json:"contractVersion"`
Kind string `json:"kind"`
InputSchema string `json:"inputSchema"`
ResultSchema string `json:"resultSchema,omitempty"`
Execution string `json:"execution"`
FailurePolicy string `json:"failurePolicy"`
TimeoutMS int `json:"timeoutMs"`
MutableFields []string `json:"mutableFields,omitempty"`
Artifact HookArtifact `json:"artifact"`
}
type VersionedHookInvocation ¶
type VersionedHookListener ¶
type VersionedHookListener struct {
ID string `json:"id"`
TargetID string `json:"targetId"`
Handler string `json:"handler"`
Priority int `json:"priority"`
Artifact HookArtifact `json:"artifact"`
// contains filtered or unexported fields
}
type VersionedHookRegistry ¶
type VersionedHookRegistry struct {
// contains filtered or unexported fields
}
VersionedHookRegistry publishes one immutable, exact-runtime hook graph. Readers never observe a provider without all of its listeners or vice versa.
func NewVersionedHookRegistry ¶
func NewVersionedHookRegistry() *VersionedHookRegistry
func (*VersionedHookRegistry) RemoveRuntime ¶
func (r *VersionedHookRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
func (*VersionedHookRegistry) ReplaceRuntime ¶
func (r *VersionedHookRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*VersionedHookRegistry) Resolve ¶
func (r *VersionedHookRegistry) Resolve(id, contractVersion string) (VersionedHookContract, []VersionedHookListener, error)
func (*VersionedHookRegistry) Snapshot ¶
func (r *VersionedHookRegistry) Snapshot() VersionedHookRegistrySnapshot
func (*VersionedHookRegistry) ValidateRemoveRuntime ¶
func (r *VersionedHookRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
func (*VersionedHookRegistry) ValidateReplaceRuntime ¶
func (r *VersionedHookRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
type VersionedHookRegistrySnapshot ¶
type VersionedHookRegistrySnapshot struct {
Revision uint64 `json:"revision"`
Contracts []VersionedHookContract `json:"contracts"`
Listeners []VersionedHookListener `json:"listeners"`
}
type VersionedHookResult ¶
type VersionedIdentityProviderRequest ¶
type VersionedIdentityProviderRequest struct {
ProviderID string
ContractVersion string
Kind string
Handler string
Priority int
Operation string
InputSchema string
InputSchemaWireReference string
OutputSchema string
OutputSchemaWireReference string
Timeout time.Duration
FailurePolicy string
ActorUserID int64
Input map[string]any
}
VersionedIdentityProviderRequest keeps the package declaration reference and the Registry-derived wire reference separate. Package-path Schemas are valid Manifest material but TypedDocument always carries the canonical id@version.
type VersionedProviderInvocation ¶
type VersionedProviderInvocation struct {
Caller ProviderSlotCaller
SlotID string
ContractVersion string
Operation string
InputSchema string
Input map[string]any
Revalidate HookDocumentRevalidator
}
type VersionedProviderSlotRegistry ¶
type VersionedProviderSlotRegistry struct {
// contains filtered or unexported fields
}
func NewVersionedProviderSlotRegistry ¶
func NewVersionedProviderSlotRegistry() *VersionedProviderSlotRegistry
func (*VersionedProviderSlotRegistry) Discover ¶
func (r *VersionedProviderSlotRegistry) Discover( caller ProviderSlotCaller, id, contractVersion string, ) (ProviderSlotResolution, error)
func (*VersionedProviderSlotRegistry) HasCompiledSchemas ¶
func (r *VersionedProviderSlotRegistry) HasCompiledSchemas(id, contractVersion string) bool
func (*VersionedProviderSlotRegistry) HasContract ¶
func (r *VersionedProviderSlotRegistry) HasContract(id, contractVersion string) bool
func (*VersionedProviderSlotRegistry) RemoveRuntime ¶
func (r *VersionedProviderSlotRegistry) RemoveRuntime(extensionID, instanceID string) (bool, error)
func (*VersionedProviderSlotRegistry) ReplaceRuntime ¶
func (r *VersionedProviderSlotRegistry) ReplaceRuntime(extension extensions.Extension, instanceID string) error
func (*VersionedProviderSlotRegistry) Snapshot ¶
func (r *VersionedProviderSlotRegistry) Snapshot() ProviderSlotRegistrySnapshot
func (*VersionedProviderSlotRegistry) ValidateDocument ¶
func (r *VersionedProviderSlotRegistry) ValidateDocument(contractID, schema string, document map[string]any) error
func (*VersionedProviderSlotRegistry) ValidateRemoveRuntime ¶
func (r *VersionedProviderSlotRegistry) ValidateRemoveRuntime(extensionID, instanceID string) error
func (*VersionedProviderSlotRegistry) ValidateReplaceRuntime ¶
func (r *VersionedProviderSlotRegistry) ValidateReplaceRuntime(extension extensions.Extension, instanceID string) error
type VersionedQueryRequest ¶
type VersionedQueryRequest struct {
QueryID string
ContractVersion string
PlanVersion string
ResultSchema string
Handler string
Plan queryregistry.QueryPlan
FetchLimit int
Timeout time.Duration
}
VersionedQueryRequest is the Host-normalized InvokeQuery projection.
type VersionedQueryResultFilterRequest ¶
type VersionedQueryResultFilterRequest struct {
FilterID string
FilterContractVersion string
QueryID string
QueryContractVersion string
QueryPlanVersion string
ResultSchema string
Handler string
Plan queryregistry.QueryPlan
Rows []queryregistry.QueryRow
Timeout time.Duration
}
VersionedQueryResultFilterRequest is the Host-normalized FilterQueryResult projection. Identity and permission material stay on the Host side.
type VersionedSEORequest ¶
type VersionedSEORequest struct {
DeclarationID string
ContractVersion string
Handler string
Timeout time.Duration
Input map[string]any
}
VersionedSEORequest reuses the Protocol V2 ProviderCall transport while freezing dispatch to one exact Manifest SEO declaration. Input and output remain typed documents; plugins never receive raw request/session authority.
type VersionedSEOResponse ¶
Source Files
¶
- admin_surface_catalog.go
- admin_surface_execution.go
- admin_surface_registry.go
- admin_surface_transport.go
- component_composition.go
- component_composition_admission.go
- component_composition_calls.go
- component_composition_executor.go
- component_composition_graph.go
- component_composition_permission.go
- component_composition_production.go
- component_composition_values.go
- component_registry.go
- component_registry_build.go
- component_registry_schema.go
- component_registry_themes.go
- component_ssr_package_local.go
- event_jobs.go
- events_publish.go
- executable_trust_revocation.go
- extension_database_core_compatibility.go
- extension_database_disposition.go
- extension_database_disposition_postgres.go
- extension_database_disposition_repository.go
- extension_database_identifiers.go
- extension_database_kernel_cleanup_postgres.go
- extension_database_kernel_postgres.go
- extension_database_migration_discovery.go
- extension_database_migration_engine.go
- extension_database_migration_engine_repository.go
- extension_database_migration_execution.go
- extension_database_migration_planner.go
- extension_database_migration_preflight.go
- extension_database_migration_role.go
- extension_database_raw_core_postgres.go
- extension_database_registry.go
- extension_database_registry_postgres.go
- extension_database_registry_repository.go
- extension_database_runtime_connection.go
- extension_database_runtime_lease.go
- extension_database_runtime_lease_postgres.go
- extension_database_runtime_lease_reaper.go
- extension_database_runtime_lease_repository.go
- hook_registry.go
- hook_registry_execution.go
- hooks.go
- identity_provider_commit_fence.go
- identity_session_evaluate_invoker.go
- lifecycle_boundary_postgres_fence.go
- lifecycle_cleanup_finalizer_postgres.go
- lifecycle_cleanup_postgres.go
- lifecycle_cleanup_postgres_repository.go
- lifecycle_composed_boundary.go
- lifecycle_composed_boundary_publication.go
- lifecycle_coordinator_exact_runtime.go
- lifecycle_coordinator_host.go
- lifecycle_coordinator_runtime.go
- lifecycle_identity_schemas.go
- lifecycle_jobs_boundary.go
- lifecycle_jobs_postgres.go
- lifecycle_migrations.go
- lifecycle_migrations_postgres.go
- lifecycle_migrations_postgres_repository.go
- lifecycle_package_schemas.go
- lifecycle_page_runtime.go
- lifecycle_preflight_postgres.go
- lifecycle_publication_journal_postgres.go
- lifecycle_query_schemas.go
- lifecycle_registry_publication.go
- lifecycle_registry_publication_assets.go
- lifecycle_registry_publication_cache.go
- lifecycle_registry_publication_cache_bootstrap.go
- lifecycle_registry_publication_components.go
- lifecycle_registry_publication_content.go
- lifecycle_registry_publication_editor.go
- lifecycle_registry_publication_entity.go
- lifecycle_registry_publication_identity.go
- lifecycle_registry_publication_media.go
- lifecycle_registry_publication_navigation.go
- lifecycle_registry_publication_notifications.go
- lifecycle_registry_publication_postgres.go
- lifecycle_registry_publication_queries.go
- lifecycle_registry_publication_seo.go
- lifecycle_route_policy_publication.go
- lifecycle_route_restore_publication.go
- lifecycle_runtime_cache_publication.go
- lifecycle_runtime_query_publication.go
- lifecycle_runtime_query_settings.go
- lifecycle_state_publication_postgres.go
- mail_providers.go
- manager.go
- manager_guard_transport.go
- manager_identity_transport.go
- manager_query_transport.go
- manager_route_stream_transport.go
- manager_route_transport.go
- manager_runtime_instances.go
- manager_staged_runtime.go
- plugin_command_execution.go
- plugin_command_registry.go
- plugin_command_transport.go
- plugin_runtime_full_set.go
- plugin_runtime_full_set_hooks.go
- plugin_search_adapter.go
- plugin_storage_adapter.go
- protocol.go
- protocol_database_lease.go
- protocol_instances.go
- protocol_lifecycle.go
- protocol_noop.go
- protocol_telemetry.go
- protocol_types_compat.go
- protocol_v2_actor_delegation.go
- protocol_v2_ai_tool.go
- protocol_v2_cause.go
- protocol_v2_client.go
- protocol_v2_guards.go
- protocol_v2_host.go
- protocol_v2_identity_runtime.go
- protocol_v2_lifecycle.go
- protocol_v2_query_runtime.go
- protocol_v2_request_authority.go
- protocol_v2_route_stream.go
- protocol_v2_routes.go
- protocol_v2_search.go
- protocol_v2_server.go
- protocol_v2_services.go
- protocol_v2_storage.go
- provider_slot_execution.go
- provider_slot_hostapi.go
- provider_slot_inspector.go
- provider_slot_probe.go
- provider_slot_registry.go
- provider_slot_schemas.go
- provider_slot_selection.go
- provider_slot_selection_postgres.go
- providers.go
- query_registry_execution.go
- resilience.go
- route_gateway.go
- runtime_admission_compat.go
- search_invoker.go
- search_protocol.go
- search_providers.go
- seo_registry_execution.go
- settings_actions.go
- storage_invoker.go
- storage_protocol.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package pluginprocess 承载插件子进程的平台级启动约束:独立进程组、可用资源 上限与整组回收。
|
Package pluginprocess 承载插件子进程的平台级启动约束:独立进程组、可用资源 上限与整组回收。 |