sync update from LAN repo (source dhk-1 @ 3b1ec5b4)

This commit is contained in:
gozeros committed 2026-11-05 10:56:34 +08:00
1 parent da6521b6cb
commit 264e2200d6
995 files changed
+148105 -13399

No files matched your search

@@ -12,8 +12,10 @@ from app.gateway.routers import _agentfx_seed as agentfx_seed
from app.gateway.routers import _latency_diagnosis_seed as latency_diagnosis_seed
from app.gateway.routers import _ai_writing_seed as ai_writing_seed
from app.gateway.routers import _cognitive_situation_seed as cognitive_situation_seed
from app.gateway.routers import _elasticsearch_offline_ops_seed as elasticsearch_ops_seed
from app.gateway.routers import _gongwen_seed as gongwen_seed
from app.gateway.routers import _page_report_designer_seed as page_report_seed
from app.gateway.routers import _query_slowdown_diagnosis_seed as query_slowdown_diagnosis_seed
from deerflow.config.paths import Paths
from deerflow.skills import storage as skill_storage_module
@@ -57,7 +59,7 @@ def _assert_skill_asset(path: Path, expected_name: str) -> None:
def test_required_startup_seed_assets_are_complete() -> None:
"""Every file required by the four startup skill seeders ships in source."""
"""Every file required by the startup skill seeders ships in source."""
_assert_agent_assets(
ai_writing_seed._ASSETS_DIR,
tuple(ai_writing_seed.required_agent_ids()),
@@ -78,6 +80,14 @@ def test_required_startup_seed_assets_are_complete() -> None:
latency_diagnosis_seed._ASSETS_DIR,
(latency_diagnosis_seed.LATENCY_DIAGNOSIS_AGENT_ID,),
)
_assert_agent_assets(
query_slowdown_diagnosis_seed._ASSETS_DIR,
(query_slowdown_diagnosis_seed.QUERY_SLOWDOWN_DIAGNOSIS_AGENT_ID,),
)
_assert_agent_assets(
elasticsearch_ops_seed._ASSETS_DIR,
(elasticsearch_ops_seed.ELASTICSEARCH_OFFLINE_OPS_AGENT_ID,),
)
skill_assets = (
(
@@ -102,6 +112,14 @@ def test_required_startup_seed_assets_are_complete() -> None:
/ "SKILL.md",
latency_diagnosis_seed.LATENCY_DIAGNOSIS_SKILL_NAME,
),
(
query_slowdown_diagnosis_seed._ASSETS_DIR / "skills" / query_slowdown_diagnosis_seed.QUERY_SLOWDOWN_DIAGNOSIS_SKILL_NAME / "SKILL.md",
query_slowdown_diagnosis_seed.QUERY_SLOWDOWN_DIAGNOSIS_SKILL_NAME,
),
(
elasticsearch_ops_seed._ASSETS_DIR / "skills" / elasticsearch_ops_seed.ELASTICSEARCH_OFFLINE_OPS_SKILL_NAME / "SKILL.md",
elasticsearch_ops_seed.ELASTICSEARCH_OFFLINE_OPS_SKILL_NAME,
),
*(
(
agentfx_seed._ASSETS_DIR / "skills" / name / "SKILL.md",
@@ -113,6 +131,15 @@ def test_required_startup_seed_assets_are_complete() -> None:
for skill_path, name in skill_assets:
_assert_skill_asset(skill_path, name)
elasticsearch_skill_root = elasticsearch_ops_seed._ASSETS_DIR / "skills" / elasticsearch_ops_seed.ELASTICSEARCH_OFFLINE_OPS_SKILL_NAME
for relative_path in (
"references/offline-deployment.md",
"references/troubleshooting.md",
"scripts/collect_diagnostics.sh",
"scripts/analyze_diagnostics.py",
):
_assert_nonempty_file(elasticsearch_skill_root / relative_path)
cognitive_skill_root = cognitive_situation_seed._ASSETS_DIR / "skills" / cognitive_situation_seed.COGNITIVE_SITUATION_SKILL_NAMES[0]
runtime_template = cognitive_skill_root / "assets" / "runtime" / "index.html"
_assert_nonempty_file(runtime_template)
@@ -185,6 +212,8 @@ def test_gongwen_seeder_is_idempotent_and_preserves_local_edits(
assert gongwen_seed.ensure_gongwen_agent() is False
assert agent_soul.read_text(encoding="utf-8") == "现场调整的智能体规则"
assert workflow_skill.read_text(encoding="utf-8") == "现场调整的技能规则"
def test_cognitive_situation_seeder_synchronizes_the_lightweight_skill_and_prunes_legacy_runtime(
isolated_seed_targets: tuple[Paths, Path],
) -> None: