local-operator-ui 0.48.11 → 0.48.13
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.
- package/out/main/index.js +1575 -142
- package/out/preload/recording-encoder.js +18 -0
- package/out/renderer/assets/{_basePickBy-DFl9DUra.js → _basePickBy-CKmx30yF.js} +1 -1
- package/out/renderer/assets/{_baseUniq-BFXgChF-.js → _baseUniq-Bpi6IoVg.js} +1 -1
- package/out/renderer/assets/{agent-details-page-06GRVXIX.js → agent-details-page-DO7d_ih5.js} +1 -1
- package/out/renderer/assets/{agent-hub-page-BhNxrhRu.js → agent-hub-page-DqIdGNHj.js} +1 -1
- package/out/renderer/assets/agents-page-DMudbdAq.js +14 -0
- package/out/renderer/assets/{approvalsOverlay-uvA-Vt5X.js → approvalsOverlay-Bnfsw8L9.js} +1 -1
- package/out/renderer/assets/{arc-DWqWEzi9.js → arc-OIEGuBTn.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-DJogjK0_.js → architectureDiagram-IEHRJDOE-CzKyJ4cr.js} +1 -1
- package/out/renderer/assets/{avatar-cropper-SiLxEcIt.js → avatar-cropper-DXYS7VvI.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-BjxLHnNm.js → blockDiagram-JOT3LUYC-ChQDHo8e.js} +1 -1
- package/out/renderer/assets/{book-open-BastYhxp.js → book-open-BAlAnYWc.js} +1 -1
- package/out/renderer/assets/browser-page-DKyFBSCV.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-C6vFP_2I.js → browser-webauthn-prompt-C7dwOBvW.js} +1 -1
- package/out/renderer/assets/{building-2-Dx-eOoNu.js → building-2-B4SNlD8W.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-441IwSem.js → c4Diagram-VJAJSXHY-DP6s4-gF.js} +1 -1
- package/out/renderer/assets/channel-DXyM-LNQ.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-DE74Ocw-.js → chunk-4BMEZGHF-CfMGVgaT.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-CvfIskY0.js → chunk-A2AXSNBT-C7LLSPSK.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-Dg9iMQSH.js → chunk-AEK57VVT-ssRgcUgK.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-B_1yVGsA.js → chunk-D6G4REZN-w9sKgwLw.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-zoNgiWzT.js → chunk-RZ5BOZE2-C3JZadRL.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-D9i0ySOq.js → chunk-XZIHB7SX-A81zsT6l.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-BouPcaGl.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-BouPcaGl.js +1 -0
- package/out/renderer/assets/clone-BWgv46LY.js +1 -0
- package/out/renderer/assets/{console-mirror-Bd9dWCOG.js → console-mirror-Bd9Lx41W.js} +1 -1
- package/out/renderer/assets/{consoleCapture-DcDxwgX5.js → consoleCapture-TtI3yw3S.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-CE4opxo_.js → conversation-input-sync-B0udOX2P.js} +266 -260
- package/out/renderer/assets/{conversation-input-sync-Dp97JwKx.css → conversation-input-sync-BmGWvjex.css} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-7-fIaqjt.js → dagre-OKDRZEBW-futvc0Ip.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-Bu5ERF6Y.js → diagram-SSKATNLV-DRqJ6jPO.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-B-e-zp3r.js → diagram-VNBRO52H-CoXmeLca.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-BjrAWWSl.js → erDiagram-Q7BY3M3F-DamfzVbu.js} +1 -1
- package/out/renderer/assets/{error-boundary-tDOEWhiX.js → error-boundary-DQKaFMb3.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-D2brvAPw.js → flowDiagram-4HSFHLVR-D_JracNp.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-DxYUXrbN.js → ganttDiagram-APWFNJXF-DxkMvvzu.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-CjAVMnY8.js → gitGraphDiagram-7IBYFJ6S-Ch2WfuGl.js} +1 -1
- package/out/renderer/assets/{graph-BdY3-j0d.js → graph-E23dAXFZ.js} +1 -1
- package/out/renderer/assets/{hash-B9N1GlDG.js → hash-Ccn2EAfy.js} +1 -1
- package/out/renderer/assets/{heart-i5FtUp5a.js → heart-DRuR5lyD.js} +1 -1
- package/out/renderer/assets/{image-plus-BirRYtMz.js → image-plus-CO38-orC.js} +1 -1
- package/out/renderer/assets/{index-CtJjbyMh.js → index-871YiMwJ.js} +1 -1
- package/out/renderer/assets/{index-BJiRq-wv.js → index-Cvms1u2n.js} +1 -1
- package/out/renderer/assets/{index-BuL7blPm.js → index-D8bU6n8S.js} +204 -204
- package/out/renderer/assets/{index-kR82CvO6.js → index-DszIY8oB.js} +1 -1
- package/out/renderer/assets/index-dyl6bCMv.css +1 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-BzxTTi16.js +2 -0
- package/out/renderer/assets/{installer-D9ByBu_L.js → installer-BsEQzRI7.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-QMTzkgUq.js → journeyDiagram-U35MCT3I-7o71pCw6.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BZCdzOwT.js → kanban-definition-NDS4AKOZ-Ba2fKg5g.js} +1 -1
- package/out/renderer/assets/{layout-DWrxkrqR.js → layout-u9aNonBe.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-DS_1qW0s.js → legacy-agents-page-BUZN75el.js} +2 -2
- package/out/renderer/assets/{library-page-DHdIJjSi.js → library-page-CnofZnaB.js} +3 -3
- package/out/renderer/assets/{mermaid.core-Ddb6Ozxy.js → mermaid.core-BO7pGBkG.js} +19 -19
- package/out/renderer/assets/{mesh-page-CcCqLeLA.js → mesh-page-BCIVB0Hi.js} +1 -1
- package/out/renderer/assets/{messages-aMLMjoGD.js → messages-BZscpRIC.js} +10 -10
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-BAFH5vG2.js → mindmap-definition-ALO5MXBD--7E9KpWa.js} +1 -1
- package/out/renderer/assets/{mini-CMXTYZwX.js → mini-CdnwZ2z8.js} +1 -1
- package/out/renderer/assets/{notebook-pen-QStzGWXW.js → notebook-pen-Dtk48ynr.js} +1 -1
- package/out/renderer/assets/{notifications-page-DBnBg_1b.js → notifications-page-DVFMPXXe.js} +1 -1
- package/out/renderer/assets/{org-access-udExX9j1.js → org-access-HM79rP3f.js} +1 -1
- package/out/renderer/assets/{org-surface-gate-CFYdT64x.js → org-surface-gate-DKBYiK5D.js} +1 -1
- package/out/renderer/assets/{page-header--Egdzoex.js → page-header-Y2McYPDx.js} +1 -1
- package/out/renderer/assets/{path-utils-Bblb7gI2.js → path-utils-BrLZulPz.js} +33 -33
- package/out/renderer/assets/{pieDiagram-IB7DONF6-CEnUlb7r.js → pieDiagram-IB7DONF6-D5TiBcOS.js} +1 -1
- package/out/renderer/assets/{project-markdown-BeCCWkWe.js → project-markdown-DM2zz9cY.js} +1 -1
- package/out/renderer/assets/{projects-page-CMs95LiG.js → projects-page-DQW7vu5M.js} +1 -1
- package/out/renderer/assets/{publication-validation-CNvZfxkg.js → publication-validation-CjUR3KXX.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CLx--S0a.js → quadrantDiagram-7GDLP6J5-BxqgjzcX.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-C8jcJ5ii.js → radar-MK3ICKWK-RhGIy4cy.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-BI81mlJp.js → radient-auth-buttons-CjcIy4Ra.js} +1 -1
- package/out/renderer/assets/recordingEncoder-vsQVVLgp.js +1 -0
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-2LA0Av1t.js → requirementDiagram-KVF5MWMF-BbMnuHR5.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-Bwmm_Kef.js → sankeyDiagram-QLVOVGJD-B5rU7VZ5.js} +1 -1
- package/out/renderer/assets/{schedules-page-B7_dMaKI.js → schedules-page-D_c2nY3o.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BnAqkczN.js → sequenceDiagram-X6HHIX6F-B3c6QPin.js} +1 -1
- package/out/renderer/assets/settings-page-AbHZDN8P.js +288 -0
- package/out/renderer/assets/{smartart-DWRhh-lL.js → smartart-K65nA3xt.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-zu2cJm7e.js → stateDiagram-DGXRK772-BaaeHACk.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-B8p6qkit.js +1 -0
- package/out/renderer/assets/team-bridge-page-Cgvoi96Y.js +50 -0
- package/out/renderer/assets/{team-bridge-scope-preference-DlgQcIzl.js → team-bridge-scope-preference-CgR9TBFd.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-B3CNpgws.js → timeline-definition-BDJGKUSR-DazTtN2a.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-BtMBnbn8.js → use-download-agent-mutation-DB5SyNA0.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-B1ZwqarE.js → use-session-snapshot-DbuqOFVq.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-C22FKAwz.js → xychartDiagram-VJFVF3MP-7wZpEaYI.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +6 -6
- package/out/renderer/index.html +9 -9
- package/out/renderer/installer.html +5 -5
- package/out/renderer/mini.html +9 -9
- package/out/renderer/recording-encoder.html +23 -0
- package/package.json +1 -1
- package/out/renderer/assets/agents-page-CP7SXJ9K.js +0 -14
- package/out/renderer/assets/browser-page-DW2cfBgD.js +0 -1
- package/out/renderer/assets/channel-BdCrQtc5.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-CCQ8PKyo.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-CCQ8PKyo.js +0 -1
- package/out/renderer/assets/clone-f_ugKI_v.js +0 -1
- package/out/renderer/assets/index-D2enLV5g.css +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DznqNbQh.js +0 -2
- package/out/renderer/assets/settings-page-BeBT1IGZ.js +0 -288
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DqDAuirF.js +0 -1
- package/out/renderer/assets/team-bridge-page-qwUYdzut.js +0 -50
package/out/main/index.js
CHANGED
|
@@ -2939,7 +2939,8 @@ const enUiAgentsAvatar = {
|
|
|
2939
2939
|
"ui.agents.avatar.editor.zoom": "Zoom",
|
|
2940
2940
|
"ui.agents.avatar.editor.zoom_in": "Zoom in",
|
|
2941
2941
|
"ui.agents.avatar.editor.zoom_out": "Zoom out",
|
|
2942
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
2942
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
2943
|
+
"ui.agents.avatar.add_link": "Add a picture for {name}"
|
|
2943
2944
|
};
|
|
2944
2945
|
const enUiAgentsConfig = {
|
|
2945
2946
|
"ui.agents.config.about": "About {kind} {name}",
|
|
@@ -4560,6 +4561,11 @@ const enUiChatComposer = {
|
|
|
4560
4561
|
"ui.chat.composer.confirm_recording_hint": "Confirm recording (Enter)",
|
|
4561
4562
|
"ui.chat.composer.cancel_recording": "Cancel recording",
|
|
4562
4563
|
"ui.chat.composer.cancel_recording_hint": "Cancel recording (Esc)",
|
|
4564
|
+
"ui.chat.composer.insert_transcript": "Insert transcript",
|
|
4565
|
+
"ui.chat.composer.insert_transcript_hint": "Insert transcript to review (Enter)",
|
|
4566
|
+
"ui.chat.composer.send_recording": "Send recording",
|
|
4567
|
+
"ui.chat.composer.send_recording_hint": "Transcribe and send now, no review",
|
|
4568
|
+
"ui.chat.composer.steer_hint": "Steer the agent now (Enter) · Esc stops the turn",
|
|
4563
4569
|
"ui.chat.composer.stop": "Stop",
|
|
4564
4570
|
"ui.chat.composer.stop_work_hint": "Stop this session's current work (Esc)",
|
|
4565
4571
|
"ui.chat.composer.stop_agent": "Stop agent",
|
|
@@ -4610,8 +4616,9 @@ const enUiChatComposer = {
|
|
|
4610
4616
|
};
|
|
4611
4617
|
const enUiChatComposerMedia = {
|
|
4612
4618
|
"ui.chat.composer_media.recording": "Recording",
|
|
4613
|
-
"ui.chat.composer_media.confirms": "
|
|
4619
|
+
"ui.chat.composer_media.confirms": "inserts",
|
|
4614
4620
|
"ui.chat.composer_media.cancels": "cancels",
|
|
4621
|
+
"ui.chat.composer_media.sends_now": "sends now",
|
|
4615
4622
|
"ui.chat.composer_media.pasted_type": "Pasted {mimeType}",
|
|
4616
4623
|
"ui.chat.composer_media.pasted_file": "Pasted file",
|
|
4617
4624
|
"ui.chat.composer_media.preview_failed": "Could not be previewed",
|
|
@@ -9233,7 +9240,12 @@ const enUiSettingsAppearance = {
|
|
|
9233
9240
|
"ui.settings.appearance.theme.tokyo_night_storm": "The brighter night — indigo storm skies under the same neon accents.",
|
|
9234
9241
|
"ui.settings.appearance.theme.tokyo_night": "Deep blue-purple night with a bright blue accent.",
|
|
9235
9242
|
"ui.settings.appearance.theme.tron": "Electric cyan circuitry on the Grid's blue-black.",
|
|
9236
|
-
"ui.settings.appearance.theme.vaporwave": "Dusty pink and faded teal pastels on deep mall-purple."
|
|
9243
|
+
"ui.settings.appearance.theme.vaporwave": "Dusty pink and faded teal pastels on deep mall-purple.",
|
|
9244
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "Agent picture size",
|
|
9245
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "How large agent pictures appear in the transcript and the chat header. Sidebar rows keep their size.",
|
|
9246
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "Small",
|
|
9247
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "Medium",
|
|
9248
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "Large"
|
|
9237
9249
|
};
|
|
9238
9250
|
const enUiSettingsAppearanceWindowGlass = {
|
|
9239
9251
|
"ui.settings.appearance.window_glass.label": "Translucent window",
|
|
@@ -10237,7 +10249,7 @@ const enUiTeamBridge = {
|
|
|
10237
10249
|
"ui.teamBridge.composer.placeholder_to": "Message {name}",
|
|
10238
10250
|
"ui.teamBridge.thread.today": "Today",
|
|
10239
10251
|
"ui.teamBridge.thread.yesterday": "Yesterday",
|
|
10240
|
-
"ui.teamBridge.builtin.general_topic": "The whole organization: people and their agents. Agents
|
|
10252
|
+
"ui.teamBridge.builtin.general_topic": "The whole organization: people and their agents. Agents see every message and reply when @-mentioned or in threads they follow.",
|
|
10241
10253
|
"ui.teamBridge.builtin.humans_topic": "People only, no agents. Messages here notify every person.",
|
|
10242
10254
|
"ui.teamBridge.builtin.agents_topic": "Every teammate's chief of staff. Agents see every message and reply when relevant or @-mentioned.",
|
|
10243
10255
|
"ui.teamBridge.section.channels_add": "Create a channel",
|
|
@@ -10633,7 +10645,8 @@ const esUiAgentsAvatar = {
|
|
|
10633
10645
|
"ui.agents.avatar.editor.zoom": "Zoom",
|
|
10634
10646
|
"ui.agents.avatar.editor.zoom_in": "Acercar",
|
|
10635
10647
|
"ui.agents.avatar.editor.zoom_out": "Alejar",
|
|
10636
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
10648
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
10649
|
+
"ui.agents.avatar.add_link": "Añadir una foto para {name}"
|
|
10637
10650
|
};
|
|
10638
10651
|
const esUiAgentsConfig = {
|
|
10639
10652
|
"ui.agents.config.about": "Acerca de {name} ({kind})",
|
|
@@ -12254,6 +12267,11 @@ const esUiChatComposer = {
|
|
|
12254
12267
|
"ui.chat.composer.confirm_recording_hint": "Confirmar grabación (Intro)",
|
|
12255
12268
|
"ui.chat.composer.cancel_recording": "Cancelar grabación",
|
|
12256
12269
|
"ui.chat.composer.cancel_recording_hint": "Cancelar grabación (Esc)",
|
|
12270
|
+
"ui.chat.composer.insert_transcript": "Insertar transcripción",
|
|
12271
|
+
"ui.chat.composer.insert_transcript_hint": "Insertar la transcripción para revisarla (Intro)",
|
|
12272
|
+
"ui.chat.composer.send_recording": "Enviar grabación",
|
|
12273
|
+
"ui.chat.composer.send_recording_hint": "Transcribir y enviar ahora, sin revisar",
|
|
12274
|
+
"ui.chat.composer.steer_hint": "Guiar al agente ahora (Intro) · Esc detiene el turno",
|
|
12257
12275
|
"ui.chat.composer.stop": "Detener",
|
|
12258
12276
|
"ui.chat.composer.stop_work_hint": "Detener el trabajo actual de esta sesión (Esc)",
|
|
12259
12277
|
"ui.chat.composer.stop_agent": "Detener agente",
|
|
@@ -12304,8 +12322,9 @@ const esUiChatComposer = {
|
|
|
12304
12322
|
};
|
|
12305
12323
|
const esUiChatComposerMedia = {
|
|
12306
12324
|
"ui.chat.composer_media.recording": "Grabando",
|
|
12307
|
-
"ui.chat.composer_media.confirms": "
|
|
12325
|
+
"ui.chat.composer_media.confirms": "inserta",
|
|
12308
12326
|
"ui.chat.composer_media.cancels": "cancela",
|
|
12327
|
+
"ui.chat.composer_media.sends_now": "envía ahora",
|
|
12309
12328
|
"ui.chat.composer_media.pasted_type": "Pegado {mimeType}",
|
|
12310
12329
|
"ui.chat.composer_media.pasted_file": "Archivo pegado",
|
|
12311
12330
|
"ui.chat.composer_media.preview_failed": "No se pudo previsualizar",
|
|
@@ -16927,7 +16946,12 @@ const esUiSettingsAppearance = {
|
|
|
16927
16946
|
"ui.settings.appearance.theme.tokyo_night_storm": "La noche más brillante — cielos de tormenta índigo bajo los mismos acentos neón.",
|
|
16928
16947
|
"ui.settings.appearance.theme.tokyo_night": "Noche azul violácea profunda con un acento azul brillante.",
|
|
16929
16948
|
"ui.settings.appearance.theme.tron": "Circuitos cian eléctricos sobre el negro azulado de la Grid.",
|
|
16930
|
-
"ui.settings.appearance.theme.vaporwave": "Pasteles rosa empolvado y verde azulado desteñido sobre un morado profundo de centro comercial."
|
|
16949
|
+
"ui.settings.appearance.theme.vaporwave": "Pasteles rosa empolvado y verde azulado desteñido sobre un morado profundo de centro comercial.",
|
|
16950
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "Tamaño de la foto del agente",
|
|
16951
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "Tamaño de las fotos de los agentes en la transcripción y en la cabecera del chat. Las filas de la barra lateral mantienen su tamaño.",
|
|
16952
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "Pequeño",
|
|
16953
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "Mediano",
|
|
16954
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "Grande"
|
|
16931
16955
|
};
|
|
16932
16956
|
const esUiSettingsAppearanceWindowGlass = {
|
|
16933
16957
|
"ui.settings.appearance.window_glass.label": "Ventana translúcida",
|
|
@@ -17931,7 +17955,7 @@ const esUiTeamBridge = {
|
|
|
17931
17955
|
"ui.teamBridge.composer.placeholder_to": "Escribe a {name}",
|
|
17932
17956
|
"ui.teamBridge.thread.today": "Hoy",
|
|
17933
17957
|
"ui.teamBridge.thread.yesterday": "Ayer",
|
|
17934
|
-
"ui.teamBridge.builtin.general_topic": "Toda la organización: las personas y sus agentes. Los agentes
|
|
17958
|
+
"ui.teamBridge.builtin.general_topic": "Toda la organización: las personas y sus agentes. Los agentes ven todos los mensajes y responden si se les menciona con @ o en los hilos que siguen.",
|
|
17935
17959
|
"ui.teamBridge.builtin.humans_topic": "Solo personas, sin agentes. Cada mensaje notifica a todas las personas.",
|
|
17936
17960
|
"ui.teamBridge.builtin.agents_topic": "Los jefes de gabinete del equipo. Los agentes ven todos los mensajes y responden cuando es relevante o si se les menciona con @.",
|
|
17937
17961
|
"ui.teamBridge.section.channels_add": "Crear un canal",
|
|
@@ -18327,7 +18351,8 @@ const frUiAgentsAvatar = {
|
|
|
18327
18351
|
"ui.agents.avatar.editor.zoom": "Zoom",
|
|
18328
18352
|
"ui.agents.avatar.editor.zoom_in": "Zoom avant",
|
|
18329
18353
|
"ui.agents.avatar.editor.zoom_out": "Zoom arrière",
|
|
18330
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
18354
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
18355
|
+
"ui.agents.avatar.add_link": "Ajouter une photo pour {name}"
|
|
18331
18356
|
};
|
|
18332
18357
|
const frUiAgentsConfig = {
|
|
18333
18358
|
"ui.agents.config.about": "Concerne : {kind} {name}",
|
|
@@ -19948,6 +19973,11 @@ const frUiChatComposer = {
|
|
|
19948
19973
|
"ui.chat.composer.confirm_recording_hint": "Confirmer l’enregistrement (Entrée)",
|
|
19949
19974
|
"ui.chat.composer.cancel_recording": "Annuler l’enregistrement",
|
|
19950
19975
|
"ui.chat.composer.cancel_recording_hint": "Annuler l’enregistrement (Échap)",
|
|
19976
|
+
"ui.chat.composer.insert_transcript": "Insérer la transcription",
|
|
19977
|
+
"ui.chat.composer.insert_transcript_hint": "Insérer la transcription pour la relire (Entrée)",
|
|
19978
|
+
"ui.chat.composer.send_recording": "Envoyer l’enregistrement",
|
|
19979
|
+
"ui.chat.composer.send_recording_hint": "Transcrire et envoyer maintenant, sans relecture",
|
|
19980
|
+
"ui.chat.composer.steer_hint": "Orienter l’agent maintenant (Entrée) · Échap arrête le tour",
|
|
19951
19981
|
"ui.chat.composer.stop": "Arrêter",
|
|
19952
19982
|
"ui.chat.composer.stop_work_hint": "Arrêter le travail en cours de cette session (Échap)",
|
|
19953
19983
|
"ui.chat.composer.stop_agent": "Arrêter l’agent",
|
|
@@ -19998,8 +20028,9 @@ const frUiChatComposer = {
|
|
|
19998
20028
|
};
|
|
19999
20029
|
const frUiChatComposerMedia = {
|
|
20000
20030
|
"ui.chat.composer_media.recording": "Enregistrement",
|
|
20001
|
-
"ui.chat.composer_media.confirms": "
|
|
20031
|
+
"ui.chat.composer_media.confirms": "insère",
|
|
20002
20032
|
"ui.chat.composer_media.cancels": "annule",
|
|
20033
|
+
"ui.chat.composer_media.sends_now": "envoie maintenant",
|
|
20003
20034
|
"ui.chat.composer_media.pasted_type": "Collé : {mimeType}",
|
|
20004
20035
|
"ui.chat.composer_media.pasted_file": "Fichier collé",
|
|
20005
20036
|
"ui.chat.composer_media.preview_failed": "Aperçu impossible",
|
|
@@ -24621,7 +24652,12 @@ const frUiSettingsAppearance = {
|
|
|
24621
24652
|
"ui.settings.appearance.theme.tokyo_night_storm": "La nuit la plus lumineuse — ciel d’orage indigo sous les mêmes accents néon.",
|
|
24622
24653
|
"ui.settings.appearance.theme.tokyo_night": "Nuit bleu-violet profond avec un accent bleu vif.",
|
|
24623
24654
|
"ui.settings.appearance.theme.tron": "Circuits cyan électrique sur le bleu-noir de la Grid.",
|
|
24624
|
-
"ui.settings.appearance.theme.vaporwave": "Pastels rose poudré et bleu-vert délavé sur un violet de galerie marchande."
|
|
24655
|
+
"ui.settings.appearance.theme.vaporwave": "Pastels rose poudré et bleu-vert délavé sur un violet de galerie marchande.",
|
|
24656
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "Taille de la photo de l’agent",
|
|
24657
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "Taille des photos des agents dans la transcription et dans l’en-tête de conversation. Les lignes de la barre latérale gardent leur taille.",
|
|
24658
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "Petit",
|
|
24659
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "Moyen",
|
|
24660
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "Grand"
|
|
24625
24661
|
};
|
|
24626
24662
|
const frUiSettingsAppearanceWindowGlass = {
|
|
24627
24663
|
"ui.settings.appearance.window_glass.label": "Fenêtre translucide",
|
|
@@ -25625,7 +25661,7 @@ const frUiTeamBridge = {
|
|
|
25625
25661
|
"ui.teamBridge.composer.placeholder_to": "Écrire à {name}",
|
|
25626
25662
|
"ui.teamBridge.thread.today": "Aujourd’hui",
|
|
25627
25663
|
"ui.teamBridge.thread.yesterday": "Hier",
|
|
25628
|
-
"ui.teamBridge.builtin.general_topic": "Toute l’organisation
|
|
25664
|
+
"ui.teamBridge.builtin.general_topic": "Toute l’organisation : les personnes et leurs agents. Les agents voient chaque message et répondent quand on les mentionne avec @ ou dans les fils qu’ils suivent.",
|
|
25629
25665
|
"ui.teamBridge.builtin.humans_topic": "Personnes uniquement, sans agents. Les messages envoyés ici notifient chaque personne.",
|
|
25630
25666
|
"ui.teamBridge.builtin.agents_topic": "Les chefs de cabinet de toute l’équipe. Les agents voient chaque message et répondent quand c’est pertinent ou quand on les mentionne avec @.",
|
|
25631
25667
|
"ui.teamBridge.section.channels_add": "Créer un canal",
|
|
@@ -26021,7 +26057,8 @@ const hiUiAgentsAvatar = {
|
|
|
26021
26057
|
"ui.agents.avatar.editor.zoom": "ज़ूम",
|
|
26022
26058
|
"ui.agents.avatar.editor.zoom_in": "ज़ूम बढ़ाएँ",
|
|
26023
26059
|
"ui.agents.avatar.editor.zoom_out": "ज़ूम घटाएँ",
|
|
26024
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
26060
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
26061
|
+
"ui.agents.avatar.add_link": "{name} के लिए तस्वीर जोड़ें"
|
|
26025
26062
|
};
|
|
26026
26063
|
const hiUiAgentsConfig = {
|
|
26027
26064
|
"ui.agents.config.about": "{kind} {name} के बारे में",
|
|
@@ -27642,6 +27679,11 @@ const hiUiChatComposer = {
|
|
|
27642
27679
|
"ui.chat.composer.confirm_recording_hint": "रिकॉर्डिंग की पुष्टि करें (Enter)",
|
|
27643
27680
|
"ui.chat.composer.cancel_recording": "रिकॉर्डिंग रद्द करें",
|
|
27644
27681
|
"ui.chat.composer.cancel_recording_hint": "रिकॉर्डिंग रद्द करें (Esc)",
|
|
27682
|
+
"ui.chat.composer.insert_transcript": "ट्रांसक्रिप्ट डालें",
|
|
27683
|
+
"ui.chat.composer.insert_transcript_hint": "जाँचने के लिए ट्रांसक्रिप्ट डालें (Enter)",
|
|
27684
|
+
"ui.chat.composer.send_recording": "रिकॉर्डिंग भेजें",
|
|
27685
|
+
"ui.chat.composer.send_recording_hint": "अभी ट्रांसक्राइब करके भेजें, बिना जाँचे",
|
|
27686
|
+
"ui.chat.composer.steer_hint": "एजेंट को अभी दिशा दें (Enter) · Esc इस टर्न को रोकता है",
|
|
27645
27687
|
"ui.chat.composer.stop": "रोकें",
|
|
27646
27688
|
"ui.chat.composer.stop_work_hint": "इस सत्र का मौजूदा काम रोकें (Esc)",
|
|
27647
27689
|
"ui.chat.composer.stop_agent": "एजेंट रोकें",
|
|
@@ -27692,8 +27734,9 @@ const hiUiChatComposer = {
|
|
|
27692
27734
|
};
|
|
27693
27735
|
const hiUiChatComposerMedia = {
|
|
27694
27736
|
"ui.chat.composer_media.recording": "रिकॉर्डिंग",
|
|
27695
|
-
"ui.chat.composer_media.confirms": "
|
|
27737
|
+
"ui.chat.composer_media.confirms": "डालता है",
|
|
27696
27738
|
"ui.chat.composer_media.cancels": "रद्द करता है",
|
|
27739
|
+
"ui.chat.composer_media.sends_now": "अभी भेजता है",
|
|
27697
27740
|
"ui.chat.composer_media.pasted_type": "पेस्ट किया गया {mimeType}",
|
|
27698
27741
|
"ui.chat.composer_media.pasted_file": "पेस्ट की गई फ़ाइल",
|
|
27699
27742
|
"ui.chat.composer_media.preview_failed": "प्रीव्यू नहीं दिखाया जा सका",
|
|
@@ -32315,7 +32358,12 @@ const hiUiSettingsAppearance = {
|
|
|
32315
32358
|
"ui.settings.appearance.theme.tokyo_night_storm": "उजली रात — उसी नीयॉन एक्सेंट के नीचे इंडिगो तूफ़ानी आसमान।",
|
|
32316
32359
|
"ui.settings.appearance.theme.tokyo_night": "चमकीले नीले एक्सेंट के साथ गहरी नीली-बैंगनी रात।",
|
|
32317
32360
|
"ui.settings.appearance.theme.tron": "Grid की नीली-काली पृष्ठभूमि पर बिजली जैसी सायन सर्किटरी।",
|
|
32318
|
-
"ui.settings.appearance.theme.vaporwave": "गहरे मॉल-पर्पल पर धुँधले गुलाबी और फीके टील पेस्टल।"
|
|
32361
|
+
"ui.settings.appearance.theme.vaporwave": "गहरे मॉल-पर्पल पर धुँधले गुलाबी और फीके टील पेस्टल।",
|
|
32362
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "एजेंट की तस्वीर का आकार",
|
|
32363
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "ट्रांसक्रिप्ट और चैट हेडर में एजेंट की तस्वीरें कितनी बड़ी दिखें। साइडबार की पंक्तियों का आकार नहीं बदलता।",
|
|
32364
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "छोटा",
|
|
32365
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "मध्यम",
|
|
32366
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "बड़ा"
|
|
32319
32367
|
};
|
|
32320
32368
|
const hiUiSettingsAppearanceWindowGlass = {
|
|
32321
32369
|
"ui.settings.appearance.window_glass.label": "पारभासी विंडो",
|
|
@@ -33319,7 +33367,7 @@ const hiUiTeamBridge = {
|
|
|
33319
33367
|
"ui.teamBridge.composer.placeholder_to": "{name} को संदेश लिखें",
|
|
33320
33368
|
"ui.teamBridge.thread.today": "आज",
|
|
33321
33369
|
"ui.teamBridge.thread.yesterday": "कल",
|
|
33322
|
-
"ui.teamBridge.builtin.general_topic": "पूरा संगठन: सभी लोग और उनके एजेंट। एजेंट
|
|
33370
|
+
"ui.teamBridge.builtin.general_topic": "पूरा संगठन: सभी लोग और उनके एजेंट। एजेंट हर संदेश देखते हैं और @ से उल्लेख होने पर या अपने फ़ॉलो किए गए थ्रेड में जवाब देते हैं।",
|
|
33323
33371
|
"ui.teamBridge.builtin.humans_topic": "केवल लोग, कोई एजेंट नहीं। यहाँ के संदेशों की सूचना हर व्यक्ति को जाती है।",
|
|
33324
33372
|
"ui.teamBridge.builtin.agents_topic": "हर टीम सदस्य का चीफ़ ऑफ़ स्टाफ़। एजेंट हर संदेश देखते हैं और प्रासंगिक होने पर या @ से उल्लेख होने पर जवाब देते हैं।",
|
|
33325
33373
|
"ui.teamBridge.section.channels_add": "चैनल बनाएँ",
|
|
@@ -33715,7 +33763,8 @@ const ruUiAgentsAvatar = {
|
|
|
33715
33763
|
"ui.agents.avatar.editor.zoom": "Масштаб",
|
|
33716
33764
|
"ui.agents.avatar.editor.zoom_in": "Приблизить",
|
|
33717
33765
|
"ui.agents.avatar.editor.zoom_out": "Отдалить",
|
|
33718
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
33766
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
33767
|
+
"ui.agents.avatar.add_link": "Добавить фото агенту {name}"
|
|
33719
33768
|
};
|
|
33720
33769
|
const ruUiAgentsConfig = {
|
|
33721
33770
|
"ui.agents.config.about": "Контекст: {kind} {name}",
|
|
@@ -35321,6 +35370,11 @@ const ruUiChatComposer = {
|
|
|
35321
35370
|
"ui.chat.composer.attach_file": "Прикрепить файл",
|
|
35322
35371
|
"ui.chat.composer.cancel_recording": "Отменить запись",
|
|
35323
35372
|
"ui.chat.composer.cancel_recording_hint": "Отменить запись (Esc)",
|
|
35373
|
+
"ui.chat.composer.insert_transcript": "Вставить расшифровку",
|
|
35374
|
+
"ui.chat.composer.insert_transcript_hint": "Вставить расшифровку для проверки (Enter)",
|
|
35375
|
+
"ui.chat.composer.send_recording": "Отправить запись",
|
|
35376
|
+
"ui.chat.composer.send_recording_hint": "Расшифровать и отправить сразу, без проверки",
|
|
35377
|
+
"ui.chat.composer.steer_hint": "Направить агента сейчас (Enter) · Esc остановит ход",
|
|
35324
35378
|
"ui.chat.composer.clear_message": "Очистить сообщение",
|
|
35325
35379
|
"ui.chat.composer.confirm_recording": "Подтвердить запись",
|
|
35326
35380
|
"ui.chat.composer.confirm_recording_hint": "Подтвердить запись (Enter)",
|
|
@@ -35386,7 +35440,8 @@ const ruUiChatComposer = {
|
|
|
35386
35440
|
};
|
|
35387
35441
|
const ruUiChatComposerMedia = {
|
|
35388
35442
|
"ui.chat.composer_media.cancels": "отменяет",
|
|
35389
|
-
"ui.chat.composer_media.
|
|
35443
|
+
"ui.chat.composer_media.sends_now": "отправляет сразу",
|
|
35444
|
+
"ui.chat.composer_media.confirms": "вставляет",
|
|
35390
35445
|
"ui.chat.composer_media.pasted_file": "Вставленный файл",
|
|
35391
35446
|
"ui.chat.composer_media.pasted_type": "Вставлено: {mimeType}",
|
|
35392
35447
|
"ui.chat.composer_media.preview_failed": "Не удалось показать",
|
|
@@ -40009,7 +40064,12 @@ const ruUiSettingsAppearance = {
|
|
|
40009
40064
|
"ui.settings.appearance.theme.tokyo_night_storm": "Более яркая ночь: грозовое небо индиго и те же неоновые акценты.",
|
|
40010
40065
|
"ui.settings.appearance.theme.tokyo_night": "Глубокая сине-фиолетовая ночь с ярким синим акцентом.",
|
|
40011
40066
|
"ui.settings.appearance.theme.tron": "Электрические циановые цепи на сине-чёрном фоне Сети.",
|
|
40012
|
-
"ui.settings.appearance.theme.vaporwave": "Пыльно-розовая и выцветшая бирюзовая пастель на глубоком фиолетовом фоне молла."
|
|
40067
|
+
"ui.settings.appearance.theme.vaporwave": "Пыльно-розовая и выцветшая бирюзовая пастель на глубоком фиолетовом фоне молла.",
|
|
40068
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "Размер фото агента",
|
|
40069
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "Размер фото агентов в транскрипте и в заголовке чата. Строки боковой панели остаются прежними.",
|
|
40070
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "Маленький",
|
|
40071
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "Средний",
|
|
40072
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "Большой"
|
|
40013
40073
|
};
|
|
40014
40074
|
const ruUiSettingsAppearanceWindowGlass = {
|
|
40015
40075
|
"ui.settings.appearance.window_glass.coverage_description": "Какие части окна становятся полупрозрачными. «Только боковые панели» оставляет разговор и страницы непрозрачными. «Всё приложение» также охватывает их и боковые панели; веб-страницы, документы и изображения внутри остаются непрозрачными.",
|
|
@@ -41013,7 +41073,7 @@ const ruUiTeamBridge = {
|
|
|
41013
41073
|
"ui.teamBridge.composer.placeholder_to": "Написать: {name}",
|
|
41014
41074
|
"ui.teamBridge.thread.today": "Сегодня",
|
|
41015
41075
|
"ui.teamBridge.thread.yesterday": "Вчера",
|
|
41016
|
-
"ui.teamBridge.builtin.general_topic": "Вся организация: люди и их агенты. Агенты
|
|
41076
|
+
"ui.teamBridge.builtin.general_topic": "Вся организация: люди и их агенты. Агенты видят все сообщения и отвечают, когда их упоминают через @ или в ветках, за которыми они следят.",
|
|
41017
41077
|
"ui.teamBridge.builtin.humans_topic": "Только люди, без агентов. Уведомления о сообщениях здесь получает каждый.",
|
|
41018
41078
|
"ui.teamBridge.builtin.agents_topic": "Координаторы всех участников команды. Агенты видят все сообщения и отвечают, когда это уместно или когда их упоминают через @.",
|
|
41019
41079
|
"ui.teamBridge.section.channels_add": "Создать канал",
|
|
@@ -41409,7 +41469,8 @@ const urUiAgentsAvatar = {
|
|
|
41409
41469
|
"ui.agents.avatar.editor.zoom": "زوم",
|
|
41410
41470
|
"ui.agents.avatar.editor.zoom_in": "زوم بڑھائیں",
|
|
41411
41471
|
"ui.agents.avatar.editor.zoom_out": "زوم گھٹائیں",
|
|
41412
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
41472
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
41473
|
+
"ui.agents.avatar.add_link": "{name} کے لیے تصویر شامل کریں"
|
|
41413
41474
|
};
|
|
41414
41475
|
const urUiAgentsConfig = {
|
|
41415
41476
|
"ui.agents.config.about": "متعلق: {kind} {name}",
|
|
@@ -43030,6 +43091,11 @@ const urUiChatComposer = {
|
|
|
43030
43091
|
"ui.chat.composer.confirm_recording_hint": "ریکارڈنگ کی تصدیق کریں (Enter)",
|
|
43031
43092
|
"ui.chat.composer.cancel_recording": "ریکارڈنگ منسوخ کریں",
|
|
43032
43093
|
"ui.chat.composer.cancel_recording_hint": "ریکارڈنگ منسوخ کریں (Esc)",
|
|
43094
|
+
"ui.chat.composer.insert_transcript": "ٹرانسکرپٹ داخل کریں",
|
|
43095
|
+
"ui.chat.composer.insert_transcript_hint": "جانچنے کے لیے ٹرانسکرپٹ داخل کریں (Enter)",
|
|
43096
|
+
"ui.chat.composer.send_recording": "ریکارڈنگ بھیجیں",
|
|
43097
|
+
"ui.chat.composer.send_recording_hint": "ٹرانسکرائب کر کے ابھی بھیجیں، جانچے بغیر",
|
|
43098
|
+
"ui.chat.composer.steer_hint": "ایجنٹ کو ابھی ہدایت دیں (Enter) · Esc موجودہ باری روکتا ہے",
|
|
43033
43099
|
"ui.chat.composer.stop": "روکیں",
|
|
43034
43100
|
"ui.chat.composer.stop_work_hint": "اس سیشن کا موجودہ کام روکیں (Esc)",
|
|
43035
43101
|
"ui.chat.composer.stop_agent": "ایجنٹ روکیں",
|
|
@@ -43080,8 +43146,9 @@ const urUiChatComposer = {
|
|
|
43080
43146
|
};
|
|
43081
43147
|
const urUiChatComposerMedia = {
|
|
43082
43148
|
"ui.chat.composer_media.recording": "ریکارڈنگ جاری ہے",
|
|
43083
|
-
"ui.chat.composer_media.confirms": "
|
|
43149
|
+
"ui.chat.composer_media.confirms": "داخل کرے",
|
|
43084
43150
|
"ui.chat.composer_media.cancels": "منسوخ کرے",
|
|
43151
|
+
"ui.chat.composer_media.sends_now": "ابھی بھیجے",
|
|
43085
43152
|
"ui.chat.composer_media.pasted_type": "چسپاں کردہ {mimeType}",
|
|
43086
43153
|
"ui.chat.composer_media.pasted_file": "چسپاں کردہ فائل",
|
|
43087
43154
|
"ui.chat.composer_media.preview_failed": "پیش منظر نہیں دکھایا جا سکا",
|
|
@@ -47703,7 +47770,12 @@ const urUiSettingsAppearance = {
|
|
|
47703
47770
|
"ui.settings.appearance.theme.tokyo_night_storm": "روشن تر رات — وہی نیون نمایاں رنگ، نیلے طوفانی آسمان کے نیچے۔",
|
|
47704
47771
|
"ui.settings.appearance.theme.tokyo_night": "گہری نیلی بنفشی رات، روشن نیلے نمایاں رنگ کے ساتھ۔",
|
|
47705
47772
|
"ui.settings.appearance.theme.tron": "Grid کے نیلے سیاہ پر برقی سایان سرکٹری۔",
|
|
47706
|
-
"ui.settings.appearance.theme.vaporwave": "گہرے مال جیسے بنفشی رنگ پر دھندلے گلابی اور مند ٹیل پیسٹل۔"
|
|
47773
|
+
"ui.settings.appearance.theme.vaporwave": "گہرے مال جیسے بنفشی رنگ پر دھندلے گلابی اور مند ٹیل پیسٹل۔",
|
|
47774
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "ایجنٹ کی تصویر کا سائز",
|
|
47775
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "ٹرانسکرپٹ اور چیٹ ہیڈر میں ایجنٹ کی تصویریں کتنی بڑی نظر آئیں۔ سائیڈ بار کی قطاروں کا سائز وہی رہتا ہے۔",
|
|
47776
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "چھوٹا",
|
|
47777
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "درمیانہ",
|
|
47778
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "بڑا"
|
|
47707
47779
|
};
|
|
47708
47780
|
const urUiSettingsAppearanceWindowGlass = {
|
|
47709
47781
|
"ui.settings.appearance.window_glass.label": "نیم شفاف ونڈو",
|
|
@@ -48707,7 +48779,7 @@ const urUiTeamBridge = {
|
|
|
48707
48779
|
"ui.teamBridge.composer.placeholder_to": "{name} کو پیغام لکھیں",
|
|
48708
48780
|
"ui.teamBridge.thread.today": "آج",
|
|
48709
48781
|
"ui.teamBridge.thread.yesterday": "گزشتہ روز",
|
|
48710
|
-
"ui.teamBridge.builtin.general_topic": "پوری تنظیم: تمام لوگ اور ان کے ایجنٹ۔ ایجنٹ
|
|
48782
|
+
"ui.teamBridge.builtin.general_topic": "پوری تنظیم: تمام لوگ اور ان کے ایجنٹ۔ ایجنٹ ہر پیغام دیکھتے ہیں اور @ کے ساتھ ذکر ہونے پر یا اپنے فالو کیے گئے تھریڈز میں جواب دیتے ہیں۔",
|
|
48711
48783
|
"ui.teamBridge.builtin.humans_topic": "صرف لوگ، کوئی ایجنٹ نہیں۔ یہاں کے پیغامات کی اطلاع ہر شخص کو جاتی ہے۔",
|
|
48712
48784
|
"ui.teamBridge.builtin.agents_topic": "ٹیم کے ہر رکن کا چیف آف اسٹاف۔ ایجنٹ ہر پیغام دیکھتے ہیں اور متعلقہ ہونے پر یا @ کے ساتھ ذکر ہونے پر جواب دیتے ہیں۔",
|
|
48713
48785
|
"ui.teamBridge.section.channels_add": "چینل بنائیں",
|
|
@@ -49103,7 +49175,8 @@ const viUiAgentsAvatar = {
|
|
|
49103
49175
|
"ui.agents.avatar.editor.zoom": "Thu phóng",
|
|
49104
49176
|
"ui.agents.avatar.editor.zoom_in": "Phóng to",
|
|
49105
49177
|
"ui.agents.avatar.editor.zoom_out": "Thu nhỏ",
|
|
49106
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
49178
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
49179
|
+
"ui.agents.avatar.add_link": "Thêm ảnh cho {name}"
|
|
49107
49180
|
};
|
|
49108
49181
|
const viUiAgentsConfig = {
|
|
49109
49182
|
"ui.agents.config.about": "Về {kind} {name}",
|
|
@@ -50713,6 +50786,11 @@ const viUiChatComposer = {
|
|
|
50713
50786
|
"ui.chat.composer.confirm_recording_hint": "Xác nhận ghi âm (Enter)",
|
|
50714
50787
|
"ui.chat.composer.cancel_recording": "Hủy ghi âm",
|
|
50715
50788
|
"ui.chat.composer.cancel_recording_hint": "Hủy ghi âm (Esc)",
|
|
50789
|
+
"ui.chat.composer.insert_transcript": "Chèn bản chép lời",
|
|
50790
|
+
"ui.chat.composer.insert_transcript_hint": "Chèn bản chép lời để xem lại (Enter)",
|
|
50791
|
+
"ui.chat.composer.send_recording": "Gửi bản ghi âm",
|
|
50792
|
+
"ui.chat.composer.send_recording_hint": "Chép lời và gửi ngay, không xem lại",
|
|
50793
|
+
"ui.chat.composer.steer_hint": "Định hướng tác nhân ngay (Enter) · Esc dừng lượt này",
|
|
50716
50794
|
"ui.chat.composer.stop": "Dừng",
|
|
50717
50795
|
"ui.chat.composer.stop_work_hint": "Dừng công việc hiện tại của phiên này (Esc)",
|
|
50718
50796
|
"ui.chat.composer.stop_agent": "Dừng tác nhân",
|
|
@@ -50774,8 +50852,9 @@ const viUiChatComposer = {
|
|
|
50774
50852
|
};
|
|
50775
50853
|
const viUiChatComposerMedia = {
|
|
50776
50854
|
"ui.chat.composer_media.recording": "Đang ghi âm",
|
|
50777
|
-
"ui.chat.composer_media.confirms": "
|
|
50855
|
+
"ui.chat.composer_media.confirms": "chèn",
|
|
50778
50856
|
"ui.chat.composer_media.cancels": "hủy",
|
|
50857
|
+
"ui.chat.composer_media.sends_now": "gửi ngay",
|
|
50779
50858
|
"ui.chat.composer_media.pasted_type": "Đã dán {mimeType}",
|
|
50780
50859
|
"ui.chat.composer_media.pasted_file": "Tệp đã dán",
|
|
50781
50860
|
"ui.chat.composer_media.preview_failed": "Không xem trước được",
|
|
@@ -55397,7 +55476,12 @@ const viUiSettingsAppearance = {
|
|
|
55397
55476
|
"ui.settings.appearance.theme.tokyo_night_storm": "Đêm sáng hơn — bầu trời bão chàm dưới các điểm nhấn neon.",
|
|
55398
55477
|
"ui.settings.appearance.theme.tokyo_night": "Đêm xanh tím sâu với điểm nhấn xanh sáng.",
|
|
55399
55478
|
"ui.settings.appearance.theme.tron": "Mạch điện cyan trên nền đen xanh của Grid.",
|
|
55400
|
-
"ui.settings.appearance.theme.vaporwave": "Pastel hồng phai và xanh mòng két nhạt trên nền tím trung tâm thương mại đậm."
|
|
55479
|
+
"ui.settings.appearance.theme.vaporwave": "Pastel hồng phai và xanh mòng két nhạt trên nền tím trung tâm thương mại đậm.",
|
|
55480
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "Kích thước ảnh tác nhân",
|
|
55481
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "Kích thước ảnh tác nhân trong nội dung cuộc trò chuyện và trên thanh tiêu đề cuộc trò chuyện. Các hàng ở thanh bên giữ nguyên kích thước.",
|
|
55482
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "Nhỏ",
|
|
55483
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "Vừa",
|
|
55484
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "Lớn"
|
|
55401
55485
|
};
|
|
55402
55486
|
const viUiSettingsAppearanceWindowGlass = {
|
|
55403
55487
|
"ui.settings.appearance.window_glass.label": "Cửa sổ trong mờ",
|
|
@@ -56401,7 +56485,7 @@ const viUiTeamBridge = {
|
|
|
56401
56485
|
"ui.teamBridge.composer.placeholder_to": "Nhắn tin cho {name}",
|
|
56402
56486
|
"ui.teamBridge.thread.today": "Hôm nay",
|
|
56403
56487
|
"ui.teamBridge.thread.yesterday": "Hôm qua",
|
|
56404
|
-
"ui.teamBridge.builtin.general_topic": "Toàn bộ tổ chức: mọi người và tác nhân của họ. Tác nhân
|
|
56488
|
+
"ui.teamBridge.builtin.general_topic": "Toàn bộ tổ chức: mọi người và tác nhân của họ. Tác nhân xem mọi tin nhắn và trả lời khi được nhắc đến bằng @ hoặc trong các chuỗi họ theo dõi.",
|
|
56405
56489
|
"ui.teamBridge.builtin.humans_topic": "Chỉ con người, không có tác nhân. Tin nhắn ở đây sẽ gửi thông báo đến từng người.",
|
|
56406
56490
|
"ui.teamBridge.builtin.agents_topic": "Chánh văn phòng của mọi đồng nghiệp. Tác nhân xem mọi tin nhắn và trả lời khi có liên quan hoặc khi được nhắc đến bằng @.",
|
|
56407
56491
|
"ui.teamBridge.section.channels_add": "Tạo kênh",
|
|
@@ -56797,7 +56881,8 @@ const zhCNUiAgentsAvatar = {
|
|
|
56797
56881
|
"ui.agents.avatar.editor.zoom": "缩放",
|
|
56798
56882
|
"ui.agents.avatar.editor.zoom_in": "放大",
|
|
56799
56883
|
"ui.agents.avatar.editor.zoom_out": "缩小",
|
|
56800
|
-
"ui.agents.avatar.editor.zoom_value": "{value}×"
|
|
56884
|
+
"ui.agents.avatar.editor.zoom_value": "{value}×",
|
|
56885
|
+
"ui.agents.avatar.add_link": "为 {name} 添加头像"
|
|
56801
56886
|
};
|
|
56802
56887
|
const zhCNUiAgentsConfig = {
|
|
56803
56888
|
"ui.agents.config.about": "关于{kind} {name}",
|
|
@@ -58407,6 +58492,11 @@ const zhCNUiChatComposer = {
|
|
|
58407
58492
|
"ui.chat.composer.confirm_recording_hint": "确认录音(Enter)",
|
|
58408
58493
|
"ui.chat.composer.cancel_recording": "取消录音",
|
|
58409
58494
|
"ui.chat.composer.cancel_recording_hint": "取消录音(Esc)",
|
|
58495
|
+
"ui.chat.composer.insert_transcript": "插入转写文字",
|
|
58496
|
+
"ui.chat.composer.insert_transcript_hint": "插入转写文字以供查看(Enter)",
|
|
58497
|
+
"ui.chat.composer.send_recording": "发送录音",
|
|
58498
|
+
"ui.chat.composer.send_recording_hint": "转写并立即发送,无需查看",
|
|
58499
|
+
"ui.chat.composer.steer_hint": "立即引导智能体(Enter)· Esc停止本轮",
|
|
58410
58500
|
"ui.chat.composer.stop": "停止",
|
|
58411
58501
|
"ui.chat.composer.stop_work_hint": "停止此会话当前的工作(Esc)",
|
|
58412
58502
|
"ui.chat.composer.stop_agent": "停止智能体",
|
|
@@ -58468,8 +58558,9 @@ const zhCNUiChatComposer = {
|
|
|
58468
58558
|
};
|
|
58469
58559
|
const zhCNUiChatComposerMedia = {
|
|
58470
58560
|
"ui.chat.composer_media.recording": "录音中",
|
|
58471
|
-
"ui.chat.composer_media.confirms": "
|
|
58561
|
+
"ui.chat.composer_media.confirms": "插入",
|
|
58472
58562
|
"ui.chat.composer_media.cancels": "取消",
|
|
58563
|
+
"ui.chat.composer_media.sends_now": "立即发送",
|
|
58473
58564
|
"ui.chat.composer_media.pasted_type": "粘贴的{mimeType}",
|
|
58474
58565
|
"ui.chat.composer_media.pasted_file": "粘贴的文件",
|
|
58475
58566
|
"ui.chat.composer_media.preview_failed": "无法预览",
|
|
@@ -63091,7 +63182,12 @@ const zhCNUiSettingsAppearance = {
|
|
|
63091
63182
|
"ui.settings.appearance.theme.tokyo_night_storm": "更明亮的夜晚——靛蓝暴风雨天空,衬以同样的霓虹强调色。",
|
|
63092
63183
|
"ui.settings.appearance.theme.tokyo_night": "深蓝紫夜色,点缀明亮蓝色。",
|
|
63093
63184
|
"ui.settings.appearance.theme.tron": "电光青色的电路,铺在Grid的蓝黑底色上。",
|
|
63094
|
-
"ui.settings.appearance.theme.vaporwave": "灰粉与褪色青绿粉彩,铺在深商场紫底色上。"
|
|
63185
|
+
"ui.settings.appearance.theme.vaporwave": "灰粉与褪色青绿粉彩,铺在深商场紫底色上。",
|
|
63186
|
+
"ui.settings.appearance.agent_avatar_size_setting.agent_picture_size": "智能体头像大小",
|
|
63187
|
+
"ui.settings.appearance.agent_avatar_size_setting.how_large_the_agent_s_picture_appears_in_the_chat_window_and_the_chat": "智能体头像在对话记录和聊天标题栏中的显示大小。侧边栏各行保持不变。",
|
|
63188
|
+
"ui.settings.appearance.agent_avatar_size_setting.small": "小",
|
|
63189
|
+
"ui.settings.appearance.agent_avatar_size_setting.medium": "中",
|
|
63190
|
+
"ui.settings.appearance.agent_avatar_size_setting.large": "大"
|
|
63095
63191
|
};
|
|
63096
63192
|
const zhCNUiSettingsAppearanceWindowGlass = {
|
|
63097
63193
|
"ui.settings.appearance.window_glass.label": "半透明窗口",
|
|
@@ -64095,7 +64191,7 @@ const zhCNUiTeamBridge = {
|
|
|
64095
64191
|
"ui.teamBridge.composer.placeholder_to": "给{name}发消息",
|
|
64096
64192
|
"ui.teamBridge.thread.today": "今天",
|
|
64097
64193
|
"ui.teamBridge.thread.yesterday": "昨天",
|
|
64098
|
-
"ui.teamBridge.builtin.general_topic": "
|
|
64194
|
+
"ui.teamBridge.builtin.general_topic": "整个组织:所有人及其智能体。智能体会看到每条消息,并在被@提及时或在其关注的话题中回复。",
|
|
64099
64195
|
"ui.teamBridge.builtin.humans_topic": "仅限人员,没有智能体。在此发送的消息会通知每个人。",
|
|
64100
64196
|
"ui.teamBridge.builtin.agents_topic": "每位团队成员的首席助理。智能体会看到每条消息,并在相关或被@提及时回复。",
|
|
64101
64197
|
"ui.teamBridge.section.channels_add": "创建频道",
|
|
@@ -74410,9 +74506,9 @@ function evaluatePendingServerUpdateMarker(input) {
|
|
|
74410
74506
|
return { kind: "expired", marker, reason: "gone" };
|
|
74411
74507
|
}
|
|
74412
74508
|
const recorded = marker.groupStartedAt;
|
|
74413
|
-
const
|
|
74414
|
-
if (recorded &&
|
|
74415
|
-
return recorded ===
|
|
74509
|
+
const live2 = input.liveGroupStamp ?? null;
|
|
74510
|
+
if (recorded && live2) {
|
|
74511
|
+
return recorded === live2 ? { kind: "running", marker, reason: "owned" } : { kind: "expired", marker, reason: "foreign-pid" };
|
|
74416
74512
|
}
|
|
74417
74513
|
const deadline2 = Date.parse(marker.deadlineAt ?? "");
|
|
74418
74514
|
const now = input.now ?? Date.now();
|
|
@@ -76414,7 +76510,10 @@ const mediaRequestSchema = zod.z.discriminatedUnion("op", [
|
|
|
76414
76510
|
zod.z.object({
|
|
76415
76511
|
op: zod.z.literal("agent.avatar"),
|
|
76416
76512
|
agentId: id,
|
|
76417
|
-
sha256: zod.z.string().regex(/^[0-9a-f]{64}$/)
|
|
76513
|
+
sha256: zod.z.string().regex(/^[0-9a-f]{64}$/),
|
|
76514
|
+
// Closed to core's three derivatives (`agent_avatar_sizes`), so the
|
|
76515
|
+
// renderer cannot make main build an arbitrary query.
|
|
76516
|
+
size: zod.z.union([zod.z.literal(64), zod.z.literal(128), zod.z.literal(256)]).optional()
|
|
76418
76517
|
}).strict(),
|
|
76419
76518
|
zod.z.object({ op: zod.z.literal("agent.avatar.put"), agentId: id }).strict(),
|
|
76420
76519
|
zod.z.object({ op: zod.z.literal("agent.avatar.delete"), agentId: id }).strict(),
|
|
@@ -76611,7 +76710,10 @@ function endpoint(request) {
|
|
|
76611
76710
|
return { path: `/v1/agents/${request.agentId}/export`, method: "GET" };
|
|
76612
76711
|
case "agent.avatar":
|
|
76613
76712
|
return {
|
|
76614
|
-
path: `/v1/agents/${request.agentId}/avatar?${new URLSearchParams({
|
|
76713
|
+
path: `/v1/agents/${request.agentId}/avatar?${new URLSearchParams({
|
|
76714
|
+
v: request.sha256,
|
|
76715
|
+
...request.size ? { size: String(request.size) } : {}
|
|
76716
|
+
})}`,
|
|
76615
76717
|
method: "GET"
|
|
76616
76718
|
};
|
|
76617
76719
|
case "agent.avatar.put":
|
|
@@ -78761,14 +78863,14 @@ async function smokeEnvironment(venv, env) {
|
|
|
78761
78863
|
["serve", "--host", "127.0.0.1", "--port", String(address.port)],
|
|
78762
78864
|
{ env: isolated, stdio: "ignore" }
|
|
78763
78865
|
);
|
|
78764
|
-
let
|
|
78866
|
+
let failed2 = null;
|
|
78765
78867
|
child.on("error", (error) => {
|
|
78766
|
-
|
|
78868
|
+
failed2 = error;
|
|
78767
78869
|
});
|
|
78768
78870
|
try {
|
|
78769
78871
|
const deadline2 = Date.now() + 6e4;
|
|
78770
78872
|
while (Date.now() < deadline2) {
|
|
78771
|
-
if (
|
|
78873
|
+
if (failed2) throw failed2;
|
|
78772
78874
|
if (child.exitCode !== null)
|
|
78773
78875
|
throw new Error(`Backend smoke exited with ${child.exitCode}`);
|
|
78774
78876
|
try {
|
|
@@ -84519,7 +84621,10 @@ const HOST_CAPABILITIES = [
|
|
|
84519
84621
|
"record_stop",
|
|
84520
84622
|
// Sized recording (width/height on record_start) is not a method; the
|
|
84521
84623
|
// harness capability-gates the two params on this name.
|
|
84522
|
-
"record_size"
|
|
84624
|
+
"record_size",
|
|
84625
|
+
// High-quality recording (quality on record_start) is not a method either; the
|
|
84626
|
+
// harness capability-gates the one param on this name.
|
|
84627
|
+
"record_quality"
|
|
84523
84628
|
];
|
|
84524
84629
|
const RUN_DIRNAME = path$1.join("run", "ui-browser");
|
|
84525
84630
|
const STATE_FILENAME = "host.json";
|
|
@@ -91955,18 +92060,18 @@ const CELL_BUDGET = 64 * 1024 * 1024;
|
|
|
91955
92060
|
const MANAGED_BUDGET_BYTES = 768 * 1024 * 1024;
|
|
91956
92061
|
const CELL_RESERVATION_BYTES = 16;
|
|
91957
92062
|
const EXIT_ACK_GRACE_MS = 3e4;
|
|
91958
|
-
function bounded(value, fallback, low, high) {
|
|
92063
|
+
function bounded$1(value, fallback, low, high) {
|
|
91959
92064
|
return typeof value === "number" && Number.isFinite(value) ? Math.max(low, Math.min(high, Math.floor(value))) : fallback;
|
|
91960
92065
|
}
|
|
91961
92066
|
function consolePolicy(value = {}) {
|
|
91962
92067
|
const input = value && typeof value === "object" ? value : {};
|
|
91963
|
-
const maxLive = bounded(input.max_live, DEFAULT_LIVE_LIMIT, 32, 256);
|
|
92068
|
+
const maxLive = bounded$1(input.max_live, DEFAULT_LIVE_LIMIT, 32, 256);
|
|
91964
92069
|
return {
|
|
91965
92070
|
maxLive,
|
|
91966
|
-
maxOwner: bounded(input.max_owner, DEFAULT_OWNER_LIMIT, 1, 32),
|
|
92071
|
+
maxOwner: bounded$1(input.max_owner, DEFAULT_OWNER_LIMIT, 1, 32),
|
|
91967
92072
|
userReserved: Math.min(
|
|
91968
92073
|
Math.floor(maxLive / 4),
|
|
91969
|
-
bounded(input.user_reserved, DEFAULT_USER_RESERVED, 4, 32)
|
|
92074
|
+
bounded$1(input.user_reserved, DEFAULT_USER_RESERVED, 4, 32)
|
|
91970
92075
|
)
|
|
91971
92076
|
};
|
|
91972
92077
|
}
|
|
@@ -94767,12 +94872,12 @@ class ConsoleHost {
|
|
|
94767
94872
|
*/
|
|
94768
94873
|
bumpExitEpoch(entry) {
|
|
94769
94874
|
const surface = entry.record.surface;
|
|
94770
|
-
const
|
|
94875
|
+
const live2 = this.exitEpoch.get(surface) ?? 0;
|
|
94771
94876
|
const next = this.options.history?.nextExitEpoch(
|
|
94772
94877
|
entry.record.sessionId,
|
|
94773
94878
|
surface,
|
|
94774
|
-
|
|
94775
|
-
) ??
|
|
94879
|
+
live2
|
|
94880
|
+
) ?? live2 + 1;
|
|
94776
94881
|
this.exitEpoch.set(surface, next);
|
|
94777
94882
|
return next;
|
|
94778
94883
|
}
|
|
@@ -95508,8 +95613,8 @@ class ConsoleHistory {
|
|
|
95508
95613
|
* backwards — two exits sharing one generation is exactly the collision the
|
|
95509
95614
|
* counter exists to make impossible (§12.3).
|
|
95510
95615
|
*/
|
|
95511
|
-
nextExitEpoch(sessionId2, surface,
|
|
95512
|
-
return Math.max(this.exitEpoch(sessionId2, surface),
|
|
95616
|
+
nextExitEpoch(sessionId2, surface, live2) {
|
|
95617
|
+
return Math.max(this.exitEpoch(sessionId2, surface), live2) + 1;
|
|
95513
95618
|
}
|
|
95514
95619
|
/** Remove one surface's history, log and sidecar. */
|
|
95515
95620
|
remove(sessionId2, surface) {
|
|
@@ -96806,6 +96911,259 @@ function labelOf(account) {
|
|
|
96806
96911
|
if (!account) return "an unnamed passkey";
|
|
96807
96912
|
return account.displayName || account.name || "an unnamed passkey";
|
|
96808
96913
|
}
|
|
96914
|
+
const RECORDING_ENCODER_CMD_CHANNEL = "recording-encoder:cmd";
|
|
96915
|
+
const RECORDING_ENCODER_EVT_CHANNEL = "recording-encoder:evt";
|
|
96916
|
+
function isWellFormedChunk(event) {
|
|
96917
|
+
return event.data instanceof Uint8Array && Number.isFinite(event.ts) && typeof event.key === "boolean" && (event.description === void 0 || event.description instanceof Uint8Array);
|
|
96918
|
+
}
|
|
96919
|
+
function answersTheRequest(event, asked) {
|
|
96920
|
+
return asked !== void 0 && event.width === asked.width && event.height === asked.height && (event.encoder === "hardware" || event.encoder === "software");
|
|
96921
|
+
}
|
|
96922
|
+
function errorData(error) {
|
|
96923
|
+
return error instanceof BridgeCommandError ? error.data : {};
|
|
96924
|
+
}
|
|
96925
|
+
const UNRESPONSIVE_GRACE_MS = 5e3;
|
|
96926
|
+
const live = /* @__PURE__ */ new Set();
|
|
96927
|
+
function disposeAllRecordingEncoders() {
|
|
96928
|
+
for (const dispose of [...live]) {
|
|
96929
|
+
try {
|
|
96930
|
+
dispose();
|
|
96931
|
+
} catch {
|
|
96932
|
+
}
|
|
96933
|
+
}
|
|
96934
|
+
}
|
|
96935
|
+
const routes = /* @__PURE__ */ new Map();
|
|
96936
|
+
let listening = false;
|
|
96937
|
+
function listen() {
|
|
96938
|
+
if (listening) return;
|
|
96939
|
+
listening = true;
|
|
96940
|
+
electron.ipcMain.on(RECORDING_ENCODER_EVT_CHANNEL, (event, message) => {
|
|
96941
|
+
const route = routes.get(event.sender.id);
|
|
96942
|
+
if (!route) return;
|
|
96943
|
+
if (event.senderFrame && event.senderFrame !== event.sender.mainFrame)
|
|
96944
|
+
return;
|
|
96945
|
+
if (!message || typeof message !== "object") return;
|
|
96946
|
+
route.handle(message);
|
|
96947
|
+
});
|
|
96948
|
+
}
|
|
96949
|
+
function createRecordingEncoderService(options) {
|
|
96950
|
+
return {
|
|
96951
|
+
open: (sink) => openWindow(options, sink)
|
|
96952
|
+
};
|
|
96953
|
+
}
|
|
96954
|
+
async function openWindow(options, sink) {
|
|
96955
|
+
listen();
|
|
96956
|
+
const partition = `recording-encoder-${node_crypto.randomUUID()}`;
|
|
96957
|
+
const childSession = electron.session.fromPartition(partition);
|
|
96958
|
+
childSession.setPermissionRequestHandler(
|
|
96959
|
+
(_contents, _permission, callback) => callback(false)
|
|
96960
|
+
);
|
|
96961
|
+
childSession.setPermissionCheckHandler(() => false);
|
|
96962
|
+
childSession.on("will-download", (event) => event.preventDefault());
|
|
96963
|
+
const window = new electron.BrowserWindow({
|
|
96964
|
+
// Never shown, focused or raised: `show: false` with Electron's default
|
|
96965
|
+
// `paintWhenInitiallyHidden` is the measured-working pair for the console
|
|
96966
|
+
// capture view, and an encoder needs no pixels of its own.
|
|
96967
|
+
show: false,
|
|
96968
|
+
width: 320,
|
|
96969
|
+
height: 240,
|
|
96970
|
+
webPreferences: {
|
|
96971
|
+
partition,
|
|
96972
|
+
preload: options.preloadPath,
|
|
96973
|
+
sandbox: true,
|
|
96974
|
+
contextIsolation: true,
|
|
96975
|
+
nodeIntegration: false,
|
|
96976
|
+
webSecurity: true,
|
|
96977
|
+
allowRunningInsecureContent: false,
|
|
96978
|
+
javascript: true,
|
|
96979
|
+
backgroundThrottling: false
|
|
96980
|
+
}
|
|
96981
|
+
});
|
|
96982
|
+
const contents = window.webContents;
|
|
96983
|
+
const windowId = contents.id;
|
|
96984
|
+
let disposed = false;
|
|
96985
|
+
const requested = /* @__PURE__ */ new Map();
|
|
96986
|
+
let unresponsiveTimer = null;
|
|
96987
|
+
const waiters = {
|
|
96988
|
+
ready: null,
|
|
96989
|
+
configure: /* @__PURE__ */ new Map(),
|
|
96990
|
+
flush: /* @__PURE__ */ new Map()
|
|
96991
|
+
};
|
|
96992
|
+
const failWaiters = (reason) => {
|
|
96993
|
+
const error = new BridgeCommandError("internal", reason, {
|
|
96994
|
+
reason: "record_failed"
|
|
96995
|
+
});
|
|
96996
|
+
waiters.ready?.reject(error);
|
|
96997
|
+
waiters.ready = null;
|
|
96998
|
+
for (const waiter of waiters.flush.values()) waiter.reject(error);
|
|
96999
|
+
waiters.flush.clear();
|
|
97000
|
+
for (const [, resolve] of waiters.configure) {
|
|
97001
|
+
resolve({ ok: false, why: "encoder_start", detail: reason });
|
|
97002
|
+
}
|
|
97003
|
+
waiters.configure.clear();
|
|
97004
|
+
};
|
|
97005
|
+
const dispose = () => {
|
|
97006
|
+
if (disposed) return;
|
|
97007
|
+
disposed = true;
|
|
97008
|
+
live.delete(dispose);
|
|
97009
|
+
routes.delete(windowId);
|
|
97010
|
+
if (unresponsiveTimer) clearTimeout(unresponsiveTimer);
|
|
97011
|
+
unresponsiveTimer = null;
|
|
97012
|
+
failWaiters("the encoder window was closed");
|
|
97013
|
+
try {
|
|
97014
|
+
if (!window.isDestroyed()) window.destroy();
|
|
97015
|
+
} catch {
|
|
97016
|
+
}
|
|
97017
|
+
try {
|
|
97018
|
+
void childSession.clearStorageData().catch(() => void 0);
|
|
97019
|
+
} catch {
|
|
97020
|
+
}
|
|
97021
|
+
};
|
|
97022
|
+
live.add(dispose);
|
|
97023
|
+
const died = (reason) => {
|
|
97024
|
+
if (disposed) return;
|
|
97025
|
+
options.log(`[browser] recording encoder window: ${reason}`);
|
|
97026
|
+
failWaiters(reason);
|
|
97027
|
+
sink.onFailure(reason);
|
|
97028
|
+
};
|
|
97029
|
+
routes.set(windowId, {
|
|
97030
|
+
windowId,
|
|
97031
|
+
handle: (event) => {
|
|
97032
|
+
if (disposed) return;
|
|
97033
|
+
switch (event.evt) {
|
|
97034
|
+
case "ready":
|
|
97035
|
+
waiters.ready?.resolve();
|
|
97036
|
+
waiters.ready = null;
|
|
97037
|
+
return;
|
|
97038
|
+
case "configured": {
|
|
97039
|
+
const resolve = waiters.configure.get(event.id);
|
|
97040
|
+
waiters.configure.delete(event.id);
|
|
97041
|
+
if (!resolve) return;
|
|
97042
|
+
const asked = requested.get(event.id);
|
|
97043
|
+
requested.delete(event.id);
|
|
97044
|
+
if (event.ok && !answersTheRequest(event, asked)) {
|
|
97045
|
+
resolve({
|
|
97046
|
+
ok: false,
|
|
97047
|
+
why: "encoder_start",
|
|
97048
|
+
detail: "the encoder answered with a size that was not asked for"
|
|
97049
|
+
});
|
|
97050
|
+
return;
|
|
97051
|
+
}
|
|
97052
|
+
resolve(
|
|
97053
|
+
event.ok ? {
|
|
97054
|
+
ok: true,
|
|
97055
|
+
encoder: event.encoder,
|
|
97056
|
+
codec: event.codec,
|
|
97057
|
+
width: event.width,
|
|
97058
|
+
height: event.height
|
|
97059
|
+
} : {
|
|
97060
|
+
ok: false,
|
|
97061
|
+
why: event.why,
|
|
97062
|
+
detail: String(event.detail).slice(0, 300)
|
|
97063
|
+
}
|
|
97064
|
+
);
|
|
97065
|
+
return;
|
|
97066
|
+
}
|
|
97067
|
+
case "chunk": {
|
|
97068
|
+
if (!isWellFormedChunk(event)) {
|
|
97069
|
+
died("the encoder sent a malformed chunk");
|
|
97070
|
+
return;
|
|
97071
|
+
}
|
|
97072
|
+
sink.onChunk({
|
|
97073
|
+
data: event.data,
|
|
97074
|
+
ts: event.ts,
|
|
97075
|
+
key: event.key,
|
|
97076
|
+
description: event.description
|
|
97077
|
+
});
|
|
97078
|
+
return;
|
|
97079
|
+
}
|
|
97080
|
+
case "frame-done":
|
|
97081
|
+
if (!Number.isInteger(event.seq)) return;
|
|
97082
|
+
sink.onFrameDone(event.seq);
|
|
97083
|
+
return;
|
|
97084
|
+
case "flushed": {
|
|
97085
|
+
const waiter = waiters.flush.get(event.id);
|
|
97086
|
+
waiters.flush.delete(event.id);
|
|
97087
|
+
waiter?.resolve();
|
|
97088
|
+
return;
|
|
97089
|
+
}
|
|
97090
|
+
case "error":
|
|
97091
|
+
died(`the encoder reported an error: ${event.message}`);
|
|
97092
|
+
return;
|
|
97093
|
+
}
|
|
97094
|
+
}
|
|
97095
|
+
});
|
|
97096
|
+
contents.setWindowOpenHandler(() => ({ action: "deny" }));
|
|
97097
|
+
const base = options.documentUrl.split("?")[0];
|
|
97098
|
+
const pin = (event, url) => {
|
|
97099
|
+
if (url.split("?")[0] !== base) event.preventDefault();
|
|
97100
|
+
};
|
|
97101
|
+
contents.on("will-navigate", pin);
|
|
97102
|
+
contents.on("will-redirect", pin);
|
|
97103
|
+
contents.on(
|
|
97104
|
+
"render-process-gone",
|
|
97105
|
+
(_event, details) => died(`the encoder process exited (${details?.reason ?? "unknown"})`)
|
|
97106
|
+
);
|
|
97107
|
+
contents.on("unresponsive", () => {
|
|
97108
|
+
if (unresponsiveTimer || disposed) return;
|
|
97109
|
+
unresponsiveTimer = setTimeout(() => {
|
|
97110
|
+
unresponsiveTimer = null;
|
|
97111
|
+
died("the encoder window stopped responding");
|
|
97112
|
+
}, UNRESPONSIVE_GRACE_MS);
|
|
97113
|
+
unresponsiveTimer.unref?.();
|
|
97114
|
+
});
|
|
97115
|
+
contents.on("responsive", () => {
|
|
97116
|
+
if (unresponsiveTimer) clearTimeout(unresponsiveTimer);
|
|
97117
|
+
unresponsiveTimer = null;
|
|
97118
|
+
});
|
|
97119
|
+
const send2 = (message) => {
|
|
97120
|
+
if (disposed || contents.isDestroyed()) return;
|
|
97121
|
+
contents.send(RECORDING_ENCODER_CMD_CHANNEL, message);
|
|
97122
|
+
};
|
|
97123
|
+
try {
|
|
97124
|
+
const ready = new Promise((resolve, reject) => {
|
|
97125
|
+
waiters.ready = { resolve, reject };
|
|
97126
|
+
});
|
|
97127
|
+
const loaded = contents.loadURL(options.documentUrl);
|
|
97128
|
+
await Promise.all([ready, loaded]);
|
|
97129
|
+
} catch (error) {
|
|
97130
|
+
dispose();
|
|
97131
|
+
throw error;
|
|
97132
|
+
}
|
|
97133
|
+
let configureId = 0;
|
|
97134
|
+
let flushId = 0;
|
|
97135
|
+
return {
|
|
97136
|
+
configure(request) {
|
|
97137
|
+
configureId += 1;
|
|
97138
|
+
const id2 = configureId;
|
|
97139
|
+
return new Promise((resolve) => {
|
|
97140
|
+
waiters.configure.set(id2, resolve);
|
|
97141
|
+
requested.set(id2, { width: request.width, height: request.height });
|
|
97142
|
+
send2({ cmd: "configure", id: id2, ...request });
|
|
97143
|
+
});
|
|
97144
|
+
},
|
|
97145
|
+
frame(seq2, data, ts) {
|
|
97146
|
+
send2({ cmd: "frame", seq: seq2, data, ts });
|
|
97147
|
+
},
|
|
97148
|
+
flush() {
|
|
97149
|
+
flushId += 1;
|
|
97150
|
+
const id2 = flushId;
|
|
97151
|
+
return new Promise((resolve, reject) => {
|
|
97152
|
+
if (disposed) {
|
|
97153
|
+
reject(
|
|
97154
|
+
new BridgeCommandError("internal", "the encoder window is gone", {
|
|
97155
|
+
reason: "record_failed"
|
|
97156
|
+
})
|
|
97157
|
+
);
|
|
97158
|
+
return;
|
|
97159
|
+
}
|
|
97160
|
+
waiters.flush.set(id2, { resolve, reject });
|
|
97161
|
+
send2({ cmd: "flush", id: id2 });
|
|
97162
|
+
});
|
|
97163
|
+
},
|
|
97164
|
+
dispose
|
|
97165
|
+
};
|
|
97166
|
+
}
|
|
96809
97167
|
const ADDRESS_LIST_ENV = "LOCAL_OPERATOR_UI_BROWSER_ADDRESS_OVERLAY_S2";
|
|
96810
97168
|
const ADDRESS_LIST_DOCUMENT = "browser-address-overlay-list.html";
|
|
96811
97169
|
const ADDRESS_LIST_HEADER_HEIGHT = 28;
|
|
@@ -98698,9 +99056,6 @@ function readJson(path2) {
|
|
|
98698
99056
|
return null;
|
|
98699
99057
|
}
|
|
98700
99058
|
}
|
|
98701
|
-
function errorData(error) {
|
|
98702
|
-
return error instanceof BridgeCommandError ? error.data : {};
|
|
98703
|
-
}
|
|
98704
99059
|
function nextSequence(queue) {
|
|
98705
99060
|
return (queue ?? []).reduce(
|
|
98706
99061
|
(highest, entry) => Math.max(highest, entry.sequence),
|
|
@@ -98737,10 +99092,10 @@ function consumableGrant(grants, origin, requester, now) {
|
|
|
98737
99092
|
}
|
|
98738
99093
|
function accessState(record, tombstones, storedAllowed, onceGrant, origin, requester, now) {
|
|
98739
99094
|
if (storedAllowed || onceGrant) return "allowed";
|
|
98740
|
-
const
|
|
98741
|
-
if (
|
|
98742
|
-
if (!
|
|
98743
|
-
return
|
|
99095
|
+
const live2 = activeRequest(record, now);
|
|
99096
|
+
if (live2 && live2.origin === origin && live2.requester === requester) {
|
|
99097
|
+
if (!live2.decision) return "pending";
|
|
99098
|
+
return live2.decision === "deny" ? "denied" : "allowed";
|
|
98744
99099
|
}
|
|
98745
99100
|
const tomb = tombstones?.[receiptKey(origin, requester)];
|
|
98746
99101
|
if (tomb && now < tomb.expiresAt) return "superseded";
|
|
@@ -99490,11 +99845,11 @@ class ApprovalStore {
|
|
|
99490
99845
|
* the cap) steps aside, and its requester gets a tombstone so its next poll
|
|
99491
99846
|
* reads "superseded" rather than the neutral "none". */
|
|
99492
99847
|
displaceOldest(now) {
|
|
99493
|
-
const
|
|
99494
|
-
if (!
|
|
99495
|
-
const displaced =
|
|
99848
|
+
const live2 = liveQueue(this.queue, now);
|
|
99849
|
+
if (!live2.length) return;
|
|
99850
|
+
const displaced = live2.slice(
|
|
99496
99851
|
0,
|
|
99497
|
-
Math.max(1,
|
|
99852
|
+
Math.max(1, live2.length - ACCESS_QUEUE_CAP + 1)
|
|
99498
99853
|
);
|
|
99499
99854
|
for (const entry of displaced) {
|
|
99500
99855
|
this.tombstones[receiptKey(entry.origin, entry.requester)] = tombstoneFor(
|
|
@@ -99519,8 +99874,8 @@ class ApprovalStore {
|
|
|
99519
99874
|
}
|
|
99520
99875
|
}
|
|
99521
99876
|
sweep(now) {
|
|
99522
|
-
const
|
|
99523
|
-
this.queue =
|
|
99877
|
+
const live2 = liveQueue(this.queue, now);
|
|
99878
|
+
this.queue = live2;
|
|
99524
99879
|
this.results = cleanResults(this.results, now);
|
|
99525
99880
|
for (const [origin, grant] of Object.entries(this.onceGrants)) {
|
|
99526
99881
|
if (now >= grant.expiresAt) delete this.onceGrants[origin];
|
|
@@ -101146,6 +101501,864 @@ function deadline(op, ms, what) {
|
|
|
101146
101501
|
);
|
|
101147
101502
|
});
|
|
101148
101503
|
}
|
|
101504
|
+
const TIMESCALE = 9e4;
|
|
101505
|
+
const MOVIE_TIMESCALE = 1e3;
|
|
101506
|
+
const MAX_FILE_BYTES = 4294967295;
|
|
101507
|
+
const u32 = (value) => {
|
|
101508
|
+
const out = Buffer.alloc(4);
|
|
101509
|
+
out.writeUInt32BE(value >>> 0);
|
|
101510
|
+
return out;
|
|
101511
|
+
};
|
|
101512
|
+
const u16 = (value) => {
|
|
101513
|
+
const out = Buffer.alloc(2);
|
|
101514
|
+
out.writeUInt16BE(value);
|
|
101515
|
+
return out;
|
|
101516
|
+
};
|
|
101517
|
+
const box = (type2, ...children) => {
|
|
101518
|
+
const body = Buffer.concat(children);
|
|
101519
|
+
return Buffer.concat([
|
|
101520
|
+
u32(8 + body.length),
|
|
101521
|
+
Buffer.from(type2, "latin1"),
|
|
101522
|
+
body
|
|
101523
|
+
]);
|
|
101524
|
+
};
|
|
101525
|
+
const fullBox = (type2, version, flags, ...children) => box(type2, u32(version << 24 | flags), ...children);
|
|
101526
|
+
const IDENTITY_MATRIX = Buffer.concat(
|
|
101527
|
+
[65536, 0, 0, 0, 65536, 0, 0, 0, 1073741824].map(u32)
|
|
101528
|
+
);
|
|
101529
|
+
function assertOffset(value, what) {
|
|
101530
|
+
if (!Number.isFinite(value) || value < 0 || value > MAX_FILE_BYTES) {
|
|
101531
|
+
throw new RangeError(
|
|
101532
|
+
`${what} does not fit a 32-bit MP4 field (${value}); the recording cap keeps clips far below this`
|
|
101533
|
+
);
|
|
101534
|
+
}
|
|
101535
|
+
}
|
|
101536
|
+
function decodeTimes(input) {
|
|
101537
|
+
const { samples } = input;
|
|
101538
|
+
const first = samples[0].ts;
|
|
101539
|
+
const out = [];
|
|
101540
|
+
for (const sample of samples) {
|
|
101541
|
+
const tick = Math.round((sample.ts - first) * TIMESCALE / 1e6);
|
|
101542
|
+
const previous = out[out.length - 1];
|
|
101543
|
+
if (previous !== void 0 && tick <= previous) {
|
|
101544
|
+
throw new RangeError(
|
|
101545
|
+
`sample timestamps must strictly increase (got tick ${tick} after ${previous})`
|
|
101546
|
+
);
|
|
101547
|
+
}
|
|
101548
|
+
out.push(tick);
|
|
101549
|
+
}
|
|
101550
|
+
return out;
|
|
101551
|
+
}
|
|
101552
|
+
function writeMp4(input) {
|
|
101553
|
+
const { samples, width, height, description } = input;
|
|
101554
|
+
if (samples.length === 0) {
|
|
101555
|
+
throw new RangeError("an MP4 needs at least one sample");
|
|
101556
|
+
}
|
|
101557
|
+
if (!samples[0].key) {
|
|
101558
|
+
throw new RangeError("the first sample must be a key frame");
|
|
101559
|
+
}
|
|
101560
|
+
const count = samples.length;
|
|
101561
|
+
const dts = decodeTimes(input);
|
|
101562
|
+
const lastHold = (() => {
|
|
101563
|
+
const fallback = Math.max(
|
|
101564
|
+
1,
|
|
101565
|
+
Math.round(input.fallbackFrameUs * TIMESCALE / 1e6)
|
|
101566
|
+
);
|
|
101567
|
+
if (input.endTs === void 0) return fallback;
|
|
101568
|
+
const endTick = Math.round(
|
|
101569
|
+
(input.endTs - samples[0].ts) * TIMESCALE / 1e6
|
|
101570
|
+
);
|
|
101571
|
+
return endTick > dts[count - 1] ? endTick - dts[count - 1] : fallback;
|
|
101572
|
+
})();
|
|
101573
|
+
const durations = dts.map(
|
|
101574
|
+
(tick, index) => index + 1 < count ? dts[index + 1] - tick : lastHold
|
|
101575
|
+
);
|
|
101576
|
+
const totalTicks = durations.reduce((sum, value) => sum + value, 0);
|
|
101577
|
+
const movieDuration = Math.round(totalTicks * MOVIE_TIMESCALE / TIMESCALE);
|
|
101578
|
+
let payload = 0;
|
|
101579
|
+
for (const sample of samples) payload += sample.data.length;
|
|
101580
|
+
assertOffset(payload + 8, "the media data size");
|
|
101581
|
+
const stts = (() => {
|
|
101582
|
+
const runs = [];
|
|
101583
|
+
for (const duration of durations) {
|
|
101584
|
+
const last = runs[runs.length - 1];
|
|
101585
|
+
if (last && last[1] === duration) last[0] += 1;
|
|
101586
|
+
else runs.push([1, duration]);
|
|
101587
|
+
}
|
|
101588
|
+
return fullBox(
|
|
101589
|
+
"stts",
|
|
101590
|
+
0,
|
|
101591
|
+
0,
|
|
101592
|
+
u32(runs.length),
|
|
101593
|
+
...runs.flatMap(([run, duration]) => [u32(run), u32(duration)])
|
|
101594
|
+
);
|
|
101595
|
+
})();
|
|
101596
|
+
const keyIndexes = samples.flatMap(
|
|
101597
|
+
(sample, index) => sample.key ? [u32(index + 1)] : []
|
|
101598
|
+
);
|
|
101599
|
+
const stss = fullBox("stss", 0, 0, u32(keyIndexes.length), ...keyIndexes);
|
|
101600
|
+
const stsc = fullBox("stsc", 0, 0, u32(1), u32(1), u32(count), u32(1));
|
|
101601
|
+
const stsz = fullBox(
|
|
101602
|
+
"stsz",
|
|
101603
|
+
0,
|
|
101604
|
+
0,
|
|
101605
|
+
u32(0),
|
|
101606
|
+
u32(count),
|
|
101607
|
+
...samples.map((sample) => u32(sample.data.length))
|
|
101608
|
+
);
|
|
101609
|
+
const sampleEntry = box(
|
|
101610
|
+
"avc1",
|
|
101611
|
+
Buffer.alloc(6),
|
|
101612
|
+
u16(1),
|
|
101613
|
+
Buffer.alloc(16),
|
|
101614
|
+
u16(width),
|
|
101615
|
+
u16(height),
|
|
101616
|
+
u32(4718592),
|
|
101617
|
+
u32(4718592),
|
|
101618
|
+
u32(0),
|
|
101619
|
+
u16(1),
|
|
101620
|
+
Buffer.alloc(32),
|
|
101621
|
+
u16(24),
|
|
101622
|
+
u16(65535),
|
|
101623
|
+
box("avcC", Buffer.from(description)),
|
|
101624
|
+
// nclx: primaries 1, transfer 1, matrix 1 (BT.709), then the full-range bit
|
|
101625
|
+
// in the top bit of a byte: 0 = limited.
|
|
101626
|
+
box(
|
|
101627
|
+
"colr",
|
|
101628
|
+
Buffer.from("nclx", "latin1"),
|
|
101629
|
+
u16(1),
|
|
101630
|
+
u16(1),
|
|
101631
|
+
u16(1),
|
|
101632
|
+
Buffer.from([0])
|
|
101633
|
+
)
|
|
101634
|
+
);
|
|
101635
|
+
const stsd = fullBox("stsd", 0, 0, u32(1), sampleEntry);
|
|
101636
|
+
const dinf = box(
|
|
101637
|
+
"dinf",
|
|
101638
|
+
fullBox("dref", 0, 0, u32(1), fullBox("url ", 0, 1))
|
|
101639
|
+
);
|
|
101640
|
+
const mdhd = fullBox(
|
|
101641
|
+
"mdhd",
|
|
101642
|
+
0,
|
|
101643
|
+
0,
|
|
101644
|
+
u32(0),
|
|
101645
|
+
u32(0),
|
|
101646
|
+
u32(TIMESCALE),
|
|
101647
|
+
u32(totalTicks),
|
|
101648
|
+
u16(21956),
|
|
101649
|
+
u16(0)
|
|
101650
|
+
);
|
|
101651
|
+
const hdlr = fullBox(
|
|
101652
|
+
"hdlr",
|
|
101653
|
+
0,
|
|
101654
|
+
0,
|
|
101655
|
+
u32(0),
|
|
101656
|
+
Buffer.from("vide", "latin1"),
|
|
101657
|
+
Buffer.alloc(12),
|
|
101658
|
+
Buffer.from("VideoHandler\0", "latin1")
|
|
101659
|
+
);
|
|
101660
|
+
const tkhd = fullBox(
|
|
101661
|
+
"tkhd",
|
|
101662
|
+
0,
|
|
101663
|
+
3,
|
|
101664
|
+
u32(0),
|
|
101665
|
+
u32(0),
|
|
101666
|
+
u32(1),
|
|
101667
|
+
u32(0),
|
|
101668
|
+
u32(movieDuration),
|
|
101669
|
+
Buffer.alloc(8),
|
|
101670
|
+
u16(0),
|
|
101671
|
+
u16(0),
|
|
101672
|
+
u16(0),
|
|
101673
|
+
u16(0),
|
|
101674
|
+
IDENTITY_MATRIX,
|
|
101675
|
+
u32(width << 16),
|
|
101676
|
+
u32(height << 16)
|
|
101677
|
+
);
|
|
101678
|
+
const mvhd = fullBox(
|
|
101679
|
+
"mvhd",
|
|
101680
|
+
0,
|
|
101681
|
+
0,
|
|
101682
|
+
u32(0),
|
|
101683
|
+
u32(0),
|
|
101684
|
+
u32(MOVIE_TIMESCALE),
|
|
101685
|
+
u32(movieDuration),
|
|
101686
|
+
u32(65536),
|
|
101687
|
+
u16(256),
|
|
101688
|
+
Buffer.alloc(10),
|
|
101689
|
+
IDENTITY_MATRIX,
|
|
101690
|
+
Buffer.alloc(24),
|
|
101691
|
+
u32(2)
|
|
101692
|
+
);
|
|
101693
|
+
const ftyp = box(
|
|
101694
|
+
"ftyp",
|
|
101695
|
+
Buffer.from("isom", "latin1"),
|
|
101696
|
+
u32(512),
|
|
101697
|
+
Buffer.from("isomiso2avc1mp41", "latin1")
|
|
101698
|
+
);
|
|
101699
|
+
const moovWith = (chunkOffset) => {
|
|
101700
|
+
const stco = fullBox("stco", 0, 0, u32(1), u32(chunkOffset));
|
|
101701
|
+
const stbl = box("stbl", stsd, stts, stss, stsc, stsz, stco);
|
|
101702
|
+
const minf = box(
|
|
101703
|
+
"minf",
|
|
101704
|
+
fullBox("vmhd", 0, 1, Buffer.alloc(8)),
|
|
101705
|
+
dinf,
|
|
101706
|
+
stbl
|
|
101707
|
+
);
|
|
101708
|
+
const trak = box("trak", tkhd, box("mdia", mdhd, hdlr, minf));
|
|
101709
|
+
return box("moov", mvhd, trak);
|
|
101710
|
+
};
|
|
101711
|
+
const moovSize = moovWith(0).length;
|
|
101712
|
+
const mdatHeader = Buffer.concat([u32(8 + payload), Buffer.from("mdat")]);
|
|
101713
|
+
const dataStart = ftyp.length + moovSize + mdatHeader.length;
|
|
101714
|
+
assertOffset(dataStart + payload, "the file size");
|
|
101715
|
+
const moov = moovWith(dataStart);
|
|
101716
|
+
const parts = [
|
|
101717
|
+
Buffer.concat([ftyp, moov, mdatHeader]),
|
|
101718
|
+
...samples.map(
|
|
101719
|
+
(sample) => Buffer.from(
|
|
101720
|
+
sample.data.buffer,
|
|
101721
|
+
sample.data.byteOffset,
|
|
101722
|
+
sample.data.length
|
|
101723
|
+
)
|
|
101724
|
+
)
|
|
101725
|
+
];
|
|
101726
|
+
return {
|
|
101727
|
+
parts,
|
|
101728
|
+
size: ftyp.length + moov.length + mdatHeader.length + payload,
|
|
101729
|
+
durationMs: movieDuration
|
|
101730
|
+
};
|
|
101731
|
+
}
|
|
101732
|
+
function muxOverheadBound(samples, descriptionBytes) {
|
|
101733
|
+
return 4096 + descriptionBytes + 16 * samples;
|
|
101734
|
+
}
|
|
101735
|
+
const HQ_TIMING = {
|
|
101736
|
+
nudgeMs: 300,
|
|
101737
|
+
firstFrameMs: 3e3,
|
|
101738
|
+
stopCaptureMs: 2e3,
|
|
101739
|
+
flushMs: 1e4,
|
|
101740
|
+
encoderStartMs: 1e4
|
|
101741
|
+
};
|
|
101742
|
+
const HQ_FPS = 10;
|
|
101743
|
+
const KEY_INTERVAL_US = 2e6;
|
|
101744
|
+
const BITRATE_SMALL = 4e6;
|
|
101745
|
+
const BITRATE_FULL_HD = 8e6;
|
|
101746
|
+
const BITRATE_LARGE = 16e6;
|
|
101747
|
+
const AREA_720P = 1280 * 720;
|
|
101748
|
+
const AREA_1080P = 1920 * 1080;
|
|
101749
|
+
const SOFTWARE_MAX_AREA = AREA_1080P;
|
|
101750
|
+
const DRAIN_MS = 3e3;
|
|
101751
|
+
const PNG_SIGNATURE = [137, 80, 78, 71];
|
|
101752
|
+
function bitrateFor(width, height) {
|
|
101753
|
+
const area = width * height;
|
|
101754
|
+
if (area <= AREA_720P) return BITRATE_SMALL;
|
|
101755
|
+
if (area <= AREA_1080P) return BITRATE_FULL_HD;
|
|
101756
|
+
return BITRATE_LARGE;
|
|
101757
|
+
}
|
|
101758
|
+
function pngSize(base64) {
|
|
101759
|
+
const head = Buffer.from(base64.slice(0, 32), "base64");
|
|
101760
|
+
if (head.length < 24) return null;
|
|
101761
|
+
for (let index = 0; index < PNG_SIGNATURE.length; index += 1) {
|
|
101762
|
+
if (head[index] !== PNG_SIGNATURE[index]) return null;
|
|
101763
|
+
}
|
|
101764
|
+
return { width: head.readUInt32BE(16), height: head.readUInt32BE(20) };
|
|
101765
|
+
}
|
|
101766
|
+
function failed(message) {
|
|
101767
|
+
return new BridgeCommandError("internal", message, { reason: "record_failed" });
|
|
101768
|
+
}
|
|
101769
|
+
function unavailable(why, detail) {
|
|
101770
|
+
return new BridgeCommandError(
|
|
101771
|
+
"internal",
|
|
101772
|
+
`high-quality recording is not available here (${detail}). Retry without quality for the standard recording; nothing was started.`,
|
|
101773
|
+
{ reason: "record_quality_unavailable", why, detail }
|
|
101774
|
+
);
|
|
101775
|
+
}
|
|
101776
|
+
function bounded(work, ms, onTimeout) {
|
|
101777
|
+
let timer;
|
|
101778
|
+
const timeout = new Promise((_resolve, reject) => {
|
|
101779
|
+
timer = setTimeout(() => reject(onTimeout()), ms);
|
|
101780
|
+
timer.unref?.();
|
|
101781
|
+
});
|
|
101782
|
+
return Promise.race([work, timeout]).finally(() => {
|
|
101783
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
101784
|
+
});
|
|
101785
|
+
}
|
|
101786
|
+
class HqSession {
|
|
101787
|
+
/** Set by `start` once the encoder answered. */
|
|
101788
|
+
encoder = "hardware";
|
|
101789
|
+
codec = "h264";
|
|
101790
|
+
width = 0;
|
|
101791
|
+
height = 0;
|
|
101792
|
+
bitrate = 0;
|
|
101793
|
+
fps = HQ_FPS;
|
|
101794
|
+
cdp;
|
|
101795
|
+
contents;
|
|
101796
|
+
timing;
|
|
101797
|
+
now;
|
|
101798
|
+
maxBytes;
|
|
101799
|
+
onCap;
|
|
101800
|
+
sized;
|
|
101801
|
+
maxWidth;
|
|
101802
|
+
maxHeight;
|
|
101803
|
+
host = null;
|
|
101804
|
+
unsubscribe = null;
|
|
101805
|
+
timers = /* @__PURE__ */ new Set();
|
|
101806
|
+
disposed = false;
|
|
101807
|
+
stopping = false;
|
|
101808
|
+
captureRequested = false;
|
|
101809
|
+
captureStop = null;
|
|
101810
|
+
finishing = null;
|
|
101811
|
+
failure = null;
|
|
101812
|
+
failureHandler = null;
|
|
101813
|
+
failureWaiters = /* @__PURE__ */ new Set();
|
|
101814
|
+
configured = false;
|
|
101815
|
+
configuring = false;
|
|
101816
|
+
pending = null;
|
|
101817
|
+
inFlight = null;
|
|
101818
|
+
seq = 0;
|
|
101819
|
+
gotFrame = false;
|
|
101820
|
+
onFirstFrame = null;
|
|
101821
|
+
restarting = false;
|
|
101822
|
+
restartAgain = false;
|
|
101823
|
+
lastSentAt = null;
|
|
101824
|
+
firstWallMs = null;
|
|
101825
|
+
anchorPageSec;
|
|
101826
|
+
anchorRelUs = 0;
|
|
101827
|
+
lastTsUs = -1e3;
|
|
101828
|
+
samples = [];
|
|
101829
|
+
description = null;
|
|
101830
|
+
payload = 0;
|
|
101831
|
+
capped = false;
|
|
101832
|
+
constructor(options) {
|
|
101833
|
+
this.cdp = options.cdp;
|
|
101834
|
+
this.contents = options.contents;
|
|
101835
|
+
this.timing = { ...HQ_TIMING, ...options.service.timing };
|
|
101836
|
+
this.now = options.now ?? Date.now;
|
|
101837
|
+
this.maxBytes = options.maxBytes;
|
|
101838
|
+
this.onCap = options.onCap;
|
|
101839
|
+
this.sized = options.size;
|
|
101840
|
+
this.maxWidth = options.maxWidth;
|
|
101841
|
+
this.maxHeight = options.maxHeight;
|
|
101842
|
+
}
|
|
101843
|
+
/**
|
|
101844
|
+
* Open the encoder, start the screencast and wait for a first frame.
|
|
101845
|
+
*
|
|
101846
|
+
* Every failure disposes before it throws, so a refused or failed start leaves no
|
|
101847
|
+
* window, subscription or timer. The CALLER still owns the viewport and the
|
|
101848
|
+
* reservation, as it does for the standard path.
|
|
101849
|
+
*/
|
|
101850
|
+
static async start(options, registerSession) {
|
|
101851
|
+
const session = new HqSession(options);
|
|
101852
|
+
registerSession(session);
|
|
101853
|
+
try {
|
|
101854
|
+
await session.open(options);
|
|
101855
|
+
return session;
|
|
101856
|
+
} catch (error) {
|
|
101857
|
+
session.dispose();
|
|
101858
|
+
throw error;
|
|
101859
|
+
}
|
|
101860
|
+
}
|
|
101861
|
+
/** Called by `recording.ts` right after `start`: a failure that already happened
|
|
101862
|
+
* is delivered at once, so there is no gap in which a dead encoder is unseen. */
|
|
101863
|
+
onFailure(handler) {
|
|
101864
|
+
this.failureHandler = handler;
|
|
101865
|
+
if (this.failure && !this.disposed) handler(this.failure);
|
|
101866
|
+
}
|
|
101867
|
+
async open(options) {
|
|
101868
|
+
const sink = {
|
|
101869
|
+
onChunk: (chunk) => this.takeChunk(chunk),
|
|
101870
|
+
onFrameDone: (seq2) => this.frameDone(seq2),
|
|
101871
|
+
onFailure: (message) => this.fail(failed(message))
|
|
101872
|
+
};
|
|
101873
|
+
const opening = options.service.open(sink);
|
|
101874
|
+
try {
|
|
101875
|
+
this.host = await bounded(
|
|
101876
|
+
opening,
|
|
101877
|
+
this.timing.encoderStartMs,
|
|
101878
|
+
() => unavailable(
|
|
101879
|
+
"encoder_start",
|
|
101880
|
+
`the encoder window did not open in ${this.timing.encoderStartMs} ms`
|
|
101881
|
+
)
|
|
101882
|
+
);
|
|
101883
|
+
} catch (error) {
|
|
101884
|
+
void opening.then(
|
|
101885
|
+
(late) => {
|
|
101886
|
+
try {
|
|
101887
|
+
late.dispose();
|
|
101888
|
+
} catch {
|
|
101889
|
+
}
|
|
101890
|
+
},
|
|
101891
|
+
() => void 0
|
|
101892
|
+
);
|
|
101893
|
+
throw error instanceof BridgeCommandError && error.data?.reason === "record_quality_unavailable" ? error : unavailable(
|
|
101894
|
+
"encoder_start",
|
|
101895
|
+
error instanceof Error ? error.message : String(error)
|
|
101896
|
+
);
|
|
101897
|
+
}
|
|
101898
|
+
if (this.disposed) {
|
|
101899
|
+
try {
|
|
101900
|
+
this.host?.dispose();
|
|
101901
|
+
} catch {
|
|
101902
|
+
}
|
|
101903
|
+
this.host = null;
|
|
101904
|
+
throw failed("the recording was cancelled while starting");
|
|
101905
|
+
}
|
|
101906
|
+
if (this.sized) await this.configure(this.sized);
|
|
101907
|
+
this.throwIfDisposed();
|
|
101908
|
+
this.unsubscribe = this.cdp.subscribe(
|
|
101909
|
+
this.contents.id,
|
|
101910
|
+
(method, params) => this.onEvent(method, params)
|
|
101911
|
+
);
|
|
101912
|
+
const first = new Promise((resolve) => {
|
|
101913
|
+
this.onFirstFrame = resolve;
|
|
101914
|
+
});
|
|
101915
|
+
this.captureRequested = true;
|
|
101916
|
+
await this.startScreencast();
|
|
101917
|
+
this.throwIfDisposed();
|
|
101918
|
+
this.arm(this.timing.nudgeMs, () => void this.nudge());
|
|
101919
|
+
await this.race(
|
|
101920
|
+
first,
|
|
101921
|
+
this.timing.firstFrameMs,
|
|
101922
|
+
() => failed(
|
|
101923
|
+
`the page produced no frame within ${this.timing.firstFrameMs / 1e3} s of the recording starting, so nothing was recorded`
|
|
101924
|
+
)
|
|
101925
|
+
);
|
|
101926
|
+
}
|
|
101927
|
+
throwIfDisposed() {
|
|
101928
|
+
if (this.disposed)
|
|
101929
|
+
throw failed("the recording was cancelled while starting");
|
|
101930
|
+
}
|
|
101931
|
+
startScreencast() {
|
|
101932
|
+
return this.cdp.send(
|
|
101933
|
+
this.contents,
|
|
101934
|
+
"Page.startScreencast",
|
|
101935
|
+
{
|
|
101936
|
+
format: "png",
|
|
101937
|
+
maxWidth: this.maxWidth,
|
|
101938
|
+
maxHeight: this.maxHeight,
|
|
101939
|
+
everyNthFrame: 1
|
|
101940
|
+
},
|
|
101941
|
+
{ deadlineMs: 2e4 }
|
|
101942
|
+
);
|
|
101943
|
+
}
|
|
101944
|
+
/** `work`, or the first failure, or a timeout. */
|
|
101945
|
+
race(work, ms, onTimeout) {
|
|
101946
|
+
return new Promise((resolve, reject) => {
|
|
101947
|
+
let settledOnce = false;
|
|
101948
|
+
const timer = setTimeout(() => finish2(() => reject(onTimeout())), ms);
|
|
101949
|
+
timer.unref?.();
|
|
101950
|
+
const waiter = (error) => finish2(() => reject(error));
|
|
101951
|
+
this.failureWaiters.add(waiter);
|
|
101952
|
+
const finish2 = (action) => {
|
|
101953
|
+
if (settledOnce) return;
|
|
101954
|
+
settledOnce = true;
|
|
101955
|
+
clearTimeout(timer);
|
|
101956
|
+
this.failureWaiters.delete(waiter);
|
|
101957
|
+
action();
|
|
101958
|
+
};
|
|
101959
|
+
work.then(
|
|
101960
|
+
(value) => finish2(() => resolve(value)),
|
|
101961
|
+
(error) => finish2(() => reject(error))
|
|
101962
|
+
);
|
|
101963
|
+
});
|
|
101964
|
+
}
|
|
101965
|
+
arm(ms, action) {
|
|
101966
|
+
const timer = setTimeout(() => {
|
|
101967
|
+
this.timers.delete(timer);
|
|
101968
|
+
if (!this.disposed) action();
|
|
101969
|
+
}, ms);
|
|
101970
|
+
timer.unref?.();
|
|
101971
|
+
this.timers.add(timer);
|
|
101972
|
+
}
|
|
101973
|
+
/** A first frame larger than the ceiling (the nudge's unscaled screenshot of a
|
|
101974
|
+
* presented tab) is configured at the size the screencast would have scaled it
|
|
101975
|
+
* to, so every later frame matches and the encoder document scales this one. */
|
|
101976
|
+
fitToCeiling(size) {
|
|
101977
|
+
const scale = Math.min(
|
|
101978
|
+
1,
|
|
101979
|
+
this.maxWidth / size.width,
|
|
101980
|
+
this.maxHeight / size.height
|
|
101981
|
+
);
|
|
101982
|
+
return scale >= 1 ? size : {
|
|
101983
|
+
width: Math.round(size.width * scale),
|
|
101984
|
+
height: Math.round(size.height * scale)
|
|
101985
|
+
};
|
|
101986
|
+
}
|
|
101987
|
+
async configure(size) {
|
|
101988
|
+
if (this.configured || this.configuring || !this.host) return;
|
|
101989
|
+
this.configuring = true;
|
|
101990
|
+
const width = size.width - size.width % 2;
|
|
101991
|
+
const height = size.height - size.height % 2;
|
|
101992
|
+
const bitrate = bitrateFor(width, height);
|
|
101993
|
+
let answer;
|
|
101994
|
+
try {
|
|
101995
|
+
answer = await bounded(
|
|
101996
|
+
this.host.configure({
|
|
101997
|
+
width,
|
|
101998
|
+
height,
|
|
101999
|
+
bitrate,
|
|
102000
|
+
fps: HQ_FPS,
|
|
102001
|
+
softwareAllowed: width * height <= SOFTWARE_MAX_AREA,
|
|
102002
|
+
keyIntervalUs: KEY_INTERVAL_US
|
|
102003
|
+
}),
|
|
102004
|
+
this.timing.encoderStartMs,
|
|
102005
|
+
() => unavailable(
|
|
102006
|
+
"encoder_start",
|
|
102007
|
+
`the encoder did not answer within ${this.timing.encoderStartMs} ms`
|
|
102008
|
+
)
|
|
102009
|
+
);
|
|
102010
|
+
} catch (error) {
|
|
102011
|
+
throw error instanceof BridgeCommandError ? error : unavailable("encoder_start", String(error));
|
|
102012
|
+
}
|
|
102013
|
+
if (!answer.ok) throw unavailable(answer.why, answer.detail);
|
|
102014
|
+
this.encoder = answer.encoder;
|
|
102015
|
+
this.codec = "h264";
|
|
102016
|
+
this.width = answer.width;
|
|
102017
|
+
this.height = answer.height;
|
|
102018
|
+
this.bitrate = bitrate;
|
|
102019
|
+
this.configured = true;
|
|
102020
|
+
this.configuring = false;
|
|
102021
|
+
}
|
|
102022
|
+
onEvent(method, params) {
|
|
102023
|
+
if (this.disposed || this.stopping) return;
|
|
102024
|
+
if (method === PAGE_DISABLED_EVENT) {
|
|
102025
|
+
this.restartScreencast();
|
|
102026
|
+
return;
|
|
102027
|
+
}
|
|
102028
|
+
if (method !== "Page.screencastFrame") return;
|
|
102029
|
+
const data = params.data;
|
|
102030
|
+
if (typeof data !== "string") return;
|
|
102031
|
+
const sessionId2 = typeof params.sessionId === "number" ? params.sessionId : null;
|
|
102032
|
+
const metadata = params.metadata;
|
|
102033
|
+
this.take({
|
|
102034
|
+
ackId: sessionId2,
|
|
102035
|
+
data,
|
|
102036
|
+
pageSec: typeof metadata?.timestamp === "number" ? metadata.timestamp : void 0,
|
|
102037
|
+
arrivedAt: this.now()
|
|
102038
|
+
});
|
|
102039
|
+
}
|
|
102040
|
+
/**
|
|
102041
|
+
* `Page.disable` ENDS A RUNNING SCREENCAST and `Page.enable` does not bring it
|
|
102042
|
+
* back (measured, QA round 1 Q1). The origin gate sends exactly that after every
|
|
102043
|
+
* click, type, press and goto, so a clip would freeze at the first action while
|
|
102044
|
+
* keeping its wall-clock length. The pool announces each `Page.disable` it sent
|
|
102045
|
+
* (`PAGE_DISABLED_EVENT`) and the screencast is started again here. A watchdog on
|
|
102046
|
+
* "no frames lately" could not do this job: a static page legitimately produces
|
|
102047
|
+
* none. A burst is coalesced to one start in flight plus one queued (a disable
|
|
102048
|
+
* that lands after the in-flight start was sent ends THAT screencast too, so it
|
|
102049
|
+
* cannot simply be dropped), and a restart that fails fails the recording
|
|
102050
|
+
* instead of leaving a clip that silently stopped moving.
|
|
102051
|
+
*
|
|
102052
|
+
* Chromium's frame-in-flight count restarts with the screencast, so an ack that
|
|
102053
|
+
* was still owed for the old one is simply ignored by it; `inFlight` is left
|
|
102054
|
+
* alone because the encoder, not Chromium, is what releases it.
|
|
102055
|
+
*/
|
|
102056
|
+
restartScreencast() {
|
|
102057
|
+
if (!this.captureRequested) return;
|
|
102058
|
+
if (this.restarting) {
|
|
102059
|
+
this.restartAgain = true;
|
|
102060
|
+
return;
|
|
102061
|
+
}
|
|
102062
|
+
this.restarting = true;
|
|
102063
|
+
void this.startScreencast().then(
|
|
102064
|
+
() => {
|
|
102065
|
+
this.restarting = false;
|
|
102066
|
+
if (this.restartAgain) {
|
|
102067
|
+
this.restartAgain = false;
|
|
102068
|
+
if (!this.disposed && !this.stopping) this.restartScreencast();
|
|
102069
|
+
}
|
|
102070
|
+
},
|
|
102071
|
+
(error) => {
|
|
102072
|
+
this.restarting = false;
|
|
102073
|
+
this.restartAgain = false;
|
|
102074
|
+
if (this.disposed || this.stopping) return;
|
|
102075
|
+
if (error instanceof BridgeCommandError && error.code === "tab_closed")
|
|
102076
|
+
return;
|
|
102077
|
+
this.fail(
|
|
102078
|
+
failed(
|
|
102079
|
+
`the page's screencast stopped and could not be restarted: ${error instanceof Error ? error.message : String(error)}`
|
|
102080
|
+
)
|
|
102081
|
+
);
|
|
102082
|
+
}
|
|
102083
|
+
);
|
|
102084
|
+
}
|
|
102085
|
+
/** The nudge: a static page may emit no screencast frame until something
|
|
102086
|
+
* changes, so one screenshot stands in as frame 0 (D17). */
|
|
102087
|
+
async nudge() {
|
|
102088
|
+
if (this.gotFrame || this.disposed || this.stopping) return;
|
|
102089
|
+
try {
|
|
102090
|
+
const shot = await this.cdp.send(
|
|
102091
|
+
this.contents,
|
|
102092
|
+
"Page.captureScreenshot",
|
|
102093
|
+
{ format: "png", captureBeyondViewport: false },
|
|
102094
|
+
{ deadlineMs: this.timing.firstFrameMs }
|
|
102095
|
+
);
|
|
102096
|
+
if (this.gotFrame || this.disposed || this.stopping) return;
|
|
102097
|
+
if (typeof shot?.data !== "string") return;
|
|
102098
|
+
this.take({
|
|
102099
|
+
ackId: null,
|
|
102100
|
+
data: shot.data,
|
|
102101
|
+
pageSec: void 0,
|
|
102102
|
+
arrivedAt: this.now()
|
|
102103
|
+
});
|
|
102104
|
+
} catch {
|
|
102105
|
+
}
|
|
102106
|
+
}
|
|
102107
|
+
take(frame) {
|
|
102108
|
+
if (!this.gotFrame) {
|
|
102109
|
+
this.gotFrame = true;
|
|
102110
|
+
const size = pngSize(frame.data);
|
|
102111
|
+
if (!this.configured) {
|
|
102112
|
+
if (!size) {
|
|
102113
|
+
this.fail(failed("the first frame was not a PNG image"));
|
|
102114
|
+
return;
|
|
102115
|
+
}
|
|
102116
|
+
void this.configure(this.fitToCeiling(size)).then(
|
|
102117
|
+
() => this.pump(),
|
|
102118
|
+
(error) => this.fail(
|
|
102119
|
+
error instanceof BridgeCommandError ? error : failed(String(error))
|
|
102120
|
+
)
|
|
102121
|
+
);
|
|
102122
|
+
}
|
|
102123
|
+
}
|
|
102124
|
+
if (this.pending) this.ack(this.pending.ackId);
|
|
102125
|
+
this.pending = frame;
|
|
102126
|
+
this.pump();
|
|
102127
|
+
}
|
|
102128
|
+
pump() {
|
|
102129
|
+
if (this.disposed || !this.configured || this.inFlight || !this.pending)
|
|
102130
|
+
return;
|
|
102131
|
+
if (this.stopping && this.capped) return;
|
|
102132
|
+
const frame = this.pending;
|
|
102133
|
+
const interval = 1e3 / HQ_FPS;
|
|
102134
|
+
if (this.lastSentAt !== null) {
|
|
102135
|
+
const wait = this.lastSentAt + interval - this.now();
|
|
102136
|
+
if (wait > 0) {
|
|
102137
|
+
this.arm(wait, () => this.pump());
|
|
102138
|
+
return;
|
|
102139
|
+
}
|
|
102140
|
+
}
|
|
102141
|
+
this.pending = null;
|
|
102142
|
+
this.send(frame);
|
|
102143
|
+
}
|
|
102144
|
+
send(frame) {
|
|
102145
|
+
if (!this.host) return;
|
|
102146
|
+
const arrived = frame.arrivedAt;
|
|
102147
|
+
let relUs;
|
|
102148
|
+
if (this.firstWallMs === null) {
|
|
102149
|
+
this.firstWallMs = arrived;
|
|
102150
|
+
this.anchorPageSec = frame.pageSec;
|
|
102151
|
+
this.anchorRelUs = 0;
|
|
102152
|
+
relUs = 0;
|
|
102153
|
+
} else if (frame.pageSec !== void 0 && this.anchorPageSec !== void 0) {
|
|
102154
|
+
relUs = this.anchorRelUs + (frame.pageSec - this.anchorPageSec) * 1e6;
|
|
102155
|
+
} else if (frame.pageSec !== void 0) {
|
|
102156
|
+
this.anchorPageSec = frame.pageSec;
|
|
102157
|
+
this.anchorRelUs = (arrived - this.firstWallMs) * 1e3;
|
|
102158
|
+
relUs = this.anchorRelUs;
|
|
102159
|
+
} else {
|
|
102160
|
+
relUs = (arrived - this.firstWallMs) * 1e3;
|
|
102161
|
+
}
|
|
102162
|
+
const ts = Math.max(Math.round(relUs), this.lastTsUs + 1e3);
|
|
102163
|
+
this.lastTsUs = ts;
|
|
102164
|
+
this.seq += 1;
|
|
102165
|
+
this.lastSentAt = this.now();
|
|
102166
|
+
this.inFlight = {
|
|
102167
|
+
seq: this.seq,
|
|
102168
|
+
ackId: frame.ackId,
|
|
102169
|
+
sentAt: this.lastSentAt,
|
|
102170
|
+
done: false
|
|
102171
|
+
};
|
|
102172
|
+
this.host.frame(this.seq, frame.data, ts);
|
|
102173
|
+
}
|
|
102174
|
+
frameDone(seq2) {
|
|
102175
|
+
const current = this.inFlight;
|
|
102176
|
+
if (this.disposed || !current || current.seq !== seq2) return;
|
|
102177
|
+
current.done = true;
|
|
102178
|
+
if (this.onFirstFrame) {
|
|
102179
|
+
this.onFirstFrame();
|
|
102180
|
+
this.onFirstFrame = null;
|
|
102181
|
+
}
|
|
102182
|
+
this.release();
|
|
102183
|
+
}
|
|
102184
|
+
/** Ack the frame and take the next, once the encoder has finished with it AND a
|
|
102185
|
+
* frame interval has passed since it was sent. */
|
|
102186
|
+
release() {
|
|
102187
|
+
const current = this.inFlight;
|
|
102188
|
+
if (this.disposed || !current || !current.done) return;
|
|
102189
|
+
const wait = current.sentAt + 1e3 / HQ_FPS - this.now();
|
|
102190
|
+
if (wait > 0 && !this.stopping) {
|
|
102191
|
+
this.arm(wait, () => this.release());
|
|
102192
|
+
return;
|
|
102193
|
+
}
|
|
102194
|
+
this.inFlight = null;
|
|
102195
|
+
if (!this.stopping) this.ack(current.ackId);
|
|
102196
|
+
this.pump();
|
|
102197
|
+
}
|
|
102198
|
+
ack(sessionId2) {
|
|
102199
|
+
if (this.disposed || this.stopping || sessionId2 === null) return;
|
|
102200
|
+
void this.cdp.send(
|
|
102201
|
+
this.contents,
|
|
102202
|
+
"Page.screencastFrameAck",
|
|
102203
|
+
{ sessionId: sessionId2 },
|
|
102204
|
+
{ deadlineMs: this.timing.stopCaptureMs }
|
|
102205
|
+
).catch(() => void 0);
|
|
102206
|
+
}
|
|
102207
|
+
takeChunk(chunk) {
|
|
102208
|
+
if (this.disposed || this.capped) return;
|
|
102209
|
+
if (chunk.description && !this.description)
|
|
102210
|
+
this.description = chunk.description;
|
|
102211
|
+
if (!this.description) {
|
|
102212
|
+
this.fail(failed("the encoder produced no decoder configuration"));
|
|
102213
|
+
return;
|
|
102214
|
+
}
|
|
102215
|
+
const next = this.samples.length + 1;
|
|
102216
|
+
const total = this.payload + chunk.data.length + muxOverheadBound(next, this.description.length);
|
|
102217
|
+
if (total > this.maxBytes) {
|
|
102218
|
+
this.capped = true;
|
|
102219
|
+
this.onCap();
|
|
102220
|
+
return;
|
|
102221
|
+
}
|
|
102222
|
+
this.samples.push({ data: chunk.data, ts: chunk.ts, key: chunk.key });
|
|
102223
|
+
this.payload += chunk.data.length;
|
|
102224
|
+
}
|
|
102225
|
+
fail(error) {
|
|
102226
|
+
if (this.disposed || this.failure) return;
|
|
102227
|
+
this.failure = error;
|
|
102228
|
+
for (const waiter of [...this.failureWaiters]) waiter(error);
|
|
102229
|
+
this.failureHandler?.(error);
|
|
102230
|
+
}
|
|
102231
|
+
/** Stop the screencast, bounded; shared by every caller so Chromium is told once.
|
|
102232
|
+
* On a tab that survives (`endReplaced`, a cancelled start) this is awaited. */
|
|
102233
|
+
stopCapture(again = false) {
|
|
102234
|
+
if (this.captureStop && !again) return this.captureStop;
|
|
102235
|
+
this.captureStop = (async () => {
|
|
102236
|
+
if (!this.captureRequested || this.contents.isDestroyed()) return;
|
|
102237
|
+
try {
|
|
102238
|
+
await this.cdp.send(
|
|
102239
|
+
this.contents,
|
|
102240
|
+
"Page.stopScreencast",
|
|
102241
|
+
{},
|
|
102242
|
+
{ deadlineMs: this.timing.stopCaptureMs }
|
|
102243
|
+
);
|
|
102244
|
+
} catch {
|
|
102245
|
+
}
|
|
102246
|
+
})();
|
|
102247
|
+
return this.captureStop;
|
|
102248
|
+
}
|
|
102249
|
+
/**
|
|
102250
|
+
* End the clip: stop the capture, drain the encoder and box the samples.
|
|
102251
|
+
*
|
|
102252
|
+
* Shared by the timer and `record_stop`. The newest waiting frame is encoded
|
|
102253
|
+
* first, because it is the page's final state and the last encoded frame is held
|
|
102254
|
+
* until the stop.
|
|
102255
|
+
*/
|
|
102256
|
+
finish() {
|
|
102257
|
+
if (!this.finishing) this.finishing = this.runFinish();
|
|
102258
|
+
return this.finishing;
|
|
102259
|
+
}
|
|
102260
|
+
async runFinish() {
|
|
102261
|
+
const endedAt = this.now();
|
|
102262
|
+
this.stopping = true;
|
|
102263
|
+
await this.stopCapture();
|
|
102264
|
+
if (this.disposed)
|
|
102265
|
+
throw failed("the recording was discarded while it was being saved");
|
|
102266
|
+
await this.waitIdle();
|
|
102267
|
+
if (this.pending && this.configured && !this.capped && !this.failure) {
|
|
102268
|
+
const last = this.pending;
|
|
102269
|
+
this.pending = null;
|
|
102270
|
+
this.send(last);
|
|
102271
|
+
await this.waitIdle();
|
|
102272
|
+
}
|
|
102273
|
+
if (this.failure) throw this.failure;
|
|
102274
|
+
if (!this.host) throw failed("the encoder is gone");
|
|
102275
|
+
await this.race(
|
|
102276
|
+
this.host.flush(),
|
|
102277
|
+
this.timing.flushMs,
|
|
102278
|
+
() => failed(
|
|
102279
|
+
"the encoder did not finish within its time limit; nothing was saved"
|
|
102280
|
+
)
|
|
102281
|
+
);
|
|
102282
|
+
if (this.disposed)
|
|
102283
|
+
throw failed("the recording was discarded while it was being saved");
|
|
102284
|
+
if (this.samples.length === 0 || !this.description) {
|
|
102285
|
+
throw this.capped ? new BridgeCommandError(
|
|
102286
|
+
"internal",
|
|
102287
|
+
`the first frame alone does not fit the ${this.maxBytes}-byte limit; nothing was saved. Raise the size limit or record a smaller area.`,
|
|
102288
|
+
{ reason: "record_too_large", max_bytes: this.maxBytes }
|
|
102289
|
+
) : failed("the recording produced no frames; nothing was saved");
|
|
102290
|
+
}
|
|
102291
|
+
const endUs = this.firstWallMs === null ? void 0 : (endedAt - this.firstWallMs) * 1e3;
|
|
102292
|
+
const out = writeMp4({
|
|
102293
|
+
width: this.width,
|
|
102294
|
+
height: this.height,
|
|
102295
|
+
description: this.description,
|
|
102296
|
+
samples: this.samples,
|
|
102297
|
+
endTs: endUs,
|
|
102298
|
+
fallbackFrameUs: 1e6 / HQ_FPS
|
|
102299
|
+
});
|
|
102300
|
+
if (out.size > this.maxBytes) {
|
|
102301
|
+
throw new BridgeCommandError(
|
|
102302
|
+
"internal",
|
|
102303
|
+
`the recording is larger than ${this.maxBytes} bytes; nothing was saved`,
|
|
102304
|
+
{ reason: "record_too_large", max_bytes: this.maxBytes }
|
|
102305
|
+
);
|
|
102306
|
+
}
|
|
102307
|
+
const seconds = Math.max(out.durationMs / 1e3, 1e-3);
|
|
102308
|
+
return {
|
|
102309
|
+
parts: out.parts,
|
|
102310
|
+
size: out.size,
|
|
102311
|
+
frames: this.samples.length,
|
|
102312
|
+
measuredFps: Math.round(this.samples.length / seconds * 100) / 100,
|
|
102313
|
+
avgBitrateKbps: Math.round(this.payload * 8 / seconds / 1e3),
|
|
102314
|
+
encoder: this.encoder,
|
|
102315
|
+
endedAt
|
|
102316
|
+
};
|
|
102317
|
+
}
|
|
102318
|
+
/** Resolves when no frame is in the encoder, the encoder failed, the session was
|
|
102319
|
+
* disposed, or the drain bound passed. Polled rather than signalled: it runs once
|
|
102320
|
+
* per stop, and a poll cannot miss a wake-up that raced the registration. */
|
|
102321
|
+
waitIdle() {
|
|
102322
|
+
return new Promise((resolve) => {
|
|
102323
|
+
const started = this.now();
|
|
102324
|
+
const check = () => {
|
|
102325
|
+
if (!this.inFlight || this.failure || this.disposed || this.now() - started >= DRAIN_MS) {
|
|
102326
|
+
resolve();
|
|
102327
|
+
return;
|
|
102328
|
+
}
|
|
102329
|
+
const timer = setTimeout(check, 20);
|
|
102330
|
+
timer.unref?.();
|
|
102331
|
+
};
|
|
102332
|
+
check();
|
|
102333
|
+
});
|
|
102334
|
+
}
|
|
102335
|
+
/** Tear everything down, now. Idempotent, synchronous, never throws, and never acks
|
|
102336
|
+
* afterwards. The best-effort `Page.stopScreencast` is fire-and-forget here; a
|
|
102337
|
+
* caller whose tab survives awaits `stopCapture` itself. */
|
|
102338
|
+
dispose() {
|
|
102339
|
+
if (this.disposed) return;
|
|
102340
|
+
this.disposed = true;
|
|
102341
|
+
this.unsubscribe?.();
|
|
102342
|
+
this.unsubscribe = null;
|
|
102343
|
+
for (const timer of this.timers) clearTimeout(timer);
|
|
102344
|
+
this.timers.clear();
|
|
102345
|
+
this.pending = null;
|
|
102346
|
+
this.samples = [];
|
|
102347
|
+
this.description = null;
|
|
102348
|
+
const pendingStop = this.captureRequested ? this.stopCapture() : null;
|
|
102349
|
+
void pendingStop?.catch(() => void 0);
|
|
102350
|
+
try {
|
|
102351
|
+
this.host?.dispose();
|
|
102352
|
+
} catch {
|
|
102353
|
+
}
|
|
102354
|
+
this.host = null;
|
|
102355
|
+
for (const waiter of [...this.failureWaiters]) {
|
|
102356
|
+
waiter(failed("the recording was discarded"));
|
|
102357
|
+
}
|
|
102358
|
+
this.failureWaiters.clear();
|
|
102359
|
+
this.failureHandler = null;
|
|
102360
|
+
}
|
|
102361
|
+
}
|
|
101149
102362
|
const RECORD_WIDTH = 1280;
|
|
101150
102363
|
const RECORD_HEIGHT = 720;
|
|
101151
102364
|
const RECORD_FPS = 10;
|
|
@@ -101287,6 +102500,18 @@ function maxBytesOf(params) {
|
|
|
101287
102500
|
}
|
|
101288
102501
|
return bytes;
|
|
101289
102502
|
}
|
|
102503
|
+
function qualityOf(params) {
|
|
102504
|
+
const raw = params.quality;
|
|
102505
|
+
if (raw === void 0 || raw === null || raw === "standard") {
|
|
102506
|
+
return "standard";
|
|
102507
|
+
}
|
|
102508
|
+
if (raw === "high") return "high";
|
|
102509
|
+
throw new BridgeCommandError(
|
|
102510
|
+
"internal",
|
|
102511
|
+
`record_start quality must be "standard" or "high": got ${JSON.stringify(raw)}. Nothing was started.`,
|
|
102512
|
+
{ reason: "record_quality", param: "quality", why: "value" }
|
|
102513
|
+
);
|
|
102514
|
+
}
|
|
101290
102515
|
function sizeRefusal(why, param, detail) {
|
|
101291
102516
|
return new BridgeCommandError("internal", `${detail} Nothing was started.`, {
|
|
101292
102517
|
reason: "record_size",
|
|
@@ -101511,6 +102736,15 @@ function captureShape(size) {
|
|
|
101511
102736
|
...size ? { width: size.width, height: size.height } : {}
|
|
101512
102737
|
};
|
|
101513
102738
|
}
|
|
102739
|
+
function highShape(session) {
|
|
102740
|
+
return {
|
|
102741
|
+
fps: session.fps,
|
|
102742
|
+
container: "mp4",
|
|
102743
|
+
codec: session.codec,
|
|
102744
|
+
width: session.width,
|
|
102745
|
+
height: session.height
|
|
102746
|
+
};
|
|
102747
|
+
}
|
|
101514
102748
|
async function readStream(recording, handle2, budgetAt, fd) {
|
|
101515
102749
|
let bytes = 0;
|
|
101516
102750
|
for (; ; ) {
|
|
@@ -101547,7 +102781,27 @@ async function readStream(recording, handle2, budgetAt, fd) {
|
|
|
101547
102781
|
}
|
|
101548
102782
|
return bytes;
|
|
101549
102783
|
}
|
|
102784
|
+
function publishPart(partPath, path2) {
|
|
102785
|
+
try {
|
|
102786
|
+
fs.linkSync(partPath, path2);
|
|
102787
|
+
} catch (error) {
|
|
102788
|
+
const code = error?.code;
|
|
102789
|
+
if (code === "EEXIST") {
|
|
102790
|
+
throw pathRefusal(
|
|
102791
|
+
path2,
|
|
102792
|
+
`the recording path appeared while recording and is never overwritten: ${path2}`
|
|
102793
|
+
);
|
|
102794
|
+
}
|
|
102795
|
+
throw error;
|
|
102796
|
+
}
|
|
102797
|
+
try {
|
|
102798
|
+
fs.unlinkSync(partPath);
|
|
102799
|
+
} catch {
|
|
102800
|
+
}
|
|
102801
|
+
}
|
|
101550
102802
|
async function runFinalize(recording, autoStopped) {
|
|
102803
|
+
if (recording.engine === "high")
|
|
102804
|
+
return runFinalizeHigh(recording, autoStopped);
|
|
101551
102805
|
const { contents, cdp, path: path2, partPath } = recording;
|
|
101552
102806
|
const budgetAt = Date.now() + RECORD_STOP_BUDGET_MS;
|
|
101553
102807
|
let handle2 = "";
|
|
@@ -101590,22 +102844,7 @@ async function runFinalize(recording, autoStopped) {
|
|
|
101590
102844
|
fs.fsyncSync(fd);
|
|
101591
102845
|
fs.closeSync(fd);
|
|
101592
102846
|
fd = null;
|
|
101593
|
-
|
|
101594
|
-
fs.linkSync(partPath, path2);
|
|
101595
|
-
} catch (error) {
|
|
101596
|
-
const code = error?.code;
|
|
101597
|
-
if (code === "EEXIST") {
|
|
101598
|
-
throw pathRefusal(
|
|
101599
|
-
path2,
|
|
101600
|
-
`the recording path appeared while recording and is never overwritten: ${path2}`
|
|
101601
|
-
);
|
|
101602
|
-
}
|
|
101603
|
-
throw error;
|
|
101604
|
-
}
|
|
101605
|
-
try {
|
|
101606
|
-
fs.unlinkSync(partPath);
|
|
101607
|
-
} catch {
|
|
101608
|
-
}
|
|
102847
|
+
publishPart(partPath, path2);
|
|
101609
102848
|
return {
|
|
101610
102849
|
path: path2,
|
|
101611
102850
|
bytes,
|
|
@@ -101644,6 +102883,72 @@ async function runFinalize(recording, autoStopped) {
|
|
|
101644
102883
|
}
|
|
101645
102884
|
}
|
|
101646
102885
|
}
|
|
102886
|
+
function writeAll(fd, buffer) {
|
|
102887
|
+
let offset = 0;
|
|
102888
|
+
while (offset < buffer.length) {
|
|
102889
|
+
offset += fs.writeSync(fd, buffer, offset, buffer.length - offset);
|
|
102890
|
+
}
|
|
102891
|
+
}
|
|
102892
|
+
async function runFinalizeHigh(recording, autoStopped) {
|
|
102893
|
+
const { contents, cdp, path: path2, partPath } = recording;
|
|
102894
|
+
const session = recording.encoder;
|
|
102895
|
+
let fd = null;
|
|
102896
|
+
let createdPart = false;
|
|
102897
|
+
let viewportCleared = false;
|
|
102898
|
+
try {
|
|
102899
|
+
if (!session) throw abortedWhileSaving();
|
|
102900
|
+
const clip2 = await session.finish();
|
|
102901
|
+
if (recording.viewportToken) {
|
|
102902
|
+
await clearViewport(cdp, contents, recording.viewportToken);
|
|
102903
|
+
viewportCleared = true;
|
|
102904
|
+
}
|
|
102905
|
+
if (recording.aborted) throw abortedWhileSaving();
|
|
102906
|
+
fd = fs.openSync(partPath, "wx", 384);
|
|
102907
|
+
createdPart = true;
|
|
102908
|
+
let bytes = 0;
|
|
102909
|
+
for (const part of clip2.parts) {
|
|
102910
|
+
writeAll(fd, part);
|
|
102911
|
+
bytes += part.length;
|
|
102912
|
+
}
|
|
102913
|
+
if (recording.aborted) throw abortedWhileSaving();
|
|
102914
|
+
fs.fsyncSync(fd);
|
|
102915
|
+
fs.closeSync(fd);
|
|
102916
|
+
fd = null;
|
|
102917
|
+
publishPart(partPath, path2);
|
|
102918
|
+
return {
|
|
102919
|
+
path: path2,
|
|
102920
|
+
bytes,
|
|
102921
|
+
duration_ms: clip2.endedAt - recording.startedAt,
|
|
102922
|
+
auto_stopped: autoStopped,
|
|
102923
|
+
...highShape(session),
|
|
102924
|
+
quality: "high",
|
|
102925
|
+
encoder: clip2.encoder,
|
|
102926
|
+
frames: clip2.frames,
|
|
102927
|
+
measured_fps: clip2.measuredFps,
|
|
102928
|
+
avg_bitrate_kbps: clip2.avgBitrateKbps,
|
|
102929
|
+
stop_reason: recording.stopReason ?? (autoStopped ? "max_duration" : "stop")
|
|
102930
|
+
};
|
|
102931
|
+
} catch (error) {
|
|
102932
|
+
throw typedFailure(error);
|
|
102933
|
+
} finally {
|
|
102934
|
+
if (recording.viewportToken && !viewportCleared) {
|
|
102935
|
+
await clearViewport(cdp, contents, recording.viewportToken);
|
|
102936
|
+
}
|
|
102937
|
+
if (fd !== null) {
|
|
102938
|
+
try {
|
|
102939
|
+
fs.closeSync(fd);
|
|
102940
|
+
} catch {
|
|
102941
|
+
}
|
|
102942
|
+
}
|
|
102943
|
+
if (createdPart) {
|
|
102944
|
+
try {
|
|
102945
|
+
fs.unlinkSync(partPath);
|
|
102946
|
+
} catch {
|
|
102947
|
+
}
|
|
102948
|
+
}
|
|
102949
|
+
session?.dispose();
|
|
102950
|
+
}
|
|
102951
|
+
}
|
|
101647
102952
|
function settle$1(webContentsId, recording, outcome) {
|
|
101648
102953
|
if (recordings.get(webContentsId) === recording) {
|
|
101649
102954
|
recordings.delete(webContentsId);
|
|
@@ -101658,6 +102963,11 @@ function settle$1(webContentsId, recording, outcome) {
|
|
|
101658
102963
|
async function endReplaced(recording) {
|
|
101659
102964
|
try {
|
|
101660
102965
|
await recording.cdp.attach(recording.contents).catch(() => void 0);
|
|
102966
|
+
if (recording.encoder) {
|
|
102967
|
+
await recording.encoder.stopCapture(true);
|
|
102968
|
+
recording.encoder.dispose();
|
|
102969
|
+
return;
|
|
102970
|
+
}
|
|
101661
102971
|
const stopped = await recording.cdp.send(
|
|
101662
102972
|
recording.contents,
|
|
101663
102973
|
"Page.stopScreenRecording",
|
|
@@ -101720,6 +103030,18 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101720
103030
|
}
|
|
101721
103031
|
}
|
|
101722
103032
|
const size = sizeOf$1(params);
|
|
103033
|
+
const quality = qualityOf(params);
|
|
103034
|
+
if (quality === "high" && !ctx.recordingEncoder) {
|
|
103035
|
+
throw new BridgeCommandError(
|
|
103036
|
+
"internal",
|
|
103037
|
+
"high-quality recording is not available here (this host was built without its encoder window). Retry without quality for the standard recording; nothing was started.",
|
|
103038
|
+
{
|
|
103039
|
+
reason: "record_quality_unavailable",
|
|
103040
|
+
why: "no_h264_encoder",
|
|
103041
|
+
detail: "no encoder window"
|
|
103042
|
+
}
|
|
103043
|
+
);
|
|
103044
|
+
}
|
|
101723
103045
|
if (size && tab.presented) {
|
|
101724
103046
|
throw sizeRefusal(
|
|
101725
103047
|
"visible",
|
|
@@ -101789,6 +103111,9 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101789
103111
|
let measured = size;
|
|
101790
103112
|
let viewportToken;
|
|
101791
103113
|
let started = false;
|
|
103114
|
+
let hq;
|
|
103115
|
+
let capEarly = false;
|
|
103116
|
+
let capHandler = null;
|
|
101792
103117
|
try {
|
|
101793
103118
|
if (active) await endReplaced(active);
|
|
101794
103119
|
await ctx.cdp.attach(contents);
|
|
@@ -101797,24 +103122,49 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101797
103122
|
measured = await waitForViewport(ctx.cdp, contents, size);
|
|
101798
103123
|
await waitForCompositedFrame(ctx.cdp, contents, measured);
|
|
101799
103124
|
}
|
|
101800
|
-
|
|
101801
|
-
|
|
101802
|
-
|
|
101803
|
-
"Page.startScreenRecording",
|
|
103125
|
+
if (quality === "high" && ctx.recordingEncoder) {
|
|
103126
|
+
const service = ctx.recordingEncoder;
|
|
103127
|
+
await HqSession.start(
|
|
101804
103128
|
{
|
|
101805
|
-
|
|
103129
|
+
cdp: ctx.cdp,
|
|
103130
|
+
contents,
|
|
103131
|
+
service,
|
|
101806
103132
|
maxWidth: measured?.width ?? RECORD_WIDTH,
|
|
101807
103133
|
maxHeight: measured?.height ?? RECORD_HEIGHT,
|
|
101808
|
-
|
|
103134
|
+
size: measured,
|
|
103135
|
+
maxBytes,
|
|
103136
|
+
onCap: () => {
|
|
103137
|
+
if (capHandler) capHandler();
|
|
103138
|
+
else capEarly = true;
|
|
103139
|
+
}
|
|
101809
103140
|
},
|
|
101810
|
-
|
|
103141
|
+
(session) => {
|
|
103142
|
+
hq = session;
|
|
103143
|
+
entry.dispose = () => session.dispose();
|
|
103144
|
+
}
|
|
101811
103145
|
);
|
|
101812
103146
|
started = true;
|
|
101813
|
-
}
|
|
101814
|
-
|
|
103147
|
+
} else {
|
|
103148
|
+
try {
|
|
103149
|
+
await ctx.cdp.send(
|
|
103150
|
+
contents,
|
|
103151
|
+
"Page.startScreenRecording",
|
|
103152
|
+
{
|
|
103153
|
+
audio: false,
|
|
103154
|
+
maxWidth: measured?.width ?? RECORD_WIDTH,
|
|
103155
|
+
maxHeight: measured?.height ?? RECORD_HEIGHT,
|
|
103156
|
+
frameRate: RECORD_FPS
|
|
103157
|
+
},
|
|
103158
|
+
{ deadlineMs: RECORD_START_DEADLINE_MS }
|
|
103159
|
+
);
|
|
103160
|
+
started = true;
|
|
103161
|
+
} catch (error) {
|
|
103162
|
+
throw classifyStartFailure(error);
|
|
103163
|
+
}
|
|
101815
103164
|
}
|
|
101816
103165
|
} catch (error) {
|
|
101817
103166
|
reservations.delete(reservation);
|
|
103167
|
+
if (hq) await hq.stopCapture().catch(() => void 0);
|
|
101818
103168
|
if (size && viewportToken) {
|
|
101819
103169
|
await clearViewport(ctx.cdp, contents, viewportToken);
|
|
101820
103170
|
}
|
|
@@ -101828,7 +103178,8 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101828
103178
|
contents,
|
|
101829
103179
|
width: measured?.width,
|
|
101830
103180
|
height: measured?.height,
|
|
101831
|
-
viewportToken
|
|
103181
|
+
viewportToken,
|
|
103182
|
+
encoder: hq
|
|
101832
103183
|
});
|
|
101833
103184
|
} else if (size && viewportToken) {
|
|
101834
103185
|
await clearViewport(ctx.cdp, contents, viewportToken);
|
|
@@ -101852,7 +103203,9 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101852
103203
|
...viewportToken ? { viewportToken } : {},
|
|
101853
103204
|
timer: void 0,
|
|
101854
103205
|
finishing: null,
|
|
101855
|
-
aborted: false
|
|
103206
|
+
aborted: false,
|
|
103207
|
+
engine: quality,
|
|
103208
|
+
...hq ? { encoder: hq } : {}
|
|
101856
103209
|
};
|
|
101857
103210
|
recordings.set(id2, recording);
|
|
101858
103211
|
reservations.delete(reservation);
|
|
@@ -101860,6 +103213,26 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101860
103213
|
void finish(id2, recording, true).catch(() => void 0);
|
|
101861
103214
|
}, maxDurationS * 1e3);
|
|
101862
103215
|
recording.timer.unref?.();
|
|
103216
|
+
if (hq) {
|
|
103217
|
+
const session = hq;
|
|
103218
|
+
capHandler = () => {
|
|
103219
|
+
if (recording.aborted || recording.finishing) return;
|
|
103220
|
+
recording.stopReason = "max_bytes";
|
|
103221
|
+
void finish(id2, recording, true).catch(() => void 0);
|
|
103222
|
+
};
|
|
103223
|
+
session.onFailure((error) => failHigh(id2, recording, error));
|
|
103224
|
+
if (capEarly) capHandler();
|
|
103225
|
+
return {
|
|
103226
|
+
recording: true,
|
|
103227
|
+
path: path2,
|
|
103228
|
+
max_duration_s: maxDurationS,
|
|
103229
|
+
max_bytes: maxBytes,
|
|
103230
|
+
quality: "high",
|
|
103231
|
+
...highShape(session),
|
|
103232
|
+
encoder: session.encoder,
|
|
103233
|
+
bitrate_bps: session.bitrate
|
|
103234
|
+
};
|
|
103235
|
+
}
|
|
101863
103236
|
return {
|
|
101864
103237
|
recording: true,
|
|
101865
103238
|
path: path2,
|
|
@@ -101868,6 +103241,23 @@ async function recordStart(ctx, params, requestId2) {
|
|
|
101868
103241
|
...captureShape(measured)
|
|
101869
103242
|
};
|
|
101870
103243
|
}
|
|
103244
|
+
function failHigh(webContentsId, recording, error) {
|
|
103245
|
+
if (recording.aborted || recording.finishing) return;
|
|
103246
|
+
if (recordings.get(webContentsId) !== recording) return;
|
|
103247
|
+
const session = recording.encoder;
|
|
103248
|
+
settle$1(webContentsId, recording, { error });
|
|
103249
|
+
session?.dispose();
|
|
103250
|
+
void (async () => {
|
|
103251
|
+
await session?.stopCapture().catch(() => void 0);
|
|
103252
|
+
if (recording.viewportToken) {
|
|
103253
|
+
await clearViewport(
|
|
103254
|
+
recording.cdp,
|
|
103255
|
+
recording.contents,
|
|
103256
|
+
recording.viewportToken
|
|
103257
|
+
);
|
|
103258
|
+
}
|
|
103259
|
+
})();
|
|
103260
|
+
}
|
|
101871
103261
|
async function recordStop(ctx, params, requestId2) {
|
|
101872
103262
|
const tab = ctx.registry.requireSurface(String(params.tab ?? ""));
|
|
101873
103263
|
const id2 = tab.view.webContents.id;
|
|
@@ -101897,11 +103287,13 @@ function abortRecording(webContentsId, reason, options = {}) {
|
|
|
101897
103287
|
if (entry.webContentsId === webContentsId) {
|
|
101898
103288
|
entry.cancelled = true;
|
|
101899
103289
|
reservations.delete(token);
|
|
103290
|
+
entry.dispose?.();
|
|
101900
103291
|
}
|
|
101901
103292
|
}
|
|
101902
103293
|
const recording = recordings.get(webContentsId);
|
|
101903
103294
|
if (recording) {
|
|
101904
103295
|
recording.aborted = true;
|
|
103296
|
+
recording.encoder?.dispose();
|
|
101905
103297
|
if (recording.timer !== void 0) {
|
|
101906
103298
|
clearTimeout(recording.timer);
|
|
101907
103299
|
recording.timer = void 0;
|
|
@@ -102068,6 +103460,7 @@ const PROTOCOL_VERSION = "1.3";
|
|
|
102068
103460
|
const ALREADY_ATTACHED = /another debugger|already attached/i;
|
|
102069
103461
|
const STALE_SESSION = /no session|session with given id|no target|target closed/i;
|
|
102070
103462
|
const FRAME_DETACHED = "frame_detached";
|
|
103463
|
+
const PAGE_DISABLED_EVENT = "LocalOperator.pageDisabled";
|
|
102071
103464
|
class CdpPool {
|
|
102072
103465
|
constructor(options = {}) {
|
|
102073
103466
|
this.options = options;
|
|
@@ -102240,13 +103633,32 @@ class CdpPool {
|
|
|
102240
103633
|
"that browser tab is gone; dropped the handle. Use 'open' with a URL to get a new tab"
|
|
102241
103634
|
);
|
|
102242
103635
|
}
|
|
102243
|
-
|
|
103636
|
+
const sent = this.sendTo(
|
|
102244
103637
|
contents,
|
|
102245
103638
|
method,
|
|
102246
103639
|
params,
|
|
102247
103640
|
options.deadlineMs ?? CDP_DEADLINE_MS,
|
|
102248
103641
|
options.sessionId
|
|
102249
103642
|
);
|
|
103643
|
+
if (method !== "Page.disable" || options.sessionId) return sent;
|
|
103644
|
+
const announce = () => {
|
|
103645
|
+
for (const listener of [...this.subscribers.get(contents.id) ?? []]) {
|
|
103646
|
+
try {
|
|
103647
|
+
listener(PAGE_DISABLED_EVENT, {});
|
|
103648
|
+
} catch {
|
|
103649
|
+
}
|
|
103650
|
+
}
|
|
103651
|
+
};
|
|
103652
|
+
return sent.then(
|
|
103653
|
+
(value) => {
|
|
103654
|
+
announce();
|
|
103655
|
+
return value;
|
|
103656
|
+
},
|
|
103657
|
+
(error) => {
|
|
103658
|
+
announce();
|
|
103659
|
+
throw error;
|
|
103660
|
+
}
|
|
103661
|
+
);
|
|
102250
103662
|
}
|
|
102251
103663
|
/**
|
|
102252
103664
|
* The flattened session for one child frame, attached on first use.
|
|
@@ -107038,6 +108450,7 @@ class BrowserHost {
|
|
|
107038
108450
|
approvals;
|
|
107039
108451
|
ownership;
|
|
107040
108452
|
downloads;
|
|
108453
|
+
recordingEncoder;
|
|
107041
108454
|
log;
|
|
107042
108455
|
onChanged;
|
|
107043
108456
|
facts;
|
|
@@ -107079,6 +108492,7 @@ class BrowserHost {
|
|
|
107079
108492
|
this.approvals = options.approvals;
|
|
107080
108493
|
this.ownership = options.ownership;
|
|
107081
108494
|
this.downloads = options.downloads;
|
|
108495
|
+
this.recordingEncoder = options.recordingEncoder;
|
|
107082
108496
|
this.log = options.log;
|
|
107083
108497
|
this.onChanged = options.onChanged;
|
|
107084
108498
|
this.tabAudio = new TabAudioTracker(() => this.onChanged());
|
|
@@ -108021,7 +109435,7 @@ class BrowserHost {
|
|
|
108021
109435
|
"the active tab changed before suggestions were read"
|
|
108022
109436
|
);
|
|
108023
109437
|
}
|
|
108024
|
-
const
|
|
109438
|
+
const live2 = collectAddressHistory(
|
|
108025
109439
|
this.registry.list().map((record) => ({
|
|
108026
109440
|
tabId: record.tabId,
|
|
108027
109441
|
sessionId: record.sessionId,
|
|
@@ -108033,9 +109447,9 @@ class BrowserHost {
|
|
|
108033
109447
|
const historyMatches = this.historyStore?.suggest(request.query, request.limit) ?? [];
|
|
108034
109448
|
return {
|
|
108035
109449
|
requestId: request.requestId,
|
|
108036
|
-
activeTabId:
|
|
109450
|
+
activeTabId: live2.activeTabId,
|
|
108037
109451
|
entries: mergeAddressHistory(
|
|
108038
|
-
|
|
109452
|
+
live2.entries,
|
|
108039
109453
|
historyMatches,
|
|
108040
109454
|
request.query,
|
|
108041
109455
|
request.limit
|
|
@@ -108844,7 +110258,7 @@ class DownloadArmer {
|
|
|
108844
110258
|
});
|
|
108845
110259
|
item.once("done", (_event, state2) => {
|
|
108846
110260
|
capture.pending -= 1;
|
|
108847
|
-
capture.live = capture.live.filter((
|
|
110261
|
+
capture.live = capture.live.filter((live2) => live2 !== entry);
|
|
108848
110262
|
const name = path$1.basename(savePath);
|
|
108849
110263
|
this.release(capture, savePath);
|
|
108850
110264
|
if (entry.weCancelled) {
|
|
@@ -108959,9 +110373,9 @@ class DownloadArmer {
|
|
|
108959
110373
|
}
|
|
108960
110374
|
/** Cancel every download this capture still has writing. */
|
|
108961
110375
|
cancelLive(capture, clause, refusal) {
|
|
108962
|
-
const
|
|
110376
|
+
const live2 = [...capture.live];
|
|
108963
110377
|
capture.live = [];
|
|
108964
|
-
for (const entry of
|
|
110378
|
+
for (const entry of live2) {
|
|
108965
110379
|
if (entry.weCancelled) continue;
|
|
108966
110380
|
this.refuseLive(
|
|
108967
110381
|
capture,
|
|
@@ -109912,14 +111326,14 @@ class OwnershipLedger {
|
|
|
109912
111326
|
}
|
|
109913
111327
|
scope2.generation = generation;
|
|
109914
111328
|
const allocation = scope2.allocations[String(params.allocation_id ?? "")];
|
|
109915
|
-
const
|
|
111329
|
+
const live2 = allocation?.tab ? this.hooks.isLive(allocation.tab) : false;
|
|
109916
111330
|
const unresolved = allocation && ["allocating", "allocated", "cleanup_pending"].includes(
|
|
109917
111331
|
allocation.state
|
|
109918
111332
|
);
|
|
109919
111333
|
return {
|
|
109920
111334
|
ownership_version: 1,
|
|
109921
|
-
state:
|
|
109922
|
-
tab:
|
|
111335
|
+
state: live2 ? allocation.state : unresolved ? "allocating" : "closed",
|
|
111336
|
+
tab: live2 ? allocation.tab ?? "" : "",
|
|
109923
111337
|
retention: scope2.retention ?? "",
|
|
109924
111338
|
terminal: scope2.terminal ?? "",
|
|
109925
111339
|
unknown_reservations: scope2.unknownReservations
|
|
@@ -111222,15 +112636,15 @@ class SessionCookieVault {
|
|
|
111222
112636
|
for (const stored of snapshot2.cookies) {
|
|
111223
112637
|
const identity2 = cookieIdentity(stored);
|
|
111224
112638
|
if (!attempted.has(identity2)) continue;
|
|
111225
|
-
const
|
|
111226
|
-
if (!
|
|
112639
|
+
const live2 = byIdentity.get(identity2);
|
|
112640
|
+
if (!live2) {
|
|
111227
112641
|
report.drifted.push({
|
|
111228
112642
|
name: stored.name,
|
|
111229
112643
|
reason: "not present after the write"
|
|
111230
112644
|
});
|
|
111231
112645
|
continue;
|
|
111232
112646
|
}
|
|
111233
|
-
const drift = attributeDrift(stored,
|
|
112647
|
+
const drift = attributeDrift(stored, live2) ?? sourceMetadataDrift(attempted.get(identity2), live2);
|
|
111234
112648
|
if (drift) report.drifted.push({ name: stored.name, reason: drift });
|
|
111235
112649
|
}
|
|
111236
112650
|
} catch (error) {
|
|
@@ -111461,26 +112875,26 @@ function readMarkerExists(path2) {
|
|
|
111461
112875
|
return false;
|
|
111462
112876
|
}
|
|
111463
112877
|
}
|
|
111464
|
-
function sourceMetadataDrift(params,
|
|
112878
|
+
function sourceMetadataDrift(params, live2) {
|
|
111465
112879
|
if (!params) return null;
|
|
111466
|
-
if (params.sourceScheme !== void 0 && params.sourceScheme !==
|
|
111467
|
-
return `the jar stored source scheme ${String(
|
|
112880
|
+
if (params.sourceScheme !== void 0 && params.sourceScheme !== live2.sourceScheme) {
|
|
112881
|
+
return `the jar stored source scheme ${String(live2.sourceScheme)} where the write asked for ${String(params.sourceScheme)}`;
|
|
111468
112882
|
}
|
|
111469
|
-
if (params.sourcePort !== void 0 && Number(params.sourcePort) !== Number(
|
|
111470
|
-
return `the jar stored source port ${String(
|
|
112883
|
+
if (params.sourcePort !== void 0 && Number(params.sourcePort) !== Number(live2.sourcePort)) {
|
|
112884
|
+
return `the jar stored source port ${String(live2.sourcePort)} where the write asked for ${String(params.sourcePort)}`;
|
|
111471
112885
|
}
|
|
111472
112886
|
return null;
|
|
111473
112887
|
}
|
|
111474
|
-
function attributeDrift(stored,
|
|
111475
|
-
if (
|
|
111476
|
-
if (
|
|
111477
|
-
if (
|
|
111478
|
-
return `httpOnly became ${
|
|
111479
|
-
if (!isSessionCookie(
|
|
111480
|
-
if (sameSiteShape(
|
|
111481
|
-
return `sameSite became ${sameSiteShape(
|
|
112888
|
+
function attributeDrift(stored, live2) {
|
|
112889
|
+
if (live2.value !== stored.value) return "value changed";
|
|
112890
|
+
if (live2.secure !== stored.secure) return `secure became ${live2.secure}`;
|
|
112891
|
+
if (live2.httpOnly !== stored.httpOnly)
|
|
112892
|
+
return `httpOnly became ${live2.httpOnly}`;
|
|
112893
|
+
if (!isSessionCookie(live2)) return "no longer a session cookie";
|
|
112894
|
+
if (sameSiteShape(live2.sameSite) !== sameSiteShape(stored.sameSite)) {
|
|
112895
|
+
return `sameSite became ${sameSiteShape(live2.sameSite)}`;
|
|
111482
112896
|
}
|
|
111483
|
-
const livePartition = partitionKeyForWrite(
|
|
112897
|
+
const livePartition = partitionKeyForWrite(live2);
|
|
111484
112898
|
if (!livePartition.ok) return "partition identity is no longer representable";
|
|
111485
112899
|
if (!samePartition(livePartition.key, stored.partitionKey))
|
|
111486
112900
|
return "partition identity changed";
|
|
@@ -112818,6 +114232,11 @@ async function initializeBrowserHost(options, bindings) {
|
|
|
112818
114232
|
approvals,
|
|
112819
114233
|
ownership,
|
|
112820
114234
|
downloads,
|
|
114235
|
+
recordingEncoder: options.recordingEncoder ? createRecordingEncoderService({
|
|
114236
|
+
documentUrl: options.recordingEncoder.documentUrl,
|
|
114237
|
+
preloadPath: options.recordingEncoder.preloadPath,
|
|
114238
|
+
log: log2
|
|
114239
|
+
}) : void 0,
|
|
112821
114240
|
log: log2,
|
|
112822
114241
|
onChanged: notifyChanged,
|
|
112823
114242
|
facts: () => facts,
|
|
@@ -113127,6 +114546,7 @@ async function initializeBrowserHost(options, bindings) {
|
|
|
113127
114546
|
approvalsExpiryTimer = null;
|
|
113128
114547
|
}
|
|
113129
114548
|
approvalsOverlay?.dispose("host-stop");
|
|
114549
|
+
disposeAllRecordingEncoders();
|
|
113130
114550
|
registry.destroyAll();
|
|
113131
114551
|
await Promise.allSettled([...releases]);
|
|
113132
114552
|
await cdp.close();
|
|
@@ -115846,8 +117266,8 @@ function parseTeamBridgeNotifyRequest(value) {
|
|
|
115846
117266
|
const TEAM_BRIDGE_IMAGE_TTL_MS = 15 * 6e4;
|
|
115847
117267
|
const TEAM_BRIDGE_INITIALS_TTL_MS = 12 * 60 * 6e4;
|
|
115848
117268
|
const TEAM_BRIDGE_IMAGE_MAX_ENTRIES = 128;
|
|
115849
|
-
const TEAM_BRIDGE_IMAGE_MAX_BYTES =
|
|
115850
|
-
const TEAM_BRIDGE_IMAGE_SIZE =
|
|
117269
|
+
const TEAM_BRIDGE_IMAGE_MAX_BYTES = 48 * 1024 * 1024;
|
|
117270
|
+
const TEAM_BRIDGE_IMAGE_SIZE = 256;
|
|
115851
117271
|
const TEAM_BRIDGE_DIRECTORY_REPLAY_MAX = 16;
|
|
115852
117272
|
const TEAM_BRIDGE_IMAGE_NEGATIVE_TTL_MS = 3e4;
|
|
115853
117273
|
const TEAM_BRIDGE_IMAGE_WARM_CONCURRENCY = 2;
|
|
@@ -115870,7 +117290,7 @@ function validNotificationPng(data) {
|
|
|
115870
117290
|
const signature = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
115871
117291
|
if (!signature.every((byte, i) => data[i] === byte)) return false;
|
|
115872
117292
|
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
115873
|
-
return view.getUint32(8) === 13 && view.getUint32(12) === 1229472850 && view.getUint32(16) ===
|
|
117293
|
+
return view.getUint32(8) === 13 && view.getUint32(12) === 1229472850 && view.getUint32(16) === TEAM_BRIDGE_IMAGE_SIZE && view.getUint32(20) === TEAM_BRIDGE_IMAGE_SIZE;
|
|
115874
117294
|
}
|
|
115875
117295
|
class TeamBridgeNotificationImages {
|
|
115876
117296
|
constructor(options) {
|
|
@@ -116516,9 +117936,9 @@ class TeamBridgeNotifier {
|
|
|
116516
117936
|
const pending = this.pendingOpen;
|
|
116517
117937
|
this.pendingOpen = null;
|
|
116518
117938
|
if (!pending) return null;
|
|
116519
|
-
const
|
|
117939
|
+
const unavailable2 = this.pendingUnavailable;
|
|
116520
117940
|
this.pendingUnavailable = false;
|
|
116521
|
-
return !
|
|
117941
|
+
return !unavailable2 && pending.owner.accountId === this.authority?.accountId ? pending : { unavailable: true };
|
|
116522
117942
|
}
|
|
116523
117943
|
replace(conversationId) {
|
|
116524
117944
|
const previous = this.banners.get(conversationId);
|
|
@@ -116530,8 +117950,8 @@ class TeamBridgeNotifier {
|
|
|
116530
117950
|
retainTarget(notification, target2) {
|
|
116531
117951
|
const conversationId = target2.conversationId;
|
|
116532
117952
|
this.lifetime.retain(notification, () => {
|
|
116533
|
-
const
|
|
116534
|
-
if (
|
|
117953
|
+
const live2 = this.banners.get(conversationId) === notification;
|
|
117954
|
+
if (live2) this.banners.delete(conversationId);
|
|
116535
117955
|
this.open(target2, this.revokedBanners.has(notification));
|
|
116536
117956
|
});
|
|
116537
117957
|
notification.once("close", () => {
|
|
@@ -116540,9 +117960,9 @@ class TeamBridgeNotifier {
|
|
|
116540
117960
|
}
|
|
116541
117961
|
});
|
|
116542
117962
|
}
|
|
116543
|
-
open(target2,
|
|
117963
|
+
open(target2, unavailable2 = false) {
|
|
116544
117964
|
this.pendingOpen = target2;
|
|
116545
|
-
this.pendingUnavailable =
|
|
117965
|
+
this.pendingUnavailable = unavailable2;
|
|
116546
117966
|
const window = this.options.window();
|
|
116547
117967
|
if (window && !window.isDestroyed()) {
|
|
116548
117968
|
this.options.host.signalOpen();
|
|
@@ -116830,10 +118250,10 @@ function runtimeStragglerCount(body, current) {
|
|
|
116830
118250
|
}
|
|
116831
118251
|
function daemonMoveOutcome(report) {
|
|
116832
118252
|
if (report === null) return null;
|
|
116833
|
-
const
|
|
118253
|
+
const failed2 = report.daemons.filter(
|
|
116834
118254
|
(daemon) => daemon.status === "failed" || daemon.status === "unsupervised"
|
|
116835
118255
|
).map((daemon) => daemon.name);
|
|
116836
|
-
return { source: "report", moved:
|
|
118256
|
+
return { source: "report", moved: failed2.length === 0, failed: failed2 };
|
|
116837
118257
|
}
|
|
116838
118258
|
const CHROMIUM_TRANSPORT_CODES = [
|
|
116839
118259
|
"ERR_INTERNET_DISCONNECTED",
|
|
@@ -117037,9 +118457,9 @@ async function reengageDisplacedSessions(input) {
|
|
|
117037
118457
|
return { displaced: [], engaged: [], failed: [], stillResident: [] };
|
|
117038
118458
|
const snapshotIds = snapshot2.map((row) => row.sessionId);
|
|
117039
118459
|
const stillLiveIn = (rows) => {
|
|
117040
|
-
const
|
|
117041
|
-
if (
|
|
117042
|
-
return new Set(snapshotIds.filter((id2) =>
|
|
118460
|
+
const live2 = liveRosterIds(rows);
|
|
118461
|
+
if (live2 === null) return null;
|
|
118462
|
+
return new Set(snapshotIds.filter((id2) => live2.has(id2)));
|
|
117043
118463
|
};
|
|
117044
118464
|
let after = await input.readRoster();
|
|
117045
118465
|
let stillLive = stillLiveIn(after) ?? new Set(snapshotIds);
|
|
@@ -117068,26 +118488,26 @@ async function reengageDisplacedSessions(input) {
|
|
|
117068
118488
|
(row) => stillLiveAtEnd.has(row.sessionId)
|
|
117069
118489
|
);
|
|
117070
118490
|
const engaged = [];
|
|
117071
|
-
const
|
|
118491
|
+
const failed2 = [];
|
|
117072
118492
|
for (const row of displaced) {
|
|
117073
118493
|
try {
|
|
117074
118494
|
if (await input.engage(row)) engaged.push(row.sessionId);
|
|
117075
118495
|
else
|
|
117076
|
-
|
|
118496
|
+
failed2.push({
|
|
117077
118497
|
sessionId: row.sessionId,
|
|
117078
118498
|
reason: "the server did not take the engage"
|
|
117079
118499
|
});
|
|
117080
118500
|
} catch (error) {
|
|
117081
|
-
|
|
118501
|
+
failed2.push({
|
|
117082
118502
|
sessionId: row.sessionId,
|
|
117083
118503
|
reason: error instanceof Error ? error.message : String(error)
|
|
117084
118504
|
});
|
|
117085
118505
|
}
|
|
117086
118506
|
}
|
|
117087
118507
|
input.log?.(
|
|
117088
|
-
`Re-engaged ${engaged.length} of ${displaced.length} displaced session(s)${
|
|
118508
|
+
`Re-engaged ${engaged.length} of ${displaced.length} displaced session(s)${failed2.length > 0 ? `; ${failed2.length} did not answer (${failed2.map((row) => row.sessionId).join(", ")})` : ""}${stillResident.length > 0 ? `; ${stillResident.length} pre-swap runtime(s) still resident when the wait ended (${stillResident.map((row) => row.sessionId).join(", ")}), which nothing re-engages afterwards and which go cold on their own schedule` : ""}`
|
|
117089
118509
|
);
|
|
117090
|
-
return { displaced, engaged, failed, stillResident };
|
|
118510
|
+
return { displaced, engaged, failed: failed2, stillResident };
|
|
117091
118511
|
}
|
|
117092
118512
|
const SESSION_ENGAGE_OPEN_MS = 5e3;
|
|
117093
118513
|
const SESSION_ENGAGE_BEAT_MS = 5e3;
|
|
@@ -117152,8 +118572,8 @@ async function engageSessionThroughStream(input) {
|
|
|
117152
118572
|
let leaseHeld = true;
|
|
117153
118573
|
const leaseAt = input.now();
|
|
117154
118574
|
while (input.now() - startedAt < openMs + holdMs) {
|
|
117155
|
-
const
|
|
117156
|
-
if (
|
|
118575
|
+
const live2 = await input.hasRuntime();
|
|
118576
|
+
if (live2 === true) {
|
|
117157
118577
|
cameUp = true;
|
|
117158
118578
|
break;
|
|
117159
118579
|
}
|
|
@@ -122497,25 +123917,25 @@ ${heal.removed.join("\n")}`,
|
|
|
122497
123917
|
const after = await this.readFleetSnapshot(backend);
|
|
122498
123918
|
const displaced = displacedSessions(snapshot2, after);
|
|
122499
123919
|
const engaged = [];
|
|
122500
|
-
const
|
|
123920
|
+
const failed2 = [];
|
|
122501
123921
|
for (const row of displaced) {
|
|
122502
123922
|
try {
|
|
122503
123923
|
if (await this.engageSessionRuntime(backend, row))
|
|
122504
123924
|
engaged.push(row.sessionId);
|
|
122505
123925
|
else
|
|
122506
|
-
|
|
123926
|
+
failed2.push({
|
|
122507
123927
|
sessionId: row.sessionId,
|
|
122508
123928
|
reason: "the server did not take the engage"
|
|
122509
123929
|
});
|
|
122510
123930
|
} catch (error) {
|
|
122511
|
-
|
|
123931
|
+
failed2.push({
|
|
122512
123932
|
sessionId: row.sessionId,
|
|
122513
123933
|
reason: error instanceof Error ? error.message : String(error)
|
|
122514
123934
|
});
|
|
122515
123935
|
}
|
|
122516
123936
|
}
|
|
122517
123937
|
logger.info(
|
|
122518
|
-
`Re-engaged ${engaged.length} of ${displaced.length} session(s) displaced by the restart${
|
|
123938
|
+
`Re-engaged ${engaged.length} of ${displaced.length} session(s) displaced by the restart${failed2.length > 0 ? `; ${failed2.length} did not answer (${failed2.map((row) => row.sessionId).join(", ")})` : ""}`,
|
|
122519
123939
|
LogFileType.UPDATE_SERVICE
|
|
122520
123940
|
);
|
|
122521
123941
|
if (after === null) return null;
|
|
@@ -126310,6 +127730,10 @@ electron.app.whenReady().then(async () => {
|
|
|
126310
127730
|
rendererUrl,
|
|
126311
127731
|
"browser-approvals-overlay.html"
|
|
126312
127732
|
);
|
|
127733
|
+
const recordingEncoderDocumentUrl = documentUrlFor(
|
|
127734
|
+
rendererUrl,
|
|
127735
|
+
"recording-encoder.html"
|
|
127736
|
+
);
|
|
126313
127737
|
backendService.observeDesktopFeed(
|
|
126314
127738
|
(frame) => {
|
|
126315
127739
|
appAttention.observe(frame);
|
|
@@ -127244,6 +128668,13 @@ electron.app.whenReady().then(async () => {
|
|
|
127244
128668
|
"../preload/browser-approvals-overlay.js"
|
|
127245
128669
|
)
|
|
127246
128670
|
},
|
|
128671
|
+
// The hidden H.264 encoder behind `record_start {quality: "high"}`:
|
|
128672
|
+
// the app's own bundled document and preload, derived like the
|
|
128673
|
+
// documents above and never caller-supplied.
|
|
128674
|
+
recordingEncoder: {
|
|
128675
|
+
documentUrl: recordingEncoderDocumentUrl,
|
|
128676
|
+
preloadPath: path$1.join(__dirname, "../preload/recording-encoder.js")
|
|
128677
|
+
},
|
|
127247
128678
|
preloadPath: path$1.join(__dirname, "../preload/index.js"),
|
|
127248
128679
|
/*
|
|
127249
128680
|
* The console's surfaces are handed the user's own PATH, from the same
|
|
@@ -127473,6 +128904,7 @@ electron.app.on("before-quit", async (event) => {
|
|
|
127473
128904
|
launcherWatch?.stop();
|
|
127474
128905
|
armHeadlessExitDeadline("the app is quitting");
|
|
127475
128906
|
}
|
|
128907
|
+
disposeAllRecordingEncoders();
|
|
127476
128908
|
if (await holdQuitForSessionCookieSnapshot(event)) return;
|
|
127477
128909
|
quitExitDeadline.phase("after the session-cookie hold");
|
|
127478
128910
|
logger.info("App is about to quit", LogFileType.BACKEND);
|
|
@@ -127494,6 +128926,7 @@ electron.app.on("before-quit", async (event) => {
|
|
|
127494
128926
|
);
|
|
127495
128927
|
}
|
|
127496
128928
|
activeUpdateService?.quitForInFlightInstall("app quit");
|
|
128929
|
+
disposeAllRecordingEncoders();
|
|
127497
128930
|
void stopBrowserHost();
|
|
127498
128931
|
quitExitDeadline.phase("awaiting the window close");
|
|
127499
128932
|
});
|