@staff0rd/assist 0.354.3 → 0.355.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.354.3",
9
+ version: "0.355.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -5921,7 +5921,8 @@ async function loadItemSummaries(orm, origin) {
5921
5921
  type: items.type,
5922
5922
  name: items.name,
5923
5923
  status: items.status,
5924
- starred: items.starred
5924
+ starred: items.starred,
5925
+ jiraKey: items.jiraKey
5925
5926
  }).from(items).where(origin === void 0 ? void 0 : eq11(items.origin, origin)).orderBy(asc5(items.id));
5926
5927
  return rows.map((row) => ({
5927
5928
  id: row.id,
@@ -5929,7 +5930,8 @@ async function loadItemSummaries(orm, origin) {
5929
5930
  type: row.type,
5930
5931
  name: row.name,
5931
5932
  status: row.status,
5932
- starred: row.starred
5933
+ starred: row.starred,
5934
+ jiraKey: row.jiraKey ?? void 0
5933
5935
  }));
5934
5936
  }
5935
5937
 
@@ -6524,6 +6526,41 @@ function runGitStatus(cwd) {
6524
6526
  }).then((r) => r.stdout);
6525
6527
  }
6526
6528
 
6529
+ // src/shared/loadJson.ts
6530
+ import { existsSync as existsSync25, mkdirSync as mkdirSync10, readFileSync as readFileSync18, writeFileSync as writeFileSync19 } from "fs";
6531
+ import { homedir as homedir10 } from "os";
6532
+ import { join as join23 } from "path";
6533
+ function getStoreDir() {
6534
+ return join23(homedir10(), ".assist");
6535
+ }
6536
+ function getStorePath(filename) {
6537
+ return join23(getStoreDir(), filename);
6538
+ }
6539
+ function loadJson(filename) {
6540
+ const path57 = getStorePath(filename);
6541
+ if (existsSync25(path57)) {
6542
+ try {
6543
+ return JSON.parse(readFileSync18(path57, "utf8"));
6544
+ } catch {
6545
+ return {};
6546
+ }
6547
+ }
6548
+ return {};
6549
+ }
6550
+ function saveJson(filename, data) {
6551
+ const dir = getStoreDir();
6552
+ if (!existsSync25(dir)) {
6553
+ mkdirSync10(dir, { recursive: true });
6554
+ }
6555
+ writeFileSync19(getStorePath(filename), JSON.stringify(data, null, 2));
6556
+ }
6557
+
6558
+ // src/commands/sessions/web/jiraSite.ts
6559
+ function jiraSite(_req, res) {
6560
+ const config = loadJson("jira.json");
6561
+ respondJson(res, 200, { site: config.site ?? null });
6562
+ }
6563
+
6527
6564
  // src/commands/news/shared.ts
6528
6565
  import { decodeHTML } from "entities";
6529
6566
  function extractText(xml, tag) {
@@ -6883,7 +6920,7 @@ async function restartWeb(req, res, deps2 = {}) {
6883
6920
 
6884
6921
  // src/commands/sessions/web/createCssHandler.ts
6885
6922
  import { createHash as createHash2 } from "crypto";
6886
- import { readFileSync as readFileSync18 } from "fs";
6923
+ import { readFileSync as readFileSync19 } from "fs";
6887
6924
  import { createRequire as createRequire2 } from "module";
6888
6925
  var require3 = createRequire2(import.meta.url);
6889
6926
  function createCssHandler(packageEntry) {
@@ -6891,7 +6928,7 @@ function createCssHandler(packageEntry) {
6891
6928
  return (req, res) => {
6892
6929
  if (!cache) {
6893
6930
  const resolved = require3.resolve(packageEntry);
6894
- const body = readFileSync18(resolved, "utf8");
6931
+ const body = readFileSync19(resolved, "utf8");
6895
6932
  const etag = `"${createHash2("sha256").update(body).digest("hex").slice(0, 16)}"`;
6896
6933
  cache = { body, etag };
6897
6934
  }
@@ -6923,6 +6960,7 @@ var routes2 = {
6923
6960
  "POST /api/restart": restartWeb,
6924
6961
  "GET /api/github-url": githubUrl,
6925
6962
  "GET /api/git-status": gitStatus,
6963
+ "GET /api/jira-site": jiraSite,
6926
6964
  "GET /api/pr-status": prStatus,
6927
6965
  "GET /api/pr-list": prList,
6928
6966
  "GET /api/news/items": listNewsItems,
@@ -7730,9 +7768,9 @@ function ensureRemoteOrigin() {
7730
7768
 
7731
7769
  // src/commands/backlog/add/shared.ts
7732
7770
  import { spawnSync as spawnSync2 } from "child_process";
7733
- import { mkdtempSync, readFileSync as readFileSync19, unlinkSync as unlinkSync6, writeFileSync as writeFileSync19 } from "fs";
7771
+ import { mkdtempSync, readFileSync as readFileSync20, unlinkSync as unlinkSync6, writeFileSync as writeFileSync20 } from "fs";
7734
7772
  import { tmpdir } from "os";
7735
- import { join as join23 } from "path";
7773
+ import { join as join24 } from "path";
7736
7774
  import enquirer6 from "enquirer";
7737
7775
  async function promptType() {
7738
7776
  const { type } = await enquirer6.prompt({
@@ -7772,15 +7810,15 @@ async function promptDescription() {
7772
7810
  }
7773
7811
  function openEditor() {
7774
7812
  const editor = process.env.EDITOR || process.env.VISUAL || "vi";
7775
- const dir = mkdtempSync(join23(tmpdir(), "assist-"));
7776
- const filePath = join23(dir, "description.md");
7777
- writeFileSync19(filePath, "");
7813
+ const dir = mkdtempSync(join24(tmpdir(), "assist-"));
7814
+ const filePath = join24(dir, "description.md");
7815
+ writeFileSync20(filePath, "");
7778
7816
  const result = spawnSync2(editor, [filePath], { stdio: "inherit" });
7779
7817
  if (result.status !== 0) {
7780
7818
  unlinkSync6(filePath);
7781
7819
  return void 0;
7782
7820
  }
7783
- const content = readFileSync19(filePath, "utf8").trim();
7821
+ const content = readFileSync20(filePath, "utf8").trim();
7784
7822
  unlinkSync6(filePath);
7785
7823
  return content || void 0;
7786
7824
  }
@@ -9357,13 +9395,13 @@ function findBuiltinDenyRaw(rawCommand) {
9357
9395
  }
9358
9396
 
9359
9397
  // src/commands/cliHook/logDeniedToolCall.ts
9360
- import { mkdirSync as mkdirSync10 } from "fs";
9361
- import { homedir as homedir10 } from "os";
9362
- import { join as join24 } from "path";
9398
+ import { mkdirSync as mkdirSync11 } from "fs";
9399
+ import { homedir as homedir11 } from "os";
9400
+ import { join as join25 } from "path";
9363
9401
  import Database from "better-sqlite3";
9364
9402
  var _db;
9365
9403
  function getDbDir() {
9366
- return join24(homedir10(), ".assist");
9404
+ return join25(homedir11(), ".assist");
9367
9405
  }
9368
9406
  function initSchema2(db) {
9369
9407
  db.exec(`
@@ -9381,8 +9419,8 @@ function initSchema2(db) {
9381
9419
  function openPromptsDb(dir) {
9382
9420
  if (_db) return _db;
9383
9421
  const dbDir = dir ?? getDbDir();
9384
- mkdirSync10(dbDir, { recursive: true });
9385
- const db = new Database(join24(dbDir, "assist.db"));
9422
+ mkdirSync11(dbDir, { recursive: true });
9423
+ const db = new Database(join25(dbDir, "assist.db"));
9386
9424
  db.pragma("journal_mode = WAL");
9387
9425
  initSchema2(db);
9388
9426
  _db = db;
@@ -9484,7 +9522,7 @@ function extractGraphqlQuery(args) {
9484
9522
  }
9485
9523
 
9486
9524
  // src/shared/loadCliReads.ts
9487
- import { existsSync as existsSync25, readFileSync as readFileSync20, writeFileSync as writeFileSync20 } from "fs";
9525
+ import { existsSync as existsSync26, readFileSync as readFileSync21, writeFileSync as writeFileSync21 } from "fs";
9488
9526
  import { dirname as dirname19, resolve as resolve8 } from "path";
9489
9527
  import { fileURLToPath as fileURLToPath4 } from "url";
9490
9528
  var __filename3 = fileURLToPath4(import.meta.url);
@@ -9493,8 +9531,8 @@ function packageRoot() {
9493
9531
  return __dirname4;
9494
9532
  }
9495
9533
  function readLines(path57) {
9496
- if (!existsSync25(path57)) return [];
9497
- return readFileSync20(path57, "utf8").split("\n").filter((line) => line.trim() !== "");
9534
+ if (!existsSync26(path57)) return [];
9535
+ return readFileSync21(path57, "utf8").split("\n").filter((line) => line.trim() !== "");
9498
9536
  }
9499
9537
  var cachedReads;
9500
9538
  var cachedWrites;
@@ -9514,7 +9552,7 @@ function loadCliReads() {
9514
9552
  return getCliReadsLines();
9515
9553
  }
9516
9554
  function saveCliReads(commands) {
9517
- writeFileSync20(
9555
+ writeFileSync21(
9518
9556
  resolve8(packageRoot(), "allowed.cli-reads"),
9519
9557
  `${commands.join("\n")}
9520
9558
  `
@@ -9540,14 +9578,14 @@ function findCliWrite(command) {
9540
9578
  }
9541
9579
 
9542
9580
  // src/shared/readSettingsPerms.ts
9543
- import { existsSync as existsSync26, readFileSync as readFileSync21 } from "fs";
9544
- import { homedir as homedir11 } from "os";
9545
- import { join as join25 } from "path";
9581
+ import { existsSync as existsSync27, readFileSync as readFileSync22 } from "fs";
9582
+ import { homedir as homedir12 } from "os";
9583
+ import { join as join26 } from "path";
9546
9584
  function readSettingsPerms(key) {
9547
9585
  const paths = [
9548
- join25(homedir11(), ".claude", "settings.json"),
9549
- join25(process.cwd(), ".claude", "settings.json"),
9550
- join25(process.cwd(), ".claude", "settings.local.json")
9586
+ join26(homedir12(), ".claude", "settings.json"),
9587
+ join26(process.cwd(), ".claude", "settings.json"),
9588
+ join26(process.cwd(), ".claude", "settings.local.json")
9551
9589
  ];
9552
9590
  const entries = [];
9553
9591
  for (const p of paths) {
@@ -9556,9 +9594,9 @@ function readSettingsPerms(key) {
9556
9594
  return entries;
9557
9595
  }
9558
9596
  function readPermissionArray(filePath, key) {
9559
- if (!existsSync26(filePath)) return [];
9597
+ if (!existsSync27(filePath)) return [];
9560
9598
  try {
9561
- const data = JSON.parse(readFileSync21(filePath, "utf8"));
9599
+ const data = JSON.parse(readFileSync22(filePath, "utf8"));
9562
9600
  const arr = data?.permissions?.[key];
9563
9601
  return Array.isArray(arr) ? arr.filter((e) => typeof e === "string") : [];
9564
9602
  } catch {
@@ -9820,9 +9858,9 @@ ${reasons.join("\n")}`);
9820
9858
  }
9821
9859
 
9822
9860
  // src/commands/permitCliReads/index.ts
9823
- import { existsSync as existsSync27, mkdirSync as mkdirSync11, readFileSync as readFileSync22, writeFileSync as writeFileSync21 } from "fs";
9824
- import { homedir as homedir12 } from "os";
9825
- import { join as join26 } from "path";
9861
+ import { existsSync as existsSync28, mkdirSync as mkdirSync12, readFileSync as readFileSync23, writeFileSync as writeFileSync22 } from "fs";
9862
+ import { homedir as homedir13 } from "os";
9863
+ import { join as join27 } from "path";
9826
9864
 
9827
9865
  // src/shared/checkCliAvailable.ts
9828
9866
  import { execSync as execSync25 } from "child_process";
@@ -10111,17 +10149,17 @@ function updateSettings(cli, commands) {
10111
10149
  // src/commands/permitCliReads/index.ts
10112
10150
  function logPath(cli) {
10113
10151
  const safeName = cli.replace(/\s+/g, "-");
10114
- return join26(homedir12(), ".assist", `cli-discover-${safeName}.log`);
10152
+ return join27(homedir13(), ".assist", `cli-discover-${safeName}.log`);
10115
10153
  }
10116
10154
  function readCache(cli) {
10117
10155
  const path57 = logPath(cli);
10118
- if (!existsSync27(path57)) return void 0;
10119
- return readFileSync22(path57, "utf8");
10156
+ if (!existsSync28(path57)) return void 0;
10157
+ return readFileSync23(path57, "utf8");
10120
10158
  }
10121
10159
  function writeCache(cli, output) {
10122
- const dir = join26(homedir12(), ".assist");
10123
- mkdirSync11(dir, { recursive: true });
10124
- writeFileSync21(logPath(cli), output);
10160
+ const dir = join27(homedir13(), ".assist");
10161
+ mkdirSync12(dir, { recursive: true });
10162
+ writeFileSync22(logPath(cli), output);
10125
10163
  }
10126
10164
  async function permitCliReads(cli, options2 = { noCache: false }) {
10127
10165
  if (!cli) {
@@ -10248,22 +10286,22 @@ function registerCliHook(program2) {
10248
10286
  }
10249
10287
 
10250
10288
  // src/commands/codeComment/codeCommentConfirm.ts
10251
- import { existsSync as existsSync29, readFileSync as readFileSync24, unlinkSync as unlinkSync8, writeFileSync as writeFileSync22 } from "fs";
10289
+ import { existsSync as existsSync30, readFileSync as readFileSync25, unlinkSync as unlinkSync8, writeFileSync as writeFileSync23 } from "fs";
10252
10290
  import chalk102 from "chalk";
10253
10291
 
10254
10292
  // src/commands/codeComment/getRestrictedDir.ts
10255
- import { homedir as homedir13 } from "os";
10256
- import { join as join27 } from "path";
10293
+ import { homedir as homedir14 } from "os";
10294
+ import { join as join28 } from "path";
10257
10295
  function getRestrictedDir() {
10258
- return join27(homedir13(), ".assist", "restricted");
10296
+ return join28(homedir14(), ".assist", "restricted");
10259
10297
  }
10260
10298
  function getPinStatePath(pin) {
10261
- return join27(getRestrictedDir(), `code-comment-${pin}.json`);
10299
+ return join28(getRestrictedDir(), `code-comment-${pin}.json`);
10262
10300
  }
10263
10301
 
10264
10302
  // src/commands/codeComment/sweepRestrictedDir.ts
10265
10303
  import { readdirSync as readdirSync2, statSync as statSync3, unlinkSync as unlinkSync7 } from "fs";
10266
- import { join as join28 } from "path";
10304
+ import { join as join29 } from "path";
10267
10305
  var STALE_AFTER_MS = 30 * 60 * 1e3;
10268
10306
  function sweepRestrictedDir(dir = getRestrictedDir()) {
10269
10307
  let entries;
@@ -10274,7 +10312,7 @@ function sweepRestrictedDir(dir = getRestrictedDir()) {
10274
10312
  }
10275
10313
  const cutoff = Date.now() - STALE_AFTER_MS;
10276
10314
  for (const entry of entries) {
10277
- const path57 = join28(dir, entry);
10315
+ const path57 = join29(dir, entry);
10278
10316
  try {
10279
10317
  if (statSync3(path57).mtimeMs < cutoff) unlinkSync7(path57);
10280
10318
  } catch {
@@ -10284,12 +10322,12 @@ function sweepRestrictedDir(dir = getRestrictedDir()) {
10284
10322
  }
10285
10323
 
10286
10324
  // src/commands/codeComment/readPinState.ts
10287
- import { existsSync as existsSync28, readFileSync as readFileSync23 } from "fs";
10325
+ import { existsSync as existsSync29, readFileSync as readFileSync24 } from "fs";
10288
10326
  function readPinState(pin) {
10289
10327
  const path57 = getPinStatePath(pin);
10290
- if (!existsSync28(path57)) return void 0;
10328
+ if (!existsSync29(path57)) return void 0;
10291
10329
  try {
10292
- const state = JSON.parse(readFileSync23(path57, "utf8"));
10330
+ const state = JSON.parse(readFileSync24(path57, "utf8"));
10293
10331
  if (state.pin !== pin) return void 0;
10294
10332
  return state;
10295
10333
  } catch {
@@ -10306,12 +10344,12 @@ function codeCommentConfirm(pin) {
10306
10344
  process.exitCode = 1;
10307
10345
  return;
10308
10346
  }
10309
- if (!existsSync29(state.file)) {
10347
+ if (!existsSync30(state.file)) {
10310
10348
  console.error(chalk102.red(`Target file no longer exists: ${state.file}`));
10311
10349
  process.exitCode = 1;
10312
10350
  return;
10313
10351
  }
10314
- const original = readFileSync24(state.file, "utf8");
10352
+ const original = readFileSync25(state.file, "utf8");
10315
10353
  const lines = original.split("\n");
10316
10354
  const index3 = state.line - 1;
10317
10355
  if (index3 > lines.length) {
@@ -10327,7 +10365,7 @@ function codeCommentConfirm(pin) {
10327
10365
  const indentSource = lines[index3] ?? "";
10328
10366
  const indent2 = indentSource.match(/^\s*/)?.[0] ?? "";
10329
10367
  lines.splice(index3, 0, `${indent2}${marker} ${state.text}`);
10330
- writeFileSync22(state.file, lines.join("\n"));
10368
+ writeFileSync23(state.file, lines.join("\n"));
10331
10369
  unlinkSync8(getPinStatePath(pin));
10332
10370
  console.log(
10333
10371
  chalk102.green(
@@ -10365,13 +10403,13 @@ function validateCommentText(raw, isYaml = false) {
10365
10403
  }
10366
10404
 
10367
10405
  // src/commands/codeComment/issuePin.ts
10368
- import { mkdirSync as mkdirSync12, writeFileSync as writeFileSync23 } from "fs";
10406
+ import { mkdirSync as mkdirSync13, writeFileSync as writeFileSync24 } from "fs";
10369
10407
  import { randomInt } from "crypto";
10370
10408
  function issuePin(file, lineNumber, text8) {
10371
10409
  const pin = generatePin();
10372
- mkdirSync12(getRestrictedDir(), { recursive: true });
10410
+ mkdirSync13(getRestrictedDir(), { recursive: true });
10373
10411
  sweepRestrictedDir();
10374
- writeFileSync23(
10412
+ writeFileSync24(
10375
10413
  getPinStatePath(pin),
10376
10414
  JSON.stringify({ pin, file, line: lineNumber, text: text8 })
10377
10415
  );
@@ -11161,7 +11199,7 @@ function registerConfig(program2) {
11161
11199
  }
11162
11200
 
11163
11201
  // src/commands/deploy/redirect.ts
11164
- import { existsSync as existsSync30, readFileSync as readFileSync25, writeFileSync as writeFileSync24 } from "fs";
11202
+ import { existsSync as existsSync31, readFileSync as readFileSync26, writeFileSync as writeFileSync25 } from "fs";
11165
11203
  import chalk115 from "chalk";
11166
11204
  var TRAILING_SLASH_SCRIPT = ` <script>
11167
11205
  if (!window.location.pathname.endsWith('/')) {
@@ -11170,11 +11208,11 @@ var TRAILING_SLASH_SCRIPT = ` <script>
11170
11208
  </script>`;
11171
11209
  function redirect() {
11172
11210
  const indexPath = "index.html";
11173
- if (!existsSync30(indexPath)) {
11211
+ if (!existsSync31(indexPath)) {
11174
11212
  console.log(chalk115.yellow("No index.html found"));
11175
11213
  return;
11176
11214
  }
11177
- const content = readFileSync25(indexPath, "utf8");
11215
+ const content = readFileSync26(indexPath, "utf8");
11178
11216
  if (content.includes("window.location.pathname.endsWith('/')")) {
11179
11217
  console.log(chalk115.dim("Trailing slash script already present"));
11180
11218
  return;
@@ -11186,7 +11224,7 @@ function redirect() {
11186
11224
  }
11187
11225
  const newContent = `${content.slice(0, headCloseIndex) + TRAILING_SLASH_SCRIPT}
11188
11226
  ${content.slice(headCloseIndex)}`;
11189
- writeFileSync24(indexPath, newContent);
11227
+ writeFileSync25(indexPath, newContent);
11190
11228
  console.log(chalk115.green("Added trailing slash redirect to index.html"));
11191
11229
  }
11192
11230
 
@@ -11202,11 +11240,11 @@ import { execFileSync as execFileSync2 } from "child_process";
11202
11240
  import { basename as basename6 } from "path";
11203
11241
 
11204
11242
  // src/commands/devlog/loadBlogSkipDays.ts
11205
- import { homedir as homedir14 } from "os";
11206
- import { join as join29 } from "path";
11207
- var BLOG_REPO_ROOT = join29(homedir14(), "git/blog");
11243
+ import { homedir as homedir15 } from "os";
11244
+ import { join as join30 } from "path";
11245
+ var BLOG_REPO_ROOT = join30(homedir15(), "git/blog");
11208
11246
  function loadBlogSkipDays(repoName) {
11209
- const config = loadRawYaml(join29(BLOG_REPO_ROOT, "assist.yml"));
11247
+ const config = loadRawYaml(join30(BLOG_REPO_ROOT, "assist.yml"));
11210
11248
  const devlog = config.devlog;
11211
11249
  const skip2 = devlog?.skip;
11212
11250
  return new Set(skip2?.[repoName]);
@@ -11217,17 +11255,17 @@ import { execSync as execSync26 } from "child_process";
11217
11255
  import chalk116 from "chalk";
11218
11256
 
11219
11257
  // src/shared/getRepoName.ts
11220
- import { existsSync as existsSync31, readFileSync as readFileSync26 } from "fs";
11221
- import { basename as basename5, join as join30 } from "path";
11258
+ import { existsSync as existsSync32, readFileSync as readFileSync27 } from "fs";
11259
+ import { basename as basename5, join as join31 } from "path";
11222
11260
  function getRepoName() {
11223
11261
  const config = loadConfig();
11224
11262
  if (config.devlog?.name) {
11225
11263
  return config.devlog.name;
11226
11264
  }
11227
- const packageJsonPath = join30(process.cwd(), "package.json");
11228
- if (existsSync31(packageJsonPath)) {
11265
+ const packageJsonPath = join31(process.cwd(), "package.json");
11266
+ if (existsSync32(packageJsonPath)) {
11229
11267
  try {
11230
- const content = readFileSync26(packageJsonPath, "utf8");
11268
+ const content = readFileSync27(packageJsonPath, "utf8");
11231
11269
  const pkg = JSON.parse(content);
11232
11270
  if (pkg.name) {
11233
11271
  return pkg.name;
@@ -11239,9 +11277,9 @@ function getRepoName() {
11239
11277
  }
11240
11278
 
11241
11279
  // src/commands/devlog/loadDevlogEntries.ts
11242
- import { readdirSync as readdirSync3, readFileSync as readFileSync27 } from "fs";
11243
- import { join as join31 } from "path";
11244
- var DEVLOG_DIR = join31(BLOG_REPO_ROOT, "src/content/devlog");
11280
+ import { readdirSync as readdirSync3, readFileSync as readFileSync28 } from "fs";
11281
+ import { join as join32 } from "path";
11282
+ var DEVLOG_DIR = join32(BLOG_REPO_ROOT, "src/content/devlog");
11245
11283
  function extractFrontmatter(content) {
11246
11284
  const fm = content.match(/^---\n([\s\S]*?)\n---/);
11247
11285
  return fm?.[1] ?? null;
@@ -11269,7 +11307,7 @@ function readDevlogFiles(callback) {
11269
11307
  try {
11270
11308
  const files = readdirSync3(DEVLOG_DIR).filter((f) => f.endsWith(".md"));
11271
11309
  for (const file of files) {
11272
- const content = readFileSync27(join31(DEVLOG_DIR, file), "utf8");
11310
+ const content = readFileSync28(join32(DEVLOG_DIR, file), "utf8");
11273
11311
  const parsed = parseFrontmatter(content, file);
11274
11312
  if (parsed) callback(parsed);
11275
11313
  }
@@ -11656,12 +11694,12 @@ function repos(options2) {
11656
11694
  }
11657
11695
 
11658
11696
  // src/commands/devlog/skip.ts
11659
- import { writeFileSync as writeFileSync25 } from "fs";
11660
- import { join as join32 } from "path";
11697
+ import { writeFileSync as writeFileSync26 } from "fs";
11698
+ import { join as join33 } from "path";
11661
11699
  import chalk121 from "chalk";
11662
11700
  import { stringify as stringifyYaml3 } from "yaml";
11663
11701
  function getBlogConfigPath() {
11664
- return join32(BLOG_REPO_ROOT, "assist.yml");
11702
+ return join33(BLOG_REPO_ROOT, "assist.yml");
11665
11703
  }
11666
11704
  function skip(date) {
11667
11705
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) {
@@ -11685,7 +11723,7 @@ function skip(date) {
11685
11723
  skip2[repoName] = skipDays;
11686
11724
  devlog.skip = skip2;
11687
11725
  config.devlog = devlog;
11688
- writeFileSync25(configPath, stringifyYaml3(config, { lineWidth: 0 }));
11726
+ writeFileSync26(configPath, stringifyYaml3(config, { lineWidth: 0 }));
11689
11727
  console.log(chalk121.green(`Added ${date} to skip list for ${repoName}`));
11690
11728
  }
11691
11729
 
@@ -11722,16 +11760,16 @@ function registerDevlog(program2) {
11722
11760
 
11723
11761
  // src/commands/dotnet/checkBuildLocks.ts
11724
11762
  import { closeSync as closeSync2, openSync as openSync2, readdirSync as readdirSync4 } from "fs";
11725
- import { join as join33 } from "path";
11763
+ import { join as join34 } from "path";
11726
11764
  import chalk123 from "chalk";
11727
11765
 
11728
11766
  // src/shared/findRepoRoot.ts
11729
- import { existsSync as existsSync32 } from "fs";
11767
+ import { existsSync as existsSync33 } from "fs";
11730
11768
  import path22 from "path";
11731
11769
  function findRepoRoot(dir) {
11732
11770
  let current = dir;
11733
11771
  while (current !== path22.dirname(current)) {
11734
- if (existsSync32(path22.join(current, ".git"))) {
11772
+ if (existsSync33(path22.join(current, ".git"))) {
11735
11773
  return current;
11736
11774
  }
11737
11775
  current = path22.dirname(current);
@@ -11750,7 +11788,7 @@ function isLockedDll(debugDir) {
11750
11788
  }
11751
11789
  for (const file of files) {
11752
11790
  if (!file.toLowerCase().endsWith(".dll")) continue;
11753
- const dllPath = join33(debugDir, file);
11791
+ const dllPath = join34(debugDir, file);
11754
11792
  try {
11755
11793
  const fd = openSync2(dllPath, "r+");
11756
11794
  closeSync2(fd);
@@ -11768,13 +11806,13 @@ function findFirstLockedDll(dir) {
11768
11806
  return null;
11769
11807
  }
11770
11808
  if (entries.includes("bin")) {
11771
- const locked = isLockedDll(join33(dir, "bin", "Debug"));
11809
+ const locked = isLockedDll(join34(dir, "bin", "Debug"));
11772
11810
  if (locked) return locked;
11773
11811
  }
11774
11812
  for (const entry of entries) {
11775
11813
  if (SKIP_DIRS.has(entry) || entry === "bin" || entry.startsWith("."))
11776
11814
  continue;
11777
- const found = findFirstLockedDll(join33(dir, entry));
11815
+ const found = findFirstLockedDll(join34(dir, entry));
11778
11816
  if (found) return found;
11779
11817
  }
11780
11818
  return null;
@@ -11797,11 +11835,11 @@ async function checkBuildLocksCommand() {
11797
11835
  }
11798
11836
 
11799
11837
  // src/commands/dotnet/buildTree.ts
11800
- import { readFileSync as readFileSync28 } from "fs";
11838
+ import { readFileSync as readFileSync29 } from "fs";
11801
11839
  import path23 from "path";
11802
11840
  var PROJECT_REF_RE = /<ProjectReference\s+Include="([^"]+)"/g;
11803
11841
  function getProjectRefs(csprojPath) {
11804
- const content = readFileSync28(csprojPath, "utf8");
11842
+ const content = readFileSync29(csprojPath, "utf8");
11805
11843
  const refs = [];
11806
11844
  for (const match of content.matchAll(PROJECT_REF_RE)) {
11807
11845
  refs.push(match[1].replace(/\\/g, "/"));
@@ -11818,7 +11856,7 @@ function buildTree(csprojPath, repoRoot, visited = /* @__PURE__ */ new Set()) {
11818
11856
  for (const ref of getProjectRefs(abs)) {
11819
11857
  const childAbs = path23.resolve(dir, ref);
11820
11858
  try {
11821
- readFileSync28(childAbs);
11859
+ readFileSync29(childAbs);
11822
11860
  node.children.push(buildTree(childAbs, repoRoot, visited));
11823
11861
  } catch {
11824
11862
  node.children.push({
@@ -11843,7 +11881,7 @@ function collectAllDeps(node) {
11843
11881
  }
11844
11882
 
11845
11883
  // src/commands/dotnet/findContainingSolutions.ts
11846
- import { readdirSync as readdirSync5, readFileSync as readFileSync29, statSync as statSync4 } from "fs";
11884
+ import { readdirSync as readdirSync5, readFileSync as readFileSync30, statSync as statSync4 } from "fs";
11847
11885
  import path24 from "path";
11848
11886
  function findSlnFiles(dir, maxDepth, depth = 0) {
11849
11887
  if (depth > maxDepth) return [];
@@ -11878,7 +11916,7 @@ function findContainingSolutions(csprojPath, repoRoot) {
11878
11916
  const pattern2 = new RegExp(`[\\\\"/]${escapeRegex(csprojBasename)}"`);
11879
11917
  for (const sln of slnFiles) {
11880
11918
  try {
11881
- const content = readFileSync29(sln, "utf8");
11919
+ const content = readFileSync30(sln, "utf8");
11882
11920
  if (pattern2.test(content)) {
11883
11921
  matches.push(path24.relative(repoRoot, sln));
11884
11922
  }
@@ -11942,12 +11980,12 @@ function printJson(tree, totalCount, solutions) {
11942
11980
  }
11943
11981
 
11944
11982
  // src/commands/dotnet/resolveCsproj.ts
11945
- import { existsSync as existsSync33 } from "fs";
11983
+ import { existsSync as existsSync34 } from "fs";
11946
11984
  import path25 from "path";
11947
11985
  import chalk125 from "chalk";
11948
11986
  function resolveCsproj(csprojPath) {
11949
11987
  const resolved = path25.resolve(csprojPath);
11950
- if (!existsSync33(resolved)) {
11988
+ if (!existsSync34(resolved)) {
11951
11989
  console.error(chalk125.red(`File not found: ${resolved}`));
11952
11990
  process.exit(1);
11953
11991
  }
@@ -12115,17 +12153,17 @@ function filterIssues(issues, all, cliOnly, cliSuppress) {
12115
12153
  }
12116
12154
 
12117
12155
  // src/commands/dotnet/resolveSolution.ts
12118
- import { existsSync as existsSync34 } from "fs";
12156
+ import { existsSync as existsSync35 } from "fs";
12119
12157
  import path26 from "path";
12120
12158
  import chalk129 from "chalk";
12121
12159
 
12122
12160
  // src/commands/dotnet/findSolution.ts
12123
12161
  import { readdirSync as readdirSync6 } from "fs";
12124
- import { dirname as dirname20, join as join34 } from "path";
12162
+ import { dirname as dirname20, join as join35 } from "path";
12125
12163
  import chalk128 from "chalk";
12126
12164
  function findSlnInDir(dir) {
12127
12165
  try {
12128
- return readdirSync6(dir).filter((f) => f.endsWith(".sln")).map((f) => join34(dir, f));
12166
+ return readdirSync6(dir).filter((f) => f.endsWith(".sln")).map((f) => join35(dir, f));
12129
12167
  } catch {
12130
12168
  return [];
12131
12169
  }
@@ -12156,7 +12194,7 @@ function findSolution() {
12156
12194
  function resolveSolution(sln) {
12157
12195
  if (sln) {
12158
12196
  const resolved = path26.resolve(sln);
12159
- if (!existsSync34(resolved)) {
12197
+ if (!existsSync35(resolved)) {
12160
12198
  console.error(chalk129.red(`Solution file not found: ${resolved}`));
12161
12199
  process.exit(1);
12162
12200
  }
@@ -12196,7 +12234,7 @@ function parseInspectReport(json) {
12196
12234
 
12197
12235
  // src/commands/dotnet/runInspectCode.ts
12198
12236
  import { execSync as execSync30 } from "child_process";
12199
- import { existsSync as existsSync35, readFileSync as readFileSync30, unlinkSync as unlinkSync9 } from "fs";
12237
+ import { existsSync as existsSync36, readFileSync as readFileSync31, unlinkSync as unlinkSync9 } from "fs";
12200
12238
  import { tmpdir as tmpdir3 } from "os";
12201
12239
  import path27 from "path";
12202
12240
  import chalk130 from "chalk";
@@ -12227,11 +12265,11 @@ function runInspectCode(slnPath, include, swea) {
12227
12265
  console.error(chalk130.red("jb inspectcode failed"));
12228
12266
  process.exit(1);
12229
12267
  }
12230
- if (!existsSync35(reportPath)) {
12268
+ if (!existsSync36(reportPath)) {
12231
12269
  console.error(chalk130.red("Report file not generated"));
12232
12270
  process.exit(1);
12233
12271
  }
12234
- const xml = readFileSync30(reportPath, "utf8");
12272
+ const xml = readFileSync31(reportPath, "utf8");
12235
12273
  unlinkSync9(reportPath);
12236
12274
  return xml;
12237
12275
  }
@@ -12554,9 +12592,9 @@ function aggregateCommitters(authorLists) {
12554
12592
 
12555
12593
  // src/shared/runGhGraphql.ts
12556
12594
  import { spawnSync as spawnSync3 } from "child_process";
12557
- import { unlinkSync as unlinkSync10, writeFileSync as writeFileSync26 } from "fs";
12595
+ import { unlinkSync as unlinkSync10, writeFileSync as writeFileSync27 } from "fs";
12558
12596
  import { tmpdir as tmpdir4 } from "os";
12559
- import { join as join35 } from "path";
12597
+ import { join as join36 } from "path";
12560
12598
  function buildArgs2(queryFile, vars) {
12561
12599
  const args = ["api", "graphql", "-F", `query=@${queryFile}`];
12562
12600
  for (const [key, value] of Object.entries(vars)) {
@@ -12581,8 +12619,8 @@ function throwOnGraphqlErrors(stdout) {
12581
12619
  throw new Error(messages || "GraphQL request returned errors");
12582
12620
  }
12583
12621
  function runGhGraphql(mutation, vars) {
12584
- const queryFile = join35(tmpdir4(), `gh-query-${Date.now()}.graphql`);
12585
- writeFileSync26(queryFile, mutation);
12622
+ const queryFile = join36(tmpdir4(), `gh-query-${Date.now()}.graphql`);
12623
+ writeFileSync27(queryFile, mutation);
12586
12624
  try {
12587
12625
  const result = spawnSync3("gh", buildArgs2(queryFile, vars), {
12588
12626
  encoding: "utf8"
@@ -12768,24 +12806,24 @@ async function countPendingHandovers(orm, origin) {
12768
12806
 
12769
12807
  // src/commands/handover/migrateDiskHandovers.ts
12770
12808
  import {
12771
- existsSync as existsSync36,
12809
+ existsSync as existsSync37,
12772
12810
  readdirSync as readdirSync7,
12773
- readFileSync as readFileSync31,
12811
+ readFileSync as readFileSync32,
12774
12812
  rmSync as rmSync2,
12775
12813
  statSync as statSync5
12776
12814
  } from "fs";
12777
- import { basename as basename7, join as join38 } from "path";
12815
+ import { basename as basename7, join as join39 } from "path";
12778
12816
 
12779
12817
  // src/commands/handover/getHandoverPath.ts
12780
- import { join as join36 } from "path";
12818
+ import { join as join37 } from "path";
12781
12819
  function getHandoverPath(cwd = process.cwd()) {
12782
- return join36(cwd, ".assist", "HANDOVER.md");
12820
+ return join37(cwd, ".assist", "HANDOVER.md");
12783
12821
  }
12784
12822
 
12785
12823
  // src/commands/handover/getHandoversDir.ts
12786
- import { join as join37 } from "path";
12824
+ import { join as join38 } from "path";
12787
12825
  function getHandoversDir(cwd = process.cwd()) {
12788
- return join37(cwd, ".assist", "handovers");
12826
+ return join38(cwd, ".assist", "handovers");
12789
12827
  }
12790
12828
 
12791
12829
  // src/commands/handover/parseArchiveTimestamp.ts
@@ -12823,17 +12861,17 @@ function summariseHandoverContent(content) {
12823
12861
 
12824
12862
  // src/commands/handover/migrateDiskHandovers.ts
12825
12863
  function collectMarkdown(dir) {
12826
- if (!existsSync36(dir)) return [];
12864
+ if (!existsSync37(dir)) return [];
12827
12865
  const out = [];
12828
12866
  for (const entry of readdirSync7(dir, { withFileTypes: true })) {
12829
- const full = join38(dir, entry.name);
12867
+ const full = join39(dir, entry.name);
12830
12868
  if (entry.isDirectory()) out.push(...collectMarkdown(full));
12831
12869
  else if (entry.isFile() && entry.name.endsWith(".md")) out.push(full);
12832
12870
  }
12833
12871
  return out;
12834
12872
  }
12835
12873
  async function migrateFile(orm, origin, file, createdAt) {
12836
- const content = readFileSync31(file, "utf8");
12874
+ const content = readFileSync32(file, "utf8");
12837
12875
  await saveHandover(orm, {
12838
12876
  origin,
12839
12877
  summary: summariseHandoverContent(content),
@@ -12850,7 +12888,7 @@ async function migrateDiskHandovers(orm, origin, cwd = process.cwd()) {
12850
12888
  migrated++;
12851
12889
  }
12852
12890
  const handoverPath = getHandoverPath(cwd);
12853
- if (existsSync36(handoverPath)) {
12891
+ if (existsSync37(handoverPath)) {
12854
12892
  await migrateFile(orm, origin, handoverPath, statSync5(handoverPath).mtime);
12855
12893
  migrated++;
12856
12894
  }
@@ -13065,35 +13103,6 @@ function acceptanceCriteria(issueKey) {
13065
13103
  // src/commands/jira/jiraAuth.ts
13066
13104
  import { execSync as execSync32 } from "child_process";
13067
13105
 
13068
- // src/shared/loadJson.ts
13069
- import { existsSync as existsSync37, mkdirSync as mkdirSync13, readFileSync as readFileSync32, writeFileSync as writeFileSync27 } from "fs";
13070
- import { homedir as homedir15 } from "os";
13071
- import { join as join39 } from "path";
13072
- function getStoreDir() {
13073
- return join39(homedir15(), ".assist");
13074
- }
13075
- function getStorePath(filename) {
13076
- return join39(getStoreDir(), filename);
13077
- }
13078
- function loadJson(filename) {
13079
- const path57 = getStorePath(filename);
13080
- if (existsSync37(path57)) {
13081
- try {
13082
- return JSON.parse(readFileSync32(path57, "utf8"));
13083
- } catch {
13084
- return {};
13085
- }
13086
- }
13087
- return {};
13088
- }
13089
- function saveJson(filename, data) {
13090
- const dir = getStoreDir();
13091
- if (!existsSync37(dir)) {
13092
- mkdirSync13(dir, { recursive: true });
13093
- }
13094
- writeFileSync27(getStorePath(filename), JSON.stringify(data, null, 2));
13095
- }
13096
-
13097
13106
  // src/shared/promptInput.ts
13098
13107
  import Enquirer from "enquirer";
13099
13108
  var prompts = Enquirer;