mirror of
https://github.com/superdesigndev/treg.git
synced 2026-10-02 03:24:35 +08:00
* fix(call): replays report zero cost; stored answers readable by call id
An idempotent replay echoed the first call's charge in X-Treg-Cost-Micro,
so a client summing that header counted one call twice (our own MCP tool
said "nothing was charged" beside a non-zero cost_usd). A replay now sends
X-Treg-Cost-Micro: 0 and the original charge in X-Treg-Original-Cost-Micro;
the CLI charge line reads the new header and falls back for older servers.
GET /calls/{id}/result took only the numeric audit row id, which a caller
holding the X-Treg-Call-Id it was given could not use without a second
lookup. It now accepts either. The endpoint was also absent from every
agent-facing doc, so a team that paid for answers its own code dropped had
no way to learn they could fetch them back; llms.txt, skill.md and
integrate.md now say so. Fragment updated: interface/api.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(context): replay cost header and call-id result lookup in money + archive
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>