fix(cli): update graph config schema to support description field (#6895)

## Summary
- The config processing code in `config.py` already handles graphs
defined as `{"path": "...", "description": "..."}` dicts, but the
`Config` TypedDict and JSON schema only declared `dict[str, str]`
- Added a `GraphDef` TypedDict with `path` and optional `description`
fields
- Updated `Config.graphs` to `dict[str, str | GraphDef]` and regenerated
the JSON schemas
- This makes the schema match the actual runtime behavior and fixes
IDE/schema validation for users who use the dict format

## Test plan
- [x] `make format` passes
- [x] `make lint` passes
- [x] `make test` passes (all 85 tests)
- [x] Schema regeneration produces consistent output

Release Notes: Update `langgraph.json` schema to support `{"path":
"...", "description": "..."}` format for graph definitions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William FH
2026-02-22 20:16:45 -08:00
committed by GitHub
co-authored by Claude Opus 4.6
parent f702729e04
commit ed293f16d6
4 changed files with 109 additions and 13 deletions
+2
View File
@@ -20,6 +20,7 @@ from langgraph_cli.schemas import (
Config,
ConfigurableHeaderConfig,
CorsConfig,
GraphDef,
HttpConfig,
IndexConfig,
SecurityConfig,
@@ -108,6 +109,7 @@ def add_descriptions_to_schema(schema, cls):
# Find the class that corresponds to this definition
for potential_cls in [
Config,
GraphDef,
StoreConfig,
IndexConfig,
AuthConfig,