feat: initial Sol virtual librarian implementation
Matrix bot with E2EE (matrix-sdk 0.9) that passively archives all
messages to OpenSearch and responds to queries via Mistral AI with
function calling tools.
Core systems:
- Archive: bulk OpenSearch indexer with batch/flush, edit/redaction
handling, embedding pipeline passthrough
- Brain: rule-based engagement evaluator (mentions, DMs, name
invocations), LLM-powered spontaneous engagement, per-room
conversation context windows, response delay simulation
- Tools: search_archive, get_room_context, list_rooms, get_room_members
registered as Mistral function calling tools with iterative tool loop
- Personality: templated system prompt with Sol's librarian persona
47 unit tests covering config, evaluator, conversation windowing,
personality templates, schema serialization, and search query building.
2026-03-20 21:40:13 +00:00
|
|
|
[package]
|
|
|
|
|
name = "sol"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
rust-version = "1.76.0"
|
|
|
|
|
authors = ["Sunbeam Studios <hello@sunbeam.pt>"]
|
|
|
|
|
description = "Sol — virtual librarian Matrix bot with E2EE, OpenSearch archive, and Mistral AI"
|
2026-03-22 15:13:56 +00:00
|
|
|
license = "AGPL-3.0-or-later"
|
2026-03-21 15:53:49 +00:00
|
|
|
repository = "https://src.sunbeam.pt/studio/sol"
|
feat: initial Sol virtual librarian implementation
Matrix bot with E2EE (matrix-sdk 0.9) that passively archives all
messages to OpenSearch and responds to queries via Mistral AI with
function calling tools.
Core systems:
- Archive: bulk OpenSearch indexer with batch/flush, edit/redaction
handling, embedding pipeline passthrough
- Brain: rule-based engagement evaluator (mentions, DMs, name
invocations), LLM-powered spontaneous engagement, per-room
conversation context windows, response delay simulation
- Tools: search_archive, get_room_context, list_rooms, get_room_members
registered as Mistral function calling tools with iterative tool loop
- Personality: templated system prompt with Sol's librarian persona
47 unit tests covering config, evaluator, conversation windowing,
personality templates, schema serialization, and search query building.
2026-03-20 21:40:13 +00:00
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "sol"
|
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
2026-03-24 21:33:01 +00:00
|
|
|
mistralai-client = { version = "1.2.0", registry = "sunbeam" }
|
feat: initial Sol virtual librarian implementation
Matrix bot with E2EE (matrix-sdk 0.9) that passively archives all
messages to OpenSearch and responds to queries via Mistral AI with
function calling tools.
Core systems:
- Archive: bulk OpenSearch indexer with batch/flush, edit/redaction
handling, embedding pipeline passthrough
- Brain: rule-based engagement evaluator (mentions, DMs, name
invocations), LLM-powered spontaneous engagement, per-room
conversation context windows, response delay simulation
- Tools: search_archive, get_room_context, list_rooms, get_room_members
registered as Mistral function calling tools with iterative tool loop
- Personality: templated system prompt with Sol's librarian persona
47 unit tests covering config, evaluator, conversation windowing,
personality templates, schema serialization, and search query building.
2026-03-20 21:40:13 +00:00
|
|
|
matrix-sdk = { version = "0.9", features = ["e2e-encryption", "sqlite"] }
|
|
|
|
|
opensearch = "2"
|
|
|
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
|
serde_json = "1"
|
|
|
|
|
toml = "0.8"
|
|
|
|
|
tracing = "0.1"
|
|
|
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
2026-03-24 19:49:07 +00:00
|
|
|
tracing-appender = "0.2"
|
feat: initial Sol virtual librarian implementation
Matrix bot with E2EE (matrix-sdk 0.9) that passively archives all
messages to OpenSearch and responds to queries via Mistral AI with
function calling tools.
Core systems:
- Archive: bulk OpenSearch indexer with batch/flush, edit/redaction
handling, embedding pipeline passthrough
- Brain: rule-based engagement evaluator (mentions, DMs, name
invocations), LLM-powered spontaneous engagement, per-room
conversation context windows, response delay simulation
- Tools: search_archive, get_room_context, list_rooms, get_room_members
registered as Mistral function calling tools with iterative tool loop
- Personality: templated system prompt with Sol's librarian persona
47 unit tests covering config, evaluator, conversation windowing,
personality templates, schema serialization, and search query building.
2026-03-20 21:40:13 +00:00
|
|
|
rand = "0.8"
|
|
|
|
|
regex = "1"
|
|
|
|
|
anyhow = "1"
|
|
|
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
|
url = "2"
|
2026-03-21 15:51:31 +00:00
|
|
|
ruma = { version = "0.12", features = ["events", "client", "markdown"] }
|
|
|
|
|
libsqlite3-sys = { version = "0.30", features = ["bundled"] }
|
|
|
|
|
deno_core = "0.393"
|
|
|
|
|
deno_ast = { version = "0.53", features = ["transpiling"] }
|
|
|
|
|
deno_error = "0.7"
|
|
|
|
|
tempfile = "3"
|
|
|
|
|
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
|
|
|
|
|
uuid = { version = "1", features = ["v4"] }
|
2026-03-21 22:21:14 +00:00
|
|
|
base64 = "0.22"
|
|
|
|
|
rusqlite = { version = "0.32", features = ["bundled"] }
|
2026-03-23 01:42:40 +00:00
|
|
|
futures = "0.3"
|
feat(code): gRPC server with JWT auth + tool routing
tonic 0.14 gRPC server for sunbeam code sessions:
- bidirectional streaming Session RPC
- JWT interceptor validates tokens against Hydra JWKS
- tool router classifies calls as client-side (file_read, bash,
grep, etc.) or server-side (gitea, identity, search, etc.)
- service stub with session lifecycle (start, chat, tool results, end)
- coding_model config (default: devstral-small-2506)
- grpc config section (listen_addr, jwks_url)
- 182 tests (5 new: JWT claims, tool routing)
phase 2 TODOs: Matrix room bridge, Mistral agent loop, streaming
2026-03-23 11:35:37 +00:00
|
|
|
tonic = "0.14"
|
|
|
|
|
tonic-prost = "0.14"
|
|
|
|
|
prost = "0.14"
|
|
|
|
|
tokio-stream = "0.1"
|
|
|
|
|
jsonwebtoken = "9"
|
2026-03-23 17:40:25 +00:00
|
|
|
tokenizers = { version = "0.22", default-features = false, features = ["onig", "http"] }
|
feat: Gitea repo indexing via gRPC ReindexCode endpoint
Gitea indexer (code_index/gitea.rs):
- Walks repos via GiteaClient API (list repos → traverse dirs → fetch files)
- Base64 decodes file content from Gitea API responses
- Extracts symbols with tree-sitter (Rust, TypeScript, Python)
- Indexes to sol_code OpenSearch index with repo/branch/source metadata
- Skips hidden dirs, vendor, node_modules, files >100KB
- delete_branch() for clean re-indexing
Server-side tree-sitter (code_index/symbols.rs):
- Full symbol extraction shared with CLI client
- extract_symbols(), extract_project_symbols(), detect_language()
gRPC ReindexCode RPC:
- ReindexCodeRequest: org, repo, branch (all optional filters)
- ReindexCodeResponse: repos_indexed, symbols_indexed, error
- Uses ToolRegistry's GiteaClient (already authenticated)
- Creates sol_code index if not exists
ToolRegistry.gitea_client() accessor for reindex endpoint.
2026-03-24 09:36:42 +00:00
|
|
|
tree-sitter = "0.24"
|
|
|
|
|
tree-sitter-rust = "0.23"
|
|
|
|
|
tree-sitter-typescript = "0.23"
|
|
|
|
|
tree-sitter-python = "0.23"
|
feat(code): gRPC server with JWT auth + tool routing
tonic 0.14 gRPC server for sunbeam code sessions:
- bidirectional streaming Session RPC
- JWT interceptor validates tokens against Hydra JWKS
- tool router classifies calls as client-side (file_read, bash,
grep, etc.) or server-side (gitea, identity, search, etc.)
- service stub with session lifecycle (start, chat, tool results, end)
- coding_model config (default: devstral-small-2506)
- grpc config section (listen_addr, jwks_url)
- 182 tests (5 new: JWT claims, tool routing)
phase 2 TODOs: Matrix room bridge, Mistral agent loop, streaming
2026-03-23 11:35:37 +00:00
|
|
|
|
2026-03-23 20:54:28 +00:00
|
|
|
[dev-dependencies]
|
|
|
|
|
dotenv = "0.15"
|
|
|
|
|
|
feat(code): gRPC server with JWT auth + tool routing
tonic 0.14 gRPC server for sunbeam code sessions:
- bidirectional streaming Session RPC
- JWT interceptor validates tokens against Hydra JWKS
- tool router classifies calls as client-side (file_read, bash,
grep, etc.) or server-side (gitea, identity, search, etc.)
- service stub with session lifecycle (start, chat, tool results, end)
- coding_model config (default: devstral-small-2506)
- grpc config section (listen_addr, jwks_url)
- 182 tests (5 new: JWT claims, tool routing)
phase 2 TODOs: Matrix room bridge, Mistral agent loop, streaming
2026-03-23 11:35:37 +00:00
|
|
|
[build-dependencies]
|
|
|
|
|
tonic-build = "0.14"
|
|
|
|
|
tonic-prost-build = "0.14"
|