You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds #[non_exhaustive] to the 10 remaining public configuration types
that didn't already carry the attribute:
- SessionConfig
- ResumeSessionConfig
- ClientOptions
- ProviderConfig
- McpServerConfig
- Tool
- CustomAgentConfig
- InfiniteSessionConfig
- SystemMessageConfig
- ConnectionState
HookEvent, HookOutput, MessageOptions, TelemetryConfig, SessionFsConfig,
FsError, FileInfo, DirEntry, ToolInvocation, Error, Transport, and the
new DeliveryMode were already marked. Closing the asymmetry now means
adding fields to any of these post-1.0 is non-breaking on consumers that
construct via Default::default() plus field assignment or the with_*
builders.
Tradeoff: external crates can no longer use struct-literal syntax for
these types -- not even with ..Default::default(), which only works
inside the defining crate. Tests, examples, and the tool_parameters
doctest are migrated to the let-mut + field-assignment pattern. Callers
porting from 0.1.0-* will see the same compile error and apply the same
mechanical transform.
CHANGELOG entry under Configuration parity.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments