Problem
The declarative snapshot build file (agentuity-snapshot.yaml) only supports apt packages in the dependencies field. There's no way to install npm/bun packages declaratively.
This means any snapshot that needs npm packages (e.g., opencode-ai, typescript, etc.) must be built manually:
agentuity cloud sandbox create --runtime agentuity:latest --memory 4Gi --network
agentuity cloud sandbox exec <id> -- bash -c 'bun install -g opencode-ai'
agentuity cloud sandbox snapshot create <id> --name my-snapshot --public
agentuity cloud sandbox delete <id> --confirm
This is not reproducible from the YAML alone, can't be version-controlled effectively, and requires a separate build script.
Proposed Solution
Support npm/bun packages in the dependencies field, or add a new field like packages or npm:
version: 1
runtime: agentuity:latest
name: agentuity-coder
dependencies:
- curl # apt package (existing behavior)
packages: # npm/bun packages (new)
- opencode-ai
- typescript
Or alternatively, support a commands / run field for arbitrary setup:
run:
- bun install -g opencode-ai
- ln -sf /usr/local/bin/bun /home/agentuity/.bun/bin/node
Use Case
Building the agentuity-coder snapshot for Agentuity Coder IDE. We need both the Agentuity CLI (from agentuity:latest runtime) and OpenCode (opencode-ai npm package). Currently requires a manual build script because the declarative system can't install npm packages.
Current Workaround
A shell script (scripts/build-coder-snapshot.sh) that automates the manual sandbox create → exec → snapshot → delete workflow.
Problem
The declarative snapshot build file (
agentuity-snapshot.yaml) only supports apt packages in thedependenciesfield. There's no way to install npm/bun packages declaratively.This means any snapshot that needs npm packages (e.g.,
opencode-ai,typescript, etc.) must be built manually:This is not reproducible from the YAML alone, can't be version-controlled effectively, and requires a separate build script.
Proposed Solution
Support npm/bun packages in the
dependenciesfield, or add a new field likepackagesornpm:Or alternatively, support a
commands/runfield for arbitrary setup:Use Case
Building the
agentuity-codersnapshot for Agentuity Coder IDE. We need both the Agentuity CLI (fromagentuity:latestruntime) and OpenCode (opencode-ainpm package). Currently requires a manual build script because the declarative system can't install npm packages.Current Workaround
A shell script (
scripts/build-coder-snapshot.sh) that automates the manual sandbox create → exec → snapshot → delete workflow.