1111limitations under the License.
1212"""
1313
14- """Dapr state store session manager for distributed storage."""
15-
1614import json
1715import logging
1816from typing import Any , Dict , List , Literal , Optional , cast
@@ -62,7 +60,6 @@ def __init__(
6260 dapr_client: DaprClient instance for state operations.
6361 ttl: Optional time-to-live in seconds for state items.
6462 consistency: Consistency level for state operations ("eventual" or "strong").
65- **kwargs: Additional keyword arguments for future extensibility.
6663 """
6764 self ._state_store_name = state_store_name
6865 self ._dapr_client = dapr_client
@@ -85,15 +82,12 @@ def from_address(
8582 session_id: ID for the session.
8683 state_store_name: Name of the Dapr state store component.
8784 dapr_address: Dapr gRPC endpoint (default: localhost:50001).
88- **kwargs: Additional arguments passed to __init__ (ttl, consistency, etc.).
8985
9086 Returns:
9187 DaprSessionManager instance with owned client.
9288 """
9389 dapr_client = DaprClient (address = dapr_address )
94- manager = cls (
95- session_id , state_store_name = state_store_name , dapr_client = dapr_client , ** kwargs
96- )
90+ manager = cls (session_id , state_store_name = state_store_name , dapr_client = dapr_client )
9791 manager ._owns_client = True
9892 return manager
9993
@@ -255,7 +249,6 @@ def _delete_state(self, key: str) -> None:
255249 except Exception as e :
256250 raise SessionException (f'Failed to delete state key { key } : { e } ' ) from e
257251
258-
259252 def create_session (self , session : Session ) -> Session :
260253 """Create a new session.
261254
@@ -394,7 +387,10 @@ def update_agent(self, session_id: str, session_agent: SessionAgent) -> None:
394387 self ._write_state (agent_key , session_agent .to_dict ())
395388
396389 def create_message (
397- self , session_id : str , agent_id : str , session_message : SessionMessage ,
390+ self ,
391+ session_id : str ,
392+ agent_id : str ,
393+ session_message : SessionMessage ,
398394 ) -> None :
399395 """Create a new message for the agent.
400396
@@ -432,7 +428,6 @@ def read_message(
432428 session_id: ID of the session.
433429 agent_id: ID of the agent.
434430 message_id: Index of the message.
435- **kwargs: Additional keyword arguments for future extensibility.
436431
437432 Returns:
438433 SessionMessage if found, None otherwise.
0 commit comments