Repository navigation
Open agent panes on the terminal and make the hook report reach Herdr - #93
Merged
Merged
Conversation
A new Claude or Codex pane showed the conversation ledger first and the operator had to switch to the terminal on every pane. The conversation set is now filled only by toggle_conversation and pruned when the pane leaves the session; the separate terminal set that existed to hold the default back is gone with it.
The hook helper shelled out to herdr pane report-metadata with the pane id after the options and hide-subagents@1 as the source. The pinned CLI refuses both, the helper swallowed the exit status, and every pane read as session_predates_install with restart advice that changed nothing. The report now goes through hide-herdr-client as pane.report_metadata, the pinned socket contract, under the source hide-subagents; a fake socket test asserts the request. A report that fails is written to ~/.hide/agent-hooks/last-report-failure.json, read back into the diagnosis, printed by doctor, carried on the snapshot, and shown in the Settings hook group above the restart advice, which the coordinator refreshes once a second while that tab is on screen.
1 task
yansfil
added a commit
that referenced
this pull request
Sep 18, 2026
…#99) ## Summary 에이전트 행이 무엇을 하는지(`summary`)가 아니라 누구인지(세션 이름)로 불리고, 둘째 줄은 상태가 고른 한 문장만 보인다. 사이드바 행, pane 헤더, ⌘K 검색 행, ⌃Tab Recent Panels 행, lineage chip, Overview 에이전트 줄이 전부 코어의 `identity_label` 하나를 쓴다. - 코어(`sidebar.rs`): ladder `name 토큰 → Herdr 에이전트 이름 → task → 워크스페이스 라벨`. `summary` 읽기와 `MISSING_SUMMARY`("Check agent-context-labels settings") 삭제. 둘째 줄은 그룹으로 정해(Needs You·안 본 Done = 상태 단어 + `expected_reply`(없으면 `progress`), Working = `progress`만, Seen = 없음) `detail`/`status_word_visible`로 내려보낸다. 에이전트 pane이 하나인 탭은 `StripTabSnapshot.agent_identity`를 얻는다. - 셸: `AgentRow`가 둘째 줄을 그리고(caption medium 상태색 단어 + caption regular 문장, tail truncation, 툴팁), `PaneHeaderTitle`은 `이름 · [단어] 문장` 한 줄을 `ViewThatFits`로 문장→단어 순서로 떨군다. `HideSearchView`는 정체성 제목 + 문장 부제(pane id는 매치·접근성에만), `RecentNavigation`은 한 에이전트 탭을 정체성 + 상태 마크로 그린다. - 플러그인(`agent-context-labels`): 세션 이름을 Claude Code의 `ai-title`(없으면 첫 Human 턴, `session_title_missing` 한 번 로그) 또는 Codex의 첫 Human 턴에서 한 번 정해 `agent.rename`(Herdr 규칙 `[a-z][a-z0-9_-]{0,31}`을 통과할 때) 또는 `name` 토큰으로 쓰고, 에이전트 하나뿐인 탭의 Herdr 생성형 라벨을 `tab.rename`한다. 두 번째 `pane.report_metadata`로 `name`/`progress`/`expected_reply`(40자 명령형)를 발행하고 재시작 시 상태 파일에서 다시 붙인다. 이름은 Herdr가 기록한 `agent_session`이 있는 pane에만 쓴다. - `hide-session`: `ai-title` 레코드를 `ParsedSession.title`로 파싱. - 문서·캔버스: `docs/status-model.md` 상태별 둘째 줄 표, DESIGN.md 행·헤더·검색·Recent 규칙, 플러그인 README "Session names", `design/hide.pen`의 Projects·Agent row states·Header states·Conversation·Search/Recent 보드. 아래 "Changed Paths"는 PRD base(b9d5d74) 기준 목록이라 사이에 머지된 main(#96, #97, #98)의 파일이 섞여 있다. 이 PR이 main에 더하는 diff는 45개 파일이다. ## Result - Claude Code pane은 첫 요청 뒤 세션이 스스로 지은 이름("README.md 생성")으로, Codex pane은 첫 요청 앞 30자로 불리고, 턴이 이어져도 제목이 움직이지 않는다. 탭 라벨도 같은 이름이 된다. - 답을 기다리는 행은 `Approval`/`Question` 단어와 사용자가 할 일 한 문장, 일하는 행은 회색 진행 문장만, 본 뒤 쉬는 행은 제목 한 줄이다. 문장이 없는 행은 예전처럼 상태 단어만 남고 둘째 줄이 통째로 비는 행은 없다. - pane 헤더는 `! ❋ 결제 멱등키 PR … · Approval A/B 중 하나를 선택하고 …` 한 줄이고, 좁아지면 문장, 그다음 단어가 빠진다. - 옛 플러그인(`summary` 발행)과 새 코어를 섞으면 제목은 Herdr 이름 또는 워크스페이스 라벨, 둘째 줄은 상태 단어만이다. 경고는 없다(B13). - 포함하지 않은 것: 라벨 생성 빈도·provider 선택·프롬프트의 task 판정은 그대로다. 프롬프트에서 바뀐 것은 `expected_reply`의 길이·어미뿐이다. 설치된 `/Applications/hide.app`과 운영자의 watcher는 이 PR이 바꾸지 않는다(업그레이드는 운용 후속). ## Screenshots / Demo 화면 증거 6장은 로컬 run 디렉터리(`agents/runs/agent-row-identity/evidence/live/`, 저장소 규칙상 커밋하지 않음)에 있고, 무엇이 보였는지는 아래 Evidence 섹션에 적었다. GitHub user-attachments 업로드는 브라우저 UI가 필요해 이 PR 본문에는 인라인 이미지가 없다. 이미지가 필요하면 그 디렉터리의 01~06을 이 섹션에 끌어다 놓으면 된다. ## Human Review Focus 증거가 이미 증명한 것: 코어 ladder·둘째 줄·헤더 문자열·검색·Recent(단위 테스트 + 라이브 스크린샷), 플러그인 이름 도출·소유권·두 번째 보고·재시작 재발행(단위 테스트 + 격리 서버에서 실제 Claude Code/Codex 세션으로 이름·탭 확인), 세 게이트 PASS. 사람이 판단할 것: - **문장 색 선택**: 강조 행 문장 `primary`, working 행 `secondary`. 실제 사이드바에서 두 회색이 구분되는지(D-07은 세 번째 회색을 버렸다). - **raised(prominent) 행의 둘째 줄 밀도**: 단어 + 40자 문장 + 프로젝트 qualifier(`hari-x`)가 한 줄에 놓여 문장이 먼저 잘린다(스크린샷 01). qualifier를 유지할지, 문장에 자리를 더 줄지. - **Codex 이름 규칙**: 첫 Human 턴 30자는 "이 폴더에 NOTES.md를 만들고 "codex…"처럼 요청문 그대로다. PRD D-02가 정한 규칙이지만 제목으로 읽히는지는 사용자가 볼 일이다. - **`agent_session` 없는 pane은 이름을 쓰지 않음**(PRD 밖의 추가 규칙): 같은 cwd의 이웃 세션 이름을 빌려 탭에 쓰는 것을 라이브에서 봤고, 그 pane은 자기 세션이 기록될 때까지 워크스페이스 라벨/`task`로 보인다. - **위험한 파일**: `plugins/agent-context-labels/src/lib.rs`의 `sync_names`(Herdr에 쓰는 유일한 경로: `agent.rename`, `tab.rename`)와 `report_if_changed`(보고 수만큼 revision을 미리 더해 자기 이벤트를 걸러내는 가정), `herdr-core/src/runtime.rs::sync_strip_agent_identity`(세 패스에서 호출). - **리뷰어에게 묻는 것**: 새 토큰 `Layout.paneHeaderSentenceMinWidth`(120pt)를 받을지. D-07의 "새 토큰 없음"은 행 타이포에 대한 말이었고, 헤더가 문장을 먼저 자르고(D-08) 그다음 떨구려면 최소 폭이 필요했다. ## Related - PRD: `agents/prd/agent-row-identity/prd.md` (run 중 한 번 amend: D-03 name-token fallback, D-15/D-16, B17/B18) - 선행 PR: #93(hook 보고 소켓 경로), #96(Scratch 제거, 이 PR의 ladder에서 chat title rung 제거), #98(upstream Herdr v0.9.1 pin) ## Risk surface - **Runtime mutex**: 새로 든 일은 `sync_strip_agent_identity`(strip 항목 × 탭 × 에이전트 walk)와 `token_text` 문자열 cut뿐. 서브프로세스·블로킹 I/O 없음. - **Snapshot wire**: `SidebarAgentSnapshot`에 `detail`, `status_word_visible`, `task` 추가, `summary` 제거; `PaneSnapshot.summary → identity_label`; `AgentChipSnapshot.detail: Option` + `status_word_visible`; `StripTabSnapshot.agent_identity`. 셸 디코더는 빠진 키를 기본값으로 읽는다(`status_word_visible` 없으면 `true`). - **Ownership**: 에이전트 이름·탭 라벨은 Herdr 소유. 플러그인이 위 소유권 규칙 안에서만 쓰고, 코어는 Recent Panels 표기를 위해 Herdr 라벨을 바꾸지 않고 파생만 한다. - **Herdr contract**: `agent.rename`, `tab.rename`, `tab.get`, `pane.report_metadata`, `agent.list`의 `name`/`tab_id`. 전부 `contracts/herdr-api.schema.json`(v0.9.1)에 있다. 에이전트 이름 패턴은 스키마에 없어 로컬 검사 + 서버 응답 두 겹으로 처리. - **Failure path**: 이름이 안 붙으면 행은 Herdr 이름/워크스페이스 라벨로 보이고 `agent_rename_failed`/`tab_rename_failed`/`session_title_missing`이 `events.jsonl`에 한 줄씩 남는다. - **High-frequency path**: 보고는 상태 토큰과 정체성 토큰을 따로 비교해 바뀐 쪽만 보내고, `reported_revisions`에 보고 수를 더해 자기 이벤트를 걸러낸다(`watcher_deduplicates_reports_and_its_own_revision_bump`). ## Evidence - **확인한 것**: `verify-cargo.sh test`(코어 542 + 플러그인 80 + hide-session·hide-agent-hooks 등 전 워크스페이스), `verify-swift.sh test` 470개, `verify-cargo.sh lint`(fmt + clippy -D warnings), `check-design-contract.mjs`(check-pen 포함) 모두 PASS at 2aee3c8. 라이브: 격리 Herdr 세션 `hari`에서 실제 Claude Code pane이 `ai-title` "README.md 생성"으로 `name` 토큰 + 탭 라벨을 얻고, 실제 Codex pane이 첫 턴 30자로 이름·탭 라벨을 얻는 것을 `herdr agent list`/`tab list`/`pane get`과 watcher `display-state.json`으로 확인. 스크린샷 6장: 사이드바 4상태(Approval 30자 이름·40자 문장 `…` 잘림, Done + progress, Done 단어만, working progress만), 헤더 한 줄, 3분할 좁은 헤더(문장·단어 탈락), ⌘K 시트와 pane id 매치, ⌃Tab Recent Panels. - **확인하지 못한 것과 그 이유**: 위 "Risks" 섹션의 (1)~(4). - **화면 증거**: 로컬 `agents/runs/agent-row-identity/evidence/live/01~06`. 저장소 규칙(evidence는 커밋 금지)으로 본문 인라인 없음. ## AI tooling - [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성 **손으로 확인한 것**: 스크린샷 01~06을 눈으로 대조(행 제목·둘째 줄·헤더·검색·Recent), `herdr agent list`/`tab list` 출력, 격리 watcher의 `events.jsonl`과 `display-state.json`, pen 보드 export 5장. ## Product And Scope Result - PRD: agents/prd/agent-row-identity/prd.md - Implementation state: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/state.json - Verification report: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/verification-report.json (status: PASS) - Verification summary: /Users/hoyeonlee/projects/herdr-ide.worktrees/agent-row-identity/agents/runs/agent-row-identity/verification-report.md ## Actual Tests - S1: GREEN - `bash scripts/verify-cargo.sh test` (cwd: ., exit 0) - S2: GREEN - `bash scripts/verify-swift.sh test` (cwd: ., exit 0) - S3: GREEN - `bash scripts/verify-cargo.sh lint` (cwd: ., exit 0) ## Actual Observations - agents/runs/agent-row-identity/evidence/live/01-sidebar-initial.png (screenshot, observed 2026-09-18T04:28:12.602Z, sha256 73582931994feff481d5254afe957961e83fb8430cb9c6ab02d62c8fcf7f3ab0): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/02-needs-you-pane-header.png (screenshot, observed 2026-09-18T04:28:12.917Z, sha256 698ff1475dd0d20c422960a2c7c6b0d0ba80b32e813abe29cdf0dbf20c5e4780): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/03-narrow-header-crop.png (screenshot, observed 2026-09-18T04:28:13.234Z, sha256 899051a96f00e5d8f8ee195198abe1b636bb1eb7874fac8e55f885db6be0e084): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture, cropped to the header band with PIL - agents/runs/agent-row-identity/evidence/live/04-search-sheet.png (screenshot, observed 2026-09-18T04:28:13.523Z, sha256 76f3840c7df9978bd8b8746b8d90f80427f18304d66ad22853518b01e98ee97d): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture - agents/runs/agent-row-identity/evidence/live/05-search-by-pane-id-crop.png (screenshot, observed 2026-09-18T04:28:13.818Z, sha256 399c2ecc3dffb2b0dc62ad92988cc7e3bf6ff7b2a07a44774272e4e151670e54): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture, cropped to the sheet with PIL - agents/runs/agent-row-identity/evidence/live/06-recent-panels-crop.png (screenshot, observed 2026-09-18T04:28:14.121Z, sha256 7771256042ce06c6896803feac969bfb4871c5a2b2b0dd6fb2d51727e71bb564): screencapture -l <window id> of the hide (agent-row-identity) window, background exact-window capture while ctrl+tab was held via peekaboo press --hold, cropped with PIL - agents/runs/agent-row-identity/evidence/live/herdr-state.log (log, observed 2026-09-18T04:28:15.617Z, sha256 2c4fe7bb4b897853b5d86bb02f07bcbaf0d79bef746ca0f024ce28fb048278fb): herdr CLI under /tmp/hari-x/env.sh; cat of the isolated watcher state - agents/runs/agent-row-identity/evidence/gates/cargo-test.log (log, observed 2026-09-18T04:28:17.090Z, sha256 6b9953ab9c3d8797ee963e96382f13e174e3c604e0e585f08bcbc9dac45e84e5): bash scripts/verify-cargo.sh test - agents/runs/agent-row-identity/evidence/gates/cargo-lint.log (log, observed 2026-09-18T04:28:17.603Z, sha256 c695fa3ae25298a42b490b722118b836bb69f07ffb81b939f61084a140554dfd): bash scripts/verify-cargo.sh lint - agents/runs/agent-row-identity/evidence/gates/swift-test.log (log, observed 2026-09-18T04:28:18.076Z, sha256 a0c5fc2fa5d4dd91094e74a4cf298917b387e3f6efa00473afea5f3bf4c7e6db): bash scripts/verify-swift.sh test - agents/runs/agent-row-identity/evidence/design/qZcwf.png (image, observed 2026-09-18T04:28:18.436Z, sha256 fce451d7a31a96d3582ce0e65a922312d3fcecba1a2ff9149305ea087cb8ae35): pen interactive Export of node qZcwf - agents/runs/agent-row-identity/evidence/design/arb009.png (image, observed 2026-09-18T04:28:19.739Z, sha256 0806cbded3cd3db2b164eb2621b68667672d43b592bf142497625f7683301a14): pen interactive Export of node arb009 - agents/runs/agent-row-identity/evidence/design/dexoX.png (image, observed 2026-09-18T04:28:21.290Z, sha256 05e964485f2f875a6f782699c3ee4d90d5fb0d83c408740e7f7cc08bbe4797ad): pen interactive Export of node dexoX - agents/runs/agent-row-identity/evidence/design/acv-needs-you.png (image, observed 2026-09-18T04:28:21.838Z, sha256 c89cab23db8558d8841406bf9fbc89a9de6400e21db9f48eb31647c8e9177345): pen interactive Export of node acv-needs-you ## Deterministic Verification - Deterministic verification: PASS - PRD SHA: 5de3593a471b2959bc92ba7baa7c99dfc677485258ba77f4e2ac0c4784472645 - Base SHA: b9d5d74 - Head SHA: 2aee3c8 - Source fingerprint: 1cc177273dadea5bbc4da3f49acbd3c34c11fcdcd1dd509ca8be2481e20b9536 - Generated: 2026-09-18T05:02:47.302Z - Agent reviews are visible advisory notes produced by native runtime subagents. ## Agent Review: Fix Now - Code review: `hide-agent-hooks/src/report.rs` 테스트가 `/tmp`에 소켓 디렉터리를 남김. 9977880에서 소켓 파일과 디렉터리를 지우도록 고침(같은 커밋에서 `CoreAgentChip` 편의 init의 `statusWordVisible` 기본값을 디코더와 같은 `true`로 맞추고, `HideSearchView.agentSubtitle`의 겹친 doc comment 정리). - Fidelity review: Fix now 없음. B15를 PARTIAL로 판정한 근거("30/40자 잘림이 보이지 않음")는 계수 오류다: 스크린샷 01의 이름 토큰은 정확히 30자, `expected_reply`는 정확히 40자(`len()`으로 재고 발행)이며 둘 다 `…`로 잘려 보인다. ## Agent Review: Follow-up Improvements - `report_if_changed`가 보고 수(0~2)만큼 revision을 미리 더한다. Herdr가 내용이 바뀐 보고마다 revision을 정확히 1 올린다는 가정이며, 어긋나면 불필요한 full `process()`가 한 번 더 도는 정도(멱등)다. 고정 Herdr 계약으로 이 의미를 확인하는 것이 후속. - `sync_strip_agent_identity`가 상태·strip 재구성·lineage 세 패스에서 각각 돈다. pane·tab 수에 비례하는 작은 walk지만 한 사이클에 두 번 겹칠 수 있다. - 격리 watcher 재시작 직후 `herdr_subscription_lost`(cursor=0, event_gap)가 수십 번 반복되고 나서 resume됐다. 이 PR과 무관한 기존 재구독 동작이지만 로그 소음이 크다. - pen 캔버스 master `HXWFK`에 raised 행의 trailing qualifier 슬롯이 없어 Projects 보드 행은 qualifier를 생략했다. 검색 시트·Recent Panels의 `Screen /` 보드는 없어서 Component spec 보드만 갱신했다. - 라이브 확인은 당시 pin이던 fork preview(0.9.0-preview) 서버에서 했다. 머지된 main은 upstream v0.9.1을 pin하며, 플러그인이 쓰는 `agent.rename`/`tab.rename`/`tab.get`/`agent.list`의 `name`·`tab_id`는 v0.9.1 스키마에 있다. v0.9.1 서버에서 이름 거부(`invalid_agent_name`)와 토큰 null 클리어 동작을 한 번 더 보는 것이 후속. - 라이브에서 본 관찰: raised 행에서 문장이 qualifier에 밀려 일찍 잘린다(위 Review focus). - Code review 2차(9977880, d262130 머지): Fix now 없음. `MAX_SESSION_NAME_CHARS`(80)가 Claude Code `ai-title`에만 적용되고 첫 턴 기반 이름은 `normalize_task`의 30자 예산을 따른다는 점을 doc comment에 적음(2aee3c8). ## Delivery Staging - Mode: unknown - Branch: unknown - Base: main - Staging include: default allowlist - Staging exclude: default volatile paths ## Changed Paths Planned For This PR - AGENTS.md - DESIGN.md - README.md - contracts/README.md - contracts/herdr-api.schema.json - design/hide.pen - docs/ARCHITECTURE.md - docs/INSTALL.md - docs/README.md - docs/status-model.md - docs/verification-fixtures.md - herdr-core/src/fork.rs - herdr-core/src/lib.rs - herdr-core/src/live.rs - herdr-core/src/model.rs - herdr-core/src/persistence.rs - herdr-core/src/pet.rs - herdr-core/src/project_context.rs - herdr-core/src/remote.rs - herdr-core/src/runtime.rs - herdr-core/src/runtime/agents.rs - herdr-core/src/runtime/editor.rs - herdr-core/src/runtime/events.rs - herdr-core/src/runtime/session.rs - herdr-core/src/runtime/terminal.rs - herdr-core/src/runtime/tests.rs - herdr-core/src/runtime/tests/agents_settings_remote.rs - herdr-core/src/runtime/tests/lineage.rs - herdr-core/src/runtime/tests/projects.rs - herdr-core/src/runtime/tests/session_navigation.rs - herdr-core/src/scratch.rs - herdr-core/src/session_sync.rs - herdr-core/src/session_sync/coordinator.rs - herdr-core/src/session_sync/projection.rs - herdr-core/src/session_sync/replica.rs - herdr-core/src/session_sync/subscription.rs - herdr-core/src/session_sync/tests.rs - herdr-core/src/sidebar.rs - herdr-core/src/wire.rs - herdr-core/src/worktree_control.rs - herdr-core/tests/fixtures/agent-created.json - hide-agent-hooks/src/report.rs - hide-herdr-client/src/lib.rs - hide-session/src/lib.rs - macos/Resources/THIRD_PARTY_NOTICES/herdr-APACHE-2.0.txt - macos/Sources/HerdrMacOS/AgentBadge.swift - macos/Sources/HerdrMacOS/AgentRow.swift - macos/Sources/HerdrMacOS/ChatComposer.swift - macos/Sources/HerdrMacOS/ChatComposerSheet.swift - macos/Sources/HerdrMacOS/CheckoutOverview.swift - macos/Sources/HerdrMacOS/CoreBridge.swift - macos/Sources/HerdrMacOS/CoreBridgeDispatchPolicy.swift - macos/Sources/HerdrMacOS/CoreBridgeSnapshot.swift - macos/Sources/HerdrMacOS/CoreBridgeWorkspaceSnapshot.swift - macos/Sources/HerdrMacOS/HerdrApp.swift - macos/Sources/HerdrMacOS/HideHintState.swift - macos/Sources/HerdrMacOS/HideSearchView.swift - macos/Sources/HerdrMacOS/HideSettings.swift - macos/Sources/HerdrMacOS/HideSidebar.swift - macos/Sources/HerdrMacOS/HideTheme.swift - macos/Sources/HerdrMacOS/OverviewPresentation.swift - macos/Sources/HerdrMacOS/PaneLineageHeader.swift - macos/Sources/HerdrMacOS/PetDashboardProjection.swift - macos/Sources/HerdrMacOS/PetView.swift - macos/Sources/HerdrMacOS/PetWindow.swift - macos/Sources/HerdrMacOS/RecentNavigation.swift - macos/Sources/HerdrMacOS/Resources/herdr-bundle.json - macos/Sources/HerdrMacOS/RuntimeEnvironment.swift - macos/Sources/HerdrMacOS/ShellMenuCommand.swift - macos/Sources/HerdrMacOS/ShellModel.swift - macos/Sources/HerdrMacOS/ShellModelNavigation.swift - macos/Sources/HerdrMacOS/ShellRootView.swift - macos/Sources/HerdrMacOS/ShellView.swift - macos/Sources/HerdrMacOS/SidebarGrouping.swift - macos/Sources/HerdrMacOS/WorktreeTasks.swift - macos/Tests/HerdrMacOSTests/ChatComposerTests.swift - macos/Tests/HerdrMacOSTests/ChatLaunchFailureTests.swift - macos/Tests/HerdrMacOSTests/CoreDispatchRoutingPolicyTests.swift - macos/Tests/HerdrMacOSTests/FocusedTabPresentationTests.swift - macos/Tests/HerdrMacOSTests/GitWorktreesPresentationTests.swift - macos/Tests/HerdrMacOSTests/HideHintTests.swift - macos/Tests/HerdrMacOSTests/HideSearchPresentationTests.swift - macos/Tests/HerdrMacOSTests/LineageDecodeTests.swift - macos/Tests/HerdrMacOSTests/OperationalPolicyTests.swift - macos/Tests/HerdrMacOSTests/PaneHeaderControlsTests.swift - macos/Tests/HerdrMacOSTests/PaneLineagePresentationTests.swift - macos/Tests/HerdrMacOSTests/PaneShortcutSettingsTests.swift - macos/Tests/HerdrMacOSTests/PetDashboardProjectionTests.swift - macos/Tests/HerdrMacOSTests/RecentNavigationIntegrationTests.swift - macos/Tests/HerdrMacOSTests/SidebarGroupingTests.swift - macos/Tests/HerdrMacOSTests/SidebarPresentationTests.swift - macos/Tests/HerdrMacOSTests/WorktreeTaskTests.swift - plugins/agent-context-labels/AGENTS.md - plugins/agent-context-labels/README.md - plugins/agent-context-labels/scripts/verify-runtime.sh - plugins/agent-context-labels/src/context_label.rs - plugins/agent-context-labels/src/lib.rs - plugins/agent-context-labels/src/tests.rs - scripts/check-core-bridge-structure.py - scripts/check-hide-accessibility.mjs - scripts/check-hide-copy.mjs - scripts/design-control-policy.json - scripts/pen-token-map.json - scripts/probe-typed-live-remote.py - scripts/scratch-verification-fixture.sh ## Risks, Rollback, And Human Review - **Breaking change**: 코어가 `summary` 토큰을 더 읽지 않는다. 운영자의 watcher가 옛 플러그인이면 행 제목은 Herdr 이름/워크스페이스 라벨, 둘째 줄은 상태 단어만이다(B13, 경고 없음). 플러그인 clone을 갱신하고 watcher를 재시작하면 이름·문장이 붙는다. `display-state.json`의 새 필드는 `serde(default)`라 옛 상태 파일이 그대로 읽힌다. 프롬프트 스키마 버전은 `context_label.v3`. - **Herdr에 쓰는 새 경로**: 플러그인이 `agent.rename`과 `tab.rename`을 호출한다. 소유권 규칙(이름 없는 에이전트 또는 플러그인이 마지막에 쓴 이름, Herdr 생성형 라벨 또는 플러그인이 쓴 라벨, 에이전트 하나인 탭)을 벗어나면 쓰지 않고, 실패는 `agent_rename_failed`/`tab_rename_failed` 한 줄 로그 후 재시도 없음. - **Rollback**: 이 PR을 revert하면 코어는 `summary`를 다시 읽고 플러그인은 세 토큰을 발행하지 않는다. 이미 바뀐 Herdr 에이전트 이름과 탭 라벨은 Herdr 세션 상태에 남는다(`herdr agent rename`/`herdr tab rename`으로 되돌릴 수 있다). - **확인하지 못한 것**: (1) 설치된 `/Applications/hide.app`을 교체한 확인은 하지 않았다(운영자 앱·서버·watcher를 건드리지 않는 규칙). 워크트리 번들(`me.grab.hide.agent-row-identity`)을 격리 Herdr 서버와 격리 watcher(HOME 분리, 자동 요약 끔)에 붙여 확인했다. (2) 질문·working 행의 `progress`/`expected_reply`는 provider 분석을 끈 상태라 플러그인이 쓰는 토큰 이름으로 손으로 발행해 화면을 확인했고, 실제 provider 응답 → 40자 cut은 단위 테스트로만 확인했다. (3) upstream v0.9.1 서버에서의 라이브 재확인(위 후속). (4) 닫힌 pane의 `tab_agent_counts`·상태 정리는 기존 pane 수명 경로를 따르며 별도 라이브 확인은 없다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
두 가지를 고칩니다.
sync_conversation_modes가 모든 Claude/Codex pane을conversation_pane_ids에 자동으로 넣고 있었습니다. 이제 이 집합은toggle_conversation으로만 채워지고, pane이 세션에서 사라지면 같이 빠집니다. 기본값을 붙잡아 두려고 있던terminal_pane_ids는 존재 이유가 없어져 제거했습니다.pane.report-metadata호출이 한 번도 성공한 적이 없던 버그를 고칩니다. 헬퍼는herdr pane report-metadata --source hide-subagents@1 --token ... <pane_id>순서로 CLI를 호출했는데, pinned herdr 0.9.0-preview는 (a) pane id가 옵션 뒤에 오면unknown option으로 exit 2, (b) 순서를 고쳐도 source의@를invalid_metadata_source로 거부합니다. 헬퍼는 실패를 삼키도록 되어 있어서 모든 pane이session_predates_install(?마크, "Restart the agent")로 읽혔고, 재시작해도 달라지지 않았습니다.hide-herdr-client를 통해 socket 메서드pane.report_metadata로 갑니다(context-labels 플러그인과 같은 경로, 계약 스키마가 pin하는 메서드). source는hide-subagents(버전은hide_hooks토큰이 이미 실어 나름).~/.hide/agent-hooks/last-report-failure.json에 기록하고(성공 시 삭제),doctor가Last report failed:줄로 출력하며, Settings의 Subagent visibility 그룹이 재시작 안내 위에 오류 노트로 보여 줍니다. Settings agents 탭이 열려 있는 동안만 coordinator가 1초에 한 번 진단을 다시 읽습니다.Related
agents/prd/agent-conversation-viewer/prd.md의 D-05/B4(Conversation 기본값)는 이 PR로 뒤집힙니다.docs/ARCHITECTURE.md에 현재 계약을 적었습니다.Review focus
AGENTS.md는 스크립트에는 CLI를 권하지만, 이 헬퍼는 컴파일된 바이너리이고 CLI 인자 문법은 저장소의 어떤 검사에도 걸리지 않는 반면 socket 메서드는check-herdr-contract.sh가 pin합니다. 원래 PRD D-08/D-27/D-33("이 crate는 socket을 만지지 않는다")에서 벗어나는 지점입니다.hide-agent-hooks/src/report.rs(hook은 agent 턴 안에서 돌므로 2초 timeout이 상한),herdr-core/src/session_sync/coordinator.rs(1초 주기 재읽기가 Settings 열림에만 묶여 있는지).Risk surface
ingest_hook_diagnosis만 잠금 안에서 돕니다. hook helper는 별도 프로세스.status.agent_hooks.last_report_failure: Option<String>한 필드 추가(revisioned snapshot). Swift는decodeIfPresent.pane.report_metadata는contracts/herdr-api.schema.json에 있는 메서드. source 문자 제한은 스키마에 없고 서버 규칙이라report::tests가 상수를 그 규칙으로 검사합니다.doctor한 줄 + Settings 오류 노트. hook은 여전히 exit 0.herdrCLI)가 socket 요청 1개로 바뀜. Settings가 열려 있을 때만 1초당 파일 읽기 3개.Evidence
verify-cargo.sh lint/test: 통과. core lib 559개(첫 실행에서worktree_control테스트 1개가 load flake로 실패, 단독 및 재실행 통과).hide-agent-hooks32개(가짜 socket에 보낸 요청이 정확히{"method":"pane.report_metadata","params":{"pane_id","source":"hide-subagents","tokens":{...}}}인지, 실패 기록/성공 시 삭제, 깨진 기록 파일이 "실패 없음"으로 읽히지 않는지).verify-swift.sh test: 465개 통과.check-*.sh9개,check-design-contract.mjs,check-core-bridge-structure.py통과.herdr agent list토큰이hide_hooks=1, working 0→1→2→1→0, done 0→0→0→1→1로 변함. 같은 pane에 설치된 구 바이너리를 실행하면 토큰이 남지 않음(재현).doctor가Last report failed: ... connect failed ...출력, 다음 성공에서 파일 삭제.HERDR_SESSION=hpt,/tmp/hpt.sock, 전용 XDG/config,--state-path,--verification-no-remote) + 워크트리 dev 번들: 실제claudeagent pane을 만들고 앱을 띄움. (1) pane이 터미널로 열리고 header 버튼은 "Show conversation" 상태,?마크 표시. (2) 새 hook 실행 후?사라지고 chip이1/0. (3) 잘못된 socket으로 hook 실행 → Settings › Agents › Subagent visibility에 빨간 노트 "The hook could not report to Herdr at /tmp/hpt-gone.sock for pane w1:p2 on Stop: connect failed ..." 표시, 성공 보고 후 3초 안에 노트 사라짐(accessibility 트리로 확인). 캡처는agents/runs/agent-pane-terminal-default-and-hook-report/0[1-9]-*.png(로컬)./Applications/hide.app의 hook 항목이 새 바이너리를 가리키게 되는 것은 앱을 재설치해야 생기는 일이라 이 PR 범위 밖. 실제 Claude 세션이 hook 이벤트를 통해(손으로가 아니라) 새 바이너리를 호출하는 경로는 재설치 후 확인 필요. Codex runtime은 동일 코드 경로라 손으로만 확인.AI tooling
손으로 확인한 것: 위 Evidence의 실제 Herdr 토큰 변화와 격리 앱 캡처 3장을 직접 대조.