Add advisors module: custom logging, PII redaction and token-budget advisors

Tests pin down chain ordering (including ties), BaseAdvisor stream behaviour, redaction order versus memory and logging, the tool loop, and how a refusal surfaces on calls, streams and over HTTP.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ja4jkzrbQ4LQZBNrb5mkZE
This commit is contained in:
Claude
2026-09-24 16:21:19 +00:00
parent 823f6fac5b
commit 527f4ba7ff
59 changed files with 2805 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# Redaction order versus logging and memory
memory advisor is fixed at HIGHEST_PRECEDENCE + 200
user says: My email is [email protected]
A redaction +100, logging +400 (redaction outside both):
log line saw: "My email is <EMAIL_1>"
memory stored: "My email is <EMAIL_1>"
model was sent: "My email is <EMAIL_1>"
B redaction +100, logging +50 (logging outside redaction):
log line saw: "My email is [email protected]"
memory stored: "My email is <EMAIL_1>"
model was sent: "My email is <EMAIL_1>"
C redaction +300 (inside the memory advisor), logging +400:
log line saw: "My email is <EMAIL_1>"
memory stored: "My email is [email protected]"
model was sent: "My email is <EMAIL_1>"