This repository was archived by the owner on Oct 16, 2026. It is now read-only.
Repository navigation
fix(local): implement kody.gatewayFetchStream for --local runtime - #66
Merged
Merged
Conversation
Hosted packages now stream secret-aware bodies via gatewayFetchStream after bundling; the CLI Proxy forwarded that name through JSON CapabilityProxy /call and origin replied Unknown runtime function. Implement the streaming host method and bridge hop to POST /v1/capability-proxy/gateway-fetch (contract parity), audit hosted vs --local specials, and fail tests when the lists drift. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
kody-bot
marked this pull request as ready for review
October 15, 2026 08:07
Owner
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1b0bd5c. Configure here.
Bridge failures on /gateway-fetch now return Open API JSON with Cache-Control: no-store so workerd gatewayFetchStream throws instead of treating a bare 200 as success. Mock stream hops use a null body for 101/103/204/205/304 so the Response constructor does not throw. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
🎉 This PR is included in version 1.25.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
cursor Bot
pushed a commit
that referenced
this pull request
Oct 15, 2026
Resolve package-app-dev import conflict: keep client-asset helpers from ports and the gatewayFetchStream local runtime bridge from main. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
npx @kodycodes/cli execute --localfails right after bundling with:Error: Unknown runtime function kody.gatewayFetchStream.Hosted runtime (kentcdodds/kody) added
gatewayFetchStreamand package-graph shims call it for streamed / multipart / large secret-aware bodies. The CLI--localhost only Proxy-forwarded that name through JSONPOST /v1/capability-proxy/call, which does not implement it (streaming uses a separate Open API route).This blocks Cloudflare
publish-staticand other packages that need the streaming hop (CLI 1.20.2 / 1.24.1).Fix
kody.gatewayFetchStreamon the workerdkody:runtimehost (real method on the Proxy, not a JSON/callhop)POST /gateway-fetchstreams toPOST /v1/capability-proxy/gateway-fetchwith allowlisted metadata headers, duplex body, and upstreamResponsereconstruction (percli-streaming-gateway-fetchcontract)Cache-Control: no-storeso workerd throwsexecute --local, package module runs, andkody devAudit / drift guard
--localhost surface inlocal-host-runtime-surface.tsgatewayFetchStreamTests
runLocalExecutecallskody.gatewayFetchStreamand hits/v1/capability-proxy/gateway-fetch(not/call)npm run validategreenNote
Medium Risk
Introduces a new secret-aware outbound streaming path through CapabilityProxy; behavior is contract-tested but affects local execute/dev networking and credential header forwarding.
Reviewed by Cursor Bugbot for commit 9904eb1. Bugbot is set up for automated code reviews on this repo. Configure here.