InjectionRecord
Interface: InjectionRecord
Defined in: src/recorders/core/types.ts:24
An injection record written by a slot subflow into scope[INJECTION_KEYS[slot]].
ContextRecorder reads this to construct the corresponding event payload.
Builders write arrays of these; recorders diff old-vs-new to detect NEW injections.
Properties
asRecency?
readonlyoptionalasRecency?:ContextRecency
Defined in: src/recorders/core/types.ts:44
Recency, when injecting into messages slot.
asRole?
readonlyoptionalasRole?:ContextRole
Defined in: src/recorders/core/types.ts:42
Role, when injecting into messages slot.
budgetSpent?
readonlyoptionalbudgetSpent?:object
Defined in: src/recorders/core/types.ts:53
fractionOfCap
readonlyfractionOfCap:number
tokens
readonlytokens:number
contentHash
readonlycontentHash:string
Defined in: src/recorders/core/types.ts:30
Stable hash of the content — enables duplicate detection.
contentSummary
readonlycontentSummary:string
Defined in: src/recorders/core/types.ts:26
Short human-readable content summary.
expiresAfter?
readonlyoptionalexpiresAfter?:ContextLifetime
Defined in: src/recorders/core/types.ts:55
How long this injection is expected to persist.
position?
readonlyoptionalposition?:number
Defined in: src/recorders/core/types.ts:46
Position within the slot (messages index, system-prompt section order).
rankPosition?
readonlyoptionalrankPosition?:number
Defined in: src/recorders/core/types.ts:51
rawContent?
readonlyoptionalrawContent?:string
Defined in: src/recorders/core/types.ts:28
Full content (may be redacted downstream). Optional.
reason
readonlyreason:string
Defined in: src/recorders/core/types.ts:40
Why this was injected.
retrievalScore?
readonlyoptionalretrievalScore?:number
Defined in: src/recorders/core/types.ts:50
Retrieval / ranking evidence.
sectionTag?
readonlyoptionalsectionTag?:string
Defined in: src/recorders/core/types.ts:48
Section tag for structured system prompts (e.g. "", "").
slot
readonlyslot:ContextSlot
Defined in: src/recorders/core/types.ts:32
The 3-slot target (sanity-checked against the subflow ID).
source
readonlysource:ContextSource
Defined in: src/recorders/core/types.ts:34
Where this content came from.
sourceId?
readonlyoptionalsourceId?:string
Defined in: src/recorders/core/types.ts:36
Optional source-specific identifier (retriever id, skill id, ...).
threshold?
readonlyoptionalthreshold?:number
Defined in: src/recorders/core/types.ts:52
upstreamRef?
readonlyoptionalupstreamRef?:string
Defined in: src/recorders/core/types.ts:38
Upstream event reference (runtimeStageId that produced the content).
