Adapt to upstream API changes:
- Handle the new ImageModel::GptImage2 variant in image-model match arms
- ImageSize dropped Copy (gained an Other(String) variant), so clone it
Supersedes #170.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
matrix-sdk 0.18.0 introduces no breaking changes that affect baibot, but
it does require a matching mxlink release: mxlink 1.14.0 pins matrix-sdk
0.17.0, so without bumping mxlink the two matrix-sdk versions conflict.
mxlink 1.15.0 (released alongside this) tracks matrix-sdk 0.18.0, so we
bump the floor to >=1.15.0.
Verified locally: cargo build and the full test suite pass.
Supersedes Renovate PR #161.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes#137. The 0.36 -> 0.38 bump (skipping 0.37) introduces Tower-based
middleware support and a fix to the ReasoningItem `type` field, but
neither affects baibot's call sites — no code adaptation was needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
matrix-sdk 0.17.0 brings a few breaking API changes that we adapt to:
- Drop the `native-tls` feature on matrix-sdk; it was removed upstream
in 2026-04 (matrix-sdk now hardwires rustls). The previous workaround
comment referencing rust-mxlink issue #1 is no longer relevant.
- `Relation::Reply` is now a tuple variant wrapping a `Reply` struct;
pattern matches updated to bind through `reply.in_reply_to.event_id`.
Also bumps the Rust toolchain from 1.93.0 to 1.95.0 (closes#85, which
proposed the Dockerfile bump in isolation). rustc 1.94+ trips a
query-depth overflow when computing async layouts in the matrix-sdk
timeline future graph; matrix-rust-sdk PR #6489 raises the limit, but
\`recursion_limit\` is per-crate, so we repeat \`#![recursion_limit = "256"]\`
on this crate root.
Bumps the mxlink floor to 1.14.0, which carries the matching adapter.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add the 1.15.0 changelog entry covering access-token authentication support, Rust 1.93.0 toolchain pinning, docs updates, and dependency updates. Bump crate version to 1.15.0 in Cargo.toml and Cargo.lock.
* Add support for access tokens using MAS
* use 1.13.0
* Update dependencies
* Harden auth credential selection in matrix link init
Use the same non-empty access-token criterion for auth mode selection and bind the token directly from the branch condition.
Return explicit configuration errors for missing or empty `device_id`/`password` instead of panicking, so invalid auth config fails gracefully.
* Centralize and harden user auth config handling
Move authentication-mode resolution into typed config parsing with ConfigUserAuth,
so downstream login setup consumes validated credentials instead of re-checking raw optional fields.
Enforce explicit password-vs-token selection, validate token/device/user-id requirements in one place,
and normalize empty auth env overrides to unset values for consistent behavior across YAML and environment input.
* Add auth config unit tests
Move auth_config tests into a dedicated cfg test module file to keep production config code compact while preserving behavior coverage. The tests cover password/token mode selection, missing/both auth method rejection, missing device_id, and empty-value handling.
* Use conventional mxlink version requirement
Replace the unconventional wildcard lower-bound expression with a standard semver lower bound for readability and tooling consistency.
---------
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
serde_yaml is deprecated and unmaintained. serde_yaml_ng is the community
fork with a compatible API, so this is a straightforward rename across the
codebase.
This is based on the work done in https://github.com/etkecc/baibot/pull/60 by https://github.com/Fmstrat (Ben Curtis),
with various changes on top to make the code more idiomatic and flexible.
This commit squashes the following patches (newest first):
- Improve handling of `user.avatar` configuration (null & empty string being the same now) and add support for a special `keep` value
- Minor import reordering
- Simplify avatar configuration (`user.avatar.source` -> `user.avatar`)
- Combine `logo_bytes` and `mime_type` determination logic and do not fall back to default avatar if reading the custom avatar file fails
- Switch from deprecated `mime_guess::guess_mime_type(avatar_path)` to `mime_guess::from_path(avatar_path).first_or_octet_stream()`
- Relax `mime_guess` constraint and order alphabetically
- Use `mime` from `mxlink`
- Add mime-type support and switch to user.avatar.source
- (Original work by Fmstrat) Add support for custom avatars
Co-authored-by: Fmstrat <nospam@nowsci.com>
Switches `async-openai` from our own etkecc fork (0.28.1-patched) to the
official crates.io version 0.31.1.
We adapt to async-openai's types reorganization and making use of crate
features to only enable what we need.