mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 18:06:46 +00:00
* feat(mcp): link retained Evidence from over-budget summaries
An over-budget MCP result now also carries a resource_link to the
complete record its summary replaced. The rea://evidence/{evidence_id}
template reads any record the session retains as its exact JSON, the
same text the evidence-json cursor pages. The cursor stays the recovery
every client can follow.
An ID the session does not retain is not found (-32602). A record too
large for one response gets no link, and a read of it is refused with
the cursor (-32600). The link is named complete-evidence so Claude Code,
which renders it as one line, spends about 67 tokens on it.
Part of #14187
* fix(mcp): offer an Evidence link only when one read can deliver it
The link offer compared the record's unescaped JSON bytes with the frame,
while the read measured the escaped text inside its result, so a linked
record could refuse its own read. The read also never checked REA's
single-string limit, so a frame budget raised above it could let a read
reach the SDK serializer. Both now use retainedEvidenceReadFits, which
bounds the escaped read's UTF-8 bytes and UTF-16 length.