@staff0rd/assist 0.330.2 → 0.330.3

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 +98 -91
  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.330.2",
9
+ version: "0.330.3",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -4867,23 +4867,27 @@ async function handleIncompletePhase() {
4867
4867
  import { existsSync as existsSync21, readFileSync as readFileSync15 } from "fs";
4868
4868
 
4869
4869
  // src/commands/backlog/writeSignal.ts
4870
- import { writeFileSync as writeFileSync18 } from "fs";
4871
- import { join as join19 } from "path";
4870
+ import { mkdirSync as mkdirSync8, writeFileSync as writeFileSync18 } from "fs";
4871
+ import { homedir as homedir8 } from "os";
4872
+ import { dirname as dirname15, join as join19 } from "path";
4872
4873
  function getSignalPath() {
4873
4874
  const sessionId = process.env.ASSIST_SESSION_ID;
4874
- const filename = sessionId ? `.assist-signal-${sessionId}.json` : ".assist-signal.json";
4875
- return join19(getBacklogDir(), filename);
4875
+ if (!sessionId) return void 0;
4876
+ return join19(homedir8(), ".assist", "signals", `signal-${sessionId}.json`);
4876
4877
  }
4877
4878
  function writeSignal(event, data) {
4879
+ const path57 = getSignalPath();
4880
+ if (!path57) return;
4878
4881
  const sessionId = process.env.ASSIST_SESSION_ID;
4879
4882
  const signal = { event, ...sessionId && { sessionId }, ...data };
4880
- writeFileSync18(getSignalPath(), JSON.stringify(signal));
4883
+ mkdirSync8(dirname15(path57), { recursive: true });
4884
+ writeFileSync18(path57, JSON.stringify(signal));
4881
4885
  }
4882
4886
 
4883
4887
  // src/commands/backlog/readSignal.ts
4884
4888
  function readSignal() {
4885
4889
  const path57 = getSignalPath();
4886
- if (!existsSync21(path57)) return void 0;
4890
+ if (!path57 || !existsSync21(path57)) return void 0;
4887
4891
  try {
4888
4892
  return JSON.parse(readFileSync15(path57, "utf8"));
4889
4893
  } catch {
@@ -4894,7 +4898,7 @@ function readSignal() {
4894
4898
  // src/commands/backlog/resolvePhaseResult.ts
4895
4899
  function cleanupSignal() {
4896
4900
  const statusPath = getSignalPath();
4897
- if (existsSync22(statusPath)) {
4901
+ if (statusPath && existsSync22(statusPath)) {
4898
4902
  unlinkSync4(statusPath);
4899
4903
  }
4900
4904
  }
@@ -4904,7 +4908,8 @@ async function isTerminalStatus(itemId) {
4904
4908
  return item?.status === "done" || item?.status === "wontdo";
4905
4909
  }
4906
4910
  async function resolvePhaseResult(phaseIndex, itemId) {
4907
- if (!existsSync22(getSignalPath())) {
4911
+ const signalPath = getSignalPath();
4912
+ if (!signalPath || !existsSync22(signalPath)) {
4908
4913
  if (await isTerminalStatus(itemId)) return -1;
4909
4914
  const action = await handleIncompletePhase();
4910
4915
  if (action === "abort") return -1;
@@ -4929,6 +4934,7 @@ Phase ${phaseNumber} completed.`));
4929
4934
  import { existsSync as existsSync23, unwatchFile, watchFile } from "fs";
4930
4935
  function watchForMarker(child, options2) {
4931
4936
  const statusPath = getSignalPath();
4937
+ if (!statusPath) return;
4932
4938
  watchFile(statusPath, { interval: 1e3 }, () => {
4933
4939
  if (!existsSync23(statusPath)) return;
4934
4940
  const signal = readSignal();
@@ -4939,7 +4945,8 @@ function watchForMarker(child, options2) {
4939
4945
  });
4940
4946
  }
4941
4947
  function stopWatching() {
4942
- unwatchFile(getSignalPath());
4948
+ const statusPath = getSignalPath();
4949
+ if (statusPath) unwatchFile(statusPath);
4943
4950
  }
4944
4951
 
4945
4952
  // src/commands/backlog/executePhase.ts
@@ -5343,10 +5350,10 @@ import { WebSocketServer } from "ws";
5343
5350
 
5344
5351
  // src/shared/getInstallDir.ts
5345
5352
  import { execSync as execSync19 } from "child_process";
5346
- import { dirname as dirname15, resolve as resolve7 } from "path";
5353
+ import { dirname as dirname16, resolve as resolve7 } from "path";
5347
5354
  import { fileURLToPath as fileURLToPath2 } from "url";
5348
5355
  var __filename2 = fileURLToPath2(import.meta.url);
5349
- var __dirname3 = dirname15(__filename2);
5356
+ var __dirname3 = dirname16(__filename2);
5350
5357
  function getInstallDir() {
5351
5358
  return resolve7(__dirname3, "..");
5352
5359
  }
@@ -5489,7 +5496,7 @@ function startWebServer(label2, port, handler, initialPath, open = true) {
5489
5496
  import { spawn as spawn4 } from "child_process";
5490
5497
  import {
5491
5498
  closeSync,
5492
- mkdirSync as mkdirSync8,
5499
+ mkdirSync as mkdirSync9,
5493
5500
  openSync,
5494
5501
  statSync,
5495
5502
  unlinkSync as unlinkSync5,
@@ -5500,7 +5507,7 @@ var RETRY_DELAY_MS = 200;
5500
5507
  var STALE_LOCK_MS = SPAWN_TIMEOUT_MS + 5e3;
5501
5508
  async function ensureDaemonRunning(reason = "unspecified") {
5502
5509
  if (await isDaemonRunning()) return;
5503
- mkdirSync8(daemonPaths.dir, { recursive: true });
5510
+ mkdirSync9(daemonPaths.dir, { recursive: true });
5504
5511
  const holdsLock = acquireSpawnLock();
5505
5512
  if (holdsLock) spawnDaemon(reason);
5506
5513
  try {
@@ -5572,10 +5579,10 @@ import { createRequire as createRequire2 } from "module";
5572
5579
  // src/shared/createBundleHandler.ts
5573
5580
  import { createHash } from "crypto";
5574
5581
  import { readFileSync as readFileSync16 } from "fs";
5575
- import { dirname as dirname16, join as join20 } from "path";
5582
+ import { dirname as dirname17, join as join20 } from "path";
5576
5583
  import { fileURLToPath as fileURLToPath3 } from "url";
5577
5584
  function createBundleHandler(importMetaUrl, bundlePath) {
5578
- const dir = dirname16(fileURLToPath3(importMetaUrl));
5585
+ const dir = dirname17(fileURLToPath3(importMetaUrl));
5579
5586
  let cache;
5580
5587
  return (req, res) => {
5581
5588
  if (!cache) {
@@ -8571,13 +8578,13 @@ function findBuiltinDenyRaw(rawCommand) {
8571
8578
  }
8572
8579
 
8573
8580
  // src/commands/cliHook/logDeniedToolCall.ts
8574
- import { mkdirSync as mkdirSync9 } from "fs";
8575
- import { homedir as homedir8 } from "os";
8581
+ import { mkdirSync as mkdirSync10 } from "fs";
8582
+ import { homedir as homedir9 } from "os";
8576
8583
  import { join as join22 } from "path";
8577
8584
  import Database from "better-sqlite3";
8578
8585
  var _db;
8579
8586
  function getDbDir() {
8580
- return join22(homedir8(), ".assist");
8587
+ return join22(homedir9(), ".assist");
8581
8588
  }
8582
8589
  function initSchema2(db) {
8583
8590
  db.exec(`
@@ -8595,7 +8602,7 @@ function initSchema2(db) {
8595
8602
  function openPromptsDb(dir) {
8596
8603
  if (_db) return _db;
8597
8604
  const dbDir = dir ?? getDbDir();
8598
- mkdirSync9(dbDir, { recursive: true });
8605
+ mkdirSync10(dbDir, { recursive: true });
8599
8606
  const db = new Database(join22(dbDir, "assist.db"));
8600
8607
  db.pragma("journal_mode = WAL");
8601
8608
  initSchema2(db);
@@ -8699,10 +8706,10 @@ function extractGraphqlQuery(args) {
8699
8706
 
8700
8707
  // src/shared/loadCliReads.ts
8701
8708
  import { existsSync as existsSync24, readFileSync as readFileSync19, writeFileSync as writeFileSync20 } from "fs";
8702
- import { dirname as dirname17, resolve as resolve8 } from "path";
8709
+ import { dirname as dirname18, resolve as resolve8 } from "path";
8703
8710
  import { fileURLToPath as fileURLToPath4 } from "url";
8704
8711
  var __filename3 = fileURLToPath4(import.meta.url);
8705
- var __dirname4 = dirname17(__filename3);
8712
+ var __dirname4 = dirname18(__filename3);
8706
8713
  function packageRoot() {
8707
8714
  return __dirname4;
8708
8715
  }
@@ -8755,11 +8762,11 @@ function findCliWrite(command) {
8755
8762
 
8756
8763
  // src/shared/readSettingsPerms.ts
8757
8764
  import { existsSync as existsSync25, readFileSync as readFileSync20 } from "fs";
8758
- import { homedir as homedir9 } from "os";
8765
+ import { homedir as homedir10 } from "os";
8759
8766
  import { join as join23 } from "path";
8760
8767
  function readSettingsPerms(key) {
8761
8768
  const paths = [
8762
- join23(homedir9(), ".claude", "settings.json"),
8769
+ join23(homedir10(), ".claude", "settings.json"),
8763
8770
  join23(process.cwd(), ".claude", "settings.json"),
8764
8771
  join23(process.cwd(), ".claude", "settings.local.json")
8765
8772
  ];
@@ -9034,8 +9041,8 @@ ${reasons.join("\n")}`);
9034
9041
  }
9035
9042
 
9036
9043
  // src/commands/permitCliReads/index.ts
9037
- import { existsSync as existsSync26, mkdirSync as mkdirSync10, readFileSync as readFileSync21, writeFileSync as writeFileSync21 } from "fs";
9038
- import { homedir as homedir10 } from "os";
9044
+ import { existsSync as existsSync26, mkdirSync as mkdirSync11, readFileSync as readFileSync21, writeFileSync as writeFileSync21 } from "fs";
9045
+ import { homedir as homedir11 } from "os";
9039
9046
  import { join as join24 } from "path";
9040
9047
 
9041
9048
  // src/shared/checkCliAvailable.ts
@@ -9325,7 +9332,7 @@ function updateSettings(cli, commands) {
9325
9332
  // src/commands/permitCliReads/index.ts
9326
9333
  function logPath(cli) {
9327
9334
  const safeName = cli.replace(/\s+/g, "-");
9328
- return join24(homedir10(), ".assist", `cli-discover-${safeName}.log`);
9335
+ return join24(homedir11(), ".assist", `cli-discover-${safeName}.log`);
9329
9336
  }
9330
9337
  function readCache(cli) {
9331
9338
  const path57 = logPath(cli);
@@ -9333,8 +9340,8 @@ function readCache(cli) {
9333
9340
  return readFileSync21(path57, "utf8");
9334
9341
  }
9335
9342
  function writeCache(cli, output) {
9336
- const dir = join24(homedir10(), ".assist");
9337
- mkdirSync10(dir, { recursive: true });
9343
+ const dir = join24(homedir11(), ".assist");
9344
+ mkdirSync11(dir, { recursive: true });
9338
9345
  writeFileSync21(logPath(cli), output);
9339
9346
  }
9340
9347
  async function permitCliReads(cli, options2 = { noCache: false }) {
@@ -9466,10 +9473,10 @@ import { existsSync as existsSync27, readFileSync as readFileSync22, unlinkSync
9466
9473
  import chalk94 from "chalk";
9467
9474
 
9468
9475
  // src/commands/codeComment/getRestrictedDir.ts
9469
- import { homedir as homedir11 } from "os";
9476
+ import { homedir as homedir12 } from "os";
9470
9477
  import { join as join25 } from "path";
9471
9478
  function getRestrictedDir() {
9472
- return join25(homedir11(), ".assist", "restricted");
9479
+ return join25(homedir12(), ".assist", "restricted");
9473
9480
  }
9474
9481
  function getPinStatePath(pin) {
9475
9482
  return join25(getRestrictedDir(), `code-comment-${pin}.json`);
@@ -9573,11 +9580,11 @@ function validateCommentText(raw) {
9573
9580
  }
9574
9581
 
9575
9582
  // src/commands/codeComment/issuePin.ts
9576
- import { mkdirSync as mkdirSync11, writeFileSync as writeFileSync23 } from "fs";
9583
+ import { mkdirSync as mkdirSync12, writeFileSync as writeFileSync23 } from "fs";
9577
9584
  import { randomInt } from "crypto";
9578
9585
  function issuePin(file, lineNumber, text6) {
9579
9586
  const pin = generatePin();
9580
- mkdirSync11(getRestrictedDir(), { recursive: true });
9587
+ mkdirSync12(getRestrictedDir(), { recursive: true });
9581
9588
  sweepRestrictedDir();
9582
9589
  writeFileSync23(
9583
9590
  getPinStatePath(pin),
@@ -10409,9 +10416,9 @@ import { execFileSync as execFileSync2 } from "child_process";
10409
10416
  import { basename as basename4 } from "path";
10410
10417
 
10411
10418
  // src/commands/devlog/loadBlogSkipDays.ts
10412
- import { homedir as homedir12 } from "os";
10419
+ import { homedir as homedir13 } from "os";
10413
10420
  import { join as join27 } from "path";
10414
- var BLOG_REPO_ROOT = join27(homedir12(), "git/blog");
10421
+ var BLOG_REPO_ROOT = join27(homedir13(), "git/blog");
10415
10422
  function loadBlogSkipDays(repoName) {
10416
10423
  const config = loadRawYaml(join27(BLOG_REPO_ROOT, "assist.yml"));
10417
10424
  const devlog = config.devlog;
@@ -11328,7 +11335,7 @@ import chalk121 from "chalk";
11328
11335
 
11329
11336
  // src/commands/dotnet/findSolution.ts
11330
11337
  import { readdirSync as readdirSync5 } from "fs";
11331
- import { dirname as dirname18, join as join32 } from "path";
11338
+ import { dirname as dirname19, join as join32 } from "path";
11332
11339
  import chalk120 from "chalk";
11333
11340
  function findSlnInDir(dir) {
11334
11341
  try {
@@ -11353,7 +11360,7 @@ function findSolution() {
11353
11360
  process.exit(1);
11354
11361
  }
11355
11362
  if (current === ceiling) break;
11356
- current = dirname18(current);
11363
+ current = dirname19(current);
11357
11364
  }
11358
11365
  console.error(chalk120.red("No .sln file found between cwd and repo root"));
11359
11366
  process.exit(1);
@@ -12251,11 +12258,11 @@ function acceptanceCriteria(issueKey) {
12251
12258
  import { execSync as execSync30 } from "child_process";
12252
12259
 
12253
12260
  // src/shared/loadJson.ts
12254
- import { existsSync as existsSync35, mkdirSync as mkdirSync12, readFileSync as readFileSync30, writeFileSync as writeFileSync27 } from "fs";
12255
- import { homedir as homedir13 } from "os";
12261
+ import { existsSync as existsSync35, mkdirSync as mkdirSync13, readFileSync as readFileSync30, writeFileSync as writeFileSync27 } from "fs";
12262
+ import { homedir as homedir14 } from "os";
12256
12263
  import { join as join37 } from "path";
12257
12264
  function getStoreDir() {
12258
- return join37(homedir13(), ".assist");
12265
+ return join37(homedir14(), ".assist");
12259
12266
  }
12260
12267
  function getStorePath(filename) {
12261
12268
  return join37(getStoreDir(), filename);
@@ -12274,7 +12281,7 @@ function loadJson(filename) {
12274
12281
  function saveJson(filename, data) {
12275
12282
  const dir = getStoreDir();
12276
12283
  if (!existsSync35(dir)) {
12277
- mkdirSync12(dir, { recursive: true });
12284
+ mkdirSync13(dir, { recursive: true });
12278
12285
  }
12279
12286
  writeFileSync27(getStorePath(filename), JSON.stringify(data, null, 2));
12280
12287
  }
@@ -12443,7 +12450,7 @@ function registerList(program2) {
12443
12450
  }
12444
12451
 
12445
12452
  // src/commands/mermaid/index.ts
12446
- import { mkdirSync as mkdirSync13, readdirSync as readdirSync7 } from "fs";
12453
+ import { mkdirSync as mkdirSync14, readdirSync as readdirSync7 } from "fs";
12447
12454
  import { resolve as resolve11 } from "path";
12448
12455
  import chalk132 from "chalk";
12449
12456
 
@@ -12512,7 +12519,7 @@ function extractMermaidBlocks(markdown) {
12512
12519
  async function mermaidExport(file, options2 = {}) {
12513
12520
  const { mermaid } = loadConfig();
12514
12521
  const outDir = resolve11(process.cwd(), options2.out ?? ".");
12515
- mkdirSync13(outDir, { recursive: true });
12522
+ mkdirSync14(outDir, { recursive: true });
12516
12523
  if (options2.index !== void 0) {
12517
12524
  if (!Number.isInteger(options2.index) || options2.index < 1) {
12518
12525
  console.error(
@@ -12552,7 +12559,7 @@ function registerMermaid(program2) {
12552
12559
  // src/commands/netcap/netcap.ts
12553
12560
  import { mkdir as mkdir3 } from "fs/promises";
12554
12561
  import { createServer as createServer2 } from "http";
12555
- import { dirname as dirname20 } from "path";
12562
+ import { dirname as dirname21 } from "path";
12556
12563
  import chalk134 from "chalk";
12557
12564
 
12558
12565
  // src/commands/netcap/corsHeaders.ts
@@ -12635,9 +12642,9 @@ import { join as join39 } from "path";
12635
12642
  import chalk133 from "chalk";
12636
12643
 
12637
12644
  // src/commands/netcap/netcapExtensionDir.ts
12638
- import { dirname as dirname19, join as join38 } from "path";
12645
+ import { dirname as dirname20, join as join38 } from "path";
12639
12646
  import { fileURLToPath as fileURLToPath5 } from "url";
12640
- var moduleDir = dirname19(fileURLToPath5(import.meta.url));
12647
+ var moduleDir = dirname20(fileURLToPath5(import.meta.url));
12641
12648
  function netcapExtensionDir() {
12642
12649
  return join38(moduleDir, "commands", "netcap", "netcap-extension");
12643
12650
  }
@@ -12697,10 +12704,10 @@ async function prepareExtensionForLoad(port, filter = "") {
12697
12704
  import { isAbsolute, join as join41, resolve as resolve12 } from "path";
12698
12705
 
12699
12706
  // src/commands/netcap/defaultCapturePath.ts
12700
- import { homedir as homedir14 } from "os";
12707
+ import { homedir as homedir15 } from "os";
12701
12708
  import { join as join40 } from "path";
12702
12709
  function defaultCapturePath() {
12703
- return join40(homedir14(), ".assist", "netcap", "capture.jsonl");
12710
+ return join40(homedir15(), ".assist", "netcap", "capture.jsonl");
12704
12711
  }
12705
12712
 
12706
12713
  // src/commands/netcap/resolveNetcapOutPath.ts
@@ -12715,7 +12722,7 @@ async function netcap(options2) {
12715
12722
  const port = Number(options2.port);
12716
12723
  const outPath = resolveNetcapOutPath(options2.out);
12717
12724
  const filter = options2.filter ?? "";
12718
- await mkdir3(dirname20(outPath), { recursive: true });
12725
+ await mkdir3(dirname21(outPath), { recursive: true });
12719
12726
  const extensionPath = await prepareExtensionForLoad(port, filter);
12720
12727
  let count6 = 0;
12721
12728
  const handler = createNetcapHandler({
@@ -13754,7 +13761,7 @@ function fixed(commentId, sha) {
13754
13761
  }
13755
13762
 
13756
13763
  // src/commands/prs/listComments/index.ts
13757
- import { existsSync as existsSync37, mkdirSync as mkdirSync14, writeFileSync as writeFileSync32 } from "fs";
13764
+ import { existsSync as existsSync37, mkdirSync as mkdirSync15, writeFileSync as writeFileSync32 } from "fs";
13758
13765
  import { join as join46 } from "path";
13759
13766
  import { stringify } from "yaml";
13760
13767
 
@@ -13881,7 +13888,7 @@ function printComments2(result) {
13881
13888
  function writeCommentsCache(prNumber, comments3) {
13882
13889
  const assistDir = join46(process.cwd(), ".assist");
13883
13890
  if (!existsSync37(assistDir)) {
13884
- mkdirSync14(assistDir, { recursive: true });
13891
+ mkdirSync15(assistDir, { recursive: true });
13885
13892
  }
13886
13893
  const cacheData = {
13887
13894
  prNumber,
@@ -16426,11 +16433,11 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
16426
16433
  }
16427
16434
 
16428
16435
  // src/commands/review/buildReviewPaths.ts
16429
- import { homedir as homedir15 } from "os";
16436
+ import { homedir as homedir16 } from "os";
16430
16437
  import { basename as basename7, join as join47 } from "path";
16431
16438
  function buildReviewPaths(repoRoot, key) {
16432
16439
  const reviewDir = join47(
16433
- homedir15(),
16440
+ homedir16(),
16434
16441
  ".assist",
16435
16442
  "reviews",
16436
16443
  basename7(repoRoot),
@@ -16976,14 +16983,14 @@ async function handlePostSynthesis(synthesisPath, options2) {
16976
16983
  }
16977
16984
 
16978
16985
  // src/commands/review/prepareReviewDir.ts
16979
- import { existsSync as existsSync38, mkdirSync as mkdirSync15, unlinkSync as unlinkSync14, writeFileSync as writeFileSync33 } from "fs";
16986
+ import { existsSync as existsSync38, mkdirSync as mkdirSync16, unlinkSync as unlinkSync14, writeFileSync as writeFileSync33 } from "fs";
16980
16987
  function clearReviewFiles(paths) {
16981
16988
  for (const path57 of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
16982
16989
  if (existsSync38(path57)) unlinkSync14(path57);
16983
16990
  }
16984
16991
  }
16985
16992
  function prepareReviewDir(paths, requestBody, force) {
16986
- mkdirSync15(paths.reviewDir, { recursive: true });
16993
+ mkdirSync16(paths.reviewDir, { recursive: true });
16987
16994
  if (force) clearReviewFiles(paths);
16988
16995
  writeFileSync33(paths.requestPath, requestBody);
16989
16996
  }
@@ -18777,7 +18784,7 @@ async function configure() {
18777
18784
  import { existsSync as existsSync43 } from "fs";
18778
18785
 
18779
18786
  // src/commands/transcript/format/fixInvalidDatePrefixes/index.ts
18780
- import { dirname as dirname22, join as join50 } from "path";
18787
+ import { dirname as dirname23, join as join50 } from "path";
18781
18788
 
18782
18789
  // src/commands/transcript/format/fixInvalidDatePrefixes/promptForDateFix.ts
18783
18790
  import { renameSync as renameSync2 } from "fs";
@@ -18827,11 +18834,11 @@ async function fixInvalidDatePrefixes(vttFiles) {
18827
18834
  for (let i = 0; i < vttFiles.length; i++) {
18828
18835
  const vttFile = vttFiles[i];
18829
18836
  if (!isValidDatePrefix(vttFile.filename)) {
18830
- const vttFileDir = dirname22(vttFile.absolutePath);
18837
+ const vttFileDir = dirname23(vttFile.absolutePath);
18831
18838
  const newFilename = await promptForDateFix(vttFile.filename, vttFileDir);
18832
18839
  if (newFilename) {
18833
18840
  const newRelativePath = join50(
18834
- dirname22(vttFile.relativePath),
18841
+ dirname23(vttFile.relativePath),
18835
18842
  newFilename
18836
18843
  );
18837
18844
  vttFiles[i] = {
@@ -18848,8 +18855,8 @@ async function fixInvalidDatePrefixes(vttFiles) {
18848
18855
  }
18849
18856
 
18850
18857
  // src/commands/transcript/format/processVttFile/index.ts
18851
- import { existsSync as existsSync42, mkdirSync as mkdirSync16, readFileSync as readFileSync36, writeFileSync as writeFileSync35 } from "fs";
18852
- import { basename as basename9, dirname as dirname23, join as join51 } from "path";
18858
+ import { existsSync as existsSync42, mkdirSync as mkdirSync17, readFileSync as readFileSync36, writeFileSync as writeFileSync35 } from "fs";
18859
+ import { basename as basename9, dirname as dirname24, join as join51 } from "path";
18853
18860
 
18854
18861
  // src/commands/transcript/cleanText.ts
18855
18862
  function cleanText(text6) {
@@ -19063,7 +19070,7 @@ function resolveOutputDir(relativeDir, transcriptsDir) {
19063
19070
  }
19064
19071
  function buildOutputPaths(vttFile, transcriptsDir) {
19065
19072
  const mdFile = toMdFilename(vttFile.filename);
19066
- const relativeDir = dirname23(vttFile.relativePath);
19073
+ const relativeDir = dirname24(vttFile.relativePath);
19067
19074
  const outputDir = resolveOutputDir(relativeDir, transcriptsDir);
19068
19075
  const outputPath = join51(outputDir, mdFile);
19069
19076
  return { outputDir, outputPath, mdFile, relativeDir };
@@ -19074,7 +19081,7 @@ function logSkipped(relativeDir, mdFile) {
19074
19081
  }
19075
19082
  function ensureDirectory(dir, label2) {
19076
19083
  if (!existsSync42(dir)) {
19077
- mkdirSync16(dir, { recursive: true });
19084
+ mkdirSync17(dir, { recursive: true });
19078
19085
  console.log(`Created ${label2}: ${dir}`);
19079
19086
  }
19080
19087
  }
@@ -19168,17 +19175,17 @@ async function format() {
19168
19175
 
19169
19176
  // src/commands/transcript/summarise/index.ts
19170
19177
  import { existsSync as existsSync45 } from "fs";
19171
- import { basename as basename10, dirname as dirname25, join as join53, relative as relative3 } from "path";
19178
+ import { basename as basename10, dirname as dirname26, join as join53, relative as relative3 } from "path";
19172
19179
 
19173
19180
  // src/commands/transcript/summarise/processStagedFile/index.ts
19174
19181
  import {
19175
19182
  existsSync as existsSync44,
19176
- mkdirSync as mkdirSync17,
19183
+ mkdirSync as mkdirSync18,
19177
19184
  readFileSync as readFileSync37,
19178
19185
  renameSync as renameSync3,
19179
19186
  rmSync as rmSync3
19180
19187
  } from "fs";
19181
- import { dirname as dirname24, join as join52 } from "path";
19188
+ import { dirname as dirname25, join as join52 } from "path";
19182
19189
 
19183
19190
  // src/commands/transcript/summarise/processStagedFile/validateStagedContent.ts
19184
19191
  import chalk178 from "chalk";
@@ -19232,9 +19239,9 @@ function processStagedFile() {
19232
19239
  process.exit(1);
19233
19240
  }
19234
19241
  const destPath = join52(summaryDir, matchingTranscript.relativePath);
19235
- const destDir = dirname24(destPath);
19242
+ const destDir = dirname25(destPath);
19236
19243
  if (!existsSync44(destDir)) {
19237
- mkdirSync17(destDir, { recursive: true });
19244
+ mkdirSync18(destDir, { recursive: true });
19238
19245
  }
19239
19246
  renameSync3(stagedFile.absolutePath, destPath);
19240
19247
  const remaining = findMdFilesRecursive(STAGING_DIR);
@@ -19246,7 +19253,7 @@ function processStagedFile() {
19246
19253
 
19247
19254
  // src/commands/transcript/summarise/index.ts
19248
19255
  function buildRelativeKey(relativePath, baseName) {
19249
- const relDir = dirname25(relativePath);
19256
+ const relDir = dirname26(relativePath);
19250
19257
  return relDir === "." ? baseName : join53(relDir, baseName);
19251
19258
  }
19252
19259
  function buildSummaryIndex(summaryDir) {
@@ -19282,7 +19289,7 @@ function summarise2() {
19282
19289
  const next3 = missing[0];
19283
19290
  const outputFilename = `${getTranscriptBaseName(next3.filename)}.md`;
19284
19291
  const outputPath = join53(STAGING_DIR, outputFilename);
19285
- const summaryFileDir = join53(summaryDir, dirname25(next3.relativePath));
19292
+ const summaryFileDir = join53(summaryDir, dirname26(next3.relativePath));
19286
19293
  const relativeTranscriptPath = encodeURI(
19287
19294
  relative3(summaryFileDir, next3.absolutePath).replace(/\\/g, "/")
19288
19295
  );
@@ -19342,11 +19349,11 @@ import { spawnSync as spawnSync5 } from "child_process";
19342
19349
  import { join as join55 } from "path";
19343
19350
 
19344
19351
  // src/commands/voice/shared.ts
19345
- import { homedir as homedir16 } from "os";
19346
- import { dirname as dirname26, join as join54 } from "path";
19352
+ import { homedir as homedir17 } from "os";
19353
+ import { dirname as dirname27, join as join54 } from "path";
19347
19354
  import { fileURLToPath as fileURLToPath6 } from "url";
19348
- var __dirname5 = dirname26(fileURLToPath6(import.meta.url));
19349
- var VOICE_DIR = join54(homedir16(), ".assist", "voice");
19355
+ var __dirname5 = dirname27(fileURLToPath6(import.meta.url));
19356
+ var VOICE_DIR = join54(homedir17(), ".assist", "voice");
19350
19357
  var voicePaths = {
19351
19358
  dir: VOICE_DIR,
19352
19359
  pid: join54(VOICE_DIR, "voice.pid"),
@@ -19404,12 +19411,12 @@ function logs(options2) {
19404
19411
 
19405
19412
  // src/commands/voice/setup.ts
19406
19413
  import { spawnSync as spawnSync6 } from "child_process";
19407
- import { mkdirSync as mkdirSync19 } from "fs";
19414
+ import { mkdirSync as mkdirSync20 } from "fs";
19408
19415
  import { join as join57 } from "path";
19409
19416
 
19410
19417
  // src/commands/voice/checkLockFile.ts
19411
19418
  import { execSync as execSync48 } from "child_process";
19412
- import { existsSync as existsSync47, mkdirSync as mkdirSync18, readFileSync as readFileSync39, writeFileSync as writeFileSync36 } from "fs";
19419
+ import { existsSync as existsSync47, mkdirSync as mkdirSync19, readFileSync as readFileSync39, writeFileSync as writeFileSync36 } from "fs";
19413
19420
  import { join as join56 } from "path";
19414
19421
  function isProcessAlive2(pid) {
19415
19422
  try {
@@ -19447,7 +19454,7 @@ function bootstrapVenv() {
19447
19454
  }
19448
19455
  function writeLockFile(pid) {
19449
19456
  const lockFile = getLockFile();
19450
- mkdirSync18(join56(lockFile, ".."), { recursive: true });
19457
+ mkdirSync19(join56(lockFile, ".."), { recursive: true });
19451
19458
  writeFileSync36(
19452
19459
  lockFile,
19453
19460
  JSON.stringify({
@@ -19460,7 +19467,7 @@ function writeLockFile(pid) {
19460
19467
 
19461
19468
  // src/commands/voice/setup.ts
19462
19469
  function setup() {
19463
- mkdirSync19(voicePaths.dir, { recursive: true });
19470
+ mkdirSync20(voicePaths.dir, { recursive: true });
19464
19471
  bootstrapVenv();
19465
19472
  console.log("\nDownloading models...\n");
19466
19473
  const script = join57(getPythonDir(), "setup_models.py");
@@ -19476,7 +19483,7 @@ function setup() {
19476
19483
 
19477
19484
  // src/commands/voice/start.ts
19478
19485
  import { spawn as spawn7 } from "child_process";
19479
- import { mkdirSync as mkdirSync20, writeFileSync as writeFileSync37 } from "fs";
19486
+ import { mkdirSync as mkdirSync21, writeFileSync as writeFileSync37 } from "fs";
19480
19487
  import { join as join58 } from "path";
19481
19488
 
19482
19489
  // src/commands/voice/buildDaemonEnv.ts
@@ -19510,7 +19517,7 @@ function spawnBackground(python, script, env) {
19510
19517
  console.log(`Voice daemon started (PID ${pid})`);
19511
19518
  }
19512
19519
  function start2(options2) {
19513
- mkdirSync20(voicePaths.dir, { recursive: true });
19520
+ mkdirSync21(voicePaths.dir, { recursive: true });
19514
19521
  checkLockFile();
19515
19522
  bootstrapVenv();
19516
19523
  const debug = options2.debug || options2.foreground || process.platform === "win32";
@@ -19929,12 +19936,12 @@ function runPreCommands(pre, cwd) {
19929
19936
  // src/commands/run/spawnRunCommand.ts
19930
19937
  import { execFileSync as execFileSync8, spawn as spawn8 } from "child_process";
19931
19938
  import { existsSync as existsSync50 } from "fs";
19932
- import { dirname as dirname27, join as join60, resolve as resolve13 } from "path";
19939
+ import { dirname as dirname28, join as join60, resolve as resolve13 } from "path";
19933
19940
  function resolveCommand2(command) {
19934
19941
  if (process.platform !== "win32" || command !== "bash") return command;
19935
19942
  try {
19936
19943
  const gitPath = execFileSync8("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
19937
- const gitRoot = resolve13(dirname27(gitPath), "..");
19944
+ const gitRoot = resolve13(dirname28(gitPath), "..");
19938
19945
  const gitBash = join60(gitRoot, "bin", "bash.exe");
19939
19946
  if (existsSync50(gitBash)) return gitBash;
19940
19947
  } catch {
@@ -20021,7 +20028,7 @@ async function run3(name, args) {
20021
20028
  }
20022
20029
 
20023
20030
  // src/commands/run/add.ts
20024
- import { mkdirSync as mkdirSync21, writeFileSync as writeFileSync38 } from "fs";
20031
+ import { mkdirSync as mkdirSync22, writeFileSync as writeFileSync38 } from "fs";
20025
20032
  import { join as join61 } from "path";
20026
20033
 
20027
20034
  // src/commands/run/extractOption.ts
@@ -20084,7 +20091,7 @@ function saveNewRunConfig(name, command, args, cwd) {
20084
20091
  }
20085
20092
  function createCommandFile(name) {
20086
20093
  const dir = join61(".claude", "commands");
20087
- mkdirSync21(dir, { recursive: true });
20094
+ mkdirSync22(dir, { recursive: true });
20088
20095
  const content = `---
20089
20096
  description: Run ${name}
20090
20097
  ---
@@ -20203,7 +20210,7 @@ function registerRun(program2) {
20203
20210
 
20204
20211
  // src/commands/screenshot/index.ts
20205
20212
  import { execSync as execSync50 } from "child_process";
20206
- import { existsSync as existsSync52, mkdirSync as mkdirSync22, unlinkSync as unlinkSync19, writeFileSync as writeFileSync39 } from "fs";
20213
+ import { existsSync as existsSync52, mkdirSync as mkdirSync23, unlinkSync as unlinkSync19, writeFileSync as writeFileSync39 } from "fs";
20207
20214
  import { tmpdir as tmpdir7 } from "os";
20208
20215
  import { join as join63, resolve as resolve15 } from "path";
20209
20216
  import chalk180 from "chalk";
@@ -20336,7 +20343,7 @@ Write-Output $OutputPath
20336
20343
  // src/commands/screenshot/index.ts
20337
20344
  function buildOutputPath(outputDir, processName) {
20338
20345
  if (!existsSync52(outputDir)) {
20339
- mkdirSync22(outputDir, { recursive: true });
20346
+ mkdirSync23(outputDir, { recursive: true });
20340
20347
  }
20341
20348
  const timestamp4 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
20342
20349
  return resolve15(outputDir, `${processName}-${timestamp4}.png`);
@@ -20596,7 +20603,7 @@ function requestDrain(socket) {
20596
20603
  }
20597
20604
 
20598
20605
  // src/commands/sessions/daemon/runDaemon.ts
20599
- import { mkdirSync as mkdirSync24 } from "fs";
20606
+ import { mkdirSync as mkdirSync25 } from "fs";
20600
20607
 
20601
20608
  // src/commands/sessions/daemon/createAutoExit.ts
20602
20609
  var DEFAULT_GRACE_MS = 6e4;
@@ -21237,8 +21244,8 @@ function resumeSession(id2, sessionId, cwd, name) {
21237
21244
  }
21238
21245
 
21239
21246
  // src/commands/sessions/daemon/watchActivity.ts
21240
- import { existsSync as existsSync54, mkdirSync as mkdirSync23, watch } from "fs";
21241
- import { dirname as dirname28 } from "path";
21247
+ import { existsSync as existsSync54, mkdirSync as mkdirSync24, watch } from "fs";
21248
+ import { dirname as dirname29 } from "path";
21242
21249
 
21243
21250
  // src/commands/sessions/daemon/applyReviewPause.ts
21244
21251
  function applyReviewPause(session, activity2) {
@@ -21256,9 +21263,9 @@ var DEBOUNCE_MS = 50;
21256
21263
  function watchActivity(session, notify2) {
21257
21264
  if (session.commandType !== "assist" || !session.cwd) return;
21258
21265
  const path57 = activityPath(session.id);
21259
- const dir = dirname28(path57);
21266
+ const dir = dirname29(path57);
21260
21267
  try {
21261
- mkdirSync23(dir, { recursive: true });
21268
+ mkdirSync24(dir, { recursive: true });
21262
21269
  } catch {
21263
21270
  return;
21264
21271
  }
@@ -22634,7 +22641,7 @@ async function recoverFromAddrInUse(server, manager, checkAutoExit) {
22634
22641
 
22635
22642
  // src/commands/sessions/daemon/runDaemon.ts
22636
22643
  async function runDaemon() {
22637
- mkdirSync24(daemonPaths.dir, { recursive: true });
22644
+ mkdirSync25(daemonPaths.dir, { recursive: true });
22638
22645
  daemonLog(
22639
22646
  `starting (reason: ${process.env.ASSIST_DAEMON_SPAWN_REASON ?? "manual"})`
22640
22647
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.330.2",
3
+ "version": "0.330.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {