feat(server,frontend): real-time sync architecture with message accumulator
- Add message-accumulator.js: cascades diff-based message accumulation - Add 3-second cascade polling with broadcastToAll (was undefined!) - Add /api/bridge/approve endpoint: tries accept/reject Step→Command→Terminal - Add persistent approve/reject buttons in chat header toolbar - Frontend: loadSessionMessages (trajectory + accumulated), applyNewMessages (WS push) - Status change detection: _prevStatusKey tracking prevents unnecessary re-renders - actionInProgress flag prevents DOM replacement during button fetch - Known issues: Trajectory 341 hard limit, Cascade no command-approval state
This commit is contained in:
@@ -26,15 +26,15 @@ $issues | ForEach-Object { Write-Host "#$($_.number) $($_.title)" }
|
||||
|
||||
3. Wiki 페이지 목록:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\wiki_helper.py list
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\wiki_helper.py list
|
||||
```
|
||||
|
||||
4. Wiki 페이지 읽기:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\wiki_helper.py read "Architecture"
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\wiki_helper.py read "Architecture"
|
||||
```
|
||||
|
||||
5. Wiki 페이지 업데이트:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\wiki_helper.py update "페이지-제목" /tmp/wiki_content.md
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\wiki_helper.py update "페이지-제목" /tmp/wiki_content.md
|
||||
```
|
||||
|
||||
@@ -12,27 +12,27 @@ description: Vikunja API로 gravity_web 프로젝트 태스크 현황을 조회
|
||||
|
||||
1. 전체 목록:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py list
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py list
|
||||
```
|
||||
|
||||
2. TODO만:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
```
|
||||
|
||||
3. DONE만:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py list done
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py list done
|
||||
```
|
||||
|
||||
4. 태스크 완료 처리 (**⚠️ 반드시 이 방법 사용 — 직접 API 호출 금지**):
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py done {TASK_ID}
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py done {TASK_ID}
|
||||
```
|
||||
|
||||
5. 새 태스크 생성:
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --labels Backend,Priority:High
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --labels Backend,Priority:High
|
||||
```
|
||||
|
||||
> [!CAUTION]
|
||||
|
||||
@@ -83,9 +83,9 @@ git log --oneline -20
|
||||
|
||||
| 커밋 유형 | Vikunja 액션 |
|
||||
|-----------|-------------|
|
||||
| 기존 태스크 해당 작업 **완료** | `python .agents\workflows\helpers\vikunja_helper.py done {ID}` |
|
||||
| 신규 작업 완료 (기존 태스크 없음) | `python .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --done --labels Backend,Priority:High` |
|
||||
| 작업 중 발견된 **미완료 TODO** | `python .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --labels Backend,Priority:Mid` |
|
||||
| 기존 태스크 해당 작업 **완료** | `C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py done {ID}` |
|
||||
| 신규 작업 완료 (기존 태스크 없음) | `C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --done --labels Backend,Priority:High` |
|
||||
| 작업 중 발견된 **미완료 TODO** | `C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py create "제목" "설명" --labels Backend,Priority:Mid` |
|
||||
|
||||
> [!IMPORTANT]
|
||||
> 모든 커밋이 기존 또는 신규 태스크에 매핑되었는지 확인.
|
||||
@@ -99,7 +99,7 @@ git log --oneline -20
|
||||
| 프론트엔드 변경 | Architecture |
|
||||
|
||||
```powershell
|
||||
python .agents\workflows\helpers\wiki_helper.py update "Architecture" /tmp/wiki_content.md
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\wiki_helper.py update "Architecture" /tmp/wiki_content.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -13,10 +13,41 @@ description: Gravity Web 프로젝트 연동 서비스 URL, API 키, 프로젝
|
||||
|------|-----|
|
||||
| **Node.js** | 시스템 설치 (`node`, `npm`) |
|
||||
| **Python (helper)** | `C:\ProgramData\miniforge3\envs\gravity_web\python.exe` |
|
||||
| **프로젝트 루트** | `c:\Users\Certes\Desktop\gravity_web` |
|
||||
| **프로젝트 루트** | `c:\Users\Cafe-Variet-E495\Desktop\gravity_web\gravity_web` |
|
||||
| **Shell** | PowerShell (`curl` = `Invoke-WebRequest` 별칭이므로 반드시 **`curl.exe`** 사용) |
|
||||
| **서버 실행** | `cd server && cmd /c node index.js` (port 3300) |
|
||||
|
||||
### Python 실행 규칙
|
||||
|
||||
```powershell
|
||||
# ✅ 항상 전체 경로 사용 (python은 Windows Store 리다이렉트됨)
|
||||
$PYTHON = "C:\ProgramData\miniforge3\envs\gravity_web\python.exe"
|
||||
& $PYTHON .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
```
|
||||
|
||||
```powershell
|
||||
# ❌ 금지: bare python / inline one-liner
|
||||
python script.py # PATH 문제
|
||||
python -c "import json; ..." # PowerShell 이스케이핑 깨짐
|
||||
curl.exe ... | python -c "..." # 파이프 + 인라인 = 100% 실패
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> PowerShell에서 **inline Python one-liner는 절대 사용 금지**. 따옴표/특수문자가 깨집니다.
|
||||
> 반드시 `.py` 파일을 `/tmp/` 에 만들어서 실행하세요.
|
||||
|
||||
### 서버 시작/종료 패턴
|
||||
|
||||
```powershell
|
||||
# 서버 시작 전 기존 프로세스 정리 (EADDRINUSE 방지)
|
||||
$existing = Get-NetTCPConnection -LocalPort 3300 -ErrorAction SilentlyContinue
|
||||
if ($existing) {
|
||||
Stop-Process -Id (Get-Process -Id $existing.OwningProcess).Id -Force
|
||||
Start-Sleep -Seconds 1
|
||||
}
|
||||
cmd /c "cd server && node index.js"
|
||||
```
|
||||
|
||||
## Gitea (Git Repository)
|
||||
|
||||
| 항목 | 값 |
|
||||
@@ -43,7 +74,7 @@ description: Gravity Web 프로젝트 연동 서비스 URL, API 키, 프로젝
|
||||
> 태스크 목록은 항상 라이브 조회를 사용합니다. 하드코딩된 매핑은 유지하지 않습니다.
|
||||
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
```
|
||||
|
||||
## 기타 서비스
|
||||
|
||||
@@ -48,7 +48,7 @@ git log --oneline -5
|
||||
### 3. Vikunja TODO 태스크
|
||||
|
||||
```powershell
|
||||
python .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
C:\ProgramData\miniforge3\envs\gravity_web\python.exe .agents\workflows\helpers\vikunja_helper.py list todo
|
||||
```
|
||||
|
||||
### 4. 종합 보고
|
||||
|
||||
Reference in New Issue
Block a user