@agent-native/core 0.108.0 → 0.109.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +18 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/a2a/client.ts +140 -17
  5. package/corpus/core/src/a2a/handlers.ts +60 -0
  6. package/corpus/core/src/a2a/index.ts +6 -1
  7. package/corpus/core/src/a2a/invoke.ts +68 -1
  8. package/corpus/core/src/a2a/server.ts +13 -1
  9. package/corpus/core/src/a2a/types.ts +16 -0
  10. package/corpus/core/src/action.ts +3 -2
  11. package/corpus/core/src/agent/production-agent.ts +10 -4
  12. package/corpus/core/src/client/AssistantChat.tsx +648 -603
  13. package/corpus/core/src/client/MultiTabAssistantChat.tsx +31 -4
  14. package/corpus/core/src/client/agent-chat-adapter.ts +23 -37
  15. package/corpus/core/src/client/agent-sidebar-state.ts +4 -0
  16. package/corpus/core/src/client/analytics.ts +84 -0
  17. package/corpus/core/src/client/chat/message-components.tsx +94 -22
  18. package/corpus/core/src/client/chat/tool-call-display.tsx +170 -47
  19. package/corpus/core/src/client/chat/use-agent-chat-lifecycle-tracking.ts +74 -0
  20. package/corpus/core/src/client/chat-thread-url.ts +11 -0
  21. package/corpus/core/src/client/error-capture.ts +12 -0
  22. package/corpus/core/src/client/extensions/ExtensionSlot.tsx +37 -1
  23. package/corpus/core/src/client/index.ts +2 -0
  24. package/corpus/core/src/client/route-chunk-recovery.ts +20 -8
  25. package/corpus/core/src/client/session-replay.ts +31 -0
  26. package/corpus/core/src/extensions/actions.ts +2 -14
  27. package/corpus/core/src/extensions/store.ts +1 -1
  28. package/corpus/core/src/localization/default-messages.ts +3 -0
  29. package/corpus/core/src/mcp/build-server.ts +2 -2
  30. package/corpus/core/src/progress/actions.ts +4 -2
  31. package/corpus/core/src/provider-api/index.ts +205 -105
  32. package/corpus/core/src/scripts/call-agent.ts +137 -17
  33. package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +40 -0
  34. package/corpus/core/src/server/agent-chat-plugin.ts +31 -0
  35. package/corpus/core/src/styles/agent-conversation.css +7 -0
  36. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +20 -0
  37. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +20 -0
  38. package/corpus/core/src/templates/default/app/i18n/en-US.ts +20 -0
  39. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +20 -0
  40. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
  41. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +19 -0
  42. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +20 -0
  43. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +19 -0
  44. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +20 -0
  45. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +19 -0
  46. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
  47. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
  48. package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
  49. package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
  50. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -10
  51. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +54 -23
  52. package/corpus/templates/analytics/.builder/skills/apollo/SKILL.md +19 -41
  53. package/corpus/templates/analytics/.builder/skills/commonroom/SKILL.md +20 -35
  54. package/corpus/templates/analytics/.builder/skills/github/SKILL.md +23 -67
  55. package/corpus/templates/analytics/.builder/skills/pylon/SKILL.md +25 -43
  56. package/corpus/templates/analytics/AGENTS.md +22 -13
  57. package/corpus/templates/analytics/actions/account-deep-dive.ts +1 -0
  58. package/corpus/templates/analytics/actions/configure-gong-native-insights.ts +29 -0
  59. package/corpus/templates/analytics/actions/content-calendar-schema.ts +8 -4
  60. package/corpus/templates/analytics/actions/content-calendar.ts +12 -4
  61. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -1
  62. package/corpus/templates/analytics/actions/gong-calls.ts +113 -22
  63. package/corpus/templates/analytics/actions/gong-native-insights.ts +166 -0
  64. package/corpus/templates/analytics/actions/hubspot-deals.ts +190 -46
  65. package/corpus/templates/analytics/actions/pylon-issues.ts +123 -0
  66. package/corpus/templates/analytics/actions/slack-messages.ts +179 -27
  67. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +48 -152
  68. package/corpus/templates/analytics/app/components/ui/chart.tsx +1 -1
  69. package/corpus/templates/analytics/app/hooks/use-chart-tooltip-flip.ts +21 -6
  70. package/corpus/templates/analytics/app/i18n/zh-TW.ts +13 -0
  71. package/corpus/templates/analytics/app/i18n-data.ts +134 -0
  72. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +181 -30
  73. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +6 -0
  74. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +4 -3
  75. package/corpus/templates/analytics/changelog/2026-07-17-dashboard-editors-can-add-shared-extensions-or-opt-into-per-.md +6 -0
  76. package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extensions-show-a-loading-skeleton.md +6 -0
  77. package/corpus/templates/analytics/changelog/2026-07-17-errors-now-group-repeat-failures-consistently-and-keep-priva.md +6 -0
  78. package/corpus/templates/analytics/changelog/2026-07-17-gong-transcript-reviews-now-batch-bounded-call-windows-for-f.md +6 -0
  79. package/corpus/templates/analytics/changelog/2026-07-17-hubspot-deal-filters-now-run-in-hubspot-before-paging-result.md +6 -0
  80. package/corpus/templates/analytics/changelog/2026-07-17-notion-content-calendars-now-discover-the-matching-database-.md +6 -0
  81. package/corpus/templates/analytics/changelog/2026-07-17-pylon-dashboard-reads-now-use-the-paginated-issue-search-api.md +6 -0
  82. package/corpus/templates/analytics/changelog/2026-07-17-slack-reads-no-longer-join-channels-and-report-pagination-coverage.md +6 -0
  83. package/corpus/templates/analytics/server/handlers/notion.ts +14 -3
  84. package/corpus/templates/analytics/server/handlers/slack.ts +182 -29
  85. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +2 -6
  86. package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +6 -2
  87. package/corpus/templates/analytics/server/lib/error-capture.ts +75 -8
  88. package/corpus/templates/analytics/server/lib/gong-native-policy.ts +72 -0
  89. package/corpus/templates/analytics/server/lib/gong.ts +54 -66
  90. package/corpus/templates/analytics/server/lib/hubspot.ts +40 -3
  91. package/corpus/templates/analytics/server/lib/notion.ts +83 -8
  92. package/corpus/templates/analytics/server/lib/real-data-actions.ts +4 -0
  93. package/corpus/templates/analytics/server/lib/slack.ts +242 -90
  94. package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -3
  95. package/corpus/templates/analytics/server/routes/api/pylon/accounts.get.ts +42 -1
  96. package/corpus/templates/analytics/server/routes/api/pylon/issues.get.ts +71 -1
  97. package/corpus/templates/analytics/server/routes/api/test-connection.post.ts +44 -4
  98. package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +19 -1
  99. package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +123 -0
  100. package/corpus/templates/clips/app/components/library/library-grid.tsx +42 -4
  101. package/corpus/templates/clips/app/components/library/recording-card.tsx +30 -0
  102. package/corpus/templates/clips/app/entry.client.tsx +6 -1
  103. package/corpus/templates/clips/app/i18n/ar-SA.ts +12 -1
  104. package/corpus/templates/clips/app/i18n/de-DE.ts +12 -1
  105. package/corpus/templates/clips/app/i18n/en-US.ts +12 -1
  106. package/corpus/templates/clips/app/i18n/es-ES.ts +11 -1
  107. package/corpus/templates/clips/app/i18n/fr-FR.ts +11 -1
  108. package/corpus/templates/clips/app/i18n/hi-IN.ts +10 -1
  109. package/corpus/templates/clips/app/i18n/ja-JP.ts +12 -1
  110. package/corpus/templates/clips/app/i18n/ko-KR.ts +11 -1
  111. package/corpus/templates/clips/app/i18n/pt-BR.ts +11 -1
  112. package/corpus/templates/clips/app/i18n/zh-CN.ts +11 -1
  113. package/corpus/templates/clips/app/i18n/zh-TW.ts +11 -1
  114. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +72 -1
  115. package/corpus/templates/clips/changelog/2026-07-17-choose-which-workspace-receives-new-clips-recordings-and-des.md +6 -0
  116. package/corpus/templates/clips/changelog/2026-07-17-create-folders-directly-from-the-move-menu.md +6 -0
  117. package/corpus/templates/clips/changelog/2026-07-17-failed-desktop-uploads-now-offer-a-direct-way-to-reopen-clip.md +6 -0
  118. package/corpus/templates/clips/desktop/src/app.tsx +1 -1
  119. package/corpus/templates/content/app/entry.client.tsx +6 -1
  120. package/corpus/templates/dispatch/AGENTS.md +5 -0
  121. package/corpus/templates/dispatch/changelog/2026-07-17-apps-page-links-to-other-available-apps.md +6 -0
  122. package/corpus/templates/dispatch/changelog/2026-07-17-curated-template-remixes.md +6 -0
  123. package/corpus/templates/mail/app/entry.client.tsx +6 -1
  124. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +11 -7
  125. package/corpus/templates/slides/.env.example +0 -1
  126. package/corpus/templates/slides/AGENTS.md +4 -0
  127. package/corpus/templates/slides/DEVELOPING.md +2 -2
  128. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
  129. package/corpus/templates/slides/actions/logo-config.ts +6 -7
  130. package/corpus/templates/slides/actions/search-images.ts +11 -39
  131. package/corpus/templates/slides/actions/search-logos.ts +5 -52
  132. package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +1 -1
  133. package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +16 -26
  134. package/corpus/templates/slides/app/entry.client.tsx +6 -1
  135. package/corpus/templates/slides/server/lib/media-search-providers.ts +216 -0
  136. package/corpus/templates/slides/server/register-secrets.ts +30 -0
  137. package/dist/a2a/client.d.ts +38 -1
  138. package/dist/a2a/client.d.ts.map +1 -1
  139. package/dist/a2a/client.js +81 -12
  140. package/dist/a2a/client.js.map +1 -1
  141. package/dist/a2a/handlers.d.ts.map +1 -1
  142. package/dist/a2a/handlers.js +47 -0
  143. package/dist/a2a/handlers.js.map +1 -1
  144. package/dist/a2a/index.d.ts +4 -4
  145. package/dist/a2a/index.d.ts.map +1 -1
  146. package/dist/a2a/index.js +2 -2
  147. package/dist/a2a/index.js.map +1 -1
  148. package/dist/a2a/invoke.d.ts +26 -2
  149. package/dist/a2a/invoke.d.ts.map +1 -1
  150. package/dist/a2a/invoke.js +30 -1
  151. package/dist/a2a/invoke.js.map +1 -1
  152. package/dist/a2a/server.d.ts.map +1 -1
  153. package/dist/a2a/server.js +14 -1
  154. package/dist/a2a/server.js.map +1 -1
  155. package/dist/a2a/types.d.ts +12 -0
  156. package/dist/a2a/types.d.ts.map +1 -1
  157. package/dist/a2a/types.js.map +1 -1
  158. package/dist/action.d.ts +3 -2
  159. package/dist/action.d.ts.map +1 -1
  160. package/dist/action.js.map +1 -1
  161. package/dist/agent/production-agent.d.ts +5 -0
  162. package/dist/agent/production-agent.d.ts.map +1 -1
  163. package/dist/agent/production-agent.js +5 -3
  164. package/dist/agent/production-agent.js.map +1 -1
  165. package/dist/client/AssistantChat.d.ts +14 -1
  166. package/dist/client/AssistantChat.d.ts.map +1 -1
  167. package/dist/client/AssistantChat.js +158 -136
  168. package/dist/client/AssistantChat.js.map +1 -1
  169. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  170. package/dist/client/MultiTabAssistantChat.js +27 -4
  171. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  172. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  173. package/dist/client/agent-chat-adapter.js +21 -39
  174. package/dist/client/agent-chat-adapter.js.map +1 -1
  175. package/dist/client/agent-sidebar-state.d.ts +1 -0
  176. package/dist/client/agent-sidebar-state.d.ts.map +1 -1
  177. package/dist/client/agent-sidebar-state.js +4 -0
  178. package/dist/client/agent-sidebar-state.js.map +1 -1
  179. package/dist/client/analytics.d.ts +14 -0
  180. package/dist/client/analytics.d.ts.map +1 -1
  181. package/dist/client/analytics.js +67 -0
  182. package/dist/client/analytics.js.map +1 -1
  183. package/dist/client/chat/message-components.d.ts +8 -0
  184. package/dist/client/chat/message-components.d.ts.map +1 -1
  185. package/dist/client/chat/message-components.js +62 -19
  186. package/dist/client/chat/message-components.js.map +1 -1
  187. package/dist/client/chat/tool-call-display.d.ts +6 -0
  188. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  189. package/dist/client/chat/tool-call-display.js +83 -14
  190. package/dist/client/chat/tool-call-display.js.map +1 -1
  191. package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts +8 -0
  192. package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts.map +1 -0
  193. package/dist/client/chat/use-agent-chat-lifecycle-tracking.js +51 -0
  194. package/dist/client/chat/use-agent-chat-lifecycle-tracking.js.map +1 -0
  195. package/dist/client/chat-thread-url.d.ts +2 -0
  196. package/dist/client/chat-thread-url.d.ts.map +1 -0
  197. package/dist/client/chat-thread-url.js +12 -0
  198. package/dist/client/chat-thread-url.js.map +1 -0
  199. package/dist/client/error-capture.d.ts.map +1 -1
  200. package/dist/client/error-capture.js +7 -0
  201. package/dist/client/error-capture.js.map +1 -1
  202. package/dist/client/extensions/ExtensionSlot.d.ts +3 -1
  203. package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
  204. package/dist/client/extensions/ExtensionSlot.js +28 -3
  205. package/dist/client/extensions/ExtensionSlot.js.map +1 -1
  206. package/dist/client/index.d.ts +1 -1
  207. package/dist/client/index.d.ts.map +1 -1
  208. package/dist/client/index.js +1 -1
  209. package/dist/client/index.js.map +1 -1
  210. package/dist/client/route-chunk-recovery.d.ts.map +1 -1
  211. package/dist/client/route-chunk-recovery.js +14 -9
  212. package/dist/client/route-chunk-recovery.js.map +1 -1
  213. package/dist/client/session-replay.d.ts +15 -0
  214. package/dist/client/session-replay.d.ts.map +1 -1
  215. package/dist/client/session-replay.js +20 -0
  216. package/dist/client/session-replay.js.map +1 -1
  217. package/dist/collab/routes.d.ts +1 -1
  218. package/dist/collab/struct-routes.d.ts +1 -1
  219. package/dist/extensions/actions.d.ts.map +1 -1
  220. package/dist/extensions/actions.js +2 -10
  221. package/dist/extensions/actions.js.map +1 -1
  222. package/dist/extensions/store.js +1 -1
  223. package/dist/extensions/store.js.map +1 -1
  224. package/dist/localization/default-messages.d.ts +3 -0
  225. package/dist/localization/default-messages.d.ts.map +1 -1
  226. package/dist/localization/default-messages.js +3 -0
  227. package/dist/localization/default-messages.js.map +1 -1
  228. package/dist/mcp/build-server.d.ts +2 -0
  229. package/dist/mcp/build-server.d.ts.map +1 -1
  230. package/dist/mcp/build-server.js +2 -2
  231. package/dist/mcp/build-server.js.map +1 -1
  232. package/dist/notifications/routes.d.ts +2 -2
  233. package/dist/observability/routes.d.ts +1 -1
  234. package/dist/progress/actions.d.ts.map +1 -1
  235. package/dist/progress/actions.js +3 -2
  236. package/dist/progress/actions.js.map +1 -1
  237. package/dist/progress/routes.d.ts +1 -1
  238. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  239. package/dist/provider-api/index.d.ts.map +1 -1
  240. package/dist/provider-api/index.js +91 -8
  241. package/dist/provider-api/index.js.map +1 -1
  242. package/dist/resources/handlers.d.ts +2 -2
  243. package/dist/scripts/call-agent.d.ts.map +1 -1
  244. package/dist/scripts/call-agent.js +107 -16
  245. package/dist/scripts/call-agent.js.map +1 -1
  246. package/dist/server/agent-chat/action-filters-a2a.d.ts +6 -0
  247. package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
  248. package/dist/server/agent-chat/action-filters-a2a.js +27 -0
  249. package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
  250. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  251. package/dist/server/agent-chat-plugin.js +27 -1
  252. package/dist/server/agent-chat-plugin.js.map +1 -1
  253. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  254. package/dist/server/transcribe-voice.d.ts +1 -1
  255. package/dist/styles/agent-conversation.css +7 -0
  256. package/dist/templates/default/app/i18n/ar-SA.ts +20 -0
  257. package/dist/templates/default/app/i18n/de-DE.ts +20 -0
  258. package/dist/templates/default/app/i18n/en-US.ts +20 -0
  259. package/dist/templates/default/app/i18n/es-ES.ts +20 -0
  260. package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
  261. package/dist/templates/default/app/i18n/hi-IN.ts +19 -0
  262. package/dist/templates/default/app/i18n/ja-JP.ts +20 -0
  263. package/dist/templates/default/app/i18n/ko-KR.ts +19 -0
  264. package/dist/templates/default/app/i18n/pt-BR.ts +20 -0
  265. package/dist/templates/default/app/i18n/zh-CN.ts +19 -0
  266. package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
  267. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
  268. package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
  269. package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
  270. package/package.json +1 -1
  271. package/src/templates/default/app/i18n/ar-SA.ts +20 -0
  272. package/src/templates/default/app/i18n/de-DE.ts +20 -0
  273. package/src/templates/default/app/i18n/en-US.ts +20 -0
  274. package/src/templates/default/app/i18n/es-ES.ts +20 -0
  275. package/src/templates/default/app/i18n/fr-FR.ts +21 -0
  276. package/src/templates/default/app/i18n/hi-IN.ts +19 -0
  277. package/src/templates/default/app/i18n/ja-JP.ts +20 -0
  278. package/src/templates/default/app/i18n/ko-KR.ts +19 -0
  279. package/src/templates/default/app/i18n/pt-BR.ts +20 -0
  280. package/src/templates/default/app/i18n/zh-CN.ts +19 -0
  281. package/src/templates/default/app/i18n/zh-TW.ts +19 -0
  282. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
  283. package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
  284. package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
  285. package/corpus/templates/analytics/server/handlers/github.ts +0 -200
  286. package/corpus/templates/analytics/server/handlers/pylon.ts +0 -43
  287. package/corpus/templates/analytics/server/lib/apollo.ts +0 -167
  288. package/corpus/templates/analytics/server/lib/commonroom.ts +0 -149
  289. package/corpus/templates/analytics/server/lib/github.ts +0 -660
  290. package/corpus/templates/analytics/server/lib/mixpanel.ts +0 -156
  291. package/corpus/templates/analytics/server/lib/posthog.ts +0 -194
  292. package/corpus/templates/analytics/server/lib/pylon.ts +0 -109
  293. package/corpus/templates/analytics/server/routes/api/github/graphql.post.ts +0 -1
  294. package/corpus/templates/analytics/server/routes/api/github/issue.get.ts +0 -1
  295. package/corpus/templates/analytics/server/routes/api/github/org-prs.get.ts +0 -1
  296. package/corpus/templates/analytics/server/routes/api/github/pr.get.ts +0 -1
  297. package/corpus/templates/analytics/server/routes/api/github/prs.get.ts +0 -1
  298. package/corpus/templates/analytics/server/routes/api/github/search.get.ts +0 -1
  299. package/corpus/templates/slides/actions/fetch-logos.ts +0 -90
  300. package/corpus/templates/slides/actions/image-search.ts +0 -64
  301. package/corpus/templates/slides/actions/import-github.ts +0 -182
  302. package/corpus/templates/slides/actions/logo-lookup.ts +0 -113
@@ -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;AACtD,OAAO,EACL,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,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,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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\";\nexport {\n AgentAskPopover,\n type AgentAskPopoverProps,\n} from \"./AgentAskPopover.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 {\n useDemoModeStatus,\n type DemoModeStatus,\n} from \"./use-demo-mode-status.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 buildSessionReplayIframeBootstrap,\n injectSessionReplayIframeBootstrap,\n} from \"../extensions/session-replay-iframe.js\";\nexport {\n SESSION_REPLAY_IFRAME_ATTRIBUTE,\n SESSION_REPLAY_IFRAME_PROBE,\n SESSION_REPLAY_IFRAME_START,\n SESSION_REPLAY_IFRAME_STOP,\n} from \"../session-replay-iframe-protocol.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 AgentTabsPage,\n type AgentPageExtraTabContext,\n type AgentPageExtraTabFactory,\n type AgentTabsPageProps,\n} from \"./agent-page/AgentTabsPage.js\";\nexport type { AgentPageScope, AgentPageTabProps } from \"./agent-page/types.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 FeatureFlagsEditor,\n evaluatedFeatureFlagValues,\n featureFlagValue,\n useFeatureFlag,\n useFeatureFlags,\n type FeatureFlagActor,\n type FeatureFlagMetadata,\n type FeatureFlagRules,\n type SetFeatureFlagInput,\n} from \"./feature-flags/index.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n getAgentSettingsSearchTabs,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type AgentSettingsSearchTab,\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 setTrackingContentCaptureEnabled,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n setTrackingIdentity,\n getSessionReplayContext,\n getSessionReplayUrl,\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 SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\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 type { ResourcesPanelProps } from \"./resources/ResourcesPanel.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 ReviewCommentComposer,\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSendReviewThreadToAgent,\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 ReviewCommentComposerProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n type SendReviewThreadToAgentInput,\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;AACtD,OAAO,EACL,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,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,6BAA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C3B,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\";\nexport {\n AgentAskPopover,\n type AgentAskPopoverProps,\n} from \"./AgentAskPopover.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 {\n useDemoModeStatus,\n type DemoModeStatus,\n} from \"./use-demo-mode-status.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 buildSessionReplayIframeBootstrap,\n injectSessionReplayIframeBootstrap,\n} from \"../extensions/session-replay-iframe.js\";\nexport {\n SESSION_REPLAY_IFRAME_ATTRIBUTE,\n SESSION_REPLAY_IFRAME_PROBE,\n SESSION_REPLAY_IFRAME_START,\n SESSION_REPLAY_IFRAME_STOP,\n} from \"../session-replay-iframe-protocol.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 AgentTabsPage,\n type AgentPageExtraTabContext,\n type AgentPageExtraTabFactory,\n type AgentTabsPageProps,\n} from \"./agent-page/AgentTabsPage.js\";\nexport type { AgentPageScope, AgentPageTabProps } from \"./agent-page/types.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 FeatureFlagsEditor,\n evaluatedFeatureFlagValues,\n featureFlagValue,\n useFeatureFlag,\n useFeatureFlags,\n type FeatureFlagActor,\n type FeatureFlagMetadata,\n type FeatureFlagRules,\n type SetFeatureFlagInput,\n} from \"./feature-flags/index.js\";\nexport {\n SettingsPanel,\n SettingsTabsPage,\n SecretsSection,\n getAgentSettingsSearchTabs,\n openBuilderConnectPopup,\n useAgentSettingsTabs,\n useBuilderConnectFlow,\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type BuilderConnectStartOptions,\n type BuilderStatus,\n type AgentSettingsSearchTab,\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 trackAgentChatLifecycle,\n trackSessionStatus,\n configureTracking,\n setTrackingContentCaptureEnabled,\n maybeStartSessionReplay,\n startSessionReplay,\n stopSessionReplay,\n getAnalyticsAnonymousId,\n getAnalyticsSessionId,\n getFirstTouchAttribution,\n setSentryUser,\n setTrackingIdentity,\n getSessionReplayContext,\n getSessionReplayUrl,\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 AgentChatLifecycleEvent,\n type ConfigureTrackingOptions,\n type ErrorCaptureConfigOptions,\n type ExceptionBreadcrumb,\n type ExceptionLevel,\n type FirstTouchAttribution,\n type SessionReplayOptions,\n type SessionReplayContext,\n type SessionReplayLinkOptions,\n type SessionReplayStartResult,\n type SessionReplayUrlMatcher,\n type TrackingIdentityUser,\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 type { ResourcesPanelProps } from \"./resources/ResourcesPanel.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 ReviewCommentComposer,\n ReviewStatusBadge,\n ReviewThreadPanel,\n buildReviewThreads,\n useConsumeReviewFeedback,\n useCreateReviewComment,\n useDeleteReviewComment,\n useReplyReviewComment,\n useResolveReviewThread,\n useReviewComments,\n useReviewFeedback,\n useSendReviewThreadToAgent,\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 ReviewCommentComposerProps,\n type ReviewThread,\n type ReviewThreadPanelProps,\n type SetReviewStatusInput,\n type SendReviewThreadToAgentInput,\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":"route-chunk-recovery.d.ts","sourceRoot":"","sources":["../../src/client/route-chunk-recovery.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,6BAA6B,IAAI,uBAAuB,CAQvE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKlE;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAOrE;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,uBAAuB,EAC9B,IAAI,EAAE,MAAM,EACZ,GAAG,SAAa,GACf,IAAI,CAGN;AAED,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,uBAAuB,EAC9B,WAAW,EAAE,MAAM,EACnB,GAAG,SAAa,GACf,MAAM,GAAG,IAAI,CAKf;AA2BD,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,UAAU,GAChB,MAAM,GAAG,IAAI,CAaf;AAsCD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,GAAE,MAAM,GAAG,SAA8D,EAC5E,GAAG,SAAa,GACf,OAAO,CAeT;AAED;;;;GAIG;AACH,wB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AAG,GAAE,MAAM,GAAG,SAA8D,QA+D7E"}
@@ -159,6 +159,14 @@ function recoverToIntendedNavigation(win, state) {
159
159
  hardNavigate(win, target);
160
160
  return true;
161
161
  }
162
+ function recoverFromDynamicImportFailure(win, state, message) {
163
+ if (!isDynamicImportFailureMessage(message))
164
+ return false;
165
+ state.routeModuleFailureAt = Date.now();
166
+ if (recoverToIntendedNavigation(win, state))
167
+ return true;
168
+ return reloadForStaleChunk(win);
169
+ }
162
170
  function patchHistoryMethod(win, state, method) {
163
171
  const original = win.history[method];
164
172
  win.history[method] = function patchedHistoryMethod(...args) {
@@ -227,17 +235,14 @@ export function installRouteChunkRecovery(win = typeof window === "undefined" ?
227
235
  win.addEventListener("unhandledrejection", (event) => {
228
236
  const reason = event.reason;
229
237
  const message = String(reason?.message || reason || "");
230
- if (!isDynamicImportFailureMessage(message))
231
- return;
232
- state.routeModuleFailureAt = Date.now();
233
- if (recoverToIntendedNavigation(win, state)) {
238
+ if (recoverFromDynamicImportFailure(win, state, message)) {
234
239
  event.preventDefault();
235
- return;
236
240
  }
237
- // No fresh cross-route target — the current route's own chunk went stale.
238
- // Reload once (guarded) to fetch fresh assets instead of leaving the user
239
- // on a broken view.
240
- if (reloadForStaleChunk(win)) {
241
+ });
242
+ win.addEventListener("error", (event) => {
243
+ const errorEvent = event;
244
+ const message = String(errorEvent.error?.message || errorEvent.message || "");
245
+ if (recoverFromDynamicImportFailure(win, state, message)) {
241
246
  event.preventDefault();
242
247
  }
243
248
  });
@@ -1 +1 @@
1
- {"version":3,"file":"route-chunk-recovery.js","sourceRoot":"","sources":["../../src/client/route-chunk-recovery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,0CAA0C,CAAC;AAC/D,MAAM,uBAAuB,GAAG,MAAM,CAAC;AACvC,8EAA8E;AAC9E,+EAA+E;AAC/E,uEAAuE;AACvE,MAAM,yBAAyB,GAAG,iCAAiC,CAAC;AACpE,MAAM,8BAA8B,GAAG,MAAM,CAAC;AA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AAC,CAAC,CAAC;IAEH,0EAA0E;IAC1E,6EAA6E;IAC7E,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxD,IAAI,CAAC;QACH,UAAU,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;YACxC,IAAI,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,EAAE,CAAC;gBAC1C,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACxC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC1C,CAAC;YACD,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACZ,CAAC","sourcesContent":["const INSTALL_KEY = \"__agentNativeRouteChunkRecoveryInstalled\";\nconst INTENDED_NAV_MAX_AGE_MS = 15_000;\n// Last-resort reload bookkeeping. Persisted in sessionStorage so the cooldown\n// survives the reload it triggers (the in-memory closure is destroyed), with a\n// window-scoped fallback for environments where sessionStorage throws.\nconst STALE_CHUNK_RELOAD_AT_KEY = \"__agentNativeStaleChunkReloadAt\";\nconst STALE_CHUNK_RELOAD_COOLDOWN_MS = 10_000;\n\nexport interface RouteChunkRecoveryState {\n intendedHref: string | null;\n intendedAt: number;\n routeModuleFailureAt: number;\n recoveryHref: string | null;\n recovering: boolean;\n}\n\nexport function createRouteChunkRecoveryState(): RouteChunkRecoveryState {\n return {\n intendedHref: null,\n intendedAt: 0,\n routeModuleFailureAt: 0,\n recoveryHref: null,\n recovering: false,\n };\n}\n\nexport function isRouteModuleReloadMessage(value: unknown): boolean {\n return (\n typeof value === \"string\" &&\n /Error loading route module `[^`]+`, reloading page\\.\\.\\./.test(value)\n );\n}\n\nexport function isDynamicImportFailureMessage(value: unknown): boolean {\n if (typeof value !== \"string\") return false;\n return (\n value.includes(\"Failed to fetch dynamically imported module\") ||\n value.includes(\"error loading dynamically imported module\") ||\n value.includes(\"Importing a module script failed\")\n );\n}\n\nexport function rememberIntendedNavigation(\n state: RouteChunkRecoveryState,\n href: string,\n now = Date.now(),\n): void {\n state.intendedHref = href;\n state.intendedAt = now;\n}\n\nexport function getFreshIntendedNavigation(\n state: RouteChunkRecoveryState,\n currentHref: string,\n now = Date.now(),\n): string | null {\n if (!state.intendedHref) return null;\n if (now - state.intendedAt > INTENDED_NAV_MAX_AGE_MS) return null;\n if (state.intendedHref === currentHref) return null;\n return state.intendedHref;\n}\n\nfunction anchorFromTarget(\n target: EventTarget | null,\n): HTMLAnchorElement | null {\n let node = target as HTMLElement | null;\n while (node) {\n if (\n node.tagName?.toUpperCase() === \"A\" &&\n typeof (node as HTMLAnchorElement).href === \"string\"\n ) {\n return node as HTMLAnchorElement;\n }\n node = node.parentElement;\n }\n return null;\n}\n\nfunction sameOriginHref(win: Window, href: string): string | null {\n try {\n const url = new URL(href, win.location.href);\n return url.origin === win.location.origin ? url.href : null;\n } catch {\n return null;\n }\n}\n\nexport function intendedHrefFromClick(\n win: Window,\n event: MouseEvent,\n): string | null {\n if (event.defaultPrevented) return null;\n if (event.button !== 0) return null;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return null;\n }\n\n const anchor = anchorFromTarget(event.target);\n if (!anchor) return null;\n if (anchor.hasAttribute(\"download\")) return null;\n const target = anchor.getAttribute(\"target\");\n if (target && target !== \"_self\") return null;\n return sameOriginHref(win, anchor.href);\n}\n\nfunction hardNavigate(win: Window, href: string): void {\n try {\n win.location.assign(href);\n } catch {\n win.location.href = href;\n }\n}\n\nfunction isAgentNativeDesktop(win: Window): boolean {\n return /AgentNativeDesktop/i.test(win.navigator?.userAgent || \"\");\n}\n\nfunction readStaleChunkReloadAt(win: Window): number {\n try {\n const raw = (\n win as unknown as { sessionStorage?: Storage }\n ).sessionStorage?.getItem(STALE_CHUNK_RELOAD_AT_KEY);\n const parsed = raw == null ? NaN : Number(raw);\n if (Number.isFinite(parsed)) return parsed;\n } catch {}\n const mem = (win as unknown as Record<string, unknown>)[\n STALE_CHUNK_RELOAD_AT_KEY\n ];\n return typeof mem === \"number\" ? mem : 0;\n}\n\nfunction markStaleChunkReload(win: Window, now: number): void {\n (win as unknown as Record<string, unknown>)[STALE_CHUNK_RELOAD_AT_KEY] = now;\n try {\n (win as unknown as { sessionStorage?: Storage }).sessionStorage?.setItem(\n STALE_CHUNK_RELOAD_AT_KEY,\n String(now),\n );\n } catch {}\n}\n\n/**\n * Last resort when a stale lazy chunk fails to load for the *current* route —\n * an old tab whose hashed chunk filenames no longer exist after a deploy — and\n * there is no fresh cross-route navigation to recover to. A single guarded\n * reload pulls a fresh index.html plus chunk manifest. A sessionStorage cooldown\n * prevents a reload loop when the chunk is genuinely unreachable (e.g. offline),\n * letting the error surface to Sentry as before in that case.\n *\n * Returns true when a reload was triggered.\n */\nexport function reloadForStaleChunk(\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n now = Date.now(),\n): boolean {\n if (!win?.location) return false;\n // Desktop webviews intentionally stay open across deploys; a forced reload\n // reads as a random tab refresh, matching recoverToIntendedNavigation().\n if (isAgentNativeDesktop(win)) return false;\n const lastReloadAt = readStaleChunkReloadAt(win);\n if (\n lastReloadAt > 0 &&\n now - lastReloadAt <= STALE_CHUNK_RELOAD_COOLDOWN_MS\n ) {\n return false;\n }\n markStaleChunkReload(win, now);\n hardNavigate(win, win.location.href);\n return true;\n}\n\n/**\n * Recover when a caught error (e.g. a `React.lazy` rejection surfaced to an\n * error boundary) is a stale dynamic-import failure. No-op and returns false\n * for any other error so callers can fall through to their normal handling.\n */\nexport function recoverFromStaleChunkError(\n error: unknown,\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n): boolean {\n const message = error instanceof Error ? error.message : String(error ?? \"\");\n if (!isDynamicImportFailureMessage(message)) return false;\n return reloadForStaleChunk(win);\n}\n\nfunction recoverToIntendedNavigation(\n win: Window,\n state: RouteChunkRecoveryState,\n): boolean {\n const target = getFreshIntendedNavigation(state, win.location.href);\n if (!target) return false;\n state.recovering = true;\n state.recoveryHref = target;\n // Desktop webviews stay open across many deploys; a forced navigation here\n // reads as a random tab reload. Leave the current view alive instead.\n if (isAgentNativeDesktop(win)) return true;\n try {\n win.history.replaceState(win.history.state, \"\", target);\n } catch {}\n hardNavigate(win, target);\n return true;\n}\n\nfunction patchHistoryMethod(\n win: Window,\n state: RouteChunkRecoveryState,\n method: \"pushState\" | \"replaceState\",\n): void {\n const original = win.history[method];\n win.history[method] = function patchedHistoryMethod(...args) {\n if (typeof args[2] === \"string\" || args[2] instanceof URL) {\n const href = sameOriginHref(win, String(args[2]));\n if (href) rememberIntendedNavigation(state, href);\n }\n return original.apply(this, args);\n };\n}\n\nfunction patchReload(win: Window, state: RouteChunkRecoveryState): void {\n const originalReload = win.location.reload.bind(win.location);\n const patchedReload = function patchedReload() {\n if (\n isAgentNativeDesktop(win) &&\n Date.now() - state.routeModuleFailureAt <= 1_000\n ) {\n return;\n }\n if (\n state.recoveryHref &&\n Date.now() - state.routeModuleFailureAt <= 1_000\n ) {\n hardNavigate(win, state.recoveryHref);\n return;\n }\n if (\n Date.now() - state.routeModuleFailureAt <= 1_000 &&\n recoverToIntendedNavigation(win, state)\n ) {\n return;\n }\n originalReload();\n };\n\n try {\n Object.defineProperty(win.location, \"reload\", {\n configurable: true,\n value: patchedReload,\n });\n } catch {\n try {\n win.location.reload = patchedReload;\n } catch {}\n }\n}\n\nexport function installRouteChunkRecovery(\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n) {\n const consoleRef = (win as unknown as { console?: Console } | undefined)\n ?.console;\n if (\n !win?.document ||\n !win.location ||\n !win.history ||\n typeof win.addEventListener !== \"function\" ||\n !consoleRef\n ) {\n return;\n }\n\n const installedTarget = win as unknown as Record<string, boolean>;\n if (installedTarget[INSTALL_KEY]) return;\n installedTarget[INSTALL_KEY] = true;\n\n const state = createRouteChunkRecoveryState();\n\n win.document.addEventListener(\n \"click\",\n (event) => {\n const href = intendedHrefFromClick(win, event);\n if (href) rememberIntendedNavigation(state, href);\n },\n true,\n );\n\n patchHistoryMethod(win, state, \"pushState\");\n patchHistoryMethod(win, state, \"replaceState\");\n patchReload(win, state);\n\n win.addEventListener(\"unhandledrejection\", (event) => {\n const reason = (event as PromiseRejectionEvent).reason;\n const message = String(reason?.message || reason || \"\");\n if (!isDynamicImportFailureMessage(message)) return;\n state.routeModuleFailureAt = Date.now();\n if (recoverToIntendedNavigation(win, state)) {\n event.preventDefault();\n return;\n }\n // No fresh cross-route target — the current route's own chunk went stale.\n // Reload once (guarded) to fetch fresh assets instead of leaving the user\n // on a broken view.\n if (reloadForStaleChunk(win)) {\n event.preventDefault();\n }\n });\n\n // React Router catches stale route-module import failures and reloads the\n // current URL. Its console message is the only signal exposed before reload.\n const originalError = consoleRef.error.bind(consoleRef);\n try {\n consoleRef.error = (...args: unknown[]) => {\n if (args.some(isRouteModuleReloadMessage)) {\n state.routeModuleFailureAt = Date.now();\n recoverToIntendedNavigation(win, state);\n }\n originalError(...args);\n };\n } catch {}\n}\n"]}
1
+ {"version":3,"file":"route-chunk-recovery.js","sourceRoot":"","sources":["../../src/client/route-chunk-recovery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,0CAA0C,CAAC;AAC/D,MAAM,uBAAuB,GAAG,MAAM,CAAC;AACvC,8EAA8E;AAC9E,+EAA+E;AAC/E,uEAAuE;AACvE,MAAM,yBAAyB,GAAG,iCAAiC,CAAC;AACpE,MAAM,8BAA8B,GAAG,MAAM,CAAC;AAU9C,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,CAAC;QACb,oBAAoB,EAAE,CAAC;QACvB,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,KAAK;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,OAAO,CACL,OAAO,KAAK,KAAK,QA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CAAC,OAAO,IAAI,EAAE,CACtD,CAAC;QACF,IAAI,+BAA+B,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;YACzD,KAAK,CAAC,cAAc,EAAE,CAAC;QACzB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,0EAA0E;IAC1E,6EAA6E;IAC7E,MAAM,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxD,IAAI,CAAC;QACH,UAAU,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;YACxC,IAAI,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,EAAE,CAAC;gBAC1C,KAAK,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;gBACxC,2BAA2B,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC1C,CAAC;YACD,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;AACZ,CAAC","sourcesContent":["const INSTALL_KEY = \"__agentNativeRouteChunkRecoveryInstalled\";\nconst INTENDED_NAV_MAX_AGE_MS = 15_000;\n// Last-resort reload bookkeeping. Persisted in sessionStorage so the cooldown\n// survives the reload it triggers (the in-memory closure is destroyed), with a\n// window-scoped fallback for environments where sessionStorage throws.\nconst STALE_CHUNK_RELOAD_AT_KEY = \"__agentNativeStaleChunkReloadAt\";\nconst STALE_CHUNK_RELOAD_COOLDOWN_MS = 10_000;\n\nexport interface RouteChunkRecoveryState {\n intendedHref: string | null;\n intendedAt: number;\n routeModuleFailureAt: number;\n recoveryHref: string | null;\n recovering: boolean;\n}\n\nexport function createRouteChunkRecoveryState(): RouteChunkRecoveryState {\n return {\n intendedHref: null,\n intendedAt: 0,\n routeModuleFailureAt: 0,\n recoveryHref: null,\n recovering: false,\n };\n}\n\nexport function isRouteModuleReloadMessage(value: unknown): boolean {\n return (\n typeof value === \"string\" &&\n /Error loading route module `[^`]+`, reloading page\\.\\.\\./.test(value)\n );\n}\n\nexport function isDynamicImportFailureMessage(value: unknown): boolean {\n if (typeof value !== \"string\") return false;\n return (\n value.includes(\"Failed to fetch dynamically imported module\") ||\n value.includes(\"error loading dynamically imported module\") ||\n value.includes(\"Importing a module script failed\")\n );\n}\n\nexport function rememberIntendedNavigation(\n state: RouteChunkRecoveryState,\n href: string,\n now = Date.now(),\n): void {\n state.intendedHref = href;\n state.intendedAt = now;\n}\n\nexport function getFreshIntendedNavigation(\n state: RouteChunkRecoveryState,\n currentHref: string,\n now = Date.now(),\n): string | null {\n if (!state.intendedHref) return null;\n if (now - state.intendedAt > INTENDED_NAV_MAX_AGE_MS) return null;\n if (state.intendedHref === currentHref) return null;\n return state.intendedHref;\n}\n\nfunction anchorFromTarget(\n target: EventTarget | null,\n): HTMLAnchorElement | null {\n let node = target as HTMLElement | null;\n while (node) {\n if (\n node.tagName?.toUpperCase() === \"A\" &&\n typeof (node as HTMLAnchorElement).href === \"string\"\n ) {\n return node as HTMLAnchorElement;\n }\n node = node.parentElement;\n }\n return null;\n}\n\nfunction sameOriginHref(win: Window, href: string): string | null {\n try {\n const url = new URL(href, win.location.href);\n return url.origin === win.location.origin ? url.href : null;\n } catch {\n return null;\n }\n}\n\nexport function intendedHrefFromClick(\n win: Window,\n event: MouseEvent,\n): string | null {\n if (event.defaultPrevented) return null;\n if (event.button !== 0) return null;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {\n return null;\n }\n\n const anchor = anchorFromTarget(event.target);\n if (!anchor) return null;\n if (anchor.hasAttribute(\"download\")) return null;\n const target = anchor.getAttribute(\"target\");\n if (target && target !== \"_self\") return null;\n return sameOriginHref(win, anchor.href);\n}\n\nfunction hardNavigate(win: Window, href: string): void {\n try {\n win.location.assign(href);\n } catch {\n win.location.href = href;\n }\n}\n\nfunction isAgentNativeDesktop(win: Window): boolean {\n return /AgentNativeDesktop/i.test(win.navigator?.userAgent || \"\");\n}\n\nfunction readStaleChunkReloadAt(win: Window): number {\n try {\n const raw = (\n win as unknown as { sessionStorage?: Storage }\n ).sessionStorage?.getItem(STALE_CHUNK_RELOAD_AT_KEY);\n const parsed = raw == null ? NaN : Number(raw);\n if (Number.isFinite(parsed)) return parsed;\n } catch {}\n const mem = (win as unknown as Record<string, unknown>)[\n STALE_CHUNK_RELOAD_AT_KEY\n ];\n return typeof mem === \"number\" ? mem : 0;\n}\n\nfunction markStaleChunkReload(win: Window, now: number): void {\n (win as unknown as Record<string, unknown>)[STALE_CHUNK_RELOAD_AT_KEY] = now;\n try {\n (win as unknown as { sessionStorage?: Storage }).sessionStorage?.setItem(\n STALE_CHUNK_RELOAD_AT_KEY,\n String(now),\n );\n } catch {}\n}\n\n/**\n * Last resort when a stale lazy chunk fails to load for the *current* route —\n * an old tab whose hashed chunk filenames no longer exist after a deploy — and\n * there is no fresh cross-route navigation to recover to. A single guarded\n * reload pulls a fresh index.html plus chunk manifest. A sessionStorage cooldown\n * prevents a reload loop when the chunk is genuinely unreachable (e.g. offline),\n * letting the error surface to Sentry as before in that case.\n *\n * Returns true when a reload was triggered.\n */\nexport function reloadForStaleChunk(\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n now = Date.now(),\n): boolean {\n if (!win?.location) return false;\n // Desktop webviews intentionally stay open across deploys; a forced reload\n // reads as a random tab refresh, matching recoverToIntendedNavigation().\n if (isAgentNativeDesktop(win)) return false;\n const lastReloadAt = readStaleChunkReloadAt(win);\n if (\n lastReloadAt > 0 &&\n now - lastReloadAt <= STALE_CHUNK_RELOAD_COOLDOWN_MS\n ) {\n return false;\n }\n markStaleChunkReload(win, now);\n hardNavigate(win, win.location.href);\n return true;\n}\n\n/**\n * Recover when a caught error (e.g. a `React.lazy` rejection surfaced to an\n * error boundary) is a stale dynamic-import failure. No-op and returns false\n * for any other error so callers can fall through to their normal handling.\n */\nexport function recoverFromStaleChunkError(\n error: unknown,\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n): boolean {\n const message = error instanceof Error ? error.message : String(error ?? \"\");\n if (!isDynamicImportFailureMessage(message)) return false;\n return reloadForStaleChunk(win);\n}\n\nfunction recoverToIntendedNavigation(\n win: Window,\n state: RouteChunkRecoveryState,\n): boolean {\n const target = getFreshIntendedNavigation(state, win.location.href);\n if (!target) return false;\n state.recovering = true;\n state.recoveryHref = target;\n // Desktop webviews stay open across many deploys; a forced navigation here\n // reads as a random tab reload. Leave the current view alive instead.\n if (isAgentNativeDesktop(win)) return true;\n try {\n win.history.replaceState(win.history.state, \"\", target);\n } catch {}\n hardNavigate(win, target);\n return true;\n}\n\nfunction recoverFromDynamicImportFailure(\n win: Window,\n state: RouteChunkRecoveryState,\n message: string,\n): boolean {\n if (!isDynamicImportFailureMessage(message)) return false;\n state.routeModuleFailureAt = Date.now();\n if (recoverToIntendedNavigation(win, state)) return true;\n return reloadForStaleChunk(win);\n}\n\nfunction patchHistoryMethod(\n win: Window,\n state: RouteChunkRecoveryState,\n method: \"pushState\" | \"replaceState\",\n): void {\n const original = win.history[method];\n win.history[method] = function patchedHistoryMethod(...args) {\n if (typeof args[2] === \"string\" || args[2] instanceof URL) {\n const href = sameOriginHref(win, String(args[2]));\n if (href) rememberIntendedNavigation(state, href);\n }\n return original.apply(this, args);\n };\n}\n\nfunction patchReload(win: Window, state: RouteChunkRecoveryState): void {\n const originalReload = win.location.reload.bind(win.location);\n const patchedReload = function patchedReload() {\n if (\n isAgentNativeDesktop(win) &&\n Date.now() - state.routeModuleFailureAt <= 1_000\n ) {\n return;\n }\n if (\n state.recoveryHref &&\n Date.now() - state.routeModuleFailureAt <= 1_000\n ) {\n hardNavigate(win, state.recoveryHref);\n return;\n }\n if (\n Date.now() - state.routeModuleFailureAt <= 1_000 &&\n recoverToIntendedNavigation(win, state)\n ) {\n return;\n }\n originalReload();\n };\n\n try {\n Object.defineProperty(win.location, \"reload\", {\n configurable: true,\n value: patchedReload,\n });\n } catch {\n try {\n win.location.reload = patchedReload;\n } catch {}\n }\n}\n\nexport function installRouteChunkRecovery(\n win: Window | undefined = typeof window === \"undefined\" ? undefined : window,\n) {\n const consoleRef = (win as unknown as { console?: Console } | undefined)\n ?.console;\n if (\n !win?.document ||\n !win.location ||\n !win.history ||\n typeof win.addEventListener !== \"function\" ||\n !consoleRef\n ) {\n return;\n }\n\n const installedTarget = win as unknown as Record<string, boolean>;\n if (installedTarget[INSTALL_KEY]) return;\n installedTarget[INSTALL_KEY] = true;\n\n const state = createRouteChunkRecoveryState();\n\n win.document.addEventListener(\n \"click\",\n (event) => {\n const href = intendedHrefFromClick(win, event);\n if (href) rememberIntendedNavigation(state, href);\n },\n true,\n );\n\n patchHistoryMethod(win, state, \"pushState\");\n patchHistoryMethod(win, state, \"replaceState\");\n patchReload(win, state);\n\n win.addEventListener(\"unhandledrejection\", (event) => {\n const reason = (event as PromiseRejectionEvent).reason;\n const message = String(reason?.message || reason || \"\");\n if (recoverFromDynamicImportFailure(win, state, message)) {\n event.preventDefault();\n }\n });\n\n win.addEventListener(\"error\", (event) => {\n const errorEvent = event as ErrorEvent;\n const message = String(\n errorEvent.error?.message || errorEvent.message || \"\",\n );\n if (recoverFromDynamicImportFailure(win, state, message)) {\n event.preventDefault();\n }\n });\n\n // React Router catches stale route-module import failures and reloads the\n // current URL. Its console message is the only signal exposed before reload.\n const originalError = consoleRef.error.bind(consoleRef);\n try {\n consoleRef.error = (...args: unknown[]) => {\n if (args.some(isRouteModuleReloadMessage)) {\n state.routeModuleFailureAt = Date.now();\n recoverToIntendedNavigation(win, state);\n }\n originalError(...args);\n };\n } catch {}\n}\n"]}
@@ -113,6 +113,8 @@ export interface SessionReplayStartResult {
113
113
  export declare const SESSION_REPLAY_CONSOLE_EVENT_TAG = "agent-native.console";
114
114
  /** rrweb custom-event tag for captured fetch/XHR request summaries. */
115
115
  export declare const SESSION_REPLAY_NETWORK_EVENT_TAG = "agent-native.network";
116
+ /** Content-free agent-chat lifecycle markers for replay incident forensics. */
117
+ export declare const SESSION_REPLAY_AGENT_CHAT_EVENT_TAG = "agent-native.chat";
116
118
  export declare function getSessionReplaySamplingScore(sessionId: string, salt?: string): number;
117
119
  export declare function shouldSampleSessionReplay(sessionId: string, sampleRate?: number, salt?: string): boolean;
118
120
  export declare function flushSessionReplay(reason?: string): Promise<void>;
@@ -155,4 +157,17 @@ export declare function emitSessionReplayException(input: {
155
157
  stack?: string;
156
158
  url?: string;
157
159
  }): void;
160
+ export type SessionReplayAgentChatEvent = {
161
+ phase: "surface-mounted" | "run-observed" | "run-stopped";
162
+ surface: string;
163
+ threadId?: string;
164
+ runId?: string;
165
+ tabId?: string;
166
+ };
167
+ /**
168
+ * Add a content-free chat lifecycle marker to the active replay. The payload
169
+ * deliberately accepts only ids and low-cardinality state; prompt/response
170
+ * content must never enter replay diagnostics through this path.
171
+ */
172
+ export declare function emitSessionReplayAgentChatEvent(input: SessionReplayAgentChatEvent): void;
158
173
  //# sourceMappingURL=session-replay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-replay.d.ts","sourceRoot":"","sources":["../../src/client/session-replay.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,MAAM,GACN,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;AAgH/B,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,OAA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;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAqBP;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,EAAE,iBAAiB,GAAG,cAAc,GAAG,aAAa,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,2BAA2B,GACjC,IAAI,CAYN"}
@@ -71,6 +71,8 @@ const SESSION_REPLAY_CLAIM_TIMEOUT_MS = 150;
71
71
  export const SESSION_REPLAY_CONSOLE_EVENT_TAG = "agent-native.console";
72
72
  /** rrweb custom-event tag for captured fetch/XHR request summaries. */
73
73
  export const SESSION_REPLAY_NETWORK_EVENT_TAG = "agent-native.network";
74
+ /** Content-free agent-chat lifecycle markers for replay incident forensics. */
75
+ export const SESSION_REPLAY_AGENT_CHAT_EVENT_TAG = "agent-native.chat";
74
76
  const DEFAULT_MAX_CONSOLE_EVENTS = 1000;
75
77
  const DEFAULT_MAX_NETWORK_EVENTS = 2000;
76
78
  const MAX_CONSOLE_MESSAGE_LENGTH = 500;
@@ -2592,4 +2594,22 @@ export function emitSessionReplayException(input) {
2592
2594
  ...(input.url ? { url: input.url } : {}),
2593
2595
  });
2594
2596
  }
2597
+ /**
2598
+ * Add a content-free chat lifecycle marker to the active replay. The payload
2599
+ * deliberately accepts only ids and low-cardinality state; prompt/response
2600
+ * content must never enter replay diagnostics through this path.
2601
+ */
2602
+ export function emitSessionReplayAgentChatEvent(input) {
2603
+ const state = getState();
2604
+ if (!state.active || !state.addCustomEvent)
2605
+ return;
2606
+ const bounded = (value, max = 160) => value?.trim().slice(0, max) || undefined;
2607
+ emitReplayCustomEvent(state, SESSION_REPLAY_AGENT_CHAT_EVENT_TAG, {
2608
+ phase: input.phase,
2609
+ surface: bounded(input.surface, 80) ?? "app",
2610
+ ...(bounded(input.threadId) ? { threadId: bounded(input.threadId) } : {}),
2611
+ ...(bounded(input.runId) ? { runId: bounded(input.runId) } : {}),
2612
+ ...(bounded(input.tabId) ? { tabId: bounded(input.tabId) } : {}),
2613
+ });
2614
+ }
2595
2615
  //# sourceMappingURL=session-replay.js.map