@kendoo.agentdesk/agentdesk 0.18.4 → 0.18.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 +10 -0
- package/cli/session-sandbox.mjs +30 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ All user-facing changes to AgentDesk. Each entry is tagged:
|
|
|
8
8
|
|
|
9
9
|
Internal refactors, infrastructure changes, and architectural notes are not listed here.
|
|
10
10
|
|
|
11
|
+
## [0.18.6] — 2026-04-18
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- `[CLI]` Scratch HOME now also symlinks `~/.claude.json` (Claude Code's auth/config file), not just the `~/.claude/` directory. Sessions were starting Claude successfully but failing to find its config file at the redirected HOME root.
|
|
15
|
+
|
|
16
|
+
## [0.18.5] — 2026-04-18
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `[CLI]` Sessions crashed at startup because the scratch HOME redirected tool auth lookups to an empty dir — Claude Code couldn't find its login at `~/.claude/`. The scratch now symlinks `~/.claude`, `~/.npm`, `~/.cache`, `~/.local` from the user's real home, so tools find their own state. Sensitive dirs (`~/.ssh`, `~/.aws`, `~/.config/gh`, `~/.gitconfig`, `~/.netrc`, etc.) are still blocked by the sandbox.
|
|
20
|
+
|
|
11
21
|
## [0.18.4] — 2026-04-18
|
|
12
22
|
|
|
13
23
|
### Fixed
|
package/cli/session-sandbox.mjs
CHANGED
|
@@ -9,11 +9,28 @@
|
|
|
9
9
|
// This is Tier 1 (scoped-env). It prevents accidental cross-project use.
|
|
10
10
|
// Tier 2 (sandbox-exec / bwrap) layers a kernel-enforced boundary on top.
|
|
11
11
|
|
|
12
|
-
import { mkdirSync, writeFileSync, chmodSync, rmSync, existsSync } from "fs";
|
|
12
|
+
import { mkdirSync, writeFileSync, chmodSync, rmSync, existsSync, symlinkSync } from "fs";
|
|
13
13
|
import { join } from "path";
|
|
14
|
-
import { tmpdir } from "os";
|
|
14
|
+
import { tmpdir, homedir } from "os";
|
|
15
15
|
import { randomUUID } from "crypto";
|
|
16
16
|
|
|
17
|
+
// Tools whose own state must follow the user into a scratch HOME. Without
|
|
18
|
+
// these symlinks the tool looks for its auth/config at <scratch>/... and
|
|
19
|
+
// fails because we redirected HOME.
|
|
20
|
+
// ~/.claude.json — Claude Code's auth/config file
|
|
21
|
+
// ~/.claude — Claude Code's state dir (backups, caches)
|
|
22
|
+
// ~/.npm — npm cache (agents run npm during sessions)
|
|
23
|
+
// ~/.cache — generic XDG cache
|
|
24
|
+
// ~/.local — generic XDG state
|
|
25
|
+
// Works for both files and directories — symlinkSync handles both.
|
|
26
|
+
const HOME_PASSTHROUGH = [
|
|
27
|
+
".claude.json",
|
|
28
|
+
".claude",
|
|
29
|
+
".npm",
|
|
30
|
+
".cache",
|
|
31
|
+
".local",
|
|
32
|
+
];
|
|
33
|
+
|
|
17
34
|
// Build a session scratch HOME. Returns { home, env, cleanup }.
|
|
18
35
|
// projectId — identifier used to make the dir path readable
|
|
19
36
|
// sessionId — unique per session; guarantees parallel sessions don't collide
|
|
@@ -29,6 +46,17 @@ export function createScratchHome({ projectId, sessionId, creds = {}, commitIden
|
|
|
29
46
|
mkdirSync(join(base, ".config"), { recursive: true, mode: 0o700 });
|
|
30
47
|
mkdirSync(join(base, ".config", "gh"), { recursive: true, mode: 0o700 });
|
|
31
48
|
|
|
49
|
+
// Symlink the user's real state dirs for tools that need their own auth/cache
|
|
50
|
+
// (Claude Code itself, npm, etc). Without this the tools look for their
|
|
51
|
+
// auth at <scratch>/... and fail because we redirected HOME.
|
|
52
|
+
const realHome = homedir();
|
|
53
|
+
for (const dir of HOME_PASSTHROUGH) {
|
|
54
|
+
const src = join(realHome, dir);
|
|
55
|
+
const dst = join(base, dir);
|
|
56
|
+
if (!existsSync(src)) continue;
|
|
57
|
+
try { symlinkSync(src, dst); } catch {}
|
|
58
|
+
}
|
|
59
|
+
|
|
32
60
|
// --- gh: scoped hosts.yml with only this project's GitHub token ---
|
|
33
61
|
if (creds.GITHUB_TOKEN) {
|
|
34
62
|
const hostsPath = join(base, ".config", "gh", "hosts.yml");
|