@agent-native/core 0.136.5 → 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 (157) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/clips/app/components/import-menu.tsx +109 -0
  3. package/corpus/templates/clips/app/components/library/library-grid.tsx +8 -18
  4. package/corpus/templates/clips/app/components/library/library-layout.tsx +14 -50
  5. package/corpus/templates/clips/app/components/library/sort-menu.tsx +20 -6
  6. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +10 -34
  7. package/corpus/templates/clips/app/routes/_app.library._index.tsx +0 -2
  8. package/corpus/templates/clips/changelog/2026-08-04-cleaner-library-controls-with-an-icon-only-sort-button.md +6 -0
  9. package/corpus/templates/clips/changelog/2026-08-04-upload-and-loom-imports-now-live-under-one-import-menu.md +6 -0
  10. package/corpus/templates/content/actions/_database-utils.ts +6 -0
  11. package/corpus/templates/content/actions/bind-content-database-source-field.ts +273 -97
  12. package/corpus/templates/content/actions/change-content-database-source-role.ts +65 -29
  13. package/corpus/templates/content/actions/configure-document-property.ts +113 -32
  14. package/corpus/templates/content/actions/delete-content-database.ts +5 -7
  15. package/corpus/templates/content/actions/delete-document-property.ts +109 -62
  16. package/corpus/templates/content/actions/delete-document.ts +178 -36
  17. package/corpus/templates/content/actions/duplicate-database-item.ts +27 -0
  18. package/corpus/templates/content/actions/duplicate-database-items.ts +31 -1
  19. package/corpus/templates/content/actions/permanently-delete-document.ts +4 -6
  20. package/corpus/templates/content/actions/remove-database-items.ts +13 -0
  21. package/corpus/templates/content/actions/set-document-property.ts +69 -1
  22. package/corpus/templates/content/actions/upsert-database-item-by-key.ts +814 -0
  23. package/corpus/templates/content/parity/matrix.md +1 -1
  24. package/corpus/templates/content/parity/matrix.ts +1 -0
  25. package/corpus/templates/content/server/db/schema.ts +27 -0
  26. package/corpus/templates/content/server/plugins/db.ts +24 -0
  27. package/corpus/templates/design/app/components/design/BreakpointBar.tsx +122 -114
  28. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +2 -2
  29. package/corpus/templates/design/app/components/design/EditPanel.tsx +68 -34
  30. package/corpus/templates/design/app/components/design/KeyboardShortcutsPanel.tsx +78 -4
  31. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +8 -0
  32. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +5 -2
  33. package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +10 -9
  34. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +31 -69
  35. package/corpus/templates/design/app/components/design/inspector/design-icons.tsx +80 -106
  36. package/corpus/templates/design/app/components/design/multi-screen/types.ts +4 -0
  37. package/corpus/templates/design/app/hooks/use-editor-preferences.ts +75 -0
  38. package/corpus/templates/design/app/i18n-data.ts +8 -0
  39. package/corpus/templates/design/app/i18n-keyboard-shortcuts.ts +61 -0
  40. package/corpus/templates/design/app/pages/design-editor/editor-preferences.ts +98 -0
  41. package/corpus/templates/design/app/pages/design-editor/nudge-intent.ts +491 -0
  42. package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +133 -0
  43. package/corpus/templates/design/app/pages/design-editor/png-export-render.ts +8 -0
  44. package/corpus/templates/design/app/pages/design-editor/selection-state.ts +5 -12
  45. package/corpus/templates/design/changelog/2026-08-03-arrow-keys-now-reorder-a-layer-inside-an-auto-layout-frame.md +6 -0
  46. package/corpus/templates/design/changelog/2026-08-03-auto-layout-flow-icons-show-the-direction-at-a-glance-instea.md +6 -0
  47. package/corpus/templates/design/changelog/2026-08-03-auto-layout-icons-share-one-outlined-square-style-so-flow-ga.md +6 -0
  48. package/corpus/templates/design/changelog/2026-08-03-export-has-a-named-preview-section-you-can-expand-replacing-.md +6 -0
  49. package/corpus/templates/design/changelog/2026-08-03-export-preview-shows-the-selected-element-instead-of-the-who.md +6 -0
  50. package/corpus/templates/design/changelog/2026-08-03-inspector-sections-show-an-expand-indicator-so-it-is-clear-w.md +6 -0
  51. package/corpus/templates/design/changelog/2026-08-03-paste-lands-inside-a-selected-frame-instead-of-beside-it.md +6 -0
  52. package/corpus/templates/design/changelog/2026-08-03-the-add-breakpoint-button-sits-outside-the-breakpoint-select.md +6 -0
  53. package/corpus/templates/design/changelog/2026-08-03-the-agent-s-follow-up-questions-keep-space-below-the-continu.md +6 -0
  54. package/corpus/templates/design/changelog/2026-08-03-the-agent-s-follow-up-questions-share-the-chat-panel-s-backg.md +6 -0
  55. package/corpus/templates/design/changelog/2026-08-03-the-export-panel-no-longer-stacks-a-duplicate-export-block-o.md +6 -0
  56. package/corpus/templates/design/changelog/2026-08-03-the-text-tool-uses-a-t-icon-matching-the-letter-it-inserts.md +6 -0
  57. package/corpus/templates/factory/.env.example +17 -0
  58. package/corpus/templates/factory/AGENTS.md +27 -17
  59. package/corpus/templates/factory/README.md +19 -9
  60. package/corpus/templates/factory/actions/get-slack-feedback-context.ts +90 -0
  61. package/corpus/templates/factory/actions/get-triage-config.ts +14 -3
  62. package/corpus/templates/factory/actions/govern-agent-native-pull-request.ts +386 -0
  63. package/corpus/templates/factory/actions/list-factory-automations.ts +53 -0
  64. package/corpus/templates/factory/actions/list-triage-items.ts +7 -2
  65. package/corpus/templates/factory/actions/poll-github-sources.ts +203 -0
  66. package/corpus/templates/factory/actions/poll-sentry-errors.ts +161 -0
  67. package/corpus/templates/factory/actions/poll-slack-channel.ts +4 -2
  68. package/corpus/templates/factory/actions/run-factory-automation.ts +42 -0
  69. package/corpus/templates/factory/actions/save-factory-automation.ts +69 -0
  70. package/corpus/templates/factory/actions/save-triage-config.ts +28 -2
  71. package/corpus/templates/factory/actions/start-builder-for-item.ts +411 -0
  72. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +14 -3
  73. package/corpus/templates/factory/app/components/ui/checkbox.tsx +1 -0
  74. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +7 -0
  75. package/corpus/templates/factory/app/i18n/en-US.ts +35 -1
  76. package/corpus/templates/factory/app/routes/factory.tsx +462 -9
  77. package/corpus/templates/factory/changelog/2026-08-04-added-organization-owned-factory-automations-for-slack-bug-t.md +6 -0
  78. package/corpus/templates/factory/changelog/2026-08-04-automation-editor-controls-and-model-picker.md +6 -0
  79. package/corpus/templates/factory/netlify.toml +2 -2
  80. package/corpus/templates/factory/server/connectors/credentials.ts +6 -5
  81. package/corpus/templates/factory/server/connectors/slack.ts +133 -5
  82. package/corpus/templates/factory/server/db/schema.ts +6 -0
  83. package/corpus/templates/factory/server/lib/require-factory-automation.ts +65 -0
  84. package/corpus/templates/factory/server/plugins/agent-chat.ts +29 -11
  85. package/corpus/templates/factory/server/plugins/auth.ts +1 -0
  86. package/corpus/templates/factory/server/plugins/factory-migrations.ts +12 -0
  87. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +218 -67
  88. package/corpus/templates/factory/server/triage/builder-executor.ts +4 -0
  89. package/corpus/templates/factory/server/triage/contracts.ts +14 -1
  90. package/corpus/templates/factory/server/triage/github-client.ts +404 -0
  91. package/corpus/templates/factory/server/triage/metadata.ts +44 -0
  92. package/corpus/templates/factory/server/triage/pr-babysit.ts +5 -5
  93. package/corpus/templates/factory/server/triage/pr-policy.ts +144 -0
  94. package/corpus/templates/factory/server/triage/sentry-client.ts +180 -0
  95. package/corpus/templates/factory/server/triage/slack-client.ts +43 -0
  96. package/corpus/templates/factory/server/triage/slack-poller.ts +9 -2
  97. package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +27 -0
  98. package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +14 -4
  99. package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +7 -0
  100. package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +7 -0
  101. package/corpus/templates/plan/actions/create-plan-design.ts +8 -6
  102. package/corpus/templates/plan/actions/create-prototype-plan.ts +8 -6
  103. package/corpus/templates/plan/actions/create-ui-plan.ts +7 -7
  104. package/corpus/templates/plan/actions/get-plan-blocks.ts +7 -1
  105. package/corpus/templates/plan/actions/validate-plan-input.ts +39 -0
  106. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +167 -11
  107. package/corpus/templates/plan/app/i18n/en-US.ts +1 -0
  108. package/corpus/templates/plan/changelog/2026-08-04-canvas-zoom-controls-now-explain-the-command-ctrl-plus-scrol.md +6 -0
  109. package/corpus/templates/plan/changelog/2026-08-04-pinch-to-zoom-is-now-supported-on-touchscreens-in-visual-pla.md +6 -0
  110. package/corpus/templates/plan/shared/plan-content.ts +17 -2
  111. package/dist/cli/skills-content/canvas.d.ts +3 -3
  112. package/dist/cli/skills-content/canvas.js +16 -5
  113. package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
  114. package/dist/cli/skills-content/visual-plan-skill.js +27 -0
  115. package/dist/cli/skills-content/wireframe.d.ts +2 -2
  116. package/dist/cli/skills-content/wireframe.js +7 -0
  117. package/dist/client/AgentPanel.js +23 -8
  118. package/dist/client/api-path.d.ts +6 -0
  119. package/dist/client/api-path.js +55 -0
  120. package/dist/client/onboarding/FirstRunOnboarding.d.ts +3 -0
  121. package/dist/client/onboarding/FirstRunOnboarding.js +93 -0
  122. package/dist/client/onboarding/first-run-enabled.d.ts +2 -0
  123. package/dist/client/onboarding/first-run-enabled.js +9 -0
  124. package/dist/client/onboarding/index.d.ts +2 -1
  125. package/dist/client/onboarding/index.js +1 -0
  126. package/dist/client/onboarding/use-onboarding.d.ts +6 -1
  127. package/dist/client/onboarding/use-onboarding.js +32 -1
  128. package/dist/client/route-state.js +10 -0
  129. package/dist/connections/catalog.d.ts +4 -4
  130. package/dist/connections/catalog.js +3 -3
  131. package/dist/db/index.d.ts +1 -1
  132. package/dist/db/index.js +1 -1
  133. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  134. package/dist/notifications/routes.d.ts +5 -5
  135. package/dist/observability/routes.d.ts +3 -3
  136. package/dist/onboarding/app-profile.d.ts +4 -0
  137. package/dist/onboarding/app-profile.js +378 -0
  138. package/dist/onboarding/index.d.ts +2 -1
  139. package/dist/onboarding/index.js +1 -0
  140. package/dist/onboarding/plugin.d.ts +2 -0
  141. package/dist/onboarding/plugin.js +21 -1
  142. package/dist/onboarding/types.d.ts +19 -0
  143. package/dist/progress/routes.d.ts +1 -1
  144. package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
  145. package/dist/provider-api/actions/provider-api.d.ts +12 -12
  146. package/dist/resources/handlers.d.ts +1 -1
  147. package/dist/server/auth.js +21 -1
  148. package/dist/server/better-auth-instance.d.ts +3 -2
  149. package/dist/server/better-auth-instance.js +9 -7
  150. package/dist/server/email-markdown.js +3 -8
  151. package/dist/server/transcribe-voice.d.ts +1 -1
  152. package/dist/shared/first-run-onboarding.d.ts +3 -0
  153. package/dist/shared/first-run-onboarding.js +3 -0
  154. package/dist/triggers/index.d.ts +3 -0
  155. package/dist/triggers/index.js +5 -0
  156. package/docs/content/cross-app-sso.mdx +26 -0
  157. package/package.json +1 -1
@@ -1,20 +1,31 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
+ import { FIRST_RUN_ONBOARDING_COOKIE } from "../../shared/first-run-onboarding.js";
2
3
  import { agentNativePath } from "../api-path.js";
4
+ function hasFirstRunCookie() {
5
+ if (typeof document === "undefined")
6
+ return false;
7
+ return document.cookie
8
+ .split(";")
9
+ .some((part) => part.trim().startsWith(`${FIRST_RUN_ONBOARDING_COOKIE}=`));
10
+ }
3
11
  export function useOnboarding(options = {}) {
4
12
  const preview = options.preview === true;
5
13
  const [steps, setSteps] = useState([]);
14
+ const [profile, setProfile] = useState(null);
6
15
  const [loading, setLoading] = useState(true);
7
16
  const [error, setError] = useState(null);
8
17
  const [dismissed, setDismissed] = useState(false);
18
+ const [firstRun, setFirstRun] = useState(hasFirstRunCookie);
9
19
  const mountedRef = useRef(true);
10
20
  const fetchAll = useCallback(async () => {
11
21
  try {
12
22
  const stepsUrl = agentNativePath(preview
13
23
  ? "/_agent-native/onboarding/steps?preview=1"
14
24
  : "/_agent-native/onboarding/steps");
15
- const [stepsRes, dismissRes] = await Promise.all([
25
+ const [stepsRes, dismissRes, profileRes] = await Promise.all([
16
26
  fetch(stepsUrl),
17
27
  fetch(agentNativePath("/_agent-native/onboarding/dismissed")),
28
+ fetch(agentNativePath("/_agent-native/onboarding/profile")),
18
29
  ]);
19
30
  if (!mountedRef.current)
20
31
  return;
@@ -23,6 +34,10 @@ export function useOnboarding(options = {}) {
23
34
  }
24
35
  const stepsData = await stepsRes.json();
25
36
  setSteps(stepsData);
37
+ if (!profileRes.ok) {
38
+ throw new Error(`profile: ${profileRes.status}`);
39
+ }
40
+ setProfile((await profileRes.json()));
26
41
  if (dismissRes.ok) {
27
42
  const d = (await dismissRes.json());
28
43
  setDismissed(!!d.dismissed);
@@ -83,6 +98,19 @@ export function useOnboarding(options = {}) {
83
98
  });
84
99
  await fetchAll();
85
100
  }, [fetchAll]);
101
+ const completeFirstRun = useCallback(async () => {
102
+ const response = await fetch(agentNativePath("/_agent-native/onboarding/first-run/complete"), {
103
+ method: "POST",
104
+ headers: { "Content-Type": "application/json" },
105
+ body: "{}",
106
+ });
107
+ if (!response.ok) {
108
+ setError(`first-run completion: ${response.status}`);
109
+ return;
110
+ }
111
+ setFirstRun(false);
112
+ await fetchAll();
113
+ }, [fetchAll]);
86
114
  const totalCount = steps.length;
87
115
  const completeCount = steps.filter((s) => s.complete).length;
88
116
  const allComplete = steps.filter((s) => s.required).every((s) => s.complete);
@@ -91,6 +119,7 @@ export function useOnboarding(options = {}) {
91
119
  null;
92
120
  return {
93
121
  steps,
122
+ profile,
94
123
  loading,
95
124
  error,
96
125
  currentStepId,
@@ -102,6 +131,8 @@ export function useOnboarding(options = {}) {
102
131
  complete,
103
132
  dismiss,
104
133
  reopen,
134
+ firstRun,
135
+ completeFirstRun,
105
136
  };
106
137
  }
107
138
  //# sourceMappingURL=use-onboarding.js.map
@@ -1,6 +1,7 @@
1
1
  import { useQuery, useQueryClient } from "@tanstack/react-query";
2
2
  import { useCallback, useEffect, useMemo, useRef } from "react";
3
3
  import { useLocation, useNavigate, } from "react-router";
4
+ import { isWorkspaceAppPath } from "./api-path.js";
4
5
  import { deleteClientAppState, readClientAppState, setClientAppState, } from "./application-state.js";
5
6
  import { navigateWithAgentChatViewTransition, } from "./chat-view-transition.js";
6
7
  const SAFE_BROWSER_TAB_ID_RE = /^[A-Za-z0-9_-]{1,96}$/;
@@ -207,6 +208,15 @@ export function useAgentRouteState(options) {
207
208
  const resolvedOptions = typeof navigateOptions === "function"
208
209
  ? navigateOptions(command)
209
210
  : navigateOptions;
211
+ if (isWorkspaceAppPath(path)) {
212
+ if (resolvedOptions?.replace) {
213
+ window.location.replace(path);
214
+ }
215
+ else {
216
+ window.location.assign(path);
217
+ }
218
+ return;
219
+ }
210
220
  const transitionOptions = resolveAgentChatViewTransitionOption(options.agentChatViewTransition, command, path);
211
221
  const runNavigate = () => navigate(path, resolvedOptions);
212
222
  if (transitionOptions) {
@@ -1,5 +1,5 @@
1
1
  export type WorkspaceConnectionCapability = "search" | "import" | "messages" | "meetings" | "crm" | "code" | "docs";
2
- export type WorkspaceConnectionTemplateUse = "analytics" | "brain" | "calendar" | "clips" | "content" | "crm" | "design" | "dispatch" | "forms" | "mail" | "slides";
2
+ export type WorkspaceConnectionTemplateUse = "analytics" | "brain" | "calendar" | "clips" | "content" | "crm" | "design" | "dispatch" | "factory" | "forms" | "mail" | "slides";
3
3
  export type WorkspaceConnectionProviderId = "slack" | "github" | "figma" | "notion" | "gmail" | "google_drive" | "hubspot" | "salesforce" | "jira" | "sentry" | "granola" | "clips" | "generic";
4
4
  export interface WorkspaceConnectionCredentialKey {
5
5
  key: string;
@@ -39,7 +39,7 @@ export declare const WORKSPACE_CONNECTION_PROVIDERS: readonly [{
39
39
  readonly required: true;
40
40
  }];
41
41
  readonly capabilities: readonly ["search", "import", "messages"];
42
- readonly recommendedTemplateUses: readonly ["brain", "dispatch", "analytics"];
42
+ readonly recommendedTemplateUses: readonly ["brain", "dispatch", "analytics", "factory"];
43
43
  }, {
44
44
  readonly id: "github";
45
45
  readonly label: "GitHub";
@@ -57,7 +57,7 @@ export declare const WORKSPACE_CONNECTION_PROVIDERS: readonly [{
57
57
  readonly scopes: readonly ["repo", "read:org", "read:user", "user:email"];
58
58
  };
59
59
  readonly capabilities: readonly ["search", "import", "code", "docs"];
60
- readonly recommendedTemplateUses: readonly ["brain", "analytics", "dispatch"];
60
+ readonly recommendedTemplateUses: readonly ["brain", "analytics", "dispatch", "factory"];
61
61
  }, {
62
62
  readonly id: "figma";
63
63
  readonly label: "Figma";
@@ -217,7 +217,7 @@ export declare const WORKSPACE_CONNECTION_PROVIDERS: readonly [{
217
217
  readonly scopes: readonly ["org:read", "project:read", "event:read", "team:read"];
218
218
  };
219
219
  readonly capabilities: readonly ["search", "import", "docs"];
220
- readonly recommendedTemplateUses: readonly ["analytics", "brain", "dispatch"];
220
+ readonly recommendedTemplateUses: readonly ["analytics", "brain", "dispatch", "factory"];
221
221
  }, {
222
222
  readonly id: "granola";
223
223
  readonly label: "Granola";
@@ -15,7 +15,7 @@ export const WORKSPACE_CONNECTION_PROVIDERS = [
15
15
  },
16
16
  ],
17
17
  capabilities: ["search", "import", "messages"],
18
- recommendedTemplateUses: ["brain", "dispatch", "analytics"],
18
+ recommendedTemplateUses: ["brain", "dispatch", "analytics", "factory"],
19
19
  }),
20
20
  defineWorkspaceConnectionProvider({
21
21
  id: "github",
@@ -36,7 +36,7 @@ export const WORKSPACE_CONNECTION_PROVIDERS = [
36
36
  scopes: ["repo", "read:org", "read:user", "user:email"],
37
37
  },
38
38
  capabilities: ["search", "import", "code", "docs"],
39
- recommendedTemplateUses: ["brain", "analytics", "dispatch"],
39
+ recommendedTemplateUses: ["brain", "analytics", "dispatch", "factory"],
40
40
  }),
41
41
  defineWorkspaceConnectionProvider({
42
42
  id: "figma",
@@ -243,7 +243,7 @@ export const WORKSPACE_CONNECTION_PROVIDERS = [
243
243
  scopes: ["org:read", "project:read", "event:read", "team:read"],
244
244
  },
245
245
  capabilities: ["search", "import", "docs"],
246
- recommendedTemplateUses: ["analytics", "brain", "dispatch"],
246
+ recommendedTemplateUses: ["analytics", "brain", "dispatch", "factory"],
247
247
  }),
248
248
  defineWorkspaceConnectionProvider({
249
249
  id: "granola",
@@ -22,7 +22,7 @@ export declare function createDb(config: DbConfig): Promise<(import("drizzle-orm
22
22
  export type DrizzleDb = Awaited<ReturnType<typeof createDb>>;
23
23
  export { createGetDb } from "./create-get-db.js";
24
24
  export { runMigrations, type MigrationEntry, type MigrationSql, } from "./migrations.js";
25
- export { getDbExec, createDbExec, getDialect, isLocalDatabase, isPostgres, intType, closeDbExec, type DbExec, type DbExecConfig, type DbExecQuery, type DbExecStatement, type Dialect, } from "./client.js";
25
+ export { getDbExec, createDbExec, getDatabaseUrl, getDialect, isLocalDatabase, isPostgres, intType, closeDbExec, type DbExec, type DbExecConfig, type DbExecQuery, type DbExecStatement, type Dialect, } from "./client.js";
26
26
  export { table, text, integer, now } from "./schema.js";
27
27
  export { ensureAdditiveColumns, type EnsureAdditiveColumnsOptions, type EnsureAdditiveColumnsResult, type EnsureAdditiveColumnsLogger, } from "./ensure-additive-columns.js";
28
28
  //# sourceMappingURL=index.d.ts.map
package/dist/db/index.js CHANGED
@@ -21,7 +21,7 @@ export async function createDb(config) {
21
21
  }
22
22
  export { createGetDb } from "./create-get-db.js";
23
23
  export { runMigrations, } from "./migrations.js";
24
- export { getDbExec, createDbExec, getDialect, isLocalDatabase, isPostgres, intType, closeDbExec, } from "./client.js";
24
+ export { getDbExec, createDbExec, getDatabaseUrl, getDialect, isLocalDatabase, isPostgres, intType, closeDbExec, } from "./client.js";
25
25
  export { table, text, integer, now } from "./schema.js";
26
26
  export { ensureAdditiveColumns, } from "./ensure-additive-columns.js";
27
27
  //# sourceMappingURL=index.js.map
@@ -17,12 +17,12 @@ declare const _default: import("../../action.js").ActionDefinition<{
17
17
  id?: undefined;
18
18
  provider?: undefined;
19
19
  } | {
20
+ error?: undefined;
20
21
  configured?: undefined;
21
22
  connectPath?: undefined;
22
23
  url: string;
23
24
  id: string;
24
25
  provider: string;
25
- error?: undefined;
26
26
  }>;
27
27
  export default _default;
28
28
  //# sourceMappingURL=upload-image.d.ts.map
@@ -13,22 +13,22 @@
13
13
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
14
14
  count: number;
15
15
  updated?: undefined;
16
- error?: undefined;
17
16
  ok?: undefined;
17
+ error?: undefined;
18
18
  } | {
19
+ count?: undefined;
19
20
  updated: number;
20
- error?: undefined;
21
21
  ok?: undefined;
22
- count?: undefined;
22
+ error?: undefined;
23
23
  } | {
24
+ count?: undefined;
24
25
  updated?: undefined;
25
26
  error: string;
26
27
  ok?: undefined;
27
- count?: undefined;
28
28
  } | {
29
+ count?: undefined;
29
30
  updated?: undefined;
30
31
  ok: boolean;
31
32
  error?: undefined;
32
- count?: undefined;
33
33
  }>>;
34
34
  //# sourceMappingURL=routes.d.ts.map
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
+ error?: undefined;
44
45
  summary: import("./types.js").TraceSummary;
45
46
  spans: import("./types.js").TraceSpan[];
46
47
  id?: undefined;
47
- error?: undefined;
48
48
  ok?: undefined;
49
49
  } | {
50
+ error?: undefined;
50
51
  summary?: undefined;
51
52
  spans?: undefined;
52
53
  id: string;
53
- error?: undefined;
54
54
  ok?: undefined;
55
55
  } | {
56
56
  summary?: undefined;
@@ -59,10 +59,10 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
59
59
  error: any;
60
60
  ok?: undefined;
61
61
  } | {
62
+ error?: undefined;
62
63
  summary?: undefined;
63
64
  spans?: undefined;
64
65
  id?: undefined;
65
66
  ok: boolean;
66
- error?: undefined;
67
67
  }>>;
68
68
  //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { OnboardingAppProfile } from "./types.js";
2
+ export declare function resolveOnboardingAppId(explicit?: string): string;
3
+ export declare function getOnboardingAppProfile(appId?: string): OnboardingAppProfile;
4
+ //# sourceMappingURL=app-profile.d.ts.map
@@ -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. */