managed-deepagents 0.9.3.dev20__py3-none-win_amd64.whl → 0.9.3.dev22__py3-none-win_amd64.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.
- managed_deepagents/_binaries/mda.exe +0 -0
- managed_deepagents/_runtime_schedules.py +3 -3
- managed_deepagents/_schedule_auth.py +16 -7
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/METADATA +4 -2
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/RECORD +9 -9
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/WHEEL +0 -0
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/entry_points.txt +0 -0
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/licenses/LICENSE +0 -0
- {managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
@@ -34,7 +34,7 @@ from managed_deepagents._identity_runtime import (
|
|
|
34
34
|
resolve_runtime_configurable,
|
|
35
35
|
)
|
|
36
36
|
from managed_deepagents._schedule_auth import (
|
|
37
|
-
|
|
37
|
+
SCHEDULE_LIMIT_PREFIX,
|
|
38
38
|
ExecutionUser,
|
|
39
39
|
ScheduleAccess,
|
|
40
40
|
schedule_request_config,
|
|
@@ -257,8 +257,8 @@ async def _request(ctx: _Context, method: str, path: str, body: object = None) -
|
|
|
257
257
|
detail = json.loads(await response.aread()).get("detail")
|
|
258
258
|
except (ValueError, AttributeError):
|
|
259
259
|
detail = None
|
|
260
|
-
if detail
|
|
261
|
-
raise ValueError(
|
|
260
|
+
if isinstance(detail, str) and detail.startswith(SCHEDULE_LIMIT_PREFIX):
|
|
261
|
+
raise ValueError(detail)
|
|
262
262
|
raise RuntimeError(f"Schedule request failed ({response.status_code})")
|
|
263
263
|
if response.status_code == HTTPStatus.NO_CONTENT:
|
|
264
264
|
return None
|
|
@@ -33,12 +33,8 @@ if TYPE_CHECKING:
|
|
|
33
33
|
_MAX_HANDOFF_SIZE = 8192
|
|
34
34
|
|
|
35
35
|
SCHEDULE_HANDOFF_HEADER = "x-mda-schedule-handoff"
|
|
36
|
-
_MAX_RUNTIME_SCHEDULES = 20
|
|
37
36
|
_SEARCH_PAGE = 100
|
|
38
|
-
|
|
39
|
-
f"Each owner can have at most {_MAX_RUNTIME_SCHEDULES} schedules that have not expired, "
|
|
40
|
-
"paused ones included; delete one before creating another"
|
|
41
|
-
)
|
|
37
|
+
SCHEDULE_LIMIT_PREFIX = "Schedule limit reached"
|
|
42
38
|
|
|
43
39
|
|
|
44
40
|
@with_config(ConfigDict(extra="forbid"))
|
|
@@ -345,12 +341,20 @@ async def _check_persistent_thread(access: ScheduleAccess) -> None:
|
|
|
345
341
|
raise ValueError("Schedule access is not permitted")
|
|
346
342
|
|
|
347
343
|
|
|
344
|
+
def _schedule_limit(owner: str) -> int:
|
|
345
|
+
"""Read ``MDA_MAX_AGENT_SCHEDULES`` or ``MDA_MAX_USER_SCHEDULES``; default 20."""
|
|
346
|
+
name = "MDA_MAX_AGENT_SCHEDULES" if owner == "agent" else "MDA_MAX_USER_SCHEDULES"
|
|
347
|
+
raw = os.environ.get(name, "").strip()
|
|
348
|
+
return int(raw) if re.fullmatch(r"[1-9][0-9]*", raw) else 20
|
|
349
|
+
|
|
350
|
+
|
|
348
351
|
async def _check_schedule_limit(access: ScheduleAccess, cron_id: str | None = None) -> None:
|
|
349
352
|
"""Reject once the owner has the maximum active runtime schedules, not counting ``cron_id``.
|
|
350
353
|
|
|
351
354
|
A timing update can make an expired schedule active again.
|
|
352
355
|
"""
|
|
353
356
|
base, headers = schedule_request_config(access)
|
|
357
|
+
limit = _schedule_limit(access["owner"])
|
|
354
358
|
now = datetime.now(UTC)
|
|
355
359
|
active = offset = 0
|
|
356
360
|
async with httpx.AsyncClient(timeout=15, follow_redirects=False) as client:
|
|
@@ -375,8 +379,13 @@ async def _check_schedule_limit(access: ScheduleAccess, cron_id: str | None = No
|
|
|
375
379
|
if row.get("cron_id") != cron_id
|
|
376
380
|
and not ((end := row.get("end_time")) and datetime.fromisoformat(end) < now)
|
|
377
381
|
)
|
|
378
|
-
if active >=
|
|
379
|
-
raise Auth.exceptions.HTTPException(
|
|
382
|
+
if active >= limit:
|
|
383
|
+
raise Auth.exceptions.HTTPException(
|
|
384
|
+
status_code=409,
|
|
385
|
+
detail=f"{SCHEDULE_LIMIT_PREFIX}: this owner can have at most {limit} "
|
|
386
|
+
"schedules that have not expired, paused ones included; "
|
|
387
|
+
"delete one before creating another",
|
|
388
|
+
)
|
|
380
389
|
if len(rows) < _SEARCH_PAGE:
|
|
381
390
|
return
|
|
382
391
|
offset += _SEARCH_PAGE
|
{managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: managed-deepagents
|
|
3
|
-
Version: 0.9.3.
|
|
3
|
+
Version: 0.9.3.dev22
|
|
4
4
|
Summary: Managed Deep Agents — the define_deep_agent authoring interface plus the CLI that compiles and deploys a code-first Deep Agent repository to a managed LangGraph runtime.
|
|
5
5
|
Author: LangChain
|
|
6
6
|
License: MIT
|
|
@@ -576,7 +576,9 @@ continues the current thread; the other destinations start a new one. Without
|
|
|
576
576
|
schedule to the current thread. Runtime schedules stay when you deploy again.
|
|
577
577
|
|
|
578
578
|
Each owner can have at most 20 runtime schedules per agent, paused ones
|
|
579
|
-
included.
|
|
579
|
+
included. Set `MDA_MAX_AGENT_SCHEDULES` or `MDA_MAX_USER_SCHEDULES` in the
|
|
580
|
+
deployment environment to change the limit for agent-owned or user-owned
|
|
581
|
+
schedules. Expired one-time schedules and schedules defined in code do not count. A run started by
|
|
580
582
|
a schedule can create, list, get, update, and delete schedules like any other run.
|
|
581
583
|
|
|
582
584
|
## Sandbox
|
{managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/RECORD
RENAMED
|
@@ -24,9 +24,9 @@ managed_deepagents/_managed_middleware.py,sha256=LijT0XmqR6lYvg8oiweq63C1bjSjBUZ
|
|
|
24
24
|
managed_deepagents/_managed_tools.py,sha256=fr_fJkk8wN0PZrRnihBsLTLW2Q3L-sFnRz54vD2cBzY,11120
|
|
25
25
|
managed_deepagents/_memory_instructions.py,sha256=s69Shu6vGCXbynozC-SRSJeZrpH5PNowh0sIRKH65XQ,6763
|
|
26
26
|
managed_deepagents/_run_input.py,sha256=heaTTLd9i9D-1blrH-GIi5KmSpQrhrD9_mrtz9bhy48,6613
|
|
27
|
-
managed_deepagents/_runtime_schedules.py,sha256=
|
|
27
|
+
managed_deepagents/_runtime_schedules.py,sha256=_sXmOVgXNhzST-4IiwP_07_kqFmN0WPFxKqMZA8uuCo,27815
|
|
28
28
|
managed_deepagents/_sandbox_proxy.py,sha256=h8EOnBD6F_jH_7ESsO-EzEUDuEPQNorUrIEV1LZASdQ,9567
|
|
29
|
-
managed_deepagents/_schedule_auth.py,sha256=
|
|
29
|
+
managed_deepagents/_schedule_auth.py,sha256=FI2unbQK5UZ8Kv2vyF8gDWsMsHqBn8HEGl5TlORVTuU,15018
|
|
30
30
|
managed_deepagents/_schedule_channel.py,sha256=-LjVxzhqtQJlTVLtYB8OvtKjSuNLIuYHWn2I4veV5VE,1812
|
|
31
31
|
managed_deepagents/_schedule_time.py,sha256=uNyULRjoD0HzPVvV-W772HPb3BYCt0fwEbbT9Ec__Jc,3710
|
|
32
32
|
managed_deepagents/_static_entry.py,sha256=vWVDXb_RwFhHIT4c8fJpUaCqxS_SAJ9Md5IKA8GDrv4,624
|
|
@@ -40,7 +40,7 @@ managed_deepagents/run_context.py,sha256=1Nc3pew_nROgKi18PAKhn7vOAed-PmxArqUTpce
|
|
|
40
40
|
managed_deepagents/runtime.py,sha256=88QmwIzEVCyq4p2BWOmw20xJJLSyemfbPneVfNnx7C0,95214
|
|
41
41
|
managed_deepagents/sandbox.py,sha256=8qaswX6F2LYJX1uGq_7XwAGHZjGOD9VQ0WISqPK_ohs,4734
|
|
42
42
|
managed_deepagents/schedules.py,sha256=-xyzJToGtLOiQMrPp6IcEVtWmZmqZWWHKgjHfDo_DmE,9447
|
|
43
|
-
managed_deepagents/_binaries/mda.exe,sha256=
|
|
43
|
+
managed_deepagents/_binaries/mda.exe,sha256=0xsm2wKdTWAoJDjsAd5SiRwCSXNkIKeC_jXbTX2S-18,4539392
|
|
44
44
|
managed_deepagents/_channels/__init__.py,sha256=mrsTLw4H5xpRsqJxbBxr6WpCVQHsmx782GwIiYQqt-Y,720
|
|
45
45
|
managed_deepagents/_channels/assistant_text.py,sha256=ZLYAF1MQVE5_EN49MoPJdB8Ckf3vNPpXNBhkdA4egF0,3414
|
|
46
46
|
managed_deepagents/_channels/binding.py,sha256=DnxB7FXkbY5B3PCEAGz3JJBCCnQSdWz8PU8ze4fdcZU,5302
|
|
@@ -104,9 +104,9 @@ managed_deepagents/identity/__init__.py,sha256=YMB5p2DRyyY_82gGNVfGHjfjnUFRTtMne
|
|
|
104
104
|
managed_deepagents/identity/claims.py,sha256=prby7r_8Lww3MmoBm8PX6PsSGE3GwSHkr8mVIz_08nU,1180
|
|
105
105
|
managed_deepagents/identity/options.py,sha256=x_yMbXEFR7zXyehEjDHG2qjAlukXjrRBcQLcM6IndLM,2550
|
|
106
106
|
managed_deepagents/identity/supabase.py,sha256=8uobl3WCrQL_ieSXG8KTLf1th7Qjim9liZT50HeaJE0,6026
|
|
107
|
-
managed_deepagents-0.9.3.
|
|
108
|
-
managed_deepagents-0.9.3.
|
|
109
|
-
managed_deepagents-0.9.3.
|
|
110
|
-
managed_deepagents-0.9.3.
|
|
111
|
-
managed_deepagents-0.9.3.
|
|
112
|
-
managed_deepagents-0.9.3.
|
|
107
|
+
managed_deepagents-0.9.3.dev22.dist-info/licenses/LICENSE,sha256=WnPZQQ608ojZUkXl7BW6VbKloIAibZiGm1K6cjeZOL8,1066
|
|
108
|
+
managed_deepagents-0.9.3.dev22.dist-info/METADATA,sha256=VKg2MpysB_1siFkY-e_J3_YwOcKXAnbm5NU2amYqolM,35425
|
|
109
|
+
managed_deepagents-0.9.3.dev22.dist-info/WHEEL,sha256=3I5VVWZdsFlU417aCS2bMRuerS8wsfvBq99MyatBV3A,97
|
|
110
|
+
managed_deepagents-0.9.3.dev22.dist-info/entry_points.txt,sha256=ziZqkKuaDO3qHCjKmBhrx9cm3ok8bZ9xcEDpUTj4unM,53
|
|
111
|
+
managed_deepagents-0.9.3.dev22.dist-info/top_level.txt,sha256=fdBo4O0Hlol_w022tTLB5ftZpamb4yJoQ3MUvjgTGfA,19
|
|
112
|
+
managed_deepagents-0.9.3.dev22.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{managed_deepagents-0.9.3.dev20.dist-info → managed_deepagents-0.9.3.dev22.dist-info}/top_level.txt
RENAMED
|
File without changes
|