@agent-native/core 0.146.2 → 0.146.4

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 (213) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +13 -10
  3. package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +7 -3
  4. package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  5. package/corpus/templates/analytics/actions/compose-dashboard.ts +53 -6
  6. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +8 -2
  7. package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +3 -1
  8. package/corpus/templates/analytics/actions/mutate-dashboard.ts +48 -9
  9. package/corpus/templates/analytics/actions/update-dashboard.ts +80 -6
  10. package/corpus/templates/analytics/changelog/2026-08-07-dashboard-creation-and-edits-now-save-faster-with-reliable-s.md +6 -0
  11. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +19 -19
  12. package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +21 -2
  13. package/corpus/templates/analytics/server/lib/bigquery.ts +59 -24
  14. package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +44 -8
  15. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +3 -5
  16. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +33 -69
  17. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +90 -24
  18. package/corpus/templates/analytics/server/lib/real-data-actions.ts +1 -1
  19. package/corpus/templates/analytics/server/plugins/agent-chat.ts +17 -2
  20. package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +2 -0
  21. package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +7 -3
  22. package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  23. package/corpus/templates/assets/netlify.toml +1 -1
  24. package/corpus/templates/assets/package.json +1 -0
  25. package/corpus/templates/assets/scripts/migrate-production.ts +24 -0
  26. package/corpus/templates/assets/server/plugins/db.ts +1 -1
  27. package/corpus/templates/assets/tsconfig.json +1 -0
  28. package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +7 -3
  29. package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  30. package/corpus/templates/brain/netlify.toml +1 -1
  31. package/corpus/templates/brain/package.json +2 -0
  32. package/corpus/templates/brain/scripts/migrate-production.ts +24 -0
  33. package/corpus/templates/brain/server/plugins/db.ts +1 -1
  34. package/corpus/templates/brain/tsconfig.json +1 -0
  35. package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +7 -3
  36. package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  37. package/corpus/templates/calendar/netlify.toml +1 -1
  38. package/corpus/templates/calendar/package.json +1 -0
  39. package/corpus/templates/calendar/scripts/migrate-production.ts +24 -0
  40. package/corpus/templates/calendar/server/plugins/db.ts +1 -1
  41. package/corpus/templates/calendar/tsconfig.json +1 -0
  42. package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
  43. package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  44. package/corpus/templates/chat/netlify.toml +1 -1
  45. package/corpus/templates/chat/package.json +1 -0
  46. package/corpus/templates/chat/scripts/migrate-production.ts +31 -0
  47. package/corpus/templates/chat/tsconfig.json +1 -0
  48. package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +7 -3
  49. package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  50. package/corpus/templates/clips/netlify.toml +1 -1
  51. package/corpus/templates/clips/package.json +1 -0
  52. package/corpus/templates/clips/scripts/migrate-production.ts +24 -0
  53. package/corpus/templates/clips/server/plugins/db.ts +1 -1
  54. package/corpus/templates/clips/tsconfig.json +1 -0
  55. package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +7 -3
  56. package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  57. package/corpus/templates/content/netlify.toml +1 -1
  58. package/corpus/templates/content/package.json +2 -0
  59. package/corpus/templates/content/scripts/migrate-production.ts +28 -0
  60. package/corpus/templates/content/server/plugins/db.ts +2 -2
  61. package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  62. package/corpus/templates/crm/netlify.toml +1 -1
  63. package/corpus/templates/crm/package.json +2 -0
  64. package/corpus/templates/crm/scripts/migrate-production.ts +24 -0
  65. package/corpus/templates/crm/server/plugins/db.ts +1 -1
  66. package/corpus/templates/crm/tsconfig.json +1 -0
  67. package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +7 -3
  68. package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  69. package/corpus/templates/design/netlify.toml +1 -1
  70. package/corpus/templates/design/package.json +1 -0
  71. package/corpus/templates/design/scripts/migrate-production.ts +24 -0
  72. package/corpus/templates/design/server/plugins/db.ts +1 -1
  73. package/corpus/templates/design/tsconfig.json +1 -0
  74. package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +7 -3
  75. package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  76. package/corpus/templates/dispatch/netlify.toml +1 -1
  77. package/corpus/templates/dispatch/package.json +1 -0
  78. package/corpus/templates/dispatch/scripts/migrate-production.ts +23 -0
  79. package/corpus/templates/dispatch/tsconfig.json +1 -0
  80. package/corpus/templates/factory/.agents/skills/self-modifying-code/SKILL.md +7 -3
  81. package/corpus/templates/factory/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  82. package/corpus/templates/factory/netlify.toml +1 -1
  83. package/corpus/templates/factory/package.json +1 -0
  84. package/corpus/templates/factory/scripts/migrate-production.ts +31 -0
  85. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +2 -0
  86. package/corpus/templates/factory/tsconfig.json +1 -0
  87. package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +7 -3
  88. package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  89. package/corpus/templates/forms/netlify.toml +1 -1
  90. package/corpus/templates/forms/package.json +2 -0
  91. package/corpus/templates/forms/scripts/migrate-production.ts +24 -0
  92. package/corpus/templates/forms/server/plugins/db.ts +1 -1
  93. package/corpus/templates/forms/tsconfig.json +1 -0
  94. package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  95. package/corpus/templates/macros/netlify.toml +1 -1
  96. package/corpus/templates/macros/package.json +1 -0
  97. package/corpus/templates/macros/scripts/migrate-production.ts +24 -0
  98. package/corpus/templates/macros/server/plugins/db.ts +1 -1
  99. package/corpus/templates/macros/tsconfig.json +1 -0
  100. package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +7 -3
  101. package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  102. package/corpus/templates/mail/netlify.toml +1 -1
  103. package/corpus/templates/mail/package.json +1 -0
  104. package/corpus/templates/mail/scripts/migrate-production.ts +24 -0
  105. package/corpus/templates/mail/server/plugins/db.ts +1 -1
  106. package/corpus/templates/mail/tsconfig.json +1 -0
  107. package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +7 -3
  108. package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  109. package/corpus/templates/plan/netlify.toml +1 -1
  110. package/corpus/templates/plan/package.json +1 -0
  111. package/corpus/templates/plan/scripts/migrate-production.ts +24 -0
  112. package/corpus/templates/plan/server/plugins/00-mcp.ts +3 -2
  113. package/corpus/templates/plan/server/plugins/db.ts +1 -1
  114. package/corpus/templates/plan/tsconfig.json +1 -0
  115. package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +7 -3
  116. package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  117. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +56 -23
  118. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -0
  119. package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +4 -1
  120. package/corpus/templates/slides/app/context/DeckContext.tsx +91 -25
  121. package/corpus/templates/slides/app/hooks/use-deck-role.ts +14 -4
  122. package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
  123. package/corpus/templates/slides/app/pages/DeckEditor.tsx +19 -7
  124. package/corpus/templates/slides/app/pages/Index.tsx +11 -2
  125. package/corpus/templates/slides/app/root.tsx +5 -1
  126. package/corpus/templates/slides/netlify.toml +1 -1
  127. package/corpus/templates/slides/package.json +1 -0
  128. package/corpus/templates/slides/scripts/migrate-production.ts +24 -0
  129. package/corpus/templates/slides/server/plugins/db.ts +1 -1
  130. package/corpus/templates/slides/tsconfig.json +1 -0
  131. package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +7 -3
  132. package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  133. package/corpus/templates/tasks/netlify.toml +1 -1
  134. package/corpus/templates/tasks/package.json +1 -0
  135. package/corpus/templates/tasks/scripts/migrate-production.ts +24 -0
  136. package/corpus/templates/tasks/server/plugins/db.ts +1 -1
  137. package/corpus/templates/tasks/tsconfig.json +1 -0
  138. package/dist/action.d.ts +2 -0
  139. package/dist/agent/production-agent.d.ts +1 -0
  140. package/dist/agent/production-agent.js +2 -0
  141. package/dist/agent/thread-data-builder.d.ts +4 -0
  142. package/dist/agent/thread-data-builder.js +44 -0
  143. package/dist/automations/service.d.ts +1 -0
  144. package/dist/automations/service.js +21 -2
  145. package/dist/cli/create.js +20 -2
  146. package/dist/client/agent-page/AgentJobsTab.js +3 -1
  147. package/dist/client/agent-page/AutomationDetailsDialog.js +9 -2
  148. package/dist/collab/awareness.d.ts +2 -2
  149. package/dist/collab/struct-routes.d.ts +1 -1
  150. package/dist/db/migrations.js +7 -13
  151. package/dist/jobs/actions/list-automation-runs.d.ts +1 -0
  152. package/dist/jobs/actions/list-automation-runs.js +9 -2
  153. package/dist/jobs/actions/list-recurring-jobs.js +3 -1
  154. package/dist/jobs/actions/manage-recurring-job.js +1 -1
  155. package/dist/jobs/actions/run-automation-now.js +1 -0
  156. package/dist/jobs/background-automation-runner.js +2 -0
  157. package/dist/jobs/frontmatter.d.ts +2 -0
  158. package/dist/jobs/frontmatter.js +4 -0
  159. package/dist/jobs/run-history.d.ts +4 -0
  160. package/dist/jobs/run-history.js +28 -8
  161. package/dist/jobs/run-now.d.ts +4 -1
  162. package/dist/jobs/run-now.js +4 -3
  163. package/dist/jobs/scheduler.js +18 -0
  164. package/dist/jobs/tools.d.ts +3 -2
  165. package/dist/jobs/tools.js +26 -12
  166. package/dist/localization/default-messages.d.ts +1 -0
  167. package/dist/localization/default-messages.js +1 -0
  168. package/dist/observability/routes.d.ts +3 -3
  169. package/dist/secrets/routes.d.ts +6 -6
  170. package/dist/server/action-routes.d.ts +2 -0
  171. package/dist/server/action-routes.js +1 -0
  172. package/dist/server/agent-chat-plugin.js +3 -2
  173. package/dist/server/builder-browser.js +24 -8
  174. package/dist/server/transcribe-voice.d.ts +1 -1
  175. package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
  176. package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  177. package/dist/templates/chat/netlify.toml +1 -1
  178. package/dist/templates/chat/package.json +1 -0
  179. package/dist/templates/chat/scripts/migrate-production.ts +31 -0
  180. package/dist/templates/chat/tsconfig.json +1 -0
  181. package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +7 -3
  182. package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  183. package/dist/templates/default/package.json +1 -0
  184. package/dist/templates/default/scripts/migrate-production.ts +31 -0
  185. package/dist/templates/default/tsconfig.json +1 -0
  186. package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  187. package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +7 -3
  188. package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  189. package/dist/templates/workspace-root/AGENTS.md +2 -1
  190. package/dist/triggers/actions/list-automations.js +1 -1
  191. package/dist/triggers/actions/manage-automation.js +5 -1
  192. package/dist/triggers/actions.d.ts +1 -1
  193. package/dist/triggers/actions.js +21 -15
  194. package/dist/triggers/dispatcher.js +17 -2
  195. package/dist/triggers/routes.d.ts +1 -0
  196. package/dist/triggers/routes.js +1 -0
  197. package/docs/content/docs-components.mdx +122 -11
  198. package/package.json +1 -1
  199. package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
  200. package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  201. package/src/templates/chat/netlify.toml +1 -1
  202. package/src/templates/chat/package.json +1 -0
  203. package/src/templates/chat/scripts/migrate-production.ts +31 -0
  204. package/src/templates/chat/tsconfig.json +1 -0
  205. package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +7 -3
  206. package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  207. package/src/templates/default/package.json +1 -0
  208. package/src/templates/default/scripts/migrate-production.ts +31 -0
  209. package/src/templates/default/tsconfig.json +1 -0
  210. package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  211. package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +7 -3
  212. package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
  213. package/src/templates/workspace-root/AGENTS.md +2 -1
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs assets"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter assets build"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter assets build && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter assets migrate:production; fi"
4
4
  publish = "templates/assets/dist"
5
5
  functions = "templates/assets/.netlify/functions-internal"
6
6
 
@@ -9,6 +9,7 @@
9
9
  "start": "agent-native start",
10
10
  "test": "vitest --run",
11
11
  "typecheck": "agent-native typecheck",
12
+ "migrate:production": "tsx scripts/migrate-production.ts",
12
13
  "action": "agent-native action",
13
14
  "script": "agent-native script"
14
15
  },
@@ -0,0 +1,24 @@
1
+ import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
2
+ import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
3
+
4
+ import { runAssetsMigrations } from "../server/plugins/db.js";
5
+
6
+ /**
7
+ * Release-time schema entrypoint for Assets.
8
+ *
9
+ * This script is the production owner of schema changes. It runs against the
10
+ * direct migration endpoint selected by core, while request functions skip
11
+ * all migration and ensure-table work automatically.
12
+ */
13
+ async function main(): Promise<void> {
14
+ await withMigrationRuntime(async () => {
15
+ await runFrameworkReleaseMigrations(null);
16
+ await runAssetsMigrations(null);
17
+ });
18
+ }
19
+
20
+ try {
21
+ await main();
22
+ } finally {
23
+ await closeDbExec();
24
+ }
@@ -29,7 +29,7 @@ const schemaTables = Object.values(schema).filter(isDrizzleTable);
29
29
  // alone are not a safe identity across parallel branches that each extend
30
30
  // this list independently — see the analytics template's v75-v83 incident
31
31
  // for the exact failure mode this guards against.
32
- const runAssetsMigrations = runMigrations(
32
+ export const runAssetsMigrations = runMigrations(
33
33
  [
34
34
  {
35
35
  version: 1,
@@ -13,6 +13,7 @@
13
13
  "app/**/*",
14
14
  "server/**/*",
15
15
  "shared/**/*",
16
+ "scripts/**/*",
16
17
  "vite.config.ts",
17
18
  "react-router.config.ts",
18
19
  ".react-router/types/**/*",
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs brain"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter brain build && pnpm exec tsx templates/brain/jobs/emit-netlify-brain-queue-cron.ts"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter brain build && pnpm exec tsx templates/brain/jobs/emit-netlify-brain-queue-cron.ts && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter brain migrate:production; fi"
4
4
  publish = "templates/brain/dist"
5
5
  functions = "templates/brain/.netlify/functions-internal"
6
6
 
@@ -10,6 +10,7 @@
10
10
  "test": "vitest --run --config vitest.config.ts",
11
11
  "format.fix": "oxfmt --write .",
12
12
  "typecheck": "agent-native typecheck",
13
+ "migrate:production": "tsx scripts/migrate-production.ts",
13
14
  "action": "agent-native action",
14
15
  "demo:seed": "agent-native action seed-demo-data",
15
16
  "demo:eval": "agent-native action run-demo-eval",
@@ -58,6 +59,7 @@
58
59
  "sonner": "^2.0.7",
59
60
  "tailwind-merge": "^3.6.0",
60
61
  "tailwindcss": "catalog:",
62
+ "tsx": "^4.20.3",
61
63
  "typescript-7": "catalog:",
62
64
  "vite": "catalog:",
63
65
  "vitest": "catalog:"
@@ -0,0 +1,24 @@
1
+ import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
2
+ import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
3
+
4
+ import { runBrainMigrations } from "../server/plugins/db.js";
5
+
6
+ /**
7
+ * Release-time schema entrypoint for Brain.
8
+ *
9
+ * This script is the production owner of schema changes. It runs against the
10
+ * direct migration endpoint selected by core, while request functions skip
11
+ * all migration and ensure-table work automatically.
12
+ */
13
+ async function main(): Promise<void> {
14
+ await withMigrationRuntime(async () => {
15
+ await runFrameworkReleaseMigrations(null);
16
+ await runBrainMigrations(null);
17
+ });
18
+ }
19
+
20
+ try {
21
+ await main();
22
+ } finally {
23
+ await closeDbExec();
24
+ }
@@ -28,7 +28,7 @@ const schemaTables = Object.values(schema).filter(isDrizzleTable);
28
28
  // packages/core/src/db/migrations.ts for the full rationale). Version numbers
29
29
  // alone are not a safe identity across parallel branches that each extend
30
30
  // this list independently — see the v20 incident documented on v20 below.
31
- const runBrainMigrations = runMigrations(
31
+ export const runBrainMigrations = runMigrations(
32
32
  [
33
33
  {
34
34
  version: 1,
@@ -15,6 +15,7 @@
15
15
  "server/**/*",
16
16
  "shared/**/*",
17
17
  "jobs/**/*",
18
+ "scripts/**/*",
18
19
  "vite.config.ts",
19
20
  "react-router.config.ts",
20
21
  ".react-router/types/**/*",
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs calendar"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && DATABASE_URL=${NETLIFY_DATABASE_URL_UNPOOLED:-$DATABASE_URL} NITRO_PRESET=netlify pnpm --filter calendar build"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && DATABASE_URL=${NETLIFY_DATABASE_URL_UNPOOLED:-$DATABASE_URL} NITRO_PRESET=netlify pnpm --filter calendar build && if [ \"${CONTEXT:-}\" = \"production\" ]; then DATABASE_URL=${NETLIFY_DATABASE_URL_UNPOOLED:-$DATABASE_URL} pnpm --filter calendar migrate:production; fi"
4
4
  publish = "templates/calendar/dist"
5
5
  functions = "templates/calendar/.netlify/functions-internal"
6
6
 
@@ -10,6 +10,7 @@
10
10
  "test": "vitest --run",
11
11
  "format.fix": "oxfmt --write .",
12
12
  "typecheck": "agent-native typecheck",
13
+ "migrate:production": "tsx scripts/migrate-production.ts",
13
14
  "action": "agent-native action",
14
15
  "script": "agent-native script",
15
16
  "db:push": "drizzle-kit push",
@@ -0,0 +1,24 @@
1
+ import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
2
+ import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
3
+
4
+ import { runCalendarMigrations } from "../server/plugins/db.js";
5
+
6
+ /**
7
+ * Release-time schema entrypoint for Calendar.
8
+ *
9
+ * This script is the production owner of schema changes. It runs against the
10
+ * direct migration endpoint selected by core, while request functions skip
11
+ * all migration and ensure-table work automatically.
12
+ */
13
+ async function main(): Promise<void> {
14
+ await withMigrationRuntime(async () => {
15
+ await runFrameworkReleaseMigrations(null);
16
+ await runCalendarMigrations(null);
17
+ });
18
+ }
19
+
20
+ try {
21
+ await main();
22
+ } finally {
23
+ await closeDbExec();
24
+ }
@@ -32,7 +32,7 @@ const schemaTables = Object.values(schema).filter(isDrizzleTable);
32
32
  // alone are not a safe identity across parallel branches that each extend
33
33
  // this list independently — see the analytics template's v75-v83 incident
34
34
  // (packages/core/src/db/migrations.ts and templates/analytics/server/plugins/db.ts).
35
- const runCalendarMigrations = runMigrations(
35
+ export const runCalendarMigrations = runMigrations(
36
36
  [
37
37
  {
38
38
  version: 1,
@@ -13,6 +13,7 @@
13
13
  "app/**/*",
14
14
  "server/**/*",
15
15
  "shared/**/*",
16
+ "scripts/**/*",
16
17
  "vite.config.ts",
17
18
  "react-router.config.ts",
18
19
  ".react-router/types/**/*",
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs chat"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter chat build"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter chat build && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter chat migrate:production; fi"
4
4
  publish = "templates/chat/dist"
5
5
  functions = "templates/chat/.netlify/functions-internal"
6
6
 
@@ -5,6 +5,7 @@
5
5
  "description": "Minimal chat-first agent-native app template.",
6
6
  "type": "module",
7
7
  "scripts": {
8
+ "migrate:production": "tsx scripts/migrate-production.ts",
8
9
  "dev": "agent-native dev --open",
9
10
  "build": "agent-native build",
10
11
  "start": "agent-native start",
@@ -0,0 +1,31 @@
1
+ import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
2
+ import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
3
+
4
+ /**
5
+ * Release-time schema entrypoint.
6
+ *
7
+ * Every deploy runs this once, and request functions never touch schema. That
8
+ * ordering is not an optimization: on serverless, "migrate on first use" means
9
+ * migrate on EVERY cold start, and a production incident traced a multi-hour
10
+ * outage to schema introspection running 4-6 times concurrently on the request
11
+ * path.
12
+ *
13
+ * `withMigrationRuntime()` is load-bearing. The Netlify BUILD environment sets
14
+ * NETLIFY=true, so this script looks like a serverless request to the guard in
15
+ * `runMigrations` — it is allowed to migrate only because it claims duty here.
16
+ * A release entrypoint that forgets the wrapper silently does nothing.
17
+ *
18
+ * If this app owns tables of its own, export its migration runner from
19
+ * `server/plugins/db.ts` and call it inside the same block.
20
+ */
21
+ async function main(): Promise<void> {
22
+ await withMigrationRuntime(async () => {
23
+ await runFrameworkReleaseMigrations(null);
24
+ });
25
+ }
26
+
27
+ try {
28
+ await main();
29
+ } finally {
30
+ await closeDbExec();
31
+ }
@@ -13,6 +13,7 @@
13
13
  "app/**/*",
14
14
  "server/**/*",
15
15
  "shared/**/*",
16
+ "scripts/**/*",
16
17
  "vite.config.ts",
17
18
  "react-router.config.ts",
18
19
  ".react-router/types/**/*",
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs clips"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter clips build && pnpm exec tsx templates/clips/jobs/emit-netlify-brain-export-cron.ts"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter clips build && pnpm exec tsx templates/clips/jobs/emit-netlify-brain-export-cron.ts && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter clips migrate:production; fi"
4
4
  publish = "templates/clips/dist"
5
5
  functions = "templates/clips/.netlify/functions-internal"
6
6
 
@@ -8,6 +8,7 @@
8
8
  "build": "agent-native build",
9
9
  "start": "agent-native start",
10
10
  "typecheck": "agent-native typecheck",
11
+ "migrate:production": "tsx scripts/migrate-production.ts",
11
12
  "action": "agent-native action",
12
13
  "script": "agent-native script",
13
14
  "tauri": "cd desktop && pnpm tauri",
@@ -0,0 +1,24 @@
1
+ import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
2
+ import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
3
+
4
+ import { migrations as runClipsMigrations } from "../server/plugins/db.js";
5
+
6
+ /**
7
+ * Release-time schema entrypoint for Clips.
8
+ *
9
+ * This script is the production owner of schema changes. It runs against the
10
+ * direct migration endpoint selected by core, while request functions skip
11
+ * all migration and ensure-table work automatically.
12
+ */
13
+ async function main(): Promise<void> {
14
+ await withMigrationRuntime(async () => {
15
+ await runFrameworkReleaseMigrations(null);
16
+ await runClipsMigrations(null);
17
+ });
18
+ }
19
+
20
+ try {
21
+ await main();
22
+ } finally {
23
+ await closeDbExec();
24
+ }
@@ -236,7 +236,7 @@ function scheduleRecordingOrgIdBackfill(): void {
236
236
  // packages/core/src/db/migrations.ts for the full rationale). Version numbers
237
237
  // alone are not a safe identity across parallel branches that each extend
238
238
  // this list independently — see the v41 incident documented on v41 below.
239
- const migrations = runMigrations(
239
+ export const migrations = runMigrations(
240
240
  [
241
241
  // ---------------------------------------------------------------------------
242
242
  // Workspaces & members
@@ -13,6 +13,7 @@
13
13
  "app/**/*",
14
14
  "server/**/*",
15
15
  "shared/**/*",
16
+ "scripts/**/*",
16
17
  "vite.config.ts",
17
18
  "react-router.config.ts",
18
19
  ".react-router/types/**/*",
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
36
36
  - Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
37
37
  - `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
38
38
  target any `@agent-native/*` package
39
- - Local package patches or invented "dispatch/core behavior" shims meant to
40
- paper over a version skew or failed upgrade
39
+ - `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
40
+ dependency
41
+ - Invented "dispatch/core behavior" shims meant to paper over a version skew
42
+ or failed upgrade
41
43
 
42
44
  This does not prohibit intentional app-owned UI customization. When public
43
45
  props and composition are insufficient, the `customizing-agent-native` skill
@@ -100,8 +102,10 @@ inline strings in components.
100
102
  - Don't confuse readable package source with app-owned code: use
101
103
  `customizing-agent-native` and `agent-native eject` for supported ownership
102
104
  transfer
105
+ - Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
106
+ add `pnpm.patchedDependencies` to "make the app run" after a version bump
103
107
  - Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
104
- `@agent-native/*` to "make the app run" after a version bump
108
+ `@agent-native/*` to paper over a broken upgrade
105
109
  - Don't invent local dispatch/core behavior overrides when upgrade fails —
106
110
  run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
107
111
  - Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
@@ -15,8 +15,9 @@ metadata:
15
15
 
16
16
  When an older Agent Native app/branch needs to run on current packages, use
17
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
18
+ `pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
19
+ `pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
20
+ or edits under `node_modules/@agent-native/*` — especially not against
20
21
  `@agent-native/core` or `@agent-native/dispatch`.
21
22
 
22
23
  ## Why
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
109
110
 
110
111
  - Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
111
112
  `patchedDependencies` for any `@agent-native/*` package
113
+ - Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
114
+ `patches/`, for any dependency
112
115
  - Don't edit `node_modules/@agent-native/core` or
113
116
  `node_modules/@agent-native/dispatch`
114
117
  - Don't invent local "dispatch behavior" shims to paper over version skew
@@ -1,6 +1,6 @@
1
1
  [build]
2
2
  ignore = "node ./scripts/netlify-ignore-build.mjs content"
3
- command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter content build"
3
+ command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter content build && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter content migrate:production; fi"
4
4
  publish = "templates/content/dist"
5
5
  functions = "templates/content/.netlify/functions-internal"
6
6