jonah-fleet 1.27.1 → 1.27.2
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/CHANGELOG.md +17 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/index.js +150 -51
- package/dist/lib/daemon.d.ts +16 -12
- package/dist/lib/daemon.d.ts.map +1 -1
- package/package.json +1 -1
- package/templates/prompts/autowork.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,24 @@ All notable changes to `jonah-fleet` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.27.
|
|
8
|
+
## [1.27.2](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.27.1...v1.27.2) (2026-09-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **daemon:** classify draft PRs needing convergence as actionable ([#430](https://github.com/Jonah-Projects/jonah-fleet/issues/430)) ([4d407fb](https://github.com/Jonah-Projects/jonah-fleet/commit/4d407fbb34ac8853b512094b5078bc9b8c1b9f53))
|
|
14
|
+
|
|
15
|
+
## [Unreleased]
|
|
9
16
|
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **daemon:** update foreground interface, status commands, hotkey cheat sheet, and status ticker to Fleet brand identity
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **daemon:** classify draft PRs needing convergence as actionable instead of in-progress to prevent zero-token preflight bypass from stalling draft PR recovery
|
|
24
|
+
|
|
25
|
+
## [1.27.1](https://github.com/Jonah-Projects/jonah-fleet/compare/v1.27.0...v1.27.1) (2026-09-23)
|
|
10
26
|
|
|
11
27
|
### Bug Fixes
|
|
12
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/commands/daemon.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0IzG"}
|
package/dist/index.js
CHANGED
|
@@ -5257,9 +5257,9 @@ function printDaemonLogTail(repoRoot, linesCount = 20) {
|
|
|
5257
5257
|
const lines = getDaemonLogTail(repoRoot, linesCount);
|
|
5258
5258
|
const logPath = path14.join(repoRoot, ".jonah-fleet", "daemon.log");
|
|
5259
5259
|
const relativePath = path14.relative(repoRoot, logPath) || logPath;
|
|
5260
|
-
console.log(pc13.cyan(`
|
|
5261
|
-
\
|
|
5262
|
-
`));
|
|
5260
|
+
console.log(pc13.bold(pc13.cyan(`
|
|
5261
|
+
\u26A1 Tail of ${relativePath} (last ${linesCount} lines):
|
|
5262
|
+
`)));
|
|
5263
5263
|
if (lines.length === 0) {
|
|
5264
5264
|
console.log(pc13.dim(` (Log file is empty or does not exist yet at ${relativePath})
|
|
5265
5265
|
`));
|
|
@@ -5276,9 +5276,9 @@ async function inspectAndCleanWorktrees(repoRoot) {
|
|
|
5276
5276
|
return { active, cleaned };
|
|
5277
5277
|
}
|
|
5278
5278
|
function printWorktreesInspection(result) {
|
|
5279
|
-
console.log(pc13.cyan(`
|
|
5280
|
-
\
|
|
5281
|
-
`));
|
|
5279
|
+
console.log(pc13.bold(pc13.cyan(`
|
|
5280
|
+
\u26A1 Jonah Fleet Worktree Inspection & Maintenance
|
|
5281
|
+
`)));
|
|
5282
5282
|
console.log(` Active Worktrees: ${result.active.length}`);
|
|
5283
5283
|
if (result.active.length === 0) {
|
|
5284
5284
|
console.log(pc13.dim(` (No active routine worktrees found)`));
|
|
@@ -5293,28 +5293,28 @@ function printWorktreesInspection(result) {
|
|
|
5293
5293
|
console.log("");
|
|
5294
5294
|
}
|
|
5295
5295
|
function printKeybindingCheatSheet() {
|
|
5296
|
-
console.log(pc13.cyan(`
|
|
5297
|
-
\
|
|
5298
|
-
`));
|
|
5299
|
-
console.log(` ${pc13.bold("r")} Trigger peer-review scan immediately`);
|
|
5300
|
-
console.log(` ${pc13.bold("R")} Prompt for PR # and run targeted peer-review`);
|
|
5301
|
-
console.log(` ${pc13.bold("a")} Trigger autowork backlog scan immediately`);
|
|
5302
|
-
console.log(` ${pc13.bold("A")} Prompt for Issue # and run targeted autowork`);
|
|
5303
|
-
console.log(` ${pc13.bold("p")} Pause / resume automated polling intervals`);
|
|
5304
|
-
console.log(` ${pc13.bold("s")} Print current daemon status summary card`);
|
|
5305
|
-
console.log(` ${pc13.bold("v")} Toggle verbose streaming logging live`);
|
|
5306
|
-
console.log(` ${pc13.bold("l")} Tail recent lines from .jonah-fleet/daemon.log`);
|
|
5307
|
-
console.log(` ${pc13.bold("w")} Inspect active worktrees and clean stale ones`);
|
|
5308
|
-
console.log(` ${pc13.bold("q")} Graceful shutdown (waits for active routine to finish)`);
|
|
5309
|
-
console.log(` ${pc13.bold("Ctrl+C")} Immediate force abort`);
|
|
5310
|
-
console.log(` ${pc13.bold("?")} / ${pc13.bold("h")} Show this keybindings cheat-sheet
|
|
5296
|
+
console.log(pc13.bold(pc13.cyan(`
|
|
5297
|
+
\u26A1 Jonah Fleet Daemon Keybindings // Command Reference
|
|
5298
|
+
`)));
|
|
5299
|
+
console.log(` ${pc13.bold(pc13.green("r"))} Trigger peer-review scan immediately`);
|
|
5300
|
+
console.log(` ${pc13.bold(pc13.green("R"))} Prompt for PR # and run targeted peer-review`);
|
|
5301
|
+
console.log(` ${pc13.bold(pc13.green("a"))} Trigger autowork backlog scan immediately`);
|
|
5302
|
+
console.log(` ${pc13.bold(pc13.green("A"))} Prompt for Issue # and run targeted autowork`);
|
|
5303
|
+
console.log(` ${pc13.bold(pc13.green("p"))} Pause / resume automated polling intervals`);
|
|
5304
|
+
console.log(` ${pc13.bold(pc13.green("s"))} Print current daemon status summary card`);
|
|
5305
|
+
console.log(` ${pc13.bold(pc13.green("v"))} Toggle verbose streaming logging live`);
|
|
5306
|
+
console.log(` ${pc13.bold(pc13.green("l"))} Tail recent lines from .jonah-fleet/daemon.log`);
|
|
5307
|
+
console.log(` ${pc13.bold(pc13.green("w"))} Inspect active worktrees and clean stale ones`);
|
|
5308
|
+
console.log(` ${pc13.bold(pc13.green("q"))} Graceful shutdown (waits for active routine to finish)`);
|
|
5309
|
+
console.log(` ${pc13.bold(pc13.red("Ctrl+C"))} Immediate force abort`);
|
|
5310
|
+
console.log(` ${pc13.bold(pc13.green("?"))} / ${pc13.bold(pc13.green("h"))} Show this keybindings cheat-sheet
|
|
5311
5311
|
`);
|
|
5312
5312
|
}
|
|
5313
5313
|
function printDaemonStatusSummary(options) {
|
|
5314
5314
|
const { state, pendingRoutine, activeWorktrees = [], verbose } = options;
|
|
5315
|
-
console.log(pc13.cyan(`
|
|
5316
|
-
\
|
|
5317
|
-
`));
|
|
5315
|
+
console.log(pc13.bold(pc13.cyan(`
|
|
5316
|
+
\u26A1 Jonah Fleet Daemon Status Readout
|
|
5317
|
+
`)));
|
|
5318
5318
|
if (state) {
|
|
5319
5319
|
let statusText;
|
|
5320
5320
|
if (state.status === "working") {
|
|
@@ -5397,7 +5397,7 @@ function formatDaemonStatusLine(options = {}) {
|
|
|
5397
5397
|
let core;
|
|
5398
5398
|
if (options.isPaused) {
|
|
5399
5399
|
const queueStr = options.pendingRoutine ? pc13.cyan(` [Queued: ${options.pendingRoutine}]`) : "";
|
|
5400
|
-
core = `${pc13.dim("[" + timeString + "]")} \u23F8
|
|
5400
|
+
core = `${pc13.dim("[" + timeString + "]")} \u23F8 ${pc13.yellow("PAUSED")}${queueStr}`;
|
|
5401
5401
|
} else {
|
|
5402
5402
|
const nextCheck = options.nextCheckTime !== void 0 ? options.nextCheckTime : nowMs;
|
|
5403
5403
|
const diffMs = Math.max(0, nextCheck - nowMs);
|
|
@@ -5407,7 +5407,7 @@ function formatDaemonStatusLine(options = {}) {
|
|
|
5407
5407
|
const timeStr = `${mins}m ${secs < 10 ? "0" : ""}${secs}s`;
|
|
5408
5408
|
const prStr = options.lastOpenPRCount !== void 0 ? ` (${options.lastOpenPRCount} ready PRs)` : "";
|
|
5409
5409
|
const queueStr = options.pendingRoutine ? pc13.cyan(` [Queued: ${options.pendingRoutine}]`) : "";
|
|
5410
|
-
core = `${pc13.dim("[" + timeString + "]")} \
|
|
5410
|
+
core = `${pc13.dim("[" + timeString + "]")} \u26A1 ${pc13.dim("Watchdog Idle \xB7 Next check in " + timeStr + prStr)}${queueStr}`;
|
|
5411
5411
|
}
|
|
5412
5412
|
if (!includeTip) {
|
|
5413
5413
|
return truncateAnsi(core, maxCols);
|
|
@@ -5493,16 +5493,57 @@ function classifyBacklogIssues(issues, openPRs = []) {
|
|
|
5493
5493
|
const awaitingInfo = [];
|
|
5494
5494
|
const guardrails = [];
|
|
5495
5495
|
const routineLogs = [];
|
|
5496
|
-
const
|
|
5496
|
+
const readyPRReferencedIssues = /* @__PURE__ */ new Set();
|
|
5497
|
+
const draftPRReferencedIssues = /* @__PURE__ */ new Set();
|
|
5498
|
+
const gatedDraftPRReferencedIssues = /* @__PURE__ */ new Set();
|
|
5499
|
+
const humanAssignedDraftPRReferencedIssues = /* @__PURE__ */ new Set();
|
|
5500
|
+
const standaloneActionableDraftPRs = [];
|
|
5501
|
+
const standaloneGatedDraftPRs = [];
|
|
5502
|
+
const standaloneHumanDraftPRs = [];
|
|
5503
|
+
const knownIssueNumbers = new Set(issues.map((i) => i.number));
|
|
5497
5504
|
for (const pr of openPRs) {
|
|
5505
|
+
if (pr.headRefName?.startsWith("release-please--") || pr.title?.startsWith("chore(main): release")) {
|
|
5506
|
+
continue;
|
|
5507
|
+
}
|
|
5498
5508
|
const textToScan = `${pr.title || ""} ${pr.body || ""} ${pr.headRefName || ""}`;
|
|
5499
5509
|
const matches = textToScan.matchAll(/#(\d+)\b/g);
|
|
5510
|
+
const referencedIssues = /* @__PURE__ */ new Set();
|
|
5500
5511
|
for (const m of matches) {
|
|
5501
|
-
|
|
5512
|
+
referencedIssues.add(parseInt(m[1], 10));
|
|
5502
5513
|
}
|
|
5503
5514
|
const branchMatch = (pr.headRefName || "").match(/(?:^|[-_/])(\d+)(?:[-_/]|$)/);
|
|
5504
5515
|
if (branchMatch) {
|
|
5505
|
-
|
|
5516
|
+
referencedIssues.add(parseInt(branchMatch[1], 10));
|
|
5517
|
+
}
|
|
5518
|
+
const isDraft = Boolean(pr.isDraft);
|
|
5519
|
+
const prLabelNames = (pr.labels || []).map(
|
|
5520
|
+
(l) => (typeof l === "string" ? l : l.name).toLowerCase()
|
|
5521
|
+
);
|
|
5522
|
+
const hasNeedsHuman = prLabelNames.includes("needs-human");
|
|
5523
|
+
const hasHumanAssignee = (pr.assignees || []).some((a) => !isBotLogin(a.login));
|
|
5524
|
+
let hasKnownIssue = false;
|
|
5525
|
+
for (const issueNum of referencedIssues) {
|
|
5526
|
+
if (knownIssueNumbers.has(issueNum)) {
|
|
5527
|
+
hasKnownIssue = true;
|
|
5528
|
+
}
|
|
5529
|
+
if (!isDraft) {
|
|
5530
|
+
readyPRReferencedIssues.add(issueNum);
|
|
5531
|
+
} else if (hasNeedsHuman) {
|
|
5532
|
+
gatedDraftPRReferencedIssues.add(issueNum);
|
|
5533
|
+
} else if (hasHumanAssignee) {
|
|
5534
|
+
humanAssignedDraftPRReferencedIssues.add(issueNum);
|
|
5535
|
+
} else {
|
|
5536
|
+
draftPRReferencedIssues.add(issueNum);
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
if (isDraft && !hasKnownIssue) {
|
|
5540
|
+
if (hasNeedsHuman) {
|
|
5541
|
+
standaloneGatedDraftPRs.push(pr);
|
|
5542
|
+
} else if (hasHumanAssignee) {
|
|
5543
|
+
standaloneHumanDraftPRs.push(pr);
|
|
5544
|
+
} else {
|
|
5545
|
+
standaloneActionableDraftPRs.push(pr);
|
|
5546
|
+
}
|
|
5506
5547
|
}
|
|
5507
5548
|
}
|
|
5508
5549
|
for (const issue of issues) {
|
|
@@ -5513,7 +5554,7 @@ function classifyBacklogIssues(issues, openPRs = []) {
|
|
|
5513
5554
|
routineLogs.push(issue);
|
|
5514
5555
|
continue;
|
|
5515
5556
|
}
|
|
5516
|
-
if (labelNames.includes("needs-human")) {
|
|
5557
|
+
if (labelNames.includes("needs-human") || gatedDraftPRReferencedIssues.has(issue.number)) {
|
|
5517
5558
|
gatedHuman.push(issue);
|
|
5518
5559
|
continue;
|
|
5519
5560
|
}
|
|
@@ -5525,14 +5566,42 @@ function classifyBacklogIssues(issues, openPRs = []) {
|
|
|
5525
5566
|
guardrails.push(issue);
|
|
5526
5567
|
continue;
|
|
5527
5568
|
}
|
|
5528
|
-
const hasMatchingPR = prReferencedIssues.has(issue.number);
|
|
5529
5569
|
const hasHumanAssignee = (issue.assignees || []).some((a) => !isBotLogin(a.login));
|
|
5530
|
-
|
|
5570
|
+
const hasReadyPR = readyPRReferencedIssues.has(issue.number);
|
|
5571
|
+
const hasHumanDraftPR = humanAssignedDraftPRReferencedIssues.has(issue.number);
|
|
5572
|
+
if (hasReadyPR || hasHumanAssignee || hasHumanDraftPR) {
|
|
5531
5573
|
inProgress.push(issue);
|
|
5532
5574
|
continue;
|
|
5533
5575
|
}
|
|
5534
5576
|
actionable.push(issue);
|
|
5535
5577
|
}
|
|
5578
|
+
for (const pr of standaloneActionableDraftPRs) {
|
|
5579
|
+
actionable.push({
|
|
5580
|
+
number: pr.number,
|
|
5581
|
+
title: pr.title || `PR #${pr.number}`,
|
|
5582
|
+
labels: (pr.labels || []).map((l) => typeof l === "string" ? { name: l } : l),
|
|
5583
|
+
assignees: pr.assignees,
|
|
5584
|
+
url: pr.url
|
|
5585
|
+
});
|
|
5586
|
+
}
|
|
5587
|
+
for (const pr of standaloneGatedDraftPRs) {
|
|
5588
|
+
gatedHuman.push({
|
|
5589
|
+
number: pr.number,
|
|
5590
|
+
title: pr.title || `PR #${pr.number}`,
|
|
5591
|
+
labels: (pr.labels || []).map((l) => typeof l === "string" ? { name: l } : l),
|
|
5592
|
+
assignees: pr.assignees,
|
|
5593
|
+
url: pr.url
|
|
5594
|
+
});
|
|
5595
|
+
}
|
|
5596
|
+
for (const pr of standaloneHumanDraftPRs) {
|
|
5597
|
+
inProgress.push({
|
|
5598
|
+
number: pr.number,
|
|
5599
|
+
title: pr.title || `PR #${pr.number}`,
|
|
5600
|
+
labels: (pr.labels || []).map((l) => typeof l === "string" ? { name: l } : l),
|
|
5601
|
+
assignees: pr.assignees,
|
|
5602
|
+
url: pr.url
|
|
5603
|
+
});
|
|
5604
|
+
}
|
|
5536
5605
|
return {
|
|
5537
5606
|
actionable,
|
|
5538
5607
|
inProgress,
|
|
@@ -5540,7 +5609,7 @@ function classifyBacklogIssues(issues, openPRs = []) {
|
|
|
5540
5609
|
awaitingInfo,
|
|
5541
5610
|
guardrails,
|
|
5542
5611
|
routineLogs,
|
|
5543
|
-
total: issues.length
|
|
5612
|
+
total: issues.length + standaloneActionableDraftPRs.length + standaloneGatedDraftPRs.length + standaloneHumanDraftPRs.length
|
|
5544
5613
|
};
|
|
5545
5614
|
}
|
|
5546
5615
|
async function getBacklogIssues(repoRoot) {
|
|
@@ -5559,7 +5628,7 @@ async function getOpenPRsForBacklog(repoRoot) {
|
|
|
5559
5628
|
try {
|
|
5560
5629
|
const { stdout } = await execFileAsync5(
|
|
5561
5630
|
"gh",
|
|
5562
|
-
["pr", "list", "--state", "open", "--json", "number,title,body,headRefName", "--limit", "
|
|
5631
|
+
["pr", "list", "--state", "open", "--json", "number,title,body,headRefName,isDraft,labels,assignees,url", "--limit", "50"],
|
|
5563
5632
|
{ cwd: repoRoot, timeout: 5e3 }
|
|
5564
5633
|
);
|
|
5565
5634
|
return JSON.parse(stdout || "[]");
|
|
@@ -5935,14 +6004,23 @@ async function runDaemonLoop(repoRoot, options = {}) {
|
|
|
5935
6004
|
status: "idle"
|
|
5936
6005
|
};
|
|
5937
6006
|
writeDaemonState(repoRoot, state);
|
|
5938
|
-
console.log(
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
`
|
|
6007
|
+
console.log(
|
|
6008
|
+
renderFleetBanner({
|
|
6009
|
+
command: "DAEMON",
|
|
6010
|
+
subtitle: "LOCAL MULTI-CADENCE RUNNER",
|
|
6011
|
+
details: [
|
|
6012
|
+
{ label: "PID", value: String(process.pid) },
|
|
6013
|
+
{ label: "Review Watchdog", value: `Every ${reviewInterval}m (zero-token preflight)` },
|
|
6014
|
+
{ label: "Autowork Scan", value: `Every ${autoworkInterval}m` },
|
|
6015
|
+
{ label: "Routines", value: routines.join(", ") },
|
|
6016
|
+
{ label: "Target", value: repoRoot },
|
|
6017
|
+
{ label: "Hotkeys", value: "'r' review \xB7 'a' autowork \xB7 'p' pause \xB7 's' status \xB7 '?' help" }
|
|
6018
|
+
]
|
|
6019
|
+
})
|
|
6020
|
+
);
|
|
6021
|
+
console.log(pc14.bold(pc14.cyan(`
|
|
6022
|
+
\u26A1 Jonah Fleet Local Agent Daemon Active (PID: ${process.pid})
|
|
6023
|
+
`)));
|
|
5946
6024
|
let isStopping = false;
|
|
5947
6025
|
let isGracefulStopping = false;
|
|
5948
6026
|
let isWorking = false;
|
|
@@ -6542,14 +6620,23 @@ async function runDaemonCommand(action, options = {}) {
|
|
|
6542
6620
|
}
|
|
6543
6621
|
try {
|
|
6544
6622
|
const state2 = await startBackgroundDaemon(cwd, daemonOpts);
|
|
6623
|
+
console.log(
|
|
6624
|
+
renderFleetBanner({
|
|
6625
|
+
command: "DAEMON",
|
|
6626
|
+
subtitle: "BACKGROUND RUNNER STARTED",
|
|
6627
|
+
details: [
|
|
6628
|
+
{ label: "PID", value: String(state2.pid) },
|
|
6629
|
+
{ label: "Review Watchdog", value: `Every ${state2.reviewIntervalMinutes}m (zero-token preflight)` },
|
|
6630
|
+
{ label: "Autowork Scan", value: `Every ${state2.autoworkIntervalMinutes}m` },
|
|
6631
|
+
{ label: "Routines", value: state2.routines.join(", ") },
|
|
6632
|
+
{ label: "Log", value: ".jonah-fleet/daemon.log" }
|
|
6633
|
+
]
|
|
6634
|
+
})
|
|
6635
|
+
);
|
|
6545
6636
|
console.log(pc15.green(`
|
|
6546
6637
|
\u2713 Background agent daemon started successfully.`));
|
|
6547
|
-
console.log(pc15.dim(`
|
|
6548
|
-
|
|
6549
|
-
console.log(pc15.dim(` Autowork Backlog Scan: Every ${state2.autoworkIntervalMinutes} minutes`));
|
|
6550
|
-
console.log(pc15.dim(` Routines: ${state2.routines.join(", ")}`));
|
|
6551
|
-
console.log(pc15.dim(` Log file: .jonah-fleet/daemon.log`));
|
|
6552
|
-
console.log(pc15.dim(` Run 'jonah-fleet daemon status' or 'jonah-fleet daemon stop' to manage.`));
|
|
6638
|
+
console.log(pc15.dim(` Run 'jonah-fleet daemon status' or 'jonah-fleet daemon stop' to manage.
|
|
6639
|
+
`));
|
|
6553
6640
|
} catch (err) {
|
|
6554
6641
|
console.error(pc15.red(`
|
|
6555
6642
|
\u2717 Failed to start daemon: ${err.message}`));
|
|
@@ -6588,9 +6675,21 @@ Stopping background agent daemon (PID ${state2?.pid})...`));
|
|
|
6588
6675
|
const running = isDaemonRunning(cwd);
|
|
6589
6676
|
const state = readDaemonState(cwd);
|
|
6590
6677
|
const activeWorktrees = await listActiveWorktrees(cwd);
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6678
|
+
const statusSubtitle = running && state ? state.status === "working" ? "LOCAL RUNNER WORKING" : state.status === "paused" ? "LOCAL RUNNER PAUSED" : "LOCAL RUNNER IDLE" : "LOCAL RUNNER STOPPED";
|
|
6679
|
+
console.log(
|
|
6680
|
+
renderFleetBanner({
|
|
6681
|
+
command: "DAEMON",
|
|
6682
|
+
subtitle: statusSubtitle,
|
|
6683
|
+
details: [
|
|
6684
|
+
{ label: "Status", value: running && state ? state.status.toUpperCase() : "STOPPED" },
|
|
6685
|
+
...running && state ? [{ label: "PID", value: String(state.pid) }] : [],
|
|
6686
|
+
{ label: "Target", value: cwd }
|
|
6687
|
+
]
|
|
6688
|
+
})
|
|
6689
|
+
);
|
|
6690
|
+
console.log(pc15.bold(pc15.cyan(`
|
|
6691
|
+
\u26A1 Jonah Fleet Local Daemon Status
|
|
6692
|
+
`)));
|
|
6594
6693
|
if (running && state) {
|
|
6595
6694
|
console.log(` Status: ${pc15.green(pc15.bold("RUNNING"))}`);
|
|
6596
6695
|
console.log(` PID: ${state.pid}`);
|
package/dist/lib/daemon.d.ts
CHANGED
|
@@ -58,28 +58,32 @@ export declare function countOpenReadyPRs(repoRoot: string): Promise<number>;
|
|
|
58
58
|
* Checks if a GitHub user login corresponds to a bot account or designated agent persona.
|
|
59
59
|
*/
|
|
60
60
|
export declare function isBotLogin(login?: string | null): boolean;
|
|
61
|
-
|
|
62
|
-
* Classifies a list of open GitHub issues according to the Autowork backlog taxonomy.
|
|
63
|
-
*/
|
|
64
|
-
export declare function classifyBacklogIssues(issues: BacklogIssue[], openPRs?: Array<{
|
|
61
|
+
export interface BacklogPR {
|
|
65
62
|
number: number;
|
|
66
63
|
title?: string;
|
|
67
64
|
body?: string;
|
|
68
65
|
headRefName?: string;
|
|
69
|
-
|
|
66
|
+
isDraft?: boolean;
|
|
67
|
+
labels?: Array<{
|
|
68
|
+
name: string;
|
|
69
|
+
} | string>;
|
|
70
|
+
assignees?: Array<{
|
|
71
|
+
login: string;
|
|
72
|
+
}>;
|
|
73
|
+
url?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Classifies a list of open GitHub issues and pull requests according to the Autowork backlog taxonomy.
|
|
77
|
+
*/
|
|
78
|
+
export declare function classifyBacklogIssues(issues: BacklogIssue[], openPRs?: BacklogPR[]): BacklogTriageReport;
|
|
70
79
|
/**
|
|
71
80
|
* Fast GitHub CLI query for open issues in ~150ms with 0 token cost.
|
|
72
81
|
*/
|
|
73
82
|
export declare function getBacklogIssues(repoRoot: string): Promise<BacklogIssue[]>;
|
|
74
83
|
/**
|
|
75
|
-
* Fast GitHub CLI query for open pull requests with titles and
|
|
84
|
+
* Fast GitHub CLI query for open pull requests with titles, bodies, and draft status.
|
|
76
85
|
*/
|
|
77
|
-
export declare function getOpenPRsForBacklog(repoRoot: string): Promise<
|
|
78
|
-
number: number;
|
|
79
|
-
title?: string;
|
|
80
|
-
body?: string;
|
|
81
|
-
headRefName?: string;
|
|
82
|
-
}>>;
|
|
86
|
+
export declare function getOpenPRsForBacklog(repoRoot: string): Promise<BacklogPR[]>;
|
|
83
87
|
/**
|
|
84
88
|
* Preflight query and classification for the full repository backlog with 0 token cost.
|
|
85
89
|
*/
|
package/dist/lib/daemon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/lib/daemon.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../../src/lib/daemon.ts"],"names":[],"mappings":"AAwBA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,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AAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,0BAA0B,GACtC,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgGjD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwnBhG"}
|
package/package.json
CHANGED
|
@@ -87,7 +87,7 @@ a. **Read the target issue and check eligibility.** Eligible = open, unassigned
|
|
|
87
87
|
|
|
88
88
|
### Phase 1: Converge on open work (Scan mode; skipped in Targeted mode)
|
|
89
89
|
|
|
90
|
-
1. List all open PRs
|
|
90
|
+
1. List all open PRs needing attention (specifically draft PRs bounced back by peer review or open PRs with review comments: `gh pr list --state open --json number,title,isDraft,headRefName,assignees,labels,author`, excluding automated release PRs `release-please--*` / `chore(main): release*`).
|
|
91
91
|
1a. **PR Claim Protocol (Single-Flight PR Convergence)**:
|
|
92
92
|
- For each open PR needing attention (bounced to draft with actionable findings, or open with unaddressed review comments):
|
|
93
93
|
- **Check eligibility**: re-read candidate PR (`gh pr view <PR> --json assignees,comments`). Skip PRs currently assigned to another live runner or carrying an active claim comment posted within the last 2 hours (unless stale claim per `ORCHESTRATION.md`).
|