@nikolasp98/minion 2026.7.12-dev.20260715050311 → 2026.7.16-dev
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/dist/{_registry.generated-DSGpsf-3.js → _registry.generated-B5zHyziR.js} +55 -19
- package/dist/{_registry.generated-CxoyMMzW.js → _registry.generated-C3zYJ6On.js} +55 -19
- package/dist/{_registry.generated-CVwb-DEK.js → _registry.generated-DKC2RDUo.js} +55 -19
- package/dist/{accounts-B38-HaFa.js → accounts-BwLt-V29.js} +1 -1
- package/dist/{accounts-DAwY_jw0.js → accounts-CJf7velm.js} +1 -1
- package/dist/{accounts-BeP1XvsQ.js → accounts-DZ-7pWtI.js} +1 -1
- package/dist/{accounts-m_AHpH3M.js → accounts-vA22MiLu.js} +1 -1
- package/dist/{acp-cli-B9vzabMN.js → acp-cli-DCCSn5NL.js} +4 -4
- package/dist/{acp-cli-BtvuNlvK.js → acp-cli-wKQfGJIA.js} +4 -4
- package/dist/{agent-Bmy03Olv.js → agent-BvFdXWhL.js} +12 -12
- package/dist/{agent-C63gAsUc.js → agent-DaBGbCfi.js} +11 -11
- package/dist/{agent-step-D1lEb2ij.js → agent-step-BCSCZOB-.js} +3 -3
- package/dist/{agent-step-C1DQllT9.js → agent-step-CgJNQPZ8.js} +3 -3
- package/dist/{agents-CEv4jAwQ.js → agents-CGJzMj2S.js} +8 -8
- package/dist/{agents-list-tool-CSkk9x2X.js → agents-list-tool-C93hCbLj.js} +3 -3
- package/dist/{agents-list-tool-XwBzypb1.js → agents-list-tool-Cd_Q7HuV.js} +3 -3
- package/dist/{agents-list-tool-DCUuG4eP.js → agents-list-tool-SNOunDVC.js} +3 -3
- package/dist/{audit-BZt5UM89.js → audit-CftXdiYP.js} +12 -12
- package/dist/{audit-CVY0TU24.js → audit-D9GAKieT.js} +12 -12
- package/dist/{auth-choice-iL2qGnTv.js → auth-choice-DKtOuFks.js} +4 -4
- package/dist/{auth-choice-DBUnkhkE.js → auth-choice-dbpaxkks.js} +4 -4
- package/dist/{banner-WiXEHrLb.js → banner-B-uaqlJ9.js} +1 -1
- package/dist/{browser-cli-DYoqKTbg.js → browser-cli-BhqYEW3P.js} +3 -3
- package/dist/{browser-cli-CHh8sv-b.js → browser-cli-DZrCLNaa.js} +3 -3
- package/dist/{browser-tool-BVMjabV0.js → browser-tool-BWAVW295.js} +7 -7
- package/dist/{browser-tool-DgFnz20P.js → browser-tool-DErZM1k2.js} +7 -7
- package/dist/{browser-tool-thBH48Eu.js → browser-tool-DjCmhgOb.js} +7 -7
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +153 -10
- package/dist/bundled/kg-message-sync/handler.js +2 -1
- package/dist/bundled/session-memory/handler.js +33 -0
- package/dist/{call-DrV6uU2c.js → call-BWSchIcf.js} +3 -3
- package/dist/{call-czcZr-uY.js → call-DHo0XdK6.js} +2 -11
- package/dist/{call-2tXHVKWh.js → call-DQ1ciEPz.js} +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{canvas-tool-BfzYJpwI.js → canvas-tool-BneFVxD8.js} +2 -2
- package/dist/{canvas-tool-CNBgnWbK.js → canvas-tool-DeJaejKM.js} +2 -2
- package/dist/{canvas-tool-S4W4mlij.js → canvas-tool-Ogd2OChc.js} +2 -2
- package/dist/{channel-options-zR7MDE5g.js → channel-options-D8AdMco0.js} +2 -2
- package/dist/{channel-options-Iwd9Pnr4.js → channel-options-DjEmC0qR.js} +2 -2
- package/dist/{channel-selection-Bpbhqgjb.js → channel-selection-1nQ35zxv.js} +1 -1
- package/dist/{channel-selection-D-JiWYSP.js → channel-selection-wHLAe5Et.js} +1 -1
- package/dist/{channel-web-Bp2feV7o.js → channel-web-DRfE9BO9.js} +12 -12
- package/dist/{channels-cli-wMxCVwap.js → channels-cli-B2WLqWbi.js} +13 -13
- package/dist/{channels-cli-BVzvH4T8.js → channels-cli-DWxvR4dU.js} +13 -13
- package/dist/{channels-status-issues-DAXpJEob.js → channels-status-issues-8gZwCTjP.js} +1 -1
- package/dist/{channels-status-issues-DXz-lrLc.js → channels-status-issues-CE1BlXu3.js} +1 -1
- package/dist/{chrome-COxoiWAN.js → chrome-BA0Rm2cQ.js} +2 -2
- package/dist/{chrome-C0h74dXQ.js → chrome-CQYa8Qpn.js} +2 -2
- package/dist/{chrome-BrrQFDI3.js → chrome-Cm9IFEur.js} +2 -2
- package/dist/{clawbot-cli-B5B0Z6hG.js → clawbot-cli-00xvHy61.js} +1 -1
- package/dist/{clawbot-cli-Dw1hTwmP.js → clawbot-cli-BBjE2ol-.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-CPdR63BC.js → cli-CgVsnrl6.js} +3 -3
- package/dist/{cli-CcGaXhRW.js → cli-CtGu18f6.js} +3 -3
- package/dist/{client-C_-YvLLI.js → client-2fZQKc2l.js} +5 -5
- package/dist/{client-UbK7ubLT.js → client-4u1JH1Zk.js} +0 -9
- package/dist/{client-Jabmwobu.js → client-B8GOknl-.js} +5 -5
- package/dist/{client-cSd7bG5q.js → client-D-ZPTrtK.js} +5 -5
- package/dist/{client-BYzTMaoO.js → client-W3BYtITQ.js} +0 -9
- package/dist/{command-registry-BuDTBRe1.js → command-registry-B5mckc9m.js} +14 -14
- package/dist/{commands-registry-k-JBgSft.js → commands-registry-DJs-edcv.js} +2 -2
- package/dist/{commands-registry-R0_nDAub.js → commands-registry-qRRu3RMk.js} +2 -2
- package/dist/{completion-cli-BGEEtxjt.js → completion-cli-BXTewelZ.js} +2 -2
- package/dist/{completion-cli-DDyDbJf7.js → completion-cli-BcPY11gL.js} +1 -1
- package/dist/{config-Bdlgx0wn.js → config-BerwgOPM.js} +2 -2
- package/dist/{config-DBs_rRu7.js → config-BrDW75c2.js} +2 -2
- package/dist/{config-Y_m-kxh9.js → config-DPP0lwsZ.js} +1 -1
- package/dist/{config-cli-DvnaEuHX.js → config-cli-CDhIjQc_.js} +4 -4
- package/dist/{config-cli-CEFoclyO.js → config-cli-CS88lrpx.js} +4 -4
- package/dist/{config-guard-23Of7Z6T.js → config-guard-CdCd4lGu.js} +3 -3
- package/dist/{config-guard-DnN-rRov.js → config-guard-DeZ33UWP.js} +3 -3
- package/dist/{config-validation-C7FvneNE.js → config-validation-CL0L0Dyf.js} +2 -2
- package/dist/{config-validation-BFtYfcpf.js → config-validation-txBaIaqO.js} +2 -2
- package/dist/{configure-BA6T3Tkr.js → configure-Bg10bnTk.js} +16 -16
- package/dist/{configure-BQ1Lu7Bd.js → configure-D5oM27Go.js} +16 -16
- package/dist/{control-service-DF4h-8kw.js → control-service-C369Rxs0.js} +6 -6
- package/dist/{control-service-DzDPUacK.js → control-service-DIbEfWbr.js} +6 -6
- package/dist/crm-conversation-themes-tool-47-Pcl5J.js +37 -0
- package/dist/crm-conversation-themes-tool-COuQB3TU.js +37 -0
- package/dist/crm-conversation-themes-tool-DB8zQpU1.js +37 -0
- package/dist/{cron-cli-BSfEMY9R.js → cron-cli-CsVKtwB8.js} +2 -2
- package/dist/{cron-cli-DRJUdOM5.js → cron-cli-Dddt4cu1.js} +2 -2
- package/dist/{cron-tool-Bgr6XBq9.js → cron-tool-BWM-ykso.js} +5 -5
- package/dist/{cron-tool-DNLIuiZ3.js → cron-tool-CD3kXNpT.js} +5 -5
- package/dist/{cron-tool-B4-O1mOU.js → cron-tool-CaMrrFJF.js} +5 -5
- package/dist/{daemon-cli-B8kOSqee.js → daemon-cli-CAgHOWp8.js} +9 -9
- package/dist/{daemon-cli-CDWmL7nl.js → daemon-cli-yrlA9L0h.js} +9 -9
- package/dist/daemon-cli.js +2 -10
- package/dist/daemon-install-helpers-Dwlr417c.js +2 -0
- package/dist/daemon-install-helpers-Khda5myS.js +2 -0
- package/dist/{daemon-runtime-BmaW56O-.js → daemon-runtime-C0_5HhUZ.js} +1 -1
- package/dist/{daemon-runtime-DUAfG2aA.js → daemon-runtime-CZXX_eXt.js} +1 -1
- package/dist/{deliver-BBHWk2Fl.js → deliver-BUifEj0F.js} +4 -4
- package/dist/{deliver-DxzGSQ1s.js → deliver-DJHcrP_i.js} +5 -5
- package/dist/{deliver-B5mqRWvh.js → deliver-O2dLDnLg.js} +4 -4
- package/dist/{deps-dO6xHyfp.js → deps-i_B9izvk.js} +7 -7
- package/dist/{devices-cli-D-lvOKoA.js → devices-cli-B9OXRt0t.js} +1 -1
- package/dist/{devices-cli-BmwXfmaE.js → devices-cli-DAcSoXi5.js} +1 -1
- package/dist/{directory-cli-BYHaa8t2.js → directory-cli-kxPXkKog.js} +4 -4
- package/dist/{directory-cli-hnxS-rJY.js → directory-cli-t11V_DDe.js} +4 -4
- package/dist/{dispatcher-Cce5sJHy.js → dispatcher-CvddQmnF.js} +1 -1
- package/dist/{dispatcher-C5AKq3qz.js → dispatcher-Dt_9aSBz.js} +1 -1
- package/dist/{dm-policy-shared-BvIhvTAm.js → dm-policy-shared-Df7eGBuI.js} +2 -2
- package/dist/{dm-policy-shared-BSWTvM40.js → dm-policy-shared-DyFNKOIs.js} +2 -2
- package/dist/{dns-cli-YkSHkRgx.js → dns-cli-CuxJhzIr.js} +2 -2
- package/dist/{dns-cli-BrpQUGng.js → dns-cli-D-xNNWBy.js} +2 -2
- package/dist/doctor-completion-B-tgL_ut.js +2 -0
- package/dist/{doctor-completion-Bah1xxDZ.js → doctor-completion-D1cLVgnw.js} +1 -1
- package/dist/doctor-completion-DvEGPvIT.js +2 -0
- package/dist/{doctor-completion-DR3PMDm1.js → doctor-completion-rfyVqz7I.js} +1 -1
- package/dist/{doctor-config-flow-BvTU7P3a.js → doctor-config-flow-C2p3v-cC.js} +6 -6
- package/dist/{doctor-config-flow-CVXvnZ_P.js → doctor-config-flow-D6uaIY8F.js} +6 -6
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-2nMWHQ23.js → exec-approvals-cli-CYxKrRPS.js} +2 -2
- package/dist/{exec-approvals-cli-CPLWc9wh.js → exec-approvals-cli-CaGKwCkP.js} +2 -2
- package/dist/extensionAPI.d.ts +11 -0
- package/dist/extensionAPI.js +2 -2
- package/dist/{gateway-DkZbWoSP.js → gateway-DpUea-L8.js} +3 -3
- package/dist/{gateway-DuPlq3Lo.js → gateway-DyaIYiPf.js} +3 -3
- package/dist/{gateway-CKw1B3G3.js → gateway-RMd15lxN.js} +3 -3
- package/dist/{gateway-cli-CCIa9dAH.js → gateway-cli-1dY-uNhm.js} +132 -77
- package/dist/{gateway-cli-DO7T73U7.js → gateway-cli-n18LFNeU.js} +131 -76
- package/dist/{gateway-rpc-Dor0Ne5G.js → gateway-rpc-BaD9gDWy.js} +1 -1
- package/dist/{gateway-rpc-bFDfI0jC.js → gateway-rpc-C3LLjyGe.js} +1 -1
- package/dist/{gateway-tool-CYNiLl9-.js → gateway-tool-BAdp6SH1.js} +3 -3
- package/dist/{gateway-tool-FiBzkiaT.js → gateway-tool-kRxmsmMz.js} +3 -3
- package/dist/{gateway-tool-DimDGfH7.js → gateway-tool-sHQ43WtK.js} +3 -3
- package/dist/{github-copilot-auth-bj7yKXqQ.js → github-copilot-auth-C6LhCOk3.js} +2 -2
- package/dist/{github-copilot-auth--CKRNoaw.js → github-copilot-auth-VK12SD5f.js} +2 -2
- package/dist/{gmail-OOodZN5v.js → gmail-89acEtXH.js} +1 -1
- package/dist/{gmail-De7lwq9k.js → gmail-tGz-kYHa.js} +1 -1
- package/dist/{health-CJLBn09L.js → health-8oE9qNSE.js} +10 -10
- package/dist/{health-BSVlkT5d.js → health-CYE5q8Un.js} +10 -10
- package/dist/{heartbeat-events-DLgkBgdw.js → heartbeat-events-C2_9-jxQ.js} +2 -1
- package/dist/{heartbeat-events-CNb7CXLY.js → heartbeat-events-D-wmX2Vg.js} +2 -1
- package/dist/{helpers-DaByRrQ3.js → helpers-CNcaAdSH.js} +1 -1
- package/dist/{helpers-If3mZUB3.js → helpers-bG_wfee1.js} +1 -1
- package/dist/{hooks-cli-CWm7BMDX.js → hooks-cli-CB_KzY16.js} +2 -2
- package/dist/{hooks-cli-S730exNl.js → hooks-cli-CEnzt4Dn.js} +2 -2
- package/dist/{host-D_jlsIB_.js → host-Ck1Iu5db.js} +33 -0
- package/dist/{host-w2pX4Cmj.js → host-FOFn61kz.js} +33 -0
- package/dist/{image-tool-Clda5wSc.js → image-tool-CEjIXfAz.js} +2 -2
- package/dist/{image-tool-CTzv5Fwx.js → image-tool-DA0ckrPq.js} +1 -1
- package/dist/{image-tool-CXUbSOFf.js → image-tool-OiDWYqmY.js} +2 -2
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -10
- package/dist/{io-BJQ6wGt0.js → io-6cqme3no.js} +2 -2
- package/dist/{io-PqZ9xsqS.js → io-7MYBxUkU.js} +2 -2
- package/dist/{io-36IWgxWF.js → io-D8w0m4e7.js} +2 -1
- package/dist/{ir-Z79l6YFz.js → ir-BPZJ-sfR.js} +1 -1
- package/dist/{ir-CZirIzWM.js → ir-BhnJmnK_.js} +5 -5
- package/dist/{ir-BTHWocyU.js → ir-CdlSkzAy.js} +1 -1
- package/dist/{lifecycle-core-Cefw3jp5.js → lifecycle-core-Dmy-67JO.js} +3 -3
- package/dist/{lifecycle-core-CSfXVCf2.js → lifecycle-core-DwiJf6GO.js} +3 -3
- package/dist/llm-slug-generator.js +33 -0
- package/dist/{load-tools-tool-NnK5iEGW.js → load-tools-tool-CK9n4dpv.js} +3 -3
- package/dist/{load-tools-tool-1Ku7ZYQk.js → load-tools-tool-DVMiLHnV.js} +3 -3
- package/dist/{load-tools-tool-B822jbu8.js → load-tools-tool-jvr9ELiC.js} +3 -3
- package/dist/{logs-cli-CyXHS82U.js → logs-cli-DYkz_Y2b.js} +2 -2
- package/dist/{logs-cli-B2HN6T9s.js → logs-cli-y33n6Plb.js} +2 -2
- package/dist/{memory-cli-DN4HDjZF.js → memory-cli-CchSD5_M.js} +3 -3
- package/dist/{memory-cli-D2UybctY.js → memory-cli-DWeZSF4O.js} +3 -3
- package/dist/{message-action-runner-BC0NPAEt.js → message-action-runner-BJzBMfAN.js} +11 -11
- package/dist/{message-action-runner-CzYdWhZ6.js → message-action-runner-aRJaOp3h.js} +11 -11
- package/dist/{message-ledger-5_Cl_pN0.js → message-ledger-DmX8k7Eb.js} +6 -6
- package/dist/{message-tool-PZuRkGRx.js → message-tool-BT_lShXP.js} +6 -6
- package/dist/{message-tool-BBsJ718D.js → message-tool-CJ2k9G2X.js} +6 -6
- package/dist/{message-tool-FnCqoXl8.js → message-tool-DkxTGNJ_.js} +9 -9
- package/dist/{minion-tools-DogsL-y0.js → minion-tools-CEQNyDLo.js} +22 -20
- package/dist/{model-catalog-D9SMyqKP.js → model-catalog-Dun9rUwm.js} +3 -3
- package/dist/{model-catalog-DYHf-usN.js → model-catalog-RhTD2XJY.js} +3 -3
- package/dist/{model-fallback-FMG5anI7.js → model-fallback-Cm3Tv0In.js} +2 -2
- package/dist/{model-fallback-CT9cFbVP.js → model-fallback-CrSemKRh.js} +2 -2
- package/dist/{model-fallback-CDZmGk9D.js → model-fallback-uwtaor8f.js} +4 -4
- package/dist/{model-picker-3nhZqWgC.js → model-picker-C_UhEF-R.js} +2 -2
- package/dist/{model-picker-C20xG3X3.js → model-picker-D7OvwR5Y.js} +2 -2
- package/dist/{models-BT4YKBSD.js → models-DEvrTY5o.js} +12 -12
- package/dist/{models-cli-DF_0JCx_.js → models-cli-BBuPQES6.js} +2 -2
- package/dist/{models-cli-DY7Bm2ed.js → models-cli-DsDVKG2f.js} +12 -12
- package/dist/{models-config-B5fBKGD3.js → models-config-DTMIOONu.js} +2 -2
- package/dist/{models-config-DoGGIvM6.js → models-config-pB1nNFSi.js} +2 -2
- package/dist/{node-cli-BRInA-Sb.js → node-cli-Cdp1_fUq.js} +9 -9
- package/dist/{node-cli-D9Z-dPUZ.js → node-cli-DsU_QUTE.js} +9 -9
- package/dist/{nodes-cli-CxK2FUkv.js → nodes-cli-B4oX5uNL.js} +5 -5
- package/dist/{nodes-cli-BG9J4Imp.js → nodes-cli-CKkuvp7a.js} +5 -5
- package/dist/{nodes-tool-CMcjIuR_.js → nodes-tool-C9NV_GnB.js} +3 -3
- package/dist/{nodes-tool-DhF3ck1I.js → nodes-tool-CTpJ5fug.js} +3 -3
- package/dist/{nodes-tool-Qj3ygrgS.js → nodes-tool-sKJc-Yjj.js} +3 -3
- package/dist/{nodes-utils-BaYNmopA.js → nodes-utils-CFmLuU06.js} +1 -1
- package/dist/{nodes-utils-DOy5cjCc.js → nodes-utils-CkQsT0N0.js} +1 -1
- package/dist/{nodes-utils-DF3X9oyh.js → nodes-utils-DNMhzvVb.js} +1 -1
- package/dist/{onboard-BWYSXcHt.js → onboard-V7JyPJex.js} +9 -9
- package/dist/{onboard-channels-Bq-evr85.js → onboard-channels-BDfxpK7n.js} +1 -1
- package/dist/{onboard-channels-DWr0yHWj.js → onboard-channels-CmC3qBbq.js} +3 -3
- package/dist/{onboard-channels-DyWYFAg2.js → onboard-channels-CzKarfzC.js} +1 -1
- package/dist/{onboard-channels-BOSMG4S-.js → onboard-channels-yUQOZPgP.js} +3 -3
- package/dist/{onboard-custom-DU4LJYpt.js → onboard-custom-BDM5_y2p.js} +2 -2
- package/dist/{onboard-custom-B136z_xx.js → onboard-custom-BvfApkVd.js} +1 -1
- package/dist/{onboard-custom-BMJRDvs6.js → onboard-custom-CfZMfUJ3.js} +1 -1
- package/dist/{onboard-custom-iL7ssiup.js → onboard-custom-CmwY-IfM.js} +2 -2
- package/dist/{onboard-helpers-C32t-FLY.js → onboard-helpers-BE_18443.js} +1 -1
- package/dist/{onboard-helpers-r8VwltFD.js → onboard-helpers-CekhN2Dt.js} +5 -5
- package/dist/{onboard-helpers-CshtI1Zv.js → onboard-helpers-DfEvL7Eo.js} +1 -1
- package/dist/{onboard-helpers-COFCTrXY.js → onboard-helpers-gS7HQOeH.js} +5 -5
- package/dist/{onboard-remote-OGiBmmSH.js → onboard-remote-CEWlSso0.js} +1 -1
- package/dist/{onboard-remote-DaSf_iYp.js → onboard-remote-aQfExF92.js} +1 -1
- package/dist/{onboard-D47mKKfB.js → onboard-rqIA9EXQ.js} +9 -9
- package/dist/{onboard-skills-roS4qTou.js → onboard-skills-75JQVISV.js} +1 -1
- package/dist/{onboard-skills-CjBxLUyk.js → onboard-skills-BSGpQX_t.js} +1 -1
- package/dist/{onboarding-DEi30r7I.js → onboarding-BNfuRC7v.js} +12 -12
- package/dist/{onboarding-CsR--6vK.js → onboarding-IiILUaqA.js} +12 -12
- package/dist/{onboarding.finalize-D6pKr-ZJ.js → onboarding.finalize-D2iRalHn.js} +9 -9
- package/dist/{onboarding.finalize-truf0W9s.js → onboarding.finalize-T1iu9hW_.js} +9 -9
- package/dist/{onboarding.gateway-config-2oj2EqOS.js → onboarding.gateway-config-DPJvhCxG.js} +2 -2
- package/dist/{onboarding.gateway-config-Bh1viokL.js → onboarding.gateway-config-W1qUrMi_.js} +2 -2
- package/dist/{outbound-send-deps-kbmuQhN5.js → outbound-send-deps-_gwXpS3X.js} +7 -7
- package/dist/{pairing-cli-BaxW5NvY.js → pairing-cli-DOVP6x__.js} +4 -4
- package/dist/{pairing-cli-Dm2RjHsZ.js → pairing-cli-DZQ0VISz.js} +4 -4
- package/dist/{pairing-store-DHcO9a4v.js → pairing-store-BP5Qp69V.js} +2 -2
- package/dist/{pairing-store-D0QXnN8e.js → pairing-store-CNDIY_e9.js} +2 -2
- package/dist/{pi-embedded-helpers-B-iZquPe.js → pi-embedded-helpers-CAos7nyg.js} +6 -6
- package/dist/{pi-embedded-helpers-D7jObbmL.js → pi-embedded-helpers-CJQRe8VG.js} +1 -1
- package/dist/{pi-embedded-helpers-DU-bh5ri.js → pi-embedded-helpers-Dt84Vt0L.js} +1 -1
- package/dist/{pi-embedded-utils-M7dzzD38.js → pi-embedded-utils-BlYe4un1.js} +1 -1
- package/dist/{pi-embedded-utils-BDVxHN9w.js → pi-embedded-utils-C3czix2Z.js} +1 -1
- package/dist/{pi-embedded-utils-ClQmhsYi.js → pi-embedded-utils-CnKLZQZs.js} +1 -1
- package/dist/{pi-tools.policy-DftNw1JI.js → pi-tools.policy-DClWWLv0.js} +4 -4
- package/dist/{plugin-auto-enable-Cnu8IYow.js → plugin-auto-enable-2zVKrpSR.js} +1 -1
- package/dist/{plugin-auto-enable-CoUmbc3E.js → plugin-auto-enable-BFqsBeiO.js} +1 -1
- package/dist/{plugin-registry-CCtEK0P_.js → plugin-registry-B8Ol763b.js} +3 -3
- package/dist/{plugin-registry-CYiBIvvj.js → plugin-registry-DqZ7qJuj.js} +3 -3
- package/dist/plugin-sdk/agents/tools/hub/crm-conversation-themes-tool.d.ts +11 -0
- package/dist/plugin-sdk/agents/tools/hub/search-crm-conversations-tool.d.ts +11 -0
- package/dist/plugin-sdk/channels/discord.js +153 -10
- package/dist/plugin-sdk/channels/imessage.js +153 -10
- package/dist/plugin-sdk/channels/line.js +153 -10
- package/dist/plugin-sdk/channels/signal.js +153 -10
- package/dist/plugin-sdk/channels/slack.js +153 -10
- package/dist/plugin-sdk/channels/telegram.js +153 -10
- package/dist/plugin-sdk/channels/whatsapp.js +153 -10
- package/dist/plugin-sdk/config/types.channels.d.ts +11 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +2 -0
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +1 -0
- package/dist/plugin-sdk/core.js +2 -1
- package/dist/plugin-sdk/gateway/client.d.ts +0 -5
- package/dist/plugin-sdk/index.js +153 -10
- package/dist/plugin-sdk/personal-agent/credential-client.d.ts +6 -3
- package/dist/{plugins-3ke-1_IL.js → plugins-BSX3IzSW.js} +1 -1
- package/dist/{plugins-Csm04VZy.js → plugins-BbE87x_i.js} +1 -1
- package/dist/{plugins-B4Zf_SkO.js → plugins-Db3l--Iv.js} +1 -1
- package/dist/{plugins-cli-SNQimFTq.js → plugins-cli-Do_2x-P9.js} +3 -3
- package/dist/{plugins-cli-CnKL7zRT.js → plugins-cli-sYIckkU6.js} +3 -3
- package/dist/{program-DMwCdKqC.js → program-DuPIc0CA.js} +7 -7
- package/dist/{program-context-CUgf-nFE.js → program-context-Butv-q95.js} +42 -42
- package/dist/{prompt-select-styled-XfmHgUSJ.js → prompt-select-styled-BExVeXb2.js} +18 -18
- package/dist/{prompt-select-styled-kv2v-J0x.js → prompt-select-styled-Cp4tJmDm.js} +18 -18
- package/dist/{push-apns-C7QqFlQ5.js → push-apns-Bxplfna8.js} +1 -31
- package/dist/{push-apns-B34to-or.js → push-apns-a42ldGL8.js} +1 -31
- package/dist/{pw-ai-DApwaGOU.js → pw-ai-CYHslBvW.js} +2 -2
- package/dist/{pw-ai-CsAABWsJ.js → pw-ai-CuhAAfak.js} +2 -2
- package/dist/{pw-ai-ZHl2zMES.js → pw-ai-DQg5o_dq.js} +2 -2
- package/dist/{pw-session-Cj5TD_Y4.js → pw-session-CE6GP8K2.js} +1 -1
- package/dist/{pw-session-BCUrAqCY.js → pw-session-DllHustd.js} +1 -1
- package/dist/{pw-session-CaO0Bkw4.js → pw-session-UBu8_Nno.js} +1 -1
- package/dist/{qr-cli-DYUIAbvh.js → qr-cli-BCZv2_hI.js} +2 -2
- package/dist/{qr-cli-az8v1Idc.js → qr-cli-DX6_VGoE.js} +2 -2
- package/dist/{register.agent-DZRauJcn.js → register.agent-BxjtbKDH.js} +7 -7
- package/dist/{register.agent-DbdSW2Ug.js → register.agent-DWJIWMVU.js} +12 -12
- package/dist/{register.channel-CPM1086Y.js → register.channel-BDuMmK1a.js} +2 -2
- package/dist/{register.channel-ZizsJ__5.js → register.channel-C_DXxr7c.js} +2 -2
- package/dist/{register.configure-BjDYUL20.js → register.configure-B_XY4Rl7.js} +1 -1
- package/dist/{register.configure-C-Q7AhcU.js → register.configure-kQKEsyRt.js} +1 -1
- package/dist/{register.drone-0mU5DIA_.js → register.drone-B2YlfnxU.js} +2 -2
- package/dist/{register.drone-BxcnHSWL.js → register.drone-BEaZQLpQ.js} +2 -2
- package/dist/{register.maintenance-DGoWogZZ.js → register.maintenance-BzbQEwcr.js} +5 -5
- package/dist/{register.maintenance-DHtTDNZm.js → register.maintenance-x4QqUEAs.js} +5 -5
- package/dist/{register.message-BON_gkri.js → register.message-C-HGH6ro.js} +7 -7
- package/dist/{register.message-gGAMAdiu.js → register.message-erSrrSy8.js} +7 -7
- package/dist/{register.onboard-Dlr48GBC.js → register.onboard-DtSasogy.js} +1 -1
- package/dist/{register.onboard-oW7iHTrT.js → register.onboard-RztK81fK.js} +1 -1
- package/dist/{register.setup-C-tBiZg9.js → register.setup-CNKwjRf3.js} +4 -4
- package/dist/{register.setup-CvwF93GX.js → register.setup-CU4oyWQN.js} +4 -4
- package/dist/{register.status-health-sessions-ChNAFUVq.js → register.status-health-sessions-C4MLusee.js} +6 -6
- package/dist/{register.status-health-sessions-UV0LR9im.js → register.status-health-sessions-CaPTa3NI.js} +3 -3
- package/dist/{register.subclis-BVSo499N.js → register.subclis-Q6q9ktLa.js} +29 -29
- package/dist/{reply-D1Xsn6eO.js → reply-pajA-Yl6.js} +33 -31
- package/dist/{reply-payloads-CHYk2cao.js → reply-payloads-BlZu5x6x.js} +6 -6
- package/dist/{reply-prefix-2P-kpLyA.js → reply-prefix-C2RVZSgb.js} +1 -1
- package/dist/{reply-prefix-CxJuc0hI.js → reply-prefix-g25aWRqJ.js} +1 -1
- package/dist/{resolve-route-BEVw9SKN.js → resolve-route-DQ7BIAU_.js} +2 -2
- package/dist/{resolve-route-AQSn8qfH.js → resolve-route-yooa1z42.js} +4 -4
- package/dist/{routes-yg37klM3.js → routes-C5NVLNYd.js} +4 -4
- package/dist/{routes-gNKwdTeZ.js → routes-C9bf1VtT.js} +4 -4
- package/dist/{rpc-qg2Z1rQN.js → rpc-BXk0xG0H.js} +1 -1
- package/dist/{rpc-DFTT-PZM.js → rpc-CRCwztMb.js} +1 -1
- package/dist/{run-main-CrNTVOYZ.js → run-main-BdLBIyiP.js} +19 -19
- package/dist/{sandbox-BoqQp8gb.js → sandbox-DLtSFsnF.js} +7 -7
- package/dist/{sandbox-vTPiRHpZ.js → sandbox-DQ8PqB1U.js} +7 -7
- package/dist/{sandbox-cli-CrKds6ek.js → sandbox-cli-BoxfOIvp.js} +4 -4
- package/dist/{sandbox-cli-CIGgwzST.js → sandbox-cli-CFJ9cLf1.js} +4 -4
- package/dist/{sdk-inspect-tool-DruE0gS7.js → sdk-inspect-tool--0YwiPqb.js} +2 -2
- package/dist/{sdk-inspect-tool-DKF5-MKP.js → sdk-inspect-tool-gngBv_e2.js} +2 -2
- package/dist/{sdk-inspect-tool-D8dw7W1x.js → sdk-inspect-tool-lWmixb2O.js} +2 -2
- package/dist/search-crm-conversations-tool-CXlTimAj.js +37 -0
- package/dist/search-crm-conversations-tool-CsAUIlEu.js +37 -0
- package/dist/search-crm-conversations-tool-CxEqcbxC.js +37 -0
- package/dist/{search-tools-tool-ChBggqrC.js → search-tools-tool-BCV0uHLY.js} +2 -2
- package/dist/{search-tools-tool-BT533cw8.js → search-tools-tool-DIr1vVNX.js} +2 -2
- package/dist/{search-tools-tool-DP49FT4E.js → search-tools-tool-XuYT8kpL.js} +2 -2
- package/dist/{security-cli-kbxMiBXq.js → security-cli-Cx2puO6Q.js} +4 -4
- package/dist/{security-cli-B44T1rTx.js → security-cli-sqaoNzjc.js} +4 -4
- package/dist/{send-DmO9gGRo.js → send-BABrPQhp.js} +4 -4
- package/dist/{send-C8bGQBU0.js → send-BOAXOqlj.js} +5 -5
- package/dist/{send-CMQUySy2.js → send-BhHYA7fz.js} +4 -4
- package/dist/{send-DF1aASt7.js → send-C1R6SHFd.js} +4 -4
- package/dist/{send-jIPdhFyH.js → send-CQTnHf7j.js} +6 -6
- package/dist/{send-BVwKSS0K.js → send-CzX8rfQQ.js} +6 -6
- package/dist/{send-DDsNa_Ji.js → send-DIjmAwBt.js} +5 -5
- package/dist/{send-C8Qvbhfl.js → send-DfwkS1Cy.js} +5 -5
- package/dist/{send-aP9vUdZA.js → send-DmLvgXqi.js} +5 -5
- package/dist/{send-GitfZeLF.js → send-F3N3Vgcy.js} +4 -4
- package/dist/{server-context-vL7RpqKW.js → server-context-BYcLDvQc.js} +6 -6
- package/dist/{server-context-DwRkP6wl.js → server-context-CDmBokpm.js} +6 -6
- package/dist/{server-context-CpjjYoiy.js → server-context-DFdTmsBq.js} +6 -6
- package/dist/{server-methods-list-BkeL_f1I.js → server-methods-list-CUUd_Znm.js} +1 -1
- package/dist/{server-methods-list-L1PUHfXd.js → server-methods-list-ZEquDpTD.js} +1 -1
- package/dist/{server-node-events-BPsy0Lio.js → server-node-events-Dml6MIAW.js} +11 -11
- package/dist/{server-node-events-BpU_jSoz.js → server-node-events-DpkjSBLL.js} +9 -9
- package/dist/{session-status-tool-CGqrPDT_.js → session-status-tool-BHEQX4IM.js} +6 -6
- package/dist/{session-status-tool-CpvDhFZV.js → session-status-tool-CIAw4c-9.js} +5 -5
- package/dist/{session-status-tool-Ci9ZTcWd.js → session-status-tool-CJeMrNTI.js} +7 -7
- package/dist/{session-utils-BwdwB80N.js → session-utils-Ffl6ASbR.js} +4 -4
- package/dist/{sessions-6bGzFKwC.js → sessions-CiNGPwTK.js} +4 -4
- package/dist/{sessions-DaA0crcT.js → sessions-ClJAVE0p.js} +6 -6
- package/dist/{sessions-Dv0AsGXk.js → sessions-DcOCMszs.js} +3 -3
- package/dist/{sessions-Bmu1qNSi.js → sessions-bztP6lN1.js} +6 -6
- package/dist/{sessions-helpers-9A3GpP1C.js → sessions-helpers-Ctko7_ZU.js} +3 -3
- package/dist/{sessions-helpers-BHv8itwp.js → sessions-helpers-D6BayuvJ.js} +3 -3
- package/dist/{sessions-helpers-DKduybhL.js → sessions-helpers-DpKh-EgX.js} +3 -3
- package/dist/{sessions-history-tool-B4QAi02g.js → sessions-history-tool-BtLEW8Jq.js} +5 -5
- package/dist/{sessions-history-tool-Dp7-TyAD.js → sessions-history-tool-DlKTVhCD.js} +5 -5
- package/dist/{sessions-history-tool-CbDHBInr.js → sessions-history-tool-DnxZRMF3.js} +5 -5
- package/dist/{sessions-list-tool-Doz90bAO.js → sessions-list-tool-BGmjNjoA.js} +5 -5
- package/dist/{sessions-list-tool-DM7nEN-u.js → sessions-list-tool-DSB6_hFi.js} +5 -5
- package/dist/{sessions-list-tool-C2P-REih.js → sessions-list-tool-OP5IQOE0.js} +5 -5
- package/dist/{sessions-send-tool-D_SpTEzR.js → sessions-send-tool-BF8lKSLy.js} +6 -6
- package/dist/{sessions-send-tool-CsvXXZ6X.js → sessions-send-tool-C1WMGH6W.js} +6 -6
- package/dist/{sessions-send-tool-Sl05Rc1o.js → sessions-send-tool-CG8A-kW5.js} +5 -5
- package/dist/{sessions-spawn-tool-CtVdtdxy.js → sessions-spawn-tool-BD6XdQ4G.js} +1 -1
- package/dist/{sessions-spawn-tool-Cvd7gZzb.js → sessions-spawn-tool-BE94fv2r.js} +1 -1
- package/dist/{sessions-spawn-tool-rhrbdrHi.js → sessions-spawn-tool-DRxk6sWZ.js} +1 -1
- package/dist/{shared-DDwwQhyO.js → shared-3xuhqrQ5.js} +2 -2
- package/dist/{shared-7xAh_DUw.js → shared-CCaYvPXV.js} +2 -2
- package/dist/{skills-cli-Csm1MWLY.js → skills-cli-CQ8fYddY.js} +2 -2
- package/dist/{skills-cli-BYDuIUBN.js → skills-cli-D-V0vRgX.js} +2 -2
- package/dist/{status-DJ3pP2oq.js → status-BeasmhMH.js} +13 -13
- package/dist/{status-CUiB4K9g.js → status-D8c6C5Z0.js} +3 -3
- package/dist/{status-CsflFo5K.js → status-DHuWnwac.js} +3 -3
- package/dist/{status-C42P0GTx.js → status-DbOwDhDe.js} +14 -14
- package/dist/{status.update-Dzkf5M1l.js → status.update-otfuSKpG.js} +1 -1
- package/dist/{status.update-Oa1Q7aKY.js → status.update-ww09PQZI.js} +1 -1
- package/dist/{subagent-registry-DPNFbdCM.js → subagent-registry-BHdRG10Z.js} +34 -32
- package/dist/{subagents-tool-BHleIh5_.js → subagents-tool-CpBMVS4i.js} +6 -6
- package/dist/{subagents-tool-Bhv8IWCj.js → subagents-tool-DIxAhxWP.js} +6 -6
- package/dist/{subagents-tool-DTt0oCJj.js → subagents-tool-h2WCtDtU.js} +6 -6
- package/dist/{system-cli-qKT31zzS.js → system-cli-C7sjnpqK.js} +1 -1
- package/dist/{system-cli-CWLXAiEM.js → system-cli-DP_wysY-.js} +1 -1
- package/dist/{systemd-hints-DPqwVMdw.js → systemd-hints-BnL2sVfy.js} +1 -1
- package/dist/{systemd-hints-OqapG2rD.js → systemd-hints-DEXpKBnF.js} +1 -1
- package/dist/{tables-CFTMokfs.js → tables-Cu2OX2r-.js} +1 -1
- package/dist/{tables-KrPYa57V.js → tables-DMdQO81Y.js} +1 -1
- package/dist/{targets-D6ZbcM7a.js → targets-By4KtyZv.js} +1 -1
- package/dist/{targets-BZDxvcL1.js → targets-DypSB4K6.js} +2 -2
- package/dist/{targets-DZBGTWw3.js → targets-UmV1VAkB.js} +1 -1
- package/dist/{tool-index-jbcu4uIg.js → tool-index-BtpJk78_.js} +1 -1
- package/dist/{tool-index-CSvXEUhV.js → tool-index-BwKMLu1r.js} +1 -1
- package/dist/{tool-index-DT6m2Vqq.js → tool-index-CEYMGFrO.js} +1 -1
- package/dist/{tool-policy-Cn0_ZqFk.js → tool-policy-CGuZzs9F.js} +2 -0
- package/dist/{tools-cli-DLtFAFDn.js → tools-cli-B13gsec8.js} +3 -3
- package/dist/{tools-cli-B9MDDYcf.js → tools-cli-BJ_zWgqf.js} +3 -3
- package/dist/{tts-CVpT5DDx.js → tts-CdyriGYN.js} +2 -2
- package/dist/{tts-DeWH-9iT.js → tts-DH1gVM5t.js} +34 -1
- package/dist/{tts-CYgPcpBG.js → tts-EAcO1Hwe.js} +2 -2
- package/dist/{tts-tool-Dk4NGcJh.js → tts-tool-BBIMu7X2.js} +3 -3
- package/dist/{tts-tool-CCnLadXB.js → tts-tool-DO_F3ZME.js} +3 -3
- package/dist/{tts-tool-BI70cNjf.js → tts-tool-oG4FOqod.js} +3 -3
- package/dist/{tui-AbgutQhU.js → tui-CvQjFLn2.js} +6 -13
- package/dist/{tui-C0meZtnL.js → tui-CyKvw7SL.js} +6 -13
- package/dist/{tui-cli-nGiXl6QC.js → tui-cli-DROBYt8G.js} +1 -1
- package/dist/{tui-cli-WzVsHu23.js → tui-cli-PQR9JVFA.js} +1 -1
- package/dist/{update-cli-zBj3N2GH.js → update-cli-DsNQjCBa.js} +8 -8
- package/dist/{update-cli-BFHuprZY.js → update-cli-GDRvdoj2.js} +8 -8
- package/dist/{validation-Tg8YP6Zn.js → validation-DAS7vvMM.js} +1 -0
- package/dist/{validation-Crc6Dwkp.js → validation-DoqW0cF4.js} +1 -0
- package/dist/{web-CBStYp_x.js → web-Bqx30F6C.js} +12 -12
- package/dist/web-DKofD48i.js +2 -0
- package/dist/{web-search-Ba6vR31X.js → web-search-BGzVmln0.js} +4 -4
- package/dist/{web-search-buicdjg7.js → web-search-BXe6QGYe.js} +4 -4
- package/dist/{web-search-ZWILjbUF.js → web-search-CGnEgHNH.js} +4 -4
- package/dist/{webhooks-cli-CbewtsqL.js → webhooks-cli-DMfQ_Sq0.js} +4 -4
- package/dist/{webhooks-cli-Dacy8QAQ.js → webhooks-cli-wUMz0eSs.js} +4 -4
- package/dist/{workspace-dirs-Bxd48BAf.js → workspace-dirs-Duw92DA5.js} +4 -4
- package/extensions/alert-watcher/index.js +33 -0
- package/extensions/bluebubbles/index.js +1 -0
- package/extensions/feishu/index.js +1 -0
- package/extensions/flows/index.js +34 -0
- package/extensions/gmail-calendar/index.js +201 -100
- package/extensions/gmail-calendar/index.ts +4 -0
- package/extensions/gmail-calendar/src/pulse-tools.test.ts +14 -0
- package/extensions/gmail-calendar/src/pulse-tools.ts +63 -0
- package/extensions/googlechat/index.js +1 -0
- package/extensions/irc/index.js +1 -0
- package/extensions/llm-task/index.js +33 -0
- package/extensions/matrix/{credentials-BiYGX26F.mjs → credentials-B_Avjvsy.mjs} +1 -0
- package/extensions/matrix/index.js +3 -3
- package/extensions/matrix/{matrix-Dqf7qlT1.mjs → matrix-Dy31zmus.mjs} +2 -2
- package/extensions/matrix/{resolve-targets-BPyBSXgs.mjs → resolve-targets-Bv0B2AJv.mjs} +2 -2
- package/extensions/mattermost/index.js +1 -0
- package/extensions/meta-graph/index.js +43 -3
- package/extensions/meta-graph/minion.manifest.ts +3 -0
- package/extensions/meta-graph/minion.plugin.json +7 -1
- package/extensions/meta-graph/src/channels/messaging-platform.ts +66 -1
- package/extensions/meta-graph/src/channels/shared.ts +21 -0
- package/extensions/nextcloud-talk/index.js +1 -0
- package/extensions/tlon/index.js +33 -0
- package/extensions/wati/index.js +1 -0
- package/extensions/weixin/index.js +1 -0
- package/extensions/zalo/index.js +1 -0
- package/extensions/zalouser/index.js +1 -0
- package/package.json +1 -1
- package/dist/daemon-install-helpers-C_vUbY3B.js +0 -2
- package/dist/daemon-install-helpers-DsVKYy7S.js +0 -2
- package/dist/doctor-completion-CrVVU5pA.js +0 -2
- package/dist/doctor-completion-DF48nvUw.js +0 -2
- package/dist/web-DftwF1B1.js +0 -2
|
@@ -526,7 +526,7 @@ function gwsResultToContent(result) {
|
|
|
526
526
|
}
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region extensions/gmail-calendar/src/calendar-tools.ts
|
|
529
|
-
function txt$
|
|
529
|
+
function txt$5(text) {
|
|
530
530
|
return {
|
|
531
531
|
content: [{
|
|
532
532
|
type: "text",
|
|
@@ -766,7 +766,7 @@ function registerCalendarTools(api, requireApproval) {
|
|
|
766
766
|
if (requireApproval && !p.approved) {
|
|
767
767
|
const attendeeNote = p.attendees ? `\nAttendees: ${p.attendees}` : "";
|
|
768
768
|
const summary = `Create event: "${p.title}"\nStart: ${p.start} → End: ${p.end}` + (p.location ? `\nLocation: ${p.location}` : "") + attendeeNote;
|
|
769
|
-
return txt$
|
|
769
|
+
return txt$5(buildApprovalPrompt(createPending({
|
|
770
770
|
provider: "gmail",
|
|
771
771
|
payload: { ...p },
|
|
772
772
|
summary
|
|
@@ -789,7 +789,7 @@ function registerCalendarTools(api, requireApproval) {
|
|
|
789
789
|
if (p.end) changes.push(`end → ${p.end}`);
|
|
790
790
|
if (p.location) changes.push(`location → ${p.location}`);
|
|
791
791
|
const summary = `Update event ${p.eventId}:\n${changes.join("\n")}`;
|
|
792
|
-
return txt$
|
|
792
|
+
return txt$5(buildApprovalPrompt(createPending({
|
|
793
793
|
provider: "gmail",
|
|
794
794
|
payload: {
|
|
795
795
|
...p,
|
|
@@ -851,7 +851,7 @@ function registerCalendarTools(api, requireApproval) {
|
|
|
851
851
|
if (!got.ok) return gwsResultToContent(got);
|
|
852
852
|
const attendees = ("data" in got ? got.data : {}).attendees ?? [];
|
|
853
853
|
const selfIdx = attendees.findIndex((a) => a.self === true);
|
|
854
|
-
if (selfIdx === -1) return txt$
|
|
854
|
+
if (selfIdx === -1) return txt$5("You are not on this event's attendee list, so there is no RSVP to set. You may be the organizer, or the event has no invitees.");
|
|
855
855
|
const updated = attendees.map((a, i) => i === selfIdx ? {
|
|
856
856
|
...a,
|
|
857
857
|
responseStatus: status
|
|
@@ -887,7 +887,7 @@ function registerCalendarTools(api, requireApproval) {
|
|
|
887
887
|
const p = params;
|
|
888
888
|
const { consumePending } = await import("./approval-gate-CqIW41tv.mjs").then((n) => n.t);
|
|
889
889
|
const entry = consumePending(String(p.token));
|
|
890
|
-
if (!entry) return txt$
|
|
890
|
+
if (!entry) return txt$5(`No pending calendar action found for token "${p.token}". It may have expired or already been confirmed.`);
|
|
891
891
|
const payload = entry.payload;
|
|
892
892
|
if (payload._action === "update") return await _executeCalendarUpdate(payload, ctx);
|
|
893
893
|
return await _executeCalendarCreate(payload, ctx);
|
|
@@ -4397,9 +4397,14 @@ var host_exports = /* @__PURE__ */ __exportAll({ createGatewayDroneHost: () => c
|
|
|
4397
4397
|
*/
|
|
4398
4398
|
function createGatewayDroneHost(opts = {}) {
|
|
4399
4399
|
const { config, agentDir, workspaceDir } = opts;
|
|
4400
|
+
let resolvedModel;
|
|
4400
4401
|
return {
|
|
4401
4402
|
async resolveApiKey(spec) {
|
|
4402
4403
|
const auth = await resolveProvider(spec, config, agentDir);
|
|
4404
|
+
resolvedModel = {
|
|
4405
|
+
provider: spec.provider,
|
|
4406
|
+
model: spec.model
|
|
4407
|
+
};
|
|
4403
4408
|
return {
|
|
4404
4409
|
apiKey: requireApiKey(auth, spec.provider),
|
|
4405
4410
|
source: auth.source
|
|
@@ -4432,6 +4437,34 @@ function createGatewayDroneHost(opts = {}) {
|
|
|
4432
4437
|
},
|
|
4433
4438
|
timestamp: Date.now()
|
|
4434
4439
|
});
|
|
4440
|
+
if (input.event === "agent.run.end" && input.usage && resolvedModel) {
|
|
4441
|
+
const u = input.usage;
|
|
4442
|
+
const inTok = u.inputTokens ?? 0;
|
|
4443
|
+
const outTok = u.outputTokens ?? 0;
|
|
4444
|
+
const cacheTok = u.cacheReadTokens ?? 0;
|
|
4445
|
+
emitEvent({
|
|
4446
|
+
category: "agent",
|
|
4447
|
+
severity: "info",
|
|
4448
|
+
event: "agent.llm.usage",
|
|
4449
|
+
message: `Drone LLM usage: ${input.droneId}`,
|
|
4450
|
+
correlationId: input.correlationId,
|
|
4451
|
+
metadata: {
|
|
4452
|
+
kind: "drone",
|
|
4453
|
+
droneId: input.droneId,
|
|
4454
|
+
provider: resolvedModel.provider,
|
|
4455
|
+
model: resolvedModel.model,
|
|
4456
|
+
source: "system",
|
|
4457
|
+
channel: "drone",
|
|
4458
|
+
tokens: {
|
|
4459
|
+
input: inTok,
|
|
4460
|
+
output: outTok,
|
|
4461
|
+
cacheRead: cacheTok,
|
|
4462
|
+
total: inTok + outTok + cacheTok
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
timestamp: Date.now()
|
|
4466
|
+
});
|
|
4467
|
+
}
|
|
4435
4468
|
}
|
|
4436
4469
|
};
|
|
4437
4470
|
}
|
|
@@ -4657,7 +4690,7 @@ async function categorizeEmailViaDrone(meta, host) {
|
|
|
4657
4690
|
}
|
|
4658
4691
|
//#endregion
|
|
4659
4692
|
//#region extensions/gmail-calendar/src/gmail-tools.ts
|
|
4660
|
-
function txt$
|
|
4693
|
+
function txt$4(text) {
|
|
4661
4694
|
return {
|
|
4662
4695
|
content: [{
|
|
4663
4696
|
type: "text",
|
|
@@ -4929,7 +4962,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
4929
4962
|
};
|
|
4930
4963
|
if (requireApproval && !p.approved) {
|
|
4931
4964
|
const summary = `To: ${send.to}\nSubject: ${send.subject}\n\nBody preview:\n${send.body.slice(0, 300)}${send.body.length > 300 ? "…" : ""}`;
|
|
4932
|
-
return txt$
|
|
4965
|
+
return txt$4(buildApprovalPrompt(createPending({
|
|
4933
4966
|
provider: "gmail",
|
|
4934
4967
|
payload: { ...send },
|
|
4935
4968
|
summary
|
|
@@ -4952,7 +4985,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
4952
4985
|
};
|
|
4953
4986
|
if (requireApproval && !p.approved) {
|
|
4954
4987
|
const summary = `Reply to message ${reply.id}${reply.replyAll ? " (reply-all)" : ""}\n\nBody preview:\n${reply.body.slice(0, 300)}`;
|
|
4955
|
-
return txt$
|
|
4988
|
+
return txt$4(buildApprovalPrompt(createPending({
|
|
4956
4989
|
provider: "gmail",
|
|
4957
4990
|
payload: { ...reply },
|
|
4958
4991
|
summary
|
|
@@ -5026,7 +5059,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5026
5059
|
async execute(_id, params) {
|
|
5027
5060
|
const p = params;
|
|
5028
5061
|
const resolved = await resolveLabelId(ctx, String(p.label), { create: true });
|
|
5029
|
-
if ("error" in resolved) return txt$
|
|
5062
|
+
if ("error" in resolved) return txt$4(resolved.error);
|
|
5030
5063
|
return gwsResultToContent(await modifyLabels(ctx, String(p.id), { addLabelIds: [resolved.id] }));
|
|
5031
5064
|
}
|
|
5032
5065
|
},
|
|
@@ -5038,7 +5071,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5038
5071
|
async execute(_id, params) {
|
|
5039
5072
|
const p = params;
|
|
5040
5073
|
const resolved = await resolveLabelId(ctx, String(p.label));
|
|
5041
|
-
if ("error" in resolved) return txt$
|
|
5074
|
+
if ("error" in resolved) return txt$4(resolved.error);
|
|
5042
5075
|
return gwsResultToContent(await modifyLabels(ctx, String(p.id), { removeLabelIds: [resolved.id] }));
|
|
5043
5076
|
}
|
|
5044
5077
|
},
|
|
@@ -5156,7 +5189,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5156
5189
|
const p = params;
|
|
5157
5190
|
const { consumePending } = await import("./approval-gate-CqIW41tv.mjs").then((n) => n.t);
|
|
5158
5191
|
const entry = consumePending(String(p.token));
|
|
5159
|
-
if (!entry) return txt$
|
|
5192
|
+
if (!entry) return txt$4(`No pending send found for token "${p.token}". It may have expired or already been confirmed.`);
|
|
5160
5193
|
if (entry.provider === "gmail") {
|
|
5161
5194
|
const payload = entry.payload;
|
|
5162
5195
|
return gwsResultToContent(await runGws(payload.id ? replyCommand({
|
|
@@ -5178,7 +5211,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5178
5211
|
sessionKey: ctx.sessionKey
|
|
5179
5212
|
});
|
|
5180
5213
|
}
|
|
5181
|
-
return txt$
|
|
5214
|
+
return txt$4(`Unknown provider "${entry.provider}"`);
|
|
5182
5215
|
}
|
|
5183
5216
|
},
|
|
5184
5217
|
{
|
|
@@ -5189,7 +5222,7 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5189
5222
|
async execute(_id, params) {
|
|
5190
5223
|
const p = params;
|
|
5191
5224
|
const { cancelPending } = await import("./approval-gate-CqIW41tv.mjs").then((n) => n.t);
|
|
5192
|
-
return txt$
|
|
5225
|
+
return txt$4(cancelPending(String(p.token)) ? `Pending send ${p.token} cancelled.` : `No pending send found for token "${p.token}".`);
|
|
5193
5226
|
}
|
|
5194
5227
|
},
|
|
5195
5228
|
{
|
|
@@ -5200,8 +5233,8 @@ function registerGmailTools(api, requireApproval) {
|
|
|
5200
5233
|
async execute(_id, _params) {
|
|
5201
5234
|
const { listPending } = await import("./approval-gate-CqIW41tv.mjs").then((n) => n.t);
|
|
5202
5235
|
const entries = listPending();
|
|
5203
|
-
if (entries.length === 0) return txt$
|
|
5204
|
-
return txt$
|
|
5236
|
+
if (entries.length === 0) return txt$4("No pending email sends.");
|
|
5237
|
+
return txt$4(entries.map((e) => {
|
|
5205
5238
|
const expiresIn = Math.round((e.expiresAt - Date.now()) / 6e4);
|
|
5206
5239
|
return `• [${e.token}] ${e.provider.toUpperCase()} — expires in ~${expiresIn}m\n ${e.summary.split("\n")[0]}`;
|
|
5207
5240
|
}).join("\n\n"));
|
|
@@ -5451,7 +5484,7 @@ async function graphFetch(endpoint, creds, opts = {}) {
|
|
|
5451
5484
|
}
|
|
5452
5485
|
//#endregion
|
|
5453
5486
|
//#region extensions/gmail-calendar/src/outlook-auth-tool.ts
|
|
5454
|
-
function txt$
|
|
5487
|
+
function txt$3(text) {
|
|
5455
5488
|
return {
|
|
5456
5489
|
content: [{
|
|
5457
5490
|
type: "text",
|
|
@@ -5491,8 +5524,8 @@ function registerOutlookAuthTools(api, config) {
|
|
|
5491
5524
|
async execute(_id, params) {
|
|
5492
5525
|
const p = params;
|
|
5493
5526
|
const ctx = getCtx$2(api);
|
|
5494
|
-
if (!ctx) return txt$
|
|
5495
|
-
if (!config.clientId) return txt$
|
|
5527
|
+
if (!ctx) return txt$3("Missing agent context.");
|
|
5528
|
+
if (!config.clientId) return txt$3("Outlook OAuth is not configured. Set outlook.clientId in the plugin config, or set OUTLOOK_CLIENT_ID environment variable. See https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app");
|
|
5496
5529
|
const email = String(p.email);
|
|
5497
5530
|
const extraScopes = p.scopes ?? [];
|
|
5498
5531
|
const scopes = [.../* @__PURE__ */ new Set([...OUTLOOK_SCOPES, ...extraScopes])];
|
|
@@ -5523,7 +5556,7 @@ function registerOutlookAuthTools(api, config) {
|
|
|
5523
5556
|
"",
|
|
5524
5557
|
callbackServer ? "The callback will be received automatically once you authorize." : `After authorizing, paste the full redirect URL back here (the URL starting with ${redirectUri}?code=...).`
|
|
5525
5558
|
];
|
|
5526
|
-
if (!callbackServer) return txt$
|
|
5559
|
+
if (!callbackServer) return txt$3(lines.join("\n"));
|
|
5527
5560
|
const handleCallback = async () => {
|
|
5528
5561
|
try {
|
|
5529
5562
|
const callbackUrl = await callbackServer.waitForCallback();
|
|
@@ -5577,7 +5610,7 @@ function registerOutlookAuthTools(api, config) {
|
|
|
5577
5610
|
}
|
|
5578
5611
|
};
|
|
5579
5612
|
handleCallback();
|
|
5580
|
-
return txt$
|
|
5613
|
+
return txt$3(lines.join("\n") + "\n\n✅ Callback server is running — authorization will complete automatically.");
|
|
5581
5614
|
}
|
|
5582
5615
|
});
|
|
5583
5616
|
api.registerTool({
|
|
@@ -5588,12 +5621,12 @@ function registerOutlookAuthTools(api, config) {
|
|
|
5588
5621
|
async execute(_id, params) {
|
|
5589
5622
|
const p = params;
|
|
5590
5623
|
const ctx = getCtx$2(api);
|
|
5591
|
-
if (!ctx) return txt$
|
|
5624
|
+
if (!ctx) return txt$3("Missing agent context.");
|
|
5592
5625
|
const emailFilter = p.email ? String(p.email) : void 0;
|
|
5593
5626
|
const all = listOutlookCredentials(ctx.agentId, ctx.sessionKey);
|
|
5594
5627
|
const filtered = emailFilter ? all.filter((c) => c.email === emailFilter) : all;
|
|
5595
|
-
if (filtered.length === 0) return txt$
|
|
5596
|
-
return txt$
|
|
5628
|
+
if (filtered.length === 0) return txt$3(emailFilter ? `Not authenticated with Outlook for ${emailFilter}. Use outlook_auth_start.` : "No Outlook accounts authenticated. Use outlook_auth_start.");
|
|
5629
|
+
return txt$3(`Outlook accounts:\n${filtered.map((c) => {
|
|
5597
5630
|
const expiresIn = Date.now() > c.expiresAt ? "EXPIRED" : `expires in ~${Math.round((c.expiresAt - Date.now()) / 6e4)}m`;
|
|
5598
5631
|
return `• ${c.email}${c.displayName ? ` (${c.displayName})` : ""} — ${expiresIn} — scopes: ${c.scopes.join(", ")}`;
|
|
5599
5632
|
}).join("\n")}`);
|
|
@@ -5607,21 +5640,21 @@ function registerOutlookAuthTools(api, config) {
|
|
|
5607
5640
|
async execute(_id, params) {
|
|
5608
5641
|
const p = params;
|
|
5609
5642
|
const ctx = getCtx$2(api);
|
|
5610
|
-
if (!ctx) return txt$
|
|
5643
|
+
if (!ctx) return txt$3("Missing agent context.");
|
|
5611
5644
|
const email = String(p.email);
|
|
5612
5645
|
const creds = await getValidOutlookCredentials(ctx.agentId, ctx.sessionKey, email, config);
|
|
5613
|
-
if (!creds) return txt$
|
|
5646
|
+
if (!creds) return txt$3(`No Outlook credentials found for ${email}.`);
|
|
5614
5647
|
try {
|
|
5615
5648
|
const { unlinkSync } = await import("node:fs");
|
|
5616
5649
|
unlinkSync(creds.filePath);
|
|
5617
5650
|
} catch {}
|
|
5618
|
-
return txt$
|
|
5651
|
+
return txt$3(`Outlook credentials for ${email} have been removed.`);
|
|
5619
5652
|
}
|
|
5620
5653
|
});
|
|
5621
5654
|
}
|
|
5622
5655
|
//#endregion
|
|
5623
5656
|
//#region extensions/gmail-calendar/src/outlook-calendar-tools.ts
|
|
5624
|
-
function txt$
|
|
5657
|
+
function txt$2(text) {
|
|
5625
5658
|
return {
|
|
5626
5659
|
content: [{
|
|
5627
5660
|
type: "text",
|
|
@@ -5828,9 +5861,9 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5828
5861
|
parameters: EmailParam,
|
|
5829
5862
|
async execute(_id, params) {
|
|
5830
5863
|
const creds = await getCreds(api, String(params.email), config);
|
|
5831
|
-
if ("error" in creds) return txt$
|
|
5864
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5832
5865
|
const result = await graphFetch("/me/calendars?$select=id,name,color,isDefaultCalendar,canEdit", creds);
|
|
5833
|
-
return result.ok ? json$1(result.data) : txt$
|
|
5866
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
5834
5867
|
}
|
|
5835
5868
|
});
|
|
5836
5869
|
api.registerTool({
|
|
@@ -5841,14 +5874,14 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5841
5874
|
async execute(_id, params) {
|
|
5842
5875
|
const p = params;
|
|
5843
5876
|
const creds = await getCreds(api, String(p.email), config);
|
|
5844
|
-
if ("error" in creds) return txt$
|
|
5877
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5845
5878
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
5846
5879
|
const sevenDays = new Date(Date.now() + 7 * 864e5).toISOString();
|
|
5847
5880
|
const startDT = String(p.startDateTime ?? now);
|
|
5848
5881
|
const endDT = String(p.endDateTime ?? sevenDays);
|
|
5849
5882
|
const top = Number(p.top ?? 20);
|
|
5850
5883
|
const result = await graphFetch(`${p.calendarId ? `/me/calendars/${String(p.calendarId)}` : "/me"}/calendarView?startDateTime=${encodeURIComponent(startDT)}&endDateTime=${encodeURIComponent(endDT)}&$top=${top}&$orderby=start/dateTime&$select=id,subject,start,end,location,organizer,attendees,isOnlineMeeting,onlineMeetingUrl`, creds);
|
|
5851
|
-
return result.ok ? json$1(result.data) : txt$
|
|
5884
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
5852
5885
|
}
|
|
5853
5886
|
});
|
|
5854
5887
|
api.registerTool({
|
|
@@ -5859,9 +5892,9 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5859
5892
|
async execute(_id, params) {
|
|
5860
5893
|
const p = params;
|
|
5861
5894
|
const creds = await getCreds(api, String(p.email), config);
|
|
5862
|
-
if ("error" in creds) return txt$
|
|
5895
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5863
5896
|
const result = await graphFetch(`/me/events/${String(p.eventId)}`, creds);
|
|
5864
|
-
return result.ok ? json$1(result.data) : txt$
|
|
5897
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
5865
5898
|
}
|
|
5866
5899
|
});
|
|
5867
5900
|
api.registerTool({
|
|
@@ -5874,7 +5907,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5874
5907
|
if (requireApproval && !p.approved) {
|
|
5875
5908
|
const attendeeNote = p.attendees ? `\nAttendees: ${p.attendees}` : "";
|
|
5876
5909
|
const summary = `Create Outlook event: "${p.title}"\nStart: ${p.start} → End: ${p.end}` + (p.location ? `\nLocation: ${p.location}` : "") + (p.isOnlineMeeting ? "\nOnline meeting: Yes" : "") + attendeeNote;
|
|
5877
|
-
return txt$
|
|
5910
|
+
return txt$2(buildApprovalPrompt(createPending({
|
|
5878
5911
|
provider: "outlook",
|
|
5879
5912
|
payload: {
|
|
5880
5913
|
...p,
|
|
@@ -5885,7 +5918,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5885
5918
|
})).replace("📧 **Email ready to send**", "📅 **Outlook event ready to create**"));
|
|
5886
5919
|
}
|
|
5887
5920
|
const creds = await getCreds(api, String(p.email), config);
|
|
5888
|
-
if ("error" in creds) return txt$
|
|
5921
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5889
5922
|
return await _executeOutlookCalCreate(p, config, api);
|
|
5890
5923
|
}
|
|
5891
5924
|
});
|
|
@@ -5903,7 +5936,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5903
5936
|
if (p.end) changes.push(`end → ${p.end}`);
|
|
5904
5937
|
if (p.location) changes.push(`location → ${p.location}`);
|
|
5905
5938
|
const summary = `Update Outlook event ${p.eventId}:\n${changes.join("\n")}`;
|
|
5906
|
-
return txt$
|
|
5939
|
+
return txt$2(buildApprovalPrompt(createPending({
|
|
5907
5940
|
provider: "outlook",
|
|
5908
5941
|
payload: {
|
|
5909
5942
|
...p,
|
|
@@ -5914,7 +5947,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5914
5947
|
})).replace("📧 **Email ready to send**", "📅 **Outlook event update ready**"));
|
|
5915
5948
|
}
|
|
5916
5949
|
const creds = await getCreds(api, String(p.email), config);
|
|
5917
|
-
if ("error" in creds) return txt$
|
|
5950
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5918
5951
|
const updates = {};
|
|
5919
5952
|
if (p.title) updates.subject = String(p.title);
|
|
5920
5953
|
if (p.start) updates.start = {
|
|
@@ -5934,7 +5967,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5934
5967
|
method: "PATCH",
|
|
5935
5968
|
body: updates
|
|
5936
5969
|
});
|
|
5937
|
-
return result.ok ? json$1(result.data) : txt$
|
|
5970
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
5938
5971
|
}
|
|
5939
5972
|
});
|
|
5940
5973
|
api.registerTool({
|
|
@@ -5945,9 +5978,9 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5945
5978
|
async execute(_id, params) {
|
|
5946
5979
|
const p = params;
|
|
5947
5980
|
const creds = await getCreds(api, String(p.email), config);
|
|
5948
|
-
if ("error" in creds) return txt$
|
|
5981
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5949
5982
|
const result = await graphFetch(`/me/events/${String(p.eventId)}`, creds, { method: "DELETE" });
|
|
5950
|
-
return result.ok ? txt$
|
|
5983
|
+
return result.ok ? txt$2("Event deleted.") : txt$2(`Failed: ${result.error}`);
|
|
5951
5984
|
}
|
|
5952
5985
|
});
|
|
5953
5986
|
api.registerTool({
|
|
@@ -5958,7 +5991,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5958
5991
|
async execute(_id, params) {
|
|
5959
5992
|
const p = params;
|
|
5960
5993
|
const creds = await getCreds(api, String(p.email), config);
|
|
5961
|
-
if ("error" in creds) return txt$
|
|
5994
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5962
5995
|
const action = String(p.response);
|
|
5963
5996
|
const result = await graphFetch(`/me/events/${String(p.eventId)}/${action}`, creds, {
|
|
5964
5997
|
method: "POST",
|
|
@@ -5967,7 +6000,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5967
6000
|
sendResponse: p.sendResponse !== false
|
|
5968
6001
|
}
|
|
5969
6002
|
});
|
|
5970
|
-
return result.ok ? txt$
|
|
6003
|
+
return result.ok ? txt$2(`RSVP "${action}" sent.`) : txt$2(`Failed: ${result.error}`);
|
|
5971
6004
|
}
|
|
5972
6005
|
});
|
|
5973
6006
|
api.registerTool({
|
|
@@ -5978,7 +6011,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
5978
6011
|
async execute(_id, params) {
|
|
5979
6012
|
const p = params;
|
|
5980
6013
|
const creds = await getCreds(api, String(p.email), config);
|
|
5981
|
-
if ("error" in creds) return txt$
|
|
6014
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
5982
6015
|
const durationMinutes = Number(p.durationMinutes ?? 60);
|
|
5983
6016
|
const result = await graphFetch("/me/findMeetingTimes", creds, {
|
|
5984
6017
|
method: "POST",
|
|
@@ -6008,7 +6041,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
6008
6041
|
minimumAttendeePercentage: 100
|
|
6009
6042
|
}
|
|
6010
6043
|
});
|
|
6011
|
-
return result.ok ? json$1(result.data) : txt$
|
|
6044
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
6012
6045
|
}
|
|
6013
6046
|
});
|
|
6014
6047
|
api.registerTool({
|
|
@@ -6019,7 +6052,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
6019
6052
|
async execute(_id, params) {
|
|
6020
6053
|
const p = params;
|
|
6021
6054
|
const creds = await getCreds(api, String(p.email), config);
|
|
6022
|
-
if ("error" in creds) return txt$
|
|
6055
|
+
if ("error" in creds) return txt$2(creds.error);
|
|
6023
6056
|
const top = Number(p.top ?? 20);
|
|
6024
6057
|
const query = encodeURIComponent(String(p.query));
|
|
6025
6058
|
let endpoint = `/me/events?$search="${query}"&$top=${top}&$select=id,subject,start,end,location,organizer`;
|
|
@@ -6029,7 +6062,7 @@ function registerOutlookCalendarTools(api, config, requireApproval) {
|
|
|
6029
6062
|
endpoint = `/me/calendarView?startDateTime=${encodeURIComponent(start)}&endDateTime=${encodeURIComponent(end)}&$search="${query}"&$top=${top}&$select=id,subject,start,end,location,organizer`;
|
|
6030
6063
|
}
|
|
6031
6064
|
const result = await graphFetch(endpoint, creds);
|
|
6032
|
-
return result.ok ? json$1(result.data) : txt$
|
|
6065
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
6033
6066
|
}
|
|
6034
6067
|
});
|
|
6035
6068
|
}
|
|
@@ -6038,13 +6071,13 @@ async function _executeOutlookCalCreate(p, config, api) {
|
|
|
6038
6071
|
const agentId = ctx.agentId;
|
|
6039
6072
|
const sessionKey = ctx.sessionKey;
|
|
6040
6073
|
const creds = await getValidOutlookCredentials(agentId, sessionKey, String(p.email), config);
|
|
6041
|
-
if (!creds) return txt$
|
|
6074
|
+
if (!creds) return txt$2(`Outlook credentials not found for ${p.email}.`);
|
|
6042
6075
|
const eventBody = buildEventBody(p);
|
|
6043
6076
|
const result = await graphFetch(p.calendarId ? `/me/calendars/${String(p.calendarId)}/events` : "/me/events", creds, {
|
|
6044
6077
|
method: "POST",
|
|
6045
6078
|
body: eventBody
|
|
6046
6079
|
});
|
|
6047
|
-
return result.ok ? json$1(result.data) : txt$
|
|
6080
|
+
return result.ok ? json$1(result.data) : txt$2(`Failed: ${result.error}`);
|
|
6048
6081
|
}
|
|
6049
6082
|
//#endregion
|
|
6050
6083
|
//#region extensions/gmail-calendar/src/outlook-mail-tools.ts
|
|
@@ -6052,7 +6085,7 @@ var outlook_mail_tools_exports = /* @__PURE__ */ __exportAll({
|
|
|
6052
6085
|
executeOutlookSend: () => executeOutlookSend,
|
|
6053
6086
|
registerOutlookMailTools: () => registerOutlookMailTools
|
|
6054
6087
|
});
|
|
6055
|
-
function txt(text) {
|
|
6088
|
+
function txt$1(text) {
|
|
6056
6089
|
return {
|
|
6057
6090
|
content: [{
|
|
6058
6091
|
type: "text",
|
|
@@ -6108,10 +6141,10 @@ function buildMessagePayload(opts) {
|
|
|
6108
6141
|
}
|
|
6109
6142
|
async function executeOutlookSend(payload, ctx) {
|
|
6110
6143
|
const config = payload.config;
|
|
6111
|
-
if (!config) return txt("Missing Outlook config in payload.");
|
|
6144
|
+
if (!config) return txt$1("Missing Outlook config in payload.");
|
|
6112
6145
|
const email = String(payload.fromEmail);
|
|
6113
6146
|
const creds = await getValidOutlookCredentials(ctx.agentId, ctx.sessionKey, email, config);
|
|
6114
|
-
if (!creds) return txt(`Outlook credentials expired for ${email}. Re-authenticate.`);
|
|
6147
|
+
if (!creds) return txt$1(`Outlook credentials expired for ${email}. Re-authenticate.`);
|
|
6115
6148
|
const endpoint = payload.replyToMessageId ? `/me/messages/${String(payload.replyToMessageId)}/reply` : "/me/sendMail";
|
|
6116
6149
|
let body;
|
|
6117
6150
|
if (payload.replyToMessageId && payload.replyAll) {
|
|
@@ -6120,7 +6153,7 @@ async function executeOutlookSend(payload, ctx) {
|
|
|
6120
6153
|
method: "POST",
|
|
6121
6154
|
body
|
|
6122
6155
|
});
|
|
6123
|
-
return result.ok ? txt("Reply-all sent successfully.") : txt(`Failed: ${result.error}`);
|
|
6156
|
+
return result.ok ? txt$1("Reply-all sent successfully.") : txt$1(`Failed: ${result.error}`);
|
|
6124
6157
|
}
|
|
6125
6158
|
if (payload.replyToMessageId) {
|
|
6126
6159
|
body = { comment: String(payload.body) };
|
|
@@ -6128,7 +6161,7 @@ async function executeOutlookSend(payload, ctx) {
|
|
|
6128
6161
|
method: "POST",
|
|
6129
6162
|
body
|
|
6130
6163
|
});
|
|
6131
|
-
return result.ok ? txt("Reply sent successfully.") : txt(`Failed: ${result.error}`);
|
|
6164
|
+
return result.ok ? txt$1("Reply sent successfully.") : txt$1(`Failed: ${result.error}`);
|
|
6132
6165
|
}
|
|
6133
6166
|
body = buildMessagePayload({
|
|
6134
6167
|
to: String(payload.to),
|
|
@@ -6141,7 +6174,7 @@ async function executeOutlookSend(payload, ctx) {
|
|
|
6141
6174
|
method: "POST",
|
|
6142
6175
|
body
|
|
6143
6176
|
});
|
|
6144
|
-
return result.ok ? txt("Email sent successfully.") : txt(`Failed: ${result.error}`);
|
|
6177
|
+
return result.ok ? txt$1("Email sent successfully.") : txt$1(`Failed: ${result.error}`);
|
|
6145
6178
|
}
|
|
6146
6179
|
const EmailParamBase = Type.Object({ email: Type.String({
|
|
6147
6180
|
description: "Authenticated Outlook email account",
|
|
@@ -6305,13 +6338,13 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6305
6338
|
async execute(_id, params) {
|
|
6306
6339
|
const p = params;
|
|
6307
6340
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6308
|
-
if ("error" in creds) return txt(creds.error);
|
|
6341
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6309
6342
|
const folder = String(p.folderId ?? "inbox");
|
|
6310
6343
|
const top = Number(p.top ?? 20);
|
|
6311
6344
|
const filter = p.filter ? `?$filter=${encodeURIComponent(String(p.filter))}` : "";
|
|
6312
6345
|
const select = p.select ? `${filter ? "&" : "?"}$select=${String(p.select)}` : `${filter ? "&" : "?"}$select=id,subject,from,toRecipients,receivedDateTime,isRead,bodyPreview,hasAttachments`;
|
|
6313
6346
|
const result = await graphFetch(`/me/mailFolders/${folder}/messages${filter}${select}${`${filter || select ? "&" : "?"}$top=${top}&$orderby=receivedDateTime desc`}`, creds);
|
|
6314
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6347
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6315
6348
|
}
|
|
6316
6349
|
});
|
|
6317
6350
|
api.registerTool({
|
|
@@ -6322,9 +6355,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6322
6355
|
async execute(_id, params) {
|
|
6323
6356
|
const p = params;
|
|
6324
6357
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6325
|
-
if ("error" in creds) return txt(creds.error);
|
|
6358
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6326
6359
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds);
|
|
6327
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6360
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6328
6361
|
}
|
|
6329
6362
|
});
|
|
6330
6363
|
api.registerTool({
|
|
@@ -6335,10 +6368,10 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6335
6368
|
async execute(_id, params) {
|
|
6336
6369
|
const p = params;
|
|
6337
6370
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6338
|
-
if ("error" in creds) return txt(creds.error);
|
|
6371
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6339
6372
|
const top = Number(p.top ?? 20);
|
|
6340
6373
|
const result = await graphFetch(`/me${p.folderId ? `/mailFolders/${String(p.folderId)}` : ""}/messages?$search="${encodeURIComponent(String(p.query))}"&$top=${top}&$select=id,subject,from,receivedDateTime,isRead,bodyPreview`, creds);
|
|
6341
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6374
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6342
6375
|
}
|
|
6343
6376
|
});
|
|
6344
6377
|
api.registerTool({
|
|
@@ -6351,7 +6384,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6351
6384
|
const fromEmail = String(p.email);
|
|
6352
6385
|
if (requireApproval && !p.approved) {
|
|
6353
6386
|
const summary = `To: ${p.to}\nSubject: ${p.subject}\n\nBody preview:\n${String(p.body).slice(0, 300)}${String(p.body).length > 300 ? "…" : ""}`;
|
|
6354
|
-
return txt(buildApprovalPrompt(createPending({
|
|
6387
|
+
return txt$1(buildApprovalPrompt(createPending({
|
|
6355
6388
|
provider: "outlook",
|
|
6356
6389
|
payload: {
|
|
6357
6390
|
...p,
|
|
@@ -6362,7 +6395,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6362
6395
|
})));
|
|
6363
6396
|
}
|
|
6364
6397
|
const creds = await getOutlookCreds(api, fromEmail, config);
|
|
6365
|
-
if ("error" in creds) return txt(creds.error);
|
|
6398
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6366
6399
|
const result = await graphFetch("/me/sendMail", creds, {
|
|
6367
6400
|
method: "POST",
|
|
6368
6401
|
body: buildMessagePayload({
|
|
@@ -6374,7 +6407,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6374
6407
|
isHtml: p.isHtml === true
|
|
6375
6408
|
})
|
|
6376
6409
|
});
|
|
6377
|
-
return result.ok ? txt("Email sent successfully.") : txt(`Failed: ${result.error}`);
|
|
6410
|
+
return result.ok ? txt$1("Email sent successfully.") : txt$1(`Failed: ${result.error}`);
|
|
6378
6411
|
}
|
|
6379
6412
|
});
|
|
6380
6413
|
api.registerTool({
|
|
@@ -6387,7 +6420,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6387
6420
|
const fromEmail = String(p.email);
|
|
6388
6421
|
if (requireApproval && !p.approved) {
|
|
6389
6422
|
const summary = `Reply to message ${p.messageId}${p.replyAll ? " (reply-all)" : ""}\n\nBody preview:\n${String(p.body).slice(0, 300)}`;
|
|
6390
|
-
return txt(buildApprovalPrompt(createPending({
|
|
6423
|
+
return txt$1(buildApprovalPrompt(createPending({
|
|
6391
6424
|
provider: "outlook",
|
|
6392
6425
|
payload: {
|
|
6393
6426
|
fromEmail,
|
|
@@ -6400,12 +6433,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6400
6433
|
})));
|
|
6401
6434
|
}
|
|
6402
6435
|
const creds = await getOutlookCreds(api, fromEmail, config);
|
|
6403
|
-
if ("error" in creds) return txt(creds.error);
|
|
6436
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6404
6437
|
const result = await graphFetch(p.replyAll ? `/me/messages/${String(p.messageId)}/replyAll` : `/me/messages/${String(p.messageId)}/reply`, creds, {
|
|
6405
6438
|
method: "POST",
|
|
6406
6439
|
body: { comment: String(p.body) }
|
|
6407
6440
|
});
|
|
6408
|
-
return result.ok ? txt("Reply sent.") : txt(`Failed: ${result.error}`);
|
|
6441
|
+
return result.ok ? txt$1("Reply sent.") : txt$1(`Failed: ${result.error}`);
|
|
6409
6442
|
}
|
|
6410
6443
|
});
|
|
6411
6444
|
api.registerTool({
|
|
@@ -6418,7 +6451,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6418
6451
|
const fromEmail = String(p.email);
|
|
6419
6452
|
if (requireApproval && !p.approved) {
|
|
6420
6453
|
const summary = `Reply-all to message ${p.messageId}\n\nBody preview:\n${String(p.body).slice(0, 300)}`;
|
|
6421
|
-
return txt(buildApprovalPrompt(createPending({
|
|
6454
|
+
return txt$1(buildApprovalPrompt(createPending({
|
|
6422
6455
|
provider: "outlook",
|
|
6423
6456
|
payload: {
|
|
6424
6457
|
fromEmail,
|
|
@@ -6431,12 +6464,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6431
6464
|
})));
|
|
6432
6465
|
}
|
|
6433
6466
|
const creds = await getOutlookCreds(api, fromEmail, config);
|
|
6434
|
-
if ("error" in creds) return txt(creds.error);
|
|
6467
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6435
6468
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}/replyAll`, creds, {
|
|
6436
6469
|
method: "POST",
|
|
6437
6470
|
body: { comment: String(p.body) }
|
|
6438
6471
|
});
|
|
6439
|
-
return result.ok ? txt("Reply-all sent.") : txt(`Failed: ${result.error}`);
|
|
6472
|
+
return result.ok ? txt$1("Reply-all sent.") : txt$1(`Failed: ${result.error}`);
|
|
6440
6473
|
}
|
|
6441
6474
|
});
|
|
6442
6475
|
api.registerTool({
|
|
@@ -6449,7 +6482,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6449
6482
|
const fromEmail = String(p.email);
|
|
6450
6483
|
if (requireApproval && !p.approved) {
|
|
6451
6484
|
const summary = `Forward message ${p.messageId} to: ${p.to}`;
|
|
6452
|
-
return txt(buildApprovalPrompt(createPending({
|
|
6485
|
+
return txt$1(buildApprovalPrompt(createPending({
|
|
6453
6486
|
provider: "outlook",
|
|
6454
6487
|
payload: {
|
|
6455
6488
|
fromEmail,
|
|
@@ -6462,7 +6495,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6462
6495
|
})));
|
|
6463
6496
|
}
|
|
6464
6497
|
const creds = await getOutlookCreds(api, fromEmail, config);
|
|
6465
|
-
if ("error" in creds) return txt(creds.error);
|
|
6498
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6466
6499
|
const toRecipients = String(p.to).split(",").map((e) => ({ emailAddress: { address: e.trim() } }));
|
|
6467
6500
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}/forward`, creds, {
|
|
6468
6501
|
method: "POST",
|
|
@@ -6471,7 +6504,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6471
6504
|
toRecipients
|
|
6472
6505
|
}
|
|
6473
6506
|
});
|
|
6474
|
-
return result.ok ? txt("Forwarded successfully.") : txt(`Failed: ${result.error}`);
|
|
6507
|
+
return result.ok ? txt$1("Forwarded successfully.") : txt$1(`Failed: ${result.error}`);
|
|
6475
6508
|
}
|
|
6476
6509
|
});
|
|
6477
6510
|
api.registerTool({
|
|
@@ -6482,12 +6515,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6482
6515
|
async execute(_id, params) {
|
|
6483
6516
|
const p = params;
|
|
6484
6517
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6485
|
-
if ("error" in creds) return txt(creds.error);
|
|
6518
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6486
6519
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}/move`, creds, {
|
|
6487
6520
|
method: "POST",
|
|
6488
6521
|
body: { destinationId: String(p.destinationFolderId) }
|
|
6489
6522
|
});
|
|
6490
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6523
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6491
6524
|
}
|
|
6492
6525
|
});
|
|
6493
6526
|
api.registerTool({
|
|
@@ -6498,9 +6531,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6498
6531
|
async execute(_id, params) {
|
|
6499
6532
|
const p = params;
|
|
6500
6533
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6501
|
-
if ("error" in creds) return txt(creds.error);
|
|
6534
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6502
6535
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds, { method: "DELETE" });
|
|
6503
|
-
return result.ok ? txt("Message deleted.") : txt(`Failed: ${result.error}`);
|
|
6536
|
+
return result.ok ? txt$1("Message deleted.") : txt$1(`Failed: ${result.error}`);
|
|
6504
6537
|
}
|
|
6505
6538
|
});
|
|
6506
6539
|
api.registerTool({
|
|
@@ -6511,12 +6544,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6511
6544
|
async execute(_id, params) {
|
|
6512
6545
|
const p = params;
|
|
6513
6546
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6514
|
-
if ("error" in creds) return txt(creds.error);
|
|
6547
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6515
6548
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}/move`, creds, {
|
|
6516
6549
|
method: "POST",
|
|
6517
6550
|
body: { destinationId: "archive" }
|
|
6518
6551
|
});
|
|
6519
|
-
return result.ok ? txt("Message archived.") : txt(`Failed: ${result.error}`);
|
|
6552
|
+
return result.ok ? txt$1("Message archived.") : txt$1(`Failed: ${result.error}`);
|
|
6520
6553
|
}
|
|
6521
6554
|
});
|
|
6522
6555
|
api.registerTool({
|
|
@@ -6527,12 +6560,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6527
6560
|
async execute(_id, params) {
|
|
6528
6561
|
const p = params;
|
|
6529
6562
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6530
|
-
if ("error" in creds) return txt(creds.error);
|
|
6563
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6531
6564
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds, {
|
|
6532
6565
|
method: "PATCH",
|
|
6533
6566
|
body: { isRead: true }
|
|
6534
6567
|
});
|
|
6535
|
-
return result.ok ? txt("Marked as read.") : txt(`Failed: ${result.error}`);
|
|
6568
|
+
return result.ok ? txt$1("Marked as read.") : txt$1(`Failed: ${result.error}`);
|
|
6536
6569
|
}
|
|
6537
6570
|
});
|
|
6538
6571
|
api.registerTool({
|
|
@@ -6543,12 +6576,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6543
6576
|
async execute(_id, params) {
|
|
6544
6577
|
const p = params;
|
|
6545
6578
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6546
|
-
if ("error" in creds) return txt(creds.error);
|
|
6579
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6547
6580
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds, {
|
|
6548
6581
|
method: "PATCH",
|
|
6549
6582
|
body: { isRead: false }
|
|
6550
6583
|
});
|
|
6551
|
-
return result.ok ? txt("Marked as unread.") : txt(`Failed: ${result.error}`);
|
|
6584
|
+
return result.ok ? txt$1("Marked as unread.") : txt$1(`Failed: ${result.error}`);
|
|
6552
6585
|
}
|
|
6553
6586
|
});
|
|
6554
6587
|
api.registerTool({
|
|
@@ -6559,12 +6592,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6559
6592
|
async execute(_id, params) {
|
|
6560
6593
|
const p = params;
|
|
6561
6594
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6562
|
-
if ("error" in creds) return txt(creds.error);
|
|
6595
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6563
6596
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds, {
|
|
6564
6597
|
method: "PATCH",
|
|
6565
6598
|
body: { flag: { flagStatus: String(p.flag) } }
|
|
6566
6599
|
});
|
|
6567
|
-
return result.ok ? txt(`Message flagged as "${p.flag}".`) : txt(`Failed: ${result.error}`);
|
|
6600
|
+
return result.ok ? txt$1(`Message flagged as "${p.flag}".`) : txt$1(`Failed: ${result.error}`);
|
|
6568
6601
|
}
|
|
6569
6602
|
});
|
|
6570
6603
|
api.registerTool({
|
|
@@ -6575,12 +6608,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6575
6608
|
async execute(_id, params) {
|
|
6576
6609
|
const p = params;
|
|
6577
6610
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6578
|
-
if ("error" in creds) return txt(creds.error);
|
|
6611
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6579
6612
|
const result = await graphFetch(`/me/messages/${String(p.messageId)}`, creds, {
|
|
6580
6613
|
method: "PATCH",
|
|
6581
6614
|
body: { categories: p.categories }
|
|
6582
6615
|
});
|
|
6583
|
-
return result.ok ? txt("Categories applied.") : txt(`Failed: ${result.error}`);
|
|
6616
|
+
return result.ok ? txt$1("Categories applied.") : txt$1(`Failed: ${result.error}`);
|
|
6584
6617
|
}
|
|
6585
6618
|
});
|
|
6586
6619
|
api.registerTool({
|
|
@@ -6590,9 +6623,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6590
6623
|
parameters: EmailParamBase,
|
|
6591
6624
|
async execute(_id, params) {
|
|
6592
6625
|
const creds = await getOutlookCreds(api, String(params.email), config);
|
|
6593
|
-
if ("error" in creds) return txt(creds.error);
|
|
6626
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6594
6627
|
const result = await graphFetch("/me/outlook/masterCategories", creds);
|
|
6595
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6628
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6596
6629
|
}
|
|
6597
6630
|
});
|
|
6598
6631
|
api.registerTool({
|
|
@@ -6609,9 +6642,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6609
6642
|
async execute(_id, params) {
|
|
6610
6643
|
const p = params;
|
|
6611
6644
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6612
|
-
if ("error" in creds) return txt(creds.error);
|
|
6645
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6613
6646
|
const result = await graphFetch(p.parentFolderId ? `/me/mailFolders/${String(p.parentFolderId)}/childFolders` : "/me/mailFolders", creds);
|
|
6614
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6647
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6615
6648
|
}
|
|
6616
6649
|
});
|
|
6617
6650
|
api.registerTool({
|
|
@@ -6622,12 +6655,12 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6622
6655
|
async execute(_id, params) {
|
|
6623
6656
|
const p = params;
|
|
6624
6657
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6625
|
-
if ("error" in creds) return txt(creds.error);
|
|
6658
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6626
6659
|
const result = await graphFetch(p.parentFolderId ? `/me/mailFolders/${String(p.parentFolderId)}/childFolders` : "/me/mailFolders", creds, {
|
|
6627
6660
|
method: "POST",
|
|
6628
6661
|
body: { displayName: String(p.name) }
|
|
6629
6662
|
});
|
|
6630
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6663
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6631
6664
|
}
|
|
6632
6665
|
});
|
|
6633
6666
|
api.registerTool({
|
|
@@ -6637,9 +6670,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6637
6670
|
parameters: OutlookRulesSchema,
|
|
6638
6671
|
async execute(_id, params) {
|
|
6639
6672
|
const creds = await getOutlookCreds(api, String(params.email), config);
|
|
6640
|
-
if ("error" in creds) return txt(creds.error);
|
|
6673
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6641
6674
|
const result = await graphFetch("/me/mailFolders/inbox/messageRules", creds);
|
|
6642
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6675
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6643
6676
|
}
|
|
6644
6677
|
});
|
|
6645
6678
|
api.registerTool({
|
|
@@ -6650,7 +6683,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6650
6683
|
async execute(_id, params) {
|
|
6651
6684
|
const p = params;
|
|
6652
6685
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6653
|
-
if ("error" in creds) return txt(creds.error);
|
|
6686
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6654
6687
|
const result = await graphFetch("/me/messages", creds, {
|
|
6655
6688
|
method: "POST",
|
|
6656
6689
|
body: buildMessagePayload({
|
|
@@ -6662,7 +6695,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6662
6695
|
isHtml: p.isHtml === true
|
|
6663
6696
|
}).message
|
|
6664
6697
|
});
|
|
6665
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6698
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6666
6699
|
}
|
|
6667
6700
|
});
|
|
6668
6701
|
api.registerTool({
|
|
@@ -6683,9 +6716,9 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6683
6716
|
async execute(_id, params) {
|
|
6684
6717
|
const p = params;
|
|
6685
6718
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6686
|
-
if ("error" in creds) return txt(creds.error);
|
|
6719
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6687
6720
|
const result = await graphFetch(`/me/mailFolders/drafts/messages?$top=${Number(p.top ?? 10)}&$select=id,subject,toRecipients,createdDateTime,lastModifiedDateTime`, creds);
|
|
6688
|
-
return result.ok ? json(result.data) : txt(`Failed: ${result.error}`);
|
|
6721
|
+
return result.ok ? json(result.data) : txt$1(`Failed: ${result.error}`);
|
|
6689
6722
|
}
|
|
6690
6723
|
});
|
|
6691
6724
|
api.registerTool({
|
|
@@ -6695,7 +6728,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6695
6728
|
parameters: EmailParamBase,
|
|
6696
6729
|
async execute(_id, params) {
|
|
6697
6730
|
const creds = await getOutlookCreds(api, String(params.email), config);
|
|
6698
|
-
if ("error" in creds) return txt(creds.error);
|
|
6731
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6699
6732
|
const [unreadResult, flaggedResult] = await Promise.all([graphFetch("/me/mailFolders/inbox/messages?$filter=isRead eq false&$top=5&$select=id,subject,from,receivedDateTime", creds), graphFetch("/me/messages?$filter=flag/flagStatus eq 'flagged'&$top=5&$select=id,subject,from,receivedDateTime", creds)]);
|
|
6700
6733
|
return json({
|
|
6701
6734
|
unread: unreadResult.ok ? unreadResult.data : { error: unreadResult.error },
|
|
@@ -6720,7 +6753,7 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6720
6753
|
async execute(_id, params) {
|
|
6721
6754
|
const p = params;
|
|
6722
6755
|
const creds = await getOutlookCreds(api, String(p.email), config);
|
|
6723
|
-
if ("error" in creds) return txt(creds.error);
|
|
6756
|
+
if ("error" in creds) return txt$1(creds.error);
|
|
6724
6757
|
let from = p.from ? String(p.from) : void 0;
|
|
6725
6758
|
let subject = p.subject ? String(p.subject) : void 0;
|
|
6726
6759
|
if (p.messageId && (!from || !subject)) {
|
|
@@ -6748,6 +6781,73 @@ function registerOutlookMailTools(api, config, requireApproval) {
|
|
|
6748
6781
|
});
|
|
6749
6782
|
}
|
|
6750
6783
|
//#endregion
|
|
6784
|
+
//#region src/gateway/hub-rest-registry.ts
|
|
6785
|
+
let rest = null;
|
|
6786
|
+
function getHubRest() {
|
|
6787
|
+
return rest;
|
|
6788
|
+
}
|
|
6789
|
+
//#endregion
|
|
6790
|
+
//#region extensions/gmail-calendar/src/pulse-tools.ts
|
|
6791
|
+
function txt(text) {
|
|
6792
|
+
return {
|
|
6793
|
+
content: [{
|
|
6794
|
+
type: "text",
|
|
6795
|
+
text
|
|
6796
|
+
}],
|
|
6797
|
+
details: { text }
|
|
6798
|
+
};
|
|
6799
|
+
}
|
|
6800
|
+
const CardSchema = Type.Object({
|
|
6801
|
+
source: Type.String(),
|
|
6802
|
+
kind: Type.String(),
|
|
6803
|
+
title: Type.String(),
|
|
6804
|
+
summary: Type.Optional(Type.String()),
|
|
6805
|
+
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
6806
|
+
dedupKey: Type.String()
|
|
6807
|
+
});
|
|
6808
|
+
const PulseProposeSchema = Type.Object({
|
|
6809
|
+
orgId: Type.String({ description: "Target org id (PINONITE)" }),
|
|
6810
|
+
proposals: Type.Array(CardSchema)
|
|
6811
|
+
});
|
|
6812
|
+
/** Pure body shaper — kept separate from `execute` so it's unit-testable without network. */
|
|
6813
|
+
function buildPulseBody(orgId, proposals) {
|
|
6814
|
+
return {
|
|
6815
|
+
orgId,
|
|
6816
|
+
proposals
|
|
6817
|
+
};
|
|
6818
|
+
}
|
|
6819
|
+
function registerPulseTools(api) {
|
|
6820
|
+
const factory = () => [{
|
|
6821
|
+
name: "pulse_propose",
|
|
6822
|
+
label: "Propose Pulse cards",
|
|
6823
|
+
description: "Write proactive proposal cards (digest / create_event / reminder / draft_reply / fyi) to the Hub Pulse feed for the user to approve.",
|
|
6824
|
+
parameters: PulseProposeSchema,
|
|
6825
|
+
async execute(_id, params) {
|
|
6826
|
+
const rest = getHubRest();
|
|
6827
|
+
if (!rest) return txt("Pulse: hub not linked; skipped.");
|
|
6828
|
+
const p = params;
|
|
6829
|
+
const orgId = String(p.orgId ?? "");
|
|
6830
|
+
const proposalsRaw = p.proposals;
|
|
6831
|
+
const proposals = Array.isArray(proposalsRaw) ? proposalsRaw : [];
|
|
6832
|
+
if (!orgId || !proposals.length) return txt("Pulse: nothing to propose.");
|
|
6833
|
+
try {
|
|
6834
|
+
const j = await (await fetch(`${rest.hubUrl.replace(/\/$/, "")}/api/gateway/pulse/proposals`, {
|
|
6835
|
+
method: "POST",
|
|
6836
|
+
headers: {
|
|
6837
|
+
Authorization: `Bearer ${rest.serverToken}`,
|
|
6838
|
+
"content-type": "application/json"
|
|
6839
|
+
},
|
|
6840
|
+
body: JSON.stringify(buildPulseBody(orgId, proposals))
|
|
6841
|
+
})).json().catch(() => ({}));
|
|
6842
|
+
return txt(`Pulse: proposed ${j.inserted ?? 0}, skipped ${j.skipped ?? 0}.`);
|
|
6843
|
+
} catch (e) {
|
|
6844
|
+
return txt(`Pulse: post failed — ${e instanceof Error ? e.message : "error"}`);
|
|
6845
|
+
}
|
|
6846
|
+
}
|
|
6847
|
+
}];
|
|
6848
|
+
api.registerTool(factory, { names: ["pulse_propose"] });
|
|
6849
|
+
}
|
|
6850
|
+
//#endregion
|
|
6751
6851
|
//#region extensions/gmail-calendar/index.ts
|
|
6752
6852
|
const plugin = {
|
|
6753
6853
|
id: "gmail-calendar",
|
|
@@ -6767,6 +6867,7 @@ const plugin = {
|
|
|
6767
6867
|
registerOutlookAuthTools(api, outlookConfig);
|
|
6768
6868
|
registerOutlookMailTools(api, outlookConfig, requireApproval);
|
|
6769
6869
|
registerOutlookCalendarTools(api, outlookConfig, requireApproval);
|
|
6870
|
+
registerPulseTools(api);
|
|
6770
6871
|
api.logger.info(`gmail-calendar loaded — requireApproval=${requireApproval}, outlook=${!!outlookConfig.clientId}`);
|
|
6771
6872
|
}
|
|
6772
6873
|
};
|