@agent-native/core 0.130.2 → 0.131.3

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 (895) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +79 -0
  3. package/corpus/core/docs/content/agent-surfaces.mdx +4 -4
  4. package/corpus/core/docs/content/automations.mdx +61 -12
  5. package/corpus/core/docs/content/deployment.mdx +11 -4
  6. package/corpus/core/docs/content/extensions.mdx +39 -33
  7. package/corpus/core/docs/content/recurring-jobs.mdx +41 -19
  8. package/corpus/core/docs/content/template-dispatch-operations.mdx +19 -7
  9. package/corpus/core/package.json +3 -1
  10. package/corpus/core/src/a2a/types.ts +6 -0
  11. package/corpus/core/src/action.ts +68 -0
  12. package/corpus/core/src/agent/engine/builder-engine.ts +8 -4
  13. package/corpus/core/src/agent/production-agent.ts +175 -100
  14. package/corpus/core/src/agent/tool-search.ts +36 -0
  15. package/corpus/core/src/automations/service.ts +506 -0
  16. package/corpus/core/src/browser-context/index.ts +392 -0
  17. package/corpus/core/src/client/AgentPanel.tsx +2 -1
  18. package/corpus/core/src/client/FeedbackButton.tsx +37 -4
  19. package/corpus/core/src/client/MultiTabAssistantChat.tsx +21 -0
  20. package/corpus/core/src/client/agent-chat.ts +31 -3
  21. package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +438 -310
  22. package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +4 -4
  23. package/corpus/core/src/client/agent-page/use-jobs.ts +7 -0
  24. package/corpus/core/src/client/analytics-session.ts +13 -0
  25. package/corpus/core/src/client/extensions/ExtensionViewer.tsx +67 -0
  26. package/corpus/core/src/client/settings/AutomationsSection.tsx +27 -499
  27. package/corpus/core/src/client/settings/SettingsPanel.tsx +32 -11
  28. package/corpus/core/src/client/settings/index.ts +2 -0
  29. package/corpus/core/src/client/use-agent-chat.ts +35 -3
  30. package/corpus/core/src/client/use-chat-threads.ts +8 -25
  31. package/corpus/core/src/deploy/build.ts +2 -0
  32. package/corpus/core/src/deploy/workspace-deploy.ts +2 -0
  33. package/corpus/core/src/extensions/actions.ts +115 -3
  34. package/corpus/core/src/extensions/fetch-tool.ts +11 -0
  35. package/corpus/core/src/extensions/routes.ts +16 -1
  36. package/corpus/core/src/extensions/web-content.ts +96 -1
  37. package/corpus/core/src/integrations/computer-supervision.ts +33 -1
  38. package/corpus/core/src/integrations/index.ts +6 -0
  39. package/corpus/core/src/integrations/integration-durable-dispatch-config.ts +10 -0
  40. package/corpus/core/src/integrations/integration-durable-dispatch.ts +4 -0
  41. package/corpus/core/src/integrations/plugin.ts +94 -41
  42. package/corpus/core/src/integrations/remote-browser-actions.ts +621 -0
  43. package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +5 -7
  44. package/corpus/core/src/jobs/actions/manage-recurring-job.ts +3 -7
  45. package/corpus/core/src/jobs/background-automation-runner.ts +437 -0
  46. package/corpus/core/src/jobs/frontmatter.ts +308 -0
  47. package/corpus/core/src/jobs/scheduler.ts +89 -598
  48. package/corpus/core/src/jobs/tools.ts +22 -3
  49. package/corpus/core/src/localization/default-messages.ts +45 -45
  50. package/corpus/core/src/mcp-client/index.ts +6 -0
  51. package/corpus/core/src/notifications/actions.ts +5 -0
  52. package/corpus/core/src/progress/actions.ts +5 -0
  53. package/corpus/core/src/provider-api/actions/github-repo-files.ts +11 -0
  54. package/corpus/core/src/provider-api/actions/provider-api.ts +13 -0
  55. package/corpus/core/src/server/action-discovery.ts +7 -0
  56. package/corpus/core/src/server/agent-capabilities.ts +43 -8
  57. package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +63 -1
  58. package/corpus/core/src/server/agent-chat/browser-team-tools.ts +126 -3
  59. package/corpus/core/src/server/agent-chat/framework-prompts.ts +7 -11
  60. package/corpus/core/src/server/agent-chat/plugin-options.ts +3 -3
  61. package/corpus/core/src/server/agent-chat/script-entries.ts +52 -1
  62. package/corpus/core/src/server/agent-chat-plugin.ts +25 -5
  63. package/corpus/core/src/server/attribution.ts +22 -0
  64. package/corpus/core/src/server/auth.ts +20 -6
  65. package/corpus/core/src/server/better-auth-instance.ts +10 -2
  66. package/corpus/core/src/server/core-routes-plugin.ts +10 -1
  67. package/corpus/core/src/server/csrf.ts +25 -0
  68. package/corpus/core/src/server/google-oauth.ts +21 -1
  69. package/corpus/core/src/server/onboarding-html.ts +18 -0
  70. package/corpus/core/src/server/prompts/framework-core-compact.ts +3 -3
  71. package/corpus/core/src/server/prompts/framework-core.ts +3 -3
  72. package/corpus/core/src/server/prompts/shared-rules.ts +3 -3
  73. package/corpus/core/src/settings/index.ts +1 -0
  74. package/corpus/core/src/shared/analytics-anonymous-id.ts +35 -0
  75. package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  76. package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +26 -0
  77. package/corpus/core/src/templates/default/app/i18n/de-DE.ts +28 -0
  78. package/corpus/core/src/templates/default/app/i18n/en-US.ts +27 -0
  79. package/corpus/core/src/templates/default/app/i18n/es-ES.ts +28 -0
  80. package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +28 -0
  81. package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +25 -0
  82. package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +27 -0
  83. package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +27 -0
  84. package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +27 -0
  85. package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +24 -0
  86. package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +24 -0
  87. package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  88. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  89. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
  90. package/corpus/core/src/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
  91. package/corpus/core/src/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
  92. package/corpus/core/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
  93. package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
  94. package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
  95. package/corpus/core/src/tracking/providers.ts +1 -0
  96. package/corpus/core/src/tracking/registry.ts +2 -1
  97. package/corpus/core/src/tracking/types.ts +1 -0
  98. package/corpus/core/src/triggers/actions/list-automations.ts +43 -44
  99. package/corpus/core/src/triggers/actions/manage-automation.ts +17 -48
  100. package/corpus/core/src/triggers/actions.ts +218 -127
  101. package/corpus/core/src/triggers/dispatcher.ts +181 -367
  102. package/corpus/core/src/triggers/routes.ts +84 -27
  103. package/corpus/core/src/triggers/types.ts +9 -23
  104. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  105. package/corpus/templates/analytics/AGENTS.md +5 -0
  106. package/corpus/templates/analytics/actions/hubspot-deals.ts +1 -0
  107. package/corpus/templates/analytics/actions/hubspot-records.ts +1 -0
  108. package/corpus/templates/analytics/actions/install-dashboard-template.ts +13 -4
  109. package/corpus/templates/analytics/actions/rename-dashboard.ts +8 -3
  110. package/corpus/templates/analytics/actions/restore-dashboard-revision.ts +8 -3
  111. package/corpus/templates/analytics/actions/update-dashboard.ts +22 -5
  112. package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +7 -1
  113. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -82
  114. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +4 -4
  115. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +23 -13
  116. package/corpus/templates/analytics/app/global.css +21 -0
  117. package/corpus/templates/analytics/app/i18n-data.ts +165 -101
  118. package/corpus/templates/analytics/app/lib/custom-block-promotion.ts +62 -0
  119. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +17 -2
  120. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +3 -1
  121. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +77 -12
  122. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-save-queue.ts +34 -0
  123. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +42 -26
  124. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +15 -0
  125. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +1 -1
  126. package/corpus/templates/analytics/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
  127. package/corpus/templates/analytics/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-the-dashboard.md +6 -0
  128. package/corpus/templates/analytics/changelog/2026-07-29-custom-dashboard-blocks-now-identify-one-off-agent-patches-a.md +6 -0
  129. package/corpus/templates/analytics/changelog/2026-07-29-dashboard-chart-deletions-now-save-in-order-so-removed-rows-.md +6 -0
  130. package/corpus/templates/analytics/changelog/2026-07-29-dashboard-chart-loaders-are-easier-to-see-and-animate-more-s.md +6 -0
  131. package/corpus/templates/analytics/changelog/2026-07-29-plan-mode-can-now-query-connected-analytics-sources-while-ke.md +6 -0
  132. package/corpus/templates/analytics/changelog/2026-07-29-plan-mode-can-use-clips-as-read-only-prompt-context.md +6 -0
  133. package/corpus/templates/analytics/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  134. package/corpus/templates/analytics/changelog/2026-07-29-signup-entry-pages-now-show-the-first-page-viewed-before-eac.md +6 -0
  135. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +26 -1
  136. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +0 -33
  137. package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +2 -0
  138. package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +13 -3
  139. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +9 -1
  140. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +44 -1
  141. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +96 -16
  142. package/corpus/templates/analytics/server/plugins/agent-chat.ts +18 -27
  143. package/corpus/templates/analytics/server/plugins/core-routes.ts +1 -0
  144. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  145. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +4 -8
  146. package/corpus/templates/assets/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
  147. package/corpus/templates/assets/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-the-workspace.md +6 -0
  148. package/corpus/templates/assets/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  149. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  150. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +3 -7
  151. package/corpus/templates/brain/app/root.tsx +0 -3
  152. package/corpus/templates/brain/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
  153. package/corpus/templates/brain/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-ask-brain.md +6 -0
  154. package/corpus/templates/brain/changelog/2026-07-29-extensions-are-no-longer-shown-as-a-default-command-menu-des.md +6 -0
  155. package/corpus/templates/brain/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  156. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  157. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +25 -5
  158. package/corpus/templates/calendar/AGENTS.md +5 -0
  159. package/corpus/templates/calendar/actions/create-event.ts +43 -13
  160. package/corpus/templates/calendar/actions/event-action-helpers.ts +131 -1
  161. package/corpus/templates/calendar/actions/get-event.ts +1 -0
  162. package/corpus/templates/calendar/actions/manage-event-draft.ts +65 -2
  163. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +438 -258
  164. package/corpus/templates/calendar/app/components/calendar/DayView.tsx +19 -3
  165. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +7 -3
  166. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +14 -19
  167. package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +24 -0
  168. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +15 -2
  169. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +1 -5
  170. package/corpus/templates/calendar/app/hooks/use-events.ts +51 -5
  171. package/corpus/templates/calendar/app/i18n-data.ts +50 -0
  172. package/corpus/templates/calendar/app/lib/all-day-layout.ts +9 -2
  173. package/corpus/templates/calendar/app/lib/event-form-initialization.ts +4 -8
  174. package/corpus/templates/calendar/app/lib/event-form-utils.ts +43 -8
  175. package/corpus/templates/calendar/app/lib/location-suggestions.ts +36 -0
  176. package/corpus/templates/calendar/app/lib/out-of-office.ts +87 -1
  177. package/corpus/templates/calendar/app/pages/CalendarView.tsx +82 -20
  178. package/corpus/templates/calendar/changelog/2026-07-26-out-of-office-events-now-default-to-full-days-with-a-ready.md +6 -0
  179. package/corpus/templates/calendar/changelog/2026-07-29-recent-calendar-locations-now-appear-as-address-suggestions-.md +6 -0
  180. package/corpus/templates/calendar/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  181. package/corpus/templates/calendar/changelog/2026-07-29-unnamed-events-now-use-a-title-placeholder.md +6 -0
  182. package/corpus/templates/calendar/server/lib/find-time.ts +29 -5
  183. package/corpus/templates/calendar/server/lib/google-calendar.ts +2 -0
  184. package/corpus/templates/calendar/server/lib/ical-fetcher.ts +1 -0
  185. package/corpus/templates/calendar/shared/api.ts +4 -0
  186. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  187. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +1 -5
  188. package/corpus/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  189. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  190. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -5
  191. package/corpus/templates/clips/changelog/2026-07-29-fixed-system-audio-recordings-picking-up-your-microphone-in-.md +6 -0
  192. package/corpus/templates/clips/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  193. package/corpus/templates/clips/changelog/2026-07-29-the-desktop-camera-preview-now-closes-after-a-recording-fin.md +6 -0
  194. package/corpus/templates/clips/desktop/src/app.tsx +14 -15
  195. package/corpus/templates/clips/desktop/src/lib/bubble-session.ts +11 -0
  196. package/corpus/templates/clips/desktop/src/lib/recorder.ts +9 -4
  197. package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +11 -0
  198. package/corpus/templates/clips/server/jobs/transactional-emails.ts +47 -23
  199. package/corpus/templates/clips/server/lib/transactional-email-store.ts +16 -6
  200. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  201. package/corpus/templates/content/.agents/skills/content-product-development/SKILL.md +103 -0
  202. package/corpus/templates/content/.agents/skills/content-product-development/references/verification.md +57 -0
  203. package/corpus/templates/content/AGENTS.md +2 -0
  204. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -6
  205. package/corpus/templates/content/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  206. package/corpus/templates/content/docs/product/README.md +115 -0
  207. package/corpus/templates/content/docs/product/architecture.md +98 -0
  208. package/corpus/templates/content/docs/product/capabilities/content.access.page-database.md +76 -0
  209. package/corpus/templates/content/docs/product/capabilities/content.access.row-private.md +75 -0
  210. package/corpus/templates/content/docs/product/capabilities/content.access.safe-aggregate.md +75 -0
  211. package/corpus/templates/content/docs/product/capabilities/content.access.visibility-closure.md +79 -0
  212. package/corpus/templates/content/docs/product/capabilities/content.action.button.md +67 -0
  213. package/corpus/templates/content/docs/product/capabilities/content.agent.action-parity.md +73 -0
  214. package/corpus/templates/content/docs/product/capabilities/content.agent.audience-safe.md +91 -0
  215. package/corpus/templates/content/docs/product/capabilities/content.agent.automation.md +67 -0
  216. package/corpus/templates/content/docs/product/capabilities/content.agent.expression-authoring.md +71 -0
  217. package/corpus/templates/content/docs/product/capabilities/content.agent.presence.md +103 -0
  218. package/corpus/templates/content/docs/product/capabilities/content.agent.resource-consent.md +90 -0
  219. package/corpus/templates/content/docs/product/capabilities/content.agent.skill-catalog.md +67 -0
  220. package/corpus/templates/content/docs/product/capabilities/content.api.cms.md +70 -0
  221. package/corpus/templates/content/docs/product/capabilities/content.author.code.md +71 -0
  222. package/corpus/templates/content/docs/product/capabilities/content.author.document-editor.md +71 -0
  223. package/corpus/templates/content/docs/product/capabilities/content.author.footnotes.md +71 -0
  224. package/corpus/templates/content/docs/product/capabilities/content.author.math.md +71 -0
  225. package/corpus/templates/content/docs/product/capabilities/content.author.media.md +71 -0
  226. package/corpus/templates/content/docs/product/capabilities/content.author.mermaid.md +71 -0
  227. package/corpus/templates/content/docs/product/capabilities/content.automation.scheduled.md +67 -0
  228. package/corpus/templates/content/docs/product/capabilities/content.capture.enrich.md +75 -0
  229. package/corpus/templates/content/docs/product/capabilities/content.command.fabric.md +67 -0
  230. package/corpus/templates/content/docs/product/capabilities/content.comment.page-owned.md +75 -0
  231. package/corpus/templates/content/docs/product/capabilities/content.diff.ai-assist.md +75 -0
  232. package/corpus/templates/content/docs/product/capabilities/content.diff.filtered-review.md +79 -0
  233. package/corpus/templates/content/docs/product/capabilities/content.diff.in-place.md +80 -0
  234. package/corpus/templates/content/docs/product/capabilities/content.discussion.page.md +80 -0
  235. package/corpus/templates/content/docs/product/capabilities/content.embed.host-grant.md +70 -0
  236. package/corpus/templates/content/docs/product/capabilities/content.embed.mcp-app.md +69 -0
  237. package/corpus/templates/content/docs/product/capabilities/content.embed.surface.md +74 -0
  238. package/corpus/templates/content/docs/product/capabilities/content.event.committed.md +85 -0
  239. package/corpus/templates/content/docs/product/capabilities/content.expression.cached-result.md +71 -0
  240. package/corpus/templates/content/docs/product/capabilities/content.expression.catalog.md +71 -0
  241. package/corpus/templates/content/docs/product/capabilities/content.expression.language.md +76 -0
  242. package/corpus/templates/content/docs/product/capabilities/content.feedback.signal.md +67 -0
  243. package/corpus/templates/content/docs/product/capabilities/content.form.shared-engine.md +72 -0
  244. package/corpus/templates/content/docs/product/capabilities/content.history.queryable.md +79 -0
  245. package/corpus/templates/content/docs/product/capabilities/content.home.global.md +80 -0
  246. package/corpus/templates/content/docs/product/capabilities/content.job.durable.md +76 -0
  247. package/corpus/templates/content/docs/product/capabilities/content.knowledge.graph.md +67 -0
  248. package/corpus/templates/content/docs/product/capabilities/content.knowledge.links.md +67 -0
  249. package/corpus/templates/content/docs/product/capabilities/content.knowledge.search.md +67 -0
  250. package/corpus/templates/content/docs/product/capabilities/content.layout.responsive.md +80 -0
  251. package/corpus/templates/content/docs/product/capabilities/content.navigation.sidebar.md +86 -0
  252. package/corpus/templates/content/docs/product/capabilities/content.notification.source.md +71 -0
  253. package/corpus/templates/content/docs/product/capabilities/content.object.block.md +76 -0
  254. package/corpus/templates/content/docs/product/capabilities/content.object.blocks-field.md +79 -0
  255. package/corpus/templates/content/docs/product/capabilities/content.object.database.md +92 -0
  256. package/corpus/templates/content/docs/product/capabilities/content.object.multi-membership.md +75 -0
  257. package/corpus/templates/content/docs/product/capabilities/content.object.page.md +76 -0
  258. package/corpus/templates/content/docs/product/capabilities/content.object.reference.md +75 -0
  259. package/corpus/templates/content/docs/product/capabilities/content.object.transclusion.md +75 -0
  260. package/corpus/templates/content/docs/product/capabilities/content.organization.teams.md +71 -0
  261. package/corpus/templates/content/docs/product/capabilities/content.portability.pdf-export.md +78 -0
  262. package/corpus/templates/content/docs/product/capabilities/content.portability.roundtrip.md +154 -0
  263. package/corpus/templates/content/docs/product/capabilities/content.portability.source-representation.md +70 -0
  264. package/corpus/templates/content/docs/product/capabilities/content.portability.vault-export.md +80 -0
  265. package/corpus/templates/content/docs/product/capabilities/content.presentation.mode.md +76 -0
  266. package/corpus/templates/content/docs/product/capabilities/content.preset.catalog.md +71 -0
  267. package/corpus/templates/content/docs/product/capabilities/content.property.actor.md +75 -0
  268. package/corpus/templates/content/docs/product/capabilities/content.property.catalog.md +76 -0
  269. package/corpus/templates/content/docs/product/capabilities/content.property.constraints.md +75 -0
  270. package/corpus/templates/content/docs/product/capabilities/content.property.guarded-change.md +76 -0
  271. package/corpus/templates/content/docs/product/capabilities/content.property.location.md +71 -0
  272. package/corpus/templates/content/docs/product/capabilities/content.property.typed.md +71 -0
  273. package/corpus/templates/content/docs/product/capabilities/content.publish.public.md +75 -0
  274. package/corpus/templates/content/docs/product/capabilities/content.publish.reading.md +74 -0
  275. package/corpus/templates/content/docs/product/capabilities/content.query.object.md +114 -0
  276. package/corpus/templates/content/docs/product/capabilities/content.reader.documents.md +69 -0
  277. package/corpus/templates/content/docs/product/capabilities/content.reader.surface.md +75 -0
  278. package/corpus/templates/content/docs/product/capabilities/content.relationship.edge.md +183 -0
  279. package/corpus/templates/content/docs/product/capabilities/content.renderer.artifact-block.md +71 -0
  280. package/corpus/templates/content/docs/product/capabilities/content.renderer.custom-block.md +81 -0
  281. package/corpus/templates/content/docs/product/capabilities/content.renderer.graph.md +71 -0
  282. package/corpus/templates/content/docs/product/capabilities/content.renderer.typed.md +92 -0
  283. package/corpus/templates/content/docs/product/capabilities/content.research.annotation.md +75 -0
  284. package/corpus/templates/content/docs/product/capabilities/content.research.citation.md +70 -0
  285. package/corpus/templates/content/docs/product/capabilities/content.review.code.md +67 -0
  286. package/corpus/templates/content/docs/product/capabilities/content.revision.suggestions.md +76 -0
  287. package/corpus/templates/content/docs/product/capabilities/content.rule.deterministic.md +79 -0
  288. package/corpus/templates/content/docs/product/capabilities/content.schedule.constraints.md +81 -0
  289. package/corpus/templates/content/docs/product/capabilities/content.security.private-vault.md +71 -0
  290. package/corpus/templates/content/docs/product/capabilities/content.share.views.md +140 -0
  291. package/corpus/templates/content/docs/product/capabilities/content.source.adapters.md +154 -0
  292. package/corpus/templates/content/docs/product/capabilities/content.source.builder-codec.md +70 -0
  293. package/corpus/templates/content/docs/product/capabilities/content.source.catalog.md +149 -0
  294. package/corpus/templates/content/docs/product/capabilities/content.source.file-folder.md +71 -0
  295. package/corpus/templates/content/docs/product/capabilities/content.source.local-bridge.md +156 -0
  296. package/corpus/templates/content/docs/product/capabilities/content.source.local-project.md +70 -0
  297. package/corpus/templates/content/docs/product/capabilities/content.source.page-link.md +70 -0
  298. package/corpus/templates/content/docs/product/capabilities/content.source.row-union.md +69 -0
  299. package/corpus/templates/content/docs/product/capabilities/content.source.spaces-files.md +75 -0
  300. package/corpus/templates/content/docs/product/capabilities/content.source.sync-policy.md +161 -0
  301. package/corpus/templates/content/docs/product/capabilities/content.system.dependencies.md +80 -0
  302. package/corpus/templates/content/docs/product/capabilities/content.system.my-tasks.md +75 -0
  303. package/corpus/templates/content/docs/product/capabilities/content.system.project-status.md +77 -0
  304. package/corpus/templates/content/docs/product/capabilities/content.system.research-workspace.md +80 -0
  305. package/corpus/templates/content/docs/product/capabilities/content.system.task-project.md +76 -0
  306. package/corpus/templates/content/docs/product/capabilities/content.template.governance.md +76 -0
  307. package/corpus/templates/content/docs/product/capabilities/content.template.graph.md +76 -0
  308. package/corpus/templates/content/docs/product/capabilities/content.template.item-body.md +71 -0
  309. package/corpus/templates/content/docs/product/capabilities/content.template.update.md +71 -0
  310. package/corpus/templates/content/docs/product/capabilities/content.time.types.md +85 -0
  311. package/corpus/templates/content/docs/product/capabilities/content.version.branching.md +151 -0
  312. package/corpus/templates/content/docs/product/capabilities/content.version.field-history.md +103 -0
  313. package/corpus/templates/content/docs/product/capabilities/content.view.canvas.md +94 -0
  314. package/corpus/templates/content/docs/product/capabilities/content.view.chart.md +91 -0
  315. package/corpus/templates/content/docs/product/capabilities/content.view.dynamic-create.md +137 -0
  316. package/corpus/templates/content/docs/product/capabilities/content.view.fast-capture.md +82 -0
  317. package/corpus/templates/content/docs/product/capabilities/content.view.graph.md +95 -0
  318. package/corpus/templates/content/docs/product/capabilities/content.view.grouping-aggregation.md +83 -0
  319. package/corpus/templates/content/docs/product/capabilities/content.view.map.md +77 -0
  320. package/corpus/templates/content/docs/product/capabilities/content.view.personal-state.md +99 -0
  321. package/corpus/templates/content/docs/product/capabilities/content.view.pivot.md +76 -0
  322. package/corpus/templates/content/docs/product/capabilities/content.view.query.md +106 -0
  323. package/corpus/templates/content/docs/product/capabilities/content.view.renderer-conformance.md +77 -0
  324. package/corpus/templates/content/docs/product/capabilities/content.view.scale.md +77 -0
  325. package/corpus/templates/content/docs/product/capabilities/content.view.source-query.md +159 -0
  326. package/corpus/templates/content/docs/product/capabilities/content.view.timeline.md +86 -0
  327. package/corpus/templates/content/docs/product/capabilities/content.view.tree.md +77 -0
  328. package/corpus/templates/content/docs/product/capabilities/content.workspace.multi-scope.md +80 -0
  329. package/corpus/templates/content/docs/product/capabilities/content.workspace.session-restore.md +76 -0
  330. package/corpus/templates/content/docs/product/capabilities/content.workspace.view-instance.md +76 -0
  331. package/corpus/templates/content/docs/product/capabilities/content.workspace.working-set.md +77 -0
  332. package/corpus/templates/content/docs/product/chapters/content.chapter.capture-research.md +20 -0
  333. package/corpus/templates/content/docs/product/chapters/content.chapter.connected-sources.md +20 -0
  334. package/corpus/templates/content/docs/product/chapters/content.chapter.consensus.md +19 -0
  335. package/corpus/templates/content/docs/product/chapters/content.chapter.durable-home.md +21 -0
  336. package/corpus/templates/content/docs/product/chapters/content.chapter.publishing-portability.md +21 -0
  337. package/corpus/templates/content/docs/product/chapters/content.chapter.working-systems.md +27 -0
  338. package/corpus/templates/content/docs/product/encyclopedia.md +559 -0
  339. package/corpus/templates/content/docs/product/features/content.feature.bring-your-local-work.md +39 -0
  340. package/corpus/templates/content/docs/product/features/content.feature.build-living-dashboards.md +34 -0
  341. package/corpus/templates/content/docs/product/features/content.feature.build-new-surfaces.md +33 -0
  342. package/corpus/templates/content/docs/product/features/content.feature.capture-into-action.md +34 -0
  343. package/corpus/templates/content/docs/product/features/content.feature.cite-what-you-found.md +34 -0
  344. package/corpus/templates/content/docs/product/features/content.feature.collaborate-in-context.md +59 -0
  345. package/corpus/templates/content/docs/product/features/content.feature.collect-structured-input.md +38 -0
  346. package/corpus/templates/content/docs/product/features/content.feature.connect-your-sources.md +38 -0
  347. package/corpus/templates/content/docs/product/features/content.feature.data-that-keeps-itself-right.md +45 -0
  348. package/corpus/templates/content/docs/product/features/content.feature.durable-foundations.md +48 -0
  349. package/corpus/templates/content/docs/product/features/content.feature.evolve-systems-safely.md +38 -0
  350. package/corpus/templates/content/docs/product/features/content.feature.explore-alternatives-safely.md +39 -0
  351. package/corpus/templates/content/docs/product/features/content.feature.find-your-place-again.md +40 -0
  352. package/corpus/templates/content/docs/product/features/content.feature.keep-your-private-vault-private.md +39 -0
  353. package/corpus/templates/content/docs/product/features/content.feature.living-references.md +38 -0
  354. package/corpus/templates/content/docs/product/features/content.feature.make-the-workspace-yours.md +40 -0
  355. package/corpus/templates/content/docs/product/features/content.feature.move-without-starting-over.md +38 -0
  356. package/corpus/templates/content/docs/product/features/content.feature.plan-work-across-time.md +39 -0
  357. package/corpus/templates/content/docs/product/features/content.feature.publish-with-confidence.md +43 -0
  358. package/corpus/templates/content/docs/product/features/content.feature.put-your-organizations-know-how-to-work.md +38 -0
  359. package/corpus/templates/content/docs/product/features/content.feature.read-and-annotate-anything.md +38 -0
  360. package/corpus/templates/content/docs/product/features/content.feature.review-changes-in-place.md +39 -0
  361. package/corpus/templates/content/docs/product/features/content.feature.run-projects-your-way.md +44 -0
  362. package/corpus/templates/content/docs/product/features/content.feature.see-your-information-your-way.md +44 -0
  363. package/corpus/templates/content/docs/product/features/content.feature.share-how-your-organization-works.md +38 -0
  364. package/corpus/templates/content/docs/product/features/content.feature.sketch-connections-keep-whats-true.md +39 -0
  365. package/corpus/templates/content/docs/product/features/content.feature.take-the-whole-vault-with-you.md +39 -0
  366. package/corpus/templates/content/docs/product/features/content.feature.trust-your-connected-sources.md +40 -0
  367. package/corpus/templates/content/docs/product/features/content.feature.understand-what-your-data-says.md +39 -0
  368. package/corpus/templates/content/docs/product/features/content.feature.when-this-happens-that-follows.md +43 -0
  369. package/corpus/templates/content/docs/product/features/content.feature.work-across-every-workspace.md +37 -0
  370. package/corpus/templates/content/docs/product/features/content.feature.work-on-content-inside-another-application.md +37 -0
  371. package/corpus/templates/content/docs/product/roadmap.md +878 -0
  372. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  373. package/corpus/templates/crm/app/components/layout/CrmSidebar.tsx +1 -7
  374. package/corpus/templates/crm/app/i18n/en-US.ts +4 -0
  375. package/corpus/templates/crm/app/routes/settings.tsx +33 -8
  376. package/corpus/templates/crm/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  377. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  378. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +133 -63
  379. package/corpus/templates/design/.generated/bridge/embedded-wheel.generated.ts +19 -2
  380. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +51 -14
  381. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +41 -26
  382. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +22 -4
  383. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +216 -116
  384. package/corpus/templates/design/app/components/design/bridge/embedded-wheel.bridge.ts +21 -2
  385. package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbench.tsx +5 -1
  386. package/corpus/templates/design/app/components/design/code-workbench/CodeWorkbenchLoader.tsx +10 -2
  387. package/corpus/templates/design/app/components/design/code-workbench/code-workbench-shell.ts +2 -0
  388. package/corpus/templates/design/app/components/design/code-workbench/explorer/ExplorerView.tsx +60 -55
  389. package/corpus/templates/design/app/components/design/design-canvas/content-size-report.ts +88 -2
  390. package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +3 -2
  391. package/corpus/templates/design/app/components/design/types.ts +4 -0
  392. package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -5
  393. package/corpus/templates/design/app/pages/design-editor/clipboard-layer-source.ts +28 -0
  394. package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +117 -0
  395. package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +3 -1
  396. package/corpus/templates/design/app/pages/design-editor/pending-edits.ts +120 -74
  397. package/corpus/templates/design/app/pages/design-editor/pending-structure-verification.ts +11 -0
  398. package/corpus/templates/design/app/pages/design-editor/react-semantic-handoff.ts +2 -0
  399. package/corpus/templates/design/app/pages/design-editor/source-location.ts +1 -1
  400. package/corpus/templates/design/changelog/2026-07-29-copy-rendered-ui-between-live-local-apps-and-design-files-wh.md +6 -0
  401. package/corpus/templates/design/changelog/2026-07-29-design-boards-stay-dark-and-viewport-height-content-keeps-it.md +6 -0
  402. package/corpus/templates/design/changelog/2026-07-29-design-frames-no-longer-grow-continuously-when-their-content.md +6 -0
  403. package/corpus/templates/design/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  404. package/corpus/templates/design/changelog/2026-07-29-the-code-panel-and-apply-design-update-control-now-use-clear.md +6 -0
  405. package/corpus/templates/design/changelog/2026-07-29-the-tools-panel-now-keeps-extension-creation-and-discovery-h.md +6 -0
  406. package/corpus/templates/design/shared/source-mode.ts +7 -1
  407. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  408. package/corpus/templates/dispatch/app/i18n-data.ts +171 -0
  409. package/corpus/templates/dispatch/app/routes/browser-chat.tsx +4 -0
  410. package/corpus/templates/dispatch/app/routes/browser-connect.tsx +4 -0
  411. package/corpus/templates/dispatch/changelog/2026-07-29-browser-chat-can-securely-connect-the-agent-native-chrome-ex.md +6 -0
  412. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  413. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +1 -6
  414. package/corpus/templates/forms/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  415. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  416. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -5
  417. package/corpus/templates/macros/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  418. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  419. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -9
  420. package/corpus/templates/mail/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  421. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  422. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +3 -7
  423. package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -2
  424. package/corpus/templates/plan/changelog/2026-07-29-chat-history-now-closes-smoothly-and-stays-ready-when-you-re.md +6 -0
  425. package/corpus/templates/plan/changelog/2026-07-29-chat-history-stays-visible-when-you-return-to-ask-plan.md +6 -0
  426. package/corpus/templates/plan/changelog/2026-07-29-fixed-plan-pages-crashing-when-recent-activity-is-unavailabl.md +6 -0
  427. package/corpus/templates/plan/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  428. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  429. package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +48 -0
  430. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +60 -4
  431. package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +20 -0
  432. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +30 -1
  433. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -1
  434. package/corpus/templates/slides/AGENTS.md +25 -24
  435. package/corpus/templates/slides/actions/check-image-gen.ts +8 -2
  436. package/corpus/templates/slides/actions/create-deck.ts +4 -12
  437. package/corpus/templates/slides/actions/export-pptx.ts +25 -3
  438. package/corpus/templates/slides/actions/generate-image-api.ts +4 -2
  439. package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
  440. package/corpus/templates/slides/actions/get-deck-reference-context.ts +136 -0
  441. package/corpus/templates/slides/actions/get-workspace-defaults.ts +55 -0
  442. package/corpus/templates/slides/actions/image-gen-status.ts +10 -1
  443. package/corpus/templates/slides/actions/import-file.ts +53 -38
  444. package/corpus/templates/slides/actions/list-decks.ts +2 -0
  445. package/corpus/templates/slides/actions/patch-deck.ts +2 -0
  446. package/corpus/templates/slides/actions/set-workspace-defaults.ts +50 -0
  447. package/corpus/templates/slides/actions/view-screen.ts +6 -0
  448. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +1 -1
  449. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +67 -3
  450. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +40 -8
  451. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +33 -8
  452. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -2
  453. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +114 -128
  454. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +74 -9
  455. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
  456. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1193 -267
  457. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +302 -102
  458. package/corpus/templates/slides/app/components/editor/rich-text-selection.ts +270 -0
  459. package/corpus/templates/slides/app/components/editor/slide-escape-arbiter.ts +34 -0
  460. package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +368 -0
  461. package/corpus/templates/slides/app/components/editor/slide-presence.ts +13 -0
  462. package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +23 -3
  463. package/corpus/templates/slides/app/components/layout/Layout.tsx +39 -6
  464. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +1 -6
  465. package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +23 -0
  466. package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +0 -2
  467. package/corpus/templates/slides/app/context/DeckContext.tsx +2 -0
  468. package/corpus/templates/slides/app/global.css +60 -0
  469. package/corpus/templates/slides/app/hooks/use-agent-generating.ts +76 -5
  470. package/corpus/templates/slides/app/hooks/use-workspace-defaults.ts +26 -0
  471. package/corpus/templates/slides/app/i18n/en-US.ts +39 -3
  472. package/corpus/templates/slides/app/lib/generation-state.ts +13 -3
  473. package/corpus/templates/slides/app/lib/slide-image-replacement.ts +27 -6
  474. package/corpus/templates/slides/app/lib/text-tool-shortcut.ts +62 -0
  475. package/corpus/templates/slides/app/pages/DeckEditor.tsx +197 -83
  476. package/corpus/templates/slides/app/pages/DesignSystems.tsx +95 -0
  477. package/corpus/templates/slides/app/pages/Index.tsx +348 -53
  478. package/corpus/templates/slides/changelog/2026-07-28-pick-an-existing-deck-as-a-style-reference-when-creating-a-n.md +6 -0
  479. package/corpus/templates/slides/changelog/2026-07-29-ai-editing-status-is-now-quieter-and-only-shows-slide-presen.md +6 -0
  480. package/corpus/templates/slides/changelog/2026-07-29-design-systems-and-reference-decks-are-easier-to-choose-toge.md +6 -0
  481. package/corpus/templates/slides/changelog/2026-07-29-generated-decks-now-receive-a-concise-relevant-title-before-.md +6 -0
  482. package/corpus/templates/slides/changelog/2026-07-29-google-slides-exports-can-connect-your-google-account-direct.md +6 -0
  483. package/corpus/templates/slides/changelog/2026-07-29-new-deck-prompts-reuse-empty-chats.md +6 -0
  484. package/corpus/templates/slides/changelog/2026-07-29-new-deck-setup-now-stays-in-the-editor-with-closable-style-a.md +6 -0
  485. package/corpus/templates/slides/changelog/2026-07-29-selected-words-and-text-runs-can-now-be-styled-independently.md +6 -0
  486. package/corpus/templates/slides/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  487. package/corpus/templates/slides/changelog/2026-07-29-slide-annotation-tools-are-clearer-and-escape-now-exits-anno.md +6 -0
  488. package/corpus/templates/slides/changelog/2026-07-29-slide-editing-now-opens-with-the-app-navigation-collapsed-fo.md +6 -0
  489. package/corpus/templates/slides/changelog/2026-07-29-slide-editing-stays-visually-clean-on-hover-without-a-canvas.md +6 -0
  490. package/corpus/templates/slides/changelog/2026-07-29-slides-now-appear-one-by-one-while-ai-builds-a-deck-with-ste.md +6 -0
  491. package/corpus/templates/slides/changelog/2026-07-29-text-boxes-now-select-move-duplicate-resize-and-style-like-a.md +6 -0
  492. package/corpus/templates/slides/changelog/2026-07-29-untitled-decks-now-use-a-clearer-this-deck-label-in-the-agen.md +6 -0
  493. package/corpus/templates/slides/server/handlers/google-docs-auth.ts +4 -2
  494. package/corpus/templates/slides/server/handlers/image-providers/builder.ts +305 -0
  495. package/corpus/templates/slides/server/handlers/image-providers/index.ts +6 -3
  496. package/corpus/templates/slides/server/plugins/agent-chat.ts +1 -0
  497. package/corpus/templates/slides/server/workspace-defaults.ts +169 -0
  498. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  499. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +31 -8
  500. package/corpus/templates/tasks/app/i18n/en-US.ts +7 -0
  501. package/corpus/templates/tasks/app/routes/settings.tsx +25 -2
  502. package/corpus/templates/tasks/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  503. package/corpus/toolkit/CHANGELOG.md +15 -0
  504. package/corpus/toolkit/README.md +2 -2
  505. package/corpus/toolkit/package.json +1 -1
  506. package/corpus/toolkit/src/app-shell/sidebar-footer-actions.tsx +0 -3
  507. package/corpus/toolkit/src/chat-history.css +1 -0
  508. package/corpus/toolkit/src/composer/ComposerPlusMenu.tsx +35 -14
  509. package/corpus/toolkit/src/composer/PromptComposer.tsx +6 -0
  510. package/corpus/toolkit/src/composer/TiptapComposer.tsx +11 -3
  511. package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +64 -11
  512. package/dist/a2a/types.d.ts +6 -0
  513. package/dist/a2a/types.d.ts.map +1 -1
  514. package/dist/a2a/types.js.map +1 -1
  515. package/dist/action.d.ts +57 -0
  516. package/dist/action.d.ts.map +1 -1
  517. package/dist/action.js +9 -0
  518. package/dist/action.js.map +1 -1
  519. package/dist/agent/engine/builder-engine.js +6 -4
  520. package/dist/agent/engine/builder-engine.js.map +1 -1
  521. package/dist/agent/production-agent.d.ts +11 -1
  522. package/dist/agent/production-agent.d.ts.map +1 -1
  523. package/dist/agent/production-agent.js +131 -90
  524. package/dist/agent/production-agent.js.map +1 -1
  525. package/dist/agent/tool-search.d.ts +4 -0
  526. package/dist/agent/tool-search.d.ts.map +1 -1
  527. package/dist/agent/tool-search.js +30 -0
  528. package/dist/agent/tool-search.js.map +1 -1
  529. package/dist/automations/service.d.ts +85 -0
  530. package/dist/automations/service.d.ts.map +1 -0
  531. package/dist/automations/service.js +332 -0
  532. package/dist/automations/service.js.map +1 -0
  533. package/dist/browser-context/index.d.ts +579 -0
  534. package/dist/browser-context/index.d.ts.map +1 -0
  535. package/dist/browser-context/index.js +331 -0
  536. package/dist/browser-context/index.js.map +1 -0
  537. package/dist/client/AgentPanel.d.ts.map +1 -1
  538. package/dist/client/AgentPanel.js +1 -1
  539. package/dist/client/AgentPanel.js.map +1 -1
  540. package/dist/client/FeedbackButton.d.ts +6 -2
  541. package/dist/client/FeedbackButton.d.ts.map +1 -1
  542. package/dist/client/FeedbackButton.js +20 -3
  543. package/dist/client/FeedbackButton.js.map +1 -1
  544. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  545. package/dist/client/MultiTabAssistantChat.js +19 -2
  546. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  547. package/dist/client/agent-chat.d.ts +15 -0
  548. package/dist/client/agent-chat.d.ts.map +1 -1
  549. package/dist/client/agent-chat.js +13 -3
  550. package/dist/client/agent-chat.js.map +1 -1
  551. package/dist/client/agent-page/AgentJobsTab.d.ts +1 -0
  552. package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -1
  553. package/dist/client/agent-page/AgentJobsTab.js +186 -98
  554. package/dist/client/agent-page/AgentJobsTab.js.map +1 -1
  555. package/dist/client/agent-page/AgentTabsPage.js +4 -4
  556. package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
  557. package/dist/client/agent-page/use-jobs.d.ts +7 -0
  558. package/dist/client/agent-page/use-jobs.d.ts.map +1 -1
  559. package/dist/client/agent-page/use-jobs.js.map +1 -1
  560. package/dist/client/analytics-session.d.ts.map +1 -1
  561. package/dist/client/analytics-session.js +13 -0
  562. package/dist/client/analytics-session.js.map +1 -1
  563. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  564. package/dist/client/extensions/ExtensionViewer.js +29 -6
  565. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  566. package/dist/client/settings/AutomationsSection.d.ts +0 -9
  567. package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
  568. package/dist/client/settings/AutomationsSection.js +9 -168
  569. package/dist/client/settings/AutomationsSection.js.map +1 -1
  570. package/dist/client/settings/SettingsPanel.d.ts +9 -1
  571. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  572. package/dist/client/settings/SettingsPanel.js +19 -11
  573. package/dist/client/settings/SettingsPanel.js.map +1 -1
  574. package/dist/client/settings/index.d.ts +1 -1
  575. package/dist/client/settings/index.d.ts.map +1 -1
  576. package/dist/client/settings/index.js +1 -1
  577. package/dist/client/settings/index.js.map +1 -1
  578. package/dist/client/use-agent-chat.d.ts.map +1 -1
  579. package/dist/client/use-agent-chat.js +20 -3
  580. package/dist/client/use-agent-chat.js.map +1 -1
  581. package/dist/client/use-chat-threads.d.ts.map +1 -1
  582. package/dist/client/use-chat-threads.js +4 -17
  583. package/dist/client/use-chat-threads.js.map +1 -1
  584. package/dist/collab/awareness.d.ts +2 -2
  585. package/dist/collab/awareness.d.ts.map +1 -1
  586. package/dist/collab/struct-routes.d.ts +1 -1
  587. package/dist/deploy/build.d.ts.map +1 -1
  588. package/dist/deploy/build.js +2 -1
  589. package/dist/deploy/build.js.map +1 -1
  590. package/dist/deploy/workspace-deploy.d.ts.map +1 -1
  591. package/dist/deploy/workspace-deploy.js +2 -1
  592. package/dist/deploy/workspace-deploy.js.map +1 -1
  593. package/dist/extensions/actions.d.ts.map +1 -1
  594. package/dist/extensions/actions.js +82 -6
  595. package/dist/extensions/actions.js.map +1 -1
  596. package/dist/extensions/fetch-tool.d.ts.map +1 -1
  597. package/dist/extensions/fetch-tool.js +11 -0
  598. package/dist/extensions/fetch-tool.js.map +1 -1
  599. package/dist/extensions/routes.d.ts +5 -1
  600. package/dist/extensions/routes.d.ts.map +1 -1
  601. package/dist/extensions/routes.js +7 -1
  602. package/dist/extensions/routes.js.map +1 -1
  603. package/dist/extensions/web-content.d.ts +1 -0
  604. package/dist/extensions/web-content.d.ts.map +1 -1
  605. package/dist/extensions/web-content.js +82 -1
  606. package/dist/extensions/web-content.js.map +1 -1
  607. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  608. package/dist/integrations/computer-supervision.d.ts.map +1 -1
  609. package/dist/integrations/computer-supervision.js +22 -1
  610. package/dist/integrations/computer-supervision.js.map +1 -1
  611. package/dist/integrations/index.d.ts +3 -2
  612. package/dist/integrations/index.d.ts.map +1 -1
  613. package/dist/integrations/index.js +3 -2
  614. package/dist/integrations/index.js.map +1 -1
  615. package/dist/integrations/integration-durable-dispatch-config.d.ts +2 -0
  616. package/dist/integrations/integration-durable-dispatch-config.d.ts.map +1 -1
  617. package/dist/integrations/integration-durable-dispatch-config.js +4 -0
  618. package/dist/integrations/integration-durable-dispatch-config.js.map +1 -1
  619. package/dist/integrations/integration-durable-dispatch.d.ts +2 -2
  620. package/dist/integrations/integration-durable-dispatch.d.ts.map +1 -1
  621. package/dist/integrations/integration-durable-dispatch.js +2 -2
  622. package/dist/integrations/integration-durable-dispatch.js.map +1 -1
  623. package/dist/integrations/plugin.d.ts.map +1 -1
  624. package/dist/integrations/plugin.js +84 -39
  625. package/dist/integrations/plugin.js.map +1 -1
  626. package/dist/integrations/remote-browser-actions.d.ts +7 -0
  627. package/dist/integrations/remote-browser-actions.d.ts.map +1 -0
  628. package/dist/integrations/remote-browser-actions.js +482 -0
  629. package/dist/integrations/remote-browser-actions.js.map +1 -0
  630. package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -1
  631. package/dist/jobs/actions/list-recurring-jobs.js +4 -6
  632. package/dist/jobs/actions/list-recurring-jobs.js.map +1 -1
  633. package/dist/jobs/actions/manage-recurring-job.js +3 -6
  634. package/dist/jobs/actions/manage-recurring-job.js.map +1 -1
  635. package/dist/jobs/background-automation-runner.d.ts +76 -0
  636. package/dist/jobs/background-automation-runner.d.ts.map +1 -0
  637. package/dist/jobs/background-automation-runner.js +288 -0
  638. package/dist/jobs/background-automation-runner.js.map +1 -0
  639. package/dist/jobs/frontmatter.d.ts +63 -0
  640. package/dist/jobs/frontmatter.d.ts.map +1 -0
  641. package/dist/jobs/frontmatter.js +216 -0
  642. package/dist/jobs/frontmatter.js.map +1 -0
  643. package/dist/jobs/scheduler.d.ts +6 -60
  644. package/dist/jobs/scheduler.d.ts.map +1 -1
  645. package/dist/jobs/scheduler.js +67 -484
  646. package/dist/jobs/scheduler.js.map +1 -1
  647. package/dist/jobs/tools.d.ts.map +1 -1
  648. package/dist/jobs/tools.js +24 -3
  649. package/dist/jobs/tools.js.map +1 -1
  650. package/dist/localization/default-messages.d.ts +28 -33
  651. package/dist/localization/default-messages.d.ts.map +1 -1
  652. package/dist/localization/default-messages.js +34 -39
  653. package/dist/localization/default-messages.js.map +1 -1
  654. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  655. package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
  656. package/dist/mcp-client/index.d.ts.map +1 -1
  657. package/dist/mcp-client/index.js +4 -0
  658. package/dist/mcp-client/index.js.map +1 -1
  659. package/dist/notifications/actions.d.ts.map +1 -1
  660. package/dist/notifications/actions.js +5 -0
  661. package/dist/notifications/actions.js.map +1 -1
  662. package/dist/notifications/routes.d.ts +3 -3
  663. package/dist/progress/actions.d.ts.map +1 -1
  664. package/dist/progress/actions.js +5 -0
  665. package/dist/progress/actions.js.map +1 -1
  666. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  667. package/dist/provider-api/actions/github-repo-files.d.ts.map +1 -1
  668. package/dist/provider-api/actions/github-repo-files.js +9 -0
  669. package/dist/provider-api/actions/github-repo-files.js.map +1 -1
  670. package/dist/provider-api/actions/provider-api.d.ts +16 -16
  671. package/dist/provider-api/actions/provider-api.d.ts.map +1 -1
  672. package/dist/provider-api/actions/provider-api.js +14 -0
  673. package/dist/provider-api/actions/provider-api.js.map +1 -1
  674. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  675. package/dist/resources/handlers.d.ts +1 -1
  676. package/dist/server/action-discovery.d.ts.map +1 -1
  677. package/dist/server/action-discovery.js +5 -0
  678. package/dist/server/action-discovery.js.map +1 -1
  679. package/dist/server/agent-capabilities.d.ts.map +1 -1
  680. package/dist/server/agent-capabilities.js +32 -3
  681. package/dist/server/agent-capabilities.js.map +1 -1
  682. package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -1
  683. package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
  684. package/dist/server/agent-chat/action-filters-a2a.js +50 -1
  685. package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
  686. package/dist/server/agent-chat/browser-team-tools.d.ts.map +1 -1
  687. package/dist/server/agent-chat/browser-team-tools.js +90 -3
  688. package/dist/server/agent-chat/browser-team-tools.js.map +1 -1
  689. package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
  690. package/dist/server/agent-chat/framework-prompts.js +7 -11
  691. package/dist/server/agent-chat/framework-prompts.js.map +1 -1
  692. package/dist/server/agent-chat/plugin-options.d.ts +3 -3
  693. package/dist/server/agent-chat/plugin-options.js.map +1 -1
  694. package/dist/server/agent-chat/script-entries.d.ts.map +1 -1
  695. package/dist/server/agent-chat/script-entries.js +43 -1
  696. package/dist/server/agent-chat/script-entries.js.map +1 -1
  697. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  698. package/dist/server/agent-chat-plugin.js +24 -5
  699. package/dist/server/agent-chat-plugin.js.map +1 -1
  700. package/dist/server/attribution.d.ts +6 -0
  701. package/dist/server/attribution.d.ts.map +1 -1
  702. package/dist/server/attribution.js +14 -14
  703. package/dist/server/attribution.js.map +1 -1
  704. package/dist/server/auth.d.ts.map +1 -1
  705. package/dist/server/auth.js +5 -2
  706. package/dist/server/auth.js.map +1 -1
  707. package/dist/server/better-auth-instance.d.ts +2 -1
  708. package/dist/server/better-auth-instance.d.ts.map +1 -1
  709. package/dist/server/better-auth-instance.js +6 -3
  710. package/dist/server/better-auth-instance.js.map +1 -1
  711. package/dist/server/core-routes-plugin.d.ts +7 -0
  712. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  713. package/dist/server/core-routes-plugin.js +3 -1
  714. package/dist/server/core-routes-plugin.js.map +1 -1
  715. package/dist/server/csrf.d.ts.map +1 -1
  716. package/dist/server/csrf.js +25 -0
  717. package/dist/server/csrf.js.map +1 -1
  718. package/dist/server/google-oauth.d.ts +3 -0
  719. package/dist/server/google-oauth.d.ts.map +1 -1
  720. package/dist/server/google-oauth.js +12 -1
  721. package/dist/server/google-oauth.js.map +1 -1
  722. package/dist/server/onboarding-html.d.ts.map +1 -1
  723. package/dist/server/onboarding-html.js +18 -0
  724. package/dist/server/onboarding-html.js.map +1 -1
  725. package/dist/server/prompts/framework-core-compact.js +3 -3
  726. package/dist/server/prompts/framework-core-compact.js.map +1 -1
  727. package/dist/server/prompts/framework-core.js +3 -3
  728. package/dist/server/prompts/framework-core.js.map +1 -1
  729. package/dist/server/prompts/shared-rules.js +3 -3
  730. package/dist/server/prompts/shared-rules.js.map +1 -1
  731. package/dist/settings/index.d.ts +1 -1
  732. package/dist/settings/index.d.ts.map +1 -1
  733. package/dist/settings/index.js +1 -1
  734. package/dist/settings/index.js.map +1 -1
  735. package/dist/shared/analytics-anonymous-id.d.ts +12 -0
  736. package/dist/shared/analytics-anonymous-id.d.ts.map +1 -0
  737. package/dist/shared/analytics-anonymous-id.js +29 -0
  738. package/dist/shared/analytics-anonymous-id.js.map +1 -0
  739. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  740. package/dist/templates/chat/app/components/layout/Sidebar.tsx +1 -5
  741. package/dist/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  742. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  743. package/dist/templates/default/app/i18n/ar-SA.ts +26 -0
  744. package/dist/templates/default/app/i18n/de-DE.ts +28 -0
  745. package/dist/templates/default/app/i18n/en-US.ts +27 -0
  746. package/dist/templates/default/app/i18n/es-ES.ts +28 -0
  747. package/dist/templates/default/app/i18n/fr-FR.ts +28 -0
  748. package/dist/templates/default/app/i18n/hi-IN.ts +25 -0
  749. package/dist/templates/default/app/i18n/ja-JP.ts +27 -0
  750. package/dist/templates/default/app/i18n/ko-KR.ts +27 -0
  751. package/dist/templates/default/app/i18n/pt-BR.ts +27 -0
  752. package/dist/templates/default/app/i18n/zh-CN.ts +24 -0
  753. package/dist/templates/default/app/i18n/zh-TW.ts +24 -0
  754. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  755. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  756. package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
  757. package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
  758. package/dist/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
  759. package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
  760. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
  761. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
  762. package/dist/tracking/providers.d.ts.map +1 -1
  763. package/dist/tracking/providers.js +1 -0
  764. package/dist/tracking/providers.js.map +1 -1
  765. package/dist/tracking/registry.d.ts +1 -0
  766. package/dist/tracking/registry.d.ts.map +1 -1
  767. package/dist/tracking/registry.js +1 -0
  768. package/dist/tracking/registry.js.map +1 -1
  769. package/dist/tracking/types.d.ts +1 -0
  770. package/dist/tracking/types.d.ts.map +1 -1
  771. package/dist/tracking/types.js.map +1 -1
  772. package/dist/triggers/actions/list-automations.d.ts +7 -0
  773. package/dist/triggers/actions/list-automations.d.ts.map +1 -1
  774. package/dist/triggers/actions/list-automations.js +29 -41
  775. package/dist/triggers/actions/list-automations.js.map +1 -1
  776. package/dist/triggers/actions/manage-automation.js +15 -33
  777. package/dist/triggers/actions/manage-automation.js.map +1 -1
  778. package/dist/triggers/actions.d.ts.map +1 -1
  779. package/dist/triggers/actions.js +184 -95
  780. package/dist/triggers/actions.js.map +1 -1
  781. package/dist/triggers/dispatcher.d.ts +3 -9
  782. package/dist/triggers/dispatcher.d.ts.map +1 -1
  783. package/dist/triggers/dispatcher.js +134 -304
  784. package/dist/triggers/dispatcher.js.map +1 -1
  785. package/dist/triggers/routes.d.ts.map +1 -1
  786. package/dist/triggers/routes.js +76 -17
  787. package/dist/triggers/routes.js.map +1 -1
  788. package/dist/triggers/types.d.ts +4 -23
  789. package/dist/triggers/types.d.ts.map +1 -1
  790. package/dist/triggers/types.js.map +1 -1
  791. package/docs/content/agent-surfaces.mdx +4 -4
  792. package/docs/content/automations.mdx +61 -12
  793. package/docs/content/deployment.mdx +11 -4
  794. package/docs/content/extensions.mdx +39 -33
  795. package/docs/content/recurring-jobs.mdx +41 -19
  796. package/docs/content/template-dispatch-operations.mdx +19 -7
  797. package/package.json +4 -2
  798. package/src/a2a/types.ts +6 -0
  799. package/src/action.ts +68 -0
  800. package/src/agent/engine/builder-engine.ts +8 -4
  801. package/src/agent/production-agent.ts +175 -100
  802. package/src/agent/tool-search.ts +36 -0
  803. package/src/automations/service.ts +506 -0
  804. package/src/browser-context/index.ts +392 -0
  805. package/src/client/AgentPanel.tsx +2 -1
  806. package/src/client/FeedbackButton.tsx +37 -4
  807. package/src/client/MultiTabAssistantChat.tsx +21 -0
  808. package/src/client/agent-chat.ts +31 -3
  809. package/src/client/agent-page/AgentJobsTab.tsx +438 -310
  810. package/src/client/agent-page/AgentTabsPage.tsx +4 -4
  811. package/src/client/agent-page/use-jobs.ts +7 -0
  812. package/src/client/analytics-session.ts +13 -0
  813. package/src/client/extensions/ExtensionViewer.tsx +67 -0
  814. package/src/client/settings/AutomationsSection.tsx +27 -499
  815. package/src/client/settings/SettingsPanel.tsx +32 -11
  816. package/src/client/settings/index.ts +2 -0
  817. package/src/client/use-agent-chat.ts +35 -3
  818. package/src/client/use-chat-threads.ts +8 -25
  819. package/src/deploy/build.ts +2 -0
  820. package/src/deploy/workspace-deploy.ts +2 -0
  821. package/src/extensions/actions.ts +115 -3
  822. package/src/extensions/fetch-tool.ts +11 -0
  823. package/src/extensions/routes.ts +16 -1
  824. package/src/extensions/web-content.ts +96 -1
  825. package/src/integrations/computer-supervision.ts +33 -1
  826. package/src/integrations/index.ts +6 -0
  827. package/src/integrations/integration-durable-dispatch-config.ts +10 -0
  828. package/src/integrations/integration-durable-dispatch.ts +4 -0
  829. package/src/integrations/plugin.ts +94 -41
  830. package/src/integrations/remote-browser-actions.ts +621 -0
  831. package/src/jobs/actions/list-recurring-jobs.ts +5 -7
  832. package/src/jobs/actions/manage-recurring-job.ts +3 -7
  833. package/src/jobs/background-automation-runner.ts +437 -0
  834. package/src/jobs/frontmatter.ts +308 -0
  835. package/src/jobs/scheduler.ts +89 -598
  836. package/src/jobs/tools.ts +22 -3
  837. package/src/localization/default-messages.ts +45 -45
  838. package/src/mcp-client/index.ts +6 -0
  839. package/src/notifications/actions.ts +5 -0
  840. package/src/progress/actions.ts +5 -0
  841. package/src/provider-api/actions/github-repo-files.ts +11 -0
  842. package/src/provider-api/actions/provider-api.ts +13 -0
  843. package/src/server/__snapshots__/agent-chat-plugin.surface.spec.ts.snap +4 -4
  844. package/src/server/action-discovery.ts +7 -0
  845. package/src/server/agent-capabilities.ts +43 -8
  846. package/src/server/agent-chat/action-filters-a2a.ts +63 -1
  847. package/src/server/agent-chat/browser-team-tools.ts +126 -3
  848. package/src/server/agent-chat/framework-prompts.ts +7 -11
  849. package/src/server/agent-chat/plugin-options.ts +3 -3
  850. package/src/server/agent-chat/script-entries.ts +52 -1
  851. package/src/server/agent-chat-plugin.ts +25 -5
  852. package/src/server/attribution.ts +22 -0
  853. package/src/server/auth.ts +20 -6
  854. package/src/server/better-auth-instance.ts +10 -2
  855. package/src/server/core-routes-plugin.ts +10 -1
  856. package/src/server/csrf.ts +25 -0
  857. package/src/server/google-oauth.ts +21 -1
  858. package/src/server/onboarding-html.ts +18 -0
  859. package/src/server/prompts/framework-core-compact.ts +3 -3
  860. package/src/server/prompts/framework-core.ts +3 -3
  861. package/src/server/prompts/shared-rules.ts +3 -3
  862. package/src/settings/index.ts +1 -0
  863. package/src/shared/analytics-anonymous-id.ts +35 -0
  864. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  865. package/src/templates/chat/app/components/layout/Sidebar.tsx +1 -5
  866. package/src/templates/chat/changelog/2026-07-29-sidebar-footers-now-keep-feedback-search-and-collapse-togeth.md +6 -0
  867. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  868. package/src/templates/default/app/i18n/ar-SA.ts +26 -0
  869. package/src/templates/default/app/i18n/de-DE.ts +28 -0
  870. package/src/templates/default/app/i18n/en-US.ts +27 -0
  871. package/src/templates/default/app/i18n/es-ES.ts +28 -0
  872. package/src/templates/default/app/i18n/fr-FR.ts +28 -0
  873. package/src/templates/default/app/i18n/hi-IN.ts +25 -0
  874. package/src/templates/default/app/i18n/ja-JP.ts +27 -0
  875. package/src/templates/default/app/i18n/ko-KR.ts +27 -0
  876. package/src/templates/default/app/i18n/pt-BR.ts +27 -0
  877. package/src/templates/default/app/i18n/zh-CN.ts +24 -0
  878. package/src/templates/default/app/i18n/zh-TW.ts +24 -0
  879. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  880. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  881. package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +10 -7
  882. package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +53 -8
  883. package/src/templates/workspace-core/.agents/skills/browser-sessions/SKILL.md +131 -0
  884. package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +13 -4
  885. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +23 -15
  886. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +33 -18
  887. package/src/tracking/providers.ts +1 -0
  888. package/src/tracking/registry.ts +2 -1
  889. package/src/tracking/types.ts +1 -0
  890. package/src/triggers/actions/list-automations.ts +43 -44
  891. package/src/triggers/actions/manage-automation.ts +17 -48
  892. package/src/triggers/actions.ts +218 -127
  893. package/src/triggers/dispatcher.ts +181 -367
  894. package/src/triggers/routes.ts +84 -27
  895. package/src/triggers/types.ts +9 -23
@@ -5,128 +5,216 @@ import { useState } from "react";
5
5
  import { AgentAskPopover } from "../AgentAskPopover.js";
6
6
  import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "../components/ui/dialog.js";
7
7
  import { useFormatters, useT } from "../i18n.js";
8
- import { automationCreationContext, AutomationsList, } from "../settings/AutomationsSection.js";
8
+ import { automationCreationContext } from "../settings/AutomationsSection.js";
9
9
  import { AgentEmptyState } from "./AgentEmptyState.js";
10
10
  import { AgentTabFrame } from "./AgentTabFrame.js";
11
- import { useManageRecurringJob, useRecurringJobs, } from "./use-jobs.js";
11
+ import { useAutomations, useManageAutomation, useManageRecurringJob, useRecurringJobs, } from "./use-jobs.js";
12
+ function listRecurringJobs(jobs) {
13
+ return jobs.map((resource) => ({
14
+ kind: "recurring",
15
+ resource,
16
+ triggerType: "schedule",
17
+ }));
18
+ }
19
+ function listAutomations(automations) {
20
+ return automations.map((resource) => ({
21
+ kind: "automation",
22
+ resource,
23
+ triggerType: resource.triggerType,
24
+ }));
25
+ }
26
+ export function organizationAutomationCreationContext() {
27
+ return "The user wants to create a new organization automation. Use manage-automations with action=define and scope=organization to create it. Ask clarifying questions if needed about whether it runs on a schedule or event, any conditions, and what actions to take.";
28
+ }
12
29
  export function AgentJobsTab({ canManageOrg = false }) {
13
30
  const t = useT();
14
- const { formatDate } = useFormatters();
15
- const personalQuery = useRecurringJobs("user");
16
- const organizationQuery = useRecurringJobs("org");
17
- const personalMutation = useManageRecurringJob("user");
18
- const organizationMutation = useManageRecurringJob("org");
31
+ const formatters = useFormatters();
32
+ const personalJobsQuery = useRecurringJobs("user");
33
+ const personalAutomationsQuery = useAutomations("user");
34
+ const organizationJobsQuery = useRecurringJobs("org");
35
+ const organizationAutomationsQuery = useAutomations("org");
36
+ const personalJobsMutation = useManageRecurringJob("user");
37
+ const personalAutomationsMutation = useManageAutomation("user");
38
+ const organizationJobsMutation = useManageRecurringJob("org");
39
+ const organizationAutomationsMutation = useManageAutomation("org");
19
40
  const [deleteTarget, setDeleteTarget] = useState(null);
20
41
  const [detailsTarget, setDetailsTarget] = useState(null);
21
42
  const formatDateTime = (value) => {
22
43
  if (!value || Number.isNaN(new Date(value).getTime()))
23
44
  return null;
24
- return formatDate(value, {
45
+ return formatters.formatDate(value, {
25
46
  month: "short",
26
47
  day: "numeric",
27
48
  hour: "numeric",
28
49
  minute: "2-digit",
29
50
  });
30
51
  };
31
- const renderRecurringSection = (title, scope, query, mutation) => {
32
- const jobs = query.data ?? [];
33
- return (_jsxs("section", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70", children: title }), _jsx("p", { className: "mt-2 max-w-2xl text-sm text-muted-foreground", children: scope === "org"
34
- ? t("jobs.organizationRecurringDescription", {
35
- defaultValue: "Jobs shared with this organization. Members can view them; creators and admins can manage them.",
36
- })
37
- : t("jobs.recurringDescription", {
38
- defaultValue: "Scheduled prompts that ask the agent to do work automatically.",
39
- }) })] }), scope === "org" && !canManageOrg ? (_jsx("span", { className: "text-xs text-muted-foreground", children: t("jobs.organizationMemberNote", {
40
- defaultValue: "You can manage jobs you created.",
41
- }) })) : null] }), query.isLoading ? (_jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", "aria-busy": "true", children: [_jsx(IconLoader2, { className: "size-4 animate-spin" }), t("jobs.loading", { defaultValue: "Loading…" })] })) : query.error ? (_jsx("p", { className: "text-sm text-destructive", children: t("jobs.recurringLoadError", {
42
- defaultValue: "Could not load recurring jobs.",
43
- }) })) : jobs.length === 0 ? (_jsx(AgentEmptyState, { icon: IconCalendarEvent, title: scope === "org"
44
- ? t("jobs.organizationEmptyTitle", {
45
- defaultValue: "No organization jobs yet",
46
- })
47
- : t("jobs.recurringEmptyTitle", {
48
- defaultValue: "No recurring jobs yet",
49
- }), description: scope === "org"
50
- ? t("jobs.organizationEmptyDescription", {
51
- defaultValue: "Describe a shared job for this organization.",
52
- })
53
- : t("jobs.recurringEmptyDescription", {
54
- defaultValue: "Describe what should run and when.",
55
- }), action: _jsx(AgentAskPopover, { context: scope === "org"
56
- ? "The user wants to create an organization recurring job. Create it in the organization jobs resource with the schedule and instructions from their prompt."
57
- : "The user wants to create a personal recurring job. Create it in the personal jobs resource with the schedule and instructions from their prompt.", prompt: scope === "org"
58
- ? t("jobs.organizationPrompt", {
59
- defaultValue: "Create a shared organization job that runs on a schedule and does this: ",
60
- })
61
- : t("jobs.recurringPrompt", {
62
- defaultValue: "Create a recurring job that runs on a schedule and does this: every morning, summarize my inbox.",
63
- }), title: scope === "org"
64
- ? t("jobs.organizationCreateTitle", {
65
- defaultValue: "Create an organization job",
66
- })
67
- : t("jobs.recurringCreateTitle", {
68
- defaultValue: "Create a recurring job",
69
- }) }) })) : (_jsx("div", { className: "divide-y divide-border/60 border-y border-border/60", children: jobs.map((job) => {
70
- const lastRun = formatDateTime(job.lastRun);
71
- const nextRun = formatDateTime(job.nextRun);
72
- return (_jsx("article", { className: "py-4 first:pt-5 last:pb-5", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "mt-0.5 text-muted-foreground", children: _jsx(IconClock, { className: "size-4" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h3", { className: "truncate text-sm font-medium", children: job.name.replace(/-/g, " ") }), _jsx("span", { className: job.enabled
73
- ? "rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-600 dark:text-emerald-400"
74
- : "rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: job.enabled
75
- ? t("jobs.enabled", { defaultValue: "Enabled" })
76
- : t("jobs.paused", { defaultValue: "Paused" }) }), job.lastStatus ? (_jsx("span", { className: "rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: job.lastStatus })) : null] }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: job.scheduleDescription || job.schedule }), _jsx("p", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground/80", children: job.instructions }), lastRun || nextRun ? (_jsxs("div", { className: "mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground", children: [nextRun ? (_jsxs("span", { children: [t("jobs.nextRun", { defaultValue: "Next run" }), ":", " ", nextRun] })) : null, lastRun ? (_jsxs("span", { children: [t("jobs.lastRun", { defaultValue: "Last run" }), ":", " ", lastRun] })) : null] })) : null] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "cursor-pointer px-2 text-xs", onClick: () => setDetailsTarget(job), children: [_jsx(IconEye, { className: "size-3.5" }), t("jobs.details", { defaultValue: "Details" })] }), job.canUpdate ? (_jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "cursor-pointer px-2 text-xs", disabled: mutation.isPending, onClick: () => mutation.mutate({
77
- operation: "update",
78
- name: job.name,
79
- scope: job.scope,
80
- enabled: !job.enabled,
81
- }), children: [job.enabled ? (_jsx(IconPlayerPause, { className: "size-3.5" })) : (_jsx(IconPlayerPlay, { className: "size-3.5" })), job.enabled
82
- ? t("jobs.pause", { defaultValue: "Pause" })
83
- : t("jobs.resume", { defaultValue: "Resume" })] }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8 cursor-pointer text-muted-foreground hover:text-destructive", "aria-label": t("jobs.delete", {
84
- defaultValue: "Delete",
85
- }), onClick: () => setDeleteTarget(job), children: _jsx(IconTrash, { className: "size-3.5" }) })] })) : null] })] }) }, job.id));
86
- }) })), mutation.error ? (_jsx("p", { className: "text-sm text-destructive", children: mutation.error.message ||
87
- t("jobs.recurringUpdateError", {
88
- defaultValue: "Could not update recurring job.",
89
- }) })) : null] }));
52
+ const personalEntries = [
53
+ ...listRecurringJobs(personalJobsQuery.data ?? []),
54
+ ...listAutomations(personalAutomationsQuery.data ?? []),
55
+ ];
56
+ const organizationEntries = [
57
+ ...listRecurringJobs(organizationJobsQuery.data ?? []),
58
+ ...listAutomations(organizationAutomationsQuery.data ?? []),
59
+ ];
60
+ const mutationPending = personalJobsMutation.isPending ||
61
+ personalAutomationsMutation.isPending ||
62
+ organizationJobsMutation.isPending ||
63
+ organizationAutomationsMutation.isPending;
64
+ const mutateEntry = (entry, operation, enabled, onSuccess) => {
65
+ const input = {
66
+ operation,
67
+ name: entry.resource.name,
68
+ scope: entry.resource.scope,
69
+ ...(enabled === undefined ? {} : { enabled }),
70
+ };
71
+ const options = onSuccess ? { onSuccess } : undefined;
72
+ if (entry.kind === "automation") {
73
+ const mutation = entry.resource.scope === "organization"
74
+ ? organizationAutomationsMutation
75
+ : personalAutomationsMutation;
76
+ mutation.mutate(input, options);
77
+ }
78
+ else if (entry.resource.scope === "organization") {
79
+ organizationJobsMutation.mutate(input, options);
80
+ }
81
+ else {
82
+ personalJobsMutation.mutate(input, options);
83
+ }
90
84
  };
91
- const mutationPending = personalMutation.isPending || organizationMutation.isPending;
92
- const deleteMutation = deleteTarget?.scope === "organization"
93
- ? organizationMutation
94
- : personalMutation;
95
- return (_jsxs(AgentTabFrame, { title: t("jobs.pageTitle", { defaultValue: "Jobs" }), description: t("jobs.pageDescription", {
96
- defaultValue: "See recurring jobs and automations that run work for you.",
97
- }), children: [_jsxs("div", { className: "space-y-7", children: [renderRecurringSection("Personal", "user", personalQuery, personalMutation), renderRecurringSection("Organization", "org", organizationQuery, organizationMutation), _jsxs("section", { className: "space-y-4 border-t border-border/70 pt-6", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70", children: t("jobs.automationsTitle", { defaultValue: "Automations" }) }), _jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: t("jobs.automationsDescription", {
98
- defaultValue: "Event-triggered and scheduled agent tasks managed from one place.",
99
- }) })] }), _jsx(AutomationsList, { scope: "user", emptyState: _jsx(AgentEmptyState, { icon: IconBolt, title: t("jobs.automationsEmptyTitle", {
100
- defaultValue: "No automations yet",
101
- }), description: t("jobs.automationsEmptyDescription", {
102
- defaultValue: "Describe what should happen and when.",
103
- }), action: _jsx(AgentAskPopover, { context: automationCreationContext(), prompt: t("jobs.automationPrompt", {
104
- defaultValue: "Create an automation that does this: ",
105
- }), title: t("jobs.automationsCreateTitle", {
106
- defaultValue: "Create an automation",
107
- }) }) }) })] })] }), _jsx(Dialog, { open: deleteTarget !== null, onOpenChange: (open) => {
85
+ const renderSection = ({ title, description, entries, loading, errors, organization = false, }) => (_jsxs("section", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-wrap items-end justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70", children: title }), _jsx("p", { className: "mt-2 max-w-2xl text-sm text-muted-foreground", children: description })] }), organization ? (_jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [!canManageOrg ? (_jsx("span", { className: "text-xs text-muted-foreground", children: t("jobs.organizationMemberNote", {
86
+ defaultValue: "You can manage automations you created.",
87
+ }) })) : null, _jsx(AgentAskPopover, { context: organizationAutomationCreationContext(), prompt: t("jobs.organizationPrompt", {
88
+ defaultValue: "Create a shared organization automation that does this: ",
89
+ }), title: t("jobs.automationsCreateTitle", {
90
+ defaultValue: "Create an automation",
91
+ }), label: t("jobs.newAutomation", {
92
+ defaultValue: "New automation",
93
+ }) })] })) : null] }), errors.length > 0 ? (_jsx("p", { className: "text-sm text-destructive", children: t("jobs.loadError", {
94
+ defaultValue: "Could not load all automations.",
95
+ }) })) : null, loading && entries.length === 0 ? (_jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", "aria-busy": "true", children: [_jsx(IconLoader2, { className: "size-4 animate-spin" }), t("jobs.loading", { defaultValue: "Loading…" })] })) : entries.length === 0 && errors.length === 0 ? (_jsx(AgentEmptyState, { icon: IconCalendarEvent, title: organization
96
+ ? t("jobs.organizationEmptyTitle", {
97
+ defaultValue: "No organization automations yet",
98
+ })
99
+ : t("jobs.automationsEmptyTitle", {
100
+ defaultValue: "No automations yet",
101
+ }), description: organization
102
+ ? t("jobs.organizationEmptyDescription", {
103
+ defaultValue: "Describe a scheduled or event-triggered automation for this organization.",
104
+ })
105
+ : t("jobs.automationsEmptyDescription", {
106
+ defaultValue: "Describe what should happen and when.",
107
+ }), action: organization ? null : (_jsx(AgentAskPopover, { context: automationCreationContext(), prompt: t("jobs.automationPrompt", {
108
+ defaultValue: "Create an automation that does this: ",
109
+ }), title: t("jobs.automationsCreateTitle", {
110
+ defaultValue: "Create an automation",
111
+ }) })) })) : (_jsx("div", { className: "divide-y divide-border/60 border-y border-border/60", children: entries.map((entry) => {
112
+ const resource = entry.resource;
113
+ const lastRun = formatDateTime(resource.lastRun);
114
+ const nextRun = formatDateTime(resource.nextRun);
115
+ const triggerDescription = entry.kind === "automation" && entry.triggerType === "event"
116
+ ? t("jobs.automationEventTrigger", {
117
+ defaultValue: "On {{event}}",
118
+ event: entry.resource.event ?? "event",
119
+ })
120
+ : resource.scheduleDescription ||
121
+ resource.schedule ||
122
+ t("jobs.scheduledTrigger", {
123
+ defaultValue: "Scheduled",
124
+ });
125
+ const instructions = entry.kind === "automation"
126
+ ? entry.resource.body
127
+ : entry.resource.instructions;
128
+ return (_jsx("article", { className: "py-4 first:pt-5 last:pb-5", children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "mt-0.5 text-muted-foreground", children: entry.triggerType === "event" ? (_jsx(IconBolt, { className: "size-4" })) : (_jsx(IconClock, { className: "size-4" })) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("h3", { className: "truncate text-sm font-medium", children: resource.name.replace(/-/g, " ") }), _jsx("span", { className: "rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: entry.triggerType === "event"
129
+ ? t("jobs.eventTrigger", {
130
+ defaultValue: "Event-triggered",
131
+ })
132
+ : t("jobs.scheduledTrigger", {
133
+ defaultValue: "Scheduled",
134
+ }) }), _jsx("span", { className: resource.enabled
135
+ ? "rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-600 dark:text-emerald-400"
136
+ : "rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: resource.enabled
137
+ ? t("jobs.enabled", { defaultValue: "Enabled" })
138
+ : t("jobs.paused", { defaultValue: "Paused" }) }), resource.lastStatus ? (_jsx("span", { className: "rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground", children: resource.lastStatus })) : null] }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: triggerDescription }), _jsx("p", { className: "mt-1 line-clamp-2 text-xs text-muted-foreground/80", children: instructions }), lastRun || nextRun ? (_jsxs("div", { className: "mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground", children: [nextRun ? (_jsxs("span", { children: [t("jobs.nextRun", { defaultValue: "Next run" }), ":", " ", nextRun] })) : null, lastRun ? (_jsxs("span", { children: [t("jobs.lastRun", { defaultValue: "Last run" }), ":", " ", lastRun] })) : null] })) : null] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "cursor-pointer px-2 text-xs", onClick: () => setDetailsTarget(entry), children: [_jsx(IconEye, { className: "size-3.5" }), t("jobs.details", { defaultValue: "Details" })] }), resource.canUpdate ? (_jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "cursor-pointer px-2 text-xs", disabled: mutationPending, onClick: () => mutateEntry(entry, "update", !resource.enabled), children: [resource.enabled ? (_jsx(IconPlayerPause, { className: "size-3.5" })) : (_jsx(IconPlayerPlay, { className: "size-3.5" })), resource.enabled
139
+ ? t("jobs.pause", { defaultValue: "Pause" })
140
+ : t("jobs.resume", { defaultValue: "Resume" })] }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8 cursor-pointer text-muted-foreground hover:text-destructive", "aria-label": t("jobs.delete", {
141
+ defaultValue: "Delete",
142
+ }), onClick: () => setDeleteTarget(entry), children: _jsx(IconTrash, { className: "size-3.5" }) })] })) : null] })] }) }, `${entry.kind}:${resource.id}`));
143
+ }) }))] }));
144
+ const mutationError = personalJobsMutation.error ||
145
+ personalAutomationsMutation.error ||
146
+ organizationJobsMutation.error ||
147
+ organizationAutomationsMutation.error;
148
+ return (_jsxs(AgentTabFrame, { title: t("jobs.pageTitle", { defaultValue: "Automations" }), description: t("jobs.pageDescription", {
149
+ defaultValue: "Manage agent tasks that run on a schedule or in response to events.",
150
+ }), actions: _jsx(AgentAskPopover, { context: automationCreationContext(), prompt: t("jobs.automationPrompt", {
151
+ defaultValue: "Create an automation that does this: ",
152
+ }), title: t("jobs.automationsCreateTitle", {
153
+ defaultValue: "Create an automation",
154
+ }), label: t("jobs.newAutomation", {
155
+ defaultValue: "New automation",
156
+ }) }), children: [_jsxs("div", { className: "space-y-7", children: [renderSection({
157
+ title: t("jobs.personal", { defaultValue: "Personal" }),
158
+ description: t("jobs.personalDescription", {
159
+ defaultValue: "Scheduled and event-triggered automations that run for you.",
160
+ }),
161
+ entries: personalEntries,
162
+ loading: personalJobsQuery.isLoading || personalAutomationsQuery.isLoading,
163
+ errors: [
164
+ personalJobsQuery.error,
165
+ personalAutomationsQuery.error,
166
+ ].filter(Boolean),
167
+ }), _jsx("div", { className: "border-t border-border/70 pt-6", children: renderSection({
168
+ title: t("jobs.organization", { defaultValue: "Organization" }),
169
+ description: t("jobs.organizationDescription", {
170
+ defaultValue: "Scheduled and event-triggered automations shared with this organization.",
171
+ }),
172
+ entries: organizationEntries,
173
+ loading: organizationJobsQuery.isLoading ||
174
+ organizationAutomationsQuery.isLoading,
175
+ errors: [
176
+ organizationJobsQuery.error,
177
+ organizationAutomationsQuery.error,
178
+ ].filter(Boolean),
179
+ organization: true,
180
+ }) }), mutationError ? (_jsx("p", { className: "text-sm text-destructive", children: mutationError.message ||
181
+ t("jobs.updateError", {
182
+ defaultValue: "Could not update automation.",
183
+ }) })) : null] }), _jsx(Dialog, { open: deleteTarget !== null, onOpenChange: (open) => {
108
184
  if (!open && !mutationPending)
109
185
  setDeleteTarget(null);
110
- }, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: t("jobs.deleteRecurringTitle", {
111
- defaultValue: "Delete recurring job?",
112
- }) }), _jsx(DialogDescription, { children: t("jobs.deleteRecurringDescription", {
113
- defaultValue: "This permanently removes the job and cannot be undone.",
186
+ }, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: t("jobs.deleteAutomationTitle", {
187
+ defaultValue: "Delete automation?",
188
+ }) }), _jsx(DialogDescription, { children: t("jobs.deleteAutomationDescription", {
189
+ defaultValue: "This permanently removes the automation and cannot be undone.",
114
190
  }) })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "outline", className: "cursor-pointer", disabled: mutationPending, onClick: () => setDeleteTarget(null), children: t("jobs.cancel", { defaultValue: "Cancel" }) }), _jsxs(Button, { type: "button", variant: "destructive", className: "cursor-pointer", disabled: mutationPending, onClick: () => {
115
191
  if (!deleteTarget)
116
192
  return;
117
- deleteMutation.mutate({
118
- operation: "delete",
119
- name: deleteTarget.name,
120
- scope: deleteTarget.scope,
121
- }, { onSuccess: () => setDeleteTarget(null) });
193
+ mutateEntry(deleteTarget, "delete", undefined, () => setDeleteTarget(null));
122
194
  }, children: [mutationPending ? (_jsx(IconLoader2, { className: "size-4 animate-spin" })) : null, t("jobs.delete", { defaultValue: "Delete" })] })] })] }) }), _jsx(Dialog, { open: detailsTarget !== null, onOpenChange: (open) => {
123
195
  if (!open)
124
196
  setDetailsTarget(null);
125
- }, children: _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: detailsTarget?.name.replace(/-/g, " ") ??
126
- t("jobs.recurringDetails", {
127
- defaultValue: "Recurring job details",
128
- }) }), _jsx(DialogDescription, { children: detailsTarget?.scheduleDescription || detailsTarget?.schedule })] }), detailsTarget ? (_jsxs("div", { children: [_jsx("p", { className: "text-xs font-medium text-foreground", children: t("jobs.instructions", { defaultValue: "Instructions" }) }), _jsx("p", { className: "mt-1 whitespace-pre-wrap text-sm text-muted-foreground", children: detailsTarget.instructions }), detailsTarget.mcpTools.length > 0 ? (_jsxs("div", { className: "mt-4", children: [_jsx("p", { className: "text-xs font-medium text-foreground", children: t("jobs.mcpTools", {
197
+ }, children: _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: detailsTarget?.resource.name.replace(/-/g, " ") ??
198
+ t("jobs.automationDetails", {
199
+ defaultValue: "Automation details",
200
+ }) }), _jsx(DialogDescription, { children: detailsTarget
201
+ ? detailsTarget.triggerType === "event"
202
+ ? t("jobs.automationEventDetails", {
203
+ defaultValue: "Runs when {{event}}.",
204
+ event: detailsTarget.kind === "automation"
205
+ ? (detailsTarget.resource.event ?? "an event fires")
206
+ : "an event fires",
207
+ })
208
+ : detailsTarget.resource.scheduleDescription ||
209
+ detailsTarget.resource.schedule ||
210
+ t("jobs.scheduledTrigger", {
211
+ defaultValue: "Scheduled",
212
+ })
213
+ : null })] }), detailsTarget ? (_jsxs("div", { className: "space-y-3", children: [detailsTarget.kind === "automation" &&
214
+ detailsTarget.resource.condition ? (_jsxs("div", { children: [_jsx("p", { className: "text-xs font-medium text-foreground", children: t("jobs.condition", { defaultValue: "Condition" }) }), _jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: detailsTarget.resource.condition })] })) : null, _jsxs("div", { children: [_jsx("p", { className: "text-xs font-medium text-foreground", children: t("jobs.instructions", { defaultValue: "Instructions" }) }), _jsx("p", { className: "mt-1 whitespace-pre-wrap text-sm text-muted-foreground", children: detailsTarget.kind === "automation"
215
+ ? detailsTarget.resource.body
216
+ : detailsTarget.resource.instructions })] }), (detailsTarget.resource.mcpTools ?? []).length > 0 ? (_jsxs("div", { children: [_jsx("p", { className: "text-xs font-medium text-foreground", children: t("jobs.mcpTools", {
129
217
  defaultValue: "Connected MCP tools",
130
- }) }), _jsx("div", { className: "mt-1 flex flex-wrap gap-1.5", children: detailsTarget.mcpTools.map((toolName) => (_jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: toolName }, toolName))) })] })) : null] })) : null] }) })] }));
218
+ }) }), _jsx("div", { className: "mt-1 flex flex-wrap gap-1.5", children: (detailsTarget.resource.mcpTools ?? []).map((toolName) => (_jsx("code", { className: "rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: toolName }, toolName))) })] })) : null] })) : null] }) })] }));
131
219
  }
132
220
  //# sourceMappingURL=AgentJobsTab.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AgentJobsTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentJobsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EACL,yBAAyB,EACzB,eAAe,GAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,YAAY,CAAC,EAAE,YAAY,GAAG,KAAK,EAAqB;IACtE,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IACvC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CA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eAEE,SAAS,EAAC,kEAAkE,YAE3E,QAAQ,IAHJ,QAAQ,CAIR,CACR,CAAC,GACE,IACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACM,GACT,IACK,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import { Button } from \"@agent-native/toolkit/ui/button\";\nimport {\n IconBolt,\n IconCalendarEvent,\n IconClock,\n IconEye,\n IconLoader2,\n IconPlayerPause,\n IconPlayerPlay,\n IconTrash,\n} from \"@tabler/icons-react\";\nimport { useState } from \"react\";\n\nimport { AgentAskPopover } from \"../AgentAskPopover.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport { useFormatters, useT } from \"../i18n.js\";\nimport {\n automationCreationContext,\n AutomationsList,\n} from \"../settings/AutomationsSection.js\";\nimport { AgentEmptyState } from \"./AgentEmptyState.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\nimport {\n useManageRecurringJob,\n useRecurringJobs,\n type RecurringJob,\n} from \"./use-jobs.js\";\n\nexport function AgentJobsTab({ canManageOrg = false }: AgentPageTabProps) {\n const t = useT();\n const { formatDate } = useFormatters();\n const personalQuery = useRecurringJobs(\"user\");\n const organizationQuery = useRecurringJobs(\"org\");\n const personalMutation = useManageRecurringJob(\"user\");\n const organizationMutation = useManageRecurringJob(\"org\");\n const [deleteTarget, setDeleteTarget] = useState<RecurringJob | null>(null);\n const [detailsTarget, setDetailsTarget] = useState<RecurringJob | null>(null);\n\n const formatDateTime = (value: string | null) => {\n if (!value || Number.isNaN(new Date(value).getTime())) return null;\n return formatDate(value, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n };\n\n const renderRecurringSection = (\n title: string,\n scope: \"user\" | \"org\",\n query: ReturnType<typeof useRecurringJobs>,\n mutation: ReturnType<typeof useManageRecurringJob>,\n ) => {\n const jobs = query.data ?? [];\n return (\n <section className=\"space-y-4\">\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"min-w-0\">\n <h2 className=\"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70\">\n {title}\n </h2>\n <p className=\"mt-2 max-w-2xl text-sm text-muted-foreground\">\n {scope === \"org\"\n ? t(\"jobs.organizationRecurringDescription\", {\n defaultValue:\n \"Jobs shared with this organization. Members can view them; creators and admins can manage them.\",\n })\n : t(\"jobs.recurringDescription\", {\n defaultValue:\n \"Scheduled prompts that ask the agent to do work automatically.\",\n })}\n </p>\n </div>\n {scope === \"org\" && !canManageOrg ? (\n <span className=\"text-xs text-muted-foreground\">\n {t(\"jobs.organizationMemberNote\", {\n defaultValue: \"You can manage jobs you created.\",\n })}\n </span>\n ) : null}\n </div>\n\n {query.isLoading ? (\n <div\n className=\"flex items-center gap-2 text-sm text-muted-foreground\"\n aria-busy=\"true\"\n >\n <IconLoader2 className=\"size-4 animate-spin\" />\n {t(\"jobs.loading\", { defaultValue: \"Loading…\" })}\n </div>\n ) : query.error ? (\n <p className=\"text-sm text-destructive\">\n {t(\"jobs.recurringLoadError\", {\n defaultValue: \"Could not load recurring jobs.\",\n })}\n </p>\n ) : jobs.length === 0 ? (\n <AgentEmptyState\n icon={IconCalendarEvent}\n title={\n scope === \"org\"\n ? t(\"jobs.organizationEmptyTitle\", {\n defaultValue: \"No organization jobs yet\",\n })\n : t(\"jobs.recurringEmptyTitle\", {\n defaultValue: \"No recurring jobs yet\",\n })\n }\n description={\n scope === \"org\"\n ? t(\"jobs.organizationEmptyDescription\", {\n defaultValue:\n \"Describe a shared job for this organization.\",\n })\n : t(\"jobs.recurringEmptyDescription\", {\n defaultValue: \"Describe what should run and when.\",\n })\n }\n action={\n <AgentAskPopover\n context={\n scope === \"org\"\n ? \"The user wants to create an organization recurring job. Create it in the organization jobs resource with the schedule and instructions from their prompt.\"\n : \"The user wants to create a personal recurring job. Create it in the personal jobs resource with the schedule and instructions from their prompt.\"\n }\n prompt={\n scope === \"org\"\n ? t(\"jobs.organizationPrompt\", {\n defaultValue:\n \"Create a shared organization job that runs on a schedule and does this: \",\n })\n : t(\"jobs.recurringPrompt\", {\n defaultValue:\n \"Create a recurring job that runs on a schedule and does this: every morning, summarize my inbox.\",\n })\n }\n title={\n scope === \"org\"\n ? t(\"jobs.organizationCreateTitle\", {\n defaultValue: \"Create an organization job\",\n })\n : t(\"jobs.recurringCreateTitle\", {\n defaultValue: \"Create a recurring job\",\n })\n }\n />\n }\n />\n ) : (\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {jobs.map((job) => {\n const lastRun = formatDateTime(job.lastRun);\n const nextRun = formatDateTime(job.nextRun);\n return (\n <article key={job.id} className=\"py-4 first:pt-5 last:pb-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"mt-0.5 text-muted-foreground\">\n <IconClock className=\"size-4\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <h3 className=\"truncate text-sm font-medium\">\n {job.name.replace(/-/g, \" \")}\n </h3>\n <span\n className={\n job.enabled\n ? \"rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-600 dark:text-emerald-400\"\n : \"rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground\"\n }\n >\n {job.enabled\n ? t(\"jobs.enabled\", { defaultValue: \"Enabled\" })\n : t(\"jobs.paused\", { defaultValue: \"Paused\" })}\n </span>\n {job.lastStatus ? (\n <span className=\"rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground\">\n {job.lastStatus}\n </span>\n ) : null}\n </div>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n {job.scheduleDescription || job.schedule}\n </p>\n <p className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {job.instructions}\n </p>\n {lastRun || nextRun ? (\n <div className=\"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground\">\n {nextRun ? (\n <span>\n {t(\"jobs.nextRun\", { defaultValue: \"Next run\" })}:{\" \"}\n {nextRun}\n </span>\n ) : null}\n {lastRun ? (\n <span>\n {t(\"jobs.lastRun\", { defaultValue: \"Last run\" })}:{\" \"}\n {lastRun}\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"cursor-pointer px-2 text-xs\"\n onClick={() => setDetailsTarget(job)}\n >\n <IconEye className=\"size-3.5\" />\n {t(\"jobs.details\", { defaultValue: \"Details\" })}\n </Button>\n {job.canUpdate ? (\n <>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"cursor-pointer px-2 text-xs\"\n disabled={mutation.isPending}\n onClick={() =>\n mutation.mutate({\n operation: \"update\",\n name: job.name,\n scope: job.scope,\n enabled: !job.enabled,\n })\n }\n >\n {job.enabled ? (\n <IconPlayerPause className=\"size-3.5\" />\n ) : (\n <IconPlayerPlay className=\"size-3.5\" />\n )}\n {job.enabled\n ? t(\"jobs.pause\", { defaultValue: \"Pause\" })\n : t(\"jobs.resume\", { defaultValue: \"Resume\" })}\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"size-8 cursor-pointer text-muted-foreground hover:text-destructive\"\n aria-label={t(\"jobs.delete\", {\n defaultValue: \"Delete\",\n })}\n onClick={() => setDeleteTarget(job)}\n >\n <IconTrash className=\"size-3.5\" />\n </Button>\n </>\n ) : null}\n </div>\n </div>\n </article>\n );\n })}\n </div>\n )}\n {mutation.error ? (\n <p className=\"text-sm text-destructive\">\n {mutation.error.message ||\n t(\"jobs.recurringUpdateError\", {\n defaultValue: \"Could not update recurring job.\",\n })}\n </p>\n ) : null}\n </section>\n );\n };\n\n const mutationPending =\n personalMutation.isPending || organizationMutation.isPending;\n const deleteMutation =\n deleteTarget?.scope === \"organization\"\n ? organizationMutation\n : personalMutation;\n\n return (\n <AgentTabFrame\n title={t(\"jobs.pageTitle\", { defaultValue: \"Jobs\" })}\n description={t(\"jobs.pageDescription\", {\n defaultValue:\n \"See recurring jobs and automations that run work for you.\",\n })}\n >\n <div className=\"space-y-7\">\n {renderRecurringSection(\n \"Personal\",\n \"user\",\n personalQuery,\n personalMutation,\n )}\n {renderRecurringSection(\n \"Organization\",\n \"org\",\n organizationQuery,\n organizationMutation,\n )}\n\n <section className=\"space-y-4 border-t border-border/70 pt-6\">\n <div>\n <h2 className=\"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70\">\n {t(\"jobs.automationsTitle\", { defaultValue: \"Automations\" })}\n </h2>\n <p className=\"mt-2 text-sm text-muted-foreground\">\n {t(\"jobs.automationsDescription\", {\n defaultValue:\n \"Event-triggered and scheduled agent tasks managed from one place.\",\n })}\n </p>\n </div>\n <AutomationsList\n scope=\"user\"\n emptyState={\n <AgentEmptyState\n icon={IconBolt}\n title={t(\"jobs.automationsEmptyTitle\", {\n defaultValue: \"No automations yet\",\n })}\n description={t(\"jobs.automationsEmptyDescription\", {\n defaultValue: \"Describe what should happen and when.\",\n })}\n action={\n <AgentAskPopover\n context={automationCreationContext()}\n prompt={t(\"jobs.automationPrompt\", {\n defaultValue: \"Create an automation that does this: \",\n })}\n title={t(\"jobs.automationsCreateTitle\", {\n defaultValue: \"Create an automation\",\n })}\n />\n }\n />\n }\n />\n </section>\n </div>\n\n <Dialog\n open={deleteTarget !== null}\n onOpenChange={(open) => {\n if (!open && !mutationPending) setDeleteTarget(null);\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>\n {t(\"jobs.deleteRecurringTitle\", {\n defaultValue: \"Delete recurring job?\",\n })}\n </DialogTitle>\n <DialogDescription>\n {t(\"jobs.deleteRecurringDescription\", {\n defaultValue:\n \"This permanently removes the job and cannot be undone.\",\n })}\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"cursor-pointer\"\n disabled={mutationPending}\n onClick={() => setDeleteTarget(null)}\n >\n {t(\"jobs.cancel\", { defaultValue: \"Cancel\" })}\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n className=\"cursor-pointer\"\n disabled={mutationPending}\n onClick={() => {\n if (!deleteTarget) return;\n deleteMutation.mutate(\n {\n operation: \"delete\",\n name: deleteTarget.name,\n scope: deleteTarget.scope,\n },\n { onSuccess: () => setDeleteTarget(null) },\n );\n }}\n >\n {mutationPending ? (\n <IconLoader2 className=\"size-4 animate-spin\" />\n ) : null}\n {t(\"jobs.delete\", { defaultValue: \"Delete\" })}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n\n <Dialog\n open={detailsTarget !== null}\n onOpenChange={(open) => {\n if (!open) setDetailsTarget(null);\n }}\n >\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>\n {detailsTarget?.name.replace(/-/g, \" \") ??\n t(\"jobs.recurringDetails\", {\n defaultValue: \"Recurring job details\",\n })}\n </DialogTitle>\n <DialogDescription>\n {detailsTarget?.scheduleDescription || detailsTarget?.schedule}\n </DialogDescription>\n </DialogHeader>\n {detailsTarget ? (\n <div>\n <p className=\"text-xs font-medium text-foreground\">\n {t(\"jobs.instructions\", { defaultValue: \"Instructions\" })}\n </p>\n <p className=\"mt-1 whitespace-pre-wrap text-sm text-muted-foreground\">\n {detailsTarget.instructions}\n </p>\n {detailsTarget.mcpTools.length > 0 ? (\n <div className=\"mt-4\">\n <p className=\"text-xs font-medium text-foreground\">\n {t(\"jobs.mcpTools\", {\n defaultValue: \"Connected MCP tools\",\n })}\n </p>\n <div className=\"mt-1 flex flex-wrap gap-1.5\">\n {detailsTarget.mcpTools.map((toolName) => (\n <code\n key={toolName}\n className=\"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground\"\n >\n {toolName}\n </code>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n ) : null}\n </DialogContent>\n </Dialog>\n </AgentTabFrame>\n );\n}\n"]}
1
+ {"version":3,"file":"AgentJobsTab.js","sourceRoot":"","sources":["../../../src/client/agent-page/AgentJobsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,WAAW,EACX,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GAGjB,MAAM,eAAe,CAAC;AAcvB,SAAS,iBAAiB,CAAC,IAAoB;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAI,EAAE,WAAW;QACjB,QAAQ;QACR,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,SAAS,eAAe,CAAC,WAAyB;IAChD,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACpC,IAAI,EAAE,YAAY;QAClB,QAAQ;QACR,WAAW,EAAE,QAAQ,CAAC,WAAW;KAClC,CAAC,C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A,EACJ,cAAK,SAAS,EAAC,6BAA6B,YACzC,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CACzD,eAEE,SAAS,EAAC,kEAAkE,YAE3E,QAAQ,IAHJ,QAAQ,CAIR,CACR,CAAC,GACE,IACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACM,GACT,IACK,CACjB,CAAC;AACJ,CAAC","sourcesContent":["import { Button } from \"@agent-native/toolkit/ui/button\";\nimport {\n IconBolt,\n IconCalendarEvent,\n IconClock,\n IconEye,\n IconLoader2,\n IconPlayerPause,\n IconPlayerPlay,\n IconTrash,\n} from \"@tabler/icons-react\";\nimport { useState } from \"react\";\n\nimport { AgentAskPopover } from \"../AgentAskPopover.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../components/ui/dialog.js\";\nimport { useFormatters, useT } from \"../i18n.js\";\nimport { automationCreationContext } from \"../settings/AutomationsSection.js\";\nimport { AgentEmptyState } from \"./AgentEmptyState.js\";\nimport { AgentTabFrame } from \"./AgentTabFrame.js\";\nimport type { AgentPageTabProps } from \"./types.js\";\nimport {\n useAutomations,\n useManageAutomation,\n useManageRecurringJob,\n useRecurringJobs,\n type Automation,\n type RecurringJob,\n} from \"./use-jobs.js\";\n\ntype ListedAutomation =\n | {\n kind: \"recurring\";\n resource: RecurringJob;\n triggerType: \"schedule\";\n }\n | {\n kind: \"automation\";\n resource: Automation;\n triggerType: \"event\" | \"schedule\";\n };\n\nfunction listRecurringJobs(jobs: RecurringJob[]): ListedAutomation[] {\n return jobs.map((resource) => ({\n kind: \"recurring\",\n resource,\n triggerType: \"schedule\",\n }));\n}\n\nfunction listAutomations(automations: Automation[]): ListedAutomation[] {\n return automations.map((resource) => ({\n kind: \"automation\",\n resource,\n triggerType: resource.triggerType,\n }));\n}\n\nexport function organizationAutomationCreationContext(): string {\n return \"The user wants to create a new organization automation. Use manage-automations with action=define and scope=organization to create it. Ask clarifying questions if needed about whether it runs on a schedule or event, any conditions, and what actions to take.\";\n}\n\nexport function AgentJobsTab({ canManageOrg = false }: AgentPageTabProps) {\n const t = useT();\n const formatters = useFormatters();\n const personalJobsQuery = useRecurringJobs(\"user\");\n const personalAutomationsQuery = useAutomations(\"user\");\n const organizationJobsQuery = useRecurringJobs(\"org\");\n const organizationAutomationsQuery = useAutomations(\"org\");\n const personalJobsMutation = useManageRecurringJob(\"user\");\n const personalAutomationsMutation = useManageAutomation(\"user\");\n const organizationJobsMutation = useManageRecurringJob(\"org\");\n const organizationAutomationsMutation = useManageAutomation(\"org\");\n const [deleteTarget, setDeleteTarget] = useState<ListedAutomation | null>(\n null,\n );\n const [detailsTarget, setDetailsTarget] = useState<ListedAutomation | null>(\n null,\n );\n\n const formatDateTime = (value: string | null) => {\n if (!value || Number.isNaN(new Date(value).getTime())) return null;\n return formatters.formatDate(value, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n };\n\n const personalEntries = [\n ...listRecurringJobs(personalJobsQuery.data ?? []),\n ...listAutomations(personalAutomationsQuery.data ?? []),\n ];\n const organizationEntries = [\n ...listRecurringJobs(organizationJobsQuery.data ?? []),\n ...listAutomations(organizationAutomationsQuery.data ?? []),\n ];\n const mutationPending =\n personalJobsMutation.isPending ||\n personalAutomationsMutation.isPending ||\n organizationJobsMutation.isPending ||\n organizationAutomationsMutation.isPending;\n\n const mutateEntry = (\n entry: ListedAutomation,\n operation: \"update\" | \"delete\",\n enabled?: boolean,\n onSuccess?: () => void,\n ) => {\n const input = {\n operation,\n name: entry.resource.name,\n scope: entry.resource.scope,\n ...(enabled === undefined ? {} : { enabled }),\n };\n const options = onSuccess ? { onSuccess } : undefined;\n\n if (entry.kind === \"automation\") {\n const mutation =\n entry.resource.scope === \"organization\"\n ? organizationAutomationsMutation\n : personalAutomationsMutation;\n mutation.mutate(input, options);\n } else if (entry.resource.scope === \"organization\") {\n organizationJobsMutation.mutate(input, options);\n } else {\n personalJobsMutation.mutate(input, options);\n }\n };\n\n const renderSection = ({\n title,\n description,\n entries,\n loading,\n errors,\n organization = false,\n }: {\n title: string;\n description: string;\n entries: ListedAutomation[];\n loading: boolean;\n errors: unknown[];\n organization?: boolean;\n }) => (\n <section className=\"space-y-4\">\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"min-w-0\">\n <h2 className=\"text-xs font-semibold uppercase tracking-[0.14em] text-muted-foreground/70\">\n {title}\n </h2>\n <p className=\"mt-2 max-w-2xl text-sm text-muted-foreground\">\n {description}\n </p>\n </div>\n {organization ? (\n <div className=\"flex flex-wrap items-center justify-end gap-2\">\n {!canManageOrg ? (\n <span className=\"text-xs text-muted-foreground\">\n {t(\"jobs.organizationMemberNote\", {\n defaultValue: \"You can manage automations you created.\",\n })}\n </span>\n ) : null}\n <AgentAskPopover\n context={organizationAutomationCreationContext()}\n prompt={t(\"jobs.organizationPrompt\", {\n defaultValue:\n \"Create a shared organization automation that does this: \",\n })}\n title={t(\"jobs.automationsCreateTitle\", {\n defaultValue: \"Create an automation\",\n })}\n label={t(\"jobs.newAutomation\", {\n defaultValue: \"New automation\",\n })}\n />\n </div>\n ) : null}\n </div>\n\n {errors.length > 0 ? (\n <p className=\"text-sm text-destructive\">\n {t(\"jobs.loadError\", {\n defaultValue: \"Could not load all automations.\",\n })}\n </p>\n ) : null}\n\n {loading && entries.length === 0 ? (\n <div\n className=\"flex items-center gap-2 text-sm text-muted-foreground\"\n aria-busy=\"true\"\n >\n <IconLoader2 className=\"size-4 animate-spin\" />\n {t(\"jobs.loading\", { defaultValue: \"Loading…\" })}\n </div>\n ) : entries.length === 0 && errors.length === 0 ? (\n <AgentEmptyState\n icon={IconCalendarEvent}\n title={\n organization\n ? t(\"jobs.organizationEmptyTitle\", {\n defaultValue: \"No organization automations yet\",\n })\n : t(\"jobs.automationsEmptyTitle\", {\n defaultValue: \"No automations yet\",\n })\n }\n description={\n organization\n ? t(\"jobs.organizationEmptyDescription\", {\n defaultValue:\n \"Describe a scheduled or event-triggered automation for this organization.\",\n })\n : t(\"jobs.automationsEmptyDescription\", {\n defaultValue: \"Describe what should happen and when.\",\n })\n }\n action={\n organization ? null : (\n <AgentAskPopover\n context={automationCreationContext()}\n prompt={t(\"jobs.automationPrompt\", {\n defaultValue: \"Create an automation that does this: \",\n })}\n title={t(\"jobs.automationsCreateTitle\", {\n defaultValue: \"Create an automation\",\n })}\n />\n )\n }\n />\n ) : (\n <div className=\"divide-y divide-border/60 border-y border-border/60\">\n {entries.map((entry) => {\n const resource = entry.resource;\n const lastRun = formatDateTime(resource.lastRun);\n const nextRun = formatDateTime(resource.nextRun);\n const triggerDescription =\n entry.kind === \"automation\" && entry.triggerType === \"event\"\n ? t(\"jobs.automationEventTrigger\", {\n defaultValue: \"On {{event}}\",\n event: entry.resource.event ?? \"event\",\n })\n : resource.scheduleDescription ||\n resource.schedule ||\n t(\"jobs.scheduledTrigger\", {\n defaultValue: \"Scheduled\",\n });\n const instructions =\n entry.kind === \"automation\"\n ? entry.resource.body\n : entry.resource.instructions;\n\n return (\n <article\n key={`${entry.kind}:${resource.id}`}\n className=\"py-4 first:pt-5 last:pb-5\"\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"mt-0.5 text-muted-foreground\">\n {entry.triggerType === \"event\" ? (\n <IconBolt className=\"size-4\" />\n ) : (\n <IconClock className=\"size-4\" />\n )}\n </div>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <h3 className=\"truncate text-sm font-medium\">\n {resource.name.replace(/-/g, \" \")}\n </h3>\n <span className=\"rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground\">\n {entry.triggerType === \"event\"\n ? t(\"jobs.eventTrigger\", {\n defaultValue: \"Event-triggered\",\n })\n : t(\"jobs.scheduledTrigger\", {\n defaultValue: \"Scheduled\",\n })}\n </span>\n <span\n className={\n resource.enabled\n ? \"rounded-full bg-emerald-500/15 px-2 py-0.5 text-[10px] font-medium text-emerald-600 dark:text-emerald-400\"\n : \"rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground\"\n }\n >\n {resource.enabled\n ? t(\"jobs.enabled\", { defaultValue: \"Enabled\" })\n : t(\"jobs.paused\", { defaultValue: \"Paused\" })}\n </span>\n {resource.lastStatus ? (\n <span className=\"rounded-full bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground\">\n {resource.lastStatus}\n </span>\n ) : null}\n </div>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n {triggerDescription}\n </p>\n <p className=\"mt-1 line-clamp-2 text-xs text-muted-foreground/80\">\n {instructions}\n </p>\n {lastRun || nextRun ? (\n <div className=\"mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-muted-foreground\">\n {nextRun ? (\n <span>\n {t(\"jobs.nextRun\", { defaultValue: \"Next run\" })}:{\" \"}\n {nextRun}\n </span>\n ) : null}\n {lastRun ? (\n <span>\n {t(\"jobs.lastRun\", { defaultValue: \"Last run\" })}:{\" \"}\n {lastRun}\n </span>\n ) : null}\n </div>\n ) : null}\n </div>\n <div className=\"flex shrink-0 items-center gap-1\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"cursor-pointer px-2 text-xs\"\n onClick={() => setDetailsTarget(entry)}\n >\n <IconEye className=\"size-3.5\" />\n {t(\"jobs.details\", { defaultValue: \"Details\" })}\n </Button>\n {resource.canUpdate ? (\n <>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"cursor-pointer px-2 text-xs\"\n disabled={mutationPending}\n onClick={() =>\n mutateEntry(entry, \"update\", !resource.enabled)\n }\n >\n {resource.enabled ? (\n <IconPlayerPause className=\"size-3.5\" />\n ) : (\n <IconPlayerPlay className=\"size-3.5\" />\n )}\n {resource.enabled\n ? t(\"jobs.pause\", { defaultValue: \"Pause\" })\n : t(\"jobs.resume\", { defaultValue: \"Resume\" })}\n </Button>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"size-8 cursor-pointer text-muted-foreground hover:text-destructive\"\n aria-label={t(\"jobs.delete\", {\n defaultValue: \"Delete\",\n })}\n onClick={() => setDeleteTarget(entry)}\n >\n <IconTrash className=\"size-3.5\" />\n </Button>\n </>\n ) : null}\n </div>\n </div>\n </article>\n );\n })}\n </div>\n )}\n </section>\n );\n\n const mutationError =\n personalJobsMutation.error ||\n personalAutomationsMutation.error ||\n organizationJobsMutation.error ||\n organizationAutomationsMutation.error;\n\n return (\n <AgentTabFrame\n title={t(\"jobs.pageTitle\", { defaultValue: \"Automations\" })}\n description={t(\"jobs.pageDescription\", {\n defaultValue:\n \"Manage agent tasks that run on a schedule or in response to events.\",\n })}\n actions={\n <AgentAskPopover\n context={automationCreationContext()}\n prompt={t(\"jobs.automationPrompt\", {\n defaultValue: \"Create an automation that does this: \",\n })}\n title={t(\"jobs.automationsCreateTitle\", {\n defaultValue: \"Create an automation\",\n })}\n label={t(\"jobs.newAutomation\", {\n defaultValue: \"New automation\",\n })}\n />\n }\n >\n <div className=\"space-y-7\">\n {renderSection({\n title: t(\"jobs.personal\", { defaultValue: \"Personal\" }),\n description: t(\"jobs.personalDescription\", {\n defaultValue:\n \"Scheduled and event-triggered automations that run for you.\",\n }),\n entries: personalEntries,\n loading:\n personalJobsQuery.isLoading || personalAutomationsQuery.isLoading,\n errors: [\n personalJobsQuery.error,\n personalAutomationsQuery.error,\n ].filter(Boolean),\n })}\n <div className=\"border-t border-border/70 pt-6\">\n {renderSection({\n title: t(\"jobs.organization\", { defaultValue: \"Organization\" }),\n description: t(\"jobs.organizationDescription\", {\n defaultValue:\n \"Scheduled and event-triggered automations shared with this organization.\",\n }),\n entries: organizationEntries,\n loading:\n organizationJobsQuery.isLoading ||\n organizationAutomationsQuery.isLoading,\n errors: [\n organizationJobsQuery.error,\n organizationAutomationsQuery.error,\n ].filter(Boolean),\n organization: true,\n })}\n </div>\n {mutationError ? (\n <p className=\"text-sm text-destructive\">\n {mutationError.message ||\n t(\"jobs.updateError\", {\n defaultValue: \"Could not update automation.\",\n })}\n </p>\n ) : null}\n </div>\n\n <Dialog\n open={deleteTarget !== null}\n onOpenChange={(open) => {\n if (!open && !mutationPending) setDeleteTarget(null);\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>\n {t(\"jobs.deleteAutomationTitle\", {\n defaultValue: \"Delete automation?\",\n })}\n </DialogTitle>\n <DialogDescription>\n {t(\"jobs.deleteAutomationDescription\", {\n defaultValue:\n \"This permanently removes the automation and cannot be undone.\",\n })}\n </DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n className=\"cursor-pointer\"\n disabled={mutationPending}\n onClick={() => setDeleteTarget(null)}\n >\n {t(\"jobs.cancel\", { defaultValue: \"Cancel\" })}\n </Button>\n <Button\n type=\"button\"\n variant=\"destructive\"\n className=\"cursor-pointer\"\n disabled={mutationPending}\n onClick={() => {\n if (!deleteTarget) return;\n mutateEntry(deleteTarget, \"delete\", undefined, () =>\n setDeleteTarget(null),\n );\n }}\n >\n {mutationPending ? (\n <IconLoader2 className=\"size-4 animate-spin\" />\n ) : null}\n {t(\"jobs.delete\", { defaultValue: \"Delete\" })}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n\n <Dialog\n open={detailsTarget !== null}\n onOpenChange={(open) => {\n if (!open) setDetailsTarget(null);\n }}\n >\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>\n {detailsTarget?.resource.name.replace(/-/g, \" \") ??\n t(\"jobs.automationDetails\", {\n defaultValue: \"Automation details\",\n })}\n </DialogTitle>\n <DialogDescription>\n {detailsTarget\n ? detailsTarget.triggerType === \"event\"\n ? t(\"jobs.automationEventDetails\", {\n defaultValue: \"Runs when {{event}}.\",\n event:\n detailsTarget.kind === \"automation\"\n ? (detailsTarget.resource.event ?? \"an event fires\")\n : \"an event fires\",\n })\n : detailsTarget.resource.scheduleDescription ||\n detailsTarget.resource.schedule ||\n t(\"jobs.scheduledTrigger\", {\n defaultValue: \"Scheduled\",\n })\n : null}\n </DialogDescription>\n </DialogHeader>\n {detailsTarget ? (\n <div className=\"space-y-3\">\n {detailsTarget.kind === \"automation\" &&\n detailsTarget.resource.condition ? (\n <div>\n <p className=\"text-xs font-medium text-foreground\">\n {t(\"jobs.condition\", { defaultValue: \"Condition\" })}\n </p>\n <p className=\"mt-1 text-sm text-muted-foreground\">\n {detailsTarget.resource.condition}\n </p>\n </div>\n ) : null}\n <div>\n <p className=\"text-xs font-medium text-foreground\">\n {t(\"jobs.instructions\", { defaultValue: \"Instructions\" })}\n </p>\n <p className=\"mt-1 whitespace-pre-wrap text-sm text-muted-foreground\">\n {detailsTarget.kind === \"automation\"\n ? detailsTarget.resource.body\n : detailsTarget.resource.instructions}\n </p>\n </div>\n {(detailsTarget.resource.mcpTools ?? []).length > 0 ? (\n <div>\n <p className=\"text-xs font-medium text-foreground\">\n {t(\"jobs.mcpTools\", {\n defaultValue: \"Connected MCP tools\",\n })}\n </p>\n <div className=\"mt-1 flex flex-wrap gap-1.5\">\n {(detailsTarget.resource.mcpTools ?? []).map((toolName) => (\n <code\n key={toolName}\n className=\"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground\"\n >\n {toolName}\n </code>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n ) : null}\n </DialogContent>\n </Dialog>\n </AgentTabFrame>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { IconBook2, IconChecklist, IconClock, IconExternalLink, IconFolder, IconHistory, IconHelpCircle, IconHierarchy2, IconNotes, IconPlugConnected, IconTopologyRing2, IconSearch, IconSettings, IconShieldLock, IconX, } from "@tabler/icons-react";
2
+ import { IconBook2, IconBolt, IconChecklist, IconExternalLink, IconFolder, IconHistory, IconHelpCircle, IconHierarchy2, IconNotes, IconPlugConnected, IconTopologyRing2, IconSearch, IconSettings, IconShieldLock, IconX, } from "@tabler/icons-react";
3
3
  import { lazy, Suspense, useCallback, useEffect, useMemo, useRef, useState, } from "react";
4
4
  import { MCP_CONNECT_GUIDES, MCP_CONNECT_MCP_URL_TEMPLATE, MCP_STATIC_TOKEN_FALLBACK, interpolateMcpConnectTemplate, } from "../../shared/mcp-connect-content.js";
5
5
  import { appPath } from "../api-path.js";
@@ -334,10 +334,10 @@ export function AgentTabsPage({ appName, extraTabs = [], extraTabFactories = [],
334
334
  },
335
335
  {
336
336
  id: "jobs",
337
- label: "Jobs",
338
- icon: IconClock,
337
+ label: "Automations",
338
+ icon: IconBolt,
339
339
  group: "agent",
340
- keywords: "scheduled automations recurring",
340
+ keywords: "jobs scheduled automations recurring event triggers",
341
341
  content: (_jsx(Suspense, { fallback: _jsx(TabLoading, {}), children: _jsx(AgentJobsTab, { scope: scope, canManageOrg: canManageOrg }) })),
342
342
  },
343
343
  {