Commit Graph

82 Commits

Author SHA1 Message Date
Christian Bromann 085a07f569 feat(core): event based streaming (#2314)
All stream v2 changes consolidated.

---------

Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-05-05 00:13:12 -07:00
John Kennedy 7f3320cda8 fix: patch 6 medium-severity security alerts (#2333)
## Security Alert Patch (medium-tier follow-up)

Follow-up to #2329, which patched the critical+high tier. This PR
resolves the remaining **6 medium-severity Dependabot alerts** via
`pnpm.overrides` plus one published-path constraint bump. All fixes are
patch/minor bumps within the current major — no breaking changes.

### Packages Updated

| Package | Old Constraint | New Constraint | Strategy | Scope | CVEs
Resolved |

|---------|---------------|----------------|----------|-------|---------------|
| `axios` | `>=1.13.5` (override) | `>=1.15.0` (override); resolved
1.13.6 → **1.15.1** | C (override) | dev-only (via `@langchain/scripts`
devDep) | CVE-2025-62718 (SSRF via NO_PROXY bypass), CVE-2026-40175
(cloud metadata exfiltration) |
| `dompurify` | (transitive, resolved 3.3.3) | `>=3.4.0` (new override);
resolved **3.4.0** | C (override) | dev-only (private
`@example/ai-elements` via mermaid) | GHSA-39q2-94rc-95cp (ADD_TAGS
bypasses FORBID_TAGS) |
| `follow-redirects` | (transitive, resolved 1.15.11) | `>=1.16.0` (new
override); resolved **1.16.0** | C (override) | dev-only (via
`@langchain/scripts` devDep) | GHSA-r4q5-vmmm-2653 (auth header leak on
cross-domain redirect) |
| `langsmith` (published path) | `langsmith: >=0.3.33 <1.0.0` in
`libs/langgraph-api/package.json` | `>=0.5.19 <1.0.0` | **A (manifest
bump)** | **published** — direct dep of `@langchain/langgraph-api` |
CVE-2026-40190 (prototype pollution), GHSA-rr7j-v2q5-chgv (streaming
redaction bypass) |
| `langsmith` (dev chains) | (transitive 0.4.12, 0.5.16 resolved via
`@langchain/classic`, `langchain@1.3.0`) | `langsmith@<0.5.19: >=0.5.19
<1` (new override) | C (override) | dev-only | same as above (flushes
vulnerable transitive copies) |

*Strategy C overrides follow the existing repo pattern — axios, qs,
undici, minimatch, brace-expansion, protobufjs, basic-ftp, vite, and
defu are already overridden the same way.*

### Published-path rationale

`@langchain/langgraph-api` exercises `langsmith` at runtime for tracing
and streaming, which touches the affected internal code paths (lodash
`set()` prototype-pollution guard, token-event redaction). Therefore the
fix is Strategy A (raise the published lower bound) rather than
A-lockfile — this protects end users who pin `@langchain/langgraph-api`.
The lockfile already resolved `langsmith@0.5.20` before this change, so
installs are unchanged at HEAD; the bump is a downstream-safety
constraint tightening.

### Deferred (not fixed in this PR)

- **`protobufjs@6.11.5`** (CRITICAL, CVE-2026-41242) — reached via
`@xenova/transformers@2.17.2` in `libs/langgraph-core` devDeps +
examples. `@xenova/transformers` is abandoned; the successor is
`@huggingface/transformers@3`. Forcing a 6.x → 7.x override would cross
a breaking API boundary. **Upstream issue — requires a manual migration,
tracked separately.** (See #2329 body for full context.)
- **`elliptic@6.6.1`** (LOW, GHSA-848j-6mx2-7j84) —
`first_patched_version` is `null`; upstream has not released a fix.
Defer until a patched version ships.

### CVE Details

- **CVE-2025-62718** / GHSA-3p68-rc4w-qgx5 — Axios NO_PROXY Hostname
Normalization Bypass Leads to SSRF —
https://github.com/advisories/GHSA-3p68-rc4w-qgx5
- **CVE-2026-40175** / GHSA-fvcv-3m26-pcqx — Axios Unrestricted Cloud
Metadata Exfiltration via Header Injection Chain —
https://github.com/advisories/GHSA-fvcv-3m26-pcqx
- **GHSA-39q2-94rc-95cp** — DOMPurify `ADD_TAGS` bypasses `FORBID_TAGS`
via short-circuit evaluation —
https://github.com/advisories/GHSA-39q2-94rc-95cp
- **GHSA-r4q5-vmmm-2653** — follow-redirects leaks custom authentication
headers to cross-domain redirect targets —
https://github.com/advisories/GHSA-r4q5-vmmm-2653
- **CVE-2026-40190** / GHSA-fw9q-39r9-c252 — LangSmith prototype
pollution via incomplete `__proto__` guard in internal lodash `set()` —
https://github.com/advisories/GHSA-fw9q-39r9-c252
- **GHSA-rr7j-v2q5-chgv** — LangSmith streaming token events bypass
output redaction — https://github.com/advisories/GHSA-rr7j-v2q5-chgv

### Linear Tickets

Linear ticket lookup returned no matches for the resolved CVEs/GHSAs. No
ticket IDs included in the title.

### Verification

- [x] Lockfile regenerated via `pnpm install --lockfile-only`
- [x] `pnpm lint` (oxlint) — 0 warnings, 0 errors
- [x] `pnpm format:check` (oxfmt) — clean
- [x] `pnpm audit --prod` — **No known vulnerabilities found**
- [x] `pnpm typecheck` on `libs/langgraph-api` — clean
- [x] No staged secrets (`gitleaks git --staged`)

🤖 Submitted by langster-patch

Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
2026-04-22 09:26:44 -07:00
John Kennedy 076f7f81f0 fix: patch 7 security alerts (critical + high severity) (#2329)
## Security Alert Patch

Resolves **7 Dependabot security alerts** in the critical + high
severity tier via `pnpm.overrides` in the root `package.json`. All fixes
are patch/minor bumps within the current major — no breaking changes.

### Packages Updated

| Package | Old Constraint | New Constraint | Strategy | Scope | CVEs
Resolved |

|---------|---------------|----------------|----------|-------|---------------|
| `protobufjs` | (transitive, resolved 7.5.4) | `>=7.5.5 <8` | C
(override) | dev-only (testcontainers chain + `@xenova/transformers`
devDeps) | CVE-2026-41242 |
| `basic-ftp` | (transitive, resolved 5.2.0) | `>=5.3.0 <6` | C
(override) | effectively dev-only (reached only via `@vitest/browser` —
an optional peerDep of vitest — through webdriverio→proxy-agent) |
GHSA-rp42-5vxx-qpwr, GHSA-6v7q-wjvx-w8wg, CVE-2026-39983 |
| `vite` (7.x only) | (transitive via vitest peer, resolved 7.3.1) |
`>=7.3.2` | C (override, scoped to vite@7) | effectively dev-only (vite
is a peerDependency of vitest — end users supply their own vite) |
CVE-2026-39363, CVE-2026-39364 |
| `defu` | (transitive, resolved 6.1.4) | `>=6.1.5 <7` | C (override) |
dev-only (`internal/build` via tsdown) | CVE-2026-35209 |

*Strategy C (pnpm.overrides) follows the existing pattern in this repo —
axios, qs, undici, minimatch, brace-expansion, etc. are already
overridden the same way.*

### Side-effect Fixes

Bumping `vite@7` to 7.3.2 also resolves one **medium** alert that wasn't
in the primary batch:

- CVE-2026-39365 / GHSA-4w7w-66w2-5vf9 — vite Path Traversal in
Optimized Deps `.map` Handling

### Upstream / Design Issues (NOT fixed in this PR)

- **`protobufjs@6.11.x`** persists in the dependency graph via
`@xenova/transformers@2.17.2` (`libs/langgraph-core` devDep + 9 example
apps). `@xenova/transformers` is abandoned and rebranded as
`@huggingface/transformers@3`; a migration would be a separate manual
dev-only upgrade. The 6.x line is in devDependencies only and does not
ship to published package consumers. Dependabot may continue to flag the
6.x range because the advisory's `vulnerable_range` is `< 7.5.5`.

- **Published-path caveat for `basic-ftp` and `vite`:** Both transit
through `@langchain/langgraph-checkpoint-validation`'s
`dependencies.vitest`. However, `vite` is declared as a
**peerDependency** of vitest (end users supply their own), and
`basic-ftp` reaches end users only through `@vitest/browser` — an
**optional peerDependency** that users must explicitly opt into.
Overrides in this PR protect local dev and CI; end users of
`@langchain/langgraph-checkpoint-validation` are not exposed unless they
independently install and configure the browser-testing chain.

### Deferred (medium + low tier)

Per security-alert-patch policy, only the highest active severity tier
was patched in this PR. The following remain open and would be addressed
in a follow-up batch:

- 6 medium: axios ×2 (SSRF + cloud-metadata exfil — existing `axios:
>=1.13.5` override doesn't cover 1.15.0), dompurify, langsmith ×2,
follow-redirects
- 1 low: elliptic (no `first_patched_version` published — upstream has
not released a fix)

### Verification

- [x] Lockfile regenerated via `pnpm install --lockfile-only`
- [x] `pnpm lint` (oxlint) — 0 warnings, 0 errors
- [x] `pnpm format:check` (oxfmt) — clean
- [x] `pnpm audit --prod` — 0 critical, 0 high remaining (3 moderates =
the deferred medium alerts)
- [x] No staged secrets (gitleaks)

### Linear Tickets

Linear ticket lookup skipped — CLI not authenticated in this
environment. No ticket IDs included in title.

🤖 Submitted by langster-patch

Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
2026-04-20 21:47:08 -07:00
Hunter Lovell 9102d526c8 fix(langgraph): propagate tracer metadata defaults from configurable (#2315)
## Summary

This updates Pregel callback manager initialization to pass
`tracerInheritableMetadata` defaults derived from `config.configurable`,
and narrows `ensureLangGraphConfig` metadata mirroring to the
allowlisted LangGraph identifiers used in stream/runtime metadata.

## Changes

### `@langchain/langgraph` (`libs/langgraph-core`)

- Updated Pregel callback manager setup to configure core callbacks with
`tracerInheritableMetadata` based on configurable primitive values,
excluding internal and secret-like keys.
- Hoisted tracing default logic into `_getTracingMetadataDefaults` and
`_excludeAsMetadata` for parity with the Python implementation shape.
- Restricted `ensureLangGraphConfig` configurable-to-metadata
propagation to the identifier allowlist:
  - `thread_id`
  - `checkpoint_id`
  - `checkpoint_ns`
  - `task_id`
  - `run_id`
  - `assistant_id`
  - `graph_id`
- Updated config tests to assert the narrowed metadata propagation
behavior.
2026-04-15 18:48:41 -07:00
Christian Bromann 2b62610710 feat(sdk): support for headless tools (#2281) 2026-04-03 22:07:54 -07:00
John Kennedy 90631859ba fix: patch 7 security alerts (high+medium severity) (#2282)
Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
2026-04-04 03:43:41 +00:00
dependabot[bot] 2bb2ed4565 chore(deps): bump the vue group across 1 directory with 4 updates (#2273)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2026-04-02 00:37:15 -07:00
John Kennedy 4d2963c313 fix: patch 11 security alerts (critical+high severity) (#2258)
Co-authored-by: John Kennedy <jkennedyvz@users.noreply.github.com>
2026-03-31 13:09:10 -07:00
Christian Bromann d88f29ba25 chore(repo): migrate linting and formatting from ESLint/Prettier to oxlint/oxfmt (#2256)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Christian Bromann <christian-bromann@users.noreply.github.com>
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
2026-03-30 18:08:00 -07:00
dependabot[bot] 5eb2a04b72 chore(deps): bump the minor-and-patch group across 1 directory with 4 updates (#2160)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-10 14:01:30 -07:00
Christian Bromann e051ef6aa8 feat(sdk): add vue, svelte, angular implementation of useStream hook (#2001)
Co-authored-by: Tat Dat Duong <david@duong.cz>
2026-03-10 10:48:46 -07:00
John Kennedy bbbfaf64ce fix: bump minimatch and rollup to resolve Dependabot CVEs (#2007)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:56:21 +00:00
John Kennedy d1af84d42c fix: bump minimatch to resolve CVE-2026-27904 (#2011)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 14:25:01 -08:00
Colin Francis aa8e878e5b feat: add tools stream mode for tool lifecycle events (#1984) 2026-02-24 16:52:54 -08:00
John Kennedy dd25073bff fix: bump qs to >=6.14.2 to resolve CVE-2026-2391 (#1985)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 20:39:16 +00:00
John Kennedy 3e570a6c9f fix: bump axios to >=1.13.5 to resolve CVE-2026-25639 (#1981)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:36:55 +00:00
Hunter Lovell 7ddf85468f feat(langgraph): introduce StateSchema, ReducedValue, and UntrackedValue (#1842)
Co-authored-by: Tat Dat Duong <david@duong.cz>
2026-01-15 15:28:59 +00:00
David Duong 6d5cdcbb10 fix(chore): replace turbo:command with plain turbo (#1869) 2026-01-09 19:16:10 +00:00
David Duong e7aeffeb72 chore: replace yarn with pnpm (#1862)
Co-authored-by: Christian Bromann <git@bromann.dev>
2026-01-09 19:52:29 +01:00
Christian Bromann a84c1ff182 fix(ci): another attempt fixing pipeline (#1853) 2026-01-08 18:28:19 -08:00
Christian Bromann e9f7e8e9e6 fix(ci): fix release pipeline take 2 (#1850) 2026-01-08 17:25:51 -08:00
Christian Bromann 3ec85a43df fix(ci): fix broken release pipeline (#1848) 2026-01-08 16:40:14 -08:00
David Duong 0452de20a2 fix(ci): do not release under next tag anymore (#1765) 2025-10-28 03:22:00 +01:00
Hunter Lovell 4b7933cd0a feat: langgraph canonical package (#1742) 2025-10-20 17:02:16 -07:00
Hunter Lovell 1e1ecbbcf8 feat: merge v1 (#1733)
Co-authored-by: Tat Dat Duong <david@duong.cz>
Co-authored-by: Christian Bromann <git@bromann.dev>
Co-authored-by: Nuno Campos <nuno@langchain.dev>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-17 16:34:43 -07:00
David Duong 03ae1089ea chore: remove release-it, fix dependabot for tmp (#1638) 2025-09-10 19:08:13 +00:00
David Duong 7c81629c8e chore: switch to yarn publish (#1362) 2025-07-07 14:56:15 +00:00
David Duong 9546477a55 chore: add changesets CLI (#1347) 2025-07-07 11:40:56 +00:00
David Duong ddd5722e6f chore(deps): bump turbo@2.5.4 (#1311) 2025-06-25 12:55:13 +02:00
David Duong dcf9627d7e chore(deps): migrate to Yarn v4 (#1310)
Co-authored-by: Logan Rosen <loganrosen@gmail.com>
2025-06-25 12:44:25 +02:00
Tat Dat Duong 4bf750557f deps(langgraph): upgrade to TypeScript 5.8.x
Turns out that `moduleResolution: node10` will achieve the same result as setting `src/package.json` to `{}` (verified via git worktrees).

Also switching `moduleResolution: bundler` for ESM build, after which I've compared the build output of `libs/checkpoint` via `diff -r -q`.
2025-05-24 16:24:42 +02:00
Tat Dat Duong 90295e6118 security: remove esm-hook 2025-05-08 19:06:19 +02:00
Tat Dat Duong fa01615cc4 security: ensure we're using the same tsx version 2025-05-08 18:48:57 +02:00
Tat Dat Duong b640f50596 security: dedupe @octokit
Solved by deduping @langchain/scripts and bumping release-it to ^19
2025-05-08 18:38:30 +02:00
Ben Burns a9f3236907 fix(langgraph,docs): revert previous changes that broke builds (#891) 2025-02-24 17:43:11 +13:00
Ben Burns ed6f79e97d chore(docs): improve API reference docs for Pregel and associated types (#874) 2025-02-21 05:38:30 +00:00
Lucas Hänke de Cansino ff0a79123e feat(checkpoint-postgres): Postgres checkpointer (#471)
Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
2024-10-08 09:34:50 -07:00
Jacob Lee 547b4a88e8 langgraph[minor]: 0.2, make @langchain/core a peer dependency to avoid conflicts (#431)
Co-authored-by: Isaac Francisco <78627776+isahers1@users.noreply.github.com>
2024-09-02 18:29:14 -07:00
Jacob Lee dc33895b84 Split checkpointers into libraries (#341)
* Split checkpointers into libraries

* Update readme

* Fix CI

* Update release scripts

* Update README

* Update rc

* Preserve peer deps for now
2024-08-22 09:43:15 -07:00
Brace Sproul b4ccbe2919 docs[minor]: Update init syntax docs (#328)
* docs[minor]: Update init syntax docs

* start porting chat agent executor w func calling doc

* finished porting

* validated

* agent executor refactor

* nits

* update branching how to

* updated breakpoints doc

* updated configuration doc

* updated dynamically returning directly ntbk

* updated edit graph state doc

* update force calling a tool doc

* updated human in the loop doc

* Updated manage conversation history doc

* Updated managing agent steps doc

* update postgres notebook

* update persistence notebook

* updated stream tokens doc

* updated stream updates doc

* updated stream values doc

* updated streaming tokens without langchain doc

* updated subgraph docs

* updated time travel guide

* updated dealing with tool calling errors doc

* updated use in web env guide

* fix wait user input guide
2024-08-19 18:11:22 -07:00
Brace Sproul fd6233e010 ci[minor]: Add script & GH action to validate deno and node deps in sync (#327)
* ci[minor]: Add script & GH action to validate deno and node deps in sync

* cr

* cr
2024-08-16 15:20:37 -07:00
Brace Sproul 3ba0a662cc ci[minor]: Add validate notebooks GH action (#321)
* ci[minor]: Add validate notebooks GH action

* update cmd to look inside examples too

* cr

* add examples package.json

* cr
2024-08-16 09:20:39 -07:00
Nuno Campos e0801a0f01 Use config.signal to control cancellation (#294)
* Use config.signal to control cancellation

* Lint
2024-08-05 11:09:34 -07:00
Nuno Campos c323f35935 Update dev dependencies with security vulnerabilities (#295) 2024-08-05 10:51:01 -07:00
Nuno Campos 2f390c0a67 Define StateGraph State in a single delcaration, from which both reducers and state and update interfaces are inferred (#289)
* Define StateGraph State in a single delcaration, from which both reducers and state and update interfaces are inferred

This more closely matches python, where a single declaration gives you all three

* Use type guard instead of instanceof

* Fix build by bumping core dep

---------

Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
2024-08-02 17:46:45 -07:00
Brace Sproul d5c8a517c3 infra[patch]: Use latest turbo repo and build setup (#271)
* infra[patch]: Use latest turbo repo and build setup

* bruh

* fix script

* try this

* cr

* cr

* cr

* cr

* cr

* cr

* cr

* new unit test

* cr

* drop ubuntu test env

* try sum new for cache

* bruh

* fast fail false

* cr

* cr

* cr

* bump turbo version

* tmp try canary

* cr

* cr

* cr

* cr

* cr

* upgrade langchain/scripts

* cr

* cr

* cr

* cr
2024-07-24 12:41:11 -07:00
Jacob Lee a46d8da50b Update conditional edge tracing for new core version (#275) 2024-07-21 23:01:40 -07:00
Jacob Lee 80645ae120 Adds automatic error handling for ToolNode, RemoveMessage support (#266)
* Adds automatic error handling for ToolNode

* Adds support for RemoveMessage, add tool calling error guide

* Fix typos
2024-07-18 01:17:09 -07:00
Brace Sproul dda5b91c81 infra[patch]: Set yarn version to 3.5.1 (#261)
* infra[patch]: Set yarn version to 3.5.1

* run yarn install
2024-07-16 13:15:03 -07:00
Brace Sproul df98e0a2d2 Handle ToolMessage outputs from tool funcs (#244)
* [minor]: Handle ToolMessage outputs from tool funcs

* format and lint

* Update types

* Update tool_executor.ts

* Pass raw tool call in

* Bump version

* Adds test

* Fix build

---------

Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
2024-07-15 22:09:22 -07:00