@8wave/ai-elements 0.121.0-beta.2 → 0.121.0-beta.21

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 (154) hide show
  1. package/README.md +125 -54
  2. package/dist/_chunks/{Agent-BYC51e6E.js → Agent-wt8Vi99H.js} +69 -61
  3. package/dist/_chunks/Agent-wt8Vi99H.js.map +1 -0
  4. package/dist/_chunks/{PkStreamingMarkdown-CNoHyTuC.js → PkStreamingMarkdown-Br7Z60Vm.js} +846 -841
  5. package/dist/_chunks/PkStreamingMarkdown-Br7Z60Vm.js.map +1 -0
  6. package/dist/_chunks/{PkToolEditSpreadsheet-B8bO3vZa.js → PkToolEditSpreadsheet-Di9czFTy.js} +2 -2
  7. package/dist/_chunks/{PkToolEditSpreadsheet-B8bO3vZa.js.map → PkToolEditSpreadsheet-Di9czFTy.js.map} +1 -1
  8. package/dist/_chunks/{PkToolRequestGeolocation-DrvL0h9d.js → PkToolRequestGeolocation-dUTqHsV-.js} +2 -2
  9. package/dist/_chunks/{PkToolRequestGeolocation-DrvL0h9d.js.map → PkToolRequestGeolocation-dUTqHsV-.js.map} +1 -1
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-BXti5Vkt.js → PkToolRequestOAuthConnection-cNDld72U.js} +2 -2
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-BXti5Vkt.js.map → PkToolRequestOAuthConnection-cNDld72U.js.map} +1 -1
  12. package/dist/_chunks/{PkToolShowArtifact-DR71LNck.js → PkToolShowArtifact-DtstlRsL.js} +2 -2
  13. package/dist/_chunks/{PkToolShowArtifact-DR71LNck.js.map → PkToolShowArtifact-DtstlRsL.js.map} +1 -1
  14. package/dist/_chunks/{PkToolShowContactForm-C4BshHSs.js → PkToolShowContactForm-BKaKlYGJ.js} +2 -2
  15. package/dist/_chunks/{PkToolShowContactForm-C4BshHSs.js.map → PkToolShowContactForm-BKaKlYGJ.js.map} +1 -1
  16. package/dist/_chunks/{PkToolShowForm-BLSTn0xE.js → PkToolShowForm-OxANKx0g.js} +3 -3
  17. package/dist/_chunks/{PkToolShowForm-BLSTn0xE.js.map → PkToolShowForm-OxANKx0g.js.map} +1 -1
  18. package/dist/_chunks/{PkToolShowImageGallery-CqOXbo0Y.js → PkToolShowImageGallery-DRePOmUx.js} +2 -2
  19. package/dist/_chunks/{PkToolShowImageGallery-CqOXbo0Y.js.map → PkToolShowImageGallery-DRePOmUx.js.map} +1 -1
  20. package/dist/_chunks/{PkToolShowProductList-westY5bY.js → PkToolShowProductList-Y9HR_RJ4.js} +2 -2
  21. package/dist/_chunks/{PkToolShowProductList-westY5bY.js.map → PkToolShowProductList-Y9HR_RJ4.js.map} +1 -1
  22. package/dist/_chunks/{PkToolShowSources-Dy9VXRgv.js → PkToolShowSources-BQnaaL2a.js} +3 -3
  23. package/dist/_chunks/{PkToolShowSources-Dy9VXRgv.js.map → PkToolShowSources-BQnaaL2a.js.map} +1 -1
  24. package/dist/_chunks/{PkToolShowSuggestedReply-BZ2U3ULB.js → PkToolShowSuggestedReply-ghiXQuDz.js} +2 -2
  25. package/dist/_chunks/{PkToolShowSuggestedReply-BZ2U3ULB.js.map → PkToolShowSuggestedReply-ghiXQuDz.js.map} +1 -1
  26. package/dist/_chunks/{PkToolShowVideo-CrFaQbMp.js → PkToolShowVideo-BcNWgJD7.js} +2 -2
  27. package/dist/_chunks/{PkToolShowVideo-CrFaQbMp.js.map → PkToolShowVideo-BcNWgJD7.js.map} +1 -1
  28. package/dist/_chunks/{PkToolShowWebPages-DXszshY9.js → PkToolShowWebPages-Ba6DkV0V.js} +2 -2
  29. package/dist/_chunks/{PkToolShowWebPages-DXszshY9.js.map → PkToolShowWebPages-Ba6DkV0V.js.map} +1 -1
  30. package/dist/_chunks/{chatImagePolicy-B5-QV037.js → chatImagePolicy-P0TZW1on.js} +2 -2
  31. package/dist/_chunks/{chatImagePolicy-B5-QV037.js.map → chatImagePolicy-P0TZW1on.js.map} +1 -1
  32. package/dist/_chunks/{markdown-DO_FLvlJ.js → markdown-DLplFIBU.js} +10 -10
  33. package/dist/_chunks/{markdown-DO_FLvlJ.js.map → markdown-DLplFIBU.js.map} +1 -1
  34. package/dist/ai-elements.es.js +3966 -3244
  35. package/dist/ai-elements.es.js.map +1 -1
  36. package/dist-vue/PkChatbot.js +1 -1
  37. package/dist-vue/PkChatbotEmptyState.js +1 -1
  38. package/dist-vue/PkChatbotInput.js +1 -1
  39. package/dist-vue/PkChatbotMessages.js +1 -1
  40. package/dist-vue/PkChatbotStepPayload.js +1 -1
  41. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  42. package/dist-vue/PkChatbotSteps.js +1 -1
  43. package/dist-vue/PkChatbotViewChat.js +1 -1
  44. package/dist-vue/PkChatbotViewConversations.js +1 -1
  45. package/dist-vue/PkChatbotViewFiles.js +1 -1
  46. package/dist-vue/PkChatbotViewProfile.js +1 -1
  47. package/dist-vue/_chunks/{Agent-2DVqpLwz.js → Agent-DcoF75y8.js} +68 -60
  48. package/dist-vue/_chunks/Agent-DcoF75y8.js.map +1 -0
  49. package/dist-vue/_chunks/{Document-ChfbOVVs.js → Document-C1bD6VNU.js} +10 -10
  50. package/dist-vue/_chunks/{Document-ChfbOVVs.js.map → Document-C1bD6VNU.js.map} +1 -1
  51. package/dist-vue/_chunks/{PkChatbot-CTZPru6f.js → PkChatbot-BFjoa5Wf.js} +9 -9
  52. package/dist-vue/_chunks/PkChatbot-BFjoa5Wf.js.map +1 -0
  53. package/dist-vue/_chunks/{PkChatbotEmptyState-DqzgF4vH.js → PkChatbotEmptyState-h2qZ0JOD.js} +2 -2
  54. package/dist-vue/_chunks/{PkChatbotEmptyState-DqzgF4vH.js.map → PkChatbotEmptyState-h2qZ0JOD.js.map} +1 -1
  55. package/dist-vue/_chunks/PkChatbotInput-C-bMNHC-.js +397 -0
  56. package/dist-vue/_chunks/PkChatbotInput-C-bMNHC-.js.map +1 -0
  57. package/dist-vue/_chunks/{PkChatbotMessages-WryjcyH7.js → PkChatbotMessages-C0922gNt.js} +18 -18
  58. package/dist-vue/_chunks/PkChatbotMessages-C0922gNt.js.map +1 -0
  59. package/dist-vue/_chunks/{PkChatbotStepPayload-Bga_HEps.js → PkChatbotStepPayload-BOxfKD1b.js} +2 -2
  60. package/dist-vue/_chunks/{PkChatbotStepPayload-Bga_HEps.js.map → PkChatbotStepPayload-BOxfKD1b.js.map} +1 -1
  61. package/dist-vue/_chunks/{PkChatbotStepToolDetail-YbUYP-Y3.js → PkChatbotStepToolDetail-Df6EOYxj.js} +3 -3
  62. package/dist-vue/_chunks/{PkChatbotStepToolDetail-YbUYP-Y3.js.map → PkChatbotStepToolDetail-Df6EOYxj.js.map} +1 -1
  63. package/dist-vue/_chunks/{PkChatbotSteps-CVAkaIzk.js → PkChatbotSteps-DnDtN4Q7.js} +5 -5
  64. package/dist-vue/_chunks/{PkChatbotSteps-CVAkaIzk.js.map → PkChatbotSteps-DnDtN4Q7.js.map} +1 -1
  65. package/dist-vue/_chunks/{PkChatbotViewChat-CZjOJn6w.js → PkChatbotViewChat-BgQ5OhkA.js} +8 -11
  66. package/dist-vue/_chunks/PkChatbotViewChat-BgQ5OhkA.js.map +1 -0
  67. package/dist-vue/_chunks/{PkChatbotViewConversations-BHvHF0w7.js → PkChatbotViewConversations-dKZScKD9.js} +3 -3
  68. package/dist-vue/_chunks/{PkChatbotViewConversations-BHvHF0w7.js.map → PkChatbotViewConversations-dKZScKD9.js.map} +1 -1
  69. package/dist-vue/_chunks/{PkChatbotViewFiles-C-4__qj_.js → PkChatbotViewFiles-CQC3rInD.js} +3 -3
  70. package/dist-vue/_chunks/{PkChatbotViewFiles-C-4__qj_.js.map → PkChatbotViewFiles-CQC3rInD.js.map} +1 -1
  71. package/dist-vue/_chunks/{PkChatbotViewProfile-_WMSVDlA.js → PkChatbotViewProfile-CkZyWh4V.js} +2 -2
  72. package/dist-vue/_chunks/{PkChatbotViewProfile-_WMSVDlA.js.map → PkChatbotViewProfile-CkZyWh4V.js.map} +1 -1
  73. package/dist-vue/_chunks/{PkStreamingMarkdown-6Y7qgbvS.js → PkStreamingMarkdown-BYV68skc.js} +3 -3
  74. package/dist-vue/_chunks/{PkStreamingMarkdown-6Y7qgbvS.js.map → PkStreamingMarkdown-BYV68skc.js.map} +1 -1
  75. package/dist-vue/_chunks/{PkToolEditSpreadsheet-BTauPyXT.js → PkToolEditSpreadsheet-DQxJQIY0.js} +2 -2
  76. package/dist-vue/_chunks/{PkToolEditSpreadsheet-BTauPyXT.js.map → PkToolEditSpreadsheet-DQxJQIY0.js.map} +1 -1
  77. package/dist-vue/_chunks/{PkToolRequestGeolocation-DBzup6bn.js → PkToolRequestGeolocation-BpjglRbg.js} +2 -2
  78. package/dist-vue/_chunks/{PkToolRequestGeolocation-DBzup6bn.js.map → PkToolRequestGeolocation-BpjglRbg.js.map} +1 -1
  79. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-yrRDpNqp.js → PkToolRequestOAuthConnection-CD3M5DWj.js} +2 -2
  80. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-yrRDpNqp.js.map → PkToolRequestOAuthConnection-CD3M5DWj.js.map} +1 -1
  81. package/dist-vue/_chunks/{PkToolShowArtifact-fp37O1om.js → PkToolShowArtifact-Bm5VBF_n.js} +2 -2
  82. package/dist-vue/_chunks/{PkToolShowArtifact-fp37O1om.js.map → PkToolShowArtifact-Bm5VBF_n.js.map} +1 -1
  83. package/dist-vue/_chunks/{PkToolShowContactForm-iSx2ioyT.js → PkToolShowContactForm-CMQTQsU-.js} +2 -2
  84. package/dist-vue/_chunks/{PkToolShowContactForm-iSx2ioyT.js.map → PkToolShowContactForm-CMQTQsU-.js.map} +1 -1
  85. package/dist-vue/_chunks/{PkToolShowDiagram-BlKrh4gK.js → PkToolShowDiagram-adGuj4AF.js} +2 -2
  86. package/dist-vue/_chunks/{PkToolShowDiagram-BlKrh4gK.js.map → PkToolShowDiagram-adGuj4AF.js.map} +1 -1
  87. package/dist-vue/_chunks/{PkToolShowForm-CwlXH13N.js → PkToolShowForm-Cx5KdTlZ.js} +4 -4
  88. package/dist-vue/_chunks/{PkToolShowForm-CwlXH13N.js.map → PkToolShowForm-Cx5KdTlZ.js.map} +1 -1
  89. package/dist-vue/_chunks/{PkToolShowImageGallery-C4esYiM_.js → PkToolShowImageGallery-BtQ0gnGB.js} +2 -2
  90. package/dist-vue/_chunks/{PkToolShowImageGallery-C4esYiM_.js.map → PkToolShowImageGallery-BtQ0gnGB.js.map} +1 -1
  91. package/dist-vue/_chunks/{PkToolShowProductList-CdeYQ-mF.js → PkToolShowProductList-Dvatk6p-.js} +2 -2
  92. package/dist-vue/_chunks/{PkToolShowProductList-CdeYQ-mF.js.map → PkToolShowProductList-Dvatk6p-.js.map} +1 -1
  93. package/dist-vue/_chunks/{PkToolShowSources-D8IF7g0d.js → PkToolShowSources-DKkIYQ9r.js} +3 -3
  94. package/dist-vue/_chunks/{PkToolShowSources-D8IF7g0d.js.map → PkToolShowSources-DKkIYQ9r.js.map} +1 -1
  95. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DXyO8ki2.js → PkToolShowSuggestedReply-BbAfjJP9.js} +2 -2
  96. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DXyO8ki2.js.map → PkToolShowSuggestedReply-BbAfjJP9.js.map} +1 -1
  97. package/dist-vue/_chunks/{PkToolShowVideo-CA7MNSp_.js → PkToolShowVideo-DTNszfdU.js} +2 -2
  98. package/dist-vue/_chunks/{PkToolShowVideo-CA7MNSp_.js.map → PkToolShowVideo-DTNszfdU.js.map} +1 -1
  99. package/dist-vue/_chunks/{PkToolShowWebPages-CKWnAbp8.js → PkToolShowWebPages-euov57FB.js} +2 -2
  100. package/dist-vue/_chunks/{PkToolShowWebPages-CKWnAbp8.js.map → PkToolShowWebPages-euov57FB.js.map} +1 -1
  101. package/dist-vue/_chunks/{createChatbotApiClient-DecVahlB.js → createChatbotApiClient-qHjpFqPL.js} +19 -19
  102. package/dist-vue/_chunks/{createChatbotApiClient-DecVahlB.js.map → createChatbotApiClient-qHjpFqPL.js.map} +1 -1
  103. package/dist-vue/_chunks/{useChatbotStore-BQTq8fq-.js → useChatbotStore-CBjfSN69.js} +1143 -1143
  104. package/dist-vue/_chunks/{useChatbotStore-BQTq8fq-.js.map → useChatbotStore-CBjfSN69.js.map} +1 -1
  105. package/dist-vue/_chunks/{utils-BLMOBcka.js → utils-BCGK2AFl.js} +35 -40
  106. package/dist-vue/_chunks/utils-BCGK2AFl.js.map +1 -0
  107. package/dist-vue/api.js +1 -1
  108. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +12 -4
  109. package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +4 -3
  110. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +11 -5
  111. package/dist-vue/apps/web-component/src/composables/useChatbotProfileProvider.d.ts +3 -2
  112. package/dist-vue/apps/web-component/src/composables/useCopilotPageCss.d.ts +12 -4
  113. package/dist-vue/apps/web-component/src/composables/usePageModal.d.ts +19 -0
  114. package/dist-vue/apps/web-component/src/lib.d.ts +10 -3
  115. package/dist-vue/apps/web-component/src/pageTools/actions.d.ts +33 -0
  116. package/dist-vue/apps/web-component/src/pageTools/navigation.d.ts +27 -0
  117. package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +18 -2
  118. package/dist-vue/apps/web-component/src/utils/emitWidgetEvent.d.ts +8 -0
  119. package/dist-vue/apps/web-component/src/utils/layout.d.ts +3 -3
  120. package/dist-vue/composables.js +201 -21
  121. package/dist-vue/composables.js.map +1 -1
  122. package/dist-vue/index.js +4318 -4266
  123. package/dist-vue/index.js.map +1 -1
  124. package/dist-vue/locales.js +58 -22
  125. package/dist-vue/packages/auth/src/active-membership.d.ts +2 -0
  126. package/dist-vue/packages/components/src/PkSkeleton.d.ts +1 -1
  127. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +11 -5
  128. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +3 -4
  129. package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +19 -0
  130. package/dist-vue/packages/components/src/chat/PkWebSearchSettings.d.ts +2 -0
  131. package/dist-vue/packages/components/src/chat/utils.d.ts +5 -0
  132. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +13 -7
  133. package/dist-vue/packages/composable/src/chatbot/useGreeting.d.ts +5 -3
  134. package/dist-vue/packages/models/src/schema/Agent.d.ts +45 -18
  135. package/dist-vue/packages/models/src/schema/Member.d.ts +11 -0
  136. package/dist-vue/packages/models/src/schema/Organization.d.ts +1 -0
  137. package/dist-vue/packages/models/src/schema/OrganizationDeletion.d.ts +197 -0
  138. package/dist-vue/packages/models/src/schema/OrganizationExternalAuth.d.ts +8 -2
  139. package/dist-vue/packages/models/src/schema/OrganizationIdentityProvider.d.ts +4 -1
  140. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +5 -3
  141. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +5 -3
  142. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  143. package/dist-vue/style.css +1 -1
  144. package/package.json +1 -1
  145. package/dist/_chunks/Agent-BYC51e6E.js.map +0 -1
  146. package/dist/_chunks/PkStreamingMarkdown-CNoHyTuC.js.map +0 -1
  147. package/dist-vue/_chunks/Agent-2DVqpLwz.js.map +0 -1
  148. package/dist-vue/_chunks/PkChatbot-CTZPru6f.js.map +0 -1
  149. package/dist-vue/_chunks/PkChatbotInput-CQup254H.js +0 -399
  150. package/dist-vue/_chunks/PkChatbotInput-CQup254H.js.map +0 -1
  151. package/dist-vue/_chunks/PkChatbotMessages-WryjcyH7.js.map +0 -1
  152. package/dist-vue/_chunks/PkChatbotViewChat-CZjOJn6w.js.map +0 -1
  153. package/dist-vue/_chunks/utils-BLMOBcka.js.map +0 -1
  154. package/dist-vue/apps/web-component/src/composables/useCopilotPush.d.ts +0 -25
@@ -11,9 +11,42 @@ export declare function fill(element: Element, value: unknown, rules: PageRules)
11
11
  * popups and fullscreen stay out of reach.
12
12
  */
13
13
  export declare function click(element: Element): string;
14
+ /**
15
+ * The pointer moving onto `element`: a menu or a tooltip that opens on hover
16
+ * listens to these. A style that only `:hover` applies stays off, since no
17
+ * real pointer is there.
18
+ */
19
+ export declare function hover(element: Element): string;
20
+ /** The keys `page_press` takes: the ones a page handles itself, never a browser shortcut. */
21
+ export declare const PAGE_KEYS: readonly ["Enter", "Escape", "Tab", "Space", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight", "Home", "End", "PageDown", "PageUp", "Backspace", "Delete"];
22
+ /**
23
+ * `keydown` then `keyup` on `element`. True when the page handled the key
24
+ * (it prevented the default): a key pressed by script has no default action,
25
+ * so the caller does the one that matters when the page did not.
26
+ */
27
+ export declare function press(element: Element, key: string): boolean;
28
+ /**
29
+ * The form Enter in `element` submits, as the browser decides it: a field
30
+ * that takes a line of text, in a form whose first submit button is enabled,
31
+ * or with that field alone and no button.
32
+ */
33
+ export declare function formSubmittedByEnter(element: Element): HTMLFormElement | null;
34
+ /**
35
+ * Enter's submission, as the browser does it: a click on the default button,
36
+ * so the form is sent with it and its own handlers run, or the form alone
37
+ * when it has no button.
38
+ */
39
+ export declare function submitByEnter(form: HTMLFormElement): void;
40
+ /**
41
+ * What Escape does in a dialog when the page leaves it to the browser: the
42
+ * dialog's `cancel`, which the site may refuse, then its closing.
43
+ */
44
+ export declare function cancelDialogOf(element: Element): boolean;
14
45
  export declare function bringIntoView(element: Element): void;
15
46
  /** The form a click on `element` would submit, if any. */
16
47
  export declare function formSubmittedBy(element: Element): HTMLFormElement | null;
48
+ /** True for a link to another site: the user leaves the one they had open. */
49
+ export declare function leavesSite(element: Element): boolean;
17
50
  /**
18
51
  * True when a click on `element` would load another document: a link to
19
52
  * another path in the same tab. A link within the page (`#...`) or one a
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The page change an action of the agent may start (a link, a submit), seen
3
+ * from the page it starts on (spec `page-tools.md`). The answer that clicked
4
+ * goes on while this page is still on screen, and its next call, a
5
+ * `page_snapshot` most of the time, would read the page that is leaving: the
6
+ * model takes the click for one that did nothing, and clicks again. The page
7
+ * tools wait here first. On a page that unloads they never answer, and the
8
+ * new page runs the call (`resumeAfterPageNavigation` in the chat store); on
9
+ * a page that stays (a client-side route, a link within the page) they run
10
+ * once it has settled.
11
+ */
12
+ /** Resolves once the page has gone `QUIET_MS` without a change, or after `QUIET_MAX_MS`. */
13
+ export declare function pageQuiet(): Promise<void>;
14
+ /** Called right before the action that may load another document. */
15
+ export declare function startPageChange(): void;
16
+ /**
17
+ * Opens `url`, an address of this site, the way the site's own links do in a
18
+ * single-page app: a history entry and a `popstate`, which Vue Router, React
19
+ * Router and most routers follow without loading the page again. Loaded
20
+ * again, the page would drop the call the answer makes next. When within a
21
+ * moment neither a view changes (`ROUTE_MIN_ELEMENTS`) nor the title, no
22
+ * router took the address: it then loads as typed in the address bar. The
23
+ * page tools wait meanwhile, as after a click that may load another page.
24
+ */
25
+ export declare function openAddress(url: string): void;
26
+ /** What every page tool awaits before it reads or acts. */
27
+ export declare function pageChangeSettled(): Promise<void>;
@@ -1,3 +1,6 @@
1
+ /** The widget and its page control bar are not part of the page the agent works on. */
2
+ /** The widget, and the stop it puts inside a modal dialog of the page (`usePageModalStop`). */
3
+ export declare const STOP_IN_MODAL_TAG = "agent-studio-stop";
1
4
  /** Stable ids for elements across snapshots, without holding removed elements in memory. */
2
5
  export declare class PageRefs {
3
6
  private next;
@@ -24,6 +27,18 @@ export declare function filteredText(root: Element, rules: PageRules, max: numbe
24
27
  export declare function roleOf(element: Element): string | undefined;
25
28
  /** The accessible name, in the order the accessibility tree computes it, never from an excluded element. */
26
29
  export declare function nameOf(element: Element, rules: PageRules): string;
30
+ /**
31
+ * The question of the site's own confirmation dialog when `element` answers
32
+ * it: one of its buttons, or with `anyElement` any element in it (a key goes
33
+ * to the dialog's own handler as well). An `alertdialog`, or a modal dialog
34
+ * that only asks ("Delete the agent? This cannot be undone."). The site asks
35
+ * it of the user, so the user answers it, with the question in view, whatever
36
+ * the confirmation settings. Its text without the buttons, never from an
37
+ * excluded element.
38
+ */
39
+ export declare function confirmationQuestion(element: Element, rules: PageRules, { anyElement }?: {
40
+ anyElement?: boolean;
41
+ }): string | undefined;
27
42
  /** The options of a select the agent may see and pick: not the excluded ones. */
28
43
  export declare const allowedOptions: (select: HTMLSelectElement, rules: PageRules) => HTMLOptionElement[];
29
44
  /** One line for an element with a role: `[12] button "Invia" disabled`. */
@@ -35,8 +50,9 @@ export type SnapshotResult = {
35
50
  /**
36
51
  * Walks `root` in reading order, through open shadow roots and slots. An
37
52
  * element with a role becomes one line and is not descended (its text is its
38
- * name); any other element contributes its own text nodes. Stops at
39
- * `maxChars`, or past the node and time budget.
53
+ * name), but for a container, whose content follows its line, and a role of
54
+ * structure, read as text; any other element contributes its own text nodes.
55
+ * Stops at `maxChars`, or past the node and time budget.
40
56
  */
41
57
  export declare function snapshot(root: Element, refs: PageRefs, rules: PageRules, { maxChars, withRefs }: {
42
58
  maxChars: number;
@@ -23,3 +23,11 @@ export declare function useWidgetEvents(): {
23
23
  * signal, or a page waiting for `working-ended` would wait for ever.
24
24
  */
25
25
  export declare function useWorkingSignal(isWorking: () => boolean): void;
26
+ /**
27
+ * Mirrors the agent acting on the page (spec `page-tools.md`) the same way:
28
+ * the `controlling` attribute while the control bar and its stop show, and
29
+ * `page-control-started` and `page-control-ended`. It is what lights an
30
+ * effect around the page, where `working` also covers an answer that only
31
+ * thinks and writes.
32
+ */
33
+ export declare function usePageControlSignal(isControlling: () => boolean): void;
@@ -1,9 +1,9 @@
1
- import { AgentCopilotFrame, AgentWidgetLayout } from '../../../../packages/models/src';
1
+ import { AgentWidgetAppearance, AgentWidgetLayout } from '../../../../packages/models/src';
2
2
  /**
3
3
  * The layout the floating element shows (spec `widget-copilot.md`, D1): its
4
4
  * `layout` attribute wins over the agent's setting, and an attribute that
5
5
  * names no layout counts as absent.
6
6
  */
7
7
  export declare function resolveWidgetLayout(attribute: string | undefined, setting: AgentWidgetLayout | undefined): AgentWidgetLayout;
8
- /** How the site makes room for the copilot panel (D3), with the same rule as the layout. */
9
- export declare function resolveCopilotFrame(attribute: string | undefined, setting: AgentCopilotFrame | undefined): AgentCopilotFrame;
8
+ /** How the floating card looks over the site, with the same rule as the layout. */
9
+ export declare function resolveWidgetAppearance(attribute: string | undefined, setting: AgentWidgetAppearance | undefined): AgentWidgetAppearance;