@clipboard-health/groundcrew 4.3.2 → 4.3.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"writeback.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/writeback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,UAAU,oBAAoB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,wBAAwB;IAChC,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,wBAAgB,8BAA8B,CAAC,UAAU,EAAE;IACzD,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,wBAAwB,CAgD3B"}
1
+ {"version":3,"file":"writeback.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/linear/writeback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,UAAU,oBAAoB;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,wBAAwB;IAChC,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,wBAAgB,8BAA8B,CAAC,UAAU,EAAE;IACzD,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,wBAAwB,CAuD3B"}
@@ -1,8 +1,8 @@
1
1
  import { log } from "../../util.js";
2
2
  export function createLinearIssueStatusUpdater(arguments_) {
3
3
  const { client } = arguments_;
4
- // Positive cache only. Keyed by teamId because the workflow `state.type ===
5
- // "started"` lookup yields a single stateId per team — independent of which
4
+ // Positive cache only. Keyed by teamId because the in-progress-state
5
+ // resolution yields a single stateId per team — independent of which
6
6
  // project the ticket belongs to. State ids don't change for misconfig
7
7
  // reasons, so caching successful resolutions is safe across the process.
8
8
  //
@@ -23,10 +23,16 @@ export function createLinearIssueStatusUpdater(arguments_) {
23
23
  }
24
24
  const team = await client.team(teamId);
25
25
  const states = await team.states();
26
- // Use the workflow state's `type`Linear standardises on `started` for
27
- // in-progress columns regardless of how the user renames them, so this
28
- // works without any per-team status-name configuration.
29
- const inProgress = states.nodes.find((state) => state.type === "started");
26
+ // Linear's default workflow has MULTIPLE `started`-type states both
27
+ // "In Progress" and "In Review" are `started`. `team.states()` orders by
28
+ // updatedAt (the connection has no position ordering), so array order
29
+ // can't disambiguate them. Prefer the state literally named "In Progress";
30
+ // otherwise fall back to the lowest-position (leftmost) `started` column,
31
+ // which by Linear convention is the in-progress one. This survives teams
32
+ // that rename the column ("Doing", "WIP", ...).
33
+ const startedStates = states.nodes.filter((state) => state.type === "started");
34
+ const inProgress = startedStates.find((state) => state.name.trim().toLowerCase() === "in progress") ??
35
+ startedStates.toSorted((a, b) => a.position - b.position).at(0);
30
36
  if (inProgress?.id === undefined) {
31
37
  return undefined;
32
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/groundcrew",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
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",