deerflow2/backend/packages/harness/deerflow/agents
knukn 481494b9c0
feat(client): support custom middleware injection (#1520)
* feat(client): support custom middleware injection

Add support for custom middleware, allowing custom middleware list to be passed when initializing DeerFlowClient. These middleware will be injected after the default middleware when creating the agent, extending the agent's functionality.

* feat: inject custom middlewares before ClarificationMiddleware to preserve ordering

- Add `custom_middlewares` param to `_build_middlewares`
- Inject custom middlewares right before `ClarificationMiddleware` to keep it as the last in the chain
- Remove unsafe `.extend()` in `client.py`
- Update tests in `test_client.py` and `test_lead_agent_model_resolution.py` to assert correct injection ordering
2026-03-29 11:24:46 +08:00
..
checkpointer fix: normalize structured LLM content in serialization and memory updater (#1215) 2026-03-22 17:29:29 +08:00
lead_agent feat(client): support custom middleware injection (#1520) 2026-03-29 11:24:46 +08:00
memory fix: replace print() with logging across harness package (#1282) 2026-03-27 23:15:35 +08:00
middlewares fix(middleware): fall back to configurable thread_id in MemoryMiddleware (#1425) (#1426) 2026-03-28 17:00:11 +08:00
__init__.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
thread_state.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00