langgraph-api 0.9.0.dev4__py3-none-any.whl → 0.9.0.dev5__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.9.0.dev4"
1
+ __version__ = "0.9.0.dev5"
@@ -230,10 +230,14 @@ class Crons(Authenticated):
230
230
 
231
231
  assistant_filters: list[Any] = []
232
232
  if payload["assistant_id"] not in SYSTEM_ASSISTANT_IDS:
233
+ # Do not populate `metadata` on the AssistantsRead request value:
234
+ # client-supplied cron metadata must not influence the auth
235
+ # decision (defense vs. forged payloads), mirroring Runs.put.
236
+ # The handler is expected to return a filter that is matched
237
+ # against the persisted assistant metadata server-side.
233
238
  assistant_request_data = Auth.types.AssistantsRead(
234
239
  assistant_id=str(payload["assistant_id"])
235
240
  )
236
- assistant_request_data["metadata"] = metadata
237
241
  assistant_filters = await Assistants.handle_event(
238
242
  ctx, "read", assistant_request_data
239
243
  )
@@ -610,18 +610,19 @@ class Runs(Authenticated):
610
610
  create_run_value,
611
611
  )
612
612
  # Automatically enforce assistant ownership for non-system assistants
613
- # by calling the user's assistant search auth handler.
613
+ # by calling the user's assistant read auth handler.
614
614
  assistant_auth_filters: list[pb.AuthFilter] = []
615
615
  if str(assistant_id) not in SYSTEM_ASSISTANT_IDS:
616
616
  ctx_ = ctx or get_auth_ctx()
617
617
  if ctx_ is not None:
618
618
  auth_ctx = Auth.types.AuthContext(
619
619
  resource="assistants",
620
- action="search",
620
+ action="read",
621
621
  user=ctx_.user,
622
622
  permissions=ctx_.permissions,
623
623
  )
624
- raw = await auth_handle_event(auth_ctx, {"metadata": {}})
624
+ read_value = Auth.types.AssistantsRead(assistant_id=str(assistant_id))
625
+ raw = await auth_handle_event(auth_ctx, read_value)
625
626
  if raw:
626
627
  assistant_auth_filters = _filters_to_proto(raw)
627
628
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-api
3
- Version: 0.9.0.dev4
3
+ Version: 0.9.0.dev5
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
@@ -1,4 +1,4 @@
1
- langgraph_api/__init__.py,sha256=etrMz_KrjnLluOQExvb90dAxp4ASQ-MKozOsxgHwg8A,27
1
+ langgraph_api/__init__.py,sha256=9XtPlyblgni-aAJrHqc4ZxP4-jRdjKzHB8EPJHoEIlE,27
2
2
  langgraph_api/_factory_utils.py,sha256=5JsiJbg_YocVSryN2jwoZTg03-eyymlWMK6sKCmXwz0,5756
3
3
  langgraph_api/asgi_transport.py,sha256=XApY3lIWBZTMbbsl8dDJzl0cLGirmAGE0SifqZUnXvs,11896
4
4
  langgraph_api/asyncio.py,sha256=c-YE-14N7_AP1GzifsbP14XnhLsmxT2P916KXruerpI,10573
@@ -88,8 +88,8 @@ langgraph_api/grpc/generated/core_api_pb2.pyi,sha256=0PEzVh8s6rqHq52ekhqPaMI_TOs
88
88
  langgraph_api/grpc/ops/__init__.py,sha256=k2Ehs9LbMgYQp5rZ0QlxVA18OWJJd64UotVrB9GwGnM,18148
89
89
  langgraph_api/grpc/ops/assistants.py,sha256=00vY7Dd7BcXaVp_6UrKZIb5b4tQ8Lm5MxJcEpyVPfo0,13902
90
90
  langgraph_api/grpc/ops/cache.py,sha256=MoPAmSuOwbt2Cud1YZJm_YJeaDHPFy1IiV4m0PDImgg,1399
91
- langgraph_api/grpc/ops/crons.py,sha256=20X2wmg4nf59LUoua-OVBTjHGZmtuxdPEtMNgy3vFUo,19289
92
- langgraph_api/grpc/ops/runs.py,sha256=FvrjSW4WujyNocUQ_c8MkP6FuyFY8geTqgQ7kgeQ5qg,41320
91
+ langgraph_api/grpc/ops/crons.py,sha256=oGPW9qW-J4H9baX7Jsee1opsFnXfThHLHh_N47mDf9s,19596
92
+ langgraph_api/grpc/ops/runs.py,sha256=SN9By4fStKIYM5bpTuBYDhOT_YT0nOtPaMr0QnGQfME,41397
93
93
  langgraph_api/grpc/ops/threads.py,sha256=SJraV838nZ0m6wRrCia7sLYh8KK1WfY7x5xmcspZLek,48140
94
94
  langgraph_api/grpc/servicers/__init__.py,sha256=l8yqTA_gMbIj0xHw5-RZYo0JbjL-EpFD8RxPMgW_-bA,422
95
95
  langgraph_api/grpc/servicers/checkpointer.py,sha256=1gGTQcJrMSXc0sqP69YW9gexvBAeLNPvBQnsvxviI3M,9927
@@ -228,8 +228,8 @@ langgraph_grpc_common/proto/errors_pb2.py,sha256=JI6x-vBK1AE7DHZ5DQwN1mZWF6C4xTR
228
228
  langgraph_grpc_common/proto/errors_pb2.pyi,sha256=rd3-BYUH8V-aO66taL7OOblaLgdrDtf1Vcd38GUoVVM,2181
229
229
  langgraph_grpc_common/proto/errors_pb2_grpc.py,sha256=2-LwQ0OPGo-NtC0269q7Fw6GPBxnTLYWq3xP5Eq0_YA,886
230
230
  langgraph_grpc_common/proto/errors_pb2_grpc.pyi,sha256=uC9Wnq6uyg488QiONpJ0ba1s_iouQCOYsjd_FDd1XUM,495
231
- langgraph_api-0.9.0.dev4.dist-info/METADATA,sha256=g_Fq02B-NpB42hrXkLYufVw6c2jlw3s-u-7GE3tfNog,4516
232
- langgraph_api-0.9.0.dev4.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
233
- langgraph_api-0.9.0.dev4.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
234
- langgraph_api-0.9.0.dev4.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
235
- langgraph_api-0.9.0.dev4.dist-info/RECORD,,
231
+ langgraph_api-0.9.0.dev5.dist-info/METADATA,sha256=oskmhFAWJk4xAzFIUsHE0BXe5cvWLEF7BLJbkSVhKaY,4516
232
+ langgraph_api-0.9.0.dev5.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
233
+ langgraph_api-0.9.0.dev5.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
234
+ langgraph_api-0.9.0.dev5.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
235
+ langgraph_api-0.9.0.dev5.dist-info/RECORD,,