@agent-native/core 0.80.4 → 0.80.6

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 (341) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +28 -2
  3. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
  4. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +1 -1
  5. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
  6. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +1 -1
  7. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
  8. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +1 -1
  9. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
  10. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +1 -1
  11. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +1 -1
  12. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
  13. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +1 -1
  14. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
  15. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +1 -1
  16. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
  17. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +1 -1
  18. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
  19. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +1 -1
  20. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
  21. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +1 -1
  22. package/corpus/core/docs/content/real-time-collaboration.mdx +2 -2
  23. package/corpus/core/docs/content/template-design.mdx +1 -1
  24. package/corpus/core/package.json +3 -7
  25. package/corpus/core/src/action.ts +21 -0
  26. package/corpus/core/src/agent/durable-background.ts +32 -11
  27. package/corpus/core/src/agent/production-agent.ts +11 -1
  28. package/corpus/core/src/agent/run-loop-with-resume.ts +3 -1
  29. package/corpus/core/src/brand-kit/fig/index.ts +17 -37
  30. package/corpus/core/src/cli/create.ts +1 -0
  31. package/corpus/core/src/cli/index.ts +1 -1
  32. package/corpus/core/src/cli/mcp-config-writers.ts +187 -51
  33. package/corpus/core/src/cli/skills.ts +18 -3
  34. package/corpus/core/src/client/AssistantChat.tsx +11 -1
  35. package/corpus/core/src/client/agent-chat.ts +12 -1
  36. package/corpus/core/src/client/composer/PromptComposer.tsx +100 -41
  37. package/corpus/core/src/client/org/OrgSwitcher.tsx +1 -1
  38. package/corpus/core/src/client/sharing/ShareButton.tsx +3 -27
  39. package/corpus/core/src/collab/presence.ts +1 -1
  40. package/corpus/core/src/mcp/connect-route.ts +34 -5
  41. package/corpus/core/src/server/action-discovery.ts +4 -0
  42. package/corpus/core/src/server/agent-chat-plugin.ts +20 -0
  43. package/corpus/core/src/sharing/registry.ts +17 -0
  44. package/corpus/core/src/templates/default/pnpm-workspace.yaml +1 -0
  45. package/corpus/core/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
  46. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -0
  47. package/corpus/templates/analytics/actions/update-dashboard.ts +8 -0
  48. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
  49. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +117 -33
  50. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +4 -0
  51. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +7 -0
  52. package/corpus/templates/analytics/changelog/2026-06-27-dashboards-can-now-nest-under-a-parent-in-the-sidebar-via-a-.md +6 -0
  53. package/corpus/templates/analytics/changelog/2026-06-29-analytics-pages-now-sit-closer-under-the-header-with-tighter.md +6 -0
  54. package/corpus/templates/assets/actions/generate-image-batch.ts +3 -0
  55. package/corpus/templates/assets/actions/generate-image.ts +3 -0
  56. package/corpus/templates/assets/changelog/2026-06-29-longer-agent-generation-window.md +6 -0
  57. package/corpus/templates/assets/netlify.toml +3 -3
  58. package/corpus/templates/assets/server/plugins/agent-chat.ts +4 -1
  59. package/corpus/templates/clips/app/components/capture-install-options.tsx +7 -8
  60. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +1 -1
  61. package/corpus/templates/content/AGENTS.md +57 -44
  62. package/corpus/templates/content/README.md +16 -0
  63. package/corpus/templates/content/actions/_builder-cms-read-client.ts +125 -0
  64. package/corpus/templates/content/actions/_builder-cms-source-adapter.ts +28 -6
  65. package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +238 -69
  66. package/corpus/templates/content/actions/_builder-cms-write-settings.ts +125 -43
  67. package/corpus/templates/content/actions/_database-source-utils.ts +746 -97
  68. package/corpus/templates/content/actions/_database-utils.ts +17 -14
  69. package/corpus/templates/content/actions/_federation-join.ts +14 -2
  70. package/corpus/templates/content/actions/_join-suggestion.ts +89 -14
  71. package/corpus/templates/content/actions/_local-file-documents.ts +2 -1
  72. package/corpus/templates/content/actions/attach-content-database-source.ts +124 -5
  73. package/corpus/templates/content/actions/bind-content-database-source-field.ts +256 -0
  74. package/corpus/templates/content/actions/change-content-database-source-role.ts +420 -0
  75. package/corpus/templates/content/actions/create-document.ts +8 -0
  76. package/corpus/templates/content/actions/execute-builder-source-batch.ts +282 -0
  77. package/corpus/templates/content/actions/execute-builder-source-execution.ts +220 -8
  78. package/corpus/templates/content/actions/get-content-database.ts +10 -2
  79. package/corpus/templates/content/actions/prepare-builder-source-execution.ts +19 -2
  80. package/corpus/templates/content/actions/prepare-builder-source-review.ts +47 -15
  81. package/corpus/templates/content/actions/refresh-content-database-source.ts +11 -4
  82. package/corpus/templates/content/actions/review-content-database-source-change-set.ts +6 -2
  83. package/corpus/templates/content/actions/set-content-database-source-write-mode.ts +32 -12
  84. package/corpus/templates/content/actions/stage-builder-revision.ts +14 -10
  85. package/corpus/templates/content/actions/validate-builder-source-execution.ts +25 -3
  86. package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +10 -0
  87. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -0
  88. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +185 -0
  89. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1520 -553
  90. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -0
  91. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +150 -1
  92. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +19 -0
  93. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +647 -66
  94. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +543 -204
  95. package/corpus/templates/content/app/components/editor/extensions/ContentReferenceNode.tsx +82 -0
  96. package/corpus/templates/content/app/global.css +9 -0
  97. package/corpus/templates/content/app/hooks/use-content-database.ts +62 -0
  98. package/corpus/templates/content/app/i18n/zh-TW.ts +76 -0
  99. package/corpus/templates/content/app/i18n-data.ts +924 -0
  100. package/corpus/templates/content/changelog/2026-06-29-builder-review-checks-now-preserve-publish-and-unpublish-cho.md +6 -0
  101. package/corpus/templates/content/changelog/2026-06-29-database-sources-can-now-be-added-as-more-rows-or-matched.md +6 -0
  102. package/corpus/templates/content/changelog/2026-06-29-fixed-loading-the-final-rows-in-larger-databases-without-bre.md +6 -0
  103. package/corpus/templates/content/changelog/2026-06-29-reusable-mdx-references-now-preview-linked-local-documents-i.md +6 -0
  104. package/corpus/templates/content/shared/api.ts +91 -1
  105. package/corpus/templates/content/shared/builder-docs-blocks.ts +8 -0
  106. package/corpus/templates/content/shared/builder-mdx.ts +141 -4
  107. package/corpus/templates/content/shared/nfm.ts +62 -0
  108. package/corpus/templates/content/vite.config.ts +14 -7
  109. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +10 -11
  110. package/corpus/templates/design/AGENTS.md +5 -0
  111. package/corpus/templates/design/_gitignore +7 -0
  112. package/corpus/templates/design/actions/apply-visual-edit.ts +22 -12
  113. package/corpus/templates/design/actions/create-design-system.ts +15 -4
  114. package/corpus/templates/design/actions/create-file.ts +20 -1
  115. package/corpus/templates/design/actions/delete-design-system.ts +2 -2
  116. package/corpus/templates/design/actions/duplicate-design.ts +35 -9
  117. package/corpus/templates/design/actions/generate-design.ts +146 -69
  118. package/corpus/templates/design/actions/generate-screens.ts +51 -19
  119. package/corpus/templates/design/actions/get-design-snapshot.ts +5 -1
  120. package/corpus/templates/design/actions/get-design.ts +2 -0
  121. package/corpus/templates/design/actions/import-design-project.ts +28 -9
  122. package/corpus/templates/design/actions/import-document.ts +22 -8
  123. package/corpus/templates/design/actions/index-design-system-with-builder.ts +6 -153
  124. package/corpus/templates/design/actions/navigate.ts +105 -54
  125. package/corpus/templates/design/actions/set-default-design-system.ts +17 -3
  126. package/corpus/templates/design/actions/show-design-questions.ts +2 -0
  127. package/corpus/templates/design/actions/update-design.ts +2 -1
  128. package/corpus/templates/design/actions/view-screen.ts +12 -6
  129. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +4 -4
  130. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +159 -41
  131. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +8 -4
  132. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +37 -42
  133. package/corpus/templates/design/app/components/design/EditPanel.tsx +336 -183
  134. package/corpus/templates/design/app/components/design/LayersPanel.tsx +153 -34
  135. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +135 -33
  136. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +6 -0
  137. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
  138. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +4 -10
  139. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +84 -43
  140. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +4 -4
  141. package/corpus/templates/design/app/components/design/inspector/{FigmaColorPicker.tsx → DesignColorPicker.tsx} +89 -62
  142. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +14 -26
  143. package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +40 -12
  144. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +13 -4
  145. package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +13 -13
  146. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -9
  147. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +13 -4
  148. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
  149. package/corpus/templates/design/app/components/design/inspector/{figma-icons.tsx → design-icons.tsx} +2 -2
  150. package/corpus/templates/design/app/components/design/inspector/index.ts +12 -12
  151. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +5 -2
  152. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
  153. package/corpus/templates/design/app/components/layout/Layout.tsx +5 -2
  154. package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
  155. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +167 -91
  156. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +16 -3
  157. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +15 -0
  158. package/corpus/templates/design/app/global.css +4 -0
  159. package/corpus/templates/design/app/hooks/use-design-system.ts +4 -1
  160. package/corpus/templates/design/app/hooks/use-navigation-state.ts +38 -3
  161. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +9 -2
  162. package/corpus/templates/design/app/i18n/zh-TW.ts +22 -0
  163. package/corpus/templates/design/app/i18n-data.ts +527 -0
  164. package/corpus/templates/design/app/lib/design-systems.ts +6 -4
  165. package/corpus/templates/design/app/lib/design-templates.ts +15 -3
  166. package/corpus/templates/design/app/pages/DesignEditor.tsx +641 -158
  167. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +42 -34
  168. package/corpus/templates/design/app/pages/VisualEdit.tsx +100 -0
  169. package/corpus/templates/design/app/root.tsx +42 -9
  170. package/corpus/templates/design/app/routes/visual-edit.tsx +7 -0
  171. package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +1 -1
  172. package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +1 -1
  173. package/corpus/templates/design/changelog/2026-06-28-visual-code-design-mode.md +6 -0
  174. package/corpus/templates/design/changelog/2026-06-29-design-generation-prompts-now-show-connect-ai-before-sending.md +6 -0
  175. package/corpus/templates/design/changelog/2026-06-29-design-mode-top-chrome-now-groups-collaborators-preview-shar.md +1 -1
  176. package/corpus/templates/design/changelog/2026-06-29-fixed-design-editor-exports-and-gradient-edits-so-multi-scre.md +6 -0
  177. package/corpus/templates/design/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
  178. package/corpus/templates/design/changelog/2026-06-29-png-export-handles-modern-css-color-functions-more-reliably.md +6 -0
  179. package/corpus/templates/design/changelog/2026-06-29-png-export-now-ignores-duplicate-clicks-while-a-download-is-.md +6 -0
  180. package/corpus/templates/design/changelog/2026-06-29-public-visual-edit-and-shared-design-links-now-invite-visito.md +6 -0
  181. package/corpus/templates/design/changelog/2026-06-29-visual-edit-actions-now-reject-missing-design-targets-before.md +6 -0
  182. package/corpus/templates/design/e2e/README.md +71 -0
  183. package/corpus/templates/design/e2e/global-setup.ts +157 -0
  184. package/corpus/templates/design/e2e/helpers.ts +148 -0
  185. package/corpus/templates/design/netlify.toml +3 -4
  186. package/corpus/templates/design/package.json +5 -1
  187. package/corpus/templates/design/playwright.config.ts +51 -0
  188. package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +121 -0
  189. package/corpus/templates/design/server/handlers/uploads.ts +89 -38
  190. package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +181 -0
  191. package/corpus/templates/design/server/lib/coding-handoff.ts +33 -4
  192. package/corpus/templates/design/server/lib/design-export.ts +35 -8
  193. package/corpus/templates/design/server/plugins/agent-chat.ts +4 -0
  194. package/corpus/templates/design/server/plugins/auth.ts +10 -1
  195. package/corpus/templates/design/server/routes/api/index-design-system-with-builder.post.ts +1 -0
  196. package/corpus/templates/design/shared/api.ts +2 -0
  197. package/corpus/templates/design/shared/apply-edits.ts +12 -8
  198. package/corpus/templates/design/shared/canvas-math.ts +19 -1
  199. package/corpus/templates/design/shared/code-layer.ts +87 -28
  200. package/corpus/templates/design/shared/generation-session.ts +1 -0
  201. package/corpus/templates/design/shared/resolve-tweaks.ts +4 -3
  202. package/corpus/templates/design/shared/shader-presets.ts +10 -0
  203. package/corpus/templates/design/shared/source-mode.ts +9 -0
  204. package/corpus/templates/design/vitest.config.ts +2 -1
  205. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
  206. package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +1 -1
  207. package/corpus/templates/plan/AGENTS.md +1 -1
  208. package/corpus/templates/plan/actions/create-plan-design.ts +1 -1
  209. package/corpus/templates/plan/actions/validate-local-plan-source.ts +2 -10
  210. package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -0
  211. package/corpus/templates/plan/docs/commenting-ux-plan.md +2 -2
  212. package/corpus/templates/plan/server/plan-content.ts +1 -1
  213. package/corpus/templates/plan/server/ui-plan-html.ts +2 -2
  214. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +6 -153
  215. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +53 -38
  216. package/corpus/templates/slides/app/components/design-system/{fig-import-response.ts → builder-index-response.ts} +9 -6
  217. package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
  218. package/corpus/templates/slides/changelog/2026-06-29-design-system-setup-now-indexes-uploaded-design-files-throug.md +6 -0
  219. package/corpus/templates/slides/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
  220. package/corpus/templates/slides/netlify.toml +3 -6
  221. package/corpus/templates/slides/server/handlers/index-design-system-with-builder.ts +116 -0
  222. package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +179 -0
  223. package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -1
  224. package/corpus/templates/slides/server/routes/api/index-design-system-with-builder.post.ts +1 -0
  225. package/dist/action.d.ts +15 -0
  226. package/dist/action.d.ts.map +1 -1
  227. package/dist/action.js +6 -0
  228. package/dist/action.js.map +1 -1
  229. package/dist/agent/durable-background.d.ts +9 -7
  230. package/dist/agent/durable-background.d.ts.map +1 -1
  231. package/dist/agent/durable-background.js +27 -11
  232. package/dist/agent/durable-background.js.map +1 -1
  233. package/dist/agent/production-agent.d.ts +7 -0
  234. package/dist/agent/production-agent.d.ts.map +1 -1
  235. package/dist/agent/production-agent.js +4 -1
  236. package/dist/agent/production-agent.js.map +1 -1
  237. package/dist/agent/run-loop-with-resume.d.ts +2 -1
  238. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  239. package/dist/agent/run-loop-with-resume.js +2 -2
  240. package/dist/agent/run-loop-with-resume.js.map +1 -1
  241. package/dist/brand-kit/fig/index.d.ts +4 -4
  242. package/dist/brand-kit/fig/index.d.ts.map +1 -1
  243. package/dist/brand-kit/fig/index.js +14 -27
  244. package/dist/brand-kit/fig/index.js.map +1 -1
  245. package/dist/cli/create.d.ts.map +1 -1
  246. package/dist/cli/create.js +1 -0
  247. package/dist/cli/create.js.map +1 -1
  248. package/dist/cli/index.js +1 -1
  249. package/dist/cli/index.js.map +1 -1
  250. package/dist/cli/mcp-config-writers.d.ts +15 -7
  251. package/dist/cli/mcp-config-writers.d.ts.map +1 -1
  252. package/dist/cli/mcp-config-writers.js +198 -45
  253. package/dist/cli/mcp-config-writers.js.map +1 -1
  254. package/dist/cli/skills.d.ts +1 -1
  255. package/dist/cli/skills.d.ts.map +1 -1
  256. package/dist/cli/skills.js +18 -3
  257. package/dist/cli/skills.js.map +1 -1
  258. package/dist/client/AssistantChat.d.ts.map +1 -1
  259. package/dist/client/AssistantChat.js +11 -1
  260. package/dist/client/AssistantChat.js.map +1 -1
  261. package/dist/client/agent-chat.d.ts.map +1 -1
  262. package/dist/client/agent-chat.js +15 -2
  263. package/dist/client/agent-chat.js.map +1 -1
  264. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  265. package/dist/client/composer/PromptComposer.js +35 -1
  266. package/dist/client/composer/PromptComposer.js.map +1 -1
  267. package/dist/client/org/OrgSwitcher.js +1 -1
  268. package/dist/client/org/OrgSwitcher.js.map +1 -1
  269. package/dist/client/sharing/ShareButton.d.ts +1 -1
  270. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  271. package/dist/client/sharing/ShareButton.js +2 -15
  272. package/dist/client/sharing/ShareButton.js.map +1 -1
  273. package/dist/collab/presence.d.ts +1 -1
  274. package/dist/collab/presence.js +1 -1
  275. package/dist/collab/presence.js.map +1 -1
  276. package/dist/collab/routes.d.ts +1 -1
  277. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  278. package/dist/mcp/connect-route.d.ts.map +1 -1
  279. package/dist/mcp/connect-route.js +34 -5
  280. package/dist/mcp/connect-route.js.map +1 -1
  281. package/dist/notifications/routes.d.ts +2 -2
  282. package/dist/observability/routes.d.ts +8 -8
  283. package/dist/resources/handlers.d.ts +1 -1
  284. package/dist/server/action-discovery.d.ts.map +1 -1
  285. package/dist/server/action-discovery.js +5 -0
  286. package/dist/server/action-discovery.js.map +1 -1
  287. package/dist/server/agent-chat-plugin.d.ts +6 -0
  288. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  289. package/dist/server/agent-chat-plugin.js +12 -3
  290. package/dist/server/agent-chat-plugin.js.map +1 -1
  291. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  292. package/dist/sharing/registry.d.ts.map +1 -1
  293. package/dist/sharing/registry.js +11 -0
  294. package/dist/sharing/registry.js.map +1 -1
  295. package/dist/templates/default/pnpm-workspace.yaml +1 -0
  296. package/dist/templates/workspace-root/pnpm-workspace.yaml +1 -0
  297. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
  298. package/docs/content/locales/ar-SA/template-design.mdx +1 -1
  299. package/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
  300. package/docs/content/locales/de-DE/template-design.mdx +1 -1
  301. package/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
  302. package/docs/content/locales/es-ES/template-design.mdx +1 -1
  303. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
  304. package/docs/content/locales/fr-FR/template-design.mdx +1 -1
  305. package/docs/content/locales/hi-IN/template-design.mdx +1 -1
  306. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
  307. package/docs/content/locales/ja-JP/template-design.mdx +1 -1
  308. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
  309. package/docs/content/locales/ko-KR/template-design.mdx +1 -1
  310. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
  311. package/docs/content/locales/pt-BR/template-design.mdx +1 -1
  312. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
  313. package/docs/content/locales/zh-CN/template-design.mdx +1 -1
  314. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
  315. package/docs/content/locales/zh-TW/template-design.mdx +1 -1
  316. package/docs/content/real-time-collaboration.mdx +2 -2
  317. package/docs/content/template-design.mdx +1 -1
  318. package/package.json +3 -7
  319. package/src/templates/default/pnpm-workspace.yaml +1 -0
  320. package/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
  321. package/corpus/core/src/brand-kit/fig/decode.ts +0 -410
  322. package/corpus/core/src/brand-kit/fig/extract-design-system.ts +0 -947
  323. package/corpus/core/src/brand-kit/fig/fig-to-html.ts +0 -1906
  324. package/corpus/templates/design/actions/import-figma.ts +0 -55
  325. package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +0 -6
  326. package/corpus/templates/design/server/handlers/import-figma-system.ts +0 -86
  327. package/corpus/templates/design/server/routes/api/import-figma-system.post.ts +0 -1
  328. package/corpus/templates/slides/server/handlers/import-figma-system.ts +0 -101
  329. package/corpus/templates/slides/server/routes/api/import-figma-system.post.ts +0 -1
  330. package/dist/brand-kit/fig/decode.d.ts +0 -33
  331. package/dist/brand-kit/fig/decode.d.ts.map +0 -1
  332. package/dist/brand-kit/fig/decode.js +0 -358
  333. package/dist/brand-kit/fig/decode.js.map +0 -1
  334. package/dist/brand-kit/fig/extract-design-system.d.ts +0 -44
  335. package/dist/brand-kit/fig/extract-design-system.d.ts.map +0 -1
  336. package/dist/brand-kit/fig/extract-design-system.js +0 -752
  337. package/dist/brand-kit/fig/extract-design-system.js.map +0 -1
  338. package/dist/brand-kit/fig/fig-to-html.d.ts +0 -246
  339. package/dist/brand-kit/fig/fig-to-html.d.ts.map +0 -1
  340. package/dist/brand-kit/fig/fig-to-html.js +0 -1506
  341. package/dist/brand-kit/fig/fig-to-html.js.map +0 -1
@@ -45,7 +45,7 @@ interface UploadedFile {
45
45
  textContent?: string;
46
46
  }
47
47
 
48
- interface FigImportResult {
48
+ interface BuilderIndexResult {
49
49
  ok: boolean;
50
50
  source: "builder";
51
51
  suggestedTitle: string;
@@ -54,6 +54,9 @@ interface FigImportResult {
54
54
  designSystemId: string;
55
55
  builderUrl: string;
56
56
  status: "in-progress";
57
+ localDesignSystemId?: string;
58
+ uploadedFileCount?: number;
59
+ instructions?: string;
57
60
  }
58
61
 
59
62
  export default function DesignSystemSetup() {
@@ -68,7 +71,6 @@ export default function DesignSystemSetup() {
68
71
  const [githubUrl, setGithubUrl] = useState("");
69
72
  const [githubLinks, setGithubLinks] = useState<GitHubLink[]>([]);
70
73
  const [codeFiles, setCodeFiles] = useState<UploadedFile[]>([]);
71
- const [figFiles] = useState<UploadedFile[]>([]);
72
74
  const [docFiles, setDocFiles] = useState<UploadedFile[]>([]);
73
75
  const [imageFiles, setImageFiles] = useState<UploadedFile[]>([]);
74
76
  const [assets, setAssets] = useState<UploadedFile[]>([]);
@@ -96,42 +98,48 @@ export default function DesignSystemSetup() {
96
98
 
97
99
  // --- Figma .fig import (Builder design-system indexing) -----------------
98
100
  const realFigInputRef = useRef<HTMLInputElement>(null);
99
- const [figParsing, setFigParsing] = useState(false);
100
- const [figResult, setFigResult] = useState<FigImportResult | null>(null);
101
- const [figError, setFigError] = useState<string | null>(null);
101
+ const [builderIndexing, setBuilderIndexing] = useState(false);
102
+ const [builderIndexResult, setBuilderIndexResult] =
103
+ useState<BuilderIndexResult | null>(null);
104
+ const [builderIndexError, setBuilderIndexError] = useState<string | null>(
105
+ null,
106
+ );
102
107
 
103
- const handleFigImport = useCallback(
108
+ const handleBuilderIndexUpload = useCallback(
104
109
  async (e: React.ChangeEvent<HTMLInputElement>) => {
105
110
  const file = e.target.files?.[0];
106
111
  e.target.value = "";
107
112
  if (!file) return;
108
113
  if (!file.name.toLowerCase().endsWith(".fig")) {
109
- setFigError(t("designSystemSetup.errors.chooseFig"));
114
+ setBuilderIndexError(t("designSystemSetup.errors.chooseFig"));
110
115
  return;
111
116
  }
112
- setFigError(null);
113
- setFigResult(null);
114
- setFigParsing(true);
117
+ setBuilderIndexError(null);
118
+ setBuilderIndexResult(null);
119
+ setBuilderIndexing(true);
115
120
  try {
116
121
  const body = new FormData();
117
122
  body.append("file", file);
118
- const res = await fetch(appApiPath("/api/import-figma-system"), {
119
- method: "POST",
120
- body,
121
- });
123
+ const res = await fetch(
124
+ appApiPath("/api/index-design-system-with-builder"),
125
+ {
126
+ method: "POST",
127
+ body,
128
+ },
129
+ );
122
130
  const json = await res.json();
123
131
  if (!res.ok || json?.error) {
124
132
  throw new Error(json?.error || `Upload failed (${res.status})`);
125
133
  }
126
- setFigResult(json as FigImportResult);
134
+ setBuilderIndexResult(json as BuilderIndexResult);
127
135
  } catch (err) {
128
- setFigError(
136
+ setBuilderIndexError(
129
137
  err instanceof Error
130
138
  ? err.message
131
139
  : t("designSystemSetup.errors.parseFig"),
132
140
  );
133
141
  } finally {
134
- setFigParsing(false);
142
+ setBuilderIndexing(false);
135
143
  }
136
144
  },
137
145
  [t],
@@ -155,7 +163,7 @@ export default function DesignSystemSetup() {
155
163
  githubUrl.trim() ||
156
164
  githubLinks.length > 0 ||
157
165
  codeFiles.length > 0 ||
158
- figFiles.length > 0 ||
166
+ builderIndexResult ||
159
167
  docFiles.length > 0 ||
160
168
  imageFiles.length > 0 ||
161
169
  assets.length > 0 ||
@@ -170,7 +178,7 @@ export default function DesignSystemSetup() {
170
178
  githubUrl,
171
179
  githubLinks,
172
180
  codeFiles,
173
- figFiles,
181
+ builderIndexResult,
174
182
  docFiles,
175
183
  imageFiles,
176
184
  assets,
@@ -383,9 +391,9 @@ export default function DesignSystemSetup() {
383
391
  }
384
392
  }
385
393
 
386
- if (figFiles.length > 0) {
394
+ if (builderIndexResult) {
387
395
  parts.push(
388
- `\n## Figma Files\nCall \`import-figma\` and describe the design system from:\n${figFiles.map((f) => `- ${f.name}`).join("\n")}`,
396
+ `\n## Builder-Indexed Figma File\nBuilder design-system indexing has already started.\n- Design system: ${builderIndexResult.designSystemId}\n- Local selectable design system: ${builderIndexResult.localDesignSystemId ?? "(not returned)"}\n- Project: ${builderIndexResult.projectId}\n- Job: ${builderIndexResult.jobId}\n- URL: ${builderIndexResult.builderUrl}\n\nUse Builder as the source of truth for extracted tokens, assets, and guidance. Do not call \`create-design-system\` again for this Builder-indexed source.`,
389
397
  );
390
398
  }
391
399
 
@@ -450,7 +458,7 @@ export default function DesignSystemSetup() {
450
458
  githubUrl,
451
459
  githubLinks,
452
460
  codeFiles,
453
- figFiles,
461
+ builderIndexResult,
454
462
  docFiles,
455
463
  imageFiles,
456
464
  assets,
@@ -517,15 +525,15 @@ export default function DesignSystemSetup() {
517
525
  title={t("designSystemSetup.sections.figma.title")}
518
526
  description={t("designSystemSetup.sections.figma.description")}
519
527
  >
520
- {!figResult ? (
528
+ {!builderIndexResult ? (
521
529
  <>
522
530
  <button
523
531
  type="button"
524
532
  onClick={() => realFigInputRef.current?.click()}
525
- disabled={figParsing}
533
+ disabled={builderIndexing}
526
534
  className="w-full rounded-xl border border-dashed border-border bg-card p-8 text-center hover:border-[#609FF8]/40 cursor-pointer disabled:cursor-wait disabled:opacity-70"
527
535
  >
528
- {figParsing ? (
536
+ {builderIndexing ? (
529
537
  <div className="flex flex-col items-center gap-2">
530
538
  <Spinner className="size-6 text-[#609FF8]" />
531
539
  <p className="text-sm text-foreground/80">
@@ -553,24 +561,24 @@ export default function DesignSystemSetup() {
553
561
  ref={realFigInputRef}
554
562
  type="file"
555
563
  accept=".fig"
556
- onChange={handleFigImport}
564
+ onChange={handleBuilderIndexUpload}
557
565
  className="hidden"
558
566
  />
559
- {figError && (
567
+ {builderIndexError && (
560
568
  <div
561
569
  role="alert"
562
570
  className="mt-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-300"
563
571
  >
564
- {figError}
572
+ {builderIndexError}
565
573
  </div>
566
574
  )}
567
575
  </>
568
576
  ) : (
569
- <FigImportPreview
570
- result={figResult}
577
+ <BuilderIndexPreview
578
+ result={builderIndexResult}
571
579
  onReset={() => {
572
- setFigResult(null);
573
- setFigError(null);
580
+ setBuilderIndexResult(null);
581
+ setBuilderIndexError(null);
574
582
  }}
575
583
  />
576
584
  )}
@@ -1036,11 +1044,11 @@ function FileList({
1036
1044
  );
1037
1045
  }
1038
1046
 
1039
- function FigImportPreview({
1047
+ function BuilderIndexPreview({
1040
1048
  result,
1041
1049
  onReset,
1042
1050
  }: {
1043
- result: FigImportResult;
1051
+ result: BuilderIndexResult;
1044
1052
  onReset: () => void;
1045
1053
  }) {
1046
1054
  const t = useT();
@@ -0,0 +1,100 @@
1
+ import { agentNativePath, useSession, useT } from "@agent-native/core/client";
2
+ import {
3
+ IconArrowUpRight,
4
+ IconBrush,
5
+ IconDeviceDesktop,
6
+ IconDeviceFloppy,
7
+ IconLayoutGrid,
8
+ } from "@tabler/icons-react";
9
+ import { Link } from "react-router";
10
+
11
+ import { Button } from "@/components/ui/button";
12
+
13
+ function buildSignInHref(): string {
14
+ const ret = "/?intent=save";
15
+ return `${agentNativePath("/_agent-native/sign-in")}?return=${encodeURIComponent(ret)}`;
16
+ }
17
+
18
+ export default function VisualEditPage() {
19
+ const t = useT();
20
+ const { session } = useSession();
21
+ const hasSession = Boolean(session?.email);
22
+ const primaryHref = hasSession ? "/" : buildSignInHref();
23
+
24
+ return (
25
+ <main className="min-h-[100dvh] bg-background text-foreground">
26
+ <div className="mx-auto flex min-h-[100dvh] w-full max-w-6xl flex-col px-5 py-5 sm:px-8 lg:px-10">
27
+ <header className="flex h-12 shrink-0 items-center justify-between gap-4">
28
+ <Link
29
+ to="/"
30
+ className="text-sm font-semibold tracking-tight text-foreground"
31
+ >
32
+ {t("navigation.brand")}
33
+ </Link>
34
+ <Button asChild variant="outline" size="sm">
35
+ <a href={primaryHref}>
36
+ {hasSession
37
+ ? t("visualEdit.openDesign")
38
+ : t("visualEdit.saveCta")}
39
+ <IconArrowUpRight className="size-4" />
40
+ </a>
41
+ </Button>
42
+ </header>
43
+
44
+ <section className="grid flex-1 items-center gap-10 py-10 lg:grid-cols-[minmax(0,1fr)_26rem] lg:py-14">
45
+ <div className="max-w-2xl">
46
+ <div className="mb-4 inline-flex items-center gap-2 rounded-md border border-border bg-muted/40 px-2.5 py-1 text-xs font-medium text-muted-foreground">
47
+ <IconBrush className="size-3.5" />
48
+ {t("visualEdit.eyebrow")}
49
+ </div>
50
+ <h1 className="max-w-2xl text-4xl font-semibold tracking-normal text-foreground sm:text-5xl">
51
+ {t("visualEdit.title")}
52
+ </h1>
53
+ <p className="mt-4 max-w-xl text-base leading-7 text-muted-foreground">
54
+ {t("visualEdit.description")}
55
+ </p>
56
+ <div className="mt-7 flex flex-wrap items-center gap-3">
57
+ <Button asChild size="lg" className="gap-2">
58
+ <a href={primaryHref}>
59
+ <IconDeviceFloppy className="size-4" />
60
+ {hasSession
61
+ ? t("visualEdit.openDesign")
62
+ : t("visualEdit.saveCta")}
63
+ </a>
64
+ </Button>
65
+ <Button asChild variant="ghost" size="lg">
66
+ <Link to="/templates">{t("visualEdit.templatesCta")}</Link>
67
+ </Button>
68
+ </div>
69
+ </div>
70
+
71
+ <div className="rounded-lg border border-border bg-card p-3 shadow-sm">
72
+ <div className="rounded-md border border-border bg-background">
73
+ <div className="flex h-10 items-center gap-2 border-b border-border px-3">
74
+ <span className="h-2.5 w-2.5 rounded-full bg-destructive/70" />
75
+ <span className="h-2.5 w-2.5 rounded-full bg-amber-400" />
76
+ <span className="h-2.5 w-2.5 rounded-full bg-emerald-500" />
77
+ <div className="ms-auto flex items-center gap-1.5 text-xs text-muted-foreground">
78
+ <IconDeviceDesktop className="size-3.5" />
79
+ {t("visualEdit.previewLabel")}
80
+ </div>
81
+ </div>
82
+ <div className="grid gap-3 p-4">
83
+ <div className="h-28 rounded-md border border-dashed border-border bg-muted/40" />
84
+ <div className="grid grid-cols-3 gap-3">
85
+ <div className="h-20 rounded-md border border-border bg-background" />
86
+ <div className="h-20 rounded-md border border-border bg-background" />
87
+ <div className="h-20 rounded-md border border-border bg-background" />
88
+ </div>
89
+ <div className="flex items-center gap-2 rounded-md border border-border bg-muted/40 px-3 py-2 text-xs text-muted-foreground">
90
+ <IconLayoutGrid className="size-3.5" />
91
+ {t("visualEdit.layoutLabel")}
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </section>
97
+ </div>
98
+ </main>
99
+ );
100
+ }
@@ -9,13 +9,21 @@ import {
9
9
  getThemeInitScript,
10
10
  getBrowserTabId,
11
11
  configureTracking,
12
+ useSession,
12
13
  useT,
13
14
  } from "@agent-native/core/client";
14
15
  import { IconSun, IconMoon } from "@tabler/icons-react";
15
16
  import { useQueryClient } from "@tanstack/react-query";
16
17
  import { useTheme } from "next-themes";
17
18
  import { useCallback, useState } from "react";
18
- import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
19
+ import {
20
+ Links,
21
+ Meta,
22
+ Outlet,
23
+ Scripts,
24
+ ScrollRestoration,
25
+ useLocation,
26
+ } from "react-router";
19
27
  import type { LinksFunction } from "react-router";
20
28
 
21
29
  import { Layout as AppLayout } from "@/components/layout/Layout";
@@ -132,18 +140,43 @@ function DesignCommandMenu({
132
140
  );
133
141
  }
134
142
 
143
+ function RootContent() {
144
+ const location = useLocation();
145
+ const { session } = useSession();
146
+ const [cmdkOpen, setCmdkOpen] = useState(false);
147
+ const hasSession = Boolean(session?.email);
148
+ const isPublicVisualEdit = location.pathname === "/visual-edit";
149
+ useCommandMenuShortcut(
150
+ useCallback(() => {
151
+ if (hasSession && !isPublicVisualEdit) setCmdkOpen(true);
152
+ }, [hasSession, isPublicVisualEdit]),
153
+ );
154
+
155
+ const content = isPublicVisualEdit ? (
156
+ <Outlet />
157
+ ) : (
158
+ <AppLayout>
159
+ <Outlet />
160
+ </AppLayout>
161
+ );
162
+
163
+ return (
164
+ <>
165
+ {hasSession && <DbSyncSetup />}
166
+ <Toaster richColors position="bottom-left" />
167
+ {hasSession && !isPublicVisualEdit && (
168
+ <DesignCommandMenu open={cmdkOpen} onOpenChange={setCmdkOpen} />
169
+ )}
170
+ {content}
171
+ </>
172
+ );
173
+ }
174
+
135
175
  export default function Root() {
136
176
  const [queryClient] = useState(() => createAgentNativeQueryClient());
137
- const [cmdkOpen, setCmdkOpen] = useState(false);
138
- useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
139
177
  return (
140
178
  <AppProviders queryClient={queryClient} i18n={{ catalog: i18nCatalog }}>
141
- <DbSyncSetup />
142
- <Toaster richColors position="bottom-left" />
143
- <DesignCommandMenu open={cmdkOpen} onOpenChange={setCmdkOpen} />
144
- <AppLayout>
145
- <Outlet />
146
- </AppLayout>
179
+ <RootContent />
147
180
  </AppProviders>
148
181
  );
149
182
  }
@@ -0,0 +1,7 @@
1
+ import { messagesByLocale } from "@/i18n-data";
2
+
3
+ export { default } from "../pages/VisualEdit";
4
+
5
+ export function meta() {
6
+ return [{ title: messagesByLocale["en-US"].routeTitles.visualEdit }];
7
+ }
@@ -3,4 +3,4 @@ type: improved
3
3
  date: 2026-06-28
4
4
  ---
5
5
 
6
- Live cursors now look closer to Figma, with a sharper pointer and cleaner name tag.
6
+ Live cursors now use a sharper pointer with a cleaner adjacent name tag.
@@ -3,4 +3,4 @@ type: improved
3
3
  date: 2026-06-28
4
4
  ---
5
5
 
6
- The bottom toolbar now groups Figma-style tool menus with a distinct mode section.
6
+ The bottom toolbar now groups tool menus with a distinct mode section.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-06-28
4
+ ---
5
+
6
+ Design mode now has a full-featured visual code canvas with adaptive inspection, patch proof, artboard duplication, clarify cards, and annotation queues.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ Design generation now shows Connect AI before sending when no LLM is connected and switches into loading as soon as generation starts.
@@ -3,4 +3,4 @@ type: improved
3
3
  date: 2026-06-29
4
4
  ---
5
5
 
6
- Design mode top chrome now groups collaborators, preview, Share, and chat closer to Figma.
6
+ Design mode top chrome now groups collaborators, preview, Share, and chat in a cleaner editor bar.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ Fixed Design editor exports and gradient edits so multi-screen outputs and paint settings stay faithful.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ Hosted design generation and editing chats have a longer background run window, reducing timeouts during complex creative turns.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ PNG export handles modern CSS color functions more reliably.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ PNG export now ignores duplicate clicks while a download is already running.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ Public visual-edit and shared design links now invite visitors to create a free account when they save or share.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-06-29
4
+ ---
5
+
6
+ Visual edit actions now reject missing design targets before running.
@@ -0,0 +1,71 @@
1
+ # Design editor — real-browser E2E
2
+
3
+ End-to-end tests that drive the **visual editor** in real Chromium with
4
+ `@playwright/test`. They exercise the things unit tests can't: selecting,
5
+ resizing, moving/reparenting, the layers panel, and the iframe bridge.
6
+
7
+ ## Run
8
+
9
+ ```bash
10
+ pnpm e2e # headless
11
+ pnpm e2e:headed # watch it drive a real browser
12
+ pnpm e2e:ui # Playwright UI mode
13
+ ```
14
+
15
+ - `playwright.config.ts` starts its own dev server on **:9333** backed by a
16
+ throwaway SQLite db (`data/e2e.db`) — `APP_NAME=design` +
17
+ `DESIGN_DATABASE_URL=file:...` so a `.env` Postgres URL can never leak in.
18
+ - Locally, if a server is already running on :9333 it is **reused**
19
+ (`reuseExistingServer`). The most reliable local loop is to keep a server up
20
+ yourself and run against it:
21
+ ```bash
22
+ APP_NAME=design DESIGN_DATABASE_URL="file:./data/e2e.db" PORT=9333 pnpm dev # one terminal
23
+ E2E_BASE_URL=http://localhost:9333 pnpm e2e # another
24
+ ```
25
+ `E2E_BASE_URL` makes Playwright skip server management entirely and just use
26
+ yours — handy when the cold Vite optimize is slow under Playwright's spawn.
27
+
28
+ `e2e/global-setup.ts` signs up a test user (email/password — there is **no dev
29
+ auth bypass**), saves the signed session to `e2e/.auth/state.json`, and seeds
30
+ one design with a known fixture (`e2e/.auth/seed.json`) via the authenticated
31
+ action endpoints. Both `.auth/` files are gitignored.
32
+
33
+ ## Why the editor needs special handling (the hard-won bits)
34
+
35
+ The design renders inside a `sandbox="allow-scripts"` iframe with **no
36
+ `allow-same-origin`**, and a pointer-capturing shield overlay sits on top. So:
37
+
38
+ | Symptom | Wrong approach | Right approach |
39
+ | ----------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40
+ | Can't read iframe DOM | `iframe.contentDocument` → `null` | `page.frameLocator('iframe').locator(...)` — CDP targets the frame directly |
41
+ | Clicks "intercepted by `<div data-agent-native-edit-overlay="shield">`" | normal click (actionability fails) | `.click({ force: true })` — the shield is _meant_ to get the event and drive selection |
42
+ | Asserting an edit happened | reading iframe state | listen for the bridge's parent `postMessage`s: `element-select`, `element-hover`, `visual-style-change`, `visual-structure-change` (see `installBridge`/`waitForBridge`) |
43
+ | `page.screenshot()` hangs forever | `page.screenshot()` | `cdpScreenshot()` — CDP `Page.captureScreenshot`, no stability wait (the page never idles; the agent-chat panel polls) |
44
+ | Node ids change between runs | hardcoding `data-agent-native-node-id` | select by **text/role**, then read the stamped id back from the `element-select` payload |
45
+ | Drag move/resize | HTML5 `dragTo` on the canvas | `page.mouse.move/down/up` with intermediate steps at `boundingBox()` coords (the canvas uses raw pointer events). The **layers panel** is in the parent doc and _does_ use HTML5 DnD → `locator.dragTo()`. |
46
+
47
+ `helpers.ts` wraps all of this: `gotoEditor`, `selectByText`, `dragCanvasByText`,
48
+ `installBridge`/`waitForBridge`, `cdpScreenshot`, `readSeedDesignId`.
49
+
50
+ ## Driving your REAL, logged-in Chrome (chrome-devtools-mcp)
51
+
52
+ Playwright (above) is best for deterministic CI against a local throwaway DB.
53
+ To exercise the **deployed app with your actual Google session** — no test
54
+ user, no seeding — drive a real Chrome over CDP:
55
+
56
+ ```bash
57
+ # 1. Launch Chrome (144+) with remote debugging. Use a separate profile dir so
58
+ # you can sign in normally without touching your main profile.
59
+ "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
60
+ --remote-debugging-port=9222 \
61
+ --user-data-dir="$HOME/.chrome-e2e" &
62
+ # 2. Sign in to the deployed Design app in that window.
63
+ ```
64
+
65
+ Then attach the agent's **`chrome-devtools-mcp`** built-in (the `/qa` skill
66
+ toggles it; it runs `npx chrome-devtools-mcp@latest --autoConnect`) and drive it
67
+ with `navigate_page` / `take_snapshot` / `evaluate_script` / `click`. The exact
68
+ same editor techniques apply — `evaluate_script` can install the bridge listener
69
+ and read frame content; clicks go through the shield. This path uses your live
70
+ auth and data, so it's ideal for manual/exploratory verification and smoke-
71
+ testing prod, while the Playwright suite stays the deterministic regression net.