@agent-native/core 0.99.2 → 0.100.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +21 -0
  3. package/corpus/core/docs/content/a2a-protocol.mdx +42 -0
  4. package/corpus/core/docs/content/agent-surfaces.mdx +43 -0
  5. package/corpus/core/docs/content/external-agents.mdx +11 -0
  6. package/corpus/core/docs/content/locales/ar-SA/a2a-protocol.mdx +42 -0
  7. package/corpus/core/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
  8. package/corpus/core/docs/content/locales/ar-SA/external-agents.mdx +9 -0
  9. package/corpus/core/docs/content/locales/de-DE/a2a-protocol.mdx +42 -0
  10. package/corpus/core/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
  11. package/corpus/core/docs/content/locales/de-DE/external-agents.mdx +10 -0
  12. package/corpus/core/docs/content/locales/es-ES/a2a-protocol.mdx +42 -0
  13. package/corpus/core/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
  14. package/corpus/core/docs/content/locales/es-ES/external-agents.mdx +10 -0
  15. package/corpus/core/docs/content/locales/fr-FR/a2a-protocol.mdx +42 -0
  16. package/corpus/core/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
  17. package/corpus/core/docs/content/locales/fr-FR/external-agents.mdx +11 -0
  18. package/corpus/core/docs/content/locales/hi-IN/a2a-protocol.mdx +42 -0
  19. package/corpus/core/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
  20. package/corpus/core/docs/content/locales/hi-IN/external-agents.mdx +9 -0
  21. package/corpus/core/docs/content/locales/ja-JP/a2a-protocol.mdx +42 -0
  22. package/corpus/core/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
  23. package/corpus/core/docs/content/locales/ja-JP/external-agents.mdx +10 -0
  24. package/corpus/core/docs/content/locales/ko-KR/a2a-protocol.mdx +42 -0
  25. package/corpus/core/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
  26. package/corpus/core/docs/content/locales/ko-KR/external-agents.mdx +9 -0
  27. package/corpus/core/docs/content/locales/pt-BR/a2a-protocol.mdx +42 -0
  28. package/corpus/core/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
  29. package/corpus/core/docs/content/locales/pt-BR/external-agents.mdx +10 -0
  30. package/corpus/core/docs/content/locales/zh-CN/a2a-protocol.mdx +42 -0
  31. package/corpus/core/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
  32. package/corpus/core/docs/content/locales/zh-CN/external-agents.mdx +8 -0
  33. package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.mdx +42 -0
  34. package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
  35. package/corpus/core/docs/content/locales/zh-TW/external-agents.mdx +8 -0
  36. package/corpus/core/package.json +1 -1
  37. package/corpus/core/src/agent/context-xray/actions/context-evict.ts +11 -0
  38. package/corpus/core/src/agent/context-xray/actions/context-pin.ts +11 -0
  39. package/corpus/core/src/agent/context-xray/actions/context-preview-get.ts +134 -0
  40. package/corpus/core/src/agent/context-xray/actions/context-restore.ts +11 -0
  41. package/corpus/core/src/agent/context-xray/actions/errors.ts +20 -0
  42. package/corpus/core/src/agent/context-xray/manifest.ts +106 -7
  43. package/corpus/core/src/agent/engine/context-directives-transform.ts +5 -1
  44. package/corpus/core/src/agent/production-agent.ts +100 -38
  45. package/corpus/core/src/agent/run-loop-with-resume.ts +7 -2
  46. package/corpus/core/src/client/AgentPanel.tsx +35 -8
  47. package/corpus/core/src/client/agent-page/AgentContextTab.tsx +501 -0
  48. package/corpus/core/src/client/agent-page/AgentJobsTab.tsx +370 -0
  49. package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +1084 -0
  50. package/corpus/core/src/client/agent-page/types.ts +18 -0
  51. package/corpus/core/src/client/agent-page/use-jobs.ts +150 -0
  52. package/corpus/core/src/client/context-xray/ContextMeter.tsx +22 -5
  53. package/corpus/core/src/client/context-xray/ContextTreemap.tsx +16 -1
  54. package/corpus/core/src/client/context-xray/ContextXRayPanel.tsx +168 -3
  55. package/corpus/core/src/client/context-xray/format.ts +6 -0
  56. package/corpus/core/src/client/index.ts +6 -0
  57. package/corpus/core/src/client/resources/ResourcesPanel.tsx +51 -23
  58. package/corpus/core/src/client/settings/AutomationsSection.tsx +407 -387
  59. package/corpus/core/src/jobs/actions/list-recurring-jobs.ts +105 -0
  60. package/corpus/core/src/jobs/actions/manage-recurring-job.ts +85 -0
  61. package/corpus/core/src/jobs/tools.ts +1 -1
  62. package/corpus/core/src/localization/default-messages.ts +110 -0
  63. package/corpus/core/src/mcp/build-server.ts +1 -0
  64. package/corpus/core/src/mcp/connect-route.ts +62 -65
  65. package/corpus/core/src/server/action-discovery.ts +23 -0
  66. package/corpus/core/src/server/agent-chat/prompt-resources.ts +174 -2
  67. package/corpus/core/src/server/agent-chat-plugin.ts +175 -2
  68. package/corpus/core/src/server/auth.ts +1 -7
  69. package/corpus/core/src/server/google-oauth.ts +1 -7
  70. package/corpus/core/src/server/workspace-oauth.ts +31 -0
  71. package/corpus/core/src/shared/context-xray.ts +84 -1
  72. package/corpus/core/src/shared/mcp-connect-content.ts +130 -0
  73. package/corpus/core/src/templates/default/app/routes/_index.tsx +11 -0
  74. package/corpus/core/src/templates/default/app/routes/agent.tsx +33 -0
  75. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
  76. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
  77. package/corpus/core/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
  78. package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
  79. package/corpus/core/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
  80. package/corpus/core/src/triggers/actions/list-automations.ts +99 -0
  81. package/corpus/core/src/triggers/actions/manage-automation.ts +78 -0
  82. package/corpus/templates/analytics/actions/data-source-status.ts +33 -15
  83. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +1 -1
  84. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +149 -24
  85. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +17 -0
  86. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
  87. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -0
  88. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +8 -0
  89. package/corpus/templates/analytics/app/i18n/zh-TW.ts +1 -0
  90. package/corpus/templates/analytics/app/i18n-data.ts +1 -0
  91. package/corpus/templates/analytics/app/routes/agent.tsx +5 -0
  92. package/corpus/templates/analytics/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  93. package/corpus/templates/analytics/changelog/2026-07-13-analytics-answers-can-use-built-in-first-party-event-data.md +6 -0
  94. package/corpus/templates/analytics/changelog/2026-07-13-chart-legends-can-filter-to-one-series-or-hide-a-series-on-h.md +6 -0
  95. package/corpus/templates/analytics/changelog/2026-07-13-gpt-5-6-luna-answers-now-recover-normally-instead-of-showing.md +6 -0
  96. package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -2
  97. package/corpus/templates/assets/app/components/layout/Header.tsx +1 -0
  98. package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -0
  99. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +2 -0
  100. package/corpus/templates/assets/app/routes/agent.tsx +5 -0
  101. package/corpus/templates/assets/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  102. package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -0
  103. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +4 -1
  104. package/corpus/templates/brain/app/lib/brain.ts +11 -0
  105. package/corpus/templates/brain/app/root.tsx +15 -1
  106. package/corpus/templates/brain/app/routes/agent.tsx +11 -0
  107. package/corpus/templates/brain/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  108. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -0
  109. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +2 -0
  110. package/corpus/templates/calendar/app/root.tsx +17 -1
  111. package/corpus/templates/calendar/app/routes/_app.agent.tsx +25 -0
  112. package/corpus/templates/calendar/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  113. package/corpus/templates/chat/app/components/layout/Header.tsx +1 -0
  114. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -0
  115. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +7 -0
  116. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +3 -0
  117. package/corpus/templates/chat/app/root.tsx +24 -2
  118. package/corpus/templates/chat/app/routes/agent.tsx +15 -0
  119. package/corpus/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  120. package/corpus/templates/clips/app/components/library/library-layout.tsx +8 -0
  121. package/corpus/templates/clips/app/i18n/ar-SA.ts +2 -0
  122. package/corpus/templates/clips/app/i18n/de-DE.ts +2 -0
  123. package/corpus/templates/clips/app/i18n/en-US.ts +2 -0
  124. package/corpus/templates/clips/app/i18n/es-ES.ts +2 -0
  125. package/corpus/templates/clips/app/i18n/fr-FR.ts +2 -0
  126. package/corpus/templates/clips/app/i18n/hi-IN.ts +2 -0
  127. package/corpus/templates/clips/app/i18n/ja-JP.ts +2 -0
  128. package/corpus/templates/clips/app/i18n/ko-KR.ts +2 -0
  129. package/corpus/templates/clips/app/i18n/pt-BR.ts +2 -0
  130. package/corpus/templates/clips/app/i18n/zh-CN.ts +2 -0
  131. package/corpus/templates/clips/app/i18n/zh-TW.ts +2 -0
  132. package/corpus/templates/clips/app/root.tsx +7 -1
  133. package/corpus/templates/clips/app/routes/_app.agent.tsx +15 -0
  134. package/corpus/templates/clips/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  135. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -0
  136. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +36 -0
  137. package/corpus/templates/content/app/i18n/zh-TW.ts +2 -0
  138. package/corpus/templates/content/app/i18n-data.ts +44 -6
  139. package/corpus/templates/content/app/root.tsx +8 -0
  140. package/corpus/templates/content/app/routes/_app.agent.tsx +15 -0
  141. package/corpus/templates/content/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  142. package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
  143. package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -0
  144. package/corpus/templates/design/app/i18n/zh-TW.ts +2 -0
  145. package/corpus/templates/design/app/i18n-data.ts +20 -0
  146. package/corpus/templates/design/app/root.tsx +7 -1
  147. package/corpus/templates/design/app/routes/agent.tsx +15 -0
  148. package/corpus/templates/design/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  149. package/corpus/templates/dispatch/app/dispatch-extensions.tsx +10 -1
  150. package/corpus/templates/dispatch/app/i18n/zh-TW.ts +2 -0
  151. package/corpus/templates/dispatch/app/i18n-data.ts +20 -0
  152. package/corpus/templates/dispatch/app/root.tsx +7 -2
  153. package/corpus/templates/dispatch/app/routes/agent.tsx +18 -0
  154. package/corpus/templates/dispatch/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  155. package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -0
  156. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +35 -0
  157. package/corpus/templates/forms/app/i18n/ar-SA.ts +2 -0
  158. package/corpus/templates/forms/app/i18n/de-DE.ts +2 -0
  159. package/corpus/templates/forms/app/i18n/en-US.ts +2 -0
  160. package/corpus/templates/forms/app/i18n/es-ES.ts +2 -0
  161. package/corpus/templates/forms/app/i18n/fr-FR.ts +2 -0
  162. package/corpus/templates/forms/app/i18n/hi-IN.ts +2 -0
  163. package/corpus/templates/forms/app/i18n/ja-JP.ts +2 -0
  164. package/corpus/templates/forms/app/i18n/ko-KR.ts +2 -0
  165. package/corpus/templates/forms/app/i18n/pt-BR.ts +2 -0
  166. package/corpus/templates/forms/app/i18n/zh-CN.ts +2 -0
  167. package/corpus/templates/forms/app/i18n/zh-TW.ts +2 -0
  168. package/corpus/templates/forms/app/root.tsx +6 -1
  169. package/corpus/templates/forms/app/routes/_app.agent.tsx +15 -0
  170. package/corpus/templates/forms/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  171. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +14 -2
  172. package/corpus/templates/macros/app/components/layout/Header.tsx +1 -0
  173. package/corpus/templates/macros/app/root.tsx +17 -2
  174. package/corpus/templates/macros/app/routes/agent.tsx +15 -0
  175. package/corpus/templates/macros/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  176. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +42 -0
  177. package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +6 -0
  178. package/corpus/templates/mail/app/routes/agent.tsx +15 -0
  179. package/corpus/templates/mail/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  180. package/corpus/templates/plan/app/components/layout/Header.tsx +1 -0
  181. package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -0
  182. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +2 -0
  183. package/corpus/templates/plan/app/root.tsx +8 -0
  184. package/corpus/templates/plan/app/routes/agent.tsx +15 -0
  185. package/corpus/templates/plan/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  186. package/corpus/templates/slides/app/components/layout/Header.tsx +1 -0
  187. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -0
  188. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +2 -0
  189. package/corpus/templates/slides/app/root.tsx +10 -1
  190. package/corpus/templates/slides/app/routes/agent.tsx +15 -0
  191. package/corpus/templates/slides/changelog/2026-07-13-new-agent-page-see-and-manage-your-agent-s-context-files-con.md +6 -0
  192. package/dist/agent/context-xray/actions/context-evict.js +5 -2
  193. package/dist/agent/context-xray/actions/context-evict.js.map +1 -1
  194. package/dist/agent/context-xray/actions/context-pin.js +5 -2
  195. package/dist/agent/context-xray/actions/context-pin.js.map +1 -1
  196. package/dist/agent/context-xray/actions/context-preview-get.d.ts +17 -0
  197. package/dist/agent/context-xray/actions/context-preview-get.d.ts.map +1 -0
  198. package/dist/agent/context-xray/actions/context-preview-get.js +94 -0
  199. package/dist/agent/context-xray/actions/context-preview-get.js.map +1 -0
  200. package/dist/agent/context-xray/actions/context-restore.js +5 -2
  201. package/dist/agent/context-xray/actions/context-restore.js.map +1 -1
  202. package/dist/agent/context-xray/actions/errors.d.ts +3 -0
  203. package/dist/agent/context-xray/actions/errors.d.ts.map +1 -1
  204. package/dist/agent/context-xray/actions/errors.js +6 -0
  205. package/dist/agent/context-xray/actions/errors.js.map +1 -1
  206. package/dist/agent/context-xray/manifest.d.ts +18 -1
  207. package/dist/agent/context-xray/manifest.d.ts.map +1 -1
  208. package/dist/agent/context-xray/manifest.js +68 -6
  209. package/dist/agent/context-xray/manifest.js.map +1 -1
  210. package/dist/agent/engine/context-directives-transform.d.ts +2 -0
  211. package/dist/agent/engine/context-directives-transform.d.ts.map +1 -1
  212. package/dist/agent/engine/context-directives-transform.js +2 -1
  213. package/dist/agent/engine/context-directives-transform.js.map +1 -1
  214. package/dist/agent/production-agent.d.ts +15 -0
  215. package/dist/agent/production-agent.d.ts.map +1 -1
  216. package/dist/agent/production-agent.js +74 -36
  217. package/dist/agent/production-agent.js.map +1 -1
  218. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  219. package/dist/agent/run-loop-with-resume.js +6 -3
  220. package/dist/agent/run-loop-with-resume.js.map +1 -1
  221. package/dist/client/AgentPanel.d.ts +5 -1
  222. package/dist/client/AgentPanel.d.ts.map +1 -1
  223. package/dist/client/AgentPanel.js +9 -11
  224. package/dist/client/AgentPanel.js.map +1 -1
  225. package/dist/client/agent-page/AgentContextTab.d.ts +5 -0
  226. package/dist/client/agent-page/AgentContextTab.d.ts.map +1 -0
  227. package/dist/client/agent-page/AgentContextTab.js +202 -0
  228. package/dist/client/agent-page/AgentContextTab.js.map +1 -0
  229. package/dist/client/agent-page/AgentJobsTab.d.ts +3 -0
  230. package/dist/client/agent-page/AgentJobsTab.d.ts.map +1 -0
  231. package/dist/client/agent-page/AgentJobsTab.js +98 -0
  232. package/dist/client/agent-page/AgentJobsTab.js.map +1 -0
  233. package/dist/client/agent-page/AgentTabsPage.d.ts +20 -0
  234. package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -0
  235. package/dist/client/agent-page/AgentTabsPage.js +420 -0
  236. package/dist/client/agent-page/AgentTabsPage.js.map +1 -0
  237. package/dist/client/agent-page/types.d.ts +17 -0
  238. package/dist/client/agent-page/types.d.ts.map +1 -0
  239. package/dist/client/agent-page/types.js +9 -0
  240. package/dist/client/agent-page/types.js.map +1 -0
  241. package/dist/client/agent-page/use-jobs.d.ts +61 -0
  242. package/dist/client/agent-page/use-jobs.d.ts.map +1 -0
  243. package/dist/client/agent-page/use-jobs.js +71 -0
  244. package/dist/client/agent-page/use-jobs.js.map +1 -0
  245. package/dist/client/context-xray/ContextMeter.d.ts +3 -1
  246. package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
  247. package/dist/client/context-xray/ContextMeter.js +14 -5
  248. package/dist/client/context-xray/ContextMeter.js.map +1 -1
  249. package/dist/client/context-xray/ContextTreemap.d.ts +3 -2
  250. package/dist/client/context-xray/ContextTreemap.d.ts.map +1 -1
  251. package/dist/client/context-xray/ContextTreemap.js +9 -1
  252. package/dist/client/context-xray/ContextTreemap.js.map +1 -1
  253. package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
  254. package/dist/client/context-xray/ContextXRayPanel.js +95 -20
  255. package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
  256. package/dist/client/context-xray/format.d.ts.map +1 -1
  257. package/dist/client/context-xray/format.js +12 -0
  258. package/dist/client/context-xray/format.js.map +1 -1
  259. package/dist/client/index.d.ts +3 -0
  260. package/dist/client/index.d.ts.map +1 -1
  261. package/dist/client/index.js +1 -0
  262. package/dist/client/index.js.map +1 -1
  263. package/dist/client/resources/ResourcesPanel.d.ts +9 -1
  264. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  265. package/dist/client/resources/ResourcesPanel.js +26 -10
  266. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  267. package/dist/client/settings/AutomationsSection.d.ts +9 -0
  268. package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
  269. package/dist/client/settings/AutomationsSection.js +128 -147
  270. package/dist/client/settings/AutomationsSection.js.map +1 -1
  271. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  272. package/dist/jobs/actions/list-recurring-jobs.d.ts +21 -0
  273. package/dist/jobs/actions/list-recurring-jobs.d.ts.map +1 -0
  274. package/dist/jobs/actions/list-recurring-jobs.js +74 -0
  275. package/dist/jobs/actions/list-recurring-jobs.js.map +1 -0
  276. package/dist/jobs/actions/manage-recurring-job.d.ts +18 -0
  277. package/dist/jobs/actions/manage-recurring-job.d.ts.map +1 -0
  278. package/dist/jobs/actions/manage-recurring-job.js +68 -0
  279. package/dist/jobs/actions/manage-recurring-job.js.map +1 -0
  280. package/dist/jobs/tools.d.ts +13 -0
  281. package/dist/jobs/tools.d.ts.map +1 -1
  282. package/dist/jobs/tools.js +1 -1
  283. package/dist/jobs/tools.js.map +1 -1
  284. package/dist/localization/default-messages.d.ts +96 -0
  285. package/dist/localization/default-messages.d.ts.map +1 -1
  286. package/dist/localization/default-messages.js +96 -0
  287. package/dist/localization/default-messages.js.map +1 -1
  288. package/dist/mcp/build-server.d.ts.map +1 -1
  289. package/dist/mcp/build-server.js +1 -0
  290. package/dist/mcp/build-server.js.map +1 -1
  291. package/dist/mcp/connect-route.d.ts.map +1 -1
  292. package/dist/mcp/connect-route.js +44 -59
  293. package/dist/mcp/connect-route.js.map +1 -1
  294. package/dist/notifications/routes.d.ts +2 -2
  295. package/dist/resources/handlers.d.ts +1 -1
  296. package/dist/server/action-discovery.d.ts.map +1 -1
  297. package/dist/server/action-discovery.js +23 -0
  298. package/dist/server/action-discovery.js.map +1 -1
  299. package/dist/server/agent-chat/prompt-resources.d.ts +14 -0
  300. package/dist/server/agent-chat/prompt-resources.d.ts.map +1 -1
  301. package/dist/server/agent-chat/prompt-resources.js +139 -2
  302. package/dist/server/agent-chat/prompt-resources.js.map +1 -1
  303. package/dist/server/agent-chat-plugin.d.ts +1 -0
  304. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  305. package/dist/server/agent-chat-plugin.js +136 -3
  306. package/dist/server/agent-chat-plugin.js.map +1 -1
  307. package/dist/server/auth.d.ts.map +1 -1
  308. package/dist/server/auth.js +1 -4
  309. package/dist/server/auth.js.map +1 -1
  310. package/dist/server/google-oauth.d.ts.map +1 -1
  311. package/dist/server/google-oauth.js +1 -4
  312. package/dist/server/google-oauth.js.map +1 -1
  313. package/dist/server/transcribe-voice.d.ts +1 -1
  314. package/dist/server/workspace-oauth.d.ts +11 -0
  315. package/dist/server/workspace-oauth.d.ts.map +1 -0
  316. package/dist/server/workspace-oauth.js +25 -0
  317. package/dist/server/workspace-oauth.js.map +1 -0
  318. package/dist/shared/context-xray.d.ts +45 -1
  319. package/dist/shared/context-xray.d.ts.map +1 -1
  320. package/dist/shared/context-xray.js +12 -0
  321. package/dist/shared/context-xray.js.map +1 -1
  322. package/dist/shared/mcp-connect-content.d.ts +37 -0
  323. package/dist/shared/mcp-connect-content.d.ts.map +1 -0
  324. package/dist/shared/mcp-connect-content.js +92 -0
  325. package/dist/shared/mcp-connect-content.js.map +1 -0
  326. package/dist/templates/default/app/routes/_index.tsx +11 -0
  327. package/dist/templates/default/app/routes/agent.tsx +33 -0
  328. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
  329. package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
  330. package/dist/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
  331. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
  332. package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
  333. package/dist/triggers/actions/list-automations.d.ts +24 -0
  334. package/dist/triggers/actions/list-automations.d.ts.map +1 -0
  335. package/dist/triggers/actions/list-automations.js +72 -0
  336. package/dist/triggers/actions/list-automations.js.map +1 -0
  337. package/dist/triggers/actions/manage-automation.d.ts +18 -0
  338. package/dist/triggers/actions/manage-automation.d.ts.map +1 -0
  339. package/dist/triggers/actions/manage-automation.js +60 -0
  340. package/dist/triggers/actions/manage-automation.js.map +1 -0
  341. package/docs/content/a2a-protocol.mdx +42 -0
  342. package/docs/content/agent-surfaces.mdx +43 -0
  343. package/docs/content/external-agents.mdx +11 -0
  344. package/docs/content/locales/ar-SA/a2a-protocol.mdx +42 -0
  345. package/docs/content/locales/ar-SA/agent-surfaces.mdx +30 -0
  346. package/docs/content/locales/ar-SA/external-agents.mdx +9 -0
  347. package/docs/content/locales/de-DE/a2a-protocol.mdx +42 -0
  348. package/docs/content/locales/de-DE/agent-surfaces.mdx +34 -0
  349. package/docs/content/locales/de-DE/external-agents.mdx +10 -0
  350. package/docs/content/locales/es-ES/a2a-protocol.mdx +42 -0
  351. package/docs/content/locales/es-ES/agent-surfaces.mdx +34 -0
  352. package/docs/content/locales/es-ES/external-agents.mdx +10 -0
  353. package/docs/content/locales/fr-FR/a2a-protocol.mdx +42 -0
  354. package/docs/content/locales/fr-FR/agent-surfaces.mdx +34 -0
  355. package/docs/content/locales/fr-FR/external-agents.mdx +11 -0
  356. package/docs/content/locales/hi-IN/a2a-protocol.mdx +42 -0
  357. package/docs/content/locales/hi-IN/agent-surfaces.mdx +31 -0
  358. package/docs/content/locales/hi-IN/external-agents.mdx +9 -0
  359. package/docs/content/locales/ja-JP/a2a-protocol.mdx +42 -0
  360. package/docs/content/locales/ja-JP/agent-surfaces.mdx +32 -0
  361. package/docs/content/locales/ja-JP/external-agents.mdx +10 -0
  362. package/docs/content/locales/ko-KR/a2a-protocol.mdx +42 -0
  363. package/docs/content/locales/ko-KR/agent-surfaces.mdx +32 -0
  364. package/docs/content/locales/ko-KR/external-agents.mdx +9 -0
  365. package/docs/content/locales/pt-BR/a2a-protocol.mdx +42 -0
  366. package/docs/content/locales/pt-BR/agent-surfaces.mdx +33 -0
  367. package/docs/content/locales/pt-BR/external-agents.mdx +10 -0
  368. package/docs/content/locales/zh-CN/a2a-protocol.mdx +42 -0
  369. package/docs/content/locales/zh-CN/agent-surfaces.mdx +29 -0
  370. package/docs/content/locales/zh-CN/external-agents.mdx +8 -0
  371. package/docs/content/locales/zh-TW/a2a-protocol.mdx +42 -0
  372. package/docs/content/locales/zh-TW/agent-surfaces.mdx +29 -0
  373. package/docs/content/locales/zh-TW/external-agents.mdx +8 -0
  374. package/package.json +1 -1
  375. package/src/templates/default/app/routes/_index.tsx +11 -0
  376. package/src/templates/default/app/routes/agent.tsx +33 -0
  377. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +6 -0
  378. package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +59 -0
  379. package/src/templates/workspace-core/.agents/skills/context-xray/SKILL.md +25 -0
  380. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +7 -0
  381. package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +9 -0
@@ -0,0 +1,105 @@
1
+ import { z } from "zod";
2
+
3
+ import { defineAction } from "../../action.js";
4
+ import {
5
+ organizationResourceOwner,
6
+ resourceGetByPath,
7
+ resourceList,
8
+ } from "../../resources/store.js";
9
+ import { describeCron, isValidCron, nextOccurrence } from "../cron.js";
10
+ import { parseJobFrontmatter } from "../scheduler.js";
11
+ import { authorizeJobMutation } from "../tools.js";
12
+
13
+ const scopeSchema = z.enum(["personal", "organization"]);
14
+
15
+ function hasTriggerFrontmatter(content: string): boolean {
16
+ const header = content.match(/^---\n([\s\S]*?)\n---/m)?.[1] ?? "";
17
+ return /^triggerType\s*:/m.test(header);
18
+ }
19
+
20
+ function jobName(path: string): string {
21
+ return path.replace(/^jobs\//, "").replace(/\.md$/, "");
22
+ }
23
+
24
+ function nextRun(
25
+ meta: ReturnType<typeof parseJobFrontmatter>["meta"],
26
+ ): string | null {
27
+ if (!meta.enabled) return null;
28
+ if (meta.nextRun) return meta.nextRun;
29
+ if (meta.schedule && isValidCron(meta.schedule)) {
30
+ return nextOccurrence(meta.schedule).toISOString();
31
+ }
32
+ return null;
33
+ }
34
+
35
+ export interface RecurringJobActionItem {
36
+ id: string;
37
+ name: string;
38
+ path: string;
39
+ scope: "personal" | "organization";
40
+ schedule: string;
41
+ scheduleDescription: string;
42
+ instructions: string;
43
+ enabled: boolean;
44
+ lastRun: string | null;
45
+ lastStatus: string | null;
46
+ lastError: string | null;
47
+ nextRun: string | null;
48
+ createdBy: string | null;
49
+ canUpdate: boolean;
50
+ }
51
+
52
+ export default defineAction({
53
+ description:
54
+ "List recurring cron jobs visible in the selected personal or organization scope. This read surface is used by the Agent Jobs page.",
55
+ agentTool: false,
56
+ schema: z.object({
57
+ scope: scopeSchema.default("personal"),
58
+ }),
59
+ http: { method: "GET" },
60
+ readOnly: true,
61
+ parallelSafe: true,
62
+ run: async ({ scope }, ctx): Promise<RecurringJobActionItem[]> => {
63
+ const userEmail = ctx?.userEmail;
64
+ if (!userEmail) throw new Error("Not authenticated.");
65
+
66
+ if (scope === "organization" && !ctx?.orgId) return [];
67
+
68
+ const owner =
69
+ scope === "organization"
70
+ ? organizationResourceOwner(ctx.orgId as string)
71
+ : userEmail;
72
+ const resources = await resourceList(owner, "jobs/");
73
+ const jobs: RecurringJobActionItem[] = [];
74
+
75
+ for (const resource of resources) {
76
+ if (!resource.path.endsWith(".md") || resource.path.endsWith(".keep")) {
77
+ continue;
78
+ }
79
+ const full = await resourceGetByPath(owner, resource.path);
80
+ if (!full || hasTriggerFrontmatter(full.content)) continue;
81
+
82
+ const { meta, body } = parseJobFrontmatter(full.content);
83
+ const canUpdate =
84
+ scope === "personal" || !(await authorizeJobMutation(owner, meta));
85
+ jobs.push({
86
+ id: full.id,
87
+ name: jobName(full.path),
88
+ path: full.path,
89
+ scope,
90
+ schedule: meta.schedule,
91
+ scheduleDescription: meta.schedule ? describeCron(meta.schedule) : "",
92
+ instructions: body,
93
+ enabled: meta.enabled,
94
+ lastRun: meta.lastRun ?? null,
95
+ lastStatus: meta.lastStatus ?? null,
96
+ lastError: meta.lastError ?? null,
97
+ nextRun: nextRun(meta),
98
+ createdBy: meta.createdBy ?? null,
99
+ canUpdate,
100
+ });
101
+ }
102
+
103
+ return jobs;
104
+ },
105
+ });
@@ -0,0 +1,85 @@
1
+ import { z } from "zod";
2
+
3
+ import { defineAction } from "../../action.js";
4
+ import {
5
+ organizationResourceOwner,
6
+ resourceDelete,
7
+ resourceGetByPath,
8
+ resourcePut,
9
+ } from "../../resources/store.js";
10
+ import { isValidCron, nextOccurrence } from "../cron.js";
11
+ import { buildJobContent, parseJobFrontmatter } from "../scheduler.js";
12
+ import { authorizeJobMutation } from "../tools.js";
13
+
14
+ const scopeSchema = z.enum(["personal", "organization"]);
15
+
16
+ function hasTriggerFrontmatter(content: string): boolean {
17
+ const header = content.match(/^---\n([\s\S]*?)\n---/m)?.[1] ?? "";
18
+ return /^triggerType\s*:/m.test(header);
19
+ }
20
+
21
+ export default defineAction({
22
+ description:
23
+ "Enable, pause, or delete one recurring cron job from the Agent Jobs page.",
24
+ agentTool: false,
25
+ schema: z.object({
26
+ operation: z.enum(["update", "delete"]),
27
+ name: z.string().min(1),
28
+ scope: scopeSchema.default("personal"),
29
+ enabled: z.boolean().optional(),
30
+ }),
31
+ run: async ({ operation, name, scope, enabled }, ctx) => {
32
+ const userEmail = ctx?.userEmail;
33
+ if (!userEmail) throw new Error("Not authenticated.");
34
+ if (scope === "organization" && !ctx?.orgId) {
35
+ throw new Error("An organization is required for organization jobs.");
36
+ }
37
+
38
+ const owner =
39
+ scope === "organization"
40
+ ? organizationResourceOwner(ctx.orgId as string)
41
+ : userEmail;
42
+ const path = `jobs/${name}.md`;
43
+ const resource = await resourceGetByPath(owner, path);
44
+ if (!resource) {
45
+ throw Object.assign(new Error(`Job "${name}" not found.`), {
46
+ statusCode: 404,
47
+ });
48
+ }
49
+
50
+ const { meta, body } = parseJobFrontmatter(resource.content);
51
+ if (hasTriggerFrontmatter(resource.content)) {
52
+ throw Object.assign(new Error(`Job "${name}" is an automation.`), {
53
+ statusCode: 400,
54
+ });
55
+ }
56
+ const denied = await authorizeJobMutation(resource.owner, meta);
57
+ if (denied) throw Object.assign(new Error(denied), { statusCode: 403 });
58
+
59
+ if (operation === "delete") {
60
+ await resourceDelete(resource.id);
61
+ return { deleted: true, name };
62
+ }
63
+
64
+ if (enabled === undefined) {
65
+ throw Object.assign(new Error("enabled is required for update."), {
66
+ statusCode: 400,
67
+ });
68
+ }
69
+ meta.enabled = enabled;
70
+ if (enabled && meta.schedule && isValidCron(meta.schedule)) {
71
+ meta.nextRun = nextOccurrence(meta.schedule).toISOString();
72
+ }
73
+ await resourcePut(
74
+ resource.owner,
75
+ resource.path,
76
+ buildJobContent(meta, body),
77
+ );
78
+
79
+ return {
80
+ name,
81
+ enabled: meta.enabled,
82
+ nextRun: meta.nextRun ?? null,
83
+ };
84
+ },
85
+ });
@@ -68,7 +68,7 @@ async function isCurrentUserOrgAdmin(
68
68
  * Returns null when the mutation is allowed, or an error string suitable
69
69
  * for returning to the caller when not.
70
70
  */
71
- async function authorizeJobMutation(
71
+ export async function authorizeJobMutation(
72
72
  resourceOwner: string,
73
73
  meta: JobFrontmatter,
74
74
  ): Promise<string | null> {
@@ -211,6 +211,7 @@ const messages = {
211
211
  cliRequiresDevModeDescription:
212
212
  "Run this app locally with pnpm dev or use Builder.io to access the CLI terminal.",
213
213
  toggleAgent: "Toggle agent",
214
+ openFullView: "Open full view",
214
215
  checkingAiConnection: "Checking AI connection...",
215
216
  voiceMode: {
216
217
  entryButtonLabel: "Use microphone",
@@ -290,6 +291,115 @@ const messages = {
290
291
  },
291
292
  },
292
293
  },
294
+ contextXray: {
295
+ provenance: {
296
+ frameworkCore: "Framework",
297
+ actionsPrompt: "Actions",
298
+ template: "Template",
299
+ enterpriseWorkspaceCore: "Enterprise workspace core",
300
+ sqlWorkspace: "Workspace",
301
+ legacyAppDefault: "App defaults",
302
+ organization: "Organization",
303
+ personal: "Personal",
304
+ memory: "Memory",
305
+ dbSchema: "SQL schema",
306
+ tools: "Tools",
307
+ modelOverlay: "Model overlay",
308
+ runtimeContext: "Runtime context",
309
+ },
310
+ governance: {
311
+ required: "Required",
312
+ inherited: "Inherited",
313
+ user: "Your context",
314
+ },
315
+ system: "System",
316
+ conversation: "Conversation",
317
+ free: "free",
318
+ noSystemContext: "No system context is available for this scope yet.",
319
+ pageTitle: "Context",
320
+ agent: "Agent",
321
+ headerDescription:
322
+ "See the system instructions and conversation tokens that shape the agent.",
323
+ whatAgentKnows: "What the agent knows",
324
+ orderedSystemDescription:
325
+ "Ordered system context is grouped by where it comes from. System sections are visible here but cannot be evicted from a thread.",
326
+ list: "List",
327
+ treemap: "Treemap",
328
+ loadingPreview: "Loading context preview…",
329
+ previewUnavailable: "Context preview is not available yet.",
330
+ noPreview: "No context preview is available for this scope yet.",
331
+ liveThread: "Live thread",
332
+ liveThreadDescription:
333
+ "The latest thread snapshot, when one exists. This is a single current snapshot, not an append-only history.",
334
+ latestThread: "Latest thread",
335
+ noLiveThread: "No live thread snapshot is available yet.",
336
+ orderedTokensTitle: "Context is ordered tokens, not weighted tokens.",
337
+ orderedTokensDescription:
338
+ "Required framework and enterprise policy come first, followed by inherited template, workspace, and organization instructions. Personal instructions and memory arrive later and can narrow or override earlier guidance where the prompt permits. These system sections are not evictable; only run-local conversation segments support pin, evict, and restore.",
339
+ systemOrdered: "System · ordered, not evictable",
340
+ },
341
+ jobs: {
342
+ agent: "Agent",
343
+ pageTitle: "Jobs",
344
+ pageDescription:
345
+ "See recurring jobs and automations that run work for you.",
346
+ recurringTitle: "Recurring jobs",
347
+ organizationRecurringDescription:
348
+ "Cron jobs shared with this organization. Members can view them; creators and admins can manage them.",
349
+ recurringDescription:
350
+ "Scheduled prompts that ask the agent to do work automatically.",
351
+ organizationMemberNote: "You can manage jobs you created.",
352
+ loading: "Loading…",
353
+ recurringLoadError: "Could not load recurring jobs.",
354
+ organizationEmpty: "No organization jobs yet.",
355
+ recurringEmpty:
356
+ "No recurring jobs yet. Ask the agent: “every morning, summarize my inbox”.",
357
+ enabled: "Enabled",
358
+ paused: "Paused",
359
+ disabled: "Disabled",
360
+ nextRun: "Next run",
361
+ lastRun: "Last run",
362
+ details: "Details",
363
+ pause: "Pause",
364
+ resume: "Resume",
365
+ delete: "Delete",
366
+ recurringUpdateError: "Could not update recurring job.",
367
+ automationUpdateError: "Could not update automation.",
368
+ automationsTitle: "Automations",
369
+ organizationAutomationsDescription:
370
+ "Automations are personal today, so none are shown in the organization view.",
371
+ automationsDescription:
372
+ "Event-triggered and scheduled agent tasks managed from one place.",
373
+ automationsPersonalOnly: "Automations are personal today.",
374
+ deleteRecurringTitle: "Delete recurring job?",
375
+ deleteRecurringDescription:
376
+ "This permanently removes the job and cannot be undone.",
377
+ cancel: "Cancel",
378
+ recurringDetails: "Recurring job details",
379
+ instructions: "Instructions",
380
+ automationsLoadError: "Could not load automations.",
381
+ automationsEmpty:
382
+ "No automations yet. Ask the agent to set up an event-triggered or scheduled task.",
383
+ automationEventTrigger: "On {{event}}",
384
+ automationScheduleTrigger: "Scheduled task",
385
+ deleteAutomationTitle: "Delete automation?",
386
+ deleteAutomationDescription:
387
+ "This permanently removes the automation and cannot be undone.",
388
+ automationDetails: "Automation details",
389
+ automationEventDetails: "Runs when {{event}}.",
390
+ condition: "Condition",
391
+ firingTestEvent: "Firing test event…",
392
+ fireEventError: "Failed to fire event ({{status}})",
393
+ eventFired: "Event fired",
394
+ fireEventErrorGeneric: "Failed to fire event.",
395
+ newAutomation: "New automation",
396
+ automationPlaceholder: "Describe what you want to automate…",
397
+ personal: "Personal",
398
+ organization: "Organization",
399
+ fireTestEvent: "Fire test event",
400
+ automationsEmptySettings:
401
+ 'No automations yet. Click "New automation" or ask the agent to set one up.',
402
+ },
293
403
  share: {
294
404
  titleWithResource: 'Share "{{title}}"',
295
405
  titleWithType: "Share {{type}}",
@@ -383,6 +383,7 @@ const AUTO_READ_EXCLUDED_ACTION_NAMES = new Set([
383
383
  "db-exec",
384
384
  "db-patch",
385
385
  "context-manifest-get",
386
+ "context-preview-get",
386
387
  "context-pin",
387
388
  "context-evict",
388
389
  "context-restore",
@@ -40,6 +40,12 @@ import {
40
40
  isLoopbackRequest,
41
41
  } from "../server/auth.js";
42
42
  import { readBody } from "../server/h3-helpers.js";
43
+ import {
44
+ MCP_CONNECT_GUIDES,
45
+ MCP_CONNECT_MCP_URL_TEMPLATE,
46
+ MCP_STATIC_TOKEN_FALLBACK,
47
+ interpolateMcpConnectTemplate,
48
+ } from "../shared/mcp-connect-content.js";
43
49
  import {
44
50
  recordMintedToken,
45
51
  listTokens,
@@ -405,6 +411,42 @@ function agentNativeMarkSvg(className: string, gradientId: string): string {
405
411
  </svg>`;
406
412
  }
407
413
 
414
+ function renderConnectGuide(
415
+ guide: (typeof MCP_CONNECT_GUIDES)[number],
416
+ values: Parameters<typeof interpolateMcpConnectTemplate>[1],
417
+ ): string {
418
+ const guideId = escapeHtml(guide.id);
419
+ const content = [
420
+ guide.steps?.length
421
+ ? `<ol>${guide.steps
422
+ .map(
423
+ (step) =>
424
+ `<li>${escapeHtml(interpolateMcpConnectTemplate(step, values))}</li>`,
425
+ )
426
+ .join("")}</ol>`
427
+ : "",
428
+ guide.intro
429
+ ? `<p>${escapeHtml(interpolateMcpConnectTemplate(guide.intro, values))}</p>`
430
+ : "",
431
+ guide.commandTemplate
432
+ ? `<pre id="${guideId}Command">${escapeHtml(interpolateMcpConnectTemplate(guide.commandTemplate, values))}</pre>
433
+ <button type="button" class="primary-link compact" data-copy="${guideId}Command">${escapeHtml(guide.action?.label ?? "Copy")}</button>`
434
+ : "",
435
+ guide.configTemplate
436
+ ? `<pre id="${guideId}Config">${escapeHtml(interpolateMcpConnectTemplate(guide.configTemplate, values))}</pre>
437
+ <button type="button" class="primary-link compact" data-copy="${guideId}Config">${escapeHtml(guide.action?.label ?? "Copy")}</button>`
438
+ : "",
439
+ guide.action?.kind === "link" && guide.action.href
440
+ ? `<a class="primary-link" href="${escapeHtml(guide.action.href)}" target="_blank" rel="noopener noreferrer">${escapeHtml(guide.action.label)}</a>`
441
+ : "",
442
+ guide.note
443
+ ? `<p class="hint">${escapeHtml(interpolateMcpConnectTemplate(guide.note, values))}</p>`
444
+ : "",
445
+ ].join("\n");
446
+
447
+ return `<div class="tab-panel${guide.id === MCP_CONNECT_GUIDES[0]?.id ? " is-active" : ""}" role="tabpanel" data-panel="${guideId}">${content}</div>`;
448
+ }
449
+
408
450
  function renderConnectPage(params: {
409
451
  connectBasePath: string;
410
452
  email: string;
@@ -417,18 +459,14 @@ function renderConnectPage(params: {
417
459
  params;
418
460
  const safeEmail = escapeHtml(email);
419
461
  const safeApp = escapeHtml(appName);
420
- const mcpUrl = `${appUrl}${MCP_PUBLIC_ROUTE_PREFIX}`;
462
+ const mcpUrl = interpolateMcpConnectTemplate(MCP_CONNECT_MCP_URL_TEMPLATE, {
463
+ appName,
464
+ appUrl,
465
+ mcpUrl: "",
466
+ serverId,
467
+ });
421
468
  const safeMcpUrl = escapeHtml(mcpUrl);
422
- const safeServerId = escapeHtml(serverId);
423
- const safeClaudeCodeCmd = escapeHtml(
424
- `claude mcp add --transport http ${serverId} ${mcpUrl}`,
425
- );
426
- const safeCodexCmd = escapeHtml(
427
- `npx @agent-native/core@latest connect ${appUrl}`,
428
- );
429
- const safeGenericConfig = escapeHtml(
430
- `{\n "mcpServers": {\n "${serverId}": {\n "type": "http",\n "url": "${mcpUrl}"\n }\n }\n}`,
431
- );
469
+ const connectTemplateValues = { appName, appUrl, mcpUrl, serverId };
432
470
  const brandMarkSvg = agentNativeMarkSvg(
433
471
  "brand-mark",
434
472
  "agent-native-connect-brand-gradient",
@@ -439,6 +477,13 @@ function renderConnectPage(params: {
439
477
  );
440
478
  const safeUserCode =
441
479
  userCode && USER_CODE_RE.test(userCode) ? escapeHtml(userCode) : "";
480
+ const guideTabsHtml = MCP_CONNECT_GUIDES.map(
481
+ (guide) =>
482
+ `<button type="button" class="tab${guide.id === MCP_CONNECT_GUIDES[0]?.id ? " is-active" : ""}" role="tab" data-tab="${escapeHtml(guide.id)}" aria-selected="${guide.id === MCP_CONNECT_GUIDES[0]?.id ? "true" : "false"}">${escapeHtml(guide.label)}</button>`,
483
+ ).join("\n");
484
+ const guidePanelsHtml = MCP_CONNECT_GUIDES.map((guide) =>
485
+ renderConnectGuide(guide, connectTemplateValues),
486
+ ).join("\n");
442
487
  const setupHtml = safeUserCode
443
488
  ? ""
444
489
  : `
@@ -459,57 +504,9 @@ function renderConnectPage(params: {
459
504
  <div class="hosts-body">
460
505
  <div class="section-label">Pick your AI assistant</div>
461
506
  <div class="tabs" role="tablist" aria-label="Choose your AI assistant">
462
- <button type="button" class="tab is-active" role="tab" data-tab="claude" aria-selected="true">Claude</button>
463
- <button type="button" class="tab" role="tab" data-tab="chatgpt" aria-selected="false">ChatGPT</button>
464
- <button type="button" class="tab" role="tab" data-tab="cursor" aria-selected="false">Cursor</button>
465
- <button type="button" class="tab" role="tab" data-tab="claude-code" aria-selected="false">Claude Code</button>
466
- <button type="button" class="tab" role="tab" data-tab="codex" aria-selected="false">Codex</button>
467
- <button type="button" class="tab" role="tab" data-tab="other" aria-selected="false">Other</button>
468
- </div>
469
- <div class="tab-panel is-active" role="tabpanel" data-panel="claude">
470
- <ol>
471
- <li>Open <strong>Customize → Connectors</strong> in Claude.</li>
472
- <li>Click the <strong>+</strong> button → <strong>Add custom connector</strong>.</li>
473
- <li>Paste the MCP URL above, name it <strong>${safeApp}</strong>, click <strong>Connect</strong>.</li>
474
- <li>On the consent page, click <strong>Authorize</strong> to approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
475
- </ol>
476
- <a class="primary-link" href="https://claude.ai/customize/connectors" target="_blank" rel="noopener noreferrer">Open Claude → Connectors</a>
477
- <p class="hint">Works in Claude web and Claude Desktop. Inline MCP Apps (charts, dashboards, drafts) render automatically inside the chat.</p>
478
- </div>
479
- <div class="tab-panel" role="tabpanel" data-panel="chatgpt">
480
- <ol>
481
- <li>In ChatGPT, open <strong>Settings → Apps</strong> (Business/Enterprise/Edu workspaces with developer mode enabled).</li>
482
- <li>Scroll to <strong>Advanced settings → Create app</strong>, paste the MCP URL above, name it <strong>${safeApp}</strong>.</li>
483
- <li>Click <strong>Connect</strong>, sign in with your Agent-Native account, and approve <code>mcp:read</code>, <code>mcp:write</code>, <code>mcp:apps</code>.</li>
484
- </ol>
485
- <a class="primary-link" href="https://chatgpt.com/" target="_blank" rel="noopener noreferrer">Open ChatGPT</a>
486
- <p class="hint"><strong>Got "Connector name already exists" but don't see it under Enabled apps?</strong> ChatGPT saves a hidden draft the moment you click Create — even if you closed the OAuth popup before approving. In <strong>Settings → Apps</strong>, scroll past Enabled apps to the <strong>Drafts</strong> section ("Private apps you've created in developer mode"). Click the draft and either press <strong>Connect</strong> to finish OAuth, or use the <strong>⋯ → Delete</strong> menu and re-create. Workspace admins may also need to enable custom connectors under org settings; each member still authorizes their own account.</p>
487
- </div>
488
- <div class="tab-panel" role="tabpanel" data-panel="cursor">
489
- <ol>
490
- <li>Open <strong>Cursor → Settings → MCP</strong>.</li>
491
- <li>Click <strong>Add MCP Server</strong>, paste the MCP URL above, save.</li>
492
- <li>When prompted, sign in with your Agent-Native account and approve the MCP scopes.</li>
493
- </ol>
494
- <p class="hint">Cursor supports remote-OAuth MCP servers, same paste-URL flow as Claude — no terminal needed.</p>
495
- </div>
496
- <div class="tab-panel" role="tabpanel" data-panel="claude-code">
497
- <p>In your terminal, run:</p>
498
- <pre id="claudeCodeCmd">${safeClaudeCodeCmd}</pre>
499
- <button type="button" class="primary-link compact" data-copy="claudeCodeCmd">Copy command</button>
500
- <p class="hint">Then inside Claude Code type <code>/mcp</code>, choose <strong>${safeServerId}</strong>, and click <strong>Authenticate</strong>. Claude completes the OAuth flow itself — no static token needed.</p>
501
- </div>
502
- <div class="tab-panel" role="tabpanel" data-panel="codex">
503
- <p>In your terminal, run:</p>
504
- <pre id="codexCmd">${safeCodexCmd}</pre>
505
- <button type="button" class="primary-link compact" data-copy="codexCmd">Copy command</button>
506
- <p class="hint">Opens this page in your browser and writes Codex's <code>~/.codex/config.toml</code> automatically. The same command works for Claude Cowork and Goose.</p>
507
- </div>
508
- <div class="tab-panel" role="tabpanel" data-panel="other">
509
- <p>Any MCP-compatible client with remote-OAuth support: paste the MCP URL above. For clients without OAuth, paste this <code>.mcp.json</code> snippet and generate a static bearer below:</p>
510
- <pre id="genericConfig">${safeGenericConfig}</pre>
511
- <button type="button" class="primary-link compact" data-copy="genericConfig">Copy config</button>
507
+ ${guideTabsHtml}
512
508
  </div>
509
+ ${guidePanelsHtml}
513
510
  </div>
514
511
  </details>`;
515
512
  const tokenAdvancedOptionsHtml = safeUserCode
@@ -911,8 +908,8 @@ function renderConnectPage(params: {
911
908
 
912
909
  <details id="staticTokenMint" class="connections static-token-mint"${safeUserCode ? " open" : ""}>
913
910
  <summary>
914
- <span class="connections-title">${safeUserCode ? "Authorize this device" : "Generate a static token"}</span>
915
- <span class="connections-state">${safeUserCode ? "From your terminal" : "Advanced — clients without OAuth"}</span>
911
+ <span class="connections-title">${safeUserCode ? "Authorize this device" : MCP_STATIC_TOKEN_FALLBACK.title}</span>
912
+ <span class="connections-state">${safeUserCode ? "From your terminal" : MCP_STATIC_TOKEN_FALLBACK.state}</span>
916
913
  <span class="chev" aria-hidden="true"></span>
917
914
  </summary>
918
915
  <div class="static-token-body">
@@ -922,8 +919,8 @@ function renderConnectPage(params: {
922
919
  ${tokenAdvancedOptionsHtml}
923
920
  </div>
924
921
  <div id="result" class="result-panel hidden">
925
- <div class="result-title">Connection token created</div>
926
- <p class="result-copy" id="resultMsg">Paste this into your agent's MCP config. The token is shown only once.</p>
922
+ <div class="result-title">${MCP_STATIC_TOKEN_FALLBACK.resultTitle}</div>
923
+ <p class="result-copy" id="resultMsg">${MCP_STATIC_TOKEN_FALLBACK.resultCopy}</p>
927
924
  <div class="section-label">MCP config</div>
928
925
  <pre id="mcpJson"></pre>
929
926
  <details class="advanced">
@@ -567,10 +567,33 @@ export async function mergeCoreSharingActions(
567
567
  () => import("../sharing/actions/create-agent-resource-link.js"),
568
568
  ],
569
569
  ["upload-image", () => import("../file-upload/actions/upload-image.js")],
570
+ // Agent Jobs page — UI-only scoped reads and mutations for resource-backed
571
+ // recurring jobs and personal automations. The agent-facing native tools
572
+ // remain the canonical conversational surface.
573
+ [
574
+ "list-recurring-jobs",
575
+ () => import("../jobs/actions/list-recurring-jobs.js"),
576
+ ],
577
+ [
578
+ "manage-recurring-job",
579
+ () => import("../jobs/actions/manage-recurring-job.js"),
580
+ ],
581
+ [
582
+ "list-automations",
583
+ () => import("../triggers/actions/list-automations.js"),
584
+ ],
585
+ [
586
+ "manage-automation",
587
+ () => import("../triggers/actions/manage-automation.js"),
588
+ ],
570
589
  [
571
590
  "context-manifest-get",
572
591
  () => import("../agent/context-xray/actions/context-manifest-get.js"),
573
592
  ],
593
+ [
594
+ "context-preview-get",
595
+ () => import("../agent/context-xray/actions/context-preview-get.js"),
596
+ ],
574
597
  [
575
598
  "context-pin",
576
599
  () => import("../agent/context-xray/actions/context-pin.js"),