Commit 809f7cb
fix(scripts): follow the tightened script request bodies
The gateway now describes both script request bodies instead of leaving
them open. The upload body declares a required `file` part with optional
`metadata`; the execution body is ScriptExecutionRequest, with
`execution_type` required. Two casts in api-dispatch.ts existed only
because those bodies used to be untyped, and they stop compiling against
the 0.7.0 client.
The execution cast is gone. StartScriptExecutionRequest already has the
same shape as the generated ScriptExecutionRequest, so the body passes
through and a future divergence between the two becomes a type error here.
The upload keeps a cast, because FormData is a DOM interface and can never
be assignable to a generated object type, but it now names the declared
body instead of Record<string, unknown>, so a change to the parts is caught
at compile time rather than as a 400 at runtime.
No request path changed between 0.6.0 and 0.7.0, so nothing else is
affected. The client pin moves to ^0.7.0 and the package version follows it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015wk3HGgcpJyVQB6BK297Xw1 parent d5054b7 commit 809f7cb
3 files changed
Lines changed: 23 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
733 | 738 | | |
734 | 739 | | |
735 | 740 | | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
740 | 746 | | |
741 | 747 | | |
742 | 748 | | |
| |||
745 | 751 | | |
746 | 752 | | |
747 | 753 | | |
748 | | - | |
| 754 | + | |
749 | 755 | | |
750 | 756 | | |
751 | 757 | | |
| |||
784 | 790 | | |
785 | 791 | | |
786 | 792 | | |
787 | | - | |
788 | | - | |
789 | | - | |
| 793 | + | |
| 794 | + | |
790 | 795 | | |
791 | 796 | | |
792 | 797 | | |
| |||
795 | 800 | | |
796 | 801 | | |
797 | 802 | | |
798 | | - | |
| 803 | + | |
799 | 804 | | |
800 | 805 | | |
801 | 806 | | |
| |||
0 commit comments