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 556dd44..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 @@ -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 | @@ -46,6 +44,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`) | | 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`. @@ -135,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 c4de906..b7fa931 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 @@ -232,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 ab64d51..17c559e 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,17 +493,41 @@ 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." ;; 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` 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" + 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" + # 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() { 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 +613,7 @@ main() { install_deps trap - ERR install_ctl + install_cli setup_voice write_config deploy_commands 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);