-
Notifications
You must be signed in to change notification settings - Fork 1
Description
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> --confirmThis 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
- typescriptOr 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/nodeUse 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.