Kind: Class
Source: atloria-monorepo/libs/agent-core/src/context/history-processors.ts
Deduplicates file views — keeps only the most recent read of each file. Older reads of the same file are replaced with a pointer.
Inspired by SWE-agent's ClosedWindowProcessor pattern.
Targets tools that read files: read_file, glob_search, grep_search. Identifies the file path from tool input, and for duplicate paths, replaces older outputs with "[Outdated — re-read in a later turn]".
Implements: HistoryProcessor
Methods
| Method | Signature | Returns |
|---|---|---|
process | process(items: AgentInputItem[]) | AgentInputItem[] |
Properties
| Property | Type |
|---|---|
name | any |
Where it refuses work
ClosedWindowProcessorstops the work with an early return whenindicesToElide.size === 0.ClosedWindowProcessorstops the work with an early return when!indicesToElide.has(i).ClosedWindowProcessorstops the work with an early return whenparsed.path.ClosedWindowProcessorstops the work with an early return whenparsed.pattern.ClosedWindowProcessorstops the work with an early return whenpathMatch.
When something fails
ClosedWindowProcessorhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?