@frontmcp/sdk 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/instances/app.lazy.instance.d.ts.map +1 -1
- package/app/lazy/lazy-app.rules.d.ts +5 -0
- package/app/lazy/lazy-app.rules.d.ts.map +1 -1
- package/auth/flows/oauth.authorize.flow.d.ts +2 -0
- package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
- package/auth/flows/oauth.callback.flow.d.ts +1 -0
- package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
- package/auth/flows/oauth.provider-callback.flow.d.ts +1 -0
- package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
- package/auth/flows/session.verify.flow.d.ts +2 -0
- package/auth/flows/session.verify.flow.d.ts.map +1 -1
- package/auth/instances/instance.local-primary-auth.d.ts +9 -4
- package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
- package/auth/instances/instance.remote-primary-auth.d.ts +2 -0
- package/auth/instances/instance.remote-primary-auth.d.ts.map +1 -1
- package/auth/session-scope-identity.d.ts +5 -3
- package/auth/session-scope-identity.d.ts.map +1 -1
- package/browser/app/instances/app.lazy.instance.mjs +9 -2
- package/browser/app/lazy/lazy-app.rules.mjs +11 -1
- package/browser/auth/flows/oauth.authorize.flow.mjs +7 -1
- package/browser/auth/flows/oauth.callback.flow.mjs +6 -2
- package/browser/auth/flows/oauth.provider-callback.flow.mjs +8 -4
- package/browser/auth/flows/session.verify.flow.mjs +17 -14
- package/browser/auth/instances/instance.local-primary-auth.mjs +46 -12
- package/browser/auth/instances/instance.remote-primary-auth.mjs +13 -1
- package/browser/auth/session-scope-identity.mjs +6 -1
- package/browser/common/interfaces/flow.interface.mjs +7 -1
- package/browser/common/types/auth/session.types.mjs +2 -1
- package/browser/common/utils/auth-info.utils.mjs +3 -2
- package/browser/flows/flow.instance.mjs +43 -5
- package/browser/hooks/hooks.utils.mjs +10 -4
- package/browser/index.cjs +1342 -1116
- package/browser/notification/notification.service.mjs +28 -4
- package/browser/notification/resource-update-access.mjs +22 -0
- package/browser/plugin/enforced-metadata.check.mjs +2 -1
- package/browser/prompt/flows/get-prompt.flow.mjs +13 -0
- package/browser/remote-mcp/mcp-client.service.mjs +26 -13
- package/browser/remote-mcp/remote-request-headers.mjs +6 -3
- package/browser/resource/flows/read-resource.flow.mjs +20 -23
- package/browser/resource/flows/subscribe-resource.flow.mjs +9 -4
- package/browser/tool/ui/ui-shared.mjs +9 -0
- package/browser/transport/flows/handle.mcp-20260728.flow.mjs +9 -3
- package/browser/transport/mcp-20260728/index.mjs +1 -1
- package/browser/transport/mcp-20260728/subscriptions.mjs +8 -6
- package/common/interfaces/flow.interface.d.ts +4 -1
- package/common/interfaces/flow.interface.d.ts.map +1 -1
- package/common/metadata/app.metadata.d.ts +16 -16
- package/common/metadata/front-mcp.metadata.d.ts +37 -37
- package/common/types/auth/session.types.d.ts +6 -0
- package/common/types/auth/session.types.d.ts.map +1 -1
- package/common/types/options/http/interfaces.d.ts +4 -1
- package/common/types/options/http/interfaces.d.ts.map +1 -1
- package/common/utils/auth-info.utils.d.ts +1 -0
- package/common/utils/auth-info.utils.d.ts.map +1 -1
- package/esm/index.mjs +24 -24
- package/flows/flow.instance.d.ts.map +1 -1
- package/hooks/hooks.utils.d.ts +2 -4
- package/hooks/hooks.utils.d.ts.map +1 -1
- package/index.d.ts +5 -5
- package/index.js +35 -35
- package/notification/notification.service.d.ts +7 -2
- package/notification/notification.service.d.ts.map +1 -1
- package/notification/resource-update-access.d.ts +9 -0
- package/notification/resource-update-access.d.ts.map +1 -0
- package/package.json +10 -10
- package/plugin/enforced-metadata.check.d.ts +3 -1
- package/plugin/enforced-metadata.check.d.ts.map +1 -1
- package/prompt/flows/get-prompt.flow.d.ts +3 -1
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/remote-mcp/mcp-client.service.d.ts.map +1 -1
- package/remote-mcp/mcp-client.types.d.ts.map +1 -1
- package/remote-mcp/remote-request-headers.d.ts +22 -8
- package/remote-mcp/remote-request-headers.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +2 -0
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/resource/flows/subscribe-resource.flow.d.ts.map +1 -1
- package/scope/flows/http.request.flow.d.ts +1 -0
- package/scope/flows/http.request.flow.d.ts.map +1 -1
- package/server/adapters/express.host.adapter.d.ts +3 -2
- package/server/adapters/express.host.adapter.d.ts.map +1 -1
- package/shared/shared-endpoint.d.ts +5 -1
- package/shared/shared-endpoint.d.ts.map +1 -1
- package/shared/unix-socket-fetch.d.ts +7 -0
- package/shared/unix-socket-fetch.d.ts.map +1 -1
- package/tool/ui/ui-shared.d.ts +4 -0
- package/tool/ui/ui-shared.d.ts.map +1 -1
- package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
- package/transport/mcp-20260728/subscriptions.d.ts +5 -3
- package/transport/mcp-20260728/subscriptions.d.ts.map +1 -1
|
@@ -119,6 +119,10 @@ function sessionCallerOf(authInfo) {
|
|
|
119
119
|
const { clientId, scopes, user, claims } = authInfo;
|
|
120
120
|
return { clientId, scopes, user, claims, expiresAt: authInfo.expiresAt ?? user?.exp };
|
|
121
121
|
}
|
|
122
|
+
var MAX_CALLER_RECHECKS = 3;
|
|
123
|
+
function isSameCaller(left, right) {
|
|
124
|
+
return left === right || JSON.stringify(left) === JSON.stringify(right);
|
|
125
|
+
}
|
|
122
126
|
function hasExpiredCaller(session) {
|
|
123
127
|
const expiresAt = session.caller?.expiresAt;
|
|
124
128
|
return expiresAt !== void 0 && expiresAt * 1e3 < Date.now();
|
|
@@ -361,13 +365,16 @@ var NotificationService = class _NotificationService {
|
|
|
361
365
|
*
|
|
362
366
|
* @param sessionId - The session to subscribe
|
|
363
367
|
* @param uri - The resource URI to subscribe to
|
|
368
|
+
* @param platformEnv - The subscribing request's platform bindings, which each update's access check runs with
|
|
364
369
|
* @returns true if this is a new subscription, false if already subscribed
|
|
365
370
|
*/
|
|
366
|
-
subscribeResource(sessionId, uri) {
|
|
367
|
-
|
|
371
|
+
subscribeResource(sessionId, uri, platformEnv) {
|
|
372
|
+
const registered = this.servers.get(sessionId);
|
|
373
|
+
if (!registered) {
|
|
368
374
|
this.logger.warn(`Cannot subscribe unregistered session ${sessionId.slice(0, 20)}... to resource ${uri}`);
|
|
369
375
|
return false;
|
|
370
376
|
}
|
|
377
|
+
if (platformEnv !== void 0) registered.platformEnv = platformEnv;
|
|
371
378
|
let sessionSubs = this.subscriptions.get(sessionId);
|
|
372
379
|
if (!sessionSubs) {
|
|
373
380
|
sessionSubs = /* @__PURE__ */ new Set();
|
|
@@ -429,7 +436,7 @@ var NotificationService = class _NotificationService {
|
|
|
429
436
|
/**
|
|
430
437
|
* Send a resource update notification to subscribed sessions only.
|
|
431
438
|
* Per MCP 2025-11-25 spec, only sessions that have subscribed to this
|
|
432
|
-
* resource via `resources/subscribe` will receive the notification.
|
|
439
|
+
* resource via `resources/subscribe` will receive the notification, and only while their caller may still read it.
|
|
433
440
|
*
|
|
434
441
|
* @param uri - The resource URI that was updated
|
|
435
442
|
*/
|
|
@@ -441,7 +448,24 @@ var NotificationService = class _NotificationService {
|
|
|
441
448
|
}
|
|
442
449
|
this.logger.verbose(`Notifying ${subscribers.length} subscriber(s) of resource update: ${uri}`);
|
|
443
450
|
for (const sessionId of subscribers) {
|
|
444
|
-
this.
|
|
451
|
+
void this.notifyIfStillReadable(sessionId, uri);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
/** Tell a subscribed session of an update when `resources:subscribe` still admits its latest, unexpired caller. */
|
|
455
|
+
async notifyIfStillReadable(sessionId, uri) {
|
|
456
|
+
const registered = this.servers.get(sessionId);
|
|
457
|
+
if (!registered || hasExpiredCaller(registered)) return;
|
|
458
|
+
const { callerMayStillRead } = await import("./resource-update-access.mjs");
|
|
459
|
+
let checkedCaller = registered.caller;
|
|
460
|
+
for (let attempt = 0; attempt < MAX_CALLER_RECHECKS; attempt++) {
|
|
461
|
+
const mayRead = await callerMayStillRead(this.scope, registered, checkedCaller, uri);
|
|
462
|
+
const current = this.servers.get(sessionId);
|
|
463
|
+
if (current !== registered || !this.isSubscribed(sessionId, uri) || hasExpiredCaller(current)) return;
|
|
464
|
+
if (isSameCaller(current.caller, checkedCaller)) {
|
|
465
|
+
if (mayRead) this.sendNotificationToSession(sessionId, "notifications/resources/updated", { uri });
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
checkedCaller = current.caller;
|
|
445
469
|
}
|
|
446
470
|
}
|
|
447
471
|
// =====================================================
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// libs/sdk/src/notification/resource-update-access.ts
|
|
2
|
+
import { runRequestExclusive } from "@frontmcp/utils";
|
|
3
|
+
import { mcpRequestSurface } from "../transport/mcp-handlers/mcp-surface.mjs";
|
|
4
|
+
async function callerMayStillRead(scope, session, caller, uri) {
|
|
5
|
+
const request = { method: "resources/subscribe", params: { uri } };
|
|
6
|
+
const authInfo = { ...caller, sessionId: session.sessionId };
|
|
7
|
+
const { platformEnv } = session;
|
|
8
|
+
const ctx = {
|
|
9
|
+
authInfo,
|
|
10
|
+
surface: mcpRequestSurface(scope),
|
|
11
|
+
ownRequest: true,
|
|
12
|
+
checkOnly: true,
|
|
13
|
+
...platformEnv !== void 0 ? { platformEnv } : {}
|
|
14
|
+
};
|
|
15
|
+
return runRequestExclusive(() => scope.runFlow("resources:subscribe", { request, ctx })).then(
|
|
16
|
+
() => true,
|
|
17
|
+
() => false
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
callerMayStillRead
|
|
22
|
+
};
|
|
@@ -74,6 +74,8 @@ var plan = {
|
|
|
74
74
|
"parseInput",
|
|
75
75
|
"ensureRemoteCapabilities",
|
|
76
76
|
"findPrompt",
|
|
77
|
+
// A hook that switched the prompt hands the run over to the hooks of the prompt that runs
|
|
78
|
+
"usePromptHooks",
|
|
77
79
|
"checkEnabled",
|
|
78
80
|
"checkAppLoaded",
|
|
79
81
|
"checkPublicAccess",
|
|
@@ -198,6 +200,14 @@ var GetPromptFlow = class extends FlowBase {
|
|
|
198
200
|
this.logger.verbose(`findPrompt: prompt "${prompt.name}" found`);
|
|
199
201
|
this.logger.verbose("findPrompt:done");
|
|
200
202
|
}
|
|
203
|
+
async usePromptHooks() {
|
|
204
|
+
const { prompt } = this.state;
|
|
205
|
+
if (!prompt) return;
|
|
206
|
+
await this.useEntryHooks(
|
|
207
|
+
appOwnerIdOf(this.scope.prompts.lineageOf(prompt) ?? [], prompt.owner),
|
|
208
|
+
prompt.record.provide
|
|
209
|
+
);
|
|
210
|
+
}
|
|
201
211
|
async checkEnabled() {
|
|
202
212
|
const { prompt } = this.state.required;
|
|
203
213
|
await assertEntryEnabled("Prompt", prompt.name, prompt.metadata.enabled, this.tryGetContext(), this.logger);
|
|
@@ -357,6 +367,9 @@ __decorateClass([
|
|
|
357
367
|
__decorateClass([
|
|
358
368
|
Stage("findPrompt")
|
|
359
369
|
], GetPromptFlow.prototype, "findPrompt", 1);
|
|
370
|
+
__decorateClass([
|
|
371
|
+
Stage("usePromptHooks")
|
|
372
|
+
], GetPromptFlow.prototype, "usePromptHooks", 1);
|
|
360
373
|
__decorateClass([
|
|
361
374
|
Stage("checkEnabled")
|
|
362
375
|
], GetPromptFlow.prototype, "checkEnabled", 1);
|
|
@@ -23,7 +23,11 @@ import {
|
|
|
23
23
|
} from "../errors/transport.errors.mjs";
|
|
24
24
|
import { McpStatelessClientAdapter, negotiateRemoteProtocol } from "./mcp-stateless-client.adapter.mjs";
|
|
25
25
|
import { RemoteOAuthTokenSource } from "./remote-oauth.mjs";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
createRemoteRequestFetch,
|
|
28
|
+
createRemoteRequestScopes,
|
|
29
|
+
withRemoteRequestHeaders
|
|
30
|
+
} from "./remote-request-headers.mjs";
|
|
27
31
|
import {
|
|
28
32
|
CircuitBreakerManager,
|
|
29
33
|
CircuitOpenError,
|
|
@@ -123,7 +127,8 @@ var McpClientService = class {
|
|
|
123
127
|
this.updateConnectionStatus(appId, "connecting");
|
|
124
128
|
try {
|
|
125
129
|
const headers = await this.connectionHeaders(request);
|
|
126
|
-
const
|
|
130
|
+
const requestScopes = createRemoteRequestScopes();
|
|
131
|
+
const connection2026 = await this.tryConnect2026(request, headers, requestScopes);
|
|
127
132
|
if (connection2026) {
|
|
128
133
|
this.connections.set(appId, connection2026);
|
|
129
134
|
await this.discoverCapabilities(appId);
|
|
@@ -136,7 +141,7 @@ var McpClientService = class {
|
|
|
136
141
|
return connection2026;
|
|
137
142
|
}
|
|
138
143
|
const protocolClient = await loadProtocolClient();
|
|
139
|
-
let transport = this.createTransport(protocolClient, request, headers);
|
|
144
|
+
let transport = this.createTransport(protocolClient, request, headers, requestScopes);
|
|
140
145
|
const client = new protocolClient.Client(
|
|
141
146
|
{
|
|
142
147
|
name: this.options.clientName,
|
|
@@ -155,7 +160,7 @@ var McpClientService = class {
|
|
|
155
160
|
this.logger.debug(
|
|
156
161
|
`Streamable HTTP connection failed for ${appId}: ${connectError.message}. Falling back to SSE transport.`
|
|
157
162
|
);
|
|
158
|
-
transport = this.createFallbackSSETransport(protocolClient, request, headers);
|
|
163
|
+
transport = this.createFallbackSSETransport(protocolClient, request, headers, requestScopes);
|
|
159
164
|
await this.connectWithin(appId, client, transport);
|
|
160
165
|
} else {
|
|
161
166
|
throw connectError;
|
|
@@ -164,6 +169,7 @@ var McpClientService = class {
|
|
|
164
169
|
const connection = {
|
|
165
170
|
client,
|
|
166
171
|
transport,
|
|
172
|
+
requestScopes,
|
|
167
173
|
status: "connected",
|
|
168
174
|
connectedAt: /* @__PURE__ */ new Date(),
|
|
169
175
|
lastHeartbeat: /* @__PURE__ */ new Date(),
|
|
@@ -362,6 +368,7 @@ var McpClientService = class {
|
|
|
362
368
|
appId,
|
|
363
369
|
toolName,
|
|
364
370
|
() => withRemoteRequestHeaders(
|
|
371
|
+
connection.requestScopes,
|
|
365
372
|
callerHeaders,
|
|
366
373
|
() => connection.client.callTool({ name: toolName, arguments: args })
|
|
367
374
|
)
|
|
@@ -418,7 +425,11 @@ var McpClientService = class {
|
|
|
418
425
|
const result = await this.withinTimeout(
|
|
419
426
|
appId,
|
|
420
427
|
uri,
|
|
421
|
-
() => withRemoteRequestHeaders(
|
|
428
|
+
() => withRemoteRequestHeaders(
|
|
429
|
+
connection.requestScopes,
|
|
430
|
+
callerHeaders,
|
|
431
|
+
() => connection.client.readResource({ uri })
|
|
432
|
+
)
|
|
422
433
|
);
|
|
423
434
|
connection.lastHeartbeat = /* @__PURE__ */ new Date();
|
|
424
435
|
const durationMs = Date.now() - startTime;
|
|
@@ -451,6 +462,7 @@ var McpClientService = class {
|
|
|
451
462
|
appId,
|
|
452
463
|
promptName,
|
|
453
464
|
() => withRemoteRequestHeaders(
|
|
465
|
+
connection.requestScopes,
|
|
454
466
|
callerHeaders,
|
|
455
467
|
() => connection.client.getPrompt({ name: promptName, arguments: args })
|
|
456
468
|
)
|
|
@@ -595,8 +607,8 @@ var McpClientService = class {
|
|
|
595
607
|
);
|
|
596
608
|
}
|
|
597
609
|
/** The `fetch` a transport to the remote sends through, with the connection's OAuth token when it has one. */
|
|
598
|
-
remoteFetchOf(request, headers) {
|
|
599
|
-
return createRemoteRequestFetch(headers !== void 0, this.oauthSources.get(request.appId));
|
|
610
|
+
remoteFetchOf(request, headers, requestScopes) {
|
|
611
|
+
return createRemoteRequestFetch(requestScopes, headers !== void 0, this.oauthSources.get(request.appId));
|
|
600
612
|
}
|
|
601
613
|
/** Milliseconds one request to `appId` may take: its `transportOptions.timeout`, else 30 seconds. */
|
|
602
614
|
timeoutOf(appId) {
|
|
@@ -639,7 +651,7 @@ var McpClientService = class {
|
|
|
639
651
|
* Returns `undefined` for every other case so the legacy path below runs
|
|
640
652
|
* completely untouched \u2014 the default for an unconfigured remote.
|
|
641
653
|
*/
|
|
642
|
-
async tryConnect2026(request, headers) {
|
|
654
|
+
async tryConnect2026(request, headers, requestScopes) {
|
|
643
655
|
const httpOptions = request.transportOptions;
|
|
644
656
|
if (request.transportType !== "http") {
|
|
645
657
|
if (httpOptions?.protocolVersion === "2026-07-28") {
|
|
@@ -650,7 +662,7 @@ var McpClientService = class {
|
|
|
650
662
|
}
|
|
651
663
|
return void 0;
|
|
652
664
|
}
|
|
653
|
-
const remoteFetch = this.remoteFetchOf(request, headers);
|
|
665
|
+
const remoteFetch = this.remoteFetchOf(request, headers, requestScopes);
|
|
654
666
|
const requestTimeoutMs = this.timeoutOf(request.appId);
|
|
655
667
|
const negotiated = await negotiateRemoteProtocol(request.url, httpOptions?.protocolVersion, headers, remoteFetch, {
|
|
656
668
|
requestTimeoutMs
|
|
@@ -671,17 +683,18 @@ var McpClientService = class {
|
|
|
671
683
|
// that every consumer would then have to narrow.
|
|
672
684
|
client: adapter,
|
|
673
685
|
// No `transport`: this revision is stateless, so there is nothing to keep.
|
|
686
|
+
requestScopes,
|
|
674
687
|
status: "connected",
|
|
675
688
|
connectedAt: /* @__PURE__ */ new Date(),
|
|
676
689
|
lastHeartbeat: /* @__PURE__ */ new Date(),
|
|
677
690
|
capabilities: adapter.getServerCapabilities()
|
|
678
691
|
};
|
|
679
692
|
}
|
|
680
|
-
createTransport(protocolClient, request, headers) {
|
|
693
|
+
createTransport(protocolClient, request, headers, requestScopes) {
|
|
681
694
|
const { transportType, url } = request;
|
|
682
695
|
const options = {
|
|
683
696
|
requestInit: headers ? { headers } : void 0,
|
|
684
|
-
fetch: this.remoteFetchOf(request, headers)
|
|
697
|
+
fetch: this.remoteFetchOf(request, headers, requestScopes)
|
|
685
698
|
};
|
|
686
699
|
switch (transportType) {
|
|
687
700
|
case "http":
|
|
@@ -699,10 +712,10 @@ var McpClientService = class {
|
|
|
699
712
|
/**
|
|
700
713
|
* Create fallback SSE transport when Streamable HTTP fails
|
|
701
714
|
*/
|
|
702
|
-
createFallbackSSETransport({ SSEClientTransport }, request, headers) {
|
|
715
|
+
createFallbackSSETransport({ SSEClientTransport }, request, headers, requestScopes) {
|
|
703
716
|
return new SSEClientTransport(new URL(request.url), {
|
|
704
717
|
requestInit: headers ? { headers } : void 0,
|
|
705
|
-
fetch: this.remoteFetchOf(request, headers)
|
|
718
|
+
fetch: this.remoteFetchOf(request, headers, requestScopes)
|
|
706
719
|
});
|
|
707
720
|
}
|
|
708
721
|
/**
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { AsyncLocalStorage } from "@frontmcp/utils";
|
|
3
3
|
import { retryAfterMsOf } from "../transport/mcp-20260728/client/mcp-stateless.client.mjs";
|
|
4
4
|
import { remoteHttpFailureOf } from "./resilience/retry.mjs";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function createRemoteRequestScopes() {
|
|
6
|
+
return new AsyncLocalStorage();
|
|
7
|
+
}
|
|
8
|
+
async function withRemoteRequestHeaders(requestScopes, headers, operation) {
|
|
7
9
|
const scope = { headers };
|
|
8
10
|
try {
|
|
9
11
|
return await requestScopes.run(scope, operation);
|
|
@@ -18,7 +20,7 @@ function withRefusal(error, refusal) {
|
|
|
18
20
|
}
|
|
19
21
|
return Object.assign(error, { http: refusal });
|
|
20
22
|
}
|
|
21
|
-
function createRemoteRequestFetch(connectionCarriesHeaders, oauth) {
|
|
23
|
+
function createRemoteRequestFetch(requestScopes, connectionCarriesHeaders, oauth) {
|
|
22
24
|
return async (input, init) => {
|
|
23
25
|
const scope = requestScopes.getStore();
|
|
24
26
|
const extra = scope?.headers ?? {};
|
|
@@ -47,5 +49,6 @@ function withHeaders(init, extra) {
|
|
|
47
49
|
}
|
|
48
50
|
export {
|
|
49
51
|
createRemoteRequestFetch,
|
|
52
|
+
createRemoteRequestScopes,
|
|
50
53
|
withRemoteRequestHeaders
|
|
51
54
|
};
|
|
@@ -183,29 +183,10 @@ var ReadResourceFlow = class extends FlowBase {
|
|
|
183
183
|
const { uri } = this.state.required.input;
|
|
184
184
|
const loggedUri = escapeControlCharacters(uri);
|
|
185
185
|
this.logger.verbose(`findResource: looking for resource with URI "${loggedUri}"`);
|
|
186
|
-
if (isUIResourceUri(uri)) {
|
|
187
|
-
this.logger.verbose(`findResource:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.logger.verbose(`findResource: platform type for session: ${platformType ?? "unknown"}`);
|
|
191
|
-
if (!this.scope.toolUI) {
|
|
192
|
-
this.logger.verbose("findResource: toolUI not available, skipping UI resource handling");
|
|
193
|
-
throw new ResourceNotFoundError(uri);
|
|
194
|
-
}
|
|
195
|
-
const { handleUIResourceRead } = await import("../../tool/ui/ui-resource.handler.mjs");
|
|
196
|
-
const serverUrl = this.tryGetContext()?.metadata.serverUrl ?? getPinnedPublicUrl();
|
|
197
|
-
const uiResult = handleUIResourceRead(uri, this.scope.toolUI, platformType, serverUrl);
|
|
198
|
-
if (uiResult.handled) {
|
|
199
|
-
if (uiResult.error) {
|
|
200
|
-
this.logger.warn(`findResource: UI resource error - ${escapeControlCharacters(uiResult.error)}`);
|
|
201
|
-
throw new ResourceNotFoundError(uri);
|
|
202
|
-
}
|
|
203
|
-
this.state.set("isUIResource", true);
|
|
204
|
-
this.state.set("uiResourceResult", uiResult.result);
|
|
205
|
-
this.logger.verbose(`findResource: UI resource "${loggedUri}" resolved from cache`);
|
|
206
|
-
this.logger.verbose("findResource:done");
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
186
|
+
if (isUIResourceUri(uri) && await this.resolveToolWidget(uri)) {
|
|
187
|
+
this.logger.verbose(`findResource: UI resource "${loggedUri}" resolved from cache`);
|
|
188
|
+
this.logger.verbose("findResource:done");
|
|
189
|
+
return;
|
|
209
190
|
}
|
|
210
191
|
const match = resolvedResources.take(this.rawInput, uri) ?? this.scope.resources.findResourceForUri(uri);
|
|
211
192
|
if (!match) {
|
|
@@ -239,6 +220,22 @@ var ReadResourceFlow = class extends FlowBase {
|
|
|
239
220
|
);
|
|
240
221
|
this.logger.verbose("findResource:done");
|
|
241
222
|
}
|
|
223
|
+
/** Whether `uri` names a tool's widget, kept for 'finalize'; any other `ui://` URI is looked up as a resource. */
|
|
224
|
+
async resolveToolWidget(uri) {
|
|
225
|
+
const toolUI = this.scope.toolUI;
|
|
226
|
+
if (!toolUI?.holdsWidgetUri(uri)) return false;
|
|
227
|
+
const { sessionId, authInfo } = this.state;
|
|
228
|
+
const platformType = authInfo?.sessionIdPayload?.platformType ?? this.tryGetContext()?.platformType ?? (sessionId ? this.scope.notifications.getPlatformType(sessionId) : void 0);
|
|
229
|
+
const { handleUIResourceRead } = await import("../../tool/ui/ui-resource.handler.mjs");
|
|
230
|
+
const serverUrl = this.tryGetContext()?.metadata.serverUrl ?? getPinnedPublicUrl();
|
|
231
|
+
const uiResult = handleUIResourceRead(uri, toolUI, platformType, serverUrl);
|
|
232
|
+
if (uiResult.error || !uiResult.result) {
|
|
233
|
+
this.logger.warn(`findResource: UI resource error - ${escapeControlCharacters(uiResult.error ?? "no result")}`);
|
|
234
|
+
throw new ResourceNotFoundError(uri);
|
|
235
|
+
}
|
|
236
|
+
this.state.set({ isUIResource: true, uiResourceResult: uiResult.result });
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
242
239
|
async checkEnabled() {
|
|
243
240
|
const { resource } = this.state;
|
|
244
241
|
if (!resource) return;
|
|
@@ -61,14 +61,19 @@ var SubscribeResourceFlow = class extends FlowBase {
|
|
|
61
61
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
62
62
|
throw new InvalidMethodError(method, "resources/subscribe");
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const checkOnly = ctx?.checkOnly === true;
|
|
65
|
+
const sessionId = checkOnly ? void 0 : mcpRequestSessionId(ctx);
|
|
65
66
|
this.state.set({ input: params, sessionId });
|
|
66
67
|
this.logger.verbose("parseInput:done");
|
|
67
68
|
}
|
|
68
69
|
async validateResource() {
|
|
69
70
|
this.logger.verbose("validateResource:start");
|
|
70
71
|
const { uri } = this.state.required.input;
|
|
71
|
-
|
|
72
|
+
const toolUI = this.scope.toolUI;
|
|
73
|
+
if (isUIResourceUri(uri) && toolUI?.holdsWidgetUri(uri)) {
|
|
74
|
+
if (toolUI.hasWidget(uri)) return;
|
|
75
|
+
throw new ResourceNotFoundError(uri);
|
|
76
|
+
}
|
|
72
77
|
let match = this.scope.resources.findResourceForUri(uri);
|
|
73
78
|
if (!match) {
|
|
74
79
|
await loadRemoteAppCapabilities(this.scope);
|
|
@@ -116,10 +121,10 @@ var SubscribeResourceFlow = class extends FlowBase {
|
|
|
116
121
|
const { uri } = this.state.required.input;
|
|
117
122
|
const { sessionId } = this.state;
|
|
118
123
|
if (!sessionId) {
|
|
119
|
-
this.logger.verbose("subscribe: no session ID in the request context");
|
|
124
|
+
this.logger.verbose("subscribe: no session ID in the request context, or a check-only request");
|
|
120
125
|
return;
|
|
121
126
|
}
|
|
122
|
-
const isNew = this.scope.notifications.subscribeResource(sessionId, uri);
|
|
127
|
+
const isNew = this.scope.notifications.subscribeResource(sessionId, uri, this.tryGetContext()?.platformEnv);
|
|
123
128
|
if (isNew) {
|
|
124
129
|
this.logger.info(`subscribe: session subscribed to resource ${uri}`);
|
|
125
130
|
} else {
|
|
@@ -94,6 +94,15 @@ var ToolUIRegistry = class {
|
|
|
94
94
|
resolveCustomUri(uri) {
|
|
95
95
|
return this.customUris.get(uri);
|
|
96
96
|
}
|
|
97
|
+
/** Whether only a tool's widget answers `uri`: the `ui://widget/` namespace or a tool's custom `ui.resourceUri`. */
|
|
98
|
+
holdsWidgetUri(uri) {
|
|
99
|
+
return isStaticWidgetUri(uri) || this.customUris.has(uri);
|
|
100
|
+
}
|
|
101
|
+
/** Whether `uri` names the widget of a tool that declared a UI. */
|
|
102
|
+
hasWidget(uri) {
|
|
103
|
+
const toolName = this.resolveCustomUri(uri) ?? parseWidgetUri(uri)?.toolName;
|
|
104
|
+
return toolName !== void 0 && this.hasTool(toolName);
|
|
105
|
+
}
|
|
97
106
|
/**
|
|
98
107
|
* Whether `name` (or its app-qualified form `app:name`) is a tool with a UI.
|
|
99
108
|
*/
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import { lookupTool } from "../../common/utils/tool-lookup.utils.mjs";
|
|
31
31
|
import { FrontMcpContextStorage } from "../../context/index.mjs";
|
|
32
32
|
import { resolvePlatformType, supportsChannels } from "../../notification/index.mjs";
|
|
33
|
+
import { hasExpiredCaller, sessionCallerOf } from "../../notification/notification.service.mjs";
|
|
33
34
|
import { composeCallerInstructions } from "../../skill/skill-instructions.helper.mjs";
|
|
34
35
|
import {
|
|
35
36
|
createSubscriptionStream,
|
|
@@ -37,6 +38,7 @@ import {
|
|
|
37
38
|
dispatch20260728,
|
|
38
39
|
eventStreamFrames,
|
|
39
40
|
isProtocol20260728Request,
|
|
41
|
+
listenerMayReceive,
|
|
40
42
|
MCP_HEADERS,
|
|
41
43
|
readHeader,
|
|
42
44
|
RequestNotificationSink,
|
|
@@ -250,7 +252,8 @@ var HandleMcp20260728Flow = class extends FlowBase {
|
|
|
250
252
|
return;
|
|
251
253
|
}
|
|
252
254
|
const auth = request[ServerRequestTokens.auth];
|
|
253
|
-
const
|
|
255
|
+
const listenerAuthInfo = auth ? authInfoFromAuthorization(auth) : {};
|
|
256
|
+
const mayRead = this.resourceReadCheck(listenerAuthInfo);
|
|
254
257
|
const requested = {
|
|
255
258
|
...parsedParams.data.notifications,
|
|
256
259
|
resourceSubscriptions: await this.readableUris(parsedParams.data.notifications.resourceSubscriptions, mayRead)
|
|
@@ -267,8 +270,11 @@ var HandleMcp20260728Flow = class extends FlowBase {
|
|
|
267
270
|
requested,
|
|
268
271
|
channels: await this.listenedChannels(body["params"]?._meta),
|
|
269
272
|
signal: controller.signal,
|
|
270
|
-
//
|
|
271
|
-
mayReceiveUpdate:
|
|
273
|
+
// Not once its credentials expired; an update of a URI no resource names is checked as the URI it sits under
|
|
274
|
+
mayReceiveUpdate: (uri, watchedUri) => listenerMayReceive(
|
|
275
|
+
() => hasExpiredCaller({ caller: sessionCallerOf(listenerAuthInfo) }),
|
|
276
|
+
() => mayRead(this.scope.resources.findResourceForUri(uri) ? uri : watchedUri)
|
|
277
|
+
)
|
|
272
278
|
});
|
|
273
279
|
this.log.info("handleSubscriptions: stream opened", {
|
|
274
280
|
subscriptionId: body["id"],
|
|
@@ -7,7 +7,7 @@ export { RequestNotificationSink, meetsLogLevel } from "./request-notifications.
|
|
|
7
7
|
export { decorateResult, isShapedPerCaller, orderListResult, resolveCacheScope } from "./result-decorator.mjs";
|
|
8
8
|
export { buildDiscoverCapabilities, buildDiscoverResult } from "./discover.mjs";
|
|
9
9
|
export { MrtrExchange, buildInputRequiredResult } from "./mrtr.mjs";
|
|
10
|
-
export { createSubscriptionStream, resolveAcknowledgedFilter } from "./subscriptions.mjs";
|
|
10
|
+
export { createSubscriptionStream, listenerMayReceive, resolveAcknowledgedFilter } from "./subscriptions.mjs";
|
|
11
11
|
export { eventStreamFrames } from "./event-stream-response.mjs";
|
|
12
12
|
export { TASKS_EXTENSION_ID, TASKS_EXTENSION_METHODS, TERMINAL_TASK_STATUSES, buildCreateTaskResult, clientSupportsTasks, dispatchTasksMethod, resolveTaskOwner, taskToWire20260728 } from "./tasks-extension.mjs";
|
|
13
13
|
export { MRTR_CAPABLE_METHODS, dispatch20260728, resolvePrincipal, resolveTaskPrincipal, toJsonRpcError } from "./dispatcher.mjs";
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { MCP_20260728_META, SUBSCRIPTIONS_ACKNOWLEDGED_METHOD } from "@frontmcp/protocol";
|
|
3
3
|
import { CHANNEL_NOTIFICATION_METHOD } from "../../channel/channel.utils.mjs";
|
|
4
4
|
import { announcesListChangeNow } from "../../surface/list-change-batch.mjs";
|
|
5
|
+
async function listenerMayReceive(isExpired, mayRead) {
|
|
6
|
+
if (isExpired()) return false;
|
|
7
|
+
return await mayRead() && !isExpired();
|
|
8
|
+
}
|
|
5
9
|
var KEEPALIVE_INTERVAL_MS = 15e3;
|
|
6
10
|
function resolveAcknowledgedFilter(scope, requested) {
|
|
7
11
|
const acknowledged = {};
|
|
@@ -56,12 +60,9 @@ function createSubscriptionStream(options) {
|
|
|
56
60
|
const uri = typeof updatedUri === "string" ? updatedUri : void 0;
|
|
57
61
|
if (event.kind === "updated") {
|
|
58
62
|
if (!uri) return;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
if (![...watchedUris].some((watched) => uri.startsWith(watched))) return;
|
|
64
|
-
void (mayReceiveUpdate?.(uri) ?? Promise.resolve(true)).then(
|
|
63
|
+
const watchedUri = [...watchedUris].filter((watched) => uri.startsWith(watched)).sort((longer, shorter) => shorter.length - longer.length)[0];
|
|
64
|
+
if (watchedUri === void 0) return;
|
|
65
|
+
void (mayReceiveUpdate?.(uri, watchedUri) ?? Promise.resolve(true)).then(
|
|
65
66
|
(allowed) => allowed && push("notifications/resources/updated", { uri }),
|
|
66
67
|
() => void 0
|
|
67
68
|
);
|
|
@@ -138,5 +139,6 @@ function createSubscriptionStream(options) {
|
|
|
138
139
|
}
|
|
139
140
|
export {
|
|
140
141
|
createSubscriptionStream,
|
|
142
|
+
listenerMayReceive,
|
|
141
143
|
resolveAcknowledgedFilter
|
|
142
144
|
};
|
|
@@ -53,6 +53,7 @@ export declare abstract class FlowBase<N extends FlowName = FlowName> {
|
|
|
53
53
|
protected readonly scope: ScopeEntry;
|
|
54
54
|
protected readonly appendContextHooks: (hooks: Array<Pick<HookEntry, 'metadata'>>) => void;
|
|
55
55
|
protected readonly deps: ReadonlyMap<Token, unknown>;
|
|
56
|
+
private readonly retargetEntryHooks?;
|
|
56
57
|
/**
|
|
57
58
|
* The id of the app that owns the entry a run targets, read from the raw input before hooks load.
|
|
58
59
|
* Entries an app's adapters and plugins provide belong to that app. App-scoped hooks run only when it matches their app.
|
|
@@ -70,7 +71,7 @@ export declare abstract class FlowBase<N extends FlowName = FlowName> {
|
|
|
70
71
|
protected input: FlowInputOf<N>;
|
|
71
72
|
state: FlowStateOf<N>;
|
|
72
73
|
scopeLogger: FrontMcpLogger;
|
|
73
|
-
constructor(metadata: FlowMetadata<N>, rawInput: Partial<FlowInputOf<N>> | any, scope: ScopeEntry, appendContextHooks: (hooks: Array<Pick<HookEntry, 'metadata'>>) => void, deps?: ReadonlyMap<Token, unknown>);
|
|
74
|
+
constructor(metadata: FlowMetadata<N>, rawInput: Partial<FlowInputOf<N>> | any, scope: ScopeEntry, appendContextHooks: (hooks: Array<Pick<HookEntry, 'metadata'>>) => void, deps?: ReadonlyMap<Token, unknown>, retargetEntryHooks?: ((ownerId: string | undefined, entryClass: Token | undefined) => Promise<void>) | undefined);
|
|
74
75
|
get<T>(token: Token<T>): T;
|
|
75
76
|
/** The request this run serves; its fields are undefined when the run has no request context. */
|
|
76
77
|
get request(): FlowRequestInfo;
|
|
@@ -81,6 +82,8 @@ export declare abstract class FlowBase<N extends FlowName = FlowName> {
|
|
|
81
82
|
/** The first failure of the run (`state.flowError`), for the stages and `Finally` hooks after it. */
|
|
82
83
|
get error(): Error | undefined;
|
|
83
84
|
set error(value: Error | undefined);
|
|
85
|
+
/** Hand the stages still to come to the app and `static` hooks of the entry a hook switched to, in place of the first's. */
|
|
86
|
+
protected useEntryHooks(ownerId: string | undefined, entryClass: Token | undefined): Promise<void>;
|
|
84
87
|
respond(output: FlowOutputOf<N>): void;
|
|
85
88
|
fail(error: Error): void;
|
|
86
89
|
protected abort(message: string): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.interface.d.ts","sourceRoot":"","sources":["../../../src/common/interfaces/flow.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAG5C,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO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