@xpert-ai/chatkit-types 0.1.1 → 0.2.1

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 CHANGED
@@ -629,6 +629,12 @@ export declare type Checkbox = {
629
629
  required?: boolean;
630
630
  };
631
631
 
632
+ export declare type ClientToolInterrupt<TRequest extends ClientToolRequest = ClientToolRequest> = LangGraphInterrupt<TRequest>;
633
+
634
+ export declare type ClientToolInterruptPayload<TRequest extends ClientToolRequest = ClientToolRequest> = LangGraphInterruptPayload<TRequest>;
635
+
636
+ export declare type ClientToolInterruptTask<TRequest extends ClientToolRequest = ClientToolRequest> = LangGraphInterruptTask<TRequest>;
637
+
632
638
  export declare interface ClientToolMessageInput {
633
639
  content: unknown;
634
640
  name?: string;
@@ -855,6 +861,9 @@ export declare type Input = {
855
861
 
856
862
  /**
857
863
  * When an interrupt occurs during task execution, the system generates an InterruptPayload.
864
+ *
865
+ * Ordinary tool-call interrupts use `toolCalls`; ChatKit client-tool middleware
866
+ * uses `clientToolCalls` so the UI can route those calls to the client.
858
867
  ```json
859
868
  {
860
869
  "type": "event",
@@ -888,19 +897,34 @@ export declare type Input = {
888
897
  }
889
898
  ```
890
899
  */
891
- export declare interface InterruptPayload {
892
- tasks: Array<{
893
- id: string;
894
- name: string;
895
- path: string[];
896
- interrupts: Array<{
897
- id: string;
898
- value: ClientToolRequest;
899
- }>;
900
- }>;
900
+ export declare interface InterruptPayload extends LangGraphInterruptPayload<InterruptRequest> {
901
901
  }
902
902
 
903
- export declare function isClientToolRequest(value: any): value is ClientToolRequest;
903
+ export declare type InterruptRequest = ToolCallRequest | ClientToolRequest;
904
+
905
+ export declare function isClientToolInterrupt(value: unknown): value is ClientToolInterrupt;
906
+
907
+ export declare function isClientToolInterruptPayload(value: unknown): value is ClientToolInterruptPayload;
908
+
909
+ export declare function isClientToolInterruptTask(value: unknown): value is ClientToolInterruptTask;
910
+
911
+ export declare function isClientToolRequest(value: unknown): value is ClientToolRequest;
912
+
913
+ export declare function isInterruptRequest(value: unknown): value is InterruptRequest;
914
+
915
+ export declare function isLangGraphInterrupt(value: unknown): value is LangGraphInterrupt;
916
+
917
+ export declare function isLangGraphInterruptPayload(value: unknown): value is LangGraphInterruptPayload;
918
+
919
+ export declare function isLangGraphInterruptTask(value: unknown): value is LangGraphInterruptTask;
920
+
921
+ export declare function isToolCallInterrupt(value: unknown): value is ToolCallInterrupt;
922
+
923
+ export declare function isToolCallInterruptPayload(value: unknown): value is ToolCallInterruptPayload;
924
+
925
+ export declare function isToolCallInterruptTask(value: unknown): value is ToolCallInterruptTask;
926
+
927
+ export declare function isToolCallRequest(value: unknown): value is ToolCallRequest;
904
928
 
905
929
  declare type Justification = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'stretch';
906
930
 
@@ -916,6 +940,25 @@ export declare type Label = {
916
940
  color?: string | ThemeColor;
917
941
  };
918
942
 
943
+ export declare interface LangGraphInterrupt<TValue = unknown> {
944
+ id: string;
945
+ value: TValue;
946
+ when?: string;
947
+ resumable?: boolean;
948
+ ns?: string[];
949
+ }
950
+
951
+ export declare interface LangGraphInterruptPayload<TValue = unknown> {
952
+ tasks: Array<LangGraphInterruptTask<TValue>>;
953
+ }
954
+
955
+ export declare interface LangGraphInterruptTask<TValue = unknown> {
956
+ id: string;
957
+ name: string;
958
+ path: Array<string | number>;
959
+ interrupts: Array<LangGraphInterrupt<TValue>>;
960
+ }
961
+
919
962
  export declare type ListView = {
920
963
  type: 'ListView';
921
964
  key?: string;
@@ -990,6 +1033,62 @@ export declare type RadioGroup = {
990
1033
 
991
1034
  declare type RadiusValue = '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | 'full' | '100%' | 'none';
992
1035
 
1036
+ export declare const REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION = "implementation_confirmation";
1037
+
1038
+ export declare const REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION = "plan_clarification";
1039
+
1040
+ export declare const REQUEST_USER_INPUT_RESULT_TYPE = "request_user_input_result";
1041
+
1042
+ export declare const REQUEST_USER_INPUT_TOOL_NAME = "request_user_input";
1043
+
1044
+ export declare interface RequestUserInputAnswer {
1045
+ id: string;
1046
+ question: string;
1047
+ value: string;
1048
+ type: RequestUserInputAnswerType;
1049
+ label?: string;
1050
+ description?: string;
1051
+ }
1052
+
1053
+ export declare type RequestUserInputAnswerType = 'option' | 'other';
1054
+
1055
+ export declare interface RequestUserInputOption {
1056
+ label: string;
1057
+ description: string;
1058
+ }
1059
+
1060
+ export declare interface RequestUserInputParams {
1061
+ questions: RequestUserInputQuestion[];
1062
+ }
1063
+
1064
+ export declare interface RequestUserInputQuestion {
1065
+ id: string;
1066
+ header: string;
1067
+ question: string;
1068
+ options: RequestUserInputOption[];
1069
+ }
1070
+
1071
+ export declare interface RequestUserInputResult {
1072
+ type: RequestUserInputResultType;
1073
+ purpose: RequestUserInputResultPurpose;
1074
+ answers: RequestUserInputAnswer[];
1075
+ }
1076
+
1077
+ export declare type RequestUserInputResultPurpose = typeof REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION | typeof REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION;
1078
+
1079
+ export declare type RequestUserInputResultType = typeof REQUEST_USER_INPUT_RESULT_TYPE;
1080
+
1081
+ export declare type RequestUserInputToolArgs = RequestUserInputParams;
1082
+
1083
+ export declare type RequestUserInputToolCall = ToolCall & {
1084
+ name: RequestUserInputToolName;
1085
+ args: RequestUserInputToolArgs;
1086
+ id: string;
1087
+ type?: 'tool_call';
1088
+ };
1089
+
1090
+ export declare type RequestUserInputToolName = typeof REQUEST_USER_INPUT_TOOL_NAME;
1091
+
993
1092
  export declare type Row = {
994
1093
  type: 'Row';
995
1094
  key?: string;
@@ -1018,12 +1117,17 @@ export declare type Select = {
1018
1117
 
1019
1118
  export declare type SendUserMessageParams = {
1020
1119
  text?: string;
1120
+ content?: UserMessageContent[];
1021
1121
  state?: Record<string, any>;
1022
1122
  reply?: string;
1023
1123
  attachments?: Attachment[];
1024
1124
  newThread?: boolean;
1025
1125
  references?: ChatKitReference[];
1026
1126
  referenceComposition?: ChatKitReferenceCompositionMode;
1127
+ toolChoice?: ToolChoice;
1128
+ model?: string;
1129
+ planMode?: boolean;
1130
+ trigger?: WorkflowTriggerParams;
1027
1131
  followUpMode?: 'default' | FollowUpBehavior;
1028
1132
  };
1029
1133
 
@@ -1116,6 +1220,7 @@ export declare type TChatRequestHuman = {
1116
1220
  files?: Partial<File>[];
1117
1221
  references?: ChatKitReference[];
1118
1222
  referenceComposition?: ChatKitReferenceCompositionMode;
1223
+ planMode?: boolean;
1119
1224
  [key: string]: unknown;
1120
1225
  };
1121
1226
 
@@ -1321,6 +1426,18 @@ export declare type TMessageContentWidget = TMessageContentComponent<TMessageCom
1321
1426
 
1322
1427
  export declare type TMessageItems = TMessageContentComplex[];
1323
1428
 
1429
+ export declare type ToolCallInterrupt<TRequest extends ToolCallRequest = ToolCallRequest> = LangGraphInterrupt<TRequest>;
1430
+
1431
+ export declare type ToolCallInterruptPayload<TRequest extends ToolCallRequest = ToolCallRequest> = LangGraphInterruptPayload<TRequest>;
1432
+
1433
+ export declare type ToolCallInterruptTask<TRequest extends ToolCallRequest = ToolCallRequest> = LangGraphInterruptTask<TRequest>;
1434
+
1435
+ export declare interface ToolCallRequest {
1436
+ toolCalls: ToolCall[];
1437
+ }
1438
+
1439
+ export declare type ToolChoice = unknown;
1440
+
1324
1441
  export declare type ToolOption = {
1325
1442
  id: string;
1326
1443
  /** Label displayed in the tool menu */
@@ -1372,6 +1489,8 @@ export declare type TThreadContextUsageMetrics = {
1372
1489
  currency?: string | null;
1373
1490
  };
1374
1491
 
1492
+ export declare type UserMessageContent = unknown;
1493
+
1375
1494
  export declare type WidgetComponent = TextComponent | Title | Caption | Badge | Markdown | Box | Row | Col | Divider | Icon | Image_2 | Button | Checkbox | Spacer | Select | DatePicker | Form | Input | Label | RadioGroup | Textarea | Transition;
1376
1495
 
1377
1496
  export declare type WidgetIcon = 'agent' | 'analytics' | 'atom' | 'batch' | 'bolt' | 'book-open' | 'book-closed' | 'book-clock' | 'bug' | 'calendar' | 'chart' | 'check' | 'check-circle' | 'check-circle-filled' | 'chevron-left' | 'chevron-right' | 'circle-question' | 'compass' | 'confetti' | 'cube' | 'desktop' | 'document' | 'dot' | 'dots-horizontal' | 'dots-vertical' | 'empty-circle' | 'external-link' | 'globe' | 'keys' | 'lab' | 'images' | 'info' | 'lifesaver' | 'lightbulb' | 'mail' | 'map-pin' | 'maps' | 'mobile' | 'name' | 'notebook' | 'notebook-pencil' | 'page-blank' | 'phone' | 'play' | 'plus' | 'profile' | 'profile-card' | 'reload' | 'star' | 'star-filled' | 'search' | 'sparkle' | 'sparkle-double' | 'square-code' | 'square-image' | 'square-text' | 'suitcase' | 'settings-slider' | 'user' | 'wreath' | 'write' | 'write-alt' | 'write-alt2';
@@ -1421,6 +1540,11 @@ declare type WidgetStatus = {
1421
1540
  icon?: WidgetIcon;
1422
1541
  };
1423
1542
 
1543
+ export declare type WorkflowTriggerParams = {
1544
+ name?: string;
1545
+ params?: Record<string, any>;
1546
+ } | Record<string, any>;
1547
+
1424
1548
  /**
1425
1549
  * A Web Component that serves as the entry point for a ChatKit integration.
1426
1550
  * * @noInheritDoc
package/dist/index.js CHANGED
@@ -1,7 +1,52 @@
1
1
  import "@langchain/core/messages/tool";
2
2
  import "@a2ui/lit/0.8";
3
+ const REQUEST_USER_INPUT_TOOL_NAME = "request_user_input";
4
+ const REQUEST_USER_INPUT_RESULT_TYPE = "request_user_input_result";
5
+ const REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION = "plan_clarification";
6
+ const REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION = "implementation_confirmation";
7
+ function isRecord(value) {
8
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
9
+ }
3
10
  function isClientToolRequest(value) {
4
- return value && Array.isArray(value.clientToolCalls);
11
+ return isRecord(value) && Array.isArray(value.clientToolCalls);
12
+ }
13
+ function isToolCallRequest(value) {
14
+ return isRecord(value) && Array.isArray(value.toolCalls);
15
+ }
16
+ function isInterruptRequest(value) {
17
+ return isToolCallRequest(value) || isClientToolRequest(value);
18
+ }
19
+ function isLangGraphInterrupt(value) {
20
+ return isRecord(value) && typeof value.id === "string" && Object.prototype.hasOwnProperty.call(value, "value");
21
+ }
22
+ function isLangGraphInterruptTask(value) {
23
+ if (!isRecord(value) || typeof value.id !== "string" || typeof value.name !== "string" || !Array.isArray(value.path) || !Array.isArray(value.interrupts)) {
24
+ return false;
25
+ }
26
+ return value.path.every(
27
+ (item) => typeof item === "string" || typeof item === "number"
28
+ ) && value.interrupts.every(isLangGraphInterrupt);
29
+ }
30
+ function isLangGraphInterruptPayload(value) {
31
+ return isRecord(value) && Array.isArray(value.tasks) && value.tasks.every(isLangGraphInterruptTask);
32
+ }
33
+ function isClientToolInterrupt(value) {
34
+ return isLangGraphInterrupt(value) && isClientToolRequest(value.value);
35
+ }
36
+ function isClientToolInterruptTask(value) {
37
+ return isLangGraphInterruptTask(value) && value.interrupts.every(isClientToolInterrupt);
38
+ }
39
+ function isClientToolInterruptPayload(value) {
40
+ return isLangGraphInterruptPayload(value) && value.tasks.every(isClientToolInterruptTask);
41
+ }
42
+ function isToolCallInterrupt(value) {
43
+ return isLangGraphInterrupt(value) && isToolCallRequest(value.value);
44
+ }
45
+ function isToolCallInterruptTask(value) {
46
+ return isLangGraphInterruptTask(value) && value.interrupts.every(isToolCallInterrupt);
47
+ }
48
+ function isToolCallInterruptPayload(value) {
49
+ return isLangGraphInterruptPayload(value) && value.tasks.every(isToolCallInterruptTask);
5
50
  }
6
51
  var ChatMessageTypeEnum = /* @__PURE__ */ ((ChatMessageTypeEnum2) => {
7
52
  ChatMessageTypeEnum2["MESSAGE"] = "message";
@@ -47,7 +92,22 @@ export {
47
92
  ChatMessageEventTypeEnum,
48
93
  ChatMessageStepCategory,
49
94
  ChatMessageTypeEnum,
95
+ REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION,
96
+ REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION,
97
+ REQUEST_USER_INPUT_RESULT_TYPE,
98
+ REQUEST_USER_INPUT_TOOL_NAME,
50
99
  STATE_VARIABLE_HUMAN,
51
- isClientToolRequest
100
+ isClientToolInterrupt,
101
+ isClientToolInterruptPayload,
102
+ isClientToolInterruptTask,
103
+ isClientToolRequest,
104
+ isInterruptRequest,
105
+ isLangGraphInterrupt,
106
+ isLangGraphInterruptPayload,
107
+ isLangGraphInterruptTask,
108
+ isToolCallInterrupt,
109
+ isToolCallInterruptPayload,
110
+ isToolCallInterruptTask,
111
+ isToolCallRequest
52
112
  };
53
113
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/interrupt.ts","../src/message.ts"],"sourcesContent":["import { type ToolCall } from '@langchain/core/messages/tool';\n\n/**\n * When an interrupt occurs during task execution, the system generates an InterruptPayload.\n```json\n{\n \"type\": \"event\",\n \"event\": \"on_interrupt\",\n \"data\": {\n \"tasks\": [\n {\n \"id\": \"9c4d2ac5-8808-5b6f-855c-4d48aa3d77a7\",\n \"name\": \"Middleware_wPzR2bIXqE_after_model\",\n \"path\": [\"__pregel_pull\", \"Middleware_wPzR2bIXqE_after_model\"],\n \"interrupts\": [\n {\n \"id\": \"b42f7887d65e57ed11cf08b8927763db\",\n \"value\": {\n \"toolCalls\": [\n {\n \"name\": \"getUserStation\",\n \"args\": {\n \"input\": \"Query the site selected by the user\"\n },\n \"id\": \"call_00_swcaUjIaACXOHHaZyNmQB3Vm\",\n \"type\": \"tool_call\"\n }\n ]\n }\n }\n ]\n }\n ]\n }\n}\n```\n */\nexport interface InterruptPayload {\n tasks: Array<{\n id: string;\n name: string;\n path: string[];\n interrupts: Array<{\n id: string;\n value: ClientToolRequest\n }>;\n }>;\n}\n\nexport interface ClientToolRequest {\n clientToolCalls: ToolCall[];\n}\n\nexport interface ClientToolMessageInput {\n content: unknown\n name?: string\n tool_call_id?: string\n status?: 'success' | 'error'\n artifact?: unknown\n}\n\nexport interface ClientToolResponse {\n toolMessages: ClientToolMessageInput[]\n}\n\nexport function isClientToolRequest(value: any): value is ClientToolRequest {\n return (\n value &&\n Array.isArray(value.clientToolCalls)\n );\n}","import type { ToolCall } from '@langchain/core/messages/tool';\nimport { Types } from '@a2ui/lit/0.8';\nimport type { FollowUpBehavior } from './options';\n\nexport enum ChatMessageTypeEnum {\n // LOG = 'log',\n MESSAGE = 'message',\n EVENT = 'event',\n}\n\n/**\n * https://js.langchain.com/docs/how_to/streaming/#event-reference\n */\nexport enum ChatMessageEventTypeEnum {\n ON_CONVERSATION_START = 'on_conversation_start',\n ON_CONVERSATION_END = 'on_conversation_end',\n ON_MESSAGE_START = 'on_message_start',\n ON_MESSAGE_END = 'on_message_end',\n ON_TOOL_START = 'on_tool_start',\n ON_TOOL_END = 'on_tool_end',\n ON_TOOL_ERROR = 'on_tool_error',\n /**\n * Step message in tool call\n */\n ON_TOOL_MESSAGE = 'on_tool_message',\n ON_AGENT_START = 'on_agent_start',\n ON_AGENT_END = 'on_agent_end',\n ON_RETRIEVER_START = 'on_retriever_start',\n ON_RETRIEVER_END = 'on_retriever_end',\n ON_RETRIEVER_ERROR = 'on_retriever_error',\n ON_INTERRUPT = 'on_interrupt',\n ON_ERROR = 'on_error',\n ON_CHAT_EVENT = 'on_chat_event',\n\n ON_CLIENT_EFFECT = 'on_client_effect',\n}\n\n/**\n * Encapsulate multi-agent message events\n */\nexport interface ChatEventEnvelope<T = unknown> {\n type: ChatMessageTypeEnum;\n event?: ChatMessageEventTypeEnum;\n tags: string[];\n data: T;\n}\n\n/**\n * Category of step message: determines the display components of computer use\n */\nexport enum ChatMessageStepCategory {\n /**\n * List of items: urls, files, etc.\n */\n List = 'list',\n /**\n * Websearch results\n */\n WebSearch = 'web_search',\n /**\n * Files list\n */\n Files = 'files',\n /**\n * View a file\n */\n File = 'file',\n /**\n * Program Execution\n */\n Program = 'program',\n /**\n * Iframe\n */\n Iframe = 'iframe',\n\n Memory = 'memory',\n\n Tasks = 'tasks',\n\n /**\n * Knowledges (knowledge base retriever results)\n */\n Knowledges = 'knowledges',\n}\n\n/**\n * Step message type, in canvas and ai message.\n */\nexport type TChatMessageStep<T = any> = TMessageComponent<\n TMessageComponentStep<T>\n>;\n\nexport type ImageDetail = 'auto' | 'low' | 'high';\nexport type MessageContentText = {\n type: 'text';\n text: string;\n};\nexport type MessageContentImageUrl = {\n type: 'image_url';\n image_url:\n | string\n | {\n url: string;\n detail?: ImageDetail;\n };\n};\n\n/**\n * Similar to {@link MessageContentText} | {@link MessageContentImageUrl}, which together form {@link MessageContentComplex}\n */\nexport type TMessageContentComponent<T extends object = object> = {\n id: string;\n type: 'component';\n data: TMessageComponent<T>;\n xpertName?: string;\n agentKey?: string;\n};\n\n/**\n * Defines the data type of the sub-message of `component` type in the message `content` {@link MessageContentComplex}\n */\nexport type TMessageComponent<T extends object = object> = T & {\n id?: string;\n category: 'Dashboard' | 'Computer' | 'Tool';\n type?: string;\n created_date?: Date | string;\n};\n\nexport type TMessageComponentWidgetItem = {\n name: string;\n config: Types.Surface;\n values?: Record<string, unknown>;\n};\n\nexport type TMessageComponentWidgetData = {\n type: 'Widget';\n mode?: string;\n widgets: TMessageComponentWidgetItem[];\n executionId?: string;\n};\n\nexport type TMessageComponentWidget =\n TMessageComponent<TMessageComponentWidgetData>;\n\nexport type TMessageContentWidget =\n TMessageContentComponent<TMessageComponentWidgetData>;\n\nexport type TMessageContentText = {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n type: 'text';\n text: string;\n};\nexport type TMessageContentMemory = {\n id?: string;\n agentKey?: string;\n type: 'memory';\n data: any[];\n};\nexport type TMessageContentReasoning = {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n type: 'reasoning';\n text: string;\n};\n/**\n * Enhance {@link MessageContentComplex} in Langchain.js\n */\nexport type TMessageContentComplex = (\n | TMessageContentText\n | TMessageContentReasoning\n | MessageContentImageUrl\n | TMessageContentComponent\n | TMessageContentMemory\n | (Record<string, any> & {\n type?: 'text' | 'image_url' | string;\n })\n | (Record<string, any> & {\n type?: never;\n })\n) & {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n created_date?: Date | string;\n};\n\n/**\n * Enhance {@link MessageContent} in Langchain.js\n *\n * @deprecated use {@link TMessageItems} instead\n */\nexport type TMessageContent = string | TMessageContentComplex[];\n\nexport type TMessageComponentIframe = {\n type: 'iframe';\n title: string;\n url?: string;\n data?: {\n url?: string;\n };\n};\n\nexport type TMessageComponentStep<T = unknown> = {\n type: ChatMessageStepCategory;\n toolset: string;\n toolset_id: string;\n tool?: string;\n title: string;\n message: string;\n status: 'success' | 'fail' | 'running';\n created_date: Date | string;\n end_date: Date | string;\n error?: string;\n data?: T;\n input?: any;\n output?: unknown;\n artifact?: any;\n};\n\n/**\n * Data type for chat event message\n */\nexport type TChatEventMessage = {\n type?: string;\n title?: string;\n message?: string;\n status?: 'success' | 'fail' | 'running';\n created_date?: Date | string;\n end_date?: Date | string;\n error?: string;\n};\n\nexport interface ChatkitMessage {\n status?: string;\n content: TMessageItems | string;\n reasoning?: TMessageContentReasoning[];\n type: 'user' | 'assistant' | 'system' | 'tool' | 'event';\n id: string;\n followUpMode?: FollowUpBehavior;\n followUpStatus?: 'pending' | 'consumed' | 'canceled';\n targetExecutionId?: string | null;\n visibleAt?: string | Date | null;\n}\n\nexport type TMessageItems = TMessageContentComplex[];\n\nexport type ChatKitReferenceBase = {\n id?: string;\n label?: string;\n text: string;\n};\n\nexport type ChatKitCodeReference = ChatKitReferenceBase & {\n type: 'code';\n path: string;\n startLine: number;\n endLine: number;\n language?: string;\n taskId?: string;\n};\n\nexport type ChatKitQuoteReference = ChatKitReferenceBase & {\n type: 'quote';\n messageId?: string;\n source?: string;\n};\n\nexport type ChatKitImageReference = ChatKitReferenceBase & {\n type: 'image';\n fileId?: string;\n url?: string;\n mimeType?: string;\n name?: string;\n size?: number;\n width?: number;\n height?: number;\n};\n\nexport type ChatKitReference =\n | ChatKitCodeReference\n | ChatKitQuoteReference\n | ChatKitImageReference;\n\nexport type ChatKitReferenceCompositionMode = 'compose' | 'preserve';\n\nexport const STATE_VARIABLE_HUMAN = 'human';\n\n/**\n * Human input message, include parameters and attachments\n */\nexport type TChatRequestHuman = {\n input?: string;\n files?: Partial<File>[];\n references?: ChatKitReference[];\n referenceComposition?: ChatKitReferenceCompositionMode;\n [key: string]: unknown;\n};\n\n/**\n * Command to resume with streaming after human decision\n */\nexport type TInterruptCommand = {\n resume?: any;\n update?: any;\n toolCalls?: ToolCall[];\n agentKey?: string;\n};\n\nexport type TChatRequest = {\n /**\n * The human input, include parameters\n */\n input: TChatRequestHuman;\n /**\n * Custom graph state\n */\n state?: { [STATE_VARIABLE_HUMAN]: TChatRequestHuman } & Record<string, any>;\n agentKey?: string;\n projectId?: string;\n conversationId?: string;\n environmentId?: string;\n id?: string;\n executionId?: string;\n confirm?: boolean;\n command?: TInterruptCommand;\n retry?: boolean;\n followUpMode?: FollowUpBehavior;\n /**\n * PRO: Sandbox Environment Id\n * PRO: @description Sandbox environment ID to force using the specified container.\n */\n sandboxEnvironmentId?: string;\n};\n\n/**\n * Data type for client effect message\n */\nexport type TClientEeffectMessage = {\n name: string;\n args: Record<string, any>;\n tool_call_id?: string;\n agentKey?: string;\n created_date?: Date | string;\n};\n\n// Thread context usage\nexport type TThreadContextUsageMetrics = {\n contextTokens: number;\n inputTokens: number;\n outputTokens: number;\n totalTokens: number;\n embedTokens?: number;\n totalPrice?: number;\n currency?: string | null;\n};\n\nexport type TThreadContextUsageEvent = {\n type: 'thread_context_usage';\n threadId: string;\n runId: string | null;\n agentKey: string;\n updatedAt: string;\n usage: TThreadContextUsageMetrics;\n};\n\nexport const CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = 'follow_up_consumed' as const;\n\nexport type TFollowUpConsumedEvent = TChatEventMessage & {\n type: typeof CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;\n mode: 'queue' | 'steer';\n messageIds: string[];\n clientMessageIds?: string[];\n executionId?: string | null;\n visibleAt?: string | null;\n};\n"],"names":["ChatMessageTypeEnum","ChatMessageEventTypeEnum","ChatMessageStepCategory"],"mappings":";;AAiEO,SAAS,oBAAoB,OAAwC;AAC1E,SACE,SACA,MAAM,QAAQ,MAAM,eAAe;AAEvC;AClEO,IAAK,wCAAAA,yBAAL;AAELA,uBAAA,SAAA,IAAU;AACVA,uBAAA,OAAA,IAAQ;AAHE,SAAAA;AAAA,GAAA,uBAAA,CAAA,CAAA;AASL,IAAK,6CAAAC,8BAAL;AACLA,4BAAA,uBAAA,IAAwB;AACxBA,4BAAA,qBAAA,IAAsB;AACtBA,4BAAA,kBAAA,IAAmB;AACnBA,4BAAA,gBAAA,IAAiB;AACjBA,4BAAA,eAAA,IAAgB;AAChBA,4BAAA,aAAA,IAAc;AACdA,4BAAA,eAAA,IAAgB;AAIhBA,4BAAA,iBAAA,IAAkB;AAClBA,4BAAA,gBAAA,IAAiB;AACjBA,4BAAA,cAAA,IAAe;AACfA,4BAAA,oBAAA,IAAqB;AACrBA,4BAAA,kBAAA,IAAmB;AACnBA,4BAAA,oBAAA,IAAqB;AACrBA,4BAAA,cAAA,IAAe;AACfA,4BAAA,UAAA,IAAW;AACXA,4BAAA,eAAA,IAAgB;AAEhBA,4BAAA,kBAAA,IAAmB;AArBT,SAAAA;AAAA,GAAA,4BAAA,CAAA,CAAA;AAqCL,IAAK,4CAAAC,6BAAL;AAILA,2BAAA,MAAA,IAAO;AAIPA,2BAAA,WAAA,IAAY;AAIZA,2BAAA,OAAA,IAAQ;AAIRA,2BAAA,MAAA,IAAO;AAIPA,2BAAA,SAAA,IAAU;AAIVA,2BAAA,QAAA,IAAS;AAETA,2BAAA,QAAA,IAAS;AAETA,2BAAA,OAAA,IAAQ;AAKRA,2BAAA,YAAA,IAAa;AAjCH,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AA+OL,MAAM,uBAAuB;AAgF7B,MAAM,qCAAqC;"}
1
+ {"version":3,"file":"index.js","sources":["../src/interrupt.ts","../src/message.ts"],"sourcesContent":["import { type ToolCall } from '@langchain/core/messages/tool';\n\nexport const REQUEST_USER_INPUT_TOOL_NAME = 'request_user_input';\nexport type RequestUserInputToolName = typeof REQUEST_USER_INPUT_TOOL_NAME;\nexport const REQUEST_USER_INPUT_RESULT_TYPE = 'request_user_input_result';\nexport type RequestUserInputResultType = typeof REQUEST_USER_INPUT_RESULT_TYPE;\nexport const REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION =\n 'plan_clarification';\nexport const REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION =\n 'implementation_confirmation';\nexport type RequestUserInputResultPurpose =\n | typeof REQUEST_USER_INPUT_RESULT_PURPOSE_PLAN_CLARIFICATION\n | typeof REQUEST_USER_INPUT_RESULT_PURPOSE_IMPLEMENTATION_CONFIRMATION;\n\nexport interface RequestUserInputOption {\n label: string;\n description: string;\n}\n\nexport interface RequestUserInputQuestion {\n id: string;\n header: string;\n question: string;\n options: RequestUserInputOption[];\n}\n\nexport interface RequestUserInputParams {\n questions: RequestUserInputQuestion[];\n}\n\nexport type RequestUserInputToolArgs = RequestUserInputParams;\n\nexport type RequestUserInputAnswerType = 'option' | 'other';\n\nexport interface RequestUserInputAnswer {\n id: string;\n question: string;\n value: string;\n type: RequestUserInputAnswerType;\n label?: string;\n description?: string;\n}\n\nexport interface RequestUserInputResult {\n type: RequestUserInputResultType;\n purpose: RequestUserInputResultPurpose;\n answers: RequestUserInputAnswer[];\n}\n\nexport type RequestUserInputToolCall = ToolCall & {\n name: RequestUserInputToolName;\n args: RequestUserInputToolArgs;\n id: string;\n type?: 'tool_call';\n};\n\nexport interface ClientToolRequest {\n clientToolCalls: ToolCall[];\n}\n\nexport interface ToolCallRequest {\n toolCalls: ToolCall[];\n}\n\nexport type InterruptRequest = ToolCallRequest | ClientToolRequest;\n\nexport interface LangGraphInterrupt<TValue = unknown> {\n id: string;\n value: TValue;\n when?: string;\n resumable?: boolean;\n ns?: string[];\n}\n\nexport interface LangGraphInterruptTask<TValue = unknown> {\n id: string;\n name: string;\n path: Array<string | number>;\n interrupts: Array<LangGraphInterrupt<TValue>>;\n}\n\nexport interface LangGraphInterruptPayload<TValue = unknown> {\n tasks: Array<LangGraphInterruptTask<TValue>>;\n}\n\nexport type ClientToolInterrupt<\n TRequest extends ClientToolRequest = ClientToolRequest,\n> = LangGraphInterrupt<TRequest>;\n\nexport type ClientToolInterruptTask<\n TRequest extends ClientToolRequest = ClientToolRequest,\n> = LangGraphInterruptTask<TRequest>;\n\nexport type ClientToolInterruptPayload<\n TRequest extends ClientToolRequest = ClientToolRequest,\n> = LangGraphInterruptPayload<TRequest>;\n\nexport type ToolCallInterrupt<\n TRequest extends ToolCallRequest = ToolCallRequest,\n> = LangGraphInterrupt<TRequest>;\n\nexport type ToolCallInterruptTask<\n TRequest extends ToolCallRequest = ToolCallRequest,\n> = LangGraphInterruptTask<TRequest>;\n\nexport type ToolCallInterruptPayload<\n TRequest extends ToolCallRequest = ToolCallRequest,\n> = LangGraphInterruptPayload<TRequest>;\n\n/**\n * When an interrupt occurs during task execution, the system generates an InterruptPayload.\n *\n * Ordinary tool-call interrupts use `toolCalls`; ChatKit client-tool middleware\n * uses `clientToolCalls` so the UI can route those calls to the client.\n```json\n{\n \"type\": \"event\",\n \"event\": \"on_interrupt\",\n \"data\": {\n \"tasks\": [\n {\n \"id\": \"9c4d2ac5-8808-5b6f-855c-4d48aa3d77a7\",\n \"name\": \"Middleware_wPzR2bIXqE_after_model\",\n \"path\": [\"__pregel_pull\", \"Middleware_wPzR2bIXqE_after_model\"],\n \"interrupts\": [\n {\n \"id\": \"b42f7887d65e57ed11cf08b8927763db\",\n \"value\": {\n \"toolCalls\": [\n {\n \"name\": \"getUserStation\",\n \"args\": {\n \"input\": \"Query the site selected by the user\"\n },\n \"id\": \"call_00_swcaUjIaACXOHHaZyNmQB3Vm\",\n \"type\": \"tool_call\"\n }\n ]\n }\n }\n ]\n }\n ]\n }\n}\n```\n */\nexport interface InterruptPayload extends LangGraphInterruptPayload<InterruptRequest> {}\n\nexport interface ClientToolMessageInput {\n content: unknown;\n name?: string;\n tool_call_id?: string;\n status?: 'success' | 'error';\n artifact?: unknown;\n}\n\nexport interface ClientToolResponse {\n toolMessages: ClientToolMessageInput[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\n\nexport function isClientToolRequest(\n value: unknown,\n): value is ClientToolRequest {\n return isRecord(value) && Array.isArray(value.clientToolCalls);\n}\n\nexport function isToolCallRequest(value: unknown): value is ToolCallRequest {\n return isRecord(value) && Array.isArray(value.toolCalls);\n}\n\nexport function isInterruptRequest(value: unknown): value is InterruptRequest {\n return isToolCallRequest(value) || isClientToolRequest(value);\n}\n\nexport function isLangGraphInterrupt(\n value: unknown,\n): value is LangGraphInterrupt {\n return (\n isRecord(value) &&\n typeof value.id === 'string' &&\n Object.prototype.hasOwnProperty.call(value, 'value')\n );\n}\n\nexport function isLangGraphInterruptTask(\n value: unknown,\n): value is LangGraphInterruptTask {\n if (\n !isRecord(value) ||\n typeof value.id !== 'string' ||\n typeof value.name !== 'string' ||\n !Array.isArray(value.path) ||\n !Array.isArray(value.interrupts)\n ) {\n return false;\n }\n\n return (\n value.path.every(\n (item) => typeof item === 'string' || typeof item === 'number',\n ) && value.interrupts.every(isLangGraphInterrupt)\n );\n}\n\nexport function isLangGraphInterruptPayload(\n value: unknown,\n): value is LangGraphInterruptPayload {\n return (\n isRecord(value) &&\n Array.isArray(value.tasks) &&\n value.tasks.every(isLangGraphInterruptTask)\n );\n}\n\nexport function isClientToolInterrupt(\n value: unknown,\n): value is ClientToolInterrupt {\n return isLangGraphInterrupt(value) && isClientToolRequest(value.value);\n}\n\nexport function isClientToolInterruptTask(\n value: unknown,\n): value is ClientToolInterruptTask {\n return (\n isLangGraphInterruptTask(value) &&\n value.interrupts.every(isClientToolInterrupt)\n );\n}\n\nexport function isClientToolInterruptPayload(\n value: unknown,\n): value is ClientToolInterruptPayload {\n return (\n isLangGraphInterruptPayload(value) &&\n value.tasks.every(isClientToolInterruptTask)\n );\n}\n\nexport function isToolCallInterrupt(\n value: unknown,\n): value is ToolCallInterrupt {\n return isLangGraphInterrupt(value) && isToolCallRequest(value.value);\n}\n\nexport function isToolCallInterruptTask(\n value: unknown,\n): value is ToolCallInterruptTask {\n return (\n isLangGraphInterruptTask(value) &&\n value.interrupts.every(isToolCallInterrupt)\n );\n}\n\nexport function isToolCallInterruptPayload(\n value: unknown,\n): value is ToolCallInterruptPayload {\n return (\n isLangGraphInterruptPayload(value) &&\n value.tasks.every(isToolCallInterruptTask)\n );\n}\n","import type { ToolCall } from '@langchain/core/messages/tool';\nimport { Types } from '@a2ui/lit/0.8';\nimport type { FollowUpBehavior } from './options';\n\nexport enum ChatMessageTypeEnum {\n // LOG = 'log',\n MESSAGE = 'message',\n EVENT = 'event',\n}\n\n/**\n * https://js.langchain.com/docs/how_to/streaming/#event-reference\n */\nexport enum ChatMessageEventTypeEnum {\n ON_CONVERSATION_START = 'on_conversation_start',\n ON_CONVERSATION_END = 'on_conversation_end',\n ON_MESSAGE_START = 'on_message_start',\n ON_MESSAGE_END = 'on_message_end',\n ON_TOOL_START = 'on_tool_start',\n ON_TOOL_END = 'on_tool_end',\n ON_TOOL_ERROR = 'on_tool_error',\n /**\n * Step message in tool call\n */\n ON_TOOL_MESSAGE = 'on_tool_message',\n ON_AGENT_START = 'on_agent_start',\n ON_AGENT_END = 'on_agent_end',\n ON_RETRIEVER_START = 'on_retriever_start',\n ON_RETRIEVER_END = 'on_retriever_end',\n ON_RETRIEVER_ERROR = 'on_retriever_error',\n ON_INTERRUPT = 'on_interrupt',\n ON_ERROR = 'on_error',\n ON_CHAT_EVENT = 'on_chat_event',\n\n ON_CLIENT_EFFECT = 'on_client_effect',\n}\n\n/**\n * Encapsulate multi-agent message events\n */\nexport interface ChatEventEnvelope<T = unknown> {\n type: ChatMessageTypeEnum;\n event?: ChatMessageEventTypeEnum;\n tags: string[];\n data: T;\n}\n\n/**\n * Category of step message: determines the display components of computer use\n */\nexport enum ChatMessageStepCategory {\n /**\n * List of items: urls, files, etc.\n */\n List = 'list',\n /**\n * Websearch results\n */\n WebSearch = 'web_search',\n /**\n * Files list\n */\n Files = 'files',\n /**\n * View a file\n */\n File = 'file',\n /**\n * Program Execution\n */\n Program = 'program',\n /**\n * Iframe\n */\n Iframe = 'iframe',\n\n Memory = 'memory',\n\n Tasks = 'tasks',\n\n /**\n * Knowledges (knowledge base retriever results)\n */\n Knowledges = 'knowledges',\n}\n\n/**\n * Step message type, in canvas and ai message.\n */\nexport type TChatMessageStep<T = any> = TMessageComponent<\n TMessageComponentStep<T>\n>;\n\nexport type ImageDetail = 'auto' | 'low' | 'high';\nexport type MessageContentText = {\n type: 'text';\n text: string;\n};\nexport type MessageContentImageUrl = {\n type: 'image_url';\n image_url:\n | string\n | {\n url: string;\n detail?: ImageDetail;\n };\n};\n\n/**\n * Similar to {@link MessageContentText} | {@link MessageContentImageUrl}, which together form {@link MessageContentComplex}\n */\nexport type TMessageContentComponent<T extends object = object> = {\n id: string;\n type: 'component';\n data: TMessageComponent<T>;\n xpertName?: string;\n agentKey?: string;\n};\n\n/**\n * Defines the data type of the sub-message of `component` type in the message `content` {@link MessageContentComplex}\n */\nexport type TMessageComponent<T extends object = object> = T & {\n id?: string;\n category: 'Dashboard' | 'Computer' | 'Tool';\n type?: string;\n created_date?: Date | string;\n};\n\nexport type TMessageComponentWidgetItem = {\n name: string;\n config: Types.Surface;\n values?: Record<string, unknown>;\n};\n\nexport type TMessageComponentWidgetData = {\n type: 'Widget';\n mode?: string;\n widgets: TMessageComponentWidgetItem[];\n executionId?: string;\n};\n\nexport type TMessageComponentWidget =\n TMessageComponent<TMessageComponentWidgetData>;\n\nexport type TMessageContentWidget =\n TMessageContentComponent<TMessageComponentWidgetData>;\n\nexport type TMessageContentText = {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n type: 'text';\n text: string;\n};\nexport type TMessageContentMemory = {\n id?: string;\n agentKey?: string;\n type: 'memory';\n data: any[];\n};\nexport type TMessageContentReasoning = {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n type: 'reasoning';\n text: string;\n};\n/**\n * Enhance {@link MessageContentComplex} in Langchain.js\n */\nexport type TMessageContentComplex = (\n | TMessageContentText\n | TMessageContentReasoning\n | MessageContentImageUrl\n | TMessageContentComponent\n | TMessageContentMemory\n | (Record<string, any> & {\n type?: 'text' | 'image_url' | string;\n })\n | (Record<string, any> & {\n type?: never;\n })\n) & {\n id?: string;\n xpertName?: string;\n agentKey?: string;\n created_date?: Date | string;\n};\n\n/**\n * Enhance {@link MessageContent} in Langchain.js\n *\n * @deprecated use {@link TMessageItems} instead\n */\nexport type TMessageContent = string | TMessageContentComplex[];\n\nexport type TMessageComponentIframe = {\n type: 'iframe';\n title: string;\n url?: string;\n data?: {\n url?: string;\n };\n};\n\nexport type TMessageComponentStep<T = unknown> = {\n type: ChatMessageStepCategory;\n toolset: string;\n toolset_id: string;\n tool?: string;\n title: string;\n message: string;\n status: 'success' | 'fail' | 'running';\n created_date: Date | string;\n end_date: Date | string;\n error?: string;\n data?: T;\n input?: any;\n output?: unknown;\n artifact?: any;\n};\n\n/**\n * Data type for chat event message\n */\nexport type TChatEventMessage = {\n type?: string;\n title?: string;\n message?: string;\n status?: 'success' | 'fail' | 'running';\n created_date?: Date | string;\n end_date?: Date | string;\n error?: string;\n};\n\nexport interface ChatkitMessage {\n status?: string;\n content: TMessageItems | string;\n reasoning?: TMessageContentReasoning[];\n type: 'user' | 'assistant' | 'system' | 'tool' | 'event';\n id: string;\n followUpMode?: FollowUpBehavior;\n followUpStatus?: 'pending' | 'consumed' | 'canceled';\n targetExecutionId?: string | null;\n visibleAt?: string | Date | null;\n}\n\nexport type TMessageItems = TMessageContentComplex[];\n\nexport type ChatKitReferenceBase = {\n id?: string;\n label?: string;\n text: string;\n};\n\nexport type ChatKitCodeReference = ChatKitReferenceBase & {\n type: 'code';\n path: string;\n startLine: number;\n endLine: number;\n language?: string;\n taskId?: string;\n};\n\nexport type ChatKitQuoteReference = ChatKitReferenceBase & {\n type: 'quote';\n messageId?: string;\n source?: string;\n};\n\nexport type ChatKitImageReference = ChatKitReferenceBase & {\n type: 'image';\n fileId?: string;\n url?: string;\n mimeType?: string;\n name?: string;\n size?: number;\n width?: number;\n height?: number;\n};\n\nexport type ChatKitReference =\n | ChatKitCodeReference\n | ChatKitQuoteReference\n | ChatKitImageReference;\n\nexport type ChatKitReferenceCompositionMode = 'compose' | 'preserve';\n\nexport const STATE_VARIABLE_HUMAN = 'human';\n\n/**\n * Human input message, include parameters and attachments\n */\nexport type TChatRequestHuman = {\n input?: string;\n files?: Partial<File>[];\n references?: ChatKitReference[];\n referenceComposition?: ChatKitReferenceCompositionMode;\n planMode?: boolean;\n [key: string]: unknown;\n};\n\n/**\n * Command to resume with streaming after human decision\n */\nexport type TInterruptCommand = {\n resume?: any;\n update?: any;\n toolCalls?: ToolCall[];\n agentKey?: string;\n};\n\nexport type TChatRequest = {\n /**\n * The human input, include parameters\n */\n input: TChatRequestHuman;\n /**\n * Custom graph state\n */\n state?: { [STATE_VARIABLE_HUMAN]: TChatRequestHuman } & Record<string, any>;\n agentKey?: string;\n projectId?: string;\n conversationId?: string;\n environmentId?: string;\n id?: string;\n executionId?: string;\n confirm?: boolean;\n command?: TInterruptCommand;\n retry?: boolean;\n followUpMode?: FollowUpBehavior;\n /**\n * PRO: Sandbox Environment Id\n * PRO: @description Sandbox environment ID to force using the specified container.\n */\n sandboxEnvironmentId?: string;\n};\n\n/**\n * Data type for client effect message\n */\nexport type TClientEeffectMessage = {\n name: string;\n args: Record<string, any>;\n tool_call_id?: string;\n agentKey?: string;\n created_date?: Date | string;\n};\n\n// Thread context usage\nexport type TThreadContextUsageMetrics = {\n contextTokens: number;\n inputTokens: number;\n outputTokens: number;\n totalTokens: number;\n embedTokens?: number;\n totalPrice?: number;\n currency?: string | null;\n};\n\nexport type TThreadContextUsageEvent = {\n type: 'thread_context_usage';\n threadId: string;\n runId: string | null;\n agentKey: string;\n updatedAt: string;\n usage: TThreadContextUsageMetrics;\n};\n\nexport const CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED = 'follow_up_consumed' as const;\n\nexport type TFollowUpConsumedEvent = TChatEventMessage & {\n type: typeof CHAT_EVENT_TYPE_FOLLOW_UP_CONSUMED;\n mode: 'queue' | 'steer';\n messageIds: string[];\n clientMessageIds?: string[];\n executionId?: string | null;\n visibleAt?: string | null;\n};\n"],"names":["ChatMessageTypeEnum","ChatMessageEventTypeEnum","ChatMessageStepCategory"],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/chatkit-types",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Type definitions for the ChatKit.",
5
5
  "sideEffects": false,
6
6
  "type": "module",