@kendoo.agentdesk/agentdesk 0.18.4 → 0.18.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/CHANGELOG.md CHANGED
@@ -8,6 +8,11 @@ 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.5] — 2026-04-18
12
+
13
+ ### Fixed
14
+ - `[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.
15
+
11
16
  ## [0.18.4] — 2026-04-18
12
17
 
13
18
  ### Fixed
@@ -9,11 +9,25 @@
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 — Claude Code's auth token and settings
21
+ // ~/.npm — npm cache (agents run npm during sessions)
22
+ // ~/.cache — generic XDG cache
23
+ // ~/.local/state — generic XDG state
24
+ const HOME_PASSTHROUGH = [
25
+ ".claude",
26
+ ".npm",
27
+ ".cache",
28
+ ".local",
29
+ ];
30
+
17
31
  // Build a session scratch HOME. Returns { home, env, cleanup }.
18
32
  // projectId — identifier used to make the dir path readable
19
33
  // sessionId — unique per session; guarantees parallel sessions don't collide
@@ -29,6 +43,17 @@ export function createScratchHome({ projectId, sessionId, creds = {}, commitIden
29
43
  mkdirSync(join(base, ".config"), { recursive: true, mode: 0o700 });
30
44
  mkdirSync(join(base, ".config", "gh"), { recursive: true, mode: 0o700 });
31
45
 
46
+ // Symlink the user's real state dirs for tools that need their own auth/cache
47
+ // (Claude Code itself, npm, etc). Without this the tools look for their
48
+ // auth at <scratch>/... and fail because we redirected HOME.
49
+ const realHome = homedir();
50
+ for (const dir of HOME_PASSTHROUGH) {
51
+ const src = join(realHome, dir);
52
+ const dst = join(base, dir);
53
+ if (!existsSync(src)) continue;
54
+ try { symlinkSync(src, dst); } catch {}
55
+ }
56
+
32
57
  // --- gh: scoped hosts.yml with only this project's GitHub token ---
33
58
  if (creds.GITHUB_TOKEN) {
34
59
  const hostsPath = join(base, ".config", "gh", "hosts.yml");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.18.4",
3
+ "version": "0.18.5",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {