@myagentroam/server 0.15.19 → 0.15.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@myagentroam/protocol/dist/browser-attachment.d.ts +9 -1
- package/node_modules/@myagentroam/protocol/dist/browser-attachment.js +1 -1
- package/node_modules/@myagentroam/protocol/dist/browser-files.d.ts +48 -79
- package/node_modules/@myagentroam/protocol/dist/browser-files.js +14 -27
- package/node_modules/@myagentroam/protocol/dist/browser-stream.d.ts +9 -0
- package/node_modules/@myagentroam/protocol/dist/browser-stream.js +79 -0
- package/node_modules/@myagentroam/protocol/dist/byte-frame.d.ts +1 -13
- package/node_modules/@myagentroam/protocol/dist/byte-frame.js +6 -44
- package/node_modules/@myagentroam/protocol/dist/direct-transfer.d.ts +97 -84
- package/node_modules/@myagentroam/protocol/dist/direct-transfer.js +10 -31
- package/node_modules/@myagentroam/protocol/dist/file-relay.d.ts +1 -1
- package/node_modules/@myagentroam/protocol/dist/file-relay.js +3 -20
- package/node_modules/@myagentroam/protocol/dist/file-upload-stream.d.ts +3 -0
- package/node_modules/@myagentroam/protocol/dist/file-upload-stream.js +29 -0
- package/node_modules/@myagentroam/protocol/dist/index.d.ts +118 -90
- package/node_modules/@myagentroam/protocol/dist/index.js +15 -16
- package/node_modules/@myagentroam/protocol/dist/node-connection.d.ts +27 -0
- package/node_modules/@myagentroam/protocol/dist/node-connection.js +108 -0
- package/node_modules/@myagentroam/protocol/dist/node-relay-path.d.ts +11 -0
- package/node_modules/@myagentroam/protocol/dist/node-relay-path.js +48 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-mux.d.ts +23 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-mux.js +123 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-path.d.ts +28 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-path.js +64 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-wire.d.ts +109 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream-wire.js +88 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream.d.ts +28 -0
- package/node_modules/@myagentroam/protocol/dist/node-stream.js +181 -0
- package/node_modules/@myagentroam/protocol/dist/scheduled-time.d.ts +2 -2
- package/node_modules/@myagentroam/protocol/dist/stream-record.d.ts +3 -0
- package/node_modules/@myagentroam/protocol/dist/stream-record.js +41 -0
- package/node_modules/@myagentroam/protocol/dist/terminal-direct.d.ts +0 -26
- package/node_modules/@myagentroam/protocol/dist/terminal-direct.js +0 -14
- package/node_modules/@myagentroam/protocol/dist/terminal-stream.d.ts +3 -0
- package/node_modules/@myagentroam/protocol/dist/terminal-stream.js +9 -0
- package/node_modules/@myagentroam/protocol/dist/workbench-notification.d.ts +6 -6
- package/node_modules/@myagentroam/protocol/package.json +46 -1
- package/node_modules/@myagentroam/server-core/dist/browser-attachment-coordinator.d.ts +6 -4
- package/node_modules/@myagentroam/server-core/dist/browser-attachment-coordinator.js +25 -16
- package/node_modules/@myagentroam/server-core/dist/direct-transfer-coordinator.js +4 -1
- package/node_modules/@myagentroam/server-core/dist/domain-errors.js +0 -2
- package/node_modules/@myagentroam/server-core/dist/file-content-stream.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/file-content-stream.js +5 -2
- package/node_modules/@myagentroam/server-core/dist/hosted-conversation-context.d.ts +5 -0
- package/node_modules/@myagentroam/server-core/dist/hosted-conversation-context.js +12 -5
- package/node_modules/@myagentroam/server-core/dist/hosted-conversation-routes.d.ts +21 -0
- package/node_modules/@myagentroam/server-core/dist/hosted-conversation-routes.js +89 -57
- package/node_modules/@myagentroam/server-core/dist/hosted-http-support.d.ts +2 -2
- package/node_modules/@myagentroam/server-core/dist/hosted-http-support.js +3 -3
- package/node_modules/@myagentroam/server-core/dist/marctl-routes.d.ts +0 -13
- package/node_modules/@myagentroam/server-core/dist/marctl-routes.js +1 -42
- package/node_modules/@myagentroam/server-core/dist/node-relay-channel.d.ts +32 -0
- package/node_modules/@myagentroam/server-core/dist/node-relay-channel.js +161 -0
- package/node_modules/@myagentroam/server-core/dist/node-stream-relay.d.ts +29 -0
- package/node_modules/@myagentroam/server-core/dist/node-stream-relay.js +179 -0
- package/node_modules/@myagentroam/server-core/dist/session-share-resource-routes.d.ts +6 -0
- package/node_modules/@myagentroam/server-core/dist/session-share-resource-routes.js +54 -51
- package/node_modules/@myagentroam/server-core/dist/session-share-routes.d.ts +5 -0
- package/node_modules/@myagentroam/server-core/dist/session-share-routes.js +1 -0
- package/node_modules/@myagentroam/server-core/dist/terminal-direct-coordinator.js +6 -1
- package/node_modules/@myagentroam/server-core/dist/terminal-relay-service.d.ts +9 -57
- package/node_modules/@myagentroam/server-core/dist/terminal-relay-service.js +86 -741
- package/node_modules/@myagentroam/server-core/dist/workbench-notification-service.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/workspace-route-contracts.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/workspace-routes.js +19 -53
- package/node_modules/@myagentroam/server-core/package.json +7 -7
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/node-control-factory.js +0 -3
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-application.js +13 -6
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.d.ts +35 -22
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.js +183 -48
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/browser-file-routes.d.ts +2 -3
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/browser-file-routes.js +64 -54
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/node-routes.js +32 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/realtime-routes.d.ts +8 -10
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/realtime-routes.js +84 -34
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/route/resource-grant-routes.js +4 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/browser-workbench-service.d.ts +46 -16
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/browser-workbench-service.js +125 -66
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/file-stream-tickets.d.ts +28 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/file-stream-tickets.js +86 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.d.ts +2 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.js +6 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-resource-scope-index.js +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/workspace-file-stream-tickets.d.ts +22 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/workspace-file-stream-tickets.js +44 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/package.json +5 -5
- package/web/assets/AuditManagementPage-Bjc6YoAT.js +1 -0
- package/web/assets/AuthEntryPanel-Deuw1Vwj.js +48 -0
- package/web/assets/{CodeFileEditor-Biq43lrU.js → CodeFileEditor-BMaCv2dZ.js} +3 -3
- package/web/assets/ConversationTemplateManagementPage--3rA8SWL.js +1 -0
- package/web/assets/ConversationTemplateManagementPage-CQxZji_s.js +1 -0
- package/web/assets/EnterpriseUserManagementPage-cW64iBEr.js +1 -0
- package/web/assets/EnvironmentSecretManager-BxzkGD7u.js +1 -0
- package/web/assets/{FilePreviewLoading-Ch9y7LW7.js → FilePreviewLoading-B8eBR7Vq.js} +20 -20
- package/web/assets/LicenseManagementPage-Do8Bi5kR.js +1 -0
- package/web/assets/{ManagementPagination-BeXXySit.js → ManagementPagination-DpTtKqz9.js} +1 -1
- package/web/assets/MarAgentModelManagementPage-CmJxBJz7.js +1 -0
- package/web/assets/MarAgentModelManagementPage-r_qi0oYa.js +1 -0
- package/web/assets/MarAlert-BTQ-GRjV.js +1 -0
- package/web/assets/MarCascader-XcmvWnMx.js +1 -0
- package/web/assets/MarCheckTag-BlGNNU-m.js +1 -0
- package/web/assets/{MarCheckboxGroup-BdfujprY.js → MarCheckboxGroup-D8YUshxd.js} +1 -1
- package/web/assets/MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DW6tWeNt.js +1 -0
- package/web/assets/MarDatePicker-DKx_t0eK.js +1 -0
- package/web/assets/MarDescriptionsItem-DFrd_opL.js +1 -0
- package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-BRFLf3Al.js → MarFormItem.vue_vue_type_script_setup_true_lang-Dj7aQp9R.js} +2 -2
- package/web/assets/MarInputNumber-CX2wQN1h.js +1 -0
- package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-CT4FTMrr.js +1 -0
- package/web/assets/MarSwitch-DbxZBrjJ.js +1 -0
- package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang-B9yim_e7.js +1 -0
- package/web/assets/MarTabs-EbO0yPPq.js +1 -0
- package/web/assets/{MarTag-DXLFCWjP.js → MarTag-JHdmr-g-.js} +1 -1
- package/web/assets/MarkdownFilePreview-Cn2ugv3b.js +2 -0
- package/web/assets/McpDetailsDialog-BGHHZqSz.js +1 -0
- package/web/assets/McpSourceManagementPage-CYbZyqEt.js +1 -0
- package/web/assets/{McpSourceManagementPage-qy_CVSf1.js → McpSourceManagementPage-y99BjkAa.js} +1 -1
- package/web/assets/NodeDetailsDialogs-DQpD-K80.js +1 -0
- package/web/assets/NodeManagementPage-BJQpnWUr.js +1 -0
- package/web/assets/NodeManagementPage-C4OC1oZu.js +1 -0
- package/web/assets/{OAuthManagementPage-Gh1A6lCl.js → OAuthManagementPage-DVj7F0_B.js} +1 -1
- package/web/assets/{OrganizationManagementPage-D2I3ytZL.js → OrganizationManagementPage-Dck4xWJC.js} +1 -1
- package/web/assets/RemoteDesktopPage-DU4o3UQ7.js +1 -0
- package/web/assets/ResourceManagementPanel-BNia9ers.js +2 -0
- package/web/assets/ResourceManagementPanel.vue_vue_type_script_setup_true_lang-1StFA2o7.js +1 -0
- package/web/assets/SecretManagementPage-2aIiLtIO.js +1 -0
- package/web/assets/SecretManagementPage-BoirQBul.js +1 -0
- package/web/assets/SecretManagementPage.vue_vue_type_script_setup_true_lang-BqIsbRme.js +1 -0
- package/web/assets/SessionSharePage-BAgQMi9G.css +1 -0
- package/web/assets/SessionSharePage-DsF4k62i.js +2 -0
- package/web/assets/SettingsContent-B55r5G17.js +1 -0
- package/web/assets/SettingsContent-C5BfeS9C.js +1 -0
- package/web/assets/SkillCenterPage-Cq0-o2og.js +1 -0
- package/web/assets/SkillCenterPage-DmBQ4QNQ.js +1 -0
- package/web/assets/SkillDetailsDialog-CvJHh-rz.js +1 -0
- package/web/assets/SkillSourceManagementPage-BFuzyTTW.js +1 -0
- package/web/assets/{SkillSourceManagementPage-RyZ_UYdL.js → SkillSourceManagementPage-yhLkNs3f.js} +1 -1
- package/web/assets/StandaloneFilePreviewPage-B112MwNb.js +1 -0
- package/web/assets/{StandaloneFilePreviewPage-BasO-FBI.css → StandaloneFilePreviewPage-CWD99_uM.css} +1 -1
- package/web/assets/{SystemConfigurationPage-Bj9UG6Zg.js → SystemConfigurationPage-Cc1EKqiN.js} +1 -1
- package/web/assets/SystemConfigurationPage-DLtTB2q9.js +1 -0
- package/web/assets/SystemInformationPage-xn67kl1L.js +1 -0
- package/web/assets/{TerminalTabView-c7gutdQp.css → TerminalTabView-BtJOS9p6.css} +1 -1
- package/web/assets/TerminalTabView-DkABlrY-.js +23 -0
- package/web/assets/{WorkbenchPage-DObPaT6u.css → WorkbenchPage-BLqtJjyz.css} +1 -1
- package/web/assets/WorkbenchPage-lR7qzb51.js +22 -0
- package/web/assets/WorkspaceManagementPage-CAjG0pan.js +1 -0
- package/web/assets/WorkspaceManagementPage-ChMpGNO2.js +1 -0
- package/web/assets/abnfDiagram-VCTEODGH-C0Z3FwtB.js +1 -0
- package/web/assets/{arc-CK-ONk0C.js → arc-Csy2UQwy.js} +1 -1
- package/web/assets/architectureDiagram-5GKGNRK7-Dnk_OhFF.js +36 -0
- package/web/assets/{blockDiagram-OSKFZWR5-DGc4MhC0.js → blockDiagram-OSKFZWR5-Cm9uFwdh.js} +2 -2
- package/web/assets/{c4Diagram-7LVT6UL2-BJpnauYr.js → c4Diagram-7LVT6UL2-CM7DpBBX.js} +2 -2
- package/web/assets/{catalog-ownership-service-D04gS8t6.js → catalog-ownership-service-CJWUwVuW.js} +1 -1
- package/web/assets/{catalog-page-service-DPifi3zJ.js → catalog-page-service-CMb0qOZu.js} +1 -1
- package/web/assets/channel-BYNe9FMi.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-C3OhoHu_.js → chunk-2Q5K7J3B-oZFG8ip7.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-MfM6b4rt.js → chunk-5VM5RSS4-Es4EV1bU.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-CGg9DlMm.js → chunk-F27PBJKO-DHopcSY7.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-Ca5rYJbN.js → chunk-HLEWEB6X-k6ucFqRC.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-BgYtrpz5.js → chunk-JWPE2WC7-BKgwJr1w.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-Bt3DSu4m.js → chunk-POPQ4Y6H-3hBp_sqn.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-DR9gyaXO.js → chunk-SVP7TREG-Ch8rSXZR.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DBN6aYMH.js → chunk-XXDRQBXY-eDDRKJX1.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-ucQ-qEvM.js → chunk-ZLD2IHE6-DxksvfsI.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-BJ0OYlzp.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-BJ0OYlzp.js +1 -0
- package/web/assets/{conversation-history-C0BoyARA.js → conversation-history-BwLC3JIc.js} +3 -3
- package/web/assets/cose-bilkent-JH36ORCC-BUS4aa-w.js +1 -0
- package/web/assets/{cynefin-OW5HDTMX-i5wSbPgu.js → cynefin-OW5HDTMX-y03gf09k.js} +1 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-BU96Ng2a.js +62 -0
- package/web/assets/{dagre-OS7QT2EB-B7SOgcnr.js → dagre-OS7QT2EB-D6XuRnML.js} +2 -2
- package/web/assets/{diagram-S7CK7UJ4-DUOptZ1j.js → diagram-S7CK7UJ4-DqeKCQMP.js} +2 -2
- package/web/assets/diagram-UQ7AKVKN-DJuv2RGo.js +41 -0
- package/web/assets/{diagram-VSXAHHWV-DOczUl6I.js → diagram-VSXAHHWV-B6KilbBk.js} +2 -2
- package/web/assets/diagram-VX7I27RA-CdNOgJbp.js +24 -0
- package/web/assets/diagram-Z3DM3KII-bqSRK9VK.js +24 -0
- package/web/assets/ebnfDiagram-PWID7BFC-BQ2nb3ll.js +1 -0
- package/web/assets/{enterprise-management-service-gK89bZ-s.js → enterprise-management-service-BVzoS0AM.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-GH6DLmp8.js → erDiagram-2YWLMYGG-BIDyX8D8.js} +2 -2
- package/web/assets/{error-presentation-DAkuiyjV.js → error-presentation-B277erBt.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-BQGoK_F-.js → flowDiagram-T62WH6J4-H68a0Ny6.js} +1 -1
- package/web/assets/ganttDiagram-EL5Y4UJY-CBtpMCKw.js +292 -0
- package/web/assets/gitGraphDiagram-WWUBYQGX-C3y5sZDO.js +106 -0
- package/web/assets/{hosted-conversation-template-client-BMt6RlQK.js → hosted-conversation-template-client-DWWL_49C.js} +1 -1
- package/web/assets/index--mpMQ_lp.js +1 -0
- package/web/assets/{index-fAoH6m68.js → index-B-8kbxyW.js} +1 -1
- package/web/assets/index-BCq15IiW.js +1 -0
- package/web/assets/index-BEZsWm7m.js +13 -0
- package/web/assets/index-BFb9zFVO.js +1 -0
- package/web/assets/index-BL_oJ1VT.js +1 -0
- package/web/assets/index-BWqnRyxj.js +1 -0
- package/web/assets/index-BYcujL0J.js +1 -0
- package/web/assets/{index-HwlPyvAN.js → index-B_xEB3L3.js} +1 -1
- package/web/assets/index-BxlqTkVy.js +1 -0
- package/web/assets/index-CJnNdw1f.js +1 -0
- package/web/assets/index-CXdML0D-.js +1 -0
- package/web/assets/index-CsZYCyNk.js +1 -0
- package/web/assets/{index-CJvbH34j.js → index-CxNkVDr0.js} +1 -1
- package/web/assets/index-D5m5l7UR.js +1 -0
- package/web/assets/{index-DOCdIFvk.js → index-D9S7HfMO.js} +2 -2
- package/web/assets/{index-QuinyiDA.js → index-DAVAGMPy.js} +17 -17
- package/web/assets/index-DE-kveYu.js +7 -0
- package/web/assets/{index-Di-HOZeA.js → index-DQ2mj4DW.js} +2 -2
- package/web/assets/index-DanTYQ1w.js +3 -0
- package/web/assets/index-DjscVhrN.js +1 -0
- package/web/assets/index-Dsm2mM67.js +1 -0
- package/web/assets/{index-63z_1Kwj.js → index-W4F8OnWh.js} +1 -1
- package/web/assets/index-Xj9Uh-bZ.js +1 -0
- package/web/assets/index-gl3WI4B4.js +1 -0
- package/web/assets/index-jhzMdz77.js +1 -0
- package/web/assets/{index-Tb8Kp3Am.js → index-uUj8HJiN.js} +1 -1
- package/web/assets/infoDiagram-FKFFQAWI-8ioQN87p.js +2 -0
- package/web/assets/{ishikawaDiagram-5VMMS53U-CtnY7mn6.js → ishikawaDiagram-5VMMS53U-DT5y3a3F.js} +6 -6
- package/web/assets/{journeyDiagram-EYS64GPL-7VHy3OIr.js → journeyDiagram-EYS64GPL-yU47LoTX.js} +2 -2
- package/web/assets/{kanban-definition-UXKFOSKX-tWtYS2m_.js → kanban-definition-UXKFOSKX-BX9mKpH8.js} +2 -2
- package/web/assets/{layout-Nwhbb_Hn.js → layout-JjUOAUKM.js} +1 -1
- package/web/assets/{linear-BqelaKqY.js → linear-BqqbJk60.js} +1 -1
- package/web/assets/{management-url-service-DWU3Ky5q.js → management-url-service-DDqHMEhD.js} +1 -1
- package/web/assets/{mar-agent-reasoning-effort-Bqv05n1w.js → mar-agent-reasoning-effort-CS7pHVC_.js} +1 -1
- package/web/assets/mcp-center-service-BNbf7Ect.js +1 -0
- package/web/assets/{mermaid.core-C2d4bg4t.js → mermaid.core-B8e1fL5p.js} +5 -5
- package/web/assets/{mindmap-definition-THT77NOG-BgfDeG0j.js → mindmap-definition-THT77NOG-WsM6E2kp.js} +2 -2
- package/web/assets/{mobile-dialog-return-service-06dxVUU2.js → mobile-dialog-return-service-Bp_DVLxH.js} +1 -1
- package/web/assets/{oauth-callback-CyUN4NNR.js → oauth-callback-DkeO66oB.js} +1 -1
- package/web/assets/pegDiagram-XKGWAZYB-DQbefdlt.js +1 -0
- package/web/assets/{pieDiagram-E7YTZNPT-BsX7C0GM.js → pieDiagram-E7YTZNPT-UZZI2SA3.js} +2 -2
- package/web/assets/{quadrantDiagram-AXDQQJYC-eMNjgZPQ.js → quadrantDiagram-AXDQQJYC-CpWvTo9m.js} +2 -2
- package/web/assets/railroadDiagram-O6MQD6OU-CAdKS6xY.js +1 -0
- package/web/assets/{requirementDiagram-IS5BZ75X-TQxhLLpn.js → requirementDiagram-IS5BZ75X-19XbLAjS.js} +2 -2
- package/web/assets/{runner-presentation-DviF1EV2.js → runner-presentation-DQXve2s1.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-k9zlEF-3.js → sankeyDiagram-P5KCCOFB-Bw9fRahZ.js} +2 -2
- package/web/assets/scoped-http-service-D6aruAyi.js +8 -0
- package/web/assets/{sequenceDiagram-WJ2MYXX4-CXruvjeU.js → sequenceDiagram-WJ2MYXX4-CdKAJNPQ.js} +2 -2
- package/web/assets/session-share-client-service-CX7oNUOi.js +1 -0
- package/web/assets/sizeCapture-INFHLROL-D9sbY6Ob.js +1 -0
- package/web/assets/stateDiagram-XQSTLZYL-BxN8QQqu.js +1 -0
- package/web/assets/stateDiagram-v2-IH3M54BS-B4wZRNT0.js +1 -0
- package/web/assets/swimlanes-V6O3JKXN-DJ5xArk5.js +1 -0
- package/web/assets/swimlanesDiagram-JKAHXJPX-xzE-QCiW.js +8 -0
- package/web/assets/{time-presentation-BaDrsnqm.js → time-presentation-aL5loVOG.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-DIvSPE2W.js → timeline-definition-24CTP7MA-BBJltrcu.js} +2 -2
- package/web/assets/{vennDiagram-4TSXK5OY-CKuw3nc1.js → vennDiagram-4TSXK5OY-DCZ1DJTd.js} +2 -2
- package/web/assets/{wardleyDiagram-VM6X3IG4-DGksmpnR.js → wardleyDiagram-VM6X3IG4-BKUcAqGh.js} +2 -2
- package/web/assets/workbench-live-service-BxJrOyt1.js +1 -0
- package/web/assets/workbench-presentation-CkpTHEQ3.js +1 -0
- package/web/assets/workspace-direct-transfer-service-BKOFlO3H.js +2 -0
- package/web/assets/{xychartDiagram-S5SC5T6Z-DpbP6RRv.js → xychartDiagram-S5SC5T6Z-8GdWsW37.js} +2 -2
- package/web/docs/404.html +2 -2
- package/web/docs/administration/account.html +3 -3
- package/web/docs/administration/audit.html +3 -3
- package/web/docs/administration/conversation-templates.html +3 -3
- package/web/docs/administration/email-notifications.html +3 -3
- package/web/docs/administration/license.html +3 -3
- package/web/docs/administration/nodes-workspaces.html +3 -3
- package/web/docs/administration/oauth.html +3 -3
- package/web/docs/administration/secrets.html +3 -3
- package/web/docs/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/administration/users-organizations.html +3 -3
- package/web/docs/assets/{app.DM2pSvd2.js → app.LeCCQxS3.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.DHE7CFXR.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.CsnhQrCA.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.dGlMoPIu.js → VPLocalSearchBox.943egAU7.js} +1 -1
- package/web/docs/assets/chunks/{theme.Dgxbag_a.js → theme.DYsEn1tY.js} +2 -2
- package/web/docs/assets/{en-US_runners_mar-agent.md.D_MTQUV1.js → en-US_runners_mar-agent.md.xWuHvNeY.js} +3 -3
- package/web/docs/assets/{en-US_runners_mar-agent.md.D_MTQUV1.lean.js → en-US_runners_mar-agent.md.xWuHvNeY.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_composer.md.CIcMQe3p.js +1 -0
- package/web/docs/assets/{en-US_workbench_composer.md.BA6sq_wv.lean.js → en-US_workbench_composer.md.CIcMQe3p.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_conversation.md.DMMozhK8.js +1 -0
- package/web/docs/assets/{en-US_workbench_conversation.md.DT3KAAzA.lean.js → en-US_workbench_conversation.md.DMMozhK8.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_sessions.md.8oarREp4.js +1 -0
- package/web/docs/assets/{runners_mar-agent.md.N-bXx1_t.js → runners_mar-agent.md.M6wXxi-P.js} +2 -2
- package/web/docs/assets/workbench_composer.md.N3B6_9xG.js +1 -0
- package/web/docs/assets/{workbench_composer.md.C7NF8XH6.lean.js → workbench_composer.md.N3B6_9xG.lean.js} +1 -1
- package/web/docs/assets/workbench_conversation.md.TxvHEEtP.js +1 -0
- package/web/docs/assets/{workbench_conversation.md.DUb0SYvh.lean.js → workbench_conversation.md.TxvHEEtP.lean.js} +1 -1
- package/web/docs/assets/workbench_sessions.md.CjZEXlJ9.js +1 -0
- package/web/docs/concepts/architecture.html +3 -3
- package/web/docs/concepts/data-and-security.html +3 -3
- package/web/docs/concepts/files-git-terminal.html +3 -3
- package/web/docs/concepts/node-and-workspace.html +3 -3
- package/web/docs/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/concepts/runner-control.html +3 -3
- package/web/docs/concepts/secrets.html +3 -3
- package/web/docs/concepts/session-run-turn.html +3 -3
- package/web/docs/deployment/backup-restore.html +3 -3
- package/web/docs/deployment/network.html +3 -3
- package/web/docs/deployment/node-installation.html +3 -3
- package/web/docs/deployment/node-linux.html +3 -3
- package/web/docs/deployment/node-macos.html +3 -3
- package/web/docs/deployment/node-windows.html +3 -3
- package/web/docs/deployment/production.html +3 -3
- package/web/docs/deployment/security-checklist.html +3 -3
- package/web/docs/deployment/upgrade.html +3 -3
- package/web/docs/en-US/administration/account.html +3 -3
- package/web/docs/en-US/administration/audit.html +3 -3
- package/web/docs/en-US/administration/conversation-templates.html +3 -3
- package/web/docs/en-US/administration/email-notifications.html +3 -3
- package/web/docs/en-US/administration/license.html +3 -3
- package/web/docs/en-US/administration/nodes-workspaces.html +3 -3
- package/web/docs/en-US/administration/oauth.html +3 -3
- package/web/docs/en-US/administration/secrets.html +3 -3
- package/web/docs/en-US/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/en-US/administration/users-organizations.html +3 -3
- package/web/docs/en-US/concepts/architecture.html +3 -3
- package/web/docs/en-US/concepts/data-and-security.html +3 -3
- package/web/docs/en-US/concepts/files-git-terminal.html +3 -3
- package/web/docs/en-US/concepts/node-and-workspace.html +3 -3
- package/web/docs/en-US/concepts/permissions-and-sharing.html +3 -3
- package/web/docs/en-US/concepts/runner-control.html +3 -3
- package/web/docs/en-US/concepts/secrets.html +3 -3
- package/web/docs/en-US/concepts/session-run-turn.html +3 -3
- package/web/docs/en-US/deployment/backup-restore.html +3 -3
- package/web/docs/en-US/deployment/network.html +3 -3
- package/web/docs/en-US/deployment/node-installation.html +3 -3
- package/web/docs/en-US/deployment/node-linux.html +3 -3
- package/web/docs/en-US/deployment/node-macos.html +3 -3
- package/web/docs/en-US/deployment/node-windows.html +3 -3
- package/web/docs/en-US/deployment/production.html +3 -3
- package/web/docs/en-US/deployment/security-checklist.html +3 -3
- package/web/docs/en-US/deployment/upgrade.html +3 -3
- package/web/docs/en-US/getting-started/connect-node.html +3 -3
- package/web/docs/en-US/getting-started/first-agent-session.html +3 -3
- package/web/docs/en-US/getting-started/first-login.html +3 -3
- package/web/docs/en-US/getting-started/next-steps.html +3 -3
- package/web/docs/en-US/getting-started/npm-quick-start.html +3 -3
- package/web/docs/en-US/getting-started/overview.html +3 -3
- package/web/docs/en-US/getting-started/prerequisites.html +3 -3
- package/web/docs/en-US/getting-started/register-workspace.html +3 -3
- package/web/docs/en-US/getting-started/server-installation.html +3 -3
- package/web/docs/en-US/operations/marctl.html +3 -3
- package/web/docs/en-US/reference/configuration.html +3 -3
- package/web/docs/en-US/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/en-US/reference/limits.html +3 -3
- package/web/docs/en-US/reference/ports-paths-data.html +3 -3
- package/web/docs/en-US/reference/status-and-errors.html +3 -3
- package/web/docs/en-US/runners/claude-code.html +3 -3
- package/web/docs/en-US/runners/codex.html +3 -3
- package/web/docs/en-US/runners/mar-agent.html +6 -6
- package/web/docs/en-US/runners/opencode.html +3 -3
- package/web/docs/en-US/runners/overview.html +3 -3
- package/web/docs/en-US/runners/runner-troubleshooting.html +3 -3
- package/web/docs/en-US/troubleshooting/node-offline.html +3 -3
- package/web/docs/en-US/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/en-US/troubleshooting/session-run.html +3 -3
- package/web/docs/en-US/troubleshooting/terminal.html +3 -3
- package/web/docs/en-US/troubleshooting/workspace-files.html +3 -3
- package/web/docs/en-US/workbench/browser.html +3 -3
- package/web/docs/en-US/workbench/composer.html +5 -5
- package/web/docs/en-US/workbench/context-and-plan.html +3 -3
- package/web/docs/en-US/workbench/conversation.html +5 -5
- package/web/docs/en-US/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/en-US/workbench/files.html +3 -3
- package/web/docs/en-US/workbench/git-changes.html +3 -3
- package/web/docs/en-US/workbench/git-history.html +3 -3
- package/web/docs/en-US/workbench/hosted-conversations.html +3 -3
- package/web/docs/en-US/workbench/mobile.html +3 -3
- package/web/docs/en-US/workbench/navigation.html +3 -3
- package/web/docs/en-US/workbench/remote-desktop.html +3 -3
- package/web/docs/en-US/workbench/sessions.html +5 -5
- package/web/docs/en-US/workbench/skills.html +3 -3
- package/web/docs/en-US/workbench/terminal.html +3 -3
- package/web/docs/getting-started/connect-node.html +3 -3
- package/web/docs/getting-started/first-agent-session.html +3 -3
- package/web/docs/getting-started/first-login.html +3 -3
- package/web/docs/getting-started/next-steps.html +3 -3
- package/web/docs/getting-started/npm-quick-start.html +3 -3
- package/web/docs/getting-started/overview.html +3 -3
- package/web/docs/getting-started/prerequisites.html +3 -3
- package/web/docs/getting-started/register-workspace.html +3 -3
- package/web/docs/getting-started/server-installation.html +3 -3
- package/web/docs/hashmap.json +1 -1
- package/web/docs/operations/marctl.html +3 -3
- package/web/docs/reference/configuration.html +3 -3
- package/web/docs/reference/keyboard-shortcuts.html +3 -3
- package/web/docs/reference/limits.html +3 -3
- package/web/docs/reference/ports-paths-data.html +3 -3
- package/web/docs/reference/status-and-errors.html +3 -3
- package/web/docs/runners/claude-code.html +3 -3
- package/web/docs/runners/codex.html +3 -3
- package/web/docs/runners/mar-agent.html +6 -6
- package/web/docs/runners/opencode.html +3 -3
- package/web/docs/runners/overview.html +3 -3
- package/web/docs/runners/runner-troubleshooting.html +3 -3
- package/web/docs/troubleshooting/node-offline.html +3 -3
- package/web/docs/troubleshooting/quick-diagnosis.html +3 -3
- package/web/docs/troubleshooting/session-run.html +3 -3
- package/web/docs/troubleshooting/terminal.html +3 -3
- package/web/docs/troubleshooting/workspace-files.html +3 -3
- package/web/docs/workbench/browser.html +3 -3
- package/web/docs/workbench/composer.html +5 -5
- package/web/docs/workbench/context-and-plan.html +3 -3
- package/web/docs/workbench/conversation.html +5 -5
- package/web/docs/workbench/file-reference-and-attachment.html +3 -3
- package/web/docs/workbench/files.html +3 -3
- package/web/docs/workbench/git-changes.html +3 -3
- package/web/docs/workbench/git-history.html +3 -3
- package/web/docs/workbench/hosted-conversations.html +3 -3
- package/web/docs/workbench/mobile.html +3 -3
- package/web/docs/workbench/navigation.html +3 -3
- package/web/docs/workbench/remote-desktop.html +3 -3
- package/web/docs/workbench/sessions.html +5 -5
- package/web/docs/workbench/skills.html +3 -3
- package/web/docs/workbench/terminal.html +3 -3
- package/web/index.html +2 -2
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/browser-relay-pair.d.ts +0 -19
- package/node_modules/@myagentroam/server-core/dist/browser-relay-pair.js +0 -70
- package/node_modules/@myagentroam/server-core/dist/browser-relay-service.d.ts +0 -15
- package/node_modules/@myagentroam/server-core/dist/browser-relay-service.js +0 -75
- package/node_modules/@myagentroam/server-core/dist/terminal-multiplex.d.ts +0 -30
- package/node_modules/@myagentroam/server-core/dist/terminal-multiplex.js +0 -106
- package/web/assets/AuditManagementPage-BQajqZN8.js +0 -1
- package/web/assets/AuthEntryPanel-DrPztL8G.js +0 -48
- package/web/assets/ConversationTemplateManagementPage-BEwi0Dgz.js +0 -1
- package/web/assets/ConversationTemplateManagementPage-BSLzq95E.js +0 -1
- package/web/assets/EnterpriseUserManagementPage-CLeV2cJq.js +0 -1
- package/web/assets/EnvironmentSecretManager-Cn0PPZVj.js +0 -1
- package/web/assets/LicenseManagementPage-DLKoFZlv.js +0 -1
- package/web/assets/MarAgentModelManagementPage-DIeCmECU.js +0 -1
- package/web/assets/MarAgentModelManagementPage-UsN9PLYm.js +0 -1
- package/web/assets/MarAlert-BQ2yxZGt.js +0 -1
- package/web/assets/MarCascader-BJbhsoT5.js +0 -1
- package/web/assets/MarCheckTag-eX5HZB2p.js +0 -1
- package/web/assets/MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-BXe5y-vj.js +0 -1
- package/web/assets/MarDatePicker-fMFLq82k.js +0 -1
- package/web/assets/MarDescriptionsItem-Cykd6wS6.js +0 -1
- package/web/assets/MarInputNumber-DF6wYGzK.js +0 -1
- package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-FSIHGFNu.js +0 -1
- package/web/assets/MarSwitch-B8_46Bg2.js +0 -1
- package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang--D1SBHCl.js +0 -1
- package/web/assets/MarTabs-cuFm6sr9.js +0 -1
- package/web/assets/MarkdownFilePreview-DIv7t1QW.js +0 -2
- package/web/assets/McpDetailsDialog-ChwW2eWM.js +0 -1
- package/web/assets/McpSourceManagementPage-DoF8_qrL.js +0 -1
- package/web/assets/NodeDetailsDialogs-DOT-v8R1.js +0 -1
- package/web/assets/NodeManagementPage-B5XBkToL.js +0 -1
- package/web/assets/NodeManagementPage-D2fGzKIA.js +0 -1
- package/web/assets/RemoteDesktopPage-DeWYRlzd.js +0 -1
- package/web/assets/ResourceManagementPanel-mAfjJ3ew.js +0 -2
- package/web/assets/ResourceManagementPanel.vue_vue_type_script_setup_true_lang-FcnQFEBP.js +0 -1
- package/web/assets/SecretManagementPage-BOT5-rMW.js +0 -1
- package/web/assets/SecretManagementPage-_yXq1Jfo.js +0 -1
- package/web/assets/SecretManagementPage.vue_vue_type_script_setup_true_lang-CcRlAokx.js +0 -1
- package/web/assets/SessionSharePage-BX-nfMIN.css +0 -1
- package/web/assets/SessionSharePage-D5bahehr.js +0 -2
- package/web/assets/SettingsContent-B6ZZI5K6.js +0 -1
- package/web/assets/SettingsContent-CZVnY4wX.js +0 -1
- package/web/assets/SkillCenterPage-D4nh21Lg.js +0 -1
- package/web/assets/SkillCenterPage-DaBFx9Yg.js +0 -1
- package/web/assets/SkillDetailsDialog-DH-XxooT.js +0 -1
- package/web/assets/SkillSourceManagementPage-V_6GggP-.js +0 -1
- package/web/assets/StandaloneFilePreviewPage-C-e7y0IK.js +0 -1
- package/web/assets/SystemConfigurationPage-DCGPVxT0.js +0 -1
- package/web/assets/SystemInformationPage-BMVE6pPs.js +0 -1
- package/web/assets/TerminalTabView-D1k0vRkm.js +0 -23
- package/web/assets/WorkbenchPage-BoeX6c_o.js +0 -22
- package/web/assets/WorkspaceManagementPage-CTo_UsKw.js +0 -1
- package/web/assets/WorkspaceManagementPage-DC0cgDtm.js +0 -1
- package/web/assets/abnfDiagram-VCTEODGH-C0Jf34wE.js +0 -1
- package/web/assets/architectureDiagram-5GKGNRK7-B0I1BIJA.js +0 -36
- package/web/assets/channel-Dh2L6_KG.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-kL97N93Z.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-kL97N93Z.js +0 -1
- package/web/assets/cose-bilkent-JH36ORCC-CkVLvS-H.js +0 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-CizXY2Rw.js +0 -62
- package/web/assets/diagram-UQ7AKVKN-BtF3O0qQ.js +0 -41
- package/web/assets/diagram-VX7I27RA-CqtIUsoJ.js +0 -24
- package/web/assets/diagram-Z3DM3KII-BOEofTkR.js +0 -24
- package/web/assets/ebnfDiagram-PWID7BFC-uVhZyRBk.js +0 -1
- package/web/assets/ganttDiagram-EL5Y4UJY-CZh4I2zn.js +0 -292
- package/web/assets/gitGraphDiagram-WWUBYQGX-Z2RtG6Hs.js +0 -106
- package/web/assets/index-30vxTSHS.js +0 -1
- package/web/assets/index-B-JozOlU.js +0 -1
- package/web/assets/index-B06emA9L.js +0 -1
- package/web/assets/index-BFooUMAn.js +0 -1
- package/web/assets/index-C48w3vqG.js +0 -1
- package/web/assets/index-C6JRjDbm.js +0 -1
- package/web/assets/index-CAnnNANg.js +0 -1
- package/web/assets/index-CU61vvyV.js +0 -1
- package/web/assets/index-CcFSK2G8.js +0 -1
- package/web/assets/index-CyJiXE5p.js +0 -1
- package/web/assets/index-D0zzcPau.js +0 -1
- package/web/assets/index-DHlTc8DU.js +0 -1
- package/web/assets/index-DRaERFyy.js +0 -1
- package/web/assets/index-DpG1MmO9.js +0 -1
- package/web/assets/index-DyGaoCcO.js +0 -7
- package/web/assets/index-DymWdTGl.js +0 -13
- package/web/assets/index-DzYK9Ozq.js +0 -3
- package/web/assets/index-EhQqSPoP.js +0 -1
- package/web/assets/index-dxj1L0uh.js +0 -1
- package/web/assets/infoDiagram-FKFFQAWI-D1KUTqlM.js +0 -2
- package/web/assets/mcp-center-service-CQLk4ZZt.js +0 -1
- package/web/assets/pegDiagram-XKGWAZYB-BQjeH14l.js +0 -1
- package/web/assets/railroadDiagram-O6MQD6OU-CtsgwJ07.js +0 -1
- package/web/assets/scoped-http-service-C68PTDTs.js +0 -8
- package/web/assets/session-share-client-service-CaHe13do.js +0 -1
- package/web/assets/sizeCapture-INFHLROL-Dr4jo-H2.js +0 -1
- package/web/assets/stateDiagram-XQSTLZYL-B9EPUWQ2.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-B3dePmpF.js +0 -1
- package/web/assets/swimlanes-V6O3JKXN-8R8J2LfZ.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BSyhe5EU.js +0 -8
- package/web/assets/workbench-live-service-DKvHvQ3m.js +0 -1
- package/web/assets/workbench-presentation-t7t2Q2wo.js +0 -1
- package/web/assets/workspace-direct-transfer-service-BnGIUGfJ.js +0 -2
- package/web/docs/assets/chunks/@localSearchIndexen-US.BDxgPzzn.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.DFMOXh00.js +0 -1
- package/web/docs/assets/en-US_workbench_composer.md.BA6sq_wv.js +0 -1
- package/web/docs/assets/en-US_workbench_conversation.md.DT3KAAzA.js +0 -1
- package/web/docs/assets/en-US_workbench_sessions.md.BBixLc38.js +0 -1
- package/web/docs/assets/workbench_composer.md.C7NF8XH6.js +0 -1
- package/web/docs/assets/workbench_conversation.md.DUb0SYvh.js +0 -1
- package/web/docs/assets/workbench_sessions.md.CucNalue.js +0 -1
- /package/web/docs/assets/{en-US_workbench_sessions.md.BBixLc38.lean.js → en-US_workbench_sessions.md.8oarREp4.lean.js} +0 -0
- /package/web/docs/assets/{runners_mar-agent.md.N-bXx1_t.lean.js → runners_mar-agent.md.M6wXxi-P.lean.js} +0 -0
- /package/web/docs/assets/{workbench_sessions.md.CucNalue.lean.js → workbench_sessions.md.CjZEXlJ9.lean.js} +0 -0
|
@@ -136,7 +136,10 @@ export class DirectTransferCoordinator {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
auditUpload(session, eventType, errorCode) {
|
|
139
|
-
|
|
139
|
+
// When the task owns a staging ID, its complete/cancel RPC owns outcome audit.
|
|
140
|
+
if (session.purpose !== 'TRANSFER' ||
|
|
141
|
+
session.transfer.direction !== 'UPLOAD' ||
|
|
142
|
+
session.transfer.uploadId !== undefined)
|
|
140
143
|
return;
|
|
141
144
|
emitAudit(this.options.audits ?? {}, {
|
|
142
145
|
eventType,
|
|
@@ -106,8 +106,6 @@ export function domainErrorStatus(code) {
|
|
|
106
106
|
code === 'HOSTED_CONVERSATION_ROLLBACK_TARGET_INVALID' ||
|
|
107
107
|
code === 'HOSTED_CONVERSATION_FILE_CONFLICT' ||
|
|
108
108
|
code === 'HOSTED_CONVERSATION_UPLOAD_STATE_INVALID' ||
|
|
109
|
-
code === 'HOSTED_CONVERSATION_UPLOAD_OFFSET_INVALID' ||
|
|
110
|
-
code === 'HOSTED_CONVERSATION_UPLOAD_SIZE_INVALID' ||
|
|
111
109
|
code === 'HOSTED_CONVERSATION_UPLOAD_INCOMPLETE' ||
|
|
112
110
|
code === 'CODEX_CREDENTIAL_SCOPE_CONFLICT' ||
|
|
113
111
|
code === 'MAIL_TEMPLATE_REVISION_CONFLICT' ||
|
|
@@ -19,7 +19,6 @@ export declare function sendWorkspaceFileContent(input: {
|
|
|
19
19
|
method: string;
|
|
20
20
|
range: string | undefined;
|
|
21
21
|
path: string;
|
|
22
|
-
download: boolean;
|
|
23
22
|
read: FileContentReader;
|
|
24
23
|
}): Promise<FastifyReply>;
|
|
25
24
|
export declare function sendFileContentHead(reply: FastifyReply, length: number): FastifyReply;
|
|
@@ -31,4 +30,5 @@ export declare function parseHttpByteRange(value: string | undefined, size: numb
|
|
|
31
30
|
readonly end: number;
|
|
32
31
|
} | undefined | null;
|
|
33
32
|
export declare function fileContentType(path: string): string;
|
|
33
|
+
export declare function isNativeFilePreviewType(contentType: string): boolean;
|
|
34
34
|
export {};
|
|
@@ -37,14 +37,14 @@ export async function sendWorkspaceFileContent(input) {
|
|
|
37
37
|
const filename = input.path.split('/').at(-1) ?? 'file';
|
|
38
38
|
const contentType = fileContentType(filename);
|
|
39
39
|
const media = contentType.startsWith('audio/') || contentType.startsWith('video/');
|
|
40
|
-
if (!
|
|
40
|
+
if (!media && range === undefined && length > 20 * 1024 * 1024)
|
|
41
41
|
return sendError(reply, 413, 'FILE_PREVIEW_TOO_LARGE');
|
|
42
42
|
const stream = input.method === 'HEAD' ? undefined : await openFileContentStream(read, start, end);
|
|
43
43
|
reply
|
|
44
44
|
.header('accept-ranges', 'bytes')
|
|
45
45
|
.header('cache-control', 'private, no-store')
|
|
46
46
|
.header('content-type', contentType)
|
|
47
|
-
.header('content-disposition',
|
|
47
|
+
.header('content-disposition', `inline; filename*=UTF-8''${encodeURIComponent(filename)}`)
|
|
48
48
|
.header('x-content-type-options', 'nosniff');
|
|
49
49
|
if (contentType === 'image/svg+xml')
|
|
50
50
|
reply.header('content-security-policy', 'sandbox');
|
|
@@ -139,3 +139,6 @@ export function fileContentType(path) {
|
|
|
139
139
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
140
140
|
}[extension] ?? 'application/octet-stream');
|
|
141
141
|
}
|
|
142
|
+
export function isNativeFilePreviewType(contentType) {
|
|
143
|
+
return /^(?:image|audio|video)\//u.test(contentType);
|
|
144
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type HostedConversationSnapshot, type MarAgentRuntimeModelConfiguration } from '@myagentroam/protocol';
|
|
2
2
|
import type { CurrentUserSession } from './session.js';
|
|
3
|
+
import type { UserNodeAuthorization } from './node-access-contracts.js';
|
|
3
4
|
import type { HostedNodeControl } from './hosted-contracts.js';
|
|
4
5
|
import type { ConversationTemplateService } from './conversation-template-service.js';
|
|
5
6
|
import type { MarAgentModelService } from './mar-agent-model-service.js';
|
|
@@ -17,6 +18,10 @@ interface ExistingConversationAuthorization {
|
|
|
17
18
|
readonly runtime: Awaited<ReturnType<typeof hostedRuntimeModels>>;
|
|
18
19
|
readonly workspaceId?: string;
|
|
19
20
|
}
|
|
21
|
+
export declare function hostedConversationOwnerSnapshot(nodeControl: Pick<HostedNodeControl, 'requestHostedConversationNode'>, actor: UserNodeAuthorization, identifiers: {
|
|
22
|
+
readonly nodeId: string;
|
|
23
|
+
readonly conversationId: string;
|
|
24
|
+
}): Promise<HostedConversationSnapshot>;
|
|
20
25
|
export declare function authorizeExistingConversation(input: HostedConversationContextDependencies, actor: CurrentUserSession, identifiers: {
|
|
21
26
|
readonly nodeId: string;
|
|
22
27
|
readonly conversationId: string;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { hostedConversationIdInputSchema, hostedConversationSnapshotSchema } from '@myagentroam/protocol';
|
|
2
2
|
import { assertLegacyModelCompatibility } from './run-model-payload.js';
|
|
3
3
|
import { requestHostedConversationNode } from './hosted-http-support.js';
|
|
4
|
+
export async function hostedConversationOwnerSnapshot(nodeControl, actor, identifiers) {
|
|
5
|
+
const conversation = hostedConversationIdInputSchema.parse({
|
|
6
|
+
conversationId: identifiers.conversationId
|
|
7
|
+
});
|
|
8
|
+
const probe = hostedConversationSnapshotSchema.parse(await requestHostedConversationNode(nodeControl, actor, identifiers.nodeId, 'conversation.hosted.get', {
|
|
9
|
+
...conversation,
|
|
10
|
+
__marAgentModels: []
|
|
11
|
+
}));
|
|
12
|
+
assertHostedSnapshotIdentity(probe, identifiers);
|
|
13
|
+
return probe;
|
|
14
|
+
}
|
|
4
15
|
export async function authorizeExistingConversation(input, actor, identifiers) {
|
|
5
16
|
const conversation = hostedConversationIdInputSchema.parse({
|
|
6
17
|
conversationId: identifiers.conversationId
|
|
@@ -11,11 +22,7 @@ export async function authorizeExistingConversation(input, actor, identifiers) {
|
|
|
11
22
|
const searchProjection = input.searchBackendAvailable === undefined
|
|
12
23
|
? {}
|
|
13
24
|
: { searchBackendAvailable: input.searchBackendAvailable() };
|
|
14
|
-
const probe =
|
|
15
|
-
...conversation,
|
|
16
|
-
__marAgentModels: []
|
|
17
|
-
}));
|
|
18
|
-
assertHostedSnapshotIdentity(probe, identifiers);
|
|
25
|
+
const probe = await hostedConversationOwnerSnapshot(input.nodeControl, actor, identifiers);
|
|
19
26
|
if (input.marAgentRuntimeModels === undefined) {
|
|
20
27
|
template = await input.templates.assertCanUse(actor.userId, probe.conversation.templateId);
|
|
21
28
|
runtime = await hostedRuntimeModels({
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import type { FastifyInstance } from 'fastify';
|
|
2
|
+
import { type HostedConversationFileStreamInput } from '@myagentroam/protocol';
|
|
2
3
|
import type { SessionLookup } from './session.js';
|
|
3
4
|
import type { HostedNodeControl } from './hosted-contracts.js';
|
|
4
5
|
import type { ConversationTemplateService } from './conversation-template-service.js';
|
|
5
6
|
import type { MarAgentModelService } from './mar-agent-model-service.js';
|
|
6
7
|
import type { MarAgentRuntimeModelService } from './mar-agent-runtime-model-service.js';
|
|
8
|
+
import type { UserNodeAuthorization } from './node-access-contracts.js';
|
|
9
|
+
/** Checks the Hosted resource that permits a template-only browser to establish a carrier. */
|
|
10
|
+
export declare function authorizeHostedRelayTarget(input: Pick<HostedRouteDependencies, 'templates' | 'nodeControl'>, actor: UserNodeAuthorization, target: {
|
|
11
|
+
readonly nodeId: string;
|
|
12
|
+
readonly conversationId: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
export type HostedFileStreamTicket = {
|
|
15
|
+
readonly nodeId: string;
|
|
16
|
+
readonly user: UserNodeAuthorization;
|
|
17
|
+
readonly templateId: string;
|
|
18
|
+
readonly allowed: () => Promise<boolean>;
|
|
19
|
+
} & ({
|
|
20
|
+
readonly kind: 'hosted-file-upload';
|
|
21
|
+
readonly conversationId: string;
|
|
22
|
+
readonly uploadId: string;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: 'hosted-file-download';
|
|
25
|
+
readonly descriptor: HostedConversationFileStreamInput;
|
|
26
|
+
});
|
|
7
27
|
interface HostedRouteDependencies {
|
|
8
28
|
readonly searchBackendAvailable?: () => boolean;
|
|
9
29
|
readonly app: FastifyInstance;
|
|
@@ -12,6 +32,7 @@ interface HostedRouteDependencies {
|
|
|
12
32
|
readonly models: MarAgentModelService;
|
|
13
33
|
readonly marAgentRuntimeModels?: MarAgentRuntimeModelService;
|
|
14
34
|
readonly nodeControl: HostedNodeControl;
|
|
35
|
+
readonly issueFileStreamTicket?: (input: HostedFileStreamTicket) => Promise<string>;
|
|
15
36
|
readonly publicOrigin: string | undefined;
|
|
16
37
|
}
|
|
17
38
|
export declare function registerHostedConversationRoutes(input: HostedRouteDependencies): void;
|
|
@@ -1,16 +1,24 @@
|
|
|
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 {
|
|
4
|
+
import { conversationFileProjectionSchema, toolResultResourceInputSchema, toolResultResourcePageSchema, hostedConversationConfigUpdateInputSchema, hostedConversationTemplateSwitchInputSchema, hostedConversationTemplateSwitchResultSchema, hostedConversationCreateInputSchema, hostedConversationDeleteResultSchema, hostedConversationDirectoryPageSchema, hostedConversationFileDeleteInputSchema, hostedConversationFileDeleteResultSchema, hostedConversationFileReadInputSchema, hostedConversationFileReadResultSchema, hostedConversationFileStreamInputSchema, hostedConversationFileTargetInputSchema, hostedConversationHistoryInputSchema, hostedConversationHistoryPageSchema, hostedConversationIdInputSchema, hostedConversationImageReadInputSchema, hostedConversationListInputSchema, hostedConversationListPageSchema, hostedConversationMessageInputSchema, hostedConversationMetadataUpdateInputSchema, hostedConversationModelOptionsSchema, hostedConversationRollbackInputSchema, hostedConversationSnapshotSchema, hostedConversationUnwatchInputSchema, 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,
|
|
7
|
+
import { fileContentChunks, fileContentType, parseHttpByteRange, 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';
|
|
11
11
|
import { parseBoundedInteger } from './workspace-http-support.js';
|
|
12
12
|
import { requestHostedConversationNode } from './hosted-http-support.js';
|
|
13
|
-
import { authorizeExistingConversation, assertHostedSnapshotIdentity, hostedRuntimeModels, hostedRuntimePayload } from './hosted-conversation-context.js';
|
|
13
|
+
import { authorizeExistingConversation, assertHostedSnapshotIdentity, hostedConversationOwnerSnapshot, hostedRuntimeModels, hostedRuntimePayload } from './hosted-conversation-context.js';
|
|
14
|
+
/** Checks the Hosted resource that permits a template-only browser to establish a carrier. */
|
|
15
|
+
export async function authorizeHostedRelayTarget(input, actor, target) {
|
|
16
|
+
const { conversation } = await hostedConversationOwnerSnapshot(input.nodeControl, actor, target);
|
|
17
|
+
const template = await input.templates.assertCanUse(actor.userId, conversation.templateId);
|
|
18
|
+
if (template.id !== conversation.templateId || template.nodeId !== target.nodeId)
|
|
19
|
+
throw new Error('CONVERSATION_TEMPLATE_NOT_AUTHORIZED');
|
|
20
|
+
return template.id;
|
|
21
|
+
}
|
|
14
22
|
const EMPTY_BODY_SCHEMA = z.object({}).strict();
|
|
15
23
|
const LIST_QUERY_SCHEMA = z
|
|
16
24
|
.object({
|
|
@@ -18,12 +26,6 @@ const LIST_QUERY_SCHEMA = z
|
|
|
18
26
|
cursor: z.string().optional()
|
|
19
27
|
})
|
|
20
28
|
.strict();
|
|
21
|
-
const FILE_QUERY_SCHEMA = z
|
|
22
|
-
.object({
|
|
23
|
-
offset: z.string().optional(),
|
|
24
|
-
limit: z.string().optional()
|
|
25
|
-
})
|
|
26
|
-
.strict();
|
|
27
29
|
const HISTORY_QUERY_SCHEMA = z
|
|
28
30
|
.object({
|
|
29
31
|
limit: z.string().optional(),
|
|
@@ -32,7 +34,6 @@ const HISTORY_QUERY_SCHEMA = z
|
|
|
32
34
|
.strict();
|
|
33
35
|
const FILE_CONTENT_QUERY_SCHEMA = z
|
|
34
36
|
.object({
|
|
35
|
-
download: z.literal('1').optional(),
|
|
36
37
|
maxWidth: z.string().optional(),
|
|
37
38
|
maxHeight: z.string().optional(),
|
|
38
39
|
originalGif: z.literal('1').optional(),
|
|
@@ -45,7 +46,6 @@ const FILE_CONTENT_QUERY_SCHEMA = z
|
|
|
45
46
|
const FILE_CONTENT_CHUNK_BYTES = 512 * 1024;
|
|
46
47
|
export function registerHostedConversationRoutes(input) {
|
|
47
48
|
const { app, database, templates, models, marAgentRuntimeModels, nodeControl, publicOrigin } = input;
|
|
48
|
-
registerFileChunkParser(app);
|
|
49
49
|
app.get('/api/nodes/:nodeId/hosted-conversations/:conversationId/tool-resources/:resourceRef', async (request, reply) => {
|
|
50
50
|
const actor = protectedAdmin(database, request, reply);
|
|
51
51
|
if (actor === undefined)
|
|
@@ -426,9 +426,9 @@ export function registerHostedConversationRoutes(input) {
|
|
|
426
426
|
return;
|
|
427
427
|
try {
|
|
428
428
|
const preview = parseImagePreviewQuery(request.query);
|
|
429
|
-
if (!preview.success
|
|
429
|
+
if (!preview.success)
|
|
430
430
|
return sendError(reply, 400, 'RUN_IMAGE_INVALID');
|
|
431
|
-
|
|
431
|
+
parsePublic(FILE_CONTENT_QUERY_SCHEMA, request.query);
|
|
432
432
|
await authorizeExistingConversation(input, actor, request.params);
|
|
433
433
|
if (preview.data !== undefined) {
|
|
434
434
|
const result = (await requestHostedConversationNode(nodeControl, actor, request.params.nodeId, 'conversation.hosted.file.read', {
|
|
@@ -448,6 +448,10 @@ export function registerHostedConversationRoutes(input) {
|
|
|
448
448
|
offset: 0,
|
|
449
449
|
limit: 1
|
|
450
450
|
});
|
|
451
|
+
const contentType = fileContentType(first.file.relativePath);
|
|
452
|
+
// Only native image and player previews use HTTP bodies; original-file transfers use NodeConnection.
|
|
453
|
+
if (!/^(image|audio|video)\//u.test(contentType))
|
|
454
|
+
return sendError(reply, 415, 'FILE_PREVIEW_UNSUPPORTED');
|
|
451
455
|
const range = parseHttpByteRange(request.headers.range, first.size);
|
|
452
456
|
if (range === null)
|
|
453
457
|
return sendError(reply, 416, 'FILE_RANGE_INVALID');
|
|
@@ -468,13 +472,11 @@ export function registerHostedConversationRoutes(input) {
|
|
|
468
472
|
if (!sameHostedFileProjection(first.file, firstContent.file))
|
|
469
473
|
throw new Error('NODE_RESPONSE_INVALID');
|
|
470
474
|
}
|
|
471
|
-
const contentType = fileContentType(first.file.relativePath);
|
|
472
|
-
const disposition = query.download === '1' ? 'attachment' : 'inline';
|
|
473
475
|
reply
|
|
474
476
|
.header('accept-ranges', 'bytes')
|
|
475
477
|
.header('cache-control', 'private, no-store')
|
|
476
478
|
.header('content-type', contentType)
|
|
477
|
-
.header('content-disposition',
|
|
479
|
+
.header('content-disposition', `inline; filename*=UTF-8''${encodeURIComponent(first.file.displayName)}`)
|
|
478
480
|
.header('x-content-type-options', 'nosniff');
|
|
479
481
|
if (contentType === 'image/svg+xml')
|
|
480
482
|
reply.header('content-security-policy', 'sandbox');
|
|
@@ -506,33 +508,21 @@ export function registerHostedConversationRoutes(input) {
|
|
|
506
508
|
return databaseError(reply, error);
|
|
507
509
|
}
|
|
508
510
|
});
|
|
509
|
-
app.get('/api/nodes/:nodeId/hosted-conversations/:conversationId/files/:fileId', async (request, reply) => {
|
|
511
|
+
app.get('/api/nodes/:nodeId/hosted-conversations/:conversationId/files/:fileId/metadata', async (request, reply) => {
|
|
510
512
|
const actor = protectedAdmin(database, request, reply);
|
|
511
513
|
if (actor === undefined)
|
|
512
514
|
return;
|
|
513
515
|
try {
|
|
514
|
-
const
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
if ((query.offset !== undefined && offset === undefined) ||
|
|
520
|
-
(query.limit !== undefined && limit === undefined))
|
|
521
|
-
throw new Error('HOSTED_CONVERSATION_INPUT_INVALID');
|
|
522
|
-
await authorizeExistingConversation(input, actor, request.params);
|
|
523
|
-
const { bytes, size: _size, ...metadata } = await readHostedFileContentChunk({
|
|
524
|
-
nodeControl,
|
|
525
|
-
actor,
|
|
526
|
-
nodeId: request.params.nodeId,
|
|
527
|
-
conversationId: request.params.conversationId,
|
|
528
|
-
fileId: request.params.fileId,
|
|
529
|
-
...(offset === undefined ? {} : { offset }),
|
|
530
|
-
...(limit === undefined ? {} : { limit })
|
|
516
|
+
const { nodeId, conversationId, fileId } = request.params;
|
|
517
|
+
const target = hostedConversationFileTargetInputSchema.parse({ conversationId, fileId });
|
|
518
|
+
const templateId = await authorizeHostedRelayTarget(input, actor, {
|
|
519
|
+
nodeId,
|
|
520
|
+
conversationId
|
|
531
521
|
});
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
522
|
+
const file = conversationFileProjectionSchema.parse(await requestHostedConversationNode(nodeControl, actor, nodeId, 'conversation.hosted.file.describe', { ...target, __sourceTemplateId: templateId }));
|
|
523
|
+
if (file.id !== fileId || file.conversationId !== conversationId)
|
|
524
|
+
throw new Error('NODE_RESPONSE_INVALID');
|
|
525
|
+
return reply.header('cache-control', 'private, no-store').send(file);
|
|
536
526
|
}
|
|
537
527
|
catch (error) {
|
|
538
528
|
return databaseError(reply, error);
|
|
@@ -585,25 +575,67 @@ export function registerHostedConversationRoutes(input) {
|
|
|
585
575
|
return databaseError(reply, error);
|
|
586
576
|
}
|
|
587
577
|
});
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
uploadId
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
578
|
+
const issueFileStreamTicket = input.issueFileStreamTicket;
|
|
579
|
+
if (issueFileStreamTicket !== undefined) {
|
|
580
|
+
app.post('/api/nodes/:nodeId/hosted-conversations/:conversationId/uploads/:uploadId/stream-ticket', async (request, reply) => {
|
|
581
|
+
const actor = writableActor(database, request, reply, publicOrigin);
|
|
582
|
+
if (actor === undefined)
|
|
583
|
+
return;
|
|
584
|
+
try {
|
|
585
|
+
const { nodeId } = request.params;
|
|
586
|
+
const { conversationId, uploadId } = hostedConversationUploadControlInputSchema.parse({
|
|
587
|
+
conversationId: request.params.conversationId,
|
|
588
|
+
uploadId: request.params.uploadId
|
|
589
|
+
});
|
|
590
|
+
const user = { userId: actor.userId, sessionHash: actor.sessionHash };
|
|
591
|
+
const templateId = await authorizeHostedRelayTarget(input, user, {
|
|
592
|
+
nodeId,
|
|
593
|
+
conversationId
|
|
594
|
+
});
|
|
595
|
+
return reply.send({
|
|
596
|
+
ticket: await issueFileStreamTicket({
|
|
597
|
+
kind: 'hosted-file-upload',
|
|
598
|
+
nodeId,
|
|
599
|
+
user,
|
|
600
|
+
conversationId,
|
|
601
|
+
uploadId,
|
|
602
|
+
templateId,
|
|
603
|
+
allowed: async () => (await input.templates.assertCanUse(user.userId, templateId)).nodeId === nodeId
|
|
604
|
+
})
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
catch (error) {
|
|
608
|
+
return databaseError(reply, error);
|
|
609
|
+
}
|
|
610
|
+
});
|
|
611
|
+
app.post('/api/nodes/:nodeId/hosted-conversations/:conversationId/files/:fileId/stream-ticket', async (request, reply) => {
|
|
612
|
+
const actor = writableActor(database, request, reply, publicOrigin);
|
|
613
|
+
if (actor === undefined)
|
|
614
|
+
return;
|
|
615
|
+
try {
|
|
616
|
+
const { nodeId, conversationId, fileId } = request.params;
|
|
617
|
+
const descriptor = parseBodyWithPath(hostedConversationFileStreamInputSchema, request.body, { conversationId, fileId });
|
|
618
|
+
const user = { userId: actor.userId, sessionHash: actor.sessionHash };
|
|
619
|
+
const templateId = await authorizeHostedRelayTarget(input, user, {
|
|
620
|
+
nodeId,
|
|
621
|
+
conversationId
|
|
622
|
+
});
|
|
623
|
+
return reply.send({
|
|
624
|
+
ticket: await issueFileStreamTicket({
|
|
625
|
+
kind: 'hosted-file-download',
|
|
626
|
+
nodeId,
|
|
627
|
+
user,
|
|
628
|
+
templateId,
|
|
629
|
+
descriptor,
|
|
630
|
+
allowed: async () => (await templates.assertCanUse(user.userId, templateId)).nodeId === nodeId
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
catch (error) {
|
|
635
|
+
return databaseError(reply, error);
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
}
|
|
607
639
|
app.get('/api/nodes/:nodeId/hosted-conversations/:conversationId/uploads/:uploadId', async (request, reply) => {
|
|
608
640
|
const actor = protectedAdmin(database, request, reply);
|
|
609
641
|
if (actor === undefined)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { UserNodeAuthorization } from './node-access-contracts.js';
|
|
2
2
|
import type { HostedNodeControl } from './hosted-contracts.js';
|
|
3
|
-
export declare function requestHostedConversationNode(nodeControl: Pick<HostedNodeControl, 'requestHostedConversationNode'>,
|
|
3
|
+
export declare function requestHostedConversationNode(nodeControl: Pick<HostedNodeControl, 'requestHostedConversationNode'>, actor: UserNodeAuthorization, nodeId: string, operation: string, data: unknown, timeoutMs?: number): Promise<unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function requestHostedConversationNode(nodeControl,
|
|
1
|
+
export function requestHostedConversationNode(nodeControl, actor, nodeId, operation, data, timeoutMs) {
|
|
2
2
|
return nodeControl.requestHostedConversationNode(nodeId, operation, data, {
|
|
3
|
-
userId:
|
|
4
|
-
sessionHash:
|
|
3
|
+
userId: actor.userId,
|
|
4
|
+
sessionHash: actor.sessionHash
|
|
5
5
|
}, timeoutMs);
|
|
6
6
|
}
|
|
@@ -33,24 +33,11 @@ export declare function registerMarctlRoutes(input: MarctlSessionDependencies &
|
|
|
33
33
|
}): {
|
|
34
34
|
readonly ticket: string;
|
|
35
35
|
};
|
|
36
|
-
attachCliTerminal(socket: WebSocket, ticket: unknown, user: UserNodeAuthorization, expiresAt: number): void;
|
|
37
|
-
attachCliMux?(socket: WebSocket, nodeId: string, user: UserNodeAuthorization, expiresAt: number): void;
|
|
38
36
|
closeTerminal(nodeId: string, terminalId: string): void;
|
|
39
37
|
attachWorkbench(socket: WebSocket, user: UserNodeAuthorization): void;
|
|
40
38
|
};
|
|
41
39
|
readonly onError?: (reply: FastifyReply, error: unknown) => FastifyReply;
|
|
42
40
|
}): {
|
|
43
|
-
attach(socket: WebSocket, request: FastifyRequest<{
|
|
44
|
-
Querystring: {
|
|
45
|
-
ticket?: string;
|
|
46
|
-
deferred?: string;
|
|
47
|
-
};
|
|
48
|
-
}>): void;
|
|
49
41
|
attachLive(socket: WebSocket, request: FastifyRequest): void;
|
|
50
|
-
attachMux(socket: WebSocket, request: FastifyRequest<{
|
|
51
|
-
Querystring: {
|
|
52
|
-
node?: string;
|
|
53
|
-
};
|
|
54
|
-
}>): void;
|
|
55
42
|
};
|
|
56
43
|
export {};
|
|
@@ -123,7 +123,7 @@ export function registerMarctlRoutes(input) {
|
|
|
123
123
|
const capabilities = await nodeControl.requestNode(request.params.nodeId, 'node.workbench.capabilities', {}, user);
|
|
124
124
|
if (capabilities === null || typeof capabilities !== 'object')
|
|
125
125
|
return reply.send(capabilities);
|
|
126
|
-
return reply.send(
|
|
126
|
+
return reply.send(capabilities);
|
|
127
127
|
}
|
|
128
128
|
catch (error) {
|
|
129
129
|
return onError(reply, error);
|
|
@@ -227,30 +227,6 @@ export function registerMarctlRoutes(input) {
|
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
229
|
return {
|
|
230
|
-
attachMux(socket, request) {
|
|
231
|
-
const nodeId = request.query.node;
|
|
232
|
-
if (!validOrigin(request) ||
|
|
233
|
-
typeof nodeId !== 'string' ||
|
|
234
|
-
!nodeId ||
|
|
235
|
-
nodeId.length > 128 ||
|
|
236
|
-
nodeControl.attachCliMux === undefined) {
|
|
237
|
-
socket.close(1008, 'TERMINAL_MUX_INVALID');
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
const header = request.headers.authorization;
|
|
241
|
-
socket.pause();
|
|
242
|
-
void userCredentials
|
|
243
|
-
.authenticateContext(header)
|
|
244
|
-
.then(async (context) => {
|
|
245
|
-
if (context === undefined || !(await authorizedNode(context.user, nodeId))) {
|
|
246
|
-
socket.close(1008, 'UNAUTHENTICATED');
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
nodeControl.attachCliMux?.(socket, nodeId, context.user, context.expiresAt);
|
|
250
|
-
})
|
|
251
|
-
.catch(() => socket.close(1011, 'USER_AUTHORIZATION_UNAVAILABLE'))
|
|
252
|
-
.finally(() => socket.resume());
|
|
253
|
-
},
|
|
254
230
|
attachLive(socket, request) {
|
|
255
231
|
if (!validOrigin(request)) {
|
|
256
232
|
socket.close(1008, 'ORIGIN_NOT_ALLOWED');
|
|
@@ -274,23 +250,6 @@ export function registerMarctlRoutes(input) {
|
|
|
274
250
|
})
|
|
275
251
|
.catch(() => socket.close(1011, 'USER_AUTHORIZATION_UNAVAILABLE'))
|
|
276
252
|
.finally(() => socket.resume());
|
|
277
|
-
},
|
|
278
|
-
attach(socket, request) {
|
|
279
|
-
if (!validOrigin(request)) {
|
|
280
|
-
socket.close(1008, 'ORIGIN_NOT_ALLOWED');
|
|
281
|
-
return;
|
|
282
|
-
}
|
|
283
|
-
void userCredentials
|
|
284
|
-
.authenticateContext(request.headers.authorization)
|
|
285
|
-
.then((context) => {
|
|
286
|
-
if (context === undefined)
|
|
287
|
-
socket.close(1008, 'UNAUTHENTICATED');
|
|
288
|
-
else
|
|
289
|
-
nodeControl.attachCliTerminal(socket, request.query.deferred === '1'
|
|
290
|
-
? { ticket: request.query.ticket, deferred: true }
|
|
291
|
-
: request.query.ticket, context.user, context.expiresAt);
|
|
292
|
-
})
|
|
293
|
-
.catch(() => socket.close(1011, 'USER_AUTHORIZATION_UNAVAILABLE'));
|
|
294
253
|
}
|
|
295
254
|
};
|
|
296
255
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WebSocket } from 'ws';
|
|
2
|
+
export type { NodeStreamAdmission } from './node-stream-relay.js';
|
|
3
|
+
import { type NodeRelayHandshake } from '@myagentroam/protocol/node-stream-wire';
|
|
4
|
+
import { type NodeStreamAuthorizer } from './node-stream-relay.js';
|
|
5
|
+
type NodeAuth = Extract<NodeRelayHandshake, {
|
|
6
|
+
type: 'RELAY_AUTH';
|
|
7
|
+
}>;
|
|
8
|
+
type Options = {
|
|
9
|
+
/** Authenticate, then return a synchronous check of the captured control connection. */
|
|
10
|
+
admitNode(auth: NodeAuth): Promise<(() => boolean) | undefined>;
|
|
11
|
+
maxStreams: {
|
|
12
|
+
perClient: number;
|
|
13
|
+
perNode: number;
|
|
14
|
+
};
|
|
15
|
+
maxBufferedBytes: number;
|
|
16
|
+
traffic?: {
|
|
17
|
+
record(direction: 'in' | 'out', bytes: number): void;
|
|
18
|
+
backpressure(bufferedBytes: number): void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
/** Owns relay carrier admission and shutdown; NodeStreamRelay owns mappings, not sockets. */
|
|
22
|
+
export declare class NodeRelayChannel {
|
|
23
|
+
#private;
|
|
24
|
+
private readonly options;
|
|
25
|
+
constructor(options: Options);
|
|
26
|
+
attachNode(socket: WebSocket): void;
|
|
27
|
+
/** The route must bind this socket and authorizer to the authenticated user and target. */
|
|
28
|
+
attachClient(socket: WebSocket, nodeId: string, authorize: NodeStreamAuthorizer): void;
|
|
29
|
+
disconnectNode(nodeId: string): void;
|
|
30
|
+
close(): void;
|
|
31
|
+
drainAuthentications(): Promise<void>;
|
|
32
|
+
}
|