fix(m3-hermes): seed ai-memory hook credential for Hermes
The native hook command reads <data_dir>/auth-token, not the config's bearer_token_file; without it every Hermes event was spooled with a 401. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
c2601d5e70
commit
a45e3e184b
1 file changed
+6
-3
@@ -15,9 +15,11 @@
|
|||||||
yamlPython = pkgs.python3.withPackages (ps: [ps.pyyaml]);
|
yamlPython = pkgs.python3.withPackages (ps: [ps.pyyaml]);
|
||||||
|
|
||||||
# ── ai-memory client (server: ./ai-memory.nix, same host) ─────────────
|
# ── ai-memory client (server: ./ai-memory.nix, same host) ─────────────
|
||||||
# Hooks and the MCP bridge read the bearer from [auth].bearer_token_file
|
# The MCP bridge reads the bearer from [auth].bearer_token_file in the
|
||||||
# in the data dir's config.toml, so neither config.yaml nor the process
|
# data dir's config.toml; the native `hook` command only looks at
|
||||||
# environment ever carries the token.
|
# <data_dir>/auth-token (what `install-hooks --apply` would seed), so that
|
||||||
|
# file is a symlink to the same secret. Neither config.yaml nor the
|
||||||
|
# process environment ever carries the token.
|
||||||
aiMemory = "${config.services.ai-memory.package}/bin/ai-memory";
|
aiMemory = "${config.services.ai-memory.package}/bin/ai-memory";
|
||||||
aiMemoryUrl = "http://127.0.0.1:${toString (config.m3ta.ports.get "ai-memory")}";
|
aiMemoryUrl = "http://127.0.0.1:${toString (config.m3ta.ports.get "ai-memory")}";
|
||||||
aiMemoryDataDir = "/var/lib/hermes/.local/share/ai-memory";
|
aiMemoryDataDir = "/var/lib/hermes/.local/share/ai-memory";
|
||||||
@@ -42,6 +44,7 @@ in {
|
|||||||
[auth]
|
[auth]
|
||||||
bearer_token_file = "${config.age.secrets."ai-memory-hermes-token".path}"
|
bearer_token_file = "${config.age.secrets."ai-memory-hermes-token".path}"
|
||||||
''}"
|
''}"
|
||||||
|
"L+ ${aiMemoryDataDir}/auth-token - - - - ${config.age.secrets."ai-memory-hermes-token".path}"
|
||||||
# Scope marker: Hermes reports its process directory as cwd, so every
|
# Scope marker: Hermes reports its process directory as cwd, so every
|
||||||
# assistant session lands in one project of the `home` workspace
|
# assistant session lands in one project of the `home` workspace
|
||||||
# (coding checkouts below $HOME with their own marker still win).
|
# (coding checkouts below $HOME with their own marker still win).
|
||||||
|
|||||||
Reference in new issue
Block a user