@buoy-gg/ask-buoy 7.0.34 → 7.0.35

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 (239) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/blocks/AskBlocks.js +338 -1
  3. package/lib/commonjs/blocks/AskBlocks.js.map +1 -0
  4. package/lib/commonjs/blocks/BlockRenderer.js +250 -1
  5. package/lib/commonjs/blocks/BlockRenderer.js.map +1 -0
  6. package/lib/commonjs/blocks/ChromePrototypes.js +514 -1
  7. package/lib/commonjs/blocks/ChromePrototypes.js.map +1 -0
  8. package/lib/commonjs/blocks/DataBlocks.js +688 -1
  9. package/lib/commonjs/blocks/DataBlocks.js.map +1 -0
  10. package/lib/commonjs/blocks/ExtraBlocks.js +1854 -1
  11. package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -0
  12. package/lib/commonjs/blocks/MediaBlocks.js +140 -1
  13. package/lib/commonjs/blocks/MediaBlocks.js.map +1 -0
  14. package/lib/commonjs/blocks/ReceiptBlocks.js +586 -1
  15. package/lib/commonjs/blocks/ReceiptBlocks.js.map +1 -0
  16. package/lib/commonjs/blocks/context.js +42 -1
  17. package/lib/commonjs/blocks/context.js.map +1 -0
  18. package/lib/commonjs/blocks/icons.js +96 -1
  19. package/lib/commonjs/blocks/icons.js.map +1 -0
  20. package/lib/commonjs/blocks/index.js +95 -1
  21. package/lib/commonjs/blocks/index.js.map +1 -0
  22. package/lib/commonjs/blocks/listRow.test.js +55 -0
  23. package/lib/commonjs/blocks/listRow.test.js.map +1 -0
  24. package/lib/commonjs/blocks/pageState.js +34 -0
  25. package/lib/commonjs/blocks/pageState.js.map +1 -0
  26. package/lib/commonjs/blocks/pageState.test.js +57 -0
  27. package/lib/commonjs/blocks/pageState.test.js.map +1 -0
  28. package/lib/commonjs/blocks/primitives.js +401 -1
  29. package/lib/commonjs/blocks/primitives.js.map +1 -0
  30. package/lib/commonjs/blocks/primitivesIndex.js +62 -1
  31. package/lib/commonjs/blocks/primitivesIndex.js.map +1 -0
  32. package/lib/commonjs/components/ApprovalCard.js +140 -1
  33. package/lib/commonjs/components/ApprovalCard.js.map +1 -0
  34. package/lib/commonjs/components/AskBuoyHeader.js +164 -1
  35. package/lib/commonjs/components/AskBuoyHeader.js.map +1 -0
  36. package/lib/commonjs/components/AskBuoyIcon.js +19 -1
  37. package/lib/commonjs/components/AskBuoyIcon.js.map +1 -0
  38. package/lib/commonjs/components/AskBuoyModal.js +353 -1
  39. package/lib/commonjs/components/AskBuoyModal.js.map +1 -0
  40. package/lib/commonjs/components/AskBuoySettings.js +69 -0
  41. package/lib/commonjs/components/AskBuoySettings.js.map +1 -0
  42. package/lib/commonjs/components/ChangesBar.js +211 -1
  43. package/lib/commonjs/components/ChangesBar.js.map +1 -0
  44. package/lib/commonjs/components/Composer.js +175 -1
  45. package/lib/commonjs/components/Composer.js.map +1 -0
  46. package/lib/commonjs/components/EmptyState.js +154 -1
  47. package/lib/commonjs/components/EmptyState.js.map +1 -0
  48. package/lib/commonjs/components/Markdown.js +252 -1
  49. package/lib/commonjs/components/Markdown.js.map +1 -0
  50. package/lib/commonjs/components/MessageList.js +683 -1
  51. package/lib/commonjs/components/MessageList.js.map +1 -0
  52. package/lib/commonjs/components/ThinkingStrip.js +223 -0
  53. package/lib/commonjs/components/ThinkingStrip.js.map +1 -0
  54. package/lib/commonjs/components/TypingDots.js +63 -1
  55. package/lib/commonjs/components/TypingDots.js.map +1 -0
  56. package/lib/commonjs/components/useCopyAction.js +50 -0
  57. package/lib/commonjs/components/useCopyAction.js.map +1 -0
  58. package/lib/commonjs/index.js +252 -1
  59. package/lib/commonjs/index.js.map +1 -0
  60. package/lib/commonjs/preset.js +90 -1
  61. package/lib/commonjs/preset.js.map +1 -0
  62. package/lib/commonjs/store/askBuoySettings.js +67 -0
  63. package/lib/commonjs/store/askBuoySettings.js.map +1 -0
  64. package/lib/commonjs/store/askBuoyStore.js +365 -1
  65. package/lib/commonjs/store/askBuoyStore.js.map +1 -0
  66. package/lib/commonjs/store/restoredIds.test.js +47 -0
  67. package/lib/commonjs/store/restoredIds.test.js.map +1 -0
  68. package/lib/commonjs/store/traceText.js +81 -0
  69. package/lib/commonjs/store/traceText.js.map +1 -0
  70. package/lib/commonjs/store/traceText.test.js +112 -0
  71. package/lib/commonjs/store/traceText.test.js.map +1 -0
  72. package/lib/commonjs/store/transcriptPersistence.js +208 -0
  73. package/lib/commonjs/store/transcriptPersistence.js.map +1 -0
  74. package/lib/commonjs/store/transcriptPersistence.test.js +185 -0
  75. package/lib/commonjs/store/transcriptPersistence.test.js.map +1 -0
  76. package/lib/commonjs/store/useAskBuoy.js +400 -1
  77. package/lib/commonjs/store/useAskBuoy.js.map +1 -0
  78. package/lib/commonjs/store/useAskBuoySettings.js +14 -0
  79. package/lib/commonjs/store/useAskBuoySettings.js.map +1 -0
  80. package/lib/commonjs/sync/askBuoySyncAdapter.js +119 -1
  81. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -0
  82. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +141 -1
  83. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +1 -0
  84. package/lib/commonjs/sync/wire.js +58 -1
  85. package/lib/commonjs/sync/wire.js.map +1 -0
  86. package/lib/commonjs/types.js +6 -1
  87. package/lib/commonjs/types.js.map +1 -0
  88. package/lib/module/blocks/AskBlocks.js +331 -1
  89. package/lib/module/blocks/AskBlocks.js.map +1 -0
  90. package/lib/module/blocks/BlockRenderer.js +245 -1
  91. package/lib/module/blocks/BlockRenderer.js.map +1 -0
  92. package/lib/module/blocks/ChromePrototypes.js +503 -1
  93. package/lib/module/blocks/ChromePrototypes.js.map +1 -0
  94. package/lib/module/blocks/DataBlocks.js +674 -1
  95. package/lib/module/blocks/DataBlocks.js.map +1 -0
  96. package/lib/module/blocks/ExtraBlocks.js +1827 -1
  97. package/lib/module/blocks/ExtraBlocks.js.map +1 -0
  98. package/lib/module/blocks/MediaBlocks.js +135 -1
  99. package/lib/module/blocks/MediaBlocks.js.map +1 -0
  100. package/lib/module/blocks/ReceiptBlocks.js +574 -1
  101. package/lib/module/blocks/ReceiptBlocks.js.map +1 -0
  102. package/lib/module/blocks/context.js +35 -1
  103. package/lib/module/blocks/context.js.map +1 -0
  104. package/lib/module/blocks/icons.js +91 -1
  105. package/lib/module/blocks/icons.js.map +1 -0
  106. package/lib/module/blocks/index.js +8 -1
  107. package/lib/module/blocks/index.js.map +1 -0
  108. package/lib/module/blocks/listRow.test.js +56 -0
  109. package/lib/module/blocks/listRow.test.js.map +1 -0
  110. package/lib/module/blocks/pageState.js +30 -0
  111. package/lib/module/blocks/pageState.js.map +1 -0
  112. package/lib/module/blocks/pageState.test.js +56 -0
  113. package/lib/module/blocks/pageState.test.js.map +1 -0
  114. package/lib/module/blocks/primitives.js +389 -1
  115. package/lib/module/blocks/primitives.js.map +1 -0
  116. package/lib/module/blocks/primitivesIndex.js +5 -1
  117. package/lib/module/blocks/primitivesIndex.js.map +1 -0
  118. package/lib/module/components/ApprovalCard.js +135 -1
  119. package/lib/module/components/ApprovalCard.js.map +1 -0
  120. package/lib/module/components/AskBuoyHeader.js +161 -1
  121. package/lib/module/components/AskBuoyHeader.js.map +1 -0
  122. package/lib/module/components/AskBuoyIcon.js +8 -1
  123. package/lib/module/components/AskBuoyIcon.js.map +1 -0
  124. package/lib/module/components/AskBuoyModal.js +348 -1
  125. package/lib/module/components/AskBuoyModal.js.map +1 -0
  126. package/lib/module/components/AskBuoySettings.js +64 -0
  127. package/lib/module/components/AskBuoySettings.js.map +1 -0
  128. package/lib/module/components/ChangesBar.js +206 -1
  129. package/lib/module/components/ChangesBar.js.map +1 -0
  130. package/lib/module/components/Composer.js +170 -1
  131. package/lib/module/components/Composer.js.map +1 -0
  132. package/lib/module/components/EmptyState.js +149 -1
  133. package/lib/module/components/EmptyState.js.map +1 -0
  134. package/lib/module/components/Markdown.js +246 -1
  135. package/lib/module/components/Markdown.js.map +1 -0
  136. package/lib/module/components/MessageList.js +677 -1
  137. package/lib/module/components/MessageList.js.map +1 -0
  138. package/lib/module/components/ThinkingStrip.js +218 -0
  139. package/lib/module/components/ThinkingStrip.js.map +1 -0
  140. package/lib/module/components/TypingDots.js +58 -1
  141. package/lib/module/components/TypingDots.js.map +1 -0
  142. package/lib/module/components/useCopyAction.js +46 -0
  143. package/lib/module/components/useCopyAction.js.map +1 -0
  144. package/lib/module/index.js +34 -1
  145. package/lib/module/index.js.map +1 -0
  146. package/lib/module/preset.js +73 -1
  147. package/lib/module/preset.js.map +1 -0
  148. package/lib/module/store/askBuoySettings.js +62 -0
  149. package/lib/module/store/askBuoySettings.js.map +1 -0
  150. package/lib/module/store/askBuoyStore.js +361 -1
  151. package/lib/module/store/askBuoyStore.js.map +1 -0
  152. package/lib/module/store/restoredIds.test.js +46 -0
  153. package/lib/module/store/restoredIds.test.js.map +1 -0
  154. package/lib/module/store/traceText.js +75 -0
  155. package/lib/module/store/traceText.js.map +1 -0
  156. package/lib/module/store/traceText.test.js +111 -0
  157. package/lib/module/store/traceText.test.js.map +1 -0
  158. package/lib/module/store/transcriptPersistence.js +198 -0
  159. package/lib/module/store/transcriptPersistence.js.map +1 -0
  160. package/lib/module/store/transcriptPersistence.test.js +184 -0
  161. package/lib/module/store/transcriptPersistence.test.js.map +1 -0
  162. package/lib/module/store/useAskBuoy.js +394 -1
  163. package/lib/module/store/useAskBuoy.js.map +1 -0
  164. package/lib/module/store/useAskBuoySettings.js +9 -0
  165. package/lib/module/store/useAskBuoySettings.js.map +1 -0
  166. package/lib/module/sync/askBuoySyncAdapter.js +114 -1
  167. package/lib/module/sync/askBuoySyncAdapter.js.map +1 -0
  168. package/lib/module/sync/askBuoySyncAdapter.test.js +140 -1
  169. package/lib/module/sync/askBuoySyncAdapter.test.js.map +1 -0
  170. package/lib/module/sync/wire.js +47 -1
  171. package/lib/module/sync/wire.js.map +1 -0
  172. package/lib/module/types.js +4 -1
  173. package/lib/module/types.js.map +1 -0
  174. package/lib/typescript/blocks/AskBlocks.d.ts.map +1 -0
  175. package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -0
  176. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +1 -0
  177. package/lib/typescript/blocks/DataBlocks.d.ts +31 -0
  178. package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -0
  179. package/lib/typescript/blocks/ExtraBlocks.d.ts +11 -0
  180. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -0
  181. package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -0
  182. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +1 -0
  183. package/lib/typescript/blocks/context.d.ts.map +1 -0
  184. package/lib/typescript/blocks/icons.d.ts.map +1 -0
  185. package/lib/typescript/blocks/index.d.ts.map +1 -0
  186. package/lib/typescript/blocks/listRow.test.d.ts +2 -0
  187. package/lib/typescript/blocks/listRow.test.d.ts.map +1 -0
  188. package/lib/typescript/blocks/pageState.d.ts +23 -0
  189. package/lib/typescript/blocks/pageState.d.ts.map +1 -0
  190. package/lib/typescript/blocks/pageState.test.d.ts +2 -0
  191. package/lib/typescript/blocks/pageState.test.d.ts.map +1 -0
  192. package/lib/typescript/blocks/primitives.d.ts +39 -9
  193. package/lib/typescript/blocks/primitives.d.ts.map +1 -0
  194. package/lib/typescript/blocks/primitivesIndex.d.ts +2 -1
  195. package/lib/typescript/blocks/primitivesIndex.d.ts.map +1 -0
  196. package/lib/typescript/components/ApprovalCard.d.ts.map +1 -0
  197. package/lib/typescript/components/AskBuoyHeader.d.ts +11 -1
  198. package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -0
  199. package/lib/typescript/components/AskBuoyIcon.d.ts.map +1 -0
  200. package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -0
  201. package/lib/typescript/components/AskBuoySettings.d.ts +2 -0
  202. package/lib/typescript/components/AskBuoySettings.d.ts.map +1 -0
  203. package/lib/typescript/components/ChangesBar.d.ts.map +1 -0
  204. package/lib/typescript/components/Composer.d.ts.map +1 -0
  205. package/lib/typescript/components/EmptyState.d.ts.map +1 -0
  206. package/lib/typescript/components/Markdown.d.ts.map +1 -0
  207. package/lib/typescript/components/MessageList.d.ts +12 -5
  208. package/lib/typescript/components/MessageList.d.ts.map +1 -0
  209. package/lib/typescript/components/ThinkingStrip.d.ts +5 -0
  210. package/lib/typescript/components/ThinkingStrip.d.ts.map +1 -0
  211. package/lib/typescript/components/TypingDots.d.ts.map +1 -0
  212. package/lib/typescript/components/useCopyAction.d.ts +5 -0
  213. package/lib/typescript/components/useCopyAction.d.ts.map +1 -0
  214. package/lib/typescript/index.d.ts +5 -0
  215. package/lib/typescript/index.d.ts.map +1 -0
  216. package/lib/typescript/preset.d.ts.map +1 -0
  217. package/lib/typescript/store/askBuoySettings.d.ts +22 -0
  218. package/lib/typescript/store/askBuoySettings.d.ts.map +1 -0
  219. package/lib/typescript/store/askBuoyStore.d.ts +74 -13
  220. package/lib/typescript/store/askBuoyStore.d.ts.map +1 -0
  221. package/lib/typescript/store/restoredIds.test.d.ts +2 -0
  222. package/lib/typescript/store/restoredIds.test.d.ts.map +1 -0
  223. package/lib/typescript/store/traceText.d.ts +33 -0
  224. package/lib/typescript/store/traceText.d.ts.map +1 -0
  225. package/lib/typescript/store/traceText.test.d.ts +2 -0
  226. package/lib/typescript/store/traceText.test.d.ts.map +1 -0
  227. package/lib/typescript/store/transcriptPersistence.d.ts +40 -0
  228. package/lib/typescript/store/transcriptPersistence.d.ts.map +1 -0
  229. package/lib/typescript/store/transcriptPersistence.test.d.ts +2 -0
  230. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +1 -0
  231. package/lib/typescript/store/useAskBuoy.d.ts.map +1 -0
  232. package/lib/typescript/store/useAskBuoySettings.d.ts +3 -0
  233. package/lib/typescript/store/useAskBuoySettings.d.ts.map +1 -0
  234. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -0
  235. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +1 -0
  236. package/lib/typescript/sync/wire.d.ts.map +1 -0
  237. package/lib/typescript/types.d.ts +24 -1
  238. package/lib/typescript/types.d.ts.map +1 -0
  239. package/package.json +8 -8
@@ -1 +1,140 @@
1
- "use strict";import{beforeEach,describe,expect,it}from"vitest";import{EffectLedger}from"@buoy-gg/agent-core";import{askBuoySyncAdapter}from"./askBuoySyncAdapter";import{redactForWire}from"./wire";import{askBuoyStore}from"../store/askBuoyStore";beforeEach(()=>{askBuoyStore.reset(),askBuoyStore.setLedger(null)}),describe("the wire surface",()=>{it("exposes no action that can make the agent talk",()=>{const e=Object.keys(askBuoySyncAdapter.actions);expect(e).not.toContain("send"),expect(e).not.toContain("ask"),expect(e).not.toContain("prompt"),expect(e.sort()).toEqual(["listChanges","reset","undoAll"])}),it("puts the shape of the conversation on the wire, never tool payloads",()=>{askBuoyStore.addUser("what is in storage");const e=askBuoyStore.startAssistant();askBuoyStore.applyEvent(e,{type:"tool-start",id:"c1",toolId:"storage",action:"async.getItem",label:"Read session",description:"Read one AsyncStorage key"}),askBuoyStore.applyEvent(e,{type:"tool-end",id:"c1",ok:!0,summary:"eyJhbGciOiJIUzI1NiJ9.super.secret"});const t=askBuoySyncAdapter.getSnapshot(),o=t.messages[1].toolCalls[0];expect(o).toEqual({toolId:"storage",action:"async.getItem",status:"ok"}),expect(JSON.stringify(t)).not.toContain("super.secret")}),it("redacts credentials that made it into the assistant's prose",()=>{askBuoyStore.addUser("show me the auth header");const e=askBuoyStore.startAssistant();askBuoyStore.applyEvent(e,{type:"text",delta:"It sends Authorization: Bearer abcdef0123456789ghijkl to the API."});const t=askBuoySyncAdapter.getSnapshot();expect(JSON.stringify(t)).not.toContain("abcdef0123456789ghijkl")}),it("reports reversible and permanent changes separately",()=>{const e=new EffectLedger;askBuoyStore.setLedger(e),e.record("storage","async.setItem",{kind:"storage-write",toolId:"storage",action:"async.setItem",key:"points",before:"240",label:"Set points to 1500"}),e.record("perf-monitor","clearAll",{kind:"transient",label:"Cleared samples"}),e.record("zustand","setState",{kind:"state-write",toolId:"zustand",action:"setState",label:"Update the cart store"});const t=askBuoySyncAdapter.getSnapshot();expect(t.changes.reversible).toBe(1),expect(t.changes.permanent).toBe(1),expect(t.changes.transients).toBe(1)})}),describe("redactForWire",()=>{it("removes bearer tokens, JWTs, api keys and license keys",()=>{const e=["Authorization: Bearer abcdefghijklmnop123456","token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefgh","key sk-abcdefghijklmnop1234","license BUOY-ABCD-1234-EFGH",'the header is "x-api-key": "supersecretvalue"'];for(const t of e)expect(redactForWire(t)).toContain("removed]")}),it("leaves ordinary prose alone",()=>{const e="The /menu call returned 200 with 12 items and the burger was in stock.";expect(redactForWire(e)).toBe(e)})}),describe("undo from the desktop",()=>{it("is allowed, because putting things back is the safe direction",async()=>{const e=new EffectLedger;askBuoyStore.setLedger(e);const t=new Map([["points","1500"]]);e.record("storage","async.setItem",{kind:"storage-write",toolId:"storage",action:"async.setItem",key:"points",before:"240",label:"Set points to 1500"}),await e.revertAll(async(e,o,s)=>{const a=s;"async.setItem"===o&&t.set(a.key,a.value)}),expect(t.get("points")).toBe("240")})});
1
+ "use strict";
2
+
3
+ /**
4
+ * What Ask Buoy is allowed to put on the broker wire, and what it refuses to
5
+ * accept from it.
6
+ *
7
+ * Both directions matter. The broker has no authentication, accepts any client
8
+ * that calls itself "Dashboard", and forwards to every connected dashboard — it
9
+ * already broadcasts license keys that way. So: no tool results go out, and no
10
+ * remote client can make the agent say anything.
11
+ */
12
+ import { beforeEach, describe, expect, it } from "vitest";
13
+ import { EffectLedger } from "@buoy-gg/agent-core";
14
+ import { askBuoySyncAdapter } from "./askBuoySyncAdapter";
15
+ import { redactForWire } from "./wire";
16
+ import { askBuoyStore } from "../store/askBuoyStore";
17
+ beforeEach(() => {
18
+ askBuoyStore.reset();
19
+ askBuoyStore.setLedger(null);
20
+ });
21
+ describe("the wire surface", () => {
22
+ it("exposes no action that can make the agent talk", () => {
23
+ // A `send` here would let anyone on the LAN drive a mutating agent on a
24
+ // tester's phone. The conversation starts on-device, by a person.
25
+ const actions = Object.keys(askBuoySyncAdapter.actions);
26
+ expect(actions).not.toContain("send");
27
+ expect(actions).not.toContain("ask");
28
+ expect(actions).not.toContain("prompt");
29
+ expect(actions.sort()).toEqual(["listChanges", "reset", "undoAll"]);
30
+ });
31
+ it("puts the shape of the conversation on the wire, never tool payloads", () => {
32
+ askBuoyStore.addUser("what is in storage");
33
+ const id = askBuoyStore.startAssistant();
34
+ askBuoyStore.applyEvent(id, {
35
+ type: "tool-start",
36
+ id: "c1",
37
+ toolId: "storage",
38
+ action: "async.getItem",
39
+ label: "Read session",
40
+ description: "Read one AsyncStorage key",
41
+ params: {
42
+ key: "session"
43
+ },
44
+ effect: "read"
45
+ });
46
+ askBuoyStore.applyEvent(id, {
47
+ type: "tool-end",
48
+ id: "c1",
49
+ ok: true,
50
+ durationMs: 12,
51
+ summary: "eyJhbGciOiJIUzI1NiJ9.super.secret"
52
+ });
53
+ const snap = askBuoySyncAdapter.getSnapshot();
54
+ const call = snap.messages[1].toolCalls[0];
55
+ expect(call).toEqual({
56
+ toolId: "storage",
57
+ action: "async.getItem",
58
+ status: "ok"
59
+ });
60
+ // The result summary is not on the wire at all — there is no field for it.
61
+ expect(JSON.stringify(snap)).not.toContain("super.secret");
62
+ });
63
+ it("redacts credentials that made it into the assistant's prose", () => {
64
+ askBuoyStore.addUser("show me the auth header");
65
+ const id = askBuoyStore.startAssistant();
66
+ askBuoyStore.applyEvent(id, {
67
+ type: "text",
68
+ delta: "It sends Authorization: Bearer abcdef0123456789ghijkl to the API."
69
+ });
70
+ const snap = askBuoySyncAdapter.getSnapshot();
71
+ expect(JSON.stringify(snap)).not.toContain("abcdef0123456789ghijkl");
72
+ });
73
+ it("reports reversible and permanent changes separately", () => {
74
+ const ledger = new EffectLedger();
75
+ askBuoyStore.setLedger(ledger);
76
+ ledger.record("storage", "async.setItem", {
77
+ kind: "storage-write",
78
+ toolId: "storage",
79
+ action: "async.setItem",
80
+ key: "points",
81
+ before: "240",
82
+ label: "Set points to 1500"
83
+ });
84
+ ledger.record("perf-monitor", "clearAll", {
85
+ kind: "transient",
86
+ label: "Cleared samples"
87
+ });
88
+ // A store write with no captured prior state: recorded, visible, and
89
+ // NOT something Undo can deliver — it must count as permanent.
90
+ ledger.record("zustand", "setState", {
91
+ kind: "state-write",
92
+ toolId: "zustand",
93
+ action: "setState",
94
+ label: "Update the cart store"
95
+ });
96
+ const snap = askBuoySyncAdapter.getSnapshot();
97
+ expect(snap.changes.reversible).toBe(1);
98
+ // The transient is an ACTION, not a change — it must not inflate
99
+ // "permanent" (that read "Changed this app · N permanent" after a
100
+ // read-only tour). It is still reported, in its own count.
101
+ expect(snap.changes.permanent).toBe(1);
102
+ expect(snap.changes.transients).toBe(1);
103
+ });
104
+ });
105
+ describe("redactForWire", () => {
106
+ it("removes bearer tokens, JWTs, api keys and license keys", () => {
107
+ const cases = ["Authorization: Bearer abcdefghijklmnop123456", "token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefgh", "key sk-abcdefghijklmnop1234", "license BUOY-ABCD-1234-EFGH", 'the header is "x-api-key": "supersecretvalue"'];
108
+ for (const input of cases) {
109
+ expect(redactForWire(input)).toContain("removed]");
110
+ }
111
+ });
112
+ it("leaves ordinary prose alone", () => {
113
+ const text = "The /menu call returned 200 with 12 items and the burger was in stock.";
114
+ expect(redactForWire(text)).toBe(text);
115
+ });
116
+ });
117
+ describe("undo from the desktop", () => {
118
+ it("is allowed, because putting things back is the safe direction", async () => {
119
+ const ledger = new EffectLedger();
120
+ askBuoyStore.setLedger(ledger);
121
+ const store = new Map([["points", "1500"]]);
122
+ ledger.record("storage", "async.setItem", {
123
+ kind: "storage-write",
124
+ toolId: "storage",
125
+ action: "async.setItem",
126
+ key: "points",
127
+ before: "240",
128
+ label: "Set points to 1500"
129
+ });
130
+
131
+ // The adapter dispatches through the real seam; stub it at the ledger.
132
+ await ledger.revertAll(async (_t, action, params) => {
133
+ const p = params;
134
+ if (action === "async.setItem") store.set(p.key, p.value);
135
+ return undefined;
136
+ });
137
+ expect(store.get("points")).toBe("240");
138
+ });
139
+ });
140
+ //# sourceMappingURL=askBuoySyncAdapter.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["beforeEach","describe","expect","it","EffectLedger","askBuoySyncAdapter","redactForWire","askBuoyStore","reset","setLedger","actions","Object","keys","not","toContain","sort","toEqual","addUser","id","startAssistant","applyEvent","type","toolId","action","label","description","params","key","effect","ok","durationMs","summary","snap","getSnapshot","call","messages","toolCalls","status","JSON","stringify","delta","ledger","record","kind","before","changes","reversible","toBe","permanent","transients","cases","input","text","store","Map","revertAll","_t","p","set","value","undefined","get"],"sourceRoot":"../../../src","sources":["sync/askBuoySyncAdapter.test.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACzD,SAASC,YAAY,QAAQ,qBAAqB;AAElD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,aAAa,QAAQ,QAAQ;AACtC,SAASC,YAAY,QAAQ,uBAAuB;AAEpDP,UAAU,CAAC,MAAM;EACfO,YAAY,CAACC,KAAK,CAAC,CAAC;EACpBD,YAAY,CAACE,SAAS,CAAC,IAAI,CAAC;AAC9B,CAAC,CAAC;AAEFR,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCE,EAAE,CAAC,gDAAgD,EAAE,MAAM;IACzD;IACA;IACA,MAAMO,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACP,kBAAkB,CAACK,OAAO,CAAC;IACvDR,MAAM,CAACQ,OAAO,CAAC,CAACG,GAAG,CAACC,SAAS,CAAC,MAAM,CAAC;IACrCZ,MAAM,CAACQ,OAAO,CAAC,CAACG,GAAG,CAACC,SAAS,CAAC,KAAK,CAAC;IACpCZ,MAAM,CAACQ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AM,EAAE,KAAK;MACbpB,KAAK,EAAE;IACT,CAAC,CAAC;;IAEF;IACA,MAAMiB,MAAM,CAACc,SAAS,CAAC,OAAOC,EAAE,EAAEjC,MAAM,EAAEG,MAAM,KAAK;MACnD,MAAM+B,CAAC,GAAG/B,MAAyC;MACnD,IAAIH,MAAM,KAAK,eAAe,EAAE8B,KAAK,CAACK,GAAG,CAACD,CAAC,CAAC9B,GAAG,EAAE8B,CAAC,CAACE,KAAM,CAAC;MAC1D,OAAOC,SAAS;IAClB,CAAC,CAAC;IAEF1D,MAAM,CAACmD,KAAK,CAACQ,GAAG,CAAC,QAAQ,CAAC,CAAC,CAACd,IAAI,CAAC,KAAK,CAAC;EACzC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1,47 @@
1
- "use strict";export{dispatchToolAction}from"@buoy-gg/shared-ui";const PATTERNS=[{re:/\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,label:"[bearer token removed]"},{re:/\beyJ[A-Za-z0-9._-]{20,}/g,label:"[jwt removed]"},{re:/\bsk-[A-Za-z0-9_-]{16,}/g,label:"[api key removed]"},{re:/\bBUOY-[A-Z0-9-]{8,}/g,label:"[license key removed]"},{re:/("|')?(authorization|x-api-key|api[_-]?key|password|secret|access_token|refresh_token)\1?\s*[:=]\s*("|')?[^\s"',}]{6,}/gi,label:"[credential removed]"}];export function redactForWire(e){if(!e)return e;let r=e;for(const{re:e,label:o}of PATTERNS)r=r.replace(e,o);return r}
1
+ "use strict";
2
+
3
+ /**
4
+ * What the sync adapter is allowed to put on the broker wire.
5
+ *
6
+ * The broker has no authentication, `cors.origin: "*"`, binds every interface,
7
+ * and forwards to every connected dashboard — it already broadcasts each
8
+ * device's license key to every socket. A chat transcript is not a safe thing
9
+ * to add to that channel unfiltered: the agent reads storage values, network
10
+ * response bodies and user records, and any of it can end up quoted in an
11
+ * answer.
12
+ *
13
+ * So text crossing the wire is scrubbed for the shapes that are unambiguously
14
+ * credentials. This is a reduction in blast radius, not a guarantee — the real
15
+ * guarantee is that tool RESULTS never cross at all (see askBuoySyncAdapter).
16
+ */
17
+ export { dispatchToolAction } from "@buoy-gg/shared-ui";
18
+ const PATTERNS = [{
19
+ re: /\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,
20
+ label: "[bearer token removed]"
21
+ }, {
22
+ re: /\beyJ[A-Za-z0-9._-]{20,}/g,
23
+ label: "[jwt removed]"
24
+ }, {
25
+ re: /\bsk-[A-Za-z0-9_-]{16,}/g,
26
+ label: "[api key removed]"
27
+ }, {
28
+ re: /\bBUOY-[A-Z0-9-]{8,}/g,
29
+ label: "[license key removed]"
30
+ },
31
+ // Common "key: value" credential shapes in a quoted payload.
32
+ {
33
+ re: /("|')?(authorization|x-api-key|api[_-]?key|password|secret|access_token|refresh_token)\1?\s*[:=]\s*("|')?[^\s"',}]{6,}/gi,
34
+ label: "[credential removed]"
35
+ }];
36
+ export function redactForWire(text) {
37
+ if (!text) return text;
38
+ let out = text;
39
+ for (const {
40
+ re,
41
+ label
42
+ } of PATTERNS) {
43
+ out = out.replace(re, label);
44
+ }
45
+ return out;
46
+ }
47
+ //# sourceMappingURL=wire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["dispatchToolAction","PATTERNS","re","label","redactForWire","text","out","replace"],"sourceRoot":"../../../src","sources":["sync/wire.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,oBAAoB;AAEvD,MAAMC,QAAyC,GAAG,CAChD;EAAEC,EAAE,EAAE,uCAAuC;EAAEC,KAAK,EAAE;AAAyB,CAAC,EAChF;EAAED,EAAE,EAAE,2BAA2B;EAAEC,KAAK,EAAE;AAAgB,CAAC,EAC3D;EAAED,EAAE,EAAE,0BAA0B;EAAEC,KAAK,EAAE;AAAoB,CAAC,EAC9D;EAAED,EAAE,EAAE,uBAAuB;EAAEC,KAAK,EAAE;AAAwB,CAAC;AAC/D;AACA;EACED,EAAE,EAAE,0HAA0H;EAC9HC,KAAK,EAAE;AACT,CAAC,CACF;AAED,OAAO,SAASC,aAAaA,CAACC,IAAY,EAAU;EAClD,IAAI,CAACA,IAAI,EAAE,OAAOA,IAAI;EACtB,IAAIC,GAAG,GAAGD,IAAI;EACd,KAAK,MAAM;IAAEH,EAAE;IAAEC;EAAM,CAAC,IAAIF,QAAQ,EAAE;IACpCK,GAAG,GAAGA,GAAG,CAACC,OAAO,CAACL,EAAE,EAAEC,KAAK,CAAC;EAC9B;EACA,OAAOG,GAAG;AACZ","ignoreList":[]}
@@ -1 +1,4 @@
1
- "use strict";export{};
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/AskBlocks.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjF,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BA+CvD;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAqCzD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAqDrD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/blocks/BlockRenderer.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAsCjD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,+BAMxD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChromePrototypes.d.ts","sourceRoot":"","sources":["../../../src/blocks/ChromePrototypes.tsx"],"names":[],"mappings":"AAqBA,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,EAAE,EAAqB,EAAE,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,+BAaxE;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,+BAY9E;AAED,gDAAgD;AAChD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAatD;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,gCAiB7B;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,+BAQnD;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,+BAE/C;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAuB5D"}
@@ -5,6 +5,32 @@ export declare function Table({ block }: {
5
5
  export declare function KeyValue({ block }: {
6
6
  block: KeyValueBlock;
7
7
  }): import("react").JSX.Element;
8
+ /**
9
+ * Keys carry the index as well as the id.
10
+ *
11
+ * The ids in here come from the app's own data, and app data is not required
12
+ * to be unique — a Poké Mart bag in this repo holds two lines sharing one
13
+ * `lineId`, which is a bug in that app but must not be one in a devtool
14
+ * rendering it. Paging made it visible: the duplicate sat past the initial cap,
15
+ * so React only saw the collision on the first "Show more".
16
+ */
17
+ /**
18
+ * What a tapped list row does.
19
+ *
20
+ * A row can carry a picture and an action, and they want the same gesture. The
21
+ * picture wins the row body — looking at a thing must not fire it — and the
22
+ * action keeps its label as its own control. A row with no picture is
23
+ * unchanged: the whole row runs the action, which is what it did before rows
24
+ * could open.
25
+ */
26
+ export declare function listRowBehaviour(item: Pick<ListBlock["items"][number], "image" | "action">): {
27
+ /** Tapping the row body enlarges the picture. */
28
+ canExpand: boolean;
29
+ /** Tapping the row body runs the action (only when there is no picture). */
30
+ rowRunsAction: boolean;
31
+ /** The action label needs to be its own pressable. */
32
+ actionIsOwnControl: boolean;
33
+ };
8
34
  export declare function List({ block }: {
9
35
  block: ListBlock;
10
36
  }): import("react").JSX.Element;
@@ -17,6 +43,11 @@ export declare function Chart({ block }: {
17
43
  export declare function Steps({ block }: {
18
44
  block: StepsBlock;
19
45
  }): import("react").JSX.Element;
46
+ /**
47
+ * Router, per rule4: two specialised components rather than one that changes
48
+ * shape. A `cond ? <A/> : <B/>` inside a single component is the Fabric
49
+ * view-index hazard, and these two subtrees have nothing in common.
50
+ */
20
51
  export declare function Code({ block }: {
21
52
  block: CodeBlock;
22
53
  }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/DataBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAmB7B,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BA4BrD;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,+BAqB3D;AAED;;;;;;;;GAQG;AACH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC,GAAG;IAC5F,iDAAiD;IACjD,SAAS,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;IACvB,sDAAsD;IACtD,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAOA;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAoFnD;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BA4BnD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAoBrD;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,+BAarD;AAsDD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAInD;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BAYvD;AAED,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAYzD"}
@@ -26,6 +26,17 @@ export declare function Claim({ block }: {
26
26
  export declare function Details({ block }: {
27
27
  block: DetailsBlock;
28
28
  }): import("react").JSX.Element;
29
+ /**
30
+ * The tool-header segmented control, not a strip of this block's own.
31
+ *
32
+ * `NightSegmented` is what the dial settings and the network tool mount, so a
33
+ * tabbed block now reads as part of the same product rather than as a
34
+ * lookalike drawn next to it. `sm` is its compact variant, which is what a
35
+ * control inside a chat bubble wants.
36
+ *
37
+ * Keyed by INDEX, not label: two tabs may legitimately share a label, and a
38
+ * duplicate key would collapse them into one.
39
+ */
29
40
  export declare function Tabs({ block }: {
30
41
  block: TabsBlock;
31
42
  }): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExtraBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/ExtraBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,SAAS,EACT,SAAS,EAET,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAS7B,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BAiBjE;AAGD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BAuCjE;AAGD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BA0CvD;AA6CD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BAiBvD;AAGD,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,+BA8B3D;AAwDD,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAgBnD;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,E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D,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BASvD;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,+BAUnD;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,+BAavD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/MediaBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAQ,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIhE,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,+BAyC7D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceiptBlocks.d.ts","sourceRoot":"","sources":["../../../src/blocks/ReceiptBlocks.tsx"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AA8B7B,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA0BjE;AAQD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,+BA2BjE;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,+BAgC3D;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,mBAAmB,CAAA;CAAE,+BAsBvE;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,OAAO,CAAA;KAAE,CAAC;CAC3E;AAWD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAEA;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAEtE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/blocks/icons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,+BAmB/E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9I,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=listRow.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listRow.test.d.ts","sourceRoot":"","sources":["../../../src/blocks/listRow.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The arithmetic behind a block's "+N more" footer, separated from the hook so
3
+ * it can be tested without a renderer.
4
+ *
5
+ * The rule that matters: a control is offered ONLY when it changes what is on
6
+ * screen. The previous version derived "+N more" from a `total` the source
7
+ * reported while deriving the tap target from the array actually in hand, so a
8
+ * block holding five items and claiming six rendered a "+1 more" with nothing
9
+ * to reveal — a button that did nothing when tapped. This takes a count and a
10
+ * limit and nothing else, so `canExpand` is the same fact as `hidden > 0`.
11
+ */
12
+ export interface PageState {
13
+ /** Held but not rendered. */
14
+ hidden: number;
15
+ /** What one more tap reveals. */
16
+ next: number;
17
+ /** Something beyond the initial cap is on screen. */
18
+ expanded: boolean;
19
+ canExpand: boolean;
20
+ canCollapse: boolean;
21
+ }
22
+ export declare function pageState(count: number, cap: number, limit: number, step: number): PageState;
23
+ //# sourceMappingURL=pageState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageState.d.ts","sourceRoot":"","sources":["../../../src/blocks/pageState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAc5F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=pageState.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageState.test.d.ts","sourceRoot":"","sources":["../../../src/blocks/pageState.test.ts"],"names":[],"mappings":""}
@@ -17,18 +17,48 @@ export declare function Card({ title, source, children, testID, tone, }: {
17
17
  testID?: string;
18
18
  tone?: "warning" | "danger" | "info";
19
19
  }): import("react").JSX.Element;
20
- /** "+N more" — renders the hidden rows when tapped. Never a nested scroller. */
21
- export declare function More({ shown, total, onExpand, expanded, }: {
20
+ export interface Paged<T> {
21
+ visible: T[];
22
+ /** Held by the block but not rendered yet. */
23
+ hidden: number;
24
+ /** What the next tap reveals — `hidden`, capped to one page. */
25
+ next: number;
26
+ expanded: boolean;
27
+ /** Present ONLY when there is something to reveal. */
28
+ showMore?: () => void;
29
+ /** Present ONLY when something has been revealed. */
30
+ showLess?: () => void;
31
+ }
32
+ /**
33
+ * A capped list that grows a page at a time.
34
+ *
35
+ * The callers used to spell the expander's enabled-ness out themselves
36
+ * (`items.length > visible.length || expanded ? toggle : undefined`) at seven
37
+ * call sites, and getting it wrong rendered a "+N more" that did nothing when
38
+ * tapped. Both halves live here now so a call site cannot express that state.
39
+ */
40
+ export declare function usePaged<T>(items: T[], cap: number, step?: number): Paged<T>;
41
+ /**
42
+ * The footer of a paged list: reveal one more page, or fold back to the cap.
43
+ *
44
+ * It knows nothing about any `total` the source reported, and that is the
45
+ * point. The old version drew its count from that number while drawing its tap
46
+ * target from the array actually in hand — so a block holding five items and
47
+ * claiming six rendered "+1 more" with nothing behind it. The engine hands the
48
+ * whole list over now (see agent-core's receipts), so what this can show and
49
+ * what it can reveal are the same thing by construction.
50
+ */
51
+ export declare function More<T>({ paged }: {
52
+ paged: Paged<T>;
53
+ }): import("react").JSX.Element | null;
54
+ /**
55
+ * A list that CANNOT grow: the cap was applied where the block was built, so
56
+ * the rest was never sent. Stated, never offered as a tap.
57
+ */
58
+ export declare function MoreNote({ shown, total }: {
22
59
  shown: number;
23
60
  total?: number;
24
- onExpand?: () => void;
25
- expanded?: boolean;
26
61
  }): import("react").JSX.Element | null;
27
- export declare function useExpand<T>(items: T[], cap: number): {
28
- visible: T[];
29
- expanded: boolean;
30
- toggle: () => void;
31
- };
32
62
  /** Up to two buttons. One primary (accent, dark ink), one plate. */
33
63
  export declare function ActionRow({ actions, blockId, align }: {
34
64
  actions?: BlockAction[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/blocks/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAKzE,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAe7C;AAED,4EAA4E;AAC5E,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,sCASlE;AAED,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,EACN,IAAI,GACL,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACtC,+BAoBA;AAYD,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,KAAK,CAAC,CAAC,CAAC,CAgBvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;CAAE,sCA6BrD;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,sCAS3E;AAED,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAc,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,sCA6CrI;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBtB,CAAC"}
@@ -1,3 +1,4 @@
1
- export { ActionRow, blockStyles, Card, More, ProvenanceBadge, toneColor, useExpand } from "./primitives";
1
+ export { ActionRow, blockStyles, Card, More, MoreNote, ProvenanceBadge, toneColor, usePaged } from "./primitives";
2
+ export type { Paged } from "./primitives";
2
3
  export { useBlockHandlers } from "./context";
3
4
  //# sourceMappingURL=primitivesIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitivesIndex.d.ts","sourceRoot":"","sources":["../../../src/blocks/primitivesIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClH,YAAY,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApprovalCard.d.ts","sourceRoot":"","sources":["../../../src/components/ApprovalCard.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAkCpE"}
@@ -9,6 +9,16 @@ export interface AskBuoyHeaderProps {
9
9
  hasMessages: boolean;
10
10
  onBack?: () => void;
11
11
  onReset: () => void;
12
+ /**
13
+ * The whole conversation as text, built on press. The header is the one
14
+ * place you can reach it without first scrolling back to the newest answer —
15
+ * which is exactly where you are NOT when a long session is the thing you
16
+ * want to paste into a ticket. Omitted (scripted demos, prototype scenes)
17
+ * the copy button is not rendered at all.
18
+ */
19
+ getTranscript?: () => string;
20
+ /** Open the settings view. Omitted where there is nowhere to go (demos). */
21
+ onOpenSettings?: () => void;
12
22
  }
13
- export declare function AskBuoyHeader({ configured, busy, failed, activeLabel, toolCount, hasMessages, onBack, onReset, }: AskBuoyHeaderProps): import("react").JSX.Element;
23
+ export declare function AskBuoyHeader({ configured, busy, failed, activeLabel, toolCount, hasMessages, onBack, onReset, getTranscript, onOpenSettings, }: AskBuoyHeaderProps): import("react").JSX.Element;
14
24
  //# sourceMappingURL=AskBuoyHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskBuoyHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AskBuoyHeader.tsx"],"names":[],"mappings":"AA+CA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,6EAA6E;IAC7E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC;IAC7B,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,IAAI,EACJ,MAAc,EACd,WAAW,EACX,SAAS,EACT,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,+BAuGpB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskBuoyIcon.d.ts","sourceRoot":"","sources":["../../../src/components/AskBuoyIcon.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskBuoyModal.d.ts","sourceRoot":"","sources":["../../../src/components/AskBuoyModal.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAarD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,cAAc,EACd,MAAM,GACP,EAAE,iBAAiB,+BA6RnB"}
@@ -0,0 +1,2 @@
1
+ export declare function AskBuoySettings(): import("react").JSX.Element;
2
+ //# sourceMappingURL=AskBuoySettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AskBuoySettings.d.ts","sourceRoot":"","sources":["../../../src/components/AskBuoySettings.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,eAAe,gCAsB9B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChangesBar.d.ts","sourceRoot":"","sources":["../../../src/components/ChangesBar.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAgB,KAAK,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AAExF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAYD,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,eAAe,sCA4FpF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Composer.d.ts","sourceRoot":"","sources":["../../../src/components/Composer.tsx"],"names":[],"mappings":"AAsCA,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,WAAW,GACZ,EAAE,aAAa,+BA8Ef"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,UAAU,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,eAAe,+BAwCjE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../src/components/Markdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AA8DtE;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAiC/E;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,+BA4C3E"}
@@ -1,11 +1,18 @@
1
1
  import type { ChatMessage } from "../store/askBuoyStore";
2
2
  /**
3
- * The transcript as a ticket-ready text. Deliberately the ONLY way a session
4
- * leaves the sheet: the transcript is never persisted (it can contain
5
- * anything the agent read), so "attach this to the Jira ticket" has to be an
6
- * explicit human act through the OS share sheet — which also offers Copy.
3
+ * The whole conversation as plain text — the only thing Copy ever produces,
4
+ * and the only way a session leaves the DEVICE (what it saves to disk for a
5
+ * reload goes nowhere — see `transcriptPersistence`).
6
+ *
7
+ * Plain text on purpose. This lands in a Slack message, a ticket comment or a
8
+ * notes file, all of which are read by a person; a JSON document is a worse
9
+ * version of that everywhere except a parser, and nothing here parses it.
10
+ *
11
+ * With `Show agent thinking` on it carries the working too — the reasoning and
12
+ * each step with its parameters — because reading the run somewhere that is
13
+ * not a phone is the entire point of that setting.
7
14
  */
8
- export declare function transcriptToText(messages: ChatMessage[]): string;
15
+ export declare function transcriptToText(messages: ChatMessage[], withTrace?: boolean): string;
9
16
  export interface MessageListProps {
10
17
  messages: ChatMessage[];
11
18
  ListHeaderComponent?: React.ReactElement | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,WAAW,EAA6B,MAAM,uBAAuB,CAAC;AAgNpF;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,UAAQ,GAAG,MAAM,CAmBnF;AAgED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAChD,kBAAkB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC/C,mBAAmB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAChD,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,GACR,EAAE,gBAAgB,+BAkFlB"}
@@ -0,0 +1,5 @@
1
+ import type { ChatMessage } from "../store/askBuoyStore";
2
+ export declare function ThinkingStrip({ message }: {
3
+ message: ChatMessage;
4
+ }): import("react").JSX.Element | null;
5
+ //# sourceMappingURL=ThinkingStrip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThinkingStrip.d.ts","sourceRoot":"","sources":["../../../src/components/ThinkingStrip.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AA+CvE,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,sCA6DlE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypingDots.d.ts","sourceRoot":"","sources":["../../../src/components/TypingDots.tsx"],"names":[],"mappings":"AAYA,wBAAgB,UAAU,gCAmCzB"}
@@ -0,0 +1,5 @@
1
+ export declare function useCopyAction(getText: () => string): {
2
+ copied: boolean;
3
+ copy: () => void;
4
+ };
5
+ //# sourceMappingURL=useCopyAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCopyAction.d.ts","sourceRoot":"","sources":["../../../src/components/useCopyAction.ts"],"names":[],"mappings":"AAmBA,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,MAAM,GAAG;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CA0B1F"}
@@ -22,6 +22,11 @@ export { MessageActions, ReasoningStrip, ElapsedRow, QueuedComposer, ReloadDivid
22
22
  export { Markdown } from "./components/Markdown";
23
23
  export { MessageList } from "./components/MessageList";
24
24
  export { AskBuoyHeader } from "./components/AskBuoyHeader";
25
+ export { AskBuoySettings } from "./components/AskBuoySettings";
26
+ export { ThinkingStrip } from "./components/ThinkingStrip";
27
+ export { askBuoySettings, type AskBuoySettings as AskBuoySettingsValue } from "./store/askBuoySettings";
28
+ export { useAskBuoySettings } from "./store/useAskBuoySettings";
29
+ export { traceEntries, traceToText, hasTrace, type TraceEntry } from "./store/traceText";
25
30
  export { Composer } from "./components/Composer";
26
31
  export { ChangesBar } from "./components/ChangesBar";
27
32
  export { ApprovalCard } from "./components/ApprovalCard";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EACL,iBAAiB,EACjB,iBAAi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