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