@symerian/symi 2.7.0 → 2.7.1

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 (313) hide show
  1. package/dist/{accounts-Cd816n6l.js → accounts-DDuIpcln.js} +7 -7
  2. package/dist/{accounts-mN_EcgxC.js → accounts-DyJN4_vR.js} +1 -1
  3. package/dist/{accounts-CokRskCl.js → accounts-bK-Yqdwx.js} +1 -1
  4. package/dist/{acp-cli-COzlJi3B.js → acp-cli-B2f0qBiM.js} +6 -6
  5. package/dist/{acp-cli-BLUeUUA5.js → acp-cli-D-9rzaOI.js} +2 -2
  6. package/dist/{agent-scope-BRwEc2pG.js → agent-scope-CgUHAtCo.js} +18 -18
  7. package/dist/{agents-Cu2bthAX.js → agents-Z8ruJPz2.js} +5 -5
  8. package/dist/{agents.config-Dib8Uo2P.js → agents.config-B9BZoM2m.js} +2 -2
  9. package/dist/{agents.config-5PTwsijs.js → agents.config-C951ocyh.js} +1 -1
  10. package/dist/{api-key-rotation-CEr3lKih.js → api-key-rotation-CzuPlV2t.js} +1 -1
  11. package/dist/{audio-preflight-mj-z_vQ6.js → audio-preflight-CIiS5cfP.js} +28 -28
  12. package/dist/{audio-preflight-DD18zIZd.js → audio-preflight-HILy3i0m.js} +4 -4
  13. package/dist/{audit-Djfdh06o.js → audit-BgdM9XZl.js} +23 -23
  14. package/dist/{audit-BjI_Yyr5.js → audit-xSagQWH8.js} +2 -2
  15. package/dist/{auth-choice-CmSUU3t8.js → auth-choice-BmYi6pBy.js} +8 -8
  16. package/dist/{auth-choice-5gul6jy2.js → auth-choice-D_VfXxhG.js} +2 -2
  17. package/dist/{auth-token-83A2btbE.js → auth-token-Cay2jwzn.js} +1 -1
  18. package/dist/{banner-B4vQpMIJ.js → banner-Bucr6qZ5.js} +1 -1
  19. package/dist/{bindings-ChzePa8q.js → bindings-DFaVVCsf.js} +1 -1
  20. package/dist/{browser-cli-kDUw45Y0.js → browser-cli-Bc_JVdTj.js} +3 -3
  21. package/dist/{browser-cli-BTD0NlrA.js → browser-cli-Dr0yx7-7.js} +9 -9
  22. package/dist/build-info.json +3 -3
  23. package/dist/bundled/boot-md/handler.js +1 -1
  24. package/dist/bundled/session-memory/handler.js +1 -1
  25. package/dist/{call-tmHtVCkn.js → call-CX0cs106.js} +9 -9
  26. package/dist/{call-DKi-hnaF.js → call-DeCQ2DhS.js} +1 -1
  27. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  28. package/dist/{channel-options-DVf4CJIu.js → channel-options-BMDryXHq.js} +1 -1
  29. package/dist/{channel-options-DsWGc55A.js → channel-options-z8-WeZyO.js} +2 -2
  30. package/dist/{channel-selection-DaJDux-Q.js → channel-selection-V2xDgw16.js} +1 -1
  31. package/dist/{channel-web-vGC-WJXi.js → channel-web-D_YxZAHT.js} +17 -17
  32. package/dist/{channels-cli-CSv05N3q.js → channels-cli-397NgC51.js} +7 -7
  33. package/dist/{channels-cli-COayA28A.js → channels-cli-CV7_JUru.js} +76 -76
  34. package/dist/{channels-status-issues-B_PI3nEE.js → channels-status-issues-CJ0Vb_9z.js} +1 -1
  35. package/dist/{chrome-BxwUEWrH.js → chrome-CiOKaTN-.js} +7 -7
  36. package/dist/{chrome-CSJzpT9Z.js → chrome-DU2ZysN3.js} +2 -2
  37. package/dist/cli/daemon-cli.js +1 -1
  38. package/dist/{cli-B-g79xPe.js → cli-4XU7pNlM.js} +4 -4
  39. package/dist/{cli-DJjOxip6.js → cli-Dq95udFO.js} +63 -63
  40. package/dist/{client-Bj_vTpri.js → client-B8xmq-Pw.js} +14 -2
  41. package/dist/{client-T3qcxXru.js → client-qUlxXXVJ.js} +13 -1
  42. package/dist/{command-registry-BvpLfzl7.js → command-registry-Cx9T7GYx.js} +10 -10
  43. package/dist/{commands-CtocZ4Lg.js → commands-BNLCWX6e.js} +1 -1
  44. package/dist/{commands-registry-BZ0ZSQpM.js → commands-registry-BT0-zzs3.js} +3 -3
  45. package/dist/{completion-cli-DtQcXg1N.js → completion-cli-WlSuySPZ.js} +12 -12
  46. package/dist/{completion-cli-CfRZ-7QF.js → completion-cli-cyVjlhls.js} +2 -2
  47. package/dist/{config-tNauHpdq.js → config-Dz95lSBW.js} +2 -2
  48. package/dist/{config-cli-DL2RdfLM.js → config-cli-CMymzmrI.js} +1 -1
  49. package/dist/{config-cli-D9Z78raJ.js → config-cli-EdmbBExA.js} +4 -4
  50. package/dist/{config-guard-4oRmpR0a.js → config-guard-CEkSg4hl.js} +12 -12
  51. package/dist/{config-validation-BoDWiwe3.js → config-validation-HDVDlMSV.js} +1 -1
  52. package/dist/{configure-jDpF8lmx.js → configure-DRMAIBBf.js} +15 -15
  53. package/dist/{configure-Dq4f8WPa.js → configure-DkFujfiY.js} +6 -6
  54. package/dist/{control-service-BBnhN7aZ.js → control-service-BYKXzY4f.js} +4 -4
  55. package/dist/control-ui/css/style.css +114 -0
  56. package/dist/control-ui/js/history.js +220 -85
  57. package/dist/{control-ui-assets-6n-YayeS.js → control-ui-assets-B7moDVHX.js} +1 -1
  58. package/dist/{cron-cli-D165ecaj.js → cron-cli-BHxfvWeT.js} +10 -10
  59. package/dist/{cron-cli-QCTdVZuP.js → cron-cli-DacyI1Pw.js} +3 -3
  60. package/dist/{daemon-cli-BccZzUb0.js → daemon-cli-BLhFbih0.js} +11 -11
  61. package/dist/{daemon-cli-DhJYEAoL.js → daemon-cli-BxKtiouf.js} +2 -2
  62. package/dist/daemon-cli.js +12 -0
  63. package/dist/{daemon-runtime-u01h46bE.js → daemon-runtime-mE1b-Q48.js} +10 -10
  64. package/dist/{deliver-BYdNAEqj.js → deliver-B4KZ6-oZ.js} +7 -7
  65. package/dist/{deliver-DtuY4Wgl.js → deliver-D6IcPfbt.js} +1 -1
  66. package/dist/{devices-cli-BNG-fvdl.js → devices-cli-1kiO08aL.js} +2 -2
  67. package/dist/{devices-cli-D0N71nqX.js → devices-cli-B8Q8AzbX.js} +6 -6
  68. package/dist/{diagnostics-BrUo0gqs.js → diagnostics-BRwihzJG.js} +5 -5
  69. package/dist/{directory-cli-aj7aXIBM.js → directory-cli-KgsAVTA0.js} +7 -7
  70. package/dist/{dm-policy-shared-epgkayyq.js → dm-policy-shared-DlDAGtZL.js} +2 -2
  71. package/dist/{dns-cli-Dit09wbu.js → dns-cli-Cwr92Aiq.js} +3 -3
  72. package/dist/{dock-BYiRZSgZ.js → dock-BhS32F6E.js} +4 -4
  73. package/dist/{docs-cli-CyWGMA-e.js → docs-cli-qE-blOLC.js} +1 -1
  74. package/dist/{doctor-completion-oQemZItC.js → doctor-completion-BDzhB9pE.js} +1 -1
  75. package/dist/{doctor-completion-Ccb83Wl5.js → doctor-completion-CfeROjIz.js} +2 -2
  76. package/dist/{doctor-config-flow-BXmHd2bb.js → doctor-config-flow-iIzSEQxb.js} +10 -10
  77. package/dist/entry.js +1 -1
  78. package/dist/{exec-approvals-cli-CmndFjEA.js → exec-approvals-cli-BRx2oxs5.js} +4 -4
  79. package/dist/{exec-approvals-cli-CZ-iTtNO.js → exec-approvals-cli-Cj6Z-vxL.js} +13 -13
  80. package/dist/extensionAPI.js +6 -6
  81. package/dist/{fs-safe-CTDvb1DF.js → fs-safe-CUjO1ca2.js} +6 -6
  82. package/dist/{gateway-cli-C1zPKZ7B.js → gateway-cli-C-G0QrTd.js} +264 -175
  83. package/dist/{gateway-cli-zbVm1MBQ.js → gateway-cli-Cpn7JyAw.js} +164 -75
  84. package/dist/{gateway-rpc-BMdVa3QV.js → gateway-rpc-BWTK7g8B.js} +1 -1
  85. package/dist/{gateway-rpc-B1Wzoj99.js → gateway-rpc-WM-HXUbl.js} +1 -1
  86. package/dist/{glass-ui-ws-D3tAmqKX.js → glass-ui-ws-BI81Lh6Z.js} +83 -83
  87. package/dist/{glass-ui-ws-CvUFd4C6.js → glass-ui-ws-jAbqZVc9.js} +11 -11
  88. package/dist/{health-o847FIt1.js → health-B1nih5LD.js} +13 -13
  89. package/dist/{health-DQEqLYg1.js → health-CsTxt66a.js} +2 -2
  90. package/dist/{hooks-cli-sYjbF4I6.js → hooks-cli-BhxMFkKe.js} +77 -77
  91. package/dist/{hooks-cli-D_UW9fc8.js → hooks-cli-CIlvtt2M.js} +5 -5
  92. package/dist/{image-lCS3o9xj.js → image-BWmcNF8N.js} +3 -3
  93. package/dist/{image-lp19FlzF.js → image-D7Fl08gG.js} +1 -1
  94. package/dist/{image-ops-DYbDWaIA.js → image-ops-1OJMSAUX.js} +10 -10
  95. package/dist/index.js +73 -73
  96. package/dist/{inspect-CNYyHVfH.js → inspect-CvbbCuoa.js} +4 -4
  97. package/dist/{install-safe-path-D3mg1DMG.js → install-safe-path-D3Uz77u7.js} +11 -11
  98. package/dist/{installs-CYTVYWH_.js → installs-DQcRVF1U.js} +10 -10
  99. package/dist/{ir-Dt4hOzxG.js → ir-DZam9q5M.js} +6 -6
  100. package/dist/{lifecycle-core-DxmxQdhS.js → lifecycle-core-C4HzGXA1.js} +5 -5
  101. package/dist/llm-slug-generator.js +1 -1
  102. package/dist/{local-roots-BBeKX7PX.js → local-roots-aAFLQGkY.js} +2 -2
  103. package/dist/{login-CnjdNmGD.js → login-DODfJ3Dn.js} +3 -3
  104. package/dist/{login-qr-DUf6CM0M.js → login-qr-CBRxijIg.js} +5 -5
  105. package/dist/{logs-cli-DtlrLf7u.js → logs-cli-BZV7dq_U.js} +3 -3
  106. package/dist/{logs-cli-BVd6h2-Q.js → logs-cli-DyCcDkRs.js} +7 -7
  107. package/dist/{manager-C1CfGzZ2.js → manager-D4LJSRyZ.js} +13 -13
  108. package/dist/{markdown-tables-ZwP14ydw.js → markdown-tables-CEbN0fEm.js} +1 -1
  109. package/dist/{memory-cli-DhkRAIdT.js → memory-cli-DDumUksr.js} +14 -14
  110. package/dist/{model-catalog-CvbwxWuC.js → model-catalog-8Son0J4O.js} +4 -4
  111. package/dist/{model-picker-C2MqloOs.js → model-picker-CAm2Bftd.js} +3 -3
  112. package/dist/{model-selection-X1oLh3CE.js → model-selection-CyFvYcRt.js} +9 -9
  113. package/dist/{model-CeeOcylL.js → model-tWhwnFf8.js} +1 -1
  114. package/dist/{models-Zol34e73.js → models-DhMe2rzL.js} +3 -3
  115. package/dist/{models-cli-DnMUzr15.js → models-cli-DKM5sCQM.js} +72 -72
  116. package/dist/{models-cli-BzcEA9oa.js → models-cli-Dewg24W2.js} +6 -6
  117. package/dist/{models-config-CEMioDUi.js → models-config-CFFjJPe7.js} +7 -7
  118. package/dist/{node-cli-BVJid4L_.js → node-cli-4eMRkmrw.js} +28 -28
  119. package/dist/{node-cli-eHn9-YfJ.js → node-cli-Dfs0UmnJ.js} +1 -1
  120. package/dist/{node-service-CXzMs782.js → node-service-CD47Qpf1.js} +1 -1
  121. package/dist/{nodes-cli-Ct4M7JOe.js → nodes-cli-BKb61OjH.js} +3 -3
  122. package/dist/{nodes-cli-BN2Nslim.js → nodes-cli-DxfP9DIz.js} +10 -10
  123. package/dist/{nodes-screen-Cd49cSPb.js → nodes-screen-8Bq7DiSa.js} +4 -4
  124. package/dist/{npm-registry-spec-DchndI6P.js → npm-registry-spec-C0CPT3vr.js} +9 -9
  125. package/dist/{onboard-CxOT_xD4.js → onboard-Dw_nX2RD.js} +3 -3
  126. package/dist/{onboard-channels-D-lh_Vh1.js → onboard-channels-8ynJSZL6.js} +1 -1
  127. package/dist/{onboard-channels-CUlITipG.js → onboard-channels-ChxtmhFY.js} +5 -5
  128. package/dist/{onboard-custom-DTcLdtA9.js → onboard-custom-XiomtQr7.js} +3 -3
  129. package/dist/{onboard-helpers-CdPNw25E.js → onboard-helpers-CueJ7O_B.js} +8 -8
  130. package/dist/{onboard-helpers-BBtPmJEe.js → onboard-helpers-PpGrZIGw.js} +1 -1
  131. package/dist/{onboard-hooks-C_2_jpWg.js → onboard-hooks-C3ok8kqB.js} +1 -1
  132. package/dist/{onboard-remote-v6QMnyJD.js → onboard-remote-Cd9kIiSG.js} +1 -1
  133. package/dist/{onboard-remote-D-B4EiOE.js → onboard-remote-DCdpB2HH.js} +1 -1
  134. package/dist/{onboard-skills-BDCzVjxb.js → onboard-skills-CC2CV5Er.js} +1 -1
  135. package/dist/{onboard-skills-CQtkRP20.js → onboard-skills-DRICcBwa.js} +4 -4
  136. package/dist/{onboard-CSseK0Co.js → onboard-yrgbC1mu.js} +13 -13
  137. package/dist/{onboarding-DktESmTv.js → onboarding-BJcYsOFw.js} +7 -7
  138. package/dist/{onboarding-Dn5agNG_.js → onboarding-e-RSXpUi.js} +13 -13
  139. package/dist/{onboarding.finalize-CTIZ1zvV.js → onboarding.finalize-CKNdiZEZ.js} +75 -75
  140. package/dist/{onboarding.finalize-Bm-1Kdnh.js → onboarding.finalize-DenYTWUu.js} +10 -10
  141. package/dist/{onboarding.gateway-config-CwnQkyO0.js → onboarding.gateway-config-DTWQ-Bqq.js} +14 -14
  142. package/dist/{onboarding.gateway-config-B9zGPfCl.js → onboarding.gateway-config-Dj68bVBt.js} +3 -3
  143. package/dist/{openai-model-default-4kBA1_78.js → openai-model-default-WqcGxyFM.js} +2 -2
  144. package/dist/{outbound-attachment-Qfh5dlsg.js → outbound-attachment-Bw-c5Cdp.js} +2 -2
  145. package/dist/{outbound-_Ir3M05f.js → outbound-wnv03tb3.js} +4 -4
  146. package/dist/{pairing-cli-C8UXBJ_A.js → pairing-cli-DSM82gJG.js} +8 -8
  147. package/dist/{pairing-labels-Dxb898X5.js → pairing-labels-DyXoD1DS.js} +1 -1
  148. package/dist/{pairing-store-B8ktu-6j.js → pairing-store-CK726Dzq.js} +2 -2
  149. package/dist/{pairing-token-AV-MMfVE.js → pairing-token-CX3NN_qj.js} +7 -7
  150. package/dist/{paths-CT6jsi4E.js → paths-BBm9fwuG.js} +1 -1
  151. package/dist/{pi-auth-json-FpfHyEcu.js → pi-auth-json-zHckislA.js} +5 -5
  152. package/dist/{pi-embedded-CYDMb5q0.js → pi-embedded-BzS693I1.js} +28 -16
  153. package/dist/{pi-embedded-helpers-Bs4eMaNo.js → pi-embedded-helpers-BgdB5kvy.js} +6 -6
  154. package/dist/{pi-embedded-helpers-Dij3O6ox.js → pi-embedded-helpers-DXAoe1Bx.js} +4 -4
  155. package/dist/{pi-tools.policy-BBxnqCay.js → pi-tools.policy-DRWb_Cax.js} +4 -4
  156. package/dist/{plugin-auto-enable-DwIrzVOA.js → plugin-auto-enable-CP0nONRL.js} +2 -2
  157. package/dist/{plugin-registry-CJGPW1-k.js → plugin-registry-Bzz7mUyl.js} +1 -1
  158. package/dist/{plugin-registry-d0oZLl6y.js → plugin-registry-SUa2FFIj.js} +3 -3
  159. package/dist/plugin-sdk/{channel-web-Dm-CzA1O.js → channel-web-DRabhx1e.js} +1 -1
  160. package/dist/plugin-sdk/gateway/protocol/index.d.ts +13 -2
  161. package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +11 -0
  162. package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +4 -1
  163. package/dist/plugin-sdk/index.js +2 -2
  164. package/dist/plugin-sdk/{reply-4HEU7aDS.js → reply-Cw3shPk2.js} +14 -2
  165. package/dist/plugin-sdk/{web-Cclb7FTq.js → web-CH43nBP0.js} +2 -2
  166. package/dist/{plugins-BAyxWQSz.js → plugins-DKDeQZF0.js} +2 -2
  167. package/dist/{plugins-cli-CL0tzkMo.js → plugins-cli-DwtoU3xk.js} +5 -5
  168. package/dist/{plugins-cli-BWgjIJQL.js → plugins-cli-qG50__1A.js} +72 -72
  169. package/dist/{ports-OZQlocB7.js → ports-BOmtxoTv.js} +2 -2
  170. package/dist/{ports-u9lWy2Jt.js → ports-DtW62rqS.js} +1 -1
  171. package/dist/{program-context-CXZHSZ4D.js → program-context-CZwy-bh6.js} +39 -39
  172. package/dist/{program-BHjH97Q_.js → program-mZOVTSdQ.js} +10 -10
  173. package/dist/{prompt-select-styled-BUFEoSlM.js → prompt-select-styled-BZnuv8jI.js} +38 -38
  174. package/dist/{prompt-select-styled-D8LXSUR7.js → prompt-select-styled-CtNg5KGU.js} +6 -6
  175. package/dist/{provider-auth-helpers-BFHctF2f.js → provider-auth-helpers-CEYCb2mJ.js} +1 -1
  176. package/dist/{provider-auth-helpers-CeAbh3lv.js → provider-auth-helpers-D60nbSLq.js} +5 -5
  177. package/dist/{push-apns-BylbQyP9.js → push-apns-B5txhDVi.js} +1 -1
  178. package/dist/{push-apns-DqFdzIkc.js → push-apns-CoG1P_P0.js} +4 -4
  179. package/dist/{pw-ai-BO5cSmwD.js → pw-ai-CANiWpMA.js} +1 -1
  180. package/dist/{pw-ai-CfrnAHwA.js → pw-ai-DQohWnzT.js} +7 -7
  181. package/dist/{qmd-manager-DUNbG4Qr.js → qmd-manager-CCUK1xoc.js} +18 -18
  182. package/dist/{qr-cli-BZYa2gvF.js → qr-cli-CejYwqsj.js} +3 -3
  183. package/dist/{register.agent-DxAqRAt3.js → register.agent-BY_Df_Me.js} +9 -9
  184. package/dist/{register.agent-bzSGKS-l.js → register.agent-CopGIf9e.js} +82 -82
  185. package/dist/{register.configure-WS1nlSp8.js → register.configure-Bu_XKu7Z.js} +11 -11
  186. package/dist/register.configure-CoYQhQBT.js +148 -0
  187. package/dist/{register.maintenance-D_qMTrgD.js → register.maintenance-BtqQ3hDN.js} +11 -11
  188. package/dist/{register.maintenance-B1QcUr38.js → register.maintenance-VqCqhB7y.js} +85 -85
  189. package/dist/{register.message-zu3HGGff.js → register.message-DZCCEK01.js} +5 -5
  190. package/dist/{register.message-CJF8gLAN.js → register.message-dd1xYBZT.js} +64 -64
  191. package/dist/{register.onboard-CswoaT7q.js → register.onboard-B6EL1d-C.js} +75 -75
  192. package/dist/{register.onboard-9dwNqCe6.js → register.onboard-lzwHKufI.js} +7 -7
  193. package/dist/{register.setup-CvomtGGu.js → register.setup-BJsr5_qp.js} +78 -78
  194. package/dist/{register.setup-TcjUu6HC.js → register.setup-D_b_HW5D.js} +7 -7
  195. package/dist/{register.status-health-sessions-CM1SX81r.js → register.status-health-sessions-Dvj4mlom.js} +7 -7
  196. package/dist/{register.status-health-sessions-CQMvbwr6.js → register.status-health-sessions-jeiqtgl7.js} +76 -76
  197. package/dist/{register.subclis-CVQASXaL.js → register.subclis-DdPRkz29.js} +20 -20
  198. package/dist/{replies-Dy92jzrz.js → replies-BMqtgBhh.js} +1 -1
  199. package/dist/{reply-CpNWtuU4.js → reply-XaXqDK9F.js} +139 -139
  200. package/dist/{reply-prefix-BLOOs1aW.js → reply-prefix-CE2YmmsD.js} +1 -1
  201. package/dist/{resolve-route-BcnaXYvh.js → resolve-route-BMoTaVAH.js} +2 -2
  202. package/dist/{routes-CVwRcA9D.js → routes-BAZTZNuQ.js} +8 -8
  203. package/dist/{rpc-CZFfee1J.js → rpc-N1nf_c1A.js} +1 -1
  204. package/dist/{rpc-D0FiEinj.js → rpc-QHo-8pCM.js} +1 -1
  205. package/dist/{run-main-Dq6tfDry.js → run-main-MhL-xG3_.js} +17 -17
  206. package/dist/{runner-Ct0suQrd.js → runner-BS9gGL5i.js} +1 -1
  207. package/dist/{runner-BAVs-p6Z.js → runner-DRv0uCK_.js} +20 -20
  208. package/dist/{sandbox-HZ_uilsn.js → sandbox-B6N8cV4d.js} +18 -18
  209. package/dist/{sandbox-cli-wZtiyo8g.js → sandbox-cli-DwzaNjIJ.js} +20 -20
  210. package/dist/{security-cli-BESmRIrl.js → security-cli-B-4J6enu.js} +36 -36
  211. package/dist/{security-cli-CG1uSlRK.js → security-cli-CSMUEGPK.js} +3 -3
  212. package/dist/{send-DsSI8z3F.js → send-9SapUCg7.js} +6 -6
  213. package/dist/{send-DT-5buW5.js → send-B3RdXvjC.js} +6 -6
  214. package/dist/{send-JWV62VbW.js → send-Bm4ULEzh.js} +6 -6
  215. package/dist/{send-BVBCh27_.js → send-CQVnyJyF.js} +13 -13
  216. package/dist/{send-CXFTeD_J.js → send-DVm0du0_.js} +4 -4
  217. package/dist/{server-context-VlF1_hYj.js → server-context-CCBZN8a0.js} +5 -5
  218. package/dist/{server-methods-B0pdetGJ.js → server-methods-0ksPFnev.js} +441 -124
  219. package/dist/{server-methods-IBEaQXPX.js → server-methods-Bu1RjLe6.js} +484 -167
  220. package/dist/{server-node-events-CyDj7Txd.js → server-node-events-DCbzFyQF.js} +5 -5
  221. package/dist/{server-node-events-BACmfyjo.js → server-node-events-DZAN3hWE.js} +64 -64
  222. package/dist/{service-D80PyJxB.js → service-osK70kTZ.js} +15 -15
  223. package/dist/{session-6Qyc4cBQ.js → session-DsJGtM7g.js} +2 -2
  224. package/dist/{session-dirs-DPzjjra2.js → session-dirs-Dgz7kkUM.js} +2 -2
  225. package/dist/{sessions-jTAGYjWl.js → sessions-Cpgnq0pA.js} +13 -13
  226. package/dist/{shared-BfhtOZAz.js → shared-73T9fyuK.js} +3 -3
  227. package/dist/{shared-BV7WhIkY.js → shared-DnmJ0ABB.js} +1 -1
  228. package/dist/{skill-commands-ZXbEITKi.js → skill-commands-Cxw-jNxU.js} +5 -5
  229. package/dist/{skill-scanner-w3DJvw1Q.js → skill-scanner-hMtQbWPV.js} +5 -5
  230. package/dist/{skills-DqQUtOph.js → skills-6jdJQ5ZL.js} +4 -4
  231. package/dist/{skills-cli-D3lePXkf.js → skills-cli-DXkx4vNV.js} +7 -7
  232. package/dist/{skills-install-HGYidhrv.js → skills-install-CWVdJkLn.js} +3 -3
  233. package/dist/{skills-status-Cjsh8we0.js → skills-status-C3ptXwnh.js} +1 -1
  234. package/dist/{sqlite-BV5ILFtC.js → sqlite-Dx3J_aSE.js} +12 -12
  235. package/dist/{status-DzHL-eVu.js → status-CiHkFbIh.js} +3 -3
  236. package/dist/{status-nzJEZmNT.js → status-DOTlXdcN.js} +25 -25
  237. package/dist/{status-DUeTrQSz.js → status-IWqSLXLR.js} +1 -1
  238. package/dist/{status-BJtbD-cG.js → status-qkmUAeWo.js} +5 -5
  239. package/dist/{status.update-TlYwuzTa.js → status.update-CG0ciGaf.js} +3 -3
  240. package/dist/{store-DvtcmOKj.js → store-r1DJSDq-.js} +5 -5
  241. package/dist/{subagent-registry-CzS4CfnV.js → subagent-registry-DCoU9xIE.js} +5 -5
  242. package/dist/{symi-root-MF6_6SCS.js → symi-root-CrGJbkzf.js} +2 -2
  243. package/dist/{system-cli-C2yhGP4C.js → system-cli-DY7ov1OT.js} +7 -7
  244. package/dist/{system-cli-Z7uzO8qd.js → system-cli-LFURKpwS.js} +3 -3
  245. package/dist/{systemd-CevHlgD4.js → systemd-DT6SbCim.js} +5 -5
  246. package/dist/{systemd-hints-DmgRnw1L.js → systemd-hints-xYZbFny_.js} +6 -6
  247. package/dist/{systemd-linger-ScxQ1_H4.js → systemd-linger-DCskIKcx.js} +1 -1
  248. package/dist/{tables-C38rzF6E.js → tables-BEzT0Da4.js} +1 -1
  249. package/dist/{target-errors-CCz79CmV.js → target-errors-7AvoVa10.js} +4 -4
  250. package/dist/{tool-images-B-pqX3nX.js → tool-images-DvUBlqjX.js} +1 -1
  251. package/dist/{tui-D2MOx3Kx.js → tui-BH7JwqvB.js} +7 -7
  252. package/dist/{tui-DrATGNms.js → tui-C_5HG495.js} +2 -2
  253. package/dist/{tui-cli-D19-MCXt.js → tui-cli-B65PKZMj.js} +3 -3
  254. package/dist/{tui-cli-B2ii7u23.js → tui-cli-CJnfmuxq.js} +28 -28
  255. package/dist/{unified-runner-BtO3UQSd.js → unified-runner-CApgXtVC.js} +14 -2
  256. package/dist/{update-Don6XTH9.js → update-Ya0e-JnM.js} +3 -3
  257. package/dist/{update-check-DCo5RtKp.js → update-check-7EzEjSzb.js} +5 -5
  258. package/dist/{update-cli-gKtjyXlD.js → update-cli-Bi6iMCXr.js} +95 -95
  259. package/dist/{update-cli-DRODEMSI.js → update-cli-BjQ3o9gQ.js} +12 -12
  260. package/dist/{update-runner-JcdOHr71.js → update-runner-BhVsdpxm.js} +1 -1
  261. package/dist/{update-runner-AsKAxe31.js → update-runner-FhW6n-Nv.js} +15 -15
  262. package/dist/{web-BIzWZFiN.js → web-ConlA_Ch.js} +4 -4
  263. package/dist/{web-DGo16lWn.js → web-CthDLVSz.js} +1 -1
  264. package/dist/{web-DKwOxo8E.js → web-Db_-ahjX.js} +6 -6
  265. package/dist/web-Dpb_tv_j.js +110 -0
  266. package/dist/{webhooks-cli-DbnQ2BVE.js → webhooks-cli-BRxe4uCg.js} +4 -4
  267. package/dist/{whatsapp-actions-CqXxtCoj.js → whatsapp-actions-ChO_shrk.js} +15 -15
  268. package/dist/{with-timeout-Cm5EhxG_.js → with-timeout-CtVdu_1U.js} +1 -1
  269. package/dist/{workspace-dirs-DKu48umx.js → workspace-dirs-GpkFi6Kw.js} +1 -1
  270. package/dist/{wsl-xNOi_Ch8.js → wsl-q8spwrME.js} +2 -2
  271. package/extensions/bluebubbles/package.json +1 -1
  272. package/extensions/copilot-proxy/package.json +1 -1
  273. package/extensions/diagnostics-otel/package.json +1 -1
  274. package/extensions/discord/package.json +1 -1
  275. package/extensions/feishu/package.json +1 -1
  276. package/extensions/google-antigravity-auth/package.json +1 -1
  277. package/extensions/google-gemini-cli-auth/package.json +1 -1
  278. package/extensions/googlechat/package.json +1 -1
  279. package/extensions/imessage/package.json +1 -1
  280. package/extensions/irc/package.json +1 -1
  281. package/extensions/learning-loop/package.json +1 -1
  282. package/extensions/line/package.json +1 -1
  283. package/extensions/llm-task/package.json +1 -1
  284. package/extensions/matrix/CHANGELOG.md +6 -0
  285. package/extensions/matrix/package.json +1 -1
  286. package/extensions/mattermost/package.json +1 -1
  287. package/extensions/memory-core/package.json +1 -1
  288. package/extensions/memory-lancedb/package.json +1 -1
  289. package/extensions/minimax-portal-auth/package.json +1 -1
  290. package/extensions/msteams/CHANGELOG.md +6 -0
  291. package/extensions/msteams/package.json +1 -1
  292. package/extensions/nextcloud-talk/package.json +1 -1
  293. package/extensions/nostr/CHANGELOG.md +6 -0
  294. package/extensions/nostr/package.json +1 -1
  295. package/extensions/open-prose/package.json +1 -1
  296. package/extensions/outlook/package.json +1 -1
  297. package/extensions/pipeline/package.json +1 -1
  298. package/extensions/signal/package.json +1 -1
  299. package/extensions/slack/package.json +1 -1
  300. package/extensions/telegram/package.json +1 -1
  301. package/extensions/tlon/package.json +1 -1
  302. package/extensions/twitch/CHANGELOG.md +6 -0
  303. package/extensions/twitch/package.json +1 -1
  304. package/extensions/voice-call/CHANGELOG.md +6 -0
  305. package/extensions/voice-call/package.json +1 -1
  306. package/extensions/whatsapp/package.json +1 -1
  307. package/extensions/zalo/CHANGELOG.md +6 -0
  308. package/extensions/zalo/package.json +1 -1
  309. package/extensions/zalouser/CHANGELOG.md +6 -0
  310. package/extensions/zalouser/package.json +1 -1
  311. package/package.json +1 -1
  312. package/dist/register.configure-Boyfir72.js +0 -148
  313. package/dist/web-sefqR11J.js +0 -110
@@ -1,58 +1,58 @@
1
1
  import { g as resolveStateDir, t as CONFIG_PATH } from "./paths-Cqn-zk3M.js";
2
2
  import { D as isPlainObject, U as getResolvedLoggerSettings, r as clamp, y as resolveUserPath } from "./utils-B-0b9bGM.js";
3
3
  import { a as normalizeElevatedLevel, c as normalizeUsageDisplay, d as supportsXHighThinking, n as formatXHighModelHint, o as normalizeReasoningLevel, s as normalizeThinkLevel, t as formatThinkingLevels } from "./thinking-EAliFiVK.js";
4
- import { $n as OPENAI_TTS_MODELS, Bn as registerAgentRunContext, Bt as abortEmbeddedPiRun, C as ensureOutboundSessionEntry, Et as agentCommand, Ft as normalizeSendPolicy, G as normalizeCronJobPatch, Gn as resolveTtsApiKey, H as writeRestartSentinel, Hn as getTtsProvider, Ht as waitForEmbeddedPiRunEnd, It as resolveSendPolicy, Jn as resolveTtsPrefsPath, Kn as resolveTtsAutoMode, L as formatDoctorNonInteractiveHint, Mn as listSubagentRunsForRequester, Mt as resolveOutboundTarget, N as scheduleGatewaySigusr1Restart, Ot as resolveAgentDeliveryPlan, Pr as resolveAgentTimeoutMs, Qn as textToSpeech, Rt as createOutboundSendDeps, Sr as isSystemEventContextChanged, Tn as stopSubagentsForRequester, Un as isTtsEnabled, Vn as resolveUserTimezone, W as normalizeCronJobCreate, Wn as isTtsProviderConfigured, Xn as setTtsEnabled, Yn as resolveTtsProviderOrder, Zn as setTtsProvider, _ as loadCombinedSessionStoreForGateway, at as persistBrowserProxyFiles, b as resolveGatewaySessionStoreTarget, br as parseVerboseOverride, c as clearSessionQueues, er as OPENAI_TTS_VOICES, ft as loadSymiPlugins, g as listSessionsFromStore, gt as loadProviderUsageSummary, h as listAgentsForGateway, in as unbindThreadBindingsBySessionKey, it as applyBrowserProxyPaths, jn as listDescendantRunsForRequester, kt as resolveAgentOutboundTarget, mn as createReplyDispatcher, mt as normalizeGroupActivation, n as BARE_SESSION_RESET_PROMPT, p as canonicalizeSpawnedByForAgent, pn as dispatchInboundMessage, qn as resolveTtsConfig, v as loadSessionEntry, vr as applyModelOverrideToSessionEntry, w as resolveOutboundSessionRoute, wn as isAbortTrigger, x as resolveSessionModelRef, xn as formatZonedTimestamp, xr as enqueueSystemEvent, y as pruneLegacyStoreKeys, yr as applyVerboseOverride, zn as onAgentEvent } from "./reply-CpNWtuU4.js";
4
+ import { $n as OPENAI_TTS_MODELS, Bn as registerAgentRunContext, Bt as abortEmbeddedPiRun, C as ensureOutboundSessionEntry, Et as agentCommand, Ft as normalizeSendPolicy, G as normalizeCronJobPatch, Gn as resolveTtsApiKey, H as writeRestartSentinel, Hn as getTtsProvider, Ht as waitForEmbeddedPiRunEnd, It as resolveSendPolicy, Jn as resolveTtsPrefsPath, Kn as resolveTtsAutoMode, L as formatDoctorNonInteractiveHint, Mn as listSubagentRunsForRequester, Mt as resolveOutboundTarget, N as scheduleGatewaySigusr1Restart, Ot as resolveAgentDeliveryPlan, Pr as resolveAgentTimeoutMs, Qn as textToSpeech, Rt as createOutboundSendDeps, Sr as isSystemEventContextChanged, Tn as stopSubagentsForRequester, Un as isTtsEnabled, Vn as resolveUserTimezone, W as normalizeCronJobCreate, Wn as isTtsProviderConfigured, Xn as setTtsEnabled, Yn as resolveTtsProviderOrder, Zn as setTtsProvider, _ as loadCombinedSessionStoreForGateway, at as persistBrowserProxyFiles, b as resolveGatewaySessionStoreTarget, br as parseVerboseOverride, c as clearSessionQueues, er as OPENAI_TTS_VOICES, ft as loadSymiPlugins, g as listSessionsFromStore, gt as loadProviderUsageSummary, h as listAgentsForGateway, in as unbindThreadBindingsBySessionKey, it as applyBrowserProxyPaths, jn as listDescendantRunsForRequester, kt as resolveAgentOutboundTarget, mn as createReplyDispatcher, mt as normalizeGroupActivation, n as BARE_SESSION_RESET_PROMPT, p as canonicalizeSpawnedByForAgent, pn as dispatchInboundMessage, qn as resolveTtsConfig, v as loadSessionEntry, vr as applyModelOverrideToSessionEntry, w as resolveOutboundSessionRoute, wn as isAbortTrigger, x as resolveSessionModelRef, xn as formatZonedTimestamp, xr as enqueueSystemEvent, y as pruneLegacyStoreKeys, yr as applyVerboseOverride, zn as onAgentEvent } from "./reply-XaXqDK9F.js";
5
5
  import { S as parseAgentSessionKey, l as resolveAgentIdFromSessionKey, m as DEFAULT_ACCOUNT_ID, o as classifySessionKeyShape, s as normalizeAgentId, t as DEFAULT_AGENT_ID, x as isSubagentSessionKey } from "./session-key-DCt45XZa.js";
6
- import { t as resolveSymiPackageRoot } from "./symi-root-MF6_6SCS.js";
6
+ import { t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
7
7
  import { C as createInternalHookEvent, T as triggerInternalHook, d as getActivePluginRegistry, r as DEFAULT_CHAT_CHANNEL, t as CHANNEL_IDS } from "./registry-Cja8eT7G.js";
8
8
  import { f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-D9vIQve0.js";
9
- import { C as ensureAgentWorkspace, S as DEFAULT_USER_FILENAME, T as isWorkspaceOnboardingCompleted, _ as DEFAULT_MEMORY_ALT_FILENAME, b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, g as DEFAULT_IDENTITY_FILENAME, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as DEFAULT_AGENTS_FILENAME, t as listAgentEntries, v as DEFAULT_MEMORY_FILENAME, x as DEFAULT_TOOLS_FILENAME, y as DEFAULT_SYMICORE_FILENAME } from "./agent-scope-BRwEc2pG.js";
10
- import { Bt as normalizeSecretInput, _ as resolveSubagentConfiguredModelSelection, d as resolveAllowedModelRef, m as resolveDefaultModelForAgent, y as resolveThinkingDefault } from "./model-selection-X1oLh3CE.js";
9
+ import { C as ensureAgentWorkspace, S as DEFAULT_USER_FILENAME, T as isWorkspaceOnboardingCompleted, _ as DEFAULT_MEMORY_ALT_FILENAME, b as DEFAULT_SYMIPULSE_FILENAME, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, g as DEFAULT_IDENTITY_FILENAME, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as DEFAULT_AGENTS_FILENAME, t as listAgentEntries, v as DEFAULT_MEMORY_FILENAME, x as DEFAULT_TOOLS_FILENAME, y as DEFAULT_SYMICORE_FILENAME } from "./agent-scope-CgUHAtCo.js";
10
+ import { Bt as normalizeSecretInput, _ as resolveSubagentConfiguredModelSelection, d as resolveAllowedModelRef, m as resolveDefaultModelForAgent, y as resolveThinkingDefault } from "./model-selection-CyFvYcRt.js";
11
11
  import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-aT-I_DTX.js";
12
- import { H as VERSION, N as applyMergePatch, P as applyLegacyMigrations, S as sensitive, U as resolveRuntimeServiceVersion, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as SymiSchema, i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins } from "./config-tNauHpdq.js";
12
+ import { H as VERSION, N as applyMergePatch, P as applyLegacyMigrations, S as sensitive, U as resolveRuntimeServiceVersion, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as SymiSchema, i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins } from "./config-Dz95lSBW.js";
13
13
  import { c as pickPrimaryLanIPv4 } from "./ws-C7EXRv8z.js";
14
- import { i as loadWorkspaceSkillEntries } from "./skills-DqQUtOph.js";
14
+ import { i as loadWorkspaceSkillEntries } from "./skills-6jdJQ5ZL.js";
15
15
  import { t as movePathToTrash } from "./trash-DcMh1i4B.js";
16
- import { B as resolveAgentMainSessionKey, C as capArrayByJsonBytes, D as resolveSessionTranscriptCandidates, G as snapshotSessionOrigin, H as resolveMainSessionKey, O as stripEnvelopeFromMessages, S as archiveSessionTranscripts, T as readSessionPreviewItemsFromTranscript, U as resolveMainSessionKeyFromConfig, V as resolveExplicitAgentSessionKey, d as updateSessionStore, o as loadSessionStore, t as extractDeliveryInfo, w as readSessionMessages, x as archiveFileOnDisk, y as normalizeSessionDeliveryFields } from "./sessions-jTAGYjWl.js";
17
- import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-BAyxWQSz.js";
16
+ import { B as resolveAgentMainSessionKey, C as capArrayByJsonBytes, D as resolveSessionTranscriptCandidates, G as snapshotSessionOrigin, H as resolveMainSessionKey, O as stripEnvelopeFromMessages, S as archiveSessionTranscripts, T as readSessionPreviewItemsFromTranscript, U as resolveMainSessionKeyFromConfig, V as resolveExplicitAgentSessionKey, d as updateSessionStore, o as loadSessionStore, t as extractDeliveryInfo, w as readSessionMessages, x as archiveFileOnDisk, y as normalizeSessionDeliveryFields } from "./sessions-Cpgnq0pA.js";
17
+ import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-DKDeQZF0.js";
18
18
  import { n as resolveSessionFilePath, r as resolveSessionFilePathOptions, s as resolveSessionTranscriptsDirForAgent } from "./paths-CyhzMxFA.js";
19
19
  import { i as normalizeInputProvenance } from "./input-provenance-BzbXHcaD.js";
20
- import { n as createBrowserRouteDispatcher } from "./with-timeout-Cm5EhxG_.js";
21
- import { C as getGlobalHookRunner, o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads } from "./deliver-BYdNAEqj.js";
22
- import { a as resolveAgentIdentity, t as createReplyPrefixOptions } from "./reply-prefix-BLOOs1aW.js";
23
- import { $ as validateNodePairRejectParams, A as validateCronStatusParams, B as validateExecApprovalsGetParams, Bt as rejectDevicePairing, C as validateConfigSetParams, Ct as validateWakeParams, D as validateCronRemoveParams, Dt as validateWizardNextParams, E as validateCronListParams, Et as validateWizardCancelParams, F as validateDevicePairRemoveParams, G as validateModelsListParams, Gt as summarizeDeviceTokens, H as validateExecApprovalsNodeSetParams, I as validateDeviceTokenRevokeParams, It as approveDevicePairing, J as validateNodeInvokeParams, K as validateNodeDescribeParams, L as validateDeviceTokenRotateParams, M as validateDevicePairApproveParams, Mt as errorShape, N as validateDevicePairListParams, O as validateCronRunParams, Ot as validateWizardStartParams, P as validateDevicePairRejectParams, Pt as parseSessionLabel, Q as validateNodePairListParams, S as validateConfigSchemaParams, St as validateUpdateRunParams, T as validateCronAddParams, Tt as validateWebLoginWaitParams, U as validateExecApprovalsSetParams, Ut as revokeDeviceToken, V as validateExecApprovalsNodeGetParams, Vt as removePairedDevice, W as validateLogsTailParams, Wt as rotateDeviceToken, X as validateNodeListParams, Y as validateNodeInvokeResultParams, Z as validateNodePairApproveParams, _ as validateChatInjectParams, _t as validateSkillsInstallParams, a as validateAgentWaitParams, b as validateConfigGetParams, bt as validateTalkConfigParams, c as validateAgentsFilesGetParams, ct as validateSessionsDeleteParams, d as validateAgentsListParams, dt as validateSessionsPreviewParams, et as validateNodePairRequestParams, f as validateAgentsUpdateParams, ft as validateSessionsResetParams, g as validateChatHistoryParams, gt as validateSkillsBinsParams, h as validateChatAbortParams, ht as validateSessionsUsageParams, i as validateAgentParams, it as validatePushTestParams, j as validateCronUpdateParams, jt as ErrorCodes, k as validateCronRunsParams, kt as validateWizardStatusParams, l as validateAgentsFilesListParams, lt as validateSessionsListParams, m as validateChannelsStatusParams, mt as validateSessionsRestoreParams, n as formatValidationErrors, nt as validateNodeRenameParams, o as validateAgentsCreateParams, ot as validateSendParams, p as validateChannelsLogoutParams, pt as validateSessionsResolveParams, q as validateNodeEventParams, r as validateAgentIdentityParams, rt as validatePollParams, s as validateAgentsDeleteParams, st as validateSessionsCompactParams, tt as validateNodePairVerifyParams, u as validateAgentsFilesSetParams, ut as validateSessionsPatchParams, v as validateChatSendParams, vt as validateSkillsStatusParams, wt as validateWebLoginStartParams, x as validateConfigPatchParams, xt as validateTalkModeParams, y as validateConfigApplyParams, yt as validateSkillsUpdateParams, zt as listDevicePairing } from "./client-Bj_vTpri.js";
24
- import { l as authorizeOperatorScopesForMethod, s as ADMIN_SCOPE$2, u as isNodeRoleMethod } from "./call-tmHtVCkn.js";
25
- import { c as writeJsonAtomic, o as createAsyncLock, s as readJsonFile } from "./pairing-token-AV-MMfVE.js";
20
+ import { n as createBrowserRouteDispatcher } from "./with-timeout-CtVdu_1U.js";
21
+ import { C as getGlobalHookRunner, o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads } from "./deliver-B4KZ6-oZ.js";
22
+ import { a as resolveAgentIdentity, t as createReplyPrefixOptions } from "./reply-prefix-CE2YmmsD.js";
23
+ import { $ as validateNodePairRejectParams, A as validateCronStatusParams, At as validateWizardNextParams, B as validateExecApprovalsGetParams, C as validateConfigSetParams, Ct as validateTalkConfigParams, D as validateCronRemoveParams, Dt as validateWebLoginStartParams, E as validateCronListParams, Et as validateWakeParams, F as validateDevicePairRemoveParams, Ft as errorShape, G as validateModelsListParams, H as validateExecApprovalsNodeSetParams, Ht as listDevicePairing, I as validateDeviceTokenRevokeParams, J as validateNodeInvokeParams, Jt as summarizeDeviceTokens, K as validateNodeDescribeParams, Kt as revokeDeviceToken, L as validateDeviceTokenRotateParams, Lt as parseSessionLabel, M as validateDevicePairApproveParams, Mt as validateWizardStatusParams, N as validateDevicePairListParams, O as validateCronRunParams, Ot as validateWebLoginWaitParams, P as validateDevicePairRejectParams, Pt as ErrorCodes, Q as validateNodePairListParams, S as validateConfigSchemaParams, St as validateSkillsUpdateParams, T as validateCronAddParams, Tt as validateUpdateRunParams, U as validateExecApprovalsSetParams, Ut as rejectDevicePairing, V as validateExecApprovalsNodeGetParams, W as validateLogsTailParams, Wt as removePairedDevice, X as validateNodeListParams, Y as validateNodeInvokeResultParams, Z as validateNodePairApproveParams, _ as validateChatInjectParams, _t as validateSessionsRestoreParams, a as validateAgentWaitParams, b as validateConfigGetParams, bt as validateSkillsInstallParams, c as validateAgentsFilesGetParams, ct as validateSessionsCompactParams, d as validateAgentsListParams, dt as validateSessionsFavoriteFileParams, et as validateNodePairRequestParams, f as validateAgentsUpdateParams, ft as validateSessionsListParams, g as validateChatHistoryParams, gt as validateSessionsResolveParams, h as validateChatAbortParams, ht as validateSessionsResetParams, i as validateAgentParams, it as validatePushTestParams, j as validateCronUpdateParams, jt as validateWizardStartParams, k as validateCronRunsParams, kt as validateWizardCancelParams, l as validateAgentsFilesListParams, lt as validateSessionsDeleteFileParams, m as validateChannelsStatusParams, mt as validateSessionsPreviewParams, n as formatValidationErrors, nt as validateNodeRenameParams, o as validateAgentsCreateParams, ot as validateSendParams, p as validateChannelsLogoutParams, pt as validateSessionsPatchParams, q as validateNodeEventParams, qt as rotateDeviceToken, r as validateAgentIdentityParams, rt as validatePollParams, s as validateAgentsDeleteParams, st as validateSessionsAdoptFileParams, tt as validateNodePairVerifyParams, u as validateAgentsFilesSetParams, ut as validateSessionsDeleteParams, v as validateChatSendParams, vt as validateSessionsUsageParams, wt as validateTalkModeParams, x as validateConfigPatchParams, xt as validateSkillsStatusParams, y as validateConfigApplyParams, yt as validateSkillsBinsParams, zt as approveDevicePairing } from "./client-B8xmq-Pw.js";
24
+ import { l as authorizeOperatorScopesForMethod, s as ADMIN_SCOPE$2, u as isNodeRoleMethod } from "./call-CX0cs106.js";
25
+ import { c as writeJsonAtomic, o as createAsyncLock, s as readJsonFile } from "./pairing-token-CX3NN_qj.js";
26
26
  import { n as normalizePollInput } from "./polls-DhH5YkzN.js";
27
27
  import { t as getChannelActivity } from "./channel-activity-BOiuJS3t.js";
28
- import { _ as requestNodePairing, g as renamePairedNode, h as rejectNodePairing, m as listNodePairing, o as getRemoteSkillEligibility, p as approveNodePairing, y as verifyNodeToken } from "./skill-commands-ZXbEITKi.js";
29
- import { t as listAgentWorkspaceDirs } from "./workspace-dirs-DKu48umx.js";
28
+ import { _ as requestNodePairing, g as renamePairedNode, h as rejectNodePairing, m as listNodePairing, o as getRemoteSkillEligibility, p as approveNodePairing, y as verifyNodeToken } from "./skill-commands-Cxw-jNxU.js";
29
+ import { t as listAgentWorkspaceDirs } from "./workspace-dirs-GpkFi6Kw.js";
30
30
  import { i as loadSessionUsageTimeSeries, n as loadCostUsageSummary, r as loadSessionCostSummary, t as discoverAllSessions } from "./session-cost-usage-BXAI7CNH.js";
31
- import { w as resolveAssistantAvatarUrl } from "./onboard-helpers-CdPNw25E.js";
31
+ import { w as resolveAssistantAvatarUrl } from "./onboard-helpers-CueJ7O_B.js";
32
32
  import { a as mergeExecApprovalsSocketDefaults, c as readExecApprovalsSnapshot, p as saveExecApprovals, r as ensureExecApprovals, s as normalizeExecApprovals } from "./exec-approvals-DXM2pQYL.js";
33
- import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-BBnhN7aZ.js";
33
+ import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-BYKXzY4f.js";
34
34
  import { i as parseAbsoluteTimeMs } from "./stagger-CvFURHzt.js";
35
35
  import { r as getLastHeartbeatEvent } from "./heartbeat-visibility-ChEo5Zvk.js";
36
36
  import { t as buildChannelUiCatalog } from "./catalog-NQ4pj9RI.js";
37
- import { t as buildWorkspaceSkillStatus } from "./skills-status-Cjsh8we0.js";
37
+ import { t as buildWorkspaceSkillStatus } from "./skills-status-C3ptXwnh.js";
38
38
  import { t as WizardCancelledError } from "./prompts-CfOu9uZi.js";
39
39
  import { t as resolveChannelDefaultAccountId } from "./helpers-DnjQ73f_.js";
40
40
  import { t as buildChannelAccountSnapshot } from "./status-klsFDD3M.js";
41
- import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-Djfdh06o.js";
42
- import { n as getStatusSummary } from "./status-nzJEZmNT.js";
43
- import { s as setHeartbeatsEnabled } from "./health-o847FIt1.js";
44
- import { m as normalizeUpdateChannel } from "./update-check-DCo5RtKp.js";
45
- import { a as sendApnsAlert, c as parseMessageWithAttachments, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration } from "./push-apns-DqFdzIkc.js";
46
- import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-Dib8Uo2P.js";
41
+ import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-BgdM9XZl.js";
42
+ import { n as getStatusSummary } from "./status-DOTlXdcN.js";
43
+ import { s as setHeartbeatsEnabled } from "./health-B1nih5LD.js";
44
+ import { m as normalizeUpdateChannel } from "./update-check-7EzEjSzb.js";
45
+ import { a as sendApnsAlert, c as parseMessageWithAttachments, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration } from "./push-apns-CoG1P_P0.js";
46
+ import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-B9BZoM2m.js";
47
47
  import { t as resolveSystemRunCommand } from "./system-run-command-B_qw8CXP.js";
48
- import { t as installSkill } from "./skills-install-HGYidhrv.js";
49
- import { t as runGatewayUpdate } from "./update-runner-AsKAxe31.js";
50
- import * as fs$1 from "node:fs";
48
+ import { t as installSkill } from "./skills-install-CWVdJkLn.js";
49
+ import { t as runGatewayUpdate } from "./update-runner-FhW6n-Nv.js";
50
+ import * as fs$2 from "node:fs";
51
51
  import fs from "node:fs";
52
52
  import * as os$1 from "node:os";
53
53
  import os from "node:os";
54
54
  import path from "node:path";
55
- import fsPromises from "node:fs/promises";
55
+ import fs$1 from "node:fs/promises";
56
56
  import { spawnSync } from "node:child_process";
57
57
  import crypto, { randomUUID } from "node:crypto";
58
58
  import { z } from "zod";
@@ -414,20 +414,20 @@ function resolveCronRunLogPath(params) {
414
414
  }
415
415
  const writesByPath = /* @__PURE__ */ new Map();
416
416
  async function pruneIfNeeded(filePath, opts) {
417
- const stat = await fsPromises.stat(filePath).catch(() => null);
417
+ const stat = await fs$1.stat(filePath).catch(() => null);
418
418
  if (!stat || stat.size <= opts.maxBytes) return;
419
- const lines = (await fsPromises.readFile(filePath, "utf-8").catch(() => "")).split("\n").map((l) => l.trim()).filter(Boolean);
419
+ const lines = (await fs$1.readFile(filePath, "utf-8").catch(() => "")).split("\n").map((l) => l.trim()).filter(Boolean);
420
420
  const kept = lines.slice(Math.max(0, lines.length - opts.keepLines));
421
421
  const { randomBytes } = await import("node:crypto");
422
422
  const tmp = `${filePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
423
- await fsPromises.writeFile(tmp, `${kept.join("\n")}\n`, "utf-8");
424
- await fsPromises.rename(tmp, filePath);
423
+ await fs$1.writeFile(tmp, `${kept.join("\n")}\n`, "utf-8");
424
+ await fs$1.rename(tmp, filePath);
425
425
  }
426
426
  async function appendCronRunLog(filePath, entry, opts) {
427
427
  const resolved = path.resolve(filePath);
428
428
  const next = (writesByPath.get(resolved) ?? Promise.resolve()).catch(() => void 0).then(async () => {
429
- await fsPromises.mkdir(path.dirname(resolved), { recursive: true });
430
- await fsPromises.appendFile(resolved, `${JSON.stringify(entry)}\n`, "utf-8");
429
+ await fs$1.mkdir(path.dirname(resolved), { recursive: true });
430
+ await fs$1.appendFile(resolved, `${JSON.stringify(entry)}\n`, "utf-8");
431
431
  await pruneIfNeeded(resolved, {
432
432
  maxBytes: opts?.maxBytes ?? 2e6,
433
433
  keepLines: opts?.keepLines ?? 2e3
@@ -439,7 +439,7 @@ async function appendCronRunLog(filePath, entry, opts) {
439
439
  async function readCronRunLogEntries(filePath, opts) {
440
440
  const limit = Math.max(1, Math.min(5e3, Math.floor(opts?.limit ?? 200)));
441
441
  const jobId = opts?.jobId?.trim() || void 0;
442
- const raw = await fsPromises.readFile(path.resolve(filePath), "utf-8").catch(() => "");
442
+ const raw = await fs$1.readFile(path.resolve(filePath), "utf-8").catch(() => "");
443
443
  if (!raw.trim()) return [];
444
444
  const parsed = [];
445
445
  const lines = raw.split("\n");
@@ -1178,6 +1178,144 @@ function timestampOptsFromConfig(cfg) {
1178
1178
  return { timezone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone) };
1179
1179
  }
1180
1180
 
1181
+ //#endregion
1182
+ //#region src/config/sessions/favorites.ts
1183
+ /**
1184
+ * Session favourites sidecar.
1185
+ *
1186
+ * Stores a set of "favourited" session files at
1187
+ * `<sessionsDir>/favorites.json`. Keyed by **filename** (basename), not
1188
+ * sessionId, because archived files (`.reset.<ts>` / `.deleted.<ts>`) can
1189
+ * share a UUID with an active `<uuid>.jsonl`. Filename is the unique
1190
+ * reference that survives restore/adopt/rename operations — we explicitly
1191
+ * rename the entry in the sidecar when the underlying file is renamed.
1192
+ *
1193
+ * Writes go through a tmp-file + rename cycle to preserve the old contents
1194
+ * if a write fails mid-flight. Reads are synchronous and cheap (the file
1195
+ * is small); no in-memory cache is maintained because the list endpoint
1196
+ * re-reads on every HTTP request anyway.
1197
+ *
1198
+ * @module
1199
+ */
1200
+ const FAVORITES_FILE_NAME = "favorites.json";
1201
+ const EMPTY_FILE = {
1202
+ version: 1,
1203
+ files: []
1204
+ };
1205
+ function resolveFavoritesPath(agentId) {
1206
+ return path.join(resolveSessionTranscriptsDirForAgent(agentId), FAVORITES_FILE_NAME);
1207
+ }
1208
+ function readFavoritesFile(favPath) {
1209
+ if (!fs.existsSync(favPath)) return { ...EMPTY_FILE };
1210
+ try {
1211
+ const raw = fs.readFileSync(favPath, "utf-8");
1212
+ const parsed = JSON.parse(raw);
1213
+ return {
1214
+ version: 1,
1215
+ files: Array.isArray(parsed?.files) ? parsed.files.filter((f) => typeof f === "string" && f.length > 0) : []
1216
+ };
1217
+ } catch {
1218
+ return { ...EMPTY_FILE };
1219
+ }
1220
+ }
1221
+ function writeFavoritesFileAtomic(favPath, file) {
1222
+ fs.mkdirSync(path.dirname(favPath), { recursive: true });
1223
+ const tmp = `${favPath}.${process.pid}.${randomUUID()}.tmp`;
1224
+ try {
1225
+ fs.writeFileSync(tmp, JSON.stringify(file, null, 2), {
1226
+ mode: 384,
1227
+ encoding: "utf-8"
1228
+ });
1229
+ fs.renameSync(tmp, favPath);
1230
+ } catch (err) {
1231
+ try {
1232
+ fs.rmSync(tmp, { force: true });
1233
+ } catch {}
1234
+ throw err;
1235
+ }
1236
+ }
1237
+ /**
1238
+ * Load the set of favourited filenames for an agent. Returns an empty set if
1239
+ * the sidecar file is missing or corrupt. Never throws.
1240
+ */
1241
+ function loadFavoritesSet(agentId) {
1242
+ try {
1243
+ const file = readFavoritesFile(resolveFavoritesPath(agentId));
1244
+ return new Set(file.files);
1245
+ } catch {
1246
+ return /* @__PURE__ */ new Set();
1247
+ }
1248
+ }
1249
+ /**
1250
+ * Set the favourited flag for a file. If `favorited` is true and the file is
1251
+ * already present, or false and already absent, this is a no-op. Returns the
1252
+ * new favourited state (so callers can echo it back in an RPC response).
1253
+ */
1254
+ function setFavorite(file, favorited, agentId) {
1255
+ const favPath = resolveFavoritesPath(agentId);
1256
+ const current = readFavoritesFile(favPath);
1257
+ const set = new Set(current.files);
1258
+ const had = set.has(file);
1259
+ if (favorited && !had) set.add(file);
1260
+ else if (!favorited && had) set.delete(file);
1261
+ else return favorited;
1262
+ writeFavoritesFileAtomic(favPath, {
1263
+ version: 1,
1264
+ files: [...set].toSorted()
1265
+ });
1266
+ return favorited;
1267
+ }
1268
+ /**
1269
+ * Rename a favourites entry. Called by adoptFile/restore when a file on disk
1270
+ * is renamed (e.g. `<uuid>.jsonl.reset.<ts>` → `<uuid>.jsonl`). If `oldFile`
1271
+ * wasn't favourited, this is a no-op. If both `oldFile` and `newFile` are
1272
+ * favourited (unlikely but possible), the `oldFile` entry is simply dropped.
1273
+ */
1274
+ function renameFavoriteEntry(oldFile, newFile, agentId) {
1275
+ const favPath = resolveFavoritesPath(agentId);
1276
+ const current = readFavoritesFile(favPath);
1277
+ const set = new Set(current.files);
1278
+ if (!set.has(oldFile)) return;
1279
+ set.delete(oldFile);
1280
+ set.add(newFile);
1281
+ writeFavoritesFileAtomic(favPath, {
1282
+ version: 1,
1283
+ files: [...set].toSorted()
1284
+ });
1285
+ }
1286
+ /**
1287
+ * Drop an entry from the sidecar regardless of current state. Used when a
1288
+ * file is permanently deleted so we don't keep a stale favourite pointing at
1289
+ * something that no longer exists. No-op if absent.
1290
+ */
1291
+ function dropFavoriteEntry(file, agentId) {
1292
+ const favPath = resolveFavoritesPath(agentId);
1293
+ const current = readFavoritesFile(favPath);
1294
+ if (!current.files.includes(file)) return;
1295
+ writeFavoritesFileAtomic(favPath, {
1296
+ version: 1,
1297
+ files: current.files.filter((f) => f !== file).toSorted()
1298
+ });
1299
+ }
1300
+ /**
1301
+ * Reconcile the sidecar against an authoritative set of filenames that still
1302
+ * exist on disk. Drops any favourites whose files are missing. Safe to call
1303
+ * on every list operation — the write only happens when something changes.
1304
+ * Returns the reconciled set.
1305
+ */
1306
+ function reconcileFavorites(existingFiles, agentId) {
1307
+ const existingSet = new Set(existingFiles);
1308
+ const favPath = resolveFavoritesPath(agentId);
1309
+ const current = readFavoritesFile(favPath);
1310
+ const keep = current.files.filter((f) => existingSet.has(f));
1311
+ if (keep.length === current.files.length) return new Set(current.files);
1312
+ writeFavoritesFileAtomic(favPath, {
1313
+ version: 1,
1314
+ files: keep.toSorted()
1315
+ });
1316
+ return new Set(keep);
1317
+ }
1318
+
1181
1319
  //#endregion
1182
1320
  //#region src/gateway/sessions-patch.ts
1183
1321
  function invalid(message) {
@@ -1612,12 +1750,216 @@ async function emitSessionUnboundLifecycleEvent(params) {
1612
1750
  }, { childSessionKey: params.targetSessionKey });
1613
1751
  }
1614
1752
  /**
1615
- * Per-session in-flight lock for sessions.restore. Prevents two concurrent
1616
- * restore calls for the same session from corrupting each other (e.g. one
1617
- * archives the active transcript while the other is mid-rename).
1753
+ * Per-session in-flight lock shared by `sessions.restore` and
1754
+ * `sessions.adoptFile`. Prevents two concurrent adoption calls for the same
1755
+ * session key from corrupting each other (e.g. one archives the active
1756
+ * transcript while the other is mid-rename). Keyed by canonical session key.
1618
1757
  */
1619
1758
  const restoreInFlight = /* @__PURE__ */ new Set();
1620
1759
  /**
1760
+ * Classify a target file basename into the adoption mode we need to take.
1761
+ * - `archived`: a `.reset.<ts>` / `.deleted.<ts>` transcript that must be
1762
+ * renamed back to `<sessionId>.jsonl`.
1763
+ * - `active`: a plain `<sessionId>.jsonl` that may already be owned by
1764
+ * another session key in the registry; we adopt it by dropping the other
1765
+ * key's entry (if any) and pointing ours at it. No filesystem rename.
1766
+ */
1767
+ function classifyTargetFile(basename) {
1768
+ if (/\.jsonl\.reset\./.test(basename)) return {
1769
+ kind: "archived",
1770
+ reason: "reset"
1771
+ };
1772
+ if (/\.jsonl\.deleted\./.test(basename)) return {
1773
+ kind: "archived",
1774
+ reason: "deleted"
1775
+ };
1776
+ if (/^[A-Za-z0-9][\w.-]*\.jsonl$/.test(basename)) return { kind: "active" };
1777
+ return null;
1778
+ }
1779
+ async function performAdoptFile(params) {
1780
+ const { key } = params;
1781
+ const targetBasename = path.basename(params.targetFile);
1782
+ if (targetBasename !== params.targetFile || targetBasename.includes("..") || targetBasename.length === 0) return {
1783
+ ok: false,
1784
+ errorCode: "INVALID_REQUEST",
1785
+ errorMessage: "Invalid target file name."
1786
+ };
1787
+ const classification = classifyTargetFile(targetBasename);
1788
+ if (!classification) return {
1789
+ ok: false,
1790
+ errorCode: "INVALID_REQUEST",
1791
+ errorMessage: "Target file is not a recognised session transcript."
1792
+ };
1793
+ const { cfg, target, storePath } = resolveGatewaySessionTargetFromKey(key);
1794
+ const sessionsDir = path.dirname(storePath);
1795
+ const targetPath = path.join(sessionsDir, targetBasename);
1796
+ if (!fs.existsSync(targetPath)) return {
1797
+ ok: false,
1798
+ errorCode: "INVALID_REQUEST",
1799
+ errorMessage: `Target file not found: ${targetBasename}`
1800
+ };
1801
+ let restoredSessionId;
1802
+ try {
1803
+ const firstLine = fs.readFileSync(targetPath, "utf8").split("\n")[0] ?? "";
1804
+ const header = JSON.parse(firstLine);
1805
+ if (!header.id || header.type !== "session") throw new Error("invalid session header");
1806
+ restoredSessionId = header.id;
1807
+ } catch {
1808
+ return {
1809
+ ok: false,
1810
+ errorCode: "INVALID_REQUEST",
1811
+ errorMessage: "Target file is not a valid session transcript."
1812
+ };
1813
+ }
1814
+ const lockKey = target.canonicalKey ?? key;
1815
+ if (restoreInFlight.has(lockKey)) return {
1816
+ ok: false,
1817
+ errorCode: "UNAVAILABLE",
1818
+ errorMessage: `Adopt already in progress for session ${lockKey}; try again in a moment.`
1819
+ };
1820
+ restoreInFlight.add(lockKey);
1821
+ const rollback = [];
1822
+ try {
1823
+ const { entry: currentEntry } = loadSessionEntry(key);
1824
+ const cleanupError = await ensureSessionRuntimeCleanup({
1825
+ cfg,
1826
+ key,
1827
+ target,
1828
+ sessionId: currentEntry?.sessionId
1829
+ });
1830
+ if (cleanupError) return {
1831
+ ok: false,
1832
+ errorCode: "UNAVAILABLE",
1833
+ errorMessage: cleanupError.message ?? "runtime cleanup failed"
1834
+ };
1835
+ if (currentEntry?.sessionId === restoredSessionId && classification.kind === "active") return {
1836
+ ok: true,
1837
+ sessionId: restoredSessionId,
1838
+ canonicalKey: target.canonicalKey,
1839
+ entry: currentEntry,
1840
+ restoredFileName: targetBasename,
1841
+ droppedSourceKeys: []
1842
+ };
1843
+ const archivedPaths = archiveSessionTranscriptsForSession({
1844
+ sessionId: currentEntry?.sessionId,
1845
+ storePath,
1846
+ sessionFile: currentEntry?.sessionFile,
1847
+ agentId: target.agentId,
1848
+ reason: "reset"
1849
+ });
1850
+ for (const archived of archivedPaths) {
1851
+ const archivedBasename = path.basename(archived);
1852
+ const originalBasename = archivedBasename.replace(/\.reset\.[^/]+$/, "");
1853
+ rollback.push({
1854
+ desc: `un-archive ${archivedBasename}`,
1855
+ fn: () => {
1856
+ renameArchivedBackToOriginal(archived, "reset");
1857
+ if (originalBasename && originalBasename !== archivedBasename) renameFavoriteEntry(archivedBasename, originalBasename, target.agentId);
1858
+ }
1859
+ });
1860
+ if (originalBasename && originalBasename !== archivedBasename) renameFavoriteEntry(originalBasename, archivedBasename, target.agentId);
1861
+ }
1862
+ const restoredFileName = `${restoredSessionId}.jsonl`;
1863
+ const restoredPath = path.join(sessionsDir, restoredFileName);
1864
+ if (classification.kind === "archived" && targetPath !== restoredPath) {
1865
+ fs.renameSync(targetPath, restoredPath);
1866
+ rollback.push({
1867
+ desc: `re-archive ${restoredPath} to ${targetPath}`,
1868
+ fn: () => {
1869
+ try {
1870
+ fs.renameSync(restoredPath, targetPath);
1871
+ } catch (err) {
1872
+ console.warn(`[sessions.adoptFile] rollback: rename ${restoredPath} → ${targetPath} failed: ${String(err)}`);
1873
+ }
1874
+ renameFavoriteEntry(restoredFileName, targetBasename, target.agentId);
1875
+ }
1876
+ });
1877
+ renameFavoriteEntry(targetBasename, restoredFileName, target.agentId);
1878
+ }
1879
+ const droppedSourceKeys = [];
1880
+ let droppedSourceEntries = [];
1881
+ const next = await updateSessionStore(storePath, (store) => {
1882
+ const { primaryKey } = migrateAndPruneSessionStoreKey({
1883
+ cfg,
1884
+ key,
1885
+ store
1886
+ });
1887
+ if (classification.kind === "active") for (const [otherKey, otherEntry] of Object.entries(store)) {
1888
+ if (otherKey === primaryKey) continue;
1889
+ if (otherEntry?.sessionId === restoredSessionId) {
1890
+ droppedSourceEntries.push({
1891
+ key: otherKey,
1892
+ entry: otherEntry
1893
+ });
1894
+ droppedSourceKeys.push(otherKey);
1895
+ delete store[otherKey];
1896
+ }
1897
+ }
1898
+ const existingEntry = store[primaryKey];
1899
+ const nextEntry = {
1900
+ sessionId: restoredSessionId,
1901
+ sessionFile: restoredPath,
1902
+ updatedAt: Date.now(),
1903
+ systemSent: false,
1904
+ abortedLastRun: false,
1905
+ thinkingLevel: existingEntry?.thinkingLevel,
1906
+ verboseLevel: existingEntry?.verboseLevel,
1907
+ reasoningLevel: existingEntry?.reasoningLevel,
1908
+ responseUsage: existingEntry?.responseUsage,
1909
+ model: existingEntry?.model,
1910
+ contextTokens: existingEntry?.contextTokens,
1911
+ sendPolicy: existingEntry?.sendPolicy,
1912
+ label: existingEntry?.label,
1913
+ origin: snapshotSessionOrigin(existingEntry),
1914
+ lastChannel: existingEntry?.lastChannel,
1915
+ lastTo: existingEntry?.lastTo,
1916
+ skillsSnapshot: existingEntry?.skillsSnapshot,
1917
+ inputTokens: 0,
1918
+ outputTokens: 0,
1919
+ totalTokens: 0,
1920
+ totalTokensFresh: true
1921
+ };
1922
+ store[primaryKey] = nextEntry;
1923
+ return nextEntry;
1924
+ });
1925
+ if (droppedSourceEntries.length > 0) {
1926
+ const restoreEntries = droppedSourceEntries.slice();
1927
+ rollback.push({
1928
+ desc: `restore ${restoreEntries.length} source registry entry/entries`,
1929
+ fn: () => {
1930
+ updateSessionStore(storePath, (store) => {
1931
+ for (const { key: k, entry: e } of restoreEntries) store[k] = e;
1932
+ }).catch((err) => {
1933
+ console.warn(`[sessions.adoptFile] rollback: could not restore source entries: ${String(err)}`);
1934
+ });
1935
+ }
1936
+ });
1937
+ }
1938
+ rollback.length = 0;
1939
+ return {
1940
+ ok: true,
1941
+ sessionId: restoredSessionId,
1942
+ canonicalKey: target.canonicalKey,
1943
+ entry: next,
1944
+ restoredFileName,
1945
+ droppedSourceKeys
1946
+ };
1947
+ } catch (err) {
1948
+ console.warn(`[sessions.adoptFile] failed for ${lockKey}; running ${rollback.length} rollback step(s): ${String(err)}`);
1949
+ for (let i = rollback.length - 1; i >= 0; i--) {
1950
+ const step = rollback[i];
1951
+ if (step) step.fn();
1952
+ }
1953
+ return {
1954
+ ok: false,
1955
+ errorCode: "UNAVAILABLE",
1956
+ errorMessage: `Adopt failed: ${err instanceof Error ? err.message : String(err)}`
1957
+ };
1958
+ } finally {
1959
+ restoreInFlight.delete(lockKey);
1960
+ }
1961
+ }
1962
+ /**
1621
1963
  * Best-effort inverse of `archiveFileOnDisk(file, "reset")` — renames
1622
1964
  * `<file>.reset.<timestamp>` back to `<file>`. Used by the sessions.restore
1623
1965
  * rollback path when a later step fails after the current transcript was
@@ -1864,129 +2206,104 @@ const sessionsHandlers = {
1864
2206
  const p = params;
1865
2207
  const key = requireSessionKey(p.key, respond);
1866
2208
  if (!key) return;
1867
- const targetBasename = path.basename(p.targetFile);
1868
- if (targetBasename !== p.targetFile || targetBasename.includes("..")) {
1869
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Invalid target file name."));
2209
+ const outcome = await performAdoptFile({
2210
+ key,
2211
+ targetFile: p.targetFile
2212
+ });
2213
+ if (!outcome.ok) {
2214
+ respond(false, void 0, errorShape(ErrorCodes[outcome.errorCode], outcome.errorMessage));
1870
2215
  return;
1871
2216
  }
1872
- const { cfg, target, storePath } = resolveGatewaySessionTargetFromKey(key);
1873
- const sessionsDir = path.dirname(storePath);
1874
- const targetPath = path.join(sessionsDir, targetBasename);
1875
- if (!fs.existsSync(targetPath)) {
1876
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Target file not found: ${targetBasename}`));
2217
+ respond(true, {
2218
+ ok: true,
2219
+ key: outcome.canonicalKey,
2220
+ sessionId: outcome.sessionId,
2221
+ entry: outcome.entry
2222
+ }, void 0);
2223
+ },
2224
+ "sessions.adoptFile": async ({ params, respond }) => {
2225
+ if (!assertValidParams(params, validateSessionsAdoptFileParams, "sessions.adoptFile", respond)) return;
2226
+ const p = params;
2227
+ const key = requireSessionKey(p.key, respond);
2228
+ if (!key) return;
2229
+ const outcome = await performAdoptFile({
2230
+ key,
2231
+ targetFile: p.targetFile
2232
+ });
2233
+ if (!outcome.ok) {
2234
+ respond(false, void 0, errorShape(ErrorCodes[outcome.errorCode], outcome.errorMessage));
1877
2235
  return;
1878
2236
  }
1879
- let restoredSessionId;
1880
- try {
1881
- const firstLine = fs.readFileSync(targetPath, "utf8").split("\n")[0];
1882
- const header = JSON.parse(firstLine);
1883
- if (!header.id || header.type !== "session") throw new Error("invalid session header");
1884
- restoredSessionId = header.id;
1885
- } catch {
1886
- respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Target file is not a valid session transcript."));
2237
+ respond(true, {
2238
+ ok: true,
2239
+ key: outcome.canonicalKey,
2240
+ sessionId: outcome.sessionId,
2241
+ entry: outcome.entry,
2242
+ file: outcome.restoredFileName,
2243
+ droppedSourceKeys: outcome.droppedSourceKeys
2244
+ }, void 0);
2245
+ },
2246
+ "sessions.favoriteFile": ({ params, respond }) => {
2247
+ if (!assertValidParams(params, validateSessionsFavoriteFileParams, "sessions.favoriteFile", respond)) return;
2248
+ const p = params;
2249
+ const file = path.basename(p.file);
2250
+ if (file !== p.file || file.includes("..") || file.length === 0) {
2251
+ respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Invalid file name."));
1887
2252
  return;
1888
2253
  }
1889
- const lockKey = target.canonicalKey ?? key;
1890
- if (restoreInFlight.has(lockKey)) {
1891
- respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Restore already in progress for session ${lockKey}; try again in a moment.`));
2254
+ const agentId = resolveDefaultAgentId(loadConfig());
2255
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
2256
+ const abs = path.join(sessionsDir, file);
2257
+ if (!fs.existsSync(abs)) {
2258
+ respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Session file not found: ${file}`));
1892
2259
  return;
1893
2260
  }
1894
- restoreInFlight.add(lockKey);
1895
- const rollback = [];
1896
- let responded = false;
1897
2261
  try {
1898
- const { entry } = loadSessionEntry(key);
1899
- const sessionId = entry?.sessionId;
1900
- const cleanupError = await ensureSessionRuntimeCleanup({
1901
- cfg,
1902
- key,
1903
- target,
1904
- sessionId
1905
- });
1906
- if (cleanupError) {
1907
- respond(false, void 0, cleanupError);
1908
- responded = true;
1909
- return;
1910
- }
1911
- const archivedPaths = archiveSessionTranscriptsForSession({
1912
- sessionId: entry?.sessionId,
1913
- storePath,
1914
- sessionFile: entry?.sessionFile,
1915
- agentId: target.agentId,
1916
- reason: "reset"
1917
- });
1918
- for (const archived of archivedPaths) rollback.push({
1919
- desc: `un-archive ${archived}`,
1920
- fn: () => renameArchivedBackToOriginal(archived, "reset")
1921
- });
1922
- const restoredFileName = `${restoredSessionId}.jsonl`;
1923
- const restoredPath = path.join(sessionsDir, restoredFileName);
1924
- if (targetPath !== restoredPath) {
1925
- fs.renameSync(targetPath, restoredPath);
1926
- rollback.push({
1927
- desc: `re-archive ${restoredPath} to ${targetPath}`,
1928
- fn: () => {
1929
- try {
1930
- fs.renameSync(restoredPath, targetPath);
1931
- } catch (err) {
1932
- console.warn(`[sessions.restore] rollback failed: could not rename ${restoredPath} back to ${targetPath}: ${String(err)}`);
1933
- }
1934
- }
1935
- });
1936
- }
1937
- const next = await updateSessionStore(storePath, (store) => {
1938
- const { primaryKey } = migrateAndPruneSessionStoreKey({
1939
- cfg,
1940
- key,
1941
- store
1942
- });
1943
- const existingEntry = store[primaryKey];
1944
- const nextEntry = {
1945
- sessionId: restoredSessionId,
1946
- sessionFile: restoredPath,
1947
- updatedAt: Date.now(),
1948
- systemSent: false,
1949
- abortedLastRun: false,
1950
- thinkingLevel: existingEntry?.thinkingLevel,
1951
- verboseLevel: existingEntry?.verboseLevel,
1952
- reasoningLevel: existingEntry?.reasoningLevel,
1953
- responseUsage: existingEntry?.responseUsage,
1954
- model: existingEntry?.model,
1955
- contextTokens: existingEntry?.contextTokens,
1956
- sendPolicy: existingEntry?.sendPolicy,
1957
- label: existingEntry?.label,
1958
- origin: snapshotSessionOrigin(existingEntry),
1959
- lastChannel: existingEntry?.lastChannel,
1960
- lastTo: existingEntry?.lastTo,
1961
- skillsSnapshot: existingEntry?.skillsSnapshot,
1962
- inputTokens: 0,
1963
- outputTokens: 0,
1964
- totalTokens: 0,
1965
- totalTokensFresh: true
1966
- };
1967
- store[primaryKey] = nextEntry;
1968
- return nextEntry;
1969
- });
1970
- rollback.length = 0;
1971
2262
  respond(true, {
1972
2263
  ok: true,
1973
- key: target.canonicalKey,
1974
- sessionId: restoredSessionId,
1975
- entry: next
2264
+ file,
2265
+ favorited: setFavorite(file, p.favorited, agentId)
1976
2266
  }, void 0);
1977
- responded = true;
1978
2267
  } catch (err) {
1979
- console.warn(`[sessions.restore] failed for ${lockKey}; running ${rollback.length} rollback step(s): ${String(err)}`);
1980
- for (let i = rollback.length - 1; i >= 0; i--) {
1981
- const step = rollback[i];
1982
- if (step) step.fn();
1983
- }
1984
- if (!responded) {
1985
- respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Restore failed: ${err instanceof Error ? err.message : String(err)}`));
1986
- responded = true;
2268
+ respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Favorite write failed: ${err instanceof Error ? err.message : String(err)}`));
2269
+ }
2270
+ },
2271
+ "sessions.deleteFile": async ({ params, respond }) => {
2272
+ if (!assertValidParams(params, validateSessionsDeleteFileParams, "sessions.deleteFile", respond)) return;
2273
+ const p = params;
2274
+ const file = path.basename(p.file);
2275
+ if (file !== p.file || file.includes("..") || file.length === 0) {
2276
+ respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Invalid file name."));
2277
+ return;
2278
+ }
2279
+ const cfg = loadConfig();
2280
+ const agentId = resolveDefaultAgentId(cfg);
2281
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
2282
+ const abs = path.join(sessionsDir, file);
2283
+ if (!fs.existsSync(abs)) {
2284
+ respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Session file not found: ${file}`));
2285
+ return;
2286
+ }
2287
+ const { store } = loadCombinedSessionStoreForGateway(cfg);
2288
+ if (classifyTargetFile(file)?.kind === "active") {
2289
+ const sessionId = file.match(/^(.+)\.jsonl$/)?.[1];
2290
+ if (sessionId) {
2291
+ const referrer = Object.entries(store).find(([, entry]) => entry?.sessionId === sessionId)?.[0];
2292
+ if (referrer) {
2293
+ respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `File is still bound to session key ${referrer}; use sessions.delete on that key to archive it first.`));
2294
+ return;
2295
+ }
1987
2296
  }
1988
- } finally {
1989
- restoreInFlight.delete(lockKey);
2297
+ }
2298
+ try {
2299
+ fs.unlinkSync(abs);
2300
+ dropFavoriteEntry(file, agentId);
2301
+ respond(true, {
2302
+ ok: true,
2303
+ file
2304
+ }, void 0);
2305
+ } catch (err) {
2306
+ respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Delete failed: ${err instanceof Error ? err.message : String(err)}`));
1990
2307
  }
1991
2308
  },
1992
2309
  "sessions.delete": async ({ params, respond, client, isWebchatConnect }) => {
@@ -2580,7 +2897,7 @@ function resolveAgentWorkspaceFileOrRespondError(params, respond) {
2580
2897
  }
2581
2898
  async function statFile(filePath) {
2582
2899
  try {
2583
- const stat = await fsPromises.stat(filePath);
2900
+ const stat = await fs$1.stat(filePath);
2584
2901
  if (!stat.isFile()) return null;
2585
2902
  return {
2586
2903
  size: stat.size,
@@ -2650,7 +2967,7 @@ function resolveOptionalStringParam(value) {
2650
2967
  async function moveToTrashBestEffort(pathname) {
2651
2968
  if (!pathname) return;
2652
2969
  try {
2653
- await fsPromises.access(pathname);
2970
+ await fs$1.access(pathname);
2654
2971
  } catch {
2655
2972
  return;
2656
2973
  }
@@ -2697,7 +3014,7 @@ const agentsHandlers = {
2697
3014
  dir: workspaceDir,
2698
3015
  ensureBootstrapFiles: !Boolean(nextConfig.agents?.defaults?.skipBootstrap)
2699
3016
  });
2700
- await fsPromises.mkdir(resolveSessionTranscriptsDirForAgent(agentId), { recursive: true });
3017
+ await fs$1.mkdir(resolveSessionTranscriptsDirForAgent(agentId), { recursive: true });
2701
3018
  await writeConfigFile(nextConfig);
2702
3019
  const safeName = sanitizeIdentityLine(rawName);
2703
3020
  const emoji = resolveOptionalStringParam(params.emoji);
@@ -2710,7 +3027,7 @@ const agentsHandlers = {
2710
3027
  ...avatar ? [`- Avatar: ${sanitizeIdentityLine(avatar)}`] : [],
2711
3028
  ""
2712
3029
  ];
2713
- await fsPromises.appendFile(identityPath, lines.join("\n"), "utf-8");
3030
+ await fs$1.appendFile(identityPath, lines.join("\n"), "utf-8");
2714
3031
  respond(true, {
2715
3032
  ok: true,
2716
3033
  agentId,
@@ -2745,9 +3062,9 @@ const agentsHandlers = {
2745
3062
  });
2746
3063
  if (avatar) {
2747
3064
  const workspace = workspaceDir ?? resolveAgentWorkspaceDir(nextConfig, agentId);
2748
- await fsPromises.mkdir(workspace, { recursive: true });
3065
+ await fs$1.mkdir(workspace, { recursive: true });
2749
3066
  const identityPath = path.join(workspace, DEFAULT_IDENTITY_FILENAME);
2750
- await fsPromises.appendFile(identityPath, `\n- Avatar: ${sanitizeIdentityLine(avatar)}\n`, "utf-8");
3067
+ await fs$1.appendFile(identityPath, `\n- Avatar: ${sanitizeIdentityLine(avatar)}\n`, "utf-8");
2751
3068
  }
2752
3069
  respond(true, {
2753
3070
  ok: true,
@@ -2830,7 +3147,7 @@ const agentsHandlers = {
2830
3147
  }, void 0);
2831
3148
  return;
2832
3149
  }
2833
- const content = await fsPromises.readFile(filePath, "utf-8");
3150
+ const content = await fs$1.readFile(filePath, "utf-8");
2834
3151
  respond(true, {
2835
3152
  agentId,
2836
3153
  workspace: workspaceDir,
@@ -2852,10 +3169,10 @@ const agentsHandlers = {
2852
3169
  const resolved = resolveAgentWorkspaceFileOrRespondError(params, respond);
2853
3170
  if (!resolved) return;
2854
3171
  const { agentId, workspaceDir, name } = resolved;
2855
- await fsPromises.mkdir(workspaceDir, { recursive: true });
3172
+ await fs$1.mkdir(workspaceDir, { recursive: true });
2856
3173
  const filePath = path.join(workspaceDir, name);
2857
3174
  const content = String(params.content ?? "");
2858
- await fsPromises.writeFile(filePath, content, "utf-8");
3175
+ await fs$1.writeFile(filePath, content, "utf-8");
2859
3176
  const meta = await statFile(filePath);
2860
3177
  respond(true, {
2861
3178
  ok: true,
@@ -6156,14 +6473,14 @@ function isRollingLogFile(file) {
6156
6473
  return ROLLING_LOG_RE.test(path.basename(file));
6157
6474
  }
6158
6475
  async function resolveLogFile(file) {
6159
- if (await fsPromises.stat(file).catch(() => null)) return file;
6476
+ if (await fs$1.stat(file).catch(() => null)) return file;
6160
6477
  if (!isRollingLogFile(file)) return file;
6161
6478
  const dir = path.dirname(file);
6162
- const entries = await fsPromises.readdir(dir, { withFileTypes: true }).catch(() => null);
6479
+ const entries = await fs$1.readdir(dir, { withFileTypes: true }).catch(() => null);
6163
6480
  if (!entries) return file;
6164
6481
  return (await Promise.all(entries.filter((entry) => entry.isFile() && ROLLING_LOG_RE.test(entry.name)).map(async (entry) => {
6165
6482
  const fullPath = path.join(dir, entry.name);
6166
- const fileStat = await fsPromises.stat(fullPath).catch(() => null);
6483
+ const fileStat = await fs$1.stat(fullPath).catch(() => null);
6167
6484
  return fileStat ? {
6168
6485
  path: fullPath,
6169
6486
  mtimeMs: fileStat.mtimeMs
@@ -6171,7 +6488,7 @@ async function resolveLogFile(file) {
6171
6488
  }))).filter((entry) => Boolean(entry)).toSorted((a, b) => b.mtimeMs - a.mtimeMs)[0]?.path ?? file;
6172
6489
  }
6173
6490
  async function readLogSlice(params) {
6174
- const stat = await fsPromises.stat(params.file).catch(() => null);
6491
+ const stat = await fs$1.stat(params.file).catch(() => null);
6175
6492
  if (!stat) return {
6176
6493
  cursor: 0,
6177
6494
  size: 0,
@@ -6209,7 +6526,7 @@ async function readLogSlice(params) {
6209
6526
  truncated,
6210
6527
  reset
6211
6528
  };
6212
- const handle = await fsPromises.open(params.file, "r");
6529
+ const handle = await fs$1.open(params.file, "r");
6213
6530
  try {
6214
6531
  let prefix = "";
6215
6532
  if (start > 0) {
@@ -7010,7 +7327,7 @@ const nodeHandlers = {
7010
7327
  const p = params;
7011
7328
  const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
7012
7329
  await respondUnavailableOnThrow(respond, async () => {
7013
- const { handleNodeEvent } = await import("./server-node-events-BACmfyjo.js");
7330
+ const { handleNodeEvent } = await import("./server-node-events-DZAN3hWE.js");
7014
7331
  const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
7015
7332
  await handleNodeEvent({
7016
7333
  deps: context.deps,
@@ -7529,7 +7846,7 @@ function broadcastPresenceSnapshot(params) {
7529
7846
  let _prevCpu = null;
7530
7847
  function getCpuPercent() {
7531
7848
  try {
7532
- const parts = fs$1.readFileSync("/proc/stat", "utf8").split("\n")[0].trim().split(/\s+/).slice(1).map(Number);
7849
+ const parts = fs$2.readFileSync("/proc/stat", "utf8").split("\n")[0].trim().split(/\s+/).slice(1).map(Number);
7533
7850
  const [user, nice, sys, idle, iowait] = parts;
7534
7851
  const total = parts.reduce((a, b) => a + b, 0);
7535
7852
  const active = total - idle - (iowait || 0);
@@ -7553,7 +7870,7 @@ function getCpuPercent() {
7553
7870
  }
7554
7871
  function getMemInfo() {
7555
7872
  try {
7556
- const text = fs$1.readFileSync("/proc/meminfo", "utf8");
7873
+ const text = fs$2.readFileSync("/proc/meminfo", "utf8");
7557
7874
  const get = (key) => parseInt(text.match(new RegExp(`${key}:\\s+(\\d+)`))?.[1] ?? "0", 10) * 1024;
7558
7875
  const total = get("MemTotal");
7559
7876
  const used = total - get("MemAvailable");
@@ -7572,7 +7889,7 @@ function getMemInfo() {
7572
7889
  }
7573
7890
  function getDiskInfo() {
7574
7891
  try {
7575
- const stats = fs$1.statfsSync("/");
7892
+ const stats = fs$2.statfsSync("/");
7576
7893
  const total = stats.blocks * stats.bsize;
7577
7894
  const used = total - stats.bfree * stats.bsize;
7578
7895
  return {
@@ -9075,4 +9392,4 @@ async function handleGatewayRequest(opts) {
9075
9392
  }
9076
9393
 
9077
9394
  //#endregion
9078
- export { getHandshakeTimeoutMs as _, DEFAULT_ASSISTANT_IDENTITY as a, resolveCronRunLogPath as b, upsertPresence as c, DEDUPE_MAX as d, DEDUPE_TTL_MS as f, TICK_INTERVAL_MS as g, MAX_PAYLOAD_BYTES as h, safeParseJson as i, formatError as l, MAX_BUFFERED_BYTES as m, handleGatewayRequest as n, resolveAssistantIdentity as o, HEALTH_REFRESH_INTERVAL_MS as p, broadcastPresenceSnapshot as r, listSystemPresence as s, coreGatewayHandlers as t, loadVoiceWakeConfig as u, abortChatRunById as v, startGatewayConfigReloader as x, appendCronRunLog as y };
9395
+ export { startGatewayConfigReloader as C, resolveCronRunLogPath as S, MAX_PAYLOAD_BYTES as _, loadFavoritesSet as a, abortChatRunById as b, resolveAssistantIdentity as c, formatError as d, loadVoiceWakeConfig as f, MAX_BUFFERED_BYTES as g, HEALTH_REFRESH_INTERVAL_MS as h, safeParseJson as i, listSystemPresence as l, DEDUPE_TTL_MS as m, handleGatewayRequest as n, reconcileFavorites as o, DEDUPE_MAX as p, broadcastPresenceSnapshot as r, DEFAULT_ASSISTANT_IDENTITY as s, coreGatewayHandlers as t, upsertPresence as u, TICK_INTERVAL_MS as v, appendCronRunLog as x, getHandshakeTimeoutMs as y };