feat(cli): 1.30.0 — per-session broker presence

flips CLAUDEMESH_SESSION_PRESENCE default to ON. With the broker side
already shipped (the session_hello handler from earlier in this sprint
A wave), every claudemesh launch now gets its own long-lived broker
presence row owned by the daemon and identified by a per-launch
ephemeral keypair vouched by the member's stable key. Two sessions in
the same cwd finally see each other in peer list — the symptom users
have been hitting since 1.28.0 dropped the bridge tier.

Bumps roadmap: 1.30.0 = presence (was queued for 1.30/wizard); the
launch-wizard refactor moves to 1.31.0, setup wizard to 1.32.0, the
mesh→workspace rename to 1.33.0. Verification smoke documented in the
1.30.0 changelog entry.

Rollback: CLAUDEMESH_SESSION_PRESENCE=0 (also accepts "false"/"off").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-05-04 13:10:51 +01:00
parent ff2aa8bf7c
commit f7d7d391c9
4 changed files with 105 additions and 10 deletions

View File

@@ -29,14 +29,14 @@ export interface RunDaemonOptions {
}
/**
* 1.30.0 feature flag. Default OFF for one release cycle so the broker
* side has time to deploy + bake before the daemon starts opening
* per-session WebSockets. Set CLAUDEMESH_SESSION_PRESENCE=0 to disable
* once the flag flips default-on.
* 1.30.0 feature flag. Default ON — the daemon opens a long-lived WS per
* registered session so siblings see each other in `peer list`. Set
* CLAUDEMESH_SESSION_PRESENCE=0 (or "false"/"off") to disable for
* rollback if the broker side is misbehaving on a given mesh.
*/
function isSessionPresenceEnabled(): boolean {
const v = process.env.CLAUDEMESH_SESSION_PRESENCE;
if (v === undefined || v === "") return false;
if (v === undefined || v === "") return true;
return v !== "0" && v.toLowerCase() !== "false" && v.toLowerCase() !== "off";
}