diff --git a/.scion/templates/pi-generic/harness-configs/generic/config.yaml b/.scion/templates/pi-generic/harness-configs/generic/config.yaml new file mode 100644 index 000000000..8c52d2b5b --- /dev/null +++ b/.scion/templates/pi-generic/harness-configs/generic/config.yaml @@ -0,0 +1,20 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +harness: generic +image: scion-pi:latest +user: scion +command_args: + - pi + - --print diff --git a/.scion/templates/pi-generic/scion-agent.yaml b/.scion/templates/pi-generic/scion-agent.yaml new file mode 100644 index 000000000..730c68364 --- /dev/null +++ b/.scion/templates/pi-generic/scion-agent.yaml @@ -0,0 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +schema_version: "1" +description: "Pi agent via generic harness (pass-through validation)" +default_harness_config: generic diff --git a/image-build/cloudbuild-harnesses.yaml b/image-build/cloudbuild-harnesses.yaml index a9f8d80a1..aeb802518 100644 --- a/image-build/cloudbuild-harnesses.yaml +++ b/image-build/cloudbuild-harnesses.yaml @@ -121,6 +121,29 @@ steps: env: - 'DOCKER_CLI_EXPERIMENTAL=enabled' + # Build Pi Harness Image + - name: 'gcr.io/cloud-builders/docker' + id: 'build-scion-pi' + dir: 'image-build/pi' + args: + - 'buildx' + - 'build' + - '--platform' + - 'linux/amd64,linux/arm64' + - '--build-arg' + - 'BASE_IMAGE=$_REGISTRY/scion-base:latest' + - '-t' + - '$_REGISTRY/scion-pi:$_SHORT_SHA' + - '-t' + - '$_REGISTRY/scion-pi:latest' + - '-f' + - 'Dockerfile' + - '--pull' + - '--push' + - '.' + env: + - 'DOCKER_CLI_EXPERIMENTAL=enabled' + substitutions: _REGISTRY: 'us-central1-docker.pkg.dev/${PROJECT_ID}/public-docker' options: diff --git a/image-build/pi/Dockerfile b/image-build/pi/Dockerfile new file mode 100644 index 000000000..1dc402843 --- /dev/null +++ b/image-build/pi/Dockerfile @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ARG BASE_IMAGE +FROM ${BASE_IMAGE} + +RUN mkdir -p /home/scion/.pi/agent && \ + chown -R scion:scion /home/scion/.pi + +# Install pi coding agent +RUN npm install -g @mariozechner/pi-coding-agent \ + && npm cache clean --force + +# Install gccli, gdcli, gmcli globally (BUN_INSTALL=/usr/local puts binaries in /usr/local/bin) +RUN BUN_INSTALL=/usr/local bun add -g @mariozechner/gccli @mariozechner/gdcli @mariozechner/gmcli + +# Clone pi-skills and pre-install JS dependencies for skills that require it +RUN git clone --depth=1 https://github.com/badlogic/pi-skills /home/scion/.pi/agent/skills/pi-skills && \ + cd /home/scion/.pi/agent/skills/pi-skills/brave-search && bun install && \ + cd /home/scion/.pi/agent/skills/pi-skills/browser-tools && bun install && \ + cd /home/scion/.pi/agent/skills/pi-skills/youtube-transcript && bun install && \ + chown -R scion:scion /home/scion/.pi + +CMD ["pi"] diff --git a/image-build/scripts/build-images.sh b/image-build/scripts/build-images.sh index 8f49b6eaa..6c5ac4baa 100755 --- a/image-build/scripts/build-images.sh +++ b/image-build/scripts/build-images.sh @@ -35,7 +35,7 @@ PUSH="" PLATFORM="" TAG="latest" -HARNESSES=(claude gemini opencode codex) +HARNESSES=(claude gemini opencode codex pi) usage() { cat <