Skip to content

Agent8 2.0 진행하기 #772

@rareboe

Description

@rareboe

현재 구조

sequenceDiagram
  autonumber
  actor U as User
  participant FE as Frontend (UI)
  participant BE as Backend (API)
  participant SDK as ai-sdk (streamObject / typed stream router)
  participant LLM as LLM Server
  participant RC as Remote Container
  participant GL as GitLab

  %% 1) Prompt -> streamObject -> typed streaming -> FE
  U->>FE: 프롬프트 입력
  FE->>BE: POST /prompt (prompt, context)
  BE->>SDK: streamObject 요청 (schema, prompt, messages)
  SDK->>LLM: LLM 호출 (stream)
  loop 스트리밍 수신 (chunk/event)
    LLM-->>SDK: stream event (type + payload)
    SDK-->>BE: typed event forward (type + payload)
    BE-->>FE: typed message 전달 (type별 UI 업데이트)
  end
  SDK-->>BE: stream 종료 (final object / usage)
  BE-->>FE: 최종 결과 전달

  %% 2) If FE triggers file write / bash based on typed messages
  alt FE가 type을 보고 file_write / bash 실행 요청
    FE->>BE: POST /actions (type=file_write|bash, payload)
    BE->>RC: 명령 실행 (write file / bash exec)
    RC-->>BE: 실행 결과 (stdout/stderr, changed files)
    BE-->>FE: 실행 결과 전달 (type=action_result)
  end

  %% 3) Commit to GitLab
  alt 사용자가 커밋 트리거 (또는 FE가 최종 메시지로 자동 준비)
    FE->>BE: POST /commit (message, diff/meta)
    BE->>GL: Commit/Push
    GL-->>BE: commit sha / pipeline info
    BE-->>FE: 커밋 결과 (sha, pipeline status)
  end
Loading

변경 구조

sequenceDiagram
  autonumber
  actor U as User
  participant FE as Frontend (UI)
  participant RC as Remote Container (Runner)
  participant OC as OpenCode API
  participant LLM as LLM Server
  participant GL as GitLab

  %% 1) Prompt -> Remote Container
  U->>FE: 프롬프트 입력
  FE->>RC: 프롬프트 전달 (prompt, context)

  %% 2) Remote Container streams LLM output to Frontend via OpenCode API
  RC->>OC: OpenCode API 호출 (start stream)
  OC->>LLM: LLM 요청 (stream)
  loop 스트리밍 수신
    LLM-->>OC: stream chunk/event
    OC-->>RC: stream chunk/event
    RC-->>FE: stream 전달 (delta/event)
    FE-->>FE: UI 업데이트만 수행
  end
  LLM-->>OC: stream 종료 (final)
  OC-->>RC: final response + 종료 신호
  RC-->>FE: 완료 알림 (done/final)

  %% 3) Remote Container checks code changes and commits to GitLab
  RC->>RC: 코드 변경 체크 (git status / diff)
  alt 변경사항 있음
    RC->>GL: Commit/Push (direct)
    GL-->>RC: commit sha / pipeline info
    RC-->>FE: 커밋 결과 알림 (sha, status)
  else 변경사항 없음
    RC-->>FE: 변경사항 없음 알림
  end
Loading

Sub-issues

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions