@agent-native/core 0.165.3 → 0.167.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/secrets/SKILL.md +5 -1
  3. package/corpus/templates/analytics/.agents/skills/workspace-conventions/SKILL.md +4 -1
  4. package/corpus/templates/analytics/CHANGELOG.md +740 -2
  5. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +93 -56
  6. package/corpus/templates/analytics/app/i18n-data.ts +23 -20
  7. package/corpus/templates/analytics/app/pages/Settings.tsx +0 -1
  8. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +0 -1
  9. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
  10. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +2 -1
  11. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -1
  12. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +0 -32
  13. package/corpus/templates/analytics/server/lib/session-replay.ts +1 -5
  14. package/corpus/templates/assets/.agents/skills/secrets/SKILL.md +5 -1
  15. package/corpus/templates/assets/.agents/skills/workspace-conventions/SKILL.md +4 -1
  16. package/corpus/templates/assets/CHANGELOG.md +204 -2
  17. package/corpus/templates/assets/actions/navigate.ts +2 -2
  18. package/corpus/templates/assets/actions/save-generated-image.ts +0 -5
  19. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -262
  20. package/corpus/templates/assets/app/routes/library.tsx +1 -1
  21. package/corpus/templates/assets/app/routes/settings.tsx +0 -3
  22. package/corpus/templates/brain/.agents/skills/secrets/SKILL.md +5 -1
  23. package/corpus/templates/brain/.agents/skills/workspace-conventions/SKILL.md +4 -1
  24. package/corpus/templates/brain/CHANGELOG.md +145 -2
  25. package/corpus/templates/brain/actions/ask-brain.ts +0 -1
  26. package/corpus/templates/brain/actions/navigate.ts +2 -2
  27. package/corpus/templates/brain/app/routes/sources.tsx +0 -4
  28. package/corpus/templates/brain/server/lib/capture-sanitization.ts +0 -11
  29. package/corpus/templates/calendar/.agents/skills/secrets/SKILL.md +5 -1
  30. package/corpus/templates/calendar/.agents/skills/workspace-conventions/SKILL.md +4 -1
  31. package/corpus/templates/calendar/CHANGELOG.md +272 -2
  32. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +0 -20
  33. package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -1
  34. package/corpus/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  35. package/corpus/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  36. package/corpus/templates/chat/CHANGELOG.md +89 -2
  37. package/corpus/templates/chat/actions/navigate.ts +2 -2
  38. package/corpus/templates/clips/.agents/skills/secrets/SKILL.md +5 -1
  39. package/corpus/templates/clips/.agents/skills/workspace-conventions/SKILL.md +4 -1
  40. package/corpus/templates/clips/CHANGELOG.md +865 -2
  41. package/corpus/templates/clips/actions/import-loom-recording.ts +16 -4
  42. package/corpus/templates/clips/actions/navigate.ts +2 -2
  43. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +0 -1
  44. package/corpus/templates/clips/app/components/library/space-dialogs.tsx +0 -1
  45. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +0 -1
  46. package/corpus/templates/clips/app/components/player/clips-share-trigger.tsx +17 -0
  47. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +3 -3
  48. package/corpus/templates/clips/app/components/player/video-player.tsx +2 -2
  49. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +0 -1
  50. package/corpus/templates/clips/app/components/settings/ai-setup-section.tsx +0 -1
  51. package/corpus/templates/clips/app/global.css +31 -0
  52. package/corpus/templates/clips/app/hooks/use-playback-position.ts +0 -2
  53. package/corpus/templates/clips/app/lib/download-release-channel.ts +10 -0
  54. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +1 -3
  55. package/corpus/templates/clips/app/routes/download.tsx +67 -44
  56. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -12
  57. package/corpus/templates/clips/app/routes/record.tsx +6 -6
  58. package/corpus/templates/clips/app/routes/share.$shareId.tsx +26 -29
  59. package/corpus/templates/clips/changelog/2026-08-20-clip-viewer-share-actions.md +6 -0
  60. package/corpus/templates/clips/changelog/2026-08-20-preparing-recording-countdown-overlay.md +6 -0
  61. package/corpus/templates/clips/chrome-extension/src/background.ts +0 -13
  62. package/corpus/templates/clips/chrome-extension/src/overlay.ts +0 -1
  63. package/corpus/templates/clips/chrome-extension/src/popup.ts +0 -20
  64. package/corpus/templates/clips/desktop/src/app.tsx +6 -18
  65. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +0 -1
  66. package/corpus/templates/clips/desktop/src/lib/recorder.ts +0 -8
  67. package/corpus/templates/clips/desktop/src/overlays/preparing.tsx +4 -6
  68. package/corpus/templates/clips/desktop/src/styles.css +18 -20
  69. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +9 -17
  70. package/corpus/templates/content/.agents/skills/secrets/SKILL.md +5 -1
  71. package/corpus/templates/content/.agents/skills/workspace-conventions/SKILL.md +4 -1
  72. package/corpus/templates/content/CHANGELOG.md +503 -2
  73. package/corpus/templates/content/actions/_database-source-utils.ts +0 -3
  74. package/corpus/templates/content/actions/attach-content-database-source.ts +1 -4
  75. package/corpus/templates/content/actions/navigate.ts +2 -2
  76. package/corpus/templates/content/actions/prepare-builder-source-execution.ts +1 -1
  77. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +0 -6
  78. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +0 -580
  79. package/corpus/templates/content/app/components/editor/database/FormView.tsx +2 -2
  80. package/corpus/templates/content/app/components/editor/database/filter-sort.ts +1 -1
  81. package/corpus/templates/content/app/components/editor/database/settings.tsx +0 -23
  82. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +0 -1
  83. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +8 -304
  84. package/corpus/templates/content/app/hooks/use-documents.ts +0 -1
  85. package/corpus/templates/content/shared/api.ts +0 -1
  86. package/corpus/templates/content/shared/builder-mdx.ts +0 -1
  87. package/corpus/templates/content/shared/nfm.ts +1 -7
  88. package/corpus/templates/crm/.agents/skills/secrets/SKILL.md +5 -1
  89. package/corpus/templates/crm/.agents/skills/workspace-conventions/SKILL.md +4 -1
  90. package/corpus/templates/crm/CHANGELOG.md +31 -2
  91. package/corpus/templates/crm/actions/merge-crm-records.ts +0 -4
  92. package/corpus/templates/crm/app/components/crm/record/RecordLists.tsx +0 -1
  93. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1
  94. package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1
  95. package/corpus/templates/crm/server/db/crm-store.ts +1 -1
  96. package/corpus/templates/design/.agents/skills/secrets/SKILL.md +5 -1
  97. package/corpus/templates/design/.agents/skills/workspace-conventions/SKILL.md +4 -1
  98. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -14
  99. package/corpus/templates/design/AGENTS.md +2 -1
  100. package/corpus/templates/design/CHANGELOG.md +870 -2
  101. package/corpus/templates/design/actions/apply-component-prop-edit.ts +1 -5
  102. package/corpus/templates/design/actions/generate-design.ts +0 -1
  103. package/corpus/templates/design/actions/generate-screens.ts +5 -2
  104. package/corpus/templates/design/actions/go-to-main-component.ts +2 -2
  105. package/corpus/templates/design/actions/list-design-systems.ts +10 -0
  106. package/corpus/templates/design/actions/navigate.ts +2 -2
  107. package/corpus/templates/design/actions/open-component-source.ts +4 -4
  108. package/corpus/templates/design/actions/present-design-variants.ts +1 -2
  109. package/corpus/templates/design/actions/run-design-audit.ts +0 -22
  110. package/corpus/templates/design/actions/show-design-questions.ts +5 -2
  111. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +19 -8
  112. package/corpus/templates/design/app/components/design/EditPanel.tsx +11 -183
  113. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +21 -4
  114. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -5
  115. package/corpus/templates/design/app/components/design/bridge/codegen.ts +1 -1
  116. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +10 -19
  117. package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
  118. package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +13 -3
  119. package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +38 -32
  120. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -4
  121. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +0 -4
  122. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
  123. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +2 -2
  124. package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +0 -1
  125. package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1 -1
  126. package/corpus/templates/design/app/i18n-data.ts +122 -0
  127. package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +11 -1
  128. package/corpus/templates/design/app/pages/DesignEditor.tsx +50 -254
  129. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +163 -8
  130. package/corpus/templates/design/app/pages/Index.tsx +17 -0
  131. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +44 -32
  132. package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +10 -0
  133. package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +49 -3
  134. package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +31 -0
  135. package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +28 -0
  136. package/corpus/templates/design/app/pages/design-editor/commands/add-auto-layout.ts +3 -3
  137. package/corpus/templates/design/app/pages/design-editor/commands/align-selection.ts +44 -14
  138. package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +16 -5
  139. package/corpus/templates/design/app/pages/design-editor/commands/change-selected-z-index.ts +1 -1
  140. package/corpus/templates/design/app/pages/design-editor/commands/frame-selection.ts +1 -1
  141. package/corpus/templates/design/app/pages/design-editor/commands/group-selection.ts +1 -1
  142. package/corpus/templates/design/app/pages/design-editor/commands/nudge-selection.ts +1 -1
  143. package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +142 -17
  144. package/corpus/templates/design/app/pages/design-editor/commands/screen-visual-duplicate-change.ts +1 -0
  145. package/corpus/templates/design/app/pages/design-editor/commands/ungroup-selection.ts +1 -1
  146. package/corpus/templates/design/app/pages/design-editor/commands/visual-duplicate-change.ts +1 -0
  147. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +25 -9
  148. package/corpus/templates/design/app/pages/design-editor/editor-state.ts +1 -0
  149. package/corpus/templates/design/app/pages/design-editor/measure-child-rects.ts +83 -0
  150. package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +66 -0
  151. package/corpus/templates/design/server/routes/[...page].get.ts +0 -1
  152. package/corpus/templates/design/shared/code-layer.ts +120 -70
  153. package/corpus/templates/design/shared/design-surface-index.ts +0 -1
  154. package/corpus/templates/design/shared/pen-path.ts +0 -4
  155. package/corpus/templates/dispatch/.agents/skills/secrets/SKILL.md +5 -1
  156. package/corpus/templates/dispatch/.agents/skills/workspace-conventions/SKILL.md +4 -1
  157. package/corpus/templates/dispatch/CHANGELOG.md +196 -2
  158. package/corpus/templates/dispatch/app/routes/integrations.tsx +0 -109
  159. package/corpus/templates/factory/.agents/skills/secrets/SKILL.md +5 -1
  160. package/corpus/templates/factory/.agents/skills/workspace-conventions/SKILL.md +4 -1
  161. package/corpus/templates/factory/CHANGELOG.md +121 -2
  162. package/corpus/templates/factory/actions/navigate.ts +2 -2
  163. package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +0 -13
  164. package/corpus/templates/factory/app/routes/factory.tsx +0 -1
  165. package/corpus/templates/factory/server/factory-graph/store.ts +0 -1
  166. package/corpus/templates/forms/.agents/skills/secrets/SKILL.md +5 -1
  167. package/corpus/templates/forms/.agents/skills/workspace-conventions/SKILL.md +4 -1
  168. package/corpus/templates/forms/CHANGELOG.md +166 -2
  169. package/corpus/templates/macros/.agents/skills/secrets/SKILL.md +5 -1
  170. package/corpus/templates/macros/.agents/skills/workspace-conventions/SKILL.md +4 -1
  171. package/corpus/templates/macros/CHANGELOG.md +49 -2
  172. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -1
  173. package/corpus/templates/mail/.agents/skills/secrets/SKILL.md +5 -1
  174. package/corpus/templates/mail/.agents/skills/workspace-conventions/SKILL.md +4 -1
  175. package/corpus/templates/mail/CHANGELOG.md +201 -2
  176. package/corpus/templates/mail/app/components/email/EmailList.tsx +0 -1
  177. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
  178. package/corpus/templates/mail/shared/markdown.ts +3 -0
  179. package/corpus/templates/plan/.agents/skills/secrets/SKILL.md +5 -1
  180. package/corpus/templates/plan/.agents/skills/workspace-conventions/SKILL.md +4 -1
  181. package/corpus/templates/plan/CHANGELOG.md +277 -2
  182. package/corpus/templates/slides/.agents/skills/secrets/SKILL.md +5 -1
  183. package/corpus/templates/slides/.agents/skills/workspace-conventions/SKILL.md +4 -1
  184. package/corpus/templates/slides/CHANGELOG.md +437 -2
  185. package/corpus/templates/slides/actions/add-slide.ts +0 -1
  186. package/corpus/templates/slides/actions/list-decks.ts +1 -1
  187. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -4
  188. package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +0 -1
  189. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -1
  190. package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -6
  191. package/corpus/templates/tasks/.agents/skills/secrets/SKILL.md +5 -1
  192. package/corpus/templates/tasks/.agents/skills/workspace-conventions/SKILL.md +4 -1
  193. package/corpus/templates/tasks/CHANGELOG.md +32 -2
  194. package/corpus/templates/tasks/app/components/layout/Layout.tsx +0 -1
  195. package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +1 -4
  196. package/corpus/templates/tasks/server/custom-fields/store.ts +1 -6
  197. package/corpus/templates/tasks/shared/list-screen-snapshot.ts +2 -2
  198. package/dist/agent/engine/registry.js +27 -14
  199. package/dist/agent/index.d.ts +1 -1
  200. package/dist/agent/production-agent.d.ts +19 -6
  201. package/dist/agent/production-agent.js +57 -16
  202. package/dist/agent/types.d.ts +3 -0
  203. package/dist/changelog/parse.d.ts +3 -3
  204. package/dist/changelog/parse.js +35 -16
  205. package/dist/client/EnvironmentBadge.d.ts +1 -0
  206. package/dist/client/EnvironmentBadge.js +7 -0
  207. package/dist/collab/awareness.d.ts +2 -2
  208. package/dist/collab/routes.d.ts +1 -1
  209. package/dist/collab/struct-routes.d.ts +1 -1
  210. package/dist/config.d.ts +11 -0
  211. package/dist/config.js +248 -0
  212. package/dist/deploy/build.js +12 -1
  213. package/dist/index.d.ts +1 -1
  214. package/dist/notifications/routes.d.ts +3 -3
  215. package/dist/observability/routes.d.ts +6 -6
  216. package/dist/resources/handlers.d.ts +2 -2
  217. package/dist/secrets/routes.d.ts +9 -9
  218. package/dist/server/agent-chat/plugin-options.d.ts +3 -2
  219. package/dist/server/agent-chat-plugin.js +5 -2
  220. package/dist/server/index.d.ts +1 -1
  221. package/dist/server/realtime-token.d.ts +1 -1
  222. package/dist/server/transcribe-voice.d.ts +1 -1
  223. package/dist/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  224. package/dist/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  225. package/dist/templates/chat/CHANGELOG.md +89 -2
  226. package/dist/templates/chat/actions/navigate.ts +2 -2
  227. package/dist/templates/default/.agents/skills/secrets/SKILL.md +5 -1
  228. package/dist/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
  229. package/dist/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
  230. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
  231. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
  232. package/dist/vite/agent-native-config-loader.d.ts +1 -0
  233. package/dist/vite/agent-native-config-loader.js +3 -3
  234. package/dist/vite/agents-bundle-plugin.d.ts +1 -1
  235. package/dist/vite/agents-bundle-plugin.js +13 -1
  236. package/dist/vite/client.js +14 -14
  237. package/docs/content/agent-native-config.mdx +62 -11
  238. package/docs/content/agent-surfaces.mdx +6 -0
  239. package/docs/content/environment-variables.mdx +5 -2
  240. package/package.json +3 -3
  241. package/src/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  242. package/src/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  243. package/src/templates/chat/CHANGELOG.md +89 -2
  244. package/src/templates/chat/actions/navigate.ts +2 -2
  245. package/src/templates/default/.agents/skills/secrets/SKILL.md +5 -1
  246. package/src/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
  247. package/src/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
  248. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
  249. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
package/dist/config.js CHANGED
@@ -16,6 +16,254 @@ export const AGENT_NATIVE_CONFIG_VERSION = 1;
16
16
  export function defineAgentNativeConfig(config) {
17
17
  return config;
18
18
  }
19
+ export const AGENT_NATIVE_CONFIG_ENV_PREFIX = "AGENT_NATIVE_CONFIG";
20
+ /**
21
+ * Serializable public config nodes that may be initialized from the
22
+ * deployment environment. Object nodes accept JSON fragments, which lets a
23
+ * deploy set a whole section without requiring a separate alias for every
24
+ * leaf. Dynamic keys in the onboarding mode map stay JSON-only at the union
25
+ * node because they are not part of the fixed config shape.
26
+ */
27
+ const AGENT_NATIVE_CONFIG_ENV_NODES = [
28
+ { path: [], kind: "object" },
29
+ { path: ["version"], kind: "number" },
30
+ { path: ["onboarding"], kind: "object" },
31
+ {
32
+ path: ["onboarding", "firstRun"],
33
+ kind: "union",
34
+ dynamicObjectKeys: true,
35
+ },
36
+ { path: ["runtime"], kind: "object" },
37
+ { path: ["runtime", "auth"], kind: "object" },
38
+ { path: ["runtime", "auth", "enabled"], kind: "boolean" },
39
+ { path: ["runtime", "database"], kind: "object" },
40
+ { path: ["runtime", "database", "required"], kind: "boolean" },
41
+ { path: ["runtime", "environment"], kind: "object" },
42
+ {
43
+ path: ["runtime", "environment", "required"],
44
+ kind: "array",
45
+ },
46
+ { path: ["deployment"], kind: "object" },
47
+ {
48
+ path: ["deployment", "environment"],
49
+ kind: "deployment-environment",
50
+ },
51
+ { path: ["diagnostics"], kind: "object" },
52
+ { path: ["diagnostics", "failOnBuild"], kind: "boolean" },
53
+ { path: ["instructions"], kind: "object" },
54
+ { path: ["instructions", "runtime"], kind: "string" },
55
+ { path: ["instructions", "development"], kind: "string" },
56
+ { path: ["translations"], kind: "object" },
57
+ { path: ["translations", "locales"], kind: "array" },
58
+ { path: ["changelog"], kind: "object" },
59
+ { path: ["changelog", "enabled"], kind: "boolean" },
60
+ { path: ["harness"], kind: "union" },
61
+ { path: ["harness", "runtimes"], kind: "array" },
62
+ ];
63
+ function agentNativeConfigEnvSegment(segment) {
64
+ return segment
65
+ .replace(/([a-z0-9])([A-Z])/g, "$1_$2")
66
+ .replace(/[^A-Za-z0-9]+/g, "_")
67
+ .replace(/_+/g, "_")
68
+ .replace(/^_|_$/g, "")
69
+ .toUpperCase();
70
+ }
71
+ /** Convert a config path such as `runtime.auth.enabled` to its env name. */
72
+ export function agentNativeConfigEnvName(path) {
73
+ if (path.length === 0)
74
+ return AGENT_NATIVE_CONFIG_ENV_PREFIX;
75
+ return `${AGENT_NATIVE_CONFIG_ENV_PREFIX}_${path
76
+ .map(agentNativeConfigEnvSegment)
77
+ .join("_")}`;
78
+ }
79
+ function agentNativeConfigEnvKeys(node) {
80
+ return [agentNativeConfigEnvName(node.path), ...(node.aliases ?? [])];
81
+ }
82
+ function isAgentNativeConfigEnvKey(key) {
83
+ return (key === AGENT_NATIVE_CONFIG_ENV_PREFIX ||
84
+ key.startsWith(`${AGENT_NATIVE_CONFIG_ENV_PREFIX}_`));
85
+ }
86
+ function parseAgentNativeConfigJson(raw, key) {
87
+ try {
88
+ return JSON.parse(raw);
89
+ }
90
+ catch (error) {
91
+ throw new Error(`${key} must contain valid JSON: ${error instanceof Error ? error.message : String(error)}`);
92
+ }
93
+ }
94
+ function parseAgentNativeConfigEnvValue(raw, key, kind) {
95
+ const value = raw.trim();
96
+ switch (kind) {
97
+ case "object": {
98
+ const parsed = parseAgentNativeConfigJson(value, key);
99
+ if (!isRecord(parsed)) {
100
+ throw new Error(`${key} must contain a JSON object`);
101
+ }
102
+ return parsed;
103
+ }
104
+ case "array": {
105
+ const parsed = parseAgentNativeConfigJson(value, key);
106
+ if (!Array.isArray(parsed)) {
107
+ throw new Error(`${key} must contain a JSON array`);
108
+ }
109
+ return parsed;
110
+ }
111
+ case "boolean": {
112
+ const normalized = value.toLowerCase();
113
+ if (["1", "true", "yes", "on"].includes(normalized))
114
+ return true;
115
+ if (["0", "false", "no", "off"].includes(normalized))
116
+ return false;
117
+ throw new Error(`${key} must be a boolean`);
118
+ }
119
+ case "number": {
120
+ const parsed = Number(value);
121
+ if (!Number.isFinite(parsed))
122
+ throw new Error(`${key} must be a number`);
123
+ return parsed;
124
+ }
125
+ case "deployment-environment":
126
+ return value.toLowerCase();
127
+ case "string": {
128
+ if (value.startsWith('"')) {
129
+ const parsed = parseAgentNativeConfigJson(value, key);
130
+ if (typeof parsed !== "string") {
131
+ throw new Error(`${key} must contain a string`);
132
+ }
133
+ return parsed;
134
+ }
135
+ return value;
136
+ }
137
+ case "union": {
138
+ if (value.startsWith("{") || value.startsWith("[")) {
139
+ return parseAgentNativeConfigJson(value, key);
140
+ }
141
+ const normalized = value.toLowerCase();
142
+ if (["1", "true", "yes", "on"].includes(normalized))
143
+ return true;
144
+ if (["0", "false", "no", "off"].includes(normalized))
145
+ return false;
146
+ if (value.startsWith('"')) {
147
+ const parsed = parseAgentNativeConfigJson(value, key);
148
+ if (typeof parsed !== "string") {
149
+ throw new Error(`${key} must contain a string or JSON object`);
150
+ }
151
+ return parsed;
152
+ }
153
+ return value;
154
+ }
155
+ }
156
+ }
157
+ function agentNativeConfigEnvNodeForPath(path) {
158
+ return AGENT_NATIVE_CONFIG_ENV_NODES.find((node) => node.path.length === path.length &&
159
+ node.path.every((segment, index) => segment === path[index]));
160
+ }
161
+ function agentNativeConfigEnvChildren(path) {
162
+ return AGENT_NATIVE_CONFIG_ENV_NODES.filter((node) => node.path.length === path.length + 1 &&
163
+ path.every((segment, index) => node.path[index] === segment));
164
+ }
165
+ function validateAgentNativeConfigEnvFragment(value, path, key) {
166
+ const node = agentNativeConfigEnvNodeForPath(path);
167
+ if (!node)
168
+ return;
169
+ if (node.kind === "object") {
170
+ if (!isRecord(value)) {
171
+ throw new Error(`${key} must contain a JSON object`);
172
+ }
173
+ }
174
+ else if (node.kind !== "union" || !isRecord(value)) {
175
+ return;
176
+ }
177
+ if (node.dynamicObjectKeys)
178
+ return;
179
+ const children = new Map(agentNativeConfigEnvChildren(path).map((child) => [
180
+ child.path[child.path.length - 1],
181
+ child,
182
+ ]));
183
+ for (const [childKey, childValue] of Object.entries(value)) {
184
+ const child = children.get(childKey);
185
+ if (!child) {
186
+ const childPath = [...path, childKey].join(".");
187
+ throw new Error(`${key} contains unsupported Agent-Native config path ${childPath}`);
188
+ }
189
+ validateAgentNativeConfigEnvFragment(childValue, child.path, key);
190
+ }
191
+ }
192
+ function mergeAgentNativeConfigEnvFragments(base, override) {
193
+ const result = { ...base };
194
+ for (const [key, value] of Object.entries(override)) {
195
+ const existing = result[key];
196
+ result[key] =
197
+ isRecord(existing) && isRecord(value)
198
+ ? mergeAgentNativeConfigEnvFragments(existing, value)
199
+ : value;
200
+ }
201
+ return result;
202
+ }
203
+ function assignAgentNativeConfigEnvFragment(target, path, value, key) {
204
+ if (path.length === 0) {
205
+ if (!isRecord(value)) {
206
+ throw new Error(`${key} must contain a JSON object`);
207
+ }
208
+ Object.assign(target, mergeAgentNativeConfigEnvFragments(target, value));
209
+ return;
210
+ }
211
+ let node = target;
212
+ for (const segment of path.slice(0, -1)) {
213
+ const existing = node[segment];
214
+ if (existing === undefined) {
215
+ node[segment] = {};
216
+ }
217
+ else if (!isRecord(existing)) {
218
+ node[segment] = {};
219
+ }
220
+ node = node[segment];
221
+ }
222
+ const leaf = path[path.length - 1];
223
+ const existing = node[leaf];
224
+ node[leaf] =
225
+ isRecord(existing) && isRecord(value)
226
+ ? mergeAgentNativeConfigEnvFragments(existing, value)
227
+ : value;
228
+ }
229
+ /**
230
+ * Reads the public config's deterministic environment aliases.
231
+ *
232
+ * `AGENT_NATIVE_CONFIG` contains a complete JSON object. A suffixed name
233
+ * contains a JSON fragment at that config path, or a typed scalar at a leaf.
234
+ * Nodes are applied from shallowest to deepest so a more specific path wins.
235
+ */
236
+ export function readAgentNativeConfigEnv(env) {
237
+ const known = new Map();
238
+ for (const node of AGENT_NATIVE_CONFIG_ENV_NODES) {
239
+ for (const key of agentNativeConfigEnvKeys(node)) {
240
+ const previous = known.get(key);
241
+ if (previous && previous.path.join(".") !== node.path.join(".")) {
242
+ throw new Error(`Duplicate Agent-Native config environment key ${key}`);
243
+ }
244
+ known.set(key, node);
245
+ }
246
+ }
247
+ for (const key of Object.keys(env)) {
248
+ if (isAgentNativeConfigEnvKey(key) && !known.has(key)) {
249
+ throw new Error(`${key} is not a supported Agent-Native config path. Use agent-native.config.ts or a documented config env alias.`);
250
+ }
251
+ }
252
+ const layer = {};
253
+ const nodes = [...AGENT_NATIVE_CONFIG_ENV_NODES].sort((left, right) => left.path.length - right.path.length);
254
+ for (const node of nodes) {
255
+ for (const key of agentNativeConfigEnvKeys(node)) {
256
+ const raw = env[key];
257
+ if (raw === undefined || raw.trim() === "")
258
+ continue;
259
+ const value = parseAgentNativeConfigEnvValue(raw, key, node.kind);
260
+ validateAgentNativeConfigEnvFragment(value, node.path, key);
261
+ assignAgentNativeConfigEnvFragment(layer, node.path, value, key);
262
+ break;
263
+ }
264
+ }
265
+ return normalizeAgentNativeConfig(layer, "Agent-Native config environment");
266
+ }
19
267
  export function normalizeAgentNativeConfig(input, source = "agent-native config") {
20
268
  if (!isRecord(input)) {
21
269
  throw new Error(`${source} must export an object`);
@@ -18,10 +18,12 @@ import fs from "fs";
18
18
  import { createRequire } from "module";
19
19
  import path from "path";
20
20
  import { fileURLToPath } from "url";
21
+ import { loadEnv } from "vite";
21
22
  import { AGENT_BACKGROUND_FUNCTION_NAME, AGENT_BACKGROUND_FUNCTION_URL_PATH, AGENT_BACKGROUND_PROCESSOR_A2A, AGENT_BACKGROUND_PROCESSOR_FIELD, AGENT_BACKGROUND_PROCESSOR_INTEGRATION, AGENT_BACKGROUND_PROCESSOR_ROUTE, AGENT_BACKGROUND_PROCESSOR_ROUTE_FIELD, AGENT_CHAT_PROCESS_RUN_PATH, isDurableBackgroundFlagExplicitlyDisabled, } from "../agent/durable-background.js";
22
23
  import { INTEGRATION_RECOVERY_RUNTIME_MARKER, INTEGRATION_RETRY_SWEEP_PATH, INTEGRATION_RETRY_SWEEP_TOKEN_SUBJECT, isIntegrationDurableDispatchConfigured, } from "../integrations/integration-durable-dispatch-config.js";
23
24
  import { isValidCron } from "../jobs/cron.js";
24
25
  import { RECURRING_JOBS_SWEEP_PATH, RECURRING_JOBS_SWEEP_TOKEN_SUBJECT, } from "../jobs/scheduler-dispatch.js";
26
+ import { findWorkspaceRoot as findAgentNativeWorkspaceRoot } from "../scripts/utils.js";
25
27
  import { normalizeAppBasePath } from "../server/app-base-path.js";
26
28
  import { DEFAULT_SPECULATION_RULES_PATH, resolveSsrCacheHeaders, resolveSsrCacheKeyHeaders, SSR_QUERY_CACHE_KEY_HEADER, } from "../shared/cache-control.js";
27
29
  import { mcpEmbedStaticAssetRouteRules } from "../shared/mcp-embed-headers.js";
@@ -3922,7 +3924,16 @@ async function buildWithNitro() {
3922
3924
  // own virtual module registration. Both paths reuse `readAgentsBundleFromFs`
3923
3925
  // from `server/agents-bundle.ts` to guarantee identical content.
3924
3926
  const { readAgentsBundleFromFs } = await import("../server/agents-bundle.js");
3925
- const nitroAgentConfig = await loadResolvedAgentNativeConfig(cwd, createAgentNativeConfigContext("build", process.env.NODE_ENV === "development" ? "development" : "production"));
3927
+ const nitroMode = process.env.NODE_ENV === "development" ? "development" : "production";
3928
+ const agentNativeWorkspaceRoot = findAgentNativeWorkspaceRoot(cwd);
3929
+ const nitroEnvironment = {
3930
+ ...(agentNativeWorkspaceRoot && agentNativeWorkspaceRoot !== cwd
3931
+ ? loadEnv(nitroMode, agentNativeWorkspaceRoot, "")
3932
+ : {}),
3933
+ ...loadEnv(nitroMode, cwd, ""),
3934
+ ...process.env,
3935
+ };
3936
+ const nitroAgentConfig = await loadResolvedAgentNativeConfig(cwd, createAgentNativeConfigContext("build", nitroMode), { environment: nitroEnvironment });
3926
3937
  // Resolve the workspace core (if present) up front so the bundle embeds
3927
3938
  // enterprise-wide AGENTS.md + skills alongside the template's.
3928
3939
  const nitroWorkspaceCore = await getWorkspaceCoreExports(cwd);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./config.js";
2
- export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type AgentActionSurfaceDetails, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, DEFAULT_MODEL, TripWire, type Processor, type ProcessorState, type ProcessorAbort, } from "./agent/index.js";
2
+ export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type DefaultAgentActionSurface, type AgentActionSurfaceResolution, type AgentActionSurfaceDetails, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, DEFAULT_MODEL, TripWire, type Processor, type ProcessorState, type ProcessorAbort, } from "./agent/index.js";
3
3
  export { defineAction, ActionContractError, isActionContractError, type ActionContractErrorOptions, AgentActionStopError, isAgentActionStopError, type ActionDefinition, type ActionHttpConfig, type AgentActionStopOptions, type PublicAgentActionConfig, type ActionDeepLink, type ActionLinkBuilder, MCP_APP_EXTENSION_ID, MCP_APP_MIME_TYPE, MCP_APP_RESOURCE_URI_META_KEY, type ActionMcpAppConfig, type ActionMcpAppCsp, type ActionMcpAppCspBuilder, type ActionMcpAppHtmlBuilder, type ActionMcpAppPermissions, type ActionMcpAppResourceConfig, type ActionMcpAppResourceMeta, } from "./action.js";
4
4
  export * from "./user-profile/index.js";
5
5
  export { embedApp, MCP_APP_REQUEST_ORIGIN_CSP_SOURCE, type EmbedAppOptions, } from "./mcp/embed-app.js";
@@ -11,23 +11,23 @@
11
11
  * DELETE /_agent-native/notifications/:id — delete
12
12
  */
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
+ error?: undefined;
14
15
  count: number;
15
16
  updated?: undefined;
16
17
  ok?: undefined;
17
- error?: undefined;
18
18
  } | {
19
+ error?: undefined;
19
20
  count?: undefined;
20
21
  updated: number;
21
22
  ok?: undefined;
22
- error?: undefined;
23
23
  } | {
24
24
  count?: undefined;
25
25
  updated?: undefined;
26
26
  error: string;
27
27
  ok?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  count?: undefined;
30
31
  updated?: undefined;
31
32
  ok: boolean;
32
- error?: undefined;
33
33
  }>>;
@@ -41,27 +41,27 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
+ ok?: undefined;
45
+ error?: undefined;
44
46
  summary: import("./types.js").TraceSummary;
45
47
  spans: import("./types.js").TraceSpan[];
46
48
  id?: undefined;
47
- error?: undefined;
48
- ok?: undefined;
49
49
  } | {
50
+ ok?: undefined;
51
+ error?: undefined;
50
52
  summary?: undefined;
51
53
  spans?: undefined;
52
54
  id: string;
53
- error?: undefined;
54
- ok?: undefined;
55
55
  } | {
56
+ ok?: undefined;
56
57
  summary?: undefined;
57
58
  spans?: undefined;
58
59
  id?: undefined;
59
60
  error: any;
60
- ok?: undefined;
61
61
  } | {
62
+ error?: undefined;
62
63
  summary?: undefined;
63
64
  spans?: undefined;
64
65
  id?: undefined;
65
- error?: undefined;
66
66
  ok: boolean;
67
67
  }>>;
@@ -51,8 +51,8 @@ export declare function handleDeleteResource(event: any): Promise<{
51
51
  error: string;
52
52
  ok?: undefined;
53
53
  } | {
54
- ok: boolean;
55
54
  error?: undefined;
55
+ ok: boolean;
56
56
  }>;
57
57
  /** POST /_agent-native/resources/upload — upload a file as a resource */
58
58
  export declare function handleUploadResource(event: any): Promise<import("./store.js").Resource | {
@@ -73,10 +73,10 @@ export declare function handleUploadResource(event: any): Promise<import("./stor
73
73
  runId: string | null;
74
74
  expiresAt: number | null;
75
75
  metadata: string | null;
76
+ error?: undefined;
76
77
  url: string;
77
78
  provider: string;
78
79
  storageSetupRequired?: undefined;
79
- error?: undefined;
80
80
  } | {
81
81
  error: string;
82
82
  storageSetupRequired: boolean;
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- status?: undefined;
38
37
  ok?: undefined;
38
+ status?: undefined;
39
39
  } | {
40
+ error?: undefined;
40
41
  ok: boolean;
41
42
  status: string;
42
- error?: undefined;
43
43
  } | {
44
+ ok?: undefined;
44
45
  error: string;
45
46
  removed?: undefined;
46
- ok?: undefined;
47
47
  } | {
48
+ error?: undefined;
48
49
  ok: boolean;
49
50
  removed: boolean;
50
- error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
54
  * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
+ ok?: undefined;
57
58
  error: string;
58
59
  note?: undefined;
59
- ok?: undefined;
60
60
  } | {
61
+ error?: undefined;
61
62
  ok: boolean;
62
63
  note?: undefined;
63
- error?: undefined;
64
64
  } | {
65
+ error?: undefined;
65
66
  ok: boolean;
66
67
  note: string;
67
- error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
+ error?: undefined;
98
99
  ok: boolean;
99
100
  key: string;
100
- error?: undefined;
101
101
  } | {
102
+ error?: undefined;
102
103
  ok: boolean;
103
104
  removed: boolean;
104
- error?: undefined;
105
105
  }>>;
@@ -171,8 +171,9 @@ export interface AgentChatPluginOptions {
171
171
  }>;
172
172
  /**
173
173
  * Resolve the exact native action surface for each interactive chat request.
174
- * Omitted names are not sent to the model and are not discoverable through
175
- * tool-search. When configured, every allowed action is loaded directly.
174
+ * Omitted allowlist names are not sent to the model or discoverable through
175
+ * tool-search. Return `{ mode: "default" }` to keep the normal initial-tool
176
+ * and discovery behavior for a request instead.
176
177
  */
177
178
  resolveActionSurface?: ProductionAgentOptions["resolveActionSurface"];
178
179
  /**
@@ -13,7 +13,7 @@ import { resolveEngine, createAnthropicEngine, getStoredModelForEngine, normaliz
13
13
  import { SYSTEM_PROMPT_CACHE_SPLIT } from "../agent/engine/prompt-cache.js";
14
14
  import { PROVIDER_TO_ENV } from "../agent/engine/provider-env-vars.js";
15
15
  import { hostedHarnessSystemPrompt } from "../agent/harness/hosted.js";
16
- import { createProductionAgentHandler, actionsToEngineTools, executeAgentToolCall, filterActionsByAllowedNames, readPersistedActionSurface, toolCallCacheKey, getActiveRunForThreadAsync, abortRunDurably, abortTurnDurably, subscribeToRun, } from "../agent/production-agent.js";
16
+ import { createProductionAgentHandler, actionsToEngineTools, executeAgentToolCall, filterActionsByAllowedNames, normalizeAgentActionSurfaceResolution, readPersistedActionSurface, toolCallCacheKey, getActiveRunForThreadAsync, abortRunDurably, abortTurnDurably, subscribeToRun, } from "../agent/production-agent.js";
17
17
  import { callerHasRunAccess, callerHasThreadAccess, } from "../agent/run-ownership.js";
18
18
  import { markTurnAborted, readBackgroundRunClaim } from "../agent/run-store.js";
19
19
  import { buildCurrentTimeUserContext, buildRuntimeContextPrompt, } from "../agent/runtime-context.js";
@@ -2974,11 +2974,14 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
2974
2974
  ...details,
2975
2975
  availableActionNames: appActionNames,
2976
2976
  });
2977
+ const normalizedSurface = normalizeAgentActionSurfaceResolution(surface);
2978
+ if (normalizedSurface.mode === "default")
2979
+ return surface;
2977
2980
  const localActionNames = details.availableActionNames.filter((name) => localDevActionNames.has(name));
2978
2981
  return {
2979
2982
  allowedActionNames: [
2980
2983
  ...new Set([
2981
- ...surface.allowedActionNames,
2984
+ ...normalizedSurface.allowedActionNames,
2982
2985
  ...localActionNames,
2983
2986
  ]),
2984
2987
  ],
@@ -15,7 +15,7 @@ export { requireEnvKey, type MissingKeyResponse } from "./missing-key.js";
15
15
  export { assertCurrentRequestUserIsOrgAdmin, currentRequestUserIsOrgAdmin, } from "./org-admin.js";
16
16
  export { verifyCaptcha, type CaptchaVerifyResult } from "./captcha.js";
17
17
  export { getLocaleInitScript, parseAcceptLanguage, resolveLocaleFromRequest, type LocaleInitScriptOptions, type ResolveLocaleFromRequestOptions, type ResolvedRequestLocale, } from "../localization/server.js";
18
- export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type AgentActionSurfaceDetails, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, type AgentChatReference, type MentionProvider, type MentionProviderItem, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "../agent/index.js";
18
+ export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type DefaultAgentActionSurface, type AgentActionSurfaceResolution, type AgentActionSurfaceDetails, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, type AgentChatReference, type MentionProvider, type MentionProviderItem, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "../agent/index.js";
19
19
  export { actionsToEngineTools, executeAgentToolCall, getOwnerActiveApiKey, getOwnerApiKeyForEngine, resolveOwnerEngineApiKey, runAgentLoop, type AgentToolCallExecutionResult, type ExecuteAgentToolCallOptions, type ResolvedOwnerApiKey, } from "../agent/production-agent.js";
20
20
  export { mountRealtimeVoiceRoutes, realtimeVoiceSafetyIdentifier, REALTIME_VOICE_MAX_SDP_BYTES, REALTIME_VOICE_MAX_TOOL_BODY_BYTES, REALTIME_VOICE_MAX_TOOL_OUTPUT_CHARS, REALTIME_VOICE_SESSION_PATH, REALTIME_VOICE_TOOL_PATH, type MountRealtimeVoiceRoutesOptions, type RealtimeVoiceRequestContext, type RealtimeVoiceToolExecutionRequest, type RealtimeVoiceToolExecutionResult, } from "./realtime-voice.js";
21
21
  export { getStoredModelForEngine, resolveEngine, } from "../agent/engine/index.js";
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  token: string;
30
31
  expiresAt: string;
31
32
  ttlSeconds: number;
32
- error?: undefined;
33
33
  }>>;
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
@@ -38,7 +38,11 @@ connection exists:
38
38
  register a `kind: "oauth"` entry so the shared UI renders Connect and the
39
39
  runtime owns status, refresh, and reauthorization.
40
40
  - **Deploy- or app-level configuration** - use deployment/runtime
41
- configuration, not a per-user secret row.
41
+ configuration, not a per-user secret row. For a non-secret public setting
42
+ already represented by `AgentNativeConfig`, put the default in
43
+ `agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
44
+ for a deployment override. Never put a credential or provider key in that
45
+ public namespace.
42
46
  - **Account, customer, manager, or other non-secret identifier** - store it as
43
47
  scoped connection metadata or app data, not as a masked secret field.
44
48
 
@@ -55,7 +55,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
55
55
  ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob
56
56
  storage and persist only URLs, ids, or handles.
57
57
  - Store shared runtime configuration in the workspace root `.env`; use
58
- `apps/<app>/.env` only for app-specific overrides. Never hardcode API keys,
58
+ `apps/<app>/.env` only for app-specific overrides. For public app behavior,
59
+ prefer the default in `agent-native.config.ts` and use the deterministic
60
+ `AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH>` alias only when a non-secret value
61
+ needs a deployment override. Never hardcode API keys,
59
62
  tokens, webhook URLs, signing secrets, private Builder/internal data, customer
60
63
  data, or credential-looking literals in source, docs, prompts, fixtures,
61
64
  application state, action responses, or generated app content. Use
@@ -3,8 +3,6 @@
3
3
  All notable user-facing changes to Chat are documented here. Open it any
4
4
  time from the command menu (Cmd+K → "What's new").
5
5
 
6
- Older updates live in [the changelog folder](./changelog/) and are included in the in-app "What's new" view.
7
-
8
6
  ## 2026-08-11
9
7
 
10
8
  ### Fixed
@@ -34,3 +32,92 @@ Older updates live in [the changelog folder](./changelog/) and are included in t
34
32
  ### Improved
35
33
 
36
34
  - Settings navigation now keeps Manage agent as a dedicated linked destination at the bottom.
35
+
36
+ ## 2026-07-24
37
+
38
+ ### Improved
39
+
40
+ - Secondary controls and dashboard surfaces now use quieter borderless styling.
41
+ - Sidebar utility controls now follow a consistent footer order.
42
+
43
+ ## 2026-07-23
44
+
45
+ ### Improved
46
+
47
+ - Full-page chat is better centered, with quieter chat history and a left-aligned New chat action.
48
+
49
+ ## 2026-07-22
50
+
51
+ ### Improved
52
+
53
+ - The sidebar footer now keeps Feedback and the collapse control on one compact row.
54
+ - Manage agent navigation now uses the connected-nodes icon.
55
+ - Recent chats now expand from a compact five-item list with New chat anchored at the bottom.
56
+
57
+ ### Fixed
58
+
59
+ - Full-page chat keeps the active conversation when moving to and from the sidebar.
60
+
61
+ ## 2026-07-17
62
+
63
+ ### Fixed
64
+
65
+ - The agent chat sidebar stays closed until you open it or start a chat handoff.
66
+
67
+ ## 2026-07-15
68
+
69
+ ### Removed
70
+
71
+ - The main navigation is now focused on Chat, Agent, and essential workspace settings.
72
+
73
+ ## 2026-07-14
74
+
75
+ ### Fixed
76
+
77
+ - Chat opens reliably on hosted deployments instead of failing during startup
78
+ - Fixed chat template startup with older core versions
79
+
80
+ ## 2026-07-13
81
+
82
+ ### Added
83
+
84
+ - A full Agent page now brings context, files, connections, jobs, and external access together
85
+
86
+ ## 2026-07-10
87
+
88
+ ### Improved
89
+
90
+ - Chat now makes AI connection setup clear without shifting the composer.
91
+
92
+ ## 2026-07-08
93
+
94
+ ### Improved
95
+
96
+ - Settings are cleaner and searchable, with a consistent navigation that jumps straight to any setting.
97
+
98
+ ## 2026-06-29
99
+
100
+ ### Improved
101
+
102
+ - Chat layouts adapt when the agent sidebar is open.
103
+
104
+ ## 2026-06-28
105
+
106
+ ### Improved
107
+
108
+ - Left sidebar collapse motion and footer controls now feel smoother and use less divider chrome.
109
+
110
+ ## 2026-06-27
111
+
112
+ ### Fixed
113
+
114
+ - Traditional Chinese copy now uses Taiwan terminology and clearer technical wording.
115
+
116
+ ## 2026-06-24
117
+
118
+ ### Added
119
+
120
+ - A new Settings page gives quick access to language, workspace, and agent preferences.
121
+ - Added a language picker and localized app chrome for supported languages.
122
+
123
+ For the full list of updates, see the [changelog folder](./changelog/).
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import { defineAction } from "@agent-native/core/action";
17
- import { writeAppState } from "@agent-native/core/application-state";
17
+ import { writeAppStateForCurrentTab } from "@agent-native/core/application-state";
18
18
  import { z } from "zod";
19
19
 
20
20
  export default defineAction({
@@ -35,7 +35,7 @@ export default defineAction({
35
35
  if (args.path) nav.path = args.path;
36
36
  if (args.threadId) nav.threadId = args.threadId;
37
37
  nav._writeId = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
38
- await writeAppState("navigate", nav);
38
+ await writeAppStateForCurrentTab("navigate", nav);
39
39
  return `Navigating to ${args.view || args.path}`;
40
40
  },
41
41
  });