Files
langgraph/libs/sdk-py/langgraph_sdk/schema.py
T
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>John Kennedyopen-swe[bot] <open-swe@users.noreply.github.com>
6a2822d3c7 chore(deps): bump the minor-and-patch group across 1 directory with 5 updates (#8532)
Bumps the minor-and-patch group with 5 updates in the /libs/sdk-py
directory:

| Package | From | To |
| --- | --- | --- |
| [langchain-core](https://github.com/langchain-ai/langchain) | `1.4.8`
| `1.5.3` |
| [ruff](https://github.com/astral-sh/ruff) | `0.15.20` | `0.16.1` |
| [codespell](https://github.com/codespell-project/codespell) | `2.4.2`
| `2.4.3` |
| [ty](https://github.com/astral-sh/ty) | `0.0.55` | `0.0.66` |
| [xxhash](https://github.com/ifduyue/python-xxhash) | `3.8.0` | `3.8.1`
|


Updates `langchain-core` from 1.4.8 to 1.5.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==1.5.3</h2>
<p>Changes since langchain-core==1.5.2</p>
<p>release(core): 1.5.3 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39145">#39145</a>)
fix(core): fall back to <code>LANGSMITH_API_KEY</code> for gateway (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39115">#39115</a>)</p>
<h2>langchain-core==1.5.2</h2>
<p>Changes since langchain-core==1.5.1</p>
<p>release(core): 1.5.2 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39108">#39108</a>)
fix(core): handle empty string in gateway env vars (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39107">#39107</a>)
chore: bump setuptools from 82.0.0 to 83.0.0 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39032">#39032</a>)
chore: bump jupyterlab from 4.5.9 to 4.5.10 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39033">#39033</a>)
chore: bump setuptools from 80.9.0 to 83.0.0 in /libs/text-splitters (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39029">#39029</a>)</p>
<h2>langchain-core==1.5.1</h2>
<p>Changes since langchain-core==1.5.0</p>
<p>release(core): 1.5.1 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39042">#39042</a>)
feat(anthropic,fireworks,openai): support langsmith gateway through env
var (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38742">#38742</a>)
fix(core): use <code>tool_call_schema</code> cache for
<code>BaseTool</code> token counting in
<code>count_tokens_approximately</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39020">#39020</a>)</p>
<h2>langchain-core==1.5.0</h2>
<p>Changes since langchain-core==1.4.9</p>
<p>release(core): 1.5.0 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38978">#38978</a>)
feat(core): add <code>reasoning_effort</code> as a standard chat model
parameter (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38887">#38887</a>)
chore: bump soupsieve from 2.8 to 2.8.4 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38750">#38750</a>)
chore: bump mistune from 3.2.1 to 3.3.0 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38783">#38783</a>)</p>
<h2>langchain-core==1.4.9</h2>
<p>Changes since langchain-core==1.4.8</p>
<p>release(core): 1.4.9 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38728">#38728</a>)
fix(core): improve langsmith loader error messages (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35648">#35648</a>)
fix(core): output parser bugs in xml.py and pydantic.py (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35641">#35641</a>)
style(core): fix some ruff preview rules (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38656">#38656</a>)
fix(core): avoid <code>dict</code> shadowing in language models (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38480">#38480</a>)
fix(core): <code>_parse_google_docstring</code> mishandling continuation
lines with colons (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35680">#35680</a>)
fix(core): add messages to bare <code>raise ValueError</code> calls (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38158">#38158</a>)
fix(core): use <code>asyncio.get_running_loop()</code> in async contexts
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38157">#38157</a>)
chore: bump langsmith from 0.8.0 to 0.8.18 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38319">#38319</a>)
chore: bump jupyterlab from 4.5.7 to 4.5.9 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38326">#38326</a>)
chore: bump vcrpy from 8.1.1 to 8.2.1 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/38327">#38327</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/01d8481ae3d457ec3751cbb0331ea3a4b720fa90"><code>01d8481</code></a>
release(core): 1.5.3 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39145">#39145</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/b8a6e36d3f810302c66065ea1c2892da000de550"><code>b8a6e36</code></a>
chore(model-profiles): refresh model profile data (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39141">#39141</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/cdca311de2958e497cfd823a45ddb770d0ef94c0"><code>cdca311</code></a>
fix(core): fall back to <code>LANGSMITH_API_KEY</code> for gateway (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39115">#39115</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/a5a8762436658b218dbfc5efff9e8ab8fabbe62f"><code>a5a8762</code></a>
ci: annotate uv bump workflow with PR links (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39112">#39112</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/557c0a986d5068085a945dcb3c9ce27257c4add8"><code>557c0a9</code></a>
chore(deps): bump uv to 0.12.0 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39111">#39111</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/835c85ae236a2d33cd11de4c98d28cbc6ebbd72f"><code>835c85a</code></a>
release(anthropic): 1.5.3 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39109">#39109</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/c1ab807b1f62ad04274c28f2b7d8c3141d8ba1f2"><code>c1ab807</code></a>
release(core): 1.5.2 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39108">#39108</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/313223347f842274432d8a2968b4be407e2722d8"><code>3132233</code></a>
fix(anthropic): preserve empty thinking field in signature_delta
streaming (#...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/b3a6d9a012681df8a8e33345c8255ca69ec0e437"><code>b3a6d9a</code></a>
chore(model-profiles): refresh model profile data (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/39105">#39105</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/447b51abbccde236838524ee717682a0dd2a6c09"><code>447b51a</code></a>
fix(anthropic): strip unsupported fields from system message content
blocks (...</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.4.8...langchain-core==1.5.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `ruff` from 0.15.20 to 0.16.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.16.1</h2>
<h2>Release Notes</h2>
<p>Released on 2026-07-30.</p>
<h3>Preview features</h3>
<ul>
<li>Add an option to opt out of human-readable names (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27160">#27160</a>)</li>
<li>[<code>flake8-pytest-style</code>] Make fixes safe by default and
unsafe only when comments are present (<code>PT018</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27201">#27201</a>)</li>
<li>[<code>pyupgrade</code>] Skip fix when a defaulted
<code>TypeVar</code> precedes a non-defaulted one (<code>UP040</code>,
<code>UP046</code>, <code>UP047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27133">#27133</a>)</li>
<li>[<code>ruff</code>] Fix false positive with unpacked arguments
(<code>RUF065</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26959">#26959</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Bump <code>gen-lsp-types</code> to gracefully handle unknown
enumeration values in LSP messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27230">#27230</a>)</li>
<li>[<code>flake8-bugbear</code>] Mark <code>range</code> as immutable
(<code>B008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27247">#27247</a>)</li>
<li>[<code>flake8-comprehensions</code>] NFKC-normalize keyword names in
<code>C408</code> fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26813">#26813</a>)</li>
<li>[<code>flake8-return</code>] Fix false positive when variable is
read in <code>finally</code> clause (<code>RET504</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/25441">#25441</a>)</li>
<li>[<code>pydocstyle</code>] Skip section detection inside RST
directive bodies (<code>D214</code>, <code>D405</code>,
<code>D413</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23635">#23635</a>)</li>
<li>[<code>refurb</code>] Parenthesize <code>yield</code> arguments in
the <code>FURB192</code> fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27192">#27192</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-pytest-style</code>] Mark <code>PT022</code> fixes as
unsafe (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26440">#26440</a>)</li>
<li>[<code>refurb</code>] Mark fixes that remove unknown separators as
unsafe (<code>FURB105</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27200">#27200</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Fix indexing of excluded nested Ruff workspaces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27303">#27303</a>)</li>
<li>Lint TOML files in the LSP (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26862">#26862</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Cover <code>pycon</code> Markdown formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27153">#27153</a>)</li>
<li>[<code>flake8-bandit</code>] Document <code>TYPE_CHECKING</code>
exception (<code>S101</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27004">#27004</a>)</li>
<li>[<code>flake8-import-conventions</code>] Document that
<code>extend-aliases</code> can override default aliases (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27191">#27191</a>)</li>
<li>[<code>pylint</code>] Add missing fix safety gotchas for
<code>non-augmented-assignment</code> (<code>PLR6104</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27250">#27250</a>)</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>Reduce syntax error noise by swallowing dedents like indents (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27170">#27170</a>)</li>
<li>Vendor latest annotate-snippets (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27033">#27033</a>)</li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a href="https://github.com/bxff"><code>@​bxff</code></a></li>
<li><a
href="https://github.com/anishgirianish"><code>@​anishgirianish</code></a></li>
<li><a href="https://github.com/Avasam"><code>@​Avasam</code></a></li>
<li><a href="https://github.com/epage"><code>@​epage</code></a></li>
<li><a href="https://github.com/LHMQ878"><code>@​LHMQ878</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.16.1</h2>
<p>Released on 2026-07-30.</p>
<h3>Preview features</h3>
<ul>
<li>Add an option to opt out of human-readable names (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27160">#27160</a>)</li>
<li>[<code>flake8-pytest-style</code>] Make fixes safe by default and
unsafe only when comments are present (<code>PT018</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27201">#27201</a>)</li>
<li>[<code>pyupgrade</code>] Skip fix when a defaulted
<code>TypeVar</code> precedes a non-defaulted one (<code>UP040</code>,
<code>UP046</code>, <code>UP047</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27133">#27133</a>)</li>
<li>[<code>ruff</code>] Fix false positive with unpacked arguments
(<code>RUF065</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26959">#26959</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Bump <code>gen-lsp-types</code> to gracefully handle unknown
enumeration values in LSP messages (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27230">#27230</a>)</li>
<li>[<code>flake8-bugbear</code>] Mark <code>range</code> as immutable
(<code>B008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27247">#27247</a>)</li>
<li>[<code>flake8-comprehensions</code>] NFKC-normalize keyword names in
<code>C408</code> fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26813">#26813</a>)</li>
<li>[<code>flake8-return</code>] Fix false positive when variable is
read in <code>finally</code> clause (<code>RET504</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/25441">#25441</a>)</li>
<li>[<code>pydocstyle</code>] Skip section detection inside RST
directive bodies (<code>D214</code>, <code>D405</code>,
<code>D413</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23635">#23635</a>)</li>
<li>[<code>refurb</code>] Parenthesize <code>yield</code> arguments in
the <code>FURB192</code> fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27192">#27192</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-pytest-style</code>] Mark <code>PT022</code> fixes as
unsafe (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26440">#26440</a>)</li>
<li>[<code>refurb</code>] Mark fixes that remove unknown separators as
unsafe (<code>FURB105</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27200">#27200</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Fix indexing of excluded nested Ruff workspaces (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27303">#27303</a>)</li>
<li>Lint TOML files in the LSP (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26862">#26862</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Cover <code>pycon</code> Markdown formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27153">#27153</a>)</li>
<li>[<code>flake8-bandit</code>] Document <code>TYPE_CHECKING</code>
exception (<code>S101</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27004">#27004</a>)</li>
<li>[<code>flake8-import-conventions</code>] Document that
<code>extend-aliases</code> can override default aliases (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27191">#27191</a>)</li>
<li>[<code>pylint</code>] Add missing fix safety gotchas for
<code>non-augmented-assignment</code> (<code>PLR6104</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27250">#27250</a>)</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>Reduce syntax error noise by swallowing dedents like indents (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27170">#27170</a>)</li>
<li>Vendor latest annotate-snippets (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27033">#27033</a>)</li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a href="https://github.com/bxff"><code>@​bxff</code></a></li>
<li><a
href="https://github.com/anishgirianish"><code>@​anishgirianish</code></a></li>
<li><a href="https://github.com/Avasam"><code>@​Avasam</code></a></li>
<li><a href="https://github.com/epage"><code>@​epage</code></a></li>
<li><a href="https://github.com/LHMQ878"><code>@​LHMQ878</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/80790b348b5188e7fc253665540f442c6ec7dd05"><code>80790b3</code></a>
Bump 0.16.1 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27330">#27330</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/63830f3e97b56ca3be0dd8f1092f76c4acc63213"><code>63830f3</code></a>
[ty] Borrow from constraint set storage less often (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27328">#27328</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f40dca98a7f1b6fff0cee5ecf1e6364d5a8bdc15"><code>f40dca9</code></a>
[ty] Preserve forwarded expanded-variadic diagnostic sources (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27266">#27266</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0d804975a2645d6e4a795cf501fd764b88aa47e3"><code>0d80497</code></a>
Lint TOML files in the LSP (<a
href="https://redirect.github.com/astral-sh/ruff/issues/26862">#26862</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d91586bd5b30f77f6614d57b73fc7dbea9051a0e"><code>d91586b</code></a>
Update prek dependencies (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27293">#27293</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7da4b8b8d78fd6df2b3e06d8466d9cd49822900d"><code>7da4b8b</code></a>
[ty] Respect bounds and constraints in generic materializations (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27228">#27228</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b20daf741241a6829ff8963a203f7847561deb62"><code>b20daf7</code></a>
[ty] refactor: add helper function to send partial results (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27249">#27249</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/4d4c8fa1c75b00561ea24eefefb13eb5ff80e01f"><code>4d4c8fa</code></a>
[ty] Emit diagnostic when specializing a non-generic class (<a
href="https://redirect.github.com/astral-sh/ruff/issues/26883">#26883</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7c3e2db97deb5c5edd6e4303403ef6caf2bde8be"><code>7c3e2db</code></a>
[ty] Fix enum class container assignability (<a
href="https://redirect.github.com/astral-sh/ruff/issues/27318">#27318</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d5ef97fcd03e108f7510f84b8ed85bb4051311fe"><code>d5ef97f</code></a>
[<code>flake8-return</code>] Fix false positive when variable is read in
<code>finally</code> claus...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.15.20...0.16.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `codespell` from 2.4.2 to 2.4.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codespell-project/codespell/releases">codespell's
releases</a>.</em></p>
<blockquote>
<h2>v2.4.3</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<ul>
<li>Add 'radback' to dictionary with correction by <a
href="https://github.com/Flo3561"><code>@​Flo3561</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3883">codespell-project/codespell#3883</a></li>
<li>Add 'repetirion' to dictionary corrections by <a
href="https://github.com/Flo3561"><code>@​Flo3561</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3885">codespell-project/codespell#3885</a></li>
<li>Need to specify a version of Python version after all by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3887">codespell-project/codespell#3887</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3889">codespell-project/codespell#3889</a></li>
<li>Add cases for &quot;modulle&quot; -&gt; &quot;module&quot; by <a
href="https://github.com/utzcoz"><code>@​utzcoz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3888">codespell-project/codespell#3888</a></li>
<li>Add case &quot;auido&quot; -&gt; &quot;audio&quot; by <a
href="https://github.com/utzcoz"><code>@​utzcoz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3890">codespell-project/codespell#3890</a></li>
<li>Add credentilas-&gt;credentials and friends by <a
href="https://github.com/peternewman"><code>@​peternewman</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3895">codespell-project/codespell#3895</a></li>
<li>Add the case &quot;cubid&quot; -&gt; &quot;cubic&quot; by <a
href="https://github.com/utzcoz"><code>@​utzcoz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3891">codespell-project/codespell#3891</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3897">codespell-project/codespell#3897</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3900">codespell-project/codespell#3900</a></li>
<li>Bump codecov/codecov-action from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3902">codespell-project/codespell#3902</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3904">codespell-project/codespell#3904</a></li>
<li>Add <code>magntiude-&gt;magnitude</code> by <a
href="https://github.com/nathanjmcdougall"><code>@​nathanjmcdougall</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3899">codespell-project/codespell#3899</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3909">codespell-project/codespell#3909</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3912">codespell-project/codespell#3912</a></li>
<li>Add the case &quot;instanc&quot; -&gt; &quot;instance&quot; by <a
href="https://github.com/utzcoz"><code>@​utzcoz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3896">codespell-project/codespell#3896</a></li>
<li>gampad -&gt; gamepad (and plural) by <a
href="https://github.com/julianstirling"><code>@​julianstirling</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3906">codespell-project/codespell#3906</a></li>
<li>Add typos of <code>monotonic</code> and <code>monotonicity</code> by
<a
href="https://github.com/nathanjmcdougall"><code>@​nathanjmcdougall</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3898">codespell-project/codespell#3898</a></li>
<li>Add spelling correction for multipile(s)/vulnerabities. by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3905">codespell-project/codespell#3905</a></li>
<li>Add 'simpilfy -&gt; simplify' by <a
href="https://github.com/alexreinking"><code>@​alexreinking</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3913">codespell-project/codespell#3913</a></li>
<li>fix(packaging): prevent unwanted files and tests from being
installed by <a
href="https://github.com/mikelolasagasti"><code>@​mikelolasagasti</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3911">codespell-project/codespell#3911</a></li>
<li>Add skarhoj-&gt;SKAARHOJ to dictionary corrections by <a
href="https://github.com/peternewman"><code>@​peternewman</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3908">codespell-project/codespell#3908</a></li>
<li>Improve the dictionary by <a
href="https://github.com/algonell"><code>@​algonell</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3914">codespell-project/codespell#3914</a></li>
<li>Add spelling correction for accorss/accors. by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3916">codespell-project/codespell#3916</a></li>
<li>Bump autofix-ci/action from 1.3.3 to 1.3.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3921">codespell-project/codespell#3921</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3923">codespell-project/codespell#3923</a></li>
<li>Add <code>influecer-&gt;influencer</code> and <code>influnce*</code>
typos to dictionary by <a
href="https://github.com/nathanjmcdougall"><code>@​nathanjmcdougall</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3925">codespell-project/codespell#3925</a></li>
<li>Add typos for <code>excavate</code> and variants by <a
href="https://github.com/nathanjmcdougall"><code>@​nathanjmcdougall</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3926">codespell-project/codespell#3926</a></li>
<li>Dict: Add corrections for memoy by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3924">codespell-project/codespell#3924</a></li>
<li><code>overheda -&gt; overhead</code> by <a
href="https://github.com/George-Ogden"><code>@​George-Ogden</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3919">codespell-project/codespell#3919</a></li>
<li><code>inclusize-&gt;inclusive</code> and variants by <a
href="https://github.com/George-Ogden"><code>@​George-Ogden</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3918">codespell-project/codespell#3918</a></li>
<li>Add spelling corrections for authorization by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3922">codespell-project/codespell#3922</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3927">codespell-project/codespell#3927</a></li>
<li>Don't fix Voight by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3929">codespell-project/codespell#3929</a></li>
<li>Add spelling corrections for interstect and interstection by <a
href="https://github.com/korli"><code>@​korli</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3928">codespell-project/codespell#3928</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3930">codespell-project/codespell#3930</a></li>
<li>Improve output in interactive mode by <a
href="https://github.com/darkmattercoder"><code>@​darkmattercoder</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3884">codespell-project/codespell#3884</a></li>
<li>feat: support codespell:ignore-next-line directive by <a
href="https://github.com/SAY-5"><code>@​SAY-5</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3931">codespell-project/codespell#3931</a></li>
<li>Add woork-&gt;work and formace-&gt;format and friends by <a
href="https://github.com/peternewman"><code>@​peternewman</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3828">codespell-project/codespell#3828</a></li>
<li>shortctu -&gt; shortcut by <a
href="https://github.com/George-Ogden"><code>@​George-Ogden</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3934">codespell-project/codespell#3934</a></li>
<li>A couple typos by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3935">codespell-project/codespell#3935</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3937">codespell-project/codespell#3937</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3942">codespell-project/codespell#3942</a></li>
<li>reclaculate-&gt;recalculate by <a
href="https://github.com/adamgann"><code>@​adamgann</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3936">codespell-project/codespell#3936</a></li>
<li>Add spelling correction for improprt. by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3939">codespell-project/codespell#3939</a></li>
<li>Dictionary plasic-plastic by <a
href="https://github.com/julianstirling"><code>@​julianstirling</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3938">codespell-project/codespell#3938</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codespell-project/codespell/commit/57b21406f092110c18776e39b0bda50d37c945c8"><code>57b2140</code></a>
Read only [tool.codespell] from TOML config (<a
href="https://redirect.github.com/codespell-project/codespell/issues/3975">#3975</a>)</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/23b8d940332bcff6369872b53964d4137c586728"><code>23b8d94</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/926c4d6ff083acc62bc04c102e0a9b2091d754f1"><code>926c4d6</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/820a3011e0bfe3f90789ba41e751a26656bea7ab"><code>820a301</code></a>
Merge pull request <a
href="https://redirect.github.com/codespell-project/codespell/issues/3967">#3967</a>
from codespell-project/peternewman-patch-1</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/9fe42c964c90f65a9a2841847af4e093c67ec817"><code>9fe42c9</code></a>
Add common misspellings for reseeve-&gt;reserve to dictionary</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/725173c815cee1b781b85ec51eb43dc4f51dcd0f"><code>725173c</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/86c13ee4dce0010e8d8119ded33694806e37ca8f"><code>86c13ee</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/7b9f36ce634c551107a3a4a5c25782a2245d7658"><code>7b9f36c</code></a>
Bump actions/checkout from 6 to 7</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/bcc1b804a83b8a146586101431b063c07cfcc699"><code>bcc1b80</code></a>
Add spelling corrections for simpe and variants.</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/89584cc1479d0f8dbfd501925673b6be6d460fe1"><code>89584cc</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li>Additional commits viewable in <a
href="https://github.com/codespell-project/codespell/compare/v2.4.2...v2.4.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `ty` from 0.0.55 to 0.0.66
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ty/releases">ty's
releases</a>.</em></p>
<blockquote>
<h2>0.0.66</h2>
<h2>Release Notes</h2>
<p>Released on 2026-08-03.</p>
<h3>LSP server</h3>
<ul>
<li>Index <code>with</code>-statement targets as symbols (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27256">#27256</a>)</li>
<li>Trigger signature help after completing callable with parentheses
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/27084">#27084</a>)</li>
</ul>
<h3>Library support</h3>
<ul>
<li>Pydantic: Recognize models installed on extra search paths (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27429">#27429</a>)</li>
</ul>
<h3>Diagnostics</h3>
<ul>
<li>Detect <code>__aenter__</code> and <code>__aexit__</code> that do
not return awaitables (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27414">#27414</a>)</li>
<li>Diagnose dataclass fields after inherited defaults (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27327">#27327</a>)</li>
<li>Emit diagnostic when specializing a non-generic class (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26883">#26883</a>)</li>
<li>Improve error context for incompatible callable signatures (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27422">#27422</a>)</li>
<li>Preserve forwarded expanded-variadic diagnostic sources (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27266">#27266</a>)</li>
</ul>
<h3>Core type checking</h3>
<ul>
<li>Avoid over-materializing user-defined <code>TypeIs</code> return
types (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26864">#26864</a>)</li>
<li>Fix enum class container assignability (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27318">#27318</a>)</li>
<li>Hide stub-only helpers from implicit builtin lookup (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27423">#27423</a>)</li>
<li>Move <code>Unknown</code> out of the experimental
<code>ty_extensions</code> API (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27430">#27430</a>)</li>
<li>Preserve <code>TypeVarTuple</code> context during
<code>Generic</code> recovery (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27381">#27381</a>)</li>
<li>Preserve exact numeric types in covariant collections (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27311">#27311</a>)</li>
<li>Reject <code>ClassVar</code> and <code>Final</code> qualifiers in
<code>NamedTuple</code> fields (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27380">#27380</a>)</li>
<li>Reject out-of-scope <code>ParamSpec</code> components (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27378">#27378</a>)</li>
<li>Reject specializing non-generic subclasses (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27377">#27377</a>)</li>
<li>Respect bounds and constraints in generic materializations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27228">#27228</a>)</li>
<li>Sync vendored typeshed stubs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27401">#27401</a>).
<a
href="https://github.com/python/typeshed/compare/b00c387c669cb50d5d388d77b74c2e832e147fe8...1b116673774d062a4af7b0a0b3d05533a6be55d0">Typeshed
diff</a></li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li>
<li><a href="https://github.com/carljm"><code>@​carljm</code></a></li>
<li><a
href="https://github.com/Punisheroot"><code>@​Punisheroot</code></a></li>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/cheparity"><code>@​cheparity</code></a></li>
<li><a
href="https://github.com/BitWeaverDev"><code>@​BitWeaverDev</code></a></li>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a href="https://github.com/ribru17"><code>@​ribru17</code></a></li>
<li><a href="https://github.com/sharkdp"><code>@​sharkdp</code></a></li>
</ul>
<h2>Install ty 0.0.66</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ty/blob/main/CHANGELOG.md">ty's
changelog</a>.</em></p>
<blockquote>
<h2>0.0.66</h2>
<p>Released on 2026-08-03.</p>
<h3>LSP server</h3>
<ul>
<li>Index <code>with</code>-statement targets as symbols (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27256">#27256</a>)</li>
<li>Trigger signature help after completing callable with parentheses
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/27084">#27084</a>)</li>
</ul>
<h3>Library support</h3>
<ul>
<li>Pydantic: Recognize models installed on extra search paths (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27429">#27429</a>)</li>
</ul>
<h3>Diagnostics</h3>
<ul>
<li>Detect <code>__aenter__</code> and <code>__aexit__</code> that do
not return awaitables (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27414">#27414</a>)</li>
<li>Diagnose dataclass fields after inherited defaults (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27327">#27327</a>)</li>
<li>Emit diagnostic when specializing a non-generic class (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26883">#26883</a>)</li>
<li>Improve error context for incompatible callable signatures (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27422">#27422</a>)</li>
<li>Preserve forwarded expanded-variadic diagnostic sources (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27266">#27266</a>)</li>
</ul>
<h3>Core type checking</h3>
<ul>
<li>Avoid over-materializing user-defined <code>TypeIs</code> return
types (<a
href="https://redirect.github.com/astral-sh/ruff/pull/26864">#26864</a>)</li>
<li>Fix enum class container assignability (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27318">#27318</a>)</li>
<li>Hide stub-only helpers from implicit builtin lookup (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27423">#27423</a>)</li>
<li>Move <code>Unknown</code> out of the experimental
<code>ty_extensions</code> API (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27430">#27430</a>)</li>
<li>Preserve <code>TypeVarTuple</code> context during
<code>Generic</code> recovery (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27381">#27381</a>)</li>
<li>Preserve exact numeric types in covariant collections (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27311">#27311</a>)</li>
<li>Reject <code>ClassVar</code> and <code>Final</code> qualifiers in
<code>NamedTuple</code> fields (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27380">#27380</a>)</li>
<li>Reject out-of-scope <code>ParamSpec</code> components (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27378">#27378</a>)</li>
<li>Reject specializing non-generic subclasses (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27377">#27377</a>)</li>
<li>Respect bounds and constraints in generic materializations (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27228">#27228</a>)</li>
<li>Sync vendored typeshed stubs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/27401">#27401</a>).
<a
href="https://github.com/python/typeshed/compare/b00c387c669cb50d5d388d77b74c2e832e147fe8...1b116673774d062a4af7b0a0b3d05533a6be55d0">Typeshed
diff</a></li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li>
<li><a href="https://github.com/carljm"><code>@​carljm</code></a></li>
<li><a
href="https://github.com/Punisheroot"><code>@​Punisheroot</code></a></li>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/cheparity"><code>@​cheparity</code></a></li>
<li><a
href="https://github.com/BitWeaverDev"><code>@​BitWeaverDev</code></a></li>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a href="https://github.com/ribru17"><code>@​ribru17</code></a></li>
<li><a href="https://github.com/sharkdp"><code>@​sharkdp</code></a></li>
</ul>
<h2>0.0.65</h2>
<p>Released on 2026-07-29.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ty/commit/3e28e58af75c3b16403c05ab401ae7347b65c5e2"><code>3e28e58</code></a>
Bump version to 0.0.66 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4166">#4166</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/87de836dfef2d3e1990440752e30e24cfb572f4e"><code>87de836</code></a>
Bump version to 0.0.65 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4113">#4113</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/d784bad352f4640e7f788eac4dfb0353ca199902"><code>d784bad</code></a>
README: Add link to Stable milestone (<a
href="https://redirect.github.com/astral-sh/ty/issues/4112">#4112</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/b4c1978dbdf18501ed03139e33ee8afaef251ec3"><code>b4c1978</code></a>
Update actions/setup-python action to v7 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4110">#4110</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/8d216a39dad99c4443396a08a77da00502cd7e58"><code>8d216a3</code></a>
Update actions/checkout action to v7.0.1 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4107">#4107</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/06f44e9039cb2764346c4bceaff4021ac143de9e"><code>06f44e9</code></a>
Update dependency prek to v0.4.10 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4108">#4108</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/b3665fde4804424576a30078bc0b7c101c5e2242"><code>b3665fd</code></a>
Update prek dependencies (<a
href="https://redirect.github.com/astral-sh/ty/issues/4109">#4109</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/5e64a131b436a4e1f40e6317c526f4fc73fab38b"><code>5e64a13</code></a>
Bump version to 0.0.64 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4097">#4097</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/46f4915e67aad965b1b4e7478a75378e8e52ff6d"><code>46f4915</code></a>
Bump version to 0.0.63 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4071">#4071</a>)</li>
<li><a
href="https://github.com/astral-sh/ty/commit/df75992e7fd0cc73cb0f66e864df3f6e4fc4e1a6"><code>df75992</code></a>
Bump version to 0.0.62 (<a
href="https://redirect.github.com/astral-sh/ty/issues/4057">#4057</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ty/compare/0.0.55...0.0.66">compare
view</a></li>
</ul>
</details>
<br />

Updates `xxhash` from 3.8.0 to 3.8.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ifduyue/python-xxhash/releases">xxhash's
releases</a>.</em></p>
<blockquote>
<h2>v3.8.1</h2>
<ul>
<li>Register the &quot;benchmark&quot; pytest mark to avoid
PytestUnknownMarkWarning</li>
<li>Update C extension docstrings and remove stale comments</li>
</ul>
<hr />
<p>Full list of changes: <a
href="https://github.com/ifduyue/python-xxhash/compare/v3.8.0...v3.8.1">https://github.com/ifduyue/python-xxhash/compare/v3.8.0...v3.8.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ifduyue/python-xxhash/blob/master/CHANGELOG.rst">xxhash's
changelog</a>.</em></p>
<blockquote>
<p>v3.8.1 2026-07-06</p>
<pre><code>
- Register the &quot;benchmark&quot; pytest mark to avoid
PytestUnknownMarkWarning
- Update C extension docstrings and remove stale comments
</code></pre>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ifduyue/python-xxhash/commit/0a1adf7b6a5f26b821272985a0a987cca5446c23"><code>0a1adf7</code></a>
Release v3.8.1</li>
<li><a
href="https://github.com/ifduyue/python-xxhash/commit/aa419ca1478219b7ba2ad18a8fe05ca9d29288bc"><code>aa419ca</code></a>
Prepare 3.8.1</li>
<li><a
href="https://github.com/ifduyue/python-xxhash/commit/e26b770f19b5eabd1c58d098206e5c9adfcef5d1"><code>e26b770</code></a>
docs: update C extension docstrings and remove stale comments</li>
<li><a
href="https://github.com/ifduyue/python-xxhash/commit/aa69707513c4ba8c52a4bebc23f0aada7844decc"><code>aa69707</code></a>
Register the “benchmark” pytest mark</li>
<li>See full diff in <a
href="https://github.com/ifduyue/python-xxhash/compare/v3.8.0...v3.8.1">compare
view</a></li>
</ul>
</details>
<br />

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-08 12:01:48 -07:00

976 lines
28 KiB
Python

"""Data models for interacting with the LangGraph API."""
from __future__ import annotations
from collections.abc import Mapping, Sequence
from dataclasses import Field
from datetime import datetime
from typing import (
Any,
ClassVar,
Literal,
NamedTuple,
Protocol,
TypeAlias,
Union,
)
from typing_extensions import NotRequired, TypedDict
Json = dict[str, Any] | None
"""Represents a JSON-like structure, which can be None or a dictionary with string keys and any values."""
RunStatus = Literal["pending", "running", "error", "success", "timeout", "interrupted"]
"""
Represents the status of a run:
- "pending": The run is waiting to start.
- "running": The run is currently executing.
- "error": The run encountered an error and stopped.
- "success": The run completed successfully.
- "timeout": The run exceeded its time limit.
- "interrupted": The run was manually stopped or interrupted.
"""
ThreadStatus = Literal["idle", "busy", "interrupted", "error"]
"""
Represents the status of a thread:
- "idle": The thread is not currently processing any task.
- "busy": The thread is actively processing a task.
- "interrupted": The thread's execution was interrupted.
- "error": An exception occurred during task processing.
"""
ThreadStreamMode = Literal["run_modes", "lifecycle", "state_update"]
"""
Defines the mode of streaming:
- "run_modes": Stream the same events as the runs on thread, as well as run_done events.
- "lifecycle": Stream only run start/end events.
- "state_update": Stream state updates on the thread.
"""
StreamMode = Literal[
"values",
"messages",
"updates",
"events",
"tasks",
"checkpoints",
"debug",
"custom",
"messages-tuple",
]
"""
Defines the mode of streaming:
- "values": Stream only the values.
- "messages": Stream complete messages.
- "updates": Stream updates to the state.
- "events": Stream events occurring during execution.
- "checkpoints": Stream checkpoints as they are created.
- "tasks": Stream task start and finish events.
- "debug": Stream detailed debug information.
- "custom": Stream custom events.
"""
DisconnectMode = Literal["cancel", "continue"]
"""
Specifies behavior on disconnection:
- "cancel": Cancel the operation on disconnection.
- "continue": Continue the operation even if disconnected.
"""
MultitaskStrategy = Literal["reject", "interrupt", "rollback", "enqueue"]
"""
Defines how to handle multiple tasks:
- "reject": Reject new tasks when busy.
- "interrupt": Interrupt current task for new ones.
- "rollback": Roll back current task and start new one.
- "enqueue": Queue new tasks for later execution.
"""
OnConflictBehavior = Literal["raise", "do_nothing"]
"""
Specifies behavior on conflict:
- "raise": Raise an exception when a conflict occurs.
- "do_nothing": Ignore conflicts and proceed.
"""
OnCompletionBehavior = Literal["delete", "keep"]
"""
Defines action after completion:
- "delete": Delete resources after completion.
- "keep": Retain resources after completion.
"""
Durability = Literal["sync", "async", "exit"]
"""Durability mode for the graph execution.
- `"sync"`: Changes are persisted synchronously before the next step starts.
- `"async"`: Changes are persisted asynchronously while the next step executes.
- `"exit"`: Changes are persisted only when the graph exits."""
class LangSmithTracing(TypedDict, total=False):
"""Configuration for LangSmith tracing."""
project_name: str
"""The LangSmith project name to trace to."""
example_id: str
"""The LangSmith example/dataset ID to associate with the trace."""
All = Literal["*"]
"""Represents a wildcard or 'all' selector."""
IfNotExists = Literal["create", "reject"]
"""
Specifies behavior if the thread doesn't exist:
- "create": Create a new thread if it doesn't exist.
- "reject": Reject the operation if the thread doesn't exist.
"""
PruneStrategy = Literal["delete", "keep_latest"]
"""
Strategy for pruning threads:
- "delete": Remove threads entirely.
- "keep_latest": Prune old checkpoints but keep threads and their latest state.
"""
CancelAction = Literal["interrupt", "rollback"]
"""
Action to take when cancelling the run.
- "interrupt": Simply cancel the run.
- "rollback": Cancel the run. Then delete the run and associated checkpoints.
"""
BulkCancelRunsStatus = Literal["pending", "running", "all"]
"""
Filter runs by status when bulk-cancelling:
- "pending": Cancel only pending runs.
- "running": Cancel only running runs.
- "all": Cancel all runs regardless of status.
"""
AssistantSortBy = Literal[
"assistant_id", "graph_id", "name", "created_at", "updated_at"
]
"""
The field to sort by.
"""
ThreadSortBy = Literal[
"thread_id", "status", "created_at", "updated_at", "state_updated_at"
]
"""
The field to sort by.
"""
CronSortBy = Literal[
"cron_id",
"assistant_id",
"thread_id",
"created_at",
"updated_at",
"next_run_date",
"end_time",
]
"""
The field to sort by.
"""
SortOrder = Literal["asc", "desc"]
"""
The order to sort by.
"""
class Config(TypedDict, total=False):
"""Configuration options for a call."""
tags: list[str]
"""
Tags for this call and any sub-calls (eg. a Chain calling an LLM).
You can use these to filter calls.
"""
recursion_limit: int
"""
Maximum number of times a call can recurse. If not provided, defaults to 25.
"""
configurable: dict[str, Any]
"""
Runtime values for attributes previously made configurable on this Runnable,
or sub-Runnables, through .configurable_fields() or .configurable_alternatives().
Check .output_schema() for a description of the attributes that have been made
configurable.
"""
class Checkpoint(TypedDict):
"""Represents a checkpoint in the execution process."""
thread_id: str
"""Unique identifier for the thread associated with this checkpoint."""
checkpoint_ns: str
"""Namespace for the checkpoint; used internally to manage subgraph state."""
checkpoint_id: str | None
"""Optional unique identifier for the checkpoint itself."""
checkpoint_map: dict[str, Any] | None
"""Optional dictionary containing checkpoint-specific data."""
class GraphSchema(TypedDict):
"""Defines the structure and properties of a graph."""
graph_id: str
"""The ID of the graph."""
input_schema: dict | None
"""The schema for the graph input.
Missing if unable to generate JSON schema from graph."""
output_schema: dict | None
"""The schema for the graph output.
Missing if unable to generate JSON schema from graph."""
state_schema: dict | None
"""The schema for the graph state.
Missing if unable to generate JSON schema from graph."""
config_schema: dict | None
"""The schema for the graph config.
Missing if unable to generate JSON schema from graph."""
context_schema: dict | None
"""The schema for the graph context.
Missing if unable to generate JSON schema from graph."""
Subgraphs = dict[str, GraphSchema]
class AssistantBase(TypedDict):
"""Base model for an assistant."""
assistant_id: str
"""The ID of the assistant."""
graph_id: str
"""The ID of the graph."""
config: Config
"""The assistant config."""
context: Context
"""The static context of the assistant."""
created_at: datetime
"""The time the assistant was created."""
metadata: Json
"""The assistant metadata."""
version: int
"""The version of the assistant"""
name: str
"""The name of the assistant"""
description: str | None
"""The description of the assistant"""
class AssistantVersion(AssistantBase):
"""Represents a specific version of an assistant."""
pass
class Assistant(AssistantBase):
"""Represents an assistant with additional properties."""
updated_at: datetime
"""The last time the assistant was updated."""
class AssistantsSearchResponse(TypedDict):
"""Paginated response for assistant search results."""
assistants: list[Assistant]
"""The assistants returned for the current search page."""
next: str | None
"""Pagination cursor from the ``X-Pagination-Next`` response header."""
class Interrupt(TypedDict):
"""Represents an interruption in the execution flow."""
value: Any
"""The value associated with the interrupt."""
id: str
"""The ID of the interrupt. Can be used to resume the interrupt."""
class Thread(TypedDict):
"""Represents a conversation thread."""
thread_id: str
"""The ID of the thread."""
created_at: datetime
"""The time the thread was created."""
updated_at: datetime
"""The last time the thread was updated."""
metadata: Json
"""The thread metadata."""
status: ThreadStatus
"""The status of the thread, one of 'idle', 'busy', 'interrupted'."""
values: Json
"""The current state of the thread."""
interrupts: dict[str, list[Interrupt]]
"""Mapping of task ids to interrupts that were raised in that task."""
extracted: NotRequired[dict[str, Any]]
"""Extracted values from thread data. Only present when `extract` is used in search."""
class ThreadTask(TypedDict):
"""Represents a task within a thread."""
id: str
name: str
error: str | None
interrupts: list[Interrupt]
checkpoint: Checkpoint | None
state: ThreadState | None
result: dict[str, Any] | None
class ThreadState(TypedDict):
"""Represents the state of a thread."""
values: list[dict] | dict[str, Any]
"""The state values."""
next: Sequence[str]
"""The next nodes to execute. If empty, the thread is done until new input is
received."""
checkpoint: Checkpoint
"""The ID of the checkpoint."""
metadata: Json
"""Metadata for this state"""
created_at: str | None
"""Timestamp of state creation"""
parent_checkpoint: Checkpoint | None
"""The ID of the parent checkpoint. If missing, this is the root checkpoint."""
tasks: Sequence[ThreadTask]
"""Tasks to execute in this step. If already attempted, may contain an error."""
interrupts: list[Interrupt]
"""Interrupts which were thrown in this thread."""
class ThreadUpdateStateResponse(TypedDict):
"""Represents the response from updating a thread's state."""
checkpoint: Checkpoint
"""Checkpoint of the latest state."""
class Run(TypedDict):
"""Represents a single execution run."""
run_id: str
"""The ID of the run."""
thread_id: str
"""The ID of the thread."""
assistant_id: str
"""The assistant that was used for this run."""
created_at: datetime
"""The time the run was created."""
updated_at: datetime
"""The last time the run was updated."""
status: RunStatus
"""The status of the run. One of 'pending', 'running', "error", 'success', "timeout", "interrupted"."""
metadata: Json
"""The run metadata."""
multitask_strategy: MultitaskStrategy
"""Strategy to handle concurrent runs on the same thread."""
class Cron(TypedDict):
"""Represents a scheduled task."""
cron_id: str
"""The ID of the cron."""
assistant_id: str
"""The ID of the assistant."""
thread_id: str | None
"""The ID of the thread."""
on_run_completed: OnCompletionBehavior | None
"""What to do with the thread after the run completes. Only applicable for stateless crons."""
end_time: datetime | None
"""The end date to stop running the cron."""
schedule: str
"""The schedule to run, cron format."""
timezone: str | None
"""IANA timezone for the cron schedule (e.g. 'America/New_York'). Defaults to null, which is treated as UTC."""
created_at: datetime
"""The time the cron was created."""
updated_at: datetime
"""The last time the cron was updated."""
payload: dict
"""The run payload to use for creating new run."""
user_id: str | None
"""The user ID of the cron."""
next_run_date: datetime | None
"""The next run date of the cron."""
metadata: dict
"""The metadata of the cron."""
enabled: bool
"""Whether the cron is enabled."""
class CronUpdate(TypedDict, total=False):
"""Payload for updating a cron job. All fields are optional."""
schedule: str
"""The cron schedule to execute this job on."""
timezone: str
"""IANA timezone for the cron schedule (e.g. 'America/New_York')."""
end_time: datetime
"""The end date to stop running the cron."""
input: Input
"""The input to the graph."""
metadata: dict[str, Any]
"""Metadata to assign to the cron job runs."""
config: Config
"""The configuration for the assistant."""
context: Context
"""Static context added to the assistant."""
webhook: str
"""Webhook to call after LangGraph API call is done."""
interrupt_before: All | list[str]
"""Nodes to interrupt immediately before they get executed."""
interrupt_after: All | list[str]
"""Nodes to interrupt immediately after they get executed."""
on_run_completed: OnCompletionBehavior
"""What to do with the thread after the run completes."""
enabled: bool
"""Enable or disable the cron job."""
stream_mode: StreamMode | list[StreamMode]
"""The stream mode(s) to use."""
stream_subgraphs: bool
"""Whether to stream output from subgraphs."""
stream_resumable: bool
"""Whether to persist the stream chunks in order to resume the stream later."""
durability: Durability
"""Durability level for the run. Must be one of 'sync', 'async', or 'exit'."""
# Select field aliases for client-side typing of `select` parameters.
# These mirror the server's allowed field sets.
AssistantSelectField = Literal[
"assistant_id",
"graph_id",
"name",
"description",
"config",
"context",
"created_at",
"updated_at",
"metadata",
"version",
]
ThreadSelectField = Literal[
"thread_id",
"created_at",
"updated_at",
"metadata",
"config",
"context",
"status",
"values",
"interrupts",
]
RunSelectField = Literal[
"run_id",
"thread_id",
"assistant_id",
"created_at",
"updated_at",
"status",
"metadata",
"kwargs",
"multitask_strategy",
]
CronSelectField = Literal[
"cron_id",
"assistant_id",
"thread_id",
"end_time",
"schedule",
"timezone",
"created_at",
"updated_at",
"user_id",
"payload",
"next_run_date",
"metadata",
"now",
"on_run_completed",
"enabled",
]
PrimitiveData = str | int | float | bool | None
QueryParamTypes = (
Mapping[str, PrimitiveData | Sequence[PrimitiveData]]
| list[tuple[str, PrimitiveData]]
| tuple[tuple[str, PrimitiveData], ...]
| str
| bytes
)
class RunCreate(TypedDict):
"""Defines the parameters for initiating a background run."""
thread_id: str | None
"""The identifier of the thread to run. If not provided, the run is stateless."""
assistant_id: str
"""The identifier of the assistant to use for this run."""
input: dict | None
"""Initial input data for the run."""
metadata: dict | None
"""Additional metadata to associate with the run."""
config: Config | None
"""Configuration options for the run."""
context: Context | None
"""The static context of the run."""
checkpoint_id: str | None
"""The identifier of a checkpoint to resume from."""
interrupt_before: list[str] | None
"""List of node names to interrupt execution before."""
interrupt_after: list[str] | None
"""List of node names to interrupt execution after."""
webhook: str | None
"""URL to send webhook notifications about the run's progress."""
multitask_strategy: MultitaskStrategy | None
"""Strategy for handling concurrent runs on the same thread."""
class Item(TypedDict):
"""Represents a single document or data entry in the graph's Store.
Items are used to store cross-thread memories.
"""
namespace: list[str]
"""The namespace of the item. A namespace is analogous to a document's directory."""
key: str
"""The unique identifier of the item within its namespace.
In general, keys needn't be globally unique.
"""
value: dict[str, Any]
"""The value stored in the item. This is the document itself."""
created_at: datetime
"""The timestamp when the item was created."""
updated_at: datetime
"""The timestamp when the item was last updated."""
class ListNamespaceResponse(TypedDict):
"""Response structure for listing namespaces."""
namespaces: list[list[str]]
"""A list of namespace paths, where each path is a list of strings."""
class SearchItem(Item, total=False):
"""Item with an optional relevance score from search operations.
Attributes:
score (Optional[float]): Relevance/similarity score. Included when
searching a compatible store with a natural language query.
"""
score: float | None
class SearchItemsResponse(TypedDict):
"""Response structure for searching items."""
items: list[SearchItem]
"""A list of items matching the search criteria."""
class StreamPart(NamedTuple):
"""Represents a part of a stream response."""
event: str
"""The type of event for this stream part."""
data: dict
"""The data payload associated with the event."""
id: str | None = None
"""The ID of the event."""
StreamVersion = Literal["v1", "v2"]
"""Stream format version.
- `"v1"`: Traditional format — raw SSE `StreamPart` NamedTuples.
- `"v2"`: Each event is a typed dict with `type`, `ns`, and `data` keys.
"""
# --- Typed payload dicts (JSON-deserialized from the server) ---
class TaskPayload(TypedDict):
"""Payload for a task start event."""
id: str
"""Unique identifier for this task."""
name: str
"""Name of the node being executed."""
input: Any
"""Input data passed to the task."""
triggers: list[str]
"""List of triggers that caused this task to be executed (e.g. channel writes)."""
class TaskResultPayload(TypedDict):
"""Payload for a task result event."""
id: str
"""Unique identifier for this task."""
name: str
"""Name of the node that was executed."""
error: str | None
"""Error message if the task failed, otherwise `None`."""
interrupts: list[dict[str, Any]]
"""List of interrupts that occurred during task execution."""
result: dict[str, Any]
"""Mapping of channel names to the values written by this task."""
class CheckpointTaskPayload(TypedDict):
"""A task entry within a `CheckpointPayload`.
The keys present depend on the task's state:
- **Error:** `id`, `name`, `error`, `state`
- **Has result:** `id`, `name`, `result`, `interrupts`, `state`
- **Pending:** `id`, `name`, `interrupts`, `state`
"""
id: str
"""Unique identifier for this task."""
name: str
"""Name of the node being executed."""
error: NotRequired[str]
"""Error message, present only if the task failed."""
result: NotRequired[Any]
"""Result of the task, present only if the task completed successfully."""
interrupts: NotRequired[list[dict[str, Any]]]
"""List of interrupts, present when the task has been interrupted or completed."""
state: dict[str, Any] | None
"""Snapshot of the subgraph state. `None` if not a subgraph."""
class CheckpointPayload(TypedDict):
"""Payload for a checkpoint event."""
config: dict[str, Any] | None
"""Configuration for this checkpoint, including the `thread_id` and `checkpoint_id`."""
metadata: dict[str, Any]
"""Metadata associated with this checkpoint (e.g. step number, source, writes)."""
values: dict[str, Any]
"""Current state values at the time of this checkpoint."""
next: list[str]
"""Names of the nodes scheduled to execute next."""
parent_config: dict[str, Any] | None
"""Configuration of the parent checkpoint, or `None` if this is the first checkpoint."""
tasks: list[CheckpointTaskPayload]
"""List of tasks associated with this checkpoint."""
class _DebugCheckpointPayload(TypedDict):
step: int
"""The step number in the graph execution."""
timestamp: str
"""ISO 8601 timestamp of when this event occurred."""
type: Literal["checkpoint"]
"""Event type discriminator, always `"checkpoint"`."""
payload: CheckpointPayload
"""The checkpoint payload."""
class _DebugTaskPayload(TypedDict):
step: int
"""The step number in the graph execution."""
timestamp: str
"""ISO 8601 timestamp of when this event occurred."""
type: Literal["task"]
"""Event type discriminator, always `"task"`."""
payload: TaskPayload
"""The task start payload."""
class _DebugTaskResultPayload(TypedDict):
step: int
"""The step number in the graph execution."""
timestamp: str
"""ISO 8601 timestamp of when this event occurred."""
type: Literal["task_result"]
"""Event type discriminator, always `"task_result"`."""
payload: TaskResultPayload
"""The task result payload."""
DebugPayload = _DebugCheckpointPayload | _DebugTaskPayload | _DebugTaskResultPayload
"""Wrapper payload for debug events. Discriminate on `type`."""
class RunMetadataPayload(TypedDict):
"""Payload for the `metadata` control event."""
run_id: str
"""The unique identifier of the run."""
# --- v2 stream part TypedDicts ---
class ValuesStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="values"`."""
type: Literal["values"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: dict[str, Any]
"""Full state values after the step."""
interrupts: list[dict[str, Any]]
"""List of interrupts that occurred during this step."""
class UpdatesStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="updates"`."""
type: Literal["updates"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: dict[str, Any]
"""Mapping of node names to their outputs."""
class MessagesPartialStreamPart(TypedDict):
"""Stream part emitted for partial message chunks (`messages/partial`)."""
type: Literal["messages/partial"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: list[dict[str, Any]]
"""List of partial message chunk dicts."""
class MessagesCompleteStreamPart(TypedDict):
"""Stream part emitted for complete messages (`messages/complete`)."""
type: Literal["messages/complete"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: list[dict[str, Any]]
"""List of complete message dicts."""
class MessagesMetadataStreamPart(TypedDict):
"""Stream part emitted for message metadata (`messages/metadata`)."""
type: Literal["messages/metadata"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: dict[str, Any]
"""Metadata dict for the message (e.g. `langgraph_step`, `langgraph_node`)."""
class MessagesTupleStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="messages"` (raw message+metadata pair)."""
type: Literal["messages"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: list[dict[str, Any]]
"""Two-element list of `[message_dict, metadata_dict]`."""
class CustomStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="custom"`."""
type: Literal["custom"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: Any
"""User-defined data passed to `StreamWriter` inside a node."""
class CheckpointsStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="checkpoints"`."""
type: Literal["checkpoints"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: CheckpointPayload
"""The checkpoint payload."""
class TasksStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="tasks"`."""
type: Literal["tasks"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: TaskPayload | TaskResultPayload
"""Task start or task result payload."""
class DebugStreamPart(TypedDict):
"""Stream part emitted for `stream_mode="debug"`."""
type: Literal["debug"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path of the emitting node (empty for root graph)."""
data: DebugPayload
"""The debug event payload."""
class MetadataStreamPart(TypedDict):
"""Control event with `run_id` and other run metadata."""
type: Literal["metadata"]
"""Stream part type discriminator."""
ns: list[str]
"""Namespace path (empty for root graph)."""
data: RunMetadataPayload
"""The run metadata payload."""
StreamPartV2 = (
ValuesStreamPart
| UpdatesStreamPart
| MessagesPartialStreamPart
| MessagesCompleteStreamPart
| MessagesMetadataStreamPart
| MessagesTupleStreamPart
| CustomStreamPart
| CheckpointsStreamPart
| TasksStreamPart
| DebugStreamPart
| MetadataStreamPart
)
"""Discriminated union of all v2 stream part types.
Use `part["type"]` to narrow the type.
"""
class Send(TypedDict):
"""Represents a message to be sent to a specific node in the graph.
This type is used to explicitly send messages to nodes in the graph, typically
used within Command objects to control graph execution flow.
"""
node: str
"""The name of the target node to send the message to."""
input: dict[str, Any] | None
"""Optional dictionary containing the input data to be passed to the node.
If None, the node will be called with no input."""
class Command(TypedDict, total=False):
"""Represents one or more commands to control graph execution flow and state.
This type defines the control commands that can be returned by nodes to influence
graph execution. It lets you navigate to other nodes, update graph state,
and resume from interruptions.
"""
goto: Send | str | Sequence[Send | str]
"""Specifies where execution should continue. Can be:
- A string node name to navigate to
- A Send object to execute a node with specific input
- A sequence of node names or Send objects to execute in order
"""
update: dict[str, Any] | Sequence[tuple[str, Any]]
"""Updates to apply to the graph's state. Can be:
- A dictionary of state updates to merge
- A sequence of (key, value) tuples for ordered updates
"""
resume: Any
"""Value to resume execution with after an interruption.
Used in conjunction with interrupt() to implement control flow.
"""
class RunCreateMetadata(TypedDict):
"""Metadata for a run creation request."""
run_id: str
"""The ID of the run."""
thread_id: str | None
"""The ID of the thread."""
class _TypedDictLikeV1(Protocol):
"""Protocol to represent types that behave like TypedDicts
Version 1: using `ClassVar` for keys."""
__required_keys__: ClassVar[frozenset[str]]
__optional_keys__: ClassVar[frozenset[str]]
class _TypedDictLikeV2(Protocol):
"""Protocol to represent types that behave like TypedDicts
Version 2: not using `ClassVar` for keys."""
__required_keys__: frozenset[str]
__optional_keys__: frozenset[str]
class _DataclassLike(Protocol):
"""Protocol to represent types that behave like dataclasses.
Inspired by the private _DataclassT from dataclasses that uses a similar protocol as a bound.
"""
__dataclass_fields__: ClassVar[dict[str, Field[Any]]]
class _BaseModelLike(Protocol):
"""Protocol to represent types that behave like Pydantic `BaseModel`."""
model_config: ClassVar[dict[str, Any]]
__pydantic_core_schema__: ClassVar[Any]
def model_dump(
self,
**kwargs: Any,
) -> dict[str, Any]: ...
_JSONLike: TypeAlias = str | int | float | bool | None
_JSONMap: TypeAlias = Mapping[
str, Union[_JSONLike, list[_JSONLike], "_JSONMap", list["_JSONMap"]]
]
Input: TypeAlias = (
_TypedDictLikeV1 | _TypedDictLikeV2 | _DataclassLike | _BaseModelLike | _JSONMap
)
Context: TypeAlias = Input