langgraph-api 0.18.0.dev14__py3-none-any.whl → 0.19.0.dev1__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_api/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.18.0.dev14"
1
+ __version__ = "0.19.0.dev1"
@@ -16,8 +16,10 @@ import grpc.aio as grpc_aio
16
16
  from langgraph_grpc_common.proto import orchestrator_pb2, orchestrator_pb2_grpc
17
17
 
18
18
  from langgraph_api.asyncio import ValueEvent
19
+ from langgraph_api.encryption.context import set_encryption_context
19
20
  from langgraph_api.errors import UserInterrupt, UserRollback
20
21
  from langgraph_api.graph import collect_graphs_from_env
22
+ from langgraph_api.grpc.ops import encryption_context_from_proto
21
23
  from langgraph_api.grpc.ops.runs import proto_to_run
22
24
  from langgraph_api.serde import json_dumpb
23
25
  from langgraph_api.worker_runtime import (
@@ -112,7 +114,12 @@ async def _run_graph(
112
114
  attempt: int,
113
115
  failed_attempts: int,
114
116
  cancel: ValueEvent,
117
+ encryption_context: dict[str, Any] | None = None,
115
118
  ) -> AsyncIterator[orchestrator_pb2.ExecutorMessage]:
119
+ # Claimed run context for custom encryption key derivation. Always set:
120
+ # this task is reused across dispatches, unlike worker.py. Do not log;
121
+ # metadata is tenant/user key material.
122
+ set_encryption_context(encryption_context or {})
116
123
  tracker = RunCheckpointTracker()
117
124
  temporary = run["kwargs"].get("temporary", False)
118
125
  try:
@@ -235,7 +242,16 @@ async def _dispatch_once(stub: orchestrator_pb2_grpc.OrchestratorStub) -> bool:
235
242
  return True
236
243
 
237
244
  async with aclosing(
238
- _run_graph(run, execute.attempt, execute.failed_attempts, cancel)
245
+ _run_graph(
246
+ run,
247
+ execute.attempt,
248
+ execute.failed_attempts,
249
+ cancel,
250
+ encryption_context=encryption_context_from_proto(
251
+ execute.encryption_context
252
+ )
253
+ or None,
254
+ )
239
255
  ) as results:
240
256
  async for result in results:
241
257
  if not await _try_write(call, result):
@@ -257,6 +273,14 @@ async def _dispatch_once(stub: orchestrator_pb2_grpc.OrchestratorStub) -> bool:
257
273
  async def _bootstrap() -> None:
258
274
  from langgraph_api import _checkpointer as api_checkpointer # noqa: PLC0415
259
275
  from langgraph_api import store as api_store # noqa: PLC0415
276
+ from langgraph_api.asyncio import set_event_loop # noqa: PLC0415
277
+
278
+ # ASGITransport hops loopback onto _MAIN_LOOP (same as runtime lifespan).
279
+ # The executor does not enter API lifespan, so set the pointer here on
280
+ # the loop that starts the pools and later runs stream_run.
281
+ # get_client() with no URL imports langgraph_api.server itself.
282
+ set_event_loop(asyncio.get_running_loop())
283
+
260
284
  from langgraph_runtime import database # noqa: PLC0415
261
285
 
262
286
  await database.start_pool()
@@ -158,24 +158,24 @@ def build_encryption_context(model: str) -> enc_pb.EncryptionContext | None:
158
158
  return enc_ctx
159
159
 
160
160
 
161
+ def encryption_context_from_proto(
162
+ enc_ctx: enc_pb.EncryptionContext | None,
163
+ ) -> dict[str, Any]:
164
+ """Decode EncryptionContext proto metadata into the dict set_encryption_context expects."""
165
+ encryption_context: dict[str, Any] = {}
166
+ if not enc_ctx or not enc_ctx.metadata:
167
+ return encryption_context
168
+ for key, value_bytes in enc_ctx.metadata.items():
169
+ try:
170
+ encryption_context[key] = orjson.loads(value_bytes)
171
+ except Exception:
172
+ encryption_context[key] = value_bytes
173
+ return encryption_context
174
+
175
+
161
176
  def extract_encryption_context(run_with_attempt: pb.RunWithAttempt) -> dict[str, Any]:
162
177
  """Extract the encryption context from a gRPC EncryptionContext proto message."""
163
- # Extract encryption context if present
164
- encryption_context = {}
165
- if (
166
- run_with_attempt.encryption_context
167
- and run_with_attempt.encryption_context.metadata
168
- ):
169
- for (
170
- key,
171
- value_bytes,
172
- ) in run_with_attempt.encryption_context.metadata.items():
173
- try:
174
- encryption_context[key] = orjson.loads(value_bytes)
175
- except Exception:
176
- # If we can't decode, keep as bytes
177
- encryption_context[key] = value_bytes
178
- return encryption_context
178
+ return encryption_context_from_proto(run_with_attempt.encryption_context)
179
179
 
180
180
 
181
181
  def _handle_grpc_error(error: AioRpcError) -> None:
langgraph_api/server.py CHANGED
@@ -23,7 +23,7 @@ from starlette.applications import Starlette
23
23
  from starlette.middleware import Middleware
24
24
  from starlette.middleware.cors import CORSMiddleware
25
25
  from starlette.routing import BaseRoute, Mount
26
- from starlette.types import Receive, Scope, Send
26
+ from starlette.types import ASGIApp, Receive, Scope, Send
27
27
 
28
28
  import langgraph_api.config as config
29
29
  from langgraph_api.api import (
@@ -97,23 +97,42 @@ def update_openapi_spec(app):
97
97
  set_custom_spec(spec)
98
98
 
99
99
 
100
+ def _with_leaf_path_params(route: BaseRoute, app: ASGIApp) -> ASGIApp:
101
+ """Resolves FastAPI 0.137+ included-router path params before middleware runs."""
102
+
103
+ async def resolved(scope: Scope, receive: Receive, send: Send) -> None:
104
+ # Uses FastAPI's private `_IncludedRouter._match`; CI exercises this path on latest FastAPI.
105
+ branch, child_scope = route, {}
106
+ while isinstance(branch, type(route)):
107
+ _, child_scope, branch, _ = branch._match(scope)
108
+ if "path_params" in child_scope:
109
+ scope["path_params"] = child_scope["path_params"]
110
+ await app(scope, receive, send)
111
+
112
+ return resolved
113
+
114
+
100
115
  def apply_middleware(
101
116
  routes: list[BaseRoute], middleware: list[Middleware]
102
117
  ) -> list[BaseRoute]:
103
- """Applies middleware to a list of routes.
104
-
105
- Routes are modified in place (only the `app` attribute is modified);
106
- the modified routes are returned for convenience.
107
- """
108
- middleware_routes = []
118
+ """Applies middleware to routes in place, preserving route metadata."""
109
119
  for route in routes:
120
+ # Routes with an `app` are wrapped after matching and the method check;
121
+ # app-less FastAPI 0.137+ included routers are wrapped at `handle`.
122
+ attr = "app" if hasattr(route, "app") else "handle"
123
+ wrapped = getattr(route, attr)
110
124
  for cls, args, kwargs in reversed(middleware):
111
- if hasattr(route, "app"):
112
- route.app = cls(route.app, *args, **kwargs)
125
+ wrapped = cls(wrapped, *args, **kwargs)
126
+ if attr == "handle" and middleware:
127
+ if hasattr(route, "_match"):
128
+ wrapped = _with_leaf_path_params(route, wrapped)
113
129
  else:
114
- raise ValueError(f"Cannot apply middleware: route {route} has no app")
115
- middleware_routes.append(route)
116
- return middleware_routes
130
+ logger.warning(
131
+ "Middleware cannot resolve path params for route",
132
+ route_type=type(route).__name__,
133
+ )
134
+ setattr(route, attr, wrapped)
135
+ return routes
117
136
 
118
137
 
119
138
  def validate_router_lifespan_hooks(router: typing.Any) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.18.0.dev14
3
+ Version: 0.19.0.dev1
4
4
  Author-email: Will Fu-Hinthorn <will@langchain.dev>, Josh Rogers <josh@langchain.dev>, Parker Rule <parker@langchain.dev>
5
5
  License: Elastic-2.0
6
6
  License-File: LICENSE
@@ -17,7 +17,7 @@ Requires-Dist: jsonschema-rs<0.45,>=0.35.0
17
17
  Requires-Dist: langchain-core>=0.3.64
18
18
  Requires-Dist: langchain-protocol<0.1,>=0.0.18
19
19
  Requires-Dist: langgraph-checkpoint<5,>=3.0.1
20
- Requires-Dist: langgraph-runtime-inmem<0.39.0.dev0,>=0.38.0.dev0
20
+ Requires-Dist: langgraph-runtime-inmem<0.40.0.dev0,>=0.39.0.dev0
21
21
  Requires-Dist: langgraph-sdk>=0.4.4
22
22
  Requires-Dist: langgraph<2,>=0.4.10
23
23
  Requires-Dist: langsmith[otel]>=0.6.3
@@ -1,4 +1,4 @@
1
- langgraph_api/__init__.py,sha256=zv1xCdlBnNXrWdY6uZZEHPQ6QTC8EPhBvpamvZNDoYo,29
1
+ langgraph_api/__init__.py,sha256=M3VEOvigObbwk6P59vFF1BinDCBC8ZKVvjJQebbGyB4,28
2
2
  langgraph_api/_factory_utils.py,sha256=_FqW0olMu2PGLsnRq0ylt3a4jDCe12YIFHExMXI6Nyo,5976
3
3
  langgraph_api/asgi_transport.py,sha256=XApY3lIWBZTMbbsl8dDJzl0cLGirmAGE0SifqZUnXvs,11896
4
4
  langgraph_api/asyncio.py,sha256=uC6et0GgUd3YHGMOw31bldbIvo0_8BTeiLLM74TZDlU,12742
@@ -29,7 +29,7 @@ langgraph_api/schema.py,sha256=bbKrHHHxJasf_DT44nPfyslbtfOClCoFWAizpohcFJ4,12528
29
29
  langgraph_api/self_hosted_logs.py,sha256=CSWJH-Qrt99AFQw1-8u78wgKDkbyByQ-0tXfP2PDzGs,6096
30
30
  langgraph_api/self_hosted_metrics.py,sha256=Ez1RkraEH_23VW19SpXnKTvSBmLxZvE6pJEw6ON6PwU,20043
31
31
  langgraph_api/serde.py,sha256=sMjrORY2WCNmZEXDaE3lydi1un686qR1E_Wxw4mFgjU,9144
32
- langgraph_api/server.py,sha256=_DG7dCL2wtlaXdppTce2e0k8PunCcSRj79ncQfqmK_Q,10305
32
+ langgraph_api/server.py,sha256=9WfBir5cgkaO-mUwIuv-XsteR4aTuSiKevhW8vXYt_Y,11262
33
33
  langgraph_api/sse.py,sha256=wF80kUI6KOPX7SATUvRxIAwpoJFN5rrien9FY1dRSgE,6477
34
34
  langgraph_api/state.py,sha256=Py8HG8k7u0FRAj4Ok89_uR9GerkyeFm90gSMTbWWQX0,8356
35
35
  langgraph_api/store.py,sha256=OXcdQSVCDKOzfS8S2aJHXbfuI5iYRoQBiW9WYKnCyx8,7122
@@ -105,12 +105,12 @@ langgraph_api/event_streaming/session.py,sha256=Lop4AD1CQTQGwg_yGpi4OLvLvTVaGmq5
105
105
  langgraph_api/event_streaming/state_normalizers.py,sha256=vgT4O4tJPr9VDBMn1EP994ieDGDYP43sROnOyLjkEAE,13659
106
106
  langgraph_api/event_streaming/types.py,sha256=RyZqfqgH-jmmmmAFQj5f6nH9M1rGK93zVG7nlmvqZgc,3647
107
107
  langgraph_api/executor/__init__.py,sha256=mZBT8HSqe9pMlBpE7sw6DMI4ULB4xwNPWGkN9zp1B7k,302
108
- langgraph_api/executor/__main__.py,sha256=SVFlKw4DVO8Raj_kNg7RkG_d3-tPt3qmEKgRDyrN80k,12239
108
+ langgraph_api/executor/__main__.py,sha256=hBFU_zq-7yRahnFviAlYmEJE-jlfHw649IXETSyqgBY,13313
109
109
  langgraph_api/grpc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
110
110
  langgraph_api/grpc/client.py,sha256=L-FM_NrfO-pJHIk71g-rbIcR10tzCzJPv9VOszZoIkc,16100
111
111
  langgraph_api/grpc/server.py,sha256=Fknr6BJbdSK38wF7B1vPDplK25KB_UfMB9Fp1er6DPU,8366
112
112
  langgraph_api/grpc/generated/core_api_pb2.pyi,sha256=0PEzVh8s6rqHq52ekhqPaMI_TOsP4_xuUUv9_XS7r1w,54758
113
- langgraph_api/grpc/ops/__init__.py,sha256=KQL4w0xjvkCVz4j770QQVuP7MQh6qPaTZnxlO3KmoiA,18754
113
+ langgraph_api/grpc/ops/__init__.py,sha256=6L07YhOGORfLu4fnVHEsXiQXiFA6xrLESGGBFb1biLE,18828
114
114
  langgraph_api/grpc/ops/assistants.py,sha256=T6ZIDfCkeiXvoHJyq-bUnl0j57-xLDrGwk0n-vFspz0,14199
115
115
  langgraph_api/grpc/ops/cache.py,sha256=MoPAmSuOwbt2Cud1YZJm_YJeaDHPFy1IiV4m0PDImgg,1399
116
116
  langgraph_api/grpc/ops/crons.py,sha256=aDlvNVYIfSP8gtr5NptLiAj-bfMtJOuMWYIA2NifWm0,19713
@@ -259,16 +259,16 @@ langgraph_grpc_common/proto/errors_pb2.py,sha256=b9RXbUmBpxuUSrBF6tSFAThRlKan3PB
259
259
  langgraph_grpc_common/proto/errors_pb2.pyi,sha256=rd3-BYUH8V-aO66taL7OOblaLgdrDtf1Vcd38GUoVVM,2181
260
260
  langgraph_grpc_common/proto/errors_pb2_grpc.py,sha256=ipvQ8CSnoewtfA_Y7uT14d6nrr-Q86f71vF-TfSrJl0,886
261
261
  langgraph_grpc_common/proto/errors_pb2_grpc.pyi,sha256=uC9Wnq6uyg488QiONpJ0ba1s_iouQCOYsjd_FDd1XUM,495
262
- langgraph_grpc_common/proto/orchestrator_pb2.py,sha256=E9UrdpeDtEwVK5tbX8ZUthb75bdJhREA7lkaY2YhxEQ,3314
263
- langgraph_grpc_common/proto/orchestrator_pb2.pyi,sha256=pfapHIUrcoiVR0p2eZyAh1OzcGE09NWmu31mzacQc2c,7752
262
+ langgraph_grpc_common/proto/orchestrator_pb2.py,sha256=76bHsFbgRxd-LvfQuyY6poDWhoWXVBLUr8y-uaYTX4M,3486
263
+ langgraph_grpc_common/proto/orchestrator_pb2.pyi,sha256=6WVGP0Lkf9qDwyV2OwNqeEMI1AqIezlCPhgbnj_DnBY,8354
264
264
  langgraph_grpc_common/proto/orchestrator_pb2_grpc.py,sha256=CefJAsnqkagiKfnLldQplJkrosUSlmmTmrlxwBfiE6Y,4112
265
265
  langgraph_grpc_common/proto/orchestrator_pb2_grpc.pyi,sha256=W_X9rYNVF8dwhWoM-AbMOq8q3f1fCuXrBYQPSggw628,3827
266
266
  langgraph_grpc_common/proto/store_pb2.py,sha256=VWJ7wtzL9pVmZZKbxMzOzCoiFn58bB2g8L6F7aT63Ow,8260
267
267
  langgraph_grpc_common/proto/store_pb2.pyi,sha256=atXejijuYEb9tE0stGQdZcfA9ucMFj-ytTMwvkxwviM,29322
268
268
  langgraph_grpc_common/proto/store_pb2_grpc.py,sha256=Kyt8eV2NXkjh3be_BYytGdD19kNf74961cruonMvCrw,3300
269
269
  langgraph_grpc_common/proto/store_pb2_grpc.pyi,sha256=oS1h2cDoq2OjyM8xazcmc8LwRDC5oCAD0zto2QUmPQw,2027
270
- langgraph_api-0.18.0.dev14.dist-info/METADATA,sha256=avJ8es63JRVpXdozERxdkyGGtUaLz-r7hHAbOj5w_xU,5940
271
- langgraph_api-0.18.0.dev14.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
272
- langgraph_api-0.18.0.dev14.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
273
- langgraph_api-0.18.0.dev14.dist-info/licenses/LICENSE,sha256=SCVQGLQfwOllsRFa9-Z3m8IYu4pnR9Vh2oANUCJiKqI,3860
274
- langgraph_api-0.18.0.dev14.dist-info/RECORD,,
270
+ langgraph_api-0.19.0.dev1.dist-info/METADATA,sha256=6E3a5A5326VS22Ix2iEEVhWS8kWBeEfSD7_kqWSv6BU,5939
271
+ langgraph_api-0.19.0.dev1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
272
+ langgraph_api-0.19.0.dev1.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
273
+ langgraph_api-0.19.0.dev1.dist-info/licenses/LICENSE,sha256=SCVQGLQfwOllsRFa9-Z3m8IYu4pnR9Vh2oANUCJiKqI,3860
274
+ langgraph_api-0.19.0.dev1.dist-info/RECORD,,
@@ -23,9 +23,10 @@ _sym_db = _symbol_database.Default()
23
23
 
24
24
 
25
25
  from . import core_api_pb2 as core__api__pb2
26
+ from . import encryption_pb2 as encryption__pb2
26
27
 
27
28
 
28
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12orchestrator.proto\x12\x0corchestrator\x1a\x0e\x63ore-api.proto\"\xa6\x01\n\x13OrchestratorMessage\x12/\n\x07\x65xecute\x18\x01 \x01(\x0b\x32\x1c.orchestrator.ExecuteRequestH\x00\x12-\n\x06\x63\x61ncel\x18\x02 \x01(\x0b\x32\x1b.orchestrator.CancelRequestH\x00\x12(\n\x07release\x18\x03 \x01(\x0b\x32\x15.orchestrator.ReleaseH\x00\x42\x05\n\x03msg\"\t\n\x07Release\"U\n\x0e\x45xecuteRequest\x12\x19\n\x03run\x18\x01 \x01(\x0b\x32\x0c.coreApi.Run\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\x05\x12\x17\n\x0f\x66\x61iled_attempts\x18\x03 \x01(\x05\"\x1f\n\rCancelRequest\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\"b\n\x0f\x45xecutorMessage\x12$\n\x05\x63hunk\x18\x01 \x01(\x0b\x32\x13.orchestrator.ChunkH\x00\x12\"\n\x04\x64one\x18\x02 \x01(\x0b\x32\x12.orchestrator.DoneH\x00\x42\x05\n\x03msg\"%\n\x05\x43hunk\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06packet\x18\x02 \x01(\x0c\"X\n\x04\x44one\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x17\n\x0f\x63heckpoint_json\x18\x03 \x01(\x0c\x12\x16\n\x0e\x65xception_json\x18\x04 \x01(\x0c\x32`\n\x0cOrchestrator\x12P\n\x08\x44ispatch\x12\x1d.orchestrator.ExecutorMessage\x1a!.orchestrator.OrchestratorMessage(\x01\x30\x01\x42\x42Z@github.com/langchain-ai/langgraph-api/core/internal/executors/pbb\x06proto3')
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12orchestrator.proto\x12\x0corchestrator\x1a\x0e\x63ore-api.proto\x1a\x10\x65ncryption.proto\"\xa6\x01\n\x13OrchestratorMessage\x12/\n\x07\x65xecute\x18\x01 \x01(\x0b\x32\x1c.orchestrator.ExecuteRequestH\x00\x12-\n\x06\x63\x61ncel\x18\x02 \x01(\x0b\x32\x1b.orchestrator.CancelRequestH\x00\x12(\n\x07release\x18\x03 \x01(\x0b\x32\x15.orchestrator.ReleaseH\x00\x42\x05\n\x03msg\"\t\n\x07Release\"\x90\x01\n\x0e\x45xecuteRequest\x12\x19\n\x03run\x18\x01 \x01(\x0b\x32\x0c.coreApi.Run\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\x05\x12\x17\n\x0f\x66\x61iled_attempts\x18\x03 \x01(\x05\x12\x39\n\x12\x65ncryption_context\x18\x04 \x01(\x0b\x32\x1d.encryption.EncryptionContext\"\x1f\n\rCancelRequest\x12\x0e\n\x06\x61\x63tion\x18\x01 \x01(\t\"b\n\x0f\x45xecutorMessage\x12$\n\x05\x63hunk\x18\x01 \x01(\x0b\x32\x13.orchestrator.ChunkH\x00\x12\"\n\x04\x64one\x18\x02 \x01(\x0b\x32\x12.orchestrator.DoneH\x00\x42\x05\n\x03msg\"%\n\x05\x43hunk\x12\x0c\n\x04mode\x18\x01 \x01(\t\x12\x0e\n\x06packet\x18\x02 \x01(\x0c\"X\n\x04\x44one\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x17\n\x0f\x63heckpoint_json\x18\x03 \x01(\x0c\x12\x16\n\x0e\x65xception_json\x18\x04 \x01(\x0c\x32`\n\x0cOrchestrator\x12P\n\x08\x44ispatch\x12\x1d.orchestrator.ExecutorMessage\x1a!.orchestrator.OrchestratorMessage(\x01\x30\x01\x42\x42Z@github.com/langchain-ai/langgraph-api/core/internal/executors/pbb\x06proto3')
29
30
 
30
31
  _globals = globals()
31
32
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -33,20 +34,20 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'orchestrator_pb2', _globals
33
34
  if not _descriptor._USE_C_DESCRIPTORS:
34
35
  _globals['DESCRIPTOR']._loaded_options = None
35
36
  _globals['DESCRIPTOR']._serialized_options = b'Z@github.com/langchain-ai/langgraph-api/core/internal/executors/pb'
36
- _globals['_ORCHESTRATORMESSAGE']._serialized_start=53
37
- _globals['_ORCHESTRATORMESSAGE']._serialized_end=219
38
- _globals['_RELEASE']._serialized_start=221
39
- _globals['_RELEASE']._serialized_end=230
40
- _globals['_EXECUTEREQUEST']._serialized_start=232
41
- _globals['_EXECUTEREQUEST']._serialized_end=317
42
- _globals['_CANCELREQUEST']._serialized_start=319
43
- _globals['_CANCELREQUEST']._serialized_end=350
44
- _globals['_EXECUTORMESSAGE']._serialized_start=352
45
- _globals['_EXECUTORMESSAGE']._serialized_end=450
46
- _globals['_CHUNK']._serialized_start=452
47
- _globals['_CHUNK']._serialized_end=489
48
- _globals['_DONE']._serialized_start=491
49
- _globals['_DONE']._serialized_end=579
50
- _globals['_ORCHESTRATOR']._serialized_start=581
51
- _globals['_ORCHESTRATOR']._serialized_end=677
37
+ _globals['_ORCHESTRATORMESSAGE']._serialized_start=71
38
+ _globals['_ORCHESTRATORMESSAGE']._serialized_end=237
39
+ _globals['_RELEASE']._serialized_start=239
40
+ _globals['_RELEASE']._serialized_end=248
41
+ _globals['_EXECUTEREQUEST']._serialized_start=251
42
+ _globals['_EXECUTEREQUEST']._serialized_end=395
43
+ _globals['_CANCELREQUEST']._serialized_start=397
44
+ _globals['_CANCELREQUEST']._serialized_end=428
45
+ _globals['_EXECUTORMESSAGE']._serialized_start=430
46
+ _globals['_EXECUTORMESSAGE']._serialized_end=528
47
+ _globals['_CHUNK']._serialized_start=530
48
+ _globals['_CHUNK']._serialized_end=567
49
+ _globals['_DONE']._serialized_start=569
50
+ _globals['_DONE']._serialized_end=657
51
+ _globals['_ORCHESTRATOR']._serialized_start=659
52
+ _globals['_ORCHESTRATOR']._serialized_end=755
52
53
  # @@protoc_insertion_point(module_scope)
@@ -7,6 +7,7 @@ from google.protobuf import descriptor as _descriptor
7
7
  from google.protobuf import message as _message
8
8
  import builtins as _builtins
9
9
  from . import core_api_pb2 as _core_api_pb2
10
+ from . import encryption_pb2 as _encryption_pb2
10
11
  import sys
11
12
  import typing as _typing
12
13
 
@@ -71,6 +72,7 @@ class ExecuteRequest(_message.Message):
71
72
  RUN_FIELD_NUMBER: _builtins.int
72
73
  ATTEMPT_FIELD_NUMBER: _builtins.int
73
74
  FAILED_ATTEMPTS_FIELD_NUMBER: _builtins.int
75
+ ENCRYPTION_CONTEXT_FIELD_NUMBER: _builtins.int
74
76
  attempt: _builtins.int
75
77
  failed_attempts: _builtins.int
76
78
  """Claims that were not cooperative drains. fetch_checkpoint_after_failure
@@ -81,16 +83,24 @@ class ExecuteRequest(_message.Message):
81
83
  def run(self) -> _core_api_pb2.Run:
82
84
  """Same coreApi.Run the HTTP/API path gets via proto_to_run."""
83
85
 
86
+ @_builtins.property
87
+ def encryption_context(self) -> _encryption_pb2.EncryptionContext:
88
+ """Request-scoped custom-encryption metadata claimed with the run. Same
89
+ payload RunWithAttempt.encryption_context carries to the in-process
90
+ worker. Absent when the run has no context (including AES-only).
91
+ """
92
+
84
93
  def __init__(
85
94
  self,
86
95
  *,
87
96
  run: _core_api_pb2.Run | None = ...,
88
97
  attempt: _builtins.int = ...,
89
98
  failed_attempts: _builtins.int = ...,
99
+ encryption_context: _encryption_pb2.EncryptionContext | None = ...,
90
100
  ) -> None: ...
91
- _HasFieldArgType: _TypeAlias = _typing.Literal["run", b"run"] # noqa: Y015
101
+ _HasFieldArgType: _TypeAlias = _typing.Literal["encryption_context", b"encryption_context", "run", b"run"] # noqa: Y015
92
102
  def HasField(self, field_name: _HasFieldArgType) -> _builtins.bool: ...
93
- _ClearFieldArgType: _TypeAlias = _typing.Literal["attempt", b"attempt", "failed_attempts", b"failed_attempts", "run", b"run"] # noqa: Y015
103
+ _ClearFieldArgType: _TypeAlias = _typing.Literal["attempt", b"attempt", "encryption_context", b"encryption_context", "failed_attempts", b"failed_attempts", "run", b"run"] # noqa: Y015
94
104
  def ClearField(self, field_name: _ClearFieldArgType) -> None: ...
95
105
  def WhichOneof(self, oneof_group: _Never) -> None: ...
96
106