Apply patch [skip ci]

This commit is contained in:
open-swe[bot]
2025-08-22 13:11:14 +00:00
parent 4566b2aed4
commit 4c04e023c8
@@ -992,6 +992,17 @@ class InjectedState(InjectedToolArg):
class InjectedStore(InjectedToolArg):
"""Annotation for injecting persistent store into tool arguments.
.. deprecated:: 0.2.0
Use reserved keyword 'runtime' instead of InjectedStore annotation.
The annotation-based approach will be removed in a future version.
Instead of:
def tool(x: int, store: Annotated[BaseStore, InjectedStore()]) -> str:
Use:
def tool(x: int, runtime) -> str:
# Access store via runtime.store
This annotation enables tools to access LangGraph's persistent storage system
without exposing storage details to the language model. Tools annotated with
InjectedStore receive the store instance automatically during execution while
@@ -1329,3 +1340,4 @@ def _get_runtime_arg(tool: BaseTool) -> Optional[str]: