feat(graph): Extend AgentState with checklist, current_step, and vfs
This commit is contained in:
@@ -34,3 +34,13 @@ class AgentState(AS):
|
|||||||
|
|
||||||
# Number of execution attempts
|
# Number of execution attempts
|
||||||
iterations: int
|
iterations: int
|
||||||
|
|
||||||
|
# --- DeepAgents Extensions ---
|
||||||
|
# High-level plan/checklist: List of Task objects (dicts)
|
||||||
|
checklist: List[Dict[str, Any]]
|
||||||
|
|
||||||
|
# Current active step in the checklist
|
||||||
|
current_step: int
|
||||||
|
|
||||||
|
# Virtual File System (VFS): Map of filenames to content/metadata
|
||||||
|
vfs: Dict[str, Any]
|
||||||
|
|||||||
15
backend/tests/test_state_extensions.py
Normal file
15
backend/tests/test_state_extensions.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from typing import get_type_hints, List, Dict, Any
|
||||||
|
from ea_chatbot.graph.state import AgentState
|
||||||
|
|
||||||
|
def test_agent_state_extensions():
|
||||||
|
"""Verify that AgentState has the new DeepAgents fields."""
|
||||||
|
hints = get_type_hints(AgentState)
|
||||||
|
|
||||||
|
assert "checklist" in hints
|
||||||
|
# checklist: List[Dict[str, Any]] (or similar for tasks)
|
||||||
|
|
||||||
|
assert "current_step" in hints
|
||||||
|
assert hints["current_step"] == int
|
||||||
|
|
||||||
|
assert "vfs" in hints
|
||||||
|
# vfs: Dict[str, Any]
|
||||||
Reference in New Issue
Block a user