Files
bootstrap/templates/repo/scripts/agent/session-start.sh
2026-02-17 10:41:09 -06:00

20 lines
536 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=./common.sh
source "$SCRIPT_DIR/common.sh"
ensure_repo_root
load_repo_hooks
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 && has_remote; then
run_step "Pull latest changes" git pull --rebase
fi
if declare -F mosaic_hook_session_start >/dev/null 2>&1; then
run_step "Run repo start hook" mosaic_hook_session_start
else
echo "[agent-framework] No repo start hook configured (.mosaic/repo-hooks.sh)"
fi