Sign inSign up

christianhkb/sbx-kit-pi-gcp-dev:0.1.0-arm64

Manifest digest

sha256:8107d7d23afff3021f6a02be34f3d5794563e4f261220470fa4cdfbfeb9453f2

Last pushed

14 days by christianhkb

Type

Sandbox Kit

Manifest digest

sha256:8107d7d23afff3021f6a02be34f3d5794563e4f261220470fa4cdfbfeb9453f2

yaml
schemaVersion: "3"
displayName: Pi GCP Development Environment
version: 0.1.0
kind: workload
provides:
    - [email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/base-files@14
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/ca-certificates-java@20260311
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/gcc-16-base@16
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/less@668
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/libgcc-s1@16
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/libjpeg8@8
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/libstdc++6@16
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/tzdata@2026
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
    - deb/[email protected]
capabilities:
    - type: com.docker.sandbox/network-policy@1
      config:
        install:
            allow:
                - api.github.com
        runtime:
            allow:
                - aiplatform.googleapis.com
                - api.anthropic.com
                - registry.npmjs.org
                - platform.claude.com
                - api.github.com
                - github.com
    - type: com.docker.sandbox/credential@1
      config:
        apiKey:
            inject:
                - domain: aiplatform.googleapis.com
                  format: Bearer %s
                  header: Authorization
            name: GCP_VERTEX_ACCESS_TOKEN
            proxyManaged: true
        phase: runtime
        service: gcp-vertex
      description: Google Cloud Vertex AI
    - type: com.docker.sandbox/sbx@1
    - type: com.docker.sandbox/credential@1
      optional: true
      config:
        apiKey:
            inject:
                - domain: api.anthropic.com
                  format: '%s'
                  header: x-api-key
            name: ANTHROPIC_API_KEY
            proxyManaged: true
        oauth:
            credentialFile:
                path: ~/.pi/agent/auth.json
                structure:
                    anthropic:
                        access: '{{.AccessToken}}'
                        expires: '{{.ExpiresAt}}'
                        refresh: '{{.RefreshToken}}'
                        type: oauth
            resourceHosts:
                - api.anthropic.com
            sentinels:
                accessToken: sk-ant-oat01-proxy-managed
                refreshToken: sk-ant-ort01-proxy-managed
            tokenEndpoint:
                host: platform.claude.com
                path: /v1/oauth/token
        phase: runtime
        service: anthropic
      description: Anthropic API access (API key or claude.ai OAuth)
    - type: com.docker.sandbox/agent-sessions@1
      config:
        prompt:
            - -p
            - '{{.Prompt}}'
      description: Drive pi non-interactively
    - type: com.docker.sandbox/lifecycle@1
      config:
        files:
            - content: |
                {
                  "providers": {
                    "gcp-oss-maas": {
                      "baseUrl": "https://aiplatform.googleapis.com/v1/projects/${{ kit.args.project }}/locations/${{ kit.args.location }}/endpoints/openapi",
                      "api": "openai-completions",
                      "apiKey": "$GCP_VERTEX_ACCESS_TOKEN",
                      "authHeader": true,
                      "models": [
                        {
                          "id": "qwen/qwen3-next-80b-a3b-thinking-maas",
                          "displayName": "Qwen 3 Next 80B Thinking (Vertex MaaS)"
                        },
                        {
                          "id": "zai-org/glm-5.2-maas",
                          "displayName": "GLM 5.2 (Vertex MaaS)"
                        },
                        {
                          "id": "zai-org/glm-5-maas",
                          "displayName": "GLM 5 (Vertex MaaS)"
                        }
                      ]
                    }
                  }
                }
              mode: "0644"
              overwrite: false
              path: /home/agent/.pi/agent/models.json
        install:
            - command:
                - sh
                - -c
                - if [ -n "${HTTP_PROXY:-}" ]; then npm config set proxy="$HTTP_PROXY" https-proxy="${HTTPS_PROXY:-$HTTP_PROXY}"; fi
              description: Point npm at the sandbox proxy in ~/.npmrc so pi's runtime npm use (`pi install npm:...`, `pi update`, startup package fetches) works in exec contexts that do not inherit the proxy environment variables
              env:
                - HTTP_PROXY
                - HTTPS_PROXY
              user: "1000"
            - command:
                - sh
                - -c
                - |
                  set -e

                  # Signing *machinery* stays machine-wide: it is inert unless something
                  # asks for a signature, and keeping it here means `git commit -S` works
                  # in any repository in the sandbox.
                  git config --system gpg.format ssh
                  # The key command is invoked through /bin/sh rather than executed
                  # directly. Files shipped under a kit's files/home/ tree land mode
                  # 0644 when the kit is installed from its OCI artifact -- per-file
                  # executable bits are not representable in a v2 layer (spec/OCI-v2.md)
                  # -- and git execs this value itself, so a bare path would die with
                  # "cannot exec: Permission denied" before a single one of the script's
                  # own diagnostics could run.
                  git config --system gpg.ssh.defaultKeyCommand '/bin/sh /home/agent/.config/git/ssh-signing-key-command'
                  git config --system gpg.ssh.allowedSignersFile /home/agent/.config/git/allowed_signers

                  # user.signingKey MUST stay unset: git only runs
                  # gpg.ssh.defaultKeyCommand when it is empty. Setting it to any value
                  # (even a placeholder) disables dynamic key resolution entirely.
                  git config --system --unset-all user.signingKey || true

                  # Signing *policy* is scoped, not machine-wide. Setting
                  # commit.gpgSign=true in /etc/gitconfig makes every `git commit` in the
                  # sandbox depend on a live SSH agent — including throwaway repositories
                  # created by test suites that have nothing to do with the user's work.
                  # When the forwarded agent goes away, those all fail too.
                  mkdir -p /etc/git
                  cat > /etc/git/signing-enabled.inc <<'INC'
                  # Included by /etc/gitconfig for repositories with a remote.
                  # See the git-ssh-sign kit.
                  [commit]
                  	gpgSign = true
                  [tag]
                  	gpgSign = true
                  INC
                  chmod 0644 /etc/git/signing-enabled.inc

                  # Clear anything an older version of this kit left machine-wide, so a
                  # re-install converges rather than layering.
                  git config --system --unset-all commit.gpgSign || true
                  git config --system --unset-all tag.gpgSign || true
                  git config --system --unset-all 'includeIf.hasconfig:remote.*.url:**.path' || true

                  # `includeIf "hasconfig:remote.*.url:**"` needs git >= 2.36. Probe for
                  # it rather than parsing a version string: build a throwaway repo with
                  # a remote and see whether the include actually fires. Note that `**`
                  # is only a cross-slash wildcard when it is a whole path component --
                  # `[email protected]:**` does NOT match `[email protected]:org/repo.git`, so
                  # a bare `**` ("has any remote at all") is the pattern to use here.
                  probe=$(mktemp -d)
                  git init -q "$probe"
                  git -C "$probe" remote add origin https://example.invalid/probe.git
                  printf '[commit]\n\tgpgSign = true\n' > "$probe/inc"
                  printf '[includeIf "hasconfig:remote.*.url:**"]\n\tpath = %s/inc\n' "$probe" > "$probe/sys"
                  supported=$(GIT_CONFIG_SYSTEM="$probe/sys" GIT_CONFIG_GLOBAL=/dev/null \
                      git -C "$probe" config --get commit.gpgSign 2>/dev/null || true)
                  rm -rf "$probe"

                  if [ "$supported" = "true" ]; then
                      git config --system 'includeIf.hasconfig:remote.*.url:**.path' /etc/git/signing-enabled.inc
                  else
                      # Old git: an unrecognised includeIf keyword evaluates false, which
                      # would silently disable signing. Fail closed (sign everywhere)
                      # rather than fail open (sign nothing).
                      echo "[git-ssh-sign] git $(git --version | awk '{print $3}') lacks includeIf hasconfig; enabling signing machine-wide" >&2
                      git config --system commit.gpgSign true
                      git config --system tag.gpgSign true
                  fi

                  if [ "$(git config --system --get core.hooksPath || true)" = "/home/agent/.config/git/hooks" ]; then
                      git config --system --unset-all core.hooksPath
                  fi
              description: Configure SSH commit signing, scoped to repositories with a remote
              user: "0"
            - command:
                - sh
                - -c
                - |
                  mkdir -p /home/agent/.ssh
                  chmod 700 /home/agent/.ssh
                  chown agent:agent /home/agent/.ssh
                  curl -s https://api.github.com/meta \
                    | jq -r '.ssh_keys[] | "github.com " + .' \
                    >> /home/agent/.ssh/known_hosts
                  chmod 644 /home/agent/.ssh/known_hosts
                  chown agent:agent /home/agent/.ssh/known_hosts
              description: Fetch and install GitHub host keys from api.github.com/meta
              user: "0"
    - type: com.docker.sandbox/agent-context@1
      config:
        contentFile: /usr/share/sandbox/kit/pi-gcp-dev/context.md
        filename: AGENTS.md
args:
    location:
        default: global
        description: Vertex AI endpoint location
    project:
        required: true
        description: GCP project used for Vertex AI
kits:
    - ref: docker.io/docker/sbx-kit-pi:latest
      digest: sha256:7514ea9f2ce3613ea7e07cddf2aee3d8b598ef052ad68623603b20a332326a09
    - ref: docker.io/christianhkb/sbx-kit-pi-gcp:0.1.0
      digest: sha256:fc0a7a0cd31e24a0cd05dbf959bca8b2a01d77818ac322603afda0b31eddc5ef
      args:
        location: ${{ kit.args.location }}
        project: ${{ kit.args.project }}
    - ref: docker.io/docker/sbx-kit-github-ssh:1.0.0
      digest: sha256:3bca46fa05f2d06631652e1986b8f56bb6454ad0ec1d2ddbf9e3e002d9d2f997
    - ref: docker.io/docker/sbx-kit-git-ssh-sign:1.0.0
      digest: sha256:79c6aaca0f08003913a68539c2105a0c4d7109b740aa2cbcadfa103b80336445