@agent-native/core 0.84.56 → 0.84.57

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 (95) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +6 -0
  3. package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +2 -0
  4. package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +2 -0
  5. package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +2 -0
  6. package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +2 -0
  7. package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +2 -0
  8. package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +2 -0
  9. package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +2 -0
  10. package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +2 -0
  11. package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +2 -0
  12. package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +2 -0
  13. package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +2 -0
  14. package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +2 -0
  15. package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +2 -0
  16. package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +2 -0
  17. package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +2 -0
  18. package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +2 -0
  19. package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +2 -0
  20. package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +2 -0
  21. package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +2 -0
  22. package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +2 -0
  23. package/corpus/core/docs/content/template-analytics.mdx +2 -0
  24. package/corpus/core/docs/content/template-clips.mdx +22 -10
  25. package/corpus/core/docs/content/tracking.mdx +2 -0
  26. package/corpus/core/package.json +1 -1
  27. package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +8 -0
  28. package/corpus/templates/analytics/AGENTS.md +5 -0
  29. package/corpus/templates/analytics/actions/create-session-replay-agent-link.ts +31 -0
  30. package/corpus/templates/analytics/app/i18n/zh-TW.ts +2 -0
  31. package/corpus/templates/analytics/app/i18n-data.ts +20 -0
  32. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +65 -3
  33. package/corpus/templates/analytics/changelog/2026-07-02-session-replays-can-be-copied-as-temporary-private-links-for-agents.md +6 -0
  34. package/corpus/templates/analytics/server/handlers/session-replay.ts +78 -0
  35. package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +313 -0
  36. package/corpus/templates/analytics/server/lib/session-replay.ts +198 -3
  37. package/corpus/templates/analytics/server/routes/[...page].get.ts +104 -1
  38. package/corpus/templates/analytics/server/routes/api/session-replay/agent-context.json.get.ts +48 -0
  39. package/corpus/templates/analytics/server/routes/api/session-replay/agent-events.json.get.ts +63 -0
  40. package/corpus/templates/analytics/shared/session-replay-agent-access.ts +10 -0
  41. package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +14 -8
  42. package/corpus/templates/clips/AGENTS.md +3 -2
  43. package/corpus/templates/clips/actions/create-recording-agent-link.ts +90 -0
  44. package/corpus/templates/clips/app/components/player/share-dialog.tsx +43 -46
  45. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +5 -3
  46. package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -1
  47. package/corpus/templates/clips/app/i18n/de-DE.ts +1 -1
  48. package/corpus/templates/clips/app/i18n/en-US.ts +1 -1
  49. package/corpus/templates/clips/app/i18n/es-ES.ts +1 -1
  50. package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -1
  51. package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -1
  52. package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -1
  53. package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -1
  54. package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -1
  55. package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -1
  56. package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -1
  57. package/corpus/templates/clips/app/routes/share.$shareId.tsx +100 -46
  58. package/corpus/templates/clips/changelog/2026-07-02-private-recordings-can-be-shared-with-agents-through-temporary-links-without-making-them-public.md +6 -0
  59. package/corpus/templates/clips/server/lib/public-agent-context.ts +26 -13
  60. package/corpus/templates/clips/server/routes/api/agent-context.json.get.ts +2 -1
  61. package/corpus/templates/clips/server/routes/api/agent-frame.jpg.get.ts +2 -1
  62. package/corpus/templates/clips/server/routes/api/agent-transcript.json.get.ts +2 -1
  63. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +7 -2
  64. package/corpus/templates/clips/shared/agent-context.ts +5 -0
  65. package/dist/collab/awareness.d.ts +2 -2
  66. package/dist/collab/awareness.d.ts.map +1 -1
  67. package/dist/collab/routes.d.ts +1 -1
  68. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  69. package/dist/notifications/routes.d.ts +3 -3
  70. package/dist/observability/routes.d.ts +2 -2
  71. package/dist/resources/handlers.d.ts +1 -1
  72. package/docs/content/locales/ar-SA/template-analytics.mdx +2 -0
  73. package/docs/content/locales/ar-SA/template-clips.mdx +2 -0
  74. package/docs/content/locales/de-DE/template-analytics.mdx +2 -0
  75. package/docs/content/locales/de-DE/template-clips.mdx +2 -0
  76. package/docs/content/locales/es-ES/template-analytics.mdx +2 -0
  77. package/docs/content/locales/es-ES/template-clips.mdx +2 -0
  78. package/docs/content/locales/fr-FR/template-analytics.mdx +2 -0
  79. package/docs/content/locales/fr-FR/template-clips.mdx +2 -0
  80. package/docs/content/locales/hi-IN/template-analytics.mdx +2 -0
  81. package/docs/content/locales/hi-IN/template-clips.mdx +2 -0
  82. package/docs/content/locales/ja-JP/template-analytics.mdx +2 -0
  83. package/docs/content/locales/ja-JP/template-clips.mdx +2 -0
  84. package/docs/content/locales/ko-KR/template-analytics.mdx +2 -0
  85. package/docs/content/locales/ko-KR/template-clips.mdx +2 -0
  86. package/docs/content/locales/pt-BR/template-analytics.mdx +2 -0
  87. package/docs/content/locales/pt-BR/template-clips.mdx +2 -0
  88. package/docs/content/locales/zh-CN/template-analytics.mdx +2 -0
  89. package/docs/content/locales/zh-CN/template-clips.mdx +2 -0
  90. package/docs/content/locales/zh-TW/template-analytics.mdx +2 -0
  91. package/docs/content/locales/zh-TW/template-clips.mdx +2 -0
  92. package/docs/content/template-analytics.mdx +2 -0
  93. package/docs/content/template-clips.mdx +22 -10
  94. package/docs/content/tracking.mdx +2 -0
  95. package/package.json +1 -1
package/corpus/README.md CHANGED
@@ -28,4 +28,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
28
28
  ## Generated Counts
29
29
 
30
30
  - core files: 2044
31
- - template files: 5004
31
+ - template files: 5012
@@ -1,5 +1,11 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.84.57
4
+
5
+ ### Patch Changes
6
+
7
+ - 5250e7f: Document temporary agent links for session replays and private clips.
8
+
3
9
  ## 0.84.56
4
10
 
5
11
  ### Patch Changes
@@ -147,6 +147,8 @@ pnpm dev
147
147
 
148
148
  **سطح موصل واسع.** تأتي أحداث BigQuery وGA4 وتحليلات المنتج وCRM والدعم والمجتمع وGitHub/Jira وSEO وأحداث `/track` للطرف الأول من خلال actions التي يمكن للوكيل الاتصال بها.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### العمل مع الوكيل
151
153
 
152
154
  يعرف الوكيل دائمًا ما تنظر إليه. يتم إدخال حالة الشاشة الحالية في كل رسالة ككتلة `<current-screen>` - فهي تحتوي على العرض النشط، ولوحة المعلومات المفتوحة أو التحليل، وأي عوامل تصفية محددة.
@@ -131,6 +131,8 @@ API، لذا فإن النماذج التي تقبل النص أو الصور ا
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | أجزاء النص ذات الطابع الزمني مع `startMs`، `endMs`، والطوابع الزمنية القابلة للقراءة، والنص، وتسميات المصدر الاختيارية |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | إطار JPEG مستخرج من الفيديو بطابع زمني للفيديو الأصلي |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  تتبع نقاط النهاية نفس القواعد العامة/كلمة المرور/انتهاء الصلاحية مثل صفحة المشاركة.
135
137
  تتطلب المقاطع المحمية بكلمة مرور كلمة المرور مرة واحدة؛ تعود الاستجابات الناجحة
136
138
  روابط رمزية قصيرة العمر بحيث لا يحتاج وكلاء المراحل النهائية إلى النص العادي
@@ -147,6 +147,8 @@ CLI gibt den lokalen Entwickler URL aus. Melden Sie sich bei Google an und öffn
147
147
 
148
148
  **Breite Konnektoroberfläche.** BigQuery, GA4, Produktanalyse, CRM, Support, Community, GitHub/Jira, SEO und Erstanbieter-`/track`-Ereignisse kommen alle über actions, das der Agent anrufen kann.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### Zusammenarbeit mit dem Agenten
151
153
 
152
154
  Der Agent weiß immer, was Sie sehen. Der aktuelle Bildschirmstatus wird als `<current-screen>`-Block in jede Nachricht eingefügt – er enthält die aktive Ansicht, das geöffnete Dashboard oder die geöffnete Analyse und alle ausgewählten Filter.
@@ -131,6 +131,8 @@ Agent.
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | Transkriptsegmente mit Zeitstempel mit `startMs`, `endMs`, lesbaren Zeitstempeln, Text und optionalen Quellenbezeichnungen |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | Ein JPEG-Frame, der mit einem Originalvideo-Zeitstempel aus dem Video extrahiert wurde |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  Die Endpunkte folgen denselben öffentlichen/Passwort-/Ablaufregeln wie die Freigabeseite.
135
137
  Passwortgeschützte Clips erfordern das einmalige Passwort; Erfolgreiche Antworten werden zurückgegeben
136
138
  kurzlebige tokenisierte Links, sodass nachgeschaltete Agenten den Klartext nicht benötigen
@@ -147,6 +147,8 @@ El CLI imprime el desarrollador local URL. Inicia sesión con Google y luego abr
147
147
 
148
148
  **Amplia superficie de conector.** BigQuery, GA4, análisis de productos, CRM, soporte, comunidad, GitHub/Jira, SEO y eventos propios `/track` llegan a través de actions al que el agente puede llamar.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### Trabajar con el agente
151
153
 
152
154
  El agente siempre sabe lo que estás mirando. El estado actual de la pantalla se inyecta en cada mensaje como un bloque `<current-screen>`: contiene la vista activa, el panel o análisis abierto y los filtros seleccionados.
@@ -131,6 +131,8 @@ agente.
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | Segmentos de transcripción con marca de tiempo con `startMs`, `endMs`, marcas de tiempo legibles, texto y etiquetas de origen opcionales |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | Un fotograma JPEG extraído del vídeo en una marca de tiempo del vídeo original |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  Los puntos finales siguen las mismas reglas de público/contraseña/caducidad que la página para compartir.
135
137
  Los clips protegidos con contraseña requieren la contraseña una vez; regresan respuestas exitosas
136
138
  Enlaces tokenizados de corta duración para que los agentes posteriores no necesiten el texto sin formato
@@ -147,6 +147,8 @@ Le CLI imprime le développement local URL. Connectez-vous avec Google, puis ouv
147
147
 
148
148
  **Large surface de connecteur.** Les événements BigQuery, GA4, analyses de produits, CRM, support, communauté, GitHub/Jira, SEO et `/track` propriétaires passent tous par actions que l'agent peut appeler.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### Travailler avec l'agent
151
153
 
152
154
  L'agent sait toujours ce que vous regardez. L'état actuel de l'écran est injecté dans chaque message sous forme de bloc `<current-screen>` : il contient la vue active, le tableau de bord ou l'analyse ouvert et tous les filtres sélectionnés.
@@ -131,6 +131,8 @@ agent.
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | Segments de transcription horodatés avec `startMs`, `endMs`, horodatages lisibles, texte et étiquettes de source facultatives |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | Une image JPEG extraite de la vidéo avec un horodatage de la vidéo d'origine |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  Les points de terminaison suivent les mêmes règles de public/mot de passe/expiration que la page de partage.
135
137
  Les clips protégés par mot de passe nécessitent le mot de passe une seule fois ; les réponses positives reviennent
136
138
  Liens tokenisés de courte durée afin que les agents en aval n'aient pas besoin du texte brut
@@ -147,6 +147,8 @@ CLI स्थानीय डेव URL प्रिंट करता है
147
147
 
148
148
  **व्यापक कनेक्टर सतह।** BigQuery, GA4, उत्पाद विश्लेषण, CRM, समर्थन, समुदाय, GitHub/Jira, SEO, और प्रथम-पक्ष `/track` इवेंट सभी actions के माध्यम से आते हैं जिन्हें एजेंट कॉल कर सकता है।
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### एजेंट के साथ काम करना
151
153
 
152
154
  एजेंट को हमेशा पता होता है कि आप क्या देख रहे हैं। वर्तमान स्क्रीन स्थिति को प्रत्येक संदेश में `<current-screen>` ब्लॉक के रूप में इंजेक्ट किया जाता है - इसमें सक्रिय दृश्य, खुला डैशबोर्ड या विश्लेषण और कोई भी चयनित फ़िल्टर शामिल होता है।
@@ -131,6 +131,8 @@ APIs, इसलिए मॉडल जो केवल पाठ या स्
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | `startMs`, `endMs`, पठनीय टाइमस्टैम्प, टेक्स्ट और वैकल्पिक स्रोत लेबल के साथ टाइमस्टैम्प्ड ट्रांसक्रिप्ट सेगमेंट |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | मूल-वीडियो टाइमस्टैम्प पर वीडियो से निकाला गया एक JPEG फ्रेम |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  एंडपॉइंट शेयर पेज के समान सार्वजनिक/पासवर्ड/समाप्ति नियमों का पालन करते हैं।
135
137
  पासवर्ड-सुरक्षित क्लिप को एक बार पासवर्ड की आवश्यकता होती है; सफल प्रत्युत्तर वापस आते हैं
136
138
  अल्पकालिक टोकनयुक्त लिंक ताकि डाउनस्ट्रीम एजेंटों को प्लेनटेक्स्ट की आवश्यकता न हो
@@ -147,6 +147,8 @@ CLI はローカル開発 URL を出力します。 Google でログインし、
147
147
 
148
148
  **幅広いコネクタ サーフェス。** BigQuery、GA4、製品分析、CRM、サポート、コミュニティ、GitHub/Jira、SEO、ファーストパーティ `/track` イベントはすべて、エージェントが呼び出すことができる actions 経由で行われます。
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### エージェントとの連携
151
153
 
152
154
  エージェントは、あなたが何を見ているのかを常に知っています。現在の画面状態は、`<current-screen>` ブロックとしてすべてのメッセージに挿入されます。これには、アクティブなビュー、開いているダッシュボードまたは分析、選択したフィルターが含まれます。
@@ -131,6 +131,8 @@ API なので、テキストまたは静止画像のみを受け入れるモデ
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | `startMs`、`endMs`、読み取り可能なタイムスタンプ、テキスト、およびオプションのソース ラベルを含むタイムスタンプ付きトランスクリプト セグメント |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | 元のビデオのタイムスタンプでビデオから抽出された JPEG フレーム |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  エンドポイントは、共有ページと同じパブリック/パスワード/有効期限ルールに従います。
135
137
  パスワードで保護されたクリップでは、パスワードが 1 回必要になります。成功した応答が返されます
136
138
  トークン化されたリンクは有効期間が短いため、ダウンストリーム エージェントはプレーンテキストを必要としません
@@ -147,6 +147,8 @@ CLI는 로컬 개발자 URL를 인쇄합니다. Google에 로그인한 다음 **
147
147
 
148
148
  **광범위한 커넥터 표면.** BigQuery, GA4, 제품 분석, CRM, 지원, 커뮤니티, GitHub/Jira, SEO 및 자사 `/track` 이벤트는 모두 에이전트가 호출할 수 있는 actions를 통해 제공됩니다.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### 에이전트와 협력하기
151
153
 
152
154
  에이전트는 항상 귀하가 무엇을 보고 있는지 알고 있습니다. 현재 화면 상태는 모든 메시지에 `<current-screen>` 블록으로 삽입됩니다. 여기에는 활성 보기, 열려 있는 대시보드 또는 분석, 선택한 필터가 포함됩니다.
@@ -131,6 +131,8 @@ API, 텍스트나 정지 이미지만 허용하는 모델도 여전히 무엇을
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | `startMs`, `endMs`, 읽을 수 있는 타임스탬프, 텍스트 및 선택적 소스 라벨이 포함된 타임스탬프 기록 세그먼트 |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | 원본 비디오 타임스탬프의 비디오에서 추출된 JPEG 프레임 |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  엔드포인트는 공유 페이지와 동일한 공개/비밀번호/만료 규칙을 따릅니다.
135
137
  비밀번호로 보호된 클립에는 비밀번호가 한 번만 필요합니다. 성공적인 응답 반환
136
138
  다운스트림 에이전트에 일반 텍스트가 필요하지 않도록 단기 토큰화된 링크
@@ -147,6 +147,8 @@ O CLI imprime o dev local URL. Faça login com o Google e abra a página **Fonte
147
147
 
148
148
  **Superfície de conector ampla.** BigQuery, GA4, análise de produto, CRM, suporte, comunidade, GitHub/Jira, SEO e eventos `/track` primários, todos vêm por meio do actions que o agente pode ligar.
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### Trabalhando com o agente
151
153
 
152
154
  O agente sempre sabe o que você está vendo. O estado atual da tela é injetado em cada mensagem como um bloco `<current-screen>` — ele contém a visualização ativa, o painel ou análise aberta e quaisquer filtros selecionados.
@@ -131,6 +131,8 @@ agente.
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | Segmentos de transcrição com carimbo de data e hora com `startMs`, `endMs`, carimbos de data e hora legíveis, texto e rótulos de origem opcionais |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | Um quadro JPEG extraído do vídeo em um carimbo de data/hora do vídeo original |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  Os endpoints seguem as mesmas regras de público/senha/expiração da página de compartilhamento.
135
137
  Clipes protegidos por senha exigem a senha uma vez; retorno de respostas bem-sucedidas
136
138
  links tokenizados de curta duração para que os agentes downstream não precisem do texto simples
@@ -147,6 +147,8 @@ CLI 打印本地开发 URL。使用 Google 登录,然后打开 **数据源**
147
147
 
148
148
  **广泛的连接器表面。** BigQuery、GA4、产品分析、CRM、支持、社区、GitHub/Jira、SEO 和第一方 `/track` 事件均来自代理可以调用的 actions。
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### 与代理合作
151
153
 
152
154
  代理始终知道您在看什么。当前屏幕状态作为 `<current-screen>` 块注入到每条消息中 - 它包含活动视图、打开的仪表板或分析以及任何选定的过滤器。
@@ -131,6 +131,8 @@ APIs,因此仅接受文本或静态图像的模型仍然可以理解内容
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | 带有 `startMs`、`endMs`、可读时间戳、文本和可选源标签的时间戳转录片段 |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | 以原始视频时间戳从视频中提取的 JPEG 帧 |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  端点遵循与共享页面相同的公共/密码/过期规则。
135
137
  受密码保护的剪辑需要密码一次;成功响应返回
136
138
  短暂的标记化链接,因此下游代理不需要明文
@@ -147,6 +147,8 @@ CLI 列印本機開發 URL。使用 Google 登入,然後開啟 **資料來源*
147
147
 
148
148
  **廣泛的連線器表面。** BigQuery、GA4、產品分析、CRM、支援、社群、GitHub/Jira、SEO 和第一方 `/track` 事件均來自代理可以呼叫的 actions。
149
149
 
150
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
+
150
152
  ### 與代理合作
151
153
 
152
154
  代理始終知道您在看什麼。目前螢幕狀態作為 `<current-screen>` 塊注入到每條訊息中 - 它包含活動檢視、開啟的儀表板或分析以及任何選定的過濾器。
@@ -131,6 +131,8 @@ APIs,因此僅接受文字或靜態圖片的模型仍然可以理解內容
131
131
  | `/api/agent-transcript.json?id=<recordingId>` | 帶有 `startMs`、`endMs`、可讀時間戳、文字和可選來源標籤的時間戳轉錄片段 |
132
132
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | 以原始影片時間戳從影片中擷取的 JPEG 幀 |
133
133
 
134
+ Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
+
134
136
  端點遵循與共用頁面相同的公開/密碼/過期規則。
135
137
  受密碼保護的剪輯需要密碼一次;成功回應返回
136
138
  短暫的標記化連結,因此下游代理不需要明文
@@ -152,6 +152,8 @@ The CLI prints the local dev URL. Sign in with Google, then open the **Data Sour
152
152
 
153
153
  **Broad connector surface.** BigQuery, GA4, product analytics, CRM, support, community, GitHub/Jira, SEO, and first-party `/track` events all come through actions the agent can call.
154
154
 
155
+ **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
156
+
155
157
  ### Working with the agent
156
158
 
157
159
  The agent always knows what you're looking at. The current screen state is injected into every message as a `<current-screen>` block — it contains the active view, the open dashboard or analysis, and any selected filters.
@@ -17,7 +17,7 @@ A capture-everything app: screen recordings, meeting notes from your calendar, a
17
17
  />
18
18
  </WireframeBlock>
19
19
 
20
- Think along the lines of Loom + Granola + Wispr Flow rolled into one app — but the agent is a first-class editor across every surface, and the recordings, meetings, and dictations are yours, not a SaaS vendor's. Clips also makes shared recordings agent-readable: paste a normal Clips share link into an agent and it can "hear" the transcript as text and "see" timestamped screen frames as images — no raw video needed. Frame-viewing works in any image-capable agent (ChatGPT, Claude Code, Cursor, Codex); text-only web chats still get the full transcript and can take a frame you upload.
20
+ Think along the lines of Loom + Granola + Wispr Flow rolled into one app — but the agent is a first-class editor across every surface, and the recordings, meetings, and dictations are yours, not a SaaS vendor's. Clips also makes shared recordings agent-readable: paste a public Clips share link or a temporary **Copy for agent** link into an agent and it can "hear" the transcript as text and "see" timestamped screen frames as images — no raw video needed. Frame-viewing works in any image-capable agent (ChatGPT, Claude Code, Cursor, Codex); text-only web chats still get the full transcript and can take a frame you upload.
21
21
 
22
22
  <Diagram id="doc-block-pqnd4p" title="Capture, transcribe, reuse" summary={"Three capture types land in one library; the agent transcribes, titles, and summarizes, then every transcript is searchable and shareable."}>
23
23
 
@@ -87,7 +87,7 @@ Think along the lines of Loom + Granola + Wispr Flow rolled into one app — but
87
87
  - **Capture browser logs with the Chrome extension.** Browser recordings can
88
88
  attach redacted console logs and fetch/XHR metadata, which is helpful for
89
89
  product bugs and browser-only repros.
90
- - **Paste Clips links into agents** so they can discover the agent-readable context: metadata, transcript segments, recommended frames, and timestamped frame images without receiving the raw video file.
90
+ - **Paste Clips links into agents** so they can discover the agent-readable context: metadata, transcript segments, recommended frames, and timestamped frame images without receiving the raw video file. Private clips use a temporary scoped link instead of changing visibility.
91
91
  - **Smart library views.** Group by project, filter by speaker, auto-tag based on content.
92
92
  - **Edit the transcript through chat.** "Fix the mis-transcribed word at 1:42." "Pull three quotes for a blog post." The agent edits the transcript and the UI updates live.
93
93
 
@@ -158,10 +158,14 @@ directly to anonymous users.
158
158
 
159
159
  ## Agent-readable clips
160
160
 
161
- Paste a normal public Clips share link into an agent. The share page advertises
162
- a compact agent context URL, and that context points to the transcript and frame
163
- APIs, so models that only accept text or still images can still understand what
164
- happened in the recording.
161
+ Paste a public Clips share link into an agent, or use **Share → Copy** in the
162
+ **Share with agents** row to mint a temporary private agent link. Private,
163
+ organization, and passworded clips do not need to become public: the copied URL
164
+ carries a recording-scoped `agent_access` token that expires after two hours.
165
+
166
+ The share page advertises a compact agent context URL, and that context points
167
+ to the transcript and frame APIs, so models that only accept text or still
168
+ images can still understand what happened in the recording.
165
169
 
166
170
  Any agent that can fetch an image URL into its vision — ChatGPT, Claude Code,
167
171
  Cursor, Codex, and MCP-connected agents — reads the transcript and sees the
@@ -175,7 +179,8 @@ agent.
175
179
  | `/api/agent-transcript.json?id=<recordingId>` | Timestamped transcript segments with `startMs`, `endMs`, readable timestamps, text, and optional source labels |
176
180
  | `/api/agent-frame.jpg?id=<recordingId>&atMs=<ms>` | A JPEG frame extracted from the video at an original-video timestamp |
177
181
 
178
- The endpoints follow the same public/password/expiry rules as the share page.
182
+ The endpoints follow the same public/password/expiry rules as the share page,
183
+ or accept the scoped `agent_access` token from a temporary agent link.
179
184
  Password-protected clips require the password once; successful responses return
180
185
  short-lived tokenized links so downstream agents do not need the plaintext
181
186
  password.
@@ -194,13 +199,20 @@ only returns a playable Slack `video` block for ready, public clips without a
194
199
  password, expiry hit, archive marker, or trash marker. Other clips still get the
195
200
  normal share-page title/thumbnail metadata and require opening Clips.
196
201
 
197
- <Endpoint id="doc-block-6q76u0" title="Agent context entry point" method="GET" path="/api/agent-context.json" summary="Compact, agent-readable description of a shared clip" auth="Same public / password / expiry rules as the share page" params={[
202
+ <Endpoint id="doc-block-6q76u0" title="Agent context entry point" method="GET" path="/api/agent-context.json" summary="Compact, agent-readable description of a shared clip" auth="Same public / password / expiry rules as the share page, or a scoped agent_access token" params={[
198
203
  {
199
204
  "name": "id",
200
205
  "in": "query",
201
206
  "type": "string",
202
207
  "required": true,
203
208
  "description": "Recording id"
209
+ },
210
+ {
211
+ "name": "agent_access",
212
+ "in": "query",
213
+ "type": "string",
214
+ "required": false,
215
+ "description": "Temporary token from Copy for agent links"
204
216
  }
205
217
  ]} responses={[
206
218
  {
@@ -209,7 +221,7 @@ normal share-page title/thumbnail metadata and require opening Clips.
209
221
  }
210
222
  ]}>
211
223
 
212
- Returns clip metadata, transcript status, chapters, CTAs, recommended frames, and links to the transcript and frame APIs. Advertised by the public share page so a text- or image-only agent can understand a recording without ingesting raw video.
224
+ Returns clip metadata, transcript status, chapters, CTAs, recommended frames, and links to the transcript and frame APIs. Advertised by public share pages and temporary private agent links so a text- or image-only agent can understand a recording without ingesting raw video.
213
225
 
214
226
  </Endpoint>
215
227
 
@@ -358,7 +370,7 @@ tray app at `http://localhost:8094`.
358
370
 
359
371
  **Non-destructive editing.** Trim, split, filler-word removal, silence removal, and stitching stay in `edits_json` so original media remains intact.
360
372
 
361
- **Agent-readable share links.** Public share links expose transcript and frame APIs so agents can understand recordings without ingesting raw video.
373
+ **Agent-readable share links.** Public share links and temporary private agent links expose transcript and frame APIs so agents can understand recordings without ingesting raw video.
362
374
 
363
375
  **Slack playable unfurls.** Public share links can render a Slack `video` block
364
376
  that points at the existing `/embed/:id` player. This is a workspace Slack app
@@ -237,6 +237,8 @@ Privacy defaults are intentionally conservative but still useful for playback:
237
237
 
238
238
  The Analytics template stores replay metadata in SQL (`session_recordings`) and stores chunks through private blob refs (`session_replay_chunks`). Browsers and agents never receive provider URLs. Playback goes through scoped server routes and the default agent tools return summaries or bounded replay events, not raw chunk table access.
239
239
 
240
+ When you need to hand a private recording to an external agent, use the session detail page's **Copy for agent** control. It mints a two-hour, recording-scoped `agent_access` link, SSRs a small discovery payload on `/sessions/:recordingId`, and exposes only the agent context/events JSON APIs. The recording's visibility does not change.
241
+
240
242
  For local development only, Analytics can fall back to capped SQL inline chunks when private blob storage is unavailable. Production deployments should configure private or encrypted blob storage rather than relying on Postgres for replay payloads.
241
243
 
242
244
  ## Advanced: custom providers & internals {#advanced}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.84.56",
3
+ "version": "0.84.57",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -28,6 +28,14 @@ agent answers about browser recordings in the Analytics template.
28
28
  `session-recording` access before reading private blob refs.
29
29
  - SQL inline chunks are a local/dev fallback only; production should use
30
30
  private or encrypted blob storage.
31
+ - When sharing a replay with an external agent, use
32
+ `create-session-replay-agent-link`. It mints a two-hour `agent_access` URL
33
+ scoped to the recording, embeds a small SSR discovery payload on
34
+ `/sessions/:recordingId`, and advertises
35
+ `/api/session-replay/agent-context.json` plus bounded
36
+ `/api/session-replay/agent-events.json` reads.
37
+ - Do not make session recordings public just so an agent can inspect them.
38
+ Tokenized agent links are the intended handoff path.
31
39
 
32
40
  ## Capture Defaults
33
41
 
@@ -148,6 +148,11 @@ details live in `.agents/skills/`.
148
148
  `get-session-replay-summary` and fetches rrweb payloads only through scoped
149
149
  chunk routes. Do not expose storage/provider URLs, raw chunk table access, or
150
150
  unscoped replay blobs in UI, actions, dashboards, docs, or prompts.
151
+ - The session detail page can mint a temporary `Copy for agent` link through
152
+ `create-session-replay-agent-link`. That URL carries an `agent_access` token
153
+ scoped to one recording for two hours; SSR embeds an agent discovery payload
154
+ and the JSON APIs expose only summary/timeline metadata plus bounded event
155
+ reads.
151
156
  - Dashboard rows that include `recording_id` should link to
152
157
  `/sessions/:recordingId`; rows that only include `session_id` can link to a
153
158
  filtered `/sessions` search.
@@ -0,0 +1,31 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import {
3
+ getRequestContext,
4
+ getRequestOrgId,
5
+ getRequestUserEmail,
6
+ } from "@agent-native/core/server";
7
+ import { z } from "zod";
8
+
9
+ import { createSessionReplayAgentLink } from "../server/lib/session-replay-agent-context.js";
10
+
11
+ function resolveScope() {
12
+ const userEmail = getRequestUserEmail();
13
+ if (!userEmail) throw new Error("no authenticated user");
14
+ return { userEmail, orgId: getRequestOrgId() || null };
15
+ }
16
+
17
+ export default defineAction({
18
+ description:
19
+ "Create a temporary private agent-readable link for one Analytics session replay recording. The URL is scoped to that recording and expires after two hours.",
20
+ schema: z.object({
21
+ recordingId: z.string().describe("The session_recordings id"),
22
+ }),
23
+ readOnly: true,
24
+ run: async (args) => {
25
+ return createSessionReplayAgentLink({
26
+ recordingId: args.recordingId,
27
+ scope: resolveScope(),
28
+ origin: getRequestContext()?.requestOrigin,
29
+ });
30
+ },
31
+ });
@@ -803,6 +803,8 @@ const messages = {
803
803
  emptyStepVisit: "存取應用",
804
804
  installSnippetTitle: "新增工作階段回放",
805
805
  backToSessions: "返回工作階段",
806
+ copyForAgent: "複製給 Agent",
807
+ copiedForAgent: "已複製",
806
808
  askAgent: "詢問代理此工作階段",
807
809
  askSessionTitle: "詢問此工作階段",
808
810
  askSessionDescription: "將此回放作為脈絡,向 Analytics 代理傳送聚焦提示。",
@@ -841,6 +841,8 @@ const enUS = {
841
841
  emptyStepVisit: "Visit app",
842
842
  installSnippetTitle: "Add session replay",
843
843
  backToSessions: "Back to sessions",
844
+ copyForAgent: "Copy for agent",
845
+ copiedForAgent: "Copied",
844
846
  askAgent: "Ask agent about this session",
845
847
  askSessionTitle: "Ask about this session",
846
848
  askSessionDescription:
@@ -6839,6 +6841,8 @@ const translatedAnalyticsDebtCorrections = {
6839
6841
  anyActivity: "أي نشاط",
6840
6842
  eventCountCompact: "{{count}} حدث",
6841
6843
  pageCountCompact: "{{count}} صفحة",
6844
+ copyForAgent: "نسخ للوكيل",
6845
+ copiedForAgent: "تم النسخ",
6842
6846
  askSessionTitle: "اسأل عن هذه الجلسة",
6843
6847
  askSessionDescription:
6844
6848
  "أرسل مطالبة مركزة إلى وكيل Analytics مع إرفاق هذا التسجيل كسياق.",
@@ -6869,6 +6873,8 @@ const translatedAnalyticsDebtCorrections = {
6869
6873
  anyActivity: "Beliebige Aktivität",
6870
6874
  eventCountCompact: "{{count}} Ereignisse",
6871
6875
  pageCountCompact: "{{count}} Seiten",
6876
+ copyForAgent: "Für Agent kopieren",
6877
+ copiedForAgent: "Kopiert",
6872
6878
  askSessionTitle: "Zu dieser Sitzung fragen",
6873
6879
  askSessionDescription:
6874
6880
  "Sende dem Analytics-Agenten eine gezielte Eingabe mit dieser Wiedergabe als Kontext.",
@@ -6894,6 +6900,8 @@ const translatedAnalyticsDebtCorrections = {
6894
6900
  anyActivity: "Cualquier actividad",
6895
6901
  eventCountCompact: "{{count}} eventos",
6896
6902
  pageCountCompact: "{{count}} páginas",
6903
+ copyForAgent: "Copiar para agente",
6904
+ copiedForAgent: "Copiado",
6897
6905
  askSessionTitle: "Preguntar sobre esta sesión",
6898
6906
  askSessionDescription:
6899
6907
  "Envía una pregunta enfocada al agente de Analytics con esta reproducción como contexto.",
@@ -6922,6 +6930,8 @@ const translatedAnalyticsDebtCorrections = {
6922
6930
  anyActivity: "Toute activité",
6923
6931
  eventCountCompact: "{{count}} événements",
6924
6932
  pageCountCompact: "{{count}} pages",
6933
+ copyForAgent: "Copier pour l'agent",
6934
+ copiedForAgent: "Copié",
6925
6935
  askSessionTitle: "Poser une question sur cette session",
6926
6936
  askSessionDescription:
6927
6937
  "Envoyez une question ciblée à l'agent Analytics avec cette relecture en contexte.",
@@ -6948,6 +6958,8 @@ const translatedAnalyticsDebtCorrections = {
6948
6958
  anyActivity: "कोई भी गतिविधि",
6949
6959
  eventCountCompact: "{{count}} इवेंट",
6950
6960
  pageCountCompact: "{{count}} पेज",
6961
+ copyForAgent: "एजेंट के लिए कॉपी करें",
6962
+ copiedForAgent: "कॉपी हो गया",
6951
6963
  askSessionTitle: "इस सत्र के बारे में पूछें",
6952
6964
  askSessionDescription:
6953
6965
  "इस रीप्ले को संदर्भ के रूप में जोड़कर Analytics एजेंट को केंद्रित प्रॉम्प्ट भेजें।",
@@ -6973,6 +6985,8 @@ const translatedAnalyticsDebtCorrections = {
6973
6985
  anyActivity: "任意のアクティビティ",
6974
6986
  eventCountCompact: "{{count}} 件のイベント",
6975
6987
  pageCountCompact: "{{count}} ページ",
6988
+ copyForAgent: "エージェント用にコピー",
6989
+ copiedForAgent: "コピーしました",
6976
6990
  askSessionTitle: "このセッションについて質問",
6977
6991
  askSessionDescription:
6978
6992
  "このリプレイをコンテキストとして添えて、Analytics エージェントに絞り込んだプロンプトを送信します。",
@@ -6998,6 +7012,8 @@ const translatedAnalyticsDebtCorrections = {
6998
7012
  anyActivity: "모든 활동",
6999
7013
  eventCountCompact: "{{count}}개 이벤트",
7000
7014
  pageCountCompact: "{{count}}개 페이지",
7015
+ copyForAgent: "에이전트용으로 복사",
7016
+ copiedForAgent: "복사됨",
7001
7017
  askSessionTitle: "이 세션에 대해 질문",
7002
7018
  askSessionDescription:
7003
7019
  "이 리플레이를 컨텍스트로 첨부해 Analytics 에이전트에 집중된 프롬프트를 보냅니다.",
@@ -7023,6 +7039,8 @@ const translatedAnalyticsDebtCorrections = {
7023
7039
  anyActivity: "Qualquer atividade",
7024
7040
  eventCountCompact: "{{count}} eventos",
7025
7041
  pageCountCompact: "{{count}} páginas",
7042
+ copyForAgent: "Copiar para agente",
7043
+ copiedForAgent: "Copiado",
7026
7044
  askSessionTitle: "Perguntar sobre esta sessão",
7027
7045
  askSessionDescription:
7028
7046
  "Envie um prompt focado ao agente de Analytics com este replay como contexto.",
@@ -7048,6 +7066,8 @@ const translatedAnalyticsDebtCorrections = {
7048
7066
  anyActivity: "任意活动",
7049
7067
  eventCountCompact: "{{count}} 个事件",
7050
7068
  pageCountCompact: "{{count}} 个页面",
7069
+ copyForAgent: "复制给代理",
7070
+ copiedForAgent: "已复制",
7051
7071
  askSessionTitle: "询问此会话",
7052
7072
  askSessionDescription:
7053
7073
  "将此回放作为上下文,向 Analytics 代理发送聚焦提示。",
@@ -1,11 +1,16 @@
1
1
  import {
2
2
  appApiPath,
3
3
  PromptComposer,
4
+ useActionMutation,
5
+ useActionQuery,
4
6
  useSendToAgentChat,
5
7
  useT,
6
8
  } from "@agent-native/core/client";
9
+ import { SESSION_REPLAY_AGENT_ACCESS_PARAM } from "@shared/session-replay-agent-access";
7
10
  import {
8
11
  IconArrowLeft,
12
+ IconCheck,
13
+ IconCopy,
9
14
  IconExclamationCircle,
10
15
  IconKeyboard,
11
16
  IconMessageCircle,
@@ -201,7 +206,12 @@ export default function SessionDetailPage() {
201
206
  </div>
202
207
  ) : null}
203
208
  </div>
204
- {recording ? <AskSessionPopover recording={recording} /> : null}
209
+ {recording ? (
210
+ <div className="flex shrink-0 items-center gap-2">
211
+ <CopySessionForAgentButton recordingId={recording.id} />
212
+ <AskSessionPopover recording={recording} />
213
+ </div>
214
+ ) : null}
205
215
  </div>
206
216
 
207
217
  {error ? (
@@ -224,6 +234,41 @@ export default function SessionDetailPage() {
224
234
  );
225
235
  }
226
236
 
237
+ function CopySessionForAgentButton({ recordingId }: { recordingId: string }) {
238
+ const t = useT();
239
+ const [copied, setCopied] = useState(false);
240
+ const createLink = useActionMutation(
241
+ "create-session-replay-agent-link" as any,
242
+ );
243
+
244
+ async function handleCopy() {
245
+ if (createLink.isPending) return;
246
+ const result = (await createLink.mutateAsync({
247
+ recordingId,
248
+ })) as { url?: string };
249
+ if (!result?.url) return;
250
+ await navigator.clipboard.writeText(result.url).catch(() => {});
251
+ setCopied(true);
252
+ setTimeout(() => setCopied(false), 1400);
253
+ }
254
+
255
+ return (
256
+ <Button
257
+ type="button"
258
+ variant="outline"
259
+ onClick={() => void handleCopy()}
260
+ disabled={createLink.isPending}
261
+ >
262
+ {copied ? (
263
+ <IconCheck className="h-4 w-4" />
264
+ ) : (
265
+ <IconCopy className="h-4 w-4" />
266
+ )}
267
+ {copied ? t("sessions.copiedForAgent") : t("sessions.copyForAgent")}
268
+ </Button>
269
+ );
270
+ }
271
+
227
272
  function AskSessionPopover({
228
273
  recording,
229
274
  }: {
@@ -976,8 +1021,9 @@ function DetailSkeleton() {
976
1021
  }
977
1022
 
978
1023
  function useSessionReplayPlayback(recordingId: string) {
1024
+ const agentAccessToken = currentSessionReplayAgentAccessToken();
979
1025
  return useQuery({
980
- queryKey: ["session-replay-playback", recordingId],
1026
+ queryKey: ["session-replay-playback", recordingId, agentAccessToken],
981
1027
  enabled: Boolean(recordingId),
982
1028
  staleTime: 30_000,
983
1029
  gcTime: 60_000,
@@ -1080,9 +1126,25 @@ function replayUnavailableChunk(
1080
1126
  };
1081
1127
  }
1082
1128
 
1129
+ function currentSessionReplayAgentAccessToken(): string {
1130
+ const browserSearch =
1131
+ typeof window === "undefined" ? "" : window.location.search;
1132
+ return (
1133
+ new URLSearchParams(browserSearch).get(SESSION_REPLAY_AGENT_ACCESS_PARAM) ??
1134
+ ""
1135
+ );
1136
+ }
1137
+
1083
1138
  async function fetchReplayApi(path: string): Promise<Response> {
1084
1139
  const token = await getIdToken();
1085
- return fetch(appApiPath(path), {
1140
+ const browserOrigin =
1141
+ typeof window === "undefined" ? "http://localhost" : window.location.origin;
1142
+ const url = new URL(appApiPath(path), browserOrigin);
1143
+ const agentAccessToken = currentSessionReplayAgentAccessToken();
1144
+ if (agentAccessToken) {
1145
+ url.searchParams.set(SESSION_REPLAY_AGENT_ACCESS_PARAM, agentAccessToken);
1146
+ }
1147
+ return fetch(`${url.pathname}${url.search}${url.hash}`, {
1086
1148
  headers: {
1087
1149
  Accept: "application/json",
1088
1150
  ...(token ? { Authorization: `Bearer ${token}` } : {}),