@staff0rd/assist 0.574.0 → 0.575.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/README.md +3 -3
- package/claude/commands/github.md +4 -18
- package/dist/commands/sessions/web/bundle.js +294 -292
- package/dist/index.js +141 -74
- package/package.json +1 -1
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.575.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -4946,14 +4946,14 @@ function findRuleViolations(data, rule) {
|
|
|
4946
4946
|
}
|
|
4947
4947
|
return violations;
|
|
4948
4948
|
}
|
|
4949
|
-
function findForbiddenStrings(
|
|
4950
|
-
return
|
|
4949
|
+
function findForbiddenStrings(rules3, readJson) {
|
|
4950
|
+
return rules3.flatMap((rule) => findRuleViolations(readJson(rule.file), rule));
|
|
4951
4951
|
}
|
|
4952
4952
|
|
|
4953
4953
|
// src/commands/verify/forbiddenStrings/index.ts
|
|
4954
4954
|
function forbiddenStrings() {
|
|
4955
|
-
const
|
|
4956
|
-
if (
|
|
4955
|
+
const rules3 = loadConfig().forbiddenStrings ?? [];
|
|
4956
|
+
if (rules3.length === 0) {
|
|
4957
4957
|
console.log("No forbidden-strings rules configured.");
|
|
4958
4958
|
process.exit(0);
|
|
4959
4959
|
}
|
|
@@ -4974,7 +4974,7 @@ function forbiddenStrings() {
|
|
|
4974
4974
|
cache5.set(file, parsed);
|
|
4975
4975
|
return parsed;
|
|
4976
4976
|
};
|
|
4977
|
-
const violations = findForbiddenStrings(
|
|
4977
|
+
const violations = findForbiddenStrings(rules3, readJson);
|
|
4978
4978
|
if (violations.length === 0) {
|
|
4979
4979
|
console.log("No forbidden strings found.");
|
|
4980
4980
|
process.exit(0);
|
|
@@ -13979,6 +13979,7 @@ function toPreviewDecision(msg) {
|
|
|
13979
13979
|
reason: msg.reason,
|
|
13980
13980
|
comments: Array.isArray(msg.comments) ? msg.comments : void 0,
|
|
13981
13981
|
screenshots: Array.isArray(msg.screenshots) ? msg.screenshots : void 0,
|
|
13982
|
+
body: typeof msg.body === "string" ? msg.body : void 0,
|
|
13982
13983
|
reviewAfter: msg.reviewAfter === true,
|
|
13983
13984
|
announceAfter: msg.announceAfter === true,
|
|
13984
13985
|
draft: typeof msg.draft === "boolean" ? msg.draft : void 0
|
|
@@ -14029,7 +14030,7 @@ function requestPreviewDecision(request) {
|
|
|
14029
14030
|
}
|
|
14030
14031
|
|
|
14031
14032
|
// src/commands/sessions/shared/awaitPreviewApproval.ts
|
|
14032
|
-
async function awaitPreviewApproval(subject, request) {
|
|
14033
|
+
async function awaitPreviewApproval(subject, request, saveEditedBody) {
|
|
14033
14034
|
console.log("Awaiting your approval in the assist web UI preview pane\u2026");
|
|
14034
14035
|
let decision;
|
|
14035
14036
|
try {
|
|
@@ -14040,6 +14041,7 @@ async function awaitPreviewApproval(subject, request) {
|
|
|
14040
14041
|
);
|
|
14041
14042
|
process.exit(1);
|
|
14042
14043
|
}
|
|
14044
|
+
if (decision.body !== void 0) saveEditedBody?.(decision.body);
|
|
14043
14045
|
if (decision.decision === "reject") reportPreviewRejection(subject, decision);
|
|
14044
14046
|
return decision;
|
|
14045
14047
|
}
|
|
@@ -20797,6 +20799,11 @@ async function createIssue(options2) {
|
|
|
20797
20799
|
}
|
|
20798
20800
|
}
|
|
20799
20801
|
|
|
20802
|
+
// src/commands/sessions/shared/inWebSession.ts
|
|
20803
|
+
function inWebSession() {
|
|
20804
|
+
return process.env.ASSIST_SESSION === "1" && !!process.env.ASSIST_SESSION_ID;
|
|
20805
|
+
}
|
|
20806
|
+
|
|
20800
20807
|
// src/commands/github/issue/fetchIssue.ts
|
|
20801
20808
|
import { execFileSync as execFileSync8 } from "child_process";
|
|
20802
20809
|
function fetchIssue2(number, repo) {
|
|
@@ -20835,20 +20842,48 @@ function pushIssueBody(number, repo, bodyPath) {
|
|
|
20835
20842
|
}
|
|
20836
20843
|
}
|
|
20837
20844
|
|
|
20845
|
+
// src/commands/github/issue/pushUnchangedIssue.ts
|
|
20846
|
+
function pushUnchangedIssue(number, repo, target, fetchedAt, bodyPath) {
|
|
20847
|
+
if (fetchIssue2(number, repo).updatedAt !== fetchedAt) {
|
|
20848
|
+
console.error(
|
|
20849
|
+
`${target} was updated on GitHub after it was fetched. Nothing was pushed; the markdown is at ${bodyPath}`
|
|
20850
|
+
);
|
|
20851
|
+
process.exit(1);
|
|
20852
|
+
}
|
|
20853
|
+
pushIssueBody(number, repo, bodyPath);
|
|
20854
|
+
console.log(`Issue body updated on ${target}`);
|
|
20855
|
+
}
|
|
20856
|
+
|
|
20838
20857
|
// src/commands/github/issue/reviewProposedIssueEdit.ts
|
|
20839
20858
|
import { randomUUID as randomUUID9 } from "crypto";
|
|
20840
|
-
async function reviewProposedIssueEdit(title, body) {
|
|
20859
|
+
async function reviewProposedIssueEdit(title, body, saveEditedBody) {
|
|
20841
20860
|
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
20842
|
-
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return
|
|
20843
|
-
await awaitPreviewApproval(
|
|
20844
|
-
|
|
20845
|
-
|
|
20846
|
-
|
|
20847
|
-
|
|
20848
|
-
|
|
20849
|
-
|
|
20850
|
-
|
|
20851
|
-
|
|
20861
|
+
if (process.env.ASSIST_SESSION !== "1" || !sessionId) return body;
|
|
20862
|
+
const decision = await awaitPreviewApproval(
|
|
20863
|
+
"GitHub issue edit preview",
|
|
20864
|
+
{
|
|
20865
|
+
sessionId,
|
|
20866
|
+
requestId: randomUUID9(),
|
|
20867
|
+
title,
|
|
20868
|
+
body,
|
|
20869
|
+
prNumber: null,
|
|
20870
|
+
kind: "github-issue-edit"
|
|
20871
|
+
},
|
|
20872
|
+
saveEditedBody
|
|
20873
|
+
);
|
|
20874
|
+
return decision.body ?? body;
|
|
20875
|
+
}
|
|
20876
|
+
|
|
20877
|
+
// src/commands/github/issue/viewIssue.ts
|
|
20878
|
+
import { execFileSync as execFileSync10 } from "child_process";
|
|
20879
|
+
function viewIssue(number, repo) {
|
|
20880
|
+
const args = ["issue", "view", String(number)];
|
|
20881
|
+
if (repo) args.push("--repo", repo);
|
|
20882
|
+
try {
|
|
20883
|
+
execFileSync10("gh", args, { stdio: "inherit" });
|
|
20884
|
+
} catch {
|
|
20885
|
+
process.exit(1);
|
|
20886
|
+
}
|
|
20852
20887
|
}
|
|
20853
20888
|
|
|
20854
20889
|
// src/commands/github/issue/writeIssueWorkingFile.ts
|
|
@@ -20885,18 +20920,16 @@ function slugFromUrl(url) {
|
|
|
20885
20920
|
const match = /github\.com\/([^/]+\/[^/]+)\//.exec(url ?? "");
|
|
20886
20921
|
return match ? match[1] : "unknown/unknown";
|
|
20887
20922
|
}
|
|
20888
|
-
function abandon(reason4, bodyPath) {
|
|
20889
|
-
console.error(
|
|
20890
|
-
`${reason4}. Nothing was pushed; the markdown is at ${bodyPath}`
|
|
20891
|
-
);
|
|
20892
|
-
process.exit(1);
|
|
20893
|
-
}
|
|
20894
20923
|
async function editIssue(numberArg, options2) {
|
|
20895
20924
|
const number = Number.parseInt(numberArg, 10);
|
|
20896
20925
|
if (!Number.isInteger(number) || number <= 0) {
|
|
20897
20926
|
console.error(USAGE3);
|
|
20898
20927
|
process.exit(1);
|
|
20899
20928
|
}
|
|
20929
|
+
if (!inWebSession()) {
|
|
20930
|
+
viewIssue(number, options2.repo);
|
|
20931
|
+
return;
|
|
20932
|
+
}
|
|
20900
20933
|
const issue = fetchIssue2(number, options2.repo);
|
|
20901
20934
|
const slug = options2.repo ?? slugFromUrl(issue.url);
|
|
20902
20935
|
const target = `${slug}#${number}`;
|
|
@@ -20905,26 +20938,19 @@ async function editIssue(numberArg, options2) {
|
|
|
20905
20938
|
issue.title,
|
|
20906
20939
|
issue.body
|
|
20907
20940
|
);
|
|
20908
|
-
const
|
|
20909
|
-
|
|
20910
|
-
|
|
20911
|
-
target,
|
|
20912
|
-
issue.updatedAt,
|
|
20913
|
-
issue.body
|
|
20914
|
-
);
|
|
20915
|
-
const reviewed = await reviewProposedIssueEdit(
|
|
20941
|
+
const save = (markdown) => writeIssueWorkingFile(slug, number, target, issue.updatedAt, markdown);
|
|
20942
|
+
const bodyPath = save(issue.body);
|
|
20943
|
+
const edited = await reviewProposedIssueEdit(
|
|
20916
20944
|
`Edit ${target}: ${issue.title}`,
|
|
20917
|
-
issue.body
|
|
20945
|
+
issue.body,
|
|
20946
|
+
save
|
|
20918
20947
|
);
|
|
20919
|
-
|
|
20920
|
-
|
|
20921
|
-
|
|
20922
|
-
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
abandon(`${target} was updated on GitHub after it was fetched`, bodyPath);
|
|
20926
|
-
pushIssueBody(number, options2.repo, bodyPath);
|
|
20927
|
-
console.log(`Issue body updated on ${target}`);
|
|
20948
|
+
validateProposedContent(
|
|
20949
|
+
{ subject: "Issue", context: "GitHub issues" },
|
|
20950
|
+
issue.title,
|
|
20951
|
+
edited
|
|
20952
|
+
);
|
|
20953
|
+
pushUnchangedIssue(number, options2.repo, target, issue.updatedAt, bodyPath);
|
|
20928
20954
|
}
|
|
20929
20955
|
|
|
20930
20956
|
// src/commands/prs/readBodyArgument.ts
|
|
@@ -21342,7 +21368,7 @@ async function jiraAuth() {
|
|
|
21342
21368
|
|
|
21343
21369
|
// src/commands/jira/viewIssue.ts
|
|
21344
21370
|
import chalk163 from "chalk";
|
|
21345
|
-
function
|
|
21371
|
+
function viewIssue2(issueKey) {
|
|
21346
21372
|
const parsed = fetchIssue(issueKey, "summary,description");
|
|
21347
21373
|
const fields = parsed?.fields;
|
|
21348
21374
|
const summary = fields?.summary;
|
|
@@ -21372,7 +21398,7 @@ function registerJira(program2) {
|
|
|
21372
21398
|
const jiraCommand = program2.command("jira").description("Jira utilities");
|
|
21373
21399
|
jiraCommand.command("auth").description("Authenticate with Jira via API token").action(() => jiraAuth());
|
|
21374
21400
|
jiraCommand.command("ac <issue-key>").description("Print acceptance criteria for a Jira issue").action((issueKey) => acceptanceCriteria(issueKey));
|
|
21375
|
-
jiraCommand.command("view <issue-key>").description("Print the title and description of a Jira issue").action((issueKey) =>
|
|
21401
|
+
jiraCommand.command("view <issue-key>").description("Print the title and description of a Jira issue").action((issueKey) => viewIssue2(issueKey));
|
|
21376
21402
|
configHelp(jiraCommand, jiraConfigHelp);
|
|
21377
21403
|
}
|
|
21378
21404
|
|
|
@@ -21396,7 +21422,7 @@ function registerRefineLaunch(program2, resumeFlag) {
|
|
|
21396
21422
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
21397
21423
|
|
|
21398
21424
|
// src/commands/review/checkoutPr.ts
|
|
21399
|
-
import { execFileSync as
|
|
21425
|
+
import { execFileSync as execFileSync12 } from "child_process";
|
|
21400
21426
|
import chalk164 from "chalk";
|
|
21401
21427
|
|
|
21402
21428
|
// src/commands/sessions/daemon/daemonLog.ts
|
|
@@ -21956,10 +21982,10 @@ async function moveToPrCheckoutTree() {
|
|
|
21956
21982
|
}
|
|
21957
21983
|
|
|
21958
21984
|
// src/commands/review/prHeadBranch.ts
|
|
21959
|
-
import { execFileSync as
|
|
21985
|
+
import { execFileSync as execFileSync11 } from "child_process";
|
|
21960
21986
|
function prHeadBranch(number) {
|
|
21961
21987
|
try {
|
|
21962
|
-
const out =
|
|
21988
|
+
const out = execFileSync11(
|
|
21963
21989
|
"gh",
|
|
21964
21990
|
["pr", "view", number, "--json", "headRefName", "-q", ".headRefName"],
|
|
21965
21991
|
{ encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }
|
|
@@ -22007,7 +22033,7 @@ async function checkoutPr(number) {
|
|
|
22007
22033
|
if (headRef && moveToExistingCheckout(number, headRef)) return;
|
|
22008
22034
|
await moveToPrCheckoutTree();
|
|
22009
22035
|
try {
|
|
22010
|
-
|
|
22036
|
+
execFileSync12("gh", ["pr", "checkout", number], { stdio: "inherit" });
|
|
22011
22037
|
} catch {
|
|
22012
22038
|
console.error(chalk164.red(`gh pr checkout ${number} failed; aborting.`));
|
|
22013
22039
|
process.exit(1);
|
|
@@ -23221,13 +23247,13 @@ ${screenshots.join("\n\n")}`;
|
|
|
23221
23247
|
}
|
|
23222
23248
|
|
|
23223
23249
|
// src/commands/prs/applyEdit.ts
|
|
23224
|
-
import { execFileSync as
|
|
23250
|
+
import { execFileSync as execFileSync13 } from "child_process";
|
|
23225
23251
|
function applyEdit(number, title, body) {
|
|
23226
23252
|
const args = ["pr", "edit", String(number)];
|
|
23227
23253
|
if (title) args.push("--title", title);
|
|
23228
23254
|
args.push("--body", body);
|
|
23229
23255
|
try {
|
|
23230
|
-
|
|
23256
|
+
execFileSync13("gh", args, { stdio: "inherit" });
|
|
23231
23257
|
} catch {
|
|
23232
23258
|
process.exit(1);
|
|
23233
23259
|
}
|
|
@@ -24023,7 +24049,7 @@ function buildValidatedBody(options2, usage) {
|
|
|
24023
24049
|
}
|
|
24024
24050
|
|
|
24025
24051
|
// src/commands/prs/placePr.ts
|
|
24026
|
-
import { execFileSync as
|
|
24052
|
+
import { execFileSync as execFileSync14 } from "child_process";
|
|
24027
24053
|
|
|
24028
24054
|
// src/commands/prs/buildCreateArgs.ts
|
|
24029
24055
|
function buildEditArgs(number, title, body) {
|
|
@@ -24090,7 +24116,7 @@ async function recordPrActivity() {
|
|
|
24090
24116
|
// src/commands/prs/placePr.ts
|
|
24091
24117
|
function hasUpstream2() {
|
|
24092
24118
|
try {
|
|
24093
|
-
|
|
24119
|
+
execFileSync14(
|
|
24094
24120
|
"git",
|
|
24095
24121
|
["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"],
|
|
24096
24122
|
{ stdio: "pipe" }
|
|
@@ -24102,13 +24128,13 @@ function hasUpstream2() {
|
|
|
24102
24128
|
}
|
|
24103
24129
|
function ensureBranchPushed() {
|
|
24104
24130
|
const args = hasUpstream2() ? ["push"] : ["push", "--set-upstream", "origin", "HEAD"];
|
|
24105
|
-
|
|
24131
|
+
execFileSync14("git", args, { stdio: "inherit" });
|
|
24106
24132
|
}
|
|
24107
24133
|
async function placePr(prNumber, title, body, options2) {
|
|
24108
24134
|
const args = prNumber !== null ? buildEditArgs(prNumber, title, body) : buildCreateArgs(title, body, options2);
|
|
24109
24135
|
try {
|
|
24110
24136
|
if (prNumber === null && !options2.head) ensureBranchPushed();
|
|
24111
|
-
|
|
24137
|
+
execFileSync14("gh", args, { stdio: "inherit" });
|
|
24112
24138
|
} catch {
|
|
24113
24139
|
process.exit(1);
|
|
24114
24140
|
}
|
|
@@ -30358,9 +30384,9 @@ function registerVoice(program2) {
|
|
|
30358
30384
|
import { join as join84 } from "path";
|
|
30359
30385
|
|
|
30360
30386
|
// src/commands/watch/resolveUpstream.ts
|
|
30361
|
-
import { execFileSync as
|
|
30387
|
+
import { execFileSync as execFileSync15 } from "child_process";
|
|
30362
30388
|
function runGit3(args, cwd) {
|
|
30363
|
-
return
|
|
30389
|
+
return execFileSync15("git", args, {
|
|
30364
30390
|
encoding: "utf8",
|
|
30365
30391
|
stdio: ["pipe", "pipe", "pipe"],
|
|
30366
30392
|
cwd
|
|
@@ -30426,7 +30452,8 @@ function renderWatchReport({
|
|
|
30426
30452
|
version: version2,
|
|
30427
30453
|
commits: commits2,
|
|
30428
30454
|
newShas,
|
|
30429
|
-
restarts
|
|
30455
|
+
restarts,
|
|
30456
|
+
syncs
|
|
30430
30457
|
}) {
|
|
30431
30458
|
const isNew = new Set(newShas);
|
|
30432
30459
|
const lines2 = [`**Version** ${version2}`, ""];
|
|
@@ -30445,6 +30472,10 @@ function renderWatchReport({
|
|
|
30445
30472
|
lines2.push(
|
|
30446
30473
|
...restarts.length === 0 ? ["- none needed"] : restarts.map((restart) => `- ${restart}`)
|
|
30447
30474
|
);
|
|
30475
|
+
lines2.push("", "**Sync**", "");
|
|
30476
|
+
lines2.push(
|
|
30477
|
+
...syncs.length === 0 ? ["- not needed"] : syncs.map((sync2) => `- ${sync2}`)
|
|
30478
|
+
);
|
|
30448
30479
|
return lines2.join("\n");
|
|
30449
30480
|
}
|
|
30450
30481
|
|
|
@@ -30465,17 +30496,52 @@ function restartAdvice(paths) {
|
|
|
30465
30496
|
return rules.filter((rule) => paths.some(rule.matches)).map((rule) => rule.advice);
|
|
30466
30497
|
}
|
|
30467
30498
|
|
|
30499
|
+
// src/commands/watch/syncAdvice.ts
|
|
30500
|
+
var rules2 = [
|
|
30501
|
+
{
|
|
30502
|
+
matches: (path80) => path80.startsWith("claude/commands/"),
|
|
30503
|
+
reason: "claude/commands changed"
|
|
30504
|
+
},
|
|
30505
|
+
{
|
|
30506
|
+
matches: (path80) => path80.startsWith("claude/skills/"),
|
|
30507
|
+
reason: "claude/skills changed"
|
|
30508
|
+
},
|
|
30509
|
+
{
|
|
30510
|
+
matches: (path80) => path80 === "claude/settings.json",
|
|
30511
|
+
reason: "claude/settings.json changed"
|
|
30512
|
+
},
|
|
30513
|
+
{
|
|
30514
|
+
matches: (path80) => path80 === "claude/CLAUDE.md",
|
|
30515
|
+
reason: "claude/CLAUDE.md changed"
|
|
30516
|
+
},
|
|
30517
|
+
{
|
|
30518
|
+
matches: (path80) => path80 === "claude/design-system-prompt.md",
|
|
30519
|
+
reason: "claude/design-system-prompt.md changed"
|
|
30520
|
+
},
|
|
30521
|
+
{
|
|
30522
|
+
matches: (path80) => path80.startsWith("codex/"),
|
|
30523
|
+
reason: "codex sources changed"
|
|
30524
|
+
},
|
|
30525
|
+
{
|
|
30526
|
+
matches: (path80) => path80.startsWith("pi/"),
|
|
30527
|
+
reason: "pi sources changed"
|
|
30528
|
+
}
|
|
30529
|
+
];
|
|
30530
|
+
function syncAdvice(paths) {
|
|
30531
|
+
return rules2.filter((rule) => paths.some(rule.matches)).map((rule) => rule.reason);
|
|
30532
|
+
}
|
|
30533
|
+
|
|
30468
30534
|
// src/commands/watch/buildWatchReport.ts
|
|
30469
30535
|
var lines = (output) => output.split("\n").filter((line) => line.length > 0);
|
|
30470
30536
|
function buildWatchReport(from, cwd) {
|
|
30471
30537
|
const range = from ? `${from}..HEAD` : void 0;
|
|
30538
|
+
const changed = range ? lines(runGit3(["diff", "--name-only", range], cwd)) : [];
|
|
30472
30539
|
return renderWatchReport({
|
|
30473
30540
|
version: readBuiltVersion(cwd),
|
|
30474
30541
|
commits: readRecentCommits(10, cwd),
|
|
30475
30542
|
newShas: range ? lines(runGit3(["rev-list", range], cwd)) : [],
|
|
30476
|
-
restarts: restartAdvice(
|
|
30477
|
-
|
|
30478
|
-
)
|
|
30543
|
+
restarts: restartAdvice(changed),
|
|
30544
|
+
syncs: syncAdvice(changed)
|
|
30479
30545
|
});
|
|
30480
30546
|
}
|
|
30481
30547
|
|
|
@@ -30721,13 +30787,13 @@ import { spawn as spawn9 } from "child_process";
|
|
|
30721
30787
|
import { existsSync as existsSync69 } from "fs";
|
|
30722
30788
|
|
|
30723
30789
|
// src/commands/run/resolveCommand.ts
|
|
30724
|
-
import { execFileSync as
|
|
30790
|
+
import { execFileSync as execFileSync16 } from "child_process";
|
|
30725
30791
|
import { existsSync as existsSync68 } from "fs";
|
|
30726
30792
|
import { dirname as dirname35, join as join85, resolve as resolve19 } from "path";
|
|
30727
30793
|
function resolveCommand2(command) {
|
|
30728
30794
|
if (process.platform !== "win32" || command !== "bash") return command;
|
|
30729
30795
|
try {
|
|
30730
|
-
const gitPath =
|
|
30796
|
+
const gitPath = execFileSync16("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
|
|
30731
30797
|
const gitRoot = resolve19(dirname35(gitPath), "..");
|
|
30732
30798
|
const gitBash = join85(gitRoot, "bin", "bash.exe");
|
|
30733
30799
|
if (existsSync68(gitBash)) return gitBash;
|
|
@@ -30824,11 +30890,11 @@ async function reportBuildOrExit(entry) {
|
|
|
30824
30890
|
}
|
|
30825
30891
|
|
|
30826
30892
|
// src/commands/watch/fetchQuietly.ts
|
|
30827
|
-
import { execFileSync as
|
|
30893
|
+
import { execFileSync as execFileSync17 } from "child_process";
|
|
30828
30894
|
var MIN_FETCH_TIMEOUT_MS = 6e4;
|
|
30829
30895
|
function fetchQuietly(cwd, intervalMs) {
|
|
30830
30896
|
try {
|
|
30831
|
-
|
|
30897
|
+
execFileSync17("git", ["fetch", "--quiet"], {
|
|
30832
30898
|
stdio: ["pipe", "pipe", "pipe"],
|
|
30833
30899
|
cwd,
|
|
30834
30900
|
timeout: Math.max(intervalMs, MIN_FETCH_TIMEOUT_MS)
|
|
@@ -30961,10 +31027,10 @@ function registerWatch(program2) {
|
|
|
30961
31027
|
(options2) => watchWait(options2)
|
|
30962
31028
|
);
|
|
30963
31029
|
watchCommand.command("report").description(
|
|
30964
|
-
"Print the built version, the last 10 commits as a markdown table,
|
|
31030
|
+
"Print the built version, the last 10 commits as a markdown table, the restarts the new commits make necessary, and whether ~/.claude needs a sync"
|
|
30965
31031
|
).option(
|
|
30966
31032
|
"--from <sha>",
|
|
30967
|
-
"Mark commits reachable from HEAD but not <sha> as new, and derive restart advice from the files they changed"
|
|
31033
|
+
"Mark commits reachable from HEAD but not <sha> as new, and derive the restart and sync advice from the files they changed"
|
|
30968
31034
|
).action((options2) => watchReport(options2));
|
|
30969
31035
|
}
|
|
30970
31036
|
|
|
@@ -31128,7 +31194,7 @@ async function auth() {
|
|
|
31128
31194
|
}
|
|
31129
31195
|
|
|
31130
31196
|
// src/commands/roam/postRoamActivity.ts
|
|
31131
|
-
import { execFileSync as
|
|
31197
|
+
import { execFileSync as execFileSync18 } from "child_process";
|
|
31132
31198
|
import { readdirSync as readdirSync20, readFileSync as readFileSync52, statSync as statSync11 } from "fs";
|
|
31133
31199
|
import { join as join86 } from "path";
|
|
31134
31200
|
function findPortFile(roamDir) {
|
|
@@ -31161,7 +31227,7 @@ function postRoamActivity(app, event) {
|
|
|
31161
31227
|
}
|
|
31162
31228
|
const url = `http://127.0.0.1:${port}/api/v1/activity/${app}/${event}?pid=${app === "codex" ? 99998 : 99999}`;
|
|
31163
31229
|
try {
|
|
31164
|
-
|
|
31230
|
+
execFileSync18("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
|
|
31165
31231
|
stdio: "ignore"
|
|
31166
31232
|
});
|
|
31167
31233
|
} catch {
|
|
@@ -31637,11 +31703,11 @@ function screenshot(processName) {
|
|
|
31637
31703
|
}
|
|
31638
31704
|
|
|
31639
31705
|
// src/commands/sessions/daemon/listDaemonPids.ts
|
|
31640
|
-
import { execFileSync as
|
|
31706
|
+
import { execFileSync as execFileSync19 } from "child_process";
|
|
31641
31707
|
function listDaemonPids() {
|
|
31642
31708
|
if (process.platform === "win32") return [];
|
|
31643
31709
|
try {
|
|
31644
|
-
const out =
|
|
31710
|
+
const out = execFileSync19("ps", ["-eo", "pid=,args="], {
|
|
31645
31711
|
encoding: "utf8"
|
|
31646
31712
|
});
|
|
31647
31713
|
return out.split("\n").filter((line) => line.includes("assist") && / daemon run\b/.test(line)).map((line) => Number.parseInt(line.trim(), 10)).filter((pid) => Number.isInteger(pid));
|
|
@@ -32875,6 +32941,7 @@ function decidePrPreview(sessions, waiters, notify2, d) {
|
|
|
32875
32941
|
reason: d.reason,
|
|
32876
32942
|
comments: d.comments,
|
|
32877
32943
|
screenshots: d.screenshots,
|
|
32944
|
+
body: d.body,
|
|
32878
32945
|
reviewAfter: d.reviewAfter,
|
|
32879
32946
|
announceAfter: d.announceAfter,
|
|
32880
32947
|
draft: d.draft
|
|
@@ -37206,7 +37273,7 @@ function cleanupOwnedFiles() {
|
|
|
37206
37273
|
import * as net3 from "net";
|
|
37207
37274
|
|
|
37208
37275
|
// src/commands/sessions/daemon/findPortHolderPid.ts
|
|
37209
|
-
import { execFileSync as
|
|
37276
|
+
import { execFileSync as execFileSync20 } from "child_process";
|
|
37210
37277
|
var PROBE_TIMEOUT_MS = 3e3;
|
|
37211
37278
|
function findPortHolderPid(port) {
|
|
37212
37279
|
try {
|
|
@@ -37216,7 +37283,7 @@ function findPortHolderPid(port) {
|
|
|
37216
37283
|
}
|
|
37217
37284
|
}
|
|
37218
37285
|
function probe(command, args) {
|
|
37219
|
-
return
|
|
37286
|
+
return execFileSync20(command, args, {
|
|
37220
37287
|
encoding: "utf8",
|
|
37221
37288
|
timeout: PROBE_TIMEOUT_MS,
|
|
37222
37289
|
stdio: ["ignore", "pipe", "ignore"]
|
|
@@ -37423,7 +37490,7 @@ function summaryPathFor(jsonlPath2) {
|
|
|
37423
37490
|
}
|
|
37424
37491
|
|
|
37425
37492
|
// src/commands/sessions/summarise/summariseSession.ts
|
|
37426
|
-
import { execFileSync as
|
|
37493
|
+
import { execFileSync as execFileSync21 } from "child_process";
|
|
37427
37494
|
function summariseSession(jsonlPath2) {
|
|
37428
37495
|
const firstMessage = extractFirstUserMessage(jsonlPath2);
|
|
37429
37496
|
const backlogIds = scanSessionBacklogRefs(jsonlPath2);
|
|
@@ -37432,7 +37499,7 @@ function summariseSession(jsonlPath2) {
|
|
|
37432
37499
|
}
|
|
37433
37500
|
const prompt = buildPrompt6(firstMessage, backlogIds);
|
|
37434
37501
|
try {
|
|
37435
|
-
const output =
|
|
37502
|
+
const output = execFileSync21("claude", ["-p", "--model", "haiku", prompt], {
|
|
37436
37503
|
encoding: "utf8",
|
|
37437
37504
|
timeout: 3e4,
|
|
37438
37505
|
stdio: ["ignore", "pipe", "ignore"]
|