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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue