@staff0rd/assist 0.388.5 → 0.389.0

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/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.388.5",
9
+ version: "0.389.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -16353,7 +16353,7 @@ function comment2(path61, line, body, startLine) {
16353
16353
  }
16354
16354
 
16355
16355
  // src/commands/prs/edit.ts
16356
- import { execSync as execSync39 } from "child_process";
16356
+ import { execFileSync as execFileSync6 } from "child_process";
16357
16357
 
16358
16358
  // src/commands/prs/buildPrBody.ts
16359
16359
  function jiraBrowseUrl(key) {
@@ -16522,21 +16522,21 @@ function edit(options2) {
16522
16522
  const { number, body } = getCurrentPr();
16523
16523
  const newBody = editPrBody(body, options2);
16524
16524
  validatePrContent(options2.title ?? "", newBody);
16525
- const args = [`gh pr edit ${number}`];
16526
- if (options2.title) args.push(`--title ${shellQuote(options2.title)}`);
16527
- args.push(`--body ${shellQuote(newBody)}`);
16525
+ const args = ["pr", "edit", String(number)];
16526
+ if (options2.title) args.push("--title", options2.title);
16527
+ args.push("--body", newBody);
16528
16528
  try {
16529
- execSync39(args.join(" "), { stdio: "inherit" });
16529
+ execFileSync6("gh", args, { stdio: "inherit" });
16530
16530
  } catch {
16531
16531
  process.exit(1);
16532
16532
  }
16533
16533
  }
16534
16534
 
16535
16535
  // src/commands/prs/fixed.ts
16536
- import { execSync as execSync42 } from "child_process";
16536
+ import { execSync as execSync41 } from "child_process";
16537
16537
 
16538
16538
  // src/commands/prs/resolveCommentWithReply.ts
16539
- import { execSync as execSync41 } from "child_process";
16539
+ import { execSync as execSync40 } from "child_process";
16540
16540
  import { unlinkSync as unlinkSync12, writeFileSync as writeFileSync31 } from "fs";
16541
16541
  import { tmpdir as tmpdir5 } from "os";
16542
16542
  import { join as join48 } from "path";
@@ -16565,9 +16565,9 @@ function deleteCommentsCache(prNumber) {
16565
16565
  }
16566
16566
 
16567
16567
  // src/commands/prs/replyToComment.ts
16568
- import { execSync as execSync40 } from "child_process";
16568
+ import { execSync as execSync39 } from "child_process";
16569
16569
  function replyToComment(org, repo, prNumber, commentId, message) {
16570
- execSync40(
16570
+ execSync39(
16571
16571
  `gh api repos/${org}/${repo}/pulls/${prNumber}/comments -f body="${message.replace(/"/g, String.raw`\"`)}" -F in_reply_to=${commentId}`,
16572
16572
  { stdio: ["inherit", "pipe", "inherit"] }
16573
16573
  );
@@ -16579,7 +16579,7 @@ function resolveThread(threadId) {
16579
16579
  const queryFile = join48(tmpdir5(), `gh-mutation-${Date.now()}.graphql`);
16580
16580
  writeFileSync31(queryFile, mutation);
16581
16581
  try {
16582
- execSync41(
16582
+ execSync40(
16583
16583
  `gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
16584
16584
  { stdio: ["inherit", "pipe", "inherit"] }
16585
16585
  );
@@ -16631,7 +16631,7 @@ function resolveCommentWithReply(commentId, message) {
16631
16631
  // src/commands/prs/fixed.ts
16632
16632
  function verifySha(sha) {
16633
16633
  try {
16634
- return execSync42(`git rev-parse --verify ${sha}`, {
16634
+ return execSync41(`git rev-parse --verify ${sha}`, {
16635
16635
  encoding: "utf8"
16636
16636
  }).trim();
16637
16637
  } catch {
@@ -16645,7 +16645,7 @@ function fixed(commentId, sha) {
16645
16645
  const { org, repo } = getRepoInfo();
16646
16646
  const repoUrl = `https://github.com/${org}/${repo}`;
16647
16647
  const message = `Fixed in [${fullSha}](${repoUrl}/commit/${fullSha})`;
16648
- execSync42("git push", { stdio: "inherit" });
16648
+ execSync41("git push", { stdio: "inherit" });
16649
16649
  resolveCommentWithReply(commentId, message);
16650
16650
  } catch (error) {
16651
16651
  if (isGhNotInstalled(error)) {
@@ -16663,7 +16663,7 @@ import { join as join50 } from "path";
16663
16663
  import { stringify } from "yaml";
16664
16664
 
16665
16665
  // src/commands/prs/fetchThreadIds.ts
16666
- import { execSync as execSync43 } from "child_process";
16666
+ import { execSync as execSync42 } from "child_process";
16667
16667
  import { unlinkSync as unlinkSync13, writeFileSync as writeFileSync32 } from "fs";
16668
16668
  import { tmpdir as tmpdir6 } from "os";
16669
16669
  import { join as join49 } from "path";
@@ -16672,7 +16672,7 @@ function fetchThreadIds(org, repo, prNumber) {
16672
16672
  const queryFile = join49(tmpdir6(), `gh-query-${Date.now()}.graphql`);
16673
16673
  writeFileSync32(queryFile, THREAD_QUERY);
16674
16674
  try {
16675
- const result = execSync43(
16675
+ const result = execSync42(
16676
16676
  `gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
16677
16677
  { encoding: "utf8" }
16678
16678
  );
@@ -16694,9 +16694,9 @@ function fetchThreadIds(org, repo, prNumber) {
16694
16694
  }
16695
16695
 
16696
16696
  // src/commands/prs/listComments/fetchReviewComments.ts
16697
- import { execSync as execSync44 } from "child_process";
16697
+ import { execSync as execSync43 } from "child_process";
16698
16698
  function fetchJson(endpoint) {
16699
- const result = execSync44(`gh api --paginate ${endpoint}`, {
16699
+ const result = execSync43(`gh api --paginate ${endpoint}`, {
16700
16700
  encoding: "utf8"
16701
16701
  });
16702
16702
  if (!result.trim()) return [];
@@ -16835,7 +16835,7 @@ async function listComments() {
16835
16835
  }
16836
16836
 
16837
16837
  // src/commands/prs/prs/index.ts
16838
- import { execSync as execSync45 } from "child_process";
16838
+ import { execSync as execSync44 } from "child_process";
16839
16839
 
16840
16840
  // src/commands/prs/prs/displayPaginated/index.ts
16841
16841
  import enquirer9 from "enquirer";
@@ -16942,7 +16942,7 @@ async function prs(options2) {
16942
16942
  const state = options2.open ? "open" : options2.closed ? "closed" : "all";
16943
16943
  try {
16944
16944
  const { org, repo } = getRepoInfo();
16945
- const result = execSync45(
16945
+ const result = execSync44(
16946
16946
  `gh pr list --state ${state} --json number,title,url,author,createdAt,mergedAt,closedAt,state,changedFiles --limit 100 -R ${org}/${repo}`,
16947
16947
  { encoding: "utf8" }
16948
16948
  );
@@ -16965,22 +16965,21 @@ async function prs(options2) {
16965
16965
  }
16966
16966
 
16967
16967
  // src/commands/prs/raise.ts
16968
- import { execSync as execSync47 } from "child_process";
16968
+ import { execFileSync as execFileSync7 } from "child_process";
16969
16969
 
16970
16970
  // src/commands/prs/buildCreateArgs.ts
16971
+ function buildEditArgs(number, title, body) {
16972
+ return ["pr", "edit", String(number), "--title", title, "--body", body];
16973
+ }
16971
16974
  function buildCreateArgs(title, body, options2) {
16972
- const args = [
16973
- "gh pr create",
16974
- `--title ${shellQuote(title)}`,
16975
- `--body ${shellQuote(body)}`
16976
- ];
16975
+ const args = ["pr", "create", "--title", title, "--body", body];
16977
16976
  const valueFlags = [
16978
16977
  ["--base", options2.base],
16979
16978
  ["--head", options2.head],
16980
16979
  ["--milestone", options2.milestone]
16981
16980
  ];
16982
16981
  for (const [flag, value] of valueFlags) {
16983
- if (value) args.push(`${flag} ${shellQuote(value)}`);
16982
+ if (value) args.push(flag, value);
16984
16983
  }
16985
16984
  if (options2.draft) args.push("--draft");
16986
16985
  if (options2.web) args.push("--web");
@@ -16991,23 +16990,23 @@ function buildCreateArgs(title, body, options2) {
16991
16990
  ];
16992
16991
  for (const [flag, values] of repeatableFlags) {
16993
16992
  for (const value of values ?? []) {
16994
- args.push(`${flag} ${shellQuote(value)}`);
16993
+ args.push(flag, value);
16995
16994
  }
16996
16995
  }
16997
16996
  return args;
16998
16997
  }
16999
16998
 
17000
16999
  // src/commands/prs/readSessionPrRef.ts
17001
- import { execSync as execSync46 } from "child_process";
17000
+ import { execSync as execSync45 } from "child_process";
17002
17001
  function readSessionPrRef() {
17003
17002
  try {
17004
- const branch2 = execSync46("git rev-parse --abbrev-ref HEAD", {
17003
+ const branch2 = execSync45("git rev-parse --abbrev-ref HEAD", {
17005
17004
  encoding: "utf8",
17006
17005
  stdio: ["pipe", "pipe", "pipe"]
17007
17006
  }).trim();
17008
17007
  if (!branch2 || branch2 === "HEAD") return null;
17009
17008
  const pr = JSON.parse(
17010
- execSync46(`gh pr view ${branch2} --json number,title,url,state`, {
17009
+ execSync45(`gh pr view ${branch2} --json number,title,url,state`, {
17011
17010
  encoding: "utf8",
17012
17011
  stdio: ["pipe", "pipe", "pipe"]
17013
17012
  })
@@ -17045,13 +17044,9 @@ async function raise(options2) {
17045
17044
  );
17046
17045
  process.exit(1);
17047
17046
  }
17048
- const args = existing !== null ? [
17049
- `gh pr edit ${existing}`,
17050
- `--title ${shellQuote(options2.title)}`,
17051
- `--body ${shellQuote(body)}`
17052
- ] : buildCreateArgs(options2.title, body, options2);
17047
+ const args = existing !== null ? buildEditArgs(existing, options2.title, body) : buildCreateArgs(options2.title, body, options2);
17053
17048
  try {
17054
- execSync47(args.join(" "), { stdio: "inherit" });
17049
+ execFileSync7("gh", args, { stdio: "inherit" });
17055
17050
  } catch {
17056
17051
  process.exit(1);
17057
17052
  }
@@ -17089,7 +17084,7 @@ function reply(commentId, body) {
17089
17084
  }
17090
17085
 
17091
17086
  // src/commands/prs/wontfix.ts
17092
- import { execSync as execSync48 } from "child_process";
17087
+ import { execSync as execSync46 } from "child_process";
17093
17088
  function validateReason(reason) {
17094
17089
  const lowerReason = reason.toLowerCase();
17095
17090
  if (lowerReason.includes("claude") || lowerReason.includes("opus")) {
@@ -17106,7 +17101,7 @@ function validateShaReferences(reason) {
17106
17101
  const invalidShas = [];
17107
17102
  for (const sha of shas) {
17108
17103
  try {
17109
- execSync48(`git cat-file -t ${sha}`, { stdio: "pipe" });
17104
+ execSync46(`git cat-file -t ${sha}`, { stdio: "pipe" });
17110
17105
  } catch {
17111
17106
  invalidShas.push(sha);
17112
17107
  }
@@ -17283,10 +17278,10 @@ import chalk158 from "chalk";
17283
17278
  import Enquirer2 from "enquirer";
17284
17279
 
17285
17280
  // src/commands/ravendb/searchItems.ts
17286
- import { execSync as execSync49 } from "child_process";
17281
+ import { execSync as execSync47 } from "child_process";
17287
17282
  import chalk157 from "chalk";
17288
17283
  function opExec(args) {
17289
- return execSync49(`op ${args}`, {
17284
+ return execSync47(`op ${args}`, {
17290
17285
  encoding: "utf8",
17291
17286
  stdio: ["pipe", "pipe", "pipe"]
17292
17287
  }).trim();
@@ -17438,7 +17433,7 @@ ${errorText}`
17438
17433
  }
17439
17434
 
17440
17435
  // src/commands/ravendb/resolveOpSecret.ts
17441
- import { execSync as execSync50 } from "child_process";
17436
+ import { execSync as execSync48 } from "child_process";
17442
17437
  import chalk162 from "chalk";
17443
17438
  function resolveOpSecret(reference) {
17444
17439
  if (!reference.startsWith("op://")) {
@@ -17446,7 +17441,7 @@ function resolveOpSecret(reference) {
17446
17441
  process.exit(1);
17447
17442
  }
17448
17443
  try {
17449
- return execSync50(`op read "${reference}"`, {
17444
+ return execSync48(`op read "${reference}"`, {
17450
17445
  encoding: "utf8",
17451
17446
  stdio: ["pipe", "pipe", "pipe"]
17452
17447
  }).trim();
@@ -17710,7 +17705,7 @@ Refactor check failed:
17710
17705
  }
17711
17706
 
17712
17707
  // src/commands/refactor/check/getViolations/index.ts
17713
- import { execSync as execSync51 } from "child_process";
17708
+ import { execSync as execSync49 } from "child_process";
17714
17709
  import fs24 from "fs";
17715
17710
  import { minimatch as minimatch6 } from "minimatch";
17716
17711
 
@@ -17760,7 +17755,7 @@ function getGitFiles(options2) {
17760
17755
  }
17761
17756
  const files = /* @__PURE__ */ new Set();
17762
17757
  if (options2.staged || options2.modified) {
17763
- const staged = execSync51("git diff --cached --name-only", {
17758
+ const staged = execSync49("git diff --cached --name-only", {
17764
17759
  encoding: "utf8"
17765
17760
  });
17766
17761
  for (const file of staged.trim().split("\n").filter(Boolean)) {
@@ -17768,7 +17763,7 @@ function getGitFiles(options2) {
17768
17763
  }
17769
17764
  }
17770
17765
  if (options2.unstaged || options2.modified) {
17771
- const unstaged = execSync51("git diff --name-only", { encoding: "utf8" });
17766
+ const unstaged = execSync49("git diff --name-only", { encoding: "utf8" });
17772
17767
  for (const file of unstaged.trim().split("\n").filter(Boolean)) {
17773
17768
  files.add(file);
17774
17769
  }
@@ -19311,7 +19306,7 @@ function registerRefactor(program2) {
19311
19306
  }
19312
19307
 
19313
19308
  // src/commands/review/review.ts
19314
- import { execFileSync as execFileSync6 } from "child_process";
19309
+ import { execFileSync as execFileSync8 } from "child_process";
19315
19310
 
19316
19311
  // src/commands/review/annotateDiffWithLineNumbers.ts
19317
19312
  var FILE_HEADER2 = /^\+\+\+ (?:b\/)?(.+)$/;
@@ -19446,9 +19441,9 @@ function buildReviewPaths(repoRoot, key) {
19446
19441
  }
19447
19442
 
19448
19443
  // src/commands/review/fetchExistingComments.ts
19449
- import { execSync as execSync52 } from "child_process";
19444
+ import { execSync as execSync50 } from "child_process";
19450
19445
  function fetchRawComments(org, repo, prNumber) {
19451
- const out = execSync52(
19446
+ const out = execSync50(
19452
19447
  `gh api --paginate repos/${org}/${repo}/pulls/${prNumber}/comments`,
19453
19448
  { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }
19454
19449
  );
@@ -19479,14 +19474,14 @@ function fetchExistingComments() {
19479
19474
  }
19480
19475
 
19481
19476
  // src/commands/review/gatherContext.ts
19482
- import { execSync as execSync55 } from "child_process";
19477
+ import { execSync as execSync53 } from "child_process";
19483
19478
 
19484
19479
  // src/commands/review/fetchPrDiff.ts
19485
- import { execSync as execSync53 } from "child_process";
19480
+ import { execSync as execSync51 } from "child_process";
19486
19481
  function fetchPrDiff(prNumber, baseSha, headSha) {
19487
19482
  const { org, repo } = getRepoInfo();
19488
19483
  try {
19489
- return execSync53(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
19484
+ return execSync51(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
19490
19485
  encoding: "utf8",
19491
19486
  maxBuffer: 256 * 1024 * 1024,
19492
19487
  stdio: ["ignore", "pipe", "pipe"]
@@ -19501,19 +19496,19 @@ function isDiffTooLarge(error) {
19501
19496
  }
19502
19497
  function fetchDiffViaGit(baseSha, headSha) {
19503
19498
  try {
19504
- execSync53(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
19499
+ execSync51(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
19505
19500
  } catch {
19506
19501
  }
19507
- return execSync53(`git diff ${baseSha}...${headSha}`, {
19502
+ return execSync51(`git diff ${baseSha}...${headSha}`, {
19508
19503
  encoding: "utf8",
19509
19504
  maxBuffer: 256 * 1024 * 1024
19510
19505
  });
19511
19506
  }
19512
19507
 
19513
19508
  // src/commands/review/fetchPrDiffInfo.ts
19514
- import { execSync as execSync54 } from "child_process";
19509
+ import { execSync as execSync52 } from "child_process";
19515
19510
  function getCurrentBranch3() {
19516
- return execSync54("git rev-parse --abbrev-ref HEAD", {
19511
+ return execSync52("git rev-parse --abbrev-ref HEAD", {
19517
19512
  encoding: "utf8"
19518
19513
  }).trim();
19519
19514
  }
@@ -19521,7 +19516,7 @@ function fetchPrDiffInfo() {
19521
19516
  const { org, repo } = getRepoInfo();
19522
19517
  const branch2 = getCurrentBranch3();
19523
19518
  const fields = "number,baseRefName,baseRefOid,headRefName,headRefOid";
19524
- const raw = execSync54(
19519
+ const raw = execSync52(
19525
19520
  `gh pr list --state open --head ${branch2} --json ${fields} -R ${org}/${repo}`,
19526
19521
  {
19527
19522
  encoding: "utf8",
@@ -19546,7 +19541,7 @@ function fetchPrDiffInfo() {
19546
19541
  }
19547
19542
  function fetchPrChangedFiles(prNumber) {
19548
19543
  const { org, repo } = getRepoInfo();
19549
- const out = execSync54(
19544
+ const out = execSync52(
19550
19545
  `gh api repos/${org}/${repo}/pulls/${prNumber}/files --paginate --jq ".[].filename"`,
19551
19546
  {
19552
19547
  encoding: "utf8",
@@ -19558,11 +19553,11 @@ function fetchPrChangedFiles(prNumber) {
19558
19553
 
19559
19554
  // src/commands/review/gatherContext.ts
19560
19555
  function gatherContext() {
19561
- const branch2 = execSync55("git rev-parse --abbrev-ref HEAD", {
19556
+ const branch2 = execSync53("git rev-parse --abbrev-ref HEAD", {
19562
19557
  encoding: "utf8"
19563
19558
  }).trim();
19564
- const sha = execSync55("git rev-parse HEAD", { encoding: "utf8" }).trim();
19565
- const shortSha = execSync55("git rev-parse --short=7 HEAD", {
19559
+ const sha = execSync53("git rev-parse HEAD", { encoding: "utf8" }).trim();
19560
+ const shortSha = execSync53("git rev-parse --short=7 HEAD", {
19566
19561
  encoding: "utf8"
19567
19562
  }).trim();
19568
19563
  const prInfo = fetchPrDiffInfo();
@@ -21009,7 +21004,7 @@ function validateOptions(options2) {
21009
21004
  }
21010
21005
  function checkoutPr(number) {
21011
21006
  try {
21012
- execFileSync6("gh", ["pr", "checkout", number], { stdio: "inherit" });
21007
+ execFileSync8("gh", ["pr", "checkout", number], { stdio: "inherit" });
21013
21008
  } catch {
21014
21009
  console.error(`gh pr checkout ${number} failed; aborting.`);
21015
21010
  process.exit(1);
@@ -22212,7 +22207,7 @@ import { mkdirSync as mkdirSync20 } from "fs";
22212
22207
  import { join as join57 } from "path";
22213
22208
 
22214
22209
  // src/commands/voice/checkLockFile.ts
22215
- import { execSync as execSync56 } from "child_process";
22210
+ import { execSync as execSync54 } from "child_process";
22216
22211
  import { existsSync as existsSync47, mkdirSync as mkdirSync19, readFileSync as readFileSync42, writeFileSync as writeFileSync37 } from "fs";
22217
22212
  import { join as join56 } from "path";
22218
22213
  function isProcessAlive2(pid) {
@@ -22241,7 +22236,7 @@ function bootstrapVenv() {
22241
22236
  if (existsSync47(getVenvPython())) return;
22242
22237
  console.log("Setting up Python environment...");
22243
22238
  const pythonDir = getPythonDir();
22244
- execSync56(
22239
+ execSync54(
22245
22240
  `uv sync --project "${pythonDir}" --extra runtime --no-install-project`,
22246
22241
  {
22247
22242
  stdio: "inherit",
@@ -22608,7 +22603,7 @@ async function auth() {
22608
22603
  }
22609
22604
 
22610
22605
  // src/commands/roam/postRoamActivity.ts
22611
- import { execFileSync as execFileSync7 } from "child_process";
22606
+ import { execFileSync as execFileSync9 } from "child_process";
22612
22607
  import { readdirSync as readdirSync11, readFileSync as readFileSync45, statSync as statSync8 } from "fs";
22613
22608
  import { join as join59 } from "path";
22614
22609
  function findPortFile(roamDir) {
@@ -22641,7 +22636,7 @@ function postRoamActivity(app, event) {
22641
22636
  }
22642
22637
  const url = `http://127.0.0.1:${port}/api/v1/activity/${app}/${event}?pid=${app === "codex" ? 99998 : 99999}`;
22643
22638
  try {
22644
- execFileSync7("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
22639
+ execFileSync9("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
22645
22640
  stdio: "ignore"
22646
22641
  });
22647
22642
  } catch {
@@ -22837,11 +22832,11 @@ function resolveParams(params, cliArgs) {
22837
22832
  }
22838
22833
 
22839
22834
  // src/commands/run/runPreCommands.ts
22840
- import { execSync as execSync57 } from "child_process";
22835
+ import { execSync as execSync55 } from "child_process";
22841
22836
  function runPreCommands(pre, cwd) {
22842
22837
  for (const cmd of pre) {
22843
22838
  try {
22844
- execSync57(cmd, { stdio: "inherit", cwd });
22839
+ execSync55(cmd, { stdio: "inherit", cwd });
22845
22840
  } catch (error) {
22846
22841
  const code = error && typeof error === "object" && "status" in error ? error.status : 1;
22847
22842
  process.exit(code);
@@ -22850,13 +22845,13 @@ function runPreCommands(pre, cwd) {
22850
22845
  }
22851
22846
 
22852
22847
  // src/commands/run/spawnRunCommand.ts
22853
- import { execFileSync as execFileSync8, spawn as spawn8 } from "child_process";
22848
+ import { execFileSync as execFileSync10, spawn as spawn8 } from "child_process";
22854
22849
  import { existsSync as existsSync50 } from "fs";
22855
22850
  import { dirname as dirname27, join as join60, resolve as resolve13 } from "path";
22856
22851
  function resolveCommand2(command) {
22857
22852
  if (process.platform !== "win32" || command !== "bash") return command;
22858
22853
  try {
22859
- const gitPath = execFileSync8("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
22854
+ const gitPath = execFileSync10("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
22860
22855
  const gitRoot = resolve13(dirname27(gitPath), "..");
22861
22856
  const gitBash = join60(gitRoot, "bin", "bash.exe");
22862
22857
  if (existsSync50(gitBash)) return gitBash;
@@ -23142,7 +23137,7 @@ function registerRun(program2) {
23142
23137
  }
23143
23138
 
23144
23139
  // src/commands/screenshot/index.ts
23145
- import { execSync as execSync58 } from "child_process";
23140
+ import { execSync as execSync56 } from "child_process";
23146
23141
  import { existsSync as existsSync52, mkdirSync as mkdirSync23, unlinkSync as unlinkSync19, writeFileSync as writeFileSync40 } from "fs";
23147
23142
  import { tmpdir as tmpdir7 } from "os";
23148
23143
  import { join as join63, resolve as resolve15 } from "path";
@@ -23285,7 +23280,7 @@ function runPowerShellScript(processName, outputPath) {
23285
23280
  const scriptPath = join63(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
23286
23281
  writeFileSync40(scriptPath, captureWindowPs1, "utf8");
23287
23282
  try {
23288
- execSync58(
23283
+ execSync56(
23289
23284
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
23290
23285
  { stdio: ["ignore", "pipe", "pipe"], encoding: "utf8" }
23291
23286
  );
@@ -23309,11 +23304,11 @@ function screenshot(processName) {
23309
23304
  }
23310
23305
 
23311
23306
  // src/commands/sessions/daemon/listDaemonPids.ts
23312
- import { execFileSync as execFileSync9 } from "child_process";
23307
+ import { execFileSync as execFileSync11 } from "child_process";
23313
23308
  function listDaemonPids() {
23314
23309
  if (process.platform === "win32") return [];
23315
23310
  try {
23316
- const out = execFileSync9("ps", ["-eo", "pid=,args="], {
23311
+ const out = execFileSync11("ps", ["-eo", "pid=,args="], {
23317
23312
  encoding: "utf8"
23318
23313
  });
23319
23314
  return out.split("\n").filter((line) => line.includes("assist") && / daemon run\b/.test(line)).map((line) => Number.parseInt(line.trim(), 10)).filter((pid) => Number.isInteger(pid));
@@ -26016,7 +26011,7 @@ function summaryPathFor(jsonlPath2) {
26016
26011
  }
26017
26012
 
26018
26013
  // src/commands/sessions/summarise/summariseSession.ts
26019
- import { execFileSync as execFileSync10 } from "child_process";
26014
+ import { execFileSync as execFileSync12 } from "child_process";
26020
26015
 
26021
26016
  // src/commands/sessions/summarise/iterateUserMessages.ts
26022
26017
  import * as fs37 from "fs";
@@ -26120,7 +26115,7 @@ function summariseSession(jsonlPath2) {
26120
26115
  }
26121
26116
  const prompt = buildPrompt3(firstMessage, backlogIds);
26122
26117
  try {
26123
- const output = execFileSync10("claude", ["-p", "--model", "haiku", prompt], {
26118
+ const output = execFileSync12("claude", ["-p", "--model", "haiku", prompt], {
26124
26119
  encoding: "utf8",
26125
26120
  timeout: 3e4,
26126
26121
  stdio: ["ignore", "pipe", "ignore"]
@@ -26530,7 +26525,7 @@ function syncCommands(claudeDir, targetBase) {
26530
26525
  }
26531
26526
 
26532
26527
  // src/commands/update.ts
26533
- import { execSync as execSync59 } from "child_process";
26528
+ import { execSync as execSync57 } from "child_process";
26534
26529
  import * as path60 from "path";
26535
26530
 
26536
26531
  // src/commands/restartDaemonAfterUpdate.ts
@@ -26554,7 +26549,7 @@ function isGlobalNpmInstall(dir) {
26554
26549
  if (resolved.split(path60.sep).includes("node_modules")) {
26555
26550
  return true;
26556
26551
  }
26557
- const globalPrefix = execSync59("npm prefix -g", { stdio: "pipe" }).toString().trim();
26552
+ const globalPrefix = execSync57("npm prefix -g", { stdio: "pipe" }).toString().trim();
26558
26553
  return resolved.toLowerCase().startsWith(path60.resolve(globalPrefix).toLowerCase());
26559
26554
  } catch {
26560
26555
  return false;
@@ -26565,18 +26560,18 @@ async function update2() {
26565
26560
  console.log(`Assist is installed at: ${installDir}`);
26566
26561
  if (isGitRepo(installDir)) {
26567
26562
  console.log("Detected git repo installation, pulling latest...");
26568
- execSync59("git pull", { cwd: installDir, stdio: "inherit" });
26563
+ execSync57("git pull", { cwd: installDir, stdio: "inherit" });
26569
26564
  console.log("Installing dependencies...");
26570
- execSync59("npm i", { cwd: installDir, stdio: "inherit" });
26565
+ execSync57("npm i", { cwd: installDir, stdio: "inherit" });
26571
26566
  console.log("Building...");
26572
- execSync59("npm run build", { cwd: installDir, stdio: "inherit" });
26567
+ execSync57("npm run build", { cwd: installDir, stdio: "inherit" });
26573
26568
  console.log("Syncing commands...");
26574
- execSync59("assist sync", { stdio: "inherit" });
26569
+ execSync57("assist sync", { stdio: "inherit" });
26575
26570
  } else if (isGlobalNpmInstall(installDir)) {
26576
26571
  console.log("Detected global npm installation, updating...");
26577
- execSync59("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
26572
+ execSync57("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
26578
26573
  console.log("Syncing commands...");
26579
- execSync59("assist sync", { stdio: "inherit" });
26574
+ execSync57("assist sync", { stdio: "inherit" });
26580
26575
  } else {
26581
26576
  console.error(
26582
26577
  "Could not determine installation method. Expected a git repo or global npm install."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.388.5",
3
+ "version": "0.389.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {