fix(bridge): align Extension protocol with Bot — 3 mismatches fixed

- Snapshot: response/chat_snapshot.txt → chat_snapshots/*.json
- Command field: cmd.message → cmd.text (matches Bot.write_command)
- RPC: GetConversation (404) → GetCascadeTrajectorySteps
- Bundle sql-wasm.js + sql-wasm.wasm into VSIX (45KB→379KB)
- Handle consumed flag, clean 38 stale commands
- Add extractAIText helper with fallback chain
This commit is contained in:
2026-03-08 01:13:28 +09:00
parent 4bb72921ae
commit 876143d397
6 changed files with 297 additions and 90 deletions

View File

@@ -0,0 +1,5 @@
# 2026-03-08 Devlog — Bridge 프로토콜 수정
| # | 시간 | 작업 | 커밋 | 상태 |
|---|------|------|------|------|
| 1 | 01:00 | Extension↔Bot 프로토콜 불일치 3건 수정 + sql-wasm 번들링 | `e4dc1b1` | 🔧 |

View File

@@ -0,0 +1,26 @@
# Extension↔Bot 프로토콜 불일치 수정 + sql-wasm 번들링
- **시간**: 2026-03-08 00:50~01:10
- **Commit**: `e4dc1b1`
- **Vikunja**: #240 → 진행중
## 결정 사항
### GetConversation → GetCascadeTrajectorySteps
- SDK의 `getConversation()` 메서드가 `GetConversation` RPC를 호출하지만, LS에 해당 메서드 없음 (404)
- `ls-rpc-reference.md`에서 확인: 실제 메서드는 `GetCascadeTrajectorySteps`
- Fallback 체인: Steps → GetCascadeTrajectory → title-only
### Bot↔Extension 프로토콜 불일치 3건
1. **Snapshot**: Bot은 `chat_snapshots/*.json` (JSON), Extension은 `response/chat_snapshot.txt` (텍스트)
2. **Command**: Bot은 `text` 필드, Extension은 `message` 필드 읽음
3. **Consumed**: Bot이 `consumed: true` 설정하지만 Extension이 삭제하지 않아 38개 누적
### sql-wasm.wasm VSIX 누락
- `.vscodeignore``node_modules/**` 제외 → sql.js wasm 파일 미포함
- 해결: 빌드 시 `out/sdk/`에 수동 복사
## 미완료
- [ ] 윈도우 리로드 후 E2E 테스트 (Discord→Antigravity, Antigravity→Discord)
- [ ] `GetCascadeTrajectorySteps` 응답 구조 파악 → extractAIText 정확도 검증
- [ ] VSIX 빌드 스크립트에 sql-wasm 복사 자동화