Skip to content

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

Merged
smaramwbc merged 1 commit into
mainfrom
feat/sensitivity-labels
May 14, 2026
Merged

feat: sensitivity labels & caller identity (#50)#10
smaramwbc merged 1 commit into
mainfrom
feat/sensitivity-labels

Conversation

@smaramwbc
Copy link
Copy Markdown
Owner

Tracks smaramwbc/statewave#50. Reopen of #8 (auto-closed when its stacked base branch was deleted by the #7 merge — known GitHub stacked-PR cascade, not a code issue).

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. CI was green on the original PR before it was auto-closed.

…(#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 force-pushed the feat/sensitivity-labels branch from 0b0f833 to 5a26478 Compare May 13, 2026 23:15
@smaramwbc smaramwbc merged commit 47ddd3a into main May 14, 2026
2 checks passed
@smaramwbc smaramwbc deleted the feat/sensitivity-labels branch May 14, 2026 08:11
smaramwbc added a commit that referenced this pull request May 15, 2026
…(#50) (#10)

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.
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