langgraph-cli 0.4.33__tar.gz → 0.4.35__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.
Files changed (153) hide show
  1. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/PKG-INFO +1 -1
  2. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/yarn.lock +5 -5
  3. langgraph_cli-0.4.35/langgraph_cli/__init__.py +1 -0
  4. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/deploy.py +141 -46
  5. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/host_backend.py +3 -0
  6. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/test_cli.py +116 -0
  7. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/test_deploy_command.py +144 -2
  8. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_deploy_helpers.py +125 -14
  9. langgraph_cli-0.4.33/langgraph_cli/__init__.py +0 -1
  10. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/.gitignore +0 -0
  11. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/LICENSE +0 -0
  12. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/Makefile +0 -0
  13. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/README.md +0 -0
  14. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/.env.example +0 -0
  15. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/.gitignore +0 -0
  16. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/Makefile +0 -0
  17. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs/agent.py +0 -0
  18. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml +0 -0
  19. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml +0 -0
  20. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs/langgraph.json +0 -0
  21. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs/pyproject.toml +0 -0
  22. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs_fail/agent.py +0 -0
  23. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs_fail/langgraph.json +0 -0
  24. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graph_prerelease_reqs_fail/pyproject.toml +0 -0
  25. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs/agent.py +0 -0
  26. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs/langgraph.json +0 -0
  27. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs/storm.py +0 -0
  28. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/__init__.py +0 -0
  29. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
  30. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
  31. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
  32. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/hello.py +0 -0
  33. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/langgraph.json +0 -0
  34. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/prompt.txt +0 -0
  35. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_a/requirements.txt +0 -0
  36. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
  37. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
  38. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/hello.py +0 -0
  39. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/langgraph.json +0 -0
  40. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/prompt.txt +0 -0
  41. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/requirements.txt +0 -0
  42. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/utils/__init__.py +0 -0
  43. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/graphs_reqs_b/utils/greeter.py +0 -0
  44. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/langgraph.json +0 -0
  45. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/my_app.py +0 -0
  46. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/pipconf.txt +0 -0
  47. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/examples/pyproject.toml +0 -0
  48. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/generate_schema.py +0 -0
  49. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/.dockerignore +0 -0
  50. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/.editorconfig +0 -0
  51. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/.env.example +0 -0
  52. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/.eslintrc.cjs +0 -0
  53. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/.gitignore +0 -0
  54. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/LICENSE +0 -0
  55. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/README.md +0 -0
  56. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/jest.config.js +0 -0
  57. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/langgraph.json +0 -0
  58. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/package.json +0 -0
  59. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/src/agent/graph.ts +0 -0
  60. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/src/agent/state.ts +0 -0
  61. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/static/studio.png +0 -0
  62. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/tests/agent.test.ts +0 -0
  63. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/tests/graph.int.test.ts +0 -0
  64. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-examples/tsconfig.json +0 -0
  65. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/.eslintrc.cjs +0 -0
  66. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/apps/agent/langgraph.json +0 -0
  67. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/apps/agent/package.json +0 -0
  68. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/apps/agent/src/graph.ts +0 -0
  69. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/apps/agent/src/state.ts +0 -0
  70. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/apps/agent/tsconfig.json +0 -0
  71. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/libs/shared/package.json +0 -0
  72. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/libs/shared/src/index.ts +0 -0
  73. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/libs/shared/tsconfig.json +0 -0
  74. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/package.json +0 -0
  75. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/tsconfig.json +0 -0
  76. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/turbo.json +0 -0
  77. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/js-monorepo-example/yarn.lock +0 -0
  78. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/__main__.py +0 -0
  79. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/_ignore.py +0 -0
  80. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/analytics.py +0 -0
  81. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/archive.py +0 -0
  82. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/cli.py +0 -0
  83. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/config.py +0 -0
  84. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/constants.py +0 -0
  85. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/dependency_tracking.py +0 -0
  86. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/docker.py +0 -0
  87. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/exec.py +0 -0
  88. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/image_reference.py +0 -0
  89. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/progress.py +0 -0
  90. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/py.typed +0 -0
  91. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/schemas.py +0 -0
  92. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/templates.py +0 -0
  93. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/util.py +0 -0
  94. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/uv_lock.py +0 -0
  95. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/langgraph_cli/version.py +0 -0
  96. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/pyproject.toml +0 -0
  97. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/.env.example +0 -0
  98. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/langgraph.json +0 -0
  99. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/pyproject.toml +0 -0
  100. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/src/agent/__init__.py +0 -0
  101. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/src/agent/graph.py +0 -0
  102. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/apps/agent/src/agent/state.py +0 -0
  103. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/libs/common/__init__.py +0 -0
  104. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/libs/common/helpers.py +0 -0
  105. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/libs/shared/pyproject.toml +0 -0
  106. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/libs/shared/src/shared/__init__.py +0 -0
  107. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/libs/shared/src/shared/utils.py +0 -0
  108. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/python-monorepo-example/pyproject.toml +0 -0
  109. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/schemas/schema.json +0 -0
  110. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/schemas/schema.v0.json +0 -0
  111. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/schemas/version.schema.json +0 -0
  112. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/__init__.py +0 -0
  113. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/integration_tests/__init__.py +0 -0
  114. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/integration_tests/test_cli.py +0 -0
  115. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/__init__.py +0 -0
  116. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/agent.py +0 -0
  117. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/__init__.py +0 -0
  118. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/langgraph.json +0 -0
  119. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/pyproject.toml +0 -0
  120. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/cli/test_templates.py +0 -0
  121. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/conftest.py +0 -0
  122. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/graphs/agent.py +0 -0
  123. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/helpers.py +0 -0
  124. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/multiplatform/js.mts +0 -0
  125. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/multiplatform/python.py +0 -0
  126. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/pipconfig.txt +0 -0
  127. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_archive.py +0 -0
  128. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_config.json +0 -0
  129. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_config.py +0 -0
  130. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_dependency_tracking.py +0 -0
  131. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_deploy_agents.py +0 -0
  132. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_docker.py +0 -0
  133. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_host_backend.py +0 -0
  134. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_image_reference.py +0 -0
  135. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_logs_helpers.py +0 -0
  136. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/tests/unit_tests/test_util.py +0 -0
  137. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/apps/agent/.env.example +0 -0
  138. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/apps/agent/langgraph.json +0 -0
  139. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/apps/agent/pyproject.toml +0 -0
  140. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/apps/agent/src/agent/__init__.py +0 -0
  141. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/apps/agent/src/agent/graph.py +0 -0
  142. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/libs/shared/pyproject.toml +0 -0
  143. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/libs/shared/src/shared/__init__.py +0 -0
  144. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/libs/shared/src/shared/utils.py +0 -0
  145. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/pyproject.toml +0 -0
  146. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/monorepo/uv.lock +0 -0
  147. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/.env.example +0 -0
  148. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/langgraph.json +0 -0
  149. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/pyproject.toml +0 -0
  150. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/src/agent/__init__.py +0 -0
  151. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/src/agent/graph.py +0 -0
  152. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv-examples/simple/uv.lock +0 -0
  153. {langgraph_cli-0.4.33 → langgraph_cli-0.4.35}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: langgraph-cli
3
- Version: 0.4.33
3
+ Version: 0.4.35
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Project-URL: Source, https://github.com/langchain-ai/langgraph/tree/main/libs/cli
6
6
  Project-URL: Twitter, https://x.com/langchain_oss
@@ -2829,11 +2829,11 @@ graceful-fs@^4.2.11:
2829
2829
  integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
2830
2830
 
2831
2831
  handlebars@^4.7.9:
2832
- version "4.7.9"
2833
- resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.9.tgz#6f139082ab58dc4e5a0e51efe7db5ae890d56a0f"
2834
- integrity sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==
2832
+ version "4.7.10"
2833
+ resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.10.tgz#12419ea1b41391b3ffcf003f2164dcbce090c417"
2834
+ integrity sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==
2835
2835
  dependencies:
2836
- minimist "^1.2.5"
2836
+ minimist "^1.2.8"
2837
2837
  neo-async "^2.6.2"
2838
2838
  source-map "^0.6.1"
2839
2839
  wordwrap "^1.0.0"
@@ -3920,7 +3920,7 @@ minimatch@^9.0.4:
3920
3920
  dependencies:
3921
3921
  brace-expansion "^2.0.2"
3922
3922
 
3923
- minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
3923
+ minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8:
3924
3924
  version "1.2.8"
3925
3925
  resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
3926
3926
  integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
@@ -0,0 +1 @@
1
+ __version__ = "0.4.35"
@@ -231,15 +231,6 @@ class RequestedPlacement:
231
231
  def requested(self) -> bool:
232
232
  return self.listener_id is not None or self.k8s_namespace is not None
233
233
 
234
- def ensure_not_requested(self, deployment_id: str) -> None:
235
- if self.requested:
236
- raise click.UsageError(
237
- "Listener and namespace are fixed when a deployment is created. "
238
- f"Deployment {deployment_id} already exists, so drop --listener-id "
239
- "and --k8s-namespace, or create a new deployment with a different "
240
- "--name."
241
- )
242
-
243
234
  def on(self, listener: Listener) -> Placement:
244
235
  return OnListener(listener.id, self._namespace(listener))
245
236
 
@@ -1055,15 +1046,28 @@ def _print_deployment_result(
1055
1046
  # ---------------------------------------------------------------------------
1056
1047
 
1057
1048
 
1049
+ def _strip_url_scheme(url: str) -> str:
1050
+ """Return a registry reference without a trailing slash or URL scheme."""
1051
+ reference = url.rstrip("/")
1052
+ if "://" in reference:
1053
+ reference = reference.split("//", 1)[1]
1054
+ return reference
1055
+
1056
+
1057
+ # Artifact Registry's username for access tokens. Control planes whose registry
1058
+ # needs another one return it as `username`.
1059
+ _DEFAULT_REGISTRY_USERNAME = "oauth2accesstoken"
1060
+
1061
+
1058
1062
  @contextmanager
1059
- def _docker_config_for_token(registry_host: str, token: str):
1063
+ def _docker_config_for_token(registry_host: str, token: str, username: str):
1060
1064
  """Create a temporary Docker config with only the push token.
1061
1065
 
1062
1066
  Yields the path to a temporary config directory that can be passed
1063
1067
  to `docker --config <path>` so that system credential helpers
1064
1068
  (e.g. gcloud) don't interfere with the push token.
1065
1069
  """
1066
- auth_b64 = base64.b64encode(f"oauth2accesstoken:{token}".encode()).decode()
1070
+ auth_b64 = base64.b64encode(f"{username}:{token}".encode()).decode()
1067
1071
  config_data = {"auths": {registry_host: {"auth": auth_b64}}}
1068
1072
  with tempfile.TemporaryDirectory() as tmpdir:
1069
1073
  with open(os.path.join(tmpdir, "config.json"), "w") as f:
@@ -1201,7 +1205,7 @@ class DockerBuildCommand:
1201
1205
  return cls(("docker", "build"), ())
1202
1206
  flags: tuple[str, ...] = ("--platform", _DEPLOYMENT_PLATFORM, "--load")
1203
1207
  if not verbose:
1204
- flags += ("--progress=quiet",)
1208
+ flags += ("--progress=plain",)
1205
1209
  return cls(("docker", "buildx", "build"), flags)
1206
1210
 
1207
1211
 
@@ -1317,21 +1321,22 @@ def _run_local_build(
1317
1321
  raise click.ClickException(
1318
1322
  "Push token response missing token or registry_url"
1319
1323
  )
1324
+ username = push_data.get("username") or _DEFAULT_REGISTRY_USERNAME
1320
1325
  step += 1
1321
1326
 
1322
- normalized_registry = registry_url.rstrip("/")
1323
- if "://" in normalized_registry:
1324
- normalized_registry = normalized_registry.split("//", 1)[1]
1325
- repo_seed = image_name or name or spec.config.parent.name
1326
- remote_image = str(
1327
- ImageReference(
1328
- f"{normalized_registry}/{normalize_name(repo_seed)}",
1329
- tag,
1327
+ if push_data.get("repository_url"):
1328
+ # The control plane chose the exact repository (an ECR repository
1329
+ # is a single image name, so nothing may be appended to it).
1330
+ repository = _strip_url_scheme(push_data["repository_url"])
1331
+ else:
1332
+ repo_seed = image_name or name or spec.config.parent.name
1333
+ repository = (
1334
+ f"{_strip_url_scheme(registry_url)}/{normalize_name(repo_seed)}"
1330
1335
  )
1331
- )
1332
- registry_host = normalized_registry.split("/")[0]
1336
+ remote_image = str(ImageReference(repository, tag))
1337
+ registry_host = repository.split("/")[0]
1333
1338
 
1334
- with _docker_config_for_token(registry_host, deployment_token) as cfg:
1339
+ with _docker_config_for_token(registry_host, deployment_token, username) as cfg:
1335
1340
  _log_deploy_step(step, f"Logging into {registry_host}")
1336
1341
  token_input = (
1337
1342
  deployment_token
@@ -1343,7 +1348,7 @@ def _run_local_build(
1343
1348
  *_docker_argv(cfg),
1344
1349
  "login",
1345
1350
  "-u",
1346
- "oauth2accesstoken",
1351
+ username,
1347
1352
  "--password-stdin",
1348
1353
  registry_host,
1349
1354
  input=token_input,
@@ -1647,10 +1652,72 @@ class PublishedImage:
1647
1652
  ImageSource = BuildAndPush | PublishedImage
1648
1653
 
1649
1654
 
1655
+ def _resource_spec(image_pull_secrets: tuple[str, ...]) -> Mapping[str, object]:
1656
+ if not image_pull_secrets:
1657
+ return _OPERATOR_DEFAULT_RESOURCE_SPEC
1658
+ return {
1659
+ "image_pull_secrets": [{"name": name} for name in image_pull_secrets],
1660
+ }
1661
+
1662
+
1663
+ # Mirrors the control plane's own LocalObjectReference.name validation (a
1664
+ # Kubernetes DNS subdomain), so a bad secret name is rejected here instead of
1665
+ # after a build and push.
1666
+ _K8S_SECRET_NAME_RE = re.compile(
1667
+ r"^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
1668
+ )
1669
+
1670
+
1671
+ @dataclass(frozen=True, slots=True)
1672
+ class CreateOnlySettings:
1673
+ """Options for an external-image deployment that only apply when
1674
+ creating one, never when updating an existing deployment."""
1675
+
1676
+ placement: RequestedPlacement
1677
+ image_pull_secrets: tuple[str, ...] = ()
1678
+
1679
+ def __post_init__(self) -> None:
1680
+ for name in self.image_pull_secrets:
1681
+ if len(name) > 253 or not _K8S_SECRET_NAME_RE.match(name):
1682
+ raise click.UsageError(
1683
+ f"--image-pull-secret {name!r} is not a valid Kubernetes "
1684
+ "secret name (lowercase alphanumeric characters, '-', or "
1685
+ "'.' only, max 253 characters)."
1686
+ )
1687
+
1688
+ @property
1689
+ def requested(self) -> bool:
1690
+ return self.placement.requested or bool(self.image_pull_secrets)
1691
+
1692
+ def ensure_creatable(self, push_to: str | None, image_uri: str | None) -> None:
1693
+ if push_to is None and image_uri is None and self.requested:
1694
+ raise click.UsageError(
1695
+ "--listener-id, --k8s-namespace, and --image-pull-secret only "
1696
+ "apply when creating a deployment with --push-to or --image-uri."
1697
+ )
1698
+
1699
+ def ensure_not_existing(self, deployment_id: str) -> None:
1700
+ if self.placement.requested:
1701
+ raise click.UsageError(
1702
+ "Listener and namespace are fixed when a deployment is "
1703
+ f"created. Deployment {deployment_id} already exists, so "
1704
+ "drop --listener-id and --k8s-namespace, or create a new "
1705
+ "deployment with a different --name."
1706
+ )
1707
+ if self.image_pull_secrets:
1708
+ raise click.UsageError(
1709
+ "langgraph deploy does not update image pull secrets on an "
1710
+ f"existing deployment. Deployment {deployment_id} already "
1711
+ "exists, so drop --image-pull-secret and update resource_spec "
1712
+ "through the API or the LangSmith UI instead, or create a "
1713
+ "new deployment with a different --name."
1714
+ )
1715
+
1716
+
1650
1717
  @dataclass(frozen=True, slots=True)
1651
1718
  class CustomerRegistrySource:
1652
1719
  image: ImageSource
1653
- requested_placement: RequestedPlacement
1720
+ create_only: CreateOnlySettings
1654
1721
 
1655
1722
  def run(self, ctx: DeployContext) -> DeployOutcome:
1656
1723
  if isinstance(ctx.selector, ById):
@@ -1672,7 +1739,7 @@ class CustomerRegistrySource:
1672
1739
  self, ctx: DeployContext, existing: ExistingDeployment, step: int
1673
1740
  ) -> DeployOutcome:
1674
1741
  _ensure_customer_registry_source(existing)
1675
- self.requested_placement.ensure_not_requested(existing.id)
1742
+ self.create_only.ensure_not_existing(existing.id)
1676
1743
  image_uri, step = self._publish(ctx, step)
1677
1744
  _log_deploy_step(step, f"Updating deployment {existing.id}")
1678
1745
  updated = ctx.client.update_deployment(
@@ -1687,7 +1754,7 @@ class CustomerRegistrySource:
1687
1754
  )
1688
1755
 
1689
1756
  def _resolve_placement(self, ctx: DeployContext) -> Placement:
1690
- requested = self.requested_placement
1757
+ requested = self.create_only.placement
1691
1758
  if requested.listener_id is not None:
1692
1759
  return requested.on(_requested_listener(ctx.client, requested.listener_id))
1693
1760
  if not (ctx.endpoints.is_cloud or requested.requested):
@@ -1716,7 +1783,9 @@ class CustomerRegistrySource:
1716
1783
  else None,
1717
1784
  source=_CUSTOMER_REGISTRY_SOURCE,
1718
1785
  source_config={
1719
- "resource_spec": _OPERATOR_DEFAULT_RESOURCE_SPEC,
1786
+ "resource_spec": _resource_spec(
1787
+ self.create_only.image_pull_secrets
1788
+ ),
1720
1789
  **placement.source_config(),
1721
1790
  },
1722
1791
  source_revision_config={"image_uri": image_uri},
@@ -1810,19 +1879,13 @@ def _select_source(
1810
1879
  tag: str | None,
1811
1880
  remote_build_flag: bool | None,
1812
1881
  placement: RequestedPlacement,
1882
+ image_pull_secrets: tuple[str, ...],
1813
1883
  selector: DeploymentSelector,
1814
1884
  ) -> DeploymentSource:
1815
- if push_to is None and image_uri is None and placement.requested:
1816
- raise click.UsageError(
1817
- "--listener-id and --k8s-namespace only apply when creating a "
1818
- "deployment with --push-to or --image-uri."
1819
- )
1820
- if placement.requested and isinstance(selector, ById):
1821
- raise click.UsageError(
1822
- "Listener and namespace are fixed when a deployment is created, so "
1823
- "they cannot be set for an existing --deployment-id. Drop them, or "
1824
- "create a new deployment with --name."
1825
- )
1885
+ create_only = CreateOnlySettings(placement, image_pull_secrets)
1886
+ create_only.ensure_creatable(push_to, image_uri)
1887
+ if create_only.requested and isinstance(selector, ById):
1888
+ create_only.ensure_not_existing(selector.deployment_id)
1826
1889
  if image_uri is not None:
1827
1890
  if push_to is not None:
1828
1891
  raise click.UsageError("--image-uri cannot be combined with --push-to.")
@@ -1834,7 +1897,7 @@ def _select_source(
1834
1897
  raise click.UsageError("--image-uri cannot be combined with --remote.")
1835
1898
  return CustomerRegistrySource(
1836
1899
  image=PublishedImage(_validate_image_uri(image_uri)),
1837
- requested_placement=placement,
1900
+ create_only=create_only,
1838
1901
  )
1839
1902
  if push_to is not None:
1840
1903
  if remote_build_flag is True:
@@ -1844,7 +1907,7 @@ def _select_source(
1844
1907
  _require_local_docker()
1845
1908
  return CustomerRegistrySource(
1846
1909
  image=BuildAndPush(reference=reference, prebuilt_image=image),
1847
- requested_placement=placement,
1910
+ create_only=create_only,
1848
1911
  )
1849
1912
  if image and remote_build_flag is True:
1850
1913
  raise click.UsageError("--image cannot be combined with --remote builds.")
@@ -1874,7 +1937,10 @@ def _create_host_backend_client(
1874
1937
  host_url: str | None,
1875
1938
  api_key: str | None,
1876
1939
  env_vars: dict[str, str] | None = None,
1940
+ *,
1941
+ no_input: bool | None = None,
1877
1942
  ) -> HostBackendClient:
1943
+ effective_no_input = _no_input if no_input is None else no_input
1878
1944
  if env_vars is None:
1879
1945
  env_vars = _parse_env_from_config({}, pathlib.Path.cwd() / DEFAULT_CONFIG)
1880
1946
  resolved_api_key = api_key
@@ -1889,7 +1955,7 @@ def _create_host_backend_client(
1889
1955
  resolved_api_key = val
1890
1956
  break
1891
1957
  if not resolved_api_key:
1892
- if _no_input:
1958
+ if effective_no_input:
1893
1959
  raise click.ClickException(
1894
1960
  "No LangSmith API key found. Set LANGSMITH_API_KEY in the "
1895
1961
  "environment or .env file."
@@ -1914,6 +1980,8 @@ def _create_host_backend_client(
1914
1980
  def _call_host_backend_with_optional_tenant(
1915
1981
  client: HostBackendClient,
1916
1982
  operation: Callable[[HostBackendClient], _T],
1983
+ *,
1984
+ no_input: bool | None = None,
1917
1985
  ) -> _T:
1918
1986
  """Run *operation*, prompting for a workspace ID on org-scoped 403s.
1919
1987
 
@@ -1922,6 +1990,7 @@ def _call_host_backend_with_optional_tenant(
1922
1990
  in-place so all subsequent calls through the same instance are
1923
1991
  tenant-aware.
1924
1992
  """
1993
+ effective_no_input = _no_input if no_input is None else no_input
1925
1994
  prompted_for_tenant = False
1926
1995
 
1927
1996
  while True:
@@ -1933,7 +2002,7 @@ def _call_host_backend_with_optional_tenant(
1933
2002
  and err.status_code == 403
1934
2003
  and "requires workspace specification" in err.message
1935
2004
  ):
1936
- if _no_input:
2005
+ if effective_no_input:
1937
2006
  raise click.ClickException(
1938
2007
  "API key is org-scoped and requires a workspace ID. "
1939
2008
  "Set LANGSMITH_TENANT_ID in your .env file or "
@@ -2182,6 +2251,18 @@ def _deploy_base_options(
2182
2251
  "creating a deployment with --push-to or --image-uri."
2183
2252
  ),
2184
2253
  ),
2254
+ click.option(
2255
+ "--image-pull-secret",
2256
+ "image_pull_secrets",
2257
+ multiple=True,
2258
+ help=(
2259
+ "Name of a Kubernetes secret (type kubernetes.io/"
2260
+ "dockerconfigjson) in the deployment's namespace to use for "
2261
+ "pulling the image from a private registry. Repeat to give "
2262
+ "more than one. Only used when creating a deployment with "
2263
+ "--push-to or --image-uri."
2264
+ ),
2265
+ ),
2185
2266
  click.option(
2186
2267
  "--config",
2187
2268
  "-c",
@@ -2295,6 +2376,7 @@ def _deploy_cmd(
2295
2376
  image_uri: str | None,
2296
2377
  listener_id: str | None,
2297
2378
  k8s_namespace: str | None,
2379
+ image_pull_secrets: tuple[str, ...],
2298
2380
  tag: str | None,
2299
2381
  base_image: str | None,
2300
2382
  install_command: str | None,
@@ -2371,6 +2453,7 @@ def _deploy_cmd(
2371
2453
  tag=tag,
2372
2454
  remote_build_flag=remote_build_flag,
2373
2455
  placement=RequestedPlacement(listener_id, k8s_namespace),
2456
+ image_pull_secrets=image_pull_secrets,
2374
2457
  selector=selector,
2375
2458
  )
2376
2459
 
@@ -2518,6 +2601,13 @@ def deploy_listeners() -> None:
2518
2601
 
2519
2602
  @OPT_HOST_API_KEY
2520
2603
  @OPT_HOST_URL
2604
+ @click.option(
2605
+ "--json",
2606
+ "json_output",
2607
+ is_flag=True,
2608
+ default=False,
2609
+ help="Emit the listeners as a JSON array instead of a table.",
2610
+ )
2521
2611
  @deploy_listeners.command(
2522
2612
  "list",
2523
2613
  help=(
@@ -2526,11 +2616,16 @@ def deploy_listeners() -> None:
2526
2616
  "--listener-id <id>` to deploy through it."
2527
2617
  ),
2528
2618
  )
2529
- def deploy_listeners_list(api_key: str | None, host_url: str | None) -> None:
2530
- client = _create_host_backend_client(host_url, api_key)
2619
+ def deploy_listeners_list(
2620
+ api_key: str | None, host_url: str | None, json_output: bool
2621
+ ) -> None:
2622
+ client = _create_host_backend_client(host_url, api_key, no_input=json_output)
2531
2623
  listeners = _call_host_backend_with_optional_tenant(
2532
- client, lambda c: c.list_listeners()
2624
+ client, lambda c: c.list_listeners(), no_input=json_output
2533
2625
  )
2626
+ if json_output:
2627
+ click.echo(json_mod.dumps(listeners))
2628
+ return
2534
2629
  if not listeners:
2535
2630
  click.echo("No listeners found for this workspace.")
2536
2631
  return
@@ -249,9 +249,12 @@ class HostBackendClient:
249
249
  return self._request("DELETE", f"/v2/deployments/{deployment_id}")
250
250
 
251
251
  def request_push_token(self, deployment_id: str) -> dict[str, Any]:
252
+ # Tells the control plane this client logs in with the returned
253
+ # `username` and pushes to `repository_url`. LangSmith AWS requires it.
252
254
  return self._request(
253
255
  "POST",
254
256
  f"/v2/deployments/{deployment_id}/push-token",
257
+ {"supports_registry_username": True},
255
258
  )
256
259
 
257
260
  def request_upload_url(self, deployment_id: str) -> dict[str, Any]:
@@ -14,6 +14,7 @@ import langgraph_cli.deploy as deploy_module
14
14
  from langgraph_cli.cli import cli, prepare_args_and_stdin
15
15
  from langgraph_cli.config import Config, _get_pip_cleanup_lines, validate_config
16
16
  from langgraph_cli.docker import DEFAULT_POSTGRES_URI, DockerCapabilities, Version
17
+ from langgraph_cli.host_backend import HostBackendError
17
18
  from langgraph_cli.util import clean_empty_lines
18
19
 
19
20
  FORMATTED_CLEANUP_LINES = _get_pip_cleanup_lines(
@@ -535,6 +536,121 @@ def test_deploy_listeners_list_command_no_results(monkeypatch) -> None:
535
536
  assert result.output.strip() == "No listeners found for this workspace."
536
537
 
537
538
 
539
+ def test_deploy_listeners_list_command_json(monkeypatch) -> None:
540
+ runner = CliRunner()
541
+
542
+ listeners = [
543
+ {
544
+ "id": "listener-1",
545
+ "compute_id": "prod-cluster",
546
+ "compute_config": {"k8s_namespaces": ["agents"]},
547
+ },
548
+ {
549
+ "id": "listener-2",
550
+ "compute_id": "multi-cluster",
551
+ "compute_config": {"k8s_namespaces": ["agents", "agents-staging"]},
552
+ },
553
+ ]
554
+
555
+ class FakeClient:
556
+ def __init__(self, host_url: str, api_key: str, tenant_id: str | None = None):
557
+ pass
558
+
559
+ def list_listeners(self):
560
+ return listeners
561
+
562
+ monkeypatch.setattr(deploy_module, "HostBackendClient", FakeClient)
563
+
564
+ result = runner.invoke(
565
+ cli,
566
+ [
567
+ "deploy",
568
+ "listeners",
569
+ "list",
570
+ "--json",
571
+ "--api-key",
572
+ "test-key",
573
+ "--host-url",
574
+ "https://api.example.com",
575
+ ],
576
+ )
577
+
578
+ assert result.exit_code == 0, result.output
579
+ assert json.loads(result.output) == listeners
580
+
581
+
582
+ def test_deploy_listeners_list_command_json_no_results(monkeypatch) -> None:
583
+ runner = CliRunner()
584
+
585
+ class FakeClient:
586
+ def __init__(self, host_url: str, api_key: str, tenant_id: str | None = None):
587
+ pass
588
+
589
+ def list_listeners(self):
590
+ return []
591
+
592
+ monkeypatch.setattr(deploy_module, "HostBackendClient", FakeClient)
593
+
594
+ result = runner.invoke(
595
+ cli,
596
+ [
597
+ "deploy",
598
+ "listeners",
599
+ "list",
600
+ "--json",
601
+ "--api-key",
602
+ "test-key",
603
+ "--host-url",
604
+ "https://api.example.com",
605
+ ],
606
+ )
607
+
608
+ assert result.exit_code == 0, result.output
609
+ assert json.loads(result.output) == []
610
+
611
+
612
+ def test_deploy_listeners_list_command_json_org_scoped_403(monkeypatch) -> None:
613
+ """With --json, an org-scoped 403 must raise cleanly instead of
614
+ prompting for a workspace ID, which would write to stdout and hang
615
+ waiting for input that a scripted invocation never provides."""
616
+ runner = CliRunner()
617
+
618
+ class FakeClient:
619
+ def __init__(self, host_url: str, api_key: str, tenant_id: str | None = None):
620
+ pass
621
+
622
+ def list_listeners(self):
623
+ raise HostBackendError("requires workspace specification", status_code=403)
624
+
625
+ def set_tenant(self, tenant_id: str) -> None:
626
+ raise AssertionError("must not retry with a prompted tenant with --json")
627
+
628
+ monkeypatch.setattr(deploy_module, "HostBackendClient", FakeClient)
629
+
630
+ prompt_calls = []
631
+ monkeypatch.setattr(
632
+ click, "prompt", lambda *a, **k: prompt_calls.append((a, k)) or "unreachable"
633
+ )
634
+
635
+ result = runner.invoke(
636
+ cli,
637
+ [
638
+ "deploy",
639
+ "listeners",
640
+ "list",
641
+ "--json",
642
+ "--api-key",
643
+ "test-key",
644
+ "--host-url",
645
+ "https://api.example.com",
646
+ ],
647
+ )
648
+
649
+ assert prompt_calls == [], "must not prompt interactively with --json"
650
+ assert result.exit_code != 0
651
+ assert "LANGSMITH_TENANT_ID" in result.output
652
+
653
+
538
654
  def test_deploy_revisions_list_command(monkeypatch) -> None:
539
655
  runner = CliRunner()
540
656
  captured: dict[str, str] = {}