@staff0rd/assist 0.147.2 → 0.147.4

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.
Files changed (2) hide show
  1. package/dist/index.js +42 -82
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.147.2",
9
+ version: "0.147.4",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2608,7 +2608,7 @@ async function list2(options2) {
2608
2608
 
2609
2609
  // src/commands/backlog/next.ts
2610
2610
  import chalk36 from "chalk";
2611
- import enquirer7 from "enquirer";
2611
+ import enquirer6 from "enquirer";
2612
2612
 
2613
2613
  // src/commands/backlog/run.ts
2614
2614
  import chalk35 from "chalk";
@@ -2714,10 +2714,8 @@ function buildReviewPhase() {
2714
2714
  import chalk34 from "chalk";
2715
2715
 
2716
2716
  // src/commands/backlog/resolvePhaseResult.ts
2717
- import { spawnSync as spawnSync2 } from "child_process";
2718
2717
  import { existsSync as existsSync16, unlinkSync as unlinkSync3 } from "fs";
2719
2718
  import chalk33 from "chalk";
2720
- import enquirer6 from "enquirer";
2721
2719
 
2722
2720
  // src/commands/backlog/handleIncompletePhase.ts
2723
2721
  import enquirer5 from "enquirer";
@@ -2756,19 +2754,6 @@ function phaseDone(id, phase) {
2756
2754
  console.log(chalk32.green(`Phase ${phase} of item #${id} marked as complete.`));
2757
2755
  }
2758
2756
 
2759
- // src/commands/backlog/spawnClaude.ts
2760
- import { spawn as spawn3 } from "child_process";
2761
- function spawnClaude(prompt) {
2762
- const child = spawn3("claude", [prompt], {
2763
- stdio: "inherit"
2764
- });
2765
- const done2 = new Promise((resolve7, reject) => {
2766
- child.on("close", (code) => resolve7(code ?? 0));
2767
- child.on("error", reject);
2768
- });
2769
- return { child, done: done2 };
2770
- }
2771
-
2772
2757
  // src/commands/backlog/resolvePhaseResult.ts
2773
2758
  function cleanupMarker() {
2774
2759
  const statusPath = getPhaseStatusPath();
@@ -2776,56 +2761,29 @@ function cleanupMarker() {
2776
2761
  unlinkSync3(statusPath);
2777
2762
  }
2778
2763
  }
2779
- function runVerify() {
2780
- const result = spawnSync2("assist", ["verify"], {
2781
- stdio: "inherit",
2782
- shell: true
2783
- });
2784
- return result.status === 0;
2785
- }
2786
- async function handleCompletedPhase(phaseIndex) {
2787
- cleanupMarker();
2788
- console.log(
2789
- chalk33.green(`
2790
- Phase ${phaseIndex + 1} completed. Running verify...`)
2791
- );
2792
- if (runVerify()) {
2793
- console.log(chalk33.green("Verification passed."));
2794
- return true;
2795
- }
2796
- while (true) {
2797
- const { action } = await enquirer6.prompt({
2798
- type: "select",
2799
- name: "action",
2800
- message: "Verification failed. What would you like to do?",
2801
- choices: ["Fix", "Continue to next phase", "Abort"]
2802
- });
2803
- if (action === "Fix") {
2804
- const { done: done2 } = spawnClaude(
2805
- "Run /verify and fix all failures. Do not move on until every check passes."
2806
- );
2807
- await done2;
2808
- if (runVerify()) {
2809
- console.log(chalk33.green("Verification passed."));
2810
- return true;
2811
- }
2812
- continue;
2813
- }
2814
- return action === "Continue to next phase";
2815
- }
2816
- }
2817
- async function resolvePhaseResult(phaseIndex, options2) {
2764
+ async function resolvePhaseResult(phaseIndex) {
2818
2765
  if (!existsSync16(getPhaseStatusPath())) {
2819
2766
  const action = await handleIncompletePhase();
2820
2767
  if (action === "abort") return -1;
2821
2768
  return action === "skip" ? 1 : 0;
2822
2769
  }
2823
- if (options2?.skipVerify) {
2824
- cleanupMarker();
2825
- return 1;
2826
- }
2827
- const shouldContinue = await handleCompletedPhase(phaseIndex);
2828
- return shouldContinue ? 1 : -1;
2770
+ cleanupMarker();
2771
+ console.log(chalk33.green(`
2772
+ Phase ${phaseIndex + 1} completed.`));
2773
+ return 1;
2774
+ }
2775
+
2776
+ // src/commands/backlog/spawnClaude.ts
2777
+ import { spawn as spawn3 } from "child_process";
2778
+ function spawnClaude(prompt) {
2779
+ const child = spawn3("claude", [prompt], {
2780
+ stdio: "inherit"
2781
+ });
2782
+ const done2 = new Promise((resolve7, reject) => {
2783
+ child.on("close", (code) => resolve7(code ?? 0));
2784
+ child.on("error", reject);
2785
+ });
2786
+ return { child, done: done2 };
2829
2787
  }
2830
2788
 
2831
2789
  // src/commands/backlog/watchForMarker.ts
@@ -2844,7 +2802,7 @@ function stopWatching() {
2844
2802
  }
2845
2803
 
2846
2804
  // src/commands/backlog/executePhase.ts
2847
- async function executePhase(item, phaseIndex, phases, options2) {
2805
+ async function executePhase(item, phaseIndex, phases) {
2848
2806
  const phase = phases[phaseIndex];
2849
2807
  console.log(
2850
2808
  chalk34.bold(
@@ -2859,9 +2817,7 @@ async function executePhase(item, phaseIndex, phases, options2) {
2859
2817
  watchForMarker(child);
2860
2818
  await done2;
2861
2819
  stopWatching();
2862
- const delta = await resolvePhaseResult(phaseIndex, {
2863
- skipVerify: options2?.skipVerify
2864
- });
2820
+ const delta = await resolvePhaseResult(phaseIndex);
2865
2821
  return delta < 0 ? -1 : phaseIndex + delta;
2866
2822
  }
2867
2823
 
@@ -2911,9 +2867,7 @@ async function run2(id) {
2911
2867
  const reviewPhase = buildReviewPhase();
2912
2868
  const allPhases = [...plan2, reviewPhase];
2913
2869
  const reviewIndex = plan2.length;
2914
- const reviewResult = await executePhase(item, reviewIndex, allPhases, {
2915
- skipVerify: true
2916
- });
2870
+ const reviewResult = await executePhase(item, reviewIndex, allPhases);
2917
2871
  if (reviewResult < 0) return;
2918
2872
  if (item.status !== "done") setStatus(id, "done");
2919
2873
  console.log(chalk35.green(`
@@ -2939,11 +2893,17 @@ async function next() {
2939
2893
  await spawnClaude("/draft");
2940
2894
  return;
2941
2895
  }
2896
+ if (todo.length === 1) {
2897
+ const only = todo[0];
2898
+ console.log(chalk36.bold(`Starting #${only.id}: ${only.name}`));
2899
+ await run2(String(only.id));
2900
+ return;
2901
+ }
2942
2902
  const choices = todo.map((i) => ({
2943
2903
  name: `${typeLabel(i.type)} #${i.id}: ${i.name}`,
2944
2904
  value: String(i.id)
2945
2905
  }));
2946
- const { selected } = await enquirer7.prompt({
2906
+ const { selected } = await enquirer6.prompt({
2947
2907
  type: "select",
2948
2908
  name: "selected",
2949
2909
  message: "Choose a backlog item to start:",
@@ -5755,10 +5715,10 @@ function registerJira(program2) {
5755
5715
 
5756
5716
  // src/commands/news/add/index.ts
5757
5717
  import chalk68 from "chalk";
5758
- import enquirer8 from "enquirer";
5718
+ import enquirer7 from "enquirer";
5759
5719
  async function add2(url) {
5760
5720
  if (!url) {
5761
- const response = await enquirer8.prompt({
5721
+ const response = await enquirer7.prompt({
5762
5722
  type: "input",
5763
5723
  name: "url",
5764
5724
  message: "RSS feed URL:",
@@ -5978,7 +5938,7 @@ function registerNews(program2) {
5978
5938
  }
5979
5939
 
5980
5940
  // src/commands/prs/comment.ts
5981
- import { spawnSync as spawnSync3 } from "child_process";
5941
+ import { spawnSync as spawnSync2 } from "child_process";
5982
5942
  import { unlinkSync as unlinkSync5, writeFileSync as writeFileSync19 } from "fs";
5983
5943
  import { tmpdir as tmpdir3 } from "os";
5984
5944
  import { join as join20 } from "path";
@@ -6056,7 +6016,7 @@ function comment(path49, line, body) {
6056
6016
  const queryFile = join20(tmpdir3(), `gh-query-${Date.now()}.graphql`);
6057
6017
  writeFileSync19(queryFile, MUTATION);
6058
6018
  try {
6059
- const result = spawnSync3(
6019
+ const result = spawnSync2(
6060
6020
  "gh",
6061
6021
  [
6062
6022
  "api",
@@ -6394,7 +6354,7 @@ async function listComments() {
6394
6354
  import { execSync as execSync30 } from "child_process";
6395
6355
 
6396
6356
  // src/commands/prs/prs/displayPaginated/index.ts
6397
- import enquirer9 from "enquirer";
6357
+ import enquirer8 from "enquirer";
6398
6358
 
6399
6359
  // src/commands/prs/prs/displayPaginated/printPr.ts
6400
6360
  import chalk71 from "chalk";
@@ -6464,7 +6424,7 @@ function parseAction(action) {
6464
6424
  }
6465
6425
  async function promptNavigation(currentPage, totalPages) {
6466
6426
  const choices = buildNavChoices(currentPage, totalPages);
6467
- const { action } = await enquirer9.prompt({
6427
+ const { action } = await enquirer8.prompt({
6468
6428
  type: "select",
6469
6429
  name: "action",
6470
6430
  message: "Navigate",
@@ -9346,7 +9306,7 @@ function registerVerify(program2) {
9346
9306
  }
9347
9307
 
9348
9308
  // src/commands/voice/devices.ts
9349
- import { spawnSync as spawnSync4 } from "child_process";
9309
+ import { spawnSync as spawnSync3 } from "child_process";
9350
9310
  import { join as join32 } from "path";
9351
9311
 
9352
9312
  // src/commands/voice/shared.ts
@@ -9379,7 +9339,7 @@ function getLockFile() {
9379
9339
  // src/commands/voice/devices.ts
9380
9340
  function devices() {
9381
9341
  const script = join32(getPythonDir(), "list_devices.py");
9382
- spawnSync4(getVenvPython(), [script], { stdio: "inherit" });
9342
+ spawnSync3(getVenvPython(), [script], { stdio: "inherit" });
9383
9343
  }
9384
9344
 
9385
9345
  // src/commands/voice/logs.ts
@@ -9411,7 +9371,7 @@ function logs(options2) {
9411
9371
  }
9412
9372
 
9413
9373
  // src/commands/voice/setup.ts
9414
- import { spawnSync as spawnSync5 } from "child_process";
9374
+ import { spawnSync as spawnSync4 } from "child_process";
9415
9375
  import { mkdirSync as mkdirSync10 } from "fs";
9416
9376
  import { join as join34 } from "path";
9417
9377
 
@@ -9472,7 +9432,7 @@ function setup() {
9472
9432
  bootstrapVenv();
9473
9433
  console.log("\nDownloading models...\n");
9474
9434
  const script = join34(getPythonDir(), "setup_models.py");
9475
- const result = spawnSync5(getVenvPython(), [script], {
9435
+ const result = spawnSync4(getVenvPython(), [script], {
9476
9436
  stdio: "inherit",
9477
9437
  env: { ...process.env, VOICE_LOG_FILE: voicePaths.log }
9478
9438
  });
@@ -9744,7 +9704,7 @@ async function exchangeToken(params) {
9744
9704
  }
9745
9705
 
9746
9706
  // src/commands/roam/promptCredentials.ts
9747
- import enquirer10 from "enquirer";
9707
+ import enquirer9 from "enquirer";
9748
9708
  function censor(value) {
9749
9709
  const visible = value.slice(-4);
9750
9710
  return `${"*".repeat(value.length - 4)}${visible}`;
@@ -9753,7 +9713,7 @@ function label(name, existing) {
9753
9713
  return existing ? `${name} (${censor(existing)})` : name;
9754
9714
  }
9755
9715
  async function promptField(name, existing) {
9756
- const { value } = await enquirer10.prompt({
9716
+ const { value } = await enquirer9.prompt({
9757
9717
  type: "input",
9758
9718
  name: "value",
9759
9719
  message: `${label(name, existing)}:`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.147.2",
3
+ "version": "0.147.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {