@agent-native/core 0.189.0 → 0.190.0-nightly-20260925215540

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 (234) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +10 -0
  3. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +1 -1
  4. package/corpus/templates/analytics/AGENTS.md +11 -22
  5. package/corpus/templates/analytics/actions/list-data-dictionary.ts +7 -9
  6. package/corpus/templates/analytics/actions/search-analytics-query-catalog.ts +1 -1
  7. package/corpus/templates/analytics/app/components/AnalyticsReviewArtifactPreview.tsx +201 -0
  8. package/corpus/templates/analytics/app/i18n/en-US.ts +2 -0
  9. package/corpus/templates/analytics/app/pages/Settings.tsx +50 -3
  10. package/corpus/templates/analytics/changelog/2026-09-25-first-run-onboarding-records-setup-choices-and-builder-conne.md +6 -0
  11. package/corpus/templates/analytics/changelog/2026-09-25-human-review-previews-analytics-dashboards-as-real-charts.md +6 -0
  12. package/corpus/templates/analytics/changelog/2026-09-25-org-admins-can-review-agent-runs-from-settings.md +6 -0
  13. package/corpus/templates/analytics/changelog/2026-09-25-proactive-query-context.md +6 -0
  14. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +98 -2
  15. package/corpus/templates/analytics/server/lib/analytics-agent-context.ts +557 -0
  16. package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +217 -46
  17. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +2 -2
  18. package/corpus/templates/analytics/server/lib/dashboards-store.ts +39 -5
  19. package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +4 -0
  20. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +268 -2
  21. package/corpus/templates/analytics/server/plugins/agent-chat.ts +44 -9
  22. package/corpus/templates/calendar/AGENTS.md +5 -0
  23. package/corpus/templates/calendar/CHANGELOG.md +6 -0
  24. package/corpus/templates/calendar/actions/get-event-rules-status.ts +47 -0
  25. package/corpus/templates/calendar/actions/list-events.ts +50 -4
  26. package/corpus/templates/calendar/actions/undo-calendar-event-rule.ts +229 -0
  27. package/corpus/templates/calendar/actions/update-settings.ts +8 -0
  28. package/corpus/templates/calendar/app/i18n/en-US.ts +27 -0
  29. package/corpus/templates/calendar/app/pages/Settings.tsx +196 -1
  30. package/corpus/templates/calendar/changelog/2026-09-25-calendar-feeds-with-the-same-url-keep-their-own-names-and-co.md +6 -0
  31. package/corpus/templates/calendar/changelog/2026-09-25-calendar-invitation-rules-surface-expired-connections-and-un.md +6 -0
  32. package/corpus/templates/calendar/changelog/2026-09-25-restore-locally-hidden-events-from-activity-after-disconnect.md +6 -0
  33. package/corpus/templates/calendar/server/lib/calendar-settings.ts +44 -10
  34. package/corpus/templates/calendar/server/lib/google-api.ts +15 -1
  35. package/corpus/templates/calendar/server/lib/google-calendar.ts +1 -1
  36. package/corpus/templates/calendar/server/plugins/event-rules.ts +628 -0
  37. package/corpus/templates/calendar/shared/api.ts +13 -0
  38. package/corpus/templates/calendar/shared/settings.ts +71 -1
  39. package/corpus/templates/clips/actions/create-recording.ts +83 -2
  40. package/corpus/templates/clips/actions/finalize-recording.ts +610 -110
  41. package/corpus/templates/clips/actions/get-recording-player-data.ts +6 -0
  42. package/corpus/templates/clips/actions/import-loom-recording.ts +2 -0
  43. package/corpus/templates/clips/actions/lib/create-recording-schema.ts +7 -0
  44. package/corpus/templates/clips/actions/lib/loom-import-job.ts +15 -1
  45. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +126 -26
  46. package/corpus/templates/clips/app/hooks/use-drop-video-upload.ts +75 -15
  47. package/corpus/templates/clips/app/routes/_app.r.$recordingId.tsx +5 -1
  48. package/corpus/templates/clips/app/routes/record.tsx +134 -40
  49. package/corpus/templates/clips/app/routes/share.$shareId.tsx +13 -1
  50. package/corpus/templates/clips/changelog/2026-09-25-signed-in-viewers-who-hit-an-unavailable-expired-or-private-.md +6 -0
  51. package/corpus/templates/clips/chrome-extension/src/background.ts +3 -0
  52. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +73 -16
  53. package/corpus/templates/clips/desktop/src/lib/recorder.ts +188 -18
  54. package/corpus/templates/clips/desktop/src/lib/recording-request.ts +1 -0
  55. package/corpus/templates/clips/server/db/schema.ts +4 -0
  56. package/corpus/templates/clips/server/jobs/media-verification.ts +78 -4
  57. package/corpus/templates/clips/server/jobs/recording-failure-backfill.ts +142 -0
  58. package/corpus/templates/clips/server/lib/media-verification-state.ts +29 -0
  59. package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +2 -0
  60. package/corpus/templates/clips/server/lib/recording-failures.ts +111 -0
  61. package/corpus/templates/clips/server/lib/recordings.ts +6 -1
  62. package/corpus/templates/clips/server/lib/s3-upload-provider.ts +8 -3
  63. package/corpus/templates/clips/server/lib/upload-lease.ts +25 -6
  64. package/corpus/templates/clips/server/plugins/calendar-jobs.ts +2 -0
  65. package/corpus/templates/clips/server/plugins/db.ts +18 -0
  66. package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +48 -5
  67. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/abort.post.ts +322 -31
  68. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/chunk.post.ts +223 -61
  69. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/interrupt.post.ts +62 -4
  70. package/corpus/templates/clips/server/routes/api/uploads/[recordingId]/reset-chunks.post.ts +74 -7
  71. package/corpus/templates/clips/shared/recording-core.ts +27 -0
  72. package/corpus/templates/design/actions/get-design.ts +35 -6
  73. package/corpus/templates/mail/.agents/skills/inbox-automations/SKILL.md +4 -0
  74. package/corpus/templates/mail/actions/consolidate-ai-filter-rules.ts +41 -0
  75. package/corpus/templates/mail/actions/get-ai-priority.ts +48 -8
  76. package/corpus/templates/mail/actions/record-ai-priority-feedback.ts +69 -0
  77. package/corpus/templates/mail/actions/update-mail-preferences.ts +2 -0
  78. package/corpus/templates/mail/app/components/email/EmailList.tsx +179 -32
  79. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +97 -9
  80. package/corpus/templates/mail/app/components/email/EmailThread.tsx +55 -1
  81. package/corpus/templates/mail/app/components/email/ImportanceFeedbackMenu.tsx +52 -0
  82. package/corpus/templates/mail/app/components/email/compose-autocomplete.ts +2 -1
  83. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +219 -188
  84. package/corpus/templates/mail/app/components/onboarding/AiInboxSetup.tsx +338 -0
  85. package/corpus/templates/mail/app/components/settings/AiFilterSection.tsx +597 -781
  86. package/corpus/templates/mail/app/components/settings/AiRulePromptField.tsx +37 -0
  87. package/corpus/templates/mail/app/global.css +42 -26
  88. package/corpus/templates/mail/app/hooks/use-ai-priority-feedback.ts +43 -0
  89. package/corpus/templates/mail/app/hooks/use-automations.ts +23 -0
  90. package/corpus/templates/mail/app/i18n/en-US.ts +58 -3
  91. package/corpus/templates/mail/app/pages/InboxPage.tsx +47 -10
  92. package/corpus/templates/mail/changelog/2026-09-25-editing-importance-rules-preserves-disabled-instructions-and.md +6 -0
  93. package/corpus/templates/mail/changelog/2026-09-25-handle-astral-unicode-letters-in-autocomplete-word-boundarie.md +6 -0
  94. package/corpus/templates/mail/changelog/2026-09-25-jev-priority-feedback-and-inbox-settings.md +6 -0
  95. package/corpus/templates/mail/changelog/2026-09-25-keep-existing-ai-filter-rules-intact-when-saving-a-prompt.md +6 -0
  96. package/corpus/templates/mail/server/lib/automation-engine.ts +21 -12
  97. package/corpus/templates/mail/server/lib/automations.ts +100 -1
  98. package/corpus/templates/mail/shared/types.ts +3 -0
  99. package/corpus/templates/plan/app/i18n/en-US.ts +6 -0
  100. package/corpus/templates/plan/app/lib/plan-invite-suggestion.ts +43 -0
  101. package/corpus/templates/plan/app/pages/PlansPage.tsx +249 -4
  102. package/corpus/templates/slides/actions/create-deck.ts +11 -1
  103. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +117 -1
  104. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +373 -330
  105. package/corpus/templates/slides/app/components/design-system/builder-index-response.ts +36 -5
  106. package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +21 -53
  107. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +347 -671
  108. package/corpus/templates/slides/app/components/editor/bullet-editing.ts +55 -8
  109. package/corpus/templates/slides/app/components/editor/in-place-text-session.ts +2082 -0
  110. package/corpus/templates/slides/app/components/editor/list-editing.ts +174 -16
  111. package/corpus/templates/slides/app/components/editor/rich-text-selection.ts +497 -62
  112. package/corpus/templates/slides/app/components/editor/slide-text-targets.ts +102 -20
  113. package/corpus/templates/slides/app/context/DeckContext.tsx +9 -4
  114. package/corpus/templates/slides/app/global.css +7 -219
  115. package/corpus/templates/slides/app/i18n/en-US.ts +3 -0
  116. package/corpus/templates/slides/app/lib/sanitize-slide-html.ts +7 -0
  117. package/corpus/templates/slides/app/lib/slide-image-replacement.ts +203 -1
  118. package/corpus/templates/slides/app/lib/slide-source-map.ts +43 -0
  119. package/corpus/templates/slides/app/pages/DeckEditor.tsx +182 -4
  120. package/corpus/templates/slides/app/routes/settings.tsx +33 -2
  121. package/corpus/templates/slides/changelog/2026-09-25-improve-slides-design-system-setup-feedback.md +6 -0
  122. package/corpus/templates/slides/changelog/2026-09-25-org-admins-can-review-agent-runs-from-settings.md +6 -0
  123. package/corpus/templates/slides/changelog/2026-09-25-text-on-a-slide-is-now-edited-in-place-clicking-into-it-chan.md +6 -0
  124. package/corpus/templates/slides/package.json +0 -12
  125. package/corpus/templates/slides/scripts/edit-fidelity/README.md +4 -2
  126. package/corpus/templates/slides/scripts/edit-fidelity/run.ts +12 -3
  127. package/corpus/templates/slides/vite.config.ts +1 -10
  128. package/dist/agent/jev-tool-prefetch.d.ts +29 -3
  129. package/dist/agent/jev-tool-prefetch.js +161 -34
  130. package/dist/agent/production-agent.d.ts +11 -0
  131. package/dist/agent/production-agent.js +39 -8
  132. package/dist/app-config/runtime.d.ts +1 -0
  133. package/dist/app-config/runtime.js +4 -0
  134. package/dist/app-config/schema.d.ts +1 -0
  135. package/dist/client/AgentSidebar.d.ts +3 -1
  136. package/dist/client/AgentSidebar.js +8 -12
  137. package/dist/client/analytics/index.d.ts +1 -1
  138. package/dist/client/analytics/index.js +1 -1
  139. package/dist/client/analytics.d.ts +2 -0
  140. package/dist/client/analytics.js +9 -0
  141. package/dist/client/api-path.js +5 -2
  142. package/dist/client/chat/run-recovery.d.ts +0 -3
  143. package/dist/client/chat/run-recovery.js +13 -23
  144. package/dist/client/index.d.ts +1 -1
  145. package/dist/client/index.js +1 -1
  146. package/dist/client/observability/ObservabilityDashboard.d.ts +3 -0
  147. package/dist/client/observability/ObservabilityDashboard.js +366 -71
  148. package/dist/client/observability/ObservabilityReviewSummaryButton.d.ts +4 -1
  149. package/dist/client/observability/ObservabilityReviewSummaryButton.js +13 -9
  150. package/dist/client/observability/OutputPreview.d.ts +9 -4
  151. package/dist/client/observability/OutputPreview.js +230 -52
  152. package/dist/client/onboarding/FirstRunOnboarding.js +67 -4
  153. package/dist/client/onboarding/use-onboarding.js +2 -0
  154. package/dist/client/sharing/ShareButton.d.ts +2 -0
  155. package/dist/client/sharing/ShareButton.js +1 -0
  156. package/dist/client/sharing/useShareButtonController.d.ts +1 -0
  157. package/dist/client/sharing/useShareButtonController.js +29 -8
  158. package/dist/collab/awareness.d.ts +2 -2
  159. package/dist/collab/struct-routes.d.ts +1 -1
  160. package/dist/deploy/build.js +9 -1
  161. package/dist/embeddings/index.d.ts +3 -1
  162. package/dist/embeddings/index.js +20 -10
  163. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  164. package/dist/jobs/sweep-hooks.d.ts +7 -0
  165. package/dist/jobs/sweep-hooks.js +28 -0
  166. package/dist/localization/default-messages.d.ts +1 -0
  167. package/dist/localization/default-messages.js +1 -0
  168. package/dist/notifications/routes.d.ts +6 -6
  169. package/dist/observability/actions/authorization.d.ts +1 -0
  170. package/dist/observability/actions/authorization.js +22 -0
  171. package/dist/observability/actions/get-observability-review-detail.d.ts +5 -0
  172. package/dist/observability/actions/get-observability-review-detail.js +10 -2
  173. package/dist/observability/actions/get-observability-review-summary-source.d.ts +2 -0
  174. package/dist/observability/actions/get-observability-review-summary-source.js +3 -2
  175. package/dist/observability/actions/save-observability-instruction-update.js +2 -1
  176. package/dist/observability/actions/save-observability-review-summary.js +21 -10
  177. package/dist/observability/migrations.js +25 -0
  178. package/dist/observability/reviews.d.ts +3 -1
  179. package/dist/observability/reviews.js +410 -53
  180. package/dist/observability/routes.d.ts +6 -6
  181. package/dist/observability/store.d.ts +15 -0
  182. package/dist/observability/store.js +131 -11
  183. package/dist/observability/types.d.ts +18 -0
  184. package/dist/org/handlers.d.ts +1 -1
  185. package/dist/org/index.d.ts +1 -1
  186. package/dist/progress/routes.d.ts +1 -1
  187. package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
  188. package/dist/provider-api/actions/provider-api.d.ts +8 -8
  189. package/dist/server/agent-chat/plugin-options.d.ts +4 -20
  190. package/dist/server/agent-chat/prompt-resources.d.ts +16 -0
  191. package/dist/server/agent-chat/prompt-resources.js +385 -22
  192. package/dist/server/agent-chat-plugin.d.ts +3 -1
  193. package/dist/server/agent-chat-plugin.js +149 -27
  194. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  195. package/dist/server/agent-engine-ollama-models-route.d.ts +1 -1
  196. package/dist/server/index.d.ts +3 -0
  197. package/dist/server/index.js +3 -0
  198. package/dist/server/prompts/framework-core-compact.js +1 -1
  199. package/dist/server/prompts/framework-core.js +1 -1
  200. package/dist/server/request-context.d.ts +6 -3
  201. package/dist/settings/org-settings.d.ts +4 -2
  202. package/dist/settings/org-settings.js +3 -3
  203. package/dist/settings/store.d.ts +3 -1
  204. package/dist/settings/store.js +8 -3
  205. package/dist/styles/agent-native.css +5 -0
  206. package/dist/templates/default/app/i18n/ar-SA.ts +1 -0
  207. package/dist/templates/default/app/i18n/de-DE.ts +1 -0
  208. package/dist/templates/default/app/i18n/en-US.ts +1 -0
  209. package/dist/templates/default/app/i18n/es-ES.ts +1 -0
  210. package/dist/templates/default/app/i18n/fr-FR.ts +1 -0
  211. package/dist/templates/default/app/i18n/hi-IN.ts +1 -0
  212. package/dist/templates/default/app/i18n/ja-JP.ts +1 -0
  213. package/dist/templates/default/app/i18n/ko-KR.ts +1 -0
  214. package/dist/templates/default/app/i18n/pt-BR.ts +1 -0
  215. package/dist/templates/default/app/i18n/zh-CN.ts +1 -0
  216. package/dist/templates/default/app/i18n/zh-TW.ts +1 -0
  217. package/dist/tracking/registry.js +11 -4
  218. package/dist/vite/client.js +6 -0
  219. package/package.json +4 -3
  220. package/src/templates/default/app/i18n/ar-SA.ts +1 -0
  221. package/src/templates/default/app/i18n/de-DE.ts +1 -0
  222. package/src/templates/default/app/i18n/en-US.ts +1 -0
  223. package/src/templates/default/app/i18n/es-ES.ts +1 -0
  224. package/src/templates/default/app/i18n/fr-FR.ts +1 -0
  225. package/src/templates/default/app/i18n/hi-IN.ts +1 -0
  226. package/src/templates/default/app/i18n/ja-JP.ts +1 -0
  227. package/src/templates/default/app/i18n/ko-KR.ts +1 -0
  228. package/src/templates/default/app/i18n/pt-BR.ts +1 -0
  229. package/src/templates/default/app/i18n/zh-CN.ts +1 -0
  230. package/src/templates/default/app/i18n/zh-TW.ts +1 -0
  231. package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +0 -488
  232. package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +0 -589
  233. package/corpus/templates/slides/app/components/editor/SlideRichTextEditor.tsx +0 -1347
  234. package/corpus/templates/slides/app/components/editor/SlideSlashMenu.tsx +0 -373
@@ -1,2 +1,2 @@
1
- export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, clearAnalyticsSessionId, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setAnalyticsSessionId, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackEvent, trackLifecycleEvent, trackSessionStatus, } from "../analytics.js";
1
+ export { AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureClientException, captureError, captureException, captureMessage, clearAnalyticsSessionId, configureTracking, getAnalyticsAnonymousId, getAnalyticsSessionId, getFirstTouchAttribution, getSessionReplayContext, getSessionReplayUrl, isErrorCaptureInstalled, maybeStartSessionReplay, setAnalyticsSessionId, setSentryUser, setTrackingContentCaptureEnabled, setTrackingIdentity, startSessionReplay, stopSessionReplay, trackAgentChatLifecycle, trackAnonymousEvent, trackEvent, trackLifecycleEvent, trackSessionStatus, } from "../analytics.js";
2
2
  export { track } from "../track.js";
@@ -207,5 +207,7 @@ export declare function startSessionReplay(options?: SessionReplayOptions): Prom
207
207
  export declare function maybeStartSessionReplay(options?: SessionReplayOptions): Promise<SessionReplayStartResult>;
208
208
  export declare function stopSessionReplay(reason?: string): Promise<void>;
209
209
  export declare function trackEvent(name: string, params?: Record<string, unknown>): void;
210
+ /** Sends explicitly anonymous product events without resolving user identity. */
211
+ export declare function trackAnonymousEvent(name: string, properties: Record<string, unknown>): void;
210
212
  export declare function trackLifecycleEvent(name: AgentNativeLifecycleEventName, params?: Record<string, unknown>): void;
211
213
  export declare function trackSessionStatus(signedIn: boolean): void;
@@ -1921,6 +1921,15 @@ export function trackEvent(name, params) {
1921
1921
  if (lifecycle)
1922
1922
  trackEvent(lifecycle.name, lifecycle.properties);
1923
1923
  }
1924
+ /** Sends explicitly anonymous product events without resolving user identity. */
1925
+ export function trackAnonymousEvent(name, properties) {
1926
+ if (typeof window === "undefined" ||
1927
+ isSyntheticBrowserTraffic() ||
1928
+ isQaTrackingIdentity(_trackingIdentity)) {
1929
+ return;
1930
+ }
1931
+ sendAgentNativeAnalytics(name, properties);
1932
+ }
1924
1933
  export function trackLifecycleEvent(name, params) {
1925
1934
  trackEvent(name, params);
1926
1935
  }
@@ -225,8 +225,11 @@ export function appMountPath(appLocalRoute) {
225
225
  if (basePath && pathMatchesBasePath(pathname, basePath))
226
226
  return basePath;
227
227
  const marker = normalizeBasePath(appLocalRoute);
228
- if (!marker)
229
- return basePath;
228
+ if (!marker) {
229
+ return isWorkspaceRuntime() && pathname !== "/"
230
+ ? normalizeBasePath(pathname)
231
+ : basePath;
232
+ }
230
233
  const markerSegment = marker.slice(1);
231
234
  const mounts = workspaceAppMountPaths();
232
235
  const candidates = [];
@@ -31,9 +31,6 @@ export declare function BuilderConnectCta({ variant, onConnected, reconnect, }:
31
31
  * the local status, and a Connected badge in that state is a dead end. */
32
32
  reconnect?: boolean;
33
33
  }): import("react").JSX.Element;
34
- export declare function ApiKeyConnect({ onConnected }: {
35
- onConnected?: () => void;
36
- }): import("react").JSX.Element;
37
34
  export type BuilderSetupCardLayout = "default" | "sidebar";
38
35
  export declare function BuilderSetupContent({ onConnected, layout, }: {
39
36
  onConnected?: () => void;
@@ -1,22 +1,19 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Owns: run-error metadata extractors, recovery helpers, RunErrorRecoveryCard,
3
- // LoopLimitContinueCard, BuilderConnectCta, BuilderSetupCard, ApiKeyConnect,
3
+ // LoopLimitContinueCard, BuilderConnectCta, BuilderSetupCard,
4
4
  // PlanModeCallout, and getLoopLimitMetadata / getRunErrorMetadata exports used
5
5
  // by AssistantChatInner.
6
6
  import { IconLoader2, IconCheck, IconCopy, IconX, IconChevronDown, IconGitFork, IconGauge, IconSettings, IconArrowRight, IconAlertTriangle, IconPlayerPlay, IconRefresh, IconPlus, IconClipboardList, } from "@tabler/icons-react";
7
- import { lazy, Suspense, useState, useEffect, useCallback, useRef, } from "react";
7
+ import { useState, useEffect, useCallback, useRef } from "react";
8
+ import { Link } from "react-router";
9
+ import { buildSettingsRoute } from "../../navigation/index.js";
8
10
  import { agentNativePath } from "../api-path.js";
9
11
  import { writeClipboardText } from "../clipboard.js";
10
12
  import { isProviderAuthenticationError, localizeKnownChatErrorText, } from "../error-format.js";
11
13
  import { useFormatters, useT } from "../i18n.js";
12
- import { LazyChunkErrorBoundary } from "../lazy-chunk-error-boundary.js";
13
- import { LazyChunkRetryFallback } from "../lazy-chunk-retry-fallback.js";
14
14
  import { DeferredBuilderConnectPopover } from "../settings/deferred-builder-connect-popover.js";
15
15
  import { useBuilderConnectFlow } from "../settings/useBuilderStatus.js";
16
16
  import { cn } from "../utils.js";
17
- const LazyAgentProviderSetupForm = lazy(() => import("../settings/ProviderSetupForm.js").then((module) => ({
18
- default: module.AgentProviderSetupForm,
19
- })));
20
17
  // ─── Metadata extractors ──────────────────────────────────────────────────────
21
18
  export function getLoopLimitMetadata(message) {
22
19
  const meta = message?.metadata;
@@ -165,25 +162,18 @@ export function BuilderConnectCta({ variant = "primary", onConnected, reconnect
165
162
  }
166
163
  return (_jsxs("div", { className: containerClass, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "text-xs font-medium text-foreground", children: t("agentChat.setup.connectBuilder") }), _jsx("p", { className: "text-[11px] text-muted-foreground mt-0.5 max-w-[220px]", children: t("agentChat.setup.freeCredits") }), error && _jsx("p", { className: "mt-1 text-[10px] text-destructive", children: error })] }), _jsx(DeferredBuilderConnectPopover, { flow: flow, children: _jsx("button", { type: "button", disabled: connecting, className: "ms-auto inline-flex items-center gap-1 shrink-0 rounded-md bg-foreground px-3 py-1.5 text-[11px] font-medium no-underline text-background hover:opacity-90 disabled:opacity-60 disabled:cursor-wait", "aria-busy": connecting, children: connecting ? (_jsxs(_Fragment, { children: [_jsx(IconLoader2, { size: 10, className: "animate-spin" }), t("agentChat.common.waiting")] })) : (t("agentChat.common.connect")) }) })] }));
167
164
  }
168
- // ─── ApiKeyConnect ────────────────────────────────────────────────────────────
169
- export function ApiKeyConnect({ onConnected }) {
170
- const t = useT();
171
- const loadingForm = (_jsxs("div", { role: "status", "aria-busy": "true", "aria-label": t("agentChat.common.loading"), className: "space-y-2 rounded-md border border-border bg-accent/20 p-2.5", children: [_jsx("div", { "aria-hidden": "true", className: "h-8 animate-pulse rounded-md bg-muted" }), _jsx("div", { "aria-hidden": "true", className: "h-16 animate-pulse rounded-md bg-muted" }), _jsx("div", { "aria-hidden": "true", className: "ms-auto h-8 w-20 animate-pulse rounded-md bg-muted" })] }));
172
- return (_jsx(LazyChunkErrorBoundary, { fallback: _jsx(LazyChunkRetryFallback, {}), children: _jsx(Suspense, { fallback: loadingForm, children: _jsx(LazyAgentProviderSetupForm, { onConnected: () => onConnected?.(), layout: "compact", showTitle: false }) }) }));
173
- }
174
165
  export function BuilderSetupContent({ onConnected, layout = "default", }) {
175
166
  const t = useT();
176
- const [keyOpen, setKeyOpen] = useState(false);
177
167
  const sidebarLayout = layout === "sidebar";
178
- return (_jsxs("div", { className: cn("agent-builder-setup-content", sidebarLayout && "agent-builder-setup-card--sidebar"), children: [_jsxs("div", { className: cn("agent-builder-setup-card__content flex flex-col sm:flex-row sm:items-center sm:justify-between", sidebarLayout ? "gap-2" : "gap-3"), children: [_jsxs("div", { className: "agent-builder-setup-card__copy min-w-0", children: [_jsx("h3", { className: "text-[13px] font-medium text-foreground", children: t("agentPanel.connectAi", { defaultValue: "Connect AI" }) }), _jsx("p", { className: "mt-0.5 text-[11px] leading-relaxed text-muted-foreground", children: t("agentPanel.builderOrOwnKeys", {
179
- defaultValue: "Choose Builder.io or custom keys.",
180
- }) })] }), _jsxs("div", { className: cn("agent-builder-setup-card__actions flex shrink-0", sidebarLayout
181
- ? "flex-row items-center gap-1"
182
- : "flex-nowrap items-center gap-2"), children: [_jsx(BuilderConnectCta, { variant: "compact", onConnected: onConnected }), _jsx("button", { type: "button", onClick: () => setKeyOpen((open) => !open), className: cn("agent-builder-setup-card__key-button inline-flex shrink-0 items-center whitespace-nowrap rounded-md text-[11px] font-medium", sidebarLayout
183
- ? "h-7 border-0 bg-transparent px-0 text-muted-foreground hover:bg-transparent hover:text-foreground"
184
- : "h-8 border border-border bg-background px-3 text-foreground hover:bg-accent"), "aria-expanded": keyOpen, children: t("agentPanel.addOwnKeys", {
185
- defaultValue: "Custom keys",
186
- }) })] })] }), keyOpen ? (_jsx("div", { className: "mt-3", children: _jsx(ApiKeyConnect, { onConnected: onConnected }) })) : null] }));
168
+ return (_jsx("div", { className: cn("agent-builder-setup-content", sidebarLayout && "agent-builder-setup-card--sidebar"), children: _jsxs("div", { className: cn("agent-builder-setup-card__content flex flex-col sm:flex-row sm:items-center sm:justify-between", sidebarLayout ? "gap-2" : "gap-3"), children: [_jsxs("div", { className: "agent-builder-setup-card__copy min-w-0", children: [_jsx("h3", { className: "text-[13px] font-medium text-foreground", children: t("agentPanel.connectAi", { defaultValue: "Connect AI" }) }), _jsx("p", { className: "mt-0.5 text-[11px] leading-relaxed text-muted-foreground", children: t("agentPanel.builderOrOwnKeys", {
169
+ defaultValue: "Choose Builder.io or custom keys.",
170
+ }) })] }), _jsxs("div", { className: cn("agent-builder-setup-card__actions flex shrink-0", sidebarLayout
171
+ ? "flex-row items-center gap-1"
172
+ : "flex-nowrap items-center gap-2"), children: [_jsx(BuilderConnectCta, { variant: "compact", onConnected: onConnected }), _jsx(Link, { to: buildSettingsRoute("keys"), className: cn("agent-builder-setup-card__key-button inline-flex shrink-0 items-center whitespace-nowrap rounded-md text-[11px] font-medium", sidebarLayout
173
+ ? "h-7 border-0 bg-transparent px-0 text-muted-foreground hover:bg-transparent hover:text-foreground"
174
+ : "h-8 border border-border bg-background px-3 text-foreground hover:bg-accent"), children: t("agentPanel.addOwnKeys", {
175
+ defaultValue: "Custom keys",
176
+ }) })] })] }) }));
187
177
  }
188
178
  export function BuilderSetupCard({ onConnected, onDismiss, onRetry, bouncePulse, attached = false, fullWidth, layout = "default", }) {
189
179
  const sidebarLayout = layout === "sidebar";
@@ -24,7 +24,7 @@ export { DevDatabaseLink, type DevDatabaseLinkProps, } from "./db-admin/DevDatab
24
24
  export { DbAdminPage } from "./db-admin/DbAdminPage.js";
25
25
  export { installRouteChunkRecovery, reloadForStaleChunk, recoverFromStaleChunkError, } from "./route-chunk-recovery.js";
26
26
  export { AgentTerminal, type AgentTerminalProps } from "./terminal/index.js";
27
- export { trackEvent, trackLifecycleEvent, trackAgentChatLifecycle, trackSessionStatus, configureTracking, setTrackingContentCaptureEnabled, maybeStartSessionReplay, startSessionReplay, stopSessionReplay, getAnalyticsAnonymousId, getAnalyticsSessionId, setAnalyticsSessionId, clearAnalyticsSessionId, getFirstTouchAttribution, setSentryUser, setTrackingIdentity, getSessionReplayContext, getSessionReplayUrl, captureError, captureClientException, AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureException, captureMessage, isErrorCaptureInstalled, type CaptureExceptionContext, type CapturedExceptionEvent, type ClientCaptureContext, type AgentChatLifecycleEvent, type ConfigureTrackingOptions, type ErrorCaptureConfigOptions, type ExceptionBreadcrumb, type ExceptionLevel, type FirstTouchAttribution, type SessionReplayOptions, type SessionReplayContext, type SessionReplayLinkOptions, type SessionReplayStartResult, type SessionReplayUrlMatcher, type TrackingIdentityUser, } from "./analytics.js";
27
+ export { trackEvent, trackAnonymousEvent, trackLifecycleEvent, trackAgentChatLifecycle, trackSessionStatus, configureTracking, setTrackingContentCaptureEnabled, maybeStartSessionReplay, startSessionReplay, stopSessionReplay, getAnalyticsAnonymousId, getAnalyticsSessionId, setAnalyticsSessionId, clearAnalyticsSessionId, getFirstTouchAttribution, setSentryUser, setTrackingIdentity, getSessionReplayContext, getSessionReplayUrl, captureError, captureClientException, AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureException, captureMessage, isErrorCaptureInstalled, type CaptureExceptionContext, type CapturedExceptionEvent, type ClientCaptureContext, type AgentChatLifecycleEvent, type ConfigureTrackingOptions, type ErrorCaptureConfigOptions, type ExceptionBreadcrumb, type ExceptionLevel, type FirstTouchAttribution, type SessionReplayOptions, type SessionReplayContext, type SessionReplayLinkOptions, type SessionReplayStartResult, type SessionReplayUrlMatcher, type TrackingIdentityUser, } from "./analytics.js";
28
28
  export { track } from "./track.js";
29
29
  export { useCollaborativeDoc, isReconcileLeadClient, emailToColor, emailToName, dedupeCollabUsersByEmail, type UseCollaborativeDocOptions, type UseCollaborativeDocResult, type CollabInitializationErrorCategory, type CollabInitializationState, type CollaborativeDocSyncResult, type CollabUser, } from "../collab/client.js";
30
30
  export { AGENT_CLIENT_ID } from "../collab/agent-identity.js";
@@ -24,7 +24,7 @@ export { DevDatabaseLink, } from "./db-admin/DevDatabaseLink.js";
24
24
  export { DbAdminPage } from "./db-admin/DbAdminPage.js";
25
25
  export { installRouteChunkRecovery, reloadForStaleChunk, recoverFromStaleChunkError, } from "./route-chunk-recovery.js";
26
26
  export { AgentTerminal } from "./terminal/index.js";
27
- export { trackEvent, trackLifecycleEvent, trackAgentChatLifecycle, trackSessionStatus, configureTracking, setTrackingContentCaptureEnabled, maybeStartSessionReplay, startSessionReplay, stopSessionReplay, getAnalyticsAnonymousId, getAnalyticsSessionId, setAnalyticsSessionId, clearAnalyticsSessionId, getFirstTouchAttribution, setSentryUser, setTrackingIdentity, getSessionReplayContext, getSessionReplayUrl, captureError, captureClientException,
27
+ export { trackEvent, trackAnonymousEvent, trackLifecycleEvent, trackAgentChatLifecycle, trackSessionStatus, configureTracking, setTrackingContentCaptureEnabled, maybeStartSessionReplay, startSessionReplay, stopSessionReplay, getAnalyticsAnonymousId, getAnalyticsSessionId, setAnalyticsSessionId, clearAnalyticsSessionId, getFirstTouchAttribution, setSentryUser, setTrackingIdentity, getSessionReplayContext, getSessionReplayUrl, captureError, captureClientException,
28
28
  // First-party, Sentry-style error capture (auto + manual API).
29
29
  AGENT_NATIVE_EXCEPTION_EVENT_NAME, addErrorBreadcrumb, captureException, captureMessage, isErrorCaptureInstalled, } from "./analytics.js";
30
30
  export { track } from "./track.js";
@@ -1,3 +1,5 @@
1
+ import { type ReactNode } from "react";
2
+ import type { OutputReviewListRow } from "../../observability/types.js";
1
3
  declare const REVIEW_ARTIFACT_APPS: {
2
4
  readonly design: {
3
5
  readonly host: "design.agent-native.com";
@@ -17,6 +19,7 @@ export interface ObservabilityDashboardProps {
17
19
  className?: string;
18
20
  routeBasePath?: string;
19
21
  showHumanReview?: boolean;
22
+ renderArtifactPreview?: (artifact: OutputReviewListRow["artifacts"][number], compact: boolean) => ReactNode;
20
23
  }
21
24
  export declare function ObservabilityDashboard(props: ObservabilityDashboardProps): import("react").JSX.Element;
22
25
  export {};