2026-03-21 15:51:31 +00:00
|
|
|
FROM rust:latest AS deps
|
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
|
|
|
WORKDIR /build
|
|
|
|
|
|
2026-03-21 15:51:31 +00:00
|
|
|
# Copy dependency manifests and vendored crates first (cached layer)
|
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
|
COPY vendor/ vendor/
|
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
|
|
|
|
2026-03-21 15:51:31 +00:00
|
|
|
# Set up vendored dependency resolution
|
|
|
|
|
RUN mkdir -p .cargo && \
|
|
|
|
|
printf '[registries.sunbeam]\nindex = "sparse+https://src.sunbeam.pt/api/packages/studio/cargo/"\n\n[source.crates-io]\nreplace-with = "vendored-sources"\n\n[source."sparse+https://src.sunbeam.pt/api/packages/studio/cargo/"]\nregistry = "sparse+https://src.sunbeam.pt/api/packages/studio/cargo/"\nreplace-with = "vendored-sources"\n\n[source.vendored-sources]\ndirectory = "vendor/"\n' \
|
|
|
|
|
> .cargo/config.toml
|
|
|
|
|
|
|
|
|
|
# Build deps only with a dummy main.rs — this layer is cached until Cargo.toml/vendor change
|
|
|
|
|
RUN mkdir -p src && echo "fn main(){}" > src/main.rs && \
|
|
|
|
|
cargo build --release --target x86_64-unknown-linux-gnu && \
|
|
|
|
|
rm src/main.rs && rm target/x86_64-unknown-linux-gnu/release/sol
|
|
|
|
|
|
|
|
|
|
FROM deps AS builder
|
|
|
|
|
|
|
|
|
|
# Copy actual source — only Sol code recompiles, deps are cached
|
|
|
|
|
COPY src/ src/
|
|
|
|
|
|
|
|
|
|
# Touch source to ensure cargo detects changes (COPY preserves host mtimes)
|
|
|
|
|
RUN find src/ -name '*.rs' -exec touch {} + && \
|
|
|
|
|
cargo build --release --target x86_64-unknown-linux-gnu
|
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
|
|
|
|
|
|
|
|
FROM gcr.io/distroless/cc-debian12:nonroot
|
|
|
|
|
COPY --from=builder /build/target/x86_64-unknown-linux-gnu/release/sol /
|
|
|
|
|
ENTRYPOINT ["/sol"]
|