@clipboard-health/groundcrew 1.3.0 → 1.5.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.
- package/README.md +46 -29
- package/clearance-allow-hosts +2 -0
- package/configExample.ts +16 -0
- package/package.json +1 -1
- package/src/cli.js +6 -2
- package/src/cli.js.map +1 -1
- package/src/commands/dispatcher.js +7 -2
- package/src/commands/dispatcher.js.map +1 -1
- package/src/commands/setupWorkspace.d.ts +2 -1
- package/src/commands/setupWorkspace.js +86 -8
- package/src/commands/setupWorkspace.js.map +1 -1
- package/src/commands/spriteSetup.d.ts +19 -0
- package/src/commands/spriteSetup.js +176 -8
- package/src/commands/spriteSetup.js.map +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js.map +1 -1
- package/src/lib/boardSource.d.ts +5 -1
- package/src/lib/boardSource.js +28 -26
- package/src/lib/boardSource.js.map +1 -1
- package/src/lib/config.d.ts +21 -1
- package/src/lib/config.js +59 -1
- package/src/lib/config.js.map +1 -1
- package/src/lib/launchCommand.d.ts +11 -7
- package/src/lib/launchCommand.js +50 -10
- package/src/lib/launchCommand.js.map +1 -1
- package/src/lib/workspaces.js +6 -2
- package/src/lib/workspaces.js.map +1 -1
- package/src/lib/worktrees.d.ts +8 -2
- package/src/lib/worktrees.js +191 -9
- package/src/lib/worktrees.js.map +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,8 @@ This installs the `crew` binary. `@clipboard-health/clearance` is pulled in tran
|
|
|
83
83
|
```bash
|
|
84
84
|
crew sprite setup crew-claude-1 \
|
|
85
85
|
--claude \
|
|
86
|
+
--codex \
|
|
87
|
+
--copy-local-codex-auth \
|
|
86
88
|
--github \
|
|
87
89
|
--git-name "Rocky Warren" \
|
|
88
90
|
--git-email "1085683+therockstorm@users.noreply.github.com" \
|
|
@@ -91,7 +93,7 @@ This installs the `crew` binary. `@clipboard-health/clearance` is pulled in tran
|
|
|
91
93
|
--checkpoint
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
Known MCP aliases are `linear`, `slack`, and `notion`. For another HTTP MCP server, pass `--mcp name=https://example.com/mcp`. The command creates the Sprite if needed, prepares `~/dev`, configures Git, runs selected auth flows, adds selected MCP servers to Claude Code, and then opens Claude so you can run `/mcp` and authenticate only those selected servers. Use `--skip-mcp-auth` when you only want to add MCP definitions, and run the `/mcp` step later.
|
|
96
|
+
Known MCP aliases are `linear`, `slack`, and `notion`. For another HTTP MCP server, pass `--mcp name=https://example.com/mcp`. The command creates the Sprite if needed, prepares `~/dev`, configures Git, runs selected auth flows, adds selected MCP servers to Claude Code, and then opens Claude so you can run `/mcp` and authenticate only those selected servers. `--copy-local-codex-auth` copies `${CODEX_HOME:-$HOME/.codex}/auth.json` into `/home/sprite/.codex/auth.json` and then verifies `codex login status`; it never prints the file contents. Use `--skip-mcp-auth` when you only want to add MCP definitions, and run the `/mcp` step later.
|
|
95
97
|
|
|
96
98
|
Repo setup is separate from runner setup and should run after the ticket branch exists, immediately before launching an agent. It clones/fetches the repo in the Sprite, checks out the requested branch (creating it from the base branch when it does not exist on origin), forwards only build-time secrets for the dependency install, removes the temporary secret file, clears those env vars, and then exits. It reuses the same Node/npm bootstrap command as groundcrew's Docker Sandboxes path.
|
|
97
99
|
|
|
@@ -102,6 +104,8 @@ This installs the `crew` binary. `@clipboard-health/clearance` is pulled in tran
|
|
|
102
104
|
|
|
103
105
|
By default bootstrap forwards any locally set `NPM_TOKEN` and `BUF_TOKEN`. Use repeated `--secret <ENV_NAME>` to require a specific set, or `--no-secrets` for public installs. Do not checkpoint after repo bootstrap; dependency state is branch-specific and should be refreshed per ticket.
|
|
104
106
|
|
|
107
|
+
To run a ticket remotely through the orchestrator or `crew run --ticket`, label it with `agent-remote` plus the agent label you want, for example `agent-claude` or `agent-codex`. `agent-remote` alone uses `models.default`. Groundcrew keeps cmux/tmux local, creates a per-ticket git worktree in the Sprite under `/home/sprite/groundcrew/worktrees`, and runs the agent with `sprite exec --tty`. Use `crew sprite sessions [<sprite-name>]` to inspect active Sprite sessions and `crew sprite attach <session-id-or-command> [--sprite <sprite-name>]` to attach to one; both commands default to `remote.sprite.spriteName` when the Sprite name is omitted.
|
|
108
|
+
|
|
105
109
|
8. **Run.** Doctor first, then a dry run, then the real thing:
|
|
106
110
|
|
|
107
111
|
```bash
|
|
@@ -115,45 +119,54 @@ This installs the `crew` binary. `@clipboard-health/clearance` is pulled in tran
|
|
|
115
119
|
|
|
116
120
|
Required fields are marked **required**; everything else has a default and can be omitted from `config.ts`.
|
|
117
121
|
|
|
118
|
-
| Key | Default
|
|
119
|
-
| --------------------------------------- |
|
|
120
|
-
| `linear.projectSlug` | **required**
|
|
121
|
-
| `linear.statuses.todo` | `"Todo"`
|
|
122
|
-
| `linear.statuses.inProgress` | `"In Progress"`
|
|
123
|
-
| `linear.statuses.done` | `"Done"`
|
|
124
|
-
| `linear.statuses.terminal` | `["Done"]`
|
|
125
|
-
| `git.remote` | `"origin"`
|
|
126
|
-
| `git.defaultBranch` | `"main"`
|
|
127
|
-
| `workspace.projectDir` | **required**
|
|
128
|
-
| `workspace.knownRepositories` | **required**
|
|
129
|
-
| `orchestrator.maximumInProgress` | `4`
|
|
130
|
-
| `orchestrator.pollIntervalMilliseconds` | `120_000`
|
|
131
|
-
| `orchestrator.sessionLimitPercentage` | `85`
|
|
132
|
-
| `models.default` | `"claude"`
|
|
133
|
-
| `models.isolation` | `"auto"`
|
|
134
|
-
| `models.definitions` | `{ claude, codex }`
|
|
135
|
-
| `models.definitions.<name>.cmd` | —
|
|
136
|
-
| `models.definitions.<name>.color` | —
|
|
137
|
-
| `models.definitions.<name>.sandbox` | `{ agent }`
|
|
138
|
-
| `models.definitions.<name>.usage` | optional
|
|
139
|
-
| `prompts.initial` | (template)
|
|
140
|
-
| `workspaceKind` | `"auto"`
|
|
141
|
-
| `
|
|
142
|
-
|
|
143
|
-
|
|
122
|
+
| Key | Default | What it does |
|
|
123
|
+
| --------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
124
|
+
| `linear.projectSlug` | **required** | Linear project URL slug (e.g. `ai-strategy-5152195762f3`). The trailing 12-char hex `slugId` is what's matched against Linear's API; the leading name keeps `config.ts` self-documenting and the lookup survives project renames. |
|
|
125
|
+
| `linear.statuses.todo` | `"Todo"` | Status name picked up for new work. |
|
|
126
|
+
| `linear.statuses.inProgress` | `"In Progress"` | Status set after a workspace is provisioned; counts toward `maximumInProgress`. |
|
|
127
|
+
| `linear.statuses.done` | `"Done"` | Status that triggers worktree cleanup. |
|
|
128
|
+
| `linear.statuses.terminal` | `["Done"]` | Additional status names treated as terminal for cleanup, board remaining counts, and blocker checks. The `done` status is always included. |
|
|
129
|
+
| `git.remote` | `"origin"` | Remote used for `fetch` and as the worktree base ref. |
|
|
130
|
+
| `git.defaultBranch` | `"main"` | Branch fetched from `git.remote` and used as the worktree base. |
|
|
131
|
+
| `workspace.projectDir` | **required** | Parent dir for cloned repos. Sandbox-backed ticket worktrees live under each repo's `.sbx/` directory. |
|
|
132
|
+
| `workspace.knownRepositories` | **required** | Repos searched for in ticket descriptions to infer where work belongs. A ticket labeled for groundcrew (`agent-*`) fails fast when no known repo appears; unlabeled tickets are ignored. |
|
|
133
|
+
| `orchestrator.maximumInProgress` | `4` | Cap on tickets in `linear.statuses.inProgress` at once. |
|
|
134
|
+
| `orchestrator.pollIntervalMilliseconds` | `120_000` | Poll interval in `--watch` mode. |
|
|
135
|
+
| `orchestrator.sessionLimitPercentage` | `85` | Number in `(0, 100]`. A model whose codexbar session window exceeds this percentage is skipped that tick. |
|
|
136
|
+
| `models.default` | `"claude"` | Tiebreak for `agent-any` resolution and fallback for explicit but unknown `agent-*` labels. Also used by `crew setup <TICKET>` for unlabeled tickets. `crew run` ignores unlabeled tickets and does not apply this default. Must exist in `models.definitions`. |
|
|
137
|
+
| `models.isolation` | `"auto"` | Isolation strategy. `"auto"` picks Safehouse on macOS, else Docker Sandboxes when the model has a sandbox config. Safehouse or a model sandbox config is required; if neither is available, setup fails. Set `"none"` explicitly to run directly. |
|
|
138
|
+
| `models.definitions` | `{ claude, codex }` | Agent definitions. Additive merge with shipped defaults. |
|
|
139
|
+
| `models.definitions.<name>.cmd` | — | Shell command launched for the model. For sandbox-backed models this runs inside the persistent sandbox; otherwise it runs in the workspace. `{{worktree}}` and `{{sandbox}}` are replaced before launch. |
|
|
140
|
+
| `models.definitions.<name>.color` | — | Color for the workspace status pill (cmux only; tmux silently drops it). |
|
|
141
|
+
| `models.definitions.<name>.sandbox` | `{ agent }` | Optional Docker Sandboxes backing. Defaults set `claude` → `agent: "claude"` and `codex` → `agent: "codex"`. Set `sandbox: false` on an override to run the command outside Docker Sandboxes. |
|
|
142
|
+
| `models.definitions.<name>.usage` | optional | If set, codexbar usage is fetched for this model and gated by `sessionLimitPercentage`. Omit to never gate. When `usage.codexbar.source` is omitted, groundcrew uses `auto` on macOS and `cli` elsewhere. |
|
|
143
|
+
| `prompts.initial` | (template) | First message sent to the agent. Placeholders: `{{ticket}}`, `{{worktree}}`, `{{title}}`, `{{description}}`. |
|
|
144
|
+
| `workspaceKind` | `"auto"` | Terminal session manager. `"auto"` picks `cmux` when on PATH, else `tmux`. Set to `"cmux"` or `"tmux"` to fail loudly when the chosen backend is missing. tmux windows live in a dedicated `groundcrew` session. |
|
|
145
|
+
| `remote.sprite.spriteName` | `"crew-claude-1"` | Sprite used for tickets labeled `agent-remote`. |
|
|
146
|
+
| `remote.sprite.owner` | `"ClipboardHealth"` | GitHub owner used when cloning bare repository names inside the Sprite. |
|
|
147
|
+
| `remote.sprite.repoRoot` | `"/home/sprite/dev"` | Shared clone root inside the Sprite. |
|
|
148
|
+
| `remote.sprite.worktreeRoot` | `"/home/sprite/groundcrew/worktrees"` | Per-ticket remote worktree root inside the Sprite. |
|
|
149
|
+
| `remote.sprite.secretNames` | `["NPM_TOKEN", "BUF_TOKEN"]` | Build-only env vars that may be uploaded for remote dependency setup, then unset before the agent process starts. |
|
|
150
|
+
| `logging.file` | XDG state path | Append-mode log file destination. `log()` / `logEvent()` tee here in addition to stdout, so a vanished workspace doesn't take the evidence with it. Defaults to `${XDG_STATE_HOME:-$HOME/.local/state}/groundcrew/groundcrew.log`. |
|
|
151
|
+
|
|
152
|
+
The branch prefix (`<prefix>-<TICKET>`) is derived from your OS username (`os.userInfo().username`), not configured. Agent selection looks for a top-level Linear label named `agent-<model>` (e.g. `agent-claude`, `agent-codex`). Add `agent-remote` to run that ticket in the configured Sprite runner instead of locally; `agent-remote` is a modifier label, not a model. **`crew run` only fetches tickets with an `agent-*` label** — the GraphQL query filters them server-side, so unlabeled tickets are never returned by Linear's API and do not appear in the rendered board. Use `crew setup <TICKET>` to provision an unlabeled ticket on demand (manual setup falls back to `models.default`). The reserved label `agent-any` routes the ticket to the configured model with the most available session capacity (lowest codexbar session-used percent), skipping any model already over `sessionLimitPercentage`. With no usage data, `agent-any` resolves to `models.default`. The name `any` cannot be used in `models.definitions`. Todo tickets blocked by Linear issues that are not in `linear.statuses.terminal` are skipped until their blockers reach a terminal status.
|
|
144
153
|
|
|
145
154
|
## Manual commands
|
|
146
155
|
|
|
147
156
|
```bash
|
|
148
157
|
crew sandbox auth <repo> --model claude
|
|
149
158
|
crew sandbox auth <repo> --model codex
|
|
150
|
-
crew sprite setup crew-claude-1 --claude --github --mcp linear --checkpoint
|
|
159
|
+
crew sprite setup crew-claude-1 --claude --codex --copy-local-codex-auth --github --mcp linear --checkpoint
|
|
151
160
|
crew sprite bootstrap crew-claude-1 core-utils --branch rocky-team-123
|
|
161
|
+
crew sprite sessions
|
|
162
|
+
crew sprite attach <session-id-or-command> --sprite crew-claude-1
|
|
163
|
+
crew sprite ps crew-claude-1
|
|
164
|
+
crew sprite interrupt <process-group-id> --sprite crew-claude-1
|
|
152
165
|
crew run --ticket <TICKET>
|
|
153
166
|
crew cleanup <TICKET>
|
|
154
167
|
```
|
|
155
168
|
|
|
156
|
-
`crew run --ticket <TICKET>` provisions a single ticket the same way the orchestrator would: the repo is parsed from the ticket's Linear description
|
|
169
|
+
`crew run --ticket <TICKET>` provisions a single ticket the same way the orchestrator would: the repo is parsed from the ticket's Linear description, the model comes from the ticket's `agent-*` label, and `agent-remote` is honored. If the description does not mention a repo from `workspace.knownRepositories`, setup fails before provisioning. `--watch` and `--ticket` are mutually exclusive — `--watch` drives the orchestrator loop; `--ticket` provisions one ticket and exits. `crew cleanup <TICKET>` resolves to every worktree carrying that ticket id (host, sandbox, and Sprite kinds, across repos) and tears them all down. To inspect remote sessions, run `crew sprite sessions` or pass an explicit Sprite name. To attach to a listed session id or command selector, run `crew sprite attach <session-id-or-command>`. If an attached agent appears stuck in a long-running shell tool, use `crew sprite ps <sprite>` to find the child process group (`PGID`) under the agent, then use `crew sprite interrupt <PGID> --sprite <sprite>` to send SIGINT to that child command without killing the agent session. If cleanup cannot remove a remote worktree because the agent is still running, stop that session with `sprite sessions kill -s crew-claude-1 <session-id>` and retry cleanup. To inspect codexbar session windows directly, run `codexbar usage`; the orchestrator already gates on this internally via `orchestrator.sessionLimitPercentage`.
|
|
157
170
|
|
|
158
171
|
## Gotchas
|
|
159
172
|
|
|
@@ -161,11 +174,15 @@ crew cleanup <TICKET>
|
|
|
161
174
|
- **Safehouse-already-wrapped commands are not re-wrapped.** If a `models.definitions.<name>.cmd` already starts with `safehouse`, groundcrew assumes that command owns its Safehouse flags and does not add the `safehouse-clearance` wrapper a second time. Changing the proxy's allowlist after it's running requires killing the PID in `${XDG_CACHE_HOME:-$HOME/.cache}/clearance/clearance.pid` so the next launch picks up the new env.
|
|
162
175
|
- **Authenticate before first ticket setup.** Run `crew sandbox auth <repo> --model <name>` before `crew run` for a repo/model. That first run carries no ticket prompt, so a required OAuth `/login` cannot consume task context.
|
|
163
176
|
- **Sandbox cleanup is intentionally conservative.** `crew cleanup` removes the per-ticket worktree and branch, but keeps the persistent sandbox so OAuth sessions, installed packages, and agent config survive later tickets. Use `sbx ls` and `sbx rm --force <name>` when you intentionally want to delete that persisted sandbox state.
|
|
177
|
+
- **Sprite cleanup is also conservative.** `crew cleanup` removes tracked remote worktrees and branches, but it does not kill active Sprite sessions. Use `crew sprite sessions [<sprite>]` to inspect sessions and `sprite sessions kill -s <sprite> <session-id>` when Git reports a worktree is busy.
|
|
178
|
+
- **Long-running remote shell tools block agent input.** Claude Code and similar TUI agents cannot accept a new prompt while one of their shell tools is still running. Use `crew sprite ps <sprite>` to inspect the remote process tree; interrupt the tool's child `PGID`, not the agent session `PGID`, with `crew sprite interrupt <PGID> --sprite <sprite>`.
|
|
179
|
+
- **Codex auth in Sprites may need auth-file copy.** If `crew sprite setup <sprite> --codex` finishes interactive login but `codex login status` still fails inside the Sprite, rerun with `--copy-local-codex-auth` after confirming local Codex auth works.
|
|
164
180
|
- **Usage source defaults are OS-aware.** `codexbar` usage uses `--source auto` on macOS so CodexBar can prefer account/web sources and fall back as it supports. On Linux/WSL it uses `--source cli`, so install the CodexBar Linux CLI and authenticate the provider CLIs inside that environment.
|
|
165
181
|
- **Status names matter.** If your team uses `Started` instead of `In Progress`, set `linear.statuses.inProgress = "Started"`.
|
|
166
182
|
- **Leaf-only.** Parent issues with children are ignored — sub-issues are the work items.
|
|
167
183
|
- **Tickets stay in the in-progress status until something else moves them.** Groundcrew sets a ticket to `inProgress` when it provisions a workspace and never advances it. The next transition (typically "in review" when a PR opens) is left to your team's Linear automation rules.
|
|
168
184
|
- **Project must be on a single Linear team in practice.** Cross-team projects work — the orchestrator caches the in-progress state ID per team — but every team in the project must use the same status name for `linear.statuses.inProgress`.
|
|
185
|
+
- **Claude launches in bypass-permissions mode by default.** Groundcrew creates isolated per-ticket worktrees and unattended remote sessions, so the shipped `claude` command is `claude --permission-mode bypassPermissions` to avoid workspace-trust and tool-permission prompts blocking automation. Override `models.definitions.claude.cmd` if you want a stricter mode.
|
|
169
186
|
- **Doctor's command introspection is shallow.** For sandbox-backed models it checks `sbx` plus `sbx diagnose`. For non-sandbox models it tokenizes `cmd` and checks the first two non-flag tokens against PATH (so `safehouse claude --foo` checks both `safehouse` and `claude`). Boolean flags without values, env-var assignments (`FOO=1`), shell pipelines, and subshells are not parsed — verify those manually. In particular, `npx -y claude` and `env FOO=1 claude` only check the wrapper, not the wrapped CLI.
|
|
170
187
|
- **Agent CLI must accept a positional prompt.** The handoff is `<your cmd> "<prompt>"`. `claude`, `codex`, and `cursor-agent` all support this.
|
|
171
188
|
|
package/clearance-allow-hosts
CHANGED
package/configExample.ts
CHANGED
|
@@ -77,6 +77,22 @@ export const config: Config = {
|
|
|
77
77
|
// // session and lose status-pill painting (cmux-only feature).
|
|
78
78
|
// workspaceKind: "auto",
|
|
79
79
|
//
|
|
80
|
+
// remote: {
|
|
81
|
+
// sprite: {
|
|
82
|
+
// // Tickets labeled `agent-remote` run through this shared Sprite.
|
|
83
|
+
// spriteName: "crew-claude-1",
|
|
84
|
+
// // Bare repository names are cloned as `${owner}/${repo}` inside the Sprite.
|
|
85
|
+
// owner: "ClipboardHealth",
|
|
86
|
+
// // Absolute paths inside the Sprite. Groundcrew creates one shared clone
|
|
87
|
+
// // per repo and one remote git worktree per ticket.
|
|
88
|
+
// repoRoot: "/home/sprite/dev",
|
|
89
|
+
// worktreeRoot: "/home/sprite/groundcrew/worktrees",
|
|
90
|
+
// // Build-only env vars forwarded for remote dependency setup, then
|
|
91
|
+
// // unset before the agent process starts.
|
|
92
|
+
// secretNames: ["NPM_TOKEN", "BUF_TOKEN"],
|
|
93
|
+
// },
|
|
94
|
+
// },
|
|
95
|
+
//
|
|
80
96
|
// logging: {
|
|
81
97
|
// // Append-mode log file destination. `log()` / `logEvent()` tee here
|
|
82
98
|
// // in addition to stdout, so a vanished workspace doesn't take the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Linear-driven orchestrator that launches AI coding agents in isolated git worktrees, with workspace lifecycle, sandbox auth, and usage tracking.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
package/src/cli.js
CHANGED
|
@@ -65,9 +65,13 @@ const SUBCOMMANDS = {
|
|
|
65
65
|
invoke: sandboxAuthCli,
|
|
66
66
|
},
|
|
67
67
|
sprite: {
|
|
68
|
-
summary: "Create, authenticate, and
|
|
68
|
+
summary: "Create, authenticate, bootstrap, and inspect a remote Sprite runner",
|
|
69
69
|
usage: "setup <sprite-name> [--claude] [--github] [--mcp <alias|name=url>] [--checkpoint]\n" +
|
|
70
|
-
" → crew sprite bootstrap <sprite-name> <repo> [--branch <branch>]"
|
|
70
|
+
" → crew sprite bootstrap <sprite-name> <repo> [--branch <branch>]\n" +
|
|
71
|
+
" → crew sprite sessions [<sprite-name>]\n" +
|
|
72
|
+
" → crew sprite attach <session-id-or-command> [--sprite <sprite-name>]\n" +
|
|
73
|
+
" → crew sprite ps [<sprite-name>]\n" +
|
|
74
|
+
" → crew sprite interrupt <process-group-id> [--sprite <sprite-name>]",
|
|
71
75
|
invoke: spriteCli,
|
|
72
76
|
},
|
|
73
77
|
};
|
package/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../packages/groundcrew/src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQtE,KAAK,UAAU,MAA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AAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,WAAW,CAAC,sDAAsD,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAc;IACtC,MAAM,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAEnC,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;QAC/E,SAAS,EAAE,CAAC;QACZ,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACvB,CAAC;QACD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,UAAU,CAAC,oBAAoB,UAAU,IAAI,CAAC,CAAC;QAC/C,SAAS,EAAE,CAAC;QACZ,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;QAChC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -93,6 +93,7 @@ export function createDispatcher(deps) {
|
|
|
93
93
|
ticket: verdict.issue.id,
|
|
94
94
|
blockers: verdict.blockers,
|
|
95
95
|
model: verdict.model,
|
|
96
|
+
runner: verdict.issue.runner,
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
async function startEligibleIssue(start, dryRun, signal) {
|
|
@@ -103,13 +104,14 @@ export function createDispatcher(deps) {
|
|
|
103
104
|
if (dryRun) {
|
|
104
105
|
log(
|
|
105
106
|
/* v8 ignore next @preserve -- classifyTodo forces recovery=false in dry-run, so the resume branch can't fire here */
|
|
106
|
-
`[dry-run] Would ${recovery ? "resume" : "start"} ${issue.id} in ${issue.repository} (${issue.model})`);
|
|
107
|
+
`[dry-run] Would ${recovery ? "resume" : "start"} ${issue.id} in ${issue.repository} (${issue.model}, ${issue.runner})`);
|
|
107
108
|
logEvent("dispatch", {
|
|
108
109
|
outcome: "skipped",
|
|
109
110
|
reason: "dry_run",
|
|
110
111
|
ticket: issue.id,
|
|
111
112
|
model: issue.model,
|
|
112
113
|
repository: issue.repository,
|
|
114
|
+
runner: issue.runner,
|
|
113
115
|
});
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
@@ -122,6 +124,7 @@ export function createDispatcher(deps) {
|
|
|
122
124
|
repository: issue.repository,
|
|
123
125
|
ticket: issue.id,
|
|
124
126
|
model: issue.model,
|
|
127
|
+
runner: issue.runner,
|
|
125
128
|
};
|
|
126
129
|
await (signal === undefined
|
|
127
130
|
? setupWorkspace(config, setupOptions)
|
|
@@ -133,6 +136,7 @@ export function createDispatcher(deps) {
|
|
|
133
136
|
ticket: issue.id,
|
|
134
137
|
model: issue.model,
|
|
135
138
|
repository: issue.repository,
|
|
139
|
+
runner: issue.runner,
|
|
136
140
|
});
|
|
137
141
|
}
|
|
138
142
|
catch (error) {
|
|
@@ -142,6 +146,7 @@ export function createDispatcher(deps) {
|
|
|
142
146
|
ticket: issue.id,
|
|
143
147
|
model: issue.model,
|
|
144
148
|
repository: issue.repository,
|
|
149
|
+
runner: issue.runner,
|
|
145
150
|
error: errorMessage(error),
|
|
146
151
|
});
|
|
147
152
|
}
|
|
@@ -214,7 +219,7 @@ export function createDispatcher(deps) {
|
|
|
214
219
|
log(`${slots} slot(s) available, starting ${starts.length} ticket(s): ${starts.map(({ issue }) => `${issue.id}(${issue.model})`).join(", ")}`);
|
|
215
220
|
logEvent("dispatch", {
|
|
216
221
|
outcome: "starting",
|
|
217
|
-
tickets: starts.map(({ issue }) => `${issue.id}:${issue.model}`),
|
|
222
|
+
tickets: starts.map(({ issue }) => `${issue.id}:${issue.model}:${issue.runner}`),
|
|
218
223
|
});
|
|
219
224
|
for (const start of starts) {
|
|
220
225
|
// oxlint-disable-next-line no-await-in-loop -- one workspace at a time avoids racing on git
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.js","sourceRoot":"","sources":["../../../../../packages/groundcrew/src/commands/dispatcher.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAGL,iBAAiB,GAElB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAuB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,wBAAwB,GAAG,GAAG,CAAC;AACrC,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC;AAChC,MAAM,gBAAgB,GAAG,aAAa,GAAG,eAAe,CAAC;AAkBzD,MAAM,UAAU,gBAAgB,CAAC,IAAoB;IACnD,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxD,IAAI,sBAAsB,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/C,SAAS,iBAAiB,CAAC,KAAmB;QAC5C,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QACpC,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,sBAAsB,CAAC;QAChE,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,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;YACnB,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;SACjF,CAAC,CAAC;QAEH,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,4FAA4F;YAC5F,MAAM,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,2BAA2B,CAAC,eAAuB;IAC1D,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAC7B,gBAAgB,EAChB,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAAC,CAChD,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,eAAe,CAAC,CAAC;IACpE,MAAM,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC;IAE7E,OAAO,CAAC,cAAc,GAAG,aAAa,CAAC,GAAG,wBAAwB,CAAC;AACrE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ResolvedConfig } from "../lib/config.ts";
|
|
1
|
+
import { type ResolvedConfig, type WorkspaceRunner } from "../lib/config.ts";
|
|
2
2
|
interface TicketDetails {
|
|
3
3
|
title: string;
|
|
4
4
|
description: string;
|
|
@@ -7,6 +7,7 @@ export interface SetupWorkspaceOptions {
|
|
|
7
7
|
ticket: string;
|
|
8
8
|
repository: string;
|
|
9
9
|
model: string;
|
|
10
|
+
runner?: WorkspaceRunner;
|
|
10
11
|
/** When provided, skip the Linear lookup for prompt-template fields. */
|
|
11
12
|
details?: TicketDetails;
|
|
12
13
|
}
|
|
@@ -3,13 +3,13 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { ensureClearance } from "@clipboard-health/clearance";
|
|
5
5
|
import { fetchResolvedIssue } from "../lib/boardSource.js";
|
|
6
|
-
import { loadConfig } from "../lib/config.js";
|
|
6
|
+
import { BUILD_SECRET_NAMES, loadConfig, } from "../lib/config.js";
|
|
7
7
|
import { detectHostCapabilities } from "../lib/host.js";
|
|
8
8
|
import { resolveIsolationStrategy } from "../lib/isolation.js";
|
|
9
|
-
import {
|
|
9
|
+
import { buildLaunchCommand, buildSpriteLaunchCommand, shellSingleQuote, } from "../lib/launchCommand.js";
|
|
10
10
|
import { errorMessage, getLinearClient, log, readEnvironmentVariable } from "../lib/util.js";
|
|
11
11
|
import { workspaces } from "../lib/workspaces.js";
|
|
12
|
-
import { worktrees } from "../lib/worktrees.js";
|
|
12
|
+
import { repoDirFor, worktrees } from "../lib/worktrees.js";
|
|
13
13
|
async function fetchTicket(ticket) {
|
|
14
14
|
const client = getLinearClient();
|
|
15
15
|
const issue = await client.issue(ticket.toUpperCase());
|
|
@@ -32,9 +32,9 @@ function renderPrompt(template, variables) {
|
|
|
32
32
|
* dir is `rm -rf`'d by the launch command (and rollback path), so cleanup
|
|
33
33
|
* is already handled.
|
|
34
34
|
*/
|
|
35
|
-
function stageBuildSecrets(promptDir) {
|
|
35
|
+
function stageBuildSecrets(promptDir, secretNames = BUILD_SECRET_NAMES) {
|
|
36
36
|
const lines = [];
|
|
37
|
-
for (const name of
|
|
37
|
+
for (const name of secretNames) {
|
|
38
38
|
const value = readEnvironmentVariable(name);
|
|
39
39
|
if (value === undefined || value.length === 0) {
|
|
40
40
|
continue;
|
|
@@ -48,13 +48,27 @@ function stageBuildSecrets(promptDir) {
|
|
|
48
48
|
writeFileSync(secretsFile, `${lines.join("\n")}\n`, { mode: 0o600 });
|
|
49
49
|
return secretsFile;
|
|
50
50
|
}
|
|
51
|
+
function stageLaunchScript(promptDir, command) {
|
|
52
|
+
const launcherFile = join(promptDir, "launch.sh");
|
|
53
|
+
writeFileSync(launcherFile, `#!/usr/bin/env bash\n${command}\n`, { mode: 0o700 });
|
|
54
|
+
return launcherFile;
|
|
55
|
+
}
|
|
51
56
|
export async function setupWorkspace(config, options, runOptions = {}) {
|
|
52
57
|
const { ticket, repository, model } = options;
|
|
58
|
+
const runner = options.runner ?? "local";
|
|
53
59
|
const { signal } = runOptions;
|
|
54
60
|
const definition = config.models.definitions[model];
|
|
55
61
|
if (!definition) {
|
|
56
62
|
throw new Error(`Unknown model: ${model}`);
|
|
57
63
|
}
|
|
64
|
+
if (runner === "sprite") {
|
|
65
|
+
await setupSpriteWorkspace({
|
|
66
|
+
config,
|
|
67
|
+
options: { ...options, runner },
|
|
68
|
+
...(signal === undefined ? {} : { signal }),
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
58
72
|
const { resolved: strategy, reason } = resolveIsolationStrategy({
|
|
59
73
|
config,
|
|
60
74
|
model,
|
|
@@ -64,7 +78,7 @@ export async function setupWorkspace(config, options, runOptions = {}) {
|
|
|
64
78
|
if (strategy === "safehouse") {
|
|
65
79
|
await ensureClearance({ logger: log });
|
|
66
80
|
}
|
|
67
|
-
const spec = { repository, ticket, model, strategy };
|
|
81
|
+
const spec = { repository, ticket, model, strategy, runner };
|
|
68
82
|
const created = signal === undefined
|
|
69
83
|
? await worktrees.create(config, spec)
|
|
70
84
|
: await worktrees.create(config, spec, signal);
|
|
@@ -123,6 +137,69 @@ export async function setupWorkspace(config, options, runOptions = {}) {
|
|
|
123
137
|
throw error;
|
|
124
138
|
}
|
|
125
139
|
}
|
|
140
|
+
async function resolveTicketDetails(options) {
|
|
141
|
+
if (options.details !== undefined) {
|
|
142
|
+
return options.details;
|
|
143
|
+
}
|
|
144
|
+
log(`Fetching ${options.ticket} from Linear...`);
|
|
145
|
+
return await fetchTicket(options.ticket);
|
|
146
|
+
}
|
|
147
|
+
async function setupSpriteWorkspace(arguments_) {
|
|
148
|
+
const { config, options, signal } = arguments_;
|
|
149
|
+
const { ticket, repository, model } = options;
|
|
150
|
+
const definition = config.models.definitions[model];
|
|
151
|
+
/* v8 ignore next 3 @preserve -- setupWorkspace validates the model before routing here */
|
|
152
|
+
if (definition === undefined) {
|
|
153
|
+
throw new Error(`Unknown model: ${model}`);
|
|
154
|
+
}
|
|
155
|
+
log(`Workspace runner: sprite (${config.remote.sprite.spriteName})`);
|
|
156
|
+
const spec = { repository, ticket, model, strategy: "none", runner: "sprite" };
|
|
157
|
+
const created = signal === undefined
|
|
158
|
+
? await worktrees.create(config, spec)
|
|
159
|
+
: await worktrees.create(config, spec, signal);
|
|
160
|
+
const { branchName, dir: remoteWorktreeDir } = created;
|
|
161
|
+
const worktreeName = `${repository}-${ticket}`;
|
|
162
|
+
let promptDir;
|
|
163
|
+
try {
|
|
164
|
+
const ticketDetails = await resolveTicketDetails(options);
|
|
165
|
+
promptDir = mkdtempSync(join(tmpdir(), `groundcrew-${ticket}-`));
|
|
166
|
+
const promptFile = join(promptDir, "prompt.txt");
|
|
167
|
+
writeFileSync(promptFile, renderPrompt(config.prompts.initial, {
|
|
168
|
+
ticket,
|
|
169
|
+
worktree: worktreeName,
|
|
170
|
+
title: ticketDetails.title,
|
|
171
|
+
description: ticketDetails.description,
|
|
172
|
+
}));
|
|
173
|
+
const secretsFile = stageBuildSecrets(promptDir, config.remote.sprite.secretNames);
|
|
174
|
+
const remotePromptFile = `/tmp/groundcrew-${ticket}-prompt.txt`;
|
|
175
|
+
const remoteSecretsFile = secretsFile === undefined ? undefined : `/tmp/groundcrew-${ticket}-secrets.env`;
|
|
176
|
+
const spriteLaunchCommand = buildSpriteLaunchCommand({
|
|
177
|
+
definition,
|
|
178
|
+
spriteName: config.remote.sprite.spriteName,
|
|
179
|
+
promptFile,
|
|
180
|
+
remotePromptFile,
|
|
181
|
+
worktreeDir: remoteWorktreeDir,
|
|
182
|
+
secretNames: config.remote.sprite.secretNames,
|
|
183
|
+
...(secretsFile === undefined ? {} : { secretsFile, remoteSecretsFile }),
|
|
184
|
+
});
|
|
185
|
+
const launchCmd = `bash ${shellSingleQuote(stageLaunchScript(promptDir, spriteLaunchCommand))}`;
|
|
186
|
+
log("Opening workspace...");
|
|
187
|
+
await workspaces.open(config, {
|
|
188
|
+
name: ticket,
|
|
189
|
+
cwd: repoDirFor(config, repository),
|
|
190
|
+
command: launchCmd,
|
|
191
|
+
status: { text: `${model}:remote`, color: definition.color, icon: "sparkle" },
|
|
192
|
+
}, signal);
|
|
193
|
+
log(`Workspace "${ticket}" launched (${model}, sprite)`);
|
|
194
|
+
log(` Worktree: ${remoteWorktreeDir}`);
|
|
195
|
+
log(` Branch: ${branchName}`);
|
|
196
|
+
log(` Sprite: ${config.remote.sprite.spriteName}`);
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
await rollbackWorktree({ config, entry: created, promptDir });
|
|
200
|
+
throw error;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
126
203
|
async function rollbackWorktree(arguments_) {
|
|
127
204
|
log(`Setup failed; rolling back worktree ${arguments_.entry.repository}-${arguments_.entry.ticket}...`);
|
|
128
205
|
let result;
|
|
@@ -163,15 +240,16 @@ export async function setupWorkspaceCli(ticket, options = {}) {
|
|
|
163
240
|
const config = await loadConfig();
|
|
164
241
|
const client = getLinearClient();
|
|
165
242
|
const resolved = await fetchResolvedIssue({ client, config, ticket });
|
|
166
|
-
log(`Resolved ${ticket}: repository=${resolved.repository}, model=${resolved.model}`);
|
|
243
|
+
log(`Resolved ${ticket}: repository=${resolved.repository}, model=${resolved.model}, runner=${resolved.runner}`);
|
|
167
244
|
if (options.dryRun === true) {
|
|
168
|
-
log(`[dry-run] Would launch ${ticket} in ${resolved.repository} (${resolved.model})`);
|
|
245
|
+
log(`[dry-run] Would launch ${ticket} in ${resolved.repository} (${resolved.model}, ${resolved.runner})`);
|
|
169
246
|
return;
|
|
170
247
|
}
|
|
171
248
|
await setupWorkspace(config, {
|
|
172
249
|
ticket: ticket.toLowerCase(),
|
|
173
250
|
repository: resolved.repository,
|
|
174
251
|
model: resolved.model,
|
|
252
|
+
runner: resolved.runner,
|
|
175
253
|
details: { title: resolved.title, description: resolved.description },
|
|
176
254
|
});
|
|
177
255
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupWorkspace.js","sourceRoot":"","sources":["../../../../../packages/groundcrew/src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"setupWorkspace.js","sourceRoot":"","sources":["../../../../../packages/groundcrew/src/commands/setupWorkspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,UAAU,GAGX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,GACjB,MAAM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AM,EAAE,MAAM,EAAE,CAAC,CAAC;IACtE,GAAG,CACD,YAAY,MAAM,gBAAgB,QAAQ,CAAC,UAAU,WAAW,QAAQ,CAAC,KAAK,YAAY,QAAQ,CAAC,MAAM,EAAE,CAC5G,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QAC5B,GAAG,CACD,0BAA0B,MAAM,OAAO,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,KAAK,KAAK,QAAQ,CAAC,MAAM,GAAG,CACrG,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,cAAc,CAAC,MAAM,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE;QAC5B,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE;KACtE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -7,6 +7,7 @@ export interface SpriteSetupOptions {
|
|
|
7
7
|
shouldCreate: boolean;
|
|
8
8
|
shouldAuthenticateClaude: boolean;
|
|
9
9
|
shouldAuthenticateCodex: boolean;
|
|
10
|
+
shouldCopyLocalCodexAuth?: boolean;
|
|
10
11
|
shouldAuthenticateGithub: boolean;
|
|
11
12
|
shouldAuthenticateMcp: boolean;
|
|
12
13
|
shouldCheckpoint: boolean;
|
|
@@ -25,6 +26,24 @@ export interface SpriteBootstrapOptions {
|
|
|
25
26
|
shouldUseSecrets: boolean;
|
|
26
27
|
branchName?: string;
|
|
27
28
|
}
|
|
29
|
+
export interface SpriteSessionsOptions {
|
|
30
|
+
spriteName?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SpriteAttachOptions {
|
|
33
|
+
target: string;
|
|
34
|
+
spriteName?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SpriteProcessOptions {
|
|
37
|
+
spriteName?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SpriteInterruptOptions {
|
|
40
|
+
processGroupId: string;
|
|
41
|
+
spriteName?: string;
|
|
42
|
+
}
|
|
28
43
|
export declare function bootstrapSpriteRepository(options: SpriteBootstrapOptions): Promise<void>;
|
|
44
|
+
export declare function listSpriteSessions(options: SpriteSessionsOptions): Promise<void>;
|
|
45
|
+
export declare function attachSpriteSession(options: SpriteAttachOptions): Promise<void>;
|
|
46
|
+
export declare function listSpriteProcesses(options: SpriteProcessOptions): Promise<void>;
|
|
47
|
+
export declare function interruptSpriteProcessGroup(options: SpriteInterruptOptions): Promise<void>;
|
|
29
48
|
export declare function setupSprite(options: SpriteSetupOptions): Promise<void>;
|
|
30
49
|
export declare function spriteCli(argv: string[]): Promise<void>;
|