feat(ai-tools): install/update AI CLIs, remote catalog sync, cached favicons (#40 A2)

This commit is contained in:
2026-09-29 08:25:37 +07:00
parent fcfebe44f1
commit 7ec5a7cd85
40 changed files with 3145 additions and 92 deletions
+6 -1
View File
@@ -7,7 +7,7 @@
const { describe, it, beforeEach, afterEach } = require("node:test");
const assert = require("node:assert/strict");
const { hydrateShellPath } = require("../lib/shell-path");
const { hydrateShellPath, shellPath } = require("../lib/shell-path");
const M = "__AGENTHUB_PATH__";
const stub =
@@ -38,6 +38,11 @@ describe("hydrateShellPath", () => {
assert.equal(process.env.PATH, "/usr/bin:/bin:/home/u/.local/bin:/opt/x");
});
it("remembers the shell's own PATH in the shell's order", async () => {
await hydrateShellPath({ spawn: stub(`${M}/home/u/.nvm/bin:/usr/bin${M}`) });
assert.equal(shellPath(), "/home/u/.nvm/bin:/usr/bin");
});
it("keeps PATH on error or missing delimiters", async () => {
assert.equal(await hydrateShellPath({ spawn: stub("", new Error("timeout")) }), false);
assert.equal(await hydrateShellPath({ spawn: stub("no markers") }), false);