@buoy-gg/ask-buoy 7.0.35 → 7.0.38

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 (286) hide show
  1. package/README.md +73 -15
  2. package/lib/commonjs/blocks/AskBlocks.js +1 -338
  3. package/lib/commonjs/blocks/BlockRenderer.js +1 -250
  4. package/lib/commonjs/blocks/ChromePrototypes.js +1 -514
  5. package/lib/commonjs/blocks/DataBlocks.js +1 -688
  6. package/lib/commonjs/blocks/ExtraBlocks.js +1 -1854
  7. package/lib/commonjs/blocks/MediaBlocks.js +1 -140
  8. package/lib/commonjs/blocks/ReceiptBlocks.js +1 -586
  9. package/lib/commonjs/blocks/blockText.js +1 -0
  10. package/lib/commonjs/blocks/blockText.test.js +1 -0
  11. package/lib/commonjs/blocks/context.js +1 -42
  12. package/lib/commonjs/blocks/icons.js +1 -96
  13. package/lib/commonjs/blocks/index.js +1 -95
  14. package/lib/commonjs/blocks/listRow.test.js +1 -55
  15. package/lib/commonjs/blocks/pageState.js +1 -34
  16. package/lib/commonjs/blocks/pageState.test.js +1 -57
  17. package/lib/commonjs/blocks/primitives.js +1 -401
  18. package/lib/commonjs/blocks/primitivesIndex.js +1 -62
  19. package/lib/commonjs/components/ApprovalCard.js +1 -140
  20. package/lib/commonjs/components/AskBuoyHeader.js +1 -164
  21. package/lib/commonjs/components/AskBuoyIcon.js +1 -19
  22. package/lib/commonjs/components/AskBuoyModal.js +1 -353
  23. package/lib/commonjs/components/AskBuoySettings.js +1 -69
  24. package/lib/commonjs/components/ChangesBar.js +1 -211
  25. package/lib/commonjs/components/Composer.js +1 -175
  26. package/lib/commonjs/components/EmptyState.js +1 -154
  27. package/lib/commonjs/components/KeyboardPad.js +1 -0
  28. package/lib/commonjs/components/Markdown.js +1 -252
  29. package/lib/commonjs/components/MessageList.js +1 -683
  30. package/lib/commonjs/components/QueuedMessages.js +1 -0
  31. package/lib/commonjs/components/ThinkingStrip.js +1 -223
  32. package/lib/commonjs/components/TypingDots.js +1 -63
  33. package/lib/commonjs/components/markdownParse.js +1 -0
  34. package/lib/commonjs/components/markdownParse.test.js +1 -0
  35. package/lib/commonjs/components/useCopyAction.js +1 -50
  36. package/lib/commonjs/index.js +1 -252
  37. package/lib/commonjs/preset.js +1 -90
  38. package/lib/commonjs/store/activityGroups.js +1 -0
  39. package/lib/commonjs/store/activityGroups.test.js +1 -0
  40. package/lib/commonjs/store/askBuoySettings.js +1 -67
  41. package/lib/commonjs/store/askBuoyStore.js +1 -365
  42. package/lib/commonjs/store/blockPlacement.js +1 -0
  43. package/lib/commonjs/store/blockPlacement.test.js +1 -0
  44. package/lib/commonjs/store/queue.test.js +1 -0
  45. package/lib/commonjs/store/resetConversation.js +1 -0
  46. package/lib/commonjs/store/restorePending.test.js +1 -0
  47. package/lib/commonjs/store/restoredIds.test.js +1 -47
  48. package/lib/commonjs/store/suggestions.js +1 -0
  49. package/lib/commonjs/store/suggestions.test.js +1 -0
  50. package/lib/commonjs/store/systemLine.test.js +1 -0
  51. package/lib/commonjs/store/ticketPrompt.js +1 -0
  52. package/lib/commonjs/store/traceText.js +1 -81
  53. package/lib/commonjs/store/traceText.test.js +1 -112
  54. package/lib/commonjs/store/transcriptPersistence.js +1 -208
  55. package/lib/commonjs/store/transcriptPersistence.test.js +1 -185
  56. package/lib/commonjs/store/turnRendering.test.js +1 -0
  57. package/lib/commonjs/store/useAskBuoy.js +1 -400
  58. package/lib/commonjs/store/useAskBuoySettings.js +1 -14
  59. package/lib/commonjs/sync/askBuoySyncAdapter.js +1 -119
  60. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +1 -141
  61. package/lib/commonjs/sync/wire.js +1 -58
  62. package/lib/commonjs/types.js +1 -6
  63. package/lib/module/blocks/AskBlocks.js +1 -331
  64. package/lib/module/blocks/BlockRenderer.js +1 -245
  65. package/lib/module/blocks/ChromePrototypes.js +1 -503
  66. package/lib/module/blocks/DataBlocks.js +1 -674
  67. package/lib/module/blocks/ExtraBlocks.js +1 -1827
  68. package/lib/module/blocks/MediaBlocks.js +1 -135
  69. package/lib/module/blocks/ReceiptBlocks.js +1 -574
  70. package/lib/module/blocks/blockText.js +1 -0
  71. package/lib/module/blocks/blockText.test.js +1 -0
  72. package/lib/module/blocks/context.js +1 -35
  73. package/lib/module/blocks/icons.js +1 -91
  74. package/lib/module/blocks/index.js +1 -8
  75. package/lib/module/blocks/listRow.test.js +1 -56
  76. package/lib/module/blocks/pageState.js +1 -30
  77. package/lib/module/blocks/pageState.test.js +1 -56
  78. package/lib/module/blocks/primitives.js +1 -389
  79. package/lib/module/blocks/primitivesIndex.js +1 -5
  80. package/lib/module/components/ApprovalCard.js +1 -135
  81. package/lib/module/components/AskBuoyHeader.js +1 -161
  82. package/lib/module/components/AskBuoyIcon.js +1 -8
  83. package/lib/module/components/AskBuoyModal.js +1 -348
  84. package/lib/module/components/AskBuoySettings.js +1 -64
  85. package/lib/module/components/ChangesBar.js +1 -206
  86. package/lib/module/components/Composer.js +1 -170
  87. package/lib/module/components/EmptyState.js +1 -149
  88. package/lib/module/components/KeyboardPad.js +1 -0
  89. package/lib/module/components/Markdown.js +1 -246
  90. package/lib/module/components/MessageList.js +1 -677
  91. package/lib/module/components/QueuedMessages.js +1 -0
  92. package/lib/module/components/ThinkingStrip.js +1 -218
  93. package/lib/module/components/TypingDots.js +1 -58
  94. package/lib/module/components/markdownParse.js +1 -0
  95. package/lib/module/components/markdownParse.test.js +1 -0
  96. package/lib/module/components/useCopyAction.js +1 -46
  97. package/lib/module/index.js +1 -34
  98. package/lib/module/preset.js +1 -73
  99. package/lib/module/store/activityGroups.js +1 -0
  100. package/lib/module/store/activityGroups.test.js +1 -0
  101. package/lib/module/store/askBuoySettings.js +1 -62
  102. package/lib/module/store/askBuoyStore.js +1 -361
  103. package/lib/module/store/blockPlacement.js +1 -0
  104. package/lib/module/store/blockPlacement.test.js +1 -0
  105. package/lib/module/store/queue.test.js +1 -0
  106. package/lib/module/store/resetConversation.js +1 -0
  107. package/lib/module/store/restorePending.test.js +1 -0
  108. package/lib/module/store/restoredIds.test.js +1 -46
  109. package/lib/module/store/suggestions.js +1 -0
  110. package/lib/module/store/suggestions.test.js +1 -0
  111. package/lib/module/store/systemLine.test.js +1 -0
  112. package/lib/module/store/ticketPrompt.js +1 -0
  113. package/lib/module/store/traceText.js +1 -75
  114. package/lib/module/store/traceText.test.js +1 -111
  115. package/lib/module/store/transcriptPersistence.js +1 -198
  116. package/lib/module/store/transcriptPersistence.test.js +1 -184
  117. package/lib/module/store/turnRendering.test.js +1 -0
  118. package/lib/module/store/useAskBuoy.js +1 -394
  119. package/lib/module/store/useAskBuoySettings.js +1 -9
  120. package/lib/module/sync/askBuoySyncAdapter.js +1 -114
  121. package/lib/module/sync/askBuoySyncAdapter.test.js +1 -140
  122. package/lib/module/sync/wire.js +1 -47
  123. package/lib/module/types.js +1 -4
  124. package/lib/typescript/blocks/DataBlocks.d.ts +11 -0
  125. package/lib/typescript/blocks/ExtraBlocks.d.ts +18 -2
  126. package/lib/typescript/blocks/blockText.d.ts +14 -0
  127. package/lib/typescript/blocks/blockText.test.d.ts +2 -0
  128. package/lib/typescript/blocks/primitives.d.ts +16 -1
  129. package/lib/typescript/components/ApprovalCard.d.ts +9 -1
  130. package/lib/typescript/components/AskBuoyHeader.d.ts +31 -1
  131. package/lib/typescript/components/Composer.d.ts +16 -1
  132. package/lib/typescript/components/EmptyState.d.ts +5 -1
  133. package/lib/typescript/components/KeyboardPad.d.ts +33 -0
  134. package/lib/typescript/components/Markdown.d.ts +0 -10
  135. package/lib/typescript/components/MessageList.d.ts +7 -2
  136. package/lib/typescript/components/QueuedMessages.d.ts +10 -0
  137. package/lib/typescript/components/markdownParse.d.ts +49 -0
  138. package/lib/typescript/components/markdownParse.test.d.ts +2 -0
  139. package/lib/typescript/preset.d.ts +4 -2
  140. package/lib/typescript/store/activityGroups.d.ts +29 -0
  141. package/lib/typescript/store/activityGroups.test.d.ts +2 -0
  142. package/lib/typescript/store/askBuoySettings.d.ts +22 -0
  143. package/lib/typescript/store/askBuoyStore.d.ts +174 -9
  144. package/lib/typescript/store/blockPlacement.d.ts +30 -0
  145. package/lib/typescript/store/blockPlacement.test.d.ts +2 -0
  146. package/lib/typescript/store/queue.test.d.ts +2 -0
  147. package/lib/typescript/store/resetConversation.d.ts +38 -0
  148. package/lib/typescript/store/restorePending.test.d.ts +2 -0
  149. package/lib/typescript/store/suggestions.d.ts +32 -0
  150. package/lib/typescript/store/suggestions.test.d.ts +2 -0
  151. package/lib/typescript/store/systemLine.test.d.ts +2 -0
  152. package/lib/typescript/store/ticketPrompt.d.ts +11 -0
  153. package/lib/typescript/store/transcriptPersistence.d.ts +41 -2
  154. package/lib/typescript/store/turnRendering.test.d.ts +2 -0
  155. package/lib/typescript/store/useAskBuoy.d.ts +26 -3
  156. package/lib/typescript/sync/askBuoySyncAdapter.d.ts +29 -6
  157. package/package.json +10 -10
  158. package/lib/commonjs/blocks/AskBlocks.js.map +0 -1
  159. package/lib/commonjs/blocks/BlockRenderer.js.map +0 -1
  160. package/lib/commonjs/blocks/ChromePrototypes.js.map +0 -1
  161. package/lib/commonjs/blocks/DataBlocks.js.map +0 -1
  162. package/lib/commonjs/blocks/ExtraBlocks.js.map +0 -1
  163. package/lib/commonjs/blocks/MediaBlocks.js.map +0 -1
  164. package/lib/commonjs/blocks/ReceiptBlocks.js.map +0 -1
  165. package/lib/commonjs/blocks/context.js.map +0 -1
  166. package/lib/commonjs/blocks/icons.js.map +0 -1
  167. package/lib/commonjs/blocks/index.js.map +0 -1
  168. package/lib/commonjs/blocks/listRow.test.js.map +0 -1
  169. package/lib/commonjs/blocks/pageState.js.map +0 -1
  170. package/lib/commonjs/blocks/pageState.test.js.map +0 -1
  171. package/lib/commonjs/blocks/primitives.js.map +0 -1
  172. package/lib/commonjs/blocks/primitivesIndex.js.map +0 -1
  173. package/lib/commonjs/components/ApprovalCard.js.map +0 -1
  174. package/lib/commonjs/components/AskBuoyHeader.js.map +0 -1
  175. package/lib/commonjs/components/AskBuoyIcon.js.map +0 -1
  176. package/lib/commonjs/components/AskBuoyModal.js.map +0 -1
  177. package/lib/commonjs/components/AskBuoySettings.js.map +0 -1
  178. package/lib/commonjs/components/ChangesBar.js.map +0 -1
  179. package/lib/commonjs/components/Composer.js.map +0 -1
  180. package/lib/commonjs/components/EmptyState.js.map +0 -1
  181. package/lib/commonjs/components/Markdown.js.map +0 -1
  182. package/lib/commonjs/components/MessageList.js.map +0 -1
  183. package/lib/commonjs/components/ThinkingStrip.js.map +0 -1
  184. package/lib/commonjs/components/TypingDots.js.map +0 -1
  185. package/lib/commonjs/components/useCopyAction.js.map +0 -1
  186. package/lib/commonjs/index.js.map +0 -1
  187. package/lib/commonjs/preset.js.map +0 -1
  188. package/lib/commonjs/store/askBuoySettings.js.map +0 -1
  189. package/lib/commonjs/store/askBuoyStore.js.map +0 -1
  190. package/lib/commonjs/store/restoredIds.test.js.map +0 -1
  191. package/lib/commonjs/store/traceText.js.map +0 -1
  192. package/lib/commonjs/store/traceText.test.js.map +0 -1
  193. package/lib/commonjs/store/transcriptPersistence.js.map +0 -1
  194. package/lib/commonjs/store/transcriptPersistence.test.js.map +0 -1
  195. package/lib/commonjs/store/useAskBuoy.js.map +0 -1
  196. package/lib/commonjs/store/useAskBuoySettings.js.map +0 -1
  197. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +0 -1
  198. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +0 -1
  199. package/lib/commonjs/sync/wire.js.map +0 -1
  200. package/lib/commonjs/types.js.map +0 -1
  201. package/lib/module/blocks/AskBlocks.js.map +0 -1
  202. package/lib/module/blocks/BlockRenderer.js.map +0 -1
  203. package/lib/module/blocks/ChromePrototypes.js.map +0 -1
  204. package/lib/module/blocks/DataBlocks.js.map +0 -1
  205. package/lib/module/blocks/ExtraBlocks.js.map +0 -1
  206. package/lib/module/blocks/MediaBlocks.js.map +0 -1
  207. package/lib/module/blocks/ReceiptBlocks.js.map +0 -1
  208. package/lib/module/blocks/context.js.map +0 -1
  209. package/lib/module/blocks/icons.js.map +0 -1
  210. package/lib/module/blocks/index.js.map +0 -1
  211. package/lib/module/blocks/listRow.test.js.map +0 -1
  212. package/lib/module/blocks/pageState.js.map +0 -1
  213. package/lib/module/blocks/pageState.test.js.map +0 -1
  214. package/lib/module/blocks/primitives.js.map +0 -1
  215. package/lib/module/blocks/primitivesIndex.js.map +0 -1
  216. package/lib/module/components/ApprovalCard.js.map +0 -1
  217. package/lib/module/components/AskBuoyHeader.js.map +0 -1
  218. package/lib/module/components/AskBuoyIcon.js.map +0 -1
  219. package/lib/module/components/AskBuoyModal.js.map +0 -1
  220. package/lib/module/components/AskBuoySettings.js.map +0 -1
  221. package/lib/module/components/ChangesBar.js.map +0 -1
  222. package/lib/module/components/Composer.js.map +0 -1
  223. package/lib/module/components/EmptyState.js.map +0 -1
  224. package/lib/module/components/Markdown.js.map +0 -1
  225. package/lib/module/components/MessageList.js.map +0 -1
  226. package/lib/module/components/ThinkingStrip.js.map +0 -1
  227. package/lib/module/components/TypingDots.js.map +0 -1
  228. package/lib/module/components/useCopyAction.js.map +0 -1
  229. package/lib/module/index.js.map +0 -1
  230. package/lib/module/preset.js.map +0 -1
  231. package/lib/module/store/askBuoySettings.js.map +0 -1
  232. package/lib/module/store/askBuoyStore.js.map +0 -1
  233. package/lib/module/store/restoredIds.test.js.map +0 -1
  234. package/lib/module/store/traceText.js.map +0 -1
  235. package/lib/module/store/traceText.test.js.map +0 -1
  236. package/lib/module/store/transcriptPersistence.js.map +0 -1
  237. package/lib/module/store/transcriptPersistence.test.js.map +0 -1
  238. package/lib/module/store/useAskBuoy.js.map +0 -1
  239. package/lib/module/store/useAskBuoySettings.js.map +0 -1
  240. package/lib/module/sync/askBuoySyncAdapter.js.map +0 -1
  241. package/lib/module/sync/askBuoySyncAdapter.test.js.map +0 -1
  242. package/lib/module/sync/wire.js.map +0 -1
  243. package/lib/module/types.js.map +0 -1
  244. package/lib/typescript/blocks/AskBlocks.d.ts.map +0 -1
  245. package/lib/typescript/blocks/BlockRenderer.d.ts.map +0 -1
  246. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +0 -1
  247. package/lib/typescript/blocks/DataBlocks.d.ts.map +0 -1
  248. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +0 -1
  249. package/lib/typescript/blocks/MediaBlocks.d.ts.map +0 -1
  250. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +0 -1
  251. package/lib/typescript/blocks/context.d.ts.map +0 -1
  252. package/lib/typescript/blocks/icons.d.ts.map +0 -1
  253. package/lib/typescript/blocks/index.d.ts.map +0 -1
  254. package/lib/typescript/blocks/listRow.test.d.ts.map +0 -1
  255. package/lib/typescript/blocks/pageState.d.ts.map +0 -1
  256. package/lib/typescript/blocks/pageState.test.d.ts.map +0 -1
  257. package/lib/typescript/blocks/primitives.d.ts.map +0 -1
  258. package/lib/typescript/blocks/primitivesIndex.d.ts.map +0 -1
  259. package/lib/typescript/components/ApprovalCard.d.ts.map +0 -1
  260. package/lib/typescript/components/AskBuoyHeader.d.ts.map +0 -1
  261. package/lib/typescript/components/AskBuoyIcon.d.ts.map +0 -1
  262. package/lib/typescript/components/AskBuoyModal.d.ts.map +0 -1
  263. package/lib/typescript/components/AskBuoySettings.d.ts.map +0 -1
  264. package/lib/typescript/components/ChangesBar.d.ts.map +0 -1
  265. package/lib/typescript/components/Composer.d.ts.map +0 -1
  266. package/lib/typescript/components/EmptyState.d.ts.map +0 -1
  267. package/lib/typescript/components/Markdown.d.ts.map +0 -1
  268. package/lib/typescript/components/MessageList.d.ts.map +0 -1
  269. package/lib/typescript/components/ThinkingStrip.d.ts.map +0 -1
  270. package/lib/typescript/components/TypingDots.d.ts.map +0 -1
  271. package/lib/typescript/components/useCopyAction.d.ts.map +0 -1
  272. package/lib/typescript/index.d.ts.map +0 -1
  273. package/lib/typescript/preset.d.ts.map +0 -1
  274. package/lib/typescript/store/askBuoySettings.d.ts.map +0 -1
  275. package/lib/typescript/store/askBuoyStore.d.ts.map +0 -1
  276. package/lib/typescript/store/restoredIds.test.d.ts.map +0 -1
  277. package/lib/typescript/store/traceText.d.ts.map +0 -1
  278. package/lib/typescript/store/traceText.test.d.ts.map +0 -1
  279. package/lib/typescript/store/transcriptPersistence.d.ts.map +0 -1
  280. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +0 -1
  281. package/lib/typescript/store/useAskBuoy.d.ts.map +0 -1
  282. package/lib/typescript/store/useAskBuoySettings.d.ts.map +0 -1
  283. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +0 -1
  284. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +0 -1
  285. package/lib/typescript/sync/wire.d.ts.map +0 -1
  286. package/lib/typescript/types.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,17 +1,37 @@
1
1
  # @buoy-gg/ask-buoy
2
2
 
3
- **Ask Buoy** — an AI chat sheet inside your React Native app that drives every Buoy devtool, for the people on your team who don't read code.
3
+ Ask Buoy adds an AI chat to your React Native app. It can inspect and act through installed Buoy tools, subject to your policy and each tool’s integration.
4
4
 
5
- Your QA tester types *"make the double burger out of stock at store 100 and put it in my cart"* and it happens. No ticket, no dev, no knowing what a cart-item object looks like. Behind the chat, an agent calls the same ~190 tool actions Buoy Desktop and the MCP server drive — network overrides, storage writes, react-query cache pokes, impersonation, navigation — and reports back in plain English.
5
+ For example, a tester can ask it to simulate a failed checkout request when Network overrides are configured. It reports the actions it took and exposes available undo operations. Some changes cannot be undone.
6
6
 
7
- **The model is yours.** Buoy never holds an API key and never proxies a request. You point Ask Buoy at your own endpoint and hand it headers from your app's own session.
7
+ You configure the model endpoint and authentication. Requests go from the app to that endpoint. Use an authenticated gateway that validates the caller and keeps provider secrets on the server.
8
8
 
9
9
  ## Setup
10
10
 
11
11
  ```bash
12
- npm install @buoy-gg/ask-buoy
12
+ npm install @buoy-gg/core @buoy-gg/ask-buoy
13
13
  ```
14
14
 
15
+ ## Account and configuration
16
+
17
+ Ask Buoy requires Pro access. Use a development build with `@buoy-gg/core` and configure your Buoy account key. From your app’s directory, sign in:
18
+
19
+ ```bash
20
+ npx --package=@buoy-gg/core buoy login
21
+ ```
22
+
23
+ For Expo, initialize Buoy before rendering the menu:
24
+
25
+ ```tsx
26
+ import { Buoy } from "@buoy-gg/core";
27
+
28
+ Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
29
+ ```
30
+
31
+ The login command writes the Expo key to `.env.local`. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load `.env.local` automatically. Mount `FloatingDevTools` inside the same providers as your screens and restart the development server after installation. The [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) shows the complete root component setup.
32
+
33
+ This configuration fragment uses your existing `auth.getToken()` implementation. Your gateway must validate that token. Replace the endpoint and model with values your gateway supports.
34
+
15
35
  ```tsx
16
36
  import { FloatingDevTools } from "@buoy-gg/core";
17
37
 
@@ -19,10 +39,9 @@ import { FloatingDevTools } from "@buoy-gg/core";
19
39
  askBuoy={{
20
40
  endpoint: "https://ai.acme.com/v1/messages",
21
41
  protocol: "anthropic", // or "openai" — Azure, Gemini-compat, most gateways
22
- model: "claude-opus-5",
42
+ model: "YOUR_MODEL_ID",
23
43
 
24
44
  // Called before every request, so short-lived tokens work.
25
- // This is the whole auth story: your credential, your gateway.
26
45
  headers: async () => ({
27
46
  Authorization: `Bearer ${await auth.getToken()}`,
28
47
  }),
@@ -30,21 +49,60 @@ import { FloatingDevTools } from "@buoy-gg/core";
30
49
  />
31
50
  ```
32
51
 
33
- The tool appears in the dial as **ASK BUOY**. This package is the chat; the *hands* are the other Buoy tools you have installed — each tool package you add (network, storage, impersonate, …) becomes something the agent can do.
52
+ Open Ask Buoy and ask it to read a known captured request. Confirm that it reports the actual request before trying a write. Available actions depend on installed tools and policy. Start with `policy: { readOnly: true }` in the `askBuoy` configuration if you want to validate reads first.
53
+
54
+ Keep package versions compatible with their declared peer dependencies, especially `@buoy-gg/license`. Check package-manager peer warnings when upgrading.
55
+
56
+ ### Teach it your data
57
+
58
+ Buoy discovers routes, query keys, store names and storage keys by watching the app run, and reads the item shape of every non-empty list it can see — what it can't know is what any of that *means*, or the shape of a collection that is currently empty.
59
+
60
+ Add `context` inside the `askBuoy` configuration. For example:
61
+
62
+ ```tsx
63
+ const context = {
64
+ notes: ["Prices are integer cents everywhere. `/api/*` ids are prefixed — ord_, usr_, itm_."],
65
+ types: { CartLine: "{ lineId: string; itemId: string; qty: number; unitPrice: number }" },
66
+ };
67
+ ```
68
+
69
+ The docs carry a prompt you can paste into a coding agent to draft both from your repo.
70
+
71
+ Tasks that aren't guessable from the app — *"reproduce the pricing glitch"*, *"put this account in the expired state"* — go in `context.procedures`: an `id`, a one-line `summary` (the only part in every prompt), and a `body` with the steps, loaded when a request matches. A tester types **"run the expired-subscription check"** and the agent opens the playbook first instead of asking what that means. A procedure guides; it grants nothing.
72
+
73
+ ## Permissions and verification
74
+
75
+ The changes bar lists undoable and permanent changes. Supported storage and query-cache writes capture the prior value for undo. Changes without a captured prior value are marked permanent.
76
+
77
+ Destructive actions require approval by default. Configure `policy` to require more approvals, allow or deny actions, limit steps, or enable read-only access. An approval note is passed to the model. **Allow for this chat** waives approval for that action during the conversation; it does not override read-only mode, deny rules, or release restrictions. Review or revoke these waivers in Settings.
78
+
79
+ Supported writes have outcome checks. The activity row reports **Verified**, **Done · not yet visible**, or **Done · check failed**. Inspect the affected screen or state when a result is unverified. Actions requiring development hooks are refused in release builds.
80
+
81
+ Credential redaction uses field names and value patterns. SecureStore values require `policy.secureReads`. Review the data your tools expose; redaction cannot establish that arbitrary app data is safe to send to a model.
82
+
83
+ ## Sessions and debugging
84
+
85
+ - Saved sessions can restore the transcript, agent memory, and pending approvals. Set `persistTranscript: false` to disable transcript persistence. Saved transcripts omit tool results.
86
+ - Large, redacted results remain in memory for the conversation. The agent can retrieve fields or sections omitted from the model’s initial result. This evidence store is not persisted across restarts.
87
+ - Eligible rate-limit and overload responses are retried when no output was generated. Oversized requests can trim history and retry. The sheet reports retry activity.
88
+ - Answers can include tables, choices, diffs, images, receipts, and approval cards. Messages sent during a turn queue for later processing.
89
+ - **Settings → Chat → Show agent thinking** exposes available reasoning and step payloads, results, timing, and token counts. Inspect the result as well as the step status when diagnosing a failed action.
90
+ - A ticket summary can collect steps, expected and observed behavior, build information, and available evidence without running new actions.
91
+
92
+ ## Desktop and custom integrations
93
+
94
+ Desktop can mirror the conversation and expose supported remote undo. There is no remote composer. Mirroring requires external sync and account admission; your app still controls authorization.
34
95
 
35
- ## What keeps it trustworthy
96
+ Custom tools need a sync adapter and a `ToolDescriptor` passed through `tools`. They use the same parameter validation and policy checks as built-in actions.
36
97
 
37
- - **A visible changes bar** the moment it modifies anything — "Changed this app · 2 undoable · 1 permanent" — with real undo: storage writes are pre-read so Undo restores the exact prior value.
38
- - **Destructive actions wait for a tap** by default; everything else auto-runs behind the bar. Tunable with `policy.requireApproval`, down to `readOnly: true` for a look-but-don't-touch support seat.
39
- - **Release-build honesty**: actions that can't work outside a dev build are refused with an explanation, never silently "succeed".
40
- - **Credential redaction** by field name and value shape before anything reaches your model; the agent's own traffic is invisible to it; the saved transcript keeps what was said but never a tool result (`persistTranscript: false` turns saving off entirely).
98
+ Use `onEvent` to observe tool calls, outcome checks, approvals, retries, errors, and token usage. Each `done` event includes a `stopReason`.
41
99
 
42
100
  ## Docs
43
101
 
44
- Full guide — gateway templates, model guidance, the exact list of what's sent to the model, policy reference: **[buoy.gg/docs/tools/copilot](https://www.buoy.gg/docs/tools/copilot)**
102
+ For gateway requirements, model configuration, data sent to the model, and policy options, see **[buoy.gg/docs/tools/ask-buoy](https://buoy.gg/buoy/latest/docs/tools/ask-buoy)**
45
103
 
46
- The headless engine (catalog, providers, turn loop, effect ledger) lives in [`@buoy-gg/agent-core`](https://www.npmjs.com/package/@buoy-gg/agent-core).
104
+ The headless engine (catalog, providers, turn loop, effect ledger, blocks) lives in [`@buoy-gg/agent-core`](https://www.npmjs.com/package/@buoy-gg/agent-core).
47
105
 
48
106
  ## License
49
107
 
50
- See [buoy.gg](https://www.buoy.gg) for licensing.
108
+ Ask Buoy requires a [Buoy Pro licence](https://buoy.gg/pricing). See [buoy.gg](https://buoy.gg) for licensing.
@@ -1,338 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Choice = Choice;
7
- exports.Confirm = Confirm;
8
- exports.Input = Input;
9
- var _react = require("react");
10
- var _reactNative = require("react-native");
11
- var _sharedUi = require("@buoy-gg/shared-ui");
12
- var _context = require("./context");
13
- var _icons = require("./icons");
14
- var _primitives = require("./primitives");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- /**
17
- * Ask blocks — the user has to decide, and the turn is waiting.
18
- *
19
- * Choice, Confirm and Input all lock once answered: the chosen option stays
20
- * highlighted, the rest dim, and nothing in history is tappable twice. The
21
- * answer is handed to the sheet as a BlockAnswer and becomes the next user
22
- * message, so the model reads plain words ("Business checkout"), never JSON.
23
- */
24
-
25
- function Choice({
26
- block
27
- }) {
28
- const h = (0, _context.useBlockHandlers)();
29
- const answer = h.answered[block.id];
30
- const chosen = answer?.kind === "choice" ? answer.optionId : null;
31
- const locked = !!answer;
32
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.Card, {
33
- testID: `buoy-block-choice-${block.id}`,
34
- tone: locked ? undefined : "info",
35
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
36
- style: styles.question,
37
- children: block.question
38
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
39
- style: styles.options,
40
- children: block.options.slice(0, 5).map((o, i) => {
41
- const isChosen = chosen === o.id;
42
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
43
- testID: `buoy-block-option-${o.id}`,
44
- accessibilityRole: "button",
45
- accessibilityState: {
46
- selected: isChosen,
47
- disabled: locked
48
- },
49
- disabled: locked,
50
- onPress: () => h.answer({
51
- blockId: block.id,
52
- kind: "choice",
53
- optionId: o.id,
54
- label: o.label
55
- }),
56
- style: ({
57
- pressed
58
- }) => [styles.option, i > 0 && styles.optionDivider, isChosen && styles.optionChosen, locked && !isChosen && styles.optionDimmed, pressed && !locked && styles.pressed],
59
- children: [o.icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.BlockIcon, {
60
- name: o.icon
61
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
62
- style: styles.optionText,
63
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
64
- style: [styles.optionLabel, isChosen && styles.optionLabelChosen],
65
- children: o.label
66
- }), o.detail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
67
- style: styles.optionDetail,
68
- children: o.detail
69
- }) : null]
70
- }), isChosen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Check, {
71
- size: 14,
72
- color: _sharedUi.night.color.accent
73
- }) : locked ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
74
- size: 14,
75
- color: _sharedUi.night.color.textTertiary
76
- })]
77
- }, o.id);
78
- })
79
- }), !locked && block.allowFreeText !== false ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
80
- style: styles.hint,
81
- children: "Or just type your answer below."
82
- }) : null]
83
- });
84
- }
85
- function Confirm({
86
- block
87
- }) {
88
- const h = (0, _context.useBlockHandlers)();
89
- const answer = h.answered[block.id];
90
- const locked = !!answer;
91
- const approved = answer?.kind === "confirm" ? answer.approved : null;
92
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.Card, {
93
- testID: `buoy-block-confirm-${block.id}`,
94
- tone: locked ? undefined : "warning",
95
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
96
- style: styles.confirmTitle,
97
- children: block.title
98
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
99
- style: styles.confirmChange,
100
- children: block.change
101
- }), block.consequence ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
102
- style: styles.confirmConsequence,
103
- children: block.consequence
104
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
105
- style: styles.confirmActions,
106
- children: locked ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
107
- style: styles.decided,
108
- children: approved ? `✓ ${block.approveLabel ?? "Done"}` : `✕ ${block.declineLabel ?? "Not now"}`
109
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
110
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
111
- testID: "buoy-block-approve",
112
- accessibilityRole: "button",
113
- onPress: () => h.answer({
114
- blockId: block.id,
115
- kind: "confirm",
116
- approved: true
117
- }),
118
- style: ({
119
- pressed
120
- }) => [styles.button, styles.buttonPrimary, pressed && styles.pressed],
121
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
122
- style: styles.buttonTextPrimary,
123
- children: block.approveLabel ?? "Do it"
124
- })
125
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
126
- testID: "buoy-block-decline",
127
- accessibilityRole: "button",
128
- onPress: () => h.answer({
129
- blockId: block.id,
130
- kind: "confirm",
131
- approved: false
132
- }),
133
- style: ({
134
- pressed
135
- }) => [styles.button, styles.buttonPlate, pressed && styles.pressed],
136
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
137
- style: styles.buttonTextPlate,
138
- children: block.declineLabel ?? "Not now"
139
- })
140
- })]
141
- })
142
- })]
143
- });
144
- }
145
- function Input({
146
- block
147
- }) {
148
- const h = (0, _context.useBlockHandlers)();
149
- const answer = h.answered[block.id];
150
- const locked = !!answer;
151
- const [value, setValue] = (0, _react.useState)("");
152
- const secret = block.type === "secret";
153
- const submit = () => {
154
- const v = value.trim();
155
- if (!v) return;
156
- h.answer({
157
- blockId: block.id,
158
- kind: "input",
159
- value: v
160
- });
161
- };
162
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.Card, {
163
- testID: `buoy-block-input-${block.id}`,
164
- tone: locked ? undefined : "info",
165
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
166
- style: styles.question,
167
- children: block.label
168
- }), locked ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
169
- style: styles.decided,
170
- children: answer.kind === "input" ? secret ? "••••••" : answer.value : "(skipped)"
171
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
172
- style: styles.inputRow,
173
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
174
- testID: "buoy-block-input-field",
175
- style: styles.input,
176
- value: value,
177
- onChangeText: setValue,
178
- placeholder: block.placeholder ?? "",
179
- placeholderTextColor: _sharedUi.night.color.placeholder,
180
- keyboardType: block.type === "number" ? "numeric" : "ascii-capable",
181
- secureTextEntry: secret,
182
- autoCapitalize: "none",
183
- autoCorrect: false,
184
- returnKeyType: "send",
185
- onSubmitEditing: submit
186
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
187
- testID: "buoy-block-input-submit",
188
- accessibilityRole: "button",
189
- disabled: !value.trim(),
190
- onPress: submit,
191
- style: ({
192
- pressed
193
- }) => [styles.button, styles.buttonPrimary, !value.trim() && styles.buttonDisabled, pressed && styles.pressed],
194
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
195
- style: styles.buttonTextPrimary,
196
- children: block.submitLabel ?? "Send"
197
- })
198
- })]
199
- })]
200
- });
201
- }
202
- const styles = _reactNative.StyleSheet.create({
203
- question: {
204
- color: _sharedUi.night.color.text,
205
- fontSize: _sharedUi.night.font.row,
206
- fontWeight: "600",
207
- lineHeight: 20,
208
- paddingHorizontal: 12,
209
- paddingTop: 12,
210
- paddingBottom: 8
211
- },
212
- options: {
213
- marginHorizontal: 8,
214
- marginBottom: 8,
215
- borderRadius: _sharedUi.night.radius.row,
216
- backgroundColor: _sharedUi.night.color.surfaceElevated,
217
- overflow: "hidden"
218
- },
219
- option: {
220
- flexDirection: "row",
221
- alignItems: "center",
222
- gap: 10,
223
- paddingHorizontal: 12,
224
- paddingVertical: 11
225
- },
226
- optionDivider: {
227
- borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
228
- borderTopColor: _sharedUi.night.color.separator
229
- },
230
- optionChosen: {
231
- backgroundColor: _sharedUi.night.color.accentSoft
232
- },
233
- optionDimmed: {
234
- opacity: 0.45
235
- },
236
- optionText: {
237
- flex: 1,
238
- gap: 2
239
- },
240
- optionLabel: {
241
- color: _sharedUi.night.color.text,
242
- fontSize: _sharedUi.night.font.body,
243
- fontWeight: "500"
244
- },
245
- optionLabelChosen: {
246
- color: _sharedUi.night.color.accent
247
- },
248
- optionDetail: {
249
- color: _sharedUi.night.color.textSecondary,
250
- fontSize: _sharedUi.night.font.caption,
251
- lineHeight: 17
252
- },
253
- hint: {
254
- color: _sharedUi.night.color.textTertiary,
255
- fontSize: _sharedUi.night.font.micro,
256
- paddingHorizontal: 12,
257
- paddingBottom: 10
258
- },
259
- confirmTitle: {
260
- color: _sharedUi.night.color.text,
261
- fontSize: _sharedUi.night.font.row,
262
- fontWeight: "600",
263
- paddingHorizontal: 12,
264
- paddingTop: 12
265
- },
266
- confirmChange: {
267
- color: _sharedUi.night.color.text,
268
- fontSize: _sharedUi.night.font.body,
269
- lineHeight: 19,
270
- paddingHorizontal: 12,
271
- paddingTop: 6
272
- },
273
- confirmConsequence: {
274
- color: _sharedUi.night.color.warning,
275
- fontSize: _sharedUi.night.font.caption,
276
- lineHeight: 17,
277
- paddingHorizontal: 12,
278
- paddingTop: 6
279
- },
280
- confirmActions: {
281
- flexDirection: "row",
282
- gap: 8,
283
- paddingHorizontal: 12,
284
- paddingVertical: 12,
285
- alignItems: "center"
286
- },
287
- decided: {
288
- color: _sharedUi.night.color.textSecondary,
289
- fontSize: _sharedUi.night.font.caption,
290
- fontWeight: "600",
291
- paddingHorizontal: 12,
292
- paddingVertical: 10
293
- },
294
- inputRow: {
295
- flexDirection: "row",
296
- alignItems: "center",
297
- gap: 8,
298
- paddingHorizontal: 12,
299
- paddingBottom: 12
300
- },
301
- input: {
302
- flex: 1,
303
- height: 38,
304
- paddingHorizontal: 12,
305
- borderRadius: _sharedUi.night.radius.row,
306
- backgroundColor: _sharedUi.night.color.surfaceElevated,
307
- color: _sharedUi.night.color.text,
308
- fontSize: _sharedUi.night.font.body
309
- },
310
- button: {
311
- paddingHorizontal: 14,
312
- paddingVertical: 9,
313
- borderRadius: _sharedUi.night.radius.row
314
- },
315
- buttonPrimary: {
316
- backgroundColor: _sharedUi.night.color.accent
317
- },
318
- buttonPlate: {
319
- backgroundColor: _sharedUi.night.color.button
320
- },
321
- buttonDisabled: {
322
- opacity: 0.5
323
- },
324
- buttonTextPrimary: {
325
- color: _sharedUi.night.color.onAccent,
326
- fontSize: _sharedUi.night.font.caption,
327
- fontWeight: "600"
328
- },
329
- buttonTextPlate: {
330
- color: _sharedUi.night.color.text,
331
- fontSize: _sharedUi.night.font.caption,
332
- fontWeight: "600"
333
- },
334
- pressed: {
335
- opacity: 0.7
336
- }
337
- });
338
- //# sourceMappingURL=AskBlocks.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Choice=Choice,exports.Confirm=Confirm,exports.Input=Input;var _react=require("react"),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_context=require("./context"),_icons=require("./icons"),_primitives=require("./primitives"),_jsxRuntime=require("react/jsx-runtime");function Choice({block:e}){const t=(0,_context.useBlockHandlers)(),i=t.answered[e.id],o="choice"===i?.kind?i.optionId:null,n=!!i;return(0,_jsxRuntime.jsxs)(_primitives.Card,{testID:`buoy-block-choice-${e.id}`,tone:n?void 0:"info",children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.question,children:e.question}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.options,children:e.options.slice(0,5).map((i,s)=>{const r=o===i.id;return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{testID:`buoy-block-option-${i.id}`,accessibilityRole:"button",accessibilityState:{selected:r,disabled:n},disabled:n,onPress:()=>t.answer({blockId:e.id,kind:"choice",optionId:i.id,label:i.label}),style:({pressed:e})=>[styles.option,s>0&&styles.optionDivider,r&&styles.optionChosen,n&&!r&&styles.optionDimmed,e&&!n&&styles.pressed],children:[i.icon?(0,_jsxRuntime.jsx)(_icons.BlockIcon,{name:i.icon}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.optionText,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.optionLabel,r&&styles.optionLabelChosen],children:i.label}),i.detail?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.optionDetail,children:i.detail}):null]}),r?(0,_jsxRuntime.jsx)(_sharedUi.Check,{size:14,color:_sharedUi.night.color.accent}):n?null:(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:14,color:_sharedUi.night.color.textTertiary})]},i.id)})}),n||!1===e.allowFreeText?null:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.hint,children:"Or just type your answer below."})]})}function Confirm({block:e}){const t=(0,_context.useBlockHandlers)(),i=t.answered[e.id],o=!!i,n="confirm"===i?.kind?i.approved:null;return(0,_jsxRuntime.jsxs)(_primitives.Card,{testID:`buoy-block-confirm-${e.id}`,tone:o?void 0:"warning",children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.confirmTitle,children:e.title}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.confirmChange,children:e.change}),e.consequence?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.confirmConsequence,children:e.consequence}):null,(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.confirmActions,children:o?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.decided,children:n?`✓ ${e.approveLabel??"Done"}`:`✕ ${e.declineLabel??"Not now"}`}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-block-approve",accessibilityRole:"button",onPress:()=>t.answer({blockId:e.id,kind:"confirm",approved:!0}),style:({pressed:e})=>[styles.button,styles.buttonPrimary,e&&styles.pressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonTextPrimary,children:e.approveLabel??"Do it"})}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-block-decline",accessibilityRole:"button",onPress:()=>t.answer({blockId:e.id,kind:"confirm",approved:!1}),style:({pressed:e})=>[styles.button,styles.buttonPlate,e&&styles.pressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonTextPlate,children:e.declineLabel??"Not now"})})]})})]})}function Input({block:e}){const t=(0,_context.useBlockHandlers)(),i=t.answered[e.id],o=!!i,[n,s]=(0,_react.useState)(""),r="secret"===e.type,a=()=>{const i=n.trim();i&&t.answer({blockId:e.id,kind:"input",value:i})};return(0,_jsxRuntime.jsxs)(_primitives.Card,{testID:`buoy-block-input-${e.id}`,tone:o?void 0:"info",children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.question,children:e.label}),o?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.decided,children:"input"===i.kind?r?"••••••":i.value:"(skipped)"}):(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.inputRow,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{testID:"buoy-block-input-field",style:styles.input,value:n,onChangeText:s,placeholder:e.placeholder??"",placeholderTextColor:_sharedUi.night.color.placeholder,keyboardType:"number"===e.type?"numeric":"ascii-capable",secureTextEntry:r,autoCapitalize:"none",autoCorrect:!1,returnKeyType:"send",onSubmitEditing:a}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-block-input-submit",accessibilityRole:"button",disabled:!n.trim(),onPress:a,style:({pressed:e})=>[styles.button,styles.buttonPrimary,!n.trim()&&styles.buttonDisabled,e&&styles.pressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.buttonTextPrimary,children:e.submitLabel??"Send"})})]})]})}const styles=_reactNative.StyleSheet.create({question:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,fontWeight:"600",lineHeight:20,paddingHorizontal:12,paddingTop:12,paddingBottom:8},options:{marginHorizontal:8,marginBottom:8,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.surfaceElevated,overflow:"hidden"},option:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:11},optionDivider:{borderTopWidth:_reactNative.StyleSheet.hairlineWidth,borderTopColor:_sharedUi.night.color.separator},optionChosen:{backgroundColor:_sharedUi.night.color.accentSoft},optionDimmed:{opacity:.45},optionText:{flex:1,gap:2},optionLabel:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body,fontWeight:"500"},optionLabelChosen:{color:_sharedUi.night.color.accent},optionDetail:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,lineHeight:17},hint:{color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.micro,paddingHorizontal:12,paddingBottom:10},confirmTitle:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,fontWeight:"600",paddingHorizontal:12,paddingTop:12},confirmChange:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body,lineHeight:19,paddingHorizontal:12,paddingTop:6},confirmConsequence:{color:_sharedUi.night.color.warning,fontSize:_sharedUi.night.font.caption,lineHeight:17,paddingHorizontal:12,paddingTop:6},confirmActions:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:12,alignItems:"center"},decided:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,fontWeight:"600",paddingHorizontal:12,paddingVertical:10},inputRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingBottom:12},input:{flex:1,height:38,paddingHorizontal:12,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.surfaceElevated,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body},button:{paddingHorizontal:14,paddingVertical:9,borderRadius:_sharedUi.night.radius.row},buttonPrimary:{backgroundColor:_sharedUi.night.color.accent},buttonPlate:{backgroundColor:_sharedUi.night.color.button},buttonDisabled:{opacity:.5},buttonTextPrimary:{color:_sharedUi.night.color.onAccent,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},buttonTextPlate:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},pressed:{opacity:.7}});