Sign inSign up

christianhkb/sbx-kit-pi-gcp-dev:0.2.1

Manifest digest

sha256:a64bd9b96a6f51a8ad1c4e527d10c5d05c27e8a941ae5dad4cf340f7756a2f35

Last pushed

21 days by christianhkb

Type

Sandbox Kit

Manifest digest

sha256:a64bd9b96a6f51a8ad1c4e527d10c5d05c27e8a941ae5dad4cf340f7756a2f35

yaml
schemaVersion: "3"
displayName: Pi GCP Development Environment
version: 0.2.1
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:
                - registry.npmjs.org
                - 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 Agent Platform AI
    - type: com.docker.sandbox/git-identity@1
    - type: com.docker.sandbox/ssh-agent@1
      config:
        authenticate:
            - github.com
        phase: runtime
        sign:
            - git
        unrestricted: false
    - 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 (Agent Platform MaaS)",
                          "reasoning": true,
                          "input": ["text"],
                          "contextWindow": 262144,
                          "cost": {"input": 0.15, "output": 1.2, "cacheRead": 0, "cacheWrite": 0}
                        },
                        {
                          "id": "qwen/qwen3-next-80b-a3b-instruct-maas",
                          "displayName": "Qwen 3 Next 80B Instruct (Agent Platform MaaS)",
                          "reasoning": false,
                          "input": ["text"],
                          "contextWindow": 262144,
                          "cost": {"input": 0.15, "output": 1.2, "cacheRead": 0, "cacheWrite": 0}
                        },
                        {
                          "id": "qwen/qwen3-coder-480b-a35b-instruct-maas",
                          "displayName": "Qwen 3 Coder 480B Instruct (Agent Platform MaaS)",
                          "reasoning": false,
                          "input": ["text"],
                          "contextWindow": 258000,
                          "cost": {"input": 0.2, "output": 1.62, "cacheRead": 0.02, "cacheWrite": 0.2}
                        },
                        {
                          "id": "zai-org/glm-5.2-maas",
                          "displayName": "GLM 5.2 (Agent Platform MaaS)",
                          "reasoning": true,
                          "input": ["text"],
                          "contextWindow": 1000000,
                          "cost": {"input": 1.4, "output": 4.4, "cacheRead": 0.14, "cacheWrite": 1.4}
                        },
                        {
                          "id": "zai-org/glm-5-maas",
                          "displayName": "GLM 5 (Agent Platform MaaS)",
                          "reasoning": true,
                          "input": ["text"],
                          "contextWindow": 200000,
                          "cost": {"input": 1, "output": 3.2, "cacheRead": 0.1, "cacheWrite": 1}
                        },
                        {
                          "id": "deepseek-ai/deepseek-v3.2-maas",
                          "displayName": "Deepseek v3.2 (Agent Platform MaaS)",
                          "reasoning": true,
                          "input": ["text"],
                          "contextWindow": 163840,
                          "cost": {"input": 0.56, "output": 1.68, "cacheRead": 0.056, "cacheWrite": 0.56}
                        },
                        {
                          "id": "moonshotai/kimi-k2-thinking-maas",
                          "displayName": "Kimi K2 Thinking (Agent Platform MaaS)",
                          "reasoning": true,
                          "input": ["text"],
                          "contextWindow": 262144,
                          "cost": {"input": 0.6, "output": 2.5, "cacheRead": 0.06, "cacheWrite": 0.6}
                        }
                      ]
                    }
                  }
                }
              mode: "0644"
              overwrite: false
              path: /home/agent/.pi/agent/models.json
        install:
            - command:
                - sh
                - -c
                - |
                  set -eu
                  want="${{ kit.args.version }}"
                  if [ "$want" != latest ] && pi --version 2>/dev/null | grep -qxF "$want"; then
                    echo "Pi $want already installed"
                    exit 0
                  fi
                  npm install -g "@earendil-works/pi-coding-agent@$want"
                  pi --version
              description: Install the requested Pi release
              env:
                - NPM_CONFIG_PREFIX
                - HTTP_PROXY
                - HTTPS_PROXY
                - NODE_EXTRA_CA_CERTS
                - SSL_CERT_FILE
              user: "1000"
            - 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
    version:
        default: 1.1.0
        description: Pi release to install (e.g. 1.1.0, or latest)
        pattern: ^([0-9]+\.[0-9]+\.[0-9]+|latest)$
kits:
    - ref: docker.io/docker/sbx-kit-pi:latest
      digest: sha256:7514ea9f2ce3613ea7e07cddf2aee3d8b598ef052ad68623603b20a332326a09
    - ref: docker.io/christianhkb/sbx-kit-pi-version:0.2.1
      digest: sha256:59ff383b925944de969f45c2fbacae780e8cd0552420296bef865db4e5b722d9
      args:
        version: ${{ kit.args.version }}
    - ref: docker.io/christianhkb/sbx-kit-pi-gcp:0.2.1
      digest: sha256:8a381c318bd6166d68baa8e27c4daeb2a3d1c299f799fa241b373f216b2f70e2
      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