@salesforce/platform-sdk 9.12.0 → 9.13.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/core/index.d.ts +0 -5
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/mcpapps-session.d.ts +12 -1
- package/dist/core/mcpapps-session.d.ts.map +1 -1
- package/dist/index.js +277 -369
- package/package.json +3 -2
- package/dist/core/jsonrpc-client.d.ts +0 -167
- package/dist/core/jsonrpc-client.d.ts.map +0 -1
- package/dist/core/jsonrpc.d.ts +0 -123
- package/dist/core/jsonrpc.d.ts.map +0 -1
- package/dist/core/mfe-protocol/message-channel-transport.d.ts +0 -79
- package/dist/core/mfe-protocol/message-channel-transport.d.ts.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -11,11 +11,6 @@ export type { AlertOptions, MessageLevel, ModalOptions, ToastOptions, Theme, The
|
|
|
11
11
|
export type { CacheControl, DataSDK, DataSDKGraphQL, GraphQLError, GraphQLRawDocument, GraphQLRequest, GraphQLResponse, MutateOptions, MutationResult, QueryOptions, QueryResult, QuerySubscriber, Unsubscribe, } from './data';
|
|
12
12
|
export type { LightningSDK, LMSMessage, LMSSubscription, MessageChannel } from './lightning';
|
|
13
13
|
export type { OpenAISDK, SalesforceACCSDK } from './platforms';
|
|
14
|
-
export type { JsonRpcBase, JsonRpcRequest, JsonRpcError, JsonRpcSuccessResponse, JsonRpcErrorResponse, JsonRpcResponse, JsonRpcNotification, JsonRpcMessage, JsonRpcPendingRequest, JsonRpcPendingRequestMap, } from './jsonrpc';
|
|
15
|
-
export { isJsonRpcBase, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, isJsonRpcResponse, isJsonRpcNotification, isJsonRpcRequest, } from './jsonrpc';
|
|
16
|
-
export { JsonRpcClient, WindowPostMessageTransport } from './jsonrpc-client';
|
|
17
|
-
export type { Transport } from './jsonrpc-client';
|
|
18
|
-
export { MessageChannelTransport, type MessageChannelTransportListener, } from './mfe-protocol/message-channel-transport';
|
|
19
14
|
export { McpAppsSession } from './mcpapps-session';
|
|
20
15
|
export type { McpAppsHostContext, McpAppsSessionOptions } from './mcpapps-session';
|
|
21
16
|
export { getSurfaceCapabilities } from './capabilities';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGhD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGvF,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,SAAS,GACT,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,GACP,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,GACX,MAAM,QAAQ,CAAC;AAGhB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7F,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGhD,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGvF,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5C,YAAY,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,cAAc,EACd,qBAAqB,EACrB,QAAQ,EACR,SAAS,GACT,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,SAAS,EACT,OAAO,GACP,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACX,YAAY,EACZ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,GACX,MAAM,QAAQ,CAAC;AAGhB,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7F,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { JsonRpcClient } from '@salesforce/jsonrpc';
|
|
1
2
|
import { DisplayMode, HostStyles } from './chat';
|
|
2
|
-
import { JsonRpcClient } from './jsonrpc-client';
|
|
3
3
|
import { ThemeMode } from './view';
|
|
4
4
|
/**
|
|
5
5
|
* Host context returned by the ui/initialize handshake.
|
|
@@ -59,6 +59,14 @@ export interface McpAppsHostContext {
|
|
|
59
59
|
* Options for McpAppsSession initialization.
|
|
60
60
|
*/
|
|
61
61
|
export interface McpAppsSessionOptions {
|
|
62
|
+
/**
|
|
63
|
+
* The origin to pass as the second argument of `window.parent.postMessage`.
|
|
64
|
+
* Optional — defaults to `"*"` when omitted, matching the pre-extraction
|
|
65
|
+
* MCP Apps behaviour. Callers SHOULD pin to the known MCP host origin
|
|
66
|
+
* when available; `"*"` is the documented fallback when the host origin
|
|
67
|
+
* cannot be determined ahead of time.
|
|
68
|
+
*/
|
|
69
|
+
targetOrigin?: string;
|
|
62
70
|
/** App identity sent during the ui/initialize handshake */
|
|
63
71
|
appInfo?: {
|
|
64
72
|
name: string;
|
|
@@ -86,6 +94,9 @@ export declare class McpAppsSession extends JsonRpcClient {
|
|
|
86
94
|
*
|
|
87
95
|
* The first call performs the SEP-1865 handshake. Concurrent and subsequent
|
|
88
96
|
* calls reuse the same session and handshake result.
|
|
97
|
+
*
|
|
98
|
+
* @param options - Optional configuration. `targetOrigin` defaults to `"*"`
|
|
99
|
+
* when omitted; pin to the concrete MCP host origin whenever known.
|
|
89
100
|
*/
|
|
90
101
|
static getInstance(options?: McpAppsSessionOptions): Promise<McpAppsSession>;
|
|
91
102
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpapps-session.d.ts","sourceRoot":"","sources":["../../src/core/mcpapps-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"mcpapps-session.d.ts","sourceRoot":"","sources":["../../src/core/mcpapps-session.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAA8B,MAAM,qBAAqB,CAAC;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;A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