@agent-native/core 0.145.7 → 0.146.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 (186) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +5 -1
  3. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +37 -11
  4. package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  5. package/corpus/templates/analytics/actions/get-sql-dashboard.ts +20 -4
  6. package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +59 -24
  7. package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +3 -2
  8. package/corpus/templates/analytics/changelog/2026-08-07-analytics-migrations-now-use-bounded-pressure-aware-backgrou.md +6 -0
  9. package/corpus/templates/analytics/changelog/2026-08-07-settings-skeleton-placeholders.md +6 -0
  10. package/corpus/templates/analytics/changelog/2026-08-07-template-activity-charts-now-show-only-core-agent-native-app.md +6 -0
  11. package/corpus/templates/analytics/netlify.toml +1 -1
  12. package/corpus/templates/analytics/package.json +1 -0
  13. package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +110 -0
  14. package/corpus/templates/analytics/scripts/migrate-production.ts +24 -0
  15. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +13 -13
  16. package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +448 -0
  17. package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +11 -2
  18. package/corpus/templates/analytics/server/lib/analytics-rollup-lock.ts +4 -5
  19. package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +35 -0
  20. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +3 -5
  21. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +10 -4
  22. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -11
  23. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +74 -28
  24. package/corpus/templates/analytics/server/plugins/analytics-rollup-backfill-jobs.ts +2 -5
  25. package/corpus/templates/analytics/server/plugins/db.ts +56 -3
  26. package/corpus/templates/analytics/server/routes/api/analytics-bigquery/backfill.post.ts +55 -0
  27. package/corpus/templates/analytics/server/routes/api/dashboard-agent-context.json.get.ts +22 -4
  28. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +5 -1
  29. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +37 -11
  30. package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  31. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +5 -1
  32. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +37 -11
  33. package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  34. package/corpus/templates/brain/server/lib/connectors.ts +38 -14
  35. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +5 -1
  36. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +37 -11
  37. package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  38. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
  39. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
  40. package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  41. package/corpus/templates/chat/AGENTS.md +3 -0
  42. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +5 -1
  43. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +37 -11
  44. package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  45. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +5 -1
  46. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +37 -11
  47. package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  48. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +37 -11
  49. package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  50. package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +21 -3
  51. package/corpus/templates/crm/app/components/crm/settings/ConnectionSettings.tsx +23 -5
  52. package/corpus/templates/crm/app/components/crm/settings/FieldsSettings.tsx +24 -5
  53. package/corpus/templates/crm/app/components/crm/settings/ListsSettings.tsx +23 -3
  54. package/corpus/templates/crm/changelog/2026-08-07-settings-loading-skeletons.md +6 -0
  55. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +5 -1
  56. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +37 -11
  57. package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  58. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +5 -1
  59. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +37 -11
  60. package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  61. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +5 -1
  62. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +37 -11
  63. package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  64. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +5 -1
  65. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +37 -11
  66. package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  67. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +5 -1
  68. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +37 -11
  69. package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  70. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +5 -1
  71. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +37 -11
  72. package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  73. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +5 -1
  74. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +37 -11
  75. package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  76. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +5 -1
  77. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +37 -11
  78. package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  79. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +13 -0
  80. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +5 -0
  81. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +5 -0
  82. package/corpus/templates/slides/app/components/presentation/PresenterView.tsx +5 -0
  83. package/corpus/templates/slides/app/pages/DeckEditor.tsx +3 -0
  84. package/corpus/templates/slides/app/pages/Presentation.tsx +3 -0
  85. package/corpus/templates/slides/app/pages/SharedPresentation.tsx +5 -0
  86. package/corpus/templates/slides/app/routes/slide.tsx +10 -5
  87. package/corpus/templates/slides/changelog/2026-08-07-slide-previews-and-present-now-keep-deck-colors-consistent.md +6 -0
  88. package/corpus/templates/slides/server/db/schema.ts +1 -0
  89. package/corpus/templates/slides/server/handlers/share.ts +51 -3
  90. package/corpus/templates/slides/server/plugins/db.ts +5 -0
  91. package/corpus/templates/slides/shared/api.ts +2 -0
  92. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +5 -1
  93. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +37 -11
  94. package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  95. package/dist/cli/code-agent-executor.js +8 -3
  96. package/dist/client/ConnectBuilderCard.d.ts +7 -7
  97. package/dist/client/ConnectBuilderCard.js +45 -20
  98. package/dist/client/components/ApiKeySettings.js +2 -5
  99. package/dist/client/org/TeamPage.js +4 -2
  100. package/dist/client/settings/AccountSettingsCard.js +2 -1
  101. package/dist/client/settings/AgentsSection.js +2 -1
  102. package/dist/client/settings/SecretsSection.js +3 -2
  103. package/dist/client/settings/SettingsPanel.js +6 -12
  104. package/dist/client/settings/SettingsSkeleton.d.ts +12 -0
  105. package/dist/client/settings/SettingsSkeleton.js +12 -0
  106. package/dist/client/settings/VoiceTranscriptionSection.js +5 -4
  107. package/dist/client/settings/index.d.ts +1 -0
  108. package/dist/client/settings/index.js +1 -0
  109. package/dist/config.d.ts +9 -2
  110. package/dist/config.js +38 -2
  111. package/dist/db/client.d.ts +26 -8
  112. package/dist/db/client.js +200 -9
  113. package/dist/db/create-get-db.js +2 -2
  114. package/dist/db/ddl-guard.js +3 -1
  115. package/dist/db/ensure-additive-columns.d.ts +2 -0
  116. package/dist/db/ensure-additive-columns.js +5 -2
  117. package/dist/db/index.d.ts +2 -2
  118. package/dist/db/index.js +2 -2
  119. package/dist/db/migrations.d.ts +11 -54
  120. package/dist/db/migrations.js +70 -0
  121. package/dist/deploy/build.js +5 -1
  122. package/dist/jobs/index.d.ts +1 -0
  123. package/dist/jobs/index.js +1 -0
  124. package/dist/jobs/run-history.d.ts +4 -0
  125. package/dist/jobs/run-history.js +44 -0
  126. package/dist/provider-api/actions/provider-api.d.ts +4 -4
  127. package/dist/scripts/docs/search.js +3 -2
  128. package/dist/secrets/routes.d.ts +6 -6
  129. package/dist/server/agent-chat/prompt-resources.js +4 -3
  130. package/dist/server/agent-chat-plugin.js +6 -4
  131. package/dist/server/agents-bundle.d.ts +20 -3
  132. package/dist/server/agents-bundle.js +57 -30
  133. package/dist/server/auth-plugin.js +5 -0
  134. package/dist/server/better-auth-instance.js +2 -63
  135. package/dist/server/better-auth-migrations.d.ts +8 -0
  136. package/dist/server/better-auth-migrations.js +179 -0
  137. package/dist/server/edge.d.ts +2 -0
  138. package/dist/server/edge.js +2 -0
  139. package/dist/server/index.d.ts +2 -0
  140. package/dist/server/index.js +2 -0
  141. package/dist/server/release-migrations.d.ts +8 -0
  142. package/dist/server/release-migrations.js +24 -0
  143. package/dist/server/sweep-runtime.d.ts +1 -1
  144. package/dist/server/sweep-runtime.js +15 -0
  145. package/dist/shared/runtime-config.js +1 -1
  146. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
  147. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
  148. package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  149. package/dist/templates/chat/AGENTS.md +3 -0
  150. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +5 -1
  151. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +37 -11
  152. package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  153. package/dist/templates/default/AGENTS.md +3 -0
  154. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +37 -11
  155. package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  156. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
  157. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +37 -11
  158. package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  159. package/dist/templates/workspace-core/AGENTS.md +3 -0
  160. package/dist/templates/workspace-root/AGENTS.md +3 -0
  161. package/dist/vite/agent-native-config-loader.d.ts +10 -0
  162. package/dist/vite/agent-native-config-loader.js +56 -0
  163. package/dist/vite/agents-bundle-plugin.d.ts +5 -1
  164. package/dist/vite/agents-bundle-plugin.js +29 -6
  165. package/dist/vite/client.d.ts +4 -2
  166. package/dist/vite/client.js +4 -49
  167. package/dist/vite/index.d.ts +2 -2
  168. package/dist/vite/index.js +1 -1
  169. package/docs/content/agent-native-config.mdx +43 -17
  170. package/docs/content/environment-variables.mdx +1 -1
  171. package/package.json +3 -3
  172. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
  173. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
  174. package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  175. package/src/templates/chat/AGENTS.md +3 -0
  176. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +5 -1
  177. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +37 -11
  178. package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  179. package/src/templates/default/AGENTS.md +3 -0
  180. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +37 -11
  181. package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  182. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
  183. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +37 -11
  184. package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
  185. package/src/templates/workspace-core/AGENTS.md +3 -0
  186. package/src/templates/workspace-root/AGENTS.md +3 -0
@@ -51,13 +51,24 @@ also place the skill instructions or this reference in the Project
51
51
  instructions/knowledge files. Then add and authenticate the Dispatch MCP
52
52
  connector from the packaged `adapters/chatgpt-mcp/connector.json`.
53
53
 
54
+ For Claude Web, ChatGPT Web, and their web Projects, the host is an
55
+ orchestrator, not the build environment. After forming the source brief, call
56
+ the Dispatch `start-workspace-app-creation` action so Builder creates the app
57
+ in the connected workspace. Do not use the host's code interpreter, shell,
58
+ artifact editor, `create_workspace_app`, or local `pnpm`/`npm` commands. If the
59
+ handoff action is unavailable, stop and ask the user to authenticate Dispatch;
60
+ do not fall back to a local sandbox build. Claude Code and Codex Code are the
61
+ local-agent exception and may follow the implementation steps in the main
62
+ skill.
63
+
54
64
  In a new Project chat, say:
55
65
 
56
66
  ```text
57
67
  Turn this project into an app. Use the visible Project instructions,
58
68
  knowledge files, and any selected successful runs as the source. Create the
59
- app in the connected Agent-Native workspace, keep the source brief bounded,
60
- and report the real path and verification result.
69
+ app in the connected Agent-Native workspace through Dispatch and Builder, keep
70
+ the source brief bounded, and report the real Builder branch/path and
71
+ verification result. Do not build it in this chat's sandbox.
61
72
  ```
62
73
 
63
74
  If the host does not show the Project instructions or files to the model, stop
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
199
199
  - Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
200
200
  - Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
201
201
  - For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
202
- - Loading states use `Skeleton`, `Progress`, `Spinner`, or the app's existing loading primitives. Empty states should have one clear next action.
202
+ - Page and section data loading uses layout-matching `Skeleton` geometry. Do
203
+ not show generic "Loading..." text for content loads; reserve `Spinner` for
204
+ brief mutations, uploads, and progress actions. Use the app's existing
205
+ loading primitive when it is a genuine design-system adapter. Empty states
206
+ should have one clear next action.
203
207
 
204
208
  ## Anti-Patterns
205
209
 
@@ -4,7 +4,7 @@ description: >-
4
4
  Turn visible project context, a proven thread, skill, or workflow into a
5
5
  runnable Agent-Native app with simple buttons, visible agent steps, preview,
6
6
  and deployment handoff. Use when a user invokes `/turn-into-app` or asks to
7
- make a workflow into an app.
7
+ make a workflow into an app, including from Claude or ChatGPT on the web.
8
8
  user-invocable: true
9
9
  scope: both
10
10
  metadata:
@@ -13,9 +13,32 @@ metadata:
13
13
 
14
14
  # Turn Into App
15
15
 
16
+ ## Host execution boundary
17
+
18
+ The build location depends on the host. Treat this as a hard routing rule:
19
+
20
+ - In Claude Web, ChatGPT Web, or a Claude/ChatGPT Project on the web, you are
21
+ the source analyst and handoff orchestrator. You must not build the app in
22
+ the host sandbox. Do not run `npm`, `pnpm`, `npx`, `agent-native create`, or
23
+ `add-app`; do not edit files, create artifacts, or start a local dev server.
24
+ After writing the bounded source brief, call the connected Dispatch action
25
+ `start-workspace-app-creation`. Pass the brief and repeatable workflow in
26
+ `prompt`, plus the inferred `appId`, `description`, `template`, and selected
27
+ `resourceIds` when available. This is the Builder handoff.
28
+ - Do not substitute the generic `create_workspace_app` MCP tool in an online
29
+ host. That tool is a local workspace scaffolder, not the Builder handoff.
30
+ - If `start-workspace-app-creation` is not available or Dispatch is not
31
+ authenticated, stop with the connector setup needed. Do not fall back to a
32
+ local build or claim that the app exists.
33
+ - In Claude Code, Codex Code, or another local code-agent runtime with a target
34
+ workspace, follow the local implementation steps below. The local agent may
35
+ scaffold, edit, run, and verify the app there.
36
+
16
37
  ## Default behavior
17
38
 
18
- This is an end-to-end build skill, not a request for an app proposal.
39
+ For a local code-agent runtime this is an end-to-end build skill, not a request
40
+ for an app proposal. For an online host, the end-to-end result is a verified
41
+ Builder handoff and the resulting workspace app, not code written in the host.
19
42
 
20
43
  - With no argument, choose the source in this order: visible project context,
21
44
  then the current thread. A fresh Claude or ChatGPT Project is a valid source
@@ -47,9 +70,12 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
47
70
  page. If the needed context is not visible, ask for an export, transcript, or
48
71
  attachment and treat that artifact as imported source material.
49
72
 
50
- Deliver a fresh app in a new directory, implement the repeatable workflow with
51
- buttons and agent handoffs, start its dev server, verify the main path, and
52
- continue through build/deployment handoff. Do not stop at a plan.
73
+ For local code-agent runtimes, deliver a fresh app in a new directory,
74
+ implement the repeatable workflow with buttons and agent handoffs, start its dev
75
+ server, verify the main path, and continue through build/deployment handoff. Do
76
+ not stop at a plan. For online hosts, call Dispatch first after the source brief,
77
+ then report the returned Builder branch/path and verify the workspace app through
78
+ Dispatch when it becomes available.
53
79
 
54
80
  ## Fresh project context mode
55
81
 
@@ -190,12 +216,12 @@ Do not use `create` for an existing workspace; it scaffolds a new standalone
190
216
  workspace rather than adding an app to the current one.
191
217
 
192
218
  When the source came from a fresh external Project and the target is a Builder
193
- workspace, prefer the available Dispatch MCP workspace handoff after writing
194
- the source brief. Call `start-workspace-app-creation` with a concise prompt,
195
- the inferred app id, and the brief's repeatable workflow. Pass selected
196
- workspace resource IDs when they are available, rather than pasting entire
197
- knowledge files. Continue from the returned workspace path or Builder handoff
198
- and report the actual verification result.
219
+ workspace, the online host path is mandatory: after writing the source brief,
220
+ call `start-workspace-app-creation` with a concise prompt, the inferred app id,
221
+ and the brief's repeatable workflow. Pass selected workspace resource IDs when
222
+ they are available, rather than pasting entire knowledge files. Continue from
223
+ the returned workspace path or Builder branch handoff and report the actual
224
+ verification result. Do not run the local scaffold commands in this host mode.
199
225
 
200
226
  Use a first-party template only when it materially fits the workflow. Keep the
201
227
  new app independent from the source thread's working tree unless the user
@@ -51,13 +51,24 @@ also place the skill instructions or this reference in the Project
51
51
  instructions/knowledge files. Then add and authenticate the Dispatch MCP
52
52
  connector from the packaged `adapters/chatgpt-mcp/connector.json`.
53
53
 
54
+ For Claude Web, ChatGPT Web, and their web Projects, the host is an
55
+ orchestrator, not the build environment. After forming the source brief, call
56
+ the Dispatch `start-workspace-app-creation` action so Builder creates the app
57
+ in the connected workspace. Do not use the host's code interpreter, shell,
58
+ artifact editor, `create_workspace_app`, or local `pnpm`/`npm` commands. If the
59
+ handoff action is unavailable, stop and ask the user to authenticate Dispatch;
60
+ do not fall back to a local sandbox build. Claude Code and Codex Code are the
61
+ local-agent exception and may follow the implementation steps in the main
62
+ skill.
63
+
54
64
  In a new Project chat, say:
55
65
 
56
66
  ```text
57
67
  Turn this project into an app. Use the visible Project instructions,
58
68
  knowledge files, and any selected successful runs as the source. Create the
59
- app in the connected Agent-Native workspace, keep the source brief bounded,
60
- and report the real path and verification result.
69
+ app in the connected Agent-Native workspace through Dispatch and Builder, keep
70
+ the source brief bounded, and report the real Builder branch/path and
71
+ verification result. Do not build it in this chat's sandbox.
61
72
  ```
62
73
 
63
74
  If the host does not show the Project instructions or files to the model, stop
@@ -44,6 +44,9 @@ agent should know.
44
44
  - Keep the first viewport focused: one primary action, progressive disclosure,
45
45
  concise copy, and domain-specific navigation. Never use sparkle, wand,
46
46
  magic, or robot icons as AI affordances.
47
+ - Data loads use layout-matching `Skeleton` geometry, never a
48
+ generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
49
+ and progress actions.
47
50
  - Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
48
51
  type for content previews. Give the AgentSidebar a subtle surface/divider
49
52
  boundary, and stack original/generated review vertically by default.
@@ -69,6 +69,9 @@ refreshes framework-provided shared skills and repairs `CLAUDE.md` /
69
69
  - Keep the first viewport focused: one primary action, progressive disclosure,
70
70
  concise copy, and domain-specific navigation. Never use sparkle, wand,
71
71
  magic, or robot icons as AI affordances.
72
+ - Page and section data loads use layout-matching `Skeleton` geometry, never a
73
+ generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
74
+ and progress actions.
72
75
  - Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
73
76
  type for content previews. Give the AgentSidebar a subtle surface/divider
74
77
  boundary, and stack original/generated review vertically by default.
@@ -0,0 +1,10 @@
1
+ import { type AgentNativeConfig, type AgentNativeConfigContext, type AgentNativeConfigInput } from "../config.js";
2
+ /** The canonical filename comes first; the remaining names stay compatible. */
3
+ export declare const AGENT_NATIVE_CONFIG_FILE_CANDIDATES: readonly ["agent-native.config.ts", "agent-native.ts", "agent-native.mts", "agent-native.config.mts"];
4
+ export declare function createAgentNativeConfigContext(command: AgentNativeConfigContext["command"] | undefined, mode: string): AgentNativeConfigContext;
5
+ export declare function readAgentNativeJsonConfig(cwd: string): AgentNativeConfig;
6
+ export declare function loadAgentNativeConfigFile(cwd: string): Promise<AgentNativeConfigInput | undefined>;
7
+ export declare function loadResolvedAgentNativeConfig(cwd: string, context: AgentNativeConfigContext, options?: {
8
+ loadProjectConfig?: boolean;
9
+ projectConfig?: AgentNativeConfigInput;
10
+ }): Promise<AgentNativeConfig>;
@@ -0,0 +1,56 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { pathToFileURL } from "node:url";
4
+ import { mergeAgentNativeConfigs, normalizeAgentNativeConfig, resolveAgentNativeConfig, } from "../config.js";
5
+ /** The canonical filename comes first; the remaining names stay compatible. */
6
+ export const AGENT_NATIVE_CONFIG_FILE_CANDIDATES = [
7
+ "agent-native.config.ts",
8
+ "agent-native.ts",
9
+ "agent-native.mts",
10
+ "agent-native.config.mts",
11
+ ];
12
+ export function createAgentNativeConfigContext(command, mode) {
13
+ const resolvedCommand = command === "build" ? "build" : "serve";
14
+ return {
15
+ command: resolvedCommand,
16
+ mode,
17
+ isDev: resolvedCommand === "serve",
18
+ isBuild: resolvedCommand === "build",
19
+ };
20
+ }
21
+ export function readAgentNativeJsonConfig(cwd) {
22
+ const configPath = path.join(cwd, "agent-native.json");
23
+ if (!fs.existsSync(configPath))
24
+ return {};
25
+ let parsed;
26
+ try {
27
+ parsed = JSON.parse(fs.readFileSync(configPath, "utf8"));
28
+ }
29
+ catch (error) {
30
+ throw new Error(`Could not read ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
31
+ }
32
+ return normalizeAgentNativeConfig(parsed, configPath);
33
+ }
34
+ export async function loadAgentNativeConfigFile(cwd) {
35
+ const configPath = AGENT_NATIVE_CONFIG_FILE_CANDIDATES.map((filename) => path.join(cwd, filename)).find((candidate) => fs.existsSync(candidate));
36
+ if (!configPath)
37
+ return undefined;
38
+ try {
39
+ const module = (await import(pathToFileURL(configPath).href));
40
+ const config = module.default ?? module.agentNativeConfig;
41
+ if (typeof config !== "object" && typeof config !== "function") {
42
+ throw new Error("the default export must be an object or function");
43
+ }
44
+ return config;
45
+ }
46
+ catch (error) {
47
+ throw new Error(`Could not load ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
48
+ }
49
+ }
50
+ export async function loadResolvedAgentNativeConfig(cwd, context, options = {}) {
51
+ const projectConfig = options.projectConfig ??
52
+ (options.loadProjectConfig === false
53
+ ? undefined
54
+ : await loadAgentNativeConfigFile(cwd));
55
+ return resolveAgentNativeConfig(mergeAgentNativeConfigs(readAgentNativeJsonConfig(cwd), projectConfig ? resolveAgentNativeConfig(projectConfig, context) : {}), context);
56
+ }
@@ -1,2 +1,6 @@
1
1
  import type { Plugin } from "vite";
2
- export declare function agentsBundlePlugin(): Plugin;
2
+ import type { AgentNativeConfigInput } from "../config.js";
3
+ export interface AgentsBundlePluginOptions {
4
+ agentNativeConfig?: AgentNativeConfigInput;
5
+ }
6
+ export declare function agentsBundlePlugin(options?: AgentsBundlePluginOptions): Plugin;
@@ -15,7 +15,8 @@ import fs from "fs";
15
15
  */
16
16
  import path from "path";
17
17
  import { getWorkspaceCoreExports } from "../deploy/workspace-core.js";
18
- import { readAgentsBundleFromFs, } from "../server/agents-bundle.js";
18
+ import { readAgentsBundleFromFs, resolveAgentInstructionPaths, } from "../server/agents-bundle.js";
19
+ import { createAgentNativeConfigContext, loadResolvedAgentNativeConfig, } from "./agent-native-config-loader.js";
19
20
  const VIRTUAL_ID = "virtual:agents-bundle";
20
21
  const RESOLVED_ID = "\0" + VIRTUAL_ID;
21
22
  const TEMPLATE_SKILLS_DIRS = [
@@ -33,7 +34,7 @@ const TEMPLATE_SKILLS_DIRS = [
33
34
  * reload is batched.
34
35
  */
35
36
  const FULL_RELOAD_COALESCE_MS = 500;
36
- async function emitBundleModule(projectRoot) {
37
+ async function emitBundleModule(projectRoot, agentConfig) {
37
38
  // If the project is inside an enterprise monorepo with a workspace core,
38
39
  // merge in its AGENTS.md + skills. Template skills override workspace
39
40
  // core skills on name collision.
@@ -51,7 +52,9 @@ async function emitBundleModule(projectRoot) {
51
52
  catch {
52
53
  // fall back to template-only
53
54
  }
54
- const bundle = readAgentsBundleFromFs(projectRoot, workspaceSource);
55
+ const bundle = readAgentsBundleFromFs(projectRoot, workspaceSource, {
56
+ instructions: agentConfig.instructions,
57
+ });
55
58
  // Serialize as JSON and wrap in `export default` — this produces a valid
56
59
  // ES module that any bundler (Rollup, esbuild, Rolldown) can statically
57
60
  // analyze and tree-shake if nothing imports it.
@@ -62,12 +65,17 @@ const bundle = ${JSON.stringify(bundle)};
62
65
  export default bundle;
63
66
  `;
64
67
  }
65
- export function agentsBundlePlugin() {
68
+ export function agentsBundlePlugin(options = {}) {
66
69
  let projectRoot = "";
70
+ let agentConfigPromise = Promise.resolve({});
67
71
  return {
68
72
  name: "agent-native-agents-bundle",
69
- configResolved(config) {
73
+ async configResolved(config) {
70
74
  projectRoot = config.root;
75
+ agentConfigPromise = loadResolvedAgentNativeConfig(projectRoot, createAgentNativeConfigContext(config.command, config.mode), {
76
+ loadProjectConfig: options.agentNativeConfig === undefined,
77
+ projectConfig: options.agentNativeConfig,
78
+ });
71
79
  },
72
80
  resolveId(id) {
73
81
  if (id === VIRTUAL_ID)
@@ -79,7 +87,7 @@ export function agentsBundlePlugin() {
79
87
  return null;
80
88
  if (!projectRoot)
81
89
  projectRoot = process.cwd();
82
- return await emitBundleModule(projectRoot);
90
+ return await emitBundleModule(projectRoot, await agentConfigPromise);
83
91
  },
84
92
  async configureServer(server) {
85
93
  // Watch AGENTS.md + any SKILL.md changes and invalidate the virtual
@@ -87,6 +95,9 @@ export function agentsBundlePlugin() {
87
95
  // the workspace core's AGENTS.md + skills directory (if present)
88
96
  // so edits to the enterprise mid-layer propagate to every app.
89
97
  const watcher = server.watcher;
98
+ const agentConfig = await agentConfigPromise;
99
+ const instructionPaths = resolveAgentInstructionPaths(agentConfig.instructions);
100
+ const instructionFiles = new Set([instructionPaths.runtime, instructionPaths.development].map((file) => path.resolve(projectRoot, file)));
90
101
  // Resolve the workspace core up front so we can tell which files
91
102
  // outside projectRoot should trigger invalidation.
92
103
  let workspaceAgentsMdPath = null;
@@ -102,6 +113,8 @@ export function agentsBundlePlugin() {
102
113
  // ignore
103
114
  }
104
115
  const shouldInvalidate = (file) => {
116
+ if (instructionFiles.has(path.resolve(file)))
117
+ return true;
105
118
  const rel = path.relative(projectRoot, file);
106
119
  if (!rel.startsWith("..")) {
107
120
  if (rel === "AGENTS.md")
@@ -158,6 +171,16 @@ export function agentsBundlePlugin() {
158
171
  if (fs.existsSync(skillsDir))
159
172
  watcher.add(skillsDir);
160
173
  }
174
+ for (const instructionFile of instructionFiles) {
175
+ if (fs.existsSync(instructionFile)) {
176
+ watcher.add(instructionFile);
177
+ }
178
+ else {
179
+ const parent = path.dirname(instructionFile);
180
+ if (fs.existsSync(parent))
181
+ watcher.add(parent);
182
+ }
183
+ }
161
184
  if (workspaceAgentsMdPath && fs.existsSync(workspaceAgentsMdPath)) {
162
185
  watcher.add(workspaceAgentsMdPath);
163
186
  }
@@ -117,8 +117,10 @@ export interface ClientConfigOptions {
117
117
  define?: UserConfig["define"];
118
118
  /**
119
119
  * Public app behavior from `agent-native.json` or an optional typed
120
- * `agent-native.ts` file. Explicit Vite options win over the JSON file,
121
- * while the file remains the default project-level source of truth.
120
+ * `agent-native.config.ts` file. Explicit Vite options win over the JSON
121
+ * file, while the typed file remains the default project-level source of
122
+ * truth. `agent-native.ts`, `.mts`, and `agent-native.config.mts` remain
123
+ * compatibility aliases.
122
124
  */
123
125
  agentNativeConfig?: AgentNativeConfigInput;
124
126
  /**
@@ -2,12 +2,12 @@ import { EventEmitter } from "events";
2
2
  import fs from "fs";
3
3
  import { createRequire, syncBuiltinESMExports } from "module";
4
4
  import path from "path";
5
- import { fileURLToPath, pathToFileURL } from "url";
5
+ import { fileURLToPath } from "url";
6
6
  import { renderDesignSystemThemeCss, } from "@agent-native/toolkit/design-system/theme";
7
7
  import { loadEnv, } from "vite";
8
8
  import { mergePendingChangelog, parsePendingEntry, } from "../changelog/parse.js";
9
9
  import { getViteDevRecoveryScript } from "../client/vite-dev-recovery-script.js";
10
- import { mergeAgentNativeConfigs, normalizeAgentNativeConfig, resolveAgentNativeConfig, } from "../config.js";
10
+ import { mergeAgentNativeConfigs, resolveAgentNativeConfig, } from "../config.js";
11
11
  import { writeAgentNativeNitroPresetMarker } from "../deploy/nitro-preset.js";
12
12
  import { findWorkspaceRoot } from "../scripts/utils.js";
13
13
  import { verifyEmbedSessionToken } from "../server/embed-session.js";
@@ -17,6 +17,7 @@ import { normalizeMcpIntegrationsConfig, } from "../shared/mcp-integration-confi
17
17
  import { normalizeAgentNativeRouteWarmupConfig, } from "../shared/route-warmup-config.js";
18
18
  import { formatRuntimeConfigReport, getRuntimeConfigReport, } from "../shared/runtime-config.js";
19
19
  import { actionTypesPlugin } from "./action-types-plugin.js";
20
+ import { createAgentNativeConfigContext, loadAgentNativeConfigFile, readAgentNativeJsonConfig, } from "./agent-native-config-loader.js";
20
21
  import { agentsBundlePlugin } from "./agents-bundle-plugin.js";
21
22
  const require = createRequire(import.meta.url);
22
23
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -2568,7 +2569,7 @@ function createAgentNativePlugins(options, { command, includeReactTransform, use
2568
2569
  ...userPlugins,
2569
2570
  appChangelogRawPlugin(),
2570
2571
  actionTypesPlugin(),
2571
- agentsBundlePlugin(),
2572
+ agentsBundlePlugin({ agentNativeConfig: options.agentNativeConfig }),
2572
2573
  autoReloadOnOptimizeDep(),
2573
2574
  fullReloadOnOptimizeDep504(),
2574
2575
  embedDevFrameHeaders(),
@@ -2612,52 +2613,6 @@ function resolveAgentNativeTemplate(cwd) {
2612
2613
  ?.trim()
2613
2614
  .toLowerCase() ?? "");
2614
2615
  }
2615
- function createAgentNativeConfigContext(command, mode) {
2616
- const resolvedCommand = command === "build" ? "build" : "serve";
2617
- return {
2618
- command: resolvedCommand,
2619
- mode,
2620
- isDev: resolvedCommand === "serve",
2621
- isBuild: resolvedCommand === "build",
2622
- };
2623
- }
2624
- function readAgentNativeJsonConfig(cwd) {
2625
- const configPath = path.join(cwd, "agent-native.json");
2626
- if (!fs.existsSync(configPath))
2627
- return {};
2628
- let parsed;
2629
- try {
2630
- parsed = JSON.parse(fs.readFileSync(configPath, "utf8"));
2631
- }
2632
- catch (error) {
2633
- throw new Error(`Could not read ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
2634
- }
2635
- return normalizeAgentNativeConfig(parsed, configPath);
2636
- }
2637
- async function loadAgentNativeConfigFile(cwd) {
2638
- const candidates = [
2639
- "agent-native.ts",
2640
- "agent-native.mts",
2641
- "agent-native.config.ts",
2642
- "agent-native.config.mts",
2643
- ];
2644
- const configPath = candidates
2645
- .map((filename) => path.join(cwd, filename))
2646
- .find((candidate) => fs.existsSync(candidate));
2647
- if (!configPath)
2648
- return undefined;
2649
- try {
2650
- const module = (await import(pathToFileURL(configPath).href));
2651
- const config = module.default ?? module.agentNativeConfig;
2652
- if (typeof config !== "object" && typeof config !== "function") {
2653
- throw new Error("the default export must be an object or function");
2654
- }
2655
- return config;
2656
- }
2657
- catch (error) {
2658
- throw new Error(`Could not load ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
2659
- }
2660
- }
2661
2616
  function reportRuntimeConfigDiagnostics(appConfig, context, mode, env = process.env) {
2662
2617
  const production = mode === "production" || process.env.NODE_ENV === "production";
2663
2618
  if (!production)
@@ -1,6 +1,6 @@
1
1
  export { agentNative, defineConfig, type AgentNativeVitePluginOptions, type ClientConfigOptions, type NitroOptions, } from "./client.js";
2
- export { defineAgentNativeConfig, type AgentNativeConfig, type AgentNativeConfigContext, type AgentNativeConfigFactory, type AgentNativeConfigInput, type AgentNativeDiagnosticsConfig, type AgentNativeFirstRunOnboardingMode, type AgentNativeFirstRunOnboardingSetting, type AgentNativeRuntimeAuthConfig, type AgentNativeRuntimeConfig, type AgentNativeRuntimeDatabaseConfig, type AgentNativeRuntimeEnvironmentConfig, } from "../config.js";
2
+ export { defineAgentNativeConfig, type AgentNativeConfig, type AgentNativeConfigContext, type AgentNativeConfigFactory, type AgentNativeConfigInput, type AgentNativeDiagnosticsConfig, type AgentNativeFirstRunOnboardingMode, type AgentNativeFirstRunOnboardingSetting, type AgentNativeInstructionsConfig, type AgentNativeRuntimeAuthConfig, type AgentNativeRuntimeConfig, type AgentNativeRuntimeDatabaseConfig, type AgentNativeRuntimeEnvironmentConfig, } from "../config.js";
3
3
  export type { AgentNativeRouteWarmupConfigInput, AgentNativeRouteWarmupResolvedConfig, AgentNativeRouteWarmupStrategy, } from "../shared/route-warmup-config.js";
4
4
  export { actionTypesPlugin, generateActionRegistryForProject, } from "./action-types-plugin.js";
5
- export { agentsBundlePlugin } from "./agents-bundle-plugin.js";
5
+ export { agentsBundlePlugin, type AgentsBundlePluginOptions, } from "./agents-bundle-plugin.js";
6
6
  export { createAgentWebVitePlugin, type AgentWebVitePluginOptions, } from "./agent-web-plugin.js";
@@ -1,5 +1,5 @@
1
1
  export { agentNative, defineConfig, } from "./client.js";
2
2
  export { defineAgentNativeConfig, } from "../config.js";
3
3
  export { actionTypesPlugin, generateActionRegistryForProject, } from "./action-types-plugin.js";
4
- export { agentsBundlePlugin } from "./agents-bundle-plugin.js";
4
+ export { agentsBundlePlugin, } from "./agents-bundle-plugin.js";
5
5
  export { createAgentWebVitePlugin, } from "./agent-web-plugin.js";
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  title: "Agent-Native app configuration"
3
- description: "Configure public Agent-Native app defaults with agent-native.ts, its typed aliases, or agent-native.json compatibility."
4
- search: "agent-native.ts agent-native.config.ts agent-native.config.mts agent-native.json onboarding runtime readiness configuration"
3
+ description: "Configure public Agent-Native app defaults with agent-native.config.ts, its typed aliases, or agent-native.json compatibility."
4
+ search: "agent-native.config.ts agent-native.ts agent-native.mts agent-native.config.mts agent-native.json onboarding runtime readiness configuration instructions"
5
5
  ---
6
6
 
7
7
  # Agent-Native app configuration
8
8
 
9
- Use `agent-native.ts` for new shared Agent-Native configuration. It is a typed,
10
- mode-aware source for committed, non-secret app defaults. The framework also
11
- accepts `agent-native.mts`, `agent-native.config.ts`, and
9
+ Use `agent-native.config.ts` for new shared Agent-Native configuration. It is a
10
+ typed, mode-aware source for committed, non-secret app defaults. The framework
11
+ also accepts `agent-native.ts`, `agent-native.mts`, and
12
12
  `agent-native.config.mts` as filename aliases, and continues to read
13
13
  `agent-native.json` for compatibility.
14
14
 
@@ -23,9 +23,9 @@ app's Vite configuration. In a workspace, each app has its own root and its own
23
23
  configuration file. The Vite preset reads from the current app root, not from
24
24
  `server/plugins/` or a workspace-wide directory.
25
25
 
26
- For new apps, create `agent-native.ts`:
26
+ For new apps, create `agent-native.config.ts`:
27
27
 
28
- ```ts filename="agent-native.ts"
28
+ ```ts filename="agent-native.config.ts"
29
29
  import { defineAgentNativeConfig } from "@agent-native/core/config";
30
30
 
31
31
  export default defineAgentNativeConfig(({ command, mode, isBuild }) => {
@@ -88,6 +88,32 @@ configuration portion of `agent-native.json`:
88
88
  | `runtime.database.required` | `boolean` | Declares whether production needs a persistent remote SQL database. |
89
89
  | `runtime.environment.required` | `string[]` | Declares additional required environment variable names. Names must match `[A-Za-z_][A-Za-z0-9_]*`; values do not belong in the config. |
90
90
  | `diagnostics.failOnBuild` | `boolean` | When `true`, a production Vite build throws on runtime configuration issues. When absent or `false`, it reports them without failing the build. |
91
+ | `instructions.runtime` | `string` | Optional relative Markdown path for the in-app runtime agent. Defaults to `AGENTS.md`. |
92
+ | `instructions.development` | `string` | Optional relative Markdown path for development/coding agents. Defaults to `AGENTS.md`. |
93
+
94
+ ### Separate runtime and development instructions
95
+
96
+ The default is intentionally flat: both audiences read `AGENTS.md`, and
97
+ existing apps do not need to change. To keep development guidance out of the
98
+ deployed app agent, opt in with audience-specific paths:
99
+
100
+ ```ts filename="agent-native.config.ts"
101
+ import { defineAgentNativeConfig } from "@agent-native/core/config";
102
+
103
+ export default defineAgentNativeConfig({
104
+ instructions: {
105
+ runtime: "app-agent/AGENTS.md",
106
+ development: "DEVELOPING.md",
107
+ },
108
+ });
109
+ ```
110
+
111
+ Paths are relative to the app root and cannot escape it. If an explicitly
112
+ selected file is missing, that audience receives no file; the framework does
113
+ not fall back to `AGENTS.md`, because that could reintroduce development-only
114
+ guidance into runtime. Skills keep their existing frontmatter audience scope:
115
+ use `scope: runtime`, `scope: dev`, or `scope: both` when a skill needs a
116
+ different boundary.
91
117
 
92
118
  ### Mode maps for onboarding
93
119
 
@@ -98,7 +124,7 @@ exact Vite modes. The resolver checks the exact `mode` first. If there is no
98
124
  exact match, it checks `development` for `serve` or `production` for `build`,
99
125
  then `default`, and finally falls back to `off`:
100
126
 
101
- ```ts filename="agent-native.ts"
127
+ ```ts filename="agent-native.config.ts"
102
128
  import { defineAgentNativeConfig } from "@agent-native/core/config";
103
129
 
104
130
  export default defineAgentNativeConfig({
@@ -143,7 +169,7 @@ guidance, never secret values.
143
169
  For example, this is a useful readiness declaration when an app uses the
144
170
  framework's normal auth and database contracts:
145
171
 
146
- ```ts filename="agent-native.ts"
172
+ ```ts filename="agent-native.config.ts"
147
173
  import { defineAgentNativeConfig } from "@agent-native/core/config";
148
174
 
149
175
  export default defineAgentNativeConfig({
@@ -160,7 +186,7 @@ Set the actual deployment values outside the repository. For example, provide
160
186
  `BETTER_AUTH_SECRET`, `DATABASE_URL`, and `PUBLIC_API_ORIGIN` in Netlify,
161
187
  Vercel, another deployment environment, or the appropriate scoped secret
162
188
  store. Do not replace those placeholders with literal values in
163
- `agent-native.ts`.
189
+ `agent-native.config.ts`.
164
190
 
165
191
  `diagnostics.failOnBuild` is for runtime configuration diagnostics. It is not
166
192
  the same setting as the separate `doctor.failOnBuild` option documented in the
@@ -174,8 +200,8 @@ For a Vite app, the effective shared configuration follows this order:
174
200
  persistent database default to required in production diagnostics.
175
201
  2. `agent-native.json` at the app root.
176
202
  3. The automatically loaded typed file, if present. The loader checks these
177
- candidates in order: `agent-native.ts`, `agent-native.mts`,
178
- `agent-native.config.ts`, `agent-native.config.mts`.
203
+ candidates in order: `agent-native.config.ts`, `agent-native.ts`,
204
+ `agent-native.mts`, `agent-native.config.mts`.
179
205
  4. An explicit `agentNativeConfig` passed to `agentNative()` or the legacy
180
206
  `defineConfig()` wrapper. Supplying this option skips automatic typed-file
181
207
  loading, while the explicit value still overlays `agent-native.json`.
@@ -185,8 +211,8 @@ For a Vite app, the effective shared configuration follows this order:
185
211
  resolved onboarding mode. Use the config file for new work.
186
212
 
187
213
  Use only one of the four typed filenames. If more than one exists, the first
188
- candidate in the loader's order wins, with `agent-native.ts` preferred for new
189
- apps. The names are aliases, not four layers that are merged together.
214
+ candidate in the loader's order wins, with `agent-native.config.ts` preferred
215
+ for new apps. The names are aliases, not four layers that are merged together.
190
216
 
191
217
  The JSON and typed sources are merged by supported nested section:
192
218
 
@@ -200,7 +226,7 @@ The JSON and typed sources are merged by supported nested section:
200
226
  supplies it, it replaces the lower-precedence string or mode map as a whole.
201
227
 
202
228
  For example, JSON can provide `runtime.auth.enabled` and
203
- `NOTION_API_KEY`, while `agent-native.ts` adds `runtime.database.required` and
229
+ `NOTION_API_KEY`, while `agent-native.config.ts` adds `runtime.database.required` and
204
230
  `GOOGLE_CLIENT_ID`. The result keeps the auth setting, adds the database
205
231
  setting, and checks both environment names.
206
232
 
@@ -223,7 +249,7 @@ Do not commit these values to either config format:
223
249
  vary by environment.
224
250
 
225
251
  Even a value that is not a secret should stay in deployment configuration when
226
- it changes between targets. `agent-native.ts` should describe the app's
252
+ it changes between targets. `agent-native.config.ts` should describe the app's
227
253
  public shape, not become a second environment-variable file.
228
254
 
229
255
  ## `agent-native.json` compatibility
@@ -254,7 +280,7 @@ default that never depends on the Vite command or mode:
254
280
  }
255
281
  ```
256
282
 
257
- For new app-owned configuration, prefer `agent-native.ts` when the app needs
283
+ For new app-owned configuration, prefer `agent-native.config.ts` when the app needs
258
284
  types, a mode-aware factory, or a clear place to evolve public defaults. Keep
259
285
  `agent-native.json` when portability or existing manifest sections are the
260
286
  reason to use it. Both formats accept the same shared options shown above.
@@ -90,7 +90,7 @@ values.
90
90
  Every framework app exposes the redacted report at
91
91
  `/_agent-native/ping?configuration=1`. The shared provider shell turns a
92
92
  non-healthy production report into a warning or error chip with a **Copy
93
- prompt for AI** button. `agent-native.ts` or its compatibility aliases can add
93
+ prompt for AI** button. `agent-native.config.ts` or its compatibility aliases can add
94
94
  non-secret requirements under `runtime.environment.required`; set the actual
95
95
  values in Netlify, Vercel, or the deployment's secret store.
96
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.145.7",
3
+ "version": "0.146.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": {
@@ -412,8 +412,8 @@
412
412
  "y-protocols": "^1.0.7",
413
413
  "yjs": "^13.6.31",
414
414
  "zod": "^4.3.6",
415
- "@agent-native/recap-cli": "0.5.3",
416
- "@agent-native/toolkit": "^0.13.4"
415
+ "@agent-native/toolkit": "^0.13.4",
416
+ "@agent-native/recap-cli": "0.5.3"
417
417
  },
418
418
  "devDependencies": {
419
419
  "@ai-sdk/anthropic": "^3.0.71",
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
199
199
  - Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
200
200
  - Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
201
201
  - For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
202
- - Loading states use `Skeleton`, `Progress`, `Spinner`, or the app's existing loading primitives. Empty states should have one clear next action.
202
+ - Page and section data loading uses layout-matching `Skeleton` geometry. Do
203
+ not show generic "Loading..." text for content loads; reserve `Spinner` for
204
+ brief mutations, uploads, and progress actions. Use the app's existing
205
+ loading primitive when it is a genuine design-system adapter. Empty states
206
+ should have one clear next action.
203
207
 
204
208
  ## Anti-Patterns
205
209