@agent-native/core 0.137.2 → 0.137.4

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 (176) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  3. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +53 -1
  4. package/corpus/templates/analytics/actions/gong-calls.ts +37 -17
  5. package/corpus/templates/analytics/app/lib/data-sources.ts +1 -1
  6. package/corpus/templates/analytics/server/lib/gong.ts +51 -2
  7. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  8. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +53 -1
  9. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  10. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +53 -1
  11. package/corpus/templates/brain/app/routes/settings.tsx +1 -1
  12. package/corpus/templates/brain/server/register-secrets.ts +1 -1
  13. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  14. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +53 -1
  15. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  16. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  17. package/corpus/templates/chat/AGENTS.md +11 -0
  18. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
  19. package/corpus/templates/chat/app/root.tsx +1 -1
  20. package/corpus/templates/chat/app/routes/agent.tsx +29 -13
  21. package/corpus/templates/chat/vite.config.ts +42 -0
  22. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  23. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +53 -1
  24. package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -3
  25. package/corpus/templates/clips/app/components/library/library-grid.tsx +2 -6
  26. package/corpus/templates/clips/app/components/library/library-layout.tsx +2 -6
  27. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +1 -3
  28. package/corpus/templates/clips/app/routes/bug-report.tsx +1 -8
  29. package/corpus/templates/clips/app/routes/import.tsx +1 -3
  30. package/corpus/templates/clips/changelog/2026-08-04-recording-buttons-are-now-text-only-for-a-cleaner-clips-inte.md +6 -0
  31. package/corpus/templates/clips/changelog/2026-08-04-save-settings-now-matches-the-other-clips-settings-buttons.md +6 -0
  32. package/corpus/templates/clips/chrome-extension/src/styles.css +1 -0
  33. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  34. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +53 -1
  35. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  36. package/corpus/templates/crm/app/routes/settings.tsx +2 -2
  37. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  38. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +53 -1
  39. package/corpus/templates/design/actions/import-figma-clipboard.ts +1 -1
  40. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  41. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +53 -1
  42. package/corpus/templates/dispatch/changelog/2026-08-04-dispatch-keeps-connected-chats-out-of-local-history-by-defau.md +6 -0
  43. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  44. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +53 -1
  45. package/corpus/templates/factory/README.md +1 -1
  46. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  47. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +53 -1
  48. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  49. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +53 -1
  50. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  51. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +53 -1
  52. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +0 -2
  53. package/corpus/templates/mail/app/pages/SettingsPage.tsx +1 -1
  54. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  55. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +53 -1
  56. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  57. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +53 -1
  58. package/corpus/templates/slides/actions/generate-image-api.ts +15 -4
  59. package/corpus/templates/slides/actions/import-google-slides-reference.ts +83 -0
  60. package/corpus/templates/slides/actions/import-pptx.ts +134 -117
  61. package/corpus/templates/slides/app/components/editor/GoogleSlidesReferenceImport.tsx +387 -0
  62. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +78 -48
  63. package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +377 -187
  64. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -1
  65. package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +20 -1
  66. package/corpus/templates/slides/app/i18n/en-US.ts +15 -0
  67. package/corpus/templates/slides/app/lib/new-deck-reference-selection.ts +22 -0
  68. package/corpus/templates/slides/app/pages/DeckEditor.tsx +4 -1
  69. package/corpus/templates/slides/app/pages/Index.tsx +172 -85
  70. package/corpus/templates/slides/server/lib/assets-image-delegation.ts +4 -2
  71. package/corpus/templates/slides/shared/api.ts +14 -1
  72. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  73. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +53 -1
  74. package/dist/chat-threads/schema.d.ts +57 -0
  75. package/dist/chat-threads/schema.js +3 -0
  76. package/dist/chat-threads/store.d.ts +26 -0
  77. package/dist/chat-threads/store.js +84 -6
  78. package/dist/client/AgentPanel.js +11 -5
  79. package/dist/client/ConnectBuilderCard.js +1 -1
  80. package/dist/client/agent-page/AgentEmptyState.d.ts +2 -1
  81. package/dist/client/agent-page/AgentEmptyState.js +6 -2
  82. package/dist/client/agent-page/AgentJobsTab.d.ts +3 -1
  83. package/dist/client/agent-page/AgentJobsTab.js +55 -44
  84. package/dist/client/agent-page/AgentTabFrame.d.ts +2 -1
  85. package/dist/client/agent-page/AgentTabFrame.js +4 -2
  86. package/dist/client/agent-page/AgentTabsPage.js +12 -8
  87. package/dist/client/agent-page/AgentWorkspaceContent.d.ts +10 -0
  88. package/dist/client/agent-page/AgentWorkspaceContent.js +110 -0
  89. package/dist/client/agent-page/AutomationDetailsDialog.js +1 -1
  90. package/dist/client/chat/run-recovery.js +3 -3
  91. package/dist/client/error-format.js +1 -1
  92. package/dist/client/integrations/IntegrationsPanel.d.ts +1 -0
  93. package/dist/client/integrations/IntegrationsPanel.js +149 -5
  94. package/dist/client/onboarding/FirstRunOnboarding.js +130 -15
  95. package/dist/client/onboarding/index.d.ts +1 -1
  96. package/dist/client/onboarding/index.js +1 -1
  97. package/dist/client/onboarding/use-onboarding.js +12 -2
  98. package/dist/client/onboarding/use-preview-mode.d.ts +4 -0
  99. package/dist/client/onboarding/use-preview-mode.js +9 -0
  100. package/dist/client/resources/BuiltinCapabilityDetail.js +2 -2
  101. package/dist/client/resources/ResourceTree.d.ts +4 -1
  102. package/dist/client/resources/ResourceTree.js +13 -8
  103. package/dist/client/resources/ResourcesPanel.js +7 -3
  104. package/dist/client/resources/mcp-integration-catalog.js +4 -4
  105. package/dist/client/resources/use-mcp-servers.js +6 -6
  106. package/dist/client/settings/AgentsSection.js +15 -16
  107. package/dist/client/settings/AutomationsSection.js +1 -1
  108. package/dist/client/settings/DemoModeSection.js +1 -1
  109. package/dist/client/settings/SettingsPanel.d.ts +3 -1
  110. package/dist/client/settings/SettingsPanel.js +284 -88
  111. package/dist/client/settings/SettingsRow.js +1 -1
  112. package/dist/client/settings/SettingsSection.d.ts +6 -4
  113. package/dist/client/settings/SettingsSection.js +6 -6
  114. package/dist/client/settings/SettingsTabsPage.js +47 -25
  115. package/dist/client/settings/VoiceTranscriptionSection.d.ts +3 -1
  116. package/dist/client/settings/VoiceTranscriptionSection.js +20 -8
  117. package/dist/client/settings/agent-settings-search.d.ts +1 -1
  118. package/dist/client/settings/agent-settings-search.js +8 -8
  119. package/dist/client/transcription/BuilderTranscriptionCta.js +2 -2
  120. package/dist/client/use-chat-threads.d.ts +9 -0
  121. package/dist/client/use-chat-threads.js +22 -6
  122. package/dist/collab/routes.d.ts +1 -1
  123. package/dist/integrations/google-docs-poller.js +9 -1
  124. package/dist/integrations/webhook-handler.js +11 -1
  125. package/dist/jobs/scheduler.d.ts +4 -1
  126. package/dist/jobs/scheduler.js +34 -9
  127. package/dist/localization/default-messages.js +40 -40
  128. package/dist/mcp-client/oauth-routes.js +1 -1
  129. package/dist/notifications/routes.d.ts +1 -1
  130. package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
  131. package/dist/provider-api/actions/provider-api.d.ts +15 -15
  132. package/dist/resources/handlers.d.ts +1 -1
  133. package/dist/secrets/onboarding.js +1 -1
  134. package/dist/secrets/routes.d.ts +9 -9
  135. package/dist/server/agent-chat/browser-team-tools.d.ts +1 -0
  136. package/dist/server/agent-chat/browser-team-tools.js +1 -0
  137. package/dist/server/agent-chat-plugin.js +14 -1
  138. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  139. package/dist/server/agent-teams.d.ts +2 -0
  140. package/dist/server/agent-teams.js +2 -0
  141. package/dist/server/workspace-provider-oauth.js +1 -1
  142. package/dist/setup-connections/onboarding.js +2 -2
  143. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  144. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  145. package/dist/templates/chat/AGENTS.md +11 -0
  146. package/dist/templates/chat/app/components/layout/Layout.tsx +1 -1
  147. package/dist/templates/chat/app/root.tsx +1 -1
  148. package/dist/templates/chat/app/routes/agent.tsx +29 -13
  149. package/dist/templates/chat/vite.config.ts +42 -0
  150. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  151. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +53 -1
  152. package/dist/templates/default/AGENTS.md +11 -0
  153. package/dist/templates/default/vite.config.ts +42 -0
  154. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  155. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  156. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +53 -1
  157. package/dist/templates/workspace-core/AGENTS.md +11 -0
  158. package/dist/templates/workspace-root/AGENTS.md +14 -0
  159. package/dist/vite/client.js +56 -0
  160. package/package.json +2 -2
  161. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  162. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +53 -1
  163. package/src/templates/chat/AGENTS.md +11 -0
  164. package/src/templates/chat/app/components/layout/Layout.tsx +1 -1
  165. package/src/templates/chat/app/root.tsx +1 -1
  166. package/src/templates/chat/app/routes/agent.tsx +29 -13
  167. package/src/templates/chat/vite.config.ts +42 -0
  168. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  169. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +53 -1
  170. package/src/templates/default/AGENTS.md +11 -0
  171. package/src/templates/default/vite.config.ts +42 -0
  172. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  173. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +33 -0
  174. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +53 -1
  175. package/src/templates/workspace-core/AGENTS.md +11 -0
  176. package/src/templates/workspace-root/AGENTS.md +14 -0
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -1800,7 +1800,6 @@ function AppLayoutInner({ children }: AppLayoutProps) {
1800
1800
  feedback={feedbackButton}
1801
1801
  search={searchButton}
1802
1802
  collapse={collapseButton}
1803
- className={showCollapsedSidebar ? undefined : "px-0 py-0"}
1804
1803
  />
1805
1804
  </div>
1806
1805
  </>
@@ -2193,7 +2192,6 @@ function StandardLayout({ children }: AppLayoutProps) {
2193
2192
  feedback={feedbackButton}
2194
2193
  search={searchButton}
2195
2194
  collapse={collapseButton}
2196
- className="px-0 py-0"
2197
2195
  />
2198
2196
  </div>
2199
2197
  </div>
@@ -1476,7 +1476,7 @@ export function SettingsPage() {
1476
1476
  const [searchParams, setSearchParams] = useSearchParams();
1477
1477
  const navState = useNavigationState();
1478
1478
  const agentSettingsTabs = useAgentSettingsTabs();
1479
- const [activeSection, setActiveSection] = useState<string>("general");
1479
+ const [activeSection, setActiveSection] = useState<string>("integrations");
1480
1480
 
1481
1481
  const mailTabs = useMemo<SettingsTabItem[]>(
1482
1482
  () => [
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -32,6 +32,39 @@ Move behavior into shared toolkit primitives when it is:
32
32
  Keep behavior app-local when the abstraction would hide important domain
33
33
  language or make a simple app-specific workflow harder to understand.
34
34
 
35
+ ## Agent Surface Contract
36
+
37
+ The repeated app shell has two distinct navigation surfaces:
38
+
39
+ - The left rail owns domain destinations, settings, and chat history when the
40
+ app has a full-page chat route. Do not label a domain workflow as `Chat` just
41
+ because the app was scaffolded from the chat template.
42
+ - The right `AgentSidebar` owns contextual agent work. Domain buttons that call
43
+ `sendToAgentChat` should open it (`openSidebar: true`) so the user can see,
44
+ steer, and review the agent without losing the page they were using.
45
+ - Keep `/` or `/chat/*` as the full-page chat surface when the starter provides
46
+ one. Put domain workflows on named routes and wire the shell's route checks,
47
+ navigation labels, and handoffs to those routes together.
48
+ - Use familiar message or neutral action icons for agent affordances. Never use
49
+ sparkle, wand, magic, or robot icons as an AI label; the copy should carry the
50
+ meaning.
51
+ - Give the right rail a quiet visual boundary with a subtle surface shift,
52
+ divider, or both. The domain page and AgentSidebar should not collapse into a
53
+ single undifferentiated background.
54
+ - Any button labeled as agent work must use `sendToAgentChat` with bounded
55
+ context and `openSidebar: true`; local deterministic analysis should be
56
+ labeled as local, preview, or analyze. For original/generated review, stack
57
+ the source above the result by default and use side-by-side only for short,
58
+ highly scannable content.
59
+ - Standalone apps with `AgentSidebar` must resolve one assistant-ui runtime
60
+ context. Match direct assistant-ui pins to the installed core/toolkit peer
61
+ graph, use Vite dedupe/aliases when linked dependencies can split contexts,
62
+ and verify an AI handoff produces no stale-index console error.
63
+
64
+ Contextual agent UI is not a reason to expose every option at once. Start with
65
+ the domain task's primary action, reveal review or configuration only when the
66
+ current state needs it, and let the sidebar carry conversational depth.
67
+
35
68
  ## Discover Before Building
36
69
 
37
70
  Before creating an app-local version of repeated workspace or agent UI:
@@ -77,7 +77,10 @@ passed this requirement yet.
77
77
 
78
78
  ## Aesthetic Guidelines
79
79
 
80
- - **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
80
+ - **Typography**: Use the product's existing type system first. For SaaS and
81
+ operational apps, make a clear sans-serif hierarchy the default; reserve a
82
+ serif or editorial face for a deliberate content preview or brand moment,
83
+ not the whole application shell.
81
84
  - **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
82
85
  - **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library. Never `transition-all` — list the properties that actually change (e.g. `transition-[opacity,transform]`). Use the shared easing tokens defined in `packages/core/src/styles/agent-native.css` instead of hand-typing curves: `var(--ease-drawer)` (260ms, drawers/app chrome), `var(--ease-collapse)` (200ms, expand/collapse), `var(--ease-out-strong)` (snappy entrances) — in Tailwind, `ease-[var(--ease-collapse)]`. Enter/exit with ease-out, never `ease-in`. Overlays that zoom in must set the Radix origin var (e.g. `origin-[--radix-popover-content-transform-origin]`). Animate `transform`/`opacity`, not width/height/padding/box-shadow. Gate looping or large-movement animations with `motion-reduce:`. Command palettes and keyboard-triggered actions get no animation.
83
86
  - **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
@@ -115,6 +118,55 @@ passed this requirement yet.
115
118
  - Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
116
119
  - Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
117
120
 
121
+ ### Agent Surface And Page Boundaries
122
+
123
+ - Treat the domain UI and the agent as two coordinated surfaces. The domain
124
+ page should make the repeatable job fast; the agent should handle judgment,
125
+ exploration, and actions that benefit from conversation.
126
+ - Keep domain work on a named domain route such as `/automations`, `/block`, or
127
+ `/workflow`. Preserve the starter's full-page chat route (`/` or `/chat/*`)
128
+ when it exists; do not replace it with a domain form while leaving the shell
129
+ configured as if it were chat.
130
+ - Use the persistent right `AgentSidebar` for contextual AI. A button that
131
+ sends work to `sendToAgentChat` must open or focus that sidebar and leave the
132
+ user on the current domain surface. Use full-page chat for chat-first work,
133
+ not as a hidden transport for a domain button.
134
+ - Keep the left navigation domain-specific. A page called Automations,
135
+ Block time, or Create deck should not be nested under a generic Chat item;
136
+ Chat is its own destination and the right rail is the contextual assistant.
137
+ - Never use sparkle, wand, magic, robot, or similar decorative AI icons. Use a
138
+ familiar message, assistant, or neutral action icon, and let the button copy
139
+ explain the intent. An icon-only control needs a tooltip and accessible name.
140
+ - Give the persistent agent drawer a quiet but intentional boundary: a subtle
141
+ surface shift, divider, or both. The sidebar and domain page should not read
142
+ as one undifferentiated slab, and the treatment should remain calm when the
143
+ drawer opens or closes.
144
+ - Treat an AI-labeled button as a contract. Buttons named Ask agent, Review
145
+ with agent, Refine, Generate with AI, or similar must call
146
+ `sendToAgentChat` with bounded context, `openSidebar: true`, and the intended
147
+ `submit` mode. A deterministic local action is useful, but label it local,
148
+ preview, or analyze rather than implying it invoked an agent.
149
+
150
+ ### Product Surface Review
151
+
152
+ Before shipping a new app or a substantial redesign, review the first viewport
153
+ as an operator would use it repeatedly:
154
+
155
+ - Show one clear job title, the current state, and one primary next action.
156
+ - Put optional inputs, provider choices, diagnostics, long explanations, and
157
+ secondary actions behind a disclosure, a later step, a menu, or the agent
158
+ sidebar. Do not put multiple unrelated forms side by side by default.
159
+ - Prefer a short step flow or a focused page per domain job over one giant
160
+ dashboard. A route can have several states, but it should reveal one state
161
+ at a time and preserve the user's progress.
162
+ - Remove generic hero copy, feature tours, repeated helper text, nested cards,
163
+ status-chip soup, and decorative AI treatment before adding more styling.
164
+ - For review flows, stack the source/original first and the generated or safe
165
+ result second by default. Use side-by-side comparison only when the content
166
+ is short enough to scan without excessive horizontal reading.
167
+ - Check the result at the target desktop width and a narrow width. If the first
168
+ viewport feels like documentation instead of a tool, subtract again.
169
+
118
170
  ## shadcn/ui Design Rules
119
171
 
120
172
  - Use built-in component variants first (`variant`, `size`) before overriding classes.
@@ -8,7 +8,10 @@ import {
8
8
  extractAssetUrl,
9
9
  imagePreviewMarkdown,
10
10
  } from "../server/lib/assets-image-delegation.js";
11
- import { DEFAULT_STYLE_REFERENCE_URLS } from "../shared/api.js";
11
+ import {
12
+ DEFAULT_STYLE_REFERENCE_URLS,
13
+ normalizeReferenceUrls,
14
+ } from "../shared/api.js";
12
15
 
13
16
  interface ReferenceImage {
14
17
  data: string; // base64
@@ -47,6 +50,10 @@ export default defineAction({
47
50
  .string()
48
51
  .optional()
49
52
  .describe("HTML of the target slide, used as generation context"),
53
+ referenceImageUrls: z
54
+ .array(z.string())
55
+ .optional()
56
+ .describe("Style reference URLs to forward to Assets"),
50
57
  }),
51
58
  run: async (args) => {
52
59
  const prompt = args.prompt;
@@ -59,6 +66,7 @@ export default defineAction({
59
66
  deckId: args.deckId,
60
67
  slideId: args.slideId,
61
68
  slideContent: args.slideContent,
69
+ referenceImageUrls: normalizeReferenceUrls(args.referenceImageUrls),
62
70
  });
63
71
 
64
72
  if (delegation.status === "delegated") {
@@ -78,7 +86,7 @@ export default defineAction({
78
86
  if (delegation.status === "pending") {
79
87
  throw new Error(
80
88
  `Assets is still generating (task ${delegation.taskId}, state "${delegation.lastState}"). ` +
81
- `It was not cancelled check the Assets app for the result instead of generating again.`,
89
+ `It was not cancelled - check the Assets app for the result instead of generating again.`,
82
90
  );
83
91
  }
84
92
 
@@ -88,7 +96,7 @@ export default defineAction({
88
96
  );
89
97
  }
90
98
 
91
- // Assets is unreachable standalone-deploy fallback. The caller is told
99
+ // Assets is unreachable - standalone-deploy fallback. The caller is told
92
100
  // which path ran and why, so a brand-inconsistent image is never reported
93
101
  // as a library-grounded one.
94
102
  const { getProvider } =
@@ -97,7 +105,10 @@ export default defineAction({
97
105
 
98
106
  const refImages: ReferenceImage[] = [];
99
107
  const results = await Promise.all(
100
- DEFAULT_STYLE_REFERENCE_URLS.map(urlToReferenceImage),
108
+ normalizeReferenceUrls([
109
+ ...DEFAULT_STYLE_REFERENCE_URLS,
110
+ ...normalizeReferenceUrls(args.referenceImageUrls),
111
+ ]).map(urlToReferenceImage),
101
112
  );
102
113
  for (const r of results) {
103
114
  if (r) refImages.push(r);
@@ -0,0 +1,83 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import { buildDeepLink } from "@agent-native/core/server";
3
+ import { getRequestUserEmail } from "@agent-native/core/server/request-context";
4
+ import { z } from "zod";
5
+
6
+ import { getGoogleDocsAccessToken } from "../server/lib/google-docs-oauth.js";
7
+ import { importPptxBufferToDeck } from "./import-pptx.js";
8
+
9
+ function deckDeepLink(deckId: string): string {
10
+ return buildDeepLink({
11
+ app: "slides",
12
+ view: "editor",
13
+ params: { deckId },
14
+ });
15
+ }
16
+
17
+ async function exportGoogleSlidesAsPptx(fileId: string, accessToken: string) {
18
+ const response = await fetch(
19
+ `https://www.googleapis.com/drive/v3/files/${encodeURIComponent(fileId)}/export?mimeType=application/vnd.openxmlformats-officedocument.presentationml.presentation`,
20
+ {
21
+ headers: { Authorization: `Bearer ${accessToken}` },
22
+ },
23
+ );
24
+
25
+ if (!response.ok) {
26
+ throw new Error(
27
+ `Google Drive returned HTTP ${response.status} while exporting the presentation.`,
28
+ );
29
+ }
30
+
31
+ const bytes = await response.arrayBuffer();
32
+ if (bytes.byteLength === 0) {
33
+ throw new Error("Google Drive returned an empty presentation export.");
34
+ }
35
+
36
+ return Buffer.from(bytes);
37
+ }
38
+
39
+ export default defineAction({
40
+ description:
41
+ "Import a Google Slides deck selected from Google Picker and save it as a reusable Slides reference deck. " +
42
+ "The selected presentation is exported from Drive as PPTX, parsed, and stored as a normal deck in the caller's Slides workspace.",
43
+ schema: z.object({
44
+ fileId: z.string().describe("Google Slides file ID from Google Picker"),
45
+ title: z
46
+ .string()
47
+ .optional()
48
+ .describe("Optional title for the imported reference deck"),
49
+ }),
50
+ run: async ({ fileId, title }) => {
51
+ const owner = getRequestUserEmail();
52
+ if (!owner) throw new Error("no authenticated user");
53
+
54
+ const connection = await getGoogleDocsAccessToken(owner);
55
+ if (!connection) {
56
+ throw new Error(
57
+ "Connect Google Docs before importing a Google Slides deck.",
58
+ );
59
+ }
60
+
61
+ const fileBuffer = await exportGoogleSlidesAsPptx(
62
+ fileId,
63
+ connection.accessToken,
64
+ );
65
+ return importPptxBufferToDeck({
66
+ fileBuffer,
67
+ title,
68
+ source: "import-google-slides-reference",
69
+ });
70
+ },
71
+ link: ({ result }) => {
72
+ const id =
73
+ result && typeof result === "object"
74
+ ? (result as { id?: string }).id
75
+ : undefined;
76
+ if (!id) return null;
77
+ return {
78
+ url: deckDeepLink(id),
79
+ label: "Open deck in Slides",
80
+ view: "editor",
81
+ };
82
+ },
83
+ });