v2026.6.4
fortemi-react v2026.6.4 release notes.
fortemi-react v2026.6.4
fortemi-react v2026.6.4 takes semantic search fully off the main thread and makes staged corpus loading feel instant. The embedding function — the one piece worker mode couldn't relocate — now runs behind a host-owned worker, and shard bytes can be warmed in the background so the user's opt-in click is purely the index build. Both additions are opt-in and backward compatible.
Highlights
- Off-main-thread query-embedding transport (#180): the semantic capability can now host its embed function behind a `Worker`/`MessagePort`, so model load and per-query inference never touch the main thread. With worker mode (#146) the DB + HNSW query were already off-thread; this closes the loop — semantic search is off-thread end-to-end. `createWorkerEmbedFunction(port, options?)` + `handleEmbedRequests(port, embed)` implement the message protocol (id-matched requests, per-request timeout, dispose cleanup), and `registerSemanticCapabilityWorker(manager, port, options?)` wires it into the capability lifecycle. The React `useEmbeddingWorker(transport, options?)` hook is the thin ergonomic wrapper. The host keeps full control of the model and its params, so build-time corpus embeddings stay an exact match. The existing main-thread `registerSemanticCapability` path is unchanged.
- `prefetchShard` / shard warm API (#181): a first-class way to pre-stage shard bytes without building the index, so the avoidable download moves to background idle and the click is just the HNSW build. `prefetchShard(url, options?)` warms bytes from a bundled asset (`options.bytes`), the Cache Storage API, or `fetch(url)`, with concurrent de-duplication and optional whole-archive SHA-256 verification against a build-time-known hash. `fromPrefetched(url)` hands the warm bytes to `importShard` unchanged. Server-free / local-first by design: shards are static, build-time-generated assets. React adds `useShardPrefetch()` and `useImportShard().importFromUrl(...)`, which skips the download when warm.
Published Packages
- `@fortemi/[email protected]`
- `@fortemi/[email protected]`
- `@fortemi/[email protected]`
Compatibility
Existing `2026.6.3` consumers upgrade without source changes. Both features are additive and opt-in:
- The off-main-thread transport is a sibling registration (`registerSemanticCapabilityWorker`); the main-thread `registerSemanticCapability(manager, embedFn)` path and the `EmbedFunction` contract are unchanged.
- `prefetchShard` is new surface; `importShard`'s signature is unchanged (it reads warm bytes via `fromPrefetched(url)`, which returns a `Uint8Array`). Integrity is two-layer — whole-archive `expectedSha256` at warm time plus the per-file manifest checksums `importShard` already validates at import time, both via `sha256Hex`.
No archive schema migration is included in this release.
Verification
Run the repository checks on the release-prep commit and wait for CI to pass:
pnpm typecheck
pnpm lint
pnpm test:core
pnpm test:e2e
pnpm build
Cut the release tag with the project release key only:
tools/release/cut-tag.sh 2026.6.4
git push origin main --tags
git push github main --tags