@artooi/ag-ui-web-component 0.37.0 → 0.38.0

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 (195) hide show
  1. package/CHANGELOG.md +75 -1
  2. package/dist/ag-ui-web-component.bundle.js +81 -81
  3. package/dist/ag-ui-web-component.bundle.js.map +4 -4
  4. package/dist/core/activity_registration.d.ts +19 -0
  5. package/dist/core/activity_registration.d.ts.map +1 -0
  6. package/dist/core/activity_renderer.d.ts +20 -0
  7. package/dist/core/activity_renderer.d.ts.map +1 -0
  8. package/dist/core/ag_ui_chat.d.ts +6 -126
  9. package/dist/core/ag_ui_chat.d.ts.map +1 -1
  10. package/dist/core/events/attachments_detail.d.ts +9 -0
  11. package/dist/core/events/attachments_detail.d.ts.map +1 -0
  12. package/dist/core/events/custom_agent_detail.d.ts +8 -0
  13. package/dist/core/events/custom_agent_detail.d.ts.map +1 -0
  14. package/dist/core/events/feedback_detail.d.ts +7 -0
  15. package/dist/core/events/feedback_detail.d.ts.map +1 -0
  16. package/dist/core/events/invalidate_detail.d.ts +16 -0
  17. package/dist/core/events/invalidate_detail.d.ts.map +1 -0
  18. package/dist/core/events/run_finished_detail.d.ts +22 -0
  19. package/dist/core/events/run_finished_detail.d.ts.map +1 -0
  20. package/dist/core/events/state_detail.d.ts +5 -0
  21. package/dist/core/events/state_detail.d.ts.map +1 -0
  22. package/dist/core/events/submit_detail.d.ts +8 -0
  23. package/dist/core/events/submit_detail.d.ts.map +1 -0
  24. package/dist/core/events/toggle_detail.d.ts +5 -0
  25. package/dist/core/events/toggle_detail.d.ts.map +1 -0
  26. package/dist/core/events/tool_run.d.ts +11 -0
  27. package/dist/core/events/tool_run.d.ts.map +1 -0
  28. package/dist/core/events/unread_detail.d.ts +5 -0
  29. package/dist/core/events/unread_detail.d.ts.map +1 -0
  30. package/dist/core/message_role.d.ts +4 -0
  31. package/dist/core/message_role.d.ts.map +1 -0
  32. package/dist/core/tool_outcome.d.ts +1 -1
  33. package/dist/core/tool_outcome.d.ts.map +1 -1
  34. package/dist/index.d.ts +30 -17
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +8579 -8573
  37. package/dist/index.js.map +4 -4
  38. package/dist/ui/charts/chart_block.d.ts.map +1 -0
  39. package/dist/ui/charts/chart_spec_from.d.ts.map +1 -0
  40. package/dist/ui/{chart_tool.d.ts → charts/chart_tool.d.ts} +1 -1
  41. package/dist/ui/charts/chart_tool.d.ts.map +1 -0
  42. package/dist/ui/{attachment_tray.d.ts → composer/attachment_tray.d.ts} +3 -3
  43. package/dist/ui/composer/attachment_tray.d.ts.map +1 -0
  44. package/dist/ui/{skills_menu.d.ts → composer/skills_menu.d.ts} +1 -1
  45. package/dist/ui/composer/skills_menu.d.ts.map +1 -0
  46. package/dist/ui/{voice_input.d.ts → composer/voice_input.d.ts} +2 -2
  47. package/dist/ui/composer/voice_input.d.ts.map +1 -0
  48. package/dist/ui/{attach_copy_buttons.d.ts → excerpts/attach_copy_buttons.d.ts} +1 -1
  49. package/dist/ui/excerpts/attach_copy_buttons.d.ts.map +1 -0
  50. package/dist/ui/excerpts/copy_payload.d.ts.map +1 -0
  51. package/dist/ui/excerpts/page_quote_offer.d.ts.map +1 -0
  52. package/dist/ui/excerpts/quote_selection.d.ts.map +1 -0
  53. package/dist/ui/{checkpoint_menu.d.ts → history/checkpoint_menu.d.ts} +2 -2
  54. package/dist/ui/history/checkpoint_menu.d.ts.map +1 -0
  55. package/dist/ui/{relative_time.d.ts → history/relative_time.d.ts} +1 -1
  56. package/dist/ui/history/relative_time.d.ts.map +1 -0
  57. package/dist/ui/{thread_drawer.d.ts → history/thread_drawer.d.ts} +2 -2
  58. package/dist/ui/history/thread_drawer.d.ts.map +1 -0
  59. package/dist/ui/{approval_card.d.ts → interrupts/approval_card.d.ts} +1 -1
  60. package/dist/ui/interrupts/approval_card.d.ts.map +1 -0
  61. package/dist/ui/{confirmation_card.d.ts → interrupts/confirmation_card.d.ts} +1 -1
  62. package/dist/ui/interrupts/confirmation_card.d.ts.map +1 -0
  63. package/dist/ui/{question_card.d.ts → interrupts/question_card.d.ts} +1 -1
  64. package/dist/ui/interrupts/question_card.d.ts.map +1 -0
  65. package/dist/ui/placement/clamp_launcher.d.ts.map +1 -0
  66. package/dist/ui/placement/clamp_panel.d.ts.map +1 -0
  67. package/dist/ui/placement/launcher_drag.d.ts.map +1 -0
  68. package/dist/ui/placement/launcher_placement.d.ts.map +1 -0
  69. package/dist/ui/placement/panel_drag.d.ts.map +1 -0
  70. package/dist/ui/placement/place_widget.d.ts.map +1 -0
  71. package/dist/ui/placement/resize_handle.d.ts.map +1 -0
  72. package/dist/ui/progress/prettify_tool_name.d.ts.map +1 -0
  73. package/dist/ui/progress/run_notice.d.ts.map +1 -0
  74. package/dist/ui/{subagent_panel.d.ts → progress/subagent_panel.d.ts} +2 -2
  75. package/dist/ui/progress/subagent_panel.d.ts.map +1 -0
  76. package/dist/ui/progress/subagent_update.d.ts.map +1 -0
  77. package/dist/ui/{thoughts_block.d.ts → progress/thoughts_block.d.ts} +1 -1
  78. package/dist/ui/progress/thoughts_block.d.ts.map +1 -0
  79. package/dist/ui/{tool_call_card.d.ts → progress/tool_call_card.d.ts} +2 -2
  80. package/dist/ui/progress/tool_call_card.d.ts.map +1 -0
  81. package/dist/ui/{attachment_chips.d.ts → transcript/attachment_chips.d.ts} +1 -1
  82. package/dist/ui/transcript/attachment_chips.d.ts.map +1 -0
  83. package/dist/ui/{message_actions.d.ts → transcript/message_actions.d.ts} +1 -1
  84. package/dist/ui/transcript/message_actions.d.ts.map +1 -0
  85. package/dist/ui/transcript/render_markdown.d.ts.map +1 -0
  86. package/dist/ui/transcript/reveal_words.d.ts.map +1 -0
  87. package/dist/ui/transcript/stick_to_bottom.d.ts.map +1 -0
  88. package/dist/ui/{suggestion_chips.d.ts → transcript/suggestion_chips.d.ts} +1 -1
  89. package/dist/ui/transcript/suggestion_chips.d.ts.map +1 -0
  90. package/package.json +5 -5
  91. package/src/core/activity_registration.ts +19 -0
  92. package/src/core/activity_renderer.ts +19 -0
  93. package/src/core/ag_ui_chat.ts +84 -178
  94. package/src/core/events/attachments_detail.ts +9 -0
  95. package/src/core/events/custom_agent_detail.ts +7 -0
  96. package/src/core/events/feedback_detail.ts +6 -0
  97. package/src/core/events/invalidate_detail.ts +15 -0
  98. package/src/core/events/run_finished_detail.ts +22 -0
  99. package/src/core/events/state_detail.ts +4 -0
  100. package/src/core/events/submit_detail.ts +8 -0
  101. package/src/core/events/toggle_detail.ts +4 -0
  102. package/src/core/events/tool_run.ts +10 -0
  103. package/src/core/events/unread_detail.ts +4 -0
  104. package/src/core/message_role.ts +4 -0
  105. package/src/core/tool_outcome.ts +1 -1
  106. package/src/index.ts +52 -54
  107. package/src/ui/{chart_tool.ts → charts/chart_tool.ts} +1 -1
  108. package/src/ui/{attachment_tray.ts → composer/attachment_tray.ts} +5 -5
  109. package/src/ui/{skills_menu.ts → composer/skills_menu.ts} +1 -1
  110. package/src/ui/{voice_input.ts → composer/voice_input.ts} +3 -3
  111. package/src/ui/{attach_copy_buttons.ts → excerpts/attach_copy_buttons.ts} +1 -1
  112. package/src/ui/{checkpoint_menu.ts → history/checkpoint_menu.ts} +2 -2
  113. package/src/ui/{relative_time.ts → history/relative_time.ts} +1 -1
  114. package/src/ui/{thread_drawer.ts → history/thread_drawer.ts} +2 -2
  115. package/src/ui/{approval_card.ts → interrupts/approval_card.ts} +1 -1
  116. package/src/ui/{confirmation_card.ts → interrupts/confirmation_card.ts} +1 -1
  117. package/src/ui/{question_card.ts → interrupts/question_card.ts} +1 -1
  118. package/src/ui/{clamp_launcher.ts → placement/clamp_launcher.ts} +1 -1
  119. package/src/ui/{clamp_panel.ts → placement/clamp_panel.ts} +1 -1
  120. package/src/ui/{launcher_placement.ts → placement/launcher_placement.ts} +1 -1
  121. package/src/ui/{subagent_panel.ts → progress/subagent_panel.ts} +2 -2
  122. package/src/ui/{subagent_update.ts → progress/subagent_update.ts} +1 -1
  123. package/src/ui/{thoughts_block.ts → progress/thoughts_block.ts} +1 -1
  124. package/src/ui/{tool_call_card.ts → progress/tool_call_card.ts} +2 -2
  125. package/src/ui/{attachment_chips.ts → transcript/attachment_chips.ts} +2 -2
  126. package/src/ui/{message_actions.ts → transcript/message_actions.ts} +2 -2
  127. package/src/ui/{suggestion_chips.ts → transcript/suggestion_chips.ts} +1 -1
  128. package/src/version.ts +1 -1
  129. package/dist/ui/approval_card.d.ts.map +0 -1
  130. package/dist/ui/attach_copy_buttons.d.ts.map +0 -1
  131. package/dist/ui/attachment_chips.d.ts.map +0 -1
  132. package/dist/ui/attachment_tray.d.ts.map +0 -1
  133. package/dist/ui/chart_block.d.ts.map +0 -1
  134. package/dist/ui/chart_spec_from.d.ts.map +0 -1
  135. package/dist/ui/chart_tool.d.ts.map +0 -1
  136. package/dist/ui/checkpoint_menu.d.ts.map +0 -1
  137. package/dist/ui/clamp_launcher.d.ts.map +0 -1
  138. package/dist/ui/clamp_panel.d.ts.map +0 -1
  139. package/dist/ui/confirmation_card.d.ts.map +0 -1
  140. package/dist/ui/copy_payload.d.ts.map +0 -1
  141. package/dist/ui/launcher_drag.d.ts.map +0 -1
  142. package/dist/ui/launcher_placement.d.ts.map +0 -1
  143. package/dist/ui/message_actions.d.ts.map +0 -1
  144. package/dist/ui/page_quote_offer.d.ts.map +0 -1
  145. package/dist/ui/panel_drag.d.ts.map +0 -1
  146. package/dist/ui/place_widget.d.ts.map +0 -1
  147. package/dist/ui/prettify_tool_name.d.ts.map +0 -1
  148. package/dist/ui/question_card.d.ts.map +0 -1
  149. package/dist/ui/quote_selection.d.ts.map +0 -1
  150. package/dist/ui/relative_time.d.ts.map +0 -1
  151. package/dist/ui/render_markdown.d.ts.map +0 -1
  152. package/dist/ui/resize_handle.d.ts.map +0 -1
  153. package/dist/ui/reveal_words.d.ts.map +0 -1
  154. package/dist/ui/run_notice.d.ts.map +0 -1
  155. package/dist/ui/skills_menu.d.ts.map +0 -1
  156. package/dist/ui/stick_to_bottom.d.ts.map +0 -1
  157. package/dist/ui/subagent_panel.d.ts.map +0 -1
  158. package/dist/ui/subagent_update.d.ts.map +0 -1
  159. package/dist/ui/suggestion_chips.d.ts.map +0 -1
  160. package/dist/ui/thoughts_block.d.ts.map +0 -1
  161. package/dist/ui/thread_drawer.d.ts.map +0 -1
  162. package/dist/ui/tool_call_card.d.ts.map +0 -1
  163. package/dist/ui/voice_input.d.ts.map +0 -1
  164. /package/dist/ui/{chart_block.d.ts → charts/chart_block.d.ts} +0 -0
  165. /package/dist/ui/{chart_spec_from.d.ts → charts/chart_spec_from.d.ts} +0 -0
  166. /package/dist/ui/{copy_payload.d.ts → excerpts/copy_payload.d.ts} +0 -0
  167. /package/dist/ui/{page_quote_offer.d.ts → excerpts/page_quote_offer.d.ts} +0 -0
  168. /package/dist/ui/{quote_selection.d.ts → excerpts/quote_selection.d.ts} +0 -0
  169. /package/dist/ui/{clamp_launcher.d.ts → placement/clamp_launcher.d.ts} +0 -0
  170. /package/dist/ui/{clamp_panel.d.ts → placement/clamp_panel.d.ts} +0 -0
  171. /package/dist/ui/{launcher_drag.d.ts → placement/launcher_drag.d.ts} +0 -0
  172. /package/dist/ui/{launcher_placement.d.ts → placement/launcher_placement.d.ts} +0 -0
  173. /package/dist/ui/{panel_drag.d.ts → placement/panel_drag.d.ts} +0 -0
  174. /package/dist/ui/{place_widget.d.ts → placement/place_widget.d.ts} +0 -0
  175. /package/dist/ui/{resize_handle.d.ts → placement/resize_handle.d.ts} +0 -0
  176. /package/dist/ui/{prettify_tool_name.d.ts → progress/prettify_tool_name.d.ts} +0 -0
  177. /package/dist/ui/{run_notice.d.ts → progress/run_notice.d.ts} +0 -0
  178. /package/dist/ui/{subagent_update.d.ts → progress/subagent_update.d.ts} +0 -0
  179. /package/dist/ui/{render_markdown.d.ts → transcript/render_markdown.d.ts} +0 -0
  180. /package/dist/ui/{reveal_words.d.ts → transcript/reveal_words.d.ts} +0 -0
  181. /package/dist/ui/{stick_to_bottom.d.ts → transcript/stick_to_bottom.d.ts} +0 -0
  182. /package/src/ui/{chart_block.ts → charts/chart_block.ts} +0 -0
  183. /package/src/ui/{chart_spec_from.ts → charts/chart_spec_from.ts} +0 -0
  184. /package/src/ui/{copy_payload.ts → excerpts/copy_payload.ts} +0 -0
  185. /package/src/ui/{page_quote_offer.ts → excerpts/page_quote_offer.ts} +0 -0
  186. /package/src/ui/{quote_selection.ts → excerpts/quote_selection.ts} +0 -0
  187. /package/src/ui/{launcher_drag.ts → placement/launcher_drag.ts} +0 -0
  188. /package/src/ui/{panel_drag.ts → placement/panel_drag.ts} +0 -0
  189. /package/src/ui/{place_widget.ts → placement/place_widget.ts} +0 -0
  190. /package/src/ui/{resize_handle.ts → placement/resize_handle.ts} +0 -0
  191. /package/src/ui/{prettify_tool_name.ts → progress/prettify_tool_name.ts} +0 -0
  192. /package/src/ui/{run_notice.ts → progress/run_notice.ts} +0 -0
  193. /package/src/ui/{render_markdown.ts → transcript/render_markdown.ts} +0 -0
  194. /package/src/ui/{reveal_words.ts → transcript/reveal_words.ts} +0 -0
  195. /package/src/ui/{stick_to_bottom.ts → transcript/stick_to_bottom.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,79 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.38.0] — 2026-09-14
11
+
12
+ ### Changed
13
+
14
+ - **`src/ui/` is grouped by concern instead of being 37 modules in one flat
15
+ directory.** A flat directory that size is a table of contents nobody reads: the
16
+ placement arithmetic, the inline cards, the chart renderer and the clipboard
17
+ payload builder were neighbours only in the sense that all of them draw
18
+ something. They are now eight directories -- `placement/`, `transcript/`,
19
+ `progress/`, `excerpts/`, `charts/`, `interrupts/`, `history/` and `composer/`
20
+ -- with `styles.ts` and `ui_strings.ts` left at the group root because every one
21
+ of the eight reads them.
22
+
23
+ The split is by the question a module answers, never by the kind of export it
24
+ has. `interrupts/` holds the approval, confirmation and question cards because
25
+ all three pause a run to ask the user something; `tool_call_card.ts` is also a
26
+ card and sits in `progress/` instead, because it reports work rather than asking
27
+ for a decision. A `cards/` directory would have held all four and said nothing
28
+ about any of them. `CLAUDE.md` now states the rule, since the eight structural
29
+ rules it had all governed a file and none governed a directory.
30
+
31
+ Moves only. No module's contents changed, and the published surface is
32
+ unchanged: the same 92 runtime exports, the same 173 declared names, and every
33
+ emitted declaration line identical to the release before it.
34
+
35
+ - **The element's event detail shapes are their own modules.** `ag_ui_chat.ts`
36
+ declared thirteen exported types alongside the `AgUiChat` class, so a consumer
37
+ looking up `RunFinishedDetail` opened a file of several thousand lines to read
38
+ twenty. The nine `detail` shapes and the `ToolRun` one of them lists are now in
39
+ `src/core/events/`, and `MessageRole`, `ActivityRenderer` and
40
+ `ActivityRegistration` at the `src/core/` root -- one symbol per file, like
41
+ everything else in the package.
42
+
43
+ The file shrank by only about a hundred lines, which is not the point: the point
44
+ is that each of these thirteen now has an import path a reader can go to, and
45
+ the element's contract with its host is no longer interleaved with the
46
+ implementation of it. Consumers importing from the package entry point see no
47
+ difference; the names and the shapes are the same.
48
+
49
+ ### Fixed
50
+
51
+ - **A text message carrying no content no longer draws an empty bubble.**
52
+ `TOOL_CALL_START` names the assistant message a call belongs to, and a
53
+ response whose first part is a tool call has no text to open that message
54
+ with. pydantic-ai 2.37 began opening and closing an empty message there so
55
+ that `parentMessageId` names one the stream actually announced -- before that
56
+ it named a message no event carried, which a client could only answer by
57
+ inventing an id matching nothing echoed back. The envelope is a correctness
58
+ fix on the server side, it is legal AG-UI, and any server may send one.
59
+
60
+ Drawing it put an empty bubble above **every** tool call. Measured in
61
+ Chromium it was 16px tall and laid out between the question and the card, so
62
+ it read as a gap rather than as nothing.
63
+
64
+ The sharper half is that `#renderHistoricMessage` has always declined to draw
65
+ a bubble for an assistant message with no text, so the transcript during a run
66
+ disagreed with the same conversation after a reload. This is the live path
67
+ adopting a rule the restore path already stated, and the test asserts the two
68
+ against each other rather than against separate literals, so they cannot drift
69
+ apart again.
70
+
71
+ The guard tests the buffer for emptiness rather than blankness on purpose:
72
+ whitespace is content a server chose to send, and trimming would make the
73
+ client the judge of what counts as an answer.
74
+
75
+ - **`StateDetail` was documented as if it were `FeedbackDetail`.** The two
76
+ interfaces sat next to each other and `StateDetail`'s doc comment had drifted
77
+ above `FeedbackDetail`'s own, so `FeedbackDetail` carried two comments,
78
+ `StateDetail` carried none, and an editor offered the wrong one for both. It
79
+ survived because a stray comment is invisible in a file long enough to hold both
80
+ declarations screens apart from their reader; putting one symbol in one file is
81
+ what made it obvious. Nothing about either type changed.
82
+
10
83
  ## [0.37.0] — 2026-09-06
11
84
 
12
85
  ### Fixed
@@ -3541,7 +3614,8 @@ hosts that both arrange the page the way it expects.
3541
3614
  ### Notes
3542
3615
  - First release — exercising the automated npm OIDC publish pipeline end-to-end.
3543
3616
 
3544
- [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.37.0...HEAD
3617
+ [Unreleased]: https://github.com/Artui/ag-ui-web-component/compare/v0.38.0...HEAD
3618
+ [0.38.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.37.0...v0.38.0
3545
3619
  [0.37.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.36.0...v0.37.0
3546
3620
  [0.36.0]: https://github.com/Artui/ag-ui-web-component/compare/v0.35.2...v0.36.0
3547
3621
  [0.35.2]: https://github.com/Artui/ag-ui-web-component/compare/v0.35.1...v0.35.2