replay_memory
- Category: intel
- Access: read
- Audience: advanced (ordinary users do not normally call this directly)
Purpose
Replays the append-only history for a task, fact, chunk, or the whole store. Call it to audit what changed, when, and under which tool.
Arguments
Optional: aggregate_id, aggregate_kind, limit, since_ts.
-
aggregate_id. Note: Narrows to one aggregate; empty means all. -
aggregate_kind. Note: Narrows by task, fact, chunk, and similar kinds; empty means all. -
limit. Note: Defaults 100, clamped 1 to 500. -
since_ts. Note: Lower timestamp bound; empty means all.
Result
Object with count, events array (20 history fields: identity, clock, timestamp, old/new values, payload, parent, and source span), and contract_version.
Boundaries
Reads the append-only history inside the selected profile boundary. Newest first; every entry present with nulls preserved.
Lifecycle / side effects
Pure read; records nothing. Stored values parse with strict whole-input semantics so dates stay strings.
Errors
Wrong-typed arguments rejected by validation. Filters that match nothing return count 0, not an error.
Example
{
"aggregate_kind": "task",
"limit": 20
}
Result shape:
{
"contract_version": "memory_audit_v2",
"count": 2,
"events": [
{
"aggregate_kind": "task",
"event_id": "<uuid>",
"event_type": "task_create"
}
]
}
See also
list_memory_issues, audit_memory, govern_fact, explain_impact.