@pimmesz/afterburner 1.0.7 → 1.0.9
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 +25 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import { Command } from "commander";
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "@pimmesz/afterburner",
|
|
34
|
-
version: "1.0.
|
|
34
|
+
version: "1.0.9",
|
|
35
35
|
description: "Convert idle Claude subscription quota into shippable engineering work: budget-aware trigger, bounded task selection, PR-only output.",
|
|
36
36
|
license: "Apache-2.0",
|
|
37
37
|
publishConfig: {
|
|
@@ -372,13 +372,18 @@ ${nextCmd(cmd("doctor"))}`;
|
|
|
372
372
|
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";
|
|
373
373
|
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";
|
|
374
374
|
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)`;
|
|
375
|
+
const headroomClause = `weekly headroom drops below ${config.budget.minWeeklyHeadroomPct}%`;
|
|
376
|
+
const gateLine = config.budget.requireSessionAvailable ? `runs skip themselves when no 5-hour session window is free or ${headroomClause}` : `runs skip themselves when ${headroomClause}`;
|
|
375
377
|
return `${section(emoji.flame, "Ready")}
|
|
376
378
|
Config: ${configPath}
|
|
377
379
|
Repos: ${repoLine}
|
|
378
380
|
Engine: ${engineLine}
|
|
379
381
|
Budget: ${budgetLine}
|
|
382
|
+
Limits: at most one task per repo per run, capped at ${config.agent.maxTaskTokens.toLocaleString("en-US")} tokens, delivered as one PR on its own branch
|
|
383
|
+
Gate: ${gateLine}
|
|
380
384
|
Safety: live PRs need BOTH a live engine in the config AND --live (two-part opt-in)
|
|
381
|
-
|
|
385
|
+
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
|
|
386
|
+
Stop: \`afterburner schedule uninstall\` (or Ctrl-C for watch); ${cmd("log")} lists every past run
|
|
382
387
|
|
|
383
388
|
${next}
|
|
384
389
|
${nextCmd(cmd("run-once --dry-run"), nextNote)}`;
|
|
@@ -769,12 +774,22 @@ async function collectAnswers(rl, opts, cwd = process.cwd()) {
|
|
|
769
774
|
console.log(step("Engine", backend));
|
|
770
775
|
console.log(`
|
|
771
776
|
${bold("Step 2 of 3 \u2014 Repository (the allowlist of what it may touch)")}`);
|
|
777
|
+
const detectedRepo = existsSync3(join2(cwd, ".git")) ? cwd : null;
|
|
778
|
+
if (detectedRepo) {
|
|
779
|
+
console.log(` - press Enter to use this folder (a git repo): ${detectedRepo}`);
|
|
780
|
+
}
|
|
772
781
|
console.log(' - a local path (e.g. ~/code/my-project, or "." for this folder)');
|
|
773
782
|
console.log(" \u2192 a dry run can scan it for candidate tasks right away");
|
|
774
783
|
console.log(" - a GitHub URL (e.g. https://github.com/you/repo)");
|
|
775
784
|
console.log(" \u2192 saved to your allowlist; used once live runs are enabled");
|
|
776
|
-
console.log(
|
|
777
|
-
|
|
785
|
+
console.log(
|
|
786
|
+
detectedRepo ? " - type 'skip' to decide later (the health check flags it until a repo is added)" : " - leave empty to skip for now (the health check flags it until a repo is added)"
|
|
787
|
+
);
|
|
788
|
+
let repoAnswer = (await rl.question(detectedRepo ? `Repo path or URL [${detectedRepo}]: ` : "Repo path or URL: ")).trim();
|
|
789
|
+
if (detectedRepo) {
|
|
790
|
+
if (repoAnswer === "") repoAnswer = detectedRepo;
|
|
791
|
+
else if (repoAnswer.toLowerCase() === "skip") repoAnswer = "";
|
|
792
|
+
}
|
|
778
793
|
const repoPath = localRepoPath(repoAnswer, cwd);
|
|
779
794
|
const repoUrl = repoPath ?? repoAnswer;
|
|
780
795
|
const repoEcho = repoUrl === "" ? '(skipped \u2014 add one to "repos" later)' : !repoPath && !looksRemoteRepoUrl(repoAnswer) ? `${repoUrl} (not an existing directory \u2014 saved as typed; the health check will flag it)` : repoUrl;
|
|
@@ -790,7 +805,7 @@ ${bold("Step 2 of 3 \u2014 Repository (the allowlist of what it may touch)")}`);
|
|
|
790
805
|
} else if (repoPath && repoPath !== targetDir) {
|
|
791
806
|
console.log(
|
|
792
807
|
dim(
|
|
793
|
-
`Note: ${repoPath} already has
|
|
808
|
+
`Note: ${repoPath} already has its own afterburner config; it stays untouched. Your settings are written to the current directory instead.`
|
|
794
809
|
)
|
|
795
810
|
);
|
|
796
811
|
}
|
|
@@ -841,8 +856,11 @@ function failShadowing(shadowing, target) {
|
|
|
841
856
|
);
|
|
842
857
|
}
|
|
843
858
|
async function confirmOverwrite(rl, target) {
|
|
844
|
-
const answer = (await rl.question(
|
|
845
|
-
|
|
859
|
+
const answer = (await rl.question(
|
|
860
|
+
`
|
|
861
|
+
The settings file ${target} already exists.
|
|
862
|
+
Overwrite it with these new answers? Only this file changes \u2014 your repo is untouched. [y/N]: `
|
|
863
|
+
)).trim().toLowerCase();
|
|
846
864
|
return answer === "y" || answer === "yes";
|
|
847
865
|
}
|
|
848
866
|
function hasConfig(dir) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pimmesz/afterburner",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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": {
|