@myagentroam/server 0.15.15 → 0.15.17

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 (370) hide show
  1. package/node_modules/@myagentroam/protocol/dist/browser-files.d.ts +11 -11
  2. package/node_modules/@myagentroam/protocol/dist/browser-files.js +7 -7
  3. package/node_modules/@myagentroam/protocol/dist/byte-frame.d.ts +32 -0
  4. package/node_modules/@myagentroam/protocol/dist/byte-frame.js +101 -0
  5. package/node_modules/@myagentroam/protocol/dist/enterprise.d.ts +4 -4
  6. package/node_modules/@myagentroam/protocol/dist/file-relay.d.ts +15 -0
  7. package/node_modules/@myagentroam/protocol/dist/file-relay.js +95 -0
  8. package/node_modules/@myagentroam/protocol/dist/index.d.ts +871 -861
  9. package/node_modules/@myagentroam/protocol/dist/index.js +18 -31
  10. package/node_modules/@myagentroam/protocol/dist/terminal-copy.d.ts +39 -0
  11. package/node_modules/@myagentroam/protocol/dist/terminal-copy.js +23 -0
  12. package/node_modules/@myagentroam/protocol/package.json +5 -1
  13. package/node_modules/@myagentroam/server-core/dist/domain-errors.js +8 -0
  14. package/node_modules/@myagentroam/server-core/dist/file-content-stream.d.ts +16 -4
  15. package/node_modules/@myagentroam/server-core/dist/file-content-stream.js +49 -14
  16. package/node_modules/@myagentroam/server-core/dist/hosted-conversation-routes.js +24 -17
  17. package/node_modules/@myagentroam/server-core/dist/html-preview-routes.js +14 -15
  18. package/node_modules/@myagentroam/server-core/dist/marctl-routes.d.ts +9 -1
  19. package/node_modules/@myagentroam/server-core/dist/marctl-routes.js +97 -17
  20. package/node_modules/@myagentroam/server-core/dist/node-file-relay.d.ts +24 -0
  21. package/node_modules/@myagentroam/server-core/dist/node-file-relay.js +134 -0
  22. package/node_modules/@myagentroam/server-core/dist/node-identity-control.d.ts +1 -0
  23. package/node_modules/@myagentroam/server-core/dist/node-identity-control.js +4 -1
  24. package/node_modules/@myagentroam/server-core/dist/node-request-channel.d.ts +8 -2
  25. package/node_modules/@myagentroam/server-core/dist/node-request-channel.js +40 -10
  26. package/node_modules/@myagentroam/server-core/dist/session-share-resource-routes.js +2 -2
  27. package/node_modules/@myagentroam/server-core/dist/terminal-multiplex.d.ts +32 -0
  28. package/node_modules/@myagentroam/server-core/dist/terminal-multiplex.js +120 -0
  29. package/node_modules/@myagentroam/server-core/dist/terminal-relay-service.d.ts +14 -1
  30. package/node_modules/@myagentroam/server-core/dist/terminal-relay-service.js +137 -80
  31. package/node_modules/@myagentroam/server-core/dist/workspace-routes.js +10 -10
  32. package/node_modules/@myagentroam/server-core/package.json +7 -2
  33. package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/node-control-factory.js +1 -1
  34. package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-application.js +4 -2
  35. package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.d.ts +10 -1
  36. package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.js +50 -1
  37. package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-access-service.js +3 -1
  38. package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/browser-file-routes.js +46 -8
  39. package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/realtime-routes.d.ts +5 -0
  40. package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/realtime-routes.js +24 -9
  41. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/browser-workbench-service.d.ts +1 -1
  42. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/browser-workbench-service.js +8 -4
  43. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/desktop-websocket-dispatcher.d.ts +3 -3
  44. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/desktop-websocket-dispatcher.js +3 -3
  45. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.d.ts +3 -1
  46. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.js +16 -4
  47. package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-resource-scope-index.js +1 -0
  48. package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
  49. package/package.json +5 -5
  50. package/web/assets/{AuditManagementPage-BrvJzEVh.js → AuditManagementPage-WbJnTA0T.js} +1 -1
  51. package/web/assets/{AuthEntryPanel-SvZl1O1s.js → AuthEntryPanel-5yr75Uwp.js} +1 -1
  52. package/web/assets/{CodeFileEditor-KUhu4ZW_.js → CodeFileEditor-DnQjWEy5.js} +3 -3
  53. package/web/assets/{ConversationTemplateManagementPage-DUQKafRO.js → ConversationTemplateManagementPage-B6hGCz7y.js} +1 -1
  54. package/web/assets/{ConversationTemplateManagementPage-xzSGwKEe.js → ConversationTemplateManagementPage-C9Xvy0Iy.js} +1 -1
  55. package/web/assets/{EnterpriseUserManagementPage-CN20HfL6.js → EnterpriseUserManagementPage-BjzUvzEn.js} +1 -1
  56. package/web/assets/{EnvironmentSecretManager-BSXIO2rX.js → EnvironmentSecretManager-D_sue0TB.js} +1 -1
  57. package/web/assets/{FilePreviewLoading-gXRGVuFp.js → FilePreviewLoading-BfzpOTYO.js} +1 -1
  58. package/web/assets/{LicenseManagementPage-lM_uR4EJ.js → LicenseManagementPage-Chjd4Y-C.js} +1 -1
  59. package/web/assets/{ManagementPagination-VdTGDpBD.js → ManagementPagination-DqqsaJOo.js} +1 -1
  60. package/web/assets/{MarAgentModelManagementPage-B9hGeGUH.js → MarAgentModelManagementPage-DXRcINZr.js} +1 -1
  61. package/web/assets/{MarAgentModelManagementPage-CkVrafU0.js → MarAgentModelManagementPage-DjRHx5SN.js} +1 -1
  62. package/web/assets/{MarAlert-CFLh_aqY.js → MarAlert-BJNliZSo.js} +1 -1
  63. package/web/assets/{MarCascader-BbWUF6Us.js → MarCascader-CUwA34pj.js} +1 -1
  64. package/web/assets/{MarCheckTag-Bm8-XGmn.js → MarCheckTag-C2yx0jjI.js} +1 -1
  65. package/web/assets/{MarCheckboxGroup-DYjU2cY8.js → MarCheckboxGroup-32HblXY1.js} +1 -1
  66. package/web/assets/{MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-C9ORaaoe.js → MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-C13tcZ2c.js} +1 -1
  67. package/web/assets/{MarDatePicker-8fL7LL13.js → MarDatePicker-CLcK5awN.js} +1 -1
  68. package/web/assets/{MarDescriptionsItem-Ca6Revy3.js → MarDescriptionsItem-pNjYHQYm.js} +1 -1
  69. package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-DjYpswlf.js → MarFormItem.vue_vue_type_script_setup_true_lang-C1bqQBsy.js} +1 -1
  70. package/web/assets/{MarInputNumber-qiSWOjbx.js → MarInputNumber-LQeygOvf.js} +1 -1
  71. package/web/assets/{MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-B6DYla5d.js → MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-7qlHK0gW.js} +1 -1
  72. package/web/assets/{MarSwitch-B5AhV40a.js → MarSwitch-DPj9_cFz.js} +1 -1
  73. package/web/assets/{MarTableColumn.vue_vue_type_script_setup_true_lang-BzqwLRsw.js → MarTableColumn.vue_vue_type_script_setup_true_lang-DYpquJVq.js} +1 -1
  74. package/web/assets/{MarTabs-DWHBJgYj.js → MarTabs-DpEh-11f.js} +1 -1
  75. package/web/assets/{MarTag-Hh7tZ0Xc.js → MarTag-Ci0fnufw.js} +1 -1
  76. package/web/assets/{MarkdownFilePreview-BJQHy5WV.js → MarkdownFilePreview-D1CC_oTI.js} +2 -2
  77. package/web/assets/{McpDetailsDialog-D-uEEVr-.js → McpDetailsDialog-BHQC8_ex.js} +1 -1
  78. package/web/assets/{McpSourceManagementPage-D9kEcaAr.js → McpSourceManagementPage-Bjnn3rZn.js} +1 -1
  79. package/web/assets/{McpSourceManagementPage-DneBGAyu.js → McpSourceManagementPage-ByQodFmZ.js} +1 -1
  80. package/web/assets/{NodeDetailsDialogs-ek18RBFl.js → NodeDetailsDialogs-D7IaQZFp.js} +1 -1
  81. package/web/assets/NodeManagementPage-BJtPgZcC.js +1 -0
  82. package/web/assets/NodeManagementPage-bipPqk0t.js +1 -0
  83. package/web/assets/{OAuthManagementPage-C7QuaI9Q.js → OAuthManagementPage-BmavWzJC.js} +1 -1
  84. package/web/assets/{OrganizationManagementPage-BaAinq5j.js → OrganizationManagementPage-lLYIsTq8.js} +1 -1
  85. package/web/assets/{RemoteDesktopPage-BfWgEIM2.js → RemoteDesktopPage-CRIQVxUA.js} +1 -1
  86. package/web/assets/{ResourceManagementPanel-CCy8tjqb.js → ResourceManagementPanel-2PlUkBOj.js} +2 -2
  87. package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-BSQ9x_7b.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-Dd0V7oSY.js} +1 -1
  88. package/web/assets/SecretManagementPage-CEGN-JkC.js +1 -0
  89. package/web/assets/{SecretManagementPage-D_-tvq96.js → SecretManagementPage-bhSm2fL2.js} +1 -1
  90. package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-L0pC0cK4.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-2OXKwRk2.js} +1 -1
  91. package/web/assets/{SessionSharePage-DVThEmwg.js → SessionSharePage-BjrhmyLe.js} +2 -2
  92. package/web/assets/{SettingsContent-_gKYVK9D.js → SettingsContent-B0LdgnP7.js} +1 -1
  93. package/web/assets/{SettingsContent-sWiEXYPl.js → SettingsContent-g7BEYpuE.js} +1 -1
  94. package/web/assets/SkillCenterPage-DEODo_GG.js +1 -0
  95. package/web/assets/{SkillCenterPage-BSHQ5YIG.js → SkillCenterPage-jEGDMpES.js} +1 -1
  96. package/web/assets/{SkillDetailsDialog-C7Xy98O1.js → SkillDetailsDialog-A1pw1A7-.js} +1 -1
  97. package/web/assets/{SkillSourceManagementPage-D9Q5cJ6i.js → SkillSourceManagementPage-DooHgmoP.js} +1 -1
  98. package/web/assets/{SkillSourceManagementPage-CWjmjEP8.js → SkillSourceManagementPage-XNC6lPJa.js} +1 -1
  99. package/web/assets/{StandaloneFilePreviewPage-ISPaJ_NK.js → StandaloneFilePreviewPage-CIEBUL5k.js} +1 -1
  100. package/web/assets/{SystemConfigurationPage-DtHmEUrw.js → SystemConfigurationPage-7MfkUvOh.js} +1 -1
  101. package/web/assets/{SystemConfigurationPage-Cv1oumfT.js → SystemConfigurationPage-CWjVrHop.js} +1 -1
  102. package/web/assets/{SystemInformationPage-C-ux95pV.js → SystemInformationPage-DZ7u6Olb.js} +1 -1
  103. package/web/assets/{TerminalTabView-DuwjoSdA.js → TerminalTabView-DalGFL18.js} +12 -12
  104. package/web/assets/WorkbenchPage-7uVQY1dE.js +22 -0
  105. package/web/assets/{WorkbenchPage-B8PxO9I0.css → WorkbenchPage-DObPaT6u.css} +1 -1
  106. package/web/assets/WorkspaceManagementPage-BZT4zsWh.js +1 -0
  107. package/web/assets/WorkspaceManagementPage-C7TKIYYq.js +1 -0
  108. package/web/assets/{abnfDiagram-VCTEODGH-k1hZvMXI.js → abnfDiagram-VCTEODGH-_jLWqh_M.js} +1 -1
  109. package/web/assets/{arc-DHxJVBWP.js → arc-CJf3NiyM.js} +1 -1
  110. package/web/assets/{architectureDiagram-5GKGNRK7-Dpm6a9__.js → architectureDiagram-5GKGNRK7-Ci1oSx_0.js} +1 -1
  111. package/web/assets/{blockDiagram-OSKFZWR5-CGwtfsQ8.js → blockDiagram-OSKFZWR5-CoN33-NO.js} +1 -1
  112. package/web/assets/{c4Diagram-7LVT6UL2-C2AF1tJ1.js → c4Diagram-7LVT6UL2-BCTv3Djw.js} +1 -1
  113. package/web/assets/{catalog-ownership-service-C2Gqf1oq.js → catalog-ownership-service-De6bWMko.js} +1 -1
  114. package/web/assets/{catalog-page-service-D3bgLLiI.js → catalog-page-service-CyV39A9d.js} +1 -1
  115. package/web/assets/channel-BUZA9uPY.js +1 -0
  116. package/web/assets/{chunk-2Q5K7J3B-BA5E-wPL.js → chunk-2Q5K7J3B-I9u98RXI.js} +1 -1
  117. package/web/assets/{chunk-5VM5RSS4-DU0aiScC.js → chunk-5VM5RSS4-B0ljBSZC.js} +1 -1
  118. package/web/assets/{chunk-F27PBJKO-qHLkHz31.js → chunk-F27PBJKO-zU_19t2g.js} +1 -1
  119. package/web/assets/{chunk-HLEWEB6X-BCzVtOF2.js → chunk-HLEWEB6X-DjUDzSXI.js} +1 -1
  120. package/web/assets/{chunk-JWPE2WC7-H-6Z83sz.js → chunk-JWPE2WC7-CcjnDa_2.js} +1 -1
  121. package/web/assets/{chunk-POPQ4Y6H-BM1aB6P0.js → chunk-POPQ4Y6H-R14b77Ro.js} +1 -1
  122. package/web/assets/{chunk-SVP7TREG-BEAOOQ97.js → chunk-SVP7TREG-BB-4CVKv.js} +1 -1
  123. package/web/assets/{chunk-XXDRQBXY-B9xfY_RK.js → chunk-XXDRQBXY-K-iKMO3N.js} +1 -1
  124. package/web/assets/{chunk-ZLD2IHE6-CMfCS4qr.js → chunk-ZLD2IHE6-BGkSa2Zq.js} +1 -1
  125. package/web/assets/classDiagram-CYGNFDIV-DnvZBzXj.js +1 -0
  126. package/web/assets/classDiagram-v2-TLXNO2FR-DnvZBzXj.js +1 -0
  127. package/web/assets/{conversation-history-BY6D6ZpX.js → conversation-history-BxHH4eFl.js} +1 -1
  128. package/web/assets/{cose-bilkent-JH36ORCC-AwSxVxo6.js → cose-bilkent-JH36ORCC-DA9G3rN6.js} +1 -1
  129. package/web/assets/{cynefin-OW5HDTMX-whdcaIzJ.js → cynefin-OW5HDTMX-BwwZqqXG.js} +1 -1
  130. package/web/assets/{cynefinDiagram-5FMLGOSQ-O9Z20szC.js → cynefinDiagram-5FMLGOSQ-ZHl2Jjya.js} +1 -1
  131. package/web/assets/{dagre-OS7QT2EB-ow4vI9UJ.js → dagre-OS7QT2EB-2IZJg4pC.js} +1 -1
  132. package/web/assets/{diagram-S7CK7UJ4-C5JUCPBw.js → diagram-S7CK7UJ4-Ccbt6h8y.js} +1 -1
  133. package/web/assets/{diagram-UQ7AKVKN-GxmLWk80.js → diagram-UQ7AKVKN-o4Eqj5J5.js} +1 -1
  134. package/web/assets/{diagram-VSXAHHWV-DOVp8Xjt.js → diagram-VSXAHHWV-DKdaF_Sk.js} +1 -1
  135. package/web/assets/{diagram-VX7I27RA-PLCFwZk-.js → diagram-VX7I27RA-CFdwsCEU.js} +1 -1
  136. package/web/assets/{diagram-Z3DM3KII-PXIFlIjY.js → diagram-Z3DM3KII-DxCbIBu3.js} +1 -1
  137. package/web/assets/{ebnfDiagram-PWID7BFC-rbkV11Um.js → ebnfDiagram-PWID7BFC-DTTFfkVD.js} +1 -1
  138. package/web/assets/{enterprise-management-service-D8y9eGfC.js → enterprise-management-service-Do_jOcpI.js} +1 -1
  139. package/web/assets/{erDiagram-2YWLMYGG-DUUJO1G6.js → erDiagram-2YWLMYGG-BhF7fBQ7.js} +1 -1
  140. package/web/assets/{error-presentation-BxAcVKvL.js → error-presentation-Do_OaiFI.js} +1 -1
  141. package/web/assets/{flowDiagram-T62WH6J4-CHbeYLpG.js → flowDiagram-T62WH6J4-D8eqJu9w.js} +1 -1
  142. package/web/assets/{ganttDiagram-EL5Y4UJY-n9E4wkCF.js → ganttDiagram-EL5Y4UJY-eAau54WT.js} +1 -1
  143. package/web/assets/{gitGraphDiagram-WWUBYQGX-BPl_-5rs.js → gitGraphDiagram-WWUBYQGX-DubQ09Db.js} +1 -1
  144. package/web/assets/{hosted-conversation-template-client-DEl1QyMX.js → hosted-conversation-template-client-DCE8LarJ.js} +1 -1
  145. package/web/assets/{index-4u0p6bpF.js → index-9A8BHK4e.js} +1 -1
  146. package/web/assets/{index-C1XWT1Nc.js → index-B3Ugfot-.js} +1 -1
  147. package/web/assets/{index-BgPbPCT2.js → index-B6vI23zq.js} +1 -1
  148. package/web/assets/{index-CRyoDMsO.js → index-BXclXJ1l.js} +1 -1
  149. package/web/assets/{index-D7FHstp1.js → index-BdUmqKhI.js} +1 -1
  150. package/web/assets/{index-B09EKbur.js → index-Bej4M0b_.js} +1 -1
  151. package/web/assets/{index-Bs3W8zrh.js → index-BhS_M0lP.js} +1 -1
  152. package/web/assets/{index-D7am5A8S.js → index-Bo6pjT9o.js} +1 -1
  153. package/web/assets/{index-B12p8B7P.js → index-Bw__L0LU.js} +1 -1
  154. package/web/assets/{index-CgnmmLK2.js → index-C4xrNFV5.js} +1 -1
  155. package/web/assets/{index-BNMe3DJ9.js → index-CZrnxNU-.js} +1 -1
  156. package/web/assets/{index-DAgeG9-E.js → index-CgBTncHY.js} +1 -1
  157. package/web/assets/{index-BQ9OSygZ.js → index-Cn_5w_L9.js} +1 -1
  158. package/web/assets/{index-DbFt3r9f.js → index-CxVyQ8Xm.js} +1 -1
  159. package/web/assets/{index-rthsxmTG.js → index-CzRjcMG9.js} +16 -16
  160. package/web/assets/{index-BpakW8Qr.js → index-DE-2Ch3z.js} +1 -1
  161. package/web/assets/{index-C3AkrQ1g.js → index-DNWF-dSL.js} +4 -4
  162. package/web/assets/{index-C_loADqX.js → index-DUNT7Aob.js} +1 -1
  163. package/web/assets/{index-WBErJsNP.js → index-D_L-h9H9.js} +1 -1
  164. package/web/assets/{index-VmfwqZ6y.js → index-DbOqiUO4.js} +1 -1
  165. package/web/assets/{index-DR_9kbd9.js → index-DeezPCGh.js} +1 -1
  166. package/web/assets/{index-B-ceIyZI.js → index-DmRp9xsp.js} +1 -1
  167. package/web/assets/{index-B7S2iNA-.js → index-LFu7p_0m.js} +1 -1
  168. package/web/assets/{index-sspROzt1.js → index-Q9RDgOYi.js} +1 -1
  169. package/web/assets/{index-39GUyb7q.js → index-Vzzx-ga3.js} +1 -1
  170. package/web/assets/{index-roas1jnS.js → index-avN0CGhy.js} +1 -1
  171. package/web/assets/{index-BMvUbBZd.js → index-lgYRFlez.js} +1 -1
  172. package/web/assets/{infoDiagram-FKFFQAWI-NaxcMyHB.js → infoDiagram-FKFFQAWI-Gi_jyTUZ.js} +1 -1
  173. package/web/assets/{ishikawaDiagram-5VMMS53U-7GpxYPy7.js → ishikawaDiagram-5VMMS53U-DYjLVaub.js} +1 -1
  174. package/web/assets/{journeyDiagram-EYS64GPL-5SFesofZ.js → journeyDiagram-EYS64GPL-Bo2SrkNW.js} +1 -1
  175. package/web/assets/{kanban-definition-UXKFOSKX-0_xu6jOG.js → kanban-definition-UXKFOSKX-BZ7yuWzq.js} +1 -1
  176. package/web/assets/{layout--eXtjI_t.js → layout-BvFqlAFM.js} +1 -1
  177. package/web/assets/{linear-CzqENfWH.js → linear-DBOyfRYN.js} +1 -1
  178. package/web/assets/{management-url-service-VRyN9twF.js → management-url-service-B7TIOnDE.js} +1 -1
  179. package/web/assets/{mar-agent-reasoning-effort-CK1DKtAI.js → mar-agent-reasoning-effort-D6js6DFt.js} +1 -1
  180. package/web/assets/{mcp-center-service-VW-Gn4Og.js → mcp-center-service-BsBkOBhq.js} +1 -1
  181. package/web/assets/{mermaid.core-BMpF6PF6.js → mermaid.core-DHY8W9Pw.js} +5 -5
  182. package/web/assets/{mindmap-definition-THT77NOG-DEzuKp9y.js → mindmap-definition-THT77NOG-CdWSRRdv.js} +1 -1
  183. package/web/assets/{mobile-dialog-return-service-2y-BzJk9.js → mobile-dialog-return-service-DCgpzeBo.js} +1 -1
  184. package/web/assets/{oauth-callback-BqMIvsAn.js → oauth-callback-CzQn9LcQ.js} +1 -1
  185. package/web/assets/{pegDiagram-XKGWAZYB-lVQD11qH.js → pegDiagram-XKGWAZYB-Cc3BDTiS.js} +1 -1
  186. package/web/assets/{pieDiagram-E7YTZNPT-DrWXyXV-.js → pieDiagram-E7YTZNPT-SkwRTyPh.js} +1 -1
  187. package/web/assets/{quadrantDiagram-AXDQQJYC-BAIAP0kw.js → quadrantDiagram-AXDQQJYC-C_u3oDVt.js} +1 -1
  188. package/web/assets/{railroadDiagram-O6MQD6OU-Dmh090wP.js → railroadDiagram-O6MQD6OU-DbPDeRnZ.js} +1 -1
  189. package/web/assets/{requirementDiagram-IS5BZ75X-l0VKzSIC.js → requirementDiagram-IS5BZ75X-V6XUjXpw.js} +1 -1
  190. package/web/assets/{runner-presentation-LZ3JCDBm.js → runner-presentation-BliiO9c3.js} +1 -1
  191. package/web/assets/{sankeyDiagram-P5KCCOFB-g2shJe2T.js → sankeyDiagram-P5KCCOFB-B91NwcI2.js} +1 -1
  192. package/web/assets/{scoped-http-service-CJo-IEAf.js → scoped-http-service-CRxDUpJm.js} +3 -3
  193. package/web/assets/{sequenceDiagram-WJ2MYXX4-S0K7kuGs.js → sequenceDiagram-WJ2MYXX4-BMVoqacm.js} +1 -1
  194. package/web/assets/{session-share-client-service-Df_euTFO.js → session-share-client-service-CRj11S1b.js} +1 -1
  195. package/web/assets/{sizeCapture-INFHLROL-BZ558r3s.js → sizeCapture-INFHLROL-DsQFWkdx.js} +1 -1
  196. package/web/assets/{stateDiagram-XQSTLZYL-BhPAqml7.js → stateDiagram-XQSTLZYL-BuGVP_PM.js} +1 -1
  197. package/web/assets/stateDiagram-v2-IH3M54BS-Gh-kX3Ld.js +1 -0
  198. package/web/assets/{swimlanes-V6O3JKXN-DEvfDaB_.js → swimlanes-V6O3JKXN-Bhlfasbh.js} +1 -1
  199. package/web/assets/swimlanesDiagram-JKAHXJPX-BT-CAmNF.js +8 -0
  200. package/web/assets/{time-presentation-d2Mf8Pyk.js → time-presentation-BLTaAoZ8.js} +1 -1
  201. package/web/assets/{timeline-definition-24CTP7MA-wPeDmleW.js → timeline-definition-24CTP7MA-nixy-0PP.js} +1 -1
  202. package/web/assets/{vennDiagram-4TSXK5OY-CZe4wMeC.js → vennDiagram-4TSXK5OY-DVYG0NkF.js} +1 -1
  203. package/web/assets/{wardleyDiagram-VM6X3IG4-CAFZopAI.js → wardleyDiagram-VM6X3IG4-D2l4fsJn.js} +1 -1
  204. package/web/assets/{workbench-live-service-DyG8W0wH.js → workbench-live-service-MHx_NjiK.js} +1 -1
  205. package/web/assets/{workbench-presentation-7FqdsZhr.js → workbench-presentation-Dfr0E1Uu.js} +1 -1
  206. package/web/assets/{xychartDiagram-S5SC5T6Z-0OFgdRpC.js → xychartDiagram-S5SC5T6Z-DTy5BUET.js} +1 -1
  207. package/web/docs/404.html +2 -2
  208. package/web/docs/administration/account.html +3 -3
  209. package/web/docs/administration/audit.html +3 -3
  210. package/web/docs/administration/conversation-templates.html +3 -3
  211. package/web/docs/administration/email-notifications.html +3 -3
  212. package/web/docs/administration/license.html +3 -3
  213. package/web/docs/administration/nodes-workspaces.html +3 -3
  214. package/web/docs/administration/oauth.html +3 -3
  215. package/web/docs/administration/secrets.html +3 -3
  216. package/web/docs/administration/template-workspace-maintenance.html +3 -3
  217. package/web/docs/administration/users-organizations.html +3 -3
  218. package/web/docs/assets/{app.CTOVq4X7.js → app.BY8vlkJS.js} +1 -1
  219. package/web/docs/assets/chunks/@localSearchIndexen-US.uVHmKl2W.js +1 -0
  220. package/web/docs/assets/chunks/@localSearchIndexroot.DShJkfms.js +1 -0
  221. package/web/docs/assets/chunks/{VPLocalSearchBox.CyGJb1f4.js → VPLocalSearchBox.D-QBvDUJ.js} +1 -1
  222. package/web/docs/assets/chunks/{theme.CL7W47pQ.js → theme.CQDhRs7w.js} +2 -2
  223. package/web/docs/assets/{en-US_operations_marctl.md.CWc-1YY7.js → en-US_operations_marctl.md.CfYEx8pB.js} +2 -1
  224. package/web/docs/assets/{en-US_operations_marctl.md.CWc-1YY7.lean.js → en-US_operations_marctl.md.CfYEx8pB.lean.js} +1 -1
  225. package/web/docs/assets/{operations_marctl.md.D-behH60.js → operations_marctl.md.tLIP9Zqx.js} +3 -2
  226. package/web/docs/assets/{operations_marctl.md.D-behH60.lean.js → operations_marctl.md.tLIP9Zqx.lean.js} +1 -1
  227. package/web/docs/concepts/architecture.html +3 -3
  228. package/web/docs/concepts/data-and-security.html +3 -3
  229. package/web/docs/concepts/files-git-terminal.html +3 -3
  230. package/web/docs/concepts/node-and-workspace.html +3 -3
  231. package/web/docs/concepts/permissions-and-sharing.html +3 -3
  232. package/web/docs/concepts/runner-control.html +3 -3
  233. package/web/docs/concepts/secrets.html +3 -3
  234. package/web/docs/concepts/session-run-turn.html +3 -3
  235. package/web/docs/deployment/backup-restore.html +3 -3
  236. package/web/docs/deployment/network.html +3 -3
  237. package/web/docs/deployment/node-installation.html +3 -3
  238. package/web/docs/deployment/node-linux.html +3 -3
  239. package/web/docs/deployment/node-macos.html +3 -3
  240. package/web/docs/deployment/node-windows.html +3 -3
  241. package/web/docs/deployment/production.html +3 -3
  242. package/web/docs/deployment/security-checklist.html +3 -3
  243. package/web/docs/deployment/upgrade.html +3 -3
  244. package/web/docs/en-US/administration/account.html +3 -3
  245. package/web/docs/en-US/administration/audit.html +3 -3
  246. package/web/docs/en-US/administration/conversation-templates.html +3 -3
  247. package/web/docs/en-US/administration/email-notifications.html +3 -3
  248. package/web/docs/en-US/administration/license.html +3 -3
  249. package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
  250. package/web/docs/en-US/administration/oauth.html +3 -3
  251. package/web/docs/en-US/administration/secrets.html +3 -3
  252. package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
  253. package/web/docs/en-US/administration/users-organizations.html +3 -3
  254. package/web/docs/en-US/concepts/architecture.html +3 -3
  255. package/web/docs/en-US/concepts/data-and-security.html +3 -3
  256. package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
  257. package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
  258. package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
  259. package/web/docs/en-US/concepts/runner-control.html +3 -3
  260. package/web/docs/en-US/concepts/secrets.html +3 -3
  261. package/web/docs/en-US/concepts/session-run-turn.html +3 -3
  262. package/web/docs/en-US/deployment/backup-restore.html +3 -3
  263. package/web/docs/en-US/deployment/network.html +3 -3
  264. package/web/docs/en-US/deployment/node-installation.html +3 -3
  265. package/web/docs/en-US/deployment/node-linux.html +3 -3
  266. package/web/docs/en-US/deployment/node-macos.html +3 -3
  267. package/web/docs/en-US/deployment/node-windows.html +3 -3
  268. package/web/docs/en-US/deployment/production.html +3 -3
  269. package/web/docs/en-US/deployment/security-checklist.html +3 -3
  270. package/web/docs/en-US/deployment/upgrade.html +3 -3
  271. package/web/docs/en-US/getting-started/connect-node.html +3 -3
  272. package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
  273. package/web/docs/en-US/getting-started/first-login.html +3 -3
  274. package/web/docs/en-US/getting-started/next-steps.html +3 -3
  275. package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
  276. package/web/docs/en-US/getting-started/overview.html +3 -3
  277. package/web/docs/en-US/getting-started/prerequisites.html +3 -3
  278. package/web/docs/en-US/getting-started/register-workspace.html +3 -3
  279. package/web/docs/en-US/getting-started/server-installation.html +3 -3
  280. package/web/docs/en-US/operations/marctl.html +6 -5
  281. package/web/docs/en-US/reference/configuration.html +3 -3
  282. package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
  283. package/web/docs/en-US/reference/limits.html +3 -3
  284. package/web/docs/en-US/reference/ports-paths-data.html +3 -3
  285. package/web/docs/en-US/reference/status-and-errors.html +3 -3
  286. package/web/docs/en-US/runners/claude-code.html +3 -3
  287. package/web/docs/en-US/runners/codex.html +3 -3
  288. package/web/docs/en-US/runners/mar-agent.html +3 -3
  289. package/web/docs/en-US/runners/opencode.html +3 -3
  290. package/web/docs/en-US/runners/overview.html +3 -3
  291. package/web/docs/en-US/runners/runner-troubleshooting.html +3 -3
  292. package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
  293. package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
  294. package/web/docs/en-US/troubleshooting/session-run.html +3 -3
  295. package/web/docs/en-US/troubleshooting/terminal.html +3 -3
  296. package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
  297. package/web/docs/en-US/workbench/browser.html +3 -3
  298. package/web/docs/en-US/workbench/composer.html +3 -3
  299. package/web/docs/en-US/workbench/context-and-plan.html +3 -3
  300. package/web/docs/en-US/workbench/conversation.html +3 -3
  301. package/web/docs/en-US/workbench/file-reference-and-attachment.html +3 -3
  302. package/web/docs/en-US/workbench/files.html +3 -3
  303. package/web/docs/en-US/workbench/git-changes.html +3 -3
  304. package/web/docs/en-US/workbench/git-history.html +3 -3
  305. package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
  306. package/web/docs/en-US/workbench/mobile.html +3 -3
  307. package/web/docs/en-US/workbench/navigation.html +3 -3
  308. package/web/docs/en-US/workbench/remote-desktop.html +3 -3
  309. package/web/docs/en-US/workbench/sessions.html +3 -3
  310. package/web/docs/en-US/workbench/skills.html +3 -3
  311. package/web/docs/en-US/workbench/terminal.html +3 -3
  312. package/web/docs/getting-started/connect-node.html +3 -3
  313. package/web/docs/getting-started/first-agent-session.html +3 -3
  314. package/web/docs/getting-started/first-login.html +3 -3
  315. package/web/docs/getting-started/next-steps.html +3 -3
  316. package/web/docs/getting-started/npm-quick-start.html +3 -3
  317. package/web/docs/getting-started/overview.html +3 -3
  318. package/web/docs/getting-started/prerequisites.html +3 -3
  319. package/web/docs/getting-started/register-workspace.html +3 -3
  320. package/web/docs/getting-started/server-installation.html +3 -3
  321. package/web/docs/hashmap.json +1 -1
  322. package/web/docs/operations/marctl.html +6 -5
  323. package/web/docs/reference/configuration.html +3 -3
  324. package/web/docs/reference/keyboard-shortcuts.html +3 -3
  325. package/web/docs/reference/limits.html +3 -3
  326. package/web/docs/reference/ports-paths-data.html +3 -3
  327. package/web/docs/reference/status-and-errors.html +3 -3
  328. package/web/docs/runners/claude-code.html +3 -3
  329. package/web/docs/runners/codex.html +3 -3
  330. package/web/docs/runners/mar-agent.html +3 -3
  331. package/web/docs/runners/opencode.html +3 -3
  332. package/web/docs/runners/overview.html +3 -3
  333. package/web/docs/runners/runner-troubleshooting.html +3 -3
  334. package/web/docs/troubleshooting/node-offline.html +3 -3
  335. package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
  336. package/web/docs/troubleshooting/session-run.html +3 -3
  337. package/web/docs/troubleshooting/terminal.html +3 -3
  338. package/web/docs/troubleshooting/workspace-files.html +3 -3
  339. package/web/docs/workbench/browser.html +3 -3
  340. package/web/docs/workbench/composer.html +3 -3
  341. package/web/docs/workbench/context-and-plan.html +3 -3
  342. package/web/docs/workbench/conversation.html +3 -3
  343. package/web/docs/workbench/file-reference-and-attachment.html +3 -3
  344. package/web/docs/workbench/files.html +3 -3
  345. package/web/docs/workbench/git-changes.html +3 -3
  346. package/web/docs/workbench/git-history.html +3 -3
  347. package/web/docs/workbench/hosted-conversations.html +3 -3
  348. package/web/docs/workbench/mobile.html +3 -3
  349. package/web/docs/workbench/navigation.html +3 -3
  350. package/web/docs/workbench/remote-desktop.html +3 -3
  351. package/web/docs/workbench/sessions.html +3 -3
  352. package/web/docs/workbench/skills.html +3 -3
  353. package/web/docs/workbench/terminal.html +3 -3
  354. package/web/index.html +2 -2
  355. package/web/service-worker.js +1 -1
  356. package/web/web-version.json +1 -1
  357. package/web/assets/NodeManagementPage-Bc8LY_4g.js +0 -1
  358. package/web/assets/NodeManagementPage-CrAcUZS_.js +0 -1
  359. package/web/assets/SecretManagementPage-4ToNQatJ.js +0 -1
  360. package/web/assets/SkillCenterPage-Ct4ssqM8.js +0 -1
  361. package/web/assets/WorkbenchPage-DDiuh5D6.js +0 -22
  362. package/web/assets/WorkspaceManagementPage-DJl_pQVE.js +0 -1
  363. package/web/assets/WorkspaceManagementPage-DjdUAP36.js +0 -1
  364. package/web/assets/channel-DPeqZwuK.js +0 -1
  365. package/web/assets/classDiagram-CYGNFDIV-CtaoVZAl.js +0 -1
  366. package/web/assets/classDiagram-v2-TLXNO2FR-CtaoVZAl.js +0 -1
  367. package/web/assets/stateDiagram-v2-IH3M54BS-DYhuhiA0.js +0 -1
  368. package/web/assets/swimlanesDiagram-JKAHXJPX-sDHBaPem.js +0 -8
  369. package/web/docs/assets/chunks/@localSearchIndexen-US.86SCx6LB.js +0 -1
  370. package/web/docs/assets/chunks/@localSearchIndexroot.BkjcHNUh.js +0 -1
@@ -24,6 +24,9 @@ export * from './mcp.js';
24
24
  export * from './git-identity.js';
25
25
  export * from './direct-transfer.js';
26
26
  export * from './terminal-direct.js';
27
+ export * from './terminal-copy.js';
28
+ export * from './byte-frame.js';
29
+ export * from './file-relay.js';
27
30
  export * from './remote-desktop.js';
28
31
  export * from './browser-frame.js';
29
32
  export * from './browser-input.js';
@@ -2481,25 +2484,6 @@ const uniqueProtocolIds = (values, context, path) => {
2481
2484
  if (new Set(values).size !== values.length)
2482
2485
  context.addIssue({ code: 'custom', path, message: 'identifiers must be unique' });
2483
2486
  };
2484
- const BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
2485
- const canonicalBase64 = (value) => {
2486
- if (value.length === 0)
2487
- return true;
2488
- if (value.length % 4 !== 0 || !/^[A-Za-z0-9+/]+={0,2}$/u.test(value))
2489
- return false;
2490
- const padding = value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0;
2491
- if (padding === 2)
2492
- return BASE64_ALPHABET.indexOf(value.at(-3)) % 16 === 0;
2493
- if (padding === 1)
2494
- return BASE64_ALPHABET.indexOf(value.at(-2)) % 4 === 0;
2495
- return true;
2496
- };
2497
- const base64DecodedByteLength = (value) => {
2498
- if (value.length === 0)
2499
- return 0;
2500
- const padding = value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0;
2501
- return (value.length * 3) / 4 - padding;
2502
- };
2503
2487
  export const conversationTemplateStatusSchema = z.enum(['ACTIVE', 'ARCHIVED', 'DELETED']);
2504
2488
  export const conversationTemplateVersionStatusSchema = z.enum([
2505
2489
  'AVAILABLE',
@@ -3077,16 +3061,13 @@ export const hostedConversationFileDeleteResultSchema = z
3077
3061
  export const hostedConversationFileReadResultSchema = z
3078
3062
  .object({
3079
3063
  file: conversationFileProjectionSchema,
3080
- encoding: z.literal('base64'),
3081
- content: z.string().max(Math.ceil((512 * 1024 * 4) / 3) + 4),
3064
+ bytes: z.instanceof(Uint8Array).refine((bytes) => bytes.byteLength <= 512 * 1024),
3082
3065
  offset: z.number().int().nonnegative(),
3083
3066
  nextOffset: z.number().int().nonnegative().nullable(),
3084
3067
  eof: z.boolean()
3085
3068
  })
3086
3069
  .strict()
3087
3070
  .superRefine((result, context) => {
3088
- if (!canonicalBase64(result.content))
3089
- context.addIssue({ code: 'custom', path: ['content'], message: 'file content is invalid' });
3090
3071
  if (result.nextOffset !== null && result.nextOffset <= result.offset)
3091
3072
  context.addIssue({
3092
3073
  code: 'custom',
@@ -3119,11 +3100,9 @@ export const hostedConversationUploadChunkInputSchema = hostedConversationIdInpu
3119
3100
  .extend({
3120
3101
  uploadId: protocolIdSchema,
3121
3102
  offset: z.number().int().nonnegative(),
3122
- dataBase64: z
3123
- .string()
3124
- .min(4)
3125
- .max(Math.ceil((512 * 1024 * 4) / 3) + 4)
3126
- .refine((value) => canonicalBase64(value) && base64DecodedByteLength(value) <= 512 * 1024, 'upload chunk is invalid')
3103
+ bytes: z
3104
+ .instanceof(Uint8Array)
3105
+ .refine((bytes) => bytes.byteLength > 0 && bytes.byteLength <= 512 * 1024)
3127
3106
  })
3128
3107
  .strict();
3129
3108
  export const hostedConversationUploadControlInputSchema = hostedConversationIdInputSchema
@@ -3224,13 +3203,18 @@ export const terminalDataFrameSchema = z.discriminatedUnion('type', [
3224
3203
  z.object({
3225
3204
  type: z.literal('input'),
3226
3205
  terminalId: z.string().min(1).max(128),
3227
- data: z.string().max(65536)
3206
+ data: z.instanceof(Uint8Array).refine((bytes) => bytes.length > 0 && bytes.length <= 65536)
3207
+ }),
3208
+ z.object({
3209
+ type: z.literal('eof'),
3210
+ terminalId: z.string().min(1).max(128)
3228
3211
  }),
3229
3212
  z.object({
3230
3213
  type: z.literal('output'),
3231
3214
  terminalId: z.string().min(1).max(128),
3232
3215
  sequence: z.number().int().positive(),
3233
- data: z.string().max(65536)
3216
+ stream: z.literal('stderr').optional(),
3217
+ data: z.instanceof(Uint8Array).refine((bytes) => bytes.length > 0 && bytes.length <= 65536)
3234
3218
  }),
3235
3219
  z.object({ type: z.literal('close'), terminalId: z.string().min(1).max(128) }),
3236
3220
  z.object({
@@ -3684,9 +3668,12 @@ const FIXED_PUBLIC_ERROR_MESSAGES = {
3684
3668
  GIT_CREDENTIAL_DIRECTORY_INVALID: 'A private directory for Git keys could not be secured on this Node.',
3685
3669
  TERMINAL_GIT_OWNER_REQUIRED: 'This terminal uses another user’s Git credentials. Open your own terminal.',
3686
3670
  TERMINAL_OWNER_REQUIRED: 'This terminal belongs to another user. Open your own terminal.',
3687
- TERMINAL_COMMAND_INVALID: 'The remote command must be non-empty and at most 8 KiB.',
3671
+ TERMINAL_COMMAND_INVALID: 'The remote command must be non-empty and at most 64 KiB.',
3688
3672
  TERMINAL_COMMAND_START_FAILED: 'The remote command could not be started.',
3673
+ COMPUTER_REMOTE_DISABLED: 'Remote Computer Use is disabled in the target Node configuration.',
3689
3674
  FILE_REVEAL_INVALID: 'The Workspace file manager target is invalid.',
3675
+ FILE_RELAY_UNAVAILABLE: 'The Node file connection is unavailable. Check that the Node and Server run the same release.',
3676
+ FILE_RELAY_BUSY: 'The Node file connection has too many requests in flight. Try again when a transfer finishes.',
3690
3677
  FILE_MANAGER_UNAVAILABLE: 'The local file manager is unavailable in this Node desktop session.',
3691
3678
  EXTERNAL_SESSION_ACTIVE: 'This native session is currently active in another client. Try again later.',
3692
3679
  RUNNER_RESUME_FAILED: 'The native session could not be activated. Try again later.',
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const terminalCopySchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
3
+ mode: z.ZodLiteral<"read">;
4
+ path: z.ZodEffects<z.ZodString, string, string>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ path: string;
7
+ mode: "read";
8
+ }, {
9
+ path: string;
10
+ mode: "read";
11
+ }>, z.ZodObject<{
12
+ mode: z.ZodLiteral<"write">;
13
+ path: z.ZodEffects<z.ZodString, string, string>;
14
+ size: z.ZodNumber;
15
+ sourceMode: z.ZodNumber;
16
+ atimeMs: z.ZodNumber;
17
+ mtimeMs: z.ZodNumber;
18
+ preserve: z.ZodBoolean;
19
+ sourceBasename: z.ZodEffects<z.ZodString, string, string>;
20
+ }, "strict", z.ZodTypeAny, {
21
+ path: string;
22
+ size: number;
23
+ mode: "write";
24
+ sourceMode: number;
25
+ atimeMs: number;
26
+ mtimeMs: number;
27
+ preserve: boolean;
28
+ sourceBasename: string;
29
+ }, {
30
+ path: string;
31
+ size: number;
32
+ mode: "write";
33
+ sourceMode: number;
34
+ atimeMs: number;
35
+ mtimeMs: number;
36
+ preserve: boolean;
37
+ sourceBasename: string;
38
+ }>]>;
39
+ export type TerminalCopy = z.infer<typeof terminalCopySchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ // Bound the structured descriptor passed to the built-in worker, including on Windows.
3
+ const nonNullString = (max) => z
4
+ .string()
5
+ .min(1)
6
+ .max(max)
7
+ .refine((value) => !value.includes('\0'));
8
+ const path = nonNullString(4096);
9
+ export const terminalCopySchema = z.discriminatedUnion('mode', [
10
+ z.object({ mode: z.literal('read'), path }).strict(),
11
+ z
12
+ .object({
13
+ mode: z.literal('write'),
14
+ path,
15
+ size: z.number().int().safe().nonnegative(),
16
+ sourceMode: z.number().int().min(0).max(0o777),
17
+ atimeMs: z.number().finite(),
18
+ mtimeMs: z.number().finite(),
19
+ preserve: z.boolean(),
20
+ sourceBasename: nonNullString(255)
21
+ })
22
+ .strict()
23
+ ]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.15.15",
3
+ "version": "0.15.17",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/myagentroam/mar.git",
@@ -18,6 +18,10 @@
18
18
  },
19
19
  "exports": {
20
20
  "./package.json": "./package.json",
21
+ "./byte-frame": {
22
+ "types": "./dist/byte-frame.d.ts",
23
+ "import": "./dist/byte-frame.js"
24
+ },
21
25
  ".": {
22
26
  "types": "./dist/index.d.ts",
23
27
  "import": "./dist/index.js"
@@ -4,6 +4,10 @@ export function domainErrorStatus(code) {
4
4
  return 413;
5
5
  if (code === 'NODE_RESPONSE_INVALID')
6
6
  return 502;
7
+ if (code === 'FILE_RELAY_UNAVAILABLE')
8
+ return 503;
9
+ if (code === 'FILE_RELAY_BUSY')
10
+ return 429;
7
11
  if (code === 'SCHEDULE_NOT_FOUND')
8
12
  return 404;
9
13
  if (code === 'SCHEDULE_OWNER_REQUIRED')
@@ -22,6 +26,10 @@ export function domainErrorStatus(code) {
22
26
  return 403;
23
27
  if (code === 'TERMINAL_GIT_OWNER_REQUIRED' || code === 'TERMINAL_OWNER_REQUIRED')
24
28
  return 403;
29
+ if (code === 'COMPUTER_REMOTE_DISABLED')
30
+ return 403;
31
+ if (code === 'SCP_OPEN_INVALID')
32
+ return 400;
25
33
  return code === 'SESSION_NOT_FOUND' ||
26
34
  code === 'WORKSPACE_NOT_FOUND' ||
27
35
  code === 'RUN_NOT_FOUND' ||
@@ -1,9 +1,18 @@
1
- import type { FastifyReply } from 'fastify';
1
+ import type { FastifyInstance, FastifyReply } from 'fastify';
2
+ import { Readable } from 'node:stream';
2
3
  export interface FileContentChunk {
3
4
  readonly size: number;
4
5
  readonly offset: number;
5
- readonly contentBase64: string;
6
+ readonly bytes: Uint8Array;
7
+ readonly sourceRevision?: string;
6
8
  }
9
+ type FileContentReader = (offset: number, limit: number) => Promise<FileContentChunk>;
10
+ /** Pin one Workspace response to the size and revision already provided by the Node. */
11
+ export declare function readWorkspaceFileSnapshot(read: FileContentReader): Promise<{
12
+ size: number;
13
+ read: (offset: number, limit: number) => Promise<FileContentChunk>;
14
+ }>;
15
+ export declare function registerFileChunkParser(app: FastifyInstance): void;
7
16
  /** Shared native resource response for account and share-authorized Workspace reads. */
8
17
  export declare function sendWorkspaceFileContent(input: {
9
18
  reply: FastifyReply;
@@ -11,12 +20,15 @@ export declare function sendWorkspaceFileContent(input: {
11
20
  range: string | undefined;
12
21
  path: string;
13
22
  download: boolean;
14
- read: (offset: number, limit: number) => Promise<FileContentChunk>;
23
+ read: FileContentReader;
15
24
  }): Promise<FastifyReply>;
16
25
  export declare function sendFileContentHead(reply: FastifyReply, length: number): FastifyReply;
17
- export declare function fileContentChunks(readChunk: (offset: number, limit: number) => Promise<FileContentChunk>, start: number, end: number, chunkSize: number): AsyncGenerator<Buffer>;
26
+ /** Let route error handling see the first read failure before any download headers are set. */
27
+ export declare function openFileContentStream(read: (offset: number, limit: number) => Promise<FileContentChunk>, start: number, end: number, chunkSize?: number): Promise<Readable>;
28
+ export declare function fileContentChunks(readChunk: (offset: number, limit: number) => Promise<FileContentChunk>, start: number, end: number, chunkSize: number): AsyncGenerator<Uint8Array>;
18
29
  export declare function parseHttpByteRange(value: string | undefined, size: number): {
19
30
  readonly start: number;
20
31
  readonly end: number;
21
32
  } | undefined | null;
22
33
  export declare function fileContentType(path: string): string;
34
+ export {};
@@ -1,20 +1,45 @@
1
1
  import { Readable } from 'node:stream';
2
+ import { FILE_RELAY_CHUNK_BYTES } from '@myagentroam/protocol';
2
3
  import { sendError } from './http-errors.js';
4
+ /** Pin one Workspace response to the size and revision already provided by the Node. */
5
+ export async function readWorkspaceFileSnapshot(read) {
6
+ const { size, offset, bytes, sourceRevision } = await read(0, 1);
7
+ if (size < 0 ||
8
+ offset !== 0 ||
9
+ bytes.byteLength !== Math.min(1, size) ||
10
+ typeof sourceRevision !== 'string' ||
11
+ !/^[a-f0-9]{64}$/u.test(sourceRevision))
12
+ throw new Error('NODE_RESPONSE_INVALID');
13
+ return {
14
+ size,
15
+ read: async (offset, limit) => {
16
+ const chunk = await read(offset, limit);
17
+ if (chunk.size !== size || chunk.sourceRevision !== sourceRevision)
18
+ throw new Error('NODE_RESPONSE_INVALID');
19
+ return chunk;
20
+ }
21
+ };
22
+ }
23
+ export function registerFileChunkParser(app) {
24
+ if (!app.hasContentTypeParser('application/octet-stream'))
25
+ app.addContentTypeParser('application/octet-stream', { parseAs: 'buffer', bodyLimit: FILE_RELAY_CHUNK_BYTES }, (_request, body, done) => done(null, body));
26
+ }
3
27
  /** Shared native resource response for account and share-authorized Workspace reads. */
4
28
  export async function sendWorkspaceFileContent(input) {
5
- const { reply, read } = input;
6
- const first = await read(0, 1);
7
- const range = parseHttpByteRange(input.range, first.size);
29
+ const { reply } = input;
30
+ const { size, read } = await readWorkspaceFileSnapshot(input.read);
31
+ const range = parseHttpByteRange(input.range, size);
8
32
  if (range === null)
9
33
  return sendError(reply, 416, 'FILE_RANGE_INVALID');
10
34
  const start = range?.start ?? 0;
11
- const end = range?.end ?? first.size - 1;
12
- const length = first.size === 0 ? 0 : end - start + 1;
35
+ const end = range?.end ?? size - 1;
36
+ const length = size === 0 ? 0 : end - start + 1;
13
37
  const filename = input.path.split('/').at(-1) ?? 'file';
14
38
  const contentType = fileContentType(filename);
15
39
  const media = contentType.startsWith('audio/') || contentType.startsWith('video/');
16
40
  if (!input.download && !media && range === undefined && length > 20 * 1024 * 1024)
17
41
  return sendError(reply, 413, 'FILE_PREVIEW_TOO_LARGE');
42
+ const stream = input.method === 'HEAD' ? undefined : await openFileContentStream(read, start, end);
18
43
  reply
19
44
  .header('accept-ranges', 'bytes')
20
45
  .header('cache-control', 'private, no-store')
@@ -23,13 +48,11 @@ export async function sendWorkspaceFileContent(input) {
23
48
  .header('x-content-type-options', 'nosniff');
24
49
  if (contentType === 'image/svg+xml')
25
50
  reply.header('content-security-policy', 'sandbox');
26
- if (range !== undefined && first.size > 0)
27
- reply.code(206).header('content-range', `bytes ${start}-${end}/${first.size}`);
28
- if (input.method === 'HEAD')
51
+ if (range !== undefined && size > 0)
52
+ reply.code(206).header('content-range', `bytes ${start}-${end}/${size}`);
53
+ if (stream === undefined)
29
54
  return sendFileContentHead(reply, length);
30
- return reply
31
- .header('content-length', String(length))
32
- .send(Readable.from(fileContentChunks(read, start, end, 512 * 1024)));
55
+ return reply.header('content-length', String(length)).send(stream);
33
56
  }
34
57
  export function sendFileContentHead(reply, length) {
35
58
  reply.hijack();
@@ -41,12 +64,24 @@ export function sendFileContentHead(reply, length) {
41
64
  reply.raw.end();
42
65
  return reply;
43
66
  }
67
+ /** Let route error handling see the first read failure before any download headers are set. */
68
+ export async function openFileContentStream(read, start, end, chunkSize = FILE_RELAY_CHUNK_BYTES) {
69
+ const chunks = fileContentChunks(read, start, end, chunkSize);
70
+ const first = await chunks.next();
71
+ return Readable.from((async function* () {
72
+ if (first.done)
73
+ return;
74
+ yield first.value;
75
+ yield* chunks;
76
+ })());
77
+ }
44
78
  export async function* fileContentChunks(readChunk, start, end, chunkSize) {
45
79
  let offset = start;
46
80
  while (offset <= end) {
47
- const part = await readChunk(offset, Math.min(chunkSize, end - offset + 1));
48
- const content = Buffer.from(part.contentBase64, 'base64');
49
- if (part.offset !== offset || content.length === 0 || content.length > end - offset + 1)
81
+ const limit = Math.min(chunkSize, end - offset + 1);
82
+ const part = await readChunk(offset, limit);
83
+ const content = part.bytes;
84
+ if (part.offset !== offset || content.length === 0 || content.length > limit)
50
85
  throw new Error('NODE_RESPONSE_INVALID');
51
86
  offset += content.length;
52
87
  yield content;
@@ -1,10 +1,10 @@
1
1
  import { Readable } from 'node:stream';
2
2
  import { z } from 'zod';
3
3
  import { parseImagePreviewQuery, sendImageResource } from './image-resource-response.js';
4
- import { toolResultResourceInputSchema, toolResultResourcePageSchema, hostedConversationConfigUpdateInputSchema, hostedConversationTemplateSwitchInputSchema, hostedConversationTemplateSwitchResultSchema, hostedConversationCreateInputSchema, hostedConversationDeleteResultSchema, hostedConversationDirectoryPageSchema, hostedConversationFileDeleteInputSchema, hostedConversationFileDeleteResultSchema, hostedConversationFileReadInputSchema, hostedConversationFileReadResultSchema, hostedConversationHistoryInputSchema, hostedConversationHistoryPageSchema, hostedConversationIdInputSchema, hostedConversationImageReadInputSchema, hostedConversationListInputSchema, hostedConversationListPageSchema, hostedConversationMessageInputSchema, hostedConversationMetadataUpdateInputSchema, hostedConversationModelOptionsSchema, hostedConversationRollbackInputSchema, hostedConversationSnapshotSchema, hostedConversationUnwatchInputSchema, hostedConversationUploadChunkInputSchema, hostedConversationUploadControlInputSchema, hostedConversationUploadCreateInputSchema, hostedConversationUploadPreflightInputSchema, hostedConversationWatchInputSchema } from '@myagentroam/protocol';
4
+ import { encodeFileRelayFrame, toolResultResourceInputSchema, toolResultResourcePageSchema, hostedConversationConfigUpdateInputSchema, hostedConversationTemplateSwitchInputSchema, hostedConversationTemplateSwitchResultSchema, hostedConversationCreateInputSchema, hostedConversationDeleteResultSchema, hostedConversationDirectoryPageSchema, hostedConversationFileDeleteInputSchema, hostedConversationFileDeleteResultSchema, hostedConversationFileReadInputSchema, hostedConversationFileReadResultSchema, hostedConversationHistoryInputSchema, hostedConversationHistoryPageSchema, hostedConversationIdInputSchema, hostedConversationImageReadInputSchema, hostedConversationListInputSchema, hostedConversationListPageSchema, hostedConversationMessageInputSchema, hostedConversationMetadataUpdateInputSchema, hostedConversationModelOptionsSchema, hostedConversationRollbackInputSchema, hostedConversationSnapshotSchema, hostedConversationUnwatchInputSchema, hostedConversationUploadChunkInputSchema, hostedConversationUploadControlInputSchema, hostedConversationUploadCreateInputSchema, hostedConversationUploadPreflightInputSchema, hostedConversationWatchInputSchema } from '@myagentroam/protocol';
5
5
  import { isAllowedOrigin } from './auth.js';
6
6
  import { HostedConversationDirectoryService } from './hosted-conversation-directory-service.js';
7
- import { fileContentChunks, fileContentType, parseHttpByteRange, sendFileContentHead } from './file-content-stream.js';
7
+ import { fileContentChunks, fileContentType, parseHttpByteRange, registerFileChunkParser, sendFileContentHead } from './file-content-stream.js';
8
8
  import { databaseError } from './domain-errors.js';
9
9
  import { protectedAdmin, validCsrf } from './session.js';
10
10
  import { sendError } from './http-errors.js';
@@ -45,6 +45,7 @@ const FILE_CONTENT_QUERY_SCHEMA = z
45
45
  const FILE_CONTENT_CHUNK_BYTES = 512 * 1024;
46
46
  export function registerHostedConversationRoutes(input) {
47
47
  const { app, database, templates, models, marAgentRuntimeModels, nodeControl, publicOrigin } = input;
48
+ registerFileChunkParser(app);
48
49
  app.get('/api/nodes/:nodeId/hosted-conversations/:conversationId/tool-resources/:resourceRef', async (request, reply) => {
49
50
  const actor = protectedAdmin(database, request, reply);
50
51
  if (actor === undefined)
@@ -519,13 +520,19 @@ export function registerHostedConversationRoutes(input) {
519
520
  (query.limit !== undefined && limit === undefined))
520
521
  throw new Error('HOSTED_CONVERSATION_INPUT_INVALID');
521
522
  await authorizeExistingConversation(input, actor, request.params);
522
- const data = hostedConversationFileReadInputSchema.parse({
523
+ const { bytes, size: _size, ...metadata } = await readHostedFileContentChunk({
524
+ nodeControl,
525
+ actor,
526
+ nodeId: request.params.nodeId,
523
527
  conversationId: request.params.conversationId,
524
528
  fileId: request.params.fileId,
525
529
  ...(offset === undefined ? {} : { offset }),
526
530
  ...(limit === undefined ? {} : { limit })
527
531
  });
528
- return reply.send(await requestHostedConversationNode(nodeControl, actor, request.params.nodeId, 'conversation.hosted.file.read', data));
532
+ return reply
533
+ .header('cache-control', 'private, no-store')
534
+ .type('application/octet-stream')
535
+ .send(Buffer.from(encodeFileRelayFrame({ type: 'file.read', ...metadata }, bytes)));
529
536
  }
530
537
  catch (error) {
531
538
  return databaseError(reply, error);
@@ -583,9 +590,12 @@ export function registerHostedConversationRoutes(input) {
583
590
  if (actor === undefined)
584
591
  return;
585
592
  try {
586
- const data = parseBodyWithPath(hostedConversationUploadChunkInputSchema, request.body, {
593
+ const query = parsePublic(z.strictObject({ offset: z.string() }), request.query);
594
+ const data = parsePublic(hostedConversationUploadChunkInputSchema, {
587
595
  conversationId: request.params.conversationId,
588
- uploadId: request.params.uploadId
596
+ uploadId: request.params.uploadId,
597
+ offset: parseBoundedInteger(query.offset, 0, Number.MAX_SAFE_INTEGER),
598
+ bytes: Buffer.isBuffer(request.body) ? request.body : undefined
589
599
  });
590
600
  await authorizeExistingConversation(input, actor, request.params);
591
601
  return reply.send(await requestHostedConversationNode(nodeControl, actor, request.params.nodeId, 'conversation.hosted.files.upload.chunk', data));
@@ -656,21 +666,18 @@ async function readHostedFileContentChunk(input) {
656
666
  if (!parsed.success ||
657
667
  parsed.data.file.id !== input.fileId ||
658
668
  parsed.data.file.conversationId !== input.conversationId ||
659
- parsed.data.offset !== input.offset)
669
+ parsed.data.offset !== (input.offset ?? 0))
660
670
  throw new Error('NODE_RESPONSE_INVALID');
661
- const contentLength = Buffer.from(parsed.data.content, 'base64').length;
662
- const nextOffset = input.offset + contentLength;
663
- if (contentLength > input.limit ||
671
+ const contentLength = parsed.data.bytes.byteLength;
672
+ const nextOffset = parsed.data.offset + contentLength;
673
+ if (contentLength > (input.limit ?? FILE_CONTENT_CHUNK_BYTES) ||
664
674
  nextOffset > parsed.data.file.size ||
665
- (parsed.data.eof
666
- ? parsed.data.nextOffset !== null || nextOffset !== parsed.data.file.size
667
- : parsed.data.nextOffset !== nextOffset))
675
+ parsed.data.eof !== (nextOffset === parsed.data.file.size) ||
676
+ parsed.data.nextOffset !== (parsed.data.eof ? null : nextOffset))
668
677
  throw new Error('NODE_RESPONSE_INVALID');
669
678
  return {
670
- file: parsed.data.file,
671
- size: parsed.data.file.size,
672
- offset: parsed.data.offset,
673
- contentBase64: parsed.data.content
679
+ ...parsed.data,
680
+ size: parsed.data.file.size
674
681
  };
675
682
  }
676
683
  function sameHostedFileProjection(left, right) {
@@ -1,9 +1,8 @@
1
1
  import { randomBytes } from 'node:crypto';
2
- import { Readable } from 'node:stream';
3
2
  import { isAllowedOrigin, parseCookies, SESSION_COOKIE_NAME } from './auth.js';
4
3
  import { protectedAdmin, validCsrf } from './session.js';
5
4
  import { sendError, safeErrorCode } from './http-errors.js';
6
- import { fileContentChunks, fileContentType, parseHttpByteRange, sendFileContentHead } from './file-content-stream.js';
5
+ import { openFileContentStream, fileContentType, parseHttpByteRange, readWorkspaceFileSnapshot, sendFileContentHead } from './file-content-stream.js';
7
6
  import { isSafeResourceText } from './workspace-http-support.js';
8
7
  import { SESSION_SHARE_COOKIE } from './session-share-routes.js';
9
8
  const GRANT_LIFETIME_MS = 30 * 60 * 1000;
@@ -163,7 +162,7 @@ export function registerHtmlPreviewRoutes(input) {
163
162
  const path = htmlPreviewResourcePath(grant.directory, request.params['*']);
164
163
  if (path === undefined)
165
164
  return sendError(reply, 400, 'FILE_RANGE_INVALID');
166
- const read = async (offset, limit) => {
165
+ const { size, read } = await readWorkspaceFileSnapshot(async (offset, limit) => {
167
166
  const current = await grantActor(grant);
168
167
  const response = (await nodeControl.requestNode(grant.nodeId, 'workspace.file.content.read', {
169
168
  workspaceId: grant.workspaceId,
@@ -175,17 +174,19 @@ export function registerHtmlPreviewRoutes(input) {
175
174
  if (response.previewBoundaryVerified !== true ||
176
175
  !Number.isSafeInteger(response.file?.size) ||
177
176
  !Number.isSafeInteger(response.file?.offset) ||
178
- typeof response.file?.contentBase64 !== 'string')
177
+ !(response.file?.bytes instanceof Uint8Array))
179
178
  throw new Error('NODE_RESPONSE_INVALID');
180
179
  return response.file;
181
- };
182
- const first = await read(0, 1);
183
- const range = parseHttpByteRange(request.headers.range, first.size);
180
+ });
181
+ const range = parseHttpByteRange(request.headers.range, size);
184
182
  if (range === null)
185
183
  return sendError(reply, 416, 'FILE_RANGE_INVALID');
186
184
  const start = range?.start ?? 0;
187
- const end = range?.end ?? first.size - 1;
188
- const length = first.size === 0 ? 0 : end - start + 1;
185
+ const end = range?.end ?? size - 1;
186
+ const length = size === 0 ? 0 : end - start + 1;
187
+ const stream = request.method === 'HEAD'
188
+ ? undefined
189
+ : await openFileContentStream(read, start, end, CHUNK_BYTES);
189
190
  const contentType = resourceContentType(path);
190
191
  reply
191
192
  .header('content-type', contentType)
@@ -198,13 +199,11 @@ export function registerHtmlPreviewRoutes(input) {
198
199
  reply.header('content-security-policy', "sandbox allow-scripts allow-same-origin; base-uri 'none'; worker-src 'none'; frame-src 'none'; object-src 'none'; form-action 'none'");
199
200
  else if (contentType === 'image/svg+xml')
200
201
  reply.header('content-security-policy', 'sandbox');
201
- if (range !== undefined && first.size > 0)
202
- reply.code(206).header('content-range', `bytes ${start}-${end}/${first.size}`);
203
- if (request.method === 'HEAD')
202
+ if (range !== undefined && size > 0)
203
+ reply.code(206).header('content-range', `bytes ${start}-${end}/${size}`);
204
+ if (stream === undefined)
204
205
  return sendFileContentHead(reply, length);
205
- return reply
206
- .header('content-length', String(length))
207
- .send(Readable.from(fileContentChunks(read, start, end, CHUNK_BYTES)));
206
+ return reply.header('content-length', String(length)).send(stream);
208
207
  }
209
208
  catch (error) {
210
209
  if (safeErrorCode(error) === 'UNAUTHENTICATED')
@@ -28,10 +28,13 @@ export declare function registerMarctlRoutes(input: MarctlSessionDependencies &
28
28
  readonly terminalId: string;
29
29
  readonly user: UserNodeAuthorization;
30
30
  readonly afterSequence?: number;
31
+ readonly computer?: boolean;
32
+ readonly cli?: boolean;
31
33
  }): {
32
34
  readonly ticket: string;
33
35
  };
34
- attachBrowserTerminal(socket: WebSocket, ticket: unknown, user: UserNodeAuthorization): void;
36
+ attachCliTerminal(socket: WebSocket, ticket: unknown, user: UserNodeAuthorization, expiresAt: number): void;
37
+ attachCliMux?(socket: WebSocket, nodeId: string, user: UserNodeAuthorization, expiresAt: number, authorize: () => Promise<UserNodeAuthorization | undefined>): void;
35
38
  closeTerminal(nodeId: string, terminalId: string): void;
36
39
  attachWorkbench(socket: WebSocket, user: UserNodeAuthorization): void;
37
40
  };
@@ -44,5 +47,10 @@ export declare function registerMarctlRoutes(input: MarctlSessionDependencies &
44
47
  };
45
48
  }>): void;
46
49
  attachLive(socket: WebSocket, request: FastifyRequest): void;
50
+ attachMux(socket: WebSocket, request: FastifyRequest<{
51
+ Querystring: {
52
+ node?: string;
53
+ };
54
+ }>): void;
47
55
  };
48
56
  export {};