ContextSection
@forge/monorepo / backend/src / ContextSection
Type Alias: ContextSection
ContextSection =
object
Defined in: backend/src/context/index.ts:13
Properties
body
readonlybody:string
Defined in: backend/src/context/index.ts:16
cacheable
readonlycacheable:boolean
Defined in: backend/src/context/index.ts:39
estimatedTokens
readonlyestimatedTokens:number
Defined in: backend/src/context/index.ts:19
expiresAt?
readonlyoptionalexpiresAt?:string
Defined in: backend/src/context/index.ts:40
kind?
readonlyoptionalkind?:ContextKind
Defined in: backend/src/context/index.ts:42
Budget bucket. Defaults to user-context when a provider does not specify one.
origin
readonlyorigin:ContextOrigin
Defined in: backend/src/context/index.ts:38
Whether this content may instruct the agent (#145, AC-4).
Required, with no default. A provider has to decide, so "nobody thought about it" is a compile error rather than external content quietly reaching the system prompt as instruction.
Not the same as sensitivity, and the difference matters in the worst direction. Sensitivity is
confidentiality — who may see this. Origin is provenance — may this instruct. A page fetched off the
public web is public sensitivity and the least trustworthy content in the system.
external content is rendered inside a delimited envelope with delimiter forgery neutralised; see
security/prompt-safety.ts. A platform section that interpolates untrusted values — a filename, a tool
name, a user-supplied label — stays platform and neutralises those values itself, so the section's own
instructions are not swallowed by an envelope that says nothing inside it is an instruction.
priority
readonlypriority:number
Defined in: backend/src/context/index.ts:18
Higher priority survives pruning longer.
provenance
readonlyprovenance:string
Defined in: backend/src/context/index.ts:21
Where this came from, so a claim in the output can be traced back.
providerId
readonlyproviderId:string
Defined in: backend/src/context/index.ts:14
pruneStage?
readonlyoptionalpruneStage?:PruneStage
Defined in: backend/src/context/index.ts:45
When set, this section is eligible for pruning in that stage. Unset ⇒ preserved (recent turns, open tool continuity, base policy).
sensitivity
readonlysensitivity:ContextSensitivity
Defined in: backend/src/context/index.ts:22
title
readonlytitle:string
Defined in: backend/src/context/index.ts:15