dazzle_flutter 1.0.0-beta.7.3 copy "dazzle_flutter: ^1.0.0-beta.7.3" to clipboard
dazzle_flutter: ^1.0.0-beta.7.3 copied to clipboard

Dazzle SDK for Flutter. Embedded in-process database with HNSW vector search and a ChatAgent runtime for on-device LLM agents. Links the same libdazzle.so / Dazzle.xcframework the native Android and i [...]

Changelog #

All notable changes to dazzle_flutter. This package follows the Dazzle SDK release line; see the repo CHANGELOG for cross-stack release notes.

1.0.0-beta.7.3 — 2026-05-21 #

Correctness release. A property-based fuzz pass over the bridge decoder surfaced a real crash. No breaking ABI.

Fixed — DazzleHealth.fromMap threw on a non-numeric field #

(m['k'] as num?) throws a TypeError the moment a misbehaving native bridge sends a String (e.g. "6379") for a numeric field. Hardened to a defensive _asInt(Object?) coercion that returns the documented sentinel for any non-num input. The strict is bool / is String guards for rdbBgsaveInProgress / valkeyVersion stay as-is. Strictly more lenient — payloads that used to throw now succeed with sentinel values.

Tests #

health_fromMap_fuzz_test.dart (property-based, the suite that found the bug), delta_completion_test.dart, tool_test.dart, and the two cross-platform conformance tests against the shared health-conformance.json (11 cases) + json-schema-conformance.json (14 cases) fixtures. Public Flutter sample (chat-iot-flutter, shared miniEmbed) gained unit suites too.

1.0.0-beta.7.2 — 2026-05-20 #

Patch release on top of 1.0.0-beta.7.1. Quality-of-life features plus a major test-coverage sweep. No breaking ABI.

  • DazzleServer.stopAsync() + commandWithTimeout(args, timeoutMs) — suspend / async lifecycle helpers; the latter throws a typed DazzleException.Timeout / DazzleError.timeout. The native command keeps running in the background; the timeout only frees the caller.
  • DazzleErrorCode.COMMAND_TIMEOUT (nativeCode 18) added to the frozen 1.0 ABI.
  • DazzleHealth.fromMap hardened (Flutter) against malformed bridge payloads — strict is checks instead of unchecked casts.
  • 60+ new tests across the SDK: 31 JVM unit tests on Android (BgCheckpointReplyTest, ExecutionPolicyPresetsTest, DazzleConfigDefaultsTest, DazzleErrorCodeTest), 8 flutter test, 6 Jest, 5 xUnit. Pure-logic helpers extracted to reach them.
  • What's new in 1.0.0-beta.7.x highlights section added to every package README.

See top-level CHANGELOG.md for the full prose.

1.0.0-beta.7.1 — 2026-05-20 #

Patch release on top of 1.0.0-beta.7. Four additive improvements; no breaking ABI.

  • DazzleServer.bgSave() / bgRewriteAof() — typed wrappers around Valkey BGSAVE / BGREWRITEAOF, returning a sealed BgCheckpointResult (Started / AlreadyInProgress / NotRunning / Failed). Idempotent against concurrent callers. Same shape on Kotlin and Swift.
  • DazzleServer.healthFlow() (Kotlin) / healthStream() (Swift) — periodic emitter built on health(), ~50 µs per tick. Minimum interval 100 ms; cancellation propagates cleanly.
  • ExecutionPolicy device-class presets — .lowEnd, .midRange, .flagship alongside the existing .balanced / .lean / .parallel. Hand-tuned for the SoC tiers covered in paper §5.9.5.
  • JVM unit tests for HealthParser, RecoveryEngine and DazzleErrorCode (Android only — 25 tests, all green). DazzleServer.health() and the quarantine helper now delegate to pure-logic modules so the tests reach them without booting the native worker. No behaviour change.

See top-level CHANGELOG.md for the full prose.

1.0.0-beta.7 — 2026-05-19 #

DX + safety release. Five engineering improvements: universal split-prefill guard, typed DazzleErrorCode ABI, three new exception variants for failure modes discovered in §5.9.5 (IndexCapacityExceeded, PrefillAborted, IndexNotFound), TokenUsage + Delta.Usage stream variant, HNSW graph persistence MVP (fp32 cosine), graceful FLAT add_batch_direct capacity overflow. No breaking changes. Full details in the top-level CHANGELOG.md.

1.0.0-beta.6 — 2026-05-12 #

Paper-side updates (applies to every binding — the SDK runs the same harness everywhere) #

  • §5.9.5 cross-platform extension. End-to-end RAG reproduction now spans 5 physical mobile SoCs across 2 operating systems: Unisoc T760 / Cortex-A76 (Moto G35 5G, Android 14), QCOM SD662 / Cortex-A73 (Moto G30, Android 11), HiSilicon Kirin 659 / Cortex-A53 (Huawei P20 Lite, Android 9 / EMUI 9), MediaTek Helio G80 / Cortex-A75 (Huawei Y9a / FRL-L23, Android 10 / EMUI 10), and Apple A14 / Firestorm (iPhone 12 Pro, iOS 26). Four Android microarchitecture generations plus Apple Firestorm. Bootstrap CIs (B=10000, paired-qid resampling) star-mark every F1_short ratio at 95% confidence across the spread.
  • §5.9.6 quantization sensitivity sweep. Q4_K_M vs Q5_K_M on the two v8.2 HNSW chips (Moto G35 5G + Huawei Y9a). Headline: the em_contains metric is flat between quant levels (deltas ≤ 0.025 on every cell, inside the per-cell CI half-width). Latency reveals a bandwidth-vs-compute split — the faster A76 chip pays a +50% wall-clock tax for Q5, the slower A75 chip pays ≤+13% because it was already bandwidth-bound on Q4 weights. Disk footprint cost is +6.3% on the 0.5B GGUF and +15% on the 1.5B GGUF.
  • REPRODUCIBILITY §4a + §4b. New recipes: per-device chunked instrumentation for §5.9.5 (any new chip can be added with a small set of am instrument invocations) and GGUF-swap for §5.9.6 (no rebuild needed to A/B Q4 vs Q5 vs future quant variants).
  • PDFs regenerated. research/paper/arxiv-build/paper.pdf and paper_es.pdf rebuilt from the updated paper sources.

Inherited from the underlying native bindings #

  • All Android (sdk/android) and iOS (sdk/ios) fixes that ship with this Flutter plugin: the Kirin-pass-15 n_batch = n_ctx universal fix (now in both the SDK core and the Android experiment JNI), the iOS launch-watchdog dispatch fix, the DazzleServer.vectorIndex initialCapacity parameter, and the G80/EMUI-10 freeze unblock that was specific to the experiment-app JNI path.

1.0.0-beta.5 #

Added — Flutter Web (WebAssembly runtime) #

  • DazzleWeb, DazzleWebHash, DazzleWebVectorIndex — exported from the package's main library. Backed by dazzle.wasm (~236 KB) built from the same C++ source as the native iOS / Android binaries. Same on-device promise extended to the browser: in-process HNSW vector search + hash KV, no remote server.
  • Persistence via the Origin Private File System (OPFS). DazzleWeb.persist() writes a binary snapshot; initialize() restores it on boot. Multi-user isolation via opfsFileName:.
  • Setup contract: add a <script type="module"> tag to your app's web/index.html that imports assets/packages/dazzle_flutter/web/native/dazzle.js and assigns it to globalThis.dazzleModule. See the README "Flutter Web" section for the exact snippet.

Added — Flutter Desktop (Linux / macOS / Windows) #

  • DazzleDesktop, DazzleDesktopHash, DazzleDesktopVectorIndex — same API surface as DazzleWeb, backed by libdazzle_lite via dart:ffi. Compiled from the same C++ source as the WASM build, so behaviour is byte-for-byte identical across web and desktop.
  • Plugin declares ffiPlugin: true for linux, macos, windows — pre-built native libraries ship inside the package so consumers don't need a host C++ toolchain.
  • Persistence to a regular file on disk (default <cwd>/.dazzle/snapshot.bin, override with snapshotPath:).
  • Snapshot binary format identical to Web — a snapshot saved by a Flutter Web app loads byte-for-byte on Flutter Desktop.

Fixed — iOS / Android (LLM stack) #

  • ToolCallParser now accepts arguments as a stringified JSON string (Qwen 0.5B fine-tune / OpenAI tool-call shape) in addition to the JSON-object shape (Gemma / Qwen 1.5B / Llama 3.x). The previous parser silently swallowed tool calls from models that emitted the OpenAI shape.
  • dazzle_llama_new_context() pins n_batch = n_ubatch = n_ctx to prevent the SIGABRT inside llama_decode on prompts longer than the previous hardcoded 512-token batch. Reproduced on iPhone 12 Pro / iOS 26.3 with a 590-token prompt.

Scope (web / desktop) #

  • ✅ Hash KV + Vector index (HNSW) + binary snapshot persistence.
  • ❌ Lists / Sets / SortedSets / Streams / standalone Strings — stay on iOS / Android mobile.
  • ❌ On-device LLM clients (LlamaCppClient, LiteRtLmClient, FoundationModelsClient) — stay on iOS / Android mobile (these would need llama.cpp / LiteRT compiled to WASM, separate project).

1.0.0-beta.4 #

Added #

  • First public pre-release. Embedded in-process database with HNSW vector search and a ChatAgent runtime for on-device LLM agents.
  • Five swappable LLMClient adapters:
    • LlamaCppClient — GGUF inference, Isolate worker + NativeCallable.listener for zero-copy C→Dart token streaming.
    • LiteRtLmClient — Android-only plugin bridge to LiteRT-LM.
    • FoundationModelsClient — iOS 26+ Apple Intelligence bridge.
    • OpenAICompatibleClient — pure Dart + package:http with SSE.
    • AnthropicClient — Claude 3.5/4 family via the Messages API.
  • Hot-path FFI calls for HashKey.getAllDirect, SortedSetKey.rangeByScoreDirect, VectorIndex.searchDirect; method channel reserved for lifecycle only.
  • ChatAgent.VectorRecallWindow performs real on-device retrieval (HNSW_SQ8) and prepends top-k semantically similar older turns to the LastN window each send().

Notes #

  • Same libdazzle.so / Dazzle.xcframework as the native Android / iOS SDKs — zero behaviour drift across platforms.
  • LiteRT-LM and Foundation Models adapters require platform-specific setup; see README.md and samples/.
0
likes
130
points
47
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Dazzle SDK for Flutter. Embedded in-process database with HNSW vector search and a ChatAgent runtime for on-device LLM agents. Links the same libdazzle.so / Dazzle.xcframework the native Android and iOS SDKs ship — zero behaviour drift across platforms. Includes five swappable LLMClient adapters: LlamaCpp (GGUF), LiteRT-LM, FoundationModels (iOS 26+), OpenAI-compatible, and Anthropic.

Repository (GitHub)
View/report issues

Topics

#llm #agent #embedded-database #vector-search #on-device-ai

License

Apache-2.0 (license)

Dependencies

ffi, flutter, flutter_web_plugins, http, plugin_platform_interface, web

More

Packages that depend on dazzle_flutter

Packages that implement dazzle_flutter