Storage
Storage Filesystem Adapter Integration
Alpha
DSAR is currently in alpha. APIs, package surfaces, configuration, and documentation may change as the project evolves.
This document describes how to register and use @dsar/storage-filesystem with backend runtime.
Runtime Registration
Config Fields
baseDir(required): local directory used to store artifacts and sidecar metadata.prefix(optional, defaultartifacts): key prefix used by deterministic key builder.retryMaxAttempts(optional, default1): retries for retriable filesystem failures (ETIMEDOUT,EAGAIN, etc.).
Key Strategy Reference
Default deterministic key layout:
<prefix>/<requestId>/<manifestId>/<category>/<redaction>/<thirdParty>/<artifactName>
Fallback behavior:
- missing
requestId=>request-unknown - missing
manifestId=>manifest-unknown - missing
category=>uncategorized - missing name/id =>
artifact.bin
Error and Retry Behavior Matrix
| Category | Retriable | Examples |
|---|---|---|
timeout | yes | operation timeout (ETIMEDOUT) |
network | yes | temporary resource pressure (EAGAIN, EBUSY) |
validation | no | invalid key/path traversal, missing object |
config | no | base directory permission/configuration issues |
unknown | no | unmatched filesystem errors |
Manifest Linkage
Storage operations preserve manifest-linked metadata on artifact references:
requestIdmanifestIdmanifestHashmanifestSignature
Manifest metadata is stored in sidecar JSON files alongside artifacts so metadata remains available across runtime restarts.