fix(cli): 1.30.2 — daemon service unit attaches to every joined mesh
claudemesh install was baking --mesh <primary> into the launchd plist / systemd unit, locking the daemon to a single mesh and contradicting 1.26.0's multi-mesh design. users with >1 joined mesh fell off the daemon path on every non-primary verb (cold-WS fallback, peer list returning all meshes because the server-side filter ran against zero attached state, "daemon spawn failed: socket did not appear" from launched sessions in sibling meshes). now: meshSlug is optional in InstallArgs; claudemesh install omits it so the unit runs `claudemesh daemon up` with no flag, which attaches to every joined mesh. `claudemesh daemon install-service --mesh <slug>` is preserved as opt-in for single-mesh hosts and CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,13 @@ function isCi(): boolean {
|
||||
export interface InstallArgs {
|
||||
/** Path to the `claudemesh` binary, e.g. /opt/homebrew/bin/claudemesh */
|
||||
binaryPath: string;
|
||||
/** Mesh slug to attach to. */
|
||||
meshSlug: string;
|
||||
/**
|
||||
* Optional mesh slug to lock the daemon to. Omit (the new default) so
|
||||
* the daemon attaches to every joined mesh — matches the 1.26.0
|
||||
* multi-mesh design. Single-mesh lock is preserved for users who
|
||||
* explicitly want it (testing, CI, host with one mesh).
|
||||
*/
|
||||
meshSlug?: string;
|
||||
/** Optional display name. */
|
||||
displayName?: string;
|
||||
/** Override the auto-detected CI refusal. */
|
||||
@@ -97,8 +102,9 @@ function installDarwin(args: InstallArgs): InstallResult {
|
||||
`<string>${escapeXml(args.binaryPath)}</string>`,
|
||||
"<string>daemon</string>",
|
||||
"<string>up</string>",
|
||||
"<string>--mesh</string>",
|
||||
`<string>${escapeXml(args.meshSlug)}</string>`,
|
||||
...(args.meshSlug
|
||||
? ["<string>--mesh</string>", `<string>${escapeXml(args.meshSlug)}</string>`]
|
||||
: []),
|
||||
...(args.displayName ? ["<string>--name</string>", `<string>${escapeXml(args.displayName)}</string>`] : []),
|
||||
].join("\n ");
|
||||
|
||||
@@ -176,7 +182,7 @@ function installLinux(args: InstallArgs): InstallResult {
|
||||
const nodeBin = process.execPath;
|
||||
const execArgs = [
|
||||
"daemon", "up",
|
||||
"--mesh", args.meshSlug,
|
||||
...(args.meshSlug ? ["--mesh", args.meshSlug] : []),
|
||||
...(args.displayName ? ["--name", args.displayName] : []),
|
||||
].map(shellQuote).join(" ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user