@agent-native/core 0.145.5 → 0.145.6

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 (387) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +18 -0
  3. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  4. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +17 -1
  5. package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  6. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -0
  7. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +22 -3
  8. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +76 -23
  9. package/corpus/templates/analytics/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  10. package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  11. package/corpus/templates/analytics/AGENTS.md +2 -1
  12. package/corpus/templates/analytics/actions/account-deep-dive.ts +83 -47
  13. package/corpus/templates/analytics/actions/create-dashboard-folder.ts +27 -0
  14. package/corpus/templates/analytics/actions/gong-calls.ts +3 -3
  15. package/corpus/templates/analytics/actions/list-dashboard-folders.ts +26 -0
  16. package/corpus/templates/analytics/actions/list-sql-dashboards.ts +1 -0
  17. package/corpus/templates/analytics/actions/set-dashboard-folder.ts +26 -0
  18. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +18 -3
  19. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +6 -4
  20. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
  21. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +12 -2
  22. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +35 -20
  23. package/corpus/templates/analytics/app/global.css +17 -0
  24. package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +29 -15
  25. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -3
  26. package/corpus/templates/analytics/app/i18n-data.ts +296 -0
  27. package/corpus/templates/analytics/app/lib/prefetch-keys.ts +23 -2
  28. package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +642 -0
  29. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +66 -31
  30. package/corpus/templates/analytics/app/root.tsx +4 -0
  31. package/corpus/templates/analytics/app/routes/dashboards._index.tsx +5 -1
  32. package/corpus/templates/analytics/changelog/2026-08-07-added-a-dashboards-overview-with-personal-and-shared-folders.md +6 -0
  33. package/corpus/templates/analytics/changelog/2026-08-07-analytics-tracking-and-chat-startup-no-longer-emit-avoidable.md +6 -0
  34. package/corpus/templates/analytics/changelog/2026-08-07-dashboard-panels-now-load-custom-api-data-programs-reliably.md +6 -0
  35. package/corpus/templates/analytics/changelog/2026-08-07-gong-searches-conserve-api-quota-and-report-incomplete-coverage.md +6 -0
  36. package/corpus/templates/analytics/changelog/2026-08-07-searchable-dashboards-make-personal-and-shared-folders-easie.md +6 -0
  37. package/corpus/templates/analytics/netlify.toml +3 -0
  38. package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +112 -0
  39. package/corpus/templates/analytics/server/db/index.ts +12 -0
  40. package/corpus/templates/analytics/server/db/schema.ts +14 -0
  41. package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +4 -0
  42. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +1 -0
  43. package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +85 -15
  44. package/corpus/templates/analytics/server/lib/dashboard-folders-store.ts +168 -0
  45. package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +9 -4
  46. package/corpus/templates/analytics/server/lib/dashboards-store.ts +116 -1
  47. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -8
  48. package/corpus/templates/analytics/server/lib/gong.ts +139 -78
  49. package/corpus/templates/analytics/server/plugins/db.ts +55 -15
  50. package/corpus/templates/analytics/server/plugins/session-replay-retention-jobs.ts +6 -2
  51. package/corpus/templates/analytics/server/routes/api/session-replay/retention.post.ts +65 -0
  52. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +18 -0
  53. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  54. package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  55. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -0
  56. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +76 -23
  57. package/corpus/templates/assets/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  58. package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  59. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +18 -0
  60. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  61. package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  62. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -0
  63. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +76 -23
  64. package/corpus/templates/brain/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  65. package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  66. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +18 -0
  67. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  68. package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  69. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -0
  70. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +76 -23
  71. package/corpus/templates/calendar/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  72. package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  73. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  74. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  75. package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  76. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  77. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  78. package/corpus/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  79. package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  80. package/corpus/templates/chat/.env.example +3 -0
  81. package/corpus/templates/chat/AGENTS.md +4 -0
  82. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +18 -0
  83. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  84. package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  85. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -0
  86. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +76 -23
  87. package/corpus/templates/clips/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  88. package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  89. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +4 -0
  90. package/corpus/templates/clips/actions/request-transcript.ts +52 -3
  91. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -10
  92. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -0
  93. package/corpus/templates/clips/changelog/2026-08-07-screen-recordings-now-capture-tab-and-system-audio-even-when.md +6 -0
  94. package/corpus/templates/clips/changelog/2026-08-07-transcription-now-retries-transient-cloud-failures-automatic.md +6 -0
  95. package/corpus/templates/clips/server/db/schema.ts +7 -0
  96. package/corpus/templates/clips/server/plugins/db.ts +8 -0
  97. package/corpus/templates/clips/shared/recording-capture.ts +38 -0
  98. package/corpus/templates/clips/shared/transcript-failure.ts +89 -0
  99. package/corpus/templates/content/.agents/skills/actions/SKILL.md +18 -0
  100. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  101. package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  102. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -0
  103. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +76 -23
  104. package/corpus/templates/content/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  105. package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  106. package/corpus/templates/content/.env.example +9 -3
  107. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -0
  108. package/corpus/templates/content/changelog/2026-08-07-collapsed-sidebar-utility-buttons-stay-anchored-at-the-botto.md +6 -0
  109. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  110. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +76 -23
  111. package/corpus/templates/crm/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  112. package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  113. package/corpus/templates/design/.agents/skills/actions/SKILL.md +18 -0
  114. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  115. package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  116. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -0
  117. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +76 -23
  118. package/corpus/templates/design/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  119. package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  120. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +18 -0
  121. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  122. package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  123. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -0
  124. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +76 -23
  125. package/corpus/templates/dispatch/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  126. package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  127. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +18 -0
  128. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  129. package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  130. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +1 -0
  131. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +76 -23
  132. package/corpus/templates/factory/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  133. package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  134. package/corpus/templates/factory/actions/babysit-agent-native-pull-request.ts +279 -0
  135. package/corpus/templates/factory/actions/get-factory-automation-health.ts +23 -4
  136. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +1 -1
  137. package/corpus/templates/factory/app/routes/factory.tsx +21 -3
  138. package/corpus/templates/factory/changelog/2026-08-07-factory-can-keep-builder-bot-pull-requests-moving-by-request.md +6 -0
  139. package/corpus/templates/factory/server/lib/require-factory-automation.ts +1 -0
  140. package/corpus/templates/factory/server/plugins/agent-chat.ts +4 -1
  141. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +81 -12
  142. package/corpus/templates/factory/server/triage/github-client.ts +31 -0
  143. package/corpus/templates/factory/server/triage/pr-babysit.ts +75 -1
  144. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +18 -0
  145. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  146. package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  147. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -0
  148. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +76 -23
  149. package/corpus/templates/forms/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  150. package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  151. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  152. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -0
  153. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +76 -23
  154. package/corpus/templates/macros/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  155. package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  156. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +18 -0
  157. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  158. package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  159. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -0
  160. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +76 -23
  161. package/corpus/templates/mail/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  162. package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  163. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +18 -0
  164. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  165. package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  166. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -0
  167. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +76 -23
  168. package/corpus/templates/plan/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  169. package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  170. package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -1
  171. package/corpus/templates/plan/changelog/2026-08-07-inline-help-icons-now-stay-visually-balanced-with-nearby-tex.md +6 -0
  172. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +18 -0
  173. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  174. package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  175. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -0
  176. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +76 -23
  177. package/corpus/templates/slides/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  178. package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  179. package/corpus/templates/slides/.env.example +5 -0
  180. package/corpus/templates/slides/changelog/2026-08-07-fixed-generated-slides-briefly-disappearing-while-they-are-b.md +6 -0
  181. package/corpus/templates/slides/server/plugins/collab.ts +20 -8
  182. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +18 -0
  183. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  184. package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  185. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +1 -0
  186. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +76 -23
  187. package/corpus/templates/tasks/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  188. package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  189. package/corpus/templates/tasks/.env.example +3 -0
  190. package/dist/agent/production-agent.js +24 -3
  191. package/dist/client/AgentPanel.d.ts +6 -0
  192. package/dist/client/AgentPanel.js +176 -30
  193. package/dist/client/AssistantChat.d.ts +2 -0
  194. package/dist/client/AssistantChat.js +4 -1
  195. package/dist/client/ConnectBuilderCard.js +6 -11
  196. package/dist/client/MultiTabAssistantChat.js +1 -1
  197. package/dist/client/RuntimeConfigNotice.d.ts +1 -0
  198. package/dist/client/RuntimeConfigNotice.js +94 -0
  199. package/dist/client/agent-chat/index.d.ts +1 -1
  200. package/dist/client/agent-chat/index.js +1 -1
  201. package/dist/client/agent-chat-adapter.js +85 -4
  202. package/dist/client/agent-page/AgentTabsPage.js +1 -1
  203. package/dist/client/agent-sidebar-state.d.ts +6 -0
  204. package/dist/client/agent-sidebar-state.js +25 -0
  205. package/dist/client/app-providers.js +2 -1
  206. package/dist/client/assistant-ui-recovery.js +1 -1
  207. package/dist/client/chat/index.d.ts +1 -1
  208. package/dist/client/chat/index.js +1 -1
  209. package/dist/client/chat/markdown-renderer.d.ts +2 -1
  210. package/dist/client/chat/markdown-renderer.js +48 -2
  211. package/dist/client/chat/message-components.d.ts +6 -0
  212. package/dist/client/chat/message-components.js +182 -53
  213. package/dist/client/chat/tool-call-display.d.ts +16 -4
  214. package/dist/client/chat/tool-call-display.js +225 -18
  215. package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
  216. package/dist/client/frame-protocol.d.ts +4 -0
  217. package/dist/client/i18n.js +9 -0
  218. package/dist/client/integrations/IntegrationsPanel.js +2 -5
  219. package/dist/client/onboarding/FirstRunOnboarding.js +2 -3
  220. package/dist/client/org/TeamPage.js +49 -6
  221. package/dist/client/org/hooks.d.ts +7 -2
  222. package/dist/client/org/hooks.js +11 -4
  223. package/dist/client/resources/McpConnectionSuggestion.js +2 -3
  224. package/dist/client/resources/McpIntegrationDialog.js +2 -16
  225. package/dist/client/resources/McpIntegrationLogo.d.ts +11 -0
  226. package/dist/client/resources/McpIntegrationLogo.js +14 -0
  227. package/dist/client/resources/ResourceTree.js +1 -1
  228. package/dist/client/resources/mcp-integration-logos.d.ts +1 -0
  229. package/dist/client/resources/mcp-integration-logos.js +47 -18
  230. package/dist/client/settings/useBuilderStatus.js +6 -0
  231. package/dist/client/ui/index.d.ts +1 -0
  232. package/dist/client/ui/index.js +1 -0
  233. package/dist/collab/routes.d.ts +1 -1
  234. package/dist/config.d.ts +26 -3
  235. package/dist/config.js +106 -14
  236. package/dist/db/ddl-guard.d.ts +15 -2
  237. package/dist/db/ddl-guard.js +53 -5
  238. package/dist/jobs/scheduler.js +7 -0
  239. package/dist/localization/default-messages.d.ts +17 -0
  240. package/dist/localization/default-messages.js +17 -0
  241. package/dist/mcp/oauth-client-metadata.js +5 -1
  242. package/dist/mcp/oauth-route.d.ts +5 -4
  243. package/dist/mcp/oauth-route.js +25 -9
  244. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  245. package/dist/mcp/server.d.ts +1 -1
  246. package/dist/mcp/server.js +9 -10
  247. package/dist/notifications/routes.d.ts +3 -3
  248. package/dist/org/handlers.d.ts +1 -0
  249. package/dist/org/handlers.js +17 -2
  250. package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
  251. package/dist/provider-api/actions/provider-api.d.ts +7 -7
  252. package/dist/provider-api/corpus-jobs.d.ts +12 -2
  253. package/dist/provider-api/corpus-jobs.js +31 -1
  254. package/dist/provider-api/index.d.ts +2 -0
  255. package/dist/provider-api/index.js +7 -1
  256. package/dist/resources/handlers.d.ts +1 -1
  257. package/dist/secrets/routes.d.ts +3 -3
  258. package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +1 -1
  259. package/dist/server/agent-chat/recurring-jobs-runtime.js +14 -2
  260. package/dist/server/agent-chat/script-entries.js +12 -1
  261. package/dist/server/agent-chat-plugin.js +2 -2
  262. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  263. package/dist/server/auth.d.ts +1 -0
  264. package/dist/server/auth.js +85 -1
  265. package/dist/server/better-auth-instance.d.ts +9 -0
  266. package/dist/server/better-auth-instance.js +25 -11
  267. package/dist/server/core-routes-plugin.d.ts +7 -0
  268. package/dist/server/core-routes-plugin.js +51 -5
  269. package/dist/server/create-server.js +23 -2
  270. package/dist/server/db-pressure.d.ts +38 -0
  271. package/dist/server/db-pressure.js +147 -0
  272. package/dist/server/index.d.ts +1 -0
  273. package/dist/server/index.js +1 -0
  274. package/dist/server/legacy-auth-migration.d.ts +10 -0
  275. package/dist/server/legacy-auth-migration.js +37 -0
  276. package/dist/server/onboarding-html.js +206 -2
  277. package/dist/server/poll.d.ts +26 -0
  278. package/dist/server/poll.js +108 -13
  279. package/dist/server/ssr-handler.js +4 -1
  280. package/dist/shared/index.d.ts +1 -0
  281. package/dist/shared/index.js +1 -0
  282. package/dist/shared/runtime-config.d.ts +44 -0
  283. package/dist/shared/runtime-config.js +284 -0
  284. package/dist/styles/agent-native.css +48 -1
  285. package/dist/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  286. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  287. package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  288. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  289. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  290. package/dist/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  291. package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  292. package/dist/templates/chat/.env.example +3 -0
  293. package/dist/templates/chat/AGENTS.md +4 -0
  294. package/dist/templates/default/.agents/skills/actions/SKILL.md +18 -0
  295. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  296. package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  297. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
  298. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
  299. package/dist/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  300. package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  301. package/dist/templates/default/AGENTS.md +6 -1
  302. package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
  303. package/dist/templates/default/app/i18n/de-DE.ts +6 -0
  304. package/dist/templates/default/app/i18n/en-US.ts +6 -0
  305. package/dist/templates/default/app/i18n/es-ES.ts +6 -0
  306. package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
  307. package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
  308. package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
  309. package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
  310. package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
  311. package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
  312. package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
  313. package/dist/templates/headless/.agents/skills/actions/SKILL.md +18 -0
  314. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  315. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
  316. package/dist/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  317. package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  318. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
  319. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  320. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  321. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
  322. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
  323. package/dist/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  324. package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  325. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
  326. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
  327. package/dist/templates/workspace-core/AGENTS.md +7 -2
  328. package/dist/templates/workspace-root/AGENTS.md +5 -0
  329. package/dist/vite/client.d.ts +3 -3
  330. package/dist/vite/client.js +47 -1
  331. package/dist/vite/index.d.ts +1 -1
  332. package/docs/content/agent-native-config.mdx +240 -139
  333. package/docs/content/authentication.mdx +17 -0
  334. package/docs/content/deployment.mdx +19 -14
  335. package/docs/content/drop-in-agent.mdx +19 -2
  336. package/docs/content/environment-variables.mdx +63 -38
  337. package/docs/content/getting-started-actions.mdx +15 -6
  338. package/docs/content/getting-started-database.mdx +14 -10
  339. package/docs/content/getting-started-pages.mdx +32 -35
  340. package/docs/content/getting-started.mdx +7 -6
  341. package/package.json +1 -1
  342. package/src/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  343. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  344. package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  345. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  346. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  347. package/src/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  348. package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  349. package/src/templates/chat/.env.example +3 -0
  350. package/src/templates/chat/AGENTS.md +4 -0
  351. package/src/templates/default/.agents/skills/actions/SKILL.md +18 -0
  352. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  353. package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  354. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
  355. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
  356. package/src/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  357. package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  358. package/src/templates/default/AGENTS.md +6 -1
  359. package/src/templates/default/app/i18n/ar-SA.ts +6 -0
  360. package/src/templates/default/app/i18n/de-DE.ts +6 -0
  361. package/src/templates/default/app/i18n/en-US.ts +6 -0
  362. package/src/templates/default/app/i18n/es-ES.ts +6 -0
  363. package/src/templates/default/app/i18n/fr-FR.ts +6 -0
  364. package/src/templates/default/app/i18n/hi-IN.ts +6 -0
  365. package/src/templates/default/app/i18n/ja-JP.ts +6 -0
  366. package/src/templates/default/app/i18n/ko-KR.ts +6 -0
  367. package/src/templates/default/app/i18n/pt-BR.ts +6 -0
  368. package/src/templates/default/app/i18n/zh-CN.ts +6 -0
  369. package/src/templates/default/app/i18n/zh-TW.ts +6 -0
  370. package/src/templates/headless/.agents/skills/actions/SKILL.md +18 -0
  371. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  372. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
  373. package/src/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  374. package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  375. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
  376. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  377. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  378. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
  379. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
  380. package/src/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  381. package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  382. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
  383. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
  384. package/src/templates/workspace-core/AGENTS.md +7 -2
  385. package/src/templates/workspace-root/AGENTS.md +5 -0
  386. package/corpus/templates/dispatch/app/routes/admin.apps.$appId.tsx +0 -1
  387. package/corpus/templates/dispatch/app/routes/admin.apps.tsx +0 -1
@@ -14,11 +14,21 @@ metadata:
14
14
 
15
15
  ## Rule
16
16
 
17
- The UI never calls an LLM directly. Product workflows are delegated to the
18
- agent through the chat bridge so users can see, steer, and audit the work.
19
- Server-side one-shot model calls are an explicit escape hatch for narrow text
20
- transforms only; use `completeText()` from `@agent-native/core/server` when the
21
- work intentionally does not need tools, chat history, or run state.
17
+ The app's default AI surface is the agent chat. Any user-facing work that asks
18
+ the model to research, analyze, generate, recommend, synthesize, or reason over
19
+ multiple steps must start or continue in the AgentSidebar so users can see,
20
+ steer, and audit the work. UI buttons use `sendToAgentChat()` with
21
+ `openSidebar: true`, and follow-up or revision text belongs in that same thread
22
+ instead of a second app-local textbox.
23
+
24
+ Actions are tools, not alternate AI runtimes. Keep them deterministic and
25
+ focused: provider reads, validation, deterministic transforms, CRUD, and
26
+ persistence are good action work. Let the agent orchestrate several such tools
27
+ when the workflow is AI-shaped or user-steerable. Server-side one-shot model
28
+ calls are a rare escape hatch for narrow text transforms only; use
29
+ `completeText()` from `@agent-native/core/server` only when the work
30
+ intentionally does not need tools, chat history, run state, side effects, or
31
+ user steering.
22
32
 
23
33
  ## Why
24
34
 
@@ -35,6 +45,7 @@ sendToAgentChat({
35
45
  message: "Generate a summary of this document",
36
46
  context: documentContent, // optional hidden context (not shown in chat UI)
37
47
  submit: true, // auto-submit to the agent
48
+ openSidebar: true,
38
49
  });
39
50
  ```
40
51
 
@@ -56,6 +67,10 @@ sendToAgentChat({
56
67
  This is still a full agent run: tools, actions, thread state, and run tracking
57
68
  all remain active. It simply does not focus or open the sidebar.
58
69
 
70
+ Use this silent form only for explicitly background or system-initiated work.
71
+ It is not the default for a user clicking an AI-labeled button; visible work
72
+ should open the sidebar so the user can follow and redirect the run.
73
+
59
74
  **From scripts (Node):**
60
75
 
61
76
  ```ts
@@ -77,8 +92,9 @@ const result = await completeText({
77
92
  });
78
93
  ```
79
94
 
80
- Wrap user-facing uses in actions so the UI and agent share the same operation.
81
- Do not call provider SDKs directly.
95
+ If the narrow exception is exposed to the UI, wrap it in an action so the UI
96
+ and agent share the same operation. Keep it clearly non-conversational and do
97
+ not call provider SDKs directly.
82
98
 
83
99
  **From the UI, detecting when agent is done:**
84
100
 
@@ -97,9 +113,9 @@ The `submit` option controls whether the message is sent automatically or placed
97
113
 
98
114
  | `submit` value | Behavior | Use when |
99
115
  | -------------- | --------------------------------------- | ----------------------------------------------------------------------------------- |
100
- | `true` | Auto-submits to the agent immediately | Routine operations the user has already approved |
101
- | `false` | Prefills the chat input for user review | High-stakes operations (deleting data, modifying code, API calls with side effects) |
102
- | omitted | Uses the project's default setting | General-purpose delegation |
116
+ | `true` | Auto-submits to the agent immediately | Routine operations with clear intent; keep `openSidebar: true` for visible work |
117
+ | `false` | Prefills the AgentSidebar composer | Review, edit, or add detail before the run; use the existing sidebar thread |
118
+ | omitted | Uses the project's default setting | General-purpose delegation |
103
119
 
104
120
  ```ts
105
121
  // Auto-submit: routine operation
@@ -109,61 +125,43 @@ sendToAgentChat({ message: "Update the project summary", submit: true });
109
125
  sendToAgentChat({
110
126
  message: "Delete all projects older than 30 days",
111
127
  submit: false,
128
+ openSidebar: true,
112
129
  });
113
130
  ```
114
131
 
115
- ## Capture user input first when generating from a prompt
116
-
117
- Buttons that produce new content ("New Design", "Create Dashboard", "Make Deck", "Generate Form") need the user's prompt as input. **Never hardcode a generic message** — the result will be a generic generation the user didn't actually ask for.
132
+ ## Capture user input in the sidebar
118
133
 
119
- **Bad** — auto-submits a placeholder message; the user never said what they wanted:
134
+ The AgentSidebar composer is the default prompt surface. When a button needs
135
+ the user to describe what to create, prefill that same composer and let the
136
+ user edit or complete it:
120
137
 
121
138
  ```tsx
122
139
  <Button
123
140
  onClick={() =>
124
- sendToAgentChat({ message: "make a design", submit: true })
141
+ sendToAgentChat({
142
+ message: "Help me create a research report from this brief:",
143
+ context: researchBrief,
144
+ submit: false,
145
+ openSidebar: true,
146
+ })
125
147
  }
126
148
  >
127
- New Design
149
+ Start in agent
128
150
  </Button>
129
151
  ```
130
152
 
131
- **Good** — Popover anchored to the button captures the prompt, then submits it:
132
-
133
- ```tsx
134
- <Popover open={open} onOpenChange={setOpen}>
135
- <PopoverTrigger asChild>
136
- <Button>New Design</Button>
137
- </PopoverTrigger>
138
- <PopoverContent className="w-96">
139
- <Textarea
140
- autoFocus
141
- value={prompt}
142
- onChange={(e) => setPrompt(e.target.value)}
143
- placeholder="What do you want to design?"
144
- />
145
- <Button
146
- onClick={() => {
147
- sendToAgentChat({ message: prompt, submit: true });
148
- setOpen(false);
149
- setPrompt("");
150
- }}
151
- >
152
- Create
153
- </Button>
154
- </PopoverContent>
155
- </Popover>
156
- ```
157
-
158
- **Always ask for input first when** the output depends on a prompt the user must provide — "design what?", "deck about what?", "dashboard for which metric?", "form for which use case?".
159
-
160
- **Auto-submit without input is fine when intent is unambiguous:**
153
+ Never auto-submit a generic creative prompt when the user has not said what
154
+ they want. Auto-submit without additional input is fine when intent is
155
+ unambiguous:
161
156
 
162
157
  - "Try to fix" on a tool error — submits the error details with a clear fix instruction
163
158
  - "Retry the last operation" after a transient failure
164
159
  - Single-purpose buttons where there is nothing meaningful for the user to add
165
160
 
166
- If you find yourself writing `submit: true` with a hardcoded creative verb (`"design a..."`, `"write a..."`, `"build a..."`), stop and add a Popover.
161
+ Use a Popover only for compact, structured parameters the UI must validate,
162
+ such as a date range, target, or approval choice. Do not add a second freeform
163
+ prompt or follow-up textbox for an AI workflow; keep the conversation and
164
+ revisions in the AgentSidebar thread.
167
165
 
168
166
  ## Delegating to a Sub-Agent (Agent Teams)
169
167
 
@@ -130,6 +130,7 @@ passed this requirement yet.
130
130
  - Do not build custom dropdowns, menus, popovers, modals, or confirmations with manual absolute positioning and click-outside effects.
131
131
  - Never use browser dialogs (`window.alert`, `window.confirm`, `window.prompt`). Use `AlertDialog`, `Dialog`, or app-specific confirmation UI.
132
132
  - Use Tabler icons for all first-party UI icons. Do not add Lucide, Heroicons, inline SVG icon sets, or emoji icons.
133
+ - Keep inline help/info glyphs next to labels at `size-3` (12px) or smaller than the adjacent text. Preserve a larger hit area on the trigger, not the glyph. Use `guard:allow-large-help-icon` only for deliberate heading documentation or menu action exceptions.
133
134
  - Use `useActionQuery` and `useActionMutation` from `@agent-native/core/client` for action-backed UI. Standard CRUD should go through actions, not custom `/api/` routes.
134
135
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
135
136
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: turn-into-app
3
3
  description: >-
4
- Turn a proven thread, skill, or workflow into a runnable Agent-Native app
5
- with simple buttons, visible agent steps, preview, and deployment handoff.
6
- Use when a user invokes `/turn-into-app` or asks to make a workflow into an
7
- app.
4
+ Turn visible project context, a proven thread, skill, or workflow into a
5
+ runnable Agent-Native app with simple buttons, visible agent steps, preview,
6
+ and deployment handoff. Use when a user invokes `/turn-into-app` or asks to
7
+ make a workflow into an app.
8
8
  user-invocable: true
9
9
  scope: both
10
10
  metadata:
@@ -17,34 +17,72 @@ metadata:
17
17
 
18
18
  This is an end-to-end build skill, not a request for an app proposal.
19
19
 
20
- - With no argument, use the current thread as the source. This is the normal
21
- invocation at the end of a successful workflow.
20
+ - With no argument, choose the source in this order: visible project context,
21
+ then the current thread. A fresh Claude or ChatGPT Project is a valid source
22
+ on its first turn. Treat its visible project instructions, knowledge files,
23
+ and supplied past runs as the source; a completed thread is not required.
24
+ Treat the current turn as a request or configuration unless it contains a
25
+ concrete repeatable workflow.
22
26
  - With a named skill or local workflow, read that source and package it
23
27
  immediately, even at the beginning of a thread. For example,
24
28
  `/turn-into-app /some-skill` means “turn `/some-skill` into an app.”
25
29
  - With an attachment or path, read the supplied artifact as the source.
26
30
  - Do not ask the user to restate context that is already in the thread.
27
- - When invoked from an Agent-Native app, keep the current thread as the source
28
- and use the available workspace/coding-agent handoff when the current runtime
29
- cannot edit files. Do not claim the app exists without an actual path and
30
- verification result.
31
+ - When invoked from an Agent-Native app, use its visible project context first,
32
+ then the current thread, and use the available workspace/coding-agent
33
+ handoff when the current runtime cannot edit files. Do not claim the app
34
+ exists without an actual path and verification result.
31
35
 
32
36
  ## Source support
33
37
 
34
- Supported source paths today are the current Codex thread, a named skill, or a
35
- local workflow/transcript supplied as a path or attachment. An exported
36
- ChatGPT or Claude transcript can use the same local-file path today.
38
+ Supported source paths today are visible Claude or ChatGPT Project context, the
39
+ current Codex or host thread, a named skill, or a local workflow/transcript
40
+ supplied as a path or attachment. An exported ChatGPT or Claude transcript can
41
+ use the same local-file path today.
37
42
 
38
- ChatGPT shared-conversation import and Claude web conversation/project import
39
- are **coming soon**. Do not claim private web access, invent an importer, add
40
- fake OAuth, or scrape a logged-in page without an explicit supported adapter.
41
- If a user gives one of those URLs before an adapter exists, ask for an export or
42
- transcript instead and treat it as imported source material.
43
+ Claude and ChatGPT Project context is supported only when the host supplies it
44
+ to the model in the current context. The MCP connector does not read hidden
45
+ project chats, private URLs, account settings, or credentials. Do not claim
46
+ private web access, invent an importer, add fake OAuth, or scrape a logged-in
47
+ page. If the needed context is not visible, ask for an export, transcript, or
48
+ attachment and treat that artifact as imported source material.
43
49
 
44
50
  Deliver a fresh app in a new directory, implement the repeatable workflow with
45
51
  buttons and agent handoffs, start its dev server, verify the main path, and
46
52
  continue through build/deployment handoff. Do not stop at a plan.
47
53
 
54
+ ## Fresh project context mode
55
+
56
+ When the source is a fresh Claude or ChatGPT Project, build a short source brief
57
+ before creating the app. Read the host-provided context in this order:
58
+
59
+ 1. Project instructions and configuration: goal, audience, constraints, output
60
+ standards, approved tools, and integration expectations. Treat these as
61
+ product configuration, not as a transcript.
62
+ 2. Knowledge files and attachments: read the relevant files fully, preserve
63
+ their provenance, and reduce them to bounded references, IDs, URLs, or
64
+ summaries for the new app. Do not copy secrets or large raw payloads into
65
+ prompts or SQL.
66
+ 3. Past runs or examples that are actually visible in the context: select at
67
+ most 1-3 successful, representative runs. Extract repeatable decisions and
68
+ review criteria. Treat one-off answers and private data as examples, not as
69
+ product behavior. If no runs are supplied, proceed from the instructions
70
+ and knowledge files and say that examples were not available.
71
+ 4. The current turn: use it for the requested app boundary, target workspace,
72
+ naming, and any explicit corrections.
73
+
74
+ Record the brief with these headings before handoff: source and provenance,
75
+ project goal, configuration and constraints, knowledge sources, repeatable
76
+ workflow, inputs and outputs, judgment and review points, representative runs,
77
+ integrations and permissions, and unknowns. This is the compact contract for
78
+ the app. It keeps the new app useful without pretending that hidden Project
79
+ history was imported. See [the fresh Project reference](references/fresh-project.md)
80
+ for the host setup and brief template.
81
+
82
+ If the visible Project context has no concrete repeatable job, ask for one
83
+ focused clarification or a representative artifact. Do not fall back to a
84
+ generic “what app do you want to make?” builder.
85
+
48
86
  ## Source selection guard
49
87
 
50
88
  The generated app must implement the concrete workflow found in the source. It
@@ -151,6 +189,14 @@ pnpm exec agent-native add-app <slug> --template=chat
151
189
  Do not use `create` for an existing workspace; it scaffolds a new standalone
152
190
  workspace rather than adding an app to the current one.
153
191
 
192
+ 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.
199
+
154
200
  Use a first-party template only when it materially fits the workflow. Keep the
155
201
  new app independent from the source thread's working tree unless the user
156
202
  explicitly asks to extend an existing app.
@@ -167,13 +213,20 @@ should make the repeated path obvious without hiding the agent's judgment:
167
213
  - Give each important repeated moment a clear button, such as “Analyze,”
168
214
  “Suggest options,” “Draft,” “Review,” or “Publish.” Use the source's actual
169
215
  vocabulary when it is clear.
170
- - Put deterministic reads, writes, approvals, and publishing in `actions/`
171
- with `defineAction`. The UI and agent must call the same action surface.
216
+ - Put deterministic reads, writes, approvals, provider fetches, and publishing
217
+ in focused `actions/` with `defineAction`. The UI and agent must call the
218
+ same action surface.
219
+ - If a workflow is framed as research, analysis, generation, recommendation,
220
+ or synthesis, start it in the AgentSidebar and let the agent orchestrate
221
+ those actions. Do not hide an AI-shaped multi-step workflow behind one
222
+ opaque action just because the implementation is deterministic.
172
223
  - Use application state for the current screen, selected item, and focused
173
224
  object so the agent can see where the user is.
174
- - Use `sendToAgentChat({ message, context, submit: true })` for intentional
175
- button-triggered agent work. Use `submit: false` when the user should review
176
- or edit the proposed prompt first.
225
+ - Use `sendToAgentChat({ message, context, submit: true, openSidebar: true })`
226
+ for intentional button-triggered agent work. Use `submit: false` when the
227
+ user should review or edit the proposed prompt in the AgentSidebar first.
228
+ Keep follow-up and revision prompts in that same thread; do not add a second
229
+ freeform textbox beside the result.
177
230
  - Pass IDs, URLs, and bounded summaries in context. Do not paste large provider
178
231
  dumps into prompts, call an LLM directly from the browser, or invent fake
179
232
  progress.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Turn Into App"
3
- short_description: "Turn a thread or skill into a runnable app"
4
- default_prompt: "Scan the current thread, turn the workflow into a new Agent-Native app with clear buttons, run it locally, verify it, and complete the deployment handoff."
3
+ short_description: "Turn project context or a workflow into a runnable app"
4
+ default_prompt: "Use the visible project context first, then any supplied workflow. Turn the instructions, knowledge files, and selected successful runs into a new Agent-Native app with clear buttons, run it locally, verify it, and complete the deployment handoff."
@@ -0,0 +1,64 @@
1
+ # Fresh Project source guide
2
+
3
+ Use this guide when `/turn-into-app` is invoked in a new Claude or ChatGPT
4
+ Project rather than after a completed thread.
5
+
6
+ ## What the host can provide
7
+
8
+ The source is whatever the host put in the model's current context:
9
+
10
+ - Project instructions: the job, audience, constraints, quality bar, and
11
+ approved tools or integrations.
12
+ - Knowledge files and attachments: reference material, templates, examples,
13
+ and links that the app should use.
14
+ - Past runs: only conversations or outputs the host actually supplied. They
15
+ are examples and evaluation material, not an automatic import of every
16
+ private Project conversation.
17
+ - The current request: the app boundary, target workspace, name, and explicit
18
+ corrections.
19
+
20
+ Do not infer hidden system prompts, account settings, private history, API keys,
21
+ or credentials. The Dispatch MCP connector can start a workspace app creation,
22
+ but it cannot unlock or scrape private Project content.
23
+
24
+ ## Source brief
25
+
26
+ Write a compact brief before starting the app:
27
+
28
+ ```text
29
+ Source: host-provided Claude/ChatGPT Project context
30
+ Provenance: project instructions, selected knowledge files, and visible runs
31
+ Project goal:
32
+ Configuration and constraints:
33
+ Knowledge sources:
34
+ Repeatable workflow:
35
+ Inputs and outputs:
36
+ Judgment and review points:
37
+ Representative runs: none, or 1-3 selected examples
38
+ Integrations and permissions:
39
+ Unknowns and follow-up:
40
+ ```
41
+
42
+ Keep source references bounded. Prefer a file name, URL, resource ID, or short
43
+ summary over a large pasted document. Do not put secrets or raw customer data
44
+ in the brief.
45
+
46
+ ## Fresh-box setup
47
+
48
+ Install the exported `turn-into-app` skill in the host when the host supports
49
+ skills. For a ChatGPT Project or any host that exposes only the MCP connector,
50
+ also place the skill instructions or this reference in the Project
51
+ instructions/knowledge files. Then add and authenticate the Dispatch MCP
52
+ connector from the packaged `adapters/chatgpt-mcp/connector.json`.
53
+
54
+ In a new Project chat, say:
55
+
56
+ ```text
57
+ Turn this project into an app. Use the visible Project instructions,
58
+ 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.
61
+ ```
62
+
63
+ If the host does not show the Project instructions or files to the model, stop
64
+ and request an export or attachment. Do not claim that the Project was read.
@@ -48,6 +48,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
48
48
  must not call model providers, AI SDK `generateText()` / `streamText()`, or
49
49
  other inline LLM APIs directly. Use `sendToAgentChat()` for local app-agent
50
50
  work, including hidden `context` and `submit: false` prefill/review flows.
51
+ Keep actions deterministic and focused. If a workflow is framed as research,
52
+ analysis, generation, recommendation, or synthesis, let the agent
53
+ orchestrate provider/data actions in the open AgentSidebar instead of hiding
54
+ the work in one opaque action or a separate follow-up textbox.
51
55
  Only use `useAgentChatContext`, `setAgentChatContextItem`,
52
56
  `listAgentChatContext`, `removeAgentChatContextItem`, and
53
57
  `clearAgentChatContext` when UI needs two-way sync with staged context chips.
@@ -117,6 +117,14 @@ contract:
117
117
  - Do not create pass-through routes whose main job is to call, repackage, or
118
118
  re-export an action.
119
119
 
120
+ Generated guidance must also distinguish deterministic tools from AI-shaped
121
+ workflows. Provider reads, validation, deterministic transforms, CRUD, and
122
+ persistence belong in focused actions. Research, analysis, generation,
123
+ recommendation, synthesis, and other user-steerable multi-step work should
124
+ start in the AgentSidebar and let the agent orchestrate those actions. State
125
+ that `sendToAgentChat({ openSidebar: true })` is the default handoff and that
126
+ follow-ups stay in the same thread; do not add a second freeform prompt box.
127
+
120
128
  ## Budget the first model request
121
129
 
122
130
  Treat the initial prompt and tool catalog as a latency budget. The agent should
@@ -31,8 +31,13 @@ agent should know.
31
31
 
32
32
  - All AI/LLM behavior goes through the app's agent chat. UI and server code must
33
33
  not call model providers or AI SDK `generateText()` / `streamText()` directly;
34
- use `sendToAgentChat()`. Read `.agents/skills/delegate-to-agent/SKILL.md`
35
- before building agent-driven UI or "AI" features.
34
+ use `sendToAgentChat()`. Keep actions deterministic and focused. If a
35
+ workflow is framed as research, analysis, generation, recommendation, or
36
+ synthesis, use `sendToAgentChat({ openSidebar: true })` to open the
37
+ AgentSidebar and let the agent orchestrate its provider/data actions. Keep
38
+ follow-ups in the same thread, not a second freeform textbox. Read
39
+ `.agents/skills/delegate-to-agent/SKILL.md` before building agent-driven UI or
40
+ "AI" features.
36
41
  - Keep domain workflows on named routes and preserve the scaffold's full-page
37
42
  chat route. Use the right `AgentSidebar` for contextual AI and open it when a
38
43
  domain button hands work to the agent.
@@ -50,6 +50,11 @@ refreshes framework-provided shared skills and repairs `CLAUDE.md` /
50
50
  must not call model providers, AI SDK `generateText()` / `streamText()`, or
51
51
  other inline LLM APIs directly. Use `sendToAgentChat()` for local app-agent
52
52
  work, including hidden `context` and `submit: false` prefill/review flows.
53
+ Keep actions deterministic and focused. If a workflow is framed as research,
54
+ analysis, generation, recommendation, or synthesis, use
55
+ `sendToAgentChat({ openSidebar: true })` to open the AgentSidebar and let the
56
+ agent orchestrate its provider/data actions. Keep follow-ups in the same
57
+ thread, not a second freeform textbox.
53
58
  Only use `useAgentChatContext`, `setAgentChatContextItem`,
54
59
  `listAgentChatContext`, `removeAgentChatContextItem`, and
55
60
  `clearAgentChatContext` when UI needs two-way sync with staged context chips.
@@ -1,5 +1,5 @@
1
1
  import { type DesignSystemTheme } from "@agent-native/toolkit/design-system/theme";
2
- import type { Plugin, UserConfig } from "vite";
2
+ import { type Plugin, type UserConfig } from "vite";
3
3
  import { type AgentNativeConfigInput } from "../config.js";
4
4
  import { type McpIntegrationsConfigInput } from "../shared/mcp-integration-config.js";
5
5
  import { type AgentNativeRouteWarmupConfigInput } from "../shared/route-warmup-config.js";
@@ -117,8 +117,8 @@ 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.config.ts` file. Explicit Vite options win over the JSON
121
- * file, while the file remains the default project-level source of truth.
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.
122
122
  */
123
123
  agentNativeConfig?: AgentNativeConfigInput;
124
124
  /**
@@ -4,6 +4,7 @@ import { createRequire, syncBuiltinESMExports } from "module";
4
4
  import path from "path";
5
5
  import { fileURLToPath, pathToFileURL } from "url";
6
6
  import { renderDesignSystemThemeCss, } from "@agent-native/toolkit/design-system/theme";
7
+ import { loadEnv, } from "vite";
7
8
  import { mergePendingChangelog, parsePendingEntry, } from "../changelog/parse.js";
8
9
  import { getViteDevRecoveryScript } from "../client/vite-dev-recovery-script.js";
9
10
  import { mergeAgentNativeConfigs, normalizeAgentNativeConfig, resolveAgentNativeConfig, } from "../config.js";
@@ -14,11 +15,13 @@ import { EMBED_SESSION_COOKIE, EMBED_TOKEN_QUERY_PARAM, MCP_APP_CHAT_BRIDGE_QUER
14
15
  import { isMcpEmbedCorsOrigin, MCP_EMBED_CORS_ALLOW_HEADERS, MCP_EMBED_STATIC_ASSET_HEADERS, mcpEmbedStaticAssetRouteRules, shouldAllowMcpEmbedCredentials, } from "../shared/mcp-embed-headers.js";
15
16
  import { normalizeMcpIntegrationsConfig, } from "../shared/mcp-integration-config.js";
16
17
  import { normalizeAgentNativeRouteWarmupConfig, } from "../shared/route-warmup-config.js";
18
+ import { formatRuntimeConfigReport, getRuntimeConfigReport, } from "../shared/runtime-config.js";
17
19
  import { actionTypesPlugin } from "./action-types-plugin.js";
18
20
  import { agentsBundlePlugin } from "./agents-bundle-plugin.js";
19
21
  const require = createRequire(import.meta.url);
20
22
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
21
23
  let nitroFsWatchGuardInstalled = false;
24
+ const emittedRuntimeConfigDiagnostics = new Set();
22
25
  function isFileWatchLimitError(error) {
23
26
  return error?.code === "EMFILE" || error?.code === "ENOSPC";
24
27
  }
@@ -2632,7 +2635,12 @@ function readAgentNativeJsonConfig(cwd) {
2632
2635
  return normalizeAgentNativeConfig(parsed, configPath);
2633
2636
  }
2634
2637
  async function loadAgentNativeConfigFile(cwd) {
2635
- const candidates = ["agent-native.config.ts", "agent-native.config.mts"];
2638
+ const candidates = [
2639
+ "agent-native.ts",
2640
+ "agent-native.mts",
2641
+ "agent-native.config.ts",
2642
+ "agent-native.config.mts",
2643
+ ];
2636
2644
  const configPath = candidates
2637
2645
  .map((filename) => path.join(cwd, filename))
2638
2646
  .find((candidate) => fs.existsSync(candidate));
@@ -2650,6 +2658,36 @@ async function loadAgentNativeConfigFile(cwd) {
2650
2658
  throw new Error(`Could not load ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
2651
2659
  }
2652
2660
  }
2661
+ function reportRuntimeConfigDiagnostics(appConfig, context, mode, env = process.env) {
2662
+ const production = mode === "production" || process.env.NODE_ENV === "production";
2663
+ if (!production)
2664
+ return;
2665
+ const report = getRuntimeConfigReport(env, {
2666
+ authEnabled: appConfig.runtime?.auth?.enabled,
2667
+ databaseRequired: appConfig.runtime?.database?.required,
2668
+ requiredEnv: appConfig.runtime?.environment?.required,
2669
+ }, {
2670
+ environment: "production",
2671
+ phase: context.isBuild ? "build" : "runtime",
2672
+ appName: process.env.APP_NAME,
2673
+ });
2674
+ if (report.issues.length === 0)
2675
+ return;
2676
+ const key = [
2677
+ process.cwd(),
2678
+ context.command,
2679
+ mode,
2680
+ report.issues.map((issue) => `${issue.code}:${issue.severity}`).join(","),
2681
+ ].join("|");
2682
+ if (emittedRuntimeConfigDiagnostics.has(key))
2683
+ return;
2684
+ emittedRuntimeConfigDiagnostics.add(key);
2685
+ const message = formatRuntimeConfigReport(report);
2686
+ if (context.isBuild && appConfig.diagnostics?.failOnBuild === true) {
2687
+ throw new Error(message);
2688
+ }
2689
+ console.warn(message);
2690
+ }
2653
2691
  function createAgentNativeConfig(options = {}, command, userConfig = {}, mode = process.env.NODE_ENV === "production" ? "production" : "development", projectConfig) {
2654
2692
  const cwd = process.cwd();
2655
2693
  const configContext = createAgentNativeConfigContext(command, mode);
@@ -2684,6 +2722,14 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
2684
2722
  }
2685
2723
  catch { }
2686
2724
  }
2725
+ const runtimeEnv = {
2726
+ ...(workspaceRoot && workspaceRoot !== cwd
2727
+ ? loadEnv(mode, workspaceRoot, "")
2728
+ : {}),
2729
+ ...loadEnv(mode, cwd, ""),
2730
+ ...process.env,
2731
+ };
2732
+ reportRuntimeConfigDiagnostics(appConfig, configContext, mode, runtimeEnv);
2687
2733
  const { base } = getConfiguredAppBasePath();
2688
2734
  const isWorkspaceChild = process.env.AGENT_NATIVE_WORKSPACE === "1";
2689
2735
  const monorepoPackageAllow = [
@@ -1,5 +1,5 @@
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 AgentNativeFirstRunOnboardingMode, type AgentNativeFirstRunOnboardingSetting, } from "../config.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";
3
3
  export type { AgentNativeRouteWarmupConfigInput, AgentNativeRouteWarmupResolvedConfig, AgentNativeRouteWarmupStrategy, } from "../shared/route-warmup-config.js";
4
4
  export { actionTypesPlugin, generateActionRegistryForProject, } from "./action-types-plugin.js";
5
5
  export { agentsBundlePlugin } from "./agents-bundle-plugin.js";