@agent-native/core 0.145.8 → 0.146.1

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 (155) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +41 -11
  3. package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  4. package/corpus/templates/analytics/actions/compose-dashboard.ts +2 -27
  5. package/corpus/templates/analytics/actions/get-sql-dashboard.ts +18 -3
  6. package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +75 -24
  7. package/corpus/templates/analytics/actions/mutate-dashboard.ts +16 -24
  8. package/corpus/templates/analytics/actions/rename-dashboard.ts +2 -24
  9. package/corpus/templates/analytics/actions/reorder-dashboard-panels.ts +2 -24
  10. package/corpus/templates/analytics/actions/restore-dashboard-revision.ts +2 -25
  11. package/corpus/templates/analytics/actions/update-dashboard.ts +4 -32
  12. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -40
  13. package/corpus/templates/analytics/changelog/2026-08-07-analytics-migrations-now-use-bounded-pressure-aware-backgrou.md +6 -0
  14. package/corpus/templates/analytics/changelog/2026-08-07-language-selection-now-lives-in-settings-instead-of-the-comm.md +6 -0
  15. package/corpus/templates/analytics/changelog/2026-08-07-template-activity-charts-now-show-only-core-agent-native-app.md +6 -0
  16. package/corpus/templates/analytics/netlify.toml +7 -0
  17. package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +110 -0
  18. package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +450 -0
  19. package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +2 -2
  20. package/corpus/templates/analytics/server/lib/analytics-rollup-lock.ts +4 -5
  21. package/corpus/templates/analytics/server/lib/dashboard-collab-sync.ts +77 -0
  22. package/corpus/templates/analytics/server/lib/demo-dashboards.ts +2 -23
  23. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +10 -4
  24. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -11
  25. package/corpus/templates/analytics/server/plugins/analytics-rollup-backfill-jobs.ts +2 -5
  26. package/corpus/templates/analytics/server/plugins/db.ts +42 -0
  27. package/corpus/templates/analytics/server/routes/api/analytics-bigquery/backfill.post.ts +55 -0
  28. package/corpus/templates/analytics/server/routes/api/dashboard-agent-context.json.get.ts +18 -4
  29. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +41 -11
  30. package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  31. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +41 -11
  32. package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  33. package/corpus/templates/brain/server/lib/connectors.ts +38 -14
  34. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +41 -11
  35. package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  36. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +41 -11
  37. package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  38. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +41 -11
  39. package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  40. package/corpus/templates/clips/app/components/player/video-player.tsx +1 -1
  41. package/corpus/templates/clips/changelog/2026-08-07-fixed-trimmed-clips-durations-so-the-main-player-display-mat.md +6 -0
  42. package/corpus/templates/clips/chrome-extension/STORE_DRAFT.md +1 -1
  43. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
  44. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +41 -11
  45. package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  46. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +41 -11
  47. package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  48. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +41 -11
  49. package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  50. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +41 -11
  51. package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  52. package/corpus/templates/dispatch/changelog/2026-08-07-language-selection-now-lives-in-settings-instead-of-the-disp.md +6 -0
  53. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +41 -11
  54. package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  55. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +59 -22
  56. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +41 -11
  57. package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  58. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +41 -11
  59. package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  60. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +41 -11
  61. package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  62. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +41 -11
  63. package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  64. package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +10 -1
  65. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +10 -3
  66. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +41 -11
  67. package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  68. package/corpus/templates/slides/actions/generate-image-api.ts +123 -0
  69. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +10 -2
  70. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +13 -0
  71. package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +5 -0
  72. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +1 -1
  73. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +5 -0
  74. package/corpus/templates/slides/app/components/presentation/PresenterView.tsx +5 -0
  75. package/corpus/templates/slides/app/pages/DeckEditor.tsx +3 -0
  76. package/corpus/templates/slides/app/pages/Presentation.tsx +3 -0
  77. package/corpus/templates/slides/app/pages/SharedPresentation.tsx +5 -0
  78. package/corpus/templates/slides/app/routes/slide.tsx +10 -5
  79. package/corpus/templates/slides/changelog/2026-08-07-deleting-a-deck-no-longer-freezes-the-slides-browser.md +6 -0
  80. package/corpus/templates/slides/changelog/2026-08-07-slide-previews-and-present-now-keep-deck-colors-consistent.md +6 -0
  81. package/corpus/templates/slides/changelog/2026-08-07-slides-verify-generated-images-are-persisted-on-the-target-s.md +6 -0
  82. package/corpus/templates/slides/server/db/schema.ts +1 -0
  83. package/corpus/templates/slides/server/handlers/share.ts +51 -3
  84. package/corpus/templates/slides/server/lib/slide-image-insertion.ts +141 -0
  85. package/corpus/templates/slides/server/plugins/agent-chat.ts +2 -0
  86. package/corpus/templates/slides/server/plugins/db.ts +5 -0
  87. package/corpus/templates/slides/shared/api.ts +2 -0
  88. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +41 -11
  89. package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  90. package/dist/cli/code-agent-executor.js +8 -3
  91. package/dist/client/AgentPanel.d.ts +10 -4
  92. package/dist/client/AgentPanel.js +29 -82
  93. package/dist/client/ConnectBuilderCard.d.ts +7 -7
  94. package/dist/client/ConnectBuilderCard.js +45 -20
  95. package/dist/collab/awareness.d.ts +2 -2
  96. package/dist/config.d.ts +9 -2
  97. package/dist/config.js +38 -2
  98. package/dist/db/client.d.ts +13 -1
  99. package/dist/db/client.js +76 -2
  100. package/dist/db/create-get-db.js +2 -2
  101. package/dist/db/migrations.js +22 -4
  102. package/dist/deploy/build.d.ts +1 -0
  103. package/dist/deploy/build.js +32 -23
  104. package/dist/notifications/routes.d.ts +3 -3
  105. package/dist/progress/routes.d.ts +1 -1
  106. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  107. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  108. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  109. package/dist/scripts/docs/search.js +3 -2
  110. package/dist/server/agent-chat/prompt-resources.js +4 -3
  111. package/dist/server/agents-bundle.d.ts +20 -3
  112. package/dist/server/agents-bundle.js +57 -30
  113. package/dist/server/better-auth-instance.js +2 -2
  114. package/dist/server/builder-browser.d.ts +34 -0
  115. package/dist/server/builder-browser.js +179 -0
  116. package/dist/server/core-routes-plugin.d.ts +5 -0
  117. package/dist/server/core-routes-plugin.js +24 -8
  118. package/dist/server/index.d.ts +1 -1
  119. package/dist/server/index.js +1 -1
  120. package/dist/shared/cache-control.d.ts +2 -2
  121. package/dist/shared/cache-control.js +2 -2
  122. package/dist/shared/runtime-config.js +1 -1
  123. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +41 -11
  124. package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  125. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +41 -11
  126. package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  127. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +41 -11
  128. package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  129. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +41 -11
  130. package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  131. package/dist/vite/agent-native-config-loader.d.ts +10 -0
  132. package/dist/vite/agent-native-config-loader.js +56 -0
  133. package/dist/vite/agents-bundle-plugin.d.ts +5 -1
  134. package/dist/vite/agents-bundle-plugin.js +29 -6
  135. package/dist/vite/client.d.ts +4 -2
  136. package/dist/vite/client.js +17 -50
  137. package/dist/vite/index.d.ts +2 -2
  138. package/dist/vite/index.js +1 -1
  139. package/docs/content/agent-native-config.mdx +43 -17
  140. package/docs/content/drop-in-agent.mdx +3 -3
  141. package/docs/content/environment-variables.mdx +1 -1
  142. package/docs/content/getting-started-actions.mdx +1 -2
  143. package/docs/content/getting-started-pages.mdx +1 -2
  144. package/docs/content/getting-started.mdx +0 -4
  145. package/docs/content/what-is-agent-native.mdx +4 -4
  146. package/package.json +1 -1
  147. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +41 -11
  148. package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  149. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +41 -11
  150. package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  151. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +41 -11
  152. package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  153. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +41 -11
  154. package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +21 -2
  155. package/docs/content/getting-started-database.mdx +0 -173
@@ -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));
@@ -2405,9 +2406,17 @@ function getConfiguredAppBasePath() {
2405
2406
  return { appBasePath, base };
2406
2407
  }
2407
2408
  function createNitroDevPlugin(options, appBasePath) {
2409
+ const nitroOptions = options.nitro ?? {};
2408
2410
  return nitroVitePlugin({
2409
2411
  serverDir: "./server",
2410
- ...(options.nitro ?? {}),
2412
+ ...nitroOptions,
2413
+ replace: {
2414
+ ...nitroOptions.replace,
2415
+ // Netlify's netlify.toml environment is available to the build but not
2416
+ // injected into deployed Functions. Nitro is a separate server build,
2417
+ // so it needs the release ownership decision in its own replacement map.
2418
+ "process.env.AGENT_NATIVE_RELEASE_MIGRATIONS": JSON.stringify(process.env.AGENT_NATIVE_RELEASE_MIGRATIONS?.trim() || ""),
2419
+ },
2411
2420
  // Never auto-load test files as server handlers/plugins/middleware.
2412
2421
  // Nitro scans server/{plugins,middleware,routes,api}/*; a co-located
2413
2422
  // *.spec.ts would otherwise be loaded at runtime and crash the server
@@ -2568,7 +2577,7 @@ function createAgentNativePlugins(options, { command, includeReactTransform, use
2568
2577
  ...userPlugins,
2569
2578
  appChangelogRawPlugin(),
2570
2579
  actionTypesPlugin(),
2571
- agentsBundlePlugin(),
2580
+ agentsBundlePlugin({ agentNativeConfig: options.agentNativeConfig }),
2572
2581
  autoReloadOnOptimizeDep(),
2573
2582
  fullReloadOnOptimizeDep504(),
2574
2583
  embedDevFrameHeaders(),
@@ -2612,52 +2621,6 @@ function resolveAgentNativeTemplate(cwd) {
2612
2621
  ?.trim()
2613
2622
  .toLowerCase() ?? "");
2614
2623
  }
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
2624
  function reportRuntimeConfigDiagnostics(appConfig, context, mode, env = process.env) {
2662
2625
  const production = mode === "production" || process.env.NODE_ENV === "production";
2663
2626
  if (!production)
@@ -2784,6 +2747,10 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}, mode =
2784
2747
  __AGENT_NATIVE_APP_CONFIG__: JSON.stringify(appConfig),
2785
2748
  __AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID__: JSON.stringify(process.env.GA_MEASUREMENT_ID?.trim() || ""),
2786
2749
  "process.env.AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID": JSON.stringify(process.env.GA_MEASUREMENT_ID?.trim() || ""),
2750
+ // The release migration owner is configured at build time. Netlify's
2751
+ // netlify.toml environment is available to the build but not injected
2752
+ // into deployed Functions, so embed the decision in the server bundle.
2753
+ "process.env.AGENT_NATIVE_RELEASE_MIGRATIONS": JSON.stringify(process.env.AGENT_NATIVE_RELEASE_MIGRATIONS?.trim() || ""),
2787
2754
  __AGENT_NATIVE_BUILD_GTM_CONTAINER_ID__: JSON.stringify(process.env.GTM_CONTAINER_ID?.trim() || ""),
2788
2755
  "process.env.AGENT_NATIVE_BUILD_GTM_CONTAINER_ID": JSON.stringify(process.env.GTM_CONTAINER_ID?.trim() || ""),
2789
2756
  // Framework route warmup controls how SSR `.data` routes are fetched:
@@ -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.
@@ -142,11 +142,11 @@ children stays in the main app area. The agent chat is the side panel.
142
142
  ]}
143
143
  />
144
144
 
145
- That's it. The user now has a toggleable agent on every page — with chat history, resources tab, CLI terminal, voice input, and a fullscreen mode. State persists across reloads via `localStorage`.
145
+ That's it. The user now has a toggleable agent on every page — with chat history, resources tab, CLI terminal, voice input, and a wider drawer. State persists across reloads via `localStorage`.
146
146
 
147
147
  ### Props
148
148
 
149
- - **`children`** — your app's normal layout and routes. Rendered in the main area; the agent panel mounts beside it on desktop and over it on mobile/fullscreen.
149
+ - **`children`** — your app's normal layout and routes. Rendered in the main area; the agent panel mounts beside it on desktop and over it on mobile.
150
150
  - **`emptyStateText`** — greeting shown when the chat has no messages. Default: `"How can I help you?"`.
151
151
  - **`suggestions`** — starter prompts rendered as clickable chips when empty.
152
152
  - **`dynamicSuggestions`** — context-aware prompt chips merged with `suggestions`. Enabled by default; pass `false` to show only static suggestions, or `{ max, includeStatic, getSuggestions }` to customize.
@@ -177,7 +177,7 @@ export default function AgentRoute() {
177
177
  - **`defaultMode`** — `"chat"` or `"cli"`. Default: `"chat"`.
178
178
  - **`className`** — CSS class for the outer container.
179
179
  - **`onCollapse`** — if provided, a collapse button appears in the header.
180
- - **`isFullscreen`** / **`onToggleFullscreen`** — wire up external fullscreen state if you want a Claude-style centered column.
180
+ - **`isFullscreen`** — set this when you want a Claude-style centered column for a page-level or custom panel surface. The sidebar uses the wider drawer instead.
181
181
  - **`storageKey`** — namespace for `localStorage` keys. Useful when you render multiple panels (different app instances or workspaces) in the same page.
182
182
 
183
183
  Full props: `AgentPanelProps` in `@agent-native/core/client`.
@@ -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
 
@@ -89,5 +89,4 @@ custom native components, see [Native Chat UI](/docs/native-chat-ui).
89
89
  ## Continue
90
90
 
91
91
  Continue with [Add a Page](/docs/getting-started-pages) to use the same action
92
- outside the transcript. When results need to survive conversations, return to
93
- [Persist Data in SQL](/docs/getting-started-database).
92
+ outside the transcript.
@@ -71,6 +71,5 @@ patterns, see [Context Awareness](/docs/context-awareness).
71
71
  ## Continue
72
72
 
73
73
  You've built a chat app with an action and a page that calls the same source of
74
- truth. Continue with [Persist Data in SQL](/docs/getting-started-database) when
75
- results need to persist, or explore [Key Concepts](/docs/key-concepts) and
74
+ truth. Continue with [Key Concepts](/docs/key-concepts) or
76
75
  [Agent Surfaces](/docs/agent-surfaces).
@@ -26,10 +26,6 @@ Define a typed text analyzer and render its result as a chart in the chat.
26
26
 
27
27
  Build a React route that calls the same action outside the transcript.
28
28
 
29
- ### Persist data in SQL (optional)
30
-
31
- Add a table and persistence actions when results need to survive conversations.
32
-
33
29
  </Steps>
34
30
 
35
31
  ## 1. Create a chat app {#create-your-app}
@@ -79,10 +79,10 @@ Every operation is defined as a typed **action**: a name, a schema, and a `run`
79
79
 
80
80
  ```mermaid
81
81
  graph TD
82
- UI_IN["👤 Click a button"]
83
- AG_IN["🤖 Type a message to the agent"]
84
- ACTION["⚡ Same typed action"]
85
- DB["🗄️ Shared database"]
82
+ UI_IN["Click a button"]
83
+ AG_IN["Type a message to the agent"]
84
+ ACTION["Same typed action"]
85
+ DB["Shared database"]
86
86
  UI_OUT["UI updates instantly"]
87
87
  AG_OUT["Agent sees the change"]
88
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.145.8",
3
+ "version": "0.146.1",
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": {
@@ -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,36 @@ 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
+ - Connect the Agent-Native Dispatch MCP connector only. Dispatch uses the
31
+ authenticated Builder Projects API to reuse or provision the workspace
32
+ project before starting the Builder Cloud Agent; a separate Builder CMS MCP
33
+ connection is not required for this workflow.
34
+ - If `start-workspace-app-creation` is not available or Dispatch is not
35
+ authenticated, stop with the connector setup needed. Do not fall back to a
36
+ local build or claim that the app exists.
37
+ - In Claude Code, Codex Code, or another local code-agent runtime with a target
38
+ workspace, follow the local implementation steps below. The local agent may
39
+ scaffold, edit, run, and verify the app there.
40
+
16
41
  ## Default behavior
17
42
 
18
- This is an end-to-end build skill, not a request for an app proposal.
43
+ For a local code-agent runtime this is an end-to-end build skill, not a request
44
+ for an app proposal. For an online host, the end-to-end result is a verified
45
+ Builder handoff and the resulting workspace app, not code written in the host.
19
46
 
20
47
  - With no argument, choose the source in this order: visible project context,
21
48
  then the current thread. A fresh Claude or ChatGPT Project is a valid source
@@ -47,9 +74,12 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
47
74
  page. If the needed context is not visible, ask for an export, transcript, or
48
75
  attachment and treat that artifact as imported source material.
49
76
 
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.
77
+ For local code-agent runtimes, deliver a fresh app in a new directory,
78
+ implement the repeatable workflow with buttons and agent handoffs, start its dev
79
+ server, verify the main path, and continue through build/deployment handoff. Do
80
+ not stop at a plan. For online hosts, call Dispatch first after the source brief,
81
+ then report the returned Builder branch/path and verify the workspace app through
82
+ Dispatch when it becomes available.
53
83
 
54
84
  ## Fresh project context mode
55
85
 
@@ -190,12 +220,12 @@ Do not use `create` for an existing workspace; it scaffolds a new standalone
190
220
  workspace rather than adding an app to the current one.
191
221
 
192
222
  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.
223
+ workspace, the online host path is mandatory: after writing the source brief,
224
+ call `start-workspace-app-creation` with a concise prompt, the inferred app id,
225
+ and the brief's repeatable workflow. Pass selected workspace resource IDs when
226
+ they are available, rather than pasting entire knowledge files. Continue from
227
+ the returned workspace path or Builder branch handoff and report the actual
228
+ verification result. Do not run the local scaffold commands in this host mode.
199
229
 
200
230
  Use a first-party template only when it materially fits the workflow. Keep the
201
231
  new app independent from the source thread's working tree unless the user