@agent-native/core 0.165.4 → 0.167.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 (224) 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/app/components/layout/Sidebar.tsx +93 -56
  5. package/corpus/templates/analytics/app/i18n-data.ts +23 -20
  6. package/corpus/templates/analytics/app/pages/Settings.tsx +0 -1
  7. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +0 -1
  8. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
  9. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +2 -1
  10. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -1
  11. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +0 -32
  12. package/corpus/templates/analytics/server/lib/session-replay.ts +1 -5
  13. package/corpus/templates/assets/.agents/skills/secrets/SKILL.md +5 -1
  14. package/corpus/templates/assets/.agents/skills/workspace-conventions/SKILL.md +4 -1
  15. package/corpus/templates/assets/actions/navigate.ts +2 -2
  16. package/corpus/templates/assets/actions/save-generated-image.ts +0 -5
  17. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -262
  18. package/corpus/templates/assets/app/routes/library.tsx +1 -1
  19. package/corpus/templates/assets/app/routes/settings.tsx +0 -3
  20. package/corpus/templates/brain/.agents/skills/secrets/SKILL.md +5 -1
  21. package/corpus/templates/brain/.agents/skills/workspace-conventions/SKILL.md +4 -1
  22. package/corpus/templates/brain/actions/ask-brain.ts +0 -1
  23. package/corpus/templates/brain/actions/navigate.ts +2 -2
  24. package/corpus/templates/brain/app/routes/sources.tsx +0 -4
  25. package/corpus/templates/brain/server/lib/capture-sanitization.ts +0 -11
  26. package/corpus/templates/calendar/.agents/skills/secrets/SKILL.md +5 -1
  27. package/corpus/templates/calendar/.agents/skills/workspace-conventions/SKILL.md +4 -1
  28. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +0 -20
  29. package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -1
  30. package/corpus/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  31. package/corpus/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  32. package/corpus/templates/chat/actions/navigate.ts +2 -2
  33. package/corpus/templates/clips/.agents/skills/secrets/SKILL.md +5 -1
  34. package/corpus/templates/clips/.agents/skills/workspace-conventions/SKILL.md +4 -1
  35. package/corpus/templates/clips/CHANGELOG.md +2 -0
  36. package/corpus/templates/clips/actions/import-loom-recording.ts +16 -4
  37. package/corpus/templates/clips/actions/navigate.ts +2 -2
  38. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +0 -1
  39. package/corpus/templates/clips/app/components/library/space-dialogs.tsx +0 -1
  40. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +0 -1
  41. package/corpus/templates/clips/app/components/player/clips-share-trigger.tsx +17 -0
  42. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +3 -3
  43. package/corpus/templates/clips/app/components/player/video-player.tsx +2 -2
  44. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +0 -1
  45. package/corpus/templates/clips/app/components/settings/ai-setup-section.tsx +0 -1
  46. package/corpus/templates/clips/app/global.css +31 -0
  47. package/corpus/templates/clips/app/hooks/use-playback-position.ts +0 -2
  48. package/corpus/templates/clips/app/lib/download-release-channel.ts +10 -0
  49. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +1 -3
  50. package/corpus/templates/clips/app/routes/download.tsx +67 -44
  51. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +7 -12
  52. package/corpus/templates/clips/app/routes/record.tsx +6 -6
  53. package/corpus/templates/clips/app/routes/share.$shareId.tsx +26 -29
  54. package/corpus/templates/clips/changelog/2026-08-20-clip-viewer-share-actions.md +6 -0
  55. package/corpus/templates/clips/changelog/2026-08-20-preparing-recording-countdown-overlay.md +1 -0
  56. package/corpus/templates/clips/chrome-extension/src/background.ts +0 -13
  57. package/corpus/templates/clips/chrome-extension/src/overlay.ts +0 -1
  58. package/corpus/templates/clips/chrome-extension/src/popup.ts +0 -20
  59. package/corpus/templates/clips/desktop/src/app.tsx +6 -18
  60. package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +0 -1
  61. package/corpus/templates/clips/desktop/src/lib/recorder.ts +0 -8
  62. package/corpus/templates/content/.agents/skills/secrets/SKILL.md +5 -1
  63. package/corpus/templates/content/.agents/skills/workspace-conventions/SKILL.md +4 -1
  64. package/corpus/templates/content/actions/_database-source-utils.ts +0 -3
  65. package/corpus/templates/content/actions/attach-content-database-source.ts +1 -4
  66. package/corpus/templates/content/actions/navigate.ts +2 -2
  67. package/corpus/templates/content/actions/prepare-builder-source-execution.ts +1 -1
  68. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +0 -6
  69. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +0 -580
  70. package/corpus/templates/content/app/components/editor/database/FormView.tsx +2 -2
  71. package/corpus/templates/content/app/components/editor/database/filter-sort.ts +1 -1
  72. package/corpus/templates/content/app/components/editor/database/settings.tsx +0 -23
  73. package/corpus/templates/content/app/components/editor/database/sidebar.tsx +0 -1
  74. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +8 -304
  75. package/corpus/templates/content/app/hooks/use-documents.ts +0 -1
  76. package/corpus/templates/content/shared/api.ts +0 -1
  77. package/corpus/templates/content/shared/builder-mdx.ts +0 -1
  78. package/corpus/templates/content/shared/nfm.ts +1 -7
  79. package/corpus/templates/crm/.agents/skills/secrets/SKILL.md +5 -1
  80. package/corpus/templates/crm/.agents/skills/workspace-conventions/SKILL.md +4 -1
  81. package/corpus/templates/crm/actions/merge-crm-records.ts +0 -4
  82. package/corpus/templates/crm/app/components/crm/record/RecordLists.tsx +0 -1
  83. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1
  84. package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1
  85. package/corpus/templates/crm/server/db/crm-store.ts +1 -1
  86. package/corpus/templates/design/.agents/skills/secrets/SKILL.md +5 -1
  87. package/corpus/templates/design/.agents/skills/workspace-conventions/SKILL.md +4 -1
  88. package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -14
  89. package/corpus/templates/design/AGENTS.md +2 -1
  90. package/corpus/templates/design/actions/apply-component-prop-edit.ts +1 -5
  91. package/corpus/templates/design/actions/generate-design.ts +0 -1
  92. package/corpus/templates/design/actions/generate-screens.ts +5 -2
  93. package/corpus/templates/design/actions/go-to-main-component.ts +2 -2
  94. package/corpus/templates/design/actions/list-design-systems.ts +10 -0
  95. package/corpus/templates/design/actions/navigate.ts +2 -2
  96. package/corpus/templates/design/actions/open-component-source.ts +4 -4
  97. package/corpus/templates/design/actions/present-design-variants.ts +1 -2
  98. package/corpus/templates/design/actions/run-design-audit.ts +0 -22
  99. package/corpus/templates/design/actions/show-design-questions.ts +5 -2
  100. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +19 -8
  101. package/corpus/templates/design/app/components/design/EditPanel.tsx +11 -183
  102. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +21 -4
  103. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -5
  104. package/corpus/templates/design/app/components/design/bridge/codegen.ts +1 -1
  105. package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +10 -19
  106. package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
  107. package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +13 -3
  108. package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +38 -32
  109. package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -4
  110. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +0 -4
  111. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
  112. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +2 -2
  113. package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +0 -1
  114. package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1 -1
  115. package/corpus/templates/design/app/i18n-data.ts +122 -0
  116. package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +11 -1
  117. package/corpus/templates/design/app/pages/DesignEditor.tsx +50 -254
  118. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +163 -8
  119. package/corpus/templates/design/app/pages/Index.tsx +17 -0
  120. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +44 -32
  121. package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +10 -0
  122. package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +49 -3
  123. package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +31 -0
  124. package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +28 -0
  125. package/corpus/templates/design/app/pages/design-editor/commands/add-auto-layout.ts +3 -3
  126. package/corpus/templates/design/app/pages/design-editor/commands/align-selection.ts +44 -14
  127. package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +16 -5
  128. package/corpus/templates/design/app/pages/design-editor/commands/change-selected-z-index.ts +1 -1
  129. package/corpus/templates/design/app/pages/design-editor/commands/frame-selection.ts +1 -1
  130. package/corpus/templates/design/app/pages/design-editor/commands/group-selection.ts +1 -1
  131. package/corpus/templates/design/app/pages/design-editor/commands/nudge-selection.ts +1 -1
  132. package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +142 -17
  133. package/corpus/templates/design/app/pages/design-editor/commands/screen-visual-duplicate-change.ts +1 -0
  134. package/corpus/templates/design/app/pages/design-editor/commands/ungroup-selection.ts +1 -1
  135. package/corpus/templates/design/app/pages/design-editor/commands/visual-duplicate-change.ts +1 -0
  136. package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +25 -9
  137. package/corpus/templates/design/app/pages/design-editor/editor-state.ts +1 -0
  138. package/corpus/templates/design/app/pages/design-editor/measure-child-rects.ts +83 -0
  139. package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +66 -0
  140. package/corpus/templates/design/server/routes/[...page].get.ts +0 -1
  141. package/corpus/templates/design/shared/code-layer.ts +120 -70
  142. package/corpus/templates/design/shared/design-surface-index.ts +0 -1
  143. package/corpus/templates/design/shared/pen-path.ts +0 -4
  144. package/corpus/templates/dispatch/.agents/skills/secrets/SKILL.md +5 -1
  145. package/corpus/templates/dispatch/.agents/skills/workspace-conventions/SKILL.md +4 -1
  146. package/corpus/templates/dispatch/app/routes/integrations.tsx +0 -109
  147. package/corpus/templates/factory/.agents/skills/secrets/SKILL.md +5 -1
  148. package/corpus/templates/factory/.agents/skills/workspace-conventions/SKILL.md +4 -1
  149. package/corpus/templates/factory/actions/navigate.ts +2 -2
  150. package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +0 -13
  151. package/corpus/templates/factory/app/routes/factory.tsx +0 -1
  152. package/corpus/templates/factory/server/factory-graph/store.ts +0 -1
  153. package/corpus/templates/forms/.agents/skills/secrets/SKILL.md +5 -1
  154. package/corpus/templates/forms/.agents/skills/workspace-conventions/SKILL.md +4 -1
  155. package/corpus/templates/macros/.agents/skills/secrets/SKILL.md +5 -1
  156. package/corpus/templates/macros/.agents/skills/workspace-conventions/SKILL.md +4 -1
  157. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -1
  158. package/corpus/templates/mail/.agents/skills/secrets/SKILL.md +5 -1
  159. package/corpus/templates/mail/.agents/skills/workspace-conventions/SKILL.md +4 -1
  160. package/corpus/templates/mail/app/components/email/EmailList.tsx +0 -1
  161. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
  162. package/corpus/templates/mail/shared/markdown.ts +3 -0
  163. package/corpus/templates/plan/.agents/skills/secrets/SKILL.md +5 -1
  164. package/corpus/templates/plan/.agents/skills/workspace-conventions/SKILL.md +4 -1
  165. package/corpus/templates/slides/.agents/skills/secrets/SKILL.md +5 -1
  166. package/corpus/templates/slides/.agents/skills/workspace-conventions/SKILL.md +4 -1
  167. package/corpus/templates/slides/actions/add-slide.ts +0 -1
  168. package/corpus/templates/slides/actions/list-decks.ts +1 -1
  169. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -4
  170. package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +0 -1
  171. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -1
  172. package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -6
  173. package/corpus/templates/tasks/.agents/skills/secrets/SKILL.md +5 -1
  174. package/corpus/templates/tasks/.agents/skills/workspace-conventions/SKILL.md +4 -1
  175. package/corpus/templates/tasks/app/components/layout/Layout.tsx +0 -1
  176. package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +1 -4
  177. package/corpus/templates/tasks/server/custom-fields/store.ts +1 -6
  178. package/corpus/templates/tasks/shared/list-screen-snapshot.ts +2 -2
  179. package/dist/agent/engine/registry.js +27 -14
  180. package/dist/agent/index.d.ts +1 -1
  181. package/dist/agent/production-agent.d.ts +19 -6
  182. package/dist/agent/production-agent.js +57 -16
  183. package/dist/agent/types.d.ts +3 -0
  184. package/dist/changelog/parse.js +219 -8
  185. package/dist/client/EnvironmentBadge.d.ts +1 -0
  186. package/dist/client/EnvironmentBadge.js +7 -0
  187. package/dist/collab/routes.d.ts +1 -1
  188. package/dist/collab/struct-routes.d.ts +1 -1
  189. package/dist/config.d.ts +11 -0
  190. package/dist/config.js +248 -0
  191. package/dist/deploy/build.js +12 -1
  192. package/dist/index.d.ts +1 -1
  193. package/dist/observability/routes.d.ts +3 -3
  194. package/dist/progress/routes.d.ts +1 -1
  195. package/dist/resources/handlers.d.ts +2 -2
  196. package/dist/secrets/routes.d.ts +9 -9
  197. package/dist/server/agent-chat/plugin-options.d.ts +3 -2
  198. package/dist/server/agent-chat-plugin.js +5 -2
  199. package/dist/server/index.d.ts +1 -1
  200. package/dist/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  201. package/dist/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  202. package/dist/templates/chat/actions/navigate.ts +2 -2
  203. package/dist/templates/default/.agents/skills/secrets/SKILL.md +5 -1
  204. package/dist/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
  205. package/dist/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
  206. package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
  207. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
  208. package/dist/vite/agent-native-config-loader.d.ts +1 -0
  209. package/dist/vite/agent-native-config-loader.js +3 -3
  210. package/dist/vite/agents-bundle-plugin.d.ts +1 -1
  211. package/dist/vite/agents-bundle-plugin.js +13 -1
  212. package/dist/vite/client.js +14 -14
  213. package/docs/content/agent-native-config.mdx +62 -11
  214. package/docs/content/agent-surfaces.mdx +6 -0
  215. package/docs/content/environment-variables.mdx +5 -2
  216. package/package.json +3 -3
  217. package/src/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
  218. package/src/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
  219. package/src/templates/chat/actions/navigate.ts +2 -2
  220. package/src/templates/default/.agents/skills/secrets/SKILL.md +5 -1
  221. package/src/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
  222. package/src/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
  223. package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
  224. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
@@ -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
@@ -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
@@ -27,7 +27,6 @@ import {
27
27
  import { useState, useEffect } from "react";
28
28
  import { Link, useLocation, useNavigate } from "react-router";
29
29
 
30
- import { Button } from "@/components/ui/button";
31
30
  import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet";
32
31
  import {
33
32
  Tooltip,
@@ -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
@@ -50,7 +50,6 @@ import {
50
50
  useLabels,
51
51
  useMoveEmail,
52
52
  unsuppressThread,
53
- type BulkEmailTarget,
54
53
  } from "@/hooks/use-emails";
55
54
  import { useKeyboardShortcuts } from "@/hooks/use-keyboard-shortcuts";
56
55
  import {
@@ -202,7 +202,7 @@ const collapsibleViews = [
202
202
 
203
203
  export function AppLayout({ children }: AppLayoutProps) {
204
204
  const location = useLocation();
205
- const isMobile = useIsMobile();
205
+
206
206
  const t = useT();
207
207
  if (BARE_ROUTES.has(location.pathname)) {
208
208
  return <>{children}</>;
@@ -245,7 +245,7 @@ function AppLayoutInner({ children }: AppLayoutProps) {
245
245
  targets: SnoozeTarget[];
246
246
  } | null>(null);
247
247
  const [searchFocused, setSearchFocused] = useState(false);
248
- const [searchQuery, setSearchQuery] = useState("");
248
+ const [, setSearchQuery] = useState("");
249
249
  const navigate = useNavigate();
250
250
  const location = useLocation();
251
251
  // Parse view and threadId from pathname since AppLayout is outside <Routes>
@@ -160,6 +160,9 @@ export function renderInlineMarkdown(markdown: string): string {
160
160
 
161
161
  export function extractMarkdownUrls(markdown: string): string[] {
162
162
  const urls = new Set<string>();
163
+ // Each pass rewrites what it matched so a later pattern cannot rematch it;
164
+ // only add() escapes, so the final string is deliberately never read.
165
+ // oxlint-disable-next-line no-unused-vars
163
166
  let text = decodeCommonHtmlEntities(normalizeMarkdownHardBreaks(markdown));
164
167
 
165
168
  const add = (rawUrl: string) => {
@@ -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
@@ -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
@@ -6,7 +6,6 @@ import {
6
6
  mergeCreativeContextReuseLabels,
7
7
  recordGenerationCreativeContext,
8
8
  replaceCreativeContextElementProvenance,
9
- validateCreativeContextReuseLabels,
10
9
  validateGenerationCreativeContext,
11
10
  } from "@agent-native/creative-context/server";
12
11
  import type { CreativeContextReuseLabel } from "@agent-native/creative-context/types";
@@ -2,7 +2,7 @@ import { defineAction } from "@agent-native/core";
2
2
  import { buildDeepLink } from "@agent-native/core/server";
3
3
  import { getRequestUserEmail } from "@agent-native/core/server/request-context";
4
4
  import { accessFilter } from "@agent-native/core/sharing";
5
- import { and, desc, eq, sql } from "drizzle-orm";
5
+ import { and, desc, sql } from "drizzle-orm";
6
6
  import { z } from "zod";
7
7
 
8
8
  import { getDb, schema } from "../server/db/index.js";
@@ -1,7 +1,4 @@
1
- import {
2
- agentNativePath,
3
- appBasePath,
4
- } from "@agent-native/core/client/api-path";
1
+ import { agentNativePath } from "@agent-native/core/client/api-path";
5
2
  import type {
6
3
  AttributedRecentEdit,
7
4
  CollabUser,
@@ -18,7 +18,6 @@ import {
18
18
  IconArrowAutofitWidth,
19
19
  IconBorderRadius,
20
20
  IconBorderStyle,
21
- IconBoxPadding,
22
21
  IconDots,
23
22
  IconGridDots,
24
23
  IconItalic,
@@ -1280,7 +1280,7 @@ export default function SlideEditor({
1280
1280
  });
1281
1281
  }, [overflowContentHash, overflowWarningStateKey]);
1282
1282
  const dims = getAspectRatioDims(aspectRatio);
1283
- const [fitCanvasZoom, setFitCanvasZoom] = useState(100);
1283
+ const [, setFitCanvasZoom] = useState(100);
1284
1284
  const userSetCanvasZoomRef = useRef(false);
1285
1285
  const canvasWidth = Math.round(dims.width * (canvasZoom / 100));
1286
1286
  const canvasTrackRef = useRef<HTMLDivElement>(null);
@@ -1,8 +1,5 @@
1
1
  import { useGuidedQuestionFlow } from "@agent-native/core/client/agent-chat";
2
- import {
3
- agentNativePath,
4
- appBasePath,
5
- } from "@agent-native/core/client/api-path";
2
+ import { appBasePath } from "@agent-native/core/client/api-path";
6
3
  import {
7
4
  useCollaborativeDoc,
8
5
  emailToColor,
@@ -61,7 +58,6 @@ import {
61
58
  AlertDialogHeader,
62
59
  AlertDialogTitle,
63
60
  } from "@/components/ui/alert-dialog";
64
- import { Button } from "@/components/ui/button";
65
61
  import {
66
62
  clearSlideEditingActive,
67
63
  deckIdFromPathname,
@@ -1374,7 +1370,6 @@ export default function DeckEditor() {
1374
1370
  agentActive: deckAgentActive,
1375
1371
  agentSlideId,
1376
1372
  recentEdits: deckRecentEdits,
1377
- awareness: deckPresenceAwareness,
1378
1373
  } = useDeckPresence({
1379
1374
  deckId: deck ? (id ?? null) : null,
1380
1375
  activeSlideId: activeSlideId,
@@ -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
@@ -7,7 +7,6 @@ import { IconMenu2 } from "@tabler/icons-react";
7
7
  import { useState, useEffect } from "react";
8
8
  import { useLocation } from "react-router";
9
9
 
10
- import { Button } from "@/components/ui/button";
11
10
  import {
12
11
  Sheet,
13
12
  SheetContent,
@@ -12,10 +12,7 @@ import { useEffect, useRef } from "react";
12
12
  import type { FieldDefinition } from "@/hooks/use-custom-fields";
13
13
  import { useCustomFields } from "@/hooks/use-custom-fields";
14
14
 
15
- import {
16
- invalidateVisibleTaskFields,
17
- LIST_VISIBLE_TASK_FIELDS_QUERY_KEY,
18
- } from "./cache";
15
+ import { invalidateVisibleTaskFields } from "./cache";
19
16
 
20
17
  export { DEFAULT_TASK_CARD_FIELD_NAMES, TASK_CARD_FIELD_LIMIT };
21
18
 
@@ -20,12 +20,7 @@ import {
20
20
  parseField,
21
21
  parseFieldValueShape,
22
22
  } from "./parse.js";
23
- import type {
24
- FieldConfigInput,
25
- FieldDefinition,
26
- FieldType,
27
- FieldValue,
28
- } from "./types.js";
23
+ import type { FieldDefinition, FieldType, FieldValue } from "./types.js";
29
24
  import { validateFieldConfig, validateFieldTitle } from "./validate.js";
30
25
  import {
31
26
  deleteCustomFieldValues,
@@ -1,4 +1,4 @@
1
- export type AgentListSnapshot<TSummary> = {
1
+ export type AgentListSnapshot = {
2
2
  totalCount: number;
3
3
  truncated: boolean;
4
4
  };
@@ -9,7 +9,7 @@ export function buildAgentListSnapshot<TItem, TSummary>(
9
9
  toSummary: (item: TItem) => TSummary,
10
10
  ): {
11
11
  snapshot: TItem[];
12
- list: AgentListSnapshot<TSummary> & { items: TSummary[] };
12
+ list: AgentListSnapshot & { items: TSummary[] };
13
13
  } {
14
14
  const snapshot = items.slice(0, cap);
15
15
  return {
@@ -552,26 +552,36 @@ async function resolveProviderBaseUrl(envVar) {
552
552
  })
553
553
  : undefined;
554
554
  }
555
+ /**
556
+ * `null` means no custody — fall through to keys. Must mirror
557
+ * `BuilderGatewayEngine.stream`'s auth choice exactly: a preflight stricter
558
+ * than the engine rejects turns the engine would have served.
559
+ */
560
+ async function builderOAuthLaneUsable(identity) {
561
+ const ownerEmail = identity?.userEmail?.trim().toLowerCase() || getRequestUserEmail();
562
+ if (!ownerEmail || !(await hasBuilderOAuthSession(ownerEmail)))
563
+ return null;
564
+ try {
565
+ return Boolean(await resolveBuilderOAuthRequestAccess({
566
+ ownerEmail,
567
+ requiredScope: BUILDER_OAUTH_SCOPE,
568
+ }));
569
+ }
570
+ catch {
571
+ // coercion-ok: custody present but unusable is "not usable", not absent;
572
+ // reconnect UX is owned by /builder/status, not this boolean probe.
573
+ return false;
574
+ }
575
+ }
555
576
  /**
556
577
  * A Builder connection we could not read is not a missing connection. Throwing
557
578
  * keeps that distinction instead of reporting "connect a provider" to a user
558
579
  * whose org-shared keys exist but were unreadable.
559
580
  */
560
581
  async function hasUsableBuilderConnection(identity) {
561
- const ownerEmail = identity?.userEmail?.trim().toLowerCase() || getRequestUserEmail();
562
- if (ownerEmail && (await hasBuilderOAuthSession(ownerEmail))) {
563
- try {
564
- return Boolean(await resolveBuilderOAuthRequestAccess({
565
- ownerEmail,
566
- requiredScope: BUILDER_OAUTH_SCOPE,
567
- }));
568
- }
569
- catch {
570
- // coercion-ok: custody present but unusable is "not usable", not absent;
571
- // reconnect UX is owned by /builder/status, not this boolean probe.
572
- return false;
573
- }
574
- }
582
+ const oauthLane = await builderOAuthLaneUsable(identity);
583
+ if (oauthLane !== null)
584
+ return oauthLane;
575
585
  const creds = await resolveBuilderCredentialsDetailed(identity);
576
586
  assertCredentialStoreReadable(creds);
577
587
  return Boolean(creds.privateKey && creds.publicKey);
@@ -581,6 +591,9 @@ async function hasUsableBuilderConnection(identity) {
581
591
  * "did this user connect Builder" and is false on every credits-only site.
582
592
  */
583
593
  async function canRunBuilderEngine(identity) {
594
+ const oauthLane = await builderOAuthLaneUsable(identity);
595
+ if (oauthLane !== null)
596
+ return oauthLane;
584
597
  const creds = await resolveBuilderGatewayCredentialsDetailed(identity);
585
598
  assertCredentialStoreReadable(creds);
586
599
  return Boolean(creds.privateKey && creds.publicKey);
@@ -1,4 +1,4 @@
1
- export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type AgentActionSurfaceDetails, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "./production-agent.js";
1
+ export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type AgentActionSurface, type DefaultAgentActionSurface, type AgentActionSurfaceResolution, type AgentActionSurfaceDetails, type AgentLoopFinalResponseGuard, type AgentLoopFinalResponseGuardContext, type AgentLoopFinalResponseGuardResult, type AgentLoopToolCallSummary, type AgentLoopToolResultSummary, } from "./production-agent.js";
2
2
  export { type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, type AgentChatReference, type MentionProvider, type MentionProviderItem, } from "./types.js";
3
3
  export { TripWire, type Processor, type ProcessorState, type ProcessorAbort, type ProcessOutputStreamArgs, type ProcessOutputStepArgs, type ProcessOutputResultArgs, } from "./processors.js";
4
4
  export { DEFAULT_MODEL } from "./default-model.js";
@@ -259,6 +259,14 @@ export type AgentExecutionMode = "act" | "plan";
259
259
  export interface AgentActionSurface {
260
260
  allowedActionNames: readonly string[];
261
261
  }
262
+ export interface DefaultAgentActionSurface {
263
+ mode: "default";
264
+ }
265
+ export type AgentActionSurfaceResolution = AgentActionSurface | DefaultAgentActionSurface;
266
+ type NormalizedAgentActionSurface = DefaultAgentActionSurface | {
267
+ mode: "allowlist";
268
+ allowedActionNames: string[];
269
+ };
262
270
  export interface AgentActionSurfaceDetails {
263
271
  event: any;
264
272
  ownerEmail: string | null;
@@ -271,10 +279,14 @@ export interface AgentActionSurfaceDetails {
271
279
  /** Read a persisted allowlist while preserving legacy absence and failing
272
280
  * closed when the field is present but malformed. */
273
281
  export declare function readPersistedAllowedActionNames(value: unknown): string[] | undefined;
274
- export interface PersistedActionSurface {
282
+ export declare function normalizeAgentActionSurfaceResolution(value: unknown): NormalizedAgentActionSurface;
283
+ export type PersistedActionSurface = {
275
284
  orgId: string | null;
276
285
  allowedActionNames: string[];
277
- }
286
+ } | {
287
+ orgId: string | null;
288
+ mode: "default";
289
+ };
278
290
  /** Read a nested persisted action surface. An absent envelope is legacy;
279
291
  * a present but invalid envelope is an explicit org-less, empty surface. */
280
292
  export declare function readPersistedActionSurface(value: unknown, propertyName: string): PersistedActionSurface | undefined;
@@ -342,11 +354,12 @@ export interface ProductionAgentOptions {
342
354
  }>;
343
355
  /**
344
356
  * Resolve the exact action registry exposed to one interactive agent-chat
345
- * request. Returned names are a hard allowlist: omitted actions are absent
346
- * from both the provider schemas and the searchable registry. When set, all
347
- * allowed actions are loaded directly on the first model request.
357
+ * request. Return an allowlist to remove omitted actions from both provider
358
+ * schemas and the searchable registry, or `{ mode: "default" }` to preserve
359
+ * the normal initial-tool and discovery behavior for that request. Every
360
+ * allowlisted action is loaded directly on the first model request.
348
361
  */
349
- resolveActionSurface?: (details: AgentActionSurfaceDetails) => AgentActionSurface | Promise<AgentActionSurface>;
362
+ resolveActionSurface?: (details: AgentActionSurfaceDetails) => AgentActionSurfaceResolution | Promise<AgentActionSurfaceResolution>;
350
363
  /** Optional per-app agent run chunk budget in milliseconds. Defaults to
351
364
  * AGENT_RUN_SOFT_TIMEOUT_MS when set, otherwise no framework-imposed
352
365
  * timeout. When reached, the client receives an internal auto-continuation
@@ -411,13 +411,32 @@ export function readPersistedAllowedActionNames(value) {
411
411
  }
412
412
  return [...new Set(names)];
413
413
  }
414
+ export function normalizeAgentActionSurfaceResolution(value) {
415
+ if (hasOwn(value, "mode")) {
416
+ if (value.mode === "default" && !hasOwn(value, "allowedActionNames")) {
417
+ return { mode: "default" };
418
+ }
419
+ throw new Error("resolveActionSurface returned an invalid default surface");
420
+ }
421
+ if (!hasOwn(value, "allowedActionNames")) {
422
+ throw new Error("resolveActionSurface returned an invalid action surface");
423
+ }
424
+ const allowedActionNames = value.allowedActionNames;
425
+ if (!Array.isArray(allowedActionNames) ||
426
+ !allowedActionNames.every((name) => typeof name === "string")) {
427
+ throw new Error("resolveActionSurface returned an invalid action surface");
428
+ }
429
+ return {
430
+ mode: "allowlist",
431
+ allowedActionNames: [...new Set(allowedActionNames)],
432
+ };
433
+ }
414
434
  /** Read a nested persisted action surface. An absent envelope is legacy;
415
435
  * a present but invalid envelope is an explicit org-less, empty surface. */
416
436
  export function readPersistedActionSurface(value, propertyName) {
417
437
  if (!hasOwn(value, propertyName))
418
438
  return undefined;
419
439
  const surface = value[propertyName];
420
- const allowedActionNames = readPersistedAllowedActionNames(surface) ?? [];
421
440
  if (!hasOwn(surface, "orgId")) {
422
441
  return { orgId: null, allowedActionNames: [] };
423
442
  }
@@ -426,6 +445,13 @@ export function readPersistedActionSurface(value, propertyName) {
426
445
  (typeof orgId !== "string" || orgId.trim().length === 0)) {
427
446
  return { orgId: null, allowedActionNames: [] };
428
447
  }
448
+ if (hasOwn(surface, "mode")) {
449
+ if (surface.mode === "default" && !hasOwn(surface, "allowedActionNames")) {
450
+ return { orgId, mode: "default" };
451
+ }
452
+ return { orgId: null, allowedActionNames: [] };
453
+ }
454
+ const allowedActionNames = readPersistedAllowedActionNames(surface) ?? [];
429
455
  return { orgId, allowedActionNames };
430
456
  }
431
457
  export function filterActionsByAllowedNames(actions, allowedActionNames) {
@@ -6560,6 +6586,7 @@ export function createProductionAgentHandler(options) {
6560
6586
  availableRequestActions = filterActionsByAllowedNames(availableRequestActions, filterHostedHarnessToolNames(Object.keys(availableRequestActions)));
6561
6587
  }
6562
6588
  let surfacedRequestActions = availableRequestActions;
6589
+ let useDefaultRequestActionSurface = !options.resolveActionSurface;
6563
6590
  if (options.resolveActionSurface) {
6564
6591
  const persistedSurface = isBackgroundWorker
6565
6592
  ? readPersistedActionSurface(body, "__resolvedActionSurface")
@@ -6575,19 +6602,33 @@ export function createProductionAgentHandler(options) {
6575
6602
  internalContinuation: Boolean(internalContinuation),
6576
6603
  availableActionNames: Object.keys(availableRequestActions),
6577
6604
  });
6578
- surfacedRequestActions = filterActionsByAllowedNames(availableRequestActions, surface.allowedActionNames);
6579
- if (requestedHostedHarness) {
6580
- surfacedRequestActions = filterActionsByAllowedNames(surfacedRequestActions, filterHostedHarnessToolNames(Object.keys(surfacedRequestActions)));
6581
- }
6582
- const allowedNames = Object.keys(surfacedRequestActions);
6605
+ const normalizedSurface = normalizeAgentActionSurfaceResolution(surface);
6583
6606
  const runCtx = ensureRequestRunContext();
6584
- if (runCtx)
6585
- runCtx.allowedActionNames = allowedNames;
6586
- if (!isBackgroundWorker) {
6587
- body.__resolvedActionSurface = {
6588
- orgId: getRequestOrgId() ?? null,
6589
- allowedActionNames: allowedNames,
6590
- };
6607
+ if (normalizedSurface.mode === "default") {
6608
+ useDefaultRequestActionSurface = true;
6609
+ if (runCtx)
6610
+ delete runCtx.allowedActionNames;
6611
+ if (!isBackgroundWorker) {
6612
+ body.__resolvedActionSurface = {
6613
+ orgId: getRequestOrgId() ?? null,
6614
+ mode: "default",
6615
+ };
6616
+ }
6617
+ }
6618
+ else {
6619
+ surfacedRequestActions = filterActionsByAllowedNames(availableRequestActions, normalizedSurface.allowedActionNames);
6620
+ if (requestedHostedHarness) {
6621
+ surfacedRequestActions = filterActionsByAllowedNames(surfacedRequestActions, filterHostedHarnessToolNames(Object.keys(surfacedRequestActions)));
6622
+ }
6623
+ const allowedNames = Object.keys(surfacedRequestActions);
6624
+ if (runCtx)
6625
+ runCtx.allowedActionNames = allowedNames;
6626
+ if (!isBackgroundWorker) {
6627
+ body.__resolvedActionSurface = {
6628
+ orgId: getRequestOrgId() ?? null,
6629
+ allowedActionNames: allowedNames,
6630
+ };
6631
+ }
6591
6632
  }
6592
6633
  }
6593
6634
  // DIAGNOSTIC-ONLY: owner/request context prep (resolveAgentOwnerEmail +
@@ -7075,9 +7116,9 @@ export function createProductionAgentHandler(options) {
7075
7116
  ? createPlanModeActionRegistry(surfacedRequestActions)
7076
7117
  : surfacedRequestActions;
7077
7118
  const availableRequestTools = getEngineTools(requestActions);
7078
- const initialRequestTools = options.resolveActionSurface
7079
- ? availableRequestTools
7080
- : filterInitialEngineTools(availableRequestTools, options.initialToolNames);
7119
+ const initialRequestTools = useDefaultRequestActionSurface
7120
+ ? filterInitialEngineTools(availableRequestTools, options.initialToolNames)
7121
+ : availableRequestTools;
7081
7122
  const requestTools = requestMode === "plan"
7082
7123
  ? preloadPlanModeEngineTools({
7083
7124
  request: requestMessage,
@@ -208,6 +208,9 @@ export interface AgentChatRequest {
208
208
  __resolvedActionSurface?: {
209
209
  orgId: string | null;
210
210
  allowedActionNames: string[];
211
+ } | {
212
+ orgId: string | null;
213
+ mode: "default";
211
214
  };
212
215
  /**
213
216
  * Stable identity for the logical assistant turn this request belongs to.