Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 184 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ subtle = "2"

[dev-dependencies]
tokio-test = "0.4"
criterion = "0.5"

[[bench]]
name = "router_bench"
harness = false

[[bench]]
name = "sandbox_bench"
harness = false

[profile.release]
lto = true
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,32 +100,35 @@ The gateway binds to `127.0.0.1:7200` by default. When binding to a non-loopback
- WASM plugin host -- load, validate, and call plugin functions via Extism
- Hierarchical session router (peer/guild/team/account/channel bindings)
- Agent runner with streaming SSE for Anthropic and OpenAI APIs
- Tool-use loop with WASM sandbox dispatch and streamed `tool_use` / `tool_result` events
- Config loading from TOML + env with zero-config defaults
- Token metering and budget enforcement (session/daily/monthly)
- Memory engine (soul + semantic + episodic) integrated in message context assembly
- Webhook channel adapter pipeline (`POST /webhook/{channel}`) with host-side proxy allowlists
- NATS message bus with graceful fallback to local-only mode
- In-memory session store with conversation history
- CLI with `gateway`, `plugin`, and `status` subcommands
- Unit/integration test suites for auth/router/metering/memory/sandbox/channel flows

### TODO

- [ ] Tool-use loop (agent runner calls tools in WASM sandbox, feeds results back)
- [ ] Gemini and Ollama provider support
- [ ] SurrealDB-backed persistent session store
- [ ] NATS JetStream for message replay and durability
- [ ] Channel plugins (Telegram, Discord, WhatsApp as `.wasm` modules)
- [ ] Plugin capability grants (network, filesystem, env var access)
- [ ] Production channel plugins (Telegram/Discord/WhatsApp)
- [ ] Plugin SDK and guest-side API
- [ ] Configuration file support
- [ ] TLS termination
- [ ] Metrics and observability (OpenTelemetry)
- [ ] Multi-agent orchestration
- [ ] Tests
- [ ] Performance benchmarks and production hardening

## Stack

| Component | Crate | Role |
|---|---|---|
| Async runtime | `tokio` | Task scheduling, I/O, timers |
| HTTP / WebSocket | `axum` | Gateway server, WebSocket upgrade |
| WASM plugins | `extism` | Sandboxed plugin host (Wazero-based) |
| WASM plugins | `extism` | Sandboxed plugin host (Wasmtime-backed) |
| Message bus | `async-nats` | Inter-component routing, pub/sub |
| Storage | `surrealdb` (planned) | Session persistence, agent config |
| Wire format | `rmp-serde` | MessagePack serialization |
Expand Down
Loading