Skip to content

feat: sensitivity labels & caller identity (#50)#8

Closed
smaramwbc wants to merge 1 commit into
feat/state-assembly-receiptsfrom
feat/sensitivity-labels
Closed

feat: sensitivity labels & caller identity (#50)#8
smaramwbc wants to merge 1 commit into
feat/state-assembly-receiptsfrom
feat/sensitivity-labels

Conversation

@smaramwbc
Copy link
Copy Markdown
Owner

@smaramwbc smaramwbc commented May 12, 2026

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() accepts caller_id + caller_type — threaded to the server so the policy evaluator can decide deny/redact/allow per memory.
  • New set_memory_labels(memory_id, labels) -> Memory on both sync + async clients. Server normalizes (dedup + lowercase + trim); SDK passes through and surfaces the canonical set.

Test plan

  • 2 new tests in tests/test_models.py — Memory parses with explicit labels; Memory parses without (defaults to []).
  • 34/34 tests pass locally.

…(#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.
@smaramwbc smaramwbc deleted the branch feat/state-assembly-receipts May 13, 2026 20:14
@smaramwbc smaramwbc closed this May 13, 2026
@smaramwbc
Copy link
Copy Markdown
Owner Author

Auto-closed when the stacked base branch was deleted by the #7 merge — replaced and merged in #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant