Story-1720 Sessions (a/2) — container: per-user+agent, resume-revalidate, scope-drop

RFD-AGT-002 D-12. A session is the container that holds one counsel's running conversation with one agent. This Story builds the brain-side rules of that container — the typed value plus the three guards that keep it honest and confidential. It is the agents (a/2) half of D-12; the app (b/2) sibling owns the new/resume/switch dropdown UI. The durable store (AgentCore Memory, the 4 sealed ledgers — D-13) is a separate Story blocked on the seal-proof Spike and is deliberately not wired here: a session is a stateless-brain value the runtime hands in, the guards accept or reject it, nothing is persisted from this module.

The container

SessionContainer
  session_id      derived from + bound to (user_id, agent_key)
  user_id         the single owning user
  agent_key       the single owning agent
  title / source  scope-safe: generic | user  (auto is forbidden)
  saved           the minimal-save resume requires
  sealed          set the moment matter context is touched
  page_card       PageCardStamp re-checked on resume
  context_slices  each tagged firm | matter (matter slice carries matter_id)

AC1 — session_id is per-user + per-agent

AC2 — resume re-validates the Page Card (no blind replay)

AC3 — switching INTO a session drops the prior matter-scoped context

Seal & scope-safe titles

Files

Verification