switchroom 0.14.7 → 0.14.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switchroom",
3
- "version": "0.14.7",
3
+ "version": "0.14.8",
4
4
  "description": "Run Claude Code 24/7 on your Claude Pro/Max subscription over Telegram. Open-source alternative to OpenClaw and NanoClaw — no API keys.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -183,6 +183,29 @@ export PATH="$HOME/.bun/bin:$PATH"
183
183
  # all land in these paths; survival across container restart is via the
184
184
  # /state/agent bind mount (HOME=/state/agent/home).
185
185
  export PATH="$HOME/.local/bin:$HOME/bin:$HOME/.npm-global/bin:$PATH"
186
+ # claude is delivered ONLY by the agent image (/usr/local, root-owned,
187
+ # version-pinned, rebuilt deliberately via `switchroom update`). The
188
+ # persistent-HOME dirs above precede /usr/local/bin on PATH so agents
189
+ # can install their own npm/pip tools — but that same precedence means
190
+ # a stray `claude` in the writable, state-persisted npm prefix would
191
+ # silently SHADOW the image's, surviving every restart and drifting the
192
+ # fleet off the tested binary (this bit test-harness with a months-old
193
+ # self-installed 2.1.139). DISABLE_AUTOUPDATER=1 stops claude's own
194
+ # self-update, but can't undo a pre-existing or manual drop. So prune
195
+ # any user-local claude at boot — narrowly, by name, leaving every
196
+ # other user-installed package intact — guaranteeing `claude` always
197
+ # resolves to the image binary. Idempotent; no-op when clean.
198
+ for _stray_claude in \
199
+ "$HOME/.npm-global/bin/claude" \
200
+ "$HOME/.local/bin/claude" \
201
+ "$HOME/bin/claude"; do
202
+ if [ -e "$_stray_claude" ] || [ -L "$_stray_claude" ]; then
203
+ echo "start.sh: pruning user-local claude shadow at $_stray_claude (image binary is authoritative)" >&2
204
+ rm -f "$_stray_claude"
205
+ fi
206
+ done
207
+ rm -rf "$HOME/.npm-global/lib/node_modules/@anthropic-ai/claude-code" 2>/dev/null || true
208
+ unset _stray_claude
186
209
  export CLAUDE_CONFIG_DIR="{{agentDir}}/.claude"
187
210
  # CLAUDE_CODE_OAUTH_TOKEN injection was removed with RFC H (auth-broker).
188
211
  # Claude reads .credentials.json directly; the broker is the sole writer