@base44/superagent-native 0.0.1 → 0.0.3

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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -20
  3. package/lib/commonjs/AgentSettingsPanel.js +155 -62
  4. package/lib/commonjs/AgentSettingsPanel.js.map +1 -1
  5. package/lib/commonjs/AgentSphereIcon.js +14 -118
  6. package/lib/commonjs/AgentSphereIcon.js.map +1 -1
  7. package/lib/commonjs/AttachmentPickerStatusModal.js +5 -4
  8. package/lib/commonjs/AttachmentPickerStatusModal.js.map +1 -1
  9. package/lib/commonjs/ChannelsPanel.js +66 -44
  10. package/lib/commonjs/ChannelsPanel.js.map +1 -1
  11. package/lib/commonjs/ConversationChat.js +38 -13
  12. package/lib/commonjs/ConversationChat.js.map +1 -1
  13. package/lib/commonjs/ConversationComposer.js +18 -13
  14. package/lib/commonjs/ConversationComposer.js.map +1 -1
  15. package/lib/commonjs/ConversationScreen.js +4 -0
  16. package/lib/commonjs/ConversationScreen.js.map +1 -1
  17. package/lib/commonjs/EditorDrawer.js +54 -24
  18. package/lib/commonjs/EditorDrawer.js.map +1 -1
  19. package/lib/commonjs/FilesPanel.js +56 -20
  20. package/lib/commonjs/FilesPanel.js.map +1 -1
  21. package/lib/commonjs/MarkdownText.js +1 -1
  22. package/lib/commonjs/MarkdownText.js.map +1 -1
  23. package/lib/commonjs/MessageActionBar.js +10 -3
  24. package/lib/commonjs/MessageActionBar.js.map +1 -1
  25. package/lib/commonjs/RenameAgentModal.js +2 -1
  26. package/lib/commonjs/RenameAgentModal.js.map +1 -1
  27. package/lib/commonjs/ShareAgentModal.js +11 -10
  28. package/lib/commonjs/ShareAgentModal.js.map +1 -1
  29. package/lib/commonjs/ShareAgentModal.styles.js +2 -2
  30. package/lib/commonjs/ShareAgentModal.styles.js.map +1 -1
  31. package/lib/commonjs/SuperagentHomeScreen.js +44 -12
  32. package/lib/commonjs/SuperagentHomeScreen.js.map +1 -1
  33. package/lib/commonjs/ToolApprovalCard.js +73 -15
  34. package/lib/commonjs/ToolApprovalCard.js.map +1 -1
  35. package/lib/commonjs/ToolCallSummary.js +19 -10
  36. package/lib/commonjs/ToolCallSummary.js.map +1 -1
  37. package/lib/commonjs/agentSphereAssets.js +327 -0
  38. package/lib/commonjs/agentSphereAssets.js.map +1 -0
  39. package/lib/commonjs/agentSphereStyles.js +3 -3
  40. package/lib/commonjs/agentSphereStyles.js.map +1 -1
  41. package/lib/commonjs/apiClient.js +7 -0
  42. package/lib/commonjs/apiClient.js.map +1 -1
  43. package/lib/commonjs/attachmentUpload.js +2 -1
  44. package/lib/commonjs/attachmentUpload.js.map +1 -1
  45. package/lib/commonjs/composerStyles.js +2 -2
  46. package/lib/commonjs/composerStyles.js.map +1 -1
  47. package/lib/commonjs/connectorBrandIcons.generated.js +625 -0
  48. package/lib/commonjs/connectorBrandIcons.generated.js.map +1 -0
  49. package/lib/commonjs/connectorBrandIcons.js +3 -55
  50. package/lib/commonjs/connectorBrandIcons.js.map +1 -1
  51. package/lib/commonjs/connectorCatalog.js +19 -1
  52. package/lib/commonjs/connectorCatalog.js.map +1 -1
  53. package/lib/commonjs/conversationParts.js +5 -4
  54. package/lib/commonjs/conversationParts.js.map +1 -1
  55. package/lib/commonjs/conversationRuntime.js +152 -9
  56. package/lib/commonjs/conversationRuntime.js.map +1 -1
  57. package/lib/commonjs/conversationStyles.js +2 -1
  58. package/lib/commonjs/conversationStyles.js.map +1 -1
  59. package/lib/commonjs/editorShellStyles.js +6 -2
  60. package/lib/commonjs/editorShellStyles.js.map +1 -1
  61. package/lib/commonjs/fileTreeUtils.js +7 -0
  62. package/lib/commonjs/fileTreeUtils.js.map +1 -1
  63. package/lib/commonjs/index.js +7 -0
  64. package/lib/commonjs/index.js.map +1 -1
  65. package/lib/commonjs/markdownStyles.js +2 -2
  66. package/lib/commonjs/markdownStyles.js.map +1 -1
  67. package/lib/commonjs/messageActionStyles.js +2 -2
  68. package/lib/commonjs/messageActionStyles.js.map +1 -1
  69. package/lib/commonjs/realtimeClient.js +4 -1
  70. package/lib/commonjs/realtimeClient.js.map +1 -1
  71. package/lib/commonjs/renameAgentModalStyles.js +2 -2
  72. package/lib/commonjs/renameAgentModalStyles.js.map +1 -1
  73. package/lib/commonjs/screenParts.js +24 -41
  74. package/lib/commonjs/screenParts.js.map +1 -1
  75. package/lib/commonjs/styles.js +32 -21
  76. package/lib/commonjs/styles.js.map +1 -1
  77. package/lib/commonjs/superagentApiClient.js +63 -18
  78. package/lib/commonjs/superagentApiClient.js.map +1 -1
  79. package/lib/commonjs/theme.js +249 -0
  80. package/lib/commonjs/theme.js.map +1 -0
  81. package/lib/commonjs/useSuperagentConversation.js +240 -44
  82. package/lib/commonjs/useSuperagentConversation.js.map +1 -1
  83. package/lib/commonjs/useSuperagentRuntime.js +245 -105
  84. package/lib/commonjs/useSuperagentRuntime.js.map +1 -1
  85. package/lib/module/AgentSettingsPanel.js +157 -64
  86. package/lib/module/AgentSettingsPanel.js.map +1 -1
  87. package/lib/module/AgentSphereIcon.js +15 -118
  88. package/lib/module/AgentSphereIcon.js.map +1 -1
  89. package/lib/module/AttachmentPickerStatusModal.js +6 -5
  90. package/lib/module/AttachmentPickerStatusModal.js.map +1 -1
  91. package/lib/module/ChannelsPanel.js +67 -45
  92. package/lib/module/ChannelsPanel.js.map +1 -1
  93. package/lib/module/ConversationChat.js +38 -13
  94. package/lib/module/ConversationChat.js.map +1 -1
  95. package/lib/module/ConversationComposer.js +18 -13
  96. package/lib/module/ConversationComposer.js.map +1 -1
  97. package/lib/module/ConversationScreen.js +4 -0
  98. package/lib/module/ConversationScreen.js.map +1 -1
  99. package/lib/module/EditorDrawer.js +55 -25
  100. package/lib/module/EditorDrawer.js.map +1 -1
  101. package/lib/module/FilesPanel.js +56 -20
  102. package/lib/module/FilesPanel.js.map +1 -1
  103. package/lib/module/MarkdownText.js +1 -1
  104. package/lib/module/MarkdownText.js.map +1 -1
  105. package/lib/module/MessageActionBar.js +10 -3
  106. package/lib/module/MessageActionBar.js.map +1 -1
  107. package/lib/module/RenameAgentModal.js +2 -1
  108. package/lib/module/RenameAgentModal.js.map +1 -1
  109. package/lib/module/ShareAgentModal.js +11 -10
  110. package/lib/module/ShareAgentModal.js.map +1 -1
  111. package/lib/module/ShareAgentModal.styles.js +2 -2
  112. package/lib/module/ShareAgentModal.styles.js.map +1 -1
  113. package/lib/module/SuperagentHomeScreen.js +45 -13
  114. package/lib/module/SuperagentHomeScreen.js.map +1 -1
  115. package/lib/module/ToolApprovalCard.js +73 -15
  116. package/lib/module/ToolApprovalCard.js.map +1 -1
  117. package/lib/module/ToolCallSummary.js +19 -10
  118. package/lib/module/ToolCallSummary.js.map +1 -1
  119. package/lib/module/agentSphereAssets.js +323 -0
  120. package/lib/module/agentSphereAssets.js.map +1 -0
  121. package/lib/module/agentSphereStyles.js +3 -3
  122. package/lib/module/agentSphereStyles.js.map +1 -1
  123. package/lib/module/apiClient.js +7 -0
  124. package/lib/module/apiClient.js.map +1 -1
  125. package/lib/module/attachmentUpload.js +2 -1
  126. package/lib/module/attachmentUpload.js.map +1 -1
  127. package/lib/module/composerStyles.js +2 -2
  128. package/lib/module/composerStyles.js.map +1 -1
  129. package/lib/module/connectorBrandIcons.generated.js +621 -0
  130. package/lib/module/connectorBrandIcons.generated.js.map +1 -0
  131. package/lib/module/connectorBrandIcons.js +1 -53
  132. package/lib/module/connectorBrandIcons.js.map +1 -1
  133. package/lib/module/connectorCatalog.js +17 -0
  134. package/lib/module/connectorCatalog.js.map +1 -1
  135. package/lib/module/conversationParts.js +5 -4
  136. package/lib/module/conversationParts.js.map +1 -1
  137. package/lib/module/conversationRuntime.js +149 -9
  138. package/lib/module/conversationRuntime.js.map +1 -1
  139. package/lib/module/conversationStyles.js +3 -2
  140. package/lib/module/conversationStyles.js.map +1 -1
  141. package/lib/module/editorShellStyles.js +6 -2
  142. package/lib/module/editorShellStyles.js.map +1 -1
  143. package/lib/module/fileTreeUtils.js +6 -0
  144. package/lib/module/fileTreeUtils.js.map +1 -1
  145. package/lib/module/index.js +1 -0
  146. package/lib/module/index.js.map +1 -1
  147. package/lib/module/markdownStyles.js +2 -2
  148. package/lib/module/markdownStyles.js.map +1 -1
  149. package/lib/module/messageActionStyles.js +2 -2
  150. package/lib/module/messageActionStyles.js.map +1 -1
  151. package/lib/module/realtimeClient.js +4 -1
  152. package/lib/module/realtimeClient.js.map +1 -1
  153. package/lib/module/renameAgentModalStyles.js +2 -2
  154. package/lib/module/renameAgentModalStyles.js.map +1 -1
  155. package/lib/module/screenParts.js +25 -42
  156. package/lib/module/screenParts.js.map +1 -1
  157. package/lib/module/styles.js +32 -21
  158. package/lib/module/styles.js.map +1 -1
  159. package/lib/module/superagentApiClient.js +63 -18
  160. package/lib/module/superagentApiClient.js.map +1 -1
  161. package/lib/module/theme.js +239 -0
  162. package/lib/module/theme.js.map +1 -0
  163. package/lib/module/useSuperagentConversation.js +242 -46
  164. package/lib/module/useSuperagentConversation.js.map +1 -1
  165. package/lib/module/useSuperagentRuntime.js +246 -106
  166. package/lib/module/useSuperagentRuntime.js.map +1 -1
  167. package/lib/typescript/commonjs/AgentSettingsPanel.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/AgentSphereIcon.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts.map +1 -1
  170. package/lib/typescript/commonjs/ChannelsPanel.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/ConversationChat.d.ts +1 -1
  172. package/lib/typescript/commonjs/ConversationChat.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/ConversationComposer.d.ts.map +1 -1
  174. package/lib/typescript/commonjs/ConversationMessageList.d.ts +1 -1
  175. package/lib/typescript/commonjs/ConversationMessageList.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/ConversationScreen.d.ts +2 -1
  177. package/lib/typescript/commonjs/ConversationScreen.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/EditorDrawer.d.ts +1 -1
  179. package/lib/typescript/commonjs/EditorDrawer.d.ts.map +1 -1
  180. package/lib/typescript/commonjs/FilesPanel.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/RenameAgentModal.d.ts.map +1 -1
  182. package/lib/typescript/commonjs/ShareAgentModal.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/ToolApprovalCard.d.ts +3 -3
  186. package/lib/typescript/commonjs/ToolApprovalCard.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ToolCallSummary.d.ts +1 -1
  188. package/lib/typescript/commonjs/ToolCallSummary.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/agentSphereAssets.d.ts +2 -0
  190. package/lib/typescript/commonjs/agentSphereAssets.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/agentSphereStyles.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/apiClient.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/composerStyles.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/connectorBrandIcons.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts +2 -0
  196. package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/connectorCatalog.d.ts +2 -0
  198. package/lib/typescript/commonjs/connectorCatalog.d.ts.map +1 -1
  199. package/lib/typescript/commonjs/conversationParts.d.ts +1 -1
  200. package/lib/typescript/commonjs/conversationParts.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/conversationRuntime.d.ts +9 -3
  202. package/lib/typescript/commonjs/conversationRuntime.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/conversationStyles.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/editorShellStyles.d.ts +4 -0
  205. package/lib/typescript/commonjs/editorShellStyles.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/fileTreeUtils.d.ts +1 -0
  207. package/lib/typescript/commonjs/fileTreeUtils.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/index.d.ts +2 -0
  209. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  210. package/lib/typescript/commonjs/markdownStyles.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/messageActionStyles.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/realtimeClient.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/renameAgentModalStyles.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/screenParts.d.ts +1 -1
  215. package/lib/typescript/commonjs/screenParts.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/styles.d.ts +20 -11
  217. package/lib/typescript/commonjs/styles.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/superagentApiClient.d.ts +2 -1
  219. package/lib/typescript/commonjs/superagentApiClient.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/theme.d.ts +36 -0
  221. package/lib/typescript/commonjs/theme.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/types.d.ts +17 -2
  223. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/useSuperagentConversation.d.ts +3 -2
  225. package/lib/typescript/commonjs/useSuperagentConversation.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts +5 -2
  227. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts.map +1 -1
  228. package/lib/typescript/module/AgentSettingsPanel.d.ts.map +1 -1
  229. package/lib/typescript/module/AgentSphereIcon.d.ts.map +1 -1
  230. package/lib/typescript/module/AttachmentPickerStatusModal.d.ts.map +1 -1
  231. package/lib/typescript/module/ChannelsPanel.d.ts.map +1 -1
  232. package/lib/typescript/module/ConversationChat.d.ts +1 -1
  233. package/lib/typescript/module/ConversationChat.d.ts.map +1 -1
  234. package/lib/typescript/module/ConversationComposer.d.ts.map +1 -1
  235. package/lib/typescript/module/ConversationMessageList.d.ts +1 -1
  236. package/lib/typescript/module/ConversationMessageList.d.ts.map +1 -1
  237. package/lib/typescript/module/ConversationScreen.d.ts +2 -1
  238. package/lib/typescript/module/ConversationScreen.d.ts.map +1 -1
  239. package/lib/typescript/module/EditorDrawer.d.ts +1 -1
  240. package/lib/typescript/module/EditorDrawer.d.ts.map +1 -1
  241. package/lib/typescript/module/FilesPanel.d.ts.map +1 -1
  242. package/lib/typescript/module/RenameAgentModal.d.ts.map +1 -1
  243. package/lib/typescript/module/ShareAgentModal.d.ts.map +1 -1
  244. package/lib/typescript/module/ShareAgentModal.styles.d.ts.map +1 -1
  245. package/lib/typescript/module/SuperagentHomeScreen.d.ts.map +1 -1
  246. package/lib/typescript/module/ToolApprovalCard.d.ts +3 -3
  247. package/lib/typescript/module/ToolApprovalCard.d.ts.map +1 -1
  248. package/lib/typescript/module/ToolCallSummary.d.ts +1 -1
  249. package/lib/typescript/module/ToolCallSummary.d.ts.map +1 -1
  250. package/lib/typescript/module/agentSphereAssets.d.ts +2 -0
  251. package/lib/typescript/module/agentSphereAssets.d.ts.map +1 -0
  252. package/lib/typescript/module/agentSphereStyles.d.ts.map +1 -1
  253. package/lib/typescript/module/apiClient.d.ts.map +1 -1
  254. package/lib/typescript/module/composerStyles.d.ts.map +1 -1
  255. package/lib/typescript/module/connectorBrandIcons.d.ts.map +1 -1
  256. package/lib/typescript/module/connectorBrandIcons.generated.d.ts +2 -0
  257. package/lib/typescript/module/connectorBrandIcons.generated.d.ts.map +1 -0
  258. package/lib/typescript/module/connectorCatalog.d.ts +2 -0
  259. package/lib/typescript/module/connectorCatalog.d.ts.map +1 -1
  260. package/lib/typescript/module/conversationParts.d.ts +1 -1
  261. package/lib/typescript/module/conversationParts.d.ts.map +1 -1
  262. package/lib/typescript/module/conversationRuntime.d.ts +9 -3
  263. package/lib/typescript/module/conversationRuntime.d.ts.map +1 -1
  264. package/lib/typescript/module/conversationStyles.d.ts.map +1 -1
  265. package/lib/typescript/module/editorShellStyles.d.ts +4 -0
  266. package/lib/typescript/module/editorShellStyles.d.ts.map +1 -1
  267. package/lib/typescript/module/fileTreeUtils.d.ts +1 -0
  268. package/lib/typescript/module/fileTreeUtils.d.ts.map +1 -1
  269. package/lib/typescript/module/index.d.ts +2 -0
  270. package/lib/typescript/module/index.d.ts.map +1 -1
  271. package/lib/typescript/module/markdownStyles.d.ts.map +1 -1
  272. package/lib/typescript/module/messageActionStyles.d.ts.map +1 -1
  273. package/lib/typescript/module/realtimeClient.d.ts.map +1 -1
  274. package/lib/typescript/module/renameAgentModalStyles.d.ts.map +1 -1
  275. package/lib/typescript/module/screenParts.d.ts +1 -1
  276. package/lib/typescript/module/screenParts.d.ts.map +1 -1
  277. package/lib/typescript/module/styles.d.ts +20 -11
  278. package/lib/typescript/module/styles.d.ts.map +1 -1
  279. package/lib/typescript/module/superagentApiClient.d.ts +2 -1
  280. package/lib/typescript/module/superagentApiClient.d.ts.map +1 -1
  281. package/lib/typescript/module/theme.d.ts +36 -0
  282. package/lib/typescript/module/theme.d.ts.map +1 -0
  283. package/lib/typescript/module/types.d.ts +17 -2
  284. package/lib/typescript/module/types.d.ts.map +1 -1
  285. package/lib/typescript/module/useSuperagentConversation.d.ts +3 -2
  286. package/lib/typescript/module/useSuperagentConversation.d.ts.map +1 -1
  287. package/lib/typescript/module/useSuperagentRuntime.d.ts +5 -2
  288. package/lib/typescript/module/useSuperagentRuntime.d.ts.map +1 -1
  289. package/package.json +13 -11
  290. package/src/AgentSettingsPanel.tsx +146 -58
  291. package/src/AgentSphereIcon.tsx +11 -62
  292. package/src/AttachmentPickerStatusModal.tsx +6 -5
  293. package/src/ChannelsPanel.tsx +59 -39
  294. package/src/ConversationChat.tsx +49 -12
  295. package/src/ConversationComposer.tsx +18 -12
  296. package/src/ConversationMessageList.tsx +1 -1
  297. package/src/ConversationScreen.tsx +5 -0
  298. package/src/EditorDrawer.tsx +66 -41
  299. package/src/FilesPanel.tsx +48 -20
  300. package/src/MarkdownText.tsx +1 -1
  301. package/src/MessageActionBar.tsx +9 -3
  302. package/src/RenameAgentModal.tsx +2 -1
  303. package/src/ShareAgentModal.styles.ts +2 -1
  304. package/src/ShareAgentModal.tsx +9 -8
  305. package/src/SuperagentHomeScreen.tsx +45 -10
  306. package/src/ToolApprovalCard.tsx +83 -15
  307. package/src/ToolCallSummary.tsx +22 -13
  308. package/src/agentSphereAssets.ts +325 -0
  309. package/src/agentSphereStyles.ts +3 -2
  310. package/src/apiClient.ts +7 -0
  311. package/src/attachmentUpload.ts +2 -1
  312. package/src/composerStyles.ts +2 -1
  313. package/src/connectorBrandIcons.generated.ts +618 -0
  314. package/src/connectorBrandIcons.tsx +1 -53
  315. package/src/connectorCatalog.ts +24 -0
  316. package/src/conversationParts.tsx +6 -5
  317. package/src/conversationRuntime.ts +166 -11
  318. package/src/conversationStyles.ts +2 -1
  319. package/src/editorShellStyles.ts +6 -1
  320. package/src/fileTreeUtils.ts +13 -0
  321. package/src/index.ts +2 -0
  322. package/src/markdownStyles.ts +2 -1
  323. package/src/messageActionStyles.ts +2 -1
  324. package/src/realtimeClient.ts +7 -1
  325. package/src/renameAgentModalStyles.ts +2 -1
  326. package/src/screenParts.tsx +17 -29
  327. package/src/styles.ts +25 -16
  328. package/src/superagentApiClient.ts +68 -18
  329. package/src/theme.ts +254 -0
  330. package/src/types.ts +22 -2
  331. package/src/useSuperagentConversation.ts +247 -45
  332. package/src/useSuperagentRuntime.ts +244 -107
package/src/styles.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { StyleSheet } from 'react-native';
2
+ import { createThemedStyles } from './theme';
2
3
 
3
- export const styles = StyleSheet.create({
4
+ export const styles = createThemedStyles({
4
5
  safeArea: { flex: 1, backgroundColor: '#000000' },
5
6
  container: { paddingBottom: 34, paddingHorizontal: 14, paddingTop: 10 },
6
7
  homeTopBar: {
@@ -25,7 +26,14 @@ export const styles = StyleSheet.create({
25
26
  minWidth: 0,
26
27
  },
27
28
  topBarTitle: { color: '#F7F7F7', fontSize: 17, fontWeight: '900', letterSpacing: 0, lineHeight: 21 },
28
- homeIntro: { marginBottom: 14, paddingTop: 2 },
29
+ homeTitle: {
30
+ color: '#FAFAFA',
31
+ fontSize: 24,
32
+ fontWeight: '900',
33
+ marginBottom: 30,
34
+ marginTop: 60,
35
+ textAlign: 'center',
36
+ },
29
37
  header: {
30
38
  alignItems: 'center',
31
39
  flexDirection: 'row',
@@ -52,14 +60,14 @@ export const styles = StyleSheet.create({
52
60
  alignItems: 'center',
53
61
  backgroundColor: '#0B0B0C',
54
62
  borderColor: '#242427',
55
- borderRadius: 18,
63
+ borderRadius: 16,
56
64
  borderWidth: 1,
57
65
  padding: 32,
58
66
  },
59
67
  heroPanel: {
60
68
  backgroundColor: '#0B0B0C',
61
69
  borderColor: '#242427',
62
- borderRadius: 22,
70
+ borderRadius: 16,
63
71
  borderWidth: 1,
64
72
  overflow: 'hidden',
65
73
  padding: 14,
@@ -74,21 +82,16 @@ export const styles = StyleSheet.create({
74
82
  agentCard: {
75
83
  alignItems: 'flex-start',
76
84
  flexDirection: 'row',
77
- minHeight: 100,
78
85
  },
79
86
  avatar: {
80
87
  alignItems: 'center',
81
- backgroundColor: '#111111',
82
- borderColor: '#2A2A2A',
83
- borderRadius: 24,
84
- borderWidth: 1,
85
88
  height: 52,
86
89
  justifyContent: 'center',
87
90
  width: 52,
88
91
  },
89
92
  avatarText: { color: '#F7F7F7', fontSize: 18, fontWeight: '900' },
90
93
  agentCardBody: { flex: 1, marginLeft: 13, minWidth: 0 },
91
- agentName: { color: '#F7F7F7', fontSize: 21, fontWeight: '900', lineHeight: 25 },
94
+ agentName: { color: '#F7F7F7', fontSize: 16, fontWeight: '900', lineHeight: 20 },
92
95
  agentDescription: { color: '#BDBDC2', fontSize: 14, fontWeight: '600', lineHeight: 20, marginTop: 7 },
93
96
  chevron: { color: '#8E8E93', fontSize: 20, fontWeight: '900' },
94
97
  agentMetaRow: { flexDirection: 'row', flexWrap: 'wrap', marginLeft: 65, marginTop: 14 },
@@ -106,7 +109,7 @@ export const styles = StyleSheet.create({
106
109
  emptyPanel: {
107
110
  backgroundColor: '#0B0B0C',
108
111
  borderColor: '#242427',
109
- borderRadius: 22,
112
+ borderRadius: 16,
110
113
  borderWidth: 1,
111
114
  padding: 16,
112
115
  },
@@ -134,6 +137,9 @@ export const styles = StyleSheet.create({
134
137
  paddingHorizontal: 18,
135
138
  },
136
139
  primaryButtonText: { color: '#111111', fontSize: 16, fontWeight: '900' },
140
+ // Overrides primaryButton's marginTop so the card's continue button sits 12px
141
+ // below the agent description (no meta pills between them anymore).
142
+ heroContinueButton: { marginTop: 12 },
137
143
  secondaryButton: {
138
144
  alignItems: 'center',
139
145
  backgroundColor: '#151515',
@@ -147,6 +153,13 @@ export const styles = StyleSheet.create({
147
153
  paddingHorizontal: 16,
148
154
  },
149
155
  secondaryButtonText: { color: '#F4F4F5', fontSize: 14, fontWeight: '900', marginLeft: 7 },
156
+ linkButton: {
157
+ alignItems: 'center',
158
+ justifyContent: 'center',
159
+ marginTop: 14,
160
+ paddingVertical: 12,
161
+ },
162
+ linkButtonText: { color: '#FF5A1F', fontSize: 14, fontWeight: '900' },
150
163
  recentSection: { marginTop: 22 },
151
164
  sectionHeader: {
152
165
  alignItems: 'center',
@@ -160,7 +173,7 @@ export const styles = StyleSheet.create({
160
173
  alignItems: 'center',
161
174
  backgroundColor: '#0B0B0C',
162
175
  borderColor: '#242427',
163
- borderRadius: 17,
176
+ borderRadius: 16,
164
177
  borderWidth: 1,
165
178
  flexDirection: 'row',
166
179
  justifyContent: 'space-between',
@@ -174,10 +187,6 @@ export const styles = StyleSheet.create({
174
187
  agentRowDescription: { color: '#8E8E93', fontSize: 12, fontWeight: '600', lineHeight: 17, marginTop: 3 },
175
188
  compactAvatar: {
176
189
  alignItems: 'center',
177
- backgroundColor: '#111111',
178
- borderColor: '#2A2A2A',
179
- borderRadius: 15,
180
- borderWidth: 1,
181
190
  height: 38,
182
191
  justifyContent: 'center',
183
192
  width: 38,
@@ -16,6 +16,7 @@ import type {
16
16
  SuperagentSecret,
17
17
  SuperagentTelegramChannelStatus,
18
18
  SuperagentToolPermissionConfig,
19
+ SuperagentWhatsAppChannelStatus,
19
20
  } from './types';
20
21
  import { SUPERAGENT_CONNECTOR_CATALOG } from './connectorCatalog';
21
22
  import { DEFAULT_SANDBOX_FILE_PATHS, normalizeFilePaths } from './fileTreeUtils';
@@ -80,6 +81,7 @@ type UserAgentApp = {
80
81
  type AppIntegration = {
81
82
  integration_type: string;
82
83
  integration_account_identifier?: string | null;
84
+ requires_connection_config?: boolean;
83
85
  scopes?: string[];
84
86
  status?: string;
85
87
  };
@@ -127,13 +129,22 @@ type IMessageStatusResponse = {
127
129
  phone_number?: string | null;
128
130
  };
129
131
 
132
+ type WhatsAppStatusResponse = {
133
+ connected: boolean;
134
+ user_handle?: string | null;
135
+ };
136
+
130
137
  type IMessageActivationResponse = {
131
138
  code?: string;
132
139
  phone_number?: string;
133
140
  };
134
141
 
135
- type SandboxFileListResponse = {
136
- files?: string[];
142
+ // /sandbox/files/list-entries returns rich entries (path + size/modified_at), and
143
+ // honors include_all (binaries). Legacy sandbox drivers may still emit bare path
144
+ // strings, so accept either.
145
+ type SandboxFileEntry = { path: string };
146
+ type SandboxFileEntriesResponse = {
147
+ files?: Array<SandboxFileEntry | string>;
137
148
  };
138
149
 
139
150
  export type SuperagentConnectorsResult = {
@@ -160,15 +171,16 @@ export function createSuperagentApiClient(config: SuperagentApiClientConfig) {
160
171
 
161
172
  return {
162
173
  async listAgents(): Promise<SuperagentAgent[]> {
163
- const query = {
164
- app_type: 'user_agent',
165
- ...(config.currentUserId ? {owner_id: config.currentUserId} : {}),
166
- };
174
+ // Match the web Superagent home/sidebar query: filter only by app_type and let
175
+ // the backend default (all_apps_workspace) scope to apps the user can access —
176
+ // owned AND those shared with them as an editor collaborator. Adding owner_id /
177
+ // filter_mode=owned_by_me intersects with ownership and hides shared agents
178
+ // (owned_by_me is also an admin-only mode on the backend). The backend already
179
+ // enforces access, so this only widens the list to what web already shows.
167
180
  const endpoint = buildUrl(appsEndpoint, {
168
181
  fields: AGENT_FIELDS,
169
- filter_mode: 'owned_by_me',
170
182
  limit: '9',
171
- q: JSON.stringify(query),
183
+ q: JSON.stringify({app_type: 'user_agent'}),
172
184
  skip: '0',
173
185
  sort: '-updated_date',
174
186
  });
@@ -240,7 +252,10 @@ export function createSuperagentApiClient(config: SuperagentApiClientConfig) {
240
252
  async saveSecret(agentId: string, name: string, value: string): Promise<void> {
241
253
  const response = await httpClient.post(
242
254
  `${appsEndpoint}/${encodeURIComponent(agentId)}/secrets`,
243
- {[name.trim().toUpperCase()]: value.trim()},
255
+ // Normalize only the key name — preserve the secret value byte-for-byte.
256
+ // Credentials (PEM/private keys, tokens with a trailing newline, passwords)
257
+ // can require exact leading/trailing whitespace; trimming would corrupt them.
258
+ {[name.trim().toUpperCase()]: value},
244
259
  true,
245
260
  );
246
261
  assertSuccess(response, 'Failed to save Superagent secret');
@@ -365,6 +380,12 @@ export function createSuperagentApiClient(config: SuperagentApiClientConfig) {
365
380
  return response.data.token;
366
381
  },
367
382
 
383
+ // The token rides in the query string here (unlike runtimeRequest's
384
+ // Authorization header) on purpose: this URL is opened as a *browser
385
+ // navigation* via nativeAdapters.openUrl (not an XHR), so headers can't be
386
+ // attached — the backend must authenticate it from the `token` query param.
387
+ // Hardening to a dedicated short-lived/single-use connect token is a backend
388
+ // follow-up; until that exists this is the only auth channel for a nav URL.
368
389
  getWhatsAppConnectUrl(agentId: string, runtimeAuthToken: string): string {
369
390
  return buildUrl(`${appsEndpoint}/${encodeURIComponent(agentId)}/agents/${USER_AGENT_AGENT_NAME}/whatsapp`, {
370
391
  token: runtimeAuthToken,
@@ -372,19 +393,24 @@ export function createSuperagentApiClient(config: SuperagentApiClientConfig) {
372
393
  },
373
394
 
374
395
  async getChannelStatus(agentId: string, runtimeAuthToken: string): Promise<SuperagentChannelStatus> {
375
- const [telegram, imessage] = await Promise.all([
396
+ const [telegram, imessage, whatsapp] = await Promise.all([
376
397
  this.getTelegramStatus(agentId, runtimeAuthToken).catch(() => ({connected: false})),
377
398
  this.getIMessageStatus(agentId, runtimeAuthToken).catch(() => ({connected: false})),
399
+ // null signals the editor-gated status call failed (e.g. 403 for viewers).
400
+ this.getWhatsAppStatus(agentId, runtimeAuthToken).catch(() => null),
378
401
  ]);
379
402
 
380
403
  return {
381
404
  imessage,
382
405
  line: {connected: false},
383
406
  telegram,
384
- whatsapp: {
385
- connected: false,
386
- connectUrl: this.getWhatsAppConnectUrl(agentId, runtimeAuthToken),
387
- },
407
+ // Only expose connectUrl (which carries the runtime token) when the
408
+ // editor-gated /whatsapp/status call succeeded. Viewers get a 403 there, so
409
+ // omit it — otherwise they'd hold a working WhatsApp connect URL even though
410
+ // the backend redirect doesn't re-check editor access.
411
+ whatsapp: whatsapp
412
+ ? {...whatsapp, connectUrl: this.getWhatsAppConnectUrl(agentId, runtimeAuthToken)}
413
+ : {connected: false},
388
414
  };
389
415
  },
390
416
 
@@ -404,6 +430,14 @@ export function createSuperagentApiClient(config: SuperagentApiClientConfig) {
404
430
  return normalizeIMessageStatus(response.data);
405
431
  },
406
432
 
433
+ async getWhatsAppStatus(agentId: string, runtimeAuthToken: string): Promise<SuperagentWhatsAppChannelStatus> {
434
+ const response = await runtimeRequest<WhatsAppStatusResponse>(httpClient, appsEndpoint, agentId, runtimeAuthToken, '/whatsapp/status', {
435
+ method: 'GET',
436
+ });
437
+ assertSuccess(response, 'Failed to load WhatsApp status');
438
+ return normalizeWhatsAppStatus(response.data);
439
+ },
440
+
407
441
  async generateIMessageCode(agentId: string, runtimeAuthToken: string): Promise<SuperagentIMessageActivation> {
408
442
  const response = await runtimeRequest<IMessageActivationResponse>(httpClient, appsEndpoint, agentId, runtimeAuthToken, '/imessage/generate-code', {
409
443
  method: 'POST',
@@ -664,13 +698,18 @@ async function listSandboxFilesAt(
664
698
  agentId: string,
665
699
  path: string,
666
700
  ): Promise<string[]> {
667
- const endpoint = buildUrl(`${appsEndpoint}/${encodeURIComponent(agentId)}/sandbox/files/list`, {
701
+ // Use list-entries, not list: /sandbox/files/list ignores include_all and
702
+ // filters out binary assets (PNG/PDF/...), so they never reach the native tree.
703
+ // recursive=true so nested files under each listed directory appear — the native
704
+ // tree is built from this one listing and has no per-folder lazy fetch.
705
+ const endpoint = buildUrl(`${appsEndpoint}/${encodeURIComponent(agentId)}/sandbox/files/list-entries`, {
668
706
  include_all: 'true',
669
707
  path,
708
+ recursive: 'true',
670
709
  });
671
- const response = await httpClient.get<SandboxFileListResponse>(endpoint, true);
710
+ const response = await httpClient.get<SandboxFileEntriesResponse>(endpoint, true);
672
711
  assertSuccess(response, 'Failed to load Superagent files');
673
- return response.data?.files ?? [];
712
+ return (response.data?.files ?? []).map((entry) => (typeof entry === 'string' ? entry : entry.path));
674
713
  }
675
714
 
676
715
  async function listUserAgentSandboxFilePaths(
@@ -747,6 +786,9 @@ function toConnector(integration: AppIntegration): SuperagentConnector {
747
786
  iconUrl: meta?.iconUrl,
748
787
  id: integration.integration_type,
749
788
  name: meta?.name ?? formatConnectorName(integration.integration_type),
789
+ // Trust the live backend flag from /external-auth/list as well as the static
790
+ // catalog metadata — either signalling config-required must surface in the UI.
791
+ requiresConnectionConfig: meta?.requiresConnectionConfig || integration.requires_connection_config,
750
792
  scopes: integration.scopes,
751
793
  status: normalizeConnectorStatus(integration.status),
752
794
  subtitle: meta?.subtitle,
@@ -812,7 +854,8 @@ function getAutomationType(automation: SuperagentAutomation) {
812
854
  if (
813
855
  automation.automation_type === 'scheduled' ||
814
856
  automation.automation_type === 'entity' ||
815
- automation.automation_type === 'connector'
857
+ automation.automation_type === 'connector' ||
858
+ automation.automation_type === 'in_app_agent'
816
859
  ) {
817
860
  return automation.automation_type;
818
861
  }
@@ -850,6 +893,13 @@ function normalizeIMessageStatus(status: IMessageStatusResponse | undefined): Su
850
893
  };
851
894
  }
852
895
 
896
+ function normalizeWhatsAppStatus(status: WhatsAppStatusResponse | undefined): SuperagentWhatsAppChannelStatus {
897
+ return {
898
+ connected: !!status?.connected,
899
+ userHandle: status?.user_handle ?? null,
900
+ };
901
+ }
902
+
853
903
  async function runtimeRequest<T = unknown>(
854
904
  httpClient: SuperagentHttpClient,
855
905
  appsEndpoint: string,
package/src/theme.ts ADDED
@@ -0,0 +1,254 @@
1
+ import { createContext, useContext } from 'react';
2
+ import { StyleSheet } from 'react-native';
3
+
4
+ /**
5
+ * Theming for the Superagent native package.
6
+ *
7
+ * All stylesheets in this package are authored in the original dark palette;
8
+ * light mode (the default) is derived by remapping those colors through the
9
+ * tables below. `createThemedStyles` builds both StyleSheets up front and
10
+ * returns a proxy that resolves against the active scheme on every property
11
+ * read, so existing `styles.foo` call sites keep working unchanged. The
12
+ * scheme lives in module state synced from the provider in
13
+ * SuperagentHomeScreen during render; nothing in the tree is memoized, so a
14
+ * scheme change at the root re-renders (and re-reads) everything.
15
+ */
16
+
17
+ export type SuperagentColorScheme = 'light' | 'dark';
18
+
19
+ let currentScheme: SuperagentColorScheme = 'light';
20
+
21
+ export function getSuperagentColorScheme(): SuperagentColorScheme {
22
+ return currentScheme;
23
+ }
24
+
25
+ export function syncSuperagentColorScheme(scheme: SuperagentColorScheme) {
26
+ currentScheme = scheme;
27
+ }
28
+
29
+ export const SuperagentThemeContext = createContext<{
30
+ scheme: SuperagentColorScheme;
31
+ setScheme: (scheme: SuperagentColorScheme) => void;
32
+ }>({ scheme: 'light', setScheme: () => {} });
33
+
34
+ export function useSuperagentTheme() {
35
+ return useContext(SuperagentThemeContext);
36
+ }
37
+
38
+ // Dark background -> light background.
39
+ const BG_MAP: Record<string, string> = {
40
+ '#000000': '#F3F3F3',
41
+ '#050505': '#FFFFFF',
42
+ '#070707': '#FFFFFF',
43
+ '#080808': '#FFFFFF',
44
+ '#0A0A0A': '#FFFFFF',
45
+ '#0B0B0C': '#FFFFFF',
46
+ '#0F0F10': '#FFFFFF',
47
+ '#101010': '#FFFFFF',
48
+ '#101012': '#FFFFFF',
49
+ '#111111': '#FFFFFF',
50
+ '#111113': '#FFFFFF',
51
+ '#141414': '#FFFFFF',
52
+ '#151515': '#F4F4F5',
53
+ '#171717': '#F4F4F5',
54
+ '#181818': '#F4F4F5',
55
+ '#1B1B1B': '#F4F4F5',
56
+ '#1F1F22': '#F4F4F5',
57
+ '#1F1F23': '#F4F4F5',
58
+ '#242424': '#F4F4F5',
59
+ '#242427': '#F4F4F5',
60
+ '#252528': '#F4F4F5',
61
+ '#262626': '#F4F4F5',
62
+ '#2A2A2A': '#E4E4E7',
63
+ '#2C2C2E': '#E4E4E7',
64
+ '#3A3A3E': '#E4E4E7',
65
+ '#BDBDC2': '#A1A1AA',
66
+ '#F4F4F5': '#18181B',
67
+ // Cream CTAs become the dark CTA treatment on light surfaces.
68
+ '#F7F3E7': '#18181B',
69
+ '#F4F0E6': '#18181B',
70
+ // Status / accent tints.
71
+ '#11251A': '#DCFCE7',
72
+ '#13231D': '#DCFCE7',
73
+ '#21110A': '#FFEDD5',
74
+ '#1D120D': '#FFEDD5',
75
+ '#1C0F10': '#FEE2E2',
76
+ '#241111': '#FEE2E2',
77
+ '#351516': '#FEE2E2',
78
+ '#102036': '#DBEAFE',
79
+ '#1E1B4B': '#E0E7FF',
80
+ '#312E81': '#E0E7FF',
81
+ };
82
+
83
+ // Dark border -> light border.
84
+ const BORDER_MAP: Record<string, string> = {
85
+ '#101012': '#E4E4E7',
86
+ '#1F1F23': '#E4E4E7',
87
+ '#242427': '#E4E4E7',
88
+ '#242429': '#E4E4E7',
89
+ '#252529': '#E4E4E7',
90
+ '#27272A': '#E4E4E7',
91
+ '#29292E': '#E4E4E7',
92
+ '#2A2A2A': '#E4E4E7',
93
+ '#2A2A2D': '#E4E4E7',
94
+ '#2A2A2E': '#E4E4E7',
95
+ '#303035': '#E4E4E7',
96
+ '#333333': '#E4E4E7',
97
+ '#333338': '#E4E4E7',
98
+ '#34343A': '#E4E4E7',
99
+ '#353535': '#E4E4E7',
100
+ '#353539': '#E4E4E7',
101
+ '#38383D': '#E4E4E7',
102
+ '#3A3A3C': '#E4E4E7',
103
+ '#3F3F46': '#D4D4D8',
104
+ '#F4F4F5': '#18181B',
105
+ // Status borders.
106
+ '#3B2222': '#FECACA',
107
+ '#552022': '#FECACA',
108
+ '#5F2424': '#FECACA',
109
+ '#3A2317': '#FED7AA',
110
+ '#4A2413': '#FED7AA',
111
+ };
112
+
113
+ // Dark foreground (text / icons) -> light foreground.
114
+ const TEXT_MAP: Record<string, string> = {
115
+ '#FFFFFF': '#18181B',
116
+ // Home title: near-white in dark mode, #0F0F0F in light (per design spec).
117
+ '#FAFAFA': '#0F0F0F',
118
+ // Dark-on-light-accent foregrounds invert with their CTA surfaces.
119
+ '#111111': '#FFFFFF',
120
+ '#F7F7F7': '#18181B',
121
+ '#F4F4F5': '#18181B',
122
+ '#E4E4E7': '#3F3F46',
123
+ '#DADADA': '#3F3F46',
124
+ '#D4D4D8': '#3F3F46',
125
+ '#C7C7CC': '#52525B',
126
+ '#BDBDC2': '#52525B',
127
+ '#A1A1AA': '#52525B',
128
+ '#8E8E93': '#71717A',
129
+ '#73737A': '#A1A1AA',
130
+ // Status / accent foregrounds tuned for light surfaces.
131
+ '#FCA5A5': '#DC2626',
132
+ '#FECACA': '#B91C1C',
133
+ '#FF6B6B': '#DC2626',
134
+ '#86EFAC': '#15803D',
135
+ '#34D399': '#059669',
136
+ '#FDE68A': '#A16207',
137
+ '#F8D77B': '#A16207',
138
+ '#FDE047': '#A16207',
139
+ '#FBBF24': '#B45309',
140
+ '#C9CAF8': '#4F46E5',
141
+ '#A5B4FC': '#4F46E5',
142
+ '#E0E7FF': '#3730A3',
143
+ '#93C5FD': '#1D4ED8',
144
+ '#8AB4F8': '#1D4ED8',
145
+ };
146
+
147
+ /** Light-mode color for a dark-authored foreground (text / icon) color. */
148
+ export function themedColor(darkColor: string): string {
149
+ if (currentScheme === 'dark') {
150
+ return darkColor;
151
+ }
152
+ return TEXT_MAP[darkColor.toUpperCase()] ?? darkColor;
153
+ }
154
+
155
+ /** Light-mode color for a dark-authored surface (background) color. */
156
+ export function themedSurface(darkColor: string): string {
157
+ if (currentScheme === 'dark') {
158
+ return darkColor;
159
+ }
160
+ return BG_MAP[darkColor.toUpperCase()] ?? darkColor;
161
+ }
162
+
163
+ /** Light-mode color for a dark-authored border color. */
164
+ export function themedBorder(darkColor: string): string {
165
+ if (currentScheme === 'dark') {
166
+ return darkColor;
167
+ }
168
+ return BORDER_MAP[darkColor.toUpperCase()] ?? darkColor;
169
+ }
170
+
171
+ // Brand typography: Wix Madefor, with the original heavy weights stepped
172
+ // down to match the web app's lighter look. Native consumers must bundle the
173
+ // "Wix Madefor Text" font family; the web demo loads it from Google Fonts.
174
+ const SUPERAGENT_FONT_FAMILY = 'Wix Madefor Text';
175
+
176
+ const FONT_WEIGHT_MAP: Record<string, string> = {
177
+ '900': '600',
178
+ '800': '500',
179
+ '700': '500',
180
+ '600': '400',
181
+ bold: '600',
182
+ };
183
+
184
+ function applyTypography(style: Record<string, unknown>) {
185
+ const isText = 'fontSize' in style || 'fontWeight' in style || 'lineHeight' in style;
186
+ if (!isText) {
187
+ return style;
188
+ }
189
+ const next = { ...style };
190
+ if (!next.fontFamily) {
191
+ next.fontFamily = SUPERAGENT_FONT_FAMILY;
192
+ }
193
+ const weight = next.fontWeight;
194
+ if (typeof weight === 'string' && FONT_WEIGHT_MAP[weight]) {
195
+ next.fontWeight = FONT_WEIGHT_MAP[weight];
196
+ }
197
+ return next;
198
+ }
199
+
200
+ const BG_KEYS = new Set(['backgroundColor']);
201
+ const BORDER_KEYS = new Set([
202
+ 'borderColor',
203
+ 'borderTopColor',
204
+ 'borderBottomColor',
205
+ 'borderLeftColor',
206
+ 'borderRightColor',
207
+ ]);
208
+ const TEXT_KEYS = new Set(['color', 'textDecorationColor', 'tintColor']);
209
+ // shadowColor stays dark in both schemes.
210
+
211
+ function toLightStyle(style: Record<string, unknown>) {
212
+ const light: Record<string, unknown> = {};
213
+ for (const [key, value] of Object.entries(style)) {
214
+ if (typeof value === 'string' && value.startsWith('#')) {
215
+ const upper = value.toUpperCase();
216
+ if (BG_KEYS.has(key)) {
217
+ light[key] = BG_MAP[upper] ?? value;
218
+ continue;
219
+ }
220
+ if (BORDER_KEYS.has(key)) {
221
+ light[key] = BORDER_MAP[upper] ?? value;
222
+ continue;
223
+ }
224
+ if (TEXT_KEYS.has(key)) {
225
+ light[key] = TEXT_MAP[upper] ?? value;
226
+ continue;
227
+ }
228
+ }
229
+ light[key] = value;
230
+ }
231
+ return light;
232
+ }
233
+
234
+ /**
235
+ * Drop-in replacement for StyleSheet.create: takes dark-authored styles and
236
+ * returns a proxy resolving each style against the active color scheme.
237
+ */
238
+ export function createThemedStyles<T extends StyleSheet.NamedStyles<T>>(base: T): T {
239
+ const typographyBase = Object.fromEntries(
240
+ Object.entries(base).map(([name, style]) => [name, applyTypography(style as Record<string, unknown>)]),
241
+ );
242
+ const dark = StyleSheet.create(typographyBase as unknown as T);
243
+ const lightBase = Object.fromEntries(
244
+ Object.entries(typographyBase).map(([name, style]) => [name, toLightStyle(style as Record<string, unknown>)]),
245
+ );
246
+ const light = StyleSheet.create(lightBase as unknown as T);
247
+
248
+ return new Proxy(dark, {
249
+ get(_, property) {
250
+ const sheets = currentScheme === 'dark' ? dark : light;
251
+ return sheets[property as keyof T];
252
+ },
253
+ });
254
+ }
package/src/types.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { ComponentType, ReactNode } from 'react';
2
2
  import type { ProviderProps } from 'react-native-paper';
3
3
 
4
+ import type { SuperagentColorScheme } from './theme';
5
+
4
6
  export type SuperagentToolCall = {
5
7
  id?: string;
6
8
  name: string;
@@ -144,10 +146,15 @@ export type SuperagentConversation = {
144
146
  messages?: SuperagentMessage[];
145
147
  };
146
148
 
149
+ export type SuperagentAgentDonePayload = {
150
+ sender_platform_user_id?: string;
151
+ bootstrap_intro?: boolean;
152
+ };
153
+
147
154
  export type SuperagentRealtimeHandlers = {
148
155
  onMessage?: (message: SuperagentMessage) => void;
149
156
  onConversation?: (conversation: SuperagentConversation) => void;
150
- onAgentDone?: () => void;
157
+ onAgentDone?: (payload?: SuperagentAgentDonePayload) => void;
151
158
  onReconnect?: () => void;
152
159
  onError?: (error: unknown) => void;
153
160
  };
@@ -241,6 +248,7 @@ export type SuperagentTelegramChannelStatus = {
241
248
  export type SuperagentWhatsAppChannelStatus = {
242
249
  connected?: boolean;
243
250
  connectUrl?: string | null;
251
+ userHandle?: string | null;
244
252
  };
245
253
 
246
254
  export type SuperagentLineActivation = {
@@ -380,6 +388,10 @@ export type SuperagentNativeClient = {
380
388
  getConversation(conversationId: string): Promise<SuperagentConversation>;
381
389
  getMessages(conversationId: string, params?: { limit?: number; before?: string }): Promise<SuperagentPaginatedMessages>;
382
390
  createConversation(metadata?: Record<string, unknown>): Promise<SuperagentConversation>;
391
+ // Seeds a brand-new conversation with the lightweight intro turn. Unlike
392
+ // addMessage, the backend persists the seed hidden and skips sandbox acquisition,
393
+ // so opening an empty chat doesn't stall on a cold sandbox or burn a tool turn.
394
+ bootstrapIntro(conversationId: string, messageParams?: Record<string, unknown>): Promise<{ started: boolean }>;
383
395
  addMessage(conversationId: string, message: Partial<SuperagentMessage>): Promise<unknown>;
384
396
  stopConversation(conversationId: string): Promise<void>;
385
397
  getQueuedMessages(conversationId: string): Promise<{ messages: QueuedSuperagentMessage[] }>;
@@ -421,6 +433,11 @@ export type SuperagentMarkdownRendererProps = {
421
433
  export type SuperagentMarkdownRenderer = ComponentType<SuperagentMarkdownRendererProps>;
422
434
 
423
435
  export type SuperagentHomeScreenProps = {
436
+ activeAgentId?: string | null;
437
+ /** Initial color scheme; the in-app settings toggle can change it. Defaults to 'light'. */
438
+ defaultColorScheme?: SuperagentColorScheme;
439
+ /** Called when the user changes the scheme from settings (e.g. to persist it). */
440
+ onColorSchemeChange?: (scheme: SuperagentColorScheme) => void;
424
441
  agents?: SuperagentAgent[];
425
442
  latestMessages?: SuperagentMessage[];
426
443
  messagesByAgentId?: Record<string, SuperagentMessage[]>;
@@ -433,6 +450,9 @@ export type SuperagentHomeScreenProps = {
433
450
  navigationMode?: 'internal' | 'external';
434
451
  paperTheme?: ProviderProps['theme'];
435
452
  currentUserAvatarUrl?: string | null;
453
+ // Platform user id of the signed-in user. Used to ignore agent_done events from
454
+ // other collaborators in shared conversations (sender_platform_user_id filter).
455
+ currentUserId?: string | null;
436
456
  currentUserName?: string;
437
457
  fileLoadError?: string | null;
438
458
  fileLoadFailed?: boolean;
@@ -465,7 +485,7 @@ export type SuperagentHomeScreenProps = {
465
485
  isLoadingChannels?: boolean;
466
486
  isLoadingConnectors?: boolean;
467
487
  onCancelConnectorConnection?: (input: { agentId: string; connectorId: string }) => void;
468
- onConnectConnector?: (input: SuperagentConnectorActionInput) => Promise<boolean | void> | boolean | void;
488
+ onConnectConnector?: (input: SuperagentConnectorActionInput) => Promise<boolean | string | void> | boolean | string | void;
469
489
  onDisconnectConnector?: (input: SuperagentConnectorActionInput) => Promise<void> | void;
470
490
  onArchiveAutomation?: (input: SuperagentAutomationActionInput) => Promise<void> | void;
471
491
  onCloneAgent?: (input: SuperagentAgentActionInput) => Promise<void> | void;