From 0be1455efb0de4c23bb26faf6ea95bc89c63bb62 Mon Sep 17 00:00:00 2001
From: m3tam3re
Date: Sun, 25 Oct 2026 14:02:51 +0100
Subject: [PATCH] docs(ai-memory): hooks read the auth-token symlink, not the
config
Co-Authored-By: Claude Fable 5.1
---
docs/ai-memory/az-lt-nix-rollout.md | 6 +++---
profiles/sets/coding/agents/ai-memory.nix | 11 ++++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/docs/ai-memory/az-lt-nix-rollout.md b/docs/ai-memory/az-lt-nix-rollout.md
index bc1c7de..d6074fa 100644
--- a/docs/ai-memory/az-lt-nix-rollout.md
+++ b/docs/ai-memory/az-lt-nix-rollout.md
@@ -106,12 +106,12 @@ git push origin master
`opencode.json` und den Marker `~/.ai-memory.toml` mit `workspace = "az"`
plus den Capture-Ausschlüssen.
- Die Activation verlinkt `~/.local/share/ai-memory/auth-token` auf das
- Secret (das OpenCode-Plugin liest diesen Pfad), ruft
+ Secret (Hooks und OpenCode-Plugin lesen diesen Pfad), ruft
`ai-memory install-hooks` für Claude Code und OpenCode2 auf, registriert
für Claude Code die session-aware stdio-Bridge und installiert die Skills
nach `~/.agents/skills`.
-- Der Token steht in keiner generierten Datei. Hooks und Bridge lesen ihn aus
- der Client-Config.
+- Der Token steht in keiner generierten Datei. Die MCP-Bridge liest ihn aus
+ der Client-Config, Hooks und Plugin über den `auth-token`-Symlink.
## Bekannte Grenzen
diff --git a/profiles/sets/coding/agents/ai-memory.nix b/profiles/sets/coding/agents/ai-memory.nix
index fc5161e..6514071 100644
--- a/profiles/sets/coding/agents/ai-memory.nix
+++ b/profiles/sets/coding/agents/ai-memory.nix
@@ -12,10 +12,11 @@
#
# The bearer token (an `aim_` API key, one per host) is an agenix secret the
# host repo provides at `tokenFile`. It is never copied into a generated
-# file: hooks and the MCP bridge read `[auth].bearer_token_file` from the
-# client config, and the OpenCode plugin reads `/auth-token`,
-# which activation symlinks to the secret. Without the token activation
-# skips the installers instead of writing hooks that cannot authenticate.
+# file: the MCP bridge reads `[auth].bearer_token_file` from the client
+# config, while the native hooks and the OpenCode plugin read
+# `/auth-token`, which activation symlinks to the secret. Without
+# the token activation skips the installers instead of writing hooks that
+# cannot authenticate.
{
config,
lib,
@@ -121,7 +122,7 @@ in {
if [ ! -r ${escapeShellArg cfg.tokenFile} ]; then
echo "ai-memory: token file ${cfg.tokenFile} missing, skipping" >&2
else
- # The OpenCode plugin reads /auth-token; point it at the secret.
+ # Hooks and the OpenCode plugin read /auth-token; point it at the secret.
run mkdir -p ${escapeShellArg dataDir}
run ln -sfn ${escapeShellArg cfg.tokenFile} ${escapeShellArg "${dataDir}/auth-token"}
${concatMapStringsSep "\n" (agent: ''