@shadowob/cloud 1.1.6-dev.311

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.
Files changed (334) hide show
  1. package/README.md +509 -0
  2. package/dist/agent-browser-CERTMCDL.js +117 -0
  3. package/dist/agent-browser-CIRZRIY4.js +118 -0
  4. package/dist/agent-pack-LF3O5TR4.js +1236 -0
  5. package/dist/agent-pack-RQT27V7R.js +1235 -0
  6. package/dist/airtable-BG2Q75G2.js +82 -0
  7. package/dist/airtable-JCQXFM5D.js +83 -0
  8. package/dist/alipay-MZX2XCDB.js +52 -0
  9. package/dist/alipay-TZQI34RB.js +51 -0
  10. package/dist/amap-5RQB3VGC.js +45 -0
  11. package/dist/amap-KPCLZYYL.js +44 -0
  12. package/dist/atlassian-LGOEWYC7.js +54 -0
  13. package/dist/atlassian-TVS2A4IU.js +55 -0
  14. package/dist/baidu-appbuilder-6UMESXHW.js +41 -0
  15. package/dist/baidu-appbuilder-QRRL3ETM.js +42 -0
  16. package/dist/baidu-maps-HEPMVP5D.js +44 -0
  17. package/dist/baidu-maps-HXC4FBVP.js +45 -0
  18. package/dist/baidu-netdisk-G5Q6B5NH.js +45 -0
  19. package/dist/baidu-netdisk-RS2K5W2M.js +44 -0
  20. package/dist/baidu-smartprogram-EWTK5WKK.js +41 -0
  21. package/dist/baidu-smartprogram-JHD3XWF6.js +40 -0
  22. package/dist/browserbase-IUIYVYI7.js +67 -0
  23. package/dist/browserbase-JFO2PCIA.js +68 -0
  24. package/dist/canva-3YOFL7JS.js +62 -0
  25. package/dist/canva-FMYN65SM.js +61 -0
  26. package/dist/chunk-6P2K6QZR.js +529 -0
  27. package/dist/chunk-7VMRQ7MG.js +90 -0
  28. package/dist/chunk-AD3JTIU3.js +17 -0
  29. package/dist/chunk-BF6CV2Y4.js +64 -0
  30. package/dist/chunk-CTNUKOQE.js +439 -0
  31. package/dist/chunk-EEFMJYKB.js +97 -0
  32. package/dist/chunk-EJKFQ35I.js +739 -0
  33. package/dist/chunk-HUICDC56.js +62 -0
  34. package/dist/chunk-JUPAE5IA.js +527 -0
  35. package/dist/chunk-JY2HTT7Q.js +437 -0
  36. package/dist/chunk-KEPTCLUO.js +121 -0
  37. package/dist/chunk-KKK5H7YX.js +3622 -0
  38. package/dist/chunk-POSVEKIY.js +210 -0
  39. package/dist/chunk-QET4LT4J.js +5769 -0
  40. package/dist/chunk-QV4XWO3P.js +30 -0
  41. package/dist/chunk-R52J3PH2.js +120 -0
  42. package/dist/chunk-R5U7XKVJ.js +16 -0
  43. package/dist/chunk-RECNVWMT.js +212 -0
  44. package/dist/chunk-RTPBU5HF.js +92 -0
  45. package/dist/chunk-SUZ2ATT6.js +5774 -0
  46. package/dist/chunk-SVMXSIMG.js +98 -0
  47. package/dist/chunk-TV3CBM7R.js +28 -0
  48. package/dist/chunk-V2LU736V.js +3495 -0
  49. package/dist/chunk-ZUYL3W53.js +741 -0
  50. package/dist/claude-plugin-577TAQVS.js +1463 -0
  51. package/dist/claude-plugin-L3MXJJ6J.js +1464 -0
  52. package/dist/cli.js +7021 -0
  53. package/dist/cloudflare-HBBABPK6.js +114 -0
  54. package/dist/cloudflare-RDFPKMM5.js +115 -0
  55. package/dist/cnb-FLP3QX46.js +44 -0
  56. package/dist/cnb-YAVVEYFB.js +45 -0
  57. package/dist/console/index.html +12 -0
  58. package/dist/console/logo.png +0 -0
  59. package/dist/console/static/css/5079.f9e0918d.css +1 -0
  60. package/dist/console/static/css/index.7f91f806.css +1 -0
  61. package/dist/console/static/font/codicon.5b7d6fac.ttf +0 -0
  62. package/dist/console/static/js/5079.72a51ca2.js +699 -0
  63. package/dist/console/static/js/5079.72a51ca2.js.LICENSE.txt +35 -0
  64. package/dist/console/static/js/7426.f8d483ea.js +1 -0
  65. package/dist/console/static/js/async/1008.4df521b7.js +1 -0
  66. package/dist/console/static/js/async/102.1d473ec7.js +1 -0
  67. package/dist/console/static/js/async/1134.3f9fd9e7.js +1 -0
  68. package/dist/console/static/js/async/1318.4b8e48e7.js +1 -0
  69. package/dist/console/static/js/async/1360.5606da88.js +7 -0
  70. package/dist/console/static/js/async/1546.045f484f.js +1 -0
  71. package/dist/console/static/js/async/1562.187de2a8.js +1 -0
  72. package/dist/console/static/js/async/168.456d4813.js +1 -0
  73. package/dist/console/static/js/async/1750.e6dc2664.js +1 -0
  74. package/dist/console/static/js/async/1994.3fc86066.js +1 -0
  75. package/dist/console/static/js/async/2348.613ae3d9.js +1 -0
  76. package/dist/console/static/js/async/2390.1b890b9d.js +1 -0
  77. package/dist/console/static/js/async/2414.9d040212.js +1 -0
  78. package/dist/console/static/js/async/2454.4c1784ab.js +1 -0
  79. package/dist/console/static/js/async/2498.f5f92030.js +1 -0
  80. package/dist/console/static/js/async/2924.b823cd1a.js +1 -0
  81. package/dist/console/static/js/async/3062.63fddea6.js +1 -0
  82. package/dist/console/static/js/async/3078.dd712008.js +1 -0
  83. package/dist/console/static/js/async/3198.1f307065.js +1 -0
  84. package/dist/console/static/js/async/3246.3d5a899f.js +1 -0
  85. package/dist/console/static/js/async/3286.871676eb.js +1 -0
  86. package/dist/console/static/js/async/342.10bf3b90.js +1 -0
  87. package/dist/console/static/js/async/3446.9681a4d7.js +1 -0
  88. package/dist/console/static/js/async/3698.ccfaabec.js +1 -0
  89. package/dist/console/static/js/async/3790.2a1106a6.js +1 -0
  90. package/dist/console/static/js/async/4231.b29784d4.js +1 -0
  91. package/dist/console/static/js/async/4551.515bd41d.js +1 -0
  92. package/dist/console/static/js/async/4596.40f6e71b.js +1 -0
  93. package/dist/console/static/js/async/4600.4aaebe6d.js +1 -0
  94. package/dist/console/static/js/async/4718.1aae022f.js +1 -0
  95. package/dist/console/static/js/async/4846.a347c020.js +1 -0
  96. package/dist/console/static/js/async/4860.83dadf89.js +1 -0
  97. package/dist/console/static/js/async/500.fcfa37cb.js +1 -0
  98. package/dist/console/static/js/async/5096.b360203d.js +1 -0
  99. package/dist/console/static/js/async/5222.043274fe.js +1 -0
  100. package/dist/console/static/js/async/5362.f498001c.js +1 -0
  101. package/dist/console/static/js/async/54.c94f0755.js +1 -0
  102. package/dist/console/static/js/async/5478.50dd9ef0.js +2 -0
  103. package/dist/console/static/js/async/5478.50dd9ef0.js.LICENSE.txt +3 -0
  104. package/dist/console/static/js/async/5507.a6a1f793.js +1 -0
  105. package/dist/console/static/js/async/5638.bc6b102d.js +1 -0
  106. package/dist/console/static/js/async/5722.e0029049.js +1 -0
  107. package/dist/console/static/js/async/5942.74635c6b.js +1 -0
  108. package/dist/console/static/js/async/5994.1c5629c1.js +1 -0
  109. package/dist/console/static/js/async/6054.6bddf720.js +1 -0
  110. package/dist/console/static/js/async/6118.45e754e5.js +1 -0
  111. package/dist/console/static/js/async/6127.adcbcbb6.js +1 -0
  112. package/dist/console/static/js/async/614.3f434c20.js +1 -0
  113. package/dist/console/static/js/async/6234.ba3b002d.js +1 -0
  114. package/dist/console/static/js/async/6310.6546a9ba.js +1 -0
  115. package/dist/console/static/js/async/6378.9f805419.js +1 -0
  116. package/dist/console/static/js/async/6380.e4433c49.js +1 -0
  117. package/dist/console/static/js/async/6418.f23bcfda.js +1 -0
  118. package/dist/console/static/js/async/6428.77c86114.js +1 -0
  119. package/dist/console/static/js/async/6443.83318a6c.js +1 -0
  120. package/dist/console/static/js/async/6508.2b445d62.js +3 -0
  121. package/dist/console/static/js/async/6542.e82a26c8.js +1 -0
  122. package/dist/console/static/js/async/6544.62111ecb.js +1 -0
  123. package/dist/console/static/js/async/6612.a0c9fcf4.js +1 -0
  124. package/dist/console/static/js/async/6740.695aebf0.js +1 -0
  125. package/dist/console/static/js/async/6822.dbbb32bc.js +1 -0
  126. package/dist/console/static/js/async/6824.ad3540ab.js +1 -0
  127. package/dist/console/static/js/async/6930.585dab94.js +1 -0
  128. package/dist/console/static/js/async/6982.c81b95e6.js +1 -0
  129. package/dist/console/static/js/async/7046.ab2378c1.js +1 -0
  130. package/dist/console/static/js/async/7110.a603277f.js +1 -0
  131. package/dist/console/static/js/async/7142.4a21366f.js +1 -0
  132. package/dist/console/static/js/async/7348.15cc6148.js +1373 -0
  133. package/dist/console/static/js/async/7348.15cc6148.js.LICENSE.txt +14 -0
  134. package/dist/console/static/js/async/7374.b1ac5c44.js +1 -0
  135. package/dist/console/static/js/async/742.847f17ca.js +1 -0
  136. package/dist/console/static/js/async/7446.743954d8.js +1 -0
  137. package/dist/console/static/js/async/7673.59bbbaac.js +1 -0
  138. package/dist/console/static/js/async/7684.c5760c8c.js +1 -0
  139. package/dist/console/static/js/async/7714.c30d0f94.js +1 -0
  140. package/dist/console/static/js/async/8118.36d5a3bf.js +298 -0
  141. package/dist/console/static/js/async/8145.4bcf043a.js +1 -0
  142. package/dist/console/static/js/async/8246.408de938.js +1 -0
  143. package/dist/console/static/js/async/8390.bdae1f7d.js +1 -0
  144. package/dist/console/static/js/async/8422.fd94dbe1.js +1 -0
  145. package/dist/console/static/js/async/8434.94a0e2ae.js +1 -0
  146. package/dist/console/static/js/async/8518.3158de13.js +1 -0
  147. package/dist/console/static/js/async/8564.fc2eb841.js +1 -0
  148. package/dist/console/static/js/async/8678.73af4c9b.js +1 -0
  149. package/dist/console/static/js/async/8694.79747168.js +1 -0
  150. package/dist/console/static/js/async/8756.1de37b83.js +1 -0
  151. package/dist/console/static/js/async/8804.7fe6bdf9.js +3 -0
  152. package/dist/console/static/js/async/8883.e717ee94.js +1 -0
  153. package/dist/console/static/js/async/8886.fe6e876c.js +1 -0
  154. package/dist/console/static/js/async/9030.fc1ae402.js +1 -0
  155. package/dist/console/static/js/async/9094.5598d084.js +1 -0
  156. package/dist/console/static/js/async/9218.ee7b84b7.js +1 -0
  157. package/dist/console/static/js/async/94.9b80bc35.js +1 -0
  158. package/dist/console/static/js/async/9526.92aba34c.js +1 -0
  159. package/dist/console/static/js/async/9762.f83bc4f3.js +1 -0
  160. package/dist/console/static/js/async/984.e11c113a.js +1 -0
  161. package/dist/console/static/js/async/9846.246653cd.js +1 -0
  162. package/dist/console/static/js/index.4487e1ff.js +1 -0
  163. package/dist/console/static/js/lib-react.15d7ca9a.js +2 -0
  164. package/dist/console/static/js/lib-react.15d7ca9a.js.LICENSE.txt +49 -0
  165. package/dist/coze-C6PMDPBI.js +49 -0
  166. package/dist/coze-E6VGRNLV.js +48 -0
  167. package/dist/dashboard.command-J7XOZNXU.js +8 -0
  168. package/dist/dashboard.command-RV2NHDKW.js +7 -0
  169. package/dist/dingtalk-JNRNRN7E.js +77 -0
  170. package/dist/dingtalk-WZGGIAHJ.js +76 -0
  171. package/dist/douyin-miniprogram-AIJPPIZH.js +41 -0
  172. package/dist/douyin-miniprogram-HCYZ5NBW.js +42 -0
  173. package/dist/figma-2YYNSCDX.js +103 -0
  174. package/dist/figma-RYOBMENP.js +102 -0
  175. package/dist/firebase-2IJDDBXX.js +112 -0
  176. package/dist/firebase-OYSY6HPT.js +111 -0
  177. package/dist/firecrawl-2T3SBUW7.js +66 -0
  178. package/dist/firecrawl-IYYXLAZM.js +65 -0
  179. package/dist/flyai-7FJ4TRAG.js +81 -0
  180. package/dist/flyai-QS5Q6FJR.js +82 -0
  181. package/dist/gitagent-MWI75OIX.js +725 -0
  182. package/dist/gitagent-YBMWY7NZ.js +726 -0
  183. package/dist/gitee-3N7OFOM7.js +53 -0
  184. package/dist/gitee-KVNK6KLZ.js +54 -0
  185. package/dist/github-LUEC2LID.js +143 -0
  186. package/dist/github-XRO5Z3GC.js +142 -0
  187. package/dist/google-ads-A3QAJI4D.js +88 -0
  188. package/dist/google-ads-VPKWTX67.js +89 -0
  189. package/dist/google-analytics-C4UR5ZR2.js +50 -0
  190. package/dist/google-analytics-XDYZA2B7.js +49 -0
  191. package/dist/google-workspace-LL3EWVHH.js +320 -0
  192. package/dist/google-workspace-YX35SHHX.js +321 -0
  193. package/dist/huawei-xiaoyi-6BSMGJHR.js +40 -0
  194. package/dist/huawei-xiaoyi-KPWLTSHB.js +41 -0
  195. package/dist/hubspot-DIUHGEDI.js +45 -0
  196. package/dist/hubspot-FTIEMNZO.js +44 -0
  197. package/dist/huggingface-MJCOXA7E.js +116 -0
  198. package/dist/huggingface-UUXK2RHK.js +117 -0
  199. package/dist/index.d.ts +3013 -0
  200. package/dist/index.js +15649 -0
  201. package/dist/inference-ai-image-generation-CMI6R5T3.js +106 -0
  202. package/dist/inference-ai-image-generation-PXV6IG4U.js +107 -0
  203. package/dist/inference-sh-7AZOLEFI.js +94 -0
  204. package/dist/inference-sh-ABQOD3YF.js +95 -0
  205. package/dist/init.command-6E24K4H3.js +9 -0
  206. package/dist/init.command-O4HG4HKR.js +10 -0
  207. package/dist/klaviyo-6K5YEFNH.js +45 -0
  208. package/dist/klaviyo-LDPBWBSS.js +44 -0
  209. package/dist/kuaidi100-HGFM5VK2.js +42 -0
  210. package/dist/kuaidi100-UHPFCVXP.js +41 -0
  211. package/dist/lark-6LNA3LUQ.js +103 -0
  212. package/dist/lark-URVBZNS4.js +102 -0
  213. package/dist/linear-7QFSFPOD.js +57 -0
  214. package/dist/linear-T4ORUP7N.js +56 -0
  215. package/dist/lovart-PDUXRUHJ.js +99 -0
  216. package/dist/lovart-QO3SK55T.js +100 -0
  217. package/dist/meta-ads-SCNFI45S.js +42 -0
  218. package/dist/meta-ads-V6XPZWX3.js +41 -0
  219. package/dist/miclaw-5CNTW7VV.js +36 -0
  220. package/dist/miclaw-TPPPS2WN.js +35 -0
  221. package/dist/model-provider-AVSFJSZP.js +393 -0
  222. package/dist/model-provider-KFB76XV5.js +392 -0
  223. package/dist/notion-FZK76MN2.js +69 -0
  224. package/dist/notion-WFA7KGZZ.js +70 -0
  225. package/dist/oceanengine-3JZUS3PP.js +43 -0
  226. package/dist/oceanengine-5BRIJVJE.js +42 -0
  227. package/dist/opencli-PFXHGCS2.js +81 -0
  228. package/dist/opencli-VIGRJTGH.js +80 -0
  229. package/dist/paypal-33UADIPR.js +54 -0
  230. package/dist/paypal-Z5JYHIWD.js +55 -0
  231. package/dist/playwright-MG5WHK47.js +58 -0
  232. package/dist/playwright-SQAQ3DZG.js +59 -0
  233. package/dist/plugins-HZBWK3WQ.js +120 -0
  234. package/dist/plugins-I4GD5SZX.js +121 -0
  235. package/dist/posthog-MU5MAJOQ.js +79 -0
  236. package/dist/posthog-RJRRKDWB.js +80 -0
  237. package/dist/salesforce-34FVIJTG.js +82 -0
  238. package/dist/salesforce-3QZ6OFVO.js +83 -0
  239. package/dist/sentry-MCIRMACU.js +111 -0
  240. package/dist/sentry-PIWW46VA.js +110 -0
  241. package/dist/seo-suite-4SQ3I67Q.js +54 -0
  242. package/dist/seo-suite-WJXMA3S4.js +55 -0
  243. package/dist/serve.command-5FMIPQRY.js +10 -0
  244. package/dist/serve.command-DNE6GPMK.js +9 -0
  245. package/dist/shadowob-JELOWHWX.js +1068 -0
  246. package/dist/shadowob-PRSMI5MW.js +1069 -0
  247. package/dist/sherlock-2PKY2E2Y.js +66 -0
  248. package/dist/sherlock-C5ZWPPVT.js +67 -0
  249. package/dist/shopify-GL3NFVGE.js +94 -0
  250. package/dist/shopify-R4G3UXM6.js +93 -0
  251. package/dist/skill-discovery-7INAUP4D.js +77 -0
  252. package/dist/skill-discovery-YPXXV622.js +78 -0
  253. package/dist/state-7MCZBTR5.js +17 -0
  254. package/dist/state-FGOFLFBE.js +18 -0
  255. package/dist/stripe-C22RR4ZS.js +83 -0
  256. package/dist/stripe-LJNPQ3CQ.js +82 -0
  257. package/dist/supabase-IRNQ54FJ.js +98 -0
  258. package/dist/supabase-N4ONFJNQ.js +97 -0
  259. package/dist/taobao-aipaas-LRR4GMO3.js +45 -0
  260. package/dist/taobao-aipaas-RVKORSF4.js +46 -0
  261. package/dist/tapd-3JPVJ7XH.js +46 -0
  262. package/dist/tapd-TMQRSMFG.js +47 -0
  263. package/dist/tencent-ads-IGD33LO7.js +42 -0
  264. package/dist/tencent-ads-UHC6OPBV.js +43 -0
  265. package/dist/tencent-docs-C3A4J3CJ.js +47 -0
  266. package/dist/tencent-docs-O2SC4FHL.js +48 -0
  267. package/dist/tencent-maps-HMMWMNF4.js +37 -0
  268. package/dist/tencent-maps-OQOKHVW2.js +36 -0
  269. package/dist/vercel-KOXDDTHX.js +73 -0
  270. package/dist/vercel-OLNVDWMG.js +74 -0
  271. package/dist/webflow-FULU5Q2I.js +114 -0
  272. package/dist/webflow-OMJKZM54.js +115 -0
  273. package/dist/wechat-miniprogram-skyline-KYCDMQNW.js +74 -0
  274. package/dist/wechat-miniprogram-skyline-VR4FVIQL.js +75 -0
  275. package/dist/wechat-pay-BCMAJ6UW.js +50 -0
  276. package/dist/wechat-pay-YQQKXVUI.js +51 -0
  277. package/dist/wonda-NGWIORYN.js +81 -0
  278. package/dist/wonda-RBABXFNM.js +82 -0
  279. package/dist/wordpress-woocommerce-RDIUTHYT.js +57 -0
  280. package/dist/wordpress-woocommerce-RNA5HB3N.js +58 -0
  281. package/dist/wps-DAEFQHDE.js +47 -0
  282. package/dist/wps-LUWHMZQQ.js +48 -0
  283. package/dist/yuque-HCHTJWNI.js +72 -0
  284. package/dist/yuque-KRH5O74J.js +71 -0
  285. package/images/RUNNERS.md +270 -0
  286. package/images/cc-connect-runner/entrypoint.mjs +311 -0
  287. package/images/claude-runner/Dockerfile +88 -0
  288. package/images/claude-runner/RUNNER.md +222 -0
  289. package/images/claude-runner/entrypoint.mjs +2 -0
  290. package/images/codex-runner/Dockerfile +87 -0
  291. package/images/codex-runner/RUNNER.md +226 -0
  292. package/images/codex-runner/entrypoint.mjs +2 -0
  293. package/images/gemini-runner/Dockerfile +87 -0
  294. package/images/gemini-runner/RUNNER.md +218 -0
  295. package/images/gemini-runner/entrypoint.mjs +2 -0
  296. package/images/hermes-runner/Dockerfile +74 -0
  297. package/images/hermes-runner/RUNNER.md +243 -0
  298. package/images/hermes-runner/entrypoint.mjs +283 -0
  299. package/images/openclaw-runner/Dockerfile +212 -0
  300. package/images/openclaw-runner/RUNNER.md +170 -0
  301. package/images/openclaw-runner/entrypoint.mjs +1113 -0
  302. package/images/openclaw-runner/warm-runtime-deps.mjs +95 -0
  303. package/images/opencode-runner/Dockerfile +87 -0
  304. package/images/opencode-runner/RUNNER.md +202 -0
  305. package/images/opencode-runner/entrypoint.mjs +2 -0
  306. package/package.json +121 -0
  307. package/templates/agent-marketplace-buddy.template.json +131 -0
  308. package/templates/ai-werewolf.template.json +92 -0
  309. package/templates/bmad-method-buddy.template.json +123 -0
  310. package/templates/brain-fix.template.json +92 -0
  311. package/templates/claude-ads-buddy.template.json +123 -0
  312. package/templates/claude-financial-services-buddy.template.json +111 -0
  313. package/templates/claude-seo-buddy.template.json +123 -0
  314. package/templates/code-arena.template.json +92 -0
  315. package/templates/daily-brief.template.json +92 -0
  316. package/templates/e-wife.template.json +92 -0
  317. package/templates/everything-claude-code-buddy.template.json +125 -0
  318. package/templates/financial-freedom.template.json +92 -0
  319. package/templates/gitstory.template.json +92 -0
  320. package/templates/google-workspace-buddy.template.json +88 -0
  321. package/templates/gsd-buddy.template.json +119 -0
  322. package/templates/gstack-buddy.template.json +143 -0
  323. package/templates/gstack.template.json +92 -0
  324. package/templates/little-match-girl.template.json +114 -0
  325. package/templates/lovart-buddy.template.json +110 -0
  326. package/templates/marketingskills-buddy.template.json +102 -0
  327. package/templates/retire-buddy.template.json +92 -0
  328. package/templates/scientific-skills-buddy.template.json +119 -0
  329. package/templates/seomachine-buddy.template.json +113 -0
  330. package/templates/shadow-server-app-demo.template.json +105 -0
  331. package/templates/slavingia-skills-buddy.template.json +102 -0
  332. package/templates/superclaude-buddy.template.json +146 -0
  333. package/templates/superpowers-buddy.template.json +108 -0
  334. package/templates/world-pulse.template.json +92 -0
@@ -0,0 +1,62 @@
1
+ // src/utils/logger.ts
2
+ import * as chalkModule from "chalk";
3
+ function identity(text) {
4
+ return text;
5
+ }
6
+ var passthroughChalk = {
7
+ blue: identity,
8
+ green: identity,
9
+ yellow: identity,
10
+ red: identity,
11
+ cyan: identity,
12
+ dim: identity,
13
+ bold: identity
14
+ };
15
+ function isObjectLike(value) {
16
+ return typeof value === "object" && value !== null || typeof value === "function";
17
+ }
18
+ function isChalkFormatter(value) {
19
+ if (!isObjectLike(value)) return false;
20
+ return typeof value.blue === "function" && typeof value.green === "function" && typeof value.yellow === "function" && typeof value.red === "function" && typeof value.cyan === "function" && typeof value.dim === "function" && typeof value.bold === "function";
21
+ }
22
+ function resolveChalkFormatter(moduleLike) {
23
+ const queue = [moduleLike];
24
+ const seen = /* @__PURE__ */ new Set();
25
+ while (queue.length > 0) {
26
+ const candidate = queue.shift();
27
+ if (!candidate || seen.has(candidate)) continue;
28
+ seen.add(candidate);
29
+ if (isChalkFormatter(candidate)) {
30
+ return candidate;
31
+ }
32
+ if (isObjectLike(candidate) && "default" in candidate) {
33
+ queue.push(candidate.default);
34
+ }
35
+ }
36
+ return passthroughChalk;
37
+ }
38
+ var chalk = resolveChalkFormatter(chalkModule);
39
+ var log = {
40
+ info: (msg) => console.log(chalk.blue("\u2139"), msg),
41
+ success: (msg) => console.log(chalk.green("\u2713"), msg),
42
+ warn: (msg) => console.log(chalk.yellow("\u26A0"), msg),
43
+ error: (msg) => console.error(chalk.red("\u2717"), msg),
44
+ step: (msg) => console.log(chalk.cyan("\u25B8"), msg),
45
+ dim: (msg) => console.log(chalk.dim(msg)),
46
+ table: (rows) => {
47
+ if (rows.length === 0) return;
48
+ const keys = Object.keys(rows[0]);
49
+ const widths = keys.map((k) => Math.max(k.length, ...rows.map((r) => (r[k] ?? "").length)));
50
+ const header = keys.map((k, i) => k.padEnd(widths[i])).join(" ");
51
+ const separator = widths.map((w) => "\u2500".repeat(w)).join("\u2500\u2500");
52
+ console.log(chalk.bold(header));
53
+ console.log(chalk.dim(separator));
54
+ for (const row of rows) {
55
+ console.log(keys.map((k, i) => (row[k] ?? "").padEnd(widths[i])).join(" "));
56
+ }
57
+ }
58
+ };
59
+
60
+ export {
61
+ log
62
+ };
@@ -0,0 +1,527 @@
1
+ // src/plugins/registry.ts
2
+ function createPluginRegistry() {
3
+ const plugins = /* @__PURE__ */ new Map();
4
+ return {
5
+ get size() {
6
+ return plugins.size;
7
+ },
8
+ register(plugin) {
9
+ const { id } = plugin.manifest;
10
+ if (plugins.has(id)) {
11
+ throw new Error(`Plugin "${id}" is already registered`);
12
+ }
13
+ plugins.set(id, plugin);
14
+ },
15
+ get(id) {
16
+ return plugins.get(id);
17
+ },
18
+ getAll() {
19
+ return [...plugins.values()];
20
+ },
21
+ getByCategory(category) {
22
+ return [...plugins.values()].filter((p) => p.manifest.category === category);
23
+ },
24
+ getByCapability(cap) {
25
+ return [...plugins.values()].filter((p) => p.manifest.capabilities.includes(cap));
26
+ },
27
+ search(query) {
28
+ const q = query.toLowerCase();
29
+ return [...plugins.values()].filter((p) => {
30
+ const m = p.manifest;
31
+ return m.name.toLowerCase().includes(q) || m.description.toLowerCase().includes(q) || m.id.toLowerCase().includes(q) || m.tags.some((t) => t.toLowerCase().includes(q));
32
+ });
33
+ }
34
+ };
35
+ }
36
+ var _globalRegistry = null;
37
+ function getPluginRegistry() {
38
+ if (!_globalRegistry) {
39
+ _globalRegistry = createPluginRegistry();
40
+ }
41
+ return _globalRegistry;
42
+ }
43
+ function resetPluginRegistry() {
44
+ _globalRegistry = null;
45
+ }
46
+
47
+ // src/plugins/loader.ts
48
+ import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport";
49
+ import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema";
50
+ var validatePluginManifest = (() => {
51
+ const _iv1 = /* @__PURE__ */ new Set(["communication", "project-management", "ai-provider", "devops", "database", "productivity", "automation", "crm", "finance", "analytics", "media", "email", "calendar", "search", "code", "other"]);
52
+ const _iv3 = /* @__PURE__ */ new Set(["channel", "tool", "notification", "webhook", "data-source", "action", "auth-provider", "skill", "cli", "mcp", "config-builder", "config-resolver"]);
53
+ const _vv7 = /* @__PURE__ */ new Set(["communication", "project-management", "ai-provider", "devops", "database", "productivity", "automation", "crm", "finance", "analytics", "media", "email", "calendar", "search", "code", "other"]);
54
+ const _vv9 = /* @__PURE__ */ new Set(["channel", "tool", "notification", "webhook", "data-source", "action", "auth-provider", "skill", "cli", "mcp", "config-builder", "config-resolver"]);
55
+ const _io0 = (input) => "string" === typeof input.id && "string" === typeof input.name && "string" === typeof input.description && "string" === typeof input.version && true === _iv1.has(input.category) && "string" === typeof input.icon && (void 0 === input.website || "string" === typeof input.website) && (void 0 === input.docs || "string" === typeof input.docs) && ("object" === typeof input.auth && null !== input.auth && _io1(input.auth)) && (void 0 === input.config || "object" === typeof input.config && null !== input.config && false === Array.isArray(input.config) && _io4(input.config)) && (Array.isArray(input.capabilities) && input.capabilities.every((elem) => true === _iv3.has(elem))) && (Array.isArray(input.tags) && input.tags.every((elem) => "string" === typeof elem)) && (void 0 === input.popularity || "number" === typeof input.popularity);
56
+ const _io1 = (input) => ("oauth2" === input.type || "api-key" === input.type || "token" === input.type || "basic" === input.type || "none" === input.type) && (Array.isArray(input.fields) && input.fields.every((elem) => "object" === typeof elem && null !== elem && _io2(elem))) && (void 0 === input.oauth || "object" === typeof input.oauth && null !== input.oauth && _io3(input.oauth));
57
+ const _io2 = (input) => "string" === typeof input.key && "string" === typeof input.label && (void 0 === input.description || "string" === typeof input.description) && "boolean" === typeof input.required && "boolean" === typeof input.sensitive && (void 0 === input.placeholder || "string" === typeof input.placeholder) && (void 0 === input.validation || "string" === typeof input.validation) && (void 0 === input.helpUrl || "string" === typeof input.helpUrl);
58
+ const _io3 = (input) => "string" === typeof input.authorizationUrl && "string" === typeof input.tokenUrl && (Array.isArray(input.scopes) && input.scopes.every((elem) => "string" === typeof elem)) && (void 0 === input.pkce || "boolean" === typeof input.pkce);
59
+ const _io4 = (input) => Object.keys(input).every((key) => {
60
+ const value = input[key];
61
+ if (void 0 === value)
62
+ return true;
63
+ return true;
64
+ });
65
+ const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
66
+ path: _path + ".id",
67
+ expected: "string",
68
+ value: input.id
69
+ }), "string" === typeof input.name || _report(_exceptionable, {
70
+ path: _path + ".name",
71
+ expected: "string",
72
+ value: input.name
73
+ }), "string" === typeof input.description || _report(_exceptionable, {
74
+ path: _path + ".description",
75
+ expected: "string",
76
+ value: input.description
77
+ }), "string" === typeof input.version || _report(_exceptionable, {
78
+ path: _path + ".version",
79
+ expected: "string",
80
+ value: input.version
81
+ }), true === _vv7.has(input.category) || _report(_exceptionable, {
82
+ path: _path + ".category",
83
+ expected: '("ai-provider" | "analytics" | "automation" | "calendar" | "code" | "communication" | "crm" | "database" | "devops" | "email" | "finance" | "media" | "other" | "productivity" | "project-management" | "search")',
84
+ value: input.category
85
+ }), "string" === typeof input.icon || _report(_exceptionable, {
86
+ path: _path + ".icon",
87
+ expected: "string",
88
+ value: input.icon
89
+ }), void 0 === input.website || "string" === typeof input.website || _report(_exceptionable, {
90
+ path: _path + ".website",
91
+ expected: "(string | undefined)",
92
+ value: input.website
93
+ }), void 0 === input.docs || "string" === typeof input.docs || _report(_exceptionable, {
94
+ path: _path + ".docs",
95
+ expected: "(string | undefined)",
96
+ value: input.docs
97
+ }), ("object" === typeof input.auth && null !== input.auth || _report(_exceptionable, {
98
+ path: _path + ".auth",
99
+ expected: "PluginAuth",
100
+ value: input.auth
101
+ })) && _vo1(input.auth, _path + ".auth", _exceptionable) || _report(_exceptionable, {
102
+ path: _path + ".auth",
103
+ expected: "PluginAuth",
104
+ value: input.auth
105
+ }), void 0 === input.config || ("object" === typeof input.config && null !== input.config && false === Array.isArray(input.config) || _report(_exceptionable, {
106
+ path: _path + ".config",
107
+ expected: "(Record<string, unknown> | undefined)",
108
+ value: input.config
109
+ })) && _vo4(input.config, _path + ".config", _exceptionable) || _report(_exceptionable, {
110
+ path: _path + ".config",
111
+ expected: "(Record<string, unknown> | undefined)",
112
+ value: input.config
113
+ }), (Array.isArray(input.capabilities) || _report(_exceptionable, {
114
+ path: _path + ".capabilities",
115
+ expected: "Array<PluginCapability>",
116
+ value: input.capabilities
117
+ })) && input.capabilities.map((elem, _index8) => true === _vv9.has(elem) || _report(_exceptionable, {
118
+ path: _path + ".capabilities[" + _index8 + "]",
119
+ expected: '("action" | "auth-provider" | "channel" | "cli" | "config-builder" | "config-resolver" | "data-source" | "mcp" | "notification" | "skill" | "tool" | "webhook")',
120
+ value: elem
121
+ })).every((flag) => flag) || _report(_exceptionable, {
122
+ path: _path + ".capabilities",
123
+ expected: "Array<PluginCapability>",
124
+ value: input.capabilities
125
+ }), (Array.isArray(input.tags) || _report(_exceptionable, {
126
+ path: _path + ".tags",
127
+ expected: "Array<string>",
128
+ value: input.tags
129
+ })) && input.tags.map((elem, _index10) => "string" === typeof elem || _report(_exceptionable, {
130
+ path: _path + ".tags[" + _index10 + "]",
131
+ expected: "string",
132
+ value: elem
133
+ })).every((flag) => flag) || _report(_exceptionable, {
134
+ path: _path + ".tags",
135
+ expected: "Array<string>",
136
+ value: input.tags
137
+ }), void 0 === input.popularity || "number" === typeof input.popularity || _report(_exceptionable, {
138
+ path: _path + ".popularity",
139
+ expected: "(number | undefined)",
140
+ value: input.popularity
141
+ })].every((flag) => flag);
142
+ const _vo1 = (input, _path, _exceptionable = true) => ["oauth2" === input.type || "api-key" === input.type || "token" === input.type || "basic" === input.type || "none" === input.type || _report(_exceptionable, {
143
+ path: _path + ".type",
144
+ expected: '("api-key" | "basic" | "none" | "oauth2" | "token")',
145
+ value: input.type
146
+ }), (Array.isArray(input.fields) || _report(_exceptionable, {
147
+ path: _path + ".fields",
148
+ expected: "Array<PluginAuthField>",
149
+ value: input.fields
150
+ })) && input.fields.map((elem, _index11) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
151
+ path: _path + ".fields[" + _index11 + "]",
152
+ expected: "PluginAuthField",
153
+ value: elem
154
+ })) && _vo2(elem, _path + ".fields[" + _index11 + "]", _exceptionable) || _report(_exceptionable, {
155
+ path: _path + ".fields[" + _index11 + "]",
156
+ expected: "PluginAuthField",
157
+ value: elem
158
+ })).every((flag) => flag) || _report(_exceptionable, {
159
+ path: _path + ".fields",
160
+ expected: "Array<PluginAuthField>",
161
+ value: input.fields
162
+ }), void 0 === input.oauth || ("object" === typeof input.oauth && null !== input.oauth || _report(_exceptionable, {
163
+ path: _path + ".oauth",
164
+ expected: "(PluginOAuthConfig | undefined)",
165
+ value: input.oauth
166
+ })) && _vo3(input.oauth, _path + ".oauth", _exceptionable) || _report(_exceptionable, {
167
+ path: _path + ".oauth",
168
+ expected: "(PluginOAuthConfig | undefined)",
169
+ value: input.oauth
170
+ })].every((flag) => flag);
171
+ const _vo2 = (input, _path, _exceptionable = true) => ["string" === typeof input.key || _report(_exceptionable, {
172
+ path: _path + ".key",
173
+ expected: "string",
174
+ value: input.key
175
+ }), "string" === typeof input.label || _report(_exceptionable, {
176
+ path: _path + ".label",
177
+ expected: "string",
178
+ value: input.label
179
+ }), void 0 === input.description || "string" === typeof input.description || _report(_exceptionable, {
180
+ path: _path + ".description",
181
+ expected: "(string | undefined)",
182
+ value: input.description
183
+ }), "boolean" === typeof input.required || _report(_exceptionable, {
184
+ path: _path + ".required",
185
+ expected: "boolean",
186
+ value: input.required
187
+ }), "boolean" === typeof input.sensitive || _report(_exceptionable, {
188
+ path: _path + ".sensitive",
189
+ expected: "boolean",
190
+ value: input.sensitive
191
+ }), void 0 === input.placeholder || "string" === typeof input.placeholder || _report(_exceptionable, {
192
+ path: _path + ".placeholder",
193
+ expected: "(string | undefined)",
194
+ value: input.placeholder
195
+ }), void 0 === input.validation || "string" === typeof input.validation || _report(_exceptionable, {
196
+ path: _path + ".validation",
197
+ expected: "(string | undefined)",
198
+ value: input.validation
199
+ }), void 0 === input.helpUrl || "string" === typeof input.helpUrl || _report(_exceptionable, {
200
+ path: _path + ".helpUrl",
201
+ expected: "(string | undefined)",
202
+ value: input.helpUrl
203
+ })].every((flag) => flag);
204
+ const _vo3 = (input, _path, _exceptionable = true) => ["string" === typeof input.authorizationUrl || _report(_exceptionable, {
205
+ path: _path + ".authorizationUrl",
206
+ expected: "string",
207
+ value: input.authorizationUrl
208
+ }), "string" === typeof input.tokenUrl || _report(_exceptionable, {
209
+ path: _path + ".tokenUrl",
210
+ expected: "string",
211
+ value: input.tokenUrl
212
+ }), (Array.isArray(input.scopes) || _report(_exceptionable, {
213
+ path: _path + ".scopes",
214
+ expected: "Array<string>",
215
+ value: input.scopes
216
+ })) && input.scopes.map((elem, _index12) => "string" === typeof elem || _report(_exceptionable, {
217
+ path: _path + ".scopes[" + _index12 + "]",
218
+ expected: "string",
219
+ value: elem
220
+ })).every((flag) => flag) || _report(_exceptionable, {
221
+ path: _path + ".scopes",
222
+ expected: "Array<string>",
223
+ value: input.scopes
224
+ }), void 0 === input.pkce || "boolean" === typeof input.pkce || _report(_exceptionable, {
225
+ path: _path + ".pkce",
226
+ expected: "(boolean | undefined)",
227
+ value: input.pkce
228
+ })].every((flag) => flag);
229
+ const _vo4 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map((key) => {
230
+ const value = input[key];
231
+ if (void 0 === value)
232
+ return true;
233
+ return true;
234
+ }).every((flag) => flag)].every((flag) => flag);
235
+ const __is = (input) => "object" === typeof input && null !== input && _io0(input);
236
+ let errors;
237
+ let _report;
238
+ return __typia_transform__createStandardSchema._createStandardSchema((input) => {
239
+ if (false === __is(input)) {
240
+ errors = [];
241
+ _report = __typia_transform__validateReport._validateReport(errors);
242
+ ((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 || _report(true, {
243
+ path: _path + "",
244
+ expected: "PluginManifest",
245
+ value: input2
246
+ })) && _vo0(input2, _path + "", true) || _report(true, {
247
+ path: _path + "",
248
+ expected: "PluginManifest",
249
+ value: input2
250
+ }))(input, "$input", true);
251
+ const success = 0 === errors.length;
252
+ return success ? {
253
+ success,
254
+ data: input
255
+ } : {
256
+ success,
257
+ errors,
258
+ data: input
259
+ };
260
+ }
261
+ return {
262
+ success: true,
263
+ data: input
264
+ };
265
+ });
266
+ })();
267
+ function validateManifest(manifest) {
268
+ return validatePluginManifest(manifest).success;
269
+ }
270
+ function registerPlugin(registry, plugin) {
271
+ if (!validateManifest(plugin.manifest)) {
272
+ console.warn(`Invalid plugin manifest for "${plugin.manifest?.id ?? "unknown"}", skipping`);
273
+ return;
274
+ }
275
+ registry.register(plugin);
276
+ }
277
+ async function loadAllPlugins(registry) {
278
+ const pluginModules = await Promise.all([
279
+ import("./shadowob-JELOWHWX.js"),
280
+ import("./model-provider-KFB76XV5.js"),
281
+ import("./github-XRO5Z3GC.js"),
282
+ import("./google-workspace-LL3EWVHH.js"),
283
+ import("./notion-FZK76MN2.js"),
284
+ import("./stripe-LJNPQ3CQ.js"),
285
+ import("./shopify-R4G3UXM6.js"),
286
+ import("./paypal-33UADIPR.js"),
287
+ import("./agent-browser-CERTMCDL.js"),
288
+ import("./skill-discovery-7INAUP4D.js"),
289
+ import("./opencli-VIGRJTGH.js"),
290
+ import("./inference-sh-7AZOLEFI.js"),
291
+ import("./inference-ai-image-generation-CMI6R5T3.js"),
292
+ import("./wonda-NGWIORYN.js"),
293
+ import("./figma-RYOBMENP.js"),
294
+ import("./canva-FMYN65SM.js"),
295
+ import("./airtable-BG2Q75G2.js"),
296
+ import("./huggingface-MJCOXA7E.js"),
297
+ import("./linear-T4ORUP7N.js"),
298
+ import("./lovart-PDUXRUHJ.js"),
299
+ import("./atlassian-LGOEWYC7.js"),
300
+ import("./sentry-PIWW46VA.js"),
301
+ import("./posthog-MU5MAJOQ.js"),
302
+ import("./sherlock-2PKY2E2Y.js"),
303
+ import("./firebase-OYSY6HPT.js"),
304
+ import("./firecrawl-IYYXLAZM.js"),
305
+ import("./playwright-MG5WHK47.js"),
306
+ import("./browserbase-IUIYVYI7.js"),
307
+ import("./lark-URVBZNS4.js"),
308
+ import("./dingtalk-WZGGIAHJ.js"),
309
+ import("./tencent-docs-C3A4J3CJ.js"),
310
+ import("./wps-DAEFQHDE.js"),
311
+ import("./yuque-KRH5O74J.js"),
312
+ import("./alipay-TZQI34RB.js"),
313
+ import("./wechat-pay-BCMAJ6UW.js"),
314
+ import("./amap-KPCLZYYL.js"),
315
+ import("./baidu-maps-HEPMVP5D.js"),
316
+ import("./tencent-maps-OQOKHVW2.js"),
317
+ import("./flyai-7FJ4TRAG.js"),
318
+ import("./kuaidi100-UHPFCVXP.js"),
319
+ import("./oceanengine-5BRIJVJE.js"),
320
+ import("./tencent-ads-IGD33LO7.js"),
321
+ import("./coze-E6VGRNLV.js"),
322
+ import("./taobao-aipaas-LRR4GMO3.js"),
323
+ import("./baidu-appbuilder-6UMESXHW.js"),
324
+ import("./baidu-netdisk-RS2K5W2M.js"),
325
+ import("./wechat-miniprogram-skyline-KYCDMQNW.js"),
326
+ import("./douyin-miniprogram-AIJPPIZH.js"),
327
+ import("./baidu-smartprogram-JHD3XWF6.js"),
328
+ import("./miclaw-TPPPS2WN.js"),
329
+ import("./huawei-xiaoyi-6BSMGJHR.js"),
330
+ import("./gitee-3N7OFOM7.js"),
331
+ import("./tapd-3JPVJ7XH.js"),
332
+ import("./cnb-FLP3QX46.js"),
333
+ import("./google-ads-A3QAJI4D.js"),
334
+ import("./meta-ads-V6XPZWX3.js"),
335
+ import("./seo-suite-4SQ3I67Q.js"),
336
+ import("./wordpress-woocommerce-RDIUTHYT.js"),
337
+ import("./cloudflare-HBBABPK6.js"),
338
+ import("./claude-plugin-577TAQVS.js"),
339
+ import("./supabase-N4ONFJNQ.js"),
340
+ import("./google-analytics-XDYZA2B7.js"),
341
+ import("./hubspot-FTIEMNZO.js"),
342
+ import("./klaviyo-LDPBWBSS.js"),
343
+ import("./webflow-FULU5Q2I.js"),
344
+ import("./salesforce-34FVIJTG.js"),
345
+ import("./vercel-KOXDDTHX.js"),
346
+ import("./gitagent-MWI75OIX.js"),
347
+ import("./agent-pack-RQT27V7R.js")
348
+ ]);
349
+ for (const mod of pluginModules) {
350
+ const plugin = mod.default;
351
+ if (plugin?.manifest) {
352
+ registerPlugin(registry, plugin);
353
+ }
354
+ }
355
+ }
356
+
357
+ // src/utils/deep-merge.ts
358
+ function deepMerge(base, override) {
359
+ const result = { ...base };
360
+ for (const key of Object.keys(override)) {
361
+ const baseVal = result[key];
362
+ const overVal = override[key];
363
+ if (overVal !== void 0 && typeof baseVal === "object" && baseVal !== null && !Array.isArray(baseVal) && typeof overVal === "object" && overVal !== null && !Array.isArray(overVal)) {
364
+ result[key] = deepMerge(
365
+ baseVal,
366
+ overVal
367
+ );
368
+ } else if (overVal !== void 0) {
369
+ result[key] = overVal;
370
+ }
371
+ }
372
+ return result;
373
+ }
374
+
375
+ // src/plugins/config-merger.ts
376
+ function pluginLoadPaths(value) {
377
+ if (!value || typeof value !== "object" || Array.isArray(value)) return [];
378
+ const load = value.load;
379
+ if (!load || typeof load !== "object" || Array.isArray(load)) return [];
380
+ const paths = load.paths;
381
+ return Array.isArray(paths) ? paths.filter((path) => typeof path === "string" && path.length > 0) : [];
382
+ }
383
+ function mergePluginFragments(base, fragmentOrFragments) {
384
+ const result = { ...base };
385
+ const fragments = Array.isArray(fragmentOrFragments) ? fragmentOrFragments : [fragmentOrFragments];
386
+ for (const fragment of fragments) {
387
+ if (fragment.channels) {
388
+ result.channels = deepMerge(
389
+ result.channels ?? {},
390
+ fragment.channels
391
+ );
392
+ }
393
+ if (fragment.bindings) {
394
+ const existingBindings = result.bindings ?? [];
395
+ result.bindings = [...existingBindings, ...fragment.bindings];
396
+ }
397
+ if (fragment.plugins) {
398
+ if (!result.plugins) result.plugins = {};
399
+ const existingLoadPaths = pluginLoadPaths(result.plugins);
400
+ const fragmentLoadPaths = pluginLoadPaths(fragment.plugins);
401
+ result.plugins = deepMerge(
402
+ result.plugins,
403
+ fragment.plugins
404
+ );
405
+ const mergedLoadPaths = [...existingLoadPaths, ...fragmentLoadPaths];
406
+ if (mergedLoadPaths.length > 0) {
407
+ const plugins = result.plugins;
408
+ plugins.load = {
409
+ ...plugins.load ?? {},
410
+ paths: [...new Set(mergedLoadPaths)]
411
+ };
412
+ }
413
+ }
414
+ if (fragment.skills) {
415
+ if (!result.skills) result.skills = {};
416
+ result.skills = deepMerge(
417
+ result.skills,
418
+ fragment.skills
419
+ );
420
+ }
421
+ if (fragment.tools) {
422
+ if (!result.tools) result.tools = {};
423
+ result.tools = deepMerge(
424
+ result.tools,
425
+ fragment.tools
426
+ );
427
+ }
428
+ if (fragment.agents) {
429
+ const fragmentAgents = fragment.agents;
430
+ const existingAgents = result.agents ?? {};
431
+ if (fragmentAgents.defaults) {
432
+ result.agents = {
433
+ ...existingAgents,
434
+ defaults: deepMerge(
435
+ existingAgents.defaults ?? {},
436
+ fragmentAgents.defaults
437
+ )
438
+ };
439
+ }
440
+ }
441
+ if (fragment.models) {
442
+ if (!result.models) result.models = {};
443
+ result.models = deepMerge(
444
+ result.models,
445
+ fragment.models
446
+ );
447
+ }
448
+ }
449
+ return result;
450
+ }
451
+ function resolveAgentPluginConfig(pluginId, agentId, config) {
452
+ if (config.use?.length) {
453
+ const agent = config.deployments?.agents?.find((a) => a.id === agentId);
454
+ const agentUse = agent?.use;
455
+ const agentEntry = agentUse?.find((e) => e.plugin === pluginId);
456
+ if (agentEntry) return agentEntry.options ?? {};
457
+ const globalEntry = config.use.find((e) => e.plugin === pluginId);
458
+ if (globalEntry) return globalEntry.options ?? {};
459
+ return null;
460
+ }
461
+ const pluginInstanceConfig = config.plugins?.[pluginId];
462
+ if (pluginInstanceConfig) {
463
+ if (pluginInstanceConfig.enabled === false) return null;
464
+ const globalConfig = pluginInstanceConfig.config ?? {};
465
+ const agentOverride = pluginInstanceConfig.agents?.[agentId];
466
+ if (agentOverride?.enabled === false) return null;
467
+ const agentConfig = agentOverride?.config ?? {};
468
+ return { ...globalConfig, ...agentConfig };
469
+ }
470
+ const useEntry = config.use?.find((e) => e.plugin === pluginId);
471
+ if (useEntry) {
472
+ return useEntry.options ?? {};
473
+ }
474
+ return null;
475
+ }
476
+ function resolvePluginSecrets(pluginId, config, processEnv) {
477
+ const pluginInstanceConfig = config.plugins?.[pluginId];
478
+ const secretsMap = pluginInstanceConfig?.secrets ?? {};
479
+ if (!pluginInstanceConfig) {
480
+ const useEntry = config.use?.find((e) => e.plugin === pluginId);
481
+ if (useEntry?.options) {
482
+ for (const [key, val] of Object.entries(useEntry.options)) {
483
+ if (typeof val === "string") {
484
+ const envMatch = val.match(/^\$\{env:(\w+)\}$/);
485
+ if (envMatch?.[1]) {
486
+ const envKey = envMatch[1];
487
+ const envVal = processEnv[envKey];
488
+ if (envVal !== void 0) secretsMap[key] = envVal;
489
+ } else if (/^[A-Z0-9_]+$/.test(key)) {
490
+ secretsMap[key] = val;
491
+ }
492
+ }
493
+ }
494
+ }
495
+ }
496
+ return resolveSecretRefs(secretsMap, processEnv);
497
+ }
498
+ function resolveSecretRefs(secrets, processEnv) {
499
+ const resolved = {};
500
+ for (const [key, ref] of Object.entries(secrets)) {
501
+ const envMatch = ref.match(/^\$\{env:(\w+)\}$/);
502
+ if (envMatch) {
503
+ const envKey = envMatch[1];
504
+ if (!envKey) continue;
505
+ const envVal = processEnv[envKey];
506
+ if (envVal !== void 0) {
507
+ resolved[key] = envVal;
508
+ }
509
+ } else {
510
+ resolved[key] = ref;
511
+ }
512
+ }
513
+ return resolved;
514
+ }
515
+
516
+ export {
517
+ createPluginRegistry,
518
+ getPluginRegistry,
519
+ resetPluginRegistry,
520
+ deepMerge,
521
+ mergePluginFragments,
522
+ resolveAgentPluginConfig,
523
+ resolvePluginSecrets,
524
+ validateManifest,
525
+ registerPlugin,
526
+ loadAllPlugins
527
+ };