@xpert-ai/chatkit-types 0.4.0 → 0.4.2
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/index.d.ts +39 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -305,6 +305,19 @@ export declare type ChatKitImageReference = ChatKitReferenceBase & {
|
|
|
305
305
|
height?: number;
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
+
export declare type ChatKitLayoutOptions = {
|
|
309
|
+
/**
|
|
310
|
+
* Maximum width of the internal chat column on wide screens. The ChatKit root
|
|
311
|
+
* still fills its host container; message content and composer remain centered
|
|
312
|
+
* within this width.
|
|
313
|
+
*
|
|
314
|
+
* Accepts any CSS max-width value, or a number interpreted by React as pixels.
|
|
315
|
+
*
|
|
316
|
+
* @example "960px"
|
|
317
|
+
*/
|
|
318
|
+
maxWidth?: number | string;
|
|
319
|
+
};
|
|
320
|
+
|
|
308
321
|
export declare interface ChatkitMessage {
|
|
309
322
|
status?: string;
|
|
310
323
|
content: TMessageItems | string;
|
|
@@ -354,6 +367,10 @@ export declare type ChatKitOptions = {
|
|
|
354
367
|
* * @default "light"
|
|
355
368
|
*/
|
|
356
369
|
theme?: ColorScheme | ChatKitTheme;
|
|
370
|
+
/**
|
|
371
|
+
* Layout configuration for the ChatKit UI.
|
|
372
|
+
*/
|
|
373
|
+
layout?: ChatKitLayoutOptions;
|
|
357
374
|
/**
|
|
358
375
|
* Optional animated pet companion rendered by the ChatKit web component over
|
|
359
376
|
* the host page viewport.
|
|
@@ -1813,6 +1830,17 @@ export declare type TMcpAppPermissions = {
|
|
|
1813
1830
|
clipboardWrite?: TMcpAppPermissionGrant;
|
|
1814
1831
|
};
|
|
1815
1832
|
|
|
1833
|
+
export declare type TMcpAppToolResult = {
|
|
1834
|
+
content: TMcpAppToolResultContentBlock[];
|
|
1835
|
+
structuredContent?: Record<string, unknown>;
|
|
1836
|
+
isError?: boolean;
|
|
1837
|
+
_meta?: Record<string, unknown>;
|
|
1838
|
+
};
|
|
1839
|
+
|
|
1840
|
+
export declare type TMcpAppToolResultContentBlock = Record<string, unknown> & {
|
|
1841
|
+
type: string;
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1816
1844
|
/**
|
|
1817
1845
|
* Declares who may use an MCP tool. `model` exposes the tool to the LLM;
|
|
1818
1846
|
* `app` allows the rendered MCP App iframe to call it through the host bridge.
|
|
@@ -1845,8 +1873,8 @@ export declare type TMessageComponentMcpApp = TMessageComponent<TMessageComponen
|
|
|
1845
1873
|
|
|
1846
1874
|
/**
|
|
1847
1875
|
* Safe metadata needed to render an MCP App message. Chat history stores this
|
|
1848
|
-
* descriptor only; the app HTML is fetched
|
|
1849
|
-
* instance using `appInstanceId`.
|
|
1876
|
+
* descriptor and the initial tool input/result only; the app HTML is fetched
|
|
1877
|
+
* from the backend app instance using `appInstanceId`.
|
|
1850
1878
|
*/
|
|
1851
1879
|
export declare type TMessageComponentMcpAppData = {
|
|
1852
1880
|
/** Component discriminator used by ChatKit renderers. */
|
|
@@ -1883,6 +1911,15 @@ export declare type TMessageComponentMcpAppData = {
|
|
|
1883
1911
|
prefersBorder?: boolean;
|
|
1884
1912
|
/** Original tool input sent to the MCP App via `ui/notifications/tool-input`. */
|
|
1885
1913
|
toolInput?: Record<string, unknown>;
|
|
1914
|
+
/**
|
|
1915
|
+
* Standardized initial CallToolResult used to replay MCP App history without
|
|
1916
|
+
* re-running the originating tool. Raw app HTML is never persisted here.
|
|
1917
|
+
*/
|
|
1918
|
+
toolResult?: TMcpAppToolResult;
|
|
1919
|
+
/** Serialized byte size of the initial tool result when known. */
|
|
1920
|
+
toolResultSize?: number;
|
|
1921
|
+
/** True when the initial tool result was too large to inline in chat history. */
|
|
1922
|
+
toolResultTruncated?: boolean;
|
|
1886
1923
|
/** Visibility declared by the originating MCP tool. */
|
|
1887
1924
|
visibility?: TMcpAppVisibility[];
|
|
1888
1925
|
/** Current lifecycle status of the tool/app message. */
|