@clipboard-health/groundcrew 1.12.3 → 1.12.5
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/README.md +2 -2
- package/dist/commands/remoteSetup.d.ts +3 -0
- package/dist/commands/remoteSetup.d.ts.map +1 -1
- package/dist/commands/remoteSetup.js +33 -25
- package/dist/lib/config.d.ts +2 -3
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/host.d.ts +1 -1
- package/dist/lib/host.d.ts.map +1 -1
- package/dist/lib/spriteRemoteRunnerProvider.d.ts +3 -0
- package/dist/lib/spriteRemoteRunnerProvider.d.ts.map +1 -1
- package/dist/lib/spriteRemoteRunnerProvider.js +6 -6
- package/dist/lib/workspaces.d.ts.map +1 -1
- package/dist/lib/workspaces.js +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img alt="Groundcrew logo." height="250px" src="./static/groundcrew.svg">
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
|
-
Watch a Linear project and farm out ready tickets to coding-agent CLIs running in workspaces backed by git worktrees. Workspaces are [`cmux`](https://github.com/clayton-cole/cmux) panes
|
|
6
|
+
Watch a Linear project and farm out ready tickets to coding-agent CLIs running in workspaces backed by git worktrees. Workspaces are [`cmux`](https://github.com/clayton-cole/cmux) panes or `tmux` windows.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -64,7 +64,7 @@ This installs the `crew` binary. `@clipboard-health/clearance` is pulled in tran
|
|
|
64
64
|
5. **Prepare the runner and agent auth.** Groundcrew supports one local runner and one remote runner:
|
|
65
65
|
- macOS local: `cmux` or `tmux` workspace, Safehouse on `PATH`, `clearance`, and locally authenticated agent CLIs.
|
|
66
66
|
- macOS remote: local `cmux` or `tmux` workspace that launches the configured remote runner.
|
|
67
|
-
- Linux/WSL remote: `tmux` workspace that launches the configured remote runner. Label tickets `agent-remote`; local execution is not supported.
|
|
67
|
+
- Linux/WSL remote: `cmux` or `tmux` workspace that launches the configured remote runner. Label tickets `agent-remote`; local execution is not supported.
|
|
68
68
|
|
|
69
69
|
Local setup fails before creating a worktree when the host is not macOS or `safehouse` is missing. `models.isolation`, per-model `isolation`, and per-model `sandbox` are legacy keys and now fail config validation.
|
|
70
70
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RemoteRunnerConfig } from "../lib/config.ts";
|
|
1
2
|
export interface McpServer {
|
|
2
3
|
name: string;
|
|
3
4
|
url: string;
|
|
@@ -23,6 +24,8 @@ export interface RemoteBootstrapOptions {
|
|
|
23
24
|
owner: string;
|
|
24
25
|
baseBranch: string;
|
|
25
26
|
gitRemote?: string;
|
|
27
|
+
repoRoot?: string;
|
|
28
|
+
remoteConfig?: RemoteRunnerConfig;
|
|
26
29
|
secretNames: string[];
|
|
27
30
|
shouldRequireSelectedSecrets: boolean;
|
|
28
31
|
shouldUseSecrets: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteSetup.d.ts","sourceRoot":"","sources":["../../src/commands/remoteSetup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remoteSetup.d.ts","sourceRoot":"","sources":["../../src/commands/remoteSetup.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAkB1B,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,wBAAwB,EAAE,OAAO,CAAC;IAClC,uBAAuB,EAAE,OAAO,CAAC;IACjC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,qBAAqB,EAAE,OAAO,C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G,OAAO,CAAC,IAAI,CAAC,CAItF;AAED,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhG;AAYD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgClF;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B7D"}
|
|
@@ -2,9 +2,9 @@ import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { homedir, tmpdir } from "node:os";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
5
|
-
import {
|
|
5
|
+
import { DEFAULT_REMOTE_SETUP_COMMAND, loadConfig, } from "../lib/config.js";
|
|
6
6
|
import { shellSingleQuote } from "../lib/shell.js";
|
|
7
|
-
import { getRemoteRunnerProvider, remoteConfigWithRunnerName, } from "../lib/spriteRemoteRunnerProvider.js";
|
|
7
|
+
import { getRemoteRunnerProvider, remotePathJoin, remoteConfigWithRunnerName, remoteRepositoryDirectoryName, remoteRepositorySlug, } from "../lib/spriteRemoteRunnerProvider.js";
|
|
8
8
|
import { log, readEnvironmentVariable, writeOutput } from "../lib/util.js";
|
|
9
9
|
const KNOWN_MCP_SERVER_URLS = {
|
|
10
10
|
linear: "https://mcp.linear.app/mcp",
|
|
@@ -13,8 +13,8 @@ const KNOWN_MCP_SERVER_URLS = {
|
|
|
13
13
|
};
|
|
14
14
|
const DEFAULT_CHECKPOINT_COMMENT = "groundcrew remote runner baseline: selected agent auth, git identity, and MCP config";
|
|
15
15
|
const CLAUDE_SUBSCRIPTION_LOGIN_FLAG = ["--claude", "ai"].join("");
|
|
16
|
-
const DEFAULT_REPOSITORY_OWNER = "ClipboardHealth";
|
|
17
16
|
const DEFAULT_GIT_REMOTE = "origin";
|
|
17
|
+
const BOOTSTRAP_SECRET_FLAGS_CONFLICT_MESSAGE = "--secret and --no-secrets are mutually exclusive. Use --secret to forward selected build secrets or --no-secrets to disable secret forwarding.";
|
|
18
18
|
const DATADOG_PUP_VERSION = "0.63.0";
|
|
19
19
|
const DATADOG_OAUTH_CALLBACK_PORT = 8000;
|
|
20
20
|
const DATADOG_AUTH_STATUS_RETRY_ATTEMPTS = 5;
|
|
@@ -53,9 +53,9 @@ function usage() {
|
|
|
53
53
|
"Bootstrap options:",
|
|
54
54
|
" --branch <branch> Checkout/create a ticket branch before installing deps",
|
|
55
55
|
" --base <branch> Base branch used when creating a missing branch (default: git.defaultBranch)",
|
|
56
|
-
" --owner <owner> GitHub owner for bare repo names (default:
|
|
56
|
+
" --owner <owner> GitHub owner for bare repo names (default: remote.owner)",
|
|
57
57
|
" --secret <env-name> Forward one required build secret; repeat for multiple",
|
|
58
|
-
" --no-secrets Do not forward
|
|
58
|
+
" --no-secrets Do not forward configured build secrets even if present",
|
|
59
59
|
"",
|
|
60
60
|
"Bootstrap example:",
|
|
61
61
|
" crew remote bootstrap crew-claude-1 core-utils --branch rocky-team-123",
|
|
@@ -232,7 +232,7 @@ function parseBootstrapArguments(argv) {
|
|
|
232
232
|
throw new Error(usage());
|
|
233
233
|
}
|
|
234
234
|
validateRepository(repository);
|
|
235
|
-
let owner
|
|
235
|
+
let owner;
|
|
236
236
|
let baseBranch;
|
|
237
237
|
let branchName;
|
|
238
238
|
let shouldUseSecrets = true;
|
|
@@ -259,6 +259,9 @@ function parseBootstrapArguments(argv) {
|
|
|
259
259
|
continue;
|
|
260
260
|
}
|
|
261
261
|
if (argument === "--secret") {
|
|
262
|
+
if (!shouldUseSecrets) {
|
|
263
|
+
throw new Error(BOOTSTRAP_SECRET_FLAGS_CONFLICT_MESSAGE);
|
|
264
|
+
}
|
|
262
265
|
const secretName = requireValue(argv, index, "--secret");
|
|
263
266
|
validateSecretName(secretName);
|
|
264
267
|
selectedSecretNames.push(secretName);
|
|
@@ -267,6 +270,9 @@ function parseBootstrapArguments(argv) {
|
|
|
267
270
|
continue;
|
|
268
271
|
}
|
|
269
272
|
if (argument === "--no-secrets") {
|
|
273
|
+
if (selectedSecretNames.length > 0 || shouldRequireSelectedSecrets) {
|
|
274
|
+
throw new Error(BOOTSTRAP_SECRET_FLAGS_CONFLICT_MESSAGE);
|
|
275
|
+
}
|
|
270
276
|
shouldUseSecrets = false;
|
|
271
277
|
continue;
|
|
272
278
|
}
|
|
@@ -275,10 +281,10 @@ function parseBootstrapArguments(argv) {
|
|
|
275
281
|
return {
|
|
276
282
|
runnerName,
|
|
277
283
|
repository,
|
|
278
|
-
owner,
|
|
279
|
-
secretNames: selectedSecretNames.length > 0 ? selectedSecretNames : [...BUILD_SECRET_NAMES],
|
|
280
284
|
shouldRequireSelectedSecrets,
|
|
281
285
|
shouldUseSecrets,
|
|
286
|
+
...(owner === undefined ? {} : { owner }),
|
|
287
|
+
...(selectedSecretNames.length > 0 ? { secretNames: selectedSecretNames } : {}),
|
|
282
288
|
...(baseBranch === undefined ? {} : { baseBranch }),
|
|
283
289
|
...(branchName === undefined ? {} : { branchName }),
|
|
284
290
|
};
|
|
@@ -620,17 +626,6 @@ async function checkpoint(arguments_) {
|
|
|
620
626
|
}
|
|
621
627
|
await provider.checkpoint(config, options.checkpointComment);
|
|
622
628
|
}
|
|
623
|
-
function repositorySlug(options) {
|
|
624
|
-
return options.repository.includes("/")
|
|
625
|
-
? options.repository
|
|
626
|
-
: `${options.owner}/${options.repository}`;
|
|
627
|
-
}
|
|
628
|
-
function repositoryDirectoryName(repository) {
|
|
629
|
-
const name = repository.includes("/")
|
|
630
|
-
? repository.slice(repository.lastIndexOf("/") + 1)
|
|
631
|
-
: repository;
|
|
632
|
-
return name.endsWith(".git") ? name.slice(0, -4) : name;
|
|
633
|
-
}
|
|
634
629
|
function validateRemoteBootstrapOptions(options) {
|
|
635
630
|
validateRepository(options.repository);
|
|
636
631
|
validateRepositoryOwner(options.owner);
|
|
@@ -644,8 +639,9 @@ function validateRemoteBootstrapOptions(options) {
|
|
|
644
639
|
}
|
|
645
640
|
}
|
|
646
641
|
function remoteBootstrapCommand(options) {
|
|
647
|
-
const slug =
|
|
648
|
-
const directoryName =
|
|
642
|
+
const slug = remoteRepositorySlug(options.owner, options.repository);
|
|
643
|
+
const directoryName = remoteRepositoryDirectoryName(options.owner, options.repository);
|
|
644
|
+
const repoDir = remotePathJoin(options.repoRoot, directoryName);
|
|
649
645
|
const baseRef = `${options.gitRemote}/${options.baseBranch}`;
|
|
650
646
|
const unsetSecretsLine = options.secretNames.length === 0 ? ":" : `unset ${options.secretNames.join(" ")}`;
|
|
651
647
|
const checkoutLines = options.branchName === undefined
|
|
@@ -661,9 +657,10 @@ function remoteBootstrapCommand(options) {
|
|
|
661
657
|
"set -euo pipefail",
|
|
662
658
|
`cleanup() { rm -f ${shellSingleQuote(REMOTE_SECRETS_FILE)}; ${unsetSecretsLine}; }`,
|
|
663
659
|
"trap cleanup EXIT",
|
|
660
|
+
`repo_root=${shellSingleQuote(options.repoRoot)}`,
|
|
661
|
+
`repo_dir=${shellSingleQuote(repoDir)}`,
|
|
664
662
|
`git_remote=${shellSingleQuote(options.gitRemote)}`,
|
|
665
|
-
'mkdir -p "$
|
|
666
|
-
`repo_dir="$HOME/dev"/${shellSingleQuote(directoryName)}`,
|
|
663
|
+
'mkdir -p "$repo_root"',
|
|
667
664
|
'if [ ! -d "$repo_dir/.git" ]; then',
|
|
668
665
|
` gh repo clone ${shellSingleQuote(slug)} "$repo_dir"`,
|
|
669
666
|
"fi",
|
|
@@ -680,10 +677,19 @@ function remoteBootstrapCommand(options) {
|
|
|
680
677
|
}
|
|
681
678
|
async function resolveBootstrapOptions(options) {
|
|
682
679
|
const config = await loadConfig();
|
|
680
|
+
const remoteConfig = {
|
|
681
|
+
...config.remote,
|
|
682
|
+
runnerName: options.runnerName,
|
|
683
|
+
secretNames: [...config.remote.secretNames],
|
|
684
|
+
};
|
|
683
685
|
return {
|
|
684
686
|
...options,
|
|
687
|
+
owner: options.owner ?? remoteConfig.owner,
|
|
685
688
|
baseBranch: options.baseBranch ?? config.git.defaultBranch,
|
|
686
689
|
gitRemote: config.git.remote,
|
|
690
|
+
repoRoot: remoteConfig.repoRoot,
|
|
691
|
+
remoteConfig,
|
|
692
|
+
secretNames: options.secretNames ?? [...remoteConfig.secretNames],
|
|
687
693
|
};
|
|
688
694
|
}
|
|
689
695
|
function noSecretCleanup() {
|
|
@@ -721,12 +727,14 @@ function stageBuildSecrets(options) {
|
|
|
721
727
|
};
|
|
722
728
|
}
|
|
723
729
|
export async function bootstrapRemoteRepository(options) {
|
|
730
|
+
const config = options.remoteConfig ?? remoteConfigWithRunnerName(options.runnerName);
|
|
724
731
|
const bootstrapOptions = {
|
|
725
732
|
...options,
|
|
726
733
|
gitRemote: options.gitRemote ?? DEFAULT_GIT_REMOTE,
|
|
734
|
+
repoRoot: options.repoRoot ?? config.repoRoot,
|
|
735
|
+
remoteConfig: config,
|
|
727
736
|
};
|
|
728
737
|
validateRemoteBootstrapOptions(bootstrapOptions);
|
|
729
|
-
const config = remoteConfigWithRunnerName(options.runnerName);
|
|
730
738
|
const provider = providerFor(config);
|
|
731
739
|
if (!(await provider.runnerExists(config))) {
|
|
732
740
|
throw new Error(`Remote runner ${options.runnerName} does not exist. Run crew remote setup first.`);
|
|
@@ -739,7 +747,7 @@ export async function bootstrapRemoteRepository(options) {
|
|
|
739
747
|
const files = stagedSecrets.filePath === undefined
|
|
740
748
|
? []
|
|
741
749
|
: [{ localPath: stagedSecrets.filePath, remotePath: REMOTE_SECRETS_FILE }];
|
|
742
|
-
log(`Bootstrapping ${
|
|
750
|
+
log(`Bootstrapping ${remoteRepositorySlug(bootstrapOptions.owner, bootstrapOptions.repository)} in ${options.runnerName}`);
|
|
743
751
|
await provider.runCommand({
|
|
744
752
|
config,
|
|
745
753
|
files,
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -15,8 +15,7 @@ export declare function isRemoteRunnerProviderName(value: unknown): value is Rem
|
|
|
15
15
|
/**
|
|
16
16
|
* Which terminal session manager hosts the agent process:
|
|
17
17
|
*
|
|
18
|
-
* - `auto`: pick the first available — cmux
|
|
19
|
-
* else tmux.
|
|
18
|
+
* - `auto`: pick the first available — cmux when installed, else tmux.
|
|
20
19
|
* - `cmux`: require the cmux binary; fail loudly if missing.
|
|
21
20
|
* - `tmux`: require the tmux binary; fail loudly if missing.
|
|
22
21
|
*/
|
|
@@ -173,7 +172,7 @@ export interface ResolvedConfig {
|
|
|
173
172
|
};
|
|
174
173
|
/**
|
|
175
174
|
* Terminal session manager. Always present — defaults to `"auto"`.
|
|
176
|
-
* `auto` resolves to cmux
|
|
175
|
+
* `auto` resolves to cmux when installed, else tmux.
|
|
177
176
|
*/
|
|
178
177
|
workspaceKind: WorkspaceKindSetting;
|
|
179
178
|
remote: RemoteRunnerConfig;
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjD,eAAO,MAAM,iBAAiB,EAAE,SAAS,eAAe,EAAiC,CAAC;AAE1F,eAAO,MAAM,4BAA4B,YAAI,QAAQ,CAAU,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAI5F;AAED
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"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
|
hasCmux: boolean;
|
|
11
11
|
/** True when the `tmux` binary is on PATH. */
|
|
12
12
|
hasTmux: boolean;
|
|
13
|
-
/** True when the host platform is macOS.
|
|
13
|
+
/** True when the host platform is macOS. Safehouse is macOS-only. */
|
|
14
14
|
isMacOS: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* True when the host platform is one Safehouse supports. Safehouse is
|
package/dist/lib/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/lib/host.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/lib/host.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc1F;AAED,wBAAsB,sBAAsB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAc5F"}
|
|
@@ -66,6 +66,9 @@ export interface RemoteRunnerProvider {
|
|
|
66
66
|
createWorktree(arguments_: RemoteWorktreeCreateArguments): Promise<RemoteWorktreeLocation>;
|
|
67
67
|
removeWorktree(arguments_: RemoteWorktreeRemoveArguments): Promise<void>;
|
|
68
68
|
}
|
|
69
|
+
export declare function remotePathJoin(root: string, leaf: string): string;
|
|
70
|
+
export declare function remoteRepositorySlug(owner: string, repository: string): string;
|
|
71
|
+
export declare function remoteRepositoryDirectoryName(owner: string, repository: string): string;
|
|
69
72
|
export declare const spriteRemoteRunnerProvider: RemoteRunnerProvider;
|
|
70
73
|
export declare function remoteConfigWithRunnerName(runnerName: string): RemoteRunnerConfig;
|
|
71
74
|
export declare function getRemoteRunnerProvider(provider: RemoteRunnerProviderName): RemoteRunnerProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spriteRemoteRunnerProvider.d.ts","sourceRoot":"","sources":["../../src/lib/spriteRemoteRunnerProvider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAShF,eAAO,MAAM,+BAA+B;uBAChC,QAAQ;yBACN,eAAe;oBACpB,iBAAiB;uBACd,kBAAkB;2BACd,mCAAmC;CACS,CAAC;AAE7D,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAED,UAAU,yBAAyB;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC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AAuB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,oBAAoB,CAKhG"}
|
|
@@ -82,18 +82,18 @@ function buildSpriteTtyCommand(arguments_) {
|
|
|
82
82
|
...arguments_.remoteArguments.map(shellSingleQuote),
|
|
83
83
|
].join(" ");
|
|
84
84
|
}
|
|
85
|
-
function remotePathJoin(root, leaf) {
|
|
85
|
+
export function remotePathJoin(root, leaf) {
|
|
86
86
|
let end = root.length;
|
|
87
87
|
while (end > 0 && root[end - 1] === "/") {
|
|
88
88
|
end -= 1;
|
|
89
89
|
}
|
|
90
90
|
return `${root.slice(0, end)}/${leaf}`;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
export function remoteRepositorySlug(owner, repository) {
|
|
93
93
|
return repository.includes("/") ? repository : `${owner}/${repository}`;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
const slug =
|
|
95
|
+
export function remoteRepositoryDirectoryName(owner, repository) {
|
|
96
|
+
const slug = remoteRepositorySlug(owner, repository);
|
|
97
97
|
const normalizedSlug = slug.endsWith(".git") ? slug.slice(0, -4) : slug;
|
|
98
98
|
return normalizedSlug.replaceAll("/", "--");
|
|
99
99
|
}
|
|
@@ -104,7 +104,7 @@ function worktreeTicketComponent(ticket) {
|
|
|
104
104
|
return ticket;
|
|
105
105
|
}
|
|
106
106
|
function spriteCreateWorktreeCommand(arguments_) {
|
|
107
|
-
const slug =
|
|
107
|
+
const slug = remoteRepositorySlug(arguments_.owner, arguments_.repository);
|
|
108
108
|
const branchRemoteRef = `refs/remotes/${arguments_.gitRemote}/${arguments_.branchName}`;
|
|
109
109
|
const branchRef = `${arguments_.gitRemote}/${arguments_.branchName}`;
|
|
110
110
|
const baseRef = `${arguments_.gitRemote}/${arguments_.baseBranch}`;
|
|
@@ -317,7 +317,7 @@ export const spriteRemoteRunnerProvider = {
|
|
|
317
317
|
},
|
|
318
318
|
async createWorktree(arguments_) {
|
|
319
319
|
const { config, repository, ticket, branchName, baseBranch, gitRemote, signal } = arguments_;
|
|
320
|
-
const remoteRepositoryName =
|
|
320
|
+
const remoteRepositoryName = remoteRepositoryDirectoryName(config.owner, repository);
|
|
321
321
|
const remoteRepoDir = remotePathJoin(config.repoRoot, remoteRepositoryName);
|
|
322
322
|
const remoteWorktreeDir = remotePathJoin(config.worktreeRoot, `${remoteRepositoryName}-${worktreeTicketComponent(ticket)}`);
|
|
323
323
|
await runCommandAsync("sprite", [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.d.ts","sourceRoot":"","sources":["../../src/lib/workspaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG1E,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAoL7C,MAAM,WAAW,mBAAmB;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AE,oBAAoB,CAAC;IAChC,QAAQ,EAAE,aAAa,CAAC;IACxB,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,gBAAgB;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,gBAAgB,GAAG,mBAAmB,CAUtF;AAwND,iBAAe,eAAe,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CAezB;AAED,eAAO,MAAM,UAAU;IACf,IAAI,SAAS,cAAc,QAAQ,QAAQ,WAAW,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvF,KAAK;IACC,KAAK,SAAS,cAAc,QAAQ,MAAM,WAAW,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAIvF,CAAC"}
|
package/dist/lib/workspaces.js
CHANGED
|
@@ -158,17 +158,14 @@ export function resolveWorkspaceKind(arguments_) {
|
|
|
158
158
|
}
|
|
159
159
|
function resolveAuto(arguments_) {
|
|
160
160
|
const { requested, host } = arguments_;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
// default and behaves correctly cross-platform.
|
|
164
|
-
if (host.isMacOS && host.hasCmux) {
|
|
165
|
-
return { requested, resolved: "cmux", reason: "auto: macOS with cmux available" };
|
|
161
|
+
if (host.hasCmux) {
|
|
162
|
+
return { requested, resolved: "cmux", reason: "auto: cmux available" };
|
|
166
163
|
}
|
|
167
164
|
if (host.hasTmux) {
|
|
168
165
|
return {
|
|
169
166
|
requested,
|
|
170
167
|
resolved: "tmux",
|
|
171
|
-
reason: "auto: cmux unavailable
|
|
168
|
+
reason: "auto: cmux unavailable, falling back to tmux",
|
|
172
169
|
};
|
|
173
170
|
}
|
|
174
171
|
throw new Error("workspaceKind 'auto' could not pick a backend: neither cmux nor tmux is on PATH. Install one or set workspaceKind explicitly.");
|
|
@@ -178,9 +175,6 @@ const HOST_CAPABILITY_BY_KIND = {
|
|
|
178
175
|
tmux: "hasTmux",
|
|
179
176
|
};
|
|
180
177
|
function failIfBinaryUnavailable(kind, host) {
|
|
181
|
-
if (kind === "cmux" && !host.isMacOS) {
|
|
182
|
-
throw new Error("workspaceKind 'cmux' is only supported on macOS. Switch to 'tmux' or 'auto' on this platform.");
|
|
183
|
-
}
|
|
184
178
|
if (!host[HOST_CAPABILITY_BY_KIND[kind]]) {
|
|
185
179
|
throw new Error(`workspaceKind '${kind}' is set but the ${kind} binary is not on PATH. Install ${kind} or change the setting.`);
|
|
186
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.5",
|
|
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",
|