mirror of
https://github.com/langchain-ai/deepagentsjs.git
synced 2026-07-18 16:04:44 -04:00
cc26c41df2
## Summary Adds middleware override behavior to replace default middleware by `.name` instead of always being appended. ## Changes - Add name-keyed middleware merging so custom middleware replaces matching default middleware in-place and appends novel middleware after the core stack. - Apply default-slot middleware overrides consistently when constructing main-agent and subagent middleware stacks, while preventing parent-only middleware from propagating unless it matches a subagent default slot. - Move harness tool exclusion into a private `_ToolExclusionMiddleware` helper so excluded tools are stripped after tool-injecting middleware has run. - Add coverage for main-agent replacement, subagent/default override propagation, parent-only middleware isolation, profile exclusions, tool-exclusion ordering, and merge precedence.