@nikolasp98/minion 2026.7.12-dev.20260717012629 → 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-CsDwKqbj.js → _registry.generated-B5zHyziR.js} +55 -19
- package/dist/{_registry.generated-Bf3ymIWb.js → _registry.generated-C3zYJ6On.js} +55 -19
- package/dist/{_registry.generated-CNf4nYSA.js → _registry.generated-DKC2RDUo.js} +55 -19
- package/dist/{accounts-B7ml53Ys.js → accounts-BwLt-V29.js} +1 -1
- package/dist/{accounts-D4dBjkdJ.js → accounts-CJf7velm.js} +1 -1
- package/dist/{accounts-CDifKOa5.js → accounts-DZ-7pWtI.js} +1 -1
- package/dist/{accounts-CJ54_EYq.js → accounts-vA22MiLu.js} +1 -1
- package/dist/{acp-cli-DG6f4Jao.js → acp-cli-DCCSn5NL.js} +4 -4
- package/dist/{acp-cli-DMIGuEja.js → acp-cli-wKQfGJIA.js} +4 -4
- package/dist/{agent-BzAtsKoj.js → agent-BvFdXWhL.js} +12 -12
- package/dist/{agent-vOBNNEUm.js → agent-DaBGbCfi.js} +11 -11
- package/dist/{agent-step-BzczgcBW.js → agent-step-BCSCZOB-.js} +3 -3
- package/dist/{agent-step-DAXo3AND.js → agent-step-CgJNQPZ8.js} +3 -3
- package/dist/{agents-CkHaALu1.js → agents-CGJzMj2S.js} +8 -8
- package/dist/{agents-list-tool-h0YontT9.js → agents-list-tool-C93hCbLj.js} +3 -3
- package/dist/{agents-list-tool-DZYlXoEu.js → agents-list-tool-Cd_Q7HuV.js} +3 -3
- package/dist/{agents-list-tool-C8z1M3vP.js → agents-list-tool-SNOunDVC.js} +3 -3
- package/dist/{audit-DFazpU7u.js → audit-CftXdiYP.js} +12 -12
- package/dist/{audit-DAd-GODJ.js → audit-D9GAKieT.js} +12 -12
- package/dist/{auth-choice-BWy0ncH4.js → auth-choice-DKtOuFks.js} +4 -4
- package/dist/{auth-choice-BqTjvTu_.js → auth-choice-dbpaxkks.js} +4 -4
- package/dist/{banner-fb9sKyTG.js → banner-B-uaqlJ9.js} +1 -1
- package/dist/{browser-cli-Dgym9Pss.js → browser-cli-BhqYEW3P.js} +3 -3
- package/dist/{browser-cli-NlqZe4Ya.js → browser-cli-DZrCLNaa.js} +3 -3
- package/dist/{browser-tool-9WO6zBb1.js → browser-tool-BWAVW295.js} +7 -7
- package/dist/{browser-tool-B8mfIisN.js → browser-tool-DErZM1k2.js} +7 -7
- package/dist/{browser-tool-B9ovj5p-.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-ZqMa-gJE.js → call-BWSchIcf.js} +3 -3
- package/dist/{call-Bak9BEaV.js → call-DHo0XdK6.js} +2 -11
- package/dist/{call-HrC4j982.js → call-DQ1ciEPz.js} +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{canvas-tool-DfHPvEBP.js → canvas-tool-BneFVxD8.js} +2 -2
- package/dist/{canvas-tool-DBXhD6tC.js → canvas-tool-DeJaejKM.js} +2 -2
- package/dist/{canvas-tool-BuPplKr1.js → canvas-tool-Ogd2OChc.js} +2 -2
- package/dist/{channel-options-BlbC4hoP.js → channel-options-D8AdMco0.js} +2 -2
- package/dist/{channel-options-Djd8KDTO.js → channel-options-DjEmC0qR.js} +2 -2
- package/dist/{channel-selection-rfZAntR5.js → channel-selection-1nQ35zxv.js} +1 -1
- package/dist/{channel-selection-DFlpx-HQ.js → channel-selection-wHLAe5Et.js} +1 -1
- package/dist/{channel-web-DOEUixG-.js → channel-web-DRfE9BO9.js} +12 -12
- package/dist/{channels-cli-BJXid8X2.js → channels-cli-B2WLqWbi.js} +13 -13
- package/dist/{channels-cli-URtGha3o.js → channels-cli-DWxvR4dU.js} +13 -13
- package/dist/{channels-status-issues-C0kIpkF7.js → channels-status-issues-8gZwCTjP.js} +1 -1
- package/dist/{channels-status-issues-DaiYEqAS.js → channels-status-issues-CE1BlXu3.js} +1 -1
- package/dist/{chrome-D_76HZyF.js → chrome-BA0Rm2cQ.js} +2 -2
- package/dist/{chrome-DuRehNFS.js → chrome-CQYa8Qpn.js} +2 -2
- package/dist/{chrome-BRzE-LJY.js → chrome-Cm9IFEur.js} +2 -2
- package/dist/{clawbot-cli-66rOShMF.js → clawbot-cli-00xvHy61.js} +1 -1
- package/dist/{clawbot-cli-hq1Rw3L6.js → clawbot-cli-BBjE2ol-.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-BkuiwObq.js → cli-CgVsnrl6.js} +3 -3
- package/dist/{cli-BHAgh8CB.js → cli-CtGu18f6.js} +3 -3
- package/dist/{client-B0-4D6WF.js → client-2fZQKc2l.js} +5 -5
- package/dist/{client-UbK7ubLT.js → client-4u1JH1Zk.js} +0 -9
- package/dist/{client-D1WALv-l.js → client-B8GOknl-.js} +5 -5
- package/dist/{client-BytZEJbm.js → client-D-ZPTrtK.js} +5 -5
- package/dist/{client-BYzTMaoO.js → client-W3BYtITQ.js} +0 -9
- package/dist/{command-registry-CfWB1hdH.js → command-registry-B5mckc9m.js} +14 -14
- package/dist/{commands-registry-BlyGFCSk.js → commands-registry-DJs-edcv.js} +2 -2
- package/dist/{commands-registry-C2WcVGlB.js → commands-registry-qRRu3RMk.js} +2 -2
- package/dist/{completion-cli-tqqS0a94.js → completion-cli-BXTewelZ.js} +2 -2
- package/dist/{completion-cli-Df0qaL-8.js → completion-cli-BcPY11gL.js} +1 -1
- package/dist/{config-Cv9wgnm3.js → config-BerwgOPM.js} +2 -2
- package/dist/{config-Cl99ZT5K.js → config-BrDW75c2.js} +2 -2
- package/dist/{config-jWZyRZCZ.js → config-DPP0lwsZ.js} +1 -1
- package/dist/{config-cli-CYLtsJxS.js → config-cli-CDhIjQc_.js} +4 -4
- package/dist/{config-cli-B5jOL0sJ.js → config-cli-CS88lrpx.js} +4 -4
- package/dist/{config-guard-CmMZyP8A.js → config-guard-CdCd4lGu.js} +3 -3
- package/dist/{config-guard-l4pi5ua5.js → config-guard-DeZ33UWP.js} +3 -3
- package/dist/{config-validation-Den1ytQw.js → config-validation-CL0L0Dyf.js} +2 -2
- package/dist/{config-validation-CLa17eM9.js → config-validation-txBaIaqO.js} +2 -2
- package/dist/{configure-Iq4PQCTT.js → configure-Bg10bnTk.js} +16 -16
- package/dist/{configure-DSS4L9Mq.js → configure-D5oM27Go.js} +16 -16
- package/dist/{control-service-yE-yJe9a.js → control-service-C369Rxs0.js} +6 -6
- package/dist/{control-service-C7eTLrXZ.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-D6wEIJaf.js → cron-cli-CsVKtwB8.js} +2 -2
- package/dist/{cron-cli-CQ94l2uK.js → cron-cli-Dddt4cu1.js} +2 -2
- package/dist/{cron-tool-UCuWE7ej.js → cron-tool-BWM-ykso.js} +5 -5
- package/dist/{cron-tool-NSfa1aQw.js → cron-tool-CD3kXNpT.js} +5 -5
- package/dist/{cron-tool-DbqPDo0E.js → cron-tool-CaMrrFJF.js} +5 -5
- package/dist/{daemon-cli-8SASjlXZ.js → daemon-cli-CAgHOWp8.js} +9 -9
- package/dist/{daemon-cli-RcyTg_dK.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-BhDDZrXa.js → daemon-runtime-C0_5HhUZ.js} +1 -1
- package/dist/{daemon-runtime-CAiL2S2s.js → daemon-runtime-CZXX_eXt.js} +1 -1
- package/dist/{deliver-B1Y0N_1y.js → deliver-BUifEj0F.js} +4 -4
- package/dist/{deliver-CSoS2hSJ.js → deliver-DJHcrP_i.js} +5 -5
- package/dist/{deliver-CUJiWM35.js → deliver-O2dLDnLg.js} +4 -4
- package/dist/{deps-D9Ntzz9k.js → deps-i_B9izvk.js} +7 -7
- package/dist/{devices-cli-Bipcftov.js → devices-cli-B9OXRt0t.js} +1 -1
- package/dist/{devices-cli-BRJy3IY1.js → devices-cli-DAcSoXi5.js} +1 -1
- package/dist/{directory-cli-8BQHC04L.js → directory-cli-kxPXkKog.js} +4 -4
- package/dist/{directory-cli-_WM5bP6W.js → directory-cli-t11V_DDe.js} +4 -4
- package/dist/{dispatcher-CtHTDVaN.js → dispatcher-CvddQmnF.js} +1 -1
- package/dist/{dispatcher-988hS7Ae.js → dispatcher-Dt_9aSBz.js} +1 -1
- package/dist/{dm-policy-shared-CfyAqELR.js → dm-policy-shared-Df7eGBuI.js} +2 -2
- package/dist/{dm-policy-shared-CppG0CX8.js → dm-policy-shared-DyFNKOIs.js} +2 -2
- package/dist/{dns-cli-DCgy52JG.js → dns-cli-CuxJhzIr.js} +2 -2
- package/dist/{dns-cli-DbqXCKNP.js → dns-cli-D-xNNWBy.js} +2 -2
- package/dist/doctor-completion-B-tgL_ut.js +2 -0
- package/dist/{doctor-completion-BPELnU8c.js → doctor-completion-D1cLVgnw.js} +1 -1
- package/dist/doctor-completion-DvEGPvIT.js +2 -0
- package/dist/{doctor-completion-DWJ2fJLm.js → doctor-completion-rfyVqz7I.js} +1 -1
- package/dist/{doctor-config-flow-Duw53q8X.js → doctor-config-flow-C2p3v-cC.js} +6 -6
- package/dist/{doctor-config-flow-9obFC4B6.js → doctor-config-flow-D6uaIY8F.js} +6 -6
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-DnEDMEl_.js → exec-approvals-cli-CYxKrRPS.js} +2 -2
- package/dist/{exec-approvals-cli-bG-2V8IK.js → exec-approvals-cli-CaGKwCkP.js} +2 -2
- package/dist/extensionAPI.d.ts +11 -0
- package/dist/extensionAPI.js +2 -2
- package/dist/{gateway-CsUP-93u.js → gateway-DpUea-L8.js} +3 -3
- package/dist/{gateway-CHEg4jKw.js → gateway-DyaIYiPf.js} +3 -3
- package/dist/{gateway-CcEXool4.js → gateway-RMd15lxN.js} +3 -3
- package/dist/{gateway-cli-CLUd67zt.js → gateway-cli-1dY-uNhm.js} +125 -77
- package/dist/{gateway-cli-BaxymLId.js → gateway-cli-n18LFNeU.js} +124 -76
- package/dist/{gateway-rpc-COQ8FqPA.js → gateway-rpc-BaD9gDWy.js} +1 -1
- package/dist/{gateway-rpc-BqUEmI86.js → gateway-rpc-C3LLjyGe.js} +1 -1
- package/dist/{gateway-tool-CLJLs_eO.js → gateway-tool-BAdp6SH1.js} +3 -3
- package/dist/{gateway-tool-DIlC2Nw9.js → gateway-tool-kRxmsmMz.js} +3 -3
- package/dist/{gateway-tool-CMZ7JFSi.js → gateway-tool-sHQ43WtK.js} +3 -3
- package/dist/{github-copilot-auth-DSN2t-MD.js → github-copilot-auth-C6LhCOk3.js} +2 -2
- package/dist/{github-copilot-auth-DEKfsNig.js → github-copilot-auth-VK12SD5f.js} +2 -2
- package/dist/{gmail-C0H3lnho.js → gmail-89acEtXH.js} +1 -1
- package/dist/{gmail-BWzWyuEC.js → gmail-tGz-kYHa.js} +1 -1
- package/dist/{health-BOLotDVI.js → health-8oE9qNSE.js} +10 -10
- package/dist/{health-n09fR4uF.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-u2p1CEdY.js → helpers-CNcaAdSH.js} +1 -1
- package/dist/{helpers-wYqnVV1l.js → helpers-bG_wfee1.js} +1 -1
- package/dist/{hooks-cli-BChX0GfN.js → hooks-cli-CB_KzY16.js} +2 -2
- package/dist/{hooks-cli-BsiKHy2j.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-DPs5GOo0.js → image-tool-CEjIXfAz.js} +2 -2
- package/dist/{image-tool-KquG28S1.js → image-tool-DA0ckrPq.js} +1 -1
- package/dist/{image-tool-B64cWBbG.js → image-tool-OiDWYqmY.js} +2 -2
- package/dist/index.d.ts +11 -0
- package/dist/index.js +10 -10
- package/dist/{io-_W2ysx6z.js → io-6cqme3no.js} +2 -2
- package/dist/{io-DL2AoOm6.js → io-7MYBxUkU.js} +2 -2
- package/dist/{io-CHxJ2IV9.js → io-D8w0m4e7.js} +2 -1
- package/dist/{ir-C_pqBx9f.js → ir-BPZJ-sfR.js} +1 -1
- package/dist/{ir-CQ_IDLBh.js → ir-BhnJmnK_.js} +5 -5
- package/dist/{ir-De8voDFg.js → ir-CdlSkzAy.js} +1 -1
- package/dist/{lifecycle-core-D-4LcacU.js → lifecycle-core-Dmy-67JO.js} +3 -3
- package/dist/{lifecycle-core-Dv7iETEh.js → lifecycle-core-DwiJf6GO.js} +3 -3
- package/dist/llm-slug-generator.js +33 -0
- package/dist/{load-tools-tool-ty4HlT93.js → load-tools-tool-CK9n4dpv.js} +3 -3
- package/dist/{load-tools-tool-BYrsmdJA.js → load-tools-tool-DVMiLHnV.js} +3 -3
- package/dist/{load-tools-tool-D-t6Uyow.js → load-tools-tool-jvr9ELiC.js} +3 -3
- package/dist/{logs-cli-D0f9ClNf.js → logs-cli-DYkz_Y2b.js} +2 -2
- package/dist/{logs-cli-DQcLuVDk.js → logs-cli-y33n6Plb.js} +2 -2
- package/dist/{memory-cli-DJz45LiT.js → memory-cli-CchSD5_M.js} +3 -3
- package/dist/{memory-cli-B-kgMpE9.js → memory-cli-DWeZSF4O.js} +3 -3
- package/dist/{message-action-runner-WAH6Nx_E.js → message-action-runner-BJzBMfAN.js} +11 -11
- package/dist/{message-action-runner-CrnI7zJF.js → message-action-runner-aRJaOp3h.js} +11 -11
- package/dist/{message-ledger-DGMqKFzT.js → message-ledger-DmX8k7Eb.js} +6 -6
- package/dist/{message-tool-BP7sus2D.js → message-tool-BT_lShXP.js} +6 -6
- package/dist/{message-tool-DJ4XAozg.js → message-tool-CJ2k9G2X.js} +6 -6
- package/dist/{message-tool-C4ivxq_1.js → message-tool-DkxTGNJ_.js} +9 -9
- package/dist/{minion-tools-DR8Fp8tP.js → minion-tools-CEQNyDLo.js} +22 -20
- package/dist/{model-catalog-DU-4NufX.js → model-catalog-Dun9rUwm.js} +3 -3
- package/dist/{model-catalog-DmPKIRh-.js → model-catalog-RhTD2XJY.js} +3 -3
- package/dist/{model-fallback-D6SvylPa.js → model-fallback-Cm3Tv0In.js} +2 -2
- package/dist/{model-fallback-DjjhedHX.js → model-fallback-CrSemKRh.js} +2 -2
- package/dist/{model-fallback-BIWcF5BS.js → model-fallback-uwtaor8f.js} +4 -4
- package/dist/{model-picker-CdMq6Dy8.js → model-picker-C_UhEF-R.js} +2 -2
- package/dist/{model-picker-CUVKlLlc.js → model-picker-D7OvwR5Y.js} +2 -2
- package/dist/{models-CDsotXJU.js → models-DEvrTY5o.js} +12 -12
- package/dist/{models-cli-DgOgLS1i.js → models-cli-BBuPQES6.js} +2 -2
- package/dist/{models-cli-BVnIdzK_.js → models-cli-DsDVKG2f.js} +12 -12
- package/dist/{models-config-8eBWJPY6.js → models-config-DTMIOONu.js} +2 -2
- package/dist/{models-config-Ca7_3EVB.js → models-config-pB1nNFSi.js} +2 -2
- package/dist/{node-cli-BVFcL7al.js → node-cli-Cdp1_fUq.js} +9 -9
- package/dist/{node-cli-DuEWn_K5.js → node-cli-DsU_QUTE.js} +9 -9
- package/dist/{nodes-cli-BB-4JVQ9.js → nodes-cli-B4oX5uNL.js} +5 -5
- package/dist/{nodes-cli-BV5htTim.js → nodes-cli-CKkuvp7a.js} +5 -5
- package/dist/{nodes-tool-DNk_iGvq.js → nodes-tool-C9NV_GnB.js} +3 -3
- package/dist/{nodes-tool-D9D8rWHz.js → nodes-tool-CTpJ5fug.js} +3 -3
- package/dist/{nodes-tool-VT3uXXFG.js → nodes-tool-sKJc-Yjj.js} +3 -3
- package/dist/{nodes-utils-Bwt9VQrQ.js → nodes-utils-CFmLuU06.js} +1 -1
- package/dist/{nodes-utils-hu5DJ-kd.js → nodes-utils-CkQsT0N0.js} +1 -1
- package/dist/{nodes-utils-DGkb5nAT.js → nodes-utils-DNMhzvVb.js} +1 -1
- package/dist/{onboard-2ztWbC9y.js → onboard-V7JyPJex.js} +9 -9
- package/dist/{onboard-channels-BQPYIAjI.js → onboard-channels-BDfxpK7n.js} +1 -1
- package/dist/{onboard-channels-DVkwLCVk.js → onboard-channels-CmC3qBbq.js} +3 -3
- package/dist/{onboard-channels-CiCrqf3j.js → onboard-channels-CzKarfzC.js} +1 -1
- package/dist/{onboard-channels-DrLduhDq.js → onboard-channels-yUQOZPgP.js} +3 -3
- package/dist/{onboard-custom-Bg1Gr0Lb.js → onboard-custom-BDM5_y2p.js} +2 -2
- package/dist/{onboard-custom-Dj7SknXG.js → onboard-custom-BvfApkVd.js} +1 -1
- package/dist/{onboard-custom-L6PmxwEN.js → onboard-custom-CfZMfUJ3.js} +1 -1
- package/dist/{onboard-custom-C3VrRkQU.js → onboard-custom-CmwY-IfM.js} +2 -2
- package/dist/{onboard-helpers-98Ab25-x.js → onboard-helpers-BE_18443.js} +1 -1
- package/dist/{onboard-helpers-Ckl5HK9L.js → onboard-helpers-CekhN2Dt.js} +5 -5
- package/dist/{onboard-helpers-Dx0nCBj-.js → onboard-helpers-DfEvL7Eo.js} +1 -1
- package/dist/{onboard-helpers-CWZOB3ci.js → onboard-helpers-gS7HQOeH.js} +5 -5
- package/dist/{onboard-remote-ngZhsiae.js → onboard-remote-CEWlSso0.js} +1 -1
- package/dist/{onboard-remote-Cl8bKHYI.js → onboard-remote-aQfExF92.js} +1 -1
- package/dist/{onboard-BM4TgJ6r.js → onboard-rqIA9EXQ.js} +9 -9
- package/dist/{onboard-skills-fAHH7Gyd.js → onboard-skills-75JQVISV.js} +1 -1
- package/dist/{onboard-skills-Qg53Hbwm.js → onboard-skills-BSGpQX_t.js} +1 -1
- package/dist/{onboarding-C5nm_X1A.js → onboarding-BNfuRC7v.js} +12 -12
- package/dist/{onboarding-D8RZyRch.js → onboarding-IiILUaqA.js} +12 -12
- package/dist/{onboarding.finalize-Bd8kpm5F.js → onboarding.finalize-D2iRalHn.js} +9 -9
- package/dist/{onboarding.finalize-BVBgWbsD.js → onboarding.finalize-T1iu9hW_.js} +9 -9
- package/dist/{onboarding.gateway-config-Bdb5Z5Aw.js → onboarding.gateway-config-DPJvhCxG.js} +2 -2
- package/dist/{onboarding.gateway-config-CQIiKPZZ.js → onboarding.gateway-config-W1qUrMi_.js} +2 -2
- package/dist/{outbound-send-deps-DrcbV6tD.js → outbound-send-deps-_gwXpS3X.js} +7 -7
- package/dist/{pairing-cli-CcnxCBHt.js → pairing-cli-DOVP6x__.js} +4 -4
- package/dist/{pairing-cli-st8U6EcM.js → pairing-cli-DZQ0VISz.js} +4 -4
- package/dist/{pairing-store-BZ_JYBuQ.js → pairing-store-BP5Qp69V.js} +2 -2
- package/dist/{pairing-store-B79S_0_e.js → pairing-store-CNDIY_e9.js} +2 -2
- package/dist/{pi-embedded-helpers-DomoDW6C.js → pi-embedded-helpers-CAos7nyg.js} +6 -6
- package/dist/{pi-embedded-helpers-Crzl9Ptt.js → pi-embedded-helpers-CJQRe8VG.js} +1 -1
- package/dist/{pi-embedded-helpers-Dy2o4GJU.js → pi-embedded-helpers-Dt84Vt0L.js} +1 -1
- package/dist/{pi-embedded-utils-W20xojsQ.js → pi-embedded-utils-BlYe4un1.js} +1 -1
- package/dist/{pi-embedded-utils-Dov_1wrm.js → pi-embedded-utils-C3czix2Z.js} +1 -1
- package/dist/{pi-embedded-utils-C9Ig6x5H.js → pi-embedded-utils-CnKLZQZs.js} +1 -1
- package/dist/{pi-tools.policy-ZOYo3MOw.js → pi-tools.policy-DClWWLv0.js} +4 -4
- package/dist/{plugin-auto-enable-DJVuPnPD.js → plugin-auto-enable-2zVKrpSR.js} +1 -1
- package/dist/{plugin-auto-enable-pxHX0maS.js → plugin-auto-enable-BFqsBeiO.js} +1 -1
- package/dist/{plugin-registry-BdA8bkkg.js → plugin-registry-B8Ol763b.js} +3 -3
- package/dist/{plugin-registry-BcUcYmaR.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-aBgm3_eG.js → plugins-BSX3IzSW.js} +1 -1
- package/dist/{plugins-ILaNu51h.js → plugins-BbE87x_i.js} +1 -1
- package/dist/{plugins-DIMPP-zl.js → plugins-Db3l--Iv.js} +1 -1
- package/dist/{plugins-cli-z0673Z22.js → plugins-cli-Do_2x-P9.js} +3 -3
- package/dist/{plugins-cli-DMXOjGN9.js → plugins-cli-sYIckkU6.js} +3 -3
- package/dist/{program-CYyifeuZ.js → program-DuPIc0CA.js} +7 -7
- package/dist/{program-context-DzIbU0bj.js → program-context-Butv-q95.js} +42 -42
- package/dist/{prompt-select-styled-DE_9eTX0.js → prompt-select-styled-BExVeXb2.js} +18 -18
- package/dist/{prompt-select-styled-BI5heXfT.js → prompt-select-styled-Cp4tJmDm.js} +18 -18
- package/dist/{push-apns-CEfyUVQq.js → push-apns-Bxplfna8.js} +1 -31
- package/dist/{push-apns-D-ADx4p9.js → push-apns-a42ldGL8.js} +1 -31
- package/dist/{pw-ai-BkVKdYxH.js → pw-ai-CYHslBvW.js} +2 -2
- package/dist/{pw-ai-B6aEpQIL.js → pw-ai-CuhAAfak.js} +2 -2
- package/dist/{pw-ai-1AjpMjvn.js → pw-ai-DQg5o_dq.js} +2 -2
- package/dist/{pw-session-CwDrqroL.js → pw-session-CE6GP8K2.js} +1 -1
- package/dist/{pw-session-BTG9qS_z.js → pw-session-DllHustd.js} +1 -1
- package/dist/{pw-session-DOTM4Sle.js → pw-session-UBu8_Nno.js} +1 -1
- package/dist/{qr-cli-FqFw51_J.js → qr-cli-BCZv2_hI.js} +2 -2
- package/dist/{qr-cli-D38LRTOG.js → qr-cli-DX6_VGoE.js} +2 -2
- package/dist/{register.agent-CD9wHycm.js → register.agent-BxjtbKDH.js} +7 -7
- package/dist/{register.agent-BYrXMCEF.js → register.agent-DWJIWMVU.js} +12 -12
- package/dist/{register.channel-B9Mw_26i.js → register.channel-BDuMmK1a.js} +2 -2
- package/dist/{register.channel-fZE2JOS9.js → register.channel-C_DXxr7c.js} +2 -2
- package/dist/{register.configure-Dqmb6Fqp.js → register.configure-B_XY4Rl7.js} +1 -1
- package/dist/{register.configure-C8kMa4VY.js → register.configure-kQKEsyRt.js} +1 -1
- package/dist/{register.drone-DX5m_SKw.js → register.drone-B2YlfnxU.js} +2 -2
- package/dist/{register.drone-DyOcUxfl.js → register.drone-BEaZQLpQ.js} +2 -2
- package/dist/{register.maintenance-3MNrjbFd.js → register.maintenance-BzbQEwcr.js} +5 -5
- package/dist/{register.maintenance-CuxgtPmA.js → register.maintenance-x4QqUEAs.js} +5 -5
- package/dist/{register.message-BaCQuwDe.js → register.message-C-HGH6ro.js} +7 -7
- package/dist/{register.message-D0inC6JU.js → register.message-erSrrSy8.js} +7 -7
- package/dist/{register.onboard-CtZogYsE.js → register.onboard-DtSasogy.js} +1 -1
- package/dist/{register.onboard-CkI-ZPxt.js → register.onboard-RztK81fK.js} +1 -1
- package/dist/{register.setup-BCAqb9nl.js → register.setup-CNKwjRf3.js} +4 -4
- package/dist/{register.setup-CvTBTBJL.js → register.setup-CU4oyWQN.js} +4 -4
- package/dist/{register.status-health-sessions-BCca16t9.js → register.status-health-sessions-C4MLusee.js} +6 -6
- package/dist/{register.status-health-sessions-CGSIqPsZ.js → register.status-health-sessions-CaPTa3NI.js} +3 -3
- package/dist/{register.subclis-avuYre6I.js → register.subclis-Q6q9ktLa.js} +29 -29
- package/dist/{reply-CMo5_5nQ.js → reply-pajA-Yl6.js} +33 -31
- package/dist/{reply-payloads-C5viTd5m.js → reply-payloads-BlZu5x6x.js} +6 -6
- package/dist/{reply-prefix-BqPoLwgX.js → reply-prefix-C2RVZSgb.js} +1 -1
- package/dist/{reply-prefix-C_4_2_tQ.js → reply-prefix-g25aWRqJ.js} +1 -1
- package/dist/{resolve-route-B8qAtRTs.js → resolve-route-DQ7BIAU_.js} +2 -2
- package/dist/{resolve-route-Dr04XQXF.js → resolve-route-yooa1z42.js} +4 -4
- package/dist/{routes-CSewHf9L.js → routes-C5NVLNYd.js} +4 -4
- package/dist/{routes-COyjqFSx.js → routes-C9bf1VtT.js} +4 -4
- package/dist/{rpc-Bps1MdYe.js → rpc-BXk0xG0H.js} +1 -1
- package/dist/{rpc-U0uJ0I1k.js → rpc-CRCwztMb.js} +1 -1
- package/dist/{run-main-CeWSzBJg.js → run-main-BdLBIyiP.js} +19 -19
- package/dist/{sandbox-DVJQM86_.js → sandbox-DLtSFsnF.js} +7 -7
- package/dist/{sandbox-CITm9v8F.js → sandbox-DQ8PqB1U.js} +7 -7
- package/dist/{sandbox-cli-DGeuI0Wo.js → sandbox-cli-BoxfOIvp.js} +4 -4
- package/dist/{sandbox-cli-B95ZMCXB.js → sandbox-cli-CFJ9cLf1.js} +4 -4
- package/dist/{sdk-inspect-tool-CZuz_PqC.js → sdk-inspect-tool--0YwiPqb.js} +2 -2
- package/dist/{sdk-inspect-tool-pAJTD-ha.js → sdk-inspect-tool-gngBv_e2.js} +2 -2
- package/dist/{sdk-inspect-tool-D42KFyHW.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-C-IdNFYI.js → search-tools-tool-BCV0uHLY.js} +2 -2
- package/dist/{search-tools-tool-RZGm2Xcj.js → search-tools-tool-DIr1vVNX.js} +2 -2
- package/dist/{search-tools-tool-DHcesN1E.js → search-tools-tool-XuYT8kpL.js} +2 -2
- package/dist/{security-cli-CVhHPapS.js → security-cli-Cx2puO6Q.js} +4 -4
- package/dist/{security-cli-vf7gqh0K.js → security-cli-sqaoNzjc.js} +4 -4
- package/dist/{send-B4YbtmkF.js → send-BABrPQhp.js} +4 -4
- package/dist/{send-CjkML4L8.js → send-BOAXOqlj.js} +5 -5
- package/dist/{send-D2OpIavo.js → send-BhHYA7fz.js} +4 -4
- package/dist/{send-DK8EFs7N.js → send-C1R6SHFd.js} +4 -4
- package/dist/{send-B0lgkcly.js → send-CQTnHf7j.js} +6 -6
- package/dist/{send-CFbW7252.js → send-CzX8rfQQ.js} +6 -6
- package/dist/{send-DKFYAGz-.js → send-DIjmAwBt.js} +5 -5
- package/dist/{send-Cy07SRYV.js → send-DfwkS1Cy.js} +5 -5
- package/dist/{send-5NXIO0Hz.js → send-DmLvgXqi.js} +5 -5
- package/dist/{send-CDxvcffu.js → send-F3N3Vgcy.js} +4 -4
- package/dist/{server-context-BzJmaGcJ.js → server-context-BYcLDvQc.js} +6 -6
- package/dist/{server-context-tH7qykHx.js → server-context-CDmBokpm.js} +6 -6
- package/dist/{server-context-DjgDk76D.js → server-context-DFdTmsBq.js} +6 -6
- package/dist/{server-methods-list-DCASvqMj.js → server-methods-list-CUUd_Znm.js} +1 -1
- package/dist/{server-methods-list-DDeo_-Mr.js → server-methods-list-ZEquDpTD.js} +1 -1
- package/dist/{server-node-events-FM-1CCYG.js → server-node-events-Dml6MIAW.js} +11 -11
- package/dist/{server-node-events-FvS3PKPQ.js → server-node-events-DpkjSBLL.js} +9 -9
- package/dist/{session-status-tool-DP2Q1LTf.js → session-status-tool-BHEQX4IM.js} +6 -6
- package/dist/{session-status-tool-Bzg63rF-.js → session-status-tool-CIAw4c-9.js} +5 -5
- package/dist/{session-status-tool-Cm0CqYIk.js → session-status-tool-CJeMrNTI.js} +7 -7
- package/dist/{session-utils-DJlQmR6P.js → session-utils-Ffl6ASbR.js} +4 -4
- package/dist/{sessions-D0Infjpa.js → sessions-CiNGPwTK.js} +4 -4
- package/dist/{sessions-utf2q0f9.js → sessions-ClJAVE0p.js} +6 -6
- package/dist/{sessions-BCDks_XV.js → sessions-DcOCMszs.js} +3 -3
- package/dist/{sessions-CNmLoXhd.js → sessions-bztP6lN1.js} +6 -6
- package/dist/{sessions-helpers-xCR-AaFX.js → sessions-helpers-Ctko7_ZU.js} +3 -3
- package/dist/{sessions-helpers-zap6ivKN.js → sessions-helpers-D6BayuvJ.js} +3 -3
- package/dist/{sessions-helpers-ghfg2LfY.js → sessions-helpers-DpKh-EgX.js} +3 -3
- package/dist/{sessions-history-tool-CxIG0JPX.js → sessions-history-tool-BtLEW8Jq.js} +5 -5
- package/dist/{sessions-history-tool-BF5ChD6B.js → sessions-history-tool-DlKTVhCD.js} +5 -5
- package/dist/{sessions-history-tool-D3Dn_uha.js → sessions-history-tool-DnxZRMF3.js} +5 -5
- package/dist/{sessions-list-tool-B6UDiCME.js → sessions-list-tool-BGmjNjoA.js} +5 -5
- package/dist/{sessions-list-tool-BT6CtOqD.js → sessions-list-tool-DSB6_hFi.js} +5 -5
- package/dist/{sessions-list-tool-CCPfOMIk.js → sessions-list-tool-OP5IQOE0.js} +5 -5
- package/dist/{sessions-send-tool-DSiDvTip.js → sessions-send-tool-BF8lKSLy.js} +6 -6
- package/dist/{sessions-send-tool-CIkyHnqX.js → sessions-send-tool-C1WMGH6W.js} +6 -6
- package/dist/{sessions-send-tool-3Xy11nb5.js → sessions-send-tool-CG8A-kW5.js} +5 -5
- package/dist/{sessions-spawn-tool-P_cgC56H.js → sessions-spawn-tool-BD6XdQ4G.js} +1 -1
- package/dist/{sessions-spawn-tool-DNo3suCr.js → sessions-spawn-tool-BE94fv2r.js} +1 -1
- package/dist/{sessions-spawn-tool-BOUcfO2z.js → sessions-spawn-tool-DRxk6sWZ.js} +1 -1
- package/dist/{shared-DZI5Tw3G.js → shared-3xuhqrQ5.js} +2 -2
- package/dist/{shared-Cs4h-DrN.js → shared-CCaYvPXV.js} +2 -2
- package/dist/{skills-cli-Czq_tuYG.js → skills-cli-CQ8fYddY.js} +2 -2
- package/dist/{skills-cli-_aZXg-M2.js → skills-cli-D-V0vRgX.js} +2 -2
- package/dist/{status-B8ctdi4H.js → status-BeasmhMH.js} +13 -13
- package/dist/{status-qdsXcKy3.js → status-D8c6C5Z0.js} +3 -3
- package/dist/{status-DAl0ewcT.js → status-DHuWnwac.js} +3 -3
- package/dist/{status-DAWcKhN8.js → status-DbOwDhDe.js} +14 -14
- package/dist/{status.update-BBvsvukV.js → status.update-otfuSKpG.js} +1 -1
- package/dist/{status.update-GAs1fuEC.js → status.update-ww09PQZI.js} +1 -1
- package/dist/{subagent-registry-ByD-v8W6.js → subagent-registry-BHdRG10Z.js} +34 -32
- package/dist/{subagents-tool-DW6VxAbS.js → subagents-tool-CpBMVS4i.js} +6 -6
- package/dist/{subagents-tool-DY3qkUDA.js → subagents-tool-DIxAhxWP.js} +6 -6
- package/dist/{subagents-tool-DzdXPWJG.js → subagents-tool-h2WCtDtU.js} +6 -6
- package/dist/{system-cli-BfEvMnOR.js → system-cli-C7sjnpqK.js} +1 -1
- package/dist/{system-cli-DGKQvMgv.js → system-cli-DP_wysY-.js} +1 -1
- package/dist/{systemd-hints-BuFrkz3c.js → systemd-hints-BnL2sVfy.js} +1 -1
- package/dist/{systemd-hints-CknVLhp1.js → systemd-hints-DEXpKBnF.js} +1 -1
- package/dist/{tables-7hvx4NLL.js → tables-Cu2OX2r-.js} +1 -1
- package/dist/{tables-CaW_VQVO.js → tables-DMdQO81Y.js} +1 -1
- package/dist/{targets-BLzENb7Y.js → targets-By4KtyZv.js} +1 -1
- package/dist/{targets-q-IdZXy8.js → targets-DypSB4K6.js} +2 -2
- package/dist/{targets-dnyaBFnI.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-NmnXQw8E.js → tools-cli-B13gsec8.js} +3 -3
- package/dist/{tools-cli-C8t6Y2DR.js → tools-cli-BJ_zWgqf.js} +3 -3
- package/dist/{tts-DT0JbNew.js → tts-CdyriGYN.js} +2 -2
- package/dist/{tts-CkvaGeSt.js → tts-DH1gVM5t.js} +34 -1
- package/dist/{tts-BKfdvnUw.js → tts-EAcO1Hwe.js} +2 -2
- package/dist/{tts-tool-Bt02Ilnt.js → tts-tool-BBIMu7X2.js} +3 -3
- package/dist/{tts-tool-B4hynytG.js → tts-tool-DO_F3ZME.js} +3 -3
- package/dist/{tts-tool-DeKe9DRz.js → tts-tool-oG4FOqod.js} +3 -3
- package/dist/{tui-Djk1B2Va.js → tui-CvQjFLn2.js} +6 -13
- package/dist/{tui-BlYxWZKF.js → tui-CyKvw7SL.js} +6 -13
- package/dist/{tui-cli-B8fz3Gfm.js → tui-cli-DROBYt8G.js} +1 -1
- package/dist/{tui-cli-BGoP1l4m.js → tui-cli-PQR9JVFA.js} +1 -1
- package/dist/{update-cli--Kai2Xfo.js → update-cli-DsNQjCBa.js} +8 -8
- package/dist/{update-cli-B4x9hkNP.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-BNlwEmMT.js → web-Bqx30F6C.js} +12 -12
- package/dist/web-DKofD48i.js +2 -0
- package/dist/{web-search-Q8h69tgX.js → web-search-BGzVmln0.js} +4 -4
- package/dist/{web-search-CG0Jah4V.js → web-search-BXe6QGYe.js} +4 -4
- package/dist/{web-search-8KE8nizc.js → web-search-CGnEgHNH.js} +4 -4
- package/dist/{webhooks-cli-loBRONyV.js → webhooks-cli-DMfQ_Sq0.js} +4 -4
- package/dist/{webhooks-cli-Dtt7wEbR.js → webhooks-cli-wUMz0eSs.js} +4 -4
- package/dist/{workspace-dirs-DCRQB551.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-7XKlSxjN.js +0 -2
- package/dist/daemon-install-helpers-BItV2t5d.js +0 -2
- package/dist/doctor-completion-8gqw3zRt.js +0 -2
- package/dist/doctor-completion-uY7s1Gdv.js +0 -2
- package/dist/web-BfUZ3tIc.js +0 -2
|
@@ -5,6 +5,7 @@ import { registerOutlookAuthTools } from "./src/outlook-auth-tool.js";
|
|
|
5
5
|
import { registerOutlookCalendarTools } from "./src/outlook-calendar-tools.js";
|
|
6
6
|
import { registerOutlookMailTools } from "./src/outlook-mail-tools.js";
|
|
7
7
|
import type { OutlookOAuthConfig } from "./src/outlook-oauth.js";
|
|
8
|
+
import { registerPulseTools } from "./src/pulse-tools.js";
|
|
8
9
|
|
|
9
10
|
type PluginConfig = {
|
|
10
11
|
requireApproval?: boolean;
|
|
@@ -48,6 +49,9 @@ const plugin = {
|
|
|
48
49
|
registerOutlookMailTools(api, outlookConfig, requireApproval);
|
|
49
50
|
registerOutlookCalendarTools(api, outlookConfig, requireApproval);
|
|
50
51
|
|
|
52
|
+
// Pulse — proactive proposal cards posted to the Hub for user approval
|
|
53
|
+
registerPulseTools(api);
|
|
54
|
+
|
|
51
55
|
api.logger.info(
|
|
52
56
|
`gmail-calendar loaded — requireApproval=${requireApproval}, outlook=${!!outlookConfig.clientId}`,
|
|
53
57
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { buildPulseBody } from "./pulse-tools.js";
|
|
3
|
+
|
|
4
|
+
describe("pulse_propose body", () => {
|
|
5
|
+
it("shapes orgId + proposals", () => {
|
|
6
|
+
const body = buildPulseBody("org-A", [
|
|
7
|
+
{ source: "daily_briefing", kind: "digest", title: "Day", dedupKey: "k1" },
|
|
8
|
+
]);
|
|
9
|
+
expect(body).toEqual({
|
|
10
|
+
orgId: "org-A",
|
|
11
|
+
proposals: [{ source: "daily_briefing", kind: "digest", title: "Day", dedupKey: "k1" }],
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import type { AnyAgentTool, MinionPluginApi, MinionPluginToolFactory } from "minion/plugin-sdk";
|
|
3
|
+
import { getHubRest } from "../../../src/gateway/hub-rest-registry.js";
|
|
4
|
+
|
|
5
|
+
function txt(text: string) {
|
|
6
|
+
return { content: [{ type: "text" as const, text }], details: { text } };
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const CardSchema = Type.Object({
|
|
10
|
+
source: Type.String(),
|
|
11
|
+
kind: Type.String(),
|
|
12
|
+
title: Type.String(),
|
|
13
|
+
summary: Type.Optional(Type.String()),
|
|
14
|
+
payload: Type.Optional(Type.Record(Type.String(), Type.Unknown())),
|
|
15
|
+
dedupKey: Type.String(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const PulseProposeSchema = Type.Object({
|
|
19
|
+
orgId: Type.String({ description: "Target org id (PINONITE)" }),
|
|
20
|
+
proposals: Type.Array(CardSchema),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** Pure body shaper — kept separate from `execute` so it's unit-testable without network. */
|
|
24
|
+
export function buildPulseBody(orgId: string, proposals: unknown[]) {
|
|
25
|
+
return { orgId, proposals };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function registerPulseTools(api: MinionPluginApi): void {
|
|
29
|
+
const factory: MinionPluginToolFactory = (): AnyAgentTool[] => [
|
|
30
|
+
{
|
|
31
|
+
name: "pulse_propose",
|
|
32
|
+
label: "Propose Pulse cards",
|
|
33
|
+
description:
|
|
34
|
+
"Write proactive proposal cards (digest / create_event / reminder / draft_reply / fyi) " +
|
|
35
|
+
"to the Hub Pulse feed for the user to approve.",
|
|
36
|
+
parameters: PulseProposeSchema,
|
|
37
|
+
async execute(_id, params) {
|
|
38
|
+
const rest = getHubRest();
|
|
39
|
+
if (!rest) return txt("Pulse: hub not linked; skipped.");
|
|
40
|
+
const p = params as Record<string, unknown>;
|
|
41
|
+
const orgId = String(p.orgId ?? "");
|
|
42
|
+
const proposalsRaw = p.proposals;
|
|
43
|
+
const proposals = Array.isArray(proposalsRaw) ? proposalsRaw : [];
|
|
44
|
+
if (!orgId || !proposals.length) return txt("Pulse: nothing to propose.");
|
|
45
|
+
try {
|
|
46
|
+
const res = await fetch(`${rest.hubUrl.replace(/\/$/, "")}/api/gateway/pulse/proposals`, {
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers: {
|
|
49
|
+
Authorization: `Bearer ${rest.serverToken}`,
|
|
50
|
+
"content-type": "application/json",
|
|
51
|
+
},
|
|
52
|
+
body: JSON.stringify(buildPulseBody(orgId, proposals)),
|
|
53
|
+
});
|
|
54
|
+
const j = (await res.json().catch(() => ({}))) as { inserted?: number; skipped?: number };
|
|
55
|
+
return txt(`Pulse: proposed ${j.inserted ?? 0}, skipped ${j.skipped ?? 0}.`);
|
|
56
|
+
} catch (e) {
|
|
57
|
+
return txt(`Pulse: post failed — ${e instanceof Error ? e.message : "error"}`);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
api.registerTool(factory, { names: ["pulse_propose"] });
|
|
63
|
+
}
|
|
@@ -4288,6 +4288,7 @@ const ChannelsSchema = z.object({
|
|
|
4288
4288
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4289
4289
|
}).strict().optional(),
|
|
4290
4290
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4291
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4291
4292
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4292
4293
|
telegram: TelegramConfigSchema.optional(),
|
|
4293
4294
|
discord: DiscordConfigSchema.optional(),
|
package/extensions/irc/index.js
CHANGED
|
@@ -4289,6 +4289,7 @@ const ChannelsSchema = z.object({
|
|
|
4289
4289
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4290
4290
|
}).strict().optional(),
|
|
4291
4291
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4292
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4292
4293
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4293
4294
|
telegram: TelegramConfigSchema.optional(),
|
|
4294
4295
|
discord: DiscordConfigSchema.optional(),
|
|
@@ -4321,9 +4321,14 @@ function buildWorkspaceSkillSnapshot(workspaceDir, opts) {
|
|
|
4321
4321
|
*/
|
|
4322
4322
|
function createGatewayDroneHost(opts = {}) {
|
|
4323
4323
|
const { config, agentDir, workspaceDir } = opts;
|
|
4324
|
+
let resolvedModel;
|
|
4324
4325
|
return {
|
|
4325
4326
|
async resolveApiKey(spec) {
|
|
4326
4327
|
const auth = await resolveProvider(spec, config, agentDir);
|
|
4328
|
+
resolvedModel = {
|
|
4329
|
+
provider: spec.provider,
|
|
4330
|
+
model: spec.model
|
|
4331
|
+
};
|
|
4327
4332
|
return {
|
|
4328
4333
|
apiKey: requireApiKey(auth, spec.provider),
|
|
4329
4334
|
source: auth.source
|
|
@@ -4356,6 +4361,34 @@ function createGatewayDroneHost(opts = {}) {
|
|
|
4356
4361
|
},
|
|
4357
4362
|
timestamp: Date.now()
|
|
4358
4363
|
});
|
|
4364
|
+
if (input.event === "agent.run.end" && input.usage && resolvedModel) {
|
|
4365
|
+
const u = input.usage;
|
|
4366
|
+
const inTok = u.inputTokens ?? 0;
|
|
4367
|
+
const outTok = u.outputTokens ?? 0;
|
|
4368
|
+
const cacheTok = u.cacheReadTokens ?? 0;
|
|
4369
|
+
emitEvent({
|
|
4370
|
+
category: "agent",
|
|
4371
|
+
severity: "info",
|
|
4372
|
+
event: "agent.llm.usage",
|
|
4373
|
+
message: `Drone LLM usage: ${input.droneId}`,
|
|
4374
|
+
correlationId: input.correlationId,
|
|
4375
|
+
metadata: {
|
|
4376
|
+
kind: "drone",
|
|
4377
|
+
droneId: input.droneId,
|
|
4378
|
+
provider: resolvedModel.provider,
|
|
4379
|
+
model: resolvedModel.model,
|
|
4380
|
+
source: "system",
|
|
4381
|
+
channel: "drone",
|
|
4382
|
+
tokens: {
|
|
4383
|
+
input: inTok,
|
|
4384
|
+
output: outTok,
|
|
4385
|
+
cacheRead: cacheTok,
|
|
4386
|
+
total: inTok + outTok + cacheTok
|
|
4387
|
+
}
|
|
4388
|
+
},
|
|
4389
|
+
timestamp: Date.now()
|
|
4390
|
+
});
|
|
4391
|
+
}
|
|
4359
4392
|
}
|
|
4360
4393
|
};
|
|
4361
4394
|
}
|
|
@@ -4286,6 +4286,7 @@ const ChannelsSchema = z.object({
|
|
|
4286
4286
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4287
4287
|
}).strict().optional(),
|
|
4288
4288
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4289
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4289
4290
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4290
4291
|
telegram: TelegramConfigSchema.optional(),
|
|
4291
4292
|
discord: DiscordConfigSchema.optional(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as setMatrixRuntime, i as getMatrixRuntime } from "./credentials-
|
|
2
|
-
import { A as listMatrixAccountIds, I as resolveMatrixAuth, M as resolveMatrixAccount, N as resolveMatrixAccountConfig, S as sendPollMatrix, T as resolveMatrixRoomId, _ as RelationType, b as reactMatrixMessage, c as listMatrixDirectoryGroupsLive, d as removeMatrixReactions, f as fetchEventSummary, g as MsgType, h as EventType, i as normalizeMatrixUserId, j as resolveDefaultMatrixAccountId, l as listMatrixDirectoryPeersLive, m as summarizeMatrixRawEvent, n as probeMatrix, p as readPinnedEvents, r as normalizeMatrixAllowList, s as resolveMatrixRoomConfig, t as resolveMatrixTargets, u as listMatrixReactions, v as resolveMatrixActionLimit, x as sendMessageMatrix, y as resolveActionClient } from "./resolve-targets-
|
|
1
|
+
import { a as setMatrixRuntime, i as getMatrixRuntime } from "./credentials-B_Avjvsy.mjs";
|
|
2
|
+
import { A as listMatrixAccountIds, I as resolveMatrixAuth, M as resolveMatrixAccount, N as resolveMatrixAccountConfig, S as sendPollMatrix, T as resolveMatrixRoomId, _ as RelationType, b as reactMatrixMessage, c as listMatrixDirectoryGroupsLive, d as removeMatrixReactions, f as fetchEventSummary, g as MsgType, h as EventType, i as normalizeMatrixUserId, j as resolveDefaultMatrixAccountId, l as listMatrixDirectoryPeersLive, m as summarizeMatrixRawEvent, n as probeMatrix, p as readPinnedEvents, r as normalizeMatrixAllowList, s as resolveMatrixRoomConfig, t as resolveMatrixTargets, u as listMatrixReactions, v as resolveMatrixActionLimit, x as sendMessageMatrix, y as resolveActionClient } from "./resolve-targets-Bv0B2AJv.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { MarkdownConfigSchema, ToolPolicySchema, emptyPluginConfigSchema, maybeInjectDisclosure, resolveDisclosureConfig } from "minion/plugin-sdk";
|
|
5
5
|
import { DEFAULT_ACCOUNT_ID, PAIRING_APPROVED_MESSAGE, addWildcardAllowFrom, applyAccountNameToChannelSection, buildChannelConfigSchema, createActionGate, deleteAccountFromConfigSection, formatDocsLink, formatPairingApproveHint, jsonResult, mergeAllowFromEntries, normalizeAccountId, promptChannelAccessConfig, readNumberParam, readReactionParams, readStringParam, setAccountEnabledInConfigSection } from "openclaw/plugin-sdk";
|
|
@@ -1298,7 +1298,7 @@ const matrixPlugin = {
|
|
|
1298
1298
|
await previousLock;
|
|
1299
1299
|
let monitorMatrixProvider;
|
|
1300
1300
|
try {
|
|
1301
|
-
monitorMatrixProvider = (await import("./matrix-
|
|
1301
|
+
monitorMatrixProvider = (await import("./matrix-Dy31zmus.mjs")).monitorMatrixProvider;
|
|
1302
1302
|
} finally {
|
|
1303
1303
|
releaseLock();
|
|
1304
1304
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getMatrixRuntime } from "./credentials-
|
|
2
|
-
import { C as sendReadReceiptMatrix, D as formatPollAsText, E as setActiveMatrixClient, F as stopSharedClientForAccount, I as resolveMatrixAuth, L as require_lib, M as resolveMatrixAccount, O as isPollStartType, P as resolveSharedMatrixClient, R as isBunRuntime, a as resolveMatrixAllowListMatch, b as reactMatrixMessage, d as removeMatrixReactions, f as fetchEventSummary, i as normalizeMatrixUserId, k as parsePollStartContent, o as resolveMatrixAllowListMatches, r as normalizeMatrixAllowList, s as resolveMatrixRoomConfig, t as resolveMatrixTargets, w as sendTypingMatrix, x as sendMessageMatrix } from "./resolve-targets-
|
|
1
|
+
import { i as getMatrixRuntime } from "./credentials-B_Avjvsy.mjs";
|
|
2
|
+
import { C as sendReadReceiptMatrix, D as formatPollAsText, E as setActiveMatrixClient, F as stopSharedClientForAccount, I as resolveMatrixAuth, L as require_lib, M as resolveMatrixAccount, O as isPollStartType, P as resolveSharedMatrixClient, R as isBunRuntime, a as resolveMatrixAllowListMatch, b as reactMatrixMessage, d as removeMatrixReactions, f as fetchEventSummary, i as normalizeMatrixUserId, k as parsePollStartContent, o as resolveMatrixAllowListMatches, r as normalizeMatrixAllowList, s as resolveMatrixRoomConfig, t as resolveMatrixTargets, w as sendTypingMatrix, x as sendMessageMatrix } from "./resolve-targets-Bv0B2AJv.mjs";
|
|
3
3
|
import { createReplyPrefixOptions, createTypingCallbacks, formatAllowlistMatchMeta, formatLocationText, logInboundDrop, logTypingFailure, resolveControlCommandGate, toLocationContext } from "minion/plugin-sdk";
|
|
4
4
|
import { mergeAllowlist, summarizeMapping } from "openclaw/plugin-sdk";
|
|
5
5
|
import { format } from "node:util";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./rolldown-runtime-JspESFgx.mjs";
|
|
2
|
-
import { i as getMatrixRuntime, o as DEFAULT_ACCOUNT_ID, r as loadMatrixCredentials, s as normalizeAccountId, t as credentialsMatchConfig } from "./credentials-
|
|
2
|
+
import { i as getMatrixRuntime, o as DEFAULT_ACCOUNT_ID, r as loadMatrixCredentials, s as normalizeAccountId, t as credentialsMatchConfig } from "./credentials-B_Avjvsy.mjs";
|
|
3
3
|
import { t as require_matrix_sdk_crypto_nodejs } from "./matrix-sdk-crypto-nodejs-CRHvexDX.mjs";
|
|
4
4
|
import { buildChannelKeyCandidates, resolveChannelEntryMatch } from "minion/plugin-sdk";
|
|
5
5
|
import path from "node:path";
|
|
@@ -87382,7 +87382,7 @@ async function resolveMatrixAuth(params) {
|
|
|
87382
87382
|
const env = params?.env ?? process.env;
|
|
87383
87383
|
const resolved = resolveMatrixConfigForAccount(cfg, params?.accountId, env);
|
|
87384
87384
|
if (!resolved.homeserver) throw new Error("Matrix homeserver is required (matrix.homeserver)");
|
|
87385
|
-
const { loadMatrixCredentials, saveMatrixCredentials, credentialsMatchConfig, touchMatrixCredentials } = await import("./credentials-
|
|
87385
|
+
const { loadMatrixCredentials, saveMatrixCredentials, credentialsMatchConfig, touchMatrixCredentials } = await import("./credentials-B_Avjvsy.mjs").then((n) => n.n);
|
|
87386
87386
|
const accountId = params?.accountId;
|
|
87387
87387
|
const cached = loadMatrixCredentials(env, accountId);
|
|
87388
87388
|
const cachedCredentials = cached && credentialsMatchConfig(cached, {
|
|
@@ -4333,6 +4333,7 @@ const ChannelsSchema = z.object({
|
|
|
4333
4333
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4334
4334
|
}).strict().optional(),
|
|
4335
4335
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4336
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4336
4337
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4337
4338
|
telegram: TelegramConfigSchema.optional(),
|
|
4338
4339
|
discord: DiscordConfigSchema.optional(),
|
|
@@ -235,6 +235,7 @@ function createMetaProcessor(params) {
|
|
|
235
235
|
const core = getMetaRuntime();
|
|
236
236
|
const messages = adapter.extractMessages(entry, account);
|
|
237
237
|
for (const message of messages) {
|
|
238
|
+
if (message.referral) params.onReferral?.(message);
|
|
238
239
|
env.statusSink?.({ lastInboundAt: Date.now() });
|
|
239
240
|
try {
|
|
240
241
|
await handleInbound({
|
|
@@ -467,13 +468,16 @@ function extractMessagingEvents(entry) {
|
|
|
467
468
|
url: attachment.payload.url,
|
|
468
469
|
mimeType: attachmentMime(attachment.type)
|
|
469
470
|
} : void 0;
|
|
470
|
-
|
|
471
|
+
const referral = raw.message?.referral;
|
|
472
|
+
if (!text && !media && !referral) continue;
|
|
471
473
|
out.push({
|
|
472
474
|
senderId,
|
|
473
475
|
text,
|
|
474
476
|
messageId: raw.message?.mid,
|
|
475
477
|
timestampMs: typeof raw.timestamp === "number" ? raw.timestamp : void 0,
|
|
476
|
-
media
|
|
478
|
+
media,
|
|
479
|
+
referral,
|
|
480
|
+
recipientId: raw.recipient?.id?.trim() || void 0
|
|
477
481
|
});
|
|
478
482
|
}
|
|
479
483
|
return out;
|
|
@@ -487,6 +491,40 @@ function attachmentMime(type) {
|
|
|
487
491
|
].includes(type)) return `${type}/*`;
|
|
488
492
|
return "application/octet-stream";
|
|
489
493
|
}
|
|
494
|
+
function resolveRelayConfig(cfg) {
|
|
495
|
+
const pc = cfg.plugins?.entries?.["meta-graph"]?.config ?? {};
|
|
496
|
+
const hubUrl = (pc.hubUrl?.trim() || process.env.HUB_URL?.trim() || "").replace(/\/+$/, "");
|
|
497
|
+
const cronSecret = pc.cronSecret?.trim() || process.env.CRON_SECRET?.trim() || "";
|
|
498
|
+
if (!hubUrl || !cronSecret) return null;
|
|
499
|
+
return {
|
|
500
|
+
hubUrl,
|
|
501
|
+
cronSecret
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
/** Fire-and-forget POST of an ad referral to the hub. Never throws. */
|
|
505
|
+
function relayAdReferral(relay, channel, message, log) {
|
|
506
|
+
const referral = message.referral;
|
|
507
|
+
if (!referral) return;
|
|
508
|
+
if (!((referral.source ?? "").toUpperCase() === "ADS" || Boolean(referral.ad_id)) || !message.recipientId) return;
|
|
509
|
+
const body = {
|
|
510
|
+
channel,
|
|
511
|
+
senderId: message.senderId,
|
|
512
|
+
recipientId: message.recipientId,
|
|
513
|
+
messageId: message.messageId ?? null,
|
|
514
|
+
timestampMs: message.timestampMs ?? null,
|
|
515
|
+
referral
|
|
516
|
+
};
|
|
517
|
+
fetch(`${relay.hubUrl}/api/meta/attribution`, {
|
|
518
|
+
method: "POST",
|
|
519
|
+
headers: {
|
|
520
|
+
"content-type": "application/json",
|
|
521
|
+
authorization: `Bearer ${relay.cronSecret}`
|
|
522
|
+
},
|
|
523
|
+
body: JSON.stringify(body)
|
|
524
|
+
}).then((res) => {
|
|
525
|
+
if (!res.ok) log?.(`[${channel}] attribution relay non-ok: ${res.status}`);
|
|
526
|
+
}).catch((err) => log?.(`[${channel}] attribution relay failed: ${String(err)}`));
|
|
527
|
+
}
|
|
490
528
|
async function sendMessagingText(params) {
|
|
491
529
|
const res = await graphSend({
|
|
492
530
|
nodeId: params.nodeId,
|
|
@@ -770,6 +808,7 @@ function createMessagingPlatformChannel(spec) {
|
|
|
770
808
|
appSecret: account.appSecret ?? "",
|
|
771
809
|
verifyToken: account.verifyToken ?? ""
|
|
772
810
|
});
|
|
811
|
+
const relay = resolveRelayConfig(ctx.cfg);
|
|
773
812
|
const offProc = registerMetaProcessor(registry, spec.objectType, createMetaProcessor({
|
|
774
813
|
adapter: adapterFor(spec),
|
|
775
814
|
account,
|
|
@@ -781,7 +820,8 @@ function createMessagingPlatformChannel(spec) {
|
|
|
781
820
|
accountId: account.accountId,
|
|
782
821
|
...patch
|
|
783
822
|
})
|
|
784
|
-
}
|
|
823
|
+
},
|
|
824
|
+
onReferral: relay ? (message) => relayAdReferral(relay, spec.channelId, message, (m) => ctx.log?.info?.(m)) : void 0
|
|
785
825
|
}));
|
|
786
826
|
try {
|
|
787
827
|
await waitForAbort(ctx.abortSignal);
|
|
@@ -17,6 +17,9 @@ const MetaGraphConfigSchema = z
|
|
|
17
17
|
verifyToken: z.string().optional(),
|
|
18
18
|
graphVersion: z.string().optional(),
|
|
19
19
|
webhookPath: z.string().optional(),
|
|
20
|
+
// Tier 3 ad-attribution relay target (env fallbacks: HUB_URL / CRON_SECRET).
|
|
21
|
+
hubUrl: z.string().optional(),
|
|
22
|
+
cronSecret: z.string().optional(),
|
|
20
23
|
})
|
|
21
24
|
.loose();
|
|
22
25
|
|
|
@@ -17,11 +17,17 @@
|
|
|
17
17
|
},
|
|
18
18
|
"webhookPath": {
|
|
19
19
|
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"hubUrl": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"cronSecret": {
|
|
25
|
+
"type": "string"
|
|
20
26
|
}
|
|
21
27
|
},
|
|
22
28
|
"additionalProperties": {}
|
|
23
29
|
},
|
|
24
|
-
"_schemaChecksum": "
|
|
30
|
+
"_schemaChecksum": "97e5f6131c1544af",
|
|
25
31
|
"icon": "whatsapp",
|
|
26
32
|
"channels": [
|
|
27
33
|
"whatsapp-cloud",
|
|
@@ -23,6 +23,7 @@ import { readMetaApp, resolveAccessToken, resolveAppCredentials } from "./meta-a
|
|
|
23
23
|
import {
|
|
24
24
|
createMetaProcessor,
|
|
25
25
|
waitForAbort,
|
|
26
|
+
type MetaAdReferral,
|
|
26
27
|
type MetaChannelAdapter,
|
|
27
28
|
type MetaInboundMessage,
|
|
28
29
|
type MetaResolvedAccountBase,
|
|
@@ -38,6 +39,8 @@ type MessagingEvent = {
|
|
|
38
39
|
text?: string;
|
|
39
40
|
is_echo?: boolean;
|
|
40
41
|
attachments?: Array<{ type?: string; payload?: { url?: string } }>;
|
|
42
|
+
/** Click-to-Direct ad referral, present only on the first message of an ad thread. */
|
|
43
|
+
referral?: MetaAdReferral;
|
|
41
44
|
};
|
|
42
45
|
postback?: { title?: string; payload?: string };
|
|
43
46
|
delivery?: unknown;
|
|
@@ -55,13 +58,18 @@ export function extractMessagingEvents(entry: MetaWebhookEntry): MetaInboundMess
|
|
|
55
58
|
const media = attachment?.payload?.url
|
|
56
59
|
? { url: attachment.payload.url, mimeType: attachmentMime(attachment.type) }
|
|
57
60
|
: undefined;
|
|
58
|
-
|
|
61
|
+
const referral = raw.message?.referral;
|
|
62
|
+
// Keep ad-referral events even when they carry no text/media: the referral
|
|
63
|
+
// is the attribution signal (handleInbound still skips the empty body).
|
|
64
|
+
if (!text && !media && !referral) continue;
|
|
59
65
|
out.push({
|
|
60
66
|
senderId,
|
|
61
67
|
text,
|
|
62
68
|
messageId: raw.message?.mid,
|
|
63
69
|
timestampMs: typeof raw.timestamp === "number" ? raw.timestamp : undefined,
|
|
64
70
|
media,
|
|
71
|
+
referral,
|
|
72
|
+
recipientId: raw.recipient?.id?.trim() || undefined,
|
|
65
73
|
});
|
|
66
74
|
}
|
|
67
75
|
return out;
|
|
@@ -73,6 +81,58 @@ function attachmentMime(type?: string): string | undefined {
|
|
|
73
81
|
return "application/octet-stream";
|
|
74
82
|
}
|
|
75
83
|
|
|
84
|
+
// --- Ad-attribution relay (Tier 3) --------------------------------------------
|
|
85
|
+
// On the first message of a Click-to-Direct ad thread, forward the referral to
|
|
86
|
+
// the hub so it can resolve the campaign and store the lead's origin. Config
|
|
87
|
+
// mirrors the Meta app creds: plugin config → env fallback.
|
|
88
|
+
|
|
89
|
+
type RelayConfig = { hubUrl: string; cronSecret: string };
|
|
90
|
+
|
|
91
|
+
function resolveRelayConfig(cfg: MinionConfig): RelayConfig | null {
|
|
92
|
+
const pc =
|
|
93
|
+
(cfg as { plugins?: { entries?: Record<string, { config?: Record<string, unknown> }> } })
|
|
94
|
+
.plugins?.entries?.["meta-graph"]?.config ?? {};
|
|
95
|
+
const hubUrl = (
|
|
96
|
+
(pc.hubUrl as string | undefined)?.trim() ||
|
|
97
|
+
process.env.HUB_URL?.trim() ||
|
|
98
|
+
""
|
|
99
|
+
).replace(/\/+$/, "");
|
|
100
|
+
const cronSecret =
|
|
101
|
+
(pc.cronSecret as string | undefined)?.trim() || process.env.CRON_SECRET?.trim() || "";
|
|
102
|
+
if (!hubUrl || !cronSecret) return null;
|
|
103
|
+
return { hubUrl, cronSecret };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Fire-and-forget POST of an ad referral to the hub. Never throws. */
|
|
107
|
+
function relayAdReferral(
|
|
108
|
+
relay: RelayConfig,
|
|
109
|
+
channel: string,
|
|
110
|
+
message: MetaInboundMessage,
|
|
111
|
+
log?: (m: string) => void,
|
|
112
|
+
): void {
|
|
113
|
+
const referral = message.referral;
|
|
114
|
+
if (!referral) return;
|
|
115
|
+
const isAd = (referral.source ?? "").toUpperCase() === "ADS" || Boolean(referral.ad_id);
|
|
116
|
+
if (!isAd || !message.recipientId) return; // recipient id is required to map an org
|
|
117
|
+
const body = {
|
|
118
|
+
channel,
|
|
119
|
+
senderId: message.senderId,
|
|
120
|
+
recipientId: message.recipientId,
|
|
121
|
+
messageId: message.messageId ?? null,
|
|
122
|
+
timestampMs: message.timestampMs ?? null,
|
|
123
|
+
referral,
|
|
124
|
+
};
|
|
125
|
+
void fetch(`${relay.hubUrl}/api/meta/attribution`, {
|
|
126
|
+
method: "POST",
|
|
127
|
+
headers: { "content-type": "application/json", authorization: `Bearer ${relay.cronSecret}` },
|
|
128
|
+
body: JSON.stringify(body),
|
|
129
|
+
})
|
|
130
|
+
.then((res) => {
|
|
131
|
+
if (!res.ok) log?.(`[${channel}] attribution relay non-ok: ${res.status}`);
|
|
132
|
+
})
|
|
133
|
+
.catch((err) => log?.(`[${channel}] attribution relay failed: ${String(err)}`));
|
|
134
|
+
}
|
|
135
|
+
|
|
76
136
|
async function sendMessagingText(params: {
|
|
77
137
|
nodeId: string;
|
|
78
138
|
accessToken: string;
|
|
@@ -360,6 +420,7 @@ export function createMessagingPlatformChannel(
|
|
|
360
420
|
appSecret: account.appSecret ?? "",
|
|
361
421
|
verifyToken: account.verifyToken ?? "",
|
|
362
422
|
});
|
|
423
|
+
const relay = resolveRelayConfig(ctx.cfg);
|
|
363
424
|
const offProc = registerMetaProcessor(
|
|
364
425
|
registry,
|
|
365
426
|
spec.objectType,
|
|
@@ -372,6 +433,10 @@ export function createMessagingPlatformChannel(
|
|
|
372
433
|
error: (m) => ctx.log?.error?.(m),
|
|
373
434
|
statusSink: (patch) => ctx.setStatus({ accountId: account.accountId, ...patch }),
|
|
374
435
|
},
|
|
436
|
+
onReferral: relay
|
|
437
|
+
? (message) =>
|
|
438
|
+
relayAdReferral(relay, spec.channelId, message, (m) => ctx.log?.info?.(m))
|
|
439
|
+
: undefined,
|
|
375
440
|
}),
|
|
376
441
|
);
|
|
377
442
|
// Webhook channel: stay running until aborted (see waitForAbort docs).
|
|
@@ -12,6 +12,19 @@ import { getMetaRuntime } from "../runtime.js";
|
|
|
12
12
|
import type { MetaObjectType, MetaWebhookEntry } from "../types.js";
|
|
13
13
|
import type { MetaDmPolicy } from "./config.js";
|
|
14
14
|
|
|
15
|
+
/** IG/Messenger Click-to-Direct `message.referral` (verbatim webhook shape). */
|
|
16
|
+
export type MetaAdReferral = {
|
|
17
|
+
ref?: string | null;
|
|
18
|
+
ad_id?: string | null;
|
|
19
|
+
source?: string | null; // 'ADS'
|
|
20
|
+
type?: string | null; // 'OPEN_THREAD'
|
|
21
|
+
ads_context_data?: {
|
|
22
|
+
ad_title?: string | null;
|
|
23
|
+
photo_url?: string | null;
|
|
24
|
+
video_url?: string | null;
|
|
25
|
+
} | null;
|
|
26
|
+
};
|
|
27
|
+
|
|
15
28
|
export type MetaInboundMessage = {
|
|
16
29
|
senderId: string;
|
|
17
30
|
senderName?: string;
|
|
@@ -19,6 +32,10 @@ export type MetaInboundMessage = {
|
|
|
19
32
|
messageId?: string;
|
|
20
33
|
timestampMs?: number;
|
|
21
34
|
media?: { id?: string; url?: string; mimeType?: string; fileName?: string };
|
|
35
|
+
/** Click-to-Direct ad referral, present only on the FIRST message of an ad-driven thread. */
|
|
36
|
+
referral?: MetaAdReferral;
|
|
37
|
+
/** Webhook `recipient.id` (the IG business / Page id) — maps to an org on the hub side. */
|
|
38
|
+
recipientId?: string;
|
|
22
39
|
};
|
|
23
40
|
|
|
24
41
|
export type MetaResolvedAccountBase = {
|
|
@@ -68,6 +85,9 @@ export function createMetaProcessor<A extends MetaResolvedAccountBase>(params: {
|
|
|
68
85
|
account: A;
|
|
69
86
|
cfg: MinionConfig;
|
|
70
87
|
env: MetaProcessorEnv;
|
|
88
|
+
/** Fired (fire-and-forget) for every inbound message carrying an ad referral,
|
|
89
|
+
* independent of whether the message itself is dispatched to an agent. */
|
|
90
|
+
onReferral?: (message: MetaInboundMessage) => void;
|
|
71
91
|
}): MetaProcessor {
|
|
72
92
|
const { adapter, account, cfg, env } = params;
|
|
73
93
|
const wantId = adapter.entryId(account);
|
|
@@ -78,6 +98,7 @@ export function createMetaProcessor<A extends MetaResolvedAccountBase>(params: {
|
|
|
78
98
|
const core = getMetaRuntime();
|
|
79
99
|
const messages = adapter.extractMessages(entry, account);
|
|
80
100
|
for (const message of messages) {
|
|
101
|
+
if (message.referral) params.onReferral?.(message);
|
|
81
102
|
env.statusSink?.({ lastInboundAt: Date.now() });
|
|
82
103
|
try {
|
|
83
104
|
await handleInbound({ adapter, account, cfg, env, core, message });
|
|
@@ -4288,6 +4288,7 @@ const ChannelsSchema = z.object({
|
|
|
4288
4288
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4289
4289
|
}).strict().optional(),
|
|
4290
4290
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4291
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4291
4292
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4292
4293
|
telegram: TelegramConfigSchema.optional(),
|
|
4293
4294
|
discord: DiscordConfigSchema.optional(),
|
package/extensions/tlon/index.js
CHANGED
|
@@ -4376,9 +4376,14 @@ function buildWorkspaceSkillSnapshot(workspaceDir, opts) {
|
|
|
4376
4376
|
*/
|
|
4377
4377
|
function createGatewayDroneHost(opts = {}) {
|
|
4378
4378
|
const { config, agentDir, workspaceDir } = opts;
|
|
4379
|
+
let resolvedModel;
|
|
4379
4380
|
return {
|
|
4380
4381
|
async resolveApiKey(spec) {
|
|
4381
4382
|
const auth = await resolveProvider(spec, config, agentDir);
|
|
4383
|
+
resolvedModel = {
|
|
4384
|
+
provider: spec.provider,
|
|
4385
|
+
model: spec.model
|
|
4386
|
+
};
|
|
4382
4387
|
return {
|
|
4383
4388
|
apiKey: requireApiKey(auth, spec.provider),
|
|
4384
4389
|
source: auth.source
|
|
@@ -4411,6 +4416,34 @@ function createGatewayDroneHost(opts = {}) {
|
|
|
4411
4416
|
},
|
|
4412
4417
|
timestamp: Date.now()
|
|
4413
4418
|
});
|
|
4419
|
+
if (input.event === "agent.run.end" && input.usage && resolvedModel) {
|
|
4420
|
+
const u = input.usage;
|
|
4421
|
+
const inTok = u.inputTokens ?? 0;
|
|
4422
|
+
const outTok = u.outputTokens ?? 0;
|
|
4423
|
+
const cacheTok = u.cacheReadTokens ?? 0;
|
|
4424
|
+
emitEvent({
|
|
4425
|
+
category: "agent",
|
|
4426
|
+
severity: "info",
|
|
4427
|
+
event: "agent.llm.usage",
|
|
4428
|
+
message: `Drone LLM usage: ${input.droneId}`,
|
|
4429
|
+
correlationId: input.correlationId,
|
|
4430
|
+
metadata: {
|
|
4431
|
+
kind: "drone",
|
|
4432
|
+
droneId: input.droneId,
|
|
4433
|
+
provider: resolvedModel.provider,
|
|
4434
|
+
model: resolvedModel.model,
|
|
4435
|
+
source: "system",
|
|
4436
|
+
channel: "drone",
|
|
4437
|
+
tokens: {
|
|
4438
|
+
input: inTok,
|
|
4439
|
+
output: outTok,
|
|
4440
|
+
cacheRead: cacheTok,
|
|
4441
|
+
total: inTok + outTok + cacheTok
|
|
4442
|
+
}
|
|
4443
|
+
},
|
|
4444
|
+
timestamp: Date.now()
|
|
4445
|
+
});
|
|
4446
|
+
}
|
|
4414
4447
|
}
|
|
4415
4448
|
};
|
|
4416
4449
|
}
|
package/extensions/wati/index.js
CHANGED
|
@@ -4298,6 +4298,7 @@ const ChannelsSchema = z.object({
|
|
|
4298
4298
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4299
4299
|
}).strict().optional(),
|
|
4300
4300
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4301
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4301
4302
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4302
4303
|
telegram: TelegramConfigSchema.optional(),
|
|
4303
4304
|
discord: DiscordConfigSchema.optional(),
|
|
@@ -4287,6 +4287,7 @@ const ChannelsSchema = z.object({
|
|
|
4287
4287
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4288
4288
|
}).strict().optional(),
|
|
4289
4289
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4290
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4290
4291
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4291
4292
|
telegram: TelegramConfigSchema.optional(),
|
|
4292
4293
|
discord: DiscordConfigSchema.optional(),
|
package/extensions/zalo/index.js
CHANGED
|
@@ -4298,6 +4298,7 @@ const ChannelsSchema = z.object({
|
|
|
4298
4298
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4299
4299
|
}).strict().optional(),
|
|
4300
4300
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4301
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4301
4302
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4302
4303
|
telegram: TelegramConfigSchema.optional(),
|
|
4303
4304
|
discord: DiscordConfigSchema.optional(),
|
|
@@ -4288,6 +4288,7 @@ const ChannelsSchema = z.object({
|
|
|
4288
4288
|
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
4289
4289
|
}).strict().optional(),
|
|
4290
4290
|
accountOrgs: z.record(z.string(), z.record(z.string(), z.array(z.string()).optional()).optional()).optional(),
|
|
4291
|
+
accountOwners: z.record(z.string(), z.record(z.string(), z.string().optional()).optional()).optional(),
|
|
4291
4292
|
whatsapp: WhatsAppConfigSchema.optional(),
|
|
4292
4293
|
telegram: TelegramConfigSchema.optional(),
|
|
4293
4294
|
discord: DiscordConfigSchema.optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nikolasp98/minion",
|
|
3
|
-
"version": "2026.7.
|
|
3
|
+
"version": "2026.7.16-dev",
|
|
4
4
|
"description": "Multi-channel AI gateway with extensible messaging integrations",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/NikolasP98/minion-ai#readme",
|
package/dist/web-BfUZ3tIc.js
DELETED