@symerian/symi 2.6.6 → 2.6.8

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 (163) hide show
  1. package/dist/{agents-DPdRUY_O.js → agents-DUCHzmZ7.js} +4 -4
  2. package/dist/{agents.config-Cr6DcdaD.js → agents.config-CHQebF9q.js} +1 -1
  3. package/dist/{agents.config-DIumfxnN.js → agents.config-CwoBiqZ_.js} +1 -1
  4. package/dist/{auth-choice-C5etRQcH.js → auth-choice-B1zaWakt.js} +1 -1
  5. package/dist/{auth-choice-z3-Baeyd.js → auth-choice-DGzjLihE.js} +1 -1
  6. package/dist/{banner-om7BRUIc.js → banner-Dy01rdll.js} +1 -1
  7. package/dist/build-info.json +3 -3
  8. package/dist/bundled/boot-md/handler.js +1 -1
  9. package/dist/bundled/session-memory/handler.js +1 -1
  10. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  11. package/dist/{channel-options-BqnokE7_.js → channel-options-Ba5tfq9-.js} +1 -1
  12. package/dist/{channel-options-Cb1PgfNV.js → channel-options-Cte5qJHT.js} +1 -1
  13. package/dist/{channel-web-DztB2W6w.js → channel-web-NGDI-tJN.js} +1 -1
  14. package/dist/{channels-cli-xlZ2mjBu.js → channels-cli-BDlDCL3R.js} +4 -4
  15. package/dist/{channels-cli-R2PHQWVd.js → channels-cli-CgNtcB-z.js} +4 -4
  16. package/dist/{cli-DLly6H0w.js → cli-C2ZGBmO9.js} +1 -1
  17. package/dist/{cli-DNGrFH7L.js → cli-Da_Dnvvp.js} +1 -1
  18. package/dist/{command-registry-xEOR2NPq.js → command-registry-CLcFUFJs.js} +9 -9
  19. package/dist/{completion-cli-CRhFwMiA.js → completion-cli-BzXhONEe.js} +2 -2
  20. package/dist/{completion-cli-CFJbuU6i.js → completion-cli-MbaQCbTj.js} +1 -1
  21. package/dist/{config-cli-CbdeNt0M.js → config-cli-BHHGJx1I.js} +1 -1
  22. package/dist/{config-cli-BaH8OVQ-.js → config-cli-CT6Q4rhy.js} +1 -1
  23. package/dist/{configure-BmNOfGox.js → configure-BOLt9A-A.js} +3 -3
  24. package/dist/{configure-D5dSJprr.js → configure-CVcHuLVe.js} +3 -3
  25. package/dist/{doctor-completion-DCc4SxWN.js → doctor-completion-BZ-FYLu9.js} +1 -1
  26. package/dist/{doctor-completion-D0L7wK2h.js → doctor-completion-CislKWHy.js} +1 -1
  27. package/dist/entry.js +1 -1
  28. package/dist/extensionAPI.js +1 -1
  29. package/dist/{gateway-cli-DYXn5A0z.js → gateway-cli-2yQf_hKZ.js} +168 -35
  30. package/dist/{gateway-cli-zN6V2qw8.js → gateway-cli-Bzz6Rduw.js} +167 -34
  31. package/dist/{glass-ui-ws-Cj9wbO1L.js → glass-ui-ws-ibSNo7RU.js} +7 -7
  32. package/dist/{glass-ui-ws-B7V2wHEu.js → glass-ui-ws-uRv3KH-0.js} +7 -7
  33. package/dist/{health-DUKLANXu.js → health-CBwxQHlQ.js} +1 -1
  34. package/dist/{health-BPOuBmYt.js → health-D4ySlvOE.js} +1 -1
  35. package/dist/{hooks-cli-BF0mbqlZ.js → hooks-cli-BFN2xMj8.js} +2 -2
  36. package/dist/{hooks-cli-BpfIySkB.js → hooks-cli-CreZeBlG.js} +2 -2
  37. package/dist/index.js +6 -6
  38. package/dist/llm-slug-generator.js +1 -1
  39. package/dist/{models-Bt8lm_nD.js → models-Dk7Q5cSF.js} +2 -2
  40. package/dist/{models-cli-bHYoiL5x.js → models-cli-C9Y-HfLg.js} +2 -2
  41. package/dist/{models-cli-BmBmBUgl.js → models-cli-DzSb3Scm.js} +3 -3
  42. package/dist/{onboard-ttzux1w7.js → onboard-D_PsLQiw.js} +2 -2
  43. package/dist/{onboard-i7lit3dF.js → onboard-N-KB8jvT.js} +2 -2
  44. package/dist/{onboard-channels-DEFF3Rjo.js → onboard-channels-Bp74i8iG.js} +1 -1
  45. package/dist/{onboard-channels-D0RHtaJE.js → onboard-channels-VuJyK9g-.js} +1 -1
  46. package/dist/{onboarding-CAlILYcN.js → onboarding-CRAQ2s_3.js} +3 -3
  47. package/dist/{onboarding-By0D-QmK.js → onboarding-D1AsOvXd.js} +3 -3
  48. package/dist/{onboarding.finalize-DSNIp08z.js → onboarding.finalize-DLUoLFNl.js} +6 -6
  49. package/dist/{onboarding.finalize-BDmc4k2T.js → onboarding.finalize-ZYLgVmdn.js} +5 -5
  50. package/dist/{pi-embedded-BzE5v-JN.js → pi-embedded-BSoqm4lP.js} +47 -52
  51. package/dist/{plugin-registry-C1ghjhOE.js → plugin-registry-CTu9B9S3.js} +1 -1
  52. package/dist/{plugin-registry-CDIOKK_i.js → plugin-registry-DDIcHkNU.js} +1 -1
  53. package/dist/plugin-sdk/{accounts-BToL3HlP.js → accounts-BtaOa4z_.js} +1 -1
  54. package/dist/plugin-sdk/{accounts-D9zGZU5t.js → accounts-Ddm33hQm.js} +3 -3
  55. package/dist/plugin-sdk/{accounts-Dtszw3Zn.js → accounts-s-AdhXVR.js} +1 -1
  56. package/dist/plugin-sdk/{active-listener-bEk__wbB.js → active-listener-BXYeALs0.js} +1 -1
  57. package/dist/plugin-sdk/{agent-scope-C3gMMKCU.js → agent-scope-CYYpcO9W.js} +2 -2
  58. package/dist/plugin-sdk/agents/pi-tools.validate-wrapper.d.ts +8 -8
  59. package/dist/plugin-sdk/{api-key-rotation-CVBMpnPc.js → api-key-rotation-D_sMvI5W.js} +1 -1
  60. package/dist/plugin-sdk/{audio-preflight-DoQQKlxa.js → audio-preflight-VpItkiy3.js} +24 -24
  61. package/dist/plugin-sdk/{bindings-BbwoUGPx.js → bindings-C7hRtgYW.js} +2 -2
  62. package/dist/plugin-sdk/{channel-activity-Ji7f0gqq.js → channel-activity-DoC1xtDu.js} +1 -1
  63. package/dist/plugin-sdk/{channel-web-CxwLjrWk.js → channel-web-BmV3Tuy0.js} +22 -22
  64. package/dist/plugin-sdk/{chrome-C7c_0I5M.js → chrome-B7RdxmJ0.js} +3 -3
  65. package/dist/plugin-sdk/{chunk-jvk9axTQ.js → chunk-Dw2XBYXv.js} +1 -1
  66. package/dist/plugin-sdk/{command-format-DSdvQ_M5.js → command-format-GKSevep4.js} +1 -1
  67. package/dist/plugin-sdk/{commands-registry-CQFbmUMs.js → commands-registry-COIaslGl.js} +4 -4
  68. package/dist/plugin-sdk/{config-DDkdiUOR.js → config-KlTNfkFF.js} +9 -9
  69. package/dist/plugin-sdk/{deliver-BZ6iNLl7.js → deliver-BZ99UKQq.js} +10 -10
  70. package/dist/plugin-sdk/{diagnostic-mFf4i4G9.js → diagnostic-05pm5Rxi.js} +1 -1
  71. package/dist/plugin-sdk/{image-BOYy0Ump.js → image-CLOPx7yW.js} +4 -4
  72. package/dist/plugin-sdk/{image-ops-Bnp6LXEx.js → image-ops-BlQR__MN.js} +1 -1
  73. package/dist/plugin-sdk/index.js +53 -53
  74. package/dist/plugin-sdk/{ir-Fb3qpcis.js → ir-BJ6BHE5b.js} +4 -4
  75. package/dist/plugin-sdk/{local-roots-Ckk1QfzI.js → local-roots-BHLNSI8U.js} +3 -3
  76. package/dist/plugin-sdk/{login-Bh3DZPam.js → login-DQMXuxOk.js} +7 -7
  77. package/dist/plugin-sdk/{login-qr-DbR7odSr.js → login-qr-BjVZSoCi.js} +9 -9
  78. package/dist/plugin-sdk/{manager-DckktAQ3.js → manager-CBSBFuFz.js} +8 -8
  79. package/dist/plugin-sdk/{manifest-registry-B3ugY9-f.js → manifest-registry-CPnHl_K3.js} +1 -1
  80. package/dist/plugin-sdk/{markdown-tables-Dfaqilz6.js → markdown-tables-BoYFajMu.js} +1 -1
  81. package/dist/plugin-sdk/{message-channel-BdI5Ra9S.js → message-channel-COTAJzHd.js} +1 -1
  82. package/dist/plugin-sdk/{model-selection-OpU8HN50.js → model-selection-CsbEfrS0.js} +4 -4
  83. package/dist/plugin-sdk/{outbound-rF6G8Xpr.js → outbound-B0e8KdaR.js} +7 -7
  84. package/dist/plugin-sdk/{outbound-attachment-DnVQfTG2.js → outbound-attachment-CnslKL38.js} +2 -2
  85. package/dist/plugin-sdk/{pi-auth-json-CJk8t14T.js → pi-auth-json-qWi7ZIYV.js} +5 -5
  86. package/dist/plugin-sdk/{pi-embedded-helpers-BveUP4hk.js → pi-embedded-helpers-CW630epe.js} +17 -17
  87. package/dist/plugin-sdk/{plugins-BbAvhC25.js → plugins-BNByVCIH.js} +4 -4
  88. package/dist/plugin-sdk/{pw-ai-DjGUsee-.js → pw-ai-CnbPIPY9.js} +8 -8
  89. package/dist/plugin-sdk/{qmd-manager-mjKcdwVr.js → qmd-manager-CH0XbIHf.js} +4 -4
  90. package/dist/plugin-sdk/{registry--_pGht6S.js → registry-D0xTnUWt.js} +2 -2
  91. package/dist/plugin-sdk/{replies-fI39rPGa.js → replies-LLcQL3w6.js} +3 -3
  92. package/dist/plugin-sdk/{reply-CyZfsjrl.js → reply-LQcs9anV.js} +123 -128
  93. package/dist/plugin-sdk/{reply-prefix-BHuV5t70.js → reply-prefix-uxfMZW4p.js} +1 -1
  94. package/dist/plugin-sdk/{resolve-outbound-target-BkCUbYGV.js → resolve-outbound-target-BiyAyTWz.js} +2 -2
  95. package/dist/plugin-sdk/{resolve-route-D3JH_D2N.js → resolve-route-B3CCBumQ.js} +3 -3
  96. package/dist/plugin-sdk/{retry-ilSJqnz9.js → retry-CwQ_iIj8.js} +1 -1
  97. package/dist/plugin-sdk/{runner-BVqnEfNe.js → runner-CGBT7tgF.js} +9 -9
  98. package/dist/plugin-sdk/{send-BtANzsAo.js → send-B2CEnVLL.js} +6 -6
  99. package/dist/plugin-sdk/{send-BHbXh8Ly.js → send-C5h_YxNb.js} +7 -7
  100. package/dist/plugin-sdk/{send-D6LMZJ_h.js → send-CRsR8-vO.js} +10 -10
  101. package/dist/plugin-sdk/{send-Bxdu6ZZy.js → send-CjOBB3Vo.js} +10 -10
  102. package/dist/plugin-sdk/{send-BMfJIhCk.js → send-pYqe432l.js} +6 -6
  103. package/dist/plugin-sdk/{session-kI0tzViQ.js → session-BsOrxiMj.js} +4 -4
  104. package/dist/plugin-sdk/{skill-commands-DCNXVERE.js → skill-commands-ff_01_r3.js} +5 -5
  105. package/dist/plugin-sdk/{skills-B1GeRYlu.js → skills-_yTP47Cd.js} +7 -7
  106. package/dist/plugin-sdk/{sqlite-Cq_7Cg4E.js → sqlite-CxAR5ttJ.js} +1 -1
  107. package/dist/plugin-sdk/{store-Do3t33-c.js → store-BdrNabcU.js} +2 -2
  108. package/dist/plugin-sdk/{subsystem-Coz2AgU8.js → subsystem-B2uDN3TV.js} +1 -1
  109. package/dist/plugin-sdk/{tables-DR0NmBeH.js → tables-DNwXwNFa.js} +1 -1
  110. package/dist/plugin-sdk/{target-errors-B7YyMnIi.js → target-errors-Paro1BjP.js} +2 -2
  111. package/dist/plugin-sdk/{thinking-DCNUIAHY.js → thinking-CXqf7WTe.js} +5 -5
  112. package/dist/plugin-sdk/{tokens-CWMflosr.js → tokens-bC3UVmVH.js} +1 -1
  113. package/dist/plugin-sdk/{tool-images-D7Lno-TE.js → tool-images-HJ2sfZDV.js} +2 -2
  114. package/dist/plugin-sdk/{tool-loop-detection-DU5sTIKg.js → tool-loop-detection-at_K42K7.js} +2 -2
  115. package/dist/plugin-sdk/web-DvzecOyx.js +65 -0
  116. package/dist/plugin-sdk/{whatsapp-actions-CcBzDuL-.js → whatsapp-actions-DfseosPO.js} +21 -21
  117. package/dist/{plugins-cli-BFCJyRBX.js → plugins-cli-DJUkvonf.js} +2 -2
  118. package/dist/{plugins-cli-jv-Bqq1t.js → plugins-cli-DdfBwKlP.js} +2 -2
  119. package/dist/{program-sDlUcw2S.js → program-DyPb-tj_.js} +7 -7
  120. package/dist/{program-context-N9-4Ubpp.js → program-context-Bz_GuT_l.js} +17 -17
  121. package/dist/{prompt-select-styled-BtG_t1Tf.js → prompt-select-styled-BKnaBZhj.js} +4 -4
  122. package/dist/{prompt-select-styled-eBoNrCn6.js → prompt-select-styled-CghdSf8F.js} +4 -4
  123. package/dist/{provider-auth-helpers-CqDTEFnD.js → provider-auth-helpers-BdNgfdWd.js} +1 -1
  124. package/dist/{provider-auth-helpers-CfBPNN7J.js → provider-auth-helpers-CXKXgdFl.js} +1 -1
  125. package/dist/{push-apns-CVRC-O3Q.js → push-apns-A--Taj2b.js} +1 -1
  126. package/dist/{push-apns-CHIVwHRD.js → push-apns-Cdjd6L8R.js} +1 -1
  127. package/dist/{register.agent-B0ExzmtM.js → register.agent-BLWVTdIg.js} +6 -6
  128. package/dist/{register.agent-DD2QErXm.js → register.agent-C4tjED3B.js} +5 -5
  129. package/dist/{register.configure-ByNKeAo7.js → register.configure-De6KxZc8.js} +6 -6
  130. package/dist/{register.configure-DpHCcS5d.js → register.configure-DkNQpMco.js} +6 -6
  131. package/dist/{register.maintenance-BMrBjqU4.js → register.maintenance-B7dlUmZQ.js} +7 -7
  132. package/dist/{register.maintenance-_S91q7Rv.js → register.maintenance-el_O34pN.js} +8 -8
  133. package/dist/{register.message-DZ45n1GX.js → register.message-Bg38q7xU.js} +2 -2
  134. package/dist/{register.message-BveFb6IW.js → register.message-CNub6pDr.js} +2 -2
  135. package/dist/{register.onboard-CLGWOBoy.js → register.onboard-DUIvvhd3.js} +4 -4
  136. package/dist/{register.onboard-CUTbssYt.js → register.onboard-OXQpAbIU.js} +4 -4
  137. package/dist/{register.setup-B_cLbC3d.js → register.setup-BAZ3txi6.js} +4 -4
  138. package/dist/{register.setup-CcDqU6WR.js → register.setup-BQLAOnSQ.js} +4 -4
  139. package/dist/{register.status-health-sessions-DgNzHYE-.js → register.status-health-sessions-BU25Fv8p.js} +3 -3
  140. package/dist/{register.status-health-sessions-CMJ_l4rs.js → register.status-health-sessions-bw_2svPd.js} +3 -3
  141. package/dist/{register.subclis-D6LLN38B.js → register.subclis-Bop-tTBx.js} +9 -9
  142. package/dist/{reply-DcyKvFor.js → reply-BR3MMmPE.js} +47 -52
  143. package/dist/{run-main-QW59Pk-I.js → run-main-DFp18fyd.js} +14 -14
  144. package/dist/{server-methods-D1W-tViM.js → server-methods-B7KrCq1B.js} +7 -7
  145. package/dist/{server-methods-BdXCfO_O.js → server-methods-BMrgMa55.js} +7 -7
  146. package/dist/{server-node-events-BwGehjys.js → server-node-events-DcIWSJrb.js} +2 -2
  147. package/dist/{server-node-events-DqVmWjof.js → server-node-events-tKdBKitQ.js} +2 -2
  148. package/dist/{status-CfLq5R5j.js → status-CChK9DsL.js} +2 -2
  149. package/dist/{status-BY4CnB2O.js → status-DAeh7JKa.js} +2 -2
  150. package/dist/{status-kPaSg3RB.js → status-DkAuXji3.js} +1 -1
  151. package/dist/{status-BvnWSBQl.js → status-Ta_hiT2w.js} +1 -1
  152. package/dist/{subagent-registry-CVQOC9Jw.js → subagent-registry-DovA8Baf.js} +47 -52
  153. package/dist/{unified-runner-DpWGASP3.js → unified-runner-OplgmcEq.js} +47 -52
  154. package/dist/{update-cli-DcUr7_Lg.js → update-cli-DPewzEht.js} +8 -8
  155. package/dist/{update-cli-BpSFY22r.js → update-cli-hfO-LduQ.js} +7 -7
  156. package/dist/{update-runner-DdPdhkw5.js → update-runner-DvkWGO1t.js} +1 -1
  157. package/dist/{update-runner-CPOm0f_6.js → update-runner-WFWqzZw8.js} +1 -1
  158. package/dist/{web-DhofKbBh.js → web-BbEzqR_T.js} +1 -1
  159. package/dist/{web-DqjNQqGK.js → web-CEP_xmdJ.js} +2 -2
  160. package/dist/{web-ZnFT5LP9.js → web-DMBrhq3h.js} +1 -1
  161. package/dist/{web-CHV60IdQ.js → web-WfZujXg4.js} +1 -1
  162. package/package.json +1 -1
  163. package/dist/plugin-sdk/web-C2OyRvIo.js +0 -65
@@ -21,7 +21,7 @@ import "./pairing-token-Byh6drgn.js";
21
21
  import { t as safeEqualSecret } from "./secret-equal-CbntzRkh.js";
22
22
  import { a as isValidIPv4, c as resolveClientIp, d as resolveHostName, f as rawDataToString, i as isTrustedProxyAddress, l as resolveGatewayBindHost, n as isLoopbackHost, o as normalizeHostHeader, t as isLoopbackAddress, u as resolveGatewayListenHosts } from "./net-DZ5Ayk-W.js";
23
23
  import { n as pickPrimaryTailnetIPv4, r as pickPrimaryTailnetIPv6 } from "./tailnet-Cmumpn76.js";
24
- import { $ as getCliSessionId, $t as setPreRestartDeferralCheck, An as DEFAULT_INPUT_TIMEOUT_MS, At as normalizeOptionalSessionKey, Bt as buildSafeExternalPrompt, Cn as enqueueSystemEvent, Cr as onAgentEvent, Dn as DEFAULT_INPUT_IMAGE_MAX_BYTES, E as createDefaultDeps, F as buildHistoryContextFromEntries, Ft as buildDeliveryFromLegacyPayload, H as getTotalPendingReplies, Ht as getHookType, In as resolveAgentTimeoutMs, It as hasLegacyDeliveryHints, J as runAgentTurn, Jt as emitGatewayRestart, Kt as consumeGatewaySigusr1RestartAuthorization, Lt as stripLegacyDeliveryFields, Mn as extractImageContentFromSource, Mt as normalizePayloadToSystemText, Nn as normalizeMimeList, Nt as normalizeRequiredName, O as resolveAgentAvatar, On as DEFAULT_INPUT_IMAGE_MIMES, Ot as inferLegacyName, Pn as resolveInputFileLimits, Pt as migrateLegacyCronPayload, Q as resolveModelProfile, Qt as setGatewaySigusr1RestartPolicy, Sr as getAgentRunContext, St as summarizeRestartSentinel, T as createOutboundSendDeps, Tt as normalizeHttpWebhookUrl, Ut as isExternalHookSession, Vt as detectSuspiciousPatterns, X as getActiveEmbeddedRunCount, Xt as markGatewaySigusr1RestartHandled, Yt as isGatewaySigusr1RestartExternallyAllowed, _ as readJsonBodyWithLimit, at as resolveAnnounceTargetFromKey, b as sleepWithAbort, br as clearAgentRunContext, bt as formatRestartSentinelMessage, cr as getActiveTaskCount, ct as resolveOutboundSessionRoute, dn as requestHeartbeatNow, dr as resetAllLanes, dt as resolveOutboundTarget, et as setCliSessionId, f as getPluginToolMeta, fr as setCommandLaneConcurrency, ft as resolveSessionDeliveryTarget, g as handleSlackHttpRequest, gt as runWithModelFallback, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, i as listDescendantRunsForRequester, it as readLatestAssistantReply, jn as extractFileContentFromSource, jt as normalizeOptionalText, kn as DEFAULT_INPUT_MAX_REDIRECTS, kt as normalizeOptionalAgentId, l as applyToolPolicyPipeline, m as loadSymiPlugins, mr as CommandLane, mt as resetDirectoryCache, n as countActiveRunsForSession, pr as waitForActiveTasks, q as resolveCronStyleNow, qt as deferGatewayRestartUntilIdle, r as initSubagentRegistry, rt as createSymiTools, s as runSubagentAnnounceFlow, t as countActiveDescendantRuns, tt as runCliAgent, u as buildDefaultToolPolicyPipelineSteps, ur as getTotalQueueSize, v as requestBodyErrorToText, vt as consumeRestartSentinel, wr as registerAgentRunContext, x as agentCommand, xr as emitAgentEvent, y as computeBackoff, yr as stripHeartbeatToken } from "./subagent-registry-CVQOC9Jw.js";
24
+ import { $ as getCliSessionId, $t as setPreRestartDeferralCheck, An as DEFAULT_INPUT_TIMEOUT_MS, At as normalizeOptionalSessionKey, Bt as buildSafeExternalPrompt, Cn as enqueueSystemEvent, Cr as onAgentEvent, Dn as DEFAULT_INPUT_IMAGE_MAX_BYTES, E as createDefaultDeps, F as buildHistoryContextFromEntries, Ft as buildDeliveryFromLegacyPayload, H as getTotalPendingReplies, Ht as getHookType, In as resolveAgentTimeoutMs, It as hasLegacyDeliveryHints, J as runAgentTurn, Jt as emitGatewayRestart, Kt as consumeGatewaySigusr1RestartAuthorization, Lt as stripLegacyDeliveryFields, Mn as extractImageContentFromSource, Mt as normalizePayloadToSystemText, Nn as normalizeMimeList, Nt as normalizeRequiredName, O as resolveAgentAvatar, On as DEFAULT_INPUT_IMAGE_MIMES, Ot as inferLegacyName, Pn as resolveInputFileLimits, Pt as migrateLegacyCronPayload, Q as resolveModelProfile, Qt as setGatewaySigusr1RestartPolicy, Sr as getAgentRunContext, St as summarizeRestartSentinel, T as createOutboundSendDeps, Tt as normalizeHttpWebhookUrl, Ut as isExternalHookSession, Vt as detectSuspiciousPatterns, X as getActiveEmbeddedRunCount, Xt as markGatewaySigusr1RestartHandled, Yt as isGatewaySigusr1RestartExternallyAllowed, _ as readJsonBodyWithLimit, at as resolveAnnounceTargetFromKey, b as sleepWithAbort, br as clearAgentRunContext, bt as formatRestartSentinelMessage, cr as getActiveTaskCount, ct as resolveOutboundSessionRoute, dn as requestHeartbeatNow, dr as resetAllLanes, dt as resolveOutboundTarget, et as setCliSessionId, f as getPluginToolMeta, fr as setCommandLaneConcurrency, ft as resolveSessionDeliveryTarget, g as handleSlackHttpRequest, gt as runWithModelFallback, hr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, i as listDescendantRunsForRequester, it as readLatestAssistantReply, jn as extractFileContentFromSource, jt as normalizeOptionalText, kn as DEFAULT_INPUT_MAX_REDIRECTS, kt as normalizeOptionalAgentId, l as applyToolPolicyPipeline, m as loadSymiPlugins, mr as CommandLane, mt as resetDirectoryCache, n as countActiveRunsForSession, pr as waitForActiveTasks, q as resolveCronStyleNow, qt as deferGatewayRestartUntilIdle, r as initSubagentRegistry, rt as createSymiTools, s as runSubagentAnnounceFlow, t as countActiveDescendantRuns, tt as runCliAgent, u as buildDefaultToolPolicyPipelineSteps, ur as getTotalQueueSize, v as requestBodyErrorToText, vt as consumeRestartSentinel, wr as registerAgentRunContext, x as agentCommand, xr as emitAgentEvent, y as computeBackoff, yr as stripHeartbeatToken } from "./subagent-registry-DovA8Baf.js";
25
25
  import { D as resolveSessionResetPolicy, F as resolveMainSessionKey, H as cleanStaleLockFiles, I as resolveMainSessionKeyFromConfig, K as mergeDeliveryContext, M as canonicalizeMainSessionAlias, N as resolveAgentMainSessionKey, T as evaluateSessionFreshness, W as deliveryContextFromSession, d as updateSessionStore, n as parseSessionThreadInfo, o as loadSessionStore } from "./sessions-CJXnZVjR.js";
26
26
  import { a as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-Csntmwwn.js";
27
27
  import { n as listChannelPlugins, o as normalizeWhatsAppTarget, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
@@ -54,7 +54,7 @@ import { i as formatPortDiagnostics, n as inspectPortUsage, t as ensurePortAvail
54
54
  import "./trash-CWQQXWX3.js";
55
55
  import "./dock-DKxQXuAg.js";
56
56
  import "./accounts-D51FXYdA.js";
57
- import { c as resolveStorePath, i as resolveSessionTranscriptPath } from "./paths-DNdWAq7b.js";
57
+ import { c as resolveStorePath, i as resolveSessionTranscriptPath, s as resolveSessionTranscriptsDirForAgent } from "./paths-DNdWAq7b.js";
58
58
  import "./tool-images-CVLISeRT.js";
59
59
  import { d as supportsXHighThinking, l as normalizeVerboseLevel, s as normalizeThinkLevel } from "./thinking-8sKPnzpp.js";
60
60
  import "./models-config-CCMpqFyr.js";
@@ -77,7 +77,7 @@ import "./image-CO4meYzg.js";
77
77
  import "./tool-display-CXwOC-qw.js";
78
78
  import { d as registerUnhandledRejectionHandler } from "./runner-BORIO-D3.js";
79
79
  import { n as loadModelCatalog } from "./model-catalog-CqCsARJX.js";
80
- import { o as loadSessionEntry, u as lookupContextTokens } from "./session-utils-Bka9dR4m.js";
80
+ import { a as loadCombinedSessionStoreForGateway, i as listSessionsFromStore, o as loadSessionEntry, u as lookupContextTokens } from "./session-utils-Bka9dR4m.js";
81
81
  import { S as registerSkillsChangeListener, c as recordRemoteNodeInfo, d as removeRemoteNodeInfo, f as setSkillsRemoteRegistry, l as refreshRemoteBinsForConnectedNodes, o as getRemoteSkillEligibility, s as primeRemoteSkillsCache, u as refreshRemoteNodeBins, v as updatePairedNodeMetadata, x as getSkillsSnapshotVersion } from "./skill-commands-C8BcwE33.js";
82
82
  import "./workspace-dirs-CPNL2Acu.js";
83
83
  import { a as readChannelAllowFromStoreSync } from "./pairing-store-vpO8vXVN.js";
@@ -130,20 +130,20 @@ import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } fr
130
130
  import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-BtG9rny3.js";
131
131
  import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-Byo5jCLN.js";
132
132
  import { t as discoverGatewayBeacons } from "./bonjour-discovery-CA_XIzr_.js";
133
- import { i as pickGatewaySelfPresence } from "./status-CfLq5R5j.js";
134
- import { a as styleHealthChannelLine, l as startHeartbeatRunner, n as getHealthSnapshot, s as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-DUKLANXu.js";
133
+ import { i as pickGatewaySelfPresence } from "./status-CChK9DsL.js";
134
+ import { a as styleHealthChannelLine, l as startHeartbeatRunner, n as getHealthSnapshot, s as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-CBwxQHlQ.js";
135
135
  import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-BseSWee1.js";
136
136
  import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-ZdimP1aU.js";
137
- import { t as runOnboardingWizard } from "./onboarding-By0D-QmK.js";
138
- import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-D1W-tViM.js";
139
- import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-CVRC-O3Q.js";
137
+ import { t as runOnboardingWizard } from "./onboarding-D1AsOvXd.js";
138
+ import { _ as getHandshakeTimeoutMs, a as DEFAULT_ASSISTANT_IDENTITY, b as resolveCronRunLogPath, c as upsertPresence, d as DEDUPE_MAX, f as DEDUPE_TTL_MS, g as TICK_INTERVAL_MS, h as MAX_PAYLOAD_BYTES, i as safeParseJson, l as formatError, m as MAX_BUFFERED_BYTES, n as handleGatewayRequest, o as resolveAssistantIdentity, p as HEALTH_REFRESH_INTERVAL_MS, r as broadcastPresenceSnapshot, s as listSystemPresence, t as coreGatewayHandlers, u as loadVoiceWakeConfig, v as abortChatRunById, x as startGatewayConfigReloader, y as appendCronRunLog } from "./server-methods-B7KrCq1B.js";
139
+ import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-A--Taj2b.js";
140
140
  import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-CzWeiE-Y.js";
141
- import "./agents.config-DIumfxnN.js";
141
+ import "./agents.config-CwoBiqZ_.js";
142
142
  import "./dm-policy-shared-DJ-61hCT.js";
143
143
  import "./node-service-fcZExd22.js";
144
144
  import "./status.update-DbmZz0Aq.js";
145
145
  import "./skills-install-1ZdwGTnh.js";
146
- import "./update-runner-DdPdhkw5.js";
146
+ import "./update-runner-DvkWGO1t.js";
147
147
  import { t as resolveAgentSessionDirs } from "./session-dirs-DWgIYmAt.js";
148
148
  import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-B51TF6q3.js";
149
149
  import { n as forceFreePortAndWait } from "./ports-Dn122MUd.js";
@@ -7321,7 +7321,7 @@ function applyControlUiSecurityHeaders(res) {
7321
7321
  res.setHeader("X-Content-Type-Options", "nosniff");
7322
7322
  res.setHeader("Referrer-Policy", "no-referrer");
7323
7323
  }
7324
- function sendJson$2(res, status, body) {
7324
+ function sendJson$3(res, status, body) {
7325
7325
  res.statusCode = status;
7326
7326
  res.setHeader("Content-Type", "application/json; charset=utf-8");
7327
7327
  res.setHeader("Cache-Control", "no-cache");
@@ -7348,7 +7348,7 @@ function handleControlUiAvatarRequest(req, res, opts) {
7348
7348
  }
7349
7349
  if (url.searchParams.get("meta") === "1") {
7350
7350
  const resolved = opts.resolveAvatar(agentId);
7351
- sendJson$2(res, 200, { avatarUrl: resolved.kind === "local" ? buildControlUiAvatarUrl(basePath, agentId) : resolved.kind === "remote" || resolved.kind === "data" ? resolved.url : null });
7351
+ sendJson$3(res, 200, { avatarUrl: resolved.kind === "local" ? buildControlUiAvatarUrl(basePath, agentId) : resolved.kind === "remote" || resolved.kind === "data" ? resolved.url : null });
7352
7352
  return true;
7353
7353
  }
7354
7354
  const resolved = opts.resolveAvatar(agentId);
@@ -7444,7 +7444,7 @@ function handleControlUiHttpRequest(req, res, opts) {
7444
7444
  assistantAgentId: identity.agentId
7445
7445
  };
7446
7446
  if (opts?.isLocalClient && opts?.gatewayToken) bootstrapConfig.gatewayToken = opts.gatewayToken;
7447
- sendJson$2(res, 200, bootstrapConfig);
7447
+ sendJson$3(res, 200, bootstrapConfig);
7448
7448
  return true;
7449
7449
  }
7450
7450
  const rootState = opts?.root;
@@ -7521,7 +7521,7 @@ function setDefaultSecurityHeaders(res) {
7521
7521
  res.setHeader("X-Content-Type-Options", "nosniff");
7522
7522
  res.setHeader("Referrer-Policy", "no-referrer");
7523
7523
  }
7524
- function sendJson$1(res, status, body) {
7524
+ function sendJson$2(res, status, body) {
7525
7525
  res.statusCode = status;
7526
7526
  res.setHeader("Content-Type", "application/json; charset=utf-8");
7527
7527
  res.end(JSON.stringify(body));
@@ -7536,14 +7536,14 @@ function sendMethodNotAllowed(res, allow = "POST") {
7536
7536
  sendText(res, 405, "Method Not Allowed");
7537
7537
  }
7538
7538
  function sendUnauthorized(res) {
7539
- sendJson$1(res, 401, { error: {
7539
+ sendJson$2(res, 401, { error: {
7540
7540
  message: "Unauthorized",
7541
7541
  type: "unauthorized"
7542
7542
  } });
7543
7543
  }
7544
7544
  function sendRateLimited(res, retryAfterMs) {
7545
7545
  if (retryAfterMs && retryAfterMs > 0) res.setHeader("Retry-After", String(Math.ceil(retryAfterMs / 1e3)));
7546
- sendJson$1(res, 429, { error: {
7546
+ sendJson$2(res, 429, { error: {
7547
7547
  message: "Too many failed authentication attempts. Please try again later.",
7548
7548
  type: "rate_limited"
7549
7549
  } });
@@ -7556,7 +7556,7 @@ function sendGatewayAuthFailure(res, authResult) {
7556
7556
  sendUnauthorized(res);
7557
7557
  }
7558
7558
  function sendInvalidRequest(res, message) {
7559
- sendJson$1(res, 400, { error: {
7559
+ sendJson$2(res, 400, { error: {
7560
7560
  message,
7561
7561
  type: "invalid_request_error"
7562
7562
  } });
@@ -7565,14 +7565,14 @@ async function readJsonBodyOrError(req, res, maxBytes) {
7565
7565
  const body = await readJsonBody(req, maxBytes);
7566
7566
  if (!body.ok) {
7567
7567
  if (body.error === "payload too large") {
7568
- sendJson$1(res, 413, { error: {
7568
+ sendJson$2(res, 413, { error: {
7569
7569
  message: "Payload too large",
7570
7570
  type: "invalid_request_error"
7571
7571
  } });
7572
7572
  return;
7573
7573
  }
7574
7574
  if (body.error === "request body timeout") {
7575
- sendJson$1(res, 408, { error: {
7575
+ sendJson$2(res, 408, { error: {
7576
7576
  message: "Request body timeout",
7577
7577
  type: "invalid_request_error"
7578
7578
  } });
@@ -7802,7 +7802,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
7802
7802
  });
7803
7803
  const prompt = buildAgentPrompt$1(payload.messages);
7804
7804
  if (!prompt.message) {
7805
- sendJson$1(res, 400, { error: {
7805
+ sendJson$2(res, 400, { error: {
7806
7806
  message: "Missing user message in `messages`.",
7807
7807
  type: "invalid_request_error"
7808
7808
  } });
@@ -7821,7 +7821,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
7821
7821
  messageChannel: "webchat",
7822
7822
  bestEffortDeliver: false
7823
7823
  }, defaultRuntime, deps));
7824
- sendJson$1(res, 200, {
7824
+ sendJson$2(res, 200, {
7825
7825
  id: runId,
7826
7826
  object: "chat.completion",
7827
7827
  created: Math.floor(Date.now() / 1e3),
@@ -7842,7 +7842,7 @@ async function handleOpenAiHttpRequest(req, res, opts) {
7842
7842
  });
7843
7843
  } catch (err) {
7844
7844
  logWarn(`openai-compat: chat completion failed: ${String(err)}`);
7845
- sendJson$1(res, 500, { error: {
7845
+ sendJson$2(res, 500, { error: {
7846
7846
  message: "internal error",
7847
7847
  type: "api_error"
7848
7848
  } });
@@ -8406,7 +8406,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8406
8406
  const parseResult = CreateResponseBodySchema.safeParse(handled.body);
8407
8407
  if (!parseResult.success) {
8408
8408
  const issue = parseResult.error.issues[0];
8409
- sendJson$1(res, 400, { error: {
8409
+ sendJson$2(res, 400, { error: {
8410
8410
  message: issue ? `${issue.path.join(".")}: ${issue.message}` : "Invalid request body",
8411
8411
  type: "invalid_request_error"
8412
8412
  } });
@@ -8463,7 +8463,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8463
8463
  }
8464
8464
  } catch (err) {
8465
8465
  logWarn(`openresponses: request parsing failed: ${String(err)}`);
8466
- sendJson$1(res, 400, { error: {
8466
+ sendJson$2(res, 400, { error: {
8467
8467
  message: "invalid request",
8468
8468
  type: "invalid_request_error"
8469
8469
  } });
@@ -8481,7 +8481,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8481
8481
  toolChoicePrompt = toolChoiceResult.extraSystemPrompt;
8482
8482
  } catch (err) {
8483
8483
  logWarn(`openresponses: tool configuration failed: ${String(err)}`);
8484
- sendJson$1(res, 400, { error: {
8484
+ sendJson$2(res, 400, { error: {
8485
8485
  message: "invalid tool configuration",
8486
8486
  type: "invalid_request_error"
8487
8487
  } });
@@ -8505,7 +8505,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8505
8505
  fileContext
8506
8506
  ].filter(Boolean).join("\n\n");
8507
8507
  if (!prompt.message) {
8508
- sendJson$1(res, 400, { error: {
8508
+ sendJson$2(res, 400, { error: {
8509
8509
  message: "Missing user message in `input`.",
8510
8510
  type: "invalid_request_error"
8511
8511
  } });
@@ -8534,7 +8534,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8534
8534
  const pendingToolCalls = meta && typeof meta === "object" ? meta.pendingToolCalls : void 0;
8535
8535
  if (stopReason === "tool_calls" && pendingToolCalls && pendingToolCalls.length > 0) {
8536
8536
  const functionCall = pendingToolCalls[0];
8537
- sendJson$1(res, 200, createResponseResource({
8537
+ sendJson$2(res, 200, createResponseResource({
8538
8538
  id: responseId,
8539
8539
  model,
8540
8540
  status: "incomplete",
@@ -8549,7 +8549,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8549
8549
  }));
8550
8550
  return true;
8551
8551
  }
8552
- sendJson$1(res, 200, createResponseResource({
8552
+ sendJson$2(res, 200, createResponseResource({
8553
8553
  id: responseId,
8554
8554
  model,
8555
8555
  status: "completed",
@@ -8562,7 +8562,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8562
8562
  }));
8563
8563
  } catch (err) {
8564
8564
  logWarn(`openresponses: non-stream response failed: ${String(err)}`);
8565
- sendJson$1(res, 500, createResponseResource({
8565
+ sendJson$2(res, 500, createResponseResource({
8566
8566
  id: responseId,
8567
8567
  model,
8568
8568
  status: "failed",
@@ -8829,6 +8829,138 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
8829
8829
  return true;
8830
8830
  }
8831
8831
 
8832
+ //#endregion
8833
+ //#region src/gateway/server-sessions-api.ts
8834
+ /**
8835
+ * HTTP API for session history — serves the Glass UI History drawer.
8836
+ *
8837
+ * GET /api/sessions — List all sessions with metadata
8838
+ * GET /api/transcript?file=<filename> — Read a session transcript
8839
+ *
8840
+ * Both endpoints are read-only and serve data from the existing session
8841
+ * store and .jsonl transcript files.
8842
+ *
8843
+ * @module
8844
+ */
8845
+ /**
8846
+ * Handle /api/sessions and /api/transcript HTTP requests.
8847
+ * Returns true if the request was handled, false otherwise.
8848
+ */
8849
+ function handleSessionsApiRequest(req, res, cfg) {
8850
+ const url = new URL(req.url ?? "/", "http://localhost");
8851
+ if (url.pathname === "/api/sessions" && req.method === "GET") {
8852
+ handleListSessions(res, cfg);
8853
+ return true;
8854
+ }
8855
+ if (url.pathname === "/api/transcript" && req.method === "GET") {
8856
+ handleTranscript(res, cfg, url.searchParams.get("file"));
8857
+ return true;
8858
+ }
8859
+ return false;
8860
+ }
8861
+ function sendJson$1(res, data, status = 200) {
8862
+ res.writeHead(status, { "Content-Type": "application/json" });
8863
+ res.end(JSON.stringify(data));
8864
+ }
8865
+ function handleListSessions(res, cfg) {
8866
+ try {
8867
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(resolveDefaultAgentId(cfg));
8868
+ const { storePath, store } = loadCombinedSessionStoreForGateway(cfg);
8869
+ const storeSessions = listSessionsFromStore({
8870
+ cfg,
8871
+ storePath,
8872
+ store,
8873
+ opts: {
8874
+ includeDerivedTitles: true,
8875
+ includeLastMessage: true
8876
+ }
8877
+ }).sessions.map((s) => ({
8878
+ file: s.sessionId ? `${s.sessionId}.jsonl` : void 0,
8879
+ sessionId: s.sessionId,
8880
+ sessionKey: s.key,
8881
+ isArchived: false,
8882
+ mtime: s.updatedAt ? new Date(s.updatedAt).toISOString() : void 0,
8883
+ preview: s.lastMessagePreview || s.derivedTitle || s.displayName || s.label || void 0,
8884
+ msgCount: (s.inputTokens ?? 0) > 0 || (s.outputTokens ?? 0) > 0 ? void 0 : void 0,
8885
+ size: void 0,
8886
+ model: s.model,
8887
+ modelProvider: s.modelProvider
8888
+ }));
8889
+ const archivedSessions = [];
8890
+ if (fs.existsSync(sessionsDir)) {
8891
+ const files = fs.readdirSync(sessionsDir);
8892
+ for (const file of files) {
8893
+ if (!file.includes(".jsonl.")) continue;
8894
+ const parts = file.split(".jsonl.");
8895
+ if (parts.length < 2 || !parts[1]) continue;
8896
+ const filePath = path.join(sessionsDir, file);
8897
+ try {
8898
+ const stat = fs.statSync(filePath);
8899
+ const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/).filter((l) => l.trim());
8900
+ let preview;
8901
+ let msgCount = 0;
8902
+ for (const line of lines) try {
8903
+ const parsed = JSON.parse(line);
8904
+ if (parsed?.message?.role === "user" || parsed?.message?.role === "assistant") msgCount++;
8905
+ if (!preview && parsed?.message?.role === "user") preview = (typeof parsed.message.content === "string" ? parsed.message.content : Array.isArray(parsed.message.content) ? parsed.message.content.filter((b) => b.type === "text").map((b) => b.text ?? "").join(" ") : "").trim().slice(0, 80) || void 0;
8906
+ } catch {}
8907
+ const suffix = parts[1];
8908
+ const dotIdx = suffix.indexOf(".");
8909
+ const archivedAt = dotIdx >= 0 ? suffix.slice(dotIdx + 1).replace(/-(?=\d{2}[T:-])/g, ":") : void 0;
8910
+ archivedSessions.push({
8911
+ file,
8912
+ sessionId: parts[0],
8913
+ isArchived: true,
8914
+ archivedAt: archivedAt || stat.mtime.toISOString(),
8915
+ mtime: stat.mtime.toISOString(),
8916
+ preview,
8917
+ msgCount,
8918
+ size: stat.size
8919
+ });
8920
+ } catch {}
8921
+ }
8922
+ }
8923
+ sendJson$1(res, [...storeSessions.filter((s) => s.sessionId), ...archivedSessions].toSorted((a, b) => {
8924
+ const aArchived = Boolean(a.isArchived);
8925
+ const bArchived = Boolean(b.isArchived);
8926
+ if (!aArchived && bArchived) return -1;
8927
+ if (aArchived && !bArchived) return 1;
8928
+ const aDate = typeof a.mtime === "string" ? a.mtime : typeof a.archivedAt === "string" ? a.archivedAt : "";
8929
+ return (typeof b.mtime === "string" ? b.mtime : typeof b.archivedAt === "string" ? b.archivedAt : "").localeCompare(aDate);
8930
+ }));
8931
+ } catch (err) {
8932
+ sendJson$1(res, { error: String(err) }, 500);
8933
+ }
8934
+ }
8935
+ function handleTranscript(res, cfg, file) {
8936
+ if (!file) {
8937
+ sendJson$1(res, { error: "Missing file parameter" }, 400);
8938
+ return;
8939
+ }
8940
+ const basename = path.basename(file);
8941
+ if (basename !== file || file.includes("..")) {
8942
+ sendJson$1(res, { error: "Invalid file parameter" }, 400);
8943
+ return;
8944
+ }
8945
+ try {
8946
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(resolveDefaultAgentId(cfg));
8947
+ const filePath = path.join(sessionsDir, basename);
8948
+ if (!fs.existsSync(filePath)) {
8949
+ sendJson$1(res, { error: "Session file not found" }, 404);
8950
+ return;
8951
+ }
8952
+ const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/).filter((l) => l.trim());
8953
+ const messages = [];
8954
+ for (const line of lines) try {
8955
+ const parsed = JSON.parse(line);
8956
+ if (parsed?.message?.role) messages.push(parsed.message);
8957
+ } catch {}
8958
+ sendJson$1(res, { messages });
8959
+ } catch (err) {
8960
+ sendJson$1(res, { error: String(err) }, 500);
8961
+ }
8962
+ }
8963
+
8832
8964
  //#endregion
8833
8965
  //#region src/gateway/tools-invoke-http.ts
8834
8966
  const DEFAULT_BODY_BYTES = 2 * 1024 * 1024;
@@ -8911,7 +9043,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
8911
9043
  if (process.env.VITEST && MEMORY_TOOL_NAMES.has(toolName)) {
8912
9044
  const reasons = resolveMemoryToolDisableReasons(cfg);
8913
9045
  if (reasons.length > 0) {
8914
- sendJson$1(res, 400, {
9046
+ sendJson$2(res, 400, {
8915
9047
  ok: false,
8916
9048
  error: {
8917
9049
  type: "invalid_request",
@@ -8983,7 +9115,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
8983
9115
  const gatewayDenySet = new Set(gatewayDenyNames);
8984
9116
  const tool = subagentFiltered.filter((t) => !gatewayDenySet.has(t.name)).find((t) => t.name === toolName);
8985
9117
  if (!tool) {
8986
- sendJson$1(res, 404, {
9118
+ sendJson$2(res, 404, {
8987
9119
  ok: false,
8988
9120
  error: {
8989
9121
  type: "not_found",
@@ -8998,14 +9130,14 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
8998
9130
  action,
8999
9131
  args
9000
9132
  });
9001
- sendJson$1(res, 200, {
9133
+ sendJson$2(res, 200, {
9002
9134
  ok: true,
9003
9135
  result: await tool.execute?.(`http-${Date.now()}`, toolArgs)
9004
9136
  });
9005
9137
  } catch (err) {
9006
9138
  const inputStatus = resolveToolInputErrorStatus(err);
9007
9139
  if (inputStatus !== null) {
9008
- sendJson$1(res, inputStatus, {
9140
+ sendJson$2(res, inputStatus, {
9009
9141
  ok: false,
9010
9142
  error: {
9011
9143
  type: "tool_error",
@@ -9015,7 +9147,7 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
9015
9147
  return true;
9016
9148
  }
9017
9149
  logWarn(`tools-invoke: tool execution failed: ${String(err)}`);
9018
- sendJson$1(res, 500, {
9150
+ sendJson$2(res, 500, {
9019
9151
  ok: false,
9020
9152
  error: {
9021
9153
  type: "tool_error",
@@ -9435,6 +9567,7 @@ function createGatewayHttpServer(opts) {
9435
9567
  if (await handleA2uiHttpRequest(req, res)) return;
9436
9568
  if (await canvasHost.handleHttpRequest(req, res)) return;
9437
9569
  }
9570
+ if (controlUiEnabled && handleSessionsApiRequest(req, res, configSnapshot)) return;
9438
9571
  if (controlUiEnabled) {
9439
9572
  if (handleControlUiAvatarRequest(req, res, {
9440
9573
  basePath: controlUiBasePath,
@@ -11702,7 +11835,7 @@ async function startGatewayServer(port = 18789, opts = {}) {
11702
11835
  });
11703
11836
  let glassUiBridgeCleanup = null;
11704
11837
  if (!minimalTestGateway) {
11705
- const { createGlassUiBridge } = await import("./glass-ui-ws-Cj9wbO1L.js");
11838
+ const { createGlassUiBridge } = await import("./glass-ui-ws-ibSNo7RU.js");
11706
11839
  glassUiBridgeCleanup = createGlassUiBridge({
11707
11840
  wss: glassUiWss,
11708
11841
  context: gatewayRequestContext,