sync/search agent history (#40)

This commit is contained in:
Hari 2026-04-02 17:07:10 -04:00 committed by GitHub
parent 1860fa6dcb
commit 320ae1332e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 115 additions and 0 deletions

12
scripts/search-agent-history.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
remote="${AGENT_HISTORY_REMOTE:-netty}"
remote_root="${AGENT_HISTORY_REMOTE_ROOT:-/home/rathi/.local/share/agent-history/raw}"
initial_query="${1:-}"
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
remote_root_q="$(printf '%q' "$remote_root")"
initial_query_q="$(printf '%q' "$initial_query")"
ssh -t "$remote" "AGENT_HISTORY_ROOT=${remote_root_q} INITIAL_QUERY=${initial_query_q} bash -s" < "${script_dir}/search-agent-history-remote.sh"