langgraph-api 0.2.85__py3-none-any.whl → 0.2.88__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.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/api/mcp.py +2 -1
- langgraph_api/auth/langsmith/backend.py +30 -3
- langgraph_api/config.py +5 -1
- langgraph_api/http.py +3 -3
- langgraph_api/js/client.mts +2 -1
- langgraph_api/js/traceblock.mts +25 -0
- langgraph_api/models/run.py +3 -2
- langgraph_api/traceblock.py +22 -0
- langgraph_api/utils/cache.py +58 -0
- langgraph_api/worker.py +39 -27
- {langgraph_api-0.2.85.dist-info → langgraph_api-0.2.88.dist-info}/METADATA +2 -2
- {langgraph_api-0.2.85.dist-info → langgraph_api-0.2.88.dist-info}/RECORD +17 -14
- langgraph_license/validation.py +6 -1
- {langgraph_api-0.2.85.dist-info → langgraph_api-0.2.88.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.85.dist-info → langgraph_api-0.2.88.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.2.85.dist-info → langgraph_api-0.2.88.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.88"
|
langgraph_api/api/mcp.py
CHANGED
|
@@ -385,11 +385,12 @@ async def handle_tools_list(
|
|
|
385
385
|
seen_names.add(name)
|
|
386
386
|
|
|
387
387
|
schemas = await client.assistants.get_schemas(id_, headers=request.headers)
|
|
388
|
+
description = assistant.get("description") or ""
|
|
388
389
|
tools.append(
|
|
389
390
|
{
|
|
390
391
|
"name": name,
|
|
391
392
|
"inputSchema": schemas.get("input_schema", {}),
|
|
392
|
-
"description":
|
|
393
|
+
"description": description,
|
|
393
394
|
},
|
|
394
395
|
)
|
|
395
396
|
|
|
@@ -23,7 +23,24 @@ class AuthDict(TypedDict):
|
|
|
23
23
|
user_email: NotRequired[str]
|
|
24
24
|
|
|
25
25
|
|
|
26
|
+
class AuthCacheEntry(TypedDict):
|
|
27
|
+
credentials: AuthCredentials
|
|
28
|
+
user: StudioUser
|
|
29
|
+
|
|
30
|
+
|
|
26
31
|
class LangsmithAuthBackend(AuthenticationBackend):
|
|
32
|
+
def __init__(self):
|
|
33
|
+
from langgraph_api.utils.cache import LRUCache
|
|
34
|
+
|
|
35
|
+
self._cache = LRUCache[AuthCacheEntry](max_size=1000, ttl=60)
|
|
36
|
+
|
|
37
|
+
def _get_cache_key(self, headers):
|
|
38
|
+
"""Generate cache key from authentication headers"""
|
|
39
|
+
relevant_headers = tuple(
|
|
40
|
+
(name, value) for name, value in headers if value is not None
|
|
41
|
+
)
|
|
42
|
+
return str(hash(relevant_headers))
|
|
43
|
+
|
|
27
44
|
async def authenticate(
|
|
28
45
|
self, conn: HTTPConnection
|
|
29
46
|
) -> tuple[AuthCredentials, BaseUser] | None:
|
|
@@ -37,6 +54,12 @@ class LangsmithAuthBackend(AuthenticationBackend):
|
|
|
37
54
|
]
|
|
38
55
|
if not any(h[1] for h in headers):
|
|
39
56
|
raise AuthenticationError("Missing authentication headers")
|
|
57
|
+
|
|
58
|
+
# Check cache first
|
|
59
|
+
cache_key = self._get_cache_key(headers)
|
|
60
|
+
if cached_entry := self._cache.get(cache_key):
|
|
61
|
+
return cached_entry["credentials"], cached_entry["user"]
|
|
62
|
+
|
|
40
63
|
async with auth_client() as auth:
|
|
41
64
|
if not LANGSMITH_AUTH_VERIFY_TENANT_ID and not conn.headers.get(
|
|
42
65
|
"x-api-key"
|
|
@@ -66,6 +89,10 @@ class LangsmithAuthBackend(AuthenticationBackend):
|
|
|
66
89
|
if auth_dict["tenant_id"] != LANGSMITH_TENANT_ID:
|
|
67
90
|
raise AuthenticationError("Invalid tenant ID")
|
|
68
91
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
92
|
+
credentials = AuthCredentials(["authenticated"])
|
|
93
|
+
user = StudioUser(auth_dict.get("user_id"), is_authenticated=True)
|
|
94
|
+
|
|
95
|
+
# Cache the result
|
|
96
|
+
self._cache.set(cache_key, AuthCacheEntry(credentials=credentials, user=user))
|
|
97
|
+
|
|
98
|
+
return credentials, user
|
langgraph_api/config.py
CHANGED
|
@@ -6,6 +6,8 @@ import orjson
|
|
|
6
6
|
from starlette.config import Config, undefined
|
|
7
7
|
from starlette.datastructures import CommaSeparatedStrings
|
|
8
8
|
|
|
9
|
+
from langgraph_api import traceblock
|
|
10
|
+
|
|
9
11
|
# types
|
|
10
12
|
|
|
11
13
|
|
|
@@ -173,7 +175,7 @@ LANGGRAPH_AES_KEY = env("LANGGRAPH_AES_KEY", default=None, cast=_get_encryption_
|
|
|
173
175
|
# redis
|
|
174
176
|
REDIS_URI = env("REDIS_URI", cast=str)
|
|
175
177
|
REDIS_CLUSTER = env("REDIS_CLUSTER", cast=bool, default=False)
|
|
176
|
-
REDIS_MAX_CONNECTIONS = env("REDIS_MAX_CONNECTIONS", cast=int, default=
|
|
178
|
+
REDIS_MAX_CONNECTIONS = env("REDIS_MAX_CONNECTIONS", cast=int, default=2000)
|
|
177
179
|
REDIS_CONNECT_TIMEOUT = env("REDIS_CONNECT_TIMEOUT", cast=float, default=10.0)
|
|
178
180
|
REDIS_MAX_IDLE_TIME = env("REDIS_MAX_IDLE_TIME", cast=float, default=120.0)
|
|
179
181
|
REDIS_KEY_PREFIX = env("REDIS_KEY_PREFIX", cast=str, default="")
|
|
@@ -372,3 +374,5 @@ if not os.getenv("LANGCHAIN_REVISION_ID") and (
|
|
|
372
374
|
# This is respected by the langsmith SDK env inference
|
|
373
375
|
# https://github.com/langchain-ai/langsmith-sdk/blob/1b93e4c13b8369d92db891ae3babc3e2254f0e56/python/langsmith/env/_runtime_env.py#L190
|
|
374
376
|
os.environ["LANGCHAIN_REVISION_ID"] = ref_sha
|
|
377
|
+
|
|
378
|
+
traceblock.patch_requests()
|
langgraph_api/http.py
CHANGED
|
@@ -120,9 +120,9 @@ def is_retriable_error(exception: Exception) -> bool:
|
|
|
120
120
|
return True
|
|
121
121
|
# Seems to just apply to HttpStatusError but doesn't hurt to check all
|
|
122
122
|
if isinstance(exception, httpx.HTTPError):
|
|
123
|
-
return (
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
return getattr(exception, "response", None) is not None and (
|
|
124
|
+
exception.response.status_code >= 500
|
|
125
|
+
or exception.response.status_code == 429
|
|
126
126
|
)
|
|
127
127
|
return False
|
|
128
128
|
|
langgraph_api/js/client.mts
CHANGED
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
getStaticGraphSchema,
|
|
57
57
|
} from "@langchain/langgraph-api/schema";
|
|
58
58
|
import { filterValidExportPath } from "./src/utils/files.mts";
|
|
59
|
+
import { patchFetch } from "./traceblock.mts";
|
|
59
60
|
|
|
60
61
|
const logger = createLogger({
|
|
61
62
|
level: "debug",
|
|
@@ -1114,6 +1115,6 @@ async function getNodesExecutedRequest(
|
|
|
1114
1115
|
nodesExecuted = 0;
|
|
1115
1116
|
return { nodesExecuted: value };
|
|
1116
1117
|
}
|
|
1117
|
-
|
|
1118
|
+
patchFetch();
|
|
1118
1119
|
asyncExitHook(() => awaitAllCallbacks(), { wait: 3_000 });
|
|
1119
1120
|
main();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { overrideFetchImplementation } from "langsmith";
|
|
2
|
+
|
|
3
|
+
const RUNS_RE = /^https:\/\/api\.smith\.langchain\.com\/.*runs(\/|$)/i;
|
|
4
|
+
|
|
5
|
+
export function patchFetch() {
|
|
6
|
+
const shouldBlock =
|
|
7
|
+
typeof process !== "undefined" &&
|
|
8
|
+
!!(process.env && process.env.LANGSMITH_DISABLE_SAAS_RUNS === "true");
|
|
9
|
+
|
|
10
|
+
if (shouldBlock) {
|
|
11
|
+
overrideFetchImplementation(
|
|
12
|
+
async (input: RequestInfo, init?: RequestInit) => {
|
|
13
|
+
const req = input instanceof Request ? input : new Request(input, init);
|
|
14
|
+
|
|
15
|
+
if (req.method.toUpperCase() === "POST" && RUNS_RE.test(req.url)) {
|
|
16
|
+
throw new Error(
|
|
17
|
+
`Policy-blocked POST to ${new URL(req.url).pathname} — run tracking disabled`,
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return fetch(req);
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
langgraph_api/models/run.py
CHANGED
|
@@ -312,6 +312,7 @@ async def create_valid_run(
|
|
|
312
312
|
after_seconds = payload.get("after_seconds", 0)
|
|
313
313
|
configurable["__after_seconds__"] = after_seconds
|
|
314
314
|
put_time_start = time.time()
|
|
315
|
+
if_not_exists = payload.get("if_not_exists", "reject")
|
|
315
316
|
run_coro = Runs.put(
|
|
316
317
|
conn,
|
|
317
318
|
assistant_id,
|
|
@@ -337,7 +338,7 @@ async def create_valid_run(
|
|
|
337
338
|
multitask_strategy=multitask_strategy,
|
|
338
339
|
prevent_insert_if_inflight=prevent_insert_if_inflight,
|
|
339
340
|
after_seconds=after_seconds,
|
|
340
|
-
if_not_exists=
|
|
341
|
+
if_not_exists=if_not_exists,
|
|
341
342
|
)
|
|
342
343
|
run_ = await run_coro
|
|
343
344
|
|
|
@@ -364,7 +365,7 @@ async def create_valid_run(
|
|
|
364
365
|
stream_mode=stream_mode,
|
|
365
366
|
temporary=temporary,
|
|
366
367
|
after_seconds=after_seconds,
|
|
367
|
-
if_not_exists=
|
|
368
|
+
if_not_exists=if_not_exists,
|
|
368
369
|
run_create_ms=(
|
|
369
370
|
int(time.time() * 1_000) - request_start_time
|
|
370
371
|
if request_start_time
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from urllib.parse import urlparse
|
|
3
|
+
|
|
4
|
+
from requests.sessions import Session
|
|
5
|
+
|
|
6
|
+
_HOST = "api.smith.langchain.com"
|
|
7
|
+
_PATH_PREFIX = "/runs"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def patch_requests():
|
|
11
|
+
if os.getenv("LANGSMITH_DISABLE_SAAS_RUNS") != "true":
|
|
12
|
+
return
|
|
13
|
+
_orig = Session.request
|
|
14
|
+
|
|
15
|
+
def _guard(self, method, url, *a, **kw):
|
|
16
|
+
if method.upper() == "POST":
|
|
17
|
+
u = urlparse(url)
|
|
18
|
+
if u.hostname == _HOST and _PATH_PREFIX in u.path:
|
|
19
|
+
raise RuntimeError(f"POST to {url} blocked by policy")
|
|
20
|
+
return _orig(self, method, url, *a, **kw)
|
|
21
|
+
|
|
22
|
+
Session.request = _guard
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import time
|
|
3
|
+
from collections import OrderedDict
|
|
4
|
+
from typing import Generic, TypeVar
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LRUCache(Generic[T]):
|
|
10
|
+
"""LRU cache with TTL support."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, max_size: int = 1000, ttl: float = 60):
|
|
13
|
+
self._cache: OrderedDict[str, tuple[T, float]] = OrderedDict()
|
|
14
|
+
self._max_size = max_size if max_size > 0 else 1000
|
|
15
|
+
self._ttl = ttl
|
|
16
|
+
|
|
17
|
+
def _get_time(self) -> float:
|
|
18
|
+
"""Get current time, using loop.time() if available for better performance."""
|
|
19
|
+
try:
|
|
20
|
+
return asyncio.get_event_loop().time()
|
|
21
|
+
except RuntimeError:
|
|
22
|
+
return time.monotonic()
|
|
23
|
+
|
|
24
|
+
def get(self, key: str) -> T | None:
|
|
25
|
+
"""Get item from cache, returning None if expired or not found."""
|
|
26
|
+
if key not in self._cache:
|
|
27
|
+
return None
|
|
28
|
+
|
|
29
|
+
value, timestamp = self._cache[key]
|
|
30
|
+
if self._get_time() - timestamp >= self._ttl:
|
|
31
|
+
# Expired, remove and return None
|
|
32
|
+
del self._cache[key]
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
# Move to end (most recently used)
|
|
36
|
+
self._cache.move_to_end(key)
|
|
37
|
+
return value
|
|
38
|
+
|
|
39
|
+
def set(self, key: str, value: T) -> None:
|
|
40
|
+
"""Set item in cache, evicting old entries if needed."""
|
|
41
|
+
# Remove if already exists (to update timestamp)
|
|
42
|
+
if key in self._cache:
|
|
43
|
+
del self._cache[key]
|
|
44
|
+
|
|
45
|
+
# Evict oldest entries if needed
|
|
46
|
+
while len(self._cache) >= self._max_size:
|
|
47
|
+
self._cache.popitem(last=False) # Remove oldest (FIFO)
|
|
48
|
+
|
|
49
|
+
# Add new entry
|
|
50
|
+
self._cache[key] = (value, self._get_time())
|
|
51
|
+
|
|
52
|
+
def size(self) -> int:
|
|
53
|
+
"""Return current cache size."""
|
|
54
|
+
return len(self._cache)
|
|
55
|
+
|
|
56
|
+
def clear(self) -> None:
|
|
57
|
+
"""Clear all entries from cache."""
|
|
58
|
+
self._cache.clear()
|
langgraph_api/worker.py
CHANGED
|
@@ -113,6 +113,8 @@ async def worker(
|
|
|
113
113
|
run_creation_ms=run_creation_ms,
|
|
114
114
|
run_queue_ms=ms(run_started_at_dt, run["created_at"]),
|
|
115
115
|
run_stream_start_ms=ms(run_stream_started_at_dt, run_started_at_dt),
|
|
116
|
+
temporary=temporary,
|
|
117
|
+
resumable=resumable,
|
|
116
118
|
)
|
|
117
119
|
|
|
118
120
|
def on_checkpoint(checkpoint_arg: CheckpointPayload):
|
|
@@ -242,47 +244,55 @@ async def worker(
|
|
|
242
244
|
run_id=str(run_id),
|
|
243
245
|
run_attempt=attempt,
|
|
244
246
|
)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
if not temporary:
|
|
248
|
+
await Threads.set_joint_status(
|
|
249
|
+
conn, run["thread_id"], run_id, status, checkpoint=checkpoint
|
|
250
|
+
)
|
|
248
251
|
elif isinstance(exception, TimeoutError):
|
|
249
252
|
status = "timeout"
|
|
250
253
|
await logger.awarning(
|
|
251
254
|
"Background run timed out",
|
|
252
255
|
**log_info,
|
|
253
256
|
)
|
|
254
|
-
|
|
255
|
-
conn, run["thread_id"], run_id, status, checkpoint=checkpoint
|
|
256
|
-
)
|
|
257
|
-
elif isinstance(exception, UserRollback):
|
|
258
|
-
status = "rollback"
|
|
259
|
-
try:
|
|
257
|
+
if not temporary:
|
|
260
258
|
await Threads.set_joint_status(
|
|
261
259
|
conn, run["thread_id"], run_id, status, checkpoint=checkpoint
|
|
262
260
|
)
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
elif isinstance(exception, UserRollback):
|
|
262
|
+
status = "rollback"
|
|
263
|
+
if not temporary:
|
|
264
|
+
try:
|
|
265
|
+
await Threads.set_joint_status(
|
|
266
|
+
conn,
|
|
267
|
+
run["thread_id"],
|
|
268
|
+
run_id,
|
|
269
|
+
status,
|
|
270
|
+
checkpoint=checkpoint,
|
|
271
|
+
)
|
|
269
272
|
await logger.ainfo(
|
|
270
|
-
"
|
|
273
|
+
"Background run rolled back",
|
|
271
274
|
**log_info,
|
|
272
275
|
)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
except HTTPException as e:
|
|
277
|
+
if e.status_code == 404:
|
|
278
|
+
await logger.ainfo(
|
|
279
|
+
"Ignoring rollback error for missing run",
|
|
280
|
+
**log_info,
|
|
281
|
+
)
|
|
282
|
+
else:
|
|
283
|
+
raise
|
|
284
|
+
|
|
285
|
+
checkpoint = None # reset the checkpoint
|
|
277
286
|
elif isinstance(exception, UserInterrupt):
|
|
278
287
|
status = "interrupted"
|
|
279
288
|
await logger.ainfo(
|
|
280
289
|
"Background run interrupted",
|
|
281
290
|
**log_info,
|
|
282
291
|
)
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
292
|
+
if not temporary:
|
|
293
|
+
await Threads.set_joint_status(
|
|
294
|
+
conn, run["thread_id"], run_id, status, checkpoint, exception
|
|
295
|
+
)
|
|
286
296
|
elif isinstance(exception, ALL_RETRIABLE_EXCEPTIONS):
|
|
287
297
|
status = "retry"
|
|
288
298
|
await logger.awarning(
|
|
@@ -290,6 +300,7 @@ async def worker(
|
|
|
290
300
|
**log_info,
|
|
291
301
|
)
|
|
292
302
|
# Don't update thread status yet.
|
|
303
|
+
# Apply this even for temporary runs, so we retry
|
|
293
304
|
await Runs.set_status(conn, run_id, "pending")
|
|
294
305
|
else:
|
|
295
306
|
status = "error"
|
|
@@ -303,13 +314,14 @@ async def worker(
|
|
|
303
314
|
exc_info=not isinstance(exception, RemoteException),
|
|
304
315
|
**log_info,
|
|
305
316
|
)
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
317
|
+
if not temporary:
|
|
318
|
+
await Threads.set_joint_status(
|
|
319
|
+
conn, run["thread_id"], run_id, status, checkpoint, exception
|
|
320
|
+
)
|
|
309
321
|
|
|
310
322
|
# delete thread if it's temporary and we don't want to retry
|
|
311
323
|
if temporary and not isinstance(exception, ALL_RETRIABLE_EXCEPTIONS):
|
|
312
|
-
await Threads.
|
|
324
|
+
await Threads._delete_with_run(conn, run["thread_id"], run_id)
|
|
313
325
|
|
|
314
326
|
if isinstance(exception, ALL_RETRIABLE_EXCEPTIONS):
|
|
315
327
|
await logger.awarning("RETRYING", exc_info=exception)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.88
|
|
4
4
|
Author-email: Nuno Campos <nuno@langchain.dev>, Will Fu-Hinthorn <will@langchain.dev>
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -11,7 +11,7 @@ Requires-Dist: httpx>=0.25.0
|
|
|
11
11
|
Requires-Dist: jsonschema-rs<0.30,>=0.20.0
|
|
12
12
|
Requires-Dist: langchain-core>=0.3.64
|
|
13
13
|
Requires-Dist: langgraph-checkpoint>=2.0.23
|
|
14
|
-
Requires-Dist: langgraph-runtime-inmem<0.
|
|
14
|
+
Requires-Dist: langgraph-runtime-inmem<0.5,>=0.4.0
|
|
15
15
|
Requires-Dist: langgraph-sdk>=0.1.71
|
|
16
16
|
Requires-Dist: langgraph>=0.3.27
|
|
17
17
|
Requires-Dist: langsmith>=0.3.45
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=KyVs-sgwv8HkCGWN0INHw_LVAcgAVeJmhhH4gGNJ3Ew,23
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=eqifhHxNnxvI7jJqrY1_8RjL4Fp9NdN4prEub2FWBt8,5091
|
|
3
3
|
langgraph_api/asyncio.py,sha256=qrYEqPRrqtGq7E7KjcMC-ALyN79HkRnmp9rM2TAw9L8,9404
|
|
4
4
|
langgraph_api/cli.py,sha256=-R0fvxg4KNxTkSe7xvDZruF24UMhStJYjpAYlUx3PBk,16018
|
|
5
5
|
langgraph_api/command.py,sha256=3O9v3i0OPa96ARyJ_oJbLXkfO8rPgDhLCswgO9koTFA,768
|
|
6
|
-
langgraph_api/config.py,sha256
|
|
6
|
+
langgraph_api/config.py,sha256=MbsxCitbxI7EQgP7UfSv_MpdYyfQEyKIP1ILYr-MhzU,11889
|
|
7
7
|
langgraph_api/cron_scheduler.py,sha256=CiwZ-U4gDOdG9zl9dlr7mH50USUgNB2Fvb8YTKVRBN4,2625
|
|
8
8
|
langgraph_api/errors.py,sha256=zlnl3xXIwVG0oGNKKpXf1an9Rn_SBDHSyhe53hU6aLw,1858
|
|
9
9
|
langgraph_api/graph.py,sha256=pw_3jVZNe0stO5-Y8kLUuC8EJ5tFqdLu9fLpwUz4Hc4,23574
|
|
10
|
-
langgraph_api/http.py,sha256=
|
|
10
|
+
langgraph_api/http.py,sha256=L0leP5fH4NIiFgJd1YPMnTRWqrUUYq_4m5j558UwM5E,5612
|
|
11
11
|
langgraph_api/http_metrics.py,sha256=VgM45yU1FkXuI9CIOE_astxAAu2G-OJ42BRbkcos_CQ,5555
|
|
12
12
|
langgraph_api/logging.py,sha256=LL2LNuMYFrqDhG_KbyKy9AoAPghcdlFj2T50zMyPddk,4182
|
|
13
13
|
langgraph_api/metadata.py,sha256=lfovneEMLA5vTNa61weMkQkiZCtwo-qdwFwqNSj5qVs,6638
|
|
@@ -22,13 +22,14 @@ langgraph_api/state.py,sha256=NLl5YgLKppHJ7zfF0bXjsroXmIGCZez0IlDAKNGVy0g,2365
|
|
|
22
22
|
langgraph_api/store.py,sha256=srRI0fQXNFo_RSUs4apucr4BEp_KrIseJksZXs32MlQ,4635
|
|
23
23
|
langgraph_api/stream.py,sha256=EorM9BD7oiCvkRXlMqnOkBd9P1X3mEagS_oHp-_9aRQ,13669
|
|
24
24
|
langgraph_api/thread_ttl.py,sha256=-Ox8NFHqUH3wGNdEKMIfAXUubY5WGifIgCaJ7npqLgw,1762
|
|
25
|
+
langgraph_api/traceblock.py,sha256=2aWS6TKGTcQ0G1fOtnjVrzkpeGvDsR0spDbfddEqgRU,594
|
|
25
26
|
langgraph_api/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
27
|
langgraph_api/validation.py,sha256=zMuKmwUEBjBgFMwAaeLZmatwGVijKv2sOYtYg7gfRtc,4950
|
|
27
28
|
langgraph_api/webhook.py,sha256=VCJp4dI5E1oSJ15XP34cnPiOi8Ya8Q1BnBwVGadOpLI,1636
|
|
28
|
-
langgraph_api/worker.py,sha256=
|
|
29
|
+
langgraph_api/worker.py,sha256=Zy6rHfcOoYg7FLui3KDMDMllslXFfjZ3z9uCgae-uMo,14216
|
|
29
30
|
langgraph_api/api/__init__.py,sha256=WHy6oNLWtH1K7AxmmsU9RD-Vm6WP-Ov16xS8Ey9YCmQ,6090
|
|
30
31
|
langgraph_api/api/assistants.py,sha256=w7nXjEknDVHSuP228S8ZLh4bG0nRGnSwVP9pECQOK90,16247
|
|
31
|
-
langgraph_api/api/mcp.py,sha256=
|
|
32
|
+
langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
|
|
32
33
|
langgraph_api/api/meta.py,sha256=fmc7btbtl5KVlU_vQ3Bj4J861IjlqmjBKNtnxSV-S-Q,4198
|
|
33
34
|
langgraph_api/api/openapi.py,sha256=KToI2glOEsvrhDpwdScdBnL9xoLOqkTxx5zKq2pMuKQ,11957
|
|
34
35
|
langgraph_api/api/runs.py,sha256=66x7Nywqr1OoMHHlG03OGuLlrbKYbfvLJepYLg6oXeE,19975
|
|
@@ -41,7 +42,7 @@ langgraph_api/auth/middleware.py,sha256=jDA4t41DUoAArEY_PNoXesIUBJ0nGhh85QzRdn5E
|
|
|
41
42
|
langgraph_api/auth/noop.py,sha256=Bk6Nf3p8D_iMVy_OyfPlyiJp_aEwzL-sHrbxoXpCbac,586
|
|
42
43
|
langgraph_api/auth/studio_user.py,sha256=fojJpexdIZYI1w3awiqOLSwMUiK_M_3p4mlfQI0o-BE,454
|
|
43
44
|
langgraph_api/auth/langsmith/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
-
langgraph_api/auth/langsmith/backend.py,sha256=
|
|
45
|
+
langgraph_api/auth/langsmith/backend.py,sha256=jRD9WL7OhxnUurMt7v1vziIUwpzkE1hR-xmRaRQmpvw,3617
|
|
45
46
|
langgraph_api/auth/langsmith/client.py,sha256=eKchvAom7hdkUXauD8vHNceBDDUijrFgdTV8bKd7x4Q,3998
|
|
46
47
|
langgraph_api/js/.gitignore,sha256=l5yI6G_V6F1600I1IjiUKn87f4uYIrBAYU1MOyBBhg4,59
|
|
47
48
|
langgraph_api/js/.prettierrc,sha256=0es3ovvyNIqIw81rPQsdt1zCQcOdBqyR_DMbFE4Ifms,19
|
|
@@ -49,13 +50,14 @@ langgraph_api/js/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
49
50
|
langgraph_api/js/base.py,sha256=gjY6K8avI03OrI-Hy6a311fQ_EG5r_x8hUYlc7uqxdE,534
|
|
50
51
|
langgraph_api/js/build.mts,sha256=bRQo11cglDFXlLN7Y48CQPTSMLenp7MqIWuP1DkSIo0,3139
|
|
51
52
|
langgraph_api/js/client.http.mts,sha256=AGA-p8J85IcNh2oXZjDxHQ4PnQdJmt-LPcpZp6j0Cws,4687
|
|
52
|
-
langgraph_api/js/client.mts,sha256=
|
|
53
|
+
langgraph_api/js/client.mts,sha256=Lyug2cIhW6hlxSaxZV_7KPe1aBLQ47oijbqL26joTT8,31046
|
|
53
54
|
langgraph_api/js/errors.py,sha256=Cm1TKWlUCwZReDC5AQ6SgNIVGD27Qov2xcgHyf8-GXo,361
|
|
54
55
|
langgraph_api/js/global.d.ts,sha256=j4GhgtQSZ5_cHzjSPcHgMJ8tfBThxrH-pUOrrJGteOU,196
|
|
55
56
|
langgraph_api/js/package.json,sha256=BpNAO88mbE-Gv4WzQfj1TLktCWGqm6XBqI892ObuOUw,1333
|
|
56
57
|
langgraph_api/js/remote.py,sha256=B_0cP34AGTW9rL_hJyKIh3P6Z4TvNYNNyc7S2_SOWt4,36880
|
|
57
58
|
langgraph_api/js/schema.py,sha256=7idnv7URlYUdSNMBXQcw7E4SxaPxCq_Oxwnlml8q5ik,408
|
|
58
59
|
langgraph_api/js/sse.py,sha256=lsfp4nyJyA1COmlKG9e2gJnTttf_HGCB5wyH8OZBER8,4105
|
|
60
|
+
langgraph_api/js/traceblock.mts,sha256=QtGSN5VpzmGqDfbArrGXkMiONY94pMQ5CgzetT_bKYg,761
|
|
59
61
|
langgraph_api/js/tsconfig.json,sha256=imCYqVnqFpaBoZPx8k1nO4slHIWBFsSlmCYhO73cpBs,341
|
|
60
62
|
langgraph_api/js/ui.py,sha256=XNT8iBcyT8XmbIqSQUWd-j_00HsaWB2vRTVabwFBkik,2439
|
|
61
63
|
langgraph_api/js/yarn.lock,sha256=hrU_DP2qU9772d2W-FiuA5N7z2eAp6qmkw7dDCAEYhw,85562
|
|
@@ -71,13 +73,14 @@ langgraph_api/middleware/http_logger.py,sha256=uroMCag49-uPHTt8K3glkl-0RnWL20YEg
|
|
|
71
73
|
langgraph_api/middleware/private_network.py,sha256=eYgdyU8AzU2XJu362i1L8aSFoQRiV7_aLBPw7_EgeqI,2111
|
|
72
74
|
langgraph_api/middleware/request_id.py,sha256=SDj3Yi3WvTbFQ2ewrPQBjAV8sYReOJGeIiuoHeZpR9g,1242
|
|
73
75
|
langgraph_api/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
-
langgraph_api/models/run.py,sha256=
|
|
76
|
+
langgraph_api/models/run.py,sha256=AAeny3Pjhkw6RCcV5fri8GWjH4Vcy522dLbki6Qbzxo,14523
|
|
75
77
|
langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt-WJG9LH0,3650
|
|
76
78
|
langgraph_api/utils/__init__.py,sha256=92mSti9GfGdMRRWyESKQW5yV-75Z9icGHnIrBYvdypU,3619
|
|
79
|
+
langgraph_api/utils/cache.py,sha256=SrtIWYibbrNeZzLXLUGBFhJPkMVNQnVxR5giiYGHEfI,1810
|
|
77
80
|
langgraph_api/utils/config.py,sha256=gONI0UsoSpuR72D9lSGAmpr-_iSMDFdD4M_tiXXjmNk,3936
|
|
78
81
|
langgraph_api/utils/future.py,sha256=CGhUb_Ht4_CnTuXc2kI8evEn1gnMKYN0ce9ZyUkW5G4,7251
|
|
79
82
|
langgraph_license/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
80
|
-
langgraph_license/validation.py,sha256=
|
|
83
|
+
langgraph_license/validation.py,sha256=CU38RUZ5xhP1S8F_y8TNeV6OmtO-tIGjCXbXTwJjJO4,612
|
|
81
84
|
langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA,1075
|
|
82
85
|
langgraph_runtime/checkpoint.py,sha256=J2ePryEyKJWGgxjs27qEHrjj87uPMX3Rqm3hLvG63uk,119
|
|
83
86
|
langgraph_runtime/database.py,sha256=ANEtfm4psr19FtpVcNs5CFWHw-JhfHvIMnkaORa4QSM,117
|
|
@@ -90,8 +93,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
|
|
|
90
93
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
91
94
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
92
95
|
openapi.json,sha256=p5tn_cNRiFA0HN3L6JfC9Nm16Hgv-BxvAQcJymKhVWI,143296
|
|
93
|
-
langgraph_api-0.2.
|
|
94
|
-
langgraph_api-0.2.
|
|
95
|
-
langgraph_api-0.2.
|
|
96
|
-
langgraph_api-0.2.
|
|
97
|
-
langgraph_api-0.2.
|
|
96
|
+
langgraph_api-0.2.88.dist-info/METADATA,sha256=EdGed7laJc9m3yltzlxMbMad-sxWqC53jdF_qsdZH4E,3891
|
|
97
|
+
langgraph_api-0.2.88.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
98
|
+
langgraph_api-0.2.88.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
99
|
+
langgraph_api-0.2.88.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
100
|
+
langgraph_api-0.2.88.dist-info/RECORD,,
|
langgraph_license/validation.py
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
"""Noop license middleware"""
|
|
2
2
|
|
|
3
|
+
import structlog
|
|
4
|
+
|
|
5
|
+
logger = structlog.stdlib.get_logger(__name__)
|
|
6
|
+
|
|
3
7
|
|
|
4
8
|
async def get_license_status() -> bool:
|
|
5
9
|
"""Always return true"""
|
|
@@ -17,6 +21,7 @@ async def check_license_periodically(_: int = 60):
|
|
|
17
21
|
If the license ever fails, you could decide to log,
|
|
18
22
|
raise an exception, or attempt a graceful shutdown.
|
|
19
23
|
"""
|
|
20
|
-
|
|
24
|
+
await logger.ainfo(
|
|
21
25
|
"This is a noop license middleware. No license check is performed."
|
|
22
26
|
)
|
|
27
|
+
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|