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
{{ message }}
Repository navigation
Commit 435012e
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Python: add public TypedDict for AgentExecutor checkpoint state (#8201) (#8284)
* Python: add public TypedDict for AgentExecutor checkpoint state (#8201)
Expose AgentExecutorCheckpointState / AgentSessionCheckpointState, validate restore field types, and cover partial/malformed/forward-compatible payloads.
* fix(checkpoint): address #8284 review on session TypedDict ownership (#1)
- Define AgentSessionDict on AgentSession (to_dict return) so the shape is
not duplicated in AgentExecutor; keep AgentSessionCheckpointState as alias.
- Include ServiceSessionId mapping in service_session_id.
- Type on_checkpoint_restore as AgentExecutorCheckpointState only.
- Sync root stub exports (__init__.pyi) with runtime __all__.
* fix(checkpoint): validate AgentExecutor restore element types (#8284)
Enforce Message/Content element types, string pending-request keys, and
required agent_session.session_id so malformed checkpoints fail at restore.
* fix(checkpoint): validate AgentSessionDict fields on restore
- Validate agent_session.state / service_session_id types
- Raise WorkflowCheckpointException when session restore fails
- Drop unshipped AgentSessionCheckpointState alias; use AgentSessionDict
* fix(checkpoint): keep session/executor checkpoint payloads as dict
TypedDict schemas remain public for documentation and validation, but to_dict and on_checkpoint_save/restore stay dict[str, Any] so subclasses, samples, and pyright stay compatible.
* fix(checkpoint): keep AgentSessionDict optional keys under postponed annotations
Use a required base plus total=False subclass, stop exporting AgentSessionDict from the public package root, and tighten AgentExecutor restore validation with walrus checks.
---------
Co-authored-by: minelhi <[email protected]>
Co-authored-by: LI <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
Co-authored-by: Eduard van Valkenburg <[email protected]>
0 commit comments