@bjesuiter/codex-switcher 1.8.4 → 1.8.5
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 +2 -2
- package/cdx.mjs +19 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@ Switch the coding-agents [pi](https://pi.dev/), [codex](https://developers.opena
|
|
|
6
6
|
|
|
7
7
|
## Latest Changes
|
|
8
8
|
|
|
9
|
-
### 1.8.
|
|
9
|
+
### 1.8.5
|
|
10
10
|
|
|
11
11
|
#### Fixes
|
|
12
12
|
|
|
13
|
-
- Linux `cdx doctor` guided checks now
|
|
13
|
+
- Linux `cdx doctor` guided checks now avoid false-positive `gnome-keyring-daemon` running detection by preferring `ps` command-line matching (with a `pgrep` fallback), and provide clearer guidance when basic checks pass but the secure-store probe still fails (for example locked keyring/default collection/session bus issues).
|
|
14
14
|
|
|
15
15
|
see full changelog here: https://github.com/bjesuiter/codex-switcher/blob/main/CHANGELOG.md
|
|
16
16
|
|
package/cdx.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import { generatePKCE } from "@openauthjs/openauth/pkce";
|
|
|
15
15
|
import http from "node:http";
|
|
16
16
|
|
|
17
17
|
//#region package.json
|
|
18
|
-
var version = "1.8.
|
|
18
|
+
var version = "1.8.5";
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region lib/platform/path-resolver.ts
|
|
@@ -2823,20 +2823,33 @@ const extractCommandFailureDetails = (result) => result.error || result.stderr |
|
|
|
2823
2823
|
const isCommandAvailable = async (commandName) => {
|
|
2824
2824
|
return (await runCommandCapture("sh", ["-lc", `command -v ${commandName} >/dev/null 2>&1`])).ok;
|
|
2825
2825
|
};
|
|
2826
|
+
const GNOME_KEYRING_CMDLINE_PATTERN = /(^|\/)gnome-keyring-daemon(\s|$)/;
|
|
2826
2827
|
const checkGnomeKeyringRunning = async () => {
|
|
2828
|
+
if (await isCommandAvailable("ps")) {
|
|
2829
|
+
const psResult = await runCommandCapture("ps", [
|
|
2830
|
+
"-A",
|
|
2831
|
+
"-o",
|
|
2832
|
+
"args="
|
|
2833
|
+
]);
|
|
2834
|
+
if (psResult.ok) {
|
|
2835
|
+
if (psResult.stdout.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).some((line) => GNOME_KEYRING_CMDLINE_PATTERN.test(line))) return { ok: true };
|
|
2836
|
+
return {
|
|
2837
|
+
ok: false,
|
|
2838
|
+
details: "No gnome-keyring-daemon process found."
|
|
2839
|
+
};
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2827
2842
|
if (await isCommandAvailable("pgrep")) {
|
|
2828
|
-
const pgrepResult = await runCommandCapture("pgrep", ["-f", "
|
|
2843
|
+
const pgrepResult = await runCommandCapture("pgrep", ["-f", "gnome-keyring-daemon"]);
|
|
2829
2844
|
if (pgrepResult.ok) return { ok: true };
|
|
2830
2845
|
return {
|
|
2831
2846
|
ok: false,
|
|
2832
2847
|
details: extractCommandFailureDetails(pgrepResult) ?? "No gnome-keyring-daemon process found."
|
|
2833
2848
|
};
|
|
2834
2849
|
}
|
|
2835
|
-
const psFallback = await runCommandCapture("sh", ["-lc", "ps -A -o comm= | grep -q '^gnome-keyring-daemon$'"]);
|
|
2836
|
-
if (psFallback.ok) return { ok: true };
|
|
2837
2850
|
return {
|
|
2838
2851
|
ok: false,
|
|
2839
|
-
details:
|
|
2852
|
+
details: "Neither ps nor pgrep is available to check gnome-keyring-daemon."
|
|
2840
2853
|
};
|
|
2841
2854
|
};
|
|
2842
2855
|
const parseSystemctlEnabledState = (output) => {
|
|
@@ -3078,6 +3091,7 @@ const maybeRunLinuxSecretStoreChecklist = async () => {
|
|
|
3078
3091
|
}
|
|
3079
3092
|
}
|
|
3080
3093
|
process.stdout.write(` Guided checklist summary: ${passed}/${checklist.length} checks passed.\n`);
|
|
3094
|
+
if (passed === checklist.length) process.stdout.write(" Note: basic checks passed, but secure-store probe still failed. This can happen when the keyring is locked, has no default collection, or your D-Bus/session setup prevents Secret Service writes.\n");
|
|
3081
3095
|
};
|
|
3082
3096
|
const registerDoctorCommand = (program) => {
|
|
3083
3097
|
program.command("doctor").description("Show auth file paths and runtime capabilities").option("--check-keychain-acl", "Run keychain trusted-app/ACL checks on macOS (can be slow)").action(async (options) => {
|