@clipboard-health/groundcrew 4.20.0 → 4.20.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resumeWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/resumeWorkspace.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resumeWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/resumeWorkspace.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAenE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAuID,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CA0Ff;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAGtE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fetchResolvedIssue } from "../lib/adapters/linear/fetch.js";
|
|
2
2
|
import { getLinearClient } from "../lib/adapters/linear/client.js";
|
|
3
|
+
import { isLinearEnabled } from "../lib/buildSources.js";
|
|
3
4
|
import { loadConfig } from "../lib/config.js";
|
|
4
5
|
import { openAgentWorkspace, prepareAgentLaunch } from "../lib/agentLaunch.js";
|
|
5
6
|
import { buildLaunchCommand } from "../lib/launchCommand.js";
|
|
@@ -41,8 +42,11 @@ async function contextFromLinear(config, task, worktree) {
|
|
|
41
42
|
resumeCount: 0,
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
|
-
async function contextFromState(task, state, worktree) {
|
|
45
|
-
|
|
45
|
+
async function contextFromState(config, task, state, worktree) {
|
|
46
|
+
// Skip the Linear lookup when Linear is disabled — otherwise the
|
|
47
|
+
// missing-API-key error logs noisily even though resume only needs it to
|
|
48
|
+
// enrich the prompt title/description (which falls back to the task id).
|
|
49
|
+
const details = isLinearEnabled(config) ? await fetchTaskDetails(task) : undefined;
|
|
46
50
|
return {
|
|
47
51
|
task,
|
|
48
52
|
repository: state.repository,
|
|
@@ -64,7 +68,13 @@ async function buildResumeContext(config, task) {
|
|
|
64
68
|
throw new Error(`No worktree found for ${task}; cannot resume.`);
|
|
65
69
|
}
|
|
66
70
|
if (state !== undefined) {
|
|
67
|
-
return await contextFromState(task, state, worktree);
|
|
71
|
+
return await contextFromState(config, task, state, worktree);
|
|
72
|
+
}
|
|
73
|
+
// The cold-resume path resolves repository + model from Linear alone, so it
|
|
74
|
+
// can't proceed when Linear is disabled. Fail with a clear reason instead of
|
|
75
|
+
// the cryptic missing-API-key error getLinearClient() would otherwise raise.
|
|
76
|
+
if (!isLinearEnabled(config)) {
|
|
77
|
+
throw new Error(`Cannot resume ${task}: no run state recorded and Linear is disabled.`);
|
|
68
78
|
}
|
|
69
79
|
return await contextFromLinear(config, task, worktree);
|
|
70
80
|
}
|
|
@@ -37,4 +37,12 @@ export declare function buildSourcesWith(registry: Record<string, AdapterDefinit
|
|
|
37
37
|
* other source with `enabled: false` is likewise dropped from the result.
|
|
38
38
|
*/
|
|
39
39
|
export declare function sourcesFromConfig(config: ResolvedConfig): readonly unknown[];
|
|
40
|
+
/**
|
|
41
|
+
* True when the resolved config keeps Linear active — i.e. the user has not
|
|
42
|
+
* opted out with `{ kind: "linear", enabled: false }`. Callers use this to skip
|
|
43
|
+
* Linear API calls (and the missing-API-key error they raise) when Linear is
|
|
44
|
+
* off. Derived from `sourcesFromConfig` so it honors both the explicit opt-out
|
|
45
|
+
* sentinel and the implicit-source synthesis.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isLinearEnabled(config: ResolvedConfig): boolean;
|
|
40
48
|
//# sourceMappingURL=buildSources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildSources.d.ts","sourceRoot":"","sources":["../../src/lib/buildSources.ts"],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AGvB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC3C,UAAU,EAAE,SAAS,OAAO,EAAE,EAC9B,OAAO,EAAE,cAAc,GACtB,UAAU,EAAE,CAcd;AA6DD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,SAAS,OAAO,EAAE,CAa5E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAE/D"}
|
package/dist/lib/buildSources.js
CHANGED
|
@@ -114,3 +114,13 @@ export function sourcesFromConfig(config) {
|
|
|
114
114
|
}
|
|
115
115
|
return [{ kind: "linear" }, ...kept];
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* True when the resolved config keeps Linear active — i.e. the user has not
|
|
119
|
+
* opted out with `{ kind: "linear", enabled: false }`. Callers use this to skip
|
|
120
|
+
* Linear API calls (and the missing-API-key error they raise) when Linear is
|
|
121
|
+
* off. Derived from `sourcesFromConfig` so it honors both the explicit opt-out
|
|
122
|
+
* sentinel and the implicit-source synthesis.
|
|
123
|
+
*/
|
|
124
|
+
export function isLinearEnabled(config) {
|
|
125
|
+
return sourcesFromConfig(config).some(isLinearKindSource);
|
|
126
|
+
}
|
package/package.json
CHANGED