From 42a7612b0756401d9ee05fa7b4385ba3cb32223b Mon Sep 17 00:00:00 2001 From: chr1syy Date: Sat, 23 May 2026 10:05:39 +0200 Subject: [PATCH 1/3] fix(installer): install maestro-relay CLI shim on PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The curl-pipe installer was only symlinking the *-ctl service wrappers, leaving the user-facing CLI (`maestro-relay send …`) unreachable on a fresh install — even though README and CLAUDE.md document it as the agent → chat entrypoint. `npm install -g` would publish the package.json `bin` entries, but tarball-based installs skip that path. Wire the shim ourselves in install.sh: chmod +x the dist/cli entrypoint (which already declares `#!/usr/bin/env node`) and symlink `maestro-relay`, `maestro-bridge`, and `maestro-discord` into BIN_DIR. Fixes #42. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 1 + install.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/README.md b/README.md index 556dd44..753370c 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ The legacy aliases `maestro-bridge-ctl` and `maestro-discord-ctl` still work for | `~/.local/share/maestro-relay/` | Installed bot (built JS + dependencies) | | `~/.config/maestro-relay/.env` | Configuration (preserved across updates) | | `~/.local/bin/maestro-relay-ctl` | Service control wrapper | +| `~/.local/bin/maestro-relay` | Agent → chat CLI (`send`, `notify`, `status`; aliased as `maestro-bridge` and `maestro-discord`) | | systemd user / launchd agent | Auto-start unit | Override any of these with `MAESTRO_RELAY_HOME`, `XDG_CONFIG_HOME`, or `MAESTRO_RELAY_BIN_DIR`. Pin a specific version with `MAESTRO_RELAY_VERSION=v1.0.0`. diff --git a/install.sh b/install.sh index ab64d51..390e5fb 100755 --- a/install.sh +++ b/install.sh @@ -504,6 +504,23 @@ install_ctl() { esac } +install_cli() { + # The user-facing CLI (`maestro-relay send …`) is the entrypoint agents call + # to push messages back into chat. `npm install -g` would publish the + # package.json `bin` entries, but tarball installs don't run that — so wire + # the shim ourselves. dist/cli/maestro-relay.js already declares + # `#!/usr/bin/env node`, so a symlink + exec bit is enough. + mkdir -p "$BIN_DIR" + local cli_js="$INSTALL_DIR/dist/cli/maestro-relay.js" + [ -f "$cli_js" ] || die "CLI entrypoint missing at $cli_js" + chmod +x "$cli_js" + ln -sf "$cli_js" "$BIN_DIR/maestro-relay" + ln -sf "$cli_js" "$BIN_DIR/maestro-bridge" + # Backwards-compat alias matching the legacy maestro-discord binary. + ln -sf "$cli_js" "$BIN_DIR/maestro-discord" + ok "Installed maestro-relay → $BIN_DIR/maestro-relay (aliases: maestro-bridge, maestro-discord)" +} + install_service_linux() { command -v systemctl >/dev/null 2>&1 || { warn "systemctl not found — skipping service install."; return; } local unit_dir="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user" @@ -589,6 +606,7 @@ main() { install_deps trap - ERR install_ctl + install_cli setup_voice write_config deploy_commands From 056f59c55e5f7d333a4e28dd7c0cb53e7b4f0103 Mon Sep 17 00:00:00 2001 From: chr1syy Date: Fri, 29 May 2026 10:00:57 +0200 Subject: [PATCH 2/3] fix(installer): drop legacy *-ctl aliases per PR review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chris flagged on PR #43 that maestro-relay-ctl is the single supported control entrypoint; the maestro-bridge-ctl and maestro-discord-ctl aliases should not be provisioned or documented. - install.sh: stop creating the *-ctl alias symlinks; scrub any leftover ones on upgrade, mirroring the existing systemd/launchd legacy-unit cleanup pattern - bin/maestro-relay-ctl.sh: drop the "(Aliases: …)" line from usage() (uninstall still removes leftover *-ctl symlinks) - README.md: drop the "legacy aliases still work" sentence The maestro-bridge / maestro-discord non-ctl shims on the agent-facing CLI side are left alone for now; that direction is still open per the review comment. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 2 -- bin/maestro-relay-ctl.sh | 1 - install.sh | 15 +++++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 753370c..d8c98ad 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,6 @@ maestro-relay-ctl update # upgrade to latest release (preserves config) maestro-relay-ctl uninstall # remove install + service files ``` -The legacy aliases `maestro-bridge-ctl` and `maestro-discord-ctl` still work for back-compat. - ## Quick start | Path | Purpose | diff --git a/bin/maestro-relay-ctl.sh b/bin/maestro-relay-ctl.sh index c4de906..d65e120 100755 --- a/bin/maestro-relay-ctl.sh +++ b/bin/maestro-relay-ctl.sh @@ -57,7 +57,6 @@ detect_os() { usage() { cat <<'EOF' maestro-relay-ctl — control the Maestro Relay service. -(Aliases: maestro-bridge-ctl and maestro-discord-ctl, preserved for back-compat.) Usage: maestro-relay-ctl diff --git a/install.sh b/install.sh index 390e5fb..972a1f6 100755 --- a/install.sh +++ b/install.sh @@ -6,7 +6,7 @@ # Optional: MAESTRO_RELAY_MODULE=discord (currently the only supported module). # # Legacy MAESTRO_BRIDGE_* / MAESTRO_DISCORD_* env vars are accepted as fallback so v0.0.x -# installs upgrading via `maestro-discord-ctl update` keep working. +# installs upgrading via the legacy control wrapper keep working. set -Eeuo pipefail @@ -493,11 +493,14 @@ install_ctl() { [ -f "$ctl" ] || die "Control script missing at $ctl" chmod +x "$ctl" ln -sf "$ctl" "$BIN_DIR/maestro-relay-ctl" - ln -sf "$ctl" "$BIN_DIR/maestro-bridge-ctl" - # Backwards-compat alias for users with `maestro-discord-ctl` in muscle memory - # or in scripts. Both point at the same wrapper. - ln -sf "$ctl" "$BIN_DIR/maestro-discord-ctl" - ok "Installed maestro-relay-ctl → $BIN_DIR/maestro-relay-ctl (aliases: maestro-bridge-ctl, maestro-discord-ctl)" + # Clean up legacy *-ctl aliases left over from earlier installs. + for legacy in maestro-bridge-ctl maestro-discord-ctl; do + if [ -L "$BIN_DIR/$legacy" ] || [ -e "$BIN_DIR/$legacy" ]; then + rm -f "$BIN_DIR/$legacy" + info "Removed legacy control alias $BIN_DIR/$legacy" + fi + done + ok "Installed maestro-relay-ctl → $BIN_DIR/maestro-relay-ctl" case ":$PATH:" in *":$BIN_DIR:"*) : ;; *) warn "$BIN_DIR is not on your PATH. Add it to your shell profile." ;; From 57cbdc8dc6e71116a48b7f632b0d54c9fc91b64a Mon Sep 17 00:00:00 2001 From: chr1syy Date: Fri, 29 May 2026 10:40:09 +0200 Subject: [PATCH 3/3] fix(installer,docs): retire maestro-bridge and maestro-discord aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per Chris's follow-up on PR #43: only maestro-relay remains; the non-ctl shims are dropped to complete the rename started by the previous *-ctl cleanup. - install.sh: install_cli() symlinks only maestro-relay and scrubs leftover maestro-bridge / maestro-discord symlinks on upgrade - package.json: drop maestro-bridge / maestro-discord from bin and scripts (package-lock.json regenerated) - src/cli/maestro-relay.ts: remove the "Aliases: …" line from ROOT_USAGE - bin/maestro-relay-ctl.sh::cmd_uninstall: also rm -f the legacy maestro-bridge / maestro-discord shims (plus the new maestro-relay shim) so uninstall leaves no stale binaries - README.md, AGENTS.md (CLAUDE.md symlink), docs/api.md: drop "alias preserved for back-compat" mentions; migration note now points callers at maestro-relay Co-Authored-By: Claude Opus 4.7 (1M context) --- AGENTS.md | 2 -- README.md | 6 +++--- bin/maestro-relay-ctl.sh | 4 ++++ docs/api.md | 2 -- install.sh | 14 +++++++++----- package-lock.json | 2 -- package.json | 8 ++------ src/cli/maestro-relay.ts | 4 +--- 8 files changed, 19 insertions(+), 23 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b47df9e..b30bcee 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,8 +40,6 @@ Lives under `src/providers/slack/` (`adapter.ts`, `messageCreate.ts`, `commands/ - `src/cli/lib.ts` — shared HTTP client for `/api/send` - `src/cli/verbs/` — individual verb implementations -The `maestro-discord` binary is registered as an alias of `maestro-relay` for back-compat. - ### Entry point - `src/index.ts` — kernel orchestrator: builds providers, starts each with kernel ctx, starts the HTTP API, wires graceful shutdown diff --git a/README.md b/README.md index d8c98ad..421453c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Maestro Relay** connects chat platforms to [Maestro](https://runmaestro.ai) AI agents through `maestro-cli`. Discord and Slack ship in the box; Teams, Matrix, and others can be added by dropping in a provider adapter — the kernel is provider-agnostic. -> **Migrating from `discord-maestro`?** Same codebase, new name. The legacy `maestro-discord` binary is preserved as an alias and all `DISCORD_*` env vars work unchanged. See "Migration" below. +> **Migrating from `discord-maestro`?** Same codebase, new name. All `DISCORD_*` env vars work unchanged; the legacy `maestro-discord` binary has been retired in favour of `maestro-relay`. See "Migration" below. ## Features @@ -44,7 +44,7 @@ maestro-relay-ctl uninstall # remove install + service files | `~/.local/share/maestro-relay/` | Installed bot (built JS + dependencies) | | `~/.config/maestro-relay/.env` | Configuration (preserved across updates) | | `~/.local/bin/maestro-relay-ctl` | Service control wrapper | -| `~/.local/bin/maestro-relay` | Agent → chat CLI (`send`, `notify`, `status`; aliased as `maestro-bridge` and `maestro-discord`) | +| `~/.local/bin/maestro-relay` | Agent → chat CLI (`send`, `notify`, `status`) | | systemd user / launchd agent | Auto-start unit | Override any of these with `MAESTRO_RELAY_HOME`, `XDG_CONFIG_HOME`, or `MAESTRO_RELAY_BIN_DIR`. Pin a specific version with `MAESTRO_RELAY_VERSION=v1.0.0`. @@ -134,7 +134,7 @@ Agents can push messages to chat via the `maestro-relay` CLI / HTTP API. See [do This project was renamed from `discord-maestro` / `Maestro-Discord`. To smooth upgrades: -- The `maestro-discord` binary is preserved as an alias of `maestro-relay`. Existing scripts that call `maestro-discord send …` keep working unchanged. +- The legacy `maestro-discord` / `maestro-bridge` binaries have been retired; install + upgrade now scrub any leftover symlinks. Update any scripts that invoke them to `maestro-relay send …`. - All `DISCORD_*` env vars are unchanged. New optional `ENABLED_PROVIDERS` defaults to `discord`. - The SQLite database upgrades automatically on first start: `agent_channels` gains a `provider` column (existing rows default to `discord`); `agent_threads` is renamed to `discord_agent_threads` with rows preserved. No manual migration needed. - The HTTP `/api/send` endpoint accepts an optional `provider` field that defaults to `discord`; existing callers are unaffected. diff --git a/bin/maestro-relay-ctl.sh b/bin/maestro-relay-ctl.sh index d65e120..b7fa931 100755 --- a/bin/maestro-relay-ctl.sh +++ b/bin/maestro-relay-ctl.sh @@ -231,8 +231,12 @@ cmd_uninstall() { esac rm -rf "$INSTALL_DIR" rm -f "$BIN_DIR/maestro-relay-ctl" + rm -f "$BIN_DIR/maestro-relay" + # Scrub legacy aliases from earlier installs (pre-rename). rm -f "$BIN_DIR/maestro-bridge-ctl" rm -f "$BIN_DIR/maestro-discord-ctl" + rm -f "$BIN_DIR/maestro-bridge" + rm -f "$BIN_DIR/maestro-discord" info "Uninstalled. Config preserved at $CONFIG_DIR (delete manually if desired)." } diff --git a/docs/api.md b/docs/api.md index 2ee49d1..c6c6049 100644 --- a/docs/api.md +++ b/docs/api.md @@ -2,8 +2,6 @@ Maestro agents can push messages into chat using the `maestro-relay` CLI (or any HTTP client). The bridge exposes a local HTTP API on `127.0.0.1:API_PORT` (default 3457). -The legacy binary name `maestro-discord` is preserved as an alias of `maestro-relay` and is fully equivalent. - ## Setup The API server starts automatically with the bridge. Port is configurable via `API_PORT` in `.env`. diff --git a/install.sh b/install.sh index 972a1f6..17c559e 100755 --- a/install.sh +++ b/install.sh @@ -510,7 +510,7 @@ install_ctl() { install_cli() { # The user-facing CLI (`maestro-relay send …`) is the entrypoint agents call # to push messages back into chat. `npm install -g` would publish the - # package.json `bin` entries, but tarball installs don't run that — so wire + # package.json `bin` entry, but tarball installs don't run that — so wire # the shim ourselves. dist/cli/maestro-relay.js already declares # `#!/usr/bin/env node`, so a symlink + exec bit is enough. mkdir -p "$BIN_DIR" @@ -518,10 +518,14 @@ install_cli() { [ -f "$cli_js" ] || die "CLI entrypoint missing at $cli_js" chmod +x "$cli_js" ln -sf "$cli_js" "$BIN_DIR/maestro-relay" - ln -sf "$cli_js" "$BIN_DIR/maestro-bridge" - # Backwards-compat alias matching the legacy maestro-discord binary. - ln -sf "$cli_js" "$BIN_DIR/maestro-discord" - ok "Installed maestro-relay → $BIN_DIR/maestro-relay (aliases: maestro-bridge, maestro-discord)" + # Clean up legacy CLI aliases left over from earlier installs. + for legacy in maestro-bridge maestro-discord; do + if [ -L "$BIN_DIR/$legacy" ] || [ -e "$BIN_DIR/$legacy" ]; then + rm -f "$BIN_DIR/$legacy" + info "Removed legacy CLI alias $BIN_DIR/$legacy" + fi + done + ok "Installed maestro-relay → $BIN_DIR/maestro-relay" } install_service_linux() { diff --git a/package-lock.json b/package-lock.json index 5692dbe..e978450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,8 +15,6 @@ "dotenv": "^16.0.0" }, "bin": { - "maestro-bridge": "dist/cli/maestro-relay.js", - "maestro-discord": "dist/cli/maestro-relay.js", "maestro-relay": "dist/cli/maestro-relay.js" }, "devDependencies": { diff --git a/package.json b/package.json index 2c42a7e..fa0ceb0 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "description": "Maestro Relay — connect chat platforms (Discord today, Slack/Teams next) to Maestro AI agents via maestro-cli.", "main": "dist/index.js", "bin": { - "maestro-relay": "dist/cli/maestro-relay.js", - "maestro-bridge": "dist/cli/maestro-relay.js", - "maestro-discord": "dist/cli/maestro-relay.js" + "maestro-relay": "dist/cli/maestro-relay.js" }, "scripts": { "dev": "tsx src/index.ts", @@ -14,9 +12,7 @@ "start": "node dist/index.js", "deploy-commands": "tsx src/providers/discord/deploy.ts", "test": "npm run build && node --test dist/__tests__/**/*.test.js", - "maestro-relay": "tsx src/cli/maestro-relay.ts", - "maestro-bridge": "tsx src/cli/maestro-relay.ts", - "maestro-discord": "tsx src/cli/maestro-relay.ts" + "maestro-relay": "tsx src/cli/maestro-relay.ts" }, "keywords": [], "author": "", diff --git a/src/cli/maestro-relay.ts b/src/cli/maestro-relay.ts index 926a711..083e296 100644 --- a/src/cli/maestro-relay.ts +++ b/src/cli/maestro-relay.ts @@ -10,9 +10,7 @@ Verbs: notify Post a styled toast/flash notification to an agent's channel status Post the agent's current status (cwd, usage, tokens) to its channel -Run 'maestro-relay --help' for verb-specific options. - -Aliases: 'maestro-bridge' and 'maestro-discord' are preserved for backwards compatibility.`; +Run 'maestro-relay --help' for verb-specific options.`; function printRootHelp(): void { console.log(ROOT_USAGE);