@clipboard-health/groundcrew 4.52.4 → 4.52.6
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/adapters/linear/fetch.d.ts +10 -1
- package/dist/lib/adapters/linear/fetch.d.ts.map +1 -1
- package/dist/lib/adapters/linear/fetch.js +14 -4
- package/dist/lib/workingDirectory.d.ts +21 -0
- package/dist/lib/workingDirectory.d.ts.map +1 -0
- package/dist/lib/workingDirectory.js +72 -0
- package/dist/main.js +8 -1
- package/package.json +8 -8
|
@@ -171,7 +171,16 @@ export declare function fetchResolvedIssue(arguments_: {
|
|
|
171
171
|
config: ResolvedConfig;
|
|
172
172
|
task: string;
|
|
173
173
|
}): Promise<ResolvedIssue>;
|
|
174
|
-
|
|
174
|
+
/**
|
|
175
|
+
* Terminal tickets are skipped: the board fetches done work for cleanup, and
|
|
176
|
+
* a stale label there would otherwise warn on every tick.
|
|
177
|
+
*/
|
|
178
|
+
export declare function warnIfNotEnabledFallback(arguments_: {
|
|
179
|
+
task: string;
|
|
180
|
+
agentResolution: AgentResolution;
|
|
181
|
+
config: ResolvedConfig;
|
|
182
|
+
stateType: string | undefined;
|
|
183
|
+
}): void;
|
|
175
184
|
export declare function blockersFromRelations(relations: IssueRelationNode[]): Blocker[];
|
|
176
185
|
export {};
|
|
177
186
|
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1F,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AA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G;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,oBAAoB,CAAC,UAAU,EAAE;IACrD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC,CA8C9B;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE;IACpD,MAAM,EAAE,YAAY,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,cAAc,CAAC,CA6E1B;AAUD,wBAAsB,yBAAyB,CAAC,UAAU,EAAE;IAC1D,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2ClB;AAED,wBAAsB,kBAAkB,CAAC,UAAU,EAAE;IACnD,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,aAAa,CAAC,CAyCzB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,eAAe,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GAAG,IAAI,CAQP;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,EAAE,CAS/E"}
|
|
@@ -189,7 +189,12 @@ function buildLinearIssue(input) {
|
|
|
189
189
|
}
|
|
190
190
|
function issueFromNode(node, config) {
|
|
191
191
|
const agentResolution = resolveAgentFor({ labels: node.labels.nodes, config });
|
|
192
|
-
warnIfNotEnabledFallback(
|
|
192
|
+
warnIfNotEnabledFallback({
|
|
193
|
+
task: node.identifier,
|
|
194
|
+
agentResolution,
|
|
195
|
+
config,
|
|
196
|
+
stateType: node.state?.type,
|
|
197
|
+
});
|
|
193
198
|
const { repository, agent } = resolveAgentMetadata({
|
|
194
199
|
task: node.identifier,
|
|
195
200
|
/* v8 ignore next @preserve -- BoardIssues query selects description; the ?? guard normalises a null vs undefined edge */
|
|
@@ -370,7 +375,7 @@ export async function fetchResolvedIssue(arguments_) {
|
|
|
370
375
|
});
|
|
371
376
|
}
|
|
372
377
|
const agentResolution = resolveAgentFor({ labels: raw.labels, config });
|
|
373
|
-
warnIfNotEnabledFallback(task, agentResolution, config);
|
|
378
|
+
warnIfNotEnabledFallback({ task, agentResolution, config, stateType: raw.stateType });
|
|
374
379
|
let agent = config.agents.default;
|
|
375
380
|
if (agentResolution.kind === "matched") {
|
|
376
381
|
({ agent } = agentResolution);
|
|
@@ -398,8 +403,13 @@ export async function fetchResolvedIssue(arguments_) {
|
|
|
398
403
|
...(worktreePreparation === undefined ? {} : { worktreePreparation }),
|
|
399
404
|
};
|
|
400
405
|
}
|
|
401
|
-
|
|
402
|
-
|
|
406
|
+
/**
|
|
407
|
+
* Terminal tickets are skipped: the board fetches done work for cleanup, and
|
|
408
|
+
* a stale label there would otherwise warn on every tick.
|
|
409
|
+
*/
|
|
410
|
+
export function warnIfNotEnabledFallback(arguments_) {
|
|
411
|
+
const { task, agentResolution, config, stateType } = arguments_;
|
|
412
|
+
if (agentResolution.kind !== "not-enabled-fallback" || isTerminalStateType(stateType)) {
|
|
403
413
|
return;
|
|
404
414
|
}
|
|
405
415
|
log(`${task.toLowerCase()}: agent-${agentResolution.requestedAgent} label refers to an agent that is not enabled; falling back to agents.default (${config.agents.default})`);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface WorkingDirectoryDeps {
|
|
2
|
+
cwd: () => string;
|
|
3
|
+
chdir: (directory: string) => void;
|
|
4
|
+
exists: (directory: string) => boolean;
|
|
5
|
+
/** The shell's logical working directory; still set after the directory is removed. */
|
|
6
|
+
pwd: string | undefined;
|
|
7
|
+
home: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RecoveredWorkingDirectory {
|
|
10
|
+
missing: string | undefined;
|
|
11
|
+
recovered: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* When the shell's working directory was removed (e.g. `crew cleanup` run from
|
|
15
|
+
* inside a worktree an earlier cleanup deleted), every `process.cwd()` call —
|
|
16
|
+
* including cosmiconfig's at module load — throws ENOENT. Move to the nearest
|
|
17
|
+
* surviving ancestor of `$PWD`, or the home directory, so commands can still run.
|
|
18
|
+
* Returns undefined when the working directory is intact.
|
|
19
|
+
*/
|
|
20
|
+
export declare function recoverWorkingDirectory(deps?: WorkingDirectoryDeps): RecoveredWorkingDirectory | undefined;
|
|
21
|
+
//# sourceMappingURL=workingDirectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workingDirectory.d.ts","sourceRoot":"","sources":["../../src/lib/workingDirectory.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,uFAAuF;IACvF,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,GAAE,oBAAoC,GACzC,yBAAyB,GAAG,SAAS,CAUvC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { readEnvironmentVariable } from "./util.js";
|
|
5
|
+
/**
|
|
6
|
+
* When the shell's working directory was removed (e.g. `crew cleanup` run from
|
|
7
|
+
* inside a worktree an earlier cleanup deleted), every `process.cwd()` call —
|
|
8
|
+
* including cosmiconfig's at module load — throws ENOENT. Move to the nearest
|
|
9
|
+
* surviving ancestor of `$PWD`, or the home directory, so commands can still run.
|
|
10
|
+
* Returns undefined when the working directory is intact.
|
|
11
|
+
*/
|
|
12
|
+
export function recoverWorkingDirectory(deps = defaultDeps()) {
|
|
13
|
+
if (!isMissingWorkingDirectory(deps)) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
const ancestor = existingAncestors(deps).find((directory) => tryChdir({ deps, directory }));
|
|
17
|
+
if (ancestor !== undefined) {
|
|
18
|
+
return { missing: deps.pwd, recovered: ancestor };
|
|
19
|
+
}
|
|
20
|
+
deps.chdir(deps.home);
|
|
21
|
+
return { missing: deps.pwd, recovered: deps.home };
|
|
22
|
+
}
|
|
23
|
+
function defaultDeps() {
|
|
24
|
+
return {
|
|
25
|
+
cwd: () => process.cwd(),
|
|
26
|
+
chdir: (directory) => {
|
|
27
|
+
process.chdir(directory);
|
|
28
|
+
},
|
|
29
|
+
exists: existsSync,
|
|
30
|
+
pwd: readEnvironmentVariable("PWD"),
|
|
31
|
+
home: homedir(),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function isMissingWorkingDirectory(deps) {
|
|
35
|
+
try {
|
|
36
|
+
deps.cwd();
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function existingAncestors(deps) {
|
|
47
|
+
if (deps.pwd === undefined || !path.isAbsolute(deps.pwd)) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
const candidates = [];
|
|
51
|
+
let current = path.resolve(deps.pwd);
|
|
52
|
+
for (;;) {
|
|
53
|
+
if (deps.exists(current)) {
|
|
54
|
+
candidates.push(current);
|
|
55
|
+
}
|
|
56
|
+
const parent = path.dirname(current);
|
|
57
|
+
if (parent === current) {
|
|
58
|
+
return candidates;
|
|
59
|
+
}
|
|
60
|
+
current = parent;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function tryChdir(input) {
|
|
64
|
+
const { deps, directory } = input;
|
|
65
|
+
try {
|
|
66
|
+
deps.chdir(directory);
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { recoverWorkingDirectory } from "./lib/workingDirectory.js";
|
|
2
2
|
try {
|
|
3
|
+
// Must run before cli.ts loads: config.ts builds its cosmiconfig explorer at
|
|
4
|
+
// import time, which reads process.cwd() and crashes if the directory is gone.
|
|
5
|
+
const recovery = recoverWorkingDirectory();
|
|
6
|
+
if (recovery !== undefined) {
|
|
7
|
+
process.stderr.write(`Current directory ${recovery.missing ?? "(unknown)"} no longer exists; continuing from ${recovery.recovered}\n`);
|
|
8
|
+
}
|
|
9
|
+
const { run } = await import("./cli.js");
|
|
3
10
|
await run(process.argv.slice(2));
|
|
4
11
|
}
|
|
5
12
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "4.52.
|
|
3
|
+
"version": "4.52.6",
|
|
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",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@clipboard-health/clearance": "1.8.3",
|
|
73
|
-
"@linear/sdk": "
|
|
73
|
+
"@linear/sdk": "97.0.0",
|
|
74
74
|
"agent-trust": "1.0.0",
|
|
75
75
|
"cosmiconfig": "10.0.1",
|
|
76
76
|
"tslib": "2.8.1",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
"@nx/js": "23.1.0",
|
|
83
83
|
"@tsconfig/node24": "24.0.5",
|
|
84
84
|
"@tsconfig/strictest": "2.0.8",
|
|
85
|
-
"@types/node": "26.
|
|
85
|
+
"@types/node": "26.6.3",
|
|
86
86
|
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
87
|
-
"@vitest/coverage-v8": "5.0.
|
|
88
|
-
"dependency-cruiser": "18.
|
|
87
|
+
"@vitest/coverage-v8": "5.0.2",
|
|
88
|
+
"dependency-cruiser": "18.4.0",
|
|
89
89
|
"husky": "9.1.7",
|
|
90
90
|
"jscpd": "5.2.1",
|
|
91
91
|
"knip": "6.35.1",
|
|
@@ -94,10 +94,10 @@
|
|
|
94
94
|
"nx": "23.1.0",
|
|
95
95
|
"oxfmt": "0.63.0",
|
|
96
96
|
"oxlint": "1.78.0",
|
|
97
|
-
"oxlint-tsgolint": "7.0.
|
|
97
|
+
"oxlint-tsgolint": "7.0.2003",
|
|
98
98
|
"syncpack": "15.3.3",
|
|
99
|
-
"vite": "8.3.
|
|
100
|
-
"vitest": "5.0.
|
|
99
|
+
"vite": "8.3.1",
|
|
100
|
+
"vitest": "5.0.2"
|
|
101
101
|
},
|
|
102
102
|
"engines": {
|
|
103
103
|
"node": "24.14.1",
|