Interface: SkillWorkspace
Defined in: src/batteries/skills/types.ts:59
Skill-scoped materialization service used by tier-3 scripts.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
fileSystem | readonly | SandboxFileSystem | Filesystem view used by the sandbox policy and script runner. | src/batteries/skills/types.ts:79 |
root | readonly | string | Workspace base used to resolve materializations; individual returned roots remain authoritative. | src/batteries/skills/types.ts:81 |
Methods
dispose()
dispose(root: string): Promise<void>;Defined in: src/batteries/skills/types.ts:77
Remove one materialization, identified by its returned root rather than by SkillRef. A prepare-then-swap refresh can have two live materializations of the same skill at once, and a workspace using randomized paths cannot distinguish them from the ref and could delete the wrong one.
Parameters
| Parameter | Type |
|---|---|
root | string |
Returns
Promise<void>
materialize()
materialize(
skill: SkillRef,
files: AsyncIterable<{
bytes: ReadableStream<Uint8Array<ArrayBufferLike>>;
path: string;
}>,
o?: {
signal?: AbortSignal;
}): Promise<string>;Defined in: src/batteries/skills/types.ts:66
Write files and return the authoritative absolute materialized root. Callers must use the returned root rather than reconstructing ${root}/${id}: ids are external data, two sources may offer the same id, and an implementation may add a version or random path segment (and MUST do so on id collision).
Parameters
| Parameter | Type |
|---|---|
skill | SkillRef |
files | AsyncIterable<{ bytes: ReadableStream<Uint8Array<ArrayBufferLike>>; path: string; }> |
o? | { signal?: AbortSignal; } |
o.signal? | AbortSignal |
Returns
Promise<string>