@agent-native/core 0.92.6 → 0.92.8

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 (297) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +18 -0
  3. package/corpus/core/docs/content/a2a-protocol.mdx +12 -0
  4. package/corpus/core/docs/content/locales/ar-SA/a2a-protocol.mdx +12 -0
  5. package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +3 -3
  6. package/corpus/core/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -0
  7. package/corpus/core/docs/content/locales/de-DE/a2a-protocol.mdx +12 -0
  8. package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +3 -3
  9. package/corpus/core/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -0
  10. package/corpus/core/docs/content/locales/es-ES/a2a-protocol.mdx +12 -0
  11. package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +3 -3
  12. package/corpus/core/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -0
  13. package/corpus/core/docs/content/locales/fr-FR/a2a-protocol.mdx +12 -0
  14. package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +3 -3
  15. package/corpus/core/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -0
  16. package/corpus/core/docs/content/locales/hi-IN/a2a-protocol.mdx +12 -0
  17. package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +3 -3
  18. package/corpus/core/docs/content/locales/hi-IN/pure-agent-apps.mdx +4 -0
  19. package/corpus/core/docs/content/locales/ja-JP/a2a-protocol.mdx +12 -0
  20. package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +3 -3
  21. package/corpus/core/docs/content/locales/ja-JP/pure-agent-apps.mdx +4 -0
  22. package/corpus/core/docs/content/locales/ko-KR/a2a-protocol.mdx +12 -0
  23. package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +3 -3
  24. package/corpus/core/docs/content/locales/ko-KR/pure-agent-apps.mdx +4 -0
  25. package/corpus/core/docs/content/locales/pt-BR/a2a-protocol.mdx +12 -0
  26. package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +3 -3
  27. package/corpus/core/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -0
  28. package/corpus/core/docs/content/locales/zh-CN/a2a-protocol.mdx +12 -0
  29. package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +3 -3
  30. package/corpus/core/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -0
  31. package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.mdx +12 -0
  32. package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +3 -3
  33. package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -0
  34. package/corpus/core/docs/content/pr-visual-recap.mdx +3 -3
  35. package/corpus/core/docs/content/pure-agent-apps.mdx +22 -0
  36. package/corpus/core/package.json +1 -1
  37. package/corpus/core/src/agent/engine/builtin.ts +1 -1
  38. package/corpus/core/src/agent/model-config.ts +30 -30
  39. package/corpus/core/src/agent/production-agent.ts +129 -7
  40. package/corpus/core/src/cli/design-connect.ts +438 -83
  41. package/corpus/core/src/cli/recap.ts +2 -2
  42. package/corpus/core/src/cli/sync-builder-starter-manifest.ts +1 -1
  43. package/corpus/core/src/client/AgentPanel.tsx +8 -1
  44. package/corpus/core/src/client/agent-chat-adapter.ts +12 -7
  45. package/corpus/core/src/client/composer/TiptapComposer.tsx +1 -1
  46. package/corpus/core/src/client/index.ts +4 -0
  47. package/corpus/core/src/client/org/TeamPage.tsx +41 -26
  48. package/corpus/core/src/client/use-action.ts +113 -1
  49. package/corpus/core/src/db/client.ts +12 -2
  50. package/corpus/core/src/db/create-get-db.ts +4 -1
  51. package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +1 -1
  52. package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +1 -1
  53. package/corpus/core/src/server/transcribe-voice.ts +1 -1
  54. package/corpus/core/src/usage/store.ts +13 -4
  55. package/corpus/core/src/vite/client.ts +38 -1
  56. package/corpus/templates/analytics/AGENTS.md +3 -0
  57. package/corpus/templates/analytics/actions/get-data-program.ts +78 -0
  58. package/corpus/templates/analytics/actions/list-data-programs.ts +49 -0
  59. package/corpus/templates/analytics/app/global.css +11 -0
  60. package/corpus/templates/analytics/app/hooks/use-dashboard-chat-context.ts +163 -17
  61. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  62. package/corpus/templates/analytics/app/i18n-data.ts +20 -0
  63. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +96 -3
  64. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +3 -1
  65. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +61 -4
  66. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +40 -2
  67. package/corpus/templates/analytics/changelog/2026-07-09-analytics-no-longer-forgets-successful-data-queries-when-a-l.md +6 -0
  68. package/corpus/templates/analytics/changelog/2026-07-09-dashboard-charts-keep-consistent-spacing-when-they-stack-ver.md +6 -0
  69. package/corpus/templates/analytics/changelog/2026-07-09-dashboard-charts-tables-and-extensions-can-be-selected-and-d.md +6 -0
  70. package/corpus/templates/analytics/changelog/2026-07-09-long-running-analytics-requests-now-recover-automatically-wh.md +6 -0
  71. package/corpus/templates/analytics/server/db/index.ts +6 -0
  72. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +1 -7
  73. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +102 -15
  74. package/corpus/templates/content/app/hooks/use-content-database.ts +52 -0
  75. package/corpus/templates/content/app/hooks/use-document-properties.ts +50 -6
  76. package/corpus/templates/content/app/i18n/zh-TW.ts +2 -0
  77. package/corpus/templates/content/app/i18n-data.ts +28 -0
  78. package/corpus/templates/content/changelog/2026-07-09-notion-conflict-warnings-no-longer-flash-during-normal-synce.md +6 -0
  79. package/corpus/templates/content/changelog/2026-07-09-property-menus-and-delete-confirmations-now-open-visibly-and.md +6 -0
  80. package/corpus/templates/content/server/lib/notion-sync.ts +130 -28
  81. package/corpus/templates/design/actions/add-breakpoint.ts +48 -68
  82. package/corpus/templates/design/actions/add-localhost-screens.ts +496 -61
  83. package/corpus/templates/design/actions/apply-component-prop-edit.ts +2 -18
  84. package/corpus/templates/design/actions/apply-design-token-edit.ts +51 -82
  85. package/corpus/templates/design/actions/apply-tweaks.ts +63 -41
  86. package/corpus/templates/design/actions/capture-design-state.ts +2 -2
  87. package/corpus/templates/design/actions/connect-localhost.ts +58 -12
  88. package/corpus/templates/design/actions/create-component.ts +2 -18
  89. package/corpus/templates/design/actions/create-design-branch.ts +38 -18
  90. package/corpus/templates/design/actions/create-fusion-app.ts +15 -11
  91. package/corpus/templates/design/actions/delete-file.ts +19 -34
  92. package/corpus/templates/design/actions/deploy-design-preview.ts +59 -27
  93. package/corpus/templates/design/actions/deploy-fusion-app.ts +22 -15
  94. package/corpus/templates/design/actions/export-pdf.ts +2 -1
  95. package/corpus/templates/design/actions/export-zip.ts +9 -3
  96. package/corpus/templates/design/actions/generate-design.ts +107 -70
  97. package/corpus/templates/design/actions/get-component-details.ts +2 -18
  98. package/corpus/templates/design/actions/get-design-branch-diff.ts +2 -3
  99. package/corpus/templates/design/actions/get-design-surface-index.ts +2 -18
  100. package/corpus/templates/design/actions/get-design.ts +2 -1
  101. package/corpus/templates/design/actions/grant-localhost-write-consent.ts +7 -1
  102. package/corpus/templates/design/actions/import-design-tokens.ts +114 -76
  103. package/corpus/templates/design/actions/index-components.ts +2 -18
  104. package/corpus/templates/design/actions/list-design-source-capabilities.ts +23 -28
  105. package/corpus/templates/design/actions/list-local-files.ts +9 -2
  106. package/corpus/templates/design/actions/migrate-board-objects-to-file.ts +82 -98
  107. package/corpus/templates/design/actions/open-component-source.ts +2 -18
  108. package/corpus/templates/design/actions/open-visual-edit.ts +19 -1
  109. package/corpus/templates/design/actions/present-design-variants.ts +70 -70
  110. package/corpus/templates/design/actions/preview-component-prop-edit.ts +4 -14
  111. package/corpus/templates/design/actions/read-local-file.ts +9 -2
  112. package/corpus/templates/design/actions/remove-breakpoint.ts +40 -61
  113. package/corpus/templates/design/actions/rename-screen.ts +425 -0
  114. package/corpus/templates/design/actions/request-localhost-write-consent.ts +12 -2
  115. package/corpus/templates/design/actions/revoke-localhost-write-consent.ts +9 -2
  116. package/corpus/templates/design/actions/sync-fusion-app.ts +56 -39
  117. package/corpus/templates/design/actions/update-design.ts +376 -61
  118. package/corpus/templates/design/actions/update-file.ts +455 -188
  119. package/corpus/templates/design/actions/write-local-file.ts +10 -2
  120. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +685 -608
  121. package/corpus/templates/design/app/components/design/LayersPanel.tsx +43 -15
  122. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +576 -2015
  123. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +62 -14
  124. package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +263 -25
  125. package/corpus/templates/design/app/components/design/design-canvas/annotation-submit.ts +34 -0
  126. package/corpus/templates/design/app/components/design/design-canvas/coordinate-transforms.ts +40 -0
  127. package/corpus/templates/design/app/components/design/design-canvas/creation.ts +47 -0
  128. package/corpus/templates/design/app/components/design/design-canvas/element-payload.ts +27 -0
  129. package/corpus/templates/design/app/components/design/design-canvas/embedded-frame.ts +62 -0
  130. package/corpus/templates/design/app/components/design/design-canvas/external-preview.ts +137 -0
  131. package/corpus/templates/design/app/components/design/design-canvas/file-drop.ts +10 -0
  132. package/corpus/templates/design/app/components/design/design-canvas/hit-test.ts +23 -0
  133. package/corpus/templates/design/app/components/design/design-canvas/iframe-events.ts +23 -0
  134. package/corpus/templates/design/app/components/design/design-canvas/iframe-pan.ts +177 -0
  135. package/corpus/templates/design/app/components/design/design-canvas/motion-types.ts +7 -0
  136. package/corpus/templates/design/app/components/design/design-canvas/pending-text-edit.ts +62 -0
  137. package/corpus/templates/design/app/components/design/index.ts +2 -2
  138. package/corpus/templates/design/app/components/design/multi-screen/canvas-tools.ts +100 -0
  139. package/corpus/templates/design/app/components/design/multi-screen/coordinate-transforms.ts +81 -0
  140. package/corpus/templates/design/app/components/design/multi-screen/cross-screen-drop.ts +23 -13
  141. package/corpus/templates/design/app/components/design/multi-screen/culling.ts +238 -19
  142. package/corpus/templates/design/app/components/design/multi-screen/draft-primitives.ts +424 -0
  143. package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +341 -0
  144. package/corpus/templates/design/app/components/design/multi-screen/iframe-targeting.ts +52 -0
  145. package/corpus/templates/design/app/components/design/multi-screen/overview-layout.ts +62 -0
  146. package/corpus/templates/design/app/components/design/multi-screen/primitive-drop-target.ts +283 -0
  147. package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +272 -0
  148. package/corpus/templates/design/app/components/design/multi-screen/types.ts +5 -1
  149. package/corpus/templates/design/app/components/design/multi-screen/wheel-gesture-state.ts +12 -0
  150. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +325 -84
  151. package/corpus/templates/design/app/hooks/use-navigation-state.ts +15 -1
  152. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +119 -47
  153. package/corpus/templates/design/app/i18n/zh-TW.ts +9 -0
  154. package/corpus/templates/design/app/i18n-data.ts +223 -0
  155. package/corpus/templates/design/app/lib/design-save-outbox.ts +379 -0
  156. package/corpus/templates/design/app/lib/png-clipboard.ts +113 -0
  157. package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +229 -0
  158. package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +918 -0
  159. package/corpus/templates/design/app/pages/design-editor/collab-sync.ts +43 -0
  160. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +336 -0
  161. package/corpus/templates/design/app/pages/design-editor/data-operations.ts +270 -0
  162. package/corpus/templates/design/app/pages/design-editor/dom-guards.ts +24 -0
  163. package/corpus/templates/design/app/pages/design-editor/dom-utils.ts +11 -0
  164. package/corpus/templates/design/app/pages/design-editor/editor-session.ts +20 -0
  165. package/corpus/templates/design/app/pages/design-editor/editor-state.ts +408 -0
  166. package/corpus/templates/design/app/pages/design-editor/export-capture.ts +115 -0
  167. package/corpus/templates/design/app/pages/design-editor/geometry-persistence.ts +93 -0
  168. package/corpus/templates/design/app/pages/design-editor/history.ts +169 -0
  169. package/corpus/templates/design/app/pages/design-editor/layout-operations.ts +185 -0
  170. package/corpus/templates/design/app/pages/design-editor/motion-state.ts +309 -0
  171. package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +438 -0
  172. package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +510 -0
  173. package/corpus/templates/design/app/pages/design-editor/portable-style.ts +115 -0
  174. package/corpus/templates/design/app/pages/design-editor/selection-state.ts +337 -0
  175. package/corpus/templates/design/app/pages/design-editor/style-utils.ts +5 -0
  176. package/corpus/templates/design/app/pages/design-editor/tool-state.ts +92 -0
  177. package/corpus/templates/design/app/pages/design-editor/tweak-save.ts +87 -0
  178. package/corpus/templates/design/app/pages/design-editor/types.ts +36 -0
  179. package/corpus/templates/design/app/routes/design.$id.tsx +11 -1
  180. package/corpus/templates/design/changelog/2026-07-09-design-edits-canvas-positions-tools-and-tab-context-now-pers.md +6 -0
  181. package/corpus/templates/design/changelog/2026-07-09-figma-style-shortcuts-drawing-annotations-and-cross-screen-d.md +6 -0
  182. package/corpus/templates/design/changelog/2026-07-09-hand-and-scale-tools-now-keep-their-active-toolbar-identity-.md +6 -0
  183. package/corpus/templates/design/changelog/2026-07-09-large-multi-screen-designs-now-stay-responsive-during-long-c.md +6 -0
  184. package/corpus/templates/design/changelog/2026-07-09-layer-drags-now-land-exactly-where-the-insertion-indicator-s.md +6 -0
  185. package/corpus/templates/design/server/db/index.ts +2 -52
  186. package/corpus/templates/design/server/db/schema.ts +16 -0
  187. package/corpus/templates/design/server/lib/design-data-access.ts +70 -0
  188. package/corpus/templates/design/server/lib/design-data-mutation.ts +249 -0
  189. package/corpus/templates/design/server/lib/fusion-screens.ts +89 -76
  190. package/corpus/templates/design/server/lib/import-design-files.ts +76 -35
  191. package/corpus/templates/design/server/lib/verify-write-grant.ts +7 -2
  192. package/corpus/templates/design/server/plugins/db.ts +19 -0
  193. package/corpus/templates/design/server/source-workspace.ts +12 -13
  194. package/corpus/templates/design/shared/resolve-tweaks.ts +15 -0
  195. package/corpus/templates/design/shared/screen-rename.ts +42 -0
  196. package/corpus/templates/design/shared/source-mode.ts +84 -4
  197. package/dist/agent/engine/builder-engine.d.ts +1 -1
  198. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  199. package/dist/agent/engine/builtin.js +1 -1
  200. package/dist/agent/engine/builtin.js.map +1 -1
  201. package/dist/agent/model-config.d.ts +9 -9
  202. package/dist/agent/model-config.d.ts.map +1 -1
  203. package/dist/agent/model-config.js +30 -30
  204. package/dist/agent/model-config.js.map +1 -1
  205. package/dist/agent/production-agent.d.ts +60 -1
  206. package/dist/agent/production-agent.d.ts.map +1 -1
  207. package/dist/agent/production-agent.js +106 -7
  208. package/dist/agent/production-agent.js.map +1 -1
  209. package/dist/cli/design-connect.d.ts +30 -1
  210. package/dist/cli/design-connect.d.ts.map +1 -1
  211. package/dist/cli/design-connect.js +359 -75
  212. package/dist/cli/design-connect.js.map +1 -1
  213. package/dist/cli/recap.js +2 -2
  214. package/dist/cli/recap.js.map +1 -1
  215. package/dist/cli/sync-builder-starter-manifest.js +1 -1
  216. package/dist/cli/sync-builder-starter-manifest.js.map +1 -1
  217. package/dist/client/AgentPanel.d.ts.map +1 -1
  218. package/dist/client/AgentPanel.js +6 -1
  219. package/dist/client/AgentPanel.js.map +1 -1
  220. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  221. package/dist/client/agent-chat-adapter.js +10 -5
  222. package/dist/client/agent-chat-adapter.js.map +1 -1
  223. package/dist/client/composer/TiptapComposer.js +1 -1
  224. package/dist/client/composer/TiptapComposer.js.map +1 -1
  225. package/dist/client/index.d.ts +1 -1
  226. package/dist/client/index.d.ts.map +1 -1
  227. package/dist/client/index.js +1 -1
  228. package/dist/client/index.js.map +1 -1
  229. package/dist/client/org/TeamPage.d.ts.map +1 -1
  230. package/dist/client/org/TeamPage.js +6 -5
  231. package/dist/client/org/TeamPage.js.map +1 -1
  232. package/dist/client/use-action.d.ts +32 -0
  233. package/dist/client/use-action.d.ts.map +1 -1
  234. package/dist/client/use-action.js +68 -1
  235. package/dist/client/use-action.js.map +1 -1
  236. package/dist/collab/awareness.d.ts +2 -2
  237. package/dist/collab/awareness.d.ts.map +1 -1
  238. package/dist/collab/routes.d.ts +1 -1
  239. package/dist/db/client.d.ts +3 -0
  240. package/dist/db/client.d.ts.map +1 -1
  241. package/dist/db/client.js +7 -2
  242. package/dist/db/client.js.map +1 -1
  243. package/dist/db/create-get-db.d.ts.map +1 -1
  244. package/dist/db/create-get-db.js +2 -2
  245. package/dist/db/create-get-db.js.map +1 -1
  246. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  247. package/dist/notifications/routes.d.ts +1 -1
  248. package/dist/observability/routes.d.ts +5 -5
  249. package/dist/progress/routes.d.ts +1 -1
  250. package/dist/resources/handlers.d.ts +1 -1
  251. package/dist/scripts/agent-engines/manage-agent-engine.js +1 -1
  252. package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
  253. package/dist/scripts/agent-engines/set-agent-engine.js +1 -1
  254. package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
  255. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  256. package/dist/server/transcribe-voice.js +1 -1
  257. package/dist/server/transcribe-voice.js.map +1 -1
  258. package/dist/usage/store.d.ts.map +1 -1
  259. package/dist/usage/store.js +13 -4
  260. package/dist/usage/store.js.map +1 -1
  261. package/dist/vite/client.d.ts.map +1 -1
  262. package/dist/vite/client.js +36 -1
  263. package/dist/vite/client.js.map +1 -1
  264. package/docs/content/a2a-protocol.mdx +12 -0
  265. package/docs/content/locales/ar-SA/a2a-protocol.mdx +12 -0
  266. package/docs/content/locales/ar-SA/pr-visual-recap.mdx +3 -3
  267. package/docs/content/locales/ar-SA/pure-agent-apps.mdx +4 -0
  268. package/docs/content/locales/de-DE/a2a-protocol.mdx +12 -0
  269. package/docs/content/locales/de-DE/pr-visual-recap.mdx +3 -3
  270. package/docs/content/locales/de-DE/pure-agent-apps.mdx +4 -0
  271. package/docs/content/locales/es-ES/a2a-protocol.mdx +12 -0
  272. package/docs/content/locales/es-ES/pr-visual-recap.mdx +3 -3
  273. package/docs/content/locales/es-ES/pure-agent-apps.mdx +4 -0
  274. package/docs/content/locales/fr-FR/a2a-protocol.mdx +12 -0
  275. package/docs/content/locales/fr-FR/pr-visual-recap.mdx +3 -3
  276. package/docs/content/locales/fr-FR/pure-agent-apps.mdx +4 -0
  277. package/docs/content/locales/hi-IN/a2a-protocol.mdx +12 -0
  278. package/docs/content/locales/hi-IN/pr-visual-recap.mdx +3 -3
  279. package/docs/content/locales/hi-IN/pure-agent-apps.mdx +4 -0
  280. package/docs/content/locales/ja-JP/a2a-protocol.mdx +12 -0
  281. package/docs/content/locales/ja-JP/pr-visual-recap.mdx +3 -3
  282. package/docs/content/locales/ja-JP/pure-agent-apps.mdx +4 -0
  283. package/docs/content/locales/ko-KR/a2a-protocol.mdx +12 -0
  284. package/docs/content/locales/ko-KR/pr-visual-recap.mdx +3 -3
  285. package/docs/content/locales/ko-KR/pure-agent-apps.mdx +4 -0
  286. package/docs/content/locales/pt-BR/a2a-protocol.mdx +12 -0
  287. package/docs/content/locales/pt-BR/pr-visual-recap.mdx +3 -3
  288. package/docs/content/locales/pt-BR/pure-agent-apps.mdx +4 -0
  289. package/docs/content/locales/zh-CN/a2a-protocol.mdx +12 -0
  290. package/docs/content/locales/zh-CN/pr-visual-recap.mdx +3 -3
  291. package/docs/content/locales/zh-CN/pure-agent-apps.mdx +4 -0
  292. package/docs/content/locales/zh-TW/a2a-protocol.mdx +12 -0
  293. package/docs/content/locales/zh-TW/pr-visual-recap.mdx +3 -3
  294. package/docs/content/locales/zh-TW/pure-agent-apps.mdx +4 -0
  295. package/docs/content/pr-visual-recap.mdx +3 -3
  296. package/docs/content/pure-agent-apps.mdx +22 -0
  297. package/package.json +2 -2
@@ -138,11 +138,11 @@ npx @agent-native/core@latest recap doctor
138
138
 
139
139
  除了后端之外,两个存储库变量还可以调整代理的运行方式:
140
140
 
141
- - **`VISUAL_RECAP_MODEL`** 固定传递给 CLI (`--model`) 的模型 — 例如 `gpt-5.5` 用于 Codex,或 Claude 模型 ID。保留其未设置以使用 CLI 自己的默认模型。
141
+ - **`VISUAL_RECAP_MODEL`** 固定传递给 CLI (`--model`) 的模型 — 例如 `gpt-5.6-sol` 用于 Codex,或 Claude 模型 ID。保留其未设置以使用 CLI 自己的默认模型。
142
142
  - **`VISUAL_RECAP_REASONING`** 设置推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。适用于Codex后端; Claude 的推理是模型驱动的,因此该变量被忽略。
143
143
  - **`VISUAL_RECAP_SKILL_SOURCE`** 控制提示新鲜度:`auto`/unset 使用最新的捆绑技能指南,而 `repo` 固定到已提交的存储库本地 `visual-recap` 技能文件夹。
144
144
 
145
- 例如,要在 Codex 和 GPT-5.5 上以高推理运行回顾,请设置存储库变量 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.5` 和 `VISUAL_RECAP_REASONING=high`。
145
+ 例如,要在 Codex 和 GPT-5.6 Sol 上以高推理运行回顾,请设置存储库变量 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.6-sol` 和 `VISUAL_RECAP_REASONING=high`。
146
146
 
147
147
  ## 秘密和变量
148
148
 
@@ -191,7 +191,7 @@ npx @agent-native/core@latest recap setup
191
191
  | ------------------------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
192
192
  | `OPENAI_API_KEY` | — | 秘密。与 `VISUAL_RECAP_AGENT=codex` 一起设置以使用 Codex 运行回顾。 |
193
193
  | `VISUAL_RECAP_AGENT` | `claude` | 变量。选择编码代理后端(`claude` 或 `codex`)。 |
194
- | `VISUAL_RECAP_MODEL` | 每个CLI的默认值 | 变量。固定模型 - 例如`gpt-5.5` 表示 Codex,或 Claude 型号 ID。取消设置使用 CLI 自己的默认值。 |
194
+ | `VISUAL_RECAP_MODEL` | 每个CLI的默认值 | 变量。固定模型 - 例如`gpt-5.6-sol` 表示 Codex,或 Claude 型号 ID。取消设置使用 CLI 自己的默认值。 |
195
195
  | `VISUAL_RECAP_REASONING` | 每个模型的默认值 | 变量。推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。适用于Codex后端。 |
196
196
  | `RECAP_CLI_VERSION` | `latest` | 变量。固定工作流程安装的 `@agent-native/core` CLI 版本 - 例如`1.5.0`。参见[Version pinning](#version-pinning-copy-variant)。 |
197
197
  | `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | 秘密。仅当在不同来源自行托管计划应用时。 |
@@ -66,6 +66,10 @@ Automation-first app 是无浏览器的 Agent-Native app,用于 scheduled jobs
66
66
 
67
67
  → [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
68
68
 
69
+ ## 稍后添加聊天 {#add-chat-later}
70
+
71
+ `--headless` 只选择初始 scaffold;没有可将现有仅 actions 项目原地转换为聊天应用的 `agent-native` 命令。当用户需要浏览器对话时,请将 [Chat 模板](/docs/template-chat) 用作迁移参考:保留 actions、SQL 数据、instructions 和 skills,并添加浏览器 shell、server plugins、`<AgentChatSurface>` 以及加载现有 actions 的 chat plugin。验证 `pnpm typecheck`,并完成一次调用现有 action 的聊天。`agent-native add` 用于 integration blueprints,不用于此转换。
72
+
69
73
  ## 下一步是什么
70
74
 
71
75
  - [**Agent Surfaces — Headless**](/docs/agent-surfaces#headless) — 完整的无头决策指南和 API
@@ -436,6 +436,18 @@ const client = new A2AClient(url, process.env.A2A_API_KEY);
436
436
 
437
437
  JWT 驗證(`server.ts` 中的 `verifyA2AToken`)接受使用全域 `A2A_SECRET` 或透過權杖的 `org_domain` 聲明從 SQL 尋找的組織範圍秘密簽名的權杖,並在存在時強制執行權杖自己的 `aud`/`iss` 聲明。
438
438
 
439
+ ### 組織密鑰同步 {#organization-secret-sync}
440
+
441
+ **組織 → 跨應用程式驗證**設定會管理組織範圍的密鑰,用來驗證同一組織中個別部署的應用程式之間的委派。它不是使用者登入或 Cross-App SSO 設定。此密鑰補充部署的 `A2A_SECRET`:具有 `org_domain` 宣告的 A2A JWT 可使用相符組織的密鑰驗證。
442
+
443
+ 組織擁有者應為每個參與的應用程式提供相同的允許電子郵件網域與相同的組織範圍密鑰:
444
+
445
+ 1. 在第一個應用程式中,從**組織 → 跨應用程式驗證**產生或顯示密鑰。
446
+ 2. 在每個其他應用程式中,選擇**從另一個應用程式貼上密鑰**並貼上該值。首次連線必須進行這個手動步驟:尚未擁有該密鑰的應用程式無法驗證遠端同步要求。
447
+ 3. 應用程式共用此密鑰後,使用**同步到應用程式**將後續更新推送至已連線且已探索到的應用程式。結果會回報無法更新的應用程式。
448
+
449
+ 當您**重新產生**密鑰時,設定 UI 會立即同步它,並使用先前的密鑰簽署更新,讓已連線的應用程式可以驗證變更。如果某個應用程式錯過該同步,請在其中手動貼上新密鑰,然後再次同步。請像對待其他憑證一樣對待此密鑰:不要將它放入用戶端程式碼、日誌或第三方用戶端設定中。
450
+
439
451
  ## 繼續 {#continuations}
440
452
 
441
453
  當代理呼叫未立即返回的遠端 A2A 對等點時,框架會輪詢 `tasks/get` 直到工作解決。這是透過 `A2AClient.sendAndWait` 連線的,這是 `callAgent()` 幫助程式使用的預設模式。
@@ -138,11 +138,11 @@ npx @agent-native/core@latest recap doctor
138
138
 
139
139
  除了後端之外,兩個儲存庫變數還可以調整代理的執行方式:
140
140
 
141
- - **`VISUAL_RECAP_MODEL`** 固定傳遞給 CLI (`--model`) 的模型 — 例如 `gpt-5.5` 用於 Codex,或 Claude 模型 ID。保留其未設定以使用 CLI 自己的預設模型。
141
+ - **`VISUAL_RECAP_MODEL`** 固定傳遞給 CLI (`--model`) 的模型 — 例如 `gpt-5.6-sol` 用於 Codex,或 Claude 模型 ID。保留其未設定以使用 CLI 自己的預設模型。
142
142
  - **`VISUAL_RECAP_REASONING`** 設定推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。適用於Codex後端; Claude 的推理是模型驅動的,因此該變數被忽略。
143
143
  - **`VISUAL_RECAP_SKILL_SOURCE`** 控制提示新鮮度:`auto`/unset 使用最新的捆綁技能指南,而 `repo` 固定到已提交的儲存庫本機 `visual-recap` 技能資料夾。
144
144
 
145
- 例如,要在 Codex 和 GPT-5.5 上以高推理執行回顧,請設定儲存庫變數 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.5` 和 `VISUAL_RECAP_REASONING=high`。
145
+ 例如,要在 Codex 和 GPT-5.6 Sol 上以高推理執行回顧,請設定儲存庫變數 `VISUAL_RECAP_AGENT=codex`、`VISUAL_RECAP_MODEL=gpt-5.6-sol` 和 `VISUAL_RECAP_REASONING=high`。
146
146
 
147
147
  ## 秘密和變數
148
148
 
@@ -191,7 +191,7 @@ npx @agent-native/core@latest recap setup
191
191
  | ------------------------ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
192
192
  | `OPENAI_API_KEY` | — | 秘密。與 `VISUAL_RECAP_AGENT=codex` 一起設定以使用 Codex 執行回顧。 |
193
193
  | `VISUAL_RECAP_AGENT` | `claude` | 變數。選取編碼代理後端(`claude` 或 `codex`)。 |
194
- | `VISUAL_RECAP_MODEL` | 每個 CLI 的預設值 | 變數。固定模型 - 例如`gpt-5.5` 表示 Codex,或 Claude 型號 ID。取消設定使用 CLI 自己的預設值。 |
194
+ | `VISUAL_RECAP_MODEL` | 每個 CLI 的預設值 | 變數。固定模型 - 例如`gpt-5.6-sol` 表示 Codex,或 Claude 型號 ID。取消設定使用 CLI 自己的預設值。 |
195
195
  | `VISUAL_RECAP_REASONING` | 每個模型的預設值 | 變數。推理深度:`none`、`minimal`、`low`、`medium`、`high` 或 `xhigh`。適用於Codex後端。 |
196
196
  | `RECAP_CLI_VERSION` | `latest` | 變數。固定工作流程安裝的 `@agent-native/core` CLI 版本 - 例如`1.5.0`。參見[Version pinning](#version-pinning-copy-variant)。 |
197
197
  | `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | 秘密。僅當在不同來源自行託管計畫應用時。 |
@@ -66,6 +66,10 @@ Automation-first app 是無瀏覽器的 Agent-Native app,用於 scheduled jobs
66
66
 
67
67
  → [**Agent Surfaces — Headless agent**](/docs/agent-surfaces#headless)
68
68
 
69
+ ## 稍後新增聊天 {#add-chat-later}
70
+
71
+ `--headless` 只會選擇初始 scaffold;沒有可將現有僅 actions 專案原地轉換為聊天應用程式的 `agent-native` 命令。當使用者需要瀏覽器對話時,請將 [Chat 範本](/docs/template-chat) 作為遷移參考:保留 actions、SQL 資料、instructions 和 skills,並新增瀏覽器 shell、server plugins、`<AgentChatSurface>` 與載入現有 actions 的 chat plugin。請驗證 `pnpm typecheck`,並完成一次呼叫現有 action 的聊天。`agent-native add` 用於 integration blueprints,不用於此轉換。
72
+
69
73
  ## 下一步是什麼
70
74
 
71
75
  - [**Agent Surfaces — Headless**](/docs/agent-surfaces#headless) — 完整的無頭決策指南和 API
@@ -138,11 +138,11 @@ If the variable is unset, the action uses `claude`.
138
138
 
139
139
  Beyond the backend, two repository variables tune _how_ the agent runs:
140
140
 
141
- - **`VISUAL_RECAP_MODEL`** pins the model passed to the CLI (`--model`) — for example `gpt-5.5` for Codex, or a Claude model id. Leave it unset to use the CLI's own default model.
141
+ - **`VISUAL_RECAP_MODEL`** pins the model passed to the CLI (`--model`) — for example `gpt-5.6-sol` for Codex, or a Claude model id. Leave it unset to use the CLI's own default model.
142
142
  - **`VISUAL_RECAP_REASONING`** sets the reasoning depth: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. It applies to the Codex backend; Claude's reasoning is model-driven, so this variable is ignored there.
143
143
  - **`VISUAL_RECAP_SKILL_SOURCE`** controls prompt freshness: `auto`/unset uses the latest bundled skill guidance, while `repo` pins to the committed repo-local `visual-recap` skill folder.
144
144
 
145
- For example, to run the recap on Codex with GPT-5.5 at high reasoning, set the repository variables `VISUAL_RECAP_AGENT=codex`, `VISUAL_RECAP_MODEL=gpt-5.5`, and `VISUAL_RECAP_REASONING=high`.
145
+ For example, to run the recap on Codex with GPT-5.6 Sol at high reasoning, set the repository variables `VISUAL_RECAP_AGENT=codex`, `VISUAL_RECAP_MODEL=gpt-5.6-sol`, and `VISUAL_RECAP_REASONING=high`.
146
146
 
147
147
  ## Secrets and variables
148
148
 
@@ -191,7 +191,7 @@ real token.
191
191
  | ------------------------ | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
192
192
  | `OPENAI_API_KEY` | — | Secret. Set together with `VISUAL_RECAP_AGENT=codex` to run the recap with Codex instead. |
193
193
  | `VISUAL_RECAP_AGENT` | `claude` | Variable. Selects the coding-agent backend (`claude` or `codex`). |
194
- | `VISUAL_RECAP_MODEL` | each CLI's default | Variable. Pins the model — e.g. `gpt-5.5` for Codex, or a Claude model id. Unset uses the CLI's own default. |
194
+ | `VISUAL_RECAP_MODEL` | each CLI's default | Variable. Pins the model — e.g. `gpt-5.6-sol` for Codex, or a Claude model id. Unset uses the CLI's own default. |
195
195
  | `VISUAL_RECAP_REASONING` | each model's default | Variable. Reasoning depth: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. Applies to the Codex backend. |
196
196
  | `RECAP_CLI_VERSION` | `latest` | Variable. Pins the `@agent-native/core` CLI version the workflow installs — e.g. `1.5.0`. See [Version pinning](#version-pinning-copy-variant). |
197
197
  | `PLAN_RECAP_APP_URL` | `https://plan.agent-native.com` | Secret. Only when self-hosting the Plans app at a different origin. |
@@ -91,6 +91,28 @@ The `--headless` flag only chooses the initial scaffold. It does not choose a
91
91
  different architecture. You can later move the same `actions/`, instructions,
92
92
  skills, and SQL state into a chat app or full application surface.
93
93
 
94
+ ## Add chat later {#add-chat-later}
95
+
96
+ `--headless` is not a permanent runtime mode, and there is no `agent-native`
97
+ command that converts an existing action-only project into a chat app in place.
98
+ When people need a browser conversation surface, use the [Chat template](/docs/template-chat)
99
+ as the migration reference and keep the durable action and database contract:
100
+
101
+ 1. Scaffold a temporary Chat app with the framework version you are migrating
102
+ to: `npx @agent-native/core@latest create my-chat-reference --template chat`.
103
+ 2. Bring its browser shell, server plugins, and UI dependencies into the
104
+ existing project. In particular, add the full-page `<AgentChatSurface>` and
105
+ an `agent-chat` plugin that loads the existing action registry.
106
+ 3. Keep your action names, Zod schemas, SQL data, instructions, and skills.
107
+ Chat calls those same actions; it does not replace them.
108
+ 4. Verify both surfaces: run `pnpm typecheck`, start the browser app with
109
+ `pnpm dev`, then complete one chat turn that calls an existing action.
110
+
111
+ Use `agent-native add` for integration blueprints, not for this conversion.
112
+ Choose chat when people need conversational steering, approvals, or durable
113
+ thread history; add app pages when they need to browse, compare, edit, or share
114
+ persistent objects.
115
+
94
116
  ## What to add next {#whats-next}
95
117
 
96
118
  - [**Getting Started**](/docs/getting-started) — the chat-first tutorial from action to inline result to durable page
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.92.6",
3
+ "version": "0.92.8",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -96,7 +96,7 @@ export function registerBuiltinEngines(): void {
96
96
  "Claude models through the Vercel AI SDK. Supports thinking and caching via AI SDK providerOptions.",
97
97
  openai: "OpenAI GPT models via the Vercel AI SDK. Requires OPENAI_API_KEY.",
98
98
  openrouter:
99
- "300+ models from Anthropic, OpenAI, Google, Z.ai, and more routed through a single endpoint. Use model IDs like 'anthropic/claude-sonnet-5', 'openai/gpt-5.5', or 'z-ai/glm-5.2'. Requires OPENROUTER_API_KEY.",
99
+ "300+ models from Anthropic, OpenAI, Google, Z.ai, and more routed through a single endpoint. Use model IDs like 'anthropic/claude-sonnet-5', 'openai/gpt-5.6-sol', or 'z-ai/glm-5.2'. Requires OPENROUTER_API_KEY.",
100
100
  google:
101
101
  "Google Gemini models via the Vercel AI SDK. Requires GOOGLE_GENERATIVE_AI_API_KEY.",
102
102
  groq: "Groq LPU inference via the Vercel AI SDK. Requires GROQ_API_KEY.",
@@ -11,14 +11,13 @@
11
11
  //
12
12
  // Sources (June 2026):
13
13
  // Anthropic https://platform.claude.com/docs/en/about-claude/models/overview
14
- // OpenAI https://developers.openai.com/api/docs/models/gpt-5.5
15
- // https://developers.openai.com/api/docs/models/gpt-5.4
14
+ // OpenAI https://developers.openai.com/api/docs/models/gpt-5.6
16
15
  // Google https://ai.google.dev/gemini-api/docs/models
17
16
  // OpenRouter https://openrouter.ai/api/v1/models
18
17
  //
19
18
  // Family defaults (used when a model id isn't listed explicitly):
20
19
  // claude-* → 200_000 (Haiku 4.5 and earlier models)
21
- // gpt-5* → 1_050_000 (GPT-5.4/5.5 flagship context)
20
+ // gpt-5* → 1_050_000 (GPT-5.6 Sol/Terra flagship context)
22
21
  // gemini-2* / gemini-3* → 1_048_576
23
22
  // everything else → 128_000 (safe conservative floor)
24
23
  //
@@ -37,9 +36,9 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
37
36
  "claude-haiku-4-5-20251001": 200_000,
38
37
 
39
38
  // ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────
40
- "gpt-5-5": 1_050_000,
41
- "gpt-5-4": 1_050_000,
42
- "gpt-5-4-mini": 400_000,
39
+ "gpt-5-6-sol": 1_050_000,
40
+ "gpt-5-6-terra": 1_050_000,
41
+ "gpt-5-6-luna": 400_000,
43
42
 
44
43
  // ── Gemini (Builder gateway IDs) ─────────────────────────────────────────
45
44
  "gemini-3-1-pro": 1_048_576,
@@ -52,15 +51,16 @@ const MODEL_CONTEXT_WINDOWS: Record<string, number> = {
52
51
  "anthropic/claude-opus-4.7": 1_000_000,
53
52
  "anthropic/claude-sonnet-5": 1_000_000,
54
53
  "anthropic/claude-sonnet-4.6": 1_000_000,
55
- "openai/gpt-5.5": 1_050_000,
56
- "openai/gpt-5.4": 1_050_000,
54
+ "openai/gpt-5.6-sol": 1_050_000,
55
+ "openai/gpt-5.6-terra": 1_050_000,
56
+ "openai/gpt-5.6-luna": 1_050_000,
57
57
  "google/gemini-2.5-flash": 1_048_576,
58
58
  "z-ai/glm-5.2": 1_048_576,
59
59
 
60
60
  // ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────
61
- "gpt-5.5": 1_050_000,
62
- "gpt-5.4": 1_050_000,
63
- "gpt-5.4-mini": 400_000,
61
+ "gpt-5.6-sol": 1_050_000,
62
+ "gpt-5.6-terra": 1_050_000,
63
+ "gpt-5.6-luna": 400_000,
64
64
 
65
65
  // ── AI-SDK native Google IDs ──────────────────────────────────────────────
66
66
  "gemini-3.5-flash": 1_048_576,
@@ -127,15 +127,13 @@ export function getContextWindowForModel(modelId: string): number {
127
127
  // Anthropic https://platform.claude.com/docs/en/docs/about-claude/models/overview
128
128
  // (Fable 5 / Opus 4.8 / Opus 4.7 / Sonnet 5 / Sonnet 4.6 = 128K;
129
129
  // Haiku 4.5 / Sonnet 4.5 / Opus 4.5 = 64K)
130
- // OpenAI https://developers.openai.com/api/docs/models/gpt-5.5
131
- // https://developers.openai.com/api/docs/models/gpt-5.4
132
- // https://developers.openai.com/api/docs/models/gpt-5.4-mini
133
- // (GPT-5.5 / GPT-5.4 / GPT-5.4-mini = 128K)
130
+ // OpenAI https://developers.openai.com/api/docs/models/gpt-5.6
131
+ // (GPT-5.6 Sol / Terra / Luna = 40K)
134
132
  //
135
133
  // Family defaults (used when a model id isn't listed explicitly):
136
134
  // claude flagship (fable-5 / opus-4.6+ / sonnet-5 / sonnet-4.6) → 128_000
137
135
  // claude-* (Haiku 4.5, older/unknown Claude ids) → 64_000
138
- // gpt-5* → 128_000
136
+ // gpt-5* → 128_000 (safe fallback)
139
137
  // everything else → 64_000
140
138
  // (safe conservative ceiling that matches the previous global clamp)
141
139
  // ---------------------------------------------------------------------------
@@ -151,9 +149,9 @@ const MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {
151
149
  "claude-haiku-4-5-20251001": 64_000,
152
150
 
153
151
  // ── Builder gateway OpenAI IDs (dot→dash) ────────────────────────────────
154
- "gpt-5-5": 128_000,
155
- "gpt-5-4": 128_000,
156
- "gpt-5-4-mini": 128_000,
152
+ "gpt-5-6-sol": 40_000,
153
+ "gpt-5-6-terra": 40_000,
154
+ "gpt-5-6-luna": 40_000,
157
155
 
158
156
  // ── OpenRouter model IDs ──────────────────────────────────────────────────
159
157
  "anthropic/claude-fable-5": 128_000,
@@ -161,13 +159,14 @@ const MODEL_MAX_OUTPUT_TOKENS: Record<string, number> = {
161
159
  "anthropic/claude-opus-4.7": 128_000,
162
160
  "anthropic/claude-sonnet-5": 128_000,
163
161
  "anthropic/claude-sonnet-4.6": 128_000,
164
- "openai/gpt-5.5": 128_000,
165
- "openai/gpt-5.4": 128_000,
162
+ "openai/gpt-5.6-sol": 40_000,
163
+ "openai/gpt-5.6-terra": 40_000,
164
+ "openai/gpt-5.6-luna": 128_000,
166
165
 
167
166
  // ── AI-SDK native OpenAI IDs ──────────────────────────────────────────────
168
- "gpt-5.5": 128_000,
169
- "gpt-5.4": 128_000,
170
- "gpt-5.4-mini": 128_000,
167
+ "gpt-5.6-sol": 40_000,
168
+ "gpt-5.6-terra": 40_000,
169
+ "gpt-5.6-luna": 40_000,
171
170
  };
172
171
 
173
172
  /**
@@ -243,7 +242,7 @@ function openRouterModelId(provider: string, model: string): string {
243
242
  return `${provider}/${model}`;
244
243
  }
245
244
 
246
- const FRAMEWORK_DEFAULT_OPENAI_MODEL = "gpt-5.5";
245
+ const FRAMEWORK_DEFAULT_OPENAI_MODEL = "gpt-5.6-sol";
247
246
  const FRAMEWORK_DEFAULT_BUILDER_MODEL = ANTHROPIC_DEFAULT_MODEL_ID;
248
247
  const FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL = builderGatewayModelId(
249
248
  FRAMEWORK_DEFAULT_OPENAI_MODEL,
@@ -262,8 +261,8 @@ export const AGENT_MODEL_CONFIG = {
262
261
  CLAUDE_SONNET_MODEL_ID,
263
262
  "claude-haiku-4-5",
264
263
  FRAMEWORK_DEFAULT_BUILDER_OPENAI_MODEL,
265
- "gpt-5-4",
266
- "gpt-5-4-mini",
264
+ "gpt-5-6-terra",
265
+ "gpt-5-6-luna",
267
266
  "gemini-3-1-pro",
268
267
  "gemini-3-5-flash",
269
268
  "gemini-3-1-flash-lite",
@@ -292,8 +291,8 @@ export const AGENT_MODEL_CONFIG = {
292
291
  defaultModel: FRAMEWORK_DEFAULT_OPENAI_MODEL,
293
292
  supportedModels: [
294
293
  FRAMEWORK_DEFAULT_OPENAI_MODEL,
295
- "gpt-5.4",
296
- "gpt-5.4-mini",
294
+ "gpt-5.6-terra",
295
+ "gpt-5.6-luna",
297
296
  ],
298
297
  },
299
298
  openrouter: {
@@ -303,7 +302,8 @@ export const AGENT_MODEL_CONFIG = {
303
302
  "anthropic/claude-opus-4.8",
304
303
  OPENROUTER_CLAUDE_SONNET_MODEL_ID,
305
304
  FRAMEWORK_DEFAULT_OPENROUTER_MODEL,
306
- "openai/gpt-5.4",
305
+ "openai/gpt-5.6-terra",
306
+ "openai/gpt-5.6-luna",
307
307
  // Current stable Gemini on OpenRouter (2.5 Flash is GA)
308
308
  "google/gemini-2.5-flash",
309
309
  "z-ai/glm-5.2",
@@ -2840,6 +2840,25 @@ export async function runAgentLoop(opts: {
2840
2840
  try {
2841
2841
  const priorEvents = await getCurrentTurnEventsForThread(opts.threadId);
2842
2842
  if (priorEvents.length > 0) {
2843
+ // A logical turn can span multiple background continuation runs. Final
2844
+ // response guards must see successful reads from earlier chunks, not
2845
+ // only tools executed after the latest handoff. Otherwise a guard can
2846
+ // reject a grounded answer (or a successfully-created artifact) after
2847
+ // the evidence-producing query completed in a predecessor run.
2848
+ for (const event of priorEvents) {
2849
+ if (event.type === "tool_start") {
2850
+ toolCallHistory.push({
2851
+ name: event.tool,
2852
+ input: event.input,
2853
+ });
2854
+ } else if (event.type === "tool_done") {
2855
+ toolResultHistory.push({
2856
+ name: event.tool,
2857
+ content: event.result,
2858
+ isError: event.isError === true,
2859
+ });
2860
+ }
2861
+ }
2843
2862
  toolCallJournal = classifyToolCallJournal(priorEvents);
2844
2863
  }
2845
2864
  } catch {
@@ -3790,7 +3809,7 @@ export async function runAgentLoop(opts: {
3790
3809
  tool: toolCall.name,
3791
3810
  input: toolCall.input as Record<string, unknown>,
3792
3811
  result,
3793
- completedSideEffect: false,
3812
+ completedSideEffect: true,
3794
3813
  });
3795
3814
  recordToolResult(result, false);
3796
3815
  return {
@@ -3844,6 +3863,7 @@ export async function runAgentLoop(opts: {
3844
3863
  tool: toolCall.name,
3845
3864
  input: toolCall.input as Record<string, unknown>,
3846
3865
  result,
3866
+ completedSideEffect: true,
3847
3867
  ...(actionEntry.chatUI ? { chatUI: actionEntry.chatUI } : {}),
3848
3868
  });
3849
3869
  recordToolResult(result, false);
@@ -4951,6 +4971,73 @@ export interface ChainServerDrivenContinuationDeps {
4951
4971
  sleep?: (ms: number) => Promise<void>;
4952
4972
  }
4953
4973
 
4974
+ /** Retry-budget sizing for one `chainServerDrivenContinuation` dispatch. */
4975
+ export interface ContinuationDispatchBudget {
4976
+ maxDispatchAttempts: number;
4977
+ dispatchResponseTimeoutMs: number;
4978
+ /** Cap (ms) on the per-gap exponential backoff. `Infinity` preserves the
4979
+ * original uncapped `500 * 2 ** attempt` schedule for the two budgets
4980
+ * that predate this cap (their attempt counts are low enough it never
4981
+ * mattered); only the larger proven-in-background-function budget uses a
4982
+ * real cap so its extra attempts don't add unbounded backoff. */
4983
+ backoffCapMs: number;
4984
+ }
4985
+
4986
+ /**
4987
+ * Sizes the dispatch retry budget by *remaining wall-clock capacity*, not by
4988
+ * dispatch TARGET — the two are independent concerns. `chainViaDurableBackground`
4989
+ * only picks where the dispatch goes (see `continuationDispatchPath` above);
4990
+ * this picks how hard to retry getting it there.
4991
+ *
4992
+ * Three cases:
4993
+ * - `chainViaDurableBackground === true`: the durable worker chain dispatching
4994
+ * to the Netlify background function url. Unchanged: 3 attempts / 15s.
4995
+ * - `chainViaDurableBackground === false` and
4996
+ * `workerProvenInBackgroundFunction === true`: a worker PROVEN (by runtime
4997
+ * function name, see `shouldUseBackgroundFunctionTimeoutForWorker`) to
4998
+ * already be executing inside a real `-background` function — it was
4999
+ * forced onto the regular-function dispatch target only because a
5000
+ * background function cannot invoke its own URL from within a live
5001
+ * invocation (see the caller's `&& !runsInBackgroundFunction` comment),
5002
+ * NOT because it lacks time or a connected-client fallback. This worker
5003
+ * has up to `BACKGROUND_SOFT_TIMEOUT_CEILING_MS` (13min) of soft-timeout
5004
+ * budget behind it and up to Netlify's ~15min hard function limit ahead —
5005
+ * roughly 2 minutes of remaining wall clock — and, being a background
5006
+ * worker, NO connected client to fall back on if the handoff is dropped.
5007
+ * Demoting it to the foreground's 2-attempt/10s budget is exactly the bug
5008
+ * this type documents: 5 attempts / 15s response timeout, with backoff
5009
+ * capped at 4s/gap (500ms, 1s, 2s, 4s across the 4 gaps ≈ 7.5s total).
5010
+ * Worst case: 5 × 15s dispatch + ~7.5s backoff ≈ 82.5s, safely inside the
5011
+ * ~2min of remaining budget before the function's hard kill.
5012
+ * - Otherwise: a true foreground caller not proven in a background
5013
+ * function. Unchanged: 2 attempts / 10s — it has a live connected client
5014
+ * as a fallback (the terminal `auto_continue` event still reaches it).
5015
+ */
5016
+ export function resolveContinuationDispatchBudget(opts: {
5017
+ chainViaDurableBackground: boolean;
5018
+ workerProvenInBackgroundFunction: boolean;
5019
+ }): ContinuationDispatchBudget {
5020
+ if (opts.chainViaDurableBackground) {
5021
+ return {
5022
+ maxDispatchAttempts: 3,
5023
+ dispatchResponseTimeoutMs: 15_000,
5024
+ backoffCapMs: Infinity,
5025
+ };
5026
+ }
5027
+ if (opts.workerProvenInBackgroundFunction) {
5028
+ return {
5029
+ maxDispatchAttempts: 5,
5030
+ dispatchResponseTimeoutMs: 15_000,
5031
+ backoffCapMs: 4_000,
5032
+ };
5033
+ }
5034
+ return {
5035
+ maxDispatchAttempts: 2,
5036
+ dispatchResponseTimeoutMs: 10_000,
5037
+ backoffCapMs: Infinity,
5038
+ };
5039
+ }
5040
+
4954
5041
  /**
4955
5042
  * Server-driven continuation handoff for a chunk that hit its soft-timeout
4956
5043
  * boundary still unfinished: mint the next chunk's runId, PRE-INSERT its run
@@ -4980,7 +5067,14 @@ export interface ChainServerDrivenContinuationDeps {
4980
5067
  * a dead handoff — after a failed/timed-out attempt the successor's
4981
5068
  * ATOMIC CLAIM is consulted (`readBackgroundRunClaim`): a row that
4982
5069
  * flipped to `background-processing` (or already went terminal) proves
4983
- * the handoff landed, so no retry is fired. 2 attempts, ~10s settle.
5070
+ * the handoff landed, so no retry is fired.
5071
+ *
5072
+ * `chainViaDurableBackground` does NOT alone determine the retry BUDGET —
5073
+ * see `resolveContinuationDispatchBudget` and `workerProvenInBackgroundFunction`
5074
+ * below: a worker forced onto this same `false` target because it is proven
5075
+ * to already be inside a real background function gets a materially larger
5076
+ * budget than a true foreground caller, since it has no connected-client
5077
+ * fallback and minutes of remaining wall clock instead of seconds.
4984
5078
  *
4985
5079
  * Never throws — all failure paths are handled (recorded + marked) inside.
4986
5080
  */
@@ -4994,6 +5088,13 @@ export async function chainServerDrivenContinuation(opts: {
4994
5088
  requestBody: Record<string, unknown>;
4995
5089
  backgroundContinuationCount: number;
4996
5090
  chainViaDurableBackground: boolean;
5091
+ /** True only when this worker is PROVEN (by runtime function name) to
5092
+ * already be executing inside a real Netlify `-background` function —
5093
+ * distinct from `chainViaDurableBackground`, which is forced `false` for
5094
+ * this exact worker (it cannot dispatch to its own function URL from a
5095
+ * live invocation). Widens the retry budget; does NOT change the dispatch
5096
+ * target. See `resolveContinuationDispatchBudget`. Defaults to `false`. */
5097
+ workerProvenInBackgroundFunction?: boolean;
4997
5098
  deps?: ChainServerDrivenContinuationDeps;
4998
5099
  }): Promise<void> {
4999
5100
  const d = {
@@ -5060,10 +5161,13 @@ export async function chainServerDrivenContinuation(opts: {
5060
5161
  : AGENT_CHAT_PROCESS_RUN_PATH;
5061
5162
  const continuationExpectsNetlifyBackgroundFunction =
5062
5163
  dispatchPathTargetsNetlifyBackgroundFunction(continuationDispatchPath);
5063
- const maxDispatchAttempts = opts.chainViaDurableBackground ? 3 : 2;
5064
- const dispatchResponseTimeoutMs = opts.chainViaDurableBackground
5065
- ? 15_000
5066
- : 10_000;
5164
+ const dispatchBudget = resolveContinuationDispatchBudget({
5165
+ chainViaDurableBackground: opts.chainViaDurableBackground,
5166
+ workerProvenInBackgroundFunction:
5167
+ opts.workerProvenInBackgroundFunction === true,
5168
+ });
5169
+ const maxDispatchAttempts = dispatchBudget.maxDispatchAttempts;
5170
+ const dispatchResponseTimeoutMs = dispatchBudget.dispatchResponseTimeoutMs;
5067
5171
  const continuationMarker = {
5068
5172
  runId: nextRunId,
5069
5173
  turnId: effectiveTurnId,
@@ -5147,7 +5251,17 @@ export async function chainServerDrivenContinuation(opts: {
5147
5251
  ) {
5148
5252
  try {
5149
5253
  if (attempt > 0) {
5150
- await d.sleep(500 * 2 ** attempt);
5254
+ // Uncapped budgets (durable-background and true-foreground) keep
5255
+ // the original `500 * 2 ** attempt` schedule unchanged. The capped
5256
+ // budget (proven-in-background-function) instead uses a schedule
5257
+ // starting at 500ms and doubling per gap, capped at
5258
+ // `backoffCapMs` — see `resolveContinuationDispatchBudget` for why
5259
+ // this stays well inside the worker's remaining wall clock even
5260
+ // with 5 attempts.
5261
+ const backoffMs = Number.isFinite(dispatchBudget.backoffCapMs)
5262
+ ? Math.min(500 * 2 ** (attempt - 1), dispatchBudget.backoffCapMs)
5263
+ : 500 * 2 ** attempt;
5264
+ await d.sleep(backoffMs);
5151
5265
  // Keep the pre-inserted successor row visibly alive while we
5152
5266
  // retry: the awaited attempts + backoff can outlast
5153
5267
  // UNCLAIMED_BACKGROUND_RUN_GRACE_MS (25s), and without a fresh
@@ -6599,6 +6713,14 @@ export function createProductionAgentHandler(
6599
6713
  isAgentChatDurableBackgroundEnabled({
6600
6714
  appOptIn: options.durableBackgroundRuns === true,
6601
6715
  }) && !runsInBackgroundFunction,
6716
+ // Only changes the retry BUDGET, never the dispatch target
6717
+ // above: a worker proven in a real background function has
6718
+ // minutes of remaining wall clock and no connected-client
6719
+ // fallback, so it must not be demoted to the foreground's
6720
+ // 2-attempt budget just because it was forced onto the
6721
+ // regular-function dispatch target. See
6722
+ // `resolveContinuationDispatchBudget`.
6723
+ workerProvenInBackgroundFunction: runsInBackgroundFunction,
6602
6724
  });
6603
6725
  }
6604
6726
  } finally {