@agent-native/core 0.149.1 → 0.149.3

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 (422) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
  3. package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
  4. package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
  5. package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
  6. package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
  7. package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
  8. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
  9. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
  10. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
  11. package/corpus/templates/analytics/AGENTS.md +25 -32
  12. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
  13. package/corpus/templates/analytics/app/global.css +1 -1
  14. package/corpus/templates/analytics/app/i18n-data.ts +37 -0
  15. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
  16. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
  17. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
  18. package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
  19. package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  20. package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  21. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
  22. package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
  23. package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
  24. package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
  25. package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
  26. package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
  27. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
  28. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
  29. package/corpus/templates/assets/AGENTS.md +6 -9
  30. package/corpus/templates/assets/app/global.css +1 -1
  31. package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  32. package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  33. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
  34. package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
  35. package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
  36. package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
  37. package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
  38. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
  39. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
  40. package/corpus/templates/brain/AGENTS.md +5 -12
  41. package/corpus/templates/brain/app/global.css +1 -1
  42. package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  43. package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  44. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
  45. package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
  46. package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
  47. package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
  48. package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
  49. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
  50. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
  51. package/corpus/templates/calendar/AGENTS.md +8 -9
  52. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  53. package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  54. package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  55. package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  56. package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  57. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  58. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  59. package/corpus/templates/chat/AGENTS.md +32 -80
  60. package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  61. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
  62. package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
  63. package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
  64. package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
  65. package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
  66. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
  67. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
  68. package/corpus/templates/clips/AGENTS.md +25 -31
  69. package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
  70. package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
  71. package/corpus/templates/clips/desktop/src/app.tsx +274 -137
  72. package/corpus/templates/clips/desktop/src/styles.css +35 -0
  73. package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
  74. package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
  75. package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
  76. package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
  77. package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
  78. package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
  79. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
  80. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
  81. package/corpus/templates/content/AGENTS.md +5 -9
  82. package/corpus/templates/content/app/global.css +1 -0
  83. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
  84. package/corpus/templates/crm/AGENTS.md +7 -11
  85. package/corpus/templates/crm/app/global.css +1 -1
  86. package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  87. package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  88. package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
  89. package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
  90. package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
  91. package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
  92. package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
  93. package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
  94. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
  95. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
  96. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
  97. package/corpus/templates/design/AGENTS.md +13 -21
  98. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
  99. package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
  100. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
  101. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
  102. package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
  103. package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
  104. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
  105. package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
  106. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
  107. package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
  108. package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
  109. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
  110. package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
  111. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
  112. package/corpus/templates/design/app/i18n-data.ts +1 -0
  113. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
  114. package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
  115. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
  116. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
  117. package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
  118. package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
  119. package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
  120. package/corpus/templates/design/e2e/global-setup.ts +27 -32
  121. package/corpus/templates/design/playwright.config.ts +3 -5
  122. package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
  123. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
  124. package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
  125. package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
  126. package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
  127. package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
  128. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
  129. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
  130. package/corpus/templates/dispatch/AGENTS.md +9 -16
  131. package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  132. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
  133. package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
  134. package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
  135. package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
  136. package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
  137. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
  138. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
  139. package/corpus/templates/factory/AGENTS.md +10 -24
  140. package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  141. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
  142. package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
  143. package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
  144. package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
  145. package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
  146. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
  147. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
  148. package/corpus/templates/forms/AGENTS.md +11 -17
  149. package/corpus/templates/forms/app/global.css +1 -0
  150. package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  151. package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
  152. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
  153. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
  154. package/corpus/templates/macros/AGENTS.md +8 -8
  155. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
  156. package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
  157. package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
  158. package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
  159. package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
  160. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
  161. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
  162. package/corpus/templates/mail/AGENTS.md +5 -6
  163. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
  164. package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
  165. package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
  166. package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
  167. package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
  168. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
  169. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
  170. package/corpus/templates/plan/AGENTS.md +5 -14
  171. package/corpus/templates/plan/app/global.css +1 -0
  172. package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  173. package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
  174. package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
  175. package/corpus/templates/plan/vite.config.ts +5 -0
  176. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
  177. package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
  178. package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
  179. package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
  180. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
  181. package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
  182. package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
  183. package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
  184. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
  185. package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
  186. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
  187. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
  188. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
  189. package/corpus/templates/slides/AGENTS.md +33 -35
  190. package/corpus/templates/slides/actions/add-deck.ts +2 -0
  191. package/corpus/templates/slides/actions/add-slide.ts +15 -1
  192. package/corpus/templates/slides/actions/create-deck.ts +18 -6
  193. package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
  194. package/corpus/templates/slides/actions/get-deck.ts +83 -7
  195. package/corpus/templates/slides/actions/import-file.ts +2 -1
  196. package/corpus/templates/slides/actions/patch-deck.ts +165 -9
  197. package/corpus/templates/slides/actions/save-deck.ts +24 -1
  198. package/corpus/templates/slides/actions/update-slide.ts +1 -1
  199. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
  200. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
  201. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
  202. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
  203. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
  204. package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
  205. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
  206. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
  207. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
  208. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
  209. package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
  210. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
  211. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
  212. package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
  213. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
  214. package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
  215. package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
  216. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
  217. package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
  218. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
  219. package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
  220. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
  221. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
  222. package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
  223. package/corpus/templates/slides/app/global.css +76 -1
  224. package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
  225. package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
  226. package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
  227. package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
  228. package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
  229. package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
  230. package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
  231. package/corpus/templates/slides/app/pages/Index.tsx +315 -151
  232. package/corpus/templates/slides/app/root.tsx +43 -0
  233. package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
  234. package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
  235. package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
  236. package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
  237. package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
  238. package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
  239. package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
  240. package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
  241. package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
  242. package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
  243. package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
  244. package/corpus/templates/slides/package.json +1 -0
  245. package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
  246. package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
  247. package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
  248. package/corpus/templates/slides/shared/api.ts +47 -15
  249. package/corpus/templates/slides/shared/deck-title.ts +135 -0
  250. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
  251. package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
  252. package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
  253. package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
  254. package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
  255. package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
  256. package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
  257. package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
  258. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
  259. package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
  260. package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
  261. package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
  262. package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
  263. package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
  264. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
  265. package/corpus/templates/tasks/AGENTS.md +5 -20
  266. package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
  267. package/dist/agent/engine/ai-sdk-engine.js +1 -1
  268. package/dist/agent/production-agent.d.ts +21 -1
  269. package/dist/agent/production-agent.js +505 -355
  270. package/dist/agent/run-manager.js +156 -14
  271. package/dist/agent/run-store.d.ts +11 -10
  272. package/dist/agent/run-store.js +17 -13
  273. package/dist/agent/tool-approval-store.d.ts +18 -0
  274. package/dist/agent/tool-approval-store.js +122 -0
  275. package/dist/agent/types.d.ts +1 -1
  276. package/dist/cli/code-agent-executor.js +11 -2
  277. package/dist/client/AgentPanel.js +31 -6
  278. package/dist/client/AssistantChat.d.ts +9 -4
  279. package/dist/client/AssistantChat.js +221 -149
  280. package/dist/client/active-run-state.d.ts +9 -1
  281. package/dist/client/active-run-state.js +34 -3
  282. package/dist/client/agent-chat/index.d.ts +1 -1
  283. package/dist/client/agent-chat-adapter.d.ts +8 -0
  284. package/dist/client/agent-chat-adapter.js +125 -28
  285. package/dist/client/agent-chat.d.ts +1 -1
  286. package/dist/client/chat/markdown-renderer.js +14 -2
  287. package/dist/client/chat/message-components.d.ts +13 -3
  288. package/dist/client/chat/message-components.js +57 -52
  289. package/dist/client/chat/run-recovery.d.ts +1 -0
  290. package/dist/client/chat/run-recovery.js +8 -0
  291. package/dist/client/chat/tool-call-display.d.ts +5 -5
  292. package/dist/client/chat/tool-call-display.js +9 -212
  293. package/dist/client/chat-first/apps-rail.js +3 -3
  294. package/dist/client/chat-first/browser-pane.js +4 -1
  295. package/dist/client/chat-first/chat-history.d.ts +3 -1
  296. package/dist/client/chat-first/chat-history.js +7 -4
  297. package/dist/client/chat-first/surface-tabs.d.ts +1 -1
  298. package/dist/client/chat-first/surface-tabs.js +52 -41
  299. package/dist/client/chat-first/types.d.ts +3 -0
  300. package/dist/client/chat-first.d.ts +10 -0
  301. package/dist/client/chat-first.js +37 -2
  302. package/dist/client/components/ui/message-scroller.js +4 -1
  303. package/dist/client/i18n.js +3 -1
  304. package/dist/client/resources/McpConnectionSuggestion.js +9 -1
  305. package/dist/client/sse-event-processor.d.ts +4 -2
  306. package/dist/client/sse-event-processor.js +46 -6
  307. package/dist/client/use-chat-models.js +156 -80
  308. package/dist/client/use-run-stuck-detection.d.ts +2 -0
  309. package/dist/client/use-run-stuck-detection.js +85 -9
  310. package/dist/collab/awareness.d.ts +2 -2
  311. package/dist/collab/routes.d.ts +1 -1
  312. package/dist/collab/struct-routes.d.ts +1 -1
  313. package/dist/integrations/adapters/slack.d.ts +0 -4
  314. package/dist/integrations/adapters/slack.js +6 -30
  315. package/dist/integrations/catalog.js +1 -1
  316. package/dist/integrations/pending-tasks-store.d.ts +0 -8
  317. package/dist/integrations/pending-tasks-store.js +0 -21
  318. package/dist/integrations/slack-manifest.d.ts +2 -2
  319. package/dist/integrations/slack-manifest.js +0 -3
  320. package/dist/integrations/webhook-handler.js +1 -1
  321. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  322. package/dist/observability/routes.d.ts +3 -3
  323. package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
  324. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  325. package/dist/scripts/docs/source-search.js +2 -2
  326. package/dist/server/agent-chat/framework-prompts.js +7 -2
  327. package/dist/server/agent-chat/prompt-resources.js +2 -2
  328. package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
  329. package/dist/server/agent-chat/skill-frontmatter.js +41 -15
  330. package/dist/server/agent-chat-plugin.js +3 -3
  331. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  332. package/dist/server/agents-bundle.d.ts +16 -19
  333. package/dist/server/agents-bundle.js +19 -35
  334. package/dist/server/auth.js +262 -31
  335. package/dist/server/better-auth-instance.d.ts +1 -0
  336. package/dist/server/better-auth-instance.js +17 -2
  337. package/dist/server/onboarding-html.js +56 -9
  338. package/dist/server/prompts/framework-core-compact.d.ts +6 -1
  339. package/dist/server/prompts/framework-core-compact.js +12 -9
  340. package/dist/server/prompts/framework-core.d.ts +6 -1
  341. package/dist/server/prompts/framework-core.js +11 -9
  342. package/dist/server/prompts/index.d.ts +1 -1
  343. package/dist/server/prompts/index.js +1 -1
  344. package/dist/server/prompts/shared-rules.d.ts +15 -11
  345. package/dist/server/prompts/shared-rules.js +17 -13
  346. package/dist/server/realtime-token.d.ts +1 -1
  347. package/dist/server/transcribe-voice.d.ts +1 -1
  348. package/dist/shared/reasoning-effort.d.ts +8 -8
  349. package/dist/shared/reasoning-effort.js +10 -10
  350. package/dist/shared/streaming-text-smoothing.js +41 -11
  351. package/dist/styles/agent-native.css +19 -32
  352. package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  353. package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  354. package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  355. package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  356. package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  357. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  358. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  359. package/dist/templates/chat/AGENTS.md +32 -80
  360. package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  361. package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
  362. package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  363. package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
  364. package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  365. package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  366. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  367. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  368. package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  369. package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  370. package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  371. package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  372. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  373. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  374. package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  375. package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  376. package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  377. package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  378. package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  379. package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  380. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  381. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  382. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  383. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  384. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  385. package/dist/templates/workspace-core/AGENTS.md +7 -16
  386. package/docs/content/messaging.mdx +6 -7
  387. package/docs/content/template-chat.mdx +1 -1
  388. package/package.json +2 -2
  389. package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
  390. package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
  391. package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
  392. package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
  393. package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
  394. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
  395. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
  396. package/src/templates/chat/AGENTS.md +32 -80
  397. package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
  398. package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
  399. package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
  400. package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
  401. package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
  402. package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
  403. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
  404. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
  405. package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
  406. package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
  407. package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
  408. package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
  409. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
  410. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
  411. package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
  412. package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
  413. package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
  414. package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
  415. package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
  416. package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
  417. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
  418. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
  419. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
  420. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
  421. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
  422. package/src/templates/workspace-core/AGENTS.md +7 -16
@@ -21,6 +21,11 @@ export function useGeneratingSlidePreview({
21
21
  const [content, setContent] = useState<string | null>(null);
22
22
  const activeCallIdRef = useRef<string | null>(null);
23
23
  const previousSlideCountRef = useRef(slideCount);
24
+ // Latest parsed value awaiting a flush; setContent fires at most once per frame
25
+ // and always reads this ref, so a burst of deltas within one frame collapses
26
+ // to a single render carrying the newest value instead of the stale one.
27
+ const pendingContentRef = useRef<string | null>(null);
28
+ const rafIdRef = useRef<number | null>(null);
24
29
 
25
30
  useEffect(() => {
26
31
  if (slideCount !== previousSlideCountRef.current) {
@@ -37,6 +42,18 @@ export function useGeneratingSlidePreview({
37
42
  return;
38
43
  }
39
44
 
45
+ const flush = () => {
46
+ rafIdRef.current = null;
47
+ setContent(pendingContentRef.current);
48
+ };
49
+
50
+ const scheduleFlush = (value: string | null) => {
51
+ pendingContentRef.current = value;
52
+ if (rafIdRef.current === null) {
53
+ rafIdRef.current = requestAnimationFrame(flush);
54
+ }
55
+ };
56
+
40
57
  const handleToolInput = (event: Event) => {
41
58
  const detail = (event as CustomEvent<ToolInputEventDetail>).detail;
42
59
  if (detail?.tool !== "add-slide") return;
@@ -47,7 +64,7 @@ export function useGeneratingSlidePreview({
47
64
  if (detail.phase === "start") {
48
65
  if (detail.id && activeCallIdRef.current === detail.id) return;
49
66
  activeCallIdRef.current = detail.id ?? null;
50
- setContent(null);
67
+ scheduleFlush(null);
51
68
  return;
52
69
  }
53
70
 
@@ -60,13 +77,18 @@ export function useGeneratingSlidePreview({
60
77
  }
61
78
  if (detail.id) activeCallIdRef.current = detail.id;
62
79
  if (parsed.content !== undefined) {
63
- setContent(parsed.content || null);
80
+ scheduleFlush(parsed.content || null);
64
81
  }
65
82
  };
66
83
 
67
84
  window.addEventListener("agent-native:tool-input", handleToolInput);
68
- return () =>
85
+ return () => {
69
86
  window.removeEventListener("agent-native:tool-input", handleToolInput);
87
+ if (rafIdRef.current !== null) {
88
+ cancelAnimationFrame(rafIdRef.current);
89
+ rafIdRef.current = null;
90
+ }
91
+ };
70
92
  }, [deckId, generating]);
71
93
 
72
94
  return content;
@@ -659,6 +659,7 @@ const messages = {
659
659
  deckCount_other: "decks",
660
660
  createDeckOrVisual: "Create a presentation",
661
661
  noMineDecks: "No decks created by you yet.",
662
+ noDecksMatchSearch: "No decks match your search.",
662
663
  deleteDeckTitle: "Delete Deck?",
663
664
  deleteDeckDescription:
664
665
  "This will permanently delete this deck and all its slides. This action cannot be undone.",
@@ -689,6 +690,7 @@ const messages = {
689
690
  "Keep the default design system and reference deck unless you remove them. Search for another deck, import a file, or continue when you're ready.",
690
691
  chooseAnotherDeck: "Choose another deck",
691
692
  noMatchingDecks: "No matching decks found.",
693
+ googleSlidesImportLabel: "Slides",
692
694
  googleSlidesReferenceTitle: "Google Slides",
693
695
  googleSlidesReferenceConnect:
694
696
  "Connect Google Drive to import a Slides deck.",
@@ -91,6 +91,30 @@ async function loadReferenceDeckGenerationContext(
91
91
  ].join("\n");
92
92
  }
93
93
 
94
+ export function isSourceImprovementRequest(
95
+ prompt: string,
96
+ files: UploadedFile[],
97
+ ): boolean {
98
+ const hasSourceDeck = files.some((file) =>
99
+ /\.(pptx|pdf)$/i.test(file.originalName),
100
+ );
101
+ if (!hasSourceDeck) return false;
102
+
103
+ const normalized = prompt.toLowerCase();
104
+ const asksToImprove =
105
+ /\b(restyl\w*|redesign\w*|rebrand\w*|revamp\w*|rework\w*|moderni[sz]\w*|refresh\w*|polish\w*|improv\w*|updat\w*|revis\w*|edit\w*)\b/.test(
106
+ normalized,
107
+ ) ||
108
+ /\bmake\b[\s\S]{0,40}\b(better|modern|professional|polished|prett\w*)\b/.test(
109
+ normalized,
110
+ );
111
+ // A source deck attachment is the object being improved even when the
112
+ // prompt uses an implicit phrase such as "make this prettier". Requiring a
113
+ // source noun here silently falls back to reference-only generation and can
114
+ // discard the uploaded deck's slide IDs and content.
115
+ return asksToImprove;
116
+ }
117
+
94
118
  function describeUploadedFilesForAgent(
95
119
  files: UploadedFile[],
96
120
  deckId: string,
@@ -103,25 +127,26 @@ function describeUploadedFilesForAgent(
103
127
  `- ${file.originalName} (${file.type}, ${(file.size / 1024).toFixed(1)}KB) at path: ${file.path}${file.url ? `; embeddable URL: ${file.url}` : ""}`,
104
128
  )
105
129
  .join("\n");
106
- const sourceFile = importedSourceDeck?.file;
107
130
  return [
108
131
  "",
109
132
  importedSourceDeck
110
- ? `The user uploaded ${files.length} file(s). The ${sourceFile?.originalName ?? importedSourceDeck.format.toUpperCase()} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
111
- : `The user uploaded ${files.length} file(s). These are mandatory source material, not optional references — process every one of them with the matching import action BEFORE adding the first slide:`,
133
+ ? `The user uploaded ${files.length} file(s). The ${importedSourceDeck.file.originalName} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
134
+ : `The user attached ${files.length} file(s) as reference material for this new deck. Attachments are context for the agent by default; do not import or append their slides to target deck ${deckId} merely because they were attached.`,
112
135
  fileList,
113
136
  "",
114
137
  "File handling rules:",
115
138
  importedSourceDeck
116
- ? "- The imported source deck is the canonical source. Preserve its slide count, order, IDs, factual copy, notes, imagery, charts, tables, diagrams, and freeform objects while improving styling. Use update-slide on existing slide IDs; do not rebuild it with add-slide."
117
- : `- PPTX files: call \`import-pptx --filePath \"<path>\" --deckId ${deckId}\` before adding or editing slides.`,
139
+ ? "- The imported source deck is canonical. Preserve its slide count, order, IDs, factual copy, notes, imagery, charts, tables, diagrams, and freeform objects while improving styling. For a deck-wide restyle, use one patch-deck call with requireAllSourceSlides=true; use update-slide only for a targeted one-slide edit. Do not rebuild it with add-slide."
140
+ : `- PDF, PPTX, and DOCX files: call \`import-file --filePath \"<path>\" --format auto\` (without \`importIntoDeck\`) when you need their text or structure. Use the returned material as reference while creating new slides with \`add-slide\`.`,
118
141
  importedSourceDeck
119
142
  ? "- For a PDF source, keep the original full-page image in every slide and add restrained design-system chrome around it without obscuring source content. Never OCR-reconstruct a source-faithful page from extracted text."
120
- : `- PDF and DOCX files: call \`import-file --filePath \"<path>\" --format auto --deckId ${deckId}\` and use the returned extracted text as source material. The returned text is capped for reliability; re-run with maxChars only if more context is needed. For a visual PDF whose original layout should be preserved, pass \`--importIntoDeck true\` instead of rebuilding the pages from extracted text. Do not proceed to add-slide until this call has returned for every PDF/DOCX in the list above.`,
143
+ : "- Do not pass `importIntoDeck: true` for an attached file unless the user explicitly asks to import or preserve the source pages in the current deck. An attached reference is not an instruction to replace or seed the deck.",
121
144
  "- Text-like files: use the uploaded-text-file blocks already included in the prompt; do not call import-file for them.",
122
145
  '- Image files with an embeddable URL are mandatory assets: if the user specified where to use one (e.g. "on the first and last slide"), embed it there with `<img src="...">` exactly as requested. Do not omit a requested image and continue silently — if it truly cannot be placed, say why in your final chat response.',
123
146
  "- Image files without a URL are visual/reference assets only; do not claim to have processed a PPTX/PDF/DOCX unless the relevant import action succeeds.",
124
- "- Before your final response, verify every uploaded file above was either imported (PPTX/PDF/DOCX) or placed as requested (images). If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
147
+ importedSourceDeck
148
+ ? "- Before your final response, verify the same source slide IDs and count with get-deck after the restyle. If source fidelity is partial or images were skipped, report the exact warning instead of claiming success."
149
+ : "- Before your final response, verify every uploaded file above was either used as reference or placed as explicitly requested. If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
125
150
  ].join("\n");
126
151
  }
127
152
 
@@ -179,7 +204,7 @@ export interface StartDeckGenerationOptions {
179
204
  files: UploadedFile[],
180
205
  failure: DeckPersistenceResult,
181
206
  ) => void;
182
- onSetupFailure: (
207
+ onSetupFailure?: (
183
208
  prompt: string,
184
209
  files: UploadedFile[],
185
210
  failure: unknown,
@@ -248,15 +273,17 @@ export async function startDeckGeneration({
248
273
  }
249
274
 
250
275
  let importedSourceDeck: ImportedSourceDeck | null = null;
251
- try {
252
- importedSourceDeck = await importUploadedDeckIntoDeck(
253
- filesForGeneration,
254
- deckId,
255
- );
256
- } catch (error) {
257
- deleteDeck(deckId);
258
- onSetupFailure(prompt, filesForGeneration, error);
259
- return "failed";
276
+ if (isSourceImprovementRequest(prompt, filesForGeneration)) {
277
+ try {
278
+ importedSourceDeck = await importUploadedDeckIntoDeck(
279
+ filesForGeneration,
280
+ deckId,
281
+ );
282
+ } catch (error) {
283
+ deleteDeck(deckId);
284
+ onSetupFailure?.(prompt, filesForGeneration, error);
285
+ return "failed";
286
+ }
260
287
  }
261
288
 
262
289
  onPromptClosed();
@@ -324,19 +351,21 @@ export async function startDeckGeneration({
324
351
  "Source-preserving improvement mode:",
325
352
  `- The target deck already contains ${importedSourceDeck.slideCount} imported source slides. Treat those slides as the user's complete source, not as inspiration for a new deck.`,
326
353
  "- Keep the exact source slide count, order, IDs, factual meaning, notes, images, charts, tables, diagrams, and freeform objects unless the user explicitly asks to change one of them.",
327
- "- Read `get-deck` before editing, load the linked design system with `get-design-system`, then use one `update-slide` call per existing slide ID for bounded visual improvements. Keep every original `<img>` source and enough original factual copy for each slide; for PDF slides, use restrained design-system chrome around the page without obscuring it.",
328
- "- Do not call `add-slide`, delete slides, reorder slides, or replace source images with generic cards. Do not claim success until `get-deck` verifies the same slide IDs and count after the edits.",
329
- "- If `get-deck` reports partial source fidelity or skipped images, stop and report the exact warning instead of claiming a reliable restyle.",
354
+ "- Read get-deck once before editing to obtain every existing slide ID and source HTML, load the linked design system with get-design-system, then make a deck-wide restyle with one patch-deck call using requireAllSourceSlides=true and one patch-slide operation with fields.content for every source slide ID. Do not split a full-deck restyle into arbitrary batches or fall back to one-by-one update-slide calls; use update-slide only for a targeted one-slide edit. Keep every original image source and enough original factual copy for each slide; for PDF slides, use restrained design-system chrome around the page without obscuring it.",
355
+ "- Do not call add-slide, delete slides, reorder slides, or replace source images with generic cards. Do not claim success until get-deck verifies the same slide IDs and count after the edits.",
356
+ '- After the patch succeeds, verify with get-deck using compact: "true" so only slide IDs, count, and previews are returned. Do not report an initial or partial pass, and do not leave any source slides for a later run.',
357
+ "- If get-deck reports partial source fidelity or skipped images, stop and report the exact warning instead of claiming a reliable restyle.",
330
358
  ].join("\n")
331
359
  : "";
332
360
  const sourceModeInstructions = importedSourceDeck
333
361
  ? [
334
362
  "The request is an in-place visual improvement of an imported source deck. Make a coherent style pass across every existing slide while preserving all source content and media.",
335
- "Do not use the new-deck add-slide workflow for this source-preserving request.",
336
- ]
363
+ "Do not use the new-deck add-slide workflow for this source-preserving request. Finish every source slide in this run; if patch-deck rejects incomplete coverage, continue with the returned missing IDs instead of reporting success with a partial deck.",
364
+ ].join("\n")
337
365
  : [
366
+ "This is a new deck. Keep it empty until generation begins; attached reference files must not seed it with imported slides.",
338
367
  "Start a `manage-progress` run so progress appears in the app header. Add the first slide as soon as it is ready, then continue one slide at a time so the editor visibly fills in.",
339
- `After reading any requested or imported source material, but before adding the first slide, choose a concise, specific deck title from the user's request and source material. Call \`patch-deck\` with \`deckId: \"${deckId}\"\` and \`operations: [{ \"op\": \"patch-deck-fields\", \"fields\": { \"title\": \"<generated title>\" } }]\`. Include only \`title\` in \`fields\`; omit all other optional fields. Never leave a generated deck named \"Untitled Deck\" or another placeholder.`,
368
+ `After reading any requested or attached reference material, but before adding the first slide, choose a concise, specific deck title from the user's request and source material. Never use the deck id, run id, file id, or another opaque alphanumeric token as the title. Call \`patch-deck\` with \`deckId: \"${deckId}\"\` and \`operations: [{ \"op\": \"patch-deck-fields\", \"fields\": { \"title\": \"<generated title>\" } }]\`. Include only \`title\` in \`fields\`; omit all other optional fields. Never leave a generated deck named \"Untitled Deck\" or another placeholder.`,
340
369
  "If the user asks for a standalone visual, diagram, hero, one-pager, poster, or a couple of visuals, create only the requested one/few polished visual slides. Do not pad the result into a full presentation.",
341
370
  "If the request is for a presentation or deck and does not explicitly ask for one slide, infer a coherent multi-slide outline from the scope and keep adding slides until that outline is complete. Do not stop after the first slide just because the prompt has few explicit instructions.",
342
371
  `Add slides ONE AT A TIME using the \`add-slide\` action with --deckId=${deckId}. Wait for each \`add-slide\` result before calling it again; do not batch or parallelize slide writes.`,
@@ -48,7 +48,10 @@ export function readRecentReferences(
48
48
  const parsed: unknown = JSON.parse(raw);
49
49
  if (!Array.isArray(parsed)) return { items: [], readable: false };
50
50
  return {
51
- items: parsed.filter(isRecentReference).slice(0, MAX_RECENT_REFERENCES),
51
+ items: parsed
52
+ .filter(isRecentReference)
53
+ .sort((first, second) => second.lastUsedAt - first.lastUsedAt)
54
+ .slice(0, MAX_RECENT_REFERENCES),
52
55
  readable: true,
53
56
  };
54
57
  } catch {
@@ -56,6 +59,25 @@ export function readRecentReferences(
56
59
  }
57
60
  }
58
61
 
62
+ export function forgetRecentReference(
63
+ kind: RecentReferenceKind,
64
+ storage:
65
+ | Pick<Storage, "getItem" | "setItem">
66
+ | null
67
+ | undefined = typeof window === "undefined" ? null : window.localStorage,
68
+ ): RecentReferencesResult {
69
+ const current = readRecentReferences(storage);
70
+ if (!storage || !current.readable) return current;
71
+
72
+ const next = current.items.filter((item) => item.kind !== kind);
73
+ try {
74
+ storage.setItem(RECENT_REFERENCES_STORAGE_KEY, JSON.stringify(next));
75
+ return { items: next, readable: true };
76
+ } catch {
77
+ return { items: current.items, readable: false };
78
+ }
79
+ }
80
+
59
81
  export function rememberRecentReference(
60
82
  reference: Omit<RecentReference, "lastUsedAt">,
61
83
  storage:
@@ -9,6 +9,35 @@ export interface AnimationTarget {
9
9
  elementPath?: number[];
10
10
  }
11
11
 
12
+ export interface ResolvedAnimationTarget<
13
+ T extends AnimationTarget = AnimationTarget,
14
+ > {
15
+ target: T;
16
+ element: Element;
17
+ key: string;
18
+ }
19
+
20
+ export type AnimationTargetResolutionIssueCode =
21
+ | "missing-target"
22
+ | "duplicate-target";
23
+
24
+ export interface AnimationTargetResolutionIssue<
25
+ T extends AnimationTarget = AnimationTarget,
26
+ > {
27
+ animationIndex: number;
28
+ code: AnimationTargetResolutionIssueCode;
29
+ target: T;
30
+ key?: string;
31
+ preview?: string;
32
+ }
33
+
34
+ export interface AnimationTargetResolution<
35
+ T extends AnimationTarget = AnimationTarget,
36
+ > {
37
+ resolved: ResolvedAnimationTarget<T>[] | null;
38
+ issue: AnimationTargetResolutionIssue<T> | null;
39
+ }
40
+
12
41
  const INLINE_TAGS = new Set([
13
42
  "a",
14
43
  "abbr",
@@ -192,15 +221,87 @@ export function resolveSlideAnimationElement(
192
221
  root: Element,
193
222
  target: AnimationTarget,
194
223
  ): Element | null {
195
- if (Array.isArray(target.elementPath) && target.elementPath.length > 0) {
196
- const pathTarget = resolveElementPath(root, target.elementPath);
197
- if (pathTarget) return pathTarget;
224
+ if (Array.isArray(target.elementPath)) {
225
+ // A supplied path is the identity of the target. Falling back to a
226
+ // legacy index after it goes stale can animate a different element while
227
+ // leaving the intended element visible.
228
+ return target.elementPath.length > 0
229
+ ? resolveElementPath(root, target.elementPath)
230
+ : null;
198
231
  }
199
232
 
200
233
  const legacyContainer = findLegacyAnimationContainer(root);
201
234
  return legacyContainer?.children.item(target.elementIndex) ?? null;
202
235
  }
203
236
 
237
+ /**
238
+ * Resolve an ordered animation list as one validated unit. A null result
239
+ * means the list cannot be rendered faithfully - a missing or duplicate
240
+ * target must not become a phantom click step in the presentation player.
241
+ */
242
+ export function resolveSlideAnimationTargets<T extends AnimationTarget>(
243
+ root: Element,
244
+ targets: readonly T[],
245
+ ): ResolvedAnimationTarget<T>[] | null {
246
+ return resolveSlideAnimationTargetsWithDiagnostics(root, targets).resolved;
247
+ }
248
+
249
+ export function resolveSlideAnimationTargetsWithDiagnostics<
250
+ T extends AnimationTarget,
251
+ >(root: Element, targets: readonly T[]): AnimationTargetResolution<T> {
252
+ const seen = new Set<string>();
253
+ const resolved: ResolvedAnimationTarget<T>[] = [];
254
+
255
+ for (const [animationIndex, target] of targets.entries()) {
256
+ const element = resolveSlideAnimationElement(root, target);
257
+ if (!element) {
258
+ return {
259
+ resolved: null,
260
+ issue: {
261
+ animationIndex,
262
+ code: "missing-target",
263
+ target,
264
+ },
265
+ };
266
+ }
267
+ const path = getElementPath(root, element);
268
+ if (!path) {
269
+ return {
270
+ resolved: null,
271
+ issue: {
272
+ animationIndex,
273
+ code: "missing-target",
274
+ target,
275
+ preview: getElementPreview(
276
+ element,
277
+ `Element ${target.elementIndex + 1}`,
278
+ ),
279
+ },
280
+ };
281
+ }
282
+ const key = animationElementKey(path);
283
+ if (seen.has(key)) {
284
+ return {
285
+ resolved: null,
286
+ issue: {
287
+ animationIndex,
288
+ code: "duplicate-target",
289
+ target,
290
+ key,
291
+ preview: getElementPreview(
292
+ element,
293
+ `Element ${target.elementIndex + 1}`,
294
+ ),
295
+ },
296
+ };
297
+ }
298
+ seen.add(key);
299
+ resolved.push({ target, element, key });
300
+ }
301
+
302
+ return { resolved, issue: null };
303
+ }
304
+
204
305
  export function getSlideAnimationTargetKey(
205
306
  html: string,
206
307
  target: AnimationTarget,
@@ -5,7 +5,7 @@ import {
5
5
  emailToColor,
6
6
  emailToName,
7
7
  } from "@agent-native/core/client/collab";
8
- import { useSession, callAction } from "@agent-native/core/client/hooks";
8
+ import { useSession } from "@agent-native/core/client/hooks";
9
9
  import { useT } from "@agent-native/core/client/i18n";
10
10
  import { useOrg } from "@agent-native/core/client/org";
11
11
  import {
@@ -54,7 +54,7 @@ import {
54
54
  useSlideComments,
55
55
  type CommentThread,
56
56
  } from "@/hooks/use-slide-comments";
57
- import { getAspectRatioDims, type AspectRatio } from "@/lib/aspect-ratios";
57
+ import { getAspectRatioDims } from "@/lib/aspect-ratios";
58
58
  import {
59
59
  deckAccessCheckKey,
60
60
  shouldShowDeckEditorSkeleton,
@@ -187,6 +187,8 @@ export default function DeckEditor() {
187
187
  );
188
188
  const [contextToolbarSlot, setContextToolbarSlot] =
189
189
  useState<HTMLDivElement | null>(null);
190
+ const [wideContextToolbarSlot, setWideContextToolbarSlot] =
191
+ useState<HTMLDivElement | null>(null);
190
192
  const [retryingMissingDeck, setRetryingMissingDeck] = useState(false);
191
193
  const [checkedDeckAccessKey, setCheckedDeckAccessKey] = useState<
192
194
  string | null
@@ -238,9 +240,6 @@ export default function DeckEditor() {
238
240
  const [pendingComment, setPendingComment] = useState<{
239
241
  quotedText: string;
240
242
  } | null>(null);
241
- const imageGenButtonRef = useRef<HTMLButtonElement>(null);
242
- const assetsButtonRef = useRef<HTMLButtonElement>(null);
243
-
244
243
  // Track which image src to replace
245
244
  const [replaceImageSrc, setReplaceImageSrc] = useState<string | null>(null);
246
245
 
@@ -1016,7 +1015,7 @@ export default function DeckEditor() {
1016
1015
 
1017
1016
  return (
1018
1017
  <div
1019
- className="flex h-full min-h-0 flex-1 flex-col overflow-hidden bg-background"
1018
+ className="deck-editor-shell flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-l-lg bg-background"
1020
1019
  onDragOver={editorDragOver}
1021
1020
  onDrop={editorDrop}
1022
1021
  >
@@ -1035,16 +1034,10 @@ export default function DeckEditor() {
1035
1034
  setReplaceImageSrc(null);
1036
1035
  setAssetLibraryOpen(true);
1037
1036
  }}
1038
- imageGenButtonRef={imageGenButtonRef}
1039
- assetsButtonRef={assetsButtonRef}
1040
- historyOpen={historyOpen}
1041
1037
  onShowHistory={() => setHistoryOpen(!historyOpen)}
1042
1038
  historyButtonRef={historyButtonRef}
1043
1039
  currentSlide={currentSlide}
1044
- onUpdateSlide={(updates, slideIdOverride) => {
1045
- const targetId = slideIdOverride ?? currentSlide?.id;
1046
- if (targetId) updateSlide(id, targetId, updates);
1047
- }}
1040
+ onWideContextToolbarSlotChange={setWideContextToolbarSlot}
1048
1041
  activeUsers={slideActiveUsers.filter((u) => u.email !== session?.email)}
1049
1042
  agentPresent={agentPresent}
1050
1043
  agentActive={agentActive}
@@ -1118,19 +1111,6 @@ export default function DeckEditor() {
1118
1111
  }
1119
1112
  return exportDeckToGoogleSlides(deck.title, slides, deck.aspectRatio);
1120
1113
  }}
1121
- aspectRatio={deck.aspectRatio}
1122
- onSetAspectRatio={(ratio: AspectRatio) => {
1123
- const previous = deck.aspectRatio;
1124
- // Optimistic UI: update local cache immediately so canvas resizes.
1125
- updateDeck(id, { aspectRatio: ratio });
1126
- callAction("update-deck-aspect-ratio", {
1127
- deckId: id,
1128
- aspectRatio: ratio,
1129
- }).catch((err) => {
1130
- console.error("Failed to set aspect ratio:", err);
1131
- updateDeck(id, { aspectRatio: previous });
1132
- });
1133
- }}
1134
1114
  currentSlideId={currentSlide?.id}
1135
1115
  addSlideGenerating={addSlideGenerating}
1136
1116
  onAddSlideGeneratingChange={setAddSlideGenerating}
@@ -1142,9 +1122,13 @@ export default function DeckEditor() {
1142
1122
 
1143
1123
  {/* Full-width host for the slide's contextual style toolbar: it spans the
1144
1124
  * slide rail as well as the canvas, matching the deck toolbar above it. */}
1145
- <div ref={setContextToolbarSlot} className="shrink-0" />
1125
+ <div
1126
+ ref={setContextToolbarSlot}
1127
+ data-context-toolbar-host="narrow"
1128
+ className="deck-editor-context-toolbar-host deck-editor-context-toolbar-host--narrow shrink-0"
1129
+ />
1146
1130
 
1147
- <div className="relative flex min-h-0 flex-1 overflow-hidden">
1131
+ <div className="deck-editor-workspace relative flex min-h-0 flex-1 overflow-hidden rounded-l-lg bg-background">
1148
1132
  {sidebarOpen && (
1149
1133
  <>
1150
1134
  <div
@@ -1204,7 +1188,7 @@ export default function DeckEditor() {
1204
1188
  )}
1205
1189
 
1206
1190
  {generatingSlideSelected && generatingSlideVisible && (
1207
- <div className="flex min-h-0 flex-1 overflow-auto bg-background p-4 md:p-8">
1191
+ <div className="flex min-h-0 flex-1 overflow-auto bg-[var(--slides-editor-surface)] p-4 md:p-8">
1208
1192
  <div className="m-auto w-full max-w-6xl">
1209
1193
  <GeneratingSlidePreview
1210
1194
  content={streamedGeneratingSlideContent}
@@ -1220,7 +1204,7 @@ export default function DeckEditor() {
1220
1204
  generatingSlideVisible &&
1221
1205
  deck.slides.length === 0 &&
1222
1206
  !showQuestionFlow && (
1223
- <div className="flex min-h-0 flex-1 overflow-auto bg-background p-4 md:p-8">
1207
+ <div className="flex min-h-0 flex-1 overflow-auto bg-[var(--slides-editor-surface)] p-4 md:p-8">
1224
1208
  <div className="m-auto w-full max-w-6xl">
1225
1209
  <GeneratingSlidePreview
1226
1210
  content={streamedGeneratingSlideContent}
@@ -1238,6 +1222,7 @@ export default function DeckEditor() {
1238
1222
  deckId={id}
1239
1223
  readOnly={!canEdit}
1240
1224
  contextToolbarSlot={contextToolbarSlot}
1225
+ wideContextToolbarSlot={wideContextToolbarSlot}
1241
1226
  contextToolbarLeading={
1242
1227
  canEdit ? (
1243
1228
  <EditorActionCluster
@@ -1287,7 +1272,6 @@ export default function DeckEditor() {
1287
1272
  onDropImageUrl={dropImageUrlOnSlide}
1288
1273
  onToggleObjectFit={toggleObjectFit}
1289
1274
  slideIndex={currentIndex >= 0 ? currentIndex : 0}
1290
- slideCount={deck.slides.length}
1291
1275
  designSystem={designSystem}
1292
1276
  aspectRatio={deck.aspectRatio}
1293
1277
  collabUser={
@@ -1376,7 +1360,7 @@ export default function DeckEditor() {
1376
1360
  <ImageGenPanel
1377
1361
  open={imageGenOpen}
1378
1362
  onOpenChange={setImageGenOpen}
1379
- anchorRef={imageGenButtonRef}
1363
+ anchorRef={historyButtonRef}
1380
1364
  referenceImageUrls={imageStyleReferenceUrls}
1381
1365
  slideContext={
1382
1366
  currentSlide
@@ -1394,7 +1378,7 @@ export default function DeckEditor() {
1394
1378
  <AssetLibraryPanel
1395
1379
  open={assetLibraryOpen}
1396
1380
  onOpenChange={setAssetLibraryOpen}
1397
- anchorRef={assetsButtonRef}
1381
+ anchorRef={historyButtonRef}
1398
1382
  onSelectAsset={
1399
1383
  replaceImageSrc
1400
1384
  ? (newUrl) => {
@@ -6,7 +6,7 @@ import {
6
6
  } from "@agent-native/toolkit/app-shell";
7
7
  import {
8
8
  IconAlertTriangle,
9
- IconPalette,
9
+ IconComponents,
10
10
  IconPlus,
11
11
  IconRefresh,
12
12
  } from "@tabler/icons-react";
@@ -349,7 +349,7 @@ function EmptyState({ onCreateNew }: { onCreateNew: () => void }) {
349
349
  return (
350
350
  <div className="flex flex-col items-center justify-center min-h-[60vh] text-center">
351
351
  <div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-[#609FF8]/20 to-[#4080E0]/20 border border-[#609FF8]/20 flex items-center justify-center mb-6">
352
- <IconPalette className="w-7 h-7 text-[#609FF8]" />
352
+ <IconComponents className="w-7 h-7 text-primary" />
353
353
  </div>
354
354
  <h2 className="text-xl font-semibold text-foreground mb-2">
355
355
  {t("designSystems.emptyTitle")}