@staff0rd/assist 0.1217.3 → 0.1217.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/.build-files CHANGED
@@ -52,6 +52,7 @@ chunk-3M6IUF5H.js
52
52
  chunk-3NK55YVZ.js
53
53
  chunk-3OYU2N5M.js
54
54
  chunk-3PM5JCHE.js
55
+ chunk-3RAEAQWV.js
55
56
  chunk-3VDV7VHX.js
56
57
  chunk-3WJYRKC3.js
57
58
  chunk-4AZGXA6X.js
@@ -74,6 +75,7 @@ chunk-5AAHWTRQ.js
74
75
  chunk-5AQT32G3.js
75
76
  chunk-5H7EHZ3J.js
76
77
  chunk-5JOVEUBS.js
78
+ chunk-5LSPCC7W.js
77
79
  chunk-5Q7MUHCK.js
78
80
  chunk-5QBWGZWK.js
79
81
  chunk-5RFKHBSM.js
@@ -83,7 +85,6 @@ chunk-67DONCGH.js
83
85
  chunk-6DGPQ67E.js
84
86
  chunk-6G2ADBNV.js
85
87
  chunk-6MXYEGDK.js
86
- chunk-6SQNK6Q5.js
87
88
  chunk-6T53CG7D.js
88
89
  chunk-6Z4QIMRT.js
89
90
  chunk-6Z7XJJNZ.js
@@ -111,6 +112,7 @@ chunk-B5ZOANOD.js
111
112
  chunk-B6RAZW2L.js
112
113
  chunk-B7B26YPF.js
113
114
  chunk-B7VOTF5Q.js
115
+ chunk-BAIGEXPY.js
114
116
  chunk-BBE5K7OG.js
115
117
  chunk-BGN4WP7H.js
116
118
  chunk-BHB7X7F2.js
@@ -130,6 +132,7 @@ chunk-CS7HC5ZN.js
130
132
  chunk-CVMH6FBE.js
131
133
  chunk-D6WBUFXT.js
132
134
  chunk-D7UZLH36.js
135
+ chunk-DEN7NCH4.js
133
136
  chunk-DFGM4JEV.js
134
137
  chunk-DM6BIOGS.js
135
138
  chunk-DOVFHJNY.js
@@ -155,7 +158,6 @@ chunk-EYM57SNL.js
155
158
  chunk-F4XCHVD7.js
156
159
  chunk-F7QYFJB2.js
157
160
  chunk-FJMFJN4I.js
158
- chunk-FLYNSV6L.js
159
161
  chunk-FMGU4HY6.js
160
162
  chunk-FOPR6LRY.js
161
163
  chunk-FPWL4VRC.js
@@ -206,7 +208,9 @@ chunk-JWMBBFAS.js
206
208
  chunk-JXSVTYHL.js
207
209
  chunk-K45LIKCT.js
208
210
  chunk-K4DJEFDZ.js
211
+ chunk-K4KEGWZH.js
209
212
  chunk-KD2PWI4Z.js
213
+ chunk-KMFYHSFK.js
210
214
  chunk-KP5S3FE5.js
211
215
  chunk-KQE6OV74.js
212
216
  chunk-KQOUE3WV.js
@@ -259,10 +263,10 @@ chunk-P253KAVC.js
259
263
  chunk-P26XSDFU.js
260
264
  chunk-P5LQVJWN.js
261
265
  chunk-P7FVAGFQ.js
266
+ chunk-PC2KU7KX.js
262
267
  chunk-PIDKNOD6.js
263
268
  chunk-PQX57SJI.js
264
269
  chunk-PTWD34JK.js
265
- chunk-PUOEMDKJ.js
266
270
  chunk-PURNABFX.js
267
271
  chunk-PVJZDW3D.js
268
272
  chunk-PXP35WEE.js
@@ -287,8 +291,8 @@ chunk-RFMBA6WA.js
287
291
  chunk-RNFWWESE.js
288
292
  chunk-RQL36BCO.js
289
293
  chunk-RXKI4XAU.js
294
+ chunk-S5PTNGA6.js
290
295
  chunk-S6G65GYJ.js
291
- chunk-S6XQXDIX.js
292
296
  chunk-S6XYTJU2.js
293
297
  chunk-SBSJWLH4.js
294
298
  chunk-SDMBTSYP.js
@@ -314,7 +318,6 @@ chunk-TZ5PVDAR.js
314
318
  chunk-UE5PIMY2.js
315
319
  chunk-UEWARAPX.js
316
320
  chunk-UFMLNNPI.js
317
- chunk-UHGCH62I.js
318
321
  chunk-UIPXBXOZ.js
319
322
  chunk-UJBW7FVI.js
320
323
  chunk-UL77JFUV.js
@@ -385,7 +388,6 @@ chunk-YKONRK6A.js
385
388
  chunk-YKVLG4SZ.js
386
389
  chunk-YLQAQHRT.js
387
390
  chunk-YNHPTUHS.js
388
- chunk-YOEQ5XYL.js
389
391
  chunk-YOFY27RM.js
390
392
  chunk-YOIQPXYX.js
391
393
  chunk-YPJYLZFE.js
@@ -410,7 +412,6 @@ chunk-ZMH7UZNP.js
410
412
  chunk-ZN3Q7UFD.js
411
413
  chunk-ZN4PSZSA.js
412
414
  chunk-ZSHH4XS6.js
413
- chunk-ZX6ER2OQ.js
414
415
  chunk-ZYK7V4PG.js
415
416
  clean-N5ZBCTOB.js
416
417
  cliHook-7PQM2WTM.js
@@ -475,7 +476,7 @@ deps-RSUOIZPE.js
475
476
  docsConfirm-7BB72JTA.js
476
477
  docsScreenshots-JDCKHHDG.js
477
478
  docsUnlock-5LTKHHCE.js
478
- doctorNodes-YW6BHEZN.js
479
+ doctorNodes-BKNH3XH7.js
479
480
  done-OERWZMJP.js
480
481
  drainDaemon-AJVBJMP2.js
481
482
  dropRetiredTables-JBLALSG5.js
@@ -527,7 +528,7 @@ listRules-XBWM5DPH.js
527
528
  maintainability-WQN6JJJM.js
528
529
  merge-5FURAXPB.js
529
530
  mermaidExport-A4CVGAWQ.js
530
- migrate-7X37KMKS.js
531
+ migrate-GCUCBKXC.js
531
532
  migrations-IRD7J2BD.js
532
533
  move-RN4LE2SW.js
533
534
  movePhase-MAP42ZMQ.js
@@ -582,15 +583,15 @@ repos-PPGMWO4B.js
582
583
  resolveHarness-Q53GCTJE.js
583
584
  resolveModel-G7GJGUAY.js
584
585
  restartDaemon-SGNXXO6H.js
585
- restartNode-N3IM4TDI.js
586
+ restartNode-FERKTPPG.js
586
587
  restructure-NBVT3EZS.js
587
- review-6ZV6272L.js
588
+ review-CAWOM22J.js
588
589
  reviewPrComments-5LXAP6G5.js
589
590
  rewindPhase-HXENH4NQ.js
590
591
  rulesAdd-VIY2XT3H.js
591
592
  run-3F43QON5.js
592
593
  run-UJTFXZUG.js
593
- runDaemon-SEI6ZJF7.js
594
+ runDaemon-E342D57U.js
594
595
  runExtract-Q6OMVRSJ.js
595
596
  runParallelPhase-QECCEFMQ.js
596
597
  runRefine-TGDYSBIQ.js
@@ -612,7 +613,7 @@ show-SAD23YAK.js
612
613
  show-UI6QW7R7.js
613
614
  showClaudeCodeIcon-E4SAM3GN.js
614
615
  showCodexIcon-YUAKV4NI.js
615
- signExtension-BQRS7UL7.js
616
+ signExtension-XD3ZWXW7.js
616
617
  simulateDivergence-VB4UL4UR.js
617
618
  skip-TSCPOI7Q.js
618
619
  slack-VESXSF3I.js
@@ -638,18 +639,18 @@ unassignIssue-3CHBWPCW.js
638
639
  unlink-URWN5N5Q.js
639
640
  unlinkNode-GKFA7U4W.js
640
641
  unstar-3NROQLQD.js
641
- update-KD2UWY63.js
642
642
  update-RGQAZWZO.js
643
- updateNode-2SBZMP6Q.js
643
+ update-TZ7H4C2Z.js
644
+ updateNode-EVH7ATSQ.js
644
645
  updatePhase-3YMRLEB4.js
645
646
  updatePlan-VG5CYX7Z.js
646
647
  version-SD3HTBJ2.js
647
648
  viewIssue-N6W53LSK.js
648
649
  watchLoop-MV7DVGC6.js
649
650
  watchReport-A4W7UOAJ.js
650
- watchWait-YYMDQTOI.js
651
- web-BNY5FW4L.js
652
- web-JGCY4D2D.js
651
+ watchWait-3ROYFVMY.js
652
+ web-IQDTOLUZ.js
653
+ web-LXKGHGU5.js
653
654
  withPool-OXM4WN4L.js
654
655
  wontdo-I4M7APVY.js
655
656
  wontfix-WGDQ5UU4.js
@@ -1 +1 @@
1
- 0.1217.3
1
+ 0.1217.5
@@ -14,7 +14,7 @@ import {
14
14
  isHello,
15
15
  linkVersionCheck,
16
16
  negotiateProtocol
17
- } from "./chunk-6SQNK6Q5.js";
17
+ } from "./chunk-5LSPCC7W.js";
18
18
 
19
19
  // src/commands/sessions/nodes/probePeerHello.ts
20
20
  var HELLO_TIMEOUT_MS = 5e3;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-X4QB3FR2.js";
4
4
  import {
5
5
  package_default
6
- } from "./chunk-PUOEMDKJ.js";
6
+ } from "./chunk-KMFYHSFK.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-TH42OUCW.js";
@@ -40,6 +40,25 @@ function ghFailure(error) {
40
40
  return error instanceof Error ? error.message : "gh api failed";
41
41
  }
42
42
 
43
+ // src/shared/ghRawFileAtSha.ts
44
+ import { execFile } from "child_process";
45
+ import { promisify } from "util";
46
+ var execFileAsync = promisify(execFile);
47
+ async function ghRawFileAtSha(repo, sha, path, maxBuffer) {
48
+ const encodedPath = path.split("/").map(encodeURIComponent).join("/");
49
+ const { stdout } = await execFileAsync(
50
+ "gh",
51
+ [
52
+ "api",
53
+ "-H",
54
+ "Accept: application/vnd.github.raw",
55
+ `repos/${repo}/contents/${encodedPath}?ref=${sha}`
56
+ ],
57
+ { encoding: "utf8", windowsHide: true, maxBuffer }
58
+ );
59
+ return stdout;
60
+ }
61
+
43
62
  // src/commands/review/highLevel/progressStore/migrateHighLevelDrafts.ts
44
63
  import { existsSync as existsSync2, readdirSync, rmSync } from "fs";
45
64
  import { dirname as dirname2, join as join3 } from "path";
@@ -221,6 +240,7 @@ export {
221
240
  redactConfigSecrets,
222
241
  configEntryLayers,
223
242
  ghFailure,
243
+ ghRawFileAtSha,
224
244
  highLevelReviewPath,
225
245
  readJsonFile,
226
246
  writeJsonFile,
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-JM57BCD6.js";
11
11
  import {
12
12
  firstBrokenHop
13
- } from "./chunk-ZX6ER2OQ.js";
13
+ } from "./chunk-K4KEGWZH.js";
14
14
  import {
15
15
  describePeerError,
16
16
  fetchPeerJson
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  ASSIST_VERSION,
50
50
  PROTOCOL_VERSION
51
- } from "./chunk-6SQNK6Q5.js";
51
+ } from "./chunk-5LSPCC7W.js";
52
52
  import {
53
53
  findLinkSpec
54
54
  } from "./chunk-JWMBBFAS.js";
@@ -89,11 +89,12 @@ import {
89
89
  import {
90
90
  configEntryLayers,
91
91
  ghFailure,
92
+ ghRawFileAtSha,
92
93
  isRedactedSecret,
93
94
  loadHighLevelProgress,
94
95
  redactConfigSecrets,
95
96
  saveHighLevelProgress
96
- } from "./chunk-FLYNSV6L.js";
97
+ } from "./chunk-BAIGEXPY.js";
97
98
  import {
98
99
  stripAnsi
99
100
  } from "./chunk-YJ72SXVD.js";
@@ -2865,9 +2866,6 @@ async function githubAttachment(req, res) {
2865
2866
  }
2866
2867
 
2867
2868
  // src/commands/sessions/web/githubFileContent.ts
2868
- import { execFile as execFile5 } from "child_process";
2869
- import { promisify as promisify5 } from "util";
2870
- var execFileAsync5 = promisify5(execFile5);
2871
2869
  var MAX_FILE_BYTES2 = 2 * 1024 * 1024;
2872
2870
  var REPO2 = /^[\w.-]+\/[\w.-]+$/;
2873
2871
  var SHA = /^[0-9a-f]{7,40}$/i;
@@ -2883,19 +2881,9 @@ async function githubFileContent(req, res) {
2883
2881
  respondJson(res, 400, { error: "Invalid repo, sha or path" });
2884
2882
  return;
2885
2883
  }
2886
- const encodedPath = path7.split("/").map(encodeURIComponent).join("/");
2887
2884
  try {
2888
- const { stdout } = await execFileAsync5(
2889
- "gh",
2890
- [
2891
- "api",
2892
- "-H",
2893
- "Accept: application/vnd.github.raw",
2894
- `repos/${repo}/contents/${encodedPath}?ref=${sha}`
2895
- ],
2896
- { encoding: "utf8", windowsHide: true, maxBuffer: MAX_FILE_BYTES2 }
2897
- );
2898
- respondJson(res, 200, { content: stdout });
2885
+ const content = await ghRawFileAtSha(repo, sha, path7, MAX_FILE_BYTES2);
2886
+ respondJson(res, 200, { content });
2899
2887
  } catch (error) {
2900
2888
  respondJson(res, 502, { error: ghFailure(error) });
2901
2889
  }
@@ -3802,7 +3790,7 @@ async function fetchLinkStateChunks(refs, query) {
3802
3790
  }
3803
3791
 
3804
3792
  // src/commands/sessions/web/linkStatus/queryLinkStates.ts
3805
- import { execFile as execFile6 } from "child_process";
3793
+ import { execFile as execFile5 } from "child_process";
3806
3794
 
3807
3795
  // src/commands/sessions/web/linkStatus/linkItemState.ts
3808
3796
  function issueState({ state, stateReason }) {
@@ -3844,7 +3832,7 @@ function linkStatusQuery(refs) {
3844
3832
  // src/commands/sessions/web/linkStatus/queryLinkStates.ts
3845
3833
  function runGraphql(input) {
3846
3834
  return new Promise((resolve3, reject) => {
3847
- const child2 = execFile6(
3835
+ const child2 = execFile5(
3848
3836
  "gh",
3849
3837
  ["api", "graphql", "--input", "-"],
3850
3838
  { encoding: "utf8", windowsHide: true, maxBuffer: 16 * 1024 * 1024 },
@@ -4123,9 +4111,9 @@ function newsNavConfig(_req, res) {
4123
4111
  }
4124
4112
 
4125
4113
  // src/commands/sessions/web/releases/ghJson.ts
4126
- import { execFile as execFile7 } from "child_process";
4127
- import { promisify as promisify6 } from "util";
4128
- var execFileAsync6 = promisify6(execFile7);
4114
+ import { execFile as execFile6 } from "child_process";
4115
+ import { promisify as promisify5 } from "util";
4116
+ var execFileAsync5 = promisify5(execFile6);
4129
4117
  var CACHE_TTL_MS7 = 3e4;
4130
4118
  var cache4 = /* @__PURE__ */ new Map();
4131
4119
  function partialGraphqlData(error) {
@@ -4140,7 +4128,7 @@ function partialGraphqlData(error) {
4140
4128
  }
4141
4129
  async function runGh(cwd, args) {
4142
4130
  try {
4143
- const { stdout } = await execFileAsync6("gh", args, {
4131
+ const { stdout } = await execFileAsync5("gh", args, {
4144
4132
  encoding: "utf8",
4145
4133
  windowsHide: true,
4146
4134
  cwd,
@@ -5668,8 +5656,8 @@ function listUsageJobs(req, res) {
5668
5656
 
5669
5657
  // src/commands/sessions/web/openInCode.ts
5670
5658
  import { exec } from "child_process";
5671
- import { promisify as promisify7 } from "util";
5672
- var execAsync = promisify7(exec);
5659
+ import { promisify as promisify6 } from "util";
5660
+ var execAsync = promisify6(exec);
5673
5661
  async function openInCode(req, res) {
5674
5662
  const cwd = getCwdParam(req, res);
5675
5663
  if (!cwd) return;
@@ -5685,9 +5673,9 @@ async function openInCode(req, res) {
5685
5673
  }
5686
5674
 
5687
5675
  // src/commands/sessions/web/createCachedGhJson.ts
5688
- import { execFile as execFile8 } from "child_process";
5689
- import { promisify as promisify8 } from "util";
5690
- var execFileAsync7 = promisify8(execFile8);
5676
+ import { execFile as execFile7 } from "child_process";
5677
+ import { promisify as promisify7 } from "util";
5678
+ var execFileAsync6 = promisify7(execFile7);
5691
5679
  var CACHE_TTL_MS8 = 3e4;
5692
5680
  function createCachedGhJson(args, parse, fallback, options = {}) {
5693
5681
  const { cacheFallback = true } = options;
@@ -5699,7 +5687,7 @@ function createCachedGhJson(args, parse, fallback, options = {}) {
5699
5687
  if (cached2 && cached2.expires > now) return cached2.value;
5700
5688
  let value = fallback;
5701
5689
  try {
5702
- const { stdout } = await execFileAsync7("gh", [...args, ...extraArgs], {
5690
+ const { stdout } = await execFileAsync6("gh", [...args, ...extraArgs], {
5703
5691
  encoding: "utf8",
5704
5692
  windowsHide: true,
5705
5693
  cwd
@@ -5768,12 +5756,12 @@ async function previewImage(req, res) {
5768
5756
  }
5769
5757
 
5770
5758
  // src/commands/sessions/web/getCurrentBranch.ts
5771
- import { execFile as execFile9 } from "child_process";
5772
- import { promisify as promisify9 } from "util";
5773
- var execFileAsync8 = promisify9(execFile9);
5759
+ import { execFile as execFile8 } from "child_process";
5760
+ import { promisify as promisify8 } from "util";
5761
+ var execFileAsync7 = promisify8(execFile8);
5774
5762
  async function getCurrentBranch(cwd) {
5775
5763
  try {
5776
- const { stdout } = await execFileAsync8(
5764
+ const { stdout } = await execFileAsync7(
5777
5765
  "git",
5778
5766
  ["rev-parse", "--abbrev-ref", "HEAD"],
5779
5767
  { encoding: "utf8", windowsHide: true, cwd }
@@ -7489,11 +7477,11 @@ async function uploadPrImage(req, res) {
7489
7477
  import { readFile as readFile2, stat as stat3, writeFile } from "fs/promises";
7490
7478
 
7491
7479
  // src/commands/sessions/web/formatWithOxfmt.ts
7492
- import { execFile as execFile10 } from "child_process";
7480
+ import { execFile as execFile9 } from "child_process";
7493
7481
  import { existsSync as existsSync7 } from "fs";
7494
7482
  import { dirname as dirname2, join as join7 } from "path";
7495
- import { promisify as promisify10 } from "util";
7496
- var execFileAsync9 = promisify10(execFile10);
7483
+ import { promisify as promisify9 } from "util";
7484
+ var execFileAsync8 = promisify9(execFile9);
7497
7485
  var TIMEOUT_MS = 15e3;
7498
7486
  function findOxfmtScript(root) {
7499
7487
  let dir = root;
@@ -7508,7 +7496,7 @@ function findOxfmtScript(root) {
7508
7496
  async function formatWithOxfmt(target, root) {
7509
7497
  const script = findOxfmtScript(root);
7510
7498
  if (!script) return;
7511
- await execFileAsync9(process.execPath, [script, target], {
7499
+ await execFileAsync8(process.execPath, [script, target], {
7512
7500
  cwd: root,
7513
7501
  windowsHide: true,
7514
7502
  timeout: TIMEOUT_MS
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildDoctorProbes,
3
3
  diagnoseLink
4
- } from "./chunk-S6XQXDIX.js";
4
+ } from "./chunk-3RAEAQWV.js";
5
5
  import {
6
6
  findLinkSpec
7
7
  } from "./chunk-JWMBBFAS.js";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@staff0rd/assist",
4
- version: "0.1217.3",
4
+ version: "0.1217.5",
5
5
  type: "module",
6
6
  main: "dist/index.js",
7
7
  bin: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  firstBrokenHop
3
- } from "./chunk-ZX6ER2OQ.js";
3
+ } from "./chunk-K4KEGWZH.js";
4
4
  import {
5
5
  describePeerError
6
6
  } from "./chunk-VABNWHSE.js";
@@ -0,0 +1,36 @@
1
+ import {
2
+ loadConfig
3
+ } from "./chunk-TH42OUCW.js";
4
+
5
+ // src/commands/migrateAfterUpdate.ts
6
+ import { execFileSync } from "child_process";
7
+
8
+ // src/commands/db/isDatabaseConfigured.ts
9
+ function isDatabaseConfigured() {
10
+ return Boolean(process.env.ASSIST_DATABASE_URL ?? loadConfig().database.url);
11
+ }
12
+
13
+ // src/commands/migrateAfterUpdate.ts
14
+ function migrateAfterUpdate() {
15
+ if (!isDatabaseConfigured()) {
16
+ console.log("No database configured; skipping migrations.");
17
+ return;
18
+ }
19
+ console.log("Applying released migrations...");
20
+ try {
21
+ execFileSync(
22
+ process.execPath,
23
+ [process.argv[1], "db", "migrate", "--after-update"],
24
+ { stdio: "inherit" }
25
+ );
26
+ } catch (error) {
27
+ console.error(
28
+ `Failed to apply migrations: ${error instanceof Error ? error.message : String(error)}`
29
+ );
30
+ console.error("Run `assist db migrate` to apply them.");
31
+ }
32
+ }
33
+
34
+ export {
35
+ migrateAfterUpdate
36
+ };