fix(bridge): use GetAllCascadeTrajectories for real-time relay

Root cause: GetCascadeTrajectorySteps has 775-step hard limit,
startStepIndex parameter is completely ignored (verified via direct RPC).

Solution: GetAllCascadeTrajectories returns:
- stepCount: real-time (verified 1413->1457 live)
- latestNotifyUserStep: full notificationContent
- latestTaskBoundaryStep: full taskName/Status/Summary
- stepIndex on each for dedup

E2E verified: Python script -> RPC -> snapshot -> Bot -> Discord
This commit is contained in:
2026-03-08 07:37:39 +09:00
parent c3964f8e7a
commit 854f33b816
4 changed files with 261 additions and 230 deletions

View File

@@ -145,3 +145,16 @@ setInterval (5초마다):
```
이 방식은 `getDiagnostics.lastStepIndex`의 stale 문제를 완전히 우회함.
### 추가 발견 (2026-03-08 07:10)
**rawRPC `GetCascadeTrajectorySteps` 775-step 한계**
- RPC는 항상 **최대 775 steps** 반환 (0-774)
- `startStepIndex` 파라미터가 **무시됨** — 항상 처음부터 775개
- 현재 대화가 1275+ steps이면, steps 775-1274는 접근 불가
- 마지막 PLANNER_RESPONSE (24 chars)가 step 774의 오래된 텍스트
**수정**: getDiagnostics로 step count 변화 감지 (3초 폴링) + rawRPC는 content 조회용으로만 사용.
`currentMax` 계산 버그 제거 — getDiagnostics.lastStepIndex를 직접 비교.