@oxy.so/bloom 7.0.1 → 7.1.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 (517) hide show
  1. package/assets/character-runtime/README.md +55 -0
  2. package/assets/character-runtime/appearance-codec.mjs +149 -0
  3. package/assets/character-runtime/integrity.json +6 -0
  4. package/assets/character-runtime/legacy-engine.mjs +105 -0
  5. package/assets/character-runtime/legacy-geometry.mjs +166 -0
  6. package/assets/character-runtime/legacy-worker.mjs +85 -0
  7. package/assets/character-runtime/orbit-characters.data +0 -0
  8. package/assets/character-runtime/orbit-characters.mjs +30 -0
  9. package/assets/character-runtime/orbit-characters.wasm +0 -0
  10. package/assets/character-runtime/preparation-worker.mjs +19 -0
  11. package/assets/character-runtime/runtime.mjs +820 -0
  12. package/assets/character-runtime/thumbnails/eyes/crescent_inset.png +0 -0
  13. package/assets/character-runtime/thumbnails/eyes/dots.png +0 -0
  14. package/assets/character-runtime/thumbnails/eyes/double_highlights.png +0 -0
  15. package/assets/character-runtime/thumbnails/eyes/highlight_capsules.png +0 -0
  16. package/assets/character-runtime/thumbnails/eyes/oval.png +0 -0
  17. package/assets/character-runtime/thumbnails/eyes/round_inset.png +0 -0
  18. package/assets/character-runtime/thumbnails/eyes/sleepy_lids.png +0 -0
  19. package/assets/character-runtime/thumbnails/eyes/sparkle_capsules.png +0 -0
  20. package/assets/character-runtime/thumbnails/eyes/swept_lids.png +0 -0
  21. package/assets/character-runtime/thumbnails/shapes/capsule.png +0 -0
  22. package/assets/character-runtime/thumbnails/shapes/circle.png +0 -0
  23. package/assets/character-runtime/thumbnails/shapes/circle_two_ears.png +0 -0
  24. package/assets/character-runtime/thumbnails/shapes/four_lobed_butterfly.png +0 -0
  25. package/assets/character-runtime/thumbnails/shapes/heart.png +0 -0
  26. package/assets/character-runtime/thumbnails/shapes/rounded_cube.png +0 -0
  27. package/assets/character-runtime/thumbnails/shapes/rounded_diamond.png +0 -0
  28. package/assets/character-runtime/thumbnails/shapes/rounded_head_two_ears.png +0 -0
  29. package/assets/character-runtime/thumbnails/shapes/rounded_triangle.png +0 -0
  30. package/assets/character-runtime/thumbnails/shapes/six_lobed_flower.png +0 -0
  31. package/assets/character-runtime/thumbnails/shapes/twelve_scalloped_rosette.png +0 -0
  32. package/docs/adoption-matrix.mdx +9 -9
  33. package/docs/agent-avatar.mdx +35 -10
  34. package/docs/agent-creator.mdx +12 -4
  35. package/docs/multi-agent-chat.mdx +12 -0
  36. package/docs/project-board.mdx +3 -3
  37. package/lib/commonjs/agent-avatar/AgentAvatar.js +15 -203
  38. package/lib/commonjs/agent-avatar/AgentAvatar.js.map +1 -1
  39. package/lib/commonjs/agent-avatar/AgentAvatarProvider.js +64 -0
  40. package/lib/commonjs/agent-avatar/AgentAvatarProvider.js.map +1 -0
  41. package/lib/commonjs/agent-avatar/CharacterAvatar.js +211 -0
  42. package/lib/commonjs/agent-avatar/CharacterAvatar.js.map +1 -0
  43. package/lib/commonjs/agent-avatar/ProceduralAvatar.js +216 -0
  44. package/lib/commonjs/agent-avatar/ProceduralAvatar.js.map +1 -0
  45. package/lib/commonjs/agent-avatar/artwork.js +4 -3
  46. package/lib/commonjs/agent-avatar/artwork.js.map +1 -1
  47. package/lib/commonjs/agent-avatar/avatar-color.js +16 -0
  48. package/lib/commonjs/agent-avatar/avatar-color.js.map +1 -0
  49. package/lib/commonjs/agent-avatar/character-html.js +25 -0
  50. package/lib/commonjs/agent-avatar/character-html.js.map +1 -0
  51. package/lib/commonjs/agent-avatar/character-runtime-module.js +39 -0
  52. package/lib/commonjs/agent-avatar/character-runtime-module.js.map +1 -0
  53. package/lib/commonjs/agent-avatar/character-webview.js +18 -0
  54. package/lib/commonjs/agent-avatar/character-webview.js.map +1 -0
  55. package/lib/commonjs/agent-avatar/config-character.js +36 -0
  56. package/lib/commonjs/agent-avatar/config-character.js.map +1 -0
  57. package/lib/commonjs/agent-avatar/context.js +3 -1
  58. package/lib/commonjs/agent-avatar/context.js.map +1 -1
  59. package/lib/commonjs/agent-avatar/index.js +7 -0
  60. package/lib/commonjs/agent-avatar/index.js.map +1 -1
  61. package/lib/commonjs/agent-avatar/legacy-contours.js +57 -0
  62. package/lib/commonjs/agent-avatar/legacy-contours.js.map +1 -0
  63. package/lib/commonjs/agent-avatar/legacy-recipe.js +112 -0
  64. package/lib/commonjs/agent-avatar/legacy-recipe.js.map +1 -0
  65. package/lib/commonjs/agent-avatar/messages.js +2 -1
  66. package/lib/commonjs/agent-avatar/messages.js.map +1 -1
  67. package/lib/commonjs/agent-avatar/model.js +2 -0
  68. package/lib/commonjs/agent-avatar/model.js.map +1 -1
  69. package/lib/commonjs/agent-creator/AgentCreatorBase.js +245 -21
  70. package/lib/commonjs/agent-creator/AgentCreatorBase.js.map +1 -1
  71. package/lib/commonjs/agent-creator/CharacterControls.js +113 -0
  72. package/lib/commonjs/agent-creator/CharacterControls.js.map +1 -0
  73. package/lib/commonjs/agent-creator/EmotionPicker.js +51 -18
  74. package/lib/commonjs/agent-creator/EmotionPicker.js.map +1 -1
  75. package/lib/commonjs/agent-creator/ShapeArc.js +56 -26
  76. package/lib/commonjs/agent-creator/ShapeArc.js.map +1 -1
  77. package/lib/commonjs/agent-creator/ShapeSilhouette.js +62 -0
  78. package/lib/commonjs/agent-creator/ShapeSilhouette.js.map +1 -0
  79. package/lib/commonjs/agent-creator/constants.js +48 -1
  80. package/lib/commonjs/agent-creator/constants.js.map +1 -1
  81. package/lib/commonjs/agent-creator/messages.js +9 -0
  82. package/lib/commonjs/agent-creator/messages.js.map +1 -1
  83. package/lib/commonjs/agent-creator/shared.js +7 -10
  84. package/lib/commonjs/agent-creator/shared.js.map +1 -1
  85. package/lib/commonjs/agent-thinking/AgentThinking.js +4 -62
  86. package/lib/commonjs/agent-thinking/AgentThinking.js.map +1 -1
  87. package/lib/commonjs/agent-thinking/ThinkingLabel.js +77 -0
  88. package/lib/commonjs/agent-thinking/ThinkingLabel.js.map +1 -0
  89. package/lib/commonjs/chart-cards/TokensChartCard.js +20 -5
  90. package/lib/commonjs/chart-cards/TokensChartCard.js.map +1 -1
  91. package/lib/commonjs/locale/translations/ar.js +11 -1
  92. package/lib/commonjs/locale/translations/ar.js.map +1 -1
  93. package/lib/commonjs/locale/translations/bn.js +11 -1
  94. package/lib/commonjs/locale/translations/bn.js.map +1 -1
  95. package/lib/commonjs/locale/translations/ca.js +11 -1
  96. package/lib/commonjs/locale/translations/ca.js.map +1 -1
  97. package/lib/commonjs/locale/translations/de.js +11 -1
  98. package/lib/commonjs/locale/translations/de.js.map +1 -1
  99. package/lib/commonjs/locale/translations/es.js +11 -1
  100. package/lib/commonjs/locale/translations/es.js.map +1 -1
  101. package/lib/commonjs/locale/translations/fr.js +11 -1
  102. package/lib/commonjs/locale/translations/fr.js.map +1 -1
  103. package/lib/commonjs/locale/translations/hi.js +11 -1
  104. package/lib/commonjs/locale/translations/hi.js.map +1 -1
  105. package/lib/commonjs/locale/translations/id.js +11 -1
  106. package/lib/commonjs/locale/translations/id.js.map +1 -1
  107. package/lib/commonjs/locale/translations/it.js +11 -1
  108. package/lib/commonjs/locale/translations/it.js.map +1 -1
  109. package/lib/commonjs/locale/translations/ja.js +11 -1
  110. package/lib/commonjs/locale/translations/ja.js.map +1 -1
  111. package/lib/commonjs/locale/translations/pt.js +11 -1
  112. package/lib/commonjs/locale/translations/pt.js.map +1 -1
  113. package/lib/commonjs/locale/translations/ru.js +11 -1
  114. package/lib/commonjs/locale/translations/ru.js.map +1 -1
  115. package/lib/commonjs/locale/translations/tr.js +11 -1
  116. package/lib/commonjs/locale/translations/tr.js.map +1 -1
  117. package/lib/commonjs/locale/translations/zh.js +11 -1
  118. package/lib/commonjs/locale/translations/zh.js.map +1 -1
  119. package/lib/commonjs/multi-agent-chat/AvatarHandoff.js +2 -4
  120. package/lib/commonjs/multi-agent-chat/AvatarHandoff.js.map +1 -1
  121. package/lib/commonjs/multi-agent-chat/ChatAgentProfile.js +97 -0
  122. package/lib/commonjs/multi-agent-chat/ChatAgentProfile.js.map +1 -0
  123. package/lib/commonjs/multi-agent-chat/EditorRail.js +4 -0
  124. package/lib/commonjs/multi-agent-chat/EditorRail.js.map +1 -1
  125. package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js +89 -126
  126. package/lib/commonjs/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
  127. package/lib/commonjs/multi-agent-chat/ReplyRow.js +8 -11
  128. package/lib/commonjs/multi-agent-chat/ReplyRow.js.map +1 -1
  129. package/lib/commonjs/multi-agent-chat/handoff.js +5 -5
  130. package/lib/commonjs/multi-agent-chat/handoff.js.map +1 -1
  131. package/lib/commonjs/project-board/CreateTicketDialog.js +33 -2
  132. package/lib/commonjs/project-board/CreateTicketDialog.js.map +1 -1
  133. package/lib/commonjs/project-board/ProjectBoardBase.js +137 -38
  134. package/lib/commonjs/project-board/ProjectBoardBase.js.map +1 -1
  135. package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js +34 -28
  136. package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js.map +1 -1
  137. package/lib/commonjs/project-board/TicketDetailDialog.js +6 -3
  138. package/lib/commonjs/project-board/TicketDetailDialog.js.map +1 -1
  139. package/lib/commonjs/project-board/TicketGenieSurface.js +17 -7
  140. package/lib/commonjs/project-board/TicketGenieSurface.js.map +1 -1
  141. package/lib/commonjs/project-board/TicketGenieSurface.web.js +1 -1
  142. package/lib/commonjs/project-board/TicketGenieSurface.web.js.map +1 -1
  143. package/lib/commonjs/project-board/TicketPresence.js +125 -0
  144. package/lib/commonjs/project-board/TicketPresence.js.map +1 -0
  145. package/lib/commonjs/project-board/TicketTokenChart.js +23 -0
  146. package/lib/commonjs/project-board/TicketTokenChart.js.map +1 -0
  147. package/lib/commonjs/project-board/context.js +3 -1
  148. package/lib/commonjs/project-board/context.js.map +1 -1
  149. package/lib/commonjs/search/Search.js +12 -3
  150. package/lib/commonjs/search/Search.js.map +1 -1
  151. package/lib/commonjs/sidebar/SidebarToolbar.js +28 -14
  152. package/lib/commonjs/sidebar/SidebarToolbar.js.map +1 -1
  153. package/lib/commonjs/text-field/TextField.js +13 -7
  154. package/lib/commonjs/text-field/TextField.js.map +1 -1
  155. package/lib/module/agent-avatar/AgentAvatar.js +16 -204
  156. package/lib/module/agent-avatar/AgentAvatar.js.map +1 -1
  157. package/lib/module/agent-avatar/AgentAvatarProvider.js +60 -0
  158. package/lib/module/agent-avatar/AgentAvatarProvider.js.map +1 -0
  159. package/lib/module/agent-avatar/CharacterAvatar.js +207 -0
  160. package/lib/module/agent-avatar/CharacterAvatar.js.map +1 -0
  161. package/lib/module/agent-avatar/ProceduralAvatar.js +212 -0
  162. package/lib/module/agent-avatar/ProceduralAvatar.js.map +1 -0
  163. package/lib/module/agent-avatar/artwork.js +3 -3
  164. package/lib/module/agent-avatar/artwork.js.map +1 -1
  165. package/lib/module/agent-avatar/avatar-color.js +12 -0
  166. package/lib/module/agent-avatar/avatar-color.js.map +1 -0
  167. package/lib/module/agent-avatar/character-html.js +19 -0
  168. package/lib/module/agent-avatar/character-html.js.map +1 -0
  169. package/lib/module/agent-avatar/character-runtime-module.js +35 -0
  170. package/lib/module/agent-avatar/character-runtime-module.js.map +1 -0
  171. package/lib/module/agent-avatar/character-webview.js +14 -0
  172. package/lib/module/agent-avatar/character-webview.js.map +1 -0
  173. package/lib/module/agent-avatar/config-character.js +32 -0
  174. package/lib/module/agent-avatar/config-character.js.map +1 -0
  175. package/lib/module/agent-avatar/context.js +2 -0
  176. package/lib/module/agent-avatar/context.js.map +1 -1
  177. package/lib/module/agent-avatar/index.js +1 -0
  178. package/lib/module/agent-avatar/index.js.map +1 -1
  179. package/lib/module/agent-avatar/legacy-contours.js +53 -0
  180. package/lib/module/agent-avatar/legacy-contours.js.map +1 -0
  181. package/lib/module/agent-avatar/legacy-recipe.js +104 -0
  182. package/lib/module/agent-avatar/legacy-recipe.js.map +1 -0
  183. package/lib/module/agent-avatar/messages.js +2 -1
  184. package/lib/module/agent-avatar/messages.js.map +1 -1
  185. package/lib/module/agent-avatar/model.js +2 -0
  186. package/lib/module/agent-avatar/model.js.map +1 -1
  187. package/lib/module/agent-creator/AgentCreatorBase.js +242 -18
  188. package/lib/module/agent-creator/AgentCreatorBase.js.map +1 -1
  189. package/lib/module/agent-creator/CharacterControls.js +110 -0
  190. package/lib/module/agent-creator/CharacterControls.js.map +1 -0
  191. package/lib/module/agent-creator/EmotionPicker.js +52 -19
  192. package/lib/module/agent-creator/EmotionPicker.js.map +1 -1
  193. package/lib/module/agent-creator/ShapeArc.js +58 -28
  194. package/lib/module/agent-creator/ShapeArc.js.map +1 -1
  195. package/lib/module/agent-creator/ShapeSilhouette.js +57 -0
  196. package/lib/module/agent-creator/ShapeSilhouette.js.map +1 -0
  197. package/lib/module/agent-creator/constants.js +47 -0
  198. package/lib/module/agent-creator/constants.js.map +1 -1
  199. package/lib/module/agent-creator/messages.js +9 -0
  200. package/lib/module/agent-creator/messages.js.map +1 -1
  201. package/lib/module/agent-creator/shared.js +1 -9
  202. package/lib/module/agent-creator/shared.js.map +1 -1
  203. package/lib/module/agent-thinking/AgentThinking.js +5 -63
  204. package/lib/module/agent-thinking/AgentThinking.js.map +1 -1
  205. package/lib/module/agent-thinking/ThinkingLabel.js +73 -0
  206. package/lib/module/agent-thinking/ThinkingLabel.js.map +1 -0
  207. package/lib/module/chart-cards/TokensChartCard.js +20 -5
  208. package/lib/module/chart-cards/TokensChartCard.js.map +1 -1
  209. package/lib/module/locale/translations/ar.js +11 -1
  210. package/lib/module/locale/translations/ar.js.map +1 -1
  211. package/lib/module/locale/translations/bn.js +11 -1
  212. package/lib/module/locale/translations/bn.js.map +1 -1
  213. package/lib/module/locale/translations/ca.js +11 -1
  214. package/lib/module/locale/translations/ca.js.map +1 -1
  215. package/lib/module/locale/translations/de.js +11 -1
  216. package/lib/module/locale/translations/de.js.map +1 -1
  217. package/lib/module/locale/translations/es.js +11 -1
  218. package/lib/module/locale/translations/es.js.map +1 -1
  219. package/lib/module/locale/translations/fr.js +11 -1
  220. package/lib/module/locale/translations/fr.js.map +1 -1
  221. package/lib/module/locale/translations/hi.js +11 -1
  222. package/lib/module/locale/translations/hi.js.map +1 -1
  223. package/lib/module/locale/translations/id.js +11 -1
  224. package/lib/module/locale/translations/id.js.map +1 -1
  225. package/lib/module/locale/translations/it.js +11 -1
  226. package/lib/module/locale/translations/it.js.map +1 -1
  227. package/lib/module/locale/translations/ja.js +11 -1
  228. package/lib/module/locale/translations/ja.js.map +1 -1
  229. package/lib/module/locale/translations/pt.js +11 -1
  230. package/lib/module/locale/translations/pt.js.map +1 -1
  231. package/lib/module/locale/translations/ru.js +11 -1
  232. package/lib/module/locale/translations/ru.js.map +1 -1
  233. package/lib/module/locale/translations/tr.js +11 -1
  234. package/lib/module/locale/translations/tr.js.map +1 -1
  235. package/lib/module/locale/translations/zh.js +11 -1
  236. package/lib/module/locale/translations/zh.js.map +1 -1
  237. package/lib/module/multi-agent-chat/AvatarHandoff.js +3 -5
  238. package/lib/module/multi-agent-chat/AvatarHandoff.js.map +1 -1
  239. package/lib/module/multi-agent-chat/ChatAgentProfile.js +94 -0
  240. package/lib/module/multi-agent-chat/ChatAgentProfile.js.map +1 -0
  241. package/lib/module/multi-agent-chat/EditorRail.js +4 -0
  242. package/lib/module/multi-agent-chat/EditorRail.js.map +1 -1
  243. package/lib/module/multi-agent-chat/MultiAgentChatBase.js +89 -126
  244. package/lib/module/multi-agent-chat/MultiAgentChatBase.js.map +1 -1
  245. package/lib/module/multi-agent-chat/ReplyRow.js +9 -12
  246. package/lib/module/multi-agent-chat/ReplyRow.js.map +1 -1
  247. package/lib/module/multi-agent-chat/handoff.js +4 -4
  248. package/lib/module/multi-agent-chat/handoff.js.map +1 -1
  249. package/lib/module/project-board/CreateTicketDialog.js +33 -2
  250. package/lib/module/project-board/CreateTicketDialog.js.map +1 -1
  251. package/lib/module/project-board/ProjectBoardBase.js +138 -39
  252. package/lib/module/project-board/ProjectBoardBase.js.map +1 -1
  253. package/lib/module/project-board/TicketCornerGenieSurface.web.js +35 -29
  254. package/lib/module/project-board/TicketCornerGenieSurface.web.js.map +1 -1
  255. package/lib/module/project-board/TicketDetailDialog.js +7 -4
  256. package/lib/module/project-board/TicketDetailDialog.js.map +1 -1
  257. package/lib/module/project-board/TicketGenieSurface.js +17 -7
  258. package/lib/module/project-board/TicketGenieSurface.js.map +1 -1
  259. package/lib/module/project-board/TicketGenieSurface.web.js +1 -1
  260. package/lib/module/project-board/TicketGenieSurface.web.js.map +1 -1
  261. package/lib/module/project-board/TicketPresence.js +119 -0
  262. package/lib/module/project-board/TicketPresence.js.map +1 -0
  263. package/lib/module/project-board/TicketTokenChart.js +20 -0
  264. package/lib/module/project-board/TicketTokenChart.js.map +1 -0
  265. package/lib/module/project-board/context.js +2 -0
  266. package/lib/module/project-board/context.js.map +1 -1
  267. package/lib/module/search/Search.js +12 -3
  268. package/lib/module/search/Search.js.map +1 -1
  269. package/lib/module/sidebar/SidebarToolbar.js +29 -15
  270. package/lib/module/sidebar/SidebarToolbar.js.map +1 -1
  271. package/lib/module/text-field/TextField.js +13 -7
  272. package/lib/module/text-field/TextField.js.map +1 -1
  273. package/lib/typescript/commonjs/agent-avatar/AgentAvatar.d.ts +2 -2
  274. package/lib/typescript/commonjs/agent-avatar/AgentAvatar.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/agent-avatar/AgentAvatarProvider.d.ts +4 -0
  276. package/lib/typescript/commonjs/agent-avatar/AgentAvatarProvider.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/agent-avatar/CharacterAvatar.d.ts +4 -0
  278. package/lib/typescript/commonjs/agent-avatar/CharacterAvatar.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/agent-avatar/ProceduralAvatar.d.ts +6 -0
  280. package/lib/typescript/commonjs/agent-avatar/ProceduralAvatar.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/agent-avatar/artwork.d.ts +2 -1
  282. package/lib/typescript/commonjs/agent-avatar/artwork.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/agent-avatar/avatar-color.d.ts +3 -0
  284. package/lib/typescript/commonjs/agent-avatar/avatar-color.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/agent-avatar/character-html.d.ts +4 -0
  286. package/lib/typescript/commonjs/agent-avatar/character-html.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/agent-avatar/character-runtime-module.d.ts +2 -0
  288. package/lib/typescript/commonjs/agent-avatar/character-runtime-module.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/agent-avatar/character-webview.d.ts +24 -0
  290. package/lib/typescript/commonjs/agent-avatar/character-webview.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/agent-avatar/config-character.d.ts +11 -0
  292. package/lib/typescript/commonjs/agent-avatar/config-character.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/agent-avatar/context.d.ts +12 -0
  294. package/lib/typescript/commonjs/agent-avatar/context.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/agent-avatar/index.d.ts +3 -1
  296. package/lib/typescript/commonjs/agent-avatar/index.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/agent-avatar/legacy-contours.d.ts +5 -0
  298. package/lib/typescript/commonjs/agent-avatar/legacy-contours.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/agent-avatar/legacy-recipe.d.ts +40 -0
  300. package/lib/typescript/commonjs/agent-avatar/legacy-recipe.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/agent-avatar/messages.d.ts +1 -0
  302. package/lib/typescript/commonjs/agent-avatar/messages.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/agent-avatar/model.d.ts +3 -0
  304. package/lib/typescript/commonjs/agent-avatar/model.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/agent-avatar/types.d.ts +10 -1
  306. package/lib/typescript/commonjs/agent-avatar/types.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/agent-creator/AgentCreatorBase.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/agent-creator/CharacterControls.d.ts +8 -0
  309. package/lib/typescript/commonjs/agent-creator/CharacterControls.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/agent-creator/EmotionPicker.d.ts +12 -1
  311. package/lib/typescript/commonjs/agent-creator/EmotionPicker.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/agent-creator/ShapeArc.d.ts +11 -2
  313. package/lib/typescript/commonjs/agent-creator/ShapeArc.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/agent-creator/ShapeSilhouette.d.ts +6 -0
  315. package/lib/typescript/commonjs/agent-creator/ShapeSilhouette.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/agent-creator/constants.d.ts +44 -0
  317. package/lib/typescript/commonjs/agent-creator/constants.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/agent-creator/context.d.ts +9 -0
  319. package/lib/typescript/commonjs/agent-creator/context.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/agent-creator/messages.d.ts +10 -0
  321. package/lib/typescript/commonjs/agent-creator/messages.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/agent-creator/shared.d.ts +1 -1
  323. package/lib/typescript/commonjs/agent-creator/shared.d.ts.map +1 -1
  324. package/lib/typescript/commonjs/agent-thinking/AgentThinking.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/agent-thinking/ThinkingLabel.d.ts +7 -0
  326. package/lib/typescript/commonjs/agent-thinking/ThinkingLabel.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/chart-cards/TokensChartCard.d.ts +3 -1
  328. package/lib/typescript/commonjs/chart-cards/TokensChartCard.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
  330. package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/multi-agent-chat/AvatarHandoff.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/multi-agent-chat/ChatAgentProfile.d.ts +11 -0
  345. package/lib/typescript/commonjs/multi-agent-chat/ChatAgentProfile.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/multi-agent-chat/EditorRail.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/multi-agent-chat/ReplyRow.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/multi-agent-chat/handoff.d.ts +2 -2
  350. package/lib/typescript/commonjs/multi-agent-chat/handoff.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/project-board/CreateTicketDialog.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/project-board/ProjectBoardBase.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/project-board/TicketDetailDialog.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/project-board/TicketGenieSurface.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/project-board/TicketPresence.d.ts +17 -0
  357. package/lib/typescript/commonjs/project-board/TicketPresence.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/project-board/TicketTokenChart.d.ts +5 -0
  359. package/lib/typescript/commonjs/project-board/TicketTokenChart.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/project-board/context.d.ts +2 -0
  361. package/lib/typescript/commonjs/project-board/context.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/search/Search.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/text-field/TextField.d.ts.map +1 -1
  365. package/lib/typescript/module/agent-avatar/AgentAvatar.d.ts +2 -2
  366. package/lib/typescript/module/agent-avatar/AgentAvatar.d.ts.map +1 -1
  367. package/lib/typescript/module/agent-avatar/AgentAvatarProvider.d.ts +4 -0
  368. package/lib/typescript/module/agent-avatar/AgentAvatarProvider.d.ts.map +1 -0
  369. package/lib/typescript/module/agent-avatar/CharacterAvatar.d.ts +4 -0
  370. package/lib/typescript/module/agent-avatar/CharacterAvatar.d.ts.map +1 -0
  371. package/lib/typescript/module/agent-avatar/ProceduralAvatar.d.ts +6 -0
  372. package/lib/typescript/module/agent-avatar/ProceduralAvatar.d.ts.map +1 -0
  373. package/lib/typescript/module/agent-avatar/artwork.d.ts +2 -1
  374. package/lib/typescript/module/agent-avatar/artwork.d.ts.map +1 -1
  375. package/lib/typescript/module/agent-avatar/avatar-color.d.ts +3 -0
  376. package/lib/typescript/module/agent-avatar/avatar-color.d.ts.map +1 -0
  377. package/lib/typescript/module/agent-avatar/character-html.d.ts +4 -0
  378. package/lib/typescript/module/agent-avatar/character-html.d.ts.map +1 -0
  379. package/lib/typescript/module/agent-avatar/character-runtime-module.d.ts +2 -0
  380. package/lib/typescript/module/agent-avatar/character-runtime-module.d.ts.map +1 -0
  381. package/lib/typescript/module/agent-avatar/character-webview.d.ts +24 -0
  382. package/lib/typescript/module/agent-avatar/character-webview.d.ts.map +1 -0
  383. package/lib/typescript/module/agent-avatar/config-character.d.ts +11 -0
  384. package/lib/typescript/module/agent-avatar/config-character.d.ts.map +1 -0
  385. package/lib/typescript/module/agent-avatar/context.d.ts +12 -0
  386. package/lib/typescript/module/agent-avatar/context.d.ts.map +1 -1
  387. package/lib/typescript/module/agent-avatar/index.d.ts +3 -1
  388. package/lib/typescript/module/agent-avatar/index.d.ts.map +1 -1
  389. package/lib/typescript/module/agent-avatar/legacy-contours.d.ts +5 -0
  390. package/lib/typescript/module/agent-avatar/legacy-contours.d.ts.map +1 -0
  391. package/lib/typescript/module/agent-avatar/legacy-recipe.d.ts +40 -0
  392. package/lib/typescript/module/agent-avatar/legacy-recipe.d.ts.map +1 -0
  393. package/lib/typescript/module/agent-avatar/messages.d.ts +1 -0
  394. package/lib/typescript/module/agent-avatar/messages.d.ts.map +1 -1
  395. package/lib/typescript/module/agent-avatar/model.d.ts +3 -0
  396. package/lib/typescript/module/agent-avatar/model.d.ts.map +1 -1
  397. package/lib/typescript/module/agent-avatar/types.d.ts +10 -1
  398. package/lib/typescript/module/agent-avatar/types.d.ts.map +1 -1
  399. package/lib/typescript/module/agent-creator/AgentCreatorBase.d.ts.map +1 -1
  400. package/lib/typescript/module/agent-creator/CharacterControls.d.ts +8 -0
  401. package/lib/typescript/module/agent-creator/CharacterControls.d.ts.map +1 -0
  402. package/lib/typescript/module/agent-creator/EmotionPicker.d.ts +12 -1
  403. package/lib/typescript/module/agent-creator/EmotionPicker.d.ts.map +1 -1
  404. package/lib/typescript/module/agent-creator/ShapeArc.d.ts +11 -2
  405. package/lib/typescript/module/agent-creator/ShapeArc.d.ts.map +1 -1
  406. package/lib/typescript/module/agent-creator/ShapeSilhouette.d.ts +6 -0
  407. package/lib/typescript/module/agent-creator/ShapeSilhouette.d.ts.map +1 -0
  408. package/lib/typescript/module/agent-creator/constants.d.ts +44 -0
  409. package/lib/typescript/module/agent-creator/constants.d.ts.map +1 -1
  410. package/lib/typescript/module/agent-creator/context.d.ts +9 -0
  411. package/lib/typescript/module/agent-creator/context.d.ts.map +1 -1
  412. package/lib/typescript/module/agent-creator/messages.d.ts +10 -0
  413. package/lib/typescript/module/agent-creator/messages.d.ts.map +1 -1
  414. package/lib/typescript/module/agent-creator/shared.d.ts +1 -1
  415. package/lib/typescript/module/agent-creator/shared.d.ts.map +1 -1
  416. package/lib/typescript/module/agent-thinking/AgentThinking.d.ts.map +1 -1
  417. package/lib/typescript/module/agent-thinking/ThinkingLabel.d.ts +7 -0
  418. package/lib/typescript/module/agent-thinking/ThinkingLabel.d.ts.map +1 -0
  419. package/lib/typescript/module/chart-cards/TokensChartCard.d.ts +3 -1
  420. package/lib/typescript/module/chart-cards/TokensChartCard.d.ts.map +1 -1
  421. package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
  422. package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
  423. package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
  424. package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
  425. package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
  426. package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
  427. package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
  428. package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
  429. package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
  430. package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
  431. package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
  432. package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
  433. package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
  434. package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
  435. package/lib/typescript/module/multi-agent-chat/AvatarHandoff.d.ts.map +1 -1
  436. package/lib/typescript/module/multi-agent-chat/ChatAgentProfile.d.ts +11 -0
  437. package/lib/typescript/module/multi-agent-chat/ChatAgentProfile.d.ts.map +1 -0
  438. package/lib/typescript/module/multi-agent-chat/EditorRail.d.ts.map +1 -1
  439. package/lib/typescript/module/multi-agent-chat/MultiAgentChatBase.d.ts.map +1 -1
  440. package/lib/typescript/module/multi-agent-chat/ReplyRow.d.ts.map +1 -1
  441. package/lib/typescript/module/multi-agent-chat/handoff.d.ts +2 -2
  442. package/lib/typescript/module/multi-agent-chat/handoff.d.ts.map +1 -1
  443. package/lib/typescript/module/project-board/CreateTicketDialog.d.ts.map +1 -1
  444. package/lib/typescript/module/project-board/ProjectBoardBase.d.ts.map +1 -1
  445. package/lib/typescript/module/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
  446. package/lib/typescript/module/project-board/TicketDetailDialog.d.ts.map +1 -1
  447. package/lib/typescript/module/project-board/TicketGenieSurface.d.ts.map +1 -1
  448. package/lib/typescript/module/project-board/TicketPresence.d.ts +17 -0
  449. package/lib/typescript/module/project-board/TicketPresence.d.ts.map +1 -0
  450. package/lib/typescript/module/project-board/TicketTokenChart.d.ts +5 -0
  451. package/lib/typescript/module/project-board/TicketTokenChart.d.ts.map +1 -0
  452. package/lib/typescript/module/project-board/context.d.ts +2 -0
  453. package/lib/typescript/module/project-board/context.d.ts.map +1 -1
  454. package/lib/typescript/module/search/Search.d.ts.map +1 -1
  455. package/lib/typescript/module/sidebar/SidebarToolbar.d.ts.map +1 -1
  456. package/lib/typescript/module/text-field/TextField.d.ts.map +1 -1
  457. package/package.json +8 -3
  458. package/src/agent-avatar/AgentAvatar.tsx +16 -296
  459. package/src/agent-avatar/AgentAvatarProvider.tsx +72 -0
  460. package/src/agent-avatar/CharacterAvatar.tsx +255 -0
  461. package/src/agent-avatar/ProceduralAvatar.tsx +303 -0
  462. package/src/agent-avatar/artwork.ts +3 -3
  463. package/src/agent-avatar/avatar-color.ts +17 -0
  464. package/src/agent-avatar/character-html.ts +21 -0
  465. package/src/agent-avatar/character-runtime-module.ts +37 -0
  466. package/src/agent-avatar/character-webview.ts +24 -0
  467. package/src/agent-avatar/config-character.ts +40 -0
  468. package/src/agent-avatar/context.ts +13 -0
  469. package/src/agent-avatar/index.ts +4 -1
  470. package/src/agent-avatar/legacy-contours.ts +76 -0
  471. package/src/agent-avatar/legacy-recipe.ts +123 -0
  472. package/src/agent-avatar/messages.ts +1 -0
  473. package/src/agent-avatar/model.ts +5 -0
  474. package/src/agent-avatar/types.ts +12 -1
  475. package/src/agent-creator/AgentCreatorBase.tsx +329 -38
  476. package/src/agent-creator/CharacterControls.tsx +146 -0
  477. package/src/agent-creator/EmotionPicker.tsx +43 -21
  478. package/src/agent-creator/ShapeArc.tsx +83 -29
  479. package/src/agent-creator/ShapeSilhouette.tsx +65 -0
  480. package/src/agent-creator/constants.ts +30 -0
  481. package/src/agent-creator/messages.ts +19 -0
  482. package/src/agent-creator/shared.ts +1 -15
  483. package/src/agent-thinking/AgentThinking.tsx +7 -70
  484. package/src/agent-thinking/ThinkingLabel.tsx +74 -0
  485. package/src/chart-cards/TokensChartCard.tsx +10 -6
  486. package/src/locale/translations/ar.ts +10 -1
  487. package/src/locale/translations/bn.ts +10 -1
  488. package/src/locale/translations/ca.ts +10 -1
  489. package/src/locale/translations/de.ts +10 -1
  490. package/src/locale/translations/es.ts +10 -1
  491. package/src/locale/translations/fr.ts +10 -1
  492. package/src/locale/translations/hi.ts +10 -1
  493. package/src/locale/translations/id.ts +10 -1
  494. package/src/locale/translations/it.ts +10 -1
  495. package/src/locale/translations/ja.ts +10 -1
  496. package/src/locale/translations/pt.ts +10 -1
  497. package/src/locale/translations/ru.ts +10 -1
  498. package/src/locale/translations/tr.ts +10 -1
  499. package/src/locale/translations/zh.ts +10 -1
  500. package/src/multi-agent-chat/AvatarHandoff.tsx +2 -5
  501. package/src/multi-agent-chat/ChatAgentProfile.tsx +116 -0
  502. package/src/multi-agent-chat/EditorRail.tsx +2 -0
  503. package/src/multi-agent-chat/MultiAgentChatBase.tsx +123 -175
  504. package/src/multi-agent-chat/ReplyRow.tsx +10 -9
  505. package/src/multi-agent-chat/handoff.ts +4 -4
  506. package/src/project-board/CreateTicketDialog.tsx +28 -4
  507. package/src/project-board/ProjectBoardBase.tsx +115 -21
  508. package/src/project-board/TicketCornerGenieSurface.web.tsx +11 -6
  509. package/src/project-board/TicketDetailDialog.tsx +5 -4
  510. package/src/project-board/TicketGenieSurface.tsx +9 -0
  511. package/src/project-board/TicketGenieSurface.web.tsx +1 -1
  512. package/src/project-board/TicketPresence.tsx +137 -0
  513. package/src/project-board/TicketTokenChart.tsx +14 -0
  514. package/src/project-board/context.ts +2 -0
  515. package/src/search/Search.tsx +6 -5
  516. package/src/sidebar/SidebarToolbar.tsx +27 -15
  517. package/src/text-field/TextField.tsx +12 -7
@@ -113,9 +113,9 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
113
113
  | `activity-heatmap` | `@oxy.so/bloom/activity-heatmap` + barrel | universal | `activity-heatmap.mdx` | yes | 1 | | | | |
114
114
  | `address` | `@oxy.so/bloom/address` + barrel | universal | `address.mdx` | yes | 2 | n/a¹ | | | |
115
115
  | `admonition` | `@oxy.so/bloom/admonition` + barrel | universal | `admonition.mdx` | yes | 1 | | | | |
116
- | `agent-avatar` | `@oxy.so/bloom/agent-avatar` + barrel | universal | `agent-avatar.mdx` | yes | 9 | | | | |
116
+ | `agent-avatar` | `@oxy.so/bloom/agent-avatar` + barrel | universal | `agent-avatar.mdx` | yes | 14 | | | | |
117
117
  | `agent-chat` | `@oxy.so/bloom/agent-chat` + barrel | web fork | `agent-chat.mdx` | yes | 3 | n/a¹ | | | reads |
118
- | `agent-creator` | `@oxy.so/bloom/agent-creator` + barrel | web fork | `agent-creator.mdx` | yes | 4 | reads | | | |
118
+ | `agent-creator` | `@oxy.so/bloom/agent-creator` + barrel | web fork | `agent-creator.mdx` | yes | 5 | reads | | | |
119
119
  | `agent-limits-card` | `@oxy.so/bloom/agent-limits-card` + barrel | universal | `agent-limits-card.mdx` | yes | 2 | | | | reads |
120
120
  | `agent-log` | `@oxy.so/bloom/agent-log` + barrel | universal | `agent-log.mdx` | yes | 1 | | | | |
121
121
  | `agent-progress` | `@oxy.so/bloom/agent-progress` + barrel | universal | `agent-progress.mdx` | yes | 2 | | | | reads |
@@ -192,7 +192,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
192
192
  | `hooks` | `@oxy.so/bloom/hooks` + barrel | universal | `hooks.mdx` | yes | 12 | | | | reads |
193
193
  | `hover-card` | `@oxy.so/bloom/hover-card` + barrel | web fork | `hover-card.mdx` | yes | 4 | | | reads | reads |
194
194
  | `icon-circle` | `@oxy.so/bloom/icon-circle` + barrel | universal | `icon-circle.mdx` | yes | 1 | | | | |
195
- | `icons` | `@oxy.so/bloom/icons` + barrel | universal | `icons.mdx` | yes | 59 | | | | |
195
+ | `icons` | `@oxy.so/bloom/icons` + barrel | universal | `icons.mdx` | yes | 60 | | | | |
196
196
  | `image-aspect-ratio-cache` | `@oxy.so/bloom/image-aspect-ratio-cache` + barrel | universal | `image-aspect-ratio-cache.mdx` | yes | 1 | | | | |
197
197
  | `image-resolver` | `@oxy.so/bloom/image-resolver` + barrel | universal | `image-resolver.mdx` | yes | 8 | | | | |
198
198
  | `important-alerts-card` | `@oxy.so/bloom/important-alerts-card` + barrel | universal | `important-alerts-card.mdx` | yes | 1 | | | | |
@@ -260,7 +260,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
260
260
  | `pressable-scale` | `@oxy.so/bloom/pressable-scale` + barrel | universal | `pressable-scale.mdx` | yes | 1 | | | | |
261
261
  | `price-breakdown` | `@oxy.so/bloom/price-breakdown` + barrel | universal | `price-breakdown.mdx` | yes | 3 | | | | reads |
262
262
  | `progressive-blur` | `@oxy.so/bloom/progressive-blur` + barrel | web fork | `progressive-blur.mdx` | yes | 1 | | | | |
263
- | `project-board` | `@oxy.so/bloom/project-board` + barrel | web fork | `project-board.mdx` | yes | 1 | | | | |
263
+ | `project-board` | `@oxy.so/bloom/project-board` + barrel | web fork | `project-board.mdx` | yes | 2 | | | | |
264
264
  | `proof-of-delivery` | `@oxy.so/bloom/proof-of-delivery` + barrel | universal | `proof-of-delivery.mdx` | yes | 1 | | | | reads |
265
265
  | `property-insights` | `@oxy.so/bloom/property-insights` + barrel | universal | `property-insights.mdx` | yes | 5 | | | | reads |
266
266
  | `provider` | `@oxy.so/bloom/provider` | universal | `provider.mdx` | yes | 3 | | | | |
@@ -274,9 +274,9 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
274
274
  | `route-stops` | `@oxy.so/bloom/route-stops` + barrel | universal | `route-stops.mdx` | yes | 2 | | | | |
275
275
  | `screen` | `@oxy.so/bloom/screen` + barrel | universal | `screen.mdx` | yes | 5 | | | | |
276
276
  | `scroll` | `@oxy.so/bloom/scroll` + barrel | web fork | `scroll.mdx` | yes | 5 | | | | |
277
- | `search` | `@oxy.so/bloom/search` + barrel | universal | `search.mdx` | yes | 3 | | | | |
277
+ | `search` | `@oxy.so/bloom/search` + barrel | universal | `search.mdx` | yes | 4 | | | | |
278
278
  | `segmented-control` | `@oxy.so/bloom/segmented-control` + barrel | universal | `segmented-control.mdx` | yes | 4 | reads | reads | | |
279
- | `select` | `@oxy.so/bloom/select` + barrel | web fork | `select.mdx` | yes | 10 | reads | reads | reads | reads |
279
+ | `select` | `@oxy.so/bloom/select` + barrel | web fork | `select.mdx` | yes | 11 | reads | reads | reads | reads |
280
280
  | `settings-list` | `@oxy.so/bloom/settings-list` + barrel | universal | `settings-list.mdx` | yes | 5 | | | | |
281
281
  | `settings-modal` | `@oxy.so/bloom/settings-modal` + barrel | universal | `settings-modal.mdx` | yes | 10 | | | | reads |
282
282
  | `shapes` | `@oxy.so/bloom/shapes` + barrel | universal | `shapes.mdx` | yes | 4 | | | | |
@@ -292,7 +292,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
292
292
  | `stay-search` | `@oxy.so/bloom/stay-search` + barrel | universal | `stay-search.mdx` | yes | 5 | | | | |
293
293
  | `stepper` | `@oxy.so/bloom/stepper` + barrel | universal | `stepper.mdx` | yes | 4 | reads | reads | | |
294
294
  | `sticker` | `@oxy.so/bloom/sticker` + barrel | web fork | `sticker.mdx` | yes | 1 | | | | |
295
- | `styles` | `@oxy.so/bloom/styles` + barrel | universal | `styles.mdx` | yes | 84 | n/a¹ | | | |
295
+ | `styles` | `@oxy.so/bloom/styles` + barrel | universal | `styles.mdx` | yes | 85 | n/a¹ | | | |
296
296
  | `subtle-hover` | `@oxy.so/bloom/subtle-hover` + barrel | universal | `subtle-hover.mdx` | yes | 1 | | | | |
297
297
  | `surface` | `@oxy.so/bloom/surface` + barrel | web fork | `surface.mdx` | yes | 38 | | | | |
298
298
  | `surfaces` | `@oxy.so/bloom/surfaces` + barrel | web fork | `alert.mdx` | yes | 3 | | | | |
@@ -305,9 +305,9 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
305
305
  | `task-list` | `@oxy.so/bloom/task-list` + barrel | universal | `task-list.mdx` | yes | 1 | | | | |
306
306
  | `teleport` | `@oxy.so/bloom/teleport` | universal | `teleport.mdx` | yes | 1 | | | | |
307
307
  | `tenancy` | `@oxy.so/bloom/tenancy` + barrel | universal | `tenancy.mdx` | yes | 5 | | reads | | |
308
- | `text-field` | `@oxy.so/bloom/text-field` + barrel | universal | `text-field.mdx` | yes | 16 | reads | reads | | |
308
+ | `text-field` | `@oxy.so/bloom/text-field` + barrel | universal | `text-field.mdx` | yes | 17 | reads | reads | | |
309
309
  | `textarea` | `@oxy.so/bloom/textarea` + barrel | universal | `textarea.mdx` | yes | 4 | reads | reads | | n/a¹ |
310
- | `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes | 351 | | | n/a¹ | reads |
310
+ | `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes | 353 | | | n/a¹ | reads |
311
311
  | `theme-toggle` | `@oxy.so/bloom/theme-toggle` + barrel | universal | `theme-toggle.mdx` | yes | 2 | n/a¹ | | | |
312
312
  | `toast` | `@oxy.so/bloom/toast` + barrel | universal | `toast.mdx` | yes | 17 | | | | |
313
313
  | `tooltip` | `@oxy.so/bloom/tooltip` + barrel | web fork | `tooltip.mdx` | yes | 1 | | | | |
@@ -1,24 +1,49 @@
1
1
  ---
2
2
  title: Agent Avatar
3
- description: Procedural agent artwork with editable recipes, expressions and motion.
3
+ description: Editable agent artwork and the recovered 3D character renderer.
4
4
  ---
5
5
 
6
6
  # Agent Avatar
7
7
 
8
- `AgentAvatar` draws the same artwork with `react-native-svg` on web, iOS and Android. Recipes retain their own colors when the application theme changes.
8
+ `AgentAvatar` uses the recovered original beta engine for its 3D characters. With an `AgentAvatarProvider`, existing recipes for the paper and blob silhouettes also render through that engine, retaining its fur, lighting, volume and animation. Circle, triangle, flower, diamond and heart reuse the engine’s corresponding shapes. Eight distinct bodies extend that catalog: pebble, squircle, slender, pocket, petal, star, cloud and shield. Their contours come from Bloom’s existing artwork; saved recipes do not need rewriting. All supported bodies use the original 3D eye catalog and animation.
9
9
 
10
10
  ```tsx
11
- import { AgentAvatar, FOLD_CONFIG } from '@oxy.so/bloom/agent-avatar';
12
-
13
- <AgentAvatar config={{ ...FOLD_CONFIG, eyes: 'curious', hue: 254 }} size={64} label="Peri" />
11
+ import { AgentAvatar, AgentAvatarProvider, FOLD_CONFIG } from '@oxy.so/bloom/agent-avatar';
12
+
13
+ <AgentAvatarProvider runtimeUrl="https://example.com/bloom-character/runtime.mjs">
14
+ <AgentAvatar
15
+ config={{ ...FOLD_CONFIG, character: {
16
+ preset: 'blue_beret', selections: { accessory: 'crown' },
17
+ } }}
18
+ size={128}
19
+ interactive
20
+ label="Peri"
21
+ />
22
+ </AgentAvatarProvider>
14
23
  ```
15
24
 
16
- `config` is an `AvatarConfig`. The published presets include blobs, folded paper and aliens; the original recipe schema also retains its mascot settings. The source artwork currently renders the mascot family through the blob silhouette and material path; outfit and activity settings have no additional renderer. `parsePreset` validates saved recipes and migrates older field values.
25
+ Host the package's complete `assets/character-runtime/` directory. The provider takes the URL of `runtime.mjs` and loads it only when an avatar is visible. The original generated engine files are preserved byte for byte with an integrity manifest. See the asset directory's README for provenance and source limitations.
26
+
27
+ ## Editing
28
+
29
+ The `character` recipe holds a `preset` and optional `selections` for shape, color, eyes, eyewear and accessory. Explicit selections override preset defaults. `none` removes eyewear or an accessory. The editor reads the engine's actual selection and availability, including shape-dependent eye styles. Changing shape clears an explicit eye override so an unsupported pair is not restored.
30
+
31
+ The editor presents one shape catalog and one eye catalog through `ShapeArc` and `EmotionPicker`. The eye orbit offers the engine’s nine native styles for both original and migrated bodies, with unsupported combinations disabled. Migrated bodies default to the original oval eyes. Saved expression, eye-size, spacing and tilt fields no longer modify a migrated face; the engine owns its eye geometry and animation. The shared `GlossArt` palette and custom color picker edit either body source. Original presets keep their authored appearance until explicitly edited.
32
+
33
+ Alien avatars have been removed from the available catalog. Saved aliens, mascots and hidden-face recipes retain compatibility rendering. The shape selector shows static silhouettes without eyes or accessories: original catalog PNGs and cached SVG contours for migrated bodies. Paper grain and material effects become the engine’s 3D surface. Migrated bodies accept the original eyewear and accessory catalog. Headwear, Bulb, bow and Tuft use rigid contour anchors; eyewear and headphones retain their original placement. Original meshes, materials and fur remain intact.
34
+
35
+ ## Interaction and lifecycle
36
+
37
+ `interactive` enables the original engine's pointer tracking and touch/drag interaction. Change `reactionKey` from an accessible button to replay its authored signature reaction for an intact preset, or the original 3D wave for customized and migrated bodies. Shape changes retain the last painted frame while the new geometry prepares. Changing `workingKey` starts a working episode and then returns to the interactive mode; `workingCycles` controls its duration. The creator’s **React** and **Work** buttons preview these original animations for both original and migrated bodies.
38
+
39
+ `paused`, reduced motion and `motion: 0` stop animation after a complete appearance frame. `portrait` prepares a static thumbnail. The beta can report readiness while drawing transparency if initialized with its reduced-motion flag; the adapter waits for painted pixels and then freezes its clock instead.
40
+
41
+ Web shares the beta engine and one animation clock per document. Different migrated contours isolate their rendering modules because the recovered engine caches geometry by its original appearance key; they share one preparation worker. Unused contour modules are released. Animated characters each need a graphics surface. Use `portrait` for galleries and selectors. Static thumbnail preparation is serialized, retains a bounded cache and releases its graphics surface after painting. Offscreen/background avatars pause; unmount releases listeners and rendering resources.
17
42
 
18
- Change `entranceKey` to replay the curled arrival and `workingKey` to play a hop and full paper turn. `workingCycles` defaults to one. `paused`, reduced motion and `motion: 0` freeze animation; expression and explicit gaze changes still render. Sleeping agents use closed lids and four drifting sleep marks. The original `interactive` and `portrait` compatibility props remain reserved.
43
+ `className` and `style` apply to the outer layout node through Bloom's NativeWind wrapper. `label` defaults to the translated “Agent avatar”; `locale` overrides the scope and `accessibilityLabel` overrides the name. Prefer a meaningful name when the avatar identifies an agent.
19
44
 
20
- `className` and `style` apply to the outer layout node through Bloom's NativeWind wrapper. `label` defaults to the translated “Agent avatar” in the nearest locale scope (`locale` overrides it); `accessibilityLabel` overrides it. Prefer a meaningful name when the image identifies an agent.
45
+ ## Native and fallback
21
46
 
22
- The renderer preserves the original silhouettes, projection, expression springs, blink timing, attention, wandering, fold turns, shape morphs, gradient stops and deterministic grain tile. It updates drawing geometry on the JavaScript animation clock and pauses in the background or when outside the viewport on web. Large animated grids should be profiled on the target device.
47
+ The optional native bridge uses `react-native-webview` and requires an absolute runtime URL reachable by the device. Web is verified in Chrome; physical-device validation remains pending. Separate WebViews cannot share engine memory or graphics contexts.
23
48
 
24
- Grain uses the original seed-713 tile and `soft-light` compositing on isolated React Native view layers, shared with web. This requires the new native renderer and Android 10 or later; older native renderers do not implement this blend mode. Blob grain follows the original backing-pixel scale (capped at 2×), while paper grain follows the original CSS-pixel scale. Sleep marks retain the original `ui-rounded, system-ui, sans-serif` font stack; installed fonts can differ between platforms. Physical-device pixel comparisons remain necessary.
49
+ An unavailable runtime or missing native peer displays the translated unavailable state. Consumers without a runtime provider retain the universal SVG renderer for procedural recipes. That renderer preserves the original contours, folds, expression springs and deterministic grain; it does not support the beta's new 3D parts.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: AgentCreator
3
- description: Controlled agent profile editor with live avatar, emotion orbit, shape arc, custom color, and speech preferences.
3
+ description: Controlled agent profile editor with a live 3D avatar, eye orbit, shape arc, custom color, and speech preferences.
4
4
  order: 105
5
5
  ---
6
6
 
@@ -25,9 +25,17 @@ Mount under `BloomProvider` and give the editor a bounded height. Layout classes
25
25
 
26
26
  ## Appearance
27
27
 
28
- The preview is 162px. Sixteen upright expression chips orbit at a 116px radius; dragging or a mouse wheel rotates the orbit. Hover, focus, backgrounding and reduced motion pause automatic movement. The shape selector uses the source's 210px circular track, unbounded index, spring, drag and wheel geometry. Choose a silhouette by pressing it; keyboard arrows, Home and End select shapes on web. BloomProvider’s direction reverses horizontal movement in RTL.
28
+ The preview is 162px. With `AgentAvatarProvider`, one shape arc combines the eleven original engine shapes with eight distinct migrated bodies: pebble, squircle, slender, pocket, petal, star, cloud and shield. Equivalent circle, triangle, flower, diamond and heart recipes reuse the original geometry. Alien avatars have been removed from the available catalog and examples; saved alien recipes remain readable for compatibility.
29
29
 
30
- Nine glossy color presets preserve the avatar's other controls. The custom picker contains a saturation/brightness field, hue rail and hex entry; dark custom fills switch to light eyes. HSV state preserves the selected hue when the field reaches black or gray. Invalid hex input resets to the last emitted color. Speech and appearance edits preserve the agent's identity and unrelated fields.
30
+ The eye orbit offers nine original 3D eye styles for both body sources. Migrated bodies default to oval eyes; historical expression, eye-size, spacing and tilt settings no longer alter their faces. The engine owns eye geometry and animation, and its capabilities disable unsupported combinations. Changing shape clears an incompatible eye override. Original presets keep their authored eyes until explicitly edited.
31
+
32
+ Upright eye chips orbit at a 116px radius; dragging or a mouse wheel rotates the orbit. Hover, focus, backgrounding and reduced motion pause automatic movement. The shape selector uses a 210px circular track, an unbounded index, spring, drag and wheel geometry. Choose a silhouette by pressing it; keyboard arrows, Home and End select shapes on web. BloomProvider’s direction reverses horizontal movement in RTL.
33
+
34
+ Nine glossy color presets and the shared custom picker edit both original and migrated bodies. The picker contains a saturation/brightness field, hue rail and hex entry. HSV state preserves the selected hue when the field reaches black or gray; invalid hex input resets to the last emitted color. Choosing a named engine swatch clears its custom RGB override. Speech and appearance edits preserve the agent’s identity and unrelated fields.
35
+
36
+ The preview accepts pointer and touch reactions. **React** and **Work** buttons also support keyboard activation and preview the original engine’s animations on either body source. Working returns to the interactive preview after its episode. Eye chips and original shape chips use catalog PNG thumbnails. Migrated shape chips use cached static SVG silhouettes from their actual contours, matching the catalog’s flat pink artwork. The shape wheel renders no avatars or 3D canvases.
37
+
38
+ The preset selector provides authored characters; eyewear and accessories use Bloom Select on both original and migrated bodies. Explicit selections survive switching between these bodies. Headwear, Bulb, bow and Tuft attach to migrated contour anchors; eyewear and headphones keep their original placement. Intact presets retain their authored signature reaction; edited and migrated bodies use the original 3D wave. Catalog titles retain their original English names by default. Hosts can translate them through `labels.characterOption(category, id, title)`; control labels follow the editor locale. Consumers without a runtime provider retain compatibility rendering and controls for saved procedural recipes.
31
39
 
32
40
  ## Preferences and speech
33
41
 
@@ -39,7 +47,7 @@ Web previews use the browser's local device voice catalog and cancel playback wh
39
47
 
40
48
  ## Locale and shared primitives
41
49
 
42
- All fixed labels, hints, accessible names and picker values use the `AGENT_CREATOR_MESSAGES` catalog and Bloom’s 15 supported locales. `locale` overrides the root locale for this editor; `labels` overrides individual catalog entries. Agent names, descriptions and host voice names remain consumer data.
50
+ Fixed labels, hints and accessible control names use the `AGENT_CREATOR_MESSAGES` catalog and Bloom’s 15 supported locales. `locale` overrides the root locale for this editor; `labels` overrides individual catalog entries. Agent names, descriptions and host voice names remain consumer data.
43
51
 
44
52
  Profile inputs, textarea, select, switch, segmented control, close control and popover reuse Bloom’s current primitives. Original layout and interaction class chains are retained. Bloom’s active palette and materials supply their colors. The custom HSV picker reads `Field` membership: disabling the enclosing field disables its gestures, keyboard updates and hex input; field errors and descriptions associate with its inputs.
45
53
 
@@ -3,6 +3,11 @@
3
3
  `MultiAgentChat` combines individual and group conversations, the agent creator,
4
4
  animated avatars, an editable agent library and a demo marketplace.
5
5
 
6
+ The conversation header centers a 56px agent avatar above a 28px name capsule.
7
+ Press it to edit the active agent, or choose participants in a group chat. Long
8
+ names truncate within the available header width; navigation and conversation
9
+ actions keep their own hit areas on narrow screens.
10
+
6
11
  ```tsx
7
12
  import { MultiAgentChat } from '@oxy.so/bloom/multi-agent-chat';
8
13
 
@@ -67,3 +72,10 @@ geometry on web and native. NativeWind’s default 14px rem otherwise compiles
67
72
  `gap-2.5` to 8.75px rather than 10px; the installed preview also drops Metro’s
68
73
  `inlineRem` option on one export path. No consumer rem workaround is required
69
74
  for these component utilities: import Bloom’s generated theme/preset.
75
+
76
+ Browser checks for header alignment, keyboard editing, long names and sidebar
77
+ search transitions: `node scripts/verify-chat-interactions.mjs` against Storybook
78
+ on port 6006. Set `BLOOM_PLAYWRIGHT_MODULE` if Playwright is installed elsewhere.
79
+ The search width has one animation owner per platform: CSS on web and Reanimated
80
+ on native. Combining them restarts the CSS transition every frame and doubles
81
+ the observed opening time.
@@ -26,10 +26,10 @@ On web, Enter opens a ticket; space picks it up, arrows move it, space commits a
26
26
 
27
27
  ## Motion and verification
28
28
 
29
- The original Tailwind class recipes, custom SVG glyphs, empty-state geometry and reveal timing remain in the shared NativeWind content. The template preserves the original 272px drawer, 325ms reveal, 273px columns and shell insets while reusing Bloom’s current Sidebar. Buttons, chips, fields, selectors, menus, tooltips and charts compose Bloom 6.4 primitives. Palette and material follow the current Bloom theme.
29
+ The original Tailwind class recipes, custom SVG glyphs, empty-state geometry and reveal timing remain in the shared NativeWind content. Ticket presence expands/collapses the measured slot and its 6px gap over 320ms while fading, scaling between 0.7 and 1, and changing blur between 6px and 0. Initial tickets stay at rest. Removed tickets become inaccessible immediately; the gesture owner remains mounted through a long cross-column drag. Drops keep the visual overlay for the 320ms trip to the measured destination, hiding the resting card until arrival. Cancelling a cross-column preview restores the original columns. The template preserves the original 272px drawer, 325ms reveal, 273px columns and shell insets while reusing Bloom’s current Sidebar. Buttons, chips, fields, selectors, menus, tooltips and charts compose the current Bloom primitives. Palette and material follow the current Bloom theme.
30
30
 
31
- Web runs the original create Genie displacement field and the detail Genie’s cached perspective bands: live content remains interactive at rest; visual copies are inert and have rebased SVG IDs. The dialogs retain Bloom’s imperative lifecycle, focus handling and overlay stack through `presentation="custom"`. Entry/exit reverse from the current shape when interrupted and respect reduced motion.
31
+ Web runs the original create Genie displacement field and the detail Genie’s cached perspective bands: live content remains interactive at rest; visual copies are inert and have rebased SVG IDs. The dialogs retain Bloom’s imperative lifecycle, focus handling and overlay stack through `presentation="custom"`. Entry/exit reverse from the current shape when interrupted and respect reduced motion. Detail snapshots target Bloom’s shared chart SVG and rebase its paint references. Its plot reveal waits for the Genie handoff; `TokensChartCard animate={false}` paints the full plot without a reveal frame loop and changing back to `true` restarts from zero. Raw injected CSS uses normal selectors, including the dark shadow, rather than CSS-module syntax.
32
32
 
33
33
  React Native can animate the original stretch, scale, translation and timing through Reanimated, but it does not expose a View’s live pixels as `feDisplacementMap` input or DOM clipping bands. Those two pixel deformations remain specific to web. Native touch/paint behavior has not been verified on a physical device; platform CSS exports do not establish pixel equivalence.
34
34
 
35
- Chrome at 1440×900 compared the original and Bloom side by side: create measured 560×230px and detail 609×876px in both, with the original descriptions, people, resources, activity and token data. Real browser checks cover wide/compact, dark and RTL rendering, keyboard moves, creation, favorites, comments and Escape. Thirteen focused Jest cases cover data transitions, interactions and default/custom Dialog completion semantics. Browser keyboard capture is intentional because react-native-web consumes space before bubbling. Pointer dragging remains a separate browser check; the final scripted drag started from a card outside the horizontally scrolled viewport and did not establish a drop result.
35
+ Chrome at 1440×900 compared the original and Bloom side by side: create measured 560×230px and detail 609×876px in both, with the original descriptions, people, resources, activity and token data. Real browser checks cover wide/compact, dark and RTL rendering, keyboard moves, creation, favorites, comments and Escape. Thirteen focused Jest cases cover data transitions, interactions and default/custom Dialog completion semantics. Browser keyboard capture is intentional because react-native-web consumes space before bubbling. The polish browser checks now establish pointer drops within a column, across columns after holding for 1200ms, and outside-column cancellation; all finish without a residual overlay. These pointer checks cover LTR; RTL pointer dragging and edge auto-scroll remain unverified. At 390×844 the detail measures 374×828 with 8px outer insets. Native long creation forms have a bounded ScrollView that preserves submit taps. A local headless Chrome frame sample over 1.6 seconds measured 90 frames in the reference and 61 in Bloom, with maximum gaps of 103ms and 130ms respectively; equivalent geometry and timelines do not establish equal rendering performance.
@@ -3,212 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.AgentAvatar = AgentAvatar;
6
+ exports.AgentAvatar = void 0;
7
7
  var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _reactNativeReanimated = require("react-native-reanimated");
10
- var _messages = require("../locale/messages.js");
11
- var _styledPrimitives = require("../styles/styled-primitives.js");
12
- var _artwork = require("./artwork.js");
13
- var _attention = require("./attention.js");
14
- var _blink = require("./blink.js");
8
+ var _CharacterAvatar = require("./CharacterAvatar.js");
9
+ var _ProceduralAvatar = require("./ProceduralAvatar.js");
15
10
  var _context = require("./context.js");
16
- var _drawing = require("./drawing.js");
17
- var _entrance = require("./entrance.js");
18
- var _face = require("./face.js");
19
- var _messages2 = require("./messages.js");
20
- var _SvgDrawing = require("./SvgDrawing.js");
21
- var _wander = require("./wander.js");
22
- var _working = require("./working.js");
11
+ var _legacyRecipe = require("./legacy-recipe.js");
23
12
  var _jsxRuntime = require("react/jsx-runtime");
24
- const TAU = Math.PI * 2;
25
- const randomSeed = () => {
26
- if (globalThis.crypto?.getRandomValues) return globalThis.crypto.getRandomValues(new Uint32Array(1))[0];
27
- return Math.floor(Math.random() * 4294967296) >>> 0;
28
- };
29
-
30
- /** Animated procedural artwork; shared geometry, face rig and materials across platforms. */
31
- function AgentAvatar({
32
- config,
33
- size = 64,
34
- paused = false,
35
- label,
36
- locale,
37
- entranceKey,
38
- workingKey,
39
- workingCycles = 1,
40
- className,
41
- style,
42
- accessibilityLabel,
43
- testID
44
- }) {
13
+ /** Both catalogs use the recovered engine when their recipe is supported. */
14
+ const AgentAvatar = exports.AgentAvatar = /*#__PURE__*/(0, _react.memo)(function AgentAvatar(props) {
45
15
  const {
46
- messages
47
- } = (0, _messages.useMessages)(_messages2.AGENT_AVATAR_MESSAGES, locale);
48
- const initialReduced = (0, _reactNativeReanimated.useReducedMotion)();
49
- const [reduced, setReduced] = (0, _react.useState)(initialReduced);
50
- (0, _react.useEffect)(() => {
51
- const subscription = _reactNative.AccessibilityInfo.addEventListener('reduceMotionChanged', setReduced);
52
- const media = _reactNative.Platform.OS === 'web' && typeof matchMedia !== 'undefined' ? matchMedia('(prefers-reduced-motion: reduce)') : undefined;
53
- const change = () => setReduced(media.matches);
54
- media?.addEventListener('change', change);
55
- if (media) change();
56
- return () => {
57
- subscription?.remove?.();
58
- media?.removeEventListener('change', change);
59
- };
60
- }, []);
61
- const backingSize = Math.round(size * Math.min(_reactNative.PixelRatio.get() || 1, 2));
62
- const root = (0, _react.useRef)(null);
63
- const randomized = (0, _react.useRef)(false);
64
- const state = (0, _react.useRef)(null);
65
- if (!state.current) {
66
- const seed = config.seed >>> 0;
67
- state.current = {
68
- phase: seed / 4294967296 * TAU,
69
- blink: (0, _blink.createBlink)(seed),
70
- wander: (0, _wander.createWander)(seed ^ config.seed, config.family === 'fold'),
71
- attention: (0, _attention.createAttention)(seed ^ config.seed),
72
- shapeMorph: {
73
- started: 0,
74
- active: false
75
- },
76
- velocity: {},
77
- entrance: {
78
- elapsed: _entrance.ENTRANCE_SECONDS
79
- },
80
- working: {
81
- elapsed: _working.WORKING_SECONDS
82
- }
83
- };
84
- }
85
- const renderDrawing = () => {
86
- const context = new _drawing.DrawingContext(),
87
- s = state.current;
88
- const appearance = (0, _face.faceAtSize)(config, size),
89
- target = (0, _face.expressionRig)(appearance);
90
- (0, _artwork.drawAvatar)(context, appearance, s.phase, s.face ?? target, s.gaze ?? (0, _face.gazeAngles)(appearance, s.phase, target), size, s.entrance.elapsed, s.working.elapsed, undefined, Math.max(1, Math.floor(workingCycles)), backingSize);
91
- return context;
92
- };
93
- const [drawing, setDrawing] = (0, _react.useState)(renderDrawing);
94
- const observeDrawing = (0, _react.useContext)(_context.AvatarDrawingObserver);
95
- (0, _react.useLayoutEffect)(() => {
96
- observeDrawing?.(drawing);
97
- }, [observeDrawing, drawing]);
98
- (0, _react.useEffect)(() => {
99
- const s = state.current,
100
- cycles = Math.max(1, Math.floor(workingCycles));
101
- if (!randomized.current) {
102
- s.wander = (0, _wander.createWander)(randomSeed() ^ config.seed, config.family === 'fold');
103
- const seed = randomSeed();
104
- s.phase = seed / 4294967296 * TAU;
105
- s.blink = (0, _blink.createBlink)(seed);
106
- s.attention = (0, _attention.createAttention)(randomSeed() ^ config.seed);
107
- randomized.current = true;
108
- }
109
- const duration = _working.WORKING_SECONDS * cycles,
110
- appearance = (0, _face.faceAtSize)(config, size),
111
- target = (0, _face.expressionRig)(appearance);
112
- if (s.entrance.key !== entranceKey) s.entrance = {
113
- key: entranceKey,
114
- elapsed: entranceKey === undefined || paused ? _entrance.ENTRANCE_SECONDS : 0
115
- };
116
- if (s.working.key !== workingKey) {
117
- s.working = {
118
- key: workingKey,
119
- elapsed: workingKey === undefined || paused ? duration : 0
120
- };
121
- if (workingKey !== undefined) s.entrance.elapsed = _entrance.ENTRANCE_SECONDS;
122
- }
123
- if (config.idle || workingKey === undefined) s.working.elapsed = duration;
124
- s.expression ??= s.face ?? target;
125
- s.face ??= target;
126
- s.gaze ??= (0, _face.gazeAngles)(appearance, s.phase, target, s.wander.point);
127
- const frozen = paused || reduced || config.motion === 0;
128
- if (reduced || config.motion === 0) {
129
- s.entrance.elapsed = _entrance.ENTRANCE_SECONDS;
130
- s.working.elapsed = duration;
131
- }
132
- if (frozen) {
133
- s.shapeMorph = {
134
- started: 0,
135
- active: false
136
- };
137
- s.face = target;
138
- s.expression = target;
139
- s.velocity = {};
140
- if (!paused || config.lookAt !== 'wander') s.gaze = (0, _face.gazeAngles)(appearance, s.phase, target, s.wander.point);
141
- }
142
- const draw = () => {
143
- const context = new _drawing.DrawingContext();
144
- (0, _artwork.drawAvatar)(context, appearance, s.phase, s.face, s.gaze, size, s.entrance.elapsed, s.working.elapsed, frozen ? undefined : s.shapeMorph, cycles, backingSize);
145
- setDrawing(context);
146
- };
147
- let frame = 0,
148
- last = 0,
149
- visible = true,
150
- active = _reactNative.AppState.currentState !== 'background',
151
- transitioning = true;
152
- const tick = now => {
153
- if (!last) last = now;
154
- if (now - last >= (transitioning ? 16 : 32)) {
155
- if (visible && active) {
156
- const milliseconds = Math.min(now - last, 64),
157
- seconds = milliseconds / 1000;
158
- s.entrance.elapsed = Math.min(_entrance.ENTRANCE_SECONDS, s.entrance.elapsed + seconds);
159
- s.working.elapsed = Math.min(duration, s.working.elapsed + seconds);
160
- const base = (0, _face.easeFace)(s.expression ?? target, target, s.velocity, seconds);
161
- s.expression = base;
162
- transitioning = Object.keys(target).some(key => base[key] !== target[key]) || s.shapeMorph.active;
163
- s.face = config.family === 'fold' || base.smile > 0.2 ? (0, _attention.advanceAttention)(s.attention, seconds * 8 / config.duration, base, appearance) : base;
164
- s.face.blink = config.idle ? 1 : (0, _blink.advanceBlink)(s.blink, seconds);
165
- transitioning ||= s.blink.blinking;
166
- s.phase = (s.phase + seconds * TAU / config.duration) % TAU;
167
- if (!config.idle && config.lookAt === 'wander') (0, _wander.advanceWander)(s.wander, seconds * 8 / config.duration, config.family === 'fold');
168
- const aim = (0, _face.gazeAngles)(appearance, s.phase, s.face, s.wander.point),
169
- ease = 1 - Math.exp(-milliseconds / 85);
170
- s.gaze = [s.gaze[0] + (aim[0] - s.gaze[0]) * ease, s.gaze[1] + (aim[1] - s.gaze[1]) * ease];
171
- draw();
172
- }
173
- last = now;
174
- }
175
- frame = requestAnimationFrame(tick);
176
- };
177
- const subscription = _reactNative.AppState.addEventListener('change', next => {
178
- active = next === 'active';
179
- last = 0;
180
- });
181
- let observer;
182
- if (_reactNative.Platform.OS === 'web' && typeof IntersectionObserver !== 'undefined' && root.current instanceof Element) {
183
- observer = new IntersectionObserver(entries => {
184
- visible = entries[0]?.isIntersecting ?? true;
185
- });
186
- observer.observe(root.current);
187
- }
188
- draw();
189
- if (!frozen) frame = requestAnimationFrame(tick);
190
- return () => {
191
- cancelAnimationFrame(frame);
192
- subscription?.remove?.();
193
- observer?.disconnect();
194
- };
195
- }, [config, size, backingSize, paused, reduced, entranceKey, workingKey, workingCycles]);
196
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledPrimitives.StyledView, {
197
- ref: root,
198
- className: className,
199
- style: [{
200
- width: size,
201
- height: size,
202
- maxWidth: '100%'
203
- }, style],
204
- accessible: true,
205
- accessibilityRole: "image",
206
- accessibilityLabel: accessibilityLabel ?? label ?? messages.label,
207
- testID: testID,
208
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SvgDrawing.Drawing, {
209
- context: drawing,
210
- size: size
211
- })
16
+ runtimeUrl
17
+ } = (0, _react.useContext)(_context.CharacterRuntimeContext);
18
+ const beta = props.config.character && props.config.character.preset !== 'bloom';
19
+ const legacy = runtimeUrl && !(0, _legacyRecipe.legacyRecipeUnsupported)(props.config);
20
+ return beta || legacy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CharacterAvatar.CharacterAvatar, {
21
+ ...props
22
+ }, beta ? 'character' : 'legacy') : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProceduralAvatar.ProceduralAvatar, {
23
+ ...props
212
24
  });
213
- }
25
+ });
214
26
  //# sourceMappingURL=AgentAvatar.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_messages","_styledPrimitives","_artwork","_attention","_blink","_context","_drawing","_entrance","_face","_messages2","_SvgDrawing","_wander","_working","_jsxRuntime","TAU","Math","PI","randomSeed","globalThis","crypto","getRandomValues","Uint32Array","floor","random","AgentAvatar","config","size","paused","label","locale","entranceKey","workingKey","workingCycles","className","style","accessibilityLabel","testID","messages","useMessages","AGENT_AVATAR_MESSAGES","initialReduced","useReducedMotion","reduced","setReduced","useState","useEffect","subscription","AccessibilityInfo","addEventListener","media","Platform","OS","matchMedia","undefined","change","matches","remove","removeEventListener","backingSize","round","min","PixelRatio","get","root","useRef","randomized","state","current","seed","phase","blink","createBlink","wander","createWander","family","attention","createAttention","shapeMorph","started","active","velocity","entrance","elapsed","ENTRANCE_SECONDS","working","WORKING_SECONDS","renderDrawing","context","DrawingContext","s","appearance","faceAtSize","target","expressionRig","drawAvatar","face","gaze","gazeAngles","max","drawing","setDrawing","observeDrawing","useContext","AvatarDrawingObserver","useLayoutEffect","cycles","duration","key","idle","expression","point","frozen","motion","lookAt","draw","frame","last","visible","AppState","currentState","transitioning","tick","now","milliseconds","seconds","base","easeFace","Object","keys","some","smile","advanceAttention","advanceBlink","blinking","advanceWander","aim","ease","exp","requestAnimationFrame","next","observer","IntersectionObserver","Element","entries","isIntersecting","observe","cancelAnimationFrame","disconnect","jsx","StyledView","ref","width","height","maxWidth","accessible","accessibilityRole","children","Drawing"],"sourceRoot":"../../../src","sources":["agent-avatar/AgentAvatar.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAOA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AAOA,IAAAY,UAAA,GAAAZ,OAAA;AAEA,IAAAa,WAAA,GAAAb,OAAA;AAEA,IAAAc,OAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AAA4C,IAAAgB,WAAA,GAAAhB,OAAA;AAE5C,MAAMiB,GAAG,GAAGC,IAAI,CAACC,EAAE,GAAG,CAAC;AACvB,MAAMC,UAAU,GAAGA,CAAA,KAAM;EACvB,IAAIC,UAAU,CAACC,MAAM,EAAEC,eAAe,EACpC,OAAOF,UAAU,CAACC,MAAM,CAACC,eAAe,CAAC,IAAIC,WAAW,CAAC,CAAC,CAAC,CAAC,CA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AQ,EAAE;IAAO,CAAC,EAAEvH,KAAK,CAAE;IAChEwH,UAAU;IACVC,iBAAiB,EAAC,OAAO;IACzBxH,kBAAkB,EAAEA,kBAAkB,IAAIP,KAAK,IAAIS,QAAQ,CAACT,KAAM;IAClEQ,MAAM,EAAEA,MAAO;IAAAwH,QAAA,eAEf,IAAA/I,WAAA,CAAAuI,GAAA,EAAC1I,WAAA,CAAAmJ,OAAO;MAACtE,OAAO,EAAEY,OAAQ;MAACzE,IAAI,EAAEA;IAAK,CAAE;EAAC,CAC/B,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_CharacterAvatar","_ProceduralAvatar","_context","_legacyRecipe","_jsxRuntime","AgentAvatar","exports","memo","props","runtimeUrl","useContext","CharacterRuntimeContext","beta","config","character","preset","legacy","legacyRecipeUnsupported","jsx","CharacterAvatar","ProceduralAvatar"],"sourceRoot":"../../../src","sources":["agent-avatar/AgentAvatar.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA0D,IAAAK,WAAA,GAAAL,OAAA;AAG1D;AACO,MAAMM,WAAW,GAAAC,OAAA,CAAAD,WAAA,gBAAG,IAAAE,WAAI,EAAC,SAASF,WAAWA,CAACG,KAAuB,EAAE;EAC5E,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAAC,iBAAU,EAACC,gCAAuB,CAAC;EAC1D,MAAMC,IAAI,GACRJ,KAAK,CAACK,MAAM,CAACC,SAAS,IAAIN,KAAK,CAACK,MAAM,CAACC,SAAS,CAACC,MAAM,KAAK,OAAO;EACrE,MAAMC,MAAM,GAAGP,UAAU,IAAI,CAAC,IAAAQ,qCAAuB,EAACT,KAAK,CAACK,MAAM,CAAC;EACnE,OAAOD,IAAI,IAAII,MAAM,gBACnB,IAAAZ,WAAA,CAAAc,GAAA,EAAClB,gBAAA,CAAAmB,eAAe;IAAA,GAAyCX;EAAK,GAAxCI,IAAI,GAAG,WAAW,GAAG,QAAsB,CAAC,gBAElE,IAAAR,WAAA,CAAAc,GAAA,EAACjB,iBAAA,CAAAmB,gBAAgB;IAAA,GAAKZ;EAAK,CAAG,CAC/B;AACH,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AgentAvatarProvider = AgentAvatarProvider;
7
+ var _react = require("react");
8
+ var _context = require("./context.js");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ const EMPTY_CAPABILITIES = new Map();
11
+ function sameRecord(left, right) {
12
+ const keys = Object.keys(left);
13
+ return keys.length === Object.keys(right).length && keys.every(key => left[key] === right[key]);
14
+ }
15
+
16
+ /** Enables the optional character engine without fetching it until an avatar needs it. */
17
+ function AgentAvatarProvider({
18
+ runtimeUrl,
19
+ children
20
+ }) {
21
+ const [cache, setCapabilities] = (0, _react.useState)(() => ({
22
+ runtimeUrl,
23
+ entries: EMPTY_CAPABILITIES
24
+ }));
25
+ const activeRuntime = (0, _react.useRef)(runtimeUrl);
26
+ activeRuntime.current = runtimeUrl;
27
+ // An old module's catalog cannot describe the newly selected runtime, even
28
+ // for the same saved recipe. Hide its cache during the first changed render.
29
+ const capabilitiesByKey = cache.runtimeUrl === runtimeUrl ? cache.entries : EMPTY_CAPABILITIES;
30
+ (0, _react.useEffect)(() => {
31
+ setCapabilities(previous => previous.runtimeUrl === runtimeUrl ? previous : {
32
+ runtimeUrl,
33
+ entries: EMPTY_CAPABILITIES
34
+ });
35
+ }, [runtimeUrl]);
36
+ const reportCapabilities = (0, _react.useCallback)(next => {
37
+ // A disposed renderer can finish preparing after its runtime was replaced.
38
+ if (activeRuntime.current !== runtimeUrl) return;
39
+ setCapabilities(previous => {
40
+ if (activeRuntime.current !== runtimeUrl) return previous;
41
+ const prior = previous.runtimeUrl === runtimeUrl ? previous.entries : EMPTY_CAPABILITIES;
42
+ const known = prior.get(next.key);
43
+ if (known && sameRecord(known.available, next.available) && sameRecord(known.selected, next.selected)) return previous;
44
+ const entries = new Map(prior);
45
+ entries.delete(next.key);
46
+ entries.set(next.key, next);
47
+ if (entries.size > 64) entries.delete(entries.keys().next().value);
48
+ return {
49
+ runtimeUrl,
50
+ entries
51
+ };
52
+ });
53
+ }, [runtimeUrl]);
54
+ const value = (0, _react.useMemo)(() => ({
55
+ runtimeUrl,
56
+ capabilitiesByKey,
57
+ reportCapabilities
58
+ }), [runtimeUrl, capabilitiesByKey, reportCapabilities]);
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.CharacterRuntimeContext.Provider, {
60
+ value: value,
61
+ children: children
62
+ });
63
+ }
64
+ //# sourceMappingURL=AgentAvatarProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_context","_jsxRuntime","EMPTY_CAPABILITIES","Map","sameRecord","left","right","keys","Object","length","every","key","AgentAvatarProvider","runtimeUrl","children","cache","setCapabilities","useState","entries","activeRuntime","useRef","current","capabilitiesByKey","useEffect","previous","reportCapabilities","useCallback","next","prior","known","get","available","selected","delete","set","size","value","useMemo","jsx","CharacterRuntimeContext","Provider"],"sourceRoot":"../../../src","sources":["agent-avatar/AgentAvatarProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAAgF,IAAAE,WAAA,GAAAF,OAAA;AAEhF,MAAMG,kBAA8D,GAClE,IAAIC,GAAG,CAAC,CAAC;AACX,SAASC,UAAUA,CAAIC,IAAuB,EAAEC,KAAwB,EAAE;EACxE,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACF,IAAI,CAAC;EAC9B,OACEE,IAAI,CAACE,MAAM,KAAKD,MAAM,CAACD,IAAI,CAACD,KAAK,CAAC,CAACG,MA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