Verify before parse
The facade can require expected SHA-256 and byte count, constrain the canonical path to an allowed root, reject reparse points, and enforce maximum model size before loading.
UAIX.LmRuntime / Required For application integration
The high-level local-only GGUF facade for verified files, bounded loading, isolated sessions, and deterministic greedy generation.
Required For application integration
UAIX.LmRuntime.LocalEndpoint
High-level local-only GGUF facade with verified files, bounded loading, isolated sessions, managed CPU execution, and explicit backend capability boundaries.
The application-facing local GGUF facade. It verifies caller-selected files, loads the managed LLaMA reference path, creates isolated sessions, generates deterministically, and exposes fixed capability evidence. Acceleration selection packages are dependencies, but this facade currently reports managed execution and no GPU or native inference.
dotnet add package UAIX.LmRuntime.LocalEndpoint
<PackageReference Include="UAIX.LmRuntime.LocalEndpoint" />
Version policy: The documentation deliberately omits UAIX.LmRuntime package version numbers. Resolve and pin versions through your normal dependency-management and lock-file process.
Installing this facade brings the curated GGUF, tensor, CPU-kernel, sampling, tokenizer, LLaMA, and abstraction dependencies transitively.
The facade can require expected SHA-256 and byte count, constrain the canonical path to an allowed root, reject reparse points, and enforce maximum model size before loading.
A loaded model can create multiple explicit sessions. Each session owns its position and UAIX context evidence; no process-global active profile is required.
UAIX profile and memory fields are retained as immutable evidence only. Runtime execution, policy override, commands, network, providers, website intake, telemetry, and auto-export flags must remain false.
These are the main public entry points. The generated reference below includes the documented public package surface.
LocalGgufRuntime LocalGgufRuntimeScope LocalGgufModelLoadOptions LocalGgufFileExpectation LocalGgufFileIdentity LocalGgufModel LocalGgufSession LocalGgufGenerationRequest LocalGgufGenerationResult LocalUaixRuntimeContext LocalUaixRuntimeContextEvidence Examples use the documented public package surface. Paths, identities, runtime identifiers, device evidence, and application policy remain host inputs.
Use a trusted model root, exact file identity, explicit UAIX evidence, bounded generation, and deterministic disposal.
using UAIX.LmRuntime.LocalEndpoint;
public static class LocalGgufQuickStart
{
/// <summary>
/// Loads a verified local GGUF model and performs deterministic greedy generation.
/// </summary>
/// <param name="modelPath">The local path to the GGUF model.</param>
/// <param name="trustedModelRoot">The canonical root under which the model must reside.</param>
/// <param name="expectedSha256">The expected SHA-256 digest.</param>
/// <param name="expectedByteCount">The exact expected model byte count.</param>
/// <param name="appInstanceId">The host application's stable instance identifier.</param>
/// <param name="importedPackageCorrelationId">A legacy UAIX package correlation identifier; it grants no authority.</param>
/// <param name="profileId">The already validated UAIX profile identifier.</param>
/// <param name="profileDisplayName">The display-safe profile name.</param>
/// <param name="loadSessionId">The host-owned profile load-session identifier.</param>
/// <param name="wikiRootId">The host-owned long-term-memory root identifier.</param>
/// <param name="workerSessionId">The host-owned inference session identifier.</param>
/// <param name="prompt">The already prepared prompt; the runtime does not assemble it.</param>
/// <param name="cancellationToken">A token used to cancel between committed inference steps.</param>
/// <returns>The deterministic generation result.</returns>
public static LocalGgufGenerationResult Generate(
string modelPath,
string trustedModelRoot,
string expectedSha256,
long expectedByteCount,
string appInstanceId,
string importedPackageCorrelationId,
string profileId,
string profileDisplayName,
string loadSessionId,
string wikiRootId,
string workerSessionId,
string prompt,
CancellationToken cancellationToken)
{
var runtime = new LocalGgufRuntime(
new LocalGgufRuntimeScope
{
ApplicationInstanceId = appInstanceId,
UaixPackageId = importedPackageCorrelationId
});
var uaixContext = new LocalUaixRuntimeContext
{
LoadedUaixProfilePresent = true,
LoadedUaixProfileId = profileId,
LoadedUaixProfileDisplayName = profileDisplayName,
LoadedUaixLoadSessionId = loadSessionId,
LoadedUaixUaiRelativePath = $"Memories/Profiles/{profileId}/.uai",
LoadedUaixSessionRelativePath = $"Memories/Sessions/{loadSessionId}.json",
LongTermMemoryRootId = wikiRootId,
LongTermMemoryRootRelativePath = $"Profiles/{profileId}",
LongTermMemoryMode = LocalUaixLongTermMemoryMode.Isolated,
RuntimeExecutionAllowed = false,
MemoryCanOverridePolicy = false,
CommandExecutionAllowed = false,
NetworkAccessAllowed = false,
ProviderApisAllowed = false,
WebsitePromptIntakeAllowed = false,
TelemetryEnabled = false,
AutoExportAllowed = false
};
LocalUaixRuntimeContextEvidence contextEvidence =
LocalGgufRuntime.VerifyUaixRuntimeContext(uaixContext);
using LocalGgufModel model = runtime.LoadVerifiedModel(
modelPath,
new LocalGgufFileExpectation
{
ModelSha256 = expectedSha256,
ModelByteCount = expectedByteCount
},
new LocalGgufModelLoadOptions
{
AllowedRootDirectory = trustedModelRoot,
RejectReparsePoints = true,
MaximumModelBytes = expectedByteCount,
ExecutionLimits = new LocalGgufExecutionLimits
{
MaximumPromptCharacters = 32_768,
MaximumGeneratedTokens = 256,
MaximumStopTokenCount = 32
}
});
using LocalGgufSession session = model.CreateSession(
new LocalGgufSessionContext
{
SessionId = workerSessionId,
UaixRuntimeContext = uaixContext
});
return session.GenerateGreedy(
new LocalGgufGenerationRequest
{
Prompt = prompt,
MaximumTokens = 128,
ResetSession = true,
AddSpecialTokens = false,
ParseSpecialTokens = false,
EmitTokenizerTrace = false,
RemoveSpecialTokens = false,
UnparseSpecialTokens = true,
CleanSpaces = false
},
cancellationToken);
}
}
Boundary: The host validates and prepares profile, memory, and prompt data. The runtime retains context as evidence only; every authority flag remains false.
Map each committed token to the host worker protocol without giving the runtime ownership of transport or persistence.
using UAIX.LmRuntime.LocalEndpoint;
public static class TokenObservationExample
{
/// <summary>
/// Generates a bounded response and observes each selected token synchronously.
/// </summary>
/// <param name="session">The isolated local GGUF session.</param>
/// <param name="preparedPrompt">The host-prepared prompt.</param>
/// <param name="cancellationToken">A token observed between committed model steps.</param>
/// <returns>The complete deterministic generation result.</returns>
public static LocalGgufGenerationResult Generate(
LocalGgufSession session,
string preparedPrompt,
CancellationToken cancellationToken)
{
ArgumentNullException.ThrowIfNull(session);
ArgumentException.ThrowIfNullOrWhiteSpace(preparedPrompt);
return session.GenerateGreedy(
new LocalGgufGenerationRequest
{
Prompt = preparedPrompt,
MaximumTokens = 64,
ResetSession = true,
AddSpecialTokens = true,
ParseSpecialTokens = false,
RemoveSpecialTokens = true
},
token => Console.WriteLine(
$"{session.SessionId}:{token.Sequence}:{token.TokenId}:{token.SelectedLogit}"),
cancellationToken);
}
}
Hash and bound extra local artifacts while keeping them outside the generation path.
using UAIX.LmRuntime.LocalEndpoint;
public static class AssociatedArtifactExample
{
/// <summary>
/// Verifies a LocalEndpoint-reviewed associated artifact without granting execution authority.
/// </summary>
/// <param name="runtime">The local runtime facade performing byte verification.</param>
/// <param name="artifactPath">The local associated-artifact path.</param>
/// <param name="trustedModelRoot">The canonical root that must contain the artifact.</param>
/// <param name="expectedSha256">The expected SHA-256 digest.</param>
/// <param name="expectedByteCount">The exact expected byte count.</param>
/// <returns>Path-free immutable artifact identity evidence.</returns>
public static IReadOnlyList<LocalGgufAssociatedArtifactIdentity> Verify(
LocalGgufRuntime runtime,
string artifactPath,
string trustedModelRoot,
string expectedSha256,
long expectedByteCount)
{
ArgumentNullException.ThrowIfNull(runtime);
string fileName = Path.GetFileName(artifactPath);
return runtime.VerifyAssociatedArtifacts(
[
new LocalGgufAssociatedArtifactLoadInput
{
ArtifactPath = artifactPath,
Role = "projector",
FileName = fileName,
ArtifactSha256 = expectedSha256,
ArtifactByteCount = expectedByteCount
}
],
new LocalGgufModelLoadOptions
{
AllowedRootDirectory = trustedModelRoot,
RejectReparsePoints = true
});
}
}
Boundary: Associated artifacts are verified evidence; the facade does not use them for generation unless a future explicitly supported path says otherwise.
Read the facade capability object instead of inferring behavior from package names.
using UAIX.LmRuntime.LocalEndpoint;
var runtime = new LocalGgufRuntime();
LocalGgufRuntimeCapabilities capabilities = runtime.Capabilities;
Console.WriteLine($"Managed execution: {capabilities.IsManagedExecution}");
Console.WriteLine($"Explicit verification: {capabilities.SupportsExplicitFileVerification}");
Console.WriteLine($"Network access: {capabilities.UsesNetworkAccess}");
Console.WriteLine($"Subprocesses: {capabilities.UsesSubprocesses}");
Console.WriteLine($"Telemetry: {capabilities.UsesTelemetry}");
Console.WriteLine($"Server: {capabilities.HostsServer}");
Console.WriteLine($"Global UAIX profile: {capabilities.UsesGlobalUaixProfile}");
Console.WriteLine($"Memory grants authority: {capabilities.UaixMemoryGrantsAuthority}");
Preserve model state only when the host deliberately chooses not to reset the session.
using UAIX.LmRuntime.LocalEndpoint;
public static class SessionReuseExample
{
/// <summary>
/// Executes an initial prepared prompt, then continues the same isolated model session.
/// </summary>
/// <param name="session">The isolated local GGUF session.</param>
/// <param name="firstPreparedPrompt">The complete first-turn prompt prepared by the host.</param>
/// <param name="continuationPreparedPrompt">The continuation prompt prepared by the host.</param>
/// <param name="cancellationToken">A token observed between committed model steps.</param>
/// <returns>The first and continuation generation results.</returns>
public static (
LocalGgufGenerationResult First,
LocalGgufGenerationResult Continuation) GenerateTwoTurns(
LocalGgufSession session,
string firstPreparedPrompt,
string continuationPreparedPrompt,
CancellationToken cancellationToken)
{
ArgumentNullException.ThrowIfNull(session);
LocalGgufGenerationResult first = session.GenerateGreedy(
new LocalGgufGenerationRequest
{
Prompt = firstPreparedPrompt,
MaximumTokens = 64,
ResetSession = true,
AddSpecialTokens = true
},
cancellationToken);
LocalGgufGenerationResult continuation = session.GenerateGreedy(
new LocalGgufGenerationRequest
{
Prompt = continuationPreparedPrompt,
MaximumTokens = 64,
ResetSession = false,
AddSpecialTokens = false
},
cancellationToken);
return (first, continuation);
}
}
Boundary: The host owns conversation formatting and must ensure that continuation prompts and special-token settings match the model template.
Read the immutable capability surface so the host does not mistake installed backend metadata for active GPU execution.
using UAIX.LmRuntime.LocalEndpoint;
var runtime = new LocalGgufRuntime();
LocalGgufRuntimeCapabilities capabilities = runtime.Capabilities;
Console.WriteLine($"Managed execution: {capabilities.IsManagedExecution}");
Console.WriteLine($"Native inference: {capabilities.UsesNativeInference}");
Console.WriteLine($"GPU acceleration: {capabilities.UsesGpuAcceleration}");
Console.WriteLine($"Network access: {capabilities.UsesNetworkAccess}");
Console.WriteLine($"Telemetry: {capabilities.UsesTelemetry}");
if (!capabilities.IsManagedExecution ||
capabilities.UsesNativeInference ||
capabilities.UsesGpuAcceleration ||
capabilities.UsesNetworkAccess ||
capabilities.UsesTelemetry)
{
throw new InvalidOperationException("The active facade does not match the required local managed boundary.");
}
Boundary: The acceleration registry and GPU compatibility packages are explicit diagnostics and selection surfaces. They do not silently replace LocalEndpoint generation with native or GPU execution.
Expand a type to review its documented public fields, properties, constructors, methods, parameter descriptions, and return descriptions.
LocalGgufRuntimeScopeUAIX.LmRuntime.LocalEndpoint
2 members
Identifies one caller-owned LocalEndpoint application scope and optional legacy UAIX package correlation label.
The values are opaque compatibility labels. They do not identify the active profile or per-application-instance load session; that evidence is supplied to . The runtime never opens, interprets, persists, or synchronizes UAIX content.
ApplicationInstanceId
Gets the LocalEndpoint application instance identifier.
UaixPackageId
Gets an optional caller-owned legacy UAIX package correlation identifier.
LocalGgufRuntimeCapabilitiesUAIX.LmRuntime.LocalEndpoint
17 members
Declares the fixed local-only capabilities of the LocalEndpoint integration facade.
SupportsExplicitFileVerification
Gets a value indicating whether callers can explicitly re-verify current model-file bytes before reuse.
SupportsAssociatedArtifactVerification
Gets a value indicating whether callers can bind reviewed companion artifacts to path-free evidence.
UsesAssociatedArtifactsForGeneration
Gets a value indicating whether associated artifacts alter managed token generation.
SupportsSynchronousTokenObservation
Gets a value indicating whether caller-owned synchronous token observation is supported.
UsesSubprocesses
Gets a value indicating whether the integration starts subprocesses.
UsesNetworkAccess
Gets a value indicating whether the integration performs network access.
PersistsRuntimeContent
Gets a value indicating whether the integration persists prompts, generated text, or session state.
IsManagedExecution
Gets a value indicating whether model execution is implemented by managed project code.
UsesNativeInference
Gets a value indicating whether model execution delegates to a native inference library.
UsesGpuAcceleration
Gets a value indicating whether the integration uses GPU or CUDA execution.
UsesTelemetry
Gets a value indicating whether the integration emits telemetry.
HostsServer
Gets a value indicating whether the integration hosts a server or public listener.
SupportsUaixRuntimeContextValidation
Gets a value indicating whether the facade validates LocalEndpoint-supplied UAIX runtime context metadata.
UsesGlobalUaixProfile
Gets a value indicating whether the runtime assumes one process-global active UAIX profile.
ParsesUaixPackages
Gets a value indicating whether the runtime opens or parses .uaix package containers.
UaixMemoryGrantsAuthority
Gets a value indicating whether UAIX memory metadata can grant runtime or external authority.
EmitsWorkerJsonlEvents
Gets a value indicating whether this managed facade emits LocalEndpoint worker JSONL events.
LocalGgufExecutionLimitsUAIX.LmRuntime.LocalEndpoint
3 members
Defines caller-visible resource ceilings for one verified model owner.
The limits are enforced before large generation buffers are allocated. They supplement, but do not replace, the model context-window checks performed by the underlying deterministic runtime.
MaximumPromptCharacters
Gets the maximum accepted prepared-prompt length in .NET UTF-16 code units.
MaximumGeneratedTokens
Gets the maximum generated-token buffer length permitted for one operation.
MaximumStopTokenCount
Gets the maximum number of caller-defined stop-token identifiers permitted for one operation.
LocalGgufModelLoadOptionsUAIX.LmRuntime.LocalEndpoint
7 members
Configures loading of one trusted local GGUF artifact through the LocalEndpoint-facing managed runtime surface.
The options govern local file validation and bounded managed execution only. They do not enable downloading, remote inference, process launch, telemetry, server hosting, or persistent runtime state.
MaximumModelBytes
Gets the maximum accepted model file length in bytes.
RejectReparsePoints
Gets a value indicating whether symbolic links and reparse points are rejected before the file is opened.
AllowedRootDirectory
Gets the optional normalized directory that must contain the resolved GGUF file.
MaximumReferenceMaterializationBytes
Gets the maximum number of bytes that compatibility-only float32 materialization may allocate.
ParseOptions
Gets GGUF parser safety limits.
BindingOptions
Gets semantic LLaMA tensor-binding validation controls.
ExecutionLimits
Gets the prompt, generated-token, and stop-token ceilings enforced by sessions created from the model.
LocalGgufModelMetadataUAIX.LmRuntime.LocalEndpoint
11 members
Describes the verified model and execution metadata exposed to the LocalEndpoint worker adapter.
ModelSha256
Gets the lowercase SHA-256 digest verified before model loading.
ModelByteCount
Gets the verified model file length in bytes.
AssociatedArtifacts
Gets the verified path-free identities of associated model artifacts supplied by LocalEndpoint.
GgufVersion
Gets the GGUF container version.
Architecture
Gets the model architecture identifier.
ModelName
Gets the optional model display name from GGUF metadata.
Tokenizer
Gets the exact tokenizer implementation name selected from GGUF metadata.
ContextLength
Gets the configured context length in tokens.
VocabularySize
Gets the configured vocabulary size.
BoundTensorCount
Gets the number of tensors accepted by semantic binding.
StorageSummary
Gets the mapped storage summary used by the managed reference runtime.
LocalGgufFileExpectationUAIX.LmRuntime.LocalEndpoint
2 members
Declares the path-free model-file evidence that LocalEndpoint requires before loading or reusing a model.
The contract contains only a SHA-256 digest and byte count. It intentionally excludes the private model path, model bytes, prompt content, generated content, registry state, audit state, and UAIX package data. Runtime entry points validate both values against current file bytes before model parsing or cached-model reuse.
ModelSha256
Gets the required SHA-256 digest for the current local model file.
ModelByteCount
Gets the required current model file length in bytes.
LocalGgufFileIdentityUAIX.LmRuntime.LocalEndpoint
2 members
Represents the verified content identity of one current local GGUF file.
The result contains only a digest and byte count. It deliberately omits the local path, model bytes, prompt content, generated content, UAIX state, and caller policy so it can be copied into LocalEndpoint evidence without expanding the runtime's persistence or trust responsibilities.
ModelSha256
Gets the normalized lowercase SHA-256 digest verified from current file bytes.
ModelByteCount
Gets the verified current file length in bytes.
LocalGgufAssociatedArtifactLoadInputUAIX.LmRuntime.LocalEndpoint
5 members
Supplies one LocalEndpoint-reviewed associated artifact for verification by the managed runtime facade.
The private path is accepted only as an input needed to verify current local bytes. The returned verification identity omits the path and contains only display-safe role, file name, SHA-256, and byte-count evidence.
ArtifactPath
Gets the private direct-local path to the associated artifact file that LocalEndpoint already reviewed.
Role
Gets the caller-owned role label for the associated artifact.
FileName
Gets the reviewed leaf file name expected at .
ArtifactSha256
Gets the required SHA-256 digest for the current associated artifact file.
ArtifactByteCount
Gets the required current associated artifact file length in bytes.
LocalGgufAssociatedArtifactIdentityUAIX.LmRuntime.LocalEndpoint
4 members
Represents the path-free verified identity of one associated model artifact.
The identity is constructed only after the runtime verifies the current associated artifact file under the same local path, containment, reparse-point, stable-length, byte-count, and SHA-256 rules used for primary model admission. It deliberately omits private paths, file bytes, prompt content, generated content, UAIX content, registry state, and audit state.
Role
Gets the caller-owned artifact role label copied into path-free evidence.
FileName
Gets the reviewed associated-artifact leaf file name.
ArtifactSha256
Gets the normalized lowercase SHA-256 digest verified from current associated-artifact bytes.
ArtifactByteCount
Gets the verified current associated-artifact file length in bytes.
LocalGgufTokenizerMetadataUAIX.LmRuntime.LocalEndpoint
9 members
Provides a bounded tokenizer metadata projection for LocalEndpoint runtime readiness and diagnostics.
TokenizerModel
Gets the tokenizer family declared by GGUF metadata.
PreTokenizer
Gets the optional pre-tokenizer identifier.
VocabularySize
Gets the vocabulary size.
BosTokenId
Gets the beginning-of-sequence token identifier when defined.
EosTokenId
Gets the end-of-sequence token identifier when defined.
UnknownTokenId
Gets the unknown-token identifier when defined.
AddBos
Gets whether model metadata requests automatic beginning-of-sequence insertion.
AddEos
Gets whether model metadata requests automatic end-of-sequence insertion.
ChatTemplate
Gets the optional chat template declared by the model.
LocalGgufGenerationRequestUAIX.LmRuntime.LocalEndpoint
12 members
Defines one bounded deterministic greedy-generation request.
The request contains only in-memory generation controls. It does not define persistence, network, provider, process, server, telemetry, or model-download behavior.
Prompt
Gets the exact prepared prompt to tokenize in memory.
MaximumTokens
Gets the positive maximum number of tokens to generate.
ResetSession
Gets whether the session is reset before prompt prefill.
AddSpecialTokens
Gets whether model-defined special-token insertion is enabled for the prompt.
ParseSpecialTokens
Gets whether special-token text embedded in the prompt is parsed as a special token.
EmitTokenizerTrace
Gets whether tokenizer trace entries are captured for the prompt.
InvalidUtf16Policy
Gets the invalid UTF-16 handling policy used during tokenization.
EndOfSequenceTokenId
Gets the optional explicit end-of-sequence token identifier; when omitted, model metadata is used.
StopTokenIds
Gets additional token identifiers that terminate generation after being emitted.
RemoveSpecialTokens
Gets whether special tokens are removed from decoded generated text.
UnparseSpecialTokens
Gets whether special tokens are emitted as their raw token text when they are not removed.
CleanSpaces
Gets whether tokenizer-defined spacing cleanup is applied during detokenization.
LocalGgufGeneratedTokenUAIX.LmRuntime.LocalEndpoint
4 members
Describes one generated token selected by the managed runtime for caller-owned streaming.
The value intentionally excludes prompt text, decoded output, model paths, UAIX content, registry state, audit state, and transport details. LocalEndpoint remains responsible for detokenization policy, worker-event mapping, terminal-event policy, and persistence boundaries.
LocalGgufGeneratedToken(int,int,float)
Initializes a new LocalGgufGeneratedToken instance with validated dependencies and operational bounds.
sequencetokenIdselectedLogitSequence
Gets the zero-based selection sequence.
TokenId
Gets the selected model vocabulary identifier.
SelectedLogit
Gets the deterministic argmax logit associated with the selected token.
LocalGgufGenerationResultUAIX.LmRuntime.LocalEndpoint
6 members
Represents deterministic generated token identifiers and their decoded text.
PromptTokenCount
Gets the number of prompt tokens evaluated for the operation.
GeneratedTokenIds
Gets the generated token identifiers in selection order.
GeneratedText
Gets the decoded generated text.
StopReason
Gets the deterministic generation stop reason.
Position
Gets the next sequence position retained by the isolated session.
FinalSelectedLogit
Gets the selected logit of the final generated token, or negative infinity when no token was generated.
LocalGgufVerificationExceptionUAIX.LmRuntime.LocalEndpoint
5 members
Represents a local GGUF artifact verification failure.
LocalGgufVerificationException(string,string,string,System.Exception,System.Nullable<long>,System.Nullable<long>)
Initializes a new LocalGgufVerificationException instance with validated dependencies and operational bounds.
messageexpectedSha256actualSha256innerExceptionexpectedByteCountactualByteCountExpectedSha256
Gets the normalized expected SHA-256 value when available.
ActualSha256
Gets the normalized observed SHA-256 value when available.
ExpectedByteCount
Gets the required model byte count when supplied by caller-owned evidence.
ActualByteCount
Gets the observed current model byte count when available.
LocalGgufModelUAIX.LmRuntime.LocalEndpoint
11 members
Owns one verified mapped GGUF model and creates isolated deterministic inference sessions.
Scope
Gets the opaque application scope and optional legacy package label associated with this model owner.
Metadata
Gets verified model and runtime metadata.
TokenizerMetadata
Gets the bounded tokenizer metadata projection.
ExecutionLimits
Gets the immutable prompt and generation ceilings copied when this model was loaded.
ActiveSessionCount
Gets the number of caller-owned sessions that have not yet been disposed.
IsDisposed
Gets a value indicating whether this model owner has been disposed.
Tokenize(string,UAIX.LmRuntime.Tokenization.TokenizationOptions)
Tokenizes text using exact metadata loaded from the verified GGUF artifact.
textoptionsReturns: The exact integer token identifiers and optional trace.
Decode(System.Collections.Generic.IReadOnlyList<int>,UAIX.LmRuntime.Tokenization.MetadataDrivenGgufTokenizerDetokenizationOptions)
Decodes token identifiers using the tokenizer metadata from the verified GGUF artifact.
tokenIdsoptionsReturns: The decoded text produced from the validated token sequence in the original sequence order.
CreateSession
Rejects creation of a LocalEndpoint inference session when required UAIX load-session context is absent.
Returns: No value is returned; this compatibility member always throws to require an explicit session-scoped UAIX context.
CreateSession(UAIX.LmRuntime.LocalEndpoint.LocalGgufSessionContext)
Creates a new inference session with independent sequence state and validated UAIX load-session evidence.
sessionContextReturns: An isolated deterministic session owned by the caller.
Dispose
Releases the memory-mapped model after all child sessions have been disposed.
LocalGgufRuntimeUAIX.LmRuntime.LocalEndpoint
11 members
Loads verified local GGUF files into isolated pure-managed LLaMA runtime models.
This type performs local file validation and direct managed model loading only. It contains no subprocess, network, provider, telemetry, server, downloader, command-dispatch, or persistent-profile behavior. The type holds no static mutable model, session, profile, or wiki state. Separate application instances can therefore load independent models and bind each inference session to a distinct LocalEndpoint-owned UAIX load session.
LocalGgufRuntime
Initializes an unscoped model facade for compatibility with callers that do not require application labels.
LocalGgufRuntime(UAIX.LmRuntime.LocalEndpoint.LocalGgufRuntimeScope)
Initializes a runtime facade for one LocalEndpoint application instance and optional legacy package label.
scopeScope
Gets the opaque caller-owned runtime scope.
Capabilities
Gets the fixed local-only capability declaration.
VerifyUaixRuntimeContext(UAIX.LmRuntime.LocalEndpoint.LocalUaixRuntimeContext)
Validates LocalEndpoint-supplied uaixRuntimeContext metadata without opening package or wiki files.
contextReturns: An immutable path-relative evidence projection with a canonical context SHA-256.
VerifyLocalModelFile(string,string,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Verifies the current bytes and file-policy boundaries of one local GGUF artifact without loading a model.
modelPathexpectedSha256optionsReturns: A path-free identity containing the verified digest and current byte count.
VerifyAssociatedArtifacts(System.Collections.Generic.IReadOnlyList<UAIX.LmRuntime.LocalEndpoint.LocalGgufAssociatedArtifactLoadInput>,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Verifies LocalEndpoint-reviewed associated artifacts without exposing private local paths.
associatedArtifactsoptionsReturns: Path-free associated-artifact identities sorted by role, file name, and SHA-256 digest.
VerifyLocalModelFile(string,UAIX.LmRuntime.LocalEndpoint.LocalGgufFileExpectation,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Verifies current local model bytes against caller-owned digest and byte-count evidence without loading a model.
modelPathexpectationoptionsReturns: A path-free identity containing the verified digest and current byte count.
LoadVerifiedModel(string,string,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Loads a local GGUF model only after its exact SHA-256 digest and file-policy constraints are verified.
modelPathexpectedSha256optionsReturns: An owned mapped model that must be disposed after all child sessions are disposed.
LoadVerifiedModel(string,UAIX.LmRuntime.LocalEndpoint.LocalGgufFileExpectation,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Loads a local GGUF model after binding current file bytes to caller-owned digest and byte-count evidence.
modelPathexpectationoptionsReturns: An owned mapped model that must be disposed after all child sessions are disposed.
LoadVerifiedModel(string,UAIX.LmRuntime.LocalEndpoint.LocalGgufFileExpectation,System.Collections.Generic.IReadOnlyList<UAIX.LmRuntime.LocalEndpoint.LocalGgufAssociatedArtifactLoadInput>,UAIX.LmRuntime.LocalEndpoint.LocalGgufModelLoadOptions)
Loads a local GGUF model after binding the primary artifact and associated artifacts to caller-owned evidence.
modelPathexpectationassociatedArtifactsoptionsReturns: An owned mapped model that must be disposed after all child sessions are disposed.
LocalGgufSessionUAIX.LmRuntime.LocalEndpoint
8 members
Owns isolated deterministic sequence and key/value-cache state for one verified local model.
A session serializes generation, reset, and disposal transitions through one lifecycle authority. It stores no prompt, generated text, audit record, registry record, UAIX content, provider state, or network state.
SessionId
Gets the validated LocalEndpoint worker session identifier preserved for this inference session.
UaixRuntimeContextEvidence
Gets immutable, path-relative evidence for the profile and UAIX load session bound to this inference session.
Position
Gets the next sequence position retained by this isolated session.
IsDisposed
Gets a value indicating whether this session has been disposed.
GenerateGreedy(UAIX.LmRuntime.LocalEndpoint.LocalGgufGenerationRequest,System.Threading.CancellationToken)
Runs bounded deterministic greedy generation and returns exact token identifiers with decoded text.
requestcancellationTokenReturns: The generated token identifiers, text, stop reason, position, and final selected logit.
GenerateGreedy(UAIX.LmRuntime.LocalEndpoint.LocalGgufGenerationRequest,System.Action<UAIX.LmRuntime.LocalEndpoint.LocalGgufGeneratedToken>,System.Threading.CancellationToken)
Runs bounded deterministic greedy generation and synchronously reports each selected token.
requesttokenObservercancellationTokenReturns: The generated token identifiers, text, stop reason, position, and final selected logit.
Reset
Clears sequence position and key/value-cache state retained by this session.
Dispose
Releases isolated session state without disposing the shared model owner.
LocalUaixLongTermMemoryModeUAIX.LmRuntime.LocalEndpoint
1 member
Identifies the supported long-term memory routing modes for one validated UAIX load session.
The value describes a caller-owned memory route only. It does not authorize file access, runtime execution, command execution, network access, provider access, telemetry, export, or any other capability.
Isolated
Routes the load session to a profile-owned long-term memory root.
LocalUaixRuntimeContextFailureCodeUAIX.LmRuntime.LocalEndpoint
12 members
Identifies the fail-closed reason produced while validating LocalEndpoint UAIX runtime context metadata.
Codes are stable, display-safe boundary identifiers. They do not include prompt text, generated text, private absolute paths, package bytes, wiki document contents, credentials, or unrestricted exception details.
MissingContext
The required runtime context object was absent.
ProfileNotLoaded
The caller did not identify a loaded UAIX profile.
MissingValue
A required identifier or display-safe value was absent.
InvalidIdentifier
An identifier was outside the bounded portable identifier grammar.
InvalidDisplayValue
A display-safe value contained unsupported control data or exceeded its limit.
InvalidRelativePath
A relative path was absolute, traversing, malformed, or outside the supported portable form.
ProfilePathMismatch
The profile-relative path did not match the declared profile identifier.
SessionPathMismatch
The load-session-relative path did not match the declared load-session identifier.
LongTermMemoryPathMismatch
The long-term memory path did not match its declared mode and root identity.
UnsupportedLongTermMemoryMode
The long-term memory mode was not one of the explicitly supported values.
AuthorityEscalation
One or more UAIX memory fields attempted to grant execution or external authority.
InvalidWorkerSession
The worker session identifier was absent or malformed.
LocalUaixRuntimeContextUAIX.LmRuntime.LocalEndpoint
17 members
Represents display-safe UAIX profile and long-term memory routing metadata supplied by LocalEndpoint.
This type mirrors the uaixRuntimeContext object in localendpoint.worker.request.v1. The runtime does not open or parse a .uaix archive, read .uai files, read wiki documents, expand a profile, choose a profile, or infer authority from this object. LocalEndpoint validates and imports packages, assembles the prompt, and supplies this metadata after its own policy gates. Every authority field must remain .
LoadedUaixProfilePresent
Gets a value indicating whether LocalEndpoint supplied one validated and loaded UAIX profile.
LoadedUaixProfileId
Gets the portable identifier of the loaded UAIX profile.
LoadedUaixProfileDisplayName
Gets the display-safe name of the loaded UAIX profile.
LoadedUaixLoadSessionId
Gets the LocalEndpoint load-session identifier that bound this profile to one desktop application instance.
LoadedUaixUaiRelativePath
Gets the app-local relative path to the expanded profile .uai root.
LoadedUaixSessionRelativePath
Gets the app-local relative path to the LocalEndpoint load-session evidence record.
LongTermMemoryRootId
Gets the portable identifier of the selected Documents-backed long-term memory root.
LongTermMemoryRootRelativePath
Gets the path relative to Documents/LocalEndpoint/Wikis for the selected long-term memory root.
LongTermMemoryMode
Gets whether the selected long-term memory root is profile-isolated or deliberately shared.
RuntimeExecutionAllowed
Gets a value that must remain false because UAIX memory does not authorize model runtime execution.
MemoryCanOverridePolicy
Gets a value that must remain false because memory cannot override LocalEndpoint policy.
CommandExecutionAllowed
Gets a value that must remain false because command execution requires a separate user-approved gate.
NetworkAccessAllowed
Gets a value that must remain false because UAIX memory does not authorize network access.
ProviderApisAllowed
Gets a value that must remain false because UAIX memory does not authorize provider APIs.
WebsitePromptIntakeAllowed
Gets a value that must remain false because UAIX memory does not authorize website prompt intake.
TelemetryEnabled
Gets a value that must remain false because UAIX memory does not authorize telemetry.
AutoExportAllowed
Gets a value that must remain false because UAIX memory does not authorize automatic export.
LocalGgufSessionContextUAIX.LmRuntime.LocalEndpoint
2 members
Represents one worker session identity and its required UAIX boundary metadata.
LocalEndpoint creates this value after package import, profile loading, prompt assembly, and policy validation. The runtime snapshots the context for one isolated session and retains no global active profile.
SessionId
Gets the LocalEndpoint worker session identifier that every mapped event must preserve.
UaixRuntimeContext
Gets the required display-safe UAIX profile and wiki routing metadata.
LocalUaixRuntimeContextEvidenceUAIX.LmRuntime.LocalEndpoint
10 members
Represents the immutable, path-relative evidence produced after UAIX runtime context validation.
The evidence contains no prompt, generated text, package bytes, wiki document content, model path, credential, command grant, network grant, provider grant, or execution grant. The SHA-256 binds a canonical field sequence for caller-owned registry and audit evidence without turning the context into authority.
LoadedUaixProfileId
Gets the validated loaded profile identifier.
LoadedUaixProfileDisplayName
Gets the validated display-safe profile name.
LoadedUaixLoadSessionId
Gets the validated LocalEndpoint load-session identifier.
LoadedUaixUaiRelativePath
Gets the validated app-local profile .uai relative path.
LoadedUaixSessionRelativePath
Gets the validated app-local load-session relative path.
LongTermMemoryRootId
Gets the validated long-term memory root identifier.
LongTermMemoryRootRelativePath
Gets the validated Documents-backed wiki relative path.
LongTermMemoryMode
Gets the validated long-term memory routing mode.
ContextSha256
Gets the canonical lowercase SHA-256 for this validated context.
AuthorityBoundaryClosed
Gets a value indicating that every UAIX authority field was verified false.
LocalUaixRuntimeContextExceptionUAIX.LmRuntime.LocalEndpoint
2 members
Represents a fail-closed UAIX runtime context validation error.
The exception exposes a stable code and field name for bounded diagnostics. It does not include prompt text, generated text, profile file contents, wiki document contents, credentials, or private absolute paths.
FailureCode
Gets the stable fail-closed validation code.
FieldName
Gets the display-safe contract field associated with the failure.
Start with LocalEndpoint when the bounded local GGUF facade matches the application. Install lower-level packages directly only when you need their specific extension or inspection surfaces.
The explicit context binds a host session ID and immutable UAIX evidence to the runtime session. The parameterless member is a fail-closed compatibility boundary and should not be used for normal integration.
No. The host validates and loads those artifacts. The runtime validates a display-safe context object and retains evidence without reading profiles, memory documents, or prompt sources.
No. Those authority flags are required to remain false. Any future capability needs a separate host-owned, user-approved gate.
No. It is an in-process managed facade. Transport, worker protocols, JSONL events, registries, audit, UI, and persistence remain host responsibilities.
Dispose LocalGgufSession before LocalGgufModel. The model owns mapped resources and tracks active sessions; use using declarations or an equivalent deterministic lifetime.