@clipboard-health/groundcrew 1.9.0 → 1.10.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/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAiGA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBvD"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAmHA,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BvD"}
package/dist/cli.js CHANGED
@@ -1,9 +1,11 @@
1
+ import { createRequire } from "node:module";
1
2
  import { cleanupWorkspaceCli } from "./commands/cleanupWorkspace.js";
2
3
  import { doctor } from "./commands/doctor.js";
3
4
  import { orchestrate } from "./commands/orchestrator.js";
4
5
  import { remoteCli } from "./commands/remoteSetup.js";
5
6
  import { setupWorkspaceCli } from "./commands/setupWorkspace.js";
6
7
  import { errorMessage, writeError, writeOutput } from "./lib/util.js";
8
+ const requireFromCli = createRequire(import.meta.url);
7
9
  async function runCli(argv) {
8
10
  let watch = false;
9
11
  let dryRun = false;
@@ -72,6 +74,10 @@ const SUBCOMMANDS = {
72
74
  function printHelp() {
73
75
  const width = Math.max(...Object.keys(SUBCOMMANDS).map((key) => key.length));
74
76
  writeOutput("Usage: crew <command> [...args]\n");
77
+ writeOutput("Options:");
78
+ writeOutput(" -h, --help Show help");
79
+ writeOutput(" -v, --version Print version");
80
+ writeOutput("");
75
81
  writeOutput("Commands:");
76
82
  for (const [name, command] of Object.entries(SUBCOMMANDS)) {
77
83
  writeOutput(` ${name.padEnd(width)} ${command.summary}`);
@@ -81,6 +87,11 @@ function printHelp() {
81
87
  }
82
88
  writeOutput("\nSee README.md for full configuration and behavior.");
83
89
  }
90
+ function packageVersion() {
91
+ // oxlint-disable-next-line typescript-eslint/no-unsafe-assignment -- package.json is shipped with this package and is the version source of truth.
92
+ const packageMetadata = requireFromCli("../package.json");
93
+ return packageMetadata.version;
94
+ }
84
95
  export async function run(argv) {
85
96
  const [subcommand, ...rest] = argv;
86
97
  if (subcommand === undefined || subcommand === "-h" || subcommand === "--help") {
@@ -90,6 +101,10 @@ export async function run(argv) {
90
101
  }
91
102
  return;
92
103
  }
104
+ if (subcommand === "-v" || subcommand === "--version") {
105
+ writeOutput(packageVersion());
106
+ return;
107
+ }
93
108
  const command = SUBCOMMANDS[subcommand];
94
109
  if (!command) {
95
110
  writeError(`Unknown command: ${subcommand}\n`);
@@ -1 +1 @@
1
- {"version":3,"file":"setupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAa1B,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAgBD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAkED,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,EAC9B,UAAU,GAAE,wBAA6B,GACxC,OAAO,CAAC,IAAI,CAAC,CA6Ef;AAuHD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAoBf"}
1
+ {"version":3,"file":"setupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAa1B,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAgBD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,wEAAwE;IACxE,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAsED,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,EAC9B,UAAU,GAAE,wBAA6B,GACxC,OAAO,CAAC,IAAI,CAAC,CA8Ef;AAuHD,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAoBf"}
@@ -54,6 +54,9 @@ function stageLaunchScript(promptDir, command) {
54
54
  writeFileSync(launcherFile, `#!/usr/bin/env bash\n${command}\n`, { mode: 0o700 });
55
55
  return launcherFile;
56
56
  }
57
+ function stageWorkspaceLaunchCommand(promptDir, command) {
58
+ return `bash ${shellSingleQuote(stageLaunchScript(promptDir, command))}`;
59
+ }
57
60
  function stagePrompt(input) {
58
61
  const promptDir = mkdtempSync(join(tmpdir(), `groundcrew-${input.ticket}-`));
59
62
  const promptFile = join(promptDir, "prompt.txt");
@@ -109,12 +112,13 @@ export async function setupWorkspace(config, options, runOptions = {}) {
109
112
  const stagedPrompt = stagePrompt({ config, ticket, ticketDetails, worktreeName });
110
113
  promptDir = stagedPrompt.directory;
111
114
  const secretsFile = stageBuildSecrets(promptDir);
112
- const launchCmd = buildLaunchCommand({
115
+ const launchCommand = buildLaunchCommand({
113
116
  definition,
114
117
  promptFile: stagedPrompt.file,
115
118
  worktreeDir: launchDir,
116
119
  secretsFile,
117
120
  });
121
+ const launchCmd = stageWorkspaceLaunchCommand(promptDir, launchCommand);
118
122
  log("Opening workspace...");
119
123
  await workspaces.open(config, {
120
124
  name: ticket,
@@ -171,7 +175,7 @@ async function setupRemoteWorkspace(arguments_) {
171
175
  secretNames: config.remote.secretNames,
172
176
  ...(secretsFile === undefined ? {} : { secretsFile, remoteSecretsFile }),
173
177
  });
174
- const launchCmd = `bash ${shellSingleQuote(stageLaunchScript(promptDir, remoteLaunchCommand))}`;
178
+ const launchCmd = stageWorkspaceLaunchCommand(promptDir, remoteLaunchCommand);
175
179
  log("Opening workspace...");
176
180
  await workspaces.open(config, {
177
181
  name: ticket,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/groundcrew",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
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",