feat: add Sprout nest — persistent agent workspace at ~/.sprout#290
Merged
tlongwell-block merged 2 commits intomainfrom Apr 10, 2026
Merged
feat: add Sprout nest — persistent agent workspace at ~/.sprout#290tlongwell-block merged 2 commits intomainfrom
tlongwell-block merged 2 commits intomainfrom
Conversation
Create a shared knowledge directory (~/.sprout) on first launch so every Sprout-spawned agent starts with orientation and a place to accumulate research, plans, and logs across sessions. Changes: - nest.rs: ensure_nest_at() creates ~/.sprout with subdirs (GUIDES/, RESEARCH/, PLANS/, WORK_LOGS/, REPOS/, OUTBOX/, .scratch/), writes AGENTS.md on first init, sets 700 permissions on root and all real subdirectories. Rejects symlinks at root and skips chmod on symlinked children. Fully idempotent — never overwrites existing files. - nest_agents.md: 71-line agent orientation doc covering directory layout, Sprout MCP communication (read/write/poll/search), context recovery, knowledge file conventions, and core guidelines. Tool names verified against sprout-mcp server source. - mod.rs: default_agent_workdir() returns ~/.sprout (with $HOME fallback). Uses symlink_metadata() to reject symlinked nest roots. - lib.rs: ensure_nest() called in setup() before agent restoration. Non-fatal — agents fall back to $HOME if nest creation fails. - check-file-sizes.mjs: bump lib.rs size limit for nest init lines. Tests: 6 passing (creation, permissions, idempotency, symlink rejection, child-symlink permission skipping). Review scores: Lep 9/10, Clove 9/10, Codex CLI 10/10.
9c168c3 to
ab272c6
Compare
Replace exists() + write() with OpenOptions::create_new(true) (O_CREAT|O_EXCL) for atomic check-and-create. AlreadyExists is handled as the idempotent path. This also guarantees we never clobber a user-edited file — no race window. All existing tests pass unchanged.
ab272c6 to
6c15b88
Compare
tlongwell-block
added a commit
that referenced
this pull request
Apr 11, 2026
…ona-migration * origin/main: feat(desktop): add Pulse social notes surface (#296) Fix flaky desktop smoke tests (#294) Add agent lifecycle controls to channel members sidebar (#291) Update nest_agents.md tagging info (#292) feat: add Sprout nest — persistent agent workspace at ~/.sprout (#290) Fix auth and SSRF vulns (#261) Add per-agent MCP toolset configuration to agent setup (#279) feat(desktop): team & persona import/edit flows (#288) Remove menu item subtitles and fix persona card overflow (#289) feat: Phase 1 video upload support (Blossom-compliant-ish) (#285) Add inline subtitles to menu items and field descriptions (#276) Improve ephemeral channel affordances and hide archived sidebar rows (#286) Fix @mention search to use word-boundary prefix matching (#278) Allow bot owners to remove their agents from any channel (#284) [codex] Polish agent selectors and settings layout (#283) # Conflicts: # desktop/scripts/check-file-sizes.mjs
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
On first launch, the Sprout desktop app now creates
~/.sprout/— a shared knowledge directory where every agent starts with orientation and a place to accumulate research, plans, and logs across sessions.Every agent spawned by the GUI gets
~/.sproutas its cwd. Goose readsAGENTS.mdautomatically.Changes
nest.rsensure_nest_at()— idempotent directory creation, symlink-safe, 700 perms, 6 testsnest_agents.mdsince, context recovery, knowledge file conventionsmod.rsdefault_agent_workdir()→~/.sproutwith$HOMEfallback, symlink rejectionlib.rsensure_nest()called insetup()before agent restoration, non-fatalcheck-file-sizes.mjsSafety
$HOMEif nest creation fails; app startup is never blockedAGENTS.mdis a static template viainclude_str!, no interpolationTests
6 unit tests covering creation, permissions, idempotency, symlink root rejection, and symlinked child permission skipping. All passing.
Review