KeepLost/harniverse--packages-client-store ↗★ 1

@deepseek-ai/dsh-client-store

React-free observable and snapshot-store contracts with the shared Zustand/Immer engine 适合需要框架中立状态管理的客户端开发者,支持会话级实例。

Package
@deepseek-ai/dsh-client-store
Compatibility
Unverified
Harness peer range
workspace:^
Cordis peer range
workspace:^
Version
0.1.0-rc.5
License
BSD-3-Clause
Last updated
Sep 25, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

@deepseek-ai/dsh-client-store

English | 中文

React-free observable and snapshot-store primitives shared by Client controllers and renderer adapters. The package owns the framework-neutral store contracts (StoreSpec/StoreHandle/BakedActions, plus StorePersistence for validated projections) and the engine behind them: createSnapshotStore (zustand vanilla + subscribeWithSelector + Immer produce updates + dev freeze) with synchronous or animation-frame-batched publication, shallowEqual, and defineStore, which bakes an init/persist/actions literal into a handle whose create(scopeKey?) yields per-session or root-scope instances with draft-stripped actions and clearPersisted cleanup. Optional persist accepts either a whole-state key or a StorePersistence with select/restore. Engine products are bare observables — getSnapshot/subscribe/update/set, no selector hook; hook synthesis stays in web-react, which binds useStore from these sources at the binding site. ui-slots re-exports the slot-facing contract types; the runtime package re-exports the engine values for existing importers.

Model Experience

None, as this package provides browser-side state primitives and registers nothing model-facing.

KV Cache effect

None; the stores neither assemble nor send model requests.

Known Limitations and Deferred Work

  • Persistence is browser-local — persisted stores use JSON in localStorage; non-browser runtimes disable persistence, and the package provides no cross-device synchronization.
  • The persist key is the storage identity — multiple live instances created under the same resolved key share (and cross-pollute) one localStorage entry; instance uniqueness per key is the caller's responsibility (the framework caches one instance per handle × scope key).