7.80.0 — Émission d'événements vers le journal du service d'agents (Lot 2)
FlowDeck CI / lint (push) Failing after 1m29s
FlowDeck CI / test (push) Failing after 29m9s
FlowDeck CI / docker (push) Skipped

This commit is contained in:
Spark
2026-10-22 20:25:36 +00:00
parent e459b0f9b2
commit 851a7b17d2
11 changed files with 471 additions and 1 deletions
+9
View File
@@ -237,6 +237,9 @@ def _appel_outil(nom: str, args: dict, user_id: int):
conn.commit()
page = conn.execute("SELECT * FROM collection_pages WHERE id = ?",
(cur.lastrowid,)).fetchone()
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.page.created", f"page:{page['id']}", title,
url=url_collection(collection_id), actor="agent:mcp")
return _page_resume(page)
if nom == "update_page":
try:
@@ -265,6 +268,9 @@ def _appel_outil(nom: str, args: dict, user_id: int):
conn.commit()
updated = conn.execute("SELECT * FROM collection_pages WHERE id = ?",
(page_id,)).fetchone()
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.page.updated", f"page:{page_id}", title,
url=url_collection(page["collection_id"]), actor="agent:mcp")
return _page_resume(updated)
if nom == "create_collection":
name = str(args.get("name") or "").strip()
@@ -287,6 +293,9 @@ def _appel_outil(nom: str, args: dict, user_id: int):
conn.commit()
coll = conn.execute("SELECT * FROM collections WHERE id = ?",
(new_id,)).fetchone()
from app.services.agent_evenements import emettre, url_collection
emettre("flowdeck.collection.created", f"collection:{new_id}", name,
url=url_collection(new_id), actor="agent:mcp")
return {"id": coll["id"], "name": coll["name"],
"description": coll["description"], "icon": coll["icon"]}
return {"erreur": f"outil inconnu : {nom}"}