@pimmesz/afterburner 1.0.10 → 1.0.11
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/dist/cli/index.js +23 -15
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import { Command } from "commander";
|
|
|
35
35
|
// package.json
|
|
36
36
|
var package_default = {
|
|
37
37
|
name: "@pimmesz/afterburner",
|
|
38
|
-
version: "1.0.
|
|
38
|
+
version: "1.0.11",
|
|
39
39
|
description: "Convert idle Claude subscription quota into shippable engineering work: budget-aware trigger, bounded task selection, PR-only output.",
|
|
40
40
|
license: "Apache-2.0",
|
|
41
41
|
publishConfig: {
|
|
@@ -392,7 +392,7 @@ function renderRunSummary(opts) {
|
|
|
392
392
|
const what = categories.length === 0 ? `Would review ${repoLabel}, but every repo task category is switched off in taskCategories` : `Reviews ${repoLabel} for ${categories.join("/")} tasks`;
|
|
393
393
|
let why;
|
|
394
394
|
if (!budget) {
|
|
395
|
-
why =
|
|
395
|
+
why = `${config.budget.provider} \u2014 no numbers available right now, so a run would refuse to start.`;
|
|
396
396
|
} else {
|
|
397
397
|
const gateConfig = {
|
|
398
398
|
minWeeklyHeadroomPct: config.budget.minWeeklyHeadroomPct,
|
|
@@ -403,22 +403,21 @@ function renderRunSummary(opts) {
|
|
|
403
403
|
const anySize = fullSize.go ? fullSize : shouldIgnite(budget, 0, gateConfig);
|
|
404
404
|
const verdict = fullSize.go ? "the budget gate would let a run through right now" : anySize.go ? `a task at the ${formatTokens(config.agent.maxTaskTokens)}-token cap would not fit right now, though cheaper tasks still could` : `the budget gate would block any run right now (${fullSize.reason})`;
|
|
405
405
|
const usage = `${Math.round(budget.weeklyRemainingPct)}% of the weekly quota left (~${formatTokens(Math.round(budget.weeklyRemainingTokensEst))} tokens), 5-hour session ${budget.sessionAvailable ? "available" : "exhausted"}`;
|
|
406
|
-
why =
|
|
406
|
+
why = `${config.budget.provider} \u2014 ${usage} \u2192 ${verdict}.`;
|
|
407
407
|
}
|
|
408
|
-
return
|
|
409
|
-
${
|
|
410
|
-
${
|
|
411
|
-
${why}`;
|
|
408
|
+
return ` What: ${what} \u2014 at most one PR per run, up to ${formatTokens(config.agent.maxTaskTokens)} tokens.
|
|
409
|
+
When: ${renderWhen(opts)}
|
|
410
|
+
Budget: ${why}`;
|
|
412
411
|
}
|
|
413
412
|
function renderWhen(opts) {
|
|
414
413
|
const { config } = opts;
|
|
415
414
|
const cron = config.schedule.cron;
|
|
416
415
|
const cadence = describeCadence(cron);
|
|
417
416
|
if (opts.scheduleInstalled === false) {
|
|
418
|
-
return `
|
|
417
|
+
return `no afterburner schedule is installed \u2014 it only runs when you start it; \`afterburner schedule install\` would run it ${cadence}.`;
|
|
419
418
|
}
|
|
420
419
|
if (opts.scheduleInstalled === "unknown") {
|
|
421
|
-
return
|
|
420
|
+
return `${cadence}, once the entries from \`afterburner schedule install\` are active (not auto-detectable on this platform).`;
|
|
422
421
|
}
|
|
423
422
|
const zone = opts.scheduleKind === "systemd-user" ? config.schedule.timezone : opts.systemTimezone;
|
|
424
423
|
const kindLabel = opts.scheduleKind === "systemd-user" ? "systemd" : "launchd";
|
|
@@ -434,9 +433,9 @@ function renderWhen(opts) {
|
|
|
434
433
|
minute: "2-digit",
|
|
435
434
|
hourCycle: "h23"
|
|
436
435
|
}).format(next);
|
|
437
|
-
return `
|
|
436
|
+
return `next run ${formatted} (${zone}), then ${cadence} \u2014 via the installed ${kindLabel} entry, if activated and in sync with this config${zoneNote}.`;
|
|
438
437
|
} catch {
|
|
439
|
-
return `
|
|
438
|
+
return `an installed ${kindLabel} entry runs it on cron '${cron}' (${zone}), if activated.`;
|
|
440
439
|
}
|
|
441
440
|
}
|
|
442
441
|
function describeCadence(cron) {
|
|
@@ -484,6 +483,17 @@ ${nextCmd(cmd("doctor"))}`;
|
|
|
484
483
|
const engineLine = config.agent.backend === "dry-run" ? "dry-run \u2014 simulation only; set agent.backend: 'claude-code' in the config to do real work" : config.agent.backend === "claude-code" ? "claude-code \u2014 spends subscription quota you already pay for; PRs only with --live" : "api-key \u2014 bills your Anthropic API account per token (real money); PRs only with --live";
|
|
485
484
|
const budgetLine = config.budget.provider === "manual" ? "manual \u2014 trusts budget.manual (automatic option: `afterburner statusline install`, then budget.provider: 'claude-usage')" : config.budget.provider === "claude-usage" ? "claude-usage \u2014 reads your real usage via the status line hook" : "claude-code-transcripts \u2014 estimates from local Claude Code session logs";
|
|
486
485
|
const nextNote = config.agent.backend === "dry-run" ? "previews the next task; nothing is executed or spent" : `previews the next task (live execution ships in a future release; ${cmd("run-once --live")} currently validates and refuses)`;
|
|
486
|
+
const stopLine = `\`afterburner schedule uninstall\` (or Ctrl-C for watch); ${cmd("log")} lists every past run`;
|
|
487
|
+
if (opts.summary) {
|
|
488
|
+
return `${section(emoji.flame, "Ready")}
|
|
489
|
+
Config: ${configPath}
|
|
490
|
+
${opts.summary}
|
|
491
|
+
Engine: ${engineLine}
|
|
492
|
+
Stop: ${stopLine}
|
|
493
|
+
|
|
494
|
+
${next}
|
|
495
|
+
${nextCmd(cmd("run-once --dry-run"), nextNote)}`;
|
|
496
|
+
}
|
|
487
497
|
const headroomClause = `weekly headroom drops below ${config.budget.minWeeklyHeadroomPct}%`;
|
|
488
498
|
const gateLine = config.budget.requireSessionAvailable ? `runs skip themselves when no 5-hour session window is free or ${headroomClause}` : `runs skip themselves when ${headroomClause}`;
|
|
489
499
|
return `${section(emoji.flame, "Ready")}
|
|
@@ -495,11 +505,9 @@ ${nextCmd(cmd("doctor"))}`;
|
|
|
495
505
|
Gate: ${gateLine}
|
|
496
506
|
Safety: live PRs need BOTH a live engine in the config AND --live (two-part opt-in)
|
|
497
507
|
Runs: only when you start them \u2014 \`afterburner schedule install\` (recommended OS scheduler; cron '${config.schedule.cron}' ${config.schedule.timezone}) or \`afterburner watch\` (foreground) make it recurring
|
|
498
|
-
Stop:
|
|
499
|
-
|
|
500
|
-
${opts.summary ? `${opts.summary}
|
|
508
|
+
Stop: ${stopLine}
|
|
501
509
|
|
|
502
|
-
|
|
510
|
+
${next}
|
|
503
511
|
${nextCmd(cmd("run-once --dry-run"), nextNote)}`;
|
|
504
512
|
}
|
|
505
513
|
function checkVersion(opts) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pimmesz/afterburner",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Convert idle Claude subscription quota into shippable engineering work: budget-aware trigger, bounded task selection, PR-only output.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"publishConfig": {
|