@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
@@ -3,6 +3,14 @@ import {
3
3
  fetchIssueNodeId,
4
4
  resolveCreateIssueParent
5
5
  } from "./chunk-TZ5PVDAR.js";
6
+ import {
7
+ appendScreenshots,
8
+ attachArgs,
9
+ parseScreenshotSpecs,
10
+ renderScreenshotsSection,
11
+ runGhWithAttachments,
12
+ stageScreenshots
13
+ } from "./chunk-IEDFQBJI.js";
6
14
  import "./chunk-WYVUP7Z3.js";
7
15
  import {
8
16
  validateProposedContent
@@ -28,6 +36,8 @@ import {
28
36
  } from "./chunk-UE5PIMY2.js";
29
37
  import "./chunk-QRTB7PVR.js";
30
38
  import "./chunk-3VDV7VHX.js";
39
+ import "./chunk-B7B26YPF.js";
40
+ import "./chunk-DPCFT55U.js";
31
41
  import "./chunk-4BVUY25U.js";
32
42
  import "./chunk-ZFX4EZMW.js";
33
43
  import "./chunk-DISNKALJ.js";
@@ -71,14 +81,8 @@ function fetchIssue(number, repo) {
71
81
  }
72
82
  }
73
83
 
74
- // src/commands/github/issue/slugFromUrl.ts
75
- function slugFromUrl(url) {
76
- const match = /github\.com\/([^/]+\/[^/]+)\//.exec(url ?? "");
77
- return match ? match[1] : "unknown/unknown";
78
- }
79
-
80
- // src/commands/github/issue/writeIssueWorkingFile.ts
81
- import { mkdirSync, writeFileSync } from "fs";
84
+ // src/commands/github/issue/resumeIssueBody.ts
85
+ import { existsSync, readFileSync } from "fs";
82
86
 
83
87
  // src/commands/github/issue/issueWorkingFile.ts
84
88
  import { join } from "path";
@@ -92,38 +96,7 @@ function issueWorkingFile(slug, number) {
92
96
  };
93
97
  }
94
98
 
95
- // src/commands/github/issue/writeIssueWorkingFile.ts
96
- function writeIssueWorkingFile(slug, number, target, updatedAt, body) {
97
- const { dir, bodyPath, metaPath } = issueWorkingFile(slug, number);
98
- mkdirSync(dir, { recursive: true });
99
- writeFileSync(bodyPath, body);
100
- writeFileSync(
101
- metaPath,
102
- `${JSON.stringify({ target, updatedAt }, null, 2)}
103
- `
104
- );
105
- return bodyPath;
106
- }
107
-
108
- // src/commands/github/issue/fetchIssueToWorkingFile.ts
109
- function fetchIssueToWorkingFile(number, repo) {
110
- const issue = fetchIssue(number, repo);
111
- const slug = repo ?? slugFromUrl(issue.url);
112
- const target = `${slug}#${number}`;
113
- const bodyPath = writeIssueWorkingFile(
114
- slug,
115
- number,
116
- target,
117
- issue.updatedAt,
118
- issue.body
119
- );
120
- console.log(
121
- `Wrote the current body of ${target} to ${bodyPath}. Edit it in place, then run 'assist github issue edit ${number}${repo ? ` -R ${repo}` : ""}' to preview the revision.`
122
- );
123
- }
124
-
125
99
  // src/commands/github/issue/resumeIssueBody.ts
126
- import { existsSync, readFileSync } from "fs";
127
100
  function resumeIssueBody(slug, number, updatedAt) {
128
101
  const { bodyPath, metaPath } = issueWorkingFile(slug, number);
129
102
  if (!existsSync(bodyPath) || !existsSync(metaPath)) return void 0;
@@ -145,6 +118,26 @@ function validateIssueBody(title, body) {
145
118
  );
146
119
  }
147
120
 
121
+ // src/commands/github/issue/writeIssueWorkingFile.ts
122
+ import { mkdirSync, writeFileSync } from "fs";
123
+ function writeIssueWorkingFile(slug, number, target, updatedAt, body) {
124
+ const { dir, bodyPath, metaPath } = issueWorkingFile(slug, number);
125
+ mkdirSync(dir, { recursive: true });
126
+ writeFileSync(bodyPath, body);
127
+ writeFileSync(
128
+ metaPath,
129
+ `${JSON.stringify({ target, updatedAt }, null, 2)}
130
+ `
131
+ );
132
+ return bodyPath;
133
+ }
134
+
135
+ // src/commands/github/issue/slugFromUrl.ts
136
+ function slugFromUrl(url) {
137
+ const match = /github\.com\/([^/]+\/[^/]+)\//.exec(url ?? "");
138
+ return match ? match[1] : "unknown/unknown";
139
+ }
140
+
148
141
  // src/commands/github/issue/prepareIssueEdit.ts
149
142
  function prepareIssueEdit(number, repo, fresh, proposed) {
150
143
  const issue = fetchIssue(number, repo);
@@ -169,33 +162,107 @@ function prepareIssueEdit(number, repo, fresh, proposed) {
169
162
 
170
163
  // src/commands/github/issue/pushIssueBody.ts
171
164
  import { execFileSync as execFileSync2 } from "child_process";
172
- function pushIssueBody(number, repo, bodyPath) {
173
- const args = ["issue", "edit", String(number), "--body-file", bodyPath];
174
- if (repo) args.push("--repo", repo);
165
+ import { readFileSync as readFileSync2 } from "fs";
166
+
167
+ // src/commands/github/issue/mergeIssueScreenshots.ts
168
+ var HEADING = "## Screenshots";
169
+ function mergeIssueScreenshots(body, attachments) {
170
+ if (attachments.length === 0) return body;
171
+ const heading = /(^|\n)## Screenshots[ \t]*(?=\n|$)/.exec(body);
172
+ if (!heading) return appendScreenshots(body, attachments);
173
+ const sectionStart = heading.index + heading[0].length;
174
+ const next = body.indexOf("\n## ", sectionStart);
175
+ const sectionEnd = next === -1 ? body.length : next;
176
+ const added = renderScreenshotsSection(attachments).slice(
177
+ `${HEADING}
178
+
179
+ `.length
180
+ );
181
+ const rest = body.slice(sectionEnd);
182
+ return `${body.slice(0, sectionEnd).trimEnd()}
183
+
184
+ ${added}${rest ? `
185
+ ${rest}` : ""}`;
186
+ }
187
+
188
+ // src/commands/github/issue/pushIssueBody.ts
189
+ function pushIssueBody(number, repo, bodyPath, attachments = []) {
190
+ const repoArgs = repo ? ["--repo", repo] : [];
191
+ if (attachments.length > 0) {
192
+ const body = mergeIssueScreenshots(
193
+ readFileSync2(bodyPath, "utf8"),
194
+ attachments
195
+ );
196
+ process.stdout.write(
197
+ runGhWithAttachments(
198
+ [
199
+ "issue",
200
+ "edit",
201
+ String(number),
202
+ "--body",
203
+ body,
204
+ ...repoArgs,
205
+ ...attachArgs(attachments)
206
+ ],
207
+ attachments
208
+ )
209
+ );
210
+ return;
211
+ }
175
212
  try {
176
- execFileSync2("gh", args, { stdio: "inherit" });
213
+ execFileSync2(
214
+ "gh",
215
+ ["issue", "edit", String(number), "--body-file", bodyPath, ...repoArgs],
216
+ { stdio: "inherit" }
217
+ );
177
218
  } catch {
178
219
  process.exit(1);
179
220
  }
180
221
  }
181
222
 
223
+ // src/commands/github/issue/attachIssueScreenshots.ts
224
+ async function attachIssueScreenshots(number, repo, body, screenshots) {
225
+ const proposed = body ? await readBodyArgument(body) : void 0;
226
+ const issue = prepareIssueEdit(number, repo, true, proposed);
227
+ pushIssueBody(number, repo, issue.bodyPath, screenshots);
228
+ console.log(`Screenshots attached to ${issue.target}`);
229
+ }
230
+
231
+ // src/commands/github/issue/fetchIssueToWorkingFile.ts
232
+ function fetchIssueToWorkingFile(number, repo) {
233
+ const issue = fetchIssue(number, repo);
234
+ const slug = repo ?? slugFromUrl(issue.url);
235
+ const target = `${slug}#${number}`;
236
+ const bodyPath = writeIssueWorkingFile(
237
+ slug,
238
+ number,
239
+ target,
240
+ issue.updatedAt,
241
+ issue.body
242
+ );
243
+ console.log(
244
+ `Wrote the current body of ${target} to ${bodyPath}. Edit it in place, then run 'assist github issue edit ${number}${repo ? ` -R ${repo}` : ""}' to preview the revision.`
245
+ );
246
+ }
247
+
182
248
  // src/commands/github/issue/pushUnchangedIssue.ts
183
- function pushUnchangedIssue(number, repo, target, fetchedAt, bodyPath) {
249
+ function pushUnchangedIssue(number, repo, target, fetchedAt, bodyPath, attachments = []) {
184
250
  if (fetchIssue(number, repo).updatedAt !== fetchedAt) {
185
251
  console.error(
186
252
  `${target} was updated on GitHub after it was fetched. Nothing was pushed; the markdown is at ${bodyPath}`
187
253
  );
188
254
  process.exit(1);
189
255
  }
190
- pushIssueBody(number, repo, bodyPath);
256
+ pushIssueBody(number, repo, bodyPath, attachments);
191
257
  console.log(`Issue body updated on ${target}`);
192
258
  }
193
259
 
194
260
  // src/commands/github/issue/reviewProposedIssueEdit.ts
195
261
  import { randomUUID } from "crypto";
196
- async function reviewProposedIssueEdit(title, body, working) {
262
+ async function reviewProposedIssueEdit(title, body, working, screenshots = []) {
197
263
  const sessionId = process.env.ASSIST_SESSION_ID;
198
- if (process.env.ASSIST_SESSION !== "1" || !sessionId) return body;
264
+ if (process.env.ASSIST_SESSION !== "1" || !sessionId)
265
+ return { body, screenshots };
199
266
  const decision = await awaitPreviewApproval(
200
267
  "GitHub issue edit preview",
201
268
  {
@@ -204,32 +271,38 @@ async function reviewProposedIssueEdit(title, body, working) {
204
271
  title,
205
272
  body,
206
273
  prNumber: null,
207
- kind: "github-issue-edit"
274
+ kind: "github-issue-edit",
275
+ screenshots: screenshots.length ? await stageScreenshots(screenshots) : void 0
208
276
  },
209
277
  {
210
278
  saveEditedBody: working.save,
211
279
  rejectionAdvice: `Nothing was pushed. The pane's markdown, including any collapses already applied, is at ${working.path}. Revise that file in place \u2014 do not recompose the body from scratch \u2014 then re-run this command to preview the revision.`
212
280
  }
213
281
  );
214
- return decision.body ?? body;
282
+ return {
283
+ body: decision.body ?? body,
284
+ screenshots: decision.screenshots ?? []
285
+ };
215
286
  }
216
287
 
217
288
  // src/commands/github/issue/previewIssueEdit.ts
218
- async function previewIssueEdit(number, repo, fresh, body) {
289
+ async function previewIssueEdit(number, repo, fresh, body, screenshots = []) {
219
290
  const proposed = body ? await readBodyArgument(body) : void 0;
220
291
  const issue = prepareIssueEdit(number, repo, fresh, proposed);
221
292
  const edited = await reviewProposedIssueEdit(
222
293
  `Edit ${issue.target}: ${issue.title}`,
223
294
  issue.body,
224
- { path: issue.bodyPath, save: issue.save }
295
+ { path: issue.bodyPath, save: issue.save },
296
+ screenshots
225
297
  );
226
- validateIssueBody(issue.title, edited);
298
+ validateIssueBody(issue.title, edited.body);
227
299
  pushUnchangedIssue(
228
300
  number,
229
301
  repo,
230
302
  issue.target,
231
303
  issue.updatedAt,
232
- issue.bodyPath
304
+ issue.bodyPath,
305
+ edited.screenshots
233
306
  );
234
307
  }
235
308
 
@@ -264,13 +337,14 @@ function viewIssue(number, repo) {
264
337
  }
265
338
 
266
339
  // src/commands/github/issue/editIssue.ts
267
- var USAGE = "Usage: assist github issue edit <number> [-R <owner>/<repo>] [--body <body>] [--fetch] [--parent <issue>]";
340
+ var USAGE = "Usage: assist github issue edit <number> [-R <owner>/<repo>] [--body <body>] [--fetch] [--parent <issue>] [--screenshot '[Group/]Caption=path']";
268
341
  async function editIssue(numberArg, options) {
269
342
  const number = Number.parseInt(numberArg, 10);
270
343
  if (!Number.isInteger(number) || number <= 0) {
271
344
  console.error(USAGE);
272
345
  process.exit(1);
273
346
  }
347
+ const screenshots = parseScreenshotSpecs(options.screenshot);
274
348
  if (options.parent) {
275
349
  setIssueParent(number, options.repo, options.parent);
276
350
  return;
@@ -280,10 +354,25 @@ async function editIssue(numberArg, options) {
280
354
  return;
281
355
  }
282
356
  if (!inWebSession()) {
357
+ if (screenshots.length > 0) {
358
+ await attachIssueScreenshots(
359
+ number,
360
+ options.repo,
361
+ options.body,
362
+ screenshots
363
+ );
364
+ return;
365
+ }
283
366
  viewIssue(number, options.repo);
284
367
  return;
285
368
  }
286
- await previewIssueEdit(number, options.repo, options.fresh, options.body);
369
+ await previewIssueEdit(
370
+ number,
371
+ options.repo,
372
+ options.fresh,
373
+ options.body,
374
+ screenshots
375
+ );
287
376
  }
288
377
  export {
289
378
  editIssue
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-TJGF3Z72.js";
18
18
  import {
19
19
  package_default
20
- } from "./chunk-WH3YSTWQ.js";
20
+ } from "./chunk-RYYZPXIG.js";
21
21
  import {
22
22
  adviceConfigHelp,
23
23
  askQuestionConfigHelp,
@@ -92,7 +92,7 @@ import { Command } from "commander";
92
92
  // src/commands/registerRootAction.ts
93
93
  function registerRootAction(program) {
94
94
  program.option("--no-open", "Do not open a browser on startup").action(
95
- async (options) => (await import("./web-RXI5PSBM.js")).web({
95
+ async (options) => (await import("./web-QATICXWA.js")).web({
96
96
  port: "3100",
97
97
  open: options.open
98
98
  })
@@ -645,7 +645,7 @@ function registerShowCommands(cmd) {
645
645
 
646
646
  // src/commands/registerBacklog.ts
647
647
  function registerWebCommand(cmd) {
648
- cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-GRLY54Q4.js"), "web"));
648
+ cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-H4VA5QZT.js"), "web"));
649
649
  }
650
650
  var registrars = [
651
651
  registerItemCommands,
@@ -675,7 +675,7 @@ function registerBacklog(program) {
675
675
  const { setBacklogDir } = await import("./getBacklogDir-FJLWXTYN.js");
676
676
  setBacklogDir(thisCommand.opts().dir);
677
677
  }).action(
678
- async (options) => (await import("./web-GRLY54Q4.js")).web({ port: "3100", open: options.open })
678
+ async (options) => (await import("./web-H4VA5QZT.js")).web({ port: "3100", open: options.open })
679
679
  );
680
680
  for (const register of registrars) {
681
681
  register(cmd);
@@ -988,7 +988,7 @@ function registerExtension(program) {
988
988
  ).action(async (options) => {
989
989
  const { extension } = await import("./extension-YYRD5EM6.js");
990
990
  const { printExtensionUrl } = await import("./printExtensionUrl-IW2WTSNS.js");
991
- const { signExtension } = await import("./signExtension-VSB6MSLB.js");
991
+ const { signExtension } = await import("./signExtension-3GB33JGZ.js");
992
992
  if (options.url) return printExtensionUrl();
993
993
  return options.sign ? signExtension() : extension();
994
994
  });
@@ -1217,6 +1217,11 @@ function registerCommentIssue(issueCommand) {
1217
1217
  internalCommand(commentCommand, "/github update");
1218
1218
  }
1219
1219
 
1220
+ // src/commands/prs/collect.ts
1221
+ function collect5(value, previous) {
1222
+ return previous.concat([value]);
1223
+ }
1224
+
1220
1225
  // src/commands/github/issue/collectLabels.ts
1221
1226
  function collectLabels(value, previous) {
1222
1227
  const added = value.split(",").map((label) => label.trim()).filter((label) => label.length > 0);
@@ -1248,16 +1253,21 @@ function registerCreateIssue(issueCommand) {
1248
1253
  ).option(
1249
1254
  "--milestone <name>",
1250
1255
  "Open milestone of the target repo to put the new issue on, by title"
1256
+ ).option(
1257
+ "--screenshot <spec>",
1258
+ "Attach an image or video as '[Group/]Caption=path' under ## Screenshots (repeatable)",
1259
+ collect5,
1260
+ []
1251
1261
  ).addHelpText(
1252
1262
  "after",
1253
1263
  `
1254
1264
  There is no What/Why/How template: an issue reports a problem, and the target repo's own issue template is unknowable from here. Write the body as the repo's maintainers would expect.
1255
1265
  In an assist web session the title and body are previewed for approve/reject first (with inline comments); nothing is created until it is approved.
1256
- The reviewer may also drop or paste screenshots or video into the pane; on approval gh attaches them (gh ${minGhAttachVersion}+) under a ## Screenshots section of the issue body automatically, and on rejection they stay attached and reappear in the preview you re-propose \u2014 so never author that section yourself.
1266
+ When you already have an image or video to include (e.g. a file the user pointed at), pass it with --screenshot '[Group/]Caption=path' (once per file) rather than asking the reviewer to drop it in; a missing file or an extension gh cannot attach fails before anything is previewed. In a web session it arrives pre-staged in the preview, and the reviewer may also drop or paste more screenshots or video into the pane; on approval gh attaches them all (gh ${minGhAttachVersion}+) under a ## Screenshots section of the issue body automatically, and on rejection the reviewer's stay attached and reappear in the preview you re-propose. Outside a web session the --screenshot files are attached directly. Never author a ## Screenshots section yourself.
1257
1267
  --type, --parent, --project, --status, --label and --milestone are all resolved before the preview, so an unknown name, an unreadable parent, a missing project scope or --status without --project creates nothing.
1258
1268
  A bare --parent number is read against --repo, or the current repo; a parent in another repository is allowed.
1259
1269
  The project scope is needed for --project: gh auth refresh -h github.com -s project`
1260
- ).action(lazyAction(() => import("./createIssue-5KNMMJVA.js"), "createIssue"));
1270
+ ).action(lazyAction(() => import("./createIssue-TDZZAPQQ.js"), "createIssue"));
1261
1271
  internalCommand(createCommand, "/github create");
1262
1272
  }
1263
1273
 
@@ -1278,10 +1288,23 @@ function registerEditIssue(issueCommand) {
1278
1288
  ).option(
1279
1289
  "--parent <issue>",
1280
1290
  "Make the issue a sub-issue of this one, as owner/repo#number, a github.com issue URL, or a bare number"
1291
+ ).option(
1292
+ "--screenshot <spec>",
1293
+ "Attach an image or video as '[Group/]Caption=path' under ## Screenshots (repeatable)",
1294
+ collect5,
1295
+ []
1281
1296
  ).addHelpText(
1282
1297
  "after",
1283
- "\nFetches the issue's current body and opens it in the assist web preview pane, where it can be reworked before it is pushed back.\nWhen you already know the body you want, pass it with --body (--body - reads stdin): the first preview then shows that proposal instead of the current body, replacing any working file.\nTo make a targeted change to the current body (strike items out, tick a box), run with --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 re-run without --fetch or --body so the first preview shows your revision. Never run without --fetch just to get the body.\nApproving pushes the pane's markdown to the issue; nothing is pushed if the issue moved on GitHub after it was fetched, or outside a web session.\nRejecting writes the pane's markdown to a working file and names it: revise that file in place and re-run to preview the revision, which keeps any collapses already applied. A re-run resumes from the working file while the issue has not moved on GitHub; --fresh discards it and re-fetches.\nOnly the body is touched \u2014 the title, labels, assignees and state are left alone.\n--parent sets the issue's parent instead of editing the body: nothing is previewed and no web session is needed. A bare number is read against --repo, or the current repo; a parent in another repository is allowed."
1284
- ).action(lazyAction(() => import("./editIssue-MPKFMOLQ.js"), "editIssue"));
1298
+ `
1299
+ Fetches the issue's current body and opens it in the assist web preview pane, where it can be reworked before it is pushed back.
1300
+ When you already know the body you want, pass it with --body (--body - reads stdin): the first preview then shows that proposal instead of the current body, replacing any working file.
1301
+ To make a targeted change to the current body (strike items out, tick a box), run with --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 re-run without --fetch or --body so the first preview shows your revision. Never run without --fetch just to get the body.
1302
+ Approving pushes the pane's markdown to the issue; nothing is pushed if the issue moved on GitHub after it was fetched, or outside a web session unless --screenshot is given.
1303
+ Rejecting writes the pane's markdown to a working file and names it: revise that file in place and re-run to preview the revision, which keeps any collapses already applied. A re-run resumes from the working file while the issue has not moved on GitHub; --fresh discards it and re-fetches.
1304
+ Only the body is touched \u2014 the title, labels, assignees and state are left alone.
1305
+ --parent sets the issue's parent instead of editing the body: nothing is previewed and no web session is needed. A bare number is read against --repo, or the current repo; a parent in another repository is allowed.
1306
+ When you already have an image or video to add (e.g. a file the user pointed at), pass it with --screenshot '[Group/]Caption=path' (once per file) rather than asking the reviewer to drop it in; a missing file or an extension gh cannot attach fails before anything is previewed. In a web session it arrives pre-staged beside the editable body, and the reviewer may also drop or paste more screenshots or video into the pane; on approval gh attaches them all (gh ${minGhAttachVersion}+) under the body's ## Screenshots section, after any images already there. Outside a web session the --screenshot files are attached directly to the current body (or --body). Never author a ## Screenshots section yourself.`
1307
+ ).action(lazyAction(() => import("./editIssue-RBWIZISY.js"), "editIssue"));
1285
1308
  internalCommand(editCommand, "/github");
1286
1309
  }
1287
1310
 
@@ -1729,7 +1752,7 @@ ${prConcisenessGuidance}
1729
1752
  }
1730
1753
 
1731
1754
  // src/commands/registerPrsEdit.ts
1732
- function collect5(value, previous) {
1755
+ function collect6(value, previous) {
1733
1756
  return previous.concat([value]);
1734
1757
  }
1735
1758
  function registerPrsEdit(prsCommand) {
@@ -1738,14 +1761,14 @@ function registerPrsEdit(prsCommand) {
1738
1761
  ).option("-t, --title <title>", "New title for the pull request").option("--what <what>", "Replace the ## What section").option("--why <why>", "Replace the ## Why section").option("--how <how>", "Replace the ## How section").option(
1739
1762
  "--resolves <ref>",
1740
1763
  "Jira issue key or GitHub issue reference resolved by this PR, appended to ## Why (repeatable)",
1741
- collect5,
1764
+ collect6,
1742
1765
  []
1743
1766
  ).option(
1744
1767
  "--screenshot <spec>",
1745
1768
  "Attach a screenshot as '[Group/]Caption=path', replacing the ## Screenshots section (repeatable)",
1746
- collect5,
1769
+ collect6,
1747
1770
  []
1748
- ).addHelpText("after", () => editHelpText()).action(lazyAction(() => import("./edit-5QLQ3TLJ.js"), "edit"));
1771
+ ).addHelpText("after", () => editHelpText()).action(lazyAction(() => import("./edit-R2ZKDIGP.js"), "edit"));
1749
1772
  internalCommand(editCommand, "agents revising their pull request");
1750
1773
  }
1751
1774
 
@@ -1762,22 +1785,17 @@ async function preloadHelpText() {
1762
1785
  await Promise.all(preloaders.map((preload) => preload()));
1763
1786
  }
1764
1787
 
1765
- // src/commands/prs/collect.ts
1766
- function collect6(value, previous) {
1767
- return previous.concat([value]);
1768
- }
1769
-
1770
1788
  // src/commands/prs/addRaiseSectionOptions.ts
1771
1789
  function addRaiseSectionOptions(command) {
1772
1790
  return command.option("-t, --title <title>", "Title for the pull request").option("--what <what>", "What the change does (## What section)").option("--why <why>", "Why the change is needed (## Why section)").option("--how <how>", "How the change works (optional ## How section)").option(
1773
1791
  "--resolves <ref>",
1774
1792
  "Jira issue key or GitHub issue reference resolved by this PR, appended to ## Why (repeatable)",
1775
- collect6,
1793
+ collect5,
1776
1794
  []
1777
1795
  ).option(
1778
1796
  "--screenshot <spec>",
1779
1797
  "Attach a screenshot as '[Group/]Caption=path' under ## Screenshots (repeatable)",
1780
- collect6,
1798
+ collect5,
1781
1799
  []
1782
1800
  );
1783
1801
  }
@@ -1794,21 +1812,21 @@ function registerPrsRaise(prsCommand) {
1794
1812
  ).option("-B, --base <branch>", "Branch into which the pull request merges").option("-H, --head <branch>", "Branch that contains the commits").option("-d, --draft", "Mark the pull request as a draft").option(
1795
1813
  "--no-draft",
1796
1814
  "Create a ready-for-review pull request, overriding prs.draft"
1797
- ).option("-w, --web", "Open the browser to create the pull request").option("-l, --label <label>", "Add a label (repeatable)", collect6, []).option(
1815
+ ).option("-w, --web", "Open the browser to create the pull request").option("-l, --label <label>", "Add a label (repeatable)", collect5, []).option(
1798
1816
  "-a, --assignee <login>",
1799
1817
  "Assign a person by login (repeatable)",
1800
- collect6,
1818
+ collect5,
1801
1819
  []
1802
1820
  ).option(
1803
1821
  "-r, --reviewer <handle>",
1804
1822
  "Request a review (repeatable)",
1805
- collect6,
1823
+ collect5,
1806
1824
  []
1807
1825
  ).option("-m, --milestone <name>", "Add the pull request to a milestone");
1808
1826
  lazyHelpText(
1809
1827
  raiseCommand,
1810
1828
  async () => (await import("./raiseHelpText-IDZI3UAC.js")).raiseHelpText
1811
- ).action(lazyAction(() => import("./raise-O7DVXVP6.js"), "raise"));
1829
+ ).action(lazyAction(() => import("./raise-BUPAYCZY.js"), "raise"));
1812
1830
  internalCommand(raiseCommand, "/pr");
1813
1831
  configHelp(raiseCommand, prsRaiseConfigHelp);
1814
1832
  }
@@ -2660,7 +2678,7 @@ function registerDaemon(program) {
2660
2678
  const cmd = program.command("daemon").description("Long-lived daemon that owns web session PTYs");
2661
2679
  cmd.command("run").description(
2662
2680
  "Run the sessions daemon in the foreground (auto-spawned by assist sessions)"
2663
- ).action(lazyAction(() => import("./runDaemon-QU6S6FVH.js"), "runDaemon"));
2681
+ ).action(lazyAction(() => import("./runDaemon-MKBJQQQD.js"), "runDaemon"));
2664
2682
  cmd.command("status").description(
2665
2683
  "Show sessions daemon status, live sessions, and any stray daemon processes"
2666
2684
  ).action(lazyAction(() => import("./daemonStatus-EAZHBC6O.js"), "daemonStatus"));
@@ -2684,7 +2702,7 @@ function registerDiagnoseCommands(nodes, calledBy5) {
2684
2702
  nodes.command("doctor [name]").description(
2685
2703
  "Probe each hop of every link (or one) in order and stop at the first failure with a remediation"
2686
2704
  ).option("--json", "Output as JSON").action(
2687
- async (name, _options, command) => (await import("./doctorNodes-ZDTNLDHK.js")).doctorNodes(
2705
+ async (name, _options, command) => (await import("./doctorNodes-J65UAEA6.js")).doctorNodes(
2688
2706
  name,
2689
2707
  command.optsWithGlobals()
2690
2708
  )
@@ -2714,14 +2732,14 @@ function registerPeerActionCommands(nodes, calledBy5) {
2714
2732
  internalCommand(
2715
2733
  nodes.command("restart <name>").description(
2716
2734
  "Restart a linked node's daemon and/or web server, wait for its link to reconnect and print its version"
2717
- ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-ZM73BIZ4.js"), "restartNode")),
2735
+ ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-LKXFQH7A.js"), "restartNode")),
2718
2736
  calledBy5
2719
2737
  );
2720
2738
  internalCommand(
2721
2739
  nodes.command("update <name>").description(
2722
2740
  "Run assist update on a linked node, restart it, wait for its link to reconnect and print its version"
2723
2741
  ).action(
2724
- async (name) => (await import("./updateNode-SRU5E3O3.js")).updateNode(name)
2742
+ async (name) => (await import("./updateNode-ZOKPR26K.js")).updateNode(name)
2725
2743
  ),
2726
2744
  calledBy5
2727
2745
  );
@@ -2784,7 +2802,7 @@ function registerSetStatusCommand(cmd) {
2784
2802
  // src/commands/sessions/registerSessionsWeb.ts
2785
2803
  function registerSessionsWeb(cmd) {
2786
2804
  const webCmd = cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(
2787
- async (options, command) => (await import("./web-RXI5PSBM.js")).web({
2805
+ async (options, command) => (await import("./web-QATICXWA.js")).web({
2788
2806
  ...options,
2789
2807
  open: command.optsWithGlobals().open
2790
2808
  })
@@ -2799,7 +2817,7 @@ function registerSessionsWeb(cmd) {
2799
2817
  // src/commands/sessions/registerSessions.ts
2800
2818
  function registerSessions(program) {
2801
2819
  const cmd = program.command("sessions").description("Web dashboard for coding agent sessions").option("--no-open", "Do not open a browser on startup").action(
2802
- async (_options, command) => (await import("./web-RXI5PSBM.js")).web({
2820
+ async (_options, command) => (await import("./web-QATICXWA.js")).web({
2803
2821
  port: "3100",
2804
2822
  open: command.optsWithGlobals().open
2805
2823
  })
@@ -3,15 +3,15 @@ import {
3
3
  } from "./chunk-KZX6UIKC.js";
4
4
  import {
5
5
  buildPrBody,
6
- parseScreenshotSpecs,
7
- stageScreenshots,
8
6
  validatePrContent
9
- } from "./chunk-MJ4RLQ5N.js";
7
+ } from "./chunk-Q4TGGE5L.js";
10
8
  import {
11
9
  appendScreenshots,
12
10
  attachArgs,
13
- runGhWithAttachments
14
- } from "./chunk-ONODYZ2H.js";
11
+ parseScreenshotSpecs,
12
+ runGhWithAttachments,
13
+ stageScreenshots
14
+ } from "./chunk-IEDFQBJI.js";
15
15
  import "./chunk-ABLDOQ4B.js";
16
16
  import {
17
17
  findCurrentPr,
@@ -39,8 +39,7 @@ import "./chunk-M6MAQU3Z.js";
39
39
  import "./chunk-3VDV7VHX.js";
40
40
  import "./chunk-B7B26YPF.js";
41
41
  import "./chunk-XTQSKMFH.js";
42
- import "./chunk-WG3TXZMV.js";
43
- import "./chunk-S6FVZYHH.js";
42
+ import "./chunk-DPCFT55U.js";
44
43
  import {
45
44
  requestAssistSession
46
45
  } from "./chunk-F4XCHVD7.js";
@@ -2,20 +2,20 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-2TFVO6FJ.js";
6
- import "./chunk-ZDCNWRGU.js";
7
- import "./chunk-HJA2C6EP.js";
5
+ } from "./chunk-66T4P3GU.js";
6
+ import "./chunk-UNIH25QO.js";
7
+ import "./chunk-IT5MTJVS.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-ZYOSEPXM.js";
11
+ import "./chunk-SSRDOW3C.js";
12
12
  import "./chunk-J2PPCMCR.js";
13
13
  import "./chunk-5CNDLMYO.js";
14
14
  import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import "./chunk-GIHVMELY.js";
18
- import "./chunk-WH3YSTWQ.js";
18
+ import "./chunk-RYYZPXIG.js";
19
19
  import "./chunk-UFSOFNXQ.js";
20
20
  import "./chunk-FLDRXYEM.js";
21
21
  import "./chunk-GRXFWFGP.js";
@@ -128,7 +128,7 @@ import {
128
128
  isHello,
129
129
  linkVersionCheck,
130
130
  negotiateProtocol
131
- } from "./chunk-ZYOSEPXM.js";
131
+ } from "./chunk-SSRDOW3C.js";
132
132
  import {
133
133
  loadLinkSpecs
134
134
  } from "./chunk-J2PPCMCR.js";
@@ -267,7 +267,7 @@ import {
267
267
  import "./chunk-APZ6ZTDA.js";
268
268
  import "./chunk-BFQSGIN6.js";
269
269
  import "./chunk-D7UZLH36.js";
270
- import "./chunk-WH3YSTWQ.js";
270
+ import "./chunk-RYYZPXIG.js";
271
271
  import "./chunk-EW2ZM2PC.js";
272
272
  import "./chunk-MYH4MQX2.js";
273
273
  import {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-W7TRZLEM.js";
10
10
  import {
11
11
  package_default
12
- } from "./chunk-WH3YSTWQ.js";
12
+ } from "./chunk-RYYZPXIG.js";
13
13
 
14
14
  // src/commands/extension/signExtension.ts
15
15
  import { rm as rm2 } from "fs/promises";
@@ -2,13 +2,13 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-2TFVO6FJ.js";
6
- import "./chunk-ZDCNWRGU.js";
7
- import "./chunk-HJA2C6EP.js";
5
+ } from "./chunk-66T4P3GU.js";
6
+ import "./chunk-UNIH25QO.js";
7
+ import "./chunk-IT5MTJVS.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-ZYOSEPXM.js";
11
+ import "./chunk-SSRDOW3C.js";
12
12
  import "./chunk-J2PPCMCR.js";
13
13
  import "./chunk-5CNDLMYO.js";
14
14
  import "./chunk-B7VOTF5Q.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-A7ONLVZD.js";
20
20
  import "./chunk-GIHVMELY.js";
21
21
  import "./chunk-2EW62DM5.js";
22
- import "./chunk-WH3YSTWQ.js";
22
+ import "./chunk-RYYZPXIG.js";
23
23
  import "./chunk-UFSOFNXQ.js";
24
24
  import "./chunk-FLDRXYEM.js";
25
25
  import "./chunk-GRXFWFGP.js";