fix(refactor): address reviewer findings R-1..R-8, achieve 31/31 test pass

This commit is contained in:
2026-08-05 10:08:59 +09:00
parent 8dcb2b2d9e
commit ddd43ecbea
12 changed files with 684 additions and 58 deletions
@@ -455,7 +455,7 @@ run_agent() {
# the caller having exported HERDR_SERVER_NAME by hand. This is what lets
# delegation reach an agent living in an isolated herdr session (e.g. one
# created with --herdr-server) instead of silently looking in "default".
export HERDR_SERVER_NAME="$(resolve_herdr_workspace "$sess")"
export HERDR_SESSION_NAME="$(resolve_herdr_workspace "$sess" "$WORKDIR")"
if ! herdr has-session -t "$sess" 2>/dev/null; then
echo "ERROR: 에이전트 세션 '$sess'이 존재하지 않습니다. 작업을 위임하기 전에 먼저 에이전트 세션을 기동해 주세요." >&2
@@ -523,9 +523,9 @@ else:
# NOTE: `herdr session attach` operates on whole herdr *sessions* (server
# instances), not an individual agent by its MAM name — `agent attach` is
# the real command for that. HERDR_SERVER_NAME is inlined so the printed
# the real command for that. HERDR_SESSION_NAME is inlined so the printed
# command is copy-pasteable in a fresh shell that hasn't sourced lib.sh.
echo "작업이 세션 '$sess'에 전송되었습니다. (연결하려면: HERDR_SERVER_NAME=$HERDR_SERVER_NAME herdr agent attach $sess — lib.sh를 source한 셸에서 실행)"
echo "작업이 세션 '$sess'에 전송되었습니다. (연결하려면: HERDR_SESSION_NAME=$HERDR_SESSION_NAME herdr agent attach $sess — lib.sh를 source한 셸에서 실행)"
trap - EXIT
}