@lovrabet/lovrabet-cli 2.1.10 → 2.1.11-beta.2

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 (118) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/rate-limit.js +1 -0
  87. package/lib/framework/response.js +1 -1
  88. package/lib/framework/runner-confirmation.js +1 -1
  89. package/lib/framework/runner-error.js +1 -1
  90. package/lib/framework/runner.js +1 -1
  91. package/lib/framework/schema-export.js +1 -1
  92. package/lib/framework/service-order.js +1 -1
  93. package/lib/framework/types.js +1 -1
  94. package/lib/generated/build-info.js +1 -1
  95. package/lib/help.js +1 -1
  96. package/lib/skills/npx-skills-add.js +1 -1
  97. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  98. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  99. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  100. package/lib/skills/runtime-skill-sync/links.js +1 -1
  101. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  102. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  103. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  104. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  105. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  106. package/lib/skills/runtime-skill-sync/push.js +1 -1
  107. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  110. package/lib/skills/runtime-skill-sync.js +1 -1
  111. package/lib/utils/apply-jq-filter.js +1 -1
  112. package/lib/utils/logger.js +1 -1
  113. package/lib/utils/params.js +1 -1
  114. package/lib/utils/platform.js +1 -1
  115. package/lib/utils/update-notice.js +1 -1
  116. package/lib/utils/version.js +1 -1
  117. package/lib/utils/write-cli-side-channel.js +1 -1
  118. package/package.json +1 -1
@@ -1 +1 @@
1
- function a91_0xaad7(){var _0x5073e7=['42EcRPTZ','267827jzWJGb','33229WMVSBs','1996218QTwsiF','12345729TjGRwm','1253120lmMjUG','16TjqOBl','6tFwIOB','25790ILNmoi','802645bbVUwO','549CyFcYn'];a91_0xaad7=function(){return _0x5073e7;};return a91_0xaad7();}(function(_0x54d143,_0x51b1a9){var _0x305cfe=a91_0x184c,_0x28395d=_0x54d143();while(!![]){try{var _0x4b84e1=parseInt(_0x305cfe(0x102))/0x1*(-parseInt(_0x305cfe(0x107))/0x2)+parseInt(_0x305cfe(0x103))/0x3+-parseInt(_0x305cfe(0x106))/0x4*(-parseInt(_0x305cfe(0x109))/0x5)+-parseInt(_0x305cfe(0x100))/0x6*(-parseInt(_0x305cfe(0x101))/0x7)+-parseInt(_0x305cfe(0x105))/0x8+-parseInt(_0x305cfe(0x10a))/0x9*(-parseInt(_0x305cfe(0x108))/0xa)+-parseInt(_0x305cfe(0x104))/0xb;if(_0x4b84e1===_0x51b1a9)break;else _0x28395d['push'](_0x28395d['shift']());}catch(_0x230fbe){_0x28395d['push'](_0x28395d['shift']());}}}(a91_0xaad7,0x566d2));function a91_0x184c(_0x4e255a,_0x2252dc){_0x4e255a=_0x4e255a-0x100;var _0xaad73c=a91_0xaad7();var _0x184c31=_0xaad73c[_0x4e255a];return _0x184c31;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a92_0xe980(_0x3a55d8,_0x1bff34){_0x3a55d8=_0x3a55d8-0x6b;var _0xe623a9=a92_0xe623();var _0xe9802d=_0xe623a9[_0x3a55d8];return _0xe9802d;}(function(_0x198102,_0x22bf06){var _0x2650fe=a92_0xe980,_0x59d025=_0x198102();while(!![]){try{var _0xe73aa8=-parseInt(_0x2650fe(0x6d))/0x1+-parseInt(_0x2650fe(0x6e))/0x2*(parseInt(_0x2650fe(0x6b))/0x3)+-parseInt(_0x2650fe(0x72))/0x4+-parseInt(_0x2650fe(0x71))/0x5+-parseInt(_0x2650fe(0x70))/0x6*(parseInt(_0x2650fe(0x6f))/0x7)+parseInt(_0x2650fe(0x6c))/0x8+parseInt(_0x2650fe(0x73))/0x9;if(_0xe73aa8===_0x22bf06)break;else _0x59d025['push'](_0x59d025['shift']());}catch(_0x500863){_0x59d025['push'](_0x59d025['shift']());}}}(a92_0xe623,0xc8594));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a92_0xe623(){var _0x2b81e1=['9313787gHunaD','6ehADOc','1032160hBNjlX','856512DyGvkm','33142185FNecRv','13599idnZOL','4107880dwmnrT','1293312jYvXEm','146LQPIxE'];a92_0xe623=function(){return _0x2b81e1;};return a92_0xe623();}
@@ -1 +1 @@
1
- function a92_0x1cbf(){const _0x4028fe=['229978pWZDKO','8htGTOG','v2.1.9','666465eysLUX','15129LPpcxm','45pHWrmb','6169599kXJMwC','46044XaMUBt','2.1.10','813939JSgEBD','1601292MDwmTM','2026-07-10T09:43:17.657Z'];a92_0x1cbf=function(){return _0x4028fe;};return a92_0x1cbf();}const a92_0x301764=a92_0x2ecc;(function(_0x3a3303,_0x486c40){const _0x48c844=a92_0x2ecc,_0x10527a=_0x3a3303();while(!![]){try{const _0x4253a0=parseInt(_0x48c844(0xbc))/0x1+parseInt(_0x48c844(0xb8))/0x2+parseInt(_0x48c844(0xbb))/0x3+-parseInt(_0x48c844(0xbf))/0x4*(-parseInt(_0x48c844(0xbd))/0x5)+parseInt(_0x48c844(0xc2))/0x6+parseInt(_0x48c844(0xc1))/0x7+-parseInt(_0x48c844(0xb9))/0x8*(parseInt(_0x48c844(0xbe))/0x9);if(_0x4253a0===_0x486c40)break;else _0x10527a['push'](_0x10527a['shift']());}catch(_0x78629){_0x10527a['push'](_0x10527a['shift']());}}}(a92_0x1cbf,0x257b0));export const VERSION=a92_0x301764(0xc0);function a92_0x2ecc(_0x104b53,_0x1fa132){_0x104b53=_0x104b53-0xb7;const _0x1cbf4b=a92_0x1cbf();let _0x2ecc90=_0x1cbf4b[_0x104b53];return _0x2ecc90;}export const GIT_TAG=a92_0x301764(0xba);export const GIT_COMMIT='691bac9';export const BUILD_TIME=a92_0x301764(0xb7);
1
+ function a93_0x3bd9(){const _0x418dc3=['3LuelLw','3d237d3','v2.1.11-beta.2','3545656YKcOto','881504zaHNys','10CmeDSl','2026-07-11T08:24:35.698Z','9718317syIhGd','722732PCtadl','240199XbOxZm','1025DWzNqK','28590DqaNTF','3176292ywsnMR'];a93_0x3bd9=function(){return _0x418dc3;};return a93_0x3bd9();}const a93_0x2d9ab3=a93_0x34ec;(function(_0x45b80e,_0x289034){const _0x34c2ef=a93_0x34ec,_0xe97fe=_0x45b80e();while(!![]){try{const _0x4a8847=-parseInt(_0x34c2ef(0xed))/0x1+parseInt(_0x34c2ef(0xec))/0x2*(-parseInt(_0x34c2ef(0xe4))/0x3)+parseInt(_0x34c2ef(0xe7))/0x4+parseInt(_0x34c2ef(0xee))/0x5*(-parseInt(_0x34c2ef(0xef))/0x6)+parseInt(_0x34c2ef(0xe3))/0x7+parseInt(_0x34c2ef(0xe8))/0x8+-parseInt(_0x34c2ef(0xeb))/0x9*(-parseInt(_0x34c2ef(0xe9))/0xa);if(_0x4a8847===_0x289034)break;else _0xe97fe['push'](_0xe97fe['shift']());}catch(_0x3fadf2){_0xe97fe['push'](_0xe97fe['shift']());}}}(a93_0x3bd9,0xe85e5));export const VERSION='2.1.11-beta.2';export const GIT_TAG=a93_0x2d9ab3(0xe6);function a93_0x34ec(_0x1e9560,_0x2b346a){_0x1e9560=_0x1e9560-0xe3;const _0x3bd9e2=a93_0x3bd9();let _0x34ec02=_0x3bd9e2[_0x1e9560];return _0x34ec02;}export const GIT_COMMIT=a93_0x2d9ab3(0xe5);export const BUILD_TIME=a93_0x2d9ab3(0xea);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x262a07,_0xe2528e){const _0x2f946a=a93_0x2ba2,_0x557020=_0x262a07();while(!![]){try{const _0x2ea3b5=parseInt(_0x2f946a(0x1a2))/0x1+-parseInt(_0x2f946a(0x19d))/0x2*(parseInt(_0x2f946a(0x198))/0x3)+-parseInt(_0x2f946a(0x19c))/0x4*(parseInt(_0x2f946a(0x194))/0x5)+parseInt(_0x2f946a(0x19f))/0x6*(-parseInt(_0x2f946a(0x196))/0x7)+-parseInt(_0x2f946a(0x192))/0x8*(parseInt(_0x2f946a(0x195))/0x9)+parseInt(_0x2f946a(0x193))/0xa*(parseInt(_0x2f946a(0x197))/0xb)+parseInt(_0x2f946a(0x199))/0xc*(parseInt(_0x2f946a(0x19a))/0xd);if(_0x2ea3b5===_0xe2528e)break;else _0x557020['push'](_0x557020['shift']());}catch(_0x399936){_0x557020['push'](_0x557020['shift']());}}}(a93_0x2514,0x56414));import{jsx as a93_0x38b2e1,jsxs as a93_0x13ca50}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x939614=a93_0x2ba2,{exit:_0x34ac7e}=useApp();return useEffect(()=>{_0x34ac7e();},[_0x34ac7e]),a93_0x13ca50(Box,{'flexDirection':_0x939614(0x191),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x38b2e1(Box,{'children':a93_0x38b2e1(Text,{'bold':!![],'color':_0x939614(0x19e),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x13ca50(Box,{'marginTop':0x1,'children':[a93_0x38b2e1(Text,{'dimColor':!![],'children':_0x939614(0x1a0)}),a93_0x38b2e1(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x939614(0x1a1)}),a93_0x38b2e1(Text,{'dimColor':!![],'children':_0x939614(0x19b)})]})]});}function a93_0x2ba2(_0x81f553,_0x249c06){_0x81f553=_0x81f553-0x191;const _0x2514f8=a93_0x2514();let _0x2ba298=_0x2514f8[_0x81f553];return _0x2ba298;}function a93_0x2514(){const _0x5a70de=['371QbcMTr','33embKwj','138813xRRDMz','249324aKQrZI','715jDmXSt','\x20to\x20view\x20available\x20commands.','12TuzbcP','16eJfcMR','green','25350SLKelC','\x20\x20Use\x20','\x20--help','395759HMOtZH','column','8RhPuAN','326070Jmqtew','254295ZLapVx','4827105gOakkY'];a93_0x2514=function(){return _0x5a70de;};return a93_0x2514();}
1
+ function a94_0x34e2(){const _0x4abe6e=['1180CgYhSL','1379xRXCXY','\x20to\x20view\x20available\x20commands.','green','141246NrjJWN','column','1182044yZQFzH','27TlhRrj','81036eGHegn','1056030eUeSaF','3896SKTLVi','1520585MTcDjT','49826FJZbDH','\x20\x20Use\x20'];a94_0x34e2=function(){return _0x4abe6e;};return a94_0x34e2();}(function(_0x1c5446,_0xa33e94){const _0x80f775=a94_0x11c5,_0x4989c6=_0x1c5446();while(!![]){try{const _0x30fbdb=-parseInt(_0x80f775(0xc0))/0x1+parseInt(_0x80f775(0xba))/0x2*(-parseInt(_0x80f775(0xb5))/0x3)+-parseInt(_0x80f775(0xc2))/0x4+-parseInt(_0x80f775(0xb9))/0x5+parseInt(_0x80f775(0xb7))/0x6+parseInt(_0x80f775(0xbd))/0x7*(-parseInt(_0x80f775(0xb8))/0x8)+parseInt(_0x80f775(0xb6))/0x9*(parseInt(_0x80f775(0xbc))/0xa);if(_0x30fbdb===_0xa33e94)break;else _0x4989c6['push'](_0x4989c6['shift']());}catch(_0x3f1848){_0x4989c6['push'](_0x4989c6['shift']());}}}(a94_0x34e2,0x2b527));function a94_0x11c5(_0x21a277,_0x1cbd53){_0x21a277=_0x21a277-0xb5;const _0x34e2b7=a94_0x34e2();let _0x11c51d=_0x34e2b7[_0x21a277];return _0x11c51d;}import{jsx as a94_0x1c4225,jsxs as a94_0x5bf09d}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4c9c0b=a94_0x11c5,{exit:_0x3b05d8}=useApp();return useEffect(()=>{_0x3b05d8();},[_0x3b05d8]),a94_0x5bf09d(Box,{'flexDirection':_0x4c9c0b(0xc1),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x1c4225(Box,{'children':a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x5bf09d(Box,{'marginTop':0x1,'children':[a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbb)}),a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':CLI_BIN_NAME+'\x20--help'}),a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbe)})]})]});}
@@ -1 +1 @@
1
- const a94_0x4bf8e1=a94_0x2cab;(function(_0x3537f7,_0x2c6f7a){const _0x37e77e=a94_0x2cab,_0x15b1bc=_0x3537f7();while(!![]){try{const _0x29dd1f=parseInt(_0x37e77e(0x15f))/0x1*(parseInt(_0x37e77e(0x157))/0x2)+parseInt(_0x37e77e(0x166))/0x3+-parseInt(_0x37e77e(0x169))/0x4+-parseInt(_0x37e77e(0x15c))/0x5*(-parseInt(_0x37e77e(0x15a))/0x6)+parseInt(_0x37e77e(0x167))/0x7*(parseInt(_0x37e77e(0x158))/0x8)+-parseInt(_0x37e77e(0x164))/0x9+parseInt(_0x37e77e(0x16b))/0xa*(-parseInt(_0x37e77e(0x159))/0xb);if(_0x29dd1f===_0x2c6f7a)break;else _0x15b1bc['push'](_0x15b1bc['shift']());}catch(_0x3d3773){_0x15b1bc['push'](_0x15b1bc['shift']());}}}(a94_0x559e,0x4e33e));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x4f3d1c}from'../constant/distribution.js';function a94_0x559e(){const _0x53e991=['npx','1542076KGapnA','skills','2338730NMPYbJ','exit\x20','2azUpCC','8MFDrjY','44bIlFfw','444bHLHjF','stderr','26890fbARAz','stdout','trim','604883vEhHDX','toString','skipNpxSkillsEnvSuffix','pipe','add','4120983zzLvCh','log','1489230ZSUCuJ','4199657VwMSJw'];a94_0x559e=function(){return _0x53e991;};return a94_0x559e();}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x4f3d1c;function a94_0x2cab(_0x13856f,_0x593d1b){_0x13856f=_0x13856f-0x157;const _0x559e89=a94_0x559e();let _0x2cab68=_0x559e89[_0x13856f];return _0x2cab68;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x4bf8e1(0x161)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x1d766b,_0x1660b7=LOVRABET_SKILL_SOURCE,_0x578b80){const _0x35c71c=a94_0x4bf8e1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x49a6b1=_0x578b80?.['stdio']??'inherit',_0x372713=resolveNpmBin(_0x35c71c(0x168)),_0x1361b9=[_0x35c71c(0x16a),_0x35c71c(0x163),_0x1660b7,'-g','-y'],_0x5b664f=[_0x372713,..._0x1361b9]['join']('\x20');console[_0x35c71c(0x165)]('*\x20'+_0x5b664f);const _0xce3bb4=spawnSync(_0x372713,_0x1361b9,{'cwd':_0x1d766b,'stdio':_0x49a6b1,'env':process.env,'shell':![]});if(_0xce3bb4['status']===0x0)return{'ok':!![],'status':0x0};let _0xccd61b=_0x35c71c(0x16c)+(_0xce3bb4['status']??'unknown');if(_0x49a6b1===_0x35c71c(0x162)){const _0x2afd46=_0xce3bb4[_0x35c71c(0x15b)]?_0xce3bb4[_0x35c71c(0x15b)]['toString']()[_0x35c71c(0x15e)]():'',_0x1f70eb=_0xce3bb4[_0x35c71c(0x15d)]?_0xce3bb4[_0x35c71c(0x15d)][_0x35c71c(0x160)]()[_0x35c71c(0x15e)]():'';if(_0x2afd46)_0xccd61b=_0x2afd46;else{if(_0x1f70eb)_0xccd61b=_0x1f70eb;}}return{'ok':![],'status':_0xce3bb4['status']??null,'error':_0xccd61b};}
1
+ const a95_0x22ed38=a95_0x15ce;(function(_0xa4896d,_0x594665){const _0x1c7748=a95_0x15ce,_0x1b83ff=_0xa4896d();while(!![]){try{const _0x3f370e=parseInt(_0x1c7748(0x75))/0x1*(parseInt(_0x1c7748(0x79))/0x2)+-parseInt(_0x1c7748(0x74))/0x3+-parseInt(_0x1c7748(0x82))/0x4*(parseInt(_0x1c7748(0x83))/0x5)+-parseInt(_0x1c7748(0x81))/0x6+parseInt(_0x1c7748(0x77))/0x7*(parseInt(_0x1c7748(0x84))/0x8)+-parseInt(_0x1c7748(0x70))/0x9*(-parseInt(_0x1c7748(0x88))/0xa)+-parseInt(_0x1c7748(0x87))/0xb*(-parseInt(_0x1c7748(0x80))/0xc);if(_0x3f370e===_0x594665)break;else _0x1b83ff['push'](_0x1b83ff['shift']());}catch(_0x227b6a){_0x1b83ff['push'](_0x1b83ff['shift']());}}}(a95_0x4b74,0x9ceca));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0x5415fd}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x5415fd;function a95_0x4b74(){const _0xc608fb=['16QQKvEx','911140ELrHnD','48DzqiMr','trim','stdout','143WYFerX','10OhXdsd','3683907IyPGza','unknown','status','stdio','1986672DOjssB','3GOlAJN','log','699902vdwMbi','join','233398cabyCt','exit\x20','add','inherit','toString','skills','skipNpxSkillsEnvSuffix','866196nvJbyC','1582902yTuMro'];a95_0x4b74=function(){return _0xc608fb;};return a95_0x4b74();}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x22ed38(0x7f)]);function a95_0x15ce(_0x6ab3ca,_0x4d86d5){_0x6ab3ca=_0x6ab3ca-0x70;const _0x4b74c9=a95_0x4b74();let _0x15ce1d=_0x4b74c9[_0x6ab3ca];return _0x15ce1d;}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0xe815c1,_0x241ea0=LOVRABET_SKILL_SOURCE,_0x4b7166){const _0x2d896e=a95_0x22ed38;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x14dd2c=_0x4b7166?.[_0x2d896e(0x73)]??_0x2d896e(0x7c),_0x17ecef=resolveNpmBin('npx'),_0x4acf58=[_0x2d896e(0x7e),_0x2d896e(0x7b),_0x241ea0,'-g','-y'],_0x3bd61e=[_0x17ecef,..._0x4acf58][_0x2d896e(0x78)]('\x20');console[_0x2d896e(0x76)]('*\x20'+_0x3bd61e);const _0xc466e0=spawnSync(_0x17ecef,_0x4acf58,{'cwd':_0xe815c1,'stdio':_0x14dd2c,'env':process.env,'shell':![]});if(_0xc466e0[_0x2d896e(0x72)]===0x0)return{'ok':!![],'status':0x0};let _0x24a4bb=_0x2d896e(0x7a)+(_0xc466e0[_0x2d896e(0x72)]??_0x2d896e(0x71));if(_0x14dd2c==='pipe'){const _0x335e2d=_0xc466e0['stderr']?_0xc466e0['stderr'][_0x2d896e(0x7d)]()['trim']():'',_0x5012ac=_0xc466e0[_0x2d896e(0x86)]?_0xc466e0[_0x2d896e(0x86)][_0x2d896e(0x7d)]()[_0x2d896e(0x85)]():'';if(_0x335e2d)_0x24a4bb=_0x335e2d;else{if(_0x5012ac)_0x24a4bb=_0x5012ac;}}return{'ok':![],'status':_0xc466e0[_0x2d896e(0x72)]??null,'error':_0x24a4bb};}
@@ -1 +1 @@
1
- function a95_0x2c9c(){const _0x140039=['.DS_Store','.svn','SKILL.md','1816BAjjbB','3qQrwdz','4263750kmrcTn','49510MiZDJr','.cache','node_modules','654760qEpUmZ','build','.git','9394TLtEZw','76OQiugh','.next','2277Fwtchb','407LoGNpF','2318246gsvrcG','525036VLccaO','235715Nosudl','dist'];a95_0x2c9c=function(){return _0x140039;};return a95_0x2c9c();}function a95_0x387f(_0x49e170,_0x1520df){_0x49e170=_0x49e170-0x192;const _0x2c9cb6=a95_0x2c9c();let _0x387f69=_0x2c9cb6[_0x49e170];return _0x387f69;}const a95_0x4e1448=a95_0x387f;(function(_0x3a347d,_0x4c1c1d){const _0x3cc715=a95_0x387f,_0x35c6d3=_0x3a347d();while(!![]){try{const _0x203ba=-parseInt(_0x3cc715(0x19f))/0x1+-parseInt(_0x3cc715(0x192))/0x2*(-parseInt(_0x3cc715(0x19a))/0x3)+-parseInt(_0x3cc715(0x1a3))/0x4*(-parseInt(_0x3cc715(0x194))/0x5)+-parseInt(_0x3cc715(0x19b))/0x6+parseInt(_0x3cc715(0x1a2))/0x7*(parseInt(_0x3cc715(0x199))/0x8)+-parseInt(_0x3cc715(0x1a5))/0x9*(-parseInt(_0x3cc715(0x19c))/0xa)+-parseInt(_0x3cc715(0x1a6))/0xb*(parseInt(_0x3cc715(0x193))/0xc);if(_0x203ba===_0x4c1c1d)break;else _0x35c6d3['push'](_0x35c6d3['shift']());}catch(_0x1bce27){_0x35c6d3['push'](_0x35c6d3['shift']());}}}(a95_0x2c9c,0x99477));export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a95_0x4e1448(0x198);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x4e1448(0x196)]);export const IGNORED_DIR_NAMES=new Set([a95_0x4e1448(0x1a1),'.hg',a95_0x4e1448(0x197),a95_0x4e1448(0x19e),a95_0x4e1448(0x1a4),a95_0x4e1448(0x195),a95_0x4e1448(0x1a0),'coverage','.turbo',a95_0x4e1448(0x19d)]);
1
+ const a96_0x5ccc6c=a96_0x22d1;(function(_0x5056ea,_0x4ae284){const _0xabaccc=a96_0x22d1,_0x30739b=_0x5056ea();while(!![]){try{const _0x8a90e1=-parseInt(_0xabaccc(0x15d))/0x1*(-parseInt(_0xabaccc(0x169))/0x2)+-parseInt(_0xabaccc(0x167))/0x3*(-parseInt(_0xabaccc(0x15b))/0x4)+-parseInt(_0xabaccc(0x16a))/0x5+-parseInt(_0xabaccc(0x16b))/0x6*(parseInt(_0xabaccc(0x15a))/0x7)+parseInt(_0xabaccc(0x160))/0x8+parseInt(_0xabaccc(0x15c))/0x9*(-parseInt(_0xabaccc(0x16d))/0xa)+parseInt(_0xabaccc(0x15e))/0xb*(parseInt(_0xabaccc(0x170))/0xc);if(_0x8a90e1===_0x4ae284)break;else _0x30739b['push'](_0x30739b['shift']());}catch(_0x435a70){_0x30739b['push'](_0x30739b['shift']());}}}(a96_0x36ea,0xc0f76));function a96_0x22d1(_0x1cb071,_0x4f709f){_0x1cb071=_0x1cb071-0x15a;const _0x36ea64=a96_0x36ea();let _0x22d11e=_0x36ea64[_0x1cb071];return _0x22d11e;}function a96_0x36ea(){const _0x5ec28d=['.hg','.turbo','.next','.DS_Store','node_modules','6viizZB','coverage','1248xXaPlZ','1375965DFfZtB','1093062fEASdR','.svn','10pRaNst','dist','.cache','468txqDiD','7IyNXvj','2327268KWnGAK','13568382BBnjAH','2349OxdCoM','17061XvytwF','lovrabet.skill.json','523672xCypsy','.git'];a96_0x36ea=function(){return _0x5ec28d;};return a96_0x36ea();}export const METADATA_FILE=a96_0x5ccc6c(0x15f);export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a96_0x5ccc6c(0x165)]);export const IGNORED_DIR_NAMES=new Set([a96_0x5ccc6c(0x161),a96_0x5ccc6c(0x162),a96_0x5ccc6c(0x16c),a96_0x5ccc6c(0x166),a96_0x5ccc6c(0x164),a96_0x5ccc6c(0x16e),'build',a96_0x5ccc6c(0x168),a96_0x5ccc6c(0x163),a96_0x5ccc6c(0x16f)]);
@@ -1 +1 @@
1
- (function(_0x3c4a3d,_0x497626){const _0x417dfb=a96_0x2c46,_0x250170=_0x3c4a3d();while(!![]){try{const _0x1b7dbc=parseInt(_0x417dfb(0xc4))/0x1+parseInt(_0x417dfb(0xb9))/0x2+-parseInt(_0x417dfb(0xb8))/0x3+parseInt(_0x417dfb(0xc5))/0x4*(-parseInt(_0x417dfb(0xbc))/0x5)+-parseInt(_0x417dfb(0xc2))/0x6+parseInt(_0x417dfb(0xc3))/0x7+parseInt(_0x417dfb(0xbe))/0x8*(parseInt(_0x417dfb(0xbb))/0x9);if(_0x1b7dbc===_0x497626)break;else _0x250170['push'](_0x250170['shift']());}catch(_0x2f1b10){_0x250170['push'](_0x250170['shift']());}}}(a96_0x576f,0xcd991));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x587db6,_0x5a4b43){const _0x5bc64c=a96_0x2c46,_0x33eaeb=normalizeSkillRelativePath(_0x5a4b43),_0x340a87=realOrResolved(_0x587db6),_0xbd56e2=resolve(_0x340a87,..._0x33eaeb[_0x5bc64c(0xba)]('/'));if(!isPathInside(_0xbd56e2,_0x340a87))throw CliErrors[_0x5bc64c(0xc8)](_0x5bc64c(0xbd)+_0x5a4b43);return ensureNoSymlinkInManagedPath(_0x340a87,_0x33eaeb),_0xbd56e2;}function a96_0x2c46(_0x57f7bb,_0x37746c){_0x57f7bb=_0x57f7bb-0xb7;const _0x576f74=a96_0x576f();let _0x2c46d0=_0x576f74[_0x57f7bb];return _0x2c46d0;}export function ensureNoSymlinkInManagedPath(_0x223614,_0x54290){const _0x43500e=a96_0x2c46;let _0x4ef348=_0x223614;for(const _0x1d891f of _0x54290[_0x43500e(0xba)]('/')){_0x4ef348=resolve(_0x4ef348,_0x1d891f);const _0x5eecf0=lstatIfPresent(_0x4ef348);if(_0x5eecf0?.[_0x43500e(0xc1)]())throw CliErrors[_0x43500e(0xc8)](_0x43500e(0xc6)+_0x54290);}}export function isDanglingSymlink(_0x3de4b){const _0x3fdbf6=a96_0x2c46;try{return lstatSync(_0x3de4b)[_0x3fdbf6(0xc1)]();}catch{return![];}}export function resolveSymlinkTarget(_0xfd4a47){const _0x454865=readlinkSync(_0xfd4a47);return isAbsolute(_0x454865)?_0x454865:resolve(dirname(_0xfd4a47),_0x454865);}export function isPathInside(_0x3c4252,_0x4d2b04){const _0x998fd8=a96_0x2c46,_0x9c7379=_0x3c4252['endsWith'](sep)?_0x3c4252:''+_0x3c4252+sep,_0x4d790a=_0x4d2b04[_0x998fd8(0xc0)](sep)?_0x4d2b04:''+_0x4d2b04+sep;return _0x3c4252===_0x4d2b04||_0x9c7379['startsWith'](_0x4d790a);}export function realOrResolved(_0x5e9e79){try{return realpathSync(_0x5e9e79);}catch{return resolve(_0x5e9e79);}}export function lstatIfPresent(_0x3340d9){try{return lstatSync(_0x3340d9);}catch{return undefined;}}export function writeTextAtomic(_0x3a02bc,_0x51b3f5,_0x1e730f){const _0x359649=a96_0x2c46;writeBytesAtomic(_0x3a02bc,Buffer['from'](_0x51b3f5,_0x359649(0xb7)),_0x1e730f);}export function writeBytesAtomic(_0x407543,_0x24fb09,_0x419588){const _0x2ab249=a96_0x2c46,_0x126685=_0x407543+_0x2ab249(0xc7);try{writeFileSync(_0x126685,_0x24fb09,{'mode':_0x419588}),renameSync(_0x126685,_0x407543);}catch(_0x44aad6){try{rmSync(_0x126685,{'force':!![]});}catch{}throw _0x44aad6;}}function a96_0x576f(){const _0x4b19e5=['14566131TtnZci','1268935FIGsOM','Unsafe\x20Skill\x20file\x20path:\x20','8tsxaJe','stringify','endsWith','isSymbolicLink','9915420KvGbUT','4027821pOrYuK','332571VhblDV','24nLltXJ','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','.tmp','validation','utf8','240615VLwKwY','3142386LOXzEm','split'];a96_0x576f=function(){return _0x4b19e5;};return a96_0x576f();}export function writeJsonAtomic(_0x33e516,_0x1cde5f){const _0x528d7b=a96_0x2c46;writeTextAtomic(_0x33e516,JSON[_0x528d7b(0xbf)](_0x1cde5f,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x657eed,_0x7d68e){const _0xc2e202=a97_0x3549,_0x51f471=_0x657eed();while(!![]){try{const _0x5619f9=parseInt(_0xc2e202(0x71))/0x1*(-parseInt(_0xc2e202(0x69))/0x2)+-parseInt(_0xc2e202(0x74))/0x3*(-parseInt(_0xc2e202(0x77))/0x4)+parseInt(_0xc2e202(0x68))/0x5+parseInt(_0xc2e202(0x6e))/0x6+-parseInt(_0xc2e202(0x7a))/0x7+parseInt(_0xc2e202(0x6c))/0x8*(parseInt(_0xc2e202(0x6d))/0x9)+parseInt(_0xc2e202(0x6b))/0xa;if(_0x5619f9===_0x7d68e)break;else _0x51f471['push'](_0x51f471['shift']());}catch(_0x594292){_0x51f471['push'](_0x51f471['shift']());}}}(a97_0x4fc0,0x6b080));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x27d6a5,_0x15018f){const _0x5d35cb=a97_0x3549,_0x2e258e=normalizeSkillRelativePath(_0x15018f),_0x19c8bf=realOrResolved(_0x27d6a5),_0x2bd89d=resolve(_0x19c8bf,..._0x2e258e[_0x5d35cb(0x79)]('/'));if(!isPathInside(_0x2bd89d,_0x19c8bf))throw CliErrors[_0x5d35cb(0x6a)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x15018f);return ensureNoSymlinkInManagedPath(_0x19c8bf,_0x2e258e),_0x2bd89d;}export function ensureNoSymlinkInManagedPath(_0x54b59d,_0x162180){const _0x389aee=a97_0x3549;let _0x3e4b3f=_0x54b59d;for(const _0x5551bf of _0x162180[_0x389aee(0x79)]('/')){_0x3e4b3f=resolve(_0x3e4b3f,_0x5551bf);const _0x35db8e=lstatIfPresent(_0x3e4b3f);if(_0x35db8e?.[_0x389aee(0x78)]())throw CliErrors[_0x389aee(0x6a)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x162180);}}function a97_0x3549(_0x4017a8,_0x5699f8){_0x4017a8=_0x4017a8-0x68;const _0x4fc00f=a97_0x4fc0();let _0x3549f2=_0x4fc00f[_0x4017a8];return _0x3549f2;}export function isDanglingSymlink(_0x4e4999){const _0x397d02=a97_0x3549;try{return lstatSync(_0x4e4999)[_0x397d02(0x78)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4c293a){const _0x17f88b=readlinkSync(_0x4c293a);return isAbsolute(_0x17f88b)?_0x17f88b:resolve(dirname(_0x4c293a),_0x17f88b);}export function isPathInside(_0x1aa826,_0x35d250){const _0x1444df=a97_0x3549,_0x46c88f=_0x1aa826[_0x1444df(0x70)](sep)?_0x1aa826:''+_0x1aa826+sep,_0xb35bda=_0x35d250['endsWith'](sep)?_0x35d250:''+_0x35d250+sep;return _0x1aa826===_0x35d250||_0x46c88f[_0x1444df(0x75)](_0xb35bda);}export function realOrResolved(_0x26c3e8){try{return realpathSync(_0x26c3e8);}catch{return resolve(_0x26c3e8);}}export function lstatIfPresent(_0x4d6e23){try{return lstatSync(_0x4d6e23);}catch{return undefined;}}export function writeTextAtomic(_0xe5268d,_0x8c613e,_0x4106d9){const _0x3a8259=a97_0x3549;writeBytesAtomic(_0xe5268d,Buffer[_0x3a8259(0x73)](_0x8c613e,_0x3a8259(0x6f)),_0x4106d9);}export function writeBytesAtomic(_0x5bae68,_0x1d00b3,_0x42ca38){const _0x5a7dfb=a97_0x3549,_0x5b35bf=_0x5bae68+_0x5a7dfb(0x76);try{writeFileSync(_0x5b35bf,_0x1d00b3,{'mode':_0x42ca38}),renameSync(_0x5b35bf,_0x5bae68);}catch(_0x46bc0f){try{rmSync(_0x5b35bf,{'force':!![]});}catch{}throw _0x46bc0f;}}export function writeJsonAtomic(_0xec1275,_0x3d7b14){const _0x2cf9e6=a97_0x3549;writeTextAtomic(_0xec1275,JSON[_0x2cf9e6(0x72)](_0x3d7b14,null,0x2)+'\x0a',0x180);}function a97_0x4fc0(){const _0x15e946=['isSymbolicLink','split','1582168kgrthY','153175tZAUus','12244KGXXOV','validation','5674750pQTlLF','24BAlGCE','307971foXjTz','389100kPAXeB','utf8','endsWith','28jMCuuP','stringify','from','3wMhbuz','startsWith','.tmp','280892AYsAZF'];a97_0x4fc0=function(){return _0x15e946;};return a97_0x4fc0();}
@@ -1 +1 @@
1
- (function(_0x1fefff,_0x4a8546){const _0x5d141f=a97_0x1344,_0x1c8fd1=_0x1fefff();while(!![]){try{const _0x1bad83=parseInt(_0x5d141f(0xbb))/0x1+parseInt(_0x5d141f(0xb7))/0x2+-parseInt(_0x5d141f(0xba))/0x3*(parseInt(_0x5d141f(0xb4))/0x4)+-parseInt(_0x5d141f(0xb6))/0x5+-parseInt(_0x5d141f(0xb5))/0x6+parseInt(_0x5d141f(0xb3))/0x7*(parseInt(_0x5d141f(0xb8))/0x8)+parseInt(_0x5d141f(0xb2))/0x9;if(_0x1bad83===_0x4a8546)break;else _0x1c8fd1['push'](_0x1c8fd1['shift']());}catch(_0x2df7c7){_0x1c8fd1['push'](_0x1c8fd1['shift']());}}}(a97_0x3a0c,0xd3b00));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x3f34e2){const _0x36817=a97_0x1344;return createHash(_0x36817(0xb1))[_0x36817(0xaf)](_0x3f34e2)[_0x36817(0xb0)](_0x36817(0xb9));}function a97_0x1344(_0x479cf0,_0x1f168e){_0x479cf0=_0x479cf0-0xaf;const _0x3a0c79=a97_0x3a0c();let _0x1344d2=_0x3a0c79[_0x479cf0];return _0x1344d2;}export function fileHash(_0x48118e){return bufferSha256(fileContent(_0x48118e));}function a97_0x3a0c(){const _0x24aa42=['2062074BDtFgt','3030865kDzXbu','2954152AmcCNh','56gYaoTe','hex','2754144smdYme','535429MsjQxV','size','update','digest','sha256','6431832abklSy','7819zZPwnX','4ippQZR'];a97_0x3a0c=function(){return _0x24aa42;};return a97_0x3a0c();}export function bufferSha256(_0x304ccf){const _0x3ccff9=a97_0x1344;return createHash(_0x3ccff9(0xb1))[_0x3ccff9(0xaf)](_0x304ccf)[_0x3ccff9(0xb0)](_0x3ccff9(0xb9));}export function fileTreeHash(_0x2fc510){const _0x403f26=a97_0x1344,_0x1e2ffe=createHash(_0x403f26(0xb1));for(const _0x2cf0e9 of normalizeManifestFiles(_0x2fc510)){_0x1e2ffe['update'](_0x2cf0e9['path']),_0x1e2ffe['update']('\x00'),_0x1e2ffe['update'](_0x2cf0e9[_0x403f26(0xb1)]),_0x1e2ffe[_0x403f26(0xaf)]('\x00'),_0x1e2ffe[_0x403f26(0xaf)](String(_0x2cf0e9[_0x403f26(0xbc)])),_0x1e2ffe['update']('\x00');}return _0x1e2ffe['digest']('hex');}
1
+ (function(_0x198533,_0x3a633e){const _0x4c06b3=a98_0xc921,_0x10002c=_0x198533();while(!![]){try{const _0x3f723f=-parseInt(_0x4c06b3(0x10c))/0x1*(-parseInt(_0x4c06b3(0x111))/0x2)+-parseInt(_0x4c06b3(0x10f))/0x3+parseInt(_0x4c06b3(0x109))/0x4*(-parseInt(_0x4c06b3(0x107))/0x5)+-parseInt(_0x4c06b3(0x106))/0x6*(parseInt(_0x4c06b3(0x10a))/0x7)+-parseInt(_0x4c06b3(0x108))/0x8*(-parseInt(_0x4c06b3(0x103))/0x9)+parseInt(_0x4c06b3(0x10e))/0xa+parseInt(_0x4c06b3(0x102))/0xb*(parseInt(_0x4c06b3(0x10b))/0xc);if(_0x3f723f===_0x3a633e)break;else _0x10002c['push'](_0x10002c['shift']());}catch(_0x567df9){_0x10002c['push'](_0x10002c['shift']());}}}(a98_0x12fc,0xee8cb));function a98_0x12fc(){const _0x3709b8=['11362130csuREl','869364KXkxtU','size','2mXubqI','sha256','11glAJyN','9054RarJkZ','digest','update','12cMWreW','1105IEaLEW','7408xPMHAO','22696sQwEJH','160727nfEaPI','2389284brNFOa','299887eyXdWQ','hex'];a98_0x12fc=function(){return _0x3709b8;};return a98_0x12fc();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2ed5c6){const _0x276909=a98_0xc921;return createHash(_0x276909(0x112))[_0x276909(0x105)](_0x2ed5c6)[_0x276909(0x104)](_0x276909(0x10d));}function a98_0xc921(_0x143973,_0x277517){_0x143973=_0x143973-0x102;const _0x12fc0d=a98_0x12fc();let _0xc921f9=_0x12fc0d[_0x143973];return _0xc921f9;}export function fileHash(_0x56bfb4){return bufferSha256(fileContent(_0x56bfb4));}export function bufferSha256(_0x3b5718){const _0x3123eb=a98_0xc921;return createHash(_0x3123eb(0x112))[_0x3123eb(0x105)](_0x3b5718)[_0x3123eb(0x104)](_0x3123eb(0x10d));}export function fileTreeHash(_0x3bfde1){const _0x351c1c=a98_0xc921,_0x15826d=createHash(_0x351c1c(0x112));for(const _0x5f77dc of normalizeManifestFiles(_0x3bfde1)){_0x15826d[_0x351c1c(0x105)](_0x5f77dc['path']),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d['update'](_0x5f77dc[_0x351c1c(0x112)]),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d[_0x351c1c(0x105)](String(_0x5f77dc[_0x351c1c(0x110)])),_0x15826d[_0x351c1c(0x105)]('\x00');}return _0x15826d[_0x351c1c(0x104)](_0x351c1c(0x10d));}
@@ -1 +1 @@
1
- (function(_0x4ea0e6,_0x19c9b7){const _0x3648b3=a98_0x4dcd,_0x45a385=_0x4ea0e6();while(!![]){try{const _0x46652a=parseInt(_0x3648b3(0x120))/0x1+-parseInt(_0x3648b3(0x149))/0x2*(parseInt(_0x3648b3(0x12b))/0x3)+-parseInt(_0x3648b3(0x140))/0x4*(-parseInt(_0x3648b3(0x14c))/0x5)+-parseInt(_0x3648b3(0x14a))/0x6*(parseInt(_0x3648b3(0x153))/0x7)+parseInt(_0x3648b3(0x14e))/0x8+parseInt(_0x3648b3(0x136))/0x9*(parseInt(_0x3648b3(0x125))/0xa)+-parseInt(_0x3648b3(0x13b))/0xb*(parseInt(_0x3648b3(0x124))/0xc);if(_0x46652a===_0x19c9b7)break;else _0x45a385['push'](_0x45a385['shift']());}catch(_0x29b602){_0x45a385['push'](_0x45a385['shift']());}}}(a98_0x4585,0xa7d4c));function a98_0x4dcd(_0x5a0013,_0x40dba4){_0x5a0013=_0x5a0013-0x11e;const _0x45859a=a98_0x4585();let _0x4dcd11=_0x45859a[_0x5a0013];return _0x4dcd11;}import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x50d142 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x50d142;export function linkEffectiveRuntimeSkills(_0x5b6469,_0x2f9238,_0x43ed17={}){const _0xfcba60=a98_0x4dcd,_0x114ed2=new Map();for(const _0x1be044 of _0x5b6469){const _0x362dc6=_0x1be044[_0xfcba60(0x143)]['skillCode'];if(!_0x362dc6)continue;const _0x5aa24c=_0x114ed2[_0xfcba60(0x146)](_0x362dc6);(!_0x5aa24c||_0x1be044[_0xfcba60(0x126)]===_0xfcba60(0x137))&&_0x114ed2[_0xfcba60(0x13a)](_0x362dc6,_0x1be044);}const _0x5783e9=[],_0x4fe1c3=resolveSkillSyncPaths(_0x43ed17);for(const _0x5ac37e of _0x114ed2['values']()){const _0x5b62b6=requireSkillCode(_0x5ac37e[_0xfcba60(0x143)]),_0x2beeac=_0x2f9238+'--'+_0x5b62b6;for(const _0x14ef60 of runtimeAgentSkillRoots(_0x4fe1c3)){_0x5783e9[_0xfcba60(0x14f)](ensureManagedSymlink(resolve(_0x14ef60,_0x2beeac),_0x5ac37e[_0xfcba60(0x144)],_0x4fe1c3['managedRoot']));}}return _0x5783e9;}export function pruneStaleRuntimeSkillLinks(_0x45acbf,_0x10638c,_0x4ab979={},_0x8f1cce){const _0x166825=a98_0x4dcd,_0x500658=resolveSkillSyncPaths(_0x4ab979),_0x3c83db=new Set([..._0x10638c]['map'](_0x4d83a9=>_0x4d83a9[_0x166825(0x123)]())['filter'](Boolean)),_0x389459=_0x8f1cce?new Set([..._0x8f1cce][_0x166825(0x12e)](_0x2fb109=>_0x2fb109[_0x166825(0x123)]())[_0x166825(0x14d)](Boolean)):undefined,_0x366c11=[];for(const _0x2d885f of runtimeAgentSkillRoots(_0x500658)){for(const _0x480504 of managedAppSkillLinkPaths(_0x2d885f,_0x45acbf)){const _0x24f4d9=basename(_0x480504)[_0x166825(0x131)]((_0x45acbf+'--')[_0x166825(0x130)]);if(_0x389459&&!_0x389459[_0x166825(0x12d)](_0x24f4d9))continue;if(_0x3c83db['has'](_0x24f4d9))continue;_0x366c11['push'](removeManagedSkillLink(_0x480504,_0x500658[_0x166825(0x135)]));}}return _0x366c11;}export function pruneStaleRuntimeSkillCache(_0x3f62c2,_0x394c6a={}){const _0x1afb55=a98_0x4dcd,_0x860aac=new Set([..._0x3f62c2[_0x1afb55(0x147)]][_0x1afb55(0x12e)](_0x3b9ea5=>_0x3b9ea5[_0x1afb55(0x123)]())[_0x1afb55(0x14d)](Boolean)),_0x285f27=_0x3f62c2[_0x1afb55(0x152)]?new Set([..._0x3f62c2[_0x1afb55(0x152)]]['map'](_0x1e2c2a=>_0x1e2c2a[_0x1afb55(0x123)]())['filter'](Boolean)):undefined,_0x382bbe=_0x3f62c2[_0x1afb55(0x148)]??[_0x1afb55(0x137),_0x1afb55(0x12f)],_0x2803ed=resolve(getRuntimeSkillCacheRoot(_0x3f62c2[_0x1afb55(0x13d)],_0x3f62c2[_0x1afb55(0x133)],_0x394c6a),safePathSegment(_0x3f62c2[_0x1afb55(0x151)],_0x1afb55(0x151))),_0x12d571=[];for(const _0xbc6f44 of _0x382bbe){const _0x596d13=resolve(_0x2803ed,_0xbc6f44);if(!existsSync(_0x596d13))continue;for(const _0x10cbca of readdirSync(_0x596d13,{'withFileTypes':!![]})){if(!_0x10cbca[_0x1afb55(0x132)]())continue;const _0x340d54=_0x10cbca['name'];if(_0x285f27&&!_0x285f27[_0x1afb55(0x12d)](_0x340d54))continue;if(_0x860aac['has'](_0x340d54))continue;const _0x32d4cf=resolve(_0x596d13,_0x340d54),_0xf687b7=readMetadataIfPresent(resolve(_0x32d4cf,METADATA_FILE));if(_0xf687b7?.[_0x1afb55(0x151)]!==_0x3f62c2[_0x1afb55(0x151)]||_0xf687b7[_0x1afb55(0x126)]!==_0xbc6f44||_0xf687b7[_0x1afb55(0x122)]!==_0x340d54){_0x12d571[_0x1afb55(0x14f)]({'path':_0x32d4cf,'action':_0x1afb55(0x11e),'reason':_0x1afb55(0x139)});continue;}removeSync(_0x32d4cf),_0x12d571[_0x1afb55(0x14f)]({'path':_0x32d4cf,'action':_0x1afb55(0x127)});}}return _0x12d571;}function a98_0x4585(){const _0x4caa4d=['skillCode','trim','9574212weesyo','518070GcLYnO','scope','removed','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','builtin','1491EjPpaI','external-symlink','has','map','company','length','slice','isDirectory','accessKey','updated','managedRoot','9nWyfFs','personal','name','metadata-mismatch','set','22bWixgM','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','env','startsWith','created','2527764rSwebJ','isSymbolicLink','validation','skill','dir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','get','activeSkillCodes','scopes','4502keHUcZ','954pbLKPT','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','10pZUkKk','filter','8395256rDQTwH','push','unchanged','appCode','pruneSkillCodes','9093VjeIQd','skipped','agentsSkillsDir','1243330Wvguvc','contentHash'];a98_0x4585=function(){return _0x4caa4d;};return a98_0x4585();}export function linkGlobalRuntimeSkills(_0x43fa6e,_0x320d15={}){const _0x5eb047=a98_0x4dcd,_0x3e61ea=resolveSkillSyncPaths(_0x320d15),_0x5b7363=[];for(const _0x5e94ab of _0x43fa6e){if(_0x5e94ab[_0x5eb047(0x126)]!==_0x5eb047(0x12a))throw CliErrors['validation'](_0x5eb047(0x128)+_0x5e94ab[_0x5eb047(0x126)]);const _0x1857c2=requireSkillCode(_0x5e94ab[_0x5eb047(0x143)]),_0x117350=copyManagedSkillDirectory(_0x5e94ab[_0x5eb047(0x144)],resolve(_0x3e61ea[_0x5eb047(0x11f)],_0x1857c2));_0x5b7363[_0x5eb047(0x14f)]({..._0x117350,'contentHash':_0x5e94ab['contentHash']});}return _0x5b7363;}function ensureManagedSymlink(_0x2ca66d,_0x52510b,_0x3359b7){const _0x1e4fe7=a98_0x4dcd;mkdirSync(dirname(_0x2ca66d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2ca66d)||isDanglingSymlink(_0x2ca66d)){const _0x3e43e1=lstatSync(_0x2ca66d);if(!_0x3e43e1[_0x1e4fe7(0x141)]())throw CliErrors['validation'](_0x1e4fe7(0x14b)+_0x2ca66d);const _0x566b56=resolveSymlinkTarget(_0x2ca66d);if(!isPathInside(realOrResolved(_0x566b56),realOrResolved(_0x3359b7)))throw CliErrors[_0x1e4fe7(0x142)](_0x1e4fe7(0x129)+_0x2ca66d);if(realOrResolved(_0x566b56)===realOrResolved(_0x52510b))return{'path':_0x2ca66d,'target':_0x52510b,'action':_0x1e4fe7(0x150)};return unlinkSync(_0x2ca66d),symlinkSync(_0x52510b,_0x2ca66d,_0x1e4fe7(0x144)),{'path':_0x2ca66d,'target':_0x52510b,'action':_0x1e4fe7(0x134)};}return symlinkSync(_0x52510b,_0x2ca66d,_0x1e4fe7(0x144)),{'path':_0x2ca66d,'target':_0x52510b,'action':_0x1e4fe7(0x13f)};}function managedAppSkillLinkPaths(_0x16b65f,_0x5c4b73){const _0x1707ed=a98_0x4dcd;if(!existsSync(_0x16b65f))return[];const _0x4be400=_0x5c4b73+'--';return readdirSync(_0x16b65f,{'withFileTypes':!![]})[_0x1707ed(0x14d)](_0x162b99=>_0x162b99['name'][_0x1707ed(0x13e)](_0x4be400))[_0x1707ed(0x12e)](_0x5ae93d=>resolve(_0x16b65f,_0x5ae93d[_0x1707ed(0x138)]));}function removeManagedSkillLink(_0x516158,_0x5d94b6){const _0x332b60=a98_0x4dcd,_0x1a8f94=lstatIfPresent(_0x516158);if(!_0x1a8f94?.['isSymbolicLink']())return{'path':_0x516158,'action':_0x332b60(0x11e),'reason':'not-managed-symlink'};const _0xff9da5=resolveSymlinkTarget(_0x516158);if(!isPathInside(realOrResolved(_0xff9da5),realOrResolved(_0x5d94b6)))return{'path':_0x516158,'action':_0x332b60(0x11e),'reason':_0x332b60(0x12c)};return unlinkSync(_0x516158),{'path':_0x516158,'action':'removed'};}export function copyManagedSkillDirectory(_0x2f1af4,_0x562cc9){const _0x28141d=a98_0x4dcd,_0x45f3a7=resolve(_0x562cc9,METADATA_FILE),_0x5e1452=existsSync(_0x562cc9);if(_0x5e1452){const _0x5b1e5c=lstatSync(_0x562cc9);if(_0x5b1e5c[_0x28141d(0x141)]())throw CliErrors[_0x28141d(0x142)](_0x28141d(0x145)+_0x562cc9);if(!_0x5b1e5c[_0x28141d(0x132)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x562cc9);const _0x38d189=readMetadataIfPresent(_0x45f3a7);if(_0x38d189?.[_0x28141d(0x126)]!==_0x28141d(0x12a))throw CliErrors[_0x28141d(0x142)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x562cc9);}ensureDirSync(dirname(_0x562cc9));const _0x5aecab=_0x5e1452?readMetadataIfPresent(_0x45f3a7)?.[_0x28141d(0x121)]:undefined,_0x34590a=readMetadataIfPresent(resolve(_0x2f1af4,METADATA_FILE))?.['contentHash'];return _0x5e1452&&removeSync(_0x562cc9),copySkillDirectory(_0x2f1af4,_0x562cc9),{'path':_0x562cc9,'target':_0x2f1af4,'action':!_0x5e1452?_0x28141d(0x13f):_0x5aecab===_0x34590a?'unchanged':_0x28141d(0x134)};}function copySkillDirectory(_0x2a1d41,_0x2d9e59){copySync(_0x2a1d41,_0x2d9e59,{'dereference':![],'overwrite':!![],'filter'(_0x3b8ec6){const _0x1adabf=a98_0x4dcd;if(lstatSync(_0x3b8ec6)[_0x1adabf(0x141)]())throw CliErrors['validation'](_0x1adabf(0x13c)+_0x3b8ec6);return!![];}});}
1
+ (function(_0x13e275,_0x4ab78e){const _0x62b97f=a99_0x26cc,_0x3f7d17=_0x13e275();while(!![]){try{const _0x3870e8=parseInt(_0x62b97f(0x152))/0x1+-parseInt(_0x62b97f(0x151))/0x2+-parseInt(_0x62b97f(0x132))/0x3+-parseInt(_0x62b97f(0x136))/0x4*(-parseInt(_0x62b97f(0x14f))/0x5)+parseInt(_0x62b97f(0x12b))/0x6*(parseInt(_0x62b97f(0x137))/0x7)+parseInt(_0x62b97f(0x14b))/0x8+parseInt(_0x62b97f(0x139))/0x9*(-parseInt(_0x62b97f(0x150))/0xa);if(_0x3870e8===_0x4ab78e)break;else _0x3f7d17['push'](_0x3f7d17['shift']());}catch(_0x417068){_0x3f7d17['push'](_0x3f7d17['shift']());}}}(a99_0x4b80,0xe0af0));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a99_0x4b80(){const _0x3af04e=['12487216BffyGO','name','has','scopes','756340WyNKBn','170kAJhQk','1798596RbUsxK','1834077HbyNGs','activeSkillCodes','not-managed-symlink','set','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','external-symlink','created','env','pruneSkillCodes','6GEFcAB','company','skillCode','length','builtin','isSymbolicLink','isDirectory','4435779DSIeYX','scope','accessKey','push','8Qsxxyj','9860529JCehNN','agentsSkillsDir','957159aBbAKZ','map','appCode','updated','filter','skill','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','contentHash','get','managedRoot','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','trim','validation','unchanged','skipped','personal','dir'];a99_0x4b80=function(){return _0x3af04e;};return a99_0x4b80();}import{basename,dirname,resolve}from'node:path';import a99_0x617dbf from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x617dbf;export function linkEffectiveRuntimeSkills(_0x426138,_0x11b00d,_0x1de22e={}){const _0x54c7a3=a99_0x26cc,_0x4f86b2=new Map();for(const _0x40d3f9 of _0x426138){const _0x276327=_0x40d3f9[_0x54c7a3(0x13e)]['skillCode'];if(!_0x276327)continue;const _0x3c4ad6=_0x4f86b2[_0x54c7a3(0x141)](_0x276327);(!_0x3c4ad6||_0x40d3f9['scope']===_0x54c7a3(0x149))&&_0x4f86b2[_0x54c7a3(0x125)](_0x276327,_0x40d3f9);}const _0x48d775=[],_0x21093c=resolveSkillSyncPaths(_0x1de22e);for(const _0x2c4c1b of _0x4f86b2['values']()){const _0x493374=requireSkillCode(_0x2c4c1b['skill']),_0x3f962c=_0x11b00d+'--'+_0x493374;for(const _0x241a85 of runtimeAgentSkillRoots(_0x21093c)){_0x48d775['push'](ensureManagedSymlink(resolve(_0x241a85,_0x3f962c),_0x2c4c1b['dir'],_0x21093c[_0x54c7a3(0x142)]));}}return _0x48d775;}export function pruneStaleRuntimeSkillLinks(_0x5ef0e7,_0x145522,_0x27761d={},_0x551d94){const _0x4aadea=a99_0x26cc,_0x1e8d1e=resolveSkillSyncPaths(_0x27761d),_0x51ca09=new Set([..._0x145522][_0x4aadea(0x13a)](_0x2ab94e=>_0x2ab94e['trim']())[_0x4aadea(0x13d)](Boolean)),_0x2b2eac=_0x551d94?new Set([..._0x551d94][_0x4aadea(0x13a)](_0x35da29=>_0x35da29[_0x4aadea(0x145)]())[_0x4aadea(0x13d)](Boolean)):undefined,_0x357675=[];for(const _0x5030c3 of runtimeAgentSkillRoots(_0x1e8d1e)){for(const _0x15abb2 of managedAppSkillLinkPaths(_0x5030c3,_0x5ef0e7)){const _0x3527ec=basename(_0x15abb2)['slice']((_0x5ef0e7+'--')[_0x4aadea(0x12e)]);if(_0x2b2eac&&!_0x2b2eac[_0x4aadea(0x14d)](_0x3527ec))continue;if(_0x51ca09[_0x4aadea(0x14d)](_0x3527ec))continue;_0x357675[_0x4aadea(0x135)](removeManagedSkillLink(_0x15abb2,_0x1e8d1e[_0x4aadea(0x142)]));}}return _0x357675;}function a99_0x26cc(_0x414944,_0x3ad428){_0x414944=_0x414944-0x124;const _0x4b80e6=a99_0x4b80();let _0x26ccf2=_0x4b80e6[_0x414944];return _0x26ccf2;}export function pruneStaleRuntimeSkillCache(_0x2a7e5a,_0x3ab3b0={}){const _0x119edf=a99_0x26cc,_0x2f9dd1=new Set([..._0x2a7e5a[_0x119edf(0x153)]]['map'](_0x1ad2b8=>_0x1ad2b8[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)),_0x23b84a=_0x2a7e5a[_0x119edf(0x12a)]?new Set([..._0x2a7e5a[_0x119edf(0x12a)]][_0x119edf(0x13a)](_0xd49063=>_0xd49063[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)):undefined,_0x3e830d=_0x2a7e5a[_0x119edf(0x14e)]??[_0x119edf(0x149),_0x119edf(0x12c)],_0x10606b=resolve(getRuntimeSkillCacheRoot(_0x2a7e5a[_0x119edf(0x129)],_0x2a7e5a[_0x119edf(0x134)],_0x3ab3b0),safePathSegment(_0x2a7e5a[_0x119edf(0x13b)],'appCode')),_0xd68976=[];for(const _0x32eac6 of _0x3e830d){const _0x548d6a=resolve(_0x10606b,_0x32eac6);if(!existsSync(_0x548d6a))continue;for(const _0x2d77c2 of readdirSync(_0x548d6a,{'withFileTypes':!![]})){if(!_0x2d77c2['isDirectory']())continue;const _0x450621=_0x2d77c2['name'];if(_0x23b84a&&!_0x23b84a['has'](_0x450621))continue;if(_0x2f9dd1[_0x119edf(0x14d)](_0x450621))continue;const _0x4c1048=resolve(_0x548d6a,_0x450621),_0x253551=readMetadataIfPresent(resolve(_0x4c1048,METADATA_FILE));if(_0x253551?.[_0x119edf(0x13b)]!==_0x2a7e5a[_0x119edf(0x13b)]||_0x253551[_0x119edf(0x133)]!==_0x32eac6||_0x253551[_0x119edf(0x12d)]!==_0x450621){_0xd68976[_0x119edf(0x135)]({'path':_0x4c1048,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x4c1048),_0xd68976['push']({'path':_0x4c1048,'action':_0x119edf(0x143)});}}return _0xd68976;}export function linkGlobalRuntimeSkills(_0x442dcd,_0x4d2c9e={}){const _0x1a6779=a99_0x26cc,_0x4530fc=resolveSkillSyncPaths(_0x4d2c9e),_0x1d1458=[];for(const _0x2091a3 of _0x442dcd){if(_0x2091a3[_0x1a6779(0x133)]!==_0x1a6779(0x12f))throw CliErrors[_0x1a6779(0x146)](_0x1a6779(0x13f)+_0x2091a3['scope']);const _0x4324f4=requireSkillCode(_0x2091a3[_0x1a6779(0x13e)]),_0x1f59de=copyManagedSkillDirectory(_0x2091a3[_0x1a6779(0x14a)],resolve(_0x4530fc[_0x1a6779(0x138)],_0x4324f4));_0x1d1458[_0x1a6779(0x135)]({..._0x1f59de,'contentHash':_0x2091a3['contentHash']});}return _0x1d1458;}function ensureManagedSymlink(_0x457c66,_0x91483,_0x342711){const _0x274c22=a99_0x26cc;mkdirSync(dirname(_0x457c66),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x457c66)||isDanglingSymlink(_0x457c66)){const _0x4c0d64=lstatSync(_0x457c66);if(!_0x4c0d64['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x457c66);const _0x279347=resolveSymlinkTarget(_0x457c66);if(!isPathInside(realOrResolved(_0x279347),realOrResolved(_0x342711)))throw CliErrors[_0x274c22(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x457c66);if(realOrResolved(_0x279347)===realOrResolved(_0x91483))return{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x147)};return unlinkSync(_0x457c66),symlinkSync(_0x91483,_0x457c66,_0x274c22(0x14a)),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x13c)};}return symlinkSync(_0x91483,_0x457c66,'dir'),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x128)};}function managedAppSkillLinkPaths(_0x3387e6,_0x25a182){const _0x4683f4=a99_0x26cc;if(!existsSync(_0x3387e6))return[];const _0x4559a4=_0x25a182+'--';return readdirSync(_0x3387e6,{'withFileTypes':!![]})['filter'](_0x586021=>_0x586021[_0x4683f4(0x14c)]['startsWith'](_0x4559a4))[_0x4683f4(0x13a)](_0x108d4b=>resolve(_0x3387e6,_0x108d4b[_0x4683f4(0x14c)]));}function removeManagedSkillLink(_0x53bfe0,_0x22b263){const _0x53faaa=a99_0x26cc,_0x56c61c=lstatIfPresent(_0x53bfe0);if(!_0x56c61c?.['isSymbolicLink']())return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x124)};const _0xc8d379=resolveSymlinkTarget(_0x53bfe0);if(!isPathInside(realOrResolved(_0xc8d379),realOrResolved(_0x22b263)))return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x127)};return unlinkSync(_0x53bfe0),{'path':_0x53bfe0,'action':_0x53faaa(0x143)};}export function copyManagedSkillDirectory(_0x5d4b56,_0x359c9c){const _0x1abaaf=a99_0x26cc,_0x222ff8=resolve(_0x359c9c,METADATA_FILE),_0x3b9e0d=existsSync(_0x359c9c);if(_0x3b9e0d){const _0x1c2951=lstatSync(_0x359c9c);if(_0x1c2951[_0x1abaaf(0x130)]())throw CliErrors[_0x1abaaf(0x146)](_0x1abaaf(0x144)+_0x359c9c);if(!_0x1c2951[_0x1abaaf(0x131)]())throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x359c9c);const _0x2366ab=readMetadataIfPresent(_0x222ff8);if(_0x2366ab?.[_0x1abaaf(0x133)]!==_0x1abaaf(0x12f))throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x359c9c);}ensureDirSync(dirname(_0x359c9c));const _0x283705=_0x3b9e0d?readMetadataIfPresent(_0x222ff8)?.[_0x1abaaf(0x140)]:undefined,_0x47e07f=readMetadataIfPresent(resolve(_0x5d4b56,METADATA_FILE))?.[_0x1abaaf(0x140)];return _0x3b9e0d&&removeSync(_0x359c9c),copySkillDirectory(_0x5d4b56,_0x359c9c),{'path':_0x359c9c,'target':_0x5d4b56,'action':!_0x3b9e0d?_0x1abaaf(0x128):_0x283705===_0x47e07f?_0x1abaaf(0x147):_0x1abaaf(0x13c)};}function copySkillDirectory(_0x31ad71,_0x1ff6fe){copySync(_0x31ad71,_0x1ff6fe,{'dereference':![],'overwrite':!![],'filter'(_0x403ffa){const _0x324a7c=a99_0x26cc;if(lstatSync(_0x403ffa)['isSymbolicLink']())throw CliErrors[_0x324a7c(0x146)](_0x324a7c(0x126)+_0x403ffa);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x3f1774,_0x13acc5){const _0x2cc0e4=a99_0xf306,_0x5f7477=_0x3f1774();while(!![]){try{const _0x243937=parseInt(_0x2cc0e4(0xb7))/0x1+parseInt(_0x2cc0e4(0xa4))/0x2*(parseInt(_0x2cc0e4(0x94))/0x3)+parseInt(_0x2cc0e4(0x96))/0x4+parseInt(_0x2cc0e4(0x97))/0x5*(parseInt(_0x2cc0e4(0xaa))/0x6)+parseInt(_0x2cc0e4(0xb0))/0x7*(-parseInt(_0x2cc0e4(0x9b))/0x8)+parseInt(_0x2cc0e4(0xb4))/0x9+-parseInt(_0x2cc0e4(0x9c))/0xa;if(_0x243937===_0x13acc5)break;else _0x5f7477['push'](_0x5f7477['shift']());}catch(_0x1f99c6){_0x5f7477['push'](_0x5f7477['shift']());}}}(a99_0x105a,0x2727c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x544d8d,_0x23f6fb={}){const _0x253c9b=a99_0xf306,_0x48ba72=safePathSegment(_0x544d8d['appCode'],_0x253c9b(0xab)),_0x24c7db=normalizeRuntimeSkillScopes(_0x544d8d[_0x253c9b(0xaf)]),_0x58d5c4=new Set(_0x24c7db),_0x4bf9f8=_0x544d8d[_0x253c9b(0x95)]?.[_0x253c9b(0x9d)](),_0x40f641=new Map(),_0x1cc85f=resolve(getRuntimeSkillCacheRoot(_0x544d8d[_0x253c9b(0xb3)],_0x544d8d['accessKey'],_0x23f6fb),_0x48ba72);for(const _0x470082 of _0x24c7db){for(const _0x2490a5 of localSkillEntryDirs(resolve(_0x1cc85f,_0x470082))){collectLocalRuntimeSkill(_0x40f641,_0x2490a5,{'appCode':_0x48ba72,'scopes':_0x58d5c4,'code':_0x4bf9f8,'source':_0x253c9b(0xac)});}}const _0xdf3cf8=resolveSkillSyncPaths(_0x23f6fb);for(const _0x431953 of runtimeAgentSkillRoots(_0xdf3cf8)){for(const _0x11ab05 of localSkillLinkCandidates(_0x431953,_0x48ba72,_0x58d5c4)){collectLocalRuntimeSkill(_0x40f641,_0x11ab05,{'appCode':_0x48ba72,'scopes':_0x58d5c4,'code':_0x4bf9f8,'source':_0x253c9b(0xa6),'linkedPath':_0x11ab05});}}return Array[_0x253c9b(0xbc)](_0x40f641[_0x253c9b(0xb1)]())['sort'](compareLocalRuntimeSkills);}function a99_0xf306(_0xec5bd8,_0x5bd66e){_0xec5bd8=_0xec5bd8-0x93;const _0x105a13=a99_0x105a();let _0xf30611=_0x105a13[_0xec5bd8];return _0xf30611;}function a99_0x105a(){const _0x36ac37=['1446345fkMgXK','builtin','sort','60138YoCRvH','isSymbolicLink','skillCode','set','dir','from','has','name','includes','309nSzaqz','code','498292mnRWGH','5CAssLz','linkedPaths','startsWith','local','17608ajmuIz','3865210OLLCno','trim','skillMdPath','source','get','filter','cacheDir','isDirectory','1266NVJAON','scope','link','tags','linkedPath','localeCompare','830922cBmYlp','appCode','cache','isArray','map','scopes','7cVSuJY','values','push','env'];a99_0x105a=function(){return _0x36ac37;};return a99_0x105a();}function localSkillEntryDirs(_0x5b5151){const _0x1695eb=a99_0xf306;if(!existsSync(_0x5b5151))return[];return readdirSync(_0x5b5151,{'withFileTypes':!![]})['filter'](_0x52468a=>_0x52468a[_0x1695eb(0xa3)]()||_0x52468a['isSymbolicLink']())[_0x1695eb(0xae)](_0x375790=>resolve(_0x5b5151,_0x375790[_0x1695eb(0xbe)]));}function localSkillLinkCandidates(_0x449b1e,_0x247aa8,_0x54eb58){const _0x14501a=a99_0xf306;if(!existsSync(_0x449b1e))return[];const _0xafd178=_0x247aa8+'--';return readdirSync(_0x449b1e,{'withFileTypes':!![]})['filter'](_0x366661=>_0x366661[_0x14501a(0xa3)]()||_0x366661[_0x14501a(0xb8)]())[_0x14501a(0xa1)](_0x35122d=>_0x35122d[_0x14501a(0xbe)][_0x14501a(0x99)](_0xafd178)||_0x54eb58['has'](_0x14501a(0xb5)))[_0x14501a(0xae)](_0x277ef7=>resolve(_0x449b1e,_0x277ef7['name']));}function collectLocalRuntimeSkill(_0xf2946c,_0x13c7c7,_0x1063b2){const _0x1d2f3a=a99_0xf306,_0x49c411=resolve(_0x13c7c7,METADATA_FILE),_0x17044f=readMetadataIfPresent(_0x49c411);if(!_0x17044f)return;if(_0x17044f[_0x1d2f3a(0xab)]!==_0x1063b2['appCode'])return;if(!isRuntimeSkillScope(_0x17044f[_0x1d2f3a(0xa5)])||!_0x1063b2[_0x1d2f3a(0xaf)][_0x1d2f3a(0xbd)](_0x17044f['scope']))return;const _0x22cae7=_0x17044f['skillCode']?.[_0x1d2f3a(0x9d)]();if(!_0x22cae7)return;if(_0x1063b2[_0x1d2f3a(0x95)]&&_0x22cae7!==_0x1063b2[_0x1d2f3a(0x95)])return;const _0x34bde4=_0x17044f[_0x1d2f3a(0xa5)]+':'+_0x22cae7,_0x417698=_0x1063b2[_0x1d2f3a(0xa8)]?[_0x1063b2[_0x1d2f3a(0xa8)]]:[],_0x8f08d1=_0xf2946c[_0x1d2f3a(0xa0)](_0x34bde4);if(_0x8f08d1){_0x1063b2[_0x1d2f3a(0x9f)]===_0x1d2f3a(0xac)&&(_0x8f08d1[_0x1d2f3a(0xbb)]=_0x13c7c7,_0x8f08d1[_0x1d2f3a(0xa2)]=_0x13c7c7,_0x8f08d1[_0x1d2f3a(0x9e)]=resolve(_0x13c7c7,SKILL_FILE),_0x8f08d1['metadataPath']=_0x49c411);for(const _0x22bf60 of _0x417698){!_0x8f08d1[_0x1d2f3a(0x98)][_0x1d2f3a(0x93)](_0x22bf60)&&_0x8f08d1[_0x1d2f3a(0x98)][_0x1d2f3a(0xb2)](_0x22bf60);}_0x8f08d1[_0x1d2f3a(0x98)][_0x1d2f3a(0xb6)]();return;}_0xf2946c[_0x1d2f3a(0xba)](_0x34bde4,{..._0x17044f,'tags':Array[_0x1d2f3a(0xad)](_0x17044f[_0x1d2f3a(0xa7)])?_0x17044f['tags']:[],'scope':_0x17044f[_0x1d2f3a(0xa5)],'source':_0x1d2f3a(0x9a),'dir':_0x13c7c7,'cacheDir':_0x1063b2[_0x1d2f3a(0x9f)]==='cache'?_0x13c7c7:undefined,'skillMdPath':resolve(_0x13c7c7,SKILL_FILE),'metadataPath':_0x49c411,'linkedPaths':_0x417698});}function compareLocalRuntimeSkills(_0x3f57ed,_0x1a0ff7){const _0x594137=a99_0xf306,_0x47ec12={'personal':0x0,'company':0x1,'builtin':0x2};return _0x47ec12[_0x3f57ed[_0x594137(0xa5)]]-_0x47ec12[_0x1a0ff7[_0x594137(0xa5)]]||_0x3f57ed[_0x594137(0xb9)][_0x594137(0xa9)](_0x1a0ff7['skillCode'])||_0x3f57ed[_0x594137(0xbb)][_0x594137(0xa9)](_0x1a0ff7['dir']);}
1
+ (function(_0x1d28d7,_0x55b7db){const _0x54f5d7=a100_0xb51c,_0x162ed7=_0x1d28d7();while(!![]){try{const _0x566ae4=parseInt(_0x54f5d7(0x15d))/0x1+parseInt(_0x54f5d7(0x156))/0x2+parseInt(_0x54f5d7(0x16a))/0x3+-parseInt(_0x54f5d7(0x16d))/0x4*(parseInt(_0x54f5d7(0x165))/0x5)+parseInt(_0x54f5d7(0x171))/0x6+-parseInt(_0x54f5d7(0x160))/0x7*(parseInt(_0x54f5d7(0x162))/0x8)+-parseInt(_0x54f5d7(0x170))/0x9*(parseInt(_0x54f5d7(0x179))/0xa);if(_0x566ae4===_0x55b7db)break;else _0x162ed7['push'](_0x162ed7['shift']());}catch(_0x269593){_0x162ed7['push'](_0x162ed7['shift']());}}}(a100_0x29eb,0xa49cf));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a100_0x29eb(){const _0x4af057=['40239aDQPdH','4690194sOGOVd','dir','appCode','linkedPath','startsWith','metadataPath','isArray','link','1330cuHIkV','builtin','get','sort','from','source','has','map','491544ORlTgQ','local','skillMdPath','cache','trim','scope','values','687931ROSltq','tags','set','21qiqcbX','cacheDir','1013544vlOwch','isSymbolicLink','isDirectory','2025715ssHUWp','filter','env','push','skillCode','3447012GERkNk','localeCompare','name','12MttnNW','linkedPaths','code'];a100_0x29eb=function(){return _0x4af057;};return a100_0x29eb();}export function listLocalRuntimeSkills(_0x10301a,_0x4bb93b={}){const _0x2960fa=a100_0xb51c,_0x1c9b80=safePathSegment(_0x10301a[_0x2960fa(0x173)],'appCode'),_0x496644=normalizeRuntimeSkillScopes(_0x10301a['scopes']),_0x411507=new Set(_0x496644),_0x3ca981=_0x10301a[_0x2960fa(0x16f)]?.[_0x2960fa(0x15a)](),_0x597d30=new Map(),_0x3cec75=resolve(getRuntimeSkillCacheRoot(_0x10301a[_0x2960fa(0x167)],_0x10301a['accessKey'],_0x4bb93b),_0x1c9b80);for(const _0x26d7de of _0x496644){for(const _0x5824c9 of localSkillEntryDirs(resolve(_0x3cec75,_0x26d7de))){collectLocalRuntimeSkill(_0x597d30,_0x5824c9,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x159)});}}const _0x23b5fd=resolveSkillSyncPaths(_0x4bb93b);for(const _0x435d2f of runtimeAgentSkillRoots(_0x23b5fd)){for(const _0x579ac5 of localSkillLinkCandidates(_0x435d2f,_0x1c9b80,_0x411507)){collectLocalRuntimeSkill(_0x597d30,_0x579ac5,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x178),'linkedPath':_0x579ac5});}}return Array[_0x2960fa(0x17d)](_0x597d30[_0x2960fa(0x15c)]())[_0x2960fa(0x17c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2cc00e){const _0x197324=a100_0xb51c;if(!existsSync(_0x2cc00e))return[];return readdirSync(_0x2cc00e,{'withFileTypes':!![]})[_0x197324(0x166)](_0x40ed5b=>_0x40ed5b['isDirectory']()||_0x40ed5b[_0x197324(0x163)]())[_0x197324(0x155)](_0x490dea=>resolve(_0x2cc00e,_0x490dea[_0x197324(0x16c)]));}function localSkillLinkCandidates(_0xdb334e,_0x4f160b,_0x1b1422){const _0xced81f=a100_0xb51c;if(!existsSync(_0xdb334e))return[];const _0xa35cdc=_0x4f160b+'--';return readdirSync(_0xdb334e,{'withFileTypes':!![]})['filter'](_0x2661b1=>_0x2661b1[_0xced81f(0x164)]()||_0x2661b1[_0xced81f(0x163)]())[_0xced81f(0x166)](_0x274195=>_0x274195[_0xced81f(0x16c)][_0xced81f(0x175)](_0xa35cdc)||_0x1b1422[_0xced81f(0x154)](_0xced81f(0x17a)))[_0xced81f(0x155)](_0x567eda=>resolve(_0xdb334e,_0x567eda[_0xced81f(0x16c)]));}function a100_0xb51c(_0x5a7902,_0x588e65){_0x5a7902=_0x5a7902-0x154;const _0x29eb33=a100_0x29eb();let _0xb51c5e=_0x29eb33[_0x5a7902];return _0xb51c5e;}function collectLocalRuntimeSkill(_0x23eb1a,_0x4306ab,_0x4a1674){const _0x14a287=a100_0xb51c,_0xe68234=resolve(_0x4306ab,METADATA_FILE),_0x3203d4=readMetadataIfPresent(_0xe68234);if(!_0x3203d4)return;if(_0x3203d4[_0x14a287(0x173)]!==_0x4a1674[_0x14a287(0x173)])return;if(!isRuntimeSkillScope(_0x3203d4[_0x14a287(0x15b)])||!_0x4a1674['scopes'][_0x14a287(0x154)](_0x3203d4[_0x14a287(0x15b)]))return;const _0x4a93b3=_0x3203d4[_0x14a287(0x169)]?.[_0x14a287(0x15a)]();if(!_0x4a93b3)return;if(_0x4a1674[_0x14a287(0x16f)]&&_0x4a93b3!==_0x4a1674[_0x14a287(0x16f)])return;const _0x3c3d90=_0x3203d4[_0x14a287(0x15b)]+':'+_0x4a93b3,_0x2879c0=_0x4a1674[_0x14a287(0x174)]?[_0x4a1674[_0x14a287(0x174)]]:[],_0x15daeb=_0x23eb1a[_0x14a287(0x17b)](_0x3c3d90);if(_0x15daeb){_0x4a1674['source']==='cache'&&(_0x15daeb[_0x14a287(0x172)]=_0x4306ab,_0x15daeb[_0x14a287(0x161)]=_0x4306ab,_0x15daeb[_0x14a287(0x158)]=resolve(_0x4306ab,SKILL_FILE),_0x15daeb[_0x14a287(0x176)]=_0xe68234);for(const _0x5f1f81 of _0x2879c0){!_0x15daeb[_0x14a287(0x16e)]['includes'](_0x5f1f81)&&_0x15daeb[_0x14a287(0x16e)][_0x14a287(0x168)](_0x5f1f81);}_0x15daeb['linkedPaths'][_0x14a287(0x17c)]();return;}_0x23eb1a[_0x14a287(0x15f)](_0x3c3d90,{..._0x3203d4,'tags':Array[_0x14a287(0x177)](_0x3203d4[_0x14a287(0x15e)])?_0x3203d4['tags']:[],'scope':_0x3203d4[_0x14a287(0x15b)],'source':_0x14a287(0x157),'dir':_0x4306ab,'cacheDir':_0x4a1674[_0x14a287(0x17e)]===_0x14a287(0x159)?_0x4306ab:undefined,'skillMdPath':resolve(_0x4306ab,SKILL_FILE),'metadataPath':_0xe68234,'linkedPaths':_0x2879c0});}function compareLocalRuntimeSkills(_0x3bbb15,_0x38862d){const _0x82adc7=a100_0xb51c,_0x5bca29={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5bca29[_0x3bbb15[_0x82adc7(0x15b)]]-_0x5bca29[_0x38862d[_0x82adc7(0x15b)]]||_0x3bbb15[_0x82adc7(0x169)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x169)])||_0x3bbb15[_0x82adc7(0x172)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x172)]);}
@@ -1 +1 @@
1
- (function(_0x54590d,_0x1c01b7){const _0x3770c6=a100_0x4cda,_0x374028=_0x54590d();while(!![]){try{const _0x53adc6=parseInt(_0x3770c6(0x1a5))/0x1+parseInt(_0x3770c6(0x194))/0x2*(-parseInt(_0x3770c6(0x1a4))/0x3)+parseInt(_0x3770c6(0x199))/0x4+parseInt(_0x3770c6(0x1a6))/0x5*(parseInt(_0x3770c6(0x195))/0x6)+-parseInt(_0x3770c6(0x19d))/0x7+-parseInt(_0x3770c6(0x1b1))/0x8*(parseInt(_0x3770c6(0x1a8))/0x9)+-parseInt(_0x3770c6(0x1ab))/0xa*(-parseInt(_0x3770c6(0x1b4))/0xb);if(_0x53adc6===_0x1c01b7)break;else _0x374028['push'](_0x374028['shift']());}catch(_0x38bc73){_0x374028['push'](_0x374028['shift']());}}}(a100_0x5420,0x77505));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';function a100_0x5420(){const _0x4504ff=['string','isArray','length','has','startsWith','test','sha256','replace','includes','Skill\x20file\x20path\x20must\x20be\x20text.','47238ulmKDN','681708dceGdK','utf8','bytes','name','2355828LclzTK','from','path','size','533253Dtgdvl','isDirectory','isSymbolicLink','localeCompare','Skill\x20file\x20size\x20is\x20invalid:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','set','33wUilGV','273417naTTHs','15eRJjTK','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','5733rtHury','toString','isSafeInteger','3820zNWzoS','Duplicate\x20Skill\x20file\x20path:\x20','validation','values','split','sort','5368pXuPsO','object','Unsafe\x20Skill\x20file\x20path:\x20','1408kHdEoY'];a100_0x5420=function(){return _0x4504ff;};return a100_0x5420();}function a100_0x4cda(_0x47ea61,_0x286a45){_0x47ea61=_0x47ea61-0x192;const _0x542021=a100_0x5420();let _0x4cda79=_0x542021[_0x47ea61];return _0x4cda79;}export function fileContent(_0xa7c7c6){const _0x636a5c=a100_0x4cda;return _0xa7c7c6['bytes']??Buffer[_0x636a5c(0x19a)](_0xa7c7c6['content']??'',_0x636a5c(0x196));}export function fileText(_0x484d78){const _0x5d7577=a100_0x4cda;return fileContent(_0x484d78)[_0x5d7577(0x1a9)](_0x5d7577(0x196));}export function normalizeLocalFiles(_0x23a4aa){const _0x5d0e02=a100_0x4cda;if(!Array[_0x5d0e02(0x1b6)](_0x23a4aa)||_0x23a4aa['length']===0x0)return[];const _0x26d2e9=new Map();for(const _0x36725c of _0x23a4aa){if(!_0x36725c||typeof _0x36725c!==_0x5d0e02(0x1b2)||typeof _0x36725c[_0x5d0e02(0x19b)]!==_0x5d0e02(0x1b5))throw CliErrors[_0x5d0e02(0x1ad)](_0x5d0e02(0x193));const _0xecaf8d=normalizeSkillRelativePath(_0x36725c['path']);if(_0x26d2e9[_0x5d0e02(0x1b8)](_0xecaf8d))throw CliErrors[_0x5d0e02(0x1ad)](_0x5d0e02(0x1ac)+_0xecaf8d);if(_0x36725c[_0x5d0e02(0x197)]!==undefined&&!Buffer['isBuffer'](_0x36725c['bytes']))throw CliErrors[_0x5d0e02(0x1ad)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0xecaf8d);if(_0x36725c['bytes']===undefined&&typeof _0x36725c['content']!=='string')throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0xecaf8d);const _0x2aaa9a=fileContent(_0x36725c);_0x26d2e9[_0x5d0e02(0x1a3)](_0xecaf8d,{'path':_0xecaf8d,'bytes':_0x2aaa9a});}return Array[_0x5d0e02(0x19a)](_0x26d2e9[_0x5d0e02(0x1ae)]())[_0x5d0e02(0x1b0)](compareSkillFiles);}export function normalizeManifestFiles(_0x481165){const _0x16cf1c=a100_0x4cda;if(!Array[_0x16cf1c(0x1b6)](_0x481165)||_0x481165[_0x16cf1c(0x1b7)]===0x0)return[];const _0x7ecd8a=new Map();for(const _0x2fd4a4 of _0x481165){if(!_0x2fd4a4||typeof _0x2fd4a4!=='object'||typeof _0x2fd4a4[_0x16cf1c(0x19b)]!==_0x16cf1c(0x1b5))throw CliErrors[_0x16cf1c(0x1ad)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1f1404=normalizeSkillRelativePath(_0x2fd4a4[_0x16cf1c(0x19b)]);if(_0x7ecd8a[_0x16cf1c(0x1b8)](_0x1f1404))throw CliErrors[_0x16cf1c(0x1ad)](_0x16cf1c(0x1ac)+_0x1f1404);if(!isSha256Hex(_0x2fd4a4[_0x16cf1c(0x1bb)]))throw CliErrors['validation'](_0x16cf1c(0x1a2)+_0x1f1404);if(!Number[_0x16cf1c(0x1aa)](_0x2fd4a4[_0x16cf1c(0x19c)])||_0x2fd4a4[_0x16cf1c(0x19c)]<0x0)throw CliErrors[_0x16cf1c(0x1ad)](_0x16cf1c(0x1a1)+_0x1f1404);_0x7ecd8a[_0x16cf1c(0x1a3)](_0x1f1404,{'path':_0x1f1404,'sha256':_0x2fd4a4[_0x16cf1c(0x1bb)]['toLowerCase'](),'size':_0x2fd4a4[_0x16cf1c(0x19c)]});}return Array[_0x16cf1c(0x19a)](_0x7ecd8a['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x4cdb99){const _0x497fd4=realpathSync(_0x4cdb99),_0x24b6d9=[];function _0x56e43d(_0x3144df){const _0x509de5=a100_0x4cda,_0x1ce2c1=readdirSync(_0x3144df,{'withFileTypes':!![]})[_0x509de5(0x1b0)]((_0x19eaea,_0x135206)=>_0x19eaea['name'][_0x509de5(0x1a0)](_0x135206[_0x509de5(0x198)]));for(const _0x287810 of _0x1ce2c1){if(_0x287810[_0x509de5(0x19e)]()&&IGNORED_DIR_NAMES['has'](_0x287810['name']))continue;if(IGNORED_FILE_NAMES[_0x509de5(0x1b8)](_0x287810[_0x509de5(0x198)]))continue;const _0x2bf74b=resolve(_0x3144df,_0x287810['name']);if(_0x287810[_0x509de5(0x19f)]())throw CliErrors['validation'](_0x509de5(0x1a7)+_0x2bf74b);const _0x1af687=toPosixPath(relative(_0x497fd4,_0x2bf74b));if(_0x287810[_0x509de5(0x19e)]()){_0x56e43d(_0x2bf74b);continue;}if(!_0x287810['isFile']())continue;validateSkillRelativePath(_0x1af687);const _0x37a850=readFileSync(_0x2bf74b);_0x24b6d9['push']({'path':_0x1af687,'bytes':_0x37a850});}}return _0x56e43d(_0x497fd4),normalizeLocalFiles(_0x24b6d9);}export function compareSkillFiles(_0x5e337f,_0x28be2a){const _0x4edbe3=a100_0x4cda;if(_0x5e337f['path']===SKILL_FILE)return _0x28be2a['path']===SKILL_FILE?0x0:-0x1;if(_0x28be2a['path']===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x4edbe3(0x19a)](_0x5e337f[_0x4edbe3(0x19b)],'utf8'),Buffer[_0x4edbe3(0x19a)](_0x28be2a[_0x4edbe3(0x19b)],'utf8'));}export function normalizeSkillRelativePath(_0x12fefc){const _0x23b950=toPosixPath(_0x12fefc['trim']());return validateSkillRelativePath(_0x23b950),_0x23b950;}export function validateSkillRelativePath(_0x42253c){const _0xb23f0a=a100_0x4cda;if(!_0x42253c||_0x42253c[_0xb23f0a(0x1b9)]('/')||_0x42253c[_0xb23f0a(0x192)]('//'))throw CliErrors[_0xb23f0a(0x1ad)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x42253c);for(const _0x1084fa of _0x42253c[_0xb23f0a(0x1af)]('/')){if(!_0x1084fa||_0x1084fa==='.'||_0x1084fa==='..')throw CliErrors[_0xb23f0a(0x1ad)](_0xb23f0a(0x1b3)+_0x42253c);}}export function toPosixPath(_0x53182c){const _0x4241bf=a100_0x4cda;return _0x53182c[_0x4241bf(0x1bc)](/\\/g,'/');}export function isSha256Hex(_0x28c3ca){const _0x4006ce=a100_0x4cda;return typeof _0x28c3ca==='string'&&/^[a-fA-F0-9]{64}$/[_0x4006ce(0x1ba)](_0x28c3ca);}
1
+ (function(_0x3145fd,_0x43fc51){const _0x379917=a101_0x4ca6,_0x3a1bc1=_0x3145fd();while(!![]){try{const _0xcccd29=parseInt(_0x379917(0x105))/0x1*(parseInt(_0x379917(0x10c))/0x2)+parseInt(_0x379917(0x116))/0x3*(parseInt(_0x379917(0x103))/0x4)+parseInt(_0x379917(0xf7))/0x5*(-parseInt(_0x379917(0xf9))/0x6)+parseInt(_0x379917(0xf8))/0x7*(parseInt(_0x379917(0x11a))/0x8)+parseInt(_0x379917(0x104))/0x9*(-parseInt(_0x379917(0x106))/0xa)+parseInt(_0x379917(0xf6))/0xb+-parseInt(_0x379917(0x102))/0xc*(-parseInt(_0x379917(0x112))/0xd);if(_0xcccd29===_0x43fc51)break;else _0x3a1bc1['push'](_0x3a1bc1['shift']());}catch(_0x6b9ea1){_0x3a1bc1['push'](_0x3a1bc1['shift']());}}}(a101_0x1093,0x4eeec));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x159086){const _0x4ecb5c=a101_0x4ca6;return _0x159086[_0x4ecb5c(0x10a)]??Buffer[_0x4ecb5c(0x122)](_0x159086[_0x4ecb5c(0x11f)]??'',_0x4ecb5c(0x11c));}export function fileText(_0x42ea18){const _0x5ee2f1=a101_0x4ca6;return fileContent(_0x42ea18)[_0x5ee2f1(0x110)](_0x5ee2f1(0x11c));}export function normalizeLocalFiles(_0x475474){const _0x1fd3c1=a101_0x4ca6;if(!Array[_0x1fd3c1(0x114)](_0x475474)||_0x475474[_0x1fd3c1(0x11b)]===0x0)return[];const _0x533ffa=new Map();for(const _0x14a65c of _0x475474){if(!_0x14a65c||typeof _0x14a65c!==_0x1fd3c1(0x117)||typeof _0x14a65c['path']!==_0x1fd3c1(0xfc))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x109));const _0x46314e=normalizeSkillRelativePath(_0x14a65c[_0x1fd3c1(0x108)]);if(_0x533ffa[_0x1fd3c1(0x10f)](_0x46314e))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]!==undefined&&!Buffer['isBuffer'](_0x14a65c[_0x1fd3c1(0x10a)]))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x111)+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]===undefined&&typeof _0x14a65c[_0x1fd3c1(0x11f)]!=='string')throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x121)+_0x46314e);const _0x5c674a=fileContent(_0x14a65c);_0x533ffa[_0x1fd3c1(0x101)](_0x46314e,{'path':_0x46314e,'bytes':_0x5c674a});}return Array['from'](_0x533ffa[_0x1fd3c1(0x11d)]())[_0x1fd3c1(0x10b)](compareSkillFiles);}function a101_0x4ca6(_0x2f4d3e,_0x3c9ffa){_0x2f4d3e=_0x2f4d3e-0xf6;const _0x109385=a101_0x1093();let _0x4ca6e4=_0x109385[_0x2f4d3e];return _0x4ca6e4;}export function normalizeManifestFiles(_0x2ec57e){const _0x583c9c=a101_0x4ca6;if(!Array[_0x583c9c(0x114)](_0x2ec57e)||_0x2ec57e[_0x583c9c(0x11b)]===0x0)return[];const _0x323c75=new Map();for(const _0x483c1c of _0x2ec57e){if(!_0x483c1c||typeof _0x483c1c!==_0x583c9c(0x117)||typeof _0x483c1c[_0x583c9c(0x108)]!==_0x583c9c(0xfc))throw CliErrors['validation'](_0x583c9c(0x109));const _0xb6835d=normalizeSkillRelativePath(_0x483c1c['path']);if(_0x323c75['has'](_0xb6835d))throw CliErrors['validation'](_0x583c9c(0x120)+_0xb6835d);if(!isSha256Hex(_0x483c1c[_0x583c9c(0x107)]))throw CliErrors['validation'](_0x583c9c(0xfa)+_0xb6835d);if(!Number['isSafeInteger'](_0x483c1c[_0x583c9c(0xfe)])||_0x483c1c[_0x583c9c(0xfe)]<0x0)throw CliErrors[_0x583c9c(0xfd)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0xb6835d);_0x323c75[_0x583c9c(0x101)](_0xb6835d,{'path':_0xb6835d,'sha256':_0x483c1c['sha256'][_0x583c9c(0x10d)](),'size':_0x483c1c[_0x583c9c(0xfe)]});}return Array[_0x583c9c(0x122)](_0x323c75[_0x583c9c(0x11d)]())[_0x583c9c(0x10b)](compareSkillFiles);}export function scanSkillDirectory(_0x50e251){const _0x155efd=realpathSync(_0x50e251),_0x56c05c=[];function _0x29627f(_0x5c698e){const _0x2ad01a=a101_0x4ca6,_0x56148b=readdirSync(_0x5c698e,{'withFileTypes':!![]})['sort']((_0x2d3978,_0x225155)=>_0x2d3978[_0x2ad01a(0x119)][_0x2ad01a(0x118)](_0x225155[_0x2ad01a(0x119)]));for(const _0x538a5c of _0x56148b){if(_0x538a5c[_0x2ad01a(0xfb)]()&&IGNORED_DIR_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;if(IGNORED_FILE_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;const _0x4d9695=resolve(_0x5c698e,_0x538a5c['name']);if(_0x538a5c[_0x2ad01a(0x124)]())throw CliErrors[_0x2ad01a(0xfd)](_0x2ad01a(0xff)+_0x4d9695);const _0x235fc8=toPosixPath(relative(_0x155efd,_0x4d9695));if(_0x538a5c[_0x2ad01a(0xfb)]()){_0x29627f(_0x4d9695);continue;}if(!_0x538a5c[_0x2ad01a(0x123)]())continue;validateSkillRelativePath(_0x235fc8);const _0x3319dc=readFileSync(_0x4d9695);_0x56c05c[_0x2ad01a(0x113)]({'path':_0x235fc8,'bytes':_0x3319dc});}}return _0x29627f(_0x155efd),normalizeLocalFiles(_0x56c05c);}function a101_0x1093(){const _0xc6a21=['string','validation','size','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','set','11604ujdSKh','646252pxRTpl','15543PksqqB','1391pPhDAL','1670PXfQRs','sha256','path','Skill\x20file\x20path\x20must\x20be\x20text.','bytes','sort','94mBPiAc','toLowerCase','Unsafe\x20Skill\x20file\x20path:\x20','has','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','3770oZZIvP','push','isArray','test','6xWuxXv','object','localeCompare','name','68792IwuBiJ','length','utf8','values','trim','content','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','from','isFile','isSymbolicLink','51524XGsRGc','12965uMAcxq','357pqsxJC','1158wsHWOi','Skill\x20file\x20sha256\x20is\x20invalid:\x20','isDirectory'];a101_0x1093=function(){return _0xc6a21;};return a101_0x1093();}export function compareSkillFiles(_0x39ef18,_0x305d9b){const _0x1c5805=a101_0x4ca6;if(_0x39ef18[_0x1c5805(0x108)]===SKILL_FILE)return _0x305d9b[_0x1c5805(0x108)]===SKILL_FILE?0x0:-0x1;if(_0x305d9b['path']===SKILL_FILE)return 0x1;return Buffer[_0x1c5805(0x100)](Buffer[_0x1c5805(0x122)](_0x39ef18[_0x1c5805(0x108)],_0x1c5805(0x11c)),Buffer[_0x1c5805(0x122)](_0x305d9b[_0x1c5805(0x108)],_0x1c5805(0x11c)));}export function normalizeSkillRelativePath(_0x1a0cf0){const _0x3f639d=a101_0x4ca6,_0x30cd55=toPosixPath(_0x1a0cf0[_0x3f639d(0x11e)]());return validateSkillRelativePath(_0x30cd55),_0x30cd55;}export function validateSkillRelativePath(_0x1319bb){const _0x53068e=a101_0x4ca6;if(!_0x1319bb||_0x1319bb['startsWith']('/')||_0x1319bb['includes']('//'))throw CliErrors[_0x53068e(0xfd)](_0x53068e(0x10e)+_0x1319bb);for(const _0xdac738 of _0x1319bb['split']('/')){if(!_0xdac738||_0xdac738==='.'||_0xdac738==='..')throw CliErrors['validation'](_0x53068e(0x10e)+_0x1319bb);}}export function toPosixPath(_0x448c41){return _0x448c41['replace'](/\\/g,'/');}export function isSha256Hex(_0x47d5b6){const _0x58525f=a101_0x4ca6;return typeof _0x47d5b6===_0x58525f(0xfc)&&/^[a-fA-F0-9]{64}$/[_0x58525f(0x115)](_0x47d5b6);}
@@ -1 +1 @@
1
- (function(_0xd4599a,_0x52253b){const _0x11bdcd=a101_0x9e15,_0x353f73=_0xd4599a();while(!![]){try{const _0x33ff09=-parseInt(_0x11bdcd(0x1cd))/0x1+-parseInt(_0x11bdcd(0x1f2))/0x2+parseInt(_0x11bdcd(0x1c3))/0x3*(parseInt(_0x11bdcd(0x1de))/0x4)+parseInt(_0x11bdcd(0x1d0))/0x5*(-parseInt(_0x11bdcd(0x1ef))/0x6)+-parseInt(_0x11bdcd(0x1d5))/0x7+parseInt(_0x11bdcd(0x1ee))/0x8*(parseInt(_0x11bdcd(0x1e7))/0x9)+parseInt(_0x11bdcd(0x1db))/0xa;if(_0x33ff09===_0x52253b)break;else _0x353f73['push'](_0x353f73['shift']());}catch(_0x50faeb){_0x353f73['push'](_0x353f73['shift']());}}}(a101_0x406e,0x3d870));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a101_0x9e15(_0x3421d2,_0x22f7dc){_0x3421d2=_0x3421d2-0x1c3;const _0x406e4e=a101_0x406e();let _0x9e15ea=_0x406e4e[_0x3421d2];return _0x9e15ea;}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x9278e8,_0x4b1169,_0x33978f){const _0x6b27b9=a101_0x9e15,_0x557d57=requireSkillCode(_0x9278e8),_0x2b7b57=requirePackageBytes(_0x557d57,_0x33978f[_0x6b27b9(0x1d8)]),_0x5df150=extractDownloadedPackage(_0x2b7b57),_0x422cbf=_0x5df150[_0x6b27b9(0x1df)](_0x15b638=>_0x15b638['path']===SKILL_FILE);if(!_0x422cbf)throw CliErrors[_0x6b27b9(0x1f4)](_0x6b27b9(0x1cc)+SKILL_FILE+':\x20'+_0x557d57);const _0x219811=withMaterializedSkillFrontmatter(_0x5df150,_0x9278e8,_0x557d57),_0x20e561=_0x219811[_0x6b27b9(0x1df)](_0x443f31=>_0x443f31[_0x6b27b9(0x1d9)]===SKILL_FILE),_0x29e3a0=fileText(_0x20e561),_0x56165a=getRuntimeSkillDir(_0x33978f['env'],_0x33978f['accessKey'],_0x33978f[_0x6b27b9(0x1c9)],_0x4b1169,_0x557d57,_0x33978f[_0x6b27b9(0x1f7)]),_0x30f783=resolve(_0x56165a,SKILL_FILE),_0x559ade=resolve(_0x56165a,METADATA_FILE),_0x3d0067=contentHash(_0x29e3a0),_0xf3f46c=readMetadataIfPresent(_0x559ade)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x56165a,_0x559ade,_0x219811,_0x33978f[_0x6b27b9(0x1f5)]===!![]),mkdirSync(_0x56165a,{'recursive':!![],'mode':0x1c0});const _0x4eb4fd=existsSync(_0x30f783)?readFileSync(_0x30f783,_0x6b27b9(0x1c8)):undefined;return materializeFiles(_0x56165a,_0x219811),removeStaleManagedFiles(_0x56165a,_0xf3f46c,_0x219811),writeJsonAtomic(_0x559ade,buildMetadata(_0x9278e8,_0x4b1169,_0x33978f[_0x6b27b9(0x1c9)],_0x3d0067,_0x33978f[_0x6b27b9(0x1d3)],_0x219811,_0x2b7b57)),{'skill':_0x9278e8,'scope':_0x4b1169,'dir':_0x56165a,'skillMdPath':_0x30f783,'metadataPath':_0x559ade,'contentHash':_0x3d0067,'changed':_0x4eb4fd!==_0x29e3a0};}function withMaterializedSkillFrontmatter(_0x5a3079,_0x1d0a74,_0x37286d){const _0x3dfe63=a101_0x9e15,_0x2752c9=skillDisplayName(_0x1d0a74,_0x37286d),_0x5521ff=_0x1d0a74[_0x3dfe63(0x1e5)]?.[_0x3dfe63(0x1e2)]()||_0x2752c9||_0x37286d;return normalizeLocalFiles(_0x5a3079)[_0x3dfe63(0x1f6)](_0x4bb508=>{const _0x573b2d=_0x3dfe63,_0x1ffe76=fileText(_0x4bb508);if(_0x4bb508['path']!==SKILL_FILE)return _0x4bb508;if(hasYamlFrontmatter(_0x1ffe76))return{'path':_0x4bb508[_0x573b2d(0x1d9)],'content':withSyncedDisplayName(_0x1ffe76,_0x2752c9)};return{'path':_0x4bb508[_0x573b2d(0x1d9)],'content':prependSkillFrontmatter(_0x1ffe76,{'name':_0x37286d,'displayName':_0x2752c9,'description':_0x5521ff})};});}function hasYamlFrontmatter(_0x24b54f){const _0x4bd250=a101_0x9e15;return/^\uFEFF?---\s*\r?\n/[_0x4bd250(0x1ea)](_0x24b54f);}function prependSkillFrontmatter(_0x1948db,_0x4d383d){const _0x4c4221=a101_0x9e15,_0x50a8be=_0x1948db[_0x4c4221(0x1f8)](/^\uFEFF/,'');return[_0x4c4221(0x1cb),'name:\x20'+yamlString(_0x4d383d[_0x4c4221(0x1f0)]),_0x4d383d[_0x4c4221(0x1e3)]?_0x4c4221(0x1d4)+yamlString(_0x4d383d[_0x4c4221(0x1e3)]):undefined,_0x4c4221(0x1f3)+yamlString(_0x4d383d['description']),'---','',_0x50a8be][_0x4c4221(0x1d2)](_0x470ea8=>_0x470ea8!==undefined)['join']('\x0a');}function yamlString(_0x42a263){const _0x1ec24a=a101_0x9e15;return JSON['stringify'](_0x42a263[_0x1ec24a(0x1f8)](/\r/g,'')[_0x1ec24a(0x1e2)]());}function skillDisplayName(_0x5e07fd,_0xb4fde6){const _0x509db4=a101_0x9e15,_0x4d3c5d=_0x5e07fd[_0x509db4(0x1d7)]?.[_0x509db4(0x1e2)]();return _0x4d3c5d||_0xb4fde6;}function withSyncedDisplayName(_0x4ec4fc,_0x4d4d51){const _0x344a19=a101_0x9e15,_0x13427a=_0x4ec4fc[_0x344a19(0x1e9)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x13427a)return _0x4ec4fc;const _0x36634a=_0x13427a[0x1]??'',_0x494699=_0x13427a[0x2]??'',_0x55f287=parseDocument(_0x494699);if(_0x55f287[_0x344a19(0x1e4)][_0x344a19(0x1eb)]>0x0||!isMap(_0x55f287['contents']))return _0x4ec4fc;if(_0x4d4d51)_0x55f287[_0x344a19(0x1ce)](_0x344a19(0x1e3),_0x4d4d51);else{if(_0x55f287['has'](_0x344a19(0x1e3)))_0x55f287[_0x344a19(0x1da)](_0x344a19(0x1e3));else return _0x4ec4fc;}forceBlockCollections(_0x55f287[_0x344a19(0x1e6)]);const _0x4f3d99=_0x55f287[_0x344a19(0x1d1)]({'lineWidth':0x0})['trimEnd'](),_0x530e1f=_0x4ec4fc[_0x344a19(0x1c4)](_0x13427a[0x0][_0x344a19(0x1eb)])[_0x344a19(0x1f8)](/^\r?\n/,'');return _0x36634a+_0x344a19(0x1dd)+_0x4f3d99+_0x344a19(0x1c6)+_0x530e1f;}function forceBlockCollections(_0x4e29b0){if(!isNode(_0x4e29b0))return;visit(_0x4e29b0,(_0x33fcb2,_0x49e58f)=>{const _0x22964c=a101_0x9e15;isCollection(_0x49e58f)&&(_0x49e58f[_0x22964c(0x1f1)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x3a2999,_0x3871c5,_0x2e557c,_0x1b1e23){const _0x39325f=a101_0x9e15;if(_0x1b1e23||!existsSync(_0x3871c5))return;const _0x1f4514=readMetadataIfPresent(_0x3871c5);if(!_0x1f4514)return;const _0x325073=_0x1f4514[_0x39325f(0x1ec)]&&Object[_0x39325f(0x1cf)](_0x1f4514['fileHashes'])[_0x39325f(0x1eb)]>0x0?_0x1f4514['fileHashes']:undefined;if(_0x325073)for(const [_0x4eca13,_0x10a068]of Object['entries'](_0x325073)){const _0x444747=resolveManagedFilePath(_0x3a2999,_0x4eca13);if(!existsSync(_0x444747))throw CliErrors[_0x39325f(0x1f4)](_0x39325f(0x1dc)+_0x3a2999,_0x39325f(0x1ed)+_0x4eca13);const _0x42e75d=lstatSync(_0x444747);if(!_0x42e75d[_0x39325f(0x1e0)]())throw CliErrors[_0x39325f(0x1f4)](_0x39325f(0x1dc)+_0x3a2999,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x4eca13);const _0x4a0dca=bufferSha256(readFileSync(_0x444747));if(_0x4a0dca!==_0x10a068)throw CliErrors[_0x39325f(0x1f4)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x3a2999+_0x39325f(0x1e8)+_0x4eca13,_0x39325f(0x1e1)+_0x4eca13);}else{const _0x484bf3=resolve(_0x3a2999,SKILL_FILE);if(existsSync(_0x484bf3)&&_0x1f4514[_0x39325f(0x1ca)]){const _0x51c26f=contentHash(readFileSync(_0x484bf3,_0x39325f(0x1c8)));if(_0x51c26f!==_0x1f4514[_0x39325f(0x1ca)])throw CliErrors[_0x39325f(0x1f4)](_0x39325f(0x1d6)+_0x484bf3,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x51c9a0 of normalizeLocalFiles(_0x2e557c)){if(_0x325073?.[_0x51c9a0[_0x39325f(0x1d9)]])continue;if(!_0x325073&&_0x51c9a0[_0x39325f(0x1d9)]===SKILL_FILE)continue;const _0x14c78d=resolveManagedFilePath(_0x3a2999,_0x51c9a0[_0x39325f(0x1d9)]);if(!existsSync(_0x14c78d))continue;const _0x438891=lstatSync(_0x14c78d);if(!_0x438891[_0x39325f(0x1e0)]())throw CliErrors[_0x39325f(0x1f4)](_0x39325f(0x1dc)+_0x3a2999,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x51c9a0[_0x39325f(0x1d9)]);const _0x2f2b68=bufferSha256(readFileSync(_0x14c78d));if(_0x2f2b68!==fileHash(_0x51c9a0))throw CliErrors['validation'](_0x39325f(0x1dc)+_0x3a2999,_0x39325f(0x1c7)+_0x51c9a0[_0x39325f(0x1d9)]);}}function materializeFiles(_0x3aa53b,_0x71f205){const _0x314d87=a101_0x9e15;for(const _0x26665f of normalizeLocalFiles(_0x71f205)){const _0x64b4ed=resolveManagedFilePath(_0x3aa53b,_0x26665f[_0x314d87(0x1d9)]);mkdirSync(dirname(_0x64b4ed),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x64b4ed,fileContent(_0x26665f),0x180);}}function removeStaleManagedFiles(_0xb8e2,_0x11b1e4,_0x8b772d){const _0x240c45=a101_0x9e15;if(!_0x11b1e4)return;const _0x53cd4e=new Set(normalizeLocalFiles(_0x8b772d)['map'](_0xdff768=>_0xdff768[_0x240c45(0x1d9)]));for(const _0x455d9d of Object[_0x240c45(0x1cf)](_0x11b1e4)){if(_0x53cd4e[_0x240c45(0x1c5)](_0x455d9d))continue;const _0x5d7227=resolveManagedFilePath(_0xb8e2,_0x455d9d);existsSync(_0x5d7227)&&lstatSync(_0x5d7227)[_0x240c45(0x1e0)]()&&rmSync(_0x5d7227,{'force':!![]});}}function a101_0x406e(){const _0x19905c=['Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','skillName','packageBytes','path','delete','11135680bjdMnk','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','8LvGidl','find','isFile','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','trim','displayName','errors','description','contents','4041ANNNFF','.\x20Changed\x20file:\x20','match','test','length','fileHashes','Managed\x20file\x20was\x20removed\x20locally:\x20','4856vllFaT','42FgZFfT','name','flow','153616EBCrDC','description:\x20','validation','force','map','paths','replace','293565FawZyL','slice','has','\x0a---\x0a\x0a','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','utf8','appCode','contentHash','---','Runtime\x20Skill\x20package\x20is\x20missing\x20','352482oWEQNP','set','keys','335490BObymV','toString','filter','pulledAt','displayName:\x20','3015803rvgxeP'];a101_0x406e=function(){return _0x19905c;};return a101_0x406e();}
1
+ (function(_0x4fef0c,_0x5cf48){const _0x1fd283=a102_0x16de,_0x3729e1=_0x4fef0c();while(!![]){try{const _0x383bf6=-parseInt(_0x1fd283(0x1dc))/0x1+-parseInt(_0x1fd283(0x1f8))/0x2+parseInt(_0x1fd283(0x1f2))/0x3+-parseInt(_0x1fd283(0x1e1))/0x4*(parseInt(_0x1fd283(0x1d7))/0x5)+parseInt(_0x1fd283(0x1db))/0x6+-parseInt(_0x1fd283(0x1fe))/0x7+-parseInt(_0x1fd283(0x1f6))/0x8*(-parseInt(_0x1fd283(0x1f9))/0x9);if(_0x383bf6===_0x5cf48)break;else _0x3729e1['push'](_0x3729e1['shift']());}catch(_0x4cf98f){_0x3729e1['push'](_0x3729e1['shift']());}}}(a102_0x3598,0x68317));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a102_0x3598(){const _0x43f172=['flow','env','filter','---','validation','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','description:\x20','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','description','path','2043180zPhUSg','entries','packageBytes','.\x20Changed\x20file:\x20','3448704jWOkyH','contentHash','1352676eNWCHg','27ipXZch','isFile','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','trimEnd','find','763203EONvaX','slice','displayName','replace','set','length','has','Managed\x20file\x20was\x20removed\x20locally:\x20','\x0a---\x0a\x0a','name','map','appCode','name:\x20','delete','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','accessKey','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','14180iceSPE','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName:\x20','1042374LuigFh','612607lJwCdE','toString','contents','test','join','456dOZPVl','match','errors','keys','fileHashes','trim'];a102_0x3598=function(){return _0x43f172;};return a102_0x3598();}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x7039dd,_0x4dccd9,_0x56a786){const _0x4d2f61=a102_0x16de,_0x31f57b=requireSkillCode(_0x7039dd),_0x3d8331=requirePackageBytes(_0x31f57b,_0x56a786[_0x4d2f61(0x1f4)]),_0x166597=extractDownloadedPackage(_0x3d8331),_0x459819=_0x166597[_0x4d2f61(0x1fd)](_0x565440=>_0x565440[_0x4d2f61(0x1f1)]===SKILL_FILE);if(!_0x459819)throw CliErrors[_0x4d2f61(0x1eb)](_0x4d2f61(0x1d9)+SKILL_FILE+':\x20'+_0x31f57b);const _0x3673ba=withMaterializedSkillFrontmatter(_0x166597,_0x7039dd,_0x31f57b),_0x533073=_0x3673ba[_0x4d2f61(0x1fd)](_0x436ecc=>_0x436ecc[_0x4d2f61(0x1f1)]===SKILL_FILE),_0x3fb7b1=fileText(_0x533073),_0x11af42=getRuntimeSkillDir(_0x56a786[_0x4d2f61(0x1e8)],_0x56a786[_0x4d2f61(0x20e)],_0x56a786['appCode'],_0x4dccd9,_0x31f57b,_0x56a786['paths']),_0x2632f6=resolve(_0x11af42,SKILL_FILE),_0x333df9=resolve(_0x11af42,METADATA_FILE),_0x2fd9bb=contentHash(_0x3fb7b1),_0x2c9b54=readMetadataIfPresent(_0x333df9)?.[_0x4d2f61(0x1e5)];ensurePulledFilesCanBeOverwritten(_0x11af42,_0x333df9,_0x3673ba,_0x56a786['force']===!![]),mkdirSync(_0x11af42,{'recursive':!![],'mode':0x1c0});const _0x48efab=existsSync(_0x2632f6)?readFileSync(_0x2632f6,'utf8'):undefined;return materializeFiles(_0x11af42,_0x3673ba),removeStaleManagedFiles(_0x11af42,_0x2c9b54,_0x3673ba),writeJsonAtomic(_0x333df9,buildMetadata(_0x7039dd,_0x4dccd9,_0x56a786[_0x4d2f61(0x209)],_0x2fd9bb,_0x56a786[_0x4d2f61(0x1ee)],_0x3673ba,_0x3d8331)),{'skill':_0x7039dd,'scope':_0x4dccd9,'dir':_0x11af42,'skillMdPath':_0x2632f6,'metadataPath':_0x333df9,'contentHash':_0x2fd9bb,'changed':_0x48efab!==_0x3fb7b1};}function withMaterializedSkillFrontmatter(_0x67b0ff,_0x35a262,_0x2617b7){const _0x5cd1c0=a102_0x16de,_0x327db2=skillDisplayName(_0x35a262,_0x2617b7),_0x139e19=_0x35a262[_0x5cd1c0(0x1f0)]?.[_0x5cd1c0(0x1e6)]()||_0x327db2||_0x2617b7;return normalizeLocalFiles(_0x67b0ff)[_0x5cd1c0(0x208)](_0x12e667=>{const _0x474f78=_0x5cd1c0,_0xf2675b=fileText(_0x12e667);if(_0x12e667['path']!==SKILL_FILE)return _0x12e667;if(hasYamlFrontmatter(_0xf2675b))return{'path':_0x12e667['path'],'content':withSyncedDisplayName(_0xf2675b,_0x327db2)};return{'path':_0x12e667[_0x474f78(0x1f1)],'content':prependSkillFrontmatter(_0xf2675b,{'name':_0x2617b7,'displayName':_0x327db2,'description':_0x139e19})};});}function hasYamlFrontmatter(_0x4971a3){const _0xf5d485=a102_0x16de;return/^\uFEFF?---\s*\r?\n/[_0xf5d485(0x1df)](_0x4971a3);}function prependSkillFrontmatter(_0x2b089b,_0x56f556){const _0x2e1029=a102_0x16de,_0x884acb=_0x2b089b[_0x2e1029(0x201)](/^\uFEFF/,'');return['---',_0x2e1029(0x20a)+yamlString(_0x56f556[_0x2e1029(0x207)]),_0x56f556[_0x2e1029(0x200)]?_0x2e1029(0x1da)+yamlString(_0x56f556[_0x2e1029(0x200)]):undefined,_0x2e1029(0x1ed)+yamlString(_0x56f556[_0x2e1029(0x1f0)]),_0x2e1029(0x1ea),'',_0x884acb][_0x2e1029(0x1e9)](_0x88200c=>_0x88200c!==undefined)[_0x2e1029(0x1e0)]('\x0a');}function yamlString(_0x5da66c){const _0x5e2d84=a102_0x16de;return JSON['stringify'](_0x5da66c['replace'](/\r/g,'')[_0x5e2d84(0x1e6)]());}function skillDisplayName(_0x50771d,_0x1929b6){const _0x1be59b=a102_0x16de,_0x5721d5=_0x50771d[_0x1be59b(0x1d8)]?.[_0x1be59b(0x1e6)]();return _0x5721d5||_0x1929b6;}function withSyncedDisplayName(_0xac99dd,_0x5901d6){const _0x2d69ae=a102_0x16de,_0x58e97c=_0xac99dd[_0x2d69ae(0x1e2)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x58e97c)return _0xac99dd;const _0x3457d8=_0x58e97c[0x1]??'',_0x70c887=_0x58e97c[0x2]??'',_0x3da02f=parseDocument(_0x70c887);if(_0x3da02f[_0x2d69ae(0x1e3)]['length']>0x0||!isMap(_0x3da02f[_0x2d69ae(0x1de)]))return _0xac99dd;if(_0x5901d6)_0x3da02f[_0x2d69ae(0x202)]('displayName',_0x5901d6);else{if(_0x3da02f['has'](_0x2d69ae(0x200)))_0x3da02f[_0x2d69ae(0x20b)](_0x2d69ae(0x200));else return _0xac99dd;}forceBlockCollections(_0x3da02f[_0x2d69ae(0x1de)]);const _0x3f5141=_0x3da02f[_0x2d69ae(0x1dd)]({'lineWidth':0x0})[_0x2d69ae(0x1fc)](),_0x39bd2a=_0xac99dd[_0x2d69ae(0x1ff)](_0x58e97c[0x0][_0x2d69ae(0x203)])[_0x2d69ae(0x201)](/^\r?\n/,'');return _0x3457d8+_0x2d69ae(0x20d)+_0x3f5141+_0x2d69ae(0x206)+_0x39bd2a;}function a102_0x16de(_0x564225,_0x2af4ce){_0x564225=_0x564225-0x1d6;const _0x3598e1=a102_0x3598();let _0x16de04=_0x3598e1[_0x564225];return _0x16de04;}function forceBlockCollections(_0x9ee1d6){if(!isNode(_0x9ee1d6))return;visit(_0x9ee1d6,(_0x226f5e,_0x37335e)=>{const _0x479c04=a102_0x16de;isCollection(_0x37335e)&&(_0x37335e[_0x479c04(0x1e7)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23acd6,_0x3d2b85,_0x284972,_0x255e17){const _0x47af01=a102_0x16de;if(_0x255e17||!existsSync(_0x3d2b85))return;const _0x50d857=readMetadataIfPresent(_0x3d2b85);if(!_0x50d857)return;const _0xbd2502=_0x50d857[_0x47af01(0x1e5)]&&Object[_0x47af01(0x1e4)](_0x50d857[_0x47af01(0x1e5)])[_0x47af01(0x203)]>0x0?_0x50d857[_0x47af01(0x1e5)]:undefined;if(_0xbd2502)for(const [_0xebc739,_0x3fe88e]of Object[_0x47af01(0x1f3)](_0xbd2502)){const _0x5c5ec7=resolveManagedFilePath(_0x23acd6,_0xebc739);if(!existsSync(_0x5c5ec7))throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,_0x47af01(0x205)+_0xebc739);const _0x27086e=lstatSync(_0x5c5ec7);if(!_0x27086e[_0x47af01(0x1fa)]())throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0xebc739);const _0x42285b=bufferSha256(readFileSync(_0x5c5ec7));if(_0x42285b!==_0x3fe88e)throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6+_0x47af01(0x1f5)+_0xebc739,_0x47af01(0x1fb)+_0xebc739);}else{const _0x593643=resolve(_0x23acd6,SKILL_FILE);if(existsSync(_0x593643)&&_0x50d857[_0x47af01(0x1f7)]){const _0x44835e=contentHash(readFileSync(_0x593643,'utf8'));if(_0x44835e!==_0x50d857[_0x47af01(0x1f7)])throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x1ec)+_0x593643,_0x47af01(0x1ef));}}for(const _0xd85fdb of normalizeLocalFiles(_0x284972)){if(_0xbd2502?.[_0xd85fdb[_0x47af01(0x1f1)]])continue;if(!_0xbd2502&&_0xd85fdb['path']===SKILL_FILE)continue;const _0x8ac442=resolveManagedFilePath(_0x23acd6,_0xd85fdb[_0x47af01(0x1f1)]);if(!existsSync(_0x8ac442))continue;const _0x3d9546=lstatSync(_0x8ac442);if(!_0x3d9546['isFile']())throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6,_0x47af01(0x1d6)+_0xd85fdb[_0x47af01(0x1f1)]);const _0x10cedc=bufferSha256(readFileSync(_0x8ac442));if(_0x10cedc!==fileHash(_0xd85fdb))throw CliErrors['validation'](_0x47af01(0x20c)+_0x23acd6,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0xd85fdb['path']);}}function materializeFiles(_0x3c7d51,_0xade40c){const _0x34b3f9=a102_0x16de;for(const _0x1e1ced of normalizeLocalFiles(_0xade40c)){const _0x2f1dfc=resolveManagedFilePath(_0x3c7d51,_0x1e1ced[_0x34b3f9(0x1f1)]);mkdirSync(dirname(_0x2f1dfc),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2f1dfc,fileContent(_0x1e1ced),0x180);}}function removeStaleManagedFiles(_0x4a6cad,_0x351d1a,_0x1bb0af){const _0x242e11=a102_0x16de;if(!_0x351d1a)return;const _0x35b5bb=new Set(normalizeLocalFiles(_0x1bb0af)[_0x242e11(0x208)](_0x31748e=>_0x31748e[_0x242e11(0x1f1)]));for(const _0x124b7e of Object[_0x242e11(0x1e4)](_0x351d1a)){if(_0x35b5bb[_0x242e11(0x204)](_0x124b7e))continue;const _0x1a2711=resolveManagedFilePath(_0x4a6cad,_0x124b7e);existsSync(_0x1a2711)&&lstatSync(_0x1a2711)[_0x242e11(0x1fa)]()&&rmSync(_0x1a2711,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x1b28a9,_0x583493){const _0x18581e=a102_0x3a45,_0x2dc18a=_0x1b28a9();while(!![]){try{const _0x386d37=-parseInt(_0x18581e(0x13d))/0x1+-parseInt(_0x18581e(0x141))/0x2*(-parseInt(_0x18581e(0x137))/0x3)+parseInt(_0x18581e(0x143))/0x4*(parseInt(_0x18581e(0x138))/0x5)+-parseInt(_0x18581e(0x12f))/0x6*(parseInt(_0x18581e(0x126))/0x7)+parseInt(_0x18581e(0x12e))/0x8+parseInt(_0x18581e(0x135))/0x9*(-parseInt(_0x18581e(0x148))/0xa)+-parseInt(_0x18581e(0x13e))/0xb*(parseInt(_0x18581e(0x130))/0xc);if(_0x386d37===_0x583493)break;else _0x2dc18a['push'](_0x2dc18a['shift']());}catch(_0x2eb47f){_0x2dc18a['push'](_0x2dc18a['shift']());}}}(a102_0x48e6,0xbee9f));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x20b5c4,_0x571ebf,_0x2bf28e,_0x10df6b,_0x70b84,_0xfa8d8a,_0x19ab19){const _0x4345e8=a102_0x3a45,_0x210cc0=_0xfa8d8a?normalizeLocalFiles(_0xfa8d8a):[],_0x166dfb=!_0x19ab19&&_0x210cc0[_0x4345e8(0x133)]>0x0?buildSkillPackage(_0x210cc0):undefined,_0x524288=_0x19ab19?bufferSha256(_0x19ab19):_0x166dfb?.[_0x4345e8(0x139)][_0x4345e8(0x13f)],_0x4dbddb=_0x19ab19?.[_0x4345e8(0x133)]??_0x166dfb?.[_0x4345e8(0x139)][_0x4345e8(0x142)],_0x4646f6=_0x210cc0[_0x4345e8(0x133)]>0x0?Object[_0x4345e8(0x136)](_0x210cc0['map'](_0x3308e7=>[_0x3308e7[_0x4345e8(0x149)],fileHash(_0x3308e7)])):undefined;return{'schemaVersion':_0x210cc0['length']>0x0?0x2:0x1,'id':_0x20b5c4['id'],'appCode':_0x2bf28e,'skillCode':requireSkillCode(_0x20b5c4),'skillName':_0x20b5c4[_0x4345e8(0x128)],'description':_0x20b5c4['description'],'scope':_0x571ebf,'readonly':_0x571ebf!==_0x4345e8(0x13a)||_0x20b5c4[_0x4345e8(0x140)]===!![],'tenantCode':_0x20b5c4[_0x4345e8(0x146)],'userId':_0x20b5c4[_0x4345e8(0x12c)],'version':_0x20b5c4['version'],'status':_0x20b5c4[_0x4345e8(0x145)],'tags':Array[_0x4345e8(0x134)](_0x20b5c4['tags'])?_0x20b5c4['tags']:[],'hasUpstreamUpdate':_0x20b5c4[_0x4345e8(0x129)],'forkedFromSkillId':_0x20b5c4[_0x4345e8(0x132)],'forkedFromVersion':_0x20b5c4['forkedFromVersion'],'sourceSessionId':_0x20b5c4[_0x4345e8(0x12b)],'contentHash':_0x10df6b,'fileHashes':_0x4646f6,'treeHash':_0x210cc0['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x210cc0)):undefined,'ossPath':remoteManifestOssPath(_0x20b5c4[_0x4345e8(0x127)]),'zipSha256':_0x524288,'zipSize':_0x4dbddb,'files':_0x210cc0[_0x4345e8(0x133)]>0x0?_0x210cc0[_0x4345e8(0x13b)](_0x3b2898=>({'path':_0x3b2898[_0x4345e8(0x149)],'hash':fileHash(_0x3b2898),'size':fileContent(_0x3b2898)[_0x4345e8(0x133)]})):undefined,'pulledAt':_0x70b84??new Date()[_0x4345e8(0x147)]()};}function a102_0x3a45(_0xa8c751,_0x3165b4){_0xa8c751=_0xa8c751-0x125;const _0x48e61b=a102_0x48e6();let _0x3a45b1=_0x48e61b[_0xa8c751];return _0x3a45b1;}export function requireSkillCode(_0x5dd39c){const _0x2085aa=a102_0x3a45,_0x24921e=_0x5dd39c[_0x2085aa(0x144)]?.['trim']();if(!_0x24921e)throw CliErrors[_0x2085aa(0x131)](_0x2085aa(0x12d));return _0x24921e;}export function readMetadataIfPresent(_0x41cbf9){if(!existsSync(_0x41cbf9))return undefined;try{const _0x488d96=JSON['parse'](readFileSync(_0x41cbf9,'utf8'));return _0x488d96;}catch{throw CliErrors['validation']('Invalid\x20'+METADATA_FILE+':\x20'+_0x41cbf9);}}function a102_0x48e6(){const _0x42adc7=['status','tenantCode','toISOString','55450YvDZOn','path','object','2329341XimVmc','files','skillName','hasUpstreamUpdate','trim','sourceSessionId','userId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','9178368nTVQKq','12SpLwWv','6047964QIlmrw','validation','forkedFromSkillId','length','isArray','918Twqave','fromEntries','1473jnoYuI','8270cXpXkr','manifest','personal','map','ossPath','5823YiGexl','33GzRQof','zipSha256','readonly','5202DjKHwW','zipSize','2676Amunwp','skillCode'];a102_0x48e6=function(){return _0x42adc7;};return a102_0x48e6();}function remoteManifestOssPath(_0x3d14f8){const _0xc25af5=a102_0x3a45;if(!_0x3d14f8||typeof _0x3d14f8!==_0xc25af5(0x125)||Array[_0xc25af5(0x134)](_0x3d14f8))return undefined;const _0x3e1d4f=_0x3d14f8[_0xc25af5(0x13c)];return typeof _0x3e1d4f==='string'&&_0x3e1d4f[_0xc25af5(0x12a)]()?_0x3e1d4f[_0xc25af5(0x12a)]():undefined;}
1
+ (function(_0x564b79,_0x19330d){const _0x4084e7=a103_0x338c,_0x54f3b6=_0x564b79();while(!![]){try{const _0x49b264=parseInt(_0x4084e7(0x20a))/0x1+-parseInt(_0x4084e7(0x1fc))/0x2*(-parseInt(_0x4084e7(0x1ef))/0x3)+-parseInt(_0x4084e7(0x208))/0x4*(parseInt(_0x4084e7(0x201))/0x5)+parseInt(_0x4084e7(0x204))/0x6*(-parseInt(_0x4084e7(0x1ff))/0x7)+-parseInt(_0x4084e7(0x203))/0x8*(parseInt(_0x4084e7(0x212))/0x9)+-parseInt(_0x4084e7(0x1fe))/0xa*(parseInt(_0x4084e7(0x1f9))/0xb)+-parseInt(_0x4084e7(0x1fb))/0xc*(-parseInt(_0x4084e7(0x20c))/0xd);if(_0x49b264===_0x19330d)break;else _0x54f3b6['push'](_0x54f3b6['shift']());}catch(_0x5089fc){_0x54f3b6['push'](_0x54f3b6['shift']());}}}(a103_0x10f1,0x6e4c7));function a103_0x10f1(){const _0x45f3ef=['description','52980GcgSkC','521610CTMItU','Invalid\x20','468910vtOCES','7JLxiDW','forkedFromVersion','5bLrsPV','utf8','8VmgeYQ','3344310IvSEfF','version','trim','string','2694504RzYWlx','manifest','570933NrYfwr','zipSize','2314birLby','hasUpstreamUpdate','skillName','userId','isArray','map','3685797pkdUGV','skillCode','tags','9nfSIxV','toISOString','path','personal','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','length','object','fromEntries','files','11LvvoYO'];a103_0x10f1=function(){return _0x45f3ef;};return a103_0x10f1();}function a103_0x338c(_0x146e49,_0x5256d4){_0x146e49=_0x146e49-0x1ed;const _0x10f14c=a103_0x10f1();let _0x338ccd=_0x10f14c[_0x146e49];return _0x338ccd;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2e4165,_0x50c618,_0x375e87,_0x5db8f8,_0x1eada8,_0x174552,_0x3e78aa){const _0x2571d7=a103_0x338c,_0x1653ab=_0x174552?normalizeLocalFiles(_0x174552):[],_0x21a9c4=!_0x3e78aa&&_0x1653ab[_0x2571d7(0x1f5)]>0x0?buildSkillPackage(_0x1653ab):undefined,_0x426382=_0x3e78aa?bufferSha256(_0x3e78aa):_0x21a9c4?.[_0x2571d7(0x209)]['zipSha256'],_0x367a11=_0x3e78aa?.[_0x2571d7(0x1f5)]??_0x21a9c4?.['manifest'][_0x2571d7(0x20b)],_0x3925fc=_0x1653ab[_0x2571d7(0x1f5)]>0x0?Object[_0x2571d7(0x1f7)](_0x1653ab[_0x2571d7(0x211)](_0x4c5502=>[_0x4c5502[_0x2571d7(0x1f1)],fileHash(_0x4c5502)])):undefined;return{'schemaVersion':_0x1653ab[_0x2571d7(0x1f5)]>0x0?0x2:0x1,'id':_0x2e4165['id'],'appCode':_0x375e87,'skillCode':requireSkillCode(_0x2e4165),'skillName':_0x2e4165[_0x2571d7(0x20e)],'description':_0x2e4165[_0x2571d7(0x1fa)],'scope':_0x50c618,'readonly':_0x50c618!==_0x2571d7(0x1f2)||_0x2e4165['readonly']===!![],'tenantCode':_0x2e4165['tenantCode'],'userId':_0x2e4165[_0x2571d7(0x20f)],'version':_0x2e4165[_0x2571d7(0x205)],'status':_0x2e4165['status'],'tags':Array[_0x2571d7(0x210)](_0x2e4165[_0x2571d7(0x1ee)])?_0x2e4165[_0x2571d7(0x1ee)]:[],'hasUpstreamUpdate':_0x2e4165[_0x2571d7(0x20d)],'forkedFromSkillId':_0x2e4165[_0x2571d7(0x1f3)],'forkedFromVersion':_0x2e4165[_0x2571d7(0x200)],'sourceSessionId':_0x2e4165['sourceSessionId'],'contentHash':_0x5db8f8,'fileHashes':_0x3925fc,'treeHash':_0x1653ab['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x1653ab)):undefined,'ossPath':remoteManifestOssPath(_0x2e4165[_0x2571d7(0x1f8)]),'zipSha256':_0x426382,'zipSize':_0x367a11,'files':_0x1653ab[_0x2571d7(0x1f5)]>0x0?_0x1653ab['map'](_0xedad43=>({'path':_0xedad43[_0x2571d7(0x1f1)],'hash':fileHash(_0xedad43),'size':fileContent(_0xedad43)[_0x2571d7(0x1f5)]})):undefined,'pulledAt':_0x1eada8??new Date()[_0x2571d7(0x1f0)]()};}export function requireSkillCode(_0x47c3a7){const _0x1e23af=a103_0x338c,_0x515410=_0x47c3a7[_0x1e23af(0x1ed)]?.[_0x1e23af(0x206)]();if(!_0x515410)throw CliErrors['validation'](_0x1e23af(0x1f4));return _0x515410;}export function readMetadataIfPresent(_0x10f1de){const _0x4e660a=a103_0x338c;if(!existsSync(_0x10f1de))return undefined;try{const _0x49f708=JSON['parse'](readFileSync(_0x10f1de,_0x4e660a(0x202)));return _0x49f708;}catch{throw CliErrors['validation'](_0x4e660a(0x1fd)+METADATA_FILE+':\x20'+_0x10f1de);}}function remoteManifestOssPath(_0x37a5ac){const _0x3c50c3=a103_0x338c;if(!_0x37a5ac||typeof _0x37a5ac!==_0x3c50c3(0x1f6)||Array[_0x3c50c3(0x210)](_0x37a5ac))return undefined;const _0x12286a=_0x37a5ac['ossPath'];return typeof _0x12286a===_0x3c50c3(0x207)&&_0x12286a['trim']()?_0x12286a[_0x3c50c3(0x206)]():undefined;}
@@ -1 +1 @@
1
- const a103_0x2aecb8=a103_0x52c0;(function(_0x21d0b2,_0x559c85){const _0x188562=a103_0x52c0,_0x40ec2a=_0x21d0b2();while(!![]){try{const _0x16eed5=parseInt(_0x188562(0xb4))/0x1+parseInt(_0x188562(0x9e))/0x2*(parseInt(_0x188562(0xba))/0x3)+-parseInt(_0x188562(0xb1))/0x4*(parseInt(_0x188562(0xaf))/0x5)+parseInt(_0x188562(0xae))/0x6*(parseInt(_0x188562(0xb3))/0x7)+parseInt(_0x188562(0xa3))/0x8+-parseInt(_0x188562(0xbb))/0x9+-parseInt(_0x188562(0xa7))/0xa*(-parseInt(_0x188562(0xa9))/0xb);if(_0x16eed5===_0x559c85)break;else _0x40ec2a['push'](_0x40ec2a['shift']());}catch(_0x4485f8){_0x40ec2a['push'](_0x40ec2a['shift']());}}}(a103_0x4f52,0x7cf28));function a103_0x52c0(_0x3d491d,_0x197381){_0x3d491d=_0x3d491d-0x9e;const _0x4f5244=a103_0x4f52();let _0x52c076=_0x4f5244[_0x3d491d];return _0x52c076;}import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x58691b={}){const _0x4e9617=a103_0x52c0,_0x556b17=_0x58691b[_0x4e9617(0xa0)]??homedir(),_0x31ff3a=resolve(_0x556b17,PRODUCT_CONFIG[_0x4e9617(0xbd)],_0x4e9617(0xa6)),_0x6e339c=trimmedEnv(_0x4e9617(0xb0)),_0x28cb6d=trimmedEnv(_0x4e9617(0xb7)),_0x5ef7d9=resolve(_0x556b17,_0x4e9617(0xb2)),_0x6c4410=_0x58691b[_0x4e9617(0xa2)]??(existsSync(_0x5ef7d9)?resolve(_0x5ef7d9,_0x4e9617(0xb8)):undefined);return{'homeDir':_0x556b17,'cacheRoot':_0x31ff3a,'managedRoot':resolve(_0x556b17,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x58691b[_0x4e9617(0xad)]??_0x6e339c??resolve(_0x556b17,_0x4e9617(0xbc),'skills'),'claudeSkillsDir':_0x58691b[_0x4e9617(0xa1)]??_0x28cb6d??resolve(_0x556b17,'.claude','skills'),'workbuddySkillsDir':_0x6c4410};}export function runtimeAgentSkillRoots(_0x5b5e97){const _0x2b7869=a103_0x52c0;return[_0x5b5e97[_0x2b7869(0xad)],_0x5b5e97[_0x2b7869(0xa1)],_0x5b5e97['workbuddySkillsDir']][_0x2b7869(0xab)](_0x543f7d=>Boolean(_0x543f7d));}export function getRuntimeSkillCacheRoot(_0x2b4119,_0x77ae8,_0x21f89c={}){const _0x89314b=a103_0x52c0,_0x3bc9a3=resolveSkillSyncPaths(_0x21f89c);return resolve(_0x3bc9a3[_0x89314b(0xa8)],_0x2b4119,fingerprintAccessKey(_0x77ae8),_0x89314b(0xb8));}export function getRuntimeSkillDir(_0xabfe4d,_0x375284,_0x23208b,_0x4b4362,_0x54b555,_0x53316f={}){const _0x32aa47=a103_0x52c0;return resolve(getRuntimeSkillCacheRoot(_0xabfe4d,_0x375284,_0x53316f),safePathSegment(_0x23208b,_0x32aa47(0xb5)),_0x4b4362,safePathSegment(_0x54b555,_0x32aa47(0xa5)));}function a103_0x4f52(){const _0x4e6324=['11powsjk','Unsafe\x20','filter','includes','agentsSkillsDir','6JnBxUp','397615IhxsNk','SKILL_ROOT','44junMay','.workbuddy','6919381XSHbjg','60889BUKsPo','appCode','trim','CLAUDE_SKILL_ROOT','skills','path\x20segment','21aownLa','7551009MUVOQJ','.agents','homeDirName','31034bvAzWY','\x20for\x20local\x20path:\x20','homeDir','claudeSkillsDir','workbuddySkillsDir','1355696zutjFF','validation','skillCode','cache','8980850uaYvdQ','cacheRoot'];a103_0x4f52=function(){return _0x4e6324;};return a103_0x4f52();}export function safePathSegment(_0x578ead,_0x1b27fe=a103_0x2aecb8(0xb9)){const _0x38a834=a103_0x2aecb8;if(!_0x578ead||_0x578ead[_0x38a834(0xac)]('/')||_0x578ead[_0x38a834(0xac)]('\x5c')||_0x578ead[_0x38a834(0xac)]('..'))throw CliErrors[_0x38a834(0xa4)](_0x38a834(0xaa)+_0x1b27fe+_0x38a834(0x9f)+_0x578ead);return _0x578ead;}function trimmedEnv(_0x15f9cd){const _0x4db235=a103_0x2aecb8,_0x23f346=productEnv(_0x15f9cd)?.[_0x4db235(0xb6)]();return _0x23f346?_0x23f346:undefined;}
1
+ const a104_0x1becd4=a104_0x1560;(function(_0x26f860,_0x563b71){const _0x179d39=a104_0x1560,_0x13772d=_0x26f860();while(!![]){try{const _0x1cbff3=parseInt(_0x179d39(0x1db))/0x1+-parseInt(_0x179d39(0x1d4))/0x2*(-parseInt(_0x179d39(0x1d0))/0x3)+parseInt(_0x179d39(0x1dc))/0x4+-parseInt(_0x179d39(0x1cb))/0x5+parseInt(_0x179d39(0x1ca))/0x6*(parseInt(_0x179d39(0x1e3))/0x7)+-parseInt(_0x179d39(0x1d1))/0x8*(parseInt(_0x179d39(0x1cd))/0x9)+-parseInt(_0x179d39(0x1e0))/0xa;if(_0x1cbff3===_0x563b71)break;else _0x13772d['push'](_0x13772d['shift']());}catch(_0x55f3a0){_0x13772d['push'](_0x13772d['shift']());}}}(a104_0x5748,0x7464e));import{existsSync}from'node:fs';import{homedir}from'node:os';function a104_0x1560(_0xce0980,_0x531301){_0xce0980=_0xce0980-0x1c9;const _0x574898=a104_0x5748();let _0x156049=_0x574898[_0xce0980];return _0x156049;}import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xd9d6d5={}){const _0x2cf43a=a104_0x1560,_0x4da3b5=_0xd9d6d5[_0x2cf43a(0x1d9)]??homedir(),_0x51e4ed=resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName'],_0x2cf43a(0x1ce)),_0x37775c=trimmedEnv(_0x2cf43a(0x1c9)),_0x238d37=trimmedEnv(_0x2cf43a(0x1d2)),_0x2757f8=resolve(_0x4da3b5,_0x2cf43a(0x1df)),_0x5c68c3=_0xd9d6d5[_0x2cf43a(0x1d6)]??(existsSync(_0x2757f8)?resolve(_0x2757f8,_0x2cf43a(0x1d3)):undefined);return{'homeDir':_0x4da3b5,'cacheRoot':_0x51e4ed,'managedRoot':resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0xd9d6d5[_0x2cf43a(0x1de)]??_0x37775c??resolve(_0x4da3b5,_0x2cf43a(0x1dd),_0x2cf43a(0x1d3)),'claudeSkillsDir':_0xd9d6d5[_0x2cf43a(0x1e5)]??_0x238d37??resolve(_0x4da3b5,_0x2cf43a(0x1d8),_0x2cf43a(0x1d3)),'workbuddySkillsDir':_0x5c68c3};}export function runtimeAgentSkillRoots(_0x52e0c2){const _0x2a6ea2=a104_0x1560;return[_0x52e0c2[_0x2a6ea2(0x1de)],_0x52e0c2[_0x2a6ea2(0x1e5)],_0x52e0c2[_0x2a6ea2(0x1d6)]][_0x2a6ea2(0x1e2)](_0x1b4787=>Boolean(_0x1b4787));}export function getRuntimeSkillCacheRoot(_0x43eaea,_0x371003,_0x1498b0={}){const _0x2112ee=a104_0x1560,_0x59c92c=resolveSkillSyncPaths(_0x1498b0);return resolve(_0x59c92c['cacheRoot'],_0x43eaea,fingerprintAccessKey(_0x371003),_0x2112ee(0x1d3));}export function getRuntimeSkillDir(_0x39e72b,_0x385c13,_0x608e7b,_0x1756ef,_0x33383b,_0x31dbcf={}){const _0x152722=a104_0x1560;return resolve(getRuntimeSkillCacheRoot(_0x39e72b,_0x385c13,_0x31dbcf),safePathSegment(_0x608e7b,_0x152722(0x1cc)),_0x1756ef,safePathSegment(_0x33383b,_0x152722(0x1e1)));}function a104_0x5748(){const _0x5a23f5=['cache','Unsafe\x20','27nIOTBd','16yKBTYm','CLAUDE_SKILL_ROOT','skills','41522IsdgFp','includes','workbuddySkillsDir','path\x20segment','.claude','homeDir','validation','371402WGZhin','3614632NLaZcs','.agents','agentsSkillsDir','.workbuddy','3684960lLEdOH','skillCode','filter','19397ufKioC','\x20for\x20local\x20path:\x20','claudeSkillsDir','SKILL_ROOT','834exiqFl','1090350tmTtBg','appCode','3526929hoHfxK'];a104_0x5748=function(){return _0x5a23f5;};return a104_0x5748();}export function safePathSegment(_0x2f01dc,_0x1c9cad=a104_0x1becd4(0x1d7)){const _0x175e5f=a104_0x1becd4;if(!_0x2f01dc||_0x2f01dc[_0x175e5f(0x1d5)]('/')||_0x2f01dc['includes']('\x5c')||_0x2f01dc[_0x175e5f(0x1d5)]('..'))throw CliErrors[_0x175e5f(0x1da)](_0x175e5f(0x1cf)+_0x1c9cad+_0x175e5f(0x1e4)+_0x2f01dc);return _0x2f01dc;}function trimmedEnv(_0x437b13){const _0x6d661b=productEnv(_0x437b13)?.['trim']();return _0x6d661b?_0x6d661b:undefined;}
@@ -1 +1 @@
1
- function a104_0x5969(_0x1a4833,_0x584121){_0x1a4833=_0x1a4833-0x10a;const _0x55396c=a104_0x5539();let _0x59694=_0x55396c[_0x1a4833];return _0x59694;}(function(_0xb03c02,_0x5a4f3b){const _0x3be624=a104_0x5969,_0x21218d=_0xb03c02();while(!![]){try{const _0x44dbee=-parseInt(_0x3be624(0x13c))/0x1+-parseInt(_0x3be624(0x131))/0x2*(parseInt(_0x3be624(0x137))/0x3)+-parseInt(_0x3be624(0x10e))/0x4+parseInt(_0x3be624(0x10a))/0x5*(-parseInt(_0x3be624(0x118))/0x6)+parseInt(_0x3be624(0x117))/0x7*(-parseInt(_0x3be624(0x136))/0x8)+parseInt(_0x3be624(0x11e))/0x9+parseInt(_0x3be624(0x135))/0xa*(parseInt(_0x3be624(0x10b))/0xb);if(_0x44dbee===_0x5a4f3b)break;else _0x21218d['push'](_0x21218d['shift']());}catch(_0x2c5103){_0x21218d['push'](_0x21218d['shift']());}}}(a104_0x5539,0xde658));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x296489}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0xefdd23,_0x2cbc56,_0x48b44f={}){const _0xb51fb7=a104_0x5969,_0x2bdab0=resolvePushDirectoryRoot(_0xefdd23),_0x2aae40=readPushMetadataIfPresent(resolve(_0x2bdab0,METADATA_FILE),{'ignoreInvalidMetadata':_0x48b44f[_0xb51fb7(0x145)]});if(_0x2aae40?.['appCode']&&_0x2aae40[_0xb51fb7(0x11b)]!==_0x2cbc56&&!_0x48b44f['allowAppCodeRetarget']&&!_0x48b44f[_0xb51fb7(0x10d)])throw CliErrors[_0xb51fb7(0x114)](_0xb51fb7(0x119)+_0x2aae40[_0xb51fb7(0x11b)]+_0xb51fb7(0x139)+_0x2cbc56+'\x22.');const _0x5b9616=resolvePushSkillCode(_0x2bdab0,_0x2cbc56,_0x2aae40,_0x48b44f);if(!_0x5b9616)throw CliErrors[_0xb51fb7(0x114)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0xb51fb7(0x14c));return{'dir':_0x2bdab0,'skillCode':_0x5b9616,'metadata':_0x2aae40};}export function readPushDirectory(_0x49506f,_0x89d176,_0x257cc7={}){const _0xdfad54=a104_0x5969,_0x964ebd=resolvePushDirectoryIdentity(_0x49506f,_0x89d176,_0x257cc7),_0xb90b73=_0x964ebd[_0xdfad54(0x14d)],_0x24c086=resolve(_0xb90b73,SKILL_FILE);if(!existsSync(_0x24c086)||!lstatSync(_0x24c086)[_0xdfad54(0x11a)]())throw CliErrors['validation'](_0xdfad54(0x12d)+SKILL_FILE+':\x20'+_0x24c086);const _0x4c7c7c=_0x964ebd[_0xdfad54(0x13e)],_0x5e7e0a=_0x257cc7[_0xdfad54(0x113)]??_0xdfad54(0x146);if(!_0x257cc7['ignoreMetadataScope']&&_0x4c7c7c?.[_0xdfad54(0x128)]===_0xdfad54(0x13b))throw CliErrors[_0xdfad54(0x114)](_0xdfad54(0x140)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x4c7c7c['scope']+'\x22.');if(!_0x257cc7['ignoreMetadataScope']&&_0x5e7e0a===_0xdfad54(0x146)&&_0x4c7c7c?.[_0xdfad54(0x128)]&&_0x4c7c7c['scope']!==_0xdfad54(0x146))throw CliErrors[_0xdfad54(0x114)](_0xdfad54(0x138)+METADATA_FILE+_0xdfad54(0x129)+_0x4c7c7c[_0xdfad54(0x128)]+'\x22.',_0xdfad54(0x134)+_0xb90b73+_0xdfad54(0x110));const _0x5760a5=scanSkillDirectory(_0xb90b73),_0x3866a7=buildSkillPackage(_0x5760a5),_0xc708fd=readFileSync(_0x24c086,'utf8'),_0xb3e92a=_0x964ebd['skillCode'],_0x476436=_0x257cc7['ignoreMetadataForPayload']?undefined:_0x4c7c7c,_0x3a608c=readSkillDisplayName(_0xc708fd);return{'skillCode':_0xb3e92a,'metadata':_0x4c7c7c,'frontmatterDisplayName':_0x3a608c,'input':{'skillCode':_0xb3e92a,'skillName':_0x3a608c??_0x476436?.[_0xdfad54(0x116)],'description':_0x476436?.[_0xdfad54(0x12a)],'content':_0xc708fd,'files':_0x3866a7[_0xdfad54(0x115)],'packageBase64':_0x3866a7[_0xdfad54(0x11c)],'tags':_0x476436?.[_0xdfad54(0x121)],'version':_0x476436?.[_0xdfad54(0x147)],'sourceSessionId':_0x476436?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1446c3,_0x377803,_0x52594a,_0x443437={}){const _0x3dfaff=a104_0x5969,_0x419de1=resolvePushDirectoryRoot(_0x1446c3),_0x53e83e=readPushMetadataIfPresent(resolve(_0x419de1,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x20bc1c=requireRemoteScope(_0x377803),_0x11c9f9=readLocalSkillContent(_0x419de1),_0x4d4b69={..._0x377803,'appCode':_0x377803[_0x3dfaff(0x11b)]??_0x52594a,'skillName':_0x377803['skillName']??_0x53e83e?.[_0x3dfaff(0x116)],'description':_0x377803[_0x3dfaff(0x12a)]??_0x53e83e?.[_0x3dfaff(0x12a)],'tags':Array[_0x3dfaff(0x148)](_0x377803[_0x3dfaff(0x121)])?_0x377803['tags']:_0x53e83e?.[_0x3dfaff(0x121)],'sourceSessionId':_0x377803['sourceSessionId']??_0x53e83e?.[_0x3dfaff(0x12b)],'content':_0x377803[_0x3dfaff(0x120)]??_0x11c9f9},_0xaf2020=buildMetadata(_0x4d4b69,_0x20bc1c,_0x52594a,contentHash(_0x11c9f9),_0x443437[_0x3dfaff(0x11f)]);writeJsonAtomic(resolve(_0x419de1,METADATA_FILE),_0xaf2020);}export function recordPushedRuntimeSkill(_0xce3af2,_0x2b55d5,_0x51e60b,_0x2712dc={}){const _0xd01b1=a104_0x5969,_0x5999b9=resolvePushDirectoryRoot(_0xce3af2),_0xf208ef=scanSkillDirectory(_0x5999b9),_0x2bd3a2=_0xf208ef[_0xd01b1(0x144)](_0x3a916a=>_0x3a916a[_0xd01b1(0x111)]===SKILL_FILE),_0x38ec8e=_0x2bd3a2?fileText(_0x2bd3a2):'',_0x128112=tryNormalizePackageManifest(_0x2b55d5[_0xd01b1(0x13a)]),_0x10f376={..._0x2b55d5,'content':_0x2b55d5[_0xd01b1(0x120)]??_0x38ec8e,'files':_0x128112},_0x1bd500=_0x128112?normalizeLocalFiles(_0xf208ef)['filter'](_0x17c487=>_0x128112[_0xd01b1(0x13a)][_0xd01b1(0x12f)](_0x3bb696=>_0x3bb696['path']===_0x17c487[_0xd01b1(0x111)])):undefined,_0x223c08=buildMetadata(_0x10f376,_0x2712dc[_0xd01b1(0x128)]??_0xd01b1(0x146),_0x51e60b,contentHash(_0x10f376[_0xd01b1(0x120)]??''),_0x2712dc[_0xd01b1(0x132)],_0x1bd500);writeJsonAtomic(resolve(_0x5999b9,METADATA_FILE),_0x223c08);}export function deriveSkillCodeFromDirectory(_0x1a1840,_0x5a5f01){const _0x48b76c=a104_0x5969,_0x39b9b0=basename(resolve(_0x1a1840)),_0x56cc22=_0x5a5f01+'--';return _0x39b9b0[_0x48b76c(0x142)](_0x56cc22)?_0x39b9b0['slice'](_0x56cc22[_0x48b76c(0x10f)]):_0x39b9b0;}function resolvePushSkillCode(_0x4c468f,_0x5fb8dd,_0x76bb74,_0x1916c7){const _0x24c9c2=a104_0x5969,_0x4760bf=deriveSkillCodeFromSkillFile(_0x4c468f)||deriveSkillCodeFromDirectory(_0x4c468f,_0x5fb8dd);if(_0x1916c7[_0x24c9c2(0x14e)])return _0x4760bf;return _0x76bb74?.['skillCode']?.[_0x24c9c2(0x12e)]()||_0x4760bf;}function deriveSkillCodeFromSkillFile(_0x57cd08){const _0x173902=a104_0x5969,_0x4f5b6e=resolve(_0x57cd08,SKILL_FILE);if(!existsSync(_0x4f5b6e)||!lstatSync(_0x4f5b6e)[_0x173902(0x11a)]())return undefined;const _0x38df9b=readFileSync(_0x4f5b6e,_0x173902(0x122)),_0x5c579e=_0x38df9b[_0x173902(0x10c)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5c579e)return undefined;const _0x3eac99=parseFrontmatterObject(_0x5c579e[0x1]??''),_0x4d6cb3=scalarToString(_0x3eac99?.[_0x173902(0x12c)]);return _0x4d6cb3?slugifySkillName(_0x4d6cb3):undefined;}function a104_0x5539(){const _0x4abdeb=['packageBase64','isDirectory','8331984qDmCgV','refreshedAt','content','tags','utf8','skillCode','company','number','toLowerCase','isSymbolicLink','scope','\x20has\x20scope=\x22','description','sourceSessionId','name','Missing\x20','trim','some','(unknown)','2eWqwYy','pushedAt','string','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','44568580uRXpGj','16ovXNZT','1913853dBsnvN','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','builtin','1492613iiiTXO','boolean','metadata','Invalid\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','object','startsWith','Remote\x20Skill\x20','find','ignoreInvalidMetadata','personal','version','isArray','Skill\x20directory\x20not\x20found:\x20','replace','displayName',',\x20or\x20directory\x20name.','dir','ignoreMetadataSkillCode','35iDKhcb','11MsYAaI','match','ignoreMetadataAppCodeMismatch','2409044iDThuo','length','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','path','unknown','targetScope','validation','manifest','skillName','4837266gUUGGM','305826FkOvSM','Skill\x20metadata\x20appCode\x20\x22','isFile','appCode'];a104_0x5539=function(){return _0x4abdeb;};return a104_0x5539();}function readSkillDisplayName(_0x34eaa7){const _0x519579=a104_0x5969,_0x4f780c=_0x34eaa7[_0x519579(0x10c)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4f780c)return undefined;const _0x49d527=parseFrontmatterObject(_0x4f780c[0x1]??'');return scalarToString(_0x49d527?.[_0x519579(0x14b)]);}function slugifySkillName(_0x36da0c){const _0x6e6f4c=a104_0x5969,_0x5a4248=_0x36da0c[_0x6e6f4c(0x12e)]()[_0x6e6f4c(0x126)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x6e6f4c(0x14a)](/^-+/,'')[_0x6e6f4c(0x14a)](/-+$/,'')[_0x6e6f4c(0x14a)](/-{2,}/g,'-');if(!_0x5a4248)throw CliErrors[_0x6e6f4c(0x114)](_0x6e6f4c(0x13f)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x5a4248;}function parseFrontmatterObject(_0x228ee6){const _0x12b3ab=a104_0x5969;try{const _0x508ed3=a104_0x296489(_0x228ee6);return _0x508ed3&&typeof _0x508ed3===_0x12b3ab(0x141)&&!Array[_0x12b3ab(0x148)](_0x508ed3)?_0x508ed3:undefined;}catch{return undefined;}}function scalarToString(_0x337ae1){const _0x5bec62=a104_0x5969;if(typeof _0x337ae1===_0x5bec62(0x133))return _0x337ae1[_0x5bec62(0x12e)]();if(typeof _0x337ae1===_0x5bec62(0x125)||typeof _0x337ae1===_0x5bec62(0x13d))return String(_0x337ae1);return undefined;}function resolvePushDirectoryRoot(_0x1c5899){const _0x2a9938=a104_0x5969,_0x29d380=resolve(_0x1c5899);if(!existsSync(_0x29d380))throw CliErrors['validation'](_0x2a9938(0x149)+_0x1c5899);const _0x879624=lstatSync(_0x29d380);if(_0x879624[_0x2a9938(0x11d)]())return _0x29d380;if(_0x879624[_0x2a9938(0x127)]()){const _0x17aec1=realpathSync(_0x29d380);if(lstatSync(_0x17aec1)[_0x2a9938(0x11d)]())return _0x17aec1;}throw CliErrors[_0x2a9938(0x114)]('Skill\x20directory\x20not\x20found:\x20'+_0x1c5899);}function requireRemoteScope(_0xa09206){const _0x254733=a104_0x5969;if(_0xa09206[_0x254733(0x128)]===_0x254733(0x146)||_0xa09206[_0x254733(0x128)]===_0x254733(0x124)||_0xa09206['scope']==='builtin')return _0xa09206['scope'];throw CliErrors['validation'](_0x254733(0x143)+(_0xa09206[_0x254733(0x123)]||_0x254733(0x130))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0xa09206[_0x254733(0x128)]??_0x254733(0x112))+'\x22.');}function readLocalSkillContent(_0x45d48f){const _0x134985=a104_0x5969,_0xd8813e=resolve(_0x45d48f,SKILL_FILE);return existsSync(_0xd8813e)&&lstatSync(_0xd8813e)[_0x134985(0x11a)]()?readFileSync(_0xd8813e,_0x134985(0x122)):'';}function readPushMetadataIfPresent(_0x3d904b,_0x3438db={}){try{return readMetadataIfPresent(_0x3d904b);}catch(_0x3d2494){if(_0x3438db['ignoreInvalidMetadata'])return undefined;throw _0x3d2494;}}
1
+ (function(_0x4ba8dd,_0x4d04f4){const _0x117899=a105_0x3a6f,_0x118df1=_0x4ba8dd();while(!![]){try{const _0x307563=-parseInt(_0x117899(0x1ae))/0x1+parseInt(_0x117899(0x19e))/0x2+parseInt(_0x117899(0x1c3))/0x3*(-parseInt(_0x117899(0x1b7))/0x4)+parseInt(_0x117899(0x1d2))/0x5*(-parseInt(_0x117899(0x1b5))/0x6)+-parseInt(_0x117899(0x1a1))/0x7+parseInt(_0x117899(0x1d1))/0x8+parseInt(_0x117899(0x1b0))/0x9;if(_0x307563===_0x4d04f4)break;else _0x118df1['push'](_0x118df1['shift']());}catch(_0x2baa4d){_0x118df1['push'](_0x118df1['shift']());}}}(a105_0x31d1,0x96b88));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x2c46b2}from'yaml';import{CliErrors}from'../../errors.js';function a105_0x3a6f(_0x36da04,_0x4a8a59){_0x36da04=_0x36da04-0x198;const _0x31d14d=a105_0x31d1();let _0x3a6fb0=_0x31d14d[_0x36da04];return _0x3a6fb0;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';function a105_0x31d1(){const _0x4a017f=['string','skillName','5443095wFvkEr','match','object','boolean','skillCode','length','isFile','allowAppCodeRetarget','isDirectory','tags','scope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','version','934925xjbOMJ','some','30152682DOgbyq','path','number','targetScope','trim','150RfTDJy',',\x20or\x20directory\x20name.','68esWwwP','startsWith','\x20has\x20scope=\x22','utf8','sourceSessionId','refreshedAt','content','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','dir','Invalid\x20','metadata','199239CuYKxu','builtin','isArray','replace','ignoreInvalidMetadata','filter','ignoreMetadataScope','\x20name\x20for\x20SkillHub\x20slug\x20generation.','ignoreMetadataSkillCode','files','description','Skill\x20directory\x20not\x20found:\x20','validation','appCode','3272296LJptIC','163105xRIenF','find','isSymbolicLink','ignoreMetadataForPayload','Missing\x20','Skill\x20metadata\x20appCode\x20\x22','packageBase64','Remote\x20Skill\x20','company','\x20has\x20unsupported\x20scope\x20\x22','personal','ignoreMetadataAppCodeMismatch','toLowerCase','1030146jlZDJW'];a105_0x31d1=function(){return _0x4a017f;};return a105_0x31d1();}export function resolvePushDirectoryIdentity(_0x256b99,_0x3dca97,_0x5819e7={}){const _0x4256a1=a105_0x3a6f,_0x5f3793=resolvePushDirectoryRoot(_0x256b99),_0x34b9a1=readPushMetadataIfPresent(resolve(_0x5f3793,METADATA_FILE),{'ignoreInvalidMetadata':_0x5819e7[_0x4256a1(0x1c7)]});if(_0x34b9a1?.[_0x4256a1(0x1d0)]&&_0x34b9a1['appCode']!==_0x3dca97&&!_0x5819e7[_0x4256a1(0x1a8)]&&!_0x5819e7[_0x4256a1(0x19c)])throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1d7)+_0x34b9a1[_0x4256a1(0x1d0)]+_0x4256a1(0x1be)+_0x3dca97+'\x22.');const _0x5e3f26=resolvePushSkillCode(_0x5f3793,_0x3dca97,_0x34b9a1,_0x5819e7);if(!_0x5e3f26)throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1ac)+SKILL_FILE+',\x20'+METADATA_FILE+_0x4256a1(0x1b6));return{'dir':_0x5f3793,'skillCode':_0x5e3f26,'metadata':_0x34b9a1};}export function readPushDirectory(_0x5aaf07,_0x28744b,_0x178580={}){const _0x32c65b=a105_0x3a6f,_0x32498d=resolvePushDirectoryIdentity(_0x5aaf07,_0x28744b,_0x178580),_0x550391=_0x32498d[_0x32c65b(0x1c0)],_0x3f57a6=resolve(_0x550391,SKILL_FILE);if(!existsSync(_0x3f57a6)||!lstatSync(_0x3f57a6)[_0x32c65b(0x1a7)]())throw CliErrors[_0x32c65b(0x1cf)](_0x32c65b(0x1d6)+SKILL_FILE+':\x20'+_0x3f57a6);const _0x46e801=_0x32498d[_0x32c65b(0x1c2)],_0x3d0f44=_0x178580[_0x32c65b(0x1b3)]??'personal';if(!_0x178580[_0x32c65b(0x1c9)]&&_0x46e801?.[_0x32c65b(0x1ab)]===_0x32c65b(0x1c4))throw CliErrors[_0x32c65b(0x1cf)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.');if(!_0x178580[_0x32c65b(0x1c9)]&&_0x3d0f44===_0x32c65b(0x19b)&&_0x46e801?.[_0x32c65b(0x1ab)]&&_0x46e801[_0x32c65b(0x1ab)]!==_0x32c65b(0x19b))throw CliErrors[_0x32c65b(0x1cf)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.',_0x32c65b(0x1bf)+_0x550391+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x35f2f4=scanSkillDirectory(_0x550391),_0x6b613=buildSkillPackage(_0x35f2f4),_0x460b9d=readFileSync(_0x3f57a6,_0x32c65b(0x1ba)),_0xfe3f1c=_0x32498d[_0x32c65b(0x1a5)],_0x296f7c=_0x178580[_0x32c65b(0x1d5)]?undefined:_0x46e801,_0x1d0aa2=readSkillDisplayName(_0x460b9d);return{'skillCode':_0xfe3f1c,'metadata':_0x46e801,'frontmatterDisplayName':_0x1d0aa2,'input':{'skillCode':_0xfe3f1c,'skillName':_0x1d0aa2??_0x296f7c?.[_0x32c65b(0x1a0)],'description':_0x296f7c?.[_0x32c65b(0x1cd)],'content':_0x460b9d,'files':_0x6b613['manifest'],'packageBase64':_0x6b613[_0x32c65b(0x1d8)],'tags':_0x296f7c?.['tags'],'version':_0x296f7c?.[_0x32c65b(0x1ad)],'sourceSessionId':_0x296f7c?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1cae12,_0x3f8524,_0x195266,_0x36ba58={}){const _0x460875=a105_0x3a6f,_0x6175cb=resolvePushDirectoryRoot(_0x1cae12),_0x2c66fb=readPushMetadataIfPresent(resolve(_0x6175cb,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x54851c=requireRemoteScope(_0x3f8524),_0x3f0d97=readLocalSkillContent(_0x6175cb),_0x3832ac={..._0x3f8524,'appCode':_0x3f8524[_0x460875(0x1d0)]??_0x195266,'skillName':_0x3f8524[_0x460875(0x1a0)]??_0x2c66fb?.[_0x460875(0x1a0)],'description':_0x3f8524[_0x460875(0x1cd)]??_0x2c66fb?.[_0x460875(0x1cd)],'tags':Array[_0x460875(0x1c5)](_0x3f8524['tags'])?_0x3f8524[_0x460875(0x1aa)]:_0x2c66fb?.[_0x460875(0x1aa)],'sourceSessionId':_0x3f8524[_0x460875(0x1bb)]??_0x2c66fb?.[_0x460875(0x1bb)],'content':_0x3f8524[_0x460875(0x1bd)]??_0x3f0d97},_0x5a6027=buildMetadata(_0x3832ac,_0x54851c,_0x195266,contentHash(_0x3f0d97),_0x36ba58[_0x460875(0x1bc)]);writeJsonAtomic(resolve(_0x6175cb,METADATA_FILE),_0x5a6027);}export function recordPushedRuntimeSkill(_0x5532ad,_0x45bf0a,_0x347a8b,_0x2de695={}){const _0x5e6407=a105_0x3a6f,_0x474d34=resolvePushDirectoryRoot(_0x5532ad),_0x36bac5=scanSkillDirectory(_0x474d34),_0x51d4d8=_0x36bac5[_0x5e6407(0x1d3)](_0x74fc5e=>_0x74fc5e[_0x5e6407(0x1b1)]===SKILL_FILE),_0x27e67a=_0x51d4d8?fileText(_0x51d4d8):'',_0x973d48=tryNormalizePackageManifest(_0x45bf0a[_0x5e6407(0x1cc)]),_0x180f56={..._0x45bf0a,'content':_0x45bf0a[_0x5e6407(0x1bd)]??_0x27e67a,'files':_0x973d48},_0x315090=_0x973d48?normalizeLocalFiles(_0x36bac5)[_0x5e6407(0x1c8)](_0x250e3f=>_0x973d48['files'][_0x5e6407(0x1af)](_0x23d35f=>_0x23d35f[_0x5e6407(0x1b1)]===_0x250e3f['path'])):undefined,_0x8cbbd1=buildMetadata(_0x180f56,_0x2de695[_0x5e6407(0x1ab)]??'personal',_0x347a8b,contentHash(_0x180f56[_0x5e6407(0x1bd)]??''),_0x2de695['pushedAt'],_0x315090);writeJsonAtomic(resolve(_0x474d34,METADATA_FILE),_0x8cbbd1);}export function deriveSkillCodeFromDirectory(_0x5a0a80,_0x631c91){const _0x3e2be3=a105_0x3a6f,_0x30fadf=basename(resolve(_0x5a0a80)),_0x57f4a3=_0x631c91+'--';return _0x30fadf[_0x3e2be3(0x1b8)](_0x57f4a3)?_0x30fadf['slice'](_0x57f4a3[_0x3e2be3(0x1a6)]):_0x30fadf;}function resolvePushSkillCode(_0x5044fb,_0x45eecb,_0x4fd050,_0xaa3b37){const _0x3ab440=a105_0x3a6f,_0x13bb98=deriveSkillCodeFromSkillFile(_0x5044fb)||deriveSkillCodeFromDirectory(_0x5044fb,_0x45eecb);if(_0xaa3b37[_0x3ab440(0x1cb)])return _0x13bb98;return _0x4fd050?.['skillCode']?.[_0x3ab440(0x1b4)]()||_0x13bb98;}function deriveSkillCodeFromSkillFile(_0x55536e){const _0x5b8e6f=a105_0x3a6f,_0x26c05e=resolve(_0x55536e,SKILL_FILE);if(!existsSync(_0x26c05e)||!lstatSync(_0x26c05e)[_0x5b8e6f(0x1a7)]())return undefined;const _0x293d0c=readFileSync(_0x26c05e,'utf8'),_0x23cf69=_0x293d0c[_0x5b8e6f(0x1a2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x23cf69)return undefined;const _0x1828b3=parseFrontmatterObject(_0x23cf69[0x1]??''),_0x114262=scalarToString(_0x1828b3?.['name']);return _0x114262?slugifySkillName(_0x114262):undefined;}function readSkillDisplayName(_0x5a569f){const _0x2d4e33=_0x5a569f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2d4e33)return undefined;const _0x1e27ef=parseFrontmatterObject(_0x2d4e33[0x1]??'');return scalarToString(_0x1e27ef?.['displayName']);}function slugifySkillName(_0x5e7fae){const _0x2bcccf=a105_0x3a6f,_0x20f798=_0x5e7fae[_0x2bcccf(0x1b4)]()[_0x2bcccf(0x19d)]()[_0x2bcccf(0x1c6)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2bcccf(0x1c6)](/^-+/,'')['replace'](/-+$/,'')[_0x2bcccf(0x1c6)](/-{2,}/g,'-');if(!_0x20f798)throw CliErrors[_0x2bcccf(0x1cf)](_0x2bcccf(0x1c1)+SKILL_FILE+_0x2bcccf(0x1ca));return _0x20f798;}function parseFrontmatterObject(_0x42efeb){const _0x40bfe5=a105_0x3a6f;try{const _0x4b6a91=a105_0x2c46b2(_0x42efeb);return _0x4b6a91&&typeof _0x4b6a91===_0x40bfe5(0x1a3)&&!Array[_0x40bfe5(0x1c5)](_0x4b6a91)?_0x4b6a91:undefined;}catch{return undefined;}}function scalarToString(_0x174f7d){const _0x14d3b8=a105_0x3a6f;if(typeof _0x174f7d===_0x14d3b8(0x19f))return _0x174f7d[_0x14d3b8(0x1b4)]();if(typeof _0x174f7d===_0x14d3b8(0x1b2)||typeof _0x174f7d===_0x14d3b8(0x1a4))return String(_0x174f7d);return undefined;}function resolvePushDirectoryRoot(_0x4d9fa6){const _0x5e4a96=a105_0x3a6f,_0x51d1b6=resolve(_0x4d9fa6);if(!existsSync(_0x51d1b6))throw CliErrors[_0x5e4a96(0x1cf)](_0x5e4a96(0x1ce)+_0x4d9fa6);const _0x3ea4bb=lstatSync(_0x51d1b6);if(_0x3ea4bb[_0x5e4a96(0x1a9)]())return _0x51d1b6;if(_0x3ea4bb[_0x5e4a96(0x1d4)]()){const _0xf4d8a=realpathSync(_0x51d1b6);if(lstatSync(_0xf4d8a)['isDirectory']())return _0xf4d8a;}throw CliErrors['validation'](_0x5e4a96(0x1ce)+_0x4d9fa6);}function requireRemoteScope(_0x9c5968){const _0x1c7fda=a105_0x3a6f;if(_0x9c5968[_0x1c7fda(0x1ab)]===_0x1c7fda(0x19b)||_0x9c5968['scope']===_0x1c7fda(0x199)||_0x9c5968['scope']===_0x1c7fda(0x1c4))return _0x9c5968[_0x1c7fda(0x1ab)];throw CliErrors[_0x1c7fda(0x1cf)](_0x1c7fda(0x198)+(_0x9c5968[_0x1c7fda(0x1a5)]||'(unknown)')+_0x1c7fda(0x19a)+(_0x9c5968['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x54b998){const _0x1da0af=a105_0x3a6f,_0x989ccf=resolve(_0x54b998,SKILL_FILE);return existsSync(_0x989ccf)&&lstatSync(_0x989ccf)[_0x1da0af(0x1a7)]()?readFileSync(_0x989ccf,_0x1da0af(0x1ba)):'';}function readPushMetadataIfPresent(_0x4b9ba9,_0xf4aed7={}){const _0x2b4ccb=a105_0x3a6f;try{return readMetadataIfPresent(_0x4b9ba9);}catch(_0x549fa3){if(_0xf4aed7[_0x2b4ccb(0x1c7)])return undefined;throw _0x549fa3;}}
@@ -1 +1 @@
1
- function a105_0x18d5(_0x334a3e,_0x3cd130){_0x334a3e=_0x334a3e-0x1d3;const _0x57663f=a105_0x5766();let _0x18d5ba=_0x57663f[_0x334a3e];return _0x18d5ba;}function a105_0x5766(){const _0x566f61=['2971572JUOclJ','personal','7FdWInH','length','1724390WKwBop','2811320CVJrRV','Unsupported\x20runtime\x20Skill\x20scope:\x20','validation','18bpMdEu','builtin','2283048DUpIiV','company','4732070mRslmN','92518MOQrMW','8IKubnD','includes','57957dQDsNx','push'];a105_0x5766=function(){return _0x566f61;};return a105_0x5766();}(function(_0x14ea3e,_0x3a66ed){const _0x220d8b=a105_0x18d5,_0x25f1ef=_0x14ea3e();while(!![]){try{const _0x3c95b4=parseInt(_0x220d8b(0x1db))/0x1+-parseInt(_0x220d8b(0x1d6))/0x2*(parseInt(_0x220d8b(0x1de))/0x3)+parseInt(_0x220d8b(0x1dc))/0x4*(parseInt(_0x220d8b(0x1e4))/0x5)+-parseInt(_0x220d8b(0x1e0))/0x6+parseInt(_0x220d8b(0x1e2))/0x7*(-parseInt(_0x220d8b(0x1d3))/0x8)+parseInt(_0x220d8b(0x1d8))/0x9+parseInt(_0x220d8b(0x1da))/0xa;if(_0x3c95b4===_0x3a66ed)break;else _0x25f1ef['push'](_0x25f1ef['shift']());}catch(_0x355c1b){_0x25f1ef['push'](_0x25f1ef['shift']());}}}(a105_0x5766,0x7749d));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x15cfad){const _0x40e139=a105_0x18d5,_0x5d6977=_0x15cfad&&_0x15cfad[_0x40e139(0x1e3)]>0x0?_0x15cfad:['personal',_0x40e139(0x1d9),'builtin'],_0x1893f9=[];for(const _0xce8eb2 of _0x5d6977){if(!isRuntimeSkillScope(_0xce8eb2))throw CliErrors[_0x40e139(0x1d5)](_0x40e139(0x1d4)+_0xce8eb2);!_0x1893f9[_0x40e139(0x1dd)](_0xce8eb2)&&_0x1893f9[_0x40e139(0x1df)](_0xce8eb2);}return _0x1893f9;}export function isRuntimeSkillScope(_0x1b719f){const _0x4762b1=a105_0x18d5;return _0x1b719f===_0x4762b1(0x1e1)||_0x1b719f===_0x4762b1(0x1d9)||_0x1b719f===_0x4762b1(0x1d7);}
1
+ (function(_0x3337ad,_0x12813d){const _0x5e7c78=a106_0xec37,_0x223bfc=_0x3337ad();while(!![]){try{const _0x335c5c=-parseInt(_0x5e7c78(0x92))/0x1+parseInt(_0x5e7c78(0x8d))/0x2+parseInt(_0x5e7c78(0x90))/0x3+parseInt(_0x5e7c78(0x8e))/0x4*(-parseInt(_0x5e7c78(0x9b))/0x5)+parseInt(_0x5e7c78(0x91))/0x6+parseInt(_0x5e7c78(0x94))/0x7+-parseInt(_0x5e7c78(0x8f))/0x8*(parseInt(_0x5e7c78(0x99))/0x9);if(_0x335c5c===_0x12813d)break;else _0x223bfc['push'](_0x223bfc['shift']());}catch(_0x372628){_0x223bfc['push'](_0x223bfc['shift']());}}}(a106_0x266c,0xce567));function a106_0x266c(){const _0x1af916=['217456vZLqmz','builtin','10496633JXcSQz','includes','push','personal','company','9wWklNA','Unsupported\x20runtime\x20Skill\x20scope:\x20','6185wnubtx','46142UoxqnO','3372gHTyhj','9482608peOvSP','2616438eLtEXj','5375976qyIMvX'];a106_0x266c=function(){return _0x1af916;};return a106_0x266c();}import{CliErrors}from'../../errors.js';function a106_0xec37(_0xc308ad,_0x4a3406){_0xc308ad=_0xc308ad-0x8d;const _0x266c33=a106_0x266c();let _0xec3764=_0x266c33[_0xc308ad];return _0xec3764;}export function normalizeRuntimeSkillScopes(_0x3ef124){const _0x437107=a106_0xec37,_0x3589bd=_0x3ef124&&_0x3ef124['length']>0x0?_0x3ef124:[_0x437107(0x97),'company',_0x437107(0x93)],_0x37b67d=[];for(const _0x51628f of _0x3589bd){if(!isRuntimeSkillScope(_0x51628f))throw CliErrors['validation'](_0x437107(0x9a)+_0x51628f);!_0x37b67d[_0x437107(0x95)](_0x51628f)&&_0x37b67d[_0x437107(0x96)](_0x51628f);}return _0x37b67d;}export function isRuntimeSkillScope(_0x19b5d0){const _0x3edec5=a106_0xec37;return _0x19b5d0==='personal'||_0x19b5d0===_0x3edec5(0x98)||_0x19b5d0===_0x3edec5(0x93);}
@@ -1 +1 @@
1
- const a107_0x2cac12=a107_0x2f3c;function a107_0x2f3c(_0x408d0f,_0x3c7f83){_0x408d0f=_0x408d0f-0x167;const _0x5a2761=a107_0x5a27();let _0x2f3c5d=_0x5a2761[_0x408d0f];return _0x2f3c5d;}(function(_0x24fe92,_0x27f72b){const _0x391174=a107_0x2f3c,_0x378c6d=_0x24fe92();while(!![]){try{const _0x591cf8=-parseInt(_0x391174(0x17d))/0x1+parseInt(_0x391174(0x170))/0x2*(parseInt(_0x391174(0x168))/0x3)+-parseInt(_0x391174(0x17b))/0x4+-parseInt(_0x391174(0x167))/0x5+parseInt(_0x391174(0x16b))/0x6*(parseInt(_0x391174(0x174))/0x7)+parseInt(_0x391174(0x16c))/0x8*(parseInt(_0x391174(0x16d))/0x9)+parseInt(_0x391174(0x176))/0xa;if(_0x591cf8===_0x27f72b)break;else _0x378c6d['push'](_0x378c6d['shift']());}catch(_0x330d0f){_0x378c6d['push'](_0x378c6d['shift']());}}}(a107_0x5a27,0x2f1af));import{unzipSync,zipSync}from'fflate';function a107_0x5a27(){const _0x1e4b22=['object','89119vLfkkQ','1822195uoZdSE','143355NZBqef','name','validation_error','6xVTyEX','40gCxqVI','448209sOsdhI','entries','validation','2vtDpRp','path','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1980-01-01T00:00:00.000Z','2498734tuprJe','code','1406230WNLknn','endsWith','map','sort','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','591496bsTneP'];a107_0x5a27=function(){return _0x1e4b22;};return a107_0x5a27();}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x2cac12(0x173));export function createDeterministicZipPackage(_0x2f4bca){const _0x1ad9ce=a107_0x2cac12,_0x1f1406={};for(const _0x540194 of normalizeLocalFiles(_0x2f4bca)){_0x1f1406[_0x540194[_0x1ad9ce(0x171)]]=fileContent(_0x540194);}return Buffer['from'](zipSync(_0x1f1406,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x472574){const _0x209744=a107_0x2cac12;if(_0x472574['length']<0x16)throw CliErrors[_0x209744(0x16f)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x3deffd;try{_0x3deffd=unzipSync(_0x472574,{'filter'(_0x33706c){const _0x5dcaf9=_0x209744,_0x1aa901=normalizeSkillRelativePath(_0x33706c[_0x5dcaf9(0x169)]);if(_0x1aa901[_0x5dcaf9(0x177)]('/'))throw CliErrors[_0x5dcaf9(0x16f)](_0x5dcaf9(0x172)+_0x1aa901);return!![];}});}catch(_0x776fb){if(isRuntimeSkillValidationError(_0x776fb))throw _0x776fb;throw CliErrors['validation'](_0x209744(0x17a));}return Object[_0x209744(0x16e)](_0x3deffd)[_0x209744(0x178)](([_0x1156a9,_0x4178d4])=>({'path':normalizeSkillRelativePath(_0x1156a9),'bytes':Buffer['from'](_0x4178d4)}))[_0x209744(0x179)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x820d36){const _0x1024ca=a107_0x2cac12;return typeof _0x820d36===_0x1024ca(0x17c)&&_0x820d36!==null&&_0x1024ca(0x175)in _0x820d36&&_0x820d36[_0x1024ca(0x175)]===_0x1024ca(0x16a);}
1
+ const a108_0x5bfecf=a108_0x2482;(function(_0x24949c,_0xd9cc13){const _0xf7dce9=a108_0x2482,_0x499c8f=_0x24949c();while(!![]){try{const _0xb31dde=-parseInt(_0xf7dce9(0xff))/0x1*(-parseInt(_0xf7dce9(0x102))/0x2)+parseInt(_0xf7dce9(0x10e))/0x3*(parseInt(_0xf7dce9(0x101))/0x4)+-parseInt(_0xf7dce9(0x100))/0x5+-parseInt(_0xf7dce9(0x10d))/0x6*(-parseInt(_0xf7dce9(0x109))/0x7)+parseInt(_0xf7dce9(0x105))/0x8+parseInt(_0xf7dce9(0x111))/0x9*(-parseInt(_0xf7dce9(0x106))/0xa)+-parseInt(_0xf7dce9(0x104))/0xb;if(_0xb31dde===_0xd9cc13)break;else _0x499c8f['push'](_0x499c8f['shift']());}catch(_0x4d3659){_0x499c8f['push'](_0x499c8f['shift']());}}}(a108_0x2dbb,0x29939));function a108_0x2482(_0x2ee08a,_0x5e38f6){_0x2ee08a=_0x2ee08a-0xfb;const _0x2dbbec=a108_0x2dbb();let _0x24820a=_0x2dbbec[_0x2ee08a];return _0x24820a;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a108_0x5bfecf(0x10c));export function createDeterministicZipPackage(_0x225093){const _0x3fa343=a108_0x5bfecf,_0x8b4bf8={};for(const _0x217362 of normalizeLocalFiles(_0x225093)){_0x8b4bf8[_0x217362['path']]=fileContent(_0x217362);}return Buffer[_0x3fa343(0xfe)](zipSync(_0x8b4bf8,{'level':0x0,'mtime':ZIP_MTIME}));}function a108_0x2dbb(){const _0x57c7ae=['sort','1089571ocigBt','object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1980-01-01T00:00:00.000Z','6AtcXDi','2904FkHqYc','code','entries','1640502fVbKXd','validation_error','name','length','from','15cJMBSl','908865PBOIue','492SpgCVn','360yInwHs','map','855833etFVlu','2677872sCobeJ','10YtIuPn','validation'];a108_0x2dbb=function(){return _0x57c7ae;};return a108_0x2dbb();}export function parseZipPackage(_0x334a6e){const _0x1893f2=a108_0x5bfecf;if(_0x334a6e[_0x1893f2(0xfd)]<0x16)throw CliErrors[_0x1893f2(0x107)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x4d5c0d;try{_0x4d5c0d=unzipSync(_0x334a6e,{'filter'(_0x429417){const _0x28b551=_0x1893f2,_0x3197e7=normalizeSkillRelativePath(_0x429417[_0x28b551(0xfc)]);if(_0x3197e7['endsWith']('/'))throw CliErrors[_0x28b551(0x107)](_0x28b551(0x10b)+_0x3197e7);return!![];}});}catch(_0x1cec15){if(isRuntimeSkillValidationError(_0x1cec15))throw _0x1cec15;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x1893f2(0x110)](_0x4d5c0d)[_0x1893f2(0x103)](([_0x25ffd0,_0x385ac7])=>({'path':normalizeSkillRelativePath(_0x25ffd0),'bytes':Buffer['from'](_0x385ac7)}))[_0x1893f2(0x108)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x416706){const _0x3c2f7e=a108_0x5bfecf;return typeof _0x416706===_0x3c2f7e(0x10a)&&_0x416706!==null&&_0x3c2f7e(0x10f)in _0x416706&&_0x416706[_0x3c2f7e(0x10f)]===_0x3c2f7e(0xfb);}