@staff0rd/assist 0.895.1 → 0.897.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.
|
|
9
|
+
version: "0.897.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -827,6 +827,7 @@ function stripRepos(repos2) {
|
|
|
827
827
|
function stripLegacyConfigKeys(config) {
|
|
828
828
|
const stripped = { ...config };
|
|
829
829
|
if (stripped.repos) stripped.repos = stripRepos(stripped.repos);
|
|
830
|
+
delete stripped.backlog;
|
|
830
831
|
const news = stripped.news;
|
|
831
832
|
if (news && typeof news === "object" && "feeds" in news) {
|
|
832
833
|
const { feeds: _feeds, ...rest } = news;
|
|
@@ -1093,9 +1094,6 @@ var assistConfigShape = {
|
|
|
1093
1094
|
extra: z5.string().optional(),
|
|
1094
1095
|
verify: z5.string().optional()
|
|
1095
1096
|
}).optional(),
|
|
1096
|
-
backlog: z5.strictObject({
|
|
1097
|
-
previewComments: z5.boolean().default(false)
|
|
1098
|
-
}).optional(),
|
|
1099
1097
|
backup: z5.strictObject({
|
|
1100
1098
|
dir: z5.string().default(DEFAULT_BACKUP_DIR)
|
|
1101
1099
|
}).default({ dir: DEFAULT_BACKUP_DIR }),
|
|
@@ -5900,11 +5898,6 @@ var backlogConfigHelp = [
|
|
|
5900
5898
|
setter: 'assist config set subtasks.0.title "Review"',
|
|
5901
5899
|
note: "default sub-tasks seeded onto every new backlog item"
|
|
5902
5900
|
},
|
|
5903
|
-
{
|
|
5904
|
-
key: "backlog.previewComments",
|
|
5905
|
-
setter: "assist config set backlog.previewComments true",
|
|
5906
|
-
note: "review 'backlog comment' in the web preview pane before it is written (default: off)"
|
|
5907
|
-
},
|
|
5908
5901
|
{
|
|
5909
5902
|
key: "clone.baseDir",
|
|
5910
5903
|
setter: "assist config set clone.baseDir ~/git",
|
|
@@ -13826,6 +13819,12 @@ function registerAdvise(program) {
|
|
|
13826
13819
|
configHelp(adviseCommand, adviceConfigHelp);
|
|
13827
13820
|
}
|
|
13828
13821
|
|
|
13822
|
+
// src/shared/internalCommand.ts
|
|
13823
|
+
function internalCommand(command, calledBy) {
|
|
13824
|
+
command.internalCalledBy = calledBy;
|
|
13825
|
+
return command;
|
|
13826
|
+
}
|
|
13827
|
+
|
|
13829
13828
|
// src/commands/ask.ts
|
|
13830
13829
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
13831
13830
|
|
|
@@ -14061,9 +14060,15 @@ The reviewer left ${comments3.length} comment${comments3.length === 1 ? "" : "s"
|
|
|
14061
14060
|
|
|
14062
14061
|
// src/commands/registerAsk.ts
|
|
14063
14062
|
function registerAsk(program) {
|
|
14064
|
-
|
|
14065
|
-
"
|
|
14066
|
-
|
|
14063
|
+
internalCommand(
|
|
14064
|
+
program.command("ask").description(
|
|
14065
|
+
"Open markdown in the session's web preview pane for the user to approve or reject, with inline comments, and wait for the decision; prints it outside a web session"
|
|
14066
|
+
).requiredOption("--title <title>", "Pane title").requiredOption(
|
|
14067
|
+
"--body <markdown|->",
|
|
14068
|
+
"Markdown to review, or - for stdin"
|
|
14069
|
+
).action(ask),
|
|
14070
|
+
"/ask"
|
|
14071
|
+
);
|
|
14067
14072
|
}
|
|
14068
14073
|
|
|
14069
14074
|
// src/commands/registerBackup.ts
|
|
@@ -15016,28 +15021,9 @@ function registerCloneCommand(cmd) {
|
|
|
15016
15021
|
|
|
15017
15022
|
// src/commands/backlog/comment.ts
|
|
15018
15023
|
import chalk48 from "chalk";
|
|
15019
|
-
|
|
15020
|
-
// src/commands/backlog/comment/reviewProposedComment.ts
|
|
15021
|
-
import { randomUUID as randomUUID3 } from "crypto";
|
|
15022
|
-
async function reviewProposedComment(item, text18) {
|
|
15023
|
-
if (loadConfig().backlog?.previewComments !== true) return;
|
|
15024
|
-
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
15025
|
-
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return;
|
|
15026
|
-
await awaitPreviewApproval("Backlog comment preview", {
|
|
15027
|
-
sessionId,
|
|
15028
|
-
requestId: randomUUID3(),
|
|
15029
|
-
title: `Comment on ${formatItemId(item.id)}: ${item.name}`,
|
|
15030
|
-
body: text18,
|
|
15031
|
-
prNumber: null,
|
|
15032
|
-
kind: "backlog-comment"
|
|
15033
|
-
});
|
|
15034
|
-
}
|
|
15035
|
-
|
|
15036
|
-
// src/commands/backlog/comment.ts
|
|
15037
15024
|
async function comment(id, text18) {
|
|
15038
15025
|
const found = await findOneItem(id);
|
|
15039
15026
|
if (!found) process.exit(1);
|
|
15040
|
-
await reviewProposedComment(found.item, text18);
|
|
15041
15027
|
await appendComment(found.orm, found.item.id, text18);
|
|
15042
15028
|
console.log(
|
|
15043
15029
|
chalk48.green(`Comment added to item ${formatItemId(found.item.id)}.`)
|
|
@@ -15551,7 +15537,7 @@ async function resolveInsertPosition(orm, itemId2, position) {
|
|
|
15551
15537
|
}
|
|
15552
15538
|
|
|
15553
15539
|
// src/commands/backlog/addPhase/reviewProposedPhase.ts
|
|
15554
|
-
import { randomUUID as
|
|
15540
|
+
import { randomUUID as randomUUID3 } from "crypto";
|
|
15555
15541
|
|
|
15556
15542
|
// src/commands/backlog/renderPhaseSection.ts
|
|
15557
15543
|
function renderPhaseSection(phase, idx) {
|
|
@@ -15575,7 +15561,7 @@ async function reviewProposedPhase(item, phaseIdx, phase) {
|
|
|
15575
15561
|
return;
|
|
15576
15562
|
await awaitPreviewApproval("Backlog phase preview", {
|
|
15577
15563
|
sessionId,
|
|
15578
|
-
requestId:
|
|
15564
|
+
requestId: randomUUID3(),
|
|
15579
15565
|
title: `Add a phase to ${formatItemId(item.id)}: ${item.name}`,
|
|
15580
15566
|
body: renderPhaseSection(phase, phaseIdx),
|
|
15581
15567
|
prNumber: null,
|
|
@@ -15777,7 +15763,7 @@ function readProposedItem(source) {
|
|
|
15777
15763
|
}
|
|
15778
15764
|
|
|
15779
15765
|
// src/commands/backlog/propose/reviewProposal.ts
|
|
15780
|
-
import { randomUUID as
|
|
15766
|
+
import { randomUUID as randomUUID4 } from "crypto";
|
|
15781
15767
|
import chalk61 from "chalk";
|
|
15782
15768
|
|
|
15783
15769
|
// src/shared/renderMarkdownTerminal.ts
|
|
@@ -15819,7 +15805,7 @@ async function reviewProposal(item, sessionId, confirmed) {
|
|
|
15819
15805
|
if (sessionId) {
|
|
15820
15806
|
const decision = await awaitPreviewApproval("Backlog item preview", {
|
|
15821
15807
|
sessionId,
|
|
15822
|
-
requestId:
|
|
15808
|
+
requestId: randomUUID4(),
|
|
15823
15809
|
title: item.name,
|
|
15824
15810
|
body,
|
|
15825
15811
|
prNumber: null,
|
|
@@ -15897,6 +15883,23 @@ so it must not be authored: a phase named "Review" is rejected. Do not add a fin
|
|
|
15897
15883
|
phase for verifying acceptance criteria, confirming manual checks, committing or
|
|
15898
15884
|
marking the item done \u2014 that is what the appended Review phase does.`;
|
|
15899
15885
|
|
|
15886
|
+
// src/commands/backlog/registerProposeCommand.ts
|
|
15887
|
+
function registerProposeCommand(cmd) {
|
|
15888
|
+
internalCommand(
|
|
15889
|
+
cmd.command("propose").description(
|
|
15890
|
+
"Preview a complete backlog item for approval, then create it on approval"
|
|
15891
|
+
).requiredOption(
|
|
15892
|
+
"--json <file|->",
|
|
15893
|
+
"Path to a JSON payload describing the item, or - to read it from stdin"
|
|
15894
|
+
).option(
|
|
15895
|
+
"--confirmed",
|
|
15896
|
+
"Create the item after its draft has been reviewed in chat (agent use outside a web session)"
|
|
15897
|
+
).addHelpText("after", `
|
|
15898
|
+
${proposeHelpText}`).action(propose),
|
|
15899
|
+
"/draft and /bug"
|
|
15900
|
+
);
|
|
15901
|
+
}
|
|
15902
|
+
|
|
15900
15903
|
// src/commands/backlog/registerItemCommands.ts
|
|
15901
15904
|
function registerItemCommands(cmd) {
|
|
15902
15905
|
cmd.command("list").alias("ls").description("List all backlog items").option(
|
|
@@ -15907,16 +15910,7 @@ function registerItemCommands(cmd) {
|
|
|
15907
15910
|
"--desc <description>",
|
|
15908
15911
|
String.raw`Item description (Markdown supported; use \n for line breaks)`
|
|
15909
15912
|
).option("--ac <criterion...>", "Acceptance criteria (repeatable)").action(add);
|
|
15910
|
-
cmd
|
|
15911
|
-
"Preview a complete backlog item for approval, then create it on approval"
|
|
15912
|
-
).requiredOption(
|
|
15913
|
-
"--json <file|->",
|
|
15914
|
-
"Path to a JSON payload describing the item, or - to read it from stdin"
|
|
15915
|
-
).option(
|
|
15916
|
-
"--confirmed",
|
|
15917
|
-
"Create the item after its draft has been reviewed in chat (agent use outside a web session)"
|
|
15918
|
-
).addHelpText("after", `
|
|
15919
|
-
${proposeHelpText}`).action(propose);
|
|
15913
|
+
registerProposeCommand(cmd);
|
|
15920
15914
|
cmd.command("add-phase <id> <name>").description("Add a phase to an existing backlog item").option("--task <task...>", "Task description (repeatable)").option(
|
|
15921
15915
|
"--manual-check <check...>",
|
|
15922
15916
|
"Manual check description (repeatable)"
|
|
@@ -17166,7 +17160,7 @@ Phase ${phaseNumber} completed.`));
|
|
|
17166
17160
|
}
|
|
17167
17161
|
|
|
17168
17162
|
// src/commands/backlog/preparePhaseSession.ts
|
|
17169
|
-
import { randomUUID as
|
|
17163
|
+
import { randomUUID as randomUUID5 } from "crypto";
|
|
17170
17164
|
|
|
17171
17165
|
// src/commands/backlog/persistPhaseSession.ts
|
|
17172
17166
|
import os4 from "os";
|
|
@@ -17337,7 +17331,7 @@ async function verifyPhaseResume(itemId2, resumeSessionId, phaseLabel2) {
|
|
|
17337
17331
|
// src/commands/backlog/preparePhaseSession.ts
|
|
17338
17332
|
async function preparePhaseSession(item, phase, phaseIndex, phaseNumber, totalPhases, phaseLabel2, spawnOptions) {
|
|
17339
17333
|
const resumeSessionId = spawnOptions?.resumeSessionId;
|
|
17340
|
-
const claudeSessionId = resumeSessionId ??
|
|
17334
|
+
const claudeSessionId = resumeSessionId ?? randomUUID5();
|
|
17341
17335
|
if (resumeSessionId && !await verifyPhaseResume(item.id, resumeSessionId, phaseLabel2)) {
|
|
17342
17336
|
return void 0;
|
|
17343
17337
|
}
|
|
@@ -17709,7 +17703,7 @@ import chalk85 from "chalk";
|
|
|
17709
17703
|
import enquirer7 from "enquirer";
|
|
17710
17704
|
|
|
17711
17705
|
// src/commands/backlog/launchMode.ts
|
|
17712
|
-
import { randomUUID as
|
|
17706
|
+
import { randomUUID as randomUUID6 } from "crypto";
|
|
17713
17707
|
|
|
17714
17708
|
// src/commands/backlog/handleLaunchSignal.ts
|
|
17715
17709
|
import chalk84 from "chalk";
|
|
@@ -17814,7 +17808,7 @@ async function launchMode(slashCommand, options2) {
|
|
|
17814
17808
|
const resumeSessionId = options2?.resumeSessionId;
|
|
17815
17809
|
if (!resumeSessionId) pullIfConfigured();
|
|
17816
17810
|
process.env.ASSIST_SESSION_ID ??= String(process.pid);
|
|
17817
|
-
const claudeSessionId = resumeSessionId ??
|
|
17811
|
+
const claudeSessionId = resumeSessionId ?? randomUUID6();
|
|
17818
17812
|
const harness = options2?.harness ?? "claude";
|
|
17819
17813
|
reportLaunchActivity(slashCommand, claudeSessionId, harness, options2);
|
|
17820
17814
|
const prompt = resumeSessionId ? resumeNudge() : buildSlashCommand(slashCommand, options2?.description);
|
|
@@ -18830,7 +18824,7 @@ async function replacePlan(orm, itemId2, phases, currentPhase) {
|
|
|
18830
18824
|
}
|
|
18831
18825
|
|
|
18832
18826
|
// src/commands/backlog/updatePlan/reviewPlanUpdate.ts
|
|
18833
|
-
import { randomUUID as
|
|
18827
|
+
import { randomUUID as randomUUID7 } from "crypto";
|
|
18834
18828
|
import chalk110 from "chalk";
|
|
18835
18829
|
|
|
18836
18830
|
// src/commands/backlog/updatePlan/isCompleted.ts
|
|
@@ -18987,7 +18981,7 @@ async function reviewPlanUpdate(item, phases) {
|
|
|
18987
18981
|
if (process.env.ASSIST_SESSION === "1" && sessionId) {
|
|
18988
18982
|
const decision = await awaitPreviewApproval("Plan update preview", {
|
|
18989
18983
|
sessionId,
|
|
18990
|
-
requestId:
|
|
18984
|
+
requestId: randomUUID7(),
|
|
18991
18985
|
title: `Update the plan for ${formatItemId(item.id)}: ${item.name}`,
|
|
18992
18986
|
body,
|
|
18993
18987
|
prNumber: null,
|
|
@@ -25943,13 +25937,13 @@ function validateProposedContent(labels, title, body) {
|
|
|
25943
25937
|
}
|
|
25944
25938
|
|
|
25945
25939
|
// src/commands/github/issue/reviewProposedIssueComment.ts
|
|
25946
|
-
import { randomUUID as
|
|
25940
|
+
import { randomUUID as randomUUID8 } from "crypto";
|
|
25947
25941
|
async function reviewProposedIssueComment(title, body) {
|
|
25948
25942
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
25949
25943
|
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return;
|
|
25950
25944
|
await awaitPreviewApproval("GitHub issue comment preview", {
|
|
25951
25945
|
sessionId,
|
|
25952
|
-
requestId:
|
|
25946
|
+
requestId: randomUUID8(),
|
|
25953
25947
|
title,
|
|
25954
25948
|
body,
|
|
25955
25949
|
prNumber: null,
|
|
@@ -26466,13 +26460,13 @@ function resolveCreateIssueMetadata(options2) {
|
|
|
26466
26460
|
}
|
|
26467
26461
|
|
|
26468
26462
|
// src/commands/github/issue/reviewProposedIssue.ts
|
|
26469
|
-
import { randomUUID as
|
|
26463
|
+
import { randomUUID as randomUUID9 } from "crypto";
|
|
26470
26464
|
async function reviewProposedIssue(title, body, metadata2 = []) {
|
|
26471
26465
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
26472
26466
|
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return void 0;
|
|
26473
26467
|
return await awaitPreviewApproval("GitHub issue preview", {
|
|
26474
26468
|
sessionId,
|
|
26475
|
-
requestId:
|
|
26469
|
+
requestId: randomUUID9(),
|
|
26476
26470
|
title,
|
|
26477
26471
|
body,
|
|
26478
26472
|
prNumber: null,
|
|
@@ -26776,7 +26770,7 @@ function pushUnchangedIssue(number, repo, target, fetchedAt, bodyPath) {
|
|
|
26776
26770
|
}
|
|
26777
26771
|
|
|
26778
26772
|
// src/commands/github/issue/reviewProposedIssueEdit.ts
|
|
26779
|
-
import { randomUUID as
|
|
26773
|
+
import { randomUUID as randomUUID10 } from "crypto";
|
|
26780
26774
|
async function reviewProposedIssueEdit(title, body, working) {
|
|
26781
26775
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
26782
26776
|
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return body;
|
|
@@ -26784,7 +26778,7 @@ async function reviewProposedIssueEdit(title, body, working) {
|
|
|
26784
26778
|
"GitHub issue edit preview",
|
|
26785
26779
|
{
|
|
26786
26780
|
sessionId,
|
|
26787
|
-
requestId:
|
|
26781
|
+
requestId: randomUUID10(),
|
|
26788
26782
|
title,
|
|
26789
26783
|
body,
|
|
26790
26784
|
prNumber: null,
|
|
@@ -27299,7 +27293,7 @@ function registerRefineLaunch(program, resumeFlag) {
|
|
|
27299
27293
|
}
|
|
27300
27294
|
|
|
27301
27295
|
// src/commands/reviewPrComments.ts
|
|
27302
|
-
import { randomUUID as
|
|
27296
|
+
import { randomUUID as randomUUID11 } from "crypto";
|
|
27303
27297
|
|
|
27304
27298
|
// src/commands/review/checkoutPr.ts
|
|
27305
27299
|
import { execFileSync as execFileSync18 } from "child_process";
|
|
@@ -28077,7 +28071,7 @@ async function reviewPrComments(number, options2 = {}) {
|
|
|
28077
28071
|
const resumeSessionId = options2.resumeSessionId;
|
|
28078
28072
|
validateAnnounce(number, announce);
|
|
28079
28073
|
if (number && !resumeSessionId) await checkoutPr(number);
|
|
28080
|
-
const claudeSessionId = resumeSessionId ??
|
|
28074
|
+
const claudeSessionId = resumeSessionId ?? randomUUID11();
|
|
28081
28075
|
emitActivity({
|
|
28082
28076
|
kind: "command",
|
|
28083
28077
|
name: "review-pr-comments",
|
|
@@ -28095,14 +28089,14 @@ async function reviewPrComments(number, options2 = {}) {
|
|
|
28095
28089
|
}
|
|
28096
28090
|
|
|
28097
28091
|
// src/commands/fixConflict.ts
|
|
28098
|
-
import { randomUUID as
|
|
28092
|
+
import { randomUUID as randomUUID12 } from "crypto";
|
|
28099
28093
|
function buildPrompt3(rebase) {
|
|
28100
28094
|
return rebase ? "/fix-conflict --rebase" : "/fix-conflict";
|
|
28101
28095
|
}
|
|
28102
28096
|
async function fixConflict(number, options2 = {}) {
|
|
28103
28097
|
const { resumeSessionId } = options2;
|
|
28104
28098
|
if (number && !resumeSessionId) await checkoutPr(number);
|
|
28105
|
-
const claudeSessionId = resumeSessionId ??
|
|
28099
|
+
const claudeSessionId = resumeSessionId ?? randomUUID12();
|
|
28106
28100
|
emitActivity({
|
|
28107
28101
|
kind: "command",
|
|
28108
28102
|
name: "fix-conflict",
|
|
@@ -28644,7 +28638,7 @@ async function offerSaveExtract(extract2, options2, paths = {}) {
|
|
|
28644
28638
|
}
|
|
28645
28639
|
|
|
28646
28640
|
// src/commands/miro/pickAnchors.ts
|
|
28647
|
-
import { randomUUID as
|
|
28641
|
+
import { randomUUID as randomUUID13 } from "crypto";
|
|
28648
28642
|
|
|
28649
28643
|
// src/commands/miro/isBox.ts
|
|
28650
28644
|
var boxTypes = /* @__PURE__ */ new Set(["shape", "sticky_note"]);
|
|
@@ -28665,7 +28659,7 @@ async function pickAnchors(sessionId, items2) {
|
|
|
28665
28659
|
"Miro anchor selection",
|
|
28666
28660
|
{
|
|
28667
28661
|
sessionId,
|
|
28668
|
-
requestId:
|
|
28662
|
+
requestId: randomUUID13(),
|
|
28669
28663
|
title: "Pick the top-left then the bottom-right box",
|
|
28670
28664
|
body: encodeMiroBoardPreview(items2),
|
|
28671
28665
|
prNumber: null,
|
|
@@ -29855,13 +29849,13 @@ function postReviewComment(vars) {
|
|
|
29855
29849
|
}
|
|
29856
29850
|
|
|
29857
29851
|
// src/commands/prs/reviewProposedPrComment.ts
|
|
29858
|
-
import { randomUUID as
|
|
29852
|
+
import { randomUUID as randomUUID14 } from "crypto";
|
|
29859
29853
|
async function reviewProposedPrComment(title, body, prNumber) {
|
|
29860
29854
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
29861
29855
|
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return;
|
|
29862
29856
|
await awaitPreviewApproval("PR comment preview", {
|
|
29863
29857
|
sessionId,
|
|
29864
|
-
requestId:
|
|
29858
|
+
requestId: randomUUID14(),
|
|
29865
29859
|
title,
|
|
29866
29860
|
body,
|
|
29867
29861
|
prNumber,
|
|
@@ -30627,7 +30621,7 @@ function parseScreenshotSpecs(specs) {
|
|
|
30627
30621
|
}
|
|
30628
30622
|
|
|
30629
30623
|
// src/commands/prs/previewAndApplyEdit.ts
|
|
30630
|
-
import { randomUUID as
|
|
30624
|
+
import { randomUUID as randomUUID15 } from "crypto";
|
|
30631
30625
|
|
|
30632
30626
|
// src/commands/prs/stageScreenshots.ts
|
|
30633
30627
|
import { readFile as readFile8 } from "fs/promises";
|
|
@@ -30649,7 +30643,7 @@ function stageScreenshots(screenshots = []) {
|
|
|
30649
30643
|
async function previewAndApplyEdit(args) {
|
|
30650
30644
|
const decision = await awaitPreviewApproval("PR preview", {
|
|
30651
30645
|
sessionId: args.sessionId,
|
|
30652
|
-
requestId:
|
|
30646
|
+
requestId: randomUUID15(),
|
|
30653
30647
|
title: args.title ?? args.currentTitle,
|
|
30654
30648
|
body: args.body,
|
|
30655
30649
|
prNumber: args.number,
|
|
@@ -30983,7 +30977,7 @@ async function placePr(prNumber, title, body, options2, attachments = []) {
|
|
|
30983
30977
|
}
|
|
30984
30978
|
|
|
30985
30979
|
// src/commands/prs/previewAndPlace.ts
|
|
30986
|
-
import { randomUUID as
|
|
30980
|
+
import { randomUUID as randomUUID16 } from "crypto";
|
|
30987
30981
|
|
|
30988
30982
|
// src/commands/review/announcePr.ts
|
|
30989
30983
|
function announcePr(prNumber) {
|
|
@@ -31059,7 +31053,7 @@ function enableAutoMerge() {
|
|
|
31059
31053
|
async function previewAndPlace(args) {
|
|
31060
31054
|
const decision = await awaitPreviewApproval("PR preview", {
|
|
31061
31055
|
sessionId: args.sessionId,
|
|
31062
|
-
requestId:
|
|
31056
|
+
requestId: randomUUID16(),
|
|
31063
31057
|
title: args.title,
|
|
31064
31058
|
body: args.body,
|
|
31065
31059
|
prNumber: args.prNumber,
|
|
@@ -35456,10 +35450,10 @@ function registerRefactor(program) {
|
|
|
35456
35450
|
}
|
|
35457
35451
|
|
|
35458
35452
|
// src/commands/review/checkoutPrSession.ts
|
|
35459
|
-
import { randomUUID as
|
|
35453
|
+
import { randomUUID as randomUUID17 } from "crypto";
|
|
35460
35454
|
async function checkoutPrSession(number, prompt = "") {
|
|
35461
35455
|
await checkoutPr(number);
|
|
35462
|
-
const claudeSessionId =
|
|
35456
|
+
const claudeSessionId = randomUUID17();
|
|
35463
35457
|
emitActivity({ kind: "command", name: "review", claudeSessionId });
|
|
35464
35458
|
const { done: done2 } = spawnClaude(prompt, {
|
|
35465
35459
|
permissionMode: "auto",
|
|
@@ -36506,7 +36500,7 @@ function gatherHighLevelSubject(prNumber, force) {
|
|
|
36506
36500
|
}
|
|
36507
36501
|
|
|
36508
36502
|
// src/commands/review/highLevel/openHighLevelOverlay.ts
|
|
36509
|
-
import { randomUUID as
|
|
36503
|
+
import { randomUUID as randomUUID19 } from "crypto";
|
|
36510
36504
|
|
|
36511
36505
|
// src/commands/review/highLevel/highLevelProgress.ts
|
|
36512
36506
|
function toItem2(check2, decision) {
|
|
@@ -36765,7 +36759,7 @@ function splitQueuedComments(record) {
|
|
|
36765
36759
|
}
|
|
36766
36760
|
|
|
36767
36761
|
// src/commands/review/highLevel/previewHighLevelReview.ts
|
|
36768
|
-
import { randomUUID as
|
|
36762
|
+
import { randomUUID as randomUUID18 } from "crypto";
|
|
36769
36763
|
|
|
36770
36764
|
// src/commands/review/highLevel/formatHighLevelReviewPreview.ts
|
|
36771
36765
|
function formatHighLevelReviewPreview(lineLevel, body) {
|
|
@@ -36792,7 +36786,7 @@ async function previewHighLevelReview(sessionId, record, submission) {
|
|
|
36792
36786
|
"Review",
|
|
36793
36787
|
{
|
|
36794
36788
|
sessionId,
|
|
36795
|
-
requestId:
|
|
36789
|
+
requestId: randomUUID18(),
|
|
36796
36790
|
title: `${LABELS[submission.event]} ${record.repo}#${record.prNumber}`,
|
|
36797
36791
|
body: formatHighLevelReviewPreview(submission.comments, submission.body),
|
|
36798
36792
|
prNumber: record.prNumber,
|
|
@@ -36843,7 +36837,7 @@ async function openHighLevelOverlay(sessionId, subject) {
|
|
|
36843
36837
|
"High-level review",
|
|
36844
36838
|
{
|
|
36845
36839
|
sessionId,
|
|
36846
|
-
requestId:
|
|
36840
|
+
requestId: randomUUID19(),
|
|
36847
36841
|
title: `${subject.repo}#${subject.prNumber} \u2014 ${subject.title}`,
|
|
36848
36842
|
body: JSON.stringify(highLevelPreviewPayload(subject)),
|
|
36849
36843
|
prNumber: subject.prNumber,
|
|
@@ -40061,7 +40055,7 @@ function registerSeq(program) {
|
|
|
40061
40055
|
}
|
|
40062
40056
|
|
|
40063
40057
|
// src/commands/show.ts
|
|
40064
|
-
import { randomUUID as
|
|
40058
|
+
import { randomUUID as randomUUID20 } from "crypto";
|
|
40065
40059
|
|
|
40066
40060
|
// src/commands/sessions/shared/sendShowPreview.ts
|
|
40067
40061
|
async function sendShowPreview(request) {
|
|
@@ -40113,7 +40107,7 @@ async function show3(options2) {
|
|
|
40113
40107
|
try {
|
|
40114
40108
|
await sendShowPreview({
|
|
40115
40109
|
sessionId,
|
|
40116
|
-
requestId:
|
|
40110
|
+
requestId: randomUUID20(),
|
|
40117
40111
|
title: options2.title ?? "Show",
|
|
40118
40112
|
body
|
|
40119
40113
|
});
|
|
@@ -40126,15 +40120,12 @@ async function show3(options2) {
|
|
|
40126
40120
|
|
|
40127
40121
|
// src/commands/registerShow.ts
|
|
40128
40122
|
function registerShow(program) {
|
|
40129
|
-
|
|
40130
|
-
"
|
|
40131
|
-
|
|
40132
|
-
|
|
40133
|
-
|
|
40134
|
-
|
|
40135
|
-
function internalCommand(command, calledBy) {
|
|
40136
|
-
command.internalCalledBy = calledBy;
|
|
40137
|
-
return command;
|
|
40123
|
+
internalCommand(
|
|
40124
|
+
program.command("show").description(
|
|
40125
|
+
"Open markdown in the session's web preview pane so long links, paths and snippets can be clicked and copied unbroken; prints it outside a web session"
|
|
40126
|
+
).option("--title <title>", "Pane title").requiredOption("--body <markdown|->", "Markdown to show, or - for stdin").action(show3),
|
|
40127
|
+
"/show"
|
|
40128
|
+
);
|
|
40138
40129
|
}
|
|
40139
40130
|
|
|
40140
40131
|
// src/commands/registerSignal.ts
|
|
@@ -40200,7 +40191,7 @@ function readSlackParts(files) {
|
|
|
40200
40191
|
}
|
|
40201
40192
|
|
|
40202
40193
|
// src/commands/slack/reviewProposedSlackMessage.ts
|
|
40203
|
-
import { randomUUID as
|
|
40194
|
+
import { randomUUID as randomUUID21 } from "crypto";
|
|
40204
40195
|
async function reviewProposedSlackMessage(target, body, workingPath) {
|
|
40205
40196
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
40206
40197
|
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return;
|
|
@@ -40210,7 +40201,7 @@ async function reviewProposedSlackMessage(target, body, workingPath) {
|
|
|
40210
40201
|
part ? `Slack message ${part.index} of ${part.total}` : "Slack message preview",
|
|
40211
40202
|
{
|
|
40212
40203
|
sessionId,
|
|
40213
|
-
requestId:
|
|
40204
|
+
requestId: randomUUID21(),
|
|
40214
40205
|
title: part ? `${destination} (${part.index}/${part.total})` : destination,
|
|
40215
40206
|
body,
|
|
40216
40207
|
prNumber: null,
|
|
@@ -45047,7 +45038,7 @@ var ClientHub = class extends Set {
|
|
|
45047
45038
|
};
|
|
45048
45039
|
|
|
45049
45040
|
// src/commands/sessions/daemon/createSession.ts
|
|
45050
|
-
import { randomUUID as
|
|
45041
|
+
import { randomUUID as randomUUID22 } from "crypto";
|
|
45051
45042
|
|
|
45052
45043
|
// src/commands/sessions/daemon/sessionBase.ts
|
|
45053
45044
|
function sessionBase(id, status2) {
|
|
@@ -45270,7 +45261,7 @@ function spawnRun(opts) {
|
|
|
45270
45261
|
function createSession(id, { prompt, cwd, design, auto, harness, holdPty } = {}) {
|
|
45271
45262
|
if (harness && harness !== "claude")
|
|
45272
45263
|
return createHarnessSession(id, harness, prompt, cwd, holdPty);
|
|
45273
|
-
const claudeSessionId =
|
|
45264
|
+
const claudeSessionId = randomUUID22();
|
|
45274
45265
|
return {
|
|
45275
45266
|
...sessionBase(id, prompt ? "running" : "waiting"),
|
|
45276
45267
|
name: `Session ${id}`,
|
|
@@ -46465,7 +46456,6 @@ function buildPrPreview(d, kind, prNumber) {
|
|
|
46465
46456
|
var PREVIEW_KINDS = [
|
|
46466
46457
|
"pr",
|
|
46467
46458
|
"backlog-item",
|
|
46468
|
-
"backlog-comment",
|
|
46469
46459
|
"pr-comment",
|
|
46470
46460
|
"github-issue",
|
|
46471
46461
|
"github-issue-comment",
|
|
@@ -46482,7 +46472,6 @@ function isPreviewKind(value) {
|
|
|
46482
46472
|
|
|
46483
46473
|
// src/commands/sessions/daemon/previewTargetLabel.ts
|
|
46484
46474
|
function previewTargetLabel(kind, itemType, prNumber, draft) {
|
|
46485
|
-
if (kind === "backlog-comment") return "backlog comment";
|
|
46486
46475
|
if (kind === "pr-comment") return "pr comment";
|
|
46487
46476
|
if (kind === "github-issue-comment") return "github issue comment";
|
|
46488
46477
|
if (kind === "github-issue-edit") return "github issue edit";
|
|
@@ -48053,7 +48042,7 @@ function codexRespawnPlan(session) {
|
|
|
48053
48042
|
}
|
|
48054
48043
|
|
|
48055
48044
|
// src/commands/sessions/daemon/interactiveRespawnPlan.ts
|
|
48056
|
-
import { randomUUID as
|
|
48045
|
+
import { randomUUID as randomUUID23 } from "crypto";
|
|
48057
48046
|
|
|
48058
48047
|
// src/commands/sessions/daemon/hasTranscriptOnDisk.ts
|
|
48059
48048
|
function hasTranscriptOnDisk(session) {
|
|
@@ -48080,7 +48069,7 @@ function interactiveRespawnPlan(session, resumes) {
|
|
|
48080
48069
|
return null;
|
|
48081
48070
|
}
|
|
48082
48071
|
function freshClaudePlan(session, prompt, cwd) {
|
|
48083
|
-
const claudeSessionId =
|
|
48072
|
+
const claudeSessionId = randomUUID23();
|
|
48084
48073
|
return {
|
|
48085
48074
|
spawn: () => {
|
|
48086
48075
|
session.claudeSessionId = claudeSessionId;
|