@clipboard-health/groundcrew 4.16.0 → 4.17.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 +1 -1
- package/dist/commands/dispatcher.d.ts.map +1 -1
- package/dist/commands/dispatcher.js +8 -1
- package/dist/lib/adapters/linear/factory.d.ts.map +1 -1
- package/dist/lib/adapters/linear/factory.js +1 -0
- package/dist/lib/adapters/linear/fetch.d.ts +2 -0
- package/dist/lib/adapters/linear/fetch.d.ts.map +1 -1
- package/dist/lib/adapters/linear/fetch.js +3 -0
- package/dist/lib/ticketSource.d.ts +6 -0
- package/dist/lib/ticketSource.d.ts.map +1 -1
- package/docs/configuration.md +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -73,7 +73,7 @@ crew run --watch
|
|
|
73
73
|
Linear works out of the box: assign tickets to yourself and add an `agent-*` label.
|
|
74
74
|
|
|
75
75
|
- `agent-claude`, `agent-codex`, or `agent-<name>` routes to that model.
|
|
76
|
-
- `agent-any` routes to the enabled model with the most
|
|
76
|
+
- `agent-any` routes to the enabled model with the most session headroom, after skipping models over their session limit or weekly paced budget.
|
|
77
77
|
- Tickets without an `agent-*` label are ignored by `crew run`; dispatch one manually with `crew start <TICKET>`.
|
|
78
78
|
|
|
79
79
|
Groundcrew scans `workspace.knownRepositories` to infer which repo a ticket belongs to.
|
|
@@ -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;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,KAAK,EAEX,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG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AAK,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,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,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnB;AAaD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,CA2NjE;AA2BD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,MAAM,CAQrE"}
|
|
@@ -111,7 +111,10 @@ export function createDispatcher(deps) {
|
|
|
111
111
|
const slots = config.orchestrator.maximumInProgress - activeCount;
|
|
112
112
|
// Narrow Todo to tickets that opted in via an `agent-*` label.
|
|
113
113
|
// Unlabeled tickets are not groundcrew's concern even when in Todo.
|
|
114
|
-
|
|
114
|
+
// Sort by priority so higher-priority tickets fill slots first.
|
|
115
|
+
const todo = state.issues
|
|
116
|
+
.filter((issue) => issue.status === "todo" && isGroundcrewIssue(issue))
|
|
117
|
+
.toSorted((a, b) => prioritySortKey(a.priority) - prioritySortKey(b.priority));
|
|
115
118
|
if (slots <= 0) {
|
|
116
119
|
log(`At capacity (${activeCount}/${config.orchestrator.maximumInProgress})${formatActiveSlotList(active)}, no new work to start${idleSuffix}`);
|
|
117
120
|
return;
|
|
@@ -212,6 +215,10 @@ function formatUsageExhaustion(exhaustion) {
|
|
|
212
215
|
}
|
|
213
216
|
return `${exhaustion.model} weekly at ${exhaustion.usedPercentage.toFixed(1)}% (> ${exhaustion.allowedPercentage.toFixed(1)}% paced budget), resets in ${exhaustion.resetMinutes}m — skipping its tickets`;
|
|
214
217
|
}
|
|
218
|
+
/** Undefined priority sorts last. */
|
|
219
|
+
function prioritySortKey(priority) {
|
|
220
|
+
return priority ?? Number.POSITIVE_INFINITY;
|
|
221
|
+
}
|
|
215
222
|
export function formatActiveSlotList(active) {
|
|
216
223
|
if (active.length === 0) {
|
|
217
224
|
return "";
|
|
@@ -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,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAIL,KAAK,KAAK,IAAI,WAAW,EAE1B,MAAM,YAAY,CAAC;AACpB,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;AAmDD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,iBAA+C,GAC3D,cAAc,
|
|
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,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAIL,KAAK,KAAK,IAAI,WAAW,EAE1B,MAAM,YAAY,CAAC;AACpB,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;AAmDD,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,GAAE,iBAA+C,GAC3D,cAAc,CA4BhB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,cAAc,GACtB,YAAY,CAiGd"}
|
|
@@ -76,6 +76,7 @@ export function toCanonicalIssue(linearIssue, sourceName, statusNames = DEFAULT_
|
|
|
76
76
|
blockers: linearIssue.blockers.map((b) => toCanonicalBlocker(b, sourceName, statusNames)),
|
|
77
77
|
hasMoreBlockers: linearIssue.hasMoreBlockers,
|
|
78
78
|
url: linearIssue.url,
|
|
79
|
+
...(linearIssue.priority === 0 ? {} : { priority: linearIssue.priority }),
|
|
79
80
|
sourceRef,
|
|
80
81
|
};
|
|
81
82
|
}
|
|
@@ -47,6 +47,8 @@ export interface Issue {
|
|
|
47
47
|
hasMoreBlockers: boolean;
|
|
48
48
|
/** Linear `Issue.url` — direct web link to the ticket. */
|
|
49
49
|
url: string;
|
|
50
|
+
/** Linear priority: 1=Urgent, 2=High, 3=Medium, 4=Low, 0=No priority. */
|
|
51
|
+
priority: number;
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* `Issue` narrowed to "this ticket is for groundcrew". Consumers operate on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;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rB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,aAAa,CAAC,CAkCzB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,cAAc,GACrB,IAAI,CAON;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,iBAAiB,EAAE,GAAG,OAAO,EAAE,CAS/E"}
|
|
@@ -84,6 +84,7 @@ async function fetchBoard(client, config) {
|
|
|
84
84
|
description
|
|
85
85
|
updatedAt
|
|
86
86
|
url
|
|
87
|
+
priority
|
|
87
88
|
state { id name type }
|
|
88
89
|
team { id key }
|
|
89
90
|
assignee { name }
|
|
@@ -178,6 +179,7 @@ function buildLinearIssue(input) {
|
|
|
178
179
|
model: input.model,
|
|
179
180
|
teamId: input.teamId,
|
|
180
181
|
url: input.url,
|
|
182
|
+
priority: input.priority,
|
|
181
183
|
blockers: blockersFromRelations(input.inverseRelations?.nodes ?? []),
|
|
182
184
|
hasMoreBlockers: input.inverseRelations?.pageInfo.hasNextPage ?? false,
|
|
183
185
|
};
|
|
@@ -211,6 +213,7 @@ function issueFromNode(node, config) {
|
|
|
211
213
|
model,
|
|
212
214
|
teamId: node.team?.id ?? "",
|
|
213
215
|
url: node.url,
|
|
216
|
+
priority: node.priority,
|
|
214
217
|
inverseRelations: node.inverseRelations,
|
|
215
218
|
});
|
|
216
219
|
}
|
|
@@ -74,6 +74,12 @@ export interface Issue {
|
|
|
74
74
|
* branched on.
|
|
75
75
|
*/
|
|
76
76
|
url?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Source-native priority. Lower values sort first; `undefined` means no
|
|
79
|
+
* priority and sorts last. Dispatcher uses this to order Todo tickets before
|
|
80
|
+
* slot assignment.
|
|
81
|
+
*/
|
|
82
|
+
priority?: number;
|
|
77
83
|
/** Adapter-private. Consumers MUST NOT inspect; only the producing adapter reads it. */
|
|
78
84
|
sour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AAI,CAAC,CAAC;IAC5C;;;;;;;OAOG;IACH,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAExD;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;CACrD;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAmB,UAAU,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAMjF;CACF;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,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/configuration.md
CHANGED
|
@@ -42,7 +42,7 @@ The "Loaded config from ..." line at startup tells you which config won.
|
|
|
42
42
|
## Agent Label Routing
|
|
43
43
|
|
|
44
44
|
- `agent-claude`, `agent-codex`, `agent-<name>` routes to that enabled model.
|
|
45
|
-
- `agent-any` routes to the model with the most
|
|
45
|
+
- `agent-any` routes to the model with the most session headroom, after skipping models over their session limit or weekly paced budget.
|
|
46
46
|
- Unknown `agent-<name>` falls back to `models.default`.
|
|
47
47
|
- A built-in `agent-<name>` label whose model is not enabled falls back to `models.default` with a warning.
|
|
48
48
|
- No `agent-*` label is ignored by `crew run`. Dispatch on demand with `crew start <TICKET>`, which falls back to `models.default`.
|
|
@@ -157,12 +157,12 @@ and hook contract.
|
|
|
157
157
|
| `defaults.hooks.prepareWorktree` | optional | Fallback repo-preparation command used only when the worktree does not define `.groundcrew/config.json` `hooks.prepareWorktree`. The hook runs after worktree creation and before the agent starts. Repo-local config wins. |
|
|
158
158
|
| `orchestrator.maximumInProgress` | `4` | Cap on in-progress tickets at once for this `crew` instance. |
|
|
159
159
|
| `orchestrator.pollIntervalMilliseconds` | `120_000` | Poll interval in `--watch` mode. |
|
|
160
|
-
| `orchestrator.sessionLimitPercentage` | `85` | Number in `(0, 100]`. A model whose codexbar session window exceeds this percentage is skipped that tick.
|
|
160
|
+
| `orchestrator.sessionLimitPercentage` | `85` | Number in `(0, 100]`. A model whose codexbar session window exceeds this percentage is skipped that tick. Models are also skipped when codexbar reports weekly usage over the current weekly paced budget. |
|
|
161
161
|
| `models.default` | `"claude"` | Tiebreak for `agent-any` resolution and fallback for explicit but unknown `agent-*` labels. Also used by `crew start <TICKET>` for unlabeled tickets. `crew run` ignores unlabeled tickets and does not apply this default. Must exist in `models.definitions`. If you enable only `codex`, set `default: "codex"`. |
|
|
162
162
|
| `models.definitions` | **required** | Enabled model set. Built-in keys (`claude`, `codex`) can use `{}` to opt into the shipped preset. Custom model names must provide `cmd` and `color`. |
|
|
163
163
|
| `models.definitions.<name>.cmd` | preset for built-ins | Shell command launched for the model. Required for custom models. 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. |
|
|
164
164
|
| `models.definitions.<name>.color` | preset for built-ins | Color for the workspace status pill (cmux only; tmux silently drops it). Required for custom models. |
|
|
165
|
-
| `models.definitions.<name>.usage` | preset for built-ins | If set, codexbar usage is fetched for this model and gated by `sessionLimitPercentage
|
|
165
|
+
| `models.definitions.<name>.usage` | preset for built-ins | If set, codexbar usage is fetched for this model 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 model enabled. |
|
|
166
166
|
| `models.definitions.<name>.sandbox` | optional | Docker Sandboxes binding for the model. Required at launch when `local.runner` resolves to `sdx`. Field: `agent` (required sbx agent name). Groundcrew assumes the `groundcrew-<agent>` sandbox already exists. |
|
|
167
167
|
| `models.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. |
|
|
168
168
|
| `models.definitions.<name>.preLaunchEnv` | optional | Companion to `preLaunch`: list of env var names to append to groundcrew's `safehouse-clearance` `--env-pass=` flag, so `preLaunch` exports reach the agent without overriding `cmd` and losing the project's egress allowlist. 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`. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.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",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@tsconfig/node24": "24.0.4",
|
|
83
83
|
"@tsconfig/strictest": "2.0.8",
|
|
84
84
|
"@types/node": "25.9.1",
|
|
85
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
85
|
+
"@typescript/native-preview": "7.0.0-dev.20260602.1",
|
|
86
86
|
"@vitest/coverage-v8": "4.1.7",
|
|
87
87
|
"cspell": "10.0.1",
|
|
88
88
|
"dependency-cruiser": "17.4.3",
|