You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integration tests and clean up of zed and parsing (#366)
* copy over integration tests
* integration tests and clean up
* demos
* videos in docs
* fix: address PR review comments
- Fix memory leak: clear seenMessageIds Set in stop() method
- Fix channel message ID collisions: use randomUUID() instead of Date.now()
- Fix default export in utils/index.js: use direct imports instead of await import
- Fix template literal issues in mcp/06-mcp-connect.js
- Disable task-queue.test.js which imports non-existent modules
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use bounded CircularDedupeCache for message deduplication
Replace unbounded Set with CircularDedupeCache (capacity 2000) to prevent
memory leak in long-running ACP bridge sessions. The cache automatically
evicts oldest entries when capacity is reached, matching the SDK behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: prevent message misrouting and bound pending queue
- Drop threaded messages when target session is closed instead of
misrouting them to all sessions
- Bound the __pending__ queue to 500 messages to prevent unbounded
memory growth before first ACP session is created
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use template literals for CLI variable interpolation in 08-mcp-receive.js
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: prevent pending message loss and race conditions
- Stream existing buffered messages to user before clearing in bridgeToRelay()
to prevent pending messages from being discarded
- Remove duplicate __pending__ drain from prompt() to avoid race conditions
in multi-session scenarios (e.g., multiple Zed windows)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: only drop threaded messages for known closed sessions
Track closed session IDs separately so we can distinguish between:
- Threads that match closed ACP sessions (should be dropped)
- Arbitrary thread names like "code-review" (should be broadcast)
This prevents silently dropping legitimate threaded messages that
use relay's general thread feature rather than ACP session IDs.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Agent Relay <agent@agent-relay.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/architecture/storage.md
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ This describes the adapter stack, fallback behavior, and data policies.
4
4
5
5
## Components
6
6
-**createStorageAdapter**: Factory that selects an adapter based on config/env and handles fallbacks.
7
-
-**SQLite adapter**: Primary durable store (WAL-enabled, 7d retention default); tries `better-sqlite3` first, then `node:sqlite` (Node 22+).
7
+
-**JSONL adapter**: Default durable store; file-based append-only log (`.agent-relay/messages/YYYY-MM-DD.jsonl`, sessions in `.agent-relay/sessions.jsonl`). Zero native dependencies.
8
+
-**SQLite adapter**: Optional durable store (WAL-enabled, 7d retention default); tries `better-sqlite3` first, then `node:sqlite` (Node 22+).
8
9
-**Batched SQLite adapter**: Wraps SQLite for higher write throughput via buffered flushes.
9
-
-**JSONL adapter**: File-based append-only log (`.agent-relay/messages/YYYY-MM-DD.jsonl`, sessions in `.agent-relay/sessions.jsonl`) used when SQLite native modules fail or are blocked.
10
10
-**Memory adapter**: Volatile fallback to keep the daemon running when persistence fails.
11
11
12
12
## Fallback Chain
@@ -16,32 +16,28 @@ Config/env ──┐
16
16
createStorageAdapter
17
17
|
18
18
v
19
-
SQLite (default)
20
-
├─ better-sqlite3
21
-
└─ node:sqlite (Node 22+)
19
+
JSONL (default)
20
+
└─ .agent-relay/messages/*.jsonl
22
21
|
23
22
(failure to init)
24
23
v
25
-
SQLite (batched) [opt-in]
24
+
SQLite [opt-in via AGENT_RELAY_STORAGE_TYPE=sqlite]
26
25
├─ better-sqlite3
27
-
└─ node:sqlite
28
-
|
29
-
(failure to init)
30
-
v
31
-
JSONL (append-only)
26
+
└─ node:sqlite (Node 22+)
32
27
|
33
28
(failure to init)
34
29
v
35
30
Memory (volatile)
36
31
```
37
32
Notes:
38
-
- Current behavior: SQLite (better-sqlite3 → node:sqlite) → JSONL → Memory if native modules or permissions break persistence.
39
-
- Each fallback logs the failure reason and a fix hint (upgrade Node or rebuild native deps).
33
+
- Current behavior: JSONL (default) → Memory if filesystem write fails.
34
+
- SQLite available via `AGENT_RELAY_STORAGE_TYPE=sqlite` for low-latency query needs.
35
+
- Each fallback logs the failure reason and a fix hint.
40
36
41
37
## When to Use Each Adapter
42
-
-**SQLite**: Default for durability and low latency; use whenever native modules are available.
38
+
-**JSONL**: Default for durability with zero native dependencies; append-only per-day files.
39
+
-**SQLite**: Low-latency queries; use when you need faster reads or complex queries.
43
40
-**SQLite (batched)**: High-volume message bursts; tolerates small window of risk during batch flush.
44
-
-**JSONL**: Environments where native builds are blocked but disk is available; append-only per-day files.
45
41
-**Memory**: Tests, ephemeral runs, or emergency operation when persistence is broken.
Copy file name to clipboardExpand all lines: docs/features/cloud.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ description: "Connect to Agent Relay Cloud for persistent workspaces, cross-mach
7
7
8
8
Agent Relay Cloud extends your local relay with persistent workspaces, cross-machine messaging, and team collaboration features. Link your local daemon to access cloud capabilities.
Copy file name to clipboardExpand all lines: docs/features/dashboard.mdx
+6-26Lines changed: 6 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,37 +5,17 @@ description: "Monitor and manage your agent network through the browser-based da
5
5
6
6
# Web Dashboard
7
7
8
-
<Note>
9
-
**The dashboard is now an external component.** Install it from
10
-
[relay-dashboard on GitHub](https://github.com/AgentWorkforce/relay-dashboard).
11
-
For a lightweight alternative, the TUI client provides relay communication directly in your terminal.
12
-
</Note>
13
-
14
-
The relay-dashboard provides a web interface for real-time monitoring of your agent network. View agent presence, message history, and coordinate your team from a central interface.
15
-
16
-
## Installation
17
-
18
-
Install the dashboard from the external package:
19
-
20
-
```bash
21
-
npm install -g relay-dashboard
22
-
```
23
-
24
-
For full setup and configuration details, see the [relay-dashboard repository](https://github.com/AgentWorkforce/relay-dashboard).
8
+
The web dashboard provides a real-time interface for monitoring your agent network. View agent presence, message history, spawn agents, and coordinate your team from a central interface.
25
9
26
10
## Starting the Dashboard
27
11
28
-
After installing the external package, start the dashboard alongside the daemon:
12
+
Start the daemon with the `--dashboard` flag:
29
13
30
14
```bash
31
-
# Start the daemon
32
-
agent-relay up
33
-
34
-
# In another terminal, start the dashboard
35
-
relay-dashboard --port 3888
15
+
agent-relay up --dashboard
36
16
```
37
17
38
-
By default, the dashboard runs on port **3888**:
18
+
This starts both the relay daemon and the dashboard. By default, the dashboard runs on port **3888**:
0 commit comments