borgmcp 3.5.0 → 3.6.1

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.
Files changed (108) hide show
  1. package/README.md +18 -13
  2. package/dist/assimilate-cmd.d.ts +1 -1
  3. package/dist/assimilate-cmd.d.ts.map +1 -1
  4. package/dist/assimilate-cmd.js +28 -53
  5. package/dist/assimilate-cmd.js.map +1 -1
  6. package/dist/assimilate-deps.d.ts.map +1 -1
  7. package/dist/assimilate-deps.js +1 -1
  8. package/dist/assimilate-deps.js.map +1 -1
  9. package/dist/backends/launch-all-pastelist.js +2 -2
  10. package/dist/backends/launch-all-pastelist.js.map +1 -1
  11. package/dist/backends/launch-all-terminals.js +2 -2
  12. package/dist/backends/launch-all-terminals.js.map +1 -1
  13. package/dist/backends/launch-all-tmux.js +3 -3
  14. package/dist/backends/launch-all-tmux.js.map +1 -1
  15. package/dist/bare-launch-menu.d.ts +23 -38
  16. package/dist/bare-launch-menu.d.ts.map +1 -1
  17. package/dist/bare-launch-menu.js +84 -31
  18. package/dist/bare-launch-menu.js.map +1 -1
  19. package/dist/claude.d.ts.map +1 -1
  20. package/dist/claude.js +27 -28
  21. package/dist/claude.js.map +1 -1
  22. package/dist/cleanup-cmd.d.ts +1 -1
  23. package/dist/cleanup-cmd.d.ts.map +1 -1
  24. package/dist/cleanup-cmd.js +10 -1
  25. package/dist/cleanup-cmd.js.map +1 -1
  26. package/dist/cli-help.d.ts.map +1 -1
  27. package/dist/cli-help.js +6 -9
  28. package/dist/cli-help.js.map +1 -1
  29. package/dist/console-prefix.d.ts.map +1 -1
  30. package/dist/console-prefix.js +7 -2
  31. package/dist/console-prefix.js.map +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2 -2
  34. package/dist/index.js.map +1 -1
  35. package/dist/launch-all-cmd.d.ts.map +1 -1
  36. package/dist/launch-all-cmd.js +43 -25
  37. package/dist/launch-all-cmd.js.map +1 -1
  38. package/dist/launch-all-command.d.ts +8 -2
  39. package/dist/launch-all-command.d.ts.map +1 -1
  40. package/dist/launch-all-command.js +8 -4
  41. package/dist/launch-all-command.js.map +1 -1
  42. package/dist/launch-all-deps.d.ts +2 -2
  43. package/dist/launch-all-deps.d.ts.map +1 -1
  44. package/dist/launch-all-deps.js +2 -2
  45. package/dist/launch-all-deps.js.map +1 -1
  46. package/dist/launch-all-discovery.d.ts +2 -3
  47. package/dist/launch-all-discovery.d.ts.map +1 -1
  48. package/dist/launch-all-discovery.js +1 -5
  49. package/dist/launch-all-discovery.js.map +1 -1
  50. package/dist/log-stream.d.ts.map +1 -1
  51. package/dist/log-stream.js +5 -8
  52. package/dist/log-stream.js.map +1 -1
  53. package/dist/opencode-drone.d.ts +3 -4
  54. package/dist/opencode-drone.d.ts.map +1 -1
  55. package/dist/opencode-drone.js +15 -10
  56. package/dist/opencode-drone.js.map +1 -1
  57. package/dist/opencode-plugin.d.ts +1 -0
  58. package/dist/opencode-plugin.d.ts.map +1 -1
  59. package/dist/opencode-plugin.js +2 -1
  60. package/dist/opencode-plugin.js.map +1 -1
  61. package/dist/opencode-wake-copy.js +1 -1
  62. package/dist/opencode-wake-copy.js.map +1 -1
  63. package/dist/parse-launch-all-args.d.ts +0 -1
  64. package/dist/parse-launch-all-args.d.ts.map +1 -1
  65. package/dist/parse-launch-all-args.js +1 -9
  66. package/dist/parse-launch-all-args.js.map +1 -1
  67. package/dist/remote-client.d.ts +2 -2
  68. package/dist/remote-client.d.ts.map +1 -1
  69. package/dist/remote-client.js +12 -4
  70. package/dist/remote-client.js.map +1 -1
  71. package/dist/seat-probe.d.ts +2 -1
  72. package/dist/seat-probe.d.ts.map +1 -1
  73. package/dist/seat-probe.js +2 -2
  74. package/dist/seat-probe.js.map +1 -1
  75. package/dist/seat-store.d.ts.map +1 -1
  76. package/dist/seat-store.js +18 -0
  77. package/dist/seat-store.js.map +1 -1
  78. package/dist/worktree-lifecycle.d.ts +0 -18
  79. package/dist/worktree-lifecycle.d.ts.map +1 -1
  80. package/dist/worktree-lifecycle.js +0 -39
  81. package/dist/worktree-lifecycle.js.map +1 -1
  82. package/docs/LOCAL_SERVER.md +8 -6
  83. package/docs/SEAT_LIFECYCLE.md +8 -7
  84. package/package.json +1 -1
  85. package/src/assimilate-cmd.ts +36 -68
  86. package/src/assimilate-deps.ts +1 -2
  87. package/src/backends/launch-all-pastelist.ts +2 -2
  88. package/src/backends/launch-all-terminals.ts +2 -2
  89. package/src/backends/launch-all-tmux.ts +3 -3
  90. package/src/bare-launch-menu.ts +89 -48
  91. package/src/claude.ts +31 -34
  92. package/src/cleanup-cmd.ts +10 -10
  93. package/src/cli-help.ts +6 -9
  94. package/src/console-prefix.ts +6 -2
  95. package/src/index.ts +2 -11
  96. package/src/launch-all-cmd.ts +55 -37
  97. package/src/launch-all-command.ts +9 -4
  98. package/src/launch-all-deps.ts +4 -10
  99. package/src/launch-all-discovery.ts +3 -8
  100. package/src/log-stream.ts +5 -8
  101. package/src/opencode-drone.ts +24 -10
  102. package/src/opencode-plugin.ts +2 -1
  103. package/src/opencode-wake-copy.ts +1 -1
  104. package/src/parse-launch-all-args.ts +1 -10
  105. package/src/remote-client.ts +13 -8
  106. package/src/seat-probe.ts +3 -4
  107. package/src/seat-store.ts +18 -0
  108. package/src/worktree-lifecycle.ts +0 -45
@@ -123,56 +123,11 @@ export function isMerged(runSync: RunSync, cwd: string, branch: string, ref: str
123
123
  return runSync('git', ['merge-base', '--is-ancestor', branch, ref], cwd).status === 0;
124
124
  }
125
125
 
126
- export interface AdoptResult {
127
- action: 'adopted' | 'blocked-unmerged' | 'blocked-target-unmerged' | 'skipped-dirty';
128
- message?: string;
129
- }
130
-
131
126
  /** True iff a local branch named `branch` already exists. */
132
127
  export function localBranchExists(runSync: RunSync, cwd: string, branch: string): boolean {
133
128
  return runSync('git', ['rev-parse', '--verify', '--quiet', `refs/heads/${branch}`], cwd).status === 0;
134
129
  }
135
130
 
136
- /**
137
- * Migration (Q4/Q5/§4.5): bring a detached/stale worktree onto
138
- * `wt-<basename>` at `ref`. Idempotent: re-running on an already-adopted
139
- * clean worktree is a lossless reset to `ref`. Never discards:
140
- * - dirty work tree -> skipped-dirty (surface)
141
- * - current HEAD unmerged -> blocked-unmerged (surface)
142
- * - TARGET `branch` exists with commits not on `ref` -> blocked-target-
143
- * unmerged (surface). This is load-bearing: the switch uses `-C`
144
- * (force-create/reset), which would ORPHAN commits on a pre-existing
145
- * `wt-` branch. The HEAD-merged check alone misses this when the
146
- * target branch != HEAD (e.g. on `main` while a prior `wt-x` holds
147
- * committed-but-unmerged work). gh#33 CR-v2 blocker 078d1630.
148
- */
149
- export function adoptWorktree(runSync: RunSync, cwd: string, branch: string, ref: string): AdoptResult {
150
- if (!isCleanTree(runSync, cwd)) {
151
- return {
152
- action: 'skipped-dirty',
153
- message: 'uncommitted changes present; not switching (nothing discarded)',
154
- };
155
- }
156
- if (!isMerged(runSync, cwd, 'HEAD', ref)) {
157
- return {
158
- action: 'blocked-unmerged',
159
- message: `current HEAD has commits not on ${ref}; commit/push or set aside before adopting`,
160
- };
161
- }
162
- // Guard the TARGET branch ref before the `switch -C` force-reset. If
163
- // `branch` already exists and is NOT an ancestor of `ref`, it carries
164
- // committed-unmerged work that `-C` would discard — block instead.
165
- // (Absent, or an ancestor of `ref` = a clean reset target → proceed.)
166
- if (localBranchExists(runSync, cwd, branch) && !isMerged(runSync, cwd, branch, ref)) {
167
- return {
168
- action: 'blocked-target-unmerged',
169
- message: `branch ${branch} exists with commits not on ${ref}; resolve before adopting (a force-switch would discard them)`,
170
- };
171
- }
172
- runSync('git', ['switch', '-C', branch, ref], cwd);
173
- return { action: 'adopted' };
174
- }
175
-
176
131
  export interface CleanupResult {
177
132
  action: 'pruned' | 'announced' | 'not-merged';
178
133
  /** The feature branch this result concerns (for the announce message). */