@8wave/ai-elements 0.126.0 → 0.127.0-beta.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.
Files changed (183) hide show
  1. package/dist/_chunks/{Agent-DytagI8S.js → Agent-nB9V45mr.js} +354 -276
  2. package/dist/_chunks/Agent-nB9V45mr.js.map +1 -0
  3. package/dist/_chunks/{Document-BdWEd1tb.js → Document-Dm5GM40t.js} +7 -7
  4. package/dist/_chunks/{Document-BdWEd1tb.js.map → Document-Dm5GM40t.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreview-C3BxAdui.js → PkFilePreview-qTCDbut0.js} +3 -3
  6. package/dist/_chunks/{PkFilePreview-C3BxAdui.js.map → PkFilePreview-qTCDbut0.js.map} +1 -1
  7. package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js → PkFilePreviewDialog-m5d4zZDi.js} +2 -2
  8. package/dist/_chunks/{PkFilePreviewDialog-WAm7QSvT.js.map → PkFilePreviewDialog-m5d4zZDi.js.map} +1 -1
  9. package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js → PkImageEditorDialog-aekpEqWD.js} +2 -2
  10. package/dist/_chunks/{PkImageEditorDialog-DM-d0hCD.js.map → PkImageEditorDialog-aekpEqWD.js.map} +1 -1
  11. package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js → PkSelectionActions-DDhRX6cs.js} +2 -2
  12. package/dist/_chunks/{PkSelectionActions-Bl1KbGOj.js.map → PkSelectionActions-DDhRX6cs.js.map} +1 -1
  13. package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js → PkStreamingMarkdown-5WfFCjFv.js} +3 -3
  14. package/dist/_chunks/{PkStreamingMarkdown-CU1ZUUCf.js.map → PkStreamingMarkdown-5WfFCjFv.js.map} +1 -1
  15. package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js → PkToolChatFile-C3B9q2OL.js} +3 -3
  16. package/dist/_chunks/{PkToolChatFile-B-Y47Q_K.js.map → PkToolChatFile-C3B9q2OL.js.map} +1 -1
  17. package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js → PkToolRequestGeolocation-D4pYnCW5.js} +2 -2
  18. package/dist/_chunks/{PkToolRequestGeolocation-B41xrF8k.js.map → PkToolRequestGeolocation-D4pYnCW5.js.map} +1 -1
  19. package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js → PkToolRequestOAuthConnection-DnnRY2rt.js} +2 -2
  20. package/dist/_chunks/{PkToolRequestOAuthConnection-BuCGuHwd.js.map → PkToolRequestOAuthConnection-DnnRY2rt.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js → PkToolShowArtifact-DQln7TsF.js} +2 -2
  22. package/dist/_chunks/{PkToolShowArtifact-Bjm6uhOK.js.map → PkToolShowArtifact-DQln7TsF.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js → PkToolShowChart-DfDB9BeZ.js} +2 -2
  24. package/dist/_chunks/{PkToolShowChart-B6TKQ3aT.js.map → PkToolShowChart-DfDB9BeZ.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js → PkToolShowContactForm-Dkb8AiqL.js} +2 -2
  26. package/dist/_chunks/{PkToolShowContactForm-5tg4xbrh.js.map → PkToolShowContactForm-Dkb8AiqL.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js → PkToolShowDiagram-B2dBogUW.js} +2 -2
  28. package/dist/_chunks/{PkToolShowDiagram-CiNtS-vX.js.map → PkToolShowDiagram-B2dBogUW.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js → PkToolShowForm-CtDcwJs4.js} +4 -4
  30. package/dist/_chunks/{PkToolShowForm-eh8mXr6u.js.map → PkToolShowForm-CtDcwJs4.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js → PkToolShowImageGallery-dLMI3SM7.js} +2 -2
  32. package/dist/_chunks/{PkToolShowImageGallery-DedpXD-b.js.map → PkToolShowImageGallery-dLMI3SM7.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js → PkToolShowProductList-DE6BEdr_.js} +2 -2
  34. package/dist/_chunks/{PkToolShowProductList-D24EIc4v.js.map → PkToolShowProductList-DE6BEdr_.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js → PkToolShowSources-vSr080EU.js} +3 -3
  36. package/dist/_chunks/{PkToolShowSources-Dnw1x7dT.js.map → PkToolShowSources-vSr080EU.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js → PkToolShowSuggestedReply-HuKn3loC.js} +2 -2
  38. package/dist/_chunks/{PkToolShowSuggestedReply-CxNx1Uf6.js.map → PkToolShowSuggestedReply-HuKn3loC.js.map} +1 -1
  39. package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js → PkToolShowVideo-BL-9CiYe.js} +2 -2
  40. package/dist/_chunks/{PkToolShowVideo-CDcJiprr.js.map → PkToolShowVideo-BL-9CiYe.js.map} +1 -1
  41. package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js → PkToolShowWebPages-DQfODZdD.js} +2 -2
  42. package/dist/_chunks/{PkToolShowWebPages-UXqb0XEJ.js.map → PkToolShowWebPages-DQfODZdD.js.map} +1 -1
  43. package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js → chatImagePolicy-Cj5lkTVq.js} +2 -2
  44. package/dist/_chunks/{chatImagePolicy-DJAB0Bgw.js.map → chatImagePolicy-Cj5lkTVq.js.map} +1 -1
  45. package/dist/_chunks/text-CCurUhdH.js +13 -0
  46. package/dist/_chunks/text-CCurUhdH.js.map +1 -0
  47. package/dist/_chunks/{utils-78zQeKDO.js → utils-CRy3kzE3.js} +458 -160
  48. package/dist/_chunks/utils-CRy3kzE3.js.map +1 -0
  49. package/dist/ai-elements.es.js +5971 -5636
  50. package/dist/ai-elements.es.js.map +1 -1
  51. package/dist-vue/PkChatbot.js +1 -1
  52. package/dist-vue/PkChatbotAuth.js +1 -1
  53. package/dist-vue/PkChatbotEmptyState.js +1 -1
  54. package/dist-vue/PkChatbotInput.js +1 -1
  55. package/dist-vue/PkChatbotLocalFolders.d.ts +2 -0
  56. package/dist-vue/PkChatbotLocalFolders.js +1 -0
  57. package/dist-vue/PkChatbotMessages.js +1 -1
  58. package/dist-vue/PkChatbotStepPayload.js +1 -1
  59. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  60. package/dist-vue/PkChatbotSteps.js +1 -1
  61. package/dist-vue/PkChatbotViewChat.js +1 -1
  62. package/dist-vue/PkChatbotViewConversations.js +1 -1
  63. package/dist-vue/PkChatbotViewFiles.js +1 -1
  64. package/dist-vue/PkChatbotViewProfile.js +1 -1
  65. package/dist-vue/_chunks/{Agent-Da4XChe8.js → Agent-DKefaJeG.js} +445 -377
  66. package/dist-vue/_chunks/Agent-DKefaJeG.js.map +1 -0
  67. package/dist-vue/_chunks/{Document-CsQsUQYa.js → Document-B49E_gxT.js} +18 -18
  68. package/dist-vue/_chunks/{Document-CsQsUQYa.js.map → Document-B49E_gxT.js.map} +1 -1
  69. package/dist-vue/_chunks/{Media-CMiWEpdQ.js → Media-DtudATme.js} +12 -2
  70. package/dist-vue/_chunks/Media-DtudATme.js.map +1 -0
  71. package/dist-vue/_chunks/{PkChatbot-CITKd3qD.js → PkChatbot-8Fqlhwq5.js} +10 -9
  72. package/dist-vue/_chunks/PkChatbot-8Fqlhwq5.js.map +1 -0
  73. package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js → PkChatbotAuth-CIK2CFy-.js} +8 -8
  74. package/dist-vue/_chunks/{PkChatbotAuth-SfTyFbq1.js.map → PkChatbotAuth-CIK2CFy-.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js → PkChatbotEmptyState-C_htXOSW.js} +2 -2
  76. package/dist-vue/_chunks/{PkChatbotEmptyState-DI_8T5a4.js.map → PkChatbotEmptyState-C_htXOSW.js.map} +1 -1
  77. package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js +658 -0
  78. package/dist-vue/_chunks/PkChatbotInput-CJ5lPtpH.js.map +1 -0
  79. package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js +126 -0
  80. package/dist-vue/_chunks/PkChatbotLocalFolders-CSvqh_Cx.js.map +1 -0
  81. package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js → PkChatbotMessages-DY8r4UKe.js} +49 -49
  82. package/dist-vue/_chunks/{PkChatbotMessages-BWdINCAX.js.map → PkChatbotMessages-DY8r4UKe.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js → PkChatbotStepPayload-BLjH1pkP.js} +2 -2
  84. package/dist-vue/_chunks/{PkChatbotStepPayload-CTwsRpkv.js.map → PkChatbotStepPayload-BLjH1pkP.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js → PkChatbotStepToolDetail-wIZmkvr-.js} +3 -3
  86. package/dist-vue/_chunks/{PkChatbotStepToolDetail-C9xeMg-k.js.map → PkChatbotStepToolDetail-wIZmkvr-.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js → PkChatbotSteps-DG09GyCb.js} +7 -7
  88. package/dist-vue/_chunks/{PkChatbotSteps-DsubpIKa.js.map → PkChatbotSteps-DG09GyCb.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkChatbotViewChat-DW1a9ZNl.js → PkChatbotViewChat-DTKfW1kr.js} +684 -666
  90. package/dist-vue/_chunks/PkChatbotViewChat-DTKfW1kr.js.map +1 -0
  91. package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js → PkChatbotViewConversations-NA_PCvZR.js} +4 -4
  92. package/dist-vue/_chunks/{PkChatbotViewConversations-DdniYy1b.js.map → PkChatbotViewConversations-NA_PCvZR.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js → PkChatbotViewFiles-D8_Khdu2.js} +3 -3
  94. package/dist-vue/_chunks/{PkChatbotViewFiles-CMoromsf.js.map → PkChatbotViewFiles-D8_Khdu2.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js → PkChatbotViewProfile-iTBiQVsZ.js} +2 -2
  96. package/dist-vue/_chunks/{PkChatbotViewProfile-BT7I3GhB.js.map → PkChatbotViewProfile-iTBiQVsZ.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js → PkFilePreview-sSb1Mmr2.js} +4 -4
  98. package/dist-vue/_chunks/{PkFilePreview-Dxp-U8QU.js.map → PkFilePreview-sSb1Mmr2.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js → PkFilePreviewDialog-DquXMRJD.js} +2 -2
  100. package/dist-vue/_chunks/{PkFilePreviewDialog-BE-NpN18.js.map → PkFilePreviewDialog-DquXMRJD.js.map} +1 -1
  101. package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js → PkImageEditorDialog-CrjpCier.js} +2 -2
  102. package/dist-vue/_chunks/{PkImageEditorDialog-BiuOD6Hr.js.map → PkImageEditorDialog-CrjpCier.js.map} +1 -1
  103. package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js → PkStreamingMarkdown-CgKFdzCI.js} +23 -23
  104. package/dist-vue/_chunks/{PkStreamingMarkdown-DMmt35Mq.js.map → PkStreamingMarkdown-CgKFdzCI.js.map} +1 -1
  105. package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js → PkToolChatFile-IEQxfzjM.js} +3 -3
  106. package/dist-vue/_chunks/{PkToolChatFile-BdNron14.js.map → PkToolChatFile-IEQxfzjM.js.map} +1 -1
  107. package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js → PkToolRequestGeolocation-BmrbMPke.js} +2 -2
  108. package/dist-vue/_chunks/{PkToolRequestGeolocation-DeI7kLlR.js.map → PkToolRequestGeolocation-BmrbMPke.js.map} +1 -1
  109. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js → PkToolRequestOAuthConnection-yKgXyOUN.js} +2 -2
  110. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C0lE3Qbk.js.map → PkToolRequestOAuthConnection-yKgXyOUN.js.map} +1 -1
  111. package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js → PkToolShowArtifact-CF90yFCe.js} +2 -2
  112. package/dist-vue/_chunks/{PkToolShowArtifact-C0Gb-LW2.js.map → PkToolShowArtifact-CF90yFCe.js.map} +1 -1
  113. package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js → PkToolShowChart-CDR8ag4q.js} +2 -2
  114. package/dist-vue/_chunks/{PkToolShowChart-oJmzU10F.js.map → PkToolShowChart-CDR8ag4q.js.map} +1 -1
  115. package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js → PkToolShowContactForm-DAdKUU4X.js} +2 -2
  116. package/dist-vue/_chunks/{PkToolShowContactForm-D4IAna-K.js.map → PkToolShowContactForm-DAdKUU4X.js.map} +1 -1
  117. package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js → PkToolShowDiagram-Do20AvFb.js} +2 -2
  118. package/dist-vue/_chunks/{PkToolShowDiagram-ClGpv5Cr.js.map → PkToolShowDiagram-Do20AvFb.js.map} +1 -1
  119. package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js → PkToolShowForm-DfFmPOt6.js} +4 -4
  120. package/dist-vue/_chunks/{PkToolShowForm-ByfNodNh.js.map → PkToolShowForm-DfFmPOt6.js.map} +1 -1
  121. package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js → PkToolShowImageGallery-DA6KW2g_.js} +2 -2
  122. package/dist-vue/_chunks/{PkToolShowImageGallery-DJ9JNDWK.js.map → PkToolShowImageGallery-DA6KW2g_.js.map} +1 -1
  123. package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js → PkToolShowProductList-FcDDabPI.js} +2 -2
  124. package/dist-vue/_chunks/{PkToolShowProductList-CcFseg28.js.map → PkToolShowProductList-FcDDabPI.js.map} +1 -1
  125. package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js → PkToolShowSources-afCYBONq.js} +3 -3
  126. package/dist-vue/_chunks/{PkToolShowSources-DznWqWK3.js.map → PkToolShowSources-afCYBONq.js.map} +1 -1
  127. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js → PkToolShowSuggestedReply-C863wgtU.js} +2 -2
  128. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BZqnfpwO.js.map → PkToolShowSuggestedReply-C863wgtU.js.map} +1 -1
  129. package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js → PkToolShowVideo-kUiwxRlz.js} +2 -2
  130. package/dist-vue/_chunks/{PkToolShowVideo-niwkzqTN.js.map → PkToolShowVideo-kUiwxRlz.js.map} +1 -1
  131. package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js → PkToolShowWebPages-Dw9D1__u.js} +2 -2
  132. package/dist-vue/_chunks/{PkToolShowWebPages-BsMVJ6c7.js.map → PkToolShowWebPages-Dw9D1__u.js.map} +1 -1
  133. package/dist-vue/_chunks/{createChatbotApiClient-Cd_2UI_O.js → createChatbotApiClient-DzrHp52e.js} +66 -65
  134. package/dist-vue/_chunks/createChatbotApiClient-DzrHp52e.js.map +1 -0
  135. package/dist-vue/_chunks/localFolders-ChZp8dLu.js +353 -0
  136. package/dist-vue/_chunks/localFolders-ChZp8dLu.js.map +1 -0
  137. package/dist-vue/_chunks/{useChatbotStore-Dir9Rc7K.js → useChatbotStore-DZlc7dzK.js} +1289 -1152
  138. package/dist-vue/_chunks/useChatbotStore-DZlc7dzK.js.map +1 -0
  139. package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js +55 -0
  140. package/dist-vue/_chunks/useSettledSelection-1bfM1fzx.js.map +1 -0
  141. package/dist-vue/_chunks/{utils-CibsowVe.js → utils-CY0jFRnG.js} +126 -107
  142. package/dist-vue/_chunks/utils-CY0jFRnG.js.map +1 -0
  143. package/dist-vue/api.js +1 -1
  144. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
  145. package/dist-vue/composables.js +62 -10
  146. package/dist-vue/composables.js.map +1 -1
  147. package/dist-vue/index.js +4100 -4086
  148. package/dist-vue/index.js.map +1 -1
  149. package/dist-vue/locales.js +32 -0
  150. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
  151. package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +7 -1
  152. package/dist-vue/packages/components/src/chat/PkChatbotLocalFolders.d.ts +31 -0
  153. package/dist-vue/packages/components/src/chat/utils.d.ts +3 -2
  154. package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +1 -1
  155. package/dist-vue/packages/composable/src/chatbot/index.d.ts +1 -0
  156. package/dist-vue/packages/composable/src/chatbot/localFolders.d.ts +137 -0
  157. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +46 -3
  158. package/dist-vue/packages/models/src/schema/Agent.d.ts +24 -0
  159. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  160. package/dist-vue/packages/models/src/schema/HostTool.d.ts +5 -2
  161. package/dist-vue/packages/models/src/schema/LocalFolder.d.ts +78 -0
  162. package/dist-vue/packages/models/src/schema/Organization.d.ts +10 -0
  163. package/dist-vue/packages/models/src/schema/PageAccess.d.ts +4 -1
  164. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +8 -0
  165. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +8 -0
  166. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  167. package/dist-vue/style.css +1 -1
  168. package/package.json +1 -1
  169. package/dist/_chunks/Agent-DytagI8S.js.map +0 -1
  170. package/dist/_chunks/text-5F7L8EHi.js +0 -5
  171. package/dist/_chunks/text-5F7L8EHi.js.map +0 -1
  172. package/dist/_chunks/utils-78zQeKDO.js.map +0 -1
  173. package/dist-vue/_chunks/Agent-Da4XChe8.js.map +0 -1
  174. package/dist-vue/_chunks/Media-CMiWEpdQ.js.map +0 -1
  175. package/dist-vue/_chunks/PkChatbot-CITKd3qD.js.map +0 -1
  176. package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js +0 -708
  177. package/dist-vue/_chunks/PkChatbotInput-UqcSEi8l.js.map +0 -1
  178. package/dist-vue/_chunks/PkChatbotViewChat-DW1a9ZNl.js.map +0 -1
  179. package/dist-vue/_chunks/createChatbotApiClient-Cd_2UI_O.js.map +0 -1
  180. package/dist-vue/_chunks/message-DuibQyHy.js +0 -61
  181. package/dist-vue/_chunks/message-DuibQyHy.js.map +0 -1
  182. package/dist-vue/_chunks/useChatbotStore-Dir9Rc7K.js.map +0 -1
  183. package/dist-vue/_chunks/utils-CibsowVe.js.map +0 -1
@@ -312,6 +312,8 @@ var e = {
312
312
  deselectAction: "Remove",
313
313
  fileUploadMaxFilesPerMessage: "Max files per message",
314
314
  fileUploadMaxFilesPerChat: "Max files per chat",
315
+ localFolders: "Computer folders",
316
+ localFoldersEnabled: "Read folders of the computer",
315
317
  webSearch: "Web search",
316
318
  toolWorkingSet: "Tool selection",
317
319
  toolWorkingSetMode: "Mode",
@@ -557,6 +559,7 @@ var e = {
557
559
  dismissableNotice: "It will be hidden after the first message.",
558
560
  privacyPolicyNotice: "At the foot of the contact form, in Markdown.",
559
561
  fileUploadEnabled: "Allow users to attach files to their messages.",
562
+ localFoldersEnabled: "In the app's chat (not in the widget, not on the channels) the user can connect folders of their computer, and the agent reads them with four tools: list, search, read text, attach. Chrome and Edge keep the folder; Firefox and Safari read a copy for the visit. What the agent reads stays in the conversation.",
560
563
  approvalChannels: "A tool can ask the user to confirm before it runs: expand a tool to turn it on. On API endpoints and scheduled runs the call is refused.",
561
564
  platformSupported: "Renders natively on WhatsApp and Teams",
562
565
  tool: {
@@ -1038,6 +1041,19 @@ var e = {
1038
1041
  hint: "Click an element of the page",
1039
1042
  ask: "Ask"
1040
1043
  },
1044
+ localFolders: {
1045
+ title: "Folders the agent can read",
1046
+ allow: "Allow",
1047
+ remove: "Disconnect {name}",
1048
+ connect: "Connect a folder",
1049
+ confirm: {
1050
+ title: "Connect a folder?",
1051
+ question: "The agent will be able to list, search and read the files of the folder you choose and of its subfolders, except files such as .env, keys and certificates, and the .git and node_modules folders.",
1052
+ description: "What it reads goes to the model and stays in the conversation: whoever can open it sees it too, such as whoever reads the agent's logs or the colleagues of a shared project. Choose a folder that holds only what is needed.",
1053
+ action: "Choose the folder"
1054
+ },
1055
+ refused: "The folder “{name}” cannot be connected: the agent never reads folders such as .git or node_modules."
1056
+ },
1041
1057
  toolApproval: {
1042
1058
  hostCall: "The agent wants to use “{name}”. Allow it?",
1043
1059
  changesCount: "{n} change | {n} changes",
@@ -1453,6 +1469,8 @@ var e = {
1453
1469
  deselectAction: "Rimuovi",
1454
1470
  fileUploadMaxFilesPerMessage: "File massimi per messaggio",
1455
1471
  fileUploadMaxFilesPerChat: "File massimi per chat",
1472
+ localFolders: "Cartelle del computer",
1473
+ localFoldersEnabled: "Lettura di cartelle del computer",
1456
1474
  webSearch: "Ricerca web",
1457
1475
  toolWorkingSet: "Selezione dei tool",
1458
1476
  toolWorkingSetMode: "Modalità",
@@ -1698,6 +1716,7 @@ var e = {
1698
1716
  dismissableNotice: "Verrà nascosto dopo il primo messaggio.",
1699
1717
  privacyPolicyNotice: "In fondo al modulo di contatto, in Markdown.",
1700
1718
  fileUploadEnabled: "Permetti agli utenti di allegare file ai messaggi.",
1719
+ localFoldersEnabled: "Nella chat dell'app (non nel widget, non sui canali) l'utente può collegare cartelle del suo computer, e l'agente le legge con quattro strumenti: elenco, ricerca, lettura del testo, allegato. Chrome ed Edge ricordano la cartella; Firefox e Safari ne leggono una copia per la visita. Quello che l'agente legge resta nella conversazione.",
1701
1720
  approvalChannels: "Un tool può chiedere conferma all'utente prima di eseguire: espandi il tool per attivarla. Via API o in esecuzioni schedulate la chiamata viene rifiutata.",
1702
1721
  platformSupported: "Resa nativa su WhatsApp e Teams",
1703
1722
  tool: {
@@ -2179,6 +2198,19 @@ var e = {
2179
2198
  hint: "Fai clic su un elemento della pagina",
2180
2199
  ask: "Chiedi"
2181
2200
  },
2201
+ localFolders: {
2202
+ title: "Cartelle che l'agente può leggere",
2203
+ allow: "Consenti",
2204
+ remove: "Scollega {name}",
2205
+ connect: "Collega una cartella",
2206
+ confirm: {
2207
+ title: "Collegare una cartella?",
2208
+ question: "L'agente potrà elencare, cercare e leggere i file della cartella che scegli e delle sue sottocartelle, tranne file come .env, chiavi e certificati, e le cartelle .git e node_modules.",
2209
+ description: "Quello che legge va al modello e resta nella conversazione: lo vede anche chi può aprirla, come chi legge i log dell'agente o i colleghi di un progetto condiviso. Scegli una cartella che contiene solo quello che serve.",
2210
+ action: "Scegli la cartella"
2211
+ },
2212
+ refused: "La cartella “{name}” non si può collegare: l'agente non legge mai cartelle come .git o node_modules."
2213
+ },
2182
2214
  toolApproval: {
2183
2215
  hostCall: "L'agente vuole usare «{name}». Consenti?",
2184
2216
  changesCount: "{n} modifica | {n} modifiche",
@@ -152,6 +152,8 @@ type __VLS_ModelProps = {
152
152
  'selectionActionsExcel'?: Partial<SelectionActionsSettings['excel']> | undefined;
153
153
  /** The user may choose automatic confirmations in the chat (spec `auto-confirmations.md`). */
154
154
  'confirmationsAllowAutomatic'?: boolean;
155
+ /** The app's chat may read folders the user connects (spec `chat-local-folders.md`). */
156
+ 'localFoldersEnabled'?: boolean;
155
157
  'ranking'?: {
156
158
  freshness?: {
157
159
  enabled: boolean;
@@ -169,9 +171,9 @@ type __VLS_ModelProps = {
169
171
  } | undefined;
170
172
  };
171
173
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
172
- declare var __VLS_952: {};
174
+ declare var __VLS_963: {};
173
175
  type __VLS_Slots = {} & {
174
- default?: (props: typeof __VLS_952) => any;
176
+ default?: (props: typeof __VLS_963) => any;
175
177
  };
176
178
  declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
177
179
  "update:reasoning": (value: {
@@ -463,6 +465,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Com
463
465
  }[];
464
466
  }> | undefined) => any;
465
467
  "update:confirmationsAllowAutomatic": (value: boolean) => any;
468
+ "update:localFoldersEnabled": (value: boolean) => any;
466
469
  "update:ranking": (value: {
467
470
  freshness?: {
468
471
  enabled: boolean;
@@ -769,6 +772,7 @@ declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Com
769
772
  }[];
770
773
  }> | undefined) => any) | undefined;
771
774
  "onUpdate:confirmationsAllowAutomatic"?: ((value: boolean) => any) | undefined;
775
+ "onUpdate:localFoldersEnabled"?: ((value: boolean) => any) | undefined;
772
776
  "onUpdate:ranking"?: ((value: {
773
777
  freshness?: {
774
778
  enabled: boolean;
@@ -1,4 +1,4 @@
1
- import { AgentConfirmationsCapability, AgentInterface, AgentModel, AgentFileUpload, AgentGatewayOptions, AgentVoiceCapability, ChatMessageActions, RevisedAnswer, UIChatMessage, AgentTools, HostToolsCapability, PageAccessCapability, SelectionActionsCapability } from '../../../models/src';
1
+ import { AgentConfirmationsCapability, AgentInterface, AgentModel, AgentFileUpload, AgentGatewayOptions, AgentVoiceCapability, ChatMessageActions, RevisedAnswer, UIChatMessage, AgentTools, HostToolsCapability, LocalFoldersCapability, PageAccessCapability, SelectionActionsCapability } from '../../../models/src';
2
2
  import { RegisteredHostTool, SelectionPointer } from '../../../composable/src';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
4
  import { ChatRequestOptions } from 'ai';
@@ -29,6 +29,12 @@ type __VLS_Props = {
29
29
  hostToolRegistry?: RegisteredHostTool[];
30
30
  /** Page access as the agent allows it (`capabilities.pageAccess`, spec `page-tools.md`). */
31
31
  pageAccess?: PageAccessCapability;
32
+ /**
33
+ * Local folders as the agent allows them (`capabilities.localFolders`,
34
+ * spec `chat-local-folders.md`). Only the app's chat page passes it: the
35
+ * widget's grant would belong to the customer's site.
36
+ */
37
+ localFolders?: LocalFoldersCapability;
32
38
  /** Whether the user may choose automatic confirmations (`capabilities.confirmations`, spec `auto-confirmations.md`). */
33
39
  confirmations?: AgentConfirmationsCapability;
34
40
  /** The selection bar's groups (`capabilities.selectionActions`, spec `selection-actions.md`). */
@@ -0,0 +1,31 @@
1
+ import { ConnectedLocalFolder } from '../../../composable/src';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ /**
4
+ * The folders of the user's computer the agent may read (spec
5
+ * `chat-local-folders.md`): above the input, as the wakeup bar, because they
6
+ * are what the next answer can open. A folder kept from an earlier visit
7
+ * waits for a click on "Allow": the browser asks only on a gesture of the
8
+ * user, never on a call of the model.
9
+ */
10
+ type __VLS_Props = {
11
+ folders: readonly ConnectedLocalFolder[];
12
+ /** Chrome and Edge: the picker; elsewhere a copy of the folder's files. */
13
+ pickerAvailable: boolean;
14
+ /** Below the cap of connected folders: past it the button goes away. */
15
+ canConnect: boolean;
16
+ /** A folder the chat would never read, picked as a whole: said here. */
17
+ refused?: string;
18
+ };
19
+ declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
20
+ remove: (id: string) => any;
21
+ connect: () => any;
22
+ connectFiles: (files: File[]) => any;
23
+ allow: (id: string) => any;
24
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
25
+ onRemove?: ((id: string) => any) | undefined;
26
+ onConnect?: (() => any) | undefined;
27
+ onConnectFiles?: ((files: File[]) => any) | undefined;
28
+ onAllow?: ((id: string) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
@@ -33,9 +33,10 @@ interface HostCallPart {
33
33
  title?: string;
34
34
  state?: string;
35
35
  errorText?: string;
36
+ input?: unknown;
36
37
  toolMetadata?: {
37
38
  readOnly?: boolean;
38
- provider?: 'app' | 'page';
39
+ provider?: 'app' | 'page' | 'folder';
39
40
  };
40
41
  }
41
42
  export declare function getHostCallPart(part: UIMessage['parts'][number] | null | undefined): HostCallPart | undefined;
@@ -267,7 +268,7 @@ export declare function providerLabel(slug: string): string;
267
268
  * comes back as it is, so a `??` fallback after it still works.
268
269
  */
269
270
  export declare function localizeSummaryLabels<T extends string | null | undefined>(summary: T, t: (key: string) => string): T;
270
- export declare function getToolPartLabel($t: (key: string) => string, part?: UIMessage['parts'][number] | null,
271
+ export declare function getToolPartLabel($t: (key: string, params?: Record<string, unknown>) => string, part?: UIMessage['parts'][number] | null,
271
272
  /** The live titles of the page's steps, by call: they win when present. */
272
273
  hostStepTitles?: Record<string, string>): string | undefined;
273
274
  /** The version of a file stored in the chat that a preview opens. */
@@ -104,7 +104,7 @@ export type HostToolCall = {
104
104
  input: unknown;
105
105
  messageId: string;
106
106
  readOnly: boolean;
107
- provider?: 'app' | 'page';
107
+ provider?: 'app' | 'page' | 'folder';
108
108
  };
109
109
  type HostToolOutput = {
110
110
  tool: string;
@@ -3,6 +3,7 @@ export * from './appTools';
3
3
  export * from './fieldChanges';
4
4
  export * from './hostBridge';
5
5
  export * from './hostTools';
6
+ export * from './localFolders';
6
7
  export * from './types';
7
8
  export * from './useChatbotStore';
8
9
  export * from './useChatProjectsStore';
@@ -0,0 +1,137 @@
1
+ import { HostToolResult, LocalFoldersRequest } from '../../../models/src';
2
+ import { RegisteredHostTool } from './hostTools';
3
+ /**
4
+ * The folders of the user's computer the app's chat reads (spec
5
+ * `chat-local-folders.md`). Two sources behind one tree: a File System
6
+ * Access handle (Chrome and Edge), kept in IndexedDB and asked again for its
7
+ * permission on a later visit, and the files of an `<input webkitdirectory>`
8
+ * (Firefox and Safari), a snapshot that lives as long as the page.
9
+ */
10
+ export type LocalFolderFile = {
11
+ kind: 'file';
12
+ name: string;
13
+ file: () => Promise<File>;
14
+ };
15
+ export type LocalFolderDirectory = {
16
+ kind: 'directory';
17
+ name: string;
18
+ children: () => AsyncIterable<LocalFolderNode>;
19
+ };
20
+ export type LocalFolderNode = LocalFolderFile | LocalFolderDirectory;
21
+ /** The parts of the File System Access API the chat uses: not in TypeScript's DOM lib. */
22
+ export type DirectoryHandle = {
23
+ kind: 'directory';
24
+ name: string;
25
+ values: () => AsyncIterable<DirectoryHandle | {
26
+ kind: 'file';
27
+ name: string;
28
+ getFile: () => Promise<File>;
29
+ }>;
30
+ queryPermission?: (options: {
31
+ mode: 'read';
32
+ }) => Promise<'granted' | 'prompt' | 'denied'>;
33
+ requestPermission?: (options: {
34
+ mode: 'read';
35
+ }) => Promise<'granted' | 'prompt' | 'denied'>;
36
+ isSameEntry?: (other: DirectoryHandle) => Promise<boolean>;
37
+ };
38
+ export type ConnectedLocalFolder = {
39
+ id: string;
40
+ /** Unique among the connected folders: the first segment of every path. */
41
+ name: string;
42
+ /** `snapshot` for the files of an `<input webkitdirectory>`. */
43
+ source: 'handle' | 'snapshot';
44
+ /** `prompt` until the user allows it again on this visit. */
45
+ permission: 'granted' | 'prompt' | 'denied';
46
+ handle?: DirectoryHandle;
47
+ root?: LocalFolderDirectory;
48
+ };
49
+ export declare const isAttachOnlyFile: (name: string) => boolean;
50
+ /** The tree of a File System Access handle, without the excluded entries. */
51
+ export declare const fromDirectoryHandle: (handle: DirectoryHandle) => LocalFolderDirectory;
52
+ /**
53
+ * The folders of an `<input webkitdirectory>`: one per top folder of the
54
+ * relative paths (the browser gives one, the one the user picked). Excluded
55
+ * entries are dropped here, before anything reads them.
56
+ */
57
+ export declare const fromFileList: (files: Iterable<File>) => LocalFolderDirectory[];
58
+ /** A name not yet taken: "Offerte", then "Offerte (2)". */
59
+ export declare const uniqueFolderName: (name: string, taken: Iterable<string>) => string;
60
+ /**
61
+ * The name a step of a folder tool shows: the last segment of the path it
62
+ * read, or nothing for a call without one (the list of the folders, a search
63
+ * across all of them). Live while the call runs and from the saved input
64
+ * after a reload, so the two read the same.
65
+ */
66
+ export declare const localFolderStepName: (input: unknown) => string | undefined;
67
+ /**
68
+ * The node a path names. The first segment is a connected folder; an
69
+ * excluded segment, a folder still waiting for its permission or a missing
70
+ * entry is an error the model reads.
71
+ */
72
+ export declare const resolveLocalPath: (folders: readonly ConnectedLocalFolder[], path: string) => Promise<LocalFolderNode>;
73
+ /**
74
+ * The text of a file, decoded as the backend decodes a text attachment
75
+ * (UTF-16 from its byte order mark, UTF-8, else Windows-1252), or
76
+ * `undefined` for one that is not text: a NUL in what it decodes to.
77
+ */
78
+ export declare const readFileText: (file: Blob, maxBytes: number) => Promise<string | undefined>;
79
+ /** `folder_list`: the connected folders, or the entries of one folder. */
80
+ export declare function listLocalFolder(folders: readonly ConnectedLocalFolder[], input: unknown): Promise<HostToolResult>;
81
+ /** `folder_find`: files by a part of their name, or by a text they contain. */
82
+ export declare function findInLocalFolders(folders: readonly ConnectedLocalFolder[], input: unknown, signal: AbortSignal): Promise<HostToolResult>;
83
+ /** `folder_read`: a text file, one window of characters a call. */
84
+ export declare function readLocalFile(folders: readonly ConnectedLocalFolder[], input: unknown): Promise<HostToolResult>;
85
+ /**
86
+ * The tools the chat runs on the connected folders: the widget's own kind
87
+ * (`policy`), so the agent's host tool settings neither allow nor confirm
88
+ * them. Nothing asks the user before a read: the user chose the folder, and
89
+ * every call shows as a step of the answer with the path it read.
90
+ */
91
+ export declare function createLocalFolderTools(deps: {
92
+ folders: () => readonly ConnectedLocalFolder[];
93
+ /** Puts the file in the message box, as the user would: resolves with an error text, or nothing. */
94
+ attach: (file: File) => Promise<string | undefined>;
95
+ timeoutMs: number;
96
+ /** "Reading offerta.md": what the step says, from the call's input. */
97
+ describe: (toolName: string, input: unknown) => string | undefined;
98
+ }): RegisteredHostTool[];
99
+ /** What a request declares: the folders the page can read now. */
100
+ export declare const declaredLocalFolders: (folders: readonly ConnectedLocalFolder[]) => LocalFoldersRequest | undefined;
101
+ /**
102
+ * The handles connected in this browser, by owner (the user with an agent):
103
+ * two people who share a browser profile never see each other's folders,
104
+ * and an agent never reads a folder connected for another. A handle holds no
105
+ * permission of its own: the browser asks again on a later visit, unless the
106
+ * user chose "Allow on every visit" or installed the app.
107
+ */
108
+ export declare const localFolderStorage: {
109
+ load(owner: string): Promise<{
110
+ id: string;
111
+ name: string;
112
+ handle: DirectoryHandle;
113
+ }[]>;
114
+ save(owner: string, folder: {
115
+ id: string;
116
+ name: string;
117
+ handle: DirectoryHandle;
118
+ }): Promise<void>;
119
+ remove(owner: string, id: string): Promise<void>;
120
+ /**
121
+ * Forgets the folders of a user with every agent, on sign-out: whoever
122
+ * signs in next in this browser finds none of them. Opens nothing in a
123
+ * browser that never kept a folder.
124
+ */
125
+ forgetUser(userId: string): Promise<void>;
126
+ };
127
+ /** The folder picker, where the browser has one: Chrome and Edge on a desktop. */
128
+ export declare const directoryPicker: () => ((options: {
129
+ id?: string;
130
+ mode?: "read";
131
+ }) => Promise<DirectoryHandle>) | undefined;
132
+ /**
133
+ * True where the chat may offer folders at all: a top-level page. A frame
134
+ * of another origin cannot open a picker, and a grant in a frame of the same
135
+ * origin would be the host page's to see.
136
+ */
137
+ export declare const canOfferLocalFolders: () => boolean;
@@ -1,6 +1,7 @@
1
1
  import { FileUIPart, ChatStatus, ChatRequestOptions, ChatAddToolOutputFunction, ChatAddToolApproveResponseFunction, ProviderMetadata, LanguageModelUsage } from 'ai';
2
2
  import { PageAccessLevel, Chat as ChatRecord, ChatMessageActions, UIChatMessage, UIChatMessageMetadata, PagePointer, FilePointer, AgentWidgetLayout, AgentWidgetAppearance, AgentLoaderStrategy, StoragePolicy, AgentSearchMode, AgentBuiltInTool, WebSearchProvider, PlatformType, ToolGroupKind, BlockedReasonCode, ConversationAnalysisTrigger, Sentiment, SentimentTrend, UserTone, AbuseCategory, LlmIssueCategory, UserEngagement, AbuseConfidence, UserFileKind } from '../../../models/src';
3
3
  import { ConfirmationMode, HostToolConfirmation, RegisteredHostTool } from './hostTools';
4
+ import { ConnectedLocalFolder } from './localFolders';
4
5
  import { ChatbotFile } from './api';
5
6
  import { PendingAttachment } from './types';
6
7
  import { Store } from 'pinia';
@@ -628,6 +629,20 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
628
629
  } | undefined>;
629
630
  pageToolRegistry: globalThis.ShallowRef<RegisteredHostTool[] | undefined>;
630
631
  pageFormsProvider: globalThis.ShallowRef<(() => RegisteredHostTool[]) | undefined>;
632
+ agentLocalFolders: globalThis.Ref<{
633
+ timeoutMs: number;
634
+ } | undefined, {
635
+ timeoutMs: number;
636
+ } | undefined>;
637
+ localFolders: globalThis.ShallowRef<ConnectedLocalFolder[]>;
638
+ localFoldersAvailable: globalThis.ComputedRef<boolean>;
639
+ localFolderPickerAvailable: globalThis.ComputedRef<boolean>;
640
+ canConnectLocalFolder: globalThis.ComputedRef<boolean>;
641
+ refusedLocalFolder: globalThis.Ref<string | undefined, string | undefined>;
642
+ connectLocalFolder: () => Promise<void>;
643
+ connectLocalFolderFiles: (files: FileList | File[]) => void;
644
+ allowLocalFolder: (id: string) => Promise<void>;
645
+ removeLocalFolder: (id: string) => Promise<void>;
631
646
  pageAction: globalThis.Ref<{
632
647
  title: string;
633
648
  } | undefined, {
@@ -2306,7 +2321,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
2306
2321
  focusInput: () => void;
2307
2322
  renameChatTitle: (chatId: string, title: string) => Promise<void>;
2308
2323
  deleteChat: (chatId: string) => Promise<void>;
2309
- }, "name" | "input" | "model" | "externalContext" | "gatewayOptions" | "fallbackModels" | "userId" | "agentId" | "headers" | "conversations" | "agentModel" | "agentType" | "baseUrl" | "pagePointer" | "basePath" | "agentInterface" | "agentTools" | "revisedAnswers" | "actionsInput" | "agentFileUpload" | "agentVoice" | "agentHostTools" | "hostToolRegistry" | "hostToolsPending" | "agentPageAccess" | "pageToolRegistry" | "pageFormsProvider" | "pageAction" | "hostStepTitles" | "hostStepChanges" | "pageControlActive" | "isWorking" | "hostConfirmation" | "pageAccessOff" | "agentConfirmations" | "agentSelectionActions" | "pagePointerStart" | "pagePointing" | "systemTheme" | "hideWelcomeMessage" | "isLoadingConversations" | "hasMoreConversations" | "isLoadingMoreConversations" | "chatFiles" | "isLoadingChatFiles" | "pendingAttachments" | "fileLimitError" | "isConversationBlocked" | "chatError" | "activeView" | "inputFocusRequest" | "messageFeedbacks" | "feedbackDialogMessage" | "isFeedbackSubmitting" | "isFeedbackSubmitted" | "feedbackSubmitError" | "isLeadSubmitted" | "isLoadingSubmitLead" | "submitLeadError" | "projectsEnabled">, Pick<{
2324
+ }, "name" | "input" | "model" | "externalContext" | "gatewayOptions" | "localFolders" | "fallbackModels" | "userId" | "agentId" | "headers" | "conversations" | "agentModel" | "agentType" | "baseUrl" | "pagePointer" | "basePath" | "agentInterface" | "agentTools" | "revisedAnswers" | "actionsInput" | "agentFileUpload" | "agentVoice" | "agentHostTools" | "hostToolRegistry" | "hostToolsPending" | "agentPageAccess" | "pageToolRegistry" | "pageFormsProvider" | "agentLocalFolders" | "refusedLocalFolder" | "pageAction" | "hostStepTitles" | "hostStepChanges" | "pageControlActive" | "isWorking" | "hostConfirmation" | "pageAccessOff" | "agentConfirmations" | "agentSelectionActions" | "pagePointerStart" | "pagePointing" | "systemTheme" | "hideWelcomeMessage" | "isLoadingConversations" | "hasMoreConversations" | "isLoadingMoreConversations" | "chatFiles" | "isLoadingChatFiles" | "pendingAttachments" | "fileLimitError" | "isConversationBlocked" | "chatError" | "activeView" | "inputFocusRequest" | "messageFeedbacks" | "feedbackDialogMessage" | "isFeedbackSubmitting" | "isFeedbackSubmitted" | "feedbackSubmitError" | "isLeadSubmitted" | "isLoadingSubmitLead" | "submitLeadError" | "projectsEnabled">, Pick<{
2310
2325
  apiClient: globalThis.ComputedRef< ChatbotApiClient>;
2311
2326
  baseUrl: globalThis.Ref<string, string>;
2312
2327
  basePath: globalThis.Ref<string | undefined, string | undefined>;
@@ -2888,6 +2903,20 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
2888
2903
  } | undefined>;
2889
2904
  pageToolRegistry: globalThis.ShallowRef<RegisteredHostTool[] | undefined>;
2890
2905
  pageFormsProvider: globalThis.ShallowRef<(() => RegisteredHostTool[]) | undefined>;
2906
+ agentLocalFolders: globalThis.Ref<{
2907
+ timeoutMs: number;
2908
+ } | undefined, {
2909
+ timeoutMs: number;
2910
+ } | undefined>;
2911
+ localFolders: globalThis.ShallowRef<ConnectedLocalFolder[]>;
2912
+ localFoldersAvailable: globalThis.ComputedRef<boolean>;
2913
+ localFolderPickerAvailable: globalThis.ComputedRef<boolean>;
2914
+ canConnectLocalFolder: globalThis.ComputedRef<boolean>;
2915
+ refusedLocalFolder: globalThis.Ref<string | undefined, string | undefined>;
2916
+ connectLocalFolder: () => Promise<void>;
2917
+ connectLocalFolderFiles: (files: FileList | File[]) => void;
2918
+ allowLocalFolder: (id: string) => Promise<void>;
2919
+ removeLocalFolder: (id: string) => Promise<void>;
2891
2920
  pageAction: globalThis.Ref<{
2892
2921
  title: string;
2893
2922
  } | undefined, {
@@ -4566,7 +4595,7 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
4566
4595
  focusInput: () => void;
4567
4596
  renameChatTitle: (chatId: string, title: string) => Promise<void>;
4568
4597
  deleteChat: (chatId: string) => Promise<void>;
4569
- }, "actions" | "messages" | "chat" | "apiClient" | "pageNoticeLevel" | "pageAccessAvailable" | "confirmationsAvailable" | "confirmationMode" | "pagePointerAvailable" | "isDark" | "isAttachmentLimitReached" | "localChatId" | "inputMessagePlaceholder" | "runningChatIds" | "backgroundAnswers" | "canQueue" | "queuedMessages" | "chatAuthorId" | "chatProjectId" | "isReadOnlyChat">, Pick<{
4598
+ }, "actions" | "messages" | "chat" | "apiClient" | "localFoldersAvailable" | "localFolderPickerAvailable" | "canConnectLocalFolder" | "pageNoticeLevel" | "pageAccessAvailable" | "confirmationsAvailable" | "confirmationMode" | "pagePointerAvailable" | "isDark" | "isAttachmentLimitReached" | "localChatId" | "inputMessagePlaceholder" | "runningChatIds" | "backgroundAnswers" | "canQueue" | "queuedMessages" | "chatAuthorId" | "chatProjectId" | "isReadOnlyChat">, Pick<{
4570
4599
  apiClient: globalThis.ComputedRef< ChatbotApiClient>;
4571
4600
  baseUrl: globalThis.Ref<string, string>;
4572
4601
  basePath: globalThis.Ref<string | undefined, string | undefined>;
@@ -5148,6 +5177,20 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
5148
5177
  } | undefined>;
5149
5178
  pageToolRegistry: globalThis.ShallowRef<RegisteredHostTool[] | undefined>;
5150
5179
  pageFormsProvider: globalThis.ShallowRef<(() => RegisteredHostTool[]) | undefined>;
5180
+ agentLocalFolders: globalThis.Ref<{
5181
+ timeoutMs: number;
5182
+ } | undefined, {
5183
+ timeoutMs: number;
5184
+ } | undefined>;
5185
+ localFolders: globalThis.ShallowRef<ConnectedLocalFolder[]>;
5186
+ localFoldersAvailable: globalThis.ComputedRef<boolean>;
5187
+ localFolderPickerAvailable: globalThis.ComputedRef<boolean>;
5188
+ canConnectLocalFolder: globalThis.ComputedRef<boolean>;
5189
+ refusedLocalFolder: globalThis.Ref<string | undefined, string | undefined>;
5190
+ connectLocalFolder: () => Promise<void>;
5191
+ connectLocalFolderFiles: (files: FileList | File[]) => void;
5192
+ allowLocalFolder: (id: string) => Promise<void>;
5193
+ removeLocalFolder: (id: string) => Promise<void>;
5151
5194
  pageAction: globalThis.Ref<{
5152
5195
  title: string;
5153
5196
  } | undefined, {
@@ -6826,4 +6869,4 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
6826
6869
  focusInput: () => void;
6827
6870
  renameChatTitle: (chatId: string, title: string) => Promise<void>;
6828
6871
  deleteChat: (chatId: string) => Promise<void>;
6829
- }, "regenerate" | "sendMessage" | "addToolOutput" | "addToolApprovalResponse" | "suggestNextMessage" | "stopHostActions" | "voicePageTools" | "cancelVoicePageCalls" | "closePageNotice" | "respondHostConfirmation" | "setPageAccessOff" | "sendSelection" | "setConfirmationMode" | "openBackgroundAnswer" | "dismissBackgroundAnswer" | "removeQueuedMessage" | "editQueuedMessage" | "buildDeviceContext" | "initialize" | "loadConversations" | "loadMoreConversations" | "describeChat" | "searchConversations" | "loadChatFiles" | "refreshMessages" | "appendMessage" | "getChatFileUrl" | "getChatFilePreviewUrl" | "deleteChatFile" | "handleSubmit" | "stopGeneration" | "startNewChat" | "handleFileSelect" | "discardPendingAttachment" | "replacePendingAttachment" | "retryPendingAttachment" | "clearFileLimitError" | "clearPendingAttachments" | "onUpvote" | "onDownvote" | "onFeedback" | "onFeedbackSubmit" | "onLeadSubmit" | "navigate" | "focusInput" | "renameChatTitle" | "deleteChat">>;
6872
+ }, "regenerate" | "sendMessage" | "addToolOutput" | "addToolApprovalResponse" | "suggestNextMessage" | "connectLocalFolder" | "connectLocalFolderFiles" | "allowLocalFolder" | "removeLocalFolder" | "stopHostActions" | "voicePageTools" | "cancelVoicePageCalls" | "closePageNotice" | "respondHostConfirmation" | "setPageAccessOff" | "sendSelection" | "setConfirmationMode" | "openBackgroundAnswer" | "dismissBackgroundAnswer" | "removeQueuedMessage" | "editQueuedMessage" | "buildDeviceContext" | "initialize" | "loadConversations" | "loadMoreConversations" | "describeChat" | "searchConversations" | "loadChatFiles" | "refreshMessages" | "appendMessage" | "getChatFileUrl" | "getChatFilePreviewUrl" | "deleteChatFile" | "handleSubmit" | "stopGeneration" | "startNewChat" | "handleFileSelect" | "discardPendingAttachment" | "replacePendingAttachment" | "retryPendingAttachment" | "clearFileLimitError" | "clearPendingAttachments" | "onUpvote" | "onDownvote" | "onFeedback" | "onFeedbackSubmit" | "onLeadSubmit" | "navigate" | "focusInput" | "renameChatTitle" | "deleteChat">>;
@@ -1923,6 +1923,10 @@ export declare const AgentSettingsSchema: z.ZodObject<{
1923
1923
  acknowledgedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
1924
1924
  acknowledgedLevel: z.ZodOptional<z.ZodEnum<typeof PageAccessLevel>>;
1925
1925
  }, z.core.$strip>>;
1926
+ localFolders: z.ZodOptional<z.ZodObject<{
1927
+ enabled: z.ZodDefault<z.ZodBoolean>;
1928
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
1929
+ }, z.core.$strip>>;
1926
1930
  confirmations: z.ZodOptional<z.ZodObject<{
1927
1931
  allowAutomatic: z.ZodDefault<z.ZodBoolean>;
1928
1932
  }, z.core.$strip>>;
@@ -2792,6 +2796,10 @@ export declare const AgentDtoSchema: z.ZodObject<{
2792
2796
  acknowledgedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
2793
2797
  acknowledgedLevel: z.ZodOptional<z.ZodEnum<typeof PageAccessLevel>>;
2794
2798
  }, z.core.$strip>>;
2799
+ localFolders: z.ZodOptional<z.ZodObject<{
2800
+ enabled: z.ZodDefault<z.ZodBoolean>;
2801
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
2802
+ }, z.core.$strip>>;
2795
2803
  confirmations: z.ZodOptional<z.ZodObject<{
2796
2804
  allowAutomatic: z.ZodDefault<z.ZodBoolean>;
2797
2805
  }, z.core.$strip>>;
@@ -3662,6 +3670,10 @@ export declare const AgentSchema: z.ZodLazy<z.ZodObject<{
3662
3670
  acknowledgedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
3663
3671
  acknowledgedLevel: z.ZodOptional<z.ZodEnum<typeof PageAccessLevel>>;
3664
3672
  }, z.core.$strip>>;
3673
+ localFolders: z.ZodOptional<z.ZodObject<{
3674
+ enabled: z.ZodDefault<z.ZodBoolean>;
3675
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
3676
+ }, z.core.$strip>>;
3665
3677
  confirmations: z.ZodOptional<z.ZodObject<{
3666
3678
  allowAutomatic: z.ZodDefault<z.ZodBoolean>;
3667
3679
  }, z.core.$strip>>;
@@ -4289,6 +4301,9 @@ export declare const AgentPublicSchema: z.ZodObject<{
4289
4301
  notice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4290
4302
  pointer: z.ZodOptional<z.ZodBoolean>;
4291
4303
  }, z.core.$strip>>;
4304
+ localFolders: z.ZodOptional<z.ZodObject<{
4305
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
4306
+ }, z.core.$strip>>;
4292
4307
  confirmations: z.ZodOptional<z.ZodObject<{
4293
4308
  allowAutomatic: z.ZodLiteral<true>;
4294
4309
  }, z.core.$strip>>;
@@ -4984,6 +4999,9 @@ export declare const AgentAccessGrantedSchema: z.ZodObject<{
4984
4999
  notice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4985
5000
  pointer: z.ZodOptional<z.ZodBoolean>;
4986
5001
  }, z.core.$strip>>;
5002
+ localFolders: z.ZodOptional<z.ZodObject<{
5003
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
5004
+ }, z.core.$strip>>;
4987
5005
  confirmations: z.ZodOptional<z.ZodObject<{
4988
5006
  allowAutomatic: z.ZodLiteral<true>;
4989
5007
  }, z.core.$strip>>;
@@ -5635,6 +5653,9 @@ export declare const AgentAccessDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodOb
5635
5653
  notice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5636
5654
  pointer: z.ZodOptional<z.ZodBoolean>;
5637
5655
  }, z.core.$strip>>;
5656
+ localFolders: z.ZodOptional<z.ZodObject<{
5657
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
5658
+ }, z.core.$strip>>;
5638
5659
  confirmations: z.ZodOptional<z.ZodObject<{
5639
5660
  allowAutomatic: z.ZodLiteral<true>;
5640
5661
  }, z.core.$strip>>;
@@ -6305,6 +6326,9 @@ export declare const AgentAccessSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6305
6326
  notice: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6306
6327
  pointer: z.ZodOptional<z.ZodBoolean>;
6307
6328
  }, z.core.$strip>>;
6329
+ localFolders: z.ZodOptional<z.ZodObject<{
6330
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
6331
+ }, z.core.$strip>>;
6308
6332
  confirmations: z.ZodOptional<z.ZodObject<{
6309
6333
  allowAutomatic: z.ZodLiteral<true>;
6310
6334
  }, z.core.$strip>>;
@@ -262,6 +262,7 @@ export declare const ChatRequestSchema: z.ZodObject<{
262
262
  smoothStream: z.ZodOptional<z.ZodBoolean>;
263
263
  hostTools: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
264
264
  pageTools: z.ZodOptional<z.ZodUnknown>;
265
+ localFolders: z.ZodOptional<z.ZodUnknown>;
265
266
  confirmations: z.ZodOptional<z.ZodLiteral<"automatic">>;
266
267
  projectId: z.ZodOptional<z.ZodUUID>;
267
268
  }, z.core.$strip>;
@@ -45,8 +45,11 @@ export type HostToolResult = z.infer<typeof HostToolResultSchema>;
45
45
  export type HostToolMetadata = {
46
46
  source: typeof HOST_TOOL_SOURCE;
47
47
  readOnly: boolean;
48
- /** Who runs it: a tool the app registered, or a page tool of the widget (spec `page-tools.md`). */
49
- provider?: 'app' | 'page';
48
+ /**
49
+ * Who runs it: a tool the app registered, a page tool of the widget (spec
50
+ * `page-tools.md`), or a tool of the folders the user connected in the app.
51
+ */
52
+ provider?: 'app' | 'page' | 'folder';
50
53
  };
51
54
  export declare const HostToolsSettingsSchema: z.ZodObject<{
52
55
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -0,0 +1,78 @@
1
+ import * as z from 'zod';
2
+ /**
3
+ * Folders of the user's computer the chat reads in the browser (spec
4
+ * `chat-local-folders.md`): the user picks them with `showDirectoryPicker`,
5
+ * the backend defines the tools, the page runs them through the host tool
6
+ * queue. Read only, in the app only: never in the widget, whose grant would
7
+ * belong to the customer's site, nor on a channel.
8
+ */
9
+ export declare const LOCAL_FOLDER_TOOL_NAMES: readonly ["folder_list", "folder_find", "folder_read", "folder_attach"];
10
+ export type LocalFolderToolName = (typeof LOCAL_FOLDER_TOOL_NAMES)[number];
11
+ /** Folders one browser keeps connected at a time. */
12
+ export declare const LOCAL_FOLDERS_MAX = 5;
13
+ /**
14
+ * Folder calls one turn may make, apart from the host's own cap
15
+ * (`maxCallsPerTurn`): an agent reading a folder does not eat the calls of
16
+ * the page that embeds it, nor the other way round.
17
+ */
18
+ export declare const LOCAL_FOLDER_MAX_CALLS_PER_TURN = 20;
19
+ /** True for a call of a folder tool, saved or streaming. */
20
+ export declare const isLocalFolderToolPart: (part: unknown) => boolean;
21
+ /** Entries one `folder_list` returns; the rest is counted, not listed. */
22
+ export declare const LOCAL_FOLDER_LIST_MAX_ENTRIES = 200;
23
+ /** Matches one `folder_find` returns. */
24
+ export declare const LOCAL_FOLDER_FIND_MAX_RESULTS = 50;
25
+ /** Files one `folder_find` walks, by name or by text. */
26
+ export declare const LOCAL_FOLDER_FIND_MAX_FILES = 5000;
27
+ /**
28
+ * Bytes one `folder_find` by text may read in all: a synced folder downloads
29
+ * every file it opens (OneDrive, iCloud), so the budget is also the traffic.
30
+ */
31
+ export declare const LOCAL_FOLDER_FIND_MAX_BYTES: number;
32
+ /** A file larger than this is never opened for a text search. */
33
+ export declare const LOCAL_FOLDER_FIND_MAX_FILE_BYTES: number;
34
+ /**
35
+ * Characters one `folder_read` returns: under `HOST_TOOL_RESULT_MAX_CHARS`
36
+ * with room for the header, the rest is read by `offset`.
37
+ */
38
+ export declare const LOCAL_FOLDER_READ_MAX_CHARS = 30000;
39
+ /** A file larger than this is not read as text: `folder_attach` takes it. */
40
+ export declare const LOCAL_FOLDER_READ_MAX_FILE_BYTES: number;
41
+ export declare const LocalFoldersSettingsSchema: z.ZodObject<{
42
+ enabled: z.ZodDefault<z.ZodBoolean>;
43
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
44
+ }, z.core.$strip>;
45
+ export type LocalFoldersSettings = z.infer<typeof LocalFoldersSettingsSchema>;
46
+ /** What the chat page needs, on the public agent. */
47
+ export declare const LocalFoldersCapabilitySchema: z.ZodObject<{
48
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
49
+ }, z.core.$strip>;
50
+ export type LocalFoldersCapability = z.infer<typeof LocalFoldersCapabilitySchema>;
51
+ /**
52
+ * What a request declares: the folders the page holds a grant for, by the
53
+ * name the tools address them with. Only the names travel, never a path of
54
+ * the computer (the browser does not give one).
55
+ */
56
+ export declare const LocalFoldersRequestSchema: z.ZodObject<{
57
+ folders: z.ZodArray<z.ZodObject<{
58
+ name: z.ZodString;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>;
61
+ export type LocalFoldersRequest = z.infer<typeof LocalFoldersRequestSchema>;
62
+ /**
63
+ * True for a folder never walked: the fixed exclusions, whatever the agent
64
+ * says. Case-insensitive, for Windows and macOS.
65
+ */
66
+ export declare const isExcludedLocalDirectory: (name: string) => boolean;
67
+ /**
68
+ * True for a file never listed nor read. `.env.local` and the other
69
+ * variants count as `.env`; a private key named after its algorithm counts
70
+ * with its `.pub` twin excluded too, since the pair says where the key is.
71
+ */
72
+ export declare const isExcludedLocalFile: (name: string) => boolean;
73
+ /**
74
+ * True when any segment of a slash-separated path is excluded: the last as
75
+ * a file, the others as folders. What a path the model writes is checked
76
+ * against before anything is opened.
77
+ */
78
+ export declare const isExcludedLocalPath: (path: string) => boolean;
@@ -430,6 +430,16 @@ export declare enum OrganizationFeature {
430
430
  * it, and a request asking for it changes nothing.
431
431
  */
432
432
  AutoConfirmations = "autoConfirmations",
433
+ /**
434
+ * Folders of the user's computer the app's chat reads (spec
435
+ * `chat-local-folders.md`). Off by default: what the agent reads there
436
+ * goes to the model and stays in the chat. It reaches the runtime like
437
+ * the host tools: off, the backoffice switch does not show, the public
438
+ * agent does not announce it, and the turn offers none of the folder
439
+ * tools, even on an agent switched on while it was on. It does not need
440
+ * `hostTools`: the folders are the user's, not the embedding page's.
441
+ */
442
+ LocalFolders = "localFolders",
433
443
  /**
434
444
  * Shared projects in the studio chat (docs/specs/chat-projects.md): a
435
445
  * space on one agent where members read each other's conversations and