@feigi/fleet-ctl 3.60.0 → 3.61.1
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/agents/fleet-fix-applier.agent.md +4 -0
- package/package.json +1 -1
- package/scripts/dispatch-prompt.mjs +6 -4
- package/scripts/pull.mjs +977 -0
- package/scripts/ticket-router.mjs +16 -7
- package/skills/run-team/SKILL.md +110 -577
- package/skills/run-team/briefs/finisher.md +5 -0
- package/skills/run-team/briefs/fix-applier.md +7 -0
- package/skills/run-team/briefs/implementer.md +2 -0
- package/skills/run-team/briefs/merge-bot.md +1 -0
- package/skills/run-team/briefs/relabel.md +15 -0
- package/skills/run-team/briefs/review-runner.md +1 -0
- package/skills/run-team/references/phase-0.md +7 -10
|
@@ -90,17 +90,26 @@ export function briefText(issue) {
|
|
|
90
90
|
return String(issue.body ?? "");
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The file paths a brief names: every backticked token without whitespace that
|
|
95
|
+
* holds a `/` or ends in an extension, in first-seen order, each once.
|
|
96
|
+
*/
|
|
97
|
+
export function briefPaths(brief) {
|
|
98
98
|
const paths = new Set();
|
|
99
99
|
for (const m of brief.matchAll(/`([^`\n]+)`/g)) {
|
|
100
100
|
const tok = m[1];
|
|
101
101
|
if (/\s/.test(tok)) continue;
|
|
102
102
|
if (tok.includes("/") || /\.[A-Za-z][A-Za-z0-9]*$/.test(tok)) paths.add(tok);
|
|
103
103
|
}
|
|
104
|
+
return [...paths];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** The metric columns for a parsed `gh issue view --json title,body,comments,labels,createdAt`, or null when it is not one. */
|
|
108
|
+
export function issueMetrics(issue, now = Date.now()) {
|
|
109
|
+
if (issue === null || typeof issue !== "object" || Array.isArray(issue) || typeof issue.body !== "string") return null;
|
|
110
|
+
const brief = briefText(issue).trim();
|
|
111
|
+
const lines = brief.split(/\r?\n/);
|
|
112
|
+
const paths = briefPaths(brief);
|
|
104
113
|
const created = Date.parse(issue.createdAt ?? "");
|
|
105
114
|
const kind = (Array.isArray(issue.labels) ? issue.labels : []).map((l) => l?.name).find((n) => KINDS.has(n)) ?? "";
|
|
106
115
|
return {
|
|
@@ -108,8 +117,8 @@ export function issueMetrics(issue, now = Date.now()) {
|
|
|
108
117
|
criteria: String(lines.filter((l) => /^\s*[-*]\s*\[[ xX]\]/.test(l)).length),
|
|
109
118
|
comments: String(Array.isArray(issue.comments) ? issue.comments.length : 0),
|
|
110
119
|
age_days: Number.isFinite(created) ? String(Math.max(0, Math.floor((now - created) / DAY_MS))) : "",
|
|
111
|
-
paths: String(paths.
|
|
112
|
-
test_paths: String(
|
|
120
|
+
paths: String(paths.length),
|
|
121
|
+
test_paths: String(paths.filter((p) => /\.test\.|(^|\/)tests?\//.test(p)).length),
|
|
113
122
|
xrefs: String(new Set([...brief.matchAll(/#(\d+)/g)].map((m) => m[1])).size),
|
|
114
123
|
kind,
|
|
115
124
|
};
|