🚀 Auto-deploy: BotVPS atualizado em 28/03/2026 18:59:46

This commit is contained in:
2026-03-28 18:59:46 +00:00
parent f273940f6f
commit bf8416bc60

33
main.py
View File

@@ -200,39 +200,6 @@ async def orchestrate_task(task_data: dict, is_auth: bool = Depends(verify_passw
async def get_orch_status(is_auth: bool = Depends(verify_password)):
return get_orchestrator_status()
# --- SISTEMA CRONOS ---
@app.get("/api/cronos/status")
async def get_cronos_status(is_auth: bool = Depends(verify_password)):
"""Retorna o status semanal atual e lista de conhecimentos."""
memory_root = "/root/Antigravity_Memory"
current_week_path = os.path.join(memory_root, "current_week/status_geral.md")
status_content = ""
if os.path.exists(current_week_path):
with open(current_week_path, "r") as f:
status_content = f.read()
# Lista arquivos em knowledge
knowledge_dir = os.path.join(memory_root, "knowledge")
knowledge_files = []
if os.path.exists(knowledge_dir):
knowledge_files = [f for f in os.listdir(knowledge_dir) if f.endswith(".md")]
return {
"status": status_content,
"knowledge_topics": knowledge_files,
"last_update": time.strftime("%Y-%m-%d %H:%M:%S")
}
@app.get("/api/cronos/knowledge/{topic}")
async def get_cronos_knowledge(topic: str, is_auth: bool = Depends(verify_password)):
filepath = os.path.join("/root/Antigravity_Memory/knowledge", topic)
if not os.path.exists(filepath):
raise HTTPException(status_code=404, detail="Tópico não encontrado")
with open(filepath, "r") as f:
return {"content": f.read()}
# --- SERVER ---
if __name__ == "__main__":
import uvicorn