sync update from LAN repo (source dhk-1 @ 3e87be55)
This commit is contained in:
1 parent
ab6068a7c1
commit
42f2a26fa8
1482 files changed
+227759
-9584
No files matched your search
+23
-3
@@ -55,6 +55,7 @@ __all__ = [
|
||||
"normalize_retrieval_directions",
|
||||
"normalize_retrieval_skills",
|
||||
"queries_from_retrieval_directions",
|
||||
"resolve_collector_skill_visibility",
|
||||
"runtime_extra_skills",
|
||||
]
|
||||
|
||||
@@ -120,10 +121,12 @@ def merge_collector_skill_allowlist(
|
||||
base: list[str] | None,
|
||||
extra: Any,
|
||||
) -> list[str] | None:
|
||||
"""Widen the collector agent's skill allowlist for one run.
|
||||
"""Apply one run's 检索来源 extras to the collector agent's skill visibility.
|
||||
|
||||
Other agents are unchanged. Empty extras are a no-op. ``None`` base means
|
||||
"all skills" (default lead agent) and is left alone.
|
||||
The collector's base is ``None`` ("all skills", like the default lead
|
||||
agent — its config.yaml whitelist is ignored). Empty extras keep ``None``;
|
||||
non-empty extras narrow the run to exactly those skills, because 检索来源
|
||||
is the user's explicit per-research choice. Other agents are unchanged.
|
||||
"""
|
||||
extras = normalize_retrieval_skills(extra)
|
||||
if not extras or agent_id != COLLECTOR_AGENT_ID:
|
||||
@@ -136,3 +139,20 @@ def merge_collector_skill_allowlist(
|
||||
seen.add(name)
|
||||
out.append(name)
|
||||
return out
|
||||
|
||||
|
||||
def resolve_collector_skill_visibility(
|
||||
agent_id: str | None,
|
||||
base: list[str] | None,
|
||||
extra: Any = None,
|
||||
) -> list[str] | None:
|
||||
"""Resolve the collector's runtime skill visibility.
|
||||
|
||||
The deep-research collector does NOT use its config.yaml ``skills``
|
||||
whitelist: without run extras it sees **every** enabled skill (``None``),
|
||||
exactly like the default lead agent in a normal chat — free to use any
|
||||
skill it wants. Non-collector agents pass through ``base`` untouched.
|
||||
"""
|
||||
if agent_id != COLLECTOR_AGENT_ID:
|
||||
return base
|
||||
return merge_collector_skill_allowlist(agent_id, None, extra)
|
||||
Reference in new issue
Block a user