@agent-native/core 0.80.8 → 0.80.9

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 (281) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +6 -0
  4. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +8 -0
  5. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +10 -2
  6. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +10 -2
  7. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +7 -0
  8. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +7 -0
  9. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +7 -0
  10. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +9 -2
  11. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +6 -0
  12. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +6 -0
  13. package/corpus/core/docs/content/template-design.mdx +9 -2
  14. package/corpus/core/package.json +1 -1
  15. package/corpus/core/src/cli/mcp.ts +10 -0
  16. package/corpus/core/src/cli/skills.ts +58 -12
  17. package/corpus/core/src/client/error-format.ts +25 -0
  18. package/corpus/core/src/client/extensions/ExtensionViewer.tsx +13 -11
  19. package/corpus/core/src/client/guided-questions.tsx +32 -4
  20. package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +33 -1
  21. package/corpus/core/src/client/resources/BuiltinCapabilityDetail.tsx +8 -0
  22. package/corpus/core/src/client/resources/use-builtin-capabilities.ts +4 -2
  23. package/corpus/core/src/client/session-replay.ts +34 -0
  24. package/corpus/core/src/client/sharing/ShareButton.tsx +106 -21
  25. package/corpus/core/src/coding-tools/index.ts +1 -1
  26. package/corpus/core/src/mcp/index.ts +2 -0
  27. package/corpus/core/src/mcp/screen-memory-stdio.ts +290 -0
  28. package/corpus/core/src/mcp-client/builtin-capabilities.ts +13 -1
  29. package/corpus/core/src/mcp-client/index.ts +9 -0
  30. package/corpus/core/src/mcp-client/screen-memory-local.ts +461 -0
  31. package/corpus/core/src/onboarding/types.ts +7 -0
  32. package/corpus/core/src/server/agent-chat-plugin.ts +25 -0
  33. package/corpus/core/src/server/agents-bundle.ts +35 -7
  34. package/corpus/core/src/styles/agent-native.css +5 -0
  35. package/corpus/core/src/templates/default/app/global.css +35 -35
  36. package/corpus/templates/analytics/AGENTS.md +6 -0
  37. package/corpus/templates/analytics/actions/github-repo-files.ts +9 -0
  38. package/corpus/templates/analytics/app/components/layout/Layout.tsx +4 -4
  39. package/corpus/templates/analytics/app/global.css +144 -40
  40. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +1 -1
  41. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +1 -1
  42. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
  43. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +4 -4
  44. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +9 -9
  45. package/corpus/templates/analytics/changelog/2026-06-29-agents-can-search-and-read-connected-github-repositories-whe.md +6 -0
  46. package/corpus/templates/analytics/changelog/2026-06-29-sessions-and-explorer-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
  47. package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -1
  48. package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +1 -1
  49. package/corpus/templates/assets/app/global.css +99 -35
  50. package/corpus/templates/assets/app/routes/asset.$id.tsx +2 -2
  51. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +4 -4
  52. package/corpus/templates/assets/app/routes/library.tsx +4 -4
  53. package/corpus/templates/assets/changelog/2026-06-29-asset-library-and-detail-layouts-adapt-when-the-agent-sidebar.md +6 -0
  54. package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
  55. package/corpus/templates/brain/app/global.css +63 -35
  56. package/corpus/templates/brain/app/routes/search.tsx +1 -1
  57. package/corpus/templates/brain/app/routes/settings.tsx +1 -1
  58. package/corpus/templates/brain/app/routes/sources.tsx +2 -2
  59. package/corpus/templates/brain/changelog/2026-06-29-search-settings-and-source-layouts-adapt-when-the-agent-sidebar.md +6 -0
  60. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +4 -4
  61. package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +3 -2
  62. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +4 -2
  63. package/corpus/templates/calendar/app/global.css +69 -35
  64. package/corpus/templates/calendar/changelog/2026-06-29-event-and-find-time-layouts-adapt-when-the-agent-sidebar-is.md +6 -0
  65. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
  66. package/corpus/templates/chat/app/global.css +35 -35
  67. package/corpus/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  68. package/corpus/templates/clips/AGENTS.md +13 -0
  69. package/corpus/templates/clips/actions/get-screen-memory-status.ts +12 -0
  70. package/corpus/templates/clips/actions/query-screen-memory-context.ts +29 -0
  71. package/corpus/templates/clips/actions/view-screen.ts +2 -2
  72. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  73. package/corpus/templates/clips/app/global.css +47 -35
  74. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +3 -3
  75. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +45 -18
  76. package/corpus/templates/clips/changelog/2026-06-29-meeting-detail-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  77. package/corpus/templates/clips/changelog/2026-06-29-screen-memory-keeps-a-local-rolling-screen-buffer-for-agent-context.md +5 -0
  78. package/corpus/templates/clips/changelog/2026-06-29-video-chat-is-easier-to-find-on-recording-pages-and-s3-setup.md +6 -0
  79. package/corpus/templates/clips/chrome-extension/src/styles.css +39 -39
  80. package/corpus/templates/clips/desktop/src/app.tsx +290 -1
  81. package/corpus/templates/clips/desktop/src/shared/config.ts +83 -0
  82. package/corpus/templates/clips/desktop/src/styles.css +67 -52
  83. package/corpus/templates/clips/desktop/src-tauri/src/config.rs +50 -0
  84. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +17 -0
  85. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +13 -13
  86. package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +990 -0
  87. package/corpus/templates/clips/server/plugins/onboarding.ts +2 -0
  88. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +3 -3
  89. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
  90. package/corpus/templates/content/app/global.css +29 -15
  91. package/corpus/templates/content/changelog/2026-06-29-database-gallery-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  92. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +25 -20
  93. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +8 -0
  94. package/corpus/templates/design/.agents/skills/export-handoff/SKILL.md +8 -0
  95. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +13 -0
  96. package/corpus/templates/design/AGENTS.md +20 -12
  97. package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +1054 -0
  98. package/corpus/templates/design/actions/apply-visual-edit.ts +24 -4
  99. package/corpus/templates/design/actions/export-coding-handoff.ts +12 -4
  100. package/corpus/templates/design/actions/generate-design.ts +6 -21
  101. package/corpus/templates/design/actions/generate-screens.ts +43 -2
  102. package/corpus/templates/design/actions/get-design.ts +1 -0
  103. package/corpus/templates/design/actions/present-design-variants.ts +355 -30
  104. package/corpus/templates/design/actions/view-screen.ts +75 -31
  105. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +329 -69
  106. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +1 -1
  107. package/corpus/templates/design/app/components/design/EditPanel.tsx +479 -77
  108. package/corpus/templates/design/app/components/design/LayersPanel.tsx +380 -216
  109. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1050 -196
  110. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +83 -206
  111. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +1 -1
  112. package/corpus/templates/design/app/components/design/index.ts +0 -1
  113. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +225 -133
  114. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +122 -11
  115. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +24 -5
  116. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +57 -1
  117. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +37 -12
  118. package/corpus/templates/design/app/components/design/inspector/index.ts +1 -0
  119. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +12 -5
  120. package/corpus/templates/design/app/components/design/types.ts +9 -0
  121. package/corpus/templates/design/app/components/layout/Layout.tsx +23 -5
  122. package/corpus/templates/design/app/global.css +77 -49
  123. package/corpus/templates/design/app/hooks/use-question-flow.ts +2 -2
  124. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +8 -1
  125. package/corpus/templates/design/app/i18n/zh-TW.ts +3 -0
  126. package/corpus/templates/design/app/i18n-data.ts +45 -3
  127. package/corpus/templates/design/app/pages/DesignEditor.tsx +2602 -657
  128. package/corpus/templates/design/app/root.tsx +1 -1
  129. package/corpus/templates/design/changelog/2026-06-29-containers-no-longer-block-selecting-nested-elements-and-nor.md +6 -0
  130. package/corpus/templates/design/changelog/2026-06-29-design-agents-now-generate-and-refine-variants-from-stronger.md +6 -0
  131. package/corpus/templates/design/changelog/2026-06-29-design-inspector-controls-now-match-figmas-softer-dark-chrome.md +6 -0
  132. package/corpus/templates/design/changelog/2026-06-29-design-questions-now-appear-as-a-cleaner-canvas-intake-with-.md +6 -0
  133. package/corpus/templates/design/changelog/2026-06-29-design-variant-directions-now-appear-as-board-screens-with-chat-buttons.md +5 -0
  134. package/corpus/templates/design/changelog/2026-06-29-element-selection-no-longer-snaps-back-to-the-previous-layer.md +6 -0
  135. package/corpus/templates/design/changelog/2026-06-29-frame-resize-measurements-now-stay-beside-the-cursor-while-d.md +6 -0
  136. package/corpus/templates/design/changelog/2026-06-29-inspector-number-fields-have-cleaner-tooltips-and-draggable-.md +6 -0
  137. package/corpus/templates/design/changelog/2026-06-29-layer-locking-layer-nesting-generated-question-intake-and-im.md +6 -0
  138. package/corpus/templates/design/changelog/2026-06-29-layer-names-in-the-sidebar-can-scroll-horizontally-instead-o.md +6 -0
  139. package/corpus/templates/design/changelog/2026-06-29-layer-nesting-in-the-sidebar-now-uses-tighter-spacing-so-nam.md +6 -0
  140. package/corpus/templates/design/changelog/2026-06-29-layers-no-longer-repeat-document-wrapper-rows-when-a-screen-.md +6 -0
  141. package/corpus/templates/design/changelog/2026-06-29-overview-previews-now-keep-element-hover-and-selection-tied-.md +6 -0
  142. package/corpus/templates/design/changelog/2026-06-29-pressing-escape-now-cancels-a-stuck-screen-drag-in-the-overv.md +6 -0
  143. package/corpus/templates/design/changelog/2026-06-29-screen-overview-is-easier-to-find-and-named-screens-open-dir.md +6 -0
  144. package/corpus/templates/design/changelog/2026-06-29-screen-overview-only-highlights-screens-when-the-frame-or-ti.md +6 -0
  145. package/corpus/templates/design/changelog/2026-06-29-screen-overview-previews-now-resize-to-match-the-selected-de.md +6 -0
  146. package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-now-uses-a-pointer-cursor-instead-.md +6 -0
  147. package/corpus/templates/design/changelog/2026-06-29-screen-overview-selection-outlines-now-stay-locked-to-the-se.md +6 -0
  148. package/corpus/templates/design/changelog/2026-06-29-screen-overview-zoom-now-reports-real-screen-scale-separatel.md +6 -0
  149. package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-feels-smoother-and-selection-outline.md +6 -0
  150. package/corpus/templates/design/changelog/2026-06-29-screen-overview-zooming-now-stays-on-the-overview-canvas-ins.md +6 -0
  151. package/corpus/templates/design/changelog/2026-06-29-selecting-a-nested-layer-from-all-screens-now-keeps-you-in-a.md +6 -0
  152. package/corpus/templates/design/changelog/2026-06-29-share-now-groups-link-sharing-exports-and-agent-handoff.md +6 -0
  153. package/corpus/templates/design/changelog/2026-06-29-the-design-editor-loading-skeleton-now-uses-a-softer-charcoa.md +6 -0
  154. package/corpus/templates/design/changelog/2026-06-29-the-device-preview-menu-now-sits-next-to-the-preview-button-.md +6 -0
  155. package/corpus/templates/design/changelog/2026-06-29-the-inspector-stays-read-only-while-an-empty-design-is-still.md +6 -0
  156. package/corpus/templates/design/changelog/2026-06-29-the-missing-design-view-now-matches-the-rest-of-the-editor-c.md +6 -0
  157. package/corpus/templates/design/changelog/2026-06-29-the-pen-tool-icon-and-tool-option-menus-better-match-the-edi.md +6 -0
  158. package/corpus/templates/design/changelog/2026-06-29-typography-controls-now-keep-the-font-name-visible-and-move-.md +6 -0
  159. package/corpus/templates/design/e2e/README.md +3 -3
  160. package/corpus/templates/design/e2e/global-setup.ts +11 -22
  161. package/corpus/templates/design/e2e/helpers.ts +122 -11
  162. package/corpus/templates/design/playwright.config.ts +9 -3
  163. package/corpus/templates/design/server/lib/coding-handoff.ts +126 -2
  164. package/corpus/templates/design/server/plugins/core-routes.ts +1 -2
  165. package/corpus/templates/design/server/routes/api/design-handoff/[id].zip.get.ts +86 -0
  166. package/corpus/templates/design/shared/code-layer.ts +125 -22
  167. package/corpus/templates/design/shared/generation-session.ts +41 -0
  168. package/corpus/templates/dispatch/app/global.css +79 -35
  169. package/corpus/templates/dispatch/app/routes/integrations.tsx +8 -7
  170. package/corpus/templates/dispatch/changelog/2026-06-29-integration-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  171. package/corpus/templates/forms/app/components/layout/Layout.tsx +6 -2
  172. package/corpus/templates/forms/app/global.css +64 -35
  173. package/corpus/templates/forms/app/pages/FormsListPage.tsx +2 -2
  174. package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +3 -3
  175. package/corpus/templates/forms/changelog/2026-06-29-form-list-and-insight-layouts-adapt-when-the-agent-sidebar.md +6 -0
  176. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -1
  177. package/corpus/templates/macros/app/global.css +25 -9
  178. package/corpus/templates/macros/changelog/2026-06-29-macro-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  179. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -2
  180. package/corpus/templates/mail/app/global.css +42 -36
  181. package/corpus/templates/mail/app/pages/InboxPage.tsx +1 -1
  182. package/corpus/templates/mail/changelog/2026-06-29-the-contact-panel-now-adapts-to-the-available-mail-pane-width.md +6 -0
  183. package/corpus/templates/plan/app/components/layout/Layout.tsx +3 -1
  184. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +6 -7
  185. package/corpus/templates/plan/app/global.css +74 -42
  186. package/corpus/templates/plan/changelog/2026-06-29-plan-document-blocks-adapt-to-the-available-document-width.md +6 -0
  187. package/corpus/templates/plan/changelog/2026-06-29-plan-titles-and-summaries-can-be-edited-inline-without-focus.md +6 -0
  188. package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -1
  189. package/corpus/templates/slides/app/global.css +49 -33
  190. package/corpus/templates/slides/changelog/2026-06-29-slide-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  191. package/corpus/templates/videos/app/components/layout/Layout.tsx +3 -1
  192. package/corpus/templates/videos/app/global.css +35 -35
  193. package/corpus/templates/videos/changelog/2026-06-29-video-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  194. package/dist/cli/mcp.d.ts.map +1 -1
  195. package/dist/cli/mcp.js +10 -0
  196. package/dist/cli/mcp.js.map +1 -1
  197. package/dist/cli/skills.d.ts.map +1 -1
  198. package/dist/cli/skills.js +58 -12
  199. package/dist/cli/skills.js.map +1 -1
  200. package/dist/client/error-format.d.ts.map +1 -1
  201. package/dist/client/error-format.js +17 -0
  202. package/dist/client/error-format.js.map +1 -1
  203. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  204. package/dist/client/extensions/ExtensionViewer.js +3 -4
  205. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  206. package/dist/client/guided-questions.d.ts +4 -0
  207. package/dist/client/guided-questions.d.ts.map +1 -1
  208. package/dist/client/guided-questions.js +16 -7
  209. package/dist/client/guided-questions.js.map +1 -1
  210. package/dist/client/onboarding/OnboardingPanel.js +26 -1
  211. package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
  212. package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -1
  213. package/dist/client/resources/BuiltinCapabilityDetail.js +1 -1
  214. package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -1
  215. package/dist/client/resources/use-builtin-capabilities.d.ts +1 -1
  216. package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -1
  217. package/dist/client/resources/use-builtin-capabilities.js +2 -1
  218. package/dist/client/resources/use-builtin-capabilities.js.map +1 -1
  219. package/dist/client/session-replay.d.ts.map +1 -1
  220. package/dist/client/session-replay.js +31 -0
  221. package/dist/client/session-replay.js.map +1 -1
  222. package/dist/client/sharing/ShareButton.d.ts +14 -0
  223. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  224. package/dist/client/sharing/ShareButton.js +36 -7
  225. package/dist/client/sharing/ShareButton.js.map +1 -1
  226. package/dist/coding-tools/index.js +1 -1
  227. package/dist/coding-tools/index.js.map +1 -1
  228. package/dist/collab/routes.d.ts +1 -1
  229. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  230. package/dist/mcp/index.d.ts +2 -0
  231. package/dist/mcp/index.d.ts.map +1 -1
  232. package/dist/mcp/index.js +1 -0
  233. package/dist/mcp/index.js.map +1 -1
  234. package/dist/mcp/screen-memory-stdio.d.ts +6 -0
  235. package/dist/mcp/screen-memory-stdio.d.ts.map +1 -0
  236. package/dist/mcp/screen-memory-stdio.js +213 -0
  237. package/dist/mcp/screen-memory-stdio.js.map +1 -0
  238. package/dist/mcp-client/builtin-capabilities.d.ts +1 -1
  239. package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -1
  240. package/dist/mcp-client/builtin-capabilities.js +10 -0
  241. package/dist/mcp-client/builtin-capabilities.js.map +1 -1
  242. package/dist/mcp-client/index.d.ts +1 -0
  243. package/dist/mcp-client/index.d.ts.map +1 -1
  244. package/dist/mcp-client/index.js +1 -0
  245. package/dist/mcp-client/index.js.map +1 -1
  246. package/dist/mcp-client/screen-memory-local.d.ts +61 -0
  247. package/dist/mcp-client/screen-memory-local.d.ts.map +1 -0
  248. package/dist/mcp-client/screen-memory-local.js +336 -0
  249. package/dist/mcp-client/screen-memory-local.js.map +1 -0
  250. package/dist/notifications/routes.d.ts +2 -2
  251. package/dist/observability/routes.d.ts +8 -8
  252. package/dist/onboarding/types.d.ts +7 -0
  253. package/dist/onboarding/types.d.ts.map +1 -1
  254. package/dist/onboarding/types.js.map +1 -1
  255. package/dist/resources/handlers.d.ts +2 -2
  256. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  257. package/dist/server/agent-chat-plugin.js +26 -0
  258. package/dist/server/agent-chat-plugin.js.map +1 -1
  259. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  260. package/dist/server/agents-bundle.d.ts.map +1 -1
  261. package/dist/server/agents-bundle.js +22 -7
  262. package/dist/server/agents-bundle.js.map +1 -1
  263. package/dist/server/transcribe-voice.d.ts +1 -1
  264. package/dist/styles/agent-native.css +5 -0
  265. package/dist/templates/default/app/global.css +35 -35
  266. package/docs/content/locales/ar-SA/template-design.mdx +6 -0
  267. package/docs/content/locales/de-DE/template-design.mdx +8 -0
  268. package/docs/content/locales/es-ES/template-design.mdx +10 -2
  269. package/docs/content/locales/fr-FR/template-design.mdx +10 -2
  270. package/docs/content/locales/hi-IN/template-design.mdx +7 -0
  271. package/docs/content/locales/ja-JP/template-design.mdx +7 -0
  272. package/docs/content/locales/ko-KR/template-design.mdx +7 -0
  273. package/docs/content/locales/pt-BR/template-design.mdx +9 -2
  274. package/docs/content/locales/zh-CN/template-design.mdx +6 -0
  275. package/docs/content/locales/zh-TW/template-design.mdx +6 -0
  276. package/docs/content/template-design.mdx +9 -2
  277. package/package.json +1 -1
  278. package/src/templates/default/app/global.css +35 -35
  279. package/corpus/templates/design/app/components/design/VariantGrid.tsx +0 -189
  280. package/corpus/templates/design/app/components/design/VariantHandoffCard.tsx +0 -115
  281. package/corpus/templates/design/app/hooks/use-variant-flow.ts +0 -342
@@ -27,11 +27,11 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
27
27
  export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
28
28
  error: any;
29
29
  } | {
30
- error?: undefined;
31
30
  ok: boolean;
32
31
  key: string;
33
32
  baseUrlKey?: string;
34
33
  scope: AgentEngineApiKeyScope;
34
+ error?: undefined;
35
35
  }>>;
36
36
  export {};
37
37
  //# sourceMappingURL=agent-engine-api-key-route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents-bundle.d.ts","sourceRoot":"","sources":["../../src/server/agents-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpD,eAAO,MAAM,mBAAmB,EAAE,UAAmB,CAAC;AAEtD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,EAAE,M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AI,OAAO,CAAC,YAAY,CAAC,CA2C9D;AAED;;;;;;;;;;;;GAYG;AACH;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,CAI9D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,EAAE,CAIlE;AA+CD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAKtE;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,YAAY,GACnB,MAAM,CAKR;AAED,0CAA0C;AAC1C,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
@@ -300,31 +300,46 @@ export function getRuntimeSkills(bundle) {
300
300
  export function getDevelopmentSkills(bundle) {
301
301
  return Object.values(bundle.skills).filter((skill) => skill.meta.scope !== "runtime");
302
302
  }
303
- function generateSkillsPromptBlockForEntries(entries) {
303
+ function skillDocsSlug(name) {
304
+ return `skill-${name
305
+ .trim()
306
+ .toLowerCase()
307
+ .replace(/[^a-z0-9]+/g, "-")
308
+ .replace(/^-+|-+$/g, "")}`;
309
+ }
310
+ function generateSkillsPromptBlockForEntries(entries, mode) {
304
311
  if (entries.length === 0)
305
312
  return "";
306
313
  const lines = entries.map((s) => {
307
314
  const extras = s.extraFiles.length > 0
308
315
  ? ` (also contains: ${s.extraFiles.join(", ")})`
309
316
  : "";
310
- return `- \`${s.meta.name}\` at \`${s.dir}/\` — ${s.meta.description || "(no description)"}${extras}`;
317
+ const runtimeHint = mode === "runtime"
318
+ ? ` Read with \`docs-search --slug "${skillDocsSlug(s.meta.name)}"\` before starting a task it applies to.`
319
+ : "";
320
+ return `- \`${s.meta.name}\` at \`${s.dir}/\` — ${s.meta.description || "(no description)"}${extras}${runtimeHint}`;
311
321
  });
322
+ const readHint = mode === "runtime"
323
+ ? `To read a skill in the in-app runtime agent:
324
+ \`docs-search --slug "skill-<skill-name>"\`
325
+ \`docs-search --query "<topic>"\` to discover matching docs/skills`
326
+ : `To read a skill in dev mode (when you have bash access):
327
+ \`bash(command="cat <skill-dir>/SKILL.md")\`
328
+ \`bash(command="ls <skill-dir>/")\` to see all files in the folder`;
312
329
  return `<skills>
313
330
  The following skills live in the repo, usually at \`.agents/skills/<name>/\` (legacy \`.agent/skills/<name>/\` is also supported). Each skill is a folder containing a \`SKILL.md\` entry file and sometimes supporting files. Read a skill BEFORE starting a task it applies to.
314
331
 
315
- To read a skill in dev mode (when you have bash access):
316
- \`bash(command="cat <skill-dir>/SKILL.md")\`
317
- \`bash(command="ls <skill-dir>/")\` to see all files in the folder
332
+ ${readHint}
318
333
 
319
334
  Available skills:
320
335
  ${lines.join("\n")}
321
336
  </skills>`;
322
337
  }
323
338
  export function generateSkillsPromptBlock(bundle) {
324
- return generateSkillsPromptBlockForEntries(getRuntimeSkills(bundle));
339
+ return generateSkillsPromptBlockForEntries(getRuntimeSkills(bundle), "runtime");
325
340
  }
326
341
  export function generateDevelopmentSkillsPromptBlock(bundle) {
327
- return generateSkillsPromptBlockForEntries(getDevelopmentSkills(bundle));
342
+ return generateSkillsPromptBlockForEntries(getDevelopmentSkills(bundle), "development");
328
343
  }
329
344
  /** For tests — reset the module cache. */
330
345
  export function __resetAgentsBundleCache() {
@@ -1 +1 @@
1
- {"version":3,"file":"agents-bundle.js","sourceRoot":"","sources":["../../src/server/agents-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAYH,MAAM,CAAC,MAAM,mBAAmB,GAAe,MAAM,CAAC;AAoDtD,MAAM,KAAK,GAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEhF,IAAI,MAAM,GAAwB,IAAI,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;AAC1C,MAAM,UAAU,mBAAmB,CAAC,GAAuB;IACzD,IAAI,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,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC9B,MAAM,MAAM,GACV,CAAC,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YACrB,CAAC,CAAC,oBAAoB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YAChD,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,kBAAkB,GAAG,MAAM,EAAE,CAAC;IACxG,CAAC,CAAC,CAAC;IAEH,OAAO;;;;;;;;EAQP,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;UACR,CAAC;AACX,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAoB;IAC5D,OAAO,mCAAmC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,MAAoB;IAEpB,OAAO,mCAAmC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,wBAAwB;IACtC,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Agents bundle — loads AGENTS.md and .agents/skills/ from the template.\n * The legacy singular .agent/skills/ directory is also accepted as an alias.\n *\n * This is the single source of truth the framework's agent uses to mirror what\n * Claude Code / Codex / any other agent would see when running locally in the\n * repo. The filesystem is the canonical source; this module is just a loader\n * that works both in dev (direct fs read) and production (content bundled at\n * build time via the `virtual:agents-bundle` Vite plugin).\n *\n * Resolution order inside `loadAgentsBundle()`:\n * 1. Virtual module (`virtual:agents-bundle`) — inlined at build time by the\n * framework's Vite plugin. This is the ONLY path that works on edge\n * runtimes (Cloudflare Workers) where `readFileSync` doesn't exist.\n * 2. Filesystem fallback — `process.cwd()/AGENTS.md` +\n * `process.cwd()/.agents/skills/` (or legacy `.agent/skills/`). Only reliable in local dev and Node\n * production (`agent-native start`); not on Netlify/Vercel/CF at runtime.\n * 3. Empty bundle — everything silently returns empty strings.\n *\n * Result is cached in module scope so it's only computed once per cold start.\n */\n\n/**\n * Where a skill is meant to be used:\n * - `runtime` — only the in-app agent at runtime (not the human's coding agent).\n * - `dev` — only the human's development/coding agent (e.g. Claude Code).\n * EXCLUDED from the runtime agent's prompt block and docs-search.\n * - `both` — loaded everywhere. This is the default when `scope` is absent\n * or set to an unrecognized value (fully backward compatible).\n */\nexport type SkillScope = \"runtime\" | \"dev\" | \"both\";\n\nexport const DEFAULT_SKILL_SCOPE: SkillScope = \"both\";\n\nexport interface SkillMeta {\n name: string;\n description: string;\n /**\n * Audience for the skill. Defaults to `both` when the SKILL.md frontmatter\n * omits `scope` or specifies an unknown value. `dev`-scoped skills are hidden\n * from the runtime agent everywhere (prompt block + docs-search).\n */\n scope: SkillScope;\n}\n\nexport interface Skill {\n meta: SkillMeta;\n /** Contents of SKILL.md (the entry file of the skill). */\n content: string;\n /**\n * Filesystem path to the skill directory, relative to the template root\n * (e.g. `.agents/skills/create-deck`). The agent can read any file here via\n * bash in dev — skills are folders, not single files, and may contain\n * supporting assets, scripts, or additional markdown.\n */\n dir: string;\n /**\n * Files inside the skill directory (relative to the skill dir), excluding\n * `SKILL.md`. Lets the agent know what else is available without a separate\n * `ls` call. Empty array if the skill is single-file.\n */\n extraFiles: string[];\n}\n\nexport interface AgentsBundle {\n /** Contents of the template's AGENTS.md (empty string if missing). */\n agentsMd: string;\n /**\n * Contents of the workspace core's AGENTS.md, if the app is inside an\n * enterprise monorepo with a `workspaceCore` configured. Empty string\n * otherwise. Sits between the framework system prompt and the template's\n * AGENTS.md in the instruction stack.\n */\n workspaceAgentsMd?: string;\n /**\n * Map from skill name → skill content. Contains skills merged from the\n * workspace core layer (if present) and the template layer. On name\n * collision, the template's version wins so apps can override a shared\n * enterprise skill by dropping a same-named file under\n * `.agents/skills/<name>/`.\n */\n skills: Record<string, Skill>;\n}\n\nconst EMPTY: AgentsBundle = { agentsMd: \"\", workspaceAgentsMd: \"\", skills: {} };\n\nlet cached: AgentsBundle | null = null;\n\n/**\n * Coerce a raw frontmatter `scope` value into a known `SkillScope`. Unknown,\n * empty, or malformed values fall back to the default (`both`) so a typo never\n * silently hides a skill from the runtime agent. Optionally warns once per\n * distinct bad value to aid debugging without spamming logs.\n */\nconst warnedBadScopes = new Set<string>();\nexport function normalizeSkillScope(raw: string | undefined): SkillScope {\n if (!raw) return DEFAULT_SKILL_SCOPE;\n const value = raw.trim().toLowerCase();\n if (value === \"runtime\" || value === \"dev\" || value === \"both\") {\n return value;\n }\n if (value && !warnedBadScopes.has(value)) {\n warnedBadScopes.add(value);\n console.warn(\n `[agents-bundle] Unknown skill scope \"${raw}\" — treating as \"${DEFAULT_SKILL_SCOPE}\". Valid values: runtime, dev, both.`,\n );\n }\n return DEFAULT_SKILL_SCOPE;\n}\n\n/**\n * Parse the YAML frontmatter at the top of a skill file.\n * Only pulls out `name`, `description`, and `scope` — deliberately simple, no\n * YAML lib.\n * Handles:\n * - Inline: `description: Some text`\n * - Folded scalar: `description: >-\\n multi\\n line` → \"multi line\"\n * - Literal scalar: `description: |\\n multi\\n line` → \"multi\\nline\"\n */\nexport function parseSkillFrontmatter(content: string): Partial<SkillMeta> {\n const match = content.match(/^---\\r?\\n([\\s\\S]+?)\\r?\\n---/);\n if (!match) return {};\n const lines = match[1].split(/\\r?\\n/);\n const result: Partial<SkillMeta> = {};\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n const keyMatch = line.match(/^([a-zA-Z_][a-zA-Z0-9_-]*):\\s*(.*)$/);\n if (!keyMatch) continue;\n const [, key, valueRaw] = keyMatch;\n const trimmed = valueRaw.trim();\n\n const isFolded = trimmed === \">\" || trimmed === \">-\";\n const isLiteral = trimmed === \"|\" || trimmed === \"|-\";\n\n let value: string;\n if (isFolded || isLiteral) {\n // Collect subsequent indented lines (at least one leading space).\n const block: string[] = [];\n let j = i + 1;\n while (j < lines.length) {\n const next = lines[j];\n if (next.length === 0) {\n block.push(\"\");\n j++;\n continue;\n }\n if (!/^\\s/.test(next)) break;\n block.push(next.replace(/^\\s+/, \"\"));\n j++;\n }\n // Trim trailing blank lines\n while (block.length > 0 && block[block.length - 1] === \"\") block.pop();\n value = isFolded\n ? block.filter((l) => l !== \"\").join(\" \")\n : block.join(\"\\n\");\n i = j - 1;\n } else {\n value = trimmed;\n }\n\n if (key === \"name\" && value) result.name = value;\n else if (key === \"description\" && value) result.description = value;\n else if (key === \"scope\" && value)\n result.scope = normalizeSkillScope(value);\n }\n\n return result;\n}\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nconst TEMPLATE_SKILLS_DIRS = [\n path.join(\".agents\", \"skills\"),\n path.join(\".agent\", \"skills\"),\n] as const;\n\n/**\n * Paths to a workspace-core's agent resources, for merging into a template's\n * bundle. All fields optional — pass null for any missing piece.\n */\nexport interface WorkspaceAgentsSource {\n /** Absolute path to the workspace core's skills/ directory. */\n skillsDir: string | null;\n /** Absolute path to the workspace core's AGENTS.md. */\n agentsMdPath: string | null;\n /** Root dir (used to compute `dir` paths for workspace-core skills). */\n rootDir: string;\n}\n\n/**\n * Read one skills directory into a `Record<string, Skill>`. Extracted so\n * both the template and workspace-core paths can reuse it. `dirPrefix` is\n * the display path that will be reported to the agent (e.g.\n * `.agents/skills/<name>` for templates, or\n * `<workspace-shared-package>/.agents/skills/<name>` for the workspace layer).\n */\nfunction readSkillsDir(\n skillsDir: string,\n rootForRelative: string,\n out: Record<string, Skill>,\n skipExistingNames: boolean,\n): void {\n if (!fs.existsSync(skillsDir)) return;\n const entries = fs.readdirSync(skillsDir, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;\n const skillDirAbs = path.join(skillsDir, entry.name);\n const skillFile = path.join(skillDirAbs, \"SKILL.md\");\n try {\n const realSkillFile = fs.realpathSync(skillFile);\n if (!fs.existsSync(realSkillFile)) continue;\n const content = fs.readFileSync(realSkillFile, \"utf-8\");\n const meta = parseSkillFrontmatter(content);\n const name = meta.name ?? entry.name;\n if (skipExistingNames && out[name]) continue; // Template wins\n\n const extraFiles: string[] = [];\n try {\n const walk = (subdir: string, prefix: string) => {\n for (const e of fs.readdirSync(subdir, { withFileTypes: true })) {\n const abs = path.join(subdir, e.name);\n const rel = prefix ? `${prefix}/${e.name}` : e.name;\n if (e.isDirectory() || e.isSymbolicLink()) {\n try {\n const stat = fs.statSync(abs);\n if (stat.isDirectory()) walk(abs, rel);\n } catch {}\n } else if (e.isFile() && e.name !== \"SKILL.md\") {\n extraFiles.push(rel);\n }\n }\n };\n walk(skillDirAbs, \"\");\n } catch {}\n extraFiles.sort();\n\n out[name] = {\n meta: {\n name,\n description: meta.description ?? \"\",\n scope: meta.scope ?? DEFAULT_SKILL_SCOPE,\n },\n content,\n dir: path.relative(rootForRelative, skillDirAbs).replace(/\\\\/g, \"/\"),\n extraFiles,\n };\n } catch {\n // Skip unreadable skills\n }\n }\n}\n\n/**\n * Read AGENTS.md + all skills directly from the filesystem rooted at `cwd`.\n * Optionally also reads a workspace-core's AGENTS.md and skills directory\n * and merges them in (template wins on name collisions). Used by both the\n * Vite plugin (at build time) and the runtime fallback (in dev / Node prod).\n *\n * Synchronous — the Vite plugin's load hook calls it inline during the build.\n */\nexport function readAgentsBundleFromFs(\n cwd: string,\n workspaceSource: WorkspaceAgentsSource | null = null,\n): AgentsBundle {\n let agentsMd = \"\";\n try {\n const agentsMdPath = path.join(cwd, \"AGENTS.md\");\n if (fs.existsSync(agentsMdPath)) {\n agentsMd = fs.readFileSync(agentsMdPath, \"utf-8\");\n }\n } catch {}\n\n let workspaceAgentsMd = \"\";\n if (workspaceSource?.agentsMdPath) {\n try {\n if (fs.existsSync(workspaceSource.agentsMdPath)) {\n workspaceAgentsMd = fs.readFileSync(\n workspaceSource.agentsMdPath,\n \"utf-8\",\n );\n }\n } catch {}\n }\n\n // Merge skills: template first (so its entries are authoritative), then\n // workspace-core with skipExistingNames=true so same-named skills don't\n // overwrite the template's. `.agents/skills` is canonical; `.agent/skills`\n // is accepted as a legacy alias and does not override canonical skills.\n const skills: Record<string, Skill> = {};\n for (const [index, relSkillsDir] of TEMPLATE_SKILLS_DIRS.entries()) {\n try {\n readSkillsDir(path.join(cwd, relSkillsDir), cwd, skills, index > 0);\n } catch {}\n }\n\n if (workspaceSource?.skillsDir) {\n try {\n readSkillsDir(\n workspaceSource.skillsDir,\n workspaceSource.rootDir,\n skills,\n true,\n );\n } catch {}\n }\n\n return { agentsMd, workspaceAgentsMd, skills };\n}\n\n/**\n * Load the agents bundle. Returns a cached result on subsequent calls.\n * Tries the virtual module first (works everywhere, including edge), then\n * falls back to filesystem reads from `process.cwd()` — which, when a\n * workspace core is present, also merges in the workspace core's skills\n * and AGENTS.md.\n */\nexport async function loadAgentsBundle(): Promise<AgentsBundle> {\n if (cached) return cached;\n\n // 1. Try the Vite-emitted virtual module. This is the path that works on\n // every deployment target because the content is inlined at build time.\n // The Vite plugin itself is responsible for merging workspace-core\n // content into the bundle it emits.\n try {\n // @ts-expect-error — virtual module is resolved at build time by our\n // Vite plugin; nothing exists at this path on disk.\n const mod = await import(\"virtual:agents-bundle\");\n if (mod && mod.default) {\n cached = mod.default as AgentsBundle;\n return cached;\n }\n } catch {\n // Virtual module not available — fall through to filesystem.\n }\n\n // 2. Filesystem fallback — works in dev / Node prod. If a workspace core\n // is present in the ancestor chain, merge its skills + AGENTS.md in.\n try {\n let workspaceSource: WorkspaceAgentsSource | null = null;\n try {\n const { getWorkspaceCoreExports } =\n await import(\"../deploy/workspace-core.js\");\n const ws = await getWorkspaceCoreExports(process.cwd());\n if (ws) {\n workspaceSource = {\n skillsDir: ws.skillsDir,\n agentsMdPath: ws.agentsMdPath,\n rootDir: ws.packageDir,\n };\n }\n } catch {\n // workspace-core discovery isn't available (e.g. edge runtime).\n }\n cached = readAgentsBundleFromFs(process.cwd(), workspaceSource);\n return cached;\n } catch {\n cached = EMPTY;\n return cached;\n }\n}\n\n/**\n * Generate the `<skills>` block to inject into the system prompt.\n *\n * Skills are folders at `.agents/skills/<name>/` (or legacy\n * `.agent/skills/<name>/`) containing a `SKILL.md` entry file plus any number\n * of supporting files (additional markdown, examples, images, scripts). This\n * block lists what's available and how to read them.\n *\n * In dev mode the agent has bash access and reads skills via `cat` — exactly\n * like running `claude` locally in the repo. In production mode the agent has\n * no bash; templates that need skill content at runtime should inline the\n * critical parts directly in `AGENTS.md`.\n */\n/**\n * Skills visible to the agent-native RUNTIME agent. Excludes `scope: dev`\n * skills (those are for the human's coding agent only). Skills with no scope,\n * `scope: runtime`, or `scope: both` are all included. Use this anywhere the\n * runtime agent's view of skills is built (prompt block + docs-search) so a\n * dev-scoped skill is invisible to the runtime agent everywhere.\n */\nexport function getRuntimeSkills(bundle: AgentsBundle): Skill[] {\n return Object.values(bundle.skills).filter(\n (skill) => skill.meta.scope !== \"dev\",\n );\n}\n\n/**\n * Skills visible to development/coding agents. Excludes `scope: runtime`\n * skills that are intended only for the deployed in-app agent.\n */\nexport function getDevelopmentSkills(bundle: AgentsBundle): Skill[] {\n return Object.values(bundle.skills).filter(\n (skill) => skill.meta.scope !== \"runtime\",\n );\n}\n\nfunction generateSkillsPromptBlockForEntries(entries: Skill[]): string {\n if (entries.length === 0) return \"\";\n\n const lines = entries.map((s) => {\n const extras =\n s.extraFiles.length > 0\n ? ` (also contains: ${s.extraFiles.join(\", \")})`\n : \"\";\n return `- \\`${s.meta.name}\\` at \\`${s.dir}/\\` — ${s.meta.description || \"(no description)\"}${extras}`;\n });\n\n return `<skills>\nThe following skills live in the repo, usually at \\`.agents/skills/<name>/\\` (legacy \\`.agent/skills/<name>/\\` is also supported). Each skill is a folder containing a \\`SKILL.md\\` entry file and sometimes supporting files. Read a skill BEFORE starting a task it applies to.\n\nTo read a skill in dev mode (when you have bash access):\n \\`bash(command=\"cat <skill-dir>/SKILL.md\")\\`\n \\`bash(command=\"ls <skill-dir>/\")\\` to see all files in the folder\n\nAvailable skills:\n${lines.join(\"\\n\")}\n</skills>`;\n}\n\nexport function generateSkillsPromptBlock(bundle: AgentsBundle): string {\n return generateSkillsPromptBlockForEntries(getRuntimeSkills(bundle));\n}\n\nexport function generateDevelopmentSkillsPromptBlock(\n bundle: AgentsBundle,\n): string {\n return generateSkillsPromptBlockForEntries(getDevelopmentSkills(bundle));\n}\n\n/** For tests — reset the module cache. */\nexport function __resetAgentsBundleCache(): void {\n cached = null;\n}\n"]}
1
+ {"version":3,"file":"agents-bundle.js","sourceRoot":"","sources":["../../src/server/agents-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAYH,MAAM,CAAC,MAAM,mBAAmB,GAAe,MAAM,CAAC;AAoDtD,MAAM,KAAK,GAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAEhF,IAAI,MAAM,GAAwB,IAAI,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU,CAAC;AAC1C,MAAM,UAAU,mBAAmB,CAAC,GAAuB;IACzD,IAAI,CAAC,GAAG;QAAE,OAAO,mBAAmB,CAAC;IACrC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACvC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QAC/D,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,CAAC,IAAI,CACV,wCAAwC,GAAG,oBAAoB,mBAAmB,sCAAsC,CACzH,CAAC;IACJ,CAAC;IACD,OAAO,mBAAmB,C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,CAAC,CAAC,oCAAoC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2CAA2C;YAC3G,CAAC,CAAC,EAAE,CAAC;QACT,OAAO,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,kBAAkB,GAAG,MAAM,GAAG,WAAW,EAAE,CAAC;IACtH,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GACZ,IAAI,KAAK,SAAS;QAChB,CAAC,CAAC;;qEAE6D;QAC/D,CAAC,CAAC;;qEAE6D,CAAC;IAEpE,OAAO;;;EAGP,QAAQ;;;EAGR,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;UACR,CAAC;AACX,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAoB;IAC5D,OAAO,mCAAmC,CACxC,gBAAgB,CAAC,MAAM,CAAC,EACxB,SAAS,CACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,MAAoB;IAEpB,OAAO,mCAAmC,CACxC,oBAAoB,CAAC,MAAM,CAAC,EAC5B,aAAa,CACd,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,wBAAwB;IACtC,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Agents bundle — loads AGENTS.md and .agents/skills/ from the template.\n * The legacy singular .agent/skills/ directory is also accepted as an alias.\n *\n * This is the single source of truth the framework's agent uses to mirror what\n * Claude Code / Codex / any other agent would see when running locally in the\n * repo. The filesystem is the canonical source; this module is just a loader\n * that works both in dev (direct fs read) and production (content bundled at\n * build time via the `virtual:agents-bundle` Vite plugin).\n *\n * Resolution order inside `loadAgentsBundle()`:\n * 1. Virtual module (`virtual:agents-bundle`) — inlined at build time by the\n * framework's Vite plugin. This is the ONLY path that works on edge\n * runtimes (Cloudflare Workers) where `readFileSync` doesn't exist.\n * 2. Filesystem fallback — `process.cwd()/AGENTS.md` +\n * `process.cwd()/.agents/skills/` (or legacy `.agent/skills/`). Only reliable in local dev and Node\n * production (`agent-native start`); not on Netlify/Vercel/CF at runtime.\n * 3. Empty bundle — everything silently returns empty strings.\n *\n * Result is cached in module scope so it's only computed once per cold start.\n */\n\n/**\n * Where a skill is meant to be used:\n * - `runtime` — only the in-app agent at runtime (not the human's coding agent).\n * - `dev` — only the human's development/coding agent (e.g. Claude Code).\n * EXCLUDED from the runtime agent's prompt block and docs-search.\n * - `both` — loaded everywhere. This is the default when `scope` is absent\n * or set to an unrecognized value (fully backward compatible).\n */\nexport type SkillScope = \"runtime\" | \"dev\" | \"both\";\n\nexport const DEFAULT_SKILL_SCOPE: SkillScope = \"both\";\n\nexport interface SkillMeta {\n name: string;\n description: string;\n /**\n * Audience for the skill. Defaults to `both` when the SKILL.md frontmatter\n * omits `scope` or specifies an unknown value. `dev`-scoped skills are hidden\n * from the runtime agent everywhere (prompt block + docs-search).\n */\n scope: SkillScope;\n}\n\nexport interface Skill {\n meta: SkillMeta;\n /** Contents of SKILL.md (the entry file of the skill). */\n content: string;\n /**\n * Filesystem path to the skill directory, relative to the template root\n * (e.g. `.agents/skills/create-deck`). The agent can read any file here via\n * bash in dev — skills are folders, not single files, and may contain\n * supporting assets, scripts, or additional markdown.\n */\n dir: string;\n /**\n * Files inside the skill directory (relative to the skill dir), excluding\n * `SKILL.md`. Lets the agent know what else is available without a separate\n * `ls` call. Empty array if the skill is single-file.\n */\n extraFiles: string[];\n}\n\nexport interface AgentsBundle {\n /** Contents of the template's AGENTS.md (empty string if missing). */\n agentsMd: string;\n /**\n * Contents of the workspace core's AGENTS.md, if the app is inside an\n * enterprise monorepo with a `workspaceCore` configured. Empty string\n * otherwise. Sits between the framework system prompt and the template's\n * AGENTS.md in the instruction stack.\n */\n workspaceAgentsMd?: string;\n /**\n * Map from skill name → skill content. Contains skills merged from the\n * workspace core layer (if present) and the template layer. On name\n * collision, the template's version wins so apps can override a shared\n * enterprise skill by dropping a same-named file under\n * `.agents/skills/<name>/`.\n */\n skills: Record<string, Skill>;\n}\n\nconst EMPTY: AgentsBundle = { agentsMd: \"\", workspaceAgentsMd: \"\", skills: {} };\n\nlet cached: AgentsBundle | null = null;\n\n/**\n * Coerce a raw frontmatter `scope` value into a known `SkillScope`. Unknown,\n * empty, or malformed values fall back to the default (`both`) so a typo never\n * silently hides a skill from the runtime agent. Optionally warns once per\n * distinct bad value to aid debugging without spamming logs.\n */\nconst warnedBadScopes = new Set<string>();\nexport function normalizeSkillScope(raw: string | undefined): SkillScope {\n if (!raw) return DEFAULT_SKILL_SCOPE;\n const value = raw.trim().toLowerCase();\n if (value === \"runtime\" || value === \"dev\" || value === \"both\") {\n return value;\n }\n if (value && !warnedBadScopes.has(value)) {\n warnedBadScopes.add(value);\n console.warn(\n `[agents-bundle] Unknown skill scope \"${raw}\" — treating as \"${DEFAULT_SKILL_SCOPE}\". Valid values: runtime, dev, both.`,\n );\n }\n return DEFAULT_SKILL_SCOPE;\n}\n\n/**\n * Parse the YAML frontmatter at the top of a skill file.\n * Only pulls out `name`, `description`, and `scope` — deliberately simple, no\n * YAML lib.\n * Handles:\n * - Inline: `description: Some text`\n * - Folded scalar: `description: >-\\n multi\\n line` → \"multi line\"\n * - Literal scalar: `description: |\\n multi\\n line` → \"multi\\nline\"\n */\nexport function parseSkillFrontmatter(content: string): Partial<SkillMeta> {\n const match = content.match(/^---\\r?\\n([\\s\\S]+?)\\r?\\n---/);\n if (!match) return {};\n const lines = match[1].split(/\\r?\\n/);\n const result: Partial<SkillMeta> = {};\n\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n const keyMatch = line.match(/^([a-zA-Z_][a-zA-Z0-9_-]*):\\s*(.*)$/);\n if (!keyMatch) continue;\n const [, key, valueRaw] = keyMatch;\n const trimmed = valueRaw.trim();\n\n const isFolded = trimmed === \">\" || trimmed === \">-\";\n const isLiteral = trimmed === \"|\" || trimmed === \"|-\";\n\n let value: string;\n if (isFolded || isLiteral) {\n // Collect subsequent indented lines (at least one leading space).\n const block: string[] = [];\n let j = i + 1;\n while (j < lines.length) {\n const next = lines[j];\n if (next.length === 0) {\n block.push(\"\");\n j++;\n continue;\n }\n if (!/^\\s/.test(next)) break;\n block.push(next.replace(/^\\s+/, \"\"));\n j++;\n }\n // Trim trailing blank lines\n while (block.length > 0 && block[block.length - 1] === \"\") block.pop();\n value = isFolded\n ? block.filter((l) => l !== \"\").join(\" \")\n : block.join(\"\\n\");\n i = j - 1;\n } else {\n value = trimmed;\n }\n\n if (key === \"name\" && value) result.name = value;\n else if (key === \"description\" && value) result.description = value;\n else if (key === \"scope\" && value)\n result.scope = normalizeSkillScope(value);\n }\n\n return result;\n}\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nconst TEMPLATE_SKILLS_DIRS = [\n path.join(\".agents\", \"skills\"),\n path.join(\".agent\", \"skills\"),\n] as const;\n\n/**\n * Paths to a workspace-core's agent resources, for merging into a template's\n * bundle. All fields optional — pass null for any missing piece.\n */\nexport interface WorkspaceAgentsSource {\n /** Absolute path to the workspace core's skills/ directory. */\n skillsDir: string | null;\n /** Absolute path to the workspace core's AGENTS.md. */\n agentsMdPath: string | null;\n /** Root dir (used to compute `dir` paths for workspace-core skills). */\n rootDir: string;\n}\n\n/**\n * Read one skills directory into a `Record<string, Skill>`. Extracted so\n * both the template and workspace-core paths can reuse it. `dirPrefix` is\n * the display path that will be reported to the agent (e.g.\n * `.agents/skills/<name>` for templates, or\n * `<workspace-shared-package>/.agents/skills/<name>` for the workspace layer).\n */\nfunction readSkillsDir(\n skillsDir: string,\n rootForRelative: string,\n out: Record<string, Skill>,\n skipExistingNames: boolean,\n): void {\n if (!fs.existsSync(skillsDir)) return;\n const entries = fs.readdirSync(skillsDir, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;\n const skillDirAbs = path.join(skillsDir, entry.name);\n const skillFile = path.join(skillDirAbs, \"SKILL.md\");\n try {\n const realSkillFile = fs.realpathSync(skillFile);\n if (!fs.existsSync(realSkillFile)) continue;\n const content = fs.readFileSync(realSkillFile, \"utf-8\");\n const meta = parseSkillFrontmatter(content);\n const name = meta.name ?? entry.name;\n if (skipExistingNames && out[name]) continue; // Template wins\n\n const extraFiles: string[] = [];\n try {\n const walk = (subdir: string, prefix: string) => {\n for (const e of fs.readdirSync(subdir, { withFileTypes: true })) {\n const abs = path.join(subdir, e.name);\n const rel = prefix ? `${prefix}/${e.name}` : e.name;\n if (e.isDirectory() || e.isSymbolicLink()) {\n try {\n const stat = fs.statSync(abs);\n if (stat.isDirectory()) walk(abs, rel);\n } catch {}\n } else if (e.isFile() && e.name !== \"SKILL.md\") {\n extraFiles.push(rel);\n }\n }\n };\n walk(skillDirAbs, \"\");\n } catch {}\n extraFiles.sort();\n\n out[name] = {\n meta: {\n name,\n description: meta.description ?? \"\",\n scope: meta.scope ?? DEFAULT_SKILL_SCOPE,\n },\n content,\n dir: path.relative(rootForRelative, skillDirAbs).replace(/\\\\/g, \"/\"),\n extraFiles,\n };\n } catch {\n // Skip unreadable skills\n }\n }\n}\n\n/**\n * Read AGENTS.md + all skills directly from the filesystem rooted at `cwd`.\n * Optionally also reads a workspace-core's AGENTS.md and skills directory\n * and merges them in (template wins on name collisions). Used by both the\n * Vite plugin (at build time) and the runtime fallback (in dev / Node prod).\n *\n * Synchronous — the Vite plugin's load hook calls it inline during the build.\n */\nexport function readAgentsBundleFromFs(\n cwd: string,\n workspaceSource: WorkspaceAgentsSource | null = null,\n): AgentsBundle {\n let agentsMd = \"\";\n try {\n const agentsMdPath = path.join(cwd, \"AGENTS.md\");\n if (fs.existsSync(agentsMdPath)) {\n agentsMd = fs.readFileSync(agentsMdPath, \"utf-8\");\n }\n } catch {}\n\n let workspaceAgentsMd = \"\";\n if (workspaceSource?.agentsMdPath) {\n try {\n if (fs.existsSync(workspaceSource.agentsMdPath)) {\n workspaceAgentsMd = fs.readFileSync(\n workspaceSource.agentsMdPath,\n \"utf-8\",\n );\n }\n } catch {}\n }\n\n // Merge skills: template first (so its entries are authoritative), then\n // workspace-core with skipExistingNames=true so same-named skills don't\n // overwrite the template's. `.agents/skills` is canonical; `.agent/skills`\n // is accepted as a legacy alias and does not override canonical skills.\n const skills: Record<string, Skill> = {};\n for (const [index, relSkillsDir] of TEMPLATE_SKILLS_DIRS.entries()) {\n try {\n readSkillsDir(path.join(cwd, relSkillsDir), cwd, skills, index > 0);\n } catch {}\n }\n\n if (workspaceSource?.skillsDir) {\n try {\n readSkillsDir(\n workspaceSource.skillsDir,\n workspaceSource.rootDir,\n skills,\n true,\n );\n } catch {}\n }\n\n return { agentsMd, workspaceAgentsMd, skills };\n}\n\n/**\n * Load the agents bundle. Returns a cached result on subsequent calls.\n * Tries the virtual module first (works everywhere, including edge), then\n * falls back to filesystem reads from `process.cwd()` — which, when a\n * workspace core is present, also merges in the workspace core's skills\n * and AGENTS.md.\n */\nexport async function loadAgentsBundle(): Promise<AgentsBundle> {\n if (cached) return cached;\n\n // 1. Try the Vite-emitted virtual module. This is the path that works on\n // every deployment target because the content is inlined at build time.\n // The Vite plugin itself is responsible for merging workspace-core\n // content into the bundle it emits.\n try {\n // @ts-expect-error — virtual module is resolved at build time by our\n // Vite plugin; nothing exists at this path on disk.\n const mod = await import(\"virtual:agents-bundle\");\n if (mod && mod.default) {\n cached = mod.default as AgentsBundle;\n return cached;\n }\n } catch {\n // Virtual module not available — fall through to filesystem.\n }\n\n // 2. Filesystem fallback — works in dev / Node prod. If a workspace core\n // is present in the ancestor chain, merge its skills + AGENTS.md in.\n try {\n let workspaceSource: WorkspaceAgentsSource | null = null;\n try {\n const { getWorkspaceCoreExports } =\n await import(\"../deploy/workspace-core.js\");\n const ws = await getWorkspaceCoreExports(process.cwd());\n if (ws) {\n workspaceSource = {\n skillsDir: ws.skillsDir,\n agentsMdPath: ws.agentsMdPath,\n rootDir: ws.packageDir,\n };\n }\n } catch {\n // workspace-core discovery isn't available (e.g. edge runtime).\n }\n cached = readAgentsBundleFromFs(process.cwd(), workspaceSource);\n return cached;\n } catch {\n cached = EMPTY;\n return cached;\n }\n}\n\n/**\n * Generate the `<skills>` block to inject into the system prompt.\n *\n * Skills are folders at `.agents/skills/<name>/` (or legacy\n * `.agent/skills/<name>/`) containing a `SKILL.md` entry file plus any number\n * of supporting files (additional markdown, examples, images, scripts). This\n * block lists what's available and how to read them.\n *\n * In dev mode the agent has bash access and reads skills via `cat` — exactly\n * like running `claude` locally in the repo. In production mode the agent has\n * no bash; templates that need skill content at runtime should inline the\n * critical parts directly in `AGENTS.md`.\n */\n/**\n * Skills visible to the agent-native RUNTIME agent. Excludes `scope: dev`\n * skills (those are for the human's coding agent only). Skills with no scope,\n * `scope: runtime`, or `scope: both` are all included. Use this anywhere the\n * runtime agent's view of skills is built (prompt block + docs-search) so a\n * dev-scoped skill is invisible to the runtime agent everywhere.\n */\nexport function getRuntimeSkills(bundle: AgentsBundle): Skill[] {\n return Object.values(bundle.skills).filter(\n (skill) => skill.meta.scope !== \"dev\",\n );\n}\n\n/**\n * Skills visible to development/coding agents. Excludes `scope: runtime`\n * skills that are intended only for the deployed in-app agent.\n */\nexport function getDevelopmentSkills(bundle: AgentsBundle): Skill[] {\n return Object.values(bundle.skills).filter(\n (skill) => skill.meta.scope !== \"runtime\",\n );\n}\n\nfunction skillDocsSlug(name: string): string {\n return `skill-${name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")}`;\n}\n\nfunction generateSkillsPromptBlockForEntries(\n entries: Skill[],\n mode: \"runtime\" | \"development\",\n): string {\n if (entries.length === 0) return \"\";\n\n const lines = entries.map((s) => {\n const extras =\n s.extraFiles.length > 0\n ? ` (also contains: ${s.extraFiles.join(\", \")})`\n : \"\";\n const runtimeHint =\n mode === \"runtime\"\n ? ` Read with \\`docs-search --slug \"${skillDocsSlug(s.meta.name)}\"\\` before starting a task it applies to.`\n : \"\";\n return `- \\`${s.meta.name}\\` at \\`${s.dir}/\\` — ${s.meta.description || \"(no description)\"}${extras}${runtimeHint}`;\n });\n\n const readHint =\n mode === \"runtime\"\n ? `To read a skill in the in-app runtime agent:\n \\`docs-search --slug \"skill-<skill-name>\"\\`\n \\`docs-search --query \"<topic>\"\\` to discover matching docs/skills`\n : `To read a skill in dev mode (when you have bash access):\n \\`bash(command=\"cat <skill-dir>/SKILL.md\")\\`\n \\`bash(command=\"ls <skill-dir>/\")\\` to see all files in the folder`;\n\n return `<skills>\nThe following skills live in the repo, usually at \\`.agents/skills/<name>/\\` (legacy \\`.agent/skills/<name>/\\` is also supported). Each skill is a folder containing a \\`SKILL.md\\` entry file and sometimes supporting files. Read a skill BEFORE starting a task it applies to.\n\n${readHint}\n\nAvailable skills:\n${lines.join(\"\\n\")}\n</skills>`;\n}\n\nexport function generateSkillsPromptBlock(bundle: AgentsBundle): string {\n return generateSkillsPromptBlockForEntries(\n getRuntimeSkills(bundle),\n \"runtime\",\n );\n}\n\nexport function generateDevelopmentSkillsPromptBlock(\n bundle: AgentsBundle,\n): string {\n return generateSkillsPromptBlockForEntries(\n getDevelopmentSkills(bundle),\n \"development\",\n );\n}\n\n/** For tests — reset the module cache. */\nexport function __resetAgentsBundleCache(): void {\n cached = null;\n}\n"]}
@@ -20,7 +20,7 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
26
26
  //# sourceMappingURL=transcribe-voice.d.ts.map
@@ -155,6 +155,7 @@
155
155
  .agent-sidebar-main-surface {
156
156
  position: relative;
157
157
  z-index: 1;
158
+ container: agent-native-main / inline-size;
158
159
  background: var(--agent-native-raised-surface);
159
160
  transition:
160
161
  border-radius 260ms cubic-bezier(0.32, 0.72, 0, 1),
@@ -162,6 +163,10 @@
162
163
  box-shadow 260ms cubic-bezier(0.32, 0.72, 0, 1);
163
164
  }
164
165
 
166
+ .agent-native-app-main {
167
+ container: agent-native-main / inline-size;
168
+ }
169
+
165
170
  .agent-layout-main-surface::before,
166
171
  .agent-sidebar-main-surface::before {
167
172
  content: "";
@@ -8,63 +8,63 @@
8
8
 
9
9
  :root {
10
10
  --background: 0 0% 100%;
11
- --foreground: 220 10% 10%;
11
+ --foreground: 0 0% 10%;
12
12
  --card: 0 0% 100%;
13
- --card-foreground: 220 10% 10%;
13
+ --card-foreground: 0 0% 10%;
14
14
  --popover: 0 0% 100%;
15
- --popover-foreground: 220 10% 10%;
16
- --primary: 220 10% 15%;
15
+ --popover-foreground: 0 0% 10%;
16
+ --primary: 0 0% 15%;
17
17
  --primary-foreground: 0 0% 100%;
18
- --secondary: 220 10% 95%;
19
- --secondary-foreground: 220 10% 15%;
20
- --muted: 220 10% 95%;
21
- --muted-foreground: 220 5% 45%;
22
- --accent: 220 10% 95%;
23
- --accent-foreground: 220 10% 15%;
18
+ --secondary: 0 0% 95%;
19
+ --secondary-foreground: 0 0% 15%;
20
+ --muted: 0 0% 95%;
21
+ --muted-foreground: 0 0% 45%;
22
+ --accent: 0 0% 95%;
23
+ --accent-foreground: 0 0% 15%;
24
24
  --destructive: 0 84% 60%;
25
25
  --destructive-foreground: 0 0% 98%;
26
- --border: 220 10% 90%;
27
- --input: 220 10% 90%;
28
- --ring: 220 10% 40%;
26
+ --border: 0 0% 90%;
27
+ --input: 0 0% 90%;
28
+ --ring: 0 0% 40%;
29
29
  --radius: 0.5rem;
30
- --sidebar-background: 220 10% 97%;
31
- --sidebar-foreground: 220 5% 45%;
32
- --sidebar-primary: 220 10% 15%;
30
+ --sidebar-background: 0 0% 97%;
31
+ --sidebar-foreground: 0 0% 45%;
32
+ --sidebar-primary: 0 0% 15%;
33
33
  --sidebar-primary-foreground: 0 0% 100%;
34
- --sidebar-accent: 220 10% 95%;
35
- --sidebar-accent-foreground: 220 10% 15%;
36
- --sidebar-border: 220 10% 90%;
37
- --sidebar-ring: 220 10% 40%;
34
+ --sidebar-accent: 0 0% 95%;
35
+ --sidebar-accent-foreground: 0 0% 15%;
36
+ --sidebar-border: 0 0% 90%;
37
+ --sidebar-ring: 0 0% 40%;
38
38
  }
39
39
 
40
40
  .dark {
41
- --background: 220 6% 6%;
41
+ --background: 0 0% 13%;
42
42
  --foreground: 0 0% 90%;
43
- --card: 220 5% 6%;
43
+ --card: 0 0% 15%;
44
44
  --card-foreground: 0 0% 90%;
45
- --popover: 220 5% 6%;
45
+ --popover: 0 0% 15%;
46
46
  --popover-foreground: 0 0% 90%;
47
47
  --primary: 0 0% 75%;
48
- --primary-foreground: 220 6% 6%;
49
- --secondary: 220 4% 12%;
48
+ --primary-foreground: 0 0% 10%;
49
+ --secondary: 0 0% 18%;
50
50
  --secondary-foreground: 0 0% 90%;
51
- --muted: 220 4% 10%;
52
- --muted-foreground: 220 4% 60%;
53
- --accent: 220 4% 13%;
51
+ --muted: 0 0% 16%;
52
+ --muted-foreground: 0 0% 60%;
53
+ --accent: 0 0% 18%;
54
54
  --accent-foreground: 0 0% 90%;
55
55
  --destructive: 0 63% 51%;
56
56
  --destructive-foreground: 0 0% 98%;
57
- --border: 220 4% 14%;
58
- --input: 220 4% 14%;
57
+ --border: 0 0% 24%;
58
+ --input: 0 0% 24%;
59
59
  --ring: 0 0% 60%;
60
60
  --radius: 0.5rem;
61
- --sidebar-background: 220 6% 4%;
62
- --sidebar-foreground: 220 4% 60%;
61
+ --sidebar-background: 0 0% 10%;
62
+ --sidebar-foreground: 0 0% 60%;
63
63
  --sidebar-primary: 0 0% 75%;
64
- --sidebar-primary-foreground: 220 6% 6%;
65
- --sidebar-accent: 220 4% 10%;
64
+ --sidebar-primary-foreground: 0 0% 10%;
65
+ --sidebar-accent: 0 0% 16%;
66
66
  --sidebar-accent-foreground: 0 0% 90%;
67
- --sidebar-border: 220 4% 10%;
67
+ --sidebar-border: 0 0% 20%;
68
68
  --sidebar-ring: 0 0% 60%;
69
69
  }
70
70
 
@@ -374,6 +374,12 @@ npx @agent-native/core@latest skills add visual-edit
374
374
  المرقمة مثل `localhost:1234/onboarding/1` و`/onboarding/2` و`/onboarding/3`
375
375
  كشاشات منفصلة ومرتبة في وضع النظرة العامة.
376
376
 
377
+ يمكن تحميل مسار الإدخال `/visual-edit` قبل تسجيل دخول المشاهد، كما يمكن لروابط
378
+ `/design/:id` العامة عرض تصاميم عامة للقراءة فقط بدون جلسة. ما يزال حفظ تخطيط
379
+ الشاشة أو إنشاء شاشات جديدة أو المشاركة ينشئ بيانات Design مرتبطة بحساب: يُرسَل
380
+ المستخدمون غير المسجلين إلى `/_agent-native/sign-in?return=...`، ثم يحفظ Design
381
+ المشروع أو ينسخه إلى ذلك الحساب قبل فتح مربع حوار المشاركة.
382
+
377
383
  لأسماء طبقات مستقرة، أضف `data-agent-native-layer-name` إلى العناصر المهمة.
378
384
  يستخدمه Design قبل البدائل الدلالية/النصية، ويمكنه حفظ إعادة تسمية الطبقات عبر
379
385
  تحرير هذا السمة. يدعم HTML المضمن تحرير طبقات الكود محليًا للنصوص والأصناف
@@ -376,6 +376,14 @@ zu platzieren. Nummerierte Flows wie `localhost:1234/onboarding/1`,
376
376
  `/onboarding/2` und `/onboarding/3` bleiben als getrennte, geordnete Screens im
377
377
  Overview-Modus erhalten.
378
378
 
379
+ Die Einstiegsroute `/visual-edit` kann laden, bevor der Betrachter angemeldet
380
+ ist, und öffentliche `/design/:id`-Links können öffentliche Designs ohne Sitzung
381
+ schreibgeschützt rendern. Das Speichern des Screen-Layouts, Generieren neuer
382
+ Screens oder Teilen erstellt weiterhin accountgebundene Design-Daten:
383
+ abgemeldete Benutzer gehen durch `/_agent-native/sign-in?return=...`;
384
+ anschließend speichert oder kopiert Design das Projekt in dieses Konto, bevor
385
+ der Teilen-Dialog geöffnet wird.
386
+
379
387
  Für stabile Ebenennamen fügen Sie wichtigen Elementen
380
388
  `data-agent-native-layer-name` hinzu. Design verwendet dies vor
381
389
  semantischen/textbasierten Fallbacks und kann Umbenennungen durch Bearbeiten
@@ -340,11 +340,11 @@ Cada operación invocable por el agente es un archivo TypeScript en `templates/d
340
340
  - **Sistemas de diseño**: `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` y `analyze-brand-assets` para recopilar datos de marca antes del análisis.
341
341
  - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportación y transferencia**: `export-html`, `export-pdf`, `export-svg`, `export-zip` y `export-coding-handoff` para convertir un diseño en una transferencia de herramienta de codificación.
343
- - **Contexto y navegación**: `view-screen` (diseño actual, archivo abierto, vista, pregunta pendiente o cuadrícula de variantes), `get-design-snapshot` (estado actual desde el cual un agente externo puede continuar) y `navigate`.
343
+ - **Contexto y navegación**: `view-screen` (diseño actual, archivo abierto, vista, pregunta pendiente o elección de variante), `get-design-snapshot` (estado actual desde el cual un agente externo puede continuar) y `navigate`.
344
344
 
345
345
  ### Trabajar con el agente
346
346
 
347
- El agente siempre sabe lo que tienes abierto. `view-screen` devuelve el diseño actual, el archivo abierto, la vista activa y cualquier pregunta pendiente o cuadrícula variante y los inyecta en cada mensaje, por lo que puede decir "hacer esto más denso" o "exportar esta variante" sin nombrar el diseño.
347
+ El agente siempre sabe lo que tienes abierto. `view-screen` devuelve el diseño actual, el archivo abierto, la vista activa y cualquier pregunta pendiente o elección de variante y los inyecta en cada mensaje, por lo que puede decir "hacer esto más denso" o "exportar esta variante" sin nombrar el diseño.
348
348
 
349
349
  Debido a que un diseño son solo archivos HTML/JSX independientes, el agente edita la misma fuente que representa el iframe y de donde proviene cada exportación; no hay un formato de "maqueta de IA" independiente para traducir. Un sistema de diseño vinculado proporciona tokens y `custom_instructions` el agente honra en cada paso de generación. Seleccione texto o una región en la vista previa y presione Cmd+I para enfocar al agente exactamente en esa parte.
350
350
 
@@ -375,6 +375,14 @@ por URL. Los flujos numerados como `localhost:1234/onboarding/1`,
375
375
  `/onboarding/2` y `/onboarding/3` se mantienen como pantallas separadas y
376
376
  ordenadas en modo de vista general.
377
377
 
378
+ La ruta de entrada `/visual-edit` puede cargar antes de que el visitante inicie
379
+ sesión, y los enlaces públicos `/design/:id` pueden renderizar diseños públicos
380
+ de solo lectura sin sesión. Persistir el diseño de pantallas, generar pantallas
381
+ nuevas o compartir sigue creando datos de Design vinculados a una cuenta: los
382
+ usuarios sin sesión pasan por `/_agent-native/sign-in?return=...`; después,
383
+ Design guarda o copia el proyecto en esa cuenta antes de abrir el diálogo de
384
+ compartir.
385
+
378
386
  Para nombres de capa estables, agrega `data-agent-native-layer-name` a los
379
387
  elementos importantes. Design lo usa antes de los respaldos semánticos/de texto
380
388
  y puede persistir cambios de nombre editando ese atributo. HTML inline admite
@@ -340,11 +340,11 @@ Chaque opération appelable par un agent est un fichier TypeScript dans `templat
340
340
  - **Systèmes de conception** : `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` et `analyze-brand-assets` pour collecter des données de marque avant l'analyse.
341
341
  - **Importer** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportation et transfert** : `export-html`, `export-pdf`, `export-svg`, `export-zip` et `export-coding-handoff` pour transformer une conception en transfert d'outil de codage.
343
- - **Contexte et navigation** – `view-screen` (conception actuelle, fichier ouvert, vue, question en attente ou grille de variantes), `get-design-snapshot` (état actuel à partir duquel un agent externe peut continuer) et `navigate`.
343
+ - **Contexte et navigation** – `view-screen` (conception actuelle, fichier ouvert, vue, question en attente ou choix de variante), `get-design-snapshot` (état actuel à partir duquel un agent externe peut continuer) et `navigate`.
344
344
 
345
345
  ### Travailler avec l'agent
346
346
 
347
- L'agent sait toujours ce que vous avez ouvert. La conception actuelle, le fichier ouvert, la vue active et toute question en attente ou grille de variantes sont renvoyés par `view-screen` et injectés dans chaque message, vous pouvez donc dire « rendre cela plus dense » ou « exporter cette variante » sans nommer la conception.
347
+ L'agent sait toujours ce que vous avez ouvert. La conception actuelle, le fichier ouvert, la vue active et toute question en attente ou choix de variante sont renvoyés par `view-screen` et injectés dans chaque message, vous pouvez donc dire « rendre cela plus dense » ou « exporter cette variante » sans nommer la conception.
348
348
 
349
349
  Étant donné qu'une conception n'est constituée que de fichiers HTML/JSX autonomes, l'agent édite la même source que celle du rendu iframe et celle d'où provient chaque exportation : il n'existe pas de format de « maquette IA » distinct à traduire. Un système de conception lié fournit des jetons et `custom_instructions` que l'agent honore à chaque passage de génération. Sélectionnez du texte ou une région dans l'aperçu et appuyez sur Cmd+I pour concentrer l'agent exactement sur cette partie.
350
350
 
@@ -375,6 +375,14 @@ URL. Les flows numérotés comme `localhost:1234/onboarding/1`,
375
375
  `/onboarding/2` et `/onboarding/3` restent des écrans séparés et ordonnés en
376
376
  mode overview.
377
377
 
378
+ La route d'entrée `/visual-edit` peut se charger avant la connexion du visiteur,
379
+ et les liens publics `/design/:id` peuvent afficher des designs publics en
380
+ lecture seule sans session. Persister la disposition des écrans, générer de
381
+ nouveaux écrans ou partager crée toujours des données Design liées à un compte :
382
+ les utilisateurs non connectés passent par `/_agent-native/sign-in?return=...`,
383
+ puis Design enregistre ou copie le projet dans ce compte avant d'ouvrir la
384
+ boîte de dialogue de partage.
385
+
378
386
  Pour des noms de couche stables, ajoutez `data-agent-native-layer-name` aux
379
387
  éléments importants. Design l'utilise avant les replis sémantiques/textuels et
380
388
  peut persister les renommages en modifiant cet attribut. Le HTML inline prend en
@@ -374,6 +374,13 @@ place करता है। `localhost:1234/onboarding/1`, `/onboarding/2`, औ
374
374
  `/onboarding/3` जैसे numbered flows overview mode में separate ordered screens
375
375
  रहते हैं।
376
376
 
377
+ `/visual-edit` entry route viewer के sign in करने से पहले load हो सकता है, और
378
+ public `/design/:id` links बिना session के read-only public designs render कर
379
+ सकते हैं। Screen layout persist करना, नए screens generate करना, या sharing अभी
380
+ भी account-backed Design data बनाता है: signed-out users
381
+ `/_agent-native/sign-in?return=...` से गुजरते हैं, फिर Design share dialog खोलने
382
+ से पहले project को उस account में save या copy करता है।
383
+
377
384
  Stable layer names के लिए meaningful elements पर
378
385
  `data-agent-native-layer-name` जोड़ें। Design semantic/text fallbacks से पहले
379
386
  इसे उपयोग करता है और इसी attribute को edit करके layer renames persist कर सकता
@@ -376,6 +376,13 @@ npx @agent-native/core@latest skills add visual-edit
376
376
  のような番号付きフローは、overview mode で個別の順序付き画面として保持
377
377
  されます。
378
378
 
379
+ `/visual-edit` の入口ルートは閲覧者がサインインする前でも読み込めます。
380
+ 公開 `/design/:id` リンクも、セッションなしで読み取り専用の公開 Design を
381
+ 表示できます。画面レイアウトの保存、新しい画面の生成、共有は引き続きア
382
+ カウントに紐づく Design データを作成します。サインアウト中のユーザーは
383
+ `/_agent-native/sign-in?return=...` を経由し、その後 Design が共有ダイアロ
384
+ グを開く前にプロジェクトをそのアカウントへ保存またはコピーします。
385
+
379
386
  安定したレイヤー名には、意味のある要素に
380
387
  `data-agent-native-layer-name` を追加します。Design はセマンティック/テ
381
388
  キストのフォールバックより先にこれを使い、この属性を編集してレイヤー名
@@ -373,6 +373,13 @@ npx @agent-native/core@latest skills add visual-edit
373
373
  `localhost:1234/onboarding/1`, `/onboarding/2`, `/onboarding/3` 같은 번호가
374
374
  붙은 흐름은 overview mode에서 분리된 순서 있는 화면으로 유지됩니다.
375
375
 
376
+ `/visual-edit` 진입 route는 보는 사람이 sign in하기 전에도 load될 수 있고,
377
+ public `/design/:id` 링크는 session 없이 read-only public design을 render할 수
378
+ 있습니다. Screen layout을 persist하거나 새 screen을 generate하거나 share하는
379
+ 일은 여전히 account-backed Design data를 만듭니다. signed-out 사용자는
380
+ `/_agent-native/sign-in?return=...`를 거친 뒤, Design이 share dialog를 열기
381
+ 전에 project를 해당 account에 save하거나 copy합니다.
382
+
376
383
  안정적인 layer name을 위해 의미 있는 요소에 `data-agent-native-layer-name`을
377
384
  추가하세요. Design은 semantic/text fallback보다 이것을 먼저 사용하며, 해당
378
385
  attribute를 편집해 layer rename을 persist할 수 있습니다. Inline HTML은 text,
@@ -340,11 +340,11 @@ Cada operação que pode ser chamada pelo agente é um arquivo TypeScript em `te
340
340
  - **Sistemas de design** — `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` e `analyze-brand-assets` para coletar dados da marca antes da análise.
341
341
  - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportação e transferência** — `export-html`, `export-pdf`, `export-svg`, `export-zip` e `export-coding-handoff` para transformar um design em uma transferência de ferramenta de codificação.
343
- - **Contexto e navegação** — `view-screen` (design atual, arquivo aberto, visualização, pergunta pendente ou grade de variantes), `get-design-snapshot` (estado atual para um agente externo continuar) e `navigate`.
343
+ - **Contexto e navegação** — `view-screen` (design atual, arquivo aberto, visualização, pergunta pendente ou escolha de variante), `get-design-snapshot` (estado atual para um agente externo continuar) e `navigate`.
344
344
 
345
345
  ### Trabalhando com o agente
346
346
 
347
- O agente sempre sabe o que você tem em aberto. O design atual, o arquivo aberto, a visualização ativa e qualquer questão pendente ou grade de variantes são retornados por `view-screen` e injetados em cada mensagem, para que você possa dizer "tornar isso mais denso" ou "exportar esta variante" sem nomear o design.
347
+ O agente sempre sabe o que você tem em aberto. O design atual, o arquivo aberto, a visualização ativa e qualquer questão pendente ou escolha de variante são retornados por `view-screen` e injetados em cada mensagem, para que você possa dizer "tornar isso mais denso" ou "exportar esta variante" sem nomear o design.
348
348
 
349
349
  Como um design consiste apenas em arquivos HTML/JSX independentes, o agente edita a mesma fonte que o iframe renderiza e de onde vem cada exportação — não há um formato de "maquete de IA" separado para traduzir. Um sistema de design vinculado fornece tokens e `custom_instructions` que o agente homenageia em cada passagem de geração. Selecione o texto ou uma região na visualização e pressione Cmd+I para focar o agente exatamente nessa parte.
350
350
 
@@ -374,6 +374,13 @@ para posicionar cada path ou URL solicitado como sua própria tela iframe basead
374
374
  em URL. Fluxos numerados como `localhost:1234/onboarding/1`, `/onboarding/2` e
375
375
  `/onboarding/3` permanecem como telas separadas e ordenadas no modo overview.
376
376
 
377
+ A rota de entrada `/visual-edit` pode carregar antes de o visitante entrar, e
378
+ links públicos `/design/:id` podem renderizar designs públicos somente leitura
379
+ sem sessão. Persistir o layout das telas, gerar novas telas ou compartilhar
380
+ ainda cria dados do Design vinculados a uma conta: usuários desconectados passam
381
+ por `/_agent-native/sign-in?return=...`; depois, o Design salva ou copia o
382
+ projeto para essa conta antes de abrir o diálogo de compartilhamento.
383
+
377
384
  Para nomes de camada estáveis, adicione `data-agent-native-layer-name` a
378
385
  elementos importantes. O Design usa isso antes de fallbacks semânticos/de texto
379
386
  e pode persistir renomeações editando esse atributo. HTML inline aceita edições
@@ -370,6 +370,12 @@ npx @agent-native/core@latest skills add visual-edit
370
370
  `localhost:1234/onboarding/1`、`/onboarding/2`、`/onboarding/3` 这样的编号流程
371
371
  会在 overview 模式中保持为分开的有序屏幕。
372
372
 
373
+ `/visual-edit` 入口路由可以在查看者登录前加载,公开的 `/design/:id` 链接也
374
+ 可以在没有会话时以只读方式渲染公开 design。持久保存屏幕布局、生成新屏幕或
375
+ 共享仍会创建账号绑定的 Design 数据:未登录用户会经过
376
+ `/_agent-native/sign-in?return=...`,然后 Design 会在打开共享对话框前,把项
377
+ 目保存或复制到该账号。
378
+
373
379
  为了获得稳定的图层名称,请在有意义的元素上添加
374
380
  `data-agent-native-layer-name`。Design 会优先使用它,然后才使用语义/文本回
375
381
  退,并且可以通过编辑该属性来持久保存图层重命名。Inline HTML 支持本地代
@@ -371,6 +371,12 @@ npx @agent-native/core@latest skills add visual-edit
371
371
  `localhost:1234/onboarding/1`、`/onboarding/2`、`/onboarding/3` 這樣的編號流程
372
372
  會在 overview 模式中保持為分開的有序畫面。
373
373
 
374
+ `/visual-edit` 入口路由可以在檢視者登入前載入,公開的 `/design/:id` 連結也
375
+ 可以在沒有 session 時以唯讀方式渲染公開 design。持久保存畫面版面、產生新畫
376
+ 面或分享仍會建立帳號綁定的 Design 資料:未登入使用者會經過
377
+ `/_agent-native/sign-in?return=...`,然後 Design 會在開啟分享對話框前,把專
378
+ 案保存或複製到該帳號。
379
+
374
380
  若要取得穩定的圖層名稱,請在有意義的元素上加入
375
381
  `data-agent-native-layer-name`。Design 會優先使用它,然後才使用語意/文字
376
382
  後備,並且可以透過編輯該屬性來持久保存圖層重新命名。Inline HTML 支援本
@@ -340,11 +340,11 @@ Every agent-callable operation is a TypeScript file in `templates/design/actions
340
340
  - **Design systems** — `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system`, and `analyze-brand-assets` for gathering brand data ahead of analysis.
341
341
  - **Import** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Export & handoff** — `export-html`, `export-pdf`, `export-svg`, `export-zip`, and `export-coding-handoff` to turn a design into a coding-tool handoff.
343
- - **Context & navigation** — `view-screen` (current design, open file, view, pending question or variant grid), `get-design-snapshot` (current state for an external agent to continue from), and `navigate`.
343
+ - **Context & navigation** — `view-screen` (current design, open file, view, pending question or variant choice), `get-design-snapshot` (current state for an external agent to continue from), and `navigate`.
344
344
 
345
345
  ### Working with the agent
346
346
 
347
- The agent always knows what you have open. The current design, the open file, the active view, and any pending question or variant grid are returned by `view-screen` and injected into every message, so you can say "make this denser" or "export this variant" without naming the design.
347
+ The agent always knows what you have open. The current design, the open file, the active view, and any pending question or variant choice are returned by `view-screen` and injected into every message, so you can say "make this denser" or "export this variant" without naming the design.
348
348
 
349
349
  Because a design is just standalone HTML/JSX files, the agent edits the same source the iframe renders and every export comes from — there is no separate "AI mockup" format to translate. A linked design system supplies tokens and `custom_instructions` the agent honors on every generation pass. Select text or a region in the preview and hit Cmd+I to focus the agent on exactly that part.
350
350
 
@@ -374,6 +374,13 @@ place each requested path or URL as its own URL-backed iframe screen. Numbered
374
374
  flows such as `localhost:1234/onboarding/1`, `/onboarding/2`, and
375
375
  `/onboarding/3` stay as separate ordered screens in overview mode.
376
376
 
377
+ The `/visual-edit` entry route can load before the viewer signs in, and public
378
+ `/design/:id` links can render read-only public designs without a session.
379
+ Persisting the screen layout, generating new screens, or sharing still creates
380
+ account-backed Design data: signed-out users go through
381
+ `/_agent-native/sign-in?return=...`, then Design saves or copies the project
382
+ into that account before opening the share dialog.
383
+
377
384
  For stable layer names, add `data-agent-native-layer-name` to meaningful
378
385
  elements. Design uses it before semantic/text fallbacks and can persist layer
379
386
  renames by editing that attribute. Inline HTML supports local code-layer edits
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.80.8",
3
+ "version": "0.80.9",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {