feat(cli,registry): introduce --herdr-workspace option and decouple socket fallback chains

This commit is contained in:
2026-08-24 12:50:09 +09:00
parent 320f036575
commit e6e70dbb21
17 changed files with 1670 additions and 47 deletions
@@ -40,7 +40,7 @@ fi
# Source EARLY (before any herdr usage in run_agent) — this is what turns
# plain `herdr` into the tmux-compat shim (herdr() function) and provides
# resolve_herdr_workspace/send_keys_safe. Sourcing it late meant the
# resolve_herdr_session/send_keys_safe. Sourcing it late meant the
# has-session pre-flight check below used to hit the real herdr binary with
# a nonexistent subcommand and always fail.
source "$SCRIPT_DIR/../lib.sh"
@@ -463,7 +463,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_SESSION_NAME="$(resolve_herdr_workspace "$sess" "$WORKDIR")"
export HERDR_SESSION_NAME="$(resolve_herdr_session "$sess" "$WORKDIR")"
if ! herdr has-session -t "$sess" 2>/dev/null; then
echo "ERROR: 에이전트 세션 '$sess'이 존재하지 않습니다. 작업을 위임하기 전에 먼저 에이전트 세션을 기동해 주세요." >&2