@agent-native/core 0.132.1 → 0.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +198 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/a2a/correlation.ts +11 -1
  5. package/corpus/core/src/a2a/types.ts +11 -3
  6. package/corpus/core/src/agent/engine/ai-sdk-engine.ts +33 -46
  7. package/corpus/core/src/agent/engine/builder-engine.ts +22 -10
  8. package/corpus/core/src/agent/engine/error-detail.ts +184 -3
  9. package/corpus/core/src/agent/engine/failure-taxonomy.ts +123 -0
  10. package/corpus/core/src/agent/engine/index.ts +8 -0
  11. package/corpus/core/src/agent/engine/registry.ts +92 -8
  12. package/corpus/core/src/agent/engine/translate-ai-sdk.ts +17 -2
  13. package/corpus/core/src/agent/production-agent.ts +13 -33
  14. package/corpus/core/src/agent/run-loop-with-resume.ts +1 -1
  15. package/corpus/core/src/agent/run-manager.ts +43 -14
  16. package/corpus/core/src/agent/run-store.ts +30 -3
  17. package/corpus/core/src/agent/thread-data-builder.ts +36 -4
  18. package/corpus/core/src/chat-threads/store.ts +42 -0
  19. package/corpus/core/src/cli/templates-meta.ts +13 -0
  20. package/corpus/core/src/cli/workspace-dev.ts +1 -0
  21. package/corpus/core/src/client/error-format.ts +12 -0
  22. package/corpus/core/src/client/use-chat-threads.ts +76 -16
  23. package/corpus/core/src/credentials/index.ts +51 -12
  24. package/corpus/core/src/extensions/url-safety.ts +46 -12
  25. package/corpus/core/src/integrations/adapters/slack.ts +32 -10
  26. package/corpus/core/src/integrations/google-docs-poller.ts +12 -1
  27. package/corpus/core/src/integrations/installations-store.ts +30 -0
  28. package/corpus/core/src/integrations/plugin.ts +5 -5
  29. package/corpus/core/src/integrations/types.ts +7 -0
  30. package/corpus/core/src/integrations/webhook-handler.ts +24 -1
  31. package/corpus/core/src/jobs/background-automation-runner.ts +38 -1
  32. package/corpus/core/src/provider-api/index.ts +8 -2
  33. package/corpus/core/src/scripts/call-agent.ts +6 -0
  34. package/corpus/core/src/server/agent-chat-plugin.ts +46 -10
  35. package/corpus/core/src/server/agent-discovery.ts +2 -0
  36. package/corpus/core/src/server/builder-design-systems.ts +21 -0
  37. package/corpus/core/src/server/credential-provider.ts +51 -12
  38. package/corpus/core/src/server/index.ts +1 -0
  39. package/corpus/core/src/server/onboarding-html.ts +37 -2
  40. package/corpus/core/src/shared/reasoning-effort.ts +1 -1
  41. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  42. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +6 -2
  43. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +39 -19
  44. package/corpus/templates/assets/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  45. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +30 -3
  46. package/corpus/templates/brain/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  47. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  48. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +54 -25
  49. package/corpus/templates/calendar/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  50. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  51. package/corpus/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  52. package/corpus/templates/clips/app/components/library/library-layout.tsx +37 -21
  53. package/corpus/templates/clips/changelog/2026-07-30-meeting-microphone-transcription-works-reliably-from-the-fir.md +6 -0
  54. package/corpus/templates/clips/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  55. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +1 -1
  56. package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +1 -1
  57. package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +13 -0
  58. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +2 -0
  59. package/corpus/templates/clips/desktop/src-tauri/src/system_audio.rs +25 -132
  60. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +34 -17
  61. package/corpus/templates/content/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  62. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +6 -2
  63. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +5 -0
  64. package/corpus/templates/design/actions/create-design-system.ts +1 -0
  65. package/corpus/templates/design/actions/set-default-design-system.ts +34 -26
  66. package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +5 -3
  67. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +23 -0
  68. package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +3 -0
  69. package/corpus/templates/design/app/components/layout/Sidebar.tsx +21 -4
  70. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +11 -7
  71. package/corpus/templates/design/app/i18n-data.ts +39 -0
  72. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +229 -12
  73. package/corpus/templates/design/app/pages/DesignSystems.tsx +10 -4
  74. package/corpus/templates/design/changelog/2026-07-30-fixed-the-keyboard-shortcuts-panel-not-opening-with-ctrl-shi.md +6 -0
  75. package/corpus/templates/design/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  76. package/corpus/templates/design/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
  77. package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +19 -4
  78. package/corpus/templates/dispatch/AGENTS.md +4 -0
  79. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +562 -0
  80. package/corpus/templates/factory/.agents/skills/adding-a-feature/SKILL.md +198 -0
  81. package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +115 -0
  82. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +182 -0
  83. package/corpus/templates/factory/.agents/skills/capture-learnings/SKILL.md +89 -0
  84. package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +221 -0
  85. package/corpus/templates/factory/.agents/skills/customizing-agent-native/SKILL.md +220 -0
  86. package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +263 -0
  87. package/corpus/templates/factory/.agents/skills/factory-graphs/SKILL.md +52 -0
  88. package/corpus/templates/factory/.agents/skills/feature-flags/SKILL.md +169 -0
  89. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +174 -0
  90. package/corpus/templates/factory/.agents/skills/real-time-sync/SKILL.md +232 -0
  91. package/corpus/templates/factory/.agents/skills/security/SKILL.md +324 -0
  92. package/corpus/templates/factory/.agents/skills/self-modifying-code/SKILL.md +119 -0
  93. package/corpus/templates/factory/.agents/skills/shadcn-ui/SKILL.md +123 -0
  94. package/corpus/templates/factory/.agents/skills/sharing/SKILL.md +232 -0
  95. package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +178 -0
  96. package/corpus/templates/factory/.agents/skills/upgrade-agent-native/SKILL.md +122 -0
  97. package/corpus/templates/factory/.env.example +24 -0
  98. package/corpus/templates/factory/.ignore +0 -0
  99. package/corpus/templates/factory/.oxfmtrc.json +8 -0
  100. package/corpus/templates/factory/AGENTS.md +90 -0
  101. package/corpus/templates/factory/CHANGELOG.md +10 -0
  102. package/corpus/templates/factory/DEVELOPING.md +185 -0
  103. package/corpus/templates/factory/README.md +64 -0
  104. package/corpus/templates/factory/_gitignore +42 -0
  105. package/corpus/templates/factory/actions/add-factory-comment.ts +55 -0
  106. package/corpus/templates/factory/actions/approve-factory-item.ts +214 -0
  107. package/corpus/templates/factory/actions/babysit-pull-request.ts +126 -0
  108. package/corpus/templates/factory/actions/evaluate-triage-item.ts +172 -0
  109. package/corpus/templates/factory/actions/get-factory-graph.ts +62 -0
  110. package/corpus/templates/factory/actions/get-triage-config.ts +42 -0
  111. package/corpus/templates/factory/actions/get-triage-item.ts +74 -0
  112. package/corpus/templates/factory/actions/hello.ts +13 -0
  113. package/corpus/templates/factory/actions/ingest-github-observation.ts +100 -0
  114. package/corpus/templates/factory/actions/list-factories.ts +40 -0
  115. package/corpus/templates/factory/actions/list-factory-comments.ts +40 -0
  116. package/corpus/templates/factory/actions/list-triage-items.ts +85 -0
  117. package/corpus/templates/factory/actions/list-triage-rules.ts +44 -0
  118. package/corpus/templates/factory/actions/navigate.ts +41 -0
  119. package/corpus/templates/factory/actions/poll-slack-channel.ts +118 -0
  120. package/corpus/templates/factory/actions/reconcile-triage-run.ts +179 -0
  121. package/corpus/templates/factory/actions/record-triage-feedback.ts +58 -0
  122. package/corpus/templates/factory/actions/run.ts +2 -0
  123. package/corpus/templates/factory/actions/save-factory-graph.ts +129 -0
  124. package/corpus/templates/factory/actions/save-triage-config.ts +67 -0
  125. package/corpus/templates/factory/actions/save-triage-rule.ts +89 -0
  126. package/corpus/templates/factory/actions/suggest-factory-rules.ts +70 -0
  127. package/corpus/templates/factory/actions/view-screen.ts +73 -0
  128. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +441 -0
  129. package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +388 -0
  130. package/corpus/templates/factory/app/components/layout/Header.tsx +60 -0
  131. package/corpus/templates/factory/app/components/layout/Layout.tsx +190 -0
  132. package/corpus/templates/factory/app/components/layout/Sidebar.tsx +538 -0
  133. package/corpus/templates/factory/app/components/triage/triage-status-pill.tsx +28 -0
  134. package/corpus/templates/factory/app/components/ui/button.tsx +1 -0
  135. package/corpus/templates/factory/app/components/ui/card.tsx +1 -0
  136. package/corpus/templates/factory/app/components/ui/dropdown-menu.tsx +1 -0
  137. package/corpus/templates/factory/app/components/ui/input.tsx +1 -0
  138. package/corpus/templates/factory/app/components/ui/label.tsx +1 -0
  139. package/corpus/templates/factory/app/components/ui/sheet.tsx +1 -0
  140. package/corpus/templates/factory/app/components/ui/textarea.tsx +1 -0
  141. package/corpus/templates/factory/app/components/ui/toolkit-provider.tsx +17 -0
  142. package/corpus/templates/factory/app/components/ui/tooltip.tsx +1 -0
  143. package/corpus/templates/factory/app/design-system.ts +3 -0
  144. package/corpus/templates/factory/app/entry.client.tsx +22 -0
  145. package/corpus/templates/factory/app/entry.server.tsx +10 -0
  146. package/corpus/templates/factory/app/global.css +93 -0
  147. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +113 -0
  148. package/corpus/templates/factory/app/i18n/en-US.ts +211 -0
  149. package/corpus/templates/factory/app/i18n/index.ts +34 -0
  150. package/corpus/templates/factory/app/i18n-data.ts +556 -0
  151. package/corpus/templates/factory/app/lib/agent-page.tsx +49 -0
  152. package/corpus/templates/factory/app/lib/app-config.ts +11 -0
  153. package/corpus/templates/factory/app/lib/tab-id.ts +1 -0
  154. package/corpus/templates/factory/app/lib/utils.ts +1 -0
  155. package/corpus/templates/factory/app/root.tsx +175 -0
  156. package/corpus/templates/factory/app/routes/_index.tsx +94 -0
  157. package/corpus/templates/factory/app/routes/agent.tsx +24 -0
  158. package/corpus/templates/factory/app/routes/chat.$threadId.tsx +1 -0
  159. package/corpus/templates/factory/app/routes/database.tsx +17 -0
  160. package/corpus/templates/factory/app/routes/extensions.$id.$slug.tsx +2 -0
  161. package/corpus/templates/factory/app/routes/extensions.$id.tsx +11 -0
  162. package/corpus/templates/factory/app/routes/extensions._index.tsx +11 -0
  163. package/corpus/templates/factory/app/routes/extensions.tsx +5 -0
  164. package/corpus/templates/factory/app/routes/factory.tsx +1003 -0
  165. package/corpus/templates/factory/app/routes/observability.tsx +19 -0
  166. package/corpus/templates/factory/app/routes/settings.tsx +89 -0
  167. package/corpus/templates/factory/app/routes/team.tsx +11 -0
  168. package/corpus/templates/factory/app/routes.ts +4 -0
  169. package/corpus/templates/factory/app/vite-env.d.ts +6 -0
  170. package/corpus/templates/factory/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
  171. package/corpus/templates/factory/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
  172. package/corpus/templates/factory/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
  173. package/corpus/templates/factory/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  174. package/corpus/templates/factory/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  175. package/corpus/templates/factory/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  176. package/corpus/templates/factory/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
  177. package/corpus/templates/factory/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  178. package/corpus/templates/factory/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
  179. package/corpus/templates/factory/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
  180. package/corpus/templates/factory/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
  181. package/corpus/templates/factory/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  182. package/corpus/templates/factory/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  183. package/corpus/templates/factory/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  184. package/corpus/templates/factory/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +6 -0
  185. package/corpus/templates/factory/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
  186. package/corpus/templates/factory/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
  187. package/corpus/templates/factory/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
  188. package/corpus/templates/factory/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
  189. package/corpus/templates/factory/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  190. package/corpus/templates/factory/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  191. package/corpus/templates/factory/changelog/2026-07-31-added-an-inspectable-observe-only-factory-queue-for-slack-.md +6 -0
  192. package/corpus/templates/factory/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  193. package/corpus/templates/factory/components.json +20 -0
  194. package/corpus/templates/factory/data/sync-config.json +1 -0
  195. package/corpus/templates/factory/learnings.defaults.md +5 -0
  196. package/corpus/templates/factory/netlify.toml +10 -0
  197. package/corpus/templates/factory/package.json +105 -0
  198. package/corpus/templates/factory/public/agent-native-icon-dark.svg +10 -0
  199. package/corpus/templates/factory/public/agent-native-icon-light.svg +10 -0
  200. package/corpus/templates/factory/public/agent-native-logo-dark.svg +21 -0
  201. package/corpus/templates/factory/public/agent-native-logo-light.svg +21 -0
  202. package/corpus/templates/factory/public/favicon.svg +1 -0
  203. package/corpus/templates/factory/public/icon-180.svg +1 -0
  204. package/corpus/templates/factory/public/icon-192.svg +1 -0
  205. package/corpus/templates/factory/public/icon-512.svg +1 -0
  206. package/corpus/templates/factory/public/manifest.json +21 -0
  207. package/corpus/templates/factory/react-router.config.ts +7 -0
  208. package/corpus/templates/factory/server/connectors/credentials.ts +129 -0
  209. package/corpus/templates/factory/server/connectors/slack.ts +129 -0
  210. package/corpus/templates/factory/server/db/index.ts +6 -0
  211. package/corpus/templates/factory/server/db/schema.ts +193 -0
  212. package/corpus/templates/factory/server/factory-graph/contracts.ts +212 -0
  213. package/corpus/templates/factory/server/factory-graph/store.ts +121 -0
  214. package/corpus/templates/factory/server/lib/require-workspace-member.ts +55 -0
  215. package/corpus/templates/factory/server/middleware/auth.ts +15 -0
  216. package/corpus/templates/factory/server/plugins/agent-chat.ts +58 -0
  217. package/corpus/templates/factory/server/plugins/auth.ts +14 -0
  218. package/corpus/templates/factory/server/plugins/factory-migrations.ts +247 -0
  219. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +116 -0
  220. package/corpus/templates/factory/server/plugins/integrations.ts +46 -0
  221. package/corpus/templates/factory/server/routes/[...page].get.ts +5 -0
  222. package/corpus/templates/factory/server/routes/_agent-native/factory/builder-callback.post.ts +116 -0
  223. package/corpus/templates/factory/server/triage/ai-services-git.ts +197 -0
  224. package/corpus/templates/factory/server/triage/builder-executor.ts +118 -0
  225. package/corpus/templates/factory/server/triage/contracts.ts +164 -0
  226. package/corpus/templates/factory/server/triage/github-ingestion.ts +35 -0
  227. package/corpus/templates/factory/server/triage/guards.ts +121 -0
  228. package/corpus/templates/factory/server/triage/ids.ts +27 -0
  229. package/corpus/templates/factory/server/triage/pr-babysit.ts +100 -0
  230. package/corpus/templates/factory/server/triage/pr-monitor.ts +220 -0
  231. package/corpus/templates/factory/server/triage/slack-client.ts +55 -0
  232. package/corpus/templates/factory/server/triage/slack-poller.ts +152 -0
  233. package/corpus/templates/factory/ssr-entry.ts +15 -0
  234. package/corpus/templates/factory/tsconfig.json +21 -0
  235. package/corpus/templates/factory/vite.config.ts +19 -0
  236. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +55 -5
  237. package/corpus/templates/forms/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  238. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +6 -2
  239. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +21 -6
  240. package/corpus/templates/plan/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  241. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +12 -0
  242. package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +9 -0
  243. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +11 -0
  244. package/corpus/templates/slides/AGENTS.md +5 -6
  245. package/corpus/templates/slides/actions/_await-fit-check.ts +20 -10
  246. package/corpus/templates/slides/actions/add-slide.ts +17 -4
  247. package/corpus/templates/slides/actions/create-design-system.ts +16 -4
  248. package/corpus/templates/slides/actions/delete-design-system.ts +18 -2
  249. package/corpus/templates/slides/actions/get-layout-overflows.ts +88 -0
  250. package/corpus/templates/slides/actions/import-file.ts +1 -0
  251. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +8 -0
  252. package/corpus/templates/slides/actions/patch-deck.ts +48 -16
  253. package/corpus/templates/slides/actions/set-default-design-system.ts +49 -19
  254. package/corpus/templates/slides/actions/update-slide.ts +13 -3
  255. package/corpus/templates/slides/actions/view-screen.ts +87 -10
  256. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +155 -28
  257. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +21 -17
  258. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +849 -341
  259. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +102 -2
  260. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +13 -16
  261. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +60 -12
  262. package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +11 -1
  263. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +66 -19
  264. package/corpus/templates/slides/app/i18n/en-US.ts +23 -0
  265. package/corpus/templates/slides/app/lib/normalize-slide-padding.ts +8 -15
  266. package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -3
  267. package/corpus/templates/slides/app/pages/DesignSystems.tsx +4 -3
  268. package/corpus/templates/slides/app/pages/Index.tsx +1 -1
  269. package/corpus/templates/slides/changelog/2026-07-31-design-system-details-now-show-their-source-and-indexing-sta.md +6 -0
  270. package/corpus/templates/slides/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
  271. package/corpus/templates/slides/changelog/2026-07-31-design-system-setup-keeps-focus-rings-visible-and-uses-a-sim.md +6 -0
  272. package/corpus/templates/slides/changelog/2026-07-31-skip-prompt-is-now-available-in-the-new-deck-prompt-header.md +6 -0
  273. package/corpus/templates/slides/changelog/2026-07-31-slides-now-detect-real-text-and-box-overflow-across-the-deck.md +6 -0
  274. package/corpus/templates/slides/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  275. package/corpus/templates/slides/server/handlers/design-systems.ts +1 -0
  276. package/corpus/templates/slides/server/handlers/index-design-system-sources.ts +1 -0
  277. package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +23 -4
  278. package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
  279. package/corpus/templates/slides/server/plugins/creative-context.ts +16 -3
  280. package/corpus/templates/slides/server/workspace-defaults.ts +5 -1
  281. package/corpus/templates/slides/shared/slide-fit.ts +26 -0
  282. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +30 -3
  283. package/corpus/templates/tasks/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  284. package/dist/a2a/correlation.d.ts +4 -1
  285. package/dist/a2a/correlation.d.ts.map +1 -1
  286. package/dist/a2a/correlation.js +8 -1
  287. package/dist/a2a/correlation.js.map +1 -1
  288. package/dist/a2a/types.d.ts +11 -3
  289. package/dist/a2a/types.d.ts.map +1 -1
  290. package/dist/a2a/types.js.map +1 -1
  291. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  292. package/dist/agent/engine/ai-sdk-engine.js +27 -41
  293. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  294. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  295. package/dist/agent/engine/builder-engine.js +18 -8
  296. package/dist/agent/engine/builder-engine.js.map +1 -1
  297. package/dist/agent/engine/error-detail.d.ts +61 -0
  298. package/dist/agent/engine/error-detail.d.ts.map +1 -1
  299. package/dist/agent/engine/error-detail.js +145 -3
  300. package/dist/agent/engine/error-detail.js.map +1 -1
  301. package/dist/agent/engine/failure-taxonomy.d.ts +24 -0
  302. package/dist/agent/engine/failure-taxonomy.d.ts.map +1 -0
  303. package/dist/agent/engine/failure-taxonomy.js +88 -0
  304. package/dist/agent/engine/failure-taxonomy.js.map +1 -0
  305. package/dist/agent/engine/index.d.ts +2 -1
  306. package/dist/agent/engine/index.d.ts.map +1 -1
  307. package/dist/agent/engine/index.js +2 -1
  308. package/dist/agent/engine/index.js.map +1 -1
  309. package/dist/agent/engine/registry.d.ts +16 -0
  310. package/dist/agent/engine/registry.d.ts.map +1 -1
  311. package/dist/agent/engine/registry.js +71 -6
  312. package/dist/agent/engine/registry.js.map +1 -1
  313. package/dist/agent/engine/translate-ai-sdk.d.ts.map +1 -1
  314. package/dist/agent/engine/translate-ai-sdk.js +14 -2
  315. package/dist/agent/engine/translate-ai-sdk.js.map +1 -1
  316. package/dist/agent/production-agent.d.ts.map +1 -1
  317. package/dist/agent/production-agent.js +13 -24
  318. package/dist/agent/production-agent.js.map +1 -1
  319. package/dist/agent/run-loop-with-resume.js +1 -1
  320. package/dist/agent/run-loop-with-resume.js.map +1 -1
  321. package/dist/agent/run-manager.d.ts.map +1 -1
  322. package/dist/agent/run-manager.js +39 -10
  323. package/dist/agent/run-manager.js.map +1 -1
  324. package/dist/agent/run-store.d.ts +10 -0
  325. package/dist/agent/run-store.d.ts.map +1 -1
  326. package/dist/agent/run-store.js +20 -3
  327. package/dist/agent/run-store.js.map +1 -1
  328. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  329. package/dist/agent/thread-data-builder.js +28 -4
  330. package/dist/agent/thread-data-builder.js.map +1 -1
  331. package/dist/chat-threads/store.d.ts +13 -0
  332. package/dist/chat-threads/store.d.ts.map +1 -1
  333. package/dist/chat-threads/store.js +35 -0
  334. package/dist/chat-threads/store.js.map +1 -1
  335. package/dist/cli/templates-meta.d.ts.map +1 -1
  336. package/dist/cli/templates-meta.js +13 -0
  337. package/dist/cli/templates-meta.js.map +1 -1
  338. package/dist/cli/workspace-dev.d.ts.map +1 -1
  339. package/dist/cli/workspace-dev.js +1 -0
  340. package/dist/cli/workspace-dev.js.map +1 -1
  341. package/dist/client/error-format.d.ts.map +1 -1
  342. package/dist/client/error-format.js +10 -0
  343. package/dist/client/error-format.js.map +1 -1
  344. package/dist/client/use-chat-threads.d.ts.map +1 -1
  345. package/dist/client/use-chat-threads.js +66 -16
  346. package/dist/client/use-chat-threads.js.map +1 -1
  347. package/dist/collab/awareness.d.ts +2 -2
  348. package/dist/collab/awareness.d.ts.map +1 -1
  349. package/dist/collab/struct-routes.d.ts +1 -1
  350. package/dist/credentials/index.d.ts +9 -2
  351. package/dist/credentials/index.d.ts.map +1 -1
  352. package/dist/credentials/index.js +50 -8
  353. package/dist/credentials/index.js.map +1 -1
  354. package/dist/extensions/url-safety.d.ts.map +1 -1
  355. package/dist/extensions/url-safety.js +38 -12
  356. package/dist/extensions/url-safety.js.map +1 -1
  357. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  358. package/dist/integrations/adapters/slack.js +25 -8
  359. package/dist/integrations/adapters/slack.js.map +1 -1
  360. package/dist/integrations/google-docs-poller.d.ts.map +1 -1
  361. package/dist/integrations/google-docs-poller.js +13 -1
  362. package/dist/integrations/google-docs-poller.js.map +1 -1
  363. package/dist/integrations/installations-store.d.ts +10 -0
  364. package/dist/integrations/installations-store.d.ts.map +1 -1
  365. package/dist/integrations/installations-store.js +24 -0
  366. package/dist/integrations/installations-store.js.map +1 -1
  367. package/dist/integrations/plugin.d.ts.map +1 -1
  368. package/dist/integrations/plugin.js +6 -5
  369. package/dist/integrations/plugin.js.map +1 -1
  370. package/dist/integrations/types.d.ts +7 -0
  371. package/dist/integrations/types.d.ts.map +1 -1
  372. package/dist/integrations/types.js.map +1 -1
  373. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  374. package/dist/integrations/webhook-handler.js +16 -1
  375. package/dist/integrations/webhook-handler.js.map +1 -1
  376. package/dist/jobs/background-automation-runner.d.ts.map +1 -1
  377. package/dist/jobs/background-automation-runner.js +35 -2
  378. package/dist/jobs/background-automation-runner.js.map +1 -1
  379. package/dist/notifications/routes.d.ts +6 -6
  380. package/dist/observability/routes.d.ts +3 -3
  381. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  382. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  383. package/dist/provider-api/index.js +7 -3
  384. package/dist/provider-api/index.js.map +1 -1
  385. package/dist/scripts/call-agent.d.ts.map +1 -1
  386. package/dist/scripts/call-agent.js +6 -1
  387. package/dist/scripts/call-agent.js.map +1 -1
  388. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  389. package/dist/server/agent-chat-plugin.js +38 -9
  390. package/dist/server/agent-chat-plugin.js.map +1 -1
  391. package/dist/server/agent-discovery.d.ts +2 -0
  392. package/dist/server/agent-discovery.d.ts.map +1 -1
  393. package/dist/server/agent-discovery.js.map +1 -1
  394. package/dist/server/builder-design-systems.d.ts +4 -1
  395. package/dist/server/builder-design-systems.d.ts.map +1 -1
  396. package/dist/server/builder-design-systems.js +11 -1
  397. package/dist/server/builder-design-systems.js.map +1 -1
  398. package/dist/server/credential-provider.d.ts.map +1 -1
  399. package/dist/server/credential-provider.js +49 -12
  400. package/dist/server/credential-provider.js.map +1 -1
  401. package/dist/server/index.d.ts +1 -1
  402. package/dist/server/index.d.ts.map +1 -1
  403. package/dist/server/index.js.map +1 -1
  404. package/dist/server/onboarding-html.d.ts.map +1 -1
  405. package/dist/server/onboarding-html.js +37 -2
  406. package/dist/server/onboarding-html.js.map +1 -1
  407. package/dist/server/transcribe-voice.d.ts +1 -1
  408. package/dist/shared/reasoning-effort.d.ts +1 -0
  409. package/dist/shared/reasoning-effort.d.ts.map +1 -1
  410. package/dist/shared/reasoning-effort.js +1 -1
  411. package/dist/shared/reasoning-effort.js.map +1 -1
  412. package/dist/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  413. package/dist/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  414. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  415. package/package.json +1 -1
  416. package/src/a2a/correlation.ts +11 -1
  417. package/src/a2a/types.ts +11 -3
  418. package/src/agent/engine/ai-sdk-engine.ts +33 -46
  419. package/src/agent/engine/builder-engine.ts +22 -10
  420. package/src/agent/engine/error-detail.ts +184 -3
  421. package/src/agent/engine/failure-taxonomy.ts +123 -0
  422. package/src/agent/engine/index.ts +8 -0
  423. package/src/agent/engine/registry.ts +92 -8
  424. package/src/agent/engine/translate-ai-sdk.ts +17 -2
  425. package/src/agent/production-agent.ts +13 -33
  426. package/src/agent/run-loop-with-resume.ts +1 -1
  427. package/src/agent/run-manager.ts +43 -14
  428. package/src/agent/run-store.ts +30 -3
  429. package/src/agent/thread-data-builder.ts +36 -4
  430. package/src/chat-threads/store.ts +42 -0
  431. package/src/cli/templates-meta.ts +13 -0
  432. package/src/cli/workspace-dev.ts +1 -0
  433. package/src/client/error-format.ts +12 -0
  434. package/src/client/use-chat-threads.ts +76 -16
  435. package/src/credentials/index.ts +51 -12
  436. package/src/extensions/url-safety.ts +46 -12
  437. package/src/integrations/adapters/slack.ts +32 -10
  438. package/src/integrations/google-docs-poller.ts +12 -1
  439. package/src/integrations/installations-store.ts +30 -0
  440. package/src/integrations/plugin.ts +5 -5
  441. package/src/integrations/types.ts +7 -0
  442. package/src/integrations/webhook-handler.ts +24 -1
  443. package/src/jobs/background-automation-runner.ts +38 -1
  444. package/src/provider-api/index.ts +8 -2
  445. package/src/scripts/call-agent.ts +6 -0
  446. package/src/server/agent-chat-plugin.ts +46 -10
  447. package/src/server/agent-discovery.ts +2 -0
  448. package/src/server/builder-design-systems.ts +21 -0
  449. package/src/server/credential-provider.ts +51 -12
  450. package/src/server/index.ts +1 -0
  451. package/src/server/onboarding-html.ts +37 -2
  452. package/src/shared/reasoning-effort.ts +1 -1
  453. package/src/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  454. package/src/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  455. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  456. package/corpus/templates/clips/desktop/src/lib/media-device-selection.ts +0 -157
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-30
4
+ ---
5
+
6
+ Meeting microphone transcription works reliably from the first start.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ The Agent Native logo stays visible when the sidebar is collapsed and toggles the sidebar when clicked.
@@ -13,7 +13,7 @@ import {
13
13
  isPseudoMediaDeviceId,
14
14
  isSelectableAudioInputDevice,
15
15
  normalizedMediaDeviceId,
16
- } from "../lib/media-device-selection";
16
+ } from "../../../shared/media-device-selection";
17
17
  import {
18
18
  isHardCapturePermissionError,
19
19
  MACOS_CAPTURE_PERMISSION_MESSAGE,
@@ -3,7 +3,7 @@ import {
3
3
  enumerateAudioInputDevices,
4
4
  isLikelyPhoneMicLabel,
5
5
  type AudioInputFallback,
6
- } from "./media-device-selection";
6
+ } from "../../../shared/media-device-selection";
7
7
 
8
8
  export const VOICE_FOCUSED_AUDIO_CONSTRAINTS: MediaTrackConstraints = {
9
9
  echoCancellation: { ideal: true },
@@ -2743,6 +2743,19 @@ fn extract_interleaved_stereo(
2743
2743
  Some((out, pts_seconds))
2744
2744
  }
2745
2745
 
2746
+ pub(crate) fn extract_mono_audio(
2747
+ sample: &screencapturekit::cm::CMSampleBuffer,
2748
+ label: &str,
2749
+ ) -> Option<Vec<f32>> {
2750
+ let (interleaved, _) = extract_interleaved_stereo(sample, label)?;
2751
+ Some(
2752
+ interleaved
2753
+ .chunks_exact(2)
2754
+ .map(|channels| (channels[0] + channels[1]) * 0.5)
2755
+ .collect(),
2756
+ )
2757
+ }
2758
+
2746
2759
  /// Record whether decoded source PCM contains a real signal before it reaches
2747
2760
  /// the timeline mixer. This distinguishes capture/format failures from mixer
2748
2761
  /// or writer failures without persisting any audio content.
@@ -128,6 +128,8 @@ const NATIVE_CAPTURE_FPS: u32 = 24;
128
128
  #[cfg(target_os = "macos")]
129
129
  mod custom_capture;
130
130
  #[cfg(target_os = "macos")]
131
+ pub(crate) use custom_capture::extract_mono_audio;
132
+ #[cfg(target_os = "macos")]
131
133
  use custom_capture::{
132
134
  prepare_clip_sink, start_custom_screencapturekit_backend_at, ClosedSegmentFile,
133
135
  CustomCaptureResume, CustomScreenCaptureWriter, PreparedClipSink, SegmentFence,
@@ -11,8 +11,8 @@
11
11
  //! renderer's `LiveTranscript` tagged `source: "system"`.
12
12
  //!
13
13
  //! Uses the safe `screencapturekit` Rust crate. Its `SCStreamOutputTrait`
14
- //! callback hands us a `CMSampleBuffer` per audio frame; SCK delivers stereo
15
- //! 48 kHz float, which we mono-mix on the way out.
14
+ //! callback hands us a `CMSampleBuffer` per audio frame; each source is decoded
15
+ //! from its advertised format, normalized to 48 kHz, and mono-mixed.
16
16
  //!
17
17
  //! ## Tauri commands
18
18
  //!
@@ -163,9 +163,6 @@ pub(crate) mod macos {
163
163
  use std::sync::Arc;
164
164
  use std::time::Duration;
165
165
 
166
- use objc2::rc::Retained;
167
- use objc2::AnyThread;
168
- use objc2_avf_audio::{AVAudioFormat, AVAudioPCMBuffer};
169
166
  use objc2_foundation::NSProcessInfo;
170
167
  use serde::Serialize;
171
168
  use tauri::{AppHandle, Emitter};
@@ -260,7 +257,6 @@ pub(crate) mod macos {
260
257
  // ----------------------------------------------------------------------
261
258
  struct RawAudioForwarder {
262
259
  on_samples: Arc<dyn Fn(&[f32]) + Send + Sync>,
263
- speech_format: Retained<AVAudioFormat>,
264
260
  app: AppHandle,
265
261
  cancelled: Arc<AtomicBool>,
266
262
  level_tick: Arc<AtomicU32>,
@@ -268,10 +264,8 @@ pub(crate) mod macos {
268
264
  source: &'static str,
269
265
  }
270
266
 
271
- // SAFETY: `Retained<SFSpeech*>` and `Retained<AVAudioFormat>` wrap
272
- // refcounted ObjC objects that Apple documents as message-thread-safe.
273
- // SCK calls our handler from its own dispatch queue; we never alias
274
- // these via `&` across threads.
267
+ // SAFETY: SCK calls this handler from its dispatch queue; all shared
268
+ // fields are immutable handles or atomics.
275
269
  unsafe impl Send for RawAudioForwarder {}
276
270
  unsafe impl Sync for RawAudioForwarder {}
277
271
 
@@ -287,30 +281,30 @@ pub(crate) mod macos {
287
281
  if self.cancelled.load(Ordering::SeqCst) {
288
282
  return;
289
283
  }
290
- let Some(buf) = build_pcm_buffer_from_sample(&sample_buffer, &self.speech_format)
284
+ let Some(samples) =
285
+ crate::native_screen::extract_mono_audio(&sample_buffer, self.source)
291
286
  else {
292
287
  return;
293
288
  };
294
- // Hand channel 0 (mono mix) to the callback continuously — no level
295
- // gate, so the Whisper buffer stays a contiguous stream.
296
- let frames = unsafe { buf.frameLength() } as usize;
297
- if frames > 0 {
298
- let ch_ptr = unsafe { buf.floatChannelData() };
299
- if !ch_ptr.is_null() {
300
- let slice = unsafe { std::slice::from_raw_parts((*ch_ptr).as_ptr(), frames) };
301
- (self.on_samples)(slice);
302
- }
303
- let n = self.level_tick.fetch_add(1, Ordering::Relaxed);
304
- if n % 3 == 0 {
305
- let level = crate::native_speech::macos::peak_level_for_pcm(&buf);
306
- let _ = self.app.emit(
307
- "voice:audio-level",
308
- AudioLevelPayload {
309
- level,
310
- source: self.source,
311
- },
312
- );
313
- }
289
+ if samples.is_empty() {
290
+ return;
291
+ }
292
+ (self.on_samples)(&samples);
293
+ let n = self.level_tick.fetch_add(1, Ordering::Relaxed);
294
+ if n % 3 == 0 {
295
+ let level = samples
296
+ .iter()
297
+ .copied()
298
+ .map(f32::abs)
299
+ .fold(0.0_f32, f32::max)
300
+ .min(1.0);
301
+ let _ = self.app.emit(
302
+ "voice:audio-level",
303
+ AudioLevelPayload {
304
+ level,
305
+ source: self.source,
306
+ },
307
+ );
314
308
  }
315
309
  }
316
310
  }
@@ -448,19 +442,11 @@ pub(crate) mod macos {
448
442
  );
449
443
  }
450
444
 
451
- // Mono float32 @ 48 kHz destination format for the mono-mix.
452
- let speech_format = unsafe {
453
- let allocated = AVAudioFormat::alloc();
454
- AVAudioFormat::initStandardFormatWithSampleRate_channels(allocated, 48000.0, 1)
455
- }
456
- .ok_or_else(|| "AVAudioFormat init failed for raw system capture".to_string())?;
457
-
458
445
  let cancelled = Arc::new(AtomicBool::new(false));
459
446
  let mut stream = SCStream::new(&filter, &config);
460
447
  if let Some(on_samples) = on_system_samples {
461
448
  let forwarder = RawAudioForwarder {
462
449
  on_samples,
463
- speech_format: speech_format.clone(),
464
450
  app: app.clone(),
465
451
  cancelled: cancelled.clone(),
466
452
  level_tick: Arc::new(AtomicU32::new(0)),
@@ -472,7 +458,6 @@ pub(crate) mod macos {
472
458
  if let Some(on_samples) = on_mic_samples {
473
459
  let forwarder = RawAudioForwarder {
474
460
  on_samples,
475
- speech_format,
476
461
  app: app.clone(),
477
462
  cancelled: cancelled.clone(),
478
463
  level_tick: Arc::new(AtomicU32::new(0)),
@@ -495,96 +480,4 @@ pub(crate) mod macos {
495
480
  level: f32,
496
481
  source: &'static str,
497
482
  }
498
-
499
- /// Pull the PCM bytes out of a SCK CMSampleBuffer and copy them into a
500
- /// freshly-allocated AVAudioPCMBuffer matching `speech_format`
501
- /// (single-channel float32 at the SCK sample rate). SCK delivers stereo
502
- /// non-interleaved float32 by default — we mono-mix by averaging the
503
- /// two channels. Returns `None` if the sample buffer's audio layout
504
- /// can't be interpreted (rare; only happens if SCK changes its output
505
- /// shape mid-stream).
506
- fn build_pcm_buffer_from_sample(
507
- sample: &CMSampleBuffer,
508
- speech_format: &AVAudioFormat,
509
- ) -> Option<Retained<AVAudioPCMBuffer>> {
510
- let num_samples = sample.num_samples();
511
- if num_samples == 0 {
512
- return None;
513
- }
514
- let abl = sample.audio_buffer_list()?;
515
- let n_buffers = abl.num_buffers();
516
- if n_buffers == 0 {
517
- return None;
518
- }
519
-
520
- // Allocate the destination buffer.
521
- // SAFETY: standard AVAudioPCMBuffer init; we control the format and
522
- // capacity.
523
- #[allow(clippy::cast_possible_truncation)]
524
- let frame_capacity = num_samples as u32;
525
- let allocated = AVAudioPCMBuffer::alloc();
526
- let dest = unsafe {
527
- AVAudioPCMBuffer::initWithPCMFormat_frameCapacity(
528
- allocated,
529
- speech_format,
530
- frame_capacity,
531
- )
532
- }?;
533
- unsafe { dest.setFrameLength(frame_capacity) };
534
-
535
- // SAFETY: the format is the one we constructed below — float, mono,
536
- // non-interleaved — so `floatChannelData` is non-null and points at
537
- // `channelCount=1` pointers, each to `frame_capacity` floats.
538
- let dest_ch_ptr = unsafe { dest.floatChannelData() };
539
- if dest_ch_ptr.is_null() {
540
- return None;
541
- }
542
- let dest_slice =
543
- unsafe { std::slice::from_raw_parts_mut((*dest_ch_ptr).as_ptr(), num_samples) };
544
-
545
- if n_buffers >= 2 {
546
- // Stereo non-interleaved — average the two channels.
547
- let l = abl.get(0)?;
548
- let r = abl.get(1)?;
549
- let l_bytes = l.data();
550
- let r_bytes = r.data();
551
- // Treat as f32 little-endian (host byte order on every Apple
552
- // platform we ship).
553
- let l_floats = bytes_as_f32(l_bytes);
554
- let r_floats = bytes_as_f32(r_bytes);
555
- let n = num_samples.min(l_floats.len()).min(r_floats.len());
556
- for i in 0..n {
557
- dest_slice[i] = 0.5 * (l_floats[i] + r_floats[i]);
558
- }
559
- for v in dest_slice.iter_mut().take(num_samples).skip(n) {
560
- *v = 0.0;
561
- }
562
- } else {
563
- // Mono — just copy.
564
- let only = abl.get(0)?;
565
- let src = bytes_as_f32(only.data());
566
- let n = num_samples.min(src.len());
567
- dest_slice[..n].copy_from_slice(&src[..n]);
568
- for v in dest_slice.iter_mut().take(num_samples).skip(n) {
569
- *v = 0.0;
570
- }
571
- }
572
-
573
- Some(dest)
574
- }
575
-
576
- /// Reinterpret a `&[u8]` as `&[f32]`. Length is rounded down to the
577
- /// nearest multiple of 4. Safe because `f32` has no invalid
578
- /// bit-patterns and the caller only uses the elements they're
579
- /// indexing into.
580
- fn bytes_as_f32(b: &[u8]) -> &[f32] {
581
- let n = b.len() / 4;
582
- if n == 0 {
583
- return &[];
584
- }
585
- // SAFETY: `f32` is plain old data with alignment 4; CoreAudio's
586
- // AudioBuffer pointers are 16-byte aligned in practice. We cap the
587
- // length at `n` so we never read past the end.
588
- unsafe { std::slice::from_raw_parts(b.as_ptr().cast::<f32>(), n) }
589
- }
590
483
  }
@@ -1617,6 +1617,38 @@ export function DocumentSidebar({
1617
1617
  className={collapsed ? "size-8" : "h-8 min-w-0"}
1618
1618
  />
1619
1619
  );
1620
+ const brandButton = (isCollapsed: boolean) => (
1621
+ <button
1622
+ type="button"
1623
+ onClick={onToggleCollapsed}
1624
+ aria-label={isCollapsed ? t("sidebar.expand") : t("sidebar.collapse")}
1625
+ className={cn(
1626
+ "flex items-center gap-2 rounded outline-none text-foreground transition-colors hover:bg-accent/50 focus-visible:ring-2 focus-visible:ring-ring",
1627
+ isCollapsed ? "size-8 justify-center" : "min-w-0 text-start",
1628
+ )}
1629
+ data-sidebar-brand-toggle
1630
+ >
1631
+ <img
1632
+ src={appPath("/agent-native-icon-light.svg")}
1633
+ alt=""
1634
+ aria-hidden="true"
1635
+ width={28}
1636
+ height={16}
1637
+ className="block h-4 w-7 shrink-0 object-contain object-center dark:hidden"
1638
+ />
1639
+ <img
1640
+ src={appPath("/agent-native-icon-dark.svg")}
1641
+ alt=""
1642
+ aria-hidden="true"
1643
+ width={28}
1644
+ height={16}
1645
+ className="hidden h-4 w-7 shrink-0 object-contain object-center dark:block"
1646
+ />
1647
+ {!isCollapsed && (
1648
+ <span className="text-base font-semibold tracking-tight">Content</span>
1649
+ )}
1650
+ </button>
1651
+ );
1620
1652
 
1621
1653
  const toggleSection = (id: SidebarSectionId) => {
1622
1654
  setStoredCollapsedSections((current) => {
@@ -2118,6 +2150,7 @@ export function DocumentSidebar({
2118
2150
  if (collapsed) {
2119
2151
  return (
2120
2152
  <div className="agent-layout-left-drawer flex h-full w-12 flex-col items-center gap-1 border-e border-border bg-sidebar py-3 transition-[width] duration-200 ease-out">
2153
+ {brandButton(true)}
2121
2154
  {renderCollapsedNewButton()}
2122
2155
  <Tooltip>
2123
2156
  <TooltipTrigger asChild>
@@ -2156,23 +2189,7 @@ export function DocumentSidebar({
2156
2189
  >
2157
2190
  {/* Header */}
2158
2191
  <div className="flex h-12 shrink-0 items-center justify-between border-b border-border px-3">
2159
- <div className="flex items-center gap-2 min-w-0">
2160
- <img
2161
- src={appPath("/agent-native-icon-light.svg")}
2162
- alt=""
2163
- aria-hidden="true"
2164
- className="block h-4 w-auto shrink-0 dark:hidden"
2165
- />
2166
- <img
2167
- src={appPath("/agent-native-icon-dark.svg")}
2168
- alt=""
2169
- aria-hidden="true"
2170
- className="hidden h-4 w-auto shrink-0 dark:block"
2171
- />
2172
- <span className="text-base font-semibold tracking-tight text-foreground">
2173
- Content
2174
- </span>
2175
- </div>
2192
+ {brandButton(false)}
2176
2193
  </div>
2177
2194
 
2178
2195
  {/* Search */}
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ The Agent Native logo stays visible when the sidebar is collapsed and toggles the sidebar when clicked.
@@ -30,6 +30,7 @@ Design systems are stored in the `design_systems` SQL table. Each has:
30
30
  - `is_default` — boolean, whether this is the user's default design system
31
31
  - `owner_email` — auto-set from session
32
32
  - `org_id` — organization scope
33
+ - `visibility` — defaults to `org` inside an organization, otherwise `private`
33
34
 
34
35
  ### DesignSystemData Schema
35
36
 
@@ -125,7 +126,9 @@ brand's actual extracted fonts) rather than defaulting to Space Grotesk/DM
125
126
  Sans every time; that pairing is this skill's own most common convergence
126
127
  fingerprint.
127
128
 
128
- If this is the user's first design system, it is automatically set as the default.
129
+ If this is the user's first design system in the active organization, it is
130
+ automatically set as the default. Organization-scoped systems are shared with
131
+ that organization by default.
129
132
 
130
133
  ### Starting from an established public system
131
134
 
@@ -175,7 +178,8 @@ Only provided fields are updated. You can also update `--title`, `--description`
175
178
  pnpm action set-default-design-system --id <id>
176
179
  ```
177
180
 
178
- Unsets any previously-default design system for this user.
181
+ Pass `--isDefault false` to clear the current default. Setting a system as the
182
+ default unsets the previous default in the same user and organization scope.
179
183
 
180
184
  ## Multi-Source Import Flow
181
185
 
@@ -3808,7 +3808,12 @@ export const editorChromeBridgeScript: string = `"use strict";
3808
3808
  'input, textarea, select, [contenteditable], [role="textbox"], [data-agent-native-text-editing]'
3809
3809
  );
3810
3810
  }
3811
+ function isShowShortcutsChord(e) {
3812
+ if (!(e.metaKey || e.ctrlKey) || !e.shiftKey || e.altKey) return false;
3813
+ return e.key === "?" || e.key === "/";
3814
+ }
3811
3815
  function shouldForwardDesignHotkey(e) {
3816
+ if (isShowShortcutsChord(e)) return true;
3812
3817
  if (readOnly) return false;
3813
3818
  if (activeTextEditEl || isEditorTypingTarget(e.target) || e.isComposing)
3814
3819
  return false;
@@ -166,6 +166,7 @@ export default defineAction({
166
166
  isDefault,
167
167
  ownerEmail,
168
168
  orgId,
169
+ visibility: orgId ? "org" : "private",
169
170
  createdAt: now,
170
171
  updatedAt: now,
171
172
  });
@@ -11,11 +11,16 @@ import { getDb, schema } from "../server/db/index.js";
11
11
 
12
12
  export default defineAction({
13
13
  description:
14
- "Set a design system as the default. Unsets any previously-default design system for this user.",
14
+ "Set or unset a design system as the default for the current user and organization.",
15
15
  schema: z.object({
16
16
  id: z.string().describe("Design system ID to set as default"),
17
+ isDefault: z
18
+ .boolean()
19
+ .optional()
20
+ .default(true)
21
+ .describe("Whether this design system should be the default"),
17
22
  }),
18
- run: async ({ id }) => {
23
+ run: async ({ id, isDefault = true }) => {
19
24
  await assertAccess("design-system", id, "editor");
20
25
 
21
26
  const db = getDb();
@@ -26,42 +31,45 @@ export default defineAction({
26
31
  const orgId = getRequestOrgId();
27
32
 
28
33
  const [target] = await db
29
- .select({ ownerEmail: schema.designSystems.ownerEmail })
34
+ .select({
35
+ ownerEmail: schema.designSystems.ownerEmail,
36
+ orgId: schema.designSystems.orgId,
37
+ })
30
38
  .from(schema.designSystems)
31
39
  .where(eq(schema.designSystems.id, id))
32
40
  .limit(1);
33
41
 
34
- if (target?.ownerEmail !== userEmail) {
42
+ if (
43
+ target?.ownerEmail !== userEmail ||
44
+ (target.orgId ?? null) !== (orgId ?? null)
45
+ ) {
35
46
  throw new Error("Only the owner can set a design system as default");
36
47
  }
37
48
 
38
49
  await db.transaction(async (tx) => {
39
- await tx
40
- .update(schema.designSystems)
41
- .set({ isDefault: false, updatedAt: now })
42
- .where(
43
- orgId
44
- ? and(
45
- eq(schema.designSystems.ownerEmail, userEmail),
46
- eq(schema.designSystems.orgId, orgId),
47
- )
48
- : and(
49
- eq(schema.designSystems.ownerEmail, userEmail),
50
- isNull(schema.designSystems.orgId),
51
- ),
52
- );
50
+ const targetScope = orgId
51
+ ? and(
52
+ eq(schema.designSystems.ownerEmail, userEmail),
53
+ eq(schema.designSystems.orgId, orgId),
54
+ )
55
+ : and(
56
+ eq(schema.designSystems.ownerEmail, userEmail),
57
+ isNull(schema.designSystems.orgId),
58
+ );
59
+
60
+ if (isDefault) {
61
+ await tx
62
+ .update(schema.designSystems)
63
+ .set({ isDefault: false, updatedAt: now })
64
+ .where(targetScope);
65
+ }
53
66
 
54
67
  await tx
55
68
  .update(schema.designSystems)
56
- .set({ isDefault: true, updatedAt: now })
57
- .where(
58
- and(
59
- eq(schema.designSystems.id, id),
60
- eq(schema.designSystems.ownerEmail, userEmail),
61
- ),
62
- );
69
+ .set({ isDefault, updatedAt: now })
70
+ .where(and(eq(schema.designSystems.id, id), targetScope));
63
71
  });
64
72
 
65
- return { id, isDefault: true };
73
+ return { id, isDefault };
66
74
  },
67
75
  });
@@ -25,6 +25,7 @@ import {
25
25
  } from "@/components/design/keyboard-shortcuts";
26
26
  import { Button } from "@/components/ui/button";
27
27
  import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
28
+ import { isApplePlatform } from "@/hooks/useDesignHotkeys";
28
29
 
29
30
  interface KeyboardShortcutsPanelProps {
30
31
  onClose: () => void;
@@ -113,9 +114,10 @@ function KeycapGroup({
113
114
 
114
115
  function ShortcutBindings({ bindings }: { bindings: readonly string[] }) {
115
116
  const t = useT();
116
- const applePlatform =
117
- typeof navigator !== "undefined" &&
118
- /Mac|iPhone|iPad/.test(navigator.platform);
117
+ // Shared with the hotkey matcher: navigator.platform alone is deprecated and
118
+ // blank in some browsers, which labelled Ctrl on Macs that the hotkey layer
119
+ // already treated as Apple.
120
+ const applePlatform = isApplePlatform();
119
121
  const accessibleBindings = bindings.map((binding) =>
120
122
  binding
121
123
  .split("+")
@@ -5101,7 +5101,23 @@ declare var __SELECTED_LAYER_DRAG_PRIORITY__: boolean;
5101
5101
  );
5102
5102
  }
5103
5103
 
5104
+ function isShowShortcutsChord(e) {
5105
+ if (!(e.metaKey || e.ctrlKey) || !e.shiftKey || e.altKey) return false;
5106
+ // macOS delivers Control+Shift+/ as "/" — Control suppresses the shifted
5107
+ // character — while Windows sends "?". Match both; see
5108
+ // isShowKeyboardShortcutsHotkey in useDesignHotkeys.ts.
5109
+ return e.key === "?" || e.key === "/";
5110
+ }
5111
+
5104
5112
  function shouldForwardDesignHotkey(e) {
5113
+ // Shortcut help is not an editing affordance, so it forwards ahead of the
5114
+ // read-only and typing guards below — the host matcher is deliberately
5115
+ // global for the same reason. Without this the chord never escapes the
5116
+ // canvas iframe, which is where focus lands the moment you click a frame.
5117
+ // Not reached during a live text-edit session: that block returns before
5118
+ // this function runs, deliberately — see the activeTextEditEl guard in
5119
+ // the keydown listener.
5120
+ if (isShowShortcutsChord(e)) return true;
5105
5121
  // Read-only surfaces (e.g. background/inactive board screens) must never
5106
5122
  // forward edit hotkeys or preventDefault() native browser shortcuts —
5107
5123
  // Escape/Enter/Tab/Delete/arrow-key/undo-redo forwarding is an editing
@@ -11092,6 +11108,13 @@ declare var __SELECTED_LAYER_DRAG_PRIORITY__: boolean;
11092
11108
  }
11093
11109
  // While a live session exists, never forward hotkeys to the host
11094
11110
  // (matches shouldForwardDesignHotkey's activeTextEditEl guard).
11111
+ // The shortcut-help chord is deliberately included in that exclusion:
11112
+ // the panel lives in the parent document, so opening it moves focus
11113
+ // out of the iframe, blurs the editable and commits the in-progress
11114
+ // edit. Ending someone's text entry to show help is a worse trade
11115
+ // than help being unavailable for the duration of a typing session;
11116
+ // it stays available everywhere else, including while a text layer is
11117
+ // merely selected.
11095
11118
  return;
11096
11119
  }
11097
11120
  if (!shouldForwardDesignHotkey(e)) return;
@@ -49,6 +49,9 @@ export const DESIGN_SHORTCUTS: readonly DesignShortcutDefinition[] = [
49
49
  shortcut({
50
50
  id: "show-shortcuts",
51
51
  category: "essential",
52
+ // Literal ctrl, not $mod: on macOS ⌘⇧? is the system Help-menu shortcut and
53
+ // the browser consumes it before the page sees it, so ⌃⇧? is the only
54
+ // pressable binding there. Do not "fix" this to $mod.
52
55
  bindings: ["ctrl+shift+?"],
53
56
  labelKey: "designEditor.keyboardShortcuts.commands.showShortcuts",
54
57
  handler: "onShowKeyboardShortcuts",
@@ -124,25 +124,42 @@ export function Sidebar() {
124
124
  collapsed ? "justify-center px-2" : "justify-between px-4",
125
125
  )}
126
126
  >
127
- <div className="flex items-center gap-2">
127
+ <button
128
+ type="button"
129
+ onClick={() => setCollapsed((value) => !value)}
130
+ aria-label={
131
+ collapsed
132
+ ? t("navigation.expandSidebar")
133
+ : t("navigation.collapseSidebar")
134
+ }
135
+ className={cn(
136
+ "flex items-center gap-2 rounded outline-none focus-visible:ring-2 focus-visible:ring-ring",
137
+ collapsed ? "size-8 justify-center" : "text-start",
138
+ )}
139
+ data-sidebar-brand-toggle
140
+ >
128
141
  <img
129
142
  src={appPath("/agent-native-icon-light.svg")}
130
143
  alt=""
131
144
  aria-hidden="true"
132
- className="block h-4 w-auto dark:hidden"
145
+ width={28}
146
+ height={16}
147
+ className="block h-4 w-7 shrink-0 object-contain object-center dark:hidden"
133
148
  />
134
149
  <img
135
150
  src={appPath("/agent-native-icon-dark.svg")}
136
151
  alt=""
137
152
  aria-hidden="true"
138
- className="hidden h-4 w-auto dark:block"
153
+ width={28}
154
+ height={16}
155
+ className="hidden h-4 w-7 shrink-0 object-contain object-center dark:block"
139
156
  />
140
157
  {!collapsed && (
141
158
  <span className="text-sm font-semibold tracking-tight">
142
159
  {t("navigation.brand")}
143
160
  </span>
144
161
  )}
145
- </div>
162
+ </button>
146
163
  </div>
147
164
 
148
165
  <div className="flex min-h-0 flex-1 flex-col overflow-y-auto">
@@ -278,12 +278,16 @@ export function isDesignHotkeyEditableTarget(target: EventTarget | null) {
278
278
  }
279
279
 
280
280
  export function isShowKeyboardShortcutsHotkey(event: KeyboardEvent) {
281
- return (
282
- (event.ctrlKey || event.metaKey) &&
283
- event.shiftKey &&
284
- !event.altKey &&
285
- normalizedKey(event) === "?"
286
- );
281
+ if (!(event.ctrlKey || event.metaKey) || !event.shiftKey || event.altKey) {
282
+ return false;
283
+ }
284
+ // macOS never sends "?" for this chord: holding Control suppresses the
285
+ // shifted character, so Control+Shift+/ arrives as key "/" while Windows
286
+ // sends "?". Matching only "?" left Macs with no pressable combination —
287
+ // the obvious ⌘⇧? alternative is the system Help-menu shortcut and the
288
+ // browser consumes it before the page ever sees it.
289
+ const key = normalizedKey(event);
290
+ return key === "?" || key === "/";
287
291
  }
288
292
 
289
293
  function isFocusableChromeTarget(target: EventTarget | null) {
@@ -779,7 +783,7 @@ const ALT_CODE_KEYS: Record<string, string> = {
779
783
  BracketLeft: "[",
780
784
  };
781
785
 
782
- function isApplePlatform() {
786
+ export function isApplePlatform() {
783
787
  if (typeof navigator === "undefined") return false;
784
788
  const userAgentDataPlatform = (
785
789
  navigator as Navigator & {