pi-agent-browser-native 0.6.5 → 0.6.6

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.6.6 - 2026-09-05
6
+
7
+ ### Fixed
8
+
9
+ - Resolve POSIX process identity with `ps` from `PATH` when the system paths are unavailable, so managed-session locks work on NixOS-style installations. Keep system-path preference and reject malformed identity output. Thanks to @GodTamIt for the report and fix in #142 / #143.
10
+
5
11
  ## 0.6.5 - 2026-09-04
6
12
 
7
13
  ### Fixed
@@ -62,7 +62,7 @@ export async function acquireOwnedManagedSessionDaemonPolicy(options) {
62
62
  return signal?.aborted
63
63
  ? {}
64
64
  : {
65
- error: "Managed-session policy coordination is unavailable or busy. Retry after the current operation finishes, repair the private policy-lock directory, and on POSIX verify that /bin/ps or /usr/bin/ps is available.",
65
+ error: "Managed-session policy coordination is unavailable or busy. Retry after the current operation finishes, repair the private policy-lock directory, and on POSIX verify that /bin/ps, /usr/bin/ps, or ps through PATH is available.",
66
66
  };
67
67
  }
68
68
  try {
@@ -31,10 +31,18 @@ export function buildProcessStartIdentityCommands(pid, platform = process.platfo
31
31
  return [];
32
32
  return platform === "win32"
33
33
  ? [primary]
34
- : [primary, ...(platform === "android" ? [{ ...primary, file: "/bin/ps" }, { ...primary, file: "/usr/bin/ps" }] : [{ ...primary, file: "/usr/bin/ps" }])];
34
+ : [
35
+ primary,
36
+ ...(platform === "android"
37
+ ? [{ ...primary, file: "/bin/ps" }, { ...primary, file: "/usr/bin/ps" }]
38
+ : [{ ...primary, file: "/usr/bin/ps" }, { ...primary, file: "ps" }]),
39
+ ];
35
40
  }
36
41
  export function normalizeProcessStartIdentity(stdout) {
37
- return stdout.trim().replace(/\s+/g, " ") || undefined;
42
+ const trimmed = stdout.trim();
43
+ if (!trimmed || trimmed.includes("\0") || /[\r\n]/.test(trimmed))
44
+ return undefined;
45
+ return trimmed.replace(/\s+/g, " ");
38
46
  }
39
47
  let currentProcessStartIdentityPromise;
40
48
  async function executeProcessStartIdentityCommand(command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-browser-native",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "pi extension that exposes agent-browser as a native tool for browser automation",
5
5
  "type": "module",
6
6
  "author": "Mitch Fultz (https://github.com/fitchmultz)",