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

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 (117) 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/response.js +1 -1
  87. package/lib/framework/runner-confirmation.js +1 -1
  88. package/lib/framework/runner-error.js +1 -1
  89. package/lib/framework/runner.js +1 -1
  90. package/lib/framework/schema-export.js +1 -1
  91. package/lib/framework/service-order.js +1 -1
  92. package/lib/framework/types.js +1 -1
  93. package/lib/generated/build-info.js +1 -1
  94. package/lib/help.js +1 -1
  95. package/lib/skills/npx-skills-add.js +1 -1
  96. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  97. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  98. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  99. package/lib/skills/runtime-skill-sync/links.js +1 -1
  100. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  101. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  102. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  103. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  104. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  105. package/lib/skills/runtime-skill-sync/push.js +1 -1
  106. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  107. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  109. package/lib/skills/runtime-skill-sync.js +1 -1
  110. package/lib/utils/apply-jq-filter.js +1 -1
  111. package/lib/utils/logger.js +1 -1
  112. package/lib/utils/params.js +1 -1
  113. package/lib/utils/platform.js +1 -1
  114. package/lib/utils/update-notice.js +1 -1
  115. package/lib/utils/version.js +1 -1
  116. package/lib/utils/write-cli-side-channel.js +1 -1
  117. package/package.json +1 -1
@@ -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
+ const a92_0x46f93e=a92_0x490a;(function(_0x84680d,_0x2d20bb){const _0xb47a77=a92_0x490a,_0x15e68c=_0x84680d();while(!![]){try{const _0x3930a1=-parseInt(_0xb47a77(0xd4))/0x1+-parseInt(_0xb47a77(0xd3))/0x2*(parseInt(_0xb47a77(0xcd))/0x3)+-parseInt(_0xb47a77(0xd6))/0x4*(parseInt(_0xb47a77(0xd9))/0x5)+parseInt(_0xb47a77(0xcc))/0x6+-parseInt(_0xb47a77(0xd0))/0x7+-parseInt(_0xb47a77(0xcf))/0x8+-parseInt(_0xb47a77(0xd2))/0x9*(-parseInt(_0xb47a77(0xd8))/0xa);if(_0x3930a1===_0x2d20bb)break;else _0x15e68c['push'](_0x15e68c['shift']());}catch(_0xd06d03){_0x15e68c['push'](_0x15e68c['shift']());}}}(a92_0x2b9f,0x65121));function a92_0x490a(_0x5302c2,_0x519607){_0x5302c2=_0x5302c2-0xcc;const _0x2b9f7a=a92_0x2b9f();let _0x490ada=_0x2b9f7a[_0x5302c2];return _0x490ada;}export const VERSION=a92_0x46f93e(0xd5);export const GIT_TAG=a92_0x46f93e(0xce);function a92_0x2b9f(){const _0x580d4a=['996147RGGCxj','v2.1.11-beta.1','5248616MZjoRi','854406bfLJka','f901a1e','5370741XhdxLG','2RbGOsm','249634TfvQRo','2.1.11-beta.1','1251724ZOBSAT','2026-07-10T11:56:42.790Z','30hoCvyW','5MWqWfE','1778922pbHRnR'];a92_0x2b9f=function(){return _0x580d4a;};return a92_0x2b9f();}export const GIT_COMMIT=a92_0x46f93e(0xd1);export const BUILD_TIME=a92_0x46f93e(0xd7);
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 a93_0x12f2(_0x3534a8,_0xdd1f9a){_0x3534a8=_0x3534a8-0x1b1;const _0x1479fb=a93_0x1479();let _0x12f297=_0x1479fb[_0x3534a8];return _0x12f297;}(function(_0x73cc41,_0x20722e){const _0x3f9657=a93_0x12f2,_0x258f52=_0x73cc41();while(!![]){try{const _0x1cd17c=-parseInt(_0x3f9657(0x1b3))/0x1*(parseInt(_0x3f9657(0x1ba))/0x2)+parseInt(_0x3f9657(0x1b6))/0x3+-parseInt(_0x3f9657(0x1b1))/0x4+parseInt(_0x3f9657(0x1b2))/0x5+parseInt(_0x3f9657(0x1bc))/0x6+-parseInt(_0x3f9657(0x1b8))/0x7+-parseInt(_0x3f9657(0x1b5))/0x8*(parseInt(_0x3f9657(0x1bb))/0x9);if(_0x1cd17c===_0x20722e)break;else _0x258f52['push'](_0x258f52['shift']());}catch(_0x4ebab6){_0x258f52['push'](_0x258f52['shift']());}}}(a93_0x1479,0x6667d));import{jsx as a93_0x32921a,jsxs as a93_0x3cdb78}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x1479(){const _0x18b7d7=['50645PTJYKj','\x20--help','32344PEahhp','1267236ObPHQN','column','3577616FMwdMP','green','2Pxigba','1359qYZpeu','4066296UEgYST','150828lfPFsG','2646290isigxl'];a93_0x1479=function(){return _0x18b7d7;};return a93_0x1479();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x5ee2ed=a93_0x12f2,{exit:_0x227e0c}=useApp();return useEffect(()=>{_0x227e0c();},[_0x227e0c]),a93_0x3cdb78(Box,{'flexDirection':_0x5ee2ed(0x1b7),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x32921a(Box,{'children':a93_0x32921a(Text,{'bold':!![],'color':_0x5ee2ed(0x1b9),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x3cdb78(Box,{'marginTop':0x1,'children':[a93_0x32921a(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0x32921a(Text,{'bold':!![],'color':_0x5ee2ed(0x1b9),'children':CLI_BIN_NAME+_0x5ee2ed(0x1b4)}),a93_0x32921a(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
@@ -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
+ function a94_0x26fc(){const _0x1c2693=['854BdjFCC','93516dhYopq','21VIxaav','7368240OxCWSf','1925LKFcGM','1472620klTepu','exit\x20','stdout','npx','unknown','pipe','inherit','skills','trim','toString','stdio','2083864ncEgcJ','add','2680230dXGpod','status','7221285lKdXkr','4snXfPB','stderr','295QZFhax','join'];a94_0x26fc=function(){return _0x1c2693;};return a94_0x26fc();}(function(_0x53a041,_0x10829e){const _0x56a7a5=a94_0x2cb1,_0x23c5a7=_0x53a041();while(!![]){try{const _0x527786=parseInt(_0x56a7a5(0x1e0))/0x1*(parseInt(_0x56a7a5(0x1dc))/0x2)+-parseInt(_0x56a7a5(0x1ee))/0x3*(-parseInt(_0x56a7a5(0x1d8))/0x4)+-parseInt(_0x56a7a5(0x1da))/0x5*(-parseInt(_0x56a7a5(0x1dd))/0x6)+-parseInt(_0x56a7a5(0x1de))/0x7*(parseInt(_0x56a7a5(0x1ec))/0x8)+-parseInt(_0x56a7a5(0x1f0))/0x9+parseInt(_0x56a7a5(0x1e1))/0xa+-parseInt(_0x56a7a5(0x1df))/0xb;if(_0x527786===_0x10829e)break;else _0x23c5a7['push'](_0x23c5a7['shift']());}catch(_0x5bc2ed){_0x23c5a7['push'](_0x23c5a7['shift']());}}}(a94_0x26fc,0x810b7));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a94_0x2cb1(_0x484f80,_0x44bd93){_0x484f80=_0x484f80-0x1d8;const _0x26fc22=a94_0x26fc();let _0x2cb129=_0x26fc22[_0x484f80];return _0x2cb129;}import{LOVRABET_SKILL_SOURCE as a94_0x4b6307}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x4b6307;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x634a3a,_0x1d75fa=LOVRABET_SKILL_SOURCE,_0x4d48a8){const _0x462824=a94_0x2cb1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3ff8a6=_0x4d48a8?.[_0x462824(0x1eb)]??_0x462824(0x1e7),_0x1bc36b=resolveNpmBin(_0x462824(0x1e4)),_0x3db6b9=[_0x462824(0x1e8),_0x462824(0x1ed),_0x1d75fa,'-g','-y'],_0x481b15=[_0x1bc36b,..._0x3db6b9][_0x462824(0x1db)]('\x20');console['log']('*\x20'+_0x481b15);const _0x406010=spawnSync(_0x1bc36b,_0x3db6b9,{'cwd':_0x634a3a,'stdio':_0x3ff8a6,'env':process.env,'shell':![]});if(_0x406010[_0x462824(0x1ef)]===0x0)return{'ok':!![],'status':0x0};let _0x5712dd=_0x462824(0x1e2)+(_0x406010[_0x462824(0x1ef)]??_0x462824(0x1e5));if(_0x3ff8a6===_0x462824(0x1e6)){const _0x1db4fa=_0x406010['stderr']?_0x406010[_0x462824(0x1d9)]['toString']()[_0x462824(0x1e9)]():'',_0x350e23=_0x406010[_0x462824(0x1e3)]?_0x406010[_0x462824(0x1e3)][_0x462824(0x1ea)]()[_0x462824(0x1e9)]():'';if(_0x1db4fa)_0x5712dd=_0x1db4fa;else{if(_0x350e23)_0x5712dd=_0x350e23;}}return{'ok':![],'status':_0x406010[_0x462824(0x1ef)]??null,'error':_0x5712dd};}
@@ -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
+ function a95_0x9dd1(_0x34cd68,_0x179a08){_0x34cd68=_0x34cd68-0xc3;const _0x519d7e=a95_0x519d();let _0x9dd16f=_0x519d7e[_0x34cd68];return _0x9dd16f;}function a95_0x519d(){const _0x2c51db=['12424470XoNKaz','416fAJZxb','.cache','build','dist','.svn','3GJgYxd','7306796tNMVzU','node_modules','.turbo','.hg','961332IfjpAg','coverage','23338eQPpHA','.DS_Store','964092VWyoLL','2810490xmoHcM','311094NxKscG','2094MNvAhW','.next','SKILL.md'];a95_0x519d=function(){return _0x2c51db;};return a95_0x519d();}const a95_0x2e5582=a95_0x9dd1;(function(_0x1429f1,_0x2ea4fb){const _0x3e9795=a95_0x9dd1,_0x4dbcf9=_0x1429f1();while(!![]){try{const _0x1fda69=parseInt(_0x3e9795(0xd2))/0x1+parseInt(_0x3e9795(0xce))/0x2+parseInt(_0x3e9795(0xc9))/0x3*(-parseInt(_0x3e9795(0xca))/0x4)+-parseInt(_0x3e9795(0xd3))/0x5+parseInt(_0x3e9795(0xd5))/0x6*(-parseInt(_0x3e9795(0xd0))/0x7)+parseInt(_0x3e9795(0xc4))/0x8*(parseInt(_0x3e9795(0xd4))/0x9)+parseInt(_0x3e9795(0xc3))/0xa;if(_0x1fda69===_0x2ea4fb)break;else _0x4dbcf9['push'](_0x4dbcf9['shift']());}catch(_0x26a45e){_0x4dbcf9['push'](_0x4dbcf9['shift']());}}}(a95_0x519d,0xe39b2));export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a95_0x2e5582(0xd7);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x2e5582(0xd1)]);export const IGNORED_DIR_NAMES=new Set(['.git',a95_0x2e5582(0xcd),a95_0x2e5582(0xc8),a95_0x2e5582(0xcb),a95_0x2e5582(0xd6),a95_0x2e5582(0xc7),a95_0x2e5582(0xc6),a95_0x2e5582(0xcf),a95_0x2e5582(0xcc),a95_0x2e5582(0xc5)]);
@@ -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(_0x1e29a9,_0x536a51){const _0x39e2bf=a96_0x52b0,_0x380b24=_0x1e29a9();while(!![]){try{const _0xdb0fa9=-parseInt(_0x39e2bf(0x9d))/0x1*(parseInt(_0x39e2bf(0x9a))/0x2)+parseInt(_0x39e2bf(0x97))/0x3+-parseInt(_0x39e2bf(0xa2))/0x4+-parseInt(_0x39e2bf(0xa3))/0x5*(parseInt(_0x39e2bf(0x91))/0x6)+parseInt(_0x39e2bf(0xa0))/0x7*(-parseInt(_0x39e2bf(0x92))/0x8)+parseInt(_0x39e2bf(0x9b))/0x9+parseInt(_0x39e2bf(0x9f))/0xa*(parseInt(_0x39e2bf(0x9c))/0xb);if(_0xdb0fa9===_0x536a51)break;else _0x380b24['push'](_0x380b24['shift']());}catch(_0x1e3ff8){_0x380b24['push'](_0x380b24['shift']());}}}(a96_0x4982,0xe9d39));function a96_0x52b0(_0x2d988f,_0x16ddb2){_0x2d988f=_0x2d988f-0x90;const _0x498232=a96_0x4982();let _0x52b0fc=_0x498232[_0x2d988f];return _0x52b0fc;}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(_0x306ed6,_0x220c00){const _0xa96e72=a96_0x52b0,_0xeb0b21=normalizeSkillRelativePath(_0x220c00),_0x4993bc=realOrResolved(_0x306ed6),_0x5f1c0d=resolve(_0x4993bc,..._0xeb0b21['split']('/'));if(!isPathInside(_0x5f1c0d,_0x4993bc))throw CliErrors[_0xa96e72(0x96)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x220c00);return ensureNoSymlinkInManagedPath(_0x4993bc,_0xeb0b21),_0x5f1c0d;}export function ensureNoSymlinkInManagedPath(_0x1a7ede,_0x351f20){const _0x2c2e63=a96_0x52b0;let _0x2c3bd8=_0x1a7ede;for(const _0x53b8c1 of _0x351f20[_0x2c2e63(0x98)]('/')){_0x2c3bd8=resolve(_0x2c3bd8,_0x53b8c1);const _0x9bd217=lstatIfPresent(_0x2c3bd8);if(_0x9bd217?.[_0x2c2e63(0x90)]())throw CliErrors['validation'](_0x2c2e63(0x93)+_0x351f20);}}export function isDanglingSymlink(_0x3ebde6){const _0x34bb9b=a96_0x52b0;try{return lstatSync(_0x3ebde6)[_0x34bb9b(0x90)]();}catch{return![];}}function a96_0x4982(){const _0x3e101f=['from','endsWith','validation','4565490VHgJCK','split','startsWith','23098JcGJhA','15434631siPhQQ','17786725rLHQhD','63QwovkI','stringify','10rhtFRn','308SrgGEi','utf8','6069452eMOWTI','3598565fjnGPJ','isSymbolicLink','6XNkcwD','169336jbzqtX','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'];a96_0x4982=function(){return _0x3e101f;};return a96_0x4982();}export function resolveSymlinkTarget(_0x36c09e){const _0x2224b6=readlinkSync(_0x36c09e);return isAbsolute(_0x2224b6)?_0x2224b6:resolve(dirname(_0x36c09e),_0x2224b6);}export function isPathInside(_0x44346e,_0x17bcc8){const _0x50e29b=a96_0x52b0,_0x24089a=_0x44346e[_0x50e29b(0x95)](sep)?_0x44346e:''+_0x44346e+sep,_0x2ad255=_0x17bcc8[_0x50e29b(0x95)](sep)?_0x17bcc8:''+_0x17bcc8+sep;return _0x44346e===_0x17bcc8||_0x24089a[_0x50e29b(0x99)](_0x2ad255);}export function realOrResolved(_0x49d5aa){try{return realpathSync(_0x49d5aa);}catch{return resolve(_0x49d5aa);}}export function lstatIfPresent(_0x57b490){try{return lstatSync(_0x57b490);}catch{return undefined;}}export function writeTextAtomic(_0x46fc3c,_0x47b0a7,_0x236c8b){const _0xccd724=a96_0x52b0;writeBytesAtomic(_0x46fc3c,Buffer[_0xccd724(0x94)](_0x47b0a7,_0xccd724(0xa1)),_0x236c8b);}export function writeBytesAtomic(_0x4846a9,_0x3f9936,_0x86e2e){const _0x1f7107=_0x4846a9+'.tmp';try{writeFileSync(_0x1f7107,_0x3f9936,{'mode':_0x86e2e}),renameSync(_0x1f7107,_0x4846a9);}catch(_0x10ce4e){try{rmSync(_0x1f7107,{'force':!![]});}catch{}throw _0x10ce4e;}}export function writeJsonAtomic(_0x48c0f9,_0x26c344){const _0x3a2c03=a96_0x52b0;writeTextAtomic(_0x48c0f9,JSON[_0x3a2c03(0x9e)](_0x26c344,null,0x2)+'\x0a',0x180);}
@@ -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(_0x915897,_0x348877){const _0x572a20=a97_0x4b7a,_0x5c3911=_0x915897();while(!![]){try{const _0x159abe=-parseInt(_0x572a20(0xea))/0x1*(-parseInt(_0x572a20(0xf2))/0x2)+parseInt(_0x572a20(0xf4))/0x3+-parseInt(_0x572a20(0xe9))/0x4+parseInt(_0x572a20(0xf3))/0x5+-parseInt(_0x572a20(0xed))/0x6+-parseInt(_0x572a20(0xe8))/0x7+-parseInt(_0x572a20(0xf1))/0x8*(-parseInt(_0x572a20(0xee))/0x9);if(_0x159abe===_0x348877)break;else _0x5c3911['push'](_0x5c3911['shift']());}catch(_0x187b38){_0x5c3911['push'](_0x5c3911['shift']());}}}(a97_0x317d,0x7f27d));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a97_0x317d(){const _0x17b043=['path','720062NIhBEr','681460XllANM','3SEeQIz','sha256','digest','5887368JdvpsW','9433143LLaazZ','update','hex','8GkZCQd','22934YOfoHJ','987480DbblXK','1485792wEGHyg'];a97_0x317d=function(){return _0x17b043;};return a97_0x317d();}export function contentHash(_0x1ba10b){const _0x5c0c47=a97_0x4b7a;return createHash(_0x5c0c47(0xeb))[_0x5c0c47(0xef)](_0x1ba10b)[_0x5c0c47(0xec)](_0x5c0c47(0xf0));}export function fileHash(_0x578a37){return bufferSha256(fileContent(_0x578a37));}function a97_0x4b7a(_0x1d02a4,_0x299df7){_0x1d02a4=_0x1d02a4-0xe7;const _0x317d79=a97_0x317d();let _0x4b7a07=_0x317d79[_0x1d02a4];return _0x4b7a07;}export function bufferSha256(_0x3d035b){const _0x1f66bc=a97_0x4b7a;return createHash('sha256')[_0x1f66bc(0xef)](_0x3d035b)[_0x1f66bc(0xec)](_0x1f66bc(0xf0));}export function fileTreeHash(_0x58befb){const _0x1a12be=a97_0x4b7a,_0x3ac1c2=createHash('sha256');for(const _0x99a149 of normalizeManifestFiles(_0x58befb)){_0x3ac1c2[_0x1a12be(0xef)](_0x99a149[_0x1a12be(0xe7)]),_0x3ac1c2[_0x1a12be(0xef)]('\x00'),_0x3ac1c2['update'](_0x99a149[_0x1a12be(0xeb)]),_0x3ac1c2[_0x1a12be(0xef)]('\x00'),_0x3ac1c2[_0x1a12be(0xef)](String(_0x99a149['size'])),_0x3ac1c2[_0x1a12be(0xef)]('\x00');}return _0x3ac1c2[_0x1a12be(0xec)](_0x1a12be(0xf0));}
@@ -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(_0x125453,_0x386c65){const _0x9bca77=a98_0x2679,_0x54b4ca=_0x125453();while(!![]){try{const _0x3bbef8=parseInt(_0x9bca77(0x1a8))/0x1*(parseInt(_0x9bca77(0x1b5))/0x2)+-parseInt(_0x9bca77(0x1b4))/0x3+parseInt(_0x9bca77(0x1b7))/0x4*(parseInt(_0x9bca77(0x196))/0x5)+parseInt(_0x9bca77(0x1c1))/0x6*(-parseInt(_0x9bca77(0x18c))/0x7)+-parseInt(_0x9bca77(0x1bf))/0x8*(parseInt(_0x9bca77(0x1b1))/0x9)+-parseInt(_0x9bca77(0x194))/0xa+parseInt(_0x9bca77(0x18d))/0xb;if(_0x3bbef8===_0x386c65)break;else _0x54b4ca['push'](_0x54b4ca['shift']());}catch(_0xbac31c){_0x54b4ca['push'](_0x54b4ca['shift']());}}}(a98_0x1e6b,0x72f21));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x394a64 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_0x394a64;function a98_0x1e6b(){const _0x175348=['skipped','6nwcaIR','2436322ctDCKS','1737428IPgkNo','pruneSkillCodes','get','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','env','validation','slice','57800FCScpr','isDirectory','5FxiCyH','dir','managedRoot','updated','trim','push','personal','scopes','unchanged','length','external-symlink','values','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','builtin','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','startsWith','contentHash','appCode','23277hztULG','removed','skillCode','isSymbolicLink','scope','activeSkillCodes','skill','accessKey','not-managed-symlink','108GkojyA','has','agentsSkillsDir','162657KeLOUU','46TSqSpp','set','2119724HdfulB','created','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','map','metadata-mismatch','name','229592CjPnHi'];a98_0x1e6b=function(){return _0x175348;};return a98_0x1e6b();}function a98_0x2679(_0x49ec3c,_0x4c9950){_0x49ec3c=_0x49ec3c-0x18c;const _0x1e6b1e=a98_0x1e6b();let _0x267900=_0x1e6b1e[_0x49ec3c];return _0x267900;}export function linkEffectiveRuntimeSkills(_0xc15019,_0x26154f,_0x5b7b01={}){const _0x38c0d9=a98_0x2679,_0x551e5a=new Map();for(const _0x2ef8a6 of _0xc15019){const _0x535775=_0x2ef8a6['skill'][_0x38c0d9(0x1aa)];if(!_0x535775)continue;const _0xb3604=_0x551e5a[_0x38c0d9(0x18f)](_0x535775);(!_0xb3604||_0x2ef8a6[_0x38c0d9(0x1ac)]===_0x38c0d9(0x19c))&&_0x551e5a[_0x38c0d9(0x1b6)](_0x535775,_0x2ef8a6);}const _0x4effac=[],_0x353783=resolveSkillSyncPaths(_0x5b7b01);for(const _0x597ac0 of _0x551e5a[_0x38c0d9(0x1a1)]()){const _0x143632=requireSkillCode(_0x597ac0[_0x38c0d9(0x1ae)]),_0x4effbe=_0x26154f+'--'+_0x143632;for(const _0x25bffb of runtimeAgentSkillRoots(_0x353783)){_0x4effac[_0x38c0d9(0x19b)](ensureManagedSymlink(resolve(_0x25bffb,_0x4effbe),_0x597ac0[_0x38c0d9(0x197)],_0x353783[_0x38c0d9(0x198)]));}}return _0x4effac;}export function pruneStaleRuntimeSkillLinks(_0x36b06b,_0x4e462c,_0x920883={},_0x20b728){const _0x349919=a98_0x2679,_0x4f540a=resolveSkillSyncPaths(_0x920883),_0x5a7c09=new Set([..._0x4e462c][_0x349919(0x1bc)](_0x505866=>_0x505866[_0x349919(0x19a)]())[_0x349919(0x1bb)](Boolean)),_0x2395ce=_0x20b728?new Set([..._0x20b728]['map'](_0x3e26e0=>_0x3e26e0['trim']())['filter'](Boolean)):undefined,_0x1760aa=[];for(const _0x22ae41 of runtimeAgentSkillRoots(_0x4f540a)){for(const _0x3f4734 of managedAppSkillLinkPaths(_0x22ae41,_0x36b06b)){const _0x2d53b5=basename(_0x3f4734)[_0x349919(0x193)]((_0x36b06b+'--')[_0x349919(0x19f)]);if(_0x2395ce&&!_0x2395ce[_0x349919(0x1b2)](_0x2d53b5))continue;if(_0x5a7c09[_0x349919(0x1b2)](_0x2d53b5))continue;_0x1760aa[_0x349919(0x19b)](removeManagedSkillLink(_0x3f4734,_0x4f540a[_0x349919(0x198)]));}}return _0x1760aa;}export function pruneStaleRuntimeSkillCache(_0x94af0c,_0x4d5c8a={}){const _0x524f97=a98_0x2679,_0x1223f4=new Set([..._0x94af0c[_0x524f97(0x1ad)]][_0x524f97(0x1bc)](_0x53507c=>_0x53507c[_0x524f97(0x19a)]())['filter'](Boolean)),_0x354f0a=_0x94af0c[_0x524f97(0x18e)]?new Set([..._0x94af0c['pruneSkillCodes']]['map'](_0x324cc0=>_0x324cc0[_0x524f97(0x19a)]())[_0x524f97(0x1bb)](Boolean)):undefined,_0x1ded4b=_0x94af0c[_0x524f97(0x19d)]??[_0x524f97(0x19c),'company'],_0x2fe6ec=resolve(getRuntimeSkillCacheRoot(_0x94af0c[_0x524f97(0x191)],_0x94af0c[_0x524f97(0x1af)],_0x4d5c8a),safePathSegment(_0x94af0c[_0x524f97(0x1a7)],_0x524f97(0x1a7))),_0x46c03e=[];for(const _0x46c29d of _0x1ded4b){const _0x32e769=resolve(_0x2fe6ec,_0x46c29d);if(!existsSync(_0x32e769))continue;for(const _0x36f9a1 of readdirSync(_0x32e769,{'withFileTypes':!![]})){if(!_0x36f9a1[_0x524f97(0x195)]())continue;const _0x5ba860=_0x36f9a1[_0x524f97(0x1be)];if(_0x354f0a&&!_0x354f0a[_0x524f97(0x1b2)](_0x5ba860))continue;if(_0x1223f4[_0x524f97(0x1b2)](_0x5ba860))continue;const _0xeed57=resolve(_0x32e769,_0x5ba860),_0x371332=readMetadataIfPresent(resolve(_0xeed57,METADATA_FILE));if(_0x371332?.['appCode']!==_0x94af0c[_0x524f97(0x1a7)]||_0x371332['scope']!==_0x46c29d||_0x371332[_0x524f97(0x1aa)]!==_0x5ba860){_0x46c03e[_0x524f97(0x19b)]({'path':_0xeed57,'action':_0x524f97(0x1c0),'reason':_0x524f97(0x1bd)});continue;}removeSync(_0xeed57),_0x46c03e[_0x524f97(0x19b)]({'path':_0xeed57,'action':_0x524f97(0x1a9)});}}return _0x46c03e;}export function linkGlobalRuntimeSkills(_0x449445,_0x3c1954={}){const _0x48b6e3=a98_0x2679,_0xf4540e=resolveSkillSyncPaths(_0x3c1954),_0x245ffb=[];for(const _0x31f877 of _0x449445){if(_0x31f877[_0x48b6e3(0x1ac)]!==_0x48b6e3(0x1a3))throw CliErrors[_0x48b6e3(0x192)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x31f877[_0x48b6e3(0x1ac)]);const _0x509b2d=requireSkillCode(_0x31f877[_0x48b6e3(0x1ae)]),_0x21f899=copyManagedSkillDirectory(_0x31f877[_0x48b6e3(0x197)],resolve(_0xf4540e[_0x48b6e3(0x1b3)],_0x509b2d));_0x245ffb['push']({..._0x21f899,'contentHash':_0x31f877['contentHash']});}return _0x245ffb;}function ensureManagedSymlink(_0x41203e,_0x18d502,_0x7556a4){const _0x293a47=a98_0x2679;mkdirSync(dirname(_0x41203e),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x41203e)||isDanglingSymlink(_0x41203e)){const _0x398963=lstatSync(_0x41203e);if(!_0x398963['isSymbolicLink']())throw CliErrors[_0x293a47(0x192)](_0x293a47(0x1a2)+_0x41203e);const _0x42f016=resolveSymlinkTarget(_0x41203e);if(!isPathInside(realOrResolved(_0x42f016),realOrResolved(_0x7556a4)))throw CliErrors['validation'](_0x293a47(0x1b9)+_0x41203e);if(realOrResolved(_0x42f016)===realOrResolved(_0x18d502))return{'path':_0x41203e,'target':_0x18d502,'action':_0x293a47(0x19e)};return unlinkSync(_0x41203e),symlinkSync(_0x18d502,_0x41203e,'dir'),{'path':_0x41203e,'target':_0x18d502,'action':_0x293a47(0x199)};}return symlinkSync(_0x18d502,_0x41203e,_0x293a47(0x197)),{'path':_0x41203e,'target':_0x18d502,'action':_0x293a47(0x1b8)};}function managedAppSkillLinkPaths(_0x12a1dd,_0x3cb012){const _0x3790c0=a98_0x2679;if(!existsSync(_0x12a1dd))return[];const _0x288c53=_0x3cb012+'--';return readdirSync(_0x12a1dd,{'withFileTypes':!![]})[_0x3790c0(0x1bb)](_0xce41e2=>_0xce41e2['name'][_0x3790c0(0x1a5)](_0x288c53))['map'](_0x69e9c4=>resolve(_0x12a1dd,_0x69e9c4['name']));}function removeManagedSkillLink(_0x1aa5e2,_0x6bb317){const _0x332f6f=a98_0x2679,_0x2b1bfb=lstatIfPresent(_0x1aa5e2);if(!_0x2b1bfb?.[_0x332f6f(0x1ab)]())return{'path':_0x1aa5e2,'action':_0x332f6f(0x1c0),'reason':_0x332f6f(0x1b0)};const _0x494ebf=resolveSymlinkTarget(_0x1aa5e2);if(!isPathInside(realOrResolved(_0x494ebf),realOrResolved(_0x6bb317)))return{'path':_0x1aa5e2,'action':'skipped','reason':_0x332f6f(0x1a0)};return unlinkSync(_0x1aa5e2),{'path':_0x1aa5e2,'action':_0x332f6f(0x1a9)};}export function copyManagedSkillDirectory(_0x3e8f3d,_0x161239){const _0x5dd121=a98_0x2679,_0x1290fc=resolve(_0x161239,METADATA_FILE),_0x440520=existsSync(_0x161239);if(_0x440520){const _0x3ae5a9=lstatSync(_0x161239);if(_0x3ae5a9['isSymbolicLink']())throw CliErrors['validation'](_0x5dd121(0x190)+_0x161239);if(!_0x3ae5a9[_0x5dd121(0x195)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x161239);const _0x941796=readMetadataIfPresent(_0x1290fc);if(_0x941796?.[_0x5dd121(0x1ac)]!==_0x5dd121(0x1a3))throw CliErrors['validation'](_0x5dd121(0x1a4)+_0x161239);}ensureDirSync(dirname(_0x161239));const _0x2adc83=_0x440520?readMetadataIfPresent(_0x1290fc)?.[_0x5dd121(0x1a6)]:undefined,_0x42a5ba=readMetadataIfPresent(resolve(_0x3e8f3d,METADATA_FILE))?.[_0x5dd121(0x1a6)];return _0x440520&&removeSync(_0x161239),copySkillDirectory(_0x3e8f3d,_0x161239),{'path':_0x161239,'target':_0x3e8f3d,'action':!_0x440520?'created':_0x2adc83===_0x42a5ba?_0x5dd121(0x19e):'updated'};}function copySkillDirectory(_0x430300,_0x5056f1){copySync(_0x430300,_0x5056f1,{'dereference':![],'overwrite':!![],'filter'(_0xac6798){const _0x240ca2=a98_0x2679;if(lstatSync(_0xac6798)[_0x240ca2(0x1ab)]())throw CliErrors[_0x240ca2(0x192)](_0x240ca2(0x1ba)+_0xac6798);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(_0x1f72cc,_0x276925){const _0x122305=a99_0x1c7c,_0x6af2b8=_0x1f72cc();while(!![]){try{const _0x4274ad=parseInt(_0x122305(0x198))/0x1+parseInt(_0x122305(0x183))/0x2+-parseInt(_0x122305(0x18a))/0x3+parseInt(_0x122305(0x176))/0x4+parseInt(_0x122305(0x193))/0x5*(parseInt(_0x122305(0x181))/0x6)+-parseInt(_0x122305(0x18c))/0x7+-parseInt(_0x122305(0x19a))/0x8*(-parseInt(_0x122305(0x182))/0x9);if(_0x4274ad===_0x276925)break;else _0x6af2b8['push'](_0x6af2b8['shift']());}catch(_0x1fe650){_0x6af2b8['push'](_0x6af2b8['shift']());}}}(a99_0x504a,0x26ef6));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';function a99_0x504a(){const _0xf288ee=['set','builtin','source','accessKey','push','sort','661653FvgTgr','cache','1521660FeejIm','name','env','link','values','dir','isSymbolicLink','15ULkdzp','skillMdPath','map','trim','tags','35151sucgmt','startsWith','24oXmJpP','linkedPath','scope','from','scopes','metadataPath','210736laAaos','includes','code','isDirectory','local','skillCode','appCode','linkedPaths','filter','cacheDir','has','253596eUwdVv','468297daUVlF','453354LoqJst'];a99_0x504a=function(){return _0xf288ee;};return a99_0x504a();}function a99_0x1c7c(_0x4812ed,_0x1f97b3){_0x4812ed=_0x4812ed-0x171;const _0x504a06=a99_0x504a();let _0x1c7cc2=_0x504a06[_0x4812ed];return _0x1c7cc2;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x1efafa,_0x5e5069={}){const _0x33ac26=a99_0x1c7c,_0x41cbc3=safePathSegment(_0x1efafa[_0x33ac26(0x17c)],_0x33ac26(0x17c)),_0x26adf1=normalizeRuntimeSkillScopes(_0x1efafa[_0x33ac26(0x174)]),_0x44e8ba=new Set(_0x26adf1),_0xa65e65=_0x1efafa[_0x33ac26(0x178)]?.[_0x33ac26(0x196)](),_0x40dc6f=new Map(),_0x331394=resolve(getRuntimeSkillCacheRoot(_0x1efafa[_0x33ac26(0x18e)],_0x1efafa[_0x33ac26(0x187)],_0x5e5069),_0x41cbc3);for(const _0x1edeb7 of _0x26adf1){for(const _0x39ae1f of localSkillEntryDirs(resolve(_0x331394,_0x1edeb7))){collectLocalRuntimeSkill(_0x40dc6f,_0x39ae1f,{'appCode':_0x41cbc3,'scopes':_0x44e8ba,'code':_0xa65e65,'source':_0x33ac26(0x18b)});}}const _0x30c457=resolveSkillSyncPaths(_0x5e5069);for(const _0x53a801 of runtimeAgentSkillRoots(_0x30c457)){for(const _0x19cc28 of localSkillLinkCandidates(_0x53a801,_0x41cbc3,_0x44e8ba)){collectLocalRuntimeSkill(_0x40dc6f,_0x19cc28,{'appCode':_0x41cbc3,'scopes':_0x44e8ba,'code':_0xa65e65,'source':_0x33ac26(0x18f),'linkedPath':_0x19cc28});}}return Array[_0x33ac26(0x173)](_0x40dc6f[_0x33ac26(0x190)]())[_0x33ac26(0x189)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xb83ee9){const _0xf3359b=a99_0x1c7c;if(!existsSync(_0xb83ee9))return[];return readdirSync(_0xb83ee9,{'withFileTypes':!![]})[_0xf3359b(0x17e)](_0x49b63b=>_0x49b63b['isDirectory']()||_0x49b63b[_0xf3359b(0x192)]())[_0xf3359b(0x195)](_0x503fb6=>resolve(_0xb83ee9,_0x503fb6[_0xf3359b(0x18d)]));}function localSkillLinkCandidates(_0x2bdc54,_0x176e2b,_0x1c600d){const _0x27ff11=a99_0x1c7c;if(!existsSync(_0x2bdc54))return[];const _0x34eff3=_0x176e2b+'--';return readdirSync(_0x2bdc54,{'withFileTypes':!![]})['filter'](_0x2262ae=>_0x2262ae[_0x27ff11(0x179)]()||_0x2262ae['isSymbolicLink']())[_0x27ff11(0x17e)](_0xb733ec=>_0xb733ec['name'][_0x27ff11(0x199)](_0x34eff3)||_0x1c600d[_0x27ff11(0x180)](_0x27ff11(0x185)))[_0x27ff11(0x195)](_0x56f723=>resolve(_0x2bdc54,_0x56f723[_0x27ff11(0x18d)]));}function collectLocalRuntimeSkill(_0x261394,_0x53fcca,_0x4a2352){const _0x4f32ee=a99_0x1c7c,_0x35c8b8=resolve(_0x53fcca,METADATA_FILE),_0x37df2a=readMetadataIfPresent(_0x35c8b8);if(!_0x37df2a)return;if(_0x37df2a[_0x4f32ee(0x17c)]!==_0x4a2352[_0x4f32ee(0x17c)])return;if(!isRuntimeSkillScope(_0x37df2a[_0x4f32ee(0x172)])||!_0x4a2352[_0x4f32ee(0x174)][_0x4f32ee(0x180)](_0x37df2a[_0x4f32ee(0x172)]))return;const _0x2422df=_0x37df2a[_0x4f32ee(0x17b)]?.[_0x4f32ee(0x196)]();if(!_0x2422df)return;if(_0x4a2352[_0x4f32ee(0x178)]&&_0x2422df!==_0x4a2352[_0x4f32ee(0x178)])return;const _0x32b994=_0x37df2a[_0x4f32ee(0x172)]+':'+_0x2422df,_0x4fa3a5=_0x4a2352[_0x4f32ee(0x171)]?[_0x4a2352[_0x4f32ee(0x171)]]:[],_0x18c441=_0x261394['get'](_0x32b994);if(_0x18c441){_0x4a2352[_0x4f32ee(0x186)]==='cache'&&(_0x18c441[_0x4f32ee(0x191)]=_0x53fcca,_0x18c441[_0x4f32ee(0x17f)]=_0x53fcca,_0x18c441[_0x4f32ee(0x194)]=resolve(_0x53fcca,SKILL_FILE),_0x18c441[_0x4f32ee(0x175)]=_0x35c8b8);for(const _0xc91bae of _0x4fa3a5){!_0x18c441['linkedPaths'][_0x4f32ee(0x177)](_0xc91bae)&&_0x18c441[_0x4f32ee(0x17d)][_0x4f32ee(0x188)](_0xc91bae);}_0x18c441[_0x4f32ee(0x17d)]['sort']();return;}_0x261394[_0x4f32ee(0x184)](_0x32b994,{..._0x37df2a,'tags':Array['isArray'](_0x37df2a[_0x4f32ee(0x197)])?_0x37df2a[_0x4f32ee(0x197)]:[],'scope':_0x37df2a[_0x4f32ee(0x172)],'source':_0x4f32ee(0x17a),'dir':_0x53fcca,'cacheDir':_0x4a2352[_0x4f32ee(0x186)]==='cache'?_0x53fcca:undefined,'skillMdPath':resolve(_0x53fcca,SKILL_FILE),'metadataPath':_0x35c8b8,'linkedPaths':_0x4fa3a5});}function compareLocalRuntimeSkills(_0x912bc6,_0x2b7ff1){const _0x4c5a86=a99_0x1c7c,_0x475b45={'personal':0x0,'company':0x1,'builtin':0x2};return _0x475b45[_0x912bc6['scope']]-_0x475b45[_0x2b7ff1[_0x4c5a86(0x172)]]||_0x912bc6[_0x4c5a86(0x17b)]['localeCompare'](_0x2b7ff1[_0x4c5a86(0x17b)])||_0x912bc6[_0x4c5a86(0x191)]['localeCompare'](_0x2b7ff1[_0x4c5a86(0x191)]);}
@@ -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 a100_0x1522(_0x3046aa,_0x3f1971){_0x3046aa=_0x3046aa-0x17c;const _0x194789=a100_0x1947();let _0x15228f=_0x194789[_0x3046aa];return _0x15228f;}(function(_0x135f56,_0x3fe226){const _0x22f098=a100_0x1522,_0x3faa57=_0x135f56();while(!![]){try{const _0x2c2f4a=parseInt(_0x22f098(0x19c))/0x1+parseInt(_0x22f098(0x1a0))/0x2+-parseInt(_0x22f098(0x1a3))/0x3+-parseInt(_0x22f098(0x17c))/0x4+-parseInt(_0x22f098(0x18a))/0x5*(parseInt(_0x22f098(0x19b))/0x6)+-parseInt(_0x22f098(0x17e))/0x7+-parseInt(_0x22f098(0x18e))/0x8*(-parseInt(_0x22f098(0x181))/0x9);if(_0x2c2f4a===_0x3fe226)break;else _0x3faa57['push'](_0x3faa57['shift']());}catch(_0x2dd10a){_0x3faa57['push'](_0x3faa57['shift']());}}}(a100_0x1947,0x37372));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a100_0x1947(){const _0x564585=['135785rIcIeh','size','trim','isBuffer','4351176KoUcKw','toLowerCase','set','bytes','compare','toString','name','test','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','replace','sha256','length','sort','6DLDxRn','302738WOeWBq','object','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20file\x20sha256\x20is\x20invalid:\x20','157734hiMNqG','values','includes','166854hpaOca','Duplicate\x20Skill\x20file\x20path:\x20','split','content','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isSafeInteger','startsWith','778040XwXtVX','isArray','2954385rgeGtE','path','from','9kkaLvc','isDirectory','has','validation','string','isSymbolicLink','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','utf8','isFile'];a100_0x1947=function(){return _0x564585;};return a100_0x1947();}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(_0x1d56cc){const _0x4744e3=a100_0x1522;return _0x1d56cc[_0x4744e3(0x191)]??Buffer[_0x4744e3(0x180)](_0x1d56cc[_0x4744e3(0x1a6)]??'','utf8');}export function fileText(_0x4c6bc8){const _0x3d2124=a100_0x1522;return fileContent(_0x4c6bc8)[_0x3d2124(0x193)](_0x3d2124(0x188));}export function normalizeLocalFiles(_0x1f21b5){const _0x4d64a7=a100_0x1522;if(!Array[_0x4d64a7(0x17d)](_0x1f21b5)||_0x1f21b5[_0x4d64a7(0x199)]===0x0)return[];const _0x42199c=new Map();for(const _0x2c0edd of _0x1f21b5){if(!_0x2c0edd||typeof _0x2c0edd!=='object'||typeof _0x2c0edd[_0x4d64a7(0x17f)]!==_0x4d64a7(0x185))throw CliErrors[_0x4d64a7(0x184)](_0x4d64a7(0x19e));const _0x21c092=normalizeSkillRelativePath(_0x2c0edd[_0x4d64a7(0x17f)]);if(_0x42199c['has'](_0x21c092))throw CliErrors[_0x4d64a7(0x184)](_0x4d64a7(0x1a4)+_0x21c092);if(_0x2c0edd[_0x4d64a7(0x191)]!==undefined&&!Buffer[_0x4d64a7(0x18d)](_0x2c0edd[_0x4d64a7(0x191)]))throw CliErrors[_0x4d64a7(0x184)](_0x4d64a7(0x1a7)+_0x21c092);if(_0x2c0edd[_0x4d64a7(0x191)]===undefined&&typeof _0x2c0edd[_0x4d64a7(0x1a6)]!==_0x4d64a7(0x185))throw CliErrors[_0x4d64a7(0x184)](_0x4d64a7(0x187)+_0x21c092);const _0x41f047=fileContent(_0x2c0edd);_0x42199c[_0x4d64a7(0x190)](_0x21c092,{'path':_0x21c092,'bytes':_0x41f047});}return Array[_0x4d64a7(0x180)](_0x42199c[_0x4d64a7(0x1a1)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0xdacdfc){const _0x19298c=a100_0x1522;if(!Array[_0x19298c(0x17d)](_0xdacdfc)||_0xdacdfc[_0x19298c(0x199)]===0x0)return[];const _0x3cc1ce=new Map();for(const _0x75e6a5 of _0xdacdfc){if(!_0x75e6a5||typeof _0x75e6a5!==_0x19298c(0x19d)||typeof _0x75e6a5['path']!==_0x19298c(0x185))throw CliErrors[_0x19298c(0x184)](_0x19298c(0x19e));const _0x265944=normalizeSkillRelativePath(_0x75e6a5[_0x19298c(0x17f)]);if(_0x3cc1ce[_0x19298c(0x183)](_0x265944))throw CliErrors[_0x19298c(0x184)](_0x19298c(0x1a4)+_0x265944);if(!isSha256Hex(_0x75e6a5[_0x19298c(0x198)]))throw CliErrors['validation'](_0x19298c(0x19f)+_0x265944);if(!Number[_0x19298c(0x1a8)](_0x75e6a5[_0x19298c(0x18b)])||_0x75e6a5[_0x19298c(0x18b)]<0x0)throw CliErrors['validation']('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x265944);_0x3cc1ce[_0x19298c(0x190)](_0x265944,{'path':_0x265944,'sha256':_0x75e6a5['sha256'][_0x19298c(0x18f)](),'size':_0x75e6a5[_0x19298c(0x18b)]});}return Array[_0x19298c(0x180)](_0x3cc1ce['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x254da6){const _0x52c1f3=realpathSync(_0x254da6),_0x4cc382=[];function _0x3acd5e(_0x2052fa){const _0x144d87=a100_0x1522,_0x8e535c=readdirSync(_0x2052fa,{'withFileTypes':!![]})[_0x144d87(0x19a)]((_0x9d667,_0x1314fd)=>_0x9d667[_0x144d87(0x194)]['localeCompare'](_0x1314fd[_0x144d87(0x194)]));for(const _0x1ee81d of _0x8e535c){if(_0x1ee81d[_0x144d87(0x182)]()&&IGNORED_DIR_NAMES[_0x144d87(0x183)](_0x1ee81d[_0x144d87(0x194)]))continue;if(IGNORED_FILE_NAMES[_0x144d87(0x183)](_0x1ee81d[_0x144d87(0x194)]))continue;const _0x8cba0a=resolve(_0x2052fa,_0x1ee81d[_0x144d87(0x194)]);if(_0x1ee81d[_0x144d87(0x186)]())throw CliErrors['validation'](_0x144d87(0x196)+_0x8cba0a);const _0x9204b8=toPosixPath(relative(_0x52c1f3,_0x8cba0a));if(_0x1ee81d[_0x144d87(0x182)]()){_0x3acd5e(_0x8cba0a);continue;}if(!_0x1ee81d[_0x144d87(0x189)]())continue;validateSkillRelativePath(_0x9204b8);const _0x279dac=readFileSync(_0x8cba0a);_0x4cc382['push']({'path':_0x9204b8,'bytes':_0x279dac});}}return _0x3acd5e(_0x52c1f3),normalizeLocalFiles(_0x4cc382);}export function compareSkillFiles(_0x489b84,_0x1780b7){const _0x8c9d57=a100_0x1522;if(_0x489b84[_0x8c9d57(0x17f)]===SKILL_FILE)return _0x1780b7[_0x8c9d57(0x17f)]===SKILL_FILE?0x0:-0x1;if(_0x1780b7[_0x8c9d57(0x17f)]===SKILL_FILE)return 0x1;return Buffer[_0x8c9d57(0x192)](Buffer[_0x8c9d57(0x180)](_0x489b84[_0x8c9d57(0x17f)],'utf8'),Buffer['from'](_0x1780b7[_0x8c9d57(0x17f)],'utf8'));}export function normalizeSkillRelativePath(_0x2f728){const _0x52f085=a100_0x1522,_0x3d7523=toPosixPath(_0x2f728[_0x52f085(0x18c)]());return validateSkillRelativePath(_0x3d7523),_0x3d7523;}export function validateSkillRelativePath(_0x5ecd0c){const _0x23d15f=a100_0x1522;if(!_0x5ecd0c||_0x5ecd0c[_0x23d15f(0x1a9)]('/')||_0x5ecd0c[_0x23d15f(0x1a2)]('//'))throw CliErrors[_0x23d15f(0x184)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5ecd0c);for(const _0x3966fe of _0x5ecd0c[_0x23d15f(0x1a5)]('/')){if(!_0x3966fe||_0x3966fe==='.'||_0x3966fe==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5ecd0c);}}export function toPosixPath(_0x4d0862){const _0x2cc7e7=a100_0x1522;return _0x4d0862[_0x2cc7e7(0x197)](/\\/g,'/');}export function isSha256Hex(_0x2c633e){const _0x5b2555=a100_0x1522;return typeof _0x2c633e===_0x5b2555(0x185)&&/^[a-fA-F0-9]{64}$/[_0x5b2555(0x195)](_0x2c633e);}
@@ -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(_0x454315,_0x49a97c){const _0x1e63e4=a101_0x4ae4,_0x3e6317=_0x454315();while(!![]){try{const _0x13b678=parseInt(_0x1e63e4(0x11f))/0x1+-parseInt(_0x1e63e4(0x115))/0x2*(-parseInt(_0x1e63e4(0x108))/0x3)+-parseInt(_0x1e63e4(0x136))/0x4+parseInt(_0x1e63e4(0x126))/0x5+parseInt(_0x1e63e4(0x129))/0x6*(parseInt(_0x1e63e4(0x13b))/0x7)+-parseInt(_0x1e63e4(0x130))/0x8*(parseInt(_0x1e63e4(0x10e))/0x9)+-parseInt(_0x1e63e4(0x13c))/0xa;if(_0x13b678===_0x49a97c)break;else _0x3e6317['push'](_0x3e6317['shift']());}catch(_0x2d2778){_0x3e6317['push'](_0x3e6317['shift']());}}}(a101_0x576f,0x6a59e));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_0x4ae4(_0x921e53,_0x2ece56){_0x921e53=_0x921e53-0x108;const _0x576f03=a101_0x576f();let _0x4ae4fc=_0x576f03[_0x921e53];return _0x4ae4fc;}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x181c3c,_0x5efb7d,_0x49f3d9){const _0x32a629=a101_0x4ae4,_0x24c15d=requireSkillCode(_0x181c3c),_0x1f9332=requirePackageBytes(_0x24c15d,_0x49f3d9[_0x32a629(0x112)]),_0x142e17=extractDownloadedPackage(_0x1f9332),_0x182d78=_0x142e17[_0x32a629(0x11d)](_0x1f555e=>_0x1f555e['path']===SKILL_FILE);if(!_0x182d78)throw CliErrors[_0x32a629(0x117)](_0x32a629(0x10f)+SKILL_FILE+':\x20'+_0x24c15d);const _0x37c63a=withMaterializedSkillFrontmatter(_0x142e17,_0x181c3c,_0x24c15d),_0x5465c4=_0x37c63a[_0x32a629(0x11d)](_0x41bfc1=>_0x41bfc1[_0x32a629(0x13d)]===SKILL_FILE),_0x3bf685=fileText(_0x5465c4),_0x211ade=getRuntimeSkillDir(_0x49f3d9['env'],_0x49f3d9['accessKey'],_0x49f3d9[_0x32a629(0x10d)],_0x5efb7d,_0x24c15d,_0x49f3d9[_0x32a629(0x12f)]),_0x23cd2d=resolve(_0x211ade,SKILL_FILE),_0x38b009=resolve(_0x211ade,METADATA_FILE),_0xa4b1=contentHash(_0x3bf685),_0x25568c=readMetadataIfPresent(_0x38b009)?.[_0x32a629(0x132)];ensurePulledFilesCanBeOverwritten(_0x211ade,_0x38b009,_0x37c63a,_0x49f3d9['force']===!![]),mkdirSync(_0x211ade,{'recursive':!![],'mode':0x1c0});const _0x2a0e39=existsSync(_0x23cd2d)?readFileSync(_0x23cd2d,'utf8'):undefined;return materializeFiles(_0x211ade,_0x37c63a),removeStaleManagedFiles(_0x211ade,_0x25568c,_0x37c63a),writeJsonAtomic(_0x38b009,buildMetadata(_0x181c3c,_0x5efb7d,_0x49f3d9['appCode'],_0xa4b1,_0x49f3d9[_0x32a629(0x12a)],_0x37c63a,_0x1f9332)),{'skill':_0x181c3c,'scope':_0x5efb7d,'dir':_0x211ade,'skillMdPath':_0x23cd2d,'metadataPath':_0x38b009,'contentHash':_0xa4b1,'changed':_0x2a0e39!==_0x3bf685};}function withMaterializedSkillFrontmatter(_0x10a459,_0x3a2fc8,_0x221200){const _0x40f489=a101_0x4ae4,_0x5d6f79=skillDisplayName(_0x3a2fc8,_0x221200),_0x3d2fbe=_0x3a2fc8[_0x40f489(0x114)]?.['trim']()||_0x5d6f79||_0x221200;return normalizeLocalFiles(_0x10a459)[_0x40f489(0x110)](_0x59d82d=>{const _0x416815=_0x40f489,_0x55d6fe=fileText(_0x59d82d);if(_0x59d82d['path']!==SKILL_FILE)return _0x59d82d;if(hasYamlFrontmatter(_0x55d6fe))return{'path':_0x59d82d[_0x416815(0x13d)],'content':withSyncedDisplayName(_0x55d6fe,_0x5d6f79)};return{'path':_0x59d82d['path'],'content':prependSkillFrontmatter(_0x55d6fe,{'name':_0x221200,'displayName':_0x5d6f79,'description':_0x3d2fbe})};});}function hasYamlFrontmatter(_0x3b697a){const _0x4ceb13=a101_0x4ae4;return/^\uFEFF?---\s*\r?\n/[_0x4ceb13(0x128)](_0x3b697a);}function a101_0x576f(){const _0xebafa3=['keys','test','102SaEeYb','pulledAt','.\x20Changed\x20file:\x20','utf8','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','skillName','paths','662152lhYIuU','entries','fileHashes','set','description:\x20','name','958300eXNQeh','isFile','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','---\x0a','stringify','112147cppOfq','7623350hsPcpq','path','530151aAMKkc','slice','\x0a---\x0a\x0a','replace','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','appCode','27shfJVN','Runtime\x20Skill\x20package\x20is\x20missing\x20','map','delete','packageBytes','Managed\x20file\x20was\x20removed\x20locally:\x20','description','2TVjmHN','displayName','validation','contents','flow','contentHash','has','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','find','---','392719rXqqxZ','trimEnd','name:\x20','filter','trim','length','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','4220190hBUvww'];a101_0x576f=function(){return _0xebafa3;};return a101_0x576f();}function prependSkillFrontmatter(_0x3bbf82,_0x204ce1){const _0x5a5803=a101_0x4ae4,_0x3869fb=_0x3bbf82[_0x5a5803(0x10b)](/^\uFEFF/,'');return['---',_0x5a5803(0x121)+yamlString(_0x204ce1[_0x5a5803(0x135)]),_0x204ce1['displayName']?'displayName:\x20'+yamlString(_0x204ce1[_0x5a5803(0x116)]):undefined,_0x5a5803(0x134)+yamlString(_0x204ce1[_0x5a5803(0x114)]),_0x5a5803(0x11e),'',_0x3869fb][_0x5a5803(0x122)](_0x274503=>_0x274503!==undefined)['join']('\x0a');}function yamlString(_0x4017af){const _0x3dfd60=a101_0x4ae4;return JSON[_0x3dfd60(0x13a)](_0x4017af[_0x3dfd60(0x10b)](/\r/g,'')[_0x3dfd60(0x123)]());}function skillDisplayName(_0x1cc90b,_0x51e332){const _0x423944=a101_0x4ae4,_0x43e62f=_0x1cc90b[_0x423944(0x12e)]?.[_0x423944(0x123)]();return _0x43e62f||_0x51e332;}function withSyncedDisplayName(_0x57d3bb,_0x3e6577){const _0x2f4f5e=a101_0x4ae4,_0x447fa1=_0x57d3bb['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x447fa1)return _0x57d3bb;const _0x32175c=_0x447fa1[0x1]??'',_0x10db3a=_0x447fa1[0x2]??'',_0x21900f=parseDocument(_0x10db3a);if(_0x21900f['errors'][_0x2f4f5e(0x124)]>0x0||!isMap(_0x21900f['contents']))return _0x57d3bb;if(_0x3e6577)_0x21900f[_0x2f4f5e(0x133)](_0x2f4f5e(0x116),_0x3e6577);else{if(_0x21900f['has'](_0x2f4f5e(0x116)))_0x21900f[_0x2f4f5e(0x111)](_0x2f4f5e(0x116));else return _0x57d3bb;}forceBlockCollections(_0x21900f[_0x2f4f5e(0x118)]);const _0x40746f=_0x21900f['toString']({'lineWidth':0x0})[_0x2f4f5e(0x120)](),_0x49f245=_0x57d3bb[_0x2f4f5e(0x109)](_0x447fa1[0x0][_0x2f4f5e(0x124)])[_0x2f4f5e(0x10b)](/^\r?\n/,'');return _0x32175c+_0x2f4f5e(0x139)+_0x40746f+_0x2f4f5e(0x10a)+_0x49f245;}function forceBlockCollections(_0x1dfbb5){if(!isNode(_0x1dfbb5))return;visit(_0x1dfbb5,(_0x8cbca3,_0x3130c9)=>{const _0x252ecc=a101_0x4ae4;isCollection(_0x3130c9)&&(_0x3130c9[_0x252ecc(0x119)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0xaa16b8,_0x2d0125,_0x3183f4,_0x330bd3){const _0x501522=a101_0x4ae4;if(_0x330bd3||!existsSync(_0x2d0125))return;const _0x3c1332=readMetadataIfPresent(_0x2d0125);if(!_0x3c1332)return;const _0xb9f978=_0x3c1332['fileHashes']&&Object[_0x501522(0x127)](_0x3c1332['fileHashes'])[_0x501522(0x124)]>0x0?_0x3c1332[_0x501522(0x132)]:undefined;if(_0xb9f978)for(const [_0x58e384,_0x482c8c]of Object[_0x501522(0x131)](_0xb9f978)){const _0x6072a6=resolveManagedFilePath(_0xaa16b8,_0x58e384);if(!existsSync(_0x6072a6))throw CliErrors[_0x501522(0x117)](_0x501522(0x125)+_0xaa16b8,_0x501522(0x113)+_0x58e384);const _0x123911=lstatSync(_0x6072a6);if(!_0x123911[_0x501522(0x137)]())throw CliErrors[_0x501522(0x117)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xaa16b8,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x58e384);const _0x520b65=bufferSha256(readFileSync(_0x6072a6));if(_0x520b65!==_0x482c8c)throw CliErrors[_0x501522(0x117)](_0x501522(0x125)+_0xaa16b8+_0x501522(0x12b)+_0x58e384,_0x501522(0x12d)+_0x58e384);}else{const _0x4ad1be=resolve(_0xaa16b8,SKILL_FILE);if(existsSync(_0x4ad1be)&&_0x3c1332[_0x501522(0x11a)]){const _0x5989fa=contentHash(readFileSync(_0x4ad1be,_0x501522(0x12c)));if(_0x5989fa!==_0x3c1332[_0x501522(0x11a)])throw CliErrors[_0x501522(0x117)](_0x501522(0x11c)+_0x4ad1be,_0x501522(0x10c));}}for(const _0x2207a7 of normalizeLocalFiles(_0x3183f4)){if(_0xb9f978?.[_0x2207a7[_0x501522(0x13d)]])continue;if(!_0xb9f978&&_0x2207a7['path']===SKILL_FILE)continue;const _0x2e1b01=resolveManagedFilePath(_0xaa16b8,_0x2207a7[_0x501522(0x13d)]);if(!existsSync(_0x2e1b01))continue;const _0x2ad997=lstatSync(_0x2e1b01);if(!_0x2ad997[_0x501522(0x137)]())throw CliErrors[_0x501522(0x117)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xaa16b8,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x2207a7['path']);const _0x25b409=bufferSha256(readFileSync(_0x2e1b01));if(_0x25b409!==fileHash(_0x2207a7))throw CliErrors['validation'](_0x501522(0x125)+_0xaa16b8,_0x501522(0x138)+_0x2207a7[_0x501522(0x13d)]);}}function materializeFiles(_0x254d90,_0x2de399){const _0x33e7a3=a101_0x4ae4;for(const _0x4e8d71 of normalizeLocalFiles(_0x2de399)){const _0x317826=resolveManagedFilePath(_0x254d90,_0x4e8d71[_0x33e7a3(0x13d)]);mkdirSync(dirname(_0x317826),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x317826,fileContent(_0x4e8d71),0x180);}}function removeStaleManagedFiles(_0x67b4d7,_0x217e5e,_0x517d56){const _0x57e9cc=a101_0x4ae4;if(!_0x217e5e)return;const _0x3e57db=new Set(normalizeLocalFiles(_0x517d56)[_0x57e9cc(0x110)](_0x5a663b=>_0x5a663b[_0x57e9cc(0x13d)]));for(const _0x1d85ca of Object[_0x57e9cc(0x127)](_0x217e5e)){if(_0x3e57db[_0x57e9cc(0x11b)](_0x1d85ca))continue;const _0x11add6=resolveManagedFilePath(_0x67b4d7,_0x1d85ca);existsSync(_0x11add6)&&lstatSync(_0x11add6)[_0x57e9cc(0x137)]()&&rmSync(_0x11add6,{'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(_0x2f264e,_0xa83cad){const _0x1128a0=a102_0x4b0b,_0x2ec975=_0x2f264e();while(!![]){try{const _0x41c2a1=-parseInt(_0x1128a0(0xac))/0x1*(parseInt(_0x1128a0(0x92))/0x2)+parseInt(_0x1128a0(0x96))/0x3+parseInt(_0x1128a0(0xa1))/0x4*(parseInt(_0x1128a0(0x8e))/0x5)+-parseInt(_0x1128a0(0x94))/0x6+-parseInt(_0x1128a0(0xb2))/0x7+-parseInt(_0x1128a0(0x9a))/0x8*(parseInt(_0x1128a0(0xab))/0x9)+parseInt(_0x1128a0(0xaa))/0xa;if(_0x41c2a1===_0xa83cad)break;else _0x2ec975['push'](_0x2ec975['shift']());}catch(_0x441ab3){_0x2ec975['push'](_0x2ec975['shift']());}}}(a102_0x7d54,0x8fc5d));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(_0x711c0e,_0x568167,_0x205761,_0x15592d,_0x3ddfe4,_0xc8b75,_0xff6c89){const _0x633caa=a102_0x4b0b,_0x2a154e=_0xc8b75?normalizeLocalFiles(_0xc8b75):[],_0x5b9336=!_0xff6c89&&_0x2a154e['length']>0x0?buildSkillPackage(_0x2a154e):undefined,_0x371e9b=_0xff6c89?bufferSha256(_0xff6c89):_0x5b9336?.[_0x633caa(0xa2)]['zipSha256'],_0x30b2de=_0xff6c89?.[_0x633caa(0xa7)]??_0x5b9336?.['manifest'][_0x633caa(0xb4)],_0x4441f0=_0x2a154e[_0x633caa(0xa7)]>0x0?Object[_0x633caa(0xa5)](_0x2a154e[_0x633caa(0xa8)](_0x3b1358=>[_0x3b1358[_0x633caa(0xaf)],fileHash(_0x3b1358)])):undefined;return{'schemaVersion':_0x2a154e['length']>0x0?0x2:0x1,'id':_0x711c0e['id'],'appCode':_0x205761,'skillCode':requireSkillCode(_0x711c0e),'skillName':_0x711c0e[_0x633caa(0xa4)],'description':_0x711c0e[_0x633caa(0x9c)],'scope':_0x568167,'readonly':_0x568167!==_0x633caa(0x97)||_0x711c0e[_0x633caa(0x8f)]===!![],'tenantCode':_0x711c0e[_0x633caa(0x91)],'userId':_0x711c0e['userId'],'version':_0x711c0e[_0x633caa(0x93)],'status':_0x711c0e[_0x633caa(0xa0)],'tags':Array[_0x633caa(0x99)](_0x711c0e[_0x633caa(0x95)])?_0x711c0e[_0x633caa(0x95)]:[],'hasUpstreamUpdate':_0x711c0e[_0x633caa(0x9f)],'forkedFromSkillId':_0x711c0e[_0x633caa(0x9d)],'forkedFromVersion':_0x711c0e[_0x633caa(0x8d)],'sourceSessionId':_0x711c0e[_0x633caa(0x9b)],'contentHash':_0x15592d,'fileHashes':_0x4441f0,'treeHash':_0x2a154e[_0x633caa(0xa7)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2a154e)):undefined,'ossPath':remoteManifestOssPath(_0x711c0e[_0x633caa(0xa6)]),'zipSha256':_0x371e9b,'zipSize':_0x30b2de,'files':_0x2a154e[_0x633caa(0xa7)]>0x0?_0x2a154e['map'](_0xcc1f61=>({'path':_0xcc1f61[_0x633caa(0xaf)],'hash':fileHash(_0xcc1f61),'size':fileContent(_0xcc1f61)[_0x633caa(0xa7)]})):undefined,'pulledAt':_0x3ddfe4??new Date()[_0x633caa(0xa3)]()};}function a102_0x7d54(){const _0x538bda=['toISOString','skillName','fromEntries','files','length','map','skillCode','11906660IZJzem','51507KOWrjq','2638oJSAXX','trim','object','path','ossPath','parse','2166388uEcnjh','utf8','zipSize','forkedFromVersion','851665STRtWb','readonly','validation','tenantCode','326LPWbgI','version','2594472LLxEEa','tags','1816551JbsjZr','personal','string','isArray','1240NHkSFN','sourceSessionId','description','forkedFromSkillId','Invalid\x20','hasUpstreamUpdate','status','20sveOGP','manifest'];a102_0x7d54=function(){return _0x538bda;};return a102_0x7d54();}function a102_0x4b0b(_0x1b95bd,_0x1d8abf){_0x1b95bd=_0x1b95bd-0x8d;const _0x7d5487=a102_0x7d54();let _0x4b0b23=_0x7d5487[_0x1b95bd];return _0x4b0b23;}export function requireSkillCode(_0x29af3e){const _0x5d9875=a102_0x4b0b,_0x5e46c3=_0x29af3e[_0x5d9875(0xa9)]?.[_0x5d9875(0xad)]();if(!_0x5e46c3)throw CliErrors[_0x5d9875(0x90)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x5e46c3;}export function readMetadataIfPresent(_0x5c1883){const _0x2e5b47=a102_0x4b0b;if(!existsSync(_0x5c1883))return undefined;try{const _0x2373b4=JSON[_0x2e5b47(0xb1)](readFileSync(_0x5c1883,_0x2e5b47(0xb3)));return _0x2373b4;}catch{throw CliErrors[_0x2e5b47(0x90)](_0x2e5b47(0x9e)+METADATA_FILE+':\x20'+_0x5c1883);}}function remoteManifestOssPath(_0x62f278){const _0x14ce69=a102_0x4b0b;if(!_0x62f278||typeof _0x62f278!==_0x14ce69(0xae)||Array[_0x14ce69(0x99)](_0x62f278))return undefined;const _0x264b28=_0x62f278[_0x14ce69(0xb0)];return typeof _0x264b28===_0x14ce69(0x98)&&_0x264b28[_0x14ce69(0xad)]()?_0x264b28[_0x14ce69(0xad)]():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 a103_0x40e50b=a103_0x4f51;(function(_0x5963a3,_0x4c8202){const _0xd95bca=a103_0x4f51,_0x12bff4=_0x5963a3();while(!![]){try{const _0x2f54d5=-parseInt(_0xd95bca(0x1e7))/0x1+parseInt(_0xd95bca(0x1dc))/0x2+parseInt(_0xd95bca(0x1d9))/0x3*(parseInt(_0xd95bca(0x1e9))/0x4)+-parseInt(_0xd95bca(0x1e3))/0x5+parseInt(_0xd95bca(0x1e2))/0x6*(-parseInt(_0xd95bca(0x1ee))/0x7)+parseInt(_0xd95bca(0x1eb))/0x8*(parseInt(_0xd95bca(0x1ed))/0x9)+parseInt(_0xd95bca(0x1e5))/0xa;if(_0x2f54d5===_0x4c8202)break;else _0x12bff4['push'](_0x12bff4['shift']());}catch(_0xf59aa1){_0x12bff4['push'](_0x12bff4['shift']());}}}(a103_0x7b44,0xa937c));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(_0x5684f2={}){const _0x26d7e0=a103_0x4f51,_0xfdf642=_0x5684f2['homeDir']??homedir(),_0x55796a=resolve(_0xfdf642,PRODUCT_CONFIG['homeDirName'],_0x26d7e0(0x1f1)),_0x31da32=trimmedEnv(_0x26d7e0(0x1e6)),_0x795df2=trimmedEnv(_0x26d7e0(0x1d8)),_0x5d77aa=resolve(_0xfdf642,'.workbuddy'),_0x6152bf=_0x5684f2[_0x26d7e0(0x1dd)]??(existsSync(_0x5d77aa)?resolve(_0x5d77aa,_0x26d7e0(0x1ea)):undefined);return{'homeDir':_0xfdf642,'cacheRoot':_0x55796a,'managedRoot':resolve(_0xfdf642,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x5684f2[_0x26d7e0(0x1db)]??_0x31da32??resolve(_0xfdf642,_0x26d7e0(0x1df),_0x26d7e0(0x1ea)),'claudeSkillsDir':_0x5684f2['claudeSkillsDir']??_0x795df2??resolve(_0xfdf642,_0x26d7e0(0x1de),_0x26d7e0(0x1ea)),'workbuddySkillsDir':_0x6152bf};}export function runtimeAgentSkillRoots(_0x18dc79){const _0x4f2488=a103_0x4f51;return[_0x18dc79[_0x4f2488(0x1db)],_0x18dc79[_0x4f2488(0x1e0)],_0x18dc79[_0x4f2488(0x1dd)]][_0x4f2488(0x1f0)](_0x520232=>Boolean(_0x520232));}function a103_0x4f51(_0x14051c,_0x50b40a){_0x14051c=_0x14051c-0x1d8;const _0x7b44e3=a103_0x7b44();let _0x4f514c=_0x7b44e3[_0x14051c];return _0x4f514c;}function a103_0x7b44(){const _0x44cfcc=['.claude','.agents','claudeSkillsDir','trim','527010YLFDyC','6026010HTQADX','path\x20segment','7112670zHjCQd','SKILL_ROOT','517550wqdejI','includes','4dXVQiN','skills','1828520VkKSsW','cacheRoot','45meAzno','77VJhOOz','\x20for\x20local\x20path:\x20','filter','cache','skillCode','CLAUDE_SKILL_ROOT','4148346NrQqQN','appCode','agentsSkillsDir','290358WBzpOI','workbuddySkillsDir'];a103_0x7b44=function(){return _0x44cfcc;};return a103_0x7b44();}export function getRuntimeSkillCacheRoot(_0x523676,_0x596d78,_0x1cb686={}){const _0x5764c9=a103_0x4f51,_0x1b3121=resolveSkillSyncPaths(_0x1cb686);return resolve(_0x1b3121[_0x5764c9(0x1ec)],_0x523676,fingerprintAccessKey(_0x596d78),_0x5764c9(0x1ea));}export function getRuntimeSkillDir(_0x2292d4,_0x4ce534,_0x146ea3,_0x5aac7b,_0x562f9e,_0x5bc950={}){const _0x5561d2=a103_0x4f51;return resolve(getRuntimeSkillCacheRoot(_0x2292d4,_0x4ce534,_0x5bc950),safePathSegment(_0x146ea3,_0x5561d2(0x1da)),_0x5aac7b,safePathSegment(_0x562f9e,_0x5561d2(0x1f2)));}export function safePathSegment(_0x4360a,_0x2bf8f0=a103_0x40e50b(0x1e4)){const _0x9e4930=a103_0x40e50b;if(!_0x4360a||_0x4360a['includes']('/')||_0x4360a[_0x9e4930(0x1e8)]('\x5c')||_0x4360a['includes']('..'))throw CliErrors['validation']('Unsafe\x20'+_0x2bf8f0+_0x9e4930(0x1ef)+_0x4360a);return _0x4360a;}function trimmedEnv(_0x56d10a){const _0x5ec422=a103_0x40e50b,_0x2a4200=productEnv(_0x56d10a)?.[_0x5ec422(0x1e1)]();return _0x2a4200?_0x2a4200: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 a104_0x33ae(_0x55bf87,_0x39d723){_0x55bf87=_0x55bf87-0x13d;const _0x37ec93=a104_0x37ec();let _0x33aeee=_0x37ec93[_0x55bf87];return _0x33aeee;}(function(_0xbcd25f,_0x4b84fd){const _0x1af9c7=a104_0x33ae,_0x6eceb3=_0xbcd25f();while(!![]){try{const _0x21e9b0=parseInt(_0x1af9c7(0x13d))/0x1+-parseInt(_0x1af9c7(0x155))/0x2+-parseInt(_0x1af9c7(0x16b))/0x3+parseInt(_0x1af9c7(0x145))/0x4*(-parseInt(_0x1af9c7(0x142))/0x5)+parseInt(_0x1af9c7(0x169))/0x6*(parseInt(_0x1af9c7(0x16a))/0x7)+-parseInt(_0x1af9c7(0x15d))/0x8*(parseInt(_0x1af9c7(0x17e))/0x9)+parseInt(_0x1af9c7(0x159))/0xa*(parseInt(_0x1af9c7(0x14e))/0xb);if(_0x21e9b0===_0x4b84fd)break;else _0x6eceb3['push'](_0x6eceb3['shift']());}catch(_0x58e05f){_0x6eceb3['push'](_0x6eceb3['shift']());}}}(a104_0x37ec,0x5a453));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x42112b}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';function a104_0x37ec(){const _0x5786a5=['944830QwkGOY','company','slice','ignoreMetadataForPayload','10cOuEzV','version','files','tags','6744qZRDtK','Missing\x20','description','packageBase64','match','skillName','some','pushedAt','Unable\x20to\x20resolve\x20skillCode\x20from\x20','replace','find','string','2040414Gnxowf','7dYMcjm','1000092qJwoHL','number','isFile','appCode','metadata','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataSkillCode','dir','\x20has\x20unsupported\x20scope\x20\x22','boolean','personal','trim','isDirectory','skillCode','ignoreInvalidMetadata','targetScope','scope','Remote\x20Skill\x20','Skill\x20metadata\x20appCode\x20\x22','4302xLNsIg','515266PDCXoM','Skill\x20directory\x20not\x20found:\x20','length','allowAppCodeRetarget','filter','10muSSny','builtin','validation','1096924hdxlBm','utf8','(unknown)','content','name','path','manifest','refreshedAt','isArray','13987677vjNsyJ','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','\x20has\x20scope=\x22','ignoreMetadataScope','ignoreMetadataAppCodeMismatch','toLowerCase','sourceSessionId'];a104_0x37ec=function(){return _0x5786a5;};return a104_0x37ec();}export function resolvePushDirectoryIdentity(_0x13cced,_0x4db395,_0x5873bb={}){const _0x304e00=a104_0x33ae,_0x65345f=resolvePushDirectoryRoot(_0x13cced),_0x1f2146=readPushMetadataIfPresent(resolve(_0x65345f,METADATA_FILE),{'ignoreInvalidMetadata':_0x5873bb[_0x304e00(0x179)]});if(_0x1f2146?.['appCode']&&_0x1f2146[_0x304e00(0x16e)]!==_0x4db395&&!_0x5873bb[_0x304e00(0x140)]&&!_0x5873bb[_0x304e00(0x152)])throw CliErrors[_0x304e00(0x144)](_0x304e00(0x17d)+_0x1f2146['appCode']+_0x304e00(0x14f)+_0x4db395+'\x22.');const _0x390f3e=resolvePushSkillCode(_0x65345f,_0x4db395,_0x1f2146,_0x5873bb);if(!_0x390f3e)throw CliErrors[_0x304e00(0x144)](_0x304e00(0x165)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x65345f,'skillCode':_0x390f3e,'metadata':_0x1f2146};}export function readPushDirectory(_0x1b40b8,_0x28e51b,_0x1c888d={}){const _0x5883a5=a104_0x33ae,_0x517ff4=resolvePushDirectoryIdentity(_0x1b40b8,_0x28e51b,_0x1c888d),_0x3badb=_0x517ff4[_0x5883a5(0x172)],_0x5005e3=resolve(_0x3badb,SKILL_FILE);if(!existsSync(_0x5005e3)||!lstatSync(_0x5005e3)[_0x5883a5(0x16d)]())throw CliErrors[_0x5883a5(0x144)](_0x5883a5(0x15e)+SKILL_FILE+':\x20'+_0x5005e3);const _0x5915da=_0x517ff4[_0x5883a5(0x16f)],_0x383870=_0x1c888d[_0x5883a5(0x17a)]??'personal';if(!_0x1c888d['ignoreMetadataScope']&&_0x5915da?.[_0x5883a5(0x17b)]===_0x5883a5(0x143))throw CliErrors[_0x5883a5(0x144)](_0x5883a5(0x170)+METADATA_FILE+_0x5883a5(0x150)+_0x5915da[_0x5883a5(0x17b)]+'\x22.');if(!_0x1c888d[_0x5883a5(0x151)]&&_0x383870===_0x5883a5(0x175)&&_0x5915da?.[_0x5883a5(0x17b)]&&_0x5915da['scope']!=='personal')throw CliErrors[_0x5883a5(0x144)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x5883a5(0x150)+_0x5915da['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x3badb+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4cfc70=scanSkillDirectory(_0x3badb),_0x26c581=buildSkillPackage(_0x4cfc70),_0x5f0643=readFileSync(_0x5005e3,_0x5883a5(0x146)),_0x521213=_0x517ff4[_0x5883a5(0x178)],_0x5749b6=_0x1c888d[_0x5883a5(0x158)]?undefined:_0x5915da,_0x1b4a16=readSkillDisplayName(_0x5f0643);return{'skillCode':_0x521213,'metadata':_0x5915da,'frontmatterDisplayName':_0x1b4a16,'input':{'skillCode':_0x521213,'skillName':_0x1b4a16??_0x5749b6?.[_0x5883a5(0x162)],'description':_0x5749b6?.[_0x5883a5(0x15f)],'content':_0x5f0643,'files':_0x26c581[_0x5883a5(0x14b)],'packageBase64':_0x26c581[_0x5883a5(0x160)],'tags':_0x5749b6?.[_0x5883a5(0x15c)],'version':_0x5749b6?.[_0x5883a5(0x15a)],'sourceSessionId':_0x5749b6?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x50cb63,_0x3624fe,_0x127b83,_0x3dd8fd={}){const _0x4397d7=a104_0x33ae,_0x5b7a00=resolvePushDirectoryRoot(_0x50cb63),_0x371bf2=readPushMetadataIfPresent(resolve(_0x5b7a00,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2be370=requireRemoteScope(_0x3624fe),_0x1c9be3=readLocalSkillContent(_0x5b7a00),_0x105659={..._0x3624fe,'appCode':_0x3624fe[_0x4397d7(0x16e)]??_0x127b83,'skillName':_0x3624fe[_0x4397d7(0x162)]??_0x371bf2?.['skillName'],'description':_0x3624fe[_0x4397d7(0x15f)]??_0x371bf2?.['description'],'tags':Array[_0x4397d7(0x14d)](_0x3624fe[_0x4397d7(0x15c)])?_0x3624fe['tags']:_0x371bf2?.[_0x4397d7(0x15c)],'sourceSessionId':_0x3624fe[_0x4397d7(0x154)]??_0x371bf2?.[_0x4397d7(0x154)],'content':_0x3624fe[_0x4397d7(0x148)]??_0x1c9be3},_0x4a83c5=buildMetadata(_0x105659,_0x2be370,_0x127b83,contentHash(_0x1c9be3),_0x3dd8fd[_0x4397d7(0x14c)]);writeJsonAtomic(resolve(_0x5b7a00,METADATA_FILE),_0x4a83c5);}export function recordPushedRuntimeSkill(_0x39ddbc,_0x415f09,_0x3a7a09,_0x28c1da={}){const _0x48c476=a104_0x33ae,_0x57ef25=resolvePushDirectoryRoot(_0x39ddbc),_0x369f66=scanSkillDirectory(_0x57ef25),_0x51e98a=_0x369f66[_0x48c476(0x167)](_0x4159ab=>_0x4159ab[_0x48c476(0x14a)]===SKILL_FILE),_0x47a5b9=_0x51e98a?fileText(_0x51e98a):'',_0xa8741f=tryNormalizePackageManifest(_0x415f09[_0x48c476(0x15b)]),_0x1878cd={..._0x415f09,'content':_0x415f09[_0x48c476(0x148)]??_0x47a5b9,'files':_0xa8741f},_0x36be1f=_0xa8741f?normalizeLocalFiles(_0x369f66)[_0x48c476(0x141)](_0x504948=>_0xa8741f[_0x48c476(0x15b)][_0x48c476(0x163)](_0x38937a=>_0x38937a[_0x48c476(0x14a)]===_0x504948[_0x48c476(0x14a)])):undefined,_0x22cb08=buildMetadata(_0x1878cd,_0x28c1da[_0x48c476(0x17b)]??_0x48c476(0x175),_0x3a7a09,contentHash(_0x1878cd[_0x48c476(0x148)]??''),_0x28c1da[_0x48c476(0x164)],_0x36be1f);writeJsonAtomic(resolve(_0x57ef25,METADATA_FILE),_0x22cb08);}export function deriveSkillCodeFromDirectory(_0x46bb9d,_0x1ac831){const _0x146e03=a104_0x33ae,_0x4583b1=basename(resolve(_0x46bb9d)),_0x5d161a=_0x1ac831+'--';return _0x4583b1['startsWith'](_0x5d161a)?_0x4583b1[_0x146e03(0x157)](_0x5d161a[_0x146e03(0x13f)]):_0x4583b1;}function resolvePushSkillCode(_0x785192,_0x161a4a,_0x5a9926,_0x3a7aeb){const _0x109e4a=a104_0x33ae,_0x40b9bc=deriveSkillCodeFromSkillFile(_0x785192)||deriveSkillCodeFromDirectory(_0x785192,_0x161a4a);if(_0x3a7aeb[_0x109e4a(0x171)])return _0x40b9bc;return _0x5a9926?.[_0x109e4a(0x178)]?.[_0x109e4a(0x176)]()||_0x40b9bc;}function deriveSkillCodeFromSkillFile(_0x4df161){const _0x283f3c=a104_0x33ae,_0xb74b2d=resolve(_0x4df161,SKILL_FILE);if(!existsSync(_0xb74b2d)||!lstatSync(_0xb74b2d)['isFile']())return undefined;const _0x5434a7=readFileSync(_0xb74b2d,_0x283f3c(0x146)),_0x40b3e8=_0x5434a7['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x40b3e8)return undefined;const _0x1189bc=parseFrontmatterObject(_0x40b3e8[0x1]??''),_0xee7ecb=scalarToString(_0x1189bc?.[_0x283f3c(0x149)]);return _0xee7ecb?slugifySkillName(_0xee7ecb):undefined;}function readSkillDisplayName(_0x4bd0a9){const _0x1cb842=a104_0x33ae,_0x540e59=_0x4bd0a9[_0x1cb842(0x161)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x540e59)return undefined;const _0x521e13=parseFrontmatterObject(_0x540e59[0x1]??'');return scalarToString(_0x521e13?.['displayName']);}function slugifySkillName(_0x5bfcb5){const _0x53a679=a104_0x33ae,_0x199356=_0x5bfcb5[_0x53a679(0x176)]()[_0x53a679(0x153)]()[_0x53a679(0x166)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x53a679(0x166)](/^-+/,'')[_0x53a679(0x166)](/-+$/,'')[_0x53a679(0x166)](/-{2,}/g,'-');if(!_0x199356)throw CliErrors['validation']('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x199356;}function parseFrontmatterObject(_0x5dceb8){const _0x5c9bfe=a104_0x33ae;try{const _0x23eb55=a104_0x42112b(_0x5dceb8);return _0x23eb55&&typeof _0x23eb55==='object'&&!Array[_0x5c9bfe(0x14d)](_0x23eb55)?_0x23eb55:undefined;}catch{return undefined;}}function scalarToString(_0x31ad52){const _0x4a8855=a104_0x33ae;if(typeof _0x31ad52===_0x4a8855(0x168))return _0x31ad52[_0x4a8855(0x176)]();if(typeof _0x31ad52===_0x4a8855(0x16c)||typeof _0x31ad52===_0x4a8855(0x174))return String(_0x31ad52);return undefined;}function resolvePushDirectoryRoot(_0x14c388){const _0x211da8=a104_0x33ae,_0x531529=resolve(_0x14c388);if(!existsSync(_0x531529))throw CliErrors[_0x211da8(0x144)](_0x211da8(0x13e)+_0x14c388);const _0x4d0ab6=lstatSync(_0x531529);if(_0x4d0ab6[_0x211da8(0x177)]())return _0x531529;if(_0x4d0ab6['isSymbolicLink']()){const _0x3467e2=realpathSync(_0x531529);if(lstatSync(_0x3467e2)[_0x211da8(0x177)]())return _0x3467e2;}throw CliErrors[_0x211da8(0x144)]('Skill\x20directory\x20not\x20found:\x20'+_0x14c388);}function requireRemoteScope(_0x17b150){const _0x10071=a104_0x33ae;if(_0x17b150[_0x10071(0x17b)]==='personal'||_0x17b150[_0x10071(0x17b)]===_0x10071(0x156)||_0x17b150[_0x10071(0x17b)]==='builtin')return _0x17b150[_0x10071(0x17b)];throw CliErrors[_0x10071(0x144)](_0x10071(0x17c)+(_0x17b150[_0x10071(0x178)]||_0x10071(0x147))+_0x10071(0x173)+(_0x17b150[_0x10071(0x17b)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x1f547c){const _0x3134a0=a104_0x33ae,_0x558751=resolve(_0x1f547c,SKILL_FILE);return existsSync(_0x558751)&&lstatSync(_0x558751)[_0x3134a0(0x16d)]()?readFileSync(_0x558751,'utf8'):'';}function readPushMetadataIfPresent(_0x2bf9eb,_0xb8d022={}){const _0x174c21=a104_0x33ae;try{return readMetadataIfPresent(_0x2bf9eb);}catch(_0x53517e){if(_0xb8d022[_0x174c21(0x179)])return undefined;throw _0x53517e;}}
@@ -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(_0x24c5f6,_0x2423b6){const _0x317a6a=a105_0x282b,_0x1e57aa=_0x24c5f6();while(!![]){try{const _0x1a06f0=-parseInt(_0x317a6a(0xd4))/0x1+-parseInt(_0x317a6a(0xde))/0x2*(parseInt(_0x317a6a(0xd7))/0x3)+parseInt(_0x317a6a(0xd5))/0x4*(-parseInt(_0x317a6a(0xd6))/0x5)+parseInt(_0x317a6a(0xd3))/0x6+parseInt(_0x317a6a(0xdb))/0x7*(-parseInt(_0x317a6a(0xdf))/0x8)+parseInt(_0x317a6a(0xd2))/0x9+parseInt(_0x317a6a(0xdc))/0xa*(parseInt(_0x317a6a(0xd8))/0xb);if(_0x1a06f0===_0x2423b6)break;else _0x1e57aa['push'](_0x1e57aa['shift']());}catch(_0x22162f){_0x1e57aa['push'](_0x1e57aa['shift']());}}}(a105_0x2984,0xe99ad));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3d29f1){const _0x505dee=a105_0x282b,_0x2897a5=_0x3d29f1&&_0x3d29f1[_0x505dee(0xd0)]>0x0?_0x3d29f1:[_0x505dee(0xe0),_0x505dee(0xcf),_0x505dee(0xda)],_0x4b5941=[];for(const _0x216107 of _0x2897a5){if(!isRuntimeSkillScope(_0x216107))throw CliErrors[_0x505dee(0xce)](_0x505dee(0xd1)+_0x216107);!_0x4b5941[_0x505dee(0xdd)](_0x216107)&&_0x4b5941[_0x505dee(0xd9)](_0x216107);}return _0x4b5941;}function a105_0x2984(){const _0x21d4c2=['validation','company','length','Unsupported\x20runtime\x20Skill\x20scope:\x20','764982tQPsyf','8162874kxzqLz','644484qNTNYR','4eOiUky','8255965JGtxDA','3uKaRcX','7918075JgOyZS','push','builtin','49TKAaqK','70awQIuk','includes','3463414ECrCnP','1714312rFIlnv','personal'];a105_0x2984=function(){return _0x21d4c2;};return a105_0x2984();}function a105_0x282b(_0x5a9145,_0x31667b){_0x5a9145=_0x5a9145-0xce;const _0x2984ae=a105_0x2984();let _0x282b72=_0x2984ae[_0x5a9145];return _0x282b72;}export function isRuntimeSkillScope(_0x1c3ce4){const _0x37956a=a105_0x282b;return _0x1c3ce4===_0x37956a(0xe0)||_0x1c3ce4===_0x37956a(0xcf)||_0x1c3ce4==='builtin';}
@@ -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 a107_0x5cc2a9=a107_0x5cc3;function a107_0x1e76(){const _0x376f8d=['Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','12509UjqKNO','code','validation','1038SMGFXB','endsWith','3ZkuhIm','sort','path','map','validation_error','6433415zJPVAu','897672rCcIRa','1980-01-01T00:00:00.000Z','63oZDBUP','name','5800720LaJdbs','1312406gwgTMA','from','826401vmNOdW','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','25499430zuGqHr'];a107_0x1e76=function(){return _0x376f8d;};return a107_0x1e76();}(function(_0x1fcab5,_0x513b75){const _0x3f4f42=a107_0x5cc3,_0xbcc64d=_0x1fcab5();while(!![]){try{const _0x565a60=-parseInt(_0x3f4f42(0x17d))/0x1+-parseInt(_0x3f4f42(0x17b))/0x2*(-parseInt(_0x3f4f42(0x170))/0x3)+-parseInt(_0x3f4f42(0x17a))/0x4+-parseInt(_0x3f4f42(0x175))/0x5+parseInt(_0x3f4f42(0x16e))/0x6*(parseInt(_0x3f4f42(0x181))/0x7)+parseInt(_0x3f4f42(0x176))/0x8*(parseInt(_0x3f4f42(0x178))/0x9)+parseInt(_0x3f4f42(0x17f))/0xa;if(_0x565a60===_0x513b75)break;else _0xbcc64d['push'](_0xbcc64d['shift']());}catch(_0x1fda0d){_0xbcc64d['push'](_0xbcc64d['shift']());}}}(a107_0x1e76,0xb40d8));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a107_0x5cc3(_0x37e549,_0x3640f8){_0x37e549=_0x37e549-0x16d;const _0x1e7624=a107_0x1e76();let _0x5cc366=_0x1e7624[_0x37e549];return _0x5cc366;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x5cc2a9(0x177));export function createDeterministicZipPackage(_0x7e7527){const _0x4729df=a107_0x5cc2a9,_0x22986a={};for(const _0x28d2e9 of normalizeLocalFiles(_0x7e7527)){_0x22986a[_0x28d2e9[_0x4729df(0x172)]]=fileContent(_0x28d2e9);}return Buffer[_0x4729df(0x17c)](zipSync(_0x22986a,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4c3ebd){const _0xc37f8d=a107_0x5cc2a9;if(_0x4c3ebd['length']<0x16)throw CliErrors[_0xc37f8d(0x16d)](_0xc37f8d(0x17e));let _0x1bd369;try{_0x1bd369=unzipSync(_0x4c3ebd,{'filter'(_0x39ff0b){const _0x58ede8=_0xc37f8d,_0x160978=normalizeSkillRelativePath(_0x39ff0b[_0x58ede8(0x179)]);if(_0x160978[_0x58ede8(0x16f)]('/'))throw CliErrors[_0x58ede8(0x16d)](_0x58ede8(0x180)+_0x160978);return!![];}});}catch(_0x16469e){if(isRuntimeSkillValidationError(_0x16469e))throw _0x16469e;throw CliErrors['validation'](_0xc37f8d(0x17e));}return Object['entries'](_0x1bd369)[_0xc37f8d(0x173)](([_0x2203b0,_0x1792c4])=>({'path':normalizeSkillRelativePath(_0x2203b0),'bytes':Buffer[_0xc37f8d(0x17c)](_0x1792c4)}))[_0xc37f8d(0x171)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x441728){const _0x5880f0=a107_0x5cc2a9;return typeof _0x441728==='object'&&_0x441728!==null&&_0x5880f0(0x182)in _0x441728&&_0x441728[_0x5880f0(0x182)]===_0x5880f0(0x174);}