Skip to content
1 min read · 175 words

@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

InterfaceDescription
FsLikeThe slice of node:fs/promises the workspace uses.
FsScratchWorkspaceOptionsOptions for fsScratchWorkspace.

Type Aliases

Type AliasDescription
FsResolverResolver forms accepted for the fs module.

Functions

FunctionDescription
fsScratchWorkspaceConstruct a ScratchWorkspaceFactory minting per-invocation directories under root.