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

15
docs/devlog/2026-04-19.md Normal file
View File

@@ -0,0 +1,15 @@
# Devlog 2026-04-19
## v0.5.97 — Observer 명령어 추출 안정화 (21:22 KST 검증 완료)
### 변경사항
- **v32**: 터미널 프롬프트(``) 조기감지 — JUNK/PROMPT 필터 전에 명령어 직접 추출
- **v31**: content_copy 아이콘 필터 + 후보 길이순 정렬 + trailing icon strip
- **v30**: "Running command" div 형제 탐색 (pre/code 대신 plain div)
- 배포 전 체크리스트 보강 (log relay 필터, regex E2E, 가정 검증)
- observer-dev-guide DOM 구조 BTN-DOM-DUMP 기반 갱신
### 검증 결과
- 14/14 E2E 테스트 통과
- SYNTAX OK
- Accept all (diff review) 정상 동작 확인

View File

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

View File

@@ -2,7 +2,7 @@
"name": "gravity-bridge", "name": "gravity-bridge",
"displayName": "Gravity Bridge", "displayName": "Gravity Bridge",
"description": "Discord-based unified approval system for Antigravity AI interactions.", "description": "Discord-based unified approval system for Antigravity AI interactions.",
"version": "0.5.97", "version": "0.5.98",
"publisher": "variet", "publisher": "variet",
"engines": { "engines": {
"vscode": "^1.100.0" "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 // 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) // 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; let alwaysRunBtnIndex = alwaysRunDetected ? 0 : -1;
if (!alwaysRunDetected && Array.isArray(data.buttons)) { if (!alwaysRunDetected && Array.isArray(data.buttons)) {
for (let bi = 0; bi < data.buttons.length; bi++) { 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; alwaysRunDetected = true;
alwaysRunBtnIndex = bi; alwaysRunBtnIndex = bi;
break; break;