@clipboard-health/groundcrew 4.9.0 → 4.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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  </p>
7
7
 
8
8
  <p align="center">
9
- Dispatch your ticket backlog to AI coding agents. One git worktree per ticket, sandboxed by default.
9
+ Dispatch your ticket backlog to local, interactive AI coding agents. One git worktree per ticket, sandboxed by default.
10
10
  </p>
11
11
 
12
12
  <p align="center">
@@ -17,16 +17,22 @@
17
17
  </p>
18
18
 
19
19
  <p align="center">
20
- <img alt="Groundcrew picking up tickets and running coding agents in parallel" src="./static/demo.gif" width="800">
20
+ <a href="./static/demo.tape"><img alt="Groundcrew dispatching tickets into tmux panes with coding agents running in parallel" src="./static/demo.gif" width="800"></a>
21
+ </p>
22
+
23
+ <p align="center">
24
+ VHS source: <a href="./static/demo.tape">static/demo.tape</a>.
21
25
  </p>
22
26
 
23
27
  Groundcrew watches assigned tickets, creates isolated worktrees, launches agent CLIs in dedicated terminals, and leaves each ticket's work on its own PR-ready branch. For the backstory, read _[Tickets to pull requests while you sleep](https://www.clipboardworks.com/resources/blog/tickets-to-pull-requests-while-you-sleep)_.
24
28
 
25
29
  ## Why
26
30
 
31
+ - **Local.** Agents run on your machine with your tools, shell, and credentials. That makes them more steerable than remote agents, and easy to nudge when they drift.
32
+ - **Interactive.** Each ticket launches the real `claude` or `codex` CLI in its own terminal pane, not a wrapper that approximates it. Watch any session live and take over when you need to.
27
33
  - **One worktree per ticket.** Agents work in parallel without stepping on each other.
34
+ - **Sandboxed by default.** Safehouse or Docker Sandboxes isolate each agent on the host; `none` is an explicit escape hatch.
28
35
  - **Pluggable ticket sources.** Linear by default; Jira and local files via [ticket sources](./docs/ticket-sources.md).
29
- - **Local-first isolation.** Safehouse, Docker Sandboxes, or an explicit `none` escape hatch.
30
36
  - **Multi-agent routing.** Ships `claude` and `codex` presets; bring your own CLI in config.
31
37
 
32
38
  ## Prerequisites
@@ -83,8 +89,7 @@ crew init [--global | --local] [--force] [--dry-run] # create a crew.config.
83
89
  [--runner <auto|safehouse|sdx|none>] [--model <claude|codex>]
84
90
  crew doctor # check setup
85
91
  crew status [<TICKET>] # inspect current state or one ticket
86
- crew run # one-shot orchestration
87
- crew run --watch # poll forever
92
+ crew run [--watch] # one-shot or --watch forever
88
93
  crew start <TICKET> # provision + launch one ticket now
89
94
  crew stop <TICKET> [--reason <text>] # stop workspace, keep worktree
90
95
  crew resume <TICKET> # reopen a paused ticket
@@ -106,15 +111,18 @@ export default {
106
111
  projectDir: "~/dev",
107
112
  knownRepositories: ["OWNER/REPO"],
108
113
  },
109
- local: {
110
- runner: "auto",
111
- },
112
114
  models: {
113
115
  default: "claude",
114
116
  definitions: {
115
117
  claude: {},
116
118
  },
117
119
  },
120
+ defaults: {
121
+ hooks: {
122
+ // No-op placeholder; replace with your repo's setup, e.g. "npm ci".
123
+ prepareWorktree: "true",
124
+ },
125
+ },
118
126
  } satisfies Config;
119
127
  ```
120
128
 
@@ -143,6 +151,12 @@ node --run crew:op -- run --watch
143
151
 
144
152
  Both forms discover config through cosmiconfig. Source edits in `src/**` are picked up on the next invocation. Requires Node >= 24.
145
153
 
154
+ Regenerate the README demo with VHS:
155
+
156
+ ```bash
157
+ ./static/render-demo.sh
158
+ ```
159
+
146
160
  ## License
147
161
 
148
162
  [MIT](./LICENSE)
@@ -64,8 +64,9 @@ raw.githubusercontent.com
64
64
  release-assets.githubusercontent.com
65
65
  results-receiver.actions.githubusercontent.com
66
66
 
67
- # npm registry + package website
67
+ # npm/Conda registries + package websites
68
68
  api.npmjs.org
69
+ conda.anaconda.org
69
70
  registry.npmjs.org
70
71
  www.npmjs.com
71
72
 
@@ -83,6 +84,9 @@ formulae.brew.sh
83
84
  hub.docker.com
84
85
  index.docker.io
85
86
  json.schemastore.org
87
+ mise-versions.jdx.dev
86
88
  nx.dev
89
+ playwright.azureedge.net
90
+ registry.terraform.io
87
91
  sourcegraph.com
88
92
  vitest.dev
@@ -35,6 +35,15 @@ export default {
35
35
  // },
36
36
  },
37
37
  },
38
+ // Repo-preparation hook: runs after each worktree is created and before the
39
+ // agent launches. The default below is a no-op placeholder. Replace it with
40
+ // your repo's setup, e.g. "npm ci" or "uv sync --dev --frozen". A repo-local
41
+ // `.groundcrew/config.json` hooks.prepareWorktree overrides this per repo.
42
+ defaults: {
43
+ hooks: {
44
+ prepareWorktree: "true",
45
+ },
46
+ },
38
47
  // Everything below is optional — defaults shown for reference. Uncomment
39
48
  // and edit to override.
40
49
  //
@@ -59,14 +68,6 @@ export default {
59
68
  //
60
69
  // git: { remote: "origin", defaultBranch: "main" },
61
70
  //
62
- // // Fallback repo-preparation hook for repos that do not define
63
- // // `.groundcrew/config.json` hooks.prepareWorktree. Repo-local config wins.
64
- // defaults: {
65
- // hooks: {
66
- // prepareWorktree: "test ! -f package-lock.json || npm ci",
67
- // },
68
- // },
69
- //
70
71
  // orchestrator: {
71
72
  // maximumInProgress: 4,
72
73
  // pollIntervalMilliseconds: 120_000,
@@ -1 +1 @@
1
- {"version":3,"file":"cleanupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/cleanupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMnE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAwBD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAef;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE"}
1
+ {"version":3,"file":"cleanupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/cleanupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQnE,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAwBD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE"}
@@ -1,6 +1,8 @@
1
1
  import { loadConfig } from "../lib/config.js";
2
+ import { readRunState, removeRunState } from "../lib/runState.js";
2
3
  import { recordCleanedUpRuns } from "../lib/runStateCleanup.js";
3
4
  import { log } from "../lib/util.js";
5
+ import { workspaces } from "../lib/workspaces.js";
4
6
  import { worktrees } from "../lib/worktrees.js";
5
7
  import { logTeardown } from "./teardownReporter.js";
6
8
  function parseArguments(argv) {
@@ -26,7 +28,21 @@ export async function cleanupWorkspace(config, options) {
26
28
  const { ticket, force = false } = options;
27
29
  const entries = worktrees.findByTicket(config, ticket);
28
30
  if (entries.length === 0) {
29
- log(`No worktree found for ${ticket}; nothing to clean up.`);
31
+ if (readRunState(config, ticket) === undefined) {
32
+ log(`No worktree found for ${ticket}; nothing to clean up.`);
33
+ return;
34
+ }
35
+ const workspaceProbe = await workspaces.probe(config);
36
+ if (workspaceProbe.kind === "unavailable") {
37
+ log(`No worktree found for ${ticket}; workspace probe unavailable, leaving run-state intact.`);
38
+ return;
39
+ }
40
+ if (workspaceProbe.names.has(ticket)) {
41
+ log(`No worktree found for ${ticket}; workspace still present; leaving run-state intact.`);
42
+ return;
43
+ }
44
+ removeRunState(config, ticket);
45
+ log(`No worktree found for ${ticket}; cleared stale run-state.`);
30
46
  return;
31
47
  }
32
48
  const result = await worktrees.teardown(config, entries, { force });
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuKH,wBAAsB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CA8E/C"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8KH,wBAAsB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAgF/C"}
@@ -5,7 +5,7 @@
5
5
  import { existsSync, statSync } from "node:fs";
6
6
  import { createBoard } from "../lib/board.js";
7
7
  import { buildSources, sourcesFromConfig } from "../lib/buildSources.js";
8
- import { loadConfig, } from "../lib/config.js";
8
+ import { loadConfigWithSource, } from "../lib/config.js";
9
9
  import { detectHostCapabilities, which } from "../lib/host.js";
10
10
  import { resolveLocalRunner } from "../lib/localRunner.js";
11
11
  import { gatedModels } from "../lib/usage.js";
@@ -15,6 +15,11 @@ import { resolveWorkspaceKind } from "../lib/workspaces.js";
15
15
  // catch wrapper + wrapped CLI commands like `safehouse claude --foo`.
16
16
  const MAX_TOKENS_PER_CMD = 2;
17
17
  const BUILT_IN_MODEL_NAMES = ["claude", "codex"];
18
+ const CONFIG_SOURCE_LABELS = {
19
+ env: "GROUNDCREW_CONFIG",
20
+ project: "project",
21
+ xdg: "global XDG",
22
+ };
18
23
  async function checkCmd(cmd, required, hint) {
19
24
  const path = await which(cmd);
20
25
  const resolvedHint = path ?? hint;
@@ -148,8 +153,10 @@ export async function doctor() {
148
153
  writeOutput("=================");
149
154
  let config;
150
155
  try {
151
- config = await loadConfig();
152
- writeOutput("[ok] config loaded");
156
+ const { config: loadedConfig, source } = await loadConfigWithSource();
157
+ config = loadedConfig;
158
+ const sourceLabel = CONFIG_SOURCE_LABELS[source.kind];
159
+ writeOutput(`[ok] config loaded — ${source.filepath} (${sourceLabel})`);
153
160
  }
154
161
  catch (error) {
155
162
  writeOutput(`[--] config: ${errorMessage(error)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAanE,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkjBD,wBAAsB,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU/F;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7D"}
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAanE,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAonBD,wBAAsB,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU/F;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAI7D"}
@@ -76,11 +76,14 @@ function ticketWorkspaceText(probe, ticket) {
76
76
  function isWorkspaceExited(probe, ticket) {
77
77
  return probe.kind === "ok" && probe.exitedNames?.has(ticket) === true;
78
78
  }
79
- function formatRunState(state) {
79
+ function formatRunState(state, flags = []) {
80
80
  if (state === undefined) {
81
81
  return "(none)";
82
82
  }
83
- const summary = `${state.state}; model=${state.model}; updated=${state.updatedAt}; resumes=${state.resumeCount}`;
83
+ // Only the leading lifecycle token gains the reconciliation flags; the
84
+ // `;`-separated detail (model/updated/resumes/reason) is preserved verbatim.
85
+ const lifecycle = flags.length === 0 ? state.state : `${state.state} (${flags.join(", ")})`;
86
+ const summary = `${lifecycle}; model=${state.model}; updated=${state.updatedAt}; resumes=${state.resumeCount}`;
84
87
  const detail = state.reason ?? state.detail;
85
88
  return detail === undefined ? summary : `${summary}; ${detail}`;
86
89
  }
@@ -174,7 +177,7 @@ async function writeTicketStatus(config, rawTicket) {
174
177
  const accessHint = await exitedWorkspaceAccessHint(config, workspaceProbe, ticket);
175
178
  writeOutput(formatTicketLine(ticket, runState, sourceStatus));
176
179
  writeTicketTitle(runState, sourceStatus);
177
- writeOutput(`run: ${formatRunState(runState)}`);
180
+ writeOutput(`run: ${formatRunState(runState, runProbeFlags(runState, workspaceProbe, ticket))}`);
178
181
  writeOutput(`workspace: ${ticketWorkspaceText(workspaceProbe, ticket)}`);
179
182
  if (accessHint !== undefined) {
180
183
  writeOutput(`attach: ${accessHint.command}`);
@@ -220,32 +223,43 @@ function formatDuration(ms) {
220
223
  const hours = Math.floor((ms - days * MS_PER_DAY) / MS_PER_HOUR);
221
224
  return hours === 0 ? `${days}d` : `${days}d ${hours}h`;
222
225
  }
226
+ /**
227
+ * Probe-reconciliation flags shared by the inventory row and the per-ticket
228
+ * `run:` line. Flags the two interesting disagreements between the recorded
229
+ * RunState lifecycle and the live workspace probe: a running/resumed dispatch
230
+ * with a missing or exited session, and an idle row with a stray live or
231
+ * exited session. `probe.kind === "unavailable"` is "we don't know" and yields
232
+ * no flags. Excludes the duration token, which only the inventory row appends.
233
+ */
234
+ function runProbeFlags(runState, probe, ticket) {
235
+ if (probe.kind !== "ok") {
236
+ return [];
237
+ }
238
+ const lifecycle = runState?.state ?? "idle";
239
+ const sessionPresent = probe.names.has(ticket);
240
+ const sessionExited = isWorkspaceExited(probe, ticket);
241
+ const flags = [];
242
+ if (lifecycle === "idle" && sessionPresent) {
243
+ flags.push(sessionExited ? "stray exited session" : "stray session");
244
+ }
245
+ if ((lifecycle === "running" || lifecycle === "resumed") && sessionExited) {
246
+ flags.push("session exited");
247
+ }
248
+ else if ((lifecycle === "running" || lifecycle === "resumed") && !sessionPresent) {
249
+ flags.push("session dead");
250
+ }
251
+ return flags;
252
+ }
223
253
  /**
224
254
  * Combined human-readable state for the inventory row. Surfaces RunState
225
255
  * lifecycle and flags the two interesting disagreements with the workspace
226
- * probe. A recorded running dispatch can have a missing or exited session;
227
- * an idle row can have a stray live or exited session. `probe.kind ===
228
- * "unavailable"` is treated as "we don't know" and never produces a suffix.
229
- * When the row is actively running, appends the elapsed wall-clock time since
230
- * dispatch.
256
+ * probe via `runProbeFlags`. When the row is actively running, appends the
257
+ * elapsed wall-clock time since dispatch.
231
258
  */
232
259
  function inventoryStateText(runState, probe, ticket, now) {
233
260
  const lifecycle = runState?.state ?? "idle";
261
+ const flags = runProbeFlags(runState, probe, ticket);
234
262
  const duration = runStateDurationMs(runState, now);
235
- const flags = [];
236
- if (probe.kind === "ok") {
237
- const sessionPresent = probe.names.has(ticket);
238
- const sessionExited = isWorkspaceExited(probe, ticket);
239
- if (lifecycle === "idle" && sessionPresent) {
240
- flags.push(sessionExited ? "stray exited session" : "stray session");
241
- }
242
- if ((lifecycle === "running" || lifecycle === "resumed") && sessionExited) {
243
- flags.push("session exited");
244
- }
245
- else if ((lifecycle === "running" || lifecycle === "resumed") && !sessionPresent) {
246
- flags.push("session dead");
247
- }
248
- }
249
263
  if (duration !== undefined) {
250
264
  flags.push(formatDuration(duration));
251
265
  }
@@ -459,6 +473,43 @@ function writeQueueSections(boardResult) {
459
473
  function inProgressCount(issues) {
460
474
  return issues.filter((issue) => issue.status === "in-progress").length;
461
475
  }
476
+ /**
477
+ * In-progress board issues that have no local worktree. These count toward the
478
+ * `slots: N/M used` total but are absent from the Worktrees section (their
479
+ * worktree was removed, or lives outside this config's projectDir /
480
+ * knownRepositories), so without this they'd be counted yet invisible. Worktree
481
+ * tickets are lowercased, so the natural id is lowercased before matching.
482
+ */
483
+ function inProgressWithoutWorktree(issues, worktreeTickets) {
484
+ return issues
485
+ .filter((issue) => issue.status === "in-progress")
486
+ .filter((issue) => !worktreeTickets.has(naturalIdFromCanonical(issue.id).toLowerCase()))
487
+ .toSorted((left, right) => left.id.localeCompare(right.id));
488
+ }
489
+ function writeInProgressIssue(issue) {
490
+ const naturalId = naturalIdFromCanonical(issue.id);
491
+ writeOutput(issue.url === undefined ? naturalId : `${naturalId} ${issue.url}`);
492
+ writeOutput(inventoryField("title", issue.title));
493
+ if (issue.repository !== undefined) {
494
+ writeOutput(inventoryField("repo", issue.repository));
495
+ }
496
+ }
497
+ function writeInProgressWithoutWorktree(boardResult, worktreeTickets) {
498
+ if (boardResult.kind !== "ok") {
499
+ return;
500
+ }
501
+ const issues = inProgressWithoutWorktree(boardResult.issues, worktreeTickets);
502
+ if (issues.length === 0) {
503
+ return;
504
+ }
505
+ writeSection("In progress (no local worktree)");
506
+ for (const [index, issue] of issues.entries()) {
507
+ if (index > 0) {
508
+ writeOutput();
509
+ }
510
+ writeInProgressIssue(issue);
511
+ }
512
+ }
462
513
  async function writeInventoryStatus(config) {
463
514
  // Banner ("groundcrew status\n=================") dropped: the command
464
515
  // you just ran already tells you what report you're looking at, and the
@@ -469,6 +520,7 @@ async function writeInventoryStatus(config) {
469
520
  const worktreeTickets = new Set(worktrees.list(config).map((entry) => entry.ticket));
470
521
  writeStraySessions(probe, worktreeTickets);
471
522
  const boardResult = await boardResultPromise;
523
+ writeInProgressWithoutWorktree(boardResult, worktreeTickets);
472
524
  if (boardResult.kind === "ok") {
473
525
  const used = inProgressCount(boardResult.issues);
474
526
  writeOutput();
@@ -241,6 +241,15 @@ export interface ResolvedConfig {
241
241
  file: string;
242
242
  };
243
243
  }
244
+ export type ConfigSourceKind = "env" | "project" | "xdg";
245
+ export interface ConfigSource {
246
+ kind: ConfigSourceKind;
247
+ filepath: string;
248
+ }
249
+ export interface LoadedConfig {
250
+ config: Readonly<ResolvedConfig>;
251
+ source: Readonly<ConfigSource>;
252
+ }
244
253
  /**
245
254
  * Single source of truth for "is preLaunchEnv asking us to forward anything?"
246
255
  *
@@ -258,5 +267,6 @@ export declare function hasPreLaunchEnv(definition: Pick<ModelDefinition, "preLa
258
267
  * not enabled from an arbitrary unknown label like `agent-typo`.
259
268
  */
260
269
  export declare function isBuiltInModelNotEnabled(config: Pick<ResolvedConfig, "models">, name: string): boolean;
270
+ export declare function loadConfigWithSource(): Promise<Readonly<LoadedConfig>>;
261
271
  export declare function loadConfig(): Promise<Readonly<ResolvedConfig>>;
262
272
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAEpE,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5D,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EAIzD,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEtD,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAKrD,CAAC;AAEX;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MA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GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACjC,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;CAChC;AA2MD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,GAAG,OAAO,CAE1F;AA6FD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACtC,IAAI,EAAE,MAAM,GACX,OAAO,CAKT;AAqbD,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CA2B5E;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAGpE"}
@@ -606,26 +606,28 @@ async function discoverUserConfig() {
606
606
  if (!existsSync(overridePath)) {
607
607
  fail(`GROUNDCREW_CONFIG=${overridePath} not found`);
608
608
  }
609
- return await loadAt(overridePath);
609
+ const result = await loadAt(overridePath);
610
+ return { result, source: { kind: "env", filepath: result.filepath } };
610
611
  }
611
612
  const project = await explorer.search(process.cwd());
612
613
  if (project !== null && project.isEmpty !== true) {
613
- return project;
614
+ return { result: project, source: { kind: "project", filepath: project.filepath } };
614
615
  }
615
616
  const xdgPath = findXdgConfigFile();
616
617
  if (xdgPath !== undefined) {
617
- return await loadAt(xdgPath);
618
+ const result = await loadAt(xdgPath);
619
+ return { result, source: { kind: "xdg", filepath: result.filepath } };
618
620
  }
619
621
  // Throw directly so oxlint's `consistent-return` rule sees a
620
622
  // terminating statement; it doesn't track `fail()`'s `never` return.
621
623
  throw new Error(`groundcrew config: no crew config found. Create crew.config.ts in your project root, or ${xdgConfigPath("groundcrew", "crew.config.ts")}, or set GROUNDCREW_CONFIG.`);
622
624
  }
623
625
  let cached;
624
- export async function loadConfig() {
626
+ export async function loadConfigWithSource() {
625
627
  if (cached) {
626
628
  return cached;
627
629
  }
628
- const result = await discoverUserConfig();
630
+ const { result, source } = await discoverUserConfig();
629
631
  const { filepath, isEmpty } = result;
630
632
  const userConfig = result.config;
631
633
  if (isEmpty === true || !isPlainObject(userConfig)) {
@@ -636,6 +638,13 @@ export async function loadConfig() {
636
638
  const resolved = applyDefaults(userConfig);
637
639
  validate(resolved);
638
640
  setLogFile(resolved.logging.file);
639
- cached = Object.freeze(resolved);
641
+ cached = Object.freeze({
642
+ config: Object.freeze(resolved),
643
+ source: Object.freeze(source),
644
+ });
640
645
  return cached;
641
646
  }
647
+ export async function loadConfig() {
648
+ const loadedConfig = await loadConfigWithSource();
649
+ return loadedConfig.config;
650
+ }
package/docs/commands.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  `crew status <TICKET>` prints a read-only snapshot for one ticket: cached title and URL when present, recorded run state, live workspace presence, matching worktrees, git dirtiness, PR links for matching branches, recent log lines when present, and the ticket status from the configured ticket source.
6
6
 
7
- `crew status` with no ticket prints the current inventory: known worktrees with cached ticket metadata, workspace/run-state agreement, attach hints, worktree paths, PR links, and stray sessions reported by the configured backend. Local diagnostics are printed before ticket-source fetches complete. When the source fetch succeeds, status also prints slot usage plus Queue/Blocked sections for eligible Todo tickets. If the source fetch fails, Queue shows `unavailable: <reason>` and the slots line is omitted.
7
+ `crew status` with no ticket prints the current inventory: known worktrees with cached ticket metadata, workspace/run-state agreement, attach hints, worktree paths, PR links, and stray sessions reported by the configured backend. Local diagnostics are printed before ticket-source fetches complete. When the source fetch succeeds, status also prints any in-progress source tickets with no local worktree, slot usage, and Queue/Blocked sections for eligible Todo tickets. Worktree-less in-progress rows include the ticket title, URL when the source provides one, and repository when the source resolves one. If the source fetch fails, Queue shows `unavailable: <reason>` and the slots line is omitted.
8
8
 
9
9
  Status is informational only. Use `crew cleanup <TICKET>` to tear down stale worktrees and `crew resume <TICKET>` to reopen preserved work.
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/groundcrew",
3
- "version": "4.9.0",
3
+ "version": "4.10.1",
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",
@@ -84,7 +84,7 @@
84
84
  "@typescript/native-preview": "7.0.0-dev.20260527.2",
85
85
  "@vitest/coverage-v8": "4.1.7",
86
86
  "cspell": "10.0.0",
87
- "dependency-cruiser": "17.4.2",
87
+ "dependency-cruiser": "17.4.3",
88
88
  "husky": "9.1.7",
89
89
  "jscpd": "4.2.4",
90
90
  "knip": "6.14.2",
@@ -0,0 +1,125 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # Semantic ANSI colors. Actual hues are defined by the VHS theme in demo.tape,
5
+ # so content and chrome stay in sync: green = orchestrator, yellow = codex,
6
+ # blue = claude, bright-black = dim chrome.
7
+ c_reset=$'\033[0m'
8
+ c_dim=$'\033[90m'
9
+ c_green=$'\033[32m'
10
+ c_amber=$'\033[33m'
11
+ c_blue=$'\033[34m'
12
+
13
+ export PS1="\[${c_green}\]groundcrew\[${c_dim}\] on \[${c_reset}\]main \[${c_green}\]\$\[${c_reset}\] "
14
+
15
+ tmux rename-window 'crew run --watch'
16
+ tmux set-option -g status off
17
+ tmux set-option -g pane-border-status top
18
+ tmux set-option -g pane-border-format ' #{?#{m:codex*,#{pane_title}},#[fg=#fbbf24],#{?#{m:claude*,#{pane_title}},#[fg=#60a5fa],#[fg=#77d94e]}}#[bold]#{pane_title}#[default] '
19
+ # Use one divider color for active and inactive panes. tmux highlights only the
20
+ # active-adjacent segment of a shared divider, so a distinct active color makes a
21
+ # single divider render two-tone (and the dim half reads as "missing"). A uniform
22
+ # color keeps every divider a clean, continuous line. Accent lives in pane titles.
23
+ tmux set-option -g pane-border-style 'fg=#52525b'
24
+ tmux set-option -g pane-active-border-style 'fg=#52525b'
25
+ tmux set-option -g remain-on-exit on
26
+
27
+ printf '\033]2;groundcrew\033\\'
28
+
29
+ # This agent script prints 12 lines into a split pane. The pane heights are set
30
+ # by `Set Height` in demo.tape (see the note there) so all 12 fit without
31
+ # scrolling — a scrolling pane makes its top border drift. If you add or remove
32
+ # output lines here, keep that height in sync.
33
+ demo_agent_script="$(mktemp "${TMPDIR:-/tmp}/groundcrew-vhs-agent.XXXXXX")"
34
+ trap 'rm -f "${demo_agent_script}"' EXIT
35
+ cat >"${demo_agent_script}" <<'SH'
36
+ #!/usr/bin/env bash
37
+ set -euo pipefail
38
+
39
+ ticket="${1}"
40
+ model="${2}"
41
+ title="${3}"
42
+ worktree="${4:-groundcrew-${ticket}}"
43
+ branch="groundcrew/${ticket}"
44
+
45
+ reset=$'\033[0m'
46
+ bold=$'\033[1m'
47
+ dim=$'\033[90m'
48
+ green=$'\033[32m'
49
+ case "${model}" in
50
+ codex) accent=$'\033[33m' ;;
51
+ claude) accent=$'\033[34m' ;;
52
+ *) accent=$'\033[32m' ;;
53
+ esac
54
+
55
+ printf '\033]2;%s %s\033\\' "${model}" "${ticket}"
56
+ printf '%s%s%s clipboard/groundcrew\n' "${dim}" 'repo' "${reset}"
57
+ printf '%s%s%s %s\n\n' "${dim}" 'branch' "${reset}" "${branch}"
58
+ sleep 0.4
59
+ printf '%s$%s %s%s%s %s< prompts/%s.txt%s\n\n' "${dim}" "${reset}" "${accent}" "${model}" "${reset}" "${dim}" "${ticket}" "${reset}"
60
+ sleep 0.5
61
+ printf '%sTicket%s %s\n' "${dim}" "${reset}" "${title}"
62
+ sleep 0.4
63
+ printf '%sWorktree%s %s~/dev/c/%s%s\n\n' "${dim}" "${reset}" "${dim}" "${worktree}" "${reset}"
64
+ sleep 0.5
65
+ printf '%sReading repo context...%s\n' "${dim}" "${reset}"
66
+ sleep 0.5
67
+ printf '%sEditing in isolated branch...%s\n' "${dim}" "${reset}"
68
+ sleep 0.5
69
+ printf '%sRunning verification...%s\n' "${dim}" "${reset}"
70
+ sleep 0.5
71
+ # No trailing newline: keeps the final line flush against the pane bottom so the
72
+ # pane never has to scroll a phantom empty line (which VHS renders as the top
73
+ # border drifting down).
74
+ printf '%s%s✓ Ready for review.%s' "${green}" "${bold}" "${reset}"
75
+
76
+ while :; do
77
+ sleep 60
78
+ done
79
+ SH
80
+ chmod +x "${demo_agent_script}"
81
+
82
+ demo_ts_second=18
83
+
84
+ demo_log() {
85
+ printf '%s[15:23:%02d]%s %s\n' "${c_dim}" "${demo_ts_second}" "${c_reset}" "${1}"
86
+ demo_ts_second=$((demo_ts_second + 1))
87
+ }
88
+
89
+ crew() {
90
+ if [[ "${1:-}" != "run" || "${2:-}" != "--watch" ]]; then
91
+ printf '%s\n' 'demo supports: crew run --watch'
92
+ return 2
93
+ fi
94
+
95
+ local pane_one
96
+
97
+ demo_log "${c_dim}Linear viewer ·${c_reset} Rocky Warren"
98
+ sleep 0.5
99
+ demo_log "${c_dim}Slots${c_reset} 0/3 ${c_dim}· dispatching${c_reset} ${c_amber}ENG-184${c_reset}${c_dim},${c_reset} ${c_blue}ENG-217${c_reset}"
100
+ sleep 0.6
101
+
102
+ demo_log "${c_dim}Worktree${c_reset} web-ENG-184 ${c_dim}→${c_reset} groundcrew/ENG-184"
103
+ sleep 0.5
104
+ pane_one="$(
105
+ tmux split-window -d -h -p 42 -P -F '#{pane_id}' -- \
106
+ "${demo_agent_script} ENG-184 codex 'Add Jira ticket source docs' web-ENG-184"
107
+ )"
108
+ sleep 0.7
109
+ demo_log "${c_green}✓${c_reset} ${c_amber}ENG-184${c_reset} launched ${c_dim}·${c_reset} ${c_amber}codex${c_reset}"
110
+ sleep 0.7
111
+
112
+ demo_log "${c_dim}Worktree${c_reset} api-ENG-217 ${c_dim}→${c_reset} groundcrew/ENG-217"
113
+ sleep 0.5
114
+ tmux split-window -d -v -p 50 -t "${pane_one}" -P -F '#{pane_id}' -- \
115
+ "${demo_agent_script} ENG-217 claude 'Fix flaky status output' api-ENG-217" >/dev/null
116
+ sleep 0.7
117
+ demo_log "${c_green}✓${c_reset} ${c_blue}ENG-217${c_reset} launched ${c_dim}·${c_reset} ${c_blue}claude${c_reset}"
118
+ sleep 0.7
119
+
120
+ demo_log "${c_dim}Queue clear · next poll in 60s${c_reset}"
121
+ tmux refresh-client
122
+ # Hold the fully-settled layout on screen. Must outlast the tape's trailing
123
+ # Sleep so the orchestrator pane never drops back to a shell prompt on camera.
124
+ sleep 20
125
+ }
package/static/demo.gif CHANGED
Binary file
@@ -0,0 +1,47 @@
1
+ # cspell:ignore noprofile norc ttyd
2
+
3
+ Output static/demo.gif
4
+ Require bash
5
+ Require ffmpeg
6
+ Require tmux
7
+ Require ttyd
8
+
9
+ Set Shell "bash"
10
+ Set Width 1320
11
+ # 690px ≈ 28 terminal rows. The right column splits into two stacked agent panes
12
+ # of ~13 content rows each, sized to hold the demo-fixture.sh agent script's
13
+ # 12-line output without scrolling (a scrolling pane makes its top border drift).
14
+ # Grow this if that output grows past ~13 lines.
15
+ Set Height 690
16
+ Set FontSize 16
17
+ Set FontFamily "Menlo"
18
+ Set Padding 16
19
+ Set Margin 40
20
+ Set MarginFill "#0a0a0b"
21
+ Set WindowBar Colorful
22
+ Set BorderRadius 12
23
+ Set TypingSpeed 35ms
24
+ Set CursorBlink false
25
+ Set Theme '{ "background": "#18181b", "foreground": "#e4e4e7", "cursor": "#77d94e", "selection": "#3f3f46", "black": "#27272a", "red": "#fb7185", "green": "#77d94e", "yellow": "#fbbf24", "blue": "#60a5fa", "magenta": "#c084fc", "cyan": "#34d399", "white": "#e4e4e7", "brightBlack": "#52525b", "brightRed": "#fda4af", "brightGreen": "#a3e635", "brightYellow": "#fcd34d", "brightBlue": "#93c5fd", "brightMagenta": "#d8b4fe", "brightCyan": "#6ee7b7", "brightWhite": "#fafafa" }'
26
+
27
+ Hide
28
+ Type "tmux -f /dev/null -L groundcrew-demo kill-session -t groundcrew 2>/dev/null || true"
29
+ Enter
30
+ Type "tmux -f /dev/null -L groundcrew-demo new-session -s groundcrew -- /bin/bash --noprofile --norc"
31
+ Enter
32
+ Type "source static/demo-fixture.sh"
33
+ Enter
34
+ Type "clear"
35
+ Enter
36
+ Show
37
+
38
+ Sleep 1.0
39
+ Type "crew run --watch"
40
+ Sleep 0.4
41
+ Enter
42
+ # ~8s of action, then hold the settled layout long enough to read all three panes.
43
+ Sleep 15
44
+
45
+ Hide
46
+ Type "tmux -f /dev/null -L groundcrew-demo kill-session -t groundcrew"
47
+ Enter
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ # cspell:ignore ttyd
3
+ set -euo pipefail
4
+
5
+ script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
6
+ repo_dir="$(cd -- "${script_dir}/.." && pwd)"
7
+ cd "${repo_dir}"
8
+
9
+ for required_command in vhs ttyd tmux ffmpeg; do
10
+ if ! command -v "${required_command}" >/dev/null 2>&1; then
11
+ printf 'Missing required command: %s\n' "${required_command}" >&2
12
+ exit 127
13
+ fi
14
+ done
15
+
16
+ tmux -f /dev/null -L groundcrew-demo kill-session -t groundcrew 2>/dev/null || true
17
+
18
+ log_file="$(mktemp)"
19
+ trap 'rm -f "${log_file}"' EXIT
20
+
21
+ for attempt in 1 2 3; do
22
+ rm -f "${log_file}"
23
+
24
+ if VHS_NO_SANDBOX="${VHS_NO_SANDBOX:-1}" vhs static/demo.tape 2>&1 | tee "${log_file}"; then
25
+ exit 0
26
+ fi
27
+
28
+ status="${PIPESTATUS[0]}"
29
+ tmux -f /dev/null -L groundcrew-demo kill-session -t groundcrew 2>/dev/null || true
30
+
31
+ if ! grep -Eq 'could not open ttyd|ERR_CONNECTION_REFUSED' "${log_file}"; then
32
+ exit "${status}"
33
+ fi
34
+
35
+ if [[ "${attempt}" -eq 3 ]]; then
36
+ exit "${status}"
37
+ fi
38
+
39
+ sleep "${attempt}"
40
+ done