docs: update all documentation for agor rebrand and dual-repo structure
This commit is contained in:
parent
5fadd1c022
commit
421c38cd8c
21 changed files with 225 additions and 207 deletions
|
|
@ -8,11 +8,11 @@ description: "Project documentation index"
|
|||
|
||||
# Agent Orchestrator Documentation
|
||||
|
||||
Agent Orchestrator (formerly BTerminal) is a multi-project AI agent orchestration dashboard built with Tauri 2.x, Svelte 5, and the Claude Agent SDK. It transforms a traditional terminal emulator into a mission control for running, monitoring, and coordinating multiple AI agent sessions across multiple codebases simultaneously.
|
||||
Agent Orchestrator (formerly Agents Orchestrator) is a multi-project AI agent orchestration dashboard built with Tauri 2.x, Svelte 5, and the Claude Agent SDK. It transforms a traditional terminal emulator into a mission control for running, monitoring, and coordinating multiple AI agent sessions across multiple codebases simultaneously.
|
||||
|
||||
The application has three major version milestones:
|
||||
|
||||
- **v1** — A single-file Python GTK3+VTE terminal emulator with Claude Code session management. Production-stable, still shipped as `bterminal`.
|
||||
- **v1** — A single-file Python GTK3+VTE terminal emulator with Claude Code session management. Production-stable, still shipped as `agor`.
|
||||
- **v2** — A ground-up rewrite using Tauri 2.x (Rust backend) + Svelte 5 (frontend). Multi-pane terminal with structured agent sessions, subagent tree visualization, session persistence, multi-machine relay support, 17 themes, and comprehensive packaging.
|
||||
- **v3 (Mission Control)** — A further redesign on top of v2's codebase. Replaces the free-form pane grid with a project-group dashboard. Adds multi-agent orchestration (4 management roles), inter-agent messaging (btmsg), task boards (bttask), session anchors, health monitoring, FTS5 search, plugin system, Landlock sandboxing, secrets management, and 704 automated tests.
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ The application has three major version milestones:
|
|||
|----------|---------------|
|
||||
| [architecture.md](architecture.md) | End-to-end system architecture: Rust backend, Svelte frontend, sidecar layer, data model, layout system, data flow, IPC patterns |
|
||||
| [decisions.md](decisions.md) | Architecture decisions log: rationale and dates for all major design choices |
|
||||
| [multi-machine.md](multi-machine.md) | Multi-machine relay architecture: bterminal-core extraction, bterminal-relay binary, RemoteManager, WebSocket protocol, reconnection |
|
||||
| [multi-machine.md](multi-machine.md) | Multi-machine relay architecture: agor-core extraction, agor-relay binary, RemoteManager, WebSocket protocol, reconnection |
|
||||
|
||||
### Subsystem Guides
|
||||
|
||||
|
|
@ -82,8 +82,8 @@ For research context, read [findings.md](findings.md). For implementation histor
|
|||
| Path | Purpose |
|
||||
|------|---------|
|
||||
| `src-tauri/src/` | Rust backend: commands, SQLite, btmsg, bttask, search, secrets, plugins |
|
||||
| `bterminal-core/` | Shared Rust crate: PtyManager, SidecarManager, EventSink trait, Landlock sandbox |
|
||||
| `bterminal-relay/` | Standalone relay binary for remote machine support |
|
||||
| `agor-core/` | Shared Rust crate: PtyManager, SidecarManager, EventSink trait, Landlock sandbox |
|
||||
| `agor-relay/` | Standalone relay binary for remote machine support |
|
||||
| `src/lib/` | Svelte 5 frontend: components, stores, adapters, utils, providers |
|
||||
| `sidecar/` | Agent sidecar runners (Claude, Codex, Ollama) — compiled to ESM bundles |
|
||||
| `tests/e2e/` | WebDriverIO E2E tests, fixtures, LLM judge |
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ The Rust code is organized as a Cargo workspace with three members:
|
|||
```
|
||||
v2/
|
||||
├── Cargo.toml # Workspace root
|
||||
├── bterminal-core/ # Shared crate
|
||||
├── agor-core/ # Shared crate
|
||||
│ └── src/
|
||||
│ ├── lib.rs
|
||||
│ ├── pty.rs # PtyManager (portable-pty)
|
||||
|
|
@ -67,7 +67,7 @@ v2/
|
|||
│ ├── supervisor.rs # SidecarSupervisor (crash recovery)
|
||||
│ ├── sandbox.rs # Landlock sandbox
|
||||
│ └── event.rs # EventSink trait
|
||||
├── bterminal-relay/ # Remote machine relay
|
||||
├── agor-relay/ # Remote machine relay
|
||||
│ └── src/main.rs # WebSocket server + token auth
|
||||
└── src-tauri/ # Tauri application
|
||||
└── src/
|
||||
|
|
@ -88,13 +88,13 @@ v2/
|
|||
├── watcher.rs # File watcher (notify crate)
|
||||
├── fs_watcher.rs # Per-project filesystem watcher (inotify)
|
||||
├── event_sink.rs # TauriEventSink implementation
|
||||
├── pty.rs # Thin re-export from bterminal-core
|
||||
└── sidecar.rs # Thin re-export from bterminal-core
|
||||
├── pty.rs # Thin re-export from agor-core
|
||||
└── sidecar.rs # Thin re-export from agor-core
|
||||
```
|
||||
|
||||
### Why a Workspace?
|
||||
|
||||
The `bterminal-core` crate exists so that both the Tauri application and the standalone `bterminal-relay` binary can share PtyManager and SidecarManager code. The `EventSink` trait abstracts event emission — TauriEventSink wraps Tauri's AppHandle, while the relay uses a WebSocket-based EventSink.
|
||||
The `agor-core` crate exists so that both the Tauri application and the standalone `agor-relay` binary can share PtyManager and SidecarManager code. The `EventSink` trait abstracts event emission — TauriEventSink wraps Tauri's AppHandle, while the relay uses a WebSocket-based EventSink.
|
||||
|
||||
### AppState
|
||||
|
||||
|
|
@ -116,8 +116,8 @@ The backend manages two SQLite databases, both in WAL mode with 5-second busy ti
|
|||
|
||||
| Database | Location | Purpose |
|
||||
|----------|----------|---------|
|
||||
| `sessions.db` | `~/.local/share/bterminal/` | Sessions, layout, settings, agent state, metrics, anchors |
|
||||
| `btmsg.db` | `~/.local/share/bterminal/` | Inter-agent messages, tasks, agents registry, audit log |
|
||||
| `sessions.db` | `~/.local/share/agor/` | Sessions, layout, settings, agent state, metrics, anchors |
|
||||
| `btmsg.db` | `~/.local/share/agor/` | Inter-agent messages, tasks, agents registry, audit log |
|
||||
|
||||
WAL checkpoints run every 5 minutes via a background tokio task to prevent unbounded WAL growth.
|
||||
|
||||
|
|
@ -301,7 +301,7 @@ Here is the complete path of a user prompt through the system:
|
|||
|
||||
## Configuration
|
||||
|
||||
### Project Groups (`~/.config/bterminal/groups.json`)
|
||||
### Project Groups (`~/.config/agor/groups.json`)
|
||||
|
||||
Human-editable JSON file defining project groups and their projects. Loaded at startup by `groups.rs`. Not hot-reloaded — changes require app restart or group switch.
|
||||
|
||||
|
|
@ -313,16 +313,16 @@ Key-value store for user preferences: theme, fonts, shell, CWD, provider setting
|
|||
|
||||
| Variable | Purpose |
|
||||
|----------|---------|
|
||||
| `BTERMINAL_TEST` | Enables test mode (disables watchers, wake scheduler) |
|
||||
| `BTERMINAL_TEST_DATA_DIR` | Redirects SQLite database storage |
|
||||
| `BTERMINAL_TEST_CONFIG_DIR` | Redirects groups.json config |
|
||||
| `BTERMINAL_OTLP_ENDPOINT` | Enables OpenTelemetry OTLP export |
|
||||
| `AGOR_TEST` | Enables test mode (disables watchers, wake scheduler) |
|
||||
| `AGOR_TEST_DATA_DIR` | Redirects SQLite database storage |
|
||||
| `AGOR_TEST_CONFIG_DIR` | Redirects groups.json config |
|
||||
| `AGOR_OTLP_ENDPOINT` | Enables OpenTelemetry OTLP export |
|
||||
|
||||
---
|
||||
|
||||
## Data Model
|
||||
|
||||
### Project Group Config (`~/.config/bterminal/groups.json`)
|
||||
### Project Group Config (`~/.config/agor/groups.json`)
|
||||
|
||||
Human-editable JSON file defining workspaces. Each group contains up to 5 projects. Loaded at startup by `groups.rs`, not hot-reloaded.
|
||||
|
||||
|
|
@ -335,12 +335,12 @@ Human-editable JSON file defining workspaces. Each group contains up to 5 projec
|
|||
"name": "AI Projects",
|
||||
"projects": [
|
||||
{
|
||||
"id": "bterminal",
|
||||
"name": "BTerminal",
|
||||
"identifier": "bterminal",
|
||||
"id": "agor",
|
||||
"name": "Agents Orchestrator",
|
||||
"identifier": "agor",
|
||||
"description": "Terminal emulator with Claude integration",
|
||||
"icon": "\uf120",
|
||||
"cwd": "/home/user/code/BTerminal",
|
||||
"cwd": "/home/user/code/Agents Orchestrator",
|
||||
"profile": "default",
|
||||
"enabled": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ This document records significant architecture decisions made during the develop
|
|||
| Decision | Rationale | Date |
|
||||
|----------|-----------|------|
|
||||
| JSON for groups config, SQLite for session state | JSON is human-editable, shareable, version-controllable. SQLite for ephemeral runtime state. Load at startup only — no hot-reload, no split-brain risk. | 2026-03-07 |
|
||||
| btmsg/bttask shared SQLite DB | Both CLI tools share `~/.local/share/bterminal/btmsg.db`. Single DB simplifies deployment — agents already have the path. Read-only for non-Manager roles via CLI permissions. | 2026-03-11 |
|
||||
| btmsg/bttask shared SQLite DB | Both CLI tools share `~/.local/share/agor/btmsg.db`. Single DB simplifies deployment — agents already have the path. Read-only for non-Manager roles via CLI permissions. | 2026-03-11 |
|
||||
|
||||
## Layout & UI
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# E2E Testing Facility
|
||||
|
||||
BTerminal's end-to-end testing uses **WebDriverIO + tauri-driver** to drive the real Tauri application through WebKit2GTK's inspector protocol. The facility has three pillars:
|
||||
Agents Orchestrator's end-to-end testing uses **WebDriverIO + tauri-driver** to drive the real Tauri application through WebKit2GTK's inspector protocol. The facility has three pillars:
|
||||
|
||||
1. **Test Fixtures** — isolated fake environments with dummy projects
|
||||
2. **Test Mode** — app-level env vars that disable watchers and redirect data/config paths
|
||||
|
|
@ -47,10 +47,10 @@ LLM_JUDGE_BACKEND=api ANTHROPIC_API_KEY=sk-... npm run test:e2e
|
|||
│ tauri-driver (port 4444) │
|
||||
│ WebDriver protocol ↔ WebKit2GTK inspector │
|
||||
├─────────────────────────────────────────────────────────┤
|
||||
│ BTerminal debug binary │
|
||||
│ BTERMINAL_TEST=1 (disables watchers, wake scheduler) │
|
||||
│ BTERMINAL_TEST_DATA_DIR → isolated SQLite DBs │
|
||||
│ BTERMINAL_TEST_CONFIG_DIR → test groups.json │
|
||||
│ Agents Orchestrator debug binary │
|
||||
│ AGOR_TEST=1 (disables watchers, wake scheduler) │
|
||||
│ AGOR_TEST_DATA_DIR → isolated SQLite DBs │
|
||||
│ AGOR_TEST_CONFIG_DIR → test groups.json │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ LLM_JUDGE_BACKEND=api ANTHROPIC_API_KEY=sk-... npm run test:e2e
|
|||
|
||||
The fixture generator creates isolated temporary environments so tests never touch real user data. Each fixture includes:
|
||||
|
||||
- **Temp root dir** under `/tmp/bterminal-e2e-{timestamp}/`
|
||||
- **Temp root dir** under `/tmp/agor-e2e-{timestamp}/`
|
||||
- **Data dir** — empty, SQLite databases created at runtime
|
||||
- **Config dir** — contains a generated `groups.json` with test projects
|
||||
- **Project dir** — a real git repo with `README.md` and `hello.py` (for agent testing)
|
||||
|
|
@ -74,10 +74,10 @@ const fixture = createTestFixture('my-test');
|
|||
// fixture.dataDir → /tmp/my-test-1710234567890/data/
|
||||
// fixture.configDir → /tmp/my-test-1710234567890/config/
|
||||
// fixture.projectDir → /tmp/my-test-1710234567890/test-project/
|
||||
// fixture.env → { BTERMINAL_TEST: '1', BTERMINAL_TEST_DATA_DIR: '...', BTERMINAL_TEST_CONFIG_DIR: '...' }
|
||||
// fixture.env → { AGOR_TEST: '1', AGOR_TEST_DATA_DIR: '...', AGOR_TEST_CONFIG_DIR: '...' }
|
||||
|
||||
// The test project is a git repo with:
|
||||
// README.md — "# Test Project\n\nA simple test project for BTerminal E2E tests."
|
||||
// README.md — "# Test Project\n\nA simple test project for Agents Orchestrator E2E tests."
|
||||
// hello.py — "def greet(name: str) -> str:\n return f\"Hello, {name}!\""
|
||||
// Both committed as "initial commit"
|
||||
|
||||
|
|
@ -105,17 +105,17 @@ Pass `fixture.env` to the app to redirect all data/config paths:
|
|||
|
||||
| Variable | Effect |
|
||||
|----------|--------|
|
||||
| `BTERMINAL_TEST=1` | Disables file watchers, wake scheduler, enables `is_test_mode` |
|
||||
| `BTERMINAL_TEST_DATA_DIR` | Redirects `sessions.db` and `btmsg.db` storage |
|
||||
| `BTERMINAL_TEST_CONFIG_DIR` | Redirects `groups.json` config loading |
|
||||
| `AGOR_TEST=1` | Disables file watchers, wake scheduler, enables `is_test_mode` |
|
||||
| `AGOR_TEST_DATA_DIR` | Redirects `sessions.db` and `btmsg.db` storage |
|
||||
| `AGOR_TEST_CONFIG_DIR` | Redirects `groups.json` config loading |
|
||||
|
||||
## Pillar 2: Test Mode
|
||||
|
||||
When `BTERMINAL_TEST=1` is set:
|
||||
When `AGOR_TEST=1` is set:
|
||||
|
||||
- **Rust backend**: `watcher.rs` and `fs_watcher.rs` skip file watchers
|
||||
- **Frontend**: `is_test_mode` Tauri command returns true, wake scheduler disabled via `disableWakeScheduler()`
|
||||
- **Data isolation**: `BTERMINAL_TEST_DATA_DIR` / `BTERMINAL_TEST_CONFIG_DIR` override default paths
|
||||
- **Data isolation**: `AGOR_TEST_DATA_DIR` / `AGOR_TEST_CONFIG_DIR` override default paths
|
||||
|
||||
The WebDriverIO config (`wdio.conf.js`) passes these env vars via `tauri:options.env` in capabilities.
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ The CLI backend unsets `CLAUDECODE` env var to avoid nested session errors when
|
|||
|
||||
| File | Phase | Tests | Focus |
|
||||
|------|-------|-------|-------|
|
||||
| `bterminal.test.ts` | Smoke | ~50 | Basic UI rendering, CSS class selectors |
|
||||
| `agor.test.ts` | Smoke | ~50 | Basic UI rendering, CSS class selectors |
|
||||
| `agent-scenarios.test.ts` | A | 22 | `data-testid` selectors, 7 deterministic scenarios |
|
||||
| `phase-b.test.ts` | B | ~15 | Multi-project grid, LLM-judged agent responses |
|
||||
| `phase-c.test.ts` | C | 27 | Hardening features (palette, search, notifications, keyboard, settings, health, metrics, context, files) |
|
||||
|
|
@ -221,7 +221,7 @@ db.finishRun('run-001', 'passed', 45000);
|
|||
The CI pipeline runs on push/PR with path-filtered triggers:
|
||||
|
||||
1. **Unit tests** — `npm run test` (vitest)
|
||||
2. **Cargo tests** — `cargo test` (with `env -u BTERMINAL_TEST` to prevent env leakage)
|
||||
2. **Cargo tests** — `cargo test` (with `env -u AGOR_TEST` to prevent env leakage)
|
||||
3. **E2E tests** — `xvfb-run npm run test:e2e` (virtual framebuffer for headless WebKit2GTK)
|
||||
|
||||
LLM-judged tests are gated on the `ANTHROPIC_API_KEY` secret — they skip gracefully in forks or when the secret is absent.
|
||||
|
|
@ -278,5 +278,5 @@ Key settings:
|
|||
| Tests hang on startup | Kill stale `tauri-driver` processes: `pkill -f tauri-driver` |
|
||||
| All tests skip LLM judge | Install Claude CLI or set `ANTHROPIC_API_KEY` |
|
||||
| SIGUSR2 / exit code 144 | Stale tauri-driver on port 4444 — kill and retry |
|
||||
| `BTERMINAL_TEST` leaking to cargo | Run cargo tests with `env -u BTERMINAL_TEST cargo test` |
|
||||
| `AGOR_TEST` leaking to cargo | Run cargo tests with `env -u AGOR_TEST cargo test` |
|
||||
| No display available | Use `xvfb-run` or ensure X11/Wayland display is set |
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ Before implementing multi-provider support, a systematic coupling analysis mappe
|
|||
|
||||
**CRITICAL — hardcoded SDK, must abstract:**
|
||||
- `sidecar/agent-runner.ts` — imports Claude Agent SDK, calls `query()`, hardcoded `findClaudeCli()`. Became `claude-runner.ts` with other providers getting separate runners.
|
||||
- `bterminal-core/src/sidecar.rs` — `AgentQueryOptions` had no `provider` field. `SidecarCommand` hardcoded runner path. Added provider-based runner selection.
|
||||
- `agor-core/src/sidecar.rs` — `AgentQueryOptions` had no `provider` field. `SidecarCommand` hardcoded runner path. Added provider-based runner selection.
|
||||
- `src/lib/adapters/sdk-messages.ts` — `parseMessage()` assumed Claude SDK JSON format. Became `claude-messages.ts` with per-provider parsers.
|
||||
|
||||
**HIGH — TS mirror types, provider-specific commands:**
|
||||
|
|
@ -245,7 +245,7 @@ Before implementing multi-provider support, a systematic coupling analysis mappe
|
|||
|
||||
**LOW — already generic:**
|
||||
- `agents.svelte.ts`, `health.svelte.ts`, `conflicts.svelte.ts` — provider-agnostic.
|
||||
- `bterminal-relay/` — forwards `AgentQueryOptions` as-is.
|
||||
- `agor-relay/` — forwards `AgentQueryOptions` as-is.
|
||||
|
||||
### Key Insights
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
## Overview
|
||||
|
||||
Extend BTerminal to manage Claude agent sessions and terminal panes running on **remote machines** over WebSocket, while keeping the local sidecar path unchanged.
|
||||
Extend Agents Orchestrator to manage Claude agent sessions and terminal panes running on **remote machines** over WebSocket, while keeping the local sidecar path unchanged.
|
||||
|
||||
## Problem
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ WebView ←→ Rust (Tauri IPC) ←→ Local Sidecar (stdio NDJSON)
|
|||
←→ Local PTY (portable-pty)
|
||||
```
|
||||
|
||||
Target state: BTerminal acts as a **mission control** that observes agents and terminals running on multiple machines (dev servers, cloud VMs, CI runners).
|
||||
Target state: Agents Orchestrator acts as a **mission control** that observes agents and terminals running on multiple machines (dev servers, cloud VMs, CI runners).
|
||||
|
||||
## Design Constraints
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ Target state: BTerminal acts as a **mission control** that observes agents and t
|
|||
|
||||
```
|
||||
┌──────────────────────────────────────────────────────────────────┐
|
||||
│ BTerminal (Controller) │
|
||||
│ Agents Orchestrator (Controller) │
|
||||
│ │
|
||||
│ ┌──────────┐ Tauri IPC ┌──────────────────────────────┐ │
|
||||
│ │ WebView │ ←────────────→ │ Rust Backend │ │
|
||||
|
|
@ -49,7 +49,7 @@ Target state: BTerminal acts as a **mission control** that observes agents and t
|
|||
│ Local │ │ Remote Machine │
|
||||
│ Sidecar │ │ │
|
||||
│ (Deno/ │ │ ┌────────────────┐ │
|
||||
│ Node.js) │ │ │ bterminal-relay│ │
|
||||
│ Node.js) │ │ │ agor-relay│ │
|
||||
│ │ │ │ (Rust binary) │ │
|
||||
└───────────┘ │ │ │ │
|
||||
│ │ ├── PTY mgr │ │
|
||||
|
|
@ -61,7 +61,7 @@ Target state: BTerminal acts as a **mission control** that observes agents and t
|
|||
|
||||
### Components
|
||||
|
||||
#### 1. `bterminal-relay` — Remote Agent (Rust binary)
|
||||
#### 1. `agor-relay` — Remote Agent (Rust binary)
|
||||
|
||||
A standalone Rust binary that runs on each remote machine. It:
|
||||
|
||||
|
|
@ -73,12 +73,12 @@ A standalone Rust binary that runs on each remote machine. It:
|
|||
**Why a Rust binary?** Reuses existing `PtyManager` and `SidecarManager` code from `src-tauri/src/`. Extracted into a shared crate.
|
||||
|
||||
```
|
||||
bterminal-relay/
|
||||
├── Cargo.toml # depends on bterminal-core
|
||||
agor-relay/
|
||||
├── Cargo.toml # depends on agor-core
|
||||
├── src/
|
||||
│ └── main.rs # WebSocket server + auth
|
||||
│
|
||||
bterminal-core/ # shared crate (extracted from src-tauri)
|
||||
agor-core/ # shared crate (extracted from src-tauri)
|
||||
├── Cargo.toml
|
||||
├── src/
|
||||
│ ├── pty.rs # PtyManager (from src-tauri/src/pty.rs)
|
||||
|
|
@ -249,20 +249,20 @@ Stored in SQLite `settings` table as JSON: `remote_machines` key.
|
|||
|
||||
## Implementation (All Phases Complete)
|
||||
|
||||
### Phase A: Extract `bterminal-core` crate [DONE]
|
||||
### Phase A: Extract `agor-core` crate [DONE]
|
||||
|
||||
- Cargo workspace at level (Cargo.toml with members: src-tauri, bterminal-core, bterminal-relay)
|
||||
- PtyManager and SidecarManager extracted to bterminal-core/
|
||||
- EventSink trait (bterminal-core/src/event.rs) abstracts event emission
|
||||
- Cargo workspace at level (Cargo.toml with members: src-tauri, agor-core, agor-relay)
|
||||
- PtyManager and SidecarManager extracted to agor-core/
|
||||
- EventSink trait (agor-core/src/event.rs) abstracts event emission
|
||||
- TauriEventSink (src-tauri/src/event_sink.rs) implements EventSink for AppHandle
|
||||
- src-tauri pty.rs and sidecar.rs are thin re-export wrappers
|
||||
|
||||
### Phase B: Build `bterminal-relay` binary [DONE]
|
||||
### Phase B: Build `agor-relay` binary [DONE]
|
||||
|
||||
- bterminal-relay/src/main.rs — WebSocket server (tokio-tungstenite)
|
||||
- agor-relay/src/main.rs — WebSocket server (tokio-tungstenite)
|
||||
- Token auth on WebSocket upgrade (Authorization: Bearer header)
|
||||
- CLI: --port (default 9750), --token (required), --insecure (allow ws://)
|
||||
- Routes RelayCommand to bterminal-core managers, forwards RelayEvent over WebSocket
|
||||
- Routes RelayCommand to agor-core managers, forwards RelayEvent over WebSocket
|
||||
- Rate limiting: 10 failed auth attempts triggers 5-minute lockout
|
||||
- Per-connection isolated PtyManager + SidecarManager instances
|
||||
- Command response propagation: structured responses (pty_created, pong, error) sent back via shared event channel
|
||||
|
|
@ -316,7 +316,7 @@ Stored in SQLite `settings` table as JSON: `remote_machines` key.
|
|||
|
||||
## What This Does NOT Cover (Future)
|
||||
|
||||
- **Multi-controller** — multiple BTerminal instances observing the same relay (needs pub/sub)
|
||||
- **Multi-controller** — multiple Agents Orchestrator instances observing the same relay (needs pub/sub)
|
||||
- **Relay discovery** — automatic detection of relays on LAN (mDNS/Bonjour)
|
||||
- **Agent migration** — moving a running agent from one machine to another
|
||||
- **Relay-to-relay** — direct communication between remote machines
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ Agent (via btmsg CLI)
|
|||
└── btmsg heartbeat → updates agent heartbeat
|
||||
│
|
||||
▼
|
||||
btmsg.db (SQLite, WAL mode, ~/.local/share/bterminal/btmsg.db)
|
||||
btmsg.db (SQLite, WAL mode, ~/.local/share/agor/btmsg.db)
|
||||
│
|
||||
├── agents table — registered agents with roles
|
||||
├── messages table — DMs and channel messages
|
||||
|
|
@ -274,7 +274,7 @@ The pure scoring function in `wake-scorer.ts` is tested with 24 unit tests. The
|
|||
3. Every 5 seconds, AgentSession polls wake events
|
||||
4. If score exceeds threshold (for smart strategy), triggers wake
|
||||
5. On group switch, `clearWakeScheduler()` cancels all timers
|
||||
6. In test mode (`BTERMINAL_TEST=1`), wake scheduler is disabled via `disableWakeScheduler()`
|
||||
6. In test mode (`AGOR_TEST=1`), wake scheduler is disabled via `disableWakeScheduler()`
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# BTerminal v2 — Implementation Phases
|
||||
# Agents Orchestrator v2 — Implementation Phases
|
||||
|
||||
See [architecture.md](architecture.md) for system architecture and [decisions.md](decisions.md) for design decisions.
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ See [architecture.md](architecture.md) for system architecture and [decisions.md
|
|||
|
||||
### File Structure
|
||||
```
|
||||
bterminal-v2/
|
||||
agents-orchestrator/
|
||||
src-tauri/
|
||||
src/
|
||||
main.rs # Tauri app entry
|
||||
|
|
@ -217,12 +217,12 @@ bterminal-v2/
|
|||
- [x] install-v2.sh — build-from-source installer with dependency checks (Node.js 20+, Rust 1.77+, system libs)
|
||||
- Checks: WebKit2GTK, GTK3, GLib, libayatana-appindicator, librsvg, openssl, build-essential, pkg-config, curl, wget, FUSE
|
||||
- Prompts to install missing packages via apt
|
||||
- Builds with `npx tauri build`, installs binary as `bterminal-v2` in `~/.local/bin/`
|
||||
- Builds with `npx tauri build`, installs binary as `agents-orchestrator` in `~/.local/bin/`
|
||||
- Creates desktop entry and installs SVG icon
|
||||
- [x] Tauri bundle configuration — targets: `["deb", "appimage"]`, category: DeveloperTool
|
||||
- .deb depends: libwebkit2gtk-4.1-0, libgtk-3-0, libayatana-appindicator3-1
|
||||
- AppImage: bundleMediaFramework disabled
|
||||
- [x] Icons regenerated from bterminal.svg — RGBA PNGs (32x32, 128x128, 128x128@2x, 512x512, .ico)
|
||||
- [x] Icons regenerated from agor.svg — RGBA PNGs (32x32, 128x128, 128x128@2x, 512x512, .ico)
|
||||
- [x] GitHub Actions release workflow (`.github/workflows/release.yml`)
|
||||
- Triggered on `v*` tags, Ubuntu 22.04 runner
|
||||
- Caches Rust and npm dependencies
|
||||
|
|
@ -260,16 +260,16 @@ bterminal-v2/
|
|||
|
||||
## Multi-Machine Support (Phases A-D) [status: complete]
|
||||
|
||||
Architecture designed in [multi-machine.md](multi-machine.md). Implementation extends BTerminal to manage agents and terminals on remote machines over WebSocket.
|
||||
Architecture designed in [multi-machine.md](multi-machine.md). Implementation extends Agents Orchestrator to manage agents and terminals on remote machines over WebSocket.
|
||||
|
||||
### Phase A: Extract `bterminal-core` crate [status: complete]
|
||||
### Phase A: Extract `agor-core` crate [status: complete]
|
||||
- [x] Created Cargo workspace at level (Cargo.toml with members)
|
||||
- [x] Extracted PtyManager and SidecarManager into shared `bterminal-core` crate
|
||||
- [x] Created EventSink trait to abstract Tauri event emission (bterminal-core/src/event.rs)
|
||||
- [x] Extracted PtyManager and SidecarManager into shared `agor-core` crate
|
||||
- [x] Created EventSink trait to abstract Tauri event emission (agor-core/src/event.rs)
|
||||
- [x] TauriEventSink in src-tauri/src/event_sink.rs implements EventSink
|
||||
- [x] src-tauri pty.rs and sidecar.rs now thin re-exports from bterminal-core
|
||||
- [x] src-tauri pty.rs and sidecar.rs now thin re-exports from agor-core
|
||||
|
||||
### Phase B: Build `bterminal-relay` binary [status: complete]
|
||||
### Phase B: Build `agor-relay` binary [status: complete]
|
||||
- [x] WebSocket server using tokio-tungstenite with token auth
|
||||
- [x] CLI flags: --port, --token, --insecure (clap)
|
||||
- [x] Routes RelayCommand to PtyManager/SidecarManager, forwards RelayEvent over WebSocket
|
||||
|
|
@ -299,7 +299,7 @@ Architecture designed in [multi-machine.md](multi-machine.md). Implementation ex
|
|||
|
||||
### Remaining Work
|
||||
- [x] Reconnection logic with exponential backoff — implemented in remote.rs
|
||||
- [x] Relay command response propagation — implemented in bterminal-relay main.rs
|
||||
- [x] Relay command response propagation — implemented in agor-relay main.rs
|
||||
- [ ] Real-world relay testing (2 machines)
|
||||
- [ ] TLS/certificate pinning
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ Architecture designed in [multi-machine.md](multi-machine.md). Implementation ex
|
|||
- [x] expandSkillPrompt(): reads skill content, injects as prompt with optional user args
|
||||
|
||||
### Extended AgentQueryOptions
|
||||
- [x] Rust struct (bterminal-core/src/sidecar.rs): setting_sources, system_prompt, model, claude_config_dir, additional_directories
|
||||
- [x] Rust struct (agor-core/src/sidecar.rs): setting_sources, system_prompt, model, claude_config_dir, additional_directories
|
||||
- [x] Sidecar JSON passthrough (both agent-runner.ts and agent-runner-deno.ts)
|
||||
- [x] SDK query() options: settingSources defaults to ['user', 'project'], systemPrompt, model, additionalDirectories
|
||||
- [x] CLAUDE_CONFIG_DIR env injection for multi-account support
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Agent Orchestrator includes several production-readiness features that ensure re
|
|||
|
||||
## Sidecar Supervisor (Crash Recovery)
|
||||
|
||||
The `SidecarSupervisor` in `bterminal-core/src/supervisor.rs` automatically restarts crashed sidecar processes.
|
||||
The `SidecarSupervisor` in `agor-core/src/supervisor.rs` automatically restarts crashed sidecar processes.
|
||||
|
||||
### Behavior
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ The sandbox is applied via `pre_exec()` on the child process command, before the
|
|||
|------|--------|--------|
|
||||
| Project CWD | Read/Write | Agent needs to read and modify project files |
|
||||
| `/tmp` | Read/Write | Temporary files during operation |
|
||||
| `~/.local/share/bterminal/` | Read/Write | SQLite databases (btmsg, sessions) |
|
||||
| `~/.local/share/agor/` | Read/Write | SQLite databases (btmsg, sessions) |
|
||||
| System library paths | Read-only | Node.js/Deno runtime dependencies |
|
||||
| `~/.claude/` or config dir | Read-only | Claude configuration and credentials |
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ The plugin system allows extending Agent Orchestrator with custom commands and e
|
|||
|
||||
### Plugin Discovery
|
||||
|
||||
Plugins live in `~/.config/bterminal/plugins/`. Each plugin is a directory containing a `plugin.json` manifest:
|
||||
Plugins live in `~/.config/agor/plugins/`. Each plugin is a directory containing a `plugin.json` manifest:
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
@ -290,10 +290,10 @@ A background tokio task runs `PRAGMA wal_checkpoint(TRUNCATE)` every 5 minutes o
|
|||
|
||||
## TLS Relay Support
|
||||
|
||||
The `bterminal-relay` binary supports TLS for encrypted WebSocket connections:
|
||||
The `agor-relay` binary supports TLS for encrypted WebSocket connections:
|
||||
|
||||
```bash
|
||||
bterminal-relay \
|
||||
agor-relay \
|
||||
--port 9750 \
|
||||
--token <secret> \
|
||||
--tls-cert /path/to/cert.pem \
|
||||
|
|
@ -308,7 +308,7 @@ Certificate pinning (comparing relay certificate fingerprints) is planned for v3
|
|||
|
||||
## OpenTelemetry Observability
|
||||
|
||||
The Rust backend supports optional OTLP trace export via the `BTERMINAL_OTLP_ENDPOINT` environment variable.
|
||||
The Rust backend supports optional OTLP trace export via the `AGOR_OTLP_ENDPOINT` environment variable.
|
||||
|
||||
### Backend (`telemetry.rs`)
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ A pre-configured Tempo + Grafana stack lives in `docker/tempo/`:
|
|||
```bash
|
||||
cd docker/tempo && docker compose up -d
|
||||
# Grafana at http://localhost:9715
|
||||
# Set BTERMINAL_OTLP_ENDPOINT=http://localhost:4318 to enable export
|
||||
# Set AGOR_OTLP_ENDPOINT=http://localhost:4318 to enable export
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
## Session: 2026-03-05
|
||||
|
||||
### Research Phase (complete)
|
||||
- [x] Analyzed current BTerminal v1 codebase (2092 lines Python, GTK3+VTE)
|
||||
- [x] Queried Memora — no existing BTerminal memories
|
||||
- [x] Analyzed current Agents Orchestrator v1 codebase (2092 lines Python, GTK3+VTE)
|
||||
- [x] Queried Memora — no existing Agents Orchestrator memories
|
||||
- [x] Researched Claude Agent SDK — found structured streaming, subagent tracking, hooks
|
||||
- [x] Researched Tauri + xterm.js ecosystem — found 4+ working projects
|
||||
- [x] Researched terminal latency benchmarks — xterm.js acceptable for AI output
|
||||
|
|
@ -114,7 +114,7 @@ Architecture decision: Initially used `claude` CLI with `--output-format stream-
|
|||
### Phase 6: Packaging + Distribution (2026-03-06)
|
||||
- [x] Created install-v2.sh — build-from-source installer with 6-step dependency check process
|
||||
- [x] Updated v2/src-tauri/tauri.conf.json: bundle targets ["deb", "appimage"]
|
||||
- [x] Regenerated all icons in v2/src-tauri/icons/ from bterminal.svg as RGBA PNGs
|
||||
- [x] Regenerated all icons in v2/src-tauri/icons/ from agor.svg as RGBA PNGs
|
||||
- [x] Created .github/workflows/release.yml — CI workflow triggered on v* tags
|
||||
- [x] Build verified: .deb (4.3 MB), AppImage (103 MB) both built successfully
|
||||
|
||||
|
|
@ -177,33 +177,33 @@ Architecture decision: Initially used `claude` CLI with `--output-format stream-
|
|||
- [x] getTotalCost() recursive helper, total cost shown in parent pane
|
||||
|
||||
#### TAURI_SIGNING_PRIVATE_KEY
|
||||
- [x] Set via `gh secret set` on DexterFromLab/BTerminal GitHub repo
|
||||
- [x] Set via `gh secret set` on DexterFromLab/Agents Orchestrator GitHub repo
|
||||
|
||||
### Session: 2026-03-06 (continued) — Multi-Machine Architecture Design
|
||||
|
||||
#### Multi-Machine Support Architecture
|
||||
- [x] Designed full multi-machine architecture in docs/multi-machine.md (303 lines)
|
||||
- [x] Three-layer model: BTerminal (controller) + bterminal-relay (remote binary) + unified frontend
|
||||
- [x] Three-layer model: Agents Orchestrator (controller) + agor-relay (remote binary) + unified frontend
|
||||
- [x] WebSocket NDJSON protocol: RelayCommand/RelayEvent envelope wrapping existing sidecar format
|
||||
- [x] Authentication: pre-shared token + TLS, rate limiting, lockout
|
||||
- [x] Autonomous relay model: agents keep running when controller disconnects
|
||||
- [x] Reconnection with exponential backoff (1s-30s), state_sync on reconnect
|
||||
- [x] 4-phase implementation plan: A (extract bterminal-core crate), B (relay binary), C (RemoteManager), D (frontend)
|
||||
- [x] 4-phase implementation plan: A (extract agor-core crate), B (relay binary), C (RemoteManager), D (frontend)
|
||||
- [x] Updated TODO.md and docs/task_plan.md to reference the design
|
||||
|
||||
### Session: 2026-03-06 (continued) — Multi-Machine Implementation (Phases A-D)
|
||||
|
||||
#### Phase A: bterminal-core crate extraction
|
||||
- [x] Created Cargo workspace at v2/ level (v2/Cargo.toml, workspace members: src-tauri, bterminal-core, bterminal-relay)
|
||||
- [x] Extracted PtyManager into v2/bterminal-core/src/pty.rs
|
||||
- [x] Extracted SidecarManager into v2/bterminal-core/src/sidecar.rs
|
||||
- [x] Created EventSink trait (v2/bterminal-core/src/event.rs) to abstract event emission
|
||||
#### Phase A: agor-core crate extraction
|
||||
- [x] Created Cargo workspace at v2/ level (v2/Cargo.toml, workspace members: src-tauri, agor-core, agor-relay)
|
||||
- [x] Extracted PtyManager into v2/agor-core/src/pty.rs
|
||||
- [x] Extracted SidecarManager into v2/agor-core/src/sidecar.rs
|
||||
- [x] Created EventSink trait (v2/agor-core/src/event.rs) to abstract event emission
|
||||
- [x] TauriEventSink (v2/src-tauri/src/event_sink.rs) implements EventSink for Tauri AppHandle
|
||||
- [x] src-tauri/src/pty.rs and sidecar.rs now thin re-export wrappers
|
||||
- [x] Cargo.lock moved from src-tauri/ to workspace root (v2/)
|
||||
|
||||
#### Phase B: bterminal-relay binary
|
||||
- [x] New Rust binary at v2/bterminal-relay/ with WebSocket server (tokio-tungstenite)
|
||||
#### Phase B: agor-relay binary
|
||||
- [x] New Rust binary at v2/agor-relay/ with WebSocket server (tokio-tungstenite)
|
||||
- [x] Token auth via Authorization: Bearer header on WebSocket upgrade
|
||||
- [x] CLI flags: --port (default 9750), --token (required), --insecure (allow ws://)
|
||||
- [x] Routes RelayCommand types (pty_create/write/resize/close, agent_query/stop, sidecar_restart, ping)
|
||||
|
|
@ -234,14 +234,14 @@ Architecture decision: Initially used `claude` CLI with `--output-format stream-
|
|||
- svelte-check: clean (0 errors)
|
||||
|
||||
#### New dependencies added
|
||||
- bterminal-core: serde, serde_json, log, portable-pty, uuid (extracted from src-tauri)
|
||||
- bterminal-relay: tokio, tokio-tungstenite, clap, env_logger, futures-util
|
||||
- agor-core: serde, serde_json, log, portable-pty, uuid (extracted from src-tauri)
|
||||
- agor-relay: tokio, tokio-tungstenite, clap, env_logger, futures-util
|
||||
- src-tauri: tokio-tungstenite, tokio, futures-util, uuid (added for RemoteManager)
|
||||
|
||||
### Session: 2026-03-06 (continued) — Relay Hardening & Reconnection
|
||||
|
||||
#### Relay Command Response Propagation
|
||||
- [x] Shared event channel between EventSink and command response sender (sink_tx clone in bterminal-relay)
|
||||
- [x] Shared event channel between EventSink and command response sender (sink_tx clone in agor-relay)
|
||||
- [x] send_error() helper function: all command failures now emit RelayEvent with commandId + error message instead of just logging
|
||||
- [x] ping command: now sends pong response via event channel (was a no-op)
|
||||
- [x] pty_create: returns pty_created event with session ID and commandId for correlation
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
- [x] Tool-aware output truncation (Bash 500, Read/Write 50, Glob/Grep 20, default 30 lines)
|
||||
- [x] Colors softened via `color-mix(in srgb, var(--ctp-*) 65%, var(--ctp-surface1) 35%)`
|
||||
- [x] MarkdownPane: container query wrapper, shared responsive padding variable
|
||||
- [x] catppuccin.css: `--bterminal-pane-padding-inline: clamp(0.75rem, 3.5cqi, 2rem)`
|
||||
- [x] catppuccin.css: `--agor-pane-padding-inline: clamp(0.75rem, 3.5cqi, 2rem)`
|
||||
- [x] 139/139 vitest passing, 0 new TypeScript errors
|
||||
- [ ] Visual verification in dev mode (pending)
|
||||
|
||||
### Session: 2026-03-06 (continued) — Sidecar Env Var Bug Fix
|
||||
|
||||
#### CLAUDE* Environment Variable Leak (critical fix)
|
||||
- [x] Diagnosed silent hang in agent sessions when BTerminal launched from Claude Code terminal
|
||||
- [x] Diagnosed silent hang in agent sessions when Agents Orchestrator launched from Claude Code terminal
|
||||
- [x] Root cause: Claude Code sets ~8 CLAUDE* env vars for nesting/sandbox detection
|
||||
- [x] Fixed both sidecar runners to filter out all keys starting with 'CLAUDE'
|
||||
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
#### Phase 10: Dead Component Removal + Polish
|
||||
- [x] Deleted 7 dead v2 components (~1,836 lines): TilingGrid, PaneContainer, PaneHeader, SessionList, SshSessionList, SshDialog, SettingsDialog
|
||||
- [x] Removed empty directories: Layout/, Sidebar/, Settings/, SSH/
|
||||
- [x] Rewrote StatusBar for workspace store (group name, project count, "BTerminal v3")
|
||||
- [x] Rewrote StatusBar for workspace store (group name, project count, "Agents Orchestrator v3")
|
||||
- [x] Fixed subagent routing: project-scoped sessions skip layout pane (render in TeamAgentsPanel)
|
||||
- [x] Updated v3-task_plan.md to mark all 10 phases complete
|
||||
|
||||
|
|
@ -237,7 +237,7 @@
|
|||
- [x] App.svelte: restore on startup via getSetting()
|
||||
|
||||
#### Desktop Integration
|
||||
- [x] install-v2.sh: added `StartupWMClass=bterminal` to .desktop template
|
||||
- [x] install-v2.sh: added `StartupWMClass=agor` to .desktop template
|
||||
- [x] GNOME auto-move extension compatible
|
||||
|
||||
#### No-Implicit-Push Rule
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
- [x] Deleted `TilingGrid.svelte` (328 lines), `PaneContainer.svelte` (113 lines), `PaneHeader.svelte` (44 lines)
|
||||
- [x] Deleted `SessionList.svelte` (374 lines), `SshSessionList.svelte` (263 lines), `SshDialog.svelte` (281 lines), `SettingsDialog.svelte` (433 lines)
|
||||
- [x] Removed empty directories: Layout/, Sidebar/, Settings/, SSH/
|
||||
- [x] Rewrote StatusBar.svelte for workspace store (group name, project count, agent count, "BTerminal v3" label)
|
||||
- [x] Rewrote StatusBar.svelte for workspace store (group name, project count, agent count, "Agents Orchestrator v3" label)
|
||||
- [x] Fixed subagent routing in agent-dispatcher: project-scoped sessions skip layout pane creation (subagents render in TeamAgentsPanel instead)
|
||||
- [x] Updated v3-task_plan.md to mark all 10 phases complete
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ All editor themes map to the same `--ctp-*` CSS custom property names (26 vars).
|
|||
|
||||
#### OTEL Telemetry Implementation
|
||||
- [x] Added 6 Rust deps: tracing, tracing-subscriber, opentelemetry 0.28, opentelemetry_sdk 0.28, opentelemetry-otlp 0.28, tracing-opentelemetry 0.29
|
||||
- [x] Created `v2/src-tauri/src/telemetry.rs` — TelemetryGuard, layer composition, OTLP export via BTERMINAL_OTLP_ENDPOINT env var
|
||||
- [x] Created `v2/src-tauri/src/telemetry.rs` — TelemetryGuard, layer composition, OTLP export via AGOR_OTLP_ENDPOINT env var
|
||||
- [x] Integrated into lib.rs: TelemetryGuard in AppState, init before Tauri builder
|
||||
- [x] Instrumented 10 Tauri commands with `#[tracing::instrument]`: pty_spawn, pty_kill, agent_query/stop/restart, remote_connect/disconnect/agent_query/agent_stop/pty_spawn
|
||||
- [x] Added `frontend_log` Tauri command for frontend→Rust tracing bridge
|
||||
|
|
@ -436,7 +436,7 @@ All editor themes map to the same `--ctp-*` CSS custom property names (26 vars).
|
|||
- [x] Removed tauri-plugin-log from Cargo.toml dependency
|
||||
|
||||
#### E2E Coverage Expansion (25 tests, single spec file)
|
||||
- [x] Consolidated 4 spec files into single bterminal.test.ts — Tauri creates one app session per spec file; after first spec completes, app closes and subsequent specs get "invalid session id"
|
||||
- [x] Consolidated 4 spec files into single agor.test.ts — Tauri creates one app session per spec file; after first spec completes, app closes and subsequent specs get "invalid session id"
|
||||
- [x] Added Workspace & Projects tests (8): project grid, project boxes, header with name, 3 project tabs, active highlight, tab switching, status bar counts
|
||||
- [x] Added Settings Panel tests (6): settings tab, sections, theme dropdown, dropdown open+options, group list, close button
|
||||
- [x] Added Keyboard Shortcuts tests (5): Ctrl+K command palette, Ctrl+, settings, Ctrl+B sidebar, Escape close, palette group list
|
||||
|
|
@ -810,7 +810,7 @@ Ran nemezis-audit on Rust backend. 0 verified exploitable findings, 10 recon tar
|
|||
- [x] Admin role (tier 0), channel messaging (create/list/send/history), mark-read, global feed
|
||||
|
||||
#### btmsg Rust Backend + Tauri Bridge
|
||||
- [x] Created btmsg.rs module — SQLite-backed messaging (shared DB: ~/.local/share/bterminal/btmsg.db)
|
||||
- [x] Created btmsg.rs module — SQLite-backed messaging (shared DB: ~/.local/share/agor/btmsg.db)
|
||||
- [x] 8+ Tauri commands: btmsg_inbox, btmsg_send, btmsg_read, btmsg_contacts, btmsg_feed, btmsg_channels, etc.
|
||||
- [x] CommsTab: sidebar chat interface with activity feed, DMs, channels (Ctrl+M)
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ Ran nemezis-audit on Rust backend. 0 verified exploitable findings, 10 recon tar
|
|||
|
||||
#### BTMSG_AGENT_ID Environment Passthrough (5-layer chain)
|
||||
- [x] agent-bridge.ts: added extra_env?: Record<string,string> to AgentQueryOptions
|
||||
- [x] bterminal-core/sidecar.rs: added extra_env: HashMap<String,String> with #[serde(default)]
|
||||
- [x] agor-core/sidecar.rs: added extra_env: HashMap<String,String> with #[serde(default)]
|
||||
- [x] claude-runner.ts: extraEnv merged into cleanEnv after provider var stripping
|
||||
- [x] codex-runner.ts: same extraEnv pattern
|
||||
- [x] AgentSession injects { BTMSG_AGENT_ID: project.id } for agent projects
|
||||
|
|
@ -922,7 +922,7 @@ Reviewed and integrated Dexter's multi-agent orchestration branch (dexter_change
|
|||
#### Test Counts
|
||||
- Vitest: 327 passed (was 286, +41)
|
||||
- Cargo src-tauri: 64 passed (was 49, +15)
|
||||
- Cargo bterminal-core: 8 passed (was 0, +8)
|
||||
- Cargo agor-core: 8 passed (was 0, +8)
|
||||
|
||||
### E2E Testing Engine — Phase A (2026-03-12)
|
||||
|
||||
|
|
@ -945,8 +945,8 @@ Reviewed and integrated Dexter's multi-agent orchestration branch (dexter_change
|
|||
|
||||
#### WebDriverIO Config Improvements
|
||||
- [x] TCP readiness probe replaces blind 2s sleep for tauri-driver startup
|
||||
- [x] BTERMINAL_TEST=1 env var passed to Tauri app via capabilities
|
||||
- [x] Optional BTERMINAL_TEST_DATA_DIR / BTERMINAL_TEST_CONFIG_DIR passthrough
|
||||
- [x] AGOR_TEST=1 env var passed to Tauri app via capabilities
|
||||
- [x] Optional AGOR_TEST_DATA_DIR / AGOR_TEST_CONFIG_DIR passthrough
|
||||
|
||||
#### Test Infrastructure Files
|
||||
- [x] `v2/tests/e2e/fixtures.ts` — isolated test fixture generator (temp dirs, git repos, groups.json)
|
||||
|
|
@ -1014,7 +1014,7 @@ Reviewed and integrated Dexter's multi-agent orchestration branch (dexter_change
|
|||
Implemented ALL 13 features from tribunal assessment in 3 parallel waves (11 sub-agents total). 60+ files changed, 3861 insertions.
|
||||
|
||||
#### Wave 1: Core Infrastructure (3 agents)
|
||||
- [x] **Sidecar supervisor** — `bterminal-core/src/supervisor.rs`: SidecarSupervisor with exponential backoff (1s-30s, 5 retries), SidecarHealth enum, 5min stability window, 17 tests
|
||||
- [x] **Sidecar supervisor** — `agor-core/src/supervisor.rs`: SidecarSupervisor with exponential backoff (1s-30s, 5 retries), SidecarHealth enum, 5min stability window, 17 tests
|
||||
- [x] **FTS5 search** — rusqlite `bundled-full`, SearchDb with 3 FTS5 virtual tables, SearchOverlay.svelte (Ctrl+Shift+F), search-bridge.ts
|
||||
- [x] **Secrets management** — `keyring` crate (linux-native/libsecret), SecretsManager, secrets-bridge.ts, SettingsTab section
|
||||
|
||||
|
|
@ -1023,7 +1023,7 @@ Implemented ALL 13 features from tribunal assessment in 3 parallel waves (11 sub
|
|||
- [x] **Keyboard-first UX** — Alt+1-5 jump, Ctrl+H/L vi-nav, Ctrl+Shift+1-9 tabs, Ctrl+J terminal, CommandPalette rewrite (18+ cmds, 6 categories)
|
||||
- [x] **Agent health monitoring** — heartbeats + dead_letter_queue tables, 15s poll, ProjectHeader heart indicator, StatusBar badge
|
||||
- [x] **Plugin system** — plugins.rs discovery, plugin-host.ts sandboxed runtime, plugins.svelte.ts store, example plugin
|
||||
- [x] **Landlock sandbox** — bterminal-core/src/sandbox.rs, SandboxConfig, pre_exec() integration, per-project toggle
|
||||
- [x] **Landlock sandbox** — agor-core/src/sandbox.rs, SandboxConfig, pre_exec() integration, per-project toggle
|
||||
|
||||
#### Wave 3: Integration (3 agents)
|
||||
- [x] **Error classification** — error-classifier.ts (6 types, retry logic), 20 tests
|
||||
|
|
@ -1053,7 +1053,7 @@ Executed tribunal-recommended hybrid S-2/S-1 hardening sprint. Fixed 3 security/
|
|||
- [x] Added "Multi-Agent Delegation" section to Manager workflow in `agent-prompts.ts`
|
||||
- [x] Inject `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` env var for Manager agents in `AgentSession.svelte`
|
||||
|
||||
#### TLS for bterminal-relay
|
||||
#### TLS for agor-relay
|
||||
- [x] Added `--tls-cert` and `--tls-key` optional CLI args to relay binary
|
||||
- [x] `build_tls_acceptor()` using `native_tls::Identity::from_pkcs8`
|
||||
- [x] Refactored to generic `accept_ws_with_auth<S>` and `run_ws_session<S>` (avoids code duplication)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Full codebase exploration of 13+ files revealed coupling at 4 severity levels:
|
|||
| File | Coupling | Impact |
|
||||
|------|----------|--------|
|
||||
| `sidecar/agent-runner.ts` | Imports `@anthropic-ai/claude-agent-sdk`, calls `query()`, hardcoded `findClaudeCli()` | Entire sidecar is Claude-only. Must become `claude-runner.ts`. Other providers get own runners. |
|
||||
| `bterminal-core/src/sidecar.rs` | `AgentQueryOptions` struct has no `provider` field. `SidecarCommand` hardcodes `agent-runner.mjs` path. | Must add `provider: String` field. Runner selection must be provider-based. |
|
||||
| `agor-core/src/sidecar.rs` | `AgentQueryOptions` struct has no `provider` field. `SidecarCommand` hardcodes `agent-runner.mjs` path. | Must add `provider: String` field. Runner selection must be provider-based. |
|
||||
| `src/lib/adapters/sdk-messages.ts` | `parseMessage()` assumes Claude SDK JSON format (assistant/user/result types, subagent tool names like `dispatch_agent`) | Must become `claude-messages.ts`. Other providers get own parsers. Registry selects by provider. |
|
||||
|
||||
#### HIGH (TS mirror types, provider-specific commands)
|
||||
|
|
@ -37,7 +37,7 @@ Full codebase exploration of 13+ files revealed coupling at 4 severity levels:
|
|||
| `src/lib/stores/agents.svelte.ts` | AgentMessage type is already generic (text, tool_call, tool_result). No Claude-specific logic. | No changes needed. Common AgentMessage type stays. |
|
||||
| `src/lib/stores/health.svelte.ts` | Tracks activity/cost/context per project. Provider-agnostic. | No changes needed. |
|
||||
| `src/lib/stores/conflicts.svelte.ts` | File overlap detection. Provider-agnostic (operates on tool_call file paths). | No changes needed. |
|
||||
| `bterminal-relay/` | Forwards AgentQueryOptions as-is. No provider logic. | No changes needed (will forward `provider` field transparently). |
|
||||
| `agor-relay/` | Forwards AgentQueryOptions as-is. No provider logic. | No changes needed (will forward `provider` field transparently). |
|
||||
|
||||
### Key Design Insights
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Multi-provider agent support (Claude Code, Codex CLI, Ollama) via adapter patter
|
|||
| 1.3 | Create Claude provider meta | NEW: `src/lib/providers/claude.ts` | done |
|
||||
| 1.4 | Rename sdk-messages.ts → claude-messages.ts | RENAME + update imports | done |
|
||||
| 1.5 | Create message adapter registry | NEW: `src/lib/adapters/message-adapters.ts` | done |
|
||||
| 1.6 | Update Rust AgentQueryOptions | MOD: `bterminal-core/src/sidecar.rs` | done |
|
||||
| 1.6 | Update Rust AgentQueryOptions | MOD: `agor-core/src/sidecar.rs` | done |
|
||||
| 1.7 | Update agent-bridge.ts options shape | MOD: `src/lib/adapters/agent-bridge.ts` | done |
|
||||
| 1.8 | Rename agent-runner.ts → claude-runner.ts | RENAME + update build script | done |
|
||||
| 1.9 | Add provider field to ProjectConfig | MOD: `src/lib/types/groups.ts` | done |
|
||||
|
|
@ -54,9 +54,9 @@ Multi-provider agent support (Claude Code, Codex CLI, Ollama) via adapter patter
|
|||
|
||||
| # | Task | Files | Status |
|
||||
|---|------|-------|--------|
|
||||
| 3.1 | SidecarManager provider-based runner selection | MOD: `bterminal-core/src/sidecar.rs` | done |
|
||||
| 3.2 | Per-provider runner discovery | MOD: `bterminal-core/src/sidecar.rs` | done |
|
||||
| 3.3 | Provider-specific env var stripping | MOD: `bterminal-core/src/sidecar.rs` | done |
|
||||
| 3.1 | SidecarManager provider-based runner selection | MOD: `agor-core/src/sidecar.rs` | done |
|
||||
| 3.2 | Per-provider runner discovery | MOD: `agor-core/src/sidecar.rs` | done |
|
||||
| 3.3 | Provider-specific env var stripping | MOD: `agor-core/src/sidecar.rs` | done |
|
||||
|
||||
## Type System
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ AgentPane.svelte (renders AgentMessage, capability-driven)
|
|||
- `claude-bridge.ts` → `provider-bridge.ts` (genericized)
|
||||
|
||||
### Modified Files (Phase 1)
|
||||
- `bterminal-core/src/sidecar.rs` — AgentQueryOptions struct
|
||||
- `agor-core/src/sidecar.rs` — AgentQueryOptions struct
|
||||
- `src-tauri/src/lib.rs` — command handlers
|
||||
- `src/lib/adapters/agent-bridge.ts` — options interface
|
||||
- `src/lib/agent-dispatcher.ts` — provider routing
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Mission Control — Multi-Project AI Agent Orchestration
|
||||
|
||||
BTerminal v3.0 is a ground-up redesign of the terminal interface, built for managing multiple AI agent sessions across multiple projects simultaneously. The Mission Control dashboard replaces the single-pane terminal with a full orchestration workspace.
|
||||
Agents Orchestrator v3.0 is a ground-up redesign of the terminal interface, built for managing multiple AI agent sessions across multiple projects simultaneously. The Mission Control dashboard replaces the single-pane terminal with a full orchestration workspace.
|
||||
|
||||
### What's New
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ BTerminal v3.0 is a ground-up redesign of the terminal interface, built for mana
|
|||
- Landlock sandbox: kernel 6.2+ filesystem restriction for sidecar processes
|
||||
- Plugin sandbox: 13 shadowed globals, strict mode, frozen API, permission-gated
|
||||
- Secrets management: system keyring (libsecret), no plaintext fallback
|
||||
- TLS support for bterminal-relay (optional `--tls-cert`/`--tls-key`)
|
||||
- TLS support for agor-relay (optional `--tls-cert`/`--tls-key`)
|
||||
- Sidecar environment stripping: dual-layer (Rust + JS) credential isolation
|
||||
- Audit logging: agent events, task changes, wake events, prompt injections
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ BTerminal v3.0 is a ground-up redesign of the terminal interface, built for mana
|
|||
|
||||
### Multi-Machine (Early Access)
|
||||
|
||||
bterminal-relay enables running agent sessions across multiple Linux machines via WebSocket. TLS encryption is supported. This feature is architecturally complete but not yet surfaced in the v3 UI — available for advanced users via the relay binary and bridges.
|
||||
agor-relay enables running agent sessions across multiple Linux machines via WebSocket. TLS encryption is supported. This feature is architecturally complete but not yet surfaced in the v3 UI — available for advanced users via the relay binary and bridges.
|
||||
|
||||
**v3.1 roadmap:** Certificate pinning, UI integration, real-world multi-machine testing.
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ Deno is preferred because it has faster cold-start time (~50ms vs ~150ms for Nod
|
|||
|
||||
### Crash Recovery (SidecarSupervisor)
|
||||
|
||||
The `SidecarSupervisor` in `bterminal-core/src/supervisor.rs` provides automatic crash recovery:
|
||||
The `SidecarSupervisor` in `agor-core/src/supervisor.rs` provides automatic crash recovery:
|
||||
|
||||
- Monitors the sidecar child process for unexpected exits
|
||||
- On crash: waits with exponential backoff (1s → 2s → 4s → 8s → 16s → 30s cap)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue