feat(bridge): v33 Accept all 자동승인 — diff review 버튼도 auto-approve (v0.5.98)

Always run과 동일하게 Accept all / Accept 버튼도 즉시 자동 승인.
Observer가 step_type=diff_review로 전송 → bridge에서 AUTO_APPROVE_RE 매칭 → 즉시 응답.
This commit is contained in:
Variet Worker
2026-04-19 21:27:18 +09:00
parent bd5a7ca8b9
commit 6aea48e2e9
4 changed files with 22 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "gravity-bridge",
"version": "0.5.97",
"version": "0.5.98",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "gravity-bridge",
"version": "0.5.97",
"version": "0.5.98",
"dependencies": {
"cheerio": "^1.2.0",
"ws": "^8.19.0"

View File

@@ -2,7 +2,7 @@
"name": "gravity-bridge",
"displayName": "Gravity Bridge",
"description": "Discord-based unified approval system for Antigravity AI interactions.",
"version": "0.5.97",
"version": "0.5.98",
"publisher": "variet",
"engines": {
"vscode": "^1.100.0"

View File

@@ -285,11 +285,13 @@ function _handlePending(req: any, res: any, ctx: HttpBridgeContext) {
// v19: "Always run" auto-approve — MUST run BEFORE any filter can reject it
// Detects from rawCmd OR from buttons array (Observer may detect sibling first)
let alwaysRunDetected = /^Always\s+run$/i.test(rawCmd);
// v33: Also auto-approve "Accept all" (diff review) and "Accept" buttons
const AUTO_APPROVE_RE = /^(Always\s+run|Accept\s+all|Accept)$/i;
let alwaysRunDetected = AUTO_APPROVE_RE.test(rawCmd);
let alwaysRunBtnIndex = alwaysRunDetected ? 0 : -1;
if (!alwaysRunDetected && Array.isArray(data.buttons)) {
for (let bi = 0; bi < data.buttons.length; bi++) {
if (/^Always\s+run$/i.test((data.buttons[bi].text || '').trim())) {
if (AUTO_APPROVE_RE.test((data.buttons[bi].text || '').trim())) {
alwaysRunDetected = true;
alwaysRunBtnIndex = bi;
break;