feat: install herdr agent integrations after the install pipeline

herdr hook files are herdr-managed, so none is committed. The installer ends
by running `herdr integration install <agent>` for each of claude, codex, pi
and omp that is present, skipping any herdr already reports current and
saying nothing when herdr is absent. Seal and fake learn herdr; tests and two
mutations cover install, idempotence, failure and absence (G-AG-5).
This commit is contained in:
bcherb2 committed 2026-11-18 02:13:05 -05:00
1 parent f8b17a79d3
commit 4e2452e994
6 files changed
+92 -1

No files matched your search

+30
View File
@@ -784,6 +784,36 @@ is "darwin: …after asking for sudo, which NONINTERACTIVE cannot" "yes" \
[ -n "$a" ] && [ -n "$b" ] && [ "$a" -lt "$b" ] && echo yes || echo "no [$a/$b]")"
hasnt "darwin: no apt prerequisites on a machine with no apt" "apt-get" "$dry"
printf '\n\033[1mherdr installs its own agent integrations\033[0m\n'
# G-AG-5: herdr's hook files say "managed by herdr", so none is committed and
# herdr writes them. One per agent that is actually present, none for one
# herdr already reports current, and silence on a box with no herdr at all.
newbox; sh ./seal.sh "$SB/seal" --with herdr claude codex >/dev/null; BOXPATH=$SB/seal
BOXENV='FAKE_HERDR_CURRENT=codex'; pick core/ripgrep
out=$(box install 2>&1 | plain || true)
is "herdr installs the claude integration" "1" \
"$(grep -c '^herdr integration install claude$' "$LOG" || true)"
is "…but not one herdr reports current" "0" \
"$(grep -c '^herdr integration install codex' "$LOG" || true)"
is "…nor one for an agent that is not here" "0" \
"$(grep -cE '^herdr integration install (pi|omp)' "$LOG" || true)"
: > "$LOG"; BOXENV='FAKE_HERDR_CURRENT=claude codex'
out=$(box install 2>&1 | plain || true)
is "a second run installs nothing" "0" \
"$(grep -c '^herdr integration install' "$LOG" || true)"
hasnt "…and prints no herdr section" "herdr integrations" "$out"
BOXENV='FAKE_FAIL=herdr:install'
out=$(box install 2>&1 | plain || true)
has "a failed integration is named" "herdr integration install claude failed" "$out"
newbox; sh ./seal.sh "$SB/seal" --with claude codex >/dev/null; BOXPATH=$SB/seal
if grep -q '^herdr ' "$SB/seal/.shadowed" 2>/dev/null; then
printf ' \033[33mskip\033[0m herdr sits at an absolute path find_tool probes\n'
else
pick core/ripgrep
out=$(box install 2>&1 | plain || true)
hasnt "with no herdr the step says nothing" "herdr" "$out"
fi
printf '\n\033[1mclaude desktop trusts only Anthropic'"'"'s key\033[0m\n'
# A vendor apt repository is a key apt will trust for root-installed packages,
# so the key is checked against the published fingerprint before it is placed.