switchroom 0.15.14 → 0.15.16

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.
@@ -50467,8 +50467,8 @@ var {
50467
50467
  } = import__.default;
50468
50468
 
50469
50469
  // src/build-info.ts
50470
- var VERSION = "0.15.14";
50471
- var COMMIT_SHA = "91ae15d3";
50470
+ var VERSION = "0.15.16";
50471
+ var COMMIT_SHA = "a96f10cc";
50472
50472
 
50473
50473
  // src/cli/agent.ts
50474
50474
  init_source();
@@ -51265,7 +51265,19 @@ function createMinimalClaudeConfig(agentDir, configDirName = ".claude") {
51265
51265
  }
51266
51266
  }
51267
51267
  function seedCronConfigDir(agentDir, serverKeys) {
51268
- createMinimalClaudeConfig(agentDir, ".claude-cron");
51268
+ const mainConfig = join7(agentDir, ".claude", ".claude.json");
51269
+ const cronDir = join7(agentDir, ".claude-cron");
51270
+ const cronConfig = join7(cronDir, ".claude.json");
51271
+ mkdirSync7(cronDir, { recursive: true });
51272
+ if (existsSync11(mainConfig)) {
51273
+ try {
51274
+ copyFileSync3(mainConfig, cronConfig);
51275
+ } catch {
51276
+ createMinimalClaudeConfig(agentDir, ".claude-cron");
51277
+ }
51278
+ } else {
51279
+ createMinimalClaudeConfig(agentDir, ".claude-cron");
51280
+ }
51269
51281
  preTrustWorkspace(agentDir, ".claude-cron");
51270
51282
  ensureMcpServersTrusted(agentDir, serverKeys, ".claude-cron");
51271
51283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switchroom",
3
- "version": "0.15.14",
3
+ "version": "0.15.16",
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": {
@@ -86,8 +86,16 @@ CRON_APPEND_PROMPT="You are the cheap background cron worker for {{name}}. You r
86
86
  # (no --continue) — low context by construction. cd into the workspace so
87
87
  # claude's project key matches the pre-seeded trust state (.claude-cron).
88
88
  cd "{{agentDir}}" || exit 1
89
- exec tmux -L "$CRON_SOCKET" \
90
- new-session -A -s "$CRON_NAME" -x 400 -y 50 \
89
+ # Create the cron tmux session DETACHED (-d), not in attach mode. This is a
90
+ # SUPERVISED BACKGROUND sidecar (start.sh forks it with `&`) with no controlling
91
+ # TTY — the MAIN session owns the container's foreground TTY. The attach flag
92
+ # needs a TTY, so it dies "open terminal failed: not a terminal" and the cron
93
+ # bridge never registers (every Tier-1 fire then falls back to main). `-d` runs
94
+ # claude in a detached pane that registers fine; a human can still
95
+ # `tmux -L "$CRON_SOCKET" attach -t "$CRON_NAME"` later. The `-x/-y` give the
96
+ # pane a size since there's no TTY to derive one from.
97
+ tmux -L "$CRON_SOCKET" \
98
+ new-session -d -s "$CRON_NAME" -x 400 -y 50 \
91
99
  claude \
92
100
  --dangerously-load-development-channels server:switchroom-telegram \
93
101
  --plugin-dir "{{securityPluginDir}}" \
@@ -96,3 +104,27 @@ exec tmux -L "$CRON_SOCKET" \
96
104
  --model {{{cronModelQ}}} \
97
105
  --append-system-prompt "$CRON_APPEND_PROMPT"{{#if dangerousMode}} \
98
106
  --dangerously-skip-permissions{{/if}}
107
+
108
+ # Dismiss the cron session's per-boot first-run prompt. Even with the seeded
109
+ # .claude-cron/.claude.json (copied from the fully-onboarded main config),
110
+ # `--dangerously-load-development-channels` re-prompts EVERY launch ("I am using
111
+ # this for local development") — that ack is not persisted to config. The MAIN
112
+ # autoaccept-poll watches only `switchroom-<name>`; this one watches
113
+ # `switchroom-${CRON_NAME}` (the cron socket) and dispatches the same prompt
114
+ # rule. Boot-phase only (WEDGE_WATCHDOG off → dismiss then exit); re-forked on
115
+ # every cron-session.sh (re)spawn so a later respawn's prompt is caught too.
116
+ # Without this the cron `claude` wedges and the <name>-cron bridge never
117
+ # registers (every Tier-1 fire then falls back to main).
118
+ if [ -f /opt/switchroom/autoaccept-poll.js ] && command -v bun >/dev/null 2>&1; then
119
+ SWITCHROOM_WEDGE_WATCHDOG=0 bun /opt/switchroom/autoaccept-poll.js "$CRON_NAME" \
120
+ >> /var/log/switchroom/cron-session.log 2>&1 &
121
+ fi
122
+
123
+ # `new-session -d` returns immediately (tmux daemonizes the session), so block
124
+ # here while the session lives — this keeps cron-session.sh as the supervisor's
125
+ # long-running child. When the cron claude exits (crash / kill), the session
126
+ # ends, the loop exits, and the supervisor respawns us cleanly (with backoff).
127
+ while tmux -L "$CRON_SOCKET" has-session -t "$CRON_NAME" 2>/dev/null; do
128
+ sleep 5
129
+ done
130
+ echo "cron-session: ${CRON_NAME} tmux session ended — exiting for supervisor respawn" >&2
@@ -54166,10 +54166,10 @@ function readTurnActiveMarkerAgeMs(stateDir, now) {
54166
54166
  }
54167
54167
 
54168
54168
  // ../src/build-info.ts
54169
- var VERSION = "0.15.14";
54170
- var COMMIT_SHA = "91ae15d3";
54171
- var COMMIT_DATE = "2026-06-13T11:51:08Z";
54172
- var LATEST_PR = 2326;
54169
+ var VERSION = "0.15.16";
54170
+ var COMMIT_SHA = "a96f10cc";
54171
+ var COMMIT_DATE = "2026-06-13T20:50:23Z";
54172
+ var LATEST_PR = 2330;
54173
54173
  var COMMITS_AHEAD_OF_TAG = 0;
54174
54174
 
54175
54175
  // gateway/boot-version.ts