@staff0rd/assist 0.1073.0 → 0.1074.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.1073.0",
9
+ version: "0.1074.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -51898,6 +51898,24 @@ function closeGateApplies(sessions, session) {
51898
51898
  // src/commands/sessions/daemon/worktree/liveProcessesInTree.ts
51899
51899
  import { readdirSync as readdirSync28, readlinkSync } from "fs";
51900
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
51901
51919
  function liveProcessesInTree(treePath, procRoot = "/proc") {
51902
51920
  let entries;
51903
51921
  try {
@@ -51910,7 +51928,7 @@ function liveProcessesInTree(treePath, procRoot = "/proc") {
51910
51928
  const pid = Number(entry);
51911
51929
  if (!Number.isInteger(pid) || pid === process.pid) continue;
51912
51930
  const cwd = processCwd(`${procRoot}/${entry}/cwd`);
51913
- if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep4)))
51931
+ if (cwd && (cwd === treePath || cwd.startsWith(treePath + sep4)) && !isCodexAppServer(pid, procRoot))
51914
51932
  pids.push(pid);
51915
51933
  }
51916
51934
  return pids;
@@ -51970,7 +51988,6 @@ function pidList(pids) {
51970
51988
  }
51971
51989
 
51972
51990
  // src/commands/sessions/daemon/worktree/readOccupant.ts
51973
- import { readFileSync as readFileSync76 } from "fs";
51974
51991
  var VSCODE_PATHS = [
51975
51992
  "/.vscode-server/",
51976
51993
  "/.vscode-server-insiders/",
@@ -52003,13 +52020,6 @@ function parentPid(stat5) {
52003
52020
  const ppid = Number(fields[1]);
52004
52021
  return Number.isInteger(ppid) ? ppid : void 0;
52005
52022
  }
52006
- function readProc(procRoot, pid, file) {
52007
- try {
52008
- return readFileSync76(`${procRoot}/${pid}/${file}`, "utf8");
52009
- } catch {
52010
- return void 0;
52011
- }
52012
- }
52013
52023
 
52014
52024
  // src/commands/sessions/daemon/worktree/liveOccupantReason.ts
52015
52025
  function liveOccupantReason(treePath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1073.0",
3
+ "version": "0.1074.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {