@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,92 @@
1
+ /**
2
+ * Shared copy and templates for connecting external MCP clients.
3
+ *
4
+ * Keep this module free of React and server-only imports so the server-rendered
5
+ * connect page and the client Agent access tab use the same instructions.
6
+ */
7
+ export const MCP_CONNECT_MCP_URL_TEMPLATE = "{appUrl}/mcp";
8
+ export const MCP_CONNECT_GUIDES = [
9
+ {
10
+ id: "claude",
11
+ label: "Claude",
12
+ steps: [
13
+ "Open Customize → Connectors in Claude.",
14
+ "Click the + button → Add custom connector.",
15
+ "Paste the MCP URL above, name it {appName}, click Connect.",
16
+ "On the consent page, click Authorize to approve mcp:read, mcp:write, mcp:apps.",
17
+ ],
18
+ action: {
19
+ kind: "link",
20
+ label: "Open Claude → Connectors",
21
+ href: "https://claude.ai/customize/connectors",
22
+ },
23
+ note: "Works in Claude web and Claude Desktop. Inline MCP Apps (charts, dashboards, drafts) render automatically inside the chat.",
24
+ },
25
+ {
26
+ id: "chatgpt",
27
+ label: "ChatGPT",
28
+ steps: [
29
+ "In ChatGPT, open Settings → Apps (Business/Enterprise/Edu workspaces with developer mode enabled).",
30
+ "Scroll to Advanced settings → Create app, paste the MCP URL above, name it {appName}.",
31
+ "Click Connect, sign in with your Agent-Native account, and approve mcp:read, mcp:write, mcp:apps.",
32
+ ],
33
+ action: {
34
+ kind: "link",
35
+ label: "Open ChatGPT",
36
+ href: "https://chatgpt.com/",
37
+ },
38
+ note: 'Got "Connector name already exists" but don\'t see it under Enabled apps? ChatGPT saves a hidden draft the moment you click Create — even if you closed the OAuth popup before approving. In Settings → Apps, scroll past Enabled apps to the Drafts section ("Private apps you\'ve created in developer mode"). Click the draft and either press Connect to finish OAuth, or use the ⋯ → Delete menu and re-create. Workspace admins may also need to enable custom connectors under org settings; each member still authorizes their own account.',
39
+ },
40
+ {
41
+ id: "cursor",
42
+ label: "Cursor",
43
+ steps: [
44
+ "Open Cursor → Settings → MCP.",
45
+ "Click Add MCP Server, paste the MCP URL above, save.",
46
+ "When prompted, sign in with your Agent-Native account and approve the MCP scopes.",
47
+ ],
48
+ note: "Cursor supports remote-OAuth MCP servers, same paste-URL flow as Claude — no terminal needed.",
49
+ },
50
+ {
51
+ id: "claude-code",
52
+ label: "Claude Code",
53
+ intro: "In your terminal, run:",
54
+ commandTemplate: "claude mcp add --transport http {serverId} {mcpUrl}",
55
+ action: { kind: "copy", label: "Copy command" },
56
+ note: "Then inside Claude Code type /mcp, choose {serverId}, and click Authenticate. Claude completes the OAuth flow itself — no static token needed.",
57
+ },
58
+ {
59
+ id: "codex",
60
+ label: "Codex",
61
+ intro: "In your terminal, run:",
62
+ commandTemplate: "npx @agent-native/core@latest connect {appUrl}",
63
+ action: { kind: "copy", label: "Copy command" },
64
+ note: "Opens this page in your browser and writes Codex's ~/.codex/config.toml automatically. The same command works for Claude Cowork and Goose.",
65
+ },
66
+ {
67
+ id: "other",
68
+ label: "Other",
69
+ intro: "Any MCP-compatible client with remote-OAuth support: paste the MCP URL above. For clients without OAuth, paste this .mcp.json snippet and generate a static bearer below:",
70
+ configTemplate: `{
71
+ "mcpServers": {
72
+ "{serverId}": {
73
+ "type": "http",
74
+ "url": "{mcpUrl}"
75
+ }
76
+ }
77
+ }`,
78
+ action: { kind: "copy", label: "Copy config" },
79
+ },
80
+ ];
81
+ export const MCP_STATIC_TOKEN_FALLBACK = {
82
+ title: "Generate a static token",
83
+ state: "Advanced — clients without OAuth",
84
+ resultTitle: "Connection token created",
85
+ resultCopy: "Paste this into your agent's MCP config. The token is shown only once.",
86
+ };
87
+ export function interpolateMcpConnectTemplate(template, values) {
88
+ return template.replace(/\{(appName|appUrl|mcpUrl|serverId)\}/g, (_, key) => {
89
+ return values[key];
90
+ });
91
+ }
92
+ //# sourceMappingURL=mcp-connect-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp-connect-content.js","sourceRoot":"","sources":["../../src/shared/mcp-connect-content.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgCH,MAAM,CAAC,MAAM,4BAA4B,GAAG,cAAc,CAAC;AAE3D,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE;YACL,wCAAwC;YACxC,4CAA4C;YAC5C,4DAA4D;YAC5D,gFAAgF;SACjF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,0BAA0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E;CAClE,CAAC;AAEX,MAAM,UAAU,6BAA6B,CAC3C,QAAgB,EAChB,MAAgC;IAEhC,OAAO,QAAQ,CAAC,OAAO,CAAC,uCAAuC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QAC1E,OAAO,MAAM,CAAC,GAAqC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * Shared copy and templates for connecting external MCP clients.\n *\n * Keep this module free of React and server-only imports so the server-rendered\n * connect page and the client Agent access tab use the same instructions.\n */\n\nexport type McpConnectGuideId =\n | \"claude\"\n | \"chatgpt\"\n | \"cursor\"\n | \"claude-code\"\n | \"codex\"\n | \"other\";\n\nexport interface McpConnectTemplateValues {\n appName: string;\n appUrl: string;\n mcpUrl: string;\n serverId: string;\n}\n\nexport interface McpConnectGuide {\n id: McpConnectGuideId;\n label: string;\n steps?: readonly string[];\n intro?: string;\n commandTemplate?: string;\n configTemplate?: string;\n action?: {\n kind: \"link\" | \"copy\";\n label: string;\n href?: string;\n };\n note?: string;\n}\n\nexport const MCP_CONNECT_MCP_URL_TEMPLATE = \"{appUrl}/mcp\";\n\nexport const MCP_CONNECT_GUIDES: readonly McpConnectGuide[] = [\n {\n id: \"claude\",\n label: \"Claude\",\n steps: [\n \"Open Customize → Connectors in Claude.\",\n \"Click the + button → Add custom connector.\",\n \"Paste the MCP URL above, name it {appName}, click Connect.\",\n \"On the consent page, click Authorize to approve mcp:read, mcp:write, mcp:apps.\",\n ],\n action: {\n kind: \"link\",\n label: \"Open Claude → Connectors\",\n href: \"https://claude.ai/customize/connectors\",\n },\n note: \"Works in Claude web and Claude Desktop. Inline MCP Apps (charts, dashboards, drafts) render automatically inside the chat.\",\n },\n {\n id: \"chatgpt\",\n label: \"ChatGPT\",\n steps: [\n \"In ChatGPT, open Settings → Apps (Business/Enterprise/Edu workspaces with developer mode enabled).\",\n \"Scroll to Advanced settings → Create app, paste the MCP URL above, name it {appName}.\",\n \"Click Connect, sign in with your Agent-Native account, and approve mcp:read, mcp:write, mcp:apps.\",\n ],\n action: {\n kind: \"link\",\n label: \"Open ChatGPT\",\n href: \"https://chatgpt.com/\",\n },\n note: 'Got \"Connector name already exists\" but don\\'t see it under Enabled apps? ChatGPT saves a hidden draft the moment you click Create — even if you closed the OAuth popup before approving. In Settings → Apps, scroll past Enabled apps to the Drafts section (\"Private apps you\\'ve created in developer mode\"). Click the draft and either press Connect to finish OAuth, or use the ⋯ → Delete menu and re-create. Workspace admins may also need to enable custom connectors under org settings; each member still authorizes their own account.',\n },\n {\n id: \"cursor\",\n label: \"Cursor\",\n steps: [\n \"Open Cursor → Settings → MCP.\",\n \"Click Add MCP Server, paste the MCP URL above, save.\",\n \"When prompted, sign in with your Agent-Native account and approve the MCP scopes.\",\n ],\n note: \"Cursor supports remote-OAuth MCP servers, same paste-URL flow as Claude — no terminal needed.\",\n },\n {\n id: \"claude-code\",\n label: \"Claude Code\",\n intro: \"In your terminal, run:\",\n commandTemplate: \"claude mcp add --transport http {serverId} {mcpUrl}\",\n action: { kind: \"copy\", label: \"Copy command\" },\n note: \"Then inside Claude Code type /mcp, choose {serverId}, and click Authenticate. Claude completes the OAuth flow itself — no static token needed.\",\n },\n {\n id: \"codex\",\n label: \"Codex\",\n intro: \"In your terminal, run:\",\n commandTemplate: \"npx @agent-native/core@latest connect {appUrl}\",\n action: { kind: \"copy\", label: \"Copy command\" },\n note: \"Opens this page in your browser and writes Codex's ~/.codex/config.toml automatically. The same command works for Claude Cowork and Goose.\",\n },\n {\n id: \"other\",\n label: \"Other\",\n intro:\n \"Any MCP-compatible client with remote-OAuth support: paste the MCP URL above. For clients without OAuth, paste this .mcp.json snippet and generate a static bearer below:\",\n configTemplate: `{\n \"mcpServers\": {\n \"{serverId}\": {\n \"type\": \"http\",\n \"url\": \"{mcpUrl}\"\n }\n }\n}`,\n action: { kind: \"copy\", label: \"Copy config\" },\n },\n] as const;\n\nexport const MCP_STATIC_TOKEN_FALLBACK = {\n title: \"Generate a static token\",\n state: \"Advanced — clients without OAuth\",\n resultTitle: \"Connection token created\",\n resultCopy:\n \"Paste this into your agent's MCP config. The token is shown only once.\",\n} as const;\n\nexport function interpolateMcpConnectTemplate(\n template: string,\n values: McpConnectTemplateValues,\n): string {\n return template.replace(/\\{(appName|appUrl|mcpUrl|serverId)\\}/g, (_, key) => {\n return values[key as keyof McpConnectTemplateValues];\n });\n}\n"]}
@@ -74,6 +74,17 @@ export default function IndexPage() {
74
74
  {t("home.settingsDescription")}
75
75
  </p>
76
76
  </Link>
77
+ <Link
78
+ to="/agent"
79
+ className="group rounded-lg border border-border/50 px-4 py-3 hover:bg-accent/50 transition-colors"
80
+ >
81
+ <p className="text-[13px] font-medium text-foreground">
82
+ {t("settings.agentTitle")}
83
+ </p>
84
+ <p className="text-[12px] text-muted-foreground mt-0.5">
85
+ {t("settings.agentDescription")}
86
+ </p>
87
+ </Link>
77
88
  </div>
78
89
  </div>
79
90
  </div>
@@ -0,0 +1,33 @@
1
+ import { AgentTabsPage, useT } from "@agent-native/core/client";
2
+ import { Link } from "react-router";
3
+
4
+ export function meta() {
5
+ return [{ title: "Agent - {{APP_TITLE}}" }];
6
+ }
7
+
8
+ export default function AgentPage() {
9
+ const t = useT();
10
+
11
+ return (
12
+ <main className="min-h-screen bg-background px-6 py-10">
13
+ <div className="mx-auto w-full max-w-5xl space-y-6">
14
+ <div className="space-y-2">
15
+ <Link
16
+ to="/settings"
17
+ className="text-[13px] text-muted-foreground hover:text-foreground"
18
+ >
19
+ {t("settings.title")}
20
+ </Link>
21
+ <h1 className="text-2xl font-semibold tracking-tight text-foreground">
22
+ {t("settings.agentTitle")}
23
+ </h1>
24
+ <p className="text-[14px] leading-relaxed text-muted-foreground">
25
+ {t("settings.agentDescription")}
26
+ </p>
27
+ </div>
28
+
29
+ <AgentTabsPage className="min-h-[640px] rounded-lg border border-border/50" />
30
+ </div>
31
+ </main>
32
+ );
33
+ }
@@ -57,6 +57,12 @@ in the moment of agent use.
57
57
  missing-secret states, OAuth grants, and provider connection health.
58
58
  - **Agent UX kit**: sidebar, composer, staged context, mentions, voice, human
59
59
  approval, generative UI, progress, and screen-state exposure.
60
+ - **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
61
+ `@agent-native/core/client`) with Context, Files, Connections, Jobs, and
62
+ Access tabs plus a Personal/Organization scope toggle. The canonical home
63
+ for context transparency, MCP servers, A2A remote agents, recurring
64
+ jobs/automations, and external-client connect flows. See the `agent-page`
65
+ skill.
60
66
  - **History and recovery kit**: audit log, activity feed, version history,
61
67
  checkpoints, undo, redo, restore, and proof-of-done.
62
68
  - **Comments and review kit**: anchored comments, pins, mentions, review
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: agent-page
3
+ description: >-
4
+ The full-page Agent surface (/agent) with Context, Files, Connections, Jobs,
5
+ and Access tabs. Use when mounting the Agent page in a template, adding an
6
+ app-specific tab, surfacing context transparency, MCP servers, A2A agents,
7
+ recurring jobs, or external-client connect flows in the UI.
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Agent Page
13
+
14
+ `AgentTabsPage` (from `@agent-native/core/client`, source
15
+ `packages/core/src/client/agent-page/`) is the canonical full-page surface for
16
+ everything that can influence the agent. Design principles:
17
+
18
+ - The page answers "what can influence this agent, and why" — it is not a
19
+ generic admin console.
20
+ - Capability and access stay separate: **Connections** is what this agent can
21
+ reach; **Access** is who can reach this agent.
22
+ - It is a thin shell that re-hosts existing components (ResourcesPanel, MCP
23
+ hooks, AgentsSection, context X-Ray, jobs actions) — do not re-implement
24
+ those surfaces inside it.
25
+ - Context must be inspectable, attributable, and governable — provenance and
26
+ governance tiers, not just a token meter.
27
+
28
+ ## Tabs
29
+
30
+ | Tab | Contents |
31
+ | --- | --- |
32
+ | `context` | System-vs-conversation split meter, provenance-grouped system sections (governance tiers: required/inherited/user), live-thread manifest. Backed by `context-preview-get` / `context-manifest-get` (see `context-xray` skill). |
33
+ | `files` | ResourcesPanel (skills, instructions, memory, uploads) with the virtual `mcp-servers/` folder hidden (`showMcpServers={false}`). |
34
+ | `connections` | MCP server management (both scopes, admin-gated org writes) plus A2A remote agents this app can call. |
35
+ | `jobs` | Recurring jobs (personal + org) and automations (personal) with pause/resume/delete (see `recurring-jobs` skill). |
36
+ | `access` | Copyable MCP URL and A2A agent-card URL, per-client connect steps (Claude, ChatGPT, Cursor, Claude Code, Codex, Other) from `packages/core/src/shared/mcp-connect-content.ts` (shared with the `/mcp/connect` route — edit the shared module, never fork copy), static-token fallback link. Grants/scopes/revocation UI is future work. |
37
+
38
+ ## Mounting In A Template
39
+
40
+ 1. Add an `/agent` route following the template's settings-route pattern
41
+ (`app/routes/agent.tsx` or `_app.agent.tsx`), mounting `AgentTabsPage`.
42
+ CSR is fine; keep the app shell in `root.tsx` so navigation does not
43
+ remount it (`client-side-routing` skill).
44
+ 2. Add an "Agent" item to primary navigation and the command palette,
45
+ mirroring the Settings entries. Link-first (`native-navigation` skill).
46
+ 3. Pass `agentPageHref="/agent"` to `AgentSidebar` so the sidebar workspace
47
+ and settings modes link out to the full page.
48
+ 4. Hash deep-links work out of the box: `/agent#context`, `/agent#files`,
49
+ `/agent#connections`, `/agent#jobs`, `/agent#access`.
50
+ 5. App-specific additions go in `extraTabs` (same `SettingsTabItem` shape as
51
+ the settings page); hide built-ins only with `hiddenTabs` when a template
52
+ genuinely lacks the underlying capability.
53
+
54
+ ## Scope
55
+
56
+ The page-level Personal/Organization toggle passes `scope` (and
57
+ `canManageOrg`) to every tab via `AgentPageTabProps`. Hide nothing silently:
58
+ if a capability is personal-only today (e.g. automations), the org view says
59
+ so honestly instead of faking an org variant.
@@ -20,15 +20,40 @@ counts, then lets the user or agent pin, evict, or restore individual segments.
20
20
  | Action | When to use |
21
21
  | --- | --- |
22
22
  | `context-manifest-get` | Read the current manifest for a thread. Returns token totals, segment status, source, and whether changes are enforceable. |
23
+ | `context-preview-get` | Compose the would-be system context for the current user/org/app without a live thread. Returns labeled system sections with provenance, governance tier, token counts, and bounded previews. Backs the Agent page Context tab. |
23
24
  | `context-pin` | Preserve a segment across future compaction/model calls. Use for task specs, acceptance criteria, user constraints, and other durable context. |
24
25
  | `context-evict` | Exclude a stale or irrelevant segment from future model calls. Eviction is reversible and never deletes chat history. |
25
26
  | `context-restore` | Undo a pin, evict, or summarize directive for a segment. |
26
27
  | `context-report` | External hosts can report their visible context inventory. These manifests are advisory unless Agent-Native owns the emitted content. |
27
28
 
29
+ ## System Sections
30
+
31
+ Manifests now cover the system-prompt half of context, not just conversation
32
+ segments. Each system section carries a `provenance` label (framework-core,
33
+ actions-prompt, template, enterprise-workspace-core, sql-workspace,
34
+ legacy-app-default, organization, personal, memory, db-schema, tools,
35
+ model-overlay, runtime-context) and a `governance` tier:
36
+
37
+ - `required` — framework/enterprise policy; can never be altered by the user.
38
+ - `inherited` — template/org/workspace instructions; managed elsewhere,
39
+ visible here.
40
+ - `user` — personal instructions and memory; editable through Files.
41
+
42
+ System sections are display-only provenance: they cannot be pinned, evicted,
43
+ or summarized. The persisted manifest stores source refs, scope, content
44
+ hashes, token counts, and bounded previews (~200 chars) — never raw prompt
45
+ bodies; full content stays behind the resource/access model. The in-chat
46
+ X-Ray panel groups these under "System", and the Agent page Context tab
47
+ renders the full breakdown (via `context-preview-get`) with a
48
+ system-vs-conversation split meter. Manifests are the latest snapshot per
49
+ thread; there is no per-iteration history.
50
+
28
51
  ## Rules
29
52
 
30
53
  - Never evict or summarize protected segments. The manifest marks active-turn
31
54
  user/tool/thinking context as `protected`.
55
+ - System sections are never evictable; required/inherited tiers are locked by
56
+ design — do not present controls that imply otherwise.
32
57
  - Prefer pinning the user's task, requirements, and decisions before evicting
33
58
  large stale tool results.
34
59
  - Eviction excludes content from future model calls; it does not delete the
@@ -28,6 +28,13 @@ For a deliberately isolated app, add that app directly at
28
28
  `https://<app>.agent-native.com/mcp` or
29
29
  `https://<your-host>/mcp`.
30
30
 
31
+ In-app, the Agent page's **Access** tab (`/agent#access`, see the
32
+ `agent-page` skill) is the discoverable home for all of this: it shows the
33
+ app's copyable MCP URL and A2A agent-card URL, per-client setup steps
34
+ (Claude, ChatGPT, Cursor, Claude Code, Codex, Other), and links to the full
35
+ `/mcp/connect` page including the static-token fallback. Point users there
36
+ instead of dictating URLs in chat.
37
+
31
38
  OAuth-capable hosts should use the standard remote MCP OAuth flow. Claude
32
39
  connectors and Claude Code `/mcp` authentication discover the protected
33
40
  resource, open the Agent-Native authorization page, and store their own tokens.
@@ -29,6 +29,15 @@ Recurring jobs are scheduled tasks the agent executes automatically on a cron sc
29
29
  | `manage-jobs` | `list` | List all jobs and their status |
30
30
  | `manage-jobs` | `update` | Update schedule, instructions, or toggle enabled |
31
31
 
32
+ ## UI Surface
33
+
34
+ Users can see and manage jobs without the agent on the Agent page's Jobs tab
35
+ (`/agent#jobs`, `AgentJobsTab` in `packages/core/src/client/agent-page/`):
36
+ recurring jobs (personal and organization scope) with pause/resume/delete and
37
+ run status, plus automations (personal-only today). Backed by the scoped
38
+ list/manage actions in `packages/core/src/jobs/actions/` — direct users there
39
+ instead of describing job files when they just want to view or toggle jobs.
40
+
32
41
  ## Key Files
33
42
 
34
43
  | File | Purpose |
@@ -0,0 +1,24 @@
1
+ export interface AutomationActionItem {
2
+ id: string;
3
+ name: string;
4
+ path: string;
5
+ scope: "personal" | "organization";
6
+ triggerType: "event" | "schedule";
7
+ event: string | null;
8
+ schedule: string | null;
9
+ scheduleDescription: string | null;
10
+ condition: string | null;
11
+ body: string;
12
+ enabled: boolean;
13
+ lastRun: string | null;
14
+ lastStatus: string | null;
15
+ lastError: string | null;
16
+ nextRun: string | null;
17
+ createdBy: string | null;
18
+ canUpdate: boolean;
19
+ }
20
+ declare const _default: import("../../action.js").ActionDefinition<{
21
+ scope?: "organization" | "personal";
22
+ }, AutomationActionItem[]>;
23
+ export default _default;
24
+ //# sourceMappingURL=list-automations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-automations.d.ts","sourceRoot":"","sources":["../../../src/triggers/actions/list-automations.ts"],"names":[],"mappings":"AA6BA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,GAAG,cAAc,CAAC;IACnC,WAAW,EAAE,OAAO,GAAG,UAAU,CAAC;IAClC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,72 @@
1
+ import { z } from "zod";
2
+ import { defineAction } from "../../action.js";
3
+ import { describeCron, isValidCron, nextOccurrence } from "../../jobs/cron.js";
4
+ import { resourceGetByPath, resourceList } from "../../resources/store.js";
5
+ import { parseTriggerFrontmatter } from "../dispatcher.js";
6
+ const scopeSchema = z.enum(["personal", "organization"]);
7
+ function hasTriggerFrontmatter(content) {
8
+ const header = content.match(/^---\n([\s\S]*?)\n---/m)?.[1] ?? "";
9
+ return /^triggerType\s*:/m.test(header);
10
+ }
11
+ function nextRun(meta) {
12
+ if (!meta.enabled)
13
+ return null;
14
+ if (meta.nextRun)
15
+ return meta.nextRun;
16
+ if (meta.triggerType === "schedule" &&
17
+ meta.schedule &&
18
+ isValidCron(meta.schedule)) {
19
+ return nextOccurrence(meta.schedule).toISOString();
20
+ }
21
+ return null;
22
+ }
23
+ export default defineAction({
24
+ description: "List event-triggered and schedule-triggered automations in the selected scope. Automations are currently personal-only.",
25
+ agentTool: false,
26
+ schema: z.object({
27
+ scope: scopeSchema.default("personal"),
28
+ }),
29
+ http: { method: "GET" },
30
+ readOnly: true,
31
+ parallelSafe: true,
32
+ run: async ({ scope }, ctx) => {
33
+ const userEmail = ctx?.userEmail;
34
+ if (!userEmail)
35
+ throw new Error("Not authenticated.");
36
+ if (scope === "organization")
37
+ return [];
38
+ const owner = userEmail;
39
+ const resources = await resourceList(owner, "jobs/");
40
+ const automations = [];
41
+ for (const resource of resources) {
42
+ if (!resource.path.endsWith(".md") || resource.path.endsWith(".keep")) {
43
+ continue;
44
+ }
45
+ const full = await resourceGetByPath(owner, resource.path);
46
+ if (!full || !hasTriggerFrontmatter(full.content))
47
+ continue;
48
+ const { meta, body } = parseTriggerFrontmatter(full.content);
49
+ automations.push({
50
+ id: full.id,
51
+ name: resource.path.replace(/^jobs\//, "").replace(/\.md$/, ""),
52
+ path: resource.path,
53
+ scope,
54
+ triggerType: meta.triggerType,
55
+ event: meta.event ?? null,
56
+ schedule: meta.schedule || null,
57
+ scheduleDescription: meta.schedule ? describeCron(meta.schedule) : null,
58
+ condition: meta.condition ?? null,
59
+ body,
60
+ enabled: meta.enabled,
61
+ lastRun: meta.lastRun ?? null,
62
+ lastStatus: meta.lastStatus ?? null,
63
+ lastError: meta.lastError ?? null,
64
+ nextRun: nextRun(meta),
65
+ createdBy: meta.createdBy ?? null,
66
+ canUpdate: true,
67
+ });
68
+ }
69
+ return automations;
70
+ },
71
+ });
72
+ //# sourceMappingURL=list-automations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-automations.js","sourceRoot":"","sources":["../../../src/triggers/actions/list-automations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,WAAW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AC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;gBACvE,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI;gBACjC,IAAI;gBACJ,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI;gBAC7B,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI;gBACnC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI;gBACjC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC;gBACtB,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,IAAI;gBACjC,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport { describeCron, isValidCron, nextOccurrence } from \"../../jobs/cron.js\";\nimport { resourceGetByPath, resourceList } from \"../../resources/store.js\";\nimport { parseTriggerFrontmatter } from \"../dispatcher.js\";\n\nconst scopeSchema = z.enum([\"personal\", \"organization\"]);\n\nfunction hasTriggerFrontmatter(content: string): boolean {\n const header = content.match(/^---\\n([\\s\\S]*?)\\n---/m)?.[1] ?? \"\";\n return /^triggerType\\s*:/m.test(header);\n}\n\nfunction nextRun(\n meta: ReturnType<typeof parseTriggerFrontmatter>[\"meta\"],\n): string | null {\n if (!meta.enabled) return null;\n if (meta.nextRun) return meta.nextRun;\n if (\n meta.triggerType === \"schedule\" &&\n meta.schedule &&\n isValidCron(meta.schedule)\n ) {\n return nextOccurrence(meta.schedule).toISOString();\n }\n return null;\n}\n\nexport interface AutomationActionItem {\n id: string;\n name: string;\n path: string;\n scope: \"personal\" | \"organization\";\n triggerType: \"event\" | \"schedule\";\n event: string | null;\n schedule: string | null;\n scheduleDescription: string | null;\n condition: string | null;\n body: string;\n enabled: boolean;\n lastRun: string | null;\n lastStatus: string | null;\n lastError: string | null;\n nextRun: string | null;\n createdBy: string | null;\n canUpdate: boolean;\n}\n\nexport default defineAction({\n description:\n \"List event-triggered and schedule-triggered automations in the selected scope. Automations are currently personal-only.\",\n agentTool: false,\n schema: z.object({\n scope: scopeSchema.default(\"personal\"),\n }),\n http: { method: \"GET\" },\n readOnly: true,\n parallelSafe: true,\n run: async ({ scope }, ctx): Promise<AutomationActionItem[]> => {\n const userEmail = ctx?.userEmail;\n if (!userEmail) throw new Error(\"Not authenticated.\");\n if (scope === \"organization\") return [];\n\n const owner = userEmail;\n const resources = await resourceList(owner, \"jobs/\");\n const automations: AutomationActionItem[] = [];\n\n for (const resource of resources) {\n if (!resource.path.endsWith(\".md\") || resource.path.endsWith(\".keep\")) {\n continue;\n }\n const full = await resourceGetByPath(owner, resource.path);\n if (!full || !hasTriggerFrontmatter(full.content)) continue;\n const { meta, body } = parseTriggerFrontmatter(full.content);\n automations.push({\n id: full.id,\n name: resource.path.replace(/^jobs\\//, \"\").replace(/\\.md$/, \"\"),\n path: resource.path,\n scope,\n triggerType: meta.triggerType,\n event: meta.event ?? null,\n schedule: meta.schedule || null,\n scheduleDescription: meta.schedule ? describeCron(meta.schedule) : null,\n condition: meta.condition ?? null,\n body,\n enabled: meta.enabled,\n lastRun: meta.lastRun ?? null,\n lastStatus: meta.lastStatus ?? null,\n lastError: meta.lastError ?? null,\n nextRun: nextRun(meta),\n createdBy: meta.createdBy ?? null,\n canUpdate: true,\n });\n }\n\n return automations;\n },\n});\n"]}
@@ -0,0 +1,18 @@
1
+ declare const _default: import("../../action.js").ActionDefinition<{
2
+ operation: "delete" | "update";
3
+ name: string;
4
+ scope?: "organization" | "personal";
5
+ enabled?: boolean;
6
+ }, {
7
+ deleted: boolean;
8
+ name: string;
9
+ enabled?: undefined;
10
+ nextRun?: undefined;
11
+ } | {
12
+ deleted?: undefined;
13
+ name: string;
14
+ enabled: boolean;
15
+ nextRun: string;
16
+ }>;
17
+ export default _default;
18
+ //# sourceMappingURL=manage-automation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manage-automation.d.ts","sourceRoot":"","sources":["../../../src/triggers/actions/manage-automation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ import { z } from "zod";
2
+ import { defineAction } from "../../action.js";
3
+ import { isValidCron, nextOccurrence } from "../../jobs/cron.js";
4
+ import { resourceDelete, resourceGetByPath, resourcePut, } from "../../resources/store.js";
5
+ import { buildTriggerContent, parseTriggerFrontmatter, refreshEventSubscriptions, } from "../dispatcher.js";
6
+ export default defineAction({
7
+ description: "Enable, disable, or delete a personal automation from the Agent Jobs page.",
8
+ agentTool: false,
9
+ schema: z.object({
10
+ operation: z.enum(["update", "delete"]),
11
+ name: z.string().min(1),
12
+ scope: z.enum(["personal", "organization"]).default("personal"),
13
+ enabled: z.boolean().optional(),
14
+ }),
15
+ run: async ({ operation, name, scope, enabled }, ctx) => {
16
+ const userEmail = ctx?.userEmail;
17
+ if (!userEmail)
18
+ throw new Error("Not authenticated.");
19
+ if (scope === "organization") {
20
+ throw Object.assign(new Error("Automations are personal today."), {
21
+ statusCode: 400,
22
+ });
23
+ }
24
+ const path = `jobs/${name}.md`;
25
+ const resource = await resourceGetByPath(userEmail, path);
26
+ if (!resource) {
27
+ throw Object.assign(new Error(`Automation "${name}" not found.`), {
28
+ statusCode: 404,
29
+ });
30
+ }
31
+ const { meta, body } = parseTriggerFrontmatter(resource.content);
32
+ const header = resource.content.match(/^---\n([\s\S]*?)\n---/m)?.[1] ?? "";
33
+ if (!/^triggerType\s*:/m.test(header)) {
34
+ throw Object.assign(new Error(`Automation "${name}" not found.`), {
35
+ statusCode: 404,
36
+ });
37
+ }
38
+ if (operation === "delete") {
39
+ await resourceDelete(resource.id);
40
+ await refreshEventSubscriptions();
41
+ return { deleted: true, name };
42
+ }
43
+ if (enabled === undefined) {
44
+ throw Object.assign(new Error("enabled is required for update."), {
45
+ statusCode: 400,
46
+ });
47
+ }
48
+ meta.enabled = enabled;
49
+ if (enabled &&
50
+ meta.triggerType === "schedule" &&
51
+ meta.schedule &&
52
+ isValidCron(meta.schedule)) {
53
+ meta.nextRun = nextOccurrence(meta.schedule).toISOString();
54
+ }
55
+ await resourcePut(resource.owner, resource.path, buildTriggerContent(meta, body));
56
+ await refreshEventSubscriptions();
57
+ return { name, enabled: meta.enabled, nextRun: meta.nextRun ?? null };
58
+ },
59
+ });
60
+ //# sourceMappingURL=manage-automation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manage-automation.js","sourceRoot":"","sources":["../../../src/triggers/actions/manage-automation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAE1B,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,4EAA4E;IAC9E,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACvB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;QAC/D,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,GA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;QACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,iCAAiC,CAAC,EAAE;gBAChE,UAAU,EAAE,GAAG;aAChB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IACE,OAAO;YACP,IAAI,CAAC,WAAW,KAAK,UAAU;YAC/B,IAAI,CAAC,QAAQ;YACb,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC1B,CAAC;YACD,IAAI,CAAC,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QAC7D,CAAC;QACD,MAAM,WAAW,CACf,QAAQ,CAAC,KAAK,EACd,QAAQ,CAAC,IAAI,EACb,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAChC,CAAC;QACF,MAAM,yBAAyB,EAAE,CAAC;QAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;IACxE,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { defineAction } from \"../../action.js\";\nimport { isValidCron, nextOccurrence } from \"../../jobs/cron.js\";\nimport {\n resourceDelete,\n resourceGetByPath,\n resourcePut,\n} from \"../../resources/store.js\";\nimport {\n buildTriggerContent,\n parseTriggerFrontmatter,\n refreshEventSubscriptions,\n} from \"../dispatcher.js\";\n\nexport default defineAction({\n description:\n \"Enable, disable, or delete a personal automation from the Agent Jobs page.\",\n agentTool: false,\n schema: z.object({\n operation: z.enum([\"update\", \"delete\"]),\n name: z.string().min(1),\n scope: z.enum([\"personal\", \"organization\"]).default(\"personal\"),\n enabled: z.boolean().optional(),\n }),\n run: async ({ operation, name, scope, enabled }, ctx) => {\n const userEmail = ctx?.userEmail;\n if (!userEmail) throw new Error(\"Not authenticated.\");\n if (scope === \"organization\") {\n throw Object.assign(new Error(\"Automations are personal today.\"), {\n statusCode: 400,\n });\n }\n\n const path = `jobs/${name}.md`;\n const resource = await resourceGetByPath(userEmail, path);\n if (!resource) {\n throw Object.assign(new Error(`Automation \"${name}\" not found.`), {\n statusCode: 404,\n });\n }\n const { meta, body } = parseTriggerFrontmatter(resource.content);\n const header = resource.content.match(/^---\\n([\\s\\S]*?)\\n---/m)?.[1] ?? \"\";\n if (!/^triggerType\\s*:/m.test(header)) {\n throw Object.assign(new Error(`Automation \"${name}\" not found.`), {\n statusCode: 404,\n });\n }\n\n if (operation === \"delete\") {\n await resourceDelete(resource.id);\n await refreshEventSubscriptions();\n return { deleted: true, name };\n }\n if (enabled === undefined) {\n throw Object.assign(new Error(\"enabled is required for update.\"), {\n statusCode: 400,\n });\n }\n\n meta.enabled = enabled;\n if (\n enabled &&\n meta.triggerType === \"schedule\" &&\n meta.schedule &&\n isValidCron(meta.schedule)\n ) {\n meta.nextRun = nextOccurrence(meta.schedule).toISOString();\n }\n await resourcePut(\n resource.owner,\n resource.path,\n buildTriggerContent(meta, body),\n );\n await refreshEventSubscriptions();\n return { name, enabled: meta.enabled, nextRun: meta.nextRun ?? null };\n },\n});\n"]}
@@ -392,6 +392,48 @@ app environment and pass the caller identity (`userEmail`) so outbound calls are
392
392
  signed as JWT bearer tokens. Use `apiKeyEnv` only for legacy external peers that
393
393
  expect a static bearer token. Use local actions instead of invoking yourself.
394
394
 
395
+ ## CLI: agent-native invoke {#cli-invoke}
396
+
397
+ `agent-native invoke` is a thin CLI wrapper over the same resolve-and-call primitive as `agentNative.invoke()`. Use it to trigger an app's agent from a shell script, a CI job, a cron entry, or any external system that can shell out — the CLI equivalent of posting to `/_agent-native/a2a` by hand.
398
+
399
+ ```bash
400
+ agent-native invoke <app-or-url> "prompt" [options]
401
+ ```
402
+
403
+ ```bash
404
+ # Resolve "analytics" in the workspace registry and wait for the reply
405
+ agent-native invoke analytics "Summarize signups by source this month"
406
+
407
+ # Call a deployed app directly by URL, reading the bearer token from env
408
+ agent-native invoke https://analytics.example.com "How many signups last week?" \
409
+ --api-key-env ANALYTICS_A2A_KEY
410
+
411
+ # Force one blocking message/send instead of the default async+poll
412
+ agent-native invoke analytics "Quick lookup" --sync
413
+
414
+ # Machine-readable output for scripting
415
+ agent-native invoke analytics "Summarize signups" --json
416
+ ```
417
+
418
+ | Option | Description |
419
+ | ------------------------- | ------------------------------------------------------------------------- |
420
+ | `--agent <id\|name\|url>` | Target agent (alias for the positional `<app-or-url>`) |
421
+ | `--message <text>` | Prompt (alias for the positional `"prompt"`) |
422
+ | `--api-key-env <name>` | Read the bearer token from an environment variable |
423
+ | `--api-key <token>` | Bearer token value, passed inline |
424
+ | `--context-id <id>` | A2A `contextId`, to continue an existing task's conversation |
425
+ | `--self-app-id <id>` | Current app id, used for self-call prevention |
426
+ | `--self-url <url>` | Current app URL, used for self-call prevention |
427
+ | `--timeout-ms <n>` | Async polling timeout |
428
+ | `--poll-interval-ms <n>` | Async polling interval |
429
+ | `--sync` | Use one blocking `message/send` request instead of the async+poll default |
430
+ | `--no-hint` | Send the prompt as-is, without the cross-app invocation hint |
431
+ | `--json` | Print target metadata and response text as JSON |
432
+
433
+ Like `callAgent()`, the CLI defaults to async + poll (`invokeAgent` → `callAgent` under the hood), which is the safe choice against hosted/serverless targets — see [Serverless webhook and gateway timeouts](#json-rpc-methods) above. Pass `--sync` only when you know the target isn't behind a gateway with a short execution limit.
434
+
435
+ The target resolves the same way as `agentNative.invoke()`: by workspace app id, by app name, or by a full URL — so the same command works against a sibling app in a multi-app workspace or an arbitrary A2A peer elsewhere.
436
+
395
437
  ## Task lifecycle {#task-lifecycle}
396
438
 
397
439
  Each message creates a task that moves through these states:
@@ -29,6 +29,49 @@ start in chat, appear as a native table or chart, become a durable page in the
29
29
  app, and still run from jobs, scripts, MCP, or A2A without changing the operation
30
30
  the agent calls.
31
31
 
32
+ ## Full-page Agent workspace {#agent-page}
33
+
34
+ When a full application needs a durable place to inspect and configure its
35
+ agent, mount `AgentTabsPage` at `/agent`. Current templates pair that route
36
+ with an app-navigation entry and pass `agentPageHref="/agent"` to
37
+ `AgentSidebar`; the sidebar's Resources and Settings modes can then link to the
38
+ full page without duplicating those flows.
39
+
40
+ ```tsx filename="app/routes/agent.tsx"
41
+ import { AgentTabsPage } from "@agent-native/core/client";
42
+
43
+ export default function AgentRoute() {
44
+ return <AgentTabsPage />;
45
+ }
46
+ ```
47
+
48
+ The shared page currently provides five tabs:
49
+
50
+ - **Context** shows a scope preview, token budget, ordered system sections
51
+ grouped by provenance, governance, and source, a list/treemap view, and the
52
+ latest live-thread snapshot. It is a current snapshot, not per-iteration
53
+ provenance history.
54
+ - **Files** re-hosts the existing `ResourcesPanel` for personal or
55
+ organization resources.
56
+ - **Connections** re-hosts MCP server management and the A2A remote-agent list:
57
+ what this app's agent can call.
58
+ - **Jobs** shows scoped recurring jobs and automations with the existing
59
+ pause/resume, details, and delete flows. Automations are personal-only today.
60
+ - **Access** shows the app MCP URL, an A2A agent card when available, and shared
61
+ setup guides for Claude, ChatGPT, Cursor, Claude Code, Codex, and other
62
+ clients. It links to `/mcp/connect` for the full connect flow and token
63
+ fallback.
64
+
65
+ The page-level **Personal / Organization** toggle supplies scope to the tabs.
66
+ Members can inspect organization data while organization management remains
67
+ restricted to owners/admins where the hosted component enforces that boundary.
68
+ The design goal is inspectable, attributable, governable context, with
69
+ capability separated from access: Connections describes what the app can call;
70
+ Access describes how external clients connect to it. The page is a thin shell
71
+ over existing components, actions, and access checks—not a new admin console.
72
+ Grants, scope editing, revocation UI, and per-iteration provenance history are
73
+ not provided by this page yet.
74
+
32
75
  <Diagram id="doc-block-hvdxgh" title="The surface spectrum" summary={"One action surface, four product shapes — each adds UI without changing the operation underneath."}>
33
76
 
34
77
  ```html