langgraph-executor 0.0.1a0__py3-none-any.whl
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/__init__.py +1 -0
- langgraph_executor/common.py +395 -0
- langgraph_executor/example.py +29 -0
- langgraph_executor/execute_task.py +239 -0
- langgraph_executor/executor.py +341 -0
- langgraph_executor/extract_graph.py +178 -0
- langgraph_executor/info_logger.py +111 -0
- langgraph_executor/pb/__init__.py +0 -0
- langgraph_executor/pb/executor_pb2.py +79 -0
- langgraph_executor/pb/executor_pb2.pyi +415 -0
- langgraph_executor/pb/executor_pb2_grpc.py +321 -0
- langgraph_executor/pb/executor_pb2_grpc.pyi +150 -0
- langgraph_executor/pb/graph_pb2.py +55 -0
- langgraph_executor/pb/graph_pb2.pyi +230 -0
- langgraph_executor/pb/graph_pb2_grpc.py +24 -0
- langgraph_executor/pb/graph_pb2_grpc.pyi +17 -0
- langgraph_executor/pb/runtime_pb2.py +68 -0
- langgraph_executor/pb/runtime_pb2.pyi +364 -0
- langgraph_executor/pb/runtime_pb2_grpc.py +322 -0
- langgraph_executor/pb/runtime_pb2_grpc.pyi +151 -0
- langgraph_executor/pb/types_pb2.py +144 -0
- langgraph_executor/pb/types_pb2.pyi +1044 -0
- langgraph_executor/pb/types_pb2_grpc.py +24 -0
- langgraph_executor/pb/types_pb2_grpc.pyi +17 -0
- langgraph_executor/py.typed +0 -0
- langgraph_executor/server.py +186 -0
- langgraph_executor/setup.sh +29 -0
- langgraph_executor/stream_utils.py +96 -0
- langgraph_executor-0.0.1a0.dist-info/METADATA +14 -0
- langgraph_executor-0.0.1a0.dist-info/RECORD +31 -0
- langgraph_executor-0.0.1a0.dist-info/WHEEL +4 -0
@@ -0,0 +1,321 @@
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
3
|
+
import grpc
|
4
|
+
import warnings
|
5
|
+
|
6
|
+
from . import executor_pb2 as executor__pb2
|
7
|
+
|
8
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
9
|
+
GRPC_VERSION = grpc.__version__
|
10
|
+
_version_not_supported = False
|
11
|
+
|
12
|
+
try:
|
13
|
+
from grpc._utilities import first_version_is_lower
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
15
|
+
except ImportError:
|
16
|
+
_version_not_supported = True
|
17
|
+
|
18
|
+
if _version_not_supported:
|
19
|
+
raise RuntimeError(
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
21
|
+
+ f' but the generated code in executor_pb2_grpc.py depends on'
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
25
|
+
)
|
26
|
+
|
27
|
+
|
28
|
+
class LangGraphExecutorStub(object):
|
29
|
+
"""Main service for LangGraph runtime operations
|
30
|
+
"""
|
31
|
+
|
32
|
+
def __init__(self, channel):
|
33
|
+
"""Constructor.
|
34
|
+
|
35
|
+
Args:
|
36
|
+
channel: A grpc.Channel.
|
37
|
+
"""
|
38
|
+
self.ListGraphs = channel.unary_unary(
|
39
|
+
'/executor.LangGraphExecutor/ListGraphs',
|
40
|
+
request_serializer=executor__pb2.ListGraphsRequest.SerializeToString,
|
41
|
+
response_deserializer=executor__pb2.ListGraphsResponse.FromString,
|
42
|
+
_registered_method=True)
|
43
|
+
self.GetGraph = channel.unary_unary(
|
44
|
+
'/executor.LangGraphExecutor/GetGraph',
|
45
|
+
request_serializer=executor__pb2.GetGraphRequest.SerializeToString,
|
46
|
+
response_deserializer=executor__pb2.GetGraphResponse.FromString,
|
47
|
+
_registered_method=True)
|
48
|
+
self.ChannelsFromCheckpoint = channel.unary_unary(
|
49
|
+
'/executor.LangGraphExecutor/ChannelsFromCheckpoint',
|
50
|
+
request_serializer=executor__pb2.ChannelsFromCheckpointRequest.SerializeToString,
|
51
|
+
response_deserializer=executor__pb2.ChannelsFromCheckpointResponse.FromString,
|
52
|
+
_registered_method=True)
|
53
|
+
self.ExecuteTask = channel.stream_stream(
|
54
|
+
'/executor.LangGraphExecutor/ExecuteTask',
|
55
|
+
request_serializer=executor__pb2.ExecuteTaskRequest.SerializeToString,
|
56
|
+
response_deserializer=executor__pb2.ExecuteTaskResponse.FromString,
|
57
|
+
_registered_method=True)
|
58
|
+
self.ApplyWrites = channel.unary_unary(
|
59
|
+
'/executor.LangGraphExecutor/ApplyWrites',
|
60
|
+
request_serializer=executor__pb2.ApplyWritesRequest.SerializeToString,
|
61
|
+
response_deserializer=executor__pb2.ApplyWritesResponse.FromString,
|
62
|
+
_registered_method=True)
|
63
|
+
self.GenerateCacheKey = channel.unary_unary(
|
64
|
+
'/executor.LangGraphExecutor/GenerateCacheKey',
|
65
|
+
request_serializer=executor__pb2.GenerateCacheKeyRequest.SerializeToString,
|
66
|
+
response_deserializer=executor__pb2.GenerateCacheKeyResponse.FromString,
|
67
|
+
_registered_method=True)
|
68
|
+
|
69
|
+
|
70
|
+
class LangGraphExecutorServicer(object):
|
71
|
+
"""Main service for LangGraph runtime operations
|
72
|
+
"""
|
73
|
+
|
74
|
+
def ListGraphs(self, request, context):
|
75
|
+
"""List available graphs
|
76
|
+
"""
|
77
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
78
|
+
context.set_details('Method not implemented!')
|
79
|
+
raise NotImplementedError('Method not implemented!')
|
80
|
+
|
81
|
+
def GetGraph(self, request, context):
|
82
|
+
"""Get graph definition
|
83
|
+
"""
|
84
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
85
|
+
context.set_details('Method not implemented!')
|
86
|
+
raise NotImplementedError('Method not implemented!')
|
87
|
+
|
88
|
+
def ChannelsFromCheckpoint(self, request, context):
|
89
|
+
"""Get channels initialized from checkpoint
|
90
|
+
"""
|
91
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
92
|
+
context.set_details('Method not implemented!')
|
93
|
+
raise NotImplementedError('Method not implemented!')
|
94
|
+
|
95
|
+
def ExecuteTask(self, request_iterator, context):
|
96
|
+
"""Execute a node - bidirectional streaming for interactive execution
|
97
|
+
"""
|
98
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
99
|
+
context.set_details('Method not implemented!')
|
100
|
+
raise NotImplementedError('Method not implemented!')
|
101
|
+
|
102
|
+
def ApplyWrites(self, request, context):
|
103
|
+
"""Update channel values with writes
|
104
|
+
"""
|
105
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
106
|
+
context.set_details('Method not implemented!')
|
107
|
+
raise NotImplementedError('Method not implemented!')
|
108
|
+
|
109
|
+
def GenerateCacheKey(self, request, context):
|
110
|
+
"""Generate cache key for a node execution
|
111
|
+
"""
|
112
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
113
|
+
context.set_details('Method not implemented!')
|
114
|
+
raise NotImplementedError('Method not implemented!')
|
115
|
+
|
116
|
+
|
117
|
+
def add_LangGraphExecutorServicer_to_server(servicer, server):
|
118
|
+
rpc_method_handlers = {
|
119
|
+
'ListGraphs': grpc.unary_unary_rpc_method_handler(
|
120
|
+
servicer.ListGraphs,
|
121
|
+
request_deserializer=executor__pb2.ListGraphsRequest.FromString,
|
122
|
+
response_serializer=executor__pb2.ListGraphsResponse.SerializeToString,
|
123
|
+
),
|
124
|
+
'GetGraph': grpc.unary_unary_rpc_method_handler(
|
125
|
+
servicer.GetGraph,
|
126
|
+
request_deserializer=executor__pb2.GetGraphRequest.FromString,
|
127
|
+
response_serializer=executor__pb2.GetGraphResponse.SerializeToString,
|
128
|
+
),
|
129
|
+
'ChannelsFromCheckpoint': grpc.unary_unary_rpc_method_handler(
|
130
|
+
servicer.ChannelsFromCheckpoint,
|
131
|
+
request_deserializer=executor__pb2.ChannelsFromCheckpointRequest.FromString,
|
132
|
+
response_serializer=executor__pb2.ChannelsFromCheckpointResponse.SerializeToString,
|
133
|
+
),
|
134
|
+
'ExecuteTask': grpc.stream_stream_rpc_method_handler(
|
135
|
+
servicer.ExecuteTask,
|
136
|
+
request_deserializer=executor__pb2.ExecuteTaskRequest.FromString,
|
137
|
+
response_serializer=executor__pb2.ExecuteTaskResponse.SerializeToString,
|
138
|
+
),
|
139
|
+
'ApplyWrites': grpc.unary_unary_rpc_method_handler(
|
140
|
+
servicer.ApplyWrites,
|
141
|
+
request_deserializer=executor__pb2.ApplyWritesRequest.FromString,
|
142
|
+
response_serializer=executor__pb2.ApplyWritesResponse.SerializeToString,
|
143
|
+
),
|
144
|
+
'GenerateCacheKey': grpc.unary_unary_rpc_method_handler(
|
145
|
+
servicer.GenerateCacheKey,
|
146
|
+
request_deserializer=executor__pb2.GenerateCacheKeyRequest.FromString,
|
147
|
+
response_serializer=executor__pb2.GenerateCacheKeyResponse.SerializeToString,
|
148
|
+
),
|
149
|
+
}
|
150
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
151
|
+
'executor.LangGraphExecutor', rpc_method_handlers)
|
152
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
153
|
+
server.add_registered_method_handlers('executor.LangGraphExecutor', rpc_method_handlers)
|
154
|
+
|
155
|
+
|
156
|
+
# This class is part of an EXPERIMENTAL API.
|
157
|
+
class LangGraphExecutor(object):
|
158
|
+
"""Main service for LangGraph runtime operations
|
159
|
+
"""
|
160
|
+
|
161
|
+
@staticmethod
|
162
|
+
def ListGraphs(request,
|
163
|
+
target,
|
164
|
+
options=(),
|
165
|
+
channel_credentials=None,
|
166
|
+
call_credentials=None,
|
167
|
+
insecure=False,
|
168
|
+
compression=None,
|
169
|
+
wait_for_ready=None,
|
170
|
+
timeout=None,
|
171
|
+
metadata=None):
|
172
|
+
return grpc.experimental.unary_unary(
|
173
|
+
request,
|
174
|
+
target,
|
175
|
+
'/executor.LangGraphExecutor/ListGraphs',
|
176
|
+
executor__pb2.ListGraphsRequest.SerializeToString,
|
177
|
+
executor__pb2.ListGraphsResponse.FromString,
|
178
|
+
options,
|
179
|
+
channel_credentials,
|
180
|
+
insecure,
|
181
|
+
call_credentials,
|
182
|
+
compression,
|
183
|
+
wait_for_ready,
|
184
|
+
timeout,
|
185
|
+
metadata,
|
186
|
+
_registered_method=True)
|
187
|
+
|
188
|
+
@staticmethod
|
189
|
+
def GetGraph(request,
|
190
|
+
target,
|
191
|
+
options=(),
|
192
|
+
channel_credentials=None,
|
193
|
+
call_credentials=None,
|
194
|
+
insecure=False,
|
195
|
+
compression=None,
|
196
|
+
wait_for_ready=None,
|
197
|
+
timeout=None,
|
198
|
+
metadata=None):
|
199
|
+
return grpc.experimental.unary_unary(
|
200
|
+
request,
|
201
|
+
target,
|
202
|
+
'/executor.LangGraphExecutor/GetGraph',
|
203
|
+
executor__pb2.GetGraphRequest.SerializeToString,
|
204
|
+
executor__pb2.GetGraphResponse.FromString,
|
205
|
+
options,
|
206
|
+
channel_credentials,
|
207
|
+
insecure,
|
208
|
+
call_credentials,
|
209
|
+
compression,
|
210
|
+
wait_for_ready,
|
211
|
+
timeout,
|
212
|
+
metadata,
|
213
|
+
_registered_method=True)
|
214
|
+
|
215
|
+
@staticmethod
|
216
|
+
def ChannelsFromCheckpoint(request,
|
217
|
+
target,
|
218
|
+
options=(),
|
219
|
+
channel_credentials=None,
|
220
|
+
call_credentials=None,
|
221
|
+
insecure=False,
|
222
|
+
compression=None,
|
223
|
+
wait_for_ready=None,
|
224
|
+
timeout=None,
|
225
|
+
metadata=None):
|
226
|
+
return grpc.experimental.unary_unary(
|
227
|
+
request,
|
228
|
+
target,
|
229
|
+
'/executor.LangGraphExecutor/ChannelsFromCheckpoint',
|
230
|
+
executor__pb2.ChannelsFromCheckpointRequest.SerializeToString,
|
231
|
+
executor__pb2.ChannelsFromCheckpointResponse.FromString,
|
232
|
+
options,
|
233
|
+
channel_credentials,
|
234
|
+
insecure,
|
235
|
+
call_credentials,
|
236
|
+
compression,
|
237
|
+
wait_for_ready,
|
238
|
+
timeout,
|
239
|
+
metadata,
|
240
|
+
_registered_method=True)
|
241
|
+
|
242
|
+
@staticmethod
|
243
|
+
def ExecuteTask(request_iterator,
|
244
|
+
target,
|
245
|
+
options=(),
|
246
|
+
channel_credentials=None,
|
247
|
+
call_credentials=None,
|
248
|
+
insecure=False,
|
249
|
+
compression=None,
|
250
|
+
wait_for_ready=None,
|
251
|
+
timeout=None,
|
252
|
+
metadata=None):
|
253
|
+
return grpc.experimental.stream_stream(
|
254
|
+
request_iterator,
|
255
|
+
target,
|
256
|
+
'/executor.LangGraphExecutor/ExecuteTask',
|
257
|
+
executor__pb2.ExecuteTaskRequest.SerializeToString,
|
258
|
+
executor__pb2.ExecuteTaskResponse.FromString,
|
259
|
+
options,
|
260
|
+
channel_credentials,
|
261
|
+
insecure,
|
262
|
+
call_credentials,
|
263
|
+
compression,
|
264
|
+
wait_for_ready,
|
265
|
+
timeout,
|
266
|
+
metadata,
|
267
|
+
_registered_method=True)
|
268
|
+
|
269
|
+
@staticmethod
|
270
|
+
def ApplyWrites(request,
|
271
|
+
target,
|
272
|
+
options=(),
|
273
|
+
channel_credentials=None,
|
274
|
+
call_credentials=None,
|
275
|
+
insecure=False,
|
276
|
+
compression=None,
|
277
|
+
wait_for_ready=None,
|
278
|
+
timeout=None,
|
279
|
+
metadata=None):
|
280
|
+
return grpc.experimental.unary_unary(
|
281
|
+
request,
|
282
|
+
target,
|
283
|
+
'/executor.LangGraphExecutor/ApplyWrites',
|
284
|
+
executor__pb2.ApplyWritesRequest.SerializeToString,
|
285
|
+
executor__pb2.ApplyWritesResponse.FromString,
|
286
|
+
options,
|
287
|
+
channel_credentials,
|
288
|
+
insecure,
|
289
|
+
call_credentials,
|
290
|
+
compression,
|
291
|
+
wait_for_ready,
|
292
|
+
timeout,
|
293
|
+
metadata,
|
294
|
+
_registered_method=True)
|
295
|
+
|
296
|
+
@staticmethod
|
297
|
+
def GenerateCacheKey(request,
|
298
|
+
target,
|
299
|
+
options=(),
|
300
|
+
channel_credentials=None,
|
301
|
+
call_credentials=None,
|
302
|
+
insecure=False,
|
303
|
+
compression=None,
|
304
|
+
wait_for_ready=None,
|
305
|
+
timeout=None,
|
306
|
+
metadata=None):
|
307
|
+
return grpc.experimental.unary_unary(
|
308
|
+
request,
|
309
|
+
target,
|
310
|
+
'/executor.LangGraphExecutor/GenerateCacheKey',
|
311
|
+
executor__pb2.GenerateCacheKeyRequest.SerializeToString,
|
312
|
+
executor__pb2.GenerateCacheKeyResponse.FromString,
|
313
|
+
options,
|
314
|
+
channel_credentials,
|
315
|
+
insecure,
|
316
|
+
call_credentials,
|
317
|
+
compression,
|
318
|
+
wait_for_ready,
|
319
|
+
timeout,
|
320
|
+
metadata,
|
321
|
+
_registered_method=True)
|
@@ -0,0 +1,150 @@
|
|
1
|
+
"""
|
2
|
+
@generated by mypy-protobuf. Do not edit manually!
|
3
|
+
isort:skip_file
|
4
|
+
"""
|
5
|
+
|
6
|
+
import abc
|
7
|
+
import collections.abc
|
8
|
+
import executor_pb2
|
9
|
+
import grpc
|
10
|
+
import grpc.aio
|
11
|
+
import typing
|
12
|
+
|
13
|
+
_T = typing.TypeVar("_T")
|
14
|
+
|
15
|
+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...
|
16
|
+
|
17
|
+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore[misc, type-arg]
|
18
|
+
...
|
19
|
+
|
20
|
+
class LangGraphExecutorStub:
|
21
|
+
"""Main service for LangGraph runtime operations"""
|
22
|
+
|
23
|
+
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
|
24
|
+
ListGraphs: grpc.UnaryUnaryMultiCallable[
|
25
|
+
executor_pb2.ListGraphsRequest,
|
26
|
+
executor_pb2.ListGraphsResponse,
|
27
|
+
]
|
28
|
+
"""List available graphs"""
|
29
|
+
|
30
|
+
GetGraph: grpc.UnaryUnaryMultiCallable[
|
31
|
+
executor_pb2.GetGraphRequest,
|
32
|
+
executor_pb2.GetGraphResponse,
|
33
|
+
]
|
34
|
+
"""Get graph definition"""
|
35
|
+
|
36
|
+
ChannelsFromCheckpoint: grpc.UnaryUnaryMultiCallable[
|
37
|
+
executor_pb2.ChannelsFromCheckpointRequest,
|
38
|
+
executor_pb2.ChannelsFromCheckpointResponse,
|
39
|
+
]
|
40
|
+
"""Get channels initialized from checkpoint"""
|
41
|
+
|
42
|
+
ExecuteTask: grpc.StreamStreamMultiCallable[
|
43
|
+
executor_pb2.ExecuteTaskRequest,
|
44
|
+
executor_pb2.ExecuteTaskResponse,
|
45
|
+
]
|
46
|
+
"""Execute a node - bidirectional streaming for interactive execution"""
|
47
|
+
|
48
|
+
ApplyWrites: grpc.UnaryUnaryMultiCallable[
|
49
|
+
executor_pb2.ApplyWritesRequest,
|
50
|
+
executor_pb2.ApplyWritesResponse,
|
51
|
+
]
|
52
|
+
"""Update channel values with writes"""
|
53
|
+
|
54
|
+
GenerateCacheKey: grpc.UnaryUnaryMultiCallable[
|
55
|
+
executor_pb2.GenerateCacheKeyRequest,
|
56
|
+
executor_pb2.GenerateCacheKeyResponse,
|
57
|
+
]
|
58
|
+
"""Generate cache key for a node execution"""
|
59
|
+
|
60
|
+
class LangGraphExecutorAsyncStub:
|
61
|
+
"""Main service for LangGraph runtime operations"""
|
62
|
+
|
63
|
+
ListGraphs: grpc.aio.UnaryUnaryMultiCallable[
|
64
|
+
executor_pb2.ListGraphsRequest,
|
65
|
+
executor_pb2.ListGraphsResponse,
|
66
|
+
]
|
67
|
+
"""List available graphs"""
|
68
|
+
|
69
|
+
GetGraph: grpc.aio.UnaryUnaryMultiCallable[
|
70
|
+
executor_pb2.GetGraphRequest,
|
71
|
+
executor_pb2.GetGraphResponse,
|
72
|
+
]
|
73
|
+
"""Get graph definition"""
|
74
|
+
|
75
|
+
ChannelsFromCheckpoint: grpc.aio.UnaryUnaryMultiCallable[
|
76
|
+
executor_pb2.ChannelsFromCheckpointRequest,
|
77
|
+
executor_pb2.ChannelsFromCheckpointResponse,
|
78
|
+
]
|
79
|
+
"""Get channels initialized from checkpoint"""
|
80
|
+
|
81
|
+
ExecuteTask: grpc.aio.StreamStreamMultiCallable[
|
82
|
+
executor_pb2.ExecuteTaskRequest,
|
83
|
+
executor_pb2.ExecuteTaskResponse,
|
84
|
+
]
|
85
|
+
"""Execute a node - bidirectional streaming for interactive execution"""
|
86
|
+
|
87
|
+
ApplyWrites: grpc.aio.UnaryUnaryMultiCallable[
|
88
|
+
executor_pb2.ApplyWritesRequest,
|
89
|
+
executor_pb2.ApplyWritesResponse,
|
90
|
+
]
|
91
|
+
"""Update channel values with writes"""
|
92
|
+
|
93
|
+
GenerateCacheKey: grpc.aio.UnaryUnaryMultiCallable[
|
94
|
+
executor_pb2.GenerateCacheKeyRequest,
|
95
|
+
executor_pb2.GenerateCacheKeyResponse,
|
96
|
+
]
|
97
|
+
"""Generate cache key for a node execution"""
|
98
|
+
|
99
|
+
class LangGraphExecutorServicer(metaclass=abc.ABCMeta):
|
100
|
+
"""Main service for LangGraph runtime operations"""
|
101
|
+
|
102
|
+
@abc.abstractmethod
|
103
|
+
def ListGraphs(
|
104
|
+
self,
|
105
|
+
request: executor_pb2.ListGraphsRequest,
|
106
|
+
context: _ServicerContext,
|
107
|
+
) -> typing.Union[executor_pb2.ListGraphsResponse, collections.abc.Awaitable[executor_pb2.ListGraphsResponse]]:
|
108
|
+
"""List available graphs"""
|
109
|
+
|
110
|
+
@abc.abstractmethod
|
111
|
+
def GetGraph(
|
112
|
+
self,
|
113
|
+
request: executor_pb2.GetGraphRequest,
|
114
|
+
context: _ServicerContext,
|
115
|
+
) -> typing.Union[executor_pb2.GetGraphResponse, collections.abc.Awaitable[executor_pb2.GetGraphResponse]]:
|
116
|
+
"""Get graph definition"""
|
117
|
+
|
118
|
+
@abc.abstractmethod
|
119
|
+
def ChannelsFromCheckpoint(
|
120
|
+
self,
|
121
|
+
request: executor_pb2.ChannelsFromCheckpointRequest,
|
122
|
+
context: _ServicerContext,
|
123
|
+
) -> typing.Union[executor_pb2.ChannelsFromCheckpointResponse, collections.abc.Awaitable[executor_pb2.ChannelsFromCheckpointResponse]]:
|
124
|
+
"""Get channels initialized from checkpoint"""
|
125
|
+
|
126
|
+
@abc.abstractmethod
|
127
|
+
def ExecuteTask(
|
128
|
+
self,
|
129
|
+
request_iterator: _MaybeAsyncIterator[executor_pb2.ExecuteTaskRequest],
|
130
|
+
context: _ServicerContext,
|
131
|
+
) -> typing.Union[collections.abc.Iterator[executor_pb2.ExecuteTaskResponse], collections.abc.AsyncIterator[executor_pb2.ExecuteTaskResponse]]:
|
132
|
+
"""Execute a node - bidirectional streaming for interactive execution"""
|
133
|
+
|
134
|
+
@abc.abstractmethod
|
135
|
+
def ApplyWrites(
|
136
|
+
self,
|
137
|
+
request: executor_pb2.ApplyWritesRequest,
|
138
|
+
context: _ServicerContext,
|
139
|
+
) -> typing.Union[executor_pb2.ApplyWritesResponse, collections.abc.Awaitable[executor_pb2.ApplyWritesResponse]]:
|
140
|
+
"""Update channel values with writes"""
|
141
|
+
|
142
|
+
@abc.abstractmethod
|
143
|
+
def GenerateCacheKey(
|
144
|
+
self,
|
145
|
+
request: executor_pb2.GenerateCacheKeyRequest,
|
146
|
+
context: _ServicerContext,
|
147
|
+
) -> typing.Union[executor_pb2.GenerateCacheKeyResponse, collections.abc.Awaitable[executor_pb2.GenerateCacheKeyResponse]]:
|
148
|
+
"""Generate cache key for a node execution"""
|
149
|
+
|
150
|
+
def add_LangGraphExecutorServicer_to_server(servicer: LangGraphExecutorServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
+
# source: graph.proto
|
5
|
+
# Protobuf Python Version: 6.31.1
|
6
|
+
"""Generated protocol buffer code."""
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
11
|
+
from google.protobuf.internal import builder as _builder
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
14
|
+
6,
|
15
|
+
31,
|
16
|
+
1,
|
17
|
+
'',
|
18
|
+
'graph.proto'
|
19
|
+
)
|
20
|
+
# @@protoc_insertion_point(imports)
|
21
|
+
|
22
|
+
_sym_db = _symbol_database.Default()
|
23
|
+
|
24
|
+
|
25
|
+
from . import types_pb2 as types__pb2
|
26
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
27
|
+
|
28
|
+
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bgraph.proto\x12\x05graph\x1a\x0btypes.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xd5\x05\n\x0fGraphDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x30\n\x05nodes\x18\x02 \x03(\x0b\x32!.graph.GraphDefinition.NodesEntry\x12!\n\x08\x63hannels\x18\x03 \x01(\x0b\x32\x0f.types.Channels\x12\x16\n\x0einput_channels\x18\x04 \x03(\t\x12\x17\n\x0foutput_channels\x18\x05 \x03(\t\x12\x1e\n\x16input_channels_is_list\x18\x06 \x01(\x08\x12\x1f\n\x17output_channels_is_list\x18\x07 \x01(\x08\x12\x1e\n\x16interrupt_before_nodes\x18\x08 \x03(\t\x12\x1d\n\x15interrupt_after_nodes\x18\t \x03(\t\x12\x44\n\x10trigger_to_nodes\x18\n \x03(\x0b\x32*.graph.GraphDefinition.TriggerToNodesEntry\x12\x13\n\x0bstream_mode\x18\x0b \x03(\t\x12\x14\n\x0cstream_eager\x18\x0c \x01(\x08\x12\x17\n\x0fstream_channels\x18\r \x03(\t\x12\x14\n\x0cstep_timeout\x18\x0e \x01(\x02\x12\r\n\x05\x64\x65\x62ug\x18\x0f \x01(\x08\x12\x1b\n\x05\x63\x61\x63he\x18\x10 \x01(\x0b\x32\x0c.graph.Cache\x12(\n\x0cretry_policy\x18\x11 \x01(\x0b\x32\x12.graph.RetryPolicy\x12%\n\x06\x63onfig\x18\x12 \x01(\x0b\x32\x15.types.RunnableConfig\x1a\x43\n\nNodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.graph.NodeDefinition:\x02\x38\x01\x1aL\n\x13TriggerToNodesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x05value\x18\x02 \x01(\x0b\x32\x15.graph.TriggerMapping:\x02\x38\x01\"\x8c\x01\n\x0eNodeDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x08triggers\x18\x02 \x03(\t\x12\x0f\n\x07writers\x18\x03 \x03(\t\x12\x0c\n\x04tags\x18\x04 \x03(\t\x12)\n\x08metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08\x63hannels\x18\x06 \x03(\t\"{\n\x0bRetryPolicy\x12\x18\n\x10initial_interval\x18\x01 \x01(\x02\x12\x16\n\x0e\x62\x61\x63koff_factor\x18\x02 \x01(\x02\x12\x14\n\x0cmax_interval\x18\x03 \x01(\x02\x12\x14\n\x0cmax_attempts\x18\x04 \x01(\x05\x12\x0e\n\x06jitter\x18\x05 \x01(\x08\"\x1b\n\x05\x43\x61\x63he\x12\x12\n\ncache_type\x18\x01 \x01(\t\"\x1f\n\x0eTriggerMapping\x12\r\n\x05nodes\x18\x01 \x03(\tB1Z/github.com/langchain-ai/langgraph-go/runtime/pbb\x06proto3')
|
30
|
+
|
31
|
+
_globals = globals()
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'graph_pb2', _globals)
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z/github.com/langchain-ai/langgraph-go/runtime/pb'
|
37
|
+
_globals['_GRAPHDEFINITION_NODESENTRY']._loaded_options = None
|
38
|
+
_globals['_GRAPHDEFINITION_NODESENTRY']._serialized_options = b'8\001'
|
39
|
+
_globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._loaded_options = None
|
40
|
+
_globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_options = b'8\001'
|
41
|
+
_globals['_GRAPHDEFINITION']._serialized_start=66
|
42
|
+
_globals['_GRAPHDEFINITION']._serialized_end=791
|
43
|
+
_globals['_GRAPHDEFINITION_NODESENTRY']._serialized_start=646
|
44
|
+
_globals['_GRAPHDEFINITION_NODESENTRY']._serialized_end=713
|
45
|
+
_globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_start=715
|
46
|
+
_globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_end=791
|
47
|
+
_globals['_NODEDEFINITION']._serialized_start=794
|
48
|
+
_globals['_NODEDEFINITION']._serialized_end=934
|
49
|
+
_globals['_RETRYPOLICY']._serialized_start=936
|
50
|
+
_globals['_RETRYPOLICY']._serialized_end=1059
|
51
|
+
_globals['_CACHE']._serialized_start=1061
|
52
|
+
_globals['_CACHE']._serialized_end=1088
|
53
|
+
_globals['_TRIGGERMAPPING']._serialized_start=1090
|
54
|
+
_globals['_TRIGGERMAPPING']._serialized_end=1121
|
55
|
+
# @@protoc_insertion_point(module_scope)
|