fix(skills): point HOME_DIR to real home directory and fix Hermes database path
This commit is contained in:
@@ -19,7 +19,7 @@ WORKSPACE_ROOT="$(cd "$SKILL_DIR/../.." && pwd)"
|
|||||||
AGENT_SESSIONS_YAML="${AGENT_SESSIONS_YAML:-$WORKSPACE_ROOT/.mam/agent-sessions.yaml}"
|
AGENT_SESSIONS_YAML="${AGENT_SESSIONS_YAML:-$WORKSPACE_ROOT/.mam/agent-sessions.yaml}"
|
||||||
|
|
||||||
# Workspace-relative defaults with environment overrides (Phase Z)
|
# Workspace-relative defaults with environment overrides (Phase Z)
|
||||||
HOME_DIR="${HOME_DIR:-$WORKSPACE_ROOT}"
|
HOME_DIR="${HOME_DIR:-$HOME}"
|
||||||
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$HOME/.claude/projects}"
|
CLAUDE_PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$HOME/.claude/projects}"
|
||||||
LOCAL_BIN="${LOCAL_BIN:-$HOME/.local/bin}"
|
LOCAL_BIN="${LOCAL_BIN:-$HOME/.local/bin}"
|
||||||
|
|
||||||
@@ -475,7 +475,7 @@ def db_exists(uuid):
|
|||||||
|
|
||||||
|
|
||||||
def hermes_exists(uuid):
|
def hermes_exists(uuid):
|
||||||
hdb = f"{home}/.mam/state.db"
|
hdb = f"{home}/.hermes/state.db"
|
||||||
if not os.path.exists(hdb):
|
if not os.path.exists(hdb):
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
@@ -565,7 +565,7 @@ elif agent == 'agy':
|
|||||||
if cand and db_exists(cand):
|
if cand and db_exists(cand):
|
||||||
emit(cand)
|
emit(cand)
|
||||||
elif agent == 'hermes':
|
elif agent == 'hermes':
|
||||||
hdb = f"{home}/.mam/state.db"
|
hdb = f"{home}/.hermes/state.db"
|
||||||
if os.path.exists(hdb):
|
if os.path.exists(hdb):
|
||||||
cand = None
|
cand = None
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -286,11 +286,11 @@ if purge and purge_uuid:
|
|||||||
print(f"purged: {brain}", flush=True)
|
print(f"purged: {brain}", flush=True)
|
||||||
target['agy_conversation_id_own'] = None
|
target['agy_conversation_id_own'] = None
|
||||||
elif agent == 'hermes':
|
elif agent == 'hermes':
|
||||||
json_file = f"{home}/.mam/sessions/session_{purge_uuid}.json"
|
json_file = f"{home}/.hermes/sessions/session_{purge_uuid}.json"
|
||||||
if os.path.exists(json_file):
|
if os.path.exists(json_file):
|
||||||
os.remove(json_file)
|
os.remove(json_file)
|
||||||
print(f"purged: {json_file}", flush=True)
|
print(f"purged: {json_file}", flush=True)
|
||||||
hdb = f"{home}/.mam/state.db"
|
hdb = f"{home}/.hermes/state.db"
|
||||||
if os.path.exists(hdb):
|
if os.path.exists(hdb):
|
||||||
try:
|
try:
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|||||||
Reference in New Issue
Block a user