@agent-native/core 0.7.7 → 0.7.11

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 (338) hide show
  1. package/dist/agent/engine/ai-sdk-engine.d.ts +14 -2
  2. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  3. package/dist/agent/engine/ai-sdk-engine.js +70 -54
  4. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  5. package/dist/agent/engine/anthropic-engine.d.ts +1 -6
  6. package/dist/agent/engine/anthropic-engine.d.ts.map +1 -1
  7. package/dist/agent/engine/anthropic-engine.js +3 -14
  8. package/dist/agent/engine/anthropic-engine.js.map +1 -1
  9. package/dist/agent/engine/builtin.d.ts.map +1 -1
  10. package/dist/agent/engine/builtin.js +3 -0
  11. package/dist/agent/engine/builtin.js.map +1 -1
  12. package/dist/agent/engine/translate-ai-sdk.d.ts +35 -10
  13. package/dist/agent/engine/translate-ai-sdk.d.ts.map +1 -1
  14. package/dist/agent/engine/translate-ai-sdk.js +190 -91
  15. package/dist/agent/engine/translate-ai-sdk.js.map +1 -1
  16. package/dist/agent/engine/types.d.ts +10 -1
  17. package/dist/agent/engine/types.d.ts.map +1 -1
  18. package/dist/agent/production-agent.d.ts +15 -1
  19. package/dist/agent/production-agent.d.ts.map +1 -1
  20. package/dist/agent/production-agent.js +78 -21
  21. package/dist/agent/production-agent.js.map +1 -1
  22. package/dist/agent/thread-data-builder.js +1 -1
  23. package/dist/agent/thread-data-builder.js.map +1 -1
  24. package/dist/agent/types.d.ts +4 -0
  25. package/dist/agent/types.d.ts.map +1 -1
  26. package/dist/application-state/script-helpers.d.ts +12 -5
  27. package/dist/application-state/script-helpers.d.ts.map +1 -1
  28. package/dist/application-state/script-helpers.js +41 -20
  29. package/dist/application-state/script-helpers.js.map +1 -1
  30. package/dist/catalog.json +15 -0
  31. package/dist/chat-threads/store.d.ts.map +1 -1
  32. package/dist/chat-threads/store.js +7 -5
  33. package/dist/chat-threads/store.js.map +1 -1
  34. package/dist/checkpoints/index.d.ts +3 -0
  35. package/dist/checkpoints/index.d.ts.map +1 -0
  36. package/dist/checkpoints/index.js +3 -0
  37. package/dist/checkpoints/index.js.map +1 -0
  38. package/dist/checkpoints/service.d.ts +6 -0
  39. package/dist/checkpoints/service.d.ts.map +1 -0
  40. package/dist/checkpoints/service.js +107 -0
  41. package/dist/checkpoints/service.js.map +1 -0
  42. package/dist/checkpoints/store.d.ts +27 -0
  43. package/dist/checkpoints/store.d.ts.map +1 -0
  44. package/dist/checkpoints/store.js +92 -0
  45. package/dist/checkpoints/store.js.map +1 -0
  46. package/dist/cli/create.d.ts.map +1 -1
  47. package/dist/cli/create.js +85 -1
  48. package/dist/cli/create.js.map +1 -1
  49. package/dist/cli/index.js +46 -3
  50. package/dist/cli/index.js.map +1 -1
  51. package/dist/cli/templates-meta.d.ts.map +1 -1
  52. package/dist/cli/templates-meta.js +33 -0
  53. package/dist/cli/templates-meta.js.map +1 -1
  54. package/dist/client/AgentPanel.d.ts.map +1 -1
  55. package/dist/client/AgentPanel.js +3 -1
  56. package/dist/client/AgentPanel.js.map +1 -1
  57. package/dist/client/AssistantChat.d.ts +15 -0
  58. package/dist/client/AssistantChat.d.ts.map +1 -1
  59. package/dist/client/AssistantChat.js +145 -67
  60. package/dist/client/AssistantChat.js.map +1 -1
  61. package/dist/client/CommandMenu.d.ts.map +1 -1
  62. package/dist/client/CommandMenu.js +9 -5
  63. package/dist/client/CommandMenu.js.map +1 -1
  64. package/dist/client/ConnectBuilderCard.js +1 -1
  65. package/dist/client/ConnectBuilderCard.js.map +1 -1
  66. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  67. package/dist/client/MultiTabAssistantChat.js +78 -4
  68. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  69. package/dist/client/agent-chat-adapter.d.ts +6 -0
  70. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  71. package/dist/client/agent-chat-adapter.js +4 -0
  72. package/dist/client/agent-chat-adapter.js.map +1 -1
  73. package/dist/client/composer/TiptapComposer.d.ts +12 -1
  74. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  75. package/dist/client/composer/TiptapComposer.js +71 -3
  76. package/dist/client/composer/TiptapComposer.js.map +1 -1
  77. package/dist/client/notifications/NotificationsBell.d.ts +23 -0
  78. package/dist/client/notifications/NotificationsBell.d.ts.map +1 -0
  79. package/dist/client/notifications/NotificationsBell.js +165 -0
  80. package/dist/client/notifications/NotificationsBell.js.map +1 -0
  81. package/dist/client/notifications/index.d.ts +2 -0
  82. package/dist/client/notifications/index.d.ts.map +1 -0
  83. package/dist/client/notifications/index.js +2 -0
  84. package/dist/client/notifications/index.js.map +1 -0
  85. package/dist/client/onboarding/OnboardingPanel.js +6 -3
  86. package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
  87. package/dist/client/progress/RunsTray.d.ts +18 -0
  88. package/dist/client/progress/RunsTray.d.ts.map +1 -0
  89. package/dist/client/progress/RunsTray.js +70 -0
  90. package/dist/client/progress/RunsTray.js.map +1 -0
  91. package/dist/client/progress/index.d.ts +2 -0
  92. package/dist/client/progress/index.d.ts.map +1 -0
  93. package/dist/client/progress/index.js +2 -0
  94. package/dist/client/progress/index.js.map +1 -0
  95. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  96. package/dist/client/resources/ResourcesPanel.js +19 -4
  97. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  98. package/dist/client/settings/AutomationsSection.d.ts +2 -0
  99. package/dist/client/settings/AutomationsSection.d.ts.map +1 -0
  100. package/dist/client/settings/AutomationsSection.js +214 -0
  101. package/dist/client/settings/AutomationsSection.js.map +1 -0
  102. package/dist/client/settings/ComingSoonSection.d.ts.map +1 -1
  103. package/dist/client/settings/ComingSoonSection.js +2 -1
  104. package/dist/client/settings/ComingSoonSection.js.map +1 -1
  105. package/dist/client/settings/LLMSection.d.ts.map +1 -1
  106. package/dist/client/settings/LLMSection.js +137 -10
  107. package/dist/client/settings/LLMSection.js.map +1 -1
  108. package/dist/client/settings/SecretsSection.d.ts.map +1 -1
  109. package/dist/client/settings/SecretsSection.js +122 -3
  110. package/dist/client/settings/SecretsSection.js.map +1 -1
  111. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  112. package/dist/client/settings/SettingsPanel.js +140 -11
  113. package/dist/client/settings/SettingsPanel.js.map +1 -1
  114. package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
  115. package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
  116. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  117. package/dist/client/use-pausing-interval.d.ts +11 -0
  118. package/dist/client/use-pausing-interval.d.ts.map +1 -0
  119. package/dist/client/use-pausing-interval.js +49 -0
  120. package/dist/client/use-pausing-interval.js.map +1 -0
  121. package/dist/db/client.d.ts +26 -0
  122. package/dist/db/client.d.ts.map +1 -1
  123. package/dist/db/client.js +84 -2
  124. package/dist/db/client.js.map +1 -1
  125. package/dist/db/drizzle-config.d.ts +33 -0
  126. package/dist/db/drizzle-config.d.ts.map +1 -0
  127. package/dist/db/drizzle-config.js +132 -0
  128. package/dist/db/drizzle-config.js.map +1 -0
  129. package/dist/db/migrations.d.ts.map +1 -1
  130. package/dist/db/migrations.js +11 -6
  131. package/dist/db/migrations.js.map +1 -1
  132. package/dist/deploy/build.js +2 -1
  133. package/dist/deploy/build.js.map +1 -1
  134. package/dist/event-bus/bus.d.ts +20 -0
  135. package/dist/event-bus/bus.d.ts.map +1 -0
  136. package/dist/event-bus/bus.js +108 -0
  137. package/dist/event-bus/bus.js.map +1 -0
  138. package/dist/event-bus/index.d.ts +4 -0
  139. package/dist/event-bus/index.d.ts.map +1 -0
  140. package/dist/event-bus/index.js +3 -0
  141. package/dist/event-bus/index.js.map +1 -0
  142. package/dist/event-bus/registry.d.ts +22 -0
  143. package/dist/event-bus/registry.d.ts.map +1 -0
  144. package/dist/event-bus/registry.js +63 -0
  145. package/dist/event-bus/registry.js.map +1 -0
  146. package/dist/event-bus/types.d.ts +27 -0
  147. package/dist/event-bus/types.d.ts.map +1 -0
  148. package/dist/event-bus/types.js +2 -0
  149. package/dist/event-bus/types.js.map +1 -0
  150. package/dist/integrations/config-store.d.ts.map +1 -1
  151. package/dist/integrations/config-store.js +16 -12
  152. package/dist/integrations/config-store.js.map +1 -1
  153. package/dist/integrations/google-docs-poller.d.ts.map +1 -1
  154. package/dist/integrations/google-docs-poller.js +5 -1
  155. package/dist/integrations/google-docs-poller.js.map +1 -1
  156. package/dist/jobs/scheduler.d.ts.map +1 -1
  157. package/dist/jobs/scheduler.js +7 -3
  158. package/dist/jobs/scheduler.js.map +1 -1
  159. package/dist/notifications/actions.d.ts +10 -0
  160. package/dist/notifications/actions.d.ts.map +1 -0
  161. package/dist/notifications/actions.js +114 -0
  162. package/dist/notifications/actions.js.map +1 -0
  163. package/dist/notifications/channels.d.ts +15 -0
  164. package/dist/notifications/channels.d.ts.map +1 -0
  165. package/dist/notifications/channels.js +97 -0
  166. package/dist/notifications/channels.js.map +1 -0
  167. package/dist/notifications/index.d.ts +4 -0
  168. package/dist/notifications/index.d.ts.map +1 -0
  169. package/dist/notifications/index.js +3 -0
  170. package/dist/notifications/index.js.map +1 -0
  171. package/dist/notifications/registry.d.ts +9 -0
  172. package/dist/notifications/registry.d.ts.map +1 -0
  173. package/dist/notifications/registry.js +146 -0
  174. package/dist/notifications/registry.js.map +1 -0
  175. package/dist/notifications/routes.d.ts +34 -0
  176. package/dist/notifications/routes.d.ts.map +1 -0
  177. package/dist/notifications/routes.js +69 -0
  178. package/dist/notifications/routes.js.map +1 -0
  179. package/dist/notifications/store.d.ts +25 -0
  180. package/dist/notifications/store.d.ts.map +1 -0
  181. package/dist/notifications/store.js +158 -0
  182. package/dist/notifications/store.js.map +1 -0
  183. package/dist/notifications/types.d.ts +43 -0
  184. package/dist/notifications/types.d.ts.map +1 -0
  185. package/dist/notifications/types.js +2 -0
  186. package/dist/notifications/types.js.map +1 -0
  187. package/dist/org/handlers.d.ts.map +1 -1
  188. package/dist/org/handlers.js +7 -26
  189. package/dist/org/handlers.js.map +1 -1
  190. package/dist/progress/actions.d.ts +8 -0
  191. package/dist/progress/actions.d.ts.map +1 -0
  192. package/dist/progress/actions.js +158 -0
  193. package/dist/progress/actions.js.map +1 -0
  194. package/dist/progress/index.d.ts +3 -0
  195. package/dist/progress/index.d.ts.map +1 -0
  196. package/dist/progress/index.js +2 -0
  197. package/dist/progress/index.js.map +1 -0
  198. package/dist/progress/registry.d.ts +22 -0
  199. package/dist/progress/registry.d.ts.map +1 -0
  200. package/dist/progress/registry.js +98 -0
  201. package/dist/progress/registry.js.map +1 -0
  202. package/dist/progress/routes.d.ts +21 -0
  203. package/dist/progress/routes.d.ts.map +1 -0
  204. package/dist/progress/routes.js +59 -0
  205. package/dist/progress/routes.js.map +1 -0
  206. package/dist/progress/store.d.ts +7 -0
  207. package/dist/progress/store.d.ts.map +1 -0
  208. package/dist/progress/store.js +195 -0
  209. package/dist/progress/store.js.map +1 -0
  210. package/dist/progress/types.d.ts +49 -0
  211. package/dist/progress/types.d.ts.map +1 -0
  212. package/dist/progress/types.js +7 -0
  213. package/dist/progress/types.js.map +1 -0
  214. package/dist/resources/store.d.ts.map +1 -1
  215. package/dist/resources/store.js +19 -15
  216. package/dist/resources/store.js.map +1 -1
  217. package/dist/secrets/index.d.ts +3 -2
  218. package/dist/secrets/index.d.ts.map +1 -1
  219. package/dist/secrets/index.js +3 -2
  220. package/dist/secrets/index.js.map +1 -1
  221. package/dist/secrets/routes.d.ts +41 -2
  222. package/dist/secrets/routes.d.ts.map +1 -1
  223. package/dist/secrets/routes.js +167 -1
  224. package/dist/secrets/routes.js.map +1 -1
  225. package/dist/secrets/schema.d.ts +39 -1
  226. package/dist/secrets/schema.d.ts.map +1 -1
  227. package/dist/secrets/schema.js +6 -0
  228. package/dist/secrets/schema.js.map +1 -1
  229. package/dist/secrets/storage.d.ts +26 -0
  230. package/dist/secrets/storage.d.ts.map +1 -1
  231. package/dist/secrets/storage.js +111 -5
  232. package/dist/secrets/storage.js.map +1 -1
  233. package/dist/secrets/substitution.d.ts +39 -0
  234. package/dist/secrets/substitution.d.ts.map +1 -0
  235. package/dist/secrets/substitution.js +93 -0
  236. package/dist/secrets/substitution.js.map +1 -0
  237. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  238. package/dist/server/agent-chat-plugin.js +1657 -1410
  239. package/dist/server/agent-chat-plugin.js.map +1 -1
  240. package/dist/server/auth.d.ts +11 -0
  241. package/dist/server/auth.d.ts.map +1 -1
  242. package/dist/server/auth.js +74 -21
  243. package/dist/server/auth.js.map +1 -1
  244. package/dist/server/better-auth-instance.d.ts.map +1 -1
  245. package/dist/server/better-auth-instance.js +34 -16
  246. package/dist/server/better-auth-instance.js.map +1 -1
  247. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  248. package/dist/server/core-routes-plugin.js +115 -1
  249. package/dist/server/core-routes-plugin.js.map +1 -1
  250. package/dist/server/email-templates.d.ts +43 -0
  251. package/dist/server/email-templates.d.ts.map +1 -0
  252. package/dist/server/email-templates.js +86 -0
  253. package/dist/server/email-templates.js.map +1 -0
  254. package/dist/server/framework-request-handler.d.ts +15 -0
  255. package/dist/server/framework-request-handler.d.ts.map +1 -1
  256. package/dist/server/framework-request-handler.js +64 -1
  257. package/dist/server/framework-request-handler.js.map +1 -1
  258. package/dist/server/onboarding-html.d.ts +11 -0
  259. package/dist/server/onboarding-html.d.ts.map +1 -1
  260. package/dist/server/onboarding-html.js +275 -16
  261. package/dist/server/onboarding-html.js.map +1 -1
  262. package/dist/server/schema-prompt.d.ts.map +1 -1
  263. package/dist/server/schema-prompt.js +5 -0
  264. package/dist/server/schema-prompt.js.map +1 -1
  265. package/dist/shared/index.d.ts +1 -0
  266. package/dist/shared/index.d.ts.map +1 -1
  267. package/dist/shared/index.js +1 -0
  268. package/dist/shared/index.js.map +1 -1
  269. package/dist/shared/truncate.d.ts +8 -0
  270. package/dist/shared/truncate.d.ts.map +1 -0
  271. package/dist/shared/truncate.js +12 -0
  272. package/dist/shared/truncate.js.map +1 -0
  273. package/dist/templates/default/.agents/skills/agent-engines/SKILL.md +60 -4
  274. package/dist/templates/default/.agents/skills/notifications/SKILL.md +95 -0
  275. package/dist/templates/default/.agents/skills/progress/SKILL.md +97 -0
  276. package/dist/templates/default/AGENTS.md +12 -10
  277. package/dist/templates/default/package.json +10 -10
  278. package/dist/templates/workspace-core/package.json +5 -5
  279. package/dist/templates/workspace-root/package.json +1 -1
  280. package/dist/templates/workspace-root/tsconfig.base.json +1 -2
  281. package/dist/tools/fetch-tool.d.ts +22 -0
  282. package/dist/tools/fetch-tool.d.ts.map +1 -0
  283. package/dist/tools/fetch-tool.js +156 -0
  284. package/dist/tools/fetch-tool.js.map +1 -0
  285. package/dist/tracking/index.d.ts +4 -0
  286. package/dist/tracking/index.d.ts.map +1 -0
  287. package/dist/tracking/index.js +3 -0
  288. package/dist/tracking/index.js.map +1 -0
  289. package/dist/tracking/providers.d.ts +15 -0
  290. package/dist/tracking/providers.d.ts.map +1 -0
  291. package/dist/tracking/providers.js +195 -0
  292. package/dist/tracking/providers.js.map +1 -0
  293. package/dist/tracking/registry.d.ts +10 -0
  294. package/dist/tracking/registry.d.ts.map +1 -0
  295. package/dist/tracking/registry.js +75 -0
  296. package/dist/tracking/registry.js.map +1 -0
  297. package/dist/tracking/types.d.ts +13 -0
  298. package/dist/tracking/types.d.ts.map +1 -0
  299. package/dist/tracking/types.js +2 -0
  300. package/dist/tracking/types.js.map +1 -0
  301. package/dist/triggers/actions.d.ts +10 -0
  302. package/dist/triggers/actions.d.ts.map +1 -0
  303. package/dist/triggers/actions.js +277 -0
  304. package/dist/triggers/actions.js.map +1 -0
  305. package/dist/triggers/condition-evaluator.d.ts +15 -0
  306. package/dist/triggers/condition-evaluator.d.ts.map +1 -0
  307. package/dist/triggers/condition-evaluator.js +107 -0
  308. package/dist/triggers/condition-evaluator.js.map +1 -0
  309. package/dist/triggers/dispatcher.d.ts +32 -0
  310. package/dist/triggers/dispatcher.d.ts.map +1 -0
  311. package/dist/triggers/dispatcher.js +291 -0
  312. package/dist/triggers/dispatcher.js.map +1 -0
  313. package/dist/triggers/index.d.ts +5 -0
  314. package/dist/triggers/index.d.ts.map +1 -0
  315. package/dist/triggers/index.js +4 -0
  316. package/dist/triggers/index.js.map +1 -0
  317. package/dist/triggers/types.d.ts +35 -0
  318. package/dist/triggers/types.d.ts.map +1 -0
  319. package/dist/triggers/types.js +9 -0
  320. package/dist/triggers/types.js.map +1 -0
  321. package/dist/vite/client.d.ts.map +1 -1
  322. package/dist/vite/client.js +66 -16
  323. package/dist/vite/client.js.map +1 -1
  324. package/docs/content/automations.md +239 -0
  325. package/docs/content/multi-tenancy.md +88 -0
  326. package/docs/content/notifications.md +199 -0
  327. package/docs/content/progress.md +176 -0
  328. package/docs/content/tracking.md +168 -0
  329. package/package.json +54 -35
  330. package/src/templates/default/.agents/skills/agent-engines/SKILL.md +60 -4
  331. package/src/templates/default/.agents/skills/notifications/SKILL.md +95 -0
  332. package/src/templates/default/.agents/skills/progress/SKILL.md +97 -0
  333. package/src/templates/default/AGENTS.md +12 -10
  334. package/src/templates/default/package.json +10 -10
  335. package/src/templates/workspace-core/package.json +5 -5
  336. package/src/templates/workspace-root/package.json +1 -1
  337. package/src/templates/workspace-root/tsconfig.base.json +1 -2
  338. package/tsconfig.base.json +1 -1
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: notifications
3
+ description: >-
4
+ In-app notifications primitive with pluggable server-side channels. Use when
5
+ the agent needs to surface progress, alerts, or completions to the user —
6
+ both in-app (bell + toast) and out-of-band (webhook, Slack, custom).
7
+ ---
8
+
9
+ # Notifications
10
+
11
+ `notify()` is the framework's "tell the user something" primitive. Every call persists a row to the inbox (drives the bell UI) and fans out to any registered server-side channels. Channels follow the same pluggable-provider pattern as `tracking` — register at startup, `notify()` fans out, errors are isolated.
12
+
13
+ Use for: *agent progress milestones, automation triggers firing, background job completions, critical errors*. Don't use for chat replies — those go through the conversation.
14
+
15
+ ## Tools
16
+
17
+ | Tool | Purpose |
18
+ |---|---|
19
+ | `notify` | Send a notification (severity + title + optional body/metadata/channels) |
20
+ | `list-notifications` | Show recent notifications for the current user |
21
+
22
+ ## Sending
23
+
24
+ ```
25
+ notify --severity info --title "Booking confirmed" --body "Jane at 3pm"
26
+ ```
27
+
28
+ | Severity | When |
29
+ |---|---|
30
+ | `info` | FYI / progress / confirmation |
31
+ | `warning` | Something to look at soon |
32
+ | `critical` | Needs immediate attention |
33
+
34
+ Optional: `--metadataJson '{"threadId":"abc"}'`, `--channels inbox,webhook` (omit to run all registered).
35
+
36
+ ## Delivery
37
+
38
+ `notify()` always inserts into the `notifications` table (unless `channels` explicitly excludes `inbox`), then fans out to every registered channel in parallel (best-effort; a failing channel doesn't block others). Finally it emits `notification.sent` on the event bus so automations can chain — e.g. *"when a critical notification fires, also page on-call."*
39
+
40
+ ## Built-in Channels
41
+
42
+ | Channel | How | Requires |
43
+ |---|---|---|
44
+ | `inbox` | INSERT → drives bell UI | (always on) |
45
+ | `webhook` | POST JSON to `NOTIFICATIONS_WEBHOOK_URL` (+ optional `NOTIFICATIONS_WEBHOOK_AUTH`); both support `${keys.NAME}` + URL allowlists from the ad-hoc-keys system | env var set |
46
+
47
+ The webhook channel resolves `${keys.NAME}` server-side — the raw value never enters the agent context.
48
+
49
+ ## Registering a Custom Channel
50
+
51
+ ```ts
52
+ // server/plugins/notifications-slack.ts
53
+ import { registerNotificationChannel } from "@agent-native/core/notifications";
54
+
55
+ export default () => {
56
+ registerNotificationChannel({
57
+ name: "slack-ops",
58
+ async deliver(input, meta) {
59
+ await fetch(process.env.OPS_SLACK_WEBHOOK!, {
60
+ method: "POST",
61
+ headers: { "Content-Type": "application/json" },
62
+ body: JSON.stringify({ text: `*${input.severity}* — ${input.title}`, owner: meta.owner }),
63
+ });
64
+ },
65
+ });
66
+ };
67
+ ```
68
+
69
+ Names are unique — re-registering replaces. `deliver()` must be best-effort; a thrown error is logged and ignored. Do NOT call `notify()` from inside a channel (recursion).
70
+
71
+ ## HTTP API
72
+
73
+ Mounted at `/_agent-native/notifications/*` by `core-routes-plugin`, all session-scoped:
74
+
75
+ - `GET /notifications?unread=true&limit=50&before=<iso>`
76
+ - `GET /notifications/count`
77
+ - `POST /notifications/:id/read`
78
+ - `POST /notifications/read-all`
79
+ - `DELETE /notifications/:id`
80
+
81
+ ## UI
82
+
83
+ ```tsx
84
+ import { NotificationsBell } from "@agent-native/core/client/notifications";
85
+
86
+ <NotificationsBell browserNotifications />
87
+ ```
88
+
89
+ Bell icon + unread badge + lazy-loaded dropdown. Pass `browserNotifications` to also fire system `new Notification(...)` popups for items that arrive after mount (dedups by id, renders an "Enable" prompt until permission is granted, silently no-ops on denied / unsupported). Styled with shadcn tokens — adapts to the host theme.
90
+
91
+ ## Related
92
+
93
+ - `automations` — event-triggered bodies can call `notify`.
94
+ - `secrets` — `${keys.NAME}` substitution + URL allowlists powering the webhook channel.
95
+ - `tracking` — analytics; separate concern, don't route through notifications.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: progress
3
+ description: >-
4
+ Report live progress from long-running agent tasks. Use when a task takes
5
+ more than a few seconds, so the user can watch status in the runs tray
6
+ instead of staring at a spinner.
7
+ ---
8
+
9
+ # Progress
10
+
11
+ ## Overview
12
+
13
+ `progress_runs` is the framework's "what is the agent doing right now" primitive. The agent starts a run at the top of a long task, updates it as work proceeds, and completes it with a terminal status. The UI renders active runs in a header-bar widget with a percent bar, current step, and spinner/check/X — live visibility into work that would otherwise be opaque.
14
+
15
+ Separate concern from `notifications`:
16
+
17
+ | | Notifications | Progress |
18
+ |---|---|---|
19
+ | Shape | One-shot event — "X happened" | Continuous state — "X is 45% done" |
20
+ | UI surface | Bell + toast | Runs tray with percent bar |
21
+ | Lifecycle | Dismissable (read/unread) | Running → terminal (succeeded/failed/cancelled) |
22
+
23
+ Common pattern: on completion, emit a `notify()` so the user sees the outcome when they're not actively watching the tray.
24
+
25
+ ## Available Tools
26
+
27
+ | Tool | Purpose |
28
+ |---|---|
29
+ | `start-run` | Mark the start of a long task. Returns a runId. |
30
+ | `update-run-progress` | Update percent and/or current step. Call frequently. |
31
+ | `complete-run` | Mark terminal status: `succeeded`, `failed`, `cancelled`. |
32
+ | `list-runs` | List recent runs (all or `--active=true`). |
33
+
34
+ ## Canonical Flow
35
+
36
+ ```
37
+ start-run --title "Triage 128 unread emails" --step "Fetching inbox"
38
+ → runId=abc
39
+
40
+ update-run-progress --runId=abc --percent=25 --step="Classifying 32/128"
41
+ update-run-progress --runId=abc --percent=75 --step="Drafting replies 97/128"
42
+
43
+ complete-run --runId=abc --status=succeeded
44
+ notify --severity=info --title="Triage done" --body="12 archived, 6 drafts ready to review"
45
+ ```
46
+
47
+ ## Best Practices
48
+
49
+ - **Start a run for anything > ~5 seconds.** Users want feedback; a spinner with no context feels frozen.
50
+ - **Update at natural checkpoints**, not every iteration. Every 5–10% is enough for most UIs.
51
+ - **Always call `complete-run`** at the end — including the error path. An orphaned `running` row is worse than no row.
52
+ - **Pair with `notify`** on completion. The tray tells users what's *running*; notifications tell them what *finished*.
53
+ - **Use `metadataJson`** on `start-run` to pass a link back to the produced artifact (thread id, document path), so the UI can deep-link from the runs tray.
54
+
55
+ ## Runs API
56
+
57
+ Mounted at `/_agent-native/runs/*` by `core-routes-plugin`. **Read-only** over HTTP — writes flow through the agent tools:
58
+
59
+ | Method | Route |
60
+ |---|---|
61
+ | `GET` | `/_agent-native/runs?active=true&limit=50` |
62
+ | `GET` | `/_agent-native/runs/:id` |
63
+ | `DELETE` | `/_agent-native/runs/:id` |
64
+
65
+ ## UI Surface
66
+
67
+ Ships as `<RunsTray />` at `@agent-native/core/client/progress`:
68
+
69
+ ```tsx
70
+ import { RunsTray } from "@agent-native/core/client/progress";
71
+
72
+ export function HeaderBar() {
73
+ return (
74
+ <header className="flex items-center gap-2">
75
+ {/* … */}
76
+ <RunsTray />
77
+ </header>
78
+ );
79
+ }
80
+ ```
81
+
82
+ Inline header widget — mount next to the notifications bell. Shows a spinner icon + count badge when runs are active; click opens a dropdown with a live percent bar per run. Hides the trigger entirely when no active runs. Polls `active=true` every `pollMs` (default 3s).
83
+
84
+ ## Event Bus Integration
85
+
86
+ Two events emit on the bus so automations can react:
87
+
88
+ - `run.progress.started` — `{ runId, title, step? }`
89
+ - `run.progress.updated` — `{ runId, percent, step, status }`
90
+
91
+ Example automation: *"when a run takes longer than 5 minutes, notify me."*
92
+
93
+ ## Related Skills
94
+
95
+ - `notifications` — fire one when a run finishes so the user sees the outcome.
96
+ - `automations` — subscribe to `run.progress.updated` to build watchdogs on slow runs.
97
+ - `delegate-to-agent` — if you're delegating a long task, start a run on the delegator side so the caller has visibility.
@@ -84,16 +84,18 @@ You do NOT get auto-injected screen state. **Call `pnpm action view-screen` at t
84
84
 
85
85
  Skills in `.agents/skills/` provide detailed guidance for each architectural rule. Read them before making changes.
86
86
 
87
- | Skill | When to read |
88
- | --------------------- | -------------------------------------------------------------- |
89
- | `storing-data` | Before storing or reading any app state |
90
- | `delegate-to-agent` | Before adding LLM calls or AI delegation |
91
- | `actions` | Before creating or modifying actions |
92
- | `real-time-sync` | Before wiring up real-time UI sync |
93
- | `self-modifying-code` | Before editing source, components, or styles |
94
- | `capture-learnings` | Before recording user preferences or corrections |
95
- | `frontend-design` | Before building or restyling any UI component, page, or layout |
96
- | `agent-engines` | Before switching LLM providers or registering a custom engine |
87
+ | Skill | When to read |
88
+ | --------------------- | --------------------------------------------------------------- |
89
+ | `storing-data` | Before storing or reading any app state |
90
+ | `delegate-to-agent` | Before adding LLM calls or AI delegation |
91
+ | `actions` | Before creating or modifying actions |
92
+ | `real-time-sync` | Before wiring up real-time UI sync |
93
+ | `self-modifying-code` | Before editing source, components, or styles |
94
+ | `capture-learnings` | Before recording user preferences or corrections |
95
+ | `frontend-design` | Before building or restyling any UI component, page, or layout |
96
+ | `agent-engines` | Before switching LLM providers or registering a custom engine |
97
+ | `notifications` | Before surfacing alerts/progress to the user or adding channels |
98
+ | `progress` | Before running any task that takes more than a few seconds |
97
99
 
98
100
  ## When Adding Features
99
101
 
@@ -22,23 +22,23 @@
22
22
  "@react-router/dev": "^7.13.1",
23
23
  "@react-router/fs-routes": "^7.13.1",
24
24
  "@tailwindcss/vite": "^4.1.18",
25
- "@tanstack/react-query": "^5.84.2",
25
+ "@tanstack/react-query": "^5.99.2",
26
26
  "@types/node": "^24.2.1",
27
- "@types/react": "^18.3.23",
28
- "@types/react-dom": "^18.3.7",
27
+ "@types/react": "^19.2.14",
28
+ "@types/react-dom": "^19.2.3",
29
29
  "class-variance-authority": "^0.7.1",
30
30
  "clsx": "^2.1.1",
31
- "lucide-react": "^0.539.0",
31
+ "lucide-react": "^1.8.0",
32
32
  "next-themes": "^0.4.6",
33
33
  "prettier": "^3.6.2",
34
- "react": "^18.3.1",
35
- "react-dom": "^18.3.1",
34
+ "react": "^19.2.5",
35
+ "react-dom": "^19.2.5",
36
36
  "react-router": "^7.13.1",
37
- "sonner": "^1.7.4",
38
- "tailwind-merge": "^2.6.0",
37
+ "sonner": "^2.0.7",
38
+ "tailwind-merge": "^3.5.0",
39
39
  "tailwindcss": "^4.1.18",
40
40
  "tsx": "^4.20.3",
41
- "typescript": "^5.9.2",
42
- "vite": "^7.1.2"
41
+ "typescript": "^6.0.3",
42
+ "vite": "^8.0.0"
43
43
  }
44
44
  }
@@ -23,14 +23,14 @@
23
23
  "./styles/tokens.css": "./styles/tokens.css"
24
24
  },
25
25
  "dependencies": {
26
- "@agent-native/core": "^0.6.0"
26
+ "@agent-native/core": "^0.7.10"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/react": "^18.3.23",
30
- "react": "^18.3.1",
31
- "typescript": "^5.9.2"
29
+ "@types/react": "^19.2.14",
30
+ "react": "^19.2.5",
31
+ "typescript": "^6.0.3"
32
32
  },
33
33
  "peerDependencies": {
34
- "react": "^18.3.1"
34
+ "react": "^19.2.5"
35
35
  }
36
36
  }
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "devDependencies": {
14
14
  "prettier": "^3.6.2",
15
- "typescript": "^5.9.2"
15
+ "typescript": "^6.0.3"
16
16
  },
17
17
  "packageManager": "pnpm@10.14.0"
18
18
  }
@@ -15,7 +15,6 @@
15
15
  "skipLibCheck": true,
16
16
  "resolveJsonModule": true,
17
17
  "isolatedModules": true,
18
- "allowSyntheticDefaultImports": true,
19
- "forceConsistentCasingInFileNames": true
18
+ "allowSyntheticDefaultImports": true
20
19
  }
21
20
  }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "compilerOptions": {
4
+ "ignoreDeprecations": "6.0",
4
5
  "target": "ES2020",
5
6
  "useDefineForClassFields": true,
6
7
  "lib": ["ES2020", "DOM", "DOM.Iterable"],
@@ -15,7 +16,6 @@
15
16
  "jsx": "react-jsx",
16
17
  "esModuleInterop": true,
17
18
  "allowSyntheticDefaultImports": true,
18
- "forceConsistentCasingInFileNames": true,
19
19
 
20
20
  "strict": false,
21
21
  "noUnusedLocals": false,