@staff0rd/assist 0.1072.0 → 0.1073.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.1072.0",
9
+ version: "0.1073.0",
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: "",
@@ -82,7 +83,7 @@ var package_default = {
82
83
  "react-diff-view": "^3.3.3",
83
84
  refractor: "^3.6.0",
84
85
  semver: "^7.7.3",
85
- "shell-quote": "^1.8.3",
86
+ "shell-quote": "^1.12.0",
86
87
  "ts-morph": "^27.0.2",
87
88
  typescript: "^5.9.3",
88
89
  ws: "^8.20.0",
@@ -116,7 +117,6 @@ var package_default = {
116
117
  "@types/react": "^19.2.14",
117
118
  "@types/react-dom": "^19.2.3",
118
119
  "@types/semver": "^7.7.1",
119
- "@types/shell-quote": "^1.7.5",
120
120
  "@types/ws": "^8.18.1",
121
121
  "@vitest/coverage-v8": "^4.1.2",
122
122
  "devicons-react": "^1.5.0",
@@ -125,8 +125,8 @@ var package_default = {
125
125
  jscpd: "^4.0.5",
126
126
  jsdom: "^29.1.1",
127
127
  knip: "^5.71.0",
128
- "monaco-editor": "^0.56.0",
129
- oxfmt: "^0.54.0",
128
+ "monaco-editor": "^0.57.0",
129
+ oxfmt: "^0.76.0",
130
130
  oxlint: "^1.69.0",
131
131
  playwright: "^1.64.1",
132
132
  "qrcode.react": "^4.2.0",
@@ -22513,12 +22513,12 @@ function popFdPrefix(current2) {
22513
22513
 
22514
22514
  // src/shared/consumeHeredoc.ts
22515
22515
  function consumeHeredoc(tokens, opIndex, current2) {
22516
- const delimiter = tokens[opIndex + 2];
22516
+ const delimiter = tokens[opIndex + 1];
22517
22517
  if (typeof delimiter !== "string") {
22518
22518
  return { ok: false, error: "unable to parse" };
22519
22519
  }
22520
22520
  popFdPrefix(current2);
22521
- return { ok: true, nextIndex: opIndex + 2 };
22521
+ return { ok: true, nextIndex: opIndex + 1 };
22522
22522
  }
22523
22523
 
22524
22524
  // src/shared/consumeInputRedirect.ts
@@ -22531,20 +22531,12 @@ function consumeInputRedirect(tokens, opIndex, current2) {
22531
22531
  return { ok: true, nextIndex: opIndex + 1 };
22532
22532
  }
22533
22533
 
22534
- // src/shared/groupByOperator.ts
22534
+ // src/shared/handleToken.ts
22535
22535
  var SEPARATOR_OPS = /* @__PURE__ */ new Set(["|", "&&", "||", ";"]);
22536
22536
  var OUTPUT_REDIRECT_OPS = /* @__PURE__ */ new Set([">", ">>"]);
22537
+ var HEREDOC_OPS = /* @__PURE__ */ new Set(["<<", "<<-"]);
22537
22538
  var INPUT_REDIRECT_OP = "<";
22538
22539
  var UNPARSEABLE = { ok: false, error: "unable to parse" };
22539
- function groupByOperator(tokens) {
22540
- const groups = [[]];
22541
- for (let i = 0; i < tokens.length; i++) {
22542
- const step3 = handleToken(tokens, i, groups);
22543
- if (!step3.ok) return step3;
22544
- i = step3.nextIndex;
22545
- }
22546
- return { ok: true, groups };
22547
- }
22548
22540
  function handleToken(tokens, i, groups) {
22549
22541
  const token = tokens[i];
22550
22542
  const op = getOp(token);
@@ -22560,19 +22552,32 @@ function handleToken(tokens, i, groups) {
22560
22552
  if (OUTPUT_REDIRECT_OPS.has(op)) {
22561
22553
  return consumeRedirect(tokens, i, groups[groups.length - 1]);
22562
22554
  }
22555
+ if (HEREDOC_OPS.has(op)) {
22556
+ return consumeHeredoc(tokens, i, groups[groups.length - 1]);
22557
+ }
22563
22558
  if (op === INPUT_REDIRECT_OP) {
22564
- const current2 = groups[groups.length - 1];
22565
- return getOp(tokens[i + 1]) === INPUT_REDIRECT_OP ? consumeHeredoc(tokens, i, current2) : consumeInputRedirect(tokens, i, current2);
22559
+ return consumeInputRedirect(tokens, i, groups[groups.length - 1]);
22566
22560
  }
22567
22561
  return UNPARSEABLE;
22568
22562
  }
22563
+ function getOp(token) {
22564
+ return typeof token === "object" && token !== null && "op" in token ? token.op : void 0;
22565
+ }
22569
22566
  function appendWord(token, groups, i) {
22570
22567
  if (typeof token !== "string") return UNPARSEABLE;
22571
22568
  groups[groups.length - 1].push(token);
22572
22569
  return { ok: true, nextIndex: i };
22573
22570
  }
22574
- function getOp(token) {
22575
- return typeof token === "object" && token !== null && "op" in token ? token.op : void 0;
22571
+
22572
+ // src/shared/groupByOperator.ts
22573
+ function groupByOperator(tokens) {
22574
+ const groups = [[]];
22575
+ for (let i = 0; i < tokens.length; i++) {
22576
+ const step3 = handleToken(tokens, i, groups);
22577
+ if (!step3.ok) return step3;
22578
+ i = step3.nextIndex;
22579
+ }
22580
+ return { ok: true, groups };
22576
22581
  }
22577
22582
 
22578
22583
  // src/shared/hasUnquotedBackticks.ts
@@ -34840,20 +34845,18 @@ function threadPath(thread) {
34840
34845
  }
34841
34846
  function mapAzureDevopsThreads(threads, prUrl) {
34842
34847
  return threads.filter((thread) => !thread.isDeleted).flatMap(
34843
- (thread) => (thread.comments ?? []).filter((c) => !c.isDeleted && c.commentType !== "system" && c.content).map(
34844
- (c) => ({
34845
- type: "line",
34846
- id: thread.id,
34847
- threadId: String(thread.id),
34848
- user: c.author?.displayName ?? c.author?.uniqueName ?? "unknown",
34849
- path: threadPath(thread),
34850
- line: threadLine(thread),
34851
- body: c.content ?? "",
34852
- diff_hunk: "",
34853
- html_url: `${prUrl}?discussionId=${thread.id}`,
34854
- resolved: isResolved(thread.status)
34855
- })
34856
- )
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
+ }))
34857
34860
  );
34858
34861
  }
34859
34862
 
@@ -40938,13 +40941,11 @@ function nodesOf(at2, prefix2) {
40938
40941
  const dirs = [...at2.dirs].map(
40939
40942
  ([name, child]) => collapsedDirNode(name, child, prefix2)
40940
40943
  );
40941
- const files = at2.files.map(
40942
- (file) => ({
40943
- kind: "file",
40944
- name: basename24(file.path),
40945
- ...file
40946
- })
40947
- );
40944
+ const files = at2.files.map((file) => ({
40945
+ kind: "file",
40946
+ name: basename24(file.path),
40947
+ ...file
40948
+ }));
40948
40949
  return [...dirs.sort(byName), ...files.sort(byName)];
40949
40950
  }
40950
40951
  function collapsedDirNode(name, at2, prefix2) {
@@ -44154,12 +44155,10 @@ function submitPendingLeftByFailedThreads(body, result) {
44154
44155
  function withRejectedFindings(unanchored, rejected) {
44155
44156
  return [
44156
44157
  ...unanchored,
44157
- ...rejected.map(
44158
- (finding) => ({
44159
- ...finding,
44160
- reason: "comment-rejected"
44161
- })
44162
- )
44158
+ ...rejected.map((finding) => ({
44159
+ ...finding,
44160
+ reason: "comment-rejected"
44161
+ }))
44163
44162
  ];
44164
44163
  }
44165
44164
 
@@ -44308,12 +44307,10 @@ function selectInDiffFindings(lineBound, prDiff) {
44308
44307
  warnOutOfDiff(outOfDiff);
44309
44308
  return {
44310
44309
  inDiff,
44311
- unanchored: outOfDiff.map(
44312
- (finding) => ({
44313
- ...finding,
44314
- reason: "out-of-diff"
44315
- })
44316
- )
44310
+ unanchored: outOfDiff.map((finding) => ({
44311
+ ...finding,
44312
+ reason: "out-of-diff"
44313
+ }))
44317
44314
  };
44318
44315
  }
44319
44316
 
@@ -44348,12 +44345,10 @@ function selectPostableFindings(markdown, prInfo) {
44348
44345
  `Skipped ${alreadyRaised.length} finding(s) already raised by prior comments.`
44349
44346
  );
44350
44347
  }
44351
- const carriedUnlocated = unlocated.map(
44352
- (finding) => ({
44353
- ...finding,
44354
- reason: "unlocated"
44355
- })
44356
- );
44348
+ const carriedUnlocated = unlocated.map((finding) => ({
44349
+ ...finding,
44350
+ reason: "unlocated"
44351
+ }));
44357
44352
  if (lineBound.length === 0) {
44358
44353
  console.log("No line-bound findings to comment on.");
44359
44354
  return { inDiff: [], unanchored: carriedUnlocated };
@@ -48112,6 +48107,8 @@ var MissingRunCwdError = class extends Error {
48112
48107
  this.cwd = cwd;
48113
48108
  this.name = "MissingRunCwdError";
48114
48109
  }
48110
+ runName;
48111
+ cwd;
48115
48112
  };
48116
48113
  function resolveRunCwd(config, baseDir = runConfigBaseDir()) {
48117
48114
  if (!config.cwd) return void 0;
@@ -49891,6 +49888,7 @@ var ActiveSelection = class {
49891
49888
  constructor(onChange) {
49892
49889
  this.onChange = onChange;
49893
49890
  }
49891
+ onChange;
49894
49892
  byRepo = /* @__PURE__ */ new Map();
49895
49893
  set(cwd, sessionId2) {
49896
49894
  if (!cwd) return;
@@ -50563,6 +50561,10 @@ var SessionIo = class {
50563
50561
  this.notify = notify2;
50564
50562
  this.links = links2;
50565
50563
  }
50564
+ sessions;
50565
+ onStatusChange;
50566
+ notify;
50567
+ links;
50566
50568
  viewers = new ViewerConnections();
50567
50569
  trackViewer(client, d) {
50568
50570
  if (typeof d.viewerId !== "string") return;
@@ -50665,6 +50667,7 @@ var ClientHub = class extends Set {
50665
50667
  super();
50666
50668
  this.persistPeak = persistPeak;
50667
50669
  }
50670
+ persistPeak;
50668
50671
  latestLimits;
50669
50672
  harnessLimits = /* @__PURE__ */ new Map();
50670
50673
  // why: log delivery is opt-in so browser tabs aren't spammed; only connections that ask via subscribe-logs receive daemonLog lines.
@@ -50800,6 +50803,7 @@ var MissingCwdError = class extends Error {
50800
50803
  this.cwd = cwd;
50801
50804
  this.name = "MissingCwdError";
50802
50805
  }
50806
+ cwd;
50803
50807
  };
50804
50808
  function spawnPty(args, cwd, sessionId2, extraEnv) {
50805
50809
  refuseMissingCwd(cwd, sessionId2);
@@ -52519,6 +52523,8 @@ var PrPreviewCoordinator = class {
52519
52523
  this.sessions = sessions;
52520
52524
  this.notify = notify2;
52521
52525
  }
52526
+ sessions;
52527
+ notify;
52522
52528
  waiters = /* @__PURE__ */ new Map();
52523
52529
  set(client, d) {
52524
52530
  setPrPreview(this.sessions, this.waiters, this.notify, client, d);
@@ -55605,6 +55611,8 @@ var VerifyTracker = class {
55605
55611
  this.sessions = sessions;
55606
55612
  this.notify = notify2;
55607
55613
  }
55614
+ sessions;
55615
+ notify;
55608
55616
  sessionByClient = /* @__PURE__ */ new Map();
55609
55617
  start(client, sessionId2) {
55610
55618
  const session = this.sessions.get(sessionId2);
@@ -55767,6 +55775,7 @@ var LaunchCircuitBreaker = class {
55767
55775
  constructor(label) {
55768
55776
  this.label = label;
55769
55777
  }
55778
+ label;
55770
55779
  failures = 0;
55771
55780
  until = 0;
55772
55781
  lastCause = "";
@@ -56297,6 +56306,7 @@ var NodeLink = class {
56297
56306
  ctx.connect = () => void openLink(ctx);
56298
56307
  this.ctx = ctx;
56299
56308
  }
56309
+ spec;
56300
56310
  ctx;
56301
56311
  start = () => this.ctx.connect();
56302
56312
  unlatch() {
@@ -56368,6 +56378,8 @@ var NodeLinks = class {
56368
56378
  this.clients = clients;
56369
56379
  this.onSessionsChanged = onSessionsChanged;
56370
56380
  }
56381
+ clients;
56382
+ onSessionsChanged;
56371
56383
  links = /* @__PURE__ */ new Map();
56372
56384
  options = {};
56373
56385
  pins = new PinRelay();
@@ -56703,6 +56715,7 @@ var SessionManager = class {
56703
56715
  constructor(onIdleChange) {
56704
56716
  this.onIdleChange = onIdleChange;
56705
56717
  }
56718
+ onIdleChange;
56706
56719
  sessions = /* @__PURE__ */ new Map();
56707
56720
  prPreview = new PrPreviewCoordinator(
56708
56721
  this.sessions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1072.0",
3
+ "version": "0.1073.0",
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": "",
@@ -76,7 +77,7 @@
76
77
  "react-diff-view": "^3.3.3",
77
78
  "refractor": "^3.6.0",
78
79
  "semver": "^7.7.3",
79
- "shell-quote": "^1.8.3",
80
+ "shell-quote": "^1.12.0",
80
81
  "ts-morph": "^27.0.2",
81
82
  "typescript": "^5.9.3",
82
83
  "ws": "^8.20.0",
@@ -110,7 +111,6 @@
110
111
  "@types/react": "^19.2.14",
111
112
  "@types/react-dom": "^19.2.3",
112
113
  "@types/semver": "^7.7.1",
113
- "@types/shell-quote": "^1.7.5",
114
114
  "@types/ws": "^8.18.1",
115
115
  "@vitest/coverage-v8": "^4.1.2",
116
116
  "devicons-react": "^1.5.0",
@@ -119,8 +119,8 @@
119
119
  "jscpd": "^4.0.5",
120
120
  "jsdom": "^29.1.1",
121
121
  "knip": "^5.71.0",
122
- "monaco-editor": "^0.56.0",
123
- "oxfmt": "^0.54.0",
122
+ "monaco-editor": "^0.57.0",
123
+ "oxfmt": "^0.76.0",
124
124
  "oxlint": "^1.69.0",
125
125
  "playwright": "^1.64.1",
126
126
  "qrcode.react": "^4.2.0",