sha256:48ccdf3cb14331db7e217fdc578fb966f893e230e64fedc4cbe0dba6f032a816
Last pushed
4 days by sbx
Type
Sandbox Kit
Manifest digest
sha256:48ccdf3cb14331db7e217fdc578fb966f893e230e64fedc4cbe0dba6f032a816
schemaVersion: "2"
kind: sandbox
name: cursor
version: 1.0.0
displayName: Cursor
description: Cursor Agent, the CLI coding agent from Cursor.
sandbox:
image: docker.io/sbx/cursor-image:latest
entrypoint:
- /home/agent/.local/bin/cursor-agent
command:
default:
- --yolo
interactive:
- --yolo
agentInstructions:
filename: AGENTS.md
permissions:
network:
allow:
- api2.cursor.sh
- api3.cursor.sh
- repo42.cursor.sh
- cursor.com
- '*.cursor.sh'
- downloads.cursor.com
- registry.npmjs.org
- archive.ubuntu.com
- security.ubuntu.com
- ports.ubuntu.com
- download.docker.com
credentials:
- service: cursor
apiKey:
name: CURSOR_API_KEY
inject:
- domain: api2.cursor.sh
header: Authorization
format: Bearer %s
- domain: api3.cursor.sh
header: Authorization
format: Bearer %s
- domain: repo42.cursor.sh
header: Authorization
format: Bearer %s
- domain: cursor.com
header: Authorization
format: Bearer %s
oauth:
tokenEndpoint:
host: api2.cursor.sh
path: /auth/poll
resourceHosts:
- api3.cursor.sh
- repo42.cursor.sh
- cursor.com
sentinels:
accessToken: cursor-oat-proxy-managed
refreshToken: cursor-ort-proxy-managed
skipIfEnv:
- CURSOR_API_KEY
responseFields:
accessToken: accessToken
refreshToken: refreshToken
environment:
variables:
AGENT_CLI_CREDENTIAL_STORE: memory
IS_SANDBOX: "1"
setup:
install:
- command: mkdir -p /home/agent/.cursor && chown agent:agent /home/agent/.cursor
user: "0"
description: Ensure .cursor is owned by agent before setup.files and bind mounts run
- command: |
[ -n "$WORKSPACE_DIR" ] || { echo "WORKSPACE_DIR unset; skipping Cursor workspace pre-trust" >&2; exit 0; }
ws="$WORKSPACE_DIR"
slug=$(printf '%s' "$ws" | sed 's#^/##; s#/#-#g')
dir="/home/agent/.cursor/projects/$slug"
mkdir -p "$dir"
esc=$(printf '%s' "$ws" | sed 's/\\/\\\\/g; s/"/\\"/g')
[ -f "$dir/.workspace-trusted" ] || printf '{"trustedAt":"%s","workspacePath":"%s"}\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "$esc" > "$dir/.workspace-trusted"
user: agent
description: Pre-trust the workspace so cursor-agent skips the interactive Workspace Trust prompt
startup:
- command:
- sh
- -c
- command -v apt-get > /dev/null 2>&1 && (apt-get update -qq -y > /dev/null 2>&1 || true) &
user: root
description: Update apt package cache in background
files:
- path: /home/agent/.cursor/cli-config.json
content: '{"network": {"useHttp1ForAgent": true}}'
onlyIfMissing: true
description: Seed HTTP/1.1+SSE for agent connections so traffic goes through the forward proxy