#813
Persist large web_fetch bodies to sandbox files
Closes #781
What changed
- save oversized
web_fetchresponse bodies under.open-harness/web-fetchinstead of only truncating them inline - return preview metadata alongside
status,contentType,bytes,truncated, andsavedBodyPath - show the fetch preview and saved-path details in the fetch renderer
- add coverage for both oversized and inline response flows
Verification
npx -y bun@1.3.8 test packages/agent/tools/tools.test.tsnpx -y bun@1.3.8 run typecheck -- --filter=@open-harness/agent --filter=webnpx -y bun@1.3.8 x ultracite check packages/agent/tools/fetch.ts packages/agent/tools/tools.test.ts apps/web/components/tool-call/renderers/fetch-renderer.tsx
Activity
6vercel[bot]reviewed7mo ago
Refreshed this branch onto current main in signed, GitHub-verified commit 7849894.
The test conflict now preserves both the newer approval/SSRF coverage and this PR's small/large response-body coverage. The earlier Vercel review finding is also addressed in the current head: the generated curl command has one -o, writes to $body_file, and contains no stale fd 3/process-substitution path.
Validation on the exact commit:
- focused tool suite: 25 passed
- full formatter and lint: passed (597 / 541 files)
- monorepo typecheck: 4 tasks passed
- migration/schema check: passed
- isolated suite reached 105/106 files; the only failure is the untouched upstream Windows path assertion in
packages/agent/tools/utils.test.ts(/outside/file.tsis rendered asE:/outside/file.ts). The fetch/tool file itself passed all 25 tests in that same run.
@Bortlesboat is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.