Merge remote-tracking branch 'origin/v2/main' into v2/feat/2294-skills-catalog-budget-settings

Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-09-14 01:22:26 -04:00
commit 621b712229
2 changed files with 3427 additions and 63 deletions

View file

@ -4,7 +4,7 @@
import type { Transport } from "@modelcontextprotocol/client";
import type { JSONRPCMessage } from "@modelcontextprotocol/client";
import type { FetchRequestEntryBase } from "../../types.js";
import type { FetchRequestEntryBase, FetchStreamState } from "../../types.js";
import type { RemoteEvent } from "../types.js";
import type { AuthChallenge } from "../../../auth/challenge.js";
import { AuthChallengeError } from "../../../auth/challenge.js";
@ -328,6 +328,17 @@ export class RemoteSession {
});
}
onFetchStreamUpdate(id: string, stream: FetchStreamState): void {
this.pushEvent({
type: "fetch_stream_update",
data: {
id,
eventCount: stream.eventCount,
...(stream.closedAt && { closedAt: stream.closedAt.toISOString() }),
},
});
}
onStderr(entry: { timestamp: Date; message: string }): void {
this.pushEvent({
type: "stdio_log",

View file

@ -869,6 +869,8 @@ export function createRemoteApp(
onFetchRequest: (entry) => session.onFetchRequest(entry),
onFetchResponseBody: (id, body) =>
session.onFetchResponseBody(id, body),
onFetchStreamUpdate: (id, stream) =>
session.onFetchStreamUpdate(id, stream),
authProvider: authHandle?.provider,
settings: body.settings,
// Always intercept 401/403 on the node MCP transport. Without this, the