@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
@@ -99,7 +99,7 @@ export const PR_VISUAL_RECAP_SETUP: string[] = [
99
99
  " ANTHROPIC_API_KEY — the LLM key for the default Claude Code backend",
100
100
  "Optional (only if you change defaults):",
101
101
  " OPENAI_API_KEY (secret) + VISUAL_RECAP_AGENT=codex (variable) — use Codex instead of Claude",
102
- " VISUAL_RECAP_MODEL / VISUAL_RECAP_REASONING (variables) — pin the model (e.g. gpt-5.5) and reasoning depth (none|minimal|low|medium|high|xhigh; Codex only)",
102
+ " VISUAL_RECAP_MODEL / VISUAL_RECAP_REASONING (variables) — pin the model (e.g. gpt-5.6-sol) and reasoning depth (none|minimal|low|medium|high|xhigh; Codex only)",
103
103
  " VISUAL_RECAP_SKILL_SOURCE=repo (variable) — pin CI to the repo-local visual-recap skill instead of latest bundled guidance",
104
104
  " VISUAL_RECAP_SECRET_SCAN=off|high-confidence|strict (variable) — default high-confidence; strict restores generic TOKEN/SECRET assignment suppression",
105
105
  " PLAN_RECAP_APP_URL (secret) — only when self-hosting the plan app (defaults to https://plan.agent-native.com)",
@@ -4135,7 +4135,7 @@ async function runUsage(args: Record<string, string | boolean>): Promise<void> {
4135
4135
  const model =
4136
4136
  parsed.model ??
4137
4137
  optionalArg(args, "model") ??
4138
- (agent === "codex" ? "gpt-5.5" : "claude");
4138
+ (agent === "codex" ? "gpt-5.6-sol" : "claude");
4139
4139
  const body: Record<string, unknown> = {
4140
4140
  planId,
4141
4141
  ...(agent === "codex" || agent === "claude" ? { agent } : {}),
@@ -198,7 +198,7 @@ export function mergeStarterManifest(
198
198
  merged.dependencies = mergePackageJsonRecords(
199
199
  canonicalPackageJson.dependencies as Record<string, string> | undefined,
200
200
  starterPackageJson.dependencies as Record<string, string> | undefined,
201
- ["@agent-native/core"],
201
+ ["@agent-native/core", "@agent-native/toolkit"],
202
202
  );
203
203
  merged.devDependencies = mergePackageJsonRecords(
204
204
  canonicalPackageJson.devDependencies as Record<string, string> | undefined,
@@ -1274,7 +1274,14 @@ function AgentPanelInner({
1274
1274
  {t("agentPanel.settings")}
1275
1275
  </DropdownMenuItem>
1276
1276
  )}
1277
- <DropdownMenuItem onSelect={() => setFeedbackOpen(true)}>
1277
+ <DropdownMenuItem
1278
+ onSelect={() => {
1279
+ // Defer past the closing DropdownMenu's focus-restore/dismiss-layer
1280
+ // teardown, otherwise it can immediately dismiss the Popover we're
1281
+ // opening in the same tick (Radix nested-overlay race).
1282
+ setTimeout(() => setFeedbackOpen(true), 0);
1283
+ }}
1284
+ >
1278
1285
  <IconMessageDots size={14} className="shrink-0" />
1279
1286
  {t("agentPanel.feedback")}
1280
1287
  </DropdownMenuItem>
@@ -751,7 +751,7 @@ function hasContinuationProgress(content: ContentPart[]): boolean {
751
751
  }
752
752
 
753
753
  const COMPLETED_TOOL_TIMEOUT_NAME_RE =
754
- /^(add|apply|archive|capture|create|delete|deploy|duplicate|edit|generate|grant|insert|migrate|move|present|publish|remove|rename|reorder|revoke|save|send|set|sync|trash|update|write)(-|$)/;
754
+ /^(add|apply|archive|capture|compose|create|delete|deploy|duplicate|edit|generate|grant|insert|install|migrate|move|mutate|present|publish|remove|rename|reorder|revoke|save|send|set|sync|trash|update|write)(-|$)/;
755
755
  const COMPLETED_TOOL_TIMEOUT_NAME_ALLOWLIST = new Set([
756
756
  "connect-assets-mcp",
757
757
  "import-design-tokens",
@@ -1728,8 +1728,10 @@ export function createAgentChatAdapter(
1728
1728
 
1729
1729
  // Mode switch for recovery ownership: durable/background-dispatched runs
1730
1730
  // are always recovered by the server. Foreground self-chain follows the
1731
- // server on healthy handoffs, but a loud self-dispatch failure falls back
1732
- // to the client POST path because no successor run owns recovery yet.
1731
+ // server on healthy handoffs. A loud continuation-dispatch failure falls
1732
+ // back to the client POST path in either mode because the server has
1733
+ // already marked the unclaimed successor terminal; the per-turn tool
1734
+ // journal keeps that retry from replaying completed side effects.
1733
1735
  const isDurableBackgroundDispatch = () =>
1734
1736
  currentRunDispatchMode?.startsWith("background") === true;
1735
1737
  const isForegroundSelfChainDispatch = () =>
@@ -1737,12 +1739,15 @@ export function createAgentChatAdapter(
1737
1739
  const shouldFollowServerContinuation = (
1738
1740
  signal?: AgentAutoContinueSignal,
1739
1741
  ) => {
1742
+ if (
1743
+ signal?.errorInfo?.errorCode ===
1744
+ "background_continuation_dispatch_failed"
1745
+ ) {
1746
+ return false;
1747
+ }
1740
1748
  if (isDurableBackgroundDispatch()) return true;
1741
1749
  if (!isForegroundSelfChainDispatch()) return false;
1742
- return (
1743
- signal?.errorInfo?.errorCode !==
1744
- "background_continuation_dispatch_failed"
1745
- );
1750
+ return true;
1746
1751
  };
1747
1752
 
1748
1753
  const rememberRunSeq = (seq: number) => {
@@ -835,7 +835,7 @@ function latestModelsOnly(models: string[]): string[] {
835
835
  seen.add(claude[1]);
836
836
  return true;
837
837
  }
838
- // GPT: family = gpt-{major} (e.g. gpt-5.4 and gpt-5.4-mini are different)
838
+ // GPT: family = gpt-{major} (e.g. gpt-5.6-sol and gpt-5.6-luna are different)
839
839
  // OpenAI reasoning: each is its own family
840
840
  // Gemini: family = gemini-{major} + variant
841
841
  const gemini = m.match(/^gemini-(\d+(?:\.\d+)?)-(.+?)(?:-preview)?$/);
@@ -920,12 +920,16 @@ export {
920
920
  type DevOptionValue,
921
921
  } from "./dev-overlay/index.js";
922
922
  export {
923
+ ACTION_KEEPALIVE_BODY_BUDGET_BYTES,
923
924
  callAction,
925
+ tryCallActionKeepalive,
924
926
  useActionQuery,
925
927
  useActionMutation,
926
928
  type ActionRegistry,
927
929
  type ClientActionCallOptions,
928
930
  type ClientActionMethod,
931
+ type KeepaliveActionCallRejectionReason,
932
+ type KeepaliveActionCallResult,
929
933
  } from "./use-action.js";
930
934
  export { createAgentNativeQueryClient } from "./create-query-client.js";
931
935
  export { AppProviders, type AppProvidersProps } from "./app-providers.js";
@@ -26,6 +26,7 @@ import {
26
26
  IconPlus,
27
27
  IconAlertTriangle,
28
28
  IconUsersGroup,
29
+ IconHelpCircle,
29
30
  } from "@tabler/icons-react";
30
31
  import { useMemo, useRef, useState, type ReactNode } from "react";
31
32
 
@@ -327,8 +328,6 @@ function MembersCard() {
327
328
  const { data: invitationsData } = useOrgInvitations();
328
329
  const switchOrg = useSwitchOrg();
329
330
 
330
- const [showInviteForm, setShowInviteForm] = useState(false);
331
-
332
331
  if (!org?.orgId) return null;
333
332
 
334
333
  const isOwner = org.role === "owner";
@@ -372,26 +371,6 @@ function MembersCard() {
372
371
  )}
373
372
  </div>
374
373
 
375
- {isOwnerOrAdmin && (
376
- <div className="border-t border-border pt-4">
377
- {!showInviteForm ? (
378
- <button
379
- type="button"
380
- onClick={() => setShowInviteForm(true)}
381
- className="inline-flex items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90"
382
- >
383
- <IconUserPlus className="h-3.5 w-3.5" />
384
- {t("org.inviteMembers")}
385
- </button>
386
- ) : (
387
- <BulkInviteForm
388
- currentUserRole={org.role}
389
- onClose={() => setShowInviteForm(false)}
390
- />
391
- )}
392
- </div>
393
- )}
394
-
395
374
  {isOwnerOrAdmin && (
396
375
  <div className="grid gap-5 border-t border-border pt-4 lg:grid-cols-2">
397
376
  <DomainSettingsSection
@@ -431,17 +410,37 @@ function MembersTableCard({
431
410
  currentUserRole: string | null;
432
411
  }) {
433
412
  const t = useT();
413
+ const [showInviteForm, setShowInviteForm] = useState(false);
414
+ const canInvite = currentUserRole === "owner" || currentUserRole === "admin";
434
415
 
435
416
  return (
436
417
  <section className="rounded-lg border border-border bg-card">
437
- <div className="flex flex-col gap-1 border-b border-border px-4 py-3 sm:flex-row sm:items-center sm:justify-between">
418
+ <div className="flex flex-col gap-3 border-b border-border px-4 py-3 sm:flex-row sm:items-center sm:justify-between">
438
419
  <div>
439
420
  <h3 className="text-sm font-medium">{t("org.members")}</h3>
440
421
  <p className="text-xs text-muted-foreground">
441
422
  {t("org.memberCount", { count: members.length })}
442
423
  </p>
443
424
  </div>
425
+ {canInvite && !showInviteForm && (
426
+ <button
427
+ type="button"
428
+ onClick={() => setShowInviteForm(true)}
429
+ className="inline-flex items-center justify-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90"
430
+ >
431
+ <IconUserPlus className="h-3.5 w-3.5" />
432
+ {t("org.inviteMembers")}
433
+ </button>
434
+ )}
444
435
  </div>
436
+ {canInvite && showInviteForm && (
437
+ <div className="border-b border-border p-4">
438
+ <BulkInviteForm
439
+ currentUserRole={currentUserRole}
440
+ onClose={() => setShowInviteForm(false)}
441
+ />
442
+ </div>
443
+ )}
445
444
  <Table>
446
445
  <TableHeader>
447
446
  <TableRow>
@@ -1181,9 +1180,25 @@ function A2ASecretSection({ secret }: { secret: string | null | undefined }) {
1181
1180
  const masked = secret ? "****" + secret.slice(-8) : "Not set";
1182
1181
 
1183
1182
  return (
1184
- <div className="space-y-2 border-t border-border pt-3 first:border-t-0 first:pt-0">
1185
- <div className="text-xs font-medium text-muted-foreground uppercase tracking-wide">
1186
- Cross-app authentication
1183
+ <div className="space-y-2">
1184
+ <div className="flex items-center gap-1 text-xs font-medium text-muted-foreground uppercase tracking-wide">
1185
+ <span>Cross-app authentication</span>
1186
+ <Tooltip>
1187
+ <TooltipTrigger asChild>
1188
+ <a
1189
+ href="/docs/a2a-protocol#organization-secret-sync"
1190
+ target="_blank"
1191
+ rel="noopener noreferrer"
1192
+ aria-label="Read the cross-app authentication documentation"
1193
+ className="inline-flex size-3.5 items-center justify-center rounded-full text-muted-foreground hover:text-foreground"
1194
+ >
1195
+ <IconHelpCircle className="size-3" />
1196
+ </a>
1197
+ </TooltipTrigger>
1198
+ <TooltipContent>
1199
+ Read the cross-app authentication documentation
1200
+ </TooltipContent>
1201
+ </Tooltip>
1187
1202
  </div>
1188
1203
  <p className="text-[11px] text-muted-foreground">
1189
1204
  This secret authenticates cross-app delegation (e.g. Dispatch to
@@ -212,6 +212,40 @@ export interface ActionFetchOptions {
212
212
  signal?: AbortSignal;
213
213
  /** Per-call override for the fetch timeout. */
214
214
  timeoutMs?: number;
215
+ /** Keep the request alive while the document is being unloaded. */
216
+ keepalive?: boolean;
217
+ /** Pre-serialized mutation body used by the keepalive budget coordinator. */
218
+ serializedBody?: string;
219
+ }
220
+
221
+ /**
222
+ * Conservative per-document keepalive body budget. Browsers commonly enforce
223
+ * an approximately 64 KiB aggregate limit across every in-flight keepalive
224
+ * request; leaving headroom for other framework traffic prevents a request
225
+ * that passed our guard from being rejected by the browser at send time.
226
+ */
227
+ export const ACTION_KEEPALIVE_BODY_BUDGET_BYTES = 48_000;
228
+
229
+ let reservedKeepaliveBodyBytes = 0;
230
+
231
+ function utf8ByteLength(value: string): number {
232
+ if (typeof TextEncoder !== "undefined") {
233
+ return new TextEncoder().encode(value).byteLength;
234
+ }
235
+
236
+ let bytes = 0;
237
+ for (const character of value) {
238
+ const codePoint = character.codePointAt(0) ?? 0;
239
+ bytes +=
240
+ codePoint <= 0x7f
241
+ ? 1
242
+ : codePoint <= 0x7ff
243
+ ? 2
244
+ : codePoint <= 0xffff
245
+ ? 3
246
+ : 4;
247
+ }
248
+ return bytes;
215
249
  }
216
250
 
217
251
  async function actionFetch<T>(
@@ -237,6 +271,7 @@ async function actionFetch<T>(
237
271
  method,
238
272
  headers,
239
273
  cache: "no-store",
274
+ keepalive: options?.keepalive,
240
275
  };
241
276
 
242
277
  if (method === "GET" && params && Object.keys(params).length > 0) {
@@ -245,7 +280,7 @@ async function actionFetch<T>(
245
280
  const qs = serializeActionQueryParams(params);
246
281
  if (qs) url += `?${qs}`;
247
282
  } else if (method !== "GET" && params) {
248
- init.body = JSON.stringify(params);
283
+ init.body = options?.serializedBody ?? JSON.stringify(params);
249
284
  }
250
285
 
251
286
  // One controller drives both cancellation sources: the caller's signal
@@ -394,6 +429,83 @@ export function callAction<
394
429
  });
395
430
  }
396
431
 
432
+ export type KeepaliveActionCallRejectionReason =
433
+ | "body-too-large"
434
+ | "budget-exhausted";
435
+
436
+ export type KeepaliveActionCallResult<TResult> =
437
+ | {
438
+ accepted: true;
439
+ bodyBytes: number;
440
+ completion: Promise<TResult>;
441
+ }
442
+ | {
443
+ accepted: false;
444
+ bodyBytes: number;
445
+ reason: KeepaliveActionCallRejectionReason;
446
+ completion: null;
447
+ };
448
+
449
+ /**
450
+ * Attempts an unload-safe action call without exceeding the browser's shared
451
+ * keepalive request budget. The reservation remains held until the response
452
+ * body has completed, because browsers count every in-flight keepalive body
453
+ * against the same per-document quota.
454
+ *
455
+ * A rejected attempt is deliberately synchronous so callers can fall back to
456
+ * a durable outbox before returning from `pagehide`.
457
+ */
458
+ export function tryCallActionKeepalive<
459
+ TResult = undefined,
460
+ TName extends ActionName = ActionName,
461
+ >(
462
+ actionName: TName,
463
+ params?: ActionParams<TName>,
464
+ options: Omit<ClientActionCallOptions, "method"> = {},
465
+ ): KeepaliveActionCallResult<
466
+ TResult extends undefined ? ActionResult<TName> : TResult
467
+ > {
468
+ type R = TResult extends undefined ? ActionResult<TName> : TResult;
469
+ const serializedBody = JSON.stringify(params ?? {});
470
+ const bodyBytes = utf8ByteLength(serializedBody);
471
+
472
+ if (bodyBytes > ACTION_KEEPALIVE_BODY_BUDGET_BYTES) {
473
+ return {
474
+ accepted: false,
475
+ bodyBytes,
476
+ reason: "body-too-large",
477
+ completion: null,
478
+ };
479
+ }
480
+
481
+ if (
482
+ reservedKeepaliveBodyBytes + bodyBytes >
483
+ ACTION_KEEPALIVE_BODY_BUDGET_BYTES
484
+ ) {
485
+ return {
486
+ accepted: false,
487
+ bodyBytes,
488
+ reason: "budget-exhausted",
489
+ completion: null,
490
+ };
491
+ }
492
+
493
+ reservedKeepaliveBodyBytes += bodyBytes;
494
+ const completion = actionFetch<R>(actionName, "POST", params, {
495
+ signal: options.signal,
496
+ timeoutMs: options.timeoutMs,
497
+ keepalive: true,
498
+ serializedBody,
499
+ }).finally(() => {
500
+ reservedKeepaliveBodyBytes = Math.max(
501
+ 0,
502
+ reservedKeepaliveBodyBytes - bodyBytes,
503
+ );
504
+ });
505
+
506
+ return { accepted: true, bodyBytes, completion };
507
+ }
508
+
397
509
  // ---------------------------------------------------------------------------
398
510
  // Query hook
399
511
  // ---------------------------------------------------------------------------
@@ -39,6 +39,16 @@ export interface DbExecConfig {
39
39
  d1Binding?: any;
40
40
  }
41
41
 
42
+ /** Read the request-scoped Cloudflare binding without requiring every
43
+ * consuming app's TypeScript program to include core's ambient Worker globals. */
44
+ export function getCloudflareD1Binding(): unknown {
45
+ return (
46
+ globalThis as typeof globalThis & {
47
+ __cf_env?: { DB?: unknown };
48
+ }
49
+ ).__cf_env?.DB;
50
+ }
51
+
42
52
  // ---------------------------------------------------------------------------
43
53
  // Per-app DATABASE_URL resolution
44
54
  // ---------------------------------------------------------------------------
@@ -412,7 +422,7 @@ export function getDialect(): Dialect {
412
422
  return _dialect;
413
423
  }
414
424
 
415
- const d1 = globalThis.__cf_env?.DB;
425
+ const d1 = getCloudflareD1Binding();
416
426
  if (d1) {
417
427
  _dialect = "d1";
418
428
  return _dialect;
@@ -1447,7 +1457,7 @@ async function initClient(): Promise<void> {
1447
1457
  {
1448
1458
  url,
1449
1459
  authToken: getDatabaseAuthToken(),
1450
- d1Binding: dialect === "d1" ? globalThis.__cf_env?.DB : undefined,
1460
+ d1Binding: dialect === "d1" ? getCloudflareD1Binding() : undefined,
1451
1461
  },
1452
1462
  true,
1453
1463
  );
@@ -5,6 +5,7 @@ import type { LibSQLDatabase } from "drizzle-orm/libsql";
5
5
 
6
6
  import {
7
7
  getDialect,
8
+ getCloudflareD1Binding,
8
9
  getDatabaseUrl,
9
10
  getDatabaseAuthToken,
10
11
  isLocalSqliteUrl,
@@ -444,7 +445,9 @@ export function createGetDb<T extends Record<string, unknown>>(schema: T) {
444
445
 
445
446
  // D1 only if dialect detected it (DATABASE_URL takes priority)
446
447
  if (dialect === "d1") {
447
- const d1 = globalThis.__cf_env?.DB;
448
+ const d1 = getCloudflareD1Binding() as
449
+ | Parameters<typeof drizzleD1>[0]
450
+ | undefined;
448
451
  if (d1) {
449
452
  _db = drizzleD1(d1, { schema }) as unknown as LibSQLDatabase<T>;
450
453
  _dbReady = Promise.resolve(_db);
@@ -54,7 +54,7 @@ export const tool: ActionTool = {
54
54
  model: {
55
55
  type: "string",
56
56
  description:
57
- "Model ID (e.g. 'gpt-5.5', 'claude-sonnet-5', 'gemini-3-1-pro'). Required for \"set-app-default\"; optional for \"set\" and \"test\" where it defaults to the engine's default model.",
57
+ "Model ID (e.g. 'gpt-5.6-sol', 'claude-sonnet-5', 'gemini-3-1-pro'). Required for \"set-app-default\"; optional for \"set\" and \"test\" where it defaults to the engine's default model.",
58
58
  },
59
59
  baseUrl: {
60
60
  type: "string",
@@ -27,7 +27,7 @@ export const tool: ActionTool = {
27
27
  model: {
28
28
  type: "string",
29
29
  description:
30
- "Model ID to use with this engine (e.g. 'gpt-5.5', 'claude-sonnet-5'). Defaults to the engine's default model if omitted.",
30
+ "Model ID to use with this engine (e.g. 'gpt-5.6-sol', 'claude-sonnet-5'). Defaults to the engine's default model if omitted.",
31
31
  },
32
32
  },
33
33
  required: ["engine"],
@@ -51,7 +51,7 @@ const GROQ_MODEL = "whisper-large-v3-turbo";
51
51
  const GROQ_CLEANUP_MODEL = "llama-3.3-70b-versatile";
52
52
  const OPENAI_MODEL = "whisper-1";
53
53
  const OPENAI_CHAT_URL = "https://api.openai.com/v1/chat/completions";
54
- const OPENAI_CLEANUP_MODEL = "gpt-5.4-mini";
54
+ const OPENAI_CLEANUP_MODEL = "gpt-5.6-luna";
55
55
  const MAX_AUDIO_BYTES = 25 * 1024 * 1024; // Whisper hard limit.
56
56
  // Hard cap for the dictation-cleanup text path (`sanitizeTranscriptText`
57
57
  // below). This endpoint has no `task` field — it's always the Hold-Fn
@@ -98,13 +98,22 @@ const PRICING: Array<{ match: RegExp; pricing: ModelPricing }> = [
98
98
  pricing: { input: 100, output: 500, cacheRead: 10, cacheWrite: 125 },
99
99
  },
100
100
  // ── OpenAI / Codex ──────────────────────────────────────────────────────────
101
- // Published rates as of 2026-06; OpenAI bills cached input at a discount
102
- // and has no separate cache-write token charge, so cacheWrite is 0.
103
- // /gpt-5\.5/ must precede /gpt-5/ since the latter also matches "gpt-5.5".
101
+ // Published rates as of 2026-07; OpenAI bills cached input at a discount
102
+ // and has no separate cache-write token charge, so cacheWrite is 0. Sol and
103
+ // Terra have higher large-context rates after 272K tokens; this table tracks
104
+ // the standard rate because usage rows do not preserve request context size.
104
105
  {
105
- match: /gpt-5\.5/i,
106
+ match: /gpt-5[.-]6-sol/i,
106
107
  pricing: { input: 500, output: 3000, cacheRead: 50, cacheWrite: 0 },
107
108
  },
109
+ {
110
+ match: /gpt-5[.-]6-terra/i,
111
+ pricing: { input: 250, output: 1500, cacheRead: 25, cacheWrite: 0 },
112
+ },
113
+ {
114
+ match: /gpt-5[.-]6-luna/i,
115
+ pricing: { input: 100, output: 600, cacheRead: 10, cacheWrite: 0 },
116
+ },
108
117
  {
109
118
  match: /gpt-5/i,
110
119
  pricing: { input: 125, output: 1000, cacheRead: 12.5, cacheWrite: 0 },
@@ -762,12 +762,15 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
762
762
  { specifier: "@libsql/client" },
763
763
  { specifier: "@amplitude/analytics-browser" },
764
764
  { specifier: "@assistant-ui/react" },
765
+ { specifier: "@codemirror/lang-sql" },
766
+ { specifier: "@codemirror/theme-one-dark" },
765
767
  { specifier: "@excalidraw/excalidraw" },
766
768
  { specifier: "@excalidraw/mermaid-to-excalidraw" },
767
769
  {
768
770
  specifier: "@modelcontextprotocol/ext-apps/app-bridge",
769
771
  packageName: "@modelcontextprotocol/ext-apps",
770
772
  },
773
+ { specifier: "@paper-design/shaders-react" },
771
774
  { specifier: "@radix-ui/react-accordion" },
772
775
  { specifier: "@radix-ui/react-alert-dialog" },
773
776
  { specifier: "@radix-ui/react-aspect-ratio" },
@@ -795,6 +798,11 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
795
798
  { specifier: "@radix-ui/react-toggle" },
796
799
  { specifier: "@radix-ui/react-toggle-group" },
797
800
  { specifier: "@radix-ui/react-tooltip" },
801
+ { specifier: "@sentry/browser" },
802
+ {
803
+ specifier: "@shadcn/react/message-scroller",
804
+ packageName: "@shadcn/react",
805
+ },
798
806
  { specifier: "@tanstack/react-query" },
799
807
  { specifier: "@tabler/icons-react" },
800
808
  { specifier: "@tiptap/core" },
@@ -813,6 +821,7 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
813
821
  { specifier: "@tiptap/pm/state", packageName: "@tiptap/pm" },
814
822
  { specifier: "@tiptap/react" },
815
823
  { specifier: "@tiptap/starter-kit" },
824
+ { specifier: "@uiw/react-codemirror" },
816
825
  { specifier: "@xterm/addon-fit" },
817
826
  { specifier: "@xterm/addon-web-links" },
818
827
  { specifier: "@xterm/xterm" },
@@ -865,6 +874,8 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
865
874
  specifier: "highlight.js/lib/languages/yaml",
866
875
  packageName: "highlight.js",
867
876
  },
877
+ { specifier: "html2canvas" },
878
+ { specifier: "i18next" },
868
879
  { specifier: "input-otp" },
869
880
  { specifier: "lowlight" },
870
881
  { specifier: "mermaid" },
@@ -872,6 +883,7 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
872
883
  { specifier: "next-themes" },
873
884
  { specifier: "react-hook-form" },
874
885
  { specifier: "react-day-picker" },
886
+ { specifier: "react-i18next" },
875
887
  { specifier: "react-markdown" },
876
888
  { specifier: "react-resizable-panels" },
877
889
  { specifier: "recharts" },
@@ -916,7 +928,24 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
916
928
  .filter(({ specifier, packageName }) =>
917
929
  hasOptimizeDep(packageName ?? specifier, cwd),
918
930
  )
919
- .map(({ specifier }) => specifier);
931
+ .map(({ specifier, packageName }) => {
932
+ const dependencyName = packageName ?? specifier;
933
+ // In the monorepo, core is source-aliased and its dependencies live
934
+ // under packages/core/node_modules. A bare optimizeDeps.include entry
935
+ // is resolved from the template root, so core-only dependencies fail
936
+ // the initial prebundle and are rediscovered after the page loads. Vite
937
+ // then rebundles and reloads the editor. Its documented nested-dependency
938
+ // syntax resolves the right-hand package from core's package directory,
939
+ // while app-owned dependencies should remain direct entries.
940
+ if (
941
+ inMonorepo &&
942
+ !hasDep(dependencyName, cwd) &&
943
+ hasCoreDep(dependencyName, cwd)
944
+ ) {
945
+ return `@agent-native/core > ${specifier}`;
946
+ }
947
+ return specifier;
948
+ });
920
949
  }
921
950
 
922
951
  /**
@@ -2590,6 +2619,14 @@ function createAgentNativeConfig(
2590
2619
  ...(userConfig.ssr ?? {}),
2591
2620
  noExternal: /^(?!node:)/,
2592
2621
  external: [
2622
+ // Yjs is used by both server-side collaboration actions and the
2623
+ // client SSR graph. If Vite inlines it here, Nitro also emits its
2624
+ // own server copy and a single request imports Yjs twice, breaking
2625
+ // Yjs constructor identity. This externalizes only Vite's
2626
+ // intermediate React Router SSR graph; Nitro's final Node/edge
2627
+ // bundle still owns and bundles the dependency, so both paths
2628
+ // share one portable module instance.
2629
+ "yjs",
2593
2630
  ...NODE_SSR_NATIVE_EXTERNALS,
2594
2631
  ...arrayFrom((userConfig.ssr as { external?: any })?.external),
2595
2632
  ],
@@ -175,6 +175,9 @@ details live in `.agents/skills/`.
175
175
 
176
176
  - `navigation` exposes current dashboard, analysis, source, chart, and selected
177
177
  context.
178
+ - Clicking a dashboard chart, table, or extension stages that panel as a chat
179
+ context chip and writes `selected-object` with `type="dashboard-panel"`.
180
+ Use its dashboard and panel ids to scope inspection and edits to that panel.
178
181
  - `navigate` moves the user to the relevant analytics view, including
179
182
  `view="catalog"` for the template catalog, `view="sessions"` for session
180
183
  replay, `view="monitoring"` with `monitoringView="uptime|errors"` (plus the
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Analytics HTTP surface for reading a stored data program and its latest run.
3
+ */
4
+ import { defineAction } from "@agent-native/core";
5
+ import {
6
+ getDataProgram,
7
+ getLatestRun,
8
+ hashDataProgramParams,
9
+ } from "@agent-native/core/data-programs";
10
+ import { getCredentialContext } from "@agent-native/core/server/request-context";
11
+ import { resolveAccess } from "@agent-native/core/sharing";
12
+ import { z } from "zod";
13
+
14
+ import { ANALYTICS_APP_ID } from "../server/lib/provider-credentials";
15
+
16
+ export default defineAction({
17
+ description:
18
+ "Get one Analytics data program's metadata and last-run summary. Pass includeRows to return cached rows.",
19
+ schema: z.object({
20
+ programId: z.string().min(1),
21
+ includeRows: z.boolean().optional(),
22
+ }),
23
+ http: { method: "GET" },
24
+ readOnly: true,
25
+ run: async (args) => {
26
+ const ctx = getCredentialContext();
27
+ if (!ctx) throw new Error("No authenticated context for get-data-program.");
28
+
29
+ const program = await getDataProgram(args.programId, ANALYTICS_APP_ID);
30
+ if (!program) throw new Error("Data program not found.");
31
+
32
+ const access = await resolveAccess("data_program", args.programId, {
33
+ userEmail: ctx.userEmail,
34
+ orgId: ctx.orgId ?? undefined,
35
+ });
36
+ if (!access) throw new Error("Access denied to this data program.");
37
+
38
+ const defaultParams = program.defaultParams
39
+ ? (JSON.parse(program.defaultParams) as Record<string, unknown>)
40
+ : {};
41
+ const hash = hashDataProgramParams(
42
+ defaultParams,
43
+ ctx.userEmail,
44
+ ctx.orgId ?? null,
45
+ );
46
+ const lastRun = await getLatestRun(program.id, hash);
47
+
48
+ return {
49
+ id: program.id,
50
+ name: program.name,
51
+ title: program.title,
52
+ description: program.description,
53
+ code: program.code,
54
+ paramsSchema: program.paramsSchema
55
+ ? JSON.parse(program.paramsSchema)
56
+ : null,
57
+ defaultParams,
58
+ refreshMode: program.refreshMode,
59
+ refreshTtlMs: program.refreshTtlMs,
60
+ background: program.background,
61
+ archivedAt: program.archivedAt,
62
+ columns: program.outputColumns ? JSON.parse(program.outputColumns) : [],
63
+ lastRun: lastRun
64
+ ? {
65
+ status: lastRun.status,
66
+ rowCount: lastRun.rowCount,
67
+ truncated: lastRun.truncated,
68
+ errorCode: lastRun.errorCode,
69
+ errorMessage: lastRun.errorMessage,
70
+ finishedAt: lastRun.finishedAt,
71
+ ...(args.includeRows && lastRun.rowsJson
72
+ ? { rows: JSON.parse(lastRun.rowsJson) }
73
+ : {}),
74
+ }
75
+ : null,
76
+ };
77
+ },
78
+ });