Skip to content

Commit ffb1a7e

Browse files
committed
Document how to collect [AGENT-CONN] logs (#13)
Agent: Claude Code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015LJG7MWqYoCZivtQ96kBhP
1 parent 4fe8eb2 commit ffb1a7e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎docs/mcp-explanation-drafts.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ command = "/absolute/path/to/Codebasic TTS.app/Contents/Helpers/CodebasicAgentMC
2424
- 철회한 등록 앱을 다시 연결하려면 해당 호스트에서 번들 도우미를 `--forget-key` 인자로 직접 실행한 뒤 평소 설정으로 재시작하고 새 요청을 승인합니다.
2525
- 호환용 기존 기본 지시 조회와 `speak_text`는 각각 그대로입니다. 이전 `mcp_tts_draft.py` 클라이언트는 붙여넣기를 안내합니다.
2626

27+
## 연결 로그로 확인
28+
29+
앱은 연결 판단마다 `agent` 카테고리에 `[AGENT-CONN]` 한 줄을 남깁니다. 대본·지시·키는 기록하지 않습니다.
30+
31+
```sh
32+
/usr/bin/log show --last 1h --style compact --predicate 'subsystem == "com.seongjoo.SelectedTextTTS" AND category == "agent"'
33+
```
34+
35+
- `connect host=<앱 식별자|unverified> key=<키 ID 앞 12자> lookup=<trusted|unknown|revoked|host_changed> result=<상태>`: 재연결 때 앱을 알아봤는지와 결과. 승인한 앱이 재시작 후 `lookup=trusted result=ready`(또는 `receiving_only`)이면 재승인 없이 연결된 것입니다.
36+
- `approve host=… client=… scope=<persistent|this_run> result=ok|store_failed`: 승인. `this_run`은 앱을 식별할 수 없어 이번 실행에만 허용한 경우입니다.
37+
- `revoke host=… client=… result=ok|unsaved`: 승인 철회.
38+
2739
## 합성 데이터로 확인
2840

2941
`./build.sh test`로 기존 단위 테스트를 실행할 수 있습니다. `Tests/Fixtures/run_agent_app_connections.py`는 임시 서명과 저장소를 사용해 실제 stdio MCP, 수신 승인과 대본 보관을 검증합니다. 서명 도구와 테스트 전용 인증서·키의 경로는 스크립트의 `--help`를 확인하세요. 기존 수동 PID 승인 fixture는 PR #2 기준 동작을 검증합니다. 새 fixture는 설치 앱, 실제 에이전트 앱, 사용자 키체인과 재생을 사용하지 않습니다.

0 commit comments

Comments
 (0)