Add configurable worktree root

* Add configurable worktree root

Allow new Paseo worktrees to be created under a custom worktrees.root from config.json while preserving the existing PASEO_HOME/worktrees default. Thread the resolved root through create/list/archive/ownership flows, MCP/session paths, checkout metadata, schema, docs, and targeted tests.

* Address worktree root review feedback

Use the resolved Paseo worktree base when a custom PASEO_HOME is provided, and remove an unused worktreesRoot dependency from worktree list handling.

* Fix checkout worktree path test on Windows

Use platform-native paths in the custom PASEO_HOME regression test so Windows CI compares against the same resolved root shape as production code.

* Clarify optional worktrees config docs

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
Matt Cowger
2026-06-01 01:19:29 -07:00
committed by GitHub
parent 8c6abcb41f
commit d406c29e16
25 changed files with 324 additions and 42 deletions

View File

@@ -54,6 +54,20 @@ Agent providers, both the first-class ones Paseo ships with and custom entries y
See [Providers](/docs/providers) for the mental model and [Supported providers](/docs/supported-providers) for the full list of agents Paseo can launch. For pointing Claude at Anthropic-compatible endpoints (Z.AI, Alibaba/Qwen), multiple profiles, custom binaries, ACP agents, and the `additionalModels` merge behavior, see [Custom providers](/docs/custom-providers). The full field reference lives on GitHub at [docs/custom-providers.md](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md).
## Worktrees
New worktrees are created under `$PASEO_HOME/worktrees` by default. To place new worktrees somewhere else, set `worktrees.root`:
```json
{
"worktrees": {
"root": "/mnt/fast/paseo-worktrees"
}
}
```
Relative paths are resolved against `PASEO_HOME`. Existing worktrees remain where they are; changing this setting only changes where Paseo creates and discovers Paseo-managed worktrees going forward.
## Voice
Voice is configured through `features.dictation` and `features.voiceMode`, with provider credentials under `providers`.

View File

@@ -11,7 +11,7 @@ Each agent runs in its own git worktree, a separate directory on a separate bran
## Layout and workflow
Worktrees live under `$PASEO_HOME/worktrees/`, grouped by a hash of the source checkout path. Each worktree gets a random slug; the branch name is chosen when you first launch an agent.
Worktrees live under `$PASEO_HOME/worktrees/` by default, grouped by a hash of the source checkout path. You can change the base directory with `worktrees.root` in `config.json`. Each worktree gets a random slug; the branch name is chosen when you first launch an agent.
```
~/.paseo/worktrees/
@@ -20,6 +20,16 @@ Worktrees live under `$PASEO_HOME/worktrees/`, grouped by a hash of the source c
└── bold-owl/
```
With a custom root, Paseo keeps the same hashed layout under that directory:
```json
{
"worktrees": {
"root": "/mnt/fast/paseo-worktrees"
}
}
```
1. Create a worktree, Paseo runs your setup hooks
2. Launch an agent, a branch is created or assigned
3. Review the diff against the base branch