| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| if ($this->transport instanceof HttpTransport && true === $this->state->getProtocolVersion()?->isModern()) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
those are the ugly parts of this SDK - global layer, but concrete transport and version specific ... don't have an idea that's worth the effort, somehow honest: that's MCP :D
let's keep it unless you have a cheap alternative
Sorry, something went wrong.
There was a problem hiding this comment.
Minor comment in case you have an idea - thanks already @ineersa!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #517.
Changes
Adds optional cancellation and timeoutSeconds arguments to Client::callTool(). Existing calls remain valid. An explicit per-call timeout replaces the configured request timeout and uses one deadline across protocol exchanges.
Async behavior and limitations
The API remains synchronous and framework-agnostic. No async HTTP client or event loop is added.
HTTP cancellation is cooperative. Blocking PSR-18 requests and PSR-7 body reads must return before the SDK can observe interruption. A legacy HTTP cancellation POST can itself block. Per-call deadlines are therefore not hard HTTP wall-clock limits; callers still need HTTP-client network timeouts. Cancellation does not guarantee that server-side work stops or rolls back.
Validation
New regression coverage uses protocol/HTTP unit tests and a real STDIO integration fixture. It covers synchronous JSON interruption, cancellation during body reads, interrupted suspended requests with buffered replies, version-dependent signaling, notification failures, late-response cleanup, and connection reuse. No new Inspector scenarios were added.