Orion vault — clean initial history

Knowledge vault (Orion/PARA) migrated from the pre-Orion 484vault on
2026-10-01. Deliberately orphaned: prior history contained a plaintext
password and stays local-only on branch archive/pre-boilerplate-history.
Secrets and live Hermes state are gitignored.
This commit is contained in:
Avi 2026-10-02 08:34:04 -05:00
commit a66996ac10
233 changed files with 103810 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Deterministic release watcher for the monitor:
# prints ONLY the latest release tag (or the API error body if GitHub is down).
# No timestamps, no fluctuating fields -> ticks skip the agent unless the tag changes.
loc=$(curl -sI --max-time 15 https://github.com/NousResearch/hermes-agent/releases/latest \
| grep -i '^location:' | head -1 | sed -E 's|.*/tag/([^[:space:]]+).*|\1|' | tr -d '\r')
if [ -n "$loc" ]; then
printf 'HERMES_RELEASE=%s\n' "$loc"
else
# fallback: GitHub API (rate-limited, but only used when the redirect fails)
curl -s --max-time 15 https://api.github.com/repos/NousResearch/hermes-agent/releases/latest \
| grep -m1 '"tag_name"' | sed -E 's/.*"tag_name": *"([^"]+)".*/\1/' | sed 's/^/HERMES_RELEASE=/'
fi

View file

@ -0,0 +1,91 @@
#!/usr/bin/env python3
"""Regenerate the Obsidian skills index from ~/.hermes/skills/.
Reads every SKILL.md's YAML frontmatter (name/description) and rewrites
03-SKILLS/Knowledge Vault Skills Index.md. Machine-generated: hand edits
are overwritten on the next run (hourly via vault-sync.sh).
"""
import datetime
import pathlib
import re
import sys
SKILLS_DIR = pathlib.Path.home() / ".hermes/skills"
OUT = pathlib.Path("/home/avi/Orion/03-SKILLS/Knowledge Vault Skills Index.md")
FM_RE = re.compile(r"^---\s*\n(.*?)\n---", re.S)
def frontmatter(text: str) -> dict:
m = FM_RE.match(text)
if not m:
return {}
fm = {}
current_key = None
for line in m.group(1).splitlines():
kv = re.match(r"^([A-Za-z0-9_-]+):\s*(.*)$", line)
if kv:
current_key, val = kv.group(1), kv.group(2).strip()
fm[current_key] = val
elif current_key and line.strip().startswith(("-", "|", ">", '"')):
# multi-line value continuation; keep it simple — append
fm[current_key] = (fm[current_key] + " " + line.strip(" -|>\"")).strip()
elif current_key and line.startswith((" ", "\t")):
fm[current_key] = (fm[current_key] + " " + line.strip()).strip()
return fm
def main() -> int:
if not SKILLS_DIR.is_dir():
print(f"skills-index: no skills dir at {SKILLS_DIR}", file=sys.stderr)
return 1
rows = []
for skill_md in SKILLS_DIR.rglob("SKILL.md"):
rel = skill_md.parent.relative_to(SKILLS_DIR)
category = rel.parent.as_posix() if str(rel.parent) != "." else "general"
try:
fm = frontmatter(skill_md.read_text(encoding="utf-8", errors="replace"))
except OSError as e:
print(f"skills-index: read failed {skill_md}: {e}", file=sys.stderr)
continue
name = fm.get("name") or skill_md.parent.name
desc = fm.get("description", "").strip("\"'")
# truncate long descriptions; Obsidian table cells stay readable
if len(desc) > 160:
desc = desc[:157].rsplit(" ", 1)[0] + "…"
# first 57 chars double as the trigger line
rows.append((category, name, desc, rel.as_posix()))
rows.sort()
now = datetime.datetime.now().astimezone()
lines = [
"---",
f"last-updated: {now.isoformat(timespec='seconds')}",
"index-version: 2.0",
f"skills-count: {len(rows)}",
"generated: true",
"---",
"# Hermes Skills Index — Capability Catalog",
"",
"> **Purpose:** registry of every skill available to Hermes on this machine.",
"> **Machine-generated** by `~/.hermes/scripts/skills-index.py` (runs hourly",
"> inside `vault-sync.sh`). Do not hand-edit — edits are overwritten.",
"> Full skill text lives in `03-SKILLS/hermes-skills/<path>/SKILL.md`.",
"",
f"_Skills: **{len(rows)}** across **{len({r[0] for r in rows})}** categories._",
"",
]
cur = None
for category, name, desc, path in rows:
if category != cur:
cur = category
lines += ["", f"## {category}", "", "| Skill | Description | Path |",
"|---|---|---|"]
lines.append(f"| `{name}` | {desc} | [[hermes-skills/{path}/SKILL\\|SKILL.md]] |")
lines.append("")
OUT.write_text("\n".join(lines), encoding="utf-8")
return 0
if __name__ == "__main__":
sys.exit(main())

View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Mirror Hermes state into the Orion disaster-recovery location.
# Prints nothing on success (cron: no notification); prints errors only.
set -u
VAULT="/home/avi/Orion"
ERRS=""
H="$VAULT/2. Areas/Home Personal/knowledge/hermes"
# 1. Skills -> 03-SKILLS/hermes-skills/
rsync -a --delete ~/.hermes/skills/ "$VAULT/03-SKILLS/hermes-skills/" || ERRS="skills rsync failed"
# 1b. Rebuild the curated skills index from the mirrored SKILL.md frontmatter
python3 ~/.hermes/scripts/skills-index.py >/dev/null 2>/tmp/skills-index.err || ERRS="${ERRS} skills-index failed: $(head -c200 /tmp/skills-index.err)"
# 2. Automation scripts + cron job definitions -> 04-SYSTEMS/hermes-automation/
mkdir -p "$H/hermes-automation"
rsync -a --delete ~/.hermes/scripts/ "$H/hermes-automation/scripts/" || ERRS="${ERRS} scripts-sync failed"
cp ~/.hermes/cron/jobs.json "$H/hermes-automation/cron-jobs.json" 2>&1 || ERRS="${ERRS} cron-jobs-copy failed"
# 3. Legacy memories + config -> 04-SYSTEMS/hermes-memory/
cp ~/.hermes/memories/MEMORY.md ~/.hermes/memories/USER.md "$H/hermes-memory/" 2>&1 || ERRS="${ERRS} memory-copy failed"
cp ~/.hermes/config.yaml "$H/hermes-config.yaml" 2>&1 || ERRS="${ERRS} config-copy failed"
# 4. Mnemosyne DB (hot backup, WAL-safe) + last JSON export -> 04-SYSTEMS/hermes-memory/
SQLITE=/home/avi/.local/android-sdk/platform-tools/sqlite3
if [ -x "$SQLITE" ]; then
"$SQLITE" "/home/avi/.hermes/mnemosyne/data/mnemosyne.db" ".backup '$H/hermes-memory/mnemosyne.db'" 2>&1 || ERRS="${ERRS} db-backup failed"
fi
# 5. Timestamp for the agent pass to know what's new since last sync
date -Iseconds > "$H/hermes-memory/.last-sync"
[ -n "$ERRS" ] && echo "VAULT SYNC ERRORS: $ERRS"
exit 0

View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
# Mirror Hermes state into the 484vault disaster-recovery location.
# Prints nothing on success (cron: no notification); prints errors only.
set -u
VAULT="/home/avi/484vault"
ERRS=""
# 1. Skills -> 03-SKILLS/hermes-skills/
rsync -a --delete ~/.hermes/skills/ "$VAULT/03-SKILLS/hermes-skills/" || ERRS="skills rsync failed"
# 1b. Rebuild the curated skills index from the mirrored SKILL.md frontmatter
python3 ~/.hermes/scripts/skills-index.py >/dev/null 2>/tmp/skills-index.err || ERRS="${ERRS} skills-index failed: $(head -c200 /tmp/skills-index.err)"
# 2. Automation scripts + cron job definitions -> 04-SYSTEMS/hermes-automation/
mkdir -p "$VAULT/04-SYSTEMS/hermes-automation"
rsync -a --delete ~/.hermes/scripts/ "$VAULT/04-SYSTEMS/hermes-automation/scripts/" || ERRS="${ERRS} scripts-sync failed"
cp ~/.hermes/cron/jobs.json "$VAULT/04-SYSTEMS/hermes-automation/cron-jobs.json" 2>&1 || ERRS="${ERRS} cron-jobs-copy failed"
# 3. Legacy memories + config -> 04-SYSTEMS/hermes-memory/
cp ~/.hermes/memories/MEMORY.md ~/.hermes/memories/USER.md "$VAULT/04-SYSTEMS/hermes-memory/" 2>&1 || ERRS="${ERRS} memory-copy failed"
cp ~/.hermes/config.yaml "$VAULT/04-SYSTEMS/hermes-config.yaml" 2>&1 || ERRS="${ERRS} config-copy failed"
# 4. Mnemosyne DB (hot backup, WAL-safe) + last JSON export -> 04-SYSTEMS/hermes-memory/
SQLITE=/home/avi/.local/android-sdk/platform-tools/sqlite3
if [ -x "$SQLITE" ]; then
"$SQLITE" "/home/avi/.hermes/mnemosyne/data/mnemosyne.db" ".backup '$VAULT/04-SYSTEMS/hermes-memory/mnemosyne.db'" 2>&1 || ERRS="${ERRS} db-backup failed"
fi
# 5. Timestamp for the agent pass to know what's new since last sync
date -Iseconds > "$VAULT/04-SYSTEMS/hermes-memory/.last-sync"
[ -n "$ERRS" ] && echo "VAULT SYNC ERRORS: $ERRS"
exit 0