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:
1 parent
3c2fc56c43
commit
0be1455efb
2 files changed
+9
-8
No files matched your search
@@ -106,12 +106,12 @@ git push origin master
|
|||||||
`opencode.json` und den Marker `~/.ai-memory.toml` mit `workspace = "az"`
|
`opencode.json` und den Marker `~/.ai-memory.toml` mit `workspace = "az"`
|
||||||
plus den Capture-Ausschlüssen.
|
plus den Capture-Ausschlüssen.
|
||||||
- Die Activation verlinkt `~/.local/share/ai-memory/auth-token` auf das
|
- 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
|
`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
|
für Claude Code die session-aware stdio-Bridge und installiert die Skills
|
||||||
nach `~/.agents/skills`.
|
nach `~/.agents/skills`.
|
||||||
- Der Token steht in keiner generierten Datei. Hooks und Bridge lesen ihn aus
|
- Der Token steht in keiner generierten Datei. Die MCP-Bridge liest ihn aus
|
||||||
der Client-Config.
|
der Client-Config, Hooks und Plugin über den `auth-token`-Symlink.
|
||||||
|
|
||||||
## Bekannte Grenzen
|
## Bekannte Grenzen
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,11 @@
|
|||||||
#
|
#
|
||||||
# The bearer token (an `aim_` API key, one per host) is an agenix secret the
|
# 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
|
# 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
|
# file: the MCP bridge reads `[auth].bearer_token_file` from the client
|
||||||
# client config, and the OpenCode plugin reads `<data_dir>/auth-token`,
|
# config, while the native hooks and the OpenCode plugin read
|
||||||
# which activation symlinks to the secret. Without the token activation
|
# `<data_dir>/auth-token`, which activation symlinks to the secret. Without
|
||||||
# skips the installers instead of writing hooks that cannot authenticate.
|
# the token activation skips the installers instead of writing hooks that
|
||||||
|
# cannot authenticate.
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -121,7 +122,7 @@ in {
|
|||||||
if [ ! -r ${escapeShellArg cfg.tokenFile} ]; then
|
if [ ! -r ${escapeShellArg cfg.tokenFile} ]; then
|
||||||
echo "ai-memory: token file ${cfg.tokenFile} missing, skipping" >&2
|
echo "ai-memory: token file ${cfg.tokenFile} missing, skipping" >&2
|
||||||
else
|
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 mkdir -p ${escapeShellArg dataDir}
|
||||||
run ln -sfn ${escapeShellArg cfg.tokenFile} ${escapeShellArg "${dataDir}/auth-token"}
|
run ln -sfn ${escapeShellArg cfg.tokenFile} ${escapeShellArg "${dataDir}/auth-token"}
|
||||||
${concatMapStringsSep "\n" (agent: ''
|
${concatMapStringsSep "\n" (agent: ''
|
||||||
|
|||||||
Reference in new issue
Block a user