@shadowob/cloud 1.1.7 → 1.1.9
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/README.md +159 -11
- package/dist/{agent-browser-CERTMCDL.js → agent-browser-EI7FIK3X.js} +3 -3
- package/dist/{agent-browser-CIRZRIY4.js → agent-browser-YXE4ES6Q.js} +3 -3
- package/dist/{agent-pack-LF3O5TR4.js → agent-pack-35TFCZKP.js} +1 -1
- package/dist/{agent-pack-RQT27V7R.js → agent-pack-UOG6ZAUL.js} +1 -1
- package/dist/agentmemory-KP5O7GHB.js +101 -0
- package/dist/agentmemory-UV74POU5.js +100 -0
- package/dist/{airtable-BG2Q75G2.js → airtable-CXXS3YUN.js} +3 -3
- package/dist/{airtable-JCQXFM5D.js → airtable-YZ5JR5JC.js} +3 -3
- package/dist/{alipay-TZQI34RB.js → alipay-WED5P3XC.js} +3 -3
- package/dist/{alipay-MZX2XCDB.js → alipay-WJTVREMG.js} +3 -3
- package/dist/{amap-KPCLZYYL.js → amap-AIN23TQ7.js} +3 -3
- package/dist/{amap-5RQB3VGC.js → amap-F6GF7QKB.js} +3 -3
- package/dist/{atlassian-LGOEWYC7.js → atlassian-G6PM6UVM.js} +3 -3
- package/dist/{atlassian-TVS2A4IU.js → atlassian-IDR2NPJC.js} +3 -3
- package/dist/{baidu-appbuilder-QRRL3ETM.js → baidu-appbuilder-JKQIA5TG.js} +3 -3
- package/dist/{baidu-appbuilder-6UMESXHW.js → baidu-appbuilder-KVMCIFYH.js} +3 -3
- package/dist/{baidu-maps-HEPMVP5D.js → baidu-maps-GWMXV6YT.js} +3 -3
- package/dist/{baidu-maps-HXC4FBVP.js → baidu-maps-ZXGT6QZM.js} +3 -3
- package/dist/{baidu-netdisk-G5Q6B5NH.js → baidu-netdisk-J5SLQVWW.js} +3 -3
- package/dist/{baidu-netdisk-RS2K5W2M.js → baidu-netdisk-PONM3DY6.js} +3 -3
- package/dist/{baidu-smartprogram-JHD3XWF6.js → baidu-smartprogram-WJ5JMO6V.js} +3 -3
- package/dist/{baidu-smartprogram-EWTK5WKK.js → baidu-smartprogram-Y5WBR7RX.js} +3 -3
- package/dist/{browserbase-IUIYVYI7.js → browserbase-CGVQHRC4.js} +3 -3
- package/dist/{browserbase-JFO2PCIA.js → browserbase-PVWYTEZC.js} +3 -3
- package/dist/{canva-3YOFL7JS.js → canva-COCBQAT2.js} +3 -3
- package/dist/{canva-FMYN65SM.js → canva-RSTJSEX5.js} +3 -3
- package/dist/{chunk-35LJYCQF.js → chunk-3CT6RQNM.js} +745 -482
- package/dist/{chunk-KODMGZUC.js → chunk-4YO3NA26.js} +1 -1
- package/dist/{chunk-RECNVWMT.js → chunk-6V7MW4HU.js} +17 -3
- package/dist/{chunk-C6OI4ZNO.js → chunk-EVV774KS.js} +1 -1
- package/dist/{chunk-SVMXSIMG.js → chunk-F6CQ6GAG.js} +2 -1
- package/dist/{chunk-JUPAE5IA.js → chunk-OL5VH6RN.js} +72 -69
- package/dist/{chunk-POSVEKIY.js → chunk-OYY64ZSX.js} +17 -3
- package/dist/{chunk-ZHVYNIHA.js → chunk-P5Y6F2NH.js} +745 -482
- package/dist/{chunk-EEFMJYKB.js → chunk-PSK2SYZ3.js} +2 -1
- package/dist/{chunk-6YAYCWGK.js → chunk-PYJRFKPN.js} +1 -1
- package/dist/{chunk-JY2HTT7Q.js → chunk-RMDY3W4V.js} +6 -0
- package/dist/{chunk-EWB7L7IW.js → chunk-X2SREECR.js} +6 -6
- package/dist/{chunk-LXJBQBGL.js → chunk-X5VOIA72.js} +6 -6
- package/dist/{chunk-CTNUKOQE.js → chunk-Y5BJ3EW2.js} +6 -0
- package/dist/{chunk-SAP2DBHO.js → chunk-Y6BKVDG7.js} +1 -1
- package/dist/{chunk-6P2K6QZR.js → chunk-ZGMWSSCC.js} +72 -69
- package/dist/{claude-plugin-577TAQVS.js → claude-plugin-FPN32WMT.js} +1 -1
- package/dist/{claude-plugin-L3MXJJ6J.js → claude-plugin-IYHOVTVL.js} +1 -1
- package/dist/cli.js +930 -149
- package/dist/{cloudflare-RDFPKMM5.js → cloudflare-U3RHJJKK.js} +3 -3
- package/dist/{cloudflare-HBBABPK6.js → cloudflare-ZHN7UGPX.js} +3 -3
- package/dist/{cnb-FLP3QX46.js → cnb-AMXC5I7D.js} +3 -3
- package/dist/{cnb-YAVVEYFB.js → cnb-P3IZ4JTD.js} +3 -3
- package/dist/console/index.html +1 -1
- package/dist/console/static/css/index.f4563d95.css +1 -0
- package/dist/console/static/js/index.020abc71.js +1 -0
- package/dist/{coze-E6VGRNLV.js → coze-66RYMKVB.js} +3 -3
- package/dist/{coze-C6PMDPBI.js → coze-YE3BINXP.js} +3 -3
- package/dist/{dashboard.command-ZMQFKLNQ.js → dashboard.command-BRPZCZER.js} +1 -1
- package/dist/{dashboard.command-2AM45SIT.js → dashboard.command-GUHSJ2CN.js} +1 -1
- package/dist/{dingtalk-JNRNRN7E.js → dingtalk-4RFQG7N2.js} +3 -3
- package/dist/{dingtalk-WZGGIAHJ.js → dingtalk-VNFKXD2P.js} +3 -3
- package/dist/{douyin-miniprogram-AIJPPIZH.js → douyin-miniprogram-UEALAGOS.js} +3 -3
- package/dist/{douyin-miniprogram-HCYZ5NBW.js → douyin-miniprogram-UNB6UO2I.js} +3 -3
- package/dist/{figma-2YYNSCDX.js → figma-A264OWU5.js} +3 -3
- package/dist/{figma-RYOBMENP.js → figma-Y4TGSDZP.js} +3 -3
- package/dist/{firebase-OYSY6HPT.js → firebase-AI3MAGYG.js} +3 -3
- package/dist/{firebase-2IJDDBXX.js → firebase-ZGQARUIH.js} +3 -3
- package/dist/{firecrawl-2T3SBUW7.js → firecrawl-2JW7DMTH.js} +3 -3
- package/dist/{firecrawl-IYYXLAZM.js → firecrawl-UURQ5P5N.js} +3 -3
- package/dist/{flyai-QS5Q6FJR.js → flyai-EJGDMYFA.js} +3 -3
- package/dist/{flyai-7FJ4TRAG.js → flyai-ZFMZBBHJ.js} +3 -3
- package/dist/{gitagent-MWI75OIX.js → gitagent-5SDBYFNA.js} +1 -1
- package/dist/{gitagent-YBMWY7NZ.js → gitagent-ODXPCR4X.js} +1 -1
- package/dist/{gitee-3N7OFOM7.js → gitee-5UMJ4BC7.js} +3 -3
- package/dist/{gitee-KVNK6KLZ.js → gitee-D6NAZTCO.js} +3 -3
- package/dist/{github-LUEC2LID.js → github-JBLDKIA3.js} +3 -3
- package/dist/{github-XRO5Z3GC.js → github-PZQAVEZP.js} +3 -3
- package/dist/{google-ads-VPKWTX67.js → google-ads-BIFQOJ5M.js} +3 -3
- package/dist/{google-ads-A3QAJI4D.js → google-ads-QU3LJE4O.js} +3 -3
- package/dist/{google-analytics-C4UR5ZR2.js → google-analytics-7VZ6YZVA.js} +3 -3
- package/dist/{google-analytics-XDYZA2B7.js → google-analytics-HXMPCL5V.js} +3 -3
- package/dist/{google-workspace-YX35SHHX.js → google-workspace-6SEBJ4VA.js} +2 -2
- package/dist/{google-workspace-LL3EWVHH.js → google-workspace-L3AMJLCF.js} +2 -2
- package/dist/{huawei-xiaoyi-KPWLTSHB.js → huawei-xiaoyi-C6QIJMPM.js} +3 -3
- package/dist/{huawei-xiaoyi-6BSMGJHR.js → huawei-xiaoyi-JGLXWU5P.js} +3 -3
- package/dist/{hubspot-FTIEMNZO.js → hubspot-LACJGE6D.js} +3 -3
- package/dist/{hubspot-DIUHGEDI.js → hubspot-XWPRO4KZ.js} +3 -3
- package/dist/{huggingface-UUXK2RHK.js → huggingface-26QQZK4C.js} +3 -3
- package/dist/{huggingface-MJCOXA7E.js → huggingface-CQICNA2R.js} +3 -3
- package/dist/index.d.ts +1338 -1
- package/dist/index.js +1364 -226
- package/dist/{inference-ai-image-generation-PXV6IG4U.js → inference-ai-image-generation-5KYIUWT6.js} +3 -3
- package/dist/{inference-ai-image-generation-CMI6R5T3.js → inference-ai-image-generation-J2NYDCLZ.js} +3 -3
- package/dist/{inference-sh-7AZOLEFI.js → inference-sh-5SWQTK73.js} +3 -3
- package/dist/{inference-sh-ABQOD3YF.js → inference-sh-PTQF6T3R.js} +3 -3
- package/dist/{init.command-YVG4X6II.js → init.command-C7UKPK2Y.js} +3 -3
- package/dist/{init.command-JKE3SXAS.js → init.command-UNL66BMR.js} +3 -3
- package/dist/{klaviyo-LDPBWBSS.js → klaviyo-4UNPMBFT.js} +3 -3
- package/dist/{klaviyo-6K5YEFNH.js → klaviyo-SLYNEULT.js} +3 -3
- package/dist/{kuaidi100-HGFM5VK2.js → kuaidi100-HZKV5AIS.js} +3 -3
- package/dist/{kuaidi100-UHPFCVXP.js → kuaidi100-ZQUW7GHH.js} +3 -3
- package/dist/lark-HQUZNHDI.js +382 -0
- package/dist/lark-PAV7XWJS.js +381 -0
- package/dist/{linear-T4ORUP7N.js → linear-PYGQ5SLK.js} +3 -3
- package/dist/{linear-7QFSFPOD.js → linear-VJLYNTUF.js} +3 -3
- package/dist/{lovart-PDUXRUHJ.js → lovart-KC6SVNAJ.js} +3 -3
- package/dist/{lovart-QO3SK55T.js → lovart-WVKY4RR4.js} +3 -3
- package/dist/{meta-ads-SCNFI45S.js → meta-ads-E6XT33GI.js} +3 -3
- package/dist/{meta-ads-V6XPZWX3.js → meta-ads-RJ6DWRYN.js} +3 -3
- package/dist/{miclaw-TPPPS2WN.js → miclaw-4BA3A2YN.js} +3 -3
- package/dist/{miclaw-5CNTW7VV.js → miclaw-LUV6DCHX.js} +3 -3
- package/dist/{model-provider-KFB76XV5.js → model-provider-SYXJZ3JD.js} +1 -1
- package/dist/{model-provider-AVSFJSZP.js → model-provider-U7NEYA3Y.js} +1 -1
- package/dist/nature-skills-G76ABIWZ.js +143 -0
- package/dist/nature-skills-SQHMFXKT.js +142 -0
- package/dist/{notion-WFA7KGZZ.js → notion-2JZAKOFP.js} +1 -1
- package/dist/{notion-FZK76MN2.js → notion-O3NO5TJH.js} +1 -1
- package/dist/{oceanengine-3JZUS3PP.js → oceanengine-D23UZGVB.js} +3 -3
- package/dist/{oceanengine-5BRIJVJE.js → oceanengine-WDK2OXX5.js} +3 -3
- package/dist/{opencli-PFXHGCS2.js → opencli-36P63YNU.js} +3 -3
- package/dist/{opencli-VIGRJTGH.js → opencli-SUHDFR33.js} +3 -3
- package/dist/{paypal-Z5JYHIWD.js → paypal-K27SUW3B.js} +3 -3
- package/dist/{paypal-33UADIPR.js → paypal-OPZ3KOV5.js} +3 -3
- package/dist/{playwright-SQAQ3DZG.js → playwright-2ULT3NIC.js} +3 -3
- package/dist/{playwright-MG5WHK47.js → playwright-3Q7LBILG.js} +3 -3
- package/dist/{plugins-HZBWK3WQ.js → plugins-2MITZ4ZD.js} +2 -2
- package/dist/{plugins-I4GD5SZX.js → plugins-UK2QWD6G.js} +2 -2
- package/dist/{posthog-MU5MAJOQ.js → posthog-E3EHXLAN.js} +3 -3
- package/dist/{posthog-RJRRKDWB.js → posthog-KPJVLGX6.js} +3 -3
- package/dist/{salesforce-34FVIJTG.js → salesforce-FGPNG7FB.js} +3 -3
- package/dist/{salesforce-3QZ6OFVO.js → salesforce-TVHISKBC.js} +3 -3
- package/dist/{sentry-PIWW46VA.js → sentry-BZ3J3MZM.js} +3 -3
- package/dist/{sentry-MCIRMACU.js → sentry-XC57YRAJ.js} +3 -3
- package/dist/{seo-suite-WJXMA3S4.js → seo-suite-2MDEDLAB.js} +3 -3
- package/dist/{seo-suite-4SQ3I67Q.js → seo-suite-U75O3QP6.js} +3 -3
- package/dist/{serve.command-XLBJUOV6.js → serve.command-G5RVQFUD.js} +3 -3
- package/dist/{serve.command-RD6I6MFD.js → serve.command-PYGDG7K3.js} +3 -3
- package/dist/{shadowob-PRSMI5MW.js → shadowob-3QZ7DLDW.js} +158 -31
- package/dist/{shadowob-JELOWHWX.js → shadowob-CJLOEKFP.js} +158 -31
- package/dist/{sherlock-2PKY2E2Y.js → sherlock-CQFUHKDH.js} +3 -3
- package/dist/{sherlock-C5ZWPPVT.js → sherlock-DONK2I6E.js} +3 -3
- package/dist/{shopify-GL3NFVGE.js → shopify-NO5GI3WD.js} +3 -3
- package/dist/{shopify-R4G3UXM6.js → shopify-VW2KLKH5.js} +3 -3
- package/dist/{skill-discovery-YPXXV622.js → skill-discovery-6JEPPKKM.js} +3 -3
- package/dist/{skill-discovery-7INAUP4D.js → skill-discovery-PWRAVGIS.js} +3 -3
- package/dist/skills/shadowob-cli/SKILL.md +7 -0
- package/dist/{stripe-LJNPQ3CQ.js → stripe-HCNCKG4C.js} +1 -1
- package/dist/{stripe-C22RR4ZS.js → stripe-IU3KTJ4H.js} +1 -1
- package/dist/{supabase-IRNQ54FJ.js → supabase-KRL7JW2D.js} +3 -3
- package/dist/{supabase-N4ONFJNQ.js → supabase-TYEBTZNO.js} +3 -3
- package/dist/{taobao-aipaas-LRR4GMO3.js → taobao-aipaas-PEUIDOYP.js} +3 -3
- package/dist/{taobao-aipaas-RVKORSF4.js → taobao-aipaas-SA5E4MZA.js} +3 -3
- package/dist/{tapd-TMQRSMFG.js → tapd-6DDIUPVQ.js} +3 -3
- package/dist/{tapd-3JPVJ7XH.js → tapd-OTYLSZGY.js} +3 -3
- package/dist/{tencent-ads-UHC6OPBV.js → tencent-ads-OW2TAMH5.js} +3 -3
- package/dist/{tencent-ads-IGD33LO7.js → tencent-ads-XTQZ27YT.js} +3 -3
- package/dist/{tencent-docs-C3A4J3CJ.js → tencent-docs-6D6A2VCO.js} +3 -3
- package/dist/{tencent-docs-O2SC4FHL.js → tencent-docs-K3TMUIWD.js} +3 -3
- package/dist/{tencent-maps-OQOKHVW2.js → tencent-maps-IZYWITJZ.js} +3 -3
- package/dist/{tencent-maps-HMMWMNF4.js → tencent-maps-SWI7CLQY.js} +3 -3
- package/dist/text-to-cad-B2UP6PKA.js +192 -0
- package/dist/text-to-cad-I4B6VBFV.js +193 -0
- package/dist/{vercel-KOXDDTHX.js → vercel-CCKRC76D.js} +3 -3
- package/dist/{vercel-OLNVDWMG.js → vercel-SBGEMIJJ.js} +3 -3
- package/dist/{webflow-OMJKZM54.js → webflow-C3EHNNSN.js} +3 -3
- package/dist/{webflow-FULU5Q2I.js → webflow-ZFBJH4CR.js} +3 -3
- package/dist/{wechat-miniprogram-skyline-KYCDMQNW.js → wechat-miniprogram-skyline-VNCRERHX.js} +3 -3
- package/dist/{wechat-miniprogram-skyline-VR4FVIQL.js → wechat-miniprogram-skyline-Z5JQUV5Q.js} +3 -3
- package/dist/{wechat-pay-BCMAJ6UW.js → wechat-pay-RPDKPUEB.js} +3 -3
- package/dist/{wechat-pay-YQQKXVUI.js → wechat-pay-XVDGJRF2.js} +3 -3
- package/dist/{wonda-NGWIORYN.js → wonda-EL2P44S7.js} +3 -3
- package/dist/{wonda-RBABXFNM.js → wonda-XK5JK4X3.js} +3 -3
- package/dist/{wordpress-woocommerce-RNA5HB3N.js → wordpress-woocommerce-4MEE5A2M.js} +3 -3
- package/dist/{wordpress-woocommerce-RDIUTHYT.js → wordpress-woocommerce-6ECNM2QU.js} +3 -3
- package/dist/{wps-LUWHMZQQ.js → wps-E4OZEMOF.js} +3 -3
- package/dist/{wps-DAEFQHDE.js → wps-JNQUC4JS.js} +3 -3
- package/dist/{yuque-HCHTJWNI.js → yuque-GLAAOS7X.js} +3 -3
- package/dist/{yuque-KRH5O74J.js → yuque-MEF6VFLJ.js} +3 -3
- package/images/RUNNERS.md +15 -0
- package/images/cc-connect-runner/entrypoint.mjs +228 -0
- package/images/claude-runner/RUNNER.md +5 -3
- package/images/codex-runner/RUNNER.md +5 -3
- package/images/gemini-runner/RUNNER.md +5 -2
- package/images/hermes-runner/RUNNER.md +4 -2
- package/images/hermes-runner/entrypoint.mjs +269 -1
- package/images/openclaw-runner/Dockerfile +1 -0
- package/images/openclaw-runner/RUNNER.md +3 -0
- package/images/openclaw-runner/entrypoint.mjs +249 -1
- package/images/openclaw-runner/warm-runtime-deps.mjs +1 -3
- package/images/opencode-runner/RUNNER.md +5 -3
- package/package.json +3 -3
- package/templates/agent-marketplace-buddy.template.json +4 -1
- package/templates/bmad-method-buddy.template.json +4 -1
- package/templates/code-trainer.template.json +331 -0
- package/templates/gstack-buddy.template.json +4 -1
- package/templates/little-match-girl.template.json +10 -3
- package/dist/console/static/css/index.7f91f806.css +0 -1
- package/dist/console/static/js/index.4487e1ff.js +0 -1
- package/dist/lark-6LNA3LUQ.js +0 -103
- package/dist/lark-URVBZNS4.js +0 -102
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-BF6CV2Y4.js";
|
|
5
5
|
import {
|
|
6
6
|
defineChannelPlugin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y5BJ3EW2.js";
|
|
8
8
|
import "./chunk-AD3JTIU3.js";
|
|
9
9
|
|
|
10
10
|
// src/plugins/shadowob/manifest.json
|
|
@@ -51,9 +51,9 @@ var manifest_default = {
|
|
|
51
51
|
type: "array",
|
|
52
52
|
description: "Binding rules connecting buddies to agents and channels"
|
|
53
53
|
},
|
|
54
|
-
|
|
54
|
+
greeting: {
|
|
55
55
|
type: "object",
|
|
56
|
-
description: "
|
|
56
|
+
description: "Greeting and entry-channel behavior for provisioned Shadow spaces"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
},
|
|
@@ -384,11 +384,12 @@ async function provisionChannel(client, serverId, channelDef, state) {
|
|
|
384
384
|
log2.step(` Provisioning channel: ${channelDef.title}`);
|
|
385
385
|
try {
|
|
386
386
|
const channels = await client.getServerChannels(serverId);
|
|
387
|
-
const
|
|
388
|
-
|
|
387
|
+
const expectedKeys = /* @__PURE__ */ new Set([
|
|
388
|
+
...channelMatchKeys(channelDef.title),
|
|
389
|
+
...channelMatchKeys(channelDef.id)
|
|
390
|
+
]);
|
|
389
391
|
const existing = channels.find((c) => {
|
|
390
|
-
|
|
391
|
-
return channelName === expectedName || channelName === expectedId;
|
|
392
|
+
return channelMatchKeys(c.name).some((key) => expectedKeys.has(key));
|
|
392
393
|
});
|
|
393
394
|
if (existing) {
|
|
394
395
|
log2.dim(` Channel "${channelDef.title}" already exists (${existing.id})`);
|
|
@@ -544,30 +545,35 @@ async function processBinding(client, binding, result) {
|
|
|
544
545
|
);
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
548
|
+
const policyMode = binding.replyPolicy?.mode ?? "default";
|
|
549
|
+
const policyConfig = {};
|
|
550
|
+
if (binding.replyPolicy?.mode === "custom" && binding.replyPolicy.custom) {
|
|
551
|
+
Object.assign(policyConfig, binding.replyPolicy.custom);
|
|
552
|
+
}
|
|
553
|
+
const channelPolicy = {
|
|
554
|
+
listen: binding.replyPolicy?.mode !== "disabled",
|
|
555
|
+
reply: binding.replyPolicy?.mode !== "disabled",
|
|
556
|
+
mentionOnly: binding.replyPolicy?.mode === "mentionOnly",
|
|
557
|
+
config: policyConfig
|
|
558
|
+
};
|
|
559
|
+
for (const serverConfigId of binding.servers) {
|
|
560
|
+
const serverId = result.servers.get(serverConfigId);
|
|
561
|
+
if (!serverId) continue;
|
|
562
|
+
if (binding.channels.length > 0) {
|
|
558
563
|
try {
|
|
559
564
|
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
560
565
|
channelId: null,
|
|
561
|
-
|
|
562
|
-
reply,
|
|
563
|
-
|
|
566
|
+
listen: false,
|
|
567
|
+
reply: false,
|
|
568
|
+
mentionOnly: false,
|
|
569
|
+
config: {}
|
|
564
570
|
});
|
|
565
571
|
log2.success(
|
|
566
|
-
`
|
|
572
|
+
` Disabled server-wide default for channel-scoped buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
567
573
|
);
|
|
568
574
|
} catch {
|
|
569
575
|
log2.dim(
|
|
570
|
-
` Could not
|
|
576
|
+
` Could not disable server-wide default for buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
571
577
|
);
|
|
572
578
|
}
|
|
573
579
|
for (const channelConfigId of binding.channels) {
|
|
@@ -576,16 +582,33 @@ async function processBinding(client, binding, result) {
|
|
|
576
582
|
try {
|
|
577
583
|
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
578
584
|
channelId,
|
|
579
|
-
|
|
580
|
-
reply,
|
|
581
|
-
config: policyConfig
|
|
585
|
+
...channelPolicy
|
|
582
586
|
});
|
|
583
|
-
|
|
587
|
+
log2.success(
|
|
588
|
+
` Applied channel-scoped replyPolicy "${policyMode}" to buddy "${binding.targetId}" in channel "${channelConfigId}"`
|
|
589
|
+
);
|
|
590
|
+
} catch (err) {
|
|
584
591
|
log2.dim(
|
|
585
|
-
` Could not apply
|
|
592
|
+
` Could not apply channel-scoped replyPolicy for "${channelConfigId}": ${formatErrorMessage(err)}`
|
|
586
593
|
);
|
|
587
594
|
}
|
|
588
595
|
}
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
if (binding.replyPolicy) {
|
|
599
|
+
try {
|
|
600
|
+
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
601
|
+
channelId: null,
|
|
602
|
+
...channelPolicy
|
|
603
|
+
});
|
|
604
|
+
log2.success(
|
|
605
|
+
` Applied replyPolicy "${binding.replyPolicy.mode}" to buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
606
|
+
);
|
|
607
|
+
} catch {
|
|
608
|
+
log2.dim(
|
|
609
|
+
` Could not apply replyPolicy to buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
610
|
+
);
|
|
611
|
+
}
|
|
589
612
|
}
|
|
590
613
|
}
|
|
591
614
|
}
|
|
@@ -632,8 +655,14 @@ async function listAccessibleServers(client) {
|
|
|
632
655
|
return [];
|
|
633
656
|
}
|
|
634
657
|
}
|
|
635
|
-
function
|
|
636
|
-
|
|
658
|
+
function channelMatchKeys(value) {
|
|
659
|
+
const raw = (value ?? "").toLowerCase().normalize("NFKC").trim().replace(/^#/, "");
|
|
660
|
+
const keys = /* @__PURE__ */ new Set();
|
|
661
|
+
const unicodeKey = raw.replace(/\s+/g, " ");
|
|
662
|
+
if (unicodeKey) keys.add(unicodeKey);
|
|
663
|
+
const asciiSlug = raw.replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
664
|
+
if (asciiSlug) keys.add(asciiSlug);
|
|
665
|
+
return [...keys];
|
|
637
666
|
}
|
|
638
667
|
function formatErrorMessage(err) {
|
|
639
668
|
return err instanceof Error ? err.message : String(err);
|
|
@@ -906,11 +935,26 @@ function buildShadowConfig(context) {
|
|
|
906
935
|
bindings: configBindings
|
|
907
936
|
};
|
|
908
937
|
}
|
|
938
|
+
function normalizeGreetingMessages(greeting) {
|
|
939
|
+
if (!greeting) return [];
|
|
940
|
+
const messages = Array.isArray(greeting.messages) ? [...greeting.messages] : [];
|
|
941
|
+
if (typeof greeting.content === "string") {
|
|
942
|
+
messages.unshift({
|
|
943
|
+
...greeting.channelId ? { channelId: greeting.channelId } : {},
|
|
944
|
+
...greeting.buddyId ? { buddyId: greeting.buddyId } : {},
|
|
945
|
+
content: greeting.content
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
return messages;
|
|
949
|
+
}
|
|
909
950
|
var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig, (api) => {
|
|
910
951
|
api.onBuildPrompt(() => SHADOWOB_CLI_SKILL_INTRO);
|
|
911
952
|
api.onBuildRuntime((context) => {
|
|
912
953
|
const shadowConfig = context.agentConfig;
|
|
913
954
|
const bindings = shadowConfig.bindings?.filter((b) => b.agentId === context.agent.id) ?? [];
|
|
955
|
+
const agentRoutineIds = new Set(
|
|
956
|
+
(context.config.routines ?? []).filter((routine) => routine.enabled !== false && routine.agentId === context.agent.id).map((routine) => routine.id)
|
|
957
|
+
);
|
|
914
958
|
const accounts = bindings.map((binding) => {
|
|
915
959
|
const buddy = shadowConfig.buddies?.find((b) => b.id === binding.targetId);
|
|
916
960
|
if (!buddy) return void 0;
|
|
@@ -932,6 +976,22 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
932
976
|
...binding.replyPolicy ? { replyPolicy: binding.replyPolicy } : {}
|
|
933
977
|
};
|
|
934
978
|
}).filter((account) => Boolean(account));
|
|
979
|
+
const routineDeliveries = (shadowConfig.routines ?? []).filter((binding) => agentRoutineIds.has(binding.routineId)).map((binding) => ({
|
|
980
|
+
routineId: binding.routineId,
|
|
981
|
+
pluginId: "shadowob",
|
|
982
|
+
kind: "channel",
|
|
983
|
+
target: {
|
|
984
|
+
...binding.serverId ? { serverConfigId: binding.serverId } : {},
|
|
985
|
+
channelConfigId: binding.channelId,
|
|
986
|
+
...binding.accountId ? { accountId: binding.accountId } : {},
|
|
987
|
+
...binding.threadId ? { threadId: binding.threadId } : {},
|
|
988
|
+
...binding.serverId ? { serverEnvKey: shadowEnvKey("SHADOW_SERVER", binding.serverId) } : {},
|
|
989
|
+
channelEnvKey: shadowEnvKey("SHADOW_CHANNEL", binding.channelId)
|
|
990
|
+
},
|
|
991
|
+
env: {
|
|
992
|
+
SHADOW_HOME_CHANNEL: shadowEnvRef(shadowEnvKey("SHADOW_CHANNEL", binding.channelId))
|
|
993
|
+
}
|
|
994
|
+
}));
|
|
935
995
|
return {
|
|
936
996
|
openclaw: {
|
|
937
997
|
manifestPatches: [
|
|
@@ -952,7 +1012,8 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
952
1012
|
accounts,
|
|
953
1013
|
defaultAccountEnvKey: accounts[0]?.tokenEnvKey,
|
|
954
1014
|
capabilities: shadowobChannelCapabilities()
|
|
955
|
-
}
|
|
1015
|
+
},
|
|
1016
|
+
...routineDeliveries.length > 0 ? { routineDeliveries } : {}
|
|
956
1017
|
};
|
|
957
1018
|
});
|
|
958
1019
|
api.onValidate((context) => {
|
|
@@ -967,6 +1028,12 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
967
1028
|
const shadowConfig = context.agentConfig;
|
|
968
1029
|
const buddyIds = new Set((shadowConfig.buddies ?? []).map((b) => b.id));
|
|
969
1030
|
const serverIds = new Set((shadowConfig.servers ?? []).map((s) => s.id));
|
|
1031
|
+
const channelIds = new Set(
|
|
1032
|
+
(shadowConfig.servers ?? []).flatMap(
|
|
1033
|
+
(server) => server.channels?.map((channel) => channel.id) ?? []
|
|
1034
|
+
)
|
|
1035
|
+
);
|
|
1036
|
+
const routineIds = new Set((context.config.routines ?? []).map((routine) => routine.id));
|
|
970
1037
|
for (const binding of shadowConfig.bindings ?? []) {
|
|
971
1038
|
if (!buddyIds.has(binding.targetId)) {
|
|
972
1039
|
errors.push({
|
|
@@ -976,6 +1043,37 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
976
1043
|
});
|
|
977
1044
|
}
|
|
978
1045
|
}
|
|
1046
|
+
const greetingMessages = normalizeGreetingMessages(shadowConfig.greeting);
|
|
1047
|
+
if (shadowConfig.greeting?.entryChannelId && !channelIds.has(shadowConfig.greeting.entryChannelId)) {
|
|
1048
|
+
errors.push({
|
|
1049
|
+
path: "greeting.entryChannelId",
|
|
1050
|
+
message: `Greeting entry channel references non-existent channel "${shadowConfig.greeting.entryChannelId}"`,
|
|
1051
|
+
severity: "error"
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
for (const [index, message] of greetingMessages.entries()) {
|
|
1055
|
+
if (message.channelId && !channelIds.has(message.channelId)) {
|
|
1056
|
+
errors.push({
|
|
1057
|
+
path: `greeting.messages.${index}.channelId`,
|
|
1058
|
+
message: `Greeting message references non-existent channel "${message.channelId}"`,
|
|
1059
|
+
severity: "error"
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
if (message.buddyId && !buddyIds.has(message.buddyId)) {
|
|
1063
|
+
errors.push({
|
|
1064
|
+
path: `greeting.messages.${index}.buddyId`,
|
|
1065
|
+
message: `Greeting message references non-existent buddy "${message.buddyId}"`,
|
|
1066
|
+
severity: "error"
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
if (!message.content.trim()) {
|
|
1070
|
+
errors.push({
|
|
1071
|
+
path: `greeting.messages.${index}.content`,
|
|
1072
|
+
message: "Greeting message content is required",
|
|
1073
|
+
severity: "error"
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
979
1077
|
for (const app of shadowConfig.serverApps ?? []) {
|
|
980
1078
|
if (!serverIds.has(app.serverId)) {
|
|
981
1079
|
errors.push({
|
|
@@ -1001,6 +1099,29 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
1001
1099
|
}
|
|
1002
1100
|
}
|
|
1003
1101
|
}
|
|
1102
|
+
for (const routine of shadowConfig.routines ?? []) {
|
|
1103
|
+
if (!routineIds.has(routine.routineId)) {
|
|
1104
|
+
errors.push({
|
|
1105
|
+
path: `routines.${routine.routineId}`,
|
|
1106
|
+
message: `Routine delivery references non-existent routine "${routine.routineId}"`,
|
|
1107
|
+
severity: "error"
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
if (routine.serverId && !serverIds.has(routine.serverId)) {
|
|
1111
|
+
errors.push({
|
|
1112
|
+
path: `routines.${routine.routineId}.serverId`,
|
|
1113
|
+
message: `Routine delivery references non-existent server "${routine.serverId}"`,
|
|
1114
|
+
severity: "error"
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
if (!channelIds.has(routine.channelId)) {
|
|
1118
|
+
errors.push({
|
|
1119
|
+
path: `routines.${routine.routineId}.channelId`,
|
|
1120
|
+
message: `Routine delivery references non-existent channel "${routine.channelId}"`,
|
|
1121
|
+
severity: "error"
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1004
1125
|
return {
|
|
1005
1126
|
valid: errors.filter((e) => e.severity === "error").length === 0,
|
|
1006
1127
|
errors
|
|
@@ -1029,6 +1150,12 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
1029
1150
|
const secrets = {
|
|
1030
1151
|
SHADOW_SERVER_URL: serverUrl
|
|
1031
1152
|
};
|
|
1153
|
+
for (const [serverId, realServerId] of result.servers) {
|
|
1154
|
+
secrets[shadowEnvKey("SHADOW_SERVER", serverId)] = realServerId;
|
|
1155
|
+
}
|
|
1156
|
+
for (const [channelId, realChannelId] of result.channels) {
|
|
1157
|
+
secrets[shadowEnvKey("SHADOW_CHANNEL", channelId)] = realChannelId;
|
|
1158
|
+
}
|
|
1032
1159
|
for (const [buddyId, { token }] of result.buddies) {
|
|
1033
1160
|
const key = shadowobRuntimeTokenEnvKey(buddyId);
|
|
1034
1161
|
secrets[key] = token;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-HUICDC56.js";
|
|
4
4
|
import {
|
|
5
5
|
defineChannelPlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RMDY3W4V.js";
|
|
7
7
|
import "./chunk-R5U7XKVJ.js";
|
|
8
8
|
|
|
9
9
|
// src/plugins/shadowob/manifest.json
|
|
@@ -50,9 +50,9 @@ var manifest_default = {
|
|
|
50
50
|
type: "array",
|
|
51
51
|
description: "Binding rules connecting buddies to agents and channels"
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
greeting: {
|
|
54
54
|
type: "object",
|
|
55
|
-
description: "
|
|
55
|
+
description: "Greeting and entry-channel behavior for provisioned Shadow spaces"
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
},
|
|
@@ -383,11 +383,12 @@ async function provisionChannel(client, serverId, channelDef, state) {
|
|
|
383
383
|
log2.step(` Provisioning channel: ${channelDef.title}`);
|
|
384
384
|
try {
|
|
385
385
|
const channels = await client.getServerChannels(serverId);
|
|
386
|
-
const
|
|
387
|
-
|
|
386
|
+
const expectedKeys = /* @__PURE__ */ new Set([
|
|
387
|
+
...channelMatchKeys(channelDef.title),
|
|
388
|
+
...channelMatchKeys(channelDef.id)
|
|
389
|
+
]);
|
|
388
390
|
const existing = channels.find((c) => {
|
|
389
|
-
|
|
390
|
-
return channelName === expectedName || channelName === expectedId;
|
|
391
|
+
return channelMatchKeys(c.name).some((key) => expectedKeys.has(key));
|
|
391
392
|
});
|
|
392
393
|
if (existing) {
|
|
393
394
|
log2.dim(` Channel "${channelDef.title}" already exists (${existing.id})`);
|
|
@@ -543,30 +544,35 @@ async function processBinding(client, binding, result) {
|
|
|
543
544
|
);
|
|
544
545
|
}
|
|
545
546
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
547
|
+
const policyMode = binding.replyPolicy?.mode ?? "default";
|
|
548
|
+
const policyConfig = {};
|
|
549
|
+
if (binding.replyPolicy?.mode === "custom" && binding.replyPolicy.custom) {
|
|
550
|
+
Object.assign(policyConfig, binding.replyPolicy.custom);
|
|
551
|
+
}
|
|
552
|
+
const channelPolicy = {
|
|
553
|
+
listen: binding.replyPolicy?.mode !== "disabled",
|
|
554
|
+
reply: binding.replyPolicy?.mode !== "disabled",
|
|
555
|
+
mentionOnly: binding.replyPolicy?.mode === "mentionOnly",
|
|
556
|
+
config: policyConfig
|
|
557
|
+
};
|
|
558
|
+
for (const serverConfigId of binding.servers) {
|
|
559
|
+
const serverId = result.servers.get(serverConfigId);
|
|
560
|
+
if (!serverId) continue;
|
|
561
|
+
if (binding.channels.length > 0) {
|
|
557
562
|
try {
|
|
558
563
|
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
559
564
|
channelId: null,
|
|
560
|
-
|
|
561
|
-
reply,
|
|
562
|
-
|
|
565
|
+
listen: false,
|
|
566
|
+
reply: false,
|
|
567
|
+
mentionOnly: false,
|
|
568
|
+
config: {}
|
|
563
569
|
});
|
|
564
570
|
log2.success(
|
|
565
|
-
`
|
|
571
|
+
` Disabled server-wide default for channel-scoped buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
566
572
|
);
|
|
567
573
|
} catch {
|
|
568
574
|
log2.dim(
|
|
569
|
-
` Could not
|
|
575
|
+
` Could not disable server-wide default for buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
570
576
|
);
|
|
571
577
|
}
|
|
572
578
|
for (const channelConfigId of binding.channels) {
|
|
@@ -575,16 +581,33 @@ async function processBinding(client, binding, result) {
|
|
|
575
581
|
try {
|
|
576
582
|
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
577
583
|
channelId,
|
|
578
|
-
|
|
579
|
-
reply,
|
|
580
|
-
config: policyConfig
|
|
584
|
+
...channelPolicy
|
|
581
585
|
});
|
|
582
|
-
|
|
586
|
+
log2.success(
|
|
587
|
+
` Applied channel-scoped replyPolicy "${policyMode}" to buddy "${binding.targetId}" in channel "${channelConfigId}"`
|
|
588
|
+
);
|
|
589
|
+
} catch (err) {
|
|
583
590
|
log2.dim(
|
|
584
|
-
` Could not apply
|
|
591
|
+
` Could not apply channel-scoped replyPolicy for "${channelConfigId}": ${formatErrorMessage(err)}`
|
|
585
592
|
);
|
|
586
593
|
}
|
|
587
594
|
}
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
if (binding.replyPolicy) {
|
|
598
|
+
try {
|
|
599
|
+
await client.upsertPolicy(buddyInfo.agentId, serverId, {
|
|
600
|
+
channelId: null,
|
|
601
|
+
...channelPolicy
|
|
602
|
+
});
|
|
603
|
+
log2.success(
|
|
604
|
+
` Applied replyPolicy "${binding.replyPolicy.mode}" to buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
605
|
+
);
|
|
606
|
+
} catch {
|
|
607
|
+
log2.dim(
|
|
608
|
+
` Could not apply replyPolicy to buddy "${binding.targetId}" in server "${serverConfigId}"`
|
|
609
|
+
);
|
|
610
|
+
}
|
|
588
611
|
}
|
|
589
612
|
}
|
|
590
613
|
}
|
|
@@ -631,8 +654,14 @@ async function listAccessibleServers(client) {
|
|
|
631
654
|
return [];
|
|
632
655
|
}
|
|
633
656
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
657
|
+
function channelMatchKeys(value) {
|
|
658
|
+
const raw = (value ?? "").toLowerCase().normalize("NFKC").trim().replace(/^#/, "");
|
|
659
|
+
const keys = /* @__PURE__ */ new Set();
|
|
660
|
+
const unicodeKey = raw.replace(/\s+/g, " ");
|
|
661
|
+
if (unicodeKey) keys.add(unicodeKey);
|
|
662
|
+
const asciiSlug = raw.replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
663
|
+
if (asciiSlug) keys.add(asciiSlug);
|
|
664
|
+
return [...keys];
|
|
636
665
|
}
|
|
637
666
|
function formatErrorMessage(err) {
|
|
638
667
|
return err instanceof Error ? err.message : String(err);
|
|
@@ -905,11 +934,26 @@ function buildShadowConfig(context) {
|
|
|
905
934
|
bindings: configBindings
|
|
906
935
|
};
|
|
907
936
|
}
|
|
937
|
+
function normalizeGreetingMessages(greeting) {
|
|
938
|
+
if (!greeting) return [];
|
|
939
|
+
const messages = Array.isArray(greeting.messages) ? [...greeting.messages] : [];
|
|
940
|
+
if (typeof greeting.content === "string") {
|
|
941
|
+
messages.unshift({
|
|
942
|
+
...greeting.channelId ? { channelId: greeting.channelId } : {},
|
|
943
|
+
...greeting.buddyId ? { buddyId: greeting.buddyId } : {},
|
|
944
|
+
content: greeting.content
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
return messages;
|
|
948
|
+
}
|
|
908
949
|
var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig, (api) => {
|
|
909
950
|
api.onBuildPrompt(() => SHADOWOB_CLI_SKILL_INTRO);
|
|
910
951
|
api.onBuildRuntime((context) => {
|
|
911
952
|
const shadowConfig = context.agentConfig;
|
|
912
953
|
const bindings = shadowConfig.bindings?.filter((b) => b.agentId === context.agent.id) ?? [];
|
|
954
|
+
const agentRoutineIds = new Set(
|
|
955
|
+
(context.config.routines ?? []).filter((routine) => routine.enabled !== false && routine.agentId === context.agent.id).map((routine) => routine.id)
|
|
956
|
+
);
|
|
913
957
|
const accounts = bindings.map((binding) => {
|
|
914
958
|
const buddy = shadowConfig.buddies?.find((b) => b.id === binding.targetId);
|
|
915
959
|
if (!buddy) return void 0;
|
|
@@ -931,6 +975,22 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
931
975
|
...binding.replyPolicy ? { replyPolicy: binding.replyPolicy } : {}
|
|
932
976
|
};
|
|
933
977
|
}).filter((account) => Boolean(account));
|
|
978
|
+
const routineDeliveries = (shadowConfig.routines ?? []).filter((binding) => agentRoutineIds.has(binding.routineId)).map((binding) => ({
|
|
979
|
+
routineId: binding.routineId,
|
|
980
|
+
pluginId: "shadowob",
|
|
981
|
+
kind: "channel",
|
|
982
|
+
target: {
|
|
983
|
+
...binding.serverId ? { serverConfigId: binding.serverId } : {},
|
|
984
|
+
channelConfigId: binding.channelId,
|
|
985
|
+
...binding.accountId ? { accountId: binding.accountId } : {},
|
|
986
|
+
...binding.threadId ? { threadId: binding.threadId } : {},
|
|
987
|
+
...binding.serverId ? { serverEnvKey: shadowEnvKey("SHADOW_SERVER", binding.serverId) } : {},
|
|
988
|
+
channelEnvKey: shadowEnvKey("SHADOW_CHANNEL", binding.channelId)
|
|
989
|
+
},
|
|
990
|
+
env: {
|
|
991
|
+
SHADOW_HOME_CHANNEL: shadowEnvRef(shadowEnvKey("SHADOW_CHANNEL", binding.channelId))
|
|
992
|
+
}
|
|
993
|
+
}));
|
|
934
994
|
return {
|
|
935
995
|
openclaw: {
|
|
936
996
|
manifestPatches: [
|
|
@@ -951,7 +1011,8 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
951
1011
|
accounts,
|
|
952
1012
|
defaultAccountEnvKey: accounts[0]?.tokenEnvKey,
|
|
953
1013
|
capabilities: shadowobChannelCapabilities()
|
|
954
|
-
}
|
|
1014
|
+
},
|
|
1015
|
+
...routineDeliveries.length > 0 ? { routineDeliveries } : {}
|
|
955
1016
|
};
|
|
956
1017
|
});
|
|
957
1018
|
api.onValidate((context) => {
|
|
@@ -966,6 +1027,12 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
966
1027
|
const shadowConfig = context.agentConfig;
|
|
967
1028
|
const buddyIds = new Set((shadowConfig.buddies ?? []).map((b) => b.id));
|
|
968
1029
|
const serverIds = new Set((shadowConfig.servers ?? []).map((s) => s.id));
|
|
1030
|
+
const channelIds = new Set(
|
|
1031
|
+
(shadowConfig.servers ?? []).flatMap(
|
|
1032
|
+
(server) => server.channels?.map((channel) => channel.id) ?? []
|
|
1033
|
+
)
|
|
1034
|
+
);
|
|
1035
|
+
const routineIds = new Set((context.config.routines ?? []).map((routine) => routine.id));
|
|
969
1036
|
for (const binding of shadowConfig.bindings ?? []) {
|
|
970
1037
|
if (!buddyIds.has(binding.targetId)) {
|
|
971
1038
|
errors.push({
|
|
@@ -975,6 +1042,37 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
975
1042
|
});
|
|
976
1043
|
}
|
|
977
1044
|
}
|
|
1045
|
+
const greetingMessages = normalizeGreetingMessages(shadowConfig.greeting);
|
|
1046
|
+
if (shadowConfig.greeting?.entryChannelId && !channelIds.has(shadowConfig.greeting.entryChannelId)) {
|
|
1047
|
+
errors.push({
|
|
1048
|
+
path: "greeting.entryChannelId",
|
|
1049
|
+
message: `Greeting entry channel references non-existent channel "${shadowConfig.greeting.entryChannelId}"`,
|
|
1050
|
+
severity: "error"
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
for (const [index, message] of greetingMessages.entries()) {
|
|
1054
|
+
if (message.channelId && !channelIds.has(message.channelId)) {
|
|
1055
|
+
errors.push({
|
|
1056
|
+
path: `greeting.messages.${index}.channelId`,
|
|
1057
|
+
message: `Greeting message references non-existent channel "${message.channelId}"`,
|
|
1058
|
+
severity: "error"
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
if (message.buddyId && !buddyIds.has(message.buddyId)) {
|
|
1062
|
+
errors.push({
|
|
1063
|
+
path: `greeting.messages.${index}.buddyId`,
|
|
1064
|
+
message: `Greeting message references non-existent buddy "${message.buddyId}"`,
|
|
1065
|
+
severity: "error"
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
if (!message.content.trim()) {
|
|
1069
|
+
errors.push({
|
|
1070
|
+
path: `greeting.messages.${index}.content`,
|
|
1071
|
+
message: "Greeting message content is required",
|
|
1072
|
+
severity: "error"
|
|
1073
|
+
});
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
978
1076
|
for (const app of shadowConfig.serverApps ?? []) {
|
|
979
1077
|
if (!serverIds.has(app.serverId)) {
|
|
980
1078
|
errors.push({
|
|
@@ -1000,6 +1098,29 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
1000
1098
|
}
|
|
1001
1099
|
}
|
|
1002
1100
|
}
|
|
1101
|
+
for (const routine of shadowConfig.routines ?? []) {
|
|
1102
|
+
if (!routineIds.has(routine.routineId)) {
|
|
1103
|
+
errors.push({
|
|
1104
|
+
path: `routines.${routine.routineId}`,
|
|
1105
|
+
message: `Routine delivery references non-existent routine "${routine.routineId}"`,
|
|
1106
|
+
severity: "error"
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
if (routine.serverId && !serverIds.has(routine.serverId)) {
|
|
1110
|
+
errors.push({
|
|
1111
|
+
path: `routines.${routine.routineId}.serverId`,
|
|
1112
|
+
message: `Routine delivery references non-existent server "${routine.serverId}"`,
|
|
1113
|
+
severity: "error"
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
if (!channelIds.has(routine.channelId)) {
|
|
1117
|
+
errors.push({
|
|
1118
|
+
path: `routines.${routine.routineId}.channelId`,
|
|
1119
|
+
message: `Routine delivery references non-existent channel "${routine.channelId}"`,
|
|
1120
|
+
severity: "error"
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1003
1124
|
return {
|
|
1004
1125
|
valid: errors.filter((e) => e.severity === "error").length === 0,
|
|
1005
1126
|
errors
|
|
@@ -1028,6 +1149,12 @@ var shadowob_default = defineChannelPlugin(manifest_default, buildShadowConfig,
|
|
|
1028
1149
|
const secrets = {
|
|
1029
1150
|
SHADOW_SERVER_URL: serverUrl
|
|
1030
1151
|
};
|
|
1152
|
+
for (const [serverId, realServerId] of result.servers) {
|
|
1153
|
+
secrets[shadowEnvKey("SHADOW_SERVER", serverId)] = realServerId;
|
|
1154
|
+
}
|
|
1155
|
+
for (const [channelId, realChannelId] of result.channels) {
|
|
1156
|
+
secrets[shadowEnvKey("SHADOW_CHANNEL", channelId)] = realChannelId;
|
|
1157
|
+
}
|
|
1031
1158
|
for (const [buddyId, { token }] of result.buddies) {
|
|
1032
1159
|
const key = shadowobRuntimeTokenEnvKey(buddyId);
|
|
1033
1160
|
secrets[key] = token;
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
attachConnectorRuntimeAssets,
|
|
3
3
|
connectorManifest,
|
|
4
4
|
installedCheck
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-PSK2SYZ3.js";
|
|
6
|
+
import "./chunk-OYY64ZSX.js";
|
|
7
7
|
import {
|
|
8
8
|
defineConnectorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RMDY3W4V.js";
|
|
10
10
|
import "./chunk-R5U7XKVJ.js";
|
|
11
11
|
|
|
12
12
|
// src/plugins/sherlock/index.ts
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
attachConnectorRuntimeAssets,
|
|
4
4
|
connectorManifest,
|
|
5
5
|
installedCheck
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-F6CQ6GAG.js";
|
|
7
|
+
import "./chunk-6V7MW4HU.js";
|
|
8
8
|
import {
|
|
9
9
|
defineConnectorPlugin
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y5BJ3EW2.js";
|
|
11
11
|
import "./chunk-AD3JTIU3.js";
|
|
12
12
|
|
|
13
13
|
// src/plugins/sherlock/index.ts
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
connectorManifest,
|
|
6
6
|
installedCheck,
|
|
7
7
|
npmGlobalDependency
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-F6CQ6GAG.js";
|
|
9
|
+
import "./chunk-6V7MW4HU.js";
|
|
10
10
|
import {
|
|
11
11
|
defineConnectorPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y5BJ3EW2.js";
|
|
13
13
|
import "./chunk-AD3JTIU3.js";
|
|
14
14
|
|
|
15
15
|
// src/plugins/shopify/index.ts
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
connectorManifest,
|
|
5
5
|
installedCheck,
|
|
6
6
|
npmGlobalDependency
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-PSK2SYZ3.js";
|
|
8
|
+
import "./chunk-OYY64ZSX.js";
|
|
9
9
|
import {
|
|
10
10
|
defineConnectorPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RMDY3W4V.js";
|
|
12
12
|
import "./chunk-R5U7XKVJ.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/shopify/index.ts
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
connectorManifest,
|
|
5
5
|
installedCheck,
|
|
6
6
|
npmGlobalDependency
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-F6CQ6GAG.js";
|
|
8
|
+
import "./chunk-6V7MW4HU.js";
|
|
9
9
|
import {
|
|
10
10
|
defineConnectorPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y5BJ3EW2.js";
|
|
12
12
|
import "./chunk-AD3JTIU3.js";
|
|
13
13
|
|
|
14
14
|
// src/plugins/skill-discovery/index.ts
|