Expand description
Workflow storage — structured, writable working data for a run.
Storage is a first-class workflow concept alongside vars (scalar state)
and resources (read-only reference files). It gives a workflow a place to
accumulate files that its steps produce and consume — the canonical example
is a book-writing workflow that maintains character sheets, world-building
notes, and a consistency bible across many steps.
§Path resolution
Storage paths resolve relative to <cwd>/.zig/ — where <cwd> is the
directory the user invoked zig run from. Absolute paths pass through
unchanged. This differs from resources, which resolve relative to the
.zwf file: resources ship with the workflow, storage belongs to the
run.
§Backends
The StorageBackend trait abstracts over the underlying store. The only
implementation today is FilesystemBackend; future sqlite/remote
backends slot in behind the same trait without workflow-format changes.
Structs§
- Filesystem
Backend - Filesystem-backed storage rooted at
<cwd>/.zig/. - Storage
Entry - A single entry inside a folder-typed storage item, surfaced to the agent so it can see what previous steps wrote.
- Storage
Item - A single declared storage item bound to the backend that services it.
- Storage
Listing - The current contents of a storage item at the moment a step starts.
- Storage
Manager - Owns the set of declared storage items for a single workflow run and
routes operations to the appropriate backend. Built once in
[
crate::run::execute] and threaded through to every step.
Traits§
- Storage
Backend - Abstraction over a storage backend. Implementations decide how to
materialise a
StorageSpecand how to enumerate its contents.
Functions§
- resolve_
against - Resolve a raw storage path against
<cwd>/.zig/for callers that don’t have a fullStorageManager— used by tests and by code that wants to know the absolute path without going through the backend.