Interface: OpfsSpoolStoreOptions
Constructor options for OpfsSpoolStore.
Properties
| Property | Type | Default value | Description |
|---|---|---|---|
directory? | () => Promise<OpfsDirectoryHandle> | undefined | Optional thunk that resolves the OpfsDirectoryHandle used as the store root. Remarks When omitted, the store resolves the root via navigator.storage.getDirectory() on its first filesystem call. Override for tests (to point at a per-suite subdirectory) or to scope the store to a nested directory inside OPFS. The thunk is invoked at most once per store; the returned handle is memoised. |
keyPrefix? | string | "" | Optional filename prefix prepended to every callId. Remarks Prefix is a filename prefix, not a subdirectory — keyPrefix: 'agent-runs/' produces a file literally named agent-runs/<callId> at the root, not a nested directory. (OPFS filenames may not contain /, so use a non-/ separator like - if you want a flat namespace.) This mirrors the keyPrefix semantics in the flydrive and in-memory batteries. |
streamThresholdBytes? | number | 10 * 1024 * 1024 (10 MiB) | Default streamThresholdBytes for readers produced by write() and read(). Individual calls may override via their own opts argument. |