Table of Contents

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 InstalledKernel.

public sealed class InstalledKernel
Inheritance
InstalledKernel
Inherited Members

Properties

CallbackSubscriptionId

public string? CallbackSubscriptionId { get; }

Property Value

string

ExecutionObservations

public IReadOnlyList<PluginExecutionObservation> ExecutionObservations { get; }

Property Value

IReadOnlyList<PluginExecutionObservation>

InstallId

public string InstallId { get; }

Property Value

string

IsRevoked

public bool IsRevoked { get; }

Property Value

bool

LastAsyncUpdateError

public Exception? LastAsyncUpdateError { get; }

Property Value

Exception

LastExecution

public PluginExecutionObservation? LastExecution { get; }

Property Value

PluginExecutionObservation

Manifest

public PluginManifest Manifest { get; }

Property Value

PluginManifest

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

object

Package

public PluginPackage Package { get; }

Property Value

PluginPackage

Value

public LiveSettingStore Value { get; }

Property Value

LiveSettingStore

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

cancellationToken CancellationToken

Returns

ValueTask

HandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)

public ValueTask HandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)

Parameters

adapter IPluginEventAdapter<TEvent>
e TEvent
cancellationToken CancellationToken

Returns

ValueTask

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

arguments IReadOnlyList<SandboxValue>
cancellationToken CancellationToken

Returns

ValueTask<SandboxValue>

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

arguments byte[]
cancellationToken CancellationToken

Returns

ValueTask<byte[]>

ModifySettingsAsync(IReadOnlyDictionary<string, object?>, bool, CancellationToken)

public ValueTask ModifySettingsAsync(IReadOnlyDictionary<string, object?> values, bool atomic = false, CancellationToken cancellationToken = default)

Parameters

values IReadOnlyDictionary<string, object>
atomic bool
cancellationToken CancellationToken

Returns

ValueTask

Revoke()

public void Revoke()

ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent>, TEvent, CancellationToken)

public ValueTask<bool> ShouldHandleAsync<TEvent>(IPluginEventAdapter<TEvent> adapter, TEvent e, CancellationToken cancellationToken = default)

Parameters

adapter IPluginEventAdapter<TEvent>
e TEvent
cancellationToken CancellationToken

Returns

ValueTask<bool>

Type Parameters

TEvent