Commit Graph

53 Commits

Author SHA1 Message Date
Variet Worker
0fae7e32aa fix(ext,bot): 통신 아키텍처 감사 — writeRegistration 이중쓰기 + ApprovalView fallback + scanner 최적화
- step-probe.ts: writeRegistration WS 후 return 추가 (파일 이중쓰기 방지)
- bot.py: ApprovalView approve/reject/choice — send_response_to_pending_owner 반환값 확인 + file bridge fallback (5곳)
- bot.py: scanner 주기 3s/5s → 30s (Hub 모드 불필요 I/O 감소)
2026-03-17 21:30:05 +09:00
Variet Worker
47cc838d9d fix(ext,bot): Accept All WS regression + auto_approve dual-write — VSIX v0.4.5 2026-03-17 21:01:24 +09:00
Variet Worker
302d21d35c fix(bot,extension): prevent dual delivery of commands and responses via WS+file 2026-03-17 20:30:37 +09:00
Variet Worker
442221e6a3 fix(bot): ApprovalView Hub WS 응답 라우팅 — Discord 승인이 Extension에 전달 안 되는 근본 원인 2026-03-17 14:53:22 +09:00
Variet Worker
f6181e552d fix(bot): ApprovalRequest missing conversation_id + timestamp in Hub path 2026-03-17 13:20:00 +09:00
Variet Worker
96e9b8adce fix(bot): Hub WS auto-approve Discord 알림 누락 + !auto 이중발송 dedup 2026-03-17 10:37:55 +09:00
Variet Worker
5f795b9a91 refactor(extension): 모듈 분리 + Hub 통합 테스트 #task-395
- extension.ts 3,446→1,289줄 (-63%)
- step-probe.ts (1,435줄): setupMonitor, processResponseFile, tryApprovalStrategies
- observer-script.ts (687줄): DOM observer script
- ws-client.ts (390줄): WSBridgeClient
- step-utils.ts (114줄): step 파싱 유틸
- auth.py (115줄): JWT + registration code
- hub.py (581줄): WSHub + per-client queue
- Hub WS 연동 테스트 통과 (auth, chat, register)
- VSIX v0.4.0 빌드
2026-03-17 06:41:42 +09:00
Variet Worker
fdc0084813 fix: add chat snapshot delivery success/failure logging 2026-03-16 20:22:49 +09:00
Variet Worker
f309518e78 fix: add channel failure logging to diagnose Discord notification delivery issue 2026-03-16 19:47:06 +09:00
Variet Worker
37c0aae41c fix(bot): multi-project signal freeze — cache-only _get_channel + per-tick scanner cap
Root cause: When 3+ projects generated pending simultaneously, Bot's
pending_approval_scanner made 20-40 Discord API calls in one tick
(sequential await), triggering Discord 429 rate limits which blocked
the entire scanner for 10-30s, freezing ALL signal delivery.

Two fixes:
1. _get_channel(): Replace guild.fetch_channels() (API call) with
   discord.utils.get(guild.channels) (in-memory cache). Eliminates
   redundant API calls + Lock contention when multiple projects arrive.
2. pending_approval_scanner: Per-tick caps (5 new + 5 status) prevent
   one tick from monopolizing Discord API quota. Excess items are
   naturally processed in subsequent 3-second ticks.
2026-03-16 07:06:51 +09:00
CD
c9f44afcf1 fix(bridge): system audit + 5-file bug fix — PATS Deny trigger removal, auto_resolved chat dedup, UUID filenames, IP rate limit leak, bot.py deque 2026-03-15 23:01:20 +09:00
CD
5e5f515db4 fix(bridge): auto-approve crash — DOM observer Deny filter + bot reject-word guard + AGENT rule 2026-03-15 18:49:58 +09:00
CD
6739f8f30c fix(bridge): v0.3.11 approval flow architecture fix — eliminate double-fire auto-approve, strip 30+ failed RPC strategies, add project_name DEDUP guard
- Remove Extension-side auto-approve (was double-firing with Bot auto-approve)
- Strip failed strategies 0A-1 from tryApprovalStrategies (~150 lines)
- Keep only Strategy 0-PROTO (proto RPC) + Strategy 2 (clickTrigger)
- Add bot.py AUTO-RESOLVED logging for diagnostics
- Update known-issues with 3 new entries
- Clean deployment: v0.3.8→v0.3.10→v0.3.11
2026-03-15 17:11:38 +09:00
CD
ae0509fbb5 perf(bridge): 3 optimizations — pollResponseGroup 1500ms, renderer adaptive idle, Bot single-pass scanner 2026-03-15 10:51:22 +09:00
CD
f96203646e fix(bridge): 4 race condition fixes for approval lifecycle 2026-03-15 10:44:31 +09:00
CD
40e3cd550f fix(bridge): 5 bug fixes for approval signal drop and Discord relay
- DEDUP: add conversation_id guard to prevent cross-session step_index collision
- step_probe: suppress pending when projectName=default (empty window)
- watchCommandsDir: add 3s polling fallback (fs.watch silent fail on Windows)
- auto toggle: write chat_snapshot confirmation back to Discord
- bot on_message: add message ID dedup for Gateway event replay
2026-03-15 08:18:26 +09:00
Variet Worker
e5a05e3ac4 feat(bot/extension/watcher): Discord 아티팩트 알림 개선 — 파일 첨부 전송, truncation 확대, 동적 .md 감시 2026-03-13 09:46:56 +09:00
Variet Worker
7eca0763c9 fix(collector): 기능 누락 3건 수정 — Discord 명령어/채팅/등록 중계
Gap 1: Discord→Extension 명령어 깨짐
  - bot.py: _write_command() 래퍼 — gateway.push_command()도 호출
  - main.py: bot.gateway 연결
  - 슬래시 명령어 + on_message 모두 _write_command 사용

Gap 2: Chat snapshot 미전달
  - collector.py: _forward_chat_snapshots_loop 추가

Gap 3: Session registration 미전달
  - collector.py: _forward_registrations_loop 추가
2026-03-11 22:31:08 +09:00
Variet Worker
c1303999cf feat(bot,bridge): P1 !auto 토글 자동승인 + P2 BridgeTransport 추상화 #task-304 #task-305
P1: !auto 토글 (bot.py + extension.ts)
- auto_approve_projects set으로 프로젝트별 상태 관리
- !auto → on/off 토글, pending 자동 승인 + 🤖 자동 승인됨 embed
- Extension step_probe에서 autoApproveEnabled 시 직접 tryApprovalStrategies

P2: BridgeTransport 추상화 (bridge.py)
- BridgeTransport ABC + LocalTransport (기존 동작 100% 호환)
- RemoteTransport 스켈레톤 (multi-PC 대비)
- config.py BOT_MODE/REMOTE_BRIDGE_URL, main.py transport 주입

docs: usage-guide.md + tech-stack.md Python 경로 기록
2026-03-11 19:25:40 +09:00
CD
6179c4d242 fix(bridge): RUNNING 세션 우선 선택 + IDLE 채널 자동 생성 제거
- extension: bestSession 선택에 2단계 비교 (RUNNING > IDLE, then modTime)
- extension: [SESSION-FILTER] 진단 로그 + [projectName] 로그 접두사
- bot: pending_approval_scanner의 IDLE 프로젝트 자동 채널 생성 제거
- known-issues: 2개 항목 추가 (IDLE 고착, 채널 증식)
2026-03-10 21:56:46 +09:00
CD
5a3217d31a fix(extension): 크로스 프로젝트 response watcher 우회 수정 + file_permission write 도구 3-button 매핑
- response watcher: pending 삭제 후 response data의 project_name으로 fallback 필터
- processResponseFile: sessionId를 pending에서 우선 사용 (activeSessionId 대신)
- logToFile: [projectName] 접두사 추가 (공유 로그 구분)
- file_permission 리스트에 replace_file_content, write_to_file, multi_replace_file_content 추가
- UserResponse에 project_name 필드 추가 + bot.py 4곳 전파
- known-issues: 2건 추가, devlog 012
2026-03-10 21:02:06 +09:00
CD
0470c03ab3 fix: add step_type to default approve/reject/timeout callbacks (not just multi-choice) 2026-03-10 15:29:55 +09:00
CD
7982263fcd fix: pass step_type through response file for diff_review routing 2026-03-10 15:02:24 +09:00
CD
048ffd90a3 feat: auto_resolved sync + expired card update + DOM step_index 2026-03-10 13:52:27 +09:00
CD
1f63f60280 feat: proto-based RPC approval for Run commands via Discord
Decoded HandleCascadeUserInteractionRequest protobuf schema from AG's
extension.js (message #162, base64 FileDescriptor 78KB).

Working payload (variant PROTO-0):
  cascadeId + interaction.{trajectoryId, stepIndex, runCommand.confirm}

Changes:
- extension.ts: Added Strategy 0-PROTO with decoded proto RPC call
- extension.ts: Fixed processResponseFile to call tryApprovalStrategies()
  instead of direct clickTrigger (was bypassing all strategies)
- extension.ts: Fixed false positive Run detection (sessionStalled reset
  when step_probe confirms no WAITING)
- extension.ts: Moved lastPendingStepIndex to module scope
- extension.ts: Added activeTrajectoryId tracking from session init
- bot.py: Added MERGE detection + Discord message edit for command updates
- bot.py: Added _sent_commands tracking for merge detection

Proto RE methodology:
1. Found schema exports in AG extension.js
2. Located fileDesc() with base64 protobuf descriptor
3. Decoded 58KB raw proto, found message names
4. Extracted CascadeRunCommandInteraction.confirm field
5. Tested camelCase JSON via ConnectRPC = SUCCESS
2026-03-10 07:45:10 +09:00
CD
aab1cfba27 fix(bridge): approval ENOENT race condition + multi-choice button grouping #task-276 #task-277 2026-03-10 06:32:20 +09:00
CD
373c0f7ddc fix(bridge): approval flow robustness — pending cleanup, MERGE dedup, false positive filter, auto_resolve, 30min timeout 2026-03-10 00:41:39 +09:00
CD
0c3d6cdb6d fix(bridge): step structure discovery + approval watcher + AI text relay
- plannerResponse.response = user-facing text field (confirmed)
- step.runCommand.commandLine = command (not toolCall.argumentsJson)
- Add response watcher: bridge/response/ → ResolveOutstandingSteps RPC
- Fix AI text: use modifiedResponse/response, last-wins, dedup
- Fix flooding: slice(-delta) to skip old steps on reload
- Bot: 404 cache invalidation for deleted Discord channels
2026-03-08 02:29:17 +09:00
CD
befa5d7c26 feat: start scanner loops, remove debug enum, enable chat response relay to Discord 2026-03-07 17:29:23 +09:00
CD
0bd525a54c feat: Discord slash commands /stop /auto /send with guild sync 2026-03-07 15:20:10 +09:00
CD
02e9e4d424 fix: bot text confirmation on relay + rename @bridge to @gravity + channel dedup 2026-03-07 15:15:56 +09:00
CD
af14e5fbc7 fix: _get_channel fetches existing channels before creating (prevents duplicates) 2026-03-07 15:10:43 +09:00
CD
c8c9920dd0 feat: auto-create Discord channel when new project registration detected 2026-03-07 14:59:15 +09:00
CD
d227ba57f7 fix: only log registration count when it changes (stop 3s spam) 2026-03-07 14:53:44 +09:00
CD
35ee916440 feat: chat capture (@bridge participant, onDidChangeTextDocument), !stop command, chat snapshot scanner 2026-03-07 14:45:44 +09:00
CD
d44b4c2f77 feat: full artifact content in Discord (split into chunks) + full task content display 2026-03-07 14:36:18 +09:00
CD
046c58879c fix: periodic register reload in approval scanner + direct project_name access 2026-03-07 14:31:14 +09:00
CD
98bb037c81 feat: session connect command + auto-registration + bridge/register protocol 2026-03-07 14:15:53 +09:00
CD
2c56fc7607 feat: multi-project routing — project_name in bridge, per-project channels, extension filtering 2026-03-07 14:07:40 +09:00
CD
51cfd57930 fix: asyncio.Lock on channel create + PROJECT_NAME in .env.example 2026-03-07 13:37:22 +09:00
CD
efaf29a6d2 refactor: single project channel - guild.fetch_channels API + project_channel singleton 2026-03-07 13:24:42 +09:00
CD
7c081e70b5 fix: channel duplication root fix - ready gate + conv_id-first + Discord API search + hash pre-init 2026-03-07 13:09:05 +09:00
CD
de6f1c7ffd feat(phase4): !auto on/off 명령어 - Discord에서 Antigravity 자동승인 토글 2026-03-07 13:01:07 +09:00
CD
8b3d723650 fix: 채널 중복 완전 근절 - reconnect 시 이름 dedup + 자동 삭제 + project name 최소 5자 2026-03-07 12:55:41 +09:00
CD
ce2336c3d6 fix: 승인 메시지 중복 전송 수정 - in-memory sent tracking 2026-03-07 12:20:39 +09:00
CD
51ece61a61 fix: 채널 중복 완전 해결 - Discord 캐시 대신 자체 dict로 이름 검색 2026-03-07 12:02:03 +09:00
CD
b2622e9052 fix: 채널 중복 생성 근본 수정 - 글로벌 락 + 이름 기반 검색 + API 새로고침 2026-03-07 11:56:10 +09:00
CD
e32be6b2f3 refactor: 전면 재설계 - 시작 시 채널 스팸 제거, content hash 중복 방지, 단일 이벤트 경로 2026-03-07 11:42:11 +09:00
CD
a76208e4e6 fix: task embed 편집, metadata 중복 제거, closed- 채널 복원 2026-03-07 11:24:04 +09:00
CD
5d95185ecd feat(phase2): 승인/거부 버튼 + bridge 프로토콜 + 테이블 변환 수정 + 중복 메시지 해결 2026-03-07 11:12:56 +09:00