feat: sensitivity labels & caller identity (#50)#8
Closed
smaramwbc wants to merge 1 commit into
Closed
Conversation
…(#50)
Memory gains sensitivity_labels: list[str] (defaults to [] so older
servers without the policy layer parse cleanly). get_context() and
HandoffRequest paths accept caller_id + caller_type, threaded to the
server so the sensitivity-label policy evaluator (#50) can decide
deny / redact / allow per memory.
New client method on both sync + async clients:
set_memory_labels(memory_id, labels) → PATCH /v1/memories/{id}/labels
Labels are normalized server-side (dedup + lowercase + strip) — the
SDK passes them through verbatim and surfaces the canonical set in
the returned Memory.
2 tasks
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracks smaramwbc/statewave#50. Stacked on top of the #49 PR (base is
feat/state-assembly-receipts).Summary
Memory.sensitivity_labels: list[str](defaults to[]so older servers without the policy layer parse cleanly).get_context()acceptscaller_id+caller_type— threaded to the server so the policy evaluator can decide deny/redact/allow per memory.set_memory_labels(memory_id, labels) -> Memoryon both sync + async clients. Server normalizes (dedup + lowercase + trim); SDK passes through and surfaces the canonical set.Test plan
tests/test_models.py— Memory parses with explicit labels; Memory parses without (defaults to []).