---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/skills/interfaces/SkillWorkspace.md
description: Skill-scoped materialization service used by tier-3 scripts.
---

# Interface: SkillWorkspace

Defined in: [src/batteries/skills/types.ts:59](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/types.ts#L59)

Skill-scoped materialization service used by tier-3 scripts.

## Properties

| Property                                      | Modifier   | Type                                                                 | Description                                                                                      | Defined in                                                                                                                |
| --------------------------------------------- | ---------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
|  `fileSystem` | `readonly` | [`SandboxFileSystem`](../../sandbox/interfaces/SandboxFileSystem.md) | Filesystem view used by the sandbox policy and script runner.                                    | [src/batteries/skills/types.ts:79](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/types.ts#L79) |
|  `root`             | `readonly` | `string`                                                             | Workspace base used to resolve materializations; individual returned roots remain authoritative. | [src/batteries/skills/types.ts:81](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/types.ts#L81) |

## Methods

### dispose()

```ts
dispose(root: string): Promise<void>;
```

Defined in: [src/batteries/skills/types.ts:77](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/types.ts#L77)

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()

```ts
materialize(
   skill: SkillRef,
   files: AsyncIterable<{
  bytes: ReadableStream<Uint8Array<ArrayBufferLike>>;
  path: string;
}>,
   o?: {
  signal?: AbortSignal;
}): Promise<string>;
```

Defined in: [src/batteries/skills/types.ts:66](https://github.com/NHTIO/ADK/blob/v1.20260911.0/src/src/batteries/skills/types.ts#L66)

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`](../type-aliases/SkillRef.md)                                                                  |
| `files`     | `AsyncIterable`<{ `bytes`: `ReadableStream`<`Uint8Array`<`ArrayBufferLike`>>; `path`: `string`; }> |
| `o?`        | { `signal?`: `AbortSignal`; }                                                                            |
| `o.signal?` | `AbortSignal`                                                                                              |

#### Returns

`Promise`<`string`>
