local-operator-ui 0.50.2 → 0.50.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/out/main/index.js +556 -110
  2. package/out/preload/index.js +29 -1
  3. package/out/renderer/assets/{_basePickBy-B0CGodz5.js → _basePickBy-BIQfMR48.js} +1 -1
  4. package/out/renderer/assets/{_baseUniq-8ysZQvmz.js → _baseUniq-BgTVzDm4.js} +1 -1
  5. package/out/renderer/assets/{agent-details-page-CdnNoAG1.js → agent-details-page-CK7UCkbX.js} +1 -1
  6. package/out/renderer/assets/{agent-hub-page-DzJe_j6z.js → agent-hub-page-CjntTfYQ.js} +1 -1
  7. package/out/renderer/assets/{agents-page-B8ehgi1r.js → agents-page-C6JEzbLk.js} +3 -3
  8. package/out/renderer/assets/{appearance-DxToWtVc.js → appearance-Cr-wz2XG.js} +36 -36
  9. package/out/renderer/assets/{approvalsOverlay-C-vFFJMh.js → approvalsOverlay-JbQyo85G.js} +1 -1
  10. package/out/renderer/assets/{arc-C6vMPnZo.js → arc-DlEzSww-.js} +1 -1
  11. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-BaKmVFd8.js → architectureDiagram-IEHRJDOE-BHqdE7jj.js} +1 -1
  12. package/out/renderer/assets/{avatar-cropper-CCvczwaj.js → avatar-cropper-Y_1k15A7.js} +1 -1
  13. package/out/renderer/assets/{blockDiagram-JOT3LUYC-DNJTzz0-.js → blockDiagram-JOT3LUYC-Ct_S7g13.js} +1 -1
  14. package/out/renderer/assets/{book-open-AjJXGzb6.js → book-open--MyFxzqx.js} +1 -1
  15. package/out/renderer/assets/browser-page-CvQaa7ZF.js +1 -0
  16. package/out/renderer/assets/{browser-webauthn-prompt-D7ldFLmy.js → browser-webauthn-prompt-D4MzNaMs.js} +1 -1
  17. package/out/renderer/assets/{building-2-DrbuKv4e.js → building-2-DtAeE_Wx.js} +1 -1
  18. package/out/renderer/assets/{c4Diagram-VJAJSXHY-CFvnENAF.js → c4Diagram-VJAJSXHY-0cfxxrV1.js} +1 -1
  19. package/out/renderer/assets/channel-BIfd2mO_.js +1 -0
  20. package/out/renderer/assets/{chunk-4BMEZGHF-DSSF88xF.js → chunk-4BMEZGHF-DFPtGlqQ.js} +1 -1
  21. package/out/renderer/assets/{chunk-A2AXSNBT-DW2Smd4N.js → chunk-A2AXSNBT-meyStMgl.js} +1 -1
  22. package/out/renderer/assets/{chunk-AEK57VVT-vmOkmkFl.js → chunk-AEK57VVT-BEdPo4ks.js} +1 -1
  23. package/out/renderer/assets/{chunk-D6G4REZN-C-1gQ6dD.js → chunk-D6G4REZN-DcExUv5N.js} +1 -1
  24. package/out/renderer/assets/{chunk-RZ5BOZE2-CvkHOneP.js → chunk-RZ5BOZE2-D97bec7O.js} +1 -1
  25. package/out/renderer/assets/{chunk-XZIHB7SX-DtVS8cQp.js → chunk-XZIHB7SX-DGjNqQ8a.js} +1 -1
  26. package/out/renderer/assets/classDiagram-GIVACNV2-u2P52chH.js +1 -0
  27. package/out/renderer/assets/classDiagram-v2-COTLJTTW-u2P52chH.js +1 -0
  28. package/out/renderer/assets/clone-DXgy9Qu9.js +1 -0
  29. package/out/renderer/assets/{console-mirror-CUiw0R0Z.js → console-mirror-D1SJfDTV.js} +1 -1
  30. package/out/renderer/assets/{consoleCapture-CEIY9xSK.js → consoleCapture-BQo7ETQQ.js} +1 -1
  31. package/out/renderer/assets/{conversation-input-sync-BGfWeOqy.js → conversation-input-sync-BDpuF7C6.js} +263 -263
  32. package/out/renderer/assets/{dagre-OKDRZEBW-CWzXBwaH.js → dagre-OKDRZEBW-CBaDWFEt.js} +1 -1
  33. package/out/renderer/assets/{diagram-SSKATNLV-t868hyXW.js → diagram-SSKATNLV-ispcTo5e.js} +1 -1
  34. package/out/renderer/assets/{diagram-VNBRO52H-DUoOE-bt.js → diagram-VNBRO52H-BDlsgMn-.js} +1 -1
  35. package/out/renderer/assets/{erDiagram-Q7BY3M3F-DYWVOUdq.js → erDiagram-Q7BY3M3F-CYPeSaH3.js} +1 -1
  36. package/out/renderer/assets/{error-boundary-CtkXM619.js → error-boundary-iA1OMXPz.js} +2 -2
  37. package/out/renderer/assets/{flowDiagram-4HSFHLVR-BswlGsLM.js → flowDiagram-4HSFHLVR-CMLsGESL.js} +1 -1
  38. package/out/renderer/assets/{ganttDiagram-APWFNJXF-CCEe3Tdm.js → ganttDiagram-APWFNJXF-BRVxsCCP.js} +1 -1
  39. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-Bl10LWvi.js → gitGraphDiagram-7IBYFJ6S-DE5og2RV.js} +1 -1
  40. package/out/renderer/assets/{graph-DKQjDGox.js → graph-DDnRFykm.js} +1 -1
  41. package/out/renderer/assets/{heart-mTaKHtD-.js → heart-CCdYNI3u.js} +1 -1
  42. package/out/renderer/assets/index-B-6m8CCG.css +1 -0
  43. package/out/renderer/assets/{index-BcwoLiEJ.js → index-Bs2AkJmK.js} +1 -1
  44. package/out/renderer/assets/{index-CWP3MhTA.js → index-CiHJ3lYz.js} +1 -1
  45. package/out/renderer/assets/{index-Bh3nSSKU.js → index-Cpnot8lK.js} +183 -183
  46. package/out/renderer/assets/{index-CfE0tEz7.js → index-Fa4fKvzr.js} +1 -1
  47. package/out/renderer/assets/infoDiagram-PH2N3AL5-Bdk9rxy6.js +2 -0
  48. package/out/renderer/assets/{installer-D-_8CWoh.js → installer-DvzmkQaw.js} +1 -1
  49. package/out/renderer/assets/{journeyDiagram-U35MCT3I-B5JRH6pA.js → journeyDiagram-U35MCT3I-go9IQj5S.js} +1 -1
  50. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BMQ51i2A.js → kanban-definition-NDS4AKOZ-BHwLNw_X.js} +1 -1
  51. package/out/renderer/assets/{layout-BlYEyiLa.js → layout-zQcTVlOl.js} +1 -1
  52. package/out/renderer/assets/{legacy-agents-page-Ca9aGS2m.js → legacy-agents-page-BilFWlCA.js} +1 -1
  53. package/out/renderer/assets/{library-page-1Q4ToZpC.js → library-page-BCQH7-hs.js} +3 -3
  54. package/out/renderer/assets/{log-in-Cz3YBOsh.js → log-in-D60gifZq.js} +1 -1
  55. package/out/renderer/assets/{mermaid.core-D7HsriVr.js → mermaid.core-DZNLevFz.js} +5 -5
  56. package/out/renderer/assets/{mesh-page-B2xAXfjA.js → mesh-page-CLeQ-D4w.js} +1 -1
  57. package/out/renderer/assets/{messages-CvRfSjnp.js → messages-Be02UCki.js} +8 -8
  58. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-CMk15Uui.js → mindmap-definition-ALO5MXBD-DrOY-0sS.js} +1 -1
  59. package/out/renderer/assets/{mini-lkT5V9WE.js → mini-Bab6ERe8.js} +1 -1
  60. package/out/renderer/assets/{notebook-pen-DadCKhKK.js → notebook-pen-DTmLjGHC.js} +1 -1
  61. package/out/renderer/assets/{notifications-page-DLvG89Rx.js → notifications-page-BbM3mzCl.js} +1 -1
  62. package/out/renderer/assets/{org-access-mvMfl6RO.js → org-access-3xV9NsSd.js} +1 -1
  63. package/out/renderer/assets/{org-surface-gate-DG0gOjUM.js → org-surface-gate-JoOFLPYi.js} +1 -1
  64. package/out/renderer/assets/{page-header-CyxvZBjK.js → page-header-BBtmeXz0.js} +1 -1
  65. package/out/renderer/assets/{pieDiagram-IB7DONF6-B5VgM5cu.js → pieDiagram-IB7DONF6-JyfdH5gn.js} +1 -1
  66. package/out/renderer/assets/{project-markdown-C7j9JEv7.js → project-markdown-D6HwXefM.js} +1 -1
  67. package/out/renderer/assets/{projects-page-Cy7ci4iQ.js → projects-page-D5xBEICx.js} +1 -1
  68. package/out/renderer/assets/{publication-validation-LHyYGXxk.js → publication-validation-pOLp0dos.js} +1 -1
  69. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-CabDBOXn.js → quadrantDiagram-7GDLP6J5-BBtDnoHn.js} +1 -1
  70. package/out/renderer/assets/{radar-MK3ICKWK-Bs5DDyVg.js → radar-MK3ICKWK-CtHJCWrJ.js} +1 -1
  71. package/out/renderer/assets/{radient-auth-buttons-CjpUv3nP.js → radient-auth-buttons-DNkhmyBv.js} +1 -1
  72. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-s_UB9693.js → requirementDiagram-KVF5MWMF-sB5SDSjY.js} +1 -1
  73. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-FBDT6-L8.js → sankeyDiagram-QLVOVGJD-CGioYe_J.js} +1 -1
  74. package/out/renderer/assets/{schedules-page-DWG-H1tc.js → schedules-page-jothEmnC.js} +1 -1
  75. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-Dk2LRARF.js → sequenceDiagram-X6HHIX6F-CuNhF6i-.js} +1 -1
  76. package/out/renderer/assets/{settings-page-Cc3TAlMl.js → settings-page-caFCB3St.js} +1 -1
  77. package/out/renderer/assets/{smartart-CZP-KJQm.js → smartart-CGZfbyUs.js} +1 -1
  78. package/out/renderer/assets/{stateDiagram-DGXRK772-nAeHi0Q3.js → stateDiagram-DGXRK772-D5ElgpJs.js} +1 -1
  79. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-61oDVBom.js +1 -0
  80. package/out/renderer/assets/{team-bridge-page-DyGy6Kbj.js → team-bridge-page-4TgWaKxG.js} +19 -19
  81. package/out/renderer/assets/{team-bridge-scope-preference-DMVpYrdA.js → team-bridge-scope-preference-D5JQQEFh.js} +1 -1
  82. package/out/renderer/assets/{timeline-definition-BDJGKUSR-pJTYZrUl.js → timeline-definition-BDJGKUSR-B1vy2fC7.js} +1 -1
  83. package/out/renderer/assets/{use-download-agent-mutation-BimCWRpf.js → use-download-agent-mutation-CHGnPs7p.js} +1 -1
  84. package/out/renderer/assets/{use-session-snapshot-D90Nwywl.js → use-session-snapshot-BpNsrx-E.js} +1 -1
  85. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-CNYZmTD0.js → xychartDiagram-VJFVF3MP-C-K_hlon.js} +1 -1
  86. package/out/renderer/browser-approvals-overlay.html +2 -2
  87. package/out/renderer/console-capture.html +6 -6
  88. package/out/renderer/index.html +8 -8
  89. package/out/renderer/installer.html +5 -5
  90. package/out/renderer/mini.html +8 -8
  91. package/package.json +1 -1
  92. package/out/renderer/assets/browser-page-B1LNZlf_.js +0 -1
  93. package/out/renderer/assets/channel-C0mudVZF.js +0 -1
  94. package/out/renderer/assets/classDiagram-GIVACNV2-DfsohnxP.js +0 -1
  95. package/out/renderer/assets/classDiagram-v2-COTLJTTW-DfsohnxP.js +0 -1
  96. package/out/renderer/assets/clone-DogRJTvD.js +0 -1
  97. package/out/renderer/assets/index-CaftKcJ-.css +0 -1
  98. package/out/renderer/assets/infoDiagram-PH2N3AL5-BOATky3y.js +0 -2
  99. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CdCpeeGq.js +0 -1
package/out/main/index.js CHANGED
@@ -6022,6 +6022,10 @@ const enUiChatTranscriptCopy = {
6022
6022
  "ui.chat.transcript_copy.selection.copy": "Copy selection",
6023
6023
  "ui.chat.transcript_copy.selection.toolbar": "Selection actions"
6024
6024
  };
6025
+ const enUiChatUserTurn = {
6026
+ "ui.chat.user_turn.show_more": "Show more",
6027
+ "ui.chat.user_turn.show_less": "Show less"
6028
+ };
6025
6029
  const enUiCodeReview = {
6026
6030
  "ui.code_review.activity.close": "closed",
6027
6031
  "ui.code_review.activity.comment": "commented",
@@ -10770,7 +10774,15 @@ const enUiTeamBridge = {
10770
10774
  "ui.teamBridge.conversation_menu.error.not_in_general": "Your agent isn’t in {channel} yet, so there’s nothing to remove.",
10771
10775
  "ui.teamBridge.conversation_menu.partial_leave.body": "You left {conversation}. Your agent is still in this conversation.",
10772
10776
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "You left {conversation}, but your agent still couldn’t be removed. Try again.",
10773
- "ui.teamBridge.conversation_menu.partial_leave.retry": "Remove my agent"
10777
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "Remove my agent",
10778
+ "ui.teamBridge.files.staged": "Attached files",
10779
+ "ui.teamBridge.files.failed": "Upload failed",
10780
+ "ui.teamBridge.files.retry": "Retry file upload",
10781
+ "ui.teamBridge.files.remove": "Remove file",
10782
+ "ui.teamBridge.files.unavailable": "Files are unavailable for this account. Remove the file to send text or images.",
10783
+ "ui.teamBridge.files.add": "Attach files",
10784
+ "ui.teamBridge.files.no_schedule": "Files can be sent now, but cannot be scheduled.",
10785
+ "ui.teamBridge.files.uploading": "Uploading file…"
10774
10786
  };
10775
10787
  const enUiTeamBridgeLeave = {
10776
10788
  "ui.teamBridge.leave.back": "Back",
@@ -14103,6 +14115,10 @@ const esUiChatTranscriptCopy = {
14103
14115
  "ui.chat.transcript_copy.selection.copy": "Copiar selección",
14104
14116
  "ui.chat.transcript_copy.selection.toolbar": "Acciones de la selección"
14105
14117
  };
14118
+ const esUiChatUserTurn = {
14119
+ "ui.chat.user_turn.show_more": "Mostrar más",
14120
+ "ui.chat.user_turn.show_less": "Mostrar menos"
14121
+ };
14106
14122
  const esUiCodeReview = {
14107
14123
  "ui.code_review.activity.close": "cerraste",
14108
14124
  "ui.code_review.activity.comment": "comentaste",
@@ -18851,7 +18867,15 @@ const esUiTeamBridge = {
18851
18867
  "ui.teamBridge.conversation_menu.error.not_in_general": "Tu agente todavía no está en {channel}, así que no hay nada que eliminar.",
18852
18868
  "ui.teamBridge.conversation_menu.partial_leave.body": "Saliste de {conversation}. Tu agente sigue en esta conversación.",
18853
18869
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "Saliste de {conversation}, pero aún no se pudo eliminar a tu agente. Inténtalo de nuevo.",
18854
- "ui.teamBridge.conversation_menu.partial_leave.retry": "Eliminar a mi agente"
18870
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "Eliminar a mi agente",
18871
+ "ui.teamBridge.files.staged": "Archivos adjuntos",
18872
+ "ui.teamBridge.files.failed": "Error al subir",
18873
+ "ui.teamBridge.files.retry": "Reintentar la subida",
18874
+ "ui.teamBridge.files.remove": "Quitar archivo",
18875
+ "ui.teamBridge.files.unavailable": "Los archivos no están disponibles para esta cuenta. Quita el archivo para enviar texto o imágenes.",
18876
+ "ui.teamBridge.files.add": "Adjuntar archivos",
18877
+ "ui.teamBridge.files.no_schedule": "Los archivos se pueden enviar ahora, pero no programar.",
18878
+ "ui.teamBridge.files.uploading": "Subiendo archivo…"
18855
18879
  };
18856
18880
  const esUiTeamBridgeLeave = {
18857
18881
  "ui.teamBridge.leave.back": "Atrás",
@@ -22184,6 +22208,10 @@ const frUiChatTranscriptCopy = {
22184
22208
  "ui.chat.transcript_copy.selection.copy": "Copier la sélection",
22185
22209
  "ui.chat.transcript_copy.selection.toolbar": "Actions de la sélection"
22186
22210
  };
22211
+ const frUiChatUserTurn = {
22212
+ "ui.chat.user_turn.show_more": "Afficher plus",
22213
+ "ui.chat.user_turn.show_less": "Afficher moins"
22214
+ };
22187
22215
  const frUiCodeReview = {
22188
22216
  "ui.code_review.activity.close": "avez fermé",
22189
22217
  "ui.code_review.activity.comment": "avez commenté",
@@ -26932,7 +26960,15 @@ const frUiTeamBridge = {
26932
26960
  "ui.teamBridge.conversation_menu.error.not_in_general": "Votre agent n’est pas encore dans {channel} : il n’y a rien à retirer.",
26933
26961
  "ui.teamBridge.conversation_menu.partial_leave.body": "Vous avez quitté {conversation}. Votre agent est toujours dans cette conversation.",
26934
26962
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "Vous avez quitté {conversation}, mais votre agent n’a toujours pas pu être retiré. Réessayez.",
26935
- "ui.teamBridge.conversation_menu.partial_leave.retry": "Retirer mon agent"
26963
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "Retirer mon agent",
26964
+ "ui.teamBridge.files.staged": "Fichiers joints",
26965
+ "ui.teamBridge.files.failed": "Échec du téléversement",
26966
+ "ui.teamBridge.files.retry": "Réessayer le téléversement",
26967
+ "ui.teamBridge.files.remove": "Retirer le fichier",
26968
+ "ui.teamBridge.files.unavailable": "Les fichiers ne sont pas disponibles pour ce compte. Retirez le fichier pour envoyer du texte ou des images.",
26969
+ "ui.teamBridge.files.add": "Joindre des fichiers",
26970
+ "ui.teamBridge.files.no_schedule": "Les fichiers peuvent être envoyés maintenant, mais pas programmés.",
26971
+ "ui.teamBridge.files.uploading": "Téléversement du fichier…"
26936
26972
  };
26937
26973
  const frUiTeamBridgeLeave = {
26938
26974
  "ui.teamBridge.leave.back": "Retour",
@@ -30265,6 +30301,10 @@ const hiUiChatTranscriptCopy = {
30265
30301
  "ui.chat.transcript_copy.selection.copy": "चयन कॉपी करें",
30266
30302
  "ui.chat.transcript_copy.selection.toolbar": "चयन की कार्रवाइयाँ"
30267
30303
  };
30304
+ const hiUiChatUserTurn = {
30305
+ "ui.chat.user_turn.show_more": "ज़्यादा दिखाएँ",
30306
+ "ui.chat.user_turn.show_less": "कम दिखाएँ"
30307
+ };
30268
30308
  const hiUiCodeReview = {
30269
30309
  "ui.code_review.activity.close": "बंद किया",
30270
30310
  "ui.code_review.activity.comment": "टिप्पणी की",
@@ -35013,7 +35053,15 @@ const hiUiTeamBridge = {
35013
35053
  "ui.teamBridge.conversation_menu.error.not_in_general": "आपका एजेंट अभी {channel} में नहीं है, इसलिए हटाने के लिए कुछ नहीं है।",
35014
35054
  "ui.teamBridge.conversation_menu.partial_leave.body": "आपने {conversation} छोड़ दिया। आपका एजेंट अब भी इस बातचीत में है।",
35015
35055
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "आपने {conversation} छोड़ दिया, लेकिन आपका एजेंट अब भी हटाया नहीं जा सका। फिर कोशिश करें।",
35016
- "ui.teamBridge.conversation_menu.partial_leave.retry": "मेरा एजेंट हटाएँ"
35056
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "मेरा एजेंट हटाएँ",
35057
+ "ui.teamBridge.files.staged": "संलग्न फ़ाइलें",
35058
+ "ui.teamBridge.files.failed": "अपलोड विफल रहा",
35059
+ "ui.teamBridge.files.retry": "फ़ाइल फिर से अपलोड करें",
35060
+ "ui.teamBridge.files.remove": "फ़ाइल हटाएँ",
35061
+ "ui.teamBridge.files.unavailable": "इस खाते के लिए फ़ाइलें उपलब्ध नहीं हैं। टेक्स्ट या चित्र भेजने के लिए फ़ाइल हटाएँ।",
35062
+ "ui.teamBridge.files.add": "फ़ाइलें संलग्न करें",
35063
+ "ui.teamBridge.files.no_schedule": "फ़ाइलें अभी भेजी जा सकती हैं, लेकिन शेड्यूल नहीं की जा सकतीं।",
35064
+ "ui.teamBridge.files.uploading": "फ़ाइल अपलोड हो रही है…"
35017
35065
  };
35018
35066
  const hiUiTeamBridgeLeave = {
35019
35067
  "ui.teamBridge.leave.back": "पीछे",
@@ -38346,6 +38394,10 @@ const ruUiChatTranscriptCopy = {
38346
38394
  "ui.chat.transcript_copy.selection.copy": "Копировать выделенное",
38347
38395
  "ui.chat.transcript_copy.selection.toolbar": "Действия с выделенным"
38348
38396
  };
38397
+ const ruUiChatUserTurn = {
38398
+ "ui.chat.user_turn.show_more": "Показать больше",
38399
+ "ui.chat.user_turn.show_less": "Показать меньше"
38400
+ };
38349
38401
  const ruUiCodeReview = {
38350
38402
  "ui.code_review.activity.close": "закрыли",
38351
38403
  "ui.code_review.activity.comment": "прокомментировали",
@@ -43094,7 +43146,15 @@ const ruUiTeamBridge = {
43094
43146
  "ui.teamBridge.conversation_menu.error.not_in_general": "Вашего агента пока нет в {channel}, удалять нечего.",
43095
43147
  "ui.teamBridge.conversation_menu.partial_leave.body": "Вы покинули {conversation}. Ваш агент всё ещё в этом разговоре.",
43096
43148
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "Вы покинули {conversation}, но агента по-прежнему не удалось удалить. Попробуйте ещё раз.",
43097
- "ui.teamBridge.conversation_menu.partial_leave.retry": "Удалить моего агента"
43149
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "Удалить моего агента",
43150
+ "ui.teamBridge.files.staged": "Прикреплённые файлы",
43151
+ "ui.teamBridge.files.failed": "Не удалось загрузить",
43152
+ "ui.teamBridge.files.retry": "Повторить загрузку файла",
43153
+ "ui.teamBridge.files.remove": "Удалить файл",
43154
+ "ui.teamBridge.files.unavailable": "Файлы недоступны для этой учётной записи. Удалите файл, чтобы отправить текст или изображения.",
43155
+ "ui.teamBridge.files.add": "Прикрепить файлы",
43156
+ "ui.teamBridge.files.no_schedule": "Файлы можно отправить сейчас, но нельзя запланировать.",
43157
+ "ui.teamBridge.files.uploading": "Загрузка файла…"
43098
43158
  };
43099
43159
  const ruUiTeamBridgeLeave = {
43100
43160
  "ui.teamBridge.leave.back": "Назад",
@@ -46427,6 +46487,10 @@ const urUiChatTranscriptCopy = {
46427
46487
  "ui.chat.transcript_copy.selection.copy": "منتخب متن نقل کریں",
46428
46488
  "ui.chat.transcript_copy.selection.toolbar": "منتخب متن کے اعمال"
46429
46489
  };
46490
+ const urUiChatUserTurn = {
46491
+ "ui.chat.user_turn.show_more": "مزید دکھائیں",
46492
+ "ui.chat.user_turn.show_less": "کم دکھائیں"
46493
+ };
46430
46494
  const urUiCodeReview = {
46431
46495
  "ui.code_review.activity.close": "بند کیا",
46432
46496
  "ui.code_review.activity.comment": "تبصرہ کیا",
@@ -51175,7 +51239,15 @@ const urUiTeamBridge = {
51175
51239
  "ui.teamBridge.conversation_menu.error.not_in_general": "آپ کا ایجنٹ ابھی {channel} میں نہیں ہے، اس لیے ہٹانے کو کچھ نہیں۔",
51176
51240
  "ui.teamBridge.conversation_menu.partial_leave.body": "آپ نے {conversation} چھوڑ دیا۔ آپ کا ایجنٹ ابھی بھی اس گفتگو میں ہے۔",
51177
51241
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "آپ نے {conversation} چھوڑ دیا، لیکن آپ کا ایجنٹ اب بھی ہٹایا نہیں جا سکا۔ دوبارہ کوشش کریں۔",
51178
- "ui.teamBridge.conversation_menu.partial_leave.retry": "میرا ایجنٹ ہٹائیں"
51242
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "میرا ایجنٹ ہٹائیں",
51243
+ "ui.teamBridge.files.staged": "منسلک فائلیں",
51244
+ "ui.teamBridge.files.failed": "اپ لوڈ ناکام ہو گیا",
51245
+ "ui.teamBridge.files.retry": "فائل دوبارہ اپ لوڈ کریں",
51246
+ "ui.teamBridge.files.remove": "فائل ہٹائیں",
51247
+ "ui.teamBridge.files.unavailable": "اس اکاؤنٹ کے لیے فائلیں دستیاب نہیں ہیں۔ متن یا تصاویر بھیجنے کے لیے فائل ہٹائیں۔",
51248
+ "ui.teamBridge.files.add": "فائلیں منسلک کریں",
51249
+ "ui.teamBridge.files.no_schedule": "فائلیں ابھی بھیجی جا سکتی ہیں، لیکن ان کی ترسیل طے نہیں کی جا سکتی۔",
51250
+ "ui.teamBridge.files.uploading": "فائل اپ لوڈ ہو رہی ہے…"
51179
51251
  };
51180
51252
  const urUiTeamBridgeLeave = {
51181
51253
  "ui.teamBridge.leave.back": "پیچھے",
@@ -54508,6 +54580,10 @@ const viUiChatTranscriptCopy = {
54508
54580
  "ui.chat.transcript_copy.selection.copy": "Sao chép phần đã chọn",
54509
54581
  "ui.chat.transcript_copy.selection.toolbar": "Thao tác với phần đã chọn"
54510
54582
  };
54583
+ const viUiChatUserTurn = {
54584
+ "ui.chat.user_turn.show_more": "Hiện thêm",
54585
+ "ui.chat.user_turn.show_less": "Hiện bớt"
54586
+ };
54511
54587
  const viUiCodeReview = {
54512
54588
  "ui.code_review.activity.close": "đã đóng",
54513
54589
  "ui.code_review.activity.comment": "đã bình luận",
@@ -59256,7 +59332,15 @@ const viUiTeamBridge = {
59256
59332
  "ui.teamBridge.conversation_menu.error.not_in_general": "Tác nhân của bạn chưa có trong {channel}, nên không có gì để xóa.",
59257
59333
  "ui.teamBridge.conversation_menu.partial_leave.body": "Bạn đã rời {conversation}. Tác nhân của bạn vẫn còn trong cuộc trò chuyện này.",
59258
59334
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "Bạn đã rời {conversation}, nhưng vẫn chưa thể xóa tác nhân của bạn. Hãy thử lại.",
59259
- "ui.teamBridge.conversation_menu.partial_leave.retry": "Xóa tác nhân của tôi"
59335
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "Xóa tác nhân của tôi",
59336
+ "ui.teamBridge.files.staged": "Tệp đính kèm",
59337
+ "ui.teamBridge.files.failed": "Tải lên thất bại",
59338
+ "ui.teamBridge.files.retry": "Thử tải tệp lên lại",
59339
+ "ui.teamBridge.files.remove": "Xóa tệp",
59340
+ "ui.teamBridge.files.unavailable": "Tài khoản này chưa hỗ trợ tệp. Hãy xóa tệp để gửi văn bản hoặc hình ảnh.",
59341
+ "ui.teamBridge.files.add": "Đính kèm tệp",
59342
+ "ui.teamBridge.files.no_schedule": "Có thể gửi tệp ngay, nhưng không thể lên lịch.",
59343
+ "ui.teamBridge.files.uploading": "Đang tải tệp lên…"
59260
59344
  };
59261
59345
  const viUiTeamBridgeLeave = {
59262
59346
  "ui.teamBridge.leave.back": "Quay lại",
@@ -62589,6 +62673,10 @@ const zhCNUiChatTranscriptCopy = {
62589
62673
  "ui.chat.transcript_copy.selection.copy": "复制所选内容",
62590
62674
  "ui.chat.transcript_copy.selection.toolbar": "所选内容操作"
62591
62675
  };
62676
+ const zhCNUiChatUserTurn = {
62677
+ "ui.chat.user_turn.show_more": "展开",
62678
+ "ui.chat.user_turn.show_less": "收起"
62679
+ };
62592
62680
  const zhCNUiCodeReview = {
62593
62681
  "ui.code_review.activity.close": "已关闭",
62594
62682
  "ui.code_review.activity.comment": "已评论",
@@ -67337,7 +67425,15 @@ const zhCNUiTeamBridge = {
67337
67425
  "ui.teamBridge.conversation_menu.error.not_in_general": "你的智能体尚未加入{channel},因此无需移除。",
67338
67426
  "ui.teamBridge.conversation_menu.partial_leave.body": "你已退出{conversation}。你的智能体仍在此对话中。",
67339
67427
  "ui.teamBridge.conversation_menu.partial_leave.retry_failed": "你已退出{conversation},但仍无法移除你的智能体。请重试。",
67340
- "ui.teamBridge.conversation_menu.partial_leave.retry": "移除我的智能体"
67428
+ "ui.teamBridge.conversation_menu.partial_leave.retry": "移除我的智能体",
67429
+ "ui.teamBridge.files.staged": "已附加文件",
67430
+ "ui.teamBridge.files.failed": "上传失败",
67431
+ "ui.teamBridge.files.retry": "重试上传文件",
67432
+ "ui.teamBridge.files.remove": "移除文件",
67433
+ "ui.teamBridge.files.unavailable": "此账户暂不支持文件。请移除文件后发送文字或图片。",
67434
+ "ui.teamBridge.files.add": "附加文件",
67435
+ "ui.teamBridge.files.no_schedule": "文件可以立即发送,但不支持定时发送。",
67436
+ "ui.teamBridge.files.uploading": "正在上传文件…"
67341
67437
  };
67342
67438
  const zhCNUiTeamBridgeLeave = {
67343
67439
  "ui.teamBridge.leave.back": "返回",
@@ -67484,6 +67580,7 @@ const bundledEnglish = {
67484
67580
  ...enUiChatTags,
67485
67581
  ...enUiChatThreadSearch,
67486
67582
  ...enUiChatTranscriptCopy,
67583
+ ...enUiChatUserTurn,
67487
67584
  ...enUiCodeReview,
67488
67585
  ...enUiCommandPalette,
67489
67586
  ...enUiCommonAccount,
@@ -67612,6 +67709,7 @@ const bundledCatalogues = {
67612
67709
  ...esUiChatTags,
67613
67710
  ...esUiChatThreadSearch,
67614
67711
  ...esUiChatTranscriptCopy,
67712
+ ...esUiChatUserTurn,
67615
67713
  ...esUiCodeReview,
67616
67714
  ...esUiCommandPalette,
67617
67715
  ...esUiCommonAccount,
@@ -67738,6 +67836,7 @@ const bundledCatalogues = {
67738
67836
  ...frUiChatTags,
67739
67837
  ...frUiChatThreadSearch,
67740
67838
  ...frUiChatTranscriptCopy,
67839
+ ...frUiChatUserTurn,
67741
67840
  ...frUiCodeReview,
67742
67841
  ...frUiCommandPalette,
67743
67842
  ...frUiCommonAccount,
@@ -67864,6 +67963,7 @@ const bundledCatalogues = {
67864
67963
  ...hiUiChatTags,
67865
67964
  ...hiUiChatThreadSearch,
67866
67965
  ...hiUiChatTranscriptCopy,
67966
+ ...hiUiChatUserTurn,
67867
67967
  ...hiUiCodeReview,
67868
67968
  ...hiUiCommandPalette,
67869
67969
  ...hiUiCommonAccount,
@@ -67990,6 +68090,7 @@ const bundledCatalogues = {
67990
68090
  ...ruUiChatTags,
67991
68091
  ...ruUiChatThreadSearch,
67992
68092
  ...ruUiChatTranscriptCopy,
68093
+ ...ruUiChatUserTurn,
67993
68094
  ...ruUiCodeReview,
67994
68095
  ...ruUiCommandPalette,
67995
68096
  ...ruUiCommonAccount,
@@ -68116,6 +68217,7 @@ const bundledCatalogues = {
68116
68217
  ...urUiChatTags,
68117
68218
  ...urUiChatThreadSearch,
68118
68219
  ...urUiChatTranscriptCopy,
68220
+ ...urUiChatUserTurn,
68119
68221
  ...urUiCodeReview,
68120
68222
  ...urUiCommandPalette,
68121
68223
  ...urUiCommonAccount,
@@ -68242,6 +68344,7 @@ const bundledCatalogues = {
68242
68344
  ...viUiChatTags,
68243
68345
  ...viUiChatThreadSearch,
68244
68346
  ...viUiChatTranscriptCopy,
68347
+ ...viUiChatUserTurn,
68245
68348
  ...viUiCodeReview,
68246
68349
  ...viUiCommandPalette,
68247
68350
  ...viUiCommonAccount,
@@ -68368,6 +68471,7 @@ const bundledCatalogues = {
68368
68471
  ...zhCNUiChatTags,
68369
68472
  ...zhCNUiChatThreadSearch,
68370
68473
  ...zhCNUiChatTranscriptCopy,
68474
+ ...zhCNUiChatUserTurn,
68371
68475
  ...zhCNUiCodeReview,
68372
68476
  ...zhCNUiCommandPalette,
68373
68477
  ...zhCNUiCommonAccount,
@@ -71468,6 +71572,7 @@ const desktopRequestUnion = zod.z.discriminatedUnion("op", [
71468
71572
  /* Reply in this root message's thread; the hub validates the root. */
71469
71573
  thread_root_id: id$1.optional(),
71470
71574
  attachment_ids: teamBridgeAttachmentIds.optional(),
71575
+ files: zod.z.array(id$1).min(1).max(10).refine((ids) => new Set(ids).size === ids.length, "Duplicate file").optional(),
71471
71576
  mentions: teamBridgeMentionsSchema.optional()
71472
71577
  }).strict(),
71473
71578
  /*
@@ -72223,8 +72328,19 @@ const desktopRequestSchema = desktopRequestUnion.superRefine(
72223
72328
  path: ["target"]
72224
72329
  });
72225
72330
  }
72331
+ if (request.op === "team_bridge.messages.send" && request.files) {
72332
+ const images = request.attachment_ids ?? [];
72333
+ if (images.length + request.files.length > 10 || request.files.some((file) => images.includes(file))) {
72334
+ ctx.addIssue({
72335
+ code: zod.z.ZodIssueCode.custom,
72336
+ message: "Invalid combined attachment set",
72337
+ // i18n: ignore request-schema diagnostic, not rendered interface copy
72338
+ path: ["files"]
72339
+ });
72340
+ }
72341
+ }
72226
72342
  if (request.op === "team_bridge.messages.send" || request.op === "team_bridge.scheduled.create" || request.op === "team_bridge.scheduled.update" && request.body !== void 0) {
72227
- if (request.body?.trim() === "" && (request.attachment_ids?.length ?? 0) === 0) {
72343
+ if (request.body?.trim() === "" && (request.attachment_ids?.length ?? 0) === 0 && !(request.op === "team_bridge.messages.send" && request.files?.length)) {
72228
72344
  ctx.addIssue({
72229
72345
  code: zod.z.ZodIssueCode.custom,
72230
72346
  message: "A message needs text or an image",
@@ -74522,6 +74638,7 @@ function desktopEndpoint(request) {
74522
74638
  ...request.agent_label ? { agent_label: request.agent_label } : {},
74523
74639
  ...request.thread_root_id ? { thread_root_id: request.thread_root_id } : {},
74524
74640
  ...request.attachment_ids?.length ? { attachment_ids: request.attachment_ids } : {},
74641
+ ...request.files?.length ? { files: request.files } : {},
74525
74642
  // Omitted (never `[]`) when empty: the pre-mention wire, byte for byte.
74526
74643
  ...request.mentions?.length ? { mentions: request.mentions } : {}
74527
74644
  }
@@ -76062,11 +76179,11 @@ function bytesFromDataUrl(dataUrl) {
76062
76179
  }
76063
76180
  function readRecord(payload) {
76064
76181
  if (payload === null || typeof payload !== "object") return null;
76065
- const body = payload;
76066
- const inner = body.result;
76182
+ const body2 = payload;
76183
+ const inner = body2.result;
76067
76184
  if (inner !== null && typeof inner === "object")
76068
76185
  return inner;
76069
- return body;
76186
+ return body2;
76070
76187
  }
76071
76188
  function toAttachment(payload) {
76072
76189
  const record = readRecord(payload);
@@ -76898,9 +77015,9 @@ const pypiReleaseReading = (payload, platform) => {
76898
77015
  }
76899
77016
  return { namedVersion: trimmed, readyVersion: ready ? trimmed : null };
76900
77017
  };
76901
- const readPypiReleaseBody = (body, platform) => {
77018
+ const readPypiReleaseBody = (body2, platform) => {
76902
77019
  try {
76903
- return pypiReleaseReading(JSON.parse(body), platform);
77020
+ return pypiReleaseReading(JSON.parse(body2), platform);
76904
77021
  } catch {
76905
77022
  return { namedVersion: null, readyVersion: null };
76906
77023
  }
@@ -79144,15 +79261,15 @@ function driftInstallReading(input) {
79144
79261
  return { version: input.planVersion, source: "serving-install" };
79145
79262
  }
79146
79263
  const DEGRADED_LIVENESS_SOURCE = "liveness";
79147
- function rosterLivenessDegraded(body) {
79148
- const degraded = body?.result?.degraded;
79264
+ function rosterLivenessDegraded(body2) {
79265
+ const degraded = body2?.result?.degraded;
79149
79266
  return Array.isArray(degraded) && degraded.includes(DEGRADED_LIVENESS_SOURCE);
79150
79267
  }
79151
79268
  const KNOWN_LIVE_STATES = /* @__PURE__ */ new Set(["", "wedged", "busy", "attached", "idle"]);
79152
- function fleetRosterFromSessions(body) {
79153
- const sessions = body?.result?.sessions;
79269
+ function fleetRosterFromSessions(body2) {
79270
+ const sessions = body2?.result?.sessions;
79154
79271
  if (!Array.isArray(sessions)) return null;
79155
- if (rosterLivenessDegraded(body)) return null;
79272
+ if (rosterLivenessDegraded(body2)) return null;
79156
79273
  return sessions.filter(
79157
79274
  (row) => typeof row === "object" && row !== null
79158
79275
  ).map((row) => ({
@@ -79165,8 +79282,8 @@ function fleetRosterFromSessions(body) {
79165
79282
  function busyRosterRows(rows) {
79166
79283
  return rows.filter((row) => row.liveState === "busy");
79167
79284
  }
79168
- function servingWorkStateFromSessions(body) {
79169
- const rows = fleetRosterFromSessions(body);
79285
+ function servingWorkStateFromSessions(body2) {
79286
+ const rows = fleetRosterFromSessions(body2);
79170
79287
  if (rows === null) return "unknown";
79171
79288
  if (busyRosterRows(rows).length > 0) return "busy";
79172
79289
  if (rows.some(
@@ -79284,8 +79401,8 @@ class DesktopFeedRelay {
79284
79401
  let features;
79285
79402
  try {
79286
79403
  const response = await this.options.request({ op: "capabilities" });
79287
- const body = response.body;
79288
- features = body?.result?.features;
79404
+ const body2 = response.body;
79405
+ features = body2?.result?.features;
79289
79406
  } catch {
79290
79407
  this.running = false;
79291
79408
  this.setConnected(false);
@@ -79707,6 +79824,14 @@ const mediaRequestSchema = zod.z.discriminatedUnion("op", [
79707
79824
  */
79708
79825
  zod.z.object({
79709
79826
  op: zod.z.literal("team_bridge.attachment.upload"),
79827
+ mode: zod.z.enum(["image", "file"]).optional(),
79828
+ fileName: zod.z.string().max(512).refine((value) => {
79829
+ try {
79830
+ return encodeURIComponent(value).length <= 1024;
79831
+ } catch {
79832
+ return false;
79833
+ }
79834
+ }).optional(),
79710
79835
  tenantId: id,
79711
79836
  conversationId: id,
79712
79837
  /* REQUIRED: the runtime route answers 422 without a captured-owner
@@ -79800,6 +79925,18 @@ const mediaRequestSchema = zod.z.discriminatedUnion("op", [
79800
79925
  zod.z.object({
79801
79926
  op: zod.z.literal("library.waveform"),
79802
79927
  assetId: zod.z.string().regex(/^la_[0-9a-f]{16}$/)
79928
+ }).strict(),
79929
+ /*
79930
+ * One notification sound as `audio/wav` with the volume baked in (core
79931
+ * `/v1/notification-sounds/{id}/audio?volume=`, `features.notification_sounds`).
79932
+ * Main stages it in ~/Library/Sounds or hands it to the renderer's player
79933
+ * (`notification-sound.ts`). The id is the catalog's slug or core's
79934
+ * `custom-[a-z0-9-]{1,40}`, checked here because it becomes a path segment.
79935
+ */
79936
+ zod.z.object({
79937
+ op: zod.z.literal("notification_sounds.audio"),
79938
+ soundId: zod.z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/),
79939
+ volume: zod.z.number().int().min(0).max(100)
79803
79940
  }).strict()
79804
79941
  ]);
79805
79942
  function endpoint(request) {
@@ -79881,9 +80018,14 @@ function endpoint(request) {
79881
80018
  path: `/v1/desktop/library/assets/${request.assetId}/waveform`,
79882
80019
  method: "GET"
79883
80020
  };
80021
+ case "notification_sounds.audio":
80022
+ return {
80023
+ path: `/v1/notification-sounds/${request.soundId}/audio?volume=${request.volume}`,
80024
+ method: "GET"
80025
+ };
79884
80026
  case "team_bridge.attachment.upload":
79885
80027
  return {
79886
- path: `/v1/desktop/team-bridge/conversations/${request.conversationId}/attachments?${new URLSearchParams({ tenant_id: request.tenantId, expected_account_id: request.expectedAccountId })}`,
80028
+ path: `/v1/desktop/team-bridge/conversations/${request.conversationId}/attachments?${new URLSearchParams({ tenant_id: request.tenantId, expected_account_id: request.expectedAccountId, ...request.mode ? { mode: request.mode } : {} })}`,
79887
80029
  method: "POST"
79888
80030
  };
79889
80031
  case "team_bridge.owner_audit.attachment":
@@ -79965,7 +80107,7 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
79965
80107
  answered: false
79966
80108
  };
79967
80109
  }
79968
- if ((request.op === "team_bridge.attachment.upload" || request.op === "account.avatar.put") && bytes && bytes.byteLength > (request.op === "account.avatar.put" ? 1024 * 1024 : TEAM_BRIDGE_ATTACHMENT_MAX_BYTES)) {
80110
+ if ((request.op === "team_bridge.attachment.upload" || request.op === "account.avatar.put") && bytes && bytes.byteLength > (request.op === "account.avatar.put" ? 1024 * 1024 : request.mode === "file" ? 25 * 1024 * 1024 : TEAM_BRIDGE_ATTACHMENT_MAX_BYTES)) {
79969
80111
  return {
79970
80112
  response: {
79971
80113
  status: 413,
@@ -79976,10 +80118,10 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
79976
80118
  };
79977
80119
  }
79978
80120
  const target2 = endpoint(request);
79979
- let body;
80121
+ let body2;
79980
80122
  let contentType;
79981
- if (request.op === "account.profile" || request.op === "account.avatar.delete" || request.op === "agent.export" || request.op === "agent.avatar" || request.op === "agent.avatar.delete" || request.op === "sessions.attachment" || request.op === "subagents.attachment" || request.op === "sessions.attachment.waveform" || request.op === "sessions.supplementDocument" || request.op === "library.content" || request.op === "library.thumbnail" || request.op === "library.waveform" || request.op === "team_bridge.attachment" || request.op === "team_bridge.owner_audit.attachment" || request.op === "team_bridge.avatar" || request.op === "team_bridge.endpoint_avatar" || request.op === "team_bridge.notification_avatar") {
79982
- body = void 0;
80123
+ if (request.op === "account.profile" || request.op === "account.avatar.delete" || request.op === "agent.export" || request.op === "agent.avatar" || request.op === "agent.avatar.delete" || request.op === "sessions.attachment" || request.op === "subagents.attachment" || request.op === "sessions.attachment.waveform" || request.op === "sessions.supplementDocument" || request.op === "library.content" || request.op === "library.thumbnail" || request.op === "library.waveform" || request.op === "notification_sounds.audio" || request.op === "team_bridge.attachment" || request.op === "team_bridge.owner_audit.attachment" || request.op === "team_bridge.avatar" || request.op === "team_bridge.endpoint_avatar" || request.op === "team_bridge.notification_avatar") {
80124
+ body2 = void 0;
79983
80125
  } else if (request.op === "team_bridge.attachment.upload" || request.op === "account.avatar.put" || request.op === "agent.avatar.put") {
79984
80126
  if (!bytes || bytes.byteLength === 0) {
79985
80127
  return {
@@ -79991,13 +80133,13 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
79991
80133
  answered: false
79992
80134
  };
79993
80135
  }
79994
- body = new Blob([bytes]);
80136
+ body2 = new Blob([bytes]);
79995
80137
  contentType = "application/octet-stream";
79996
80138
  } else if (request.op === "account.profile.update") {
79997
- body = JSON.stringify(request.fields);
80139
+ body2 = JSON.stringify(request.fields);
79998
80140
  contentType = "application/json";
79999
80141
  } else if (request.op === "speech.create" || request.op === "speech.agent") {
80000
- body = JSON.stringify(request.request);
80142
+ body2 = JSON.stringify(request.request);
80001
80143
  contentType = "application/json";
80002
80144
  } else {
80003
80145
  if (!bytes) {
@@ -80016,7 +80158,7 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
80016
80158
  form.append(key, value);
80017
80159
  }
80018
80160
  }
80019
- body = form;
80161
+ body2 = form;
80020
80162
  }
80021
80163
  let answered = false;
80022
80164
  try {
@@ -80025,9 +80167,12 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
80025
80167
  headers: {
80026
80168
  Accept: request.op === "team_bridge.owner_audit.attachment" ? "image/png, image/jpeg" : "application/json, audio/*, image/*, application/octet-stream",
80027
80169
  ...contentType ? { "Content-Type": contentType } : {},
80170
+ // #3363 forwards the name only in file mode; it is display content,
80171
+ // never a filesystem path or a declared MIME/safety claim.
80172
+ ...request.op === "team_bridge.attachment.upload" && request.mode === "file" && request.fileName ? { "X-Bridge-File-Name": encodeURIComponent(request.fileName) } : {},
80028
80173
  Authorization: `Bearer ${token}`
80029
80174
  },
80030
- body,
80175
+ body: body2,
80031
80176
  // Private avatars are cached only as authority-scoped renderer blobs.
80032
80177
  // Neither Electron nor an intermediary may persist them across login.
80033
80178
  ...request.op === "team_bridge.owner_audit.attachment" || request.op === "team_bridge.avatar" || request.op === "team_bridge.endpoint_avatar" || request.op === "team_bridge.notification_avatar" ? { cache: "no-store" } : {},
@@ -80060,16 +80205,16 @@ async function requestDesktopMediaOutcome(input, bytes, backendUrl, token) {
80060
80205
  let busy = false;
80061
80206
  if (composite && response.status === 503 && response.body && mime === "application/json") {
80062
80207
  const reader2 = response.body.getReader();
80063
- let body2 = "";
80208
+ let body22 = "";
80064
80209
  try {
80065
80210
  for (; ; ) {
80066
80211
  const { done, value } = await reader2.read();
80067
80212
  if (done) break;
80068
- body2 += new TextDecoder().decode(value, { stream: true });
80069
- if (body2.length > 16 * 1024) break;
80213
+ body22 += new TextDecoder().decode(value, { stream: true });
80214
+ if (body22.length > 16 * 1024) break;
80070
80215
  }
80071
- if (body2.length <= 16 * 1024) {
80072
- const envelope = JSON.parse(body2);
80216
+ if (body22.length <= 16 * 1024) {
80217
+ const envelope = JSON.parse(body22);
80073
80218
  busy = typeof envelope === "object" && envelope !== null && "detail" in envelope && typeof envelope.detail === "object" && envelope.detail !== null && "code" in envelope.detail && envelope.detail.code === "renderer_busy";
80074
80219
  }
80075
80220
  } catch {
@@ -80473,8 +80618,8 @@ async function requestDesktopOutcome(input, backendUrl, token) {
80473
80618
  let answered = false;
80474
80619
  const deadlineMs = desktopRequestDeadlineMs(request);
80475
80620
  try {
80476
- const body = target2.body === void 0 ? void 0 : JSON.stringify(target2.body);
80477
- if (body && Buffer.byteLength(body) > desktopRequestByteBudget(request.op)) {
80621
+ const body2 = target2.body === void 0 ? void 0 : JSON.stringify(target2.body);
80622
+ if (body2 && Buffer.byteLength(body2) > desktopRequestByteBudget(request.op)) {
80478
80623
  return {
80479
80624
  response: {
80480
80625
  status: 413,
@@ -80487,10 +80632,10 @@ async function requestDesktopOutcome(input, backendUrl, token) {
80487
80632
  method: target2.method,
80488
80633
  headers: {
80489
80634
  Accept: "application/json",
80490
- ...body ? { "Content-Type": "application/json" } : {},
80635
+ ...body2 ? { "Content-Type": "application/json" } : {},
80491
80636
  ...token ? { Authorization: `Bearer ${token}` } : {}
80492
80637
  },
80493
- body,
80638
+ body: body2,
80494
80639
  redirect: "error",
80495
80640
  signal: AbortSignal.timeout(deadlineMs)
80496
80641
  });
@@ -89186,10 +89331,10 @@ ${indent}`) + "'";
89186
89331
  literalFallback = true;
89187
89332
  };
89188
89333
  }
89189
- const body = foldFlowLines2.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines2.FOLD_BLOCK, foldOptions);
89334
+ const body2 = foldFlowLines2.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines2.FOLD_BLOCK, foldOptions);
89190
89335
  if (!literalFallback)
89191
89336
  return `>${header}
89192
- ${indent}${body}`;
89337
+ ${indent}${body2}`;
89193
89338
  }
89194
89339
  value = value.replace(/\n+/g, `$&${indent}`);
89195
89340
  return `|${header}
@@ -91193,13 +91338,13 @@ function requireStringifyDocument() {
91193
91338
  contentComment = doc.contents.comment;
91194
91339
  }
91195
91340
  const onChompKeep = contentComment ? void 0 : () => chompKeep = true;
91196
- let body = stringify2.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
91341
+ let body2 = stringify2.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
91197
91342
  if (contentComment)
91198
- body += stringifyComment2.lineComment(body, "", commentString(contentComment));
91199
- if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") {
91200
- lines[lines.length - 1] = `--- ${body}`;
91343
+ body2 += stringifyComment2.lineComment(body2, "", commentString(contentComment));
91344
+ if ((body2[0] === "|" || body2[0] === ">") && lines[lines.length - 1] === "---") {
91345
+ lines[lines.length - 1] = `--- ${body2}`;
91201
91346
  } else
91202
- lines.push(body);
91347
+ lines.push(body2);
91203
91348
  } else {
91204
91349
  lines.push(stringify2.stringify(doc.contents, ctx));
91205
91350
  }
@@ -93185,13 +93330,13 @@ function requireCstScalar() {
93185
93330
  case ">": {
93186
93331
  const he = source.indexOf("\n");
93187
93332
  const head = source.substring(0, he);
93188
- const body = source.substring(he + 1) + "\n";
93333
+ const body2 = source.substring(he + 1) + "\n";
93189
93334
  const props = [
93190
93335
  { type: "block-scalar-header", offset, indent, source: head }
93191
93336
  ];
93192
93337
  if (!addEndtoBlockProps(props, end))
93193
93338
  props.push({ type: "newline", offset: -1, indent, source: "\n" });
93194
- return { type: "block-scalar", offset, indent, props, source: body };
93339
+ return { type: "block-scalar", offset, indent, props, source: body2 };
93195
93340
  }
93196
93341
  case '"':
93197
93342
  return { type: "double-quoted-scalar", offset, indent, source, end };
@@ -93248,13 +93393,13 @@ function requireCstScalar() {
93248
93393
  function setBlockScalarValue(token, source) {
93249
93394
  const he = source.indexOf("\n");
93250
93395
  const head = source.substring(0, he);
93251
- const body = source.substring(he + 1) + "\n";
93396
+ const body2 = source.substring(he + 1) + "\n";
93252
93397
  if (token.type === "block-scalar") {
93253
93398
  const header = token.props[0];
93254
93399
  if (header.type !== "block-scalar-header")
93255
93400
  throw new Error("Invalid block scalar header");
93256
93401
  header.source = head;
93257
- token.source = body;
93402
+ token.source = body2;
93258
93403
  } else {
93259
93404
  const { offset } = token;
93260
93405
  const indent = "indent" in token ? token.indent : -1;
@@ -93266,7 +93411,7 @@ function requireCstScalar() {
93266
93411
  for (const key of Object.keys(token))
93267
93412
  if (key !== "type" && key !== "offset")
93268
93413
  delete token[key];
93269
- Object.assign(token, { type: "block-scalar", indent, props, source: body });
93414
+ Object.assign(token, { type: "block-scalar", indent, props, source: body2 });
93270
93415
  }
93271
93416
  }
93272
93417
  function addEndtoBlockProps(props, end) {
@@ -96344,16 +96489,16 @@ class Osc133Scanner {
96344
96489
  return null;
96345
96490
  }
96346
96491
  finish() {
96347
- const body = this.body;
96492
+ const body2 = this.body;
96348
96493
  const offset = this.sequenceStart ?? 0;
96349
96494
  this.body = null;
96350
96495
  this.escaped = false;
96351
96496
  this.sequenceStart = null;
96352
- if (body === null || this.overflowed) {
96497
+ if (body2 === null || this.overflowed) {
96353
96498
  this.overflowed = false;
96354
96499
  return null;
96355
96500
  }
96356
- return parseBody(body, offset);
96501
+ return parseBody(body2, offset);
96357
96502
  }
96358
96503
  abandon() {
96359
96504
  this.body = null;
@@ -96361,8 +96506,8 @@ class Osc133Scanner {
96361
96506
  this.sequenceStart = null;
96362
96507
  }
96363
96508
  }
96364
- function parseBody(body, offset) {
96365
- const text2 = String.fromCharCode(...body);
96509
+ function parseBody(body2, offset) {
96510
+ const text2 = String.fromCharCode(...body2);
96366
96511
  const [kind, status2] = text2.split(";");
96367
96512
  const mapped = KINDS[kind];
96368
96513
  if (!mapped) return null;
@@ -99369,11 +99514,11 @@ async function startConsoleHost(options) {
99369
99514
  throw new AggregateError(failures, "Partial console cleanup incomplete.");
99370
99515
  };
99371
99516
  try {
99372
- const configDir = options.configDir ?? localOperatorConfigDir();
99517
+ const configDir2 = options.configDir ?? localOperatorConfigDir();
99373
99518
  const history = new ConsoleHistory(
99374
- path$1.join(configDir, "run", "ui-console", "history")
99519
+ path$1.join(configDir2, "run", "ui-console", "history")
99375
99520
  );
99376
- const policyEnv = { ...process.env, LOCAL_OPERATOR_CONFIG_DIR: configDir };
99521
+ const policyEnv = { ...process.env, LOCAL_OPERATOR_CONFIG_DIR: configDir2 };
99377
99522
  const policy = readConsolePolicy(policyEnv);
99378
99523
  const registry = new ConsoleRegistry({
99379
99524
  policy: policy ? {
@@ -99648,14 +99793,14 @@ function parseKeychainAccessGroups(entitlementsPlist) {
99648
99793
  const arrayStart = after.indexOf("<array>");
99649
99794
  const arrayEnd = after.indexOf("</array>", arrayStart + 1);
99650
99795
  if (arrayStart === -1 || arrayEnd === -1) return [];
99651
- const body = after.slice(arrayStart + "<array>".length, arrayEnd);
99796
+ const body2 = after.slice(arrayStart + "<array>".length, arrayEnd);
99652
99797
  const groups = [];
99653
99798
  const pattern = /<string>([^<]*)<\/string>/g;
99654
- let match = pattern.exec(body);
99799
+ let match = pattern.exec(body2);
99655
99800
  while (match !== null) {
99656
99801
  const value = match[1].trim();
99657
99802
  if (value) groups.push(value);
99658
- match = pattern.exec(body);
99803
+ match = pattern.exec(body2);
99659
99804
  }
99660
99805
  return groups;
99661
99806
  }
@@ -104443,17 +104588,17 @@ function findEntry(capture, requestId2) {
104443
104588
  }
104444
104589
  function retainBody(capture, entry, data) {
104445
104590
  if (!capture.active || !capture.entries.includes(entry)) return;
104446
- const body = Buffer.from(data, "utf8");
104447
- if (body.length > MAX_BODY_PER_REQUEST) {
104591
+ const body2 = Buffer.from(data, "utf8");
104592
+ if (body2.length > MAX_BODY_PER_REQUEST) {
104448
104593
  capture.droppedBodies++;
104449
104594
  return;
104450
104595
  }
104451
104596
  if (entry.request_body_base64 !== void 0) {
104452
104597
  capture.bodyBytes -= entry.request_body_size ?? 0;
104453
104598
  }
104454
- entry.request_body_base64 = body.toString("base64");
104455
- entry.request_body_size = body.length;
104456
- capture.bodyBytes += body.length;
104599
+ entry.request_body_base64 = body2.toString("base64");
104600
+ entry.request_body_size = body2.length;
104601
+ capture.bodyBytes += body2.length;
104457
104602
  trim(capture);
104458
104603
  }
104459
104604
  function pullPostData(capture, requestId2) {
@@ -104715,11 +104860,11 @@ const u16 = (value) => {
104715
104860
  return out;
104716
104861
  };
104717
104862
  const box = (type2, ...children) => {
104718
- const body = Buffer.concat(children);
104863
+ const body2 = Buffer.concat(children);
104719
104864
  return Buffer.concat([
104720
- u32(8 + body.length),
104865
+ u32(8 + body2.length),
104721
104866
  Buffer.from(type2, "latin1"),
104722
- body
104867
+ body2
104723
104868
  ]);
104724
104869
  };
104725
104870
  const fullBox = (type2, version, flags, ...children) => box(type2, u32(version << 24 | flags), ...children);
@@ -106323,12 +106468,12 @@ async function recordStart(ctx, params, requestId2) {
106323
106468
  await waitForCompositedFrame(ctx.cdp, contents, measured);
106324
106469
  }
106325
106470
  if (quality === "high" && ctx.recordingEncoder) {
106326
- const service = ctx.recordingEncoder;
106471
+ const service2 = ctx.recordingEncoder;
106327
106472
  await HqSession.start(
106328
106473
  {
106329
106474
  cdp: ctx.cdp,
106330
106475
  contents,
106331
- service,
106476
+ service: service2,
106332
106477
  maxWidth: measured?.width ?? RECORD_WIDTH,
106333
106478
  maxHeight: measured?.height ?? RECORD_HEIGHT,
106334
106479
  size: measured,
@@ -108076,10 +108221,10 @@ async function frameSnapshots(ctx, record, topNodes, refs) {
108076
108221
  };
108077
108222
  }
108078
108223
  const indent = " ".repeat(depth);
108079
- const body = inner.replace(REF_LABEL, (_m, n) => `[e${Number(n) + offset}]`).split("\n").filter(Boolean).map((line) => `${indent} ${line}`);
108224
+ const body2 = inner.replace(REF_LABEL, (_m, n) => `[e${Number(n) + offset}]`).split("\n").filter(Boolean).map((line) => `${indent} ${line}`);
108080
108225
  blocks.push(
108081
108226
  `${indent}- frame ${scope.path.join(` ${FRAME_HOP} `)}${scope.origin ? ` (${scope.origin})` : ""}:`,
108082
- ...body
108227
+ ...body2
108083
108228
  );
108084
108229
  next.push({ scope, nodes: frameNodes });
108085
108230
  } catch (error) {
@@ -113003,6 +113148,288 @@ class NotificationLifetime {
113003
113148
  return this.live.size;
113004
113149
  }
113005
113150
  }
113151
+ const NOTIFICATION_SOUND_PLAY_CHANNEL = "notification-sound:play";
113152
+ const SETTING_ENABLED = "notifications.sound.enabled";
113153
+ const SETTING_ID = "notifications.sound.id";
113154
+ const SETTING_VOLUME = "notifications.sound.volume";
113155
+ const DEFAULT_SOUND_ID = "soft-pulse";
113156
+ const DEFAULT_VOLUME = 70;
113157
+ const SYSTEM_SOUND_ID = "system";
113158
+ const ENV_NO_SOUND = "LOCAL_OPERATOR_NO_SOUND";
113159
+ const THROTTLE_MS = 1500;
113160
+ const THROTTLE_FILE = path$1.join("run", "notification-sound.last");
113161
+ const STAGED_PREFIX = "LocalOperator-";
113162
+ function configDir(env) {
113163
+ return env.LOCAL_OPERATOR_CONFIG_DIR || path$1.join(os.homedir(), ".local-operator");
113164
+ }
113165
+ function body(response) {
113166
+ if (response.status !== 200 || !response.body) return;
113167
+ const result = response.body.result;
113168
+ return result && typeof result === "object" ? result : void 0;
113169
+ }
113170
+ function stagedSoundName(soundId, volume, bytes, env = process.env) {
113171
+ const sha = node_crypto.createHash("sha256").update(bytes).digest("hex").slice(0, 8);
113172
+ return `${stagedScopePrefix(env)}${soundId}-${volume}-${sha}.wav`;
113173
+ }
113174
+ function stagedScopePrefix(env = process.env) {
113175
+ const scope = node_crypto.createHash("sha256").update(configDir(env)).digest("hex").slice(0, 8);
113176
+ return `${STAGED_PREFIX}${scope}-`;
113177
+ }
113178
+ const MAX_NOTIFICATION_SOUND_BYTES = 4 * 1024 * 1024;
113179
+ class NotificationSoundService {
113180
+ constructor(deps) {
113181
+ this.deps = deps;
113182
+ this.platform = deps.platform ?? process.platform;
113183
+ this.env = deps.env ?? process.env;
113184
+ this.soundsDir = deps.soundsDir ?? path$1.join(os.homedir(), "Library", "Sounds");
113185
+ this.now = deps.now ?? Date.now;
113186
+ }
113187
+ plan = { kind: "legacy" };
113188
+ /**
113189
+ * Whether any read has completed from real answers. Until one has, every
113190
+ * banner kicks a read (see `bannerOptions`), so the window in which a banner
113191
+ * can only follow `legacy` is as short as the backend allows.
113192
+ */
113193
+ settled = false;
113194
+ inFlight = null;
113195
+ /** Bumped by every refresh, so a slow older read cannot overwrite a newer one. */
113196
+ generation = 0;
113197
+ platform;
113198
+ env;
113199
+ soundsDir;
113200
+ now;
113201
+ /** The current plan; read by the probe and the tests, never by a site. */
113202
+ current() {
113203
+ return this.plan;
113204
+ }
113205
+ /**
113206
+ * Re-read the capability and the three settings, then fetch and stage the
113207
+ * sound. Never throws: a sound is a convenience.
113208
+ *
113209
+ * ANY UNANSWERED READ KEEPS THE LAST PLAN (review round 1 M1, QA Q1). These
113210
+ * reads run on every backend-ready, which is exactly when a restarting
113211
+ * backend answers 0/503/504. Reading such an answer as "no settings" fell
113212
+ * through to the defaults and played soft-pulse for a user who had turned
113213
+ * sounds off; reading it as "no capability" played the OS chime. Only a
113214
+ * capabilities answer that is a 200 WITHOUT the flag means an older backend.
113215
+ */
113216
+ refresh() {
113217
+ const run = this.read().finally(() => {
113218
+ if (this.inFlight === run) this.inFlight = null;
113219
+ });
113220
+ this.inFlight = run;
113221
+ return run;
113222
+ }
113223
+ keep(what, status2) {
113224
+ this.deps.log?.(
113225
+ `[notification-sound] ${what} unanswered (status ${status2}); keeping ${this.plan.kind}`
113226
+ );
113227
+ }
113228
+ async read() {
113229
+ const generation = ++this.generation;
113230
+ const stale = () => generation !== this.generation;
113231
+ try {
113232
+ const capabilitiesResponse = await this.deps.request({
113233
+ op: "capabilities"
113234
+ });
113235
+ if (stale()) return;
113236
+ const capabilities = body(capabilitiesResponse);
113237
+ if (!capabilities)
113238
+ return this.keep("capabilities", capabilitiesResponse.status);
113239
+ const features = capabilities.features;
113240
+ if (Number(features?.notification_sounds ?? 0) < 1) {
113241
+ this.plan = { kind: "legacy" };
113242
+ this.settled = true;
113243
+ return;
113244
+ }
113245
+ const listingResponse = await this.deps.request({ op: "settings.list" });
113246
+ if (stale()) return;
113247
+ const listing = body(listingResponse);
113248
+ if (!Array.isArray(listing?.settings))
113249
+ return this.keep("settings.list", listingResponse.status);
113250
+ const rows = listing.settings;
113251
+ const value = (key) => rows.find((row) => row?.key === key)?.value;
113252
+ const enabled = value(SETTING_ENABLED);
113253
+ const rawId = value(SETTING_ID);
113254
+ const rawVolume = value(SETTING_VOLUME);
113255
+ const soundId = typeof rawId === "string" && rawId ? rawId : DEFAULT_SOUND_ID;
113256
+ const volume = typeof rawVolume === "number" && Number.isFinite(rawVolume) ? Math.min(100, Math.max(0, Math.round(rawVolume))) : DEFAULT_VOLUME;
113257
+ if (this.env[ENV_NO_SOUND]) {
113258
+ this.plan = { kind: "silent", reason: `${ENV_NO_SOUND} is set` };
113259
+ this.settled = true;
113260
+ return;
113261
+ }
113262
+ if (enabled === false) {
113263
+ this.plan = { kind: "silent", reason: `${SETTING_ENABLED} is off` };
113264
+ this.settled = true;
113265
+ return;
113266
+ }
113267
+ if (soundId === SYSTEM_SOUND_ID) {
113268
+ this.plan = { kind: "system" };
113269
+ this.settled = true;
113270
+ return;
113271
+ }
113272
+ if (volume === 0) {
113273
+ this.plan = { kind: "silent", reason: `${SETTING_VOLUME} is 0` };
113274
+ this.settled = true;
113275
+ return;
113276
+ }
113277
+ let resolvedId = soundId;
113278
+ let audio = await this.fetchAudio(resolvedId, volume);
113279
+ if (stale()) return;
113280
+ if (audio.kind !== "bytes" && (audio.status === 404 || audio.status === 422) && resolvedId !== DEFAULT_SOUND_ID) {
113281
+ this.deps.log?.(
113282
+ `[notification-sound] ${resolvedId} not found (status ${audio.status}); using ${DEFAULT_SOUND_ID}`
113283
+ );
113284
+ resolvedId = DEFAULT_SOUND_ID;
113285
+ audio = await this.fetchAudio(resolvedId, volume);
113286
+ if (stale()) return;
113287
+ }
113288
+ if (audio.kind !== "bytes" || !audio.mimeType.toLowerCase().startsWith("audio/wav") || audio.data.byteLength === 0 || audio.data.byteLength > MAX_NOTIFICATION_SOUND_BYTES) {
113289
+ this.deps.log?.(
113290
+ `[notification-sound] audio for ${resolvedId} unavailable (status ${audio.status}); keeping ${this.plan.kind}`
113291
+ );
113292
+ return;
113293
+ }
113294
+ const staged = this.platform === "darwin" ? this.stage(resolvedId, volume, audio.data) : null;
113295
+ this.plan = {
113296
+ kind: "file",
113297
+ soundId: resolvedId,
113298
+ volume,
113299
+ bytes: audio.data,
113300
+ staged
113301
+ };
113302
+ this.settled = true;
113303
+ this.deps.log?.(
113304
+ `[notification-sound] ready id=${resolvedId} volume=${volume} bytes=${audio.data.byteLength} staged=${staged ?? "none"}`
113305
+ );
113306
+ } catch (error) {
113307
+ this.deps.log?.(`[notification-sound] refresh failed: ${String(error)}`);
113308
+ }
113309
+ }
113310
+ fetchAudio(soundId, volume) {
113311
+ return this.deps.media({
113312
+ op: "notification_sounds.audio",
113313
+ soundId,
113314
+ volume
113315
+ });
113316
+ }
113317
+ /**
113318
+ * A `config` feed frame: re-read only when a sound setting changed.
113319
+ *
113320
+ * The live feed names TOP-LEVEL config keys (core `desktop_feed.py` diffs
113321
+ * the top level), so a PATCH of `notifications.sound.volume` arrives as
113322
+ * `["notifications"]` (captured from `/v1/desktop/events`, QA round 1 Q2).
113323
+ * The dotted spellings are accepted too, so a feed that one day names
113324
+ * registry keys keeps working.
113325
+ */
113326
+ observeConfigChange(changedKeys) {
113327
+ if (changedKeys.some(
113328
+ (key) => key === "notifications" || key.startsWith("notifications.")
113329
+ ))
113330
+ void this.refresh();
113331
+ }
113332
+ /**
113333
+ * Write the WAV into `~/Library/Sounds` and prune older stagings. Returns the
113334
+ * file name the banner's `sound` carries, or `null` (the renderer fallback).
113335
+ *
113336
+ * Written to a temporary name and renamed, so the OS never opens a
113337
+ * half-written file under the name a banner points at.
113338
+ */
113339
+ stage(soundId, volume, bytes) {
113340
+ const name = stagedSoundName(soundId, volume, bytes, this.env);
113341
+ const scope = stagedScopePrefix(this.env);
113342
+ try {
113343
+ fs.mkdirSync(this.soundsDir, { recursive: true });
113344
+ const target2 = path$1.join(this.soundsDir, name);
113345
+ const temporary = path$1.join(this.soundsDir, `.${name}.${process.pid}.tmp`);
113346
+ fs.writeFileSync(temporary, bytes);
113347
+ fs.renameSync(temporary, target2);
113348
+ } catch (error) {
113349
+ this.deps.log?.(
113350
+ `[notification-sound] staging ${name} failed: ${String(error)}`
113351
+ );
113352
+ return null;
113353
+ }
113354
+ try {
113355
+ for (const entry of fs.readdirSync(this.soundsDir)) {
113356
+ const stale = entry !== name && entry.startsWith(scope) && entry.endsWith(".wav") || entry.startsWith(`.${scope}`) && entry.endsWith(".tmp");
113357
+ if (stale) fs.unlinkSync(path$1.join(this.soundsDir, entry));
113358
+ }
113359
+ } catch {
113360
+ }
113361
+ return name;
113362
+ }
113363
+ /**
113364
+ * The machine-wide sound slot, in two steps: `throttled()` reads it and
113365
+ * `takeSlot()` touches it. A `stat` and then a touch, NOT atomic, on purpose
113366
+ * (the backend's `claim_throttle` says why): a lost race costs one extra
113367
+ * chime, and a lock could lose a sound to a stale lock. Split so the
113368
+ * renderer fallback takes the slot only once a window accepted the sound
113369
+ * (QA round 1 Q3b): no window means no sound, and no sound must not silence
113370
+ * the TUI for 1.5 s. Fails OPEN when the run dir cannot be written, because
113371
+ * a tidiness rule must not become silence.
113372
+ */
113373
+ throttled() {
113374
+ const path2 = path$1.join(configDir(this.env), THROTTLE_FILE);
113375
+ try {
113376
+ const age = this.now() - fs.statSync(path2).mtimeMs;
113377
+ return age >= 0 && age < THROTTLE_MS;
113378
+ } catch {
113379
+ return false;
113380
+ }
113381
+ }
113382
+ takeSlot() {
113383
+ const path2 = path$1.join(configDir(this.env), THROTTLE_FILE);
113384
+ const stamp = this.now();
113385
+ try {
113386
+ fs.mkdirSync(path$1.join(configDir(this.env), "run"), { recursive: true });
113387
+ fs.closeSync(fs.openSync(path2, "a"));
113388
+ fs.utimesSync(path2, stamp / 1e3, stamp / 1e3);
113389
+ } catch {
113390
+ }
113391
+ }
113392
+ /**
113393
+ * The `silent` / `sound` options for a banner about to be shown. Call it
113394
+ * IMMEDIATELY before `new Notification` and show that banner: on the
113395
+ * fallback path it also starts the renderer sound, and it takes the
113396
+ * throttle slot.
113397
+ *
113398
+ * `silent` is the site's own request. A site asking for silence (Team
113399
+ * Bridge's coalesced replacement banner) always gets it and spends no slot.
113400
+ */
113401
+ bannerOptions(silent = false) {
113402
+ if (!this.settled && !this.inFlight) void this.refresh();
113403
+ if (silent) return { silent: true };
113404
+ const plan = this.plan;
113405
+ switch (plan.kind) {
113406
+ case "legacy":
113407
+ case "system":
113408
+ if (this.throttled()) return { silent: true };
113409
+ this.takeSlot();
113410
+ return { silent: false };
113411
+ case "silent":
113412
+ return { silent: true };
113413
+ case "file": {
113414
+ if (this.throttled()) return { silent: true };
113415
+ if (plan.staged) {
113416
+ this.takeSlot();
113417
+ return { silent: false, sound: plan.staged };
113418
+ }
113419
+ if (this.deps.playInRenderer(plan.bytes)) this.takeSlot();
113420
+ return { silent: true };
113421
+ }
113422
+ }
113423
+ }
113424
+ }
113425
+ let service = null;
113426
+ function configureNotificationSound(deps) {
113427
+ service = deps ? new NotificationSoundService(deps) : null;
113428
+ return service;
113429
+ }
113430
+ function notificationSoundOptions(silent = false) {
113431
+ return service ? service.bannerOptions(silent) : { silent };
113432
+ }
113006
113433
  const CONSENT_TITLE = () => t("ui.notices.main.consent_title");
113007
113434
  function consentBody(count, origin) {
113008
113435
  return count === 1 ? t("ui.notices.main.consent_body_one", { origin }) : t("ui.notices.main.consent_body_many", { count });
@@ -113053,7 +113480,8 @@ class ConsentNotifier {
113053
113480
  {
113054
113481
  title: CONSENT_TITLE(),
113055
113482
  body: consentBody(count, oldest.origin),
113056
- silent: false
113483
+ // The configured sound (or none); see `notification-sound.ts`.
113484
+ ...notificationSoundOptions()
113057
113485
  }
113058
113486
  );
113059
113487
  this.lifetime.retain(
@@ -115210,12 +115638,12 @@ const KEY_HEADER = "x-bridge-key";
115210
115638
  const INSTANCE_HEADER = "x-ui-browser-instance";
115211
115639
  const MAX_BODY_BYTES = 1 << 20;
115212
115640
  const LOOPBACK_HOST = "127.0.0.1";
115213
- function send(res, status2, body, contentType = "application/json") {
115641
+ function send(res, status2, body2, contentType = "application/json") {
115214
115642
  res.writeHead(status2, {
115215
115643
  "Content-Type": contentType,
115216
115644
  "Cache-Control": "no-store"
115217
115645
  });
115218
- res.end(typeof body === "string" ? body : JSON.stringify(body));
115646
+ res.end(typeof body2 === "string" ? body2 : JSON.stringify(body2));
115219
115647
  }
115220
115648
  function readBody(req) {
115221
115649
  return new Promise((resolve, reject) => {
@@ -115330,7 +115758,7 @@ async function handle(req, res, options) {
115330
115758
  const url = req.url ?? "";
115331
115759
  try {
115332
115760
  if (req.method === "GET" && url.split("?")[0] === HEALTH_PATH) {
115333
- const body = {
115761
+ const body2 = {
115334
115762
  host: "ui",
115335
115763
  proto: PROTO_VERSION,
115336
115764
  pid: process.pid,
@@ -115346,7 +115774,7 @@ async function handle(req, res, options) {
115346
115774
  // `capability_unsupported` possible without opening a socket.
115347
115775
  capabilities: [...HOST_CAPABILITIES]
115348
115776
  };
115349
- send(res, 200, body);
115777
+ send(res, 200, body2);
115350
115778
  return;
115351
115779
  }
115352
115780
  if (req.method !== "POST" || url.split("?")[0] !== RPC_PATH) {
@@ -118238,9 +118666,9 @@ class DesktopNotifier {
118238
118666
  }
118239
118667
  if (generation !== this.contractGeneration) return;
118240
118668
  if (response?.status === 200) {
118241
- const body = response.body;
118669
+ const body2 = response.body;
118242
118670
  this.applyNotificationContract(
118243
- body?.result?.features?.notification_contract
118671
+ body2?.result?.features?.notification_contract
118244
118672
  );
118245
118673
  this.contractAnswered = true;
118246
118674
  return;
@@ -118537,8 +118965,8 @@ class DesktopNotifier {
118537
118965
  completionToken
118538
118966
  });
118539
118967
  if (response.status !== 200) return "failed";
118540
- const body = response.body;
118541
- return body?.result?.claimed === true ? "won" : "lost";
118968
+ const body2 = response.body;
118969
+ return body2?.result?.claimed === true ? "won" : "lost";
118542
118970
  } catch {
118543
118971
  return "failed";
118544
118972
  }
@@ -118796,12 +119224,13 @@ class DesktopNotifier {
118796
119224
  * still re-words nothing (design 8.4). Gates pass `status = ""` and are
118797
119225
  * unaffected either way.
118798
119226
  */
118799
- show(sessionId2, title, status2, body, isSnippet = false, isFailure = false, surface = null) {
119227
+ show(sessionId2, title, status2, body2, isSnippet = false, isFailure = false, surface = null) {
118800
119228
  const lead = (isSnippet || isFailure) && status2 ? `${status2} — ` : "";
118801
119229
  const notification = new electron.Notification({
118802
119230
  title,
118803
- body: `${lead}${body}`.slice(0, MAX_BODY_CHARS),
118804
- silent: false
119231
+ body: `${lead}${body2}`.slice(0, MAX_BODY_CHARS),
119232
+ // The configured sound (or none); see `notification-sound.ts`.
119233
+ ...notificationSoundOptions()
118805
119234
  });
118806
119235
  this.lifetime.retain(notification, () => {
118807
119236
  const target2 = this.window();
@@ -119317,9 +119746,9 @@ function deviceLocaleFor(appLike) {
119317
119746
  };
119318
119747
  return attempt(appLike?.getPreferredSystemLanguages) ?? attempt(appLike?.getSystemLocale) ?? attempt(appLike?.getLocale);
119319
119748
  }
119320
- function asCapabilitiesAnswer(body) {
119321
- if (body === null || typeof body !== "object") return null;
119322
- const result = body.result;
119749
+ function asCapabilitiesAnswer(body2) {
119750
+ if (body2 === null || typeof body2 !== "object") return null;
119751
+ const result = body2.result;
119323
119752
  return result !== null && typeof result === "object" ? result : null;
119324
119753
  }
119325
119754
  function createMainLocale(options) {
@@ -120751,7 +121180,7 @@ function parseTeamBridgeNotifyRequest(value) {
120751
121180
  const conversationId = cleanId(input.conversationId);
120752
121181
  const tenantId = cleanId(input.tenantId);
120753
121182
  const title = cleanText(input.title, TEAM_BRIDGE_NOTIFY_MAX_TITLE);
120754
- const body = cleanText(input.body, TEAM_BRIDGE_NOTIFY_MAX_BODY);
121183
+ const body2 = cleanText(input.body, TEAM_BRIDGE_NOTIFY_MAX_BODY);
120755
121184
  const seq2 = input.seq;
120756
121185
  const sender = parseTeamBridgeNotificationSender(input.sender);
120757
121186
  const subtitle = input.subtitle === void 0 ? void 0 : cleanText(input.subtitle, TEAM_BRIDGE_NOTIFY_MAX_SUBTITLE);
@@ -120761,7 +121190,7 @@ function parseTeamBridgeNotifyRequest(value) {
120761
121190
  if (subtitle === null || threadId === null || messageId === null || viewing !== void 0 && typeof viewing !== "boolean") {
120762
121191
  return null;
120763
121192
  }
120764
- if (!owner?.accountId || conversationId === null || tenantId === null || title === null || body === null || typeof seq2 !== "number" || !Number.isSafeInteger(seq2) || seq2 < 0 || seq2 > MAX_SEQ) {
121193
+ if (!owner?.accountId || conversationId === null || tenantId === null || title === null || body2 === null || typeof seq2 !== "number" || !Number.isSafeInteger(seq2) || seq2 < 0 || seq2 > MAX_SEQ) {
120765
121194
  return null;
120766
121195
  }
120767
121196
  return {
@@ -120769,7 +121198,7 @@ function parseTeamBridgeNotifyRequest(value) {
120769
121198
  conversationId,
120770
121199
  tenantId,
120771
121200
  title,
120772
- body,
121201
+ body: body2,
120773
121202
  seq: seq2,
120774
121203
  ...sender ? { sender } : {},
120775
121204
  ...subtitle === void 0 ? {} : { subtitle },
@@ -121364,7 +121793,9 @@ class TeamBridgeNotifier {
121364
121793
  { ...request, title },
121365
121794
  this.options.platform ?? process.platform
121366
121795
  ),
121367
- silent: burst,
121796
+ // A coalesced replacement stays silent ("no second sound"); otherwise
121797
+ // the configured sound (or none), see `notification-sound.ts`.
121798
+ ...notificationSoundOptions(burst),
121368
121799
  ...icon2 ? { icon: icon2 } : {}
121369
121800
  });
121370
121801
  const conversationId = request.conversationId;
@@ -121754,11 +122185,11 @@ function serveOnTarget(bootVersion, installVersion, target2) {
121754
122185
  const order = compareVersions(boot, installed);
121755
122186
  return order === null ? boot === installed : order >= 0;
121756
122187
  }
121757
- function runtimeStragglerCount(body, current) {
122188
+ function runtimeStragglerCount(body2, current) {
121758
122189
  const currentBuild = current?.trim() ?? "";
121759
122190
  if (currentBuild === "") return null;
121760
- if (!isRecord(body)) return null;
121761
- const result = body.result;
122191
+ if (!isRecord(body2)) return null;
122192
+ const result = body2.result;
121762
122193
  if (!isRecord(result)) return null;
121763
122194
  const runtimes = result.runtimes;
121764
122195
  if (!Array.isArray(runtimes)) return null;
@@ -122349,9 +122780,9 @@ function rememberReleaseNotes(cache, notes) {
122349
122780
  function cachedReleaseNotes(cache, version) {
122350
122781
  return cache[String(version ?? "").trim()] ?? null;
122351
122782
  }
122352
- function summariseReleaseBody(body, limit = SUMMARY_LIMIT) {
122353
- if (typeof body !== "string") return null;
122354
- const blocks = body.replace(CRLF, "\n").split(BLANK_LINE);
122783
+ function summariseReleaseBody(body2, limit = SUMMARY_LIMIT) {
122784
+ if (typeof body2 !== "string") return null;
122785
+ const blocks = body2.replace(CRLF, "\n").split(BLANK_LINE);
122355
122786
  for (const block of blocks) {
122356
122787
  const text2 = flattenBlock(block);
122357
122788
  if (text2 && !isMachineRow(text2)) return truncateSummary(text2, limit);
@@ -122971,7 +123402,8 @@ function bannerReportedShown(notice, deadlineMs) {
122971
123402
  const notification = new electron.Notification({
122972
123403
  title: notice.title,
122973
123404
  body: notice.body,
122974
- silent: false
123405
+ // The configured sound (or none); see `notification-sound.ts`.
123406
+ ...notificationSoundOptions()
122975
123407
  });
122976
123408
  notification.on("show", () => {
122977
123409
  clearTimeout(deadline2);
@@ -130896,6 +131328,17 @@ electron.app.whenReady().then(async () => {
130896
131328
  return response;
130897
131329
  }
130898
131330
  );
131331
+ const notificationSound = configureNotificationSound({
131332
+ request: (input) => backendService.requestDesktop(input),
131333
+ media: (input) => backendService.requestDesktopMedia(input, null),
131334
+ playInRenderer: (bytes) => {
131335
+ const window = mainWindow;
131336
+ if (!window || window.isDestroyed()) return false;
131337
+ window.webContents.send(NOTIFICATION_SOUND_PLAY_CHANNEL, bytes);
131338
+ return true;
131339
+ },
131340
+ log: (line) => logger.info(line, LogFileType.BACKEND)
131341
+ });
130899
131342
  const desktopNotifier = new DesktopNotifier(
130900
131343
  () => mainWindow,
130901
131344
  sendDesktop,
@@ -130985,15 +131428,16 @@ electron.app.whenReady().then(async () => {
130985
131428
  notificationEndpointAvatarAvailable = false;
130986
131429
  notificationImages.clear();
130987
131430
  void backendService.requestDesktop({ op: "capabilities" }).then((response) => {
130988
- const body = response.body;
131431
+ const body2 = response.body;
130989
131432
  notificationAvatarAvailable = Number(
130990
- body?.result?.features?.team_bridge_notification_avatar ?? 0
131433
+ body2?.result?.features?.team_bridge_notification_avatar ?? 0
130991
131434
  ) >= 1;
130992
- notificationEndpointAvatarAvailable = Number(body?.result?.features?.team_bridge_endpoint_avatar ?? 0) >= 1;
131435
+ notificationEndpointAvatarAvailable = Number(body2?.result?.features?.team_bridge_endpoint_avatar ?? 0) >= 1;
130993
131436
  if (notificationAvatarAvailable)
130994
131437
  teamBridgeNotifier.replayDirectories();
130995
131438
  }).catch(() => void 0);
130996
131439
  void mainLocale.refresh();
131440
+ void notificationSound?.refresh();
130997
131441
  void desktopNotifier.refreshNotificationContract();
130998
131442
  void backendService.getDesktopFeedRelay().start();
130999
131443
  void publishViewerPresence();
@@ -131025,6 +131469,8 @@ electron.app.whenReady().then(async () => {
131025
131469
  if (frame.type === "config" && frame.payload.changed_keys.includes(LANGUAGE_SETTING_KEY)) {
131026
131470
  void mainLocale.refresh();
131027
131471
  }
131472
+ if (frame.type === "config")
131473
+ notificationSound?.observeConfigChange(frame.payload.changed_keys);
131028
131474
  const window = mainWindow;
131029
131475
  if (!window || window.isDestroyed()) return;
131030
131476
  window.webContents.send("desktop-feed-frame", frame);
@@ -131082,8 +131528,8 @@ electron.app.whenReady().then(async () => {
131082
131528
  const response = await backendService.requestDesktop({
131083
131529
  op: "capabilities"
131084
131530
  });
131085
- const body = response.body;
131086
- features = body?.result?.features;
131531
+ const body2 = response.body;
131532
+ features = body2?.result?.features;
131087
131533
  } catch {
131088
131534
  return;
131089
131535
  }
@@ -131236,9 +131682,9 @@ electron.app.whenReady().then(async () => {
131236
131682
  null
131237
131683
  );
131238
131684
  if (response.kind !== "json") return { html: null };
131239
- const body = response.body;
131685
+ const body2 = response.body;
131240
131686
  return {
131241
- html: body && typeof body.html === "string" ? body.html : null
131687
+ html: body2 && typeof body2.html === "string" ? body2.html : null
131242
131688
  };
131243
131689
  },
131244
131690
  (m) => logger.warn(m, LogFileType.BACKEND)