@agent-native/core 0.91.1 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/blueprints/action/crud.md +1 -1
  2. package/blueprints/channel/discord.md +1 -1
  3. package/blueprints/provider/stripe.md +1 -1
  4. package/blueprints/sandbox/docker.md +1 -1
  5. package/corpus/README.md +2 -2
  6. package/corpus/core/CHANGELOG.md +31 -0
  7. package/corpus/core/blueprints/action/crud.md +1 -1
  8. package/corpus/core/blueprints/channel/discord.md +1 -1
  9. package/corpus/core/blueprints/provider/stripe.md +1 -1
  10. package/corpus/core/blueprints/sandbox/docker.md +1 -1
  11. package/corpus/core/docs/content/faq.mdx +17 -0
  12. package/corpus/core/docs/content/notifications.mdx +12 -6
  13. package/corpus/core/package.json +6 -5
  14. package/corpus/core/src/agent/production-agent.ts +140 -46
  15. package/corpus/core/src/agent/run-manager.ts +23 -2
  16. package/corpus/core/src/agent/run-store.ts +2 -2
  17. package/corpus/core/src/agent/tool-search.ts +71 -4
  18. package/corpus/core/src/cli/add.ts +1 -1
  19. package/corpus/core/src/cli/create.ts +8 -3
  20. package/corpus/core/src/cli/index.ts +25 -4
  21. package/corpus/core/src/cli/upgrade.ts +798 -0
  22. package/corpus/core/src/client/AssistantChat.tsx +1 -1
  23. package/corpus/core/src/client/HighlightedCodeBlock.tsx +20 -3
  24. package/corpus/core/src/client/agent-chat-adapter.ts +31 -6
  25. package/corpus/core/src/client/chat/message-components.tsx +85 -8
  26. package/corpus/core/src/client/chat/tool-call-display.tsx +355 -144
  27. package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -9
  28. package/corpus/core/src/client/extensions/ExtensionSlot.tsx +7 -0
  29. package/corpus/core/src/client/settings/SettingsPanel.tsx +533 -389
  30. package/corpus/core/src/client/settings/SettingsSection.tsx +154 -17
  31. package/corpus/core/src/client/sse-event-processor.ts +29 -2
  32. package/corpus/core/src/extensions/actions.ts +113 -5
  33. package/corpus/core/src/jobs/scheduler.ts +30 -1
  34. package/corpus/core/src/localization/default-messages.ts +21 -0
  35. package/corpus/core/src/notifications/channels.ts +88 -25
  36. package/corpus/core/src/notifications/registry.ts +17 -3
  37. package/corpus/core/src/notifications/types.ts +4 -1
  38. package/corpus/core/src/server/agent-chat-plugin.ts +7 -3
  39. package/corpus/core/src/server/request-context.ts +7 -0
  40. package/corpus/core/src/styles/agent-conversation.css +1 -1
  41. package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  42. package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  43. package/corpus/core/src/templates/default/AGENTS.md +10 -3
  44. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +21 -0
  45. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +21 -0
  46. package/corpus/core/src/templates/default/app/i18n/en-US.ts +21 -0
  47. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +21 -0
  48. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
  49. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +20 -0
  50. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +21 -0
  51. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +20 -0
  52. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +21 -0
  53. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +20 -0
  54. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
  55. package/corpus/core/src/templates/default/package.json +4 -3
  56. package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  57. package/corpus/core/src/templates/headless/AGENTS.md +9 -3
  58. package/corpus/core/src/templates/headless/package.json +4 -3
  59. package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  60. package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  61. package/corpus/core/src/templates/workspace-core/package.json +6 -6
  62. package/corpus/core/src/templates/workspace-root/AGENTS.md +10 -4
  63. package/corpus/core/src/templates/workspace-root/package.json +3 -2
  64. package/corpus/core/src/triggers/dispatcher.ts +30 -2
  65. package/corpus/core/src/vite/client.ts +96 -1
  66. package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +20 -2
  67. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +20 -2
  68. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  69. package/corpus/templates/analytics/AGENTS.md +7 -5
  70. package/corpus/templates/analytics/actions/save-monitor.ts +14 -0
  71. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +41 -6
  72. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +122 -11
  73. package/corpus/templates/analytics/app/global.css +26 -10
  74. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  75. package/corpus/templates/analytics/app/i18n-data.ts +25 -0
  76. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +8 -2
  77. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +151 -32
  78. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +17 -2
  79. package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +4 -0
  80. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +461 -286
  81. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +285 -294
  82. package/corpus/templates/analytics/changelog/2026-07-08-console-details-expand-inline-under-each-row-and-the-event-t.md +6 -0
  83. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-tables-keep-their-size-while-loading.md +6 -0
  84. package/corpus/templates/analytics/changelog/2026-07-08-monitoring-uptime-and-errors-tabs-now-clearly-show-which-view-is-active.md +6 -0
  85. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-keeps-a-usable-stage-when-dev-tools-is-open-a.md +6 -0
  86. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-resumes-after-scrubbing-and-expands-console-r.md +6 -0
  87. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-uses-stock-rrweb-sizing-again-so-recorded.md +6 -0
  88. package/corpus/templates/analytics/changelog/2026-07-08-session-replays-wait-for-full-load-keep-a-normal-viewport-an.md +6 -0
  89. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-dashboard-menus-now-open-above-the-dashboard-canvas.md +6 -0
  90. package/corpus/templates/analytics/changelog/2026-07-08-uptime-alerting-clarifies-in-app-inbox-vs-email-and-lets-you-paste-slack-or-webhook-urls-per-monitor.md +6 -0
  91. package/corpus/templates/analytics/docs/uptime-monitoring.md +13 -11
  92. package/corpus/templates/analytics/package.json +2 -2
  93. package/corpus/templates/analytics/server/db/schema-monitoring.ts +4 -0
  94. package/corpus/templates/analytics/server/lib/uptime-monitors.ts +60 -12
  95. package/corpus/templates/analytics/server/plugins/db.ts +10 -0
  96. package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +20 -2
  97. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  98. package/corpus/templates/assets/package.json +2 -2
  99. package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +20 -2
  100. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  101. package/corpus/templates/brain/package.json +2 -2
  102. package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +20 -2
  103. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  104. package/corpus/templates/calendar/AGENTS.md +10 -0
  105. package/corpus/templates/calendar/actions/create-event.ts +5 -1
  106. package/corpus/templates/calendar/actions/event-action-helpers.ts +41 -0
  107. package/corpus/templates/calendar/actions/get-attendee-timezones.ts +28 -0
  108. package/corpus/templates/calendar/actions/set-attendee-timezone.ts +68 -0
  109. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +150 -11
  110. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +36 -1
  111. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +32 -0
  112. package/corpus/templates/calendar/app/hooks/use-attendee-timezones.ts +24 -0
  113. package/corpus/templates/calendar/app/i18n/zh-TW.ts +2 -0
  114. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  115. package/corpus/templates/calendar/app/lib/attendee-local-time.ts +122 -0
  116. package/corpus/templates/calendar/changelog/2026-07-08-event-details-now-support-extension-widgets-and-you-can-see-.md +6 -0
  117. package/corpus/templates/calendar/changelog/2026-07-08-when-you-invite-guests-to-a-new-event-you-now-appear-in.md +6 -0
  118. package/corpus/templates/calendar/package.json +2 -2
  119. package/corpus/templates/calendar/server/handlers/events.ts +5 -1
  120. package/corpus/templates/calendar/shared/api.ts +6 -0
  121. package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +20 -2
  122. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  123. package/corpus/templates/chat/package.json +2 -2
  124. package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +6 -2
  125. package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +20 -2
  126. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  127. package/corpus/templates/clips/actions/create-meeting.ts +8 -3
  128. package/corpus/templates/clips/actions/list-meetings.ts +31 -3
  129. package/corpus/templates/clips/changelog/2026-07-08-after-finishing-a-desktop-recording-reopening-clips-restor.md +6 -0
  130. package/corpus/templates/clips/changelog/2026-07-08-clips-now-pops-up-to-take-notes-when-you-join-an-adhoc-zoom-.md +6 -0
  131. package/corpus/templates/clips/changelog/2026-07-08-desktop-clip-recordings-are-louder-after-capture-mic-only.md +6 -0
  132. package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-notes-stay-active-from-tray-and-shortcut-controls.md +6 -0
  133. package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-popovers-can-start-notes-and-join-the-meetin.md +6 -0
  134. package/corpus/templates/clips/changelog/2026-07-08-meeting-notes-keep-their-recording-state-when-the-desktop.md +6 -0
  135. package/corpus/templates/clips/changelog/2026-07-08-meeting-reminder-dropdowns-now-expand-fully-instead-of-being.md +6 -0
  136. package/corpus/templates/clips/changelog/2026-07-08-meeting-reminders-now-appear-1-minute-before-start-stay-unti.md +6 -0
  137. package/corpus/templates/clips/changelog/2026-07-08-the-desktop-meetings-panel-has-room-for-its-drop-shadow-and-.md +6 -0
  138. package/corpus/templates/clips/chrome-extension/package.json +2 -2
  139. package/corpus/templates/clips/desktop/package.json +2 -2
  140. package/corpus/templates/clips/desktop/src/app.tsx +214 -37
  141. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +30 -6
  142. package/corpus/templates/clips/desktop/src/lib/meeting-notification-timing.ts +83 -0
  143. package/corpus/templates/clips/desktop/src/lib/native-recording-warm.ts +21 -0
  144. package/corpus/templates/clips/desktop/src/lib/recorder.ts +98 -20
  145. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +197 -50
  146. package/corpus/templates/clips/desktop/src/styles.css +150 -53
  147. package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +362 -0
  148. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +41 -7
  149. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +9 -2
  150. package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +89 -11
  151. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +71 -17
  152. package/corpus/templates/clips/desktop/src-tauri/src/native_speech.rs +36 -1
  153. package/corpus/templates/clips/desktop/src-tauri/src/notifications.rs +62 -10
  154. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +3 -3
  155. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +1 -25
  156. package/corpus/templates/clips/desktop/src-tauri/src/state.rs +5 -0
  157. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -6
  158. package/corpus/templates/clips/desktop/src-tauri/src/util.rs +36 -1
  159. package/corpus/templates/clips/package.json +2 -2
  160. package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +20 -2
  161. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  162. package/corpus/templates/content/actions/_batch-utils.ts +8 -0
  163. package/corpus/templates/content/actions/_builder-cms-read-client.ts +7 -5
  164. package/corpus/templates/content/actions/_content-database-personal-view.ts +80 -0
  165. package/corpus/templates/content/actions/_database-source-utils.ts +776 -319
  166. package/corpus/templates/content/actions/_database-utils.ts +6 -1
  167. package/corpus/templates/content/actions/_property-utils.ts +168 -0
  168. package/corpus/templates/content/actions/add-content-database-source-field-property.ts +19 -12
  169. package/corpus/templates/content/actions/bind-content-database-source-field.ts +19 -12
  170. package/corpus/templates/content/actions/delete-document.ts +9 -13
  171. package/corpus/templates/content/actions/get-content-database-personal-view.ts +27 -0
  172. package/corpus/templates/content/actions/refresh-content-database-source.ts +5 -5
  173. package/corpus/templates/content/actions/update-content-database-personal-view.ts +31 -0
  174. package/corpus/templates/content/actions/update-content-database-view.ts +3 -0
  175. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +1 -1
  176. package/corpus/templates/content/app/components/editor/body-hydration.ts +35 -11
  177. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +2631 -551
  178. package/corpus/templates/content/app/components/editor/database/filter-sort.ts +220 -18
  179. package/corpus/templates/content/app/hooks/use-content-database.ts +32 -0
  180. package/corpus/templates/content/app/hooks/use-documents.ts +8 -2
  181. package/corpus/templates/content/app/i18n/zh-TW.ts +16 -0
  182. package/corpus/templates/content/app/i18n-data.ts +154 -0
  183. package/corpus/templates/content/changelog/2026-07-08-builder-source-sync-now-completes-reliably-on-hosted-databases.md +6 -0
  184. package/corpus/templates/content/changelog/2026-07-08-database-filters-now-support-notion-style-reset-save-for-eve.md +6 -0
  185. package/corpus/templates/content/changelog/2026-07-08-date-filters-can-now-target-a-between-range.md +6 -0
  186. package/corpus/templates/content/changelog/2026-07-08-fixed-builder-database-sync-so-large-sources-continue-past-t.md +6 -0
  187. package/corpus/templates/content/package.json +2 -2
  188. package/corpus/templates/content/parity/matrix.md +1 -1
  189. package/corpus/templates/content/parity/matrix.ts +2 -0
  190. package/corpus/templates/content/server/plugins/db.ts +19 -0
  191. package/corpus/templates/content/shared/api.ts +24 -0
  192. package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +20 -2
  193. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  194. package/corpus/templates/design/package.json +2 -2
  195. package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +20 -2
  196. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  197. package/corpus/templates/dispatch/app/i18n/zh-TW.ts +34 -1
  198. package/corpus/templates/dispatch/app/i18n-data.ts +387 -10
  199. package/corpus/templates/dispatch/app/routes/automations.tsx +1 -0
  200. package/corpus/templates/dispatch/changelog/2026-07-08-added-an-automations-page-to-review-pause-and-create.md +6 -0
  201. package/corpus/templates/dispatch/changelog/2026-07-08-destinations-now-shows-outbound-delivery-queue-health.md +6 -0
  202. package/corpus/templates/dispatch/package.json +2 -2
  203. package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +20 -2
  204. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  205. package/corpus/templates/forms/package.json +2 -2
  206. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  207. package/corpus/templates/macros/package.json +2 -2
  208. package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +20 -2
  209. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  210. package/corpus/templates/mail/app/hooks/use-emails.ts +56 -44
  211. package/corpus/templates/mail/app/lib/gmail-mutation-queue.ts +325 -0
  212. package/corpus/templates/mail/changelog/2026-07-08-rapid-archive-and-mark-read-now-batch-gmail-updates-so-the-i.md +6 -0
  213. package/corpus/templates/mail/package.json +2 -2
  214. package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +20 -2
  215. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  216. package/corpus/templates/plan/package.json +2 -2
  217. package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +20 -2
  218. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  219. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +46 -29
  220. package/corpus/templates/slides/app/context/DeckContext.tsx +45 -18
  221. package/corpus/templates/slides/app/i18n/ar-SA.ts +4 -0
  222. package/corpus/templates/slides/app/i18n/de-DE.ts +4 -0
  223. package/corpus/templates/slides/app/i18n/en-US.ts +4 -0
  224. package/corpus/templates/slides/app/i18n/es-ES.ts +4 -0
  225. package/corpus/templates/slides/app/i18n/fr-FR.ts +4 -0
  226. package/corpus/templates/slides/app/i18n/hi-IN.ts +4 -0
  227. package/corpus/templates/slides/app/i18n/ja-JP.ts +4 -0
  228. package/corpus/templates/slides/app/i18n/ko-KR.ts +4 -0
  229. package/corpus/templates/slides/app/i18n/pt-BR.ts +4 -0
  230. package/corpus/templates/slides/app/i18n/zh-CN.ts +4 -0
  231. package/corpus/templates/slides/app/i18n/zh-TW.ts +4 -0
  232. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +115 -0
  233. package/corpus/templates/slides/app/pages/DeckEditor.tsx +22 -13
  234. package/corpus/templates/slides/changelog/2026-07-08-dropping-an-image-onto-a-slide-and-sending-it-to-the-agent-w.md +6 -0
  235. package/corpus/templates/slides/changelog/2026-07-08-undo-works-after-the-agent-edits-a-slide-so-you-can-reverse.md +6 -0
  236. package/corpus/templates/slides/package.json +2 -2
  237. package/corpus/templates/videos/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  238. package/corpus/templates/voice/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  239. package/dist/agent/production-agent.d.ts +5 -1
  240. package/dist/agent/production-agent.d.ts.map +1 -1
  241. package/dist/agent/production-agent.js +112 -42
  242. package/dist/agent/production-agent.js.map +1 -1
  243. package/dist/agent/run-manager.d.ts.map +1 -1
  244. package/dist/agent/run-manager.js +23 -2
  245. package/dist/agent/run-manager.js.map +1 -1
  246. package/dist/agent/run-store.js +2 -2
  247. package/dist/agent/run-store.js.map +1 -1
  248. package/dist/agent/tool-search.d.ts +2 -0
  249. package/dist/agent/tool-search.d.ts.map +1 -1
  250. package/dist/agent/tool-search.js +60 -4
  251. package/dist/agent/tool-search.js.map +1 -1
  252. package/dist/catalog.json +2 -2
  253. package/dist/cli/add.js +1 -1
  254. package/dist/cli/add.js.map +1 -1
  255. package/dist/cli/create.d.ts.map +1 -1
  256. package/dist/cli/create.js +8 -3
  257. package/dist/cli/create.js.map +1 -1
  258. package/dist/cli/index.js +24 -4
  259. package/dist/cli/index.js.map +1 -1
  260. package/dist/cli/upgrade.d.ts +100 -0
  261. package/dist/cli/upgrade.d.ts.map +1 -0
  262. package/dist/cli/upgrade.js +678 -0
  263. package/dist/cli/upgrade.js.map +1 -0
  264. package/dist/client/AssistantChat.js +1 -1
  265. package/dist/client/AssistantChat.js.map +1 -1
  266. package/dist/client/HighlightedCodeBlock.d.ts +2 -0
  267. package/dist/client/HighlightedCodeBlock.d.ts.map +1 -1
  268. package/dist/client/HighlightedCodeBlock.js +10 -1
  269. package/dist/client/HighlightedCodeBlock.js.map +1 -1
  270. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  271. package/dist/client/agent-chat-adapter.js +32 -4
  272. package/dist/client/agent-chat-adapter.js.map +1 -1
  273. package/dist/client/chat/message-components.d.ts.map +1 -1
  274. package/dist/client/chat/message-components.js +61 -8
  275. package/dist/client/chat/message-components.js.map +1 -1
  276. package/dist/client/chat/tool-call-display.d.ts +12 -0
  277. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  278. package/dist/client/chat/tool-call-display.js +136 -42
  279. package/dist/client/chat/tool-call-display.js.map +1 -1
  280. package/dist/client/code-agent-chat-adapter.js +2 -9
  281. package/dist/client/code-agent-chat-adapter.js.map +1 -1
  282. package/dist/client/extensions/ExtensionSlot.js +6 -0
  283. package/dist/client/extensions/ExtensionSlot.js.map +1 -1
  284. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  285. package/dist/client/settings/SettingsPanel.js +52 -19
  286. package/dist/client/settings/SettingsPanel.js.map +1 -1
  287. package/dist/client/settings/SettingsSection.d.ts +19 -4
  288. package/dist/client/settings/SettingsSection.d.ts.map +1 -1
  289. package/dist/client/settings/SettingsSection.js +33 -4
  290. package/dist/client/settings/SettingsSection.js.map +1 -1
  291. package/dist/client/sse-event-processor.d.ts +9 -0
  292. package/dist/client/sse-event-processor.d.ts.map +1 -1
  293. package/dist/client/sse-event-processor.js +20 -2
  294. package/dist/client/sse-event-processor.js.map +1 -1
  295. package/dist/collab/routes.d.ts +1 -1
  296. package/dist/collab/struct-routes.d.ts +1 -1
  297. package/dist/extensions/actions.d.ts.map +1 -1
  298. package/dist/extensions/actions.js +85 -5
  299. package/dist/extensions/actions.js.map +1 -1
  300. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  301. package/dist/jobs/scheduler.js +26 -1
  302. package/dist/jobs/scheduler.js.map +1 -1
  303. package/dist/localization/default-messages.d.ts +19 -0
  304. package/dist/localization/default-messages.d.ts.map +1 -1
  305. package/dist/localization/default-messages.js +19 -0
  306. package/dist/localization/default-messages.js.map +1 -1
  307. package/dist/notifications/channels.d.ts +8 -3
  308. package/dist/notifications/channels.d.ts.map +1 -1
  309. package/dist/notifications/channels.js +61 -22
  310. package/dist/notifications/channels.js.map +1 -1
  311. package/dist/notifications/registry.d.ts.map +1 -1
  312. package/dist/notifications/registry.js +14 -3
  313. package/dist/notifications/registry.js.map +1 -1
  314. package/dist/notifications/routes.d.ts +1 -1
  315. package/dist/notifications/types.d.ts +4 -1
  316. package/dist/notifications/types.d.ts.map +1 -1
  317. package/dist/notifications/types.js.map +1 -1
  318. package/dist/observability/routes.d.ts +1 -1
  319. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  320. package/dist/resources/handlers.d.ts +3 -3
  321. package/dist/server/agent-chat-plugin.d.ts +5 -1
  322. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  323. package/dist/server/agent-chat-plugin.js +2 -2
  324. package/dist/server/agent-chat-plugin.js.map +1 -1
  325. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  326. package/dist/server/request-context.d.ts +7 -0
  327. package/dist/server/request-context.d.ts.map +1 -1
  328. package/dist/server/request-context.js.map +1 -1
  329. package/dist/styles/agent-conversation.css +1 -1
  330. package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  331. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  332. package/dist/templates/default/AGENTS.md +10 -3
  333. package/dist/templates/default/app/i18n/ar-SA.ts +21 -0
  334. package/dist/templates/default/app/i18n/de-DE.ts +21 -0
  335. package/dist/templates/default/app/i18n/en-US.ts +21 -0
  336. package/dist/templates/default/app/i18n/es-ES.ts +21 -0
  337. package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
  338. package/dist/templates/default/app/i18n/hi-IN.ts +20 -0
  339. package/dist/templates/default/app/i18n/ja-JP.ts +21 -0
  340. package/dist/templates/default/app/i18n/ko-KR.ts +20 -0
  341. package/dist/templates/default/app/i18n/pt-BR.ts +21 -0
  342. package/dist/templates/default/app/i18n/zh-CN.ts +20 -0
  343. package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
  344. package/dist/templates/default/package.json +4 -3
  345. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  346. package/dist/templates/headless/AGENTS.md +9 -3
  347. package/dist/templates/headless/package.json +4 -3
  348. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  349. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  350. package/dist/templates/workspace-core/package.json +6 -6
  351. package/dist/templates/workspace-root/AGENTS.md +10 -4
  352. package/dist/templates/workspace-root/package.json +3 -2
  353. package/dist/triggers/dispatcher.js +27 -2
  354. package/dist/triggers/dispatcher.js.map +1 -1
  355. package/dist/vite/client.d.ts.map +1 -1
  356. package/dist/vite/client.js +70 -1
  357. package/dist/vite/client.js.map +1 -1
  358. package/docs/content/faq.mdx +17 -0
  359. package/docs/content/notifications.mdx +12 -6
  360. package/package.json +7 -6
  361. package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  362. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  363. package/src/templates/default/AGENTS.md +10 -3
  364. package/src/templates/default/app/i18n/ar-SA.ts +21 -0
  365. package/src/templates/default/app/i18n/de-DE.ts +21 -0
  366. package/src/templates/default/app/i18n/en-US.ts +21 -0
  367. package/src/templates/default/app/i18n/es-ES.ts +21 -0
  368. package/src/templates/default/app/i18n/fr-FR.ts +21 -0
  369. package/src/templates/default/app/i18n/hi-IN.ts +20 -0
  370. package/src/templates/default/app/i18n/ja-JP.ts +21 -0
  371. package/src/templates/default/app/i18n/ko-KR.ts +20 -0
  372. package/src/templates/default/app/i18n/pt-BR.ts +21 -0
  373. package/src/templates/default/app/i18n/zh-CN.ts +20 -0
  374. package/src/templates/default/app/i18n/zh-TW.ts +19 -0
  375. package/src/templates/default/package.json +4 -3
  376. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  377. package/src/templates/headless/AGENTS.md +9 -3
  378. package/src/templates/headless/package.json +4 -3
  379. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  380. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  381. package/src/templates/workspace-core/package.json +6 -6
  382. package/src/templates/workspace-root/AGENTS.md +10 -4
  383. package/src/templates/workspace-root/package.json +3 -2
@@ -1,5 +1,36 @@
1
1
  import { IconChevronDown, IconCheck } from "@tabler/icons-react";
2
- import type { ReactNode } from "react";
2
+ import { createContext, useContext, type ReactNode } from "react";
3
+
4
+ import { cn } from "../utils.js";
5
+
6
+ /**
7
+ * Where a settings section is being rendered.
8
+ *
9
+ * - `sidebar`: the compact agent sidebar panel (dense, small type).
10
+ * - `page`: the full-width settings page, styled as a polished card that
11
+ * matches the shadcn `Card` surface used by app-owned settings tabs.
12
+ */
13
+ export type SettingsSurface = "sidebar" | "page";
14
+
15
+ const SettingsSurfaceContext = createContext<SettingsSurface>("sidebar");
16
+
17
+ export function SettingsSurfaceProvider({
18
+ surface,
19
+ children,
20
+ }: {
21
+ surface: SettingsSurface;
22
+ children: ReactNode;
23
+ }) {
24
+ return (
25
+ <SettingsSurfaceContext.Provider value={surface}>
26
+ {children}
27
+ </SettingsSurfaceContext.Provider>
28
+ );
29
+ }
30
+
31
+ export function useSettingsSurface(): SettingsSurface {
32
+ return useContext(SettingsSurfaceContext);
33
+ }
3
34
 
4
35
  interface SettingsSectionProps {
5
36
  id?: string;
@@ -15,10 +46,126 @@ interface SettingsSectionProps {
15
46
  }
16
47
 
17
48
  /**
18
- * Collapsible settings section card with icon, title, status dot, and optional badge.
19
- * Controlled via `open` / `onToggle` for accordion behaviour.
49
+ * Collapsible settings section. Renders as a compact row in the agent sidebar
50
+ * and as a polished, shadcn-style card on the full settings page (so the
51
+ * framework tabs match app-owned General/Team cards). The visual surface is
52
+ * read from `SettingsSurfaceContext`.
20
53
  */
21
- export function SettingsSection({
54
+ export function SettingsSection(props: SettingsSectionProps) {
55
+ const surface = useSettingsSurface();
56
+ return surface === "page" ? (
57
+ <PageSettingsSection {...props} />
58
+ ) : (
59
+ <SidebarSettingsSection {...props} />
60
+ );
61
+ }
62
+
63
+ function ConnectedDot({ size }: { size: "sm" | "md" }) {
64
+ const dim = size === "sm" ? "h-4 w-4" : "h-5 w-5";
65
+ const stroke = size === "sm" ? 3 : 2.5;
66
+ const glyph = size === "sm" ? 10 : 12;
67
+ return (
68
+ <span
69
+ className={cn(
70
+ "flex shrink-0 items-center justify-center rounded-full bg-green-500/15 text-green-500",
71
+ dim,
72
+ )}
73
+ >
74
+ <IconCheck size={glyph} stroke={stroke} />
75
+ </span>
76
+ );
77
+ }
78
+
79
+ function StatusBadge({
80
+ label,
81
+ tone,
82
+ size,
83
+ }: {
84
+ label: string;
85
+ tone: "muted" | "required";
86
+ size: "sm" | "md";
87
+ }) {
88
+ return (
89
+ <span
90
+ className={cn(
91
+ "shrink-0 rounded-full font-semibold uppercase tracking-wide",
92
+ size === "sm" ? "px-1.5 py-0.5 text-[9px]" : "px-2 py-0.5 text-[10px]",
93
+ tone === "required"
94
+ ? "bg-amber-500/15 text-amber-600 dark:text-amber-400"
95
+ : "bg-muted text-muted-foreground",
96
+ )}
97
+ >
98
+ {label}
99
+ </span>
100
+ );
101
+ }
102
+
103
+ function PageSettingsSection({
104
+ id,
105
+ icon,
106
+ title,
107
+ subtitle,
108
+ badge,
109
+ required,
110
+ connected,
111
+ open = false,
112
+ onToggle,
113
+ children,
114
+ }: SettingsSectionProps) {
115
+ return (
116
+ <div
117
+ id={id}
118
+ className={cn(
119
+ "scroll-mt-16 overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm transition-colors",
120
+ open ? "border-border" : "border-border/60",
121
+ )}
122
+ >
123
+ <button
124
+ type="button"
125
+ onClick={onToggle}
126
+ aria-expanded={open}
127
+ className="flex w-full items-start justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/40 sm:px-6 sm:py-5"
128
+ >
129
+ <div className="flex min-w-0 items-start gap-3">
130
+ <span className="mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground [&>svg]:size-[18px]">
131
+ {icon}
132
+ </span>
133
+ <span className="flex min-w-0 flex-col gap-1.5">
134
+ <span className="flex flex-wrap items-center gap-2">
135
+ <span className="text-base font-semibold leading-none tracking-tight text-foreground">
136
+ {title}
137
+ </span>
138
+ {connected && <ConnectedDot size="md" />}
139
+ {required && !connected && (
140
+ <StatusBadge label="Required" tone="required" size="md" />
141
+ )}
142
+ {badge && <StatusBadge label={badge} tone="muted" size="md" />}
143
+ </span>
144
+ {subtitle && (
145
+ <span className="text-sm leading-snug text-muted-foreground">
146
+ {subtitle}
147
+ </span>
148
+ )}
149
+ </span>
150
+ </div>
151
+ <IconChevronDown
152
+ size={18}
153
+ className={cn(
154
+ "mt-1 shrink-0 text-muted-foreground transition-transform",
155
+ open && "rotate-180",
156
+ )}
157
+ />
158
+ </button>
159
+ {open && (
160
+ <div className="border-t border-border/60 px-5 pb-5 pt-5 sm:px-6 sm:pb-6">
161
+ {children}
162
+ </div>
163
+ )}
164
+ </div>
165
+ );
166
+ }
167
+
168
+ function SidebarSettingsSection({
22
169
  id,
23
170
  icon,
24
171
  title,
@@ -42,21 +189,11 @@ export function SettingsSection({
42
189
  <span className="text-[12px] font-medium text-foreground truncate">
43
190
  {title}
44
191
  </span>
45
- {connected && (
46
- <span className="flex items-center justify-center shrink-0 rounded-full bg-green-500/15 text-green-500 w-4 h-4">
47
- <IconCheck size={10} stroke={3} />
48
- </span>
49
- )}
192
+ {connected && <ConnectedDot size="sm" />}
50
193
  {required && !connected && (
51
- <span className="shrink-0 rounded-full bg-accent/60 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground">
52
- Required
53
- </span>
54
- )}
55
- {badge && (
56
- <span className="shrink-0 rounded-full bg-accent/60 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-muted-foreground">
57
- {badge}
58
- </span>
194
+ <StatusBadge label="Required" tone="muted" size="sm" />
59
195
  )}
196
+ {badge && <StatusBadge label={badge} tone="muted" size="sm" />}
60
197
  </div>
61
198
  <IconChevronDown
62
199
  size={12}
@@ -15,6 +15,16 @@ import {
15
15
 
16
16
  export type ContentPart =
17
17
  | { type: "text"; text: string }
18
+ | {
19
+ /**
20
+ * Model chain-of-thought / extended-thinking prose. Streamed from
21
+ * server `thinking` SSE events (and code-agent thinking transcript
22
+ * items). Rendered as a collapsible plain-English cell — not a tool
23
+ * call.
24
+ */
25
+ type: "reasoning";
26
+ text: string;
27
+ }
18
28
  | {
19
29
  type: "tool-call";
20
30
  toolCallId: string;
@@ -669,7 +679,7 @@ function pendingToolNames(content: ContentPart[]): {
669
679
 
670
680
  function contentSnapshot(content: ContentPart[]): ContentPart[] {
671
681
  return content.map((part) => {
672
- if (part.type === "text") return { ...part };
682
+ if (part.type === "text" || part.type === "reasoning") return { ...part };
673
683
  return {
674
684
  ...part,
675
685
  args: { ...part.args },
@@ -952,6 +962,23 @@ export function processEvent(
952
962
  };
953
963
  }
954
964
 
965
+ if (ev.type === "thinking") {
966
+ // Model chain-of-thought. Coalesce consecutive deltas into one reasoning
967
+ // part so the UI can render a single collapsible "Thinking" cell.
968
+ const delta = ev.text ?? "";
969
+ if (!delta) return { action: "continue" };
970
+ const lastPart = content[content.length - 1];
971
+ if (lastPart && lastPart.type === "reasoning") {
972
+ lastPart.text += delta;
973
+ } else {
974
+ content.push({ type: "reasoning", text: delta });
975
+ }
976
+ return {
977
+ action: "yield",
978
+ result: { content: contentSnapshot(content) } as ChatModelRunResult,
979
+ };
980
+ }
981
+
955
982
  if (ev.type === "stream_keepalive") {
956
983
  return { action: "continue" };
957
984
  }
@@ -1400,7 +1427,7 @@ function clearAssistantDraftContent(content: ContentPart[]): void {
1400
1427
  for (let index = content.length - 1; index >= 0; index--) {
1401
1428
  const part = content[index];
1402
1429
  if (!part) continue;
1403
- if (part.type === "text") {
1430
+ if (part.type === "text" || part.type === "reasoning") {
1404
1431
  content.splice(index, 1);
1405
1432
  continue;
1406
1433
  }
@@ -3,6 +3,7 @@ import type { ActionRunContext } from "../action.js";
3
3
  import type { ActionEntry } from "../agent/production-agent.js";
4
4
  import type { AgentChatAttachment } from "../agent/types.js";
5
5
  import { writeAppState } from "../application-state/script-helpers.js";
6
+ import { getRequestRunContext } from "../server/request-context.js";
6
7
  import { resolveAccess } from "../sharing/access.js";
7
8
  import type {
8
9
  ExtensionContentEdit,
@@ -38,6 +39,8 @@ import {
38
39
  unhideExtension,
39
40
  updateExtension,
40
41
  updateExtensionContent,
42
+ type ExtensionHistoryDetail,
43
+ type ExtensionHistoryEntry,
41
44
  type ExtensionRow,
42
45
  } from "./store.js";
43
46
 
@@ -126,7 +129,7 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
126
129
  "get-extension": {
127
130
  tool: {
128
131
  description:
129
- "Get one existing extension by id. Use this when <current-screen> or <current-url> contains extensionId for the current extension; do not call list-extensions just to rediscover that id. Defaults to including the full Alpine.js content so you can make a targeted update-extension edit.",
132
+ "Get one existing extension by id. Use this when <current-screen> or <current-url> contains extensionId for the current extension; do not call list-extensions just to rediscover that id. Defaults to including the full Alpine.js content once per run so you can make a targeted update-extension edit; repeated unchanged reads return compact metadata unless forceContent=true.",
130
133
  parameters: {
131
134
  type: "object",
132
135
  properties: {
@@ -140,6 +143,11 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
140
143
  description:
141
144
  "Include full Alpine.js content. Defaults to true for targeted edits.",
142
145
  },
146
+ forceContent: {
147
+ type: "boolean",
148
+ description:
149
+ "Return full content even if this run already read the same unchanged body. Use sparingly; prefer update-extension edits after the first read.",
150
+ },
143
151
  },
144
152
  required: ["id"],
145
153
  },
@@ -151,14 +159,16 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
151
159
  args?.includeContent === undefined
152
160
  ? true
153
161
  : coerceBoolean(args.includeContent);
162
+ const forceContent = coerceBoolean(args?.forceContent);
154
163
  const localExtension = await getLocalExtension(id);
155
164
  if (localExtension) {
156
165
  return {
157
166
  ok: true,
158
- extension: await summarizeExtension(
167
+ extension: await summarizeExtensionForAgentRead(
159
168
  localExtension,
160
169
  new Set(),
161
170
  includeContent,
171
+ forceContent,
162
172
  ),
163
173
  };
164
174
  }
@@ -167,10 +177,11 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
167
177
  const hiddenIds = await getHiddenExtensionIdsForCurrentUser();
168
178
  return {
169
179
  ok: true,
170
- extension: await summarizeExtension(
180
+ extension: await summarizeExtensionForAgentRead(
171
181
  extension,
172
182
  hiddenIds,
173
183
  includeContent,
184
+ forceContent,
174
185
  ),
175
186
  };
176
187
  },
@@ -223,7 +234,7 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
223
234
  "get-extension-history-version": {
224
235
  tool: {
225
236
  description:
226
- "Get one extension history version with its previous-version diff. Use after list-extension-history when the user wants to inspect exactly what changed.",
237
+ "Get one extension history version with its previous-version diff. Use after list-extension-history when the user wants to inspect exactly what changed. Full HTML bodies are omitted by default; set includeContent=true only when restoring or manually comparing full source.",
227
238
  parameters: {
228
239
  type: "object",
229
240
  properties: {
@@ -235,6 +246,11 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
235
246
  type: "number",
236
247
  description: "History version number to inspect.",
237
248
  },
249
+ includeContent: {
250
+ type: "boolean",
251
+ description:
252
+ "Include full HTML for the current and previous versions. Defaults to false to keep agent context compact.",
253
+ },
238
254
  },
239
255
  required: ["id", "version"],
240
256
  },
@@ -252,7 +268,13 @@ export function createExtensionActionEntries(): Record<string, ActionEntry> {
252
268
  if (!detail) {
253
269
  return `Error: extension history version not found: ${id}#${version}`;
254
270
  }
255
- return { ok: true, ...detail };
271
+ return {
272
+ ok: true,
273
+ ...compactExtensionHistoryDetail(
274
+ detail,
275
+ coerceBoolean(args?.includeContent),
276
+ ),
277
+ };
256
278
  },
257
279
  readOnly: true,
258
280
  },
@@ -1059,11 +1081,97 @@ async function summarizeExtension(
1059
1081
  hiddenBy: row.hiddenBy,
1060
1082
  createdAt: row.createdAt,
1061
1083
  updatedAt: row.updatedAt,
1084
+ contentLength: row.content.length,
1085
+ contentHash: contentFingerprint(row.content),
1062
1086
  ...(local ? { source: row.source } : {}),
1063
1087
  ...(includeContent ? { content: row.content } : {}),
1064
1088
  };
1065
1089
  }
1066
1090
 
1091
+ async function summarizeExtensionForAgentRead(
1092
+ row: ExtensionRow | LocalExtensionRow,
1093
+ hiddenIds: Set<string>,
1094
+ includeContent: boolean,
1095
+ forceContent: boolean,
1096
+ ) {
1097
+ if (!includeContent) {
1098
+ return summarizeExtension(row, hiddenIds, false);
1099
+ }
1100
+
1101
+ const fingerprint = contentFingerprint(row.content);
1102
+ const runCtx = getRequestRunContext();
1103
+ const reads = runCtx ? (runCtx.extensionContentReads ??= {}) : undefined;
1104
+ const alreadySent = !forceContent && reads?.[row.id] === fingerprint;
1105
+ if (!alreadySent && reads) {
1106
+ reads[row.id] = fingerprint;
1107
+ }
1108
+
1109
+ const summary = await summarizeExtension(row, hiddenIds, !alreadySent);
1110
+ if (!alreadySent) return summary;
1111
+
1112
+ return {
1113
+ ...summary,
1114
+ contentOmitted: {
1115
+ reason: "unchanged-content-already-returned-this-run",
1116
+ contentHash: fingerprint,
1117
+ contentLength: row.content.length,
1118
+ next: "Use the content already returned earlier in this run and call update-extension with focused edits/patches. Set forceContent=true only if you truly need the full body again.",
1119
+ },
1120
+ };
1121
+ }
1122
+
1123
+ function compactExtensionHistoryDetail(
1124
+ detail: ExtensionHistoryDetail,
1125
+ includeContent: boolean,
1126
+ ): ExtensionHistoryDetail & {
1127
+ diffOmitted?: { omittedLines: number; maxLines: number };
1128
+ } {
1129
+ const diffMaxLines = 400;
1130
+ const fullDiff = detail.diff ?? [];
1131
+ const diff =
1132
+ fullDiff.length > diffMaxLines
1133
+ ? [...fullDiff.slice(0, 200), ...fullDiff.slice(fullDiff.length - 200)]
1134
+ : fullDiff;
1135
+ return {
1136
+ ...detail,
1137
+ entry: compactHistoryEntry(detail.entry, includeContent),
1138
+ previous: detail.previous
1139
+ ? compactHistoryEntry(detail.previous, includeContent)
1140
+ : null,
1141
+ diff,
1142
+ ...(fullDiff.length > diff.length
1143
+ ? {
1144
+ diffOmitted: {
1145
+ omittedLines: fullDiff.length - diff.length,
1146
+ maxLines: diffMaxLines,
1147
+ },
1148
+ }
1149
+ : {}),
1150
+ };
1151
+ }
1152
+
1153
+ function compactHistoryEntry(
1154
+ entry: ExtensionHistoryEntry,
1155
+ includeContent: boolean,
1156
+ ): ExtensionHistoryEntry & { contentHash?: string } {
1157
+ const content = entry.content ?? "";
1158
+ const withHash = {
1159
+ ...entry,
1160
+ ...(content ? { contentHash: contentFingerprint(content) } : {}),
1161
+ };
1162
+ if (includeContent) return withHash;
1163
+ const { content: _content, ...withoutContent } = withHash;
1164
+ return withoutContent;
1165
+ }
1166
+
1167
+ function contentFingerprint(content: string): string {
1168
+ let hash = 5381;
1169
+ for (let i = 0; i < content.length; i++) {
1170
+ hash = (hash * 33) ^ content.charCodeAt(i);
1171
+ }
1172
+ return `${content.length.toString(36)}-${(hash >>> 0).toString(36)}`;
1173
+ }
1174
+
1067
1175
  async function localExtensionEditMessage(id: string): Promise<string | null> {
1068
1176
  const localExtension = await getLocalExtension(id);
1069
1177
  if (!localExtension) return null;
@@ -451,13 +451,16 @@ async function executeJob(
451
451
  // run completes so finished jobs don't leave a live timer keeping the
452
452
  // process/event loop alive for the remainder of the window.
453
453
  let hardAbortTimer: ReturnType<typeof setTimeout> | null = null;
454
+ const jobUsageRef: {
455
+ current: Awaited<ReturnType<typeof runAgentLoop>> | null;
456
+ } = { current: null };
454
457
  await new Promise<void>((resolve, reject) => {
455
458
  const activeRun = startRun(
456
459
  runId,
457
460
  thread.id,
458
461
  async (send, signal) => {
459
462
  try {
460
- await runAgentLoop({
463
+ jobUsageRef.current = await runAgentLoop({
461
464
  engine,
462
465
  model,
463
466
  systemPrompt,
@@ -512,6 +515,32 @@ async function executeJob(
512
515
 
513
516
  if (jobError) throw jobError;
514
517
 
518
+ const jobUsage = jobUsageRef.current;
519
+ if (
520
+ jobUsage &&
521
+ (jobUsage.inputTokens > 0 ||
522
+ jobUsage.outputTokens > 0 ||
523
+ jobUsage.cacheReadTokens > 0 ||
524
+ jobUsage.cacheWriteTokens > 0)
525
+ ) {
526
+ try {
527
+ const { recordUsage } = await import("../usage/store.js");
528
+ await recordUsage({
529
+ ownerEmail: jobUserEmail,
530
+ inputTokens: jobUsage.inputTokens,
531
+ outputTokens: jobUsage.outputTokens,
532
+ cacheReadTokens: jobUsage.cacheReadTokens,
533
+ cacheWriteTokens: jobUsage.cacheWriteTokens,
534
+ model: jobUsage.model,
535
+ label: `recurring-job:${jobName}`,
536
+ app: deps.appId,
537
+ refId: runId,
538
+ });
539
+ } catch {
540
+ // Usage attribution must not break the scheduled task.
541
+ }
542
+ }
543
+
515
544
  // Success — update status. Compute the next run from completion time,
516
545
  // not the job's start time `now`: a long run could otherwise schedule a
517
546
  // nextRun that's already in the past and re-fire immediately next tick.
@@ -47,6 +47,8 @@ const messages = {
47
47
  destinations: "Destinations",
48
48
  identities: "Identities",
49
49
  approvals: "Approvals",
50
+ automations: "Automations",
51
+ delivery: "Delivery",
50
52
  audit: "Audit",
51
53
  dreams: "Dreams",
52
54
  threadDebug: "Thread Debug",
@@ -161,6 +163,22 @@ const messages = {
161
163
  activeUsers: "Active users",
162
164
  workspaceAppsStat: "Workspace apps",
163
165
  chatThreads: "Chat threads",
166
+ also: "Also",
167
+ workspaceShortcutsAria: "Workspace shortcuts",
168
+ deliveryQueue: "Delivery queue",
169
+ failedLastHour: "{{count}} failed in the last hour",
170
+ processingCount: "{{count}} processing",
171
+ queued: "Queued",
172
+ active: "Active",
173
+ done1h: "Done 1h",
174
+ failed1h: "Failed 1h",
175
+ oldestQueued: "Oldest queued: {{age}}",
176
+ queueAgeNone: "none",
177
+ queueFailureHint:
178
+ "Check credentials, destinations, and recent queue errors.",
179
+ unknownPlatform: "unknown",
180
+ attemptsCount: "{{count}} attempts",
181
+ noErrorMessage: "(no error message)",
164
182
  },
165
183
  },
166
184
  agentPanel: {
@@ -335,6 +353,9 @@ const messages = {
335
353
  contactSidebarWidget: "Contact sidebar widget",
336
354
  contactSidebarDescription:
337
355
  "Appears beside the current conversation with contact and thread context.",
356
+ eventDetailWidget: "Event detail widget",
357
+ eventDetailDescription:
358
+ "Appears below the open calendar event with event and attendee context.",
338
359
  addWidgetHere: "Add widget here",
339
360
  back: "Back",
340
361
  editExtension: "Edit Extension",