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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions .github/RELEASE_MIRROR_CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ handler split and leaves one repo with a different command model.
The following surfaces are intentionally internal-only and must not be added to
the manifest:

- `src/cli-tui/tui-renderer.ts`
- `src/cli-tui/commands/grouped-command-handlers.ts`
- `src/cli-tui/tui-renderer/grouped-handlers-wiring.ts`
- `src/cli-tui/commands/grouped/**`

## Maestro Event Catalog Boundary

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ target/
node_modules/
.nx/

# Prebuilt native TUI binaries staged for npm pack (materialized in release.yml)
vendor/

# External checkouts
.external/

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ expect before opening a PR.
npx nx run maestro:evals --skip-nx-cache # Optional eval scenarios
bun run bun:test:fast # Fast local Vitest (no Nx build; VITEST_FAST=1)
# If you touched specific packages, build them too:
bun run --filter @evalops/tui build
bun run tui-rs:build
bun run --filter @evalops/maestro-web build
```
(CI runs these, but failing locally wastes review cycles.)
Expand Down
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ COPY packages/governance-mcp-server/package.json packages/governance-mcp-server/
COPY packages/memory/package.json packages/memory/
COPY packages/slack-agent/package.json packages/slack-agent/
COPY packages/slack-agent-ui/package.json packages/slack-agent-ui/
COPY packages/tui/package.json packages/tui/
COPY packages/web/package.json packages/web/

# ambient-agent-rs, control-plane-rs, and tui-rs are pure Rust (no package.json)
Expand Down Expand Up @@ -59,7 +58,6 @@ COPY packages/governance-mcp-server ./packages/governance-mcp-server
COPY packages/memory ./packages/memory
COPY packages/slack-agent ./packages/slack-agent
COPY packages/slack-agent-ui ./packages/slack-agent-ui
COPY packages/tui ./packages/tui
COPY packages/tui-rs ./packages/tui-rs
COPY packages/web ./packages/web

Expand Down Expand Up @@ -103,8 +101,6 @@ COPY --from=web-builder /app/package.json ./
COPY --from=web-builder /app/skills ./skills
COPY --from=web-builder /app/packages/contracts/package.json ./packages/contracts/package.json
COPY --from=web-builder /app/packages/contracts/dist ./packages/contracts/dist
COPY --from=web-builder /app/packages/tui/package.json ./packages/tui/package.json
COPY --from=web-builder /app/packages/tui/dist ./packages/tui/dist
COPY --from=web-builder /app/packages/web/dist ./packages/web/dist
COPY --from=rust-builder /app/target-bin/maestro-control-plane ./bin/maestro-control-plane

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ Package-manager installs are kept for contributors and source-based workflows.
Release binaries are the primary install artifact and are smoke-tested directly
with `maestro --version` and a headless protocol handshake before attachment.

If a global install fails while resolving `@evalops/tui` or
`@evalops/contracts`, you are installing a deprecated 0.10.8-0.10.20 package
If a global install fails while resolving `@evalops/contracts`, you are installing a deprecated 0.10.8-0.10.20 package
that referenced private workspace dependencies. Upgrade to
`@evalops/maestro@latest`; published release verification now runs npm and Bun
registry install smokes against the public package metadata before promotion.
Expand Down Expand Up @@ -199,7 +198,6 @@ Need Redis or PostgreSQL for a specific workflow? Start from `docker-compose.yml
- `src/` - CLI entrypoints and shared application code
- `packages/core/` - agent loop, transport, types, and sandbox primitives
- `packages/ai/` - model registry, provider transport, and event streaming
- `packages/tui/` - TypeScript terminal UI
- `packages/tui-rs/` - native Rust TUI
- `packages/web/` - browser UI
- `packages/vscode-extension/`, `packages/jetbrains-plugin/`, `packages/slack-agent/`, `packages/github-agent/` - interface integrations
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/AGENT_INTERNALS.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ Enterprise audit trail for:
| `src/oauth/index.ts` | OAuth integration |
| `src/providers/network-config.ts` | Network retry configuration |
| `src/session/manager.ts` | Session management |
| `src/cli-tui/tui-renderer.ts` | Terminal UI |
| `packages/tui-rs/` (`maestro-tui`) | Native terminal UI (interactive; TS TUI removed) |
131 changes: 59 additions & 72 deletions docs/ARCHITECTURE.md

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions docs/ARCHITECTURE_DIAGRAM.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
# Maestro CLI - Visual Architecture

Audience: contributors needing a system map; pair with `VSCODE_ARCHITECTURE.md` for extension specifics.
Nav: [Docs index](README.md) · [Contributor Runbook](CONTRIBUTOR_RUNBOOK.md) · [Safety](SAFETY.md)
Nav: [Docs index](README.md) · [TUI Architecture](TUI_ARCHITECTURE.md) · [Contributor Runbook](CONTRIBUTOR_RUNBOOK.md) · [Safety](SAFETY.md)

Interactive terminal UI is **native** `maestro-tui` (`packages/tui-rs`). Headless/web
paths still use the TypeScript Agent core. See [TUI Architecture](TUI_ARCHITECTURE.md).

## System Overview

```
┌─────────────────────────────────────────────────────────────────────┐
│ USER INTERFACE │
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Terminal UI (TUI) │ │
│ │ Terminal UI (native maestro-tui / tui-rs) │ │
│ │ ┌─────────────┐ ┌──────────────┐ ┌──────────────────┐ │ │
│ │ │ Component │ │ Markdown │ │ Command Palette │ │ │
│ │ │ System │ │ Renderer │ │ & Selectors │ │ │
│ │ │ Components │ │ Markdown │ │ Command Palette │ │ │
│ │ │ (ratatui) │ │ Renderer │ │ & Selectors │ │ │
│ │ └──────┬──────┘ └──────┬───────┘ └────────┬─────────┘ │ │
│ │ │ │ │ │ │
│ │ └────────────────┴─────────────────────┘ │ │
│ │ │ │ │
│ │ ┌──────▼──────┐ │ │
│ │ │ TUI Renderer│ │ │
│ │ │ App loop │ (+ NativeAgent in-process) │ │
│ │ └──────┬──────┘ │ │
│ └───────────────────────────┼────────────────────────────────────┘ │
└────────────────────────────────┼──────────────────────────────────────┘
(headless/web/IDE still use TS core)
┌────────────────────────────────▼──────────────────────────────────────┐
AGENT CORE
│ AGENT CORE (TypeScript surfaces)
│ ┌───────────────────────────────────────────────────────────────┐ │
│ │ Agent Class │ │
│ │ • Event-driven architecture (pub/sub) │ │
Expand Down Expand Up @@ -297,7 +300,7 @@ Factory CLI Integration │
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌──────────────┐ ┌──────────────┐
│ TUI Renderer│ │ Telemetry │ │ Session │
Native TUI │ │ Telemetry │ │ Session │
│ │ │ Logger │ │ Manager │
│ Updates UI │ │ │ │ │
│ components │ │ Records: │ │ Persists: │
Expand Down
7 changes: 5 additions & 2 deletions docs/BUILD_TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Build testing ensures that:
3. Source maps are valid
4. Essential modules and tools are built correctly
5. CLI functionality works after build
6. Package builds (TUI, Web, Contracts, AI) are complete
6. Package builds (Web, Contracts, AI; native TUI via Cargo separately) are complete

## Test Suites

Expand All @@ -29,11 +29,14 @@ Comprehensive unit tests that verify:
### 2. Package Build Tests (`test/build/package-builds.test.ts`)

Verifies that workspace packages build correctly:
- TUI package (`packages/tui/dist`)
- Web package (`packages/web/dist`)
- Contracts package (`packages/contracts/dist`)
- AI package (`packages/ai/dist`)

The interactive TUI is native Rust (`packages/tui-rs`); build/test with
`bun run tui-rs:build` / `bun run tui-rs:test` rather than a JS package `dist`.
(`@evalops/tui` / `packages/tui` were removed with the TypeScript TUI.)

**Run:** `bunx vitest --run test/build/package-builds.test.ts`

### 3. Binary Compilation Tests (`test/build/binary-compilation.test.ts`)
Expand Down
12 changes: 7 additions & 5 deletions docs/CONTRIBUTOR_RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Nav: [Docs index](README.md) · [Quickstart](QUICKSTART.md) · [Tools Reference]
```bash
npx nx run maestro:build --skip-nx-cache # CLI fast path
npm run smoke:local-e2e # help/version/headless/mock-agent local smoke
npx nx run maestro:build:all --skip-nx-cache # CLI + TUI + Web
npx nx run maestro:build:all --skip-nx-cache # CLI + Web packages
bun run tui-rs:build # native maestro-tui (interactive)
bun run bun:lint # Biome + eval verifier
npx nx run maestro:test --skip-nx-cache # Builds TUI/Web, then Vitest
npx nx run maestro:test --skip-nx-cache # Builds deps, then Vitest
npx nx run maestro:evals --skip-nx-cache # Scenario runner
```

Expand All @@ -27,9 +28,10 @@ mock-agent read, write/read, search/read, and edit/read flows.
## 2. Inner Loop

- `bun run dev` — TS watch (rebuilds `dist/`).
- TUI: `bun run cli -- --provider anthropic --model claude-opus-4-6 "hi"`.
- Interactive TUI: build with `bun run tui-rs:build`, then `maestro` or `bun run start:native`.
- One-shot CLI: `bun run cli -- --provider anthropic --model claude-opus-4-6 "hi"`.
- Web: `bun run web:dev` (server on `:8080`, Vite on `:3000`).
- Package builds: `bun run --filter @evalops/tui build`, `bun run --filter @evalops/maestro-web build`.
- Package builds: `bun run tui-rs:build`, `bun run --filter @evalops/maestro-web build`.

## 3. Safety Checks

Expand All @@ -49,7 +51,7 @@ mock-agent read, write/read, search/read, and edit/read flows.

- `bun run bun:lint`
- `npx nx run maestro:test --skip-nx-cache`
- Build touched packages (e.g., `npx nx run tui:build`, `npx nx run maestro-web:build`)
- Build touched packages (e.g., `bun run tui-rs:build`, `npx nx run maestro-web:build`)
- Ensure docs updated if flags/options changed (source-of-truth notes above)

## 6. Troubleshooting Quickies
Expand Down
15 changes: 13 additions & 2 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ Type `/` in the editor for completions. Highlights:
- `/run <script>` — run workspace scripts with streamed output.
- `/sessions` — list or load transcripts; format details live in [Sessions](SESSIONS.md).
- `/report` — collect info for bug reports or feedback.
- **Prompt templates** — drop markdown files into `.maestro/prompts/*.md` (project) or `~/.maestro/prompts/*.md` (user), then run them via `/prompts <name> …` or directly as `/<name> …` (if the name doesn’t collide with a built-in command). Markdown files in `.maestro/commands/*.md` are also treated as prompt templates.
- **Prompt templates & skills as slash commands** (Grok-style) — drop markdown into `.maestro/prompts/*.md` or `.maestro/commands/*.md` (and `~/.maestro/…`), or a skill at `.maestro/skills/<name>/SKILL.md`. Invoke with `/<name> …`. Built-in commands always win on name collision.
- **Trailing prompt** — `maestro "fix the bug"` / `maestro-tui "fix the bug"` opens the interactive TUI and submits that prompt once the agent is ready.
- **Session UX** — `/new` (alias `/clear`) starts a fresh session; `/fork` branches the transcript into a new session; `/rewind [n]` drops the last N user turns and rebuilds agent history.
- **Modes** — Shift+Tab cycles Normal → Plan → Always-approve. Shortcuts: `/plan`, `/auto`, `/always-approve`, `/ask`.
- **Worktrees** — `maestro --worktree[=name] "…"` creates/reuses a git worktree under `.maestro/worktrees/` then launches the native TUI.
- **Native print / single-shot** — `maestro "x" --mode text|json`, non-TTY pipes, and simple `maestro exec "x"` run via `maestro-tui --print` (Rust agent). Complex exec (`--output-schema`) stays on TS for now.
- **Native CLI helpers** — `maestro status|cost|sessions|hooks` early-exit to `maestro-tui` subcommands (no Node agent bootstrap).
- **Native trailing prompts** — In a TTY, `maestro "fix the bug"` hands off to `maestro-tui` (not the TypeScript single-shot agent). Use `--mode text` / `--mode json` for scripted single-shot on TS.
- **`/tools`**, **`/memory`**, **`/continue`** — real native handlers (tool list, local memory status, resume last session).


See [Tools Reference](TOOLS_REFERENCE.md) for every command and flag. Availability by surface (TUI vs Web) is summarized in [Web UI Guide](WEB_UI.md#parity-appendix).

Expand Down Expand Up @@ -76,4 +85,6 @@ Use `/steer <message>` to interrupt the current run and push a new prompt to the

Keep this guide handy when onboarding teammates so they can discover the TUI’s power-user features quickly.

For lower-level component APIs, see `packages/tui/README.md`.
For native TUI architecture, shortcuts, and slash commands, see
[TUI Architecture](TUI_ARCHITECTURE.md) and
[`packages/tui-rs/README.md`](../packages/tui-rs/README.md).
Loading
Loading