langgraph-executor 0.0.1a0__py3-none-any.whl → 0.0.1a1__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.
@@ -1 +1 @@
1
- __version__ = "0.0.1a0"
1
+ __version__ = "0.0.1a1"
@@ -58,6 +58,7 @@ def reconstruct_task(
58
58
  *,
59
59
  store: BaseStore | None = None,
60
60
  config: RunnableConfig | None = None,
61
+ custom_stream_writer=None,
61
62
  ) -> PregelExecutableTask:
62
63
  pb_task = request.task
63
64
 
@@ -91,7 +92,9 @@ def reconstruct_task(
91
92
  val = pb_to_val(pb_task.input["PUSH_INPUT"])
92
93
 
93
94
  writes = deque()
94
- runtime = ensure_runtime(configurable, store, graph)
95
+ runtime = ensure_runtime(
96
+ configurable, store, graph, custom_stream_writer=custom_stream_writer
97
+ )
95
98
 
96
99
  # Generate cache key if cache policy exists
97
100
  cache_policy = getattr(proc, "cache_policy", None)
@@ -184,15 +187,31 @@ def create_scratchpad(
184
187
  return scratchpad
185
188
 
186
189
 
187
- def ensure_runtime(configurable, store, graph):
190
+ def ensure_runtime(configurable, store, graph, custom_stream_writer=None):
188
191
  runtime = configurable.get(CONFIG_KEY_RUNTIME)
192
+
193
+ # Prepare runtime overrides
194
+ overrides = {"store": store}
195
+ if custom_stream_writer is not None:
196
+ overrides["stream_writer"] = custom_stream_writer
197
+
189
198
  if runtime is None:
190
- return DEFAULT_RUNTIME.override(store=store)
199
+ return DEFAULT_RUNTIME.override(**overrides)
191
200
  if isinstance(runtime, Runtime):
192
- return runtime.override(store=store)
201
+ return runtime.override(**overrides)
193
202
  if isinstance(runtime, dict):
194
203
  context = _coerce_context(graph, runtime.get("context"))
195
- return Runtime(**(runtime | {"store": store, "context": context}))
204
+ return Runtime(
205
+ **(
206
+ runtime
207
+ | {"store": store, "context": context}
208
+ | (
209
+ {"stream_writer": custom_stream_writer}
210
+ if custom_stream_writer
211
+ else {}
212
+ )
213
+ )
214
+ )
196
215
  raise ValueError("Invalid runtime")
197
216
 
198
217
 
@@ -113,18 +113,24 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
113
113
 
114
114
  # Right now, only handle task execution without interrupts, etc
115
115
  try:
116
- # Get request
117
116
  request = get_init_request(request_iterator)
118
117
 
119
118
  # Reconstruct PregelExecutableTask
120
119
  graph = get_graph(request.graph_name, self.graphs)
121
- task = reconstruct_task(request, graph)
122
-
123
- # Check if streaming is requested (for messages mode)
124
120
  stream_messages = "messages" in request.stream_modes
121
+ stream_custom = "custom" in request.stream_modes
125
122
 
126
- # Set up streaming callback if needed
127
123
  stream_chunks = []
124
+
125
+ custom_stream_writer = (
126
+ self._create_custom_stream_writer(stream_chunks)
127
+ if stream_custom
128
+ else None
129
+ )
130
+
131
+ task = reconstruct_task(
132
+ request, graph, custom_stream_writer=custom_stream_writer
133
+ )
128
134
  if stream_messages:
129
135
 
130
136
  def stream_callback(message: BaseMessageChunk, metadata: dict):
@@ -201,7 +207,6 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
201
207
  task,
202
208
  retry_policy=None,
203
209
  )
204
-
205
210
  # Yield any accumulated stream chunks
206
211
  yield from stream_chunks
207
212
 
@@ -285,6 +290,36 @@ class LangGraphExecutorServicer(executor_pb2_grpc.LangGraphExecutorServicer):
285
290
  self.logger.exception(f"ApplyWrites error: {e}")
286
291
  context.abort(grpc.StatusCode.INTERNAL, str(e))
287
292
 
293
+ def _create_custom_stream_writer(self, stream_chunks):
294
+ """Create a proper stream_writer function for custom mode (like langgraph does)."""
295
+ from google.protobuf.struct_pb2 import Struct # type: ignore[unresolved-import]
296
+
297
+ def stream_writer(content):
298
+ """Custom stream writer that creates CustomStreamEvent messages."""
299
+ try:
300
+ # Create payload struct (like langgraph does)
301
+ payload = Struct()
302
+ if isinstance(content, str):
303
+ payload.update({"content": content})
304
+ elif isinstance(content, dict):
305
+ payload.update(content)
306
+ else:
307
+ payload.update({"content": str(content)})
308
+
309
+ # Create CustomStreamEvent
310
+ custom_event = executor_pb2.CustomStreamEvent(payload=payload)
311
+ custom_event_response = executor_pb2.ExecuteTaskResponse(
312
+ custom_stream_event=custom_event
313
+ )
314
+ stream_chunks.append(custom_event_response)
315
+
316
+ except Exception as e:
317
+ self.logger.warning(
318
+ f"Failed to create custom stream event: {e}", exc_info=True
319
+ )
320
+
321
+ return stream_writer
322
+
288
323
 
289
324
  def extract_output_messages(writes: Sequence[Any]) -> list[types_pb2.Message]: # type: ignore[name-defined]
290
325
  messages = []
@@ -80,11 +80,8 @@ def extract_reserved_configurable(
80
80
  )
81
81
 
82
82
 
83
- def extract_nodes(nodes: dict[str, PregelNode]) -> dict[str, graph_pb2.NodeDefinition]:
84
- out = {}
85
- for k, v in nodes.items():
86
- out[k] = extract_node(k, v)
87
- return out
83
+ def extract_nodes(nodes: dict[str, PregelNode]) -> list[graph_pb2.NodeDefinition]:
84
+ return [extract_node(k, v) for k, v in nodes.items()]
88
85
 
89
86
 
90
87
  def extract_node(name: str, node: PregelNode) -> graph_pb2.NodeDefinition:
@@ -24,9 +24,10 @@ _sym_db = _symbol_database.Default()
24
24
 
25
25
  from . import types_pb2 as types__pb2
26
26
  from . import graph_pb2 as graph__pb2
27
+ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
27
28
 
28
29
 
29
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x65xecutor.proto\x12\x08\x65xecutor\x1a\x0btypes.proto\x1a\x0bgraph.proto\"\x13\n\x11ListGraphsRequest\")\n\x12ListGraphsResponse\x12\x13\n\x0bgraph_names\x18\x01 \x03(\t\"%\n\x0fGetGraphRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\"D\n\x10GetGraphResponse\x12\x30\n\x10graph_definition\x18\x01 \x01(\x0b\x32\x16.graph.GraphDefinition\"\x8a\x02\n\x1d\x43hannelsFromCheckpointRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1e\n\x05specs\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12g\n\x19\x63heckpoint_channel_values\x18\x03 \x03(\x0b\x32\x44.executor.ChannelsFromCheckpointRequest.CheckpointChannelValuesEntry\x1aL\n\x1c\x43heckpointChannelValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.types.Value:\x02\x38\x01\"C\n\x1e\x43hannelsFromCheckpointResponse\x12!\n\x08\x63hannels\x18\x01 \x01(\x0b\x32\x0f.types.Channels\"\x88\x01\n\x12\x45xecuteTaskRequest\x12)\n\x04init\x18\x01 \x01(\x0b\x32\x19.executor.ExecuteTaskInitH\x00\x12<\n\x14\x63\x61\x63he_check_response\x18\x02 \x01(\x0b\x32\x1c.executor.CacheCheckResponseH\x00\x42\t\n\x07message\"\xd6\x01\n\x0f\x45xecuteTaskInit\x12\x19\n\x04task\x18\x01 \x01(\x0b\x32\x0b.types.Task\x12!\n\x08\x63hannels\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12\x14\n\x0cstream_modes\x18\x03 \x03(\t\x12\x0c\n\x04step\x18\x04 \x01(\x05\x12\x15\n\rcheckpoint_ns\x18\x05 \x03(\t\x12\x13\n\x0boutput_keys\x18\x06 \x03(\t\x12\x13\n\x0bstream_keys\x18\x07 \x03(\t\x12\x12\n\ngraph_name\x18\x08 \x01(\t\x12\x0c\n\x04stop\x18\t \x01(\x05\"\xbd\x01\n\x13\x45xecuteTaskResponse\x12+\n\x0btask_result\x18\x01 \x01(\x0b\x32\x14.executor.TaskResultH\x00\x12\x32\n\x18message_or_message_chunk\x18\x02 \x01(\x0b\x32\x0e.types.MessageH\x00\x12:\n\x13\x63\x61\x63he_check_request\x18\x03 \x01(\x0b\x32\x1b.executor.CacheCheckRequestH\x00\x42\t\n\x07message\"^\n\nTaskResult\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.types.ExecutorErrorH\x00\x88\x01\x01\x12\x1c\n\x06writes\x18\x02 \x03(\x0b\x32\x0c.types.WriteB\x08\n\x06_error\"\xa4\x01\n\x12\x41pplyWritesRequest\x12%\n\ncheckpoint\x18\x01 \x01(\x0b\x32\x11.types.Checkpoint\x12!\n\x08\x63hannels\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12\x1a\n\x05tasks\x18\x03 \x03(\x0b\x32\x0b.types.Task\x12\x14\n\x0cnext_version\x18\x04 \x01(\t\x12\x12\n\ngraph_name\x18\x05 \x01(\t\"b\n\x13\x41pplyWritesResponse\x12!\n\x07updates\x18\x01 \x01(\x0b\x32\x0e.types.UpdatesH\x00\x12\x1d\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0c.types.ValueH\x00\x42\t\n\x07message\"\xc8\x01\n\x17GenerateCacheKeyRequest\x12\x11\n\tnode_name\x18\x01 \x01(\t\x12\x16\n\x0einput_channels\x18\x02 \x03(\t\x12L\n\x0e\x63hannel_values\x18\x03 \x03(\x0b\x32\x34.executor.GenerateCacheKeyRequest.ChannelValuesEntry\x1a\x34\n\x12\x43hannelValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"-\n\x18GenerateCacheKeyResponse\x12\x11\n\tcache_key\x18\x01 \x01(\t\"Y\n\x11\x43\x61\x63heCheckRequest\x12\x17\n\x0f\x63\x61\x63he_namespace\x18\x01 \x03(\t\x12\x11\n\tcache_key\x18\x02 \x01(\t\x12\x10\n\x03ttl\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\x06\n\x04_ttl\"\'\n\x12\x43\x61\x63heCheckResponse\x12\x11\n\tcache_hit\x18\x01 \x01(\x08\x32\x83\x04\n\x11LangGraphExecutor\x12G\n\nListGraphs\x12\x1b.executor.ListGraphsRequest\x1a\x1c.executor.ListGraphsResponse\x12\x41\n\x08GetGraph\x12\x19.executor.GetGraphRequest\x1a\x1a.executor.GetGraphResponse\x12k\n\x16\x43hannelsFromCheckpoint\x12\'.executor.ChannelsFromCheckpointRequest\x1a(.executor.ChannelsFromCheckpointResponse\x12N\n\x0b\x45xecuteTask\x12\x1c.executor.ExecuteTaskRequest\x1a\x1d.executor.ExecuteTaskResponse(\x01\x30\x01\x12J\n\x0b\x41pplyWrites\x12\x1c.executor.ApplyWritesRequest\x1a\x1d.executor.ApplyWritesResponse\x12Y\n\x10GenerateCacheKey\x12!.executor.GenerateCacheKeyRequest\x1a\".executor.GenerateCacheKeyResponseB1Z/github.com/langchain-ai/langgraph-go/runtime/pbb\x06proto3')
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x65xecutor.proto\x12\x08\x65xecutor\x1a\x0btypes.proto\x1a\x0bgraph.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x13\n\x11ListGraphsRequest\")\n\x12ListGraphsResponse\x12\x13\n\x0bgraph_names\x18\x01 \x03(\t\"%\n\x0fGetGraphRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\"D\n\x10GetGraphResponse\x12\x30\n\x10graph_definition\x18\x01 \x01(\x0b\x32\x16.graph.GraphDefinition\"\x8a\x02\n\x1d\x43hannelsFromCheckpointRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1e\n\x05specs\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12g\n\x19\x63heckpoint_channel_values\x18\x03 \x03(\x0b\x32\x44.executor.ChannelsFromCheckpointRequest.CheckpointChannelValuesEntry\x1aL\n\x1c\x43heckpointChannelValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1b\n\x05value\x18\x02 \x01(\x0b\x32\x0c.types.Value:\x02\x38\x01\"C\n\x1e\x43hannelsFromCheckpointResponse\x12!\n\x08\x63hannels\x18\x01 \x01(\x0b\x32\x0f.types.Channels\"\x88\x01\n\x12\x45xecuteTaskRequest\x12)\n\x04init\x18\x01 \x01(\x0b\x32\x19.executor.ExecuteTaskInitH\x00\x12<\n\x14\x63\x61\x63he_check_response\x18\x02 \x01(\x0b\x32\x1c.executor.CacheCheckResponseH\x00\x42\t\n\x07message\"\xd6\x01\n\x0f\x45xecuteTaskInit\x12\x19\n\x04task\x18\x01 \x01(\x0b\x32\x0b.types.Task\x12!\n\x08\x63hannels\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12\x14\n\x0cstream_modes\x18\x03 \x03(\t\x12\x0c\n\x04step\x18\x04 \x01(\x05\x12\x15\n\rcheckpoint_ns\x18\x05 \x03(\t\x12\x13\n\x0boutput_keys\x18\x06 \x03(\t\x12\x13\n\x0bstream_keys\x18\x07 \x03(\t\x12\x12\n\ngraph_name\x18\x08 \x01(\t\x12\x0c\n\x04stop\x18\t \x01(\x05\"\xf9\x01\n\x13\x45xecuteTaskResponse\x12+\n\x0btask_result\x18\x01 \x01(\x0b\x32\x14.executor.TaskResultH\x00\x12\x32\n\x18message_or_message_chunk\x18\x02 \x01(\x0b\x32\x0e.types.MessageH\x00\x12:\n\x13\x63\x61\x63he_check_request\x18\x03 \x01(\x0b\x32\x1b.executor.CacheCheckRequestH\x00\x12:\n\x13\x63ustom_stream_event\x18\x04 \x01(\x0b\x32\x1b.executor.CustomStreamEventH\x00\x42\t\n\x07message\"^\n\nTaskResult\x12(\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x14.types.ExecutorErrorH\x00\x88\x01\x01\x12\x1c\n\x06writes\x18\x02 \x03(\x0b\x32\x0c.types.WriteB\x08\n\x06_error\"=\n\x11\x43ustomStreamEvent\x12(\n\x07payload\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\"\xa4\x01\n\x12\x41pplyWritesRequest\x12%\n\ncheckpoint\x18\x01 \x01(\x0b\x32\x11.types.Checkpoint\x12!\n\x08\x63hannels\x18\x02 \x01(\x0b\x32\x0f.types.Channels\x12\x1a\n\x05tasks\x18\x03 \x03(\x0b\x32\x0b.types.Task\x12\x14\n\x0cnext_version\x18\x04 \x01(\t\x12\x12\n\ngraph_name\x18\x05 \x01(\t\"b\n\x13\x41pplyWritesResponse\x12!\n\x07updates\x18\x01 \x01(\x0b\x32\x0e.types.UpdatesH\x00\x12\x1d\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x0c.types.ValueH\x00\x42\t\n\x07message\"\xc8\x01\n\x17GenerateCacheKeyRequest\x12\x11\n\tnode_name\x18\x01 \x01(\t\x12\x16\n\x0einput_channels\x18\x02 \x03(\t\x12L\n\x0e\x63hannel_values\x18\x03 \x03(\x0b\x32\x34.executor.GenerateCacheKeyRequest.ChannelValuesEntry\x1a\x34\n\x12\x43hannelValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"-\n\x18GenerateCacheKeyResponse\x12\x11\n\tcache_key\x18\x01 \x01(\t\"Y\n\x11\x43\x61\x63heCheckRequest\x12\x17\n\x0f\x63\x61\x63he_namespace\x18\x01 \x03(\t\x12\x11\n\tcache_key\x18\x02 \x01(\t\x12\x10\n\x03ttl\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\x06\n\x04_ttl\"\'\n\x12\x43\x61\x63heCheckResponse\x12\x11\n\tcache_hit\x18\x01 \x01(\x08\x32\x83\x04\n\x11LangGraphExecutor\x12G\n\nListGraphs\x12\x1b.executor.ListGraphsRequest\x1a\x1c.executor.ListGraphsResponse\x12\x41\n\x08GetGraph\x12\x19.executor.GetGraphRequest\x1a\x1a.executor.GetGraphResponse\x12k\n\x16\x43hannelsFromCheckpoint\x12\'.executor.ChannelsFromCheckpointRequest\x1a(.executor.ChannelsFromCheckpointResponse\x12N\n\x0b\x45xecuteTask\x12\x1c.executor.ExecuteTaskRequest\x1a\x1d.executor.ExecuteTaskResponse(\x01\x30\x01\x12J\n\x0b\x41pplyWrites\x12\x1c.executor.ApplyWritesRequest\x1a\x1d.executor.ApplyWritesResponse\x12Y\n\x10GenerateCacheKey\x12!.executor.GenerateCacheKeyRequest\x1a\".executor.GenerateCacheKeyResponseB1Z/github.com/langchain-ai/langgraph-go/runtime/pbb\x06proto3')
30
31
 
31
32
  _globals = globals()
32
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -38,42 +39,44 @@ if not _descriptor._USE_C_DESCRIPTORS:
38
39
  _globals['_CHANNELSFROMCHECKPOINTREQUEST_CHECKPOINTCHANNELVALUESENTRY']._serialized_options = b'8\001'
39
40
  _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._loaded_options = None
40
41
  _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._serialized_options = b'8\001'
41
- _globals['_LISTGRAPHSREQUEST']._serialized_start=54
42
- _globals['_LISTGRAPHSREQUEST']._serialized_end=73
43
- _globals['_LISTGRAPHSRESPONSE']._serialized_start=75
44
- _globals['_LISTGRAPHSRESPONSE']._serialized_end=116
45
- _globals['_GETGRAPHREQUEST']._serialized_start=118
46
- _globals['_GETGRAPHREQUEST']._serialized_end=155
47
- _globals['_GETGRAPHRESPONSE']._serialized_start=157
48
- _globals['_GETGRAPHRESPONSE']._serialized_end=225
49
- _globals['_CHANNELSFROMCHECKPOINTREQUEST']._serialized_start=228
50
- _globals['_CHANNELSFROMCHECKPOINTREQUEST']._serialized_end=494
51
- _globals['_CHANNELSFROMCHECKPOINTREQUEST_CHECKPOINTCHANNELVALUESENTRY']._serialized_start=418
52
- _globals['_CHANNELSFROMCHECKPOINTREQUEST_CHECKPOINTCHANNELVALUESENTRY']._serialized_end=494
53
- _globals['_CHANNELSFROMCHECKPOINTRESPONSE']._serialized_start=496
54
- _globals['_CHANNELSFROMCHECKPOINTRESPONSE']._serialized_end=563
55
- _globals['_EXECUTETASKREQUEST']._serialized_start=566
56
- _globals['_EXECUTETASKREQUEST']._serialized_end=702
57
- _globals['_EXECUTETASKINIT']._serialized_start=705
58
- _globals['_EXECUTETASKINIT']._serialized_end=919
59
- _globals['_EXECUTETASKRESPONSE']._serialized_start=922
60
- _globals['_EXECUTETASKRESPONSE']._serialized_end=1111
61
- _globals['_TASKRESULT']._serialized_start=1113
62
- _globals['_TASKRESULT']._serialized_end=1207
63
- _globals['_APPLYWRITESREQUEST']._serialized_start=1210
64
- _globals['_APPLYWRITESREQUEST']._serialized_end=1374
65
- _globals['_APPLYWRITESRESPONSE']._serialized_start=1376
66
- _globals['_APPLYWRITESRESPONSE']._serialized_end=1474
67
- _globals['_GENERATECACHEKEYREQUEST']._serialized_start=1477
68
- _globals['_GENERATECACHEKEYREQUEST']._serialized_end=1677
69
- _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._serialized_start=1625
70
- _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._serialized_end=1677
71
- _globals['_GENERATECACHEKEYRESPONSE']._serialized_start=1679
72
- _globals['_GENERATECACHEKEYRESPONSE']._serialized_end=1724
73
- _globals['_CACHECHECKREQUEST']._serialized_start=1726
74
- _globals['_CACHECHECKREQUEST']._serialized_end=1815
75
- _globals['_CACHECHECKRESPONSE']._serialized_start=1817
76
- _globals['_CACHECHECKRESPONSE']._serialized_end=1856
77
- _globals['_LANGGRAPHEXECUTOR']._serialized_start=1859
78
- _globals['_LANGGRAPHEXECUTOR']._serialized_end=2374
42
+ _globals['_LISTGRAPHSREQUEST']._serialized_start=84
43
+ _globals['_LISTGRAPHSREQUEST']._serialized_end=103
44
+ _globals['_LISTGRAPHSRESPONSE']._serialized_start=105
45
+ _globals['_LISTGRAPHSRESPONSE']._serialized_end=146
46
+ _globals['_GETGRAPHREQUEST']._serialized_start=148
47
+ _globals['_GETGRAPHREQUEST']._serialized_end=185
48
+ _globals['_GETGRAPHRESPONSE']._serialized_start=187
49
+ _globals['_GETGRAPHRESPONSE']._serialized_end=255
50
+ _globals['_CHANNELSFROMCHECKPOINTREQUEST']._serialized_start=258
51
+ _globals['_CHANNELSFROMCHECKPOINTREQUEST']._serialized_end=524
52
+ _globals['_CHANNELSFROMCHECKPOINTREQUEST_CHECKPOINTCHANNELVALUESENTRY']._serialized_start=448
53
+ _globals['_CHANNELSFROMCHECKPOINTREQUEST_CHECKPOINTCHANNELVALUESENTRY']._serialized_end=524
54
+ _globals['_CHANNELSFROMCHECKPOINTRESPONSE']._serialized_start=526
55
+ _globals['_CHANNELSFROMCHECKPOINTRESPONSE']._serialized_end=593
56
+ _globals['_EXECUTETASKREQUEST']._serialized_start=596
57
+ _globals['_EXECUTETASKREQUEST']._serialized_end=732
58
+ _globals['_EXECUTETASKINIT']._serialized_start=735
59
+ _globals['_EXECUTETASKINIT']._serialized_end=949
60
+ _globals['_EXECUTETASKRESPONSE']._serialized_start=952
61
+ _globals['_EXECUTETASKRESPONSE']._serialized_end=1201
62
+ _globals['_TASKRESULT']._serialized_start=1203
63
+ _globals['_TASKRESULT']._serialized_end=1297
64
+ _globals['_CUSTOMSTREAMEVENT']._serialized_start=1299
65
+ _globals['_CUSTOMSTREAMEVENT']._serialized_end=1360
66
+ _globals['_APPLYWRITESREQUEST']._serialized_start=1363
67
+ _globals['_APPLYWRITESREQUEST']._serialized_end=1527
68
+ _globals['_APPLYWRITESRESPONSE']._serialized_start=1529
69
+ _globals['_APPLYWRITESRESPONSE']._serialized_end=1627
70
+ _globals['_GENERATECACHEKEYREQUEST']._serialized_start=1630
71
+ _globals['_GENERATECACHEKEYREQUEST']._serialized_end=1830
72
+ _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._serialized_start=1778
73
+ _globals['_GENERATECACHEKEYREQUEST_CHANNELVALUESENTRY']._serialized_end=1830
74
+ _globals['_GENERATECACHEKEYRESPONSE']._serialized_start=1832
75
+ _globals['_GENERATECACHEKEYRESPONSE']._serialized_end=1877
76
+ _globals['_CACHECHECKREQUEST']._serialized_start=1879
77
+ _globals['_CACHECHECKREQUEST']._serialized_end=1968
78
+ _globals['_CACHECHECKRESPONSE']._serialized_start=1970
79
+ _globals['_CACHECHECKRESPONSE']._serialized_end=2009
80
+ _globals['_LANGGRAPHEXECUTOR']._serialized_start=2012
81
+ _globals['_LANGGRAPHEXECUTOR']._serialized_end=2527
79
82
  # @@protoc_insertion_point(module_scope)
@@ -8,6 +8,7 @@ import collections.abc
8
8
  import google.protobuf.descriptor
9
9
  import google.protobuf.internal.containers
10
10
  import google.protobuf.message
11
+ import google.protobuf.struct_pb2
11
12
  import graph_pb2
12
13
  import types_pb2
13
14
  import typing
@@ -214,22 +215,26 @@ class ExecuteTaskResponse(google.protobuf.message.Message):
214
215
  TASK_RESULT_FIELD_NUMBER: builtins.int
215
216
  MESSAGE_OR_MESSAGE_CHUNK_FIELD_NUMBER: builtins.int
216
217
  CACHE_CHECK_REQUEST_FIELD_NUMBER: builtins.int
218
+ CUSTOM_STREAM_EVENT_FIELD_NUMBER: builtins.int
217
219
  @property
218
220
  def task_result(self) -> global___TaskResult: ...
219
221
  @property
220
222
  def message_or_message_chunk(self) -> types_pb2.Message: ...
221
223
  @property
222
224
  def cache_check_request(self) -> global___CacheCheckRequest: ...
225
+ @property
226
+ def custom_stream_event(self) -> global___CustomStreamEvent: ...
223
227
  def __init__(
224
228
  self,
225
229
  *,
226
230
  task_result: global___TaskResult | None = ...,
227
231
  message_or_message_chunk: types_pb2.Message | None = ...,
228
232
  cache_check_request: global___CacheCheckRequest | None = ...,
233
+ custom_stream_event: global___CustomStreamEvent | None = ...,
229
234
  ) -> None: ...
230
- def HasField(self, field_name: typing.Literal["cache_check_request", b"cache_check_request", "message", b"message", "message_or_message_chunk", b"message_or_message_chunk", "task_result", b"task_result"]) -> builtins.bool: ...
231
- def ClearField(self, field_name: typing.Literal["cache_check_request", b"cache_check_request", "message", b"message", "message_or_message_chunk", b"message_or_message_chunk", "task_result", b"task_result"]) -> None: ...
232
- def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["task_result", "message_or_message_chunk", "cache_check_request"] | None: ...
235
+ def HasField(self, field_name: typing.Literal["cache_check_request", b"cache_check_request", "custom_stream_event", b"custom_stream_event", "message", b"message", "message_or_message_chunk", b"message_or_message_chunk", "task_result", b"task_result"]) -> builtins.bool: ...
236
+ def ClearField(self, field_name: typing.Literal["cache_check_request", b"cache_check_request", "custom_stream_event", b"custom_stream_event", "message", b"message", "message_or_message_chunk", b"message_or_message_chunk", "task_result", b"task_result"]) -> None: ...
237
+ def WhichOneof(self, oneof_group: typing.Literal["message", b"message"]) -> typing.Literal["task_result", "message_or_message_chunk", "cache_check_request", "custom_stream_event"] | None: ...
233
238
 
234
239
  global___ExecuteTaskResponse = ExecuteTaskResponse
235
240
 
@@ -255,6 +260,23 @@ class TaskResult(google.protobuf.message.Message):
255
260
 
256
261
  global___TaskResult = TaskResult
257
262
 
263
+ @typing.final
264
+ class CustomStreamEvent(google.protobuf.message.Message):
265
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
266
+
267
+ PAYLOAD_FIELD_NUMBER: builtins.int
268
+ @property
269
+ def payload(self) -> google.protobuf.struct_pb2.Struct: ...
270
+ def __init__(
271
+ self,
272
+ *,
273
+ payload: google.protobuf.struct_pb2.Struct | None = ...,
274
+ ) -> None: ...
275
+ def HasField(self, field_name: typing.Literal["payload", b"payload"]) -> builtins.bool: ...
276
+ def ClearField(self, field_name: typing.Literal["payload", b"payload"]) -> None: ...
277
+
278
+ global___CustomStreamEvent = CustomStreamEvent
279
+
258
280
  @typing.final
259
281
  class ApplyWritesRequest(google.protobuf.message.Message):
260
282
  """Apply Writes"""
@@ -26,7 +26,7 @@ from . import types_pb2 as types__pb2
26
26
  from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
27
27
 
28
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')
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bgraph.proto\x12\x05graph\x1a\x0btypes.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x84\x05\n\x0fGraphDefinition\x12\x0c\n\x04name\x18\x01 \x01(\t\x12$\n\x05nodes\x18\x02 \x03(\x0b\x32\x15.graph.NodeDefinition\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\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
30
 
31
31
  _globals = globals()
32
32
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -34,22 +34,18 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'graph_pb2', _globals)
34
34
  if not _descriptor._USE_C_DESCRIPTORS:
35
35
  _globals['DESCRIPTOR']._loaded_options = None
36
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
37
  _globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._loaded_options = None
40
38
  _globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_options = b'8\001'
41
39
  _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
40
+ _globals['_GRAPHDEFINITION']._serialized_end=710
41
+ _globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_start=634
42
+ _globals['_GRAPHDEFINITION_TRIGGERTONODESENTRY']._serialized_end=710
43
+ _globals['_NODEDEFINITION']._serialized_start=713
44
+ _globals['_NODEDEFINITION']._serialized_end=853
45
+ _globals['_RETRYPOLICY']._serialized_start=855
46
+ _globals['_RETRYPOLICY']._serialized_end=978
47
+ _globals['_CACHE']._serialized_start=980
48
+ _globals['_CACHE']._serialized_end=1007
49
+ _globals['_TRIGGERMAPPING']._serialized_start=1009
50
+ _globals['_TRIGGERMAPPING']._serialized_end=1040
55
51
  # @@protoc_insertion_point(module_scope)
@@ -18,24 +18,6 @@ DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
18
18
  class GraphDefinition(google.protobuf.message.Message):
19
19
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
20
20
 
21
- @typing.final
22
- class NodesEntry(google.protobuf.message.Message):
23
- DESCRIPTOR: google.protobuf.descriptor.Descriptor
24
-
25
- KEY_FIELD_NUMBER: builtins.int
26
- VALUE_FIELD_NUMBER: builtins.int
27
- key: builtins.str
28
- @property
29
- def value(self) -> global___NodeDefinition: ...
30
- def __init__(
31
- self,
32
- *,
33
- key: builtins.str = ...,
34
- value: global___NodeDefinition | None = ...,
35
- ) -> None: ...
36
- def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
37
- def ClearField(self, field_name: typing.Literal["key", b"key", "value", b"value"]) -> None: ...
38
-
39
21
  @typing.final
40
22
  class TriggerToNodesEntry(google.protobuf.message.Message):
41
23
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
@@ -79,7 +61,7 @@ class GraphDefinition(google.protobuf.message.Message):
79
61
  step_timeout: builtins.float
80
62
  debug: builtins.bool
81
63
  @property
82
- def nodes(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___NodeDefinition]: ...
64
+ def nodes(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NodeDefinition]: ...
83
65
  @property
84
66
  def channels(self) -> types_pb2.Channels: ...
85
67
  @property
@@ -106,7 +88,7 @@ class GraphDefinition(google.protobuf.message.Message):
106
88
  self,
107
89
  *,
108
90
  name: builtins.str = ...,
109
- nodes: collections.abc.Mapping[builtins.str, global___NodeDefinition] | None = ...,
91
+ nodes: collections.abc.Iterable[global___NodeDefinition] | None = ...,
110
92
  channels: types_pb2.Channels | None = ...,
111
93
  input_channels: collections.abc.Iterable[builtins.str] | None = ...,
112
94
  output_channels: collections.abc.Iterable[builtins.str] | None = ...,
@@ -27,7 +27,7 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
27
27
  from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
28
28
 
29
29
 
30
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rruntime.proto\x12\x07runtime\x1a\x0btypes.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"%\n\x12\x41\x64\x64\x45xecutorRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"L\n\x0f\x41\x64\x64GraphRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x0c\x63heckpointer\x18\x02 \x01(\x0b\x32\x15.runtime.Checkpointer\"}\n\x0c\x43heckpointer\x12/\n\x06memory\x18\x02 \x01(\x0b\x32\x1d.runtime.InMemoryCheckpointerH\x00\x12\x31\n\x08postgres\x18\x03 \x01(\x0b\x32\x1d.runtime.PostgresCheckpointerH\x00\x42\t\n\x07message\"\x16\n\x14InMemoryCheckpointer\"1\n\x14PostgresCheckpointer\x12\x19\n\x11\x63onnection_string\x18\x01 \x01(\t\"\xcf\x01\n\rInvokeRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1b\n\x05input\x18\x02 \x01(\x0b\x32\x0c.types.Value\x12%\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x08run_opts\x18\x04 \x01(\x0b\x32\x10.runtime.RunOptsH\x00\x88\x01\x01\x12$\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x0e.types.ContextH\x01\x88\x01\x01\x42\x0b\n\t_run_optsB\n\n\x08_context\"\xcf\x01\n\rStreamRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1b\n\x05input\x18\x02 \x01(\x0b\x32\x0c.types.Value\x12%\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x08run_opts\x18\x04 \x01(\x0b\x32\x10.runtime.RunOptsH\x00\x88\x01\x01\x12$\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x0e.types.ContextH\x01\x88\x01\x01\x42\x0b\n\t_run_optsB\n\n\x08_context\"\xd2\x01\n\x07RunOpts\x12\x13\n\x0boutput_keys\x18\x01 \x03(\t\x12\x18\n\x10interrupt_before\x18\x02 \x03(\t\x12\x17\n\x0finterrupt_after\x18\x03 \x03(\t\x12\x17\n\ndurability\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05\x64\x65\x62ug\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x16\n\tsubgraphs\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12\x13\n\x0bstream_mode\x18\x07 \x03(\tB\r\n\x0b_durabilityB\x08\n\x06_debugB\x0c\n\n_subgraphs\"1\n\tChunkList\x12$\n\x06\x63hunks\x18\x01 \x03(\x0b\x32\x14.runtime.OutputChunk\"\x86\x01\n\x0bOutputChunk\x12#\n\x05\x63hunk\x18\x01 \x01(\x0b\x32\x12.types.StreamChunkH\x00\x12\x1d\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0c.types.ValueH\x00\x12(\n\nchunk_list\x18\x05 \x01(\x0b\x32\x12.runtime.ChunkListH\x00\x42\t\n\x07message\"_\n\x0fGetStateRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.types.RunnableConfig\x12\x11\n\tsubgraphs\x18\x03 \x01(\x08\"7\n\x10GetStateResponse\x12#\n\x05state\x18\x01 \x01(\x0b\x32\x14.types.StateSnapshot\"\xb2\x01\n\x16GetStateHistoryRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x06\x62\x65\x66ore\x18\x04 \x01(\x0b\x32\x15.types.RunnableConfig\x12\r\n\x05limit\x18\x05 \x01(\x03\"@\n\x17GetStateHistoryResponse\x12%\n\x07history\x18\x01 \x03(\x0b\x32\x14.types.StateSnapshot2\x9d\x03\n\x10LangGraphRuntime\x12\x42\n\x0b\x41\x64\x64\x45xecutor\x12\x1b.runtime.AddExecutorRequest\x1a\x16.google.protobuf.Empty\x12<\n\x08\x41\x64\x64Graph\x12\x18.runtime.AddGraphRequest\x1a\x16.google.protobuf.Empty\x12\x36\n\x06Invoke\x12\x16.runtime.InvokeRequest\x1a\x14.runtime.OutputChunk\x12\x38\n\x06Stream\x12\x16.runtime.StreamRequest\x1a\x14.runtime.OutputChunk0\x01\x12?\n\x08GetState\x12\x18.runtime.GetStateRequest\x1a\x19.runtime.GetStateResponse\x12T\n\x0fGetStateHistory\x12\x1f.runtime.GetStateHistoryRequest\x1a .runtime.GetStateHistoryResponseB1Z/github.com/langchain-ai/langgraph-go/runtime/pbb\x06proto3')
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rruntime.proto\x12\x07runtime\x1a\x0btypes.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"%\n\x12\x41\x64\x64\x45xecutorRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\"L\n\x0f\x41\x64\x64GraphRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x0c\x63heckpointer\x18\x02 \x01(\x0b\x32\x15.runtime.Checkpointer\"}\n\x0c\x43heckpointer\x12/\n\x06memory\x18\x02 \x01(\x0b\x32\x1d.runtime.InMemoryCheckpointerH\x00\x12\x31\n\x08postgres\x18\x03 \x01(\x0b\x32\x1d.runtime.PostgresCheckpointerH\x00\x42\t\n\x07message\"\x16\n\x14InMemoryCheckpointer\",\n\x14PostgresCheckpointer\x12\x14\n\x0c\x64\x61tabase_uri\x18\x01 \x01(\t\"\xcf\x01\n\rInvokeRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1b\n\x05input\x18\x02 \x01(\x0b\x32\x0c.types.Value\x12%\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x08run_opts\x18\x04 \x01(\x0b\x32\x10.runtime.RunOptsH\x00\x88\x01\x01\x12$\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x0e.types.ContextH\x01\x88\x01\x01\x42\x0b\n\t_run_optsB\n\n\x08_context\"\xcf\x01\n\rStreamRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12\x1b\n\x05input\x18\x02 \x01(\x0b\x32\x0c.types.Value\x12%\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x08run_opts\x18\x04 \x01(\x0b\x32\x10.runtime.RunOptsH\x00\x88\x01\x01\x12$\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x0e.types.ContextH\x01\x88\x01\x01\x42\x0b\n\t_run_optsB\n\n\x08_context\"\xd2\x01\n\x07RunOpts\x12\x13\n\x0boutput_keys\x18\x01 \x03(\t\x12\x18\n\x10interrupt_before\x18\x02 \x03(\t\x12\x17\n\x0finterrupt_after\x18\x03 \x03(\t\x12\x17\n\ndurability\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05\x64\x65\x62ug\x18\x05 \x01(\x08H\x01\x88\x01\x01\x12\x16\n\tsubgraphs\x18\x06 \x01(\x08H\x02\x88\x01\x01\x12\x13\n\x0bstream_mode\x18\x07 \x03(\tB\r\n\x0b_durabilityB\x08\n\x06_debugB\x0c\n\n_subgraphs\"1\n\tChunkList\x12$\n\x06\x63hunks\x18\x01 \x03(\x0b\x32\x14.runtime.OutputChunk\"\x86\x01\n\x0bOutputChunk\x12#\n\x05\x63hunk\x18\x01 \x01(\x0b\x32\x12.types.StreamChunkH\x00\x12\x1d\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x0c.types.ValueH\x00\x12(\n\nchunk_list\x18\x05 \x01(\x0b\x32\x12.runtime.ChunkListH\x00\x42\t\n\x07message\"_\n\x0fGetStateRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.types.RunnableConfig\x12\x11\n\tsubgraphs\x18\x03 \x01(\x08\"7\n\x10GetStateResponse\x12#\n\x05state\x18\x01 \x01(\x0b\x32\x14.types.StateSnapshot\"\xb2\x01\n\x16GetStateHistoryRequest\x12\x12\n\ngraph_name\x18\x01 \x01(\t\x12%\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x15.types.RunnableConfig\x12\'\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x06\x62\x65\x66ore\x18\x04 \x01(\x0b\x32\x15.types.RunnableConfig\x12\r\n\x05limit\x18\x05 \x01(\x03\"@\n\x17GetStateHistoryResponse\x12%\n\x07history\x18\x01 \x03(\x0b\x32\x14.types.StateSnapshot2\x9d\x03\n\x10LangGraphRuntime\x12\x42\n\x0b\x41\x64\x64\x45xecutor\x12\x1b.runtime.AddExecutorRequest\x1a\x16.google.protobuf.Empty\x12<\n\x08\x41\x64\x64Graph\x12\x18.runtime.AddGraphRequest\x1a\x16.google.protobuf.Empty\x12\x36\n\x06Invoke\x12\x16.runtime.InvokeRequest\x1a\x14.runtime.OutputChunk\x12\x38\n\x06Stream\x12\x16.runtime.StreamRequest\x1a\x14.runtime.OutputChunk0\x01\x12?\n\x08GetState\x12\x18.runtime.GetStateRequest\x1a\x19.runtime.GetStateResponse\x12T\n\x0fGetStateHistory\x12\x1f.runtime.GetStateHistoryRequest\x1a .runtime.GetStateHistoryResponseB1Z/github.com/langchain-ai/langgraph-go/runtime/pbb\x06proto3')
31
31
 
32
32
  _globals = globals()
33
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -44,25 +44,25 @@ if not _descriptor._USE_C_DESCRIPTORS:
44
44
  _globals['_INMEMORYCHECKPOINTER']._serialized_start=342
45
45
  _globals['_INMEMORYCHECKPOINTER']._serialized_end=364
46
46
  _globals['_POSTGRESCHECKPOINTER']._serialized_start=366
47
- _globals['_POSTGRESCHECKPOINTER']._serialized_end=415
48
- _globals['_INVOKEREQUEST']._serialized_start=418
49
- _globals['_INVOKEREQUEST']._serialized_end=625
50
- _globals['_STREAMREQUEST']._serialized_start=628
51
- _globals['_STREAMREQUEST']._serialized_end=835
52
- _globals['_RUNOPTS']._serialized_start=838
53
- _globals['_RUNOPTS']._serialized_end=1048
54
- _globals['_CHUNKLIST']._serialized_start=1050
55
- _globals['_CHUNKLIST']._serialized_end=1099
56
- _globals['_OUTPUTCHUNK']._serialized_start=1102
57
- _globals['_OUTPUTCHUNK']._serialized_end=1236
58
- _globals['_GETSTATEREQUEST']._serialized_start=1238
59
- _globals['_GETSTATEREQUEST']._serialized_end=1333
60
- _globals['_GETSTATERESPONSE']._serialized_start=1335
61
- _globals['_GETSTATERESPONSE']._serialized_end=1390
62
- _globals['_GETSTATEHISTORYREQUEST']._serialized_start=1393
63
- _globals['_GETSTATEHISTORYREQUEST']._serialized_end=1571
64
- _globals['_GETSTATEHISTORYRESPONSE']._serialized_start=1573
65
- _globals['_GETSTATEHISTORYRESPONSE']._serialized_end=1637
66
- _globals['_LANGGRAPHRUNTIME']._serialized_start=1640
67
- _globals['_LANGGRAPHRUNTIME']._serialized_end=2053
47
+ _globals['_POSTGRESCHECKPOINTER']._serialized_end=410
48
+ _globals['_INVOKEREQUEST']._serialized_start=413
49
+ _globals['_INVOKEREQUEST']._serialized_end=620
50
+ _globals['_STREAMREQUEST']._serialized_start=623
51
+ _globals['_STREAMREQUEST']._serialized_end=830
52
+ _globals['_RUNOPTS']._serialized_start=833
53
+ _globals['_RUNOPTS']._serialized_end=1043
54
+ _globals['_CHUNKLIST']._serialized_start=1045
55
+ _globals['_CHUNKLIST']._serialized_end=1094
56
+ _globals['_OUTPUTCHUNK']._serialized_start=1097
57
+ _globals['_OUTPUTCHUNK']._serialized_end=1231
58
+ _globals['_GETSTATEREQUEST']._serialized_start=1233
59
+ _globals['_GETSTATEREQUEST']._serialized_end=1328
60
+ _globals['_GETSTATERESPONSE']._serialized_start=1330
61
+ _globals['_GETSTATERESPONSE']._serialized_end=1385
62
+ _globals['_GETSTATEHISTORYREQUEST']._serialized_start=1388
63
+ _globals['_GETSTATEHISTORYREQUEST']._serialized_end=1566
64
+ _globals['_GETSTATEHISTORYRESPONSE']._serialized_start=1568
65
+ _globals['_GETSTATEHISTORYRESPONSE']._serialized_end=1632
66
+ _globals['_LANGGRAPHRUNTIME']._serialized_start=1635
67
+ _globals['_LANGGRAPHRUNTIME']._serialized_end=2048
68
68
  # @@protoc_insertion_point(module_scope)
@@ -91,14 +91,14 @@ global___InMemoryCheckpointer = InMemoryCheckpointer
91
91
  class PostgresCheckpointer(google.protobuf.message.Message):
92
92
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
93
93
 
94
- CONNECTION_STRING_FIELD_NUMBER: builtins.int
95
- connection_string: builtins.str
94
+ DATABASE_URI_FIELD_NUMBER: builtins.int
95
+ database_uri: builtins.str
96
96
  def __init__(
97
97
  self,
98
98
  *,
99
- connection_string: builtins.str = ...,
99
+ database_uri: builtins.str = ...,
100
100
  ) -> None: ...
101
- def ClearField(self, field_name: typing.Literal["connection_string", b"connection_string"]) -> None: ...
101
+ def ClearField(self, field_name: typing.Literal["database_uri", b"database_uri"]) -> None: ...
102
102
 
103
103
  global___PostgresCheckpointer = PostgresCheckpointer
104
104
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-executor
3
- Version: 0.0.1a0
3
+ Version: 0.0.1a1
4
4
  Summary: LangGraph python RPC server executable by the langgraph-go orchestrator.
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: grpcio>=1.73.1
@@ -1,31 +1,31 @@
1
- langgraph_executor/__init__.py,sha256=508eDu4nPCyqYyg_NQBRjRZmK_68ggYywDmqDMXRF1I,24
1
+ langgraph_executor/__init__.py,sha256=qEdg2MhZc4iFQOS_8-O-er6N8n5kRoiTg9Mrx_ssBJ8,24
2
2
  langgraph_executor/common.py,sha256=w75Bqbrj5LOtiWoOOdIi45yVB05xYXDAnokwg7MgDQE,13688
3
3
  langgraph_executor/example.py,sha256=TcfxgC9VfpZFliWnuVdJMllCDa8ji7vrSCRWnmdsUA8,900
4
- langgraph_executor/execute_task.py,sha256=DmsLHhkfhBYhZeHFq2eWHCkJuK9WfcDSkUQ8a0nwCB0,6932
5
- langgraph_executor/executor.py,sha256=9YI_-meJHz9ei9azWQjZGLzhgHDpa7Xj6Sb9HO01s_w,13242
6
- langgraph_executor/extract_graph.py,sha256=VlbQ6KausNd7ZPtivItMP1g4bYDwhZtttOHtbuFy4Hc,6407
4
+ langgraph_executor/execute_task.py,sha256=-QwlbWlE8uUNFkIVtvcaWUeu4HszDF5fxTixHnE7JZk,7459
5
+ langgraph_executor/executor.py,sha256=vCvEpL1QhPXgz5J2fbyeJ39_98x78cnTp-DU_Js0AAQ,14688
6
+ langgraph_executor/extract_graph.py,sha256=f7NNeZigRQlTAYg_-mV8eBgQ9q8kuThCDwLjRO6wReQ,6365
7
7
  langgraph_executor/info_logger.py,sha256=BUcrg_nui_dN4JBUVyO7jurmCnt8gQ0TOubUNbyvYBk,3095
8
8
  langgraph_executor/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  langgraph_executor/server.py,sha256=avtZzStLiIDvNCKyytFU3E2Li1_TBgz5oyWUBRbPzFk,5200
10
10
  langgraph_executor/setup.sh,sha256=QI505EIya8sjEIohom6GDfFckFqOMF8bIEX-hSWcLUI,627
11
11
  langgraph_executor/stream_utils.py,sha256=snxlEoZe0d4ae3h_6Ct3zNzLV_ugvPANcr4VECYofwk,2974
12
12
  langgraph_executor/pb/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- langgraph_executor/pb/executor_pb2.py,sha256=G9BI0TLB39yACBo2QX3eT0jDbeNFJyEY0IlGuOAeEH8,7783
14
- langgraph_executor/pb/executor_pb2.pyi,sha256=bW6TYrLG8SySVqx1ie-5igw2PEdvHiQLIvnyb59GATc,16575
13
+ langgraph_executor/pb/executor_pb2.py,sha256=cFwtWNUw8jxoKpA8EE2XGHg2uBgZYRInM9VLTD9keuY,8196
14
+ langgraph_executor/pb/executor_pb2.pyi,sha256=CjyrE4iJSReAWokBgD8L4TMj1dZv0PvW8jYMtIFVHWA,17535
15
15
  langgraph_executor/pb/executor_pb2_grpc.py,sha256=IvKDVBWxrWU7Rcntall4KAvpQ8CdLkbljKaCEloimQE,12224
16
16
  langgraph_executor/pb/executor_pb2_grpc.pyi,sha256=iGHLqEpl7FFrBvBmBfbacvl0YgtZf8dH5pBkAaB0d64,5270
17
- langgraph_executor/pb/graph_pb2.py,sha256=FyhQlHv1lIivUL_HoKVxB6x1oXxgdugV2bsKJd55A8o,4430
18
- langgraph_executor/pb/graph_pb2.pyi,sha256=inoFjgLD42hxkG1ORIU3Lrrk57ubdmZZtRw53JZUsGI,10161
17
+ langgraph_executor/pb/graph_pb2.py,sha256=V4by2e0nEN-oF6AeX-SSzgN96d8BbE923p91Cp91UFQ,4021
18
+ langgraph_executor/pb/graph_pb2.pyi,sha256=xmhlJdwZ6g-ckwxjLKEIs7pJPiGIbin9m2rqdKMOWyI,9470
19
19
  langgraph_executor/pb/graph_pb2_grpc.py,sha256=8j8j0GTUo21GL7RO-_UgVPN27DRnAfus0lhTWKI49no,886
20
20
  langgraph_executor/pb/graph_pb2_grpc.pyi,sha256=Dl8kkjhqb6F1Kt24mcFg7ppish4iKVfjRiiBxEjsMMA,413
21
- langgraph_executor/pb/runtime_pb2.py,sha256=tYVvki3PixSiXnrBh53izR9IynGJxtynKtkZs6Aoeu4,6445
22
- langgraph_executor/pb/runtime_pb2.pyi,sha256=QNkLw4OV3IJQjpX3j-t_s6_zkcxMyuYnJCwVPGaBcJ0,14398
21
+ langgraph_executor/pb/runtime_pb2.py,sha256=o6g0hem5Izqslbgy4yQgVrxERaaUTrsOVZfLVD1W0zw,6443
22
+ langgraph_executor/pb/runtime_pb2.pyi,sha256=mcej7UAR7Pxpkl_3Pw4ENg3oGjln6L5-_XHqkpzZFoU,14373
23
23
  langgraph_executor/pb/runtime_pb2_grpc.py,sha256=HKn8fgGT9zTDAS-ZGCk-1AO2QForvCZH_BVnufTS0sM,11791
24
24
  langgraph_executor/pb/runtime_pb2_grpc.pyi,sha256=TeEHQYvJDdypawBFA6JP4OiQ9NFa_RNVKzGwHBSlFNs,4614
25
25
  langgraph_executor/pb/types_pb2.py,sha256=rUboWBthlLM-iJOmZZta-HSekwTNFuXfWLaYHes1918,15570
26
26
  langgraph_executor/pb/types_pb2.pyi,sha256=tBX4LzmfWZ-IYscIeAEBTDC02GWWKEAQVB2JPNHChDc,40957
27
27
  langgraph_executor/pb/types_pb2_grpc.py,sha256=EPv87wCc-6BNJ2xTNcb9d3ictDerK5cBt7qhd7EmJiQ,886
28
28
  langgraph_executor/pb/types_pb2_grpc.pyi,sha256=Dl8kkjhqb6F1Kt24mcFg7ppish4iKVfjRiiBxEjsMMA,413
29
- langgraph_executor-0.0.1a0.dist-info/METADATA,sha256=0v94S42MrwYAAitdIL1UfZGCHb5BVwtcDeFev_I8Ptk,433
30
- langgraph_executor-0.0.1a0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- langgraph_executor-0.0.1a0.dist-info/RECORD,,
29
+ langgraph_executor-0.0.1a1.dist-info/METADATA,sha256=pZesnbhRr1FPbzudYlalRzmxb5sj9ytDzuc5k9PKjrU,433
30
+ langgraph_executor-0.0.1a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
+ langgraph_executor-0.0.1a1.dist-info/RECORD,,