@agent-native/core 0.141.6 → 0.141.7

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 (210) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +3 -14
  3. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +11 -6
  4. package/corpus/templates/analytics/.agents/skills/prometheus/SKILL.md +5 -5
  5. package/corpus/templates/analytics/AGENTS.md +2 -2
  6. package/corpus/templates/analytics/actions/compose-dashboard.ts +1 -1
  7. package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +135 -0
  8. package/corpus/templates/analytics/actions/navigate.ts +1 -1
  9. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +2 -2
  10. package/corpus/templates/analytics/actions/update-dashboard.ts +0 -1
  11. package/corpus/templates/analytics/actions/view-screen.ts +0 -20
  12. package/corpus/templates/analytics/app/components/layout/Header.tsx +0 -1
  13. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +5 -5
  14. package/corpus/templates/analytics/app/i18n-data.ts +2 -90
  15. package/corpus/templates/analytics/app/pages/Agents.tsx +0 -3
  16. package/corpus/templates/analytics/app/pages/Settings.tsx +22 -43
  17. package/corpus/templates/analytics/app/pages/settings/settings-search.ts +23 -20
  18. package/corpus/templates/analytics/app/routes/extensions._index.tsx +1 -1
  19. package/corpus/templates/analytics/app/routes/settings.$.tsx +1 -0
  20. package/corpus/templates/analytics/app/routes/team.tsx +1 -1
  21. package/corpus/templates/analytics/changelog/2026-08-05-settings-no-longer-includes-an-unnecessary-about-section.md +6 -0
  22. package/corpus/templates/analytics/docs/schemas/first-party-analytics.md +1 -1
  23. package/corpus/templates/analytics/scripts/first-party-analytics-bigquery.sql +104 -0
  24. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +0 -2
  25. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +1058 -0
  26. package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +34 -15
  27. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +57 -4
  28. package/corpus/templates/analytics/server/lib/real-data-actions.ts +1 -3
  29. package/corpus/templates/analytics/server/plugins/agent-chat.ts +2 -4
  30. package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +8 -6
  31. package/corpus/templates/assets/.agents/skills/library-management/SKILL.md +16 -1
  32. package/corpus/templates/assets/AGENTS.md +1 -0
  33. package/corpus/templates/assets/actions/_helpers.ts +12 -0
  34. package/corpus/templates/assets/actions/generate-image.ts +9 -3
  35. package/corpus/templates/assets/actions/import-style-from-url.ts +115 -0
  36. package/corpus/templates/assets/app/hooks/use-navigation-state.ts +3 -1
  37. package/corpus/templates/assets/app/routes/extensions._index.tsx +1 -1
  38. package/corpus/templates/assets/app/routes/settings.$.tsx +1 -0
  39. package/corpus/templates/assets/app/routes/settings.tsx +5 -0
  40. package/corpus/templates/assets/app/routes/team.tsx +1 -1
  41. package/corpus/templates/assets/changelog/2026-08-05-brand-kits-can-import-a-website-s-hydrated-visual-language-a.md +6 -0
  42. package/corpus/templates/assets/changelog/2026-08-05-generated-images-now-hand-off-embeddable-previews-to-other-w.md +6 -0
  43. package/corpus/templates/assets/server/lib/generation.ts +58 -0
  44. package/corpus/templates/assets/shared/api.ts +12 -0
  45. package/corpus/templates/brain/app/routes/extensions._index.tsx +1 -1
  46. package/corpus/templates/brain/app/routes/team.tsx +1 -1
  47. package/corpus/templates/brain/app/routes.ts +1 -1
  48. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -1
  49. package/corpus/templates/calendar/app/routes/_app.extensions._index.tsx +1 -1
  50. package/corpus/templates/calendar/app/routes/_app.settings.$.tsx +1 -0
  51. package/corpus/templates/calendar/app/routes/_app.team.tsx +1 -1
  52. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -1
  53. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +1 -1
  54. package/corpus/templates/chat/app/root.tsx +1 -1
  55. package/corpus/templates/chat/app/routes/agent.tsx +7 -7
  56. package/corpus/templates/chat/app/routes/extensions._index.tsx +1 -1
  57. package/corpus/templates/chat/app/routes/settings.$.tsx +1 -0
  58. package/corpus/templates/chat/app/routes/team.tsx +1 -1
  59. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  60. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +1 -1
  61. package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +1 -1
  62. package/corpus/templates/clips/app/routes/_app.extensions._index.tsx +1 -1
  63. package/corpus/templates/clips/app/routes/_app.settings.$.tsx +1 -0
  64. package/corpus/templates/content/app/routes/_app.extensions._index.tsx +1 -1
  65. package/corpus/templates/content/app/routes/_app.settings.$.tsx +1 -0
  66. package/corpus/templates/content/app/routes/_app.team.tsx +1 -1
  67. package/corpus/templates/content/e2e/global-setup.ts +1 -1
  68. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +6 -1
  69. package/corpus/templates/design/actions/analyze-brand-assets.ts +7 -7
  70. package/corpus/templates/design/actions/import-from-url.ts +6 -5
  71. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +2 -2
  72. package/corpus/templates/design/app/routes/extensions._index.tsx +1 -1
  73. package/corpus/templates/design/app/routes/settings.$.tsx +1 -0
  74. package/corpus/templates/design/app/routes/team.tsx +1 -1
  75. package/corpus/templates/design/changelog/2026-08-05-website-url-imports-now-capture-hydrated-browser-computed-de.md +6 -0
  76. package/corpus/templates/design/e2e/global-setup.ts +1 -1
  77. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +1 -1
  78. package/corpus/templates/dispatch/app/routes/settings.$.tsx +1 -0
  79. package/corpus/templates/dispatch/app/routes/team.tsx +1 -1
  80. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +1 -1
  81. package/corpus/templates/factory/app/routes/extensions._index.tsx +1 -1
  82. package/corpus/templates/factory/app/routes/settings.$.tsx +1 -0
  83. package/corpus/templates/factory/app/routes/team.tsx +1 -1
  84. package/corpus/templates/forms/app/routes/_app.extensions._index.tsx +1 -1
  85. package/corpus/templates/forms/app/routes/_app.settings.$.tsx +1 -0
  86. package/corpus/templates/forms/app/routes/_app.team.tsx +1 -1
  87. package/corpus/templates/forms/shared/navigation.ts +1 -1
  88. package/corpus/templates/macros/app/routes/extensions._index.tsx +1 -1
  89. package/corpus/templates/macros/app/routes/settings.$.tsx +1 -0
  90. package/corpus/templates/macros/app/routes/team.tsx +1 -1
  91. package/corpus/templates/mail/app/routes/extensions._index.tsx +1 -1
  92. package/corpus/templates/mail/app/routes/settings.$.tsx +1 -0
  93. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +1 -1
  94. package/corpus/templates/plan/app/routes/extensions._index.tsx +1 -1
  95. package/corpus/templates/plan/app/routes/settings.$.tsx +1 -0
  96. package/corpus/templates/plan/app/routes/team.tsx +1 -1
  97. package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +3 -1
  98. package/corpus/templates/slides/actions/analyze-brand-assets.ts +7 -7
  99. package/corpus/templates/slides/actions/import-from-url.ts +6 -6
  100. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
  101. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +3 -0
  102. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +9 -3
  103. package/corpus/templates/slides/app/context/DeckContext.tsx +71 -20
  104. package/corpus/templates/slides/app/global.css +6 -0
  105. package/corpus/templates/slides/app/lib/create-deck-generation.ts +9 -5
  106. package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -0
  107. package/corpus/templates/slides/app/pages/Index.tsx +16 -5
  108. package/corpus/templates/slides/app/routes/extensions._index.tsx +1 -1
  109. package/corpus/templates/slides/app/routes/settings.$.tsx +1 -0
  110. package/corpus/templates/slides/app/routes/team.tsx +1 -1
  111. package/corpus/templates/slides/changelog/2026-08-05-failed-deck-creation-and-reference-uploads-now-recover-clean.md +6 -0
  112. package/corpus/templates/slides/changelog/2026-08-05-slides-recover-completed-generation-results-after-a-sync-hic.md +6 -0
  113. package/corpus/templates/slides/changelog/2026-08-05-website-url-imports-now-capture-hydrated-browser-computed-st.md +6 -0
  114. package/corpus/templates/tasks/app/components/layout/Header.tsx +3 -1
  115. package/corpus/templates/tasks/app/routes/extensions._index.tsx +1 -1
  116. package/corpus/templates/tasks/app/routes/settings.$.tsx +1 -0
  117. package/dist/agent/engine/ai-sdk-engine.js +49 -3
  118. package/dist/agent/production-agent.d.ts +1 -0
  119. package/dist/agent/production-agent.js +8 -0
  120. package/dist/agent/types.d.ts +7 -0
  121. package/dist/client/agent-chat-adapter.d.ts +1 -1
  122. package/dist/client/agent-chat-adapter.js +30 -3
  123. package/dist/client/agent-page/AgentWorkspaceContent.d.ts +1 -1
  124. package/dist/client/agent-page/AgentWorkspaceContent.js +13 -13
  125. package/dist/client/chat/run-recovery.js +5 -1
  126. package/dist/client/embed-auth.js +6 -2
  127. package/dist/client/error-format.js +12 -0
  128. package/dist/client/integrations/IntegrationsPanel.js +40 -6
  129. package/dist/client/org/OrgSwitcher.js +2 -2
  130. package/dist/client/org/TeamPage.js +92 -72
  131. package/dist/client/require-session.d.ts +1 -1
  132. package/dist/client/require-session.js +3 -3
  133. package/dist/client/resources/use-mcp-servers.d.ts +5 -0
  134. package/dist/client/resources/use-mcp-servers.js +36 -0
  135. package/dist/client/settings/AccountSettingsCard.js +40 -35
  136. package/dist/client/settings/AutomationsSection.js +1 -1
  137. package/dist/client/settings/DemoModeSection.d.ts +3 -1
  138. package/dist/client/settings/DemoModeSection.js +4 -1
  139. package/dist/client/settings/ExtensionsSettingsContent.js +1 -1
  140. package/dist/client/settings/SchedulingTimezoneField.d.ts +3 -1
  141. package/dist/client/settings/SchedulingTimezoneField.js +9 -5
  142. package/dist/client/settings/SettingsPanel.d.ts +4 -1
  143. package/dist/client/settings/SettingsPanel.js +21 -21
  144. package/dist/client/settings/SettingsTabsPage.d.ts +2 -2
  145. package/dist/client/settings/SettingsTabsPage.js +98 -45
  146. package/dist/client/settings/VoiceTranscriptionSection.js +6 -1
  147. package/dist/client/settings/useSettingsPanelController.js +47 -8
  148. package/dist/collab/struct-routes.d.ts +1 -1
  149. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  150. package/dist/ingestion/website.d.ts +30 -0
  151. package/dist/localization/default-messages.d.ts +5 -0
  152. package/dist/localization/default-messages.js +5 -0
  153. package/dist/mcp-client/oauth-routes.js +1 -1
  154. package/dist/mcp-client/routes.d.ts +1 -0
  155. package/dist/mcp-client/routes.js +49 -0
  156. package/dist/navigation/index.js +16 -5
  157. package/dist/observability/routes.d.ts +5 -5
  158. package/dist/progress/routes.d.ts +1 -1
  159. package/dist/provider-api/actions/custom-provider-registration.d.ts +13 -13
  160. package/dist/provider-api/actions/provider-api.d.ts +11 -11
  161. package/dist/resources/handlers.d.ts +1 -1
  162. package/dist/scripts/call-agent.js +11 -0
  163. package/dist/secrets/routes.d.ts +3 -3
  164. package/dist/server/auth.js +9 -7
  165. package/dist/server/identity-sso.js +2 -1
  166. package/dist/server/onboarding-html.js +57 -34
  167. package/dist/server/realtime-token.d.ts +1 -1
  168. package/dist/server/transcribe-voice.d.ts +1 -1
  169. package/dist/server/workspace-provider-oauth.js +1 -1
  170. package/dist/setup-connections/onboarding.js +1 -1
  171. package/dist/shared/index.d.ts +1 -1
  172. package/dist/shared/index.js +1 -1
  173. package/dist/shared/sign-in-journey.d.ts +5 -2
  174. package/dist/shared/sign-in-journey.js +10 -4
  175. package/dist/templates/chat/app/components/layout/Layout.tsx +1 -1
  176. package/dist/templates/chat/app/hooks/use-navigation-state.ts +1 -1
  177. package/dist/templates/chat/app/root.tsx +1 -1
  178. package/dist/templates/chat/app/routes/agent.tsx +7 -7
  179. package/dist/templates/chat/app/routes/extensions._index.tsx +1 -1
  180. package/dist/templates/chat/app/routes/settings.$.tsx +1 -0
  181. package/dist/templates/chat/app/routes/team.tsx +1 -1
  182. package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +37 -6
  183. package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +4 -2
  184. package/docs/content/authentication.mdx +4 -5
  185. package/docs/content/template-analytics-developers.mdx +1 -1
  186. package/docs/content/template-calendar-developers.mdx +1 -1
  187. package/docs/content/template-chat-developers.mdx +2 -2
  188. package/docs/content/template-content-developers.mdx +1 -1
  189. package/docs/content/template-mail-developers.mdx +1 -1
  190. package/docs/content/template-plan-developers.mdx +1 -1
  191. package/docs/content/toolkit-command-navigation.mdx +6 -6
  192. package/docs/content/toolkit-org-team.mdx +1 -1
  193. package/docs/content/toolkit-settings.mdx +8 -8
  194. package/docs/content/toolkit-setup-connections.mdx +1 -1
  195. package/package.json +1 -1
  196. package/src/templates/chat/app/components/layout/Layout.tsx +1 -1
  197. package/src/templates/chat/app/hooks/use-navigation-state.ts +1 -1
  198. package/src/templates/chat/app/root.tsx +1 -1
  199. package/src/templates/chat/app/routes/agent.tsx +7 -7
  200. package/src/templates/chat/app/routes/extensions._index.tsx +1 -1
  201. package/src/templates/chat/app/routes/settings.$.tsx +1 -0
  202. package/src/templates/chat/app/routes/team.tsx +1 -1
  203. package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +37 -6
  204. package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +4 -2
  205. package/corpus/templates/analytics/.agents/skills/dashboard-management/references/template-catalog-and-demo.md +0 -62
  206. package/corpus/templates/analytics/actions/install-dashboard-template.ts +0 -369
  207. package/corpus/templates/analytics/actions/list-dashboard-templates.ts +0 -47
  208. package/corpus/templates/analytics/actions/list-native-v2-dashboard-templates.ts +0 -34
  209. package/corpus/templates/analytics/app/routes/catalog.tsx +0 -240
  210. package/src/templates/default/actions/navigate.spec.ts +0 -53
@@ -75,9 +75,8 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
75
75
  user: "user";
76
76
  }>>;
77
77
  }, z.core.$strip>>, {
78
+ id?: undefined;
78
79
  deleted?: undefined;
79
- found?: undefined;
80
- message?: undefined;
81
80
  providers: {
82
81
  id: string;
83
82
  label: string;
@@ -89,45 +88,46 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
89
88
  }[];
90
89
  count: number;
91
90
  provider?: undefined;
91
+ found?: undefined;
92
92
  registered?: undefined;
93
- id?: undefined;
94
93
  label?: undefined;
94
+ message?: undefined;
95
95
  } | {
96
+ id?: undefined;
96
97
  deleted?: undefined;
97
- message?: undefined;
98
- providers?: undefined;
99
98
  count?: undefined;
99
+ providers?: undefined;
100
100
  found: boolean;
101
101
  provider: import("../custom-registry.js").CustomProviderConfig;
102
102
  registered?: undefined;
103
- id?: undefined;
104
103
  label?: undefined;
104
+ message?: undefined;
105
105
  } | {
106
106
  deleted?: undefined;
107
- message?: undefined;
108
- providers?: undefined;
109
107
  count?: undefined;
108
+ providers?: undefined;
110
109
  provider?: undefined;
111
110
  found: boolean;
112
111
  id: string;
113
112
  registered?: undefined;
114
113
  label?: undefined;
115
- } | {
116
- found?: undefined;
117
114
  message?: undefined;
118
- providers?: undefined;
115
+ } | {
119
116
  count?: undefined;
117
+ providers?: undefined;
120
118
  provider?: undefined;
119
+ found?: undefined;
121
120
  deleted: boolean;
122
121
  id: string;
123
122
  registered?: undefined;
124
123
  label?: undefined;
124
+ message?: undefined;
125
125
  } | {
126
126
  deleted?: undefined;
127
- found?: undefined;
128
- providers?: undefined;
129
127
  count?: undefined;
128
+ providers?: undefined;
130
129
  provider?: undefined;
130
+ found?: undefined;
131
131
  registered: boolean;
132
132
  id: string;
133
133
  label: string;
@@ -311,10 +311,10 @@ 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
316
  provider?: undefined;
316
317
  deleted?: undefined;
317
- found?: undefined;
318
318
  providers: {
319
319
  id: string;
320
320
  label: string;
@@ -325,45 +325,45 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
325
325
  updatedAt: number;
326
326
  }[];
327
327
  count: number;
328
+ found?: undefined;
328
329
  registered?: undefined;
329
330
  label?: undefined;
330
- message?: undefined;
331
331
  } | {
332
+ message?: undefined;
333
+ count?: undefined;
332
334
  id?: undefined;
333
335
  deleted?: undefined;
334
- count?: undefined;
335
336
  providers?: undefined;
336
337
  found: boolean;
337
338
  provider: import("../custom-registry.js").CustomProviderConfig;
338
339
  registered?: undefined;
339
340
  label?: undefined;
340
- message?: undefined;
341
341
  } | {
342
+ message?: undefined;
343
+ count?: undefined;
342
344
  provider?: undefined;
343
345
  deleted?: undefined;
344
- count?: undefined;
345
346
  providers?: undefined;
346
347
  found: boolean;
347
348
  id: string;
348
349
  registered?: undefined;
349
350
  label?: undefined;
350
- message?: undefined;
351
351
  } | {
352
- provider?: undefined;
353
- found?: undefined;
352
+ message?: undefined;
354
353
  count?: undefined;
354
+ provider?: undefined;
355
355
  providers?: undefined;
356
+ found?: undefined;
356
357
  deleted: boolean;
357
358
  id: string;
358
359
  registered?: undefined;
359
360
  label?: undefined;
360
- message?: undefined;
361
361
  } | {
362
+ count?: undefined;
362
363
  provider?: undefined;
363
364
  deleted?: undefined;
364
- found?: undefined;
365
- count?: undefined;
366
365
  providers?: undefined;
366
+ found?: undefined;
367
367
  registered: boolean;
368
368
  id: string;
369
369
  label: string;
@@ -48,8 +48,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
48
48
  }>;
49
49
  /** DELETE /_agent-native/resources/:id — delete a resource */
50
50
  export declare function handleDeleteResource(event: any): Promise<{
51
- ok?: undefined;
52
51
  error: string;
52
+ ok?: undefined;
53
53
  } | {
54
54
  error?: undefined;
55
55
  ok: boolean;
@@ -363,6 +363,7 @@ export async function run(args, context, selfAppId) {
363
363
  status: terminalStatus,
364
364
  agentCallId,
365
365
  durationMs: Date.now() - startedAt,
366
+ ...(terminalCode ? { terminalCode } : {}),
366
367
  });
367
368
  }
368
369
  }
@@ -534,6 +535,13 @@ export async function run(args, context, selfAppId) {
534
535
  let lastProgressEmitAt = callStartedAt;
535
536
  let lastActivitySequence = -1;
536
537
  const onRemotePollUpdate = (task) => {
538
+ // Capture the remote task id on every poll, not only on the timeout and
539
+ // error branches that used to set it. Without this a call that SUCCEEDS
540
+ // slowly carries no task id, so "why did this one take four minutes?"
541
+ // cannot be traced into the receiving app's own task record — which is
542
+ // the question worth asking about a slow cross-app call.
543
+ if (task?.id)
544
+ invocationTaskId = task.id;
537
545
  const state = task?.status?.state;
538
546
  const parts = task.status?.message?.parts;
539
547
  const snapshot = Array.isArray(parts)
@@ -686,6 +694,9 @@ export async function run(args, context, selfAppId) {
686
694
  agentCallId,
687
695
  ...(invocationTaskId ? { taskId: invocationTaskId } : {}),
688
696
  durationMs: Date.now() - callStartedAt,
697
+ ...(invocationTerminalCode
698
+ ? { terminalCode: invocationTerminalCode }
699
+ : {}),
689
700
  });
690
701
  return (responseText || `Error: The ${agent.name} agent returned no result.`);
691
702
  }
@@ -34,16 +34,16 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
40
  ok: boolean;
41
41
  status: string;
42
42
  error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
48
  ok: boolean;
49
49
  removed: boolean;
@@ -54,9 +54,9 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
54
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
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
61
  ok: boolean;
62
62
  note?: undefined;
@@ -48,7 +48,7 @@ import { readBody } from "../server/h3-helpers.js";
48
48
  import { putSetting } from "../settings/store.js";
49
49
  import { resolveSsrCacheHeaders } from "../shared/cache-control.js";
50
50
  import { extractOAuthStateAppId } from "../shared/oauth-state.js";
51
- import { SIGN_IN_CONTINUATION_PARAM, SIGN_IN_LEGACY_RETURN_PARAM, normalizeAppPath, signInJourney, } from "../shared/sign-in-journey.js";
51
+ import { SIGN_IN_CONTINUATION_PARAM, SIGN_IN_ENTRY_PATH, SIGN_IN_LEGACY_ENTRY_PATH, SIGN_IN_LEGACY_RETURN_PARAM, normalizeAppPath, signInJourney, } from "../shared/sign-in-journey.js";
52
52
  import { AGENT_NATIVE_SOCIAL_IMAGE_ALT, AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT, AGENT_NATIVE_SOCIAL_IMAGE_PATH, AGENT_NATIVE_SOCIAL_IMAGE_TYPE, AGENT_NATIVE_SOCIAL_IMAGE_WIDTH, withAgentNativeSocialImageCacheBuster, } from "../shared/social-meta.js";
53
53
  import { normalizeWorkspaceAppAudience, workspaceAppAudienceFromEnv, workspaceAppRouteAccessFromEnv, } from "../shared/workspace-app-audience.js";
54
54
  import { isValidWorkspaceAppIdFormat } from "../shared/workspace-app-id.js";
@@ -1391,11 +1391,12 @@ function createAuthGuardFn() {
1391
1391
  return;
1392
1392
  }
1393
1393
  // Force-sign-in entrypoint. Templates send viewers from public pages
1394
- // (share links, embeds) here with a `?return=<path>` query. The cached
1395
- // login document validates that return path in the browser and redirects
1396
- // there after sign-in or when its client-side session check finds an
1397
- // existing session.
1398
- if (p === "/_agent-native/sign-in") {
1394
+ // (share links, embeds) here with a `?return=<path>` query. The clean
1395
+ // `/sign-in` path is canonical; keep the old framework path as a
1396
+ // compatibility alias. The cached login document validates that return
1397
+ // path in the browser and redirects there after sign-in or when its
1398
+ // client-side session check finds an existing session.
1399
+ if (p === SIGN_IN_ENTRY_PATH || p === SIGN_IN_LEGACY_ENTRY_PATH) {
1399
1400
  // Preserve the zero-setup localhost experience without putting a
1400
1401
  // session lookup back on the cacheable app-shell URL. The client gate
1401
1402
  // reaches this explicit entrypoint after discovering there is no
@@ -1403,7 +1404,8 @@ function createAuthGuardFn() {
1403
1404
  if (getMethod(event) === "GET") {
1404
1405
  const query = new URLSearchParams(queryStart >= 0 ? url.slice(queryStart + 1) : "");
1405
1406
  // `?return=` is read as a fallback FOREVER. Generated apps in the wild
1406
- // hand-write `/_agent-native/sign-in?return=…` and cannot be upgraded;
1407
+ // hand-write the legacy `/_agent-native/sign-in?return=…` path and
1408
+ // cannot be upgraded;
1407
1409
  // dropping the fallback would send them all to "/" — a UX quirk no
1408
1410
  // test would catch. New producers emit `c`; only NEW `?return=`
1409
1411
  // producers are forbidden, never this consumer.
@@ -45,6 +45,7 @@ import { createHash } from "node:crypto";
45
45
  import { getMethod } from "h3";
46
46
  import * as jose from "jose";
47
47
  import { GOOGLE_AUTH_REQUIRED_MESSAGE, isGoogleSignInRequiredForEmail, } from "../org/auth-policy.js";
48
+ import { SIGN_IN_ENTRY_PATH } from "../shared/sign-in-journey.js";
48
49
  import { getAppName } from "./app-name.js";
49
50
  import { getSession, safeReturnPath, isExpectedAuthFailure } from "./auth.js";
50
51
  import { getBetterAuth, getBetterAuthInternalAdapter, } from "./better-auth-instance.js";
@@ -310,7 +311,7 @@ export async function handleIdentitySso(event, subpath) {
310
311
  const method = getMethod(event);
311
312
  const sub = ("/" + subpath.replace(/^\/+/, "").replace(/\/+$/, "")).replace(/^\/$/, "");
312
313
  const origin = getOrigin(event);
313
- const loginPath = "/_agent-native/sign-in";
314
+ const loginPath = SIGN_IN_ENTRY_PATH;
314
315
  // ---- GET /login → 302 to the hub authorize endpoint ------------------
315
316
  if (sub === "/login") {
316
317
  if (method !== "GET" && method !== "HEAD") {
@@ -72,9 +72,9 @@ const EN_AUTH_COPY = {
72
72
  passwordMinPlaceholder: "At least 8 characters",
73
73
  confirmPasswordPlaceholder: "Confirm password",
74
74
  enterPasswordPlaceholder: "Enter password",
75
- magicLinkTitle: "Sign in with a link",
76
- magicLinkSubtitle: "Enter your email and we'll send you a secure sign-in link",
77
- sendMagicLink: "Email me a sign-in link",
75
+ magicLinkTitle: "Welcome",
76
+ magicLinkSubtitle: "Create an account or sign in",
77
+ sendMagicLink: "Continue",
78
78
  magicLinkSent: "Check your email",
79
79
  magicLinkSentCopy: "We sent a secure sign-in link to",
80
80
  magicLinkFailed: "Could not send sign-in link.",
@@ -168,9 +168,9 @@ const AUTH_LOCALE_COPY = {
168
168
  passwordMinPlaceholder: "至少 8 个字符",
169
169
  confirmPasswordPlaceholder: "确认密码",
170
170
  enterPasswordPlaceholder: "输入密码",
171
- magicLinkTitle: "使用链接登录",
172
- magicLinkSubtitle: "输入邮箱,我们会发送安全登录链接",
173
- sendMagicLink: "发送登录链接到邮箱",
171
+ magicLinkTitle: "欢迎",
172
+ magicLinkSubtitle: "创建账户或登录",
173
+ sendMagicLink: "继续",
174
174
  magicLinkSent: "检查你的邮箱",
175
175
  magicLinkSentCopy: "我们已向以下邮箱发送安全登录链接:",
176
176
  magicLinkFailed: "无法发送登录链接。",
@@ -262,9 +262,9 @@ const AUTH_LOCALE_COPY = {
262
262
  passwordMinPlaceholder: "至少 8 個字元",
263
263
  confirmPasswordPlaceholder: "確認密碼",
264
264
  enterPasswordPlaceholder: "輸入密碼",
265
- magicLinkTitle: "使用連結登入",
266
- magicLinkSubtitle: "輸入電子郵件,我們會寄送安全登入連結",
267
- sendMagicLink: "寄送登入連結",
265
+ magicLinkTitle: "歡迎",
266
+ magicLinkSubtitle: "建立帳戶或登入",
267
+ sendMagicLink: "繼續",
268
268
  magicLinkSent: "檢查你的電子郵件",
269
269
  magicLinkSentCopy: "我們已向以下電子郵件寄送安全登入連結:",
270
270
  magicLinkFailed: "無法寄送登入連結。",
@@ -356,9 +356,9 @@ const AUTH_LOCALE_COPY = {
356
356
  passwordMinPlaceholder: "Al menos 8 caracteres",
357
357
  confirmPasswordPlaceholder: "Confirmar contraseña",
358
358
  enterPasswordPlaceholder: "Introduce la contraseña",
359
- magicLinkTitle: "Inicia sesión con un enlace",
360
- magicLinkSubtitle: "Introduce tu email y te enviaremos un enlace seguro",
361
- sendMagicLink: "Enviarme un enlace de inicio de sesión",
359
+ magicLinkTitle: "Bienvenido",
360
+ magicLinkSubtitle: "Crea una cuenta o inicia sesión",
361
+ sendMagicLink: "Continuar",
362
362
  magicLinkSent: "Revisa tu email",
363
363
  magicLinkSentCopy: "Enviamos un enlace seguro a",
364
364
  magicLinkFailed: "No se pudo enviar el enlace de inicio de sesión.",
@@ -450,9 +450,9 @@ const AUTH_LOCALE_COPY = {
450
450
  passwordMinPlaceholder: "Au moins 8 caractères",
451
451
  confirmPasswordPlaceholder: "Confirmer le mot de passe",
452
452
  enterPasswordPlaceholder: "Saisir le mot de passe",
453
- magicLinkTitle: "Se connecter avec un lien",
454
- magicLinkSubtitle: "Saisissez votre e-mail et nous vous enverrons un lien sécurisé",
455
- sendMagicLink: "M'envoyer un lien de connexion",
453
+ magicLinkTitle: "Bienvenue",
454
+ magicLinkSubtitle: "Créez un compte ou connectez-vous",
455
+ sendMagicLink: "Continuer",
456
456
  magicLinkSent: "Vérifiez votre e-mail",
457
457
  magicLinkSentCopy: "Nous avons envoyé un lien sécurisé à",
458
458
  magicLinkFailed: "Impossible d'envoyer le lien de connexion.",
@@ -544,9 +544,9 @@ const AUTH_LOCALE_COPY = {
544
544
  passwordMinPlaceholder: "Mindestens 8 Zeichen",
545
545
  confirmPasswordPlaceholder: "Passwort bestätigen",
546
546
  enterPasswordPlaceholder: "Passwort eingeben",
547
- magicLinkTitle: "Mit einem Link anmelden",
548
- magicLinkSubtitle: "Gib deine E-Mail ein und wir senden dir einen sicheren Anmeldelink",
549
- sendMagicLink: "Anmeldelink per E-Mail senden",
547
+ magicLinkTitle: "Willkommen",
548
+ magicLinkSubtitle: "Konto erstellen oder anmelden",
549
+ sendMagicLink: "Weiter",
550
550
  magicLinkSent: "Prüfe deine E-Mail",
551
551
  magicLinkSentCopy: "Wir haben einen sicheren Anmeldelink gesendet an",
552
552
  magicLinkFailed: "Anmeldelink konnte nicht gesendet werden.",
@@ -638,9 +638,9 @@ const AUTH_LOCALE_COPY = {
638
638
  passwordMinPlaceholder: "8 文字以上",
639
639
  confirmPasswordPlaceholder: "パスワードを確認",
640
640
  enterPasswordPlaceholder: "パスワードを入力",
641
- magicLinkTitle: "リンクでサインイン",
642
- magicLinkSubtitle: "メールアドレスを入力すると、安全なサインインリンクを送信します",
643
- sendMagicLink: "サインインリンクをメールで送信",
641
+ magicLinkTitle: "ようこそ",
642
+ magicLinkSubtitle: "アカウントを作成するかサインインしてください",
643
+ sendMagicLink: "続行",
644
644
  magicLinkSent: "メールを確認してください",
645
645
  magicLinkSentCopy: "安全なサインインリンクを送信しました:",
646
646
  magicLinkFailed: "サインインリンクを送信できませんでした。",
@@ -732,9 +732,9 @@ const AUTH_LOCALE_COPY = {
732
732
  passwordMinPlaceholder: "8자 이상",
733
733
  confirmPasswordPlaceholder: "비밀번호 확인",
734
734
  enterPasswordPlaceholder: "비밀번호 입력",
735
- magicLinkTitle: "링크로 로그인",
736
- magicLinkSubtitle: "이메일을 입력하면 안전한 로그인 링크를 보내드립니다",
737
- sendMagicLink: "로그인 링크 이메일 받기",
735
+ magicLinkTitle: "환영합니다",
736
+ magicLinkSubtitle: "계정을 만들거나 로그인하세요",
737
+ sendMagicLink: "계속",
738
738
  magicLinkSent: "이메일을 확인하세요",
739
739
  magicLinkSentCopy: "안전한 로그인 링크를 보냈습니다:",
740
740
  magicLinkFailed: "로그인 링크를 보낼 수 없습니다.",
@@ -826,9 +826,9 @@ const AUTH_LOCALE_COPY = {
826
826
  passwordMinPlaceholder: "Pelo menos 8 caracteres",
827
827
  confirmPasswordPlaceholder: "Confirmar senha",
828
828
  enterPasswordPlaceholder: "Digite a senha",
829
- magicLinkTitle: "Entrar com um link",
830
- magicLinkSubtitle: "Digite seu email e enviaremos um link seguro de acesso",
831
- sendMagicLink: "Enviar link de acesso por email",
829
+ magicLinkTitle: "Bem-vindo",
830
+ magicLinkSubtitle: "Crie uma conta ou entre",
831
+ sendMagicLink: "Continuar",
832
832
  magicLinkSent: "Confira seu email",
833
833
  magicLinkSentCopy: "Enviamos um link seguro para",
834
834
  magicLinkFailed: "Não foi possível enviar o link de acesso.",
@@ -920,9 +920,9 @@ const AUTH_LOCALE_COPY = {
920
920
  passwordMinPlaceholder: "कम से कम 8 अक्षर",
921
921
  confirmPasswordPlaceholder: "पासवर्ड की पुष्टि करें",
922
922
  enterPasswordPlaceholder: "पासवर्ड दर्ज करें",
923
- magicLinkTitle: "लिंक से साइन इन करें",
924
- magicLinkSubtitle: "अपना ईमेल दर्ज करें और हम सुरक्षित साइन-इन लिंक भेजेंगे",
925
- sendMagicLink: "मुझे साइन-इन लिंक ईमेल करें",
923
+ magicLinkTitle: "स्वागत है",
924
+ magicLinkSubtitle: "खाता बनाएं या साइन इन करें",
925
+ sendMagicLink: "जारी रखें",
926
926
  magicLinkSent: "अपना ईमेल देखें",
927
927
  magicLinkSentCopy: "हमने सुरक्षित साइन-इन लिंक यहां भेजा है:",
928
928
  magicLinkFailed: "साइन-इन लिंक नहीं भेजा जा सका।",
@@ -1014,9 +1014,9 @@ const AUTH_LOCALE_COPY = {
1014
1014
  passwordMinPlaceholder: "8 أحرف على الأقل",
1015
1015
  confirmPasswordPlaceholder: "تأكيد كلمة المرور",
1016
1016
  enterPasswordPlaceholder: "أدخل كلمة المرور",
1017
- magicLinkTitle: "تسجيل الدخول باستخدام رابط",
1018
- magicLinkSubtitle: "أدخل بريدك الإلكتروني وسنرسل لك رابط تسجيل دخول آمنًا",
1019
- sendMagicLink: "إرسال رابط تسجيل الدخول إلى بريدي",
1017
+ magicLinkTitle: "مرحبًا",
1018
+ magicLinkSubtitle: "أنشئ حسابًا أو سجّل الدخول",
1019
+ sendMagicLink: "متابعة",
1020
1020
  magicLinkSent: "تحقق من بريدك الإلكتروني",
1021
1021
  magicLinkSentCopy: "أرسلنا رابط تسجيل دخول آمنًا إلى",
1022
1022
  magicLinkFailed: "تعذر إرسال رابط تسجيل الدخول.",
@@ -1914,6 +1914,7 @@ ${hasMarketing
1914
1914
  background: rgba(255,255,255,0.06);
1915
1915
  border-radius: 8px;
1916
1916
  }
1917
+ .tabs[hidden] { display: none; }
1917
1918
  .tab {
1918
1919
  flex: 1;
1919
1920
  padding: 0.5rem 0.75rem;
@@ -2124,8 +2125,11 @@ ${hasMarketing
2124
2125
  text-decoration: underline;
2125
2126
  text-underline-offset: 2px;
2126
2127
  }
2128
+ .auth-mode-link { text-decoration: none; }
2127
2129
  .link-button:hover { color: #bbb; }
2128
2130
  .link-button:disabled { cursor: wait; opacity: 0.5; }
2131
+ .magic-link-submit { display: none; }
2132
+ .magic-link-submit.is-visible { display: block; }
2129
2133
  .divider {
2130
2134
  display: flex;
2131
2135
  align-items: center;
@@ -2354,7 +2358,7 @@ ${googleOnly ? "" : `\n <div class="divider" id="auth-divider"${i18nAttr("divid
2354
2358
  : ""}
2355
2359
  ${googleOnly
2356
2360
  ? ""
2357
- : `${magicLinkMode ? '\n <form id="magic-link-form" class="form">\n <label for="m-email"' + i18nAttr("email") + ">" + esc(t("email")) + '</label>\n <input id="m-email" type="email" autocomplete="email" autofocus placeholder="you@example.com" required />\n <button type="submit"' + i18nAttr("sendMagicLink") + ">" + esc(t("sendMagicLink")) + '</button>\n <p class="msg" id="m-msg"></p>\n <p style="margin-top:0.75rem;font-size:0.75rem;text-align:center">\n <a href="#" id="use-password-link" class="link-button"' + i18nAttr("usePasswordInstead") + ">" + esc(t("usePasswordInstead")) + "</a>\n </p>\n </form>\n" : ""} <div class="tabs"${magicLinkMode ? " hidden" : ""}>
2361
+ : `${magicLinkMode ? '\n <form id="magic-link-form" class="form">\n <label for="m-email"' + i18nAttr("email") + ">" + esc(t("email")) + '</label>\n <input id="m-email" type="email" autocomplete="email" autofocus placeholder="you@example.com" required />\n <button type="submit" id="magic-link-submit" class="magic-link-submit"' + i18nAttr("sendMagicLink") + ">" + esc(t("sendMagicLink")) + '</button>\n <p class="msg" id="m-msg"></p>\n' + signupLegalNoteHtml + '\n <p style="margin-top:0.75rem;font-size:0.75rem;text-align:center">\n <a href="#" id="use-password-link" class="link-button auth-mode-link"' + i18nAttr("usePasswordInstead") + ">" + esc(t("usePasswordInstead")) + "</a>\n </p>\n </form>\n" : ""} <div class="tabs" id="auth-tabs"${magicLinkMode ? " hidden" : ""}>
2358
2362
  <button class="tab" data-tab="signup"${i18nAttr("createAccount")}>${esc(t("createAccount"))}</button>
2359
2363
  <button class="tab" data-tab="login"${i18nAttr("signIn")}>${esc(t("signIn"))}</button>
2360
2364
  </div>
@@ -3147,14 +3151,27 @@ ${googleOnly
3147
3151
  if (!form) return;
3148
3152
  forms.forEach(function(x) { x.classList.remove('active'); });
3149
3153
  form.classList.add('active');
3154
+ var authTabs = document.getElementById('auth-tabs');
3155
+ if (authTabs) authTabs.hidden = true;
3156
+ updateMagicLinkSubmitState();
3150
3157
  __anSetAuthView('magicLink');
3151
3158
  }
3159
+ function updateMagicLinkSubmitState() {
3160
+ var emailInput = document.getElementById('m-email');
3161
+ var button = document.getElementById('magic-link-submit');
3162
+ if (!emailInput || !button) return;
3163
+ var isValid = __anIsValidAuthEmail(emailInput.value);
3164
+ button.classList.toggle('is-visible', isValid);
3165
+ button.setAttribute('aria-hidden', isValid ? 'false' : 'true');
3166
+ }
3152
3167
  function setActiveTab(name, opts) {
3153
3168
  if (name !== 'signup' && name !== 'login') return;
3154
3169
  var form = document.getElementById(name + '-form');
3155
3170
  if (!form) return;
3156
3171
  var card = document.querySelector('.card');
3157
3172
  if (card) card.classList.remove('verifying');
3173
+ var authTabs = document.getElementById('auth-tabs');
3174
+ if (authTabs) authTabs.hidden = false;
3158
3175
  tabs.forEach(function(x) { x.classList.remove('active'); });
3159
3176
  forms.forEach(function(x) { x.classList.remove('active'); });
3160
3177
  var btn = document.querySelector('.tab[data-tab="' + name + '"]');
@@ -3457,6 +3474,12 @@ ${googleOnly
3457
3474
  });
3458
3475
 
3459
3476
  var magicLinkForm = document.getElementById('magic-link-form');
3477
+ var magicLinkEmail = document.getElementById('m-email');
3478
+ if (magicLinkEmail) {
3479
+ magicLinkEmail.addEventListener('input', updateMagicLinkSubmitState);
3480
+ magicLinkEmail.addEventListener('change', updateMagicLinkSubmitState);
3481
+ updateMagicLinkSubmitState();
3482
+ }
3460
3483
  if (magicLinkForm) magicLinkForm.addEventListener('submit', async function(e) {
3461
3484
  e.preventDefault();
3462
3485
  var btn = magicLinkForm.querySelector('button[type="submit"]');
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
- error?: undefined;
30
29
  token: string;
31
30
  expiresAt: string;
32
31
  ttlSeconds: number;
32
+ error?: undefined;
33
33
  }>>;
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- error?: undefined;
24
23
  text: string;
24
+ error?: undefined;
25
25
  }>>;
@@ -249,7 +249,7 @@ export async function handleWorkspaceProviderOAuthCallback(event, providerId) {
249
249
  });
250
250
  }
251
251
  const returnPath = state.returnUrl ??
252
- `/settings?connected=${encodeURIComponent(providerId)}#integrations`;
252
+ `/settings/integrations?connected=${encodeURIComponent(providerId)}`;
253
253
  return Response.redirect(getAppUrl(event, returnPath), 302);
254
254
  });
255
255
  }
@@ -1,5 +1,5 @@
1
1
  import { registerOnboardingStep } from "../onboarding/registry.js";
2
- export function registerWorkspaceConnectionOnboardingStep({ id, providerId, providerLabel, title, description, order = 50, required = false, settingsUrl = "/settings#integrations", isComplete, }) {
2
+ export function registerWorkspaceConnectionOnboardingStep({ id, providerId, providerLabel, title, description, order = 50, required = false, settingsUrl = "/settings/integrations", isComplete, }) {
3
3
  const label = providerLabel ?? providerId;
4
4
  registerOnboardingStep({
5
5
  id: id ?? `${providerId}-connection`,
@@ -1,7 +1,7 @@
1
1
  export { agentChat, type AgentChatMessage, type AgentChatCallOptions, type AgentChatResponse, } from "./agent-chat.js";
2
2
  export { agentEnv, type EnvVar } from "./agent-env.js";
3
3
  export { extractOAuthStateAppId } from "./oauth-state.js";
4
- export { SIGN_IN_CONTINUATION_MAX_LENGTH, SIGN_IN_CONTINUATION_PARAM, SIGN_IN_ENTRY_PATH, SIGN_IN_LEGACY_RETURN_PARAM, decodeContinuation, encodeContinuation, normalizeAppPath, signInJourney, signInJourneyInlineScript, type SignInJourney, type SignInJourneyInput, } from "./sign-in-journey.js";
4
+ export { SIGN_IN_CONTINUATION_MAX_LENGTH, SIGN_IN_CONTINUATION_PARAM, SIGN_IN_ENTRY_PATH, SIGN_IN_LEGACY_ENTRY_PATH, SIGN_IN_LEGACY_RETURN_PARAM, decodeContinuation, encodeContinuation, normalizeAppPath, signInJourney, signInJourneyInlineScript, type SignInJourney, type SignInJourneyInput, } from "./sign-in-journey.js";
5
5
  export { truncate } from "./truncate.js";
6
6
  export { injectDocumentMarkup } from "./html-document.js";
7
7
  export { withBuilderUtmTrackingParams } from "./builder-link-tracking.js";
@@ -1,7 +1,7 @@
1
1
  export { agentChat, } from "./agent-chat.js";
2
2
  export { agentEnv } from "./agent-env.js";
3
3
  export { extractOAuthStateAppId } from "./oauth-state.js";
4
- export { SIGN_IN_CONTINUATION_MAX_LENGTH, SIGN_IN_CONTINUATION_PARAM, SIGN_IN_ENTRY_PATH, SIGN_IN_LEGACY_RETURN_PARAM, decodeContinuation, encodeContinuation, normalizeAppPath, signInJourney, signInJourneyInlineScript, } from "./sign-in-journey.js";
4
+ export { SIGN_IN_CONTINUATION_MAX_LENGTH, SIGN_IN_CONTINUATION_PARAM, SIGN_IN_ENTRY_PATH, SIGN_IN_LEGACY_ENTRY_PATH, SIGN_IN_LEGACY_RETURN_PARAM, decodeContinuation, encodeContinuation, normalizeAppPath, signInJourney, signInJourneyInlineScript, } from "./sign-in-journey.js";
5
5
  export { truncate } from "./truncate.js";
6
6
  export { injectDocumentMarkup } from "./html-document.js";
7
7
  export { withBuilderUtmTrackingParams } from "./builder-link-tracking.js";
@@ -18,7 +18,7 @@
18
18
  * - `signInJourney` returns `signInHref: null` — no token at all — when the
19
19
  * browser is already at an auth entry path, so the one function permitted
20
20
  * to mint continuations refuses to mint the dangerous value;
21
- * - the sign-in URL is `<base>/_agent-native/sign-in?c=<opaque>`, so
21
+ * - the sign-in URL is `<base>/sign-in?c=<opaque>`, so
22
22
  * "capture the current location as the return" has no URL-shaped input to
23
23
  * re-encode;
24
24
  * - `c` does not look like a URL, so Better Auth's `callbackURL`, a proxy, or
@@ -42,7 +42,10 @@ export declare const SIGN_IN_CONTINUATION_PARAM = "c";
42
42
  * therefore will not be caught.
43
43
  */
44
44
  export declare const SIGN_IN_LEGACY_RETURN_PARAM = "return";
45
- export declare const SIGN_IN_ENTRY_PATH = "/_agent-native/sign-in";
45
+ /** The clean, user-facing sign-in entry point emitted by current clients. */
46
+ export declare const SIGN_IN_ENTRY_PATH = "/sign-in";
47
+ /** The old framework entry point, retained for generated apps and bookmarks. */
48
+ export declare const SIGN_IN_LEGACY_ENTRY_PATH = "/_agent-native/sign-in";
46
49
  /** Max length of an encoded continuation token, in characters. */
47
50
  export declare const SIGN_IN_CONTINUATION_MAX_LENGTH = 512;
48
51
  export interface SignInJourney {
@@ -18,7 +18,7 @@
18
18
  * - `signInJourney` returns `signInHref: null` — no token at all — when the
19
19
  * browser is already at an auth entry path, so the one function permitted
20
20
  * to mint continuations refuses to mint the dangerous value;
21
- * - the sign-in URL is `<base>/_agent-native/sign-in?c=<opaque>`, so
21
+ * - the sign-in URL is `<base>/sign-in?c=<opaque>`, so
22
22
  * "capture the current location as the return" has no URL-shaped input to
23
23
  * re-encode;
24
24
  * - `c` does not look like a URL, so Better Auth's `callbackURL`, a proxy, or
@@ -42,7 +42,10 @@ export const SIGN_IN_CONTINUATION_PARAM = "c";
42
42
  * therefore will not be caught.
43
43
  */
44
44
  export const SIGN_IN_LEGACY_RETURN_PARAM = "return";
45
- export const SIGN_IN_ENTRY_PATH = "/_agent-native/sign-in";
45
+ /** The clean, user-facing sign-in entry point emitted by current clients. */
46
+ export const SIGN_IN_ENTRY_PATH = "/sign-in";
47
+ /** The old framework entry point, retained for generated apps and bookmarks. */
48
+ export const SIGN_IN_LEGACY_ENTRY_PATH = "/_agent-native/sign-in";
46
49
  /** Max length of an encoded continuation token, in characters. */
47
50
  export const SIGN_IN_CONTINUATION_MAX_LENGTH = 512;
48
51
  /**
@@ -56,7 +59,8 @@ export const SIGN_IN_CONTINUATION_MAX_LENGTH = 512;
56
59
  function createSignInJourneyRuntime(basePath) {
57
60
  var PARAM = "c";
58
61
  var LEGACY_PARAM = "return";
59
- var ENTRY_PATH = "/_agent-native/sign-in";
62
+ var ENTRY_PATH = "/sign-in";
63
+ var LEGACY_ENTRY_PATH = "/_agent-native/sign-in";
60
64
  var MAX_TOKEN = 512;
61
65
  var SENTINEL = "http://an.invalid";
62
66
  function normalizeBasePath(raw) {
@@ -79,7 +83,9 @@ function createSignInJourneyRuntime(basePath) {
79
83
  // including one this process was not configured with (a workspace host
80
84
  // serving a sibling app's URL).
81
85
  if (pathname === ENTRY_PATH ||
82
- pathname.slice(-ENTRY_PATH.length) === ENTRY_PATH) {
86
+ pathname.slice(-ENTRY_PATH.length) === ENTRY_PATH ||
87
+ pathname === LEGACY_ENTRY_PATH ||
88
+ pathname.slice(-LEGACY_ENTRY_PATH.length) === LEGACY_ENTRY_PATH) {
83
89
  return true;
84
90
  }
85
91
  var rest = pathname;
@@ -172,7 +172,7 @@ export function Layout({ children }: LayoutProps) {
172
172
  openOnChatRunning={chatHomeHandoffActive}
173
173
  onFullscreenRequest={openAskAgentFullscreen}
174
174
  emptyStateText={t("chat.inspectEmptyState")}
175
- agentPageHref="/settings#agent"
175
+ agentPageHref="/settings/agent"
176
176
  suggestions={[
177
177
  t("chat.inspectSuggestionCapabilities"),
178
178
  t("chat.inspectSuggestionHello"),
@@ -64,7 +64,7 @@ function pathForView(view?: string): string {
64
64
  case "settings":
65
65
  return "/settings";
66
66
  case "team":
67
- return "/settings#organization";
67
+ return "/settings/organization";
68
68
  default:
69
69
  return "/";
70
70
  }
@@ -133,7 +133,7 @@ function AppContent() {
133
133
  {t("root.commandSearch")}
134
134
  </CommandMenu.Item>
135
135
  <CommandMenu.Item
136
- onSelect={() => navigate("/settings#agent")}
136
+ onSelect={() => navigate("/settings/agent")}
137
137
  keywords={[
138
138
  "agent",
139
139
  "context",