iop/apps/node
toki c46874055a feat: edge node unit tests and related updates
- Add edge node unit tests and transport package
- Add node test client and related artifacts
- Update bootstrap, node, and config modules
- Add proto generated files
- Update Makefile and configuration files
2026-05-02 20:09:55 +09:00
..
cmd/iop-node 리팩터: node 서버 코드 제거 및 클라이언트 구조로 전환 2026-05-02 17:54:58 +09:00
internal feat: edge node unit tests and related updates 2026-05-02 20:09:55 +09:00
README.md 기능: IOP 모노레포 스캐폴드 초기 구현 2026-05-02 13:20:35 +09:00

iop-node — Node Agent

디바이스당 1개 실행되는 IOP 노드 에이전트.
실제 AI 모델 추론 어댑터를 관리하고, TCP + Protobuf + mTLS 소켓을 통해 요청을 처리한다.

내부 구조 (Hexagonal Architecture)

cmd/iop-node/        — CLI 진입점 (cobra)
internal/
  bootstrap/         — fx 의존성 주입 모듈
  node/              — 핵심 노드 서비스 (transport.Handler 구현)
  runtime/           — 도메인 타입: ExecutionSpec, RuntimeEvent, 인터페이스
  router/            — RunRequest → ExecutionSpec 라우팅
  transport/         — TCP 서버, 세션 관리, 프레임 코덱
  adapters/
    mock/            — 에코 테스트 어댑터
    ollama/          — Ollama API 어댑터 (TODO)
    vllm/            — vLLM OpenAI-compatible 어댑터 (TODO)
    cli/             — CLI 프로세스 어댑터 (claude/gemini/codex/opencode)
  store/             — SQLite 실행 이력

실행

# 빌드
go build -o bin/iop-node ./apps/node/cmd/iop-node

# 버전 확인
./bin/iop-node version

# 설정 확인
./bin/iop-node config print --config configs/node.yaml

# 서버 실행
./bin/iop-node serve --config configs/node.yaml

어댑터

어댑터 설명 상태
mock 입력 에코, 스트리밍 테스트용 구현 완료
ollama 로컬 Ollama 서버 연동 TODO
vllm vLLM OpenAI-compatible API TODO
cli claude/gemini/codex/opencode CLI 실행 구현 완료

Transport

  • TCP 4-byte length-prefix framing
  • JSON-encoded Envelope (TODO: protobuf 교체)
  • mTLS (configs/node.yaml에서 활성화)
  • 하트비트: 30초 간격