refactor(b2): eliminate all cross-plugin imports - contracts for worker/agent_runner/workstream, declared dependency for wiki
Check Cross-Plugin Imports / check (push) Has been cancelled

This commit is contained in:
Agent Zero
2026-08-23 20:29:09 +02:00
parent 4038b74025
commit 7467c01d38
5 changed files with 25 additions and 30 deletions
+4 -4
View File
@@ -67,10 +67,10 @@ async def post_task_to_workstream(
try:
from app.plugins.builtins.contracts import get_contract
_komm = get_contract("kommunikation")
if _komm and hasattr(_komm, "send_message"):
send_message = _komm.send_message
else:
from app.plugins.builtins.kommunikation.services import send_message
if not _komm or not hasattr(_komm, "send_message"):
logger.warning("kommunikation contract unavailable - skipping workstream post for task %s", task.id)
return None
send_message = _komm.send_message
block_type = "goal_card" if task.task_type in ("goal", "milestone") else "task_card"
block_data = _goal_card_data(task) if block_type == "goal_card" else _task_card_data(task)