dsh-mnemon-source-memory-spaces 0.5.21 → 0.5.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@ Memory Spaces owns its Provider contracts and private child-Fiber host. Provider
4
4
 
5
5
  The Source owns its storage registry, scoped native command transport, recall policy, routing, receipts and management operations. It imports **no Provider implementation** and defines no extra Context service. Each mount defaults to a separate data directory; set `dataDir` explicitly to select an existing authority.
6
6
 
7
- A **memory space** (中文:**记忆空间**) is one named Provider-backed scope containing individual memories. Use the canonical `MemorySpace`, `MemorySpaceView`, `MemorySpaceCatalog`, and `CreateMemorySpaceRequest` types from `./contracts`; `MemoryBody*` exports remain deprecated aliases for existing consumers. The Provider SDK exposes `MemorySpace` and `ProviderSpaceStatus` while retaining its old type aliases. Provider factories can use `context.memorySpaces ?? context.memoryBodies` to support both new and existing Source hosts. Published wire fields, registry filenames, and stored user names remain unchanged.
7
+ A **memory space** (中文:**记忆空间**) is one named Provider-backed scope containing individual memories. Use the canonical `MemorySpace`, `MemorySpaceView`, `MemorySpaceCatalog`, and `CreateMemorySpaceRequest` types from `./contracts`; `MemoryBody*` exports remain deprecated aliases for existing consumers. The Provider SDK exposes `MemorySpace` and `ProviderSpaceStatus` while retaining its old type aliases. Provider factories can use `context.memorySpaces ?? context.memoryBodies` to support both new and existing Source hosts. Published wire fields, registry filenames, and stored user names remain unchanged. `./contracts` also exports the Mnemon Native Provider's id, `NATIVE_PROVIDER_ID`, with `isNativeProvider()`, and the limits on a space's name and routing description, `MEMORY_SPACE_NAME_MAX_LENGTH` and `MEMORY_SPACE_DESCRIPTION_MAX_LENGTH`.
8
8
 
9
9
  Install the chosen Provider packages and configure them explicitly on the Source entry:
10
10
 
@@ -23,13 +23,19 @@ Host archive workflows can read `body-directory` with `{ writeScope: { viewId, g
23
23
 
24
24
  Run `pnpm install && pnpm verify` in this directory. Its own tests mount real Cordis Fibers and exercise Source isolation, scoped management, View actions/routes, persistence and failed-child cleanup. Provider authors use `mountMemorySpaceProvider(module, { instanceId, config })` from the public `/testing` entry to test actual child registration and obtain frozen metadata plus `createAdapter`/`dispose`. `createMemorySpaceProviderFixture` supplies scoped authority and validated connection data for driver tests. Dispose the mounted fixture to release its adapters and Fiber. Neither fixture exposes the private Host, Registry or Snapshot; test the full Source separately for View integration.
25
25
 
26
+ ## Storage files
27
+
28
+ The `./contracts` entry names the Native layout under a storage root (`data/<space id>/mnemon.db`, the `data/.dsh-memory-bodies.json` registry, Mnemon's `active` store selection and `state/memory-providers.json`) and exports `parseMemorySpaceRegistry` and the counts a storage inventory shows. The Node-only `./space-identity` entry compares two copies of a Mnemon store by what they hold rather than by their bytes, and merges them. It reads stores with `node:sqlite`, which Node has from 22.13; on an older Node it compares bytes. The `dsh-mnemon` Starter's backup and sync use both, and its storage inventory uses the counts, instead of keeping copies.
29
+
26
30
  ## Configuration ownership
27
31
 
28
32
  The public package entry exports `resolveEmbedding`, `resolvePersistenceStrategy`, and `resolveRecallQuality`. They validate and normalize this Source's settings without I/O or mounting a Fiber. The Starter uses the same rules and recall defaults; it still owns legacy setting keys, storage scope, and its Host timeout policy. Independent Source configuration retains its own instance defaults and timeout limits.
29
33
 
34
+ The `./contracts` entry exports `MEMORY_PLACEMENT_CAPABILITIES`, the capabilities a persistence strategy's rules may require of a Provider, from which the `MemoryPlacementCapability` type is derived. `resolvePersistenceStrategy` accepts exactly these, and the Starter's settings schema takes the same list.
35
+
30
36
  ## Source-owned Client
31
37
 
32
- The optional `./client` entry owns the Source's pages and `presentation/` resources. It uses `dsh-mnemon/client` for the shared frame and scoped management, without receiving raw RPC transport, credentials, a Host Context or an LLM grant. DSH mounts the same pages in the default Starter; cross-Source Agent workflows remain optional Host assistance.
38
+ The optional `./client` entry owns the Source's pages, its settings on its page under Plugins (the Providers and the embedding Mnemon Native reads) and `presentation/` resources. It uses `dsh-mnemon/client` for the shared frame, scoped management and the configuration and Host operations dsh-mnemon lends its settings, without receiving raw RPC transport, credentials, a Host Context or an LLM grant. DSH mounts the same pages in the default Starter; cross-Source Agent workflows remain optional Host assistance. dsh-mnemon 0.5.31 and earlier draw these settings themselves, so with them the client registers none.
33
39
 
34
40
  `pnpm verify` checks Host behavior, real Source-backed page interactions, and Host/browser artifacts. Client tests consume the installed Core's public testing entry.
35
41