This repository has been archived on 2026-10-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maestro/Justfile
Miguel PalhasandClaude Opus 5 4fc90aabfb feat(maestro): serve the web UI from the daemon
The browser reached the daemon through maestro-web, a second binary that
served the SPA and reverse-proxied /api/* — two TCP connections and a
WebSocket frame re-encode on every keystroke and every byte of PTY output.
On one machine that hop buys nothing.

The daemon now embeds the bundle and serves it off its own listener, behind
a default-on `web` feature. `--no-default-features` builds without pnpm or
node; MAESTRO_WEB_DIST still takes a prebuilt bundle.

The router's fallback answers an unmatched /api/* with 404 rather than the
SPA shell, so a client expecting JSON gets a status it can read instead of
HTML.

Removes maestro-web and the [web] config section. An existing [web] block
is ignored, not rejected. The installer deletes a leftover
maestro-web.service on upgrade.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-02 18:23:18 +01:00

35 lines
968 B
Makefile

# Common dev / build entry points. Run `just` with no args to list.
# Run the full local stack — daemon on 127.0.0.1:7071 plus Vite on :5173,
# ordered and health-gated by process-compose. Ctrl-C stops everything.
dev:
nix run .#dev
# Build the maestro binary together with the SPA bundle its daemon embeds.
web:
pnpm -C web install --frozen-lockfile
pnpm -C web build
cargo build -p maestro --release
# Run the frontend in dev mode against a local daemon — Vite serves it with
# HMR, and `/api/*` is proxied directly to the daemon at 127.0.0.1:7070
# (see vite.config.ts).
web-dev:
pnpm -C web install
pnpm -C web dev
# Typecheck the frontend without building.
web-typecheck:
pnpm -C web install --frozen-lockfile
pnpm -C web typecheck
# Full workspace build + tests.
test:
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test --all
# Format every Rust source.
fmt:
cargo fmt --all