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
|
# 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
|
# every restart, and the engine is hers to change (KittenTTS stays as the
|
||||||
# offline fallback). `//` only fills it in when unset.
|
# 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}"]
|
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"
|
chown ${hermesUid}:${hermesGid} "$conf.new"
|
||||||
chmod --reference="$conf" "$conf.new"
|
chmod --reference="$conf" "$conf.new"
|
||||||
mv -f "$conf.new" "$conf"
|
mv -f "$conf.new" "$conf"
|
||||||
@@ -296,6 +298,20 @@ in
|
|||||||
# `hermes setup` overrides it — that is how a rotated key kept 401ing.
|
# `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 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}
|
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}
|
write_env_key API_SERVER_KEY < ${config.sops.secrets.hermes_api_server_key.path}
|
||||||
|
|
||||||
if [ -d ${hermesHome}/.config ]; then
|
if [ -d ${hermesHome}/.config ]; then
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
# Honcho memory server for luna (Hermes's memory provider, once switched in
|
# Honcho memory server: luna's memory provider (wired up in hermes-agent.nix
|
||||||
# Hermes's own config). API + deriver from the official image; Postgres and
|
# prepare-dirs). API + deriver from the official image; Postgres and
|
||||||
# Ollama (embeddings) run natively. Everything binds loopback only.
|
# Ollama (embeddings) run natively. Everything binds loopback only.
|
||||||
let
|
let
|
||||||
honchoImage = "ghcr.io/plastic-labs/honcho@sha256:c74955d6dbea6dda42c2dd9dd13dea726fcba36ba5c0b6bae4867f7ed762896d"; # v3.2.2
|
honchoImage = "ghcr.io/plastic-labs/honcho@sha256:c74955d6dbea6dda42c2dd9dd13dea726fcba36ba5c0b6bae4867f7ed762896d"; # v3.2.2
|
||||||
@@ -125,4 +125,9 @@ in
|
|||||||
after = [ "podman-honcho-api.service" ];
|
after = [ "podman-honcho-api.service" ];
|
||||||
requires = [ "podman-honcho-api.service" ];
|
requires = [ "podman-honcho-api.service" ];
|
||||||
};
|
};
|
||||||
|
# wants, not requires: Telegram must survive Honcho being down.
|
||||||
|
systemd.services.podman-hermes-agent = {
|
||||||
|
after = [ "podman-honcho-api.service" ];
|
||||||
|
wants = [ "podman-honcho-api.service" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user