docs(ai-memory): hooks read the auth-token symlink, not the config

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
m3tam3reandClaude Fable 5.1 committed 2026-10-25 14:02:51 +01:00
1 parent 3c2fc56c43
commit 0be1455efb
2 files changed
+9 -8

No files matched your search

+6 -5
View File
@@ -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 `<data_dir>/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
# `<data_dir>/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 <data_dir>/auth-token; point it at the secret.
# Hooks and the OpenCode plugin read <data_dir>/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: ''