@agent-native/core 0.161.2 → 0.161.6

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 (42) hide show
  1. package/corpus/templates/analytics/actions/update-dashboard.ts +8 -0
  2. package/corpus/templates/clips/actions/save-browser-transcript.ts +20 -4
  3. package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +167 -35
  4. package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +8 -1
  5. package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +39 -2
  6. package/corpus/templates/forms/server/lib/public-form-ssr.ts +3 -0
  7. package/corpus/templates/slides/actions/list-decks.ts +36 -1
  8. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +29 -17
  9. package/corpus/templates/slides/app/context/DeckContext.tsx +17 -6
  10. package/dist/agent/engine/builder-engine.js +30 -15
  11. package/dist/agent/engine/types.d.ts +19 -0
  12. package/dist/agent/engine/types.js +3 -0
  13. package/dist/agent/production-agent.d.ts +56 -1
  14. package/dist/agent/production-agent.js +130 -3
  15. package/dist/agent/run-manager.d.ts +15 -4
  16. package/dist/agent/run-manager.js +26 -0
  17. package/dist/agent/run-store.d.ts +5 -5
  18. package/dist/agent/run-store.js +52 -15
  19. package/dist/agent/thread-data-builder.js +7 -0
  20. package/dist/agent/types.d.ts +10 -0
  21. package/dist/cli/code-agent-connector.js +6 -1
  22. package/dist/client/AssistantChat.d.ts +1 -0
  23. package/dist/client/AssistantChat.js +10 -1
  24. package/dist/client/MultiTabAssistantChat.js +33 -1
  25. package/dist/client/sse-event-processor.js +11 -7
  26. package/dist/client/use-chat-threads.js +9 -9
  27. package/dist/db/client.js +10 -2
  28. package/dist/db/create-get-db.js +42 -0
  29. package/dist/observability/routes.d.ts +3 -3
  30. package/dist/progress/routes.d.ts +1 -1
  31. package/dist/resources/handlers.d.ts +1 -1
  32. package/dist/secrets/routes.d.ts +9 -9
  33. package/dist/server/onboarding-html.js +22 -77
  34. package/dist/server/poll.d.ts +5 -5
  35. package/dist/server/poll.js +19 -26
  36. package/dist/server/realtime-token.d.ts +1 -1
  37. package/dist/server/transcribe-voice.d.ts +1 -1
  38. package/dist/shared/auth-copy.d.ts +7 -0
  39. package/dist/shared/auth-copy.js +77 -0
  40. package/dist/shared/mcp-embed-headers.js +8 -4
  41. package/dist/vite/client.js +94 -3
  42. package/package.json +1 -1
@@ -80,8 +80,8 @@ const EN_AUTH_COPY = {
80
80
  createAccount: "Create account",
81
81
  passwordMinPlaceholder: `At least ${PASSWORD_MIN_LENGTH} characters`,
82
82
  confirmPasswordPlaceholder: "Confirm password",
83
- magicLinkTitle: "Welcome",
84
- magicLinkSubtitle: "Create an account or sign in",
83
+ magicLinkTitle: NATIVE_AUTH_COPY["en-US"].welcomeTitle,
84
+ magicLinkSubtitle: NATIVE_AUTH_COPY["en-US"].welcomeSubtitle,
85
85
  signupProgress: "Signup progress",
86
86
  progressAccount: "Account",
87
87
  progressVerify: "Verify",
@@ -107,11 +107,6 @@ const EN_AUTH_COPY = {
107
107
  copyCommand: "Copy command",
108
108
  copied: "Copied",
109
109
  closeGoogleChoices: "Close Google sign-in choices",
110
- legalPrefix: "By signing up, you accept our",
111
- legalTerms: "Terms",
112
- legalConnector: "and",
113
- legalPrivacy: "Privacy Policy",
114
- legalSuffix: ".",
115
110
  signInToContinue: "Sign in to continue.",
116
111
  finishSignInFailed: "We couldn't finish signing you in. Please sign in manually.",
117
112
  enterPasswordAfterVerification: "Enter your password after verifying your email.",
@@ -159,8 +154,8 @@ const AUTH_LOCALE_COPY = {
159
154
  createAccount: "创建账户",
160
155
  passwordMinPlaceholder: `至少 ${PASSWORD_MIN_LENGTH} 个字符`,
161
156
  confirmPasswordPlaceholder: "确认密码",
162
- magicLinkTitle: "欢迎",
163
- magicLinkSubtitle: "创建账户或登录",
157
+ magicLinkTitle: NATIVE_AUTH_COPY["zh-CN"].welcomeTitle,
158
+ magicLinkSubtitle: NATIVE_AUTH_COPY["zh-CN"].welcomeSubtitle,
164
159
  signupProgress: "注册进度",
165
160
  progressAccount: "账户",
166
161
  progressVerify: "验证",
@@ -186,11 +181,6 @@ const AUTH_LOCALE_COPY = {
186
181
  copyCommand: "复制命令",
187
182
  copied: "已复制",
188
183
  closeGoogleChoices: "关闭 Google 登录选项",
189
- legalPrefix: "注册即表示你接受我们的",
190
- legalTerms: "条款",
191
- legalConnector: "和",
192
- legalPrivacy: "隐私政策",
193
- legalSuffix: "。",
194
184
  signInToContinue: "登录以继续。",
195
185
  finishSignInFailed: "无法自动完成登录。",
196
186
  enterPasswordAfterVerification: "验证邮箱后请输入密码。",
@@ -236,8 +226,8 @@ const AUTH_LOCALE_COPY = {
236
226
  createAccount: "建立帳號",
237
227
  passwordMinPlaceholder: `至少 ${PASSWORD_MIN_LENGTH} 個字元`,
238
228
  confirmPasswordPlaceholder: "確認密碼",
239
- magicLinkTitle: "歡迎",
240
- magicLinkSubtitle: "建立帳戶或登入",
229
+ magicLinkTitle: NATIVE_AUTH_COPY["zh-TW"].welcomeTitle,
230
+ magicLinkSubtitle: NATIVE_AUTH_COPY["zh-TW"].welcomeSubtitle,
241
231
  signupProgress: "註冊進度",
242
232
  progressAccount: "帳號",
243
233
  progressVerify: "驗證",
@@ -263,11 +253,6 @@ const AUTH_LOCALE_COPY = {
263
253
  copyCommand: "複製指令",
264
254
  copied: "已複製",
265
255
  closeGoogleChoices: "關閉 Google 登入選項",
266
- legalPrefix: "註冊即表示你接受我們的",
267
- legalTerms: "條款",
268
- legalConnector: "和",
269
- legalPrivacy: "隱私權政策",
270
- legalSuffix: "。",
271
256
  signInToContinue: "登入以繼續。",
272
257
  finishSignInFailed: "無法自動完成登入。",
273
258
  enterPasswordAfterVerification: "驗證電子郵件後請輸入密碼。",
@@ -313,8 +298,8 @@ const AUTH_LOCALE_COPY = {
313
298
  createAccount: "Crear cuenta",
314
299
  passwordMinPlaceholder: `Al menos ${PASSWORD_MIN_LENGTH} caracteres`,
315
300
  confirmPasswordPlaceholder: "Confirmar contraseña",
316
- magicLinkTitle: "Bienvenido",
317
- magicLinkSubtitle: "Crea una cuenta o inicia sesión",
301
+ magicLinkTitle: NATIVE_AUTH_COPY["es-ES"].welcomeTitle,
302
+ magicLinkSubtitle: NATIVE_AUTH_COPY["es-ES"].welcomeSubtitle,
318
303
  signupProgress: "Progreso de registro",
319
304
  progressAccount: "Cuenta",
320
305
  progressVerify: "Verificar",
@@ -340,11 +325,6 @@ const AUTH_LOCALE_COPY = {
340
325
  copyCommand: "Copiar comando",
341
326
  copied: "Copiado",
342
327
  closeGoogleChoices: "Cerrar opciones de inicio con Google",
343
- legalPrefix: "Al registrarte, aceptas nuestros",
344
- legalTerms: "Términos",
345
- legalConnector: "y",
346
- legalPrivacy: "Política de privacidad",
347
- legalSuffix: ".",
348
328
  signInToContinue: "Inicia sesión para continuar.",
349
329
  finishSignInFailed: "No se pudo completar el inicio automáticamente.",
350
330
  enterPasswordAfterVerification: "Introduce tu contraseña después de verificar tu email.",
@@ -390,8 +370,8 @@ const AUTH_LOCALE_COPY = {
390
370
  createAccount: "Créer un compte",
391
371
  passwordMinPlaceholder: `Au moins ${PASSWORD_MIN_LENGTH} caractères`,
392
372
  confirmPasswordPlaceholder: "Confirmer le mot de passe",
393
- magicLinkTitle: "Bienvenue",
394
- magicLinkSubtitle: "Créez un compte ou connectez-vous",
373
+ magicLinkTitle: NATIVE_AUTH_COPY["fr-FR"].welcomeTitle,
374
+ magicLinkSubtitle: NATIVE_AUTH_COPY["fr-FR"].welcomeSubtitle,
395
375
  signupProgress: "Progression de l'inscription",
396
376
  progressAccount: "Compte",
397
377
  progressVerify: "Vérifier",
@@ -417,11 +397,6 @@ const AUTH_LOCALE_COPY = {
417
397
  copyCommand: "Copier la commande",
418
398
  copied: "Copié",
419
399
  closeGoogleChoices: "Fermer les choix de connexion Google",
420
- legalPrefix: "En vous inscrivant, vous acceptez nos",
421
- legalTerms: "Conditions",
422
- legalConnector: "et",
423
- legalPrivacy: "Politique de confidentialité",
424
- legalSuffix: ".",
425
400
  signInToContinue: "Connectez-vous pour continuer.",
426
401
  finishSignInFailed: "Impossible de terminer la connexion automatiquement.",
427
402
  enterPasswordAfterVerification: "Saisissez votre mot de passe après avoir vérifié votre e-mail.",
@@ -467,8 +442,8 @@ const AUTH_LOCALE_COPY = {
467
442
  createAccount: "Konto erstellen",
468
443
  passwordMinPlaceholder: `Mindestens ${PASSWORD_MIN_LENGTH} Zeichen`,
469
444
  confirmPasswordPlaceholder: "Passwort bestätigen",
470
- magicLinkTitle: "Willkommen",
471
- magicLinkSubtitle: "Konto erstellen oder anmelden",
445
+ magicLinkTitle: NATIVE_AUTH_COPY["de-DE"].welcomeTitle,
446
+ magicLinkSubtitle: NATIVE_AUTH_COPY["de-DE"].welcomeSubtitle,
472
447
  signupProgress: "Registrierungsfortschritt",
473
448
  progressAccount: "Konto",
474
449
  progressVerify: "Prüfen",
@@ -494,11 +469,6 @@ const AUTH_LOCALE_COPY = {
494
469
  copyCommand: "Befehl kopieren",
495
470
  copied: "Kopiert",
496
471
  closeGoogleChoices: "Google-Anmeldeoptionen schließen",
497
- legalPrefix: "Mit der Registrierung akzeptierst du unsere",
498
- legalTerms: "Bedingungen",
499
- legalConnector: "und",
500
- legalPrivacy: "Datenschutzrichtlinie",
501
- legalSuffix: ".",
502
472
  signInToContinue: "Melde dich an, um fortzufahren.",
503
473
  finishSignInFailed: "Die Anmeldung konnte nicht automatisch abgeschlossen werden.",
504
474
  enterPasswordAfterVerification: "Gib dein Passwort ein, nachdem du deine E-Mail bestätigt hast.",
@@ -544,8 +514,8 @@ const AUTH_LOCALE_COPY = {
544
514
  createAccount: "アカウントを作成",
545
515
  passwordMinPlaceholder: `${PASSWORD_MIN_LENGTH} 文字以上`,
546
516
  confirmPasswordPlaceholder: "パスワードを確認",
547
- magicLinkTitle: "ようこそ",
548
- magicLinkSubtitle: "アカウントを作成するかサインインしてください",
517
+ magicLinkTitle: NATIVE_AUTH_COPY["ja-JP"].welcomeTitle,
518
+ magicLinkSubtitle: NATIVE_AUTH_COPY["ja-JP"].welcomeSubtitle,
549
519
  signupProgress: "登録の進行状況",
550
520
  progressAccount: "アカウント",
551
521
  progressVerify: "確認",
@@ -571,11 +541,6 @@ const AUTH_LOCALE_COPY = {
571
541
  copyCommand: "コマンドをコピー",
572
542
  copied: "コピーしました",
573
543
  closeGoogleChoices: "Google サインインの選択肢を閉じる",
574
- legalPrefix: "登録すると、以下に同意したものとみなされます:",
575
- legalTerms: "利用規約",
576
- legalConnector: "および",
577
- legalPrivacy: "プライバシーポリシー",
578
- legalSuffix: "。",
579
544
  signInToContinue: "続行するにはサインインしてください。",
580
545
  finishSignInFailed: "サインインを自動で完了できませんでした。",
581
546
  enterPasswordAfterVerification: "メールを確認した後、パスワードを入力してください。",
@@ -621,8 +586,8 @@ const AUTH_LOCALE_COPY = {
621
586
  createAccount: "계정 만들기",
622
587
  passwordMinPlaceholder: `${PASSWORD_MIN_LENGTH}자 이상`,
623
588
  confirmPasswordPlaceholder: "비밀번호 확인",
624
- magicLinkTitle: "환영합니다",
625
- magicLinkSubtitle: "계정을 만들거나 로그인하세요",
589
+ magicLinkTitle: NATIVE_AUTH_COPY["ko-KR"].welcomeTitle,
590
+ magicLinkSubtitle: NATIVE_AUTH_COPY["ko-KR"].welcomeSubtitle,
626
591
  signupProgress: "가입 진행 상황",
627
592
  progressAccount: "계정",
628
593
  progressVerify: "확인",
@@ -648,11 +613,6 @@ const AUTH_LOCALE_COPY = {
648
613
  copyCommand: "명령 복사",
649
614
  copied: "복사됨",
650
615
  closeGoogleChoices: "Google 로그인 선택 닫기",
651
- legalPrefix: "가입하면 다음에 동의하게 됩니다:",
652
- legalTerms: "약관",
653
- legalConnector: "및",
654
- legalPrivacy: "개인정보 처리방침",
655
- legalSuffix: ".",
656
616
  signInToContinue: "계속하려면 로그인하세요.",
657
617
  finishSignInFailed: "자동으로 로그인을 완료할 수 없습니다.",
658
618
  enterPasswordAfterVerification: "이메일을 확인한 후 비밀번호를 입력하세요.",
@@ -698,8 +658,8 @@ const AUTH_LOCALE_COPY = {
698
658
  createAccount: "Criar conta",
699
659
  passwordMinPlaceholder: `Pelo menos ${PASSWORD_MIN_LENGTH} caracteres`,
700
660
  confirmPasswordPlaceholder: "Confirmar senha",
701
- magicLinkTitle: "Bem-vindo",
702
- magicLinkSubtitle: "Crie uma conta ou entre",
661
+ magicLinkTitle: NATIVE_AUTH_COPY["pt-BR"].welcomeTitle,
662
+ magicLinkSubtitle: NATIVE_AUTH_COPY["pt-BR"].welcomeSubtitle,
703
663
  signupProgress: "Progresso do cadastro",
704
664
  progressAccount: "Conta",
705
665
  progressVerify: "Verificar",
@@ -725,11 +685,6 @@ const AUTH_LOCALE_COPY = {
725
685
  copyCommand: "Copiar comando",
726
686
  copied: "Copiado",
727
687
  closeGoogleChoices: "Fechar opções de login com Google",
728
- legalPrefix: "Ao se cadastrar, você aceita nossos",
729
- legalTerms: "Termos",
730
- legalConnector: "e",
731
- legalPrivacy: "Política de Privacidade",
732
- legalSuffix: ".",
733
688
  signInToContinue: "Entre para continuar.",
734
689
  finishSignInFailed: "Não foi possível concluir o login automaticamente.",
735
690
  enterPasswordAfterVerification: "Digite sua senha depois de verificar seu email.",
@@ -775,8 +730,8 @@ const AUTH_LOCALE_COPY = {
775
730
  createAccount: "खाता बनाएं",
776
731
  passwordMinPlaceholder: `कम से कम ${PASSWORD_MIN_LENGTH} अक्षर`,
777
732
  confirmPasswordPlaceholder: "पासवर्ड की पुष्टि करें",
778
- magicLinkTitle: "स्वागत है",
779
- magicLinkSubtitle: "खाता बनाएं या साइन इन करें",
733
+ magicLinkTitle: NATIVE_AUTH_COPY["hi-IN"].welcomeTitle,
734
+ magicLinkSubtitle: NATIVE_AUTH_COPY["hi-IN"].welcomeSubtitle,
780
735
  signupProgress: "साइनअप प्रगति",
781
736
  progressAccount: "खाता",
782
737
  progressVerify: "सत्यापित करें",
@@ -802,11 +757,6 @@ const AUTH_LOCALE_COPY = {
802
757
  copyCommand: "कमांड कॉपी करें",
803
758
  copied: "कॉपी हो गया",
804
759
  closeGoogleChoices: "Google साइन-इन विकल्प बंद करें",
805
- legalPrefix: "साइन अप करके, आप हमारी",
806
- legalTerms: "शर्तें",
807
- legalConnector: "और",
808
- legalPrivacy: "गोपनीयता नीति",
809
- legalSuffix: "स्वीकार करते हैं।",
810
760
  signInToContinue: "जारी रखने के लिए साइन इन करें।",
811
761
  finishSignInFailed: "साइन इन अपने आप पूरा नहीं हो सका।",
812
762
  enterPasswordAfterVerification: "ईमेल सत्यापित करने के बाद अपना पासवर्ड दर्ज करें।",
@@ -852,8 +802,8 @@ const AUTH_LOCALE_COPY = {
852
802
  createAccount: "إنشاء حساب",
853
803
  passwordMinPlaceholder: `${PASSWORD_MIN_LENGTH} أحرف على الأقل`,
854
804
  confirmPasswordPlaceholder: "تأكيد كلمة المرور",
855
- magicLinkTitle: "مرحبًا",
856
- magicLinkSubtitle: "أنشئ حسابًا أو سجّل الدخول",
805
+ magicLinkTitle: NATIVE_AUTH_COPY["ar-SA"].welcomeTitle,
806
+ magicLinkSubtitle: NATIVE_AUTH_COPY["ar-SA"].welcomeSubtitle,
857
807
  signupProgress: "تقدم التسجيل",
858
808
  progressAccount: "الحساب",
859
809
  progressVerify: "التحقق",
@@ -879,11 +829,6 @@ const AUTH_LOCALE_COPY = {
879
829
  copyCommand: "نسخ الأمر",
880
830
  copied: "تم النسخ",
881
831
  closeGoogleChoices: "إغلاق خيارات تسجيل الدخول عبر Google",
882
- legalPrefix: "بالتسجيل، فإنك توافق على",
883
- legalTerms: "الشروط",
884
- legalConnector: "و",
885
- legalPrivacy: "سياسة الخصوصية",
886
- legalSuffix: ".",
887
832
  signInToContinue: "سجّل الدخول للمتابعة.",
888
833
  finishSignInFailed: "تعذر إكمال تسجيل الدخول تلقائيًا.",
889
834
  enterPasswordAfterVerification: "أدخل كلمة المرور بعد التحقق من بريدك الإلكتروني.",
@@ -227,16 +227,16 @@ export declare class AppSyncState {
227
227
  * transaction, and a long transaction killed mid-flight by a serverless
228
228
  * worker shutdown is what leaves connections `idle in transaction`
229
229
  * holding locks — the shape of the 2026-08-06 outage.
230
- * - `ORDER BY version` inside the subquery. Without it the planner
230
+ * - `ORDER BY created_at, id` inside the subquery. Without it the planner
231
231
  * prefers a sequential scan even with a LIMIT; with it, the existing
232
- * `sync_events_version_idx` drives the batch and the delete is a
232
+ * `sync_events_created_at_id_idx` drives the batch and the delete is a
233
233
  * bounded index range scan.
234
234
  *
235
235
  * The `lastDurablePrune` throttle below is per-process, so every serverless
236
236
  * worker prunes on its first poll. Postgres workers also take a
237
- * transaction-scoped advisory lease for each batch: only one worker deletes
238
- * at a time, but each batch still commits independently so a killed worker
239
- * cannot hold a long transaction open.
237
+ * transaction-scoped advisory lease for each batch. The lease and delete
238
+ * are one bounded statement, so a serverless worker killed after the
239
+ * statement starts cannot leave an open transaction.
240
240
  */
241
241
  private pruneDurableEvents;
242
242
  persistSyncEvent(event: ChangeEvent, dedupeKey?: string, presetId?: string): Promise<void>;
@@ -455,16 +455,16 @@ export class AppSyncState {
455
455
  * transaction, and a long transaction killed mid-flight by a serverless
456
456
  * worker shutdown is what leaves connections `idle in transaction`
457
457
  * holding locks — the shape of the 2026-08-06 outage.
458
- * - `ORDER BY version` inside the subquery. Without it the planner
458
+ * - `ORDER BY created_at, id` inside the subquery. Without it the planner
459
459
  * prefers a sequential scan even with a LIMIT; with it, the existing
460
- * `sync_events_version_idx` drives the batch and the delete is a
460
+ * `sync_events_created_at_id_idx` drives the batch and the delete is a
461
461
  * bounded index range scan.
462
462
  *
463
463
  * The `lastDurablePrune` throttle below is per-process, so every serverless
464
464
  * worker prunes on its first poll. Postgres workers also take a
465
- * transaction-scoped advisory lease for each batch: only one worker deletes
466
- * at a time, but each batch still commits independently so a killed worker
467
- * cannot hold a long transaction open.
465
+ * transaction-scoped advisory lease for each batch. The lease and delete
466
+ * are one bounded statement, so a serverless worker killed after the
467
+ * statement starts cannot leave an open transaction.
468
468
  */
469
469
  async pruneDurableEvents(client) {
470
470
  const now = Date.now();
@@ -476,15 +476,6 @@ export class AppSyncState {
476
476
  try {
477
477
  for (let batch = 0; batch < DURABLE_PRUNE_MAX_BATCHES; batch++) {
478
478
  const runBatch = async (tx) => {
479
- if (this.isPg()) {
480
- const lockResult = await tx.execute({
481
- sql: "SELECT pg_try_advisory_xact_lock(hashtextextended(?, 0::bigint)) AS acquired",
482
- args: [DURABLE_PRUNE_LOCK_KEY],
483
- });
484
- const acquired = lockResult.rows[0]?.acquired;
485
- if (acquired !== true && acquired !== "t")
486
- return null;
487
- }
488
479
  // `id IN (...)` rather than ctid/rowid: both are dialect-specific,
489
480
  // and the primary key is indexed on every dialect we ship.
490
481
  const result = await tx.execute({
@@ -496,20 +487,22 @@ export class AppSyncState {
496
487
  });
497
488
  return result.rowsAffected;
498
489
  };
499
- // A Postgres advisory transaction lock is only useful when the lock
500
- // and delete share a connection and transaction. Never fall back to
501
- // an uncoordinated delete on a transactionless client.
502
490
  const rowsAffected = this.isPg()
503
- ? client.transaction
504
- ? await client.transaction(runBatch)
505
- : null
491
+ ? (await client.execute({
492
+ sql: `WITH prune_lease AS MATERIALIZED (
493
+ SELECT pg_try_advisory_xact_lock(hashtextextended(?, 0::bigint)) AS acquired
494
+ ), prune_batch AS MATERIALIZED (
495
+ SELECT sync_events.id
496
+ FROM sync_events CROSS JOIN prune_lease
497
+ WHERE prune_lease.acquired AND sync_events.created_at < ?
498
+ ORDER BY sync_events.created_at, sync_events.id LIMIT ?
499
+ )
500
+ DELETE FROM sync_events WHERE id IN (
501
+ SELECT id FROM prune_batch
502
+ )`,
503
+ args: [DURABLE_PRUNE_LOCK_KEY, cutoff, DURABLE_PRUNE_BATCH],
504
+ })).rowsAffected
506
505
  : await runBatch(client);
507
- if (rowsAffected == null) {
508
- if (this.isPg() && !client.transaction) {
509
- throw new Error("Postgres prune requires a database transaction");
510
- }
511
- break;
512
- }
513
506
  deleted += rowsAffected;
514
507
  if (rowsAffected < DURABLE_PRUNE_BATCH)
515
508
  break;
@@ -26,8 +26,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
26
26
  expiresAt?: undefined;
27
27
  ttlSeconds?: undefined;
28
28
  } | {
29
+ error?: undefined;
29
30
  token: string;
30
31
  expiresAt: string;
31
32
  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
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
@@ -7,8 +7,15 @@ import { type LocaleCode } from "../localization/shared.js";
7
7
  export interface NativeAuthCopy {
8
8
  googleButton: string;
9
9
  dividerOr: string;
10
+ welcomeTitle: string;
11
+ welcomeSubtitle: string;
10
12
  email: string;
11
13
  emailPlaceholder: string;
14
+ legalPrefix: string;
15
+ legalTerms: string;
16
+ legalConnector: string;
17
+ legalPrivacy: string;
18
+ legalSuffix: string;
12
19
  password: string;
13
20
  confirmPassword: string;
14
21
  enterPasswordPlaceholder: string;
@@ -3,8 +3,15 @@ export const NATIVE_AUTH_COPY = {
3
3
  "en-US": {
4
4
  googleButton: "Sign in with Google",
5
5
  dividerOr: "or",
6
+ welcomeTitle: "Welcome",
7
+ welcomeSubtitle: "Create an account or sign in",
6
8
  email: "Email",
7
9
  emailPlaceholder: "you@example.com",
10
+ legalPrefix: "By signing up, you accept our",
11
+ legalTerms: "Terms",
12
+ legalConnector: "and",
13
+ legalPrivacy: "Privacy Policy",
14
+ legalSuffix: ".",
8
15
  password: "Password",
9
16
  confirmPassword: "Confirm password",
10
17
  enterPasswordPlaceholder: "Enter password",
@@ -29,8 +36,15 @@ export const NATIVE_AUTH_COPY = {
29
36
  "zh-CN": {
30
37
  googleButton: "使用 Google 登录",
31
38
  dividerOr: "或",
39
+ welcomeTitle: "欢迎",
40
+ welcomeSubtitle: "创建账户或登录",
32
41
  email: "电子邮箱",
33
42
  emailPlaceholder: "you@example.com",
43
+ legalPrefix: "注册即表示你接受我们的",
44
+ legalTerms: "条款",
45
+ legalConnector: "和",
46
+ legalPrivacy: "隐私政策",
47
+ legalSuffix: "。",
34
48
  password: "密码",
35
49
  confirmPassword: "确认密码",
36
50
  enterPasswordPlaceholder: "输入密码",
@@ -55,8 +69,15 @@ export const NATIVE_AUTH_COPY = {
55
69
  "zh-TW": {
56
70
  googleButton: "使用 Google 登入",
57
71
  dividerOr: "或",
72
+ welcomeTitle: "歡迎",
73
+ welcomeSubtitle: "建立帳戶或登入",
58
74
  email: "電子郵件",
59
75
  emailPlaceholder: "you@example.com",
76
+ legalPrefix: "註冊即表示你接受我們的",
77
+ legalTerms: "條款",
78
+ legalConnector: "和",
79
+ legalPrivacy: "隱私權政策",
80
+ legalSuffix: "。",
60
81
  password: "密碼",
61
82
  confirmPassword: "確認密碼",
62
83
  enterPasswordPlaceholder: "輸入密碼",
@@ -81,8 +102,15 @@ export const NATIVE_AUTH_COPY = {
81
102
  "es-ES": {
82
103
  googleButton: "Iniciar sesión con Google",
83
104
  dividerOr: "o",
105
+ welcomeTitle: "Bienvenido",
106
+ welcomeSubtitle: "Crea una cuenta o inicia sesión",
84
107
  email: "Email",
85
108
  emailPlaceholder: "you@example.com",
109
+ legalPrefix: "Al registrarte, aceptas nuestros",
110
+ legalTerms: "Términos",
111
+ legalConnector: "y",
112
+ legalPrivacy: "Política de privacidad",
113
+ legalSuffix: ".",
86
114
  password: "Contraseña",
87
115
  confirmPassword: "Confirmar contraseña",
88
116
  enterPasswordPlaceholder: "Introduce la contraseña",
@@ -107,8 +135,15 @@ export const NATIVE_AUTH_COPY = {
107
135
  "fr-FR": {
108
136
  googleButton: "Se connecter avec Google",
109
137
  dividerOr: "ou",
138
+ welcomeTitle: "Bienvenue",
139
+ welcomeSubtitle: "Créez un compte ou connectez-vous",
110
140
  email: "E-mail",
111
141
  emailPlaceholder: "you@example.com",
142
+ legalPrefix: "En vous inscrivant, vous acceptez nos",
143
+ legalTerms: "Conditions",
144
+ legalConnector: "et",
145
+ legalPrivacy: "Politique de confidentialité",
146
+ legalSuffix: ".",
112
147
  password: "Mot de passe",
113
148
  confirmPassword: "Confirmer le mot de passe",
114
149
  enterPasswordPlaceholder: "Saisir le mot de passe",
@@ -133,8 +168,15 @@ export const NATIVE_AUTH_COPY = {
133
168
  "de-DE": {
134
169
  googleButton: "Mit Google anmelden",
135
170
  dividerOr: "oder",
171
+ welcomeTitle: "Willkommen",
172
+ welcomeSubtitle: "Konto erstellen oder anmelden",
136
173
  email: "E-Mail",
137
174
  emailPlaceholder: "you@example.com",
175
+ legalPrefix: "Mit der Registrierung akzeptierst du unsere",
176
+ legalTerms: "Bedingungen",
177
+ legalConnector: "und",
178
+ legalPrivacy: "Datenschutzrichtlinie",
179
+ legalSuffix: ".",
138
180
  password: "Passwort",
139
181
  confirmPassword: "Passwort bestätigen",
140
182
  enterPasswordPlaceholder: "Passwort eingeben",
@@ -159,8 +201,15 @@ export const NATIVE_AUTH_COPY = {
159
201
  "ja-JP": {
160
202
  googleButton: "Google でサインイン",
161
203
  dividerOr: "または",
204
+ welcomeTitle: "ようこそ",
205
+ welcomeSubtitle: "アカウントを作成するかサインインしてください",
162
206
  email: "メール",
163
207
  emailPlaceholder: "you@example.com",
208
+ legalPrefix: "登録すると、以下に同意したものとみなされます:",
209
+ legalTerms: "利用規約",
210
+ legalConnector: "および",
211
+ legalPrivacy: "プライバシーポリシー",
212
+ legalSuffix: "。",
164
213
  password: "パスワード",
165
214
  confirmPassword: "パスワードを確認",
166
215
  enterPasswordPlaceholder: "パスワードを入力",
@@ -185,8 +234,15 @@ export const NATIVE_AUTH_COPY = {
185
234
  "ko-KR": {
186
235
  googleButton: "Google로 로그인",
187
236
  dividerOr: "또는",
237
+ welcomeTitle: "환영합니다",
238
+ welcomeSubtitle: "계정을 만들거나 로그인하세요",
188
239
  email: "이메일",
189
240
  emailPlaceholder: "you@example.com",
241
+ legalPrefix: "가입하면 다음에 동의하게 됩니다:",
242
+ legalTerms: "약관",
243
+ legalConnector: "및",
244
+ legalPrivacy: "개인정보 처리방침",
245
+ legalSuffix: ".",
190
246
  password: "비밀번호",
191
247
  confirmPassword: "비밀번호 확인",
192
248
  enterPasswordPlaceholder: "비밀번호 입력",
@@ -211,8 +267,15 @@ export const NATIVE_AUTH_COPY = {
211
267
  "pt-BR": {
212
268
  googleButton: "Entrar com Google",
213
269
  dividerOr: "ou",
270
+ welcomeTitle: "Bem-vindo",
271
+ welcomeSubtitle: "Crie uma conta ou entre",
214
272
  email: "Email",
215
273
  emailPlaceholder: "you@example.com",
274
+ legalPrefix: "Ao se cadastrar, você aceita nossos",
275
+ legalTerms: "Termos",
276
+ legalConnector: "e",
277
+ legalPrivacy: "Política de Privacidade",
278
+ legalSuffix: ".",
216
279
  password: "Senha",
217
280
  confirmPassword: "Confirmar senha",
218
281
  enterPasswordPlaceholder: "Digite a senha",
@@ -237,8 +300,15 @@ export const NATIVE_AUTH_COPY = {
237
300
  "hi-IN": {
238
301
  googleButton: "Google से साइन इन करें",
239
302
  dividerOr: "या",
303
+ welcomeTitle: "स्वागत है",
304
+ welcomeSubtitle: "खाता बनाएं या साइन इन करें",
240
305
  email: "ईमेल",
241
306
  emailPlaceholder: "you@example.com",
307
+ legalPrefix: "साइन अप करके, आप हमारी",
308
+ legalTerms: "शर्तें",
309
+ legalConnector: "और",
310
+ legalPrivacy: "गोपनीयता नीति",
311
+ legalSuffix: "स्वीकार करते हैं।",
242
312
  password: "पासवर्ड",
243
313
  confirmPassword: "पासवर्ड की पुष्टि करें",
244
314
  enterPasswordPlaceholder: "पासवर्ड दर्ज करें",
@@ -263,8 +333,15 @@ export const NATIVE_AUTH_COPY = {
263
333
  "ar-SA": {
264
334
  googleButton: "تسجيل الدخول باستخدام Google",
265
335
  dividerOr: "أو",
336
+ welcomeTitle: "مرحبًا",
337
+ welcomeSubtitle: "أنشئ حسابًا أو سجّل الدخول",
266
338
  email: "البريد الإلكتروني",
267
339
  emailPlaceholder: "you@example.com",
340
+ legalPrefix: "بالتسجيل، فإنك توافق على",
341
+ legalTerms: "الشروط",
342
+ legalConnector: "و",
343
+ legalPrivacy: "سياسة الخصوصية",
344
+ legalSuffix: ".",
268
345
  password: "كلمة المرور",
269
346
  confirmPassword: "تأكيد كلمة المرور",
270
347
  enterPasswordPlaceholder: "أدخل كلمة المرور",
@@ -3,6 +3,13 @@ export const EMBED_TRANSPLANT_HEADER = "x-agent-native-embed-transplant";
3
3
  const CLAUDE_MCP_CONTENT_HOST_RE = /^[a-f0-9]{32}\.claudemcpcontent\.com$/i;
4
4
  const CHATGPT_MCP_SANDBOX_HOST_RE = /^(?:[^.]+\.)?web-sandbox\.oaiusercontent\.com$/i;
5
5
  const AGENT_NATIVE_FIRST_PARTY_APP_HOST_SUFFIX = ".agent-native.com";
6
+ const BUILDER_EMBED_HOST_SUFFIXES = [
7
+ ".builder.io",
8
+ ".builder.my",
9
+ ".builderio.xyz",
10
+ ".builderio.dev",
11
+ ".builder.codes",
12
+ ];
6
13
  const MCP_PRODUCT_HOST_ORIGINS = new Set([
7
14
  "https://chat.openai.com",
8
15
  "https://chatgpt.com",
@@ -87,10 +94,7 @@ export function isBuilderIoEmbedOrigin(origin) {
87
94
  return (url.protocol === "https:" &&
88
95
  !url.username &&
89
96
  !url.password &&
90
- (hostname === "builder.io" ||
91
- hostname.endsWith(".builder.io") ||
92
- hostname === "builder.my" ||
93
- hostname.endsWith(".builder.my")));
97
+ BUILDER_EMBED_HOST_SUFFIXES.some((suffix) => hostname === suffix.slice(1) || hostname.endsWith(suffix)));
94
98
  }
95
99
  catch {
96
100
  return false;