2026-07-11 14:54:32 -07:00
|
|
|
#!/bin/sh
|
2026-07-13 15:05:05 -07:00
|
|
|
# Queue agent file reads for the hub's read heatmap: Read tool calls, the
|
|
|
|
|
# files Grep matches came from, and the files a Bash command names.
|
2026-07-11 14:54:32 -07:00
|
|
|
# `bdrive read-log` parses the hook's stdin JSON itself and only appends to
|
|
|
|
|
# a local spool (drained on the next sync) — no network, no locking, so this
|
2026-07-13 15:05:05 -07:00
|
|
|
# is safe to run on every matched tool call in every project. Fast no-op
|
|
|
|
|
# outside beardrive projects.
|
2026-07-11 14:54:32 -07:00
|
|
|
cd "${CLAUDE_PROJECT_DIR:-.}" || exit 0
|
|
|
|
|
[ -d .bdrive ] || exit 0
|
|
|
|
|
command -v bdrive >/dev/null 2>&1 || exit 0
|
|
|
|
|
bdrive read-log . >/dev/null 2>&1 || true
|