Skip to main content

Module identity

Module identity 

Source
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§

CallerIdentity
Which component is making a memory/context call.
RecallCeiling
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.