@clipboard-health/groundcrew 4.48.3 → 4.49.0

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.
Files changed (45) hide show
  1. package/README.md +17 -6
  2. package/clearance-allow-hosts +4 -0
  3. package/crew.config.example.ts +8 -4
  4. package/dist/commands/dispatcher.d.ts.map +1 -1
  5. package/dist/commands/dispatcher.js +5 -1
  6. package/dist/commands/doctor.d.ts.map +1 -1
  7. package/dist/commands/doctor.js +2 -1
  8. package/dist/commands/init.d.ts +1 -1
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +3 -3
  11. package/dist/commands/openWorkspace.d.ts.map +1 -1
  12. package/dist/commands/openWorkspace.js +4 -10
  13. package/dist/commands/setupWorkspace.d.ts +3 -0
  14. package/dist/commands/setupWorkspace.d.ts.map +1 -1
  15. package/dist/commands/setupWorkspace.js +28 -12
  16. package/dist/lib/adapters/linear/factory.d.ts.map +1 -1
  17. package/dist/lib/adapters/linear/factory.js +6 -0
  18. package/dist/lib/adapters/linear/fetch.d.ts +3 -0
  19. package/dist/lib/adapters/linear/fetch.d.ts.map +1 -1
  20. package/dist/lib/adapters/linear/fetch.js +7 -1
  21. package/dist/lib/adapters/linear/parsing.d.ts +6 -0
  22. package/dist/lib/adapters/linear/parsing.d.ts.map +1 -1
  23. package/dist/lib/adapters/linear/parsing.js +6 -0
  24. package/dist/lib/adapters/shell/factory.d.ts.map +1 -1
  25. package/dist/lib/adapters/shell/factory.js +3 -0
  26. package/dist/lib/adapters/shell/schema.d.ts +2 -0
  27. package/dist/lib/adapters/shell/schema.d.ts.map +1 -1
  28. package/dist/lib/adapters/shell/schema.js +1 -0
  29. package/dist/lib/config.d.ts +4 -3
  30. package/dist/lib/config.d.ts.map +1 -1
  31. package/dist/lib/config.js +10 -0
  32. package/dist/lib/repositoryHooks.d.ts +11 -1
  33. package/dist/lib/repositoryHooks.d.ts.map +1 -1
  34. package/dist/lib/repositoryHooks.js +11 -0
  35. package/dist/lib/taskSource.d.ts +3 -0
  36. package/dist/lib/taskSource.d.ts.map +1 -1
  37. package/docs/commands.md +1 -1
  38. package/docs/configuration.md +9 -6
  39. package/docs/credentials.md +24 -0
  40. package/docs/runners.md +29 -0
  41. package/docs/setup-hooks.md +14 -0
  42. package/docs/spec/v2-design.md +1 -1
  43. package/docs/task-sources.md +9 -0
  44. package/docs/troubleshooting.md +3 -1
  45. package/package.json +12 -12
package/README.md CHANGED
@@ -22,11 +22,11 @@ Groundcrew watches assigned tasks, creates isolated worktrees, launches agent CL
22
22
  ## Why
23
23
 
24
24
  - **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.
25
- - **Interactive.** Each task launches the real `claude`, `codex`, or `cursor-agent` CLI in its own terminal pane, not a wrapper that approximates it. Watch any session live and take over when you need to.
25
+ - **Interactive.** Each task launches the real `claude`, `codex`, `cursor-agent`, or `pi` CLI in its own terminal pane, not a wrapper that approximates it. Watch any session live and take over when you need to.
26
26
  - **One worktree per task.** Agents work in parallel without stepping on each other.
27
27
  - **Sandboxed by default.** Safehouse or Docker Sandboxes isolate each agent on the host; `none` is an explicit escape hatch.
28
28
  - **Pluggable task sources.** Linear by default; Jira and local files via [task sources](./docs/task-sources.md).
29
- - **Multi-agent routing.** Ships `claude`, `codex`, and `cursor` (plus a `cursor-grok` variant) presets; bring your own CLI in config.
29
+ - **Multi-agent routing.** Ships `claude`, `codex`, `cursor` (plus a `cursor-grok` variant), and `pi` presets; bring your own CLI in config.
30
30
 
31
31
  ## Prerequisites
32
32
 
@@ -35,7 +35,7 @@ Groundcrew watches assigned tasks, creates isolated worktrees, launches agent CL
35
35
  - **Node >= 24:** [nvm](https://github.com/nvm-sh/nvm): `nvm install 24`.
36
36
  - **git:** e.g., `brew install git`, `apt install git`.
37
37
  - **A terminal multiplexer:** [tmux](https://github.com/tmux/tmux/wiki/Installing) (cross-platform), [cmux](https://cmux.com/) (macOS), or [zellij](https://zellij.dev/).
38
- - **An agent CLI:** [Claude Code](https://code.claude.com/docs/en/quickstart), [Codex](https://developers.openai.com/codex/quickstart?setup=cli), and/or the [Cursor CLI](https://docs.cursor.com/en/cli/overview) (`cursor-agent`, for the `cursor` and `cursor-grok` presets).
38
+ - **An agent CLI:** [Claude Code](https://code.claude.com/docs/en/quickstart), [Codex](https://developers.openai.com/codex/quickstart?setup=cli), the [Cursor CLI](https://docs.cursor.com/en/cli/overview) (`cursor-agent`, for the `cursor` and `cursor-grok` presets), and/or [Pi](https://pi.dev/).
39
39
  - **A sandbox runner:** [Docker Sandboxes](https://docs.docker.com/ai/sandboxes/) (cross-platform) or [Safehouse](https://agent-safehouse.dev/) on macOS. Skip only with `--runner none`.
40
40
 
41
41
  ## Quickstart
@@ -61,7 +61,18 @@ crew doctor
61
61
  crew run --watch
62
62
  ```
63
63
 
64
- `crew init --global` writes config to `${XDG_CONFIG_HOME:-$HOME/.config}/groundcrew/`. Pass `--repo` more than once for multiple repos. `--agent claude`, `--agent codex`, or `--agent cursor` chooses the single built-in agent preset to enable in the generated config.
64
+ `crew init --global` writes config to `${XDG_CONFIG_HOME:-$HOME/.config}/groundcrew/`. Pass `--repo` more than once for multiple repos. `--agent claude`, `--agent codex`, `--agent cursor`, or `--agent pi` chooses the single built-in agent preset to enable in the generated config.
65
+
66
+ Pi needs credentials only for the provider its selected model uses—not every provider. Authenticate that provider before unattended use; see [Pi provider authentication](./docs/credentials.md#pi-provider-authentication).
67
+
68
+ When using Pi through tmux 3.5 or later, add the following to `~/.tmux.conf` so tmux preserves modified keys such as `Shift+Enter` and `Ctrl+Enter`:
69
+
70
+ ```tmux
71
+ set -g extended-keys on
72
+ set -g extended-keys-format csi-u
73
+ ```
74
+
75
+ Stop or finish every active Groundcrew task and save work in every other tmux session before running `tmux kill-server`; it terminates the entire shared tmux server, including unrelated user sessions. The change takes effect the next time tmux starts. These are server-wide options, so Groundcrew deliberately does not change them for you. With tmux 3.2–3.4, omit `extended-keys-format`; see [Pi's tmux setup](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/tmux.md).
65
76
 
66
77
  ## Task Pickup
67
78
 
@@ -69,7 +80,7 @@ crew run --watch
69
80
 
70
81
  Linear works out of the box: assign tasks to yourself and add an `agent-*` label.
71
82
 
72
- - `agent-claude`, `agent-codex`, or `agent-<name>` routes to that enabled launch profile.
83
+ - `agent-claude`, `agent-codex`, `agent-pi`, or `agent-<name>` routes to that enabled launch profile.
73
84
  - `agent-any` routes to the enabled agent with the most session headroom, after skipping agents over their session limit or weekly paced budget.
74
85
  - Tasks without an `agent-*` label are ignored by `crew run`; dispatch one manually with `crew start <TASK>`.
75
86
 
@@ -93,7 +104,7 @@ Write tasks as complete agent instructions: the goal, the context and constraint
93
104
  ```bash
94
105
  crew init [--global | --local] [--force] [--dry-run] # create a crew.config.ts
95
106
  [--project-dir <dir>] [--repo <repo>]...
96
- [--runner <auto|safehouse|sdx|none>] [--agent <claude|codex|cursor>]
107
+ [--runner <auto|safehouse|sdx|none>] [--agent <claude|codex|cursor|pi>]
97
108
  crew doctor # check setup
98
109
  crew source list|verify [<source>] # inspect configured task sources
99
110
  crew task list [--source <name>] # list tasks across sources
@@ -11,10 +11,14 @@
11
11
  ab.chatgpt.com
12
12
  api.anthropic.com
13
13
  api.openai.com
14
+ auth.openai.com
14
15
  chatgpt.com
16
+ claude.ai
17
+ console.anthropic.com
15
18
  docs.anthropic.com
16
19
  docs.claude.com
17
20
  downloads.claude.ai
21
+ pi.dev
18
22
  platform.claude.com
19
23
 
20
24
  # Cursor (cursor-agent: composer, grok models). Wildcard covers the numbered API hosts
@@ -64,8 +64,10 @@ export default {
64
64
  default: "claude",
65
65
  // `definitions` is the enabled launch profile set. Built-in keys can use
66
66
  // `{}` to opt into the shipped command/color/usage preset. Add
67
- // `codex: {}`, `cursor: {}`, or `"cursor-grok": {}` for the other shipped
68
- // agents (`cursor` runs Cursor's composer-2.5, `cursor-grok` runs grok-4.5).
67
+ // `codex: {}`, `cursor: {}`, `"cursor-grok": {}`, or `pi: {}` for the other
68
+ // shipped agents (`cursor` runs Cursor's composer-2.5, `cursor-grok` runs
69
+ // grok-4.5). Pi authenticates only the selected model's provider; see
70
+ // docs/credentials.md#pi-provider-authentication.
69
71
  // Agent names are launch profiles: add custom entries such as `claude-fable`
70
72
  // or `claude-opus` to pin a model per task, then tag tasks with `agent-<name>`.
71
73
  definitions: {
@@ -73,6 +75,7 @@ export default {
73
75
  // codex: {},
74
76
  // cursor: {},
75
77
  // "cursor-grok": {},
78
+ // pi: {},
76
79
  // "claude-fable": {
77
80
  // cmd: "claude --model claude-fable-5 --permission-mode auto",
78
81
  // color: "#C15F3C",
@@ -162,8 +165,9 @@ export default {
162
165
  // sandbox: { agent: "claude" },
163
166
  // // Args appended on `crew resume` so the agent reopens its previous
164
167
  // // conversation in the worktree (`crew resume --new` starts fresh). The
165
- // // built-in claude/codex presets default this ("--continue" / "resume
166
- // // --last"); set it for custom agents or to override the preset default.
168
+ // // built-in claude/codex/pi presets default this ("--continue" /
169
+ // // "resume --last" / "--continue"); set it for custom agents or to
170
+ // // override the preset default.
167
171
  // resumeArgs: "--continue",
168
172
  // },
169
173
  //
@@ -1 +1 @@
1
- {"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../../src/commands/dispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,KAAK,EAEX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAWzD,UAAU,cAAc;IACtB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;CACd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KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;QACvD,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,WAAW,CAAC;QACrB;;;;WAIG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrB;AAiCD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,CA8OjE;AA8BD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,MAAM,CAQrE"}
@@ -53,9 +53,10 @@ export function createDispatcher(deps) {
53
53
  log(`Resolved agent-any for ${taskId} → ${issue.agent}`);
54
54
  }
55
55
  if (dryRun) {
56
+ const preparationSuffix = issue.worktreePreparation === "skip" ? "; prepareWorktree skipped" : "";
56
57
  log(
57
58
  /* v8 ignore next @preserve -- classifyTodo forces recovery=false in dry-run, so the resume branch can't fire here */
58
- `[dry-run] Would ${recovery ? "resume" : "start"} ${taskId} in ${issue.repository} (${issue.agent})`);
59
+ `[dry-run] Would ${recovery ? "resume" : "start"} ${taskId} in ${issue.repository} (${issue.agent})${preparationSuffix}`);
59
60
  logEvent("dispatch", {
60
61
  outcome: "skipped",
61
62
  reason: "dry_run",
@@ -79,6 +80,9 @@ export function createDispatcher(deps) {
79
80
  sourceName: issue.source,
80
81
  }),
81
82
  agent: issue.agent,
83
+ ...(issue.worktreePreparation === undefined
84
+ ? {}
85
+ : { worktreePreparation: issue.worktreePreparation }),
82
86
  details: {
83
87
  title: issue.title,
84
88
  description: issue.description,
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0SH,wBAAsB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAyF/C"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2SH,wBAAsB,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,CAyF/C"}
@@ -15,7 +15,7 @@ import { resolveWorkspaceKind } from "../lib/workspaces.js";
15
15
  // Tokenization stops after this many non-flag tokens. Two is enough to
16
16
  // catch wrapper + wrapped CLI commands like `safehouse claude --foo`.
17
17
  const MAX_TOKENS_PER_CMD = 2;
18
- const BUILT_IN_AGENT_NAMES = ["claude", "codex", "cursor", "cursor-grok"];
18
+ const BUILT_IN_AGENT_NAMES = ["claude", "codex", "cursor", "cursor-grok", "pi"];
19
19
  // Primary CLI binary probed on PATH for each built-in agent. Usually equal to
20
20
  // the agent name, but the cursor and cursor-grok presets both launch Cursor's
21
21
  // `cursor-agent`, so the missing-CLI hint must key on the binary, not the name.
@@ -24,6 +24,7 @@ const BUILT_IN_AGENT_BINARIES = {
24
24
  codex: "codex",
25
25
  cursor: "cursor-agent",
26
26
  "cursor-grok": "cursor-agent",
27
+ pi: "pi",
27
28
  };
28
29
  const CONFIG_SOURCE_LABELS = {
29
30
  env: "GROUNDCREW_CONFIG",
@@ -5,7 +5,7 @@
5
5
  * `cp` dance documented in the README.
6
6
  */
7
7
  import { type LocalRunnerSetting } from "../lib/config.ts";
8
- export declare const INIT_AGENTS: readonly ["claude", "codex", "cursor"];
8
+ export declare const INIT_AGENTS: readonly ["claude", "codex", "cursor", "pi"];
9
9
  type InitConfigScope = "global" | "local";
10
10
  type InitAgent = (typeof INIT_AGENTS)[number];
11
11
  interface InitConfigOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAYlF,eAAO,MAAM,WAAW,YAAI,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAElE,KAAK,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1C,KAAK,SAAS,G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iBAAiB;IACzB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uEAAuE;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,qDAAqD;IACrD,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpE,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAoB5E;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAWjE"}
@@ -13,10 +13,10 @@ import { xdgConfigPath } from "../lib/xdg.js";
13
13
  const CONFIG_FILE_NAME = "crew.config.ts";
14
14
  const EXAMPLE_FILE_NAME = "crew.config.example.ts";
15
15
  const DEFAULT_EXAMPLE_PROJECT_DIR = "~/dev/groundcrew";
16
- const INIT_USAGE = "Usage: crew init [--global | --local] [--force] [--dry-run] [--project-dir <dir>] [--repo <owner/repo>]... [--runner <auto|safehouse|sdx|none>] [--agent <claude|codex|cursor>]";
16
+ const INIT_USAGE = "Usage: crew init [--global | --local] [--force] [--dry-run] [--project-dir <dir>] [--repo <owner/repo>]... [--runner <auto|safehouse|sdx|none>] [--agent <claude|codex|cursor|pi>]";
17
17
  // Model-variant presets with hyphens (e.g. `cursor-grok`) are enabled via
18
18
  // config, not `init`: renderConfig would emit an unquoted, invalid TS key.
19
- export const INIT_AGENTS = ["claude", "codex", "cursor"];
19
+ export const INIT_AGENTS = ["claude", "codex", "cursor", "pi"];
20
20
  export function initConfig(options = {}) {
21
21
  const scope = options.scope ?? "local";
22
22
  const cwd = options.cwd ?? process.cwd();
@@ -149,7 +149,7 @@ function isLocalRunnerSetting(value) {
149
149
  return value === "auto" || value === "safehouse" || value === "sdx" || value === "none";
150
150
  }
151
151
  function isInitAgent(value) {
152
- return value === "claude" || value === "codex" || value === "cursor";
152
+ return value === "claude" || value === "codex" || value === "cursor" || value === "pi";
153
153
  }
154
154
  function tsString(value) {
155
155
  return JSON.stringify(value);
@@ -1 +1 @@
1
- {"version":3,"file":"openWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/openWorkspace.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBtF,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwJD,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CA2Hf;AA4ID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAE3E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpE"}
1
+ {"version":3,"file":"openWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/openWorkspace.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBtF,UAAU,gBAAgB;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwJD,wBAAsB,aAAa,CACjC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAoHf;AA4ID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAE3E;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpE"}
@@ -4,7 +4,7 @@ import { composeAgentLaunch, openAgentWorkspace, prepareAgentLaunch } from "../l
4
4
  import { inferAgentCommandName } from "../lib/launchCommand.js";
5
5
  import { loadConfig, repositoryBaseDir } from "../lib/config.js";
6
6
  import { resolvePullRequest } from "../lib/pullRequests.js";
7
- import { resolvePrepareWorktreeCommand } from "../lib/repositoryHooks.js";
7
+ import { resolveRepositoryPreparationCommands } from "../lib/repositoryHooks.js";
8
8
  import { recordRunState, readRunState } from "../lib/runState.js";
9
9
  import { seedLaunchWorkspaceTrust } from "../lib/seedLaunchWorkspaceTrust.js";
10
10
  import { removeStagedPrompt, stageBuildSecrets, stagePromptText, stageWorkspaceLaunchCommand, } from "../lib/stagedLaunch.js";
@@ -152,17 +152,11 @@ export async function openWorkspace(config, options) {
152
152
  });
153
153
  let cleanupAgentLaunch;
154
154
  try {
155
- const repositoryEntry = config.workspace.repositories.find((entry) => entry.name === repository);
156
- const prepareWorktreeCommand = resolvePrepareWorktreeCommand({
155
+ const { prepareWorktreeCommand, prepareWorktreeUnsandboxedCommand } = resolveRepositoryPreparationCommands({
156
+ config,
157
+ repository,
157
158
  worktreeDir: launchDir,
158
- // Spread-conditional: exactOptionalPropertyTypes forbids an explicit
159
- // `undefined` for an optional field, and the lookup yields undefined for
160
- // repos with no hooks. Mirrors setupWorkspace so `crew open` honors the
161
- // same per-repo operator hooks as `crew setup`.
162
- ...(repositoryEntry?.hooks === undefined ? {} : { perRepoHooks: repositoryEntry.hooks }),
163
- defaultHooks: config.defaults.hooks,
164
159
  });
165
- const prepareWorktreeUnsandboxedCommand = repositoryEntry?.unsandboxedHooks?.prepareWorktree;
166
160
  const secretsFile = prepareWorktreeCommand === undefined && prepareWorktreeUnsandboxedCommand === undefined
167
161
  ? undefined
168
162
  : stageBuildSecrets(stagedPrompt.directory);
@@ -1,4 +1,5 @@
1
1
  import { type ResolvedConfig } from "../lib/config.ts";
2
+ import { type WorktreePreparation } from "../lib/taskSource.ts";
2
3
  export interface TaskDetails {
3
4
  title: string;
4
5
  description: string;
@@ -13,6 +14,8 @@ export interface SetupWorkspaceOptions {
13
14
  completionMarkDoneSupported?: boolean;
14
15
  repository: string;
15
16
  agent: string;
17
+ /** Set to `skip` to bypass configured prepareWorktree hooks. */
18
+ worktreePreparation?: WorktreePreparation;
16
19
  details: TaskDetails;
17
20
  }
18
21
  export interface SetupWorkspaceRunOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"setupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BnE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAuBD,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,EAC9B,UAAU,GAAE,wBAA6B,GACxC,OAAO,CAAC,IAAI,CAAC,CA4Jf;AA2MD,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAkDf"}
1
+ {"version":3,"file":"setupWorkspace.d.ts","sourceRoot":"","sources":["../../src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBnE,OAAO,EAA0B,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAUxF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6FAA6F;IAC7F,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAuBD,wBAAsB,cAAc,CAClC,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,qBAAqB,EAC9B,UAAU,GAAE,wBAA6B,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Jf;AAiOD,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GACjC,OAAO,CAAC,IAAI,CAAC,CAyDf"}
@@ -3,7 +3,7 @@ import { composeAgentLaunch, openAgentWorkspace, prepareAgentLaunch } from "../l
3
3
  import { inferAgentCommandName, workerEnvironmentForTask } from "../lib/launchCommand.js";
4
4
  import { createBoard } from "../lib/board.js";
5
5
  import { buildSources, sourcesFromConfig } from "../lib/buildSources.js";
6
- import { resolvePrepareWorktreeCommand } from "../lib/repositoryHooks.js";
6
+ import { resolveRepositoryPreparationCommands } from "../lib/repositoryHooks.js";
7
7
  import { recordRunState } from "../lib/runState.js";
8
8
  import { seedLaunchWorkspaceTrust } from "../lib/seedLaunchWorkspaceTrust.js";
9
9
  import { sourceSupportsMarkDone } from "../lib/sourceCapabilities.js";
@@ -84,17 +84,16 @@ export async function setupWorkspace(config, options, runOptions = {}) {
84
84
  workspaceContinuationInstruction: renderWorkspaceContinuationInstruction(accessHint),
85
85
  });
86
86
  promptDir = stagedPrompt.directory;
87
- const repositoryEntry = config.workspace.repositories.find((entry) => entry.name === repository);
88
- const perRepoHooks = repositoryEntry?.hooks;
89
- const prepareWorktreeUnsandboxedCommand = repositoryEntry?.unsandboxedHooks?.prepareWorktree;
90
- const prepareWorktreeCommand = resolvePrepareWorktreeCommand({
91
- worktreeDir: launchDir,
92
- // Spread-conditional rather than a direct assignment: under
93
- // exactOptionalPropertyTypes an optional field can't take an explicit
94
- // `undefined`, and the lookup yields undefined for repos with no hooks.
95
- ...(perRepoHooks === undefined ? {} : { perRepoHooks }),
96
- defaultHooks: config.defaults.hooks,
87
+ const shouldPrepareWorktree = options.worktreePreparation !== "skip";
88
+ const { prepareWorktreeCommand, prepareWorktreeUnsandboxedCommand } = resolveTaskPreparationCommands({
89
+ config,
90
+ repository,
91
+ launchDir,
92
+ shouldPrepareWorktree,
97
93
  });
94
+ if (!shouldPrepareWorktree) {
95
+ log(`Skipping prepareWorktree for ${task} (task policy)`);
96
+ }
98
97
  const secretsFile = prepareWorktreeCommand === undefined && prepareWorktreeUnsandboxedCommand === undefined
99
98
  ? undefined
100
99
  : stageBuildSecrets(promptDir);
@@ -172,6 +171,19 @@ export async function setupWorkspace(config, options, runOptions = {}) {
172
171
  throw error;
173
172
  }
174
173
  }
174
+ function resolveTaskPreparationCommands(arguments_) {
175
+ if (!arguments_.shouldPrepareWorktree) {
176
+ return {
177
+ prepareWorktreeCommand: undefined,
178
+ prepareWorktreeUnsandboxedCommand: undefined,
179
+ };
180
+ }
181
+ return resolveRepositoryPreparationCommands({
182
+ config: arguments_.config,
183
+ repository: arguments_.repository,
184
+ worktreeDir: arguments_.launchDir,
185
+ });
186
+ }
175
187
  /**
176
188
  * Bail out before any state-write when the worktree already exists, then
177
189
  * record a "provisioning" row so `crew status` can surface the in-flight
@@ -352,7 +364,8 @@ export async function setupWorkspaceCli(task, options = {}) {
352
364
  }
353
365
  log(`Resolved ${task}: repository=${resolved.repository}, agent=${resolved.agent}`);
354
366
  if (options.dryRun === true) {
355
- log(`[dry-run] Would launch ${task} in ${resolved.repository} (${resolved.agent})`);
367
+ const preparationSuffix = resolved.worktreePreparation === "skip" ? "; prepareWorktree skipped" : "";
368
+ log(`[dry-run] Would launch ${task} in ${resolved.repository} (${resolved.agent})${preparationSuffix}`);
356
369
  return;
357
370
  }
358
371
  const naturalId = naturalIdFromCanonical(resolved.id);
@@ -365,6 +378,9 @@ export async function setupWorkspaceCli(task, options = {}) {
365
378
  }),
366
379
  repository: resolved.repository,
367
380
  agent: resolved.agent,
381
+ ...(resolved.worktreePreparation === undefined
382
+ ? {}
383
+ : { worktreePreparation: resolved.worktreePreparation }),
368
384
  details: {
369
385
  title: resolved.title,
370
386
  description: resolved.description,
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,KAAK,IAAI,cAAc,EAG5B,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAIL,KAAK,KAAK,IAAI,WAAW,EAE1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAG1B;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;CACtB;AA8DD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,iBAA+C,GAC3D,cAAc,CA4BhB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,cAAc,GACtB,UAAU,CAkIZ"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,KAAK,IAAI,cAAc,EAG5B,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAIL,KAAK,KAAK,IAAI,WAAW,EAE1B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAG1B;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,YAAY,EAAE,MAAM,CAAC;CACtB;AA8DD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,iBAA+C,GAC3D,cAAc,CA+BhB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,cAAc,GACtB,UAAU,CAqIZ"}
@@ -85,6 +85,9 @@ export function toCanonicalIssue(linearIssue, sourceName, statusNames = DEFAULT_
85
85
  hasMoreBlockers: linearIssue.hasMoreBlockers,
86
86
  url: linearIssue.url,
87
87
  ...(linearIssue.priority === 0 ? {} : { priority: linearIssue.priority }),
88
+ ...(linearIssue.worktreePreparation === undefined
89
+ ? {}
90
+ : { worktreePreparation: linearIssue.worktreePreparation }),
88
91
  sourceRef,
89
92
  };
90
93
  }
@@ -156,6 +159,9 @@ export function createLinearTaskSource(config, context) {
156
159
  hasMoreBlockers: resolved.hasMoreBlockers,
157
160
  url: resolved.url,
158
161
  ...(resolved.priority === 0 ? {} : { priority: resolved.priority }),
162
+ ...(resolved.worktreePreparation === undefined
163
+ ? {}
164
+ : { worktreePreparation: resolved.worktreePreparation }),
159
165
  sourceRef,
160
166
  };
161
167
  }
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import type { LinearClient } from "@linear/sdk";
11
11
  import type { ResolvedConfig } from "../../config.ts";
12
+ import { type WorktreePreparation } from "../../taskSource.ts";
12
13
  import { type AgentResolution } from "./parsing.ts";
13
14
  export declare const ISSUES_PAGE_SIZE = 250;
14
15
  export interface Blocker {
@@ -49,6 +50,7 @@ export interface Issue {
49
50
  url: string;
50
51
  /** Linear priority: 1=Urgent, 2=High, 3=Medium, 4=Low, 0=No priority. */
51
52
  priority: number;
53
+ worktreePreparation?: WorktreePreparation;
52
54
  }
53
55
  /**
54
56
  * `Issue` narrowed to "this task is for groundcrew". Consumers operate on
@@ -122,6 +124,7 @@ interface ResolvedIssue {
122
124
  hasMoreBlockers: boolean;
123
125
  url: string;
124
126
  priority: number;
127
+ worktreePreparation?: WorktreePreparation;
125
128
  }
126
129
  export interface RawLinearIssue {
127
130
  uuid: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAYpC,MAAM,WAAW,OAAO;IACtB,E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AC;CACd,GAAG,OAAO,CAAC,aAAa,CAAC,CAyCzB;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,cAAc,GACrB,IAAI,CAON;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,EAAE,CAS/E"}
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { RepositoryResolutionError } from "../../taskSource.js";
11
11
  import { log, styleWarning } from "../../util.js";
12
- import { AGENT_LABEL_PREFIX, resolveAgentFor, resolveRepositoryFor, } from "./parsing.js";
12
+ import { AGENT_LABEL_PREFIX, resolveAgentFor, resolveRepositoryFor, resolveWorktreePreparation, } from "./parsing.js";
13
13
  export const ISSUES_PAGE_SIZE = 250;
14
14
  // `state.type` values surfaced by `fetch()`. `backlog` / `triage` are dropped
15
15
  // at the GraphQL filter; everything else is post-classified by these names.
@@ -182,6 +182,9 @@ function buildLinearIssue(input) {
182
182
  priority: input.priority,
183
183
  blockers: blockersFromRelations(input.inverseRelations?.nodes ?? []),
184
184
  hasMoreBlockers: input.inverseRelations?.pageInfo.hasNextPage ?? false,
185
+ ...(input.worktreePreparation === undefined
186
+ ? {}
187
+ : { worktreePreparation: input.worktreePreparation }),
185
188
  };
186
189
  }
187
190
  function issueFromNode(node, config) {
@@ -214,6 +217,7 @@ function issueFromNode(node, config) {
214
217
  teamId: node.team?.id ?? "",
215
218
  url: node.url,
216
219
  priority: node.priority,
220
+ worktreePreparation: resolveWorktreePreparation({ labels: node.labels.nodes }),
217
221
  inverseRelations: node.inverseRelations,
218
222
  });
219
223
  }
@@ -374,6 +378,7 @@ export async function fetchResolvedIssue(arguments_) {
374
378
  else if (agentResolution.kind === "not-enabled-fallback") {
375
379
  agent = agentResolution.fallbackAgent;
376
380
  }
381
+ const worktreePreparation = resolveWorktreePreparation({ labels: raw.labels });
377
382
  return {
378
383
  uuid: raw.uuid,
379
384
  title: raw.title,
@@ -390,6 +395,7 @@ export async function fetchResolvedIssue(arguments_) {
390
395
  hasMoreBlockers: raw.hasMoreBlockers,
391
396
  url: raw.url,
392
397
  priority: raw.priority,
398
+ ...(worktreePreparation === undefined ? {} : { worktreePreparation }),
393
399
  };
394
400
  }
395
401
  export function warnIfNotEnabledFallback(task, agentResolution, config) {
@@ -3,6 +3,7 @@
3
3
  * issue labels and descriptions. Extracted from boardSource.ts (Task 10).
4
4
  */
5
5
  import { type ResolvedConfig } from "../../config.ts";
6
+ import { type WorktreePreparation } from "../../taskSource.ts";
6
7
  export declare const AGENT_LABEL_PREFIX = "agent-";
7
8
  export type RepositoryResolution = {
8
9
  kind: "ok";
@@ -22,6 +23,11 @@ export type AgentResolution = {
22
23
  requestedAgent: string;
23
24
  fallbackAgent: string;
24
25
  };
26
+ export declare function resolveWorktreePreparation(arguments_: {
27
+ labels: Array<{
28
+ name: string;
29
+ }>;
30
+ }): WorktreePreparation | undefined;
25
31
  export declare function buildRepositoryRegex(config: ResolvedConfig): RegExp;
26
32
  export declare function resolveRepositoryFor(arguments_: {
27
33
  description: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"parsing.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/parsing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG3F,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAE5F,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;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IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpF,wBAAgB,0BAA0B,CAAC,UAAU,EAAE;IACrD,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjC,GAAG,mBAAmB,GAAG,SAAS,CAIlC;AASD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAUnE;AAiDD,wBAAgB,oBAAoB,CAAC,UAAU,EAAE;IAC/C,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,cAAc,CAAC;CACxB,GAAG,oBAAoB,CAuBvB;AAED,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,MAAM,EAAE,cAAc,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,wBAAwB,GAAG,MAAM,CA2B5E;AAkDD,wBAAgB,eAAe,CAAC,UAAU,EAAE;IAC1C,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChC,MAAM,EAAE,cAAc,CAAC;CACxB,GAAG,eAAe,CAiBlB"}
@@ -5,6 +5,12 @@
5
5
  import { AGENT_ANY, isBuiltInAgentNotEnabled } from "../../config.js";
6
6
  import { RepositoryResolutionError } from "../../taskSource.js";
7
7
  export const AGENT_LABEL_PREFIX = "agent-";
8
+ const SKIP_PREPARE_WORKTREE_LABEL = "groundcrew-skip-prepare";
9
+ export function resolveWorktreePreparation(arguments_) {
10
+ return arguments_.labels.some((label) => label.name === SKIP_PREPARE_WORKTREE_LABEL)
11
+ ? "skip"
12
+ : undefined;
13
+ }
8
14
  function escapeRegex(value) {
9
15
  return value.replaceAll(/[$()*+.?[\\\]^{|}]/g, String.raw `\$&`);
10
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,KAAK,IAAI,cAAc,EAG5B,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AAyErB,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAuB3F;AA8BD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,cAAc,GACvB,UAAU,CAsMZ"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,KAAK,IAAI,cAAc,EAG5B,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,UAAU,EAGhB,MAAM,aAAa,CAAC;AAyErB,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CA0B3F;AA8BD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,cAAc,GACvB,UAAU,CAsMZ"}
@@ -92,6 +92,9 @@ export function toCanonicalIssue(shellIssue, sourceName) {
92
92
  blockers,
93
93
  hasMoreBlockers: shellIssue.hasMoreBlockers,
94
94
  ...(shellIssue.url === undefined ? {} : { url: shellIssue.url }),
95
+ ...(shellIssue.worktreePreparation === undefined
96
+ ? {}
97
+ : { worktreePreparation: shellIssue.worktreePreparation }),
95
98
  sourceRef: shellIssue.sourceRef,
96
99
  };
97
100
  }
@@ -42,6 +42,7 @@ export declare const shellIssueSchema: z.ZodObject<{
42
42
  }, z.core.$strip>>;
43
43
  hasMoreBlockers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
44
44
  url: z.ZodOptional<z.ZodURL>;
45
+ worktreePreparation: z.ZodOptional<z.ZodLiteral<"skip">>;
45
46
  sourceRef: z.ZodUnknown;
46
47
  }, z.core.$strip>;
47
48
  export type ShellIssue = z.infer<typeof shellIssueSchema>;
@@ -78,6 +79,7 @@ export declare const shellFetchOutputSchema: z.ZodArray<z.ZodObject<{
78
79
  }, z.core.$strip>>;
79
80
  hasMoreBlockers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
80
81
  url: z.ZodOptional<z.ZodURL>;
82
+ worktreePreparation: z.ZodOptional<z.ZodLiteral<"skip">>;
81
83
  sourceRef: z.ZodUnknown;
82
84
  }, z.core.$strip>>;
83
85
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA4B,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,yBAAsB,CAAC;AAE7D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8EnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/shell/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA4B,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,yBAAsB,CAAC;AAE7D,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8EnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -33,6 +33,7 @@ export const shellIssueSchema = z.object({
33
33
  * breaking; `crew status` falls back to displaying just the id.
34
34
  */
35
35
  url: z.url().optional(),
36
+ worktreePreparation: z.literal("skip").optional(),
36
37
  sourceRef: z.unknown(),
37
38
  });
38
39
  export const shellFetchOutputSchema = z.array(shellIssueSchema);
@@ -140,8 +140,9 @@ export interface AgentDefinition {
140
140
  resumeArgs?: string;
141
141
  }
142
142
  /**
143
- * User-facing agent entry shape. Built-in agent names (`claude`, `codex`)
144
- * accept empty or partial entries because they merge over built-in presets.
143
+ * User-facing agent entry shape. Built-in agent names (`claude`, `codex`,
144
+ * `cursor`, `cursor-grok`, `pi`) accept empty or partial entries because they
145
+ * merge over built-in presets.
145
146
  * Brand-new agent names must supply enough fields to satisfy `validate()`.
146
147
  *
147
148
  * `usage` accepts an extra `{ disabled: true }` sentinel that strips the
@@ -277,7 +278,7 @@ export interface Config {
277
278
  default?: string;
278
279
  /**
279
280
  * Explicit enabled agent set. Built-in keys (`claude`, `codex`, `cursor`,
280
- * `cursor-grok`) merge over their presets, so `{ claude: {} }` enables
281
+ * `cursor-grok`, `pi`) merge over their presets, so `{ claude: {} }` enables
281
282
  * Claude with the shipped command/color/usage. Brand-new agent names must
282
283
  * supply enough fields to satisfy `validate()`.
283
284
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAO1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,oBAAoB,CAAC;AAEzB,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;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C,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,MAAM,MAAM,gBAAgB,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;AAoUD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,GAAG,OAAO,CAE1F;AAyJD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EACtC,IAAI,EAAE,MAAM,GACX,OAAO,CAKT;AAumBD,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CA+B5E;AAED,wBAAsB,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAGpE"}
@@ -125,6 +125,16 @@ const BUILT_IN_AGENT_DEFINITIONS = {
125
125
  // No `usage`: cursor-agent has no codexbar provider.
126
126
  resumeArgs: "--continue",
127
127
  },
128
+ pi: {
129
+ // Groundcrew worktrees are unattended. Pi's project trust prompt would
130
+ // otherwise stop the initial positional prompt before the agent can act.
131
+ // `--approve` trusts project-local Pi resources for this launch; the
132
+ // groundcrew runner remains the filesystem/network security boundary.
133
+ cmd: "pi --approve",
134
+ color: "#6B7280",
135
+ // Pi stores sessions by working directory, matching the one-worktree-per-task model.
136
+ resumeArgs: "--continue",
137
+ },
128
138
  };
129
139
  const MODEL_DEFINITIONS_MIGRATION_MESSAGE = [
130
140
  "configuration migration required: agents are no longer enabled by default.",
@@ -1,4 +1,4 @@
1
- import type { HookCommands } from "./config.ts";
1
+ import type { HookCommands, ResolvedConfig } from "./config.ts";
2
2
  interface ResolvePrepareWorktreeCommandArguments {
3
3
  worktreeDir: string;
4
4
  /**
@@ -10,6 +10,16 @@ interface ResolvePrepareWorktreeCommandArguments {
10
10
  perRepoHooks?: HookCommands;
11
11
  defaultHooks: HookCommands;
12
12
  }
13
+ interface ResolveRepositoryPreparationCommandsArguments {
14
+ config: ResolvedConfig;
15
+ repository: string;
16
+ worktreeDir: string;
17
+ }
18
+ interface RepositoryPreparationCommands {
19
+ prepareWorktreeCommand: string | undefined;
20
+ prepareWorktreeUnsandboxedCommand: string | undefined;
21
+ }
22
+ export declare function resolveRepositoryPreparationCommands(arguments_: ResolveRepositoryPreparationCommandsArguments): RepositoryPreparationCommands;
13
23
  export declare function resolvePrepareWorktreeCommand(arguments_: ResolvePrepareWorktreeCommandArguments): string | undefined;
14
24
  export {};
15
25
  //# sourceMappingURL=repositoryHooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"repositoryHooks.d.ts","sourceRoot":"","sources":["../../src/lib/repositoryHooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,UAAU,sCAAsC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,sCAAsC,GACjD,MAAM,GAAG,SAAS,CAOpB"}
1
+ {"version":3,"file":"repositoryHooks.d.ts","sourceRoot":"","sources":["../../src/lib/repositoryHooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIhE,UAAU,sCAAsC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,UAAU,6CAA6C;IACrD,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,6BAA6B;IACrC,sBAAsB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,iCAAiC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvD;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,6CAA6C,GACxD,6BAA6B,CAY/B;AAMD,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,sCAAsC,GACjD,MAAM,GAAG,SAAS,CAOpB"}
@@ -1,6 +1,17 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import path from "node:path";
3
3
  const REPOSITORY_CONFIG_RELATIVE_PATH = ".groundcrew/config.json";
4
+ export function resolveRepositoryPreparationCommands(arguments_) {
5
+ const repositoryEntry = arguments_.config.workspace.repositories.find((entry) => entry.name === arguments_.repository);
6
+ return {
7
+ prepareWorktreeCommand: resolvePrepareWorktreeCommand({
8
+ worktreeDir: arguments_.worktreeDir,
9
+ ...(repositoryEntry?.hooks === undefined ? {} : { perRepoHooks: repositoryEntry.hooks }),
10
+ defaultHooks: arguments_.config.defaults.hooks,
11
+ }),
12
+ prepareWorktreeUnsandboxedCommand: repositoryEntry?.unsandboxedHooks?.prepareWorktree,
13
+ };
14
+ }
4
15
  // Flat precedence cascade, highest priority first: the repo-committed
5
16
  // `.groundcrew/config.json` wins (closest to the code), then the per-repo
6
17
  // operator layer, then the global `defaults.hooks` fallback. All three reuse
@@ -21,6 +21,7 @@
21
21
  * `backlog`/`triage`, blockers with no resolvable state).
22
22
  */
23
23
  export type CanonicalStatus = "todo" | "in-progress" | "in-review" | "done" | "other";
24
+ export type WorktreePreparation = "skip";
24
25
  export interface Blocker {
25
26
  /** Canonical (source-prefixed) id of the blocking task. */
26
27
  id: string;
@@ -82,6 +83,8 @@ export interface Issue {
82
83
  priority?: number;
83
84
  /** Adapter-private. Consumers MUST NOT inspect; only the producing adapter reads it. */
84
85
  sourceRef: unknown;
86
+ /** Task-level opt-out from configured worktree preparation hooks. */
87
+ worktreePreparation?: WorktreePreparation;
85
88
  }
86
89
  export type Task = Issue;
87
90
  /** Narrowed form: an Issue confirmed to be groundcrew-eligible. */
@@ -1 +1 @@
1
- {"version":3,"file":"taskSource.d.ts","sourceRoot":"","sources":["../../src/lib/taskSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtF,MAAM,WAAW,OAAO;IACtB,2DAA2D;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,eAAe,CAAC;IACxB;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IACtC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACpB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,qEAAqE;IACrE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,oGAAoG;IACpG,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;I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EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAM/E;CACF;AAED;;;;;;;;;GASG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAmB,OAAO,EAAE,MAAM,EAGjC;CACF;AAED,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,YAAmB,UAAU,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAM/E;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAE3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAOzD"}
package/docs/commands.md CHANGED
@@ -147,7 +147,7 @@ The command closes the cmux/tmux/zellij workspace if present, records local run
147
147
 
148
148
  The resume prompt tells the agent to inspect git status and diff before editing, includes the previous interrupt reason when recorded, and reuses the recorded agent, repository, branch, runner, sandbox, and workspace backend. When no run-state file exists but a worktree does, resume falls back to Linear resolution for the agent and task context.
149
149
 
150
- `crew resume <TASK>` reopens the agent's previous conversation in the worktree by default — the built-in `claude`, `codex`, `cursor`, and `cursor-grok` presets ship a [`resumeArgs`](./configuration.md#resuming-the-agents-conversation) default (`--continue`, `resume --last`, `--continue`, `--continue`) that groundcrew appends to the agent's command. `crew resume --new <TASK>` ignores `resumeArgs` and forces a fresh conversation. Custom agents cold-start unless they set `resumeArgs`. groundcrew stores no session id — it relies on one conversation per worktree.
150
+ `crew resume <TASK>` reopens the agent's previous conversation in the worktree by default — the built-in `claude`, `codex`, `cursor`, `cursor-grok`, and `pi` presets ship a [`resumeArgs`](./configuration.md#resuming-the-agents-conversation) default (`--continue`, `resume --last`, `--continue`, `--continue`, `--continue`) that groundcrew appends to the agent's command. `crew resume --new <TASK>` ignores `resumeArgs` and forces a fresh conversation. Custom agents cold-start unless they set `resumeArgs`. groundcrew stores no session id — it relies on one conversation per worktree.
151
151
 
152
152
  ## Open
153
153
 
@@ -94,7 +94,7 @@ The "Loaded config from ..." line at startup tells you which config won.
94
94
 
95
95
  ## Agent Label Routing
96
96
 
97
- - `agent-claude`, `agent-codex`, `agent-<name>` routes to that enabled launch profile.
97
+ - `agent-claude`, `agent-codex`, `agent-pi`, or `agent-<name>` routes to that enabled launch profile.
98
98
  - `agent-any` routes to the agent with the most session headroom, after skipping agents over their session limit or weekly paced budget.
99
99
  - Unknown `agent-<name>` falls back to `agents.default`.
100
100
  - A built-in `agent-<name>` label whose agent is not enabled falls back to `agents.default` with a warning.
@@ -167,7 +167,7 @@ export default {
167
167
 
168
168
  ## Enabling Agent Presets
169
169
 
170
- Groundcrew ships built-in presets for `claude`, `codex`, `cursor` (Cursor's composer-2.5), and `cursor-grok` (grok-4.5), but agents are not enabled by default. List the agents you want in `agents.definitions`:
170
+ Groundcrew ships built-in presets for `claude`, `codex`, `cursor` (Cursor's composer-2.5), `cursor-grok` (grok-4.5), and `pi`, but agents are not enabled by default. List the agents you want in `agents.definitions`:
171
171
 
172
172
  ```ts
173
173
  export default {
@@ -180,7 +180,7 @@ export default {
180
180
  };
181
181
  ```
182
182
 
183
- To keep both shipped presets enabled:
183
+ To enable several shipped presets:
184
184
 
185
185
  ```ts
186
186
  export default {
@@ -189,6 +189,7 @@ export default {
189
189
  definitions: {
190
190
  claude: {},
191
191
  codex: {},
192
+ pi: {},
192
193
  },
193
194
  },
194
195
  };
@@ -198,13 +199,15 @@ Rules:
198
199
 
199
200
  - `agents.definitions` is the enabled launch profile set; `crew doctor` only probes listed profiles.
200
201
  - Built-in entries can be `{}` or partial overrides such as `{ cmd: "..." }`.
202
+ - The Pi preset runs `pi --approve`, which prevents project trust from blocking an unattended launch. If you override its `cmd`, retain either `--approve` (load project-local Pi resources) or `--no-approve` (ignore them).
203
+ - Pi needs authentication only for the selected model's provider, not every supported provider. Authenticate before unattended use as described in [Pi Provider Authentication](./credentials.md#pi-provider-authentication).
201
204
  - Custom launch profile names must provide `cmd` and `color`.
202
205
  - `agents.default` must point at an enabled agent.
203
206
  - Legacy agent entries like `codex: { disabled: true }` are rejected with migration guidance; remove unwanted entries instead.
204
207
 
205
208
  ## Resuming the agent's conversation
206
209
 
207
- `crew resume` reopens the agent's previous conversation in the worktree — **no config required** for the built-in agents. The shipped `claude`, `codex`, `cursor`, and `cursor-grok` presets carry a `resumeArgs` default (`--continue`, `resume --last`, `--continue`, `--continue`), which groundcrew appends to the agent's command on resume.
210
+ `crew resume` reopens the agent's previous conversation in the worktree — **no config required** for the built-in agents. The shipped `claude`, `codex`, `cursor`, `cursor-grok`, and `pi` presets carry a `resumeArgs` default (`--continue`, `resume --last`, `--continue`, `--continue`, `--continue`), which groundcrew appends to the agent's command on resume.
208
211
 
209
212
  How it works:
210
213
 
@@ -328,14 +331,14 @@ and hook contract.
328
331
  | `orchestrator.pollIntervalMilliseconds` | `120_000` | Poll interval in `--watch` mode. |
329
332
  | `orchestrator.sessionLimitPercentage` | `85` | Number in `(0, 100]`. An agent whose codexbar session window exceeds this percentage is skipped that tick. Agents are also skipped when codexbar reports weekly usage over the current weekly paced budget. |
330
333
  | `agents.default` | `"claude"` | Tiebreak for `agent-any` resolution and fallback for explicit but unknown `agent-*` labels. Also used by `crew start <TASK>` for unlabeled tasks. `crew run` ignores unlabeled tasks and does not apply this default. Must exist in `agents.definitions`. If you enable only `codex`, set `default: "codex"`. |
331
- | `agents.definitions` | **required** | Enabled launch profile set. Built-in keys (`claude`, `codex`, `cursor`, `cursor-grok`) can use `{}` to opt into the shipped preset. Custom profile names must provide `cmd` and `color`; use custom profiles such as `claude-fable` and `claude-opus` to select model-specific commands per task. |
334
+ | `agents.definitions` | **required** | Enabled launch profile set. Built-in keys (`claude`, `codex`, `cursor`, `cursor-grok`, `pi`) can use `{}` to opt into the shipped preset. Custom profile names must provide `cmd` and `color`; use custom profiles such as `claude-fable` and `claude-opus` to select model-specific commands per task. |
332
335
  | `agents.definitions.<name>.cmd` | preset for built-ins | Shell command launched for the agent. Required for custom profiles. Runs in the worktree through the resolved `local.runner`. `{{worktree}}` is replaced before launch; `{{sandbox}}` expands to the sbx sandbox name under the sdx runner and an empty string otherwise. |
333
336
  | `agents.definitions.<name>.color` | preset for built-ins | Color for the workspace status pill (cmux only; tmux and zellij silently drop it). Required for custom profiles. |
334
337
  | `agents.definitions.<name>.usage` | preset for built-ins | If set, codexbar usage is fetched for this agent and gated by `sessionLimitPercentage` plus the weekly paced budget when codexbar exposes a weekly window. When `usage.codexbar.source` is omitted, groundcrew uses `oauth` for Codex/Claude on macOS, `auto` for other macOS providers, and `cli` elsewhere. Set to `{ disabled: true }` to disable usage gating while keeping the agent enabled. |
335
338
  | `agents.definitions.<name>.sandbox` | optional | Docker Sandboxes binding for the agent. Required at launch when `local.runner` resolves to `sdx`. Field: `agent` (required sbx agent name). Groundcrew assumes the `groundcrew-<agent>` sandbox already exists. |
336
339
  | `agents.definitions.<name>.preLaunch` | optional | Host-only shell snippet run before the agent exec and outside Safehouse/sdx. Exports survive into the launch shell; under the default `safehouse` runner they are only forwarded to the agent when listed via `preLaunchEnv` or when `cmd` includes its own `safehouse --env-pass=NAMES`. `{{worktree}}` is substituted. A non-zero exit aborts launch. Not supported when `local.runner` resolves to `sdx` in v1. |
337
340
  | `agents.definitions.<name>.preLaunchEnv` | optional | Companion to `preLaunch`: list of env var names to append to groundcrew's Safehouse `--env-pass=` flag, so `preLaunch` exports reach the agent without overriding `cmd`. Each entry must match `[A-Za-z_][A-Za-z0-9_]*`. Under `runner: "none"` exports already inherit and `preLaunchEnv` is a no-op. An empty array is a uniform no-op in every runner; a non-empty list is rejected when `cmd` already starts with `safehouse` or when `runner` resolves to `sdx`. |
338
- | `agents.definitions.<name>.resumeArgs` | preset default | Shell args appended to `cmd` on `crew resume` so the agent [reopens its previous conversation](#resuming-the-agents-conversation) in the worktree. Defaults to `"--continue"` (claude, cursor, cursor-grok) and `"resume --last"` (codex) on the built-in presets; set it for custom agents or to override. `crew resume --new` ignores it and cold-starts. No session id is stored. |
341
+ | `agents.definitions.<name>.resumeArgs` | preset default | Shell args appended to `cmd` on `crew resume` so the agent [reopens its previous conversation](#resuming-the-agents-conversation) in the worktree. Defaults to `"--continue"` (claude, cursor, cursor-grok, pi) and `"resume --last"` (codex) on the built-in presets; set it for custom agents or to override. `crew resume --new` ignores it and cold-starts. No session id is stored. |
339
342
  | `prompts.initial` | unattended template | First message sent to the agent: the execution wrapper around each task. The task description is the task-specific prompt. Placeholders: `{{task}}`, `{{worktree}}`, `{{title}}`, `{{description}}`. Override only to change the execution contract for every task, such as team-wide review rules or tool conventions. Mutually exclusive with `prompts.promptFile`. |
340
343
  | `prompts.promptFile` | optional | Path to a UTF-8 file whose contents become `prompts.initial`, read at load time. Resolved relative to the config file's directory; `~` is expanded and absolute paths are used as-is. The JSON-friendly alternative to inlining a large prompt or `readFileSync`. Mutually exclusive with `prompts.initial`. |
341
344
  | `workspaceKind` | `"auto"` | Terminal session manager. `"auto"` picks `cmux` when on PATH, else `tmux`. Set to `"cmux"`, `"tmux"`, or `"zellij"` to fail loudly when the chosen backend is missing. |
@@ -16,6 +16,30 @@ echo "GROUNDCREW_LINEAR_API_KEY='op://<vault>/LINEAR_API_KEY/credential'" > .env
16
16
  op run --env-file .env.1password -- crew doctor
17
17
  ```
18
18
 
19
+ ## Pi Provider Authentication
20
+
21
+ Pi does **not** require authentication with every provider it supports. It only needs credentials for the provider used by the selected model. The built-in Groundcrew preset does not force a provider or model, so Pi uses the defaults from its own settings.
22
+
23
+ Authenticate the provider before the first unattended launch:
24
+
25
+ ```bash
26
+ pi
27
+ # In Pi: /login, select and authenticate the provider Groundcrew tasks will use,
28
+ # then /quit.
29
+ ```
30
+
31
+ By default, Pi stores provider API keys and subscription tokens in `~/.pi/agent/auth.json`; `PI_CODING_AGENT_DIR` changes that base directory. You can authenticate several providers for interactive model switching, but a fixed Pi launch profile only needs its configured provider. `crew doctor` verifies that the `pi` executable exists; it cannot verify provider credentials without making a model request.
32
+
33
+ If you use a Claude Pro/Max subscription, Pi's [provider documentation](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/providers.md#claude-promax) warns that third-party harness usage is billed as extra usage per token rather than against normal plan limits.
34
+
35
+ Credential handling depends on the runner:
36
+
37
+ - `none`: Pi uses the host's auth file. Ambient provider API-key environment variables are also inherited.
38
+ - `safehouse`: current Safehouse releases include a Pi profile that grants access to the default `~/.pi` directory. Authenticate on the host first and keep the default directory when using that profile. To pass an ambient provider API key instead, list its name in the Pi definition's `preLaunchEnv`; Safehouse otherwise sanitizes it. See [Pi on Safehouse](./runners.md#pi-on-safehouse) for nonstandard install prefixes.
39
+ - `sdx`: the contributed Pi kit's supported default keeps an Anthropic key on the host and injects it through Docker Sandboxes' credential proxy. After creating the sandbox, configure the credential specifically for it with `sbx secret set groundcrew-pi anthropic`. Host Pi auth files are not copied into the sandbox. Other providers require corresponding sandbox network and credential policy; see [Docker Sandboxes Setup](./runners.md#docker-sandboxes-setup).
40
+
41
+ The built-in command is `pi --approve`. Here `--approve` resolves Pi's **project trust** prompt so an unattended task can load project-local Pi resources; it does not authenticate an AI provider and does not bypass Groundcrew's Safehouse or Docker Sandbox boundary.
42
+
19
43
  ## Build-Time Secrets
20
44
 
21
45
  Groundcrew forwards a small allowlist of build-time secrets from your shell into the `prepareWorktree` phase so package installs can authenticate against private registries. The agent process never inherits these values.
package/docs/runners.md CHANGED
@@ -52,6 +52,23 @@ Scope and limits:
52
52
  - **Ignored by `sdx` / `none`.** The other runners ignore it, so you can leave `networkEgress` set while switching `local.runner`.
53
53
  - **No additional effect when `cmd` already starts with `safehouse`:** that command owns its own wrap, so groundcrew injects nothing. Groundcrew-managed setup/resume launches still reject cmd-owned Safehouse wraps because worker self-completion env cannot be injected.
54
54
 
55
+ ## Pi on Safehouse
56
+
57
+ Current Agent Safehouse releases ship a dedicated [`pi.sb` profile](https://github.com/eugene1g/agent-safehouse/blob/main/profiles/60-agents/pi.sb) that grants Pi's default `~/.pi` state while keeping the worktree boundary in Groundcrew's composed sandbox. Its bundled runtime grants cover system package roots, common Node version managers, and `~/.local` npm installs. If `command -v pi` resolves through another home-directory prefix such as `~/.npm-global`, add that prefix to `local.readOnlyDirs` so Safehouse can read both the launcher and package files:
58
+
59
+ ```ts
60
+ local: {
61
+ runner: "safehouse",
62
+ readOnlyDirs: ["~/.config/tfenv", "~/.npm-global"],
63
+ },
64
+ ```
65
+
66
+ Update Safehouse if a Pi launch reports that its profile or `~/.pi/agent` is unavailable. The profile also assumes Pi's default state directory; a custom `PI_CODING_AGENT_DIR` needs corresponding Safehouse environment and writable-path grants.
67
+
68
+ Safehouse's Pi profile exposes the real `~/.pi` state read/write, so use it only with repositories whose project-local Pi resources you trust. Use Docker Sandboxes when unattended repository code must be isolated from the host's Pi settings, extensions, credentials, and session state.
69
+
70
+ Groundcrew's bundled Clearance allowlist covers Pi's startup service, Anthropic, OpenAI, and their subscription-authentication hosts. Pi supports many additional providers; add the selected provider's hosts with `CLEARANCE_ALLOW_HOSTS` / `CLEARANCE_ALLOW_HOSTS_FILES`, or explicitly choose `local.networkEgress: "open"`.
71
+
55
72
  ## Docker Sandboxes Setup
56
73
 
57
74
  `sdx` does not support `unsandboxedHooks`. The sdx container has no
@@ -69,3 +86,15 @@ sbx exec -it groundcrew-claude gh auth login
69
86
  ```
70
87
 
71
88
  Replace `claude` with the sbx agent name for your agent and `<projectDir>` with `workspace.projectDir` from `crew.config.ts`. Manage lifecycle and auth with `sbx` directly (`sbx ls`, `sbx exec`, `sbx rm`). Groundcrew does not create, authenticate, regenerate, list, or remove sandboxes.
89
+
90
+ Pi is available as a contributed Docker Sandbox agent kit. Its supported default routes Anthropic requests through Docker Sandboxes' [credential proxy](https://docs.docker.com/ai/sandboxes/security/credentials/), so the real key remains on the host. Create the exact sandbox name Groundcrew addresses, then scope that credential to this sandbox:
91
+
92
+ ```bash
93
+ sbx create --name groundcrew-pi \
94
+ --kit "git+https://github.com/docker/sbx-kits-contrib.git#ref=v0.12.0&dir=pi" \
95
+ pi <projectDir>
96
+ sbx secret set groundcrew-pi anthropic
97
+ sbx exec -it groundcrew-pi gh auth login
98
+ ```
99
+
100
+ The example pins the reviewed `v0.12.0` kit; review upstream changes before moving the `ref` to a newer release. Enable it in Groundcrew with `pi: { sandbox: { agent: "pi" } }`. The sandbox is persistent, so Pi's per-worktree sessions remain available to later `crew resume` launches. The contributed kit's default network and credential policy supports Anthropic; use a reviewed custom kit or policy before selecting another provider or storing its credentials inside the sandbox.
@@ -33,6 +33,20 @@ Hook failures are advisory. Groundcrew logs the non-zero exit and still launches
33
33
  the agent so a flaky package registry or stale lockfile does not block the
34
34
  session.
35
35
 
36
+ ## Task-level opt-out
37
+
38
+ Some tasks need the repository checkout but not its dependency installation or
39
+ code generation. Add the exact Linear label `groundcrew-skip-prepare` to skip
40
+ worktree preparation for that task. Shell task sources can emit
41
+ `"worktreePreparation": "skip"` in the issue JSON for the same behavior.
42
+
43
+ The opt-out skips every preparation layer, including the operator-only
44
+ `unsandboxedHooks.prepareWorktree` hook. Groundcrew still creates the worktree
45
+ and launches the agent normally. This policy does not make the worktree
46
+ read-only; it only skips preparation commands.
47
+
48
+ Dry-run output includes `prepareWorktree skipped` when the policy applies.
49
+
36
50
  ## Precedence
37
51
 
38
52
  `prepareWorktree` resolves through three layers, highest priority first:
@@ -136,7 +136,7 @@ In-session commands are ordinary subcommands (no separate namespace). **Task ide
136
136
  ### 7.2 Config — `crew.config.jsonc`
137
137
 
138
138
  - **JSONC plus a published JSON Schema** (generated from zod, referenced via `$schema`). TS config dies: a global config can't resolve the package import for its types, so it was ceremony without safety. One filename, one location rule: `~/.config/groundcrew/`, or project-local.
139
- - **Principle 1 — omitted = detected, specified = exactly yours, never merged.** `sources` omitted → `[{ "kind": "todo-txt" }]`; `agents` omitted → presets for CLIs on PATH (claude > codex > cursor); `presenter` omitted → first of cmux/tmux/zellij found. Listing anything replaces the detected set — disabling = not listing.
139
+ - **Principle 1 — omitted = detected, specified = exactly yours, never merged.** `sources` omitted → `[{ "kind": "todo-txt" }]`; `agents` omitted → presets for CLIs on PATH (claude > codex > cursor > pi); `presenter` omitted → first of cmux/tmux/zellij found. Listing anything replaces the detected set — disabling = not listing.
140
140
  - **Principle 2 — no secrets, structurally.** No schema field accepts a token value; manifests declare secret _names_, resolved from the parent environment, a `secrets.env` (doctor warns unless 0600), or `op run`. `GROUNDCREW_LINEAR_API_KEY` dies; the linear bundle declares `LINEAR_API_KEY` like any source. Doctor flags credential-looking strings in config.
141
141
  - Minimal legal config: `{ "workspace": { "baseDirectory": "~/dev" } }`. Worktrees default to `<baseDirectory>/.groundcrew/worktrees`. No abbreviations anywhere (`maximumInProgress`, `pollIntervalMilliseconds`, `sessionLimitPercentage`, `readOnlyDirectories`, `workingDirectory`).
142
142
  - Agent profiles get first-class `model` / `effort` / `resume` fields; presets map them to CLI flags; `{{model}}` / `{{sessionId}}` placeholders for custom commands. Per-harness session-id capture mechanics are an implementation detail under this shape.
@@ -69,12 +69,17 @@ declared paths. The `sdx` runner does not mount these host paths.
69
69
  "updatedAt": "2026-05-22T15:00:00Z",
70
70
  "blockers": [{ "id": "JIRA-122", "title": "Schema migration", "status": "done" }],
71
71
  "hasMoreBlockers": false,
72
+ "worktreePreparation": "skip",
72
73
  "sourceRef": { "nativeId": "10042" }
73
74
  }
74
75
  ]
75
76
  ```
76
77
 
77
78
  Allowed `status` values are `todo`, `in-progress`, `in-review`, `done`, and `other`. In shell-script JSON output, emit both `repository` and `agent`; use `null` when a task should not be groundcrew-eligible. `hasMoreBlockers` is optional and defaults to `false`; `sourceRef` is opaque data that groundcrew passes back to your writeback command.
79
+ `worktreePreparation` is optional. Set it to `skip` when the task should create
80
+ its worktree without running any configured `prepareWorktree` or
81
+ `unsandboxedHooks.prepareWorktree` command; omission preserves the default
82
+ preparation behavior.
78
83
 
79
84
  ## Todo.txt
80
85
 
@@ -144,6 +149,10 @@ crew task create "Fix cancellation retry race" \
144
149
 
145
150
  Created Linear issues are assigned to the API key's viewer, moved into a Todo workflow state, labeled with exactly one `agent-*` label, and given a description that includes `Repository: <repo>` near the top. Repeated `--dep <ISSUE>` values create Linear blocked-by relations when the dependency is a Linear issue id.
146
151
 
152
+ Add the exact `groundcrew-skip-prepare` label to an existing Linear task when it
153
+ should create a worktree without running configured worktree preparation hooks.
154
+ The label does not make the worktree read-only.
155
+
147
156
  ## The `description` is the agent's prompt
148
157
 
149
158
  Groundcrew wraps each issue's `description` in its generic unattended-execution prompt and hands it to the agent as the task. It does not pick a different prompt per source or task type. Specialized behavior belongs in the `description` your adapter emits, not in groundcrew.
@@ -56,6 +56,8 @@ Groundcrew creates isolated per-task worktrees for unattended runs, so the shipp
56
56
 
57
57
  Groundcrew provisions each worktree and records workspace trust for `claude`, `codex`, and `cursor-agent` before the agent starts (via [`agent-trust`](https://www.npmjs.com/package/agent-trust)), so unattended launches do not stall on first-run trust dialogs. There is no config toggle: if groundcrew created the worktree, trust is recorded in the agent's local store (`~/.claude.json` for Claude, `~/.codex/config.toml` for Codex, `~/.cursor/projects/<slug>/.workspace-trusted` for Cursor) for the worktree launch directory. Cursor markers use `trustMethod: "groundcrew-auto-trust"` for auditability. This applies only to groundcrew-provisioned worktrees at launch time; it does not trust arbitrary paths you open manually. Permission mode (`claude --permission-mode auto`) and Codex approval bypass (`--dangerously-bypass-approvals-and-sandbox`) are separate from workspace trust.
58
58
 
59
+ Pi's trust store is not supported by `agent-trust`, so its built-in preset passes `pi --approve` on every launch instead. This approves project-local Pi settings, packages, extensions, and skills for that process. If you override `agents.definitions.pi.cmd`, keep `--approve` for the same unattended behavior or use `--no-approve` to ignore protected project resources without prompting. Provider login is separate; see [Pi Provider Authentication](./credentials.md#pi-provider-authentication).
60
+
59
61
  Inspect or clean trust entries with the published CLI:
60
62
 
61
63
  ```bash
@@ -82,4 +84,4 @@ Set `workspaceKind: "zellij"` to run agents as tabs in a shared `groundcrew` zel
82
84
 
83
85
  ## Agent CLI Must Accept A Positional Prompt
84
86
 
85
- The handoff is `<your cmd> "<prompt>"`. `claude`, `codex`, and `cursor-agent` all support this.
87
+ The handoff is `<your cmd> "<prompt>"`. `claude`, `codex`, `cursor-agent`, and `pi` all support this.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/groundcrew",
3
- "version": "4.48.3",
3
+ "version": "4.49.0",
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",
@@ -69,8 +69,8 @@
69
69
  "verify": "node scripts/verifyAll.mts"
70
70
  },
71
71
  "dependencies": {
72
- "@clipboard-health/clearance": "1.4.7",
73
- "@linear/sdk": "88.1.0",
72
+ "@clipboard-health/clearance": "1.6.2",
73
+ "@linear/sdk": "88.2.0",
74
74
  "agent-trust": "1.0.0",
75
75
  "cosmiconfig": "9.0.2",
76
76
  "tslib": "2.8.1",
@@ -78,8 +78,8 @@
78
78
  },
79
79
  "devDependencies": {
80
80
  "@clipboard-health/ai-rules": "2.43.4",
81
- "@clipboard-health/oxlint-config": "1.12.9",
82
- "@nx/js": "22.7.7",
81
+ "@clipboard-health/oxlint-config": "1.14.1",
82
+ "@nx/js": "23.1.0",
83
83
  "@tsconfig/node24": "24.0.4",
84
84
  "@tsconfig/strictest": "2.0.8",
85
85
  "@types/node": "25.9.5",
@@ -88,15 +88,15 @@
88
88
  "dependency-cruiser": "18.1.0",
89
89
  "husky": "9.1.7",
90
90
  "jscpd": "5.0.12",
91
- "knip": "6.27.0",
92
- "lint-staged": "17.0.8",
91
+ "knip": "6.29.0",
92
+ "lint-staged": "17.1.1",
93
93
  "markdownlint-cli2": "0.23.1",
94
- "nx": "22.7.7",
95
- "oxfmt": "0.59.0",
96
- "oxlint": "1.73.0",
97
- "oxlint-tsgolint": "0.24.0",
94
+ "nx": "23.1.0",
95
+ "oxfmt": "0.60.0",
96
+ "oxlint": "1.74.0",
97
+ "oxlint-tsgolint": "7.0.2001",
98
98
  "syncpack": "15.3.2",
99
- "vite": "8.1.4",
99
+ "vite": "8.1.5",
100
100
  "vitest": "4.1.10"
101
101
  },
102
102
  "engines": {