@myagentroam/server 0.15.52 → 0.15.53
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 +21 -22
- package/node_modules/@myagentroam/protocol/dist/index.js +0 -1
- package/node_modules/@myagentroam/protocol/dist/marctl-execution-credential.d.ts +2 -2
- package/node_modules/@myagentroam/protocol/dist/notification-channels.d.ts +49 -321
- package/node_modules/@myagentroam/protocol/dist/notification-channels.js +34 -53
- package/node_modules/@myagentroam/protocol/dist/workbench-notification.d.ts +12 -12
- package/node_modules/@myagentroam/protocol/package.json +1 -1
- package/node_modules/@myagentroam/server-core/dist/audit.js +2 -0
- package/node_modules/@myagentroam/server-core/dist/environment-secret-contracts.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/environment-secret-routes.js +16 -0
- package/node_modules/@myagentroam/server-core/dist/environment-secret-store.d.ts +2 -1
- package/node_modules/@myagentroam/server-core/dist/environment-secret-store.js +7 -5
- package/node_modules/@myagentroam/server-core/dist/image-generation-configuration-service.d.ts +1 -1
- package/node_modules/@myagentroam/server-core/dist/image-generation-configuration-service.js +6 -2
- package/node_modules/@myagentroam/server-core/dist/mail-notification-service.d.ts +7 -7
- package/node_modules/@myagentroam/server-core/dist/mail-notification-service.js +68 -101
- package/node_modules/@myagentroam/server-core/dist/mysql-schema.d.ts +5 -0
- package/node_modules/@myagentroam/server-core/dist/mysql-schema.js +13 -1
- package/node_modules/@myagentroam/server-core/dist/node-message-projector.d.ts +2 -1
- package/node_modules/@myagentroam/server-core/dist/node-message-projector.js +8 -5
- package/node_modules/@myagentroam/server-core/dist/node-request-channel.d.ts +1 -0
- package/node_modules/@myagentroam/server-core/dist/node-request-channel.js +3 -0
- package/node_modules/@myagentroam/server-core/dist/notification-channel-service.d.ts +2 -6
- package/node_modules/@myagentroam/server-core/dist/notification-channel-service.js +33 -120
- package/node_modules/@myagentroam/server-core/dist/notification-delivery-service.d.ts +29 -0
- package/node_modules/@myagentroam/server-core/dist/notification-delivery-service.js +103 -0
- package/node_modules/@myagentroam/server-core/dist/notification-preferences.d.ts +9 -0
- package/node_modules/@myagentroam/server-core/dist/notification-preferences.js +18 -0
- package/node_modules/@myagentroam/server-core/dist/notification-routes.d.ts +2 -0
- package/node_modules/@myagentroam/server-core/dist/notification-routes.js +22 -0
- package/node_modules/@myagentroam/server-core/dist/workbench-notification-service.d.ts +12 -7
- package/node_modules/@myagentroam/server-core/dist/workbench-notification-service.js +26 -13
- package/node_modules/@myagentroam/server-core/package.json +12 -7
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/audit/audit-policy.js +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-application.js +19 -16
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-notifications.d.ts +6 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/composition/server-notifications.js +27 -6
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/mysql/environment-secret-service.d.ts +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/mysql/environment-secret-service.js +6 -4
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.d.ts +1 -2
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/node-control.js +12 -22
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-access-service.d.ts +1 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/rbac/resource-access-service.js +25 -8
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/environment-secret-service.d.ts +5 -1
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/environment-secret-service.js +7 -7
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.d.ts +1 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/dist/service/node-request-broker.js +7 -0
- package/node_modules/@myagentroam-enterprise/server-implementation/package.json +3 -3
- package/package.json +5 -5
- package/web/assets/AuditManagementPage-CrV6erEh.css +1 -0
- package/web/assets/AuditManagementPage-u0pQpfNV.js +1 -0
- package/web/assets/{AuthEntryPanel-HcwZJX_O.js → AuthEntryPanel-C0Gnp4pg.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-B7vyGMGT.js → ConversationTemplateManagementPage-4aFBjP5s.js} +1 -1
- package/web/assets/{ConversationTemplateManagementPage-DZ_cOmwZ.js → ConversationTemplateManagementPage-X4otdJ1i.js} +1 -1
- package/web/assets/{DocxPreview-_GOeKN2I.js → DocxPreview-CMRUWreF.js} +3 -3
- package/web/assets/{EnterpriseUserManagementPage-CEEI_JFp.js → EnterpriseUserManagementPage-BGpDM-98.js} +1 -1
- package/web/assets/EnvironmentSecretManager-CzWBEcc1.css +1 -0
- package/web/assets/EnvironmentSecretManager-G9UoPjO-.js +1 -0
- package/web/assets/{FilePreviewState-B2BSsP5f.js → FilePreviewState-YBBCSXUe.js} +1 -1
- package/web/assets/{ImagePreview-DnF2HwMD.js → ImagePreview-BwFqX1Qu.js} +1 -1
- package/web/assets/{ImagePreviewViewport-DsCSD1Os.js → ImagePreviewViewport-Zyq5vgSU.js} +1 -1
- package/web/assets/{LicenseManagementPage--gV_a813.js → LicenseManagementPage-BOKeVRm_.js} +1 -1
- package/web/assets/{ManagementPagination-Bd8j0sx7.js → ManagementPagination-BZTba5OO.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-BE46jpLP.js → MarAgentModelManagementPage-B1xXvGA9.js} +1 -1
- package/web/assets/{MarAgentModelManagementPage-C0Eqoxs5.js → MarAgentModelManagementPage-BMG-ThPn.js} +1 -1
- package/web/assets/{MarAlert-D0tNfB6h.js → MarAlert-DWSwLVPr.js} +1 -1
- package/web/assets/{MarCascader-CipqiUKv.js → MarCascader-Bi15XhGF.js} +1 -1
- package/web/assets/{MarCheckTag-DuWSVL-s.js → MarCheckTag-BS5rOdLM.js} +1 -1
- package/web/assets/{MarCheckboxGroup-d7dG2da3.js → MarCheckboxGroup-DTwZUv8a.js} +1 -1
- package/web/assets/{MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-COI6TJ8-.js → MarCheckboxGroup.vue_vue_type_style_index_0_scoped_3769668f_lang-Dj9mfBR2.js} +1 -1
- package/web/assets/{MarDatePicker-Bz5FPDdX.js → MarDatePicker-B7N40Jok.js} +1 -1
- package/web/assets/{MarDescriptionsItem-G-fOk8EE.js → MarDescriptionsItem-YIl-ISyr.js} +1 -1
- package/web/assets/{MarFormItem.vue_vue_type_script_setup_true_lang-BD0pilzJ.js → MarFormItem.vue_vue_type_script_setup_true_lang-BsNZfga3.js} +1 -1
- package/web/assets/{MarInputNumber-zcJohDTs.js → MarInputNumber-Btou9Zaf.js} +1 -1
- package/web/assets/{MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-BybnY3uy.js → MarOptionGroup.vue_vue_type_style_index_0_scoped_0cdd846e_lang-Ch7B8tyQ.js} +1 -1
- package/web/assets/{MarSwitch-B0AX953U.js → MarSwitch-B5dJyuTT.js} +1 -1
- package/web/assets/{MarTableColumn.vue_vue_type_script_setup_true_lang-B7WPl8AP.js → MarTableColumn.vue_vue_type_script_setup_true_lang-Ca2qV25F.js} +1 -1
- package/web/assets/{MarTabs-D6u1wE06.js → MarTabs-DE6e69_a.js} +1 -1
- package/web/assets/{MarTag-BHwz37J_.js → MarTag-OXlAfMpq.js} +1 -1
- package/web/assets/MarkdownFilePreview-CnDh9Jpj.js +1 -0
- package/web/assets/{MarkdownFilePreview.vue_vue_type_script_setup_true_lang-BAqCxIvj.js → MarkdownFilePreview.vue_vue_type_script_setup_true_lang-B7Cb8qEu.js} +1 -1
- package/web/assets/{MarkdownPreview-DS-pbMg8.js → MarkdownPreview-8yDd1j1y.js} +2 -2
- package/web/assets/{McpDetailsDialog-lxUD9KrQ.js → McpDetailsDialog-CEgsP3H4.js} +1 -1
- package/web/assets/{McpSourceManagementPage-BNfz6l6h.js → McpSourceManagementPage-CDDxswm3.js} +1 -1
- package/web/assets/{McpSourceManagementPage-DhlPEZ9l.js → McpSourceManagementPage-D_aCdM0w.js} +1 -1
- package/web/assets/{MediaPreview-LItFmKtF.js → MediaPreview-B1JYgU5U.js} +1 -1
- package/web/assets/{NodeDetailsDialogs-DtK3B4jM.js → NodeDetailsDialogs-CA0d3jBU.js} +1 -1
- package/web/assets/NodeManagementPage-DmjBj3Gh.js +1 -0
- package/web/assets/NodeManagementPage-DzPRVzQ8.js +1 -0
- package/web/assets/{OAuthManagementPage-SWRdugqE.js → OAuthManagementPage-nGY1OaYh.js} +1 -1
- package/web/assets/{OrganizationManagementPage-BSAMXLa1.js → OrganizationManagementPage-1Kn-aR1f.js} +1 -1
- package/web/assets/{PdfPreview-X8qn4vOT.js → PdfPreview-BecQfPJR.js} +1 -1
- package/web/assets/{PptxPreview-CxELeyl1.js → PptxPreview-D3v2KY03.js} +1 -1
- package/web/assets/{RemoteDesktopPage-BtWOaNkl.js → RemoteDesktopPage-B_-d0UY_.js} +1 -1
- package/web/assets/{ResourceManagementPanel-BggiraoQ.js → ResourceManagementPanel-oQg7z6qT.js} +1 -1
- package/web/assets/{ResourceManagementPanel.vue_vue_type_script_setup_true_lang-phlhys3Q.js → ResourceManagementPanel.vue_vue_type_script_setup_true_lang-D8ezk3wl.js} +1 -1
- package/web/assets/SecretManagementPage-Dv4U3sCz.js +1 -0
- package/web/assets/{SecretManagementPage-Dvr67BTg.js → SecretManagementPage-t_WJal-T.js} +1 -1
- package/web/assets/{SecretManagementPage.vue_vue_type_script_setup_true_lang-FNkxFhs9.js → SecretManagementPage.vue_vue_type_script_setup_true_lang-DstUNizc.js} +1 -1
- package/web/assets/{SessionSharePage-DYluLbb8.js → SessionSharePage-BR01vlOv.js} +2 -2
- package/web/assets/{SettingsContent-DjvKXCVK.js → SettingsContent-BdmjntO0.js} +1 -1
- package/web/assets/{SettingsContent-OrqaOFgv.css → SettingsContent-C9YYdnJ0.css} +1 -1
- package/web/assets/SettingsContent-CWgq77Ms.js +1 -0
- package/web/assets/{SkillCenterPage-DPKjokQ_.js → SkillCenterPage-BZiL8R75.js} +1 -1
- package/web/assets/SkillCenterPage-CgDctIs7.js +1 -0
- package/web/assets/{SkillDetailsDialog-RAUOiIpn.js → SkillDetailsDialog-BV5PcjMK.js} +1 -1
- package/web/assets/{SkillSourceManagementPage-C6tagv77.js → SkillSourceManagementPage-C_veNtpL.js} +1 -1
- package/web/assets/{SkillSourceManagementPage--543Xe-e.js → SkillSourceManagementPage-DSyZmuba.js} +1 -1
- package/web/assets/{StandaloneFilePreviewPage-SWsF26he.js → StandaloneFilePreviewPage-DG90Z7-x.js} +1 -1
- package/web/assets/{SystemConfigurationPage-DYyYYDU1.js → SystemConfigurationPage-DTYngX7e.js} +1 -1
- package/web/assets/{SystemConfigurationPage-BLv6z5h-.js → SystemConfigurationPage-zZSTnwi7.js} +1 -1
- package/web/assets/{SystemInformationPage-IxWcvWeD.js → SystemInformationPage-C55QG5es.js} +1 -1
- package/web/assets/{TerminalTabView-CgjPs0FN.js → TerminalTabView-BeasV_HL.js} +1 -1
- package/web/assets/{UTIF-Bsfnma3T.js → UTIF-DY8rxpAb.js} +1 -1
- package/web/assets/{WorkbenchPage-Bo_YEh-b.css → WorkbenchPage-BsW_cgVY.css} +1 -1
- package/web/assets/WorkbenchPage-CNbGQxPg.js +18 -0
- package/web/assets/WorkspaceManagementPage-BKLpGwvL.js +1 -0
- package/web/assets/WorkspaceManagementPage-Cl8ElgCf.js +1 -0
- package/web/assets/{XlsxPreview-BK8e9KeO.js → XlsxPreview-CRXGxFcP.js} +2 -2
- package/web/assets/{abnfDiagram-VCTEODGH-ksTFMv2I.js → abnfDiagram-VCTEODGH-D-yZLeyr.js} +1 -1
- package/web/assets/{architectureDiagram-5GKGNRK7-Cw6ge6ju.js → architectureDiagram-5GKGNRK7-pk1w-LGX.js} +1 -1
- package/web/assets/{blockDiagram-OSKFZWR5-CCpP6Mpq.js → blockDiagram-OSKFZWR5-DlzXDluN.js} +1 -1
- package/web/assets/{c4Diagram-7LVT6UL2-DzDbXgtN.js → c4Diagram-7LVT6UL2-DGP7yZWr.js} +1 -1
- package/web/assets/{catalog-ownership-service-CWtMisA-.js → catalog-ownership-service-_IPV3IVX.js} +1 -1
- package/web/assets/{catalog-page-service-Pqe_BETn.js → catalog-page-service-BvUww8HY.js} +1 -1
- package/web/assets/channel-Bih27ahM.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-B6NWyb-L.js → chunk-2Q5K7J3B-CGljPvQU.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-kApKLsw_.js → chunk-5VM5RSS4-wLTlLw77.js} +1 -1
- package/web/assets/{chunk-F27PBJKO-DrIsJEnh.js → chunk-F27PBJKO-DC8WZ2s7.js} +1 -1
- package/web/assets/{chunk-HLEWEB6X-C9E6XpnB.js → chunk-HLEWEB6X-B3tFwoxE.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-Ax1-y1js.js → chunk-JWPE2WC7-G6uAc7E4.js} +1 -1
- package/web/assets/{chunk-POPQ4Y6H-DL9QUHQt.js → chunk-POPQ4Y6H-BeOkkFle.js} +1 -1
- package/web/assets/{chunk-SVP7TREG-DTqrh-aQ.js → chunk-SVP7TREG-DyYKEkeH.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DI2C9A7p.js → chunk-XXDRQBXY-CTmQD217.js} +1 -1
- package/web/assets/{chunk-ZLD2IHE6-CTgFBXgA.js → chunk-ZLD2IHE6-D_L723B_.js} +1 -1
- package/web/assets/classDiagram-CYGNFDIV-BxyxfBEJ.js +1 -0
- package/web/assets/classDiagram-v2-TLXNO2FR-BxyxfBEJ.js +1 -0
- package/web/assets/{conversation-history-CgI1QDFX.js → conversation-history-Ddg4rWrY.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-Dct5ilxc.js → cose-bilkent-JH36ORCC-BEzUgKZ6.js} +1 -1
- package/web/assets/{cynefin-OW5HDTMX-C-xzFUmz.js → cynefin-OW5HDTMX-DVja0ba5.js} +1 -1
- package/web/assets/{cynefinDiagram-5FMLGOSQ-O3T6bY1-.js → cynefinDiagram-5FMLGOSQ-DmXY7AT0.js} +1 -1
- package/web/assets/{dagre-OS7QT2EB-Bf6cNdfl.js → dagre-OS7QT2EB-D_77n4X3.js} +1 -1
- package/web/assets/{diagram-S7CK7UJ4-BJDibGbV.js → diagram-S7CK7UJ4-QD72hYYj.js} +1 -1
- package/web/assets/{diagram-UQ7AKVKN-tiqETGeL.js → diagram-UQ7AKVKN-DZ5tOKmt.js} +1 -1
- package/web/assets/{diagram-VSXAHHWV-CXvdv1Qg.js → diagram-VSXAHHWV-BCDT5Nwe.js} +1 -1
- package/web/assets/{diagram-VX7I27RA-CjPfn1_0.js → diagram-VX7I27RA-CEUqL-jm.js} +1 -1
- package/web/assets/{diagram-Z3DM3KII-52CsLPGL.js → diagram-Z3DM3KII-Bad86S6K.js} +1 -1
- package/web/assets/{docx-preview-DPV6hfYe.js → docx-preview-Dzgt-enY.js} +1 -1
- package/web/assets/{ebnfDiagram-PWID7BFC-BItrm5IW.js → ebnfDiagram-PWID7BFC-FchAUONg.js} +1 -1
- package/web/assets/{editor-B7uCcFn8.js → editor-B97710Ea.js} +3 -3
- package/web/assets/{enterprise-management-service-BnKzPuH3.js → enterprise-management-service-CUf0PYyL.js} +1 -1
- package/web/assets/{erDiagram-2YWLMYGG-Cuy4FDBz.js → erDiagram-2YWLMYGG-BLewgdfw.js} +1 -1
- package/web/assets/{error-presentation-DR3k_eKo.js → error-presentation-3DbtrByw.js} +1 -1
- package/web/assets/{flowDiagram-T62WH6J4-BdOByKtx.js → flowDiagram-T62WH6J4-DIub7YBx.js} +1 -1
- package/web/assets/{ganttDiagram-EL5Y4UJY-B3oCzSLY.js → ganttDiagram-EL5Y4UJY-CGehBvZW.js} +1 -1
- package/web/assets/{gitGraphDiagram-WWUBYQGX-CnDenBvZ.js → gitGraphDiagram-WWUBYQGX-BqMQTczB.js} +1 -1
- package/web/assets/{hosted-conversation-template-client-B9Vi3BG5.js → hosted-conversation-template-client-DduMBlOP.js} +1 -1
- package/web/assets/{image-Cc4wFMqv.js → image-Bbh2NgKV.js} +1 -1
- package/web/assets/{index-OeqL9LoQ.js → index-B49etUx4.js} +1 -1
- package/web/assets/{index-AHKJzV3P.js → index-B5igvD_W.js} +1 -1
- package/web/assets/{index-DReH6a68.js → index-BMx29j4J.js} +1 -1
- package/web/assets/{index-DOVESO5o.js → index-BOH3Y5-W.js} +1 -1
- package/web/assets/{index-Cino59Qc.js → index-BXuAUE63.js} +1 -1
- package/web/assets/{index-9xaE1s44.js → index-BY0K37kC.js} +1 -1
- package/web/assets/{index-D1gHufRh.js → index-Bst1V4Az.js} +1 -1
- package/web/assets/{index-BeqAHPHf.js → index-BvG-Uzbn.js} +1 -1
- package/web/assets/{index-nEVfTrZp.js → index-CVfAtnR1.js} +1 -1
- package/web/assets/{index-BgYMUOmy.js → index-CeudrSVw.js} +1 -1
- package/web/assets/{index-B1lR5lkL.js → index-CsJ13Rrb.js} +1 -1
- package/web/assets/{index-wRPV25K3.js → index-CsXgHyRJ.js} +1 -1
- package/web/assets/{index-B5_086zF.js → index-CsdMKIqm.js} +1 -1
- package/web/assets/{index-DoH5ZECe.js → index-Ct4N8qI5.js} +1 -1
- package/web/assets/{index-CeZBAlm2.js → index-CyLLFmpD.js} +1 -1
- package/web/assets/{index-CDsxs4n9.js → index-DHABJSks.js} +1 -1
- package/web/assets/{index-CECkGoFr.js → index-DMXO_Zd8.js} +1 -1
- package/web/assets/{index-DOStYVsM.js → index-DlMY0I72.js} +1 -1
- package/web/assets/{index-DiqzHR4t.js → index-ILy5NOb7.js} +1 -1
- package/web/assets/{index-Cl_wLaCh.js → index-IursLDog.js} +1 -1
- package/web/assets/{index-BjdnxkEy.js → index-JDd7mJ6m.js} +1 -1
- package/web/assets/{index-BO2o_Zkm.js → index-dqESNTNP.js} +2 -2
- package/web/assets/{index-DkFaOYcv.js → index-oJvP_jM2.js} +13 -13
- package/web/assets/{index-DLC7vNpK.js → index-xFibF-Bm.js} +1 -1
- package/web/assets/{infoDiagram-FKFFQAWI-BZGZqi1V.js → infoDiagram-FKFFQAWI-DIQmNLPd.js} +1 -1
- package/web/assets/{ishikawaDiagram-5VMMS53U-BLEplqCs.js → ishikawaDiagram-5VMMS53U-DGB6UigB.js} +1 -1
- package/web/assets/{journeyDiagram-EYS64GPL-W9tzSXMx.js → journeyDiagram-EYS64GPL-D91QT5v4.js} +1 -1
- package/web/assets/{jszip.min-U55SbZ01.js → jszip.min-DT0HBe2k.js} +1 -1
- package/web/assets/{kanban-definition-UXKFOSKX-DMKOw3pc.js → kanban-definition-UXKFOSKX-BW4CAdRn.js} +1 -1
- package/web/assets/{layout-VQS-lyCX.js → layout-BvT4rCXb.js} +1 -1
- package/web/assets/{management-url-service-BHHIPUTN.js → management-url-service-aOVuZ-dM.js} +1 -1
- package/web/assets/{mar-agent-reasoning-effort-DbpC1AV5.js → mar-agent-reasoning-effort-mPZQXXJV.js} +1 -1
- package/web/assets/{markdown-renderer-BbuP4NkF.js → markdown-renderer-DKVjskCg.js} +1 -1
- package/web/assets/{mcp-center-service-Dcd5sW5s.js → mcp-center-service-C-2yIcZi.js} +1 -1
- package/web/assets/{mermaid.core-Dn2itrBX.js → mermaid.core-CDtEsN0b.js} +5 -5
- package/web/assets/{mindmap-definition-THT77NOG-BQYN8BOk.js → mindmap-definition-THT77NOG-NSe1PKRf.js} +1 -1
- package/web/assets/{mobile-dialog-return-service-CmZkd9Kh.js → mobile-dialog-return-service-CYzW7RAk.js} +1 -1
- package/web/assets/{oauth-callback-B4nREVj2.js → oauth-callback-CWPIeJJH.js} +1 -1
- package/web/assets/{parser-B3V3T3qx.js → parser-DEQ5oyaD.js} +1 -1
- package/web/assets/{pegDiagram-XKGWAZYB-CEahgxj8.js → pegDiagram-XKGWAZYB-Cr-QxaD-.js} +1 -1
- package/web/assets/{pieDiagram-E7YTZNPT-ByeIx419.js → pieDiagram-E7YTZNPT-B989byNn.js} +1 -1
- package/web/assets/{quadrantDiagram-AXDQQJYC-8nuRgFRR.js → quadrantDiagram-AXDQQJYC-D9ijZAuz.js} +1 -1
- package/web/assets/{railroadDiagram-O6MQD6OU-l6zhsKGs.js → railroadDiagram-O6MQD6OU-DKA1_zDV.js} +1 -1
- package/web/assets/{requirementDiagram-IS5BZ75X-DPpyhBaq.js → requirementDiagram-IS5BZ75X-DEFS5cIF.js} +1 -1
- package/web/assets/{runner-presentation-B4o8hNHX.js → runner-presentation-BmTUfrV_.js} +1 -1
- package/web/assets/{sankeyDiagram-P5KCCOFB-CfsSwG2y.js → sankeyDiagram-P5KCCOFB-DaHaM9DE.js} +1 -1
- package/web/assets/{scoped-http-service-BymASiVs.js → scoped-http-service-tmOcvZl4.js} +3 -3
- package/web/assets/{sequenceDiagram-WJ2MYXX4-_7fFwHEO.js → sequenceDiagram-WJ2MYXX4-JXt6j28s.js} +1 -1
- package/web/assets/{session-share-client-service-DcstNIxB.js → session-share-client-service-pLXcp6_e.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-nu5zZUaf.js → sizeCapture-INFHLROL-z9A6IhUq.js} +1 -1
- package/web/assets/{spreadsheet-9VxFGsN3.js → spreadsheet-C5jL97Cj.js} +4 -4
- package/web/assets/{stateDiagram-XQSTLZYL-BEc8r4um.js → stateDiagram-XQSTLZYL-B_Bo-iTF.js} +1 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-BUOoWf7O.js +1 -0
- package/web/assets/{swimlanes-V6O3JKXN-ClnvgRg9.js → swimlanes-V6O3JKXN-YAs2Lr0p.js} +1 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BZpHhFdH.js +8 -0
- package/web/assets/{time-presentation-BECQZR12.js → time-presentation-DzhBJ0MX.js} +1 -1
- package/web/assets/{timeline-definition-24CTP7MA-csXrMIJ_.js → timeline-definition-24CTP7MA-VXX9dIEJ.js} +1 -1
- package/web/assets/{vennDiagram-4TSXK5OY-DD4ydUoh.js → vennDiagram-4TSXK5OY-hbcydHph.js} +1 -1
- package/web/assets/{wardleyDiagram-VM6X3IG4-DTCZMBQJ.js → wardleyDiagram-VM6X3IG4-B2jZkq7E.js} +1 -1
- package/web/assets/{workbench-live-service-D_yanBzR.js → workbench-live-service-BRXp-EPl.js} +1 -1
- package/web/assets/{workbench-presentation-DdJLzUMz.js → workbench-presentation-Bp1UcQsy.js} +1 -1
- package/web/assets/{workspace-direct-transfer-service-C-5zzJvS.js → workspace-direct-transfer-service-CzIjQwtI.js} +1 -1
- package/web/assets/{xychartDiagram-S5SC5T6Z-9ap36HCL.js → xychartDiagram-S5SC5T6Z-B9mMfId4.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 +6 -10
- 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 +5 -5
- package/web/docs/administration/template-workspace-maintenance.html +3 -3
- package/web/docs/administration/users-organizations.html +3 -3
- package/web/docs/assets/administration_email-notifications.md.CvN_I6aa.js +9 -0
- package/web/docs/assets/{administration_email-notifications.md.C-l7j4kx.lean.js → administration_email-notifications.md.CvN_I6aa.lean.js} +1 -1
- package/web/docs/assets/administration_secrets.md.CmC_Vt4P.js +1 -0
- package/web/docs/assets/{administration_secrets.md.BZ9yYa-Q.lean.js → administration_secrets.md.CmC_Vt4P.lean.js} +1 -1
- package/web/docs/assets/{app.BqAZaQf1.js → app.DWOdy_Tb.js} +1 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.DvPUhWGI.js +1 -0
- package/web/docs/assets/chunks/@localSearchIndexroot.Bj3VDmS2.js +1 -0
- package/web/docs/assets/chunks/{VPLocalSearchBox.6rLKV5zk.js → VPLocalSearchBox.CpnpBGTe.js} +1 -1
- package/web/docs/assets/chunks/{theme.DkTEjmFp.js → theme.BN7f06Jl.js} +2 -2
- package/web/docs/assets/en-US_administration_email-notifications.md.BOOf20Fb.js +9 -0
- package/web/docs/assets/en-US_administration_email-notifications.md.BOOf20Fb.lean.js +1 -0
- package/web/docs/assets/en-US_administration_secrets.md.qAVPym-r.js +1 -0
- package/web/docs/assets/en-US_administration_secrets.md.qAVPym-r.lean.js +1 -0
- package/web/docs/assets/{en-US_operations_marctl.md.BZBz9kHP.js → en-US_operations_marctl.md.vZ2XibQR.js} +3 -3
- package/web/docs/assets/{en-US_operations_marctl.md.BZBz9kHP.lean.js → en-US_operations_marctl.md.vZ2XibQR.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_navigation.md.mNCaXOVe.js +1 -0
- package/web/docs/assets/{en-US_workbench_navigation.md.DHQ36S4_.lean.js → en-US_workbench_navigation.md.mNCaXOVe.lean.js} +1 -1
- package/web/docs/assets/en-US_workbench_terminal.md.CQNtORrE.js +1 -0
- package/web/docs/assets/{en-US_workbench_terminal.md.LNf8VNwh.lean.js → en-US_workbench_terminal.md.CQNtORrE.lean.js} +1 -1
- package/web/docs/assets/{operations_marctl.md.R1EkygKR.js → operations_marctl.md.BlyUJtLc.js} +3 -3
- package/web/docs/assets/{operations_marctl.md.R1EkygKR.lean.js → operations_marctl.md.BlyUJtLc.lean.js} +1 -1
- package/web/docs/assets/workbench_navigation.md.DW_3UzUG.js +1 -0
- package/web/docs/assets/{workbench_navigation.md.DK2QyY22.lean.js → workbench_navigation.md.DW_3UzUG.lean.js} +1 -1
- package/web/docs/assets/workbench_terminal.md.CBz6nYh9.js +1 -0
- package/web/docs/assets/{workbench_terminal.md.DzkARu3f.lean.js → workbench_terminal.md.CBz6nYh9.lean.js} +1 -1
- 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 +6 -10
- 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 +5 -5
- 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 +6 -6
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/web/docs/en-US/workbench/skills.html +3 -3
- package/web/docs/en-US/workbench/terminal.html +5 -5
- 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 +6 -6
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- package/web/docs/workbench/skills.html +3 -3
- package/web/docs/workbench/terminal.html +5 -5
- package/web/index.html +2 -2
- package/web/service-worker.js +2 -2
- package/web/web-version.json +1 -1
- package/node_modules/@myagentroam/protocol/dist/mail-notification.d.ts +0 -65
- package/node_modules/@myagentroam/protocol/dist/mail-notification.js +0 -40
- package/node_modules/@myagentroam/server-core/dist/mail-notification-channel.d.ts +0 -9
- package/node_modules/@myagentroam/server-core/dist/mail-notification-channel.js +0 -34
- package/web/assets/AuditManagementPage-Ck7vMus8.css +0 -1
- package/web/assets/AuditManagementPage-Dl4XuSsF.js +0 -1
- package/web/assets/EnvironmentSecretManager-BYc3a2OL.css +0 -1
- package/web/assets/EnvironmentSecretManager-DfuGTF_U.js +0 -1
- package/web/assets/MarkdownFilePreview-CgW88cZ7.js +0 -1
- package/web/assets/NodeManagementPage-BKUJHMxn.js +0 -1
- package/web/assets/NodeManagementPage-lig8in9-.js +0 -1
- package/web/assets/SecretManagementPage-BXTUC8r3.js +0 -1
- package/web/assets/SettingsContent-BIhL7o9M.js +0 -1
- package/web/assets/SkillCenterPage-DNG_Of83.js +0 -1
- package/web/assets/WorkbenchPage-Dijz3TD2.js +0 -18
- package/web/assets/WorkspaceManagementPage-BimaZyHR.js +0 -1
- package/web/assets/WorkspaceManagementPage-CcfXbLgm.js +0 -1
- package/web/assets/channel-CeLvM0JZ.js +0 -1
- package/web/assets/classDiagram-CYGNFDIV-BTC-Fel9.js +0 -1
- package/web/assets/classDiagram-v2-TLXNO2FR-BTC-Fel9.js +0 -1
- package/web/assets/stateDiagram-v2-IH3M54BS-BpTdaTeJ.js +0 -1
- package/web/assets/swimlanesDiagram-JKAHXJPX-BVG_qNOU.js +0 -8
- package/web/docs/assets/administration_email-notifications.md.C-l7j4kx.js +0 -13
- package/web/docs/assets/administration_secrets.md.BZ9yYa-Q.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexen-US.j3qiIpX7.js +0 -1
- package/web/docs/assets/chunks/@localSearchIndexroot.jj6-Kk0a.js +0 -1
- package/web/docs/assets/en-US_administration_email-notifications.md.-PgZZC4F.js +0 -13
- package/web/docs/assets/en-US_administration_email-notifications.md.-PgZZC4F.lean.js +0 -1
- package/web/docs/assets/en-US_administration_secrets.md.Clb9klg7.js +0 -1
- package/web/docs/assets/en-US_administration_secrets.md.Clb9klg7.lean.js +0 -1
- package/web/docs/assets/en-US_workbench_navigation.md.DHQ36S4_.js +0 -1
- package/web/docs/assets/en-US_workbench_terminal.md.LNf8VNwh.js +0 -1
- package/web/docs/assets/workbench_navigation.md.DK2QyY22.js +0 -1
- package/web/docs/assets/workbench_terminal.md.DzkARu3f.js +0 -1
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { notificationChannelsRequestSchema, notificationChannelsResultSchema } from '@myagentroam/protocol';
|
|
3
3
|
import { withMysqlTransaction } from './mysql-reference-store.js';
|
|
4
|
-
import { emptyPushResult } from './web-push-dispatcher.js';
|
|
5
4
|
const errors = {
|
|
6
|
-
NOTIFICATION_INPUT_INVALID: 'The notification
|
|
5
|
+
NOTIFICATION_INPUT_INVALID: 'The notification title or message is invalid.',
|
|
7
6
|
NOTIFICATION_ACCESS_DENIED: 'The notification execution is no longer authorized for this user and target.',
|
|
8
7
|
NOTIFICATION_CALL_CONFLICT: 'This notification call ID is already bound to different input.',
|
|
9
8
|
NOTIFICATION_RATE_LIMITED: 'This execution has reached its notification call limit.',
|
|
10
9
|
NOTIFICATION_UNAVAILABLE: 'The Server notification channel service is unavailable.',
|
|
11
|
-
|
|
10
|
+
NOTIFICATION_SUBMISSION_UNCERTAIN: 'Notification submission could not be confirmed. Do not retry with a new call ID.'
|
|
12
11
|
};
|
|
13
12
|
export async function resolveNotificationChannels(input) {
|
|
13
|
+
let submission;
|
|
14
14
|
try {
|
|
15
15
|
if (!input.isCurrentConnection())
|
|
16
16
|
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
17
17
|
if (input.service === undefined)
|
|
18
18
|
throw new Error('NOTIFICATION_UNAVAILABLE');
|
|
19
|
-
|
|
19
|
+
submission = await input.service.send(input.nodeId, input.envelope.payload, input.isCurrentConnection);
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
const code = error instanceof Error && Object.hasOwn(errors, error.message)
|
|
23
23
|
? error.message
|
|
24
|
-
: '
|
|
24
|
+
: 'NOTIFICATION_SUBMISSION_UNCERTAIN';
|
|
25
25
|
input.respond({ error: { code, message: errors[code] } });
|
|
26
|
+
return;
|
|
26
27
|
}
|
|
28
|
+
input.respond(submission);
|
|
27
29
|
}
|
|
28
30
|
const digest = (value) => createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
29
|
-
/** Owns
|
|
31
|
+
/** Owns admission, the workbench submission receipt and replay. Transport outcomes belong to the channels. */
|
|
30
32
|
export class NotificationChannelService {
|
|
31
33
|
input;
|
|
32
34
|
constructor(input) {
|
|
@@ -46,128 +48,36 @@ export class NotificationChannelService {
|
|
|
46
48
|
if (!(await authorized()))
|
|
47
49
|
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
48
50
|
const key = digest(['notification-v1', nodeId, request.executionId, request.callId]);
|
|
49
|
-
//
|
|
51
|
+
// Session display snapshots and timestamps are not model input.
|
|
50
52
|
const hash = digest([
|
|
51
53
|
request.userId,
|
|
52
54
|
request.workspaceId,
|
|
53
55
|
request.sessionId,
|
|
54
56
|
request.source,
|
|
55
|
-
[...request.channels].sort(),
|
|
56
57
|
request.title ?? '',
|
|
57
|
-
request.message
|
|
58
|
-
request.recipientEmail ?? '',
|
|
59
|
-
request.templateId ?? ''
|
|
58
|
+
request.message
|
|
60
59
|
]);
|
|
61
|
-
const
|
|
62
|
-
callId: request.callId,
|
|
63
|
-
...(request.channels.includes('push')
|
|
64
|
-
? {
|
|
65
|
-
push: {
|
|
66
|
-
persisted: false,
|
|
67
|
-
delivery: emptyPushResult('uncertain', 'NOTIFICATION_DELIVERY_UNCERTAIN')
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
: {}),
|
|
71
|
-
...(request.channels.includes('email') ? { email: { status: 'uncertain' } } : {})
|
|
72
|
-
};
|
|
73
|
-
const replay = await this.reserve(nodeId, request, key, hash, result, isCurrent);
|
|
60
|
+
const replay = await this.reserve(nodeId, request, key, hash, isCurrent);
|
|
74
61
|
if (replay !== undefined)
|
|
75
62
|
return replay;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
sessionId: request.sessionId,
|
|
93
|
-
workspaceId: request.workspaceId,
|
|
94
|
-
userId: request.userId,
|
|
95
|
-
source: request.source,
|
|
96
|
-
callId: request.callId,
|
|
97
|
-
...(request.recipientEmail === undefined
|
|
98
|
-
? {}
|
|
99
|
-
: { recipientEmail: request.recipientEmail }),
|
|
100
|
-
message: request.message,
|
|
101
|
-
...(request.title === undefined ? {} : { title: request.title }),
|
|
102
|
-
templateId: request.templateId ?? ''
|
|
103
|
-
}, isCurrent);
|
|
104
|
-
current = { ...current, email: { status: 'accepted' } };
|
|
105
|
-
}
|
|
106
|
-
catch (error) {
|
|
107
|
-
const code = error instanceof Error && /^MAIL_[A-Z0-9_]{1,100}$/u.test(error.message)
|
|
108
|
-
? error.message
|
|
109
|
-
: 'MAIL_DELIVERY_UNCERTAIN';
|
|
110
|
-
current = {
|
|
111
|
-
...current,
|
|
112
|
-
email: {
|
|
113
|
-
status: code === 'MAIL_DELIVERY_UNCERTAIN' ? 'uncertain' : 'failed',
|
|
114
|
-
error: {
|
|
115
|
-
code,
|
|
116
|
-
message: code === 'MAIL_RECIPIENT_NOT_CONFIGURED'
|
|
117
|
-
? 'The initiating account has no valid email address. Configure an account email or specify recipientEmail.'
|
|
118
|
-
: 'The email channel did not confirm acceptance. Check the Server mail configuration and recipient.'
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
await save();
|
|
124
|
-
}
|
|
125
|
-
if (request.channels.includes('push')) {
|
|
126
|
-
try {
|
|
127
|
-
if (!(await authorized()))
|
|
128
|
-
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
129
|
-
const sourceId = `agent:${nodeId}:${request.executionId}:${request.callId}`;
|
|
130
|
-
const consumed = await this.input.notifications.consume(nodeId, {
|
|
131
|
-
...request,
|
|
132
|
-
notificationId: sourceId,
|
|
133
|
-
runId: request.executionId,
|
|
134
|
-
targetType: 'WORKSPACE_SESSION'
|
|
135
|
-
}, false);
|
|
136
|
-
if (!consumed)
|
|
137
|
-
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
138
|
-
const notification = await this.input.notifications.bySource(request.userId, sourceId);
|
|
139
|
-
if (notification === undefined)
|
|
140
|
-
throw new Error('NOTIFICATION_DELIVERY_UNCERTAIN');
|
|
141
|
-
current = {
|
|
142
|
-
...current,
|
|
143
|
-
push: {
|
|
144
|
-
persisted: true,
|
|
145
|
-
notificationId: notification.id,
|
|
146
|
-
delivery: emptyPushResult('uncertain', 'NOTIFICATION_DELIVERY_UNCERTAIN')
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
await save();
|
|
150
|
-
const delivery = this.input.dispatcher === undefined
|
|
151
|
-
? emptyPushResult('skipped', 'WEB_PUSH_UNAVAILABLE')
|
|
152
|
-
: await this.input.dispatcher.dispatch(request.userId, notification.id, authorized);
|
|
153
|
-
current = { ...current, push: { ...current.push, delivery } };
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
if (error instanceof Error && error.message === 'NOTIFICATION_ACCESS_DENIED')
|
|
157
|
-
current = {
|
|
158
|
-
...current,
|
|
159
|
-
push: {
|
|
160
|
-
...current.push,
|
|
161
|
-
delivery: emptyPushResult('failed', 'NOTIFICATION_ACCESS_DENIED')
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
// Retain known persistence facts even if dispatch or result collection becomes uncertain.
|
|
165
|
-
}
|
|
166
|
-
await save();
|
|
167
|
-
}
|
|
168
|
-
return current;
|
|
63
|
+
if (!(await authorized()))
|
|
64
|
+
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
65
|
+
const sourceId = `agent:${nodeId}:${request.executionId}:${request.callId}`;
|
|
66
|
+
const consumed = await this.input.notifications.consume(nodeId, {
|
|
67
|
+
...request,
|
|
68
|
+
notificationId: sourceId,
|
|
69
|
+
runId: request.executionId,
|
|
70
|
+
targetType: 'WORKSPACE_SESSION'
|
|
71
|
+
});
|
|
72
|
+
if (!consumed)
|
|
73
|
+
throw new Error('NOTIFICATION_ACCESS_DENIED');
|
|
74
|
+
if (!(await this.input.notifications.hasCommittedAgentNotification(request.userId, sourceId)))
|
|
75
|
+
throw new Error('NOTIFICATION_SUBMISSION_UNCERTAIN');
|
|
76
|
+
const receipt = { callId: request.callId, submitted: true };
|
|
77
|
+
await this.input.database.raw.execute('UPDATE mail_deliveries SET notification_result=? WHERE source_key=? AND payload_hash=?', [JSON.stringify(receipt), key, hash]);
|
|
78
|
+
return receipt;
|
|
169
79
|
}
|
|
170
|
-
async reserve(nodeId, request, key, hash,
|
|
80
|
+
async reserve(nodeId, request, key, hash, isCurrent) {
|
|
171
81
|
return withMysqlTransaction(this.input.database.raw, async (connection) => {
|
|
172
82
|
const [users] = await connection.execute('SELECT enabled FROM users WHERE id=? FOR UPDATE', [request.userId]);
|
|
173
83
|
if (users[0]?.['enabled'] !== 1 || !isCurrent())
|
|
@@ -179,7 +89,10 @@ export class NotificationChannelService {
|
|
|
179
89
|
if (rows[0]['payload_hash'] !== hash)
|
|
180
90
|
throw new Error('NOTIFICATION_CALL_CONFLICT');
|
|
181
91
|
const raw = rows[0]['notification_result'];
|
|
182
|
-
|
|
92
|
+
const receipt = notificationChannelsResultSchema.safeParse(typeof raw === 'string' ? JSON.parse(raw) : raw);
|
|
93
|
+
if (!receipt.success)
|
|
94
|
+
throw new Error('NOTIFICATION_SUBMISSION_UNCERTAIN');
|
|
95
|
+
return receipt.data;
|
|
183
96
|
}
|
|
184
97
|
const [counts] = await connection.execute('SELECT COUNT(*) AS total FROM mail_deliveries WHERE user_id=? AND execution_id=? AND notification_result IS NOT NULL', [request.userId, request.executionId]);
|
|
185
98
|
if (Number(counts[0]?.['total'] ?? 0) >= 50)
|
|
@@ -194,7 +107,7 @@ export class NotificationChannelService {
|
|
|
194
107
|
request.executionId,
|
|
195
108
|
request.callId,
|
|
196
109
|
timestamp,
|
|
197
|
-
JSON.stringify(
|
|
110
|
+
JSON.stringify({ callId: request.callId })
|
|
198
111
|
]);
|
|
199
112
|
return undefined;
|
|
200
113
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { NotificationAttentionRequest, ServerNotification } from '@myagentroam/protocol';
|
|
2
|
+
import type { MailNotificationService } from './mail-notification-service.js';
|
|
3
|
+
import type { NotificationPreferenceStore } from './notification-preferences.js';
|
|
4
|
+
import type { WebPushDispatcher } from './web-push-dispatcher.js';
|
|
5
|
+
import type { NotificationDeliveryContext, WorkbenchNotificationService } from './workbench-notification-service.js';
|
|
6
|
+
import { type AuditObserver } from './audit.js';
|
|
7
|
+
/** Applies account policy to new durable notifications; SMTP and Push own their transport results. */
|
|
8
|
+
export declare class NotificationDeliveryService {
|
|
9
|
+
private readonly input;
|
|
10
|
+
private mailTail;
|
|
11
|
+
private pendingMail;
|
|
12
|
+
private readonly preparations;
|
|
13
|
+
private closed;
|
|
14
|
+
constructor(input: {
|
|
15
|
+
readonly online: (userId: number) => boolean;
|
|
16
|
+
readonly preferences: Pick<NotificationPreferenceStore, 'read'>;
|
|
17
|
+
readonly notifications: Pick<WorkbenchNotificationService, 'resolveExternalDelivery'>;
|
|
18
|
+
readonly pending: (nodeId: string, request: NotificationAttentionRequest) => Promise<boolean>;
|
|
19
|
+
readonly push: Pick<WebPushDispatcher, 'enqueue'>;
|
|
20
|
+
readonly mail: Pick<MailNotificationService, 'send'>;
|
|
21
|
+
readonly report: (channel: 'email' | 'push' | 'policy', code: string) => void;
|
|
22
|
+
readonly audit?: AuditObserver;
|
|
23
|
+
});
|
|
24
|
+
created(userId: number, notification: ServerNotification, authorize: () => Promise<boolean>, context: NotificationDeliveryContext): void;
|
|
25
|
+
private enqueueMail;
|
|
26
|
+
private audit;
|
|
27
|
+
stop(): void;
|
|
28
|
+
close(): Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { emitAudit } from './audit.js';
|
|
2
|
+
/** Applies account policy to new durable notifications; SMTP and Push own their transport results. */
|
|
3
|
+
export class NotificationDeliveryService {
|
|
4
|
+
input;
|
|
5
|
+
mailTail = Promise.resolve();
|
|
6
|
+
pendingMail = 0;
|
|
7
|
+
preparations = new Set();
|
|
8
|
+
closed = false;
|
|
9
|
+
constructor(input) {
|
|
10
|
+
this.input = input;
|
|
11
|
+
}
|
|
12
|
+
created(userId, notification, authorize, context) {
|
|
13
|
+
const { kind, target } = notification;
|
|
14
|
+
const needsAttention = kind === 'approval' || kind === 'user-input';
|
|
15
|
+
const mayEmail = kind === 'agent' || needsAttention;
|
|
16
|
+
if (this.closed ||
|
|
17
|
+
this.input.online(userId) ||
|
|
18
|
+
(needsAttention && context.attention === undefined))
|
|
19
|
+
return;
|
|
20
|
+
if (this.preparations.size >= 128) {
|
|
21
|
+
this.input.report('policy', 'NOTIFICATION_DELIVERY_QUEUE_FULL');
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const prepare = async () => {
|
|
25
|
+
const preferences = await this.input.preferences.read(userId);
|
|
26
|
+
if (this.closed || this.input.online(userId))
|
|
27
|
+
return;
|
|
28
|
+
const eligible = (channel) => async () => {
|
|
29
|
+
if (this.closed ||
|
|
30
|
+
this.input.online(userId) ||
|
|
31
|
+
!(await this.input.preferences.read(userId))[channel] ||
|
|
32
|
+
!(await authorize()) ||
|
|
33
|
+
(channel === 'email' &&
|
|
34
|
+
(await this.input.notifications.resolveExternalDelivery(userId, notification.id)) ===
|
|
35
|
+
undefined) ||
|
|
36
|
+
(context.attention !== undefined &&
|
|
37
|
+
!(await this.input.pending(target.nodeId, context.attention))))
|
|
38
|
+
return false;
|
|
39
|
+
return !this.closed && !this.input.online(userId);
|
|
40
|
+
};
|
|
41
|
+
if (preferences.push) {
|
|
42
|
+
const result = this.input.push.enqueue(userId, notification.id, eligible('push'), (result) => {
|
|
43
|
+
if (result.attempted === 0 && result.status !== 'uncertain')
|
|
44
|
+
return;
|
|
45
|
+
this.audit(userId, notification, 'push', result.status, result.reason);
|
|
46
|
+
});
|
|
47
|
+
if (result === 'queue_full')
|
|
48
|
+
this.input.report('push', 'NOTIFICATION_DELIVERY_QUEUE_FULL');
|
|
49
|
+
}
|
|
50
|
+
if (mayEmail && preferences.email)
|
|
51
|
+
this.enqueueMail(userId, notification, () => this.input.mail.send(userId, context.runId, notification, eligible('email')));
|
|
52
|
+
};
|
|
53
|
+
const job = prepare().catch(() => this.input.report('policy', 'NOTIFICATION_DELIVERY_FAILED'));
|
|
54
|
+
this.preparations.add(job);
|
|
55
|
+
void job.then(() => this.preparations.delete(job));
|
|
56
|
+
}
|
|
57
|
+
enqueueMail(userId, notification, send) {
|
|
58
|
+
if (this.pendingMail >= 128) {
|
|
59
|
+
this.input.report('email', 'NOTIFICATION_DELIVERY_QUEUE_FULL');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.pendingMail++;
|
|
63
|
+
this.mailTail = this.mailTail.then(async () => {
|
|
64
|
+
try {
|
|
65
|
+
if (!this.closed && (await send()))
|
|
66
|
+
this.audit(userId, notification, 'email', 'accepted');
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
const code = error instanceof Error && /^MAIL_[A-Z_]+$/u.test(error.message)
|
|
70
|
+
? error.message
|
|
71
|
+
: 'NOTIFICATION_DELIVERY_FAILED';
|
|
72
|
+
this.input.report('email', code);
|
|
73
|
+
this.audit(userId, notification, 'email', code === 'MAIL_DELIVERY_UNCERTAIN' ? 'uncertain' : 'failed', code);
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
this.pendingMail--;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
audit(userId, { id }, channel, outcome, errorCode) {
|
|
81
|
+
if (this.input.audit === undefined)
|
|
82
|
+
return;
|
|
83
|
+
// The channel result is safe metadata; never attach notification content or recipient data.
|
|
84
|
+
emitAudit(this.input.audit, {
|
|
85
|
+
eventType: 'notification.delivery.completed',
|
|
86
|
+
actorUserId: userId,
|
|
87
|
+
authenticationMethod: 'SYSTEM',
|
|
88
|
+
targetType: 'NOTIFICATION',
|
|
89
|
+
targetId: id,
|
|
90
|
+
result: outcome === 'accepted' ? 'SUCCESS' : 'FAILED',
|
|
91
|
+
...(errorCode === undefined ? {} : { errorCode }),
|
|
92
|
+
metadata: JSON.stringify({ notificationChannel: channel, notificationOutcome: outcome })
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
stop() {
|
|
96
|
+
this.closed = true;
|
|
97
|
+
}
|
|
98
|
+
async close() {
|
|
99
|
+
this.stop();
|
|
100
|
+
await Promise.all(this.preparations);
|
|
101
|
+
await this.mailTail;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type NotificationPreferences } from '@myagentroam/protocol';
|
|
2
|
+
import type { NotificationStore } from './notification-contracts.js';
|
|
3
|
+
/** Owns account-wide opt-ins, not browser subscription or administrator configuration. */
|
|
4
|
+
export declare class NotificationPreferenceStore {
|
|
5
|
+
private readonly database;
|
|
6
|
+
constructor(database: NotificationStore);
|
|
7
|
+
read(userId: number): Promise<NotificationPreferences>;
|
|
8
|
+
write(userId: number, preferences: NotificationPreferences): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { notificationPreferencesSchema } from '@myagentroam/protocol';
|
|
2
|
+
const defaults = { email: false, push: false };
|
|
3
|
+
/** Owns account-wide opt-ins, not browser subscription or administrator configuration. */
|
|
4
|
+
export class NotificationPreferenceStore {
|
|
5
|
+
database;
|
|
6
|
+
constructor(database) {
|
|
7
|
+
this.database = database;
|
|
8
|
+
}
|
|
9
|
+
async read(userId) {
|
|
10
|
+
const [rows] = await this.database.raw.execute('SELECT notification_preferences FROM users WHERE id=? AND enabled=TRUE AND must_change_password=FALSE', [userId]);
|
|
11
|
+
const raw = rows[0]?.notification_preferences;
|
|
12
|
+
const parsed = notificationPreferencesSchema.safeParse(typeof raw === 'string' ? JSON.parse(raw) : raw);
|
|
13
|
+
return parsed.success ? parsed.data : defaults;
|
|
14
|
+
}
|
|
15
|
+
async write(userId, preferences) {
|
|
16
|
+
await this.database.raw.execute('UPDATE users SET notification_preferences=? WHERE id=? AND enabled=TRUE AND must_change_password=FALSE', [JSON.stringify(preferences), userId]);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NotificationPreferenceStore } from './notification-preferences.js';
|
|
1
2
|
import type { FastifyInstance } from 'fastify';
|
|
2
3
|
import type { SessionLookup } from './session.js';
|
|
3
4
|
import type { WorkbenchNotificationService } from './workbench-notification-service.js';
|
|
@@ -7,5 +8,6 @@ export declare function registerNotificationRoutes(input: {
|
|
|
7
8
|
readonly database: SessionLookup;
|
|
8
9
|
readonly notifications: WorkbenchNotificationService;
|
|
9
10
|
readonly recentRuns?: RecentRunService;
|
|
11
|
+
readonly preferences?: NotificationPreferenceStore;
|
|
10
12
|
readonly publicOrigin: string | undefined;
|
|
11
13
|
}): void;
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
+
import { notificationPreferencesSchema } from '@myagentroam/protocol';
|
|
1
2
|
import { isAllowedOrigin } from './auth.js';
|
|
2
3
|
import { currentSession, validCsrf } from './session.js';
|
|
3
4
|
import { sendError } from './http-errors.js';
|
|
4
5
|
export function registerNotificationRoutes(input) {
|
|
5
6
|
const { app, database, notifications, recentRuns, publicOrigin } = input;
|
|
7
|
+
const preferences = input.preferences;
|
|
8
|
+
if (preferences !== undefined) {
|
|
9
|
+
app.get('/api/notifications/preferences', async (request, reply) => {
|
|
10
|
+
const user = currentSession(database, request);
|
|
11
|
+
if (user === undefined || user.mustChangePassword)
|
|
12
|
+
return sendError(reply, 401, 'UNAUTHENTICATED');
|
|
13
|
+
return reply.send(await preferences.read(user.userId));
|
|
14
|
+
});
|
|
15
|
+
app.put('/api/notifications/preferences', async (request, reply) => {
|
|
16
|
+
const user = writable(request, reply);
|
|
17
|
+
if (user === undefined)
|
|
18
|
+
return;
|
|
19
|
+
const parsed = notificationPreferencesSchema.safeParse(request.body);
|
|
20
|
+
if (!parsed.success)
|
|
21
|
+
return sendError(reply, 400, 'NOTIFICATION_PREFERENCES_INVALID', {
|
|
22
|
+
message: 'Specify boolean email and push preferences.'
|
|
23
|
+
});
|
|
24
|
+
await preferences.write(user.userId, parsed.data);
|
|
25
|
+
return reply.send(parsed.data);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
6
28
|
app.get('/api/notifications', async (request, reply) => {
|
|
7
29
|
const user = currentSession(database, request);
|
|
8
30
|
if (user === undefined || user.mustChangePassword)
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { UserLocale } from './auth-contracts.js';
|
|
2
2
|
import type { NotificationStore } from './notification-contracts.js';
|
|
3
3
|
import type { NodeRequestAuthorization } from './node-access-contracts.js';
|
|
4
|
-
import { type ServerNotification as StoredWorkbenchNotification } from '@myagentroam/protocol';
|
|
4
|
+
import { type NotificationAttentionRequest, type ServerNotification as StoredWorkbenchNotification } from '@myagentroam/protocol';
|
|
5
5
|
export type { UserLocale } from './auth-contracts.js';
|
|
6
6
|
export type { NotificationTarget as StoredWorkbenchNotificationTarget, ServerNotification as StoredWorkbenchNotification } from '@myagentroam/protocol';
|
|
7
|
+
export interface NotificationDeliveryContext {
|
|
8
|
+
readonly runId: string;
|
|
9
|
+
readonly attention?: NotificationAttentionRequest;
|
|
10
|
+
}
|
|
7
11
|
/** Persists authorized Workbench notifications and dispatches new ones after commit. */
|
|
8
12
|
export declare class WorkbenchNotificationService {
|
|
9
13
|
private readonly database;
|
|
@@ -11,13 +15,14 @@ export declare class WorkbenchNotificationService {
|
|
|
11
15
|
private readonly push;
|
|
12
16
|
private readonly now;
|
|
13
17
|
private readonly authorizeHostedTarget?;
|
|
14
|
-
private readonly
|
|
18
|
+
private readonly onCreated?;
|
|
15
19
|
private lastCleanupAt;
|
|
16
|
-
constructor(database: NotificationStore, authorizeNodeRequest: NodeRequestAuthorization, push: (userId: number, message: object) => void, now?: () => number, authorizeHostedTarget?: ((userId: number, nodeId: string, templateId: string) => Promise<boolean>) | undefined,
|
|
17
|
-
consume(nodeId: string, value: unknown
|
|
18
|
-
|
|
20
|
+
constructor(database: NotificationStore, authorizeNodeRequest: NodeRequestAuthorization, push: (userId: number, message: object) => void, now?: () => number, authorizeHostedTarget?: ((userId: number, nodeId: string, templateId: string) => Promise<boolean>) | undefined, onCreated?: ((userId: number, notification: StoredWorkbenchNotification, authorize: () => Promise<boolean>, context: NotificationDeliveryContext) => void) | undefined);
|
|
21
|
+
consume(nodeId: string, value: unknown): Promise<boolean>;
|
|
22
|
+
/** Submission depends on the committed row, not its current visibility in the list. */
|
|
23
|
+
hasCommittedAgentNotification(userId: number, sourceId: string): Promise<boolean>;
|
|
19
24
|
reclassify(change: import('@myagentroam/protocol').SessionGroupChanged): Promise<void>;
|
|
20
|
-
|
|
25
|
+
resolveExternalDelivery(userId: number, id: string): Promise<{
|
|
21
26
|
account: string;
|
|
22
27
|
locale: UserLocale;
|
|
23
28
|
notification: Readonly<{
|
|
@@ -25,7 +30,7 @@ export declare class WorkbenchNotificationService {
|
|
|
25
30
|
id: string;
|
|
26
31
|
expiresAt: number;
|
|
27
32
|
title: string;
|
|
28
|
-
kind: "
|
|
33
|
+
kind: "approval" | "user-input" | "run" | "plan" | "schedule" | "agent";
|
|
29
34
|
target: {
|
|
30
35
|
workspaceId: string;
|
|
31
36
|
sessionId: string;
|
|
@@ -12,17 +12,17 @@ export class WorkbenchNotificationService {
|
|
|
12
12
|
push;
|
|
13
13
|
now;
|
|
14
14
|
authorizeHostedTarget;
|
|
15
|
-
|
|
15
|
+
onCreated;
|
|
16
16
|
lastCleanupAt = Number.NEGATIVE_INFINITY;
|
|
17
|
-
constructor(database, authorizeNodeRequest, push, now = Date.now, authorizeHostedTarget,
|
|
17
|
+
constructor(database, authorizeNodeRequest, push, now = Date.now, authorizeHostedTarget, onCreated) {
|
|
18
18
|
this.database = database;
|
|
19
19
|
this.authorizeNodeRequest = authorizeNodeRequest;
|
|
20
20
|
this.push = push;
|
|
21
21
|
this.now = now;
|
|
22
22
|
this.authorizeHostedTarget = authorizeHostedTarget;
|
|
23
|
-
this.
|
|
23
|
+
this.onCreated = onCreated;
|
|
24
24
|
}
|
|
25
|
-
async consume(nodeId, value
|
|
25
|
+
async consume(nodeId, value) {
|
|
26
26
|
const payload = parsePayload(value);
|
|
27
27
|
if (payload === undefined)
|
|
28
28
|
return false;
|
|
@@ -130,17 +130,29 @@ export class WorkbenchNotificationService {
|
|
|
130
130
|
if (notification !== undefined &&
|
|
131
131
|
(payload.targetType !== 'SCHEDULED_TASK' || (await authorize()))) {
|
|
132
132
|
this.push(payload.userId, { type: 'notification.created', notification });
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
const attention = payload.targetType !== 'WORKSPACE_SESSION' ||
|
|
134
|
+
payload.attentionId === undefined ||
|
|
135
|
+
(notification.kind !== 'approval' && notification.kind !== 'user-input')
|
|
136
|
+
? undefined
|
|
137
|
+
: {
|
|
138
|
+
kind: notification.kind,
|
|
139
|
+
id: payload.attentionId,
|
|
140
|
+
runId: payload.runId,
|
|
141
|
+
workspaceId: payload.workspaceId,
|
|
142
|
+
sessionId: payload.sessionId,
|
|
143
|
+
userId: payload.userId
|
|
144
|
+
};
|
|
145
|
+
this.onCreated?.(payload.userId, notification, authorize, {
|
|
146
|
+
runId: payload.runId,
|
|
147
|
+
...(attention === undefined ? {} : { attention })
|
|
148
|
+
});
|
|
135
149
|
}
|
|
136
150
|
return true;
|
|
137
151
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
return
|
|
142
|
-
? notification
|
|
143
|
-
: undefined;
|
|
152
|
+
/** Submission depends on the committed row, not its current visibility in the list. */
|
|
153
|
+
async hasCommittedAgentNotification(userId, sourceId) {
|
|
154
|
+
const [rows] = await this.database.raw.execute("SELECT 1 FROM workbench_notifications WHERE user_id=? AND source_key=? AND kind='agent'", [userId, sha256(sourceId)]);
|
|
155
|
+
return rows.length !== 0;
|
|
144
156
|
}
|
|
145
157
|
async reclassify(change) {
|
|
146
158
|
const [rows] = await this.database.raw.execute("SELECT DISTINCT user_id FROM workbench_notifications WHERE node_id=? AND workspace_id=? AND session_id=? AND target_type='WORKSPACE_SESSION' AND deleted_at IS NULL AND expires_at>?", [change.nodeId, change.workspaceId, change.sessionId, this.now()]);
|
|
@@ -159,7 +171,7 @@ export class WorkbenchNotificationService {
|
|
|
159
171
|
this.push(userId, { type: 'notification.updated' });
|
|
160
172
|
}
|
|
161
173
|
}
|
|
162
|
-
async
|
|
174
|
+
async resolveExternalDelivery(userId, id) {
|
|
163
175
|
const [rows] = await this.database.raw.execute('SELECT * FROM workbench_notifications WHERE id=? AND user_id=? AND deleted_at IS NULL AND read_at IS NULL AND expires_at>?', [id, userId, this.now()]);
|
|
164
176
|
const row = rows[0];
|
|
165
177
|
if (row === undefined ||
|
|
@@ -404,6 +416,7 @@ function parsePayload(value) {
|
|
|
404
416
|
return {
|
|
405
417
|
...base,
|
|
406
418
|
targetType: 'WORKSPACE_SESSION',
|
|
419
|
+
attentionId: bounded(value.attentionId, 256) ? value.attentionId : undefined,
|
|
407
420
|
workspaceId: value.workspaceId,
|
|
408
421
|
sessionGroup: value.sessionGroup === 'CHILD' ? 'CHILD' : 'MAIN',
|
|
409
422
|
sessionId: value.sessionId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myagentroam/server-core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.53",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -475,6 +475,16 @@
|
|
|
475
475
|
"types": "./dist/mail-routes.d.ts",
|
|
476
476
|
"import": "./dist/mail-routes.js"
|
|
477
477
|
},
|
|
478
|
+
"./notification-delivery-service": {
|
|
479
|
+
"development": "./src/notification-delivery-service.ts",
|
|
480
|
+
"types": "./dist/notification-delivery-service.d.ts",
|
|
481
|
+
"import": "./dist/notification-delivery-service.js"
|
|
482
|
+
},
|
|
483
|
+
"./notification-preferences": {
|
|
484
|
+
"development": "./src/notification-preferences.ts",
|
|
485
|
+
"types": "./dist/notification-preferences.d.ts",
|
|
486
|
+
"import": "./dist/notification-preferences.js"
|
|
487
|
+
},
|
|
478
488
|
"./notification-channel-service": {
|
|
479
489
|
"development": "./src/notification-channel-service.ts",
|
|
480
490
|
"types": "./dist/notification-channel-service.d.ts",
|
|
@@ -485,11 +495,6 @@
|
|
|
485
495
|
"types": "./dist/mail-notification-service.d.ts",
|
|
486
496
|
"import": "./dist/mail-notification-service.js"
|
|
487
497
|
},
|
|
488
|
-
"./mail-notification-channel": {
|
|
489
|
-
"development": "./src/mail-notification-channel.ts",
|
|
490
|
-
"types": "./dist/mail-notification-channel.d.ts",
|
|
491
|
-
"import": "./dist/mail-notification-channel.js"
|
|
492
|
-
},
|
|
493
498
|
"./html-preview-origin": {
|
|
494
499
|
"development": "./src/html-preview-origin.ts",
|
|
495
500
|
"types": "./dist/html-preview-origin.d.ts",
|
|
@@ -683,7 +688,7 @@
|
|
|
683
688
|
},
|
|
684
689
|
"dependencies": {
|
|
685
690
|
"@fastify/websocket": "^11.3.0",
|
|
686
|
-
"@myagentroam/protocol": "0.15.
|
|
691
|
+
"@myagentroam/protocol": "0.15.53",
|
|
687
692
|
"fastify": "^5.12.8",
|
|
688
693
|
"js-yaml": "4.3.2",
|
|
689
694
|
"mysql2": "^3.23.4",
|
package/node_modules/@myagentroam-enterprise/server-implementation/dist/audit/audit-policy.js
CHANGED
|
@@ -24,7 +24,7 @@ const securityEvents = new Set([
|
|
|
24
24
|
'user_password_reset'
|
|
25
25
|
]);
|
|
26
26
|
const systemPrefixes = ['license_', 'system_setting', 'oauth_provider', 'mail_', 'smtp_'];
|
|
27
|
-
const systemEvents = new Set(['mail.test.executed']);
|
|
27
|
+
const systemEvents = new Set(['mail.test.executed', 'notification.delivery.completed']);
|
|
28
28
|
export function auditsPersonalServerEvent(eventType) {
|
|
29
29
|
return (securityEvents.has(eventType) ||
|
|
30
30
|
systemEvents.has(eventType) ||
|