@myagentroam/server 0.15.3 → 0.15.5
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/index.d.ts +135 -102
- package/node_modules/@myagentroam/protocol/dist/index.js +15 -7
- package/node_modules/@myagentroam/protocol/dist/scheduled-time.d.ts +1126 -0
- package/node_modules/@myagentroam/protocol/dist/scheduled-time.js +92 -0
- package/node_modules/@myagentroam/protocol/dist/workbench-notification.d.ts +391 -0
- package/node_modules/@myagentroam/protocol/dist/workbench-notification.js +43 -0
- package/node_modules/@myagentroam/protocol/package.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/domain-errors.js +6 -0
- package/node_modules/@myagentroam/server-core/dist/i18n/workbench-notifications.d.ts +4 -0
- package/node_modules/@myagentroam/server-core/dist/i18n/workbench-notifications.js +4 -0
- package/node_modules/@myagentroam/server-core/dist/marctl-session-routes.js +41 -35
- package/node_modules/@myagentroam/server-core/dist/mysql-node-identity.js +2 -0
- package/node_modules/@myagentroam/server-core/dist/mysql-schema.d.ts +11 -0
- package/node_modules/@myagentroam/server-core/dist/mysql-schema.js +79 -9
- package/node_modules/@myagentroam/server-core/dist/node-identity-control.d.ts +3 -0
- package/node_modules/@myagentroam/server-core/dist/node-identity-control.js +3 -0
- package/node_modules/@myagentroam/server-core/dist/node-projection.d.ts +3 -0
- package/node_modules/@myagentroam/server-core/dist/node-projection.js +4 -2
- package/node_modules/@myagentroam/server-core/dist/node-request-channel.d.ts +6 -0
- package/node_modules/@myagentroam/server-core/dist/node-request-channel.js +9 -0
- package/node_modules/@myagentroam/server-core/dist/run-control-routes.js +7 -1
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-index.d.ts +139 -0
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-index.js +304 -0
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-pagination.d.ts +18 -0
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-pagination.js +37 -0
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-routes.d.ts +45 -0
- package/node_modules/@myagentroam/server-core/dist/scheduled-task-routes.js +449 -0
- package/node_modules/@myagentroam/server-core/dist/session-run-routes.js +1 -125
- package/node_modules/@myagentroam/server-core/dist/workbench-notification-service.d.ts +14 -0
- package/node_modules/@myagentroam/server-core/dist/workbench-notification-service.js +101 -33
- package/node_modules/@myagentroam/server-core/package.json +12 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/node-control-factory.js +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-application.js +75 -4
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/mysql/server-database.js +3 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.d.ts +9 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.js +25 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-access-service.d.ts +1 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-access-service.js +6 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-management-directory.d.ts +3 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-mutation-service.d.ts +2 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-mutation-service.js +6 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/background-execution-preparation-service.js +4 -5
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.d.ts +5 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.js +17 -4
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-resource-scope-index.js +10 -8
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/package.json +5 -5
- package/web/assets/AuditManagementPage-Dsnzc0PN.js +1 -0
- package/web/assets/{AuthEntryPanel-Db_BWfJ0.js → AuthEntryPanel-D9ebBoo0.js} +4 -4
- package/web/assets/{AuthEntryPanel-BHf4PyTn.css → AuthEntryPanel-WpiFKAsq.css} +1 -1
- package/web/assets/{CodeFileEditor-CihFm6fB.js → CodeFileEditor-H71h18Kz.js} +3 -3
- package/web/assets/{ConversationTemplateManagementPage-v6A9UnHo.js → ConversationTemplateManagementPage-CbBgb5Un.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage--MLDP2Yq.js → ConversationTemplateManagementPage-DCJXWYdm.js} +1 -1
- package/web/assets/{EnterpriseUserManagementPage-DyFtLsCU.js → EnterpriseUserManagementPage-DRpFPO36.js} +1 -1
- package/web/assets/{EnvironmentSecretManager-DMI-sdv1.js → EnvironmentSecretManager-BYEu6pyC.js} +1 -1
- package/web/assets/{FilePreviewLoading-TmVJkujC.css → FilePreviewLoading-BCZE-xW1.css} +1 -1
- package/web/assets/{FilePreviewLoading-D8OWX-sl.js → FilePreviewLoading-LOmXglhH.js} +1 -1
- package/web/assets/{LicenseManagementPage-EO9mHum7.js → LicenseManagementPage-mhP8u0oZ.js} +1 -1
- package/web/assets/{ManagementPagination-B6TS3Pk4.js → ManagementPagination-DbiZ6CBx.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-CMT8p2qX.js → MarAgentModelManagementPage-BT44GgBh.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-DOPY6UOs.js → MarAgentModelManagementPage-CvvCbQCA.js} +1 -1
- package/web/assets/{MarAlert-C-dZd4T_.js → MarAlert-BIk_N-WC.js} +1 -1
- package/web/assets/{MarCascader-D3Vl-FFX.js → MarCascader-DvpPFe4o.js} +1 -1
- package/web/assets/{MarCheckTag-BwSYYsSE.js → MarCheckTag-BwvXnEnf.js} +1 -1
- package/web/assets/{MarCheckboxGroup-Cb135wMq.js → MarCheckboxGroup-5bVbf0lZ.js} +1 -1
- package/web/assets/{MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-BwTnPcE0.js → MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-DbEWuIHj.js} +1 -1
- package/web/assets/{MarDatePicker-tSQv6wvs.js → MarDatePicker-D0G2zEfT.js} +1 -1
- package/web/assets/{MarDescriptionsItem-PNPmf934.js → MarDescriptionsItem-CxLkpmQY.js} +1 -1
- package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-Dvh_fAz1.js → MarFormItem.vue_vue_type_script_setup_true_lang-CV1tzjdN.js} +1 -1
- package/web/assets/{MarInputNumber-OVs6j0FR.js → MarInputNumber-xVGdx2HY.js} +1 -1
- package/web/assets/{MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-Bsmm81si.js → MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-b5JJikqe.js} +1 -1
- package/web/assets/{MarSwitch-BGPjm8mm.js → MarSwitch-6B_KcOhu.js} +1 -1
- package/web/assets/{MarTableColumn.vue_vue_type_script_setup_true_lang-druOvKUy.js → MarTableColumn.vue_vue_type_script_setup_true_lang-BIKATpkO.js} +1 -1
- package/web/assets/{MarTabs-DGJMl1q0.js → MarTabs-BYc8P3EU.js} +1 -1
- package/web/assets/{MarTag-BoauUJly.js → MarTag-OPmx72Lz.js} +1 -1
- package/web/assets/{MarkdownFilePreview-Btw0b3eS.js → MarkdownFilePreview-B54_DszC.js} +2 -2
- package/web/assets/{McpDetailsDialog-ZmNHpt5x.js → McpDetailsDialog-BtMWSIeT.js} +1 -1
- package/web/assets/{McpSourceManagementPage-Cl3ypbMi.js → McpSourceManagementPage-B-126VRv.js} +1 -1
- package/web/assets/{McpSourceManagementPage-DuyBN1_y.js → McpSourceManagementPage-BWEFNm14.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-B0LplIPv.js → NodeDetailsDialogs-21_kVbsi.js} +1 -1
- package/web/assets/NodeManagementPage-BH3_NvTe.js +1 -0
- package/web/assets/NodeManagementPage-D85qnsz4.js +1 -0
- package/web/assets/{OAuthManagementPage-6YC9ASJ5.js → OAuthManagementPage-DaUxJnvD.js} +1 -1
- package/web/assets/{OrganizationManagementPage-BKD6rHXr.js → OrganizationManagementPage-DOlN9TDa.js} +1 -1
- package/web/assets/{RemoteDesktopPage-BbaFFjeW.js → RemoteDesktopPage-BehdxoXV.js} +1 -1
- package/web/assets/{ResourceManagementPanel-ByySlr2x.js → ResourceManagementPanel-MXcleaI4.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-BmO8bTuI.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-B_Nm5nRe.js} +1 -1
- package/web/assets/{SecretManagementPage-D2W03gRh.js → SecretManagementPage-C8Cdzlae.js} +1 -1
- package/web/assets/SecretManagementPage-DqO4HEX4.js +1 -0
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-BBcFoXRw.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-ivOyaCL4.js} +1 -1
- package/web/assets/{SessionSharePage-BNgEp6w0.js → SessionSharePage-DSMxWgfS.js} +2 -2
- package/web/assets/SettingsContent-BLMdy5J4.css +1 -0
- package/web/assets/SettingsContent-BTiZ6U3Y.js +1 -0
- package/web/assets/{SettingsContent-leYkMe7Y.js → SettingsContent-CiDe4bJA.js} +1 -1
- package/web/assets/SkillCenterPage-BwE2Oimy.js +1 -0
- package/web/assets/{SkillCenterPage-kib4QG13.js → SkillCenterPage-DrSz-_cp.js} +1 -1
- package/web/assets/{SkillDetailsDialog-s5e4FvWZ.js → SkillDetailsDialog-ldoTDCcE.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-D42HRqgP.js → SkillSourceManagementPage-C0gMXRE5.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-CAPfoRGd.js → SkillSourceManagementPage-D7ipXJrA.js} +1 -1
- package/web/assets/{StandaloneFilePreviewPage-BoYp4pLI.js → StandaloneFilePreviewPage-BwddvGmo.js} +1 -1
- package/web/assets/{SystemConfigurationPage-B033PZiP.js → SystemConfigurationPage-CpzVPeAF.js} +1 -1
- package/web/assets/{SystemConfigurationPage-BImLLC7-.js → SystemConfigurationPage-i2e3-zND.js} +1 -1
- package/web/assets/{SystemInformationPage-CfN_9y2Q.js → SystemInformationPage-Bz0yFToK.js} +1 -1
- package/web/assets/{TerminalTabView-C0LlUwtD.js → TerminalTabView-DPXB2bXI.js} +1 -1
- package/web/assets/WorkbenchPage-B1oGIxD-.css +1 -0
- package/web/assets/WorkbenchPage-Kzj6M6Cw.js +22 -0
- package/web/assets/WorkspaceManagementPage-BTlzIlKC.js +1 -0
- package/web/assets/WorkspaceManagementPage-Dq1qIAjx.js +1 -0
- package/web/assets/{abnfDiagram-VCTEODGH-B3B520U3.js → abnfDiagram-VCTEODGH-DRytCsEV.js} +1 -1
- package/web/assets/{arc-CzRIICEp.js → arc-XoZS_jKf.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-Cwii7Vqj.js → architectureDiagram-5GKGNRK7-CfhN6NAI.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-DmXB7nEY.js → blockDiagram-OSKFZWR5-RWVqTWt9.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-DvFgqrKw.js → c4Diagram-7LVT6UL2-CO5F469-.js} +1 -1
- package/web/assets/{catalog-ownership-service-BxgleBKc.js → catalog-ownership-service-BZrBbgWj.js} +1 -1
- package/web/assets/{catalog-page-service-OpYIbvUW.js → catalog-page-service-Dvs0ECW7.js} +1 -1
- package/web/assets/channel-GTSu6otp.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-CRHWDv_q.js → chunk-2Q5K7J3B-B4DzBMFI.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-BWK_1AQI.js → chunk-5VM5RSS4-pVfLmPBw.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-8ThkQ-mU.js → chunk-F27PBJKO-BXqCh_pk.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-Ch5NYm1-.js → chunk-HLEWEB6X-BmD09ogS.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-B3jfIta9.js → chunk-JWPE2WC7-91KMh7-N.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-C_gUZd26.js → chunk-POPQ4Y6H-DWmBRn5X.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-CLYTuLPA.js → chunk-SVP7TREG-MYRwScnq.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-i9XwWX09.js → chunk-XXDRQBXY-Xd4UEOJR.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-DXNNy-Je.js → chunk-ZLD2IHE6-bksufRBt.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-BbDKYvfr.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-BbDKYvfr.js +1 -0
- package/web/assets/{conversation-history-BHVBrFPF.js → conversation-history-BPoLP3ZL.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-CbG82TkW.js → cose-bilkent-JH36ORCC-DWx37r3_.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-DXUJi6PL.js → cynefin-OW5HDTMX-DXjQqeAs.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-BbpaJaJc.js → cynefinDiagram-5FMLGOSQ-C0UoTc_K.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-B6_YQGif.js → dagre-OS7QT2EB-BJCceu3J.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-BRzqASNb.js → diagram-S7CK7UJ4-CKBa2I6a.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-vsBp6Ji0.js → diagram-UQ7AKVKN-C3iKHs0N.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-LePbDIih.js → diagram-VSXAHHWV-C69ZMkoA.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-Cn9ukbx8.js → diagram-VX7I27RA-i6dM64lY.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-CMl4dVbW.js → diagram-Z3DM3KII-DjmFpXQp.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-CBwYQRJ8.js → ebnfDiagram-PWID7BFC-deleYYQ9.js} +1 -1
- package/web/assets/{enterprise-management-service-DahI8TVf.js → enterprise-management-service-C1xVQRhM.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-CIIffxms.js → erDiagram-2YWLMYGG-C9FSq7LS.js} +1 -1
- package/web/assets/{error-presentation-BxUofys_.js → error-presentation-CLToNQLS.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-hWu2S6nd.js → flowDiagram-T62WH6J4-DtljfCw3.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-DQQyyM2R.js → ganttDiagram-EL5Y4UJY-CSXnaMni.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-bod8pPxm.js → gitGraphDiagram-WWUBYQGX-Di0kI-1M.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-4N4KDMmd.js → hosted-conversation-template-client-DbIHvkrV.js} +1 -1
- package/web/assets/{index-BcU4a2UI.js → index-B5xNgQ1t.js} +1 -1
- package/web/assets/{index-fTGjG74c.js → index-BIm_Tk3o.js} +1 -1
- package/web/assets/{index-6BWD9-7y.js → index-BPzMXg_n.js} +1 -1
- package/web/assets/{index-DvTPCgd0.js → index-BRBLdEXg.js} +1 -1
- package/web/assets/{index-BV6jwloN.js → index-BSeoPuYp.js} +1 -1
- package/web/assets/{index-CqINCSE3.js → index-BZL0FA6c.js} +1 -1
- package/web/assets/{index-CKsN5tnJ.js → index-Blcdlvac.js} +1 -1
- package/web/assets/{index-WrhXkAuv.js → index-ByWLBx2B.js} +1 -1
- package/web/assets/{index-DtQPOl5N.js → index-BzSvld8B.js} +1 -1
- package/web/assets/{index-BGPZzJsA.js → index-C-VX-swt.js} +1 -1
- package/web/assets/{index-DkNKd-3B.js → index-C4DG-TeT.js} +1 -1
- package/web/assets/{index-BBmXtRn-.js → index-C5ytr62C.js} +1 -1
- package/web/assets/{index-DmVV73u3.js → index-CLqDl5dP.js} +1 -1
- package/web/assets/{index-CqmyW_rC.js → index-CMc6i3Wi.js} +1 -1
- package/web/assets/{index-B8VV5dHZ.js → index-CQoxyJVb.js} +1 -1
- package/web/assets/index-CVRqNx2a.js +24 -0
- package/web/assets/{index-C_5eJUYf.js → index-CnwTTmut.js} +1 -1
- package/web/assets/{index-DpVjIrhP.js → index-DJBpjVrN.js} +1 -1
- package/web/assets/{index-DvzWB-jx.js → index-DOHlV9Jh.js} +1 -1
- package/web/assets/{index-ngCP4sKA.js → index-DdQgI0Nw.js} +1 -1
- package/web/assets/{index-B4ZW-T6J.js → index-Dvd-FQwQ.js} +1 -1
- package/web/assets/{index-B5klvT1H.js → index-DyIDPBMW.js} +1 -1
- package/web/assets/index-Skcx40Vc.css +1 -0
- package/web/assets/{index-Dn7WvtF7.js → index-SpgzlIv_.js} +1 -1
- package/web/assets/{index-Dp3eq1zd.js → index-VJd0IGlY.js} +1 -1
- package/web/assets/{index-DWkq2AGW.js → index-boVb98GT.js} +1 -1
- package/web/assets/{index-CqTIvvh4.js → index-mX8fH4z4.js} +1 -1
- package/web/assets/{index-0qO_3KE2.js → index-tCTyx278.js} +1 -1
- package/web/assets/{infoDiagram-FKFFQAWI-CJqQEdwz.js → infoDiagram-FKFFQAWI-CbNMrx7h.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-Cj6-Lh3W.js → ishikawaDiagram-5VMMS53U-VSjH4PnX.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-BIL8wlwa.js → journeyDiagram-EYS64GPL-BRwD3GeT.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-BZQdoskd.js → kanban-definition-UXKFOSKX-D6br_A0l.js} +1 -1
- package/web/assets/{layout-C-meAuZp.js → layout-Bixg1i-E.js} +1 -1
- package/web/assets/{linear-BXP8QFmo.js → linear-DWmw_Gwx.js} +1 -1
- package/web/assets/{management-url-service-CEi28VSK.js → management-url-service-CPy3MZs4.js} +1 -1
- package/web/assets/{mar-agent-reasoning-effort-B8Q9Jpu3.js → mar-agent-reasoning-effort-1UkFSyMT.js} +1 -1
- package/web/assets/{mcp-center-service-CrXWIZ89.js → mcp-center-service-DmwSkGgg.js} +1 -1
- package/web/assets/{mermaid.core-DEciRvw4.js → mermaid.core-LS_zc-Bt.js} +5 -5
- package/web/assets/{mindmap-definition-THT77NOG-4232A9CN.js → mindmap-definition-THT77NOG-CrR0KKWF.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-DRW4xZe4.js → mobile-dialog-return-service-5WbCQ9BU.js} +1 -1
- package/web/assets/{oauth-callback--0hD7dZ7.js → oauth-callback-BQLNsVmp.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-z74k-wFd.js → pegDiagram-XKGWAZYB-CxNV4d55.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-BxYWkM_Z.js → pieDiagram-E7YTZNPT-bsXYPsk0.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-Cd6maoR6.js → quadrantDiagram-AXDQQJYC-VwOtLvwy.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-fsMvr3v8.js → railroadDiagram-O6MQD6OU-1aQGKT9S.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X--tU9WVRs.js → requirementDiagram-IS5BZ75X-D9J-rRym.js} +1 -1
- package/web/assets/runner-presentation-Dl-dyc4s.js +1 -0
- package/web/assets/{sankeyDiagram-P5KCCOFB-AUpbouE8.js → sankeyDiagram-P5KCCOFB-DfBuQS79.js} +1 -1
- package/web/assets/{scoped-http-service-BUd40otX.js → scoped-http-service-C6O8jAaD.js} +3 -3
- package/web/assets/{sequenceDiagram-WJ2MYXX4-CjH5OTU4.js → sequenceDiagram-WJ2MYXX4-hhdMaxJq.js} +1 -1
- package/web/assets/{session-share-client-service-CxqkMHWQ.js → session-share-client-service-Dko2LCk8.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-DYvFOlqy.js → sizeCapture-INFHLROL-CiUP98ob.js} +1 -1
- package/web/assets/{stateDiagram-XQSTLZYL-MwLwNWOb.js → stateDiagram-XQSTLZYL-KiAeEylc.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-BBopNovN.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-tf4B06so.js → swimlanes-V6O3JKXN-CMPrwHZc.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-yX0pvbP7.js +8 -0
- package/web/assets/{time-presentation-BLCYPkwu.js → time-presentation-Cx8NlbuB.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-wJWW5Met.js → timeline-definition-24CTP7MA-Cs8K8PAJ.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-Y_95t6qh.js → vennDiagram-4TSXK5OY-DRf0wRQQ.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-BscSDOEa.js → wardleyDiagram-VM6X3IG4-COGWwQ5R.js} +1 -1
- package/web/assets/{workbench-live-service-C2cXipPI.js → workbench-live-service-DB0U8ENT.js} +1 -1
- package/web/assets/{workbench-presentation-Cc9MAhUo.js → workbench-presentation-DRVLXW9E.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-CZLvj4Rq.js → xychartDiagram-S5SC5T6Z-nXmwJHjx.js} +1 -1
- 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.Ccx3H5CJ.js → app.DLMPS2hL.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.DFCTHYzr.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.Yfx6AKyP.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.CWPLf9EK.js → VPLocalSearchBox.6QoI_Fld.js} +1 -1
- package/web/docs/assets/chunks/{theme.DybUwjKs.js → theme.lQd303tB.js} +2 -2
- package/web/docs/assets/{concepts_node-and-workspace.md.D4_8X2QZ.js → concepts_node-and-workspace.md.kMVoeyoQ.js} +1 -1
- package/web/docs/assets/{concepts_node-and-workspace.md.D4_8X2QZ.lean.js → concepts_node-and-workspace.md.kMVoeyoQ.lean.js} +1 -1
- package/web/docs/assets/{en-US_concepts_node-and-workspace.md.BLl1KHPj.js → en-US_concepts_node-and-workspace.md.DXOEqvst.js} +1 -1
- package/web/docs/assets/{en-US_concepts_node-and-workspace.md.BLl1KHPj.lean.js → en-US_concepts_node-and-workspace.md.DXOEqvst.lean.js} +1 -1
- package/web/docs/assets/{en-US_operations_marctl.md.BwfEVzJW.js → en-US_operations_marctl.md.DRIQIZLV.js} +12 -7
- package/web/docs/assets/en-US_operations_marctl.md.DRIQIZLV.lean.js +1 -0
- package/web/docs/assets/en-US_workbench_composer.md.6M6RbR5_.js +1 -0
- package/web/docs/assets/{en-US_workbench_composer.md.DPuZWvfo.lean.js → en-US_workbench_composer.md.6M6RbR5_.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_hosted-conversations.md.KH0Jahs3.js +1 -0
- package/web/docs/assets/{en-US_workbench_hosted-conversations.md.CmeX1K43.lean.js → en-US_workbench_hosted-conversations.md.KH0Jahs3.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_navigation.md.jdb_CfyD.js +1 -0
- package/web/docs/assets/{en-US_workbench_navigation.md.3W7bsQ4I.lean.js → en-US_workbench_navigation.md.jdb_CfyD.lean.js} +1 -1
- package/web/docs/assets/{en-US_workbench_sessions.md.M9QKVl4Z.js → en-US_workbench_sessions.md.4DxY5XA7.js} +1 -1
- package/web/docs/assets/{en-US_workbench_sessions.md.M9QKVl4Z.lean.js → en-US_workbench_sessions.md.4DxY5XA7.lean.js} +1 -1
- package/web/docs/assets/operations_marctl.md.CGib1rcj.js +52 -0
- package/web/docs/assets/operations_marctl.md.CGib1rcj.lean.js +1 -0
- package/web/docs/assets/workbench_composer.md.CifbL-g0.js +1 -0
- package/web/docs/assets/{workbench_composer.md.fdtRWBnu.lean.js → workbench_composer.md.CifbL-g0.lean.js} +1 -1
- package/web/docs/assets/workbench_hosted-conversations.md.DzPCHOEK.js +1 -0
- package/web/docs/assets/{workbench_hosted-conversations.md.CxN8gwK2.lean.js → workbench_hosted-conversations.md.DzPCHOEK.lean.js} +1 -1
- package/web/docs/assets/workbench_navigation.md.B68IQzEX.js +1 -0
- package/web/docs/assets/workbench_navigation.md.B68IQzEX.lean.js +1 -0
- package/web/docs/assets/workbench_sessions.md.CeNjkWLp.js +1 -0
- package/web/docs/assets/workbench_sessions.md.CeNjkWLp.lean.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 +5 -5
- 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 +5 -5
- 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 +15 -10
- 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 +3 -3
- 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 +3 -3
- 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 +5 -5
- package/web/docs/en-US/workbench/mobile.html +3 -3
- package/web/docs/en-US/workbench/navigation.html +5 -5
- 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 +15 -10
- 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 +3 -3
- 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 +3 -3
- 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 +5 -5
- package/web/docs/workbench/mobile.html +3 -3
- package/web/docs/workbench/navigation.html +5 -5
- 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 +9 -9
- package/web/service-worker.js +1 -1
- package/web/web-version.json +1 -1
- package/web/assets/AuditManagementPage-CYoJq8Xa.js +0 -1
- package/web/assets/NodeManagementPage-2pXVBnT4.js +0 -1
- package/web/assets/NodeManagementPage-D4RMXsxU.js +0 -1
- package/web/assets/SecretManagementPage-CmacyjNp.js +0 -1
- package/web/assets/SettingsContent-DbQffb3M.js +0 -1
- package/web/assets/SettingsContent-tt-arviP.css +0 -1
- package/web/assets/SkillCenterPage-fGS7KJAs.js +0 -1
- package/web/assets/WorkbenchPage-CRijp6VW.css +0 -1
- package/web/assets/WorkbenchPage-DcKTz_2C.js +0 -21
- package/web/assets/WorkspaceManagementPage-8Ys5XP7n.js +0 -1
- package/web/assets/WorkspaceManagementPage-C_VJkfy7.js +0 -1
- package/web/assets/channel-nZqGfUVf.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-Bx88BLRs.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-Bx88BLRs.js +0 -1
- package/web/assets/index-Bnw27ovL.css +0 -1
- package/web/assets/index-DX5iLtIS.js +0 -24
- package/web/assets/runner-presentation-CQEHD1-x.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-pXCRAnFo.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-DnlQN3xG.js +0 -8
- package/web/docs/assets/chunks/@localSearchIndexen-US.CB1zBLop.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.Dt1o2ZGd.js +0 -1
- package/web/docs/assets/en-US_operations_marctl.md.BwfEVzJW.lean.js +0 -1
- package/web/docs/assets/en-US_workbench_composer.md.DPuZWvfo.js +0 -1
- package/web/docs/assets/en-US_workbench_hosted-conversations.md.CmeX1K43.js +0 -1
- package/web/docs/assets/en-US_workbench_navigation.md.3W7bsQ4I.js +0 -1
- package/web/docs/assets/operations_marctl.md.DViLDEoR.js +0 -47
- package/web/docs/assets/operations_marctl.md.DViLDEoR.lean.js +0 -1
- package/web/docs/assets/workbench_composer.md.fdtRWBnu.js +0 -1
- package/web/docs/assets/workbench_hosted-conversations.md.CxN8gwK2.js +0 -1
- package/web/docs/assets/workbench_navigation.md.HvELxpD-.js +0 -1
- package/web/docs/assets/workbench_navigation.md.HvELxpD-.lean.js +0 -1
- package/web/docs/assets/workbench_sessions.md.CwztGf0o.js +0 -1
- package/web/docs/assets/workbench_sessions.md.CwztGf0o.lean.js +0 -1
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { MANAGEMENT_MAX_LIMIT, runnerNameSchema, scheduledTaskTargetKindSchema } from '@myagentroam/protocol';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const id = z.string().min(1).max(128);
|
|
4
|
+
const timestamp = z.number().int().nonnegative().safe();
|
|
5
|
+
export const scheduledTaskIndexEntry = z.object({
|
|
6
|
+
id,
|
|
7
|
+
workspaceId: id,
|
|
8
|
+
ownerUserId: z.number().int().positive().safe(),
|
|
9
|
+
name: z.string().min(1).max(160),
|
|
10
|
+
runner: runnerNameSchema,
|
|
11
|
+
sessionId: z.string().min(1).max(512).nullable(),
|
|
12
|
+
enabled: z.boolean(),
|
|
13
|
+
nextRunAt: timestamp.nullable()
|
|
14
|
+
});
|
|
15
|
+
const baselineLimit = 100;
|
|
16
|
+
export const scheduledTaskCardEntry = scheduledTaskIndexEntry.extend({
|
|
17
|
+
targetKind: scheduledTaskTargetKindSchema
|
|
18
|
+
});
|
|
19
|
+
const baselinePage = z.object({
|
|
20
|
+
tasks: z.array(scheduledTaskCardEntry).max(baselineLimit),
|
|
21
|
+
nextCursor: id.nullable()
|
|
22
|
+
});
|
|
23
|
+
const taskStateSql = {
|
|
24
|
+
scheduled: 'AND enabled=1 AND next_run_at IS NOT NULL',
|
|
25
|
+
paused: "AND enabled=0 AND target_kind<>'unbound'",
|
|
26
|
+
finished: 'AND enabled=1 AND next_run_at IS NULL',
|
|
27
|
+
unbound: "AND target_kind='unbound'"
|
|
28
|
+
};
|
|
29
|
+
const cardColumns = 'task_id,owner_user_id,name,runner,session_id,target_kind,enabled,next_run_at,synced_at';
|
|
30
|
+
function indexListScope(nodeId, workspaceId, filter) {
|
|
31
|
+
return {
|
|
32
|
+
scope: `FROM scheduled_task_index WHERE node_id=? AND workspace_id=?
|
|
33
|
+
${filter.ownerUserId === undefined ? '' : 'AND owner_user_id=?'}
|
|
34
|
+
${filter.sessionId === undefined ? '' : 'AND session_id=?'}
|
|
35
|
+
${filter.state === undefined ? '' : taskStateSql[filter.state]}`,
|
|
36
|
+
params: [
|
|
37
|
+
nodeId,
|
|
38
|
+
workspaceId,
|
|
39
|
+
...[filter.ownerUserId, filter.sessionId].filter((part) => part !== undefined)
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function indexedCard(row, workspaceId) {
|
|
44
|
+
return {
|
|
45
|
+
...scheduledTaskIndexEntry.parse({
|
|
46
|
+
id: row.task_id,
|
|
47
|
+
workspaceId,
|
|
48
|
+
ownerUserId: Number(row.owner_user_id),
|
|
49
|
+
name: row.name,
|
|
50
|
+
runner: row.runner,
|
|
51
|
+
sessionId: row.session_id,
|
|
52
|
+
enabled: row.enabled === 1,
|
|
53
|
+
nextRunAt: row.next_run_at === null ? null : Number(row.next_run_at)
|
|
54
|
+
}),
|
|
55
|
+
targetKind: scheduledTaskTargetKindSchema.parse(row.target_kind),
|
|
56
|
+
syncedAt: Number(row.synced_at)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** Maintains one complete snapshot per Workspace, never a partial or user-filtered page. */
|
|
60
|
+
export class ScheduledTaskIndex {
|
|
61
|
+
store;
|
|
62
|
+
now;
|
|
63
|
+
pending = new Map();
|
|
64
|
+
constructor(store, now = Date.now) {
|
|
65
|
+
this.store = store;
|
|
66
|
+
this.now = now;
|
|
67
|
+
}
|
|
68
|
+
invalidate(nodeId, workspaceId) {
|
|
69
|
+
const pending = this.pending.get(JSON.stringify([nodeId, workspaceId]));
|
|
70
|
+
if (pending?.started)
|
|
71
|
+
pending.invalidated = true;
|
|
72
|
+
}
|
|
73
|
+
refresh(input) {
|
|
74
|
+
const key = JSON.stringify([input.nodeId, input.workspaceId]);
|
|
75
|
+
const pending = this.pending.get(key);
|
|
76
|
+
if (pending && !pending.current())
|
|
77
|
+
pending.invalidated = true;
|
|
78
|
+
if (pending && !pending.invalidated)
|
|
79
|
+
return pending.settled;
|
|
80
|
+
const current = () => !state.invalidated && input.current();
|
|
81
|
+
const refresh = (pending?.settled ?? Promise.resolve())
|
|
82
|
+
.then(async () => {
|
|
83
|
+
state.started = true;
|
|
84
|
+
if (!current())
|
|
85
|
+
return;
|
|
86
|
+
const entries = [];
|
|
87
|
+
let after;
|
|
88
|
+
for (;;) {
|
|
89
|
+
const page = baselinePage.parse(await input.read(after));
|
|
90
|
+
if (!current())
|
|
91
|
+
return;
|
|
92
|
+
for (const task of page.tasks) {
|
|
93
|
+
if (task.workspaceId !== input.workspaceId ||
|
|
94
|
+
(after !== undefined && task.id <= after) ||
|
|
95
|
+
(task.targetKind === 'existing') !== (task.sessionId !== null))
|
|
96
|
+
throw new Error('SCHEDULE_BASELINE_INVALID');
|
|
97
|
+
entries.push(task);
|
|
98
|
+
after = task.id;
|
|
99
|
+
}
|
|
100
|
+
if (page.nextCursor === null)
|
|
101
|
+
break;
|
|
102
|
+
if (page.tasks.length !== baselineLimit || page.nextCursor !== after)
|
|
103
|
+
throw new Error('SCHEDULE_BASELINE_INVALID');
|
|
104
|
+
}
|
|
105
|
+
await this.store.replace(input.nodeId, input.workspaceId, entries, this.now(), current);
|
|
106
|
+
})
|
|
107
|
+
.catch(input.onError)
|
|
108
|
+
.finally(() => {
|
|
109
|
+
if (this.pending.get(key) === state)
|
|
110
|
+
this.pending.delete(key);
|
|
111
|
+
});
|
|
112
|
+
const state = { invalidated: false, started: false, current: input.current, settled: refresh };
|
|
113
|
+
this.pending.set(key, state);
|
|
114
|
+
return refresh;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** Drives the index from accepted business connections and Workspace events, not user traffic. */
|
|
118
|
+
export class ScheduledTaskIndexProjection {
|
|
119
|
+
index;
|
|
120
|
+
source;
|
|
121
|
+
seen = new Map();
|
|
122
|
+
pending = new Set();
|
|
123
|
+
stopped = false;
|
|
124
|
+
constructor(index, source) {
|
|
125
|
+
this.index = index;
|
|
126
|
+
this.source = source;
|
|
127
|
+
}
|
|
128
|
+
connectionChanged(nodeId) {
|
|
129
|
+
if (this.stopped)
|
|
130
|
+
return;
|
|
131
|
+
const connection = this.source.connection(nodeId);
|
|
132
|
+
if (connection === undefined) {
|
|
133
|
+
this.seen.delete(nodeId);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (this.seen.get(nodeId) === connection)
|
|
137
|
+
return;
|
|
138
|
+
this.seen.set(nodeId, connection);
|
|
139
|
+
this.track(this.source
|
|
140
|
+
.workspaces(nodeId)
|
|
141
|
+
.then(async (workspaces) => {
|
|
142
|
+
for (const workspaceId of workspaces) {
|
|
143
|
+
if (!this.current(nodeId, connection))
|
|
144
|
+
break;
|
|
145
|
+
await this.refresh(nodeId, connection, workspaceId);
|
|
146
|
+
}
|
|
147
|
+
})
|
|
148
|
+
.catch(() => this.source.onError(nodeId)));
|
|
149
|
+
}
|
|
150
|
+
changed(nodeId, workspaceId) {
|
|
151
|
+
if (this.stopped)
|
|
152
|
+
return;
|
|
153
|
+
const connection = this.source.connection(nodeId);
|
|
154
|
+
if (connection === undefined)
|
|
155
|
+
return;
|
|
156
|
+
this.index.invalidate(nodeId, workspaceId);
|
|
157
|
+
this.track(this.refresh(nodeId, connection, workspaceId));
|
|
158
|
+
}
|
|
159
|
+
stop() {
|
|
160
|
+
this.stopped = true;
|
|
161
|
+
this.seen.clear();
|
|
162
|
+
}
|
|
163
|
+
async drain() {
|
|
164
|
+
await Promise.all(this.pending);
|
|
165
|
+
}
|
|
166
|
+
current(nodeId, connection) {
|
|
167
|
+
return !this.stopped && this.source.connection(nodeId) === connection;
|
|
168
|
+
}
|
|
169
|
+
refresh(nodeId, connection, workspaceId) {
|
|
170
|
+
return this.index.refresh({
|
|
171
|
+
nodeId,
|
|
172
|
+
workspaceId,
|
|
173
|
+
current: () => this.current(nodeId, connection),
|
|
174
|
+
read: (afterTaskId) => this.source.read(nodeId, connection, workspaceId, afterTaskId),
|
|
175
|
+
onError: () => this.source.onError(nodeId, workspaceId)
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
track(request) {
|
|
179
|
+
this.pending.add(request);
|
|
180
|
+
void request.then(() => this.pending.delete(request), () => this.pending.delete(request));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/** Public persistence adapter. Resource removal uses the same parent-row locks as replacement. */
|
|
184
|
+
export class MysqlScheduledTaskIndex {
|
|
185
|
+
pool;
|
|
186
|
+
constructor(pool) {
|
|
187
|
+
this.pool = pool;
|
|
188
|
+
}
|
|
189
|
+
async registeredWorkspaceIds(nodeId) {
|
|
190
|
+
const [rows] = await this.pool.execute('SELECT workspace_id FROM workspaces WHERE node_id=? ORDER BY workspace_id', [nodeId]);
|
|
191
|
+
return rows.map((row) => String(row.workspace_id));
|
|
192
|
+
}
|
|
193
|
+
async workspaceIds(nodeId) {
|
|
194
|
+
const [rows] = await this.pool.execute('SELECT DISTINCT workspace_id FROM scheduled_task_index WHERE node_id=?', [nodeId]);
|
|
195
|
+
return rows.map((row) => String(row.workspace_id));
|
|
196
|
+
}
|
|
197
|
+
async list(nodeId, workspaceId, filter, limit) {
|
|
198
|
+
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
199
|
+
throw new Error('SCHEDULE_INDEX_LIMIT_INVALID');
|
|
200
|
+
// mysql2 binds numbers as DOUBLE, which MySQL can reject for a prepared LIMIT.
|
|
201
|
+
const { scope, params } = indexListScope(nodeId, workspaceId, filter);
|
|
202
|
+
const [rows] = await this.pool.execute(`SELECT ${cardColumns} ${scope}
|
|
203
|
+
${filter.afterTaskId === undefined ? '' : 'AND task_id>?'} ORDER BY task_id LIMIT ${limit}`, filter.afterTaskId === undefined ? params : [...params, filter.afterTaskId]);
|
|
204
|
+
return rows.map((row) => indexedCard(row, workspaceId));
|
|
205
|
+
}
|
|
206
|
+
async page(nodeId, workspaceId, filter, offset, limit) {
|
|
207
|
+
if (!Number.isSafeInteger(offset) ||
|
|
208
|
+
offset < 0 ||
|
|
209
|
+
!Number.isSafeInteger(limit) ||
|
|
210
|
+
limit < 0 ||
|
|
211
|
+
limit > MANAGEMENT_MAX_LIMIT)
|
|
212
|
+
throw new Error('SCHEDULE_INDEX_LIMIT_INVALID');
|
|
213
|
+
const { scope, params } = indexListScope(nodeId, workspaceId, filter);
|
|
214
|
+
const count = async (connection) => {
|
|
215
|
+
const [rows] = await connection.execute(`SELECT COUNT(*) AS total ${scope}`, params);
|
|
216
|
+
return timestamp.parse(Number(rows[0]?.total));
|
|
217
|
+
};
|
|
218
|
+
if (limit === 0)
|
|
219
|
+
return { total: await count(this.pool), tasks: [] };
|
|
220
|
+
const connection = await this.pool.getConnection();
|
|
221
|
+
try {
|
|
222
|
+
await connection.query('SET TRANSACTION ISOLATION LEVEL REPEATABLE READ');
|
|
223
|
+
await connection.beginTransaction();
|
|
224
|
+
const total = await count(connection);
|
|
225
|
+
const [rows] = offset >= total
|
|
226
|
+
? [[]]
|
|
227
|
+
: await connection.execute(`SELECT ${cardColumns} ${scope} ORDER BY task_id LIMIT ${limit} OFFSET ${offset}`, params);
|
|
228
|
+
const tasks = rows.map((row) => indexedCard(row, workspaceId));
|
|
229
|
+
await connection.commit();
|
|
230
|
+
return { total, tasks };
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
await connection.rollback();
|
|
234
|
+
throw error;
|
|
235
|
+
}
|
|
236
|
+
finally {
|
|
237
|
+
connection.release();
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
async replace(nodeId, workspaceId, entries, syncedAt, current) {
|
|
241
|
+
const connection = await this.pool.getConnection();
|
|
242
|
+
try {
|
|
243
|
+
await connection.beginTransaction();
|
|
244
|
+
const owners = new Set();
|
|
245
|
+
// Take user locks before Node/Workspace locks, matching account removal.
|
|
246
|
+
for (const owner of [...new Set(entries.map((task) => task.ownerUserId))].sort((a, b) => a - b)) {
|
|
247
|
+
const [users] = await connection.execute('SELECT id FROM users WHERE id=? FOR SHARE', [owner]);
|
|
248
|
+
if (users.length === 1)
|
|
249
|
+
owners.add(owner);
|
|
250
|
+
}
|
|
251
|
+
const [nodes] = await connection.execute('SELECT id FROM nodes WHERE id=? AND disabled=0 FOR SHARE', [nodeId]);
|
|
252
|
+
const [workspaces] = await connection.execute('SELECT workspace_id FROM workspaces WHERE workspace_id=? AND node_id=? FOR UPDATE', [workspaceId, nodeId]);
|
|
253
|
+
if (nodes.length !== 1 || workspaces.length !== 1 || !current()) {
|
|
254
|
+
await connection.rollback();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
await removeScheduledTaskIndex(connection, { nodeId, workspaceId });
|
|
258
|
+
for (const task of entries) {
|
|
259
|
+
// An account can be removed independently of its tasks on the Node.
|
|
260
|
+
if (!owners.has(task.ownerUserId))
|
|
261
|
+
continue;
|
|
262
|
+
await connection.execute(`INSERT INTO scheduled_task_index
|
|
263
|
+
(node_id,workspace_id,task_id,owner_user_id,name,runner,session_id,target_kind,enabled,next_run_at,synced_at)
|
|
264
|
+
VALUES (?,?,?,?,?,?,?,?,?,?,?)`, [
|
|
265
|
+
nodeId,
|
|
266
|
+
workspaceId,
|
|
267
|
+
task.id,
|
|
268
|
+
task.ownerUserId,
|
|
269
|
+
task.name,
|
|
270
|
+
task.runner,
|
|
271
|
+
task.sessionId,
|
|
272
|
+
task.targetKind,
|
|
273
|
+
task.enabled ? 1 : 0,
|
|
274
|
+
task.nextRunAt,
|
|
275
|
+
syncedAt
|
|
276
|
+
]);
|
|
277
|
+
}
|
|
278
|
+
if (current())
|
|
279
|
+
await connection.commit();
|
|
280
|
+
else
|
|
281
|
+
await connection.rollback();
|
|
282
|
+
}
|
|
283
|
+
catch (error) {
|
|
284
|
+
await connection.rollback();
|
|
285
|
+
throw error;
|
|
286
|
+
}
|
|
287
|
+
finally {
|
|
288
|
+
connection.release();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
export async function removeScheduledTaskIndex(connection, scope) {
|
|
293
|
+
if ('ownerUserId' in scope) {
|
|
294
|
+
await connection.execute('DELETE FROM scheduled_task_index WHERE owner_user_id=?', [
|
|
295
|
+
scope.ownerUserId
|
|
296
|
+
]);
|
|
297
|
+
}
|
|
298
|
+
else if (scope.workspaceId === undefined) {
|
|
299
|
+
await connection.execute('DELETE FROM scheduled_task_index WHERE node_id=?', [scope.nodeId]);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
await connection.execute('DELETE FROM scheduled_task_index WHERE node_id=? AND workspace_id=?', [scope.nodeId, scope.workspaceId]);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface ScheduledTaskSlice<T> {
|
|
2
|
+
readonly total: number;
|
|
3
|
+
readonly read: (offset: number, limit: number) => Promise<{
|
|
4
|
+
total: number;
|
|
5
|
+
tasks: readonly T[];
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ScheduledTaskPageChanged extends Error {
|
|
9
|
+
}
|
|
10
|
+
/** Reads just the target window from the already authorized, ordered Workspace sources. */
|
|
11
|
+
export declare function readScheduledTaskPage<T>(sources: readonly ScheduledTaskSlice<T>[], requestedPage: number, pageSize: number): Promise<{
|
|
12
|
+
items: T[];
|
|
13
|
+
page: number;
|
|
14
|
+
pageSize: number;
|
|
15
|
+
total: number;
|
|
16
|
+
hasMore: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class ScheduledTaskPageChanged extends Error {
|
|
2
|
+
}
|
|
3
|
+
/** Reads just the target window from the already authorized, ordered Workspace sources. */
|
|
4
|
+
export async function readScheduledTaskPage(sources, requestedPage, pageSize) {
|
|
5
|
+
const total = sources.reduce((sum, source) => sum + source.total, 0);
|
|
6
|
+
if (!Number.isSafeInteger(total))
|
|
7
|
+
throw new Error('NODE_RESPONSE_INVALID');
|
|
8
|
+
const lastPage = Math.max(1, Math.ceil(total / pageSize));
|
|
9
|
+
const page = Math.min(requestedPage, lastPage);
|
|
10
|
+
let skip = (page - 1) * pageSize;
|
|
11
|
+
let remaining = pageSize;
|
|
12
|
+
const reads = [];
|
|
13
|
+
for (const source of sources) {
|
|
14
|
+
if (skip >= source.total) {
|
|
15
|
+
skip -= source.total;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
const offset = skip;
|
|
19
|
+
const limit = Math.min(remaining, source.total - offset);
|
|
20
|
+
reads.push(source.read(offset, limit).then((result) => {
|
|
21
|
+
if (result.total !== source.total || result.tasks.length !== limit)
|
|
22
|
+
throw new ScheduledTaskPageChanged();
|
|
23
|
+
return result.tasks;
|
|
24
|
+
}));
|
|
25
|
+
remaining -= limit;
|
|
26
|
+
if (remaining === 0)
|
|
27
|
+
break;
|
|
28
|
+
skip = 0;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
items: (await Promise.all(reads)).flat(),
|
|
32
|
+
page,
|
|
33
|
+
pageSize,
|
|
34
|
+
total,
|
|
35
|
+
hasMore: page < lastPage
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FastifyInstance, FastifyReply } from 'fastify';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { SessionRunNodeControl, SessionRunStore } from './session-run-contracts.js';
|
|
4
|
+
import { type ScheduledTaskIndexStore } from './scheduled-task-index.js';
|
|
5
|
+
declare const directoryWorkspace: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
path: z.ZodOptional<z.ZodString>;
|
|
8
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
displayName?: string | undefined;
|
|
12
|
+
path?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
id: string;
|
|
15
|
+
displayName?: string | undefined;
|
|
16
|
+
path?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
interface DirectoryNode {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
connected: boolean;
|
|
22
|
+
supported: boolean;
|
|
23
|
+
newSessionSupported: boolean;
|
|
24
|
+
}
|
|
25
|
+
interface DirectoryWorkspace {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ScheduledTaskDirectory {
|
|
30
|
+
nodes(userId: number): Promise<readonly DirectoryNode[]>;
|
|
31
|
+
workspaces(userId: number, nodeId: string, entries: readonly z.infer<typeof directoryWorkspace>[], source: 'live' | 'index'): Promise<readonly DirectoryWorkspace[]>;
|
|
32
|
+
canUseWorkspace(userId: number, nodeId: string, workspaceId: string): Promise<boolean>;
|
|
33
|
+
}
|
|
34
|
+
interface Options {
|
|
35
|
+
app: FastifyInstance;
|
|
36
|
+
database: Pick<SessionRunStore, 'findCurrentUserSession' | 'userDisplayName'>;
|
|
37
|
+
nodeControl: SessionRunNodeControl;
|
|
38
|
+
publicOrigin: string | undefined;
|
|
39
|
+
databaseError(reply: FastifyReply, error: unknown): FastifyReply;
|
|
40
|
+
schedules: ScheduledTaskDirectory;
|
|
41
|
+
index: Pick<ScheduledTaskIndexStore, 'page' | 'workspaceIds'>;
|
|
42
|
+
}
|
|
43
|
+
/** Authorizes and merges Node snapshots. No clock, task prompt or execution state is owned here. */
|
|
44
|
+
export declare function registerScheduledTaskRoutes({ app, database, nodeControl, publicOrigin, databaseError, schedules, index }: Options): void;
|
|
45
|
+
export {};
|