@nhtio/adk/batteries/media/engines/fs_workspace
A @nhtio/adk/batteries/media/contracts!ScratchWorkspace implementation backed by the local filesystem via node:fs/promises.
Remarks
The bundled filesystem workspace. node:fs/promises is acquired through an async resolver (default: a lazy dynamic import) so this module carries no static node:* import and the builtin loads only when a workspace is actually minted.
The factory requires an explicit root directory — there is no os.tmpdir() silent default. Each minted workspace is a fresh unique subdirectory of root, removed on dispose(). Any BYO implementation whose paths the paired BinaryExecutor can open satisfies the same contract (tmpfs mounts, container volumes, sandbox dirs…).
Interfaces
| Interface | Description |
|---|---|
| FsLike | The slice of node:fs/promises the workspace uses. |
| FsScratchWorkspaceOptions | Options for fsScratchWorkspace. |
Type Aliases
| Type Alias | Description |
|---|---|
| FsResolver | Resolver forms accepted for the fs module. |
Functions
| Function | Description |
|---|---|
| fsScratchWorkspace | Construct a ScratchWorkspaceFactory minting per-invocation directories under root. |