feat(bridge): v17 Always run auto-approve + Retry button relay (v0.5.53) #task-632

- Observer v17: ACTION_WORDS에 'Retry' 추가 — Agent terminated 대화상자의 Retry 버튼 감지/릴레이
- http-bridge: 'Always run' 버튼 자동승인 — response 파일 즉시 생성하여 observer가 바로 클릭
- bot.py: auto_approved 상태 처리 — Discord에 비대화형 '자동 승인' 알림 표시
- Observer matchedType에 'retry' step_type 매핑
This commit is contained in:
Variet Worker
2026-04-16 22:03:09 +09:00
parent 62ee081ffe
commit 7dbf73aa89
4 changed files with 62 additions and 7 deletions

19
bot.py
View File

@@ -687,11 +687,28 @@ class GravityBot(commands.Bot):
if request_id in self._sent_approval_ids:
return
# Check auto_resolved status
# Check auto_resolved / auto_approved status
status = data.get("status", "pending")
if status in ("auto_resolved", "expired"):
await self._handle_auto_resolved(request_id, status)
return
if status == "auto_approved":
# Bridge-level auto-approve (e.g. "Always run") — show notification only
channel = await self._get_channel(project)
if channel:
cmd_text = data.get("command", "")[:200]
desc_text = data.get("description", "")[:300]
embed = discord.Embed(
title="🤖 자동 승인됨 (Always run)",
description=f"✅ **{cmd_text}**" + (f"\n```\n{desc_text}\n```" if desc_text and len(desc_text) > 3 else ""),
color=discord.Color.green(),
)
embed.set_footer(text=f"auto-approve | {request_id[:12]}")
await channel.send(embed=embed)
self._cap_dict(self._sent_approval_ids)
self._sent_approval_ids[request_id] = True
logger.info(f"[HUB-PENDING] Auto-approved (Always run): {request_id[:12]} project={project}")
return
instance_number = data.get("_instance_number", 0)
pc_name = data.get("_pc_name", "")