diff --git a/.github/RELEASE_MIRROR_CONTRACT.md b/.github/RELEASE_MIRROR_CONTRACT.md index 08fc94898..dfe0e9369 100644 --- a/.github/RELEASE_MIRROR_CONTRACT.md +++ b/.github/RELEASE_MIRROR_CONTRACT.md @@ -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 diff --git a/.gitignore b/.gitignore index e08e7b7a6..342c5da1b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ target/ node_modules/ .nx/ +# Prebuilt native TUI binaries staged for npm pack (materialized in release.yml) +vendor/ + # External checkouts .external/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33337cbc7..b33a25fc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.) diff --git a/Dockerfile b/Dockerfile index f37838e9a..4686224c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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) @@ -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 @@ -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 diff --git a/README.md b/README.md index e67af349c..e0f66fec7 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/bun.lockb b/bun.lockb index c2117ff4f..374c1a237 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docs/AGENT_INTERNALS.md b/docs/AGENT_INTERNALS.md index 269f48eae..7054960a1 100644 --- a/docs/AGENT_INTERNALS.md +++ b/docs/AGENT_INTERNALS.md @@ -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) | diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index b33effcee..9e6cb4061 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -9,8 +9,8 @@ Maestro is a multi-surface agent runtime (CLI/TUI, web, IDEs, bots) that shares ``` ┌─────────────────────────────────────────────────────────────┐ │ SURFACES │ -│ TUI (TS) │ Web UI │ Slack │ GitHub │ Conductor │ -│ TUI (Rust)│ VS Code │ JetBrains │ Headless │ Ambient │ +│ TUI (native maestro-tui) │ Web UI │ Slack │ GitHub │ +│ VS Code │ JetBrains │ Conductor │ Headless │ Ambient │ └──────┬──────────┬──────────┬──────────┬──────────┬──────────┘ │ │ │ │ │ ▼ ▼ ▼ ▼ ▼ @@ -18,6 +18,7 @@ Maestro is a multi-surface agent runtime (CLI/TUI, web, IDEs, bots) that shares │ AGENT CORE │ │ Event-driven LLM loop • Tool execution • Context sources │ │ System prompt assembly • Message transformation │ +│ (TS core for headless/web/IDE; Rust NativeAgent for TUI) │ └────────────────────────────┬────────────────────────────────┘ │ ┌────────────────────────────▼────────────────────────────────┐ @@ -37,7 +38,9 @@ Maestro is a multi-surface agent runtime (CLI/TUI, web, IDEs, bots) that shares First-class adapters have dedicated wire-protocol conversion and testing. Aggregator providers re-use an existing adapter's format (e.g., Azure uses the OpenAI adapter). -Every surface shares the same Agent core, tool set, and safety layers. +Interactive terminal sessions use the **native** Rust agent inside `maestro-tui`. +Headless, one-shot CLI, web, and many bot/IDE paths use the TypeScript Agent core +with shared tools/safety. See [TUI Architecture](TUI_ARCHITECTURE.md). --- @@ -45,22 +48,21 @@ Every surface shares the same Agent core, tool set, and safety layers. | Path | Purpose | |------|---------| -| `src/cli.ts` | **CLI entrypoint** — argument parsing, launches TUI or headless | -| `src/agent/` | Agent class, event system, context manager, message transformer | -| `src/cli-tui/` | TypeScript TUI: renderer, commands, modals, controllers, selectors | +| `src/main.ts` / `src/cli.ts` | **CLI entrypoint** — argument parsing; interactive mode launches native TUI | +| `src/cli/native-tui-launcher.ts` | Resolves and spawns the `maestro-tui` binary | +| `src/agent/` | TypeScript Agent class, event system, context manager, message transformer | | `src/tools/` | Tool DSL, built-in tools (read/write/edit/bash/search), tool cache | | `src/safety/` | Action firewall, approval modes, guardian (Semgrep/secrets) | -| `src/session/` | JSONL session persistence, branching, metadata cache | +| `src/session/` | JSONL session persistence, branching, metadata cache (TS surfaces) | | `src/server/` | HTTP/WebSocket server for web UI and API surfaces | -| `src/mcp/` | Model Context Protocol client, server management | +| `src/mcp/` | Model Context Protocol client, server management (TS surfaces) | | `src/hooks/` | Lifecycle hooks (PreToolUse, PostToolUse, etc.) | | `src/config/` | Configuration loading, framework preferences, model registry | | `src/workflows/` | Declarative multi-step workflow engine | | `src/memory/` | Cross-session memory store | | `src/telemetry/` | Cost tracking, observability, wide events, security events | | `packages/ai/` | `@evalops/ai` — shared SDK: model registry, transport, agent types | -| `packages/tui/` | `@evalops/tui` — terminal UI library: differential rendering, widgets | -| `packages/tui-rs/` | Native Rust TUI binary (standalone, no Node subprocess) | +| `packages/tui-rs/` | **Native** Rust TUI + agent binary (`maestro-tui`); only interactive UI | | `packages/web/` | `@evalops/maestro-web` — browser UI (Lit, Vite) | | `packages/contracts/` | `@evalops/contracts` — shared TypeScript definitions | | `packages/slack-agent/` | Slack bot surface with Docker sandbox | @@ -68,21 +70,24 @@ Every surface shares the same Agent core, tool set, and safety layers. | `packages/ambient-agent-rs/` | Always-on Rust GitHub daemon | | `packages/vscode-extension/` | VS Code extension | | `packages/jetbrains-plugin/` | JetBrains plugin | -| `docs/design/` | 17 detailed design documents (see [table below](#key-design-docs)) | +| `docs/design/` | Detailed design documents (see [table below](#key-design-docs)) | | `test/` | Vitest test suite (~4500 tests) | | `evals/` | Evaluation scenarios (`npx nx run maestro:evals`; CI runs on `run-evals` label) | +> **Removed:** `packages/tui` (`@evalops/tui`) and `src/cli-tui/` (TypeScript TUI) +> were deleted in PR #2891. Do not reintroduce them. + ### Surface Entrypoints | Surface | Entrypoint | |---------|------------| -| **TS TUI** | `src/cli.ts` → `src/cli-tui/tui-renderer.ts` | -| **Rust TUI** | `packages/tui-rs/src/main.rs` | +| **Native TUI** | `maestro` → `src/cli/native-tui-launcher.ts` → `packages/tui-rs` (`maestro-tui`) | | **Web UI** | `src/server/` (backend) + `packages/web/` (frontend) | | **VS Code** | `packages/vscode-extension/` | | **Slack Bot** | `packages/slack-agent/src/index.ts` | | **GitHub Agent** | `packages/github-agent/src/index.ts` | | **Ambient Agent** | `packages/ambient-agent-rs/src/main.rs` | +| **Headless / one-shot** | `src/main.ts` TypeScript agent bootstrap | ### Configuration Precedence (highest wins) @@ -129,9 +134,12 @@ Safety-gated execution framework. Tools are defined with `createTool()` / `creat JSONL persistence with buffered writes. Sessions are lazily initialized (file created only after first user + assistant exchange). Supports branching (fork from any message), metadata caching, and crash recovery via `beforeExit`/`SIGINT`/`SIGTERM` flush handlers. -### TUI (`src/cli-tui/`, `packages/tui/`) +### TUI (`packages/tui-rs/`) -Differential rendering engine that minimizes terminal writes. `TuiRenderer` subscribes to Agent events, delegates to views (message, tool output), controllers (queue, plan, approval), and modals (selectors, command palette). The `@evalops/tui` library provides the low-level rendering pipeline, widgets, and synchronized output. +Native `maestro-tui` binary (ratatui + crossterm) with its own agent loop, provider +clients, tools, safety, sessions, MCP, hooks, and skills. No Node subprocess for +interactive turns. See [TUI Architecture](TUI_ARCHITECTURE.md) and +[Native TUI parity](NATIVE_TUI_PARITY.md). --- @@ -177,8 +185,8 @@ User types prompt │ ▼ ┌──────────────────────────────────────────────────────────┐ -│ Event Subscribers │ -│ • TUI Renderer → differential screen update │ +│ Event Subscribers / native UI │ +│ • Native TUI App → ratatui screen update │ │ • Session Manager → JSONL persistence │ │ • Telemetry → duration, cost, success tracking │ │ • Web UI → SSE/WebSocket forwarding │ @@ -207,8 +215,7 @@ All surfaces share the Agent core via different integration patterns: | Surface | Integration | Notes | |---------|-------------|-------| -| **TS TUI** (`src/cli-tui/`) | Direct — `TuiRenderer` subscribes to `Agent.subscribe()` | Main interactive surface | -| **Rust TUI** (`packages/tui-rs/`) | Standalone — own agent + native provider clients | No Node subprocess; mirrors TS feature set | +| **Native TUI** (`packages/tui-rs/`) | Standalone — own agent + native provider clients | **Only** interactive terminal UI; no Node subprocess | | **Web UI** (`packages/web/`) | HTTP/WS — `src/server/` wraps Agent, streams via SSE/WebSocket | Lit components, Vite build | | **VS Code / JetBrains** | Extension/Plugin — spawns Maestro process, communicates via RPC | IDE-aware context (diagnostics, references) | | **Slack Bot** (`packages/slack-agent/`) | Docker sandbox — runs Agent in isolated container per request | Async queuing, approval workflows | @@ -218,58 +225,33 @@ All surfaces share the Agent core via different integration patterns: --- -## Slash Command System +## Slash Command System (native TUI) -Commands are split into a flat metadata catalog and a command-suite catalog. This keeps command definitions declarative while still giving handlers typed runtime dependencies. +Interactive slash commands live in the Rust TUI. Register and handle them under +`packages/tui-rs`: -### 1. Define or reuse the handler contract (`src/cli-tui/commands/types.ts`) +### 1. Command types (`packages/tui-rs/src/commands/types.rs`) -```typescript -export interface CommandHandlers { - myCommand(context: CommandExecutionContext): void; -} -``` +Define `Command` metadata and any context the handler needs. -### 2. Add standalone command metadata (`src/cli-tui/commands/command-catalog.ts`) +### 2. Registry (`packages/tui-rs/src/commands/registry.rs`) -```typescript -withArgs("mycommand", "myCommand", { - description: "...", - usage: "/mycommand [args]", - tags: ["ui"], -}); -``` +Add the command to `build_command_registry()` (name, description, usage, tags). +Fuzzy matching and tab completion are provided by `commands/matcher.rs`. -The adapter in `command-registry-adapter.ts` turns catalog metadata into executable registry entries and handles help, argument parsing, completions, aliases, and command rewrites. +### 3. Handler (`packages/tui-rs/src/app/command_handlers.rs`) -### 3. Add command-suite metadata when a parent command owns subcommands +Wire the command action to App behavior (modals, agent calls, status updates). -```typescript -// command-suite-catalog.ts -{ - name: "ops", - description: "Operational commands", - usage: "/ops [status|restart]", - subcommands: OPS_SUBCOMMANDS, -} +### 4. Tests -// subcommands/ops-commands.ts -export const OPS_SUBCOMMANDS: SubcommandDef[] = [ - { name: "status", description: "Show service status" }, -]; -``` +Cover parsing/dispatch in `commands/registry/tests.rs` and/or `app/tests.rs`. -Command-suite handlers live in `command-suite-handlers.ts` and are wired to the existing top-level handlers through `tui-renderer/command-suite-wiring.ts`. - -### 4. Wire runtime dependencies (`src/cli-tui/tui-renderer/command-registry-options.ts`) - -```typescript -handlers: { - myCommand: (context) => this.doSomething(context), -}, -``` +Selector-style commands (`/model`, `/theme`, `/approvals`) open ratatui components +under `packages/tui-rs/src/components/`. See [TUI Architecture](TUI_ARCHITECTURE.md). -**Command suites** (e.g., `/ss`, `/diag`, `/ui`, `/tools`) share subcommand definitions in `src/cli-tui/commands/subcommands/` and route through `CommandSuiteHandlers`. **Selector commands** (e.g., `/model`, `/theme`) still push a modal via `modalManager.push(component)`. +> **Historical:** The TS catalog/adapter pattern under `src/cli-tui/commands/` was +> removed with the TypeScript TUI (PR #2891). --- @@ -322,7 +304,9 @@ All located in `docs/design/`. Start with Agent State Machine for the core event | [Tool System](design/TOOL_SYSTEM.md) | Tool DSL, validation, caching, retry, sandbox | | [Context Management](design/CONTEXT_MANAGEMENT.md) | Token budgeting, context sources, auto-compaction | | [Session Persistence](design/SESSION_PERSISTENCE.md) | JSONL storage, buffered writes, branching, crash recovery | -| [TUI Rendering](design/TUI_RENDERING.md) | Differential rendering, event-driven UI, modal system | +| [TUI Architecture](TUI_ARCHITECTURE.md) | Native maestro-tui overview (current) | +| [Native TUI parity](NATIVE_TUI_PARITY.md) | Feature checklist vs removed TS interactive agent | +| [TUI Rendering](design/TUI_RENDERING.md) | **Historical** TS differential-rendering design (pre-#2891) | | [Web UI Architecture](design/WEB_UI_ARCHITECTURE.md) | Browser interface, SSE/WebSocket, Lit components | | [Safety & Firewall](design/SAFETY_FIREWALL.md) | Rule-based enforcement, dangerous command detection | | [Hooks System](design/HOOKS_SYSTEM.md) | PreToolUse/PostToolUse lifecycle, external integrations | @@ -344,17 +328,18 @@ Quick reference for "where do I change X?" | Task | Files to touch | |------|----------------| -| **Add a slash command** | `commands/types.ts` → `commands/command-catalog.ts` → handler module → `tui-renderer/command-registry-options.ts` | -| **Add a command-suite subcommand** | `commands/subcommands/*.ts` → `commands/command-suite-handlers.ts` → `tui-renderer/command-suite-wiring.ts` | -| **Add a built-in tool** | Create in `src/tools/`, register in tool list, add test in `test/tools/` | +| **Add a slash command (TUI)** | `packages/tui-rs/src/commands/{types,registry}.rs` → `app/command_handlers.rs` → tests | +| **Add a built-in tool (TS surfaces)** | Create in `src/tools/`, register in tool list, add test in `test/tools/` | +| **Add a built-in tool (native TUI)** | `packages/tui-rs/src/tools/` + registry | | **Add an MCP server** | `~/.maestro/mcp.json` or `.maestro/mcp.json` — tools auto-register as `mcp____` | -| **Add a provider** | Transport adapter in `packages/ai/`, model entries in registry, compat flags if needed | -| **Add a context source** | Implement `AgentContextSource`, register in `AgentContextManager` | -| **Add a TUI modal/selector** | Component in `src/cli-tui/selectors/`, view wrapper, init in `TuiRenderer`, push via `modalManager` | -| **Add a lifecycle hook** | Define event in hook types, emit from agent/tool executor, document in hooks config | -| **Fix terminal rendering** | Check if fix belongs in `packages/tui` (library), `src/cli-tui` (app), or `packages/tui-rs` (Rust) | +| **Add a provider (TS)** | Transport adapter in `packages/ai/`, model entries in registry, compat flags if needed | +| **Add a provider (native)** | Client under `packages/tui-rs/src/ai/` | +| **Add a context source (TS)** | Implement `AgentContextSource`, register in `AgentContextManager` | +| **Add a TUI modal/selector** | Component in `packages/tui-rs/src/components/`, wire from App / commands | +| **Add a lifecycle hook** | TS: hook types + agent/tool executor; native: `packages/tui-rs/src/hooks/` | +| **Fix terminal rendering** | `packages/tui-rs` only (TS TUI removed) | | **Add a web API endpoint** | Route in `src/server/`, handler using shared Agent, update `packages/web/` if UI needed | -| **Run tests** | `npx nx run maestro:test --skip-nx-cache` (full) or `bunx vitest --run -t "name"` (targeted) | +| **Run tests** | `npx nx run maestro:test --skip-nx-cache` (full) or `bunx vitest --run -t "name"` (targeted); `bun run tui-rs:test` for native | | **Lint** | `bun run bun:lint` (Biome + eval verifier) | --- @@ -372,13 +357,15 @@ npx nx run maestro:test --skip-nx-cache # ~4500 tests, should all pass npx nx graph --focus maestro # dependency visualization # 3. Make a change — pick one: -# a) Edit a TUI string: grep for "Maestro" in src/cli-tui/ and change it +# a) Edit a native TUI string: grep for "Maestro" in packages/tui-rs/src and change it # b) Add a toy tool: create src/tools/clock.ts that returns Date.now() -# c) Add a slash command /ping: follow the 4-file pattern above +# c) Add a slash command /ping in packages/tui-rs commands/registry + handlers # 4. Verify bun run bun:lint bunx vitest --run -t "your test name" +# if you touched packages/tui-rs: +bun run tui-rs:check ``` --- diff --git a/docs/ARCHITECTURE_DIAGRAM.md b/docs/ARCHITECTURE_DIAGRAM.md index 30978be8d..4b79a0bde 100644 --- a/docs/ARCHITECTURE_DIAGRAM.md +++ b/docs/ARCHITECTURE_DIAGRAM.md @@ -1,7 +1,10 @@ # 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 @@ -9,22 +12,22 @@ Nav: [Docs index](README.md) · [Contributor Runbook](CONTRIBUTOR_RUNBOOK.md) · ┌─────────────────────────────────────────────────────────────────────┐ │ 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) │ │ @@ -297,7 +300,7 @@ Factory CLI Integration │ │ │ │ ▼ ▼ ▼ ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ - │ TUI Renderer│ │ Telemetry │ │ Session │ + │ Native TUI │ │ Telemetry │ │ Session │ │ │ │ Logger │ │ Manager │ │ Updates UI │ │ │ │ │ │ components │ │ Records: │ │ Persists: │ diff --git a/docs/BUILD_TESTING.md b/docs/BUILD_TESTING.md index 4b80a929c..02bdf9e40 100644 --- a/docs/BUILD_TESTING.md +++ b/docs/BUILD_TESTING.md @@ -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 @@ -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`) diff --git a/docs/CONTRIBUTOR_RUNBOOK.md b/docs/CONTRIBUTOR_RUNBOOK.md index cea65f54e..f35390bc9 100644 --- a/docs/CONTRIBUTOR_RUNBOOK.md +++ b/docs/CONTRIBUTOR_RUNBOOK.md @@ -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 ``` @@ -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 @@ -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 diff --git a/docs/FEATURES.md b/docs/FEATURES.md index 53f732867..9a433bc0c 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -25,7 +25,16 @@ Type `/` in the editor for completions. Highlights: - `/run