Metadata-Version: 2.5
Name: artifact_tool_v2
Version: 2.9.0
Summary: Host-side library for managing files generated in an agent sandbox.
Author: artifact_tool_v2
License-Expression: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# artifact_tool_v2

Host-side library for managing artifacts an agent writes into a sandbox workspace.

The orchestrator creates a workspace keyed by `sandbox_id`, points the agent at that directory, then discovers, filters, and exports the files that appeared there.

## Install

```bash
pip install artifact_tool_v2
```

From this repo:

```bash
pip install -e ".[dev]"
```

## Workspace location

Each sandbox lives at `{root}/{sandbox_id}/`.

Root is resolved in this order:

1. The `root=` argument to `ArtifactManager`
2. The `ARTIFACT_TOOL_V2_ROOT` environment variable
3. `~/.artifact_tool_v2`

## Usage

```python
from artifact_tool_v2 import ArtifactManager

mgr = ArtifactManager("run-123")
workspace = mgr.ensure_workspace()
# Point the agent sandbox at `workspace`. After it finishes:

artifacts = mgr.discover()
pngs = mgr.list(suffix=".png")
mgr.export("/tmp/out", format="dir")
mgr.export("/tmp/out.zip", format="zip")
```
