syni 0.3.8
syni: ^0.3.8 copied to clipboard
Flutter SDK for Syni — adaptive on-device LLM inference with hybrid local/cloud chat, structured persona conditioning, and a streaming chat API designed for the UI thread.
0.3.8 #
Changed #
- iOS: the podspec links
SyniRuntime.xcframeworkfromsynheart/vendor/syni-runtime/ios/, where syni-runtime 0.6.0 and later install it, besideandroid/jniLibs/. The old location at the package root (synheart/vendor/syni-runtime/SyniRuntime.xcframework, syni-runtime before 0.6.0) still works in this release:pod installuses it and prints a notice to re-runsynheart install runtime syni. The next release reads onlyios/. When both exist,ios/is used.
Fixed #
- Android: the plugin now reads
libsyni_ffi.sofromsynheart/vendor/syni-runtime/android/jniLibs, wheresynheart install syniputs it and where the iOS podspec already looks. It used to readsynheart/vendor/syni/android/jniLibs, so apps set up with the CLI failed to load the runtime unless they added the directory to their ownsourceSets. An app module that adds this directory itself can drop that line; keeping it is harmless. An app module that adds a different directory (such as the oldsynheart/vendor/syni/android/jniLibs) takes precedence over the plugin, so point it atsyni-runtimeor remove it. Thesyni.runtime.android.jniLibsproperty still overrides the path. When the directory is missing, the build logs a warning naming it.
0.3.7 #
Added #
SyniAgent.turnStream(), the streaming form ofturn(): emitsSyniTurnDeltatext as the model writes, then exactly oneSyniTurnFinalwith the sameSyniTurnResultthatturn()returns. On slow devices the first words arrive as soon as the prompt has been read.- Cancelling the subscription of an on-device
chatStream()orturnStream()stops the generation, so a turn the host gave up on no longer holds the model. The runtime reports tokens only once it is writing, so a turn cancelled while still reading its prompt stops at its first token.
Changed #
- Bump
cryptofrom 3.0.7 to 3.0.8.
0.3.6 #
Added #
SyniAgent.turn()for structured on-device conversations.- Typed turn contracts:
SyniTurnRequest,SyniTurnMessage,SyniTaskContract,SyniGenerationProfile, andSyniTurnResult. - Runtime API 2.0 capability negotiation.
- Request IDs, Runtime provenance, and structured generation controls.
Changed #
- Preserve user and assistant roles instead of flattening conversations into one prompt.
- Expose request identity through on-device telemetry.
- Keep existing chat APIs backward compatible.
0.3.5 #
Added #
- Fallback metadata on
SyniChatResponse/SyniRuntimeResponse:isFallback,fallbackReason,underlyingErrorCode,retryable. SyniRuntimeErrornow carries stablecode+retryable(exported frompackage:syni/agent.dart).SyniAgent.telemetry()— drain on-device inference metrics / fallback diagnostics (SyniInferenceMetric,SyniFallbackDiagnostics,SyniAttemptDiagnostic).
0.3.4 #
0.3.3 #
Changed #
- OSS launch cleanup: scrubbed internal-implementation references
(e.g. "Rust core" → "native core"), aligned all install commands to
synheart install runtime syni, corrected podspec author email, added LICENSE/CONTRIBUTING/SECURITY parity files, added.pubignore. No functional change to the public API. - iOS podspec version synced to 0.3.3 (was drifted at 1.0.0).
0.3.2 #
Added #
SyniAgent.bindPersona(SyniPersona)— bind a persona without installing a local model. Cloud chat only needs a persona plus a configuredSyniCloudConfig, so hosts that pickSyniExecutionMode.cloudOnlyno longer have to download a model just to attach a persona.
Fixed #
chat/chatStreamno longer throw "Syni is not installed" incloudOnlymode. The chat gate now requires the install state only when the request would actually run on device (local / localFirst);cloudOnlyproceeds as long as a persona is bound.localFirststill wants a model on disk — its fallback-to-cloud path is unchanged.
0.3.1 #
Added #
- New bundled spec persona:
life.companion.v1— a reflective behavioral-insights companion. Non-prescriptive by default, hedged probabilistic language, no emotional or medical labels, frames live signals as the user's CURRENT state. Sister to the existingfocus.coach.v1(which prescribes); useful for conversational / daily-companion apps where reflection is the goal.
Changed #
focus.coach.v1tightened against framing-language drift: live signal values are now explicitly framed as the user's CURRENT state. Session language (recent session,last session,session today) is only used when the provided context includes a non-emptyhistory.recent_sessionsarray. If the user asks about a session but that array is missing or empty, the model says so plainly instead of dressing live state in session language.
Both changes ship via tool/sync_personas.sh from syni-spec. No
Dart API changes — consumers pick the new persona up via
SyniSpecPersona.load('life.companion.v1'), and Focus Coach consumers
benefit from the tightening automatically.
0.3.0 #
Changed (breaking) #
SyniCloudConfig.authToken(a staticFuture<String?> Function()bearer provider) is replaced byauthHeaders, a request-awareFuture<Map<String, String>> Function(String method, String url). Cloud auth headers are now resolved per request — required forX-Synheart-Proofdevice attestation, which signs the request method and URL.- Host SDKs that previously passed a static token provider must update to the new shape; the SDK never holds or stores credentials itself.
Fixed #
SyniChatResponse.fromCloudReplynow extracts the JSON payload from replies wrapped in Markdown code fences (e.g.```{...}```) — some cloud models emit structured-output JSON inside fences. Plain-text replies and unfenced JSON continue to parse as before.
0.2.0 #
Changed (breaking) #
- iOS podspec switched from static
.a+force_loadto a vendored dynamic framework viaprepare_commandsymlink. Consumer apps installSyniRuntime.xcframeworkviasynheart install runtime syni; the podspec walks up fromPOD_DIR(or honorsSYNHEART_APP_ROOT) to find it. library_loader.dartusesDynamicLibrary.process()on iOS so symbols resolve from the auto-loaded embedded framework (matches the pattern in core-flutter v0.5.0).
Other #
.gitignoreexcludes the symlink the podspec creates at pod-install time so it doesn't show up as untracked.
0.1.0 #
First public release.
Agent layer (package:syni/agent.dart) #
SyniAgent— install lifecycle, model catalog, persona binding, chat / chatStream orchestration, hybrid local/cloud routing viaSyniExecutionMode.SyniInstaller— model download, tokenizer fetch, SHA-256 verification, cold-start restore from disk.SyniCloudClient— HTTP + SSE client for the Syni cloud chat endpoint, sticky session id, HSI forwarded as requestcontext.SyniSpecPersona.load(id)— resolves persona JSON from the bundled spec assets so the same persona id consistently produces the same behavior on both client and server.
Runtime layer (package:syni/runtime.dart) #
SyniRuntime— worker-isolate wrapper over the on-device inference engine. Engine load + token generation run on a worker so the UI thread is free.SyniRuntimeRequest/SyniRuntimeResponsefor direct inference.
Models #
SyniModelscatalog with two pre-pinned entries:qwen25_15bInstructQ4(Qwen 2.5 1.5B Instruct Q4_K_M, ~1.1 GB).gemma3_1bInstructQ4(Gemma 3 1B Instruct Q4_K_M, ~770 MB, Synheart-hosted mirror).
- Both ship with pinned SHA-256 verified by
SyniInstallerat install time.
Personas (bundled assets) #
Five spec personas mirrored from syni-spec and bundled under
assets/personas/prod/:
focus.coach.v1stress.coach.v1cognitive.companion.v1performance.coach.v1wellness.guide.v1
Refresh via tool/sync_personas.sh.
Notes #
- The legacy
Syni.initialize/Syni.generateplatform-channel API remains exported for backwards compatibility but new code should use the agent layer.