switchroom 0.7.8 → 0.7.9
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/dist/cli/switchroom.js
CHANGED
|
@@ -20701,8 +20701,8 @@ function emitAgentService(lines, a, imageTag, buildMode, buildContext, homePrefi
|
|
|
20701
20701
|
PIP_BREAK_SYSTEM_PACKAGES: "1",
|
|
20702
20702
|
PIP_USER: "1",
|
|
20703
20703
|
SWITCHROOM_AGENT_NAME: a.name,
|
|
20704
|
-
|
|
20705
|
-
SWITCHROOM_KERNEL_SOCKET: `/run/switchroom/kernel
|
|
20704
|
+
SWITCHROOM_VAULT_BROKER_SOCK: `/run/switchroom/broker/sock`,
|
|
20705
|
+
SWITCHROOM_KERNEL_SOCKET: `/run/switchroom/kernel/sock`,
|
|
20706
20706
|
SWITCHROOM_RUNTIME: "docker"
|
|
20707
20707
|
};
|
|
20708
20708
|
if (switchroomConfigPath) {
|
|
@@ -24035,8 +24035,8 @@ var {
|
|
|
24035
24035
|
} = import__.default;
|
|
24036
24036
|
|
|
24037
24037
|
// src/build-info.ts
|
|
24038
|
-
var VERSION = "0.7.
|
|
24039
|
-
var COMMIT_SHA = "
|
|
24038
|
+
var VERSION = "0.7.9";
|
|
24039
|
+
var COMMIT_SHA = "988cfd24";
|
|
24040
24040
|
|
|
24041
24041
|
// src/cli/deprecated.ts
|
|
24042
24042
|
init_source();
|
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ if [ "$SWITCHROOM_RUNTIME" = "docker" ] && [ -z "$SWITCHROOM_DOCKER_TMUX_INNER"
|
|
|
64
64
|
# Polls Telegram, writes gateway.sock for the in-claude MCP
|
|
65
65
|
# sidecar to bridge through. Mirrors the v0.6 sibling
|
|
66
66
|
# switchroom-<name>-gateway.service unit. Talks to the broker
|
|
67
|
-
# over
|
|
67
|
+
# over SWITCHROOM_VAULT_BROKER_SOCK (set by compose) for the bot
|
|
68
68
|
# token. Failure modes: vault locked → gateway boots, fails to
|
|
69
69
|
# fetch token, exits non-zero, supervisor respawns; bot token
|
|
70
70
|
# invalid → 401 from Telegram, gateway exits, same loop. The
|
|
@@ -26427,7 +26427,7 @@ function defaultUdsConnect(socketPath) {
|
|
|
26427
26427
|
});
|
|
26428
26428
|
}
|
|
26429
26429
|
async function probeBroker(socketPath, opts = {}) {
|
|
26430
|
-
return probeUds("Broker", socketPath ?? process.env.
|
|
26430
|
+
return probeUds("Broker", socketPath ?? process.env.SWITCHROOM_VAULT_BROKER_SOCK, opts);
|
|
26431
26431
|
}
|
|
26432
26432
|
async function probeKernel(socketPath, opts = {}) {
|
|
26433
26433
|
return probeUds("Kernel", socketPath ?? process.env.SWITCHROOM_KERNEL_SOCKET, opts);
|
|
@@ -40750,10 +40750,10 @@ function sweepStaleTurnActiveMarker(stateDir, opts) {
|
|
|
40750
40750
|
}
|
|
40751
40751
|
|
|
40752
40752
|
// ../src/build-info.ts
|
|
40753
|
-
var VERSION = "0.7.
|
|
40754
|
-
var COMMIT_SHA = "
|
|
40755
|
-
var COMMIT_DATE = "2026-05-
|
|
40756
|
-
var LATEST_PR =
|
|
40753
|
+
var VERSION = "0.7.9";
|
|
40754
|
+
var COMMIT_SHA = "988cfd24";
|
|
40755
|
+
var COMMIT_DATE = "2026-05-10T21:21:59+10:00";
|
|
40756
|
+
var LATEST_PR = 948;
|
|
40757
40757
|
var COMMITS_AHEAD_OF_TAG = 0;
|
|
40758
40758
|
|
|
40759
40759
|
// gateway/unhandled-rejection-policy.ts
|
|
@@ -1203,7 +1203,14 @@ export async function probeBroker(
|
|
|
1203
1203
|
socketPath?: string,
|
|
1204
1204
|
opts: { dockerMode?: boolean; connectImpl?: (path: string) => Promise<void> } = {},
|
|
1205
1205
|
): Promise<ProbeResult> {
|
|
1206
|
-
|
|
1206
|
+
// SWITCHROOM_VAULT_BROKER_SOCK is the canonical client-side env name
|
|
1207
|
+
// — matches what src/vault/broker/client.ts:293 and the secret-guard
|
|
1208
|
+
// hook (telegram-plugin/hooks/secret-guard-pretool.mjs:36) read.
|
|
1209
|
+
// The broker SERVER reads SWITCHROOM_BROKER_SOCKET as its bind-path
|
|
1210
|
+
// env (in the broker container only). Pre-fix the probe + compose
|
|
1211
|
+
// both used SWITCHROOM_BROKER_SOCKET in the agent container — wrong
|
|
1212
|
+
// name, fell through to dangling-symlink fallback, false-failed.
|
|
1213
|
+
return probeUds('Broker', socketPath ?? process.env.SWITCHROOM_VAULT_BROKER_SOCK, opts)
|
|
1207
1214
|
}
|
|
1208
1215
|
|
|
1209
1216
|
export async function probeKernel(
|
|
@@ -724,14 +724,20 @@ describe('probeBroker / probeKernel', () => {
|
|
|
724
724
|
})
|
|
725
725
|
|
|
726
726
|
it('probeBroker fails when no socket path is configured', async () => {
|
|
727
|
-
|
|
728
|
-
|
|
727
|
+
// SWITCHROOM_VAULT_BROKER_SOCK is the canonical client-side env
|
|
728
|
+
// var, matches what src/vault/broker/client.ts and the
|
|
729
|
+
// secret-guard hook read. (Pre-fix the probe used the wrong name
|
|
730
|
+
// SWITCHROOM_BROKER_SOCKET — the broker server's bind-path env —
|
|
731
|
+
// which compose was setting in agent containers but no client
|
|
732
|
+
// ever read.)
|
|
733
|
+
const oldEnv = process.env.SWITCHROOM_VAULT_BROKER_SOCK
|
|
734
|
+
delete process.env.SWITCHROOM_VAULT_BROKER_SOCK
|
|
729
735
|
try {
|
|
730
736
|
const result = await probeBroker(undefined, { dockerMode: true })
|
|
731
737
|
expect(result.status).toBe('fail')
|
|
732
738
|
expect(result.detail).toContain('not configured')
|
|
733
739
|
} finally {
|
|
734
|
-
if (oldEnv !== undefined) process.env.
|
|
740
|
+
if (oldEnv !== undefined) process.env.SWITCHROOM_VAULT_BROKER_SOCK = oldEnv
|
|
735
741
|
}
|
|
736
742
|
})
|
|
737
743
|
|