@codyswann/lisa 2.93.0 → 2.95.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/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/scripts/automation-status-expected-fleet.mjs +7 -132
- package/plugins/lisa/scripts/queue-contract-resolution.mjs +458 -0
- package/plugins/lisa/scripts/queue-health-classification.mjs +157 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/src/base/scripts/automation-status-expected-fleet.mjs +7 -132
- package/plugins/src/base/scripts/queue-contract-resolution.mjs +458 -0
- package/plugins/src/base/scripts/queue-health-classification.mjs +157 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Shared queue-health classification helpers for `/lisa:queue-status`.
|
|
4
|
+
*
|
|
5
|
+
* Queue readers normalize vendor-specific lifecycle data into the small set of
|
|
6
|
+
* signals below so queue-status can distinguish quiet, healthy, stuck, and
|
|
7
|
+
* misconfigured queues without inventing a second lifecycle vocabulary.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const QUEUE_HEALTH_VERDICTS = [
|
|
11
|
+
"IDLE",
|
|
12
|
+
"HEALTHY",
|
|
13
|
+
"ATTENTION_NEEDED",
|
|
14
|
+
"MISCONFIGURED",
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {"IDLE" | "HEALTHY" | "ATTENTION_NEEDED" | "MISCONFIGURED"} QueueHealthVerdict
|
|
19
|
+
*
|
|
20
|
+
* @typedef {{
|
|
21
|
+
* readonly queueResolved?: boolean
|
|
22
|
+
* readonly namespaceAdopted?: boolean
|
|
23
|
+
* readonly readyCount?: number
|
|
24
|
+
* readonly activeCount?: number
|
|
25
|
+
* readonly blockedCount?: number
|
|
26
|
+
* readonly stalledCount?: number
|
|
27
|
+
* readonly resolutionError?: string | null
|
|
28
|
+
* }} QueueHealthInput
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Classify a queue using the same high-level concepts intake and repair-intake
|
|
33
|
+
* already rely on:
|
|
34
|
+
* - queue must resolve from config;
|
|
35
|
+
* - lifecycle namespace must be adopted/present;
|
|
36
|
+
* - blocked or stalled work means operator attention is needed;
|
|
37
|
+
* - otherwise ready or active work is healthy;
|
|
38
|
+
* - otherwise the queue is truly idle.
|
|
39
|
+
*
|
|
40
|
+
* @param {QueueHealthInput} input
|
|
41
|
+
* @returns {{
|
|
42
|
+
* readonly verdict: QueueHealthVerdict
|
|
43
|
+
* readonly reasons: readonly string[]
|
|
44
|
+
* readonly counts: Readonly<{
|
|
45
|
+
* ready: number
|
|
46
|
+
* active: number
|
|
47
|
+
* blocked: number
|
|
48
|
+
* stalled: number
|
|
49
|
+
* attentionNeeded: number
|
|
50
|
+
* }>
|
|
51
|
+
* }}
|
|
52
|
+
*/
|
|
53
|
+
export function classifyQueueHealth(input = {}) {
|
|
54
|
+
const counts = {
|
|
55
|
+
ready: normalizeCount(input.readyCount),
|
|
56
|
+
active: normalizeCount(input.activeCount),
|
|
57
|
+
blocked: normalizeCount(input.blockedCount),
|
|
58
|
+
stalled: normalizeCount(input.stalledCount),
|
|
59
|
+
};
|
|
60
|
+
const attentionNeeded = counts.blocked + counts.stalled;
|
|
61
|
+
|
|
62
|
+
if (input.queueResolved === false || hasContent(input.resolutionError)) {
|
|
63
|
+
return {
|
|
64
|
+
verdict: "MISCONFIGURED",
|
|
65
|
+
reasons: ["queue-unresolved"],
|
|
66
|
+
counts: {
|
|
67
|
+
...counts,
|
|
68
|
+
attentionNeeded,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (input.namespaceAdopted === false) {
|
|
74
|
+
return {
|
|
75
|
+
verdict: "MISCONFIGURED",
|
|
76
|
+
reasons: ["lifecycle-namespace-absent"],
|
|
77
|
+
counts: {
|
|
78
|
+
...counts,
|
|
79
|
+
attentionNeeded,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (attentionNeeded > 0) {
|
|
85
|
+
return {
|
|
86
|
+
verdict: "ATTENTION_NEEDED",
|
|
87
|
+
reasons: [
|
|
88
|
+
counts.blocked > 0 ? "blocked-work-present" : null,
|
|
89
|
+
counts.stalled > 0 ? "stalled-work-present" : null,
|
|
90
|
+
].filter(Boolean),
|
|
91
|
+
counts: {
|
|
92
|
+
...counts,
|
|
93
|
+
attentionNeeded,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (counts.ready > 0 || counts.active > 0) {
|
|
99
|
+
return {
|
|
100
|
+
verdict: "HEALTHY",
|
|
101
|
+
reasons: [
|
|
102
|
+
counts.ready > 0 ? "ready-work-present" : null,
|
|
103
|
+
counts.active > 0 ? "active-work-in-flight" : null,
|
|
104
|
+
].filter(Boolean),
|
|
105
|
+
counts: {
|
|
106
|
+
...counts,
|
|
107
|
+
attentionNeeded,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
verdict: "IDLE",
|
|
114
|
+
reasons: ["no-actionable-work"],
|
|
115
|
+
counts: {
|
|
116
|
+
...counts,
|
|
117
|
+
attentionNeeded,
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Combine individual queue verdicts into the overall queue-status verdict.
|
|
124
|
+
*
|
|
125
|
+
* @param {readonly { verdict: QueueHealthVerdict }[]} sections
|
|
126
|
+
* @returns {QueueHealthVerdict}
|
|
127
|
+
*/
|
|
128
|
+
export function computeOverallQueueVerdict(sections) {
|
|
129
|
+
const verdicts = sections.map(section => section.verdict);
|
|
130
|
+
|
|
131
|
+
if (verdicts.includes("MISCONFIGURED")) {
|
|
132
|
+
return "MISCONFIGURED";
|
|
133
|
+
}
|
|
134
|
+
if (verdicts.includes("ATTENTION_NEEDED")) {
|
|
135
|
+
return "ATTENTION_NEEDED";
|
|
136
|
+
}
|
|
137
|
+
if (verdicts.includes("HEALTHY")) {
|
|
138
|
+
return "HEALTHY";
|
|
139
|
+
}
|
|
140
|
+
return "IDLE";
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @param {number | null | undefined} value
|
|
145
|
+
* @returns {number}
|
|
146
|
+
*/
|
|
147
|
+
function normalizeCount(value) {
|
|
148
|
+
return Number.isFinite(value) && value > 0 ? Math.trunc(value) : 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @param {string | null | undefined} value
|
|
153
|
+
* @returns {boolean}
|
|
154
|
+
*/
|
|
155
|
+
function hasContent(value) {
|
|
156
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
157
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.95.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.95.0",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
* truth.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import {
|
|
12
|
+
resolveBuildQueueArgument,
|
|
13
|
+
resolveGithubRepoRef,
|
|
14
|
+
resolvePrdQueueArgument,
|
|
15
|
+
resolvePrdSource,
|
|
16
|
+
} from "./queue-contract-resolution.mjs";
|
|
17
|
+
|
|
11
18
|
export const AUTOMATION_EXPECTED_CADENCES = {
|
|
12
19
|
"intake-repair": {
|
|
13
20
|
human: "every 60 minutes",
|
|
@@ -33,11 +40,6 @@ export const AUTOMATION_EXPECTED_CADENCES = {
|
|
|
33
40
|
|
|
34
41
|
export const EXPLORATORY_QA_STACK_PRIORITY = ["expo", "rails", "harper-fabric"];
|
|
35
42
|
|
|
36
|
-
const GITHUB_REMOTE_PATTERNS = [
|
|
37
|
-
/github\.com[:/](?<owner>[^/]+)\/(?<repo>[^/.]+?)(?:\.git)?$/,
|
|
38
|
-
/^git@github\.com:(?<owner>[^/]+)\/(?<repo>[^/.]+?)(?:\.git)?$/,
|
|
39
|
-
];
|
|
40
|
-
|
|
41
43
|
/**
|
|
42
44
|
* @typedef {{
|
|
43
45
|
* readonly id: string
|
|
@@ -229,83 +231,6 @@ function createUnsupportedEntry(identity, id, reason) {
|
|
|
229
231
|
};
|
|
230
232
|
}
|
|
231
233
|
|
|
232
|
-
/**
|
|
233
|
-
* @param {Record<string, any>} config
|
|
234
|
-
* @param {string | undefined} source
|
|
235
|
-
* @returns {string}
|
|
236
|
-
*/
|
|
237
|
-
function resolvePrdQueueArgument(config, source) {
|
|
238
|
-
switch (source) {
|
|
239
|
-
case "github":
|
|
240
|
-
requireGithubRepo(config);
|
|
241
|
-
return "github intake_mode=prd";
|
|
242
|
-
case "linear":
|
|
243
|
-
requireLinearWorkspace(config);
|
|
244
|
-
return "linear";
|
|
245
|
-
case "notion": {
|
|
246
|
-
const databaseId = config.notion?.prdDatabaseId;
|
|
247
|
-
if (!databaseId) {
|
|
248
|
-
throw new Error(
|
|
249
|
-
"Unable to resolve the PRD queue: notion.prdDatabaseId is required when source=notion."
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
return databaseId;
|
|
253
|
-
}
|
|
254
|
-
case "confluence": {
|
|
255
|
-
const parentPageId = config.confluence?.parentPageId;
|
|
256
|
-
const spaceKey = config.confluence?.spaceKey;
|
|
257
|
-
if (!parentPageId && !spaceKey) {
|
|
258
|
-
throw new Error(
|
|
259
|
-
"Unable to resolve the PRD queue: confluence.parentPageId or confluence.spaceKey is required when source=confluence."
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
return parentPageId ?? spaceKey;
|
|
263
|
-
}
|
|
264
|
-
case "jira": {
|
|
265
|
-
const project = config.jira?.project;
|
|
266
|
-
if (!project) {
|
|
267
|
-
throw new Error(
|
|
268
|
-
"Unable to resolve the PRD queue: jira.project is required when source=jira."
|
|
269
|
-
);
|
|
270
|
-
}
|
|
271
|
-
return project;
|
|
272
|
-
}
|
|
273
|
-
default:
|
|
274
|
-
throw new Error(
|
|
275
|
-
"Unable to resolve the PRD queue from config. Set source or use tracker=github self-host with github.org/github.repo."
|
|
276
|
-
);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* @param {Record<string, any>} config
|
|
282
|
-
* @param {string | undefined} tracker
|
|
283
|
-
* @returns {string}
|
|
284
|
-
*/
|
|
285
|
-
function resolveBuildQueueArgument(config, tracker) {
|
|
286
|
-
switch (tracker) {
|
|
287
|
-
case "github":
|
|
288
|
-
requireGithubRepo(config);
|
|
289
|
-
return "github intake_mode=build";
|
|
290
|
-
case "linear":
|
|
291
|
-
requireLinearWorkspace(config);
|
|
292
|
-
return "linear";
|
|
293
|
-
case "jira": {
|
|
294
|
-
const project = config.jira?.project;
|
|
295
|
-
if (!project) {
|
|
296
|
-
throw new Error(
|
|
297
|
-
"Unable to resolve the build queue: jira.project is required when tracker=jira."
|
|
298
|
-
);
|
|
299
|
-
}
|
|
300
|
-
return project;
|
|
301
|
-
}
|
|
302
|
-
default:
|
|
303
|
-
throw new Error(
|
|
304
|
-
"Unable to resolve the build queue from config. tracker must be github, linear, or jira."
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
234
|
/**
|
|
310
235
|
* @param {Record<string, any>} config
|
|
311
236
|
* @param {string | undefined} source
|
|
@@ -343,56 +268,6 @@ function resolveRepairQueueArgument(config, source, tracker) {
|
|
|
343
268
|
);
|
|
344
269
|
}
|
|
345
270
|
|
|
346
|
-
/**
|
|
347
|
-
* @param {Record<string, any>} config
|
|
348
|
-
* @returns {string | undefined}
|
|
349
|
-
*/
|
|
350
|
-
function resolvePrdSource(config) {
|
|
351
|
-
if (typeof config.source === "string" && config.source.length > 0) {
|
|
352
|
-
return config.source;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (
|
|
356
|
-
config.tracker === "github" &&
|
|
357
|
-
config.github?.org &&
|
|
358
|
-
config.github?.repo
|
|
359
|
-
) {
|
|
360
|
-
return "github";
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
return undefined;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* @param {Record<string, any>} config
|
|
368
|
-
* @param {string | undefined} gitRemoteUrl
|
|
369
|
-
* @returns {{ readonly owner: string, readonly repo: string } | null}
|
|
370
|
-
*/
|
|
371
|
-
function resolveGithubRepoRef(config, gitRemoteUrl) {
|
|
372
|
-
const owner = config.github?.org;
|
|
373
|
-
const repo = config.github?.repo;
|
|
374
|
-
|
|
375
|
-
if (owner && repo) {
|
|
376
|
-
return { owner, repo };
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
if (!gitRemoteUrl) {
|
|
380
|
-
return null;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
for (const pattern of GITHUB_REMOTE_PATTERNS) {
|
|
384
|
-
const match = gitRemoteUrl.match(pattern);
|
|
385
|
-
if (match?.groups?.owner && match.groups.repo) {
|
|
386
|
-
return {
|
|
387
|
-
owner: match.groups.owner,
|
|
388
|
-
repo: match.groups.repo,
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
return null;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
271
|
/**
|
|
397
272
|
* @param {Record<string, any>} config
|
|
398
273
|
*/
|