switchroom 0.16.16 → 0.16.20

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.
@@ -51692,8 +51692,8 @@ import { existsSync, readFileSync } from "node:fs";
51692
51692
  import { dirname, join } from "node:path";
51693
51693
 
51694
51694
  // src/build-info.ts
51695
- var VERSION = "0.16.17";
51696
- var COMMIT_SHA = "de202ab1";
51695
+ var VERSION = "0.16.20";
51696
+ var COMMIT_SHA = "6ea6e873";
51697
51697
 
51698
51698
  // src/cli/resolve-version.ts
51699
51699
  function readPackageVersion() {
@@ -77519,11 +77519,23 @@ function agentLiveness(config, agentName) {
77519
77519
  return "offline";
77520
77520
  }
77521
77521
  function toHermesSession(agent, liveness) {
77522
+ const nowSec = Math.floor(Date.now() / 1000);
77522
77523
  return {
77523
77524
  id: agent.name,
77524
77525
  name: agent.name,
77526
+ title: agent.name,
77525
77527
  status: liveness,
77526
77528
  model: "claude",
77529
+ is_active: liveness === "active",
77530
+ started_at: nowSec,
77531
+ last_active: nowSec,
77532
+ ended_at: null,
77533
+ input_tokens: 0,
77534
+ output_tokens: 0,
77535
+ message_count: 0,
77536
+ tool_call_count: 0,
77537
+ preview: null,
77538
+ source: "switchroom",
77527
77539
  created_at: null,
77528
77540
  updated_at: null,
77529
77541
  quota: agent.primaryAccount ? { used_pct: null, slot: agent.primaryAccount } : null
@@ -77632,17 +77644,24 @@ async function handleHermesRest(method, pathname, config) {
77632
77644
  return { status: 200, body: { history: result.turns ?? [] } };
77633
77645
  }
77634
77646
  if (method === "GET" && pathname === "/api/status") {
77635
- const agents = await handleGetAgents(config);
77636
- const fleet = agents.map((a) => ({
77637
- name: a.name,
77638
- status: agentLiveness(config, a.name)
77639
- }));
77640
77647
  return {
77641
77648
  status: 200,
77642
77649
  body: {
77643
- status: "ok",
77644
- provider: "switchroom",
77645
- agents: fleet
77650
+ version: "switchroom",
77651
+ gateway_running: true,
77652
+ gateway_platforms: {},
77653
+ gateway_state: "ready",
77654
+ config_version: 0,
77655
+ latest_config_version: 0,
77656
+ hermes_home: "switchroom",
77657
+ release_date: null,
77658
+ active_sessions: 0,
77659
+ config_path: null,
77660
+ env_path: null,
77661
+ gateway_exit_reason: null,
77662
+ gateway_health_url: null,
77663
+ gateway_pid: null,
77664
+ gateway_updated_at: null
77646
77665
  }
77647
77666
  };
77648
77667
  }
@@ -77673,12 +77692,33 @@ async function handleHermesRest(method, pathname, config) {
77673
77692
  if (method === "GET" && pathname.startsWith("/api/logs")) {
77674
77693
  return { status: 200, body: { file: "gateway.log", lines: [] } };
77675
77694
  }
77676
- if (method === "GET" && (pathname.startsWith("/api/cron") || pathname.startsWith("/api/messaging") || pathname.startsWith("/api/profiles") || pathname === "/api/memory/providers")) {
77695
+ if (method === "GET" && pathname.startsWith("/api/cron")) {
77696
+ if (pathname === "/api/cron/jobs")
77697
+ return { status: 200, body: [] };
77698
+ if (pathname.includes("/runs"))
77699
+ return { status: 200, body: { runs: [] } };
77700
+ if (pathname.includes("sessions")) {
77701
+ return { status: 200, body: { sessions: [], total: 0, limit: 0, offset: 0 } };
77702
+ }
77703
+ return { status: 200, body: {} };
77704
+ }
77705
+ if (method === "GET" && pathname.startsWith("/api/messaging")) {
77706
+ if (pathname === "/api/messaging/platforms")
77707
+ return { status: 200, body: { platforms: [] } };
77708
+ return { status: 200, body: {} };
77709
+ }
77710
+ if (method === "GET" && pathname.startsWith("/api/profiles")) {
77677
77711
  if (pathname.includes("sessions")) {
77678
77712
  return { status: 200, body: { sessions: [], total: 0, limit: 0, offset: 0 } };
77679
77713
  }
77680
77714
  return { status: 200, body: {} };
77681
77715
  }
77716
+ if (method === "GET" && pathname === "/api/memory/providers") {
77717
+ return { status: 200, body: {} };
77718
+ }
77719
+ if (method === "GET" && pathname === "/api/fs/default-cwd") {
77720
+ return { status: 200, body: { cwd: null, branch: null } };
77721
+ }
77682
77722
  return null;
77683
77723
  }
77684
77724
  function sendEvent(ctx, type, sessionId, payload) {
@@ -77837,9 +77877,13 @@ async function onHermesMessage(ctx, raw) {
77837
77877
  sendResponse(ctx, rpcErr(id, -32603, result.error ?? "inject failed"));
77838
77878
  break;
77839
77879
  }
77880
+ sendEvent(ctx, "message.delta", sessionId, {
77881
+ text: `*(Prompt sent to ${sessionId} \u2014 response will appear in Telegram)*`,
77882
+ prompt_key: promptKey
77883
+ });
77840
77884
  sendEvent(ctx, "message.complete", sessionId, {
77841
- prompt_key: promptKey,
77842
- note: "reply delivered to Telegram thread"
77885
+ text: `*(Prompt sent to ${sessionId} \u2014 response will appear in Telegram)*`,
77886
+ prompt_key: promptKey
77843
77887
  });
77844
77888
  sendResponse(ctx, rpcOk(id, { ok: true, prompt_key: promptKey }));
77845
77889
  break;
@@ -77865,6 +77909,14 @@ async function onHermesMessage(ctx, raw) {
77865
77909
  sendResponse(ctx, rpcOk(id, { ok: true }));
77866
77910
  break;
77867
77911
  }
77912
+ case "setup.status": {
77913
+ sendResponse(ctx, rpcOk(id, { provider_configured: true }));
77914
+ break;
77915
+ }
77916
+ case "setup.runtime_check": {
77917
+ sendResponse(ctx, rpcOk(id, { ok: true }));
77918
+ break;
77919
+ }
77868
77920
  case "approval.request":
77869
77921
  case "approval.respond":
77870
77922
  case "sudo.request":
@@ -22587,7 +22587,7 @@ import { existsSync as existsSync6, readFileSync as readFileSync4 } from "node:f
22587
22587
  import { dirname as dirname4, join as join2 } from "node:path";
22588
22588
 
22589
22589
  // src/build-info.ts
22590
- var VERSION = "0.16.17";
22590
+ var VERSION = "0.16.20";
22591
22591
 
22592
22592
  // src/cli/resolve-version.ts
22593
22593
  function readPackageVersion() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "switchroom",
3
- "version": "0.16.16",
3
+ "version": "0.16.20",
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": {
@@ -56246,10 +56246,10 @@ function readTurnActiveMarkerAgeMs(stateDir, now) {
56246
56246
  }
56247
56247
 
56248
56248
  // ../src/build-info.ts
56249
- var VERSION = "0.16.17";
56250
- var COMMIT_SHA = "de202ab1";
56251
- var COMMIT_DATE = "2026-06-29T02:55:27Z";
56252
- var LATEST_PR = 2652;
56249
+ var VERSION = "0.16.20";
56250
+ var COMMIT_SHA = "6ea6e873";
56251
+ var COMMIT_DATE = "2026-06-29T05:16:25Z";
56252
+ var LATEST_PR = 2657;
56253
56253
  var COMMITS_AHEAD_OF_TAG = 0;
56254
56254
 
56255
56255
  // gateway/boot-version.ts