@elizaos/app-core 2.0.0-alpha.37

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 (1082) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/LICENSE +21 -0
  3. package/dist/App.d.ts +5 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/App.js +198 -0
  6. package/dist/actions/character.d.ts +27 -0
  7. package/dist/actions/character.d.ts.map +1 -0
  8. package/dist/actions/character.js +97 -0
  9. package/dist/actions/chat-helpers.d.ts +47 -0
  10. package/dist/actions/chat-helpers.d.ts.map +1 -0
  11. package/dist/actions/chat-helpers.js +79 -0
  12. package/dist/actions/cloud.d.ts +17 -0
  13. package/dist/actions/cloud.d.ts.map +1 -0
  14. package/dist/actions/cloud.js +43 -0
  15. package/dist/actions/index.d.ts +12 -0
  16. package/dist/actions/index.d.ts.map +1 -0
  17. package/dist/actions/index.js +11 -0
  18. package/dist/actions/lifecycle.d.ts +43 -0
  19. package/dist/actions/lifecycle.d.ts.map +1 -0
  20. package/dist/actions/lifecycle.js +118 -0
  21. package/dist/actions/onboarding.d.ts +12 -0
  22. package/dist/actions/onboarding.d.ts.map +1 -0
  23. package/dist/actions/onboarding.js +28 -0
  24. package/dist/actions/triggers.d.ts +23 -0
  25. package/dist/actions/triggers.d.ts.map +1 -0
  26. package/dist/actions/triggers.js +148 -0
  27. package/dist/api/client.d.ts +2823 -0
  28. package/dist/api/client.d.ts.map +1 -0
  29. package/dist/api/client.js +2392 -0
  30. package/dist/api/index.d.ts +2 -0
  31. package/dist/api/index.d.ts.map +1 -0
  32. package/dist/api/index.js +1 -0
  33. package/dist/autonomy/index.d.ts +48 -0
  34. package/dist/autonomy/index.d.ts.map +1 -0
  35. package/dist/autonomy/index.js +330 -0
  36. package/dist/bridge/capacitor-bridge.d.ts +153 -0
  37. package/dist/bridge/capacitor-bridge.d.ts.map +1 -0
  38. package/dist/bridge/capacitor-bridge.js +193 -0
  39. package/dist/bridge/electrobun-rpc.d.ts +19 -0
  40. package/dist/bridge/electrobun-rpc.d.ts.map +1 -0
  41. package/dist/bridge/electrobun-rpc.js +27 -0
  42. package/dist/bridge/electrobun-runtime.d.ts +3 -0
  43. package/dist/bridge/electrobun-runtime.d.ts.map +1 -0
  44. package/dist/bridge/electrobun-runtime.js +17 -0
  45. package/dist/bridge/index.d.ts +6 -0
  46. package/dist/bridge/index.d.ts.map +1 -0
  47. package/dist/bridge/index.js +5 -0
  48. package/dist/bridge/native-plugins.d.ts +82 -0
  49. package/dist/bridge/native-plugins.d.ts.map +1 -0
  50. package/dist/bridge/native-plugins.js +39 -0
  51. package/dist/bridge/plugin-bridge.d.ts +116 -0
  52. package/dist/bridge/plugin-bridge.d.ts.map +1 -0
  53. package/dist/bridge/plugin-bridge.js +203 -0
  54. package/dist/bridge/storage-bridge.d.ts +39 -0
  55. package/dist/bridge/storage-bridge.d.ts.map +1 -0
  56. package/dist/bridge/storage-bridge.js +135 -0
  57. package/dist/chat/index.d.ts +57 -0
  58. package/dist/chat/index.d.ts.map +1 -0
  59. package/dist/chat/index.js +161 -0
  60. package/dist/coding/index.d.ts +25 -0
  61. package/dist/coding/index.d.ts.map +1 -0
  62. package/dist/coding/index.js +25 -0
  63. package/dist/components/AdvancedPageView.d.ts +17 -0
  64. package/dist/components/AdvancedPageView.d.ts.map +1 -0
  65. package/dist/components/AdvancedPageView.js +137 -0
  66. package/dist/components/AgentActivityBox.d.ts +7 -0
  67. package/dist/components/AgentActivityBox.d.ts.map +1 -0
  68. package/dist/components/AgentActivityBox.js +25 -0
  69. package/dist/components/ApiKeyConfig.d.ts +26 -0
  70. package/dist/components/ApiKeyConfig.d.ts.map +1 -0
  71. package/dist/components/ApiKeyConfig.js +121 -0
  72. package/dist/components/AppsPageView.d.ts +7 -0
  73. package/dist/components/AppsPageView.d.ts.map +1 -0
  74. package/dist/components/AppsPageView.js +31 -0
  75. package/dist/components/AppsView.d.ts +8 -0
  76. package/dist/components/AppsView.d.ts.map +1 -0
  77. package/dist/components/AppsView.js +149 -0
  78. package/dist/components/AvatarLoader.d.ts +9 -0
  79. package/dist/components/AvatarLoader.d.ts.map +1 -0
  80. package/dist/components/AvatarLoader.js +45 -0
  81. package/dist/components/AvatarSelector.d.ts +23 -0
  82. package/dist/components/AvatarSelector.d.ts.map +1 -0
  83. package/dist/components/AvatarSelector.js +105 -0
  84. package/dist/components/BscTradePanel.d.ts +22 -0
  85. package/dist/components/BscTradePanel.d.ts.map +1 -0
  86. package/dist/components/BscTradePanel.js +221 -0
  87. package/dist/components/BugReportModal.d.ts +2 -0
  88. package/dist/components/BugReportModal.d.ts.map +1 -0
  89. package/dist/components/BugReportModal.js +218 -0
  90. package/dist/components/CharacterView.d.ts +8 -0
  91. package/dist/components/CharacterView.d.ts.map +1 -0
  92. package/dist/components/CharacterView.js +703 -0
  93. package/dist/components/ChatAvatar.d.ts +8 -0
  94. package/dist/components/ChatAvatar.d.ts.map +1 -0
  95. package/dist/components/ChatAvatar.js +89 -0
  96. package/dist/components/ChatComposer.d.ts +37 -0
  97. package/dist/components/ChatComposer.d.ts.map +1 -0
  98. package/dist/components/ChatComposer.js +136 -0
  99. package/dist/components/ChatMessage.d.ts +24 -0
  100. package/dist/components/ChatMessage.d.ts.map +1 -0
  101. package/dist/components/ChatMessage.js +167 -0
  102. package/dist/components/ChatModalView.d.ts +10 -0
  103. package/dist/components/ChatModalView.d.ts.map +1 -0
  104. package/dist/components/ChatModalView.js +57 -0
  105. package/dist/components/ChatView.d.ts +14 -0
  106. package/dist/components/ChatView.d.ts.map +1 -0
  107. package/dist/components/ChatView.js +511 -0
  108. package/dist/components/CloudSourceControls.d.ts +13 -0
  109. package/dist/components/CloudSourceControls.d.ts.map +1 -0
  110. package/dist/components/CloudSourceControls.js +14 -0
  111. package/dist/components/CodingAgentSettingsSection.d.ts +2 -0
  112. package/dist/components/CodingAgentSettingsSection.d.ts.map +1 -0
  113. package/dist/components/CodingAgentSettingsSection.js +268 -0
  114. package/dist/components/CommandPalette.d.ts +2 -0
  115. package/dist/components/CommandPalette.d.ts.map +1 -0
  116. package/dist/components/CommandPalette.js +181 -0
  117. package/dist/components/CompanionSceneHost.d.ts +15 -0
  118. package/dist/components/CompanionSceneHost.d.ts.map +1 -0
  119. package/dist/components/CompanionSceneHost.js +343 -0
  120. package/dist/components/CompanionShell.d.ts +17 -0
  121. package/dist/components/CompanionShell.d.ts.map +1 -0
  122. package/dist/components/CompanionShell.js +15 -0
  123. package/dist/components/CompanionView.d.ts +2 -0
  124. package/dist/components/CompanionView.d.ts.map +1 -0
  125. package/dist/components/CompanionView.js +22 -0
  126. package/dist/components/ConfigPageView.d.ts +11 -0
  127. package/dist/components/ConfigPageView.d.ts.map +1 -0
  128. package/dist/components/ConfigPageView.js +275 -0
  129. package/dist/components/ConfigSaveFooter.d.ts +8 -0
  130. package/dist/components/ConfigSaveFooter.d.ts.map +1 -0
  131. package/dist/components/ConfigSaveFooter.js +10 -0
  132. package/dist/components/ConfirmModal.d.ts +61 -0
  133. package/dist/components/ConfirmModal.d.ts.map +1 -0
  134. package/dist/components/ConfirmModal.js +164 -0
  135. package/dist/components/ConnectionFailedBanner.d.ts +6 -0
  136. package/dist/components/ConnectionFailedBanner.d.ts.map +1 -0
  137. package/dist/components/ConnectionFailedBanner.js +22 -0
  138. package/dist/components/ConnectorsPageView.d.ts +7 -0
  139. package/dist/components/ConnectorsPageView.d.ts.map +1 -0
  140. package/dist/components/ConnectorsPageView.js +8 -0
  141. package/dist/components/ConversationsSidebar.d.ts +9 -0
  142. package/dist/components/ConversationsSidebar.d.ts.map +1 -0
  143. package/dist/components/ConversationsSidebar.js +116 -0
  144. package/dist/components/CustomActionEditor.d.ts +10 -0
  145. package/dist/components/CustomActionEditor.d.ts.map +1 -0
  146. package/dist/components/CustomActionEditor.js +578 -0
  147. package/dist/components/CustomActionsPanel.d.ts +9 -0
  148. package/dist/components/CustomActionsPanel.d.ts.map +1 -0
  149. package/dist/components/CustomActionsPanel.js +107 -0
  150. package/dist/components/CustomActionsView.d.ts +2 -0
  151. package/dist/components/CustomActionsView.d.ts.map +1 -0
  152. package/dist/components/CustomActionsView.js +134 -0
  153. package/dist/components/DatabasePageView.d.ts +5 -0
  154. package/dist/components/DatabasePageView.d.ts.map +1 -0
  155. package/dist/components/DatabasePageView.js +28 -0
  156. package/dist/components/DatabaseView.d.ts +9 -0
  157. package/dist/components/DatabaseView.d.ts.map +1 -0
  158. package/dist/components/DatabaseView.js +311 -0
  159. package/dist/components/ElizaCloudDashboard.d.ts +2 -0
  160. package/dist/components/ElizaCloudDashboard.d.ts.map +1 -0
  161. package/dist/components/ElizaCloudDashboard.js +657 -0
  162. package/dist/components/EmotePicker.d.ts +2 -0
  163. package/dist/components/EmotePicker.d.ts.map +1 -0
  164. package/dist/components/EmotePicker.js +343 -0
  165. package/dist/components/ErrorBoundary.d.ts +22 -0
  166. package/dist/components/ErrorBoundary.d.ts.map +1 -0
  167. package/dist/components/ErrorBoundary.js +31 -0
  168. package/dist/components/FineTuningView.d.ts +2 -0
  169. package/dist/components/FineTuningView.d.ts.map +1 -0
  170. package/dist/components/FineTuningView.js +433 -0
  171. package/dist/components/GameView.d.ts +11 -0
  172. package/dist/components/GameView.d.ts.map +1 -0
  173. package/dist/components/GameView.js +295 -0
  174. package/dist/components/GameViewOverlay.d.ts +8 -0
  175. package/dist/components/GameViewOverlay.d.ts.map +1 -0
  176. package/dist/components/GameViewOverlay.js +70 -0
  177. package/dist/components/GlobalEmoteOverlay.d.ts +2 -0
  178. package/dist/components/GlobalEmoteOverlay.d.ts.map +1 -0
  179. package/dist/components/GlobalEmoteOverlay.js +112 -0
  180. package/dist/components/Header.d.ts +8 -0
  181. package/dist/components/Header.d.ts.map +1 -0
  182. package/dist/components/Header.js +121 -0
  183. package/dist/components/HeartbeatsView.d.ts +2 -0
  184. package/dist/components/HeartbeatsView.d.ts.map +1 -0
  185. package/dist/components/HeartbeatsView.js +378 -0
  186. package/dist/components/InventoryView.d.ts +10 -0
  187. package/dist/components/InventoryView.d.ts.map +1 -0
  188. package/dist/components/InventoryView.js +162 -0
  189. package/dist/components/KnowledgeView.d.ts +20 -0
  190. package/dist/components/KnowledgeView.d.ts.map +1 -0
  191. package/dist/components/KnowledgeView.js +480 -0
  192. package/dist/components/LanguageDropdown.d.ts +30 -0
  193. package/dist/components/LanguageDropdown.d.ts.map +1 -0
  194. package/dist/components/LanguageDropdown.js +98 -0
  195. package/dist/components/LifoMonitorPanel.d.ts +21 -0
  196. package/dist/components/LifoMonitorPanel.d.ts.map +1 -0
  197. package/dist/components/LifoMonitorPanel.js +24 -0
  198. package/dist/components/LifoSandboxView.d.ts +5 -0
  199. package/dist/components/LifoSandboxView.d.ts.map +1 -0
  200. package/dist/components/LifoSandboxView.js +333 -0
  201. package/dist/components/LoadingScreen.d.ts +13 -0
  202. package/dist/components/LoadingScreen.d.ts.map +1 -0
  203. package/dist/components/LoadingScreen.js +39 -0
  204. package/dist/components/LogsPageView.d.ts +2 -0
  205. package/dist/components/LogsPageView.d.ts.map +1 -0
  206. package/dist/components/LogsPageView.js +7 -0
  207. package/dist/components/LogsView.d.ts +5 -0
  208. package/dist/components/LogsView.d.ts.map +1 -0
  209. package/dist/components/LogsView.js +71 -0
  210. package/dist/components/MediaGalleryView.d.ts +9 -0
  211. package/dist/components/MediaGalleryView.d.ts.map +1 -0
  212. package/dist/components/MediaGalleryView.js +236 -0
  213. package/dist/components/MediaSettingsSection.d.ts +11 -0
  214. package/dist/components/MediaSettingsSection.d.ts.map +1 -0
  215. package/dist/components/MediaSettingsSection.js +329 -0
  216. package/dist/components/MessageContent.d.ts +51 -0
  217. package/dist/components/MessageContent.d.ts.map +1 -0
  218. package/dist/components/MessageContent.js +553 -0
  219. package/dist/components/OnboardingWizard.d.ts +2 -0
  220. package/dist/components/OnboardingWizard.d.ts.map +1 -0
  221. package/dist/components/OnboardingWizard.js +59 -0
  222. package/dist/components/PairingView.d.ts +5 -0
  223. package/dist/components/PairingView.d.ts.map +1 -0
  224. package/dist/components/PairingView.js +28 -0
  225. package/dist/components/PermissionsSection.d.ts +20 -0
  226. package/dist/components/PermissionsSection.d.ts.map +1 -0
  227. package/dist/components/PermissionsSection.js +368 -0
  228. package/dist/components/PluginsPageView.d.ts +5 -0
  229. package/dist/components/PluginsPageView.d.ts.map +1 -0
  230. package/dist/components/PluginsPageView.js +8 -0
  231. package/dist/components/PluginsView.d.ts +21 -0
  232. package/dist/components/PluginsView.d.ts.map +1 -0
  233. package/dist/components/PluginsView.js +1531 -0
  234. package/dist/components/ProviderSwitcher.d.ts +42 -0
  235. package/dist/components/ProviderSwitcher.d.ts.map +1 -0
  236. package/dist/components/ProviderSwitcher.js +480 -0
  237. package/dist/components/RestartBanner.d.ts +2 -0
  238. package/dist/components/RestartBanner.d.ts.map +1 -0
  239. package/dist/components/RestartBanner.js +36 -0
  240. package/dist/components/RuntimeView.d.ts +10 -0
  241. package/dist/components/RuntimeView.d.ts.map +1 -0
  242. package/dist/components/RuntimeView.js +165 -0
  243. package/dist/components/SaveCommandModal.d.ts +12 -0
  244. package/dist/components/SaveCommandModal.d.ts.map +1 -0
  245. package/dist/components/SaveCommandModal.js +84 -0
  246. package/dist/components/SecretsView.d.ts +9 -0
  247. package/dist/components/SecretsView.d.ts.map +1 -0
  248. package/dist/components/SecretsView.js +249 -0
  249. package/dist/components/SettingsView.d.ts +9 -0
  250. package/dist/components/SettingsView.d.ts.map +1 -0
  251. package/dist/components/SettingsView.js +230 -0
  252. package/dist/components/ShellOverlays.d.ts +8 -0
  253. package/dist/components/ShellOverlays.d.ts.map +1 -0
  254. package/dist/components/ShellOverlays.js +10 -0
  255. package/dist/components/ShortcutsOverlay.d.ts +2 -0
  256. package/dist/components/ShortcutsOverlay.d.ts.map +1 -0
  257. package/dist/components/ShortcutsOverlay.js +79 -0
  258. package/dist/components/SkillsView.d.ts +11 -0
  259. package/dist/components/SkillsView.d.ts.map +1 -0
  260. package/dist/components/SkillsView.js +358 -0
  261. package/dist/components/StartupFailureView.d.ts +8 -0
  262. package/dist/components/StartupFailureView.d.ts.map +1 -0
  263. package/dist/components/StartupFailureView.js +15 -0
  264. package/dist/components/StreamView.d.ts +16 -0
  265. package/dist/components/StreamView.d.ts.map +1 -0
  266. package/dist/components/StreamView.js +300 -0
  267. package/dist/components/StripeEmbeddedCheckout.d.ts +24 -0
  268. package/dist/components/StripeEmbeddedCheckout.d.ts.map +1 -0
  269. package/dist/components/StripeEmbeddedCheckout.js +101 -0
  270. package/dist/components/SubscriptionStatus.d.ts +22 -0
  271. package/dist/components/SubscriptionStatus.d.ts.map +1 -0
  272. package/dist/components/SubscriptionStatus.js +301 -0
  273. package/dist/components/SystemWarningBanner.d.ts +6 -0
  274. package/dist/components/SystemWarningBanner.d.ts.map +1 -0
  275. package/dist/components/SystemWarningBanner.js +46 -0
  276. package/dist/components/ThemeToggle.d.ts +21 -0
  277. package/dist/components/ThemeToggle.d.ts.map +1 -0
  278. package/dist/components/ThemeToggle.js +24 -0
  279. package/dist/components/TrajectoriesView.d.ts +12 -0
  280. package/dist/components/TrajectoriesView.d.ts.map +1 -0
  281. package/dist/components/TrajectoriesView.js +183 -0
  282. package/dist/components/TrajectoryDetailView.d.ts +13 -0
  283. package/dist/components/TrajectoryDetailView.d.ts.map +1 -0
  284. package/dist/components/TrajectoryDetailView.js +112 -0
  285. package/dist/components/TriggersView.d.ts +2 -0
  286. package/dist/components/TriggersView.d.ts.map +1 -0
  287. package/dist/components/TriggersView.js +1 -0
  288. package/dist/components/VectorBrowserView.d.ts +10 -0
  289. package/dist/components/VectorBrowserView.d.ts.map +1 -0
  290. package/dist/components/VectorBrowserView.js +997 -0
  291. package/dist/components/VoiceConfigView.d.ts +11 -0
  292. package/dist/components/VoiceConfigView.d.ts.map +1 -0
  293. package/dist/components/VoiceConfigView.js +329 -0
  294. package/dist/components/VrmStage.d.ts +21 -0
  295. package/dist/components/VrmStage.d.ts.map +1 -0
  296. package/dist/components/VrmStage.js +252 -0
  297. package/dist/components/WhatsAppQrOverlay.d.ts +8 -0
  298. package/dist/components/WhatsAppQrOverlay.d.ts.map +1 -0
  299. package/dist/components/WhatsAppQrOverlay.js +63 -0
  300. package/dist/components/apps/AppDetailPane.d.ts +15 -0
  301. package/dist/components/apps/AppDetailPane.d.ts.map +1 -0
  302. package/dist/components/apps/AppDetailPane.js +13 -0
  303. package/dist/components/apps/AppsCatalogGrid.d.ts +20 -0
  304. package/dist/components/apps/AppsCatalogGrid.d.ts.map +1 -0
  305. package/dist/components/apps/AppsCatalogGrid.js +18 -0
  306. package/dist/components/apps/extensions/HyperscapeAppDetailPanel.d.ts +3 -0
  307. package/dist/components/apps/extensions/HyperscapeAppDetailPanel.d.ts.map +1 -0
  308. package/dist/components/apps/extensions/HyperscapeAppDetailPanel.js +253 -0
  309. package/dist/components/apps/extensions/registry.d.ts +4 -0
  310. package/dist/components/apps/extensions/registry.d.ts.map +1 -0
  311. package/dist/components/apps/extensions/registry.js +10 -0
  312. package/dist/components/apps/extensions/types.d.ts +7 -0
  313. package/dist/components/apps/extensions/types.d.ts.map +1 -0
  314. package/dist/components/apps/extensions/types.js +1 -0
  315. package/dist/components/apps/helpers.d.ts +7 -0
  316. package/dist/components/apps/helpers.d.ts.map +1 -0
  317. package/dist/components/apps/helpers.js +46 -0
  318. package/dist/components/avatar/VrmAnimationLoader.d.ts +30 -0
  319. package/dist/components/avatar/VrmAnimationLoader.d.ts.map +1 -0
  320. package/dist/components/avatar/VrmAnimationLoader.js +99 -0
  321. package/dist/components/avatar/VrmBlinkController.d.ts +37 -0
  322. package/dist/components/avatar/VrmBlinkController.d.ts.map +1 -0
  323. package/dist/components/avatar/VrmBlinkController.js +98 -0
  324. package/dist/components/avatar/VrmCameraManager.d.ts +57 -0
  325. package/dist/components/avatar/VrmCameraManager.d.ts.map +1 -0
  326. package/dist/components/avatar/VrmCameraManager.js +277 -0
  327. package/dist/components/avatar/VrmEngine.d.ts +229 -0
  328. package/dist/components/avatar/VrmEngine.d.ts.map +1 -0
  329. package/dist/components/avatar/VrmEngine.js +1950 -0
  330. package/dist/components/avatar/VrmFootShadow.d.ts +18 -0
  331. package/dist/components/avatar/VrmFootShadow.d.ts.map +1 -0
  332. package/dist/components/avatar/VrmFootShadow.js +83 -0
  333. package/dist/components/avatar/VrmViewer.d.ts +45 -0
  334. package/dist/components/avatar/VrmViewer.d.ts.map +1 -0
  335. package/dist/components/avatar/VrmViewer.js +341 -0
  336. package/dist/components/avatar/mixamoVRMRigMap.d.ts +3 -0
  337. package/dist/components/avatar/mixamoVRMRigMap.d.ts.map +1 -0
  338. package/dist/components/avatar/mixamoVRMRigMap.js +56 -0
  339. package/dist/components/avatar/retargetMixamoFbxToVrm.d.ts +9 -0
  340. package/dist/components/avatar/retargetMixamoFbxToVrm.d.ts.map +1 -0
  341. package/dist/components/avatar/retargetMixamoFbxToVrm.js +88 -0
  342. package/dist/components/avatar/retargetMixamoGltfToVrm.d.ts +11 -0
  343. package/dist/components/avatar/retargetMixamoGltfToVrm.d.ts.map +1 -0
  344. package/dist/components/avatar/retargetMixamoGltfToVrm.js +80 -0
  345. package/dist/components/chainConfig.d.ts +84 -0
  346. package/dist/components/chainConfig.d.ts.map +1 -0
  347. package/dist/components/chainConfig.js +268 -0
  348. package/dist/components/companion/CompanionHeader.d.ts +15 -0
  349. package/dist/components/companion/CompanionHeader.d.ts.map +1 -0
  350. package/dist/components/companion/CompanionHeader.js +7 -0
  351. package/dist/components/companion/CompanionSceneHost.d.ts +2 -0
  352. package/dist/components/companion/CompanionSceneHost.d.ts.map +1 -0
  353. package/dist/components/companion/CompanionSceneHost.js +1 -0
  354. package/dist/components/companion/VrmStage.d.ts +3 -0
  355. package/dist/components/companion/VrmStage.d.ts.map +1 -0
  356. package/dist/components/companion/VrmStage.js +1 -0
  357. package/dist/components/companion/walletUtils.d.ts +95 -0
  358. package/dist/components/companion/walletUtils.d.ts.map +1 -0
  359. package/dist/components/companion/walletUtils.js +167 -0
  360. package/dist/components/companion-shell-styles.d.ts +38 -0
  361. package/dist/components/companion-shell-styles.d.ts.map +1 -0
  362. package/dist/components/companion-shell-styles.js +248 -0
  363. package/dist/components/confirm-delete-control.d.ts +16 -0
  364. package/dist/components/confirm-delete-control.d.ts.map +1 -0
  365. package/dist/components/confirm-delete-control.js +12 -0
  366. package/dist/components/conversations/ConversationListItem.d.ts +31 -0
  367. package/dist/components/conversations/ConversationListItem.d.ts.map +1 -0
  368. package/dist/components/conversations/ConversationListItem.js +52 -0
  369. package/dist/components/conversations/conversation-utils.d.ts +9 -0
  370. package/dist/components/conversations/conversation-utils.d.ts.map +1 -0
  371. package/dist/components/conversations/conversation-utils.js +138 -0
  372. package/dist/components/format.d.ts +54 -0
  373. package/dist/components/format.d.ts.map +1 -0
  374. package/dist/components/format.js +82 -0
  375. package/dist/components/index.d.ts +93 -0
  376. package/dist/components/index.d.ts.map +1 -0
  377. package/dist/components/index.js +92 -0
  378. package/dist/components/inventory/CopyableAddress.d.ts +8 -0
  379. package/dist/components/inventory/CopyableAddress.d.ts.map +1 -0
  380. package/dist/components/inventory/CopyableAddress.js +18 -0
  381. package/dist/components/inventory/InventoryToolbar.d.ts +25 -0
  382. package/dist/components/inventory/InventoryToolbar.d.ts.map +1 -0
  383. package/dist/components/inventory/InventoryToolbar.js +28 -0
  384. package/dist/components/inventory/NftGrid.d.ts +13 -0
  385. package/dist/components/inventory/NftGrid.d.ts.map +1 -0
  386. package/dist/components/inventory/NftGrid.js +29 -0
  387. package/dist/components/inventory/TokenLogo.d.ts +12 -0
  388. package/dist/components/inventory/TokenLogo.d.ts.map +1 -0
  389. package/dist/components/inventory/TokenLogo.js +33 -0
  390. package/dist/components/inventory/TokensTable.d.ts +24 -0
  391. package/dist/components/inventory/TokensTable.d.ts.map +1 -0
  392. package/dist/components/inventory/TokensTable.js +26 -0
  393. package/dist/components/inventory/constants.d.ts +52 -0
  394. package/dist/components/inventory/constants.d.ts.map +1 -0
  395. package/dist/components/inventory/constants.js +121 -0
  396. package/dist/components/inventory/index.d.ts +9 -0
  397. package/dist/components/inventory/index.d.ts.map +1 -0
  398. package/dist/components/inventory/index.js +8 -0
  399. package/dist/components/inventory/media-url.d.ts +6 -0
  400. package/dist/components/inventory/media-url.d.ts.map +1 -0
  401. package/dist/components/inventory/media-url.js +28 -0
  402. package/dist/components/inventory/useInventoryData.d.ts +53 -0
  403. package/dist/components/inventory/useInventoryData.d.ts.map +1 -0
  404. package/dist/components/inventory/useInventoryData.js +332 -0
  405. package/dist/components/knowledge-upload-image.d.ts +27 -0
  406. package/dist/components/knowledge-upload-image.d.ts.map +1 -0
  407. package/dist/components/knowledge-upload-image.js +146 -0
  408. package/dist/components/labels.d.ts +6 -0
  409. package/dist/components/labels.d.ts.map +1 -0
  410. package/dist/components/labels.js +40 -0
  411. package/dist/components/onboarding/ActivateStep.d.ts +2 -0
  412. package/dist/components/onboarding/ActivateStep.d.ts.map +1 -0
  413. package/dist/components/onboarding/ActivateStep.js +6 -0
  414. package/dist/components/onboarding/ConnectionStep.d.ts +2 -0
  415. package/dist/components/onboarding/ConnectionStep.d.ts.map +1 -0
  416. package/dist/components/onboarding/ConnectionStep.js +552 -0
  417. package/dist/components/onboarding/OnboardingPanel.d.ts +9 -0
  418. package/dist/components/onboarding/OnboardingPanel.d.ts.map +1 -0
  419. package/dist/components/onboarding/OnboardingPanel.js +24 -0
  420. package/dist/components/onboarding/OnboardingStepNav.d.ts +2 -0
  421. package/dist/components/onboarding/OnboardingStepNav.d.ts.map +1 -0
  422. package/dist/components/onboarding/OnboardingStepNav.js +14 -0
  423. package/dist/components/onboarding/PermissionsStep.d.ts +2 -0
  424. package/dist/components/onboarding/PermissionsStep.d.ts.map +1 -0
  425. package/dist/components/onboarding/PermissionsStep.js +7 -0
  426. package/dist/components/onboarding/RpcStep.d.ts +2 -0
  427. package/dist/components/onboarding/RpcStep.d.ts.map +1 -0
  428. package/dist/components/onboarding/RpcStep.js +125 -0
  429. package/dist/components/onboarding/WakeUpStep.d.ts +2 -0
  430. package/dist/components/onboarding/WakeUpStep.d.ts.map +1 -0
  431. package/dist/components/onboarding/WakeUpStep.js +82 -0
  432. package/dist/components/permissions/PermissionIcon.d.ts +4 -0
  433. package/dist/components/permissions/PermissionIcon.d.ts.map +1 -0
  434. package/dist/components/permissions/PermissionIcon.js +12 -0
  435. package/dist/components/permissions/StreamingPermissions.d.ts +20 -0
  436. package/dist/components/permissions/StreamingPermissions.d.ts.map +1 -0
  437. package/dist/components/permissions/StreamingPermissions.js +173 -0
  438. package/dist/components/plugins/showcase-data.d.ts +7 -0
  439. package/dist/components/plugins/showcase-data.d.ts.map +1 -0
  440. package/dist/components/plugins/showcase-data.js +464 -0
  441. package/dist/components/shared/ShellHeaderControls.d.ts +27 -0
  442. package/dist/components/shared/ShellHeaderControls.d.ts.map +1 -0
  443. package/dist/components/shared/ShellHeaderControls.js +60 -0
  444. package/dist/components/skeletons.d.ts +17 -0
  445. package/dist/components/skeletons.d.ts.map +1 -0
  446. package/dist/components/skeletons.js +22 -0
  447. package/dist/components/stream/ActivityFeed.d.ts +5 -0
  448. package/dist/components/stream/ActivityFeed.d.ts.map +1 -0
  449. package/dist/components/stream/ActivityFeed.js +57 -0
  450. package/dist/components/stream/AvatarPip.d.ts +5 -0
  451. package/dist/components/stream/AvatarPip.d.ts.map +1 -0
  452. package/dist/components/stream/AvatarPip.js +6 -0
  453. package/dist/components/stream/ChatContent.d.ts +6 -0
  454. package/dist/components/stream/ChatContent.d.ts.map +1 -0
  455. package/dist/components/stream/ChatContent.js +69 -0
  456. package/dist/components/stream/ChatTicker.d.ts +5 -0
  457. package/dist/components/stream/ChatTicker.d.ts.map +1 -0
  458. package/dist/components/stream/ChatTicker.js +34 -0
  459. package/dist/components/stream/IdleContent.d.ts +5 -0
  460. package/dist/components/stream/IdleContent.d.ts.map +1 -0
  461. package/dist/components/stream/IdleContent.js +17 -0
  462. package/dist/components/stream/StatusBar.d.ts +36 -0
  463. package/dist/components/stream/StatusBar.d.ts.map +1 -0
  464. package/dist/components/stream/StatusBar.js +140 -0
  465. package/dist/components/stream/StreamSettings.d.ts +33 -0
  466. package/dist/components/stream/StreamSettings.d.ts.map +1 -0
  467. package/dist/components/stream/StreamSettings.js +99 -0
  468. package/dist/components/stream/StreamTerminal.d.ts +2 -0
  469. package/dist/components/stream/StreamTerminal.d.ts.map +1 -0
  470. package/dist/components/stream/StreamTerminal.js +52 -0
  471. package/dist/components/stream/StreamVoiceConfig.d.ts +10 -0
  472. package/dist/components/stream/StreamVoiceConfig.d.ts.map +1 -0
  473. package/dist/components/stream/StreamVoiceConfig.js +88 -0
  474. package/dist/components/stream/helpers.d.ts +32 -0
  475. package/dist/components/stream/helpers.d.ts.map +1 -0
  476. package/dist/components/stream/helpers.js +110 -0
  477. package/dist/components/stream/overlays/OverlayLayer.d.ts +20 -0
  478. package/dist/components/stream/overlays/OverlayLayer.d.ts.map +1 -0
  479. package/dist/components/stream/overlays/OverlayLayer.js +24 -0
  480. package/dist/components/stream/overlays/built-in/ActionTickerWidget.d.ts +8 -0
  481. package/dist/components/stream/overlays/built-in/ActionTickerWidget.d.ts.map +1 -0
  482. package/dist/components/stream/overlays/built-in/ActionTickerWidget.js +44 -0
  483. package/dist/components/stream/overlays/built-in/AlertPopupWidget.d.ts +7 -0
  484. package/dist/components/stream/overlays/built-in/AlertPopupWidget.d.ts.map +1 -0
  485. package/dist/components/stream/overlays/built-in/AlertPopupWidget.js +62 -0
  486. package/dist/components/stream/overlays/built-in/BrandingWidget.d.ts +7 -0
  487. package/dist/components/stream/overlays/built-in/BrandingWidget.d.ts.map +1 -0
  488. package/dist/components/stream/overlays/built-in/BrandingWidget.js +36 -0
  489. package/dist/components/stream/overlays/built-in/CustomHtmlWidget.d.ts +26 -0
  490. package/dist/components/stream/overlays/built-in/CustomHtmlWidget.d.ts.map +1 -0
  491. package/dist/components/stream/overlays/built-in/CustomHtmlWidget.js +78 -0
  492. package/dist/components/stream/overlays/built-in/PeonGlassWidget.d.ts +11 -0
  493. package/dist/components/stream/overlays/built-in/PeonGlassWidget.d.ts.map +1 -0
  494. package/dist/components/stream/overlays/built-in/PeonGlassWidget.js +188 -0
  495. package/dist/components/stream/overlays/built-in/PeonHudWidget.d.ts +10 -0
  496. package/dist/components/stream/overlays/built-in/PeonHudWidget.d.ts.map +1 -0
  497. package/dist/components/stream/overlays/built-in/PeonHudWidget.js +168 -0
  498. package/dist/components/stream/overlays/built-in/PeonSakuraWidget.d.ts +11 -0
  499. package/dist/components/stream/overlays/built-in/PeonSakuraWidget.d.ts.map +1 -0
  500. package/dist/components/stream/overlays/built-in/PeonSakuraWidget.js +213 -0
  501. package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts +8 -0
  502. package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.d.ts.map +1 -0
  503. package/dist/components/stream/overlays/built-in/ThoughtBubbleWidget.js +59 -0
  504. package/dist/components/stream/overlays/built-in/ViewerCountWidget.d.ts +7 -0
  505. package/dist/components/stream/overlays/built-in/ViewerCountWidget.d.ts.map +1 -0
  506. package/dist/components/stream/overlays/built-in/ViewerCountWidget.js +34 -0
  507. package/dist/components/stream/overlays/built-in/index.d.ts +13 -0
  508. package/dist/components/stream/overlays/built-in/index.d.ts.map +1 -0
  509. package/dist/components/stream/overlays/built-in/index.js +12 -0
  510. package/dist/components/stream/overlays/registry.d.ts +11 -0
  511. package/dist/components/stream/overlays/registry.d.ts.map +1 -0
  512. package/dist/components/stream/overlays/registry.js +16 -0
  513. package/dist/components/stream/overlays/types.d.ts +67 -0
  514. package/dist/components/stream/overlays/types.d.ts.map +1 -0
  515. package/dist/components/stream/overlays/types.js +7 -0
  516. package/dist/components/stream/overlays/useOverlayLayout.d.ts +27 -0
  517. package/dist/components/stream/overlays/useOverlayLayout.d.ts.map +1 -0
  518. package/dist/components/stream/overlays/useOverlayLayout.js +162 -0
  519. package/dist/components/trajectory-format.d.ts +6 -0
  520. package/dist/components/trajectory-format.d.ts.map +1 -0
  521. package/dist/components/trajectory-format.js +43 -0
  522. package/dist/components/ui-badges.d.ts +23 -0
  523. package/dist/components/ui-badges.d.ts.map +1 -0
  524. package/dist/components/ui-badges.js +38 -0
  525. package/dist/components/ui-switch.d.ts +14 -0
  526. package/dist/components/ui-switch.d.ts.map +1 -0
  527. package/dist/components/ui-switch.js +15 -0
  528. package/dist/components/vector-browser-three.d.ts +4 -0
  529. package/dist/components/vector-browser-three.d.ts.map +1 -0
  530. package/dist/components/vector-browser-three.js +19 -0
  531. package/dist/config/config-catalog.d.ts +376 -0
  532. package/dist/config/config-catalog.d.ts.map +1 -0
  533. package/dist/config/config-catalog.js +724 -0
  534. package/dist/config/config-field.d.ts +68 -0
  535. package/dist/config/config-field.d.ts.map +1 -0
  536. package/dist/config/config-field.js +821 -0
  537. package/dist/config/config-renderer.d.ts +176 -0
  538. package/dist/config/config-renderer.d.ts.map +1 -0
  539. package/dist/config/config-renderer.js +403 -0
  540. package/dist/config/index.d.ts +5 -0
  541. package/dist/config/index.d.ts.map +1 -0
  542. package/dist/config/index.js +4 -0
  543. package/dist/config/ui-renderer.d.ts +26 -0
  544. package/dist/config/ui-renderer.d.ts.map +1 -0
  545. package/dist/config/ui-renderer.js +815 -0
  546. package/dist/config/ui-spec.d.ts +164 -0
  547. package/dist/config/ui-spec.d.ts.map +1 -0
  548. package/dist/config/ui-spec.js +13 -0
  549. package/dist/events/index.d.ts +42 -0
  550. package/dist/events/index.d.ts.map +1 -0
  551. package/dist/events/index.js +41 -0
  552. package/dist/hooks/index.d.ts +14 -0
  553. package/dist/hooks/index.d.ts.map +1 -0
  554. package/dist/hooks/index.js +13 -0
  555. package/dist/hooks/useBugReport.d.ts +14 -0
  556. package/dist/hooks/useBugReport.d.ts.map +1 -0
  557. package/dist/hooks/useBugReport.js +18 -0
  558. package/dist/hooks/useCanvasWindow.d.ts +38 -0
  559. package/dist/hooks/useCanvasWindow.d.ts.map +1 -0
  560. package/dist/hooks/useCanvasWindow.js +273 -0
  561. package/dist/hooks/useChatAvatarVoice.d.ts +10 -0
  562. package/dist/hooks/useChatAvatarVoice.d.ts.map +1 -0
  563. package/dist/hooks/useChatAvatarVoice.js +71 -0
  564. package/dist/hooks/useContextMenu.d.ts +17 -0
  565. package/dist/hooks/useContextMenu.d.ts.map +1 -0
  566. package/dist/hooks/useContextMenu.js +100 -0
  567. package/dist/hooks/useKeyboardShortcuts.d.ts +17 -0
  568. package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  569. package/dist/hooks/useKeyboardShortcuts.js +67 -0
  570. package/dist/hooks/useLifoSync.d.ts +18 -0
  571. package/dist/hooks/useLifoSync.d.ts.map +1 -0
  572. package/dist/hooks/useLifoSync.js +113 -0
  573. package/dist/hooks/useMemoryMonitor.d.ts +87 -0
  574. package/dist/hooks/useMemoryMonitor.d.ts.map +1 -0
  575. package/dist/hooks/useMemoryMonitor.js +210 -0
  576. package/dist/hooks/useRenderGuard.d.ts +17 -0
  577. package/dist/hooks/useRenderGuard.d.ts.map +1 -0
  578. package/dist/hooks/useRenderGuard.js +36 -0
  579. package/dist/hooks/useRetakeCapture.d.ts +12 -0
  580. package/dist/hooks/useRetakeCapture.d.ts.map +1 -0
  581. package/dist/hooks/useRetakeCapture.js +59 -0
  582. package/dist/hooks/useStreamPopoutNavigation.d.ts +3 -0
  583. package/dist/hooks/useStreamPopoutNavigation.d.ts.map +1 -0
  584. package/dist/hooks/useStreamPopoutNavigation.js +17 -0
  585. package/dist/hooks/useTimeout.d.ts +11 -0
  586. package/dist/hooks/useTimeout.d.ts.map +1 -0
  587. package/dist/hooks/useTimeout.js +32 -0
  588. package/dist/hooks/useVoiceChat.d.ts +129 -0
  589. package/dist/hooks/useVoiceChat.d.ts.map +1 -0
  590. package/dist/hooks/useVoiceChat.js +1071 -0
  591. package/dist/hooks/useWhatsAppPairing.d.ts +11 -0
  592. package/dist/hooks/useWhatsAppPairing.d.ts.map +1 -0
  593. package/dist/hooks/useWhatsAppPairing.js +95 -0
  594. package/dist/i18n/index.d.ts +7 -0
  595. package/dist/i18n/index.d.ts.map +1 -0
  596. package/dist/i18n/index.js +53 -0
  597. package/dist/i18n/locales/en.json +1196 -0
  598. package/dist/i18n/locales/es.json +1196 -0
  599. package/dist/i18n/locales/ko.json +1196 -0
  600. package/dist/i18n/locales/pt.json +1196 -0
  601. package/dist/i18n/locales/zh-CN.json +1196 -0
  602. package/dist/i18n/messages.d.ts +6 -0
  603. package/dist/i18n/messages.d.ts.map +1 -0
  604. package/dist/i18n/messages.js +14 -0
  605. package/dist/index.d.ts +5 -0
  606. package/dist/index.d.ts.map +1 -0
  607. package/dist/index.js +6 -0
  608. package/dist/navigation/index.d.ts +27 -0
  609. package/dist/navigation/index.d.ts.map +1 -0
  610. package/dist/navigation/index.js +230 -0
  611. package/dist/package.json +161 -0
  612. package/dist/platform/browser-launch.d.ts +2 -0
  613. package/dist/platform/browser-launch.d.ts.map +1 -0
  614. package/dist/platform/browser-launch.js +109 -0
  615. package/dist/platform/index.d.ts +64 -0
  616. package/dist/platform/index.d.ts.map +1 -0
  617. package/dist/platform/index.js +155 -0
  618. package/dist/platform/init.d.ts +40 -0
  619. package/dist/platform/init.d.ts.map +1 -0
  620. package/dist/platform/init.js +158 -0
  621. package/dist/providers/index.d.ts +13 -0
  622. package/dist/providers/index.d.ts.map +1 -0
  623. package/dist/providers/index.js +72 -0
  624. package/dist/state/AppContext.d.ts +11 -0
  625. package/dist/state/AppContext.d.ts.map +1 -0
  626. package/dist/state/AppContext.js +4496 -0
  627. package/dist/state/index.d.ts +7 -0
  628. package/dist/state/index.d.ts.map +1 -0
  629. package/dist/state/index.js +6 -0
  630. package/dist/state/internal.d.ts +6 -0
  631. package/dist/state/internal.d.ts.map +1 -0
  632. package/dist/state/internal.js +5 -0
  633. package/dist/state/parsers.d.ts +26 -0
  634. package/dist/state/parsers.d.ts.map +1 -0
  635. package/dist/state/parsers.js +255 -0
  636. package/dist/state/persistence.d.ts +36 -0
  637. package/dist/state/persistence.d.ts.map +1 -0
  638. package/dist/state/persistence.js +254 -0
  639. package/dist/state/types.d.ts +402 -0
  640. package/dist/state/types.d.ts.map +1 -0
  641. package/dist/state/types.js +70 -0
  642. package/dist/state/ui-preferences.d.ts +3 -0
  643. package/dist/state/ui-preferences.d.ts.map +1 -0
  644. package/dist/state/ui-preferences.js +1 -0
  645. package/dist/state/useApp.d.ts +4 -0
  646. package/dist/state/useApp.d.ts.map +1 -0
  647. package/dist/state/useApp.js +22 -0
  648. package/dist/state/vrm.d.ts +19 -0
  649. package/dist/state/vrm.d.ts.map +1 -0
  650. package/dist/state/vrm.js +65 -0
  651. package/dist/stories/AppMockProvider.d.ts +15 -0
  652. package/dist/stories/AppMockProvider.d.ts.map +1 -0
  653. package/dist/stories/AppMockProvider.js +14 -0
  654. package/dist/styles/anime.css +6324 -0
  655. package/dist/styles/base.css +196 -0
  656. package/dist/styles/onboarding-game.css +716 -0
  657. package/dist/styles/styles.css +2085 -0
  658. package/dist/styles/xterm.css +241 -0
  659. package/dist/types/index.d.ts +657 -0
  660. package/dist/types/index.d.ts.map +1 -0
  661. package/dist/types/index.js +1 -0
  662. package/dist/utils/asset-url.d.ts +26 -0
  663. package/dist/utils/asset-url.d.ts.map +1 -0
  664. package/dist/utils/asset-url.js +99 -0
  665. package/dist/utils/assistant-text.d.ts +2 -0
  666. package/dist/utils/assistant-text.d.ts.map +1 -0
  667. package/dist/utils/assistant-text.js +161 -0
  668. package/dist/utils/clipboard.d.ts +2 -0
  669. package/dist/utils/clipboard.d.ts.map +1 -0
  670. package/dist/utils/clipboard.js +38 -0
  671. package/dist/utils/desktop-dialogs.d.ts +19 -0
  672. package/dist/utils/desktop-dialogs.d.ts.map +1 -0
  673. package/dist/utils/desktop-dialogs.js +50 -0
  674. package/dist/utils/index.d.ts +7 -0
  675. package/dist/utils/index.d.ts.map +1 -0
  676. package/dist/utils/index.js +6 -0
  677. package/dist/utils/number-parsing.d.ts +44 -0
  678. package/dist/utils/number-parsing.d.ts.map +1 -0
  679. package/dist/utils/number-parsing.js +56 -0
  680. package/dist/utils/openExternalUrl.d.ts +2 -0
  681. package/dist/utils/openExternalUrl.d.ts.map +1 -0
  682. package/dist/utils/openExternalUrl.js +17 -0
  683. package/dist/utils/spoken-text.d.ts +2 -0
  684. package/dist/utils/spoken-text.d.ts.map +1 -0
  685. package/dist/utils/spoken-text.js +56 -0
  686. package/dist/utils/streaming-text.d.ts +3 -0
  687. package/dist/utils/streaming-text.d.ts.map +1 -0
  688. package/dist/utils/streaming-text.js +87 -0
  689. package/dist/voice/index.d.ts +2 -0
  690. package/dist/voice/index.d.ts.map +1 -0
  691. package/dist/voice/index.js +1 -0
  692. package/dist/voice/types.d.ts +25 -0
  693. package/dist/voice/types.d.ts.map +1 -0
  694. package/dist/voice/types.js +166 -0
  695. package/package.json +86 -0
  696. package/src/App.tsx +469 -0
  697. package/src/actions/character.ts +113 -0
  698. package/src/actions/chat-helpers.ts +100 -0
  699. package/src/actions/cloud.ts +59 -0
  700. package/src/actions/index.ts +12 -0
  701. package/src/actions/lifecycle.ts +175 -0
  702. package/src/actions/onboarding.ts +46 -0
  703. package/src/actions/triggers.ts +190 -0
  704. package/src/ambient.d.ts +16 -0
  705. package/src/api/client.ts +5616 -0
  706. package/src/api/index.ts +1 -0
  707. package/src/autonomy/index.ts +477 -0
  708. package/src/bridge/capacitor-bridge.ts +295 -0
  709. package/src/bridge/electrobun-rpc.ts +58 -0
  710. package/src/bridge/electrobun-runtime.ts +28 -0
  711. package/src/bridge/index.ts +5 -0
  712. package/src/bridge/native-plugins.ts +134 -0
  713. package/src/bridge/plugin-bridge.ts +352 -0
  714. package/src/bridge/storage-bridge.ts +162 -0
  715. package/src/chat/index.ts +251 -0
  716. package/src/coding/index.ts +43 -0
  717. package/src/components/AdvancedPageView.tsx +362 -0
  718. package/src/components/AgentActivityBox.tsx +49 -0
  719. package/src/components/ApiKeyConfig.tsx +224 -0
  720. package/src/components/AppsPageView.tsx +52 -0
  721. package/src/components/AppsView.tsx +293 -0
  722. package/src/components/AvatarLoader.tsx +86 -0
  723. package/src/components/AvatarSelector.tsx +223 -0
  724. package/src/components/BscTradePanel.tsx +549 -0
  725. package/src/components/BugReportModal.tsx +499 -0
  726. package/src/components/CharacterView.tsx +1623 -0
  727. package/src/components/ChatAvatar.test.ts +96 -0
  728. package/src/components/ChatAvatar.tsx +147 -0
  729. package/src/components/ChatComposer.tsx +330 -0
  730. package/src/components/ChatMessage.tsx +448 -0
  731. package/src/components/ChatModalView.test.tsx +118 -0
  732. package/src/components/ChatModalView.tsx +125 -0
  733. package/src/components/ChatView.tsx +999 -0
  734. package/src/components/CloudSourceControls.tsx +80 -0
  735. package/src/components/CodingAgentSettingsSection.tsx +536 -0
  736. package/src/components/CommandPalette.tsx +284 -0
  737. package/src/components/CompanionSceneHost.tsx +498 -0
  738. package/src/components/CompanionShell.tsx +31 -0
  739. package/src/components/CompanionView.tsx +109 -0
  740. package/src/components/ConfigPageView.tsx +722 -0
  741. package/src/components/ConfigSaveFooter.tsx +41 -0
  742. package/src/components/ConfirmModal.tsx +379 -0
  743. package/src/components/ConnectionFailedBanner.tsx +91 -0
  744. package/src/components/ConnectorsPageView.tsx +13 -0
  745. package/src/components/ConversationsSidebar.tsx +279 -0
  746. package/src/components/CustomActionEditor.tsx +1125 -0
  747. package/src/components/CustomActionsPanel.tsx +288 -0
  748. package/src/components/CustomActionsView.tsx +322 -0
  749. package/src/components/DatabasePageView.tsx +55 -0
  750. package/src/components/DatabaseView.tsx +814 -0
  751. package/src/components/ElizaCloudDashboard.tsx +1696 -0
  752. package/src/components/EmotePicker.tsx +529 -0
  753. package/src/components/ErrorBoundary.tsx +76 -0
  754. package/src/components/FineTuningView.tsx +1080 -0
  755. package/src/components/GameView.tsx +551 -0
  756. package/src/components/GameViewOverlay.tsx +133 -0
  757. package/src/components/GlobalEmoteOverlay.tsx +152 -0
  758. package/src/components/Header.test.tsx +413 -0
  759. package/src/components/Header.tsx +400 -0
  760. package/src/components/HeartbeatsView.tsx +1002 -0
  761. package/src/components/InventoryView.tsx +372 -0
  762. package/src/components/KnowledgeView.tsx +1128 -0
  763. package/src/components/LanguageDropdown.tsx +187 -0
  764. package/src/components/LifoMonitorPanel.tsx +196 -0
  765. package/src/components/LifoSandboxView.tsx +499 -0
  766. package/src/components/LoadingScreen.tsx +77 -0
  767. package/src/components/LogsPageView.tsx +17 -0
  768. package/src/components/LogsView.tsx +239 -0
  769. package/src/components/MediaGalleryView.tsx +432 -0
  770. package/src/components/MediaSettingsSection.tsx +893 -0
  771. package/src/components/MessageContent.tsx +815 -0
  772. package/src/components/OnboardingWizard.test.tsx +107 -0
  773. package/src/components/OnboardingWizard.tsx +186 -0
  774. package/src/components/PairingView.tsx +110 -0
  775. package/src/components/PermissionsSection.tsx +818 -0
  776. package/src/components/PluginsPageView.tsx +9 -0
  777. package/src/components/PluginsView.tsx +3152 -0
  778. package/src/components/ProviderSwitcher.tsx +874 -0
  779. package/src/components/RestartBanner.tsx +76 -0
  780. package/src/components/RuntimeView.tsx +460 -0
  781. package/src/components/SaveCommandModal.tsx +211 -0
  782. package/src/components/SecretsView.tsx +569 -0
  783. package/src/components/SettingsView.tsx +825 -0
  784. package/src/components/ShellOverlays.tsx +41 -0
  785. package/src/components/ShortcutsOverlay.tsx +155 -0
  786. package/src/components/SkillsView.tsx +1435 -0
  787. package/src/components/StartupFailureView.tsx +63 -0
  788. package/src/components/StreamView.tsx +483 -0
  789. package/src/components/StripeEmbeddedCheckout.tsx +155 -0
  790. package/src/components/SubscriptionStatus.tsx +634 -0
  791. package/src/components/SystemWarningBanner.tsx +71 -0
  792. package/src/components/ThemeToggle.tsx +100 -0
  793. package/src/components/TrajectoriesView.tsx +526 -0
  794. package/src/components/TrajectoryDetailView.tsx +426 -0
  795. package/src/components/TriggersView.tsx +1 -0
  796. package/src/components/VectorBrowserView.tsx +1633 -0
  797. package/src/components/VoiceConfigView.tsx +674 -0
  798. package/src/components/VrmStage.test.ts +219 -0
  799. package/src/components/VrmStage.tsx +432 -0
  800. package/src/components/WhatsAppQrOverlay.tsx +230 -0
  801. package/src/components/__tests__/chainConfig.test.ts +220 -0
  802. package/src/components/apps/AppDetailPane.tsx +242 -0
  803. package/src/components/apps/AppsCatalogGrid.tsx +137 -0
  804. package/src/components/apps/extensions/HyperscapeAppDetailPanel.tsx +577 -0
  805. package/src/components/apps/extensions/registry.ts +16 -0
  806. package/src/components/apps/extensions/types.ts +9 -0
  807. package/src/components/apps/helpers.ts +44 -0
  808. package/src/components/avatar/VrmAnimationLoader.test.ts +164 -0
  809. package/src/components/avatar/VrmAnimationLoader.ts +151 -0
  810. package/src/components/avatar/VrmBlinkController.ts +118 -0
  811. package/src/components/avatar/VrmCameraManager.ts +407 -0
  812. package/src/components/avatar/VrmEngine.ts +2678 -0
  813. package/src/components/avatar/VrmFootShadow.ts +96 -0
  814. package/src/components/avatar/VrmViewer.tsx +421 -0
  815. package/src/components/avatar/__tests__/VrmCameraManager.test.ts +168 -0
  816. package/src/components/avatar/__tests__/VrmEngine.test.ts +1574 -0
  817. package/src/components/avatar/mixamoVRMRigMap.ts +62 -0
  818. package/src/components/avatar/retargetMixamoFbxToVrm.ts +144 -0
  819. package/src/components/avatar/retargetMixamoGltfToVrm.ts +119 -0
  820. package/src/components/chainConfig.ts +380 -0
  821. package/src/components/companion/CompanionHeader.tsx +47 -0
  822. package/src/components/companion/CompanionSceneHost.tsx +5 -0
  823. package/src/components/companion/VrmStage.tsx +2 -0
  824. package/src/components/companion/__tests__/walletUtils.test.ts +742 -0
  825. package/src/components/companion/walletUtils.ts +290 -0
  826. package/src/components/companion-shell-styles.test.ts +146 -0
  827. package/src/components/companion-shell-styles.ts +270 -0
  828. package/src/components/confirm-delete-control.tsx +69 -0
  829. package/src/components/conversations/ConversationListItem.tsx +185 -0
  830. package/src/components/conversations/conversation-utils.ts +151 -0
  831. package/src/components/format.ts +131 -0
  832. package/src/components/index.ts +92 -0
  833. package/src/components/inventory/CopyableAddress.tsx +41 -0
  834. package/src/components/inventory/InventoryToolbar.tsx +142 -0
  835. package/src/components/inventory/NftGrid.tsx +99 -0
  836. package/src/components/inventory/TokenLogo.tsx +71 -0
  837. package/src/components/inventory/TokensTable.tsx +216 -0
  838. package/src/components/inventory/constants.ts +170 -0
  839. package/src/components/inventory/index.ts +29 -0
  840. package/src/components/inventory/media-url.test.ts +38 -0
  841. package/src/components/inventory/media-url.ts +36 -0
  842. package/src/components/inventory/useInventoryData.ts +460 -0
  843. package/src/components/knowledge-upload-image.ts +215 -0
  844. package/src/components/labels.ts +46 -0
  845. package/src/components/onboarding/ActivateStep.tsx +30 -0
  846. package/src/components/onboarding/ConnectionStep.tsx +1530 -0
  847. package/src/components/onboarding/OnboardingPanel.tsx +39 -0
  848. package/src/components/onboarding/OnboardingStepNav.tsx +31 -0
  849. package/src/components/onboarding/PermissionsStep.tsx +20 -0
  850. package/src/components/onboarding/RpcStep.tsx +402 -0
  851. package/src/components/onboarding/WakeUpStep.tsx +184 -0
  852. package/src/components/permissions/PermissionIcon.tsx +25 -0
  853. package/src/components/permissions/StreamingPermissions.tsx +376 -0
  854. package/src/components/plugins/showcase-data.ts +481 -0
  855. package/src/components/shared/ShellHeaderControls.tsx +193 -0
  856. package/src/components/skeletons.tsx +88 -0
  857. package/src/components/stream/ActivityFeed.tsx +113 -0
  858. package/src/components/stream/AvatarPip.tsx +10 -0
  859. package/src/components/stream/ChatContent.tsx +126 -0
  860. package/src/components/stream/ChatTicker.tsx +55 -0
  861. package/src/components/stream/IdleContent.tsx +73 -0
  862. package/src/components/stream/StatusBar.tsx +469 -0
  863. package/src/components/stream/StreamSettings.tsx +506 -0
  864. package/src/components/stream/StreamTerminal.tsx +94 -0
  865. package/src/components/stream/StreamVoiceConfig.tsx +160 -0
  866. package/src/components/stream/helpers.ts +134 -0
  867. package/src/components/stream/overlays/OverlayLayer.tsx +75 -0
  868. package/src/components/stream/overlays/built-in/ActionTickerWidget.tsx +64 -0
  869. package/src/components/stream/overlays/built-in/AlertPopupWidget.tsx +87 -0
  870. package/src/components/stream/overlays/built-in/BrandingWidget.tsx +51 -0
  871. package/src/components/stream/overlays/built-in/CustomHtmlWidget.tsx +105 -0
  872. package/src/components/stream/overlays/built-in/PeonGlassWidget.tsx +265 -0
  873. package/src/components/stream/overlays/built-in/PeonHudWidget.tsx +247 -0
  874. package/src/components/stream/overlays/built-in/PeonSakuraWidget.tsx +278 -0
  875. package/src/components/stream/overlays/built-in/ThoughtBubbleWidget.tsx +77 -0
  876. package/src/components/stream/overlays/built-in/ViewerCountWidget.tsx +46 -0
  877. package/src/components/stream/overlays/built-in/index.ts +13 -0
  878. package/src/components/stream/overlays/registry.ts +22 -0
  879. package/src/components/stream/overlays/types.ts +90 -0
  880. package/src/components/stream/overlays/useOverlayLayout.ts +218 -0
  881. package/src/components/trajectory-format.ts +50 -0
  882. package/src/components/ui-badges.tsx +109 -0
  883. package/src/components/ui-switch.tsx +57 -0
  884. package/src/components/vector-browser-three.ts +27 -0
  885. package/src/config/config-catalog.ts +1092 -0
  886. package/src/config/config-field.tsx +1900 -0
  887. package/src/config/config-renderer.tsx +730 -0
  888. package/src/config/index.ts +11 -0
  889. package/src/config/ui-renderer.tsx +1751 -0
  890. package/src/config/ui-spec.ts +256 -0
  891. package/src/events/index.ts +89 -0
  892. package/src/hooks/index.ts +13 -0
  893. package/src/hooks/useBugReport.tsx +43 -0
  894. package/src/hooks/useCanvasWindow.ts +372 -0
  895. package/src/hooks/useChatAvatarVoice.ts +111 -0
  896. package/src/hooks/useContextMenu.ts +127 -0
  897. package/src/hooks/useKeyboardShortcuts.ts +86 -0
  898. package/src/hooks/useLifoSync.ts +143 -0
  899. package/src/hooks/useMemoryMonitor.ts +335 -0
  900. package/src/hooks/useRenderGuard.ts +43 -0
  901. package/src/hooks/useRetakeCapture.ts +67 -0
  902. package/src/hooks/useStreamPopoutNavigation.ts +27 -0
  903. package/src/hooks/useTimeout.ts +37 -0
  904. package/src/hooks/useVoiceChat.ts +1443 -0
  905. package/src/hooks/useWhatsAppPairing.ts +123 -0
  906. package/src/i18n/index.ts +76 -0
  907. package/src/i18n/locales/en.json +1196 -0
  908. package/src/i18n/locales/es.json +1196 -0
  909. package/src/i18n/locales/ko.json +1196 -0
  910. package/src/i18n/locales/pt.json +1196 -0
  911. package/src/i18n/locales/zh-CN.json +1196 -0
  912. package/src/i18n/messages.ts +21 -0
  913. package/src/index.ts +6 -0
  914. package/src/navigation/index.ts +282 -0
  915. package/src/navigation.test.ts +189 -0
  916. package/src/platform/browser-launch.test.ts +94 -0
  917. package/src/platform/browser-launch.ts +149 -0
  918. package/src/platform/index.ts +261 -0
  919. package/src/platform/init.ts +236 -0
  920. package/src/providers/index.ts +82 -0
  921. package/src/state/AppContext.tsx +5737 -0
  922. package/src/state/index.ts +6 -0
  923. package/src/state/internal.ts +77 -0
  924. package/src/state/parsers.test.ts +124 -0
  925. package/src/state/parsers.ts +309 -0
  926. package/src/state/persistence.ts +278 -0
  927. package/src/state/types.ts +694 -0
  928. package/src/state/ui-preferences.ts +3 -0
  929. package/src/state/useApp.ts +23 -0
  930. package/src/state/vrm.ts +76 -0
  931. package/src/stories/AppMockProvider.tsx +32 -0
  932. package/src/stories/ChatEmptyState.stories.tsx +27 -0
  933. package/src/stories/ChatMessage.stories.tsx +115 -0
  934. package/src/stories/CompanionHeader.stories.tsx +74 -0
  935. package/src/stories/CompanionView.stories.tsx +33 -0
  936. package/src/stories/ConversationListItem.stories.tsx +102 -0
  937. package/src/stories/TypingIndicator.stories.tsx +28 -0
  938. package/src/styles/anime.css +6324 -0
  939. package/src/styles/base.css +196 -0
  940. package/src/styles/onboarding-game.css +716 -0
  941. package/src/styles/styles.css +2085 -0
  942. package/src/styles/xterm.css +241 -0
  943. package/src/types/index.ts +715 -0
  944. package/src/types/react-test-renderer.d.ts +45 -0
  945. package/src/utils/asset-url.ts +110 -0
  946. package/src/utils/assistant-text.ts +172 -0
  947. package/src/utils/clipboard.ts +41 -0
  948. package/src/utils/desktop-dialogs.ts +80 -0
  949. package/src/utils/index.ts +6 -0
  950. package/src/utils/number-parsing.ts +125 -0
  951. package/src/utils/openExternalUrl.ts +20 -0
  952. package/src/utils/spoken-text.ts +65 -0
  953. package/src/utils/streaming-text.ts +120 -0
  954. package/src/voice/index.ts +1 -0
  955. package/src/voice/types.ts +197 -0
  956. package/test/app/AppContext.pty-sessions.test.tsx +143 -0
  957. package/test/app/MessageContent.test.tsx +326 -0
  958. package/test/app/PermissionsOnboarding.test.tsx +216 -0
  959. package/test/app/PermissionsSection.test.tsx +186 -0
  960. package/test/app/advanced-trajectory-fine-tuning.e2e.test.ts +397 -0
  961. package/test/app/agent-activity-box.test.tsx +132 -0
  962. package/test/app/agent-transfer-lock.test.ts +274 -0
  963. package/test/app/api-client-electron-fallback.test.ts +139 -0
  964. package/test/app/api-client-timeout.test.ts +75 -0
  965. package/test/app/api-client-ws.test.ts +98 -0
  966. package/test/app/api-client.ws-max-reconnect.test.ts +139 -0
  967. package/test/app/api-client.ws-reconnect.test.ts +157 -0
  968. package/test/app/app-context-autonomy-events.test.ts +478 -0
  969. package/test/app/apps-page-view.test.ts +114 -0
  970. package/test/app/apps-view.test.ts +769 -0
  971. package/test/app/autonomous-workflows.e2e.test.ts +765 -0
  972. package/test/app/autonomy-events.test.ts +150 -0
  973. package/test/app/avatar-selector.test.tsx +52 -0
  974. package/test/app/bsc-trade-panel.test.tsx +134 -0
  975. package/test/app/bug-report-modal.test.tsx +353 -0
  976. package/test/app/character-customization.e2e.test.ts +1168 -0
  977. package/test/app/chat-advanced-features.e2e.test.ts +706 -0
  978. package/test/app/chat-composer.test.tsx +181 -0
  979. package/test/app/chat-language-header.test.ts +64 -0
  980. package/test/app/chat-message.test.tsx +222 -0
  981. package/test/app/chat-modal-view.test.tsx +191 -0
  982. package/test/app/chat-routine-filter.test.ts +96 -0
  983. package/test/app/chat-send-lock.test.ts +1302 -0
  984. package/test/app/chat-stream-api-client.test.tsx +390 -0
  985. package/test/app/chat-view-game-modal.test.tsx +661 -0
  986. package/test/app/chat-view.test.tsx +877 -0
  987. package/test/app/cloud-api.e2e.test.ts +258 -0
  988. package/test/app/cloud-login-flow.e2e.test.ts +494 -0
  989. package/test/app/cloud-login-lock.test.ts +411 -0
  990. package/test/app/command-palette.test.tsx +184 -0
  991. package/test/app/command-registry.test.ts +75 -0
  992. package/test/app/companion-greeting-wave.test.tsx +443 -0
  993. package/test/app/companion-stale-conversation.test.tsx +424 -0
  994. package/test/app/companion-view.test.tsx +686 -0
  995. package/test/app/confirm-delete-control.test.ts +79 -0
  996. package/test/app/confirm-modal.test.tsx +219 -0
  997. package/test/app/connectors-ui.e2e.test.ts +508 -0
  998. package/test/app/conversations-sidebar-game-modal.test.tsx +260 -0
  999. package/test/app/conversations-sidebar.test.tsx +160 -0
  1000. package/test/app/custom-actions-smoke.test.ts +387 -0
  1001. package/test/app/custom-avatar-api-client.test.ts +207 -0
  1002. package/test/app/desktop-utils.test.ts +145 -0
  1003. package/test/app/electrobun-rpc-bridge.test.ts +83 -0
  1004. package/test/app/events.test.ts +88 -0
  1005. package/test/app/export-import-flows.e2e.test.ts +700 -0
  1006. package/test/app/fine-tuning-view.test.ts +471 -0
  1007. package/test/app/game-view-auth-session.test.tsx +186 -0
  1008. package/test/app/game-view.test.ts +444 -0
  1009. package/test/app/global-emote-overlay.test.tsx +106 -0
  1010. package/test/app/header-status.test.tsx +149 -0
  1011. package/test/app/i18n.test.ts +152 -0
  1012. package/test/app/inventory-bsc-view.test.ts +908 -0
  1013. package/test/app/knowledge-ui.e2e.test.ts +762 -0
  1014. package/test/app/knowledge-upload-helpers.test.ts +124 -0
  1015. package/test/app/lifecycle-lock.test.ts +267 -0
  1016. package/test/app/lifo-popout-utils.test.ts +208 -0
  1017. package/test/app/lifo-safe-endpoint.test.ts +34 -0
  1018. package/test/app/loading-screen.test.tsx +45 -0
  1019. package/test/app/memory-monitor.test.ts +332 -0
  1020. package/test/app/navigation.test.tsx +29 -0
  1021. package/test/app/onboarding-finish-lock.test.ts +500 -0
  1022. package/test/app/onboarding-language.test.tsx +161 -0
  1023. package/test/app/onboarding-steps.test.tsx +371 -0
  1024. package/test/app/open-external-url.test.ts +65 -0
  1025. package/test/app/pages-navigation-smoke.e2e.test.ts +633 -0
  1026. package/test/app/pairing-lock.test.ts +260 -0
  1027. package/test/app/pairing-view.test.tsx +74 -0
  1028. package/test/app/permissions-section.test.ts +432 -0
  1029. package/test/app/plugin-bridge.test.ts +109 -0
  1030. package/test/app/plugins-ui.e2e.test.ts +605 -0
  1031. package/test/app/plugins-view-game-modal.test.tsx +650 -0
  1032. package/test/app/plugins-view-toggle-restart.test.ts +129 -0
  1033. package/test/app/provider-dropdown-default.test.tsx +164 -0
  1034. package/test/app/restart-banner.test.tsx +197 -0
  1035. package/test/app/retake-capture.test.ts +84 -0
  1036. package/test/app/sandbox-api-client.test.ts +108 -0
  1037. package/test/app/save-command-modal.test.tsx +109 -0
  1038. package/test/app/secrets-view.test.tsx +92 -0
  1039. package/test/app/settings-control-styles.test.tsx +142 -0
  1040. package/test/app/settings-reset.e2e.test.ts +728 -0
  1041. package/test/app/settings-sections.e2e.test.ts +614 -0
  1042. package/test/app/shared-format.test.ts +44 -0
  1043. package/test/app/shared-switch.test.ts +69 -0
  1044. package/test/app/shell-mode-switching.e2e.test.ts +829 -0
  1045. package/test/app/shell-mode-tab-memory.test.tsx +283 -0
  1046. package/test/app/shell-overlays.test.tsx +50 -0
  1047. package/test/app/shortcuts-overlay.test.tsx +111 -0
  1048. package/test/app/sse-interruption.test.ts +122 -0
  1049. package/test/app/startup-asset-missing.e2e.test.ts +126 -0
  1050. package/test/app/startup-backend-missing.e2e.test.ts +118 -0
  1051. package/test/app/startup-chat.e2e.test.ts +305 -0
  1052. package/test/app/startup-conversation-restore.test.tsx +344 -0
  1053. package/test/app/startup-failure-view.test.tsx +103 -0
  1054. package/test/app/startup-onboarding.e2e.test.ts +612 -0
  1055. package/test/app/startup-timeout.test.tsx +80 -0
  1056. package/test/app/startup-token-401.e2e.test.ts +103 -0
  1057. package/test/app/stream-helpers.test.ts +46 -0
  1058. package/test/app/stream-popout-navigation.test.tsx +41 -0
  1059. package/test/app/stream-status-bar.test.tsx +89 -0
  1060. package/test/app/theme-toggle.test.tsx +33 -0
  1061. package/test/app/training-api-client.test.ts +128 -0
  1062. package/test/app/trajectories-view.test.tsx +220 -0
  1063. package/test/app/triggers-api-client.test.ts +77 -0
  1064. package/test/app/triggers-navigation.test.ts +118 -0
  1065. package/test/app/triggers-view.e2e.test.ts +674 -0
  1066. package/test/app/update-channel-lock.test.ts +259 -0
  1067. package/test/app/vector-browser.async-cleanup.test.tsx +367 -0
  1068. package/test/app/vector-browser.e2e.test.ts +653 -0
  1069. package/test/app/vrm-stage.test.tsx +351 -0
  1070. package/test/app/vrm-viewer.test.tsx +298 -0
  1071. package/test/app/wallet-api-save-lock.test.ts +277 -0
  1072. package/test/app/wallet-hooks.test.ts +405 -0
  1073. package/test/app/wallet-ui-flows.e2e.test.ts +556 -0
  1074. package/test/avatar/asset-url.test.ts +90 -0
  1075. package/test/avatar/avatar-selector.test.ts +173 -0
  1076. package/test/avatar/mixamo-vrm-rig-map.test.ts +111 -0
  1077. package/test/avatar/voice-chat-streaming-text.test.ts +96 -0
  1078. package/test/avatar/voice-chat.test.ts +391 -0
  1079. package/test/ui/command-palette-commands.test.ts +57 -0
  1080. package/test/ui/ui-renderer.test.ts +39 -0
  1081. package/tsconfig.build.json +19 -0
  1082. package/tsconfig.json +21 -0
@@ -0,0 +1,301 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * SubscriptionStatus — Anthropic and OpenAI subscription connection panels.
4
+ *
5
+ * Extracted from SettingsView.tsx for decomposition (P2 §10).
6
+ */
7
+ import { Button, Input } from "@elizaos/ui";
8
+ import { useCallback, useRef, useState } from "react";
9
+ import { client } from "../api";
10
+ import { useTimeout } from "../hooks";
11
+ import { useApp } from "../state";
12
+ import { openExternalUrl } from "../utils";
13
+ function formatRequestError(err) {
14
+ if (err instanceof Error)
15
+ return err.message;
16
+ return String(err);
17
+ }
18
+ function normalizeOpenAICallbackInput(input) {
19
+ const trimmed = input.trim();
20
+ if (!trimmed) {
21
+ return {
22
+ ok: false,
23
+ error: "subscriptionstatus.PasteCallbackUrlFromLocalhost",
24
+ };
25
+ }
26
+ const normalized = trimmed.startsWith("localhost:") || trimmed.startsWith("127.0.0.1:")
27
+ ? `http://${trimmed}`
28
+ : trimmed;
29
+ // Allow raw codes in addition to full callback URLs.
30
+ if (!normalized.includes("://")) {
31
+ if (normalized.length > 4096) {
32
+ return { ok: false, error: "subscriptionstatus.CallbackCodeTooLong" };
33
+ }
34
+ return { ok: true, code: normalized };
35
+ }
36
+ let parsed;
37
+ try {
38
+ parsed = new URL(normalized);
39
+ }
40
+ catch {
41
+ return { ok: false, error: "subscriptionstatus.InvalidCallbackUrl" };
42
+ }
43
+ const hostOk = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1";
44
+ if (!hostOk ||
45
+ parsed.port !== "1455" ||
46
+ parsed.pathname !== "/auth/callback") {
47
+ return {
48
+ ok: false,
49
+ error: "subscriptionstatus.ExpectedCallbackUrl",
50
+ };
51
+ }
52
+ if (!parsed.searchParams.get("code")) {
53
+ return {
54
+ ok: false,
55
+ error: "subscriptionstatus.CallbackUrlMissingCode",
56
+ };
57
+ }
58
+ return { ok: true, code: normalized };
59
+ }
60
+ export function SubscriptionStatus({ resolvedSelectedId, subscriptionStatus, anthropicConnected, setAnthropicConnected, openaiConnected, setOpenaiConnected, handleSelectSubscription, loadSubscriptionStatus, }) {
61
+ const { setTimeout } = useTimeout();
62
+ const { t } = useApp();
63
+ const [subscriptionTab, setSubscriptionTab] = useState("token");
64
+ const [setupTokenValue, setSetupTokenValue] = useState("");
65
+ const [setupTokenSaving, setSetupTokenSaving] = useState(false);
66
+ const setupTokenRef = useRef(setupTokenValue);
67
+ setupTokenRef.current = setupTokenValue;
68
+ const savingRef = useRef(setupTokenSaving);
69
+ savingRef.current = setupTokenSaving;
70
+ const [setupTokenSuccess, setSetupTokenSuccess] = useState(false);
71
+ const [anthropicOAuthStarted, setAnthropicOAuthStarted] = useState(false);
72
+ const [anthropicCode, setAnthropicCode] = useState("");
73
+ const anthropicCodeRef = useRef(anthropicCode);
74
+ anthropicCodeRef.current = anthropicCode;
75
+ const [anthropicError, setAnthropicError] = useState("");
76
+ const [anthropicExchangeBusy, setAnthropicExchangeBusy] = useState(false);
77
+ const anthropicExchangeBusyRef = useRef(false);
78
+ const [openaiOAuthStarted, setOpenaiOAuthStarted] = useState(false);
79
+ const [openaiCallbackUrl, setOpenaiCallbackUrl] = useState("");
80
+ const openaiCallbackRef = useRef(openaiCallbackUrl);
81
+ openaiCallbackRef.current = openaiCallbackUrl;
82
+ const [openaiError, setOpenaiError] = useState("");
83
+ const [openaiExchangeBusy, setOpenaiExchangeBusy] = useState(false);
84
+ const openaiExchangeBusyRef = useRef(false);
85
+ const [subscriptionDisconnecting, setSubscriptionDisconnecting] = useState(null);
86
+ const disconnectingRef = useRef(subscriptionDisconnecting);
87
+ disconnectingRef.current = subscriptionDisconnecting;
88
+ const anthropicStatus = subscriptionStatus.find((s) => s.provider === "anthropic-subscription");
89
+ const openaiStatus = subscriptionStatus.find((s) => s.provider === "openai-subscription" || s.provider === "openai-codex");
90
+ const handleSaveSetupToken = useCallback(async () => {
91
+ if (!setupTokenRef.current.trim() || savingRef.current)
92
+ return;
93
+ setSetupTokenSaving(true);
94
+ setSetupTokenSuccess(false);
95
+ setAnthropicError("");
96
+ try {
97
+ const result = await client.submitAnthropicSetupToken(setupTokenRef.current.trim());
98
+ if (!result.success) {
99
+ setAnthropicError(t("subscriptionstatus.FailedToSaveSetupToken"));
100
+ return;
101
+ }
102
+ setSetupTokenSuccess(true);
103
+ setSetupTokenValue("");
104
+ await handleSelectSubscription("anthropic-subscription");
105
+ await loadSubscriptionStatus();
106
+ await client.restartAgent();
107
+ setTimeout(() => setSetupTokenSuccess(false), 2000);
108
+ }
109
+ catch (err) {
110
+ setAnthropicError(t("subscriptionstatus.FailedToSaveTokenError", {
111
+ message: formatRequestError(err),
112
+ }));
113
+ }
114
+ finally {
115
+ setSetupTokenSaving(false);
116
+ }
117
+ }, [handleSelectSubscription, loadSubscriptionStatus, setTimeout, t]);
118
+ const handleDisconnectSubscription = useCallback(async (providerId) => {
119
+ if (disconnectingRef.current)
120
+ return;
121
+ setSubscriptionDisconnecting(providerId);
122
+ setAnthropicError("");
123
+ setOpenaiError("");
124
+ try {
125
+ const apiProvider = providerId === "openai-subscription" ? "openai-codex" : providerId;
126
+ await client.deleteSubscription(apiProvider);
127
+ await loadSubscriptionStatus();
128
+ if (providerId === "anthropic-subscription") {
129
+ setAnthropicConnected(false);
130
+ setAnthropicOAuthStarted(false);
131
+ setAnthropicCode("");
132
+ }
133
+ if (providerId === "openai-subscription") {
134
+ setOpenaiConnected(false);
135
+ setOpenaiOAuthStarted(false);
136
+ setOpenaiCallbackUrl("");
137
+ }
138
+ await client.restartAgent();
139
+ }
140
+ catch (err) {
141
+ const msg = t("subscriptionstatus.DisconnectFailedError", {
142
+ message: formatRequestError(err),
143
+ });
144
+ if (providerId === "anthropic-subscription")
145
+ setAnthropicError(msg);
146
+ if (providerId === "openai-subscription")
147
+ setOpenaiError(msg);
148
+ }
149
+ finally {
150
+ setSubscriptionDisconnecting(null);
151
+ }
152
+ }, [loadSubscriptionStatus, setAnthropicConnected, setOpenaiConnected, t]);
153
+ const handleAnthropicStart = useCallback(async () => {
154
+ setAnthropicError("");
155
+ try {
156
+ const { authUrl } = await client.startAnthropicLogin();
157
+ if (authUrl) {
158
+ await openExternalUrl(authUrl);
159
+ setAnthropicOAuthStarted(true);
160
+ return;
161
+ }
162
+ setAnthropicError(t("subscriptionstatus.FailedToGetAuthUrl"));
163
+ }
164
+ catch (err) {
165
+ setAnthropicError(t("subscriptionstatus.FailedToStartLogin", {
166
+ message: formatRequestError(err),
167
+ }));
168
+ }
169
+ }, [t]);
170
+ const handleAnthropicExchange = useCallback(async () => {
171
+ const code = anthropicCodeRef.current.trim();
172
+ if (!code || anthropicExchangeBusyRef.current)
173
+ return;
174
+ anthropicExchangeBusyRef.current = true;
175
+ setAnthropicExchangeBusy(true);
176
+ setAnthropicError("");
177
+ try {
178
+ const result = await client.exchangeAnthropicCode(code);
179
+ if (result.success) {
180
+ setAnthropicConnected(true);
181
+ setAnthropicOAuthStarted(false);
182
+ setAnthropicCode("");
183
+ await handleSelectSubscription("anthropic-subscription");
184
+ await loadSubscriptionStatus();
185
+ await client.restartAgent();
186
+ return;
187
+ }
188
+ setAnthropicError(result.error ?? t("subscriptionstatus.ExchangeFailed"));
189
+ }
190
+ catch (err) {
191
+ setAnthropicError(t("subscriptionstatus.ExchangeFailedError", {
192
+ message: formatRequestError(err),
193
+ }));
194
+ }
195
+ finally {
196
+ anthropicExchangeBusyRef.current = false;
197
+ setAnthropicExchangeBusy(false);
198
+ }
199
+ }, [
200
+ handleSelectSubscription,
201
+ loadSubscriptionStatus,
202
+ setAnthropicConnected,
203
+ t,
204
+ ]);
205
+ const handleOpenAIStart = useCallback(async () => {
206
+ setOpenaiError("");
207
+ try {
208
+ const { authUrl } = await client.startOpenAILogin();
209
+ if (authUrl) {
210
+ await openExternalUrl(authUrl);
211
+ setOpenaiOAuthStarted(true);
212
+ return;
213
+ }
214
+ setOpenaiError(t("subscriptionstatus.NoAuthUrlReturned"));
215
+ }
216
+ catch (err) {
217
+ setOpenaiError(t("subscriptionstatus.FailedToStartLogin", {
218
+ message: formatRequestError(err),
219
+ }));
220
+ }
221
+ }, [t]);
222
+ const handleOpenAIExchange = useCallback(async () => {
223
+ if (openaiExchangeBusyRef.current)
224
+ return;
225
+ const normalized = normalizeOpenAICallbackInput(openaiCallbackRef.current);
226
+ if (!normalized.ok) {
227
+ setOpenaiError(t(normalized.error));
228
+ return;
229
+ }
230
+ openaiExchangeBusyRef.current = true;
231
+ setOpenaiExchangeBusy(true);
232
+ setOpenaiError("");
233
+ try {
234
+ const data = await client.exchangeOpenAICode(normalized.code);
235
+ if (data.success) {
236
+ setOpenaiConnected(true);
237
+ setOpenaiOAuthStarted(false);
238
+ setOpenaiCallbackUrl("");
239
+ await handleSelectSubscription("openai-subscription");
240
+ await loadSubscriptionStatus();
241
+ await client.restartAgent();
242
+ return;
243
+ }
244
+ const msg = data.error ?? t("subscriptionstatus.ExchangeFailed");
245
+ setOpenaiError(msg.includes("No active flow")
246
+ ? t("onboarding.loginSessionExpired")
247
+ : msg);
248
+ }
249
+ catch (err) {
250
+ console.warn("[milady] OpenAI exchange failed", err);
251
+ setOpenaiError(t("onboarding.networkError"));
252
+ }
253
+ finally {
254
+ openaiExchangeBusyRef.current = false;
255
+ setOpenaiExchangeBusy(false);
256
+ }
257
+ }, [handleSelectSubscription, loadSubscriptionStatus, setOpenaiConnected, t]);
258
+ return (_jsxs("div", { className: "mt-4 pt-4 border-t border-[var(--border)]", children: [resolvedSelectedId === "anthropic-subscription" && (_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between items-center mb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-block w-2 h-2 rounded-full", style: {
259
+ background: anthropicConnected
260
+ ? "var(--ok,#16a34a)"
261
+ : "var(--warning,#f39c12)",
262
+ } }), _jsx("span", { className: "text-xs font-semibold", children: anthropicConnected
263
+ ? t("subscriptionstatus.ConnectedToClaudeSubscription")
264
+ : t("subscriptionstatus.ClaudeSubscriptionTitle") })] }), anthropicConnected && (_jsx(Button, { variant: "outline", size: "sm", className: "!mt-0", onClick: () => void handleDisconnectSubscription("anthropic-subscription"), disabled: subscriptionDisconnecting === "anthropic-subscription", children: subscriptionDisconnecting === "anthropic-subscription"
265
+ ? t("subscriptionstatus.Disconnecting")
266
+ : t("subscriptionstatus.Disconnect") }))] }), anthropicStatus?.configured && !anthropicStatus.valid && (_jsx("div", { className: "text-xs text-[var(--warning,#f39c12)] mb-3", children: t("subscriptionstatus.ClaudeSubscription") })), _jsxs("div", { className: "flex items-center gap-4 border-b border-[var(--border)] mb-3", children: [_jsx("button", { type: "button", className: `text-xs pb-2 border-b-2 ${subscriptionTab === "token"
267
+ ? "border-[var(--accent)] text-[var(--accent)]"
268
+ : "border-transparent text-[var(--muted)] hover:text-[var(--text)]"}`, onClick: () => setSubscriptionTab("token"), children: t("subscriptionstatus.SetupToken") }), _jsx("button", { type: "button", className: `text-xs pb-2 border-b-2 ${subscriptionTab === "oauth"
269
+ ? "border-[var(--accent)] text-[var(--accent)]"
270
+ : "border-transparent text-[var(--muted)] hover:text-[var(--text)]"}`, onClick: () => setSubscriptionTab("oauth"), children: t("subscriptionstatus.OAuthLogin") })] }), subscriptionTab === "token" ? (_jsxs("div", { children: [_jsx("label", { htmlFor: "subscription-setup-token-input", className: "text-xs font-semibold mb-1.5 block", children: t("subscriptionstatus.SetupToken") }), _jsx(Input, { id: "subscription-setup-token-input", type: "password", placeholder: t("subscriptionstatus.skAntOat01"), value: setupTokenValue, onChange: (e) => {
271
+ setSetupTokenValue(e.target.value);
272
+ setSetupTokenSuccess(false);
273
+ setAnthropicError("");
274
+ }, className: "bg-card text-xs font-mono" }), _jsx("div", { className: "text-[11px] text-[var(--muted)] mt-2 whitespace-pre-line", children: t("onboarding.setupTokenInstructions") }), anthropicError && (_jsx("div", { className: "text-[11px] text-[var(--danger,#e74c3c)] mt-2", children: anthropicError })), _jsxs("div", { className: "flex items-center justify-between mt-3", children: [_jsx(Button, { variant: "default", size: "sm", className: "!mt-0", disabled: setupTokenSaving || !setupTokenValue.trim(), onClick: () => void handleSaveSetupToken(), children: setupTokenSaving
275
+ ? t("subscriptionstatus.Saving")
276
+ : t("subscriptionstatus.SaveToken") }), _jsxs("div", { className: "flex items-center gap-2", children: [setupTokenSaving && (_jsx("span", { className: "text-[11px] text-[var(--muted)]", children: t("subscriptionstatus.SavingAmpRestart") })), setupTokenSuccess && (_jsx("span", { className: "text-[11px] text-[var(--ok,#16a34a)]", children: t("messagecontent.Saved") }))] })] })] })) : anthropicConnected ? (_jsx("div", { className: "text-xs text-[var(--muted)]", children: t("subscriptionstatus.YourClaudeSubscrip") })) : !anthropicOAuthStarted ? (_jsxs("div", { children: [_jsx(Button, { variant: "default", size: "sm", className: "!mt-0", onClick: () => void handleAnthropicStart(), children: t("onboarding.loginWithAnthropic") }), _jsx("div", { className: "text-[11px] text-[var(--muted)] mt-1.5", children: t("subscriptionstatus.RequiresClaudePro") }), anthropicError && (_jsx("div", { className: "text-[11px] text-[var(--danger,#e74c3c)] mt-2", children: anthropicError }))] })) : (_jsxs("div", { children: [_jsx("div", { className: "text-xs text-[var(--muted)] mb-2", children: t("subscriptionstatus.AfterLoggingInCo") }), _jsx(Input, { type: "text", placeholder: t("subscriptionstatus.PasteTheAuthorizat"), value: anthropicCode, onChange: (e) => {
277
+ setAnthropicCode(e.target.value);
278
+ setAnthropicError("");
279
+ }, className: "bg-card text-xs" }), anthropicError && (_jsx("div", { className: "text-[11px] text-[var(--danger,#e74c3c)] mt-2", children: anthropicError })), _jsxs("div", { className: "flex items-center gap-2 mt-2", children: [_jsx(Button, { variant: "default", size: "sm", className: "!mt-0", disabled: anthropicExchangeBusy || !anthropicCode.trim(), onClick: () => void handleAnthropicExchange(), children: anthropicExchangeBusy
280
+ ? t("onboarding.connecting")
281
+ : t("onboarding.connect") }), _jsx(Button, { variant: "outline", size: "sm", className: "!mt-0", onClick: () => {
282
+ setAnthropicOAuthStarted(false);
283
+ setAnthropicCode("");
284
+ }, children: t("onboarding.startOver") })] })] }))] })), resolvedSelectedId === "openai-subscription" && (_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between items-center mb-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-block w-2 h-2 rounded-full", style: {
285
+ background: openaiConnected
286
+ ? "var(--ok,#16a34a)"
287
+ : "var(--warning,#f39c12)",
288
+ } }), _jsx("span", { className: "text-xs font-semibold", children: openaiConnected
289
+ ? t("subscriptionstatus.ConnectedToChatGPTSubscription")
290
+ : t("subscriptionstatus.ChatGPTSubscriptionTitle") })] }), openaiConnected && (_jsx(Button, { variant: "outline", size: "sm", className: "!mt-0", onClick: () => void handleDisconnectSubscription("openai-subscription"), disabled: subscriptionDisconnecting === "openai-subscription", children: subscriptionDisconnecting === "openai-subscription"
291
+ ? t("subscriptionstatus.Disconnecting")
292
+ : t("subscriptionstatus.Disconnect") }))] }), openaiStatus?.configured && !openaiStatus.valid && (_jsx("div", { className: "text-xs text-[var(--warning,#f39c12)] mb-3", children: t("subscriptionstatus.ChatGPTSubscription") })), openaiConnected ? (_jsx("div", { className: "text-xs text-[var(--muted)]", children: t("subscriptionstatus.YourChatGPTSubscri") })) : !openaiOAuthStarted ? (_jsxs("div", { children: [_jsx(Button, { variant: "default", size: "sm", className: "!mt-0", onClick: () => void handleOpenAIStart(), children: t("subscriptionstatus.LoginWithOpenAI") }), _jsx("div", { className: "text-[11px] text-[var(--muted)] mt-1.5", children: t("subscriptionstatus.RequiresChatGPTPlu") })] })) : (_jsxs("div", { children: [_jsxs("div", { className: "p-2.5 border border-[var(--border)] bg-[var(--bg-muted)] text-[11px] text-[var(--muted)] leading-relaxed", children: [t("subscriptionstatus.AfterLoggingInYo"), " ", _jsx("code", { className: "text-[10px] px-1 border border-[var(--border)] bg-[var(--card)]", children: t("subscriptionstatus.localhost1455") }), t("subscriptionstatus.CopyTheEntireU")] }), _jsx(Input, { type: "text", className: "mt-2 bg-card text-xs", placeholder: t("subscriptionstatus.httpLocalhost145"), value: openaiCallbackUrl, onChange: (e) => {
293
+ setOpenaiCallbackUrl(e.target.value);
294
+ setOpenaiError("");
295
+ } }), openaiError && (_jsx("div", { className: "text-[11px] text-[var(--danger,#e74c3c)] mt-2", children: openaiError })), _jsxs("div", { className: "flex items-center gap-2 mt-2", children: [_jsx(Button, { variant: "default", size: "sm", className: "!mt-0", disabled: openaiExchangeBusy || !openaiCallbackUrl.trim(), onClick: () => void handleOpenAIExchange(), children: openaiExchangeBusy
296
+ ? t("subscriptionstatus.Completing")
297
+ : t("onboarding.completeLogin") }), _jsx(Button, { variant: "outline", size: "sm", className: "!mt-0", onClick: () => {
298
+ setOpenaiOAuthStarted(false);
299
+ setOpenaiCallbackUrl("");
300
+ }, children: t("onboarding.startOver") })] })] })), openaiError && !openaiOAuthStarted && (_jsx("div", { className: "text-[11px] text-[var(--danger,#e74c3c)] mt-2", children: openaiError }))] }))] }));
301
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Renders amber warning banners for system-level warnings
3
+ * broadcast via WebSocket `system-warning` events.
4
+ */
5
+ export declare function SystemWarningBanner(): import("react/jsx-runtime").JSX.Element | null;
6
+ //# sourceMappingURL=SystemWarningBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemWarningBanner.d.ts","sourceRoot":"","sources":["../../src/components/SystemWarningBanner.tsx"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAgB,mBAAmB,mDA6DlC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
+ import { useApp } from "../state";
4
+ const AUTO_DISMISS_MS = 20_000;
5
+ /**
6
+ * Renders amber warning banners for system-level warnings
7
+ * broadcast via WebSocket `system-warning` events.
8
+ */
9
+ export function SystemWarningBanner() {
10
+ const { systemWarnings, dismissSystemWarning, backendConnection } = useApp();
11
+ const timersRef = useRef(new Map());
12
+ useEffect(() => {
13
+ if (!systemWarnings?.length)
14
+ return;
15
+ const timers = timersRef.current;
16
+ for (const message of systemWarnings) {
17
+ if (!timers.has(message)) {
18
+ const timer = setTimeout(() => {
19
+ timers.delete(message);
20
+ dismissSystemWarning(message);
21
+ }, AUTO_DISMISS_MS);
22
+ timers.set(message, timer);
23
+ }
24
+ }
25
+ for (const [msg, timer] of timers) {
26
+ if (!systemWarnings.includes(msg)) {
27
+ clearTimeout(timer);
28
+ timers.delete(msg);
29
+ }
30
+ }
31
+ }, [systemWarnings, dismissSystemWarning]);
32
+ useEffect(() => {
33
+ const timers = timersRef.current;
34
+ return () => {
35
+ for (const timer of timers.values())
36
+ clearTimeout(timer);
37
+ timers.clear();
38
+ };
39
+ }, []);
40
+ if (!systemWarnings?.length)
41
+ return null;
42
+ const connectionBannerVisible = backendConnection?.state === "reconnecting" ||
43
+ backendConnection?.state === "failed";
44
+ const baseTop = connectionBannerVisible ? 36 : 0;
45
+ return (_jsx(_Fragment, { children: systemWarnings.map((message, index) => (_jsxs("div", { className: "fixed left-0 right-0 z-[9998] flex items-center justify-between gap-3 bg-amber-500 px-4 py-2 text-[13px] font-medium text-white shadow-lg", style: { top: `${baseTop + index * 36}px` }, children: [_jsx("span", { className: "truncate", children: message }), _jsx("button", { type: "button", onClick: () => dismissSystemWarning(message), className: "rounded px-2 py-0.5 text-[12px] text-amber-100 hover:bg-amber-600 transition-colors cursor-pointer shrink-0", children: "x" })] }, message))) }));
46
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * ThemeToggle — day/night switch for light/dark theme.
3
+ *
4
+ * Fully props-driven; no app context dependency. Takes the current theme
5
+ * and a setter from the caller. Works in both "native" and "companion"
6
+ * visual variants.
7
+ */
8
+ import type { UiTheme } from "../state/persistence";
9
+ /** Minimal translator function type. */
10
+ export type ThemeTranslatorFn = (key: string) => string;
11
+ export interface ThemeToggleProps {
12
+ uiTheme: UiTheme;
13
+ setUiTheme: (theme: UiTheme) => void;
14
+ /** Optional translator for ARIA labels */
15
+ t?: ThemeTranslatorFn;
16
+ /** Optional extra className on the root */
17
+ className?: string;
18
+ variant?: "native" | "companion";
19
+ }
20
+ export declare function ThemeToggle({ uiTheme, setUiTheme, t: _t, className, variant: _variant, }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=ThemeToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeToggle.d.ts","sourceRoot":"","sources":["../../src/components/ThemeToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,0CAA0C;IAC1C,CAAC,CAAC,EAAE,iBAAiB,CAAC;IACtB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;CAClC;AAkDD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,UAAU,EACV,CAAC,EAAE,EAAE,EACL,SAAS,EACT,OAAO,EAAE,QAAmB,GAC7B,EAAE,gBAAgB,2CAqBlB"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * ThemeToggle — day/night switch for light/dark theme.
4
+ *
5
+ * Fully props-driven; no app context dependency. Takes the current theme
6
+ * and a setter from the caller. Works in both "native" and "companion"
7
+ * visual variants.
8
+ */
9
+ import { useCallback } from "react";
10
+ /** Sun icon SVG for light mode indicator */
11
+ function SunIcon({ className }) {
12
+ return (_jsxs("svg", { className: className, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("circle", { cx: "12", cy: "12", r: "5" }), _jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), _jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), _jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), _jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), _jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), _jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), _jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), _jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] }));
13
+ }
14
+ /** Moon icon SVG for dark mode indicator */
15
+ function MoonIcon({ className }) {
16
+ return (_jsx("svg", { className: className, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }));
17
+ }
18
+ export function ThemeToggle({ uiTheme, setUiTheme, t: _t, className, variant: _variant = "native", }) {
19
+ const isDark = uiTheme === "dark";
20
+ const handleToggle = useCallback(() => {
21
+ setUiTheme(isDark ? "light" : "dark");
22
+ }, [isDark, setUiTheme]);
23
+ return (_jsx("button", { type: "button", onClick: handleToggle, className: `inline-flex items-center justify-center w-11 h-11 min-w-[44px] min-h-[44px] border border-border/50 bg-bg/50 backdrop-blur-md cursor-pointer text-sm leading-none hover:border-accent hover:text-txt font-medium hover:-translate-y-0.5 transition-all duration-300 hover:shadow-[0_0_15px_rgba(var(--accent),0.5)] active:scale-95 rounded-xl text-txt shadow-sm ${className ?? ""}`, "data-testid": "theme-toggle", children: isDark ? (_jsx(SunIcon, { className: "w-5 h-5" })) : (_jsx(MoonIcon, { className: "w-5 h-5" })) }));
24
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * TrajectoriesView — view and analyze LLM call trajectories.
3
+ *
4
+ * Shows all captured LLM interactions with token counts, latency, and context.
5
+ * Supports filtering, search, export, and clearing trajectories.
6
+ */
7
+ interface TrajectoriesViewProps {
8
+ onSelectTrajectory?: (id: string) => void;
9
+ }
10
+ export declare function TrajectoriesView({ onSelectTrajectory, }: TrajectoriesViewProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=TrajectoriesView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrajectoriesView.d.ts","sourceRoot":"","sources":["../../src/components/TrajectoriesView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgDH,UAAU,qBAAqB;IAC7B,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,kBAAkB,GACnB,EAAE,qBAAqB,2CAkdvB"}
@@ -0,0 +1,183 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * TrajectoriesView — view and analyze LLM call trajectories.
4
+ *
5
+ * Shows all captured LLM interactions with token counts, latency, and context.
6
+ * Supports filtering, search, export, and clearing trajectories.
7
+ */
8
+ import { client, } from "@elizaos/app-core/api";
9
+ import { useApp } from "@elizaos/app-core/state";
10
+ import { confirmDesktopAction } from "@elizaos/app-core/utils";
11
+ import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@elizaos/ui";
12
+ import { useCallback, useEffect, useState } from "react";
13
+ import { formatTrajectoryDuration, formatTrajectoryTimestamp, formatTrajectoryTokenCount, } from "./trajectory-format";
14
+ const STATUS_COLORS = {
15
+ active: { bg: "rgba(59, 130, 246, 0.15)", fg: "rgb(59, 130, 246)" },
16
+ completed: { bg: "rgba(34, 197, 94, 0.15)", fg: "rgb(34, 197, 94)" },
17
+ error: { bg: "rgba(239, 68, 68, 0.15)", fg: "rgb(239, 68, 68)" },
18
+ };
19
+ const SOURCE_COLORS = {
20
+ chat: { bg: "rgba(99, 102, 241, 0.15)", fg: "rgb(99, 102, 241)" },
21
+ autonomy: { bg: "rgba(245, 158, 11, 0.15)", fg: "rgb(245, 158, 11)" },
22
+ telegram: { bg: "rgba(34, 197, 94, 0.15)", fg: "rgb(34, 197, 94)" },
23
+ discord: { bg: "rgba(88, 101, 242, 0.15)", fg: "rgb(88, 101, 242)" },
24
+ api: { bg: "rgba(156, 163, 175, 0.15)", fg: "rgb(156, 163, 175)" },
25
+ orchestrator: { bg: "rgba(168, 85, 247, 0.15)", fg: "rgb(168, 85, 247)" },
26
+ };
27
+ export function TrajectoriesView({ onSelectTrajectory, }) {
28
+ const { t } = useApp();
29
+ const [loading, setLoading] = useState(true);
30
+ const [result, setResult] = useState(null);
31
+ const [stats, setStats] = useState(null);
32
+ const [config, setConfig] = useState(null);
33
+ const [error, setError] = useState(null);
34
+ // Filters
35
+ const [statusFilter, setStatusFilter] = useState("");
36
+ const [sourceFilter, setSourceFilter] = useState("");
37
+ const [searchQuery, setSearchQuery] = useState("");
38
+ const [page, setPage] = useState(0);
39
+ const pageSize = 50;
40
+ // Actions
41
+ const [exporting, setExporting] = useState(false);
42
+ const [clearing, setClearing] = useState(false);
43
+ const [updatingLogging, setUpdatingLogging] = useState(false);
44
+ const loadTrajectories = useCallback(async () => {
45
+ setLoading(true);
46
+ setError(null);
47
+ try {
48
+ const [trajResult, statsResult, configResult] = await Promise.all([
49
+ client.getTrajectories({
50
+ limit: pageSize,
51
+ offset: page * pageSize,
52
+ status: statusFilter || undefined,
53
+ source: sourceFilter || undefined,
54
+ search: searchQuery || undefined,
55
+ }),
56
+ client.getTrajectoryStats(),
57
+ client.getTrajectoryConfig(),
58
+ ]);
59
+ setResult(trajResult);
60
+ setStats(statsResult);
61
+ setConfig(configResult);
62
+ }
63
+ catch (err) {
64
+ setError(err instanceof Error ? err.message : t("trajectoriesview.FailedToLoad"));
65
+ }
66
+ finally {
67
+ setLoading(false);
68
+ }
69
+ }, [page, statusFilter, sourceFilter, searchQuery, t]);
70
+ useEffect(() => {
71
+ void loadTrajectories();
72
+ }, [loadTrajectories]);
73
+ const handleToggleLogging = async () => {
74
+ if (!config)
75
+ return;
76
+ setUpdatingLogging(true);
77
+ try {
78
+ const updated = await client.updateTrajectoryConfig({
79
+ enabled: !config.enabled,
80
+ });
81
+ setConfig(updated);
82
+ }
83
+ catch (err) {
84
+ setError(err instanceof Error
85
+ ? err.message
86
+ : t("trajectoriesview.FailedToUpdateConfig"));
87
+ }
88
+ finally {
89
+ setUpdatingLogging(false);
90
+ }
91
+ };
92
+ const handleExport = async (format, includePrompts) => {
93
+ setExporting(true);
94
+ try {
95
+ const blob = await client.exportTrajectories({ format, includePrompts });
96
+ const url = URL.createObjectURL(blob);
97
+ const a = document.createElement("a");
98
+ a.href = url;
99
+ a.download = `trajectories-${new Date().toISOString().split("T")[0]}.${format}`;
100
+ a.click();
101
+ URL.revokeObjectURL(url);
102
+ }
103
+ catch (err) {
104
+ setError(err instanceof Error
105
+ ? err.message
106
+ : t("trajectoriesview.FailedToExport"));
107
+ }
108
+ finally {
109
+ setExporting(false);
110
+ }
111
+ };
112
+ const handleClearAll = async () => {
113
+ const confirmed = await confirmDesktopAction({
114
+ title: t("trajectoriesview.DeleteAllTitle"),
115
+ message: t("trajectoriesview.DeleteAllMessage"),
116
+ detail: t("trajectoriesview.DeleteAllDetail"),
117
+ confirmLabel: t("common.deleteAll"),
118
+ cancelLabel: t("common.cancel"),
119
+ type: "warning",
120
+ });
121
+ if (!confirmed) {
122
+ return;
123
+ }
124
+ setClearing(true);
125
+ try {
126
+ await client.clearAllTrajectories();
127
+ void loadTrajectories();
128
+ }
129
+ catch (err) {
130
+ setError(err instanceof Error
131
+ ? err.message
132
+ : t("trajectoriesview.FailedToClear"));
133
+ }
134
+ finally {
135
+ setClearing(false);
136
+ }
137
+ };
138
+ const handleClearFilters = () => {
139
+ setStatusFilter("");
140
+ setSourceFilter("");
141
+ setSearchQuery("");
142
+ setPage(0);
143
+ };
144
+ const hasActiveFilters = statusFilter !== "" || sourceFilter !== "" || searchQuery !== "";
145
+ const trajectories = result?.trajectories ?? [];
146
+ const total = result?.total ?? 0;
147
+ const totalPages = Math.ceil(total / pageSize);
148
+ const sources = stats?.bySource ? Object.keys(stats.bySource) : [];
149
+ return (_jsxs("div", { className: "flex flex-col h-full gap-3", children: [stats && (_jsxs("div", { className: "flex flex-wrap gap-4 text-xs", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Total") }), _jsx("span", { className: "font-semibold", children: stats.totalTrajectories.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.LLMCalls") }), _jsx("span", { className: "font-semibold", children: stats.totalLlmCalls.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Tokens") }), _jsx("span", { className: "font-semibold text-txt", children: formatTrajectoryTokenCount(stats.totalPromptTokens + stats.totalCompletionTokens, { emptyLabel: "0" }) }), _jsxs("span", { className: "text-muted text-[10px]", children: ["(", formatTrajectoryTokenCount(stats.totalPromptTokens, {
150
+ emptyLabel: "0",
151
+ }), "\u2191", " ", formatTrajectoryTokenCount(stats.totalCompletionTokens, {
152
+ emptyLabel: "0",
153
+ }), "\u2193)"] })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.AvgDuration") }), _jsx("span", { className: "font-semibold", children: formatTrajectoryDuration(stats.averageDurationMs) })] }), _jsx("div", { className: "ml-auto flex items-center gap-2", children: _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Logging") }), _jsx(Button, { variant: "outline", size: "sm", className: `h-6 px-2 py-0.5 text-[11px] shadow-sm ${config?.enabled
154
+ ? "bg-success/20 border-success text-success hover:bg-success/30"
155
+ : "bg-warn/20 border-warn text-warn hover:bg-warn/30"}`, onClick: handleToggleLogging, disabled: !config || updatingLogging, "aria-pressed": config?.enabled ?? false, children: config?.enabled ? t("common.on") : t("common.off") })] }) })] })), _jsxs("div", { className: "flex flex-wrap gap-1.5 items-center", children: [_jsx(Input, { type: "text", placeholder: t("trajectoriesview.Search"), className: "h-8 px-3 py-1.5 text-xs bg-card border-border w-48 shadow-sm", value: searchQuery, onChange: (e) => {
156
+ setSearchQuery(e.target.value);
157
+ setPage(0);
158
+ } }), _jsxs(Select, { value: statusFilter === "" ? "all" : statusFilter, onValueChange: (val) => {
159
+ setStatusFilter(val === "all" ? "" : val);
160
+ setPage(0);
161
+ }, children: [_jsx(SelectTrigger, { className: "h-8 px-3 py-1.5 text-xs bg-card border-border shadow-sm w-36", children: _jsx(SelectValue, { placeholder: t("trajectoriesview.AllStatuses") }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: t("trajectoriesview.AllStatuses") }), _jsx(SelectItem, { value: "active", children: t("appsview.Active") }), _jsx(SelectItem, { value: "completed", children: t("trajectoriesview.Completed") }), _jsx(SelectItem, { value: "error", children: t("logsview.Error") })] })] }), sources.length > 0 && (_jsxs(Select, { value: sourceFilter === "" ? "all" : sourceFilter, onValueChange: (val) => {
162
+ setSourceFilter(val === "all" ? "" : val);
163
+ setPage(0);
164
+ }, children: [_jsx(SelectTrigger, { className: "h-8 px-3 py-1.5 text-xs bg-card border-border shadow-sm w-36", children: _jsx(SelectValue, { placeholder: t("logsview.AllSources") }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "all", children: t("logsview.AllSources") }), sources.map((s) => (_jsx(SelectItem, { value: s, children: s }, s)))] })] })), hasActiveFilters && (_jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[2rem] whitespace-normal break-words px-3 py-1.5 text-xs bg-card text-txt hover:text-txt shadow-sm text-left", onClick: handleClearFilters, children: t("logsview.ClearFilters") })), _jsxs("div", { className: "ml-auto flex gap-1.5", children: [_jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[2rem] whitespace-normal break-words px-3 py-1.5 text-xs bg-card text-txt hover:text-txt shadow-sm text-left", onClick: () => void loadTrajectories(), disabled: loading, children: loading
165
+ ? t("common.loading", { defaultValue: "Loading..." })
166
+ : t("common.refresh", { defaultValue: "Refresh" }) }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[2rem] whitespace-normal break-words px-3 py-1.5 text-xs bg-card text-txt hover:text-txt shadow-sm text-left", disabled: exporting || trajectories.length === 0, children: exporting ? t("common.exporting") : t("common.export") }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-48", children: [_jsx(DropdownMenuItem, { onClick: () => handleExport("json", true), children: t("trajectoriesview.JSONWithPrompts") }), _jsx(DropdownMenuItem, { onClick: () => handleExport("json", false), children: t("trajectoriesview.JSONRedacted") }), _jsx(DropdownMenuItem, { onClick: () => handleExport("csv", false), children: t("trajectoriesview.CSVSummaryOnly") }), _jsx(DropdownMenuItem, { onClick: () => handleExport("zip", true), children: t("trajectoriesview.ZIPFolders") })] })] }), _jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[2rem] whitespace-normal break-words px-3 py-1.5 text-xs bg-card text-danger border-danger/50 hover:bg-danger/10 hover:border-danger shadow-sm text-left", onClick: handleClearAll, disabled: clearing || stats?.totalTrajectories === 0, children: clearing ? t("common.clearing") : t("common.clearAll") })] })] }), error && (_jsx("div", { className: "text-xs text-danger border border-danger/30 bg-danger/10 px-3 py-2", children: error })), _jsx("div", { className: "flex-1 min-h-0 overflow-y-auto border border-border bg-card", children: loading && trajectories.length === 0 ? (_jsx("div", { className: "text-center py-8 text-muted", children: t("trajectoriesview.LoadingTrajectories") })) : trajectories.length === 0 ? (_jsxs("div", { className: "text-center py-8 text-muted", children: [hasActiveFilters
167
+ ? t("trajectoriesview.NoTrajectoriesMatchingFilters")
168
+ : t("trajectoriesview.NoTrajectoriesYet"), !config?.enabled && (_jsx("div", { className: "mt-2 text-warn text-[11px]", children: t("trajectoriesview.LoggingHelp") }))] })) : (_jsxs("table", { className: "w-full text-xs", children: [_jsx("thead", { className: "bg-muted/10 sticky top-0", children: _jsxs("tr", { children: [_jsx("th", { className: "text-left px-2 py-1.5 font-medium", children: t("trajectoriesview.Time") }), _jsx("th", { className: "text-left px-2 py-1.5 font-medium", children: t("trajectoriesview.Source") }), _jsx("th", { className: "text-left px-2 py-1.5 font-medium", children: t("finetuningview.Status") }), _jsx("th", { className: "text-right px-2 py-1.5 font-medium", children: t("trajectoriesview.Calls") }), _jsx("th", { className: "text-right px-2 py-1.5 font-medium", children: t("trajectoriesview.Tokens1") }), _jsx("th", { className: "text-right px-2 py-1.5 font-medium", children: t("trajectoriesview.Duration") })] }) }), _jsx("tbody", { children: trajectories.map((traj) => {
169
+ const statusColor = STATUS_COLORS[traj.status] ?? STATUS_COLORS.completed;
170
+ const sourceColor = SOURCE_COLORS[traj.source] ?? SOURCE_COLORS.api;
171
+ return (_jsxs("tr", { className: "border-t border-border hover:bg-muted/5 cursor-pointer", onClick: () => onSelectTrajectory?.(traj.id), children: [_jsx("td", { className: "px-2 py-1.5 text-muted whitespace-nowrap", children: formatTrajectoryTimestamp(traj.createdAt, "smart") }), _jsx("td", { className: "px-2 py-1.5", children: _jsx("span", { className: "inline-block text-[10px] px-1.5 py-px rounded", style: {
172
+ background: sourceColor.bg,
173
+ color: sourceColor.fg,
174
+ }, children: traj.source }) }), _jsx("td", { className: "px-2 py-1.5", children: _jsx("span", { className: "inline-block text-[10px] px-1.5 py-px rounded", style: {
175
+ background: statusColor.bg,
176
+ color: statusColor.fg,
177
+ }, children: traj.status }) }), _jsx("td", { className: "px-2 py-1.5 text-right font-mono", children: traj.llmCallCount }), _jsx("td", { className: "px-2 py-1.5 text-right font-mono", children: _jsx("span", { className: "text-txt", children: formatTrajectoryTokenCount(traj.totalPromptTokens + traj.totalCompletionTokens, { emptyLabel: "0" }) }) }), _jsx("td", { className: "px-2 py-1.5 text-right text-muted font-mono", children: formatTrajectoryDuration(traj.durationMs) })] }, traj.id));
178
+ }) })] })) }), totalPages > 1 && (_jsxs("div", { className: "flex items-center justify-between text-xs", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.ShowingRange", {
179
+ start: page * pageSize + 1,
180
+ end: Math.min((page + 1) * pageSize, total),
181
+ total,
182
+ }) }), _jsxs("div", { className: "flex gap-1", children: [_jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[1.75rem] px-2 py-1 text-xs bg-card disabled:opacity-50 shadow-sm", onClick: () => setPage((p) => Math.max(0, p - 1)), disabled: page === 0, children: t("databaseview.Prev") }), _jsx(Button, { variant: "outline", size: "sm", className: "h-auto min-h-[1.75rem] px-2 py-1 text-xs bg-card disabled:opacity-50 shadow-sm", onClick: () => setPage((p) => p + 1), disabled: page >= totalPages - 1, children: t("databaseview.Next") })] })] }))] }));
183
+ }