feat(mars): switch luna's memory provider to Honcho
- prepare-dirs pins memory.provider = honcho in Hermes's config.yaml and merges the local server into honcho.json (workspace/aiPeer luna, user peer darman). Only those keys are asserted; Hermes's own additions stay. - The SDK installs itself into the image's durable lazy-install target (/opt/data/lazy-packages), so nothing to package here. - Hermes starts after Honcho but doesn't require it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -259,8 +259,10 @@ in
|
||||
# tts.provider is seeded, not pinned: `=` would stomp luna's own choice on
|
||||
# every restart, and the engine is hers to change (KittenTTS stays as the
|
||||
# offline fallback). `//` only fills it in when unset.
|
||||
# memory.provider IS pinned: switching back is a repo change (honcho.nix).
|
||||
yq '.dashboard.trusted_proxies = ["${neptunTailnetIp}"]
|
||||
| .tts.provider = (.tts.provider // "elevenlabs")' "$conf" > "$conf.new"
|
||||
| .tts.provider = (.tts.provider // "elevenlabs")
|
||||
| .memory.provider = "honcho"' "$conf" > "$conf.new"
|
||||
chown ${hermesUid}:${hermesGid} "$conf.new"
|
||||
chmod --reference="$conf" "$conf.new"
|
||||
mv -f "$conf.new" "$conf"
|
||||
@@ -296,6 +298,20 @@ in
|
||||
# `hermes setup` overrides it — that is how a rotated key kept 401ing.
|
||||
write_env_key OPENCODE_GO_API_KEY < ${config.sops.secrets.opencode_go_api_key.path}
|
||||
write_env_key ELEVENLABS_API_KEY < ${config.sops.secrets.elevenlabs_api_key.path}
|
||||
|
||||
# Only these keys are asserted; anything Hermes adds to honcho.json stays.
|
||||
# No apiKey: the plugin uses a placeholder for a loopback base URL.
|
||||
setpriv --reuid=${hermesUid} --regid=${hermesGid} --clear-groups \
|
||||
${pkgs.runtimeShell} -c '
|
||||
set -eu
|
||||
f=$1
|
||||
[ -s "$f" ] || echo "{}" > "$f"
|
||||
${pkgs.jq}/bin/jq ".baseUrl = \"http://127.0.0.1:8000\"
|
||||
| .hosts.hermes = ((.hosts.hermes // {}) + {
|
||||
enabled: true, workspace: \"luna\", aiPeer: \"luna\",
|
||||
peerName: \"darman\", pinUserPeer: true })" "$f" > "$f.new"
|
||||
mv -f "$f.new" "$f"
|
||||
' _ ${hermesHome}/honcho.json
|
||||
write_env_key API_SERVER_KEY < ${config.sops.secrets.hermes_api_server_key.path}
|
||||
|
||||
if [ -d ${hermesHome}/.config ]; then
|
||||
|
||||
Reference in New Issue
Block a user