feat: introduce Claude agent guidelines for code generation and project configuration across various modules.u
This commit is contained in:
16
typings/langgraph-stubs/langgraph/checkpoint/base.pyi
Normal file
16
typings/langgraph-stubs/langgraph/checkpoint/base.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
# Type stubs for langgraph.checkpoint.base
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
class BaseCheckpointSaver(ABC):
|
||||
"""Base class for checkpoint savers."""
|
||||
|
||||
@abstractmethod
|
||||
async def aget_tuple(self, config: Dict[str, Any]) -> Optional[Any]:
|
||||
"""Get a checkpoint tuple asynchronously."""
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def aput_tuple(self, config: Dict[str, Any], checkpoint: Any, metadata: Any) -> None:
|
||||
"""Put a checkpoint tuple asynchronously."""
|
||||
...
|
||||
@@ -0,0 +1,16 @@
|
||||
# Type stubs for langgraph.checkpoint.postgres.aio
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from ..base import BaseCheckpointSaver
|
||||
|
||||
class AsyncPostgresSaver(BaseCheckpointSaver):
|
||||
"""Async PostgreSQL checkpoint saver."""
|
||||
|
||||
def __init__(self, conn: Any) -> None: ...
|
||||
async def aget_tuple(self, config: Dict[str, Any]) -> Optional[Any]:
|
||||
"""Get a checkpoint tuple asynchronously."""
|
||||
...
|
||||
|
||||
async def aput_tuple(self, config: Dict[str, Any], checkpoint: Any, metadata: Any) -> None:
|
||||
"""Put a checkpoint tuple asynchronously."""
|
||||
...
|
||||
73
typings/langgraph-stubs/langgraph/graph/__init__.pyi
Normal file
73
typings/langgraph-stubs/langgraph/graph/__init__.pyi
Normal file
@@ -0,0 +1,73 @@
|
||||
# Type stubs for langgraph
|
||||
from typing import Any, Dict, Generic, List, Optional, TypeVar, Union
|
||||
|
||||
# Type variables for generic types
|
||||
T = TypeVar("T")
|
||||
S = TypeVar("S")
|
||||
|
||||
# Constants
|
||||
END: str = "__end__"
|
||||
START: str = "__start__"
|
||||
|
||||
class CompiledStateGraph(Generic[T]):
|
||||
"""Compiled state graph with async invocation support."""
|
||||
|
||||
async def ainvoke(
|
||||
self,
|
||||
input: T,
|
||||
config: Optional[Dict[str, Any]] = None,
|
||||
*,
|
||||
context: Optional[Any] = None,
|
||||
stream_mode: str = "values",
|
||||
print_mode: Union[str, List[str]] = "values",
|
||||
output_keys: Optional[Union[str, List[str]]] = None,
|
||||
interrupt_before: Optional[Union[str, List[str]]] = None,
|
||||
interrupt_after: Optional[Union[str, List[str]]] = None,
|
||||
durability: Optional[str] = None,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]:
|
||||
"""Invoke the graph asynchronously."""
|
||||
...
|
||||
|
||||
def invoke(
|
||||
self,
|
||||
input: T,
|
||||
config: Optional[Dict[str, Any]] = None,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]:
|
||||
"""Invoke the graph synchronously."""
|
||||
...
|
||||
|
||||
class StateGraph(Generic[T]):
|
||||
"""State graph builder."""
|
||||
|
||||
def __init__(self, state_schema: Any) -> None: ...
|
||||
def add_node(self, name: str, node: Any) -> None:
|
||||
"""Add a node to the graph."""
|
||||
...
|
||||
|
||||
def add_edge(self, start: str, end: str) -> None:
|
||||
"""Add an edge between nodes."""
|
||||
...
|
||||
|
||||
def add_conditional_edges(
|
||||
self,
|
||||
source: str,
|
||||
path: Any,
|
||||
path_map: Optional[Dict[str, str]] = None,
|
||||
**kwargs: Any,
|
||||
) -> None:
|
||||
"""Add conditional edges."""
|
||||
...
|
||||
|
||||
def set_entry_point(self, entry_point: str) -> None:
|
||||
"""Set the entry point of the graph."""
|
||||
...
|
||||
|
||||
def set_finish_point(self, finish_point: str) -> None:
|
||||
"""Set the finish point of the graph."""
|
||||
...
|
||||
|
||||
def compile(self, checkpointer: Optional[Any] = None) -> CompiledStateGraph[T]:
|
||||
"""Compile the graph."""
|
||||
...
|
||||
9
typings/langgraph-stubs/langgraph/graph/state.pyi
Normal file
9
typings/langgraph-stubs/langgraph/graph/state.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
# Type stubs for langgraph.graph.state
|
||||
from typing import TypeVar
|
||||
|
||||
from . import CompiledStateGraph
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
# Re-export CompiledStateGraph for convenience
|
||||
CompiledStateGraph = CompiledStateGraph
|
||||
17
typings/langgraph-stubs/langgraph/types.pyi
Normal file
17
typings/langgraph-stubs/langgraph/types.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
# Type stubs for langgraph.types
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
class Command(Generic[T]):
|
||||
"""Command type for interrupting graph execution."""
|
||||
|
||||
def __init__(self, value: T, **kwargs: Any) -> None: ...
|
||||
@property
|
||||
def value(self) -> T:
|
||||
"""Get the command value."""
|
||||
...
|
||||
|
||||
def interrupt(value: T, **kwargs: Any) -> Command[T]:
|
||||
"""Create an interrupt command."""
|
||||
...
|
||||
33
typings/langgraph/graph/state.pyi
Normal file
33
typings/langgraph/graph/state.pyi
Normal file
@@ -0,0 +1,33 @@
|
||||
# Type stubs for langgraph.graph.state
|
||||
from typing import Any, Dict, Generic, List, Optional, TypeVar, Union
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
class CompiledStateGraph(Generic[T]):
|
||||
"""Compiled state graph with async invocation support."""
|
||||
|
||||
async def ainvoke(
|
||||
self,
|
||||
input: T,
|
||||
config: Optional[Dict[str, Any]] = None,
|
||||
*,
|
||||
context: Optional[Any] = None,
|
||||
stream_mode: str = "values",
|
||||
print_mode: Union[str, List[str]] = "values",
|
||||
output_keys: Optional[Union[str, List[str]]] = None,
|
||||
interrupt_before: Optional[Union[str, List[str]]] = None,
|
||||
interrupt_after: Optional[Union[str, List[str]]] = None,
|
||||
durability: Optional[str] = None,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]:
|
||||
"""Invoke the graph asynchronously."""
|
||||
...
|
||||
|
||||
def invoke(
|
||||
self,
|
||||
input: T,
|
||||
config: Optional[Dict[str, Any]] = None,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]:
|
||||
"""Invoke the graph synchronously."""
|
||||
...
|
||||
17
typings/langgraph/types.pyi
Normal file
17
typings/langgraph/types.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
# Type stubs for langgraph.types
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
class Command(Generic[T]):
|
||||
"""Command type for interrupting graph execution."""
|
||||
|
||||
def __init__(self, value: T, **kwargs: Any) -> None: ...
|
||||
@property
|
||||
def value(self) -> T:
|
||||
"""Get the command value."""
|
||||
...
|
||||
|
||||
def interrupt(value: T, **kwargs: Any) -> Command[T]:
|
||||
"""Create an interrupt command."""
|
||||
...
|
||||
Reference in New Issue
Block a user