Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: improve cursor background agent configuration (#7641)

Marc Klingen63d164ad5218
diff --git a/.cursor/Dockerfile b/.cursor/Dockerfile
index ab17a75c21..bd22af8117 100644
--- a/.cursor/Dockerfile
+++ b/.cursor/Dockerfile
@@ -12,8 +12,15 @@ RUN apt-get update && \
postgresql-client \
redis-tools \
less nano \
+ sudo \
&& rm -rf /var/lib/apt/lists/*
+# ---------- Docker -----------------------------------------------------------
+# Install Docker for background agents that need container capabilities
+RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
+ sh get-docker.sh && \
+ rm get-docker.sh
+
# ---------- pnpm -------------------------------------------------------------
# Langfuse monorepo relies on pnpm 9.5.0 (see CONTRIBUTING.md)
ENV PNPM_HOME="/pnpm"
@@ -29,11 +36,11 @@ RUN wget -qO- "https://github.com/golang-migrate/migrate/releases/download/v${MI
chmod +x /usr/local/bin/migrate
# ---------- Non-root user -----------------------------------------------------
-# Use root for convenience in development containers
-WORKDIR /workspace
-
-# Create non-root user
-RUN useradd -ms /bin/bash ubuntu
+# Create non-root user with sudo privileges and docker group access
+RUN useradd -ms /bin/bash ubuntu && \
+ usermod -aG sudo ubuntu && \
+ usermod -aG docker ubuntu && \
+ echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Pre-create pnpm store and set correct ownership to avoid first-run cost & permission issues
RUN pnpm store path > /dev/null && \
diff --git a/.cursor/environment.json b/.cursor/environment.json
index 3e08b61fa8..4422682841 100644
--- a/.cursor/environment.json
+++ b/.cursor/environment.json
@@ -4,5 +4,11 @@
"context": ".",
"dockerfile": "Dockerfile"
},
- "start": "pnpm dx-f"
+ "start": "sudo service docker start",
+ "terminals": [
+ {
+ "name": "dev server",
+ "command": "pnpm run dx-f"
+ }
+ ]
}
diff --git a/.cursor/rules/general-info.mdc b/.cursor/rules/general-info.mdc
index 5cc978e808..985d58151f 100644
--- a/.cursor/rules/general-info.mdc
+++ b/.cursor/rules/general-info.mdc
@@ -5,4 +5,5 @@ alwaysApply: true
---
# General rules
-- Linting in this repo only works if the development server is running
\ No newline at end of file
+- Linting in this repo only works if the development server is running
+- Always run the full mono-repo via `pnpm run dx` (use `pnpm dx-f` when you run this in a background agent). Thereby the database will also be seeded.
\ No newline at end of file