@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,1235 @@
1
+ import {
2
+ AGENT_PACK_SLASH_INDEXER_SCRIPT
3
+ } from "./chunk-EJKFQ35I.js";
4
+ import {
5
+ definePlugin
6
+ } from "./chunk-JY2HTT7Q.js";
7
+ import "./chunk-R5U7XKVJ.js";
8
+
9
+ // src/plugins/agent-pack/index.ts
10
+ import * as __typia_transform__validateReport from "typia/lib/internal/_validateReport";
11
+ import * as __typia_transform__createStandardSchema from "typia/lib/internal/_createStandardSchema";
12
+
13
+ // src/plugins/agent-pack/k8s.ts
14
+ var AGENT_PACK_IMAGE = "node:22-bookworm";
15
+ var SLASH_INDEXER_PATH = "/tmp/agent-pack-slash-indexer.mjs";
16
+ var AGENT_PACK_SCRIPT_MOUNT_PATH = "/opt/shadow-agent-pack";
17
+ var AGENT_PACK_HELPER_SECURITY_CONTEXT = {
18
+ runAsNonRoot: true,
19
+ runAsUser: 1e3,
20
+ runAsGroup: 1e3,
21
+ allowPrivilegeEscalation: false,
22
+ capabilities: { drop: ["ALL"] }
23
+ };
24
+ var AGENT_PACK_TOOL_CHECKS = [
25
+ 'command -v git >/dev/null 2>&1 || { echo "[agent-pack] git is missing from helper image" >&2; exit 127; }',
26
+ 'command -v node >/dev/null 2>&1 || { echo "[agent-pack] node is missing from helper image" >&2; exit 127; }'
27
+ ];
28
+ var DEFAULT_INSTRUCTION_FILES = [
29
+ "AGENTS.override.md",
30
+ "AGENTS.md",
31
+ "CLAUDE.md",
32
+ "GEMINI.md",
33
+ ".cursorrules",
34
+ ".windsurfrules",
35
+ ".clinerules"
36
+ ];
37
+ function parsePollInterval(input) {
38
+ if (input == null) return 0;
39
+ if (typeof input === "number") return Math.max(0, Math.floor(input));
40
+ const m = /^(\d+)\s*(s|m|h)?$/.exec(input.trim());
41
+ if (!m) return 0;
42
+ const n = Number(m[1]);
43
+ const unit = m[2] ?? "s";
44
+ switch (unit) {
45
+ case "h":
46
+ return n * 3600;
47
+ case "m":
48
+ return n * 60;
49
+ default:
50
+ return n;
51
+ }
52
+ }
53
+ function sanitizeId(s) {
54
+ return s.replace(/[^A-Za-z0-9._-]/g, "_").slice(0, 63);
55
+ }
56
+ function agentPackSlashCommandsIndexPath(mountPath) {
57
+ return `${mountPath}/.shadow/slash-commands.json`;
58
+ }
59
+ function shQuote(value) {
60
+ return `'${value.replace(/'/g, "'\\''")}'`;
61
+ }
62
+ function buildSlashCommandIndexSnippet(mountPath, options) {
63
+ if (!options?.enabled) return "";
64
+ const rulesJson = JSON.stringify(options.rules ?? []);
65
+ return [
66
+ `cat > ${SLASH_INDEXER_PATH} <<'SHADOW_AGENT_PACK_SLASH_INDEXER'`,
67
+ AGENT_PACK_SLASH_INDEXER_SCRIPT,
68
+ "SHADOW_AGENT_PACK_SLASH_INDEXER",
69
+ [
70
+ `node ${SLASH_INDEXER_PATH}`,
71
+ `--mount-path ${shQuote(mountPath)}`,
72
+ `--output ${shQuote(options.outputPath)}`,
73
+ `--infer-interactions ${options.inferInteractions === false ? "false" : "true"}`,
74
+ `--include-scripts ${options.includeScripts === false ? "false" : "true"}`,
75
+ `--generate-script-skills ${options.generateScriptSkills === false ? "false" : "true"}`,
76
+ `--max-script-commands-per-pack ${Math.max(0, Math.floor(options.maxScriptCommandsPerPack ?? 80))}`,
77
+ `--rules-json ${shQuote(rulesJson)}`
78
+ ].join(" ")
79
+ ].join("\n");
80
+ }
81
+ function buildMountCopySnippet(pack, mount, scratch, destBase) {
82
+ const from = mount.from === "." || mount.from === "" ? scratch : `${scratch}/${mount.from}`;
83
+ const dest = `${destBase}/${mount.kind}`;
84
+ const cmds = [`mkdir -p "${dest}"`];
85
+ switch (mount.kind) {
86
+ case "skills":
87
+ case "commands":
88
+ case "agents": {
89
+ const descriptorName = mount.kind === "agents" ? "AGENT.md" : "SKILL.md";
90
+ const rootSkillSlug = sanitizeId(pack.id);
91
+ const codexAgentSkillWrapper = `printf '%s\\n' '---' 'description: Codex custom agent definition imported from an agent pack.' 'user-invocable: false' '---' '' '# Codex custom agent' '' 'Read the bundled AGENT.toml before using this custom agent definition. Treat it as agent configuration, not as a free-form prompt.' > "${dest}/$slug/SKILL.md"`;
92
+ const descriptorCopies = mount.kind === "agents" ? `case "$f" in *.toml) cp "$f" "${dest}/$slug/AGENT.toml"; ${codexAgentSkillWrapper} ;; *) cp "$f" "${dest}/$slug/${descriptorName}"; cp "$f" "${dest}/$slug/SKILL.md" ;; esac` : `cp "$f" "${dest}/$slug/${descriptorName}"`;
93
+ const stripSkillSuffix = mount.kind === "skills" ? `slug="$(printf '%s' "$slug" | sed 's/-SKILL$//')"; ` : "";
94
+ const normalizeTopLevelFile = `base="$(basename "$f")"; base="\${base%.md}"; base="\${base%.toml}"; if [ "$base" = "SKILL" ]; then slug="${rootSkillSlug}"; else slug="$base"; fi; ${stripSkillSuffix}slug="$(printf '%s' "$slug" | tr -cs 'A-Za-z0-9._-' '-' | sed 's/^-//;s/-$//')"; [ -n "$slug" ] || slug="item"; mkdir -p "${dest}/$slug"; ${descriptorCopies}`;
95
+ const normalizeNestedSkillDir = `d="$(dirname "$f")"; rel="$d"; case "$rel" in "${from}"/*) rel="\${rel#${from}/}" ;; *) rel="$(basename "$d")" ;; esac; slug="$(basename "$d")"; slug="$(printf '%s' "$slug" | sed 's/-SKILL$//' | tr -cs 'A-Za-z0-9._-' '-' | sed 's/^-//;s/-$//')"; [ -n "$slug" ] || slug="${rootSkillSlug}"; if [ -e "${dest}/$slug" ]; then slug="$(printf '%s' "$rel" | sed 's/-SKILL$//' | tr '/ ' '--' | tr -cs 'A-Za-z0-9._-' '-' | sed 's/^-//;s/-$//')"; fi; [ -n "$slug" ] || slug="${rootSkillSlug}"; mkdir -p "${dest}/$slug"; cp -r "$d/." "${dest}/$slug/"`;
96
+ if (mount.include && mount.include.length > 0) {
97
+ for (const name of mount.include) {
98
+ cmds.push(
99
+ `if [ -d "${from}/${name}" ]; then cp -r "${from}/${name}" "${dest}/"; elif [ -f "${from}/${name}" ]; then f="${from}/${name}"; ${normalizeTopLevelFile}; else echo "[agent-pack] missing ${mount.kind} ${name} in ${pack.id}"; fi`
100
+ );
101
+ }
102
+ } else {
103
+ const hasDescriptor = mount.kind === "skills" ? `[ -f "$d/SKILL.md" ]` : mount.kind === "agents" ? `[ -n "$(find "$d" -maxdepth 1 -type f \\( -name '*.md' -o -name '*.toml' \\) -print -quit 2>/dev/null)" ]` : `[ -n "$(find "$d" -maxdepth 1 -type f -name '*.md' -print -quit 2>/dev/null)" ]`;
104
+ cmds.push(
105
+ `find "${from}" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | while read -r d; do if ${hasDescriptor}; then cp -r "$d" "${dest}/"; fi; done`
106
+ );
107
+ if (mount.kind === "skills") {
108
+ cmds.push(
109
+ `if [ -f "${from}/SKILL.md" ]; then mkdir -p "${dest}/${rootSkillSlug}"; cp "${from}/SKILL.md" "${dest}/${rootSkillSlug}/SKILL.md"; fi`
110
+ );
111
+ cmds.push(
112
+ `find "${from}" -mindepth 1 -maxdepth 1 -type f \\( -name 'SKILL.md' -o -name '*-SKILL.md' \\) 2>/dev/null | while read -r f; do ${normalizeTopLevelFile}; done`
113
+ );
114
+ cmds.push(
115
+ `find "${from}" -path '*/.git/*' -prune -o -mindepth 2 -maxdepth 6 -type f -name 'SKILL.md' -print 2>/dev/null | while read -r f; do ${normalizeNestedSkillDir}; done`
116
+ );
117
+ }
118
+ if (mount.kind === "commands" || mount.kind === "agents") {
119
+ const pathSegment = mount.kind;
120
+ const fileGlob = mount.kind === "agents" ? `\\( -name '*.md' -o -name '*.toml' \\)` : `-name '*.md'`;
121
+ cmds.push(
122
+ `find "${from}" -mindepth 1 -maxdepth 1 -type f ${fileGlob} 2>/dev/null | while read -r f; do ${normalizeTopLevelFile}; done`
123
+ );
124
+ cmds.push(
125
+ `find "${from}" -path '*/.git/*' -prune -o -path "*/${pathSegment}/*" -type f ${fileGlob} -print 2>/dev/null | while read -r f; do ${normalizeTopLevelFile}; done`
126
+ );
127
+ }
128
+ }
129
+ break;
130
+ }
131
+ case "instructions": {
132
+ for (const f of pack.instructionFiles) {
133
+ cmds.push(`cp "${scratch}/${f}" "${dest}/" 2>/dev/null || true`);
134
+ }
135
+ if (mount.from !== "." && mount.from !== "") {
136
+ cmds.push(
137
+ `if [ -f "${from}" ]; then cp "${from}" "${dest}/" 2>/dev/null || true; elif [ -d "${from}" ]; then find "${from}" -mindepth 1 -maxdepth 3 -type f \\( -name '*.md' -o -name '*.mdc' -o -name '*.txt' \\) -exec cp {} "${dest}/" \\; 2>/dev/null || true; fi`
138
+ );
139
+ }
140
+ break;
141
+ }
142
+ case "mcp": {
143
+ cmds.push(
144
+ `if [ -f "${from}" ]; then cp "${from}" "${dest}/$(basename "${from}")"; elif [ -d "${from}" ]; then find "${from}" -mindepth 1 -maxdepth 1 -name '*.json' -exec cp {} "${dest}/" \\; ; fi`
145
+ );
146
+ break;
147
+ }
148
+ case "hooks":
149
+ case "scripts":
150
+ case "files": {
151
+ if (mount.include && mount.include.length > 0) {
152
+ for (const name of mount.include) {
153
+ cmds.push(`cp -r "${from}/${name}" "${dest}/" 2>/dev/null || true`);
154
+ }
155
+ } else {
156
+ cmds.push(
157
+ `if [ -d "${from}" ]; then cp -r "${from}/." "${dest}/" 2>/dev/null || true; elif [ -f "${from}" ]; then cp "${from}" "${dest}/" 2>/dev/null || true; fi`
158
+ );
159
+ }
160
+ if (mount.kind === "scripts") {
161
+ cmds.push(`find "${dest}" -type f -exec chmod +x {} \\; 2>/dev/null || true`);
162
+ }
163
+ break;
164
+ }
165
+ }
166
+ return cmds.join(" && ");
167
+ }
168
+ function buildPackCloneSnippet(pack, mountPath) {
169
+ const safeId = sanitizeId(pack.id);
170
+ const scratch = `/tmp/agent-pack-src-${safeId}`;
171
+ const destBase = `${mountPath}/${safeId}`;
172
+ const summary = pack.mounts.map((m) => m.kind).join(",") || "none";
173
+ const lines = [
174
+ `echo "[agent-pack] cloning ${pack.url}@${pack.ref} (mounts: ${summary}) -> ${destBase}"`,
175
+ `rm -rf "${scratch}"`,
176
+ `git clone --depth ${pack.depth} --branch "${pack.ref}" "${pack.url}" "${scratch}"`,
177
+ `mkdir -p "${destBase}"`
178
+ ];
179
+ for (const m of pack.mounts) {
180
+ lines.push(buildMountCopySnippet(pack, m, scratch, destBase));
181
+ }
182
+ const manifest = JSON.stringify({
183
+ id: pack.id,
184
+ url: pack.url,
185
+ ref: pack.ref,
186
+ autoDetect: pack.autoDetect ?? false,
187
+ autoImportProfiles: pack.autoImportProfiles ?? [],
188
+ kinds: pack.mounts.map((m) => m.kind)
189
+ });
190
+ lines.push(`echo '${manifest.replace(/'/g, "'\\''")}' > "${destBase}/.pack.json"`);
191
+ lines.push(`echo "[agent-pack] ${pack.id} ready"`);
192
+ return lines.join(" && ");
193
+ }
194
+ function buildAgentPackInitContainer(packs, mountPath, volumeName, scriptVolumeName, slashCommandIndex) {
195
+ return {
196
+ name: "agent-pack-clone",
197
+ image: AGENT_PACK_IMAGE,
198
+ imagePullPolicy: "IfNotPresent",
199
+ command: ["/bin/sh", `${AGENT_PACK_SCRIPT_MOUNT_PATH}/init.sh`],
200
+ volumeMounts: [
201
+ { name: volumeName, mountPath },
202
+ { name: scriptVolumeName, mountPath: AGENT_PACK_SCRIPT_MOUNT_PATH, readOnly: true }
203
+ ],
204
+ resources: {
205
+ requests: { cpu: "25m", memory: "64Mi" },
206
+ limits: { cpu: "250m", memory: "256Mi" }
207
+ },
208
+ securityContext: AGENT_PACK_HELPER_SECURITY_CONTEXT
209
+ };
210
+ }
211
+ function buildAgentPackSyncSidecar(opts) {
212
+ const { volumeName, scriptVolumeName, intervalSec } = opts;
213
+ if (!intervalSec || intervalSec <= 0) return void 0;
214
+ return {
215
+ name: "agent-pack-sync",
216
+ image: AGENT_PACK_IMAGE,
217
+ imagePullPolicy: "IfNotPresent",
218
+ command: ["/bin/sh", `${AGENT_PACK_SCRIPT_MOUNT_PATH}/sync.sh`],
219
+ volumeMounts: [
220
+ { name: volumeName, mountPath: opts.mountPath },
221
+ { name: scriptVolumeName, mountPath: AGENT_PACK_SCRIPT_MOUNT_PATH, readOnly: true }
222
+ ],
223
+ resources: {
224
+ requests: { cpu: "25m", memory: "64Mi" },
225
+ limits: { cpu: "250m", memory: "256Mi" }
226
+ },
227
+ securityContext: AGENT_PACK_HELPER_SECURITY_CONTEXT
228
+ };
229
+ }
230
+ function buildAgentPackInitScript(packs, mountPath, slashCommandIndex) {
231
+ return [
232
+ "set -e",
233
+ ...AGENT_PACK_TOOL_CHECKS,
234
+ ...packs.map((p) => buildPackCloneSnippet(p, mountPath)),
235
+ buildSlashCommandIndexSnippet(mountPath, slashCommandIndex)
236
+ ].filter(Boolean).join("\n");
237
+ }
238
+ function buildAgentPackSyncScript(opts) {
239
+ const { packs, mountPath, intervalSec, slashCommandIndex } = opts;
240
+ const cloneAll = packs.map((p) => buildPackCloneSnippet(p, mountPath)).join("\n");
241
+ const indexCommands = buildSlashCommandIndexSnippet(mountPath, slashCommandIndex);
242
+ return `
243
+ set -e
244
+ ${AGENT_PACK_TOOL_CHECKS.join("\n")}
245
+ RUN_SCRIPT() {
246
+ ${cloneAll}
247
+ ${indexCommands}
248
+ }
249
+ while true; do
250
+ RUN_SCRIPT || echo "[agent-pack-sync] iteration failed, will retry"
251
+ date -u +%FT%TZ > "${mountPath}/.agent-pack-synced-at" || true
252
+ sleep ${intervalSec}
253
+ done
254
+ `.trim();
255
+ }
256
+
257
+ // src/plugins/agent-pack/manifest.json
258
+ var manifest_default = {
259
+ id: "agent-pack",
260
+ name: "Agent Pack",
261
+ description: "Pure mechanism for pulling AI-agent customisation packs from any git repo at deploy time. Standards-based auto-import handles Agent Skills, Claude Code, Codex, and MCP layouts; templates can opt into scripts or declare exact mounts for repo-specific layouts.",
262
+ version: "1.0.0",
263
+ category: "code",
264
+ icon: "package",
265
+ auth: {
266
+ type: "token",
267
+ fields: [
268
+ {
269
+ key: "GITHUB_TOKEN",
270
+ label: "Git Token (HTTPS)",
271
+ description: "Optional personal access token for private agent-pack repositories",
272
+ required: false,
273
+ sensitive: true,
274
+ placeholder: "ghp_..."
275
+ }
276
+ ]
277
+ },
278
+ config: {
279
+ type: "object",
280
+ properties: {
281
+ packs: {
282
+ type: "array",
283
+ description: "Agent packs to mount into the container",
284
+ items: {
285
+ type: "object",
286
+ properties: {
287
+ id: {
288
+ type: "string",
289
+ description: "Unique pack id within the agent (used for mount subdir). Auto-derived from url when omitted."
290
+ },
291
+ url: { type: "string", description: "Repository URL (HTTPS or SSH). Required." },
292
+ ref: {
293
+ type: "string",
294
+ description: "Branch, tag, or commit SHA. Defaults to 'main'."
295
+ },
296
+ depth: { type: "number", description: "Shallow clone depth. Defaults to 1." },
297
+ autoDetect: {
298
+ type: "boolean",
299
+ description: "Back-compat flag for standards-based auto-import. Defaults to true when mounts are omitted."
300
+ },
301
+ autoImport: {
302
+ description: "Select which standard-compatible layout profiles to import automatically. Defaults to ['standard', 'claude', 'codex', 'mcp'] when mounts are omitted.",
303
+ oneOf: [
304
+ { type: "boolean" },
305
+ {
306
+ type: "string",
307
+ enum: ["standard", "claude", "codex", "mcp", "scripts", "legacy-broad"]
308
+ },
309
+ {
310
+ type: "array",
311
+ items: {
312
+ type: "string",
313
+ enum: ["standard", "claude", "codex", "mcp", "scripts", "legacy-broad"]
314
+ }
315
+ }
316
+ ]
317
+ },
318
+ mounts: {
319
+ type: "array",
320
+ description: "Per-kind mount declarations. Optional when autoDetect is enabled; use this for custom repo layouts.",
321
+ items: {
322
+ type: "object",
323
+ properties: {
324
+ kind: {
325
+ type: "string",
326
+ enum: [
327
+ "skills",
328
+ "commands",
329
+ "instructions",
330
+ "hooks",
331
+ "mcp",
332
+ "scripts",
333
+ "agents",
334
+ "files"
335
+ ],
336
+ description: "Kind of artifact this mount contributes."
337
+ },
338
+ from: {
339
+ type: "string",
340
+ description: "Source path inside the cloned repo. Use '.' for repo root."
341
+ },
342
+ include: {
343
+ type: "array",
344
+ items: { type: "string" },
345
+ description: "Optional whitelist of immediate child names to copy."
346
+ }
347
+ },
348
+ required: ["kind", "from"]
349
+ }
350
+ },
351
+ instructionFiles: {
352
+ type: "array",
353
+ items: { type: "string" },
354
+ description: "Override the curated root-level agent instruction filenames (default: AGENTS.override.md, AGENTS.md, CLAUDE.md, GEMINI.md, and common rule files)."
355
+ },
356
+ tokenSecret: {
357
+ type: "string",
358
+ description: "K8s secret name (or ${env:VAR}) for HTTPS token"
359
+ },
360
+ sshKeySecret: {
361
+ type: "string",
362
+ description: "K8s secret name for SSH private key"
363
+ }
364
+ },
365
+ required: ["url"]
366
+ }
367
+ },
368
+ mountPath: {
369
+ type: "string",
370
+ default: "/agent-packs",
371
+ description: "Container path where pack subdirs are mounted"
372
+ },
373
+ poll: {
374
+ type: "string",
375
+ description: "Optional poll interval (e.g. '5m', '30s', '1h') for live refresh sidecar. Omit to disable."
376
+ },
377
+ slashCommands: {
378
+ type: "object",
379
+ description: "Controls automatic Shadow slash command registration for mounted upstream commands and skills.",
380
+ properties: {
381
+ autoRegister: {
382
+ type: "boolean",
383
+ default: true,
384
+ description: "Register discovered upstream commands with Shadow."
385
+ },
386
+ inferInteractions: {
387
+ type: "boolean",
388
+ default: true,
389
+ description: "Derive form interactions from upstream AskUserQuestion-style markdown."
390
+ },
391
+ includeScripts: {
392
+ type: "boolean",
393
+ default: true,
394
+ description: "Register executable helper scripts from mounted script directories as slash commands."
395
+ },
396
+ generateScriptSkills: {
397
+ type: "boolean",
398
+ default: true,
399
+ description: "Generate lightweight SKILL.md wrappers for discovered scripts so OpenClaw can load script-backed capabilities."
400
+ },
401
+ maxScriptCommandsPerPack: {
402
+ type: "number",
403
+ default: 80,
404
+ description: "Maximum number of script-backed commands to expose per pack."
405
+ },
406
+ rules: {
407
+ type: "array",
408
+ description: "Optional generic command match rules for aliases or explicit interaction metadata.",
409
+ items: { type: "object" }
410
+ }
411
+ }
412
+ }
413
+ }
414
+ },
415
+ capabilities: ["config-builder"],
416
+ tags: ["agent-pack", "skills", "claude", "git", "mechanism", "built-in"],
417
+ popularity: 90
418
+ };
419
+
420
+ // src/plugins/agent-pack/index.ts
421
+ var VOLUME_NAME = "agent-packs";
422
+ var SCRIPT_VOLUME_NAME = "agent-pack-scripts";
423
+ var DEFAULT_MOUNT = "/agent-packs";
424
+ var SKILL_LIKE_KINDS = /* @__PURE__ */ new Set(["skills", "commands", "agents"]);
425
+ var validateAgentPackOptions = (() => {
426
+ const _io0 = (input) => (void 0 === input.packs || Array.isArray(input.packs) && input.packs.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io1(elem))) && (void 0 === input.mountPath || "string" === typeof input.mountPath) && (void 0 === input.poll || "string" === typeof input.poll || "number" === typeof input.poll) && (void 0 === input.slashCommands || "object" === typeof input.slashCommands && null !== input.slashCommands && false === Array.isArray(input.slashCommands) && _io3(input.slashCommands));
427
+ const _io1 = (input) => (void 0 === input.id || "string" === typeof input.id) && (void 0 === input.url || "string" === typeof input.url) && (void 0 === input.ref || "string" === typeof input.ref) && (void 0 === input.depth || "number" === typeof input.depth) && (void 0 === input.autoDetect || "boolean" === typeof input.autoDetect) && (null !== input.autoImport && (void 0 === input.autoImport || "standard" === input.autoImport || "claude" === input.autoImport || "codex" === input.autoImport || "mcp" === input.autoImport || "scripts" === input.autoImport || "legacy-broad" === input.autoImport || "boolean" === typeof input.autoImport || Array.isArray(input.autoImport) && input.autoImport.every((elem) => "standard" === elem || "claude" === elem || "codex" === elem || "mcp" === elem || "scripts" === elem || "legacy-broad" === elem))) && (void 0 === input.mounts || Array.isArray(input.mounts) && input.mounts.every((elem) => "object" === typeof elem && null !== elem && _io2(elem))) && (void 0 === input.instructionFiles || Array.isArray(input.instructionFiles) && input.instructionFiles.every((elem) => "string" === typeof elem));
428
+ const _io2 = (input) => ("mcp" === input.kind || "scripts" === input.kind || "skills" === input.kind || "commands" === input.kind || "instructions" === input.kind || "hooks" === input.kind || "agents" === input.kind || "files" === input.kind) && "string" === typeof input.from && (void 0 === input.include || Array.isArray(input.include) && input.include.every((elem) => "string" === typeof elem));
429
+ const _io3 = (input) => (void 0 === input.autoRegister || "boolean" === typeof input.autoRegister) && (void 0 === input.inferInteractions || "boolean" === typeof input.inferInteractions) && (void 0 === input.includeScripts || "boolean" === typeof input.includeScripts) && (void 0 === input.generateScriptSkills || "boolean" === typeof input.generateScriptSkills) && (void 0 === input.maxScriptCommandsPerPack || "number" === typeof input.maxScriptCommandsPerPack) && (void 0 === input.rules || Array.isArray(input.rules) && input.rules.every((elem) => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _io4(elem)));
430
+ const _io4 = (input) => (void 0 === input.match || "object" === typeof input.match && null !== input.match && false === Array.isArray(input.match) && _io5(input.match)) && (void 0 === input.aliases || Array.isArray(input.aliases) && input.aliases.every((elem) => "string" === typeof elem)) && (void 0 === input.interaction || "object" === typeof input.interaction && null !== input.interaction && _io6(input.interaction));
431
+ const _io5 = (input) => (void 0 === input.packId || "string" === typeof input.packId) && (void 0 === input.name || "string" === typeof input.name) && (void 0 === input.names || Array.isArray(input.names) && input.names.every((elem) => "string" === typeof elem)) && (void 0 === input.namePattern || "string" === typeof input.namePattern) && (null !== input.sourcePathIncludes && (void 0 === input.sourcePathIncludes || "string" === typeof input.sourcePathIncludes || Array.isArray(input.sourcePathIncludes) && input.sourcePathIncludes.every((elem) => "string" === typeof elem)));
432
+ const _io6 = (input) => ("buttons" === input.kind || "select" === input.kind || "form" === input.kind || "approval" === input.kind) && (void 0 === input.id || "string" === typeof input.id) && (void 0 === input.prompt || "string" === typeof input.prompt) && (void 0 === input.submitLabel || "string" === typeof input.submitLabel) && (void 0 === input.responsePrompt || "string" === typeof input.responsePrompt) && (void 0 === input.approvalCommentLabel || "string" === typeof input.approvalCommentLabel) && (void 0 === input.oneShot || "boolean" === typeof input.oneShot) && (void 0 === input.fields || Array.isArray(input.fields) && input.fields.every((elem) => "object" === typeof elem && null !== elem && _io7(elem)));
433
+ const _io7 = (input) => "string" === typeof input.id && (void 0 === input.kind || "number" === input.kind || "select" === input.kind || "text" === input.kind || "textarea" === input.kind || "checkbox" === input.kind) && "string" === typeof input.label && (void 0 === input.placeholder || "string" === typeof input.placeholder) && (void 0 === input.defaultValue || "string" === typeof input.defaultValue) && (void 0 === input.required || "boolean" === typeof input.required) && (void 0 === input.maxLength || "number" === typeof input.maxLength);
434
+ const _vo0 = (input, _path, _exceptionable = true) => [void 0 === input.packs || (Array.isArray(input.packs) || _report(_exceptionable, {
435
+ path: _path + ".packs",
436
+ expected: "(Array<PackOption> | undefined)",
437
+ value: input.packs
438
+ })) && input.packs.map((elem, _index11) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
439
+ path: _path + ".packs[" + _index11 + "]",
440
+ expected: "PackOption",
441
+ value: elem
442
+ })) && _vo1(elem, _path + ".packs[" + _index11 + "]", _exceptionable) || _report(_exceptionable, {
443
+ path: _path + ".packs[" + _index11 + "]",
444
+ expected: "PackOption",
445
+ value: elem
446
+ })).every((flag) => flag) || _report(_exceptionable, {
447
+ path: _path + ".packs",
448
+ expected: "(Array<PackOption> | undefined)",
449
+ value: input.packs
450
+ }), void 0 === input.mountPath || "string" === typeof input.mountPath || _report(_exceptionable, {
451
+ path: _path + ".mountPath",
452
+ expected: "(string | undefined)",
453
+ value: input.mountPath
454
+ }), void 0 === input.poll || "string" === typeof input.poll || "number" === typeof input.poll || _report(_exceptionable, {
455
+ path: _path + ".poll",
456
+ expected: "(number | string | undefined)",
457
+ value: input.poll
458
+ }), void 0 === input.slashCommands || ("object" === typeof input.slashCommands && null !== input.slashCommands && false === Array.isArray(input.slashCommands) || _report(_exceptionable, {
459
+ path: _path + ".slashCommands",
460
+ expected: "(__type | undefined)",
461
+ value: input.slashCommands
462
+ })) && _vo3(input.slashCommands, _path + ".slashCommands", _exceptionable) || _report(_exceptionable, {
463
+ path: _path + ".slashCommands",
464
+ expected: "(__type | undefined)",
465
+ value: input.slashCommands
466
+ })].every((flag) => flag);
467
+ const _vo1 = (input, _path, _exceptionable = true) => [void 0 === input.id || "string" === typeof input.id || _report(_exceptionable, {
468
+ path: _path + ".id",
469
+ expected: "(string | undefined)",
470
+ value: input.id
471
+ }), void 0 === input.url || "string" === typeof input.url || _report(_exceptionable, {
472
+ path: _path + ".url",
473
+ expected: "(string | undefined)",
474
+ value: input.url
475
+ }), void 0 === input.ref || "string" === typeof input.ref || _report(_exceptionable, {
476
+ path: _path + ".ref",
477
+ expected: "(string | undefined)",
478
+ value: input.ref
479
+ }), void 0 === input.depth || "number" === typeof input.depth || _report(_exceptionable, {
480
+ path: _path + ".depth",
481
+ expected: "(number | undefined)",
482
+ value: input.depth
483
+ }), void 0 === input.autoDetect || "boolean" === typeof input.autoDetect || _report(_exceptionable, {
484
+ path: _path + ".autoDetect",
485
+ expected: "(boolean | undefined)",
486
+ value: input.autoDetect
487
+ }), (null !== input.autoImport || _report(_exceptionable, {
488
+ path: _path + ".autoImport",
489
+ expected: '("claude" | "codex" | "legacy-broad" | "mcp" | "scripts" | "standard" | Array<AgentPackAutoImportProfile> | boolean | undefined)',
490
+ value: input.autoImport
491
+ })) && (void 0 === input.autoImport || "standard" === input.autoImport || "claude" === input.autoImport || "codex" === input.autoImport || "mcp" === input.autoImport || "scripts" === input.autoImport || "legacy-broad" === input.autoImport || "boolean" === typeof input.autoImport || (Array.isArray(input.autoImport) || _report(_exceptionable, {
492
+ path: _path + ".autoImport",
493
+ expected: '("claude" | "codex" | "legacy-broad" | "mcp" | "scripts" | "standard" | Array<AgentPackAutoImportProfile> | boolean | undefined)',
494
+ value: input.autoImport
495
+ })) && input.autoImport.map((elem, _index12) => "standard" === elem || "claude" === elem || "codex" === elem || "mcp" === elem || "scripts" === elem || "legacy-broad" === elem || _report(_exceptionable, {
496
+ path: _path + ".autoImport[" + _index12 + "]",
497
+ expected: '("claude" | "codex" | "legacy-broad" | "mcp" | "scripts" | "standard")',
498
+ value: elem
499
+ })).every((flag) => flag) || _report(_exceptionable, {
500
+ path: _path + ".autoImport",
501
+ expected: '("claude" | "codex" | "legacy-broad" | "mcp" | "scripts" | "standard" | Array<AgentPackAutoImportProfile> | boolean | undefined)',
502
+ value: input.autoImport
503
+ })), void 0 === input.mounts || (Array.isArray(input.mounts) || _report(_exceptionable, {
504
+ path: _path + ".mounts",
505
+ expected: "(Array<PackMountOption> | undefined)",
506
+ value: input.mounts
507
+ })) && input.mounts.map((elem, _index13) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
508
+ path: _path + ".mounts[" + _index13 + "]",
509
+ expected: "PackMountOption",
510
+ value: elem
511
+ })) && _vo2(elem, _path + ".mounts[" + _index13 + "]", _exceptionable) || _report(_exceptionable, {
512
+ path: _path + ".mounts[" + _index13 + "]",
513
+ expected: "PackMountOption",
514
+ value: elem
515
+ })).every((flag) => flag) || _report(_exceptionable, {
516
+ path: _path + ".mounts",
517
+ expected: "(Array<PackMountOption> | undefined)",
518
+ value: input.mounts
519
+ }), void 0 === input.instructionFiles || (Array.isArray(input.instructionFiles) || _report(_exceptionable, {
520
+ path: _path + ".instructionFiles",
521
+ expected: "(Array<string> | undefined)",
522
+ value: input.instructionFiles
523
+ })) && input.instructionFiles.map((elem, _index14) => "string" === typeof elem || _report(_exceptionable, {
524
+ path: _path + ".instructionFiles[" + _index14 + "]",
525
+ expected: "string",
526
+ value: elem
527
+ })).every((flag) => flag) || _report(_exceptionable, {
528
+ path: _path + ".instructionFiles",
529
+ expected: "(Array<string> | undefined)",
530
+ value: input.instructionFiles
531
+ })].every((flag) => flag);
532
+ const _vo2 = (input, _path, _exceptionable = true) => ["mcp" === input.kind || "scripts" === input.kind || "skills" === input.kind || "commands" === input.kind || "instructions" === input.kind || "hooks" === input.kind || "agents" === input.kind || "files" === input.kind || _report(_exceptionable, {
533
+ path: _path + ".kind",
534
+ expected: '("agents" | "commands" | "files" | "hooks" | "instructions" | "mcp" | "scripts" | "skills")',
535
+ value: input.kind
536
+ }), "string" === typeof input.from || _report(_exceptionable, {
537
+ path: _path + ".from",
538
+ expected: "string",
539
+ value: input.from
540
+ }), void 0 === input.include || (Array.isArray(input.include) || _report(_exceptionable, {
541
+ path: _path + ".include",
542
+ expected: "(Array<string> | undefined)",
543
+ value: input.include
544
+ })) && input.include.map((elem, _index15) => "string" === typeof elem || _report(_exceptionable, {
545
+ path: _path + ".include[" + _index15 + "]",
546
+ expected: "string",
547
+ value: elem
548
+ })).every((flag) => flag) || _report(_exceptionable, {
549
+ path: _path + ".include",
550
+ expected: "(Array<string> | undefined)",
551
+ value: input.include
552
+ })].every((flag) => flag);
553
+ const _vo3 = (input, _path, _exceptionable = true) => [void 0 === input.autoRegister || "boolean" === typeof input.autoRegister || _report(_exceptionable, {
554
+ path: _path + ".autoRegister",
555
+ expected: "(boolean | undefined)",
556
+ value: input.autoRegister
557
+ }), void 0 === input.inferInteractions || "boolean" === typeof input.inferInteractions || _report(_exceptionable, {
558
+ path: _path + ".inferInteractions",
559
+ expected: "(boolean | undefined)",
560
+ value: input.inferInteractions
561
+ }), void 0 === input.includeScripts || "boolean" === typeof input.includeScripts || _report(_exceptionable, {
562
+ path: _path + ".includeScripts",
563
+ expected: "(boolean | undefined)",
564
+ value: input.includeScripts
565
+ }), void 0 === input.generateScriptSkills || "boolean" === typeof input.generateScriptSkills || _report(_exceptionable, {
566
+ path: _path + ".generateScriptSkills",
567
+ expected: "(boolean | undefined)",
568
+ value: input.generateScriptSkills
569
+ }), void 0 === input.maxScriptCommandsPerPack || "number" === typeof input.maxScriptCommandsPerPack || _report(_exceptionable, {
570
+ path: _path + ".maxScriptCommandsPerPack",
571
+ expected: "(number | undefined)",
572
+ value: input.maxScriptCommandsPerPack
573
+ }), void 0 === input.rules || (Array.isArray(input.rules) || _report(_exceptionable, {
574
+ path: _path + ".rules",
575
+ expected: "(Array<PluginSlashCommandRule> | undefined)",
576
+ value: input.rules
577
+ })) && input.rules.map((elem, _index16) => ("object" === typeof elem && null !== elem && false === Array.isArray(elem) || _report(_exceptionable, {
578
+ path: _path + ".rules[" + _index16 + "]",
579
+ expected: "PluginSlashCommandRule",
580
+ value: elem
581
+ })) && _vo4(elem, _path + ".rules[" + _index16 + "]", _exceptionable) || _report(_exceptionable, {
582
+ path: _path + ".rules[" + _index16 + "]",
583
+ expected: "PluginSlashCommandRule",
584
+ value: elem
585
+ })).every((flag) => flag) || _report(_exceptionable, {
586
+ path: _path + ".rules",
587
+ expected: "(Array<PluginSlashCommandRule> | undefined)",
588
+ value: input.rules
589
+ })].every((flag) => flag);
590
+ const _vo4 = (input, _path, _exceptionable = true) => [void 0 === input.match || ("object" === typeof input.match && null !== input.match && false === Array.isArray(input.match) || _report(_exceptionable, {
591
+ path: _path + ".match",
592
+ expected: "(__type.o1 | undefined)",
593
+ value: input.match
594
+ })) && _vo5(input.match, _path + ".match", _exceptionable) || _report(_exceptionable, {
595
+ path: _path + ".match",
596
+ expected: "(__type.o1 | undefined)",
597
+ value: input.match
598
+ }), void 0 === input.aliases || (Array.isArray(input.aliases) || _report(_exceptionable, {
599
+ path: _path + ".aliases",
600
+ expected: "(Array<string> | undefined)",
601
+ value: input.aliases
602
+ })) && input.aliases.map((elem, _index17) => "string" === typeof elem || _report(_exceptionable, {
603
+ path: _path + ".aliases[" + _index17 + "]",
604
+ expected: "string",
605
+ value: elem
606
+ })).every((flag) => flag) || _report(_exceptionable, {
607
+ path: _path + ".aliases",
608
+ expected: "(Array<string> | undefined)",
609
+ value: input.aliases
610
+ }), void 0 === input.interaction || ("object" === typeof input.interaction && null !== input.interaction || _report(_exceptionable, {
611
+ path: _path + ".interaction",
612
+ expected: "(PluginSlashCommandInteraction | undefined)",
613
+ value: input.interaction
614
+ })) && _vo6(input.interaction, _path + ".interaction", _exceptionable) || _report(_exceptionable, {
615
+ path: _path + ".interaction",
616
+ expected: "(PluginSlashCommandInteraction | undefined)",
617
+ value: input.interaction
618
+ })].every((flag) => flag);
619
+ const _vo5 = (input, _path, _exceptionable = true) => [void 0 === input.packId || "string" === typeof input.packId || _report(_exceptionable, {
620
+ path: _path + ".packId",
621
+ expected: "(string | undefined)",
622
+ value: input.packId
623
+ }), void 0 === input.name || "string" === typeof input.name || _report(_exceptionable, {
624
+ path: _path + ".name",
625
+ expected: "(string | undefined)",
626
+ value: input.name
627
+ }), void 0 === input.names || (Array.isArray(input.names) || _report(_exceptionable, {
628
+ path: _path + ".names",
629
+ expected: "(Array<string> | undefined)",
630
+ value: input.names
631
+ })) && input.names.map((elem, _index18) => "string" === typeof elem || _report(_exceptionable, {
632
+ path: _path + ".names[" + _index18 + "]",
633
+ expected: "string",
634
+ value: elem
635
+ })).every((flag) => flag) || _report(_exceptionable, {
636
+ path: _path + ".names",
637
+ expected: "(Array<string> | undefined)",
638
+ value: input.names
639
+ }), void 0 === input.namePattern || "string" === typeof input.namePattern || _report(_exceptionable, {
640
+ path: _path + ".namePattern",
641
+ expected: "(string | undefined)",
642
+ value: input.namePattern
643
+ }), (null !== input.sourcePathIncludes || _report(_exceptionable, {
644
+ path: _path + ".sourcePathIncludes",
645
+ expected: "(Array<string> | string | undefined)",
646
+ value: input.sourcePathIncludes
647
+ })) && (void 0 === input.sourcePathIncludes || "string" === typeof input.sourcePathIncludes || (Array.isArray(input.sourcePathIncludes) || _report(_exceptionable, {
648
+ path: _path + ".sourcePathIncludes",
649
+ expected: "(Array<string> | string | undefined)",
650
+ value: input.sourcePathIncludes
651
+ })) && input.sourcePathIncludes.map((elem, _index19) => "string" === typeof elem || _report(_exceptionable, {
652
+ path: _path + ".sourcePathIncludes[" + _index19 + "]",
653
+ expected: "string",
654
+ value: elem
655
+ })).every((flag) => flag) || _report(_exceptionable, {
656
+ path: _path + ".sourcePathIncludes",
657
+ expected: "(Array<string> | string | undefined)",
658
+ value: input.sourcePathIncludes
659
+ }))].every((flag) => flag);
660
+ const _vo6 = (input, _path, _exceptionable = true) => ["buttons" === input.kind || "select" === input.kind || "form" === input.kind || "approval" === input.kind || _report(_exceptionable, {
661
+ path: _path + ".kind",
662
+ expected: '("approval" | "buttons" | "form" | "select")',
663
+ value: input.kind
664
+ }), void 0 === input.id || "string" === typeof input.id || _report(_exceptionable, {
665
+ path: _path + ".id",
666
+ expected: "(string | undefined)",
667
+ value: input.id
668
+ }), void 0 === input.prompt || "string" === typeof input.prompt || _report(_exceptionable, {
669
+ path: _path + ".prompt",
670
+ expected: "(string | undefined)",
671
+ value: input.prompt
672
+ }), void 0 === input.submitLabel || "string" === typeof input.submitLabel || _report(_exceptionable, {
673
+ path: _path + ".submitLabel",
674
+ expected: "(string | undefined)",
675
+ value: input.submitLabel
676
+ }), void 0 === input.responsePrompt || "string" === typeof input.responsePrompt || _report(_exceptionable, {
677
+ path: _path + ".responsePrompt",
678
+ expected: "(string | undefined)",
679
+ value: input.responsePrompt
680
+ }), void 0 === input.approvalCommentLabel || "string" === typeof input.approvalCommentLabel || _report(_exceptionable, {
681
+ path: _path + ".approvalCommentLabel",
682
+ expected: "(string | undefined)",
683
+ value: input.approvalCommentLabel
684
+ }), void 0 === input.oneShot || "boolean" === typeof input.oneShot || _report(_exceptionable, {
685
+ path: _path + ".oneShot",
686
+ expected: "(boolean | undefined)",
687
+ value: input.oneShot
688
+ }), void 0 === input.fields || (Array.isArray(input.fields) || _report(_exceptionable, {
689
+ path: _path + ".fields",
690
+ expected: "(Array<PluginSlashCommandInteractionField> | undefined)",
691
+ value: input.fields
692
+ })) && input.fields.map((elem, _index20) => ("object" === typeof elem && null !== elem || _report(_exceptionable, {
693
+ path: _path + ".fields[" + _index20 + "]",
694
+ expected: "PluginSlashCommandInteractionField",
695
+ value: elem
696
+ })) && _vo7(elem, _path + ".fields[" + _index20 + "]", _exceptionable) || _report(_exceptionable, {
697
+ path: _path + ".fields[" + _index20 + "]",
698
+ expected: "PluginSlashCommandInteractionField",
699
+ value: elem
700
+ })).every((flag) => flag) || _report(_exceptionable, {
701
+ path: _path + ".fields",
702
+ expected: "(Array<PluginSlashCommandInteractionField> | undefined)",
703
+ value: input.fields
704
+ })].every((flag) => flag);
705
+ const _vo7 = (input, _path, _exceptionable = true) => ["string" === typeof input.id || _report(_exceptionable, {
706
+ path: _path + ".id",
707
+ expected: "string",
708
+ value: input.id
709
+ }), void 0 === input.kind || "number" === input.kind || "select" === input.kind || "text" === input.kind || "textarea" === input.kind || "checkbox" === input.kind || _report(_exceptionable, {
710
+ path: _path + ".kind",
711
+ expected: '("checkbox" | "number" | "select" | "text" | "textarea" | undefined)',
712
+ value: input.kind
713
+ }), "string" === typeof input.label || _report(_exceptionable, {
714
+ path: _path + ".label",
715
+ expected: "string",
716
+ value: input.label
717
+ }), void 0 === input.placeholder || "string" === typeof input.placeholder || _report(_exceptionable, {
718
+ path: _path + ".placeholder",
719
+ expected: "(string | undefined)",
720
+ value: input.placeholder
721
+ }), void 0 === input.defaultValue || "string" === typeof input.defaultValue || _report(_exceptionable, {
722
+ path: _path + ".defaultValue",
723
+ expected: "(string | undefined)",
724
+ value: input.defaultValue
725
+ }), void 0 === input.required || "boolean" === typeof input.required || _report(_exceptionable, {
726
+ path: _path + ".required",
727
+ expected: "(boolean | undefined)",
728
+ value: input.required
729
+ }), void 0 === input.maxLength || "number" === typeof input.maxLength || _report(_exceptionable, {
730
+ path: _path + ".maxLength",
731
+ expected: "(number | undefined)",
732
+ value: input.maxLength
733
+ })].every((flag) => flag);
734
+ const __is = (input) => "object" === typeof input && null !== input && false === Array.isArray(input) && _io0(input);
735
+ let errors;
736
+ let _report;
737
+ return __typia_transform__createStandardSchema._createStandardSchema((input) => {
738
+ if (false === __is(input)) {
739
+ errors = [];
740
+ _report = __typia_transform__validateReport._validateReport(errors);
741
+ ((input2, _path, _exceptionable = true) => ("object" === typeof input2 && null !== input2 && false === Array.isArray(input2) || _report(true, {
742
+ path: _path + "",
743
+ expected: "AgentPackOptions",
744
+ value: input2
745
+ })) && _vo0(input2, _path + "", true) || _report(true, {
746
+ path: _path + "",
747
+ expected: "AgentPackOptions",
748
+ value: input2
749
+ }))(input, "$input", true);
750
+ const success = 0 === errors.length;
751
+ return success ? {
752
+ success,
753
+ data: input
754
+ } : {
755
+ success,
756
+ errors,
757
+ data: input
758
+ };
759
+ }
760
+ return {
761
+ success: true,
762
+ data: input
763
+ };
764
+ });
765
+ })();
766
+ var DEFAULT_AUTO_IMPORT_PROFILES = [
767
+ "standard",
768
+ "claude",
769
+ "codex",
770
+ "mcp"
771
+ ];
772
+ var AUTO_MOUNT_PROFILES = {
773
+ standard: [
774
+ // Agent Skills / OpenClaw-compatible SKILL.md layouts.
775
+ { kind: "skills", from: "." },
776
+ { kind: "skills", from: "skills" },
777
+ { kind: "skills", from: ".agents/skills" },
778
+ { kind: "skills", from: "agent-skills" },
779
+ { kind: "skills", from: "agent_skills" },
780
+ { kind: "skills", from: "openclaw/skills" }
781
+ ],
782
+ claude: [
783
+ // Claude Code skills, commands, subagents, hooks, and root instructions.
784
+ { kind: "skills", from: ".claude/skills" },
785
+ { kind: "commands", from: "commands" },
786
+ { kind: "commands", from: ".claude/commands" },
787
+ { kind: "agents", from: "agents" },
788
+ { kind: "agents", from: ".claude/agents" },
789
+ { kind: "hooks", from: "hooks" },
790
+ { kind: "instructions", from: "." },
791
+ { kind: "hooks", from: ".claude/hooks" },
792
+ { kind: "hooks", from: ".claude/settings.json" }
793
+ ],
794
+ codex: [
795
+ // Codex repo skills, AGENTS.md guidance, and custom agent TOML files.
796
+ { kind: "skills", from: ".codex/skills" },
797
+ { kind: "skills", from: ".agents/skills" },
798
+ { kind: "agents", from: ".codex/agents" },
799
+ { kind: "instructions", from: "." }
800
+ ],
801
+ mcp: [
802
+ { kind: "mcp", from: ".mcp.json" },
803
+ { kind: "mcp", from: ".mcp" },
804
+ { kind: "mcp", from: ".claude/mcp.json" },
805
+ { kind: "mcp", from: ".cursor/mcp.json" },
806
+ { kind: "mcp", from: ".vscode/mcp.json" },
807
+ { kind: "mcp", from: "mcp.json" },
808
+ { kind: "mcp", from: "mcp" }
809
+ ],
810
+ scripts: [
811
+ { kind: "scripts", from: "bin" },
812
+ { kind: "scripts", from: "scripts" },
813
+ { kind: "scripts", from: "setup" },
814
+ { kind: "scripts", from: "setup.sh" },
815
+ { kind: "scripts", from: "install" },
816
+ { kind: "scripts", from: "install.sh" },
817
+ { kind: "scripts", from: "bootstrap" },
818
+ { kind: "scripts", from: "bootstrap.sh" }
819
+ ],
820
+ "legacy-broad": [
821
+ // Historical broad scan profile. Kept as an explicit opt-in for templates
822
+ // that intentionally treat a whole repo as an agent pack.
823
+ { kind: "skills", from: "skills" },
824
+ { kind: "skills", from: ".agents/skills" },
825
+ { kind: "skills", from: ".codex/skills" },
826
+ { kind: "skills", from: ".claude/skills" },
827
+ { kind: "skills", from: ".claude/plugins" },
828
+ { kind: "skills", from: ".cursor/skills" },
829
+ { kind: "skills", from: ".gemini/skills" },
830
+ { kind: "skills", from: ".windsurf/skills" },
831
+ { kind: "skills", from: "openclaw/skills" },
832
+ { kind: "skills", from: "agent-skills" },
833
+ { kind: "skills", from: "agent_skills" },
834
+ { kind: "skills", from: "claude-skills" },
835
+ { kind: "skills", from: "claude/skills" },
836
+ { kind: "skills", from: "scientific-skills" },
837
+ { kind: "skills", from: "plugins" },
838
+ { kind: "skills", from: "extensions" },
839
+ { kind: "skills", from: "." },
840
+ // Slash-command and subagent workspaces.
841
+ { kind: "commands", from: "commands" },
842
+ { kind: "commands", from: "slash-commands" },
843
+ { kind: "commands", from: ".agents/commands" },
844
+ { kind: "commands", from: ".codex/commands" },
845
+ { kind: "commands", from: ".claude/commands" },
846
+ { kind: "commands", from: ".cursor/commands" },
847
+ { kind: "commands", from: ".gemini/commands" },
848
+ { kind: "commands", from: ".windsurf/commands" },
849
+ { kind: "commands", from: "plugins" },
850
+ { kind: "commands", from: "extensions" },
851
+ { kind: "agents", from: "agents" },
852
+ { kind: "agents", from: ".agents" },
853
+ { kind: "agents", from: ".agents/agents" },
854
+ { kind: "agents", from: ".codex/agents" },
855
+ { kind: "agents", from: ".claude/agents" },
856
+ { kind: "agents", from: ".claude/subagents" },
857
+ { kind: "agents", from: ".cursor/agents" },
858
+ { kind: "agents", from: ".gemini/agents" },
859
+ { kind: "agents", from: ".windsurf/agents" },
860
+ { kind: "agents", from: "subagents" },
861
+ { kind: "agents", from: "plugins" },
862
+ { kind: "agents", from: "extensions" },
863
+ // Human-readable methodology and project context.
864
+ { kind: "instructions", from: "." },
865
+ { kind: "instructions", from: "context" },
866
+ { kind: "instructions", from: "docs" },
867
+ { kind: "instructions", from: "openclaw" },
868
+ { kind: "instructions", from: ".agents" },
869
+ { kind: "instructions", from: ".codex" },
870
+ { kind: "instructions", from: ".claude" },
871
+ { kind: "instructions", from: ".github/copilot-instructions.md" },
872
+ { kind: "instructions", from: ".github/instructions" },
873
+ { kind: "instructions", from: ".github/prompts" },
874
+ { kind: "instructions", from: ".github/chatmodes" },
875
+ { kind: "instructions", from: ".cursor/rules" },
876
+ { kind: "instructions", from: ".cursorrules" },
877
+ { kind: "instructions", from: ".windsurf/rules" },
878
+ { kind: "instructions", from: ".windsurfrules" },
879
+ { kind: "instructions", from: ".clinerules" },
880
+ { kind: "instructions", from: "rules" },
881
+ { kind: "instructions", from: "rules.md" },
882
+ { kind: "instructions", from: "instructions" },
883
+ { kind: "instructions", from: "prompts" },
884
+ { kind: "instructions", from: "playbooks" },
885
+ { kind: "instructions", from: "specs" },
886
+ { kind: "instructions", from: "workflow" },
887
+ { kind: "instructions", from: "workflows" },
888
+ { kind: "instructions", from: "knowledge" },
889
+ { kind: "instructions", from: "knowledge-base" },
890
+ { kind: "instructions", from: "memory-bank" },
891
+ { kind: "instructions", from: "memory" },
892
+ { kind: "instructions", from: "second-brain" },
893
+ { kind: "instructions", from: "strategy" },
894
+ { kind: "instructions", from: "ops" },
895
+ { kind: "instructions", from: ".claude/commands" },
896
+ { kind: "instructions", from: ".claude/agents" },
897
+ // Hooks, MCP, helper binaries, and heavier repo assets.
898
+ { kind: "hooks", from: "hooks" },
899
+ { kind: "hooks", from: ".agents/hooks" },
900
+ { kind: "hooks", from: ".codex/hooks" },
901
+ { kind: "hooks", from: ".claude/hooks" },
902
+ { kind: "hooks", from: ".claude/settings.json" },
903
+ { kind: "hooks", from: ".claude/settings.local.json" },
904
+ { kind: "hooks", from: ".cursor/hooks" },
905
+ { kind: "hooks", from: ".cursor/hooks.json" },
906
+ { kind: "mcp", from: ".mcp.json" },
907
+ { kind: "mcp", from: ".mcp" },
908
+ { kind: "mcp", from: ".claude/mcp.json" },
909
+ { kind: "mcp", from: ".cursor/mcp.json" },
910
+ { kind: "mcp", from: ".vscode/mcp.json" },
911
+ { kind: "mcp", from: "mcp.json" },
912
+ { kind: "mcp", from: "mcp" },
913
+ { kind: "scripts", from: "bin" },
914
+ { kind: "scripts", from: "scripts" },
915
+ { kind: "scripts", from: "setup" },
916
+ { kind: "scripts", from: "setup.sh" },
917
+ { kind: "scripts", from: "install" },
918
+ { kind: "scripts", from: "install.sh" },
919
+ { kind: "scripts", from: "bootstrap" },
920
+ { kind: "scripts", from: "bootstrap.sh" },
921
+ { kind: "files", from: "data_sources" },
922
+ { kind: "files", from: "data-sources" },
923
+ { kind: "files", from: "data" },
924
+ { kind: "files", from: "examples" },
925
+ { kind: "files", from: "templates" },
926
+ { kind: "files", from: "notebooks" }
927
+ ]
928
+ };
929
+ function deriveIdFromUrl(url) {
930
+ const m = url.match(/[/:]([^/:]+)\/([^/]+?)(\.git)?\/?$/);
931
+ if (m)
932
+ return sanitizeId(`${m[1]}-${m[2]}`);
933
+ return sanitizeId(url);
934
+ }
935
+ function readOptions(agent) {
936
+ const entry = agent.use?.find((u) => u.plugin === "agent-pack");
937
+ if (!entry?.options)
938
+ return null;
939
+ return entry.options;
940
+ }
941
+ function normalizeAutoImportProfiles(pack) {
942
+ if (pack.autoImport === false || pack.autoDetect === false)
943
+ return [];
944
+ const configured = pack.autoImport;
945
+ if (configured === true)
946
+ return [...DEFAULT_AUTO_IMPORT_PROFILES];
947
+ if (typeof configured === "string")
948
+ return [configured];
949
+ if (Array.isArray(configured))
950
+ return configured;
951
+ if (pack.autoDetect === true || !pack.mounts?.length)
952
+ return [...DEFAULT_AUTO_IMPORT_PROFILES];
953
+ return [];
954
+ }
955
+ function dedupeMounts(mounts) {
956
+ const seen = /* @__PURE__ */ new Set();
957
+ const out = [];
958
+ for (const mount of mounts) {
959
+ const key = `${mount.kind}:${mount.from}`;
960
+ if (seen.has(key))
961
+ continue;
962
+ seen.add(key);
963
+ out.push(mount);
964
+ }
965
+ return out;
966
+ }
967
+ function buildAgentPackPrompt(packs, mountPath) {
968
+ const lines = [
969
+ "## Mounted Agent Packs",
970
+ "",
971
+ "Treat the following mounted packs as source-of-truth context whenever they are relevant to the user request:",
972
+ ""
973
+ ];
974
+ for (const pack of packs) {
975
+ if (pack.autoDetect) {
976
+ const profiles = pack.autoImportProfiles?.length ? pack.autoImportProfiles.join(", ") : "standard-compatible";
977
+ lines.push(`- **${pack.id}** \u2014 auto-imported ${profiles} layouts under \`${mountPath}/${pack.id}/{skills,commands,agents,instructions,hooks,mcp,scripts,files}\``);
978
+ continue;
979
+ }
980
+ const mountDirs = /* @__PURE__ */ new Map();
981
+ for (const mount of pack.mounts) {
982
+ const dirs = mountDirs.get(mount.kind) ?? /* @__PURE__ */ new Set();
983
+ dirs.add(`${mountPath}/${pack.id}/${mount.kind}`);
984
+ mountDirs.set(mount.kind, dirs);
985
+ }
986
+ const mountSummary = [...mountDirs.entries()].flatMap(([kind, dirs]) => [...dirs].map((dir) => `${kind}: \`${dir}\``)).join("; ");
987
+ lines.push(`- **${pack.id}** \u2014 ${mountSummary}`);
988
+ }
989
+ lines.push("", "When one of these packs is relevant:", "1. Read the most relevant markdown files under that pack's `instructions/` directory before answering, when present.", "2. If direct pack paths are unavailable in the model sandbox, read the consolidated workspace file `PACK_INSTRUCTIONS.md`.", "3. Use the mounted pack skills, commands, or sub-agents instead of improvising from memory.", "4. If the pack exposes `hooks/bootstrap.md` or `hooks/teardown.md`, follow those procedures when applicable.", "5. Run helper scripts from the mounted `scripts/` directory using absolute paths when they are useful.", "6. Cite the pack id and the exact skill, instruction file, or procedure you relied on.");
990
+ return lines.join("\n");
991
+ }
992
+ function resolvePacks(opts) {
993
+ const packs = opts.packs ?? [];
994
+ const resolved = [];
995
+ const seen = /* @__PURE__ */ new Set();
996
+ for (const p of packs) {
997
+ if (!p.url)
998
+ continue;
999
+ const id = sanitizeId(p.id ?? deriveIdFromUrl(p.url));
1000
+ if (seen.has(id))
1001
+ continue;
1002
+ seen.add(id);
1003
+ const autoImportProfiles = normalizeAutoImportProfiles(p);
1004
+ const autoDetect = autoImportProfiles.length > 0;
1005
+ const mounts = dedupeMounts([
1006
+ ...(p.mounts ?? []).map((m) => ({
1007
+ kind: m.kind,
1008
+ from: m.from,
1009
+ include: m.include
1010
+ })),
1011
+ ...autoImportProfiles.flatMap((profile) => (AUTO_MOUNT_PROFILES[profile] ?? []).map((mount) => ({ ...mount })))
1012
+ ]);
1013
+ if (mounts.length === 0)
1014
+ continue;
1015
+ resolved.push({
1016
+ id,
1017
+ url: p.url,
1018
+ ref: p.ref ?? "main",
1019
+ depth: p.depth ?? 1,
1020
+ autoDetect,
1021
+ autoImportProfiles,
1022
+ mounts,
1023
+ instructionFiles: p.instructionFiles ?? DEFAULT_INSTRUCTION_FILES
1024
+ });
1025
+ }
1026
+ return resolved;
1027
+ }
1028
+ var agentPackK8sProvider = {
1029
+ buildK8s(agent, _ctx) {
1030
+ const entry = agent.use?.find((u) => u.plugin === "agent-pack");
1031
+ if (!entry?.options)
1032
+ return void 0;
1033
+ const opts = entry.options;
1034
+ const packs = resolvePacks(opts);
1035
+ if (packs.length === 0)
1036
+ return void 0;
1037
+ const mountPath = opts.mountPath ?? DEFAULT_MOUNT;
1038
+ const slashCommands = opts.slashCommands ?? {};
1039
+ const autoRegisterSlashCommands = slashCommands.autoRegister ?? true;
1040
+ const slashCommandIndex = autoRegisterSlashCommands ? {
1041
+ enabled: true,
1042
+ outputPath: agentPackSlashCommandsIndexPath(mountPath),
1043
+ inferInteractions: slashCommands.inferInteractions ?? true,
1044
+ includeScripts: slashCommands.includeScripts ?? true,
1045
+ generateScriptSkills: slashCommands.generateScriptSkills ?? true,
1046
+ maxScriptCommandsPerPack: slashCommands.maxScriptCommandsPerPack,
1047
+ rules: slashCommands.rules
1048
+ } : void 0;
1049
+ const initContainer = buildAgentPackInitContainer(packs, mountPath, VOLUME_NAME, SCRIPT_VOLUME_NAME, slashCommandIndex);
1050
+ const scriptConfigMapName = `${agent.id}-agent-pack-scripts`;
1051
+ const byKind = /* @__PURE__ */ new Map();
1052
+ for (const p of packs) {
1053
+ for (const m of p.mounts) {
1054
+ const dirs = byKind.get(m.kind) ?? /* @__PURE__ */ new Set();
1055
+ dirs.add(`${mountPath}/${p.id}/${m.kind}`);
1056
+ byKind.set(m.kind, dirs);
1057
+ }
1058
+ }
1059
+ const envVars = [];
1060
+ const envForKind = {
1061
+ skills: "SHADOW_PACK_SKILLS_DIRS",
1062
+ instructions: "SHADOW_PACK_INSTRUCTIONS_DIRS",
1063
+ commands: "SHADOW_PACK_COMMANDS_DIRS",
1064
+ hooks: "SHADOW_PACK_HOOKS_DIRS",
1065
+ mcp: "SHADOW_PACK_MCP_DIRS",
1066
+ scripts: "SHADOW_PACK_SCRIPTS_DIRS",
1067
+ files: "SHADOW_PACK_FILES_DIRS",
1068
+ agents: "SHADOW_PACK_AGENTS_DIRS"
1069
+ };
1070
+ for (const [kind, dirs] of byKind) {
1071
+ const name = envForKind[kind];
1072
+ if (name)
1073
+ envVars.push({ name, value: [...dirs].join(":") });
1074
+ }
1075
+ envVars.push({ name: "SHADOW_PACK_MOUNT_ROOT", value: mountPath });
1076
+ const result = {
1077
+ initContainers: [initContainer],
1078
+ configMaps: [
1079
+ {
1080
+ name: scriptConfigMapName,
1081
+ data: {
1082
+ "init.sh": buildAgentPackInitScript(packs, mountPath, slashCommandIndex),
1083
+ "sync.sh": buildAgentPackSyncScript({
1084
+ packs,
1085
+ mountPath,
1086
+ intervalSec: parsePollInterval(opts.poll),
1087
+ slashCommandIndex
1088
+ })
1089
+ },
1090
+ labels: {
1091
+ app: "shadowob-cloud",
1092
+ agent: agent.id
1093
+ }
1094
+ }
1095
+ ],
1096
+ volumes: [
1097
+ { name: VOLUME_NAME, spec: { emptyDir: {} } },
1098
+ {
1099
+ name: SCRIPT_VOLUME_NAME,
1100
+ spec: {
1101
+ configMap: {
1102
+ name: scriptConfigMapName,
1103
+ defaultMode: 493
1104
+ }
1105
+ }
1106
+ }
1107
+ ],
1108
+ volumeMounts: [{ name: VOLUME_NAME, mountPath, readOnly: false }],
1109
+ envVars,
1110
+ labels: {
1111
+ "agent-pack.packs": packs.map((p) => p.id).join("_").slice(0, 63)
1112
+ }
1113
+ };
1114
+ const sidecar = buildAgentPackSyncSidecar({
1115
+ packs,
1116
+ mountPath,
1117
+ volumeName: VOLUME_NAME,
1118
+ scriptVolumeName: SCRIPT_VOLUME_NAME,
1119
+ intervalSec: parsePollInterval(opts.poll),
1120
+ slashCommandIndex
1121
+ });
1122
+ if (sidecar)
1123
+ result.sidecars = [sidecar];
1124
+ return result;
1125
+ }
1126
+ };
1127
+ var plugin = definePlugin(manifest_default, (api) => {
1128
+ api.onBuildConfig((context) => {
1129
+ const opts = readOptions(context.agent);
1130
+ if (!opts)
1131
+ return {};
1132
+ const packs = resolvePacks(opts);
1133
+ if (packs.length === 0)
1134
+ return {};
1135
+ const mountPath = opts.mountPath ?? DEFAULT_MOUNT;
1136
+ const extraDirs = [];
1137
+ for (const p of packs) {
1138
+ for (const m of p.mounts) {
1139
+ if (SKILL_LIKE_KINDS.has(m.kind)) {
1140
+ extraDirs.push(`${mountPath}/${p.id}/${m.kind}`);
1141
+ }
1142
+ }
1143
+ }
1144
+ if (extraDirs.length === 0)
1145
+ return {};
1146
+ return {
1147
+ skills: {
1148
+ load: { extraDirs: [...new Set(extraDirs)] }
1149
+ }
1150
+ };
1151
+ });
1152
+ api.onBuildPrompt((context) => {
1153
+ const opts = readOptions(context.agent);
1154
+ if (!opts)
1155
+ return;
1156
+ const packs = resolvePacks(opts);
1157
+ if (packs.length === 0)
1158
+ return;
1159
+ const mountPath = opts.mountPath ?? DEFAULT_MOUNT;
1160
+ return buildAgentPackPrompt(packs, mountPath);
1161
+ });
1162
+ api.onBuildRuntime((context) => {
1163
+ const opts = readOptions(context.agent);
1164
+ if (!opts)
1165
+ return;
1166
+ const packs = resolvePacks(opts);
1167
+ if (packs.length === 0)
1168
+ return;
1169
+ const slashCommands = opts.slashCommands ?? {};
1170
+ const autoRegister = slashCommands.autoRegister ?? true;
1171
+ if (!autoRegister)
1172
+ return;
1173
+ return {
1174
+ artifacts: [
1175
+ {
1176
+ kind: "shadow.slashCommands",
1177
+ path: agentPackSlashCommandsIndexPath(opts.mountPath ?? DEFAULT_MOUNT),
1178
+ mediaType: "application/json"
1179
+ }
1180
+ ]
1181
+ };
1182
+ });
1183
+ api.onValidate((context) => {
1184
+ const opts = readOptions(context.agent);
1185
+ if (!opts)
1186
+ return;
1187
+ const shape = validateAgentPackOptions(opts);
1188
+ const packs = opts.packs ?? [];
1189
+ const errors = [];
1190
+ if (!shape.success) {
1191
+ errors.push(...shape.errors.map((error) => ({
1192
+ path: `use.agent-pack.options${error.path}`,
1193
+ message: error.expected,
1194
+ severity: "error"
1195
+ })));
1196
+ }
1197
+ packs.forEach((p, i) => {
1198
+ if (!p.url) {
1199
+ errors.push({
1200
+ path: `use.agent-pack.packs[${i}].url`,
1201
+ message: 'Each pack must specify a git "url".',
1202
+ severity: "error"
1203
+ });
1204
+ }
1205
+ const autoImportDisabled = p.autoDetect === false || p.autoImport === false || Array.isArray(p.autoImport) && p.autoImport.length === 0;
1206
+ if ((!p.mounts || p.mounts.length === 0) && autoImportDisabled) {
1207
+ errors.push({
1208
+ path: `use.agent-pack.packs[${i}].mounts`,
1209
+ message: "Each pack must declare at least one mount when automatic import is disabled.",
1210
+ severity: "error"
1211
+ });
1212
+ } else if (p.mounts) {
1213
+ p.mounts.forEach((m, j) => {
1214
+ if (!m.kind || m.from == null) {
1215
+ errors.push({
1216
+ path: `use.agent-pack.packs[${i}].mounts[${j}]`,
1217
+ message: 'Each mount requires both "kind" and "from".',
1218
+ severity: "error"
1219
+ });
1220
+ }
1221
+ });
1222
+ }
1223
+ });
1224
+ if (errors.length > 0)
1225
+ return { valid: false, errors };
1226
+ });
1227
+ });
1228
+ plugin.k8s = agentPackK8sProvider;
1229
+ var agent_pack_default = plugin;
1230
+ export {
1231
+ buildAgentPackPrompt,
1232
+ agent_pack_default as default,
1233
+ resolvePacks,
1234
+ validateAgentPackOptions
1235
+ };