Add Cloud Agent development environment - #2114
Open
Soph wants to merge 6 commits into
Open
Conversation
Configure a Cloud Agent development environment via .cursor/environment.json and an idempotent .cursor/install.sh that: - upgrades git to >= 2.45 when needed (reftable support used by the test suite) - installs mise and the pinned toolchain (Go 1.26.6, golangci-lint, gotestsum, shellcheck, tmux, roger-roger E2E helpers) - activates mise in interactive shells, downloads Go modules, and builds the CLI No long-running services are needed, so start/terminals are omitted. Co-authored-by: Stefan Haubold <Soph@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Cursor Cloud Agent development environment setup for the Entire CLI, so automated/dev agent sessions start with the expected toolchain installed and the CLI prebuilt.
Changes:
- Introduces a Cursor environment definition that runs a repo-local install script on environment creation.
- Adds an install script to (optionally) upgrade git for reftable support, install/activate
mise, install pinned tools, download Go modules, and buildentire.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .cursor/install.sh | Idempotent environment bootstrap: git version gating, mise/toolchain install, module download, and CLI build. |
| .cursor/environment.json | Cursor environment definition that invokes the install script. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This repo dogfoods Entire: it commits agent hook configs (.cursor/hooks.json, etc.) and Entire git hooks that all invoke the bare 'entire' command and no-op when it is not on PATH. The environment now makes those hooks actually fire. - Add .cursor/wire-entire-hooks.sh: symlinks the built binary onto PATH (/usr/local/bin, falling back to ~/.local/bin) and installs Entire's git hooks via 'entire configure --force', restoring .entire/settings.json byte-for-byte so the committed file is never churned. Idempotent, best-effort. - install.sh runs it after building. - Add .cursor/start.sh (wired as environment.json 'start') to re-run it per boot, because Cursor regenerates the git hooksPath on each boot.
Re-applies the environment.json 'start' entry and the install.sh call to .cursor/wire-entire-hooks.sh (the accompanying commit added the scripts).
Entire installs its own git hooks on the first turn-start hook (strategy.EnsureSetup reinstalls them when absent, reached via the committed agent hooks such as Cursor's beforeSubmitPrompt). So the environment only needs the built 'entire' on PATH for the committed hooks to fire; wiring git hooks from the environment was redundant. - install.sh: symlink the built binary onto PATH (/usr/local/bin, fallback ~/.local/bin) instead of calling a wiring script. - Remove .cursor/wire-entire-hooks.sh and .cursor/start.sh; drop 'start' from environment.json (no per-boot reconciliation needed).
Checkpoint sync pushes entire/checkpoints refs to the dedicated remote entireio/cli-checkpoints, but the Cloud Agent's generated GitHub token is scoped to entireio/cli, so the pre-push checkpoint push is denied (403, 'denied to cursor[bot]'). Add entireio/cli-checkpoints to repositoryDependencies so the generated token's scope includes it (the Cursor GitHub app is installed org-wide on entireio). Entire-Checkpoint: 01M0TQV7RBDJ3G82MGNRNWSQ2R
Address PR review feedback: - Replace the brittle git version-string parse with a real feature probe (git init --ref-format=reftable in a temp dir), matching how the repo's own tests detect reftable support. Handles backported/nonstandard version strings and a missing git binary (probe returns unsupported, triggering install). - Use 'apt-get install -y git' instead of '--only-upgrade git' so it also installs git on images where it is absent. Entire-Checkpoint: 01M0TR7PJG8HDKE14Y2Z1HXGYC
Soph
marked this pull request as ready for review
August 24, 2026 20:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://entire.io/gh/entireio/cli/trails/1134
Summary
Sets up a Cloud Agent development environment for the Entire CLI so future agents boot with the pinned toolchain ready, the CLI built,
entireon PATH so this repo's committed hooks fire (Entire dogfoods itself here), and the generated token scoped to reach the checkpoint sync repo. Delivered as repository-managed config (versioned with code, follows branches/PRs)..cursor/environment.json→install: "bash .cursor/install.sh",repositoryDependencies: ["github.com/entireio/cli-checkpoints"]..cursor/install.sh(idempotent): upgradesgitto>= 2.45from thegit-corePPA when needed (the test suite creates a reftable repo withgit init --ref-format=reftable; Ubuntu 24.04 ships 2.43); installsmise+ the pinned toolchain frommise.toml(Go 1.26.6,golangci-lint,gotestsum,shellcheck,tmux,roger-rogerE2E helpers); activatesmisein interactive shells; runsgo mod downloadandgo build -o entire ./cmd/entire/; then symlinks the built binary onto PATH (/usr/local/bin/entire, falling back to~/.local/bin).No long-running services are needed, so
start/terminalsare omitted.Why PATH is all the environment needs for hooks
This repo commits agent hook configs (
.cursor/hooks.json, …) that invoke the bareentirecommand and silently no-op when it isn't on PATH. Putting the built binary on the standard system PATH is enough: on the first turn a Cursor agent takes,strategy.EnsureSetup(run at every turn-start) reinstalls Entire's git hooks when absent — so the environment does not install git hooks itself. Verified end-to-end: withentireon PATH, a real commit made during a captured session picks up anEntire-Checkpointtrailer automatically.Why
repositoryDependenciesEntire syncs checkpoint refs to the dedicated remote
entireio/cli-checkpoints. The Cloud Agent's generated token (cursor[bot]) is scoped toentireio/cli, so the pre-push checkpoint push is denied (remote: Permission to entireio/cli-checkpoints.git denied to cursor[bot]/ HTTP 403). Listing the checkpoint repo underrepositoryDependencieswidens the generated token's scope to include it (the Cursor GitHub app is installed org-wide onentireio).Validation (this VM / fresh agents)
bash .cursor/install.shfrom a fresh stateshellcheck .cursor/install.shmise run lintmise run test:ci(unit + integration +-race+ E2E canary)entireresolvable on minimal system PATH/usr/local/bin/entireEntire-CheckpointtrailerEntire-Checkpoint: 01M0TPVTG0…, then reverted)Note on running the full test suite in a Cloud Agent
A few URL-derivation unit tests read the global git config and assert exact SSH/HTTPS URLs. Cloud Agent VMs carry a Cursor-managed
url.<token>.insteadOfrewrite (for GitHub auth) that rewrites those URLs, somise run test:cimust be run with a neutral global git config:This is a test-harness/environment interaction only (normal CI has no such rewrite); it is not baked into the environment because the managed rewrite is what authenticates
git push.mise run lintand the bulk of tests are unaffected.