chore(cloud): add Cloud Agent development environment - #5
Merged
Conversation
Co-authored-by: Will Hampson <Whamp@users.noreply.github.com>
Whamp
marked this pull request as ready for review
August 17, 2026 23:52
added 2 commits
August 18, 2026 06:12
…ent-environment-cc25
pnpm 10.33.0 (matches the packageManager field added since this branch opened) and gitleaks 8.30.1 (matches the CI install step).
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.
Summary
Adds a Cloud Agent development environment for
pi-brainso agents can install dependencies, run the full validation suite, and exercise the extension without manual setup..cursor/environment.json— declares the environment with an idempotentinstallstep..cursor/install.sh— pinspnpm@10.33.3(matching the committed lockfile), installs the realgitleaksbinary, then runspnpm install --prod=false --frozen-lockfile.Why these steps
gitleaks@1.0.0devDependency is a config-only decoy package that ships no binary, butpnpm run check'ssecretsstep invokes the realgitleaksCLI. The script installs the officialgitleaks 8.28.0Go binary (idempotently) so the check passes..npmrcsetsomit=dev, so--prod=falseis required to pull in the toolchain (oxlint, vitest, typescript, etc.).packageManagerfield, so the script activates an explicit pnpm version rather than letting corepack resolve "latest" (which triggered anode_modulespurge prompt during testing).CI=truekeeps pnpm non-interactive.start/terminals:pi-brainis an extension/library with no long-running services.Validation
Validated on the VM, then across two prebuilt environment builds, each verified in a fresh Cloud Agent.
install.shidempotence (VM)pnpm run check(lint, typecheck, format, deadcode, duplicates, secrets, test)src/index.tsinto a real piAgentSession, registeredmemory_branch+memory_commit, created/switched memory branches, wrote.memory/artifacts, and rejected an invalid branch namepnpm run checkpassedinstall.shis self-contained — gitleaks downloaded to/usr/local/bin,pnpm run checkpassed with "no leaks found"Because
.cursor/environment.jsonis committed, the repository file is the highest-precedence environment source: once merged, new Cloud Agents on this repo use it automatically.Notes
.github/workflows/check.ymlcurrently fails atpnpm/action-setupwith "No pnpm version is specified", because the repo declares nopackageManagerfield and the action is not pinned to a version.