langgraph-executor 0.0.1a3__tar.gz → 0.0.1a5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/PKG-INFO +1 -1
- langgraph_executor-0.0.1a5/langgraph_executor/__init__.py +1 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/executor_base.py +17 -3
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/extract_graph.py +2 -2
- langgraph_executor-0.0.1a3/langgraph_executor/__init__.py +0 -1
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/.gitignore +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/README.md +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/common.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/example.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/execute_task.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/executor.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/info_logger.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/__init__.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2_grpc.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2_grpc.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2_grpc.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2_grpc.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2_grpc.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2_grpc.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2_grpc.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2_grpc.pyi +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/py.typed +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/server.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/setup.sh +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/stream_utils.py +0 -0
- {langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/pyproject.toml +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.0.1a5"
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/executor_base.py
RENAMED
@@ -3,7 +3,14 @@ import contextlib
|
|
3
3
|
import functools
|
4
4
|
import logging
|
5
5
|
import uuid
|
6
|
-
from collections.abc import
|
6
|
+
from collections.abc import (
|
7
|
+
AsyncIterator,
|
8
|
+
Awaitable,
|
9
|
+
Callable,
|
10
|
+
Collection,
|
11
|
+
Iterator,
|
12
|
+
Sequence,
|
13
|
+
)
|
7
14
|
from typing import Any, Protocol, cast
|
8
15
|
|
9
16
|
import grpc
|
@@ -17,6 +24,7 @@ from langgraph.pregel import Pregel
|
|
17
24
|
from langgraph.pregel._algo import apply_writes
|
18
25
|
from langgraph.pregel._checkpoint import channels_from_checkpoint
|
19
26
|
from langgraph.pregel._retry import arun_with_retry
|
27
|
+
from langgraph.store.base import BaseStore
|
20
28
|
from langgraph.types import PregelExecutableTask
|
21
29
|
|
22
30
|
from langgraph_executor.common import (
|
@@ -74,6 +82,7 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
|
|
74
82
|
]
|
75
83
|
| None = None,
|
76
84
|
on_custom: Callable[[Any], None] | None = None,
|
85
|
+
get_store: Callable[[], Awaitable[BaseStore]] | None = None,
|
77
86
|
):
|
78
87
|
"""Initialize the servicer with compiled graphs.
|
79
88
|
|
@@ -93,6 +102,7 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
|
|
93
102
|
self._graph_definition_cache: dict[str, executor_pb2.GetGraphResponse] = {}
|
94
103
|
self.on_message = on_message
|
95
104
|
self.on_custom = on_custom
|
105
|
+
self.get_store = get_store
|
96
106
|
|
97
107
|
async def ListGraphs(
|
98
108
|
self, request: Any, context: grpc.aio.ServicerContext
|
@@ -119,7 +129,7 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
|
|
119
129
|
if (resp := self._graph_definition_cache.get(name)) is not None:
|
120
130
|
return resp
|
121
131
|
async with self.get_graph(name, RunnableConfig()) as graph:
|
122
|
-
graph_definition = extract_graph(graph)
|
132
|
+
graph_definition = extract_graph(graph, name=name)
|
123
133
|
|
124
134
|
resp = executor_pb2.GetGraphResponse(
|
125
135
|
graph_definition=graph_definition,
|
@@ -185,6 +195,7 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
|
|
185
195
|
try:
|
186
196
|
request = await _get_init_request(request_iterator)
|
187
197
|
config = reconstruct_config(request.task.config)
|
198
|
+
store = await self.get_store() if self.get_store is not None else None
|
188
199
|
async with self.get_graph(request.graph_name, config) as graph:
|
189
200
|
stream_messages = "messages" in request.stream_modes
|
190
201
|
stream_custom = "custom" in request.stream_modes
|
@@ -200,7 +211,10 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
|
|
200
211
|
)
|
201
212
|
|
202
213
|
task = reconstruct_task(
|
203
|
-
request,
|
214
|
+
request,
|
215
|
+
graph,
|
216
|
+
custom_stream_writer=custom_stream_writer,
|
217
|
+
store=store,
|
204
218
|
)
|
205
219
|
if stream_messages:
|
206
220
|
# Create and inject callback handler
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/extract_graph.py
RENAMED
@@ -117,14 +117,14 @@ def extract_trigger_to_nodes(
|
|
117
117
|
return trigger_map
|
118
118
|
|
119
119
|
|
120
|
-
def extract_graph(graph: Pregel) -> graph_pb2.GraphDefinition:
|
120
|
+
def extract_graph(graph: Pregel, name: str | None = None) -> graph_pb2.GraphDefinition:
|
121
121
|
"""Extract graph information from a compiled LangGraph graph.
|
122
122
|
|
123
123
|
Returns a protobuf message that contains all relevant orchestration information about the graph
|
124
124
|
"""
|
125
125
|
# Handle input_channels and output_channels oneof
|
126
126
|
graph_def = graph_pb2.GraphDefinition(
|
127
|
-
name=str(graph.name),
|
127
|
+
name=name or str(graph.name),
|
128
128
|
channels=extract_channels(graph.channels),
|
129
129
|
interrupt_before_nodes=list(graph.interrupt_before_nodes),
|
130
130
|
interrupt_after_nodes=list(graph.interrupt_after_nodes),
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.0.1a3"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/execute_task.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/executor_pb2_grpc.py
RENAMED
File without changes
|
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2_grpc.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/graph_pb2_grpc.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2_grpc.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/runtime_pb2_grpc.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2.pyi
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2_grpc.py
RENAMED
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/pb/types_pb2_grpc.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langgraph_executor-0.0.1a3 → langgraph_executor-0.0.1a5}/langgraph_executor/stream_utils.py
RENAMED
File without changes
|
File without changes
|