@agent-native/core 0.132.2 → 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 (436) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +161 -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/cli/templates-meta.ts +13 -0
  19. package/corpus/core/src/cli/workspace-dev.ts +1 -0
  20. package/corpus/core/src/client/error-format.ts +12 -0
  21. package/corpus/core/src/credentials/index.ts +51 -12
  22. package/corpus/core/src/extensions/url-safety.ts +46 -12
  23. package/corpus/core/src/integrations/adapters/slack.ts +32 -10
  24. package/corpus/core/src/integrations/google-docs-poller.ts +12 -1
  25. package/corpus/core/src/integrations/installations-store.ts +30 -0
  26. package/corpus/core/src/integrations/plugin.ts +5 -5
  27. package/corpus/core/src/integrations/types.ts +7 -0
  28. package/corpus/core/src/integrations/webhook-handler.ts +24 -1
  29. package/corpus/core/src/jobs/background-automation-runner.ts +38 -1
  30. package/corpus/core/src/provider-api/index.ts +8 -2
  31. package/corpus/core/src/scripts/call-agent.ts +6 -0
  32. package/corpus/core/src/server/agent-chat-plugin.ts +30 -9
  33. package/corpus/core/src/server/agent-discovery.ts +2 -0
  34. package/corpus/core/src/server/builder-design-systems.ts +21 -0
  35. package/corpus/core/src/server/credential-provider.ts +51 -12
  36. package/corpus/core/src/server/index.ts +1 -0
  37. package/corpus/core/src/server/onboarding-html.ts +37 -2
  38. package/corpus/core/src/shared/reasoning-effort.ts +1 -1
  39. package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  40. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +6 -2
  41. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +39 -19
  42. package/corpus/templates/assets/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  43. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +30 -3
  44. package/corpus/templates/brain/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  45. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  46. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +54 -25
  47. package/corpus/templates/calendar/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  48. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  49. package/corpus/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  50. package/corpus/templates/clips/app/components/library/library-layout.tsx +37 -21
  51. package/corpus/templates/clips/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  52. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +1 -1
  53. package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +1 -1
  54. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +34 -17
  55. package/corpus/templates/content/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  56. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +6 -2
  57. package/corpus/templates/design/actions/create-design-system.ts +1 -0
  58. package/corpus/templates/design/actions/set-default-design-system.ts +34 -26
  59. package/corpus/templates/design/app/components/layout/Sidebar.tsx +21 -4
  60. package/corpus/templates/design/app/i18n-data.ts +39 -0
  61. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +229 -12
  62. package/corpus/templates/design/app/pages/DesignSystems.tsx +10 -4
  63. package/corpus/templates/design/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  64. package/corpus/templates/design/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
  65. package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +19 -4
  66. package/corpus/templates/dispatch/AGENTS.md +4 -0
  67. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +562 -0
  68. package/corpus/templates/factory/.agents/skills/adding-a-feature/SKILL.md +198 -0
  69. package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +115 -0
  70. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +182 -0
  71. package/corpus/templates/factory/.agents/skills/capture-learnings/SKILL.md +89 -0
  72. package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +221 -0
  73. package/corpus/templates/factory/.agents/skills/customizing-agent-native/SKILL.md +220 -0
  74. package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +263 -0
  75. package/corpus/templates/factory/.agents/skills/factory-graphs/SKILL.md +52 -0
  76. package/corpus/templates/factory/.agents/skills/feature-flags/SKILL.md +169 -0
  77. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +174 -0
  78. package/corpus/templates/factory/.agents/skills/real-time-sync/SKILL.md +232 -0
  79. package/corpus/templates/factory/.agents/skills/security/SKILL.md +324 -0
  80. package/corpus/templates/factory/.agents/skills/self-modifying-code/SKILL.md +119 -0
  81. package/corpus/templates/factory/.agents/skills/shadcn-ui/SKILL.md +123 -0
  82. package/corpus/templates/factory/.agents/skills/sharing/SKILL.md +232 -0
  83. package/corpus/templates/factory/.agents/skills/storing-data/SKILL.md +178 -0
  84. package/corpus/templates/factory/.agents/skills/upgrade-agent-native/SKILL.md +122 -0
  85. package/corpus/templates/factory/.env.example +24 -0
  86. package/corpus/templates/factory/.ignore +0 -0
  87. package/corpus/templates/factory/.oxfmtrc.json +8 -0
  88. package/corpus/templates/factory/AGENTS.md +90 -0
  89. package/corpus/templates/factory/CHANGELOG.md +10 -0
  90. package/corpus/templates/factory/DEVELOPING.md +185 -0
  91. package/corpus/templates/factory/README.md +64 -0
  92. package/corpus/templates/factory/_gitignore +42 -0
  93. package/corpus/templates/factory/actions/add-factory-comment.ts +55 -0
  94. package/corpus/templates/factory/actions/approve-factory-item.ts +214 -0
  95. package/corpus/templates/factory/actions/babysit-pull-request.ts +126 -0
  96. package/corpus/templates/factory/actions/evaluate-triage-item.ts +172 -0
  97. package/corpus/templates/factory/actions/get-factory-graph.ts +62 -0
  98. package/corpus/templates/factory/actions/get-triage-config.ts +42 -0
  99. package/corpus/templates/factory/actions/get-triage-item.ts +74 -0
  100. package/corpus/templates/factory/actions/hello.ts +13 -0
  101. package/corpus/templates/factory/actions/ingest-github-observation.ts +100 -0
  102. package/corpus/templates/factory/actions/list-factories.ts +40 -0
  103. package/corpus/templates/factory/actions/list-factory-comments.ts +40 -0
  104. package/corpus/templates/factory/actions/list-triage-items.ts +85 -0
  105. package/corpus/templates/factory/actions/list-triage-rules.ts +44 -0
  106. package/corpus/templates/factory/actions/navigate.ts +41 -0
  107. package/corpus/templates/factory/actions/poll-slack-channel.ts +118 -0
  108. package/corpus/templates/factory/actions/reconcile-triage-run.ts +179 -0
  109. package/corpus/templates/factory/actions/record-triage-feedback.ts +58 -0
  110. package/corpus/templates/factory/actions/run.ts +2 -0
  111. package/corpus/templates/factory/actions/save-factory-graph.ts +129 -0
  112. package/corpus/templates/factory/actions/save-triage-config.ts +67 -0
  113. package/corpus/templates/factory/actions/save-triage-rule.ts +89 -0
  114. package/corpus/templates/factory/actions/suggest-factory-rules.ts +70 -0
  115. package/corpus/templates/factory/actions/view-screen.ts +73 -0
  116. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +441 -0
  117. package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +388 -0
  118. package/corpus/templates/factory/app/components/layout/Header.tsx +60 -0
  119. package/corpus/templates/factory/app/components/layout/Layout.tsx +190 -0
  120. package/corpus/templates/factory/app/components/layout/Sidebar.tsx +538 -0
  121. package/corpus/templates/factory/app/components/triage/triage-status-pill.tsx +28 -0
  122. package/corpus/templates/factory/app/components/ui/button.tsx +1 -0
  123. package/corpus/templates/factory/app/components/ui/card.tsx +1 -0
  124. package/corpus/templates/factory/app/components/ui/dropdown-menu.tsx +1 -0
  125. package/corpus/templates/factory/app/components/ui/input.tsx +1 -0
  126. package/corpus/templates/factory/app/components/ui/label.tsx +1 -0
  127. package/corpus/templates/factory/app/components/ui/sheet.tsx +1 -0
  128. package/corpus/templates/factory/app/components/ui/textarea.tsx +1 -0
  129. package/corpus/templates/factory/app/components/ui/toolkit-provider.tsx +17 -0
  130. package/corpus/templates/factory/app/components/ui/tooltip.tsx +1 -0
  131. package/corpus/templates/factory/app/design-system.ts +3 -0
  132. package/corpus/templates/factory/app/entry.client.tsx +22 -0
  133. package/corpus/templates/factory/app/entry.server.tsx +10 -0
  134. package/corpus/templates/factory/app/global.css +93 -0
  135. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +113 -0
  136. package/corpus/templates/factory/app/i18n/en-US.ts +211 -0
  137. package/corpus/templates/factory/app/i18n/index.ts +34 -0
  138. package/corpus/templates/factory/app/i18n-data.ts +556 -0
  139. package/corpus/templates/factory/app/lib/agent-page.tsx +49 -0
  140. package/corpus/templates/factory/app/lib/app-config.ts +11 -0
  141. package/corpus/templates/factory/app/lib/tab-id.ts +1 -0
  142. package/corpus/templates/factory/app/lib/utils.ts +1 -0
  143. package/corpus/templates/factory/app/root.tsx +175 -0
  144. package/corpus/templates/factory/app/routes/_index.tsx +94 -0
  145. package/corpus/templates/factory/app/routes/agent.tsx +24 -0
  146. package/corpus/templates/factory/app/routes/chat.$threadId.tsx +1 -0
  147. package/corpus/templates/factory/app/routes/database.tsx +17 -0
  148. package/corpus/templates/factory/app/routes/extensions.$id.$slug.tsx +2 -0
  149. package/corpus/templates/factory/app/routes/extensions.$id.tsx +11 -0
  150. package/corpus/templates/factory/app/routes/extensions._index.tsx +11 -0
  151. package/corpus/templates/factory/app/routes/extensions.tsx +5 -0
  152. package/corpus/templates/factory/app/routes/factory.tsx +1003 -0
  153. package/corpus/templates/factory/app/routes/observability.tsx +19 -0
  154. package/corpus/templates/factory/app/routes/settings.tsx +89 -0
  155. package/corpus/templates/factory/app/routes/team.tsx +11 -0
  156. package/corpus/templates/factory/app/routes.ts +4 -0
  157. package/corpus/templates/factory/app/vite-env.d.ts +6 -0
  158. package/corpus/templates/factory/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
  159. package/corpus/templates/factory/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
  160. package/corpus/templates/factory/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
  161. package/corpus/templates/factory/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  162. package/corpus/templates/factory/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  163. package/corpus/templates/factory/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  164. package/corpus/templates/factory/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
  165. package/corpus/templates/factory/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  166. package/corpus/templates/factory/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
  167. package/corpus/templates/factory/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
  168. package/corpus/templates/factory/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
  169. package/corpus/templates/factory/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  170. package/corpus/templates/factory/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  171. package/corpus/templates/factory/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  172. package/corpus/templates/factory/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +6 -0
  173. package/corpus/templates/factory/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
  174. package/corpus/templates/factory/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
  175. package/corpus/templates/factory/changelog/2026-07-24-borderless-secondary-surfaces.md +6 -0
  176. package/corpus/templates/factory/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +6 -0
  177. package/corpus/templates/factory/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +6 -0
  178. package/corpus/templates/factory/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  179. package/corpus/templates/factory/changelog/2026-07-31-added-an-inspectable-observe-only-factory-queue-for-slack-.md +6 -0
  180. package/corpus/templates/factory/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  181. package/corpus/templates/factory/components.json +20 -0
  182. package/corpus/templates/factory/data/sync-config.json +1 -0
  183. package/corpus/templates/factory/learnings.defaults.md +5 -0
  184. package/corpus/templates/factory/netlify.toml +10 -0
  185. package/corpus/templates/factory/package.json +105 -0
  186. package/corpus/templates/factory/public/agent-native-icon-dark.svg +10 -0
  187. package/corpus/templates/factory/public/agent-native-icon-light.svg +10 -0
  188. package/corpus/templates/factory/public/agent-native-logo-dark.svg +21 -0
  189. package/corpus/templates/factory/public/agent-native-logo-light.svg +21 -0
  190. package/corpus/templates/factory/public/favicon.svg +1 -0
  191. package/corpus/templates/factory/public/icon-180.svg +1 -0
  192. package/corpus/templates/factory/public/icon-192.svg +1 -0
  193. package/corpus/templates/factory/public/icon-512.svg +1 -0
  194. package/corpus/templates/factory/public/manifest.json +21 -0
  195. package/corpus/templates/factory/react-router.config.ts +7 -0
  196. package/corpus/templates/factory/server/connectors/credentials.ts +129 -0
  197. package/corpus/templates/factory/server/connectors/slack.ts +129 -0
  198. package/corpus/templates/factory/server/db/index.ts +6 -0
  199. package/corpus/templates/factory/server/db/schema.ts +193 -0
  200. package/corpus/templates/factory/server/factory-graph/contracts.ts +212 -0
  201. package/corpus/templates/factory/server/factory-graph/store.ts +121 -0
  202. package/corpus/templates/factory/server/lib/require-workspace-member.ts +55 -0
  203. package/corpus/templates/factory/server/middleware/auth.ts +15 -0
  204. package/corpus/templates/factory/server/plugins/agent-chat.ts +58 -0
  205. package/corpus/templates/factory/server/plugins/auth.ts +14 -0
  206. package/corpus/templates/factory/server/plugins/factory-migrations.ts +247 -0
  207. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +116 -0
  208. package/corpus/templates/factory/server/plugins/integrations.ts +46 -0
  209. package/corpus/templates/factory/server/routes/[...page].get.ts +5 -0
  210. package/corpus/templates/factory/server/routes/_agent-native/factory/builder-callback.post.ts +116 -0
  211. package/corpus/templates/factory/server/triage/ai-services-git.ts +197 -0
  212. package/corpus/templates/factory/server/triage/builder-executor.ts +118 -0
  213. package/corpus/templates/factory/server/triage/contracts.ts +164 -0
  214. package/corpus/templates/factory/server/triage/github-ingestion.ts +35 -0
  215. package/corpus/templates/factory/server/triage/guards.ts +121 -0
  216. package/corpus/templates/factory/server/triage/ids.ts +27 -0
  217. package/corpus/templates/factory/server/triage/pr-babysit.ts +100 -0
  218. package/corpus/templates/factory/server/triage/pr-monitor.ts +220 -0
  219. package/corpus/templates/factory/server/triage/slack-client.ts +55 -0
  220. package/corpus/templates/factory/server/triage/slack-poller.ts +152 -0
  221. package/corpus/templates/factory/ssr-entry.ts +15 -0
  222. package/corpus/templates/factory/tsconfig.json +21 -0
  223. package/corpus/templates/factory/vite.config.ts +19 -0
  224. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +55 -5
  225. package/corpus/templates/forms/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  226. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +6 -2
  227. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +21 -6
  228. package/corpus/templates/plan/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  229. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +12 -0
  230. package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +9 -0
  231. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +11 -0
  232. package/corpus/templates/slides/AGENTS.md +5 -6
  233. package/corpus/templates/slides/actions/_await-fit-check.ts +20 -10
  234. package/corpus/templates/slides/actions/add-slide.ts +17 -4
  235. package/corpus/templates/slides/actions/create-design-system.ts +16 -4
  236. package/corpus/templates/slides/actions/delete-design-system.ts +18 -2
  237. package/corpus/templates/slides/actions/get-layout-overflows.ts +88 -0
  238. package/corpus/templates/slides/actions/import-file.ts +1 -0
  239. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +8 -0
  240. package/corpus/templates/slides/actions/patch-deck.ts +48 -16
  241. package/corpus/templates/slides/actions/set-default-design-system.ts +49 -19
  242. package/corpus/templates/slides/actions/update-slide.ts +13 -3
  243. package/corpus/templates/slides/actions/view-screen.ts +87 -10
  244. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +155 -28
  245. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +21 -17
  246. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +849 -341
  247. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +102 -2
  248. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +13 -16
  249. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +60 -12
  250. package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +11 -1
  251. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +66 -19
  252. package/corpus/templates/slides/app/i18n/en-US.ts +23 -0
  253. package/corpus/templates/slides/app/lib/normalize-slide-padding.ts +8 -15
  254. package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -3
  255. package/corpus/templates/slides/app/pages/DesignSystems.tsx +4 -3
  256. package/corpus/templates/slides/app/pages/Index.tsx +1 -1
  257. package/corpus/templates/slides/changelog/2026-07-31-design-system-details-now-show-their-source-and-indexing-sta.md +6 -0
  258. package/corpus/templates/slides/changelog/2026-07-31-design-system-indexing-keeps-your-chosen-name-when-you-uploa.md +6 -0
  259. package/corpus/templates/slides/changelog/2026-07-31-design-system-setup-keeps-focus-rings-visible-and-uses-a-sim.md +6 -0
  260. package/corpus/templates/slides/changelog/2026-07-31-skip-prompt-is-now-available-in-the-new-deck-prompt-header.md +6 -0
  261. package/corpus/templates/slides/changelog/2026-07-31-slides-now-detect-real-text-and-box-overflow-across-the-deck.md +6 -0
  262. package/corpus/templates/slides/changelog/2026-07-31-the-agent-native-logo-stays-visible-when-the-sidebar-is-coll.md +6 -0
  263. package/corpus/templates/slides/server/handlers/design-systems.ts +1 -0
  264. package/corpus/templates/slides/server/handlers/index-design-system-sources.ts +1 -0
  265. package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +23 -4
  266. package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
  267. package/corpus/templates/slides/server/plugins/creative-context.ts +16 -3
  268. package/corpus/templates/slides/server/workspace-defaults.ts +5 -1
  269. package/corpus/templates/slides/shared/slide-fit.ts +26 -0
  270. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +30 -3
  271. package/corpus/templates/tasks/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  272. package/dist/a2a/correlation.d.ts +4 -1
  273. package/dist/a2a/correlation.d.ts.map +1 -1
  274. package/dist/a2a/correlation.js +8 -1
  275. package/dist/a2a/correlation.js.map +1 -1
  276. package/dist/a2a/types.d.ts +11 -3
  277. package/dist/a2a/types.d.ts.map +1 -1
  278. package/dist/a2a/types.js.map +1 -1
  279. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  280. package/dist/agent/engine/ai-sdk-engine.js +27 -41
  281. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  282. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  283. package/dist/agent/engine/builder-engine.js +18 -8
  284. package/dist/agent/engine/builder-engine.js.map +1 -1
  285. package/dist/agent/engine/error-detail.d.ts +61 -0
  286. package/dist/agent/engine/error-detail.d.ts.map +1 -1
  287. package/dist/agent/engine/error-detail.js +145 -3
  288. package/dist/agent/engine/error-detail.js.map +1 -1
  289. package/dist/agent/engine/failure-taxonomy.d.ts +24 -0
  290. package/dist/agent/engine/failure-taxonomy.d.ts.map +1 -0
  291. package/dist/agent/engine/failure-taxonomy.js +88 -0
  292. package/dist/agent/engine/failure-taxonomy.js.map +1 -0
  293. package/dist/agent/engine/index.d.ts +2 -1
  294. package/dist/agent/engine/index.d.ts.map +1 -1
  295. package/dist/agent/engine/index.js +2 -1
  296. package/dist/agent/engine/index.js.map +1 -1
  297. package/dist/agent/engine/registry.d.ts +16 -0
  298. package/dist/agent/engine/registry.d.ts.map +1 -1
  299. package/dist/agent/engine/registry.js +71 -6
  300. package/dist/agent/engine/registry.js.map +1 -1
  301. package/dist/agent/engine/translate-ai-sdk.d.ts.map +1 -1
  302. package/dist/agent/engine/translate-ai-sdk.js +14 -2
  303. package/dist/agent/engine/translate-ai-sdk.js.map +1 -1
  304. package/dist/agent/production-agent.d.ts.map +1 -1
  305. package/dist/agent/production-agent.js +13 -24
  306. package/dist/agent/production-agent.js.map +1 -1
  307. package/dist/agent/run-loop-with-resume.js +1 -1
  308. package/dist/agent/run-loop-with-resume.js.map +1 -1
  309. package/dist/agent/run-manager.d.ts.map +1 -1
  310. package/dist/agent/run-manager.js +39 -10
  311. package/dist/agent/run-manager.js.map +1 -1
  312. package/dist/agent/run-store.d.ts +10 -0
  313. package/dist/agent/run-store.d.ts.map +1 -1
  314. package/dist/agent/run-store.js +20 -3
  315. package/dist/agent/run-store.js.map +1 -1
  316. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  317. package/dist/agent/thread-data-builder.js +28 -4
  318. package/dist/agent/thread-data-builder.js.map +1 -1
  319. package/dist/cli/templates-meta.d.ts.map +1 -1
  320. package/dist/cli/templates-meta.js +13 -0
  321. package/dist/cli/templates-meta.js.map +1 -1
  322. package/dist/cli/workspace-dev.d.ts.map +1 -1
  323. package/dist/cli/workspace-dev.js +1 -0
  324. package/dist/cli/workspace-dev.js.map +1 -1
  325. package/dist/client/error-format.d.ts.map +1 -1
  326. package/dist/client/error-format.js +10 -0
  327. package/dist/client/error-format.js.map +1 -1
  328. package/dist/collab/awareness.d.ts +2 -2
  329. package/dist/collab/awareness.d.ts.map +1 -1
  330. package/dist/credentials/index.d.ts +9 -2
  331. package/dist/credentials/index.d.ts.map +1 -1
  332. package/dist/credentials/index.js +50 -8
  333. package/dist/credentials/index.js.map +1 -1
  334. package/dist/extensions/url-safety.d.ts.map +1 -1
  335. package/dist/extensions/url-safety.js +38 -12
  336. package/dist/extensions/url-safety.js.map +1 -1
  337. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  338. package/dist/integrations/adapters/slack.js +25 -8
  339. package/dist/integrations/adapters/slack.js.map +1 -1
  340. package/dist/integrations/google-docs-poller.d.ts.map +1 -1
  341. package/dist/integrations/google-docs-poller.js +13 -1
  342. package/dist/integrations/google-docs-poller.js.map +1 -1
  343. package/dist/integrations/installations-store.d.ts +10 -0
  344. package/dist/integrations/installations-store.d.ts.map +1 -1
  345. package/dist/integrations/installations-store.js +24 -0
  346. package/dist/integrations/installations-store.js.map +1 -1
  347. package/dist/integrations/plugin.d.ts.map +1 -1
  348. package/dist/integrations/plugin.js +6 -5
  349. package/dist/integrations/plugin.js.map +1 -1
  350. package/dist/integrations/types.d.ts +7 -0
  351. package/dist/integrations/types.d.ts.map +1 -1
  352. package/dist/integrations/types.js.map +1 -1
  353. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  354. package/dist/integrations/webhook-handler.js +16 -1
  355. package/dist/integrations/webhook-handler.js.map +1 -1
  356. package/dist/jobs/background-automation-runner.d.ts.map +1 -1
  357. package/dist/jobs/background-automation-runner.js +35 -2
  358. package/dist/jobs/background-automation-runner.js.map +1 -1
  359. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  360. package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
  361. package/dist/notifications/routes.d.ts +3 -3
  362. package/dist/observability/routes.d.ts +3 -3
  363. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  364. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  365. package/dist/provider-api/index.js +7 -3
  366. package/dist/provider-api/index.js.map +1 -1
  367. package/dist/scripts/call-agent.d.ts.map +1 -1
  368. package/dist/scripts/call-agent.js +6 -1
  369. package/dist/scripts/call-agent.js.map +1 -1
  370. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  371. package/dist/server/agent-chat-plugin.js +25 -7
  372. package/dist/server/agent-chat-plugin.js.map +1 -1
  373. package/dist/server/agent-discovery.d.ts +2 -0
  374. package/dist/server/agent-discovery.d.ts.map +1 -1
  375. package/dist/server/agent-discovery.js.map +1 -1
  376. package/dist/server/builder-design-systems.d.ts +4 -1
  377. package/dist/server/builder-design-systems.d.ts.map +1 -1
  378. package/dist/server/builder-design-systems.js +11 -1
  379. package/dist/server/builder-design-systems.js.map +1 -1
  380. package/dist/server/credential-provider.d.ts.map +1 -1
  381. package/dist/server/credential-provider.js +49 -12
  382. package/dist/server/credential-provider.js.map +1 -1
  383. package/dist/server/index.d.ts +1 -1
  384. package/dist/server/index.d.ts.map +1 -1
  385. package/dist/server/index.js.map +1 -1
  386. package/dist/server/onboarding-html.d.ts.map +1 -1
  387. package/dist/server/onboarding-html.js +37 -2
  388. package/dist/server/onboarding-html.js.map +1 -1
  389. package/dist/server/transcribe-voice.d.ts +1 -1
  390. package/dist/shared/reasoning-effort.d.ts +1 -0
  391. package/dist/shared/reasoning-effort.d.ts.map +1 -1
  392. package/dist/shared/reasoning-effort.js +1 -1
  393. package/dist/shared/reasoning-effort.js.map +1 -1
  394. package/dist/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  395. package/dist/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  396. package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  397. package/package.json +1 -1
  398. package/src/a2a/correlation.ts +11 -1
  399. package/src/a2a/types.ts +11 -3
  400. package/src/agent/engine/ai-sdk-engine.ts +33 -46
  401. package/src/agent/engine/builder-engine.ts +22 -10
  402. package/src/agent/engine/error-detail.ts +184 -3
  403. package/src/agent/engine/failure-taxonomy.ts +123 -0
  404. package/src/agent/engine/index.ts +8 -0
  405. package/src/agent/engine/registry.ts +92 -8
  406. package/src/agent/engine/translate-ai-sdk.ts +17 -2
  407. package/src/agent/production-agent.ts +13 -33
  408. package/src/agent/run-loop-with-resume.ts +1 -1
  409. package/src/agent/run-manager.ts +43 -14
  410. package/src/agent/run-store.ts +30 -3
  411. package/src/agent/thread-data-builder.ts +36 -4
  412. package/src/cli/templates-meta.ts +13 -0
  413. package/src/cli/workspace-dev.ts +1 -0
  414. package/src/client/error-format.ts +12 -0
  415. package/src/credentials/index.ts +51 -12
  416. package/src/extensions/url-safety.ts +46 -12
  417. package/src/integrations/adapters/slack.ts +32 -10
  418. package/src/integrations/google-docs-poller.ts +12 -1
  419. package/src/integrations/installations-store.ts +30 -0
  420. package/src/integrations/plugin.ts +5 -5
  421. package/src/integrations/types.ts +7 -0
  422. package/src/integrations/webhook-handler.ts +24 -1
  423. package/src/jobs/background-automation-runner.ts +38 -1
  424. package/src/provider-api/index.ts +8 -2
  425. package/src/scripts/call-agent.ts +6 -0
  426. package/src/server/agent-chat-plugin.ts +30 -9
  427. package/src/server/agent-discovery.ts +2 -0
  428. package/src/server/builder-design-systems.ts +21 -0
  429. package/src/server/credential-provider.ts +51 -12
  430. package/src/server/index.ts +1 -0
  431. package/src/server/onboarding-html.ts +37 -2
  432. package/src/shared/reasoning-effort.ts +1 -1
  433. package/src/templates/chat/app/components/layout/Sidebar.tsx +30 -3
  434. package/src/templates/chat/changelog/2026-07-31-clicking-the-agent-native-logo-now-toggles-the-app-sidebar.md +6 -0
  435. package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +11 -0
  436. package/corpus/templates/clips/desktop/src/lib/media-device-selection.ts +0 -157
@@ -603,7 +603,7 @@ export default function Index() {
603
603
  deckId +
604
604
  ". Wait for each `add-slide` result before calling it again; do not batch or parallelize slide writes.",
605
605
  "If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you.",
606
- "Every slide is rendered into a fixed native canvas (default 16:9 is 960x540 CSS pixels). Keep each slide within the density limits in AGENTS.md; split dense source material across more slides instead of packing it tightly.",
606
+ "Every slide is rendered into a fixed native canvas (default 16:9 is 960x540 CSS pixels, with 740x380px available inside standard 80px 110px padding). Keep the main content within that fit budget; split dense source material across more slides instead of packing it tightly. Never use zoom, transform: scale(), clipping, or scroll overflow to hide content overflow, and keep body text at least 16px.",
607
607
  "Each slide's --content must be full HTML. Slide HTML templates are in your AGENTS.md.",
608
608
  "Do NOT use create-deck (the deck already exists). Do NOT call db-schema, the resources tool, or search-files.",
609
609
  ].join("\n");
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Design system details now show their source and indexing status while they load with a clean placeholder.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Design-system indexing keeps your chosen name when you upload a Figma file, supports unstar, and shares new organization systems with teammates.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Design system setup keeps focus rings visible and uses a simpler dialog title.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Skip prompt is now available in the new deck prompt header
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Slides now detect real text and box overflow across the deck and verify bounded repairs.
@@ -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.
@@ -127,6 +127,7 @@ export const createDesignSystem = defineEventHandler(async (event) => {
127
127
  isDefault: body.isDefault ?? false,
128
128
  ownerEmail: email,
129
129
  orgId: orgId ?? null,
130
+ visibility: orgId ? "org" : "private",
130
131
  createdAt: now,
131
132
  updatedAt: now,
132
133
  });
@@ -52,6 +52,7 @@ export const indexDesignSystemSources = defineEventHandler(async (event) => {
52
52
  ownerEmail: email ?? session.email,
53
53
  orgId: orgId ?? null,
54
54
  projectName,
55
+ sourceKind: "figma",
55
56
  });
56
57
  return {
57
58
  ...result,
@@ -2,8 +2,9 @@ import {
2
2
  createBuilderDesignSystemProxyFields,
3
3
  localBuilderDesignSystemId,
4
4
  type BuilderDesignSystemIndexResult,
5
+ type BuilderDesignSystemSourceKind,
5
6
  } from "@agent-native/core/server";
6
- import { eq } from "drizzle-orm";
7
+ import { and, eq, isNull } from "drizzle-orm";
7
8
  import { nanoid } from "nanoid";
8
9
 
9
10
  import { getDb, schema } from "../db/index.js";
@@ -14,12 +15,14 @@ export async function upsertBuilderProxyDesignSystem({
14
15
  orgId,
15
16
  projectName,
16
17
  description,
18
+ sourceKind,
17
19
  }: {
18
20
  result: BuilderDesignSystemIndexResult;
19
21
  ownerEmail: string;
20
22
  orgId?: string | null;
21
23
  projectName?: string;
22
24
  description?: string;
25
+ sourceKind?: BuilderDesignSystemSourceKind;
23
26
  }) {
24
27
  const db = getDb();
25
28
  const now = new Date().toISOString();
@@ -31,20 +34,25 @@ export async function upsertBuilderProxyDesignSystem({
31
34
  projectName,
32
35
  description,
33
36
  surface: "slides",
37
+ sourceKind,
34
38
  });
35
39
  const [existing] = await db
36
40
  .select({
37
41
  id: schema.designSystems.id,
38
42
  ownerEmail: schema.designSystems.ownerEmail,
43
+ orgId: schema.designSystems.orgId,
39
44
  })
40
45
  .from(schema.designSystems)
41
46
  .where(eq(schema.designSystems.id, baseLocalDesignSystemId))
42
47
  .limit(1);
48
+ const existingBelongsToScope =
49
+ existing?.ownerEmail === ownerEmail &&
50
+ (existing?.orgId ?? null) === (orgId ?? null);
43
51
  const localDesignSystemId =
44
- existing && existing.ownerEmail !== ownerEmail
52
+ existing && !existingBelongsToScope
45
53
  ? `${baseLocalDesignSystemId}-${nanoid(8)}`
46
54
  : baseLocalDesignSystemId;
47
- if (existing && existing.ownerEmail === ownerEmail) {
55
+ if (existingBelongsToScope) {
48
56
  await db
49
57
  .update(schema.designSystems)
50
58
  .set({
@@ -60,7 +68,17 @@ export async function upsertBuilderProxyDesignSystem({
60
68
  const [ownedSystem] = await db
61
69
  .select({ id: schema.designSystems.id })
62
70
  .from(schema.designSystems)
63
- .where(eq(schema.designSystems.ownerEmail, ownerEmail))
71
+ .where(
72
+ orgId
73
+ ? and(
74
+ eq(schema.designSystems.ownerEmail, ownerEmail),
75
+ eq(schema.designSystems.orgId, orgId),
76
+ )
77
+ : and(
78
+ eq(schema.designSystems.ownerEmail, ownerEmail),
79
+ isNull(schema.designSystems.orgId),
80
+ ),
81
+ )
64
82
  .limit(1);
65
83
  await db.insert(schema.designSystems).values({
66
84
  id: localDesignSystemId,
@@ -72,6 +90,7 @@ export async function upsertBuilderProxyDesignSystem({
72
90
  isDefault: !ownedSystem,
73
91
  ownerEmail,
74
92
  orgId: orgId ?? null,
93
+ visibility: orgId ? "org" : "private",
75
94
  createdAt: now,
76
95
  updatedAt: now,
77
96
  });
@@ -12,6 +12,7 @@ const SLIDES_BACKGROUND_RUN_SOFT_TIMEOUT_MS = 13 * 60_000;
12
12
 
13
13
  const INITIAL_TOOL_NAMES = [
14
14
  "view-screen",
15
+ "get-layout-overflows",
15
16
  "list-decks",
16
17
  "get-deck",
17
18
  "get-deck-reference-context",
@@ -49,6 +50,10 @@ export default createAgentChatPlugin({
49
50
  prepareRequest: prepareSlidesChatAttachments,
50
51
  systemPrompt: `You are an AI deck assistant. You create, edit, import, export, style, share, and navigate decks through actions and shared application state.
51
52
 
53
+ Layout-fit workflow is strict. When the user asks to fix overflow, first call view-screen and inspect the deck-wide layout-fit section. If it says measurements are unknown, do not claim the deck fits. Call get-layout-overflows when you need the structured per-slide results. Read the affected slides with get-deck, then make one bounded structural repair pass with one patch-slide operation per affected slide in a single patch-deck call. Wait for the action result and verify the persisted HTML with get-deck before saying it is fixed. If a fresh measurement still reports overflow, make at most one focused follow-up repair based on that measurement; never loop, repeatedly re-measure, or claim success after a chat response alone.
54
+
55
+ Fit means the main content fits the native content area. A small outer-wrapper spill is tolerated by the measurement, but cards, text, columns, and other visible content must fit. Never use zoom, transform: scale(), overflow: hidden/scroll, clipping, or a smaller-than-16px body font to hide overflow. Preserve manually positioned freeform objects and their data-slide-object-id values; repair normal-flow structure, copy, gaps, or slide padding instead. A successful action result must include the affected slide IDs; if it does not, report that no verified write occurred.
56
+
52
57
  Provider-specific Slides actions are shortcuts, not limits. If a first-class action cannot express the exact Google Drive endpoint, file metadata field, export format, query, request body, pagination mode, payload shape, or API version needed, call provider-api-catalog and provider-api-docs as needed, then call provider-api-request against the real provider API. Use the raw provider API escape hatch instead of weakening the answer or claiming Slides cannot do something the underlying Google Drive API can do.
53
58
 
54
59
  Slides' Google Drive provider API uses the user's connected Google Docs OAuth account. The drive.file scope is intentionally limited to files the user selected or the app created. For large Drive file lists or metadata sweeps, pass stageAs and pagination options to provider-api-request, then use query-staged-dataset to count, filter, group, or project the staged rows.`,
@@ -9,7 +9,7 @@ import {
9
9
  type CreativeContextProjectionAdapters,
10
10
  } from "@agent-native/creative-context/server";
11
11
  import { listContextSources } from "@agent-native/creative-context/store";
12
- import { desc, eq } from "drizzle-orm";
12
+ import { and, desc, eq, isNull } from "drizzle-orm";
13
13
  import { nanoid } from "nanoid";
14
14
 
15
15
  import { getDb, schema } from "../db/index.js";
@@ -52,10 +52,21 @@ function isProjectedLayout(value: unknown): value is ProjectedLayoutTemplate {
52
52
  async function ownedDesignSystems() {
53
53
  const ownerEmail = getRequestUserEmail();
54
54
  if (!ownerEmail) throw new Error("no authenticated user");
55
+ const orgId = getRequestOrgId();
55
56
  return getDb()
56
57
  .select()
57
58
  .from(schema.designSystems)
58
- .where(eq(schema.designSystems.ownerEmail, ownerEmail))
59
+ .where(
60
+ orgId
61
+ ? and(
62
+ eq(schema.designSystems.ownerEmail, ownerEmail),
63
+ eq(schema.designSystems.orgId, orgId),
64
+ )
65
+ : and(
66
+ eq(schema.designSystems.ownerEmail, ownerEmail),
67
+ isNull(schema.designSystems.orgId),
68
+ ),
69
+ )
59
70
  .orderBy(
60
71
  desc(schema.designSystems.isDefault),
61
72
  desc(schema.designSystems.updatedAt),
@@ -67,6 +78,7 @@ async function ensureLayoutTarget() {
67
78
  if (existing[0]) return existing[0];
68
79
  const ownerEmail = getRequestUserEmail();
69
80
  if (!ownerEmail) throw new Error("no authenticated user");
81
+ const orgId = getRequestOrgId();
70
82
  const now = new Date().toISOString();
71
83
  const row = {
72
84
  id: nanoid(),
@@ -78,7 +90,8 @@ async function ensureLayoutTarget() {
78
90
  "Prefer approved Creative Context layout templates unchanged before adapting or generating a new layout.",
79
91
  isDefault: true,
80
92
  ownerEmail,
81
- orgId: getRequestOrgId(),
93
+ orgId,
94
+ visibility: orgId ? ("org" as const) : ("private" as const),
82
95
  createdAt: now,
83
96
  updatedAt: now,
84
97
  };
@@ -4,7 +4,7 @@ import {
4
4
  getRequestUserEmail,
5
5
  } from "@agent-native/core/server/request-context";
6
6
  import { getOrgSetting, mutateOrgSetting } from "@agent-native/core/settings";
7
- import { and, eq, sql } from "drizzle-orm";
7
+ import { and, eq, isNull, sql } from "drizzle-orm";
8
8
 
9
9
  import { getDb, schema } from "./db/index.js";
10
10
 
@@ -154,6 +154,7 @@ export async function assertWorkspaceVisible(
154
154
  export async function resolveDefaultDesignSystemId(
155
155
  ownerEmail: string,
156
156
  ): Promise<string | null> {
157
+ const orgId = getRequestOrgId();
157
158
  const personal = await getDb()
158
159
  .select({ id: schema.designSystems.id })
159
160
  .from(schema.designSystems)
@@ -161,6 +162,9 @@ export async function resolveDefaultDesignSystemId(
161
162
  and(
162
163
  eq(schema.designSystems.ownerEmail, ownerEmail),
163
164
  eq(schema.designSystems.isDefault, true),
165
+ orgId
166
+ ? eq(schema.designSystems.orgId, orgId)
167
+ : isNull(schema.designSystems.orgId),
164
168
  ),
165
169
  )
166
170
  .limit(1);
@@ -0,0 +1,26 @@
1
+ export interface SlideFitMeasurement {
2
+ contentHash: string;
3
+ contentHeight: number;
4
+ contentWidth: number;
5
+ viewportHeight: number;
6
+ viewportWidth: number;
7
+ verticalOverflow: number;
8
+ horizontalOverflow: number;
9
+ measuredAt: number;
10
+ }
11
+
12
+ export interface DeckFitState {
13
+ deckId: string;
14
+ aspectRatio?: string | null;
15
+ slides: Record<string, SlideFitMeasurement>;
16
+ }
17
+
18
+ /** Stable, compact identity for checking whether a measurement matches HTML. */
19
+ export function hashSlideContent(content: string): string {
20
+ let hash = 2166136261;
21
+ for (let index = 0; index < content.length; index += 1) {
22
+ hash ^= content.charCodeAt(index);
23
+ hash = Math.imul(hash, 16777619);
24
+ }
25
+ return (hash >>> 0).toString(16);
26
+ }
@@ -126,23 +126,50 @@ export function Sidebar({
126
126
  >
127
127
  <Link
128
128
  to="/tasks"
129
+ onClick={(event) => {
130
+ if (
131
+ !collapsible ||
132
+ !onCollapsedChange ||
133
+ event.metaKey ||
134
+ event.ctrlKey ||
135
+ event.shiftKey ||
136
+ event.altKey ||
137
+ event.button !== 0
138
+ ) {
139
+ return;
140
+ }
141
+ event.preventDefault();
142
+ onCollapsedChange(!collapsed);
143
+ }}
129
144
  className={cn(
130
145
  "flex min-w-0 items-center rounded outline-none focus-visible:ring-2 focus-visible:ring-ring",
131
146
  collapsed ? "size-7 justify-center" : "flex-1 gap-3",
132
147
  )}
133
- aria-label={collapsed ? APP_TITLE : undefined}
148
+ aria-label={
149
+ collapsible && onCollapsedChange
150
+ ? collapsed
151
+ ? t("sidebar.expandSidebar")
152
+ : t("sidebar.collapseSidebar")
153
+ : collapsed
154
+ ? APP_TITLE
155
+ : undefined
156
+ }
134
157
  >
135
158
  <img
136
159
  src={appPath("/agent-native-icon-light.svg")}
137
160
  alt=""
138
161
  aria-hidden="true"
139
- className="block h-4 w-auto shrink-0 dark:hidden"
162
+ width={28}
163
+ height={16}
164
+ className="block h-4 w-7 shrink-0 object-contain object-center dark:hidden"
140
165
  />
141
166
  <img
142
167
  src={appPath("/agent-native-icon-dark.svg")}
143
168
  alt=""
144
169
  aria-hidden="true"
145
- className="hidden h-4 w-auto shrink-0 dark:block"
170
+ width={28}
171
+ height={16}
172
+ className="hidden h-4 w-7 shrink-0 object-contain object-center dark:block"
146
173
  />
147
174
  <div className={cn("min-w-0", collapsed && "sr-only")}>
148
175
  <p className="truncate text-sm font-semibold text-sidebar-accent-foreground">
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-07-31
4
+ ---
5
+
6
+ Clicking the Agent Native logo now toggles the app sidebar.
@@ -5,7 +5,10 @@ export declare function sanitizeA2ACorrelationId(value: unknown): string | undef
5
5
  /**
6
6
  * Keep only bounded, opaque ASCII correlation identifiers. These values
7
7
  * remain telemetry hints; authentication continues to come exclusively from
8
- * the verified A2A token/request context.
8
+ * the verified A2A token/request context. `callerModel` is the one value here
9
+ * a receiver may act on, and only as a preference — it never reaches identity,
10
+ * org, access, or approval resolution, and it can only name a model the
11
+ * receiver's own engine already offers (see `resolveDelegatedRunModel`).
9
12
  */
10
13
  export declare function sanitizeA2ACorrelationMetadata(value: unknown): A2ACorrelationMetadata;
11
14
  //# sourceMappingURL=correlation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"correlation.d.ts","sourceRoot":"","sources":["../../src/a2a/correlation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAqBzC,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,sBAAsB,CA6CxB"}
1
+ {"version":3,"file":"correlation.d.ts","sourceRoot":"","sources":["../../src/a2a/correlation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAuBzC,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,OAAO,GACb,sBAAsB,CAkDxB"}
@@ -2,6 +2,8 @@ export const MAX_A2A_CORRELATION_VALUE_CHARS = 200;
2
2
  export const MAX_A2A_DELEGATION_HOPS = 3;
3
3
  const APP_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
4
4
  const CORRELATION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/;
5
+ // Model ids also carry `/` (provider-prefixed gateway ids).
6
+ const MODEL_HINT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:/-]*$/;
5
7
  function boundedIdentifier(value, pattern) {
6
8
  if (typeof value !== "string")
7
9
  return undefined;
@@ -19,7 +21,10 @@ export function sanitizeA2ACorrelationId(value) {
19
21
  /**
20
22
  * Keep only bounded, opaque ASCII correlation identifiers. These values
21
23
  * remain telemetry hints; authentication continues to come exclusively from
22
- * the verified A2A token/request context.
24
+ * the verified A2A token/request context. `callerModel` is the one value here
25
+ * a receiver may act on, and only as a preference — it never reaches identity,
26
+ * org, access, or approval resolution, and it can only name a model the
27
+ * receiver's own engine already offers (see `resolveDelegatedRunModel`).
23
28
  */
24
29
  export function sanitizeA2ACorrelationMetadata(value) {
25
30
  if (!value || typeof value !== "object" || Array.isArray(value))
@@ -30,6 +35,7 @@ export function sanitizeA2ACorrelationMetadata(value) {
30
35
  const parentRunId = sanitizeA2ACorrelationId(metadata.parentRunId);
31
36
  const parentTurnId = sanitizeA2ACorrelationId(metadata.parentTurnId);
32
37
  const invocationId = sanitizeA2ACorrelationId(metadata.invocationId);
38
+ const callerModel = boundedIdentifier(metadata.callerModel, MODEL_HINT_PATTERN);
33
39
  const providedDelegationDepth = typeof metadata.delegationDepth === "number" &&
34
40
  Number.isInteger(metadata.delegationDepth) &&
35
41
  metadata.delegationDepth >= 0 &&
@@ -62,6 +68,7 @@ export function sanitizeA2ACorrelationMetadata(value) {
62
68
  ...(invocationId ? { invocationId } : {}),
63
69
  ...(delegationDepth !== undefined ? { delegationDepth } : {}),
64
70
  ...(visitedApps.length > 0 ? { visitedApps } : {}),
71
+ ...(callerModel ? { callerModel } : {}),
65
72
  };
66
73
  }
67
74
  //# sourceMappingURL=correlation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"correlation.js","sourceRoot":"","sources":["../../src/a2a/correlation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AACnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,MAAM,cAAc,GAAG,8BAA8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EAAE,CAAC;QACvC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACnD,CAAC;AACJ,CAAC","sourcesContent":["import type { A2ACorrelationMetadata } from \"./types.js\";\n\nexport const MAX_A2A_CORRELATION_VALUE_CHARS = 200;\nexport const MAX_A2A_DELEGATION_HOPS = 3;\n\nconst APP_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;\nconst CORRELATION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/;\n\nfunction boundedIdentifier(\n value: unknown,\n pattern: RegExp,\n): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (\n !trimmed ||\n trimmed.length > MAX_A2A_CORRELATION_VALUE_CHARS ||\n !pattern.test(trimmed)\n ) {\n return undefined;\n }\n return trimmed;\n}\n\nexport function sanitizeA2ACorrelationId(value: unknown): string | undefined {\n return boundedIdentifier(value, CORRELATION_ID_PATTERN);\n}\n\n/**\n * Keep only bounded, opaque ASCII correlation identifiers. These values\n * remain telemetry hints; authentication continues to come exclusively from\n * the verified A2A token/request context.\n */\nexport function sanitizeA2ACorrelationMetadata(\n value: unknown,\n): A2ACorrelationMetadata {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return {};\n const metadata = value as Record<string, unknown>;\n const callerApp = boundedIdentifier(metadata.callerApp, APP_ID_PATTERN);\n const callerThreadId = sanitizeA2ACorrelationId(metadata.callerThreadId);\n const parentRunId = sanitizeA2ACorrelationId(metadata.parentRunId);\n const parentTurnId = sanitizeA2ACorrelationId(metadata.parentTurnId);\n const invocationId = sanitizeA2ACorrelationId(metadata.invocationId);\n const providedDelegationDepth =\n typeof metadata.delegationDepth === \"number\" &&\n Number.isInteger(metadata.delegationDepth) &&\n metadata.delegationDepth >= 0 &&\n metadata.delegationDepth <= MAX_A2A_DELEGATION_HOPS\n ? metadata.delegationDepth\n : undefined;\n const visitedApps = Array.isArray(metadata.visitedApps)\n ? [\n ...new Set(\n metadata.visitedApps\n .map((value) => boundedIdentifier(value, APP_ID_PATTERN))\n .filter((value): value is string => !!value),\n ),\n ].slice(0, MAX_A2A_DELEGATION_HOPS + 1)\n : [];\n const pathDepth = Math.min(MAX_A2A_DELEGATION_HOPS, visitedApps.length);\n // Damaged lineage must never reset a nested call to depth zero. Derive at\n // least the valid path length, and fail closed at the hop limit when a peer\n // supplied an explicit but invalid depth.\n const delegationDepth =\n providedDelegationDepth !== undefined\n ? Math.max(providedDelegationDepth, pathDepth)\n : metadata.delegationDepth !== undefined\n ? MAX_A2A_DELEGATION_HOPS\n : visitedApps.length > 0\n ? pathDepth\n : undefined;\n return {\n ...(callerApp ? { callerApp } : {}),\n ...(callerThreadId ? { callerThreadId } : {}),\n ...(parentRunId ? { parentRunId } : {}),\n ...(parentTurnId ? { parentTurnId } : {}),\n ...(invocationId ? { invocationId } : {}),\n ...(delegationDepth !== undefined ? { delegationDepth } : {}),\n ...(visitedApps.length > 0 ? { visitedApps } : {}),\n };\n}\n"]}
1
+ {"version":3,"file":"correlation.js","sourceRoot":"","sources":["../../src/a2a/correlation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AACnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,MAAM,cAAc,GAAG,8BAA8B,CAAC;AACtD,MAAM,sBAAsB,GAAG,+BAA+B,CAAC;AAC/D,4DA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AAC;QAC7C,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC","sourcesContent":["import type { A2ACorrelationMetadata } from \"./types.js\";\n\nexport const MAX_A2A_CORRELATION_VALUE_CHARS = 200;\nexport const MAX_A2A_DELEGATION_HOPS = 3;\n\nconst APP_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;\nconst CORRELATION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]*$/;\n// Model ids also carry `/` (provider-prefixed gateway ids).\nconst MODEL_HINT_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:/-]*$/;\n\nfunction boundedIdentifier(\n value: unknown,\n pattern: RegExp,\n): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (\n !trimmed ||\n trimmed.length > MAX_A2A_CORRELATION_VALUE_CHARS ||\n !pattern.test(trimmed)\n ) {\n return undefined;\n }\n return trimmed;\n}\n\nexport function sanitizeA2ACorrelationId(value: unknown): string | undefined {\n return boundedIdentifier(value, CORRELATION_ID_PATTERN);\n}\n\n/**\n * Keep only bounded, opaque ASCII correlation identifiers. These values\n * remain telemetry hints; authentication continues to come exclusively from\n * the verified A2A token/request context. `callerModel` is the one value here\n * a receiver may act on, and only as a preference — it never reaches identity,\n * org, access, or approval resolution, and it can only name a model the\n * receiver's own engine already offers (see `resolveDelegatedRunModel`).\n */\nexport function sanitizeA2ACorrelationMetadata(\n value: unknown,\n): A2ACorrelationMetadata {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return {};\n const metadata = value as Record<string, unknown>;\n const callerApp = boundedIdentifier(metadata.callerApp, APP_ID_PATTERN);\n const callerThreadId = sanitizeA2ACorrelationId(metadata.callerThreadId);\n const parentRunId = sanitizeA2ACorrelationId(metadata.parentRunId);\n const parentTurnId = sanitizeA2ACorrelationId(metadata.parentTurnId);\n const invocationId = sanitizeA2ACorrelationId(metadata.invocationId);\n const callerModel = boundedIdentifier(\n metadata.callerModel,\n MODEL_HINT_PATTERN,\n );\n const providedDelegationDepth =\n typeof metadata.delegationDepth === \"number\" &&\n Number.isInteger(metadata.delegationDepth) &&\n metadata.delegationDepth >= 0 &&\n metadata.delegationDepth <= MAX_A2A_DELEGATION_HOPS\n ? metadata.delegationDepth\n : undefined;\n const visitedApps = Array.isArray(metadata.visitedApps)\n ? [\n ...new Set(\n metadata.visitedApps\n .map((value) => boundedIdentifier(value, APP_ID_PATTERN))\n .filter((value): value is string => !!value),\n ),\n ].slice(0, MAX_A2A_DELEGATION_HOPS + 1)\n : [];\n const pathDepth = Math.min(MAX_A2A_DELEGATION_HOPS, visitedApps.length);\n // Damaged lineage must never reset a nested call to depth zero. Derive at\n // least the valid path length, and fail closed at the hop limit when a peer\n // supplied an explicit but invalid depth.\n const delegationDepth =\n providedDelegationDepth !== undefined\n ? Math.max(providedDelegationDepth, pathDepth)\n : metadata.delegationDepth !== undefined\n ? MAX_A2A_DELEGATION_HOPS\n : visitedApps.length > 0\n ? pathDepth\n : undefined;\n return {\n ...(callerApp ? { callerApp } : {}),\n ...(callerThreadId ? { callerThreadId } : {}),\n ...(parentRunId ? { parentRunId } : {}),\n ...(parentTurnId ? { parentTurnId } : {}),\n ...(invocationId ? { invocationId } : {}),\n ...(delegationDepth !== undefined ? { delegationDepth } : {}),\n ...(visitedApps.length > 0 ? { visitedApps } : {}),\n ...(callerModel ? { callerModel } : {}),\n };\n}\n"]}
@@ -117,9 +117,11 @@ export interface A2ASourceContextReference {
117
117
  integrationTaskId: string;
118
118
  }
119
119
  /**
120
- * Telemetry-only cross-app correlation. Receivers must never use these
121
- * caller-supplied values for identity, ownership, org scoping, access, or
122
- * approval decisions.
120
+ * Telemetry-only cross-app correlation, plus `callerModel` a preference
121
+ * hint. Receivers must never use any caller-supplied value here for identity,
122
+ * ownership, org scoping, access, or approval decisions. `callerModel` widens
123
+ * this channel to a preference, never to an authorization: it may at most pick
124
+ * a model the receiver's already-resolved engine advertises.
123
125
  */
124
126
  export interface A2ACorrelationMetadata {
125
127
  callerApp?: string;
@@ -131,6 +133,12 @@ export interface A2ACorrelationMetadata {
131
133
  delegationDepth?: number;
132
134
  /** Bounded app ids already visited, used only for cycle prevention. */
133
135
  visitedApps?: string[];
136
+ /**
137
+ * Model the caller resolved for its own turn. A hint only: the receiver
138
+ * honours it just when it has no model of its own, and only after bounding
139
+ * it to its own engine's catalog.
140
+ */
141
+ callerModel?: string;
134
142
  }
135
143
  export interface A2AHandlerContext {
136
144
  taskId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/a2a/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AAIvB,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,M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AAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,CACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,iBAAiB,KACvB,OAAO,CAAC,gBAAgB,CAAC,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAEzD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,UAAU,EAAE,CAAC;IACnC,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uFAAuF;IACvF,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,yDAAyD;IACzD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,OAAO,CAAC;QAC5D,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;QAC/B,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,+EAA+E;IAC/E,qBAAqB,CAAC,EAAE,CACtB,UAAU,EAAE,2BAA2B,KACpC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;CAClE"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/a2a/types.ts"],"names":[],"mappings":"","sourcesContent":["// A2A Protocol types (spec v0.3) + framework config types\nimport type { PublicAgentActionConfig } from \"../action.js\";\n\nexport type {\n A2AAgentActivityPhase,\n A2AAgentActivitySnapshot,\n A2AAgentActivityState,\n A2AAgentActivityToolCall,\n A2AAgentActivityToolStatus,\n} from \"./activity.js\";\n\n// --- Parts (content atoms) ---\n\nexport interface TextPart {\n type: \"text\";\n text: string;\n}\n\nexport interface FilePart {\n type: \"file\";\n file: {\n name?: string;\n mimeType?: string;\n bytes?: string;\n uri?: string;\n };\n}\n\nexport interface DataPart {\n type: \"data\";\n data: Record<string, unknown>;\n}\n\nexport type Part = TextPart | FilePart | DataPart;\n\n// --- Messages and Tasks ---\n\nexport interface Message {\n role: \"user\" | \"agent\";\n parts: Part[];\n metadata?: Record<string, unknown>;\n}\n\nexport type TaskState =\n | \"submitted\"\n | \"working\"\n | \"processing\"\n | \"completed\"\n | \"failed\"\n | \"canceled\"\n | \"input-required\";\n\nexport interface TaskStatus {\n state: TaskState;\n message?: Message;\n timestamp: string;\n}\n\nexport interface Artifact {\n name?: string;\n description?: string;\n parts: Part[];\n metadata?: Record<string, unknown>;\n}\n\nexport interface Task {\n id: string;\n contextId?: string;\n status: TaskStatus;\n history?: Message[];\n artifacts?: Artifact[];\n metadata?: Record<string, unknown>;\n}\n\n// --- Agent Card ---\n\nexport interface AgentSkill {\n id: string;\n name: string;\n description: string;\n tags?: string[];\n examples?: string[];\n public?: boolean;\n readOnly?: boolean;\n requiresAuth?: boolean;\n isConsequential?: boolean;\n publicAgent?: PublicAgentActionConfig;\n /**\n * JSON Schema for the action's `input`. Advertising a skill without it tells a\n * caller the action exists but not how to call it, so callers invoke with `{}`\n * and get a required-property error back.\n */\n inputSchema?: Record<string, unknown>;\n}\n\nexport interface AgentCapabilities {\n streaming?: boolean;\n pushNotifications?: boolean;\n stateTransitionHistory?: boolean;\n}\n\nexport interface AgentSecurityScheme {\n type: string;\n scheme?: string;\n bearerFormat?: string;\n in?: string;\n name?: string;\n}\n\nexport interface AgentCard {\n name: string;\n description: string;\n url: string;\n version: string;\n protocolVersion: \"0.3\";\n capabilities: AgentCapabilities;\n skills: AgentSkill[];\n securitySchemes?: Record<string, AgentSecurityScheme>;\n security?: Record<string, string[]>[];\n}\n\n// --- JSON-RPC ---\n\nexport interface JsonRpcRequest {\n jsonrpc: \"2.0\";\n id: string | number;\n method: string;\n params?: Record<string, unknown>;\n}\n\nexport interface JsonRpcError {\n code: number;\n message: string;\n data?: unknown;\n}\n\nexport interface JsonRpcResponse {\n jsonrpc: \"2.0\";\n id: string | number | null;\n result?: unknown;\n error?: JsonRpcError;\n}\n\n/** One exact downstream action explicitly authorized in the caller's chat. */\nexport interface A2AApprovedAction {\n tool: string;\n input: unknown;\n}\n\n/** Structured provenance accepted only from an authenticated A2A caller. */\nexport interface A2ASourceContext {\n platform: \"slack\";\n sourceUrl: string;\n}\n\n/** Opaque reference that a receiver must resolve through its trusted Dispatch app. */\nexport interface A2ASourceContextReference {\n platform: \"slack\";\n integrationTaskId: string;\n}\n\n/**\n * Telemetry-only cross-app correlation. Receivers must never use these\n * caller-supplied values for identity, ownership, org scoping, access, or\n * approval decisions.\n */\nexport interface A2ACorrelationMetadata {\n callerApp?: string;\n callerThreadId?: string;\n parentRunId?: string;\n parentTurnId?: string;\n invocationId?: string;\n /** Number of cross-app edges already traversed by this logical request. */\n delegationDepth?: number;\n /** Bounded app ids already visited, used only for cycle prevention. */\n visitedApps?: string[];\n}\n\n// --- Framework config ---\n\nexport interface A2AHandlerContext {\n taskId: string;\n contextId?: string;\n /** Metadata from the caller (e.g., userEmail for identity forwarding) */\n metadata?: Record<string, unknown>;\n /** Current H3 event when the handler is running inside an HTTP request. */\n event?: unknown;\n /** Exact one-time action grants from a JWT-authenticated caller. */\n approvedActions?: A2AApprovedAction[];\n /** Receiver-validated provenance from a JWT-authenticated caller. */\n sourceContext?: A2ASourceContext;\n writeArtifact: (name: string, content: string, mimeType?: string) => string;\n}\n\nexport interface A2AHandlerResult {\n message: Message;\n artifacts?: Artifact[];\n /** Optional non-terminal state requested by the handler. */\n taskState?: Extract<TaskState, \"input-required\">;\n}\n\nexport interface A2AApprovalExecution {\n id: string;\n taskId: string;\n ownerEmail: string;\n orgId?: string | null;\n tool: string;\n input: unknown;\n approvalKey: string;\n callId: string;\n}\n\n/** One explicitly exposed read-only app action invoked without an agent loop. */\nexport interface A2AReadOnlyActionInvocation {\n action: string;\n input: Record<string, unknown>;\n invocationId: string;\n}\n\nexport interface A2AReadOnlyActionResult {\n action: string;\n status: \"completed\" | \"failed\";\n output: string;\n}\n\nexport type A2AHandler = (\n message: Message,\n context: A2AHandlerContext,\n) => Promise<A2AHandlerResult> | AsyncGenerator<Message>;\n\nexport interface A2AConfig {\n name: string;\n /** Canonical receiver app id used only for telemetry attribution. */\n appId?: string;\n description: string;\n version?: string;\n skills: AgentSkill[];\n /**\n * Skills advertised only to a caller with a verified A2A identity — the set\n * `actions/invoke` will actually run. Anonymous card fetches never see these.\n * Without it the card advertises the public set, which is disjoint from the\n * invocable set, so siblings are told nothing is directly callable.\n */\n authenticatedSkills?: AgentSkill[];\n /** If true, public agent-card discovery includes only explicit public-safe skills. */\n publicSkillsOnly?: boolean;\n handler?: A2AHandler;\n apiKeyEnv?: string;\n streaming?: boolean;\n /** Route async A2A work through the app's durable background worker when available. */\n durableBackgroundRuns?: boolean;\n /** Execute a persisted, human-approved A2A tool call. */\n executeApproval?: (approval: A2AApprovalExecution) => Promise<{\n status: \"completed\" | \"failed\";\n output: string;\n }>;\n /** Execute an explicitly exposed read-only action without starting a model. */\n executeReadOnlyAction?: (\n invocation: A2AReadOnlyActionInvocation,\n ) => Promise<Pick<A2AReadOnlyActionResult, \"status\" | \"output\">>;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/a2a/types.ts"],"names":[],"mappings":"","sourcesContent":["// A2A Protocol types (spec v0.3) + framework config types\nimport type { PublicAgentActionConfig } from \"../action.js\";\n\nexport type {\n A2AAgentActivityPhase,\n A2AAgentActivitySnapshot,\n A2AAgentActivityState,\n A2AAgentActivityToolCall,\n A2AAgentActivityToolStatus,\n} from \"./activity.js\";\n\n// --- Parts (content atoms) ---\n\nexport interface TextPart {\n type: \"text\";\n text: string;\n}\n\nexport interface FilePart {\n type: \"file\";\n file: {\n name?: string;\n mimeType?: string;\n bytes?: string;\n uri?: string;\n };\n}\n\nexport interface DataPart {\n type: \"data\";\n data: Record<string, unknown>;\n}\n\nexport type Part = TextPart | FilePart | DataPart;\n\n// --- Messages and Tasks ---\n\nexport interface Message {\n role: \"user\" | \"agent\";\n parts: Part[];\n metadata?: Record<string, unknown>;\n}\n\nexport type TaskState =\n | \"submitted\"\n | \"working\"\n | \"processing\"\n | \"completed\"\n | \"failed\"\n | \"canceled\"\n | \"input-required\";\n\nexport interface TaskStatus {\n state: TaskState;\n message?: Message;\n timestamp: string;\n}\n\nexport interface Artifact {\n name?: string;\n description?: string;\n parts: Part[];\n metadata?: Record<string, unknown>;\n}\n\nexport interface Task {\n id: string;\n contextId?: string;\n status: TaskStatus;\n history?: Message[];\n artifacts?: Artifact[];\n metadata?: Record<string, unknown>;\n}\n\n// --- Agent Card ---\n\nexport interface AgentSkill {\n id: string;\n name: string;\n description: string;\n tags?: string[];\n examples?: string[];\n public?: boolean;\n readOnly?: boolean;\n requiresAuth?: boolean;\n isConsequential?: boolean;\n publicAgent?: PublicAgentActionConfig;\n /**\n * JSON Schema for the action's `input`. Advertising a skill without it tells a\n * caller the action exists but not how to call it, so callers invoke with `{}`\n * and get a required-property error back.\n */\n inputSchema?: Record<string, unknown>;\n}\n\nexport interface AgentCapabilities {\n streaming?: boolean;\n pushNotifications?: boolean;\n stateTransitionHistory?: boolean;\n}\n\nexport interface AgentSecurityScheme {\n type: string;\n scheme?: string;\n bearerFormat?: string;\n in?: string;\n name?: string;\n}\n\nexport interface AgentCard {\n name: string;\n description: string;\n url: string;\n version: string;\n protocolVersion: \"0.3\";\n capabilities: AgentCapabilities;\n skills: AgentSkill[];\n securitySchemes?: Record<string, AgentSecurityScheme>;\n security?: Record<string, string[]>[];\n}\n\n// --- JSON-RPC ---\n\nexport interface JsonRpcRequest {\n jsonrpc: \"2.0\";\n id: string | number;\n method: string;\n params?: Record<string, unknown>;\n}\n\nexport interface JsonRpcError {\n code: number;\n message: string;\n data?: unknown;\n}\n\nexport interface JsonRpcResponse {\n jsonrpc: \"2.0\";\n id: string | number | null;\n result?: unknown;\n error?: JsonRpcError;\n}\n\n/** One exact downstream action explicitly authorized in the caller's chat. */\nexport interface A2AApprovedAction {\n tool: string;\n input: unknown;\n}\n\n/** Structured provenance accepted only from an authenticated A2A caller. */\nexport interface A2ASourceContext {\n platform: \"slack\";\n sourceUrl: string;\n}\n\n/** Opaque reference that a receiver must resolve through its trusted Dispatch app. */\nexport interface A2ASourceContextReference {\n platform: \"slack\";\n integrationTaskId: string;\n}\n\n/**\n * Telemetry-only cross-app correlation, plus `callerModel` — a preference\n * hint. Receivers must never use any caller-supplied value here for identity,\n * ownership, org scoping, access, or approval decisions. `callerModel` widens\n * this channel to a preference, never to an authorization: it may at most pick\n * a model the receiver's already-resolved engine advertises.\n */\nexport interface A2ACorrelationMetadata {\n callerApp?: string;\n callerThreadId?: string;\n parentRunId?: string;\n parentTurnId?: string;\n invocationId?: string;\n /** Number of cross-app edges already traversed by this logical request. */\n delegationDepth?: number;\n /** Bounded app ids already visited, used only for cycle prevention. */\n visitedApps?: string[];\n /**\n * Model the caller resolved for its own turn. A hint only: the receiver\n * honours it just when it has no model of its own, and only after bounding\n * it to its own engine's catalog.\n */\n callerModel?: string;\n}\n\n// --- Framework config ---\n\nexport interface A2AHandlerContext {\n taskId: string;\n contextId?: string;\n /** Metadata from the caller (e.g., userEmail for identity forwarding) */\n metadata?: Record<string, unknown>;\n /** Current H3 event when the handler is running inside an HTTP request. */\n event?: unknown;\n /** Exact one-time action grants from a JWT-authenticated caller. */\n approvedActions?: A2AApprovedAction[];\n /** Receiver-validated provenance from a JWT-authenticated caller. */\n sourceContext?: A2ASourceContext;\n writeArtifact: (name: string, content: string, mimeType?: string) => string;\n}\n\nexport interface A2AHandlerResult {\n message: Message;\n artifacts?: Artifact[];\n /** Optional non-terminal state requested by the handler. */\n taskState?: Extract<TaskState, \"input-required\">;\n}\n\nexport interface A2AApprovalExecution {\n id: string;\n taskId: string;\n ownerEmail: string;\n orgId?: string | null;\n tool: string;\n input: unknown;\n approvalKey: string;\n callId: string;\n}\n\n/** One explicitly exposed read-only app action invoked without an agent loop. */\nexport interface A2AReadOnlyActionInvocation {\n action: string;\n input: Record<string, unknown>;\n invocationId: string;\n}\n\nexport interface A2AReadOnlyActionResult {\n action: string;\n status: \"completed\" | \"failed\";\n output: string;\n}\n\nexport type A2AHandler = (\n message: Message,\n context: A2AHandlerContext,\n) => Promise<A2AHandlerResult> | AsyncGenerator<Message>;\n\nexport interface A2AConfig {\n name: string;\n /** Canonical receiver app id used only for telemetry attribution. */\n appId?: string;\n description: string;\n version?: string;\n skills: AgentSkill[];\n /**\n * Skills advertised only to a caller with a verified A2A identity — the set\n * `actions/invoke` will actually run. Anonymous card fetches never see these.\n * Without it the card advertises the public set, which is disjoint from the\n * invocable set, so siblings are told nothing is directly callable.\n */\n authenticatedSkills?: AgentSkill[];\n /** If true, public agent-card discovery includes only explicit public-safe skills. */\n publicSkillsOnly?: boolean;\n handler?: A2AHandler;\n apiKeyEnv?: string;\n streaming?: boolean;\n /** Route async A2A work through the app's durable background worker when available. */\n durableBackgroundRuns?: boolean;\n /** Execute a persisted, human-approved A2A tool call. */\n executeApproval?: (approval: A2AApprovalExecution) => Promise<{\n status: \"completed\" | \"failed\";\n output: string;\n }>;\n /** Execute an explicitly exposed read-only action without starting a model. */\n executeReadOnlyAction?: (\n invocation: A2AReadOnlyActionInvocation,\n ) => Promise<Pick<A2AReadOnlyActionResult, \"status\" | \"output\">>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ai-sdk-engine.d.ts","sourceRoot":"","sources":["../../../src/agent/engine/ai-sdk-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AA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