@agent-native/core 0.79.27 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +26 -0
  3. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +41 -0
  4. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +51 -0
  5. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +50 -0
  6. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +49 -0
  7. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +44 -0
  8. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +46 -0
  9. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +44 -0
  10. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +48 -0
  11. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +36 -0
  12. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +38 -0
  13. package/corpus/core/docs/content/template-design.mdx +45 -0
  14. package/corpus/core/package.json +2 -1
  15. package/corpus/core/src/agent/engine/index.ts +1 -0
  16. package/corpus/core/src/agent/engine/registry.ts +40 -0
  17. package/corpus/core/src/agent/production-agent.ts +6 -2
  18. package/corpus/core/src/cli/design-connect.ts +490 -0
  19. package/corpus/core/src/cli/index.ts +16 -0
  20. package/corpus/core/src/cli/skills.ts +126 -3
  21. package/corpus/core/src/client/AssistantChat.tsx +43 -7
  22. package/corpus/core/src/client/agent-chat.ts +27 -3
  23. package/corpus/core/src/client/blocks/library/MermaidBlock.tsx +1 -1
  24. package/corpus/core/src/client/blocks/library/diagram.tsx +2 -2
  25. package/corpus/core/src/client/blocks/library/wireframe.tsx +1 -1
  26. package/corpus/core/src/client/chat/message-components.tsx +1 -1
  27. package/corpus/core/src/client/chat-model-groups.ts +1 -2
  28. package/corpus/core/src/client/components/LiveCursorOverlay.tsx +33 -66
  29. package/corpus/core/src/client/composer/TiptapComposer.tsx +99 -24
  30. package/corpus/core/src/client/composer/useVoiceDictation.ts +429 -260
  31. package/corpus/core/src/client/frame-protocol.ts +17 -2
  32. package/corpus/core/src/client/rich-markdown-editor/RegistryBlockNode.tsx +2 -2
  33. package/corpus/core/src/client/sharing/ShareButton.tsx +20 -15
  34. package/corpus/core/src/client/use-agent-engine-configured.ts +80 -28
  35. package/corpus/core/src/server/transcribe-voice.ts +57 -22
  36. package/corpus/core/src/shared/mcp-embed-headers.ts +23 -1
  37. package/corpus/core/src/styles/agent-native.css +56 -7
  38. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  39. package/corpus/core/src/vite/client.ts +2 -0
  40. package/corpus/core/src/voice/index.ts +18 -0
  41. package/corpus/core/src/voice/voice-cleanup-prompt.ts +38 -0
  42. package/corpus/core/src/voice/voice-context.ts +217 -0
  43. package/corpus/core/src/voice/voice-replacements.ts +75 -0
  44. package/corpus/templates/analytics/AGENTS.md +4 -3
  45. package/corpus/templates/analytics/actions/list-session-recordings.ts +6 -1
  46. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +557 -400
  47. package/corpus/templates/analytics/app/global.css +0 -4
  48. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  49. package/corpus/templates/analytics/app/i18n-data.ts +20 -0
  50. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -8
  51. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +7 -0
  52. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +7 -0
  53. package/corpus/templates/analytics/changelog/2026-06-28-ask-tab-now-matches-the-darker-app-background.md +6 -0
  54. package/corpus/templates/analytics/changelog/2026-06-28-dashboard-email-reports-now-use-cleaner-light-mode-snapshots.md +6 -0
  55. package/corpus/templates/analytics/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  56. package/corpus/templates/analytics/changelog/2026-06-28-sessions-now-show-only-signed-in-recordings-with-playable-re.md +6 -0
  57. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +3 -3
  58. package/corpus/templates/analytics/server/lib/dashboard-report.ts +29 -7
  59. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +5 -2
  60. package/corpus/templates/analytics/server/lib/session-replay.ts +24 -4
  61. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -4
  62. package/corpus/templates/assets/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  63. package/corpus/templates/brain/app/components/layout/Layout.tsx +29 -2
  64. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +131 -42
  65. package/corpus/templates/brain/app/i18n/zh-TW.ts +2 -0
  66. package/corpus/templates/brain/app/i18n-data.ts +20 -0
  67. package/corpus/templates/brain/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  68. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +29 -1
  69. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +417 -299
  70. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  71. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  72. package/corpus/templates/calendar/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  73. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +6 -19
  74. package/corpus/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  75. package/corpus/templates/clips/AGENTS.md +4 -0
  76. package/corpus/templates/clips/actions/cleanup-transcript.ts +39 -9
  77. package/corpus/templates/clips/actions/finalize-meeting.ts +81 -12
  78. package/corpus/templates/clips/actions/lib/agents-md-context.ts +4 -1
  79. package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
  80. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +1 -1
  81. package/corpus/templates/clips/app/components/player/share-dialog.tsx +2 -2
  82. package/corpus/templates/clips/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  83. package/corpus/templates/clips/desktop/src/lib/personal-vocabulary.ts +13 -8
  84. package/corpus/templates/clips/desktop/src/lib/voice-dictation.ts +60 -1
  85. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1 -1
  86. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +1 -1
  87. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +5 -5
  88. package/corpus/templates/content/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  89. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +137 -0
  90. package/corpus/templates/design/AGENTS.md +95 -5
  91. package/corpus/templates/design/DESIGN.md +82 -0
  92. package/corpus/templates/design/DEVELOPING.md +43 -0
  93. package/corpus/templates/design/actions/add-localhost-screens.ts +426 -0
  94. package/corpus/templates/design/actions/apply-shader.ts +277 -0
  95. package/corpus/templates/design/actions/apply-visual-edit.ts +303 -0
  96. package/corpus/templates/design/actions/connect-localhost.ts +183 -0
  97. package/corpus/templates/design/actions/edit-design.ts +195 -42
  98. package/corpus/templates/design/actions/generate-design.ts +71 -1
  99. package/corpus/templates/design/actions/generate-screens.ts +193 -0
  100. package/corpus/templates/design/actions/get-code-layer-projection.ts +191 -0
  101. package/corpus/templates/design/actions/get-shader.ts +119 -0
  102. package/corpus/templates/design/actions/list-localhost-connections.ts +95 -0
  103. package/corpus/templates/design/actions/navigate.ts +55 -2
  104. package/corpus/templates/design/actions/view-screen.ts +68 -1
  105. package/corpus/templates/design/agent-native.app-skill.json +10 -0
  106. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +761 -0
  107. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +2057 -103
  108. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +74 -38
  109. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +399 -0
  110. package/corpus/templates/design/app/components/design/EditPanel.tsx +3185 -439
  111. package/corpus/templates/design/app/components/design/LayersPanel.tsx +1124 -0
  112. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +3116 -147
  113. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +700 -13
  114. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +107 -63
  115. package/corpus/templates/design/app/components/design/index.ts +0 -5
  116. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +286 -0
  117. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +699 -0
  118. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +461 -0
  119. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +166 -0
  120. package/corpus/templates/design/app/components/design/inspector/FigmaColorPicker.tsx +1420 -0
  121. package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +420 -0
  122. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +215 -0
  123. package/corpus/templates/design/app/components/design/inspector/ShaderControls.stories.tsx +71 -0
  124. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +518 -0
  125. package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +106 -0
  126. package/corpus/templates/design/app/components/design/inspector/figma-icons.tsx +361 -0
  127. package/corpus/templates/design/app/components/design/inspector/index.ts +60 -0
  128. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +201 -0
  129. package/corpus/templates/design/app/components/design/types.ts +23 -0
  130. package/corpus/templates/design/app/components/layout/Layout.tsx +24 -13
  131. package/corpus/templates/design/app/components/layout/Sidebar.tsx +4 -4
  132. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +474 -36
  133. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +22 -5
  134. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +24 -11
  135. package/corpus/templates/design/app/global.css +121 -3
  136. package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -0
  137. package/corpus/templates/design/app/hooks/use-navigation-state.ts +130 -8
  138. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +329 -0
  139. package/corpus/templates/design/app/i18n/zh-TW.ts +264 -0
  140. package/corpus/templates/design/app/i18n-data.ts +2790 -1
  141. package/corpus/templates/design/app/pages/DesignEditor.tsx +5108 -851
  142. package/corpus/templates/design/changelog/2026-06-28-annotate-mode-now-combines-drawing-and-comment-pins-in-one-c.md +6 -0
  143. package/corpus/templates/design/changelog/2026-06-28-design-editor-panel-borders-are-cleaner-so-the-canvas-edge-s.md +6 -0
  144. package/corpus/templates/design/changelog/2026-06-28-drawing-prompts-now-reliably-open-and-submit-to-the-design-a.md +6 -0
  145. package/corpus/templates/design/changelog/2026-06-28-editor-app-menus-now-use-an-outline-agent-native-mark-with-b.md +6 -0
  146. package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +6 -0
  147. package/corpus/templates/design/changelog/2026-06-28-layer-selection-now-updates-chat-context-without-opening-the.md +6 -0
  148. package/corpus/templates/design/changelog/2026-06-28-layer-selections-now-preserve-hidden-and-locked-canvas-state.md +6 -0
  149. package/corpus/templates/design/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  150. package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +6 -0
  151. package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +6 -0
  152. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-handles-zooming-drawing-opening-and-dele.md +6 -0
  153. package/corpus/templates/design/changelog/2026-06-28-screen-overview-now-selects-screens-on-click-and-opens-them-.md +6 -0
  154. package/corpus/templates/design/changelog/2026-06-28-screen-overview-zooms-into-the-active-screen-with-smoother-e.md +6 -0
  155. package/corpus/templates/design/changelog/2026-06-28-selected-element-chips-in-chat-are-shorter-and-easier-to-sca.md +6 -0
  156. package/corpus/templates/design/changelog/2026-06-28-the-design-editor-toolbar-is-more-compact-and-the-app-menu-m.md +6 -0
  157. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-at-the-top-of-the-design-sidebar-instead-of-.md +6 -0
  158. package/corpus/templates/design/changelog/2026-06-28-tweaks-now-live-in-the-right-inspector-beside-the-design-tab.md +6 -0
  159. package/corpus/templates/design/changelog/2026-06-29-active-sidebar-rows-use-soft-highlights.md +6 -0
  160. package/corpus/templates/design/changelog/2026-06-29-agents-can-now-open-screen-overview-focus-screens-and-add.md +6 -0
  161. package/corpus/templates/design/changelog/2026-06-29-design-agents-now-edit-broad-copy-changes-more-reliably.md +6 -0
  162. package/corpus/templates/design/changelog/2026-06-29-design-editor-extensions-now-run-inline-beside-the-artboard.md +6 -0
  163. package/corpus/templates/design/changelog/2026-06-29-sidebars-use-darker-chrome-and-chat-warns-immediately.md +6 -0
  164. package/corpus/templates/design/changelog/2026-06-29-visual-edit-can-open-localhost-routes-as-url-backed-screens.md +6 -0
  165. package/corpus/templates/design/package.json +1 -0
  166. package/corpus/templates/design/server/db/schema.ts +26 -0
  167. package/corpus/templates/design/server/lib/design-snapshot.ts +1 -1
  168. package/corpus/templates/design/server/plugins/agent-chat.ts +3 -0
  169. package/corpus/templates/design/shared/api.ts +27 -0
  170. package/corpus/templates/design/shared/canvas-frames.ts +103 -0
  171. package/corpus/templates/design/shared/canvas-math.ts +1058 -0
  172. package/corpus/templates/design/shared/code-layer.ts +2212 -0
  173. package/corpus/templates/design/shared/color-utils.ts +180 -0
  174. package/corpus/templates/design/shared/generation-session.ts +61 -0
  175. package/corpus/templates/design/shared/shader-presets.ts +782 -0
  176. package/corpus/templates/design/shared/shader-safety.ts +137 -0
  177. package/corpus/templates/design/shared/source-mode.ts +237 -0
  178. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +149 -6
  179. package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
  180. package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
  181. package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
  182. package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
  183. package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
  184. package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
  185. package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
  186. package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
  187. package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
  188. package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
  189. package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
  190. package/corpus/templates/forms/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  191. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +2 -2
  192. package/corpus/templates/macros/changelog/2026-06-28-left-sidebar-footer-controls-use-less-divider-chrome.md +6 -0
  193. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +408 -247
  194. package/corpus/templates/mail/app/i18n/ar-SA.ts +4 -0
  195. package/corpus/templates/mail/app/i18n/de-DE.ts +4 -0
  196. package/corpus/templates/mail/app/i18n/en-US.ts +4 -0
  197. package/corpus/templates/mail/app/i18n/es-ES.ts +4 -0
  198. package/corpus/templates/mail/app/i18n/fr-FR.ts +4 -0
  199. package/corpus/templates/mail/app/i18n/hi-IN.ts +4 -0
  200. package/corpus/templates/mail/app/i18n/ja-JP.ts +4 -0
  201. package/corpus/templates/mail/app/i18n/ko-KR.ts +4 -0
  202. package/corpus/templates/mail/app/i18n/pt-BR.ts +4 -0
  203. package/corpus/templates/mail/app/i18n/zh-CN.ts +4 -0
  204. package/corpus/templates/mail/app/i18n/zh-TW.ts +4 -0
  205. package/corpus/templates/mail/changelog/2026-06-28-pinned-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  206. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +6 -8
  207. package/corpus/templates/plan/app/components/plan/wireframe/Wireframe.tsx +1 -1
  208. package/corpus/templates/plan/app/global.css +61 -78
  209. package/corpus/templates/plan/app/pages/PlansPage.tsx +8 -0
  210. package/corpus/templates/plan/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  211. package/corpus/templates/plan/changelog/2026-06-28-plans-use-the-shared-neutral-light-and-dark-theme.md +6 -0
  212. package/corpus/templates/plan/changelog/2026-06-28-sending-open-feedback-from-a-plan-now-opens-the-inline-plan-.md +6 -0
  213. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
  214. package/corpus/templates/slides/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  215. package/corpus/templates/videos/app/components/Sidebar.tsx +2 -2
  216. package/corpus/templates/videos/app/components/layout/Layout.tsx +29 -2
  217. package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +113 -30
  218. package/corpus/templates/videos/app/i18n/ar-SA.ts +2 -0
  219. package/corpus/templates/videos/app/i18n/de-DE.ts +2 -0
  220. package/corpus/templates/videos/app/i18n/en-US.ts +2 -0
  221. package/corpus/templates/videos/app/i18n/es-ES.ts +2 -0
  222. package/corpus/templates/videos/app/i18n/fr-FR.ts +2 -0
  223. package/corpus/templates/videos/app/i18n/hi-IN.ts +2 -0
  224. package/corpus/templates/videos/app/i18n/ja-JP.ts +2 -0
  225. package/corpus/templates/videos/app/i18n/ko-KR.ts +2 -0
  226. package/corpus/templates/videos/app/i18n/pt-BR.ts +2 -0
  227. package/corpus/templates/videos/app/i18n/zh-CN.ts +2 -0
  228. package/corpus/templates/videos/app/i18n/zh-TW.ts +2 -0
  229. package/corpus/templates/videos/changelog/2026-06-28-left-sidebar-collapses-into-an-animated-icon-rail.md +6 -0
  230. package/dist/agent/engine/index.d.ts +1 -1
  231. package/dist/agent/engine/index.d.ts.map +1 -1
  232. package/dist/agent/engine/index.js +1 -1
  233. package/dist/agent/engine/index.js.map +1 -1
  234. package/dist/agent/engine/registry.d.ts +9 -0
  235. package/dist/agent/engine/registry.d.ts.map +1 -1
  236. package/dist/agent/engine/registry.js +37 -0
  237. package/dist/agent/engine/registry.js.map +1 -1
  238. package/dist/agent/production-agent.d.ts.map +1 -1
  239. package/dist/agent/production-agent.js +4 -3
  240. package/dist/agent/production-agent.js.map +1 -1
  241. package/dist/cli/design-connect.d.ts +52 -0
  242. package/dist/cli/design-connect.d.ts.map +1 -0
  243. package/dist/cli/design-connect.js +409 -0
  244. package/dist/cli/design-connect.js.map +1 -0
  245. package/dist/cli/index.js +15 -0
  246. package/dist/cli/index.js.map +1 -1
  247. package/dist/cli/skills.d.ts +3 -0
  248. package/dist/cli/skills.d.ts.map +1 -1
  249. package/dist/cli/skills.js +121 -3
  250. package/dist/cli/skills.js.map +1 -1
  251. package/dist/client/AssistantChat.d.ts.map +1 -1
  252. package/dist/client/AssistantChat.js +38 -8
  253. package/dist/client/AssistantChat.js.map +1 -1
  254. package/dist/client/agent-chat.d.ts +6 -0
  255. package/dist/client/agent-chat.d.ts.map +1 -1
  256. package/dist/client/agent-chat.js +17 -3
  257. package/dist/client/agent-chat.js.map +1 -1
  258. package/dist/client/blocks/library/MermaidBlock.js +1 -1
  259. package/dist/client/blocks/library/MermaidBlock.js.map +1 -1
  260. package/dist/client/blocks/library/diagram.js +1 -1
  261. package/dist/client/blocks/library/diagram.js.map +1 -1
  262. package/dist/client/blocks/library/wireframe.js +1 -1
  263. package/dist/client/blocks/library/wireframe.js.map +1 -1
  264. package/dist/client/chat/message-components.js +1 -1
  265. package/dist/client/chat/message-components.js.map +1 -1
  266. package/dist/client/chat-model-groups.d.ts.map +1 -1
  267. package/dist/client/chat-model-groups.js +1 -2
  268. package/dist/client/chat-model-groups.js.map +1 -1
  269. package/dist/client/components/LiveCursorOverlay.d.ts +1 -2
  270. package/dist/client/components/LiveCursorOverlay.d.ts.map +1 -1
  271. package/dist/client/components/LiveCursorOverlay.js +19 -40
  272. package/dist/client/components/LiveCursorOverlay.js.map +1 -1
  273. package/dist/client/composer/TiptapComposer.d.ts +3 -1
  274. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  275. package/dist/client/composer/TiptapComposer.js +86 -24
  276. package/dist/client/composer/TiptapComposer.js.map +1 -1
  277. package/dist/client/composer/useVoiceDictation.d.ts +9 -0
  278. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  279. package/dist/client/composer/useVoiceDictation.js +154 -32
  280. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  281. package/dist/client/frame-protocol.d.ts +17 -2
  282. package/dist/client/frame-protocol.d.ts.map +1 -1
  283. package/dist/client/frame-protocol.js.map +1 -1
  284. package/dist/client/rich-markdown-editor/RegistryBlockNode.js +2 -2
  285. package/dist/client/rich-markdown-editor/RegistryBlockNode.js.map +1 -1
  286. package/dist/client/sharing/ShareButton.d.ts +2 -0
  287. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  288. package/dist/client/sharing/ShareButton.js +7 -6
  289. package/dist/client/sharing/ShareButton.js.map +1 -1
  290. package/dist/client/use-agent-engine-configured.d.ts +5 -0
  291. package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
  292. package/dist/client/use-agent-engine-configured.js +51 -25
  293. package/dist/client/use-agent-engine-configured.js.map +1 -1
  294. package/dist/collab/awareness.d.ts +2 -2
  295. package/dist/collab/awareness.d.ts.map +1 -1
  296. package/dist/collab/routes.d.ts +1 -1
  297. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  298. package/dist/notifications/routes.d.ts +3 -3
  299. package/dist/observability/routes.d.ts +8 -8
  300. package/dist/progress/routes.d.ts +1 -1
  301. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  302. package/dist/server/transcribe-voice.d.ts.map +1 -1
  303. package/dist/server/transcribe-voice.js +40 -24
  304. package/dist/server/transcribe-voice.js.map +1 -1
  305. package/dist/shared/mcp-embed-headers.d.ts +1 -0
  306. package/dist/shared/mcp-embed-headers.d.ts.map +1 -1
  307. package/dist/shared/mcp-embed-headers.js +20 -1
  308. package/dist/shared/mcp-embed-headers.js.map +1 -1
  309. package/dist/styles/agent-native.css +56 -7
  310. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  311. package/dist/vite/client.d.ts.map +1 -1
  312. package/dist/vite/client.js +2 -0
  313. package/dist/vite/client.js.map +1 -1
  314. package/dist/voice/index.d.ts +5 -0
  315. package/dist/voice/index.d.ts.map +1 -0
  316. package/dist/voice/index.js +4 -0
  317. package/dist/voice/index.js.map +1 -0
  318. package/dist/voice/voice-cleanup-prompt.d.ts +6 -0
  319. package/dist/voice/voice-cleanup-prompt.d.ts.map +1 -0
  320. package/dist/voice/voice-cleanup-prompt.js +26 -0
  321. package/dist/voice/voice-cleanup-prompt.js.map +1 -0
  322. package/dist/voice/voice-context.d.ts +25 -0
  323. package/dist/voice/voice-context.d.ts.map +1 -0
  324. package/dist/voice/voice-context.js +156 -0
  325. package/dist/voice/voice-context.js.map +1 -0
  326. package/dist/voice/voice-replacements.d.ts +4 -0
  327. package/dist/voice/voice-replacements.d.ts.map +1 -0
  328. package/dist/voice/voice-replacements.js +52 -0
  329. package/dist/voice/voice-replacements.js.map +1 -0
  330. package/docs/content/locales/ar-SA/template-design.mdx +41 -0
  331. package/docs/content/locales/de-DE/template-design.mdx +51 -0
  332. package/docs/content/locales/es-ES/template-design.mdx +50 -0
  333. package/docs/content/locales/fr-FR/template-design.mdx +49 -0
  334. package/docs/content/locales/hi-IN/template-design.mdx +44 -0
  335. package/docs/content/locales/ja-JP/template-design.mdx +46 -0
  336. package/docs/content/locales/ko-KR/template-design.mdx +44 -0
  337. package/docs/content/locales/pt-BR/template-design.mdx +48 -0
  338. package/docs/content/locales/zh-CN/template-design.mdx +36 -0
  339. package/docs/content/locales/zh-TW/template-design.mdx +38 -0
  340. package/docs/content/template-design.mdx +45 -0
  341. package/package.json +2 -1
  342. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +10 -0
  343. package/corpus/templates/design/app/components/design/DesignToolbar.tsx +0 -339
  344. package/corpus/templates/design/app/components/design/PresentMode.tsx +0 -68
  345. package/corpus/templates/design/app/components/design/ViewportTabs.tsx +0 -149
  346. package/corpus/templates/design/app/components/design/ZoomControls.tsx +0 -157
@@ -0,0 +1,191 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import { getText, hasCollabState } from "@agent-native/core/collab";
3
+ import { accessFilter } from "@agent-native/core/sharing";
4
+ import { and, eq } from "drizzle-orm";
5
+ import { z } from "zod";
6
+
7
+ import { getDb, schema } from "../server/db/index.js";
8
+ import {
9
+ buildCodeLayerProjection,
10
+ buildCodeLayerTree,
11
+ type CodeLayerSource,
12
+ } from "../shared/code-layer.js";
13
+ import { normalizeDesignSourceType } from "../shared/source-mode.js";
14
+
15
+ type ProjectionActionSource = CodeLayerSource & { html?: string };
16
+
17
+ function parseJsonString(value: unknown): unknown {
18
+ if (typeof value !== "string") return value;
19
+ try {
20
+ return JSON.parse(value);
21
+ } catch {
22
+ return value;
23
+ }
24
+ }
25
+
26
+ const sourceSchema = z.preprocess(
27
+ parseJsonString,
28
+ z.object({
29
+ kind: z
30
+ .enum(["design-file", "inline-html", "local-file", "remote-url"])
31
+ .default("design-file"),
32
+ sourceType: z.enum(["inline", "localhost", "fusion"]).optional(),
33
+ designId: z.string().optional(),
34
+ fileId: z.string().optional(),
35
+ filename: z.string().optional().default("index.html"),
36
+ path: z.string().optional(),
37
+ url: z.string().optional(),
38
+ connectionId: z.string().optional(),
39
+ routeId: z.string().optional(),
40
+ artboardId: z.string().optional(),
41
+ bridgeUrl: z.string().optional(),
42
+ revision: z.string().optional(),
43
+ html: z.string().optional(),
44
+ }),
45
+ );
46
+
47
+ async function liveContent(
48
+ fileId: string,
49
+ storedContent: string,
50
+ ): Promise<string> {
51
+ try {
52
+ if (await hasCollabState(fileId)) {
53
+ const live = await getText(fileId, "content");
54
+ if (typeof live === "string") return live;
55
+ }
56
+ } catch {
57
+ // The stored SQL content remains the deterministic fallback.
58
+ }
59
+ return storedContent;
60
+ }
61
+
62
+ async function resolveDesignFileSource(
63
+ source: ProjectionActionSource,
64
+ ): Promise<{
65
+ html: string;
66
+ source: CodeLayerSource;
67
+ }> {
68
+ if (!source.fileId && !source.designId) {
69
+ throw new Error(
70
+ "source.designId or source.fileId is required for design-file.",
71
+ );
72
+ }
73
+
74
+ const db = getDb();
75
+ const conditions = [
76
+ accessFilter(schema.designs, schema.designShares),
77
+ source.fileId
78
+ ? eq(schema.designFiles.id, source.fileId)
79
+ : eq(schema.designFiles.designId, source.designId ?? ""),
80
+ ];
81
+ if (!source.fileId) {
82
+ conditions.push(
83
+ eq(schema.designFiles.filename, source.filename ?? "index.html"),
84
+ );
85
+ }
86
+
87
+ const [file] = await db
88
+ .select({
89
+ id: schema.designFiles.id,
90
+ designId: schema.designFiles.designId,
91
+ filename: schema.designFiles.filename,
92
+ fileType: schema.designFiles.fileType,
93
+ content: schema.designFiles.content,
94
+ })
95
+ .from(schema.designFiles)
96
+ .innerJoin(
97
+ schema.designs,
98
+ eq(schema.designFiles.designId, schema.designs.id),
99
+ )
100
+ .where(and(...conditions))
101
+ .limit(1);
102
+
103
+ if (!file) {
104
+ throw new Error("Design HTML file not found.");
105
+ }
106
+ if (file.fileType !== "html") {
107
+ throw new Error(`Code layer projection only supports HTML files for now.`);
108
+ }
109
+
110
+ return {
111
+ html: await liveContent(file.id, file.content ?? ""),
112
+ source: {
113
+ kind: "design-file",
114
+ sourceType: "inline",
115
+ designId: file.designId,
116
+ fileId: file.id,
117
+ filename: file.filename,
118
+ revision: source.revision,
119
+ },
120
+ };
121
+ }
122
+
123
+ export default defineAction({
124
+ description:
125
+ "Build a deterministic Code Layer Projection for an inline/SQL HTML design file. " +
126
+ "The projection maps real source elements to selectable code-backed layer nodes with selectors, spans, layout context, and edit capabilities.",
127
+ schema: z.object({
128
+ source: sourceSchema.describe(
129
+ "Projection source. Use kind=design-file with designId/filename or fileId for SQL-backed Design files; kind=inline-html with html for previews.",
130
+ ),
131
+ }),
132
+ readOnly: true,
133
+ http: { method: "GET" },
134
+ run: async ({ source }) => {
135
+ const actionSource = source as ProjectionActionSource;
136
+
137
+ if (actionSource.kind === "inline-html") {
138
+ const html = actionSource.html ?? "";
139
+ const projectionSource: CodeLayerSource = {
140
+ kind: "inline-html",
141
+ sourceType: "inline",
142
+ filename: actionSource.filename,
143
+ revision: actionSource.revision,
144
+ };
145
+ const projection = buildCodeLayerProjection(html, {
146
+ source: projectionSource,
147
+ });
148
+ return {
149
+ projection,
150
+ layers: buildCodeLayerTree(projection),
151
+ };
152
+ }
153
+
154
+ if (actionSource.kind !== "design-file") {
155
+ const projectionSource: CodeLayerSource = {
156
+ kind: actionSource.kind,
157
+ sourceType:
158
+ actionSource.sourceType ??
159
+ normalizeDesignSourceType(actionSource.kind) ??
160
+ undefined,
161
+ path: actionSource.path,
162
+ url: actionSource.url,
163
+ connectionId: actionSource.connectionId,
164
+ routeId: actionSource.routeId,
165
+ artboardId: actionSource.artboardId,
166
+ bridgeUrl: actionSource.bridgeUrl,
167
+ filename: actionSource.filename,
168
+ revision: actionSource.revision,
169
+ };
170
+ const projection = buildCodeLayerProjection("", {
171
+ source: projectionSource,
172
+ });
173
+ return {
174
+ projection,
175
+ layers: buildCodeLayerTree(projection),
176
+ unsupported: true,
177
+ message:
178
+ "Only inline-html and SQL design-file sources are supported by this action today.",
179
+ };
180
+ }
181
+
182
+ const resolved = await resolveDesignFileSource(actionSource);
183
+ const projection = buildCodeLayerProjection(resolved.html, {
184
+ source: resolved.source,
185
+ });
186
+ return {
187
+ projection,
188
+ layers: buildCodeLayerTree(projection),
189
+ };
190
+ },
191
+ });
@@ -0,0 +1,119 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import { z } from "zod";
3
+
4
+ import {
5
+ SHADER_PRESET_MAP,
6
+ SHADER_PRESETS,
7
+ type ShaderPresetName,
8
+ } from "../shared/shader-presets.js";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Return the available GPU shader preset catalog and instructions for reading current shader state " +
13
+ "on a design element. Because shader state lives in source code (JSX props or data-shader attributes), " +
14
+ "this action cannot parse live values itself — it returns the full preset catalog and oriented guidance " +
15
+ "so the agent knows what to look for when inspecting the code. " +
16
+ "Call get-code-layer-projection to read the actual HTML/JSX, then look for data-shader attributes " +
17
+ "(inline HTML mode) or @paper-design/shaders-react component names (framework mode).",
18
+ schema: z.object({
19
+ source: z
20
+ .object({
21
+ kind: z.enum(["design-file", "inline-html"]).default("design-file"),
22
+ designId: z.string().optional(),
23
+ fileId: z.string().optional(),
24
+ })
25
+ .optional()
26
+ .describe(
27
+ "Optional design source context. When provided, the instructions are tailored to the source kind.",
28
+ ),
29
+ target: z
30
+ .object({
31
+ nodeId: z.string().optional(),
32
+ selector: z.string().optional(),
33
+ })
34
+ .optional()
35
+ .describe(
36
+ "Optional target element. When provided, the inspection hint is scoped to that element.",
37
+ ),
38
+ }),
39
+ readOnly: true,
40
+ run: async ({ source, target }) => {
41
+ const sourceKind = source?.kind ?? "design-file";
42
+ const targetDescription = target?.nodeId
43
+ ? `element with id="${target.nodeId}"`
44
+ : target?.selector
45
+ ? `element matching "${target.selector}"`
46
+ : "any element";
47
+
48
+ const availablePresets = (
49
+ Object.keys(SHADER_PRESET_MAP) as ShaderPresetName[]
50
+ ).map((name) => {
51
+ const def = SHADER_PRESET_MAP[name];
52
+ return {
53
+ name,
54
+ label: def.label,
55
+ description: def.description,
56
+ isEffect: def.isEffect ?? false,
57
+ maxColorCount: def.maxColorCount,
58
+ paramKeys: def.params.map((p) => p.key),
59
+ };
60
+ });
61
+
62
+ const presetSummaryLines = SHADER_PRESETS.map((p) => {
63
+ const paramKeys = p.params.map((param) => param.key).join(", ");
64
+ return ` ${p.name} (${p.label}): ${p.description}${paramKeys ? ` — params: ${paramKeys}` : ""}`;
65
+ });
66
+
67
+ const inspectionStepsFramework = [
68
+ `1. Call get-code-layer-projection with the design source to retrieve the rendered HTML or JSX.`,
69
+ `2. Look for any import from "@paper-design/shaders-react".`,
70
+ ` If found, note the imported component name — that is the active preset.`,
71
+ `3. Read the component's JSX props: colors, colorBack, colorFront, speed, frame, fit, scale,`,
72
+ ` rotation, offsetX, offsetY, and any shader-specific params (distortion, swirl, shape, etc.).`,
73
+ `4. The zIndex prop (or style.zIndex) tells you whether it's a fill (0) or effect (2).`,
74
+ `5. Reconstruct the ShaderDescriptor from those props to pass back to apply-shader if editing.`,
75
+ ];
76
+
77
+ const inspectionStepsInline = [
78
+ `1. Call get-code-layer-projection with the design source to retrieve the rendered HTML.`,
79
+ `2. Look for <canvas data-shader='...'> elements${target ? ` inside ${targetDescription}` : ""}.`,
80
+ `3. Parse the data-shader JSON attribute — it is a ShaderDescriptor object with`,
81
+ ` { preset, params, colors?, speed?, frame?, fit?, scale?, rotation?, offsetX?, offsetY? }.`,
82
+ `4. The canvas element's inline style z-index tells you whether it's a fill (0) or effect (2).`,
83
+ `5. To update the shader, modify the data-shader attribute value via apply-visual-edit`,
84
+ ` with a style or attribute intent, or use apply-shader to regenerate the canvas element.`,
85
+ ];
86
+
87
+ const inspectionSteps =
88
+ sourceKind === "inline-html"
89
+ ? inspectionStepsInline
90
+ : inspectionStepsFramework;
91
+
92
+ const hint =
93
+ sourceKind === "inline-html"
94
+ ? `Search the HTML for data-shader attributes. The value is a JSON ShaderDescriptor. ` +
95
+ `Example: data-shader='{"preset":"MeshGradient","params":{"distortion":0.8},"colors":["#e0eaff","#241d9a"]}'.`
96
+ : `Search the JSX for imports from "@paper-design/shaders-react" and look for the component ` +
97
+ `(e.g. <MeshGradient colors={[...]} distortion={0.8} style={{...}} />). ` +
98
+ `The component name is the preset name.`;
99
+
100
+ const instructions = [
101
+ `To read the current shader state on ${targetDescription}:`,
102
+ "",
103
+ ...inspectionSteps,
104
+ "",
105
+ `Hint: ${hint}`,
106
+ "",
107
+ `To apply or change a shader, call apply-shader with the desired descriptor.`,
108
+ `apply-shader validates params and returns the exact JSX or HTML to insert.`,
109
+ ].join("\n");
110
+
111
+ return {
112
+ availablePresets,
113
+ presetNames: availablePresets.map((p) => p.name),
114
+ presetSummary: presetSummaryLines.join("\n"),
115
+ instructions,
116
+ hint,
117
+ };
118
+ },
119
+ });
@@ -0,0 +1,95 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import {
3
+ getRequestOrgId,
4
+ getRequestUserEmail,
5
+ } from "@agent-native/core/server/request-context";
6
+ import { and, desc, eq, isNull } from "drizzle-orm";
7
+ import { z } from "zod";
8
+
9
+ import { getDb, schema } from "../server/db/index.js";
10
+ import type {
11
+ DesignBridgeCapability,
12
+ LocalhostDesignRouteManifest,
13
+ } from "../shared/source-mode.js";
14
+
15
+ function parseJson<T>(value: string, fallback: T): T {
16
+ try {
17
+ return JSON.parse(value) as T;
18
+ } catch {
19
+ return fallback;
20
+ }
21
+ }
22
+
23
+ export default defineAction({
24
+ description:
25
+ "List localhost Design source connections for the current user. Use this before creating localhost artboards or resolving local routes.",
26
+ schema: z.object({
27
+ id: z.string().optional().describe("Optional connection ID filter."),
28
+ status: z
29
+ .enum(["connected", "detected", "manual", "error"])
30
+ .optional()
31
+ .describe("Optional status filter."),
32
+ }),
33
+ readOnly: true,
34
+ http: { method: "GET" },
35
+ run: async ({ id, status }) => {
36
+ const ownerEmail = getRequestUserEmail();
37
+ if (!ownerEmail) throw new Error("no authenticated user");
38
+ const orgId = getRequestOrgId() ?? null;
39
+ const clauses = [
40
+ eq(schema.designLocalhostConnections.ownerEmail, ownerEmail),
41
+ orgId
42
+ ? eq(schema.designLocalhostConnections.orgId, orgId)
43
+ : isNull(schema.designLocalhostConnections.orgId),
44
+ ];
45
+ if (id) clauses.push(eq(schema.designLocalhostConnections.id, id));
46
+ if (status) {
47
+ clauses.push(eq(schema.designLocalhostConnections.status, status));
48
+ }
49
+
50
+ const rows = await getDb()
51
+ .select()
52
+ .from(schema.designLocalhostConnections)
53
+ .where(and(...clauses))
54
+ .orderBy(desc(schema.designLocalhostConnections.updatedAt));
55
+
56
+ const connections = rows.map((row) => {
57
+ const routeManifest = parseJson<LocalhostDesignRouteManifest>(
58
+ row.routeManifest,
59
+ {
60
+ version: 1,
61
+ sourceType: "localhost",
62
+ devServerUrl: row.devServerUrl,
63
+ rootPath: row.rootPath ?? undefined,
64
+ routes: [],
65
+ generatedAt: row.updatedAt ?? new Date(0).toISOString(),
66
+ },
67
+ );
68
+ const capabilities = parseJson<DesignBridgeCapability[]>(
69
+ row.capabilities,
70
+ [],
71
+ );
72
+ return {
73
+ id: row.id,
74
+ sourceType: row.sourceType,
75
+ name: row.name,
76
+ devServerUrl: row.devServerUrl,
77
+ bridgeUrl: row.bridgeUrl ?? null,
78
+ rootPath: row.rootPath ?? null,
79
+ routeManifest,
80
+ routes: routeManifest.routes,
81
+ routeCount: routeManifest.routes.length,
82
+ capabilities,
83
+ status: row.status,
84
+ lastSeenAt: row.lastSeenAt ?? null,
85
+ createdAt: row.createdAt,
86
+ updatedAt: row.updatedAt,
87
+ };
88
+ });
89
+
90
+ return {
91
+ count: connections.length,
92
+ connections,
93
+ };
94
+ },
95
+ });
@@ -6,6 +6,8 @@
6
6
  * Usage:
7
7
  * pnpm action navigate --view=list
8
8
  * pnpm action navigate --view=editor --designId=abc123
9
+ * pnpm action navigate --view=editor --designId=abc123 --editorView=overview
10
+ * pnpm action navigate --view=editor --designId=abc123 --filename=checkout.html
9
11
  * pnpm action navigate --view=design-systems
10
12
  * pnpm action navigate --view=design-systems --designSystemId=abc123
11
13
  * pnpm action navigate --view=templates
@@ -15,6 +17,10 @@
15
17
  * Options:
16
18
  * --view View name (list, editor, design-systems, present, templates, settings)
17
19
  * --designId Design ID (for editor/present views)
20
+ * --editorView Editor mode for designs: single or overview
21
+ * --inspectorTab Inspector tab for designs: design, tweaks, or extensions
22
+ * --fileId Screen/file id to focus in the design editor
23
+ * --filename Screen filename to focus in the design editor
18
24
  * --designSystemId Design system ID (for design-systems view)
19
25
  * --path URL path to navigate to
20
26
  */
@@ -25,7 +31,7 @@ import { z } from "zod";
25
31
 
26
32
  export default defineAction({
27
33
  description:
28
- "Navigate the UI to a specific view or path. Views: list, editor, design-systems, present, templates, settings. Use --designId with editor/present views and --designSystemId with design-systems.",
34
+ "Navigate the UI to a specific view or path. Views: list, editor, design-systems, present, templates, settings. Use --designId with editor/present views and --designSystemId with design-systems. For designs, use editorView=overview to show the infinite screens canvas, or editorView=single with fileId/filename/screen to focus a screen. Use inspectorTab=extensions to focus the in-editor extension panel.",
29
35
  schema: z.object({
30
36
  view: z
31
37
  .enum([
@@ -40,6 +46,38 @@ export default defineAction({
40
46
  .optional()
41
47
  .describe("View name to navigate to"),
42
48
  designId: z.string().optional().describe("Design ID for editor/present"),
49
+ editorView: z
50
+ .enum(["single", "overview"])
51
+ .optional()
52
+ .describe(
53
+ "Design editor view: overview for the infinite screens canvas, single for a focused screen",
54
+ ),
55
+ viewMode: z
56
+ .enum(["single", "overview"])
57
+ .optional()
58
+ .describe("Alias for editorView"),
59
+ inspectorTab: z
60
+ .enum(["design", "tweaks", "extensions"])
61
+ .optional()
62
+ .describe("Design editor inspector tab to focus"),
63
+ inspector: z
64
+ .enum(["design", "tweaks", "extensions"])
65
+ .optional()
66
+ .describe("Alias for inspectorTab"),
67
+ fileId: z.string().optional().describe("Design file/screen ID to focus"),
68
+ screenId: z.string().optional().describe("Alias for fileId"),
69
+ filename: z
70
+ .string()
71
+ .optional()
72
+ .describe("Design screen filename to focus, such as checkout.html"),
73
+ screen: z
74
+ .string()
75
+ .optional()
76
+ .describe("Screen id, filename, or name to focus"),
77
+ zoom: z
78
+ .number()
79
+ .optional()
80
+ .describe("Optional design canvas zoom percentage"),
43
81
  designSystemId: z
44
82
  .string()
45
83
  .optional()
@@ -51,14 +89,29 @@ export default defineAction({
51
89
  if (!args.view && !args.path) {
52
90
  throw new Error("At least --view or --path is required.");
53
91
  }
54
- const nav: Record<string, string> = {};
92
+ const nav: Record<string, unknown> = {};
55
93
  if (args.view) nav.view = args.view;
56
94
  if (args.designId) nav.designId = args.designId;
95
+ const editorView = args.editorView ?? args.viewMode;
96
+ if (editorView) nav.editorView = editorView;
97
+ const inspectorTab = args.inspectorTab ?? args.inspector;
98
+ if (inspectorTab) nav.inspectorTab = inspectorTab;
99
+ if (args.fileId) nav.fileId = args.fileId;
100
+ if (args.screenId) nav.screenId = args.screenId;
101
+ if (args.filename) nav.filename = args.filename;
102
+ if (args.screen) nav.screen = args.screen;
103
+ if (args.zoom !== undefined) nav.zoom = args.zoom;
57
104
  if (args.designSystemId) nav.designSystemId = args.designSystemId;
58
105
  if (args.path) nav.path = args.path;
59
106
  await writeAppState("navigate", nav);
60
107
  return `Navigating to ${args.view || args.path}${
61
108
  args.designId ? ` (design: ${args.designId})` : ""
109
+ }${editorView ? ` (${editorView} view)` : ""}${
110
+ inspectorTab ? ` (${inspectorTab} inspector)` : ""
111
+ }${
112
+ args.fileId || args.screenId || args.filename || args.screen
113
+ ? ` (screen: ${args.fileId ?? args.screenId ?? args.filename ?? args.screen})`
114
+ : ""
62
115
  }${args.designSystemId ? ` (design system: ${args.designSystemId})` : ""}`;
63
116
  },
64
117
  });
@@ -12,11 +12,17 @@ import {
12
12
  readAppState,
13
13
  readAppStateForCurrentTab,
14
14
  } from "@agent-native/core/application-state";
15
+ import { resolveAccess } from "@agent-native/core/sharing";
16
+ import { eq } from "drizzle-orm";
15
17
  import { z } from "zod";
16
18
 
19
+ import { getDb, schema } from "../server/db/index.js";
20
+ import { parseCanvasFrameGeometryById } from "../shared/canvas-frames.js";
21
+ import { designGenerationSessionKey } from "../shared/generation-session.js";
22
+
17
23
  export default defineAction({
18
24
  description:
19
- "See what the user is currently looking at on screen. Returns the current navigation state including which design is open, which view they are on (list, editor, design-systems, present, templates, settings), plus any pending question overlay or variant grid. Always call this first before taking any action.",
25
+ "See what the user is currently looking at on screen. Returns the current navigation state including which design is open, which view they are on (list, editor, design-systems, present, templates, settings), active/focused design screen, selected element, active inspector tab (design, tweaks, or extensions), overview canvas state, plus any pending question overlay or variant grid. Always call this first before taking any action.",
20
26
  schema: z.object({}),
21
27
  http: false,
22
28
  run: async () => {
@@ -35,10 +41,68 @@ export default defineAction({
35
41
  (designId
36
42
  ? await readAppState(`show-questions:${designId}`)
37
43
  : undefined) ?? (await readAppState("show-questions"));
44
+ const generationSession = designId
45
+ ? await readAppState(designGenerationSessionKey(designId))
46
+ : undefined;
38
47
 
39
48
  const screen: Record<string, unknown> = {};
40
49
  if (navigation) screen.navigation = navigation;
41
50
  if (designSelection) screen.designSelection = designSelection;
51
+ if (designId) {
52
+ const access = await resolveAccess("design", designId).catch(() => null);
53
+ if (access) {
54
+ const db = getDb();
55
+ const files = await db
56
+ .select({
57
+ id: schema.designFiles.id,
58
+ filename: schema.designFiles.filename,
59
+ fileType: schema.designFiles.fileType,
60
+ updatedAt: schema.designFiles.updatedAt,
61
+ })
62
+ .from(schema.designFiles)
63
+ .where(eq(schema.designFiles.designId, designId));
64
+ let data: Record<string, unknown> = {};
65
+ const rawData = (access.resource as { data?: unknown }).data;
66
+ if (typeof rawData === "string") {
67
+ try {
68
+ const parsed = JSON.parse(rawData);
69
+ if (
70
+ parsed &&
71
+ typeof parsed === "object" &&
72
+ !Array.isArray(parsed)
73
+ ) {
74
+ data = parsed as Record<string, unknown>;
75
+ }
76
+ } catch {
77
+ data = {};
78
+ }
79
+ }
80
+ const activeFileId =
81
+ designSelection &&
82
+ typeof designSelection === "object" &&
83
+ typeof (designSelection as { activeFileId?: unknown })
84
+ .activeFileId === "string"
85
+ ? (designSelection as { activeFileId: string }).activeFileId
86
+ : undefined;
87
+ const activeFilename =
88
+ designSelection &&
89
+ typeof designSelection === "object" &&
90
+ typeof (designSelection as { activeFilename?: unknown })
91
+ .activeFilename === "string"
92
+ ? (designSelection as { activeFilename: string }).activeFilename
93
+ : undefined;
94
+ screen.design = {
95
+ id: designId,
96
+ title: (access.resource as { title?: unknown }).title ?? null,
97
+ screens: files,
98
+ activeScreen:
99
+ files.find((file) => file.id === activeFileId) ??
100
+ files.find((file) => file.filename === activeFilename) ??
101
+ null,
102
+ canvasFrames: parseCanvasFrameGeometryById(data.canvasFrames),
103
+ };
104
+ }
105
+ }
42
106
  if (showQuestions) {
43
107
  screen.pendingQuestions = showQuestions;
44
108
  screen.note =
@@ -49,6 +113,9 @@ export default defineAction({
49
113
  screen.variantsNote =
50
114
  'A variant picker is open. Wait for the user to choose a direction before generating further. In an inline MCP app their pick returns to you automatically; if it opened as a browser tab (a CLI or code editor), they paste an auto-copied summary or just tell you which one (e.g. "use variant A"). Once you know the choice, read the saved index.html with get-design-snapshot. Do not call generate-design while this picker is open.';
51
115
  }
116
+ if (generationSession) {
117
+ screen.generationSession = generationSession;
118
+ }
52
119
 
53
120
  if (Object.keys(screen).length === 0) {
54
121
  return "No application state found. Is the app running?";
@@ -29,6 +29,11 @@
29
29
  "id": "design-exploration",
30
30
  "action": "present-design-variants",
31
31
  "path": "/design"
32
+ },
33
+ {
34
+ "id": "visual-edit",
35
+ "action": "add-localhost-screens",
36
+ "path": "/design"
32
37
  }
33
38
  ],
34
39
  "skills": [
@@ -36,6 +41,11 @@
36
41
  "path": ".agents/skills/design-generation",
37
42
  "visibility": "both",
38
43
  "exportAs": "design-exploration"
44
+ },
45
+ {
46
+ "path": ".agents/skills/visual-edit",
47
+ "visibility": "both",
48
+ "exportAs": "visual-edit"
39
49
  }
40
50
  ],
41
51
  "hostAdapters": [