Class InstalledKernel
Namespace: DotBoxD.Plugins.Kernel
Assembly: DotBoxD.Plugins.dll
Request/response invocation for a server extension kernel: the path that runs a verified
batch entrypoint server-side in one call and returns its result. Kept in a partial alongside the
event ShouldHandle/Handle path in DotBoxD.Plugins.Kernel.InstalledKernel.
public sealed class InstalledKernelInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Section titled “Properties”CallbackSubscriptionId
Section titled “ CallbackSubscriptionId”public string? CallbackSubscriptionId { get; }Property Value
Section titled “Property Value”ExecutionObservations
Section titled “ ExecutionObservations”public IReadOnlyList<PluginExecutionObservation> ExecutionObservations { get; }Property Value
Section titled “Property Value”IReadOnlyList<PluginExecutionObservation>
InstallId
Section titled “ InstallId”public string InstallId { get; }Property Value
Section titled “Property Value”IsRevoked
Section titled “ IsRevoked”public bool IsRevoked { get; }Property Value
Section titled “Property Value”LastAsyncUpdateError
Section titled “ LastAsyncUpdateError”public Exception? LastAsyncUpdateError { get; }Property Value
Section titled “Property Value”LastExecution
Section titled “ LastExecution”public PluginExecutionObservation? LastExecution { get; }Property Value
Section titled “Property Value”Manifest
Section titled “ Manifest”public PluginManifest Manifest { get; }Property Value
Section titled “Property Value”OwnerId
Section titled “ OwnerId”Opaque owner token of the session that installed this kernel, or null for kernels
installed directly on the server (no session). Used by DotBoxD.Plugins.KernelRegistry to reject
cross-owner id reuse so one plugin cannot replace another plugin’s kernel.
public object? OwnerId { get; }Property Value
Section titled “Property Value”Package
Section titled “ Package”public PluginPackage Package { get; }Property Value
Section titled “Property Value”public LiveSettingStore Value { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”As<TSettings>()
Section titled “ As<TSettings>()”public TypedInstalledKernel<TSettings> As<TSettings>() where TSettings : classReturns
Section titled “Returns”TypedInstalledKernel<TSettings>
Type Parameters
Section titled “Type Parameters”TSettings
FlushUpdatesAsync(CancellationToken)
Section titled “ FlushUpdatesAsync(CancellationToken)”public ValueTask FlushUpdatesAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
Returns
Section titled “Returns”HandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)
Section titled “ HandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)”public ValueTask HandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”adapter IPluginEventAdapter<TEvent>
e TEvent
cancellationToken CancellationToken
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”TEvent
InvokeServerExtensionAsync(IReadOnlyList<SandboxValue>, CancellationToken)
Section titled “ InvokeServerExtensionAsync(IReadOnlyList<SandboxValue>, CancellationToken)”Invokes the kernel’s server-extension entrypoint request/response: the caller arguments are bound to the
entrypoint’s leading parameters (live settings fill the trailing ones), the verified IR runs once
under the execution gate, and its result value is returned. Unlike DotBoxD.Plugins.Kernel.InstalledKernel.HandleAsync(DotBoxD.Abstractions.IPluginEventAdapter{},,System.Threading.CancellationToken) the
result is not discarded. The kernel must have been installed via
DotBoxD.Plugins.PluginServer.InstallServerExtensionAsync(DotBoxD.Plugins.PluginPackage,DotBoxD.Kernels.SandboxPolicy,System.Threading.CancellationToken) (its manifest declares the rpcEntrypoint).
public ValueTask<SandboxValue> InvokeServerExtensionAsync(IReadOnlyList<SandboxValue> arguments, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”arguments IReadOnlyList<SandboxValue>
cancellationToken CancellationToken
Returns
Section titled “Returns”InvokeServerExtensionRpcAsync(byte[], CancellationToken)
Section titled “ InvokeServerExtensionRpcAsync(byte[], CancellationToken)”Invokes this server extension over the RPC wire codec in one step: decodes the caller arguments from
arguments, converts each to a sandbox value against the verified entrypoint’s
parameter types, runs DotBoxD.Plugins.Kernel.InstalledKernel.InvokeServerExtensionAsync(System.Collections.Generic.IReadOnlyList{DotBoxD.Kernels.Sandbox.SandboxValue},System.Threading.CancellationToken),
and encodes the result back to bytes. This is the marshalling ceremony every host used to hand-write; the
host keeps only the ownership/authz check (e.g. DotBoxD.Plugins.PluginSession.Owns(System.String)) before calling it. The
result is encoded directly from its sandbox value through the byte-identical wire codec, avoiding an
intermediate DotBoxD.Plugins.KernelRpcValue tree.
public ValueTask<byte[]> InvokeServerExtensionRpcAsync(byte[] arguments, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”arguments byte[]
cancellationToken CancellationToken
Returns
Section titled “Returns”ModifySettingsAsync(IReadOnlyDictionary<string, object?>, bool, CancellationToken)
Section titled “ ModifySettingsAsync(IReadOnlyDictionary<string, object?>, bool, CancellationToken)”public ValueTask ModifySettingsAsync(IReadOnlyDictionary<string, object?> values, bool atomic = false, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”values IReadOnlyDictionary<string, object?>
atomic bool
cancellationToken CancellationToken
Returns
Section titled “Returns”Revoke()
Section titled “ Revoke()”public void Revoke()ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)
Section titled “ ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)”public ValueTask<bool> ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”adapter IPluginEventAdapter<TEvent>
e TEvent
cancellationToken CancellationToken
Returns
Section titled “Returns”Type Parameters
Section titled “Type Parameters”TEvent