From 77b42e08677cc044de4e08af84c6b50000bc8209 Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Sat, 14 Dec 2024 07:25:14 -0800 Subject: [PATCH] [CLI] Add openapi param to config --- libs/cli/langgraph_cli/config.py | 33 ++++++++++++++++++++++++++++++++ libs/cli/poetry.lock | 8 ++++---- libs/cli/pyproject.toml | 4 ++-- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/libs/cli/langgraph_cli/config.py b/libs/cli/langgraph_cli/config.py index 85fce03cf..e7ba0e208 100644 --- a/libs/cli/langgraph_cli/config.py +++ b/libs/cli/langgraph_cli/config.py @@ -47,9 +47,42 @@ class StoreConfig(TypedDict, total=False): """Configuration for vector embeddings in store.""" +class SecurityConfig(TypedDict, total=False): + securitySchemes: dict + security: list + # path => {method => security} + paths: dict[str, dict[str, list]] + + class AuthConfig(TypedDict, total=False): path: str + """Path to the authentication function in a Python file.""" disable_studio_auth: bool + """Whether to disable auth when connecting from the LangSmith Studio.""" + openapi: SecurityConfig + """The schema to use for updating the openapi spec. + + Example: + { + "securitySchemes": { + "OAuth2": { + "type": "oauth2", + "flows": { + "password": { + "tokenUrl": "/token", + "scopes": { + "me": "Read information about the current user", + "items": "Access to create and manage items" + } + } + } + } + }, + "security": [ + {"OAuth2": ["me"]} # Default security requirement for all endpoints + ] + } + """ class Config(TypedDict, total=False): diff --git a/libs/cli/poetry.lock b/libs/cli/poetry.lock index 1f0c55975..44471dc5d 100644 --- a/libs/cli/poetry.lock +++ b/libs/cli/poetry.lock @@ -554,13 +554,13 @@ langgraph-sdk = ">=0.1.42,<0.2.0" [[package]] name = "langgraph-api" -version = "0.0.7" +version = "0.0.8" description = "" optional = true python-versions = "<4.0,>=3.11.0" files = [ - {file = "langgraph_api-0.0.7-py3-none-any.whl", hash = "sha256:c94bcdce10a1a4f9e65c85d1c76268a6777e3e7ee71e1e6d5dae5d2da98a87c3"}, - {file = "langgraph_api-0.0.7.tar.gz", hash = "sha256:e43291825a183fa221215bd0b04067812b18266e846290dec651f3cba6b796f0"}, + {file = "langgraph_api-0.0.8-py3-none-any.whl", hash = "sha256:ab9b4a5ec8393d17ef921b94f3f019f49f3f17910ba9351beb1e1f962b02a33e"}, + {file = "langgraph_api-0.0.8.tar.gz", hash = "sha256:b1304beb9d72392ce5d5602cd524a4f57839f1dcd1da6f4e1391832fb4a6edc5"}, ] [package.dependencies] @@ -1549,4 +1549,4 @@ inmem = ["langgraph-api", "python-dotenv"] [metadata] lock-version = "2.0" python-versions = "^3.9.0,<4.0" -content-hash = "bf6d77426279e01cf63f774fa9623d9791ac368f322845b441a5d03f246b784f" +content-hash = "c36514f708e8b2b32c20ad9b7a3ba6fca41f043ced0149f0aae4eef43fc6c10b" diff --git a/libs/cli/pyproject.toml b/libs/cli/pyproject.toml index 004cf6cc1..ff5fc1a88 100644 --- a/libs/cli/pyproject.toml +++ b/libs/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langgraph-cli" -version = "0.1.62" +version = "0.1.63" description = "CLI for interacting with LangGraph API" authors = [] license = "MIT" @@ -14,7 +14,7 @@ langgraph = "langgraph_cli.cli:cli" [tool.poetry.dependencies] python = "^3.9.0,<4.0" click = "^8.1.7" -langgraph-api = { version = ">=0.0.7,<0.1.0", optional = true, python = ">=3.11,<4.0" } +langgraph-api = { version = ">=0.0.8,<0.1.0", optional = true, python = ">=3.11,<4.0" } python-dotenv = { version = ">=0.8.0", optional = true } [tool.poetry.group.dev.dependencies]