@teaflask/assistant 0.0.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (864) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +164 -2
  3. package/dist/activity.d.ts +5 -0
  4. package/dist/activity.js +3 -0
  5. package/dist/affordances/highlight.d.ts +3 -0
  6. package/dist/affordances/highlight.js +67 -0
  7. package/dist/affordances/prefill.d.ts +14 -0
  8. package/dist/affordances/prefill.js +151 -0
  9. package/dist/appearance/theme.d.ts +31 -0
  10. package/dist/appearance/theme.js +46 -0
  11. package/dist/components/activity-rail.d.ts +12 -0
  12. package/dist/components/activity-rail.js +60 -0
  13. package/dist/components/activity-shelf.d.ts +7 -0
  14. package/dist/components/activity-shelf.js +7 -0
  15. package/dist/components/agent-identity-mark.d.ts +7 -0
  16. package/dist/components/agent-identity-mark.js +29 -0
  17. package/dist/components/appearance-context.d.ts +14 -0
  18. package/dist/components/appearance-context.js +10 -0
  19. package/dist/components/approval-card.d.ts +7 -0
  20. package/dist/components/approval-card.js +117 -0
  21. package/dist/components/approval-context.d.ts +8 -0
  22. package/dist/components/approval-context.js +17 -0
  23. package/dist/components/assistant-companion.d.ts +5 -0
  24. package/dist/components/assistant-companion.js +147 -0
  25. package/dist/components/assistant-page.d.ts +23 -0
  26. package/dist/components/assistant-page.js +107 -0
  27. package/dist/components/assistant-palette-body.d.ts +3 -0
  28. package/dist/components/assistant-palette-body.js +25 -0
  29. package/dist/components/assistant-palette.d.ts +5 -0
  30. package/dist/components/assistant-palette.js +20 -0
  31. package/dist/components/assistant-transcript.d.ts +47 -0
  32. package/dist/components/assistant-transcript.js +116 -0
  33. package/dist/components/attachment-chips.d.ts +4 -0
  34. package/dist/components/attachment-chips.js +63 -0
  35. package/dist/components/child-transcript.d.ts +22 -0
  36. package/dist/components/child-transcript.js +120 -0
  37. package/dist/components/companion-drawer-body.d.ts +1 -0
  38. package/dist/components/companion-drawer-body.js +33 -0
  39. package/dist/components/companion-drawer.d.ts +10 -0
  40. package/dist/components/companion-drawer.js +88 -0
  41. package/dist/components/companion-header-disclosure.d.ts +20 -0
  42. package/dist/components/companion-header-disclosure.js +63 -0
  43. package/dist/components/companion-history-menu.d.ts +15 -0
  44. package/dist/components/companion-history-menu.js +25 -0
  45. package/dist/components/companion-mark-image.d.ts +3 -0
  46. package/dist/components/companion-mark-image.js +18 -0
  47. package/dist/components/companion-mark.d.ts +1 -0
  48. package/dist/components/companion-mark.js +8 -0
  49. package/dist/components/companion-mode-menu.d.ts +15 -0
  50. package/dist/components/companion-mode-menu.js +19 -0
  51. package/dist/components/composer-attachment-chip.d.ts +7 -0
  52. package/dist/components/composer-attachment-chip.js +32 -0
  53. package/dist/components/composer-banner.d.ts +4 -0
  54. package/dist/components/composer-banner.js +17 -0
  55. package/dist/components/composer.d.ts +4 -0
  56. package/dist/components/composer.js +250 -0
  57. package/dist/components/conversation-context.d.ts +4 -0
  58. package/dist/components/conversation-context.js +10 -0
  59. package/dist/components/conversation-gate-card.d.ts +8 -0
  60. package/dist/components/conversation-gate-card.js +87 -0
  61. package/dist/components/conversation-surfaces-provider.d.ts +6 -0
  62. package/dist/components/conversation-surfaces-provider.js +23 -0
  63. package/dist/components/conversation-view.d.ts +21 -0
  64. package/dist/components/conversation-view.js +74 -0
  65. package/dist/components/copy-text-button.d.ts +5 -0
  66. package/dist/components/copy-text-button.js +33 -0
  67. package/dist/components/elicitation-context.d.ts +14 -0
  68. package/dist/components/elicitation-context.js +24 -0
  69. package/dist/components/elicitation-receipt-row.d.ts +4 -0
  70. package/dist/components/elicitation-receipt-row.js +16 -0
  71. package/dist/components/human-file-size.d.ts +1 -0
  72. package/dist/components/human-file-size.js +9 -0
  73. package/dist/components/icons.d.ts +15 -0
  74. package/dist/components/icons.js +46 -0
  75. package/dist/components/lazy-body.d.ts +4 -0
  76. package/dist/components/lazy-body.js +30 -0
  77. package/dist/components/markdown/assistant-markdown.d.ts +3 -0
  78. package/dist/components/markdown/assistant-markdown.js +12 -0
  79. package/dist/components/markdown/code-block.d.ts +4 -0
  80. package/dist/components/markdown/code-block.js +8 -0
  81. package/dist/components/markdown/highlight.d.ts +1 -0
  82. package/dist/components/markdown/highlight.js +15 -0
  83. package/dist/components/markdown/markdown-structure.d.ts +16 -0
  84. package/dist/components/markdown/markdown-structure.js +67 -0
  85. package/dist/components/markdown/memoized-blocks.d.ts +6 -0
  86. package/dist/components/markdown/memoized-blocks.js +20 -0
  87. package/dist/components/markdown/paced-assistant-markdown.d.ts +4 -0
  88. package/dist/components/markdown/paced-assistant-markdown.js +10 -0
  89. package/dist/components/markdown/reveal-pacer.d.ts +20 -0
  90. package/dist/components/markdown/reveal-pacer.js +85 -0
  91. package/dist/components/markdown/shiki-highlighter.d.ts +1 -0
  92. package/dist/components/markdown/shiki-highlighter.js +39 -0
  93. package/dist/components/markdown/streaming-repair.d.ts +1 -0
  94. package/dist/components/markdown/streaming-repair.js +59 -0
  95. package/dist/components/markdown/use-highlighted-html.d.ts +1 -0
  96. package/dist/components/markdown/use-highlighted-html.js +28 -0
  97. package/dist/components/markdown/use-paced-reveal.d.ts +5 -0
  98. package/dist/components/markdown/use-paced-reveal.js +90 -0
  99. package/dist/components/memory-updated-footer.d.ts +4 -0
  100. package/dist/components/memory-updated-footer.js +66 -0
  101. package/dist/components/message-list-row.d.ts +13 -0
  102. package/dist/components/message-list-row.js +46 -0
  103. package/dist/components/message-list-slots.d.ts +25 -0
  104. package/dist/components/message-list-slots.js +1 -0
  105. package/dist/components/message-list.d.ts +23 -0
  106. package/dist/components/message-list.js +62 -0
  107. package/dist/components/model-picker-chip.d.ts +1 -0
  108. package/dist/components/model-picker-chip.js +168 -0
  109. package/dist/components/model-picker-effort.d.ts +4 -0
  110. package/dist/components/model-picker-effort.js +48 -0
  111. package/dist/components/model-picker-panels.d.ts +22 -0
  112. package/dist/components/model-picker-panels.js +45 -0
  113. package/dist/components/notice-banner.d.ts +8 -0
  114. package/dist/components/notice-banner.js +9 -0
  115. package/dist/components/operation-icons.d.ts +19 -0
  116. package/dist/components/operation-icons.js +40 -0
  117. package/dist/components/pretty-print.d.ts +1 -0
  118. package/dist/components/pretty-print.js +9 -0
  119. package/dist/components/primitives/autofocus.d.ts +1 -0
  120. package/dist/components/primitives/autofocus.js +12 -0
  121. package/dist/components/primitives/button.d.ts +10 -0
  122. package/dist/components/primitives/button.js +66 -0
  123. package/dist/components/primitives/cx.d.ts +1 -0
  124. package/dist/components/primitives/cx.js +3 -0
  125. package/dist/components/primitives/dialog.d.ts +7 -0
  126. package/dist/components/primitives/dialog.js +40 -0
  127. package/dist/components/primitives/disclosure.d.ts +22 -0
  128. package/dist/components/primitives/disclosure.js +32 -0
  129. package/dist/components/primitives/file-input.d.ts +5 -0
  130. package/dist/components/primitives/file-input.js +9 -0
  131. package/dist/components/primitives/floating-panel.d.ts +15 -0
  132. package/dist/components/primitives/floating-panel.js +113 -0
  133. package/dist/components/primitives/kbd.d.ts +2 -0
  134. package/dist/components/primitives/kbd.js +6 -0
  135. package/dist/components/primitives/sheet.d.ts +11 -0
  136. package/dist/components/primitives/sheet.js +18 -0
  137. package/dist/components/primitives/textarea.d.ts +7 -0
  138. package/dist/components/primitives/textarea.js +13 -0
  139. package/dist/components/primitives/use-dock-reflow.d.ts +2 -0
  140. package/dist/components/primitives/use-dock-reflow.js +30 -0
  141. package/dist/components/primitives/use-swipe-dismiss.d.ts +17 -0
  142. package/dist/components/primitives/use-swipe-dismiss.js +152 -0
  143. package/dist/components/provider-chip.d.ts +8 -0
  144. package/dist/components/provider-chip.js +135 -0
  145. package/dist/components/question-panel-answers.d.ts +29 -0
  146. package/dist/components/question-panel-answers.js +42 -0
  147. package/dist/components/question-panel-footer.d.ts +9 -0
  148. package/dist/components/question-panel-footer.js +51 -0
  149. package/dist/components/question-panel.d.ts +4 -0
  150. package/dist/components/question-panel.js +98 -0
  151. package/dist/components/react-tool-view.d.ts +4 -0
  152. package/dist/components/react-tool-view.js +82 -0
  153. package/dist/components/reasoning-row.d.ts +4 -0
  154. package/dist/components/reasoning-row.js +11 -0
  155. package/dist/components/receipt-rows.d.ts +3 -0
  156. package/dist/components/receipt-rows.js +6 -0
  157. package/dist/components/run-status-announcer.d.ts +5 -0
  158. package/dist/components/run-status-announcer.js +11 -0
  159. package/dist/components/scroll-follow-guards.d.ts +1 -0
  160. package/dist/components/scroll-follow-guards.js +156 -0
  161. package/dist/components/served-suggestions.d.ts +3 -0
  162. package/dist/components/served-suggestions.js +29 -0
  163. package/dist/components/slot-boundary.d.ts +11 -0
  164. package/dist/components/slot-boundary.js +33 -0
  165. package/dist/components/standing-poll.d.ts +1 -0
  166. package/dist/components/standing-poll.js +25 -0
  167. package/dist/components/streaming-states.d.ts +12 -0
  168. package/dist/components/streaming-states.js +15 -0
  169. package/dist/components/subagent-count-pill.d.ts +8 -0
  170. package/dist/components/subagent-count-pill.js +112 -0
  171. package/dist/components/subagent-current-work.d.ts +6 -0
  172. package/dist/components/subagent-current-work.js +12 -0
  173. package/dist/components/subagent-delegation-surface.d.ts +9 -0
  174. package/dist/components/subagent-delegation-surface.js +143 -0
  175. package/dist/components/subagent-delivery-divider.d.ts +5 -0
  176. package/dist/components/subagent-delivery-divider.js +22 -0
  177. package/dist/components/subagent-drill-in.d.ts +8 -0
  178. package/dist/components/subagent-drill-in.js +6 -0
  179. package/dist/components/subagent-execution-work.d.ts +3 -0
  180. package/dist/components/subagent-execution-work.js +7 -0
  181. package/dist/components/subagent-group-row.d.ts +26 -0
  182. package/dist/components/subagent-group-row.js +145 -0
  183. package/dist/components/subagent-preview-popover.d.ts +8 -0
  184. package/dist/components/subagent-preview-popover.js +78 -0
  185. package/dist/components/subscription-connect-arms.d.ts +25 -0
  186. package/dist/components/subscription-connect-arms.js +43 -0
  187. package/dist/components/subscription-connect-flow.d.ts +60 -0
  188. package/dist/components/subscription-connect-flow.js +319 -0
  189. package/dist/components/subscription-connected-standing.d.ts +16 -0
  190. package/dist/components/subscription-connected-standing.js +71 -0
  191. package/dist/components/subscription-plan-notice.d.ts +1 -0
  192. package/dist/components/subscription-plan-notice.js +29 -0
  193. package/dist/components/subscription-recheck.d.ts +10 -0
  194. package/dist/components/subscription-recheck.js +73 -0
  195. package/dist/components/surface-boundary.d.ts +8 -0
  196. package/dist/components/surface-boundary.js +56 -0
  197. package/dist/components/suspension-surfaces.d.ts +3 -0
  198. package/dist/components/suspension-surfaces.js +141 -0
  199. package/dist/components/teaflask-assistant-provider.d.ts +69 -0
  200. package/dist/components/teaflask-assistant-provider.js +203 -0
  201. package/dist/components/teaflask-assistant.d.ts +11 -0
  202. package/dist/components/teaflask-assistant.js +52 -0
  203. package/dist/components/thread-list.d.ts +16 -0
  204. package/dist/components/thread-list.js +57 -0
  205. package/dist/components/tool-arguments-summary.d.ts +2 -0
  206. package/dist/components/tool-arguments-summary.js +89 -0
  207. package/dist/components/tool-call-rows.d.ts +10 -0
  208. package/dist/components/tool-call-rows.js +103 -0
  209. package/dist/components/tool-row.d.ts +7 -0
  210. package/dist/components/tool-row.js +34 -0
  211. package/dist/components/tool-view-registry-context.d.ts +3 -0
  212. package/dist/components/tool-view-registry-context.js +6 -0
  213. package/dist/components/tool-view-slot.d.ts +11 -0
  214. package/dist/components/tool-view-slot.js +171 -0
  215. package/dist/components/tool-views/action-view.d.ts +1 -0
  216. package/dist/components/tool-views/action-view.js +111 -0
  217. package/dist/components/tool-views/command-view.d.ts +1 -0
  218. package/dist/components/tool-views/command-view.js +46 -0
  219. package/dist/components/tool-views/docs-search-view.d.ts +10 -0
  220. package/dist/components/tool-views/docs-search-view.js +109 -0
  221. package/dist/components/tool-views/file-edit-view.d.ts +1 -0
  222. package/dist/components/tool-views/file-edit-view.js +148 -0
  223. package/dist/components/tool-views/parts-classes.d.ts +28 -0
  224. package/dist/components/tool-views/parts-classes.js +28 -0
  225. package/dist/components/tool-views/parts.d.ts +41 -0
  226. package/dist/components/tool-views/parts.js +34 -0
  227. package/dist/components/tool-views/questions-view.d.ts +1 -0
  228. package/dist/components/tool-views/questions-view.js +41 -0
  229. package/dist/components/tool-views/view-dom.d.ts +51 -0
  230. package/dist/components/tool-views/view-dom.js +360 -0
  231. package/dist/components/transcript.d.ts +3 -0
  232. package/dist/components/transcript.js +59 -0
  233. package/dist/components/use-agent-subscriber.d.ts +3 -0
  234. package/dist/components/use-agent-subscriber.js +13 -0
  235. package/dist/components/use-answer-list-fold.d.ts +6 -0
  236. package/dist/components/use-answer-list-fold.js +31 -0
  237. package/dist/components/use-assistant-activity.d.ts +2 -0
  238. package/dist/components/use-assistant-activity.js +7 -0
  239. package/dist/components/use-assistant-conversation.d.ts +23 -0
  240. package/dist/components/use-assistant-conversation.js +26 -0
  241. package/dist/components/use-assistant-surface-presence.d.ts +2 -0
  242. package/dist/components/use-assistant-surface-presence.js +6 -0
  243. package/dist/components/use-child-replay-stream.d.ts +20 -0
  244. package/dist/components/use-child-replay-stream.js +186 -0
  245. package/dist/components/use-latest-ref.d.ts +2 -0
  246. package/dist/components/use-latest-ref.js +9 -0
  247. package/dist/components/use-member-toggle-outrank.d.ts +6 -0
  248. package/dist/components/use-member-toggle-outrank.js +32 -0
  249. package/dist/components/use-perch-clearance.d.ts +2 -0
  250. package/dist/components/use-perch-clearance.js +123 -0
  251. package/dist/components/use-question-panel-keys.d.ts +32 -0
  252. package/dist/components/use-question-panel-keys.js +179 -0
  253. package/dist/components/use-register-assistant-surface.d.ts +2 -0
  254. package/dist/components/use-register-assistant-surface.js +11 -0
  255. package/dist/components/use-resolved-theme-mode.d.ts +3 -0
  256. package/dist/components/use-resolved-theme-mode.js +67 -0
  257. package/dist/components/use-roster-disclosure.d.ts +20 -0
  258. package/dist/components/use-roster-disclosure.js +114 -0
  259. package/dist/components/use-roster-preview.d.ts +24 -0
  260. package/dist/components/use-roster-preview.js +82 -0
  261. package/dist/components/use-store-cell.d.ts +2 -0
  262. package/dist/components/use-store-cell.js +5 -0
  263. package/dist/components/use-thread-dispatches.d.ts +8 -0
  264. package/dist/components/use-thread-dispatches.js +400 -0
  265. package/dist/components/use-transcript-folds.d.ts +26 -0
  266. package/dist/components/use-transcript-folds.js +97 -0
  267. package/dist/components/use-transcript.d.ts +19 -0
  268. package/dist/components/use-transcript.js +40 -0
  269. package/dist/components/user-message.d.ts +6 -0
  270. package/dist/components/user-message.js +9 -0
  271. package/dist/contract/actions-adapter.d.ts +26 -0
  272. package/dist/contract/actions-adapter.js +1 -0
  273. package/dist/contract/assistant-config.d.ts +1 -0
  274. package/dist/contract/assistant-config.js +1 -0
  275. package/dist/contract/dispatches.d.ts +15 -0
  276. package/dist/contract/dispatches.js +24 -0
  277. package/dist/contract/errors.d.ts +11 -0
  278. package/dist/contract/errors.js +1 -0
  279. package/dist/contract/events.d.ts +20 -0
  280. package/dist/contract/events.js +13 -0
  281. package/dist/contract/identity.d.ts +1 -0
  282. package/dist/contract/identity.js +1 -0
  283. package/dist/contract/subscriptions.d.ts +16 -0
  284. package/dist/contract/subscriptions.js +35 -0
  285. package/dist/contract/telemetry.d.ts +30 -0
  286. package/dist/contract/telemetry.js +19 -0
  287. package/dist/contract/threads.d.ts +3 -0
  288. package/dist/contract/threads.js +2 -0
  289. package/dist/core/activity-title.d.ts +1 -0
  290. package/dist/core/activity-title.js +8 -0
  291. package/dist/core/activity.d.ts +27 -0
  292. package/dist/core/activity.js +53 -0
  293. package/dist/core/agent-identity.d.ts +2 -0
  294. package/dist/core/agent-identity.js +4 -0
  295. package/dist/core/approval-decision.d.ts +6 -0
  296. package/dist/core/approval-decision.js +162 -0
  297. package/dist/core/approval-inbox.d.ts +101 -0
  298. package/dist/core/approval-inbox.js +399 -0
  299. package/dist/core/approval-request-narrowing.d.ts +15 -0
  300. package/dist/core/approval-request-narrowing.js +59 -0
  301. package/dist/core/approval-resolved.d.ts +7 -0
  302. package/dist/core/approval-resolved.js +16 -0
  303. package/dist/core/assistant-prose.d.ts +2 -0
  304. package/dist/core/assistant-prose.js +11 -0
  305. package/dist/core/assistant-session-registry.d.ts +51 -0
  306. package/dist/core/assistant-session-registry.js +313 -0
  307. package/dist/core/attachment-uploads.d.ts +5 -0
  308. package/dist/core/attachment-uploads.js +22 -0
  309. package/dist/core/block-timing-anchors.d.ts +5 -0
  310. package/dist/core/block-timing-anchors.js +93 -0
  311. package/dist/core/companion-drawer-flag.d.ts +4 -0
  312. package/dist/core/companion-drawer-flag.js +9 -0
  313. package/dist/core/companion-presence.d.ts +7 -0
  314. package/dist/core/companion-presence.js +9 -0
  315. package/dist/core/composer-input-state.d.ts +8 -0
  316. package/dist/core/composer-input-state.js +40 -0
  317. package/dist/core/composer-policy.d.ts +38 -0
  318. package/dist/core/composer-policy.js +56 -0
  319. package/dist/core/connect-gate.d.ts +21 -0
  320. package/dist/core/connect-gate.js +85 -0
  321. package/dist/core/connection-driver.d.ts +3 -0
  322. package/dist/core/connection-driver.js +106 -0
  323. package/dist/core/connection-epoch.d.ts +65 -0
  324. package/dist/core/connection-epoch.js +232 -0
  325. package/dist/core/consumed-interrupts.d.ts +12 -0
  326. package/dist/core/consumed-interrupts.js +64 -0
  327. package/dist/core/conversation-adoption.d.ts +13 -0
  328. package/dist/core/conversation-adoption.js +325 -0
  329. package/dist/core/conversation-contract.d.ts +87 -0
  330. package/dist/core/conversation-contract.js +1 -0
  331. package/dist/core/conversation-publish.d.ts +8 -0
  332. package/dist/core/conversation-publish.js +117 -0
  333. package/dist/core/conversation-refresh.d.ts +4 -0
  334. package/dist/core/conversation-refresh.js +76 -0
  335. package/dist/core/conversation-send.d.ts +6 -0
  336. package/dist/core/conversation-send.js +127 -0
  337. package/dist/core/conversation-store.d.ts +125 -0
  338. package/dist/core/conversation-store.js +241 -0
  339. package/dist/core/coworker-execution-work.d.ts +10 -0
  340. package/dist/core/coworker-execution-work.js +53 -0
  341. package/dist/core/disposable-subscriber.d.ts +6 -0
  342. package/dist/core/disposable-subscriber.js +18 -0
  343. package/dist/core/dock-reflow.d.ts +5 -0
  344. package/dist/core/dock-reflow.js +68 -0
  345. package/dist/core/elicitation-answers.d.ts +7 -0
  346. package/dist/core/elicitation-answers.js +71 -0
  347. package/dist/core/elicitation-cards.d.ts +29 -0
  348. package/dist/core/elicitation-cards.js +69 -0
  349. package/dist/core/elicitation-pickers.d.ts +13 -0
  350. package/dist/core/elicitation-pickers.js +71 -0
  351. package/dist/core/epoch-sync.d.ts +12 -0
  352. package/dist/core/epoch-sync.js +238 -0
  353. package/dist/core/error-copy.d.ts +3 -0
  354. package/dist/core/error-copy.js +45 -0
  355. package/dist/core/execution-driver.d.ts +37 -0
  356. package/dist/core/execution-driver.js +223 -0
  357. package/dist/core/execution-handlers.d.ts +9 -0
  358. package/dist/core/execution-handlers.js +369 -0
  359. package/dist/core/execution-inbox.d.ts +72 -0
  360. package/dist/core/execution-inbox.js +243 -0
  361. package/dist/core/execution-kinds.d.ts +34 -0
  362. package/dist/core/execution-kinds.js +18 -0
  363. package/dist/core/execution-request-narrowing.d.ts +15 -0
  364. package/dist/core/execution-request-narrowing.js +64 -0
  365. package/dist/core/host-fill.d.ts +1 -0
  366. package/dist/core/host-fill.js +3 -0
  367. package/dist/core/hotkey.d.ts +18 -0
  368. package/dist/core/hotkey.js +72 -0
  369. package/dist/core/identity-pair.d.ts +14 -0
  370. package/dist/core/identity-pair.js +18 -0
  371. package/dist/core/idle-recheck.d.ts +3 -0
  372. package/dist/core/idle-recheck.js +27 -0
  373. package/dist/core/memory-provenance-anchors.d.ts +19 -0
  374. package/dist/core/memory-provenance-anchors.js +154 -0
  375. package/dist/core/messages-cell.d.ts +11 -0
  376. package/dist/core/messages-cell.js +49 -0
  377. package/dist/core/observable-cell.d.ts +12 -0
  378. package/dist/core/observable-cell.js +25 -0
  379. package/dist/core/pending-decision-gap.d.ts +36 -0
  380. package/dist/core/pending-decision-gap.js +101 -0
  381. package/dist/core/perch-clearance.d.ts +19 -0
  382. package/dist/core/perch-clearance.js +53 -0
  383. package/dist/core/question-drafts.d.ts +40 -0
  384. package/dist/core/question-drafts.js +135 -0
  385. package/dist/core/question-receipt.d.ts +11 -0
  386. package/dist/core/question-receipt.js +55 -0
  387. package/dist/core/reasoning-copy.d.ts +2 -0
  388. package/dist/core/reasoning-copy.js +2 -0
  389. package/dist/core/receipt-anchors.d.ts +9 -0
  390. package/dist/core/receipt-anchors.js +88 -0
  391. package/dist/core/run-folds.d.ts +43 -0
  392. package/dist/core/run-folds.js +211 -0
  393. package/dist/core/run-status.d.ts +4 -0
  394. package/dist/core/run-status.js +12 -0
  395. package/dist/core/segment-timing.d.ts +13 -0
  396. package/dist/core/segment-timing.js +47 -0
  397. package/dist/core/settle-refresh.d.ts +9 -0
  398. package/dist/core/settle-refresh.js +24 -0
  399. package/dist/core/step-caption.d.ts +2 -0
  400. package/dist/core/step-caption.js +7 -0
  401. package/dist/core/stop-copy.d.ts +1 -0
  402. package/dist/core/stop-copy.js +1 -0
  403. package/dist/core/stop-settle.d.ts +5 -0
  404. package/dist/core/stop-settle.js +15 -0
  405. package/dist/core/stream-trouble.d.ts +5 -0
  406. package/dist/core/stream-trouble.js +83 -0
  407. package/dist/core/subagent-brief.d.ts +3 -0
  408. package/dist/core/subagent-brief.js +38 -0
  409. package/dist/core/subagent-delivery-anchors.d.ts +11 -0
  410. package/dist/core/subagent-delivery-anchors.js +90 -0
  411. package/dist/core/subagent-presence.d.ts +10 -0
  412. package/dist/core/subagent-presence.js +64 -0
  413. package/dist/core/subagent-roster.d.ts +35 -0
  414. package/dist/core/subagent-roster.js +80 -0
  415. package/dist/core/subagent-rows.d.ts +50 -0
  416. package/dist/core/subagent-rows.js +187 -0
  417. package/dist/core/surface-registry.d.ts +16 -0
  418. package/dist/core/surface-registry.js +56 -0
  419. package/dist/core/suspension-queue.d.ts +14 -0
  420. package/dist/core/suspension-queue.js +46 -0
  421. package/dist/core/tail-slot-pool.d.ts +13 -0
  422. package/dist/core/tail-slot-pool.js +52 -0
  423. package/dist/core/time-labels.d.ts +7 -0
  424. package/dist/core/time-labels.js +47 -0
  425. package/dist/core/tool-call-display-anchors.d.ts +11 -0
  426. package/dist/core/tool-call-display-anchors.js +186 -0
  427. package/dist/core/tool-call-display.d.ts +28 -0
  428. package/dist/core/tool-call-display.js +69 -0
  429. package/dist/core/tool-call-presentation.d.ts +15 -0
  430. package/dist/core/tool-call-presentation.js +139 -0
  431. package/dist/core/tool-cancel-anchors.d.ts +5 -0
  432. package/dist/core/tool-cancel-anchors.js +7 -0
  433. package/dist/core/tool-decision-anchors.d.ts +6 -0
  434. package/dist/core/tool-decision-anchors.js +56 -0
  435. package/dist/core/tool-denial-anchors.d.ts +19 -0
  436. package/dist/core/tool-denial-anchors.js +68 -0
  437. package/dist/core/tool-error-anchors.d.ts +5 -0
  438. package/dist/core/tool-error-anchors.js +7 -0
  439. package/dist/core/tool-flag-anchors.d.ts +9 -0
  440. package/dist/core/tool-flag-anchors.js +37 -0
  441. package/dist/core/tool-offload-anchors.d.ts +5 -0
  442. package/dist/core/tool-offload-anchors.js +7 -0
  443. package/dist/core/tool-outcome.d.ts +9 -0
  444. package/dist/core/tool-outcome.js +72 -0
  445. package/dist/core/tool-refusal-anchors.d.ts +5 -0
  446. package/dist/core/tool-refusal-anchors.js +7 -0
  447. package/dist/core/tool-result-envelope.d.ts +3 -0
  448. package/dist/core/tool-result-envelope.js +28 -0
  449. package/dist/core/tool-schema-anchors.d.ts +18 -0
  450. package/dist/core/tool-schema-anchors.js +101 -0
  451. package/dist/core/tool-sentence-anchors.d.ts +11 -0
  452. package/dist/core/tool-sentence-anchors.js +46 -0
  453. package/dist/core/tool-view.d.ts +66 -0
  454. package/dist/core/tool-view.js +70 -0
  455. package/dist/core/transcript-lease.d.ts +2 -0
  456. package/dist/core/transcript-lease.js +20 -0
  457. package/dist/core/transcript-rows.d.ts +83 -0
  458. package/dist/core/transcript-rows.js +305 -0
  459. package/dist/core/turn-failed-anchors.d.ts +8 -0
  460. package/dist/core/turn-failed-anchors.js +9 -0
  461. package/dist/core/turn-failure-copy.d.ts +4 -0
  462. package/dist/core/turn-failure-copy.js +19 -0
  463. package/dist/core/turn-usage-anchors.d.ts +16 -0
  464. package/dist/core/turn-usage-anchors.js +100 -0
  465. package/dist/core/turns-backfill.d.ts +14 -0
  466. package/dist/core/turns-backfill.js +27 -0
  467. package/dist/core/user-turn-ledger.d.ts +45 -0
  468. package/dist/core/user-turn-ledger.js +106 -0
  469. package/dist/core/wire-sentence-cap.d.ts +1 -0
  470. package/dist/core/wire-sentence-cap.js +1 -0
  471. package/dist/generated/models/activityMessage.d.ts +11 -0
  472. package/dist/generated/models/activityMessage.js +1 -0
  473. package/dist/generated/models/activityMessageContent.d.ts +3 -0
  474. package/dist/generated/models/activityMessageContent.js +1 -0
  475. package/dist/generated/models/activityMessageMetadata.d.ts +3 -0
  476. package/dist/generated/models/activityMessageMetadata.js +1 -0
  477. package/dist/generated/models/agentDispatchStatus.d.ts +7 -0
  478. package/dist/generated/models/agentDispatchStatus.js +6 -0
  479. package/dist/generated/models/apiErrorBody.d.ts +6 -0
  480. package/dist/generated/models/apiErrorBody.js +1 -0
  481. package/dist/generated/models/apiErrorCode.d.ts +146 -0
  482. package/dist/generated/models/apiErrorCode.js +145 -0
  483. package/dist/generated/models/approvalRequestedMarker.d.ts +15 -0
  484. package/dist/generated/models/approvalRequestedMarker.js +1 -0
  485. package/dist/generated/models/approvalRequestedMarkerToolArgs.d.ts +3 -0
  486. package/dist/generated/models/approvalRequestedMarkerToolArgs.js +1 -0
  487. package/dist/generated/models/approvalRequestedMarkerToolInputSchema.d.ts +3 -0
  488. package/dist/generated/models/approvalRequestedMarkerToolInputSchema.js +1 -0
  489. package/dist/generated/models/approvalRequestedMarkerToolOutputSchema.d.ts +3 -0
  490. package/dist/generated/models/approvalRequestedMarkerToolOutputSchema.js +1 -0
  491. package/dist/generated/models/approvalResolvedMarker.d.ts +6 -0
  492. package/dist/generated/models/approvalResolvedMarker.js +1 -0
  493. package/dist/generated/models/askQuestionsAction.d.ts +4 -0
  494. package/dist/generated/models/askQuestionsAction.js +1 -0
  495. package/dist/generated/models/askQuestionsResult.d.ts +5 -0
  496. package/dist/generated/models/askQuestionsResult.js +1 -0
  497. package/dist/generated/models/assistantConfigResponse.d.ts +10 -0
  498. package/dist/generated/models/assistantConfigResponse.js +1 -0
  499. package/dist/generated/models/assistantMessage.d.ts +13 -0
  500. package/dist/generated/models/assistantMessage.js +1 -0
  501. package/dist/generated/models/assistantMessageMetadata.d.ts +3 -0
  502. package/dist/generated/models/assistantMessageMetadata.js +1 -0
  503. package/dist/generated/models/assistantStreamMarkerName.d.ts +19 -0
  504. package/dist/generated/models/assistantStreamMarkerName.js +18 -0
  505. package/dist/generated/models/assistantTurnKind.d.ts +4 -0
  506. package/dist/generated/models/assistantTurnKind.js +3 -0
  507. package/dist/generated/models/assistantTurnStatus.d.ts +11 -0
  508. package/dist/generated/models/assistantTurnStatus.js +10 -0
  509. package/dist/generated/models/attachmentKind.d.ts +8 -0
  510. package/dist/generated/models/attachmentKind.js +7 -0
  511. package/dist/generated/models/attachmentPolicyResponse.d.ts +6 -0
  512. package/dist/generated/models/attachmentPolicyResponse.js +1 -0
  513. package/dist/generated/models/audioInputContent.d.ts +10 -0
  514. package/dist/generated/models/audioInputContent.js +1 -0
  515. package/dist/generated/models/audioPart.d.ts +10 -0
  516. package/dist/generated/models/audioPart.js +1 -0
  517. package/dist/generated/models/beginSubscriptionAuthorizationResponse.d.ts +4 -0
  518. package/dist/generated/models/beginSubscriptionAuthorizationResponse.js +1 -0
  519. package/dist/generated/models/binaryInputContent.d.ts +9 -0
  520. package/dist/generated/models/binaryInputContent.js +1 -0
  521. package/dist/generated/models/completeSubscriptionAuthorizationRequest.d.ts +5 -0
  522. package/dist/generated/models/completeSubscriptionAuthorizationRequest.js +1 -0
  523. package/dist/generated/models/completeSubscriptionAuthorizationResponse.d.ts +4 -0
  524. package/dist/generated/models/completeSubscriptionAuthorizationResponse.js +1 -0
  525. package/dist/generated/models/connectProjectionResponse.d.ts +9 -0
  526. package/dist/generated/models/connectProjectionResponse.js +1 -0
  527. package/dist/generated/models/connectProjectionResponseGate.d.ts +8 -0
  528. package/dist/generated/models/connectProjectionResponseGate.js +7 -0
  529. package/dist/generated/models/connectProjectionResponseReason.d.ts +5 -0
  530. package/dist/generated/models/connectProjectionResponseReason.js +4 -0
  531. package/dist/generated/models/context.d.ts +5 -0
  532. package/dist/generated/models/context.js +1 -0
  533. package/dist/generated/models/createServingAttachmentUploadRequest.d.ts +4 -0
  534. package/dist/generated/models/createServingAttachmentUploadRequest.js +1 -0
  535. package/dist/generated/models/createServingAttachmentUploadResponse.d.ts +6 -0
  536. package/dist/generated/models/createServingAttachmentUploadResponse.js +1 -0
  537. package/dist/generated/models/currentVisitorResponse.d.ts +11 -0
  538. package/dist/generated/models/currentVisitorResponse.js +1 -0
  539. package/dist/generated/models/dataSource.d.ts +6 -0
  540. package/dist/generated/models/dataSource.js +1 -0
  541. package/dist/generated/models/deliveredSubagentResult.d.ts +5 -0
  542. package/dist/generated/models/deliveredSubagentResult.js +1 -0
  543. package/dist/generated/models/developerMessage.d.ts +11 -0
  544. package/dist/generated/models/developerMessage.js +1 -0
  545. package/dist/generated/models/developerMessageMetadata.d.ts +3 -0
  546. package/dist/generated/models/developerMessageMetadata.js +1 -0
  547. package/dist/generated/models/docHeading.d.ts +6 -0
  548. package/dist/generated/models/docHeading.js +1 -0
  549. package/dist/generated/models/docHeadingLevel.d.ts +9 -0
  550. package/dist/generated/models/docHeadingLevel.js +8 -0
  551. package/dist/generated/models/documentInputContent.d.ts +10 -0
  552. package/dist/generated/models/documentInputContent.js +1 -0
  553. package/dist/generated/models/documentPart.d.ts +10 -0
  554. package/dist/generated/models/documentPart.js +1 -0
  555. package/dist/generated/models/endUserIdentity.d.ts +4 -0
  556. package/dist/generated/models/endUserIdentity.js +1 -0
  557. package/dist/generated/models/errorEnvelope.d.ts +4 -0
  558. package/dist/generated/models/errorEnvelope.js +1 -0
  559. package/dist/generated/models/evidenceAfterVoidRecordedMarker.d.ts +9 -0
  560. package/dist/generated/models/evidenceAfterVoidRecordedMarker.js +1 -0
  561. package/dist/generated/models/evidenceAfterVoidRecordedMarkerError.d.ts +3 -0
  562. package/dist/generated/models/evidenceAfterVoidRecordedMarkerError.js +1 -0
  563. package/dist/generated/models/evidenceAfterVoidRecordedMarkerResult.d.ts +3 -0
  564. package/dist/generated/models/evidenceAfterVoidRecordedMarkerResult.js +1 -0
  565. package/dist/generated/models/fileSource.d.ts +7 -0
  566. package/dist/generated/models/fileSource.js +1 -0
  567. package/dist/generated/models/functionCall.d.ts +5 -0
  568. package/dist/generated/models/functionCall.js +1 -0
  569. package/dist/generated/models/getServingAssistantThreadParams.d.ts +5 -0
  570. package/dist/generated/models/getServingAssistantThreadParams.js +1 -0
  571. package/dist/generated/models/helpHostResolution.d.ts +3 -0
  572. package/dist/generated/models/helpHostResolution.js +1 -0
  573. package/dist/generated/models/helpPageResponse.d.ts +6 -0
  574. package/dist/generated/models/helpPageResponse.js +1 -0
  575. package/dist/generated/models/helpSearchHit.d.ts +7 -0
  576. package/dist/generated/models/helpSearchHit.js +1 -0
  577. package/dist/generated/models/helpSearchMode.d.ts +5 -0
  578. package/dist/generated/models/helpSearchMode.js +4 -0
  579. package/dist/generated/models/helpSearchResponse.d.ts +7 -0
  580. package/dist/generated/models/helpSearchResponse.js +1 -0
  581. package/dist/generated/models/helpSiteGroup.d.ts +7 -0
  582. package/dist/generated/models/helpSiteGroup.js +1 -0
  583. package/dist/generated/models/helpSitePage.d.ts +7 -0
  584. package/dist/generated/models/helpSitePage.js +1 -0
  585. package/dist/generated/models/helpSiteResponse.d.ts +9 -0
  586. package/dist/generated/models/helpSiteResponse.js +1 -0
  587. package/dist/generated/models/helpSiteTab.d.ts +7 -0
  588. package/dist/generated/models/helpSiteTab.js +1 -0
  589. package/dist/generated/models/highlightResult.d.ts +4 -0
  590. package/dist/generated/models/highlightResult.js +1 -0
  591. package/dist/generated/models/httpIntentResult.d.ts +7 -0
  592. package/dist/generated/models/httpIntentResult.js +1 -0
  593. package/dist/generated/models/httpIntentResultHeaders.d.ts +3 -0
  594. package/dist/generated/models/httpIntentResultHeaders.js +1 -0
  595. package/dist/generated/models/imageInputContent.d.ts +10 -0
  596. package/dist/generated/models/imageInputContent.js +1 -0
  597. package/dist/generated/models/imagePart.d.ts +10 -0
  598. package/dist/generated/models/imagePart.js +1 -0
  599. package/dist/generated/models/index.d.ts +163 -0
  600. package/dist/generated/models/index.js +163 -0
  601. package/dist/generated/models/inputContentDataSource.d.ts +6 -0
  602. package/dist/generated/models/inputContentDataSource.js +1 -0
  603. package/dist/generated/models/inputContentUrlSource.d.ts +6 -0
  604. package/dist/generated/models/inputContentUrlSource.js +1 -0
  605. package/dist/generated/models/interruptAnswerConsumedMarker.d.ts +6 -0
  606. package/dist/generated/models/interruptAnswerConsumedMarker.js +1 -0
  607. package/dist/generated/models/interruptAnswerConsumedMarkerFamily.d.ts +5 -0
  608. package/dist/generated/models/interruptAnswerConsumedMarkerFamily.js +4 -0
  609. package/dist/generated/models/listServingAssistantThreadsParams.d.ts +5 -0
  610. package/dist/generated/models/listServingAssistantThreadsParams.js +1 -0
  611. package/dist/generated/models/memoryUpdatedMarker.d.ts +5 -0
  612. package/dist/generated/models/memoryUpdatedMarker.js +1 -0
  613. package/dist/generated/models/mintVisitorTokenRequest.d.ts +5 -0
  614. package/dist/generated/models/mintVisitorTokenRequest.js +1 -0
  615. package/dist/generated/models/mintVisitorTokenResponse.d.ts +7 -0
  616. package/dist/generated/models/mintVisitorTokenResponse.js +1 -0
  617. package/dist/generated/models/modelChoiceOption.d.ts +7 -0
  618. package/dist/generated/models/modelChoiceOption.js +1 -0
  619. package/dist/generated/models/modelChoiceResponse.d.ts +9 -0
  620. package/dist/generated/models/modelChoiceResponse.js +1 -0
  621. package/dist/generated/models/modelPickRequest.d.ts +5 -0
  622. package/dist/generated/models/modelPickRequest.js +1 -0
  623. package/dist/generated/models/navigateResult.d.ts +4 -0
  624. package/dist/generated/models/navigateResult.js +1 -0
  625. package/dist/generated/models/prefillFormResult.d.ts +5 -0
  626. package/dist/generated/models/prefillFormResult.js +1 -0
  627. package/dist/generated/models/publishableKeyMode.d.ts +5 -0
  628. package/dist/generated/models/publishableKeyMode.js +4 -0
  629. package/dist/generated/models/question.d.ts +7 -0
  630. package/dist/generated/models/question.js +1 -0
  631. package/dist/generated/models/questionAnswer.d.ts +4 -0
  632. package/dist/generated/models/questionAnswer.js +1 -0
  633. package/dist/generated/models/questionOption.d.ts +4 -0
  634. package/dist/generated/models/questionOption.js +1 -0
  635. package/dist/generated/models/readPageResult.d.ts +7 -0
  636. package/dist/generated/models/readPageResult.js +1 -0
  637. package/dist/generated/models/reasoningMessage.d.ts +10 -0
  638. package/dist/generated/models/reasoningMessage.js +1 -0
  639. package/dist/generated/models/reasoningMessageMetadata.d.ts +3 -0
  640. package/dist/generated/models/reasoningMessageMetadata.js +1 -0
  641. package/dist/generated/models/refusedField.d.ts +4 -0
  642. package/dist/generated/models/refusedField.js +1 -0
  643. package/dist/generated/models/resolveServingTurnApprovalRequest.d.ts +4 -0
  644. package/dist/generated/models/resolveServingTurnApprovalRequest.js +1 -0
  645. package/dist/generated/models/resolveServingTurnApprovalResponse.d.ts +6 -0
  646. package/dist/generated/models/resolveServingTurnApprovalResponse.js +1 -0
  647. package/dist/generated/models/resolveServingTurnToolResultsRequest.d.ts +4 -0
  648. package/dist/generated/models/resolveServingTurnToolResultsRequest.js +1 -0
  649. package/dist/generated/models/resolveServingTurnToolResultsResponse.d.ts +7 -0
  650. package/dist/generated/models/resolveServingTurnToolResultsResponse.js +1 -0
  651. package/dist/generated/models/resolvedLanding.d.ts +6 -0
  652. package/dist/generated/models/resolvedLanding.js +1 -0
  653. package/dist/generated/models/resolvedLandingCard.d.ts +6 -0
  654. package/dist/generated/models/resolvedLandingCard.js +1 -0
  655. package/dist/generated/models/resumeEntry.d.ts +9 -0
  656. package/dist/generated/models/resumeEntry.js +1 -0
  657. package/dist/generated/models/resumeEntryMetadata.d.ts +3 -0
  658. package/dist/generated/models/resumeEntryMetadata.js +1 -0
  659. package/dist/generated/models/resumeEntryStatus.d.ts +5 -0
  660. package/dist/generated/models/resumeEntryStatus.js +4 -0
  661. package/dist/generated/models/routeSuggestions.d.ts +5 -0
  662. package/dist/generated/models/routeSuggestions.js +1 -0
  663. package/dist/generated/models/runAgentInput.d.ts +23 -0
  664. package/dist/generated/models/runAgentInput.js +1 -0
  665. package/dist/generated/models/runResumedMarker.d.ts +4 -0
  666. package/dist/generated/models/runResumedMarker.js +1 -0
  667. package/dist/generated/models/sendServingAssistantMessageRequest.d.ts +7 -0
  668. package/dist/generated/models/sendServingAssistantMessageRequest.js +1 -0
  669. package/dist/generated/models/sendServingAssistantMessageResponse.d.ts +6 -0
  670. package/dist/generated/models/sendServingAssistantMessageResponse.js +1 -0
  671. package/dist/generated/models/servingAgentDispatchResponse.d.ts +11 -0
  672. package/dist/generated/models/servingAgentDispatchResponse.js +1 -0
  673. package/dist/generated/models/servingApprovalDelivery.d.ts +6 -0
  674. package/dist/generated/models/servingApprovalDelivery.js +5 -0
  675. package/dist/generated/models/servingAssistantThreadDetailResponse.d.ts +6 -0
  676. package/dist/generated/models/servingAssistantThreadDetailResponse.js +1 -0
  677. package/dist/generated/models/servingAssistantThreadResponse.d.ts +10 -0
  678. package/dist/generated/models/servingAssistantThreadResponse.js +1 -0
  679. package/dist/generated/models/servingAssistantTurnResponse.d.ts +26 -0
  680. package/dist/generated/models/servingAssistantTurnResponse.js +1 -0
  681. package/dist/generated/models/servingAssistantTurnResponsePendingApprovalDisplays.d.ts +4 -0
  682. package/dist/generated/models/servingAssistantTurnResponsePendingApprovalDisplays.js +1 -0
  683. package/dist/generated/models/servingAttachmentDownloadUrlResponse.d.ts +4 -0
  684. package/dist/generated/models/servingAttachmentDownloadUrlResponse.js +1 -0
  685. package/dist/generated/models/servingAttachmentResponse.d.ts +9 -0
  686. package/dist/generated/models/servingAttachmentResponse.js +1 -0
  687. package/dist/generated/models/servingCoworkerApprovalRequest.d.ts +10 -0
  688. package/dist/generated/models/servingCoworkerApprovalRequest.js +1 -0
  689. package/dist/generated/models/servingCoworkerExecutionRequest.d.ts +10 -0
  690. package/dist/generated/models/servingCoworkerExecutionRequest.js +1 -0
  691. package/dist/generated/models/servingErrorCode.d.ts +33 -0
  692. package/dist/generated/models/servingErrorCode.js +32 -0
  693. package/dist/generated/models/servingStopDelivery.d.ts +6 -0
  694. package/dist/generated/models/servingStopDelivery.js +5 -0
  695. package/dist/generated/models/servingSubscriptionStatus.d.ts +11 -0
  696. package/dist/generated/models/servingSubscriptionStatus.js +1 -0
  697. package/dist/generated/models/servingSubscriptionStatusBounceCause.d.ts +6 -0
  698. package/dist/generated/models/servingSubscriptionStatusBounceCause.js +5 -0
  699. package/dist/generated/models/servingSubscriptionsResponse.d.ts +4 -0
  700. package/dist/generated/models/servingSubscriptionsResponse.js +1 -0
  701. package/dist/generated/models/servingToolResultDelivery.d.ts +7 -0
  702. package/dist/generated/models/servingToolResultDelivery.js +6 -0
  703. package/dist/generated/models/servingToolResultReport.d.ts +9 -0
  704. package/dist/generated/models/servingToolResultReport.js +1 -0
  705. package/dist/generated/models/servingToolResultReportError.d.ts +3 -0
  706. package/dist/generated/models/servingToolResultReportError.js +1 -0
  707. package/dist/generated/models/servingToolResultReportResult.d.ts +3 -0
  708. package/dist/generated/models/servingToolResultReportResult.js +1 -0
  709. package/dist/generated/models/servingTurnApprovalDecision.d.ts +6 -0
  710. package/dist/generated/models/servingTurnApprovalDecision.js +1 -0
  711. package/dist/generated/models/servingTurnAttachmentResponse.d.ts +8 -0
  712. package/dist/generated/models/servingTurnAttachmentResponse.js +1 -0
  713. package/dist/generated/models/siteTheme.d.ts +8 -0
  714. package/dist/generated/models/siteTheme.js +1 -0
  715. package/dist/generated/models/siteThemeDefaultAppearance.d.ts +6 -0
  716. package/dist/generated/models/siteThemeDefaultAppearance.js +5 -0
  717. package/dist/generated/models/steeringFiredAction.d.ts +5 -0
  718. package/dist/generated/models/steeringFiredAction.js +4 -0
  719. package/dist/generated/models/steeringFiredMarker.d.ts +7 -0
  720. package/dist/generated/models/steeringFiredMarker.js +1 -0
  721. package/dist/generated/models/stopServingTurnResponse.d.ts +6 -0
  722. package/dist/generated/models/stopServingTurnResponse.js +1 -0
  723. package/dist/generated/models/subagentResultsDeliveredMarker.d.ts +4 -0
  724. package/dist/generated/models/subagentResultsDeliveredMarker.js +1 -0
  725. package/dist/generated/models/subscriptionCredentialState.d.ts +6 -0
  726. package/dist/generated/models/subscriptionCredentialState.js +5 -0
  727. package/dist/generated/models/subscriptionProvider.d.ts +4 -0
  728. package/dist/generated/models/subscriptionProvider.js +3 -0
  729. package/dist/generated/models/suggestionItem.d.ts +5 -0
  730. package/dist/generated/models/suggestionItem.js +1 -0
  731. package/dist/generated/models/suggestionKind.d.ts +7 -0
  732. package/dist/generated/models/suggestionKind.js +6 -0
  733. package/dist/generated/models/suggestionsConfig.d.ts +6 -0
  734. package/dist/generated/models/suggestionsConfig.js +1 -0
  735. package/dist/generated/models/systemMessage.d.ts +11 -0
  736. package/dist/generated/models/systemMessage.js +1 -0
  737. package/dist/generated/models/systemMessageMetadata.d.ts +3 -0
  738. package/dist/generated/models/systemMessageMetadata.js +1 -0
  739. package/dist/generated/models/textInputContent.d.ts +7 -0
  740. package/dist/generated/models/textInputContent.js +1 -0
  741. package/dist/generated/models/textPart.d.ts +7 -0
  742. package/dist/generated/models/textPart.js +1 -0
  743. package/dist/generated/models/thinkingEffort.d.ts +8 -0
  744. package/dist/generated/models/thinkingEffort.js +7 -0
  745. package/dist/generated/models/threadModelPickResponse.d.ts +5 -0
  746. package/dist/generated/models/threadModelPickResponse.js +1 -0
  747. package/dist/generated/models/tool.d.ts +8 -0
  748. package/dist/generated/models/tool.js +1 -0
  749. package/dist/generated/models/toolCall.d.ts +10 -0
  750. package/dist/generated/models/toolCall.js +1 -0
  751. package/dist/generated/models/toolCallAnnotatedMarker.d.ts +9 -0
  752. package/dist/generated/models/toolCallAnnotatedMarker.js +1 -0
  753. package/dist/generated/models/toolCallAnnotatedMarkerToolInputSchema.d.ts +3 -0
  754. package/dist/generated/models/toolCallAnnotatedMarkerToolInputSchema.js +1 -0
  755. package/dist/generated/models/toolCallAnnotatedMarkerToolOutputSchema.d.ts +3 -0
  756. package/dist/generated/models/toolCallAnnotatedMarkerToolOutputSchema.js +1 -0
  757. package/dist/generated/models/toolCallDisplayPayload.d.ts +9 -0
  758. package/dist/generated/models/toolCallDisplayPayload.js +1 -0
  759. package/dist/generated/models/toolCallMetadata.d.ts +3 -0
  760. package/dist/generated/models/toolCallMetadata.js +1 -0
  761. package/dist/generated/models/toolExecutionRequestPayload.d.ts +8 -0
  762. package/dist/generated/models/toolExecutionRequestPayload.js +1 -0
  763. package/dist/generated/models/toolExecutionRequestPayloadAction.d.ts +3 -0
  764. package/dist/generated/models/toolExecutionRequestPayloadAction.js +1 -0
  765. package/dist/generated/models/toolExecutionRequestPayloadIntent.d.ts +3 -0
  766. package/dist/generated/models/toolExecutionRequestPayloadIntent.js +1 -0
  767. package/dist/generated/models/toolExecutionRequestedMarker.d.ts +8 -0
  768. package/dist/generated/models/toolExecutionRequestedMarker.js +1 -0
  769. package/dist/generated/models/toolMessage.d.ts +17 -0
  770. package/dist/generated/models/toolMessage.js +1 -0
  771. package/dist/generated/models/toolMessageMetadata.d.ts +3 -0
  772. package/dist/generated/models/toolMessageMetadata.js +1 -0
  773. package/dist/generated/models/toolMetadata.d.ts +3 -0
  774. package/dist/generated/models/toolMetadata.js +1 -0
  775. package/dist/generated/models/toolResultRecordedMarker.d.ts +5 -0
  776. package/dist/generated/models/toolResultRecordedMarker.js +1 -0
  777. package/dist/generated/models/toolViewRef.d.ts +4 -0
  778. package/dist/generated/models/toolViewRef.js +1 -0
  779. package/dist/generated/models/turnFailedMarker.d.ts +3 -0
  780. package/dist/generated/models/turnFailedMarker.js +1 -0
  781. package/dist/generated/models/turnStoppedMarker.d.ts +3 -0
  782. package/dist/generated/models/turnStoppedMarker.js +1 -0
  783. package/dist/generated/models/turnUsageRecordedMarker.d.ts +9 -0
  784. package/dist/generated/models/turnUsageRecordedMarker.js +1 -0
  785. package/dist/generated/models/turnVoidedMarker.d.ts +3 -0
  786. package/dist/generated/models/turnVoidedMarker.js +1 -0
  787. package/dist/generated/models/urlSource.d.ts +6 -0
  788. package/dist/generated/models/urlSource.js +1 -0
  789. package/dist/generated/models/userMessage.d.ts +17 -0
  790. package/dist/generated/models/userMessage.js +1 -0
  791. package/dist/generated/models/userMessageMetadata.d.ts +3 -0
  792. package/dist/generated/models/userMessageMetadata.js +1 -0
  793. package/dist/generated/models/videoInputContent.d.ts +10 -0
  794. package/dist/generated/models/videoInputContent.js +1 -0
  795. package/dist/generated/models/videoPart.d.ts +10 -0
  796. package/dist/generated/models/videoPart.js +1 -0
  797. package/dist/generated/models/visitorTier.d.ts +5 -0
  798. package/dist/generated/models/visitorTier.js +4 -0
  799. package/dist/generated/serving.d.ts +38 -0
  800. package/dist/generated/serving.js +265 -0
  801. package/dist/headless.d.ts +40 -0
  802. package/dist/headless.js +10 -0
  803. package/dist/index.d.ts +28 -0
  804. package/dist/index.js +18 -0
  805. package/dist/markdown.d.ts +4 -0
  806. package/dist/markdown.js +4 -0
  807. package/dist/persistence/execution-ledger.d.ts +7 -0
  808. package/dist/persistence/execution-ledger.js +85 -0
  809. package/dist/persistence/panel-mode.d.ts +6 -0
  810. package/dist/persistence/panel-mode.js +49 -0
  811. package/dist/persistence/plan-notice.d.ts +3 -0
  812. package/dist/persistence/plan-notice.js +30 -0
  813. package/dist/persistence/stored-thread.d.ts +12 -0
  814. package/dist/persistence/stored-thread.js +67 -0
  815. package/dist/reader/accessible-name.d.ts +3 -0
  816. package/dist/reader/accessible-name.js +248 -0
  817. package/dist/reader/interactivity.d.ts +11 -0
  818. package/dist/reader/interactivity.js +117 -0
  819. package/dist/reader/layout-probe.d.ts +29 -0
  820. package/dist/reader/layout-probe.js +113 -0
  821. package/dist/reader/line-diff.d.ts +1 -0
  822. package/dist/reader/line-diff.js +147 -0
  823. package/dist/reader/read-page.d.ts +12 -0
  824. package/dist/reader/read-page.js +130 -0
  825. package/dist/reader/redaction.d.ts +3 -0
  826. package/dist/reader/redaction.js +49 -0
  827. package/dist/reader/render.d.ts +3 -0
  828. package/dist/reader/render.js +117 -0
  829. package/dist/reader/roles.d.ts +8 -0
  830. package/dist/reader/roles.js +245 -0
  831. package/dist/reader/snapshot-compaction.d.ts +5 -0
  832. package/dist/reader/snapshot-compaction.js +166 -0
  833. package/dist/reader/snapshot-node.d.ts +4 -0
  834. package/dist/reader/snapshot-node.js +113 -0
  835. package/dist/reader/snapshot-root.d.ts +15 -0
  836. package/dist/reader/snapshot-root.js +85 -0
  837. package/dist/reader/snapshot.d.ts +60 -0
  838. package/dist/reader/snapshot.js +167 -0
  839. package/dist/reader/visibility.d.ts +8 -0
  840. package/dist/reader/visibility.js +105 -0
  841. package/dist/scroll.d.ts +1 -0
  842. package/dist/scroll.js +1 -0
  843. package/dist/styles.css +2 -0
  844. package/dist/transcript-ui.d.ts +15 -0
  845. package/dist/transcript-ui.js +8 -0
  846. package/dist/transcript.d.ts +43 -0
  847. package/dist/transcript.js +38 -0
  848. package/dist/transport/actions-adapter.d.ts +4 -0
  849. package/dist/transport/actions-adapter.js +139 -0
  850. package/dist/transport/door-budget.d.ts +4 -0
  851. package/dist/transport/door-budget.js +51 -0
  852. package/dist/transport/replay-stream-agent.d.ts +24 -0
  853. package/dist/transport/replay-stream-agent.js +100 -0
  854. package/dist/transport/serving-api.d.ts +33 -0
  855. package/dist/transport/serving-api.js +67 -0
  856. package/dist/transport/serving-error.d.ts +15 -0
  857. package/dist/transport/serving-error.js +54 -0
  858. package/dist/transport/serving-fetch.d.ts +11 -0
  859. package/dist/transport/serving-fetch.js +20 -0
  860. package/dist/transport/stream-resume.d.ts +70 -0
  861. package/dist/transport/stream-resume.js +276 -0
  862. package/dist/transport/token-session.d.ts +33 -0
  863. package/dist/transport/token-session.js +203 -0
  864. package/package.json +88 -3
package/LICENSE ADDED
@@ -0,0 +1,105 @@
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-ALv2
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 Teaflask
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,165 @@
1
- # @teaflask/assistant
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/teaflask/assistant/main/images/logo-dark.svg">
4
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/logo.svg" width="56" alt="Teaflask logo">
5
+ </picture>
6
+ <h1>Teaflask Assistant</h1>
7
+ <p>An AI agent that works inside your product, in one component.</p>
8
+ <p>
9
+ <a href="https://docs.teaflask.com/getting-started">Get started</a> ·
10
+ <a href="https://docs.teaflask.com">Docs</a> ·
11
+ <a href="https://app.teaflask.com/">Dashboard</a> ·
12
+ <a href="https://github.com/teaflask/assistant/issues">Issues</a>
13
+ </p>
14
+ <p>
15
+ <a href="https://www.npmjs.com/package/@teaflask/assistant"><img src="https://img.shields.io/npm/v/@teaflask/assistant?color=111" alt="npm version"></a>
16
+ <a href="https://github.com/teaflask/assistant/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@teaflask/assistant?color=111" alt="License: FSL-1.1-ALv2"></a>
17
+ </p>
18
+ </div>
2
19
 
3
- Name reservation. The real package — the teaflask embedded assistant — is coming.
20
+ <table>
21
+ <tr>
22
+ <td width="50%" valign="top">
23
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-widget.png" alt="Corner widget">
24
+ <p align="center"><sub>Corner widget</sub></p>
25
+ </td>
26
+ <td width="50%" valign="top">
27
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-sidebar.png" alt="Sidebar">
28
+ <p align="center"><sub>Sidebar</sub></p>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <td width="50%" valign="top">
33
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-palette.png" alt="⌘K palette">
34
+ <p align="center"><sub>⌘K palette</sub></p>
35
+ </td>
36
+ <td width="50%" valign="top">
37
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/surface-page.png" alt="Full page">
38
+ <p align="center"><sub>Full page</sub></p>
39
+ </td>
40
+ </tr>
41
+ </table>
42
+
43
+ [Teaflask](https://teaflask.com) gives your product an AI agent that understands how it works and gets things done for your users. `@teaflask/assistant` is the part your users see: drop it into your app and Teaflask hosts everything behind it. Your app keeps its own business logic, authentication and permissions.
44
+
45
+ **React**
46
+
47
+ ```tsx
48
+ import "@teaflask/assistant/styles.css";
49
+ import { TeaflaskAssistant } from "@teaflask/assistant";
50
+
51
+ <TeaflaskAssistant publishableKey="pk_live_…" />;
52
+ ```
53
+
54
+ **Any other stack**, with a script tag
55
+
56
+ ```html
57
+ <script
58
+ type="module"
59
+ src="https://app.teaflask.com/assistant/v1/assistant.js"
60
+ ></script>
61
+ <teaflask-assistant publishable-key="pk_live_…"></teaflask-assistant>
62
+ ```
63
+
64
+ ## What your agent can do
65
+
66
+ - **Take actions.** It calls your API on the user's behalf, with the user's own session. You set every action to Allow, Ask or Deny.
67
+ - **Follow your workflows.** Write a procedure once, like how refunds work or when to escalate, and the agent follows it.
68
+ - **Guide users around your app.** It takes people to the right page and highlights what to click.
69
+ - **Fill in forms.** It fills the fields; the user reviews and submits.
70
+ - **Hand off long-running work.** It sends complex, multi-step jobs to background sub-agents and picks up their results.
71
+ - **Answer from your docs.** It answers from the documentation you release, so what it tells users matches your product.
72
+ - **Remember.** It keeps facts across conversations, for your whole organization or for each user.
73
+
74
+ You choose which of these each agent gets. [How Teaflask works →](https://docs.teaflask.com/fundamentals)
75
+
76
+ ## Batteries included
77
+
78
+ Everything you'd otherwise build by hand to put an agent in front of your users:
79
+
80
+ - Real-time streaming that resumes mid-sentence after a dropped connection
81
+ - Durable runs that pick up mid-step after a crash, a deploy, or an approval that takes days
82
+ - Approvals right in the conversation, before an action runs
83
+ - Live progress for actions and sub-agents
84
+ - [Tool views](https://docs.teaflask.com/tool-views): show a result as your own component, like an order card instead of JSON
85
+ - Four [surfaces](https://docs.teaflask.com/surfaces) for one conversation: a corner widget, a sidebar, a ⌘K command palette, and a full-page assistant
86
+ - A polished default design in light and dark, restyled with [theme tokens](https://docs.teaflask.com/appearance) and isolated from your CSS
87
+ - Docs that stay true: every claim checked against your code, and a fix proposed when the code moves
88
+ - [Skills](https://docs.teaflask.com/skills), [memory](https://docs.teaflask.com/memory), and a [sandboxed workspace](https://docs.teaflask.com/workspace) the agent can use
89
+ - The model of your choice, on your own provider key or your user's own plan
90
+ - Conversation history across devices, file attachments, and markdown with code highlighting
91
+ - Anonymous visitors or [signed-in users](https://docs.teaflask.com/identity)
92
+ - Every conversation, action and approval recorded for review
93
+ - Keyboard-complete, screen-reader friendly, and respects reduced motion
94
+ - A React component, a script tag for any other stack, or a headless entry point for your own UI
95
+
96
+ <table>
97
+ <tr>
98
+ <td width="50%" valign="top">
99
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/tool-view.png" alt="Tool views: your own components, right in the conversation">
100
+ <p align="center"><sub>Tool views: your own components, right in the conversation</sub></p>
101
+ </td>
102
+ <td width="50%" valign="top">
103
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/sub-agents.png" alt="Sub-agents work in parallel. Open one to watch it live">
104
+ <p align="center"><sub>Sub-agents work in parallel. Open one to watch it live</sub></p>
105
+ </td>
106
+ </tr>
107
+ <tr>
108
+ <td width="50%" valign="top">
109
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/approval.png" alt="An approval before anything changes">
110
+ <p align="center"><sub>An approval before anything changes</sub></p>
111
+ </td>
112
+ <td width="50%" valign="top">
113
+ <img src="https://raw.githubusercontent.com/teaflask/assistant/main/images/form-fill.png" alt="It fills in your forms and points at what to press">
114
+ <p align="center"><sub>It fills in your forms and points at what to press</sub></p>
115
+ </td>
116
+ </tr>
117
+ </table>
118
+
119
+ ## Getting started
120
+
121
+ You need a Teaflask agent and its publishable key. The [getting started guide](https://docs.teaflask.com/getting-started) takes you from connecting your codebase to a published agent. Then add the assistant to your app, once, in the layout that wraps every page.
122
+
123
+ ### React
124
+
125
+ ```sh
126
+ npm install @teaflask/assistant
127
+ ```
128
+
129
+ ```tsx
130
+ import "@teaflask/assistant/styles.css";
131
+ import { TeaflaskAssistant } from "@teaflask/assistant";
132
+
133
+ <TeaflaskAssistant publishableKey="pk_live_…" />;
134
+ ```
135
+
136
+ ### Any other stack
137
+
138
+ Rails, Django, Laravel, Vue, WordPress or plain HTML: add the script tag before `</body>`. React is bundled inside, so your page doesn't need it.
139
+
140
+ ```html
141
+ <script
142
+ type="module"
143
+ src="https://app.teaflask.com/assistant/v1/assistant.js"
144
+ ></script>
145
+ <teaflask-assistant publishable-key="pk_live_…"></teaflask-assistant>
146
+ ```
147
+
148
+ Next, [connect actions to your API](https://docs.teaflask.com/adapters), [identify signed-in users](https://docs.teaflask.com/identity), and run through the [production checklist](https://docs.teaflask.com/production-checklist).
149
+
150
+ ## Learn more
151
+
152
+ - [How Teaflask works](https://docs.teaflask.com/fundamentals)
153
+ - [How it connects to your app](https://docs.teaflask.com/architecture)
154
+ - [Grounding and control](https://docs.teaflask.com/grounding)
155
+ - [Install](https://docs.teaflask.com/install)
156
+ - [Assistant UI](https://docs.teaflask.com/assistant-ui)
157
+ - [Trust](https://docs.teaflask.com/trust)
158
+
159
+ Requires `react` and `react-dom` 18.3 or 19, and `use-stick-to-bottom` (npm installs peers for you; the script tag needs none of them). The package is pre-1.0: a breaking change bumps the minor version, and the [changelog](https://github.com/teaflask/assistant/blob/main/CHANGELOG.md) lists what changed in every release. You can inspect the published code on [npm](https://www.npmjs.com/package/@teaflask/assistant?activeTab=code) or [unpkg](https://unpkg.com/@teaflask/assistant/).
160
+
161
+ ## License
162
+
163
+ [Functional Source License, Version 1.1, ALv2 Future License](https://github.com/teaflask/assistant/blob/main/LICENSE) (FSL-1.1-ALv2). You can use it in your own product. You can't use it to build a competing product or service. Every release becomes Apache-2.0 two years after it ships.
164
+
165
+ Report security issues to [security@teaflask.com](mailto:security@teaflask.com); see [SECURITY.md](https://github.com/teaflask/assistant/blob/main/SECURITY.md).
@@ -0,0 +1,5 @@
1
+ export { TeaflaskAssistantProvider, type TeaflaskAssistantAnonymousProps, type TeaflaskAssistantIdentityProps, type TeaflaskAssistantProviderBaseProps, type TeaflaskAssistantProviderProps, } from "./components/teaflask-assistant-provider.js";
2
+ export { useAssistantActivity } from "./components/use-assistant-activity.js";
3
+ export type { AssistantActivityResult, AssistantActivitySnapshot, } from "./core/activity.js";
4
+ export type { PendingDecisionGap } from "./core/pending-decision-gap.js";
5
+ export { AssistantCompanion, type AssistantCompanionProps, } from "./components/assistant-companion.js";
@@ -0,0 +1,3 @@
1
+ export { TeaflaskAssistantProvider, } from "./components/teaflask-assistant-provider.js";
2
+ export { useAssistantActivity } from "./components/use-assistant-activity.js";
3
+ export { AssistantCompanion, } from "./components/assistant-companion.js";
@@ -0,0 +1,3 @@
1
+ import type { LayoutProbe } from "../reader/layout-probe.js";
2
+ export declare const HIGHLIGHT_DWELL_MS = 4000;
3
+ export declare function spotlightElement(element: Element, probe: LayoutProbe): void;
@@ -0,0 +1,67 @@
1
+ export const HIGHLIGHT_DWELL_MS = 4_000;
2
+ const FADE_MS = 300;
3
+ const RING_INSET_PX = 4;
4
+ const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
5
+ let _activeSpotlight = null;
6
+ export function spotlightElement(element, probe) {
7
+ _activeSpotlight?.dismiss();
8
+ _scrollIntoViewRespectingMotion(element);
9
+ const ring = _ringElement();
10
+ document.body.appendChild(ring);
11
+ const track = () => {
12
+ _placeRingAround(ring, element, probe);
13
+ };
14
+ track();
15
+ window.addEventListener("scroll", track, { capture: true, passive: true });
16
+ window.addEventListener("resize", track);
17
+ const dismiss = _dismisserOf(ring, track);
18
+ _activeSpotlight = { ring, dismiss };
19
+ window.setTimeout(dismiss, HIGHLIGHT_DWELL_MS);
20
+ }
21
+ function _dismisserOf(ring, track) {
22
+ let dismissed = false;
23
+ return () => {
24
+ if (dismissed) {
25
+ return;
26
+ }
27
+ dismissed = true;
28
+ window.removeEventListener("scroll", track, { capture: true });
29
+ window.removeEventListener("resize", track);
30
+ if (_activeSpotlight?.ring === ring) {
31
+ _activeSpotlight = null;
32
+ }
33
+ ring.dataset.tfHighlightLeaving = "true";
34
+ window.setTimeout(() => {
35
+ ring.remove();
36
+ }, FADE_MS);
37
+ };
38
+ }
39
+ function _ringElement() {
40
+ const ring = document.createElement("div");
41
+ ring.setAttribute("data-tf-assistant", "");
42
+ ring.className = "tf-highlight-ring";
43
+ ring.setAttribute("aria-hidden", "true");
44
+ return ring;
45
+ }
46
+ function _placeRingAround(ring, element, probe) {
47
+ const rect = probe.rectOf(element);
48
+ ring.style.top = `${String(rect.top - RING_INSET_PX)}px`;
49
+ ring.style.left = `${String(rect.left - RING_INSET_PX)}px`;
50
+ ring.style.width = `${String(rect.width + 2 * RING_INSET_PX)}px`;
51
+ ring.style.height = `${String(rect.height + 2 * RING_INSET_PX)}px`;
52
+ }
53
+ function _scrollIntoViewRespectingMotion(element) {
54
+ if (typeof element.scrollIntoView !== "function") {
55
+ return;
56
+ }
57
+ element.scrollIntoView({
58
+ block: "center",
59
+ inline: "nearest",
60
+ behavior: _reducedMotionIsOn() ? "auto" : "smooth",
61
+ });
62
+ }
63
+ function _reducedMotionIsOn() {
64
+ return ((typeof window.matchMedia === "function" &&
65
+ window.matchMedia(REDUCED_MOTION_QUERY).matches) ||
66
+ document.body.closest('[data-reduce-motion="true"]') !== null);
67
+ }
@@ -0,0 +1,14 @@
1
+ export interface PrefillField {
2
+ refId: string;
3
+ value: string;
4
+ }
5
+ interface RefusedFieldReport {
6
+ ref_id: string;
7
+ reason: string;
8
+ }
9
+ export interface PrefillReport {
10
+ filled: string[];
11
+ refused: RefusedFieldReport[];
12
+ }
13
+ export declare function prefilledFieldsReport(fields: PrefillField[]): PrefillReport;
14
+ export {};
@@ -0,0 +1,151 @@
1
+ import { theFieldHoldsASecret } from "../reader/redaction.js";
2
+ import { resolvedElementOfRef } from "../reader/snapshot.js";
3
+ import { isContentEditableElement } from "../reader/roles.js";
4
+ const SECRET_FIELD_REASON = "This field holds a secret (a password or payment detail) — the user " +
5
+ "must type it themselves.";
6
+ const FILE_FIELD_REASON = "File pickers cannot be filled by the assistant — the user must choose " +
7
+ "the file themselves.";
8
+ const INERT_FIELD_REASON = "This field is disabled or read-only and cannot take a value right now.";
9
+ const NOT_FILLABLE_REASON = "This element is not a fillable form field — take a fresh read and " +
10
+ "pick a textbox, dropdown, checkbox, or editor ref.";
11
+ const CHECKBOX_VALUE_REASON = 'A checkbox takes "true" or "false", nothing else.';
12
+ const RADIO_VALUE_REASON = 'A radio button can only be selected — pass "true" on the option to ' +
13
+ "select instead.";
14
+ const NO_MATCHING_OPTION_REASON = "No option in this dropdown matches that value — read the page to see " +
15
+ "the options it offers.";
16
+ const VALUE_DID_NOT_LAND_REASON = "The page's own scripts rejected this value — it did not stay in the " +
17
+ "field.";
18
+ const EDITOR_UNAVAILABLE_REASON = "This editor cannot be filled on this page — tell the user what to " +
19
+ "type instead.";
20
+ export function prefilledFieldsReport(fields) {
21
+ const report = { filled: [], refused: [] };
22
+ for (const field of fields) {
23
+ const refusal = _filledFieldRefusalOf(field);
24
+ if (refusal === null) {
25
+ report.filled.push(field.refId);
26
+ }
27
+ else {
28
+ report.refused.push({ ref_id: field.refId, reason: refusal });
29
+ }
30
+ }
31
+ return report;
32
+ }
33
+ function _filledFieldRefusalOf(field) {
34
+ const resolved = resolvedElementOfRef(field.refId);
35
+ if (resolved.error !== null) {
36
+ return resolved.error;
37
+ }
38
+ const element = resolved.element;
39
+ if (element instanceof HTMLInputElement) {
40
+ return _inputRefusalOf(element, field.value);
41
+ }
42
+ if (element instanceof HTMLTextAreaElement) {
43
+ return _textAreaRefusalOf(element, field.value);
44
+ }
45
+ if (element instanceof HTMLSelectElement) {
46
+ return _selectRefusalOf(element, field.value);
47
+ }
48
+ if (isContentEditableElement(element)) {
49
+ return _editorRefusalOf(element, field.value);
50
+ }
51
+ return NOT_FILLABLE_REASON;
52
+ }
53
+ const _NOT_A_FIELD_INPUT_TYPES = new Set([
54
+ "hidden",
55
+ "submit",
56
+ "button",
57
+ "reset",
58
+ "image",
59
+ ]);
60
+ function _inputRefusalOf(input, value) {
61
+ if (input.type === "password" || theFieldHoldsASecret(input)) {
62
+ return SECRET_FIELD_REASON;
63
+ }
64
+ if (input.type === "file") {
65
+ return FILE_FIELD_REASON;
66
+ }
67
+ if (_NOT_A_FIELD_INPUT_TYPES.has(input.type)) {
68
+ return NOT_FILLABLE_REASON;
69
+ }
70
+ if (input.disabled || input.readOnly) {
71
+ return INERT_FIELD_REASON;
72
+ }
73
+ if (input.type === "checkbox" || input.type === "radio") {
74
+ return _checkedRefusalOf(input, value);
75
+ }
76
+ _setThroughThePrototype(input, value);
77
+ _announceTheEdit(input);
78
+ return input.value === value ? null : VALUE_DID_NOT_LAND_REASON;
79
+ }
80
+ function _checkedRefusalOf(input, value) {
81
+ if (value !== "true" && value !== "false") {
82
+ return CHECKBOX_VALUE_REASON;
83
+ }
84
+ if (input.type === "radio" && value === "false") {
85
+ return RADIO_VALUE_REASON;
86
+ }
87
+ const desired = value === "true";
88
+ if (input.checked !== desired) {
89
+ input.click();
90
+ }
91
+ return input.checked === desired ? null : VALUE_DID_NOT_LAND_REASON;
92
+ }
93
+ function _textAreaRefusalOf(textArea, value) {
94
+ if (theFieldHoldsASecret(textArea)) {
95
+ return SECRET_FIELD_REASON;
96
+ }
97
+ if (textArea.disabled || textArea.readOnly) {
98
+ return INERT_FIELD_REASON;
99
+ }
100
+ _setThroughThePrototype(textArea, value);
101
+ _announceTheEdit(textArea);
102
+ return textArea.value === value ? null : VALUE_DID_NOT_LAND_REASON;
103
+ }
104
+ function _selectRefusalOf(select, value) {
105
+ if (select.disabled) {
106
+ return INERT_FIELD_REASON;
107
+ }
108
+ const option = _optionMatching(select, value);
109
+ if (option === null) {
110
+ return NO_MATCHING_OPTION_REASON;
111
+ }
112
+ _setThroughThePrototype(select, option.value);
113
+ _announceTheEdit(select);
114
+ return select.value === option.value ? null : VALUE_DID_NOT_LAND_REASON;
115
+ }
116
+ function _optionMatching(select, value) {
117
+ const options = Array.from(select.options);
118
+ return (options.find((option) => option.value === value) ??
119
+ options.find((option) => option.label.trim() === value.trim()) ??
120
+ null);
121
+ }
122
+ function _editorRefusalOf(element, value) {
123
+ if (!(element instanceof HTMLElement)) {
124
+ return EDITOR_UNAVAILABLE_REASON;
125
+ }
126
+ if (typeof document.execCommand !== "function") {
127
+ return EDITOR_UNAVAILABLE_REASON;
128
+ }
129
+ element.focus();
130
+ const selection = window.getSelection();
131
+ if (selection === null) {
132
+ return EDITOR_UNAVAILABLE_REASON;
133
+ }
134
+ selection.selectAllChildren(element);
135
+ document.execCommand("insertText", false, value);
136
+ const landed = element.textContent.includes(value);
137
+ return landed ? null : VALUE_DID_NOT_LAND_REASON;
138
+ }
139
+ function _setThroughThePrototype(control, value) {
140
+ const descriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(control), "value");
141
+ if (descriptor?.set !== undefined) {
142
+ descriptor.set.call(control, value);
143
+ }
144
+ else {
145
+ control.value = value;
146
+ }
147
+ }
148
+ function _announceTheEdit(control) {
149
+ control.dispatchEvent(new Event("input", { bubbles: true }));
150
+ control.dispatchEvent(new Event("change", { bubbles: true }));
151
+ }
@@ -0,0 +1,31 @@
1
+ export type AssistantThemeMode = "light" | "dark" | "auto";
2
+ export interface AssistantThemeTokens {
3
+ background?: string;
4
+ foreground?: string;
5
+ card?: string;
6
+ cardForeground?: string;
7
+ popover?: string;
8
+ popoverForeground?: string;
9
+ primary?: string;
10
+ primaryForeground?: string;
11
+ secondary?: string;
12
+ secondaryForeground?: string;
13
+ muted?: string;
14
+ mutedForeground?: string;
15
+ accent?: string;
16
+ accentForeground?: string;
17
+ destructive?: string;
18
+ border?: string;
19
+ input?: string;
20
+ ring?: string;
21
+ radius?: string | number;
22
+ fontSans?: string;
23
+ colorScheme?: string;
24
+ }
25
+ export type AssistantThemeDarkTokens = Omit<AssistantThemeTokens, "radius" | "fontSans" | "colorScheme">;
26
+ export interface AssistantTheme extends AssistantThemeTokens {
27
+ dark?: AssistantThemeDarkTokens;
28
+ }
29
+ export declare const THEME_TOKEN_KEYS: readonly (keyof AssistantThemeTokens)[];
30
+ export declare const DARK_THEME_TOKEN_KEYS: readonly (keyof AssistantThemeDarkTokens)[];
31
+ export declare function themeToStyleVars(theme: AssistantTheme): Record<string, string>;
@@ -0,0 +1,46 @@
1
+ export const THEME_TOKEN_KEYS = [
2
+ "background",
3
+ "foreground",
4
+ "card",
5
+ "cardForeground",
6
+ "popover",
7
+ "popoverForeground",
8
+ "primary",
9
+ "primaryForeground",
10
+ "secondary",
11
+ "secondaryForeground",
12
+ "muted",
13
+ "mutedForeground",
14
+ "accent",
15
+ "accentForeground",
16
+ "destructive",
17
+ "border",
18
+ "input",
19
+ "ring",
20
+ "radius",
21
+ "fontSans",
22
+ "colorScheme",
23
+ ];
24
+ export const DARK_THEME_TOKEN_KEYS = THEME_TOKEN_KEYS.filter((key) => key !== "radius" && key !== "fontSans" && key !== "colorScheme");
25
+ export function themeToStyleVars(theme) {
26
+ const vars = {};
27
+ for (const key of THEME_TOKEN_KEYS) {
28
+ const value = theme[key];
29
+ if (value !== undefined) {
30
+ vars[`--tf-${_cssNameOf(key)}`] = _cssValueOf(value);
31
+ }
32
+ }
33
+ for (const key of DARK_THEME_TOKEN_KEYS) {
34
+ const value = theme.dark?.[key];
35
+ if (value !== undefined) {
36
+ vars[`--_tf-dark-${_cssNameOf(key)}`] = _cssValueOf(value);
37
+ }
38
+ }
39
+ return vars;
40
+ }
41
+ function _cssNameOf(key) {
42
+ return key.replace(/[A-Z]/g, (upper) => `-${upper.toLowerCase()}`);
43
+ }
44
+ function _cssValueOf(value) {
45
+ return typeof value === "number" ? `${String(value)}px` : value;
46
+ }
@@ -0,0 +1,12 @@
1
+ import type { ApprovalCardModel } from "../core/approval-inbox.js";
2
+ import { type RunFoldRow } from "../core/run-folds.js";
3
+ import type { ToolRowSlot } from "./message-list-slots.js";
4
+ export declare function ActivityRail({ fold, cards, turnLive, inCurrentTurn, identityToken, decisionSurfacesInShelf, toolRow, }: {
5
+ fold: RunFoldRow;
6
+ cards: readonly ApprovalCardModel[];
7
+ turnLive: boolean;
8
+ inCurrentTurn: boolean;
9
+ identityToken: string;
10
+ decisionSurfacesInShelf: boolean;
11
+ toolRow?: ToolRowSlot;
12
+ }): import("react").JSX.Element;