v0.1.72
v0.1.72 — Codex apply_patch 파일 추적 fix + 2D HTTP API ↔ Cloud Y 분리
사용자 보고
- "2D 모드에 AI 추천, 기본 레이아웃에서 외부 서비스 API 와 Supabase/Firebase 노드가 같은 Y 축에 위치. Supabase 노드가 API 엣지에 가려지거나 겹침"
원인
- 모든 좌측 column (HTTP API, Cloud, MCP, nonHub) 이
centeredYStart()로 트리 중앙에 정렬됨 → Y 범위가 모두 동일. file→API 엣지의 vertical segment 가 cloud 노드 위로, file→cloud 엣지가 API 노드 위로 통과.
수정
- (
src/components/Visualizer2D/Graph2D.tsx): SECTION_GAP = 80안전지대 상수 신설.- HTTP API 영역 → 트리 **상반부** (bottom edge =
treeMidY - SECTION_GAP/2, top = bottom - httpTotalH). - Cloud 영역 → 트리 **하반부** (top edge =
treeMidY + SECTION_GAP/2). - 두 영역 사이 정확히 80px 안전지대 → 엣지/노드 겹침 제거.
- nonHub/MCP 는 X column 이 더 외곽이라 cloud 와 직접 충돌 안 함 — 기존 centered 유지.
- 영향: 2D 의 모든 layout (basic / horizontal / city / 3D-projection 등) 에서 동일 적용. AI 추천 모드 포함.
- --
- #### B. Codex apply_patch 파일 추적 fix (custom_tool_call 지원)
사용자 보고
- "Codex AI 에이전트가 fair-report 프로젝트에서 파일을 편집 중인데 ViewWork 가 작업 중 파일을 추적 못 함. package.json 노드에서 bash 작업으로만 표시."
검증 데이터
C:\Users\leehy\.codex\sessions\2026\05\11\rollout-...JSONL —custom_tool_call/apply_patch233개,function_call/shell_command721개. fair-report cwd 매칭됨.- #### 1) 원인
- Codex 의 새 형식 (CLI 0.130.0-alpha.5+):
- 파일 편집 (apply_patch) →
payload.type: "custom_tool_call"+payload.input(raw patch 텍스트). - Shell 명령 (일부 buld) →
payload.type: "local_shell_call"+payload.action.command(string[]). - ViewWork (v0.1.71 이하) 는
payload.type === 'function_call'만 처리 → apply_patch 가 통째로 무시됨. - 결과: 실제 파일 편집은 안 보이고
function_call/shell_command만 emit → 모두path: 'package.json'으로 합쳐져 "package.json 에서 bash 작업 중" 으로만 표시. - #### 2) 수정 (
electron/probe/codexSessionWatcher.ts) CodexLine.payload타입 확장 —input?: string,status?: string,action?: { type?; command?: string|string[] }추가.- 라인 219-229 분기 확대 —
function_call | custom_tool_call | local_shell_call모두 같은toAgentEvent()로 보냄. toAgentEvent()시작부 — 세 가지 인자 형식 모두 시도해argsObj통일:function_call.arguments(JSON 문자열) →JSON.parse시도.custom_tool_call.input(raw 문자열) →argsObj.input으로 보관 (apply_patch 의 patch 본문).local_shell_call.action.command(string[]) → 공백 join 후argsObj.command.- 도구 이름 자동 추론 —
name없으면local_shell_call → 'shell_command',custom_tool_call → 'apply_patch'폴백. - 기존
mapToolToAction('apply_patch') = 'edit'그대로 — patch 본문에서*** Update File: <path>regex 추출 후 file 노드와 매칭. - #### 3) 검증 데이터
- 실제 apply_patch 한 라인 샘플:
- ```json
- {
- "payload": {
- "type": "custom_tool_call",
- "name": "apply_patch",
- "input": "*** Begin Patch\n*** Update File: .harness/plan.md\n@@\n ## Scope\n+- Toss 웹훅...",
- "call_id": "..."
- }
- }
- ```
- 수정 후 흐름:
custom_tool_call통과 →toolName='apply_patch'→action='edit'→ patch 첫*** Update File:regex →path='.harness/plan.md'AgentEvent emit → fair-report 노드맵의 그 파일 위에 Codex 아바타 표시. - #### 4) 파일 변경
electron/probe/codexSessionWatcher.ts(+25, -8 lines)package.json0.1.71 → 0.1.72- #### 5) 검증
npx tsc --noEmitexit=0- 사용자가 v0.1.72 설치 후 fair-report 같은 Codex 활동이 활발한 프로젝트를 열면, package.json 위에 모이지 않고 실제 편집 파일 (
.harness/plan.md,src/...등) 위에 Codex 아바타가 정확히 표시. - --
📦 GitHub 릴리스 노트: v0.1.72