langgraph-api 0.2.2__tar.gz → 0.2.4__tar.gz
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-0.2.2 → langgraph_api-0.2.4}/PKG-INFO +1 -1
- langgraph_api-0.2.4/langgraph_api/__init__.py +1 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/__init__.py +1 -4
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/openapi.py +96 -1
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/models/run.py +1 -1
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/openapi.json +2 -2
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/pyproject.toml +1 -1
- langgraph_api-0.2.2/langgraph_api/__init__.py +0 -1
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/LICENSE +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/README.md +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/assistants.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/mcp.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/meta.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/runs.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/store.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/threads.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/api/ui.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/asyncio.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/custom.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/langsmith/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/langsmith/backend.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/langsmith/client.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/middleware.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/noop.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/auth/studio_user.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/cli.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/command.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/config.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/cron_scheduler.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/errors.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/graph.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/http.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/.gitignore +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/.prettierrc +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/base.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/build.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/client.http.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/client.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/errors.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/global.d.ts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/package.json +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/remote.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/schema.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/graph.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/load.hooks.mjs +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/parser/parser.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/parser/parser.worker.mjs +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/parser/schema/types.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/parser/schema/types.template.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/preload.mjs +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/utils/files.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/utils/importMap.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/utils/pythonSchemas.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/utils/serde.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/sse.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/api.test.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/auth.test.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/compose-postgres.auth.yml +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/compose-postgres.yml +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/.gitignore +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/agent.css +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/agent.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/agent.ui.tsx +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/agent_simple.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/auth.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/command.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/delay.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/dynamic.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/error.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/http.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/langgraph.json +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/nested.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/package.json +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/weather.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/graphs/yarn.lock +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/parser.test.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/utils.mts +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tsconfig.json +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/ui.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/yarn.lock +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/logging.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/metadata.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/middleware/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/middleware/http_logger.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/middleware/private_network.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/models/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/patch.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/queue_entrypoint.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/route.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/schema.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/serde.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/server.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/sse.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/state.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/stream.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/thread_ttl.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/tunneling/cloudflare.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/utils.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/validation.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/webhook.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/worker.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_license/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_license/validation.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_runtime/__init__.py +0 -0
- {langgraph_api-0.2.2 → langgraph_api-0.2.4}/logging.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.4"
|
|
@@ -68,10 +68,7 @@ if HTTP_CONFIG:
|
|
|
68
68
|
protected_routes.extend(store_routes)
|
|
69
69
|
if not HTTP_CONFIG.get("disable_ui"):
|
|
70
70
|
protected_routes.extend(ui_routes)
|
|
71
|
-
|
|
72
|
-
# correctly. This is dependent on the release of an official MCP client
|
|
73
|
-
# implementation.
|
|
74
|
-
if not HTTP_CONFIG.get("disable_mcp", True):
|
|
71
|
+
if not HTTP_CONFIG.get("disable_mcp"):
|
|
75
72
|
protected_routes.extend(mcp_routes)
|
|
76
73
|
else:
|
|
77
74
|
protected_routes.extend(assistants_routes)
|
|
@@ -5,7 +5,12 @@ from functools import lru_cache
|
|
|
5
5
|
|
|
6
6
|
import orjson
|
|
7
7
|
|
|
8
|
-
from langgraph_api.config import
|
|
8
|
+
from langgraph_api.config import (
|
|
9
|
+
HTTP_CONFIG,
|
|
10
|
+
LANGGRAPH_AUTH,
|
|
11
|
+
LANGGRAPH_AUTH_TYPE,
|
|
12
|
+
MOUNT_PREFIX,
|
|
13
|
+
)
|
|
9
14
|
from langgraph_api.graph import GRAPHS
|
|
10
15
|
from langgraph_api.validation import openapi
|
|
11
16
|
|
|
@@ -19,6 +24,88 @@ def set_custom_spec(spec: dict):
|
|
|
19
24
|
CUSTOM_OPENAPI_SPEC = spec
|
|
20
25
|
|
|
21
26
|
|
|
27
|
+
def get_mcp_openapi_paths() -> dict:
|
|
28
|
+
"""Returns the OpenAPI path definitions for the /mcp/ endpoint."""
|
|
29
|
+
return {
|
|
30
|
+
"/mcp/": {
|
|
31
|
+
"get": {
|
|
32
|
+
"operationId": "get_mcp",
|
|
33
|
+
"summary": "MCP Get",
|
|
34
|
+
"description": (
|
|
35
|
+
"Implemented according to the Streamable HTTP Transport "
|
|
36
|
+
"specification."
|
|
37
|
+
),
|
|
38
|
+
"responses": {
|
|
39
|
+
"405": {
|
|
40
|
+
"description": "GET method not allowed; streaming not "
|
|
41
|
+
"supported.",
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"tags": ["MCP"],
|
|
45
|
+
},
|
|
46
|
+
"post": {
|
|
47
|
+
"operationId": "post_mcp",
|
|
48
|
+
"summary": "MCP Post",
|
|
49
|
+
"description": (
|
|
50
|
+
"Implemented according to the Streamable HTTP Transport "
|
|
51
|
+
"specification.\n"
|
|
52
|
+
"Sends a JSON-RPC 2.0 message to the server.\n\n"
|
|
53
|
+
"- **Request**: Provide an object with `jsonrpc`, `id`, `method`, "
|
|
54
|
+
"and optional `params`.\n"
|
|
55
|
+
"- **Response**: Returns a JSON-RPC response or acknowledgment.\n\n"
|
|
56
|
+
"**Notes:**\n"
|
|
57
|
+
"- Stateless: Sessions are not persisted across requests.\n"
|
|
58
|
+
),
|
|
59
|
+
"requestBody": {
|
|
60
|
+
"required": True,
|
|
61
|
+
"content": {
|
|
62
|
+
"application/json": {
|
|
63
|
+
"schema": {"type": "object"},
|
|
64
|
+
"description": "A JSON-RPC 2.0 request, notification, "
|
|
65
|
+
"or response object.",
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
"responses": {
|
|
70
|
+
"200": {
|
|
71
|
+
"description": "Successful JSON-RPC response.",
|
|
72
|
+
"content": {"application/json": {"schema": {"type": "object"}}},
|
|
73
|
+
},
|
|
74
|
+
"202": {
|
|
75
|
+
"description": "Notification or response accepted; no content "
|
|
76
|
+
"body.",
|
|
77
|
+
},
|
|
78
|
+
"400": {
|
|
79
|
+
"description": "Bad request: invalid JSON or message format, "
|
|
80
|
+
"or unacceptable Accept header.",
|
|
81
|
+
},
|
|
82
|
+
"405": {
|
|
83
|
+
"description": "HTTP method not allowed.",
|
|
84
|
+
},
|
|
85
|
+
"500": {
|
|
86
|
+
"description": "Internal server error or unexpected failure.",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
"tags": ["MCP"],
|
|
90
|
+
},
|
|
91
|
+
"delete": {
|
|
92
|
+
"operationId": "delete_mcp",
|
|
93
|
+
"summary": "Terminate Session",
|
|
94
|
+
"description": (
|
|
95
|
+
"Implemented according to the Streamable HTTP Transport "
|
|
96
|
+
"specification.\n"
|
|
97
|
+
"Terminate an MCP session. The server implementation is stateless, "
|
|
98
|
+
"so this is a no-op.\n\n"
|
|
99
|
+
),
|
|
100
|
+
"responses": {
|
|
101
|
+
"404": {},
|
|
102
|
+
},
|
|
103
|
+
"tags": ["MCP"],
|
|
104
|
+
},
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
22
109
|
@lru_cache(maxsize=1)
|
|
23
110
|
def get_openapi_spec() -> str:
|
|
24
111
|
# patch the graph_id enums
|
|
@@ -80,6 +167,14 @@ def get_openapi_spec() -> str:
|
|
|
80
167
|
final = merge_openapi_specs(openapi, CUSTOM_OPENAPI_SPEC)
|
|
81
168
|
if MOUNT_PREFIX:
|
|
82
169
|
final["servers"] = [{"url": MOUNT_PREFIX}]
|
|
170
|
+
|
|
171
|
+
MCP_ENABLED = HTTP_CONFIG is None or not HTTP_CONFIG.get("disable_mcp")
|
|
172
|
+
|
|
173
|
+
if MCP_ENABLED:
|
|
174
|
+
# Add the MCP paths to the OpenAPI spec
|
|
175
|
+
mcp_path = get_mcp_openapi_paths()
|
|
176
|
+
final["paths"]["/mcp/"] = mcp_path["/mcp/"]
|
|
177
|
+
|
|
83
178
|
return orjson.dumps(final)
|
|
84
179
|
|
|
85
180
|
|
|
@@ -302,7 +302,7 @@ async def create_valid_run(
|
|
|
302
302
|
"feedback_keys": payload.get("feedback_keys"),
|
|
303
303
|
"temporary": temporary,
|
|
304
304
|
"subgraphs": payload.get("stream_subgraphs", False),
|
|
305
|
-
"checkpoint_during": payload.get("checkpoint_during",
|
|
305
|
+
"checkpoint_during": payload.get("checkpoint_during", True),
|
|
306
306
|
},
|
|
307
307
|
metadata=payload.get("metadata"),
|
|
308
308
|
status="pending",
|
|
@@ -3647,7 +3647,7 @@
|
|
|
3647
3647
|
"type": "boolean",
|
|
3648
3648
|
"title": "Checkpoint During",
|
|
3649
3649
|
"description": "Whether to checkpoint during the run.",
|
|
3650
|
-
"default":
|
|
3650
|
+
"default": false
|
|
3651
3651
|
}
|
|
3652
3652
|
},
|
|
3653
3653
|
"type": "object",
|
|
@@ -3868,7 +3868,7 @@
|
|
|
3868
3868
|
"type": "boolean",
|
|
3869
3869
|
"title": "Checkpoint During",
|
|
3870
3870
|
"description": "Whether to checkpoint during the run.",
|
|
3871
|
-
"default":
|
|
3871
|
+
"default": false
|
|
3872
3872
|
}
|
|
3873
3873
|
},
|
|
3874
3874
|
"type": "object",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/src/parser/schema/types.template.mts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_api-0.2.2 → langgraph_api-0.2.4}/langgraph_api/js/tests/compose-postgres.auth.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|