@clipboard-health/groundcrew 4.43.0 → 4.43.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.
- package/dist/lib/worktrees.d.ts.map +1 -1
- package/dist/lib/worktrees.js +31 -11
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worktrees.d.ts","sourceRoot":"","sources":["../../src/lib/worktrees.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AAKrB,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,iBAAiB,CAAC;AAIlE,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,SAAgB,GAAG,EAAE,MAAM,CAAC;IAE5B,YAAmB,GAAG,EAAE,MAAM,EAI7B;CACF;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,0BAA0B,CAEhG;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD,iBAAS,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA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C;IACzB,wDAAwD;IACxD,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,cAAc,EAAE,cAAc,CAAC;CAChC;AAuBD,iBAAe,QAAQ,CACrB,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,SAAS,aAAa,EAAE,EACjC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,GAClD,OAAO,CAAC,cAAc,CAAC,CAiDzB;AAED,iBAAe,gBAAgB,CAAC,KAAK,EAAE;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAE7B;AAED,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAC"}
|
package/dist/lib/worktrees.js
CHANGED
|
@@ -192,17 +192,37 @@ async function createWorktree(config, spec, signal) {
|
|
|
192
192
|
const base = basePaths(config, spec.repository, spec.task);
|
|
193
193
|
const recipe = recipeFor(config, spec.repository);
|
|
194
194
|
if (recipe.provision === undefined) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
195
|
+
// A prior run can leave the `<prefix>-<task>` branch behind after its
|
|
196
|
+
// worktree directory is gone — teardown deletes the branch only
|
|
197
|
+
// best-effort, and operators sometimes remove the directory by hand.
|
|
198
|
+
// Attaching the surviving branch reuses its work instead of crashing on
|
|
199
|
+
// `git worktree add -b <existing branch>`.
|
|
200
|
+
if (await localBranchExists(base.repoDir, base.branchName, signal)) {
|
|
201
|
+
debug(`Branch ${base.branchName} already exists; attaching it to worktree ${spec.repository}-${spec.task}...`);
|
|
202
|
+
await runLongGitCommand(["-C", base.repoDir, "worktree", "add", base.hostWorktreeDir, base.branchName], signal);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
const defaultBranch = await resolveDefaultBranch({
|
|
206
|
+
repoDir: base.repoDir,
|
|
207
|
+
remote: config.git.remote,
|
|
208
|
+
fallback: config.git.defaultBranch,
|
|
209
|
+
...signalProperty(signal),
|
|
210
|
+
});
|
|
211
|
+
const baseRef = `${config.git.remote}/${defaultBranch}`;
|
|
212
|
+
debug(`Fetching ${baseRef} in ${spec.repository}...`);
|
|
213
|
+
await runLongGitCommand(["-C", base.repoDir, "fetch", config.git.remote, defaultBranch], signal);
|
|
214
|
+
debug(`Creating worktree ${spec.repository}-${spec.task} (branch ${base.branchName} from ${baseRef})...`);
|
|
215
|
+
await runLongGitCommand([
|
|
216
|
+
"-C",
|
|
217
|
+
base.repoDir,
|
|
218
|
+
"worktree",
|
|
219
|
+
"add",
|
|
220
|
+
"-b",
|
|
221
|
+
base.branchName,
|
|
222
|
+
base.hostWorktreeDir,
|
|
223
|
+
baseRef,
|
|
224
|
+
], signal);
|
|
225
|
+
}
|
|
206
226
|
}
|
|
207
227
|
else {
|
|
208
228
|
const command = applySubstitutions(recipe.provision.create, provisionerSubstitutions(config, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "4.43.
|
|
3
|
+
"version": "4.43.1",
|
|
4
4
|
"description": "Linear-driven orchestrator that launches AI coding agents in git worktrees, with workspace lifecycle and usage tracking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@tsconfig/node24": "24.0.4",
|
|
84
84
|
"@tsconfig/strictest": "2.0.8",
|
|
85
85
|
"@types/node": "25.9.3",
|
|
86
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
86
|
+
"@typescript/native-preview": "7.0.0-dev.20260612.1",
|
|
87
87
|
"@vitest/coverage-v8": "4.1.8",
|
|
88
88
|
"cspell": "10.0.1",
|
|
89
89
|
"dependency-cruiser": "17.4.3",
|