runtime library

Public entry point for package:syni's Dart FFI runtime.

Re-exports the runtime surface so consumers can import 'package:syni/runtime.dart' without reaching into src/. Today the only intended consumer is package:synheart_core's SyniModule; app developers should not import this directly.

Classes

SyniAttemptDiagnostic
One generation attempt's failure.
SyniFallbackDiagnostics
Root-cause context for a fallback. prompt / rawOutput are populated only when the runtime ran with capture_diagnostics enabled (a debug opt-in); they carry user + HSI data, so treat them as sensitive.
SyniInferenceMetric
Typed view over the runtime's telemetry snapshot (syni_telemetry_json).
SyniRuntime
Async, isolate-backed wrapper around libsyni_ffi.
SyniRuntimeCapabilities
SyniRuntimeFFI
SyniRuntimeGenerationConfig
Per-turn native generation controls. All fields are optional; absence keeps the runtime's tuned preset defaults.
SyniRuntimeMessage
One prior dialogue turn. System authority is carried separately by SyniRuntimeRequest.system so dialogue can never silently become policy.
SyniRuntimeProvenance
SyniRuntimeRequest
A single inference request.
SyniRuntimeResponse
Schema-validated response from the runtime.
SyniRuntimeStreamChunk
One chunk in a streaming inference response.
SyniRuntimeStreamDelta
An incremental token (or token batch) emitted during generation.
SyniRuntimeStreamFinal
Final accumulated JSON response, emitted exactly once when generation completes. Always the last element of the stream before close.

Enums

SyniPreset
Performance preset (mirrors syni_preset_t in c_api.h).
SyniRuntimeMessageRole

Functions

parseTelemetry(String? json) List<SyniInferenceMetric>
Parse the raw telemetry JSON string (array of metrics) into typed values. Returns an empty list for null, a parse error, or a non-array payload.

Typedefs

SyniEngineNative = Pointer<Void>
Opaque engine handle. Matches struct syni_engine_t in c_api.h.

Exceptions / Errors

SyniRuntimeError
Thrown when the runtime, model, or inference call fails.