• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

archetech / archon / 29550346503
90%
main: 90%

Build:
Build:
LAST BUILD BRANCH: feat/735-resource-link
DEFAULT BRANCH: main
Ran 17 Jul 2026 02:39AM UTC
Jobs 1
Files 62
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2026 02:36AM UTC coverage: 90.329% (+0.003%) from 90.326%
29550346503

Pull #737

github

macterra
feat: link large file assets instead of inlining base64 (#735)

get_asset_file put the whole asset in the model's context as base64, costing
roughly bytes/3 tokens: ~350k for a 1 MB file, ~3.5M for the 10 MB a node will
accept -- more than any context window holds. Above ARCHON_MCP_INLINE_LIMIT
(16 KiB default) it now returns a resource_link, which #725/#734 made honest by
implementing the read path a link points at.

Size is read from the DID document before anything is fetched: generateFileAsset
records `bytes` next to the CID, so a linked asset never leaves the gatekeeper.
That costs small assets one extra resolve, which is the cheaper mistake --
fetching megabytes to then measure them defeats the point. MCP's `size` field
carries it, documented for hosts to "estimate context window usage".

An asset with no recorded size is linked rather than gambled on: guessing
"small" risks burying the conversation, while a needless link costs the client
one resources/read.

The limit is configurable because it doubles as the escape hatch: a client that
ignores resource links gets a link where it used to get bytes, and a very large
ARCHON_MCP_INLINE_LIMIT restores the old behaviour. 16 KiB by default because
base64 is not readable by a model -- inlining only helps a client render or save
the bytes, so it should stay cheap. The mcp-server is not in any compose file,
so the compose-default pitfall does not apply.

Images still always inline: an image block is how a model sees an image, and a
link is not something it can look at.

Handlers now receive the config, which is how the tool reads the limit.

Verified through a real client: a 2 MB asset returns an 85-token result instead
of ~700k, getFile is never called, and readResource on the link returns all
2 MB on demand.

Breaking: large file results change shape for clients that do not follow links.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #737: feat: link large file assets instead of inlining base64 (#735)

2968 of 3519 branches covered (84.34%)

Branch coverage included in aggregate %.

18 of 19 new or added lines in 2 files covered. (94.74%)

1 existing line in 1 file now uncovered.

6167 of 6594 relevant lines covered (93.52%)

834.23 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
92.8
-0.44% packages/mcp-server/src/tools.ts

Coverage Regressions

Lines Coverage ∆ File
1
92.8
-0.44% packages/mcp-server/src/tools.ts
Jobs
ID Job ID Ran Files Coverage
1 29550346503.1 17 Jul 2026 02:39AM UTC 124
91.51
GitHub Action Run
Source Files on build 29550346503
  • Tree
  • List 62
  • Changed 57
  • Source Changed 2
  • Coverage Changed 57
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29550346503
  • Pull Request #737
  • PR Base - main (#29549780023)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc