mirror of
https://github.com/langchain-ai/deepagentsjs.git
synced 2026-07-21 03:45:22 -04:00
04cc3fc260
## Summary Fixes #206. This updates deepagents subagent delegation so tool executions can reliably identify the active subagent via `config.metadata.lc_agent_name` instead of inheriting the parent agent name. It also adds focused regression tests that validate both compiled subagents and standard subagent specs follow the same metadata behavior. ## Changes ### `libs/deepagents` subagent metadata propagation - Updated `createTaskTool` subagent invocation config to explicitly set: - `metadata.lc_agent_name = subagent_type` - existing `configurable.ls_agent_type = "subagent"` behavior remains unchanged - Added new regression coverage in `subagent.test.ts`: - compiled subagent (`runnable`) path - standard subagent spec (`systemPrompt/tools/model`) path - Tests assert tool-time metadata receives the delegated subagent name (`worker`), preventing parent-name leakage. ### `libs/deepagents` dependency range update - Bumped `langsmith` peer dependency range in `libs/deepagents/package.json` from `>=0.6.0 <1.0.0` to `^0.7.1`. - Updated `pnpm-lock.yaml` accordingly.