@staff0rd/assist 0.1072.1 → 0.1073.1
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/built-version +1 -1
- package/dist/commands/sessions/web/bundle.js +423 -423
- package/dist/commands/sessions/web/monaco.css +1 -1
- package/dist/commands/sessions/web/monaco.js +288 -223
- package/dist/commands/sessions/web/monaco.worker.js +14 -14
- package/dist/index.js +53 -52
- package/package.json +5 -4
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.1073.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -42,7 +42,8 @@ var package_default = {
|
|
|
42
42
|
overrides: {
|
|
43
43
|
lodash: "^4.18.0",
|
|
44
44
|
xml2js: "^0.5.0",
|
|
45
|
-
uuid: "^11.1.1"
|
|
45
|
+
uuid: "^11.1.1",
|
|
46
|
+
dompurify: "^3.4.17"
|
|
46
47
|
},
|
|
47
48
|
keywords: [],
|
|
48
49
|
author: "",
|
|
@@ -124,8 +125,8 @@ var package_default = {
|
|
|
124
125
|
jscpd: "^4.0.5",
|
|
125
126
|
jsdom: "^29.1.1",
|
|
126
127
|
knip: "^5.71.0",
|
|
127
|
-
"monaco-editor": "^0.
|
|
128
|
-
oxfmt: "^0.
|
|
128
|
+
"monaco-editor": "^0.57.0",
|
|
129
|
+
oxfmt: "^0.76.0",
|
|
129
130
|
oxlint: "^1.69.0",
|
|
130
131
|
playwright: "^1.64.1",
|
|
131
132
|
"qrcode.react": "^4.2.0",
|
|
@@ -34844,20 +34845,18 @@ function threadPath(thread) {
|
|
|
34844
34845
|
}
|
|
34845
34846
|
function mapAzureDevopsThreads(threads, prUrl) {
|
|
34846
34847
|
return threads.filter((thread) => !thread.isDeleted).flatMap(
|
|
34847
|
-
(thread) => (thread.comments ?? []).filter((c) => !c.isDeleted && c.commentType !== "system" && c.content).map(
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
-
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
|
|
34858
|
-
|
|
34859
|
-
})
|
|
34860
|
-
)
|
|
34848
|
+
(thread) => (thread.comments ?? []).filter((c) => !c.isDeleted && c.commentType !== "system" && c.content).map((c) => ({
|
|
34849
|
+
type: "line",
|
|
34850
|
+
id: thread.id,
|
|
34851
|
+
threadId: String(thread.id),
|
|
34852
|
+
user: c.author?.displayName ?? c.author?.uniqueName ?? "unknown",
|
|
34853
|
+
path: threadPath(thread),
|
|
34854
|
+
line: threadLine(thread),
|
|
34855
|
+
body: c.content ?? "",
|
|
34856
|
+
diff_hunk: "",
|
|
34857
|
+
html_url: `${prUrl}?discussionId=${thread.id}`,
|
|
34858
|
+
resolved: isResolved(thread.status)
|
|
34859
|
+
}))
|
|
34861
34860
|
);
|
|
34862
34861
|
}
|
|
34863
34862
|
|
|
@@ -40942,13 +40941,11 @@ function nodesOf(at2, prefix2) {
|
|
|
40942
40941
|
const dirs = [...at2.dirs].map(
|
|
40943
40942
|
([name, child]) => collapsedDirNode(name, child, prefix2)
|
|
40944
40943
|
);
|
|
40945
|
-
const files = at2.files.map(
|
|
40946
|
-
|
|
40947
|
-
|
|
40948
|
-
|
|
40949
|
-
|
|
40950
|
-
})
|
|
40951
|
-
);
|
|
40944
|
+
const files = at2.files.map((file) => ({
|
|
40945
|
+
kind: "file",
|
|
40946
|
+
name: basename24(file.path),
|
|
40947
|
+
...file
|
|
40948
|
+
}));
|
|
40952
40949
|
return [...dirs.sort(byName), ...files.sort(byName)];
|
|
40953
40950
|
}
|
|
40954
40951
|
function collapsedDirNode(name, at2, prefix2) {
|
|
@@ -44158,12 +44155,10 @@ function submitPendingLeftByFailedThreads(body, result) {
|
|
|
44158
44155
|
function withRejectedFindings(unanchored, rejected) {
|
|
44159
44156
|
return [
|
|
44160
44157
|
...unanchored,
|
|
44161
|
-
...rejected.map(
|
|
44162
|
-
|
|
44163
|
-
|
|
44164
|
-
|
|
44165
|
-
})
|
|
44166
|
-
)
|
|
44158
|
+
...rejected.map((finding) => ({
|
|
44159
|
+
...finding,
|
|
44160
|
+
reason: "comment-rejected"
|
|
44161
|
+
}))
|
|
44167
44162
|
];
|
|
44168
44163
|
}
|
|
44169
44164
|
|
|
@@ -44312,12 +44307,10 @@ function selectInDiffFindings(lineBound, prDiff) {
|
|
|
44312
44307
|
warnOutOfDiff(outOfDiff);
|
|
44313
44308
|
return {
|
|
44314
44309
|
inDiff,
|
|
44315
|
-
unanchored: outOfDiff.map(
|
|
44316
|
-
|
|
44317
|
-
|
|
44318
|
-
|
|
44319
|
-
})
|
|
44320
|
-
)
|
|
44310
|
+
unanchored: outOfDiff.map((finding) => ({
|
|
44311
|
+
...finding,
|
|
44312
|
+
reason: "out-of-diff"
|
|
44313
|
+
}))
|
|
44321
44314
|
};
|
|
44322
44315
|
}
|
|
44323
44316
|
|
|
@@ -44352,12 +44345,10 @@ function selectPostableFindings(markdown, prInfo) {
|
|
|
44352
44345
|
`Skipped ${alreadyRaised.length} finding(s) already raised by prior comments.`
|
|
44353
44346
|
);
|
|
44354
44347
|
}
|
|
44355
|
-
const carriedUnlocated = unlocated.map(
|
|
44356
|
-
|
|
44357
|
-
|
|
44358
|
-
|
|
44359
|
-
})
|
|
44360
|
-
);
|
|
44348
|
+
const carriedUnlocated = unlocated.map((finding) => ({
|
|
44349
|
+
...finding,
|
|
44350
|
+
reason: "unlocated"
|
|
44351
|
+
}));
|
|
44361
44352
|
if (lineBound.length === 0) {
|
|
44362
44353
|
console.log("No line-bound findings to comment on.");
|
|
44363
44354
|
return { inDiff: [], unanchored: carriedUnlocated };
|
|
@@ -51907,6 +51898,24 @@ function closeGateApplies(sessions, session) {
|
|
|
51907
51898
|
// src/commands/sessions/daemon/worktree/liveProcessesInTree.ts
|
|
51908
51899
|
import { readdirSync as readdirSync28, readlinkSync } from "fs";
|
|
51909
51900
|
import { sep as sep4 } from "path";
|
|
51901
|
+
|
|
51902
|
+
// src/commands/sessions/daemon/worktree/readProc.ts
|
|
51903
|
+
import { readFileSync as readFileSync76 } from "fs";
|
|
51904
|
+
function readProc(procRoot, pid, file) {
|
|
51905
|
+
try {
|
|
51906
|
+
return readFileSync76(`${procRoot}/${pid}/${file}`, "utf8");
|
|
51907
|
+
} catch {
|
|
51908
|
+
return void 0;
|
|
51909
|
+
}
|
|
51910
|
+
}
|
|
51911
|
+
|
|
51912
|
+
// src/commands/sessions/daemon/worktree/isCodexAppServer.ts
|
|
51913
|
+
function isCodexAppServer(pid, procRoot = "/proc") {
|
|
51914
|
+
const args = readProc(procRoot, pid, "cmdline")?.split("\0") ?? [];
|
|
51915
|
+
return args[0]?.includes("/app-server-daemon/") === true || args.includes("--managed-daemon");
|
|
51916
|
+
}
|
|
51917
|
+
|
|
51918
|
+
// src/commands/sessions/daemon/worktree/liveProcessesInTree.ts
|
|
51910
51919
|
function liveProcessesInTree(treePath, procRoot = "/proc") {
|
|
51911
51920
|
let entries;
|
|
51912
51921
|
try {
|
|
@@ -51919,7 +51928,7 @@ function liveProcessesInTree(treePath, procRoot = "/proc") {
|
|
|
51919
51928
|
const pid = Number(entry);
|
|
51920
51929
|
if (!Number.isInteger(pid) || pid === process.pid) continue;
|
|
51921
51930
|
const cwd = processCwd(`${procRoot}/${entry}/cwd`);
|
|
51922
|
-
if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep4)))
|
|
51931
|
+
if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep4)) && !isCodexAppServer(pid, procRoot))
|
|
51923
51932
|
pids.push(pid);
|
|
51924
51933
|
}
|
|
51925
51934
|
return pids;
|
|
@@ -51979,7 +51988,6 @@ function pidList(pids) {
|
|
|
51979
51988
|
}
|
|
51980
51989
|
|
|
51981
51990
|
// src/commands/sessions/daemon/worktree/readOccupant.ts
|
|
51982
|
-
import { readFileSync as readFileSync76 } from "fs";
|
|
51983
51991
|
var VSCODE_PATHS = [
|
|
51984
51992
|
"/.vscode-server/",
|
|
51985
51993
|
"/.vscode-server-insiders/",
|
|
@@ -52012,13 +52020,6 @@ function parentPid(stat5) {
|
|
|
52012
52020
|
const ppid = Number(fields[1]);
|
|
52013
52021
|
return Number.isInteger(ppid) ? ppid : void 0;
|
|
52014
52022
|
}
|
|
52015
|
-
function readProc(procRoot, pid, file) {
|
|
52016
|
-
try {
|
|
52017
|
-
return readFileSync76(`${procRoot}/${pid}/${file}`, "utf8");
|
|
52018
|
-
} catch {
|
|
52019
|
-
return void 0;
|
|
52020
|
-
}
|
|
52021
|
-
}
|
|
52022
52023
|
|
|
52023
52024
|
// src/commands/sessions/daemon/worktree/liveOccupantReason.ts
|
|
52024
52025
|
function liveOccupantReason(treePath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staff0rd/assist",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1073.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"overrides": {
|
|
37
37
|
"lodash": "^4.18.0",
|
|
38
38
|
"xml2js": "^0.5.0",
|
|
39
|
-
"uuid": "^11.1.1"
|
|
39
|
+
"uuid": "^11.1.1",
|
|
40
|
+
"dompurify": "^3.4.17"
|
|
40
41
|
},
|
|
41
42
|
"keywords": [],
|
|
42
43
|
"author": "",
|
|
@@ -118,8 +119,8 @@
|
|
|
118
119
|
"jscpd": "^4.0.5",
|
|
119
120
|
"jsdom": "^29.1.1",
|
|
120
121
|
"knip": "^5.71.0",
|
|
121
|
-
"monaco-editor": "^0.
|
|
122
|
-
"oxfmt": "^0.
|
|
122
|
+
"monaco-editor": "^0.57.0",
|
|
123
|
+
"oxfmt": "^0.76.0",
|
|
123
124
|
"oxlint": "^1.69.0",
|
|
124
125
|
"playwright": "^1.64.1",
|
|
125
126
|
"qrcode.react": "^4.2.0",
|