@clipboard-health/groundcrew 1.7.1 → 1.7.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Linear-driven orchestrator that launches AI coding agents in git worktrees, with workspace lifecycle, remote runners, and usage tracking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { type ModelDefinition, type RemoteRunnerConfig } from "./config.ts";
|
|
2
2
|
import type { RemoteRunnerProvider } from "./spriteRemoteRunnerProvider.ts";
|
|
3
3
|
export { shellSingleQuote } from "./shell.ts";
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the shipped Safehouse proxy wrapper inside `@clipboard-health/clearance`
|
|
6
|
+
* via Node's module-resolution algorithm so the path works whether npm hoists
|
|
7
|
+
* clearance as a sibling of groundcrew or nests it under
|
|
8
|
+
* `groundcrew/node_modules/@clipboard-health/clearance`.
|
|
9
|
+
*
|
|
10
|
+
* @param baseUrl - **Test-only seam.** Production callers must omit this so the
|
|
11
|
+
* helper resolves from this module's URL. Tests pass an invalid value to
|
|
12
|
+
* exercise the catch branch.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveSafehouseClearancePath(baseUrl?: string): string;
|
|
4
15
|
interface LaunchCommandArguments {
|
|
5
16
|
definition: ModelDefinition;
|
|
6
17
|
promptFile: string;
|
package/src/lib/launchCommand.js
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { Buffer } from "node:buffer";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { dirname, resolve } from "node:path";
|
|
3
4
|
import { BUILD_SECRET_NAMES, DEFAULT_HOST_SETUP_COMMAND, DEFAULT_REMOTE_SETUP_COMMAND, } from "./config.js";
|
|
4
5
|
import { shellSingleQuote } from "./shell.js";
|
|
5
6
|
export { shellSingleQuote } from "./shell.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Resolve the shipped Safehouse proxy wrapper inside `@clipboard-health/clearance`
|
|
9
|
+
* via Node's module-resolution algorithm so the path works whether npm hoists
|
|
10
|
+
* clearance as a sibling of groundcrew or nests it under
|
|
11
|
+
* `groundcrew/node_modules/@clipboard-health/clearance`.
|
|
12
|
+
*
|
|
13
|
+
* @param baseUrl - **Test-only seam.** Production callers must omit this so the
|
|
14
|
+
* helper resolves from this module's URL. Tests pass an invalid value to
|
|
15
|
+
* exercise the catch branch.
|
|
16
|
+
*/
|
|
17
|
+
export function resolveSafehouseClearancePath(baseUrl = import.meta.url) {
|
|
18
|
+
let clearancePackageJson;
|
|
19
|
+
try {
|
|
20
|
+
clearancePackageJson = createRequire(baseUrl).resolve("@clipboard-health/clearance/package.json");
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw new Error("@clipboard-health/clearance is required by @clipboard-health/groundcrew but could not be resolved. " +
|
|
24
|
+
"Install it alongside groundcrew (for example: `npm install -g @clipboard-health/clearance`).", { cause: error });
|
|
25
|
+
}
|
|
26
|
+
return resolve(dirname(clearancePackageJson), "safehouse", "safehouse-clearance");
|
|
27
|
+
}
|
|
28
|
+
const SAFEHOUSE_CLEARANCE_WRAPPER_PATH = resolveSafehouseClearancePath();
|
|
10
29
|
function renderAgentCommand(arguments_) {
|
|
11
30
|
return arguments_.agentCmd
|
|
12
31
|
.replaceAll("{{worktree}}", shellSingleQuote(arguments_.worktreeDir))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchCommand.js","sourceRoot":"","sources":["../../../../../packages/groundcrew/src/lib/launchCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACr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