@clipboard-health/groundcrew 4.43.2 → 4.43.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":"cmuxAdapter.d.ts","sourceRoot":"","sources":["../../src/lib/cmuxAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"cmuxAdapter.d.ts","sourceRoot":"","sources":["../../src/lib/cmuxAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,WAAW,EAAE,OA+EzB,CAAC"}
|
package/dist/lib/cmuxAdapter.js
CHANGED
|
@@ -16,6 +16,8 @@ export const cmuxAdapter = {
|
|
|
16
16
|
spec.cwd,
|
|
17
17
|
"--command",
|
|
18
18
|
spec.command,
|
|
19
|
+
"--description",
|
|
20
|
+
cmuxDescriptionFor(spec.name),
|
|
19
21
|
], signal);
|
|
20
22
|
const workspaceId = extractCmuxOpenId(output);
|
|
21
23
|
if (workspaceId === undefined) {
|
|
@@ -38,7 +40,7 @@ export const cmuxAdapter = {
|
|
|
38
40
|
},
|
|
39
41
|
async list(signal) {
|
|
40
42
|
const raw = await listCmuxRaw(signal);
|
|
41
|
-
return raw?.map((ws) => ({ name: ws
|
|
43
|
+
return raw?.map((ws) => ({ name: cmuxTaskId(ws) }));
|
|
42
44
|
},
|
|
43
45
|
async close(name, signal) {
|
|
44
46
|
const raw = await listCmuxRaw(signal);
|
|
@@ -49,7 +51,7 @@ export const cmuxAdapter = {
|
|
|
49
51
|
debug(`cmux close-workspace skipped for ${name}: list-workspaces failed, no usable id`);
|
|
50
52
|
return { kind: "unavailable" };
|
|
51
53
|
}
|
|
52
|
-
const match = raw.find((ws) => ws
|
|
54
|
+
const match = raw.find((ws) => cmuxTaskId(ws) === name);
|
|
53
55
|
if (match === undefined) {
|
|
54
56
|
return { kind: "missing" };
|
|
55
57
|
}
|
|
@@ -65,7 +67,7 @@ export const cmuxAdapter = {
|
|
|
65
67
|
if (remaining === undefined) {
|
|
66
68
|
return { kind: "unavailable", error };
|
|
67
69
|
}
|
|
68
|
-
const isStillPresent = remaining.some((ws) => ws
|
|
70
|
+
const isStillPresent = remaining.some((ws) => cmuxTaskId(ws) === name);
|
|
69
71
|
if (!isStillPresent) {
|
|
70
72
|
return { kind: "closed" };
|
|
71
73
|
}
|
|
@@ -79,6 +81,26 @@ export const cmuxAdapter = {
|
|
|
79
81
|
return undefined;
|
|
80
82
|
},
|
|
81
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Stable per-workspace task-id marker stamped into cmux's `description` at
|
|
86
|
+
* creation. Identity keys on this, not the title — a user renaming a panel
|
|
87
|
+
* must not make crew lose track of the workspace. cmux exposes no
|
|
88
|
+
* set-description RPC (settable only at creation), so legacy workspaces carry
|
|
89
|
+
* `description: null`; `cmuxTaskId` falls back to the title for those.
|
|
90
|
+
*/
|
|
91
|
+
const CMUX_DESCRIPTION_MARKER_PREFIX = "groundcrew:";
|
|
92
|
+
function cmuxDescriptionFor(taskId) {
|
|
93
|
+
return `${CMUX_DESCRIPTION_MARKER_PREFIX}${taskId}`;
|
|
94
|
+
}
|
|
95
|
+
function cmuxTaskId(ws) {
|
|
96
|
+
if (ws.description !== null && ws.description.startsWith(CMUX_DESCRIPTION_MARKER_PREFIX)) {
|
|
97
|
+
const marked = ws.description.slice(CMUX_DESCRIPTION_MARKER_PREFIX.length);
|
|
98
|
+
if (marked.length > 0) {
|
|
99
|
+
return marked;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return ws.title;
|
|
103
|
+
}
|
|
82
104
|
function parseCmuxList(output) {
|
|
83
105
|
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- cmux --json list-workspaces always emits this shape
|
|
84
106
|
const parsed = JSON.parse(output);
|
|
@@ -93,7 +115,7 @@ function parseCmuxList(output) {
|
|
|
93
115
|
debug(`cmux list-workspaces returned workspace "${ws.title}" without a usable id or ref; skipping`);
|
|
94
116
|
continue;
|
|
95
117
|
}
|
|
96
|
-
items.push({ title: ws.title, id });
|
|
118
|
+
items.push({ title: ws.title, id, description: ws.description ?? null });
|
|
97
119
|
}
|
|
98
120
|
return items;
|
|
99
121
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/groundcrew",
|
|
3
|
-
"version": "4.43.
|
|
3
|
+
"version": "4.43.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",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@tsconfig/node24": "24.0.4",
|
|
84
84
|
"@tsconfig/strictest": "2.0.8",
|
|
85
85
|
"@types/node": "25.9.3",
|
|
86
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
86
|
+
"@typescript/native-preview": "7.0.0-dev.20260614.1",
|
|
87
87
|
"@vitest/coverage-v8": "4.1.8",
|
|
88
88
|
"cspell": "10.0.1",
|
|
89
89
|
"dependency-cruiser": "17.4.3",
|