diff --git a/.cursor/Dockerfile b/.cursor/Dockerfile new file mode 100644 index 000000000..0bb20e398 --- /dev/null +++ b/.cursor/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + g++ \ + git \ + jq \ + libayatana-appindicator3-dev \ + libgtk-3-dev \ + librsvg2-dev \ + libssl-dev \ + libstdc++-14-dev \ + libwebkit2gtk-4.1-dev \ + pkg-config \ + python3 \ + sudo \ + unzip \ + xvfb \ + && rm -rf /var/lib/apt/lists/* + +# Hermit and the repo checkout expect a normal non-root user. +RUN useradd -m -s /bin/bash ubuntu \ + && echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +USER ubuntu +WORKDIR /home/ubuntu diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 000000000..4f7b4089a --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,9 @@ +{ + "name": "Berd", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + }, + "user": "ubuntu", + "install": "./scripts/cloud-agent-install.sh" +} diff --git a/scripts/cloud-agent-install.sh b/scripts/cloud-agent-install.sh new file mode 100755 index 000000000..64376aa44 --- /dev/null +++ b/scripts/cloud-agent-install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$repo_root" + +# Pin tool versions to the repo's Hermit environment (just, node, pnpm, rust). +source "$repo_root/bin/activate-hermit" + +export PATH="$repo_root/bin:$PATH" +export CI="${CI:-true}" + +# Skip git hooks in cloud agents; they are not needed for validation workflows. +just _setup-dev-deps +GOOSE_DEV_MODE=required GOOSE_BUILD_PROFILE=debug ./scripts/ensure-local-goose.sh