@agent-native/core 0.136.4 → 0.137.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/clips/.agents/skills/recording/SKILL.md +53 -0
  3. package/corpus/templates/clips/actions/import-loom-recording.ts +7 -0
  4. package/corpus/templates/clips/actions/lib/loom-import-job.ts +24 -4
  5. package/corpus/templates/clips/app/components/import-menu.tsx +109 -0
  6. package/corpus/templates/clips/app/components/library/library-grid.tsx +8 -18
  7. package/corpus/templates/clips/app/components/library/library-layout.tsx +14 -50
  8. package/corpus/templates/clips/app/components/library/sort-menu.tsx +20 -6
  9. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +10 -34
  10. package/corpus/templates/clips/app/routes/_app.library._index.tsx +0 -2
  11. package/corpus/templates/clips/changelog/2026-08-03-restart-during-a-recording-now-immediately-starts-a-fresh-ta.md +6 -0
  12. package/corpus/templates/clips/changelog/2026-08-04-cleaner-library-controls-with-an-icon-only-sort-button.md +6 -0
  13. package/corpus/templates/clips/changelog/2026-08-04-upload-and-loom-imports-now-live-under-one-import-menu.md +6 -0
  14. package/corpus/templates/clips/desktop/src/app.tsx +81 -30
  15. package/corpus/templates/clips/desktop/src/lib/recorder.ts +436 -158
  16. package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +14 -1
  17. package/corpus/templates/clips/server/plugins/auth.ts +9 -0
  18. package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +13 -0
  19. package/corpus/templates/content/actions/_database-utils.ts +6 -0
  20. package/corpus/templates/content/actions/bind-content-database-source-field.ts +273 -97
  21. package/corpus/templates/content/actions/change-content-database-source-role.ts +65 -29
  22. package/corpus/templates/content/actions/configure-document-property.ts +113 -32
  23. package/corpus/templates/content/actions/delete-content-database.ts +5 -7
  24. package/corpus/templates/content/actions/delete-document-property.ts +109 -62
  25. package/corpus/templates/content/actions/delete-document.ts +178 -36
  26. package/corpus/templates/content/actions/duplicate-database-item.ts +27 -0
  27. package/corpus/templates/content/actions/duplicate-database-items.ts +31 -1
  28. package/corpus/templates/content/actions/permanently-delete-document.ts +4 -6
  29. package/corpus/templates/content/actions/remove-database-items.ts +13 -0
  30. package/corpus/templates/content/actions/set-document-property.ts +69 -1
  31. package/corpus/templates/content/actions/upsert-database-item-by-key.ts +814 -0
  32. package/corpus/templates/content/parity/matrix.md +1 -1
  33. package/corpus/templates/content/parity/matrix.ts +1 -0
  34. package/corpus/templates/content/server/db/schema.ts +27 -0
  35. package/corpus/templates/content/server/plugins/db.ts +24 -0
  36. package/corpus/templates/design/app/components/design/BreakpointBar.tsx +122 -114
  37. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +2 -2
  38. package/corpus/templates/design/app/components/design/EditPanel.tsx +68 -34
  39. package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +78 -4
  40. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +8 -0
  41. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +5 -2
  42. package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +10 -9
  43. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +31 -69
  44. package/corpus/templates/design/app/components/design/inspector/design-icons.tsx +80 -106
  45. package/corpus/templates/design/app/components/design/multi-screen/types.ts +4 -0
  46. package/corpus/templates/design/app/hooks/use-editor-preferences.ts +75 -0
  47. package/corpus/templates/design/app/i18n-data.ts +8 -0
  48. package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +61 -0
  49. package/corpus/templates/design/app/pages/design-editor/editor-preferences.ts +98 -0
  50. package/corpus/templates/design/app/pages/design-editor/nudge-intent.ts +491 -0
  51. package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +133 -0
  52. package/corpus/templates/design/app/pages/design-editor/png-export-render.ts +8 -0
  53. package/corpus/templates/design/app/pages/design-editor/selection-state.ts +5 -12
  54. package/corpus/templates/design/changelog/2026-08-03-arrow-keys-now-reorder-a-layer-inside-an-auto-layout-frame.md +6 -0
  55. package/corpus/templates/design/changelog/2026-08-03-auto-layout-flow-icons-show-the-direction-at-a-glance-instea.md +6 -0
  56. package/corpus/templates/design/changelog/2026-08-03-auto-layout-icons-share-one-outlined-square-style-so-flow-ga.md +6 -0
  57. package/corpus/templates/design/changelog/2026-08-03-export-has-a-named-preview-section-you-can-expand-replacing-.md +6 -0
  58. package/corpus/templates/design/changelog/2026-08-03-export-preview-shows-the-selected-element-instead-of-the-who.md +6 -0
  59. package/corpus/templates/design/changelog/2026-08-03-inspector-sections-show-an-expand-indicator-so-it-is-clear-w.md +6 -0
  60. package/corpus/templates/design/changelog/2026-08-03-paste-lands-inside-a-selected-frame-instead-of-beside-it.md +6 -0
  61. package/corpus/templates/design/changelog/2026-08-03-the-add-breakpoint-button-sits-outside-the-breakpoint-select.md +6 -0
  62. package/corpus/templates/design/changelog/2026-08-03-the-agent-s-follow-up-questions-keep-space-below-the-continu.md +6 -0
  63. package/corpus/templates/design/changelog/2026-08-03-the-agent-s-follow-up-questions-share-the-chat-panel-s-backg.md +6 -0
  64. package/corpus/templates/design/changelog/2026-08-03-the-export-panel-no-longer-stacks-a-duplicate-export-block-o.md +6 -0
  65. package/corpus/templates/design/changelog/2026-08-03-the-text-tool-uses-a-t-icon-matching-the-letter-it-inserts.md +6 -0
  66. package/corpus/templates/factory/.env.example +17 -0
  67. package/corpus/templates/factory/AGENTS.md +27 -17
  68. package/corpus/templates/factory/README.md +19 -9
  69. package/corpus/templates/factory/actions/get-slack-feedback-context.ts +90 -0
  70. package/corpus/templates/factory/actions/get-triage-config.ts +14 -3
  71. package/corpus/templates/factory/actions/govern-agent-native-pull-request.ts +386 -0
  72. package/corpus/templates/factory/actions/list-factory-automations.ts +53 -0
  73. package/corpus/templates/factory/actions/list-triage-items.ts +7 -2
  74. package/corpus/templates/factory/actions/poll-github-sources.ts +203 -0
  75. package/corpus/templates/factory/actions/poll-sentry-errors.ts +161 -0
  76. package/corpus/templates/factory/actions/poll-slack-channel.ts +4 -2
  77. package/corpus/templates/factory/actions/run-factory-automation.ts +42 -0
  78. package/corpus/templates/factory/actions/save-factory-automation.ts +69 -0
  79. package/corpus/templates/factory/actions/save-triage-config.ts +28 -2
  80. package/corpus/templates/factory/actions/start-builder-for-item.ts +411 -0
  81. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +14 -3
  82. package/corpus/templates/factory/app/components/ui/checkbox.tsx +1 -0
  83. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +7 -0
  84. package/corpus/templates/factory/app/i18n/en-US.ts +35 -1
  85. package/corpus/templates/factory/app/routes/factory.tsx +462 -9
  86. package/corpus/templates/factory/changelog/2026-08-04-added-organization-owned-factory-automations-for-slack-bug-t.md +6 -0
  87. package/corpus/templates/factory/changelog/2026-08-04-automation-editor-controls-and-model-picker.md +6 -0
  88. package/corpus/templates/factory/netlify.toml +2 -2
  89. package/corpus/templates/factory/server/connectors/credentials.ts +6 -5
  90. package/corpus/templates/factory/server/connectors/slack.ts +133 -5
  91. package/corpus/templates/factory/server/db/schema.ts +6 -0
  92. package/corpus/templates/factory/server/lib/require-factory-automation.ts +65 -0
  93. package/corpus/templates/factory/server/plugins/agent-chat.ts +29 -11
  94. package/corpus/templates/factory/server/plugins/auth.ts +1 -0
  95. package/corpus/templates/factory/server/plugins/factory-migrations.ts +12 -0
  96. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +218 -67
  97. package/corpus/templates/factory/server/triage/builder-executor.ts +4 -0
  98. package/corpus/templates/factory/server/triage/contracts.ts +14 -1
  99. package/corpus/templates/factory/server/triage/github-client.ts +404 -0
  100. package/corpus/templates/factory/server/triage/metadata.ts +44 -0
  101. package/corpus/templates/factory/server/triage/pr-babysit.ts +5 -5
  102. package/corpus/templates/factory/server/triage/pr-policy.ts +144 -0
  103. package/corpus/templates/factory/server/triage/sentry-client.ts +180 -0
  104. package/corpus/templates/factory/server/triage/slack-client.ts +43 -0
  105. package/corpus/templates/factory/server/triage/slack-poller.ts +9 -2
  106. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +27 -0
  107. package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +14 -4
  108. package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +7 -0
  109. package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +7 -0
  110. package/corpus/templates/plan/actions/create-plan-design.ts +8 -6
  111. package/corpus/templates/plan/actions/create-prototype-plan.ts +8 -6
  112. package/corpus/templates/plan/actions/create-ui-plan.ts +7 -7
  113. package/corpus/templates/plan/actions/get-plan-blocks.ts +7 -1
  114. package/corpus/templates/plan/actions/validate-plan-input.ts +39 -0
  115. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +167 -11
  116. package/corpus/templates/plan/app/i18n/en-US.ts +1 -0
  117. package/corpus/templates/plan/changelog/2026-08-04-canvas-zoom-controls-now-explain-the-command-ctrl-plus-scrol.md +6 -0
  118. package/corpus/templates/plan/changelog/2026-08-04-pinch-to-zoom-is-now-supported-on-touchscreens-in-visual-pla.md +6 -0
  119. package/corpus/templates/plan/shared/plan-content.ts +17 -2
  120. package/dist/cli/skills-content/canvas.d.ts +3 -3
  121. package/dist/cli/skills-content/canvas.js +16 -5
  122. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  123. package/dist/cli/skills-content/visual-plan-skill.js +27 -0
  124. package/dist/cli/skills-content/wireframe.d.ts +2 -2
  125. package/dist/cli/skills-content/wireframe.js +7 -0
  126. package/dist/client/AgentPanel.js +23 -8
  127. package/dist/client/api-path.d.ts +6 -0
  128. package/dist/client/api-path.js +55 -0
  129. package/dist/client/onboarding/FirstRunOnboarding.d.ts +3 -0
  130. package/dist/client/onboarding/FirstRunOnboarding.js +93 -0
  131. package/dist/client/onboarding/first-run-enabled.d.ts +2 -0
  132. package/dist/client/onboarding/first-run-enabled.js +9 -0
  133. package/dist/client/onboarding/index.d.ts +2 -1
  134. package/dist/client/onboarding/index.js +1 -0
  135. package/dist/client/onboarding/use-onboarding.d.ts +6 -1
  136. package/dist/client/onboarding/use-onboarding.js +32 -1
  137. package/dist/client/route-state.js +10 -0
  138. package/dist/client/settings/SecretsSection.js +32 -8
  139. package/dist/collab/struct-routes.d.ts +1 -1
  140. package/dist/connections/catalog.d.ts +4 -4
  141. package/dist/connections/catalog.js +3 -3
  142. package/dist/db/index.d.ts +1 -1
  143. package/dist/db/index.js +1 -1
  144. package/dist/localization/default-messages.d.ts +5 -0
  145. package/dist/localization/default-messages.js +5 -0
  146. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  147. package/dist/observability/routes.d.ts +3 -3
  148. package/dist/onboarding/app-profile.d.ts +4 -0
  149. package/dist/onboarding/app-profile.js +378 -0
  150. package/dist/onboarding/index.d.ts +2 -1
  151. package/dist/onboarding/index.js +1 -0
  152. package/dist/onboarding/plugin.d.ts +2 -0
  153. package/dist/onboarding/plugin.js +21 -1
  154. package/dist/onboarding/types.d.ts +19 -0
  155. package/dist/progress/routes.d.ts +1 -1
  156. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  157. package/dist/provider-api/actions/provider-api.d.ts +12 -12
  158. package/dist/secrets/routes.d.ts +2 -2
  159. package/dist/secrets/routes.js +41 -17
  160. package/dist/server/auth.js +21 -1
  161. package/dist/server/better-auth-instance.d.ts +3 -2
  162. package/dist/server/better-auth-instance.js +9 -7
  163. package/dist/server/email-markdown.js +3 -8
  164. package/dist/server/transcribe-voice.d.ts +1 -1
  165. package/dist/shared/first-run-onboarding.d.ts +3 -0
  166. package/dist/shared/first-run-onboarding.js +3 -0
  167. package/dist/triggers/index.d.ts +3 -0
  168. package/dist/triggers/index.js +5 -0
  169. package/docs/content/cross-app-sso.mdx +26 -0
  170. package/package.json +1 -1
@@ -0,0 +1,378 @@
1
+ const LLM_CAPABILITY = {
2
+ id: "llm",
3
+ label: "AI model",
4
+ required: true,
5
+ builderIncluded: true,
6
+ keySummary: "One model key: Anthropic, OpenAI, Gemini, Groq, Mistral, or Cohere",
7
+ why: "The agent uses a language model to understand requests and produce answers.",
8
+ };
9
+ const PROFILES = {
10
+ analytics: {
11
+ appId: "analytics",
12
+ appName: "Analytics",
13
+ capabilities: [
14
+ LLM_CAPABILITY,
15
+ {
16
+ id: "data-sources",
17
+ label: "Data sources",
18
+ required: false,
19
+ builderIncluded: false,
20
+ keySummary: "Connectors are added individually in Settings",
21
+ why: "Only needed for the services you want to query, such as GA4, Stripe, or HubSpot.",
22
+ },
23
+ {
24
+ id: "replay-storage",
25
+ label: "Replay storage",
26
+ required: false,
27
+ builderIncluded: true,
28
+ keySummary: "S3-compatible bucket, access key, and secret",
29
+ why: "Only needed when session replay is enabled so recordings can be stored.",
30
+ },
31
+ ],
32
+ },
33
+ assets: {
34
+ appId: "assets",
35
+ appName: "Assets",
36
+ capabilities: [
37
+ {
38
+ id: "media-generation",
39
+ label: "Image and video generation",
40
+ required: true,
41
+ builderIncluded: true,
42
+ keySummary: "Gemini for video, or OpenAI / Gemini for images",
43
+ why: "These providers create the images and videos requested in the app.",
44
+ },
45
+ {
46
+ id: "file-storage",
47
+ label: "Media storage",
48
+ required: true,
49
+ builderIncluded: true,
50
+ keySummary: "S3-compatible endpoint, bucket, access key, and secret",
51
+ why: "Generated files need a durable place to live before they can be shared.",
52
+ },
53
+ ],
54
+ },
55
+ brain: {
56
+ appId: "brain",
57
+ appName: "Brain",
58
+ capabilities: [
59
+ LLM_CAPABILITY,
60
+ {
61
+ id: "embeddings",
62
+ label: "Embeddings",
63
+ required: false,
64
+ builderIncluded: true,
65
+ keySummary: "Gemini, Cohere, or Voyage key",
66
+ why: "Embeddings improve semantic search. Keyword search still works without them.",
67
+ },
68
+ {
69
+ id: "source-connections",
70
+ label: "Source connections",
71
+ required: false,
72
+ builderIncluded: false,
73
+ keySummary: "Slack, Granola, or GitHub connection",
74
+ why: "Only needed for the sources you want to ingest into your knowledge base.",
75
+ },
76
+ ],
77
+ },
78
+ calendar: {
79
+ appId: "calendar",
80
+ appName: "Calendar",
81
+ capabilities: [
82
+ LLM_CAPABILITY,
83
+ {
84
+ id: "google-calendar",
85
+ label: "Google Calendar",
86
+ required: false,
87
+ builderIncluded: false,
88
+ keySummary: "Connect Google Calendar with OAuth",
89
+ why: "Calendar access is an OAuth connection, not an API key to paste.",
90
+ },
91
+ {
92
+ id: "calendar-connectors",
93
+ label: "Other calendar connections",
94
+ required: false,
95
+ builderIncluded: false,
96
+ keySummary: "Zoom, CRM, or enrichment connection",
97
+ why: "Only needed for the provider features you turn on.",
98
+ },
99
+ ],
100
+ },
101
+ chat: {
102
+ appId: "chat",
103
+ appName: "Chat",
104
+ capabilities: [LLM_CAPABILITY],
105
+ },
106
+ clips: {
107
+ appId: "clips",
108
+ appName: "Clips",
109
+ capabilities: [
110
+ LLM_CAPABILITY,
111
+ {
112
+ id: "video-storage",
113
+ label: "Video storage",
114
+ required: true,
115
+ builderIncluded: true,
116
+ keySummary: "S3 endpoint, bucket, access key, and secret",
117
+ why: "Recorded videos need durable storage before they can be played back or shared.",
118
+ },
119
+ {
120
+ id: "transcription",
121
+ label: "Transcription",
122
+ required: false,
123
+ builderIncluded: true,
124
+ keySummary: "Groq or Google Speech key",
125
+ why: "Transcription powers captions, titles, summaries, and searchable chapters. Native capture still works without it.",
126
+ },
127
+ ],
128
+ },
129
+ content: {
130
+ appId: "content",
131
+ appName: "Content",
132
+ capabilities: [
133
+ LLM_CAPABILITY,
134
+ {
135
+ id: "media-storage",
136
+ label: "Media storage",
137
+ required: false,
138
+ builderIncluded: true,
139
+ keySummary: "Builder file storage or S3-compatible storage",
140
+ why: "Only needed for documents that contain uploaded images, video, or audio.",
141
+ },
142
+ {
143
+ id: "notion",
144
+ label: "Notion",
145
+ required: false,
146
+ builderIncluded: false,
147
+ keySummary: "Connect Notion with OAuth",
148
+ why: "Only needed if you want to import or sync workspace content from Notion.",
149
+ },
150
+ ],
151
+ },
152
+ crm: {
153
+ appId: "crm",
154
+ appName: "CRM",
155
+ capabilities: [
156
+ LLM_CAPABILITY,
157
+ {
158
+ id: "crm-connection",
159
+ label: "CRM connection",
160
+ required: false,
161
+ builderIncluded: false,
162
+ keySummary: "Connect HubSpot or Salesforce",
163
+ why: "Connections are shared securely with CRM; no provider token needs to be pasted here.",
164
+ },
165
+ ],
166
+ },
167
+ design: {
168
+ appId: "design",
169
+ appName: "Design",
170
+ capabilities: [
171
+ LLM_CAPABILITY,
172
+ {
173
+ id: "assets-library",
174
+ label: "Assets library",
175
+ required: false,
176
+ builderIncluded: true,
177
+ keySummary: "Connect the Assets app",
178
+ why: "Only needed when designs use managed images or other media assets.",
179
+ },
180
+ {
181
+ id: "figma",
182
+ label: "Figma",
183
+ required: false,
184
+ builderIncluded: false,
185
+ keySummary: "Figma personal access token",
186
+ why: "Only needed to read or update files in Figma.",
187
+ },
188
+ {
189
+ id: "github",
190
+ label: "GitHub",
191
+ required: false,
192
+ builderIncluded: false,
193
+ keySummary: "GitHub token",
194
+ why: "Only needed when designs are connected to a repository.",
195
+ },
196
+ ],
197
+ },
198
+ dispatch: {
199
+ appId: "dispatch",
200
+ appName: "Dispatch",
201
+ capabilities: [
202
+ LLM_CAPABILITY,
203
+ {
204
+ id: "workspace-connections",
205
+ label: "Workspace connections",
206
+ required: false,
207
+ builderIncluded: false,
208
+ keySummary: "Connect providers from the workspace registry",
209
+ why: "Dispatch uses shared connections so provider tokens never need to be pasted into this app.",
210
+ },
211
+ ],
212
+ },
213
+ factory: {
214
+ appId: "factory",
215
+ appName: "Factory",
216
+ capabilities: [
217
+ {
218
+ id: "builder-executor",
219
+ label: "Builder executor",
220
+ required: true,
221
+ builderIncluded: true,
222
+ keySummary: "Connect Builder for managed agent runs",
223
+ why: "The executor runs approved code and review workflows for Factory items.",
224
+ },
225
+ {
226
+ id: "triage-connections",
227
+ label: "Triage connections",
228
+ required: false,
229
+ builderIncluded: false,
230
+ keySummary: "GitHub, Slack, or Sentry connection",
231
+ why: "Only needed for the feedback source you want Factory to monitor.",
232
+ },
233
+ ],
234
+ },
235
+ forms: {
236
+ appId: "forms",
237
+ appName: "Forms",
238
+ capabilities: [
239
+ LLM_CAPABILITY,
240
+ {
241
+ id: "file-storage",
242
+ label: "File storage",
243
+ required: false,
244
+ builderIncluded: true,
245
+ keySummary: "Builder file storage or S3-compatible storage",
246
+ why: "Text-only forms work without storage. Add it when a form accepts file uploads.",
247
+ },
248
+ ],
249
+ },
250
+ macros: {
251
+ appId: "macros",
252
+ appName: "Macros",
253
+ capabilities: [
254
+ LLM_CAPABILITY,
255
+ {
256
+ id: "transcription",
257
+ label: "Transcription",
258
+ required: false,
259
+ builderIncluded: true,
260
+ keySummary: "Groq or Google Speech key",
261
+ why: "Voice input uses transcription. Text entry always works without it.",
262
+ },
263
+ ],
264
+ },
265
+ mail: {
266
+ appId: "mail",
267
+ appName: "Mail",
268
+ capabilities: [
269
+ LLM_CAPABILITY,
270
+ {
271
+ id: "gmail",
272
+ label: "Gmail",
273
+ required: true,
274
+ builderIncluded: false,
275
+ keySummary: "Google OAuth client ID and secret",
276
+ why: "Mail needs OAuth access to read, send, and organize the mailbox.",
277
+ },
278
+ {
279
+ id: "attachment-storage",
280
+ label: "Attachment storage",
281
+ required: false,
282
+ builderIncluded: true,
283
+ keySummary: "Builder file storage or S3-compatible storage",
284
+ why: "Only needed when attachments need to be retained outside Gmail.",
285
+ },
286
+ ],
287
+ },
288
+ plan: {
289
+ appId: "plan",
290
+ appName: "Plan",
291
+ capabilities: [
292
+ LLM_CAPABILITY,
293
+ {
294
+ id: "plan-assets",
295
+ label: "Plan asset storage",
296
+ required: false,
297
+ builderIncluded: true,
298
+ keySummary: "Builder file storage or S3-compatible storage",
299
+ why: "Only needed for screenshots and other visual plan assets.",
300
+ },
301
+ {
302
+ id: "google-sign-in",
303
+ label: "Google sign-in",
304
+ required: false,
305
+ builderIncluded: false,
306
+ keySummary: "Google OAuth client ID and secret",
307
+ why: "Only needed when Google sign-in is enabled for the deployment.",
308
+ },
309
+ ],
310
+ },
311
+ slides: {
312
+ appId: "slides",
313
+ appName: "Slides",
314
+ capabilities: [
315
+ LLM_CAPABILITY,
316
+ {
317
+ id: "image-generation",
318
+ label: "Image generation",
319
+ required: false,
320
+ builderIncluded: true,
321
+ keySummary: "Gemini or OpenAI key",
322
+ why: "Only needed when slides generate images instead of using uploaded assets.",
323
+ },
324
+ {
325
+ id: "reference-storage",
326
+ label: "Reference file storage",
327
+ required: false,
328
+ builderIncluded: true,
329
+ keySummary: "Builder file storage or S3-compatible storage",
330
+ why: "Only needed for uploaded reference files and presentation assets.",
331
+ },
332
+ {
333
+ id: "google-docs",
334
+ label: "Google Docs",
335
+ required: false,
336
+ builderIncluded: false,
337
+ keySummary: "Connect Google Docs with OAuth",
338
+ why: "Only needed to import source material from Google Drive or Docs.",
339
+ },
340
+ ],
341
+ },
342
+ tasks: {
343
+ appId: "tasks",
344
+ appName: "Tasks",
345
+ capabilities: [LLM_CAPABILITY],
346
+ },
347
+ };
348
+ const FALLBACK_PROFILE = {
349
+ appId: "app",
350
+ appName: "Your app",
351
+ capabilities: [LLM_CAPABILITY],
352
+ };
353
+ function normalizeAppId(value) {
354
+ const normalized = value?.trim().toLowerCase() ?? "";
355
+ if (!normalized)
356
+ return "app";
357
+ return (normalized
358
+ .replace(/^@[^/]+\//, "")
359
+ .replace(/^agent-native-/, "")
360
+ .replace(/[^a-z0-9-]/g, "-")
361
+ .replace(/-+/g, "-")
362
+ .replace(/^-|-$/g, "") || "app");
363
+ }
364
+ export function resolveOnboardingAppId(explicit) {
365
+ return normalizeAppId(explicit ??
366
+ process.env.AGENT_NATIVE_APP_ID ??
367
+ process.env.APP_ID ??
368
+ process.env.npm_package_name);
369
+ }
370
+ export function getOnboardingAppProfile(appId) {
371
+ const resolvedId = resolveOnboardingAppId(appId);
372
+ const profile = PROFILES[resolvedId] ?? FALLBACK_PROFILE;
373
+ return {
374
+ ...profile,
375
+ capabilities: profile.capabilities.map((capability) => ({ ...capability })),
376
+ };
377
+ }
378
+ //# sourceMappingURL=app-profile.js.map
@@ -6,7 +6,8 @@
6
6
  * hook polls them — see `@agent-native/core/client/onboarding`.
7
7
  */
8
8
  export { registerOnboardingStep, listOnboardingSteps } from "./registry.js";
9
- export type { OnboardingStep, OnboardingMethod, OnboardingMethodBadge, OnboardingFormField, OnboardingStepStatus, } from "./types.js";
9
+ export type { OnboardingStep, OnboardingMethod, OnboardingMethodBadge, OnboardingFormField, OnboardingStepStatus, OnboardingCapability, OnboardingAppProfile, } from "./types.js";
10
+ export { getOnboardingAppProfile, resolveOnboardingAppId, } from "./app-profile.js";
10
11
  export { createOnboardingPlugin, defaultOnboardingPlugin, type OnboardingPluginOptions, } from "./plugin.js";
11
12
  export { registerDefaultOnboardingSteps } from "./default-steps.js";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -6,6 +6,7 @@
6
6
  * hook polls them — see `@agent-native/core/client/onboarding`.
7
7
  */
8
8
  export { registerOnboardingStep, listOnboardingSteps } from "./registry.js";
9
+ export { getOnboardingAppProfile, resolveOnboardingAppId, } from "./app-profile.js";
9
10
  export { createOnboardingPlugin, defaultOnboardingPlugin, } from "./plugin.js";
10
11
  export { registerDefaultOnboardingSteps } from "./default-steps.js";
11
12
  //# sourceMappingURL=index.js.map
@@ -11,6 +11,8 @@ type NitroPluginDef = (nitroApp: any) => void | Promise<void>;
11
11
  export interface OnboardingPluginOptions {
12
12
  /** Skip registering the built-in default steps (llm, database, auth). */
13
13
  skipDefaultSteps?: boolean;
14
+ /** App id used to select the app-specific first-run capability profile. */
15
+ appId?: string;
14
16
  }
15
17
  export declare function createOnboardingPlugin(options?: OnboardingPluginOptions): NitroPluginDef;
16
18
  /** Default plugin instance — mounted automatically when a template doesn't override. */
@@ -7,11 +7,13 @@
7
7
  * POST /_agent-native/onboarding/dismiss — dismiss the banner
8
8
  * GET /_agent-native/onboarding/dismissed — dismissed flag + allComplete
9
9
  */
10
- import { defineEventHandler, getMethod, getQuery, setResponseStatus, } from "h3";
10
+ import { deleteCookie, defineEventHandler, getMethod, getQuery, setResponseStatus, } from "h3";
11
11
  import { appStateGet, appStatePut } from "../application-state/store.js";
12
12
  import { getSession } from "../server/auth.js";
13
13
  import { awaitBootstrap, getH3App, markDefaultPluginProvided, } from "../server/framework-request-handler.js";
14
14
  import { runWithRequestContext } from "../server/request-context.js";
15
+ import { FIRST_RUN_ONBOARDING_COOKIE } from "../shared/first-run-onboarding.js";
16
+ import { getOnboardingAppProfile } from "./app-profile.js";
15
17
  import { registerDefaultOnboardingSteps } from "./default-steps.js";
16
18
  import { listOnboardingSteps } from "./registry.js";
17
19
  const ONBOARDING_PREFIX = "/_agent-native/onboarding";
@@ -89,6 +91,7 @@ export function createOnboardingPlugin(options = {}) {
89
91
  return async (nitroApp) => {
90
92
  markDefaultPluginProvided(nitroApp, "onboarding");
91
93
  await awaitBootstrap(nitroApp);
94
+ const appProfile = getOnboardingAppProfile(options.appId);
92
95
  if (!options.skipDefaultSteps) {
93
96
  registerDefaultOnboardingSteps();
94
97
  }
@@ -178,6 +181,23 @@ export function createOnboardingPlugin(options = {}) {
178
181
  return { dismissed: false, allComplete: false };
179
182
  }
180
183
  }));
184
+ // GET /_agent-native/onboarding/profile
185
+ getH3App(nitroApp).use(`${ONBOARDING_PREFIX}/profile`, defineEventHandler(async (event) => {
186
+ if (getMethod(event) !== "GET") {
187
+ setResponseStatus(event, 405);
188
+ return { error: "Method not allowed" };
189
+ }
190
+ return appProfile;
191
+ }));
192
+ // POST /_agent-native/onboarding/first-run/complete
193
+ getH3App(nitroApp).use(`${ONBOARDING_PREFIX}/first-run/complete`, defineEventHandler(async (event) => {
194
+ if (getMethod(event) !== "POST") {
195
+ setResponseStatus(event, 405);
196
+ return { error: "Method not allowed" };
197
+ }
198
+ deleteCookie(event, FIRST_RUN_ONBOARDING_COOKIE, { path: "/" });
199
+ return { ok: true };
200
+ }));
181
201
  };
182
202
  }
183
203
  /** Default plugin instance — mounted automatically when a template doesn't override. */
@@ -84,4 +84,23 @@ export interface OnboardingStepStatus {
84
84
  complete: boolean;
85
85
  methods: OnboardingMethod[];
86
86
  }
87
+ export interface OnboardingCapability {
88
+ /** Stable capability id used by the profile and analytics. */
89
+ id: string;
90
+ /** Short label shown in the setup choice and BYOK list. */
91
+ label: string;
92
+ /** Whether this capability blocks the app's normal setup. */
93
+ required: boolean;
94
+ /** Whether Builder's managed connection covers this capability. */
95
+ builderIncluded: boolean;
96
+ /** Compact description of the key or connection the BYOK path needs. */
97
+ keySummary: string;
98
+ /** Hover/focus explanation for why the capability exists. */
99
+ why: string;
100
+ }
101
+ export interface OnboardingAppProfile {
102
+ appId: string;
103
+ appName: string;
104
+ capabilities: OnboardingCapability[];
105
+ }
87
106
  //# sourceMappingURL=types.d.ts.map
@@ -15,7 +15,7 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
21
21
  //# sourceMappingURL=routes.d.ts.map
@@ -75,6 +75,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
75
75
  user: "user";
76
76
  }>>;
77
77
  }, z.core.$strip>>, {
78
+ id?: undefined;
79
+ provider?: undefined;
78
80
  deleted?: undefined;
79
81
  found?: undefined;
80
82
  providers: {
@@ -87,26 +89,24 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
87
89
  updatedAt: number;
88
90
  }[];
89
91
  count: number;
90
- provider?: undefined;
91
92
  registered?: undefined;
92
- id?: undefined;
93
93
  label?: undefined;
94
94
  message?: undefined;
95
95
  } | {
96
- deleted?: undefined;
97
96
  count?: undefined;
97
+ id?: undefined;
98
+ deleted?: undefined;
98
99
  providers?: undefined;
99
100
  found: boolean;
100
101
  provider: import("../custom-registry.js").CustomProviderConfig;
101
102
  registered?: undefined;
102
- id?: undefined;
103
103
  label?: undefined;
104
104
  message?: undefined;
105
105
  } | {
106
- deleted?: undefined;
107
106
  count?: undefined;
108
- providers?: undefined;
109
107
  provider?: undefined;
108
+ deleted?: undefined;
109
+ providers?: undefined;
110
110
  found: boolean;
111
111
  id: string;
112
112
  registered?: undefined;
@@ -114,20 +114,20 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
114
114
  message?: undefined;
115
115
  } | {
116
116
  count?: undefined;
117
+ provider?: undefined;
117
118
  found?: undefined;
118
119
  providers?: undefined;
119
- provider?: undefined;
120
120
  deleted: boolean;
121
121
  id: string;
122
122
  registered?: undefined;
123
123
  label?: undefined;
124
124
  message?: undefined;
125
125
  } | {
126
- deleted?: undefined;
127
126
  count?: undefined;
127
+ provider?: undefined;
128
+ deleted?: undefined;
128
129
  found?: undefined;
129
130
  providers?: undefined;
130
- provider?: undefined;
131
131
  registered: boolean;
132
132
  id: string;
133
133
  label: string;
@@ -311,9 +311,8 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
311
311
  notes?: string | undefined;
312
312
  scope?: "org" | "user" | undefined;
313
313
  }, {
314
+ message?: undefined;
314
315
  id?: undefined;
315
- provider?: undefined;
316
- deleted?: undefined;
317
316
  found?: undefined;
318
317
  providers: {
319
318
  id: string;
@@ -325,45 +324,46 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
325
324
  updatedAt: number;
326
325
  }[];
327
326
  count: number;
327
+ provider?: undefined;
328
+ deleted?: undefined;
328
329
  registered?: undefined;
329
330
  label?: undefined;
330
- message?: undefined;
331
331
  } | {
332
+ message?: undefined;
332
333
  id?: undefined;
333
- deleted?: undefined;
334
334
  count?: undefined;
335
335
  providers?: undefined;
336
336
  found: boolean;
337
337
  provider: import("../custom-registry.js").CustomProviderConfig;
338
+ deleted?: undefined;
338
339
  registered?: undefined;
339
340
  label?: undefined;
340
- message?: undefined;
341
341
  } | {
342
- provider?: undefined;
343
- deleted?: undefined;
342
+ message?: undefined;
344
343
  count?: undefined;
345
344
  providers?: undefined;
345
+ provider?: undefined;
346
346
  found: boolean;
347
347
  id: string;
348
+ deleted?: undefined;
348
349
  registered?: undefined;
349
350
  label?: undefined;
350
- message?: undefined;
351
351
  } | {
352
- provider?: undefined;
352
+ message?: undefined;
353
353
  found?: undefined;
354
354
  count?: undefined;
355
355
  providers?: undefined;
356
+ provider?: undefined;
356
357
  deleted: boolean;
357
358
  id: string;
358
359
  registered?: undefined;
359
360
  label?: undefined;
360
- message?: undefined;
361
361
  } | {
362
- provider?: undefined;
363
- deleted?: undefined;
364
362
  found?: undefined;
365
363
  count?: undefined;
366
364
  providers?: undefined;
365
+ provider?: undefined;
366
+ deleted?: undefined;
367
367
  registered: boolean;
368
368
  id: string;
369
369
  label: string;
@@ -50,8 +50,8 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
50
50
  removed: boolean;
51
51
  }>>;
52
52
  /**
53
- * POST /_agent-native/secrets/:key/test — re-run the validator against the
54
- * current stored value without changing anything. Useful for the "Test" button.
53
+ * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
+ * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
57
  ok?: undefined;