Fork resource subscriptions by protocol era: legacy keeps resources/subscribe; modern (2026-07-28) models subscriptions as a filter over one long-lived subscriptions/listen stream with reconnect-by-re-listen (capped backoff), an optimistic Connecting→Listening header badge, and a fix so the browser proxy no longer blocks listen() ~60s. Closes #1630.
This commit is contained in:
parent
a71e6d2012
commit
320daf2f67
1 changed files with 1656 additions and 90 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
extractResultType,
|
||||
extractSubscriptionId,
|
||||
groupProtocolEntries,
|
||||
isModernFrame,
|
||||
} from "./protocolUtils";
|
||||
|
||||
// A tools/call request entry whose paired response is the given result. `at`
|
||||
|
|
@ -86,22 +85,6 @@ describe("extractMethod", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("isModernFrame", () => {
|
||||
it.each([
|
||||
"server/discover",
|
||||
"subscriptions/listen",
|
||||
"notifications/subscriptions/acknowledged",
|
||||
])("recognizes the modern frame %s", (method) => {
|
||||
expect(isModernFrame(method)).toBe(true);
|
||||
});
|
||||
|
||||
it("returns false for legacy/ordinary methods", () => {
|
||||
expect(isModernFrame("tools/call")).toBe(false);
|
||||
expect(isModernFrame("notifications/initialized")).toBe(false);
|
||||
expect(isModernFrame("response")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("extractResultType", () => {
|
||||
it("returns 'input_required' when the result carries the discriminator", () => {
|
||||
const entry = callEntry(
|
||||
|
|
|
|||
Loading…
Reference in a new issue