@staff0rd/assist 0.1186.0 → 0.1188.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.
Files changed (27) hide show
  1. package/agent/commands/github.md +6 -3
  2. package/dist/.build-files +20 -21
  3. package/dist/built-version +1 -1
  4. package/dist/{chunk-2TFVO6FJ.js → chunk-66T4P3GU.js} +1 -1
  5. package/dist/{chunk-WG3TXZMV.js → chunk-DPCFT55U.js} +16 -6
  6. package/dist/{chunk-ONODYZ2H.js → chunk-IEDFQBJI.js} +66 -4
  7. package/dist/{chunk-HJA2C6EP.js → chunk-IT5MTJVS.js} +1 -1
  8. package/dist/{chunk-MJ4RLQ5N.js → chunk-Q4TGGE5L.js} +0 -63
  9. package/dist/{chunk-WH3YSTWQ.js → chunk-RYYZPXIG.js} +1 -1
  10. package/dist/{chunk-ZYOSEPXM.js → chunk-SSRDOW3C.js} +1 -1
  11. package/dist/{chunk-ZDCNWRGU.js → chunk-UNIH25QO.js} +1 -1
  12. package/dist/{chunk-7XBRJ63U.js → chunk-UZCVA7F5.js} +5 -7
  13. package/dist/commands/sessions/web/bundle.js +1 -1
  14. package/dist/{createIssue-5KNMMJVA.js → createIssue-TDZZAPQQ.js} +45 -38
  15. package/dist/{doctorNodes-ZDTNLDHK.js → doctorNodes-J65UAEA6.js} +3 -3
  16. package/dist/{edit-5QLQ3TLJ.js → edit-R2ZKDIGP.js} +6 -7
  17. package/dist/{editIssue-MPKFMOLQ.js → editIssue-RBWIZISY.js} +144 -55
  18. package/dist/index.js +48 -30
  19. package/dist/{raise-O7DVXVP6.js → raise-BUPAYCZY.js} +6 -7
  20. package/dist/{restartNode-ZM73BIZ4.js → restartNode-LKXFQH7A.js} +5 -5
  21. package/dist/{runDaemon-QU6S6FVH.js → runDaemon-MKBJQQQD.js} +2 -2
  22. package/dist/{signExtension-VSB6MSLB.js → signExtension-3GB33JGZ.js} +1 -1
  23. package/dist/{updateNode-SRU5E3O3.js → updateNode-ZOKPR26K.js} +5 -5
  24. package/dist/{web-GRLY54Q4.js → web-H4VA5QZT.js} +6 -7
  25. package/dist/{web-RXI5PSBM.js → web-QATICXWA.js} +6 -7
  26. package/package.json +1 -1
  27. package/dist/chunk-S6FVZYHH.js +0 -16
@@ -48,14 +48,16 @@ Display the result to the user.
48
48
  Rework the issue's body in the assist web preview pane. This is what a bare issue reference runs. Run it and nothing else:
49
49
 
50
50
  ```
51
- assist github issue edit <number> -R <owner>/<repo> 2>&1
51
+ assist github issue edit <number> -R <owner>/<repo> [--screenshot '[Group/]Caption=path']... 2>&1
52
52
  ```
53
53
 
54
54
  If you already know the body you want (e.g. the user asked for a specific rewrite), read the current body with `gh issue view`, compose the revision, and pass it with `--body -` on stdin so the first preview shows your proposal rather than the unchanged body.
55
55
 
56
+ When you already have an image or video to add to the issue (e.g. a file the user pointed at on disk), pass it with `--screenshot '[Group/]Caption=path'`, once per file, rather than asking the user to drop it into the preview. It is attached under the body's `## Screenshots` section for you; never author that section yourself.
57
+
56
58
  For a targeted change to the current body (strike items out, tick a box), run `assist github issue edit <number> -R <owner>/<repo> --fetch` first: it writes the current body to the working file and prints its path without opening a preview. Edit that file in place, then run the command without `--fetch` so the first preview shows your revision. Never run it without `--fetch` just to get the body.
57
59
 
58
- Do not check for a web session yourself — the command already knows. In a web session it fetches the issue's current body, opens it in the preview pane, and pushes the pane's markdown back on approval; outside one it just prints the issue. Only the body is ever touched — the title, labels, assignees and state are left alone.
60
+ Do not check for a web session yourself — the command already knows. In a web session it fetches the issue's current body, opens it in the preview pane, and pushes the pane's markdown back on approval; outside one it just prints the issue, or with `--screenshot` attaches the files to the current body directly. Only the body is ever touched — the title, labels, assignees and state are left alone.
59
61
 
60
62
  Display the output so the user can see what happened. If the command exits non-zero, relay what it reported and stop — nothing was pushed. Two cases to relay verbatim:
61
63
 
@@ -83,13 +85,14 @@ Create a new issue from a free-form request (e.g. `create bug against owner/repo
83
85
 
84
86
  - **Milestone** — the milestone's title, passed as named; the command matches it against the repo's open milestones.
85
87
  - **Type** and **parent** — only if the request names them.
88
+ - **Screenshots** — when you already have an image or video to include (e.g. a file the user pointed at on disk), pass it with `--screenshot '[Group/]Caption=path'`, once per file, rather than asking the user to drop it into the preview. It is attached under `## Screenshots` for you.
86
89
 
87
90
  If a named project, label or milestone doesn't match, list the available ones and ask the user which they meant (or whether to drop it). Never guess a near match or silently omit it. For a milestone, check `gh api repos/<owner>/<repo>/milestones --jq '.[].title'` before running, or relay the list the command prints when it rejects the name.
88
91
 
89
92
  Then run the command bare, as a background task, and do no other work until it returns — in a web session it blocks on the preview pane until the user approves or rejects:
90
93
 
91
94
  ```
92
- assist github issue create -R <owner>/<repo> --title "<title>" --body "<body>" [--label <name>]... [--project <number>] [--status <name>] [--milestone <name>] [--type <name>] [--parent <issue>] 2>&1
95
+ assist github issue create -R <owner>/<repo> --title "<title>" --body "<body>" [--label <name>]... [--project <number>] [--status <name>] [--milestone <name>] [--type <name>] [--parent <issue>] [--screenshot '[Group/]Caption=path']... 2>&1
93
96
  ```
94
97
 
95
98
  Every option is resolved before the preview, so an unknown name creates nothing. Relay the outcome:
package/dist/.build-files CHANGED
@@ -39,7 +39,6 @@ chunk-2KG6ZPX4.js
39
39
  chunk-2MG2THMQ.js
40
40
  chunk-2RUGZQUD.js
41
41
  chunk-2RYBRXTJ.js
42
- chunk-2TFVO6FJ.js
43
42
  chunk-3HNTLFII.js
44
43
  chunk-3JXMQFUS.js
45
44
  chunk-3KLTYFPV.js
@@ -70,6 +69,7 @@ chunk-5YO2D7JF.js
70
69
  chunk-655A7RGF.js
71
70
  chunk-664TLOAJ.js
72
71
  chunk-66K6EK7O.js
72
+ chunk-66T4P3GU.js
73
73
  chunk-67DONCGH.js
74
74
  chunk-6DGPQ67E.js
75
75
  chunk-6G2ADBNV.js
@@ -89,7 +89,6 @@ chunk-7NPZZRMK.js
89
89
  chunk-7NZOH4LN.js
90
90
  chunk-7SMQSAXT.js
91
91
  chunk-7TAUUXVY.js
92
- chunk-7XBRJ63U.js
93
92
  chunk-A2XSU5K6.js
94
93
  chunk-A7ONLVZD.js
95
94
  chunk-ABLDOQ4B.js
@@ -132,6 +131,7 @@ chunk-D7UZLH36.js
132
131
  chunk-DGQ7KOW4.js
133
132
  chunk-DIAC4XYA.js
134
133
  chunk-DISNKALJ.js
134
+ chunk-DPCFT55U.js
135
135
  chunk-DS2YJZZY.js
136
136
  chunk-DUNO7WBT.js
137
137
  chunk-DZBGDSCK.js
@@ -177,7 +177,6 @@ chunk-HCANRBFK.js
177
177
  chunk-HCYTW3DN.js
178
178
  chunk-HI6T3DND.js
179
179
  chunk-HIOA4WIF.js
180
- chunk-HJA2C6EP.js
181
180
  chunk-HKGCLAZ7.js
182
181
  chunk-HN7MFXZ7.js
183
182
  chunk-HPV2ZVOX.js
@@ -186,12 +185,14 @@ chunk-I3TEQBTO.js
186
185
  chunk-IBPSXDUB.js
187
186
  chunk-IBVCCKC3.js
188
187
  chunk-IDRVSAV5.js
188
+ chunk-IEDFQBJI.js
189
189
  chunk-IHZGFTOB.js
190
190
  chunk-IISY3AMC.js
191
191
  chunk-IKCS5JTK.js
192
192
  chunk-IOKBCYSG.js
193
193
  chunk-IOYGR6YV.js
194
194
  chunk-ISIVSUR5.js
195
+ chunk-IT5MTJVS.js
195
196
  chunk-IULYBBGP.js
196
197
  chunk-IVBWOIGE.js
197
198
  chunk-IXVSWYW2.js
@@ -234,7 +235,6 @@ chunk-M3O2BTJG.js
234
235
  chunk-M6MAQU3Z.js
235
236
  chunk-MFTQLD5M.js
236
237
  chunk-MJ44T7R4.js
237
- chunk-MJ4RLQ5N.js
238
238
  chunk-MJLABLH5.js
239
239
  chunk-MRUIXQXS.js
240
240
  chunk-MT2LAO3P.js
@@ -258,7 +258,6 @@ chunk-O6HFT23O.js
258
258
  chunk-O6RBWPG2.js
259
259
  chunk-ODLSWRTS.js
260
260
  chunk-OLE7XSNB.js
261
- chunk-ONODYZ2H.js
262
261
  chunk-OQ6AYXHB.js
263
262
  chunk-ORSRBZ2X.js
264
263
  chunk-OU6Q5ZS3.js
@@ -275,6 +274,7 @@ chunk-PIDKNOD6.js
275
274
  chunk-PNDUTAZR.js
276
275
  chunk-PURNABFX.js
277
276
  chunk-PZAEU7LL.js
277
+ chunk-Q4TGGE5L.js
278
278
  chunk-Q6PZLPK4.js
279
279
  chunk-Q7YVMIA3.js
280
280
  chunk-QAJUCN3A.js
@@ -299,8 +299,8 @@ chunk-RW6YKTIM.js
299
299
  chunk-RWVRH774.js
300
300
  chunk-RXFNQQZC.js
301
301
  chunk-RXKI4XAU.js
302
+ chunk-RYYZPXIG.js
302
303
  chunk-RZBCBCNG.js
303
- chunk-S6FVZYHH.js
304
304
  chunk-S6XYTJU2.js
305
305
  chunk-SDMBTSYP.js
306
306
  chunk-SHWMHL7S.js
@@ -308,6 +308,7 @@ chunk-SN2GTNL4.js
308
308
  chunk-SQX66MN6.js
309
309
  chunk-SSKHLBQB.js
310
310
  chunk-SSOJWOYS.js
311
+ chunk-SSRDOW3C.js
311
312
  chunk-SURCYYQ6.js
312
313
  chunk-SVCR2A7L.js
313
314
  chunk-SW7FSLHP.js
@@ -329,10 +330,12 @@ chunk-UFSOFNXQ.js
329
330
  chunk-UGICWHVH.js
330
331
  chunk-UJBW7FVI.js
331
332
  chunk-UN4ABKA7.js
333
+ chunk-UNIH25QO.js
332
334
  chunk-UP6QV5BJ.js
333
335
  chunk-UPGNKZVA.js
334
336
  chunk-USKD27FY.js
335
337
  chunk-UYSNEOWQ.js
338
+ chunk-UZCVA7F5.js
336
339
  chunk-V3AWLJ7P.js
337
340
  chunk-VABNWHSE.js
338
341
  chunk-VAFCLLQN.js
@@ -349,9 +352,7 @@ chunk-W5FPQALS.js
349
352
  chunk-W6UBSIJA.js
350
353
  chunk-W7TRZLEM.js
351
354
  chunk-WDODIKZ4.js
352
- chunk-WG3TXZMV.js
353
355
  chunk-WGDN4CNI.js
354
- chunk-WH3YSTWQ.js
355
356
  chunk-WOGUXGZS.js
356
357
  chunk-WTONCI74.js
357
358
  chunk-WUMARDUD.js
@@ -400,7 +401,6 @@ chunk-Z2R2O27D.js
400
401
  chunk-Z2YQQYCQ.js
401
402
  chunk-Z64YKE5O.js
402
403
  chunk-ZABRGL2F.js
403
- chunk-ZDCNWRGU.js
404
404
  chunk-ZDSSSQZZ.js
405
405
  chunk-ZDWZ2VI3.js
406
406
  chunk-ZFX4EZMW.js
@@ -411,7 +411,6 @@ chunk-ZMW2VHAF.js
411
411
  chunk-ZN5LRXXN.js
412
412
  chunk-ZSHH4XS6.js
413
413
  chunk-ZYK7V4PG.js
414
- chunk-ZYOSEPXM.js
415
414
  chunk-ZZVYRC77.js
416
415
  clean-N5ZBCTOB.js
417
416
  cliHook-2K2PQZOJ.js
@@ -464,7 +463,7 @@ configSet-NMSZ27OX.js
464
463
  configUnset-IINMDUOO.js
465
464
  configure-M2ECXTUT.js
466
465
  coverage-G7J25BUX.js
467
- createIssue-5KNMMJVA.js
466
+ createIssue-TDZZAPQQ.js
468
467
  cyclomatic-CYUIP7H3.js
469
468
  daemonStatus-EAZHBC6O.js
470
469
  del-6CB5KFFD.js
@@ -476,13 +475,13 @@ deps-RSUOIZPE.js
476
475
  docsConfirm-AQGXUXUM.js
477
476
  docsScreenshots-VV5F5SK5.js
478
477
  docsUnlock-27IXZHHP.js
479
- doctorNodes-ZDTNLDHK.js
478
+ doctorNodes-J65UAEA6.js
480
479
  done-3VAD7V2R.js
481
480
  drainDaemon-ZHP2VY7D.js
482
481
  dropRetiredTables-JBLALSG5.js
483
- edit-5QLQ3TLJ.js
482
+ edit-R2ZKDIGP.js
484
483
  editHook-S6MCRMW4.js
485
- editIssue-MPKFMOLQ.js
484
+ editIssue-RBWIZISY.js
486
485
  editIssueComment-3E3SBBJE.js
487
486
  exportBacklog-ZTMILEAX.js
488
487
  extension-YYRD5EM6.js
@@ -556,7 +555,7 @@ prs-2SRUKVTI.js
556
555
  prsSlackChannel-QGXDVDOM.js
557
556
  prsStatus-6G3ZTK36.js
558
557
  pullIfConfigured-ATTGJC3C.js
559
- raise-O7DVXVP6.js
558
+ raise-BUPAYCZY.js
560
559
  raiseHelpText-IDZI3UAC.js
561
560
  ravendbAuth-QCLMPEJ3.js
562
561
  ravendbCollections-L4H5PMFE.js
@@ -583,7 +582,7 @@ repos-HRCIMY6J.js
583
582
  resolveHarness-ADZRYQZA.js
584
583
  resolveModel-2OGVGUM3.js
585
584
  restartDaemon-Y7V2QF3N.js
586
- restartNode-ZM73BIZ4.js
585
+ restartNode-LKXFQH7A.js
587
586
  restructure-OGGDZTXX.js
588
587
  review-5635HCXL.js
589
588
  reviewPrComments-E5Y5AQ7D.js
@@ -591,7 +590,7 @@ rewindPhase-S6NGWRFK.js
591
590
  rulesAdd-75UVUUDX.js
592
591
  run-TSPTUSMX.js
593
592
  run-ZRNTAO7O.js
594
- runDaemon-QU6S6FVH.js
593
+ runDaemon-MKBJQQQD.js
595
594
  runExtract-ALNQ3I3T.js
596
595
  runParallelPhase-V2LPUTA3.js
597
596
  runRefine-DSGHXEKJ.js
@@ -613,7 +612,7 @@ show-INQEZ755.js
613
612
  show-WD57SDPL.js
614
613
  showClaudeCodeIcon-E4SAM3GN.js
615
614
  showCodexIcon-YUAKV4NI.js
616
- signExtension-VSB6MSLB.js
615
+ signExtension-3GB33JGZ.js
617
616
  simulateDivergence-VB4UL4UR.js
618
617
  skip-7Q3IVOBV.js
619
618
  slack-DX2FRJ7S.js
@@ -641,7 +640,7 @@ unlinkNode-RKC44U2T.js
641
640
  unstar-YQDZUJV7.js
642
641
  update-FHGTCK6N.js
643
642
  update-W7ANHGDR.js
644
- updateNode-SRU5E3O3.js
643
+ updateNode-ZOKPR26K.js
645
644
  updatePhase-JEVJRAOR.js
646
645
  updatePlan-PYKAHGKE.js
647
646
  version-W7VP7LDJ.js
@@ -649,8 +648,8 @@ viewIssue-CYHIPCFO.js
649
648
  watchLoop-MV7DVGC6.js
650
649
  watchReport-A4W7UOAJ.js
651
650
  watchWait-5Y2J5VQY.js
652
- web-GRLY54Q4.js
653
- web-RXI5PSBM.js
651
+ web-H4VA5QZT.js
652
+ web-QATICXWA.js
654
653
  withPool-LEJ76IOJ.js
655
654
  wontdo-XAQGHSR5.js
656
655
  wontfix-W2DXPEE4.js
@@ -1 +1 @@
1
- 0.1186.0
1
+ 0.1188.0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  firstBrokenHop
3
- } from "./chunk-ZDCNWRGU.js";
3
+ } from "./chunk-UNIH25QO.js";
4
4
  import {
5
5
  describePeerError
6
6
  } from "./chunk-VABNWHSE.js";
@@ -1,6 +1,14 @@
1
- import {
2
- stagedAttachmentsDir
3
- } from "./chunk-S6FVZYHH.js";
1
+ // src/shared/stagedAttachmentsDir.ts
2
+ import { homedir } from "os";
3
+ import { join } from "path";
4
+ var stagedAttachmentsDir = join(homedir(), ".assist", "attachments");
5
+
6
+ // src/shared/isStagedAttachmentPath.ts
7
+ import { isAbsolute, relative, resolve, sep } from "path";
8
+ function isStagedAttachmentPath(path) {
9
+ const rel = relative(stagedAttachmentsDir, resolve(path));
10
+ return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
11
+ }
4
12
 
5
13
  // src/commands/sessions/web/attachmentContentType.ts
6
14
  import { extname } from "path";
@@ -32,7 +40,7 @@ var ghAttachableExtensions = /* @__PURE__ */ new Set([
32
40
 
33
41
  // src/commands/sessions/web/stageAttachment.ts
34
42
  import { mkdir, mkdtemp, writeFile } from "fs/promises";
35
- import { extname as extname2, join } from "path";
43
+ import { extname as extname2, join as join2 } from "path";
36
44
  function extensionFromMime(contentType) {
37
45
  const mime = contentType.split(";")[0].trim().toLowerCase();
38
46
  const known = attachmentMimeTypes[mime];
@@ -56,14 +64,16 @@ function safeBaseName(name) {
56
64
  async function stageAttachment(name, contentType, body) {
57
65
  const ext = pickExtension(name, contentType);
58
66
  await mkdir(stagedAttachmentsDir, { recursive: true });
59
- const dir = await mkdtemp(join(stagedAttachmentsDir, "upload-"));
67
+ const dir = await mkdtemp(join2(stagedAttachmentsDir, "upload-"));
60
68
  const alt = safeBaseName(name);
61
- const filePath = join(dir, `${alt}.${ext}`);
69
+ const filePath = join2(dir, `${alt}.${ext}`);
62
70
  await writeFile(filePath, body);
63
71
  return { dir, filePath, alt };
64
72
  }
65
73
 
66
74
  export {
75
+ stagedAttachmentsDir,
76
+ isStagedAttachmentPath,
67
77
  attachmentContentType,
68
78
  ghAttachableExtensions,
69
79
  stageAttachment
@@ -2,8 +2,11 @@ import {
2
2
  minGhAttachVersion
3
3
  } from "./chunk-B7B26YPF.js";
4
4
  import {
5
- isStagedAttachmentPath
6
- } from "./chunk-S6FVZYHH.js";
5
+ attachmentContentType,
6
+ ghAttachableExtensions,
7
+ isStagedAttachmentPath,
8
+ stageAttachment
9
+ } from "./chunk-DPCFT55U.js";
7
10
 
8
11
  // src/commands/prs/renderScreenshotBlock.ts
9
12
  import { extname } from "path";
@@ -82,6 +85,62 @@ function appendScreenshots(body, attachments) {
82
85
  ${section}` : section;
83
86
  }
84
87
 
88
+ // src/commands/prs/parseScreenshotSpec.ts
89
+ import { statSync } from "fs";
90
+ import { basename, extname as extname2, resolve } from "path";
91
+ function splitOnce(value, separator) {
92
+ const index = value.indexOf(separator);
93
+ if (index === -1) return null;
94
+ return [value.slice(0, index), value.slice(index + separator.length)];
95
+ }
96
+ function isFile(path) {
97
+ try {
98
+ return statSync(path).isFile();
99
+ } catch {
100
+ return false;
101
+ }
102
+ }
103
+ function parseScreenshotSpec(spec) {
104
+ const [label, rawPath] = splitOnce(spec, "=") ?? ["", spec];
105
+ const [group, caption] = splitOnce(label, "/") ?? ["", label];
106
+ const path = resolve(rawPath.trim());
107
+ const ext = extname2(path).replace(/^\./, "").toLowerCase();
108
+ if (!isFile(path))
109
+ throw new Error(`--screenshot '${spec}': file not found: ${path}`);
110
+ if (!ghAttachableExtensions.has(ext))
111
+ throw new Error(
112
+ `--screenshot '${spec}': gh cannot attach .${ext || "(none)"} files (supported: ${[...ghAttachableExtensions].join(", ")}).`
113
+ );
114
+ const alt = caption.trim() || basename(path, extname2(path));
115
+ return group.trim() ? { path, alt, group: group.trim() } : { path, alt };
116
+ }
117
+
118
+ // src/commands/prs/parseScreenshotSpecs.ts
119
+ function parseScreenshotSpecs(specs) {
120
+ try {
121
+ return (specs ?? []).map(parseScreenshotSpec);
122
+ } catch (error) {
123
+ console.error(`Error: ${error.message}`);
124
+ process.exit(1);
125
+ }
126
+ }
127
+
128
+ // src/commands/prs/stageScreenshots.ts
129
+ import { readFile } from "fs/promises";
130
+ import { basename as basename2 } from "path";
131
+ function stageScreenshots(screenshots = []) {
132
+ return Promise.all(
133
+ screenshots.map(async (screenshot) => {
134
+ const { filePath } = await stageAttachment(
135
+ basename2(screenshot.path),
136
+ attachmentContentType(screenshot.path),
137
+ await readFile(screenshot.path)
138
+ );
139
+ return { ...screenshot, path: filePath };
140
+ })
141
+ );
142
+ }
143
+
85
144
  // src/commands/prs/attachArgs.ts
86
145
  function attachArgs(attachments) {
87
146
  return attachments.flatMap(({ path }) => ["--attach", path]);
@@ -89,7 +148,7 @@ function attachArgs(attachments) {
89
148
 
90
149
  // src/commands/prs/runGhWithAttachments.ts
91
150
  import { execFileSync } from "child_process";
92
- import { basename } from "path";
151
+ import { basename as basename3 } from "path";
93
152
 
94
153
  // src/shared/removeStagedAttachments.ts
95
154
  import { rmSync } from "fs";
@@ -106,7 +165,7 @@ function removeStagedAttachments(attachments) {
106
165
  var PLACED_URL = /https:\/\/\S+\/(pull|issues)\/\d+/;
107
166
  function reportPartialFailure(attachments, stderr) {
108
167
  const failed = attachments.filter(
109
- ({ path }) => stderr.includes(path) || stderr.includes(basename(path))
168
+ ({ path }) => stderr.includes(path) || stderr.includes(basename3(path))
110
169
  );
111
170
  const named = failed.length > 0 ? failed : attachments;
112
171
  console.error(
@@ -140,7 +199,10 @@ function runGhWithAttachments(args, attachments) {
140
199
  }
141
200
 
142
201
  export {
202
+ renderScreenshotsSection,
143
203
  appendScreenshots,
204
+ parseScreenshotSpecs,
205
+ stageScreenshots,
144
206
  attachArgs,
145
207
  runGhWithAttachments
146
208
  };
@@ -14,7 +14,7 @@ import {
14
14
  isHello,
15
15
  linkVersionCheck,
16
16
  negotiateProtocol
17
- } from "./chunk-ZYOSEPXM.js";
17
+ } from "./chunk-SSRDOW3C.js";
18
18
 
19
19
  // src/commands/sessions/nodes/probePeerHello.ts
20
20
  var HELLO_TIMEOUT_MS = 5e3;
@@ -4,55 +4,10 @@ import {
4
4
  import {
5
5
  normalizeGithubIssue
6
6
  } from "./chunk-FVZP4ULO.js";
7
- import {
8
- attachmentContentType,
9
- ghAttachableExtensions,
10
- stageAttachment
11
- } from "./chunk-WG3TXZMV.js";
12
7
  import {
13
8
  loadJson
14
9
  } from "./chunk-CGYVYHMM.js";
15
10
 
16
- // src/commands/prs/parseScreenshotSpec.ts
17
- import { statSync } from "fs";
18
- import { basename, extname, resolve } from "path";
19
- function splitOnce(value, separator) {
20
- const index = value.indexOf(separator);
21
- if (index === -1) return null;
22
- return [value.slice(0, index), value.slice(index + separator.length)];
23
- }
24
- function isFile(path) {
25
- try {
26
- return statSync(path).isFile();
27
- } catch {
28
- return false;
29
- }
30
- }
31
- function parseScreenshotSpec(spec) {
32
- const [label, rawPath] = splitOnce(spec, "=") ?? ["", spec];
33
- const [group, caption] = splitOnce(label, "/") ?? ["", label];
34
- const path = resolve(rawPath.trim());
35
- const ext = extname(path).replace(/^\./, "").toLowerCase();
36
- if (!isFile(path))
37
- throw new Error(`--screenshot '${spec}': file not found: ${path}`);
38
- if (!ghAttachableExtensions.has(ext))
39
- throw new Error(
40
- `--screenshot '${spec}': gh cannot attach .${ext || "(none)"} files (supported: ${[...ghAttachableExtensions].join(", ")}).`
41
- );
42
- const alt = caption.trim() || basename(path, extname(path));
43
- return group.trim() ? { path, alt, group: group.trim() } : { path, alt };
44
- }
45
-
46
- // src/commands/prs/parseScreenshotSpecs.ts
47
- function parseScreenshotSpecs(specs) {
48
- try {
49
- return (specs ?? []).map(parseScreenshotSpec);
50
- } catch (error) {
51
- console.error(`Error: ${error.message}`);
52
- process.exit(1);
53
- }
54
- }
55
-
56
11
  // src/commands/prs/findWallOfText.ts
57
12
  var MAX_PARAGRAPH_CHARS = 600;
58
13
  var MAX_PARAGRAPH_SENTENCES = 4;
@@ -152,26 +107,8 @@ ${sections.how}`);
152
107
  return parts.join("\n\n");
153
108
  }
154
109
 
155
- // src/commands/prs/stageScreenshots.ts
156
- import { readFile } from "fs/promises";
157
- import { basename as basename2 } from "path";
158
- function stageScreenshots(screenshots = []) {
159
- return Promise.all(
160
- screenshots.map(async (screenshot) => {
161
- const { filePath } = await stageAttachment(
162
- basename2(screenshot.path),
163
- attachmentContentType(screenshot.path),
164
- await readFile(screenshot.path)
165
- );
166
- return { ...screenshot, path: filePath };
167
- })
168
- );
169
- }
170
-
171
110
  export {
172
111
  renderWhy,
173
112
  buildPrBody,
174
- parseScreenshotSpecs,
175
- stageScreenshots,
176
113
  validatePrContent
177
114
  };
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@staff0rd/assist",
4
- version: "0.1186.0",
4
+ version: "0.1188.0",
5
5
  type: "module",
6
6
  main: "dist/index.js",
7
7
  bin: {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5CNDLMYO.js";
4
4
  import {
5
5
  package_default
6
- } from "./chunk-WH3YSTWQ.js";
6
+ } from "./chunk-RYYZPXIG.js";
7
7
  import {
8
8
  loadConfig
9
9
  } from "./chunk-UFSOFNXQ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildDoctorProbes,
3
3
  diagnoseLink
4
- } from "./chunk-HJA2C6EP.js";
4
+ } from "./chunk-IT5MTJVS.js";
5
5
  import {
6
6
  findLinkSpec
7
7
  } from "./chunk-J2PPCMCR.js";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-JM57BCD6.js";
11
11
  import {
12
12
  firstBrokenHop
13
- } from "./chunk-ZDCNWRGU.js";
13
+ } from "./chunk-UNIH25QO.js";
14
14
  import {
15
15
  describePeerError,
16
16
  fetchPeerJson
@@ -47,7 +47,7 @@ import {
47
47
  import {
48
48
  ASSIST_VERSION,
49
49
  PROTOCOL_VERSION
50
- } from "./chunk-ZYOSEPXM.js";
50
+ } from "./chunk-SSRDOW3C.js";
51
51
  import {
52
52
  findLinkSpec
53
53
  } from "./chunk-J2PPCMCR.js";
@@ -115,10 +115,6 @@ import {
115
115
  import {
116
116
  requestPromptSession
117
117
  } from "./chunk-XTQSKMFH.js";
118
- import {
119
- attachmentContentType,
120
- stageAttachment
121
- } from "./chunk-WG3TXZMV.js";
122
118
  import {
123
119
  isDoNotMerge
124
120
  } from "./chunk-NGTSPXSJ.js";
@@ -146,9 +142,11 @@ import {
146
142
  fetchProjectV2
147
143
  } from "./chunk-YQ3CNWB3.js";
148
144
  import {
145
+ attachmentContentType,
149
146
  isStagedAttachmentPath,
147
+ stageAttachment,
150
148
  stagedAttachmentsDir
151
- } from "./chunk-S6FVZYHH.js";
149
+ } from "./chunk-DPCFT55U.js";
152
150
  import {
153
151
  assignIssueToSelf
154
152
  } from "./chunk-SDMBTSYP.js";