deerflow2/backend/packages/harness/deerflow
greatmengqi 8ba01dfd83
refactor: thread app_config through lead and subagent task path (#2666)
* refactor: thread app config through lead prompt

* fix: honor explicit app config across runtime paths

* style: format subagent executor tests

* fix: thread resolved app config and guard subagents-only fallback

Address two PR review findings:

1. _create_summarization_middleware passed the original (possibly None)
   app_config into create_chat_model, forcing the model factory back to
   ambient get_app_config() and risking config drift between the
   middleware's resolved view and the model's view. Pass the resolved
   AppConfig instance through end-to-end.

2. get_available_subagent_names accepted Any-typed config and forwarded
   it to is_host_bash_allowed, which reads ``.sandbox``. A
   SubagentsAppConfig (also accepted upstream as a sum-type input) has
   no ``.sandbox`` attribute and would be silently treated as "no
   sandbox configured", incorrectly disabling the bash subagent. Guard
   on hasattr and fall back to ambient lookup otherwise.

Adds regression tests for both paths.

* chore: simplify hasattr guard and tighten regression tests

- Collapse if/else into ternary in get_available_subagent_names; hasattr(None, ...) is False so the explicit None check was redundant.
- Drop comments that narrate the change rather than explain non-obvious WHY (test names already convey intent).
- Replace stringly-typed sentinel "no-arg" in regression test with direct args tuple comparison.

---------

Co-authored-by: greatmengqi <chenmengqi.0376@bytedance.com>
2026-05-02 06:37:49 +08:00
..
agents refactor: thread app_config through lead and subagent task path (#2666) 2026-05-02 06:37:49 +08:00
community fix(sandbox): pass no_change_timeout to exec_command to prevent 120s premature termination (#2685) 2026-05-01 22:27:02 +08:00
config refactor: thread app_config through lead and subagent task path (#2666) 2026-05-02 06:37:49 +08:00
guardrails feat(guardrails): add pre-tool-call authorization middleware with pluggable providers (#1240) 2026-03-23 18:07:33 +08:00
mcp feat(mcp): support custom tool interceptors via extensions_config.json (#2451) 2026-04-25 09:18:13 +08:00
models Merge branch 'main' into release/2.0-rc 2026-04-28 15:44:02 +08:00
persistence fix the lint error of backend 2026-04-26 22:16:04 +08:00
reflection refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
runtime refactor: thread app_config through lead and subagent task path (#2666) 2026-05-02 06:37:49 +08:00
sandbox Merge branch 'main' into release/2.0-rc 2026-04-28 15:44:02 +08:00
skills fix(harness): resolve runtime paths from project root (#2642) 2026-05-01 22:19:50 +08:00
subagents refactor: thread app_config through lead and subagent task path (#2666) 2026-05-02 06:37:49 +08:00
tools refactor: thread app_config through lead and subagent task path (#2666) 2026-05-02 06:37:49 +08:00
tracing feat(tracing): add optional Langfuse support (#1717) 2026-04-02 13:06:10 +08:00
uploads feat(persistence): per-user filesystem isolation, run-scoped APIs, and state/history simplification (#2153) 2026-04-26 11:13:01 +08:00
utils [security] fix(uploads): require explicit opt-in for host-side document conversion (#2332) 2026-04-18 22:47:42 +08:00
__init__.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
client.py refactor(skills): Unified skill storage capability (#2613) 2026-05-01 13:23:26 +08:00