Release Notes - v1.18.2
Highlights
- Continuation-safe agent state persistence with new serialization helpers.
- MessageStore serialization is now round-trip safe and section-aware.
- Metadata preservation fixes for slim agent state snapshots.
Behavior Changes
MessageStore toArray Structure
MessageStore::toArray()now returns a structured payload withsectionsandparametersinstead of a flat messages list.- Use
MessageStore::toFlatArray()to obtain the previous flat messages array format.
New Features
Agent Continuation APIs
- Added
AgentState::withUserMessage()for multi-turn continuation. - Added
AgentState::forContinuation()to reset execution state (steps, cache, usage, timing) while preserving conversation history.
Continuation Serializer
- Added
ContinuationAgentStateSerializerwithContinuationSerializationConfigto persist multi-turn state with retention limits. - Supports truncation, tool-result omission, and tool-arg redaction while preserving
_metadata.
Bug Fixes
Metadata Preservation
SlimAgentStateSerializernow emits_metadata(withmetadataalias support) so tool calls/results survive round-trips.MessageInput::fromArray()now acceptsmetadataas a fallback alias for_metadata.
Serialization Round-Trip
- MessageStore serialization now round-trips sections, messages, and parameters without data loss.
Tests
- Added round-trip tests for MessageStore and continuation serialization.
- Added AgentState continuation tests covering reset semantics and message appending.