You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK 0.1.10 cannot type a first worker_loader script upload #99
With @open-compute/sdk 0.1.10, OpenComputeWorkerVersionCreateParams correctly includes OpenComputeWorkerLoaderBinding, but OpenComputeWorkersScriptsNode.update is still typed as BaseScripts["update"].
A new script cannot use versions.create as a workaround: POST /accounts/{account}/workers/scripts/{script}/versions requires the script to exist and returns Cloudflare error 9100003 (the request is invalid) when it does not. The first upload must therefore use scripts.update, whose ScriptUpdateParams binding union rejects worker_loader at compile time.
Expected
The closed SDK surface should provide a type-safe first-upload operation for the runtime-supported worker_loader binding, ideally by augmenting scripts.update params in the same way as versions.create.
Impact
Dynamic Worker hosts need either a local declaration patch/type assertion or a temporary bootstrap Worker before they can upload their real first version. Runtime behavior already accepts worker_loader through the script upload endpoint.
Confirmed this is still present in the paired ocd 0.2.0 / @open-compute/sdk 0.2.0 release.
The generated SDK correctly exports OpenComputeWorkerLoaderBinding and includes it in OpenComputeWorkerVersionCreateParams, but OpenComputeWorkersScriptsNode.update remains:
readonly update: BaseScripts["update"];
As a result, the first scripts.update upload still rejects a { type: "worker_loader", name: string } binding at compile time. The OCD 0.2.0 capability document reports worker_loader as supported for multipart bindings, so the remaining gap is the SDK surface.
The downstream package patch has been removed. Lynx currently keeps a narrow local adapter around this one call. Exporting an OpenComputeWorkerScriptUpdateParams type and using it for scripts.update, analogous to OpenComputeWorkerVersionCreateParams, would remove that adapter.
The SDK now types and serializes the first worker_loader upload correctly, including the pinned multipart metadata shape. Regression coverage includes SDK client tests and the real p6-cloudflare-sdk Gate.
Activity
elliothux commentedon Sep 21, 2026
Confirmed this is still present in the paired
ocd 0.2.0/@open-compute/sdk 0.2.0release.The generated SDK correctly exports
OpenComputeWorkerLoaderBindingand includes it inOpenComputeWorkerVersionCreateParams, butOpenComputeWorkersScriptsNode.updateremains:As a result, the first
scripts.updateupload still rejects a{ type: "worker_loader", name: string }binding at compile time. The OCD 0.2.0 capability document reportsworker_loaderas supported for multipart bindings, so the remaining gap is the SDK surface.The downstream package patch has been removed. Lynx currently keeps a narrow local adapter around this one call. Exporting an
OpenComputeWorkerScriptUpdateParamstype and using it forscripts.update, analogous toOpenComputeWorkerVersionCreateParams, would remove that adapter.elliothux commentedon Sep 22, 2026
Implemented in
60f931e0c.The SDK now types and serializes the first
worker_loaderupload correctly, including the pinned multipart metadata shape. Regression coverage includes SDK client tests and the realp6-cloudflare-sdkGate.Implementation notes and acceptance evidence:
docs/i99-100-sdk-upload-r2-recreate.md