Sign inSign up

sbx/cursor-mixin:latest

Multi-platform
Manifest digest

sha256:b7bc4780f589cc19e3f8515a292f0d2c80b8f3454b817e6e2eba5643d2047dc7

Last pushed

about 12 hours by dhibot

Type

Sandbox Kit

Manifest digest

sha256:b7bc4780f589cc19e3f8515a292f0d2c80b8f3454b817e6e2eba5643d2047dc7

yaml
schemaVersion: "3"
displayName: Cursor (mixin)
author: Docker, Inc. https://docker.com
description: Cursor CLI overlay for a shell workload, with native ACP, credentials, and workspace setup.
sourceUrl: https://cursor.com
version: 2026.11.17-f532c45
licenses:
    - LicenseRef-Proprietary
kind: mixin
provides:
    - [email protected]
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        runtime:
            allow:
                - api2.cursor.sh:443
                - api3.cursor.sh:443
                - repo42.cursor.sh:443
                - cursor.com:443
                - downloads.cursor.com:443
    - type: com.docker.sandbox/credential@1
      optional: true
      config:
        apiKey:
            inject:
                - domain: api2.cursor.sh
                  format: Bearer %s
                  header: Authorization
                - domain: api3.cursor.sh
                  format: Bearer %s
                  header: Authorization
                - domain: repo42.cursor.sh
                  format: Bearer %s
                  header: Authorization
                - domain: cursor.com
                  format: Bearer %s
                  header: Authorization
            name: CURSOR_API_KEY
        oauth:
            resourceHosts:
                - api2.cursor.sh
                - api3.cursor.sh
                - repo42.cursor.sh
                - cursor.com
            responseFields:
                accessToken: accessToken
                refreshToken: refreshToken
            sentinels:
                accessToken: cursor-oat-proxy-managed
                refreshToken: cursor-ort-proxy-managed
            tokenEndpoint:
                host: api2.cursor.sh
                path: /auth/poll
        phase: runtime
        service: cursor
      description: Cursor API access (API key or Cursor OAuth)
    - type: com.docker.sandbox/lifecycle@1
      config:
        files:
            - content: '{"network": {"useHttp1ForAgent": true}}'
              description: Seed HTTP/1.1+SSE for agent connections
              overwrite: false
              path: /home/agent/.cursor/cli-config.json
        install:
            - command: mkdir -p /home/agent/.cursor && chown agent:agent /home/agent/.cursor
              description: Ensure .cursor is owned by agent before seeds run
              user: "0"
            - command: |
                [ -n "$WORKSPACE_DIR" ] || { echo "WORKSPACE_DIR unset; skipping Cursor workspace pre-trust" >&2; exit 0; }
                ws="$WORKSPACE_DIR"
                slug=$(printf '%s' "$ws" | LC_ALL=C tr -c 'A-Za-z0-9' '-' | tr -s '-' | sed 's/^-//; s/-$//')
                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"
              description: Pre-trust the workspace for the interactive TUI
              env:
                - WORKSPACE_DIR
              user: agent
    - type: com.docker.sandbox/agent-skills@1
      optional: true
      config:
        path: /home/agent/.cursor/skills
    - type: com.docker.sandbox/agent-context@1
      optional: true
      config:
        content: |
            # Cursor

            This sandbox runs the Cursor agent CLI. Credentials are proxy-managed: an
            API key or Cursor OAuth arrives as sentinels, and the workspace is
            pre-trusted so the TUI skips its trust prompt.
        directory: /home/agent/workspace
        filename: AGENTS.md
    - type: com.docker.sandbox/agent-context@2
      optional: true
      config:
        content: |
            # Cursor

            This sandbox runs the Cursor agent CLI. Credentials are proxy-managed: an
            API key or Cursor OAuth arrives as sentinels, and the workspace is
            pre-trusted so the TUI skips its trust prompt.
        directory: /home/agent/workspace
        filename: AGENTS.md
    - type: com.docker.sandbox/acp@1
      optional: true
      config:
        agent: cursor
        command:
            - cursor-acp
            - cursor-agent
            - --force
            - acp
args:
    version:
        required: true
        description: Cursor release the image carries
        pattern: ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}-[0-9a-f]{7,40}$
        buildArg: VERSION