@myagentroam/server 0.15.20 → 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-CnjJpn8n.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-OzdyIhrT.js → FilePreviewLoading-B8eBR7Vq.js} +20 -20
- package/web/assets/LicenseManagementPage-Do8Bi5kR.js +1 -0
- package/web/assets/{ManagementPagination-B0oPypEL.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-CE5NVWCc.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-BeahYbi2.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-H7GRZ5pc.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-DV-yOFvw.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-BATLRDRY.js → OAuthManagementPage-DVj7F0_B.js} +1 -1
- package/web/assets/{OrganizationManagementPage-BzT8wuPD.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-D7b0fJ3D.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-8Jjuk11W.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-Dog_3KmJ.js → arc-Csy2UQwy.js} +1 -1
- package/web/assets/architectureDiagram-5GKGNRK7-Dnk_OhFF.js +36 -0
- package/web/assets/{blockDiagram-OSKFZWR5-ClnQ_K5W.js → blockDiagram-OSKFZWR5-Cm9uFwdh.js} +2 -2
- package/web/assets/{c4Diagram-7LVT6UL2-CBrw0euZ.js → c4Diagram-7LVT6UL2-CM7DpBBX.js} +2 -2
- package/web/assets/{catalog-ownership-service-BxADZxPd.js → catalog-ownership-service-CJWUwVuW.js} +1 -1
- package/web/assets/{catalog-page-service-BLRFbIDS.js → catalog-page-service-CMb0qOZu.js} +1 -1
- package/web/assets/channel-BYNe9FMi.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-Da8KTDzr.js → chunk-2Q5K7J3B-oZFG8ip7.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-D-wJHR6M.js → chunk-5VM5RSS4-Es4EV1bU.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-8NR-zAd5.js → chunk-F27PBJKO-DHopcSY7.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-D0iOGiad.js → chunk-HLEWEB6X-k6ucFqRC.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-fyvzeH_Y.js → chunk-JWPE2WC7-BKgwJr1w.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-B89-WsDI.js → chunk-POPQ4Y6H-3hBp_sqn.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-3alXvd3K.js → chunk-SVP7TREG-Ch8rSXZR.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DothZC5b.js → chunk-XXDRQBXY-eDDRKJX1.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-BZnNnqEe.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-xvAWh8bC.js → conversation-history-BwLC3JIc.js} +3 -3
- package/web/assets/cose-bilkent-JH36ORCC-BUS4aa-w.js +1 -0
- package/web/assets/{cynefin-OW5HDTMX-TOvK2Jss.js → cynefin-OW5HDTMX-y03gf09k.js} +1 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-BU96Ng2a.js +62 -0
- package/web/assets/{dagre-OS7QT2EB-CPseMkJo.js → dagre-OS7QT2EB-D6XuRnML.js} +2 -2
- package/web/assets/{diagram-S7CK7UJ4-DW38J6C5.js → diagram-S7CK7UJ4-DqeKCQMP.js} +2 -2
- package/web/assets/diagram-UQ7AKVKN-DJuv2RGo.js +41 -0
- package/web/assets/{diagram-VSXAHHWV-HGsy_hiK.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-BMkDzN0o.js → enterprise-management-service-BVzoS0AM.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-BCo4UDVw.js → erDiagram-2YWLMYGG-BIDyX8D8.js} +2 -2
- package/web/assets/{error-presentation-DSjhXnWF.js → error-presentation-B277erBt.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-D-u6u1Ux.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-DhTXOvfW.js → hosted-conversation-template-client-DWWL_49C.js} +1 -1
- package/web/assets/index--mpMQ_lp.js +1 -0
- package/web/assets/{index-Bg3W984R.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-BImqULw-.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-CiNWWUYp.js → index-CxNkVDr0.js} +1 -1
- package/web/assets/index-D5m5l7UR.js +1 -0
- package/web/assets/{index-9sfxE_w1.js → index-D9S7HfMO.js} +2 -2
- package/web/assets/{index-CYFJ0B6M.js → index-DAVAGMPy.js} +17 -17
- package/web/assets/index-DE-kveYu.js +7 -0
- package/web/assets/{index-DyLYTvJ_.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-C8xomugm.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-B9tzhpWD.js → index-uUj8HJiN.js} +1 -1
- package/web/assets/infoDiagram-FKFFQAWI-8ioQN87p.js +2 -0
- package/web/assets/{ishikawaDiagram-5VMMS53U-BPtW8t36.js → ishikawaDiagram-5VMMS53U-DT5y3a3F.js} +6 -6
- package/web/assets/{journeyDiagram-EYS64GPL-CLQcm7jU.js → journeyDiagram-EYS64GPL-yU47LoTX.js} +2 -2
- package/web/assets/{kanban-definition-UXKFOSKX-ByHVysiZ.js → kanban-definition-UXKFOSKX-BX9mKpH8.js} +2 -2
- package/web/assets/{layout-7jEjCcst.js → layout-JjUOAUKM.js} +1 -1
- package/web/assets/{linear-BKPIMNCl.js → linear-BqqbJk60.js} +1 -1
- package/web/assets/{management-url-service-B7U4rtzW.js → management-url-service-DDqHMEhD.js} +1 -1
- package/web/assets/{mar-agent-reasoning-effort-BHAr7gO8.js → mar-agent-reasoning-effort-CS7pHVC_.js} +1 -1
- package/web/assets/mcp-center-service-BNbf7Ect.js +1 -0
- package/web/assets/{mermaid.core-Ct-yf2jz.js → mermaid.core-B8e1fL5p.js} +5 -5
- package/web/assets/{mindmap-definition-THT77NOG-CBNPG1rn.js → mindmap-definition-THT77NOG-WsM6E2kp.js} +2 -2
- package/web/assets/{mobile-dialog-return-service-8H0QudXS.js → mobile-dialog-return-service-Bp_DVLxH.js} +1 -1
- package/web/assets/{oauth-callback-BgdzH3EO.js → oauth-callback-DkeO66oB.js} +1 -1
- package/web/assets/pegDiagram-XKGWAZYB-DQbefdlt.js +1 -0
- package/web/assets/{pieDiagram-E7YTZNPT-fThuOmLa.js → pieDiagram-E7YTZNPT-UZZI2SA3.js} +2 -2
- package/web/assets/{quadrantDiagram-AXDQQJYC-BPKj00AS.js → quadrantDiagram-AXDQQJYC-CpWvTo9m.js} +2 -2
- package/web/assets/railroadDiagram-O6MQD6OU-CAdKS6xY.js +1 -0
- package/web/assets/{requirementDiagram-IS5BZ75X-CEwZYUmW.js → requirementDiagram-IS5BZ75X-19XbLAjS.js} +2 -2
- package/web/assets/{runner-presentation-C8w-VY81.js → runner-presentation-DQXve2s1.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-CET0FAHM.js → sankeyDiagram-P5KCCOFB-Bw9fRahZ.js} +2 -2
- package/web/assets/scoped-http-service-D6aruAyi.js +8 -0
- package/web/assets/{sequenceDiagram-WJ2MYXX4-B2ILNZNM.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-aDd1Sf-W.js → time-presentation-aL5loVOG.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-Cd_sf9rc.js → timeline-definition-24CTP7MA-BBJltrcu.js} +2 -2
- package/web/assets/{vennDiagram-4TSXK5OY-V_YYv6w4.js → vennDiagram-4TSXK5OY-DCZ1DJTd.js} +2 -2
- package/web/assets/{wardleyDiagram-VM6X3IG4-eUMkS72V.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-xV05mhI9.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.CtGVMnXL.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.DLsrwuJh.js → VPLocalSearchBox.943egAU7.js} +1 -1
- package/web/docs/assets/chunks/{theme.JQAATJ0Z.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_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_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 +3 -3
- 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 +3 -3
- 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-DyXbCJO0.js +0 -1
- package/web/assets/AuthEntryPanel-CnhXeIwH.js +0 -48
- package/web/assets/ConversationTemplateManagementPage-C_gRb-94.js +0 -1
- package/web/assets/ConversationTemplateManagementPage-bo4pKaHZ.js +0 -1
- package/web/assets/EnterpriseUserManagementPage-CIYJoqps.js +0 -1
- package/web/assets/EnvironmentSecretManager-BLohbSye.js +0 -1
- package/web/assets/LicenseManagementPage-CKx5VRUE.js +0 -1
- package/web/assets/MarAgentModelManagementPage-BN9LwTcb.js +0 -1
- package/web/assets/MarAgentModelManagementPage-CFzBAnqd.js +0 -1
- package/web/assets/MarAlert-D8nonXJU.js +0 -1
- package/web/assets/MarCascader-DvIUhYAX.js +0 -1
- package/web/assets/MarCheckTag-DTCVJY3_.js +0 -1
- package/web/assets/MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-Cdb6YhdI.js +0 -1
- package/web/assets/MarDatePicker-CxjagCPO.js +0 -1
- package/web/assets/MarDescriptionsItem-Bf1egRIu.js +0 -1
- package/web/assets/MarInputNumber-CLHV7k0c.js +0 -1
- package/web/assets/MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-PdkIQ45N.js +0 -1
- package/web/assets/MarSwitch-DAm51evi.js +0 -1
- package/web/assets/MarTableColumn.vue_vue_type_script_setup_true_lang-BMfoa0sk.js +0 -1
- package/web/assets/MarTabs-Cjikh7WP.js +0 -1
- package/web/assets/MarkdownFilePreview-79yks1yT.js +0 -2
- package/web/assets/McpDetailsDialog-D-DLMY8U.js +0 -1
- package/web/assets/McpSourceManagementPage-BpuWypAi.js +0 -1
- package/web/assets/NodeDetailsDialogs-DwOZBtXD.js +0 -1
- package/web/assets/NodeManagementPage-BxnfNZcP.js +0 -1
- package/web/assets/NodeManagementPage-D2HVYjQv.js +0 -1
- package/web/assets/RemoteDesktopPage-DUaiJnbG.js +0 -1
- package/web/assets/ResourceManagementPanel-Ck6KUhS6.js +0 -2
- package/web/assets/ResourceManagementPanel.vue_vue_type_script_setup_true_lang-DSDDJ3Uk.js +0 -1
- package/web/assets/SecretManagementPage-B7RAiBrK.js +0 -1
- package/web/assets/SecretManagementPage-C3wyf725.js +0 -1
- package/web/assets/SecretManagementPage.vue_vue_type_script_setup_true_lang-CfSdHQ4E.js +0 -1
- package/web/assets/SessionSharePage-BX-nfMIN.css +0 -1
- package/web/assets/SessionSharePage-BfzRKWhm.js +0 -2
- package/web/assets/SettingsContent-D2NFnqqe.js +0 -1
- package/web/assets/SettingsContent-DesFINYe.js +0 -1
- package/web/assets/SkillCenterPage-CeW7UuQ6.js +0 -1
- package/web/assets/SkillCenterPage-wjUhkqcj.js +0 -1
- package/web/assets/SkillDetailsDialog-7DKa2ZnW.js +0 -1
- package/web/assets/SkillSourceManagementPage-BZchOevD.js +0 -1
- package/web/assets/StandaloneFilePreviewPage-BOb2NuM3.js +0 -1
- package/web/assets/SystemConfigurationPage-DTuEnywa.js +0 -1
- package/web/assets/SystemInformationPage-FHrrFOVp.js +0 -1
- package/web/assets/TerminalTabView-CUeuqDXK.js +0 -23
- package/web/assets/WorkbenchPage-B3IPG39P.js +0 -22
- package/web/assets/WorkspaceManagementPage-C2AnquRO.js +0 -1
- package/web/assets/WorkspaceManagementPage-CY6lUZy_.js +0 -1
- package/web/assets/abnfDiagram-VCTEODGH-P4zjaFVG.js +0 -1
- package/web/assets/architectureDiagram-5GKGNRK7-BnG88gsw.js +0 -36
- package/web/assets/channel-CWb6DdnJ.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-DUs1VMsY.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-DUs1VMsY.js +0 -1
- package/web/assets/cose-bilkent-JH36ORCC-DbV1M0D6.js +0 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-UfIuJmsK.js +0 -62
- package/web/assets/diagram-UQ7AKVKN-CPirF6ZK.js +0 -41
- package/web/assets/diagram-VX7I27RA-DE9ph2-C.js +0 -24
- package/web/assets/diagram-Z3DM3KII-B7QCaESW.js +0 -24
- package/web/assets/ebnfDiagram-PWID7BFC-cXnurzLV.js +0 -1
- package/web/assets/ganttDiagram-EL5Y4UJY-Bg8bfibk.js +0 -292
- package/web/assets/gitGraphDiagram-WWUBYQGX-BASWBIPb.js +0 -106
- package/web/assets/index-B2OJ0zbF.js +0 -1
- package/web/assets/index-B2q4VLK-.js +0 -7
- package/web/assets/index-B6LwCj7k.js +0 -1
- package/web/assets/index-BEPX7A1Z.js +0 -3
- package/web/assets/index-BGPj5_em.js +0 -1
- package/web/assets/index-BK-P_D32.js +0 -1
- package/web/assets/index-BWAhXTa1.js +0 -1
- package/web/assets/index-Ba4yQKgC.js +0 -1
- package/web/assets/index-BgoK274z.js +0 -1
- package/web/assets/index-C5XKFzfg.js +0 -13
- package/web/assets/index-CQQ8nImj.js +0 -1
- package/web/assets/index-CUdFR_LS.js +0 -1
- package/web/assets/index-Cabs9Jbc.js +0 -1
- package/web/assets/index-Cvc5t5wN.js +0 -1
- package/web/assets/index-DCxSq4SG.js +0 -1
- package/web/assets/index-DQNQfI7v.js +0 -1
- package/web/assets/index-DWPuFYww.js +0 -1
- package/web/assets/index-DpHSLPnk.js +0 -1
- package/web/assets/index-YWxcl4aQ.js +0 -1
- package/web/assets/infoDiagram-FKFFQAWI-bmh-h8tH.js +0 -2
- package/web/assets/mcp-center-service-D7TQgFfB.js +0 -1
- package/web/assets/pegDiagram-XKGWAZYB-Dy09XWS4.js +0 -1
- package/web/assets/railroadDiagram-O6MQD6OU-BaExkX80.js +0 -1
- package/web/assets/scoped-http-service-DMQqBd8a.js +0 -8
- package/web/assets/session-share-client-service-CkXfF1s6.js +0 -1
- package/web/assets/sizeCapture-INFHLROL-FljghWkt.js +0 -1
- package/web/assets/stateDiagram-XQSTLZYL-Dt-zEFD6.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-Dl4tHWGV.js +0 -1
- package/web/assets/swimlanes-V6O3JKXN-o8bRNP5Y.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-JjGvFdcr.js +0 -8
- package/web/assets/workbench-live-service-DP1sBGtA.js +0 -1
- package/web/assets/workbench-presentation-BN6qUa4J.js +0 -1
- package/web/assets/workspace-direct-transfer-service-BnGIUGfJ.js +0 -2
- package/web/docs/assets/chunks/@localSearchIndexen-US.Ca3WIokz.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.Bh9-6TxD.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_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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ByteFrameCodec } from './byte-frame.js';
|
|
3
|
+
export const NODE_STREAM_CHUNK_BYTES = 32 * 1024;
|
|
4
|
+
export const NODE_STREAM_WINDOW_BYTES = 256 * 1024;
|
|
5
|
+
export const NODE_STREAM_WINDOW_UNIT = 1024;
|
|
6
|
+
export const MAX_NODE_STREAM_FRAME_BYTES = NODE_STREAM_CHUNK_BYTES + 4096 + 3;
|
|
7
|
+
export const nodeStreamCreditCost = (length) => Math.ceil(length / NODE_STREAM_WINDOW_UNIT) * NODE_STREAM_WINDOW_UNIT;
|
|
8
|
+
const codec = new ByteFrameCodec(NODE_STREAM_CHUNK_BYTES);
|
|
9
|
+
const relayHandshake = z.discriminatedUnion('type', [
|
|
10
|
+
z
|
|
11
|
+
.object({
|
|
12
|
+
type: z.literal('RELAY_AUTH'),
|
|
13
|
+
nodeId: z.string().min(1).max(128),
|
|
14
|
+
credential: z.string().min(1).max(1024),
|
|
15
|
+
controlBinding: z.string().min(1).max(128)
|
|
16
|
+
})
|
|
17
|
+
.strict(),
|
|
18
|
+
z.object({ type: z.literal('RELAY_READY') }).strict()
|
|
19
|
+
]);
|
|
20
|
+
export function encodeNodeRelayHandshake(message) {
|
|
21
|
+
return codec.encode(relayHandshake.parse(message));
|
|
22
|
+
}
|
|
23
|
+
export function decodeNodeRelayHandshake(input) {
|
|
24
|
+
const { metadata, payload } = codec.decode(input);
|
|
25
|
+
if (payload.byteLength !== 0)
|
|
26
|
+
throw new Error('NODE_RELAY_HANDSHAKE_INVALID');
|
|
27
|
+
return relayHandshake.parse(metadata);
|
|
28
|
+
}
|
|
29
|
+
const streamId = z.number().int().min(1).max(0xffffffff);
|
|
30
|
+
const header = z.discriminatedUnion('type', [
|
|
31
|
+
z
|
|
32
|
+
.object({
|
|
33
|
+
type: z.literal('OPEN'),
|
|
34
|
+
streamId,
|
|
35
|
+
kind: z
|
|
36
|
+
.string()
|
|
37
|
+
.max(64)
|
|
38
|
+
.regex(/^[a-z][a-z0-9.-]*$/u),
|
|
39
|
+
grant: z.string().min(1).max(2048)
|
|
40
|
+
})
|
|
41
|
+
.strict(),
|
|
42
|
+
z.object({ type: z.literal('OPENED'), streamId }).strict(),
|
|
43
|
+
z.object({ type: z.literal('DATA'), streamId }).strict(),
|
|
44
|
+
z
|
|
45
|
+
.object({
|
|
46
|
+
type: z.literal('WINDOW'),
|
|
47
|
+
streamId,
|
|
48
|
+
bytes: z
|
|
49
|
+
.number()
|
|
50
|
+
.int()
|
|
51
|
+
.min(NODE_STREAM_WINDOW_UNIT)
|
|
52
|
+
.max(NODE_STREAM_WINDOW_BYTES)
|
|
53
|
+
.multipleOf(NODE_STREAM_WINDOW_UNIT)
|
|
54
|
+
})
|
|
55
|
+
.strict(),
|
|
56
|
+
z.object({ type: z.literal('FIN'), streamId }).strict(),
|
|
57
|
+
z
|
|
58
|
+
.object({
|
|
59
|
+
type: z.literal('RESET'),
|
|
60
|
+
streamId,
|
|
61
|
+
code: z
|
|
62
|
+
.string()
|
|
63
|
+
.max(96)
|
|
64
|
+
.regex(/^[A-Z][A-Z0-9_]*$/u)
|
|
65
|
+
})
|
|
66
|
+
.strict()
|
|
67
|
+
]);
|
|
68
|
+
export function encodeNodeStreamFrame(frame) {
|
|
69
|
+
if (frame.type === 'DATA') {
|
|
70
|
+
const { bytes, ...metadata } = frame;
|
|
71
|
+
if (bytes.byteLength === 0)
|
|
72
|
+
throw new Error('NODE_STREAM_FRAME_INVALID');
|
|
73
|
+
return codec.encode(header.parse(metadata), bytes);
|
|
74
|
+
}
|
|
75
|
+
return codec.encode(header.parse(frame));
|
|
76
|
+
}
|
|
77
|
+
export function decodeNodeStreamFrame(input) {
|
|
78
|
+
const { metadata, payload } = codec.decode(input);
|
|
79
|
+
const frame = header.parse(metadata);
|
|
80
|
+
if (frame.type === 'DATA') {
|
|
81
|
+
if (payload.byteLength === 0)
|
|
82
|
+
throw new Error('NODE_STREAM_FRAME_INVALID');
|
|
83
|
+
return { ...frame, bytes: payload };
|
|
84
|
+
}
|
|
85
|
+
if (payload.byteLength !== 0)
|
|
86
|
+
throw new Error('NODE_STREAM_FRAME_INVALID');
|
|
87
|
+
return frame;
|
|
88
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type NodeStreamFrame } from './node-stream-wire.js';
|
|
2
|
+
type StreamData = Exclude<NodeStreamFrame, {
|
|
3
|
+
type: 'OPEN' | 'OPENED';
|
|
4
|
+
}>;
|
|
5
|
+
/** The stable code of a stream failure; never contains peer diagnostics. */
|
|
6
|
+
export declare class NodeStreamError extends Error {
|
|
7
|
+
readonly code: string;
|
|
8
|
+
constructor(code: string);
|
|
9
|
+
}
|
|
10
|
+
/** Duplex stream after OPENED. Credit belongs to the end peers, not the relay. */
|
|
11
|
+
export declare class NodeStream implements AsyncIterable<Uint8Array> {
|
|
12
|
+
#private;
|
|
13
|
+
readonly id: number;
|
|
14
|
+
private readonly send;
|
|
15
|
+
private readonly release;
|
|
16
|
+
constructor(id: number, send: (frame: StreamData) => Promise<void>, release: (error?: Error) => void);
|
|
17
|
+
/** Settles when both directions end or the stream is reset, independently of the carrier. */
|
|
18
|
+
get finished(): Promise<void>;
|
|
19
|
+
write(bytes: Uint8Array): Promise<void>;
|
|
20
|
+
endWrite(): Promise<void>;
|
|
21
|
+
close(): void;
|
|
22
|
+
reset(code: string): void;
|
|
23
|
+
/** The carrier delivers decoded frames in order and owns carrier failure. */
|
|
24
|
+
receive(frame: StreamData): void;
|
|
25
|
+
fail(error: Error): void;
|
|
26
|
+
[Symbol.asyncIterator](): AsyncGenerator<Uint8Array>;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { NODE_STREAM_CHUNK_BYTES, NODE_STREAM_WINDOW_BYTES, nodeStreamCreditCost } from './node-stream-wire.js';
|
|
2
|
+
/** The stable code of a stream failure; never contains peer diagnostics. */
|
|
3
|
+
export class NodeStreamError extends Error {
|
|
4
|
+
code;
|
|
5
|
+
constructor(code) {
|
|
6
|
+
super(code);
|
|
7
|
+
this.code = code;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Duplex stream after OPENED. Credit belongs to the end peers, not the relay. */
|
|
11
|
+
export class NodeStream {
|
|
12
|
+
id;
|
|
13
|
+
send;
|
|
14
|
+
release;
|
|
15
|
+
#queue = [];
|
|
16
|
+
#finished = Promise.withResolvers();
|
|
17
|
+
#sendCredit = NODE_STREAM_WINDOW_BYTES;
|
|
18
|
+
#receiveCredit = NODE_STREAM_WINDOW_BYTES;
|
|
19
|
+
#receivedFin = false;
|
|
20
|
+
#sentFin = false;
|
|
21
|
+
#writing = false;
|
|
22
|
+
#reading = false;
|
|
23
|
+
#failure;
|
|
24
|
+
#readable;
|
|
25
|
+
#writable;
|
|
26
|
+
constructor(id, send, release) {
|
|
27
|
+
this.id = id;
|
|
28
|
+
this.send = send;
|
|
29
|
+
this.release = release;
|
|
30
|
+
}
|
|
31
|
+
/** Settles when both directions end or the stream is reset, independently of the carrier. */
|
|
32
|
+
get finished() {
|
|
33
|
+
return this.#finished.promise;
|
|
34
|
+
}
|
|
35
|
+
async write(bytes) {
|
|
36
|
+
if (this.#failure !== undefined)
|
|
37
|
+
throw this.#failure;
|
|
38
|
+
if (this.#sentFin || this.#writing)
|
|
39
|
+
throw new Error('NODE_STREAM_WRITE_STATE');
|
|
40
|
+
this.#writing = true;
|
|
41
|
+
try {
|
|
42
|
+
for (let offset = 0; offset < bytes.length;) {
|
|
43
|
+
if (this.#failure !== undefined)
|
|
44
|
+
throw this.#failure;
|
|
45
|
+
if (this.#sendCredit === 0) {
|
|
46
|
+
this.#writable = Promise.withResolvers();
|
|
47
|
+
await this.#writable.promise;
|
|
48
|
+
this.#writable = undefined;
|
|
49
|
+
}
|
|
50
|
+
if (this.#failure !== undefined)
|
|
51
|
+
throw this.#failure;
|
|
52
|
+
const size = Math.min(bytes.length - offset, this.#sendCredit, NODE_STREAM_CHUNK_BYTES);
|
|
53
|
+
this.#sendCredit -= nodeStreamCreditCost(size);
|
|
54
|
+
await this.#send({
|
|
55
|
+
type: 'DATA',
|
|
56
|
+
streamId: this.id,
|
|
57
|
+
bytes: bytes.subarray(offset, offset + size)
|
|
58
|
+
});
|
|
59
|
+
offset += size;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
this.#writing = false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async endWrite() {
|
|
67
|
+
if (this.#failure !== undefined)
|
|
68
|
+
throw this.#failure;
|
|
69
|
+
if (this.#sentFin)
|
|
70
|
+
return;
|
|
71
|
+
if (this.#writing)
|
|
72
|
+
throw new Error('NODE_STREAM_WRITE_STATE');
|
|
73
|
+
this.#sentFin = true;
|
|
74
|
+
await this.#send({ type: 'FIN', streamId: this.id });
|
|
75
|
+
if (this.#receivedFin)
|
|
76
|
+
this.#release();
|
|
77
|
+
}
|
|
78
|
+
close() {
|
|
79
|
+
this.reset('NODE_STREAM_CANCELLED');
|
|
80
|
+
}
|
|
81
|
+
reset(code) {
|
|
82
|
+
if (this.#failure !== undefined || (this.#receivedFin && this.#sentFin))
|
|
83
|
+
return;
|
|
84
|
+
this.fail(new NodeStreamError(code));
|
|
85
|
+
void this.send({ type: 'RESET', streamId: this.id, code }).catch(() => { });
|
|
86
|
+
}
|
|
87
|
+
/** The carrier delivers decoded frames in order and owns carrier failure. */
|
|
88
|
+
receive(frame) {
|
|
89
|
+
switch (frame.type) {
|
|
90
|
+
case 'DATA': {
|
|
91
|
+
const cost = nodeStreamCreditCost(frame.bytes.length);
|
|
92
|
+
if (this.#receivedFin || cost > this.#receiveCredit) {
|
|
93
|
+
this.reset('NODE_STREAM_FLOW_INVALID');
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.#receiveCredit -= cost;
|
|
97
|
+
this.#queue.push(frame.bytes);
|
|
98
|
+
this.#readable?.resolve();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
case 'WINDOW':
|
|
102
|
+
if (this.#sendCredit + frame.bytes > NODE_STREAM_WINDOW_BYTES) {
|
|
103
|
+
this.reset('NODE_STREAM_FLOW_INVALID');
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.#sendCredit += frame.bytes;
|
|
107
|
+
this.#writable?.resolve();
|
|
108
|
+
return;
|
|
109
|
+
case 'FIN':
|
|
110
|
+
if (this.#receivedFin) {
|
|
111
|
+
this.reset('NODE_STREAM_STATE_INVALID');
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.#receivedFin = true;
|
|
115
|
+
this.#readable?.resolve();
|
|
116
|
+
if (this.#sentFin)
|
|
117
|
+
this.#release();
|
|
118
|
+
return;
|
|
119
|
+
case 'RESET':
|
|
120
|
+
this.fail(new NodeStreamError(frame.code));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
fail(error) {
|
|
124
|
+
if (this.#failure !== undefined)
|
|
125
|
+
return;
|
|
126
|
+
this.#failure = error;
|
|
127
|
+
this.#queue.length = 0;
|
|
128
|
+
this.#readable?.resolve();
|
|
129
|
+
this.#writable?.resolve();
|
|
130
|
+
this.#release(error);
|
|
131
|
+
}
|
|
132
|
+
#release(error) {
|
|
133
|
+
this.release(error);
|
|
134
|
+
this.#finished.resolve();
|
|
135
|
+
}
|
|
136
|
+
async *[Symbol.asyncIterator]() {
|
|
137
|
+
if (this.#reading)
|
|
138
|
+
throw new Error('NODE_STREAM_READ_STATE');
|
|
139
|
+
this.#reading = true;
|
|
140
|
+
let complete = false;
|
|
141
|
+
try {
|
|
142
|
+
for (;;) {
|
|
143
|
+
if (this.#failure !== undefined)
|
|
144
|
+
throw this.#failure;
|
|
145
|
+
const chunk = this.#queue.shift();
|
|
146
|
+
if (chunk !== undefined) {
|
|
147
|
+
yield chunk;
|
|
148
|
+
// The consumer must request the next chunk before this one restores credit.
|
|
149
|
+
if (!this.#receivedFin && this.#failure === undefined) {
|
|
150
|
+
const bytes = nodeStreamCreditCost(chunk.length);
|
|
151
|
+
this.#receiveCredit += bytes;
|
|
152
|
+
await this.#send({ type: 'WINDOW', streamId: this.id, bytes });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else if (this.#receivedFin) {
|
|
156
|
+
complete = true;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
this.#readable = Promise.withResolvers();
|
|
161
|
+
await this.#readable.promise;
|
|
162
|
+
this.#readable = undefined;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
finally {
|
|
167
|
+
if (!complete)
|
|
168
|
+
this.close();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async #send(frame) {
|
|
172
|
+
try {
|
|
173
|
+
await this.send(frame);
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
const failure = error instanceof Error ? error : new Error('NODE_STREAM_DISCONNECTED');
|
|
177
|
+
this.fail(failure);
|
|
178
|
+
throw failure;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
@@ -935,11 +935,11 @@ export declare const scheduleToolInputs: {
|
|
|
935
935
|
cursor: z.ZodOptional<z.ZodString>;
|
|
936
936
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
937
937
|
}, "strict", z.ZodTypeAny, {
|
|
938
|
-
limit?: number | undefined;
|
|
939
938
|
cursor?: string | undefined;
|
|
940
|
-
}, {
|
|
941
939
|
limit?: number | undefined;
|
|
940
|
+
}, {
|
|
942
941
|
cursor?: string | undefined;
|
|
942
|
+
limit?: number | undefined;
|
|
943
943
|
}>;
|
|
944
944
|
get: z.ZodObject<{
|
|
945
945
|
taskId: z.ZodString;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Bounded length-prefixed records over a byte stream; each domain owns its payload. */
|
|
2
|
+
export declare function writeStreamRecord(frame: Uint8Array, maxBytes: number, code: string): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare function readStreamRecords(source: AsyncIterable<Uint8Array>, maxBytes: number, invalid: string, truncated: string): AsyncGenerator<Uint8Array<ArrayBuffer>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const HEADER_BYTES = 4;
|
|
2
|
+
/** Bounded length-prefixed records over a byte stream; each domain owns its payload. */
|
|
3
|
+
export function writeStreamRecord(frame, maxBytes, code) {
|
|
4
|
+
validateLength(frame.byteLength, maxBytes, code);
|
|
5
|
+
const bytes = new Uint8Array(HEADER_BYTES + frame.byteLength);
|
|
6
|
+
new DataView(bytes.buffer).setUint32(0, frame.byteLength);
|
|
7
|
+
bytes.set(frame, HEADER_BYTES);
|
|
8
|
+
return bytes;
|
|
9
|
+
}
|
|
10
|
+
export async function* readStreamRecords(source, maxBytes, invalid, truncated) {
|
|
11
|
+
const header = new Uint8Array(HEADER_BYTES);
|
|
12
|
+
let frame;
|
|
13
|
+
let used = 0;
|
|
14
|
+
for await (const chunk of source) {
|
|
15
|
+
for (let start = 0; start < chunk.byteLength;) {
|
|
16
|
+
const target = frame ?? header;
|
|
17
|
+
const length = Math.min(target.byteLength - used, chunk.byteLength - start);
|
|
18
|
+
target.set(chunk.subarray(start, start + length), used);
|
|
19
|
+
start += length;
|
|
20
|
+
used += length;
|
|
21
|
+
if (used !== target.byteLength)
|
|
22
|
+
continue;
|
|
23
|
+
used = 0;
|
|
24
|
+
if (frame === undefined) {
|
|
25
|
+
const size = new DataView(header.buffer).getUint32(0);
|
|
26
|
+
validateLength(size, maxBytes, invalid);
|
|
27
|
+
frame = new Uint8Array(size);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
yield frame;
|
|
31
|
+
frame = undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (frame !== undefined || used !== 0)
|
|
36
|
+
throw new Error(truncated);
|
|
37
|
+
}
|
|
38
|
+
function validateLength(length, maxBytes, code) {
|
|
39
|
+
if (length === 0 || length > maxBytes)
|
|
40
|
+
throw new Error(code);
|
|
41
|
+
}
|
|
@@ -220,29 +220,3 @@ export declare const terminalDirectNodeEventSchema: z.ZodObject<{
|
|
|
220
220
|
directSessionId: string;
|
|
221
221
|
phase?: "ATTACHED" | "PREPARED" | undefined;
|
|
222
222
|
}>;
|
|
223
|
-
export declare const terminalDirectOpenFrameSchema: z.ZodObject<{
|
|
224
|
-
type: z.ZodLiteral<"OPEN">;
|
|
225
|
-
directSessionId: z.ZodString;
|
|
226
|
-
grant: z.ZodString;
|
|
227
|
-
}, "strict", z.ZodTypeAny, {
|
|
228
|
-
type: "OPEN";
|
|
229
|
-
grant: string;
|
|
230
|
-
directSessionId: string;
|
|
231
|
-
}, {
|
|
232
|
-
type: "OPEN";
|
|
233
|
-
grant: string;
|
|
234
|
-
directSessionId: string;
|
|
235
|
-
}>;
|
|
236
|
-
export declare const terminalDirectAttachedFrameSchema: z.ZodObject<{
|
|
237
|
-
type: z.ZodLiteral<"ATTACHED">;
|
|
238
|
-
terminalId: z.ZodString;
|
|
239
|
-
afterSequence: z.ZodNumber;
|
|
240
|
-
}, "strict", z.ZodTypeAny, {
|
|
241
|
-
type: "ATTACHED";
|
|
242
|
-
terminalId: string;
|
|
243
|
-
afterSequence: number;
|
|
244
|
-
}, {
|
|
245
|
-
type: "ATTACHED";
|
|
246
|
-
terminalId: string;
|
|
247
|
-
afterSequence: number;
|
|
248
|
-
}>;
|
|
@@ -92,17 +92,3 @@ export const terminalDirectNodeEventSchema = z
|
|
|
92
92
|
phase: z.enum(['PREPARED', 'ATTACHED']).optional()
|
|
93
93
|
})
|
|
94
94
|
.strict();
|
|
95
|
-
export const terminalDirectOpenFrameSchema = z
|
|
96
|
-
.object({
|
|
97
|
-
type: z.literal('OPEN'),
|
|
98
|
-
directSessionId: id,
|
|
99
|
-
grant: z.string().min(32).max(4096)
|
|
100
|
-
})
|
|
101
|
-
.strict();
|
|
102
|
-
export const terminalDirectAttachedFrameSchema = z
|
|
103
|
-
.object({
|
|
104
|
-
type: z.literal('ATTACHED'),
|
|
105
|
-
terminalId: resourceId,
|
|
106
|
-
afterSequence: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
|
|
107
|
-
})
|
|
108
|
-
.strict();
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Terminal owns its records; the shared stream does not preserve write boundaries. */
|
|
2
|
+
export declare function writeTerminalRecord(frame: Uint8Array): Uint8Array<ArrayBuffer>;
|
|
3
|
+
export declare function readTerminalRecords(source: AsyncIterable<Uint8Array>): AsyncGenerator<Uint8Array<ArrayBuffer>, any, any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MAX_TERMINAL_FRAME_BYTES } from './byte-frame.js';
|
|
2
|
+
import { readStreamRecords, writeStreamRecord } from './stream-record.js';
|
|
3
|
+
/** Terminal owns its records; the shared stream does not preserve write boundaries. */
|
|
4
|
+
export function writeTerminalRecord(frame) {
|
|
5
|
+
return writeStreamRecord(frame, MAX_TERMINAL_FRAME_BYTES, 'TERMINAL_RECORD_INVALID');
|
|
6
|
+
}
|
|
7
|
+
export function readTerminalRecords(source) {
|
|
8
|
+
return readStreamRecords(source, MAX_TERMINAL_FRAME_BYTES, 'TERMINAL_RECORD_INVALID', 'TERMINAL_RECORD_TRUNCATED');
|
|
9
|
+
}
|
|
@@ -346,7 +346,6 @@ export declare const serverNotificationSchema: z.ZodObject<{
|
|
|
346
346
|
}, "strict", z.ZodTypeAny, {
|
|
347
347
|
message: string;
|
|
348
348
|
id: string;
|
|
349
|
-
read: boolean;
|
|
350
349
|
expiresAt: number;
|
|
351
350
|
title: string;
|
|
352
351
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -378,10 +377,10 @@ export declare const serverNotificationSchema: z.ZodObject<{
|
|
|
378
377
|
};
|
|
379
378
|
createdAt: number;
|
|
380
379
|
updatedAt: number;
|
|
380
|
+
read: boolean;
|
|
381
381
|
}, {
|
|
382
382
|
message: string;
|
|
383
383
|
id: string;
|
|
384
|
-
read: boolean;
|
|
385
384
|
expiresAt: number;
|
|
386
385
|
title: string;
|
|
387
386
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -413,6 +412,7 @@ export declare const serverNotificationSchema: z.ZodObject<{
|
|
|
413
412
|
};
|
|
414
413
|
createdAt: number;
|
|
415
414
|
updatedAt: number;
|
|
415
|
+
read: boolean;
|
|
416
416
|
}>;
|
|
417
417
|
export declare const notificationCreatedSchema: z.ZodObject<{
|
|
418
418
|
type: z.ZodLiteral<"notification.created">;
|
|
@@ -517,7 +517,6 @@ export declare const notificationCreatedSchema: z.ZodObject<{
|
|
|
517
517
|
}, "strict", z.ZodTypeAny, {
|
|
518
518
|
message: string;
|
|
519
519
|
id: string;
|
|
520
|
-
read: boolean;
|
|
521
520
|
expiresAt: number;
|
|
522
521
|
title: string;
|
|
523
522
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -549,10 +548,10 @@ export declare const notificationCreatedSchema: z.ZodObject<{
|
|
|
549
548
|
};
|
|
550
549
|
createdAt: number;
|
|
551
550
|
updatedAt: number;
|
|
551
|
+
read: boolean;
|
|
552
552
|
}, {
|
|
553
553
|
message: string;
|
|
554
554
|
id: string;
|
|
555
|
-
read: boolean;
|
|
556
555
|
expiresAt: number;
|
|
557
556
|
title: string;
|
|
558
557
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -584,13 +583,13 @@ export declare const notificationCreatedSchema: z.ZodObject<{
|
|
|
584
583
|
};
|
|
585
584
|
createdAt: number;
|
|
586
585
|
updatedAt: number;
|
|
586
|
+
read: boolean;
|
|
587
587
|
}>;
|
|
588
588
|
}, "strict", z.ZodTypeAny, {
|
|
589
589
|
type: "notification.created";
|
|
590
590
|
notification: {
|
|
591
591
|
message: string;
|
|
592
592
|
id: string;
|
|
593
|
-
read: boolean;
|
|
594
593
|
expiresAt: number;
|
|
595
594
|
title: string;
|
|
596
595
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -622,13 +621,13 @@ export declare const notificationCreatedSchema: z.ZodObject<{
|
|
|
622
621
|
};
|
|
623
622
|
createdAt: number;
|
|
624
623
|
updatedAt: number;
|
|
624
|
+
read: boolean;
|
|
625
625
|
};
|
|
626
626
|
}, {
|
|
627
627
|
type: "notification.created";
|
|
628
628
|
notification: {
|
|
629
629
|
message: string;
|
|
630
630
|
id: string;
|
|
631
|
-
read: boolean;
|
|
632
631
|
expiresAt: number;
|
|
633
632
|
title: string;
|
|
634
633
|
kind: "run" | "approval" | "plan" | "user-input" | "schedule" | "agent";
|
|
@@ -660,6 +659,7 @@ export declare const notificationCreatedSchema: z.ZodObject<{
|
|
|
660
659
|
};
|
|
661
660
|
createdAt: number;
|
|
662
661
|
updatedAt: number;
|
|
662
|
+
read: boolean;
|
|
663
663
|
};
|
|
664
664
|
}>;
|
|
665
665
|
export declare const NOTIFICATION_TARGET_READ_ID_LIMIT = 250;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/protocol",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.21",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/myagentroam/mar.git",
|
|
@@ -17,11 +17,56 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
|
+
"./browser-stream": {
|
|
21
|
+
"development": "./src/browser-stream.ts",
|
|
22
|
+
"types": "./dist/browser-stream.d.ts",
|
|
23
|
+
"import": "./dist/browser-stream.js"
|
|
24
|
+
},
|
|
25
|
+
"./node-stream": {
|
|
26
|
+
"development": "./src/node-stream.ts",
|
|
27
|
+
"types": "./dist/node-stream.d.ts",
|
|
28
|
+
"import": "./dist/node-stream.js"
|
|
29
|
+
},
|
|
30
|
+
"./file-upload-stream": {
|
|
31
|
+
"development": "./src/file-upload-stream.ts",
|
|
32
|
+
"types": "./dist/file-upload-stream.d.ts",
|
|
33
|
+
"import": "./dist/file-upload-stream.js"
|
|
34
|
+
},
|
|
35
|
+
"./terminal-stream": {
|
|
36
|
+
"development": "./src/terminal-stream.ts",
|
|
37
|
+
"types": "./dist/terminal-stream.d.ts",
|
|
38
|
+
"import": "./dist/terminal-stream.js"
|
|
39
|
+
},
|
|
20
40
|
"./package.json": "./package.json",
|
|
21
41
|
"./byte-frame": {
|
|
22
42
|
"types": "./dist/byte-frame.d.ts",
|
|
23
43
|
"import": "./dist/byte-frame.js"
|
|
24
44
|
},
|
|
45
|
+
"./node-connection": {
|
|
46
|
+
"development": "./src/node-connection.ts",
|
|
47
|
+
"types": "./dist/node-connection.d.ts",
|
|
48
|
+
"import": "./dist/node-connection.js"
|
|
49
|
+
},
|
|
50
|
+
"./node-relay-path": {
|
|
51
|
+
"development": "./src/node-relay-path.ts",
|
|
52
|
+
"types": "./dist/node-relay-path.d.ts",
|
|
53
|
+
"import": "./dist/node-relay-path.js"
|
|
54
|
+
},
|
|
55
|
+
"./node-stream-mux": {
|
|
56
|
+
"development": "./src/node-stream-mux.ts",
|
|
57
|
+
"types": "./dist/node-stream-mux.d.ts",
|
|
58
|
+
"import": "./dist/node-stream-mux.js"
|
|
59
|
+
},
|
|
60
|
+
"./node-stream-path": {
|
|
61
|
+
"development": "./src/node-stream-path.ts",
|
|
62
|
+
"types": "./dist/node-stream-path.d.ts",
|
|
63
|
+
"import": "./dist/node-stream-path.js"
|
|
64
|
+
},
|
|
65
|
+
"./node-stream-wire": {
|
|
66
|
+
"development": "./src/node-stream-wire.ts",
|
|
67
|
+
"types": "./dist/node-stream-wire.d.ts",
|
|
68
|
+
"import": "./dist/node-stream-wire.js"
|
|
69
|
+
},
|
|
25
70
|
".": {
|
|
26
71
|
"types": "./dist/index.d.ts",
|
|
27
72
|
"import": "./dist/index.js"
|
|
@@ -21,7 +21,7 @@ export declare class BrowserScopeRevoked extends Error {
|
|
|
21
21
|
}
|
|
22
22
|
/** Owns authorized Browser leases on both paths. The host checks its current
|
|
23
23
|
* session/Workbench connection and supplies authoritative ICE and Node RPC;
|
|
24
|
-
*
|
|
24
|
+
* byte forwarding and the Node's browser registry stay outside this owner.
|
|
25
25
|
*/
|
|
26
26
|
export declare class BrowserAttachmentCoordinator {
|
|
27
27
|
private readonly options;
|
|
@@ -36,7 +36,6 @@ export declare class BrowserAttachmentCoordinator {
|
|
|
36
36
|
prepare(nodeId: string, generation: string, grant: BrowserAttachmentPrepare, identity: Identity): Promise<void>;
|
|
37
37
|
renew(nodeId: string, generation: string, attachmentId: string, expiresAt: number, identity: Identity): Promise<boolean>;
|
|
38
38
|
revoke(target: Target, generation: string, attachmentId: string, code: string, identity: Identity): Promise<void>;
|
|
39
|
-
closeRelay(attachmentId: string): void;
|
|
40
39
|
resource(nodeId: string, generation: string, data: {
|
|
41
40
|
workspaceId: string;
|
|
42
41
|
__requestUserId: number;
|
|
@@ -50,8 +49,11 @@ export declare class BrowserAttachmentCoordinator {
|
|
|
50
49
|
browserId?: string;
|
|
51
50
|
}>;
|
|
52
51
|
prepare(identity: Identity, target: Request): Promise<BrowserAttachmentOpen>;
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
private relayBrowser;
|
|
53
|
+
authorizeRelayStream(user: Pick<Identity, 'userId' | 'sessionFingerprint'>, nodeId: string, open: BrowserAttachmentOpen, signal: AbortSignal): Promise<{
|
|
54
|
+
revoked: AbortSignal;
|
|
55
|
+
onEnd: () => void;
|
|
56
|
+
} | undefined>;
|
|
55
57
|
renew(identity: Identity, id: string): Promise<void>;
|
|
56
58
|
release(identity: Identity, id: string): Promise<void>;
|
|
57
59
|
fileTarget(identity: Identity, id: string): Promise<{
|
|
@@ -8,7 +8,7 @@ export class BrowserScopeRevoked extends Error {
|
|
|
8
8
|
}
|
|
9
9
|
/** Owns authorized Browser leases on both paths. The host checks its current
|
|
10
10
|
* session/Workbench connection and supplies authoritative ICE and Node RPC;
|
|
11
|
-
*
|
|
11
|
+
* byte forwarding and the Node's browser registry stay outside this owner.
|
|
12
12
|
*/
|
|
13
13
|
export class BrowserAttachmentCoordinator {
|
|
14
14
|
options;
|
|
@@ -73,14 +73,6 @@ export class BrowserAttachmentCoordinator {
|
|
|
73
73
|
throw error;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
relayNode(id, nodeId, generation) {
|
|
77
|
-
const lease = this.leases.get(id);
|
|
78
|
-
return (!!lease &&
|
|
79
|
-
this.live(lease) &&
|
|
80
|
-
lease.grant.route.type === 'relay' &&
|
|
81
|
-
lease.target.nodeId === nodeId &&
|
|
82
|
-
lease.generation === generation);
|
|
83
|
-
}
|
|
84
76
|
async relayBrowser(identity, open) {
|
|
85
77
|
const lease = this.owned(identity, open.attachmentId);
|
|
86
78
|
if (!lease || lease.grant.route.type !== 'relay' || lease.grant.ticket !== open.ticket)
|
|
@@ -88,6 +80,27 @@ export class BrowserAttachmentCoordinator {
|
|
|
88
80
|
const node = await this.options.authorize(identity, lease.target);
|
|
89
81
|
return this.live(lease) && node?.generation === lease.generation;
|
|
90
82
|
}
|
|
83
|
+
async authorizeRelayStream(user, nodeId, open, signal) {
|
|
84
|
+
const lease = this.leases.get(open.attachmentId);
|
|
85
|
+
if (!lease ||
|
|
86
|
+
lease.target.nodeId !== nodeId ||
|
|
87
|
+
lease.relayStream ||
|
|
88
|
+
lease.identity.userId !== user.userId ||
|
|
89
|
+
lease.identity.sessionFingerprint !== user.sessionFingerprint ||
|
|
90
|
+
!(await this.relayBrowser(lease.identity, open)))
|
|
91
|
+
return undefined;
|
|
92
|
+
signal.throwIfAborted();
|
|
93
|
+
if (!this.live(lease) || lease.relayStream)
|
|
94
|
+
return undefined;
|
|
95
|
+
const scope = new AbortController();
|
|
96
|
+
lease.relayStream = scope;
|
|
97
|
+
return {
|
|
98
|
+
revoked: scope.signal,
|
|
99
|
+
onEnd: () => {
|
|
100
|
+
void this.close(open.attachmentId, 'BROWSER_DISCONNECTED').catch(this.options.failed);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
91
104
|
async renew(identity, id) {
|
|
92
105
|
const lease = this.owned(identity, id);
|
|
93
106
|
if (!lease)
|
|
@@ -169,16 +182,12 @@ export class BrowserAttachmentCoordinator {
|
|
|
169
182
|
if (!lease)
|
|
170
183
|
return Promise.resolve();
|
|
171
184
|
return (lease.closing ??= Promise.resolve().then(async () => {
|
|
185
|
+
lease.relayStream?.abort();
|
|
172
186
|
try {
|
|
173
|
-
this.options.
|
|
187
|
+
await this.options.revoke(lease.target, lease.generation, id, code, lease.identity);
|
|
174
188
|
}
|
|
175
189
|
finally {
|
|
176
|
-
|
|
177
|
-
await this.options.revoke(lease.target, lease.generation, id, code, lease.identity);
|
|
178
|
-
}
|
|
179
|
-
finally {
|
|
180
|
-
this.leases.delete(id);
|
|
181
|
-
}
|
|
190
|
+
this.leases.delete(id);
|
|
182
191
|
}
|
|
183
192
|
}));
|
|
184
193
|
}
|