@agent-native/core 0.90.2 → 0.90.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/docs/content/agent-native-toolkit.mdx +87 -80
  4. package/corpus/core/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
  5. package/corpus/core/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
  6. package/corpus/core/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
  7. package/corpus/core/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
  8. package/corpus/core/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
  9. package/corpus/core/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
  10. package/corpus/core/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
  11. package/corpus/core/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
  12. package/corpus/core/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
  13. package/corpus/core/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
  14. package/corpus/core/docs/content/toolkit-agent-ux.mdx +43 -0
  15. package/corpus/core/docs/content/toolkit-app-adapters.mdx +9 -0
  16. package/corpus/core/docs/content/toolkit-collaboration-ui.mdx +12 -0
  17. package/corpus/core/docs/content/toolkit-collaboration.mdx +74 -0
  18. package/corpus/core/docs/content/toolkit-command-navigation.mdx +106 -0
  19. package/corpus/core/docs/content/toolkit-comments-review.mdx +98 -0
  20. package/corpus/core/docs/content/toolkit-history.mdx +95 -0
  21. package/corpus/core/docs/content/toolkit-observability.mdx +41 -0
  22. package/corpus/core/docs/content/toolkit-org-team.mdx +80 -0
  23. package/corpus/core/docs/content/toolkit-resources.mdx +57 -0
  24. package/corpus/core/docs/content/toolkit-settings.mdx +65 -0
  25. package/corpus/core/docs/content/toolkit-setup-connections.mdx +109 -0
  26. package/corpus/core/docs/content/toolkit-sharing-ui.mdx +18 -6
  27. package/corpus/core/docs/content/toolkit-sharing.mdx +81 -0
  28. package/corpus/core/docs/content/toolkit-shell-hooks.mdx +9 -0
  29. package/corpus/core/docs/content/toolkit-ui.mdx +9 -0
  30. package/corpus/core/package.json +35 -1
  31. package/corpus/core/src/agent/engine/ai-sdk-engine.ts +19 -1
  32. package/corpus/core/src/agent/engine/anthropic-engine.ts +25 -1
  33. package/corpus/core/src/agent/engine/registry.ts +23 -16
  34. package/corpus/core/src/agent/production-agent.ts +37 -6
  35. package/corpus/core/src/client/command-navigation/index.ts +15 -0
  36. package/corpus/core/src/client/comments-review/index.ts +1 -0
  37. package/corpus/core/src/client/history/VersionHistoryPanel.tsx +145 -0
  38. package/corpus/core/src/client/history/index.ts +18 -0
  39. package/corpus/core/src/client/history/use-history.ts +86 -0
  40. package/corpus/core/src/client/index.ts +76 -9
  41. package/corpus/core/src/client/org/OrgSwitcher.tsx +6 -6
  42. package/corpus/core/src/client/org/RequireActiveOrg.tsx +2 -2
  43. package/corpus/core/src/client/org/TeamPage.tsx +3 -3
  44. package/corpus/core/src/client/org/hooks.ts +32 -0
  45. package/corpus/core/src/client/org/index.ts +30 -1
  46. package/corpus/core/src/client/org-team/index.ts +1 -0
  47. package/corpus/core/src/client/review/ReviewStatusBadge.tsx +39 -0
  48. package/corpus/core/src/client/review/ReviewThreadPanel.tsx +278 -0
  49. package/corpus/core/src/client/review/index.ts +25 -0
  50. package/corpus/core/src/client/review/use-review.ts +114 -0
  51. package/corpus/core/src/client/settings/index.ts +11 -1
  52. package/corpus/core/src/client/setup-connections/BuilderConnectCard.tsx +94 -0
  53. package/corpus/core/src/client/setup-connections/ProviderReadinessBadge.tsx +73 -0
  54. package/corpus/core/src/client/setup-connections/SetupConnectionsPage.tsx +94 -0
  55. package/corpus/core/src/client/setup-connections/index.ts +46 -0
  56. package/corpus/core/src/client/sharing/ShareButton.tsx +20 -14
  57. package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
  58. package/corpus/core/src/command-navigation/actions.ts +100 -0
  59. package/corpus/core/src/command-navigation/index.ts +12 -0
  60. package/corpus/core/src/comments-review/index.ts +1 -0
  61. package/corpus/core/src/file-upload/builder.ts +24 -3
  62. package/corpus/core/src/file-upload/types.ts +3 -1
  63. package/corpus/core/src/history/actions/create-resource-version.ts +89 -0
  64. package/corpus/core/src/history/actions/get-resource-version.ts +60 -0
  65. package/corpus/core/src/history/actions/list-resource-history.ts +53 -0
  66. package/corpus/core/src/history/actions/list-resource-versions.ts +43 -0
  67. package/corpus/core/src/history/actions/restore-resource-version.ts +96 -0
  68. package/corpus/core/src/history/index.ts +27 -0
  69. package/corpus/core/src/history/registry.ts +99 -0
  70. package/corpus/core/src/history/store.ts +348 -0
  71. package/corpus/core/src/history/types.ts +69 -0
  72. package/corpus/core/src/index.ts +10 -0
  73. package/corpus/core/src/navigation/index.ts +170 -0
  74. package/corpus/core/src/org/index.ts +8 -0
  75. package/corpus/core/src/org/permissions.ts +30 -0
  76. package/corpus/core/src/org-team/index.ts +1 -0
  77. package/corpus/core/src/private-blob/registry.ts +1 -0
  78. package/corpus/core/src/review/actions/consume-review-feedback.ts +38 -0
  79. package/corpus/core/src/review/actions/create-review-comment.ts +107 -0
  80. package/corpus/core/src/review/actions/delete-review-comment.ts +55 -0
  81. package/corpus/core/src/review/actions/get-review-feedback.ts +54 -0
  82. package/corpus/core/src/review/actions/list-review-comments.ts +53 -0
  83. package/corpus/core/src/review/actions/reply-review-comment.ts +107 -0
  84. package/corpus/core/src/review/actions/resolve-review-thread.ts +60 -0
  85. package/corpus/core/src/review/actions/set-review-status.ts +58 -0
  86. package/corpus/core/src/review/index.ts +36 -0
  87. package/corpus/core/src/review/mentions.ts +44 -0
  88. package/corpus/core/src/review/registry.ts +99 -0
  89. package/corpus/core/src/review/store.ts +687 -0
  90. package/corpus/core/src/review/types.ts +97 -0
  91. package/corpus/core/src/server/action-discovery.ts +54 -0
  92. package/corpus/core/src/server/agent-engine-api-key-route.ts +5 -0
  93. package/corpus/core/src/server/credential-provider.ts +108 -0
  94. package/corpus/core/src/setup-connections/index.ts +89 -0
  95. package/corpus/core/src/setup-connections/onboarding.ts +47 -0
  96. package/corpus/core/src/transcription/builder-transcription.ts +9 -2
  97. package/corpus/core/src/vite/action-types-plugin.ts +52 -0
  98. package/corpus/templates/analytics/app/components/layout/Layout.tsx +2 -1
  99. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +2 -2
  100. package/corpus/templates/analytics/app/global.css +22 -10
  101. package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -1
  102. package/corpus/templates/analytics/app/i18n-data.ts +81 -13
  103. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -2
  104. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +2 -2
  105. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +528 -108
  106. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +466 -183
  107. package/corpus/templates/analytics/changelog/2026-07-07-session-replays-load-sooner-show-clearer-activity-timelines-.md +6 -0
  108. package/corpus/templates/brain/app/routes/settings.tsx +2 -2
  109. package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +32 -6
  110. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +120 -40
  111. package/corpus/templates/calendar/app/hooks/use-people.ts +55 -0
  112. package/corpus/templates/calendar/changelog/2026-07-07-guest-suggestions-now-find-coworkers-from-your-google-worksp.md +6 -0
  113. package/corpus/templates/calendar/changelog/2026-07-07-zoom-stays-selected-after-connecting-it-from-a-draft-event.md +6 -0
  114. package/corpus/templates/clips/actions/create-recording.ts +5 -1
  115. package/corpus/templates/clips/actions/finalize-recording.ts +140 -1
  116. package/corpus/templates/clips/actions/import-loom-recording.ts +1 -0
  117. package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +1 -0
  118. package/corpus/templates/clips/actions/request-transcript.ts +31 -0
  119. package/corpus/templates/clips/actions/set-thumbnail.ts +2 -0
  120. package/corpus/templates/clips/app/components/library/organization-switcher.tsx +2 -2
  121. package/corpus/templates/clips/app/components/player/scrubber-position.ts +9 -0
  122. package/corpus/templates/clips/app/components/player/scrubber.tsx +5 -2
  123. package/corpus/templates/clips/app/components/player/share-dialog.tsx +69 -41
  124. package/corpus/templates/clips/app/components/player/video-player.tsx +38 -1
  125. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +3 -3
  126. package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +9 -19
  127. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +9 -3
  128. package/corpus/templates/clips/app/routes/record.tsx +21 -12
  129. package/corpus/templates/clips/changelog/2026-07-02-recordings-now-wait-for-storage-media-to-serve-before-finishing.md +6 -0
  130. package/corpus/templates/clips/changelog/2026-07-07-a-pending-app-update-no-longer-blocks-screen-recording-updat.md +6 -0
  131. package/corpus/templates/clips/changelog/2026-07-07-chrome-extension-recordings-keep-audio-after-refreshing-tab.md +6 -0
  132. package/corpus/templates/clips/changelog/2026-07-07-clip-playback-progress-now-starts-and-finishes-at-the-right-times.md +6 -0
  133. package/corpus/templates/clips/changelog/2026-07-07-sharing-public-clips-now-stays-focused-on-the-normal-link-wi.md +6 -0
  134. package/corpus/templates/clips/chrome-extension/src/background.ts +18 -0
  135. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +23 -8
  136. package/corpus/templates/clips/desktop/src/app.tsx +40 -3
  137. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +19 -7
  138. package/corpus/templates/clips/desktop/src/lib/permissions.ts +2 -0
  139. package/corpus/templates/clips/desktop/src/lib/updater.ts +25 -2
  140. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +7 -0
  141. package/corpus/templates/clips/server/routes/api/recordings/[recordingId]/thumbnail.post.ts +1 -0
  142. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +22 -5
  143. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +8 -0
  144. package/corpus/templates/clips/server/routes/api/video/[recordingId].get.ts +13 -6
  145. package/corpus/templates/clips/shared/finalize-recovery.ts +12 -0
  146. package/corpus/templates/content/actions/delete-document.ts +337 -52
  147. package/corpus/templates/content/changelog/2026-07-07-permanently-deleting-trashed-databases-now-finishes-reliably.md +6 -0
  148. package/corpus/templates/slides/app/pages/DeckEditor.tsx +2 -2
  149. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  150. package/dist/agent/engine/ai-sdk-engine.js +15 -1
  151. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  152. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  153. package/dist/agent/engine/anthropic-engine.js +20 -1
  154. package/dist/agent/engine/anthropic-engine.js.map +1 -1
  155. package/dist/agent/engine/registry.d.ts.map +1 -1
  156. package/dist/agent/engine/registry.js +22 -14
  157. package/dist/agent/engine/registry.js.map +1 -1
  158. package/dist/agent/production-agent.d.ts.map +1 -1
  159. package/dist/agent/production-agent.js +27 -7
  160. package/dist/agent/production-agent.js.map +1 -1
  161. package/dist/client/command-navigation/index.d.ts +4 -0
  162. package/dist/client/command-navigation/index.d.ts.map +1 -0
  163. package/dist/client/command-navigation/index.js +4 -0
  164. package/dist/client/command-navigation/index.js.map +1 -0
  165. package/dist/client/comments-review/index.d.ts +2 -0
  166. package/dist/client/comments-review/index.d.ts.map +1 -0
  167. package/dist/client/comments-review/index.js +2 -0
  168. package/dist/client/comments-review/index.js.map +1 -0
  169. package/dist/client/history/VersionHistoryPanel.d.ts +18 -0
  170. package/dist/client/history/VersionHistoryPanel.d.ts.map +1 -0
  171. package/dist/client/history/VersionHistoryPanel.js +24 -0
  172. package/dist/client/history/VersionHistoryPanel.js.map +1 -0
  173. package/dist/client/history/index.d.ts +3 -0
  174. package/dist/client/history/index.d.ts.map +1 -0
  175. package/dist/client/history/index.js +3 -0
  176. package/dist/client/history/index.js.map +1 -0
  177. package/dist/client/history/use-history.d.ts +46 -0
  178. package/dist/client/history/use-history.d.ts.map +1 -0
  179. package/dist/client/history/use-history.js +18 -0
  180. package/dist/client/history/use-history.js.map +1 -0
  181. package/dist/client/index.d.ts +6 -4
  182. package/dist/client/index.d.ts.map +1 -1
  183. package/dist/client/index.js +6 -4
  184. package/dist/client/index.js.map +1 -1
  185. package/dist/client/org/OrgSwitcher.js +5 -5
  186. package/dist/client/org/OrgSwitcher.js.map +1 -1
  187. package/dist/client/org/RequireActiveOrg.js +2 -2
  188. package/dist/client/org/RequireActiveOrg.js.map +1 -1
  189. package/dist/client/org/TeamPage.js +3 -3
  190. package/dist/client/org/TeamPage.js.map +1 -1
  191. package/dist/client/org/hooks.d.ts +12 -1
  192. package/dist/client/org/hooks.d.ts.map +1 -1
  193. package/dist/client/org/hooks.js +15 -0
  194. package/dist/client/org/hooks.js.map +1 -1
  195. package/dist/client/org/index.d.ts +4 -2
  196. package/dist/client/org/index.d.ts.map +1 -1
  197. package/dist/client/org/index.js +3 -1
  198. package/dist/client/org/index.js.map +1 -1
  199. package/dist/client/org-team/index.d.ts +2 -0
  200. package/dist/client/org-team/index.d.ts.map +1 -0
  201. package/dist/client/org-team/index.js +2 -0
  202. package/dist/client/org-team/index.js.map +1 -0
  203. package/dist/client/review/ReviewStatusBadge.d.ts +7 -0
  204. package/dist/client/review/ReviewStatusBadge.d.ts.map +1 -0
  205. package/dist/client/review/ReviewStatusBadge.js +19 -0
  206. package/dist/client/review/ReviewStatusBadge.js.map +1 -0
  207. package/dist/client/review/ReviewThreadPanel.d.ts +20 -0
  208. package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -0
  209. package/dist/client/review/ReviewThreadPanel.js +84 -0
  210. package/dist/client/review/ReviewThreadPanel.js.map +1 -0
  211. package/dist/client/review/index.d.ts +4 -0
  212. package/dist/client/review/index.d.ts.map +1 -0
  213. package/dist/client/review/index.js +4 -0
  214. package/dist/client/review/index.js.map +1 -0
  215. package/dist/client/review/use-review.d.ts +68 -0
  216. package/dist/client/review/use-review.d.ts.map +1 -0
  217. package/dist/client/review/use-review.js +22 -0
  218. package/dist/client/review/use-review.js.map +1 -0
  219. package/dist/client/settings/index.d.ts +1 -1
  220. package/dist/client/settings/index.d.ts.map +1 -1
  221. package/dist/client/settings/index.js +1 -1
  222. package/dist/client/settings/index.js.map +1 -1
  223. package/dist/client/setup-connections/BuilderConnectCard.d.ts +9 -0
  224. package/dist/client/setup-connections/BuilderConnectCard.d.ts.map +1 -0
  225. package/dist/client/setup-connections/BuilderConnectCard.js +25 -0
  226. package/dist/client/setup-connections/BuilderConnectCard.js.map +1 -0
  227. package/dist/client/setup-connections/ProviderReadinessBadge.d.ts +8 -0
  228. package/dist/client/setup-connections/ProviderReadinessBadge.d.ts.map +1 -0
  229. package/dist/client/setup-connections/ProviderReadinessBadge.js +32 -0
  230. package/dist/client/setup-connections/ProviderReadinessBadge.js.map +1 -0
  231. package/dist/client/setup-connections/SetupConnectionsPage.d.ts +17 -0
  232. package/dist/client/setup-connections/SetupConnectionsPage.d.ts.map +1 -0
  233. package/dist/client/setup-connections/SetupConnectionsPage.js +10 -0
  234. package/dist/client/setup-connections/SetupConnectionsPage.js.map +1 -0
  235. package/dist/client/setup-connections/index.d.ts +7 -0
  236. package/dist/client/setup-connections/index.d.ts.map +1 -0
  237. package/dist/client/setup-connections/index.js +7 -0
  238. package/dist/client/setup-connections/index.js.map +1 -0
  239. package/dist/client/sharing/ShareButton.d.ts +4 -4
  240. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  241. package/dist/client/sharing/ShareButton.js +13 -7
  242. package/dist/client/sharing/ShareButton.js.map +1 -1
  243. package/dist/client/sharing/ShareDialog.js +3 -3
  244. package/dist/client/sharing/ShareDialog.js.map +1 -1
  245. package/dist/collab/struct-routes.d.ts +1 -1
  246. package/dist/command-navigation/actions.d.ts +25 -0
  247. package/dist/command-navigation/actions.d.ts.map +1 -0
  248. package/dist/command-navigation/actions.js +64 -0
  249. package/dist/command-navigation/actions.js.map +1 -0
  250. package/dist/command-navigation/index.d.ts +4 -0
  251. package/dist/command-navigation/index.d.ts.map +1 -0
  252. package/dist/command-navigation/index.js +4 -0
  253. package/dist/command-navigation/index.js.map +1 -0
  254. package/dist/comments-review/index.d.ts +2 -0
  255. package/dist/comments-review/index.d.ts.map +1 -0
  256. package/dist/comments-review/index.js +2 -0
  257. package/dist/comments-review/index.js.map +1 -0
  258. package/dist/file-upload/builder.d.ts.map +1 -1
  259. package/dist/file-upload/builder.js +18 -2
  260. package/dist/file-upload/builder.js.map +1 -1
  261. package/dist/file-upload/types.d.ts +3 -0
  262. package/dist/file-upload/types.d.ts.map +1 -1
  263. package/dist/file-upload/types.js.map +1 -1
  264. package/dist/history/actions/create-resource-version.d.ts +10 -0
  265. package/dist/history/actions/create-resource-version.d.ts.map +1 -0
  266. package/dist/history/actions/create-resource-version.js +65 -0
  267. package/dist/history/actions/create-resource-version.js.map +1 -0
  268. package/dist/history/actions/get-resource-version.d.ts +10 -0
  269. package/dist/history/actions/get-resource-version.d.ts.map +1 -0
  270. package/dist/history/actions/get-resource-version.js +38 -0
  271. package/dist/history/actions/get-resource-version.js.map +1 -0
  272. package/dist/history/actions/list-resource-history.d.ts +10 -0
  273. package/dist/history/actions/list-resource-history.d.ts.map +1 -0
  274. package/dist/history/actions/list-resource-history.js +45 -0
  275. package/dist/history/actions/list-resource-history.js.map +1 -0
  276. package/dist/history/actions/list-resource-versions.d.ts +10 -0
  277. package/dist/history/actions/list-resource-versions.d.ts.map +1 -0
  278. package/dist/history/actions/list-resource-versions.js +35 -0
  279. package/dist/history/actions/list-resource-versions.js.map +1 -0
  280. package/dist/history/actions/restore-resource-version.d.ts +11 -0
  281. package/dist/history/actions/restore-resource-version.d.ts.map +1 -0
  282. package/dist/history/actions/restore-resource-version.js +59 -0
  283. package/dist/history/actions/restore-resource-version.js.map +1 -0
  284. package/dist/history/index.d.ts +4 -0
  285. package/dist/history/index.d.ts.map +1 -0
  286. package/dist/history/index.js +3 -0
  287. package/dist/history/index.js.map +1 -0
  288. package/dist/history/registry.d.ts +10 -0
  289. package/dist/history/registry.d.ts.map +1 -0
  290. package/dist/history/registry.js +61 -0
  291. package/dist/history/registry.js.map +1 -0
  292. package/dist/history/store.d.ts +34 -0
  293. package/dist/history/store.d.ts.map +1 -0
  294. package/dist/history/store.js +265 -0
  295. package/dist/history/store.js.map +1 -0
  296. package/dist/history/types.d.ts +55 -0
  297. package/dist/history/types.d.ts.map +1 -0
  298. package/dist/history/types.js +2 -0
  299. package/dist/history/types.js.map +1 -0
  300. package/dist/index.d.ts +6 -0
  301. package/dist/index.d.ts.map +1 -1
  302. package/dist/index.js +6 -0
  303. package/dist/index.js.map +1 -1
  304. package/dist/navigation/index.d.ts +53 -0
  305. package/dist/navigation/index.d.ts.map +1 -0
  306. package/dist/navigation/index.js +105 -0
  307. package/dist/navigation/index.js.map +1 -0
  308. package/dist/org/index.d.ts +1 -0
  309. package/dist/org/index.d.ts.map +1 -1
  310. package/dist/org/index.js +1 -0
  311. package/dist/org/index.js.map +1 -1
  312. package/dist/org/permissions.d.ts +7 -0
  313. package/dist/org/permissions.d.ts.map +1 -0
  314. package/dist/org/permissions.js +21 -0
  315. package/dist/org/permissions.js.map +1 -0
  316. package/dist/org-team/index.d.ts +2 -0
  317. package/dist/org-team/index.d.ts.map +1 -0
  318. package/dist/org-team/index.js +2 -0
  319. package/dist/org-team/index.js.map +1 -0
  320. package/dist/private-blob/registry.d.ts.map +1 -1
  321. package/dist/private-blob/registry.js +1 -0
  322. package/dist/private-blob/registry.js.map +1 -1
  323. package/dist/resources/handlers.d.ts +2 -2
  324. package/dist/review/actions/consume-review-feedback.d.ts +9 -0
  325. package/dist/review/actions/consume-review-feedback.d.ts.map +1 -0
  326. package/dist/review/actions/consume-review-feedback.js +29 -0
  327. package/dist/review/actions/consume-review-feedback.js.map +1 -0
  328. package/dist/review/actions/create-review-comment.d.ts +18 -0
  329. package/dist/review/actions/create-review-comment.d.ts.map +1 -0
  330. package/dist/review/actions/create-review-comment.js +81 -0
  331. package/dist/review/actions/create-review-comment.js.map +1 -0
  332. package/dist/review/actions/delete-review-comment.d.ts +10 -0
  333. package/dist/review/actions/delete-review-comment.d.ts.map +1 -0
  334. package/dist/review/actions/delete-review-comment.js +45 -0
  335. package/dist/review/actions/delete-review-comment.js.map +1 -0
  336. package/dist/review/actions/get-review-feedback.d.ts +10 -0
  337. package/dist/review/actions/get-review-feedback.d.ts.map +1 -0
  338. package/dist/review/actions/get-review-feedback.js +45 -0
  339. package/dist/review/actions/get-review-feedback.js.map +1 -0
  340. package/dist/review/actions/list-review-comments.d.ts +13 -0
  341. package/dist/review/actions/list-review-comments.d.ts.map +1 -0
  342. package/dist/review/actions/list-review-comments.js +44 -0
  343. package/dist/review/actions/list-review-comments.js.map +1 -0
  344. package/dist/review/actions/reply-review-comment.d.ts +16 -0
  345. package/dist/review/actions/reply-review-comment.d.ts.map +1 -0
  346. package/dist/review/actions/reply-review-comment.js +84 -0
  347. package/dist/review/actions/reply-review-comment.js.map +1 -0
  348. package/dist/review/actions/resolve-review-thread.d.ts +11 -0
  349. package/dist/review/actions/resolve-review-thread.d.ts.map +1 -0
  350. package/dist/review/actions/resolve-review-thread.js +46 -0
  351. package/dist/review/actions/resolve-review-thread.js.map +1 -0
  352. package/dist/review/actions/set-review-status.d.ts +9 -0
  353. package/dist/review/actions/set-review-status.d.ts.map +1 -0
  354. package/dist/review/actions/set-review-status.js +43 -0
  355. package/dist/review/actions/set-review-status.js.map +1 -0
  356. package/dist/review/index.d.ts +5 -0
  357. package/dist/review/index.d.ts.map +1 -0
  358. package/dist/review/index.js +4 -0
  359. package/dist/review/index.js.map +1 -0
  360. package/dist/review/mentions.d.ts +4 -0
  361. package/dist/review/mentions.d.ts.map +1 -0
  362. package/dist/review/mentions.js +39 -0
  363. package/dist/review/mentions.js.map +1 -0
  364. package/dist/review/registry.d.ts +10 -0
  365. package/dist/review/registry.d.ts.map +1 -0
  366. package/dist/review/registry.js +61 -0
  367. package/dist/review/registry.js.map +1 -0
  368. package/dist/review/store.d.ts +63 -0
  369. package/dist/review/store.d.ts.map +1 -0
  370. package/dist/review/store.js +558 -0
  371. package/dist/review/store.js.map +1 -0
  372. package/dist/review/types.d.ts +77 -0
  373. package/dist/review/types.d.ts.map +1 -0
  374. package/dist/review/types.js +2 -0
  375. package/dist/review/types.js.map +1 -0
  376. package/dist/server/action-discovery.d.ts.map +1 -1
  377. package/dist/server/action-discovery.js +54 -0
  378. package/dist/server/action-discovery.js.map +1 -1
  379. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  380. package/dist/server/agent-engine-api-key-route.d.ts.map +1 -1
  381. package/dist/server/agent-engine-api-key-route.js +5 -0
  382. package/dist/server/agent-engine-api-key-route.js.map +1 -1
  383. package/dist/server/credential-provider.d.ts +26 -0
  384. package/dist/server/credential-provider.d.ts.map +1 -1
  385. package/dist/server/credential-provider.js +82 -0
  386. package/dist/server/credential-provider.js.map +1 -1
  387. package/dist/setup-connections/index.d.ts +6 -0
  388. package/dist/setup-connections/index.d.ts.map +1 -0
  389. package/dist/setup-connections/index.js +6 -0
  390. package/dist/setup-connections/index.js.map +1 -0
  391. package/dist/setup-connections/onboarding.d.ts +14 -0
  392. package/dist/setup-connections/onboarding.d.ts.map +1 -0
  393. package/dist/setup-connections/onboarding.js +23 -0
  394. package/dist/setup-connections/onboarding.js.map +1 -0
  395. package/dist/transcription/builder-transcription.d.ts +1 -0
  396. package/dist/transcription/builder-transcription.d.ts.map +1 -1
  397. package/dist/transcription/builder-transcription.js +5 -2
  398. package/dist/transcription/builder-transcription.js.map +1 -1
  399. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  400. package/dist/vite/action-types-plugin.js +52 -0
  401. package/dist/vite/action-types-plugin.js.map +1 -1
  402. package/docs/content/agent-native-toolkit.mdx +87 -80
  403. package/docs/content/locales/ar-SA/agent-native-toolkit.mdx +89 -80
  404. package/docs/content/locales/de-DE/agent-native-toolkit.mdx +89 -80
  405. package/docs/content/locales/es-ES/agent-native-toolkit.mdx +89 -80
  406. package/docs/content/locales/fr-FR/agent-native-toolkit.mdx +89 -80
  407. package/docs/content/locales/hi-IN/agent-native-toolkit.mdx +89 -80
  408. package/docs/content/locales/ja-JP/agent-native-toolkit.mdx +89 -80
  409. package/docs/content/locales/ko-KR/agent-native-toolkit.mdx +89 -80
  410. package/docs/content/locales/pt-BR/agent-native-toolkit.mdx +89 -80
  411. package/docs/content/locales/zh-CN/agent-native-toolkit.mdx +89 -80
  412. package/docs/content/locales/zh-TW/agent-native-toolkit.mdx +89 -80
  413. package/docs/content/toolkit-agent-ux.mdx +43 -0
  414. package/docs/content/toolkit-app-adapters.mdx +9 -0
  415. package/docs/content/toolkit-collaboration-ui.mdx +12 -0
  416. package/docs/content/toolkit-collaboration.mdx +74 -0
  417. package/docs/content/toolkit-command-navigation.mdx +106 -0
  418. package/docs/content/toolkit-comments-review.mdx +98 -0
  419. package/docs/content/toolkit-history.mdx +95 -0
  420. package/docs/content/toolkit-observability.mdx +41 -0
  421. package/docs/content/toolkit-org-team.mdx +80 -0
  422. package/docs/content/toolkit-resources.mdx +57 -0
  423. package/docs/content/toolkit-settings.mdx +65 -0
  424. package/docs/content/toolkit-setup-connections.mdx +109 -0
  425. package/docs/content/toolkit-sharing-ui.mdx +18 -6
  426. package/docs/content/toolkit-sharing.mdx +81 -0
  427. package/docs/content/toolkit-shell-hooks.mdx +9 -0
  428. package/docs/content/toolkit-ui.mdx +9 -0
  429. package/package.json +36 -2
@@ -0,0 +1,43 @@
1
+ ---
2
+ title: "Agent UX Kit"
3
+ description: "Composer, model picker, context chips, approvals, run recovery, progress, and the runs tray."
4
+ ---
5
+
6
+ # Agent UX Kit
7
+
8
+ The Agent UX Kit packages the surfaces that make an app's agent feel trustworthy
9
+ and inspectable: composer, model picker, context chips, approvals, progress,
10
+ run recovery, and the runs tray.
11
+
12
+ <WireframeBlock id="doc-block-toolkit-agent-ux">
13
+ <Screen
14
+ surface="desktop"
15
+ html={
16
+ "<div style='min-height:560px;box-sizing:border-box;padding:26px;display:grid;grid-template-columns:1fr 320px;gap:16px'><main class='wf-card' style='display:flex;flex-direction:column;gap:12px'><h2 style='margin:0'>Ask the agent</h2><div class='wf-box' style='height:250px'>Conversation and native tool widgets</div><div class='wf-card' style='display:flex;flex-direction:column;gap:10px'><span class='wf-muted'>Ask about the current dashboard...</span><div style='display:flex;gap:8px'><span class='wf-pill'>Context: Q3 Forecast</span><span class='wf-pill'>GPT-5</span><span class='wf-pill'>Approval required</span><button class='primary'>Send</button></div></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Runs tray</strong><div class='wf-box'>Generating report - running</div><div class='wf-box'>Needs approval</div><div class='wf-box'>Recovered run</div></aside></div>"
17
+ }
18
+ />
19
+ </WireframeBlock>
20
+
21
+ ## Pieces {#pieces}
22
+
23
+ | Piece | Purpose |
24
+ | --------------------------------- | ---------------------------------------------------------------------------------- |
25
+ | `<AgentSidebar>` / `<AgentPanel>` | Complete agent surfaces for sidebars, pages, and dialogs. |
26
+ | `<PromptComposer>` | Standard rich composer with attachments, references, pasted text, and voice hooks. |
27
+ | Model picker | Standard model/provider choice in agent settings or composer chrome. |
28
+ | Context chips | Visible route, resource, file, and selection context sent to the agent. |
29
+ | Human approvals | Confirmation gates for sensitive or irreversible operations. |
30
+ | `<RunsTray>` | User-visible background run progress and recovery. |
31
+ | Run recovery | Hydrates dropped/stale foreground and background runs back into the UI. |
32
+
33
+ ## UX Standard {#ux-standard}
34
+
35
+ - Show what context the agent will use before the user sends.
36
+ - Model and key setup should link to the Settings Kit.
37
+ - Long-running work belongs in the runs tray, not as a frozen composer spinner.
38
+ - Approval prompts should name the action, data, and risk before proceeding.
39
+ - Recovered runs should be visible and explain what happened.
40
+
41
+ Related docs: [Using Your Agent](/docs/using-your-agent),
42
+ [Human Approval](/docs/human-approval), [Progress](/docs/progress),
43
+ [Native Chat UI](/docs/native-chat-ui).
@@ -8,6 +8,15 @@ description: "Use app-local wrappers so Toolkit components are reusable without
8
8
  Every template can expose local UI adapters under `@/components/ui/*` and local
9
9
  hook adapters under `@/hooks/*`. Most adapters are intentionally tiny:
10
10
 
11
+ <WireframeBlock id="doc-block-toolkit-app-adapters">
12
+ <Screen
13
+ surface="desktop"
14
+ html={
15
+ "<div style='min-height:480px;box-sizing:border-box;padding:28px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px'><div class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Toolkit primitive</strong><div class='wf-box'>@agent-native/toolkit/ui/button</div><div class='wf-box'>Default behavior and accessibility</div></div><div class='wf-card' style='display:flex;flex-direction:column;gap:10px;border-color:hsl(var(--primary))'><strong>App adapter</strong><div class='wf-box'>@/components/ui/button</div><div class='wf-box'>One stable import path</div></div><div class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>App screens</strong><div class='wf-box'>Settings page</div><div class='wf-box'>Share dialog</div><div class='wf-box'>Command menu</div></div></div>"
16
+ }
17
+ />
18
+ </WireframeBlock>
19
+
11
20
  ```tsx
12
21
  export * from "@agent-native/toolkit/ui/button";
13
22
  ```
@@ -8,6 +8,15 @@ description: "Reusable presence, cursor, selection, and recent-edit UI for colla
8
8
  `@agent-native/toolkit/collab-ui` contains the presentational collaboration
9
9
  pieces that do not own transport or storage:
10
10
 
11
+ <WireframeBlock id="doc-block-toolkit-collaboration-ui">
12
+ <Screen
13
+ surface="desktop"
14
+ html={
15
+ "<div style='min-height:500px;box-sizing:border-box;padding:28px;display:grid;grid-template-columns:1fr 290px;gap:16px'><main class='wf-card' style='position:relative;display:flex;flex-direction:column;gap:12px'><div style='display:flex;align-items:center;gap:8px'><h2 style='margin:0'>Editor canvas</h2><div style='flex:1'></div><span class='wf-pill'>Ava</span><span class='wf-pill'>Agent</span></div><div class='wf-box' style='height:92px;border-color:hsl(var(--primary))'>Remote selection ring</div><div class='wf-box' style='height:220px'>Recent edit highlight</div><span class='wf-pill' style='position:absolute;right:38px;top:205px'>Sam cursor</span></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Display layer</strong><div class='wf-box'>PresenceBar</div><div class='wf-box'>LiveCursorOverlay</div><div class='wf-box'>RecentEditHighlights</div><div class='wf-box'>AgentPresenceChip</div></aside></div>"
16
+ }
17
+ />
18
+ </WireframeBlock>
19
+
11
20
  ```tsx
12
21
  import {
13
22
  AgentPresenceChip,
@@ -30,6 +39,9 @@ import { PresenceBar } from "@agent-native/toolkit/collab-ui";
30
39
  Existing imports from `@agent-native/core/client` still work because core
31
40
  re-exports these Toolkit components as compatibility shims.
32
41
 
42
+ See the [Collaboration Kit](/docs/toolkit-collaboration) for the full runtime,
43
+ presence, and undo contract.
44
+
33
45
  ## Responsibilities {#responsibilities}
34
46
 
35
47
  Toolkit owns:
@@ -0,0 +1,74 @@
1
+ ---
2
+ title: "Collaboration Kit"
3
+ description: "Realtime editing, presence, live cursors, recent edit highlights, and undo primitives."
4
+ ---
5
+
6
+ # Collaboration Kit
7
+
8
+ The Collaboration Kit gives humans and agents the same live workspace:
9
+ collaborative documents, awareness, presence avatars, live cursors, recent edit
10
+ highlights, and undo that respects both CRDT-backed edits and app-local
11
+ operations.
12
+
13
+ <WireframeBlock id="doc-block-toolkit-collaboration">
14
+ <Screen
15
+ surface="desktop"
16
+ html={
17
+ "<div style='min-height:560px;box-sizing:border-box;padding:26px;display:grid;grid-template-columns:1fr 260px;gap:16px'><main class='wf-card' style='position:relative;display:flex;flex-direction:column;gap:12px'><div style='display:flex;align-items:center;gap:8px'><h2 style='margin:0'>Launch plan</h2><div style='flex:1'></div><span class='wf-pill'>Sam</span><span class='wf-pill'>Agent</span></div><div class='wf-box' style='height:84px'>Paragraph edited by Agent</div><div class='wf-box' style='height:84px;border-color:hsl(var(--primary))'>Live selection highlight</div><div class='wf-box' style='height:210px'>Editor canvas</div><span class='wf-pill' style='position:absolute;right:42px;top:190px'>Maya cursor</span></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:12px'><strong>Collaboration</strong><div class='wf-box'>PresenceBar</div><div class='wf-box'>RecentEditHighlights</div><div class='wf-box'>Undo: 3 grouped edits</div><button>Follow Maya</button><button class='primary'>Restore local op</button></aside></div>"
18
+ }
19
+ />
20
+ </WireframeBlock>
21
+
22
+ ## Pieces {#pieces}
23
+
24
+ | Piece | Purpose |
25
+ | ------------------------ | ----------------------------------------------------------------------------------- |
26
+ | `createCollabPlugin()` | Server plugin that persists and syncs a collaborative resource. |
27
+ | `useCollaborativeDoc()` | Client hook for Yjs document, awareness, sync state, and agent presence. |
28
+ | `usePresence()` | Reads and publishes awareness fields such as cursor, selection, viewport, and mode. |
29
+ | `<PresenceBar>` | Shared avatar and agent-presence strip. |
30
+ | `<LiveCursorOverlay>` | Cursor labels over canvas or editor coordinates. |
31
+ | `<RecentEditHighlights>` | Fading highlights for human or agent edits. |
32
+ | `useCollabUndo()` | Yjs undo manager lifecycle for CRDT-backed surfaces. |
33
+ | `useLocalOpUndo()` | Inverse-operation undo for non-Yjs local operations. |
34
+
35
+ ## Server And Client Shape {#server-and-client-shape}
36
+
37
+ ```ts
38
+ // server/plugins/collab.ts
39
+ import { createCollabPlugin } from "@agent-native/core/server";
40
+
41
+ export default createCollabPlugin({
42
+ resourceType: "document",
43
+ table: "documents",
44
+ contentColumn: "content",
45
+ });
46
+ ```
47
+
48
+ ```tsx
49
+ import {
50
+ useCollaborativeDoc,
51
+ usePresence,
52
+ useCollabUndo,
53
+ } from "@agent-native/core/client/collab";
54
+ import {
55
+ LiveCursorOverlay,
56
+ PresenceBar,
57
+ RecentEditHighlights,
58
+ } from "@agent-native/toolkit/collab-ui";
59
+
60
+ const collab = useCollaborativeDoc({ docId, user });
61
+ const presence = usePresence(collab.awareness, collab.localClientId);
62
+ const undo = useCollabUndo(collab.ydoc, { trackedOrigins: [user.email] });
63
+ ```
64
+
65
+ ## UX Standard {#ux-standard}
66
+
67
+ - Show collaborators in the page header, not buried in a debug panel.
68
+ - Render the agent as a first-class participant when it edits.
69
+ - Highlight recent remote or agent edits long enough for users to orient.
70
+ - Keep undo local and predictable: CRDT undo for document operations, local-op
71
+ undo for app-specific commands.
72
+
73
+ Related docs: [Realtime Collaboration](/docs/real-time-collaboration),
74
+ [Component API](/docs/components#collab-presence).
@@ -0,0 +1,106 @@
1
+ ---
2
+ title: "Command & Navigation Kit"
3
+ description: "Command menu, deep links, standard routes, and app shell navigation patterns."
4
+ ---
5
+
6
+ # Command & Navigation Kit
7
+
8
+ The Command & Navigation Kit makes apps feel consistent under keyboard, sidebar,
9
+ URL, and agent control. It covers the command menu, deep links, standard app
10
+ routes, `navigate` actions, `view-screen`, and shell conventions.
11
+
12
+ <WireframeBlock id="doc-block-toolkit-command-navigation">
13
+ <Screen
14
+ surface="desktop"
15
+ html={
16
+ "<div style='min-height:540px;box-sizing:border-box;padding:28px;display:grid;grid-template-columns:230px 1fr;gap:18px'><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>App</strong><div class='wf-pill'>Home</div><div class='wf-pill'>Documents</div><div class='wf-pill'>Team</div><div class='wf-pill'>Settings</div></aside><main class='wf-card' style='display:flex;align-items:center;justify-content:center'><div class='wf-card' style='width:min(520px,100%);display:flex;flex-direction:column;gap:10px'><strong>Command menu</strong><div class='wf-box'>Open Q3 Forecast</div><div class='wf-box'>Share current resource</div><div class='wf-box'>Go to Settings: Connections</div><div class='wf-box'>Ask agent about this page</div></div></main></div>"
17
+ }
18
+ />
19
+ </WireframeBlock>
20
+
21
+ ## Pieces {#pieces}
22
+
23
+ | Piece | Purpose |
24
+ | -------------------------- | --------------------------------------------------------------------------- |
25
+ | `<CommandMenu>` | Reusable command palette with docs, changelog, actions, and agent fallback. |
26
+ | `useCommandMenuShortcut()` | Standard keyboard shortcut wiring. |
27
+ | `buildDeepLink()` | Server helper for action results that open the app focused on a resource. |
28
+ | `createNavigateAction()` | Generic agent-callable navigation action factory. |
29
+ | `createViewScreenAction()` | Generic current-screen action factory. |
30
+ | Route helpers | Standard settings, team, resource, and open-route builders. |
31
+ | App shell patterns | Persistent sidebar/header layout and route conventions. |
32
+
33
+ ## API {#api}
34
+
35
+ Client code imports the command menu and route helpers from the client kit:
36
+
37
+ ```tsx
38
+ import {
39
+ CommandMenu,
40
+ buildResourceRoute,
41
+ buildSettingsRoute,
42
+ useCommandMenuShortcut,
43
+ } from "@agent-native/core/client/command-navigation";
44
+
45
+ const settingsUrl = buildSettingsRoute("connections");
46
+ const documentUrl = buildResourceRoute("documents", documentId);
47
+ ```
48
+
49
+ Action code uses the server-safe kit:
50
+
51
+ ```ts
52
+ import {
53
+ buildDeepLink,
54
+ createNavigateAction,
55
+ createViewScreenAction,
56
+ } from "@agent-native/core/command-navigation";
57
+
58
+ export const navigate = createNavigateAction();
59
+ export const viewScreen = createViewScreenAction({
60
+ extraStateKeys: ["selected-resource"],
61
+ });
62
+
63
+ return {
64
+ link: {
65
+ label: "Open dashboard",
66
+ url: buildDeepLink({
67
+ app: "analytics",
68
+ view: "dashboard",
69
+ params: { dashboardId },
70
+ }),
71
+ },
72
+ };
73
+ ```
74
+
75
+ For `/_agent-native/open`, apps can provide a typed route map instead of
76
+ hand-parsing query strings:
77
+
78
+ ```ts
79
+ import { createStandardOpenPathResolver } from "@agent-native/core/navigation";
80
+
81
+ export const resolveOpenPath = createStandardOpenPathResolver({
82
+ dashboard: ({ dashboardId }) => `/dashboards/${dashboardId}`,
83
+ settings: "/settings",
84
+ });
85
+ ```
86
+
87
+ ## Route Standard {#route-standard}
88
+
89
+ Use a small predictable route set:
90
+
91
+ | Route | Purpose |
92
+ | --------------------------- | -------------------------------------------------------------------------- |
93
+ | `/` | Primary app surface. |
94
+ | `/settings` | Standard settings tabs. |
95
+ | `/team` or `/settings#team` | Team management. |
96
+ | Resource routes | `/documents/:id`, `/dashboards/:id`, or equivalent focused resource pages. |
97
+
98
+ ## UX Standard {#ux-standard}
99
+
100
+ - Command menu entries should map to real app routes or actions.
101
+ - Deep links carry pointers, not secret payloads.
102
+ - The agent reads `view-screen` before acting on the current page.
103
+ - The app shell should not remount when users navigate between app routes.
104
+
105
+ Related docs: [Routing](/docs/routing), [Context Awareness](/docs/context-awareness),
106
+ [External Agents](/docs/external-agents).
@@ -0,0 +1,98 @@
1
+ ---
2
+ title: "Comments & Review Kit"
3
+ description: "Inline comments, annotations, mentions, resolved threads, and review status surfaces."
4
+ ---
5
+
6
+ # Comments & Review Kit
7
+
8
+ The Comments & Review Kit gives collaborative apps a standard review layer:
9
+ inline comments, canvas annotations, mentions, replies, resolved threads, and
10
+ status such as draft, review, approved, or needs changes.
11
+
12
+ <WireframeBlock id="doc-block-toolkit-comments-review">
13
+ <Screen
14
+ surface="desktop"
15
+ html={
16
+ "<div style='min-height:560px;box-sizing:border-box;padding:26px;display:grid;grid-template-columns:1fr 300px;gap:16px'><main class='wf-card' style='display:flex;flex-direction:column;gap:12px'><div style='display:flex;align-items:center;gap:10px'><h2 style='margin:0'>Review draft</h2><span class='wf-pill'>In review</span><div style='flex:1'></div><button class='primary'>Approve</button></div><div class='wf-box' style='height:110px'>Inline comment anchor</div><div class='wf-box' style='height:220px'>Annotated wireframe region</div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Comments</strong><div class='wf-box'>@Maya can we tighten this?</div><div class='wf-box'>Agent replied with fix</div><div class='wf-box'>Resolved: CTA copy</div><button>Add comment</button></aside></div>"
17
+ }
18
+ />
19
+ </WireframeBlock>
20
+
21
+ ## Pieces {#pieces}
22
+
23
+ | Piece | Purpose |
24
+ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `registerReviewableResource()` | Register a resource type and optional access resolver for review actions. |
26
+ | Comment actions | `list-review-comments`, `create-review-comment`, `reply-review-comment`, `resolve-review-thread`, and `delete-review-comment`. |
27
+ | Feedback actions | `get-review-feedback` and `consume-review-feedback` for agent-readable review queues. |
28
+ | Review status action | `set-review-status` for draft, in review, approved, and changes requested states. |
29
+ | `ReviewThreadPanel` | Drop-in React panel with comment composer, replies, resolve, and delete controls. |
30
+ | `ReviewStatusBadge` | Controlled status badge for app headers, sidebars, and review panels. |
31
+ | Review hooks | `useReviewComments()`, `useCreateReviewComment()`, `useReplyReviewComment()`, `useResolveReviewThread()`, `useDeleteReviewComment()`, and `useSetReviewStatus()`. |
32
+ | Mentions helpers | `extractReviewMentions()` and `normalizeReviewMentions()` for `@[Label](mailto:email@example.com)` tokens. |
33
+
34
+ ## Shared Model {#shared-model}
35
+
36
+ Comments are resource-scoped, access-scoped, and agent-readable. The UI and
37
+ agent use the same actions to create, resolve, and list threads. Apps can
38
+ specialize anchor shapes, but the common model preserves:
39
+
40
+ - `resourceType` and `resourceId`
41
+ - `author`, `body`, `status`, and timestamps
42
+ - `parentCommentId` for replies
43
+ - optional `mentions`
44
+ - optional `anchor` or `resolutionTarget`
45
+
46
+ ## Register A Resource {#register-resource}
47
+
48
+ ```ts
49
+ import { registerReviewableResource } from "@agent-native/core/comments-review";
50
+
51
+ registerReviewableResource({
52
+ type: "document",
53
+ async resolveAccess(resourceId, ctx) {
54
+ return {
55
+ role: "owner",
56
+ ownerEmail: ctx?.userEmail,
57
+ orgId: ctx?.orgId,
58
+ visibility: "private",
59
+ };
60
+ },
61
+ });
62
+ ```
63
+
64
+ If the resource is already registered with the Sharing Kit, the review actions
65
+ reuse that access model. Add a review registration when the app needs a custom
66
+ access resolver or wants to make the resource type explicit in setup code.
67
+
68
+ ## UI Usage {#ui-usage}
69
+
70
+ ```tsx
71
+ import { ReviewThreadPanel } from "@agent-native/core/client/comments-review";
72
+
73
+ export function DocumentReview({ documentId }: { documentId: string }) {
74
+ return (
75
+ <ReviewThreadPanel
76
+ resourceType="document"
77
+ resourceId={documentId}
78
+ targetId="intro-section"
79
+ />
80
+ );
81
+ }
82
+ ```
83
+
84
+ The `anchor` field is intentionally `unknown`: editors, canvases, diagrams, and
85
+ documents can store the shape they need while still using the shared review
86
+ actions and thread UI.
87
+
88
+ ## UX Standard {#ux-standard}
89
+
90
+ - Comments live next to the thing being reviewed, not only in chat.
91
+ - Mentions resolve against team membership.
92
+ - Resolved threads remain visible in history.
93
+ - Agents can read open review feedback before changing code or content.
94
+ - `consumedAt` and `resolved` are separate. An agent can consume a piece of
95
+ feedback without closing the reviewer-visible thread.
96
+
97
+ Related docs: [Plan](/docs/template-plan), [Content](/docs/template-content),
98
+ [Sharing Kit](/docs/toolkit-sharing), [History Kit](/docs/toolkit-history).
@@ -0,0 +1,95 @@
1
+ ---
2
+ title: "History Kit"
3
+ description: "Version history, audit log, undo/redo, restore flows, and what-changed surfaces."
4
+ ---
5
+
6
+ # History Kit
7
+
8
+ The History Kit helps users answer the questions that matter after humans and
9
+ agents edit together: what changed, who changed it, can I undo it, and can I
10
+ restore an older version?
11
+
12
+ <WireframeBlock id="doc-block-toolkit-history">
13
+ <Screen
14
+ surface="desktop"
15
+ html={
16
+ "<div style='min-height:540px;box-sizing:border-box;padding:28px;display:grid;grid-template-columns:1fr 300px;gap:18px'><main class='wf-card' style='display:flex;flex-direction:column;gap:12px'><h2 style='margin:0'>Document</h2><div class='wf-box' style='height:320px'>Current version with highlighted changes</div><div style='display:flex;gap:10px'><button>Undo</button><button>Redo</button><button class='primary'>Restore selected</button></div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>History</strong><div class='wf-box'>v12 - Agent edited chart text</div><div class='wf-box'>v11 - Maya added notes</div><div class='wf-box'>Audit: share changed to org</div><div class='wf-box'>What changed: 4 sections</div></aside></div>"
17
+ }
18
+ />
19
+ </WireframeBlock>
20
+
21
+ ## Pieces {#pieces}
22
+
23
+ | Piece | Purpose |
24
+ | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | `registerVersionedResource()` | Register a resource type, access resolver, optional `getSnapshot()`, and optional `restoreSnapshot()` handler. |
26
+ | Version actions | `create-resource-version`, `list-resource-versions`, `get-resource-version`, `restore-resource-version`, and `list-resource-history`. |
27
+ | `VersionHistoryPanel` | Drop-in React panel for listing versions and restoring a selected version. |
28
+ | `HistoryTimeline` | Controlled presentational timeline for custom history layouts. |
29
+ | History hooks | `useResourceVersions()`, `useResourceHistory()`, `useCreateResourceVersion()`, and `useRestoreResourceVersion()`. |
30
+ | Audit log | Durable record of human and agent actions, scoped by access, included by `list-resource-history`. |
31
+ | `useCollabUndo()` | CRDT undo/redo for collaborative document edits. |
32
+ | `useLocalOpUndo()` | App-local inverse operations for commands outside the Yjs document. |
33
+ | What-changed views | Diff summaries, changed sections, and reviewer-friendly explanations. |
34
+
35
+ ## Register A Resource {#register-resource}
36
+
37
+ ```ts
38
+ import { registerVersionedResource } from "@agent-native/core/history";
39
+
40
+ registerVersionedResource({
41
+ type: "document",
42
+ async resolveAccess(resourceId, ctx) {
43
+ return {
44
+ role: "owner",
45
+ ownerEmail: ctx?.userEmail,
46
+ orgId: ctx?.orgId,
47
+ visibility: "private",
48
+ };
49
+ },
50
+ async getSnapshot({ resourceId }) {
51
+ return loadDocumentSnapshot(resourceId);
52
+ },
53
+ async restoreSnapshot({ resourceId, snapshot }) {
54
+ return restoreDocumentSnapshot(resourceId, snapshot);
55
+ },
56
+ });
57
+ ```
58
+
59
+ When a resource is already registered with the Sharing Kit, History can reuse
60
+ that access model. Register a History adapter when the app wants automatic
61
+ snapshot capture or restore behavior.
62
+
63
+ ## UI Usage {#ui-usage}
64
+
65
+ ```tsx
66
+ import { VersionHistoryPanel } from "@agent-native/core/client/history";
67
+
68
+ export function DocumentHistory({ documentId }: { documentId: string }) {
69
+ return (
70
+ <VersionHistoryPanel
71
+ resourceType="document"
72
+ resourceId={documentId}
73
+ onRestored={() => refreshDocument()}
74
+ />
75
+ );
76
+ }
77
+ ```
78
+
79
+ Agents and UI call the same actions. Apps can also use the hooks directly when
80
+ they need a custom timeline, preview, or compare view.
81
+
82
+ ## UX Standard {#ux-standard}
83
+
84
+ - History should identify human vs agent edits.
85
+ - Restore is a new action, not a silent database rewind.
86
+ - Undo should be scoped to the user's local intent and never erase remote edits
87
+ unexpectedly.
88
+ - Audit logs should be access-scoped; users see events for resources they can
89
+ read.
90
+ - Snapshot data should be app-owned JSON. The kit stores and scopes it; the app
91
+ decides how to render, diff, and restore it.
92
+
93
+ Related docs: [Audit Log](/docs/audit-log),
94
+ [Realtime Collaboration](/docs/real-time-collaboration),
95
+ [Component API](/docs/components#collab-presence).
@@ -0,0 +1,41 @@
1
+ ---
2
+ title: "Observability Kit"
3
+ description: "Usage, spend, feedback, replay, errors, and run diagnostics for agent-native apps."
4
+ ---
5
+
6
+ # Observability Kit
7
+
8
+ The Observability Kit makes agent work measurable and debuggable. It covers
9
+ usage, spend, feedback, replay, errors, traces, run diagnostics, and the app UI
10
+ that operators use to understand what happened.
11
+
12
+ <WireframeBlock id="doc-block-toolkit-observability">
13
+ <Screen
14
+ surface="desktop"
15
+ html={
16
+ "<div style='min-height:560px;box-sizing:border-box;padding:26px;display:grid;grid-template-columns:1fr 300px;gap:16px'><main class='wf-card' style='display:flex;flex-direction:column;gap:12px'><h2 style='margin:0'>Observability</h2><div style='display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px'><div class='wf-box'>Runs 482</div><div class='wf-box'>Spend $42</div><div class='wf-box'>Errors 3</div></div><div class='wf-box' style='height:260px'>Replay timeline and traces</div></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Diagnostics</strong><div class='wf-box'>Run failed: missing key</div><div class='wf-box'>User feedback: thumbs down</div><div class='wf-box'>Slow tool: provider-api-request</div><button class='primary'>Open run</button></aside></div>"
17
+ }
18
+ />
19
+ </WireframeBlock>
20
+
21
+ ## Pieces {#pieces}
22
+
23
+ | Piece | Purpose |
24
+ | -------------------------- | ----------------------------------------------------------------- |
25
+ | `<ObservabilityDashboard>` | Standard operator dashboard. |
26
+ | Usage and spend | Workspace/app-level model usage and cost views. |
27
+ | Feedback | User thumbs, comments, and product feedback loops. |
28
+ | Replay | Inspectable agent run and UI/event timelines. |
29
+ | Errors | Surfaced runtime, provider, and action failures. |
30
+ | Run diagnostics | Tool calls, model choice, context, approvals, and recovery state. |
31
+ | Tracking | Server-side analytics events with pluggable providers. |
32
+
33
+ ## UX Standard {#ux-standard}
34
+
35
+ - Every background or agent run should be traceable to a user-visible outcome.
36
+ - Feedback should connect to the run, resource, or page that caused it.
37
+ - Spend and usage should distinguish app, organization, user, and provider.
38
+ - Error states should link back to setup when the fix is a missing connection.
39
+
40
+ Related docs: [Observability](/docs/observability),
41
+ [Tracking](/docs/tracking), [Progress](/docs/progress), [Agent UX Kit](/docs/toolkit-agent-ux).
@@ -0,0 +1,80 @@
1
+ ---
2
+ title: "Org & Team Kit"
3
+ description: "Organizations, team settings, invites, allowed domains, roles, and app switching."
4
+ ---
5
+
6
+ # Org & Team Kit
7
+
8
+ The Org & Team Kit standardizes how apps expose team membership and
9
+ organization context. It covers the team page, organization switcher, invites,
10
+ roles, allowed email domains, and the active organization that scopes sharing,
11
+ connections, service tokens, and app switching.
12
+
13
+ <WireframeBlock id="doc-block-toolkit-org-team">
14
+ <Screen
15
+ surface="desktop"
16
+ html={
17
+ "<div style='min-height:540px;box-sizing:border-box;padding:28px;display:grid;grid-template-columns:240px 1fr;gap:18px'><aside class='wf-card' style='display:flex;flex-direction:column;gap:12px'><strong>Workspace</strong><div class='wf-box'>OrgSwitcher: Acme</div><div class='wf-pill'>Analytics</div><div class='wf-pill'>Content</div><div class='wf-pill'>Slides</div></aside><main class='wf-card' style='display:flex;flex-direction:column;gap:14px'><div style='display:flex;align-items:center;gap:10px'><h2 style='margin:0'>Team</h2><div style='flex:1'></div><button class='primary'>Invite</button></div><div class='wf-box'>Allowed domain: acme.com</div><div class='wf-box'>Steve - owner</div><div class='wf-box'>Maya - admin</div><div class='wf-box'>Kai - member</div><div class='wf-box'>Pending invites: 3</div></main></div>"
18
+ }
19
+ />
20
+ </WireframeBlock>
21
+
22
+ ## Pieces {#pieces}
23
+
24
+ | Piece | Purpose |
25
+ | --------------------- | ----------------------------------------------------------------------------------------------- |
26
+ | `<TeamPage>` | Standard team management page for members, invites, roles, and organization preferences. |
27
+ | `<OrgSwitcher>` | Current organization picker for sidebars and headers. |
28
+ | `<InvitationBanner>` | One-click invite and domain-match join prompts. |
29
+ | `<RequireActiveOrg>` | Guard for pages that need an active organization before rendering app data. |
30
+ | `useOrgRole()` | Shared role booleans for member, invite, settings, and domain controls. |
31
+ | Organization handlers | Create, rename, switch, invite, accept, remove, and update roles/domains. |
32
+ | Roles | Owner, admin, and member gates for sharing, settings, service tokens, and provider connections. |
33
+ | Allowed domains | Automatic join and domain-scoped access policy. |
34
+ | App links | Workspace app-link parsing and visible app-switcher helpers. |
35
+
36
+ ## API {#api}
37
+
38
+ Render organization context wherever data scope changes. Put `OrgSwitcher` in
39
+ the persistent shell and make `/settings#team` or `/team` open `TeamPage`.
40
+
41
+ ```tsx
42
+ import {
43
+ OrgSwitcher,
44
+ RequireActiveOrg,
45
+ TeamPage,
46
+ useOrgRole,
47
+ } from "@agent-native/core/client/org-team";
48
+
49
+ export function AppShell() {
50
+ return <OrgSwitcher />;
51
+ }
52
+
53
+ export function SettingsTeamTab() {
54
+ return (
55
+ <RequireActiveOrg>
56
+ <TeamPage createOrgDescription="Create a team to share dashboards and provider connections." />
57
+ </RequireActiveOrg>
58
+ );
59
+ }
60
+
61
+ export function AdminOnlyControl() {
62
+ const { canManageOrg } = useOrgRole();
63
+ return canManageOrg ? <button type="button">Invite members</button> : null;
64
+ }
65
+ ```
66
+
67
+ Server code imports the same role helpers from `@agent-native/core/org-team`.
68
+ The route plugin mounts `/_agent-native/org/*` for org creation, switching,
69
+ invites, domains, member roles, and A2A secret sync.
70
+
71
+ ## UX Standard {#ux-standard}
72
+
73
+ - Users can see which organization they are in before creating or sharing data.
74
+ - Invites and roles live in the team settings surface, not per-resource dialogs.
75
+ - Org domain changes are owner-only and explain who can auto-join.
76
+ - App switching lists workspace/default app links. Active-org continuity comes
77
+ from the target app sharing the same auth and organization state.
78
+
79
+ Related docs: [Multi-Tenancy](/docs/multi-tenancy),
80
+ [Workspace Management](/docs/workspace-management), [Sharing Kit](/docs/toolkit-sharing).
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: "Resource Kit"
3
+ description: "Resource tree, editor primitives, file picker/search, attachments, and local file mode."
4
+ ---
5
+
6
+ # Resource Kit
7
+
8
+ The Resource Kit gives apps a shared way to browse, edit, upload, attach, and
9
+ search files or workspace resources. It powers the agent panel workspace tab,
10
+ can be rendered as a page or drawer, and connects naturally to local file mode
11
+ for repo-backed content.
12
+
13
+ <WireframeBlock id="doc-block-toolkit-resources">
14
+ <Screen
15
+ surface="desktop"
16
+ html={
17
+ "<div style='min-height:560px;box-sizing:border-box;padding:26px;display:grid;grid-template-columns:260px 1fr 240px;gap:16px'><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Resources</strong><div class='wf-box'>docs/</div><div class='wf-box'>blog/</div><div class='wf-box'>assets/</div><div class='wf-box'>Q3 forecast.md</div></aside><main class='wf-card' style='display:flex;flex-direction:column;gap:12px'><h2 style='margin:0'>Q3 forecast.md</h2><div class='wf-box' style='height:330px'>ResourceEditor</div><button class='primary'>Save</button></main><aside class='wf-card' style='display:flex;flex-direction:column;gap:10px'><strong>Attachments</strong><div class='wf-box'>Drop file</div><div class='wf-box'>Search resources</div><div class='wf-box'>local file mode: on</div></aside></div>"
18
+ }
19
+ />
20
+ </WireframeBlock>
21
+
22
+ ## Pieces {#pieces}
23
+
24
+ | Piece | Purpose |
25
+ | ------------------------------------- | ------------------------------------------------------------- |
26
+ | `<ResourcesPanel>` | Complete resource browser/editor panel. |
27
+ | `<ResourceTree>` | Tree primitive for personal, shared, and workspace resources. |
28
+ | `<ResourceEditor>` | Editor primitive for selected resources. |
29
+ | `useResourceTree()` / `useResource()` | Data hooks for custom resource chrome. |
30
+ | Resource mutations | Create, update, delete, upload, rename, and move resources. |
31
+ | File uploads | Shared attachment path for chat, resources, and app actions. |
32
+ | Local file mode | Repo-backed resources where files are the source of truth. |
33
+
34
+ ## Usage {#usage}
35
+
36
+ ```tsx
37
+ import {
38
+ ResourceEditor,
39
+ ResourceTree,
40
+ useResource,
41
+ useResourceTree,
42
+ } from "@agent-native/core/client/resources";
43
+
44
+ const tree = useResourceTree("workspace");
45
+ const resource = useResource(selectedId);
46
+ ```
47
+
48
+ ## UX Standard {#ux-standard}
49
+
50
+ - Use a stable tree/editor split for file-heavy apps.
51
+ - Keep attachments inspectable and agent-readable.
52
+ - Local file mode should preserve the repo as source of truth, while hosted
53
+ collaboration still uses SQL-backed runtime state.
54
+ - Resource actions should return deep links to the focused file/resource.
55
+
56
+ Related docs: [Local File Mode](/docs/local-file-mode),
57
+ [File Uploads](/docs/file-uploads), [Component API](/docs/components#resources).