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.
15 lines
504 B
Docker
15 lines
504 B
Docker
FROM rust:1.86 AS builder
|
|
WORKDIR /build
|
|
|
|
# Configure Sunbeam Cargo registry (Gitea) — anonymous read access
|
|
RUN mkdir -p /usr/local/cargo/registry && \
|
|
printf '[registries.sunbeam]\nindex = "sparse+https://src.sunbeam.pt/api/packages/studio/cargo/"\n' \
|
|
>> /usr/local/cargo/config.toml
|
|
|
|
COPY . .
|
|
RUN cargo build --release --target x86_64-unknown-linux-gnu
|
|
|
|
FROM gcr.io/distroless/cc-debian12:nonroot
|
|
COPY --from=builder /build/target/x86_64-unknown-linux-gnu/release/sol /
|
|
ENTRYPOINT ["/sol"]
|