Expand description
Caller identity hierarchy for memory scoping.
Why: Memory must be scoped according to who is calling — operator, PM, or
sub-agent — so agents cannot self-elevate their recall scope.
What: CallerIdentity enum, RecallCeiling, env-var constructors.
Test: identity::tests::*.
Caller identity hierarchy for memory scoping in tcode.
Why: Memory must be scoped according to who is calling — the operator
(full access), the PM (bounded to a session), or a sub-agent (bounded to its
own writes). Agents must not be able to self-elevate; the harness determines
CallerIdentity at spawn time and enforces a recall ceiling so agent code
can never bypass it.
What: CallerIdentity is a sum type with three variants — Ctrl, Pm,
Agent — each carrying the IDs needed to apply the right scope filter.
RecallCeiling is the maximum scope a caller may recall.
Test: See unit tests — agent identity caps recall at Agent; auto_tags
returns the expected tag set for each variant.
Enums§
- Caller
Identity - Which component is making a memory/context call.
- Recall
Ceiling - Maximum recall scope for a
CallerIdentity.
Constants§
- ENV_
AGENT_ ID - Agent ID env var.
- ENV_
CALLER - Env var name for spawn-time identity injection.
- ENV_
PROJECT_ ID - Project ID env var.
- ENV_
SESSION_ ID - Session ID env var.