@agent-native/core 0.98.0 → 0.98.1

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 (243) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +24 -0
  3. package/corpus/core/package.json +2 -2
  4. package/corpus/core/src/action-change-marker.ts +8 -1
  5. package/corpus/core/src/changelog/parse.ts +8 -3
  6. package/corpus/core/src/client/AgentPanel.tsx +2 -3
  7. package/corpus/core/src/client/AssistantChat.tsx +83 -39
  8. package/corpus/core/src/client/analytics.ts +29 -0
  9. package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +16 -2
  10. package/corpus/core/src/client/chat-model-groups.ts +28 -0
  11. package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +442 -85
  12. package/corpus/core/src/client/composer/TiptapComposer.tsx +46 -29
  13. package/corpus/core/src/client/composer/VoiceButton.tsx +2 -1
  14. package/corpus/core/src/client/composer/index.ts +5 -0
  15. package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +1206 -67
  16. package/corpus/core/src/client/index.ts +5 -0
  17. package/corpus/core/src/client/progress/RunsTray.tsx +13 -1
  18. package/corpus/core/src/client/settings/SecretsSection.tsx +387 -266
  19. package/corpus/core/src/client/settings/SettingsPanel.tsx +117 -38
  20. package/corpus/core/src/client/use-action.ts +12 -0
  21. package/corpus/core/src/client/use-agent-chat-home-handoff.ts +8 -1
  22. package/corpus/core/src/client/use-agent-engine-configured.ts +17 -3
  23. package/corpus/core/src/client/use-db-sync.ts +84 -34
  24. package/corpus/core/src/client/use-pausing-interval.ts +14 -4
  25. package/corpus/core/src/integrations/scope-store.ts +1 -1
  26. package/corpus/core/src/integrations/usage-budget-store.ts +1 -1
  27. package/corpus/core/src/localization/default-messages.ts +44 -1
  28. package/corpus/core/src/mcp-client/workspace-servers.ts +4 -4
  29. package/corpus/core/src/secrets/crypto.ts +28 -8
  30. package/corpus/core/src/server/action-change.ts +5 -1
  31. package/corpus/core/src/server/action-routes.ts +8 -0
  32. package/corpus/core/src/server/poll.ts +1 -0
  33. package/corpus/core/src/server/realtime-voice.ts +299 -13
  34. package/corpus/core/src/styles/agent-native.css +2 -2
  35. package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  36. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  37. package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  38. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
  39. package/corpus/core/src/vite/client.ts +9 -1
  40. package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +2 -2
  41. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +10 -5
  42. package/corpus/templates/analytics/AGENTS.md +9 -13
  43. package/corpus/templates/analytics/actions/navigate.ts +59 -5
  44. package/corpus/templates/analytics/actions/view-screen.ts +3 -6
  45. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +20 -3
  46. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
  47. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
  48. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +21 -6
  49. package/corpus/templates/analytics/app/global.css +19 -20
  50. package/corpus/templates/analytics/app/lib/provider-corpus-job-sync.ts +26 -0
  51. package/corpus/templates/analytics/app/pages/Settings.tsx +35 -341
  52. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +38 -7
  53. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +1 -1
  54. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +3 -0
  55. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +333 -272
  56. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +72 -17
  57. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +297 -108
  58. package/corpus/templates/analytics/app/root.tsx +28 -8
  59. package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +2 -1
  60. package/corpus/templates/analytics/changelog/2026-06-25-referrer-dashboard-panels-show-external-domains.md +2 -1
  61. package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +1 -0
  62. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +1 -0
  63. package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +1 -0
  64. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +1 -0
  65. package/corpus/templates/analytics/changelog/2026-07-11-analytics-no-longer-repeatedly-restarts-background-requests-.md +6 -0
  66. package/corpus/templates/analytics/changelog/2026-07-11-analytics-only-asks-for-replay-storage-when-you-enable-sessi.md +6 -0
  67. package/corpus/templates/analytics/changelog/2026-07-11-charts-now-show-their-loading-skeleton-while-refreshing.md +6 -0
  68. package/corpus/templates/analytics/changelog/2026-07-11-realtime-voice-now-shows-a-clear-connection-indicator-comple.md +6 -0
  69. package/corpus/templates/analytics/changelog/2026-07-11-replay-event-counts-stay-hidden-until-recordings-finish-load.md +6 -0
  70. package/corpus/templates/analytics/changelog/2026-07-11-replay-storage-key-mismatches-show-actionable-setup-guidance.md +6 -0
  71. package/corpus/templates/analytics/changelog/2026-07-11-replay-timelines-group-continuous-scrolling-and-dev-tools-co.md +6 -0
  72. package/corpus/templates/analytics/changelog/2026-07-11-session-filters-now-stay-compact-in-a-settings-menu-at-mediu.md +6 -0
  73. package/corpus/templates/analytics/changelog/2026-07-11-session-replay-console-errors-now-link-to-matching-issues-or.md +6 -0
  74. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-load-large-recordings-faster-and-surface-fai.md +6 -0
  75. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-preserve-recorded-styles-and-viewport-layout.md +6 -0
  76. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-stay-centered-instead-of-clipping-wide-recor.md +6 -0
  77. package/corpus/templates/analytics/package.json +1 -1
  78. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -303
  79. package/corpus/templates/analytics/server/handlers/session-replay.ts +57 -0
  80. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
  81. package/corpus/templates/analytics/server/lib/demo-dashboards.ts +16 -3
  82. package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +12 -0
  83. package/corpus/templates/analytics/server/lib/session-replay.ts +208 -2
  84. package/corpus/templates/analytics/server/plugins/onboarding.ts +7 -79
  85. package/corpus/templates/analytics/server/routes/api/session-replay/recordings/[recordingId]/chunks.get.ts +1 -0
  86. package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +2 -2
  87. package/corpus/templates/assets/app/global.css +4 -4
  88. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +0 -1
  89. package/corpus/templates/assets/app/routes/library.tsx +0 -1
  90. package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +2 -2
  91. package/corpus/templates/brain/app/global.css +5 -5
  92. package/corpus/templates/brain/app/root.tsx +0 -3
  93. package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +2 -2
  94. package/corpus/templates/calendar/app/root.tsx +1 -0
  95. package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +2 -2
  96. package/corpus/templates/clips/app/hooks/use-auto-title.ts +74 -8
  97. package/corpus/templates/clips/app/hooks/use-library.ts +12 -25
  98. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +20 -22
  99. package/corpus/templates/clips/changelog/2026-07-11-generated-titles-no-longer-cause-continuous-background-refreshes.md +6 -0
  100. package/corpus/templates/clips/changelog/2026-07-11-s3-storage-setup-stays-collapsed-until-you-choose-it-as-the-.md +6 -0
  101. package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +2 -2
  102. package/corpus/templates/content/app/hooks/use-comments.ts +0 -1
  103. package/corpus/templates/content/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
  104. package/corpus/templates/design/app/components/layout/Header.tsx +1 -1
  105. package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +2 -2
  106. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -2
  107. package/corpus/templates/macros/app/root.tsx +0 -3
  108. package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +2 -2
  109. package/corpus/templates/mail/app/hooks/use-compose-state.ts +1 -0
  110. package/corpus/templates/mail/app/root.tsx +1 -12
  111. package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +2 -2
  112. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -2
  113. package/corpus/templates/plan/app/hooks/use-plans.ts +6 -13
  114. package/corpus/templates/plan/app/pages/PlansPage.tsx +5 -27
  115. package/corpus/templates/plan/changelog/2026-07-11-plan-refreshes-only-when-content-changes.md +6 -0
  116. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +4 -1
  117. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -1
  118. package/corpus/templates/slides/app/components/layout/Header.tsx +1 -1
  119. package/corpus/templates/slides/app/context/DeckContext.tsx +1 -0
  120. package/corpus/templates/slides/app/hooks/use-slide-comments.ts +7 -31
  121. package/corpus/templates/slides/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
  122. package/dist/action-change-marker.d.ts +1 -0
  123. package/dist/action-change-marker.d.ts.map +1 -1
  124. package/dist/action-change-marker.js +7 -1
  125. package/dist/action-change-marker.js.map +1 -1
  126. package/dist/changelog/parse.d.ts +4 -2
  127. package/dist/changelog/parse.d.ts.map +1 -1
  128. package/dist/changelog/parse.js +5 -3
  129. package/dist/changelog/parse.js.map +1 -1
  130. package/dist/client/AgentPanel.d.ts.map +1 -1
  131. package/dist/client/AgentPanel.js +2 -3
  132. package/dist/client/AgentPanel.js.map +1 -1
  133. package/dist/client/AssistantChat.d.ts +7 -0
  134. package/dist/client/AssistantChat.d.ts.map +1 -1
  135. package/dist/client/AssistantChat.js +62 -40
  136. package/dist/client/AssistantChat.js.map +1 -1
  137. package/dist/client/analytics.d.ts.map +1 -1
  138. package/dist/client/analytics.js +26 -0
  139. package/dist/client/analytics.js.map +1 -1
  140. package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
  141. package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
  142. package/dist/client/blocks/library/wireframe-kit.js +9 -2
  143. package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
  144. package/dist/client/chat-model-groups.d.ts.map +1 -1
  145. package/dist/client/chat-model-groups.js +24 -0
  146. package/dist/client/chat-model-groups.js.map +1 -1
  147. package/dist/client/composer/RealtimeVoiceMode.d.ts +40 -4
  148. package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
  149. package/dist/client/composer/RealtimeVoiceMode.js +172 -42
  150. package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
  151. package/dist/client/composer/TiptapComposer.d.ts +4 -0
  152. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  153. package/dist/client/composer/TiptapComposer.js +47 -29
  154. package/dist/client/composer/TiptapComposer.js.map +1 -1
  155. package/dist/client/composer/VoiceButton.d.ts.map +1 -1
  156. package/dist/client/composer/VoiceButton.js +2 -2
  157. package/dist/client/composer/VoiceButton.js.map +1 -1
  158. package/dist/client/composer/index.d.ts +2 -2
  159. package/dist/client/composer/index.d.ts.map +1 -1
  160. package/dist/client/composer/index.js +1 -1
  161. package/dist/client/composer/index.js.map +1 -1
  162. package/dist/client/composer/useRealtimeVoiceMode.d.ts +100 -3
  163. package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
  164. package/dist/client/composer/useRealtimeVoiceMode.js +952 -51
  165. package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
  166. package/dist/client/index.d.ts +1 -1
  167. package/dist/client/index.d.ts.map +1 -1
  168. package/dist/client/index.js +1 -1
  169. package/dist/client/index.js.map +1 -1
  170. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  171. package/dist/client/progress/RunsTray.js +10 -1
  172. package/dist/client/progress/RunsTray.js.map +1 -1
  173. package/dist/client/settings/SecretsSection.d.ts +2 -3
  174. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  175. package/dist/client/settings/SecretsSection.js +46 -22
  176. package/dist/client/settings/SecretsSection.js.map +1 -1
  177. package/dist/client/settings/SettingsPanel.d.ts +9 -0
  178. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  179. package/dist/client/settings/SettingsPanel.js +46 -12
  180. package/dist/client/settings/SettingsPanel.js.map +1 -1
  181. package/dist/client/use-action.d.ts +2 -0
  182. package/dist/client/use-action.d.ts.map +1 -1
  183. package/dist/client/use-action.js +10 -0
  184. package/dist/client/use-action.js.map +1 -1
  185. package/dist/client/use-agent-chat-home-handoff.d.ts +2 -0
  186. package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
  187. package/dist/client/use-agent-chat-home-handoff.js +7 -1
  188. package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
  189. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  190. package/dist/client/use-agent-engine-configured.js +17 -3
  191. package/dist/client/use-agent-engine-configured.js.map +1 -1
  192. package/dist/client/use-db-sync.d.ts +8 -2
  193. package/dist/client/use-db-sync.d.ts.map +1 -1
  194. package/dist/client/use-db-sync.js +57 -32
  195. package/dist/client/use-db-sync.js.map +1 -1
  196. package/dist/client/use-pausing-interval.d.ts.map +1 -1
  197. package/dist/client/use-pausing-interval.js +16 -4
  198. package/dist/client/use-pausing-interval.js.map +1 -1
  199. package/dist/integrations/scope-store.js +1 -1
  200. package/dist/integrations/scope-store.js.map +1 -1
  201. package/dist/integrations/usage-budget-store.js +1 -1
  202. package/dist/integrations/usage-budget-store.js.map +1 -1
  203. package/dist/localization/default-messages.d.ts +41 -1
  204. package/dist/localization/default-messages.d.ts.map +1 -1
  205. package/dist/localization/default-messages.js +41 -1
  206. package/dist/localization/default-messages.js.map +1 -1
  207. package/dist/mcp-client/workspace-servers.js +4 -4
  208. package/dist/mcp-client/workspace-servers.js.map +1 -1
  209. package/dist/observability/routes.d.ts +5 -5
  210. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  211. package/dist/secrets/crypto.d.ts +7 -6
  212. package/dist/secrets/crypto.d.ts.map +1 -1
  213. package/dist/secrets/crypto.js +30 -11
  214. package/dist/secrets/crypto.js.map +1 -1
  215. package/dist/secrets/routes.d.ts +9 -9
  216. package/dist/server/action-change.d.ts +1 -0
  217. package/dist/server/action-change.d.ts.map +1 -1
  218. package/dist/server/action-change.js +4 -1
  219. package/dist/server/action-change.js.map +1 -1
  220. package/dist/server/action-routes.d.ts.map +1 -1
  221. package/dist/server/action-routes.js +5 -0
  222. package/dist/server/action-routes.js.map +1 -1
  223. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  224. package/dist/server/poll.d.ts.map +1 -1
  225. package/dist/server/poll.js +1 -0
  226. package/dist/server/poll.js.map +1 -1
  227. package/dist/server/realtime-voice.d.ts +7 -0
  228. package/dist/server/realtime-voice.d.ts.map +1 -1
  229. package/dist/server/realtime-voice.js +222 -12
  230. package/dist/server/realtime-voice.js.map +1 -1
  231. package/dist/styles/agent-native.css +2 -2
  232. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  233. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  234. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  235. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
  236. package/dist/vite/client.d.ts.map +1 -1
  237. package/dist/vite/client.js +6 -1
  238. package/dist/vite/client.js.map +1 -1
  239. package/package.json +2 -2
  240. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  241. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  242. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  243. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,yBAAyB,EAAE,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,4BAA4B,EAC5B,oBAAoB,EACpB,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GAgBd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,+BAA+B,GAIhC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,mBAAmB,GAEpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GAGpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,GAO3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,+BAA+B,EAC/B,iBAAiB,EACjB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL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AAsC,CAAC;AAC9C,OAAO,EACL,oBAAoB,GAErB,MAAM,sCAAsC,CAAC;AAC9C,iDAAiD;AACjD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,GAKnB,MAAM,2BAA2B,CAAC;AACnC,qBAAqB;AACrB,OAAO,EACL,aAAa,EACb,cAAc,EACd,2BAA2B,GAU5B,MAAM,mBAAmB,CAAC;AAC3B,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,8EAA8E;AAC9E,wEAAwE;AACxE,OAAO,EACL,WAAW,EACX,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,GAgB/B,MAAM,mBAAmB,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\n\ninstallRouteChunkRecovery();\n\nexport { getBrowserTabId } from \"./browser-tab-id.js\";\n\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n insertAgentComposerReference,\n listAgentChatContext,\n normalizeAgentComposerReference,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n requestAgentChatThreadOpen,\n requestAgentTaskOpen,\n sendToAgentChat,\n sendToAgentChatAndConfirm,\n reportAgentChatSubmitResult,\n AGENT_CHAT_SUBMIT_RESULT_EVENT,\n parseSubmitChatMessage,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type ParsedSubmitChat,\n type AgentChatOpenTaskRequest,\n type AgentChatOpenThreadRequest,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n type AgentChatSubmitResult,\n type SendToAgentChatAndConfirmResult,\n type AgentComposerReference,\n type AgentComposerReferenceInsertOptions,\n type AgentComposerReferenceInsertPayload,\n} from \"./agent-chat.js\";\nexport {\n saveAgentEngineApiKey,\n saveAgentEngineProviderSettings,\n type AgentEngineProvider,\n type SaveAgentEngineApiKeyOptions,\n type SaveAgentEngineProviderSettingsOptions,\n} from \"./agent-engine-key.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"./use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n deleteClientAppState,\n readClientAppState,\n setClientAppState,\n writeClientAppState,\n type ClientAppStateReadOptions,\n type ClientAppStateWriteOptions,\n} from \"./application-state.js\";\nexport {\n useAgentRouteState,\n useSemanticNavigationState,\n type AgentRouteLocation,\n type SemanticNavigationCommandEnvelope,\n type UseAgentRouteStateOptions,\n type UseAgentRouteStateResult,\n type UseSemanticNavigationStateOptions,\n type UseSemanticNavigationStateResult,\n} from \"./route-state.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n codeAgentTranscriptHasPendingApproval,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport {\n CREDENTIAL_GAP_SIGNAL,\n isCredentialGapCodeAgentEvent,\n} from \"../code-agents/transcript-normalizer.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n useAgentEngineConfigured,\n type AgentEngineConfiguredState,\n type UseAgentEngineConfiguredResult,\n} from \"./use-agent-engine-configured.js\";\nexport { BuilderSetupCard } from \"./chat/run-recovery.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n VisualControlRow,\n VisualColorPicker,\n VisualInspectorPanel,\n VisualInspectorSection,\n VisualScrubInput,\n VisualSegmentedControl,\n VisualSliderControl,\n VisualSwatchControl,\n VisualToggleControl,\n VisualTweakControl,\n type VisualControlOption,\n type VisualControlValue,\n type VisualTweakDefinition,\n} from \"./visual-style-controls.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport {\n AgentNativeI18nProvider,\n LanguagePicker,\n getLocaleInitScript,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n useFormatters,\n useLocale,\n useT,\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n type AgentNativeI18nCatalog,\n type AgentNativeI18nProviderProps,\n type LocaleCode,\n type LocaleHydrationPayload,\n type LocaleMessages,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"./i18n.js\";\nexport {\n // Shared editor core (Phase 1): the ONE configurable surface both the plan\n // and content editors build on.\n SharedRichEditor,\n createSharedEditorExtensions,\n MARKDOWN_DIALECT_CONFIG,\n useCollabReconcile,\n RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION,\n getEditorMarkdown,\n SlashCommandMenu,\n DEFAULT_SLASH_COMMANDS,\n createImageSlashCommand,\n // Shared block-level image node + injectable upload contract. Plans opt in\n // via `features.image` + `onImageUpload`; Content keeps its own image block.\n SharedImage,\n createImageExtension,\n pickAndInsertImage,\n uploadEditorImage,\n BubbleToolbar,\n buildDefaultBubbleItems,\n // Back-compat alias + factory kept for existing embedders and specs.\n RichMarkdownEditor,\n createRichMarkdownExtensions,\n // Single-doc plan editor primitives: the GFM↔ProseMirror serializer, the\n // run-id prose attribute, and the shared drag-handle (block grip + reorder).\n RunId,\n RUN_ID_NODE_TYPES,\n gfmToProseJSON,\n proseJSONToGfm,\n DragHandle,\n DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR,\n // Generic registry-block Tiptap NodeView + side-map provider + dedupe plugin.\n // Hosts mount the node from `createRegistryBlockNode` as an extra extension\n // and wrap the editor in `RegistryBlockDataProvider`.\n createRegistryBlockNode,\n RegistryBlockNodeView,\n RegistryBlockDataProvider,\n useRegistryBlockData,\n // Shared registry-derived block slash-command builder (plan + content adapt it).\n buildRegistryBlockSlashItems,\n getRegistryBlockSlashDescription,\n getRegistryBlockSlashSearchText,\n type BuildRegistryBlockSlashItemsOptions,\n type DragHandleDropContext,\n type DragHandleDropPlacement,\n type DragHandleOptions,\n type CreateRegistryBlockNodeOptions,\n type RegistryBlockDataValue,\n type RegistryBlockSideMapBlock,\n type SharedRichEditorProps,\n type SharedEditorCollab,\n type SharedEditorFeatures,\n type CreateSharedEditorExtensionsOptions,\n type UseCollabReconcileOptions,\n type UseCollabReconcileResult,\n type SlashCommandItem,\n type SlashCommandMenuProps,\n type ImageUploadFn,\n type SharedImageOptions,\n type BubbleToolbarItem,\n type BubbleToolbarProps,\n type RichMarkdownDialect,\n type RichMarkdownEditorPreset,\n type RichMarkdownEditorProps,\n type RichMarkdownCollabUser,\n type CreateRichMarkdownExtensionsOptions,\n} from \"./rich-markdown-editor/index.js\";\n// ProseMirror node JSON shape — re-exported so the plan template (which has no\n// direct @tiptap dep) can type its doc↔blocks serializer.\nexport type { JSONContent } from \"@tiptap/core\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n RequireSession,\n buildSignInReturnHref,\n type RequireSessionProps,\n} from \"./require-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeRouteWarmup,\n type AgentNativeRouteWarmupProps,\n} from \"./route-warmup.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n type AssistantChatAdapterContext,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n KeepTabOpenNotice,\n type KeepTabOpenNoticeProps,\n} from \"./KeepTabOpenNotice.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport {\n createAgentChatAdapter,\n type AgentChatSurfaceKind,\n type CreateAgentChatAdapterOptions,\n} from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n RealtimeVoiceModeBoundary,\n RealtimeVoiceModeProvider,\n RealtimeVoiceModeDock,\n RealtimeVoiceModeEntry,\n TiptapComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n createRealtimeVoiceSession,\n executeRealtimeVoiceTool,\n extractRealtimeVoiceFunctionCalls,\n readRealtimeVoiceContext,\n useRealtimeVoiceMode,\n useRealtimeVoiceModeCopy,\n useRealtimeVoiceModeOptional,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type RealtimeVoiceModeCopy,\n type RealtimeVoiceModeDockProps,\n type RealtimeVoiceModeEntryProps,\n type RealtimeVoiceModeState,\n type RealtimeVoiceModeApi,\n type RealtimeVoiceModeProviderProps,\n type RealtimeVoiceToolResult,\n type ComposerSubmitIntent,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n type TiptapComposerHandle,\n type TiptapComposerProps,\n type TiptapComposerSubmitOptions,\n} from \"./composer/index.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n askUserQuestion,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type AskUserQuestionInput,\n type AskUserQuestionOption,\n type AskUserQuestionResult,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSnapshot,\n type ChatThreadSummary,\n type ChatThreadData,\n type ChatThreadShareLink,\n type ChatThreadShareState,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n ChatHistoryList,\n type ChatHistoryItem,\n type ChatHistorySection,\n type ChatHistoryListProps,\n} from \"./chat/ChatHistoryList.js\";\nexport { AgentChatHome, type AgentChatHomeProps } from \"./AgentChatHome.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n AGENT_CHAT_HOME_HANDOFF_TTL_MS,\n AGENT_CHAT_VIEW_TRANSITION_CLASS,\n AGENT_CHAT_VIEW_TRANSITION_NAME,\n consumeAgentChatHomeHandoff,\n getAgentChatViewTransitionStyle,\n isAgentChatHomeHandoffActive,\n markAgentChatHomeHandoff,\n navigateWithAgentChatViewTransition,\n startAgentChatViewTransition,\n supportsAgentChatViewTransition,\n type AgentChatHomeHandoffOptions,\n type AgentChatViewTransition,\n type AgentChatViewTransitionOptions,\n} from \"./chat-view-transition.js\";\nexport {\n useAgentChatHomeHandoff,\n useAgentChatHomeHandoffLinks,\n type UseAgentChatHomeHandoffLinksOptions,\n type UseAgentChatHomeHandoffOptions,\n} from \"./use-agent-chat-home-handoff.js\";\nexport {\n requestAgentSidebarOpen,\n SIDEBAR_STATE_CHANGE_EVENT,\n setAgentSidebarOpenPreference,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport {\n clearReservedToolRenderersForTests,\n clearToolRenderersForTests,\n registerActionChatRenderer,\n registerFallbackToolRenderer,\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n registerReservedToolRenderer,\n registerToolRenderer,\n resolveToolRenderer,\n type ActionChatRendererRegistration,\n type ToolRendererComponent,\n type ToolRendererContext,\n type ToolRendererMatch,\n type ToolRendererProps,\n type ToolRendererRegistration,\n} from \"./chat/tool-render-registry.js\";\nexport * from \"./chat/connectors.js\";\nexport * from \"./chat/runtime.js\";\nexport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n type ActionChatUIConfig,\n} from \"../action-ui.js\";\nexport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n createDataChartWidgetResult,\n createDataInsightsWidgetResult,\n createDataTableWidgetResult,\n dataChartWidgetResultSchema,\n dataChartWidgetSchema,\n dataInsightsWidgetResultSchema,\n dataTableWidgetResultSchema,\n dataTableWidgetSchema,\n dataWidgetResultSchema,\n isDataChartWidget,\n isDataTableWidget,\n isDataWidgetResult,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataChartSeriesDefinition,\n type DataChartWidget,\n type DataChartWidgetResult,\n type DataChartWidgetResultInput,\n type DataInsightsWidgetResult,\n type DataInsightsWidgetResultInput,\n type DataTableColumn,\n type DataTableWidget,\n type DataTableWidgetResult,\n type DataTableWidgetResultInput,\n type DataWidgetDisplay,\n type DataWidgetKind,\n type DataWidgetResult,\n type DataWidgetResultMetadata,\n} from \"./chat/widgets/data-widget-types.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type OpenBuilderConnectPopupOptions,\n type SecretsSectionProps,\n type SettingsPanelProps,\n type SettingsSearchEntry,\n type SettingsTabItem,\n type SettingsTabsPageProps,\n} from \"./settings/index.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n ErrorReportActions,\n type ErrorReportActionsProps,\n} from \"./ErrorReportActions.js\";\nexport {\n buildErrorReportTemplate,\n buildGitHubIssueUrl,\n type ErrorReportDebugItem,\n type ErrorReportTemplateOptions,\n} from \"./error-reporting.js\";\nexport { getClientSurface, type ClientSurface } from \"./client-surface.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { DbAdminPage } from \"./db-admin/DbAdminPage.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport {\n installRouteChunkRecovery,\n reloadForStaleChunk,\n recoverFromStaleChunkError,\n} from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n captureError,\n captureClientException,\n // First-party, Sentry-style error capture (auto + manual API).\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureException,\n captureMessage,\n isErrorCaptureInstalled,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n} from \"./analytics.js\";\nexport { track } from \"./track.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n dedupeCollabUsersByEmail,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\n// Presence kit\nexport {\n usePresence,\n toNormalized,\n fromNormalized,\n type OtherPresence,\n type PresencePayload,\n type UsePresenceResult,\n type NormalizedPoint,\n} from \"../collab/presence.js\";\nexport {\n useFollowUser,\n type UseFollowUserOptions,\n type UseFollowUserResult,\n type ViewportDescriptor,\n} from \"../collab/follow-mode.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport {\n HistoryTimeline,\n VersionHistoryPanel,\n useCreateResourceVersion,\n useResourceHistory,\n useResourceVersion,\n useResourceVersions,\n useRestoreResourceVersion,\n type CreateResourceVersionInput,\n type GetResourceVersionInput,\n type GetResourceVersionResult,\n type ListResourceHistoryResult,\n type ListResourceVersionsResult,\n type ResourceHistoryParams,\n type ResourceVersionsParams,\n type RestoreResourceVersionInput,\n type RestoreResourceVersionResult,\n type VersionHistoryPanelProps,\n} from \"./history/index.js\";\nexport {\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSetReviewStatus,\n type ConsumeReviewFeedbackInput,\n type CreateReviewCommentInput,\n type DeleteReviewCommentInput,\n type GetReviewFeedbackParams,\n type GetReviewFeedbackResult,\n type ListReviewCommentsParams,\n type ListReviewCommentsResult,\n type ReplyReviewCommentInput,\n type ResolveReviewThreadInput,\n type ReviewStatusBadgeProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n} from \"./review/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n openAgentSidebar,\n openAgentSettings,\n submitToAgent,\n useCommandMenuShortcut,\n type CommandMenuProps,\n type CommandMenuDoc,\n type CommandDocsGroupProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n buildOpenRouteLink,\n buildOpenRoutePath,\n buildResourceRoute,\n buildSettingsRoute,\n buildStandardAppRoute,\n buildTeamRoute,\n createStandardOpenPathResolver,\n STANDARD_APP_ROUTES,\n STANDARD_SETTINGS_TABS,\n type BuildResourceRouteOptions,\n type BuildStandardAppRouteOptions,\n type NavigationLink,\n type NavigationTarget,\n type StandardAppRouteId,\n type StandardOpenPathResolverOptions,\n type StandardOpenPathRoute,\n type StandardSettingsTabId,\n} from \"../navigation/index.js\";\nexport {\n BuilderConnectCard,\n ProviderReadinessBadge,\n SetupConnectionsPage,\n type BuilderConnectCardProps,\n type ProviderReadinessBadgeProps,\n type SetupConnectionsPageProps,\n} from \"./setup-connections/index.js\";\nexport {\n listIntegrationEnvStatuses,\n listIntegrationStatuses,\n saveIntegrationEnvVars,\n setIntegrationEnabled,\n setupIntegration,\n disconnectManagedIntegrationInstallation,\n listManagedIntegrationInstallations,\n managedIntegrationOAuthUrl,\n managedSlackAgentManifestUrl,\n listManagedIntegrationScopes,\n saveManagedIntegrationScope,\n listManagedIntegrationBudgets,\n listManagedIntegrationMemory,\n forgetManagedIntegrationMemory,\n saveManagedIntegrationBudget,\n testManagedIntegrationInstallation,\n IntegrationClientError,\n type ClientIntegrationInstallation,\n type ClientIntegrationScope,\n type ClientIntegrationUsageBudget,\n type ClientIntegrationMemory,\n type ClientIntegrationStatus,\n type IntegrationEnvStatus,\n type SavedEnvVarsResult,\n} from \"./integrations/index.js\";\nexport {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"./automation.js\";\nexport {\n ChangelogDialog,\n ChangelogSettingsCard,\n useChangelogSeen,\n parseChangelog,\n type ChangelogDialogProps,\n type ChangelogSettingsCardProps,\n type ChangelogEntry,\n} from \"./changelog/Changelog.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n ACTION_KEEPALIVE_BODY_BUDGET_BYTES,\n callAction,\n tryCallActionKeepalive,\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n type ClientActionCallOptions,\n type ClientActionMethod,\n type KeepaliveActionCallRejectionReason,\n type KeepaliveActionCallResult,\n} from \"./use-action.js\";\nexport { createAgentNativeQueryClient } from \"./create-query-client.js\";\nexport { AppProviders, type AppProvidersProps } from \"./app-providers.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\nexport {\n LiveCursorOverlay,\n type LiveCursorOverlayProps,\n type CursorMapFn,\n} from \"./components/LiveCursorOverlay.js\";\nexport {\n RemoteSelectionRings,\n type RemoteSelectionRingsProps,\n type SelectionDescriptor,\n} from \"./components/RemoteSelectionRings.js\";\nexport {\n RecentEditHighlights,\n type RecentEditHighlightsProps,\n} from \"./components/RecentEditHighlights.js\";\n// Recent-edit attribution (lingering highlights)\nexport {\n appendRecentEdit,\n collectRecentEdits,\n publishRecentEdit,\n useRecentEdits,\n RECENT_EDITS_MAX,\n RECENT_EDIT_TTL_MS,\n type RecentEdit,\n type RecentEditDescriptor,\n type AttributedRecentEdit,\n type UseRecentEditsOptions,\n} from \"../collab/recent-edits.js\";\n// Per-user undo/redo\nexport {\n useCollabUndo,\n useLocalOpUndo,\n createLocalOpUndoController,\n type UseCollabUndoOptions,\n type UseCollabUndoResult,\n type CollabUndoScope,\n type UseLocalOpUndoOptions,\n type UseLocalOpUndoResult,\n type LocalOpUndoEntry,\n type LocalOpUndoController,\n type CreateLocalOpUndoOptions,\n type UndoKeyboardOptions,\n} from \"../collab/undo.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n// Block registry (also available as the dedicated `@agent-native/core/blocks`\n// subpath, which server/agent code should prefer via `/blocks/server`).\nexport {\n defineBlock,\n BlockRegistry,\n registerBlocks,\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n BlockView,\n SchemaBlockEditor,\n markdown,\n richtext,\n introspect,\n serializeSpecBlock,\n parseSpecBlock,\n createAttrReader,\n childCodeFenceFields,\n serializeChildCodeFenceFields,\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type FieldKind,\n type FieldDescriptor,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n type BlockAgentDoc,\n} from \"./blocks/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,yBAAyB,EAAE,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EACL,qBAAqB,EACrB,+BAA+B,EAC/B,qBAAqB,EACrB,oCAAoC,EACpC,4BAA4B,EAC5B,oBAAoB,EACpB,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GAgBd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB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AChB,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,GAgB/B,MAAM,mBAAmB,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\n\ninstallRouteChunkRecovery();\n\nexport { getBrowserTabId } from \"./browser-tab-id.js\";\n\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n insertAgentComposerReference,\n listAgentChatContext,\n normalizeAgentComposerReference,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n requestAgentChatThreadOpen,\n requestAgentTaskOpen,\n sendToAgentChat,\n sendToAgentChatAndConfirm,\n reportAgentChatSubmitResult,\n AGENT_CHAT_SUBMIT_RESULT_EVENT,\n parseSubmitChatMessage,\n setAgentChatContextItem,\n setContextToAgentChat,\n generateTabId,\n type ParsedSubmitChat,\n type AgentChatOpenTaskRequest,\n type AgentChatOpenThreadRequest,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n type AgentChatSubmitResult,\n type SendToAgentChatAndConfirmResult,\n type AgentComposerReference,\n type AgentComposerReferenceInsertOptions,\n type AgentComposerReferenceInsertPayload,\n} from \"./agent-chat.js\";\nexport {\n saveAgentEngineApiKey,\n saveAgentEngineProviderSettings,\n type AgentEngineProvider,\n type SaveAgentEngineApiKeyOptions,\n type SaveAgentEngineProviderSettingsOptions,\n} from \"./agent-engine-key.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport {\n useAgentChatContext,\n type UseAgentChatContextResult,\n} from \"./use-agent-chat-context.js\";\nexport { useCodeMode, useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n deleteClientAppState,\n readClientAppState,\n setClientAppState,\n writeClientAppState,\n type ClientAppStateReadOptions,\n type ClientAppStateWriteOptions,\n} from \"./application-state.js\";\nexport {\n useAgentRouteState,\n useSemanticNavigationState,\n type AgentRouteLocation,\n type SemanticNavigationCommandEnvelope,\n type UseAgentRouteStateOptions,\n type UseAgentRouteStateResult,\n type UseSemanticNavigationStateOptions,\n type UseSemanticNavigationStateResult,\n} from \"./route-state.js\";\nexport {\n ensureEmbedAuthFetchInterceptor,\n getEmbedAuthToken,\n isEmbedAuthActive,\n isEmbedMcpChatBridgeActive,\n} from \"./embed-auth.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n codeAgentTranscriptHasPendingApproval,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport {\n CREDENTIAL_GAP_SIGNAL,\n isCredentialGapCodeAgentEvent,\n} from \"../code-agents/transcript-normalizer.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n useAgentEngineConfigured,\n type AgentEngineConfiguredState,\n type UseAgentEngineConfiguredResult,\n} from \"./use-agent-engine-configured.js\";\nexport { BuilderSetupCard } from \"./chat/run-recovery.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n sendMcpAppHostMessage,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostChatMessage,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n} from \"./mcp-app-host.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n VisualControlRow,\n VisualColorPicker,\n VisualInspectorPanel,\n VisualInspectorSection,\n VisualScrubInput,\n VisualSegmentedControl,\n VisualSliderControl,\n VisualSwatchControl,\n VisualToggleControl,\n VisualTweakControl,\n type VisualControlOption,\n type VisualControlValue,\n type VisualTweakDefinition,\n} from \"./visual-style-controls.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport { useReconciledState } from \"./use-external-value.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport {\n AgentNativeI18nProvider,\n LanguagePicker,\n getLocaleInitScript,\n localeDirection,\n normalizeLocaleCode,\n normalizeLocalePreference,\n normalizeLocalizationPreference,\n resolveLocaleFromCandidates,\n resolveLocaleFromPreference,\n useFormatters,\n useLocale,\n useT,\n DEFAULT_LOCALE,\n LOCALE_HYDRATION_GLOBAL,\n LOCALE_METADATA,\n LOCALE_STORAGE_KEY,\n SUPPORTED_LOCALES,\n type AgentNativeI18nCatalog,\n type AgentNativeI18nProviderProps,\n type LocaleCode,\n type LocaleHydrationPayload,\n type LocaleMessages,\n type LocaleMetadata,\n type LocalePreference,\n type LocalizationPreference,\n} from \"./i18n.js\";\nexport {\n // Shared editor core (Phase 1): the ONE configurable surface both the plan\n // and content editors build on.\n SharedRichEditor,\n createSharedEditorExtensions,\n MARKDOWN_DIALECT_CONFIG,\n useCollabReconcile,\n RICH_MARKDOWN_PROGRAMMATIC_TRANSACTION,\n getEditorMarkdown,\n SlashCommandMenu,\n DEFAULT_SLASH_COMMANDS,\n createImageSlashCommand,\n // Shared block-level image node + injectable upload contract. Plans opt in\n // via `features.image` + `onImageUpload`; Content keeps its own image block.\n SharedImage,\n createImageExtension,\n pickAndInsertImage,\n uploadEditorImage,\n BubbleToolbar,\n buildDefaultBubbleItems,\n // Back-compat alias + factory kept for existing embedders and specs.\n RichMarkdownEditor,\n createRichMarkdownExtensions,\n // Single-doc plan editor primitives: the GFM↔ProseMirror serializer, the\n // run-id prose attribute, and the shared drag-handle (block grip + reorder).\n RunId,\n RUN_ID_NODE_TYPES,\n gfmToProseJSON,\n proseJSONToGfm,\n DragHandle,\n DEFAULT_DRAG_HANDLE_WRAPPER_SELECTOR,\n // Generic registry-block Tiptap NodeView + side-map provider + dedupe plugin.\n // Hosts mount the node from `createRegistryBlockNode` as an extra extension\n // and wrap the editor in `RegistryBlockDataProvider`.\n createRegistryBlockNode,\n RegistryBlockNodeView,\n RegistryBlockDataProvider,\n useRegistryBlockData,\n // Shared registry-derived block slash-command builder (plan + content adapt it).\n buildRegistryBlockSlashItems,\n getRegistryBlockSlashDescription,\n getRegistryBlockSlashSearchText,\n type BuildRegistryBlockSlashItemsOptions,\n type DragHandleDropContext,\n type DragHandleDropPlacement,\n type DragHandleOptions,\n type CreateRegistryBlockNodeOptions,\n type RegistryBlockDataValue,\n type RegistryBlockSideMapBlock,\n type SharedRichEditorProps,\n type SharedEditorCollab,\n type SharedEditorFeatures,\n type CreateSharedEditorExtensionsOptions,\n type UseCollabReconcileOptions,\n type UseCollabReconcileResult,\n type SlashCommandItem,\n type SlashCommandMenuProps,\n type ImageUploadFn,\n type SharedImageOptions,\n type BubbleToolbarItem,\n type BubbleToolbarProps,\n type RichMarkdownDialect,\n type RichMarkdownEditorPreset,\n type RichMarkdownEditorProps,\n type RichMarkdownCollabUser,\n type CreateRichMarkdownExtensionsOptions,\n} from \"./rich-markdown-editor/index.js\";\n// ProseMirror node JSON shape — re-exported so the plan template (which has no\n// direct @tiptap dep) can type its doc↔blocks serializer.\nexport type { JSONContent } from \"@tiptap/core\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n RequireSession,\n buildSignInReturnHref,\n type RequireSessionProps,\n} from \"./require-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getFramePostMessageTargetOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeRouteWarmup,\n type AgentNativeRouteWarmupProps,\n} from \"./route-warmup.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n type AssistantChatAdapterContext,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n KeepTabOpenNotice,\n type KeepTabOpenNoticeProps,\n} from \"./KeepTabOpenNotice.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport {\n createAgentChatAdapter,\n type AgentChatSurfaceKind,\n type CreateAgentChatAdapterOptions,\n} from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n RealtimeVoiceModeBoundary,\n RealtimeVoiceModeProvider,\n RealtimeVoiceModeDock,\n RealtimeVoiceModeEntry,\n TiptapComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n createRealtimeVoiceSession,\n createRealtimeVoiceSessionWithCapability,\n executeRealtimeVoiceTool,\n extractRealtimeVoiceFunctionCalls,\n readRealtimeVoiceContext,\n useRealtimeVoiceMode,\n useRealtimeVoiceModeCopy,\n useRealtimeVoiceModeOptional,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type RealtimeVoiceModeCopy,\n type RealtimeVoiceModeDockProps,\n type RealtimeVoiceModeEntryProps,\n type RealtimeVoiceSessionAnswer,\n type RealtimeVoiceModeInlineSettings,\n type RealtimeVoiceModeSelectSetting,\n type RealtimeVoiceModeSettingOption,\n type RealtimeVoiceModeState,\n type RealtimeVoiceModeApi,\n type RealtimeVoiceModeProviderProps,\n type RealtimeVoiceToolResult,\n type ComposerSubmitIntent,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n type TiptapComposerHandle,\n type TiptapComposerProps,\n type TiptapComposerSubmitOptions,\n} from \"./composer/index.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n askUserQuestion,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type AskUserQuestionInput,\n type AskUserQuestionOption,\n type AskUserQuestionResult,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSnapshot,\n type ChatThreadSummary,\n type ChatThreadData,\n type ChatThreadShareLink,\n type ChatThreadShareState,\n type UseChatThreadsOptions,\n} from \"./use-chat-threads.js\";\nexport {\n ChatHistoryList,\n type ChatHistoryItem,\n type ChatHistorySection,\n type ChatHistoryListProps,\n} from \"./chat/ChatHistoryList.js\";\nexport { AgentChatHome, type AgentChatHomeProps } from \"./AgentChatHome.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n AGENT_CHAT_HOME_HANDOFF_TTL_MS,\n AGENT_CHAT_VIEW_TRANSITION_CLASS,\n AGENT_CHAT_VIEW_TRANSITION_NAME,\n consumeAgentChatHomeHandoff,\n getAgentChatViewTransitionStyle,\n isAgentChatHomeHandoffActive,\n markAgentChatHomeHandoff,\n navigateWithAgentChatViewTransition,\n startAgentChatViewTransition,\n supportsAgentChatViewTransition,\n type AgentChatHomeHandoffOptions,\n type AgentChatViewTransition,\n type AgentChatViewTransitionOptions,\n} from \"./chat-view-transition.js\";\nexport {\n useAgentChatHomeHandoff,\n useAgentChatHomeHandoffLinks,\n type UseAgentChatHomeHandoffLinksOptions,\n type UseAgentChatHomeHandoffOptions,\n} from \"./use-agent-chat-home-handoff.js\";\nexport {\n requestAgentSidebarOpen,\n SIDEBAR_STATE_CHANGE_EVENT,\n setAgentSidebarOpenPreference,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport {\n clearReservedToolRenderersForTests,\n clearToolRenderersForTests,\n registerActionChatRenderer,\n registerFallbackToolRenderer,\n registerReservedActionChatRenderer,\n registerReservedFallbackToolRenderer,\n registerReservedToolRenderer,\n registerToolRenderer,\n resolveToolRenderer,\n type ActionChatRendererRegistration,\n type ToolRendererComponent,\n type ToolRendererContext,\n type ToolRendererMatch,\n type ToolRendererProps,\n type ToolRendererRegistration,\n} from \"./chat/tool-render-registry.js\";\nexport * from \"./chat/connectors.js\";\nexport * from \"./chat/runtime.js\";\nexport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER,\n type ActionChatUIConfig,\n} from \"../action-ui.js\";\nexport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n createDataChartWidgetResult,\n createDataInsightsWidgetResult,\n createDataTableWidgetResult,\n dataChartWidgetResultSchema,\n dataChartWidgetSchema,\n dataInsightsWidgetResultSchema,\n dataTableWidgetResultSchema,\n dataTableWidgetSchema,\n dataWidgetResultSchema,\n isDataChartWidget,\n isDataTableWidget,\n isDataWidgetResult,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataChartSeriesDefinition,\n type DataChartWidget,\n type DataChartWidgetResult,\n type DataChartWidgetResultInput,\n type DataInsightsWidgetResult,\n type DataInsightsWidgetResultInput,\n type DataTableColumn,\n type DataTableWidget,\n type DataTableWidgetResult,\n type DataTableWidgetResultInput,\n type DataWidgetDisplay,\n type DataWidgetKind,\n type DataWidgetResult,\n type DataWidgetResultMetadata,\n} from \"./chat/widgets/data-widget-types.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type OpenBuilderConnectPopupOptions,\n type SecretsSectionProps,\n type SettingsPanelProps,\n type SettingsSearchEntry,\n type SettingsTabItem,\n type SettingsTabsPageProps,\n} from \"./settings/index.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport {\n StarfieldBackground,\n type StarfieldBackgroundProps,\n} from \"./StarfieldBackground.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport {\n ErrorReportActions,\n type ErrorReportActionsProps,\n} from \"./ErrorReportActions.js\";\nexport {\n buildErrorReportTemplate,\n buildGitHubIssueUrl,\n type ErrorReportDebugItem,\n type ErrorReportTemplateOptions,\n} from \"./error-reporting.js\";\nexport { getClientSurface, type ClientSurface } from \"./client-surface.js\";\nexport {\n DevDatabaseLink,\n type DevDatabaseLinkProps,\n} from \"./db-admin/DevDatabaseLink.js\";\nexport { DbAdminPage } from \"./db-admin/DbAdminPage.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport {\n installRouteChunkRecovery,\n reloadForStaleChunk,\n recoverFromStaleChunkError,\n} from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n captureError,\n captureClientException,\n // First-party, Sentry-style error capture (auto + manual API).\n AGENT_NATIVE_EXCEPTION_EVENT_NAME,\n addErrorBreadcrumb,\n captureException,\n captureMessage,\n isErrorCaptureInstalled,\n type CaptureExceptionContext,\n type CapturedExceptionEvent,\n type ClientCaptureContext,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n} from \"./analytics.js\";\nexport { track } from \"./track.js\";\nexport {\n useCollaborativeDoc,\n isReconcileLeadClient,\n emailToColor,\n emailToName,\n dedupeCollabUsersByEmail,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport { AGENT_CLIENT_ID } from \"../collab/agent-identity.js\";\n// Presence kit\nexport {\n usePresence,\n toNormalized,\n fromNormalized,\n type OtherPresence,\n type PresencePayload,\n type UsePresenceResult,\n type NormalizedPoint,\n} from \"../collab/presence.js\";\nexport {\n useFollowUser,\n type UseFollowUserOptions,\n type UseFollowUserResult,\n type ViewportDescriptor,\n} from \"../collab/follow-mode.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport {\n HistoryTimeline,\n VersionHistoryPanel,\n useCreateResourceVersion,\n useResourceHistory,\n useResourceVersion,\n useResourceVersions,\n useRestoreResourceVersion,\n type CreateResourceVersionInput,\n type GetResourceVersionInput,\n type GetResourceVersionResult,\n type ListResourceHistoryResult,\n type ListResourceVersionsResult,\n type ResourceHistoryParams,\n type ResourceVersionsParams,\n type RestoreResourceVersionInput,\n type RestoreResourceVersionResult,\n type VersionHistoryPanelProps,\n} from \"./history/index.js\";\nexport {\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSetReviewStatus,\n type ConsumeReviewFeedbackInput,\n type CreateReviewCommentInput,\n type DeleteReviewCommentInput,\n type GetReviewFeedbackParams,\n type GetReviewFeedbackResult,\n type ListReviewCommentsParams,\n type ListReviewCommentsResult,\n type ReplyReviewCommentInput,\n type ResolveReviewThreadInput,\n type ReviewStatusBadgeProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n} from \"./review/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n openAgentSidebar,\n openAgentSettings,\n submitToAgent,\n useCommandMenuShortcut,\n type CommandMenuProps,\n type CommandMenuDoc,\n type CommandDocsGroupProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n buildOpenRouteLink,\n buildOpenRoutePath,\n buildResourceRoute,\n buildSettingsRoute,\n buildStandardAppRoute,\n buildTeamRoute,\n createStandardOpenPathResolver,\n STANDARD_APP_ROUTES,\n STANDARD_SETTINGS_TABS,\n type BuildResourceRouteOptions,\n type BuildStandardAppRouteOptions,\n type NavigationLink,\n type NavigationTarget,\n type StandardAppRouteId,\n type StandardOpenPathResolverOptions,\n type StandardOpenPathRoute,\n type StandardSettingsTabId,\n} from \"../navigation/index.js\";\nexport {\n BuilderConnectCard,\n ProviderReadinessBadge,\n SetupConnectionsPage,\n type BuilderConnectCardProps,\n type ProviderReadinessBadgeProps,\n type SetupConnectionsPageProps,\n} from \"./setup-connections/index.js\";\nexport {\n listIntegrationEnvStatuses,\n listIntegrationStatuses,\n saveIntegrationEnvVars,\n setIntegrationEnabled,\n setupIntegration,\n disconnectManagedIntegrationInstallation,\n listManagedIntegrationInstallations,\n managedIntegrationOAuthUrl,\n managedSlackAgentManifestUrl,\n listManagedIntegrationScopes,\n saveManagedIntegrationScope,\n listManagedIntegrationBudgets,\n listManagedIntegrationMemory,\n forgetManagedIntegrationMemory,\n saveManagedIntegrationBudget,\n testManagedIntegrationInstallation,\n IntegrationClientError,\n type ClientIntegrationInstallation,\n type ClientIntegrationScope,\n type ClientIntegrationUsageBudget,\n type ClientIntegrationMemory,\n type ClientIntegrationStatus,\n type IntegrationEnvStatus,\n type SavedEnvVarsResult,\n} from \"./integrations/index.js\";\nexport {\n invokeConfiguredAutomationWorkflow,\n type InvokeConfiguredAutomationWorkflowInput,\n} from \"./automation.js\";\nexport {\n ChangelogDialog,\n ChangelogSettingsCard,\n useChangelogSeen,\n parseChangelog,\n type ChangelogDialogProps,\n type ChangelogSettingsCardProps,\n type ChangelogEntry,\n} from \"./changelog/Changelog.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n ACTION_KEEPALIVE_BODY_BUDGET_BYTES,\n callAction,\n tryCallActionKeepalive,\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n type ClientActionCallOptions,\n type ClientActionMethod,\n type KeepaliveActionCallRejectionReason,\n type KeepaliveActionCallResult,\n} from \"./use-action.js\";\nexport { createAgentNativeQueryClient } from \"./create-query-client.js\";\nexport { AppProviders, type AppProvidersProps } from \"./app-providers.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\nexport {\n LiveCursorOverlay,\n type LiveCursorOverlayProps,\n type CursorMapFn,\n} from \"./components/LiveCursorOverlay.js\";\nexport {\n RemoteSelectionRings,\n type RemoteSelectionRingsProps,\n type SelectionDescriptor,\n} from \"./components/RemoteSelectionRings.js\";\nexport {\n RecentEditHighlights,\n type RecentEditHighlightsProps,\n} from \"./components/RecentEditHighlights.js\";\n// Recent-edit attribution (lingering highlights)\nexport {\n appendRecentEdit,\n collectRecentEdits,\n publishRecentEdit,\n useRecentEdits,\n RECENT_EDITS_MAX,\n RECENT_EDIT_TTL_MS,\n type RecentEdit,\n type RecentEditDescriptor,\n type AttributedRecentEdit,\n type UseRecentEditsOptions,\n} from \"../collab/recent-edits.js\";\n// Per-user undo/redo\nexport {\n useCollabUndo,\n useLocalOpUndo,\n createLocalOpUndoController,\n type UseCollabUndoOptions,\n type UseCollabUndoResult,\n type CollabUndoScope,\n type UseLocalOpUndoOptions,\n type UseLocalOpUndoResult,\n type LocalOpUndoEntry,\n type LocalOpUndoController,\n type CreateLocalOpUndoOptions,\n type UndoKeyboardOptions,\n} from \"../collab/undo.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n// Block registry (also available as the dedicated `@agent-native/core/blocks`\n// subpath, which server/agent code should prefer via `/blocks/server`).\nexport {\n defineBlock,\n BlockRegistry,\n registerBlocks,\n BlockRegistryProvider,\n useBlockRegistry,\n useOptionalBlockRegistry,\n BlockView,\n SchemaBlockEditor,\n markdown,\n richtext,\n introspect,\n serializeSpecBlock,\n parseSpecBlock,\n createAttrReader,\n childCodeFenceFields,\n serializeChildCodeFenceFields,\n describeBlocksForAgent,\n renderBlockVocabularyReference,\n type BlockSpec,\n type BlockPlacement,\n type BlockMdxConfig,\n type BlockAttrReader,\n type BlockRenderContext,\n type BlockReadProps,\n type BlockEditProps,\n type MdxAttrValue,\n type FieldKind,\n type FieldDescriptor,\n type MdxJsxNode,\n type MdxAttrNode,\n type SerializableBlock,\n type ParsedBlockBase,\n type BlockAgentDoc,\n} from \"./blocks/index.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RunsTray.d.ts","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,yBAAyB,CAAC;AAsBxE,KAAK,WAAW,GAAG,QAAQ,CAAC;AAC5B,KAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,UAAU,aAAa;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5D,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4ID;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAa,EACb,KAAS,EACT,YAAmB,EACnB,UAAU,EACV,cAAuB,EACvB,YAAY,EACZ,KAAa,EACb,SAAS,GACV,EAAE,aAAa,sCAsGf;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAa,EACb,KAAS,EACT,YAAoB,EACpB,UAAiB,EACjB,YAAY,GACb,EAAE,IAAI,CACL,aAAa,EACb,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CACpE,sCA+EA"}
1
+ {"version":3,"file":"RunsTray.d.ts","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,yBAAyB,CAAC;AAuBxE,KAAK,WAAW,GAAG,QAAQ,CAAC;AAC5B,KAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,CAAC;AAG9C,UAAU,aAAa;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,cAAc,CAAC,EAAE,sBAAsB,CAAC;IACxC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5D,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsJD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAa,EACb,KAAS,EACT,YAAmB,EACnB,UAAU,EACV,cAAuB,EACvB,YAAY,EACZ,KAAa,EACb,SAAS,GACV,EAAE,aAAa,sCAsGf;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,MAAa,EACb,KAAS,EACT,YAAoB,EACpB,UAAiB,EACjB,YAAY,GACb,EAAE,IAAI,CACL,aAAa,EACb,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CACpE,sCA+EA"}
@@ -6,12 +6,15 @@ import { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, } from
6
6
  import { Popover, PopoverContent, PopoverTrigger, } from "../components/ui/popover.js";
7
7
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../components/ui/tooltip.js";
8
8
  import { useFormatters, useT } from "../i18n.js";
9
+ import { useChangeVersion } from "../use-change-version.js";
9
10
  import { usePausingInterval } from "../use-pausing-interval.js";
10
11
  import { cn } from "../utils.js";
12
+ const RUN_CHANGE_SETTLE_MS = 250;
11
13
  function useRunsTrayState({ pollMs = 3000, limit = 5, hideWhenIdle = true, showRecent, }) {
12
14
  const t = useT();
13
15
  const [runs, setRuns] = useState([]);
14
16
  const includeRecent = showRecent ?? !hideWhenIdle;
17
+ const runsVersion = useChangeVersion("runs");
15
18
  const refresh = useCallback(async () => {
16
19
  try {
17
20
  const query = new URLSearchParams({ limit: String(limit) });
@@ -28,8 +31,14 @@ function useRunsTrayState({ pollMs = 3000, limit = 5, hideWhenIdle = true, showR
28
31
  }
29
32
  }, [includeRecent, limit]);
30
33
  useEffect(() => {
31
- refresh();
34
+ void refresh();
32
35
  }, [refresh]);
36
+ useEffect(() => {
37
+ if (runsVersion <= 0)
38
+ return;
39
+ const timeout = window.setTimeout(() => void refresh(), RUN_CHANGE_SETTLE_MS);
40
+ return () => window.clearTimeout(timeout);
41
+ }, [refresh, runsVersion]);
33
42
  usePausingInterval(refresh, pollMs);
34
43
  const dismissRun = useCallback(async (runId) => {
35
44
  setRuns((current) => current.filter((run) => run.id !== runId));
@@ -1 +1 @@
1
- {"version":3,"file":"RunsTray.js","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,WAAW,EACX,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,eAAe,EAC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S,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9D,OAAO,CACL,gBACE,SAAS,EAAE,EAAE,CACX,uFAAuF,EACvF,kBAAkB,CAAC,MAAM,CAAC,CAC3B,aAED,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE,wBAAgB,EACpE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IACvB,CACR,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,0DAA0D;AAC1D,MAAM,aAAa,GAGf;IACF,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE;IACzD,SAAS,EAAE;QACT,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,wCAAwC;KACpD;IACD,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,kBAAkB,EAAE;IAChE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,uBAAuB,EAAE;CACnE,CAAC","sourcesContent":["import {\n IconAlertCircle,\n IconCheck,\n IconClock,\n IconExternalLink,\n IconLoader2,\n IconPlayerStop,\n IconSubtask,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport type { AgentRun, ProgressStatus } from \"../../progress/types.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n} from \"../components/ui/dropdown-menu.js\";\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"../components/ui/popover.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useFormatters, useT } from \"../i18n.js\";\nimport { usePausingInterval } from \"../use-pausing-interval.js\";\nimport { cn } from \"../utils.js\";\n\ntype AgentRunDto = AgentRun;\ntype RunsTrayTriggerVariant = \"icon\" | \"pill\";\n\ninterface RunsTrayProps {\n /** Poll interval in ms. 0 disables. Default 3000. */\n pollMs?: number;\n /** Max runs to show in the dropdown. Default 5. */\n limit?: number;\n /** Hide the trigger entirely when no active runs. Default true. */\n hideWhenIdle?: boolean;\n /** Include recent terminal runs instead of active runs only. Defaults to !hideWhenIdle. */\n showRecent?: boolean;\n /** Compact icon for app headers, or a labeled pill for the agent panel. */\n triggerVariant?: RunsTrayTriggerVariant;\n /** Called when a run can open a related agent chat thread. */\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n align?: \"start\" | \"center\" | \"end\";\n className?: string;\n}\n\ninterface RunsTrayState {\n runs: AgentRunDto[];\n hasRuns: boolean;\n activeCount: number;\n failedCount: number;\n terminalCount: number;\n triggerLabel: string;\n TriggerIcon: typeof IconLoader2;\n triggerTone: string;\n dismissRun: (runId: string) => void;\n stopRun: (runId: string) => void;\n}\n\nfunction useRunsTrayState({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = true,\n showRecent,\n}: Pick<\n RunsTrayProps,\n \"pollMs\" | \"limit\" | \"hideWhenIdle\" | \"showRecent\"\n>): RunsTrayState {\n const t = useT();\n const [runs, setRuns] = useState<AgentRunDto[]>([]);\n const includeRecent = showRecent ?? !hideWhenIdle;\n\n const refresh = useCallback(async () => {\n try {\n const query = new URLSearchParams({ limit: String(limit) });\n if (!includeRecent) query.set(\"active\", \"true\");\n const res = await fetch(\n agentNativePath(`/_agent-native/runs?${query.toString()}`),\n );\n if (!res.ok) return;\n const rows = (await res.json()) as AgentRunDto[];\n setRuns(rows);\n } catch {\n // best-effort\n }\n }, [includeRecent, limit]);\n\n useEffect(() => {\n refresh();\n }, [refresh]);\n\n usePausingInterval(refresh, pollMs);\n\n const dismissRun = useCallback(\n async (runId: string) => {\n setRuns((current) => current.filter((run) => run.id !== runId));\n try {\n const res = await fetch(\n agentNativePath(`/_agent-native/runs/${runId}`),\n {\n method: \"DELETE\",\n headers: { \"X-Agent-Native-CSRF\": \"1\" },\n },\n );\n if (!res.ok) throw new Error(`Dismiss failed (${res.status})`);\n } catch {\n refresh();\n }\n },\n [refresh],\n );\n\n const stopRun = useCallback(\n async (runId: string) => {\n // Optimistic: mark as cancelled immediately so the UI is responsive.\n setRuns((current) =>\n current.map((run) =>\n run.id === runId\n ? { ...run, status: \"cancelled\" as ProgressStatus }\n : run,\n ),\n );\n try {\n const res = await fetch(\n agentNativePath(`/_agent-native/agent-chat/runs/${runId}/stop`),\n {\n method: \"POST\",\n headers: { \"X-Agent-Native-CSRF\": \"1\" },\n },\n );\n if (!res.ok) throw new Error(`Stop failed (${res.status})`);\n } catch {\n // Reconcile from server on failure\n refresh();\n }\n },\n [refresh],\n );\n\n const hasRuns = runs.length > 0;\n const activeCount = useMemo(\n () => runs.filter((run) => run.status === \"running\").length,\n [runs],\n );\n const failedCount = useMemo(\n () => runs.filter((run) => run.status === \"failed\").length,\n [runs],\n );\n const triggerLabel =\n activeCount > 0\n ? t(\"runsTray.activeRun\", { count: activeCount })\n : failedCount > 0\n ? t(\"runsTray.failedRun\", { count: failedCount })\n : hasRuns\n ? t(\"runsTray.recentRuns\")\n : t(\"runsTray.noRecentRuns\");\n const TriggerIcon =\n activeCount > 0\n ? IconLoader2\n : failedCount > 0\n ? IconAlertCircle\n : IconSubtask;\n const triggerTone =\n activeCount > 0\n ? \"text-primary\"\n : failedCount > 0\n ? \"text-destructive\"\n : \"text-muted-foreground\";\n const terminalCount = runs.length - activeCount;\n\n return {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n };\n}\n\n/**\n * Header-bar progress indicator. Shows a spinner icon or labeled Runs pill\n * with a count badge when runs are active; opens a popover with live progress.\n * Same inline-header pattern as <NotificationsBell /> — drop it into the\n * header, no floating overlay over the main content.\n */\nexport function RunsTray({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = true,\n showRecent,\n triggerVariant = \"icon\",\n onOpenThread,\n align = \"end\",\n className,\n}: RunsTrayProps) {\n const t = useT();\n const [open, setOpen] = useState(false);\n const {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n } = useRunsTrayState({\n pollMs,\n limit,\n hideWhenIdle,\n showRecent,\n });\n\n if (!hasRuns && hideWhenIdle) return null;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <TooltipProvider delayDuration={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={triggerLabel}\n aria-expanded={open}\n className={cn(\n \"an-runs-tray__trigger relative inline-flex shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent/40 hover:text-foreground\",\n triggerVariant === \"pill\"\n ? \"h-7 min-w-[68px] gap-1.5 border border-border/70 bg-background px-2 text-[11px] font-medium\"\n : \"h-8 w-8\",\n open && \"bg-accent/50 text-foreground\",\n className,\n )}\n >\n <TriggerIcon\n size={triggerVariant === \"pill\" ? 14 : 18}\n className={cn(\n triggerTone,\n activeCount > 0 &&\n \"animate-spin motion-reduce:animate-none\",\n )}\n aria-hidden\n />\n {triggerVariant === \"pill\" ? (\n <span className=\"leading-none\">{t(\"runsTray.runs\")}</span>\n ) : null}\n {activeCount > 0 ? (\n <span\n aria-hidden\n className={cn(\n \"an-runs-tray__badge rounded-full bg-primary text-[10px] font-medium leading-[14px] text-primary-foreground\",\n triggerVariant === \"pill\"\n ? \"min-w-4 px-1\"\n : \"absolute -right-0.5 -top-0.5 px-1\",\n )}\n >\n {activeCount > 9 ? \"9+\" : activeCount}\n </span>\n ) : failedCount > 0 ? (\n <span\n aria-hidden\n className={cn(\n \"rounded-full bg-destructive text-[10px] font-medium leading-[14px] text-destructive-foreground\",\n triggerVariant === \"pill\"\n ? \"min-w-4 px-1\"\n : \"absolute -right-0.5 -top-0.5 px-1\",\n )}\n >\n {failedCount > 9 ? \"9+\" : failedCount}\n </span>\n ) : null}\n </button>\n </PopoverTrigger>\n </TooltipTrigger>\n <TooltipContent>{triggerLabel}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n <PopoverContent\n align={align}\n sideOffset={8}\n className=\"an-runs-tray__menu w-80 max-w-[calc(100vw-24px)] p-0\"\n >\n <RunsTrayContent\n runs={runs}\n hasRuns={hasRuns}\n activeCount={activeCount}\n terminalCount={terminalCount}\n onDismiss={dismissRun}\n onStop={stopRun}\n onOpenThread={onOpenThread}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nexport function RunsTrayMenuItem({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = false,\n showRecent = true,\n onOpenThread,\n}: Pick<\n RunsTrayProps,\n \"pollMs\" | \"limit\" | \"hideWhenIdle\" | \"showRecent\" | \"onOpenThread\"\n>) {\n const t = useT();\n const [submenuOpen, setSubmenuOpen] = useState(false);\n const {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n } = useRunsTrayState({\n pollMs,\n limit,\n hideWhenIdle,\n showRecent,\n });\n\n if (!hasRuns && hideWhenIdle) return null;\n\n return (\n <DropdownMenuSub open={submenuOpen} onOpenChange={setSubmenuOpen}>\n <DropdownMenuSubTrigger\n aria-label={t(\"runsTray.ariaAgentRuns\", { label: triggerLabel })}\n className=\"cursor-pointer gap-2\"\n onClick={(event) => {\n event.preventDefault();\n setSubmenuOpen(true);\n }}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n setSubmenuOpen(true);\n }\n }}\n >\n <TriggerIcon\n size={14}\n className={cn(triggerTone, activeCount > 0 && \"animate-spin\")}\n aria-hidden\n />\n <span className=\"min-w-0 flex-1 truncate\">\n {t(\"runsTray.agentRuns\")}\n </span>\n {activeCount > 0 ? (\n <span\n aria-label={triggerLabel}\n className=\"rounded-full bg-primary px-1.5 text-[10px] font-medium leading-4 text-primary-foreground\"\n >\n {activeCount > 9 ? \"9+\" : activeCount}\n </span>\n ) : failedCount > 0 ? (\n <span\n aria-label={triggerLabel}\n className=\"rounded-full bg-destructive px-1.5 text-[10px] font-medium leading-4 text-destructive-foreground\"\n >\n {failedCount > 9 ? \"9+\" : failedCount}\n </span>\n ) : null}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent\n sideOffset={6}\n className=\"an-runs-tray__menu w-80 max-w-[calc(100vw-24px)] p-0\"\n >\n <RunsTrayContent\n runs={runs}\n hasRuns={hasRuns}\n activeCount={activeCount}\n terminalCount={terminalCount}\n onDismiss={dismissRun}\n onStop={stopRun}\n onOpenThread={onOpenThread}\n />\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n );\n}\n\nfunction RunsTrayContent({\n runs,\n hasRuns,\n activeCount,\n terminalCount,\n onDismiss,\n onStop,\n onOpenThread,\n}: {\n runs: AgentRunDto[];\n hasRuns: boolean;\n activeCount: number;\n terminalCount: number;\n onDismiss: (runId: string) => void;\n onStop: (runId: string) => void;\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n}) {\n const t = useT();\n return (\n <>\n <div className=\"border-b border-border px-3 py-2\">\n <div className=\"text-sm font-medium text-foreground\">\n {t(\"runsTray.agentRuns\")}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {activeCount > 0\n ? terminalCount > 0\n ? t(\"runsTray.summaryRunningRecent\", {\n activeCount,\n terminalCount,\n })\n : t(\"runsTray.summaryRunning\", { activeCount })\n : hasRuns\n ? t(\"runsTray.summaryRecent\", { count: runs.length })\n : t(\"runsTray.noTrackedWorkYet\")}\n </div>\n </div>\n {hasRuns ? (\n <div className=\"max-h-96 divide-y divide-border overflow-y-auto\">\n {runs.map((run) => (\n <RunRow\n key={run.id}\n run={run}\n onDismiss={onDismiss}\n onStop={onStop}\n onOpenThread={onOpenThread}\n />\n ))}\n </div>\n ) : (\n <div className=\"px-3 py-6 text-center\">\n <IconClock\n size={22}\n className=\"mx-auto text-muted-foreground/50\"\n aria-hidden\n />\n <div className=\"mt-2 text-sm font-medium text-foreground\">\n {t(\"runsTray.noRecentRuns\")}\n </div>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n {t(\"runsTray.emptyDescription\")}\n </p>\n </div>\n )}\n </>\n );\n}\n\nfunction getRunThreadId(run: AgentRunDto): string | undefined {\n const metadata = run.metadata ?? {};\n const direct =\n typeof metadata.threadId === \"string\"\n ? metadata.threadId\n : typeof metadata.thread_id === \"string\"\n ? metadata.thread_id\n : undefined;\n if (direct?.trim()) return direct.trim();\n\n const surfaceUrl =\n typeof metadata.surfaceUrl === \"string\" ? metadata.surfaceUrl : undefined;\n const match = surfaceUrl?.match(/^agent-native:\\/\\/threads\\/(.+)$/);\n return match?.[1] ? decodeURIComponent(match[1]) : undefined;\n}\n\nfunction formatRunTime(\n run: AgentRunDto,\n t: ReturnType<typeof useT>,\n formatDate: ReturnType<typeof useFormatters>[\"formatDate\"],\n): string {\n const when = run.completedAt ?? run.updatedAt ?? run.startedAt;\n const timestamp = Date.parse(when);\n if (!Number.isFinite(timestamp)) return \"\";\n const diffMs = Date.now() - timestamp;\n const isRunning = run.status === \"running\";\n if (diffMs < 30_000) {\n return t(\n isRunning ? \"runsTray.updatedJustNow\" : \"runsTray.finishedJustNow\",\n );\n }\n const minutes = Math.floor(diffMs / 60_000);\n if (minutes < 60) {\n return t(\n isRunning ? \"runsTray.updatedMinutes\" : \"runsTray.finishedMinutes\",\n {\n count: minutes,\n },\n );\n }\n const hours = Math.floor(minutes / 60);\n if (hours < 24) {\n return t(isRunning ? \"runsTray.updatedHours\" : \"runsTray.finishedHours\", {\n count: hours,\n });\n }\n return t(isRunning ? \"runsTray.updatedDate\" : \"runsTray.finishedDate\", {\n date: formatDate(timestamp, { month: \"short\", day: \"numeric\" }),\n });\n}\n\nfunction isAgentTeamRun(run: AgentRunDto): boolean {\n return (\n typeof run.metadata === \"object\" &&\n run.metadata !== null &&\n (run.metadata as Record<string, unknown>).kind === \"agent-team\"\n );\n}\n\nfunction RunRow({\n run,\n onDismiss,\n onStop,\n onOpenThread,\n}: {\n run: AgentRunDto;\n onDismiss: (runId: string) => void;\n onStop: (runId: string) => void;\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n}) {\n const t = useT();\n const { formatDate } = useFormatters();\n const threadId = getRunThreadId(run);\n const isRunning = run.status === \"running\";\n const canStop = isRunning && isAgentTeamRun(run);\n\n return (\n <div className=\"flex flex-col gap-1.5 px-3 py-2.5 text-sm\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate font-medium text-foreground\">\n {run.title}\n </div>\n {run.step ? (\n <div className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {run.step}\n </div>\n ) : null}\n </div>\n <StatusPill status={run.status} />\n </div>\n {run.percent != null || isRunning ? (\n <div className=\"h-1 w-full overflow-hidden rounded bg-muted\">\n {run.percent != null ? (\n <div\n className={cn(\n \"h-full origin-left transition-transform duration-200 ease-[var(--ease-collapse)]\",\n run.status === \"failed\"\n ? \"bg-destructive\"\n : run.status === \"cancelled\"\n ? \"bg-muted-foreground/50\"\n : \"bg-primary\",\n )}\n style={{\n transform: `scaleX(${run.percent / 100})`,\n width: \"100%\",\n }}\n />\n ) : (\n <div className=\"h-full w-1/3 animate-pulse bg-primary/60\" />\n )}\n </div>\n ) : null}\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"min-w-0 truncate text-[10px] text-muted-foreground/70\">\n {formatRunTime(run, t, formatDate)}\n </span>\n <div className=\"flex shrink-0 items-center gap-1\">\n {threadId && onOpenThread ? (\n <button\n type=\"button\"\n className=\"inline-flex h-6 items-center gap-1 rounded px-1.5 text-[11px] font-medium text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n onClick={() => onOpenThread(threadId, run)}\n >\n {t(\"runsTray.open\")}\n <IconExternalLink size={12} aria-hidden />\n </button>\n ) : null}\n {canStop ? (\n <button\n type=\"button\"\n aria-label={t(\"runsTray.stopRun\", { title: run.title })}\n className=\"inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-destructive\"\n onClick={() => onStop(run.id)}\n >\n <IconPlayerStop size={13} aria-hidden />\n </button>\n ) : null}\n {!isRunning ? (\n <button\n type=\"button\"\n aria-label={t(\"runsTray.hideRun\", { title: run.title })}\n className=\"inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n onClick={() => onDismiss(run.id)}\n >\n <IconX size={13} aria-hidden />\n </button>\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\nconst STATUS_COPY_KEYS: Record<ProgressStatus, string> = {\n running: \"runsTray.statusRunning\",\n succeeded: \"runsTray.statusDone\",\n failed: \"runsTray.statusFailed\",\n cancelled: \"runsTray.statusStopped\",\n};\n\nconst STATUS_PILL_STYLES: Record<ProgressStatus, string> = {\n running: \"bg-primary/10 text-primary\",\n succeeded: \"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400\",\n failed: \"bg-destructive/10 text-destructive\",\n cancelled: \"bg-muted text-muted-foreground\",\n};\n\nfunction StatusPill({ status }: { status: ProgressStatus }) {\n const t = useT();\n const { Icon, className } = STATUS_GLYPHS[status];\n const spinClass = status === \"running\" ? \" animate-spin\" : \"\";\n return (\n <span\n className={cn(\n \"inline-flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium\",\n STATUS_PILL_STYLES[status],\n )}\n >\n <Icon size={12} className={`${className}${spinClass}`} aria-hidden />\n {t(STATUS_COPY_KEYS[status])}\n </span>\n );\n}\n\n// dark: variants only where there's no semantic token for the colour\n// (e.g. success green isn't in shadcn's default palette).\nconst STATUS_GLYPHS: Record<\n ProgressStatus,\n { Icon: typeof IconLoader2; className: string }\n> = {\n running: { Icon: IconLoader2, className: \"text-primary\" },\n succeeded: {\n Icon: IconCheck,\n className: \"text-emerald-600 dark:text-emerald-400\",\n },\n failed: { Icon: IconAlertCircle, className: \"text-destructive\" },\n cancelled: { Icon: IconClock, className: \"text-muted-foreground\" },\n};\n"]}
1
+ {"version":3,"file":"RunsTray.js","sourceRoot":"","sources":["../../../src/client/progress/RunsTray.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,WAAW,EACX,KAAK,GACN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAIjC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAgCjC,SAAS,gBAAgB,CAAC,EACxB,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,CAAC,EACT,YAAY,GAAG,IAAI,EACnB,UAAU,GAIX;IACC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,CAAC,IAAI,EAAE,OAAO,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EAAE,CACX,uFAAuF,EACvF,kBAAkB,CAAC,MAAM,CAAC,CAC3B,aAED,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE,wBAAgB,EACpE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IACvB,CACR,CAAC;AACJ,CAAC;AAED,qEAAqE;AACrE,0DAA0D;AAC1D,MAAM,aAAa,GAGf;IACF,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE;IACzD,SAAS,EAAE;QACT,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,wCAAwC;KACpD;IACD,MAAM,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,kBAAkB,EAAE;IAChE,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,uBAAuB,EAAE;CACnE,CAAC","sourcesContent":["import {\n IconAlertCircle,\n IconCheck,\n IconClock,\n IconExternalLink,\n IconLoader2,\n IconPlayerStop,\n IconSubtask,\n IconX,\n} from \"@tabler/icons-react\";\nimport { useCallback, useEffect, useMemo, useState } from \"react\";\n\nimport type { AgentRun, ProgressStatus } from \"../../progress/types.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n} from \"../components/ui/dropdown-menu.js\";\nimport {\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from \"../components/ui/popover.js\";\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"../components/ui/tooltip.js\";\nimport { useFormatters, useT } from \"../i18n.js\";\nimport { useChangeVersion } from \"../use-change-version.js\";\nimport { usePausingInterval } from \"../use-pausing-interval.js\";\nimport { cn } from \"../utils.js\";\n\ntype AgentRunDto = AgentRun;\ntype RunsTrayTriggerVariant = \"icon\" | \"pill\";\nconst RUN_CHANGE_SETTLE_MS = 250;\n\ninterface RunsTrayProps {\n /** Poll interval in ms. 0 disables. Default 3000. */\n pollMs?: number;\n /** Max runs to show in the dropdown. Default 5. */\n limit?: number;\n /** Hide the trigger entirely when no active runs. Default true. */\n hideWhenIdle?: boolean;\n /** Include recent terminal runs instead of active runs only. Defaults to !hideWhenIdle. */\n showRecent?: boolean;\n /** Compact icon for app headers, or a labeled pill for the agent panel. */\n triggerVariant?: RunsTrayTriggerVariant;\n /** Called when a run can open a related agent chat thread. */\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n align?: \"start\" | \"center\" | \"end\";\n className?: string;\n}\n\ninterface RunsTrayState {\n runs: AgentRunDto[];\n hasRuns: boolean;\n activeCount: number;\n failedCount: number;\n terminalCount: number;\n triggerLabel: string;\n TriggerIcon: typeof IconLoader2;\n triggerTone: string;\n dismissRun: (runId: string) => void;\n stopRun: (runId: string) => void;\n}\n\nfunction useRunsTrayState({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = true,\n showRecent,\n}: Pick<\n RunsTrayProps,\n \"pollMs\" | \"limit\" | \"hideWhenIdle\" | \"showRecent\"\n>): RunsTrayState {\n const t = useT();\n const [runs, setRuns] = useState<AgentRunDto[]>([]);\n const includeRecent = showRecent ?? !hideWhenIdle;\n const runsVersion = useChangeVersion(\"runs\");\n\n const refresh = useCallback(async () => {\n try {\n const query = new URLSearchParams({ limit: String(limit) });\n if (!includeRecent) query.set(\"active\", \"true\");\n const res = await fetch(\n agentNativePath(`/_agent-native/runs?${query.toString()}`),\n );\n if (!res.ok) return;\n const rows = (await res.json()) as AgentRunDto[];\n setRuns(rows);\n } catch {\n // best-effort\n }\n }, [includeRecent, limit]);\n\n useEffect(() => {\n void refresh();\n }, [refresh]);\n\n useEffect(() => {\n if (runsVersion <= 0) return;\n const timeout = window.setTimeout(\n () => void refresh(),\n RUN_CHANGE_SETTLE_MS,\n );\n return () => window.clearTimeout(timeout);\n }, [refresh, runsVersion]);\n\n usePausingInterval(refresh, pollMs);\n\n const dismissRun = useCallback(\n async (runId: string) => {\n setRuns((current) => current.filter((run) => run.id !== runId));\n try {\n const res = await fetch(\n agentNativePath(`/_agent-native/runs/${runId}`),\n {\n method: \"DELETE\",\n headers: { \"X-Agent-Native-CSRF\": \"1\" },\n },\n );\n if (!res.ok) throw new Error(`Dismiss failed (${res.status})`);\n } catch {\n refresh();\n }\n },\n [refresh],\n );\n\n const stopRun = useCallback(\n async (runId: string) => {\n // Optimistic: mark as cancelled immediately so the UI is responsive.\n setRuns((current) =>\n current.map((run) =>\n run.id === runId\n ? { ...run, status: \"cancelled\" as ProgressStatus }\n : run,\n ),\n );\n try {\n const res = await fetch(\n agentNativePath(`/_agent-native/agent-chat/runs/${runId}/stop`),\n {\n method: \"POST\",\n headers: { \"X-Agent-Native-CSRF\": \"1\" },\n },\n );\n if (!res.ok) throw new Error(`Stop failed (${res.status})`);\n } catch {\n // Reconcile from server on failure\n refresh();\n }\n },\n [refresh],\n );\n\n const hasRuns = runs.length > 0;\n const activeCount = useMemo(\n () => runs.filter((run) => run.status === \"running\").length,\n [runs],\n );\n const failedCount = useMemo(\n () => runs.filter((run) => run.status === \"failed\").length,\n [runs],\n );\n const triggerLabel =\n activeCount > 0\n ? t(\"runsTray.activeRun\", { count: activeCount })\n : failedCount > 0\n ? t(\"runsTray.failedRun\", { count: failedCount })\n : hasRuns\n ? t(\"runsTray.recentRuns\")\n : t(\"runsTray.noRecentRuns\");\n const TriggerIcon =\n activeCount > 0\n ? IconLoader2\n : failedCount > 0\n ? IconAlertCircle\n : IconSubtask;\n const triggerTone =\n activeCount > 0\n ? \"text-primary\"\n : failedCount > 0\n ? \"text-destructive\"\n : \"text-muted-foreground\";\n const terminalCount = runs.length - activeCount;\n\n return {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n };\n}\n\n/**\n * Header-bar progress indicator. Shows a spinner icon or labeled Runs pill\n * with a count badge when runs are active; opens a popover with live progress.\n * Same inline-header pattern as <NotificationsBell /> — drop it into the\n * header, no floating overlay over the main content.\n */\nexport function RunsTray({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = true,\n showRecent,\n triggerVariant = \"icon\",\n onOpenThread,\n align = \"end\",\n className,\n}: RunsTrayProps) {\n const t = useT();\n const [open, setOpen] = useState(false);\n const {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n } = useRunsTrayState({\n pollMs,\n limit,\n hideWhenIdle,\n showRecent,\n });\n\n if (!hasRuns && hideWhenIdle) return null;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <TooltipProvider delayDuration={200}>\n <Tooltip>\n <TooltipTrigger asChild>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label={triggerLabel}\n aria-expanded={open}\n className={cn(\n \"an-runs-tray__trigger relative inline-flex shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent/40 hover:text-foreground\",\n triggerVariant === \"pill\"\n ? \"h-7 min-w-[68px] gap-1.5 border border-border/70 bg-background px-2 text-[11px] font-medium\"\n : \"h-8 w-8\",\n open && \"bg-accent/50 text-foreground\",\n className,\n )}\n >\n <TriggerIcon\n size={triggerVariant === \"pill\" ? 14 : 18}\n className={cn(\n triggerTone,\n activeCount > 0 &&\n \"animate-spin motion-reduce:animate-none\",\n )}\n aria-hidden\n />\n {triggerVariant === \"pill\" ? (\n <span className=\"leading-none\">{t(\"runsTray.runs\")}</span>\n ) : null}\n {activeCount > 0 ? (\n <span\n aria-hidden\n className={cn(\n \"an-runs-tray__badge rounded-full bg-primary text-[10px] font-medium leading-[14px] text-primary-foreground\",\n triggerVariant === \"pill\"\n ? \"min-w-4 px-1\"\n : \"absolute -right-0.5 -top-0.5 px-1\",\n )}\n >\n {activeCount > 9 ? \"9+\" : activeCount}\n </span>\n ) : failedCount > 0 ? (\n <span\n aria-hidden\n className={cn(\n \"rounded-full bg-destructive text-[10px] font-medium leading-[14px] text-destructive-foreground\",\n triggerVariant === \"pill\"\n ? \"min-w-4 px-1\"\n : \"absolute -right-0.5 -top-0.5 px-1\",\n )}\n >\n {failedCount > 9 ? \"9+\" : failedCount}\n </span>\n ) : null}\n </button>\n </PopoverTrigger>\n </TooltipTrigger>\n <TooltipContent>{triggerLabel}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n <PopoverContent\n align={align}\n sideOffset={8}\n className=\"an-runs-tray__menu w-80 max-w-[calc(100vw-24px)] p-0\"\n >\n <RunsTrayContent\n runs={runs}\n hasRuns={hasRuns}\n activeCount={activeCount}\n terminalCount={terminalCount}\n onDismiss={dismissRun}\n onStop={stopRun}\n onOpenThread={onOpenThread}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nexport function RunsTrayMenuItem({\n pollMs = 3000,\n limit = 5,\n hideWhenIdle = false,\n showRecent = true,\n onOpenThread,\n}: Pick<\n RunsTrayProps,\n \"pollMs\" | \"limit\" | \"hideWhenIdle\" | \"showRecent\" | \"onOpenThread\"\n>) {\n const t = useT();\n const [submenuOpen, setSubmenuOpen] = useState(false);\n const {\n runs,\n hasRuns,\n activeCount,\n failedCount,\n terminalCount,\n triggerLabel,\n TriggerIcon,\n triggerTone,\n dismissRun,\n stopRun,\n } = useRunsTrayState({\n pollMs,\n limit,\n hideWhenIdle,\n showRecent,\n });\n\n if (!hasRuns && hideWhenIdle) return null;\n\n return (\n <DropdownMenuSub open={submenuOpen} onOpenChange={setSubmenuOpen}>\n <DropdownMenuSubTrigger\n aria-label={t(\"runsTray.ariaAgentRuns\", { label: triggerLabel })}\n className=\"cursor-pointer gap-2\"\n onClick={(event) => {\n event.preventDefault();\n setSubmenuOpen(true);\n }}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n setSubmenuOpen(true);\n }\n }}\n >\n <TriggerIcon\n size={14}\n className={cn(triggerTone, activeCount > 0 && \"animate-spin\")}\n aria-hidden\n />\n <span className=\"min-w-0 flex-1 truncate\">\n {t(\"runsTray.agentRuns\")}\n </span>\n {activeCount > 0 ? (\n <span\n aria-label={triggerLabel}\n className=\"rounded-full bg-primary px-1.5 text-[10px] font-medium leading-4 text-primary-foreground\"\n >\n {activeCount > 9 ? \"9+\" : activeCount}\n </span>\n ) : failedCount > 0 ? (\n <span\n aria-label={triggerLabel}\n className=\"rounded-full bg-destructive px-1.5 text-[10px] font-medium leading-4 text-destructive-foreground\"\n >\n {failedCount > 9 ? \"9+\" : failedCount}\n </span>\n ) : null}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent\n sideOffset={6}\n className=\"an-runs-tray__menu w-80 max-w-[calc(100vw-24px)] p-0\"\n >\n <RunsTrayContent\n runs={runs}\n hasRuns={hasRuns}\n activeCount={activeCount}\n terminalCount={terminalCount}\n onDismiss={dismissRun}\n onStop={stopRun}\n onOpenThread={onOpenThread}\n />\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n );\n}\n\nfunction RunsTrayContent({\n runs,\n hasRuns,\n activeCount,\n terminalCount,\n onDismiss,\n onStop,\n onOpenThread,\n}: {\n runs: AgentRunDto[];\n hasRuns: boolean;\n activeCount: number;\n terminalCount: number;\n onDismiss: (runId: string) => void;\n onStop: (runId: string) => void;\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n}) {\n const t = useT();\n return (\n <>\n <div className=\"border-b border-border px-3 py-2\">\n <div className=\"text-sm font-medium text-foreground\">\n {t(\"runsTray.agentRuns\")}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {activeCount > 0\n ? terminalCount > 0\n ? t(\"runsTray.summaryRunningRecent\", {\n activeCount,\n terminalCount,\n })\n : t(\"runsTray.summaryRunning\", { activeCount })\n : hasRuns\n ? t(\"runsTray.summaryRecent\", { count: runs.length })\n : t(\"runsTray.noTrackedWorkYet\")}\n </div>\n </div>\n {hasRuns ? (\n <div className=\"max-h-96 divide-y divide-border overflow-y-auto\">\n {runs.map((run) => (\n <RunRow\n key={run.id}\n run={run}\n onDismiss={onDismiss}\n onStop={onStop}\n onOpenThread={onOpenThread}\n />\n ))}\n </div>\n ) : (\n <div className=\"px-3 py-6 text-center\">\n <IconClock\n size={22}\n className=\"mx-auto text-muted-foreground/50\"\n aria-hidden\n />\n <div className=\"mt-2 text-sm font-medium text-foreground\">\n {t(\"runsTray.noRecentRuns\")}\n </div>\n <p className=\"mt-1 text-xs leading-relaxed text-muted-foreground\">\n {t(\"runsTray.emptyDescription\")}\n </p>\n </div>\n )}\n </>\n );\n}\n\nfunction getRunThreadId(run: AgentRunDto): string | undefined {\n const metadata = run.metadata ?? {};\n const direct =\n typeof metadata.threadId === \"string\"\n ? metadata.threadId\n : typeof metadata.thread_id === \"string\"\n ? metadata.thread_id\n : undefined;\n if (direct?.trim()) return direct.trim();\n\n const surfaceUrl =\n typeof metadata.surfaceUrl === \"string\" ? metadata.surfaceUrl : undefined;\n const match = surfaceUrl?.match(/^agent-native:\\/\\/threads\\/(.+)$/);\n return match?.[1] ? decodeURIComponent(match[1]) : undefined;\n}\n\nfunction formatRunTime(\n run: AgentRunDto,\n t: ReturnType<typeof useT>,\n formatDate: ReturnType<typeof useFormatters>[\"formatDate\"],\n): string {\n const when = run.completedAt ?? run.updatedAt ?? run.startedAt;\n const timestamp = Date.parse(when);\n if (!Number.isFinite(timestamp)) return \"\";\n const diffMs = Date.now() - timestamp;\n const isRunning = run.status === \"running\";\n if (diffMs < 30_000) {\n return t(\n isRunning ? \"runsTray.updatedJustNow\" : \"runsTray.finishedJustNow\",\n );\n }\n const minutes = Math.floor(diffMs / 60_000);\n if (minutes < 60) {\n return t(\n isRunning ? \"runsTray.updatedMinutes\" : \"runsTray.finishedMinutes\",\n {\n count: minutes,\n },\n );\n }\n const hours = Math.floor(minutes / 60);\n if (hours < 24) {\n return t(isRunning ? \"runsTray.updatedHours\" : \"runsTray.finishedHours\", {\n count: hours,\n });\n }\n return t(isRunning ? \"runsTray.updatedDate\" : \"runsTray.finishedDate\", {\n date: formatDate(timestamp, { month: \"short\", day: \"numeric\" }),\n });\n}\n\nfunction isAgentTeamRun(run: AgentRunDto): boolean {\n return (\n typeof run.metadata === \"object\" &&\n run.metadata !== null &&\n (run.metadata as Record<string, unknown>).kind === \"agent-team\"\n );\n}\n\nfunction RunRow({\n run,\n onDismiss,\n onStop,\n onOpenThread,\n}: {\n run: AgentRunDto;\n onDismiss: (runId: string) => void;\n onStop: (runId: string) => void;\n onOpenThread?: (threadId: string, run: AgentRunDto) => void;\n}) {\n const t = useT();\n const { formatDate } = useFormatters();\n const threadId = getRunThreadId(run);\n const isRunning = run.status === \"running\";\n const canStop = isRunning && isAgentTeamRun(run);\n\n return (\n <div className=\"flex flex-col gap-1.5 px-3 py-2.5 text-sm\">\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate font-medium text-foreground\">\n {run.title}\n </div>\n {run.step ? (\n <div className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {run.step}\n </div>\n ) : null}\n </div>\n <StatusPill status={run.status} />\n </div>\n {run.percent != null || isRunning ? (\n <div className=\"h-1 w-full overflow-hidden rounded bg-muted\">\n {run.percent != null ? (\n <div\n className={cn(\n \"h-full origin-left transition-transform duration-200 ease-[var(--ease-collapse)]\",\n run.status === \"failed\"\n ? \"bg-destructive\"\n : run.status === \"cancelled\"\n ? \"bg-muted-foreground/50\"\n : \"bg-primary\",\n )}\n style={{\n transform: `scaleX(${run.percent / 100})`,\n width: \"100%\",\n }}\n />\n ) : (\n <div className=\"h-full w-1/3 animate-pulse bg-primary/60\" />\n )}\n </div>\n ) : null}\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"min-w-0 truncate text-[10px] text-muted-foreground/70\">\n {formatRunTime(run, t, formatDate)}\n </span>\n <div className=\"flex shrink-0 items-center gap-1\">\n {threadId && onOpenThread ? (\n <button\n type=\"button\"\n className=\"inline-flex h-6 items-center gap-1 rounded px-1.5 text-[11px] font-medium text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n onClick={() => onOpenThread(threadId, run)}\n >\n {t(\"runsTray.open\")}\n <IconExternalLink size={12} aria-hidden />\n </button>\n ) : null}\n {canStop ? (\n <button\n type=\"button\"\n aria-label={t(\"runsTray.stopRun\", { title: run.title })}\n className=\"inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-destructive\"\n onClick={() => onStop(run.id)}\n >\n <IconPlayerStop size={13} aria-hidden />\n </button>\n ) : null}\n {!isRunning ? (\n <button\n type=\"button\"\n aria-label={t(\"runsTray.hideRun\", { title: run.title })}\n className=\"inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded text-muted-foreground hover:bg-accent/60 hover:text-foreground\"\n onClick={() => onDismiss(run.id)}\n >\n <IconX size={13} aria-hidden />\n </button>\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\nconst STATUS_COPY_KEYS: Record<ProgressStatus, string> = {\n running: \"runsTray.statusRunning\",\n succeeded: \"runsTray.statusDone\",\n failed: \"runsTray.statusFailed\",\n cancelled: \"runsTray.statusStopped\",\n};\n\nconst STATUS_PILL_STYLES: Record<ProgressStatus, string> = {\n running: \"bg-primary/10 text-primary\",\n succeeded: \"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400\",\n failed: \"bg-destructive/10 text-destructive\",\n cancelled: \"bg-muted text-muted-foreground\",\n};\n\nfunction StatusPill({ status }: { status: ProgressStatus }) {\n const t = useT();\n const { Icon, className } = STATUS_GLYPHS[status];\n const spinClass = status === \"running\" ? \" animate-spin\" : \"\";\n return (\n <span\n className={cn(\n \"inline-flex h-5 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium\",\n STATUS_PILL_STYLES[status],\n )}\n >\n <Icon size={12} className={`${className}${spinClass}`} aria-hidden />\n {t(STATUS_COPY_KEYS[status])}\n </span>\n );\n}\n\n// dark: variants only where there's no semantic token for the colour\n// (e.g. success green isn't in shadcn's default palette).\nconst STATUS_GLYPHS: Record<\n ProgressStatus,\n { Icon: typeof IconLoader2; className: string }\n> = {\n running: { Icon: IconLoader2, className: \"text-primary\" },\n succeeded: {\n Icon: IconCheck,\n className: \"text-emerald-600 dark:text-emerald-400\",\n },\n failed: { Icon: IconAlertCircle, className: \"text-destructive\" },\n cancelled: { Icon: IconClock, className: \"text-muted-foreground\" },\n};\n"]}
@@ -1,8 +1,7 @@
1
1
  /**
2
2
  * <SecretsSection /> — renders the registered secrets from the framework
3
- * secrets registry. Fetches `/_agent-native/secrets` on mount and shows a
4
- * card per secret with a masked input + Save / Rotate / Delete / Test
5
- * buttons (api-key kind) or a Connect / Disconnect button (oauth kind).
3
+ * secrets registry. Configured keys stay compact; adding or editing one
4
+ * progressively discloses its controls.
6
5
  */
7
6
  import React from "react";
8
7
  export interface SecretsSectionProps {
@@ -1 +1 @@
1
- {"version":3,"file":"SecretsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,KAAoD,MAAM,OAAO,CAAC;AAoCzE,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBAmE/D"}
1
+ {"version":3,"file":"SecretsSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SecretsSection.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAoD,MAAM,OAAO,CAAC;AA4CzE,MAAM,WAAW,mBAAmB;IAClC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBA8G/D"}