Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -37,15 +37,14 @@ 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 |
| ----------------------------- | ---------------------------------------- |
| `~/.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`.
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion bin/maestro-relay-ctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command>
Expand Down Expand Up @@ -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)."
}

Expand Down
2 changes: 0 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
37 changes: 31 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -589,6 +613,7 @@ main() {
install_deps
trap - ERR
install_ctl
install_cli
setup_voice
write_config
deploy_commands
Expand Down
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@
"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",
"build": "rm -rf dist && tsc",
"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": "",
Expand Down
4 changes: 1 addition & 3 deletions src/cli/maestro-relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <verb> --help' for verb-specific options.

Aliases: 'maestro-bridge' and 'maestro-discord' are preserved for backwards compatibility.`;
Run 'maestro-relay <verb> --help' for verb-specific options.`;

function printRootHelp(): void {
console.log(ROOT_USAGE);
Expand Down