Repository navigation
Conversation
dmae97
left a comment
There was a problem hiding this comment.
Agent Reach 통합 검토를 완료했습니다. 실제 Agent Reach 1.6의 ok:false + exit 1 오류 envelope를 처리하고, 공개 라우터에서도 종료 사유가 유지되는 것을 확인했습니다.
검증:
- 비라이브 테스트 923개 통과, 3개 skipped, 11개 deselected
- Ruff 전체 검사 통과
- 스킬 그래프 1457개/55개 엣지 검증 통과
- 최종 전체 변경 리뷰 READY
라이브 플랫폼·인증·업스트림 API는 의도적으로 호출하지 않았습니다. raw 모드는 민감정보를 포함할 수 있으므로 필요할 때만 OMK_AGENT_REACH_RAW=1을 사용해야 합니다.
| stdout=stdout_file, | ||
| stderr=stderr_file, | ||
| shell=False, | ||
| env={**os.environ, "REACH_API_SUPERVISED": "1"}, |
There was a problem hiding this comment.
중요한 지점입니다. REACH_API_SUPERVISED=1을 명시해서 Agent Reach의 하위 명령이 새 세션을 만들지 않고, 어댑터가 소유한 POSIX process group에 남도록 했습니다. 일반 종료뿐 아니라 timeout·출력 초과 시에도 같은 group을 정리합니다.
| # Specialized adapters take precedence over generic host routing. | ||
| if host == "reddit.com" or host.endswith(".reddit.com"): | ||
| tool = "reddit" | ||
| elif parsed.scheme == "https" and any( |
There was a problem hiding this comment.
자동 Agent Reach 선택은 HTTPS에만 적용됩니다. plain HTTP는 기존 ordinary web 경로를 유지하고, Reddit은 계속 전용 reddit 어댑터가 우선합니다. 이 조합으로 기존 라우팅 회귀를 막았습니다.
| ) -> CrawlResult: | ||
| result = CrawlResult(url=url, tool=tool.name, status=CrawlStatus.ERROR) | ||
| for retry in range(router.max_retries + 1): | ||
| max_retries = 0 if tool.name == "agent_reach" else router.max_retries |
There was a problem hiding this comment.
agent_reach는 구조화된 오류 코드와 retry-after를 자체 보유하므로 공통 재시도 루프에서 제외했습니다. 따라서 NEED_LOGIN, RATE_LIMITED, TIMEOUT 등에서 같은 호출을 반복하지 않고 원래 종료 사유가 유지됩니다. async 경로에도 동일하게 적용됐습니다.
| 비활성 텍스트로 렌더링한다. 응답 본문과 item은 항상 신뢰할 수 없는 데이터이며 | ||
| `metadata.untrusted_content`는 성공·오류 모두 `true`다. | ||
|
|
||
| **raw 보존은 명시적 opt-in뿐이다.** 기본값에서는 `metadata.raw_response`와 item의 `raw` |
There was a problem hiding this comment.
raw 원본은 기본 비활성화라는 점을 문서에도 명시했습니다. 기본 응답에는 normalized 공개 필드만 남고, envelope/item raw는 OMK_AGENT_REACH_RAW=1일 때만 보존합니다. 오류 문구와 중첩 진단은 Bearer·Cookie·API key·token·URL secret을 sanitize합니다.
Summary
AgentReachTooladapter and register it inALL_TOOLS/TARGET_TOOLS.reach://targets and HTTPS domain routing for GitHub, YouTube, Bilibili, V2EX, Twitter, Reddit-adjacent channels, Xiaoyuzhou, and the web while preserving specialized adapters and ordinary HTTP handling.REACH_API_SUPERVISED=1, owned POSIX process groups, bounded output, finite deadlines, and cleanup on completion, timeout, or overflow.ok:falseexit-1 envelopes intoCrawlResultstop reasons without retrying or changing backends.rawpayloads opt-in, with diagnostic secret redaction and normalized public fields by default.Safety and compatibility
shell=True; no live platform calls were made during implementation.Verification
923 passed, 3 skipped, 11 deselectedruff check omk_crawl tests— all checks passedLive channels, authentication, and upstream APIs were intentionally not exercised. Raw mode is sensitive by design and long transcription may require larger adapter/total timeouts.