vault-sync: commit pending changes from Leonard session

This commit is contained in:
2026-09-13 11:46:28 -07:00
parent 8b26efd3b7
commit 1255434c1a
25 changed files with 409 additions and 57 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Zero-token vault change log
# Dumps raw git log to a file for agents to read
VAULT_DIR="/c/Users/fight/AgentOS/memory-systems/agent-os"
LOG_FILE="$VAULT_DIR/03_shared/vault-updates-log.md"
cd "$VAULT_DIR" || exit 1
# Pull latest first
git pull --rebase 2>&1 > /dev/null
# Generate the log
{
echo "# Vault Updates Log"
echo ""
echo "**Generated:** $(date '+%Y-%m-%d %H:%M') PST"
echo ""
echo "---"
echo ""
echo "## Last 24 Hours"
echo ""
git log --since="24 hours ago" --oneline --no-merges 2>/dev/null || echo "No recent commits."
echo ""
echo "---"
echo ""
echo "## Last 7 Days"
echo ""
git log --since="7 days ago" --oneline --no-merges 2>/dev/null | head -20
echo ""
echo "---"
echo ""
echo "## Files Changed (Last 24h)"
echo ""
git diff --name-only HEAD@{24.hours.ago} HEAD 2>/dev/null || echo "No recent file changes."
} > "$LOG_FILE"
echo "Vault change log updated: $LOG_FILE"
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Zero-token vault sync protocol
# Pulls latest, commits local changes, pushes to Gitea mirror
VAULT_DIR="/c/Users/fight/AgentOS/memory-systems/agent-os"
cd "$VAULT_DIR" || exit 1
echo "=== Vault Sync $(date '+%Y-%m-%d %H:%M') ==="
# 1. Pull latest from remote
echo "Pulling latest..."
git pull --rebase 2>&1 | tail -3
# 2. Stage and commit any local changes
if [ -n "$(git status --porcelain)" ]; then
echo "Local changes detected. Committing..."
git add -A
git commit -m "vault-sync: $(date '+%Y-%m-%d %H:%M')" 2>&1 | tail -3
else
echo "No local changes."
fi
# 3. Push to remote
echo "Pushing to Gitea..."
git push 2>&1 | tail -3
echo "=== Sync Complete ==="