Some checks failed
Architecture Lint / Linter Tests (pull_request) Successful in 28s
Smoke Test / smoke (pull_request) Failing after 23s
Validate Config / YAML Lint (pull_request) Failing after 11s
Validate Config / JSON Validate (pull_request) Successful in 13s
Validate Config / Python Syntax & Import Check (pull_request) Failing after 31s
Validate Config / Python Test Suite (pull_request) Has been skipped
Validate Config / Shell Script Lint (pull_request) Failing after 23s
Validate Config / Cron Syntax Check (pull_request) Successful in 5s
Validate Config / Deploy Script Dry Run (pull_request) Successful in 7s
Validate Config / Playbook Schema Validation (pull_request) Successful in 15s
Validate Training Data / validate (pull_request) Failing after 18s
PR Checklist / pr-checklist (pull_request) Failing after 3m57s
Architecture Lint / Lint Repository (pull_request) Failing after 15s
- Moved 3 actively-used custom agent modules to timmy-config/extensions/ - shield.py (crisis & jailbreak detection) - privacy_filter.py (PII stripping for remote API calls) - smart_model_routing.py (cheap vs strong model heuristic) - Updated deploy.sh to copy extensions/ to ~/.hermes/agent/ - Added comprehensive migration doc in docs/AGENT_EXTENSION_MIGRATION.md - Archived 16 dead/unused agent/*.py modules to agent/archive/ in hermes-agent This is SIDECAR-3 — restructure agent/* extensions as sidecar skills. Docs: Closes #339
106 lines
2.9 KiB
Bash
Executable File
106 lines
2.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# deploy.sh — Apply timmy-config as sidecar overlay onto ~/.hermes/
|
|
# This is the canonical way to deploy Timmy's configuration.
|
|
# Hermes-agent is the engine. timmy-config is the driver's seat.
|
|
#
|
|
# Usage: ./deploy.sh
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
HERMES_HOME="$HOME/.hermes"
|
|
TIMMY_HOME="$HOME/.timmy"
|
|
|
|
log() { echo "[deploy] $*"; }
|
|
|
|
# === Sanity checks ===
|
|
if [ ! -f "$SCRIPT_DIR/SOUL.md" ]; then
|
|
echo "ERROR: Run from timmy-config root" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# === Create directories ===
|
|
mkdir -p "$HERMES_HOME/bin"
|
|
mkdir -p "$HERMES_HOME/skins"
|
|
mkdir -p "$HERMES_HOME/playbooks"
|
|
mkdir -p "$HERMES_HOME/memories"
|
|
mkdir -p "$TIMMY_HOME"
|
|
|
|
# === Deploy SOUL ===
|
|
cp "$SCRIPT_DIR/SOUL.md" "$TIMMY_HOME/SOUL.md"
|
|
log "SOUL.md -> $TIMMY_HOME/"
|
|
|
|
# === Validate config before deploy ===
|
|
if command -v python3 &>/dev/null; then
|
|
log "Validating config files..."
|
|
if ! python3 "$SCRIPT_DIR/scripts/config_validator.py"; then
|
|
echo "ERROR: Config validation failed. Fix errors before deploying." >&2
|
|
exit 1
|
|
fi
|
|
log "Config validation passed."
|
|
else
|
|
log "WARNING: python3 not found, skipping config validation"
|
|
fi
|
|
|
|
# === Deploy config ===
|
|
cp "$SCRIPT_DIR/config.yaml" "$HERMES_HOME/config.yaml"
|
|
log "config.yaml -> $HERMES_HOME/"
|
|
|
|
# === Deploy channel directory ===
|
|
if [ -f "$SCRIPT_DIR/channel_directory.json" ]; then
|
|
cp "$SCRIPT_DIR/channel_directory.json" "$HERMES_HOME/channel_directory.json"
|
|
log "channel_directory.json -> $HERMES_HOME/"
|
|
fi
|
|
|
|
# === Deploy memories ===
|
|
for f in "$SCRIPT_DIR"/memories/*; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/memories/"
|
|
done
|
|
log "memories/ -> $HERMES_HOME/memories/"
|
|
|
|
# === Deploy skins ===
|
|
for f in "$SCRIPT_DIR"/skins/*; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/skins/"
|
|
done
|
|
log "skins/ -> $HERMES_HOME/skins/"
|
|
|
|
# === Deploy playbooks ===
|
|
for f in "$SCRIPT_DIR"/playbooks/*; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/playbooks/"
|
|
done
|
|
log "playbooks/ -> $HERMES_HOME/playbooks/"
|
|
|
|
# === Deploy cron ===
|
|
if [ -d "$SCRIPT_DIR/cron" ]; then
|
|
mkdir -p "$HERMES_HOME/cron"
|
|
for f in "$SCRIPT_DIR"/cron/*; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/cron/"
|
|
done
|
|
log "cron/ -> $HERMES_HOME/cron/"
|
|
fi
|
|
|
|
|
|
# === Deploy agent extensions (sidecar-provided agent modules) ===
|
|
if [ -d "$SCRIPT_DIR/extensions" ]; then
|
|
mkdir -p "$HERMES_HOME/agent"
|
|
for f in "$SCRIPT_DIR"/extensions/*.py; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/agent/"
|
|
done
|
|
log "extensions/ -> $HERMES_HOME/agent/ (sidecar extensions)"
|
|
fi
|
|
|
|
# === Deploy bin (operational scripts) ===
|
|
for f in "$SCRIPT_DIR"/bin/*; do
|
|
[ -f "$f" ] && cp "$f" "$HERMES_HOME/bin/"
|
|
done
|
|
chmod +x "$HERMES_HOME/bin/"*.sh "$HERMES_HOME/bin/"*.py 2>/dev/null || true
|
|
log "bin/ -> $HERMES_HOME/bin/"
|
|
|
|
if [ "${1:-}" != "" ]; then
|
|
echo "ERROR: deploy.sh no longer accepts legacy loop flags." >&2
|
|
echo "Deploy the sidecar only. Do not relaunch deprecated bash loops." >&2
|
|
exit 1
|
|
fi
|
|
|
|
log "Deploy complete. timmy-config applied to $HERMES_HOME/"
|