Align conftest mock herdr and unit test assertions with Claude's simplified session-based isolation and native herdr command updates

This commit is contained in:
2026-07-20 07:42:05 +09:00
parent cccc30a8ac
commit 6df4b03661
13 changed files with 312 additions and 115 deletions
@@ -67,9 +67,21 @@ while [ $# -gt 0 ]; do
*) echo "ERROR: unknown arg: $1" >&2; usage; exit 2 ;;
esac
done
if [ -n "$AGENT" ]; then
case "$AGENT" in
claude|agy|hermes|cline) ;;
*) echo "ERROR: invalid agent type '$AGENT'. Allowed types are: claude, agy, hermes, cline." >&2; exit 2 ;;
esac
fi
[ -n "$SESSION_NAME" ] || { echo "ERROR: --session required" >&2; usage; exit 2; }
[ -f "$AGENT_SESSIONS_YAML" ] || { echo "ERROR: $AGENT_SESSIONS_YAML not found" >&2; exit 1; }
# Implement the purging-<session> file lock mechanism
if [ "$PURGE" = "1" ]; then
touch "$WORKSPACE_ROOT/.mam/purging-$SESSION_NAME"
trap 'rm -f "$WORKSPACE_ROOT/.mam/purging-$SESSION_NAME"' EXIT
fi
HERDR_SERVER_NAME="$(resolve_herdr_workspace "$SESSION_NAME")"
export HERDR_SERVER_NAME