@agent-native/core 0.98.0 → 0.98.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +24 -0
  3. package/corpus/core/package.json +2 -2
  4. package/corpus/core/src/action-change-marker.ts +8 -1
  5. package/corpus/core/src/changelog/parse.ts +8 -3
  6. package/corpus/core/src/client/AgentPanel.tsx +2 -3
  7. package/corpus/core/src/client/AssistantChat.tsx +83 -39
  8. package/corpus/core/src/client/analytics.ts +29 -0
  9. package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +16 -2
  10. package/corpus/core/src/client/chat-model-groups.ts +28 -0
  11. package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +442 -85
  12. package/corpus/core/src/client/composer/TiptapComposer.tsx +46 -29
  13. package/corpus/core/src/client/composer/VoiceButton.tsx +2 -1
  14. package/corpus/core/src/client/composer/index.ts +5 -0
  15. package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +1206 -67
  16. package/corpus/core/src/client/index.ts +5 -0
  17. package/corpus/core/src/client/progress/RunsTray.tsx +13 -1
  18. package/corpus/core/src/client/settings/SecretsSection.tsx +387 -266
  19. package/corpus/core/src/client/settings/SettingsPanel.tsx +117 -38
  20. package/corpus/core/src/client/use-action.ts +12 -0
  21. package/corpus/core/src/client/use-agent-chat-home-handoff.ts +8 -1
  22. package/corpus/core/src/client/use-agent-engine-configured.ts +17 -3
  23. package/corpus/core/src/client/use-db-sync.ts +84 -34
  24. package/corpus/core/src/client/use-pausing-interval.ts +14 -4
  25. package/corpus/core/src/integrations/scope-store.ts +1 -1
  26. package/corpus/core/src/integrations/usage-budget-store.ts +1 -1
  27. package/corpus/core/src/localization/default-messages.ts +44 -1
  28. package/corpus/core/src/mcp-client/workspace-servers.ts +4 -4
  29. package/corpus/core/src/secrets/crypto.ts +28 -8
  30. package/corpus/core/src/server/action-change.ts +5 -1
  31. package/corpus/core/src/server/action-routes.ts +8 -0
  32. package/corpus/core/src/server/poll.ts +1 -0
  33. package/corpus/core/src/server/realtime-voice.ts +299 -13
  34. package/corpus/core/src/styles/agent-native.css +2 -2
  35. package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  36. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  37. package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  38. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
  39. package/corpus/core/src/vite/client.ts +9 -1
  40. package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +2 -2
  41. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +10 -5
  42. package/corpus/templates/analytics/AGENTS.md +9 -13
  43. package/corpus/templates/analytics/actions/navigate.ts +59 -5
  44. package/corpus/templates/analytics/actions/view-screen.ts +3 -6
  45. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +20 -3
  46. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
  47. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
  48. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +21 -6
  49. package/corpus/templates/analytics/app/global.css +19 -20
  50. package/corpus/templates/analytics/app/lib/provider-corpus-job-sync.ts +26 -0
  51. package/corpus/templates/analytics/app/pages/Settings.tsx +35 -341
  52. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +38 -7
  53. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +1 -1
  54. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +3 -0
  55. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +333 -272
  56. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +72 -17
  57. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +297 -108
  58. package/corpus/templates/analytics/app/root.tsx +28 -8
  59. package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +2 -1
  60. package/corpus/templates/analytics/changelog/2026-06-25-referrer-dashboard-panels-show-external-domains.md +2 -1
  61. package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +1 -0
  62. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +1 -0
  63. package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +1 -0
  64. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +1 -0
  65. package/corpus/templates/analytics/changelog/2026-07-11-analytics-no-longer-repeatedly-restarts-background-requests-.md +6 -0
  66. package/corpus/templates/analytics/changelog/2026-07-11-analytics-only-asks-for-replay-storage-when-you-enable-sessi.md +6 -0
  67. package/corpus/templates/analytics/changelog/2026-07-11-charts-now-show-their-loading-skeleton-while-refreshing.md +6 -0
  68. package/corpus/templates/analytics/changelog/2026-07-11-realtime-voice-now-shows-a-clear-connection-indicator-comple.md +6 -0
  69. package/corpus/templates/analytics/changelog/2026-07-11-replay-event-counts-stay-hidden-until-recordings-finish-load.md +6 -0
  70. package/corpus/templates/analytics/changelog/2026-07-11-replay-storage-key-mismatches-show-actionable-setup-guidance.md +6 -0
  71. package/corpus/templates/analytics/changelog/2026-07-11-replay-timelines-group-continuous-scrolling-and-dev-tools-co.md +6 -0
  72. package/corpus/templates/analytics/changelog/2026-07-11-session-filters-now-stay-compact-in-a-settings-menu-at-mediu.md +6 -0
  73. package/corpus/templates/analytics/changelog/2026-07-11-session-replay-console-errors-now-link-to-matching-issues-or.md +6 -0
  74. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-load-large-recordings-faster-and-surface-fai.md +6 -0
  75. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-preserve-recorded-styles-and-viewport-layout.md +6 -0
  76. package/corpus/templates/analytics/changelog/2026-07-11-session-replays-stay-centered-instead-of-clipping-wide-recor.md +6 -0
  77. package/corpus/templates/analytics/package.json +1 -1
  78. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -303
  79. package/corpus/templates/analytics/server/handlers/session-replay.ts +57 -0
  80. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
  81. package/corpus/templates/analytics/server/lib/demo-dashboards.ts +16 -3
  82. package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +12 -0
  83. package/corpus/templates/analytics/server/lib/session-replay.ts +208 -2
  84. package/corpus/templates/analytics/server/plugins/onboarding.ts +7 -79
  85. package/corpus/templates/analytics/server/routes/api/session-replay/recordings/[recordingId]/chunks.get.ts +1 -0
  86. package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +2 -2
  87. package/corpus/templates/assets/app/global.css +4 -4
  88. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +0 -1
  89. package/corpus/templates/assets/app/routes/library.tsx +0 -1
  90. package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +2 -2
  91. package/corpus/templates/brain/app/global.css +5 -5
  92. package/corpus/templates/brain/app/root.tsx +0 -3
  93. package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +2 -2
  94. package/corpus/templates/calendar/app/root.tsx +1 -0
  95. package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +2 -2
  96. package/corpus/templates/clips/app/hooks/use-auto-title.ts +74 -8
  97. package/corpus/templates/clips/app/hooks/use-library.ts +12 -25
  98. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +20 -22
  99. package/corpus/templates/clips/changelog/2026-07-11-generated-titles-no-longer-cause-continuous-background-refreshes.md +6 -0
  100. package/corpus/templates/clips/changelog/2026-07-11-s3-storage-setup-stays-collapsed-until-you-choose-it-as-the-.md +6 -0
  101. package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +2 -2
  102. package/corpus/templates/content/app/hooks/use-comments.ts +0 -1
  103. package/corpus/templates/content/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
  104. package/corpus/templates/design/app/components/layout/Header.tsx +1 -1
  105. package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +2 -2
  106. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -2
  107. package/corpus/templates/macros/app/root.tsx +0 -3
  108. package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +2 -2
  109. package/corpus/templates/mail/app/hooks/use-compose-state.ts +1 -0
  110. package/corpus/templates/mail/app/root.tsx +1 -12
  111. package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +2 -2
  112. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -2
  113. package/corpus/templates/plan/app/hooks/use-plans.ts +6 -13
  114. package/corpus/templates/plan/app/pages/PlansPage.tsx +5 -27
  115. package/corpus/templates/plan/changelog/2026-07-11-plan-refreshes-only-when-content-changes.md +6 -0
  116. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +4 -1
  117. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -1
  118. package/corpus/templates/slides/app/components/layout/Header.tsx +1 -1
  119. package/corpus/templates/slides/app/context/DeckContext.tsx +1 -0
  120. package/corpus/templates/slides/app/hooks/use-slide-comments.ts +7 -31
  121. package/corpus/templates/slides/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
  122. package/dist/action-change-marker.d.ts +1 -0
  123. package/dist/action-change-marker.d.ts.map +1 -1
  124. package/dist/action-change-marker.js +7 -1
  125. package/dist/action-change-marker.js.map +1 -1
  126. package/dist/changelog/parse.d.ts +4 -2
  127. package/dist/changelog/parse.d.ts.map +1 -1
  128. package/dist/changelog/parse.js +5 -3
  129. package/dist/changelog/parse.js.map +1 -1
  130. package/dist/client/AgentPanel.d.ts.map +1 -1
  131. package/dist/client/AgentPanel.js +2 -3
  132. package/dist/client/AgentPanel.js.map +1 -1
  133. package/dist/client/AssistantChat.d.ts +7 -0
  134. package/dist/client/AssistantChat.d.ts.map +1 -1
  135. package/dist/client/AssistantChat.js +62 -40
  136. package/dist/client/AssistantChat.js.map +1 -1
  137. package/dist/client/analytics.d.ts.map +1 -1
  138. package/dist/client/analytics.js +26 -0
  139. package/dist/client/analytics.js.map +1 -1
  140. package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
  141. package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
  142. package/dist/client/blocks/library/wireframe-kit.js +9 -2
  143. package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
  144. package/dist/client/chat-model-groups.d.ts.map +1 -1
  145. package/dist/client/chat-model-groups.js +24 -0
  146. package/dist/client/chat-model-groups.js.map +1 -1
  147. package/dist/client/composer/RealtimeVoiceMode.d.ts +40 -4
  148. package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
  149. package/dist/client/composer/RealtimeVoiceMode.js +172 -42
  150. package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
  151. package/dist/client/composer/TiptapComposer.d.ts +4 -0
  152. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  153. package/dist/client/composer/TiptapComposer.js +47 -29
  154. package/dist/client/composer/TiptapComposer.js.map +1 -1
  155. package/dist/client/composer/VoiceButton.d.ts.map +1 -1
  156. package/dist/client/composer/VoiceButton.js +2 -2
  157. package/dist/client/composer/VoiceButton.js.map +1 -1
  158. package/dist/client/composer/index.d.ts +2 -2
  159. package/dist/client/composer/index.d.ts.map +1 -1
  160. package/dist/client/composer/index.js +1 -1
  161. package/dist/client/composer/index.js.map +1 -1
  162. package/dist/client/composer/useRealtimeVoiceMode.d.ts +100 -3
  163. package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
  164. package/dist/client/composer/useRealtimeVoiceMode.js +952 -51
  165. package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
  166. package/dist/client/index.d.ts +1 -1
  167. package/dist/client/index.d.ts.map +1 -1
  168. package/dist/client/index.js +1 -1
  169. package/dist/client/index.js.map +1 -1
  170. package/dist/client/progress/RunsTray.d.ts.map +1 -1
  171. package/dist/client/progress/RunsTray.js +10 -1
  172. package/dist/client/progress/RunsTray.js.map +1 -1
  173. package/dist/client/settings/SecretsSection.d.ts +2 -3
  174. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  175. package/dist/client/settings/SecretsSection.js +46 -22
  176. package/dist/client/settings/SecretsSection.js.map +1 -1
  177. package/dist/client/settings/SettingsPanel.d.ts +9 -0
  178. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  179. package/dist/client/settings/SettingsPanel.js +46 -12
  180. package/dist/client/settings/SettingsPanel.js.map +1 -1
  181. package/dist/client/use-action.d.ts +2 -0
  182. package/dist/client/use-action.d.ts.map +1 -1
  183. package/dist/client/use-action.js +10 -0
  184. package/dist/client/use-action.js.map +1 -1
  185. package/dist/client/use-agent-chat-home-handoff.d.ts +2 -0
  186. package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
  187. package/dist/client/use-agent-chat-home-handoff.js +7 -1
  188. package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
  189. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  190. package/dist/client/use-agent-engine-configured.js +17 -3
  191. package/dist/client/use-agent-engine-configured.js.map +1 -1
  192. package/dist/client/use-db-sync.d.ts +8 -2
  193. package/dist/client/use-db-sync.d.ts.map +1 -1
  194. package/dist/client/use-db-sync.js +57 -32
  195. package/dist/client/use-db-sync.js.map +1 -1
  196. package/dist/client/use-pausing-interval.d.ts.map +1 -1
  197. package/dist/client/use-pausing-interval.js +16 -4
  198. package/dist/client/use-pausing-interval.js.map +1 -1
  199. package/dist/integrations/scope-store.js +1 -1
  200. package/dist/integrations/scope-store.js.map +1 -1
  201. package/dist/integrations/usage-budget-store.js +1 -1
  202. package/dist/integrations/usage-budget-store.js.map +1 -1
  203. package/dist/localization/default-messages.d.ts +41 -1
  204. package/dist/localization/default-messages.d.ts.map +1 -1
  205. package/dist/localization/default-messages.js +41 -1
  206. package/dist/localization/default-messages.js.map +1 -1
  207. package/dist/mcp-client/workspace-servers.js +4 -4
  208. package/dist/mcp-client/workspace-servers.js.map +1 -1
  209. package/dist/observability/routes.d.ts +5 -5
  210. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  211. package/dist/secrets/crypto.d.ts +7 -6
  212. package/dist/secrets/crypto.d.ts.map +1 -1
  213. package/dist/secrets/crypto.js +30 -11
  214. package/dist/secrets/crypto.js.map +1 -1
  215. package/dist/secrets/routes.d.ts +9 -9
  216. package/dist/server/action-change.d.ts +1 -0
  217. package/dist/server/action-change.d.ts.map +1 -1
  218. package/dist/server/action-change.js +4 -1
  219. package/dist/server/action-change.js.map +1 -1
  220. package/dist/server/action-routes.d.ts.map +1 -1
  221. package/dist/server/action-routes.js +5 -0
  222. package/dist/server/action-routes.js.map +1 -1
  223. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  224. package/dist/server/poll.d.ts.map +1 -1
  225. package/dist/server/poll.js +1 -0
  226. package/dist/server/poll.js.map +1 -1
  227. package/dist/server/realtime-voice.d.ts +7 -0
  228. package/dist/server/realtime-voice.d.ts.map +1 -1
  229. package/dist/server/realtime-voice.js +222 -12
  230. package/dist/server/realtime-voice.js.map +1 -1
  231. package/dist/styles/agent-native.css +2 -2
  232. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  233. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  234. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  235. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
  236. package/dist/vite/client.d.ts.map +1 -1
  237. package/dist/vite/client.js +6 -1
  238. package/dist/vite/client.js.map +1 -1
  239. package/package.json +2 -2
  240. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
  241. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
  242. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
  243. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
package/corpus/README.md CHANGED
@@ -28,4 +28,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
  ## Generated Counts
29
29
 
30
30
  - core files: 2233
31
- - template files: 5456
31
+ - template files: 5475
@@ -1,5 +1,29 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.98.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ee7b5b3: Keep assistant chat's duplicate-message recovery installed when assistant-ui swaps the underlying thread runtime during reconnects or thread changes.
8
+ - ee7b5b3: Use the browser's preferred language for more accurate realtime voice transcripts.
9
+ - ee7b5b3: Prevent chat and realtime voice from starting before AI provider readiness is known, and reliably surface setup when no provider is connected.
10
+ - ee7b5b3: Update the session replay recorder to the latest stable rrweb release for more faithful browser capture.
11
+ - ee7b5b3: Skip degenerate hand-drawn frame paths that can overflow the browser call stack while a visual block is still measuring.
12
+ - ee7b5b3: Type nullable organization parameters in integration scope, budget, and workspace MCP queries so PostgreSQL can reliably prepare them.
13
+ - ee7b5b3: Prevent sync-driven request storms by preserving in-flight reads, filtering same-tab action echoes, targeting action-query invalidation, refreshing shared run state from change events, and backing idle Dispatch monitoring away from fixed polling.
14
+ - ee7b5b3: Reduce the width and height of centered full-page chat composers for a more compact starting state.
15
+ - ee7b5b3: Use dated changelog filenames when a hand-written entry omits its release date.
16
+ - ee7b5b3: Polish realtime voice settings, keep them open while using nested pickers, and add live microphone selection.
17
+ - ee7b5b3: Show the full Builder model catalog in the app default model setting instead of filtering suggestions to the current model.
18
+ - ee7b5b3: Support app-scoped encryption keys so multi-app development environments can safely read each app's encrypted data.
19
+ - ee7b5b3: Keep full-page chat open when a user navigates to Settings.
20
+ - ee7b5b3: Keep API key settings compact and move unconfigured providers and custom credentials behind a single New menu.
21
+ - ee7b5b3: Ignore expected browser autoplay-policy rejections emitted by recorded media during session replay playback.
22
+ - ee7b5b3: Let realtime voice discover and load app tools on demand while preserving guarded action execution.
23
+ - ee7b5b3: Prevent the agent prompt composer from crashing when a destroyed editor reconnects after remount or browser history restoration.
24
+ - ee7b5b3: Keep realtime voice waveforms visible between turns, show a clear connection spinner, complete the spoken ready greeting, prioritize navigation tools, flatten the orb into a translucent surface, preserve chronological voice transcripts, improve transcription language accuracy, keep popovers and the voice dock clear of the agent panel, and add in-call language, intelligence, and voice controls.
25
+ - ee7b5b3: Simplify the chat model picker to Claude, OpenAI, Gemini, and OpenRouter, with OpenRouter listed last.
26
+
3
27
  ## 0.98.0
4
28
 
5
29
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.98.0",
3
+ "version": "0.98.1",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -278,7 +278,7 @@
278
278
  "@react-router/dev": "^8.1.0",
279
279
  "@react-router/fs-routes": "^8.1.0",
280
280
  "@resvg/resvg-js": "^2.6.2",
281
- "@rrweb/record": "2.0.1",
281
+ "@rrweb/record": "2.1.0",
282
282
  "@sentry/browser": "10.60.0",
283
283
  "@sentry/node": "10.60.0",
284
284
  "@shadcn/react": "^0.2.0",
@@ -5,6 +5,7 @@ export interface ActionChangeTarget {
5
5
  actionName?: string;
6
6
  owner?: string;
7
7
  orgId?: string;
8
+ requestSource?: string;
8
9
  }
9
10
 
10
11
  export function actionChangeMarkerSession(
@@ -23,6 +24,7 @@ export function actionChangeMarkerValue(
23
24
  ...(target.actionName ? { actionName: target.actionName } : {}),
24
25
  ...(target.owner ? { owner: target.owner } : {}),
25
26
  ...(target.orgId ? { orgId: target.orgId } : {}),
27
+ ...(target.requestSource ? { requestSource: target.requestSource } : {}),
26
28
  };
27
29
  }
28
30
 
@@ -42,6 +44,7 @@ export function parseActionChangeMarker(
42
44
  let actionName: string | undefined;
43
45
  let owner: string | undefined;
44
46
  let orgId: string | undefined;
47
+ let requestSource: string | undefined;
45
48
 
46
49
  if (parsed && typeof parsed === "object") {
47
50
  const record = parsed as Record<string, unknown>;
@@ -49,6 +52,10 @@ export function parseActionChangeMarker(
49
52
  typeof record.actionName === "string" ? record.actionName : undefined;
50
53
  owner = typeof record.owner === "string" ? record.owner : undefined;
51
54
  orgId = typeof record.orgId === "string" ? record.orgId : undefined;
55
+ requestSource =
56
+ typeof record.requestSource === "string"
57
+ ? record.requestSource
58
+ : undefined;
52
59
  }
53
60
 
54
61
  if (!owner && !orgId && typeof sessionId === "string" && sessionId) {
@@ -63,5 +70,5 @@ export function parseActionChangeMarker(
63
70
  }
64
71
 
65
72
  if (!actionName && !owner && !orgId) return null;
66
- return { actionName, owner, orgId };
73
+ return { actionName, owner, orgId, requestSource };
67
74
  }
@@ -154,9 +154,14 @@ function stripBrackets(title: string): string {
154
154
 
155
155
  /**
156
156
  * Parse a pending `changelog/<file>.md` entry: optional `---` frontmatter
157
- * (`type:` / `date:`) followed by the markdown description body.
157
+ * (`type:` / `date:`) followed by the markdown description body. Callers that
158
+ * know the entry filename can provide its date as a fallback for hand-written
159
+ * entries that omit `date:`.
158
160
  */
159
- export function parsePendingEntry(content: string): PendingChangelogEntry {
161
+ export function parsePendingEntry(
162
+ content: string,
163
+ fallbackDate?: string,
164
+ ): PendingChangelogEntry {
160
165
  let type: string | undefined;
161
166
  let date: string | undefined;
162
167
  let body = content;
@@ -176,7 +181,7 @@ export function parsePendingEntry(content: string): PendingChangelogEntry {
176
181
 
177
182
  return {
178
183
  type: normalizeType(type),
179
- date,
184
+ date: date?.match(ISO_DATE)?.[1] ?? fallbackDate?.match(ISO_DATE)?.[1],
180
185
  text: body.trim(),
181
186
  };
182
187
  }
@@ -1271,7 +1271,7 @@ function AgentPanelInner({
1271
1271
  )}
1272
1272
  {mode === "chat" && (
1273
1273
  <RunsTrayMenuItem
1274
- pollMs={2000}
1274
+ pollMs={0}
1275
1275
  limit={12}
1276
1276
  showRecent={true}
1277
1277
  onOpenThread={openRunThread}
@@ -1986,7 +1986,7 @@ const SIDEBAR_ANIMATION_MS = 260;
1986
1986
  const SIDEBAR_OVERLAY_Z_INDEX = 70;
1987
1987
  const SIDEBAR_FULLSCREEN_Z_INDEX = 90;
1988
1988
  /** Max width of the centered chat column in fullscreen mode (Claude-style). */
1989
- const FULLSCREEN_CONTENT_MAX_PX = 760;
1989
+ const FULLSCREEN_CONTENT_MAX_PX = 570;
1990
1990
 
1991
1991
  function ResizeHandle({
1992
1992
  position,
@@ -2194,7 +2194,6 @@ function URLSync({ browserTabId }: { browserTabId?: string }) {
2194
2194
  return null;
2195
2195
  }
2196
2196
  },
2197
- refetchInterval: 2_000,
2198
2197
  retry: false,
2199
2198
  });
2200
2199
 
@@ -170,6 +170,7 @@ import {
170
170
  GuidedQuestionFlow,
171
171
  useGuidedQuestionFlow,
172
172
  } from "./guided-questions.js";
173
+ import { useT } from "./i18n.js";
173
174
  import {
174
175
  AgentAutoContinueSignal,
175
176
  type ContentPart,
@@ -388,6 +389,63 @@ function isAssistantUiDuplicateMessageIdError(error: unknown): boolean {
388
389
  );
389
390
  }
390
391
 
392
+ type AssistantUiMessageRepository = {
393
+ addOrUpdateMessage: (parentId: unknown, message: unknown) => unknown;
394
+ __agentNativePatched?: boolean;
395
+ head?: { current?: { id?: string } } | null;
396
+ };
397
+
398
+ type AssistantUiThreadBinding = {
399
+ getState?: () => { repository?: AssistantUiMessageRepository };
400
+ outerSubscribe?: (callback: () => void) => void | (() => void);
401
+ };
402
+
403
+ /**
404
+ * Keep the assistant-ui repository race recovery installed across runtime-core
405
+ * replacements. The public ThreadRuntime object stays stable when its binding
406
+ * swaps to another local runtime (thread activation, reconnect, history load),
407
+ * but each core owns a different MessageRepository instance.
408
+ */
409
+ export function installAssistantUiMessageRepositoryRecovery(
410
+ threadRuntime: unknown,
411
+ ): () => void {
412
+ const binding = (
413
+ threadRuntime as {
414
+ __internal_threadBinding?: AssistantUiThreadBinding;
415
+ }
416
+ )?.__internal_threadBinding;
417
+ if (!binding?.getState) return () => {};
418
+
419
+ const patchCurrentRepository = () => {
420
+ const repo = binding.getState?.()?.repository;
421
+ if (!repo || typeof repo.addOrUpdateMessage !== "function") return;
422
+ if (repo.__agentNativePatched) return;
423
+ repo.__agentNativePatched = true;
424
+ const original = repo.addOrUpdateMessage.bind(repo);
425
+ repo.addOrUpdateMessage = function (parentId: unknown, message: unknown) {
426
+ try {
427
+ return original(parentId, message);
428
+ } catch (error) {
429
+ const errorMessage =
430
+ error instanceof Error ? error.message : String(error);
431
+ if (parentId && errorMessage.includes("Parent message not found")) {
432
+ const fallbackParent = this.head?.current?.id ?? null;
433
+ if (fallbackParent && fallbackParent !== parentId) {
434
+ return original(fallbackParent, message);
435
+ }
436
+ return original(null, message);
437
+ }
438
+ if (errorMessage.includes("same id already exists")) return;
439
+ throw error;
440
+ }
441
+ };
442
+ };
443
+
444
+ patchCurrentRepository();
445
+ const unsubscribe = binding.outerSubscribe?.(patchCurrentRepository);
446
+ return typeof unsubscribe === "function" ? unsubscribe : () => {};
447
+ }
448
+
391
449
  function cloneContentParts(content: ContentPart[]): ContentPart[] {
392
450
  return content.map((part) =>
393
451
  part.type === "text" || part.type === "reasoning"
@@ -1885,6 +1943,7 @@ const AssistantChatInner = forwardRef<
1885
1943
  ) {
1886
1944
  const thread = useThread();
1887
1945
  const threadRuntime = useThreadRuntime();
1946
+ const t = useT();
1888
1947
  const composerRuntime = useComposerRuntime();
1889
1948
  const isRuntimeRunning = thread.isRunning;
1890
1949
  // Latest-value ref so long-lived async closures (the reconnect reader, its
@@ -1993,41 +2052,19 @@ const AssistantChatInner = forwardRef<
1993
2052
  // assets.agent-native.com prompt composer (AGENT-NATIVE-BROWSER-18). Fix
1994
2053
  // it by relinking to the current head whenever the requested parent has
1995
2054
  // gone missing instead of throwing.
1996
- useEffect(() => {
1997
- const repo = (threadRuntime as any)?.__internal_threadBinding?.getState?.()
1998
- ?.repository as
1999
- | { addOrUpdateMessage?: (parentId: any, message: any) => void }
2000
- | undefined;
2001
- if (!repo || typeof repo.addOrUpdateMessage !== "function") return;
2002
- const patched = repo as any;
2003
- if (patched.__agentNativePatched) return;
2004
- patched.__agentNativePatched = true;
2005
- const original = repo.addOrUpdateMessage.bind(repo);
2006
- repo.addOrUpdateMessage = function (parentId: any, message: any) {
2007
- try {
2008
- return original(parentId, message);
2009
- } catch (err) {
2010
- const msg = err instanceof Error ? err.message : String(err);
2011
- if (parentId && msg.includes("Parent message not found")) {
2012
- const fallbackParent = (this as any).head?.current?.id ?? null;
2013
- if (fallbackParent && fallbackParent !== parentId) {
2014
- return original(fallbackParent, message);
2015
- }
2016
- return original(null, message);
2017
- }
2018
- if (msg.includes("same id already exists")) {
2019
- return;
2020
- }
2021
- throw err;
2022
- }
2023
- };
2024
- }, [threadRuntime]);
2055
+ useEffect(
2056
+ () => installAssistantUiMessageRepositoryRecovery(threadRuntime),
2057
+ [threadRuntime],
2058
+ );
2025
2059
  const agentEngineConfigured = useAgentEngineConfigured(
2026
2060
  providerStatusChecksEnabled,
2027
2061
  { tabId, threadId },
2028
2062
  );
2029
2063
  const missingApiKey = agentEngineConfigured.missing;
2030
- const isComposerDisabled = missingApiKey || composerDisabled;
2064
+ const isProviderStatusChecking =
2065
+ providerStatusChecksEnabled && agentEngineConfigured.state === "unknown";
2066
+ const isComposerDisabled =
2067
+ missingApiKey || isProviderStatusChecking || composerDisabled;
2031
2068
  const [missingKeySetupOpen, setMissingKeySetupOpen] = useState(false);
2032
2069
  const requestMissingKeySetup = useCallback(() => {
2033
2070
  setMissingKeySetupOpen(true);
@@ -2043,7 +2080,12 @@ const AssistantChatInner = forwardRef<
2043
2080
  : await fetchAgentEngineConfiguredState(providerStatusChecksEnabled, {
2044
2081
  timeoutMs: SUBMIT_ENGINE_STATUS_TIMEOUT_MS,
2045
2082
  });
2046
- if (state !== "missing") return true;
2083
+ if (state === "configured") return true;
2084
+
2085
+ // Unknown means the readiness endpoint is unavailable or still resolving.
2086
+ // Do not start a run optimistically: that recreates the long failure path
2087
+ // this preflight exists to prevent. The mounted hook retries automatically.
2088
+ if (state === "unknown") return false;
2047
2089
 
2048
2090
  requestMissingKeySetup();
2049
2091
  if (typeof window !== "undefined") {
@@ -5150,14 +5192,16 @@ const AssistantChatInner = forwardRef<
5150
5192
  placeholder={
5151
5193
  missingApiKey
5152
5194
  ? "Connect AI to start chatting..."
5153
- : composerDisabled
5154
- ? (composerDisabledPlaceholder ??
5155
- "Open Desktop to use this chat.")
5156
- : isRunning
5157
- ? queuedMessages.length > 0
5158
- ? `${queuedMessages.length} queued — send a follow-up...`
5159
- : "Send a follow-up..."
5160
- : composerPlaceholder
5195
+ : isProviderStatusChecking
5196
+ ? t("agentPanel.checkingAiConnection")
5197
+ : composerDisabled
5198
+ ? (composerDisabledPlaceholder ??
5199
+ "Open Desktop to use this chat.")
5200
+ : isRunning
5201
+ ? queuedMessages.length > 0
5202
+ ? `${queuedMessages.length} queued — send a follow-up...`
5203
+ : "Send a follow-up..."
5204
+ : composerPlaceholder
5161
5205
  }
5162
5206
  onSubmit={
5163
5207
  isRunning || composerContextItems.length > 0
@@ -618,12 +618,41 @@ function isAgentNativeDocsUrl(url: string): boolean {
618
618
  }
619
619
  }
620
620
 
621
+ function isSessionReplayUrl(url: string): boolean {
622
+ if (!url) return false;
623
+ try {
624
+ const parsed = new URL(url);
625
+ return /^\/sessions\/[^/]+\/?$/.test(parsed.pathname);
626
+ } catch {
627
+ return false;
628
+ }
629
+ }
630
+
621
631
  function shouldDropBrowserSentryNoise(event: Sentry.Event): boolean {
622
632
  const exceptionValues = event.exception?.values ?? [];
623
633
  const taggedUrl =
624
634
  typeof event.tags?.url === "string" ? event.tags.url : undefined;
625
635
  const requestUrl = (event.request?.url ?? taggedUrl ?? "").toLowerCase();
626
636
  const isDocsPage = isAgentNativeDocsUrl(requestUrl);
637
+ // rrweb 2.1.0 replays recorded media interactions with `void media.play()`.
638
+ // Browsers may reject that promise when the recorded media was unmuted and
639
+ // no user activation is still active, which becomes a source-less unhandled
640
+ // rejection even though the replay player keeps working. Keep this scoped to
641
+ // the replay detail route and the exact browser autoplay-policy message.
642
+ if (
643
+ isSessionReplayUrl(requestUrl) &&
644
+ exceptionValues.some((value) => {
645
+ const exceptionValue = String(value.value ?? "")
646
+ .trim()
647
+ .toLowerCase();
648
+ return (
649
+ exceptionValue.includes("notallowederror: play() failed") &&
650
+ exceptionValue.includes("user didn't interact with the document first")
651
+ );
652
+ })
653
+ ) {
654
+ return true;
655
+ }
627
656
  // AgentAutoContinueSignal is a control-flow sentinel thrown to bubble
628
657
  // out of the SSE stream parser when the agent run needs to be
629
658
  // auto-continued. It's caught by the chat adapter and is never a real
@@ -1511,6 +1511,20 @@ function roundedRectPath(
1511
1511
  ].join(" ");
1512
1512
  }
1513
1513
 
1514
+ /** Rough.js cannot safely render paths whose inset consumes the whole box. */
1515
+ export function hasDrawableRoughBounds(
1516
+ width: number,
1517
+ height: number,
1518
+ inset: number,
1519
+ ): boolean {
1520
+ return (
1521
+ Number.isFinite(width) &&
1522
+ Number.isFinite(height) &&
1523
+ width > inset * 2 &&
1524
+ height > inset * 2
1525
+ );
1526
+ }
1527
+
1514
1528
  function elementStroke(node: Element, fallback: string): string {
1515
1529
  const explicit = readVar(node, "--rough-stroke");
1516
1530
  if (explicit) return explicit;
@@ -1623,7 +1637,7 @@ function build(
1623
1637
  preserveVertices: true,
1624
1638
  });
1625
1639
 
1626
- if (opts.drawFrame) {
1640
+ if (opts.drawFrame && hasDrawableRoughBounds(layoutW, layoutH, 2)) {
1627
1641
  const sw = 2;
1628
1642
  push(
1629
1643
  gen.path(
@@ -1647,7 +1661,7 @@ function build(
1647
1661
  const y = (r.top - base.top) / zoom;
1648
1662
  const w = r.width / zoom;
1649
1663
  const h = r.height / zoom;
1650
- if (w < 2 || h < 2) return;
1664
+ if (!hasDrawableRoughBounds(w, h, 1)) return;
1651
1665
  const kind = inferRoughKind(node);
1652
1666
  const rawStroke = elementStroke(node, sketch);
1653
1667
  const stroke =
@@ -21,6 +21,12 @@ export interface BuildChatModelGroupsOptions {
21
21
  currentModel?: string;
22
22
  }
23
23
 
24
+ const HIDDEN_CHAT_MODEL_ENGINES = new Set([
25
+ "ai-sdk:groq",
26
+ "ai-sdk:mistral",
27
+ "ai-sdk:cohere",
28
+ ]);
29
+
24
30
  function addCurrentModel(
25
31
  models: readonly string[],
26
32
  engineName: string,
@@ -93,6 +99,15 @@ function shouldShowDirectEngine(
93
99
  engine: ChatModelEngineEntry,
94
100
  currentEngineName?: string,
95
101
  ): boolean {
102
+ // Keep a persisted selection usable after an engine is hidden from the
103
+ // picker; users can choose a supported replacement instead of landing on a
104
+ // model that no longer has a rendered group.
105
+ if (
106
+ HIDDEN_CHAT_MODEL_ENGINES.has(engine.name) &&
107
+ engine.name !== currentEngineName
108
+ ) {
109
+ return false;
110
+ }
96
111
  if (engine.name === currentEngineName) return true;
97
112
  if (engine.name === "builder") return false;
98
113
  if (engine.name === "ai-sdk:anthropic") return false;
@@ -100,6 +115,18 @@ function shouldShowDirectEngine(
100
115
  return true;
101
116
  }
102
117
 
118
+ function putOpenRouterLast(
119
+ a: ChatModelEngineEntry,
120
+ b: ChatModelEngineEntry,
121
+ ): number {
122
+ const aIsOpenRouter = a.name === "ai-sdk:openrouter";
123
+ const bIsOpenRouter = b.name === "ai-sdk:openrouter";
124
+ if (aIsOpenRouter === bIsOpenRouter) return 0;
125
+ if (aIsOpenRouter) return 1;
126
+ if (bIsOpenRouter) return -1;
127
+ return 0;
128
+ }
129
+
103
130
  export function buildChatModelGroups({
104
131
  engines,
105
132
  configuredKeys,
@@ -123,6 +150,7 @@ export function buildChatModelGroups({
123
150
  return engines
124
151
  .filter((engine) => engine.packageInstalled !== false)
125
152
  .filter((engine) => shouldShowDirectEngine(engine, currentEngineName))
153
+ .sort(putOpenRouterLast)
126
154
  .map((engine) => {
127
155
  const requiredEnvVars = engine.requiredEnvVars ?? [];
128
156
  return {