fix(rust-client): async CA file read; typed ping/session-state/worker-info/drain-events

This commit is contained in:
Joseph Doherty
2026-10-22 06:09:51 -04:00
parent 488649ce99
commit 0345726a79
7 changed files with 265 additions and 29 deletions
+12
View File
@@ -178,6 +178,18 @@ redaction. Per-item bulk failures are reported inside each result entry
`invoke_raw` / `client.invoke_raw` escape hatch performs neither check and
returns the unvalidated reply.
### Diagnostic commands
`Session` wraps the worker diagnostic commands as typed calls: `ping(message)`
(returns `()` on success), `get_session_state()` (returns `SessionState`),
`get_worker_info()` (returns `WorkerInfoReply`: pid, version, MXAccess
ProgID/CLSID) and `drain_events(max_events)` (returns `Vec<MxEvent>`; the reply
is bounded server-side, so drain until an empty result). A reply missing its
expected payload surfaces as `Error::MalformedReply`.
TLS note: `ClientOptions::with_ca_file` is read asynchronously (`tokio::fs`)
during `connect`, so connecting no longer blocks the executor thread.
## Event Streaming And Reconnect-Replay Gaps
`session.events()` / `session.events_after(after_worker_sequence)` (and the