feat: introduce Claude agent guidelines for code generation and project configuration across various modules.u

This commit is contained in:
2026-01-20 14:31:13 +00:00
parent 46274ff222
commit a4f148ace0
66 changed files with 5555 additions and 262 deletions

View 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."""
...

View File

@@ -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."""
...

View 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."""
...

View 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

View 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."""
...

View 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."""
...

View 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."""
...