Adds Apollo-side integration for the file-upload-relay worker (#10034). When file_urls.enable is set on a v3.1 tool router session, FileUploadable tool parameters accept { url: string, name?: string } instead of { s3key, name, mimetype }. Files are downloaded via the relay worker and rewritten to the s3key format before execution — agents just pass a URL.
New session config (v3.1 only):
{
"file_urls": { "enable": true }
}
Schema rewriting — three paths intercepted (all gated by useFileUrls check):
COMPOSIO_SEARCH_TOOLS — in search_result_utils.ts, rewrites request_schema in search resultsCOMPOSIO_GET_TOOL_SCHEMAS — in getToolSchemas.ts, rewrites schemas from Thermos responsemcp/v2/tools.ts, rewrites schemas for MCP clientsDetection via file_uploadable: true marker that Thermos/Mercury inlines directly on FileUploadable schema objects. The schema rewriter walks the entire schema tree recursively, replacing nodes that match { file_uploadable: true, type: "object" } with the URL upload schema.
Argument transformation — in executeForSessionRPC.ts, before executable.execute():
file_uploadable: true marker search in request schema{ url: "https://..." } → relay download → { s3key, name, mimetype }[{ url }, { url }] → concurrent relay downloads → [{ s3key }, { s3key }]{ s3key, name, mimetype } → passthrough (backward compat)Session config wiring (v3.1 only — v3 frozen):
file_urls: { enable: boolean }file_urls in configToolRouterConfigDB) stores file_urlsbyNanoId, fetchSessionFromDB, createToolRouterSession) maps file_urls → fileUrlsNew module: apps/apollo/src/lib/toolRouterV2/features/file_uploads/
schema_rewriter.ts — walks tree, replaces file_uploadable: true objects with { url, name } schema (Object.freeze'd, immutable)relay_client.ts — HTTP client for file-upload-relay worker (uses safeFetch, Zod-validated response, query-param-stripped URL logging)arg_transformer.ts — detects FileUploadable params via recursive marker search, transforms URL args via relaypnpm check-types — no new errors)file_urls in v3.1 responsesfile_urls (v3.1-only field)file_urls correctly🤖 Generated with Claude Code
Based on git blame analysis of 13 file(s):
| Contributor | Contribution | Files |
|---|---|---|
| Dhawal Upadhyay | 52% | 7 |
| Abir Taheer |
| 23% |
| 13 |
| Zen Agent | 14% | 6 |
| Jayesh Sharma | 5% | 3 |
| Himanshu Dixit | 3% | 3 |
Recommend Abir Taheer — she made multiple recent edits (including several files edited today) and authored the new file-upload code, so she knows the current changes well.
Also recommend Dhawal Upadhyay — primary contributor across the search/orchestration code and recent editor on several core files, good for broader architectural/sign-off.
🤖 Based on git blame with recency weighting (recent edits count more).
:x: Patch coverage is 61.13990% with 225 lines in your changes missing coverage. Please review.
| Flag | Coverage Δ | |
|---|---|---|
| e2e-tests | 6.02% <0.34%> (-0.02%) | :arrow_down: |
| self-hosted-tests | 5.56% <0.34%> (-0.02%) | :arrow_down: |
| unit-tests | 58.87% <61.00%> (+<0.01%) | :arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files with missing lines | Coverage Δ | |
|---|---|---|
| .../src/lib/composio_actions/actions/search_action.ts | 74.48% <100.00%> (+0.26%) | :arrow_up: |
| ...ib/composio_actions/actions/search_orchestrator.ts | 79.84% <100.00%> (+0.03%) | :arrow_up: |
| ...rc/lib/toolRouterV2/features/file_uploads/index.ts | 100.00% <100.00%> (ø) | |
| ...2/features/session/dbUtils/getToolRouterSession.ts | 82.68% <100.00%> (+0.22%) | :arrow_up: |
| ...pollo/src/lib/toolRouterV2/features/session/get.ts | 95.28% <100.00%> (+0.02%) | :arrow_up: |
... and 4 files with indirect coverage changes
100.00% <ø> (ø) |
| apps/apollo/src/lib/toolRouterV2/schema/api.ts | 100.00% <100.00%> (ø) |
| ...pps/apollo/src/pages/api/v3/tool_router/session.ts | 97.71% <100.00%> (+0.04%) | :arrow_up: |
| ...lo/src/pages/api/v3/tool_router/session_schemas.ts | 96.46% <100.00%> (+0.08%) | :arrow_up: |
| apps/apollo/src/lib/mcp/v2/tools.ts | 85.96% <93.33%> (+1.52%) | :arrow_up: |
| ... and 12 more |