Class InstalledKernel
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 InstalledKernel.
public sealed class InstalledKernel
- Inheritance
-
InstalledKernel
- Inherited Members
Properties
CallbackSubscriptionId
public string? CallbackSubscriptionId { get; }
Property Value
ExecutionObservations
public IReadOnlyList<PluginExecutionObservation> ExecutionObservations { get; }
Property Value
InstallId
public string InstallId { get; }
Property Value
IsRevoked
public bool IsRevoked { get; }
Property Value
LastAsyncUpdateError
public Exception? LastAsyncUpdateError { get; }
Property Value
LastExecution
public PluginExecutionObservation? LastExecution { get; }
Property Value
Manifest
public PluginManifest Manifest { get; }
Property Value
OwnerId
Opaque owner token of the session that installed this kernel, or null for kernels
installed directly on the server (no session). Used by KernelRegistry to reject
cross-owner id reuse so one plugin cannot replace another plugin's kernel.
public object? OwnerId { get; }
Property Value
Package
public PluginPackage Package { get; }
Property Value
Value
public LiveSettingStore Value { get; }
Property Value
Methods
As<TSettings>()
public TypedInstalledKernel<TSettings> As<TSettings>() where TSettings : class
Returns
- TypedInstalledKernel<TSettings>
Type Parameters
TSettings
FlushUpdatesAsync(CancellationToken)
public ValueTask FlushUpdatesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
HandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)
public ValueTask HandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)
Parameters
adapterIPluginEventAdapter<TEvent>eTEventcancellationTokenCancellationToken
Returns
Type Parameters
TEvent
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 HandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken) the result is not discarded. The kernel must have been installed via InstallServerExtensionAsync(PluginPackage, SandboxPolicy?, CancellationToken) (its manifest declares the rpcEntrypoint).
public ValueTask<SandboxValue> InvokeServerExtensionAsync(IReadOnlyList<SandboxValue> arguments, CancellationToken cancellationToken = default)
Parameters
argumentsIReadOnlyList<SandboxValue>cancellationTokenCancellationToken
Returns
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 InvokeServerExtensionAsync(IReadOnlyList<SandboxValue>, 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. Owns(string)) before calling it. The
result is encoded through the same KernelRpcValue path the wire uses, so the bytes are
identical to a hand-rolled invoker.
public ValueTask<byte[]> InvokeServerExtensionRpcAsync(byte[] arguments, CancellationToken cancellationToken = default)
Parameters
argumentsbyte[]cancellationTokenCancellationToken
Returns
ModifySettingsAsync(IReadOnlyDictionary<string, object?>, bool, CancellationToken)
public ValueTask ModifySettingsAsync(IReadOnlyDictionary<string, object?> values, bool atomic = false, CancellationToken cancellationToken = default)
Parameters
valuesIReadOnlyDictionary<string, object>atomicboolcancellationTokenCancellationToken
Returns
Revoke()
public void Revoke()
ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)
public ValueTask<bool> ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)
Parameters
adapterIPluginEventAdapter<TEvent>eTEventcancellationTokenCancellationToken
Returns
Type Parameters
TEvent