@agent-native/core 0.83.0 → 0.84.1

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 (508) hide show
  1. package/README.md +2 -2
  2. package/corpus/README.md +1 -1
  3. package/corpus/core/CHANGELOG.md +34 -0
  4. package/corpus/core/README.md +2 -2
  5. package/corpus/core/docs/content/cloneable-saas.mdx +2 -2
  6. package/corpus/core/docs/content/evals.mdx +34 -12
  7. package/corpus/core/docs/content/faq.mdx +1 -1
  8. package/corpus/core/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
  9. package/corpus/core/docs/content/locales/ar-SA/evals.mdx +7 -0
  10. package/corpus/core/docs/content/locales/ar-SA/faq.mdx +1 -1
  11. package/corpus/core/docs/content/locales/ar-SA/template-chat.mdx +1 -1
  12. package/corpus/core/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
  13. package/corpus/core/docs/content/locales/de-DE/evals.mdx +8 -0
  14. package/corpus/core/docs/content/locales/de-DE/faq.mdx +1 -1
  15. package/corpus/core/docs/content/locales/de-DE/template-chat.mdx +1 -1
  16. package/corpus/core/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
  17. package/corpus/core/docs/content/locales/es-ES/evals.mdx +8 -0
  18. package/corpus/core/docs/content/locales/es-ES/faq.mdx +1 -1
  19. package/corpus/core/docs/content/locales/es-ES/template-chat.mdx +1 -1
  20. package/corpus/core/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
  21. package/corpus/core/docs/content/locales/fr-FR/evals.mdx +8 -0
  22. package/corpus/core/docs/content/locales/fr-FR/faq.mdx +1 -1
  23. package/corpus/core/docs/content/locales/fr-FR/template-chat.mdx +1 -1
  24. package/corpus/core/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
  25. package/corpus/core/docs/content/locales/hi-IN/evals.mdx +8 -0
  26. package/corpus/core/docs/content/locales/hi-IN/faq.mdx +1 -1
  27. package/corpus/core/docs/content/locales/hi-IN/template-chat.mdx +1 -1
  28. package/corpus/core/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
  29. package/corpus/core/docs/content/locales/ja-JP/evals.mdx +7 -0
  30. package/corpus/core/docs/content/locales/ja-JP/faq.mdx +1 -1
  31. package/corpus/core/docs/content/locales/ja-JP/template-chat.mdx +1 -1
  32. package/corpus/core/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
  33. package/corpus/core/docs/content/locales/ko-KR/evals.mdx +7 -0
  34. package/corpus/core/docs/content/locales/ko-KR/faq.mdx +1 -1
  35. package/corpus/core/docs/content/locales/ko-KR/template-chat.mdx +1 -1
  36. package/corpus/core/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
  37. package/corpus/core/docs/content/locales/pt-BR/evals.mdx +8 -0
  38. package/corpus/core/docs/content/locales/pt-BR/faq.mdx +1 -1
  39. package/corpus/core/docs/content/locales/pt-BR/template-chat.mdx +1 -1
  40. package/corpus/core/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
  41. package/corpus/core/docs/content/locales/zh-CN/evals.mdx +7 -0
  42. package/corpus/core/docs/content/locales/zh-CN/faq.mdx +1 -1
  43. package/corpus/core/docs/content/locales/zh-CN/template-chat.mdx +1 -1
  44. package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
  45. package/corpus/core/docs/content/locales/zh-TW/evals.mdx +7 -0
  46. package/corpus/core/docs/content/locales/zh-TW/faq.mdx +1 -1
  47. package/corpus/core/docs/content/locales/zh-TW/template-chat.mdx +1 -1
  48. package/corpus/core/docs/content/template-chat.mdx +1 -1
  49. package/corpus/core/package.json +1 -1
  50. package/corpus/core/src/agent/engine/builtin.ts +1 -1
  51. package/corpus/core/src/agent/engine/output-tokens.ts +1 -1
  52. package/corpus/core/src/agent/harness/acp-adapter.ts +28 -4
  53. package/corpus/core/src/agent/harness/ai-sdk-adapter.ts +3 -0
  54. package/corpus/core/src/agent/harness/translate.ts +3 -0
  55. package/corpus/core/src/agent/harness/types.ts +1 -0
  56. package/corpus/core/src/agent/model-config.ts +34 -13
  57. package/corpus/core/src/agent/production-agent.ts +87 -10
  58. package/corpus/core/src/agent/thread-data-builder.ts +29 -4
  59. package/corpus/core/src/agent/tool-call-journal.ts +109 -48
  60. package/corpus/core/src/agent/types.ts +6 -1
  61. package/corpus/core/src/cli/design-connect.ts +106 -0
  62. package/corpus/core/src/cli/gateway-helpers.ts +17 -0
  63. package/corpus/core/src/cli/recap.ts +0 -2
  64. package/corpus/core/src/cli/skills.ts +54 -16
  65. package/corpus/core/src/cli/workspace-dev.ts +29 -5
  66. package/corpus/core/src/client/AssistantChat.tsx +89 -42
  67. package/corpus/core/src/client/DefaultSpinner.tsx +8 -1
  68. package/corpus/core/src/client/chat/message-components.tsx +49 -1
  69. package/corpus/core/src/client/chat/repo-helpers.ts +71 -0
  70. package/corpus/core/src/client/chat/run-recovery.tsx +15 -5
  71. package/corpus/core/src/client/components/ApiKeySettings.tsx +8 -8
  72. package/corpus/core/src/client/components/CodeRequiredDialog.tsx +26 -15
  73. package/corpus/core/src/client/components/MissingKeyCard.tsx +13 -6
  74. package/corpus/core/src/client/composer/TiptapComposer.tsx +4 -3
  75. package/corpus/core/src/client/extensions/ExtensionsSidebarSection.tsx +0 -1
  76. package/corpus/core/src/client/guided-questions.tsx +21 -27
  77. package/corpus/core/src/client/integrations/IntegrationCard.tsx +1 -1
  78. package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +1 -1
  79. package/corpus/core/src/client/onboarding/OnboardingBanner.tsx +2 -2
  80. package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +23 -19
  81. package/corpus/core/src/client/resources/ResourceEditor.tsx +18 -10
  82. package/corpus/core/src/client/resources/ResourcesPanel.tsx +5 -1
  83. package/corpus/core/src/client/settings/SettingsPanel.tsx +8 -3
  84. package/corpus/core/src/client/settings/useBuilderStatus.ts +8 -41
  85. package/corpus/core/src/client/useProductionAgent.ts +6 -2
  86. package/corpus/core/src/deploy/build.ts +1 -1
  87. package/corpus/core/src/eval/define-eval.ts +4 -1
  88. package/corpus/core/src/eval/report.ts +23 -8
  89. package/corpus/core/src/eval/runner.ts +41 -6
  90. package/corpus/core/src/eval/types.ts +11 -0
  91. package/corpus/core/src/observability/traces.ts +3 -3
  92. package/corpus/core/src/onboarding/default-steps.ts +1 -1
  93. package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +1 -1
  94. package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +1 -1
  95. package/corpus/core/src/server/agent-chat-plugin.ts +177 -81
  96. package/corpus/core/src/server/core-routes-plugin.ts +7 -1
  97. package/corpus/core/src/server/open-route.ts +59 -40
  98. package/corpus/core/src/shared/reasoning-effort.ts +2 -0
  99. package/corpus/core/src/sharing/access.ts +22 -2
  100. package/corpus/core/src/sharing/registry.ts +18 -0
  101. package/corpus/core/src/styles/agent-native.css +104 -20
  102. package/corpus/core/src/styles/rich-markdown-editor.css +11 -10
  103. package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +10 -10
  104. package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +10 -10
  105. package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +6 -5
  106. package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +9 -9
  107. package/corpus/templates/analytics/app/global.css +4 -0
  108. package/corpus/templates/analytics/app/lib/chart-theme.ts +13 -0
  109. package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +22 -24
  110. package/corpus/templates/analytics/changelog/2026-06-30-dashboard-charts-now-use-theme-aware-tooltip-and-grid-colors.md +6 -0
  111. package/corpus/templates/analytics/changelog/2026-06-30-fixed-ask-composer-spacing-so-the-chat-field-has-a-comfortab.md +6 -0
  112. package/corpus/templates/calendar/AGENTS.md +4 -0
  113. package/corpus/templates/calendar/actions/connect-google-calendar.ts +80 -0
  114. package/corpus/templates/calendar/changelog/2026-06-30-calendar-now-gives-the-agent-a-safe-google-connection-link-i.md +6 -0
  115. package/corpus/templates/calendar/server/plugins/agent-chat.ts +4 -0
  116. package/corpus/templates/content/AGENTS.md +9 -2
  117. package/corpus/templates/content/actions/_database-row-batch.ts +230 -0
  118. package/corpus/templates/content/actions/_database-utils.ts +17 -9
  119. package/corpus/templates/content/actions/_notion-action-utils.ts +26 -0
  120. package/corpus/templates/content/actions/connect-notion-status.ts +13 -4
  121. package/corpus/templates/content/actions/create-and-link-notion-page.ts +23 -0
  122. package/corpus/templates/content/actions/delete-database-items.ts +55 -0
  123. package/corpus/templates/content/actions/delete-document.ts +4 -4
  124. package/corpus/templates/content/actions/disconnect-notion.ts +16 -0
  125. package/corpus/templates/content/actions/duplicate-database-item.ts +1 -1
  126. package/corpus/templates/content/actions/duplicate-database-items.ts +191 -0
  127. package/corpus/templates/content/actions/link-notion-page.ts +10 -7
  128. package/corpus/templates/content/actions/list-notion-links.ts +3 -4
  129. package/corpus/templates/content/actions/pull-notion-page.ts +7 -9
  130. package/corpus/templates/content/actions/push-notion-page.ts +7 -9
  131. package/corpus/templates/content/actions/refresh-notion-sync-status.ts +24 -0
  132. package/corpus/templates/content/actions/resolve-notion-sync-conflict.ts +23 -0
  133. package/corpus/templates/content/actions/search-notion-pages.ts +67 -0
  134. package/corpus/templates/content/actions/unlink-notion-page.ts +23 -0
  135. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
  136. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +27 -34
  137. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +16 -13
  138. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +10 -10
  139. package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
  140. package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +18 -9
  141. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +27 -34
  142. package/corpus/templates/content/app/components/editor/database/navigation-state.ts +10 -4
  143. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +32 -17
  144. package/corpus/templates/content/app/global.css +6 -5
  145. package/corpus/templates/content/app/hooks/use-content-database.ts +35 -0
  146. package/corpus/templates/content/app/hooks/use-notion.ts +108 -99
  147. package/corpus/templates/content/changelog/2026-06-30-editor-floating-toolbars-now-use-theme-aware-colors-in-light.md +6 -0
  148. package/corpus/templates/content/package.json +3 -0
  149. package/corpus/templates/content/parity/README.md +69 -0
  150. package/corpus/templates/content/parity/eval-scenarios.ts +118 -0
  151. package/corpus/templates/content/parity/exceptions.allowlist.ts +17 -0
  152. package/corpus/templates/content/parity/matrix.md +28 -0
  153. package/corpus/templates/content/parity/matrix.ts +606 -0
  154. package/corpus/templates/content/parity/matrix.types.ts +42 -0
  155. package/corpus/templates/content/parity/parity-evals.eval.ts +4 -0
  156. package/corpus/templates/content/parity/render-matrix.ts +90 -0
  157. package/corpus/templates/content/parity/scenario-to-eval.ts +57 -0
  158. package/corpus/templates/content/shared/api.ts +11 -0
  159. package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +6 -1
  160. package/corpus/templates/design/actions/add-localhost-screens.ts +63 -8
  161. package/corpus/templates/design/actions/apply-motion-edit.ts +12 -46
  162. package/corpus/templates/design/actions/list-design-native-assets.ts +2 -1
  163. package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +49 -1
  164. package/corpus/templates/design/actions/navigate.ts +3 -12
  165. package/corpus/templates/design/actions/open-visual-edit.ts +341 -0
  166. package/corpus/templates/design/actions/view-screen.ts +1 -1
  167. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +1 -1
  168. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +345 -14
  169. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +71 -91
  170. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +25 -27
  171. package/corpus/templates/design/app/components/design/DeviceFrame.tsx +1 -1
  172. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +2 -2
  173. package/corpus/templates/design/app/components/design/EditPanel.tsx +1111 -570
  174. package/corpus/templates/design/app/components/design/LayersPanel.tsx +162 -32
  175. package/corpus/templates/design/app/components/design/MotionDock.tsx +268 -240
  176. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +1038 -150
  177. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -1
  178. package/corpus/templates/design/app/components/design/ReviewPanel.tsx +81 -102
  179. package/corpus/templates/design/app/components/design/StatesPanel.tsx +6 -6
  180. package/corpus/templates/design/app/components/design/TokensPanel.tsx +11 -11
  181. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +9 -7
  182. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +1129 -155
  183. package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +130 -37
  184. package/corpus/templates/design/app/components/design/canvas-primitive-style.ts +24 -11
  185. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +184 -162
  186. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +137 -79
  187. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +13 -13
  188. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +8 -8
  189. package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +2 -2
  190. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +4 -4
  191. package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +3 -3
  192. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -7
  193. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -11
  194. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +4 -4
  195. package/corpus/templates/design/app/components/design/inspector/index.ts +2 -0
  196. package/corpus/templates/design/app/components/design/types.ts +19 -0
  197. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +61 -78
  198. package/corpus/templates/design/app/components/layout/Header.tsx +0 -1
  199. package/corpus/templates/design/app/components/layout/Layout.tsx +3 -2
  200. package/corpus/templates/design/app/components/layout/Sidebar.tsx +0 -2
  201. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +5 -4
  202. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +1 -1
  203. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +2 -2
  204. package/corpus/templates/design/app/global.css +56 -0
  205. package/corpus/templates/design/app/hooks/use-agent-generating.ts +4 -5
  206. package/corpus/templates/design/app/hooks/use-navigation-state.ts +6 -7
  207. package/corpus/templates/design/app/hooks/use-question-flow.ts +3 -2
  208. package/corpus/templates/design/app/hooks/useAgentEditRequest.ts +6 -4
  209. package/corpus/templates/design/app/i18n/zh-TW.ts +5 -14
  210. package/corpus/templates/design/app/i18n-data.ts +63 -188
  211. package/corpus/templates/design/app/lib/agent-chat.ts +13 -0
  212. package/corpus/templates/design/app/pages/DesignEditor.tsx +1428 -384
  213. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +9 -5
  214. package/corpus/templates/design/app/pages/DesignSystems.tsx +2 -2
  215. package/corpus/templates/design/app/pages/Index.tsx +49 -26
  216. package/corpus/templates/design/app/pages/NotFound.tsx +25 -8
  217. package/corpus/templates/design/app/pages/VisualEdit.tsx +17 -5
  218. package/corpus/templates/design/app/routes/examples.tsx +1 -7
  219. package/corpus/templates/design/app/routes/templates.tsx +7 -4
  220. package/corpus/templates/design/changelog/2026-06-30-board-shapes-and-auto-layout-controls-are-clearer.md +6 -0
  221. package/corpus/templates/design/changelog/2026-06-30-component-selections-now-use-purple-component-chrome-and-sho.md +6 -0
  222. package/corpus/templates/design/changelog/2026-06-30-constraints-now-stay-tucked-into-a-compact-inspector-preview.md +6 -0
  223. package/corpus/templates/design/changelog/2026-06-30-creating-a-component-now-opens-in-a-compact-inspector-popove.md +6 -0
  224. package/corpus/templates/design/changelog/2026-06-30-design-cards-no-longer-show-legacy-project-type-badges.md +6 -0
  225. package/corpus/templates/design/changelog/2026-06-30-design-chat-now-keeps-new-turns-in-the-visible-design-agent-.md +6 -0
  226. package/corpus/templates/design/changelog/2026-06-30-design-editor-panels-now-keep-their-compact-text-sizing-cons.md +6 -0
  227. package/corpus/templates/design/changelog/2026-06-30-design-no-longer-shows-the-connected-local-code-warning-bann.md +6 -0
  228. package/corpus/templates/design/changelog/2026-06-30-design-now-opens-to-the-files-panel-unless-a-generation-is-a.md +6 -0
  229. package/corpus/templates/design/changelog/2026-06-30-design-opens-with-a-cleaner-empty-canvas-and-loading-preview.md +6 -0
  230. package/corpus/templates/design/changelog/2026-06-30-design-tools-use-simpler-less-decorative-icons.md +6 -0
  231. package/corpus/templates/design/changelog/2026-06-30-dragging-absolute-elements-no-longer-shows-coordinate-labels.md +6 -0
  232. package/corpus/templates/design/changelog/2026-06-30-fixed-all-screens-opening-too-zoomed-in-by-default.md +6 -0
  233. package/corpus/templates/design/changelog/2026-06-30-fixed-the-public-design-assets-sidebar-so-native-components-.md +6 -0
  234. package/corpus/templates/design/changelog/2026-06-30-fixed-the-screen-overview-board-so-empty-board-space-no-long.md +6 -0
  235. package/corpus/templates/design/changelog/2026-06-30-full-view-screens-can-now-scroll-while-remaining-editable.md +6 -0
  236. package/corpus/templates/design/changelog/2026-06-30-inspector-element-headers-show-the-selected-html-tag-and-the.md +6 -0
  237. package/corpus/templates/design/changelog/2026-06-30-inspector-inputs-stay-compact-across-desktop-breakpoints.md +6 -0
  238. package/corpus/templates/design/changelog/2026-06-30-layers-can-be-multi-selected-from-the-canvas-and-edited-toge.md +6 -0
  239. package/corpus/templates/design/changelog/2026-06-30-local-visual-edit-links-can-edit-localhost-frames-without-si.md +6 -0
  240. package/corpus/templates/design/changelog/2026-06-30-localhost-visual-edit-frames-can-now-be-selected-and-edited.md +6 -0
  241. package/corpus/templates/design/changelog/2026-06-30-marquee-selection-now-works-inside-screens-multi-selected-la.md +6 -0
  242. package/corpus/templates/design/changelog/2026-06-30-motion-is-now-available-from-the-persistent-left-rail-and-th.md +6 -0
  243. package/corpus/templates/design/changelog/2026-06-30-motion-timeline-collapse-and-reopen-animations-feel-smoother.md +6 -0
  244. package/corpus/templates/design/changelog/2026-06-30-multi-select-outlines-now-stay-consistent-across-all-screens.md +6 -0
  245. package/corpus/templates/design/changelog/2026-06-30-new-board-shapes-now-start-with-neutral-gray-styling.md +6 -0
  246. package/corpus/templates/design/changelog/2026-06-30-new-designs-open-into-a-steadier-loading-state-before-the-ed.md +6 -0
  247. package/corpus/templates/design/changelog/2026-06-30-new-designs-show-a-loading-state-during-handoff-and-keep-edi.md +6 -0
  248. package/corpus/templates/design/changelog/2026-06-30-public-visual-edit-design-links-now-open-directly-instead-of.md +6 -0
  249. package/corpus/templates/design/changelog/2026-06-30-removed-the-confusing-states-section-from-the-design-editor-.md +6 -0
  250. package/corpus/templates/design/changelog/2026-06-30-removed-the-templates-gallery-from-design-navigation.md +6 -0
  251. package/corpus/templates/design/changelog/2026-06-30-share-stays-visible-as-soon-as-editable-designs-load.md +6 -0
  252. package/corpus/templates/design/changelog/2026-06-30-signed-out-save-and-share-controls-use-simpler-labels-and-op.md +6 -0
  253. package/corpus/templates/design/changelog/2026-06-30-text-added-on-the-canvas-now-focuses-cleanly-with-the-right-.md +6 -0
  254. package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-is-simpler-and-its-bottom.md +6 -0
  255. package/corpus/templates/design/changelog/2026-06-30-the-design-editor-loading-skeleton-now-follows-the-current-t.md +6 -0
  256. package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-child-layout-controls-o.md +6 -0
  257. package/corpus/templates/design/changelog/2026-06-30-the-design-inspector-no-longer-shows-the-ask-ai-section-abov.md +6 -0
  258. package/corpus/templates/design/changelog/2026-06-30-the-design-review-panel-no-longer-shows-a-separate-inline-au.md +6 -0
  259. package/corpus/templates/design/changelog/2026-06-30-the-empty-designs-page-now-focuses-on-a-single-primary-new-d.md +6 -0
  260. package/corpus/templates/design/changelog/2026-06-30-the-layers-panel-header-stays-as-layers-while-multiple-items.md +6 -0
  261. package/corpus/templates/design/changelog/2026-06-30-the-missing-design-screen-now-uses-a-neutral-back-button.md +6 -0
  262. package/corpus/templates/design/changelog/2026-06-30-the-motion-timeline-now-closes-without-squeezing-the-canvas-.md +6 -0
  263. package/corpus/templates/design/changelog/2026-06-30-the-new-design-connect-ai-setup-now-lines-up-with-the-compos.md +6 -0
  264. package/corpus/templates/design/changelog/2026-06-30-the-screen-overview-board-now-blends-into-the-canvas-and-new.md +6 -0
  265. package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-drops-now-show-screen-guides.md +6 -0
  266. package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-keep-a-transparent-backdrop-and-.md +6 -0
  267. package/corpus/templates/design/changelog/2026-06-30-top-level-canvas-layers-now-select-reliably-from-all-screens.md +6 -0
  268. package/corpus/templates/design/changelog/2026-06-30-visual-edit-can-open-and-refresh-localhost-screens-in-one-au.md +6 -0
  269. package/corpus/templates/design/e2e/helpers.ts +15 -4
  270. package/corpus/templates/design/server/db/index.ts +52 -0
  271. package/corpus/templates/design/server/plugins/agent-chat.ts +5 -0
  272. package/corpus/templates/design/server/plugins/auth.ts +1 -0
  273. package/corpus/templates/design/server/plugins/core-routes.ts +4 -0
  274. package/corpus/templates/design/shared/board-file.ts +380 -5
  275. package/corpus/templates/design/shared/board-objects.ts +2 -2
  276. package/corpus/templates/design/shared/code-layer.ts +50 -6
  277. package/corpus/templates/design/shared/motion-compiler.ts +27 -0
  278. package/corpus/templates/macros/app/components/DailyProgress.tsx +41 -37
  279. package/corpus/templates/macros/app/components/ExerciseCard.tsx +2 -2
  280. package/corpus/templates/macros/app/components/MealCard.tsx +2 -2
  281. package/corpus/templates/macros/app/components/VoiceDictation.tsx +1 -1
  282. package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -1
  283. package/corpus/templates/macros/app/components/WeightCard.tsx +2 -2
  284. package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
  285. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -1
  286. package/corpus/templates/macros/app/routes/_index.tsx +5 -5
  287. package/corpus/templates/macros/app/routes/analytics.tsx +1 -1
  288. package/corpus/templates/macros/changelog/2026-06-30-dashboard-loading-and-chart-surfaces-now-use-theme-aware-col.md +6 -0
  289. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +14 -11
  290. package/corpus/templates/mail/app/global.css +3 -2
  291. package/corpus/templates/mail/changelog/2026-06-30-compose-floating-toolbars-now-use-theme-aware-colors-in-ligh.md +6 -0
  292. package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -2
  293. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +3 -3
  294. package/corpus/templates/slides/app/global.css +10 -0
  295. package/corpus/templates/slides/app/pages/Index.tsx +55 -51
  296. package/corpus/templates/slides/changelog/2026-06-30-deck-thumbnails-collapse-cleanly-to-one-column-when-the-chat.md +6 -0
  297. package/dist/agent/engine/anthropic-engine.d.ts +2 -2
  298. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  299. package/dist/agent/engine/builder-engine.d.ts +2 -2
  300. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  301. package/dist/agent/engine/builtin.js +1 -1
  302. package/dist/agent/engine/builtin.js.map +1 -1
  303. package/dist/agent/engine/output-tokens.js +1 -1
  304. package/dist/agent/engine/output-tokens.js.map +1 -1
  305. package/dist/agent/harness/acp-adapter.d.ts +4 -1
  306. package/dist/agent/harness/acp-adapter.d.ts.map +1 -1
  307. package/dist/agent/harness/acp-adapter.js +19 -2
  308. package/dist/agent/harness/acp-adapter.js.map +1 -1
  309. package/dist/agent/harness/ai-sdk-adapter.d.ts.map +1 -1
  310. package/dist/agent/harness/ai-sdk-adapter.js +3 -0
  311. package/dist/agent/harness/ai-sdk-adapter.js.map +1 -1
  312. package/dist/agent/harness/translate.d.ts.map +1 -1
  313. package/dist/agent/harness/translate.js +3 -0
  314. package/dist/agent/harness/translate.js.map +1 -1
  315. package/dist/agent/harness/types.d.ts +1 -0
  316. package/dist/agent/harness/types.d.ts.map +1 -1
  317. package/dist/agent/harness/types.js.map +1 -1
  318. package/dist/agent/model-config.d.ts +21 -20
  319. package/dist/agent/model-config.d.ts.map +1 -1
  320. package/dist/agent/model-config.js +31 -13
  321. package/dist/agent/model-config.js.map +1 -1
  322. package/dist/agent/production-agent.d.ts.map +1 -1
  323. package/dist/agent/production-agent.js +85 -10
  324. package/dist/agent/production-agent.js.map +1 -1
  325. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  326. package/dist/agent/thread-data-builder.js +27 -6
  327. package/dist/agent/thread-data-builder.js.map +1 -1
  328. package/dist/agent/tool-call-journal.d.ts +11 -9
  329. package/dist/agent/tool-call-journal.d.ts.map +1 -1
  330. package/dist/agent/tool-call-journal.js +92 -40
  331. package/dist/agent/tool-call-journal.js.map +1 -1
  332. package/dist/agent/types.d.ts +5 -1
  333. package/dist/agent/types.d.ts.map +1 -1
  334. package/dist/agent/types.js.map +1 -1
  335. package/dist/cli/design-connect.d.ts.map +1 -1
  336. package/dist/cli/design-connect.js +84 -0
  337. package/dist/cli/design-connect.js.map +1 -1
  338. package/dist/cli/gateway-helpers.d.ts +4 -0
  339. package/dist/cli/gateway-helpers.d.ts.map +1 -1
  340. package/dist/cli/gateway-helpers.js +9 -0
  341. package/dist/cli/gateway-helpers.js.map +1 -1
  342. package/dist/cli/recap.d.ts.map +1 -1
  343. package/dist/cli/recap.js +0 -2
  344. package/dist/cli/recap.js.map +1 -1
  345. package/dist/cli/skills.d.ts.map +1 -1
  346. package/dist/cli/skills.js +54 -16
  347. package/dist/cli/skills.js.map +1 -1
  348. package/dist/cli/workspace-dev.d.ts.map +1 -1
  349. package/dist/cli/workspace-dev.js +33 -6
  350. package/dist/cli/workspace-dev.js.map +1 -1
  351. package/dist/client/AssistantChat.d.ts.map +1 -1
  352. package/dist/client/AssistantChat.js +72 -26
  353. package/dist/client/AssistantChat.js.map +1 -1
  354. package/dist/client/DefaultSpinner.d.ts.map +1 -1
  355. package/dist/client/DefaultSpinner.js +8 -1
  356. package/dist/client/DefaultSpinner.js.map +1 -1
  357. package/dist/client/chat/message-components.d.ts +7 -1
  358. package/dist/client/chat/message-components.d.ts.map +1 -1
  359. package/dist/client/chat/message-components.js +37 -1
  360. package/dist/client/chat/message-components.js.map +1 -1
  361. package/dist/client/chat/repo-helpers.d.ts +1 -0
  362. package/dist/client/chat/repo-helpers.d.ts.map +1 -1
  363. package/dist/client/chat/repo-helpers.js +59 -0
  364. package/dist/client/chat/repo-helpers.js.map +1 -1
  365. package/dist/client/chat/run-recovery.d.ts.map +1 -1
  366. package/dist/client/chat/run-recovery.js +4 -4
  367. package/dist/client/chat/run-recovery.js.map +1 -1
  368. package/dist/client/components/ApiKeySettings.js +8 -8
  369. package/dist/client/components/ApiKeySettings.js.map +1 -1
  370. package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
  371. package/dist/client/components/CodeRequiredDialog.js +24 -15
  372. package/dist/client/components/CodeRequiredDialog.js.map +1 -1
  373. package/dist/client/components/MissingKeyCard.d.ts.map +1 -1
  374. package/dist/client/components/MissingKeyCard.js +11 -6
  375. package/dist/client/components/MissingKeyCard.js.map +1 -1
  376. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  377. package/dist/client/composer/TiptapComposer.js +4 -3
  378. package/dist/client/composer/TiptapComposer.js.map +1 -1
  379. package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
  380. package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
  381. package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
  382. package/dist/client/guided-questions.d.ts.map +1 -1
  383. package/dist/client/guided-questions.js +6 -6
  384. package/dist/client/guided-questions.js.map +1 -1
  385. package/dist/client/integrations/IntegrationCard.js +1 -1
  386. package/dist/client/integrations/IntegrationCard.js.map +1 -1
  387. package/dist/client/integrations/IntegrationsPanel.js +1 -1
  388. package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
  389. package/dist/client/onboarding/OnboardingBanner.js +2 -2
  390. package/dist/client/onboarding/OnboardingBanner.js.map +1 -1
  391. package/dist/client/onboarding/OnboardingPanel.js +23 -19
  392. package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
  393. package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
  394. package/dist/client/resources/ResourceEditor.js +13 -10
  395. package/dist/client/resources/ResourceEditor.js.map +1 -1
  396. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  397. package/dist/client/resources/ResourcesPanel.js +2 -1
  398. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  399. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  400. package/dist/client/settings/SettingsPanel.js +8 -3
  401. package/dist/client/settings/SettingsPanel.js.map +1 -1
  402. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
  403. package/dist/client/settings/useBuilderStatus.js +6 -38
  404. package/dist/client/settings/useBuilderStatus.js.map +1 -1
  405. package/dist/client/useProductionAgent.d.ts +2 -1
  406. package/dist/client/useProductionAgent.d.ts.map +1 -1
  407. package/dist/client/useProductionAgent.js.map +1 -1
  408. package/dist/collab/awareness.d.ts +2 -2
  409. package/dist/collab/awareness.d.ts.map +1 -1
  410. package/dist/collab/routes.d.ts +1 -1
  411. package/dist/deploy/build.js +1 -1
  412. package/dist/deploy/build.js.map +1 -1
  413. package/dist/eval/define-eval.d.ts.map +1 -1
  414. package/dist/eval/define-eval.js +2 -1
  415. package/dist/eval/define-eval.js.map +1 -1
  416. package/dist/eval/report.d.ts.map +1 -1
  417. package/dist/eval/report.js +19 -4
  418. package/dist/eval/report.js.map +1 -1
  419. package/dist/eval/runner.d.ts.map +1 -1
  420. package/dist/eval/runner.js +38 -6
  421. package/dist/eval/runner.js.map +1 -1
  422. package/dist/eval/types.d.ts +11 -0
  423. package/dist/eval/types.d.ts.map +1 -1
  424. package/dist/eval/types.js.map +1 -1
  425. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  426. package/dist/notifications/routes.d.ts +3 -3
  427. package/dist/observability/routes.d.ts +5 -5
  428. package/dist/observability/traces.d.ts.map +1 -1
  429. package/dist/observability/traces.js.map +1 -1
  430. package/dist/onboarding/default-steps.js +1 -1
  431. package/dist/onboarding/default-steps.js.map +1 -1
  432. package/dist/progress/routes.d.ts +1 -1
  433. package/dist/resources/handlers.d.ts +1 -1
  434. package/dist/scripts/agent-engines/manage-agent-engine.js +1 -1
  435. package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
  436. package/dist/scripts/agent-engines/set-agent-engine.js +1 -1
  437. package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
  438. package/dist/server/agent-chat-plugin.d.ts +3 -0
  439. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  440. package/dist/server/agent-chat-plugin.js +134 -72
  441. package/dist/server/agent-chat-plugin.js.map +1 -1
  442. package/dist/server/core-routes-plugin.d.ts +3 -0
  443. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  444. package/dist/server/core-routes-plugin.js +4 -1
  445. package/dist/server/core-routes-plugin.js.map +1 -1
  446. package/dist/server/open-route.d.ts +9 -0
  447. package/dist/server/open-route.d.ts.map +1 -1
  448. package/dist/server/open-route.js +48 -38
  449. package/dist/server/open-route.js.map +1 -1
  450. package/dist/shared/reasoning-effort.js +3 -0
  451. package/dist/shared/reasoning-effort.js.map +1 -1
  452. package/dist/sharing/access.d.ts.map +1 -1
  453. package/dist/sharing/access.js +18 -2
  454. package/dist/sharing/access.js.map +1 -1
  455. package/dist/sharing/registry.d.ts +10 -0
  456. package/dist/sharing/registry.d.ts.map +1 -1
  457. package/dist/sharing/registry.js.map +1 -1
  458. package/dist/styles/agent-native.css +104 -20
  459. package/dist/styles/rich-markdown-editor.css +11 -10
  460. package/docs/content/cloneable-saas.mdx +2 -2
  461. package/docs/content/evals.mdx +34 -12
  462. package/docs/content/faq.mdx +1 -1
  463. package/docs/content/locales/ar-SA/cloneable-saas.mdx +2 -2
  464. package/docs/content/locales/ar-SA/evals.mdx +7 -0
  465. package/docs/content/locales/ar-SA/faq.mdx +1 -1
  466. package/docs/content/locales/ar-SA/template-chat.mdx +1 -1
  467. package/docs/content/locales/de-DE/cloneable-saas.mdx +2 -2
  468. package/docs/content/locales/de-DE/evals.mdx +8 -0
  469. package/docs/content/locales/de-DE/faq.mdx +1 -1
  470. package/docs/content/locales/de-DE/template-chat.mdx +1 -1
  471. package/docs/content/locales/es-ES/cloneable-saas.mdx +2 -2
  472. package/docs/content/locales/es-ES/evals.mdx +8 -0
  473. package/docs/content/locales/es-ES/faq.mdx +1 -1
  474. package/docs/content/locales/es-ES/template-chat.mdx +1 -1
  475. package/docs/content/locales/fr-FR/cloneable-saas.mdx +2 -2
  476. package/docs/content/locales/fr-FR/evals.mdx +8 -0
  477. package/docs/content/locales/fr-FR/faq.mdx +1 -1
  478. package/docs/content/locales/fr-FR/template-chat.mdx +1 -1
  479. package/docs/content/locales/hi-IN/cloneable-saas.mdx +2 -2
  480. package/docs/content/locales/hi-IN/evals.mdx +8 -0
  481. package/docs/content/locales/hi-IN/faq.mdx +1 -1
  482. package/docs/content/locales/hi-IN/template-chat.mdx +1 -1
  483. package/docs/content/locales/ja-JP/cloneable-saas.mdx +2 -2
  484. package/docs/content/locales/ja-JP/evals.mdx +7 -0
  485. package/docs/content/locales/ja-JP/faq.mdx +1 -1
  486. package/docs/content/locales/ja-JP/template-chat.mdx +1 -1
  487. package/docs/content/locales/ko-KR/cloneable-saas.mdx +2 -2
  488. package/docs/content/locales/ko-KR/evals.mdx +7 -0
  489. package/docs/content/locales/ko-KR/faq.mdx +1 -1
  490. package/docs/content/locales/ko-KR/template-chat.mdx +1 -1
  491. package/docs/content/locales/pt-BR/cloneable-saas.mdx +2 -2
  492. package/docs/content/locales/pt-BR/evals.mdx +8 -0
  493. package/docs/content/locales/pt-BR/faq.mdx +1 -1
  494. package/docs/content/locales/pt-BR/template-chat.mdx +1 -1
  495. package/docs/content/locales/zh-CN/cloneable-saas.mdx +2 -2
  496. package/docs/content/locales/zh-CN/evals.mdx +7 -0
  497. package/docs/content/locales/zh-CN/faq.mdx +1 -1
  498. package/docs/content/locales/zh-CN/template-chat.mdx +1 -1
  499. package/docs/content/locales/zh-TW/cloneable-saas.mdx +2 -2
  500. package/docs/content/locales/zh-TW/evals.mdx +7 -0
  501. package/docs/content/locales/zh-TW/faq.mdx +1 -1
  502. package/docs/content/locales/zh-TW/template-chat.mdx +1 -1
  503. package/docs/content/template-chat.mdx +1 -1
  504. package/package.json +1 -1
  505. package/corpus/templates/content/server/routes/api/notion/disconnect.post.ts +0 -12
  506. package/corpus/templates/design/app/components/design/LocalSourceEditBanner.tsx +0 -157
  507. package/corpus/templates/design/app/lib/design-templates.ts +0 -1305
  508. package/corpus/templates/design/app/pages/Templates.tsx +0 -279
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * Central model catalog for built-in agent engines.
3
3
  *
4
- * To bump the framework's managed default, update
5
- * FRAMEWORK_DEFAULT_OPENAI_MODEL. Builder gateway and OpenRouter IDs are
6
- * derived from that provider-native OpenAI ID so the usual default bump stays
7
- * in this one file.
4
+ * To bump the framework's managed default, update the Anthropic/OpenAI
5
+ * constants below. Builder gateway and OpenRouter IDs are derived here so the
6
+ * usual default bump stays in one file.
8
7
  */
9
8
  /**
10
9
  * Return the known input-token context window for the given model ID.
@@ -14,19 +13,21 @@
14
13
  * integer.
15
14
  */
16
15
  export declare function getContextWindowForModel(modelId: string): number;
16
+ export declare const CLAUDE_SONNET_MODEL_ID: string;
17
+ export declare const CLAUDE_SONNET_MODEL_LABEL: string;
17
18
  export declare const AGENT_MODEL_CONFIG: {
18
19
  readonly builder: {
19
- readonly defaultModel: "claude-sonnet-4-6";
20
- readonly supportedModels: readonly ["auto", "claude-opus-4-7", "claude-sonnet-4-6", "claude-haiku-4-5", string, "gpt-5-4", "gpt-5-4-mini", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite", "grok-code-fast", "qwen3-coder"];
20
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
21
+ readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-4", "gpt-5-4-mini", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite", "grok-code-fast", "qwen3-coder"];
21
22
  };
22
23
  readonly anthropic: {
23
- readonly defaultModel: "claude-sonnet-4-6";
24
- readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6", "claude-haiku-4-5-20251001"];
24
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
25
+ readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
25
26
  };
26
27
  readonly aiSdk: {
27
28
  readonly anthropic: {
28
- readonly defaultModel: "claude-sonnet-4-6";
29
- readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6", "claude-haiku-4-5-20251001"];
29
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
30
+ readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
30
31
  };
31
32
  readonly openai: {
32
33
  readonly defaultModel: "gpt-5.5";
@@ -34,7 +35,7 @@ export declare const AGENT_MODEL_CONFIG: {
34
35
  };
35
36
  readonly openrouter: {
36
37
  readonly defaultModel: string;
37
- readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", string, "openai/gpt-5.4", "google/gemini-2.5-flash"];
38
+ readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.4", "google/gemini-2.5-flash", "z-ai/glm-5.2"];
38
39
  };
39
40
  readonly google: {
40
41
  readonly defaultModel: "gemini-3.5-flash";
@@ -59,17 +60,17 @@ export declare const AGENT_MODEL_CONFIG: {
59
60
  };
60
61
  };
61
62
  export declare const BUILDER_MODEL_CONFIG: {
62
- readonly defaultModel: "claude-sonnet-4-6";
63
- readonly supportedModels: readonly ["auto", "claude-opus-4-7", "claude-sonnet-4-6", "claude-haiku-4-5", string, "gpt-5-4", "gpt-5-4-mini", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite", "grok-code-fast", "qwen3-coder"];
63
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
64
+ readonly supportedModels: readonly ["auto", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5", string, "gpt-5-4", "gpt-5-4-mini", "gemini-3-1-pro", "gemini-3-5-flash", "gemini-3-1-flash-lite", "grok-code-fast", "qwen3-coder"];
64
65
  };
65
66
  export declare const ANTHROPIC_MODEL_CONFIG: {
66
- readonly defaultModel: "claude-sonnet-4-6";
67
- readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6", "claude-haiku-4-5-20251001"];
67
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
68
+ readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
68
69
  };
69
70
  export declare const AI_SDK_MODEL_CONFIG: {
70
71
  readonly anthropic: {
71
- readonly defaultModel: "claude-sonnet-4-6";
72
- readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6", "claude-haiku-4-5-20251001"];
72
+ readonly defaultModel: "claude-sonnet-4-6" | "claude-sonnet-5";
73
+ readonly supportedModels: readonly ["claude-fable-5", "claude-opus-4-8", "claude-sonnet-4-6" | "claude-sonnet-5", "claude-haiku-4-5-20251001"];
73
74
  };
74
75
  readonly openai: {
75
76
  readonly defaultModel: "gpt-5.5";
@@ -77,7 +78,7 @@ export declare const AI_SDK_MODEL_CONFIG: {
77
78
  };
78
79
  readonly openrouter: {
79
80
  readonly defaultModel: string;
80
- readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6", string, "openai/gpt-5.4", "google/gemini-2.5-flash"];
81
+ readonly supportedModels: readonly ["anthropic/claude-fable-5", "anthropic/claude-opus-4.8", "anthropic/claude-sonnet-4.6" | "anthropic/claude-sonnet-5", string, "openai/gpt-5.4", "google/gemini-2.5-flash", "z-ai/glm-5.2"];
81
82
  };
82
83
  readonly google: {
83
84
  readonly defaultModel: "gemini-3.5-flash";
@@ -101,7 +102,7 @@ export declare const AI_SDK_MODEL_CONFIG: {
101
102
  };
102
103
  };
103
104
  export type AISDKProvider = keyof typeof AI_SDK_MODEL_CONFIG;
104
- export declare const DEFAULT_MODEL: "claude-sonnet-4-6";
105
+ export declare const DEFAULT_MODEL: "claude-sonnet-4-6" | "claude-sonnet-5";
105
106
  export declare const DEFAULT_OPENAI_MODEL: "gpt-5.5";
106
- export declare const DEFAULT_ANTHROPIC_MODEL: "claude-sonnet-4-6";
107
+ export declare const DEFAULT_ANTHROPIC_MODEL: "claude-sonnet-4-6" | "claude-sonnet-5";
107
108
  //# sourceMappingURL=model-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-config.d.ts","sourceRoot":"","sources":["../../src/agent/model-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgEH;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmChE;AAsBD,eAAO,MAAM,kBAAkB;aAC7B,OAAO;iBACL,YAAY;iBACZ,eAAe,YACb,MAAM,EACN,iBAAiB,uBAEjB,kBAAkB,UAElB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,aAAa;;aAGjB,SAAS;iBACP,YAAY;iBACZ,eAAe,YACb,gBAAgB,EAChB,iBAAiB,uBAEjB,2B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,YACb,0BAA0B,EAC1B,2BAA2B,uEAG3B,gBAAgB,EAEhB,yBAAyB,EACzB,cAAc;;;iBAIhB,YAAY,EAAE,kBAAkB;iBAChC,eAAe,YAAG,kBAAkB,EAAE,wBAAwB;;;iBAM9D,YAAY,EAAE,yBAAyB;iBACvC,eAAe,YACb,yBAAyB,EACzB,gBAAgB,EAChB,sBAAsB;;;iBAIxB,YAAY,EAAE,sBAAsB;iBACpC,eAAe,YACb,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB;;;iBAMxB,YAAY,EAAE,wBAAwB;iBACtC,eAAe,YACb,wBAAwB,EACxB,gBAAgB,EAChB,WAAW;;;iBAIb,YAAY,EAAE,UAAU;iBACxB,eAAe,YAAG,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW;;CAOX,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAE7D,eAAO,MAAM,aAAa,yCAAoC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,WAA0C,CAAC;AAC5E,eAAO,MAAM,uBAAuB,yCAAsC,CAAC"}
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * Central model catalog for built-in agent engines.
3
3
  *
4
- * To bump the framework's managed default, update
5
- * FRAMEWORK_DEFAULT_OPENAI_MODEL. Builder gateway and OpenRouter IDs are
6
- * derived from that provider-native OpenAI ID so the usual default bump stays
7
- * in this one file.
4
+ * To bump the framework's managed default, update the Anthropic/OpenAI
5
+ * constants below. Builder gateway and OpenRouter IDs are derived here so the
6
+ * usual default bump stays in one file.
8
7
  */
9
8
  // ---------------------------------------------------------------------------
10
9
  // Per-model context window table (input token limit)
@@ -14,6 +13,7 @@
14
13
  // OpenAI https://developers.openai.com/api/docs/models/gpt-5.5
15
14
  // https://developers.openai.com/api/docs/models/gpt-5.4
16
15
  // Google https://ai.google.dev/gemini-api/docs/models
16
+ // OpenRouter https://openrouter.ai/api/v1/models
17
17
  //
18
18
  // Family defaults (used when a model id isn't listed explicitly):
19
19
  // claude-* → 200_000 (Haiku 4.5 and earlier models)
@@ -21,7 +21,7 @@
21
21
  // gemini-2* / gemini-3* → 1_048_576
22
22
  // everything else → 128_000 (safe conservative floor)
23
23
  //
24
- // Note: Fable 5, Sonnet 4.6, and Opus 4.6/4.7/4.8 support 1M via the API
24
+ // Note: Fable 5, Sonnet 5, Sonnet 4.6, and Opus 4.6/4.7/4.8 support 1M via the API
25
25
  // at standard prices.
26
26
  // ---------------------------------------------------------------------------
27
27
  const MODEL_CONTEXT_WINDOWS = {
@@ -29,6 +29,7 @@ const MODEL_CONTEXT_WINDOWS = {
29
29
  "claude-fable-5": 1_000_000,
30
30
  "claude-opus-4-8": 1_000_000,
31
31
  "claude-opus-4-7": 1_000_000,
32
+ "claude-sonnet-5": 1_000_000,
32
33
  "claude-sonnet-4-6": 1_000_000,
33
34
  "claude-haiku-4-5": 200_000,
34
35
  "claude-haiku-4-5-20251001": 200_000,
@@ -44,10 +45,12 @@ const MODEL_CONTEXT_WINDOWS = {
44
45
  "anthropic/claude-fable-5": 1_000_000,
45
46
  "anthropic/claude-opus-4.8": 1_000_000,
46
47
  "anthropic/claude-opus-4.7": 1_000_000,
48
+ "anthropic/claude-sonnet-5": 1_000_000,
47
49
  "anthropic/claude-sonnet-4.6": 1_000_000,
48
50
  "openai/gpt-5.5": 1_050_000,
49
51
  "openai/gpt-5.4": 1_050_000,
50
52
  "google/gemini-2.5-flash": 1_048_576,
53
+ "z-ai/glm-5.2": 1_048_576,
51
54
  // ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────
52
55
  "gpt-5.5": 1_050_000,
53
56
  "gpt-5.4": 1_050_000,
@@ -75,11 +78,12 @@ export function getContextWindowForModel(modelId) {
75
78
  return exact;
76
79
  // Family heuristics for unlisted model IDs
77
80
  const id = modelId.toLowerCase();
78
- // Anthropic Fable 5, Opus 4.x, and Sonnet 4.6 = 1M
81
+ // Anthropic Fable 5, Opus 4.x, Sonnet 5, and Sonnet 4.6 = 1M
79
82
  if (id === "claude-fable-5" ||
80
83
  id.includes("claude-fable-5") ||
81
84
  id.startsWith("claude-opus-4") ||
82
- id === "claude-sonnet-4-6" ||
85
+ id.includes("claude-sonnet-5") ||
86
+ id.includes("claude-sonnet-4-6") ||
83
87
  id.includes("claude-sonnet-4.6"))
84
88
  return 1_000_000;
85
89
  // All other Claude models — default 200K
@@ -94,9 +98,22 @@ export function getContextWindowForModel(modelId) {
94
98
  id.includes("/gemini-2") ||
95
99
  id.includes("/gemini-3"))
96
100
  return 1_048_576;
101
+ // Z.ai GLM 5.x on OpenRouter — 1M context.
102
+ if (id.startsWith("glm-5") || id.includes("/glm-5"))
103
+ return 1_048_576;
97
104
  return DEFAULT_CONTEXT_WINDOW;
98
105
  }
99
- const ANTHROPIC_DEFAULT_MODEL_ID = "claude-sonnet-4-6";
106
+ const ENABLE_CLAUDE_SONNET_5 = false;
107
+ export const CLAUDE_SONNET_MODEL_ID = ENABLE_CLAUDE_SONNET_5
108
+ ? "claude-sonnet-5"
109
+ : "claude-sonnet-4-6";
110
+ export const CLAUDE_SONNET_MODEL_LABEL = ENABLE_CLAUDE_SONNET_5
111
+ ? "Claude Sonnet 5"
112
+ : "Claude Sonnet 4.6";
113
+ const OPENROUTER_CLAUDE_SONNET_MODEL_ID = ENABLE_CLAUDE_SONNET_5
114
+ ? "anthropic/claude-sonnet-5"
115
+ : "anthropic/claude-sonnet-4.6";
116
+ const ANTHROPIC_DEFAULT_MODEL_ID = CLAUDE_SONNET_MODEL_ID;
100
117
  function builderGatewayModelId(model) {
101
118
  return model.replace(/\./g, "-");
102
119
  }
@@ -112,8 +129,8 @@ export const AGENT_MODEL_CONFIG = {
112
129
  defaultModel: FRAMEWORK_DEFAULT_BUILDER_MODEL,
113
130
  supportedModels: [
114
131
  "auto",
115
- "claude-opus-4-7",
116
- FRAMEWORK_DEFAULT_BUILDER_MODEL,
132
+ "claude-opus-4-8",
133
+ CLAUDE_SONNET_MODEL_ID,
117
134
  "claude-haiku-4-5",
118
135
  FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL,
119
136
  "gpt-5-4",
@@ -130,7 +147,7 @@ export const AGENT_MODEL_CONFIG = {
130
147
  supportedModels: [
131
148
  "claude-fable-5",
132
149
  "claude-opus-4-8",
133
- ANTHROPIC_DEFAULT_MODEL_ID,
150
+ CLAUDE_SONNET_MODEL_ID,
134
151
  "claude-haiku-4-5-20251001",
135
152
  ],
136
153
  },
@@ -140,7 +157,7 @@ export const AGENT_MODEL_CONFIG = {
140
157
  supportedModels: [
141
158
  "claude-fable-5",
142
159
  "claude-opus-4-8",
143
- ANTHROPIC_DEFAULT_MODEL_ID,
160
+ CLAUDE_SONNET_MODEL_ID,
144
161
  "claude-haiku-4-5-20251001",
145
162
  ],
146
163
  },
@@ -157,11 +174,12 @@ export const AGENT_MODEL_CONFIG = {
157
174
  supportedModels: [
158
175
  "anthropic/claude-fable-5",
159
176
  "anthropic/claude-opus-4.8",
160
- "anthropic/claude-sonnet-4.6",
177
+ OPENROUTER_CLAUDE_SONNET_MODEL_ID,
161
178
  FRAMEWORK_DEFAULT_OPENROUTER_MODEL,
162
179
  "openai/gpt-5.4",
163
180
  // Current stable Gemini on OpenRouter (2.5 Flash is GA)
164
181
  "google/gemini-2.5-flash",
182
+ "z-ai/glm-5.2",
165
183
  ],
166
184
  },
167
185
  google: {
@@ -1 +1 @@
1
- {"version":3,"file":"model-config.js","sourceRoot":"","sources":["../../src/agent/model-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,8EAA8E;AAC9E,qDAAqD;AACrD,EAAE;AACF,uBAAuB;AACvB,+EAA+E;AAC/E,oEAAoE;AACpE,oEAAoE;AACpE,2DAA2D;AAC3D,EAAE;AACF,kEAAkE;AAClE,6DAA6D;AAC7D,8DAA8D;AAC9D,qCAAqC;AACrC,wDAAwD;AACxD,EAAE;AACF,yEAAyE;AACzE,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,qBAAqB,GAA2B;IACpD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ACD,MAAM,EAAE;YACN,YAAY,EAAE,UAAU;YACxB,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC;SAClE;KACF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,OAAO,CAAC;AAC/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,SAAS,CAAC;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC;AAI5D,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,YAAY,CAAC","sourcesContent":["/**\n * Central model catalog for built-in agent engines.\n *\n * To bump the framework's managed default, update\n * FRAMEWORK_DEFAULT_OPENAI_MODEL. Builder gateway and OpenRouter IDs are\n * derived from that provider-native OpenAI ID so the usual default bump stays\n * in this one file.\n */\n\n// ---------------------------------------------------------------------------\n// Per-model context window table (input token limit)\n//\n// Sources (June 2026):\n// Anthropic https://platform.claude.com/docs/en/about-claude/models/overview\n// OpenAI https://developers.openai.com/api/docs/models/gpt-5.5\n// https://developers.openai.com/api/docs/models/gpt-5.4\n// Google https://ai.google.dev/gemini-api/docs/models\n//\n// Family defaults (used when a model id isn't listed explicitly):\n// claude-* → 200_000 (Haiku 4.5 and earlier models)\n// gpt-5* → 1_050_000 (GPT-5.4/5.5 flagship context)\n// gemini-2* / gemini-3* → 1_048_576\n// everything else → 128_000 (safe conservative floor)\n//\n// Note: Fable 5, Sonnet 4.6, and Opus 4.6/4.7/4.8 support 1M via the API\n// at standard prices.\n// ---------------------------------------------------------------------------\n\nconst MODEL_CONTEXT_WINDOWS: Record<string, number> = {\n // ── Anthropic / Claude (via Builder gateway or Anthropic direct) ──────────\n \"claude-fable-5\": 1_000_000,\n \"claude-opus-4-8\": 1_000_000,\n \"claude-opus-4-7\": 1_000_000,\n \"claude-sonnet-4-6\": 1_000_000,\n \"claude-haiku-4-5\": 200_000,\n \"claude-haiku-4-5-20251001\": 200_000,\n\n // ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────\n \"gpt-5-5\": 1_050_000,\n \"gpt-5-4\": 1_050_000,\n \"gpt-5-4-mini\": 400_000,\n\n // ── Gemini (Builder gateway IDs) ─────────────────────────────────────────\n \"gemini-3-1-pro\": 1_048_576,\n \"gemini-3-5-flash\": 1_048_576,\n \"gemini-3-1-flash-lite\": 1_048_576,\n\n // ── OpenRouter model IDs ──────────────────────────────────────────────────\n \"anthropic/claude-fable-5\": 1_000_000,\n \"anthropic/claude-opus-4.8\": 1_000_000,\n \"anthropic/claude-opus-4.7\": 1_000_000,\n \"anthropic/claude-sonnet-4.6\": 1_000_000,\n \"openai/gpt-5.5\": 1_050_000,\n \"openai/gpt-5.4\": 1_050_000,\n \"google/gemini-2.5-flash\": 1_048_576,\n\n // ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────\n \"gpt-5.5\": 1_050_000,\n \"gpt-5.4\": 1_050_000,\n \"gpt-5.4-mini\": 400_000,\n\n // ── AI-SDK native Google IDs ──────────────────────────────────────────────\n \"gemini-3.5-flash\": 1_048_576,\n \"gemini-3.1-pro-preview\": 1_048_576,\n \"gemini-2.5-flash\": 1_048_576,\n \"gemini-2.5-pro\": 1_048_576,\n};\n\n/** Conservative safe default when a model is not in the table. */\nconst DEFAULT_CONTEXT_WINDOW = 128_000;\n\n/**\n * Return the known input-token context window for the given model ID.\n *\n * Uses an exact-match table first, then falls back to family-prefix heuristics,\n * then a conservative 128 K default. Never throws — always returns a positive\n * integer.\n */\nexport function getContextWindowForModel(modelId: string): number {\n if (!modelId) return DEFAULT_CONTEXT_WINDOW;\n\n const exact = MODEL_CONTEXT_WINDOWS[modelId];\n if (exact !== undefined) return exact;\n\n // Family heuristics for unlisted model IDs\n const id = modelId.toLowerCase();\n\n // Anthropic Fable 5, Opus 4.x, and Sonnet 4.6 = 1M\n if (\n id === \"claude-fable-5\" ||\n id.includes(\"claude-fable-5\") ||\n id.startsWith(\"claude-opus-4\") ||\n id === \"claude-sonnet-4-6\" ||\n id.includes(\"claude-sonnet-4.6\")\n )\n return 1_000_000;\n\n // All other Claude models — default 200K\n if (id.startsWith(\"claude-\")) return 200_000;\n\n // GPT-5.x family — 1.05M\n if (id.startsWith(\"gpt-5\") || id.startsWith(\"openai/gpt-5\")) return 1_050_000;\n\n // Gemini 2.x / 3.x — 1M\n if (\n id.startsWith(\"gemini-2\") ||\n id.startsWith(\"gemini-3\") ||\n id.includes(\"/gemini-2\") ||\n id.includes(\"/gemini-3\")\n )\n return 1_048_576;\n\n return DEFAULT_CONTEXT_WINDOW;\n}\n\nconst ANTHROPIC_DEFAULT_MODEL_ID = \"claude-sonnet-4-6\";\n\nfunction builderGatewayModelId(model: string): string {\n return model.replace(/\\./g, \"-\");\n}\n\nfunction openRouterModelId(provider: string, model: string): string {\n return `${provider}/${model}`;\n}\n\nconst FRAMEWORK_DEFAULT_OPENAI_MODEL = \"gpt-5.5\";\nconst FRAMEWORK_DEFAULT_BUILDER_MODEL = ANTHROPIC_DEFAULT_MODEL_ID;\nconst FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL = builderGatewayModelId(\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n);\nconst FRAMEWORK_DEFAULT_OPENROUTER_MODEL = openRouterModelId(\n \"openai\",\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n);\n\nexport const AGENT_MODEL_CONFIG = {\n builder: {\n defaultModel: FRAMEWORK_DEFAULT_BUILDER_MODEL,\n supportedModels: [\n \"auto\",\n \"claude-opus-4-7\",\n FRAMEWORK_DEFAULT_BUILDER_MODEL,\n \"claude-haiku-4-5\",\n FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL,\n \"gpt-5-4\",\n \"gpt-5-4-mini\",\n \"gemini-3-1-pro\",\n \"gemini-3-5-flash\",\n \"gemini-3-1-flash-lite\",\n \"grok-code-fast\",\n \"qwen3-coder\",\n ],\n },\n anthropic: {\n defaultModel: ANTHROPIC_DEFAULT_MODEL_ID,\n supportedModels: [\n \"claude-fable-5\",\n \"claude-opus-4-8\",\n ANTHROPIC_DEFAULT_MODEL_ID,\n \"claude-haiku-4-5-20251001\",\n ],\n },\n aiSdk: {\n anthropic: {\n defaultModel: ANTHROPIC_DEFAULT_MODEL_ID,\n supportedModels: [\n \"claude-fable-5\",\n \"claude-opus-4-8\",\n ANTHROPIC_DEFAULT_MODEL_ID,\n \"claude-haiku-4-5-20251001\",\n ],\n },\n openai: {\n defaultModel: FRAMEWORK_DEFAULT_OPENAI_MODEL,\n supportedModels: [\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n \"gpt-5.4\",\n \"gpt-5.4-mini\",\n ],\n },\n openrouter: {\n defaultModel: FRAMEWORK_DEFAULT_OPENROUTER_MODEL,\n supportedModels: [\n \"anthropic/claude-fable-5\",\n \"anthropic/claude-opus-4.8\",\n \"anthropic/claude-sonnet-4.6\",\n FRAMEWORK_DEFAULT_OPENROUTER_MODEL,\n \"openai/gpt-5.4\",\n // Current stable Gemini on OpenRouter (2.5 Flash is GA)\n \"google/gemini-2.5-flash\",\n ],\n },\n google: {\n defaultModel: \"gemini-3.5-flash\",\n supportedModels: [\"gemini-3.5-flash\", \"gemini-3.1-pro-preview\"],\n },\n groq: {\n // llama-3.1-70b-versatile and mixtral-8x7b-32768 were decommissioned\n // (errors since Jan 2025 and Mar 2025 respectively). Replace with current\n // Groq production models.\n defaultModel: \"llama-3.3-70b-versatile\",\n supportedModels: [\n \"llama-3.3-70b-versatile\",\n \"llama3-8b-8192\",\n \"llama-3.1-8b-instant\",\n ],\n },\n mistral: {\n defaultModel: \"mistral-large-latest\",\n supportedModels: [\n \"mistral-large-latest\",\n \"mistral-medium-latest\",\n \"mistral-small-latest\",\n ],\n },\n cohere: {\n // command-r-plus (unversioned) is an alias that may lag; the stable\n // dated release is command-r-plus-08-2024.\n defaultModel: \"command-r-plus-08-2024\",\n supportedModels: [\n \"command-r-plus-08-2024\",\n \"command-r-plus\",\n \"command-r\",\n ],\n },\n ollama: {\n defaultModel: \"llama3.1\",\n supportedModels: [\"llama3.1\", \"llama3.2\", \"mistral\", \"codestral\"],\n },\n },\n} as const;\n\nexport const BUILDER_MODEL_CONFIG = AGENT_MODEL_CONFIG.builder;\nexport const ANTHROPIC_MODEL_CONFIG = AGENT_MODEL_CONFIG.anthropic;\nexport const AI_SDK_MODEL_CONFIG = AGENT_MODEL_CONFIG.aiSdk;\n\nexport type AISDKProvider = keyof typeof AI_SDK_MODEL_CONFIG;\n\nexport const DEFAULT_MODEL = BUILDER_MODEL_CONFIG.defaultModel;\nexport const DEFAULT_OPENAI_MODEL = AI_SDK_MODEL_CONFIG.openai.defaultModel;\nexport const DEFAULT_ANTHROPIC_MODEL = ANTHROPIC_MODEL_CONFIG.defaultModel;\n"]}
1
+ {"version":3,"file":"model-config.js","sourceRoot":"","sources":["../../src/agent/model-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8EAA8E;AAC9E,qDAAqD;AACrD,EAAE;AACF,uBAAuB;AACvB,+EAA+E;AAC/E,oEAAoE;AACpE,oEAAoE;AACpE,2DAA2D;AAC3D,kDAAkD;AAClD,EAAE;AACF,kEAAkE;AAClE,6DAA6D;AAC7D,8DAA8D;AAC9D,qCAAqC;AACrC,wDAAwD;AACxD,EAAE;AACF,mFAAmF;AACnF,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,qBAAqB,GAA2B;IACpD,6EAA6E;IAC7E,gBAAgB,EAAE,SAAS;IAC3B,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,iBAAiB,EAAE,SAAS;IAC5B,mBAAmB,EAAE,SAAS;IAC9B,kBAAkB,EAAE,OAAO;IAC3B,2BAA2B,EAAE,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AC;SAChE;QACD,IAAI,EAAE;YACJ,qEAAqE;YACrE,0EAA0E;YAC1E,0BAA0B;YAC1B,YAAY,EAAE,yBAAyB;YACvC,eAAe,EAAE;gBACf,yBAAyB;gBACzB,gBAAgB;gBAChB,sBAAsB;aACvB;SACF;QACD,OAAO,EAAE;YACP,YAAY,EAAE,sBAAsB;YACpC,eAAe,EAAE;gBACf,sBAAsB;gBACtB,uBAAuB;gBACvB,sBAAsB;aACvB;SACF;QACD,MAAM,EAAE;YACN,oEAAoE;YACpE,2CAA2C;YAC3C,YAAY,EAAE,wBAAwB;YACtC,eAAe,EAAE;gBACf,wBAAwB;gBACxB,gBAAgB;gBAChB,WAAW;aACZ;SACF;QACD,MAAM,EAAE;YACN,YAAY,EAAE,UAAU;YACxB,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC;SAClE;KACF;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,OAAO,CAAC;AAC/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,kBAAkB,CAAC,SAAS,CAAC;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAAC;AAI5D,MAAM,CAAC,MAAM,aAAa,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC/D,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC,YAAY,CAAC","sourcesContent":["/**\n * Central model catalog for built-in agent engines.\n *\n * To bump the framework's managed default, update the Anthropic/OpenAI\n * constants below. Builder gateway and OpenRouter IDs are derived here so the\n * usual default bump stays in one file.\n */\n\n// ---------------------------------------------------------------------------\n// Per-model context window table (input token limit)\n//\n// Sources (June 2026):\n// Anthropic https://platform.claude.com/docs/en/about-claude/models/overview\n// OpenAI https://developers.openai.com/api/docs/models/gpt-5.5\n// https://developers.openai.com/api/docs/models/gpt-5.4\n// Google https://ai.google.dev/gemini-api/docs/models\n// OpenRouter https://openrouter.ai/api/v1/models\n//\n// Family defaults (used when a model id isn't listed explicitly):\n// claude-* → 200_000 (Haiku 4.5 and earlier models)\n// gpt-5* → 1_050_000 (GPT-5.4/5.5 flagship context)\n// gemini-2* / gemini-3* → 1_048_576\n// everything else → 128_000 (safe conservative floor)\n//\n// Note: Fable 5, Sonnet 5, Sonnet 4.6, and Opus 4.6/4.7/4.8 support 1M via the API\n// at standard prices.\n// ---------------------------------------------------------------------------\n\nconst MODEL_CONTEXT_WINDOWS: Record<string, number> = {\n // ── Anthropic / Claude (via Builder gateway or Anthropic direct) ──────────\n \"claude-fable-5\": 1_000_000,\n \"claude-opus-4-8\": 1_000_000,\n \"claude-opus-4-7\": 1_000_000,\n \"claude-sonnet-5\": 1_000_000,\n \"claude-sonnet-4-6\": 1_000_000,\n \"claude-haiku-4-5\": 200_000,\n \"claude-haiku-4-5-20251001\": 200_000,\n\n // ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────\n \"gpt-5-5\": 1_050_000,\n \"gpt-5-4\": 1_050_000,\n \"gpt-5-4-mini\": 400_000,\n\n // ── Gemini (Builder gateway IDs) ─────────────────────────────────────────\n \"gemini-3-1-pro\": 1_048_576,\n \"gemini-3-5-flash\": 1_048_576,\n \"gemini-3-1-flash-lite\": 1_048_576,\n\n // ── OpenRouter model IDs ──────────────────────────────────────────────────\n \"anthropic/claude-fable-5\": 1_000_000,\n \"anthropic/claude-opus-4.8\": 1_000_000,\n \"anthropic/claude-opus-4.7\": 1_000_000,\n \"anthropic/claude-sonnet-5\": 1_000_000,\n \"anthropic/claude-sonnet-4.6\": 1_000_000,\n \"openai/gpt-5.5\": 1_050_000,\n \"openai/gpt-5.4\": 1_050_000,\n \"google/gemini-2.5-flash\": 1_048_576,\n \"z-ai/glm-5.2\": 1_048_576,\n\n // ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────\n \"gpt-5.5\": 1_050_000,\n \"gpt-5.4\": 1_050_000,\n \"gpt-5.4-mini\": 400_000,\n\n // ── AI-SDK native Google IDs ──────────────────────────────────────────────\n \"gemini-3.5-flash\": 1_048_576,\n \"gemini-3.1-pro-preview\": 1_048_576,\n \"gemini-2.5-flash\": 1_048_576,\n \"gemini-2.5-pro\": 1_048_576,\n};\n\n/** Conservative safe default when a model is not in the table. */\nconst DEFAULT_CONTEXT_WINDOW = 128_000;\n\n/**\n * Return the known input-token context window for the given model ID.\n *\n * Uses an exact-match table first, then falls back to family-prefix heuristics,\n * then a conservative 128 K default. Never throws — always returns a positive\n * integer.\n */\nexport function getContextWindowForModel(modelId: string): number {\n if (!modelId) return DEFAULT_CONTEXT_WINDOW;\n\n const exact = MODEL_CONTEXT_WINDOWS[modelId];\n if (exact !== undefined) return exact;\n\n // Family heuristics for unlisted model IDs\n const id = modelId.toLowerCase();\n\n // Anthropic Fable 5, Opus 4.x, Sonnet 5, and Sonnet 4.6 = 1M\n if (\n id === \"claude-fable-5\" ||\n id.includes(\"claude-fable-5\") ||\n id.startsWith(\"claude-opus-4\") ||\n id.includes(\"claude-sonnet-5\") ||\n id.includes(\"claude-sonnet-4-6\") ||\n id.includes(\"claude-sonnet-4.6\")\n )\n return 1_000_000;\n\n // All other Claude models — default 200K\n if (id.startsWith(\"claude-\")) return 200_000;\n\n // GPT-5.x family — 1.05M\n if (id.startsWith(\"gpt-5\") || id.startsWith(\"openai/gpt-5\")) return 1_050_000;\n\n // Gemini 2.x / 3.x — 1M\n if (\n id.startsWith(\"gemini-2\") ||\n id.startsWith(\"gemini-3\") ||\n id.includes(\"/gemini-2\") ||\n id.includes(\"/gemini-3\")\n )\n return 1_048_576;\n\n // Z.ai GLM 5.x on OpenRouter — 1M context.\n if (id.startsWith(\"glm-5\") || id.includes(\"/glm-5\")) return 1_048_576;\n\n return DEFAULT_CONTEXT_WINDOW;\n}\n\nconst ENABLE_CLAUDE_SONNET_5 = false;\n\nexport const CLAUDE_SONNET_MODEL_ID = ENABLE_CLAUDE_SONNET_5\n ? \"claude-sonnet-5\"\n : \"claude-sonnet-4-6\";\nexport const CLAUDE_SONNET_MODEL_LABEL = ENABLE_CLAUDE_SONNET_5\n ? \"Claude Sonnet 5\"\n : \"Claude Sonnet 4.6\";\n\nconst OPENROUTER_CLAUDE_SONNET_MODEL_ID = ENABLE_CLAUDE_SONNET_5\n ? \"anthropic/claude-sonnet-5\"\n : \"anthropic/claude-sonnet-4.6\";\n\nconst ANTHROPIC_DEFAULT_MODEL_ID = CLAUDE_SONNET_MODEL_ID;\n\nfunction builderGatewayModelId(model: string): string {\n return model.replace(/\\./g, \"-\");\n}\n\nfunction openRouterModelId(provider: string, model: string): string {\n return `${provider}/${model}`;\n}\n\nconst FRAMEWORK_DEFAULT_OPENAI_MODEL = \"gpt-5.5\";\nconst FRAMEWORK_DEFAULT_BUILDER_MODEL = ANTHROPIC_DEFAULT_MODEL_ID;\nconst FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL = builderGatewayModelId(\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n);\nconst FRAMEWORK_DEFAULT_OPENROUTER_MODEL = openRouterModelId(\n \"openai\",\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n);\n\nexport const AGENT_MODEL_CONFIG = {\n builder: {\n defaultModel: FRAMEWORK_DEFAULT_BUILDER_MODEL,\n supportedModels: [\n \"auto\",\n \"claude-opus-4-8\",\n CLAUDE_SONNET_MODEL_ID,\n \"claude-haiku-4-5\",\n FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL,\n \"gpt-5-4\",\n \"gpt-5-4-mini\",\n \"gemini-3-1-pro\",\n \"gemini-3-5-flash\",\n \"gemini-3-1-flash-lite\",\n \"grok-code-fast\",\n \"qwen3-coder\",\n ],\n },\n anthropic: {\n defaultModel: ANTHROPIC_DEFAULT_MODEL_ID,\n supportedModels: [\n \"claude-fable-5\",\n \"claude-opus-4-8\",\n CLAUDE_SONNET_MODEL_ID,\n \"claude-haiku-4-5-20251001\",\n ],\n },\n aiSdk: {\n anthropic: {\n defaultModel: ANTHROPIC_DEFAULT_MODEL_ID,\n supportedModels: [\n \"claude-fable-5\",\n \"claude-opus-4-8\",\n CLAUDE_SONNET_MODEL_ID,\n \"claude-haiku-4-5-20251001\",\n ],\n },\n openai: {\n defaultModel: FRAMEWORK_DEFAULT_OPENAI_MODEL,\n supportedModels: [\n FRAMEWORK_DEFAULT_OPENAI_MODEL,\n \"gpt-5.4\",\n \"gpt-5.4-mini\",\n ],\n },\n openrouter: {\n defaultModel: FRAMEWORK_DEFAULT_OPENROUTER_MODEL,\n supportedModels: [\n \"anthropic/claude-fable-5\",\n \"anthropic/claude-opus-4.8\",\n OPENROUTER_CLAUDE_SONNET_MODEL_ID,\n FRAMEWORK_DEFAULT_OPENROUTER_MODEL,\n \"openai/gpt-5.4\",\n // Current stable Gemini on OpenRouter (2.5 Flash is GA)\n \"google/gemini-2.5-flash\",\n \"z-ai/glm-5.2\",\n ],\n },\n google: {\n defaultModel: \"gemini-3.5-flash\",\n supportedModels: [\"gemini-3.5-flash\", \"gemini-3.1-pro-preview\"],\n },\n groq: {\n // llama-3.1-70b-versatile and mixtral-8x7b-32768 were decommissioned\n // (errors since Jan 2025 and Mar 2025 respectively). Replace with current\n // Groq production models.\n defaultModel: \"llama-3.3-70b-versatile\",\n supportedModels: [\n \"llama-3.3-70b-versatile\",\n \"llama3-8b-8192\",\n \"llama-3.1-8b-instant\",\n ],\n },\n mistral: {\n defaultModel: \"mistral-large-latest\",\n supportedModels: [\n \"mistral-large-latest\",\n \"mistral-medium-latest\",\n \"mistral-small-latest\",\n ],\n },\n cohere: {\n // command-r-plus (unversioned) is an alias that may lag; the stable\n // dated release is command-r-plus-08-2024.\n defaultModel: \"command-r-plus-08-2024\",\n supportedModels: [\n \"command-r-plus-08-2024\",\n \"command-r-plus\",\n \"command-r\",\n ],\n },\n ollama: {\n defaultModel: \"llama3.1\",\n supportedModels: [\"llama3.1\", \"llama3.2\", \"mistral\", \"codestral\"],\n },\n },\n} as const;\n\nexport const BUILDER_MODEL_CONFIG = AGENT_MODEL_CONFIG.builder;\nexport const ANTHROPIC_MODEL_CONFIG = AGENT_MODEL_CONFIG.anthropic;\nexport const AI_SDK_MODEL_CONFIG = AGENT_MODEL_CONFIG.aiSdk;\n\nexport type AISDKProvider = keyof typeof AI_SDK_MODEL_CONFIG;\n\nexport const DEFAULT_MODEL = BUILDER_MODEL_CONFIG.defaultModel;\nexport const DEFAULT_OPENAI_MODEL = AI_SDK_MODEL_CONFIG.openai.defaultModel;\nexport const DEFAULT_ANTHROPIC_MODEL = ANTHROPIC_MODEL_CONFIG.defaultModel;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"production-agent.d.ts","sourceRoot":"","sources":["../../src/agent/production-agent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC;AAkCzD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AA2BvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAMhE,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,EACN,QAAQ,EAET,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AA6BlD,OAAO,KAAK,EACV,UAAU,EAEV,mBAAmB,EAEnB,cAAc,EACd,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD;;;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;IACH,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;CAC1B,GAAG,OAAO,CAAC,cAAc,CAAC,CAw2C1B;AA4CD;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,GAAG,EAAE,SAAS,CAAC;IACf,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,OAAO,CAOV;AA+BD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,sBAAsB,GAC9B,cAAc,CA4qDhB;AAED,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,EACN,QAAQ,EACR,cAAc,GACf,CAAC"}
@@ -2270,7 +2270,13 @@ export async function runAgentLoop(opts) {
2270
2270
  tool: toolCall.name,
2271
2271
  input: toolCall.input,
2272
2272
  });
2273
- send({ type: "tool_done", tool: toolCall.name, result });
2273
+ send({
2274
+ type: "tool_done",
2275
+ tool: toolCall.name,
2276
+ input: toolCall.input,
2277
+ result,
2278
+ completedSideEffect: false,
2279
+ });
2274
2280
  recordToolResult(result, false);
2275
2281
  return {
2276
2282
  type: "tool-result",
@@ -2287,7 +2293,13 @@ export async function runAgentLoop(opts) {
2287
2293
  tool: toolCall.name,
2288
2294
  input: toolCall.input,
2289
2295
  });
2290
- send({ type: "tool_done", tool: toolCall.name, result });
2296
+ send({
2297
+ type: "tool_done",
2298
+ tool: toolCall.name,
2299
+ input: toolCall.input,
2300
+ result,
2301
+ completedSideEffect: false,
2302
+ });
2291
2303
  recordToolResult(result, false);
2292
2304
  return {
2293
2305
  type: "tool-result",
@@ -2304,7 +2316,14 @@ export async function runAgentLoop(opts) {
2304
2316
  tool: toolCall.name,
2305
2317
  input: toolCall.input,
2306
2318
  });
2307
- send({ type: "tool_done", tool: toolCall.name, result });
2319
+ send({
2320
+ type: "tool_done",
2321
+ tool: toolCall.name,
2322
+ input: toolCall.input,
2323
+ result,
2324
+ isError: true,
2325
+ completedSideEffect: false,
2326
+ });
2308
2327
  recordToolResult(result, true);
2309
2328
  return {
2310
2329
  type: "tool-result",
@@ -2377,7 +2396,13 @@ export async function runAgentLoop(opts) {
2377
2396
  const result = `Awaiting human approval to run "${toolCall.name}". This action did ` +
2378
2397
  `NOT execute — a human must approve this specific call before it ` +
2379
2398
  `can run. The turn is paused; do not retry.`;
2380
- send({ type: "tool_done", tool: toolCall.name, result });
2399
+ send({
2400
+ type: "tool_done",
2401
+ tool: toolCall.name,
2402
+ input: toolCall.input,
2403
+ result,
2404
+ completedSideEffect: false,
2405
+ });
2381
2406
  recordToolResult(result, false);
2382
2407
  requestedActionStop ??= {
2383
2408
  message: `Waiting for your approval to run ${toolCall.name}.`,
@@ -2407,7 +2432,13 @@ export async function runAgentLoop(opts) {
2407
2432
  tool: toolCall.name,
2408
2433
  input: toolCall.input,
2409
2434
  });
2410
- send({ type: "tool_done", tool: toolCall.name, result });
2435
+ send({
2436
+ type: "tool_done",
2437
+ tool: toolCall.name,
2438
+ input: toolCall.input,
2439
+ result,
2440
+ completedSideEffect: false,
2441
+ });
2411
2442
  recordToolResult(result, false);
2412
2443
  if (repeats >= 3) {
2413
2444
  requestedActionStop ??= {
@@ -2454,7 +2485,13 @@ export async function runAgentLoop(opts) {
2454
2485
  tool: toolCall.name,
2455
2486
  input: toolCall.input,
2456
2487
  });
2457
- send({ type: "tool_done", tool: toolCall.name, result });
2488
+ send({
2489
+ type: "tool_done",
2490
+ tool: toolCall.name,
2491
+ input: toolCall.input,
2492
+ result,
2493
+ completedSideEffect: false,
2494
+ });
2458
2495
  recordToolResult(result, false);
2459
2496
  return {
2460
2497
  type: "tool-result",
@@ -2501,6 +2538,7 @@ export async function runAgentLoop(opts) {
2501
2538
  send({
2502
2539
  type: "tool_done",
2503
2540
  tool: toolCall.name,
2541
+ input: toolCall.input,
2504
2542
  result,
2505
2543
  ...(actionEntry.chatUI ? { chatUI: actionEntry.chatUI } : {}),
2506
2544
  });
@@ -2523,7 +2561,14 @@ export async function runAgentLoop(opts) {
2523
2561
  tool: toolCall.name,
2524
2562
  input: toolCall.input,
2525
2563
  });
2526
- send({ type: "tool_done", tool: toolCall.name, result });
2564
+ send({
2565
+ type: "tool_done",
2566
+ tool: toolCall.name,
2567
+ input: toolCall.input,
2568
+ result,
2569
+ isError: true,
2570
+ completedSideEffect: false,
2571
+ });
2527
2572
  recordToolResult(result, true);
2528
2573
  requestedActionStop ??= {
2529
2574
  message: `I stopped because the ${toolCall.name} action was interrupted ${priorInterruptions} time(s) in a row. ` +
@@ -2567,7 +2612,14 @@ export async function runAgentLoop(opts) {
2567
2612
  const toolCallSchemaError = toolCallErrors.get(toolCall.id);
2568
2613
  if (toolCallSchemaError) {
2569
2614
  const result = finalizeToolErrorResult(toolInputSchemaErrorResult(toolCall.name, toolCallSchemaError.input, toolCallSchemaError.error));
2570
- send({ type: "tool_done", tool: toolCall.name, result });
2615
+ send({
2616
+ type: "tool_done",
2617
+ tool: toolCall.name,
2618
+ input: toolCall.input,
2619
+ result,
2620
+ isError: true,
2621
+ completedSideEffect: false,
2622
+ });
2571
2623
  recordToolResult(result, true);
2572
2624
  return {
2573
2625
  type: "tool-result",
@@ -2581,7 +2633,14 @@ export async function runAgentLoop(opts) {
2581
2633
  const rawToolInputError = validateRawToolInput(actionEntry, toolCall.input);
2582
2634
  if (rawToolInputError) {
2583
2635
  const result = finalizeToolErrorResult(toolInputSchemaErrorResult(toolCall.name, toolCall.input, rawToolInputError));
2584
- send({ type: "tool_done", tool: toolCall.name, result });
2636
+ send({
2637
+ type: "tool_done",
2638
+ tool: toolCall.name,
2639
+ input: toolCall.input,
2640
+ result,
2641
+ isError: true,
2642
+ completedSideEffect: false,
2643
+ });
2585
2644
  recordToolResult(result, true);
2586
2645
  return {
2587
2646
  type: "tool-result",
@@ -2595,7 +2654,14 @@ export async function runAgentLoop(opts) {
2595
2654
  if (opts.executionMode === "plan" &&
2596
2655
  !isPlanModeToolCallAllowed(toolCall.name, toolCall.input, actionEntry)) {
2597
2656
  const result = planModeBlockedMessage(toolCall.name);
2598
- send({ type: "tool_done", tool: toolCall.name, result });
2657
+ send({
2658
+ type: "tool_done",
2659
+ tool: toolCall.name,
2660
+ input: toolCall.input,
2661
+ result,
2662
+ isError: true,
2663
+ completedSideEffect: false,
2664
+ });
2599
2665
  recordToolResult(result, true);
2600
2666
  return {
2601
2667
  type: "tool-result",
@@ -2660,6 +2726,12 @@ export async function runAgentLoop(opts) {
2660
2726
  actionPromise
2661
2727
  .then((zombieRaw) => {
2662
2728
  const zombieMcp = isMcpActionResult(zombieRaw) ? zombieRaw : null;
2729
+ if (zombieMcp &&
2730
+ zombieMcp.raw &&
2731
+ typeof zombieMcp.raw === "object" &&
2732
+ zombieMcp.raw.isError === true) {
2733
+ return;
2734
+ }
2663
2735
  const zombieText = zombieMcp ? zombieMcp.text : zombieRaw;
2664
2736
  const zombieStr = typeof zombieText === "string"
2665
2737
  ? zombieText
@@ -2775,7 +2847,10 @@ export async function runAgentLoop(opts) {
2775
2847
  send({
2776
2848
  type: "tool_done",
2777
2849
  tool: toolCall.name,
2850
+ input: toolCall.input,
2778
2851
  result,
2852
+ ...(isError ? { isError: true } : {}),
2853
+ ...(isError ? { completedSideEffect: false } : {}),
2779
2854
  ...(mcpApp ? { mcpApp } : {}),
2780
2855
  ...(actionEntry.chatUI ? { chatUI: actionEntry.chatUI } : {}),
2781
2856
  });