* perf(cli): use git ls-remote in refresh-marketplace --check (~8s -> ~1s)
The SessionStart hook fires agnes refresh-marketplace --check on every
Claude Code session in every workspace. The detector used to run git
fetch origin against the per-user marketplace bare repo just to update
FETCH_HEAD for a HEAD-vs-FETCH_HEAD comparison — paying the full git
object/metadata download (~8s) even on the (overwhelming) no-change
path.
Replace with git ls-remote origin HEAD: one HTTPS round-trip, one line
of text, no objects transferred. Compare the returned SHA against local
HEAD via the new _remote_head_sha and _local_head_sha helpers; emit the
/update-agnes-plugins hook JSON on mismatch, silent on match. Same PAT
wiring (AGNES_TOKEN in env, never on argv), same exit-code contract
(remote-read failure -> exit 1 so the hook's || true swallows it).
The default and --bootstrap paths still do real git fetch + reset --hard
— they need the objects.
* docs(cli): update --check help text to mention git ls-remote, not git fetch
Followup to the previous commit — the --check flag's user-facing help
string still described the old + FETCH_HEAD comparison.
Updated to match the new ls-remote-based implementation.
---------
Co-authored-by: Minas Arustamyan <arustamyan.minas@gmail.com>