Files
langgraphjs/package.json
T
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

91 lines
2.6 KiB
JSON

{
"private": true,
"packageManager": "pnpm@10.27.0",
"engines": {
"node": ">=18"
},
"repository": {
"type": "git",
"url": "git@github.com:langchain-ai/langgraphjs.git"
},
"scripts": {
"build": "turbo run build:internal",
"changeset": "npx @changesets/cli@^2.29.5",
"lint": "oxlint",
"lint:fix": "oxlint --fix",
"clean": "turbo run clean",
"test": "turbo run test",
"test:int": "pnpm test:int:deps && turbo run test:int ; pnpm test:int:deps:down",
"test:int:deps": "docker compose -f int-test-deps-docker-compose.yml up -d",
"test:int:deps:down": "docker compose -f int-test-deps-docker-compose.yml down",
"test:exports:docker": "docker compose -f internal/environment_tests/docker-compose.yml up --force-recreate",
"format": "oxfmt",
"format:check": "oxfmt --check",
"release": "pnpm changeset publish"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs}": "pnpm run lint",
"*": "pnpm run format --no-error-on-unmatched-pattern"
},
"devDependencies": {
"@changesets/changelog-github": "^0.6.0",
"@swc/core": "^1.3.90",
"@tsconfig/recommended": "^1.0.3",
"@types/d3": "^7",
"@types/semver": "^7",
"cheerio": "^1.0.0-rc.12",
"cheminfo-types": "^1.4.0",
"d3": "^7.9.0",
"eslint-plugin-no-instanceof": "^1.0.1",
"lint-staged": "^16.4.0",
"oxfmt": "^0.42.0",
"oxlint": "^1.55.0",
"readline": "^1.3.0",
"semver": "^7.6.3",
"tslab": "^1.0.21",
"tsx": "^4.19.3",
"turbo": "^2.5.4",
"typescript": "^4.9.5 || ^5.4.5"
},
"pnpm": {
"overrides": {
"@langchain/core": ">=1.1.40",
"langchain": ">=1.3.0",
"@langchain/langgraph-sdk": "workspace:*",
"@langchain/langgraph-checkpoint": "workspace:*",
"cheerio": "^1.0.0-rc.12",
"semver": "^7.0.0",
"zod": "^4.3.5",
"axios": ">=1.13.5",
"qs": ">=6.14.2",
"minimatch@<4": ">=3.1.4 <4",
"minimatch@>=5 <6": ">=5.1.8 <6",
"minimatch@>=9": ">=9.0.7",
"rollup@2": ">=4.59.0",
"handlebars": ">=4.7.9",
"path-to-regexp@>=8": ">=8.4.0",
"picomatch@<3": ">=2.3.2 <3",
"picomatch@>=4": ">=4.0.4",
"undici@<7": ">=6.24.0 <7",
"undici@>=7": ">=7.24.0",
"fast-xml-parser": ">=5.5.6",
"lodash": ">=4.18.0",
"lodash-es": ">=4.18.0",
"brace-expansion@>=2 <3": ">=2.0.3 <3",
"brace-expansion@>=4": ">=5.0.5",
"yaml@>=2 <2.8.3": ">=2.8.3"
},
"onlyBuiltDependencies": [
"@swc/core",
"better-sqlite3",
"cpu-features",
"esbuild",
"msw",
"protobufjs",
"sharp",
"ssh2",
"zeromq"
]
}
}