From 59fb4d2c554df3f4dedcc09b4b1965cf02dfc088 Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 13 Apr 2026 20:19:43 +0000 Subject: [PATCH 1/2] chore: add cursor cloud agent environment --- .cursor/Dockerfile | 29 +++++++++++++++++++++++++++++ .cursor/environment.json | 8 ++++++++ 2 files changed, 37 insertions(+) create mode 100644 .cursor/Dockerfile create mode 100644 .cursor/environment.json diff --git a/.cursor/Dockerfile b/.cursor/Dockerfile new file mode 100644 index 0000000..e9d034d --- /dev/null +++ b/.cursor/Dockerfile @@ -0,0 +1,29 @@ +FROM node:24-bookworm-slim + +ARG PNPM_VERSION=10.32.1 +ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends git sudo \ + && rm -rf /var/lib/apt/lists/* + +RUN id -u ubuntu >/dev/null 2>&1 || useradd -m -s /bin/bash ubuntu \ + && usermod -aG sudo ubuntu \ + && echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/ubuntu \ + && chmod 0440 /etc/sudoers.d/ubuntu + +RUN corepack enable && corepack prepare "pnpm@${PNPM_VERSION}" --activate + +WORKDIR /workspace + +COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ +COPY packages/cddl/package.json packages/cddl/package.json +COPY packages/cddl2ts/package.json packages/cddl2ts/package.json +COPY packages/cddl2java/package.json packages/cddl2java/package.json +COPY packages/cddl2py/package.json packages/cddl2py/package.json + +RUN pnpm install --frozen-lockfile + +RUN chown -R ubuntu:ubuntu /workspace + +USER ubuntu diff --git a/.cursor/environment.json b/.cursor/environment.json new file mode 100644 index 0000000..ed80f03 --- /dev/null +++ b/.cursor/environment.json @@ -0,0 +1,8 @@ +{ + "name": "node-24-pnpm-workspace", + "user": "ubuntu", + "build": { + "dockerfile": "Dockerfile", + "context": ".." + } +} From b2fd9c0653c1337b66d8d74cb7207907c8be01ad Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 13 Apr 2026 20:21:55 +0000 Subject: [PATCH 2/2] docs: add cloud agent testing guidance --- AGENTS.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..061ad3a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,9 @@ +# Cursor Cloud specific instructions + +- This repository defines a repo-level cloud agent environment in `.cursor/environment.json`. +- The corresponding `.cursor/Dockerfile` pins Node 24 and pnpm 10.32.1, then preinstalls the pnpm workspace dependencies into `/workspace`. +- You can run these commands immediately in a fresh cloud agent without a preliminary `pnpm install`: + - `pnpm compile` + - `pnpm run test:typechecks` +- For focused Vitest runs, disable coverage so single-file or narrow test selections are not blocked by the repo's global coverage thresholds: + - `pnpm exec vitest --config vitest.config.ts --run --coverage.enabled=false packages/cddl/tests/parser.test.ts`