@agent-native/core 0.91.2 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +17 -0
  3. package/corpus/core/docs/content/faq.mdx +17 -0
  4. package/corpus/core/docs/content/notifications.mdx +12 -6
  5. package/corpus/core/package.json +1 -1
  6. package/corpus/core/src/agent/production-agent.ts +140 -46
  7. package/corpus/core/src/agent/tool-search.ts +71 -4
  8. package/corpus/core/src/cli/index.ts +20 -0
  9. package/corpus/core/src/cli/upgrade.ts +798 -0
  10. package/corpus/core/src/client/AssistantChat.tsx +1 -1
  11. package/corpus/core/src/client/HighlightedCodeBlock.tsx +20 -3
  12. package/corpus/core/src/client/agent-chat-adapter.ts +31 -6
  13. package/corpus/core/src/client/chat/message-components.tsx +85 -8
  14. package/corpus/core/src/client/chat/tool-call-display.tsx +355 -144
  15. package/corpus/core/src/client/code-agent-chat-adapter.ts +2 -9
  16. package/corpus/core/src/client/session-replay.ts +3 -97
  17. package/corpus/core/src/client/settings/SettingsPanel.tsx +533 -389
  18. package/corpus/core/src/client/settings/SettingsSection.tsx +154 -17
  19. package/corpus/core/src/client/sse-event-processor.ts +29 -2
  20. package/corpus/core/src/extensions/actions.ts +113 -5
  21. package/corpus/core/src/notifications/channels.ts +88 -25
  22. package/corpus/core/src/notifications/registry.ts +17 -3
  23. package/corpus/core/src/notifications/types.ts +4 -1
  24. package/corpus/core/src/server/agent-chat-plugin.ts +7 -3
  25. package/corpus/core/src/server/request-context.ts +7 -0
  26. package/corpus/core/src/styles/agent-conversation.css +1 -1
  27. package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  28. package/corpus/core/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  29. package/corpus/core/src/templates/default/AGENTS.md +10 -3
  30. package/corpus/core/src/templates/default/package.json +2 -1
  31. package/corpus/core/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  32. package/corpus/core/src/templates/headless/AGENTS.md +9 -3
  33. package/corpus/core/src/templates/headless/package.json +1 -0
  34. package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  35. package/corpus/core/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  36. package/corpus/core/src/templates/workspace-root/AGENTS.md +10 -4
  37. package/corpus/core/src/templates/workspace-root/package.json +1 -0
  38. package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +20 -2
  39. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +5 -6
  40. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  41. package/corpus/templates/analytics/AGENTS.md +7 -5
  42. package/corpus/templates/analytics/actions/save-monitor.ts +14 -0
  43. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +41 -6
  44. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +122 -11
  45. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +8 -2
  46. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +151 -32
  47. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +17 -2
  48. package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +4 -0
  49. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +54 -190
  50. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-tables-keep-their-size-while-loading.md +6 -0
  51. package/corpus/templates/analytics/changelog/2026-07-08-monitoring-uptime-and-errors-tabs-now-clearly-show-which-view-is-active.md +6 -0
  52. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-uses-stock-rrweb-sizing-again-so-recorded.md +6 -0
  53. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-dashboard-menus-now-open-above-the-dashboard-canvas.md +6 -0
  54. package/corpus/templates/analytics/changelog/2026-07-08-uptime-alerting-clarifies-in-app-inbox-vs-email-and-lets-you-paste-slack-or-webhook-urls-per-monitor.md +6 -0
  55. package/corpus/templates/analytics/docs/uptime-monitoring.md +13 -11
  56. package/corpus/templates/analytics/server/db/schema-monitoring.ts +4 -0
  57. package/corpus/templates/analytics/server/lib/uptime-monitors.ts +60 -12
  58. package/corpus/templates/analytics/server/plugins/db.ts +10 -0
  59. package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +20 -2
  60. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  61. package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +20 -2
  62. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  63. package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +20 -2
  64. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  65. package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +20 -2
  66. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  67. package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +20 -2
  68. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  69. package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-notes-stay-active-from-tray-and-shortcut-controls.md +6 -0
  70. package/corpus/templates/clips/changelog/2026-07-08-desktop-meeting-popovers-can-start-notes-and-join-the-meetin.md +6 -0
  71. package/corpus/templates/clips/changelog/2026-07-08-meeting-notes-keep-their-recording-state-when-the-desktop.md +6 -0
  72. package/corpus/templates/clips/changelog/2026-07-08-meeting-reminder-dropdowns-now-expand-fully-instead-of-being.md +6 -0
  73. package/corpus/templates/clips/desktop/src/app.tsx +123 -3
  74. package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +15 -1
  75. package/corpus/templates/clips/desktop/src/overlays/meeting-notification.tsx +23 -0
  76. package/corpus/templates/clips/desktop/src/styles.css +23 -1
  77. package/corpus/templates/clips/desktop/src-tauri/src/adhoc_meetings_watcher.rs +1 -3
  78. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +40 -6
  79. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -2
  80. package/corpus/templates/clips/desktop/src-tauri/src/meetings_watcher.rs +3 -5
  81. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +23 -19
  82. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +3 -3
  83. package/corpus/templates/clips/desktop/src-tauri/src/silence_detector.rs +0 -1
  84. package/corpus/templates/clips/desktop/src-tauri/src/state.rs +5 -0
  85. package/corpus/templates/clips/desktop/src-tauri/src/tray.rs +18 -6
  86. package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +20 -2
  87. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  88. package/corpus/templates/content/actions/_batch-utils.ts +8 -0
  89. package/corpus/templates/content/actions/_builder-cms-read-client.ts +7 -5
  90. package/corpus/templates/content/actions/_database-source-utils.ts +776 -319
  91. package/corpus/templates/content/actions/_database-utils.ts +6 -1
  92. package/corpus/templates/content/actions/_property-utils.ts +168 -0
  93. package/corpus/templates/content/actions/add-content-database-source-field-property.ts +19 -12
  94. package/corpus/templates/content/actions/bind-content-database-source-field.ts +19 -12
  95. package/corpus/templates/content/actions/delete-document.ts +9 -13
  96. package/corpus/templates/content/actions/refresh-content-database-source.ts +5 -5
  97. package/corpus/templates/content/app/components/editor/body-hydration.ts +35 -11
  98. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +47 -5
  99. package/corpus/templates/content/app/hooks/use-documents.ts +8 -2
  100. package/corpus/templates/content/changelog/2026-07-08-builder-source-sync-now-completes-reliably-on-hosted-databases.md +6 -0
  101. package/corpus/templates/content/changelog/2026-07-08-fixed-builder-database-sync-so-large-sources-continue-past-t.md +6 -0
  102. package/corpus/templates/content/server/plugins/db.ts +19 -0
  103. package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +20 -2
  104. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  105. package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +20 -2
  106. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  107. package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +20 -2
  108. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  109. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  110. package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +20 -2
  111. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  112. package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +20 -2
  113. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  114. package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +20 -2
  115. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  116. package/corpus/templates/videos/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  117. package/corpus/templates/voice/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  118. package/dist/agent/production-agent.d.ts +5 -1
  119. package/dist/agent/production-agent.d.ts.map +1 -1
  120. package/dist/agent/production-agent.js +112 -42
  121. package/dist/agent/production-agent.js.map +1 -1
  122. package/dist/agent/tool-search.d.ts +2 -0
  123. package/dist/agent/tool-search.d.ts.map +1 -1
  124. package/dist/agent/tool-search.js +60 -4
  125. package/dist/agent/tool-search.js.map +1 -1
  126. package/dist/cli/index.js +19 -0
  127. package/dist/cli/index.js.map +1 -1
  128. package/dist/cli/upgrade.d.ts +100 -0
  129. package/dist/cli/upgrade.d.ts.map +1 -0
  130. package/dist/cli/upgrade.js +678 -0
  131. package/dist/cli/upgrade.js.map +1 -0
  132. package/dist/client/AssistantChat.js +1 -1
  133. package/dist/client/AssistantChat.js.map +1 -1
  134. package/dist/client/HighlightedCodeBlock.d.ts +2 -0
  135. package/dist/client/HighlightedCodeBlock.d.ts.map +1 -1
  136. package/dist/client/HighlightedCodeBlock.js +10 -1
  137. package/dist/client/HighlightedCodeBlock.js.map +1 -1
  138. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  139. package/dist/client/agent-chat-adapter.js +32 -4
  140. package/dist/client/agent-chat-adapter.js.map +1 -1
  141. package/dist/client/chat/message-components.d.ts.map +1 -1
  142. package/dist/client/chat/message-components.js +61 -8
  143. package/dist/client/chat/message-components.js.map +1 -1
  144. package/dist/client/chat/tool-call-display.d.ts +12 -0
  145. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  146. package/dist/client/chat/tool-call-display.js +136 -42
  147. package/dist/client/chat/tool-call-display.js.map +1 -1
  148. package/dist/client/code-agent-chat-adapter.js +2 -9
  149. package/dist/client/code-agent-chat-adapter.js.map +1 -1
  150. package/dist/client/session-replay.d.ts +0 -8
  151. package/dist/client/session-replay.d.ts.map +1 -1
  152. package/dist/client/session-replay.js +3 -80
  153. package/dist/client/session-replay.js.map +1 -1
  154. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  155. package/dist/client/settings/SettingsPanel.js +52 -19
  156. package/dist/client/settings/SettingsPanel.js.map +1 -1
  157. package/dist/client/settings/SettingsSection.d.ts +19 -4
  158. package/dist/client/settings/SettingsSection.d.ts.map +1 -1
  159. package/dist/client/settings/SettingsSection.js +33 -4
  160. package/dist/client/settings/SettingsSection.js.map +1 -1
  161. package/dist/client/sse-event-processor.d.ts +9 -0
  162. package/dist/client/sse-event-processor.d.ts.map +1 -1
  163. package/dist/client/sse-event-processor.js +20 -2
  164. package/dist/client/sse-event-processor.js.map +1 -1
  165. package/dist/collab/routes.d.ts +1 -1
  166. package/dist/extensions/actions.d.ts.map +1 -1
  167. package/dist/extensions/actions.js +85 -5
  168. package/dist/extensions/actions.js.map +1 -1
  169. package/dist/notifications/channels.d.ts +8 -3
  170. package/dist/notifications/channels.d.ts.map +1 -1
  171. package/dist/notifications/channels.js +61 -22
  172. package/dist/notifications/channels.js.map +1 -1
  173. package/dist/notifications/registry.d.ts.map +1 -1
  174. package/dist/notifications/registry.js +14 -3
  175. package/dist/notifications/registry.js.map +1 -1
  176. package/dist/notifications/routes.d.ts +1 -1
  177. package/dist/notifications/types.d.ts +4 -1
  178. package/dist/notifications/types.d.ts.map +1 -1
  179. package/dist/notifications/types.js.map +1 -1
  180. package/dist/observability/routes.d.ts +1 -1
  181. package/dist/resources/handlers.d.ts +1 -1
  182. package/dist/server/agent-chat-plugin.d.ts +5 -1
  183. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  184. package/dist/server/agent-chat-plugin.js +2 -2
  185. package/dist/server/agent-chat-plugin.js.map +1 -1
  186. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  187. package/dist/server/request-context.d.ts +7 -0
  188. package/dist/server/request-context.d.ts.map +1 -1
  189. package/dist/server/request-context.js.map +1 -1
  190. package/dist/styles/agent-conversation.css +1 -1
  191. package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  192. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  193. package/dist/templates/default/AGENTS.md +10 -3
  194. package/dist/templates/default/package.json +2 -1
  195. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  196. package/dist/templates/headless/AGENTS.md +9 -3
  197. package/dist/templates/headless/package.json +1 -0
  198. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  199. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  200. package/dist/templates/workspace-root/AGENTS.md +10 -4
  201. package/dist/templates/workspace-root/package.json +1 -0
  202. package/docs/content/faq.mdx +17 -0
  203. package/docs/content/notifications.mdx +12 -6
  204. package/package.json +2 -2
  205. package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +20 -2
  206. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  207. package/src/templates/default/AGENTS.md +10 -3
  208. package/src/templates/default/package.json +2 -1
  209. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  210. package/src/templates/headless/AGENTS.md +9 -3
  211. package/src/templates/headless/package.json +1 -0
  212. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +20 -2
  213. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  214. package/src/templates/workspace-root/AGENTS.md +10 -4
  215. package/src/templates/workspace-root/package.json +1 -0
  216. package/corpus/templates/analytics/changelog/2026-07-08-session-replay-clamps-ultra-wide-viewports-while-keeping-the.md +0 -6
@@ -108,12 +108,18 @@ Severity drives the badge styling in the dropdown and is passed through to chann
108
108
 
109
109
  ## Built-in channels {#channels}
110
110
 
111
- | Channel | Delivery | Requires |
112
- | --------- | --------------------------------------------------------- | --------------------------------------------------- |
113
- | `inbox` | Persists to the `notifications` table; drives the bell UI | Always on — part of the primitive. |
114
- | `webhook` | POST JSON to a configured URL | `NOTIFICATIONS_WEBHOOK_URL` env var set at startup. |
115
-
116
- The webhook channel resolves `${keys.NAME}` references in both the URL and `NOTIFICATIONS_WEBHOOK_AUTH` against the owner's ad-hoc [secrets](/docs/security), so the raw value never enters the agent's context. Per-key URL allowlists are enforced — same rule the automations `web-request` tool uses.
111
+ | Channel | Delivery | Requires |
112
+ | --------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------- |
113
+ | `inbox` | Persists to the `notifications` table; drives the bell UI | Always on — part of the primitive. |
114
+ | `email` | Sends email via Resend/SendGrid | Per-notification `metadata.emailRecipients` and/or `NOTIFICATIONS_EMAIL_RECIPIENTS`. |
115
+ | `slack` | POST Slack Block Kit JSON to an incoming webhook | Per-notification `metadata.slackWebhookUrl` and/or `NOTIFICATIONS_SLACK_WEBHOOK_URL`. |
116
+ | `webhook` | POST JSON to a configured URL | Per-notification `metadata.webhookUrl` and/or `NOTIFICATIONS_WEBHOOK_URL`. |
117
+
118
+ Slack and webhook are always registered. Delivery prefers the per-notification
119
+ metadata URL, then falls back to the matching env var. If neither is set, that
120
+ channel no-ops for the emission.
121
+
122
+ The webhook and Slack channels resolve `${keys.NAME}` references in both the URL and `NOTIFICATIONS_*_AUTH` against the owner's ad-hoc [secrets](/docs/security), so the raw value never enters the agent's context. Per-key URL allowlists are enforced — same rule the automations `web-request` tool uses.
117
123
 
118
124
  <Diagram id="doc-block-1lduyog" title="Channels and severity" summary={"inbox is always on; webhook needs an env var; custom channels register at startup. Severity drives badge styling and is passed through to every channel."}>
119
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.91.2",
3
+ "version": "0.92.0",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -315,7 +315,7 @@
315
315
  "y-protocols": "^1.0.7",
316
316
  "yjs": "^13.6.31",
317
317
  "zod": "^4.3.6",
318
- "@agent-native/toolkit": "0.4.3"
318
+ "@agent-native/toolkit": "0.4.4"
319
319
  },
320
320
  "devDependencies": {
321
321
  "@ai-sdk/anthropic": "^3.0.71",
@@ -28,7 +28,19 @@ Not all modifications are equal. Use this to decide what level of care is needed
28
28
  | 1: Data | Files in `data/` | JSON state, generated content, markdown | Nothing — these are routine |
29
29
  | 2: Source | App code | Components, routes, styles, scripts | Run `pnpm typecheck && pnpm lint` |
30
30
  | 3: Config | Project config | `package.json`, `tsconfig.json`, `vite.config.*` | Ask for explicit approval first |
31
- | 4: Off limits | Secrets and framework | `.env`, `@agent-native/core` internals | Never modify these |
31
+ | 4: Off limits | Secrets and framework | `.env`, `@agent-native/*` packages & overrides | Never modify these |
32
+
33
+ Tier 4 includes **all** of the following — not only editing package source:
34
+
35
+ - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
36
+ - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
37
+ target any `@agent-native/*` package
38
+ - Local patches, vendored copies, or invented "dispatch/core behavior"
39
+ shims meant to paper over a version skew or failed upgrade
40
+
41
+ When an older branch needs current packages, use **`agent-native upgrade`**
42
+ (see the `upgrade-agent-native` skill). If upgrade or typecheck fails, fix
43
+ **app** code or stop and ask — do not patch the framework.
32
44
 
33
45
  ## Git Checkpoint Pattern
34
46
 
@@ -74,13 +86,19 @@ inline strings in components.
74
86
  ## Don't
75
87
 
76
88
  - Don't modify `.env` files or files containing secrets
77
- - Don't modify `@agent-native/core` package internals
89
+ - Don't modify `@agent-native/core`, `@agent-native/dispatch`, or other
90
+ `@agent-native/*` package internals (including under `node_modules`)
91
+ - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
92
+ `@agent-native/*` to "make the app run" after a version bump
93
+ - Don't invent local dispatch/core behavior overrides when upgrade fails —
94
+ run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
78
95
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
79
96
  - Don't skip the typecheck/lint step after editing source code
80
97
  - Don't make source changes without a git checkpoint to roll back to
81
98
 
82
99
  ## Related Skills
83
100
 
101
+ - **upgrade-agent-native** — supported path to bring an older app/workspace current
84
102
  - **storing-data** — Tier 1 modifications (data files) are the safest and most common
85
103
  - **actions** — The agent can create or modify actions to add new capabilities
86
104
  - **delegate-to-agent** — Self-modification requests come through the agent chat
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: upgrade-agent-native
3
+ description: >-
4
+ Bring an older Agent Native app or workspace current. Use when updating
5
+ @agent-native/core, fixing a broken upgrade, or when tempted to patch or
6
+ override core/dispatch packages to make an old branch run.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Upgrade Agent Native
13
+
14
+ ## Rule
15
+
16
+ When an older Agent Native app/branch needs to run on current packages, use
17
+ `agent-native upgrade`. Never "fix" upgrade breakage with
18
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patches, or
19
+ edits under `node_modules/@agent-native/*` — especially not against
20
+ `@agent-native/core` or `@agent-native/dispatch`.
21
+
22
+ ## Why
23
+
24
+ Agents often respond to a failed core bump by inventing framework patches and
25
+ dispatch behavior overrides. That hides the real app-level break, drifts from
26
+ upstream, and makes the next upgrade worse. The supported path is bump →
27
+ install → refresh scaffold skills → verify, then fix **app** code only.
28
+
29
+ ## How
30
+
31
+ 1. **Doctor first (optional but recommended)**
32
+
33
+ ```bash
34
+ npx @agent-native/core@latest upgrade check
35
+ ```
36
+
37
+ This reports framework overrides/patches and pending `@agent-native/*`
38
+ bumps. If overrides/patches are present, remove them before continuing.
39
+
40
+ 2. **Run the upgrade**
41
+
42
+ ```bash
43
+ npx @agent-native/core@latest upgrade
44
+ ```
45
+
46
+ Or from an already-installed CLI: `pnpm exec agent-native upgrade` /
47
+ `agent-native upgrade`.
48
+
49
+ What it does:
50
+
51
+ - Blocks (unless `--force`) when `@agent-native/*` overrides/patches exist
52
+ - Rewrites non-local `@agent-native/*` dependency pins to `latest`
53
+ - Runs the package manager install
54
+ - Runs `skills update scaffold --project`
55
+ - Runs `typecheck` when the project has that script
56
+
57
+ 3. **If upgrade or typecheck fails**
58
+
59
+ - Read the concrete error
60
+ - Fix **app** source, actions, config, or env — not framework packages
61
+ - Re-run `agent-native upgrade` or `pnpm typecheck`
62
+ - Stop and ask the user if you cannot fix the app-level error
63
+
64
+ 4. **Dry-run / partial runs**
65
+
66
+ ```bash
67
+ agent-native upgrade --dry-run
68
+ agent-native upgrade --skip-verify
69
+ agent-native upgrade --skip-install # package.json bumps only
70
+ ```
71
+
72
+ ## Don't
73
+
74
+ - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
75
+ `patchedDependencies` for any `@agent-native/*` package
76
+ - Don't edit `node_modules/@agent-native/core` or
77
+ `node_modules/@agent-native/dispatch`
78
+ - Don't invent local "dispatch behavior" shims to paper over version skew
79
+ - Don't keep iterating with more framework patches after a failed install
80
+ - Don't skip `skills update scaffold --project` after a core bump (the
81
+ upgrade command does this for you)
82
+
83
+ ## Related Skills
84
+
85
+ - **self-modifying-code** — Tier 4: framework packages are off limits
86
+ - **agent-native-docs** — version-matched docs after the bump
87
+ - **portability** — keep app code provider-agnostic across upgrades
@@ -38,9 +38,15 @@ Read these local package docs before implementing advanced Agent Native
38
38
  features. Prefer this app's own `AGENTS.md` and `.agents/skills/` for
39
39
  app-specific rules, then use the corpus for reusable framework/template
40
40
  patterns.
41
- After updating `@agent-native/core`, run `pnpm skills:update` or
42
- `npx @agent-native/core@latest skills update scaffold --project` from the app
43
- root to refresh framework-provided `.agents/skills` and repair `CLAUDE.md` /
41
+ To bring an older app current, run `pnpm upgrade:agent-native` or
42
+ `npx @agent-native/core@latest upgrade` from the app root. That bumps
43
+ `@agent-native/*` deps, installs, refreshes scaffold skills, and typechecks.
44
+ Do **not** add `pnpm.overrides` / patches against `@agent-native/*` or edit
45
+ `node_modules/@agent-native/*` when an upgrade fails — fix app code or ask.
46
+ See the `upgrade-agent-native` and `self-modifying-code` skills.
47
+ After a manual core bump only, `pnpm skills:update` (or
48
+ `npx @agent-native/core@latest skills update scaffold --project`) still
49
+ refreshes framework-provided `.agents/skills` and repairs `CLAUDE.md` /
44
50
  `.claude/skills` compatibility links.
45
51
 
46
52
  ### Database Code
@@ -150,6 +156,7 @@ Skills in `.agents/skills/` provide detailed guidance for each architectural rul
150
156
  | `delegate-to-agent` | Before adding LLM calls or AI delegation |
151
157
  | `actions` | Before creating or modifying actions |
152
158
  | `self-modifying-code` | Before editing source, components, or styles |
159
+ | `upgrade-agent-native` | Before updating an older app/branch or when tempted to patch `@agent-native/*` |
153
160
  | `capture-learnings` | Before recording user preferences or corrections |
154
161
  | `frontend-design` | Before building or restyling any UI component, page, or layout |
155
162
  | `shadcn-ui` | Before adding, updating, or debugging shadcn/ui components |
@@ -9,7 +9,8 @@
9
9
  "typecheck": "agent-native typecheck",
10
10
  "action": "agent-native action",
11
11
  "script": "agent-native script",
12
- "skills:update": "agent-native skills update scaffold --project"
12
+ "skills:update": "agent-native skills update scaffold --project",
13
+ "upgrade:agent-native": "agent-native upgrade"
13
14
  },
14
15
  "dependencies": {
15
16
  "@agent-native/core": "latest",
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: upgrade-agent-native
3
+ description: >-
4
+ Bring an older Agent Native app or workspace current. Use when updating
5
+ @agent-native/core, fixing a broken upgrade, or when tempted to patch or
6
+ override core/dispatch packages to make an old branch run.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Upgrade Agent Native
13
+
14
+ ## Rule
15
+
16
+ When an older Agent Native app/branch needs to run on current packages, use
17
+ `agent-native upgrade`. Never "fix" upgrade breakage with
18
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patches, or
19
+ edits under `node_modules/@agent-native/*` — especially not against
20
+ `@agent-native/core` or `@agent-native/dispatch`.
21
+
22
+ ## Why
23
+
24
+ Agents often respond to a failed core bump by inventing framework patches and
25
+ dispatch behavior overrides. That hides the real app-level break, drifts from
26
+ upstream, and makes the next upgrade worse. The supported path is bump →
27
+ install → refresh scaffold skills → verify, then fix **app** code only.
28
+
29
+ ## How
30
+
31
+ 1. **Doctor first (optional but recommended)**
32
+
33
+ ```bash
34
+ npx @agent-native/core@latest upgrade check
35
+ ```
36
+
37
+ This reports framework overrides/patches and pending `@agent-native/*`
38
+ bumps. If overrides/patches are present, remove them before continuing.
39
+
40
+ 2. **Run the upgrade**
41
+
42
+ ```bash
43
+ npx @agent-native/core@latest upgrade
44
+ ```
45
+
46
+ Or from an already-installed CLI: `pnpm exec agent-native upgrade` /
47
+ `agent-native upgrade`.
48
+
49
+ What it does:
50
+
51
+ - Blocks (unless `--force`) when `@agent-native/*` overrides/patches exist
52
+ - Rewrites non-local `@agent-native/*` dependency pins to `latest`
53
+ - Runs the package manager install
54
+ - Runs `skills update scaffold --project`
55
+ - Runs `typecheck` when the project has that script
56
+
57
+ 3. **If upgrade or typecheck fails**
58
+
59
+ - Read the concrete error
60
+ - Fix **app** source, actions, config, or env — not framework packages
61
+ - Re-run `agent-native upgrade` or `pnpm typecheck`
62
+ - Stop and ask the user if you cannot fix the app-level error
63
+
64
+ 4. **Dry-run / partial runs**
65
+
66
+ ```bash
67
+ agent-native upgrade --dry-run
68
+ agent-native upgrade --skip-verify
69
+ agent-native upgrade --skip-install # package.json bumps only
70
+ ```
71
+
72
+ ## Don't
73
+
74
+ - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
75
+ `patchedDependencies` for any `@agent-native/*` package
76
+ - Don't edit `node_modules/@agent-native/core` or
77
+ `node_modules/@agent-native/dispatch`
78
+ - Don't invent local "dispatch behavior" shims to paper over version skew
79
+ - Don't keep iterating with more framework patches after a failed install
80
+ - Don't skip `skills update scaffold --project` after a core bump (the
81
+ upgrade command does this for you)
82
+
83
+ ## Related Skills
84
+
85
+ - **self-modifying-code** — Tier 4: framework packages are off limits
86
+ - **agent-native-docs** — version-matched docs after the bump
87
+ - **portability** — keep app code provider-agnostic across upgrades
@@ -38,9 +38,15 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
38
38
  Read these local package docs before implementing advanced Agent Native
39
39
  features. Prefer this app's own `AGENTS.md` for app-specific rules, then use
40
40
  the corpus for reusable framework/template patterns.
41
- After updating `@agent-native/core`, run `pnpm skills:update` or
42
- `npx @agent-native/core@latest skills update scaffold --project` from the app
43
- root to refresh framework-provided `.agents/skills` and repair `CLAUDE.md` /
41
+ To bring an older app current, run `pnpm upgrade:agent-native` or
42
+ `npx @agent-native/core@latest upgrade` from the app root. That bumps
43
+ `@agent-native/*` deps, installs, refreshes scaffold skills, and typechecks.
44
+ Do **not** add `pnpm.overrides` / patches against `@agent-native/*` or edit
45
+ `node_modules/@agent-native/*` when an upgrade fails — fix app code or ask.
46
+ See the `upgrade-agent-native` and `self-modifying-code` skills.
47
+ After a manual core bump only, `pnpm skills:update` (or
48
+ `npx @agent-native/core@latest skills update scaffold --project`) still
49
+ refreshes framework-provided `.agents/skills` and repairs `CLAUDE.md` /
44
50
  `.claude/skills` compatibility links.
45
51
 
46
52
  ## Actions
@@ -7,6 +7,7 @@
7
7
  "agent": "agent-native agent",
8
8
  "script": "agent-native script",
9
9
  "skills:update": "agent-native skills update scaffold --project",
10
+ "upgrade:agent-native": "agent-native upgrade",
10
11
  "typecheck": "tsc --noEmit"
11
12
  },
12
13
  "dependencies": {
@@ -28,7 +28,19 @@ Not all modifications are equal. Use this to decide what level of care is needed
28
28
  | 1: Data | Files in `data/` | JSON state, generated content, markdown | Nothing — these are routine |
29
29
  | 2: Source | App code | Components, routes, styles, scripts | Run `pnpm typecheck && pnpm lint` |
30
30
  | 3: Config | Project config | `package.json`, `tsconfig.json`, `vite.config.*` | Ask for explicit approval first |
31
- | 4: Off limits | Secrets and framework | `.env`, `@agent-native/core` internals | Never modify these |
31
+ | 4: Off limits | Secrets and framework | `.env`, `@agent-native/*` packages & overrides | Never modify these |
32
+
33
+ Tier 4 includes **all** of the following — not only editing package source:
34
+
35
+ - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
36
+ - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
37
+ target any `@agent-native/*` package
38
+ - Local patches, vendored copies, or invented "dispatch/core behavior"
39
+ shims meant to paper over a version skew or failed upgrade
40
+
41
+ When an older branch needs current packages, use **`agent-native upgrade`**
42
+ (see the `upgrade-agent-native` skill). If upgrade or typecheck fails, fix
43
+ **app** code or stop and ask — do not patch the framework.
32
44
 
33
45
  ## Git Checkpoint Pattern
34
46
 
@@ -74,13 +86,19 @@ inline strings in components.
74
86
  ## Don't
75
87
 
76
88
  - Don't modify `.env` files or files containing secrets
77
- - Don't modify `@agent-native/core` package internals
89
+ - Don't modify `@agent-native/core`, `@agent-native/dispatch`, or other
90
+ `@agent-native/*` package internals (including under `node_modules`)
91
+ - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
92
+ `@agent-native/*` to "make the app run" after a version bump
93
+ - Don't invent local dispatch/core behavior overrides when upgrade fails —
94
+ run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
78
95
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
79
96
  - Don't skip the typecheck/lint step after editing source code
80
97
  - Don't make source changes without a git checkpoint to roll back to
81
98
 
82
99
  ## Related Skills
83
100
 
101
+ - **upgrade-agent-native** — supported path to bring an older app/workspace current
84
102
  - **storing-data** — Tier 1 modifications (data files) are the safest and most common
85
103
  - **actions** — The agent can create or modify actions to add new capabilities
86
104
  - **delegate-to-agent** — Self-modification requests come through the agent chat
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: upgrade-agent-native
3
+ description: >-
4
+ Bring an older Agent Native app or workspace current. Use when updating
5
+ @agent-native/core, fixing a broken upgrade, or when tempted to patch or
6
+ override core/dispatch packages to make an old branch run.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Upgrade Agent Native
13
+
14
+ ## Rule
15
+
16
+ When an older Agent Native app/branch needs to run on current packages, use
17
+ `agent-native upgrade`. Never "fix" upgrade breakage with
18
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patches, or
19
+ edits under `node_modules/@agent-native/*` — especially not against
20
+ `@agent-native/core` or `@agent-native/dispatch`.
21
+
22
+ ## Why
23
+
24
+ Agents often respond to a failed core bump by inventing framework patches and
25
+ dispatch behavior overrides. That hides the real app-level break, drifts from
26
+ upstream, and makes the next upgrade worse. The supported path is bump →
27
+ install → refresh scaffold skills → verify, then fix **app** code only.
28
+
29
+ ## How
30
+
31
+ 1. **Doctor first (optional but recommended)**
32
+
33
+ ```bash
34
+ npx @agent-native/core@latest upgrade check
35
+ ```
36
+
37
+ This reports framework overrides/patches and pending `@agent-native/*`
38
+ bumps. If overrides/patches are present, remove them before continuing.
39
+
40
+ 2. **Run the upgrade**
41
+
42
+ ```bash
43
+ npx @agent-native/core@latest upgrade
44
+ ```
45
+
46
+ Or from an already-installed CLI: `pnpm exec agent-native upgrade` /
47
+ `agent-native upgrade`.
48
+
49
+ What it does:
50
+
51
+ - Blocks (unless `--force`) when `@agent-native/*` overrides/patches exist
52
+ - Rewrites non-local `@agent-native/*` dependency pins to `latest`
53
+ - Runs the package manager install
54
+ - Runs `skills update scaffold --project`
55
+ - Runs `typecheck` when the project has that script
56
+
57
+ 3. **If upgrade or typecheck fails**
58
+
59
+ - Read the concrete error
60
+ - Fix **app** source, actions, config, or env — not framework packages
61
+ - Re-run `agent-native upgrade` or `pnpm typecheck`
62
+ - Stop and ask the user if you cannot fix the app-level error
63
+
64
+ 4. **Dry-run / partial runs**
65
+
66
+ ```bash
67
+ agent-native upgrade --dry-run
68
+ agent-native upgrade --skip-verify
69
+ agent-native upgrade --skip-install # package.json bumps only
70
+ ```
71
+
72
+ ## Don't
73
+
74
+ - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
75
+ `patchedDependencies` for any `@agent-native/*` package
76
+ - Don't edit `node_modules/@agent-native/core` or
77
+ `node_modules/@agent-native/dispatch`
78
+ - Don't invent local "dispatch behavior" shims to paper over version skew
79
+ - Don't keep iterating with more framework patches after a failed install
80
+ - Don't skip `skills update scaffold --project` after a core bump (the
81
+ upgrade command does this for you)
82
+
83
+ ## Related Skills
84
+
85
+ - **self-modifying-code** — Tier 4: framework packages are off limits
86
+ - **agent-native-docs** — version-matched docs after the bump
87
+ - **portability** — keep app code provider-agnostic across upgrades
@@ -27,10 +27,16 @@ first-party template patterns ships in `node_modules/@agent-native/core/corpus`.
27
27
  Use package docs for framework APIs, the package corpus for reusable
28
28
  framework/template patterns, and `packages/shared/AGENTS.md` plus
29
29
  `packages/shared/.agents/skills/` for workspace-specific conventions.
30
- After updating `@agent-native/core`, run `pnpm skills:update` or
31
- `npx @agent-native/core@latest skills update scaffold --project` from the
32
- workspace root to refresh framework-provided shared skills and repair
33
- `CLAUDE.md` / `.claude/skills` compatibility links.
30
+ To bring an older workspace current, run `pnpm upgrade:agent-native` or
31
+ `npx @agent-native/core@latest upgrade` from the workspace root. That bumps
32
+ `@agent-native/*` deps, installs, refreshes scaffold skills, and typechecks.
33
+ Do **not** add `pnpm.overrides` / patches against `@agent-native/*` or edit
34
+ `node_modules/@agent-native/*` when an upgrade fails — fix app code or ask.
35
+ See the `upgrade-agent-native` and `self-modifying-code` skills.
36
+ After a manual core bump only, `pnpm skills:update` (or
37
+ `npx @agent-native/core@latest skills update scaffold --project`) still
38
+ refreshes framework-provided shared skills and repairs `CLAUDE.md` /
39
+ `.claude/skills` compatibility links.
34
40
 
35
41
  ## Core Agent Rule
36
42
 
@@ -8,6 +8,7 @@
8
8
  "typecheck": "pnpm -r typecheck",
9
9
  "repair:workspace-org": "tsx scripts/repair-workspace-org.ts",
10
10
  "skills:update": "agent-native skills update scaffold --project",
11
+ "upgrade:agent-native": "agent-native upgrade",
11
12
  "fmt:check": "oxfmt --check .",
12
13
  "lint": "pnpm fmt:check"
13
14
  },
@@ -1,6 +0,0 @@
1
- ---
2
- type: improved
3
- date: 2026-07-08
4
- ---
5
-
6
- Session replay clamps ultra-wide viewports while keeping the recorded page height instead of forcing a default size