@cagent/chat-embedding-core 0.0.13 → 0.0.14

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.
Files changed (320) hide show
  1. package/.env +6 -0
  2. package/README.md +213 -213
  3. package/bun.lock +1548 -1548
  4. package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
  5. package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
  6. package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
  7. package/dist/api/chatRoom.d.ts.map +1 -0
  8. package/dist/arc-24dd4755.js +1 -0
  9. package/dist/arc-5d6257cf.js +1 -0
  10. package/dist/arc-90e71e7e.js +1 -0
  11. package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
  12. package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
  13. package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
  14. package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
  15. package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
  16. package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
  17. package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
  18. package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
  19. package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
  20. package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
  21. package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
  22. package/dist/channel-11d3f4bc.js +1 -0
  23. package/dist/channel-534c2e17.js +1 -0
  24. package/dist/channel-c3cf6060.js +1 -0
  25. package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
  26. package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
  27. package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
  28. package/dist/chunk-32BRIVSS-10123eba.js +1 -0
  29. package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
  30. package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
  31. package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
  32. package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
  33. package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
  34. package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
  35. package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
  36. package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
  37. package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
  38. package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
  39. package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
  40. package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
  41. package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
  42. package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
  43. package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
  44. package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
  45. package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
  46. package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
  47. package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
  48. package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
  49. package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
  50. package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
  51. package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
  52. package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
  53. package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
  54. package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
  55. package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
  56. package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
  57. package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
  58. package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
  59. package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
  60. package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
  61. package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
  62. package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
  63. package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
  64. package/dist/components/Badge.d.ts.map +1 -0
  65. package/dist/components/Bot.d.ts.map +1 -0
  66. package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
  67. package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
  68. package/dist/components/Toast.d.ts.map +1 -0
  69. package/dist/components/TypingBubble.d.ts.map +1 -0
  70. package/dist/components/avatars/Avatar.d.ts.map +1 -0
  71. package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
  72. package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
  73. package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
  74. package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
  75. package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
  76. package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
  77. package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
  78. package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
  79. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
  80. package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
  81. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
  82. package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
  83. package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
  84. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
  85. package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
  86. package/dist/components/buttons/CancelButton.d.ts.map +1 -0
  87. package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
  88. package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
  89. package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
  90. package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
  91. package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
  92. package/dist/components/buttons/PopupToast.d.ts.map +1 -0
  93. package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
  94. package/dist/components/buttons/SendButton.d.ts.map +1 -0
  95. package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
  96. package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
  97. package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
  98. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  99. package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
  100. package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
  101. package/dist/components/icons/CopyIcon.d.ts.map +1 -0
  102. package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
  103. package/dist/components/icons/EditIcon.d.ts.map +1 -0
  104. package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
  105. package/dist/components/icons/RecordIcon.d.ts.map +1 -0
  106. package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
  107. package/dist/components/icons/SendIcon.d.ts.map +1 -0
  108. package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
  109. package/dist/components/icons/StopIcon.d.ts.map +1 -0
  110. package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
  111. package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
  112. package/dist/components/icons/TickIcon.d.ts.map +1 -0
  113. package/dist/components/icons/TrashIcon.d.ts.map +1 -0
  114. package/dist/components/icons/XIcon.d.ts.map +1 -0
  115. package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
  116. package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
  117. package/dist/components/icons/index.d.ts.map +1 -0
  118. package/dist/components/image/PreviewImage.d.ts.map +1 -0
  119. package/dist/components/index.d.ts.map +1 -0
  120. package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
  121. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
  122. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
  123. package/dist/components/inputs/textInput/index.d.ts.map +1 -0
  124. package/dist/constants.d.ts.map +1 -0
  125. package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
  126. package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
  127. package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
  128. package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
  129. package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
  130. package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
  131. package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
  132. package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
  133. package/dist/cytoscape.esm-56d2239f.js +1 -0
  134. package/dist/cytoscape.esm-c9352dc8.js +1 -0
  135. package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
  136. package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
  137. package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
  138. package/dist/defaultLocale-b4977250.js +1 -0
  139. package/dist/defaultLocale-e35a4def.js +1 -0
  140. package/dist/diagram-FQU43EPY-41eed431.js +1 -0
  141. package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
  142. package/dist/diagram-FQU43EPY-d256050e.js +1 -0
  143. package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
  144. package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
  145. package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
  146. package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
  147. package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
  148. package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
  149. package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
  150. package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
  151. package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
  152. package/dist/diagram-WEI45ONY-0241463f.js +1 -0
  153. package/dist/diagram-WEI45ONY-dd634033.js +1 -0
  154. package/dist/diagram-WEI45ONY-e002e844.js +1 -0
  155. package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
  156. package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
  157. package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
  158. package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
  159. package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
  160. package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
  161. package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
  162. package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
  163. package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
  164. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
  165. package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
  166. package/dist/features/bubble/components/index.d.ts.map +1 -0
  167. package/dist/features/bubble/index.d.ts.map +1 -0
  168. package/dist/features/bubble/types.d.ts.map +1 -0
  169. package/dist/features/full/components/Full.d.ts.map +1 -0
  170. package/dist/features/full/components/index.d.ts.map +1 -0
  171. package/dist/features/full/index.d.ts.map +1 -0
  172. package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
  173. package/dist/features/popup/components/Popup.d.ts.map +1 -0
  174. package/dist/features/popup/components/index.d.ts.map +1 -0
  175. package/dist/features/popup/index.d.ts.map +1 -0
  176. package/dist/features/popup/types.d.ts.map +1 -0
  177. package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
  178. package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
  179. package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
  180. package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
  181. package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
  182. package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
  183. package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
  184. package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
  185. package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
  186. package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
  187. package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
  188. package/dist/graph-0df36b9d.js +1 -0
  189. package/dist/graph-c6801890.js +1 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
  192. package/dist/info-DKCQHKI2-dd69502c.js +1 -0
  193. package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
  194. package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
  195. package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
  196. package/dist/init-b029a625.js +1 -0
  197. package/dist/init-cf76ae07.js +1 -0
  198. package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
  199. package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
  200. package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
  201. package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
  202. package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
  203. package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
  204. package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
  205. package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
  206. package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
  207. package/dist/katex-67456a45.js +1 -0
  208. package/dist/katex-b134d23c.js +1 -0
  209. package/dist/layout-e44354bf.js +1 -0
  210. package/dist/layout-ff5d33a1.js +1 -0
  211. package/dist/linear-7b1a23f3.js +1 -0
  212. package/dist/linear-d7ad6d25.js +1 -0
  213. package/dist/linear-e5c99c88.js +1 -0
  214. package/dist/map-05f0ff95.js +1 -0
  215. package/dist/map-d3292a5b.js +1 -0
  216. package/dist/mermaid-parser.core-6df0beec.js +1 -0
  217. package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
  218. package/dist/mermaid.core-2d237a1e.js +1 -0
  219. package/dist/mermaid.core-70d5aead.js +1 -0
  220. package/dist/mermaid.core-8797d6a9.js +1 -0
  221. package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
  222. package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
  223. package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
  224. package/dist/ordinal-221e41d7.js +1 -0
  225. package/dist/ordinal-4a51e46c.js +1 -0
  226. package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
  227. package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
  228. package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
  229. package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
  230. package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
  231. package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
  232. package/dist/pie-RZYD4A2V-752eda00.js +1 -0
  233. package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
  234. package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
  235. package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
  236. package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
  237. package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
  238. package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
  239. package/dist/queries/sendMessageQuery.d.ts.map +1 -0
  240. package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
  241. package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
  242. package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
  243. package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
  244. package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
  245. package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
  246. package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
  247. package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
  248. package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
  249. package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
  250. package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
  251. package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
  252. package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
  253. package/dist/register.d.ts.map +1 -0
  254. package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
  255. package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
  256. package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
  257. package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
  258. package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
  259. package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
  260. package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
  261. package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
  262. package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
  263. package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
  264. package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
  265. package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
  266. package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
  267. package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
  268. package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
  269. package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
  270. package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
  271. package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
  272. package/dist/store/constant.d.ts.map +1 -0
  273. package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
  274. package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
  275. package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
  276. package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
  277. package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
  278. package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
  279. package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
  280. package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
  281. package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
  282. package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
  283. package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
  284. package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
  285. package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
  286. package/dist/types/chart.d.ts.map +1 -0
  287. package/dist/types.d.ts +1 -0
  288. package/dist/types.d.ts.map +1 -0
  289. package/dist/utils/audioRecording.d.ts.map +1 -0
  290. package/dist/utils/chartInstanceManager.d.ts.map +1 -0
  291. package/dist/utils/chartTagParser.d.ts.map +1 -0
  292. package/dist/utils/chatInputHistory.d.ts.map +1 -0
  293. package/dist/utils/chatStreamHelper.d.ts.map +1 -0
  294. package/dist/utils/index.d.ts.map +1 -0
  295. package/dist/utils/isMobileSignal.d.ts.map +1 -0
  296. package/dist/utils/transcriptApi.d.ts.map +1 -0
  297. package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
  298. package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
  299. package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
  300. package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
  301. package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
  302. package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
  303. package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
  304. package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
  305. package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
  306. package/dist/web-25bb78b9.js +1 -0
  307. package/dist/web-753300e1.js +1 -0
  308. package/dist/web-c3ed22c4.js +1 -0
  309. package/dist/web.d.ts.map +1 -0
  310. package/dist/web.js +1 -1
  311. package/dist/window.d.ts.map +1 -0
  312. package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
  313. package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
  314. package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
  315. package/package.json +86 -86
  316. package/server.js +477 -477
  317. package/.idea/flowise-chatbox.iml +0 -10
  318. package/.idea/modules.xml +0 -8
  319. package/.idea/workspace.xml +0 -4
  320. package/docs/embedding-style-guide.md +0 -417
package/.env ADDED
@@ -0,0 +1,6 @@
1
+ API_HOST=http://localhost:3001
2
+ CAGENT_API_KEY=
3
+ # Cấu hình chatflow theo format: [tên]=[chatflowId],[domain-cho-phép],...
4
+ support=abc123-def456,https://example.com
5
+ agent1=xyz789-uvw456,https://sales.example.com
6
+ NODE_ENV=development
package/README.md CHANGED
@@ -1,213 +1,213 @@
1
- <!-- markdownlint-disable MD030 -->
2
-
3
- # Agent Studio Embed
4
-
5
- Javascript library to display the Agent Studio chatbot on your website
6
-
7
- Install:
8
-
9
- ```bash
10
- bun install --frozen-lockfile
11
- ```
12
-
13
- Dev:
14
-
15
- ```bash
16
- bun run dev
17
- ```
18
-
19
- A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to your backend:
20
-
21
- ```html
22
- <!-- public/index.html -->
23
- <script type="module">
24
- import Chatbot from 'https://localhost:5678/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
25
- Chatbot.init({
26
- chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', // Add your chatflowid
27
- apiHost: 'https://your-backend-instance.com', // Add your apiHost
28
- });
29
- </script>
30
- ```
31
-
32
- Build:
33
-
34
- ```bash
35
- bun run build
36
- ```
37
-
38
- ## Embed in your HTML
39
-
40
- ### PopUp
41
-
42
- ```html
43
- <script type="module">
44
- import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
45
- Chatbot.init({
46
- chatflowid: '<chatflowid>',
47
- apiHost: 'http://localhost:3000',
48
- });
49
- </script>
50
- ```
51
-
52
- ### FullPage
53
-
54
- ```html
55
- <script type="module">
56
- import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
57
- Chatbot.initFull({
58
- chatflowid: '<chatflowid>',
59
- apiHost: 'http://localhost:3000',
60
- });
61
- </script>
62
- <cagent-fullchatbot></cagent-fullchatbot>
63
- ```
64
-
65
- To enable full screen, add `margin: 0` to <code>body</code> style, and confirm you don't set height and width
66
-
67
- ```html
68
- <body style="margin: 0">
69
- <script type="module">
70
- import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
71
- Chatbot.initFull({
72
- chatflowid: '<chatflowid>',
73
- apiHost: 'http://localhost:3000',
74
- theme: {
75
- chatWindow: {
76
- // height: 700, don't set height
77
- // width: 400, don't set width
78
- },
79
- },
80
- });
81
- </script>
82
- </body>
83
- ```
84
-
85
- ## Configuration
86
-
87
- You can also customize chatbot with different configuration
88
-
89
- ```html
90
- <script type="module">
91
- import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core/dist/web.js';
92
- Chatbot.init({
93
- chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f',
94
- apiHost: 'http://localhost:3000',
95
- chatflowConfig: {
96
- // topK: 2
97
- },
98
- theme: {
99
- disclaimer: {
100
- title: 'Disclaimer',
101
- message: 'By using this chatbot, you agree to the <a target="_blank" href="#">Terms & Condition</a>',
102
- },
103
- chatWindow: {
104
- showTitle: true,
105
- title: 'Agent Studio Bot',
106
- welcomeMessage: 'Hello! This is custom welcome message',
107
- textInput: {
108
- placeholder: 'Type your question',
109
- sendMessageSound: true,
110
- receiveMessageSound: true,
111
- },
112
- footer: {
113
- text: 'Powered by',
114
- company: 'Agent Studio',
115
- companyLink: '#',
116
- },
117
- },
118
- },
119
- });
120
- </script>
121
- ```
122
-
123
- ## (Experimental) Proxy Server Setup
124
-
125
- The proxy server enhances the security of your chatbot implementation by acting as a protective intermediary layer. It removes the need to expose sensitive backend instance details in your frontend code and provides several key security benefits:
126
-
127
- - **Enhanced Security**: Conceals your API host and chatflow IDs from client-side exposure
128
- - **Access Control**: Implements strict domain-based restrictions for chatbot embedding
129
- - **Secure Communication**: Acts as a secure gateway for all interactions between your website and the backend instance
130
- - **Authentication Management**: Handles API key authentication securely on the server side, away from client exposure
131
-
132
- This proxy server can be deployed to any Node.js hosting platform.
133
-
134
- ## Quick Start
135
-
136
- 1. Configure environment:
137
-
138
- ```bash
139
- # Copy .env.example to .env and configure required settings:
140
- API_HOST=https://your-backend-instance.com
141
- CAGENT_API_KEY=your-api-key
142
-
143
- # Configure your chatflows:
144
- # Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],...
145
- #
146
- # identifier: Any name you choose (e.g., agent1, support, salesbot)
147
- # chatflowId: The UUID of your chatflow
148
- # allowedDomains: Comma-separated list of domains where this chat can be embedded
149
- #
150
- # Examples:
151
- support=abc123-def456,https://example.com
152
- agent1=xyz789-uvw456,https://sales.example.com
153
- helpdesk=ghi123-jkl456,https://help.example.com,https://support.example.com
154
- ```
155
-
156
- 2. Install dependencies: (assuming you did not run `bun install` yet)
157
-
158
- ```bash
159
- bun install
160
- ```
161
-
162
- 3. Start proxy server:
163
-
164
- ```bash
165
- bun run start
166
- # Server will be available at:
167
- # - Local: http://localhost:3001
168
- # - Cloud: [Your Platform URL]
169
- ```
170
-
171
- 4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your API host and chatflow IDs:
172
-
173
- ```html
174
- <script type="module">
175
- import Chatbot from 'your-proxy-server-url/web.js'; // Must be 'your-proxy-server-url/web.js'
176
- Chatbot.init({
177
- chatflowid: 'your-identifier-here', // Must match an identifier from your .env
178
- apiHost: 'your-proxy-server-url', // Must match the URL of your proxy server
179
- });
180
- </script>
181
- ```
182
-
183
- **Important Notes:**
184
-
185
- - To ensure secure embedding, you must explicitly whitelist the websites authorized to embed each chatbot. This configuration is done within the .env file. This also applies to your server's URL when deployed to a cloud environment, or http://localhost:3001 for local development.
186
- - Wildcard domains (\*) are not supported for security reasons
187
- - Identifiers are case-insensitive (e.g., 'Support' and 'support' are treated the same)
188
-
189
- ## Cloud Deployment Requirements
190
-
191
- When deploying to cloud platforms, you must configure the environment variables directly in your platform. The proxy server will not start without these variables being properly set.
192
-
193
- ## Development Mode (For Local Testing)
194
-
195
- For full page testing, use this configuration:
196
-
197
- ```html
198
- <!-- public/index.html -->
199
- <cagent-fullchatbot></cagent-fullchatbot>
200
- <script type="module">
201
- import Chatbot from './web.js';
202
- Chatbot.initFull({
203
- chatflowid: 'agent1', // Must match an identifier from your .env
204
- apiHost: 'http://localhost:3001',
205
- });
206
- </script>
207
- ```
208
-
209
- **Note:** The development URL (http://localhost:5678) is automatically added to allowed domains in development mode.
210
-
211
- ## License
212
-
213
- Source code in this repository is made available under the MIT License.
1
+ <!-- markdownlint-disable MD030 -->
2
+
3
+ # Agent Studio Embed
4
+
5
+ Javascript library to display the Agent Studio chatbot on your website
6
+
7
+ Install:
8
+
9
+ ```bash
10
+ bun install --frozen-lockfile
11
+ ```
12
+
13
+ Dev:
14
+
15
+ ```bash
16
+ bun run dev
17
+ ```
18
+
19
+ A development server will be running on http://localhost:5678 automatically. Update `public/index.html` to connect directly to your backend:
20
+
21
+ ```html
22
+ <!-- public/index.html -->
23
+ <script type="module">
24
+ import Chatbot from 'https://localhost:5678/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
25
+ Chatbot.init({
26
+ chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f', // Add your chatflowid
27
+ apiHost: 'https://your-backend-instance.com', // Add your apiHost
28
+ });
29
+ </script>
30
+ ```
31
+
32
+ Build:
33
+
34
+ ```bash
35
+ bun run build
36
+ ```
37
+
38
+ ## Embed in your HTML
39
+
40
+ ### PopUp
41
+
42
+ ```html
43
+ <script type="module">
44
+ import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
45
+ Chatbot.init({
46
+ chatflowid: '<chatflowid>',
47
+ apiHost: 'http://localhost:3000',
48
+ });
49
+ </script>
50
+ ```
51
+
52
+ ### FullPage
53
+
54
+ ```html
55
+ <script type="module">
56
+ import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
57
+ Chatbot.initFull({
58
+ chatflowid: '<chatflowid>',
59
+ apiHost: 'http://localhost:3000',
60
+ });
61
+ </script>
62
+ <cagent-fullchatbot></cagent-fullchatbot>
63
+ ```
64
+
65
+ To enable full screen, add `margin: 0` to <code>body</code> style, and confirm you don't set height and width
66
+
67
+ ```html
68
+ <body style="margin: 0">
69
+ <script type="module">
70
+ import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core@latest/dist/web.js';
71
+ Chatbot.initFull({
72
+ chatflowid: '<chatflowid>',
73
+ apiHost: 'http://localhost:3000',
74
+ theme: {
75
+ chatWindow: {
76
+ // height: 700, don't set height
77
+ // width: 400, don't set width
78
+ },
79
+ },
80
+ });
81
+ </script>
82
+ </body>
83
+ ```
84
+
85
+ ## Configuration
86
+
87
+ You can also customize chatbot with different configuration
88
+
89
+ ```html
90
+ <script type="module">
91
+ import Chatbot from 'https://cdn.jsdelivr.net/npm/@cagent/chat-embedding-core/dist/web.js';
92
+ Chatbot.init({
93
+ chatflowid: '91e9c803-5169-4db9-8207-3c0915d71c5f',
94
+ apiHost: 'http://localhost:3000',
95
+ chatflowConfig: {
96
+ // topK: 2
97
+ },
98
+ theme: {
99
+ disclaimer: {
100
+ title: 'Disclaimer',
101
+ message: 'By using this chatbot, you agree to the <a target="_blank" href="#">Terms & Condition</a>',
102
+ },
103
+ chatWindow: {
104
+ showTitle: true,
105
+ title: 'Agent Studio Bot',
106
+ welcomeMessage: 'Hello! This is custom welcome message',
107
+ textInput: {
108
+ placeholder: 'Type your question',
109
+ sendMessageSound: true,
110
+ receiveMessageSound: true,
111
+ },
112
+ footer: {
113
+ text: 'Powered by',
114
+ company: 'Agent Studio',
115
+ companyLink: '#',
116
+ },
117
+ },
118
+ },
119
+ });
120
+ </script>
121
+ ```
122
+
123
+ ## (Experimental) Proxy Server Setup
124
+
125
+ The proxy server enhances the security of your chatbot implementation by acting as a protective intermediary layer. It removes the need to expose sensitive backend instance details in your frontend code and provides several key security benefits:
126
+
127
+ - **Enhanced Security**: Conceals your API host and chatflow IDs from client-side exposure
128
+ - **Access Control**: Implements strict domain-based restrictions for chatbot embedding
129
+ - **Secure Communication**: Acts as a secure gateway for all interactions between your website and the backend instance
130
+ - **Authentication Management**: Handles API key authentication securely on the server side, away from client exposure
131
+
132
+ This proxy server can be deployed to any Node.js hosting platform.
133
+
134
+ ## Quick Start
135
+
136
+ 1. Configure environment:
137
+
138
+ ```bash
139
+ # Copy .env.example to .env and configure required settings:
140
+ API_HOST=https://your-backend-instance.com
141
+ CAGENT_API_KEY=your-api-key
142
+
143
+ # Configure your chatflows:
144
+ # Format: [identifier]=[chatflowId],[allowedDomain1],[allowedDomain2],...
145
+ #
146
+ # identifier: Any name you choose (e.g., agent1, support, salesbot)
147
+ # chatflowId: The UUID of your chatflow
148
+ # allowedDomains: Comma-separated list of domains where this chat can be embedded
149
+ #
150
+ # Examples:
151
+ support=abc123-def456,https://example.com
152
+ agent1=xyz789-uvw456,https://sales.example.com
153
+ helpdesk=ghi123-jkl456,https://help.example.com,https://support.example.com
154
+ ```
155
+
156
+ 2. Install dependencies: (assuming you did not run `bun install` yet)
157
+
158
+ ```bash
159
+ bun install
160
+ ```
161
+
162
+ 3. Start proxy server:
163
+
164
+ ```bash
165
+ bun run start
166
+ # Server will be available at:
167
+ # - Local: http://localhost:3001
168
+ # - Cloud: [Your Platform URL]
169
+ ```
170
+
171
+ 4. Once the proxy server is running in production, you will be able to embed your chatbots safely without exposing your API host and chatflow IDs:
172
+
173
+ ```html
174
+ <script type="module">
175
+ import Chatbot from 'your-proxy-server-url/web.js'; // Must be 'your-proxy-server-url/web.js'
176
+ Chatbot.init({
177
+ chatflowid: 'your-identifier-here', // Must match an identifier from your .env
178
+ apiHost: 'your-proxy-server-url', // Must match the URL of your proxy server
179
+ });
180
+ </script>
181
+ ```
182
+
183
+ **Important Notes:**
184
+
185
+ - To ensure secure embedding, you must explicitly whitelist the websites authorized to embed each chatbot. This configuration is done within the .env file. This also applies to your server's URL when deployed to a cloud environment, or http://localhost:3001 for local development.
186
+ - Wildcard domains (\*) are not supported for security reasons
187
+ - Identifiers are case-insensitive (e.g., 'Support' and 'support' are treated the same)
188
+
189
+ ## Cloud Deployment Requirements
190
+
191
+ When deploying to cloud platforms, you must configure the environment variables directly in your platform. The proxy server will not start without these variables being properly set.
192
+
193
+ ## Development Mode (For Local Testing)
194
+
195
+ For full page testing, use this configuration:
196
+
197
+ ```html
198
+ <!-- public/index.html -->
199
+ <cagent-fullchatbot></cagent-fullchatbot>
200
+ <script type="module">
201
+ import Chatbot from './web.js';
202
+ Chatbot.initFull({
203
+ chatflowid: 'agent1', // Must match an identifier from your .env
204
+ apiHost: 'http://localhost:3001',
205
+ });
206
+ </script>
207
+ ```
208
+
209
+ **Note:** The development URL (http://localhost:5678) is automatically added to allowed domains in development mode.
210
+
211
+ ## License
212
+
213
+ Source code in this repository is made available under the MIT License.