Commit 3d66fb4
committed
callServerTool: opt into progress-based timeout reset
Hosts may interpose long-running steps (e.g. inline OAuth on 401) between
the guest's tools/call and the server's response. Without this, the base
SDK's 60s DEFAULT_REQUEST_TIMEOUT_MSEC fires and the guest sees -32001
even though the host is still working.
Passing onprogress causes Protocol.request to include _meta.progressToken
in the outgoing request and register a progress handler; resetTimeoutOnProgress
makes incoming notifications/progress reset the per-request timer. Hosts can
then heartbeat during human-in-the-loop steps. Callers can still override both.1 parent 621a70a commit 3d66fb4
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
864 | 871 | | |
865 | 872 | | |
866 | 873 | | |
| |||
0 commit comments