getaura 0.1.4 → 0.1.5

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/README.md CHANGED
@@ -25,7 +25,7 @@ To install the `aura` command yourself: `npm install -g getaura`. Without it, us
25
25
  ## What you get
26
26
 
27
27
  - **An Aura score** from deterministic checks across security, agent setup, foundations and structure, explained in plain language.
28
- - **Next steps** in priority order: `aura next`.
28
+ - **Next steps** in priority order. After a scan (or with `aura next`), tick the ones you want in the terminal and Aura does them.
29
29
  - **Fixes as pull requests you approve**: `aura apply foundation` puts your brief, agent rules, skills, CI and env example in place in one PR, and `aura fix <finding>` has Aura's agent make code changes on a branch.
30
30
  - **An agent that keeps it that way**: the rules and skills Aura installs teach your coding agent your standards, and GitHub Actions re-scans every push.
31
31
 
package/dist/index.js CHANGED
@@ -20429,7 +20429,7 @@ function pmCommands(pm) {
20429
20429
  // package.json
20430
20430
  var package_default = {
20431
20431
  name: "getaura",
20432
- version: "0.1.4",
20432
+ version: "0.1.5",
20433
20433
  description: "Aura helps you and your coding agent follow best practices while you vibe code.",
20434
20434
  type: "module",
20435
20435
  bin: {
@@ -23394,6 +23394,53 @@ function explainSignIn(outcome) {
23394
23394
  }
23395
23395
  }
23396
23396
 
23397
+ // src/commands/pick-steps.ts
23398
+ function stepRun(step, hasKey) {
23399
+ const [, sub, arg = step.actionId] = step.command.split(" ");
23400
+ if (sub === "apply") return { kind: "apply", actionId: arg };
23401
+ if (sub === "fix") return { kind: "fix", actionId: arg, withOwnAgent: !hasKey };
23402
+ if (sub === "guide") return { kind: "guide", topic: arg };
23403
+ return { kind: "inventory" };
23404
+ }
23405
+ function hint(step, hasKey) {
23406
+ const run2 = stepRun(step, hasKey);
23407
+ const what = run2.kind === "apply" ? "opens a pull request" : run2.kind === "fix" ? run2.withOwnAgent ? "writes a task for your coding agent" : "Aura\u2019s agent fixes it in a pull request" : run2.kind === "guide" ? "shows step-by-step instructions" : "a few questions";
23408
+ return [what, step.impact > 0 ? `+${step.impact} points` : "", effortLabel(step.effort)].filter(Boolean).join(" \xB7 ");
23409
+ }
23410
+ async function pickAndRunSteps(steps, limit = 10) {
23411
+ if (steps.length === 0) {
23412
+ console.log(pc.green("\n Nothing to do right now."));
23413
+ return 0;
23414
+ }
23415
+ const hasKey = Boolean(getApiKey());
23416
+ console.log("");
23417
+ const chosen = unwrap(
23418
+ await p.multiselect({
23419
+ message: "Next steps: pick what Aura should do now (space to select, enter to confirm, enter with none to skip)",
23420
+ options: steps.slice(0, limit).map((s) => ({ value: s.actionId, label: s.title, hint: hint(s, hasKey) })),
23421
+ required: false
23422
+ })
23423
+ );
23424
+ if (chosen.length === 0) {
23425
+ say.dim("Nothing selected. Run `aura next` any time to pick again.");
23426
+ return 0;
23427
+ }
23428
+ const results = [];
23429
+ for (const step of steps.filter((s) => chosen.includes(s.actionId))) {
23430
+ console.log(`
23431
+ ${pc.magenta("\u2726")} ${pc.bold(step.title)}`);
23432
+ const run2 = stepRun(step, hasKey);
23433
+ const code = run2.kind === "apply" ? await applyCommand(run2.actionId, { yes: true }) : run2.kind === "fix" ? await fixCommand(run2.actionId, run2.withOwnAgent ? { agent: true } : { yes: true }) : run2.kind === "guide" ? await guideCommand(run2.topic, {}) : await inventoryCommand({});
23434
+ results.push({ title: step.title, ok: code === 0 });
23435
+ }
23436
+ if (results.length > 1) {
23437
+ console.log(`
23438
+ ${pc.bold(" Done")}`);
23439
+ for (const r of results) console.log(` ${r.ok ? pc.green("\u2714") : pc.red("\u2716")} ${r.title}`);
23440
+ }
23441
+ return results.every((r) => r.ok) ? 0 : 1;
23442
+ }
23443
+
23397
23444
  // src/commands/simple.ts
23398
23445
  async function latestScan(root) {
23399
23446
  const file2 = auraPath(root, "scan.json");
@@ -23412,8 +23459,10 @@ async function nextCommand(flags) {
23412
23459
  const root = await findRepoRoot();
23413
23460
  const scan = await latestScan(root);
23414
23461
  const steps = nextSteps(scan, { includeFoundationBundle: true, accounts: accountState(root, scan.stack.services) });
23462
+ const limit = flags.limit ? Number(flags.limit) : 10;
23415
23463
  if (flags.json) printJson({ score: scan.score, nextSteps: steps });
23416
- else console.log(renderNextSteps(steps, flags.limit ? Number(flags.limit) : 10));
23464
+ else if (interactive()) return pickAndRunSteps(steps, limit);
23465
+ else console.log(renderNextSteps(steps, limit));
23417
23466
  return 0;
23418
23467
  }
23419
23468
  async function historyCommand(flags) {
@@ -24140,13 +24189,15 @@ async function scanCommand(flags) {
24140
24189
  return exitCode;
24141
24190
  }
24142
24191
  console.log(renderTerminal(scan, { previous: flags.ci ? base?.score ?? null : previous }));
24143
- if (!flags.ci) console.log(renderNextSteps(steps, 3));
24192
+ const pick2 = !flags.ci && interactive();
24193
+ if (!flags.ci && !pick2) console.log(renderNextSteps(steps, 3));
24144
24194
  say.dim(
24145
24195
  `
24146
24196
  Full report: .aura/report.md${client.hasKey || flags.explain === false ? "" : " \xB7 Add a pilot key (aura login) for plain-language explanations."}`
24147
24197
  );
24148
24198
  if (base) say.info(`
24149
24199
  Compared with ${flags.base}: ${base.score} \u2192 ${scan.score}${exitCode ? ` (dropped more than ${maxDrop})` : ""}`);
24200
+ if (pick2) await pickAndRunSteps(steps);
24150
24201
  return exitCode;
24151
24202
  }
24152
24203