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 drain (syni_telemetry_json).
SyniRuntime
Async, isolate-backed wrapper around libsyni_ffi.
SyniRuntimeFFI
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).

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.