switchroom 0.21.1 → 0.21.3

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.
@@ -21565,7 +21565,7 @@ function allocateAgentUid(name) {
21565
21565
  }
21566
21566
 
21567
21567
  // src/build-info.ts
21568
- var VERSION = "0.21.1";
21568
+ var VERSION = "0.21.3";
21569
21569
 
21570
21570
  // src/setup/hindsight-recall-passthrough.ts
21571
21571
  var HINDSIGHT_RECALL_TAG_WEIGHT_SEED = Object.freeze({ sidechain: 0.8 });
@@ -28703,6 +28703,13 @@ function compareHostCliToTarget(stamp, target) {
28703
28703
  return cmp < 0 ? "behind" : "current-or-ahead";
28704
28704
  }
28705
28705
 
28706
+ // src/cli/host-cli-heal.ts
28707
+ var HOST_CLI_HEAL_TIMEOUT_MS = (() => {
28708
+ const raw = process.env.SWITCHROOM_HOST_CLI_HEAL_TIMEOUT_MS;
28709
+ const n = raw ? Number(raw) : NaN;
28710
+ return Number.isFinite(n) && n > 0 ? n : 10 * 60 * 1000;
28711
+ })();
28712
+
28706
28713
  // src/cli/rollout.ts
28707
28714
  init_atomic();
28708
28715
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "switchroom",
3
3
  "//version": "NOT the release version — source of truth is the git tag, resolved by scripts/build.mjs:resolveVersion() (see CLAUDE.md > Standard release process). This field is stale by design and only the Layer-4 dev/non-tag fallback for build.mjs + src/cli/resolve-version.ts; do NOT bump it expecting a release to pick it up. npm-pack tarball naming needs a real version — do that as an UNCOMMITTED pack-time bump (see release step 6), never a committed one.",
4
- "version": "0.21.1",
4
+ "version": "0.21.3",
5
5
  "description": "Run Claude Code 24/7 on your Claude Pro/Max subscription over Telegram. Open-source alternative to OpenClaw and NanoClaw — no API keys.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -39117,15 +39117,24 @@ function summarizeExternalSpend(days, now = new Date) {
39117
39117
  const top = Object.entries(byModel).filter(([, usd]) => usd > 0).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).slice(0, EXTERNAL_SPEND_TOP_N).map(([name, usd]) => ({ label: shortModelLabel(name), usd }));
39118
39118
  return { day24hUsd, day7dUsd, top };
39119
39119
  }
39120
- function normalizeSpendLogRows(body) {
39121
- if (Array.isArray(body))
39122
- return body;
39123
- if (body && typeof body === "object") {
39124
- const data = body.data;
39125
- if (Array.isArray(data))
39126
- return data;
39120
+ function normalizeDailyActivityRows(body) {
39121
+ const results = body && typeof body === "object" && Array.isArray(body.results) ? body.results : [];
39122
+ const rows = [];
39123
+ for (const day of results) {
39124
+ if (!day || typeof day !== "object")
39125
+ continue;
39126
+ const models = {};
39127
+ const breakdown = day.breakdown?.models ?? {};
39128
+ for (const [name, entry] of Object.entries(breakdown)) {
39129
+ const raw = entry?.metrics?.spend;
39130
+ const n = typeof raw === "number" ? raw : Number(raw);
39131
+ if (!Number.isFinite(n))
39132
+ continue;
39133
+ models[name] = (models[name] ?? 0) + n;
39134
+ }
39135
+ rows.push({ startTime: day.date, models });
39127
39136
  }
39128
- return [];
39137
+ return rows;
39129
39138
  }
39130
39139
  var EXTERNAL_SPEND_TOP_N = 3, EXTERNAL_SPEND_CACHE_TTL_MS = 90000, BARE_EXTERNAL_NEEDLES;
39131
39140
  var init_external_spend = __esm(() => {
@@ -39341,7 +39350,7 @@ __export(exports_external_spend, {
39341
39350
  utcDateString: () => utcDateString,
39342
39351
  summarizeExternalSpend: () => summarizeExternalSpend,
39343
39352
  shortModelLabel: () => shortModelLabel,
39344
- normalizeSpendLogRows: () => normalizeSpendLogRows,
39353
+ normalizeDailyActivityRows: () => normalizeDailyActivityRows,
39345
39354
  isExternalModel: () => isExternalModel,
39346
39355
  formatUsd: () => formatUsd,
39347
39356
  formatExternalSpendBlock: () => formatExternalSpendBlock2,
@@ -104169,10 +104178,10 @@ function startOutboxSweep(deps) {
104169
104178
  }
104170
104179
 
104171
104180
  // ../src/build-info.ts
104172
- var VERSION2 = "0.21.1";
104173
- var COMMIT_SHA = "6aef7b24";
104174
- var COMMIT_DATE = "2026-08-10T02:48:34Z";
104175
- var LATEST_PR = 4583;
104181
+ var VERSION2 = "0.21.3";
104182
+ var COMMIT_SHA = "8a74c2f6";
104183
+ var COMMIT_DATE = "2026-08-10T08:58:41Z";
104184
+ var LATEST_PR = 4593;
104176
104185
  var COMMITS_AHEAD_OF_TAG = 0;
104177
104186
 
104178
104187
  // gateway/boot-version.ts
@@ -28,7 +28,7 @@ export {
28
28
  shortModelLabel,
29
29
  formatUsd,
30
30
  summarizeExternalSpend,
31
- normalizeSpendLogRows,
31
+ normalizeDailyActivityRows,
32
32
  utcDateString,
33
33
  addUtcDays,
34
34
  EXTERNAL_SPEND_CACHE_TTL_MS,