sync-worktrees 3.6.2 → 3.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -113,6 +113,8 @@ Add the server to your MCP client config. Use `npx` if the package is not instal
113
113
 
114
114
  If installed globally, replace `command` with `sync-worktrees-mcp` and drop `args`. `SYNC_WORKTREES_CONFIG` is optional — without it the server runs in **auto-detect mode**: when the client's CWD sits inside a worktree managed by sync-worktrees, the server locates the bare repo, enumerates sibling worktrees, and enables per-worktree operations. Sync and initialize require a loaded config (or call `load_config` at runtime).
115
115
 
116
+ At session start, agents should call `detect_context` with `includeAllWorktrees: true`. With a loaded config, that returns config-driven `siblingRepositories` for every other configured repo, including nested `worktreeDir` paths, plus `allWorktreesByRepo` keyed by repository name. If a configured repo cannot be enumerated, `allWorktreeErrorsByRepo` carries the per-repo error.
117
+
116
118
  Client-specific locations:
117
119
 
118
120
  | Client | Config file |
@@ -125,10 +127,10 @@ Client-specific locations:
125
127
 
126
128
  | Tool | Purpose |
127
129
  |------|---------|
128
- | `detect_context` | Inspect a path, resolve the bare repo, enumerate sibling worktrees, report capabilities. |
129
- | `list_worktrees` | List worktrees with status label (`clean`/`dirty`/`stale`/`current`), divergence, `safeToRemove`, last sync. |
130
+ | `detect_context` | Inspect a path, resolve the bare repo, enumerate sibling worktrees, report config-driven sibling repositories and capabilities. Pass `includeAllWorktrees: true` to include every configured repo's worktrees keyed by repo name. |
131
+ | `list_worktrees` | List worktrees with status label (`clean`/`dirty`/`stale`/`current`), divergence, `safeToRemove`, last sync. Without `repoName` and with a loaded config, results are grouped across all configured repos. |
130
132
  | `get_worktree_status` | Detailed status for one worktree (dirty files, unpushed commits, stashes, operation in progress). |
131
- | `create_worktree` | Create a worktree for a branch; optionally create the branch from `baseBranch` and push. |
133
+ | `create_worktree` | Create a worktree for a branch; optionally create the branch from `baseBranch`. Newly created branches are pushed to origin unless `push=false`. |
132
134
  | `remove_worktree` | Remove a worktree after safety checks; `force=true` skips validation. |
133
135
  | `update_worktree` | Fast-forward one worktree to match upstream. |
134
136
  | `sync` | Full sync cycle (fetch, create, prune, update). Requires config. Streams progress notifications. |
@@ -142,6 +144,7 @@ All tools that target a single repo accept an optional `repoName`. When omitted,
142
144
 
143
145
  - `remove_worktree` refuses to delete worktrees with uncommitted changes, unpushed commits, stashes, or operations in progress (merge/rebase/cherry-pick/revert/bisect). Pass `force=true` to override.
144
146
  - `create_worktree` rejects sanitized-path collisions (e.g. `feature/foo` vs `feature-foo` both resolving to `feature-foo/`) before touching disk.
147
+ - Branches created by sync-worktrees use `--no-track` first, then publish with `git push -u origin <branch>`, so they do not inherit `origin/main` as their upstream.
145
148
  - Path-targeted tools verify the supplied path is a registered worktree of the selected repository.
146
149
 
147
150
  ## Options
package/dist/index.js CHANGED
@@ -3840,7 +3840,7 @@ var GitService = class {
3840
3840
  async createBranch(branchName, baseBranch) {
3841
3841
  const bareGit = this.getCachedGit(this.bareRepoPath);
3842
3842
  const baseRef = await this.resolveCreateBranchBaseRef(bareGit, baseBranch);
3843
- await bareGit.raw(["branch", branchName, baseRef]);
3843
+ await bareGit.raw(["branch", "--no-track", branchName, baseRef]);
3844
3844
  this.logger.info(`Created branch '${branchName}' from '${baseRef}'`);
3845
3845
  }
3846
3846
  async pushBranch(branchName) {