@salesforce/sdk-core 1.60.2 → 1.61.0
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/dist/capabilities.d.ts +43 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +84 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/jsonrpc-client.d.ts.map +1 -1
- package/dist/jsonrpc-client.js +7 -4
- package/dist/mcpapps-session.d.ts +64 -0
- package/dist/mcpapps-session.d.ts.map +1 -0
- package/dist/mcpapps-session.js +99 -0
- package/dist/platforms.d.ts +0 -9
- package/dist/platforms.d.ts.map +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +20 -15
- package/dist/view.d.ts +17 -0
- package/dist/view.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { Surface } from "./surface.js";
|
|
7
|
+
/**
|
|
8
|
+
* Static capability map for each surface.
|
|
9
|
+
*
|
|
10
|
+
* Indicates which ChatSDK / ViewSDK methods are available on a given surface.
|
|
11
|
+
* Use this to conditionally render UI or feature-gate functionality.
|
|
12
|
+
*/
|
|
13
|
+
export interface SurfaceCapabilities {
|
|
14
|
+
callTool: boolean;
|
|
15
|
+
sendMessageToHost: boolean;
|
|
16
|
+
readResource: boolean;
|
|
17
|
+
accessToolInput: boolean;
|
|
18
|
+
accessToolOutput: boolean;
|
|
19
|
+
accessToolMetadata: boolean;
|
|
20
|
+
getWidgetState: boolean;
|
|
21
|
+
setWidgetState: boolean;
|
|
22
|
+
onToolCanceled: boolean;
|
|
23
|
+
setDisplayMode: boolean;
|
|
24
|
+
subscribe: boolean;
|
|
25
|
+
displayAlert: boolean;
|
|
26
|
+
displayToast: boolean;
|
|
27
|
+
displayModal: boolean;
|
|
28
|
+
getTheme: boolean;
|
|
29
|
+
resize: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns the static capability map for a given surface.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const caps = getSurfaceCapabilities(Surface.MCPApps);
|
|
37
|
+
* if (caps.displayAlert) {
|
|
38
|
+
* viewSdk.displayAlert?.({ message: "Hello", level: "info" });
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function getSurfaceCapabilities(surface: Surface): SurfaceCapabilities;
|
|
43
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAEnC,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IAGnB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAElB,MAAM,EAAE,OAAO,CAAC;CAChB;AA8DD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,mBAAmB,CAY5E"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { Surface } from "./surface.js";
|
|
7
|
+
const MCPAPPS_CAPABILITIES = {
|
|
8
|
+
callTool: true,
|
|
9
|
+
sendMessageToHost: true,
|
|
10
|
+
readResource: true,
|
|
11
|
+
accessToolInput: true,
|
|
12
|
+
accessToolOutput: true,
|
|
13
|
+
accessToolMetadata: false, // stub
|
|
14
|
+
getWidgetState: false,
|
|
15
|
+
setWidgetState: false,
|
|
16
|
+
onToolCanceled: true,
|
|
17
|
+
setDisplayMode: true,
|
|
18
|
+
subscribe: true,
|
|
19
|
+
displayAlert: true,
|
|
20
|
+
displayToast: true,
|
|
21
|
+
displayModal: false, // TODO
|
|
22
|
+
getTheme: true,
|
|
23
|
+
resize: true,
|
|
24
|
+
};
|
|
25
|
+
const OPENAI_CAPABILITIES = {
|
|
26
|
+
callTool: true,
|
|
27
|
+
sendMessageToHost: true,
|
|
28
|
+
readResource: false,
|
|
29
|
+
accessToolInput: true,
|
|
30
|
+
accessToolOutput: true,
|
|
31
|
+
accessToolMetadata: true,
|
|
32
|
+
getWidgetState: true,
|
|
33
|
+
setWidgetState: true,
|
|
34
|
+
onToolCanceled: false,
|
|
35
|
+
setDisplayMode: true,
|
|
36
|
+
subscribe: true,
|
|
37
|
+
displayAlert: true,
|
|
38
|
+
displayToast: true,
|
|
39
|
+
displayModal: true,
|
|
40
|
+
getTheme: true,
|
|
41
|
+
resize: false,
|
|
42
|
+
};
|
|
43
|
+
const EMPTY_CAPABILITIES = {
|
|
44
|
+
callTool: false,
|
|
45
|
+
sendMessageToHost: false,
|
|
46
|
+
readResource: false,
|
|
47
|
+
accessToolInput: false,
|
|
48
|
+
accessToolOutput: false,
|
|
49
|
+
accessToolMetadata: false,
|
|
50
|
+
getWidgetState: false,
|
|
51
|
+
setWidgetState: false,
|
|
52
|
+
onToolCanceled: false,
|
|
53
|
+
setDisplayMode: false,
|
|
54
|
+
subscribe: false,
|
|
55
|
+
displayAlert: false,
|
|
56
|
+
displayToast: false,
|
|
57
|
+
displayModal: false,
|
|
58
|
+
getTheme: false,
|
|
59
|
+
resize: false,
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Returns the static capability map for a given surface.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const caps = getSurfaceCapabilities(Surface.MCPApps);
|
|
67
|
+
* if (caps.displayAlert) {
|
|
68
|
+
* viewSdk.displayAlert?.({ message: "Hello", level: "info" });
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export function getSurfaceCapabilities(surface) {
|
|
73
|
+
switch (surface) {
|
|
74
|
+
case Surface.MCPApps:
|
|
75
|
+
return { ...MCPAPPS_CAPABILITIES };
|
|
76
|
+
case Surface.OpenAI:
|
|
77
|
+
return { ...OPENAI_CAPABILITIES };
|
|
78
|
+
case Surface.WebApp:
|
|
79
|
+
case Surface.MicroFrontend:
|
|
80
|
+
case Surface.SalesforceACC:
|
|
81
|
+
default:
|
|
82
|
+
return { ...EMPTY_CAPABILITIES };
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,4 +13,8 @@ export type { OpenAISDK, SalesforceACCSDK } from "./platforms.js";
|
|
|
13
13
|
export type { JsonRpcBase, JsonRpcRequest, JsonRpcError, JsonRpcSuccessResponse, JsonRpcErrorResponse, JsonRpcResponse, JsonRpcNotification, JsonRpcMessage, JsonRpcPendingRequest, JsonRpcPendingRequestMap, } from "./jsonrpc.js";
|
|
14
14
|
export { isJsonRpcBase, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, isJsonRpcResponse, isJsonRpcNotification, isJsonRpcRequest, } from "./jsonrpc.js";
|
|
15
15
|
export { JsonRpcClient } from "./jsonrpc-client.js";
|
|
16
|
+
export { McpAppsSession } from "./mcpapps-session.js";
|
|
17
|
+
export type { HostContext, McpAppsSessionOptions } from "./mcpapps-session.js";
|
|
18
|
+
export { getSurfaceCapabilities } from "./capabilities.js";
|
|
19
|
+
export type { SurfaceCapabilities } from "./capabilities.js";
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAGnD,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,YAAY,EACX,WAAW,EACX,OAAO,EACP,WAAW,EACX,eAAe,EACf,QAAQ,EACR,SAAS,GACT,MAAM,WAAW,CAAC;AAGnB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,GACP,MAAM,WAAW,CAAC;AAGnB,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG1D,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhG,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlE,YAAY,EACX,WAAW,EACX,cAAc,EACd,YAAY,EACZ,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACN,aAAa,EACb,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,GAChB,M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mB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,3 +7,7 @@
|
|
|
7
7
|
export { Surface, getSurface } from "./surface.js";
|
|
8
8
|
export { isJsonRpcBase, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, isJsonRpcResponse, isJsonRpcNotification, isJsonRpcRequest, } from "./jsonrpc.js";
|
|
9
9
|
export { JsonRpcClient } from "./jsonrpc-client.js";
|
|
10
|
+
// MCP Apps shared session
|
|
11
|
+
export { McpAppsSession } from "./mcpapps-session.js";
|
|
12
|
+
// Surface capabilities
|
|
13
|
+
export { getSurfaceCapabilities } from "./capabilities.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonrpc-client.d.ts","sourceRoot":"","sources":["../src/jsonrpc-client.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"jsonrpc-client.d.ts","sourceRoot":"","sources":["../src/jsonrpc-client.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,oBAAoB,CAAqD;;IAOjF;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAO/F;;;OAGG;IACH,OAAO,CAAC,SAAS,CA4Bf;IAEF;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACrD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACb,OAAO,CAAC,OAAO,CAAC;IAkBnB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;CAQrF"}
|
package/dist/jsonrpc-client.js
CHANGED
|
@@ -42,7 +42,10 @@ export class JsonRpcClient {
|
|
|
42
42
|
* });
|
|
43
43
|
*/
|
|
44
44
|
registerNotificationHandler(method, handler) {
|
|
45
|
-
this.notificationHandlers.
|
|
45
|
+
if (!this.notificationHandlers.has(method)) {
|
|
46
|
+
this.notificationHandlers.set(method, new Set());
|
|
47
|
+
}
|
|
48
|
+
this.notificationHandlers.get(method).add(handler);
|
|
46
49
|
}
|
|
47
50
|
/**
|
|
48
51
|
* Handle incoming JSON-RPC messages from parent window
|
|
@@ -68,9 +71,9 @@ export class JsonRpcClient {
|
|
|
68
71
|
}
|
|
69
72
|
// Handle JSON-RPC notifications
|
|
70
73
|
if (isJsonRpcNotification(data)) {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
handler(data.params);
|
|
74
|
+
const handlers = this.notificationHandlers.get(data.method);
|
|
75
|
+
if (handlers) {
|
|
76
|
+
handlers.forEach((handler) => handler(data.params));
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { JsonRpcClient } from "./jsonrpc-client.js";
|
|
7
|
+
import type { ThemeMode } from "./view.js";
|
|
8
|
+
/**
|
|
9
|
+
* Host context returned by the ui/initialize handshake.
|
|
10
|
+
*/
|
|
11
|
+
export interface HostContext {
|
|
12
|
+
/** Theme mode provided by the host */
|
|
13
|
+
theme?: ThemeMode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Options for McpAppsSession initialization.
|
|
17
|
+
*/
|
|
18
|
+
export interface McpAppsSessionOptions {
|
|
19
|
+
/** App identity sent during the ui/initialize handshake */
|
|
20
|
+
appInfo?: {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
};
|
|
24
|
+
/** Handshake timeout in milliseconds (default 5000) */
|
|
25
|
+
handshakeTimeoutMs?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Shared MCP Apps session singleton.
|
|
29
|
+
*
|
|
30
|
+
* Provides a single JSON-RPC transport (one postMessage listener, one ID counter)
|
|
31
|
+
* shared by both MCPAppsChatSDK and MCPAppsViewSDK. Performs the SEP-1865
|
|
32
|
+
* ui/initialize handshake once and exposes the resulting host context.
|
|
33
|
+
*
|
|
34
|
+
* Use {@link McpAppsSession.getInstance} to obtain the singleton. The first call
|
|
35
|
+
* triggers the handshake; subsequent calls return the same initialized instance.
|
|
36
|
+
*/
|
|
37
|
+
export declare class McpAppsSession extends JsonRpcClient {
|
|
38
|
+
private static initPromise;
|
|
39
|
+
private hostCtx;
|
|
40
|
+
private _handshakeSucceeded;
|
|
41
|
+
/**
|
|
42
|
+
* Get or create the shared session singleton.
|
|
43
|
+
*
|
|
44
|
+
* The first call performs the SEP-1865 handshake. Concurrent and subsequent
|
|
45
|
+
* calls reuse the same session and handshake result.
|
|
46
|
+
*/
|
|
47
|
+
static getInstance(options?: McpAppsSessionOptions): Promise<McpAppsSession>;
|
|
48
|
+
/**
|
|
49
|
+
* Perform the ui/initialize → hostContext → ui/notifications/initialized handshake.
|
|
50
|
+
*
|
|
51
|
+
* On success, stores the host context and sends the initialized notification.
|
|
52
|
+
* On timeout or error, falls back to an empty host context so the app can
|
|
53
|
+
* still render (graceful degradation for non-SEP-1865 hosts).
|
|
54
|
+
*/
|
|
55
|
+
private handshake;
|
|
56
|
+
/** Returns the host context obtained during the handshake. */
|
|
57
|
+
getHostContext(): HostContext;
|
|
58
|
+
/** Whether the ui/initialize handshake completed successfully (not timed out). */
|
|
59
|
+
get handshakeSucceeded(): boolean;
|
|
60
|
+
request<TParams = unknown, TResult = unknown>(method: string, params: TParams): Promise<TResult>;
|
|
61
|
+
sendNotification<TParams = unknown>(method: string, params?: TParams): void;
|
|
62
|
+
registerNotificationHandler(method: string, handler: (params: unknown) => void): void;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=mcpapps-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpapps-session.d.ts","sourceRoot":"","sources":["../src/mcpapps-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,sCAAsC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,2DAA2D;IAC3D,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAQD;;;;;;;;;GASG;AACH,qBAAa,cAAe,SAAQ,aAAa;IAChD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAwC;IAElE,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,mBAAmB,CAAS;IAEpC;;;;;OAKG;WACU,WAAW,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;IAmBlF;;;;;;OAMG;YACW,SAAS;IAiCvB,8DAA8D;IAC9D,cAAc,IAAI,WAAW;IAI7B,kFAAkF;IAClF,IAAI,kBAAkB,IAAI,OAAO,CAEhC;IAMe,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EAC3D,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACb,OAAO,CAAC,OAAO,CAAC;IAIH,gBAAgB,CAAC,OAAO,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;IAI3E,2BAA2B,CAC1C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAChC,IAAI;CAGP"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
import { JsonRpcClient } from "./jsonrpc-client.js";
|
|
7
|
+
/** Default handshake timeout */
|
|
8
|
+
const DEFAULT_HANDSHAKE_TIMEOUT_MS = 5000;
|
|
9
|
+
/** SEP-1865 protocol version */
|
|
10
|
+
const PROTOCOL_VERSION = "2026-01-26";
|
|
11
|
+
/**
|
|
12
|
+
* Shared MCP Apps session singleton.
|
|
13
|
+
*
|
|
14
|
+
* Provides a single JSON-RPC transport (one postMessage listener, one ID counter)
|
|
15
|
+
* shared by both MCPAppsChatSDK and MCPAppsViewSDK. Performs the SEP-1865
|
|
16
|
+
* ui/initialize handshake once and exposes the resulting host context.
|
|
17
|
+
*
|
|
18
|
+
* Use {@link McpAppsSession.getInstance} to obtain the singleton. The first call
|
|
19
|
+
* triggers the handshake; subsequent calls return the same initialized instance.
|
|
20
|
+
*/
|
|
21
|
+
export class McpAppsSession extends JsonRpcClient {
|
|
22
|
+
static initPromise = null;
|
|
23
|
+
hostCtx = {};
|
|
24
|
+
_handshakeSucceeded = false;
|
|
25
|
+
/**
|
|
26
|
+
* Get or create the shared session singleton.
|
|
27
|
+
*
|
|
28
|
+
* The first call performs the SEP-1865 handshake. Concurrent and subsequent
|
|
29
|
+
* calls reuse the same session and handshake result.
|
|
30
|
+
*/
|
|
31
|
+
static async getInstance(options) {
|
|
32
|
+
if (!McpAppsSession.initPromise) {
|
|
33
|
+
McpAppsSession.initPromise = (async () => {
|
|
34
|
+
const session = new McpAppsSession();
|
|
35
|
+
await session.handshake(options);
|
|
36
|
+
return session;
|
|
37
|
+
})();
|
|
38
|
+
}
|
|
39
|
+
return McpAppsSession.initPromise;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Reset the singleton (for testing only).
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
static resetInstance() {
|
|
46
|
+
McpAppsSession.initPromise = null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Perform the ui/initialize → hostContext → ui/notifications/initialized handshake.
|
|
50
|
+
*
|
|
51
|
+
* On success, stores the host context and sends the initialized notification.
|
|
52
|
+
* On timeout or error, falls back to an empty host context so the app can
|
|
53
|
+
* still render (graceful degradation for non-SEP-1865 hosts).
|
|
54
|
+
*/
|
|
55
|
+
async handshake(options) {
|
|
56
|
+
const timeoutMs = options?.handshakeTimeoutMs ?? DEFAULT_HANDSHAKE_TIMEOUT_MS;
|
|
57
|
+
const appInfo = options?.appInfo ?? { name: "mcp-app", version: "1.0.0" };
|
|
58
|
+
try {
|
|
59
|
+
const sentinel = Symbol("timeout");
|
|
60
|
+
const result = await Promise.race([
|
|
61
|
+
this.request("ui/initialize", {
|
|
62
|
+
protocolVersion: PROTOCOL_VERSION,
|
|
63
|
+
appInfo,
|
|
64
|
+
appCapabilities: {},
|
|
65
|
+
}),
|
|
66
|
+
new Promise((resolve) => setTimeout(() => resolve(sentinel), timeoutMs)),
|
|
67
|
+
]);
|
|
68
|
+
if (result !== sentinel) {
|
|
69
|
+
this.hostCtx = result.hostContext ?? {};
|
|
70
|
+
this._handshakeSucceeded = true;
|
|
71
|
+
this.sendNotification("ui/notifications/initialized");
|
|
72
|
+
}
|
|
73
|
+
// On timeout, hostContext stays empty and we skip the initialized notification.
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// Handshake error — continue with empty context for graceful degradation.
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** Returns the host context obtained during the handshake. */
|
|
80
|
+
getHostContext() {
|
|
81
|
+
return this.hostCtx;
|
|
82
|
+
}
|
|
83
|
+
/** Whether the ui/initialize handshake completed successfully (not timed out). */
|
|
84
|
+
get handshakeSucceeded() {
|
|
85
|
+
return this._handshakeSucceeded;
|
|
86
|
+
}
|
|
87
|
+
// ── Public wrappers ──────────────────────────────────────────────────
|
|
88
|
+
// Widen access from protected to public so SDK classes can use the
|
|
89
|
+
// shared transport without extending JsonRpcClient themselves.
|
|
90
|
+
request(method, params) {
|
|
91
|
+
return super.request(method, params);
|
|
92
|
+
}
|
|
93
|
+
sendNotification(method, params) {
|
|
94
|
+
super.sendNotification(method, params);
|
|
95
|
+
}
|
|
96
|
+
registerNotificationHandler(method, handler) {
|
|
97
|
+
super.registerNotificationHandler(method, handler);
|
|
98
|
+
}
|
|
99
|
+
}
|
package/dist/platforms.d.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* OpenAI SDK interface exposed on window
|
|
8
|
-
* All properties and methods are always available
|
|
9
8
|
*/
|
|
10
9
|
import type { DisplayMode } from "./chat.js";
|
|
11
10
|
import type { Theme } from "./view.js";
|
|
@@ -26,7 +25,6 @@ export interface OpenAISDK {
|
|
|
26
25
|
widgetState: Record<string, unknown>;
|
|
27
26
|
setWidgetState: (state: Record<string, unknown>) => void;
|
|
28
27
|
theme: Theme;
|
|
29
|
-
onThemeChange: (callback: (theme: Theme) => void) => () => void;
|
|
30
28
|
}
|
|
31
29
|
/**
|
|
32
30
|
* Salesforce ACC SDK interface exposed on window (stub)
|
|
@@ -207,13 +205,6 @@ export interface ViewSDK {
|
|
|
207
205
|
* @returns The current theme or null if not available
|
|
208
206
|
*/
|
|
209
207
|
getTheme(): Theme | null;
|
|
210
|
-
/**
|
|
211
|
-
* Listen for theme changes
|
|
212
|
-
*
|
|
213
|
-
* @param callback - Function to call when theme changes
|
|
214
|
-
* @returns Unsubscribe function to stop listening
|
|
215
|
-
*/
|
|
216
|
-
onThemeChange(callback: (theme: Theme) => void): () => void;
|
|
217
208
|
}
|
|
218
209
|
export interface DataSDK {
|
|
219
210
|
/**
|
package/dist/platforms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../src/platforms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH
|
|
1
|
+
{"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../src/platforms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvC,MAAM,WAAW,SAAS;IACzB,mBAAmB,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAChF,YAAY,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IACvF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI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IAChC,OAAO,aAAa;CACpB;
|
|
1
|
+
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../src/surface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,oBAAY,OAAO;IAClB,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,MAAM,WAAW;IACjB,aAAa,mBAAmB;IAChC,OAAO,aAAa;CACpB;AAgCD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAEtD"}
|
package/dist/surface.js
CHANGED
|
@@ -14,29 +14,34 @@ export var Surface;
|
|
|
14
14
|
Surface["SalesforceACC"] = "Salesforce-ACC";
|
|
15
15
|
Surface["MCPApps"] = "MCP-Apps";
|
|
16
16
|
})(Surface || (Surface = {}));
|
|
17
|
-
// for ChatGPT, can we assume window.openai will already be in place upon import?
|
|
18
17
|
const surface = detectSurface();
|
|
19
18
|
/**
|
|
20
|
-
* Determines the surface
|
|
19
|
+
* Determines the surface.
|
|
20
|
+
*
|
|
21
|
+
* Detection heuristics (in priority order):
|
|
22
|
+
* 1. iframe check → MCPApps (SEP-1865 hosts load apps in iframes)
|
|
23
|
+
* 2. window.openai → OpenAI (ChatGPT injects this — but so do some MCP hosts)
|
|
24
|
+
* 3. fallback → WebApp
|
|
25
|
+
*
|
|
26
|
+
* The iframe check takes priority because some MCP Apps hosts (e.g. MCPJam)
|
|
27
|
+
* inject `window.openai` into the iframe. The factory functions resolve the
|
|
28
|
+
* ambiguity: they attempt the SEP-1865 handshake first, and only fall back to
|
|
29
|
+
* the OpenAI SDK when the handshake times out and `window.openai` is present.
|
|
21
30
|
*/
|
|
22
31
|
function detectSurface() {
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
try {
|
|
33
|
+
if (window.self !== window.top) {
|
|
34
|
+
return Surface.MCPApps;
|
|
35
|
+
}
|
|
25
36
|
}
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
return Surface.SalesforceACC;
|
|
29
|
-
}
|
|
30
|
-
else if (window.mcpApps) {
|
|
31
|
-
// TODO: Update detection logic once actual identifier is known
|
|
37
|
+
catch {
|
|
38
|
+
// Cross-origin iframe access throws — that's still an iframe
|
|
32
39
|
return Surface.MCPApps;
|
|
33
40
|
}
|
|
34
|
-
|
|
35
|
-
return Surface.
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
return Surface.WebApp;
|
|
41
|
+
if (window.openai) {
|
|
42
|
+
return Surface.OpenAI;
|
|
39
43
|
}
|
|
44
|
+
return Surface.WebApp;
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
42
47
|
* Returns the surface to use for SDK initialization.
|
package/dist/view.d.ts
CHANGED
|
@@ -287,5 +287,22 @@ export interface ViewSDK {
|
|
|
287
287
|
* ```
|
|
288
288
|
*/
|
|
289
289
|
resize?(width: string, height: string): Promise<void>;
|
|
290
|
+
/**
|
|
291
|
+
* Get the current theme from the host environment
|
|
292
|
+
*
|
|
293
|
+
* Returns the current theme (light/dark mode) as reported by the host.
|
|
294
|
+
* Returns null if the host has not provided theme information.
|
|
295
|
+
*
|
|
296
|
+
* @returns The current theme or null if not available
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```typescript
|
|
300
|
+
* const theme = viewSDK.getTheme?.();
|
|
301
|
+
* if (theme) {
|
|
302
|
+
* document.body.classList.toggle('dark', theme.mode === 'dark');
|
|
303
|
+
* }
|
|
304
|
+
* ```
|
|
305
|
+
*/
|
|
306
|
+
getTheme?(): Theme | null;
|
|
290
307
|
}
|
|
291
308
|
//# sourceMappingURL=view.d.ts.map
|
package/dist/view.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW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K,IAAI,KAAK,IAAI,CAAC;KACxE,CAAC;IAEF;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEtD;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sdk-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.61.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "07b4d7294c9f02c91b55788e157094db22168873"
|
|
35
35
|
}
|