@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
@@ -150,6 +150,13 @@ export interface OutboundTarget {
150
150
  tenantId?: string;
151
151
  /** Managed installation id when the caller already resolved it. */
152
152
  installationId?: string;
153
+ /**
154
+ * Provider installation key identifying which connected app to send as.
155
+ * Required when a tenant has more than one app of the same platform
156
+ * connected — without it the adapter cannot tell them apart and refuses to
157
+ * guess rather than posting under the wrong bot identity.
158
+ */
159
+ installationKey?: string;
153
160
  }
154
161
  /**
155
162
  * Connection status for a platform integration.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,MAAM,2BAA2B,GACnC,SAAS,GACT,iBAAiB,GACjB,IAAI,GACJ,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,IAAI,GAAG,cAAc,CAAC;AAEvE,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,E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E,MAAM,GAAG,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AA0PA,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IAIhD,QAAQ;IACR,UAAU;IAJZ,IAAI,GAAG,iCAAiC,CAAC;IAElD,YACW,QAAgB,EAChB,UAA6C;QAEtD,KAAK,CAAC,YAAY,QAAQ,qBAAqB,UAAU,EAAE,CAAC,CAAC;wBAHpD,QAAQ;0BACR,UAAU;QAGnB,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IACnD,CAAC;CACF;AAkKD,MAAM,UAAU,wBAAwB,CACtC,OAAwB,EACxB,UAA6C;IAE7C,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,kCAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC","sourcesContent":["import type { H3Event } from \"h3\";\n\nimport type { AgentChatEvent } from \"../agent/types.js\";\nimport type { EnvKeyConfig } from \"../server/create-server.js\";\n\nexport type IntegrationConversationType =\n | \"channel\"\n | \"private_channel\"\n | \"dm\"\n | \"group_dm\"\n | \"unknown\";\n\nexport type IntegrationTriggerKind = \"mention\" | \"dm\" | \"thread_reply\";\n\nexport interface IntegrationActorTrust {\n memberType: \"owner\" | \"admin\" | \"member\" | \"guest\" | \"external\" | \"unknown\";\n verified: boolean;\n}\n\nexport interface IntegrationContextMessage {\n senderId?: string;\n senderName?: string;\n text: string;\n timestamp: number;\n sourceUrl?: string;\n reactions?: Array<{ name: string; count: number }>;\n files?: IntegrationFileReference[];\n}\n\nexport interface IntegrationFileReference {\n id: string;\n name?: string;\n mimetype?: string;\n size?: number;\n permalink?: string;\n downloadUrl?: string;\n}\n\n/**\n * Normalized incoming message from any messaging platform.\n */\nexport interface IncomingMessage {\n /** Platform identifier (e.g., \"slack\", \"telegram\", \"whatsapp\") */\n platform: string;\n /** Platform-specific thread/conversation identifier */\n externalThreadId: string;\n /** Message text content */\n text: string;\n /** Display name of the sender */\n senderName?: string;\n /** Verified sender email, when the platform can provide one */\n senderEmail?: string;\n /** Platform-specific sender ID */\n senderId?: string;\n /** How this message intentionally invoked an agent. */\n triggerKind?: IntegrationTriggerKind;\n /** Normalized provider conversation type for policy evaluation. */\n conversationType?: IntegrationConversationType;\n /** Provider tenant/workspace identifier. */\n tenantId?: string;\n /** Authorized integration scope resolved before execution. */\n integrationScopeId?: string;\n /** Normalized actor trust; unknown/unverified callers fail closed. */\n actorTrust?: IntegrationActorTrust;\n /** Bounded provider-native conversation context hydrated at run time. */\n contextMessages?: IntegrationContextMessage[];\n /** Provider file references only. Raw file bodies never belong here. */\n files?: IntegrationFileReference[];\n /** Server-verified approval grants carried by an interaction continuation. */\n approvedToolCalls?: string[];\n /**\n * Whether the platform cryptographically authenticated that the message\n * genuinely came from the claimed sender (e.g. inbound email that passed\n * DKIM, or an aligned SPF pass, for the From domain). Defaults to\n * undefined/false for platforms that don't provide sender authentication.\n *\n * Owner-resolution paths that grant a real user's identity/credentials\n * MUST treat a missing/false value as \"unverified\" and fail closed —\n * never derive a privileged acting identity from an unverified sender.\n */\n senderVerified?: boolean;\n /** Raw platform-specific context needed for routing responses */\n platformContext: Record<string, unknown>;\n /**\n * Short-lived delivery context needed only while the queued task is active.\n * Secrets such as Discord interaction tokens belong here, never in\n * `platformContext`, thread mappings, logs, or agent-visible context.\n */\n responseContext?: Record<string, unknown>;\n /** Provider-native thread/topic reference, when one exists. */\n threadRef?: string;\n /**\n * Canonical provider URL for the originating message thread, when the\n * provider can resolve one. This is safe agent-visible provenance (not a\n * credential) and should be preserved across A2A delegation so created\n * artifacts can link back to their request source.\n */\n sourceUrl?: string;\n /**\n * Trusted app-side routing guidance added after provider parsing. Adapters\n * should not copy this from user-controlled webhook payload fields.\n */\n routingHint?: {\n targetAgent?: string;\n instruction: string;\n };\n /**\n * Trusted app-side note about the caller's identity/visibility tier, set\n * after execution-context resolution (e.g. an anonymous org-scoped Slack\n * member). Surfaced to the agent as integration context. Adapters must not\n * copy this from user-controlled webhook payload fields.\n */\n identityNote?: string;\n /** Provider-native message/activity reference for contextual replies. */\n replyRef?: string;\n /** Message timestamp (epoch ms) */\n timestamp: number;\n}\n\n/**\n * Outgoing message to send back to a messaging platform.\n */\nexport interface OutgoingMessage {\n /** Text content of the response */\n text: string;\n /** Platform-specific payload (e.g., Slack blocks, Telegram parse_mode) */\n platformContext: Record<string, unknown>;\n}\n\n/** Provider-confirmed references for a successfully delivered response. */\nexport interface PlatformDeliveryReceipt {\n status: \"delivered\";\n /** Opaque provider message ids/timestamps; never message content. */\n messageRefs?: string[];\n}\n\nexport interface PlatformDeliveryOptions {\n /** Provider-owned message reference that should be updated in place. */\n placeholderRef?: string;\n /** Stable logical delivery key for provider-side retry reconciliation. */\n idempotencyKey?: string;\n /** Earliest provider timestamp (epoch ms) that can contain this delivery. */\n reconcileAfter?: number;\n /** Abort provider I/O before the caller releases its durable delivery claim. */\n signal?: AbortSignal;\n /** Do not fall back to a fresh post if the stable target cannot be updated. */\n strictTargetRef?: boolean;\n}\n\n/**\n * Proactive outbound message target for a platform.\n * Used when the agent needs to send to a saved destination instead of replying\n * to the current inbound thread.\n */\nexport interface OutboundTarget {\n /** Canonical platform-specific destination id (channel, chat, thread, etc.) */\n destination: string;\n /** Optional thread reference when the destination supports threading */\n threadRef?: string | null;\n /** Optional fallback display label */\n label?: string;\n /** Provider tenant/workspace used to select an installation credential. */\n tenantId?: string;\n /** Managed installation id when the caller already resolved it. */\n installationId?: string;\n}\n\n/**\n * Connection status for a platform integration.\n */\nexport interface IntegrationStatus {\n platform: string;\n /** Human-readable label (e.g., \"Slack\", \"Telegram\") */\n label: string;\n /** Whether the integration is explicitly enabled */\n enabled: boolean;\n /** Whether all required credentials are configured */\n configured: boolean;\n /** Platform-specific details (workspace name, bot username, etc.) */\n details?: Record<string, unknown>;\n /** Error message if something is wrong */\n error?: string;\n /** The webhook URL that should be configured in the platform */\n webhookUrl?: string;\n /** The full list of env keys (required + optional) the adapter recognizes,\n * including UI hints. Surfaced on the integrations status endpoint so the\n * frontend can render fields without hard-coding them per platform. */\n requiredEnvKeys?: import(\"../server/create-server.js\").EnvKeyConfig[];\n}\n\nexport interface PlatformAdapterCapabilities {\n /** The adapter can deliver a response to the current inbound event. */\n replyText: boolean;\n /** The adapter can send without an active inbound event. */\n proactiveMessages: boolean;\n /** The adapter preserves a provider-native thread or topic reference. */\n nativeThreads: boolean;\n /** The adapter can quote/reply to a specific inbound message. */\n contextualReplies: boolean;\n /** The provider requires an immediate deferred webhook acknowledgement. */\n deferredWebhookResponse: boolean;\n /** The adapter only receives explicit interactions, not ordinary messages. */\n interactionOnly?: boolean;\n /** The adapter can hydrate bounded native thread/file/reaction context. */\n nativeContextHydration?: boolean;\n /** The adapter can surface live agent progress in the provider UI. */\n liveRunProgress?: boolean;\n}\n\nexport interface PlatformRunProgress {\n /**\n * Opaque, provider-owned reference for resuming this progress surface from a\n * durable continuation. It deliberately contains no user content,\n * credentials, or provider payload.\n */\n ref?: PlatformRunProgressRef;\n /** Stable provider message target that can receive the terminal answer. */\n responseTargetRef?: string;\n /** Receive normalized agent events. Implementations should throttle writes. */\n onEvent(\n event: AgentChatEvent,\n opts?: { signal?: AbortSignal },\n ): Promise<void> | void;\n /** Finalize the provider-native progress surface with the answer. */\n complete(\n message: OutgoingMessage,\n opts?: { signal?: AbortSignal },\n ): Promise<void | PlatformDeliveryReceipt>;\n /** Mark the provider-native surface failed and leave a retryable explanation. */\n fail?(message: string, opts?: { signal?: AbortSignal }): Promise<void>;\n}\n\n/**\n * Safe, minimal reference to a provider-native run-progress surface.\n *\n * The field values are opaque to the framework. Adapters may use `kind` to\n * distinguish their own resume strategy and `streamTs` to identify the\n * provider-side stream. No incoming message text, platform payload, or\n * credential belongs here.\n */\nexport interface PlatformRunProgressRef {\n kind: string;\n streamTs: string;\n}\n\nexport interface ImmediateWebhookResponse {\n status: number;\n body: unknown;\n}\n\nexport class UnsupportedPlatformCapabilityError extends Error {\n readonly code = \"UNSUPPORTED_PLATFORM_CAPABILITY\";\n\n constructor(\n readonly platform: string,\n readonly capability: keyof PlatformAdapterCapabilities,\n ) {\n super(`Platform ${platform} does not support ${capability}`);\n this.name = \"UnsupportedPlatformCapabilityError\";\n }\n}\n\n/**\n * Platform adapter interface — implement this for each messaging platform.\n *\n * Each adapter handles the platform-specific concerns:\n * - Webhook verification (HMAC signatures, challenge responses)\n * - Message parsing (platform events → normalized IncomingMessage)\n * - Response formatting (agent text → platform-specific format)\n * - Response delivery (POST back to platform API)\n */\nexport interface PlatformAdapter {\n /** Unique platform identifier */\n readonly platform: string;\n /** Human-readable label */\n readonly label: string;\n /** Explicit runtime behavior. Missing fields are treated as unsupported. */\n readonly capabilities?: Partial<PlatformAdapterCapabilities>;\n\n /** Env keys this adapter needs (tokens, secrets, etc.) */\n getRequiredEnvKeys(): EnvKeyConfig[];\n\n /**\n * Handle platform-specific verification challenges.\n * For example, Slack sends a `url_verification` event when setting up.\n * Return `{ handled: true, response }` to short-circuit the webhook handler.\n */\n handleVerification(event: H3Event): Promise<{\n handled: boolean;\n response?: unknown;\n }>;\n\n /**\n * Validate the webhook request signature.\n * Returns true if the request is authentic.\n */\n verifyWebhook(event: H3Event): Promise<boolean>;\n\n /**\n * Parse the webhook payload into a normalized IncomingMessage.\n * Return null to silently ignore the event (bot messages, edits, etc.).\n */\n parseIncomingMessage(event: H3Event): Promise<IncomingMessage | null>;\n\n /**\n * Hydrate bounded provider-native context after durable enqueue, outside the\n * provider acknowledgement budget. Implementations must return references,\n * metadata, and text only — never persist file bodies or credentials.\n */\n hydrateIncomingMessage?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Hydrate only verified sender identity before execution-context selection.\n * This runs on the provider acknowledgement path and must avoid fetching\n * conversation history or file bodies.\n */\n hydrateIncomingIdentity?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Provider-specific response returned only after a message is verified and\n * durably enqueued. Discord uses this to return a type-5 deferred response\n * within its three-second interaction deadline.\n */\n getImmediateWebhookResponse?(\n incoming: IncomingMessage,\n ): ImmediateWebhookResponse | null;\n\n /**\n * Return pre-canonical thread ids used by older adapter versions. The\n * integration handler checks these only when the canonical mapping is\n * missing, then aliases a match to the canonical id without forking history.\n */\n getLegacyExternalThreadIds?(incoming: IncomingMessage): string[];\n\n /**\n * Send the agent's response back to the messaging platform.\n *\n * If `opts.placeholderRef` is provided (returned earlier by\n * `postProcessingPlaceholder`), adapters that support in-place edits should\n * update that placeholder message rather than posting a new one. Adapters\n * without an \"update message\" API can ignore the ref and post fresh.\n */\n sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n opts?: PlatformDeliveryOptions,\n ): Promise<void | PlatformDeliveryReceipt>;\n\n /**\n * Send a short best-effort system notice to the conversation the incoming\n * message arrived on (polite identity declines, one-time access guidance).\n * Bypasses agent formatting. When `dedupeKey` is provided, the adapter may\n * drop the notice if the same key was sent recently. Callers must treat\n * failures as non-fatal.\n */\n sendSystemNotice?(\n incoming: IncomingMessage,\n text: string,\n opts?: {\n dedupeKey?: string;\n /** Dedupe window for `dedupeKey`. Adapters pick a default when omitted. */\n dedupeTtlMs?: number;\n },\n ): Promise<void>;\n\n /**\n * Optionally post a \"working on it…\" placeholder message immediately when a\n * webhook arrives, before the agent loop runs. Adapters that support\n * in-place message edits (Slack via `chat.update`, etc.) return an opaque\n * `placeholderRef` that the webhook flow threads through to `sendResponse`\n * so the same message is updated with the final answer once ready.\n *\n * Adapters without edit support should leave this undefined; the webhook\n * handler will skip the placeholder step entirely.\n */\n postProcessingPlaceholder?(\n incoming: IncomingMessage,\n ): Promise<{ placeholderRef: string } | null>;\n\n /** Start a provider-native progress/streaming surface for an agent run. */\n startRunProgress?(\n incoming: IncomingMessage,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Reattach a durable continuation to a provider-native progress surface\n * previously started by this adapter. Adapters that cannot resume a native\n * surface should omit this and the continuation will use its normal reply\n * path instead.\n */\n resumeRunProgress?(\n incoming: IncomingMessage,\n ref: PlatformRunProgressRef,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Send a proactive outbound message to a platform destination. Adapters that\n * only support direct replies can omit this.\n */\n sendMessageToTarget?(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void>;\n\n /**\n * Format plain agent response text into a platform-appropriate message.\n * Handles markdown conversion, message splitting for length limits, etc.\n *\n * `opts.threadDeepLinkUrl`, when present, is a URL back to the originating\n * thread in the dispatch UI. Adapters that support rich blocks should\n * render this as a button (Slack); adapters that don't may inline it as a\n * link or simply omit it.\n */\n formatAgentResponse(\n text: string,\n opts?: { threadDeepLinkUrl?: string },\n ): OutgoingMessage;\n\n /** Return current connection/configuration status for the settings UI. */\n getStatus(baseUrl?: string): Promise<IntegrationStatus>;\n}\n\nexport function assertPlatformCapability(\n adapter: PlatformAdapter,\n capability: keyof PlatformAdapterCapabilities,\n): void {\n if (adapter.capabilities?.[capability] !== true) {\n throw new UnsupportedPlatformCapabilityError(adapter.platform, capability);\n }\n}\n\n/**\n * Options for the integrations plugin.\n */\nexport interface IntegrationsPluginOptions {\n /** App identifier used by call-agent to prevent self-calls (e.g. \"dispatch\"). */\n appId?: string;\n /** Full adapter set to enable. Default: all built-in adapters. */\n adapters?: PlatformAdapter[];\n /** Replace built-in adapters by platform without removing the other defaults. */\n adapterOverrides?: PlatformAdapter[];\n /** System prompt for the agent (same as agent-chat). Inherited from agent-chat plugin if not set. */\n systemPrompt?: string;\n /** Actions registry (same as agent-chat). */\n actions?: Record<string, import(\"../agent/production-agent.js\").ActionEntry>;\n /** Model to use. Defaults to the resolved engine's default model. */\n model?: string;\n /** Anthropic API key. Falls back to ANTHROPIC_API_KEY env var. */\n apiKey?: string;\n /** Agent engine to use. Defaults to the same engine resolver as web chat. */\n engine?:\n | import(\"../agent/engine/types.js\").AgentEngine\n | string\n | {\n name: string;\n config: Record<string, unknown>;\n };\n /**\n * Resolve which owner should receive personal resource context and own the\n * created chat thread for an incoming platform message.\n */\n resolveOwner?: (incoming: IncomingMessage) => string | Promise<string>;\n /**\n * Resolve the durable execution principal for an inbound provider message.\n * Shared channels should use a service principal; DMs may use a verified\n * linked user. When present this supersedes `resolveOwner`.\n */\n resolveExecutionContext?: (\n incoming: IncomingMessage,\n ) => IntegrationExecutionContext | Promise<IntegrationExecutionContext>;\n /**\n * Explicitly allow an unlinked, verified Slack workspace member to run a DM\n * with the installation organization's shared/service visibility. Disabled\n * by default: DM identity resolution fails closed unless an app deliberately\n * accepts this wider access tier.\n */\n allowAnonymousOrgScopedSlackDm?: boolean;\n /**\n * Optional preprocessor for inbound platform messages. Can intercept special\n * commands (such as `/link`) before the agent loop runs.\n */\n beforeProcess?: (\n incoming: IncomingMessage,\n adapter: PlatformAdapter,\n ) => Promise<\n | {\n handled: true;\n responseText?: string;\n }\n | { handled: false }\n >;\n}\n\nexport interface IntegrationExecutionContext {\n ownerEmail: string;\n orgId: string | null;\n principalType: \"user\" | \"service\";\n installationId?: string;\n scopeId?: string;\n /**\n * True when a hydrated full workspace member could not be matched to an\n * organization member and runs with the anonymous org-scoped service\n * principal (org-wide visibility only, nothing user-private).\n */\n anonymousMember?: boolean;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/integrations/types.ts"],"names":[],"mappings":"AAiQA,MAAM,OAAO,kCAAmC,SAAQ,KAAK;IAIhD,QAAQ;IACR,UAAU;IAJZ,IAAI,GAAG,iCAAiC,CAAC;IAElD,YACW,QAAgB,EAChB,UAA6C;QAEtD,KAAK,CAAC,YAAY,QAAQ,qBAAqB,UAAU,EAAE,CAAC,CAAC;wBAHpD,QAAQ;0BACR,UAAU;QAGnB,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC;IACnD,CAAC;CACF;AAkKD,MAAM,UAAU,wBAAwB,CACtC,OAAwB,EACxB,UAA6C;IAE7C,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,kCAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC","sourcesContent":["import type { H3Event } from \"h3\";\n\nimport type { AgentChatEvent } from \"../agent/types.js\";\nimport type { EnvKeyConfig } from \"../server/create-server.js\";\n\nexport type IntegrationConversationType =\n | \"channel\"\n | \"private_channel\"\n | \"dm\"\n | \"group_dm\"\n | \"unknown\";\n\nexport type IntegrationTriggerKind = \"mention\" | \"dm\" | \"thread_reply\";\n\nexport interface IntegrationActorTrust {\n memberType: \"owner\" | \"admin\" | \"member\" | \"guest\" | \"external\" | \"unknown\";\n verified: boolean;\n}\n\nexport interface IntegrationContextMessage {\n senderId?: string;\n senderName?: string;\n text: string;\n timestamp: number;\n sourceUrl?: string;\n reactions?: Array<{ name: string; count: number }>;\n files?: IntegrationFileReference[];\n}\n\nexport interface IntegrationFileReference {\n id: string;\n name?: string;\n mimetype?: string;\n size?: number;\n permalink?: string;\n downloadUrl?: string;\n}\n\n/**\n * Normalized incoming message from any messaging platform.\n */\nexport interface IncomingMessage {\n /** Platform identifier (e.g., \"slack\", \"telegram\", \"whatsapp\") */\n platform: string;\n /** Platform-specific thread/conversation identifier */\n externalThreadId: string;\n /** Message text content */\n text: string;\n /** Display name of the sender */\n senderName?: string;\n /** Verified sender email, when the platform can provide one */\n senderEmail?: string;\n /** Platform-specific sender ID */\n senderId?: string;\n /** How this message intentionally invoked an agent. */\n triggerKind?: IntegrationTriggerKind;\n /** Normalized provider conversation type for policy evaluation. */\n conversationType?: IntegrationConversationType;\n /** Provider tenant/workspace identifier. */\n tenantId?: string;\n /** Authorized integration scope resolved before execution. */\n integrationScopeId?: string;\n /** Normalized actor trust; unknown/unverified callers fail closed. */\n actorTrust?: IntegrationActorTrust;\n /** Bounded provider-native conversation context hydrated at run time. */\n contextMessages?: IntegrationContextMessage[];\n /** Provider file references only. Raw file bodies never belong here. */\n files?: IntegrationFileReference[];\n /** Server-verified approval grants carried by an interaction continuation. */\n approvedToolCalls?: string[];\n /**\n * Whether the platform cryptographically authenticated that the message\n * genuinely came from the claimed sender (e.g. inbound email that passed\n * DKIM, or an aligned SPF pass, for the From domain). Defaults to\n * undefined/false for platforms that don't provide sender authentication.\n *\n * Owner-resolution paths that grant a real user's identity/credentials\n * MUST treat a missing/false value as \"unverified\" and fail closed —\n * never derive a privileged acting identity from an unverified sender.\n */\n senderVerified?: boolean;\n /** Raw platform-specific context needed for routing responses */\n platformContext: Record<string, unknown>;\n /**\n * Short-lived delivery context needed only while the queued task is active.\n * Secrets such as Discord interaction tokens belong here, never in\n * `platformContext`, thread mappings, logs, or agent-visible context.\n */\n responseContext?: Record<string, unknown>;\n /** Provider-native thread/topic reference, when one exists. */\n threadRef?: string;\n /**\n * Canonical provider URL for the originating message thread, when the\n * provider can resolve one. This is safe agent-visible provenance (not a\n * credential) and should be preserved across A2A delegation so created\n * artifacts can link back to their request source.\n */\n sourceUrl?: string;\n /**\n * Trusted app-side routing guidance added after provider parsing. Adapters\n * should not copy this from user-controlled webhook payload fields.\n */\n routingHint?: {\n targetAgent?: string;\n instruction: string;\n };\n /**\n * Trusted app-side note about the caller's identity/visibility tier, set\n * after execution-context resolution (e.g. an anonymous org-scoped Slack\n * member). Surfaced to the agent as integration context. Adapters must not\n * copy this from user-controlled webhook payload fields.\n */\n identityNote?: string;\n /** Provider-native message/activity reference for contextual replies. */\n replyRef?: string;\n /** Message timestamp (epoch ms) */\n timestamp: number;\n}\n\n/**\n * Outgoing message to send back to a messaging platform.\n */\nexport interface OutgoingMessage {\n /** Text content of the response */\n text: string;\n /** Platform-specific payload (e.g., Slack blocks, Telegram parse_mode) */\n platformContext: Record<string, unknown>;\n}\n\n/** Provider-confirmed references for a successfully delivered response. */\nexport interface PlatformDeliveryReceipt {\n status: \"delivered\";\n /** Opaque provider message ids/timestamps; never message content. */\n messageRefs?: string[];\n}\n\nexport interface PlatformDeliveryOptions {\n /** Provider-owned message reference that should be updated in place. */\n placeholderRef?: string;\n /** Stable logical delivery key for provider-side retry reconciliation. */\n idempotencyKey?: string;\n /** Earliest provider timestamp (epoch ms) that can contain this delivery. */\n reconcileAfter?: number;\n /** Abort provider I/O before the caller releases its durable delivery claim. */\n signal?: AbortSignal;\n /** Do not fall back to a fresh post if the stable target cannot be updated. */\n strictTargetRef?: boolean;\n}\n\n/**\n * Proactive outbound message target for a platform.\n * Used when the agent needs to send to a saved destination instead of replying\n * to the current inbound thread.\n */\nexport interface OutboundTarget {\n /** Canonical platform-specific destination id (channel, chat, thread, etc.) */\n destination: string;\n /** Optional thread reference when the destination supports threading */\n threadRef?: string | null;\n /** Optional fallback display label */\n label?: string;\n /** Provider tenant/workspace used to select an installation credential. */\n tenantId?: string;\n /** Managed installation id when the caller already resolved it. */\n installationId?: string;\n /**\n * Provider installation key identifying which connected app to send as.\n * Required when a tenant has more than one app of the same platform\n * connected — without it the adapter cannot tell them apart and refuses to\n * guess rather than posting under the wrong bot identity.\n */\n installationKey?: string;\n}\n\n/**\n * Connection status for a platform integration.\n */\nexport interface IntegrationStatus {\n platform: string;\n /** Human-readable label (e.g., \"Slack\", \"Telegram\") */\n label: string;\n /** Whether the integration is explicitly enabled */\n enabled: boolean;\n /** Whether all required credentials are configured */\n configured: boolean;\n /** Platform-specific details (workspace name, bot username, etc.) */\n details?: Record<string, unknown>;\n /** Error message if something is wrong */\n error?: string;\n /** The webhook URL that should be configured in the platform */\n webhookUrl?: string;\n /** The full list of env keys (required + optional) the adapter recognizes,\n * including UI hints. Surfaced on the integrations status endpoint so the\n * frontend can render fields without hard-coding them per platform. */\n requiredEnvKeys?: import(\"../server/create-server.js\").EnvKeyConfig[];\n}\n\nexport interface PlatformAdapterCapabilities {\n /** The adapter can deliver a response to the current inbound event. */\n replyText: boolean;\n /** The adapter can send without an active inbound event. */\n proactiveMessages: boolean;\n /** The adapter preserves a provider-native thread or topic reference. */\n nativeThreads: boolean;\n /** The adapter can quote/reply to a specific inbound message. */\n contextualReplies: boolean;\n /** The provider requires an immediate deferred webhook acknowledgement. */\n deferredWebhookResponse: boolean;\n /** The adapter only receives explicit interactions, not ordinary messages. */\n interactionOnly?: boolean;\n /** The adapter can hydrate bounded native thread/file/reaction context. */\n nativeContextHydration?: boolean;\n /** The adapter can surface live agent progress in the provider UI. */\n liveRunProgress?: boolean;\n}\n\nexport interface PlatformRunProgress {\n /**\n * Opaque, provider-owned reference for resuming this progress surface from a\n * durable continuation. It deliberately contains no user content,\n * credentials, or provider payload.\n */\n ref?: PlatformRunProgressRef;\n /** Stable provider message target that can receive the terminal answer. */\n responseTargetRef?: string;\n /** Receive normalized agent events. Implementations should throttle writes. */\n onEvent(\n event: AgentChatEvent,\n opts?: { signal?: AbortSignal },\n ): Promise<void> | void;\n /** Finalize the provider-native progress surface with the answer. */\n complete(\n message: OutgoingMessage,\n opts?: { signal?: AbortSignal },\n ): Promise<void | PlatformDeliveryReceipt>;\n /** Mark the provider-native surface failed and leave a retryable explanation. */\n fail?(message: string, opts?: { signal?: AbortSignal }): Promise<void>;\n}\n\n/**\n * Safe, minimal reference to a provider-native run-progress surface.\n *\n * The field values are opaque to the framework. Adapters may use `kind` to\n * distinguish their own resume strategy and `streamTs` to identify the\n * provider-side stream. No incoming message text, platform payload, or\n * credential belongs here.\n */\nexport interface PlatformRunProgressRef {\n kind: string;\n streamTs: string;\n}\n\nexport interface ImmediateWebhookResponse {\n status: number;\n body: unknown;\n}\n\nexport class UnsupportedPlatformCapabilityError extends Error {\n readonly code = \"UNSUPPORTED_PLATFORM_CAPABILITY\";\n\n constructor(\n readonly platform: string,\n readonly capability: keyof PlatformAdapterCapabilities,\n ) {\n super(`Platform ${platform} does not support ${capability}`);\n this.name = \"UnsupportedPlatformCapabilityError\";\n }\n}\n\n/**\n * Platform adapter interface — implement this for each messaging platform.\n *\n * Each adapter handles the platform-specific concerns:\n * - Webhook verification (HMAC signatures, challenge responses)\n * - Message parsing (platform events → normalized IncomingMessage)\n * - Response formatting (agent text → platform-specific format)\n * - Response delivery (POST back to platform API)\n */\nexport interface PlatformAdapter {\n /** Unique platform identifier */\n readonly platform: string;\n /** Human-readable label */\n readonly label: string;\n /** Explicit runtime behavior. Missing fields are treated as unsupported. */\n readonly capabilities?: Partial<PlatformAdapterCapabilities>;\n\n /** Env keys this adapter needs (tokens, secrets, etc.) */\n getRequiredEnvKeys(): EnvKeyConfig[];\n\n /**\n * Handle platform-specific verification challenges.\n * For example, Slack sends a `url_verification` event when setting up.\n * Return `{ handled: true, response }` to short-circuit the webhook handler.\n */\n handleVerification(event: H3Event): Promise<{\n handled: boolean;\n response?: unknown;\n }>;\n\n /**\n * Validate the webhook request signature.\n * Returns true if the request is authentic.\n */\n verifyWebhook(event: H3Event): Promise<boolean>;\n\n /**\n * Parse the webhook payload into a normalized IncomingMessage.\n * Return null to silently ignore the event (bot messages, edits, etc.).\n */\n parseIncomingMessage(event: H3Event): Promise<IncomingMessage | null>;\n\n /**\n * Hydrate bounded provider-native context after durable enqueue, outside the\n * provider acknowledgement budget. Implementations must return references,\n * metadata, and text only — never persist file bodies or credentials.\n */\n hydrateIncomingMessage?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Hydrate only verified sender identity before execution-context selection.\n * This runs on the provider acknowledgement path and must avoid fetching\n * conversation history or file bodies.\n */\n hydrateIncomingIdentity?(incoming: IncomingMessage): Promise<IncomingMessage>;\n\n /**\n * Provider-specific response returned only after a message is verified and\n * durably enqueued. Discord uses this to return a type-5 deferred response\n * within its three-second interaction deadline.\n */\n getImmediateWebhookResponse?(\n incoming: IncomingMessage,\n ): ImmediateWebhookResponse | null;\n\n /**\n * Return pre-canonical thread ids used by older adapter versions. The\n * integration handler checks these only when the canonical mapping is\n * missing, then aliases a match to the canonical id without forking history.\n */\n getLegacyExternalThreadIds?(incoming: IncomingMessage): string[];\n\n /**\n * Send the agent's response back to the messaging platform.\n *\n * If `opts.placeholderRef` is provided (returned earlier by\n * `postProcessingPlaceholder`), adapters that support in-place edits should\n * update that placeholder message rather than posting a new one. Adapters\n * without an \"update message\" API can ignore the ref and post fresh.\n */\n sendResponse(\n message: OutgoingMessage,\n context: IncomingMessage,\n opts?: PlatformDeliveryOptions,\n ): Promise<void | PlatformDeliveryReceipt>;\n\n /**\n * Send a short best-effort system notice to the conversation the incoming\n * message arrived on (polite identity declines, one-time access guidance).\n * Bypasses agent formatting. When `dedupeKey` is provided, the adapter may\n * drop the notice if the same key was sent recently. Callers must treat\n * failures as non-fatal.\n */\n sendSystemNotice?(\n incoming: IncomingMessage,\n text: string,\n opts?: {\n dedupeKey?: string;\n /** Dedupe window for `dedupeKey`. Adapters pick a default when omitted. */\n dedupeTtlMs?: number;\n },\n ): Promise<void>;\n\n /**\n * Optionally post a \"working on it…\" placeholder message immediately when a\n * webhook arrives, before the agent loop runs. Adapters that support\n * in-place message edits (Slack via `chat.update`, etc.) return an opaque\n * `placeholderRef` that the webhook flow threads through to `sendResponse`\n * so the same message is updated with the final answer once ready.\n *\n * Adapters without edit support should leave this undefined; the webhook\n * handler will skip the placeholder step entirely.\n */\n postProcessingPlaceholder?(\n incoming: IncomingMessage,\n ): Promise<{ placeholderRef: string } | null>;\n\n /** Start a provider-native progress/streaming surface for an agent run. */\n startRunProgress?(\n incoming: IncomingMessage,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Reattach a durable continuation to a provider-native progress surface\n * previously started by this adapter. Adapters that cannot resume a native\n * surface should omit this and the continuation will use its normal reply\n * path instead.\n */\n resumeRunProgress?(\n incoming: IncomingMessage,\n ref: PlatformRunProgressRef,\n ): Promise<PlatformRunProgress | null>;\n\n /**\n * Send a proactive outbound message to a platform destination. Adapters that\n * only support direct replies can omit this.\n */\n sendMessageToTarget?(\n message: OutgoingMessage,\n target: OutboundTarget,\n ): Promise<void>;\n\n /**\n * Format plain agent response text into a platform-appropriate message.\n * Handles markdown conversion, message splitting for length limits, etc.\n *\n * `opts.threadDeepLinkUrl`, when present, is a URL back to the originating\n * thread in the dispatch UI. Adapters that support rich blocks should\n * render this as a button (Slack); adapters that don't may inline it as a\n * link or simply omit it.\n */\n formatAgentResponse(\n text: string,\n opts?: { threadDeepLinkUrl?: string },\n ): OutgoingMessage;\n\n /** Return current connection/configuration status for the settings UI. */\n getStatus(baseUrl?: string): Promise<IntegrationStatus>;\n}\n\nexport function assertPlatformCapability(\n adapter: PlatformAdapter,\n capability: keyof PlatformAdapterCapabilities,\n): void {\n if (adapter.capabilities?.[capability] !== true) {\n throw new UnsupportedPlatformCapabilityError(adapter.platform, capability);\n }\n}\n\n/**\n * Options for the integrations plugin.\n */\nexport interface IntegrationsPluginOptions {\n /** App identifier used by call-agent to prevent self-calls (e.g. \"dispatch\"). */\n appId?: string;\n /** Full adapter set to enable. Default: all built-in adapters. */\n adapters?: PlatformAdapter[];\n /** Replace built-in adapters by platform without removing the other defaults. */\n adapterOverrides?: PlatformAdapter[];\n /** System prompt for the agent (same as agent-chat). Inherited from agent-chat plugin if not set. */\n systemPrompt?: string;\n /** Actions registry (same as agent-chat). */\n actions?: Record<string, import(\"../agent/production-agent.js\").ActionEntry>;\n /** Model to use. Defaults to the resolved engine's default model. */\n model?: string;\n /** Anthropic API key. Falls back to ANTHROPIC_API_KEY env var. */\n apiKey?: string;\n /** Agent engine to use. Defaults to the same engine resolver as web chat. */\n engine?:\n | import(\"../agent/engine/types.js\").AgentEngine\n | string\n | {\n name: string;\n config: Record<string, unknown>;\n };\n /**\n * Resolve which owner should receive personal resource context and own the\n * created chat thread for an incoming platform message.\n */\n resolveOwner?: (incoming: IncomingMessage) => string | Promise<string>;\n /**\n * Resolve the durable execution principal for an inbound provider message.\n * Shared channels should use a service principal; DMs may use a verified\n * linked user. When present this supersedes `resolveOwner`.\n */\n resolveExecutionContext?: (\n incoming: IncomingMessage,\n ) => IntegrationExecutionContext | Promise<IntegrationExecutionContext>;\n /**\n * Explicitly allow an unlinked, verified Slack workspace member to run a DM\n * with the installation organization's shared/service visibility. Disabled\n * by default: DM identity resolution fails closed unless an app deliberately\n * accepts this wider access tier.\n */\n allowAnonymousOrgScopedSlackDm?: boolean;\n /**\n * Optional preprocessor for inbound platform messages. Can intercept special\n * commands (such as `/link`) before the agent loop runs.\n */\n beforeProcess?: (\n incoming: IncomingMessage,\n adapter: PlatformAdapter,\n ) => Promise<\n | {\n handled: true;\n responseText?: string;\n }\n | { handled: false }\n >;\n}\n\nexport interface IntegrationExecutionContext {\n ownerEmail: string;\n orgId: string | null;\n principalType: \"user\" | \"service\";\n installationId?: string;\n scopeId?: string;\n /**\n * True when a hydrated full workspace member could not be matched to an\n * organization member and runs with the anonymous org-scoped service\n * principal (org-wide visibility only, nothing user-private).\n */\n anonymousMember?: boolean;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"webhook-handler.d.ts","sourceRoot":"","sources":["../../src/integrations/webhook-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,EAIL,KAAK,mBAAmB,EAEzB,MAAM,6BAA6B,CAAC;AAerC,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AA2DtC,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EAExB,MAAM,YAAY,CAAC;AA8FpB,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,eAAe,C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AE,eAAe,KACrB,OAAO,CACR;QACE,OAAO,EAAE,IAAI,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GACD;QAAE,OAAO,EAAE,KAAK,CAAA;KAAE,CACrB,CAAC;CACH;AAyDD,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,qBAAqB,CAAC,QAAQ,CAAC,EAC7C,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyB7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CA0E5C;AAyID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAgCrD;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,qBAAqB,EAC9B,eAAe,CAAC,EAAE;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GACA,OAAO,CAAC,4BAA4B,CAAC,CAmBvC;AA4rDD,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,sCAAsC,EAC/C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAsEf"}
@@ -362,7 +362,7 @@ async function enqueueAndDispatch(event, incoming, options, handlerStartedAt = D
362
362
  const settleWaitMs = options.adapter.capabilities?.deferredWebhookResponse
363
363
  ? Math.min(DEFERRED_RESPONSE_DISPATCH_SETTLE_WAIT_MS, Math.max(0, DEFERRED_RESPONSE_MAX_HANDLER_MS - (Date.now() - handlerStartedAt)))
364
364
  : PROCESSOR_DISPATCH_SETTLE_WAIT_MS;
365
- await dispatchPendingIntegrationTask({
365
+ const outcome = await dispatchPendingIntegrationTask({
366
366
  taskId,
367
367
  task: {
368
368
  platform: incoming.platform,
@@ -373,6 +373,21 @@ async function enqueueAndDispatch(event, incoming, options, handlerStartedAt = D
373
373
  baseUrl,
374
374
  portableSettleMs: settleWaitMs,
375
375
  });
376
+ // A definitive dispatch failure leaves a queued task nobody is running while
377
+ // the placeholder above already told the user work had started. Say so
378
+ // instead of leaving that indicator spinning until the sweep — if it runs.
379
+ if (outcome === "failed") {
380
+ console.error(`[integrations] dispatch failed for task ${taskId} (${incoming.platform}/${incoming.externalThreadId})`);
381
+ try {
382
+ await options.adapter.sendResponse({
383
+ text: "I couldn't start working on that — the request was accepted but never handed off. Please try again.",
384
+ platformContext: incoming.platformContext,
385
+ }, incoming);
386
+ }
387
+ catch (err) {
388
+ console.error("[integrations] failed to report dispatch failure to user:", err);
389
+ }
390
+ }
376
391
  }
377
392
  /**
378
393
  * Resolve the base URL we should dispatch the processor request to.