AgentCheckpointDataSerializer

Custom serializer for AgentCheckpointData that adds backward compatibility with the pre-refactoring format, where AgentCheckpointData.nodePath, AgentCheckpointData.lastInput, and AgentCheckpointData.lastOutput were top-level fields instead of entries in AgentCheckpointData.properties.

Old format: { "checkpointId": ..., "nodePath": "x", "lastOutput": "y", "messageHistory": [...], ... } New format: { "checkpointId": ..., "messageHistory": [...], "properties": { "nodePath": "x", "lastOutput": "y", ... }, ... }

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
override fun deserialize(decoder: Decoder): AgentCheckpointData
Link copied to clipboard
fun isOldFormat(jsonString: String): Boolean

Returns true if jsonString was produced by the old AgentCheckpointData format, where nodePath, lastInput, and lastOutput appeared as top-level JSON fields.

Link copied to clipboard
override fun serialize(encoder: Encoder, value: AgentCheckpointData)