@lovrabet/lovrabet-cli 2.1.9-beta.1 → 2.1.9-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
- const a92_0x5dcb80=a92_0x1bf4;(function(_0x203637,_0x337f3a){const _0x549bd7=a92_0x1bf4,_0x55c08a=_0x203637();while(!![]){try{const _0xe48755=-parseInt(_0x549bd7(0x184))/0x1+-parseInt(_0x549bd7(0x187))/0x2+parseInt(_0x549bd7(0x181))/0x3*(-parseInt(_0x549bd7(0x182))/0x4)+parseInt(_0x549bd7(0x17f))/0x5+-parseInt(_0x549bd7(0x188))/0x6*(-parseInt(_0x549bd7(0x183))/0x7)+-parseInt(_0x549bd7(0x18a))/0x8+-parseInt(_0x549bd7(0x189))/0x9*(-parseInt(_0x549bd7(0x185))/0xa);if(_0xe48755===_0x337f3a)break;else _0x55c08a['push'](_0x55c08a['shift']());}catch(_0x192b06){_0x55c08a['push'](_0x55c08a['shift']());}}}(a92_0x1d63,0x1a99c));function a92_0x1d63(){const _0x3aaf76=['10254UTwezI','226242Vepdqs','780520eNgbGw','f0b64e6','21265nusnVU','2026-07-08T08:15:27.965Z','1257YylQeu','364zKcATq','14sLZPoF','93680EWKAeX','180XunWde','v2.1.9-beta.1','243650jhmAaN'];a92_0x1d63=function(){return _0x3aaf76;};return a92_0x1d63();}export const VERSION='2.1.9-beta.1';export const GIT_TAG=a92_0x5dcb80(0x186);function a92_0x1bf4(_0x1429f7,_0x269809){_0x1429f7=_0x1429f7-0x17e;const _0x1d63ae=a92_0x1d63();let _0x1bf41d=_0x1d63ae[_0x1429f7];return _0x1bf41d;}export const GIT_COMMIT=a92_0x5dcb80(0x17e);export const BUILD_TIME=a92_0x5dcb80(0x180);
1
+ const a92_0x51dbf0=a92_0x1783;function a92_0x3be4(){const _0x27f7df=['2VHjFfJ','70awVAIE','12843qyQtvm','2026-07-08T08:37:40.551Z','952065hloLRq','v2.1.9-beta.2','479568pkaWOy','7vQOALR','289068PpBxxH','32URJDUA','232420XpjVYf','2.1.9-beta.2','370a45a','352432HcvfwY','679855hehTlP'];a92_0x3be4=function(){return _0x27f7df;};return a92_0x3be4();}function a92_0x1783(_0x1e6bc5,_0x163835){_0x1e6bc5=_0x1e6bc5-0x100;const _0x3be47d=a92_0x3be4();let _0x178396=_0x3be47d[_0x1e6bc5];return _0x178396;}(function(_0x23877b,_0x717714){const _0x3e17af=a92_0x1783,_0x45241e=_0x23877b();while(!![]){try{const _0x411bc1=parseInt(_0x3e17af(0x10a))/0x1+parseInt(_0x3e17af(0x108))/0x2*(parseInt(_0x3e17af(0x101))/0x3)+parseInt(_0x3e17af(0x102))/0x4*(-parseInt(_0x3e17af(0x103))/0x5)+parseInt(_0x3e17af(0x10e))/0x6+parseInt(_0x3e17af(0x100))/0x7*(parseInt(_0x3e17af(0x106))/0x8)+-parseInt(_0x3e17af(0x10c))/0x9+parseInt(_0x3e17af(0x109))/0xa*(parseInt(_0x3e17af(0x107))/0xb);if(_0x411bc1===_0x717714)break;else _0x45241e['push'](_0x45241e['shift']());}catch(_0x57d3cf){_0x45241e['push'](_0x45241e['shift']());}}}(a92_0x3be4,0x2deff));export const VERSION=a92_0x51dbf0(0x104);export const GIT_TAG=a92_0x51dbf0(0x10d);export const GIT_COMMIT=a92_0x51dbf0(0x105);export const BUILD_TIME=a92_0x51dbf0(0x10b);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a93_0x5201(_0x1e583d,_0x3b6a7a){_0x1e583d=_0x1e583d-0x108;const _0x1adc8c=a93_0x1adc();let _0x52015f=_0x1adc8c[_0x1e583d];return _0x52015f;}(function(_0x14ac02,_0x43314f){const _0x2107e3=a93_0x5201,_0x4cb0cf=_0x14ac02();while(!![]){try{const _0x13bb14=parseInt(_0x2107e3(0x111))/0x1*(parseInt(_0x2107e3(0x10d))/0x2)+parseInt(_0x2107e3(0x116))/0x3+-parseInt(_0x2107e3(0x10b))/0x4*(parseInt(_0x2107e3(0x114))/0x5)+-parseInt(_0x2107e3(0x110))/0x6*(parseInt(_0x2107e3(0x115))/0x7)+-parseInt(_0x2107e3(0x109))/0x8+parseInt(_0x2107e3(0x108))/0x9+-parseInt(_0x2107e3(0x10f))/0xa*(-parseInt(_0x2107e3(0x112))/0xb);if(_0x13bb14===_0x43314f)break;else _0x4cb0cf['push'](_0x4cb0cf['shift']());}catch(_0x49f58b){_0x4cb0cf['push'](_0x4cb0cf['shift']());}}}(a93_0x1adc,0x90738));import{jsx as a93_0x108c9d,jsxs as a93_0x3720fa}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x1adc(){const _0x2da253=['32UZEvxL','286BuQsWj','\x20to\x20view\x20available\x20commands.','1268560dSwmCc','217yuIGWo','1208367IadosF','7633746SNYYwk','5049264eiWMmv','column','12ujCnMr','green','11576EMGvXm','\x20\x20Use\x20','400650TslgDr','95598MGrawr'];a93_0x1adc=function(){return _0x2da253;};return a93_0x1adc();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x2a6b73=a93_0x5201,{exit:_0x2a6101}=useApp();return useEffect(()=>{_0x2a6101();},[_0x2a6101]),a93_0x3720fa(Box,{'flexDirection':_0x2a6b73(0x10a),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x108c9d(Box,{'children':a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x3720fa(Box,{'marginTop':0x1,'children':[a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x10e)}),a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':CLI_BIN_NAME+'\x20--help'}),a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x113)})]})]});}
1
+ (function(_0x24ee6e,_0x371999){const _0x5dcad4=a93_0x4b76,_0x3c5a3c=_0x24ee6e();while(!![]){try{const _0xce818c=-parseInt(_0x5dcad4(0x18c))/0x1+-parseInt(_0x5dcad4(0x18a))/0x2+-parseInt(_0x5dcad4(0x180))/0x3*(-parseInt(_0x5dcad4(0x185))/0x4)+-parseInt(_0x5dcad4(0x188))/0x5*(parseInt(_0x5dcad4(0x17f))/0x6)+-parseInt(_0x5dcad4(0x187))/0x7+-parseInt(_0x5dcad4(0x189))/0x8+-parseInt(_0x5dcad4(0x182))/0x9*(-parseInt(_0x5dcad4(0x183))/0xa);if(_0xce818c===_0x371999)break;else _0x3c5a3c['push'](_0x3c5a3c['shift']());}catch(_0x3738e0){_0x3c5a3c['push'](_0x3c5a3c['shift']());}}}(a93_0x50b9,0xaaf31));import{jsx as a93_0x413fac,jsxs as a93_0x33d83a}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x4b76(_0x253cea,_0x2c803a){_0x253cea=_0x253cea-0x17f;const _0x50b98c=a93_0x50b9();let _0x4b76c0=_0x50b98c[_0x253cea];return _0x4b76c0;}function a93_0x50b9(){const _0xace8b0=['4056148IRSejw','column','7059451WCseUY','10rnUzps','8246440HDTyLo','1410386igPzKK','\x20--help','260401zkCShf','677874QVKPAy','3CPxTML','green','26253198CIZWSq','10WIiHla','\x20\x20Use\x20'];a93_0x50b9=function(){return _0xace8b0;};return a93_0x50b9();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x51c281=a93_0x4b76,{exit:_0x39e9c3}=useApp();return useEffect(()=>{_0x39e9c3();},[_0x39e9c3]),a93_0x33d83a(Box,{'flexDirection':_0x51c281(0x186),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x413fac(Box,{'children':a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x33d83a(Box,{'marginTop':0x1,'children':[a93_0x413fac(Text,{'dimColor':!![],'children':_0x51c281(0x184)}),a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':CLI_BIN_NAME+_0x51c281(0x18b)}),a93_0x413fac(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
@@ -1 +1 @@
1
- const a94_0x35c427=a94_0x179a;(function(_0x37c532,_0x23f92b){const _0xc3895=a94_0x179a,_0x5cee84=_0x37c532();while(!![]){try{const _0x528cbd=parseInt(_0xc3895(0xcb))/0x1*(parseInt(_0xc3895(0xd6))/0x2)+-parseInt(_0xc3895(0xcf))/0x3+parseInt(_0xc3895(0xd0))/0x4+parseInt(_0xc3895(0xca))/0x5+-parseInt(_0xc3895(0xdc))/0x6*(parseInt(_0xc3895(0xd2))/0x7)+-parseInt(_0xc3895(0xce))/0x8+parseInt(_0xc3895(0xd4))/0x9*(-parseInt(_0xc3895(0xd9))/0xa);if(_0x528cbd===_0x23f92b)break;else _0x5cee84['push'](_0x5cee84['shift']());}catch(_0x140ef7){_0x5cee84['push'](_0x5cee84['shift']());}}}(a94_0x4a75,0x35ee6));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x58c1bb}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x179a(_0xd0a859,_0x334c22){_0xd0a859=_0xd0a859-0xca;const _0x4a7522=a94_0x4a75();let _0x179abc=_0x4a7522[_0xd0a859];return _0x179abc;}function a94_0x4a75(){const _0x155791=['2TGYvgA','trim','stdout','1092760RrWGlN','302106iLwpOU','1698744ucOfpC','stdio','239218oyHoSc','skipNpxSkillsEnvSuffix','9OWgmNe','stderr','67908vsyIcJ','log','add','1342990eFfMqK','toString','status','36dEGRBX','inherit','1524740GpBdga'];a94_0x4a75=function(){return _0x155791;};return a94_0x4a75();}export const LOVRABET_SKILL_SOURCE=a94_0x58c1bb;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x35c427(0xd3)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x409e69,_0x2dd140=LOVRABET_SKILL_SOURCE,_0x380d1c){const _0x2ea2dc=a94_0x35c427;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x36defb=_0x380d1c?.[_0x2ea2dc(0xd1)]??_0x2ea2dc(0xdd),_0x5b5053=resolveNpmBin('npx'),_0x58dd25=['skills',_0x2ea2dc(0xd8),_0x2dd140,'-g','-y'],_0x20bb9e=[_0x5b5053,..._0x58dd25]['join']('\x20');console[_0x2ea2dc(0xd7)]('*\x20'+_0x20bb9e);const _0x3bf2d2=spawnSync(_0x5b5053,_0x58dd25,{'cwd':_0x409e69,'stdio':_0x36defb,'env':process.env,'shell':![]});if(_0x3bf2d2['status']===0x0)return{'ok':!![],'status':0x0};let _0x46eedb='exit\x20'+(_0x3bf2d2['status']??'unknown');if(_0x36defb==='pipe'){const _0x4cc064=_0x3bf2d2[_0x2ea2dc(0xd5)]?_0x3bf2d2[_0x2ea2dc(0xd5)][_0x2ea2dc(0xda)]()[_0x2ea2dc(0xcc)]():'',_0x5f2125=_0x3bf2d2['stdout']?_0x3bf2d2[_0x2ea2dc(0xcd)][_0x2ea2dc(0xda)]()['trim']():'';if(_0x4cc064)_0x46eedb=_0x4cc064;else{if(_0x5f2125)_0x46eedb=_0x5f2125;}}return{'ok':![],'status':_0x3bf2d2[_0x2ea2dc(0xdb)]??null,'error':_0x46eedb};}
1
+ const a94_0x569b3b=a94_0x2abf;(function(_0x53c16a,_0x1bae33){const _0x99ee15=a94_0x2abf,_0x16b17d=_0x53c16a();while(!![]){try{const _0x5eb8c9=-parseInt(_0x99ee15(0x155))/0x1+-parseInt(_0x99ee15(0x151))/0x2+parseInt(_0x99ee15(0x154))/0x3+parseInt(_0x99ee15(0x141))/0x4*(parseInt(_0x99ee15(0x142))/0x5)+-parseInt(_0x99ee15(0x157))/0x6*(parseInt(_0x99ee15(0x14f))/0x7)+parseInt(_0x99ee15(0x152))/0x8*(parseInt(_0x99ee15(0x15a))/0x9)+-parseInt(_0x99ee15(0x145))/0xa*(-parseInt(_0x99ee15(0x158))/0xb);if(_0x5eb8c9===_0x1bae33)break;else _0x16b17d['push'](_0x16b17d['shift']());}catch(_0x4d3750){_0x16b17d['push'](_0x16b17d['shift']());}}}(a94_0x5c64,0x6630d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x47d02c}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x47d02c;function a94_0x2abf(_0xa14ed3,_0x4491e6){_0xa14ed3=_0xa14ed3-0x141;const _0x5c6483=a94_0x5c64();let _0x2abf07=_0x5c6483[_0xa14ed3];return _0x2abf07;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x569b3b(0x143)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x5c64(){const _0x4fc78c=['status','136380skiOGx','npx','add','stdio','trim','exit\x20','stdout','toString','stderr','skills','28QrfpCV','log','538166pTmfwO','64kwnRvs','inherit','2098551ANXoMg','579863BpnNgu','join','322386zRUCvZ','22KNoqiM','pipe','203157JBijMF','56104CsilsF','205McGROJ','skipNpxSkillsEnvSuffix'];a94_0x5c64=function(){return _0x4fc78c;};return a94_0x5c64();}export function runNpxSkillsAddGlobal(_0x24a924,_0x2ff690=LOVRABET_SKILL_SOURCE,_0x3fa8f7){const _0x17f5ca=a94_0x569b3b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e86b9=_0x3fa8f7?.[_0x17f5ca(0x148)]??_0x17f5ca(0x153),_0x120ea5=resolveNpmBin(_0x17f5ca(0x146)),_0x30d485=[_0x17f5ca(0x14e),_0x17f5ca(0x147),_0x2ff690,'-g','-y'],_0x3b50c5=[_0x120ea5,..._0x30d485][_0x17f5ca(0x156)]('\x20');console[_0x17f5ca(0x150)]('*\x20'+_0x3b50c5);const _0x2f7227=spawnSync(_0x120ea5,_0x30d485,{'cwd':_0x24a924,'stdio':_0x5e86b9,'env':process.env,'shell':![]});if(_0x2f7227[_0x17f5ca(0x144)]===0x0)return{'ok':!![],'status':0x0};let _0x3a8479=_0x17f5ca(0x14a)+(_0x2f7227[_0x17f5ca(0x144)]??'unknown');if(_0x5e86b9===_0x17f5ca(0x159)){const _0x4a1af4=_0x2f7227[_0x17f5ca(0x14d)]?_0x2f7227['stderr']['toString']()[_0x17f5ca(0x149)]():'',_0x5f4b79=_0x2f7227[_0x17f5ca(0x14b)]?_0x2f7227[_0x17f5ca(0x14b)][_0x17f5ca(0x14c)]()['trim']():'';if(_0x4a1af4)_0x3a8479=_0x4a1af4;else{if(_0x5f4b79)_0x3a8479=_0x5f4b79;}}return{'ok':![],'status':_0x2f7227[_0x17f5ca(0x144)]??null,'error':_0x3a8479};}
@@ -1 +1 @@
1
- function a95_0x6e30(_0x2c184e,_0x2e2088){_0x2c184e=_0x2c184e-0x76;const _0x217f8b=a95_0x217f();let _0x6e30af=_0x217f8b[_0x2c184e];return _0x6e30af;}const a95_0x24dc43=a95_0x6e30;(function(_0x36f9fb,_0x19d0ee){const _0x837d23=a95_0x6e30,_0x4213dd=_0x36f9fb();while(!![]){try{const _0x4479b0=parseInt(_0x837d23(0x89))/0x1+-parseInt(_0x837d23(0x76))/0x2*(parseInt(_0x837d23(0x7a))/0x3)+-parseInt(_0x837d23(0x7f))/0x4*(-parseInt(_0x837d23(0x7c))/0x5)+parseInt(_0x837d23(0x87))/0x6+-parseInt(_0x837d23(0x84))/0x7+parseInt(_0x837d23(0x7e))/0x8+-parseInt(_0x837d23(0x79))/0x9*(parseInt(_0x837d23(0x83))/0xa);if(_0x4479b0===_0x19d0ee)break;else _0x4213dd['push'](_0x4213dd['shift']());}catch(_0x310389){_0x4213dd['push'](_0x4213dd['shift']());}}}(a95_0x217f,0xc1c38));export const METADATA_FILE=a95_0x24dc43(0x81);export const SKILL_FILE=a95_0x24dc43(0x7d);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x24dc43(0x82)]);export const IGNORED_DIR_NAMES=new Set([a95_0x24dc43(0x88),a95_0x24dc43(0x86),a95_0x24dc43(0x8a),a95_0x24dc43(0x85),a95_0x24dc43(0x78),a95_0x24dc43(0x80),'build',a95_0x24dc43(0x7b),a95_0x24dc43(0x8b),a95_0x24dc43(0x77)]);function a95_0x217f(){const _0x18ab9c=['94TMwjsc','.cache','.next','4153356UNRjfa','67137owOSZg','coverage','15kZNbmQ','SKILL.md','5314696fcVrpx','1873340RcJlPr','dist','lovrabet.skill.json','.DS_Store','10Uwkozk','10702048AOyWFj','node_modules','.hg','4997898myYrqJ','.git','933492nupnfM','.svn','.turbo'];a95_0x217f=function(){return _0x18ab9c;};return a95_0x217f();}
1
+ function a95_0x2d43(){const _0x57fa0d=['.hg','88OrgfJc','build','coverage','.next','7827183RgBHqW','10jdUkmp','10060xeNxac','dist','8ACwxxj','6mkGHZP','node_modules','SKILL.md','.git','76993EcUZIN','.cache','8481ngyAfh','.svn','660624lpXjtH','1178436hLxzei','.DS_Store','.turbo','5946672yxQmfF','lovrabet.skill.json','13422vzMHmU'];a95_0x2d43=function(){return _0x57fa0d;};return a95_0x2d43();}const a95_0x212497=a95_0x2bdd;(function(_0x4170a9,_0x8788e4){const _0x475a94=a95_0x2bdd,_0x11fb38=_0x4170a9();while(!![]){try{const _0x5f3054=-parseInt(_0x475a94(0x90))/0x1*(-parseInt(_0x475a94(0x85))/0x2)+-parseInt(_0x475a94(0x7f))/0x3*(parseInt(_0x475a94(0x8f))/0x4)+parseInt(_0x475a94(0x8c))/0x5*(parseInt(_0x475a94(0x80))/0x6)+-parseInt(_0x475a94(0x7b))/0x7*(parseInt(_0x475a94(0x87))/0x8)+parseInt(_0x475a94(0x8b))/0x9+parseInt(_0x475a94(0x8d))/0xa*(-parseInt(_0x475a94(0x7d))/0xb)+parseInt(_0x475a94(0x83))/0xc;if(_0x5f3054===_0x8788e4)break;else _0x11fb38['push'](_0x11fb38['shift']());}catch(_0x521b1d){_0x11fb38['push'](_0x11fb38['shift']());}}}(a95_0x2d43,0x709ea));function a95_0x2bdd(_0x4dd300,_0x5e3766){_0x4dd300=_0x4dd300-0x7a;const _0x2d4300=a95_0x2d43();let _0x2bdd6a=_0x2d4300[_0x4dd300];return _0x2bdd6a;}export const METADATA_FILE=a95_0x212497(0x84);export const SKILL_FILE=a95_0x212497(0x92);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x212497(0x81)]);export const IGNORED_DIR_NAMES=new Set([a95_0x212497(0x7a),a95_0x212497(0x86),a95_0x212497(0x7e),a95_0x212497(0x91),a95_0x212497(0x8a),a95_0x212497(0x8e),a95_0x212497(0x88),a95_0x212497(0x89),a95_0x212497(0x82),a95_0x212497(0x7c)]);
@@ -1 +1 @@
1
- (function(_0xecea20,_0x5dba62){const _0x5e6a39=a96_0x834f,_0x4ef8cf=_0xecea20();while(!![]){try{const _0x4e7ac4=parseInt(_0x5e6a39(0x189))/0x1*(-parseInt(_0x5e6a39(0x17a))/0x2)+-parseInt(_0x5e6a39(0x188))/0x3+parseInt(_0x5e6a39(0x174))/0x4*(-parseInt(_0x5e6a39(0x177))/0x5)+-parseInt(_0x5e6a39(0x178))/0x6+parseInt(_0x5e6a39(0x180))/0x7*(parseInt(_0x5e6a39(0x175))/0x8)+-parseInt(_0x5e6a39(0x185))/0x9*(parseInt(_0x5e6a39(0x17d))/0xa)+parseInt(_0x5e6a39(0x17f))/0xb*(parseInt(_0x5e6a39(0x17e))/0xc);if(_0x4e7ac4===_0x5dba62)break;else _0x4ef8cf['push'](_0x4ef8cf['shift']());}catch(_0x39b8d6){_0x4ef8cf['push'](_0x4ef8cf['shift']());}}}(a96_0xffe8,0xd8441));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(_0x1e339c,_0x4b6097){const _0x5f568c=a96_0x834f,_0x425994=normalizeSkillRelativePath(_0x4b6097),_0x41b3f3=realOrResolved(_0x1e339c),_0x240415=resolve(_0x41b3f3,..._0x425994['split']('/'));if(!isPathInside(_0x240415,_0x41b3f3))throw CliErrors[_0x5f568c(0x17b)](_0x5f568c(0x184)+_0x4b6097);return ensureNoSymlinkInManagedPath(_0x41b3f3,_0x425994),_0x240415;}export function ensureNoSymlinkInManagedPath(_0x48ba5f,_0xc8a49){const _0x5cacb0=a96_0x834f;let _0x44e0f7=_0x48ba5f;for(const _0x126f2c of _0xc8a49[_0x5cacb0(0x183)]('/')){_0x44e0f7=resolve(_0x44e0f7,_0x126f2c);const _0x3f6a48=lstatIfPresent(_0x44e0f7);if(_0x3f6a48?.['isSymbolicLink']())throw CliErrors[_0x5cacb0(0x17b)](_0x5cacb0(0x186)+_0xc8a49);}}function a96_0x834f(_0x19d76b,_0x5d5e69){_0x19d76b=_0x19d76b-0x174;const _0xffe8f7=a96_0xffe8();let _0x834fe7=_0xffe8f7[_0x19d76b];return _0x834fe7;}export function isDanglingSymlink(_0x2a781f){const _0x31e111=a96_0x834f;try{return lstatSync(_0x2a781f)[_0x31e111(0x17c)]();}catch{return![];}}export function resolveSymlinkTarget(_0x20b1d4){const _0xd6ed4f=readlinkSync(_0x20b1d4);return isAbsolute(_0xd6ed4f)?_0xd6ed4f:resolve(dirname(_0x20b1d4),_0xd6ed4f);}export function isPathInside(_0x1d4a75,_0x5f000b){const _0x2e4d48=a96_0x834f,_0x1f6d72=_0x1d4a75[_0x2e4d48(0x182)](sep)?_0x1d4a75:''+_0x1d4a75+sep,_0x49f025=_0x5f000b[_0x2e4d48(0x182)](sep)?_0x5f000b:''+_0x5f000b+sep;return _0x1d4a75===_0x5f000b||_0x1f6d72[_0x2e4d48(0x187)](_0x49f025);}export function realOrResolved(_0x36acd4){try{return realpathSync(_0x36acd4);}catch{return resolve(_0x36acd4);}}export function lstatIfPresent(_0x14ff42){try{return lstatSync(_0x14ff42);}catch{return undefined;}}export function writeTextAtomic(_0x439314,_0x5ec459,_0x92594e){const _0x34c66d=a96_0x834f;writeBytesAtomic(_0x439314,Buffer[_0x34c66d(0x181)](_0x5ec459,_0x34c66d(0x179)),_0x92594e);}function a96_0xffe8(){const _0x2506f4=['1149771CljaHu','1384KTDRcx','10950280KzcjSO','.tmp','15245rIjAkc','4766070ATcvkX','utf8','2tRNySk','validation','isSymbolicLink','20KfMyCT','6684QCtRhg','91201mFCwmz','7CMeoha','from','endsWith','split','Unsafe\x20Skill\x20file\x20path:\x20','5913054dPAQKt','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','startsWith','2363895mPhArs'];a96_0xffe8=function(){return _0x2506f4;};return a96_0xffe8();}export function writeBytesAtomic(_0x821586,_0x4536b6,_0x53c2be){const _0x492e6c=a96_0x834f,_0x22587d=_0x821586+_0x492e6c(0x176);try{writeFileSync(_0x22587d,_0x4536b6,{'mode':_0x53c2be}),renameSync(_0x22587d,_0x821586);}catch(_0x1e472f){try{rmSync(_0x22587d,{'force':!![]});}catch{}throw _0x1e472f;}}export function writeJsonAtomic(_0x29def7,_0x19289d){writeTextAtomic(_0x29def7,JSON['stringify'](_0x19289d,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x4893bd,_0x2096c5){const _0x1aa94e=a96_0x5f1e,_0x168a22=_0x4893bd();while(!![]){try{const _0x5d07fd=parseInt(_0x1aa94e(0x16d))/0x1*(parseInt(_0x1aa94e(0x167))/0x2)+-parseInt(_0x1aa94e(0x168))/0x3+-parseInt(_0x1aa94e(0x164))/0x4+parseInt(_0x1aa94e(0x163))/0x5+parseInt(_0x1aa94e(0x165))/0x6+-parseInt(_0x1aa94e(0x162))/0x7+parseInt(_0x1aa94e(0x16a))/0x8*(-parseInt(_0x1aa94e(0x161))/0x9);if(_0x5d07fd===_0x2096c5)break;else _0x168a22['push'](_0x168a22['shift']());}catch(_0x8f6ea7){_0x168a22['push'](_0x168a22['shift']());}}}(a96_0x24b4,0xd6531));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(_0x73d299,_0x48d49c){const _0x8f5ddc=a96_0x5f1e,_0x1f8aa7=normalizeSkillRelativePath(_0x48d49c),_0xe31a65=realOrResolved(_0x73d299),_0x447bd9=resolve(_0xe31a65,..._0x1f8aa7['split']('/'));if(!isPathInside(_0x447bd9,_0xe31a65))throw CliErrors['validation'](_0x8f5ddc(0x16e)+_0x48d49c);return ensureNoSymlinkInManagedPath(_0xe31a65,_0x1f8aa7),_0x447bd9;}export function ensureNoSymlinkInManagedPath(_0x24caf8,_0x510769){const _0x5acad1=a96_0x5f1e;let _0x27a87b=_0x24caf8;for(const _0x1046cb of _0x510769[_0x5acad1(0x16c)]('/')){_0x27a87b=resolve(_0x27a87b,_0x1046cb);const _0x244c75=lstatIfPresent(_0x27a87b);if(_0x244c75?.[_0x5acad1(0x166)]())throw CliErrors['validation'](_0x5acad1(0x15f)+_0x510769);}}export function isDanglingSymlink(_0x347d7a){const _0x71dd58=a96_0x5f1e;try{return lstatSync(_0x347d7a)[_0x71dd58(0x166)]();}catch{return![];}}function a96_0x5f1e(_0x11d69b,_0x101412){_0x11d69b=_0x11d69b-0x15e;const _0x24b4ca=a96_0x24b4();let _0x5f1e00=_0x24b4ca[_0x11d69b];return _0x5f1e00;}export function resolveSymlinkTarget(_0x4180a8){const _0x173a7f=readlinkSync(_0x4180a8);return isAbsolute(_0x173a7f)?_0x173a7f:resolve(dirname(_0x4180a8),_0x173a7f);}export function isPathInside(_0x409455,_0x5a2cf3){const _0x328e29=a96_0x5f1e,_0x502e3b=_0x409455['endsWith'](sep)?_0x409455:''+_0x409455+sep,_0x543965=_0x5a2cf3['endsWith'](sep)?_0x5a2cf3:''+_0x5a2cf3+sep;return _0x409455===_0x5a2cf3||_0x502e3b[_0x328e29(0x169)](_0x543965);}export function realOrResolved(_0xdd9f13){try{return realpathSync(_0xdd9f13);}catch{return resolve(_0xdd9f13);}}export function lstatIfPresent(_0x139421){try{return lstatSync(_0x139421);}catch{return undefined;}}export function writeTextAtomic(_0xc7a174,_0x23d2ec,_0x3946cd){const _0x2bd1f4=a96_0x5f1e;writeBytesAtomic(_0xc7a174,Buffer['from'](_0x23d2ec,_0x2bd1f4(0x160)),_0x3946cd);}export function writeBytesAtomic(_0x28e6a2,_0x4df269,_0x205b38){const _0x281d91=a96_0x5f1e,_0x289262=_0x28e6a2+_0x281d91(0x15e);try{writeFileSync(_0x289262,_0x4df269,{'mode':_0x205b38}),renameSync(_0x289262,_0x28e6a2);}catch(_0x176857){try{rmSync(_0x289262,{'force':!![]});}catch{}throw _0x176857;}}export function writeJsonAtomic(_0xfc23f2,_0x3906af){const _0x36336e=a96_0x5f1e;writeTextAtomic(_0xfc23f2,JSON[_0x36336e(0x16b)](_0x3906af,null,0x2)+'\x0a',0x180);}function a96_0x24b4(){const _0x41c985=['3594246SuyCrm','isSymbolicLink','1506aUCNVz','795855ZZrcIG','startsWith','6808KWwQLi','stringify','split','653ZaGHnl','Unsafe\x20Skill\x20file\x20path:\x20','.tmp','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','utf8','4473YyvSNc','2679999cCecsz','8522715zhWONX','3385324LQSDps'];a96_0x24b4=function(){return _0x41c985;};return a96_0x24b4();}
@@ -1 +1 @@
1
- (function(_0xd934e8,_0x578f3c){const _0x2f19b7=a97_0x1e22,_0x550266=_0xd934e8();while(!![]){try{const _0x4ded22=parseInt(_0x2f19b7(0x1cb))/0x1*(-parseInt(_0x2f19b7(0x1c3))/0x2)+-parseInt(_0x2f19b7(0x1c7))/0x3*(parseInt(_0x2f19b7(0x1be))/0x4)+-parseInt(_0x2f19b7(0x1c1))/0x5*(parseInt(_0x2f19b7(0x1bf))/0x6)+parseInt(_0x2f19b7(0x1c9))/0x7+parseInt(_0x2f19b7(0x1c6))/0x8+-parseInt(_0x2f19b7(0x1c2))/0x9+parseInt(_0x2f19b7(0x1c0))/0xa;if(_0x4ded22===_0x578f3c)break;else _0x550266['push'](_0x550266['shift']());}catch(_0x58956f){_0x550266['push'](_0x550266['shift']());}}}(a97_0x469a,0xda626));import{createHash}from'node:crypto';function a97_0x1e22(_0x3eddd9,_0x3d389b){_0x3eddd9=_0x3eddd9-0x1bd;const _0x469a95=a97_0x469a();let _0x1e22ff=_0x469a95[_0x3eddd9];return _0x1e22ff;}function a97_0x469a(){const _0x6300d0=['2306559bxbiIb','sha256','4230625AujZLn','digest','3GnWSib','path','4dHVhZG','138990UTTNsh','31009370MDCkvF','25ORQHrA','15747957dmsTmt','253898CBBBeg','hex','update','1635904jaQBRK'];a97_0x469a=function(){return _0x6300d0;};return a97_0x469a();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xc57bba){const _0x3788c7=a97_0x1e22;return createHash(_0x3788c7(0x1c8))[_0x3788c7(0x1c5)](_0xc57bba)[_0x3788c7(0x1ca)]('hex');}export function fileHash(_0x883372){return bufferSha256(fileContent(_0x883372));}export function bufferSha256(_0x3c337b){const _0x5be195=a97_0x1e22;return createHash('sha256')[_0x5be195(0x1c5)](_0x3c337b)[_0x5be195(0x1ca)](_0x5be195(0x1c4));}export function fileTreeHash(_0x22d591){const _0x1d5a75=a97_0x1e22,_0x17a7d9=createHash(_0x1d5a75(0x1c8));for(const _0x468810 of normalizeManifestFiles(_0x22d591)){_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1bd)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1c8)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9[_0x1d5a75(0x1c5)](String(_0x468810['size'])),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00');}return _0x17a7d9[_0x1d5a75(0x1ca)]('hex');}
1
+ (function(_0x282ceb,_0x245767){const _0x293ff6=a97_0x3bab,_0x28fbc0=_0x282ceb();while(!![]){try{const _0x1f1ca5=-parseInt(_0x293ff6(0x158))/0x1+parseInt(_0x293ff6(0x160))/0x2*(parseInt(_0x293ff6(0x15b))/0x3)+parseInt(_0x293ff6(0x163))/0x4*(-parseInt(_0x293ff6(0x15f))/0x5)+-parseInt(_0x293ff6(0x161))/0x6+parseInt(_0x293ff6(0x157))/0x7+-parseInt(_0x293ff6(0x15e))/0x8+-parseInt(_0x293ff6(0x15c))/0x9*(-parseInt(_0x293ff6(0x15d))/0xa);if(_0x1f1ca5===_0x245767)break;else _0x28fbc0['push'](_0x28fbc0['shift']());}catch(_0xc1acdf){_0x28fbc0['push'](_0x28fbc0['shift']());}}}(a97_0x155b,0x6bea1));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x22043c){const _0x40a4c4=a97_0x3bab;return createHash(_0x40a4c4(0x165))[_0x40a4c4(0x162)](_0x22043c)[_0x40a4c4(0x164)](_0x40a4c4(0x15a));}function a97_0x155b(){const _0xfe8549=['path','hex','6hxsrEm','2277NJDvGW','30700fKJMPG','6338968zbVuSe','280zHvwzq','639862OJobav','2323494IwdPZt','update','9068nmvwKN','digest','sha256','4923289dsqzPz','371310bqqcMo'];a97_0x155b=function(){return _0xfe8549;};return a97_0x155b();}export function fileHash(_0x2f1dc0){return bufferSha256(fileContent(_0x2f1dc0));}export function bufferSha256(_0x347a52){const _0x8172cf=a97_0x3bab;return createHash('sha256')[_0x8172cf(0x162)](_0x347a52)[_0x8172cf(0x164)](_0x8172cf(0x15a));}function a97_0x3bab(_0x3a5560,_0x243471){_0x3a5560=_0x3a5560-0x157;const _0x155bec=a97_0x155b();let _0x3babc0=_0x155bec[_0x3a5560];return _0x3babc0;}export function fileTreeHash(_0x12d96a){const _0x28d0ce=a97_0x3bab,_0x2dacd8=createHash(_0x28d0ce(0x165));for(const _0x94eff1 of normalizeManifestFiles(_0x12d96a)){_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x159)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x165)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](String(_0x94eff1['size'])),_0x2dacd8[_0x28d0ce(0x162)]('\x00');}return _0x2dacd8[_0x28d0ce(0x164)](_0x28d0ce(0x15a));}
@@ -1 +1 @@
1
- (function(_0x34f897,_0x1c9ece){const _0x1580a4=a98_0x7e97,_0x84fbec=_0x34f897();while(!![]){try{const _0x2970cf=parseInt(_0x1580a4(0xad))/0x1+parseInt(_0x1580a4(0xb8))/0x2+-parseInt(_0x1580a4(0xd2))/0x3+-parseInt(_0x1580a4(0xcb))/0x4+-parseInt(_0x1580a4(0xa5))/0x5+parseInt(_0x1580a4(0xc2))/0x6+-parseInt(_0x1580a4(0xce))/0x7;if(_0x2970cf===_0x1c9ece)break;else _0x84fbec['push'](_0x84fbec['shift']());}catch(_0x308bb4){_0x84fbec['push'](_0x84fbec['shift']());}}}(a98_0x5ae1,0x96ba4));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x1ab013 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a98_0x5ae1(){const _0x37272c=['updated','created','scopes','has','filter','11680tAUIyi','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','claudeSkillsDir','134204utquLh','dir','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','3082947CTeHXH','get','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','trim','skill','2824300QsKmTu','unchanged','map','managedRoot','push','scope','values','appCode','1021354oyIpyM','name','agentsSkillsDir','company','isDirectory','removed','validation','startsWith','external-symlink','pruneSkillCodes','accessKey','2078182XoWVSc','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','slice','personal','not-managed-symlink','activeSkillCodes','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','isSymbolicLink','contentHash','builtin','1029216lntsIf','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skillCode','skipped'];a98_0x5ae1=function(){return _0x37272c;};return a98_0x5ae1();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x1ab013;export function linkEffectiveRuntimeSkills(_0x71d73f,_0x3b9517,_0x5372dd={}){const _0x26d812=a98_0x7e97,_0x1dddf3=new Map();for(const _0x1bd2f5 of _0x71d73f){const _0x4cc646=_0x1bd2f5[_0x26d812(0xa4)][_0x26d812(0xc4)];if(!_0x4cc646)continue;const _0x5ab6a5=_0x1dddf3[_0x26d812(0xd3)](_0x4cc646);(!_0x5ab6a5||_0x1bd2f5[_0x26d812(0xaa)]===_0x26d812(0xbb))&&_0x1dddf3['set'](_0x4cc646,_0x1bd2f5);}const _0x1aafe8=[],_0x3fb8be=resolveSkillSyncPaths(_0x5372dd);for(const _0x42011e of _0x1dddf3[_0x26d812(0xab)]()){const _0x4c38d5=requireSkillCode(_0x42011e[_0x26d812(0xa4)]),_0x20f271=_0x3b9517+'--'+_0x4c38d5;for(const _0x14400c of[_0x3fb8be[_0x26d812(0xaf)],_0x3fb8be[_0x26d812(0xcd)]]){_0x1aafe8['push'](ensureManagedSymlink(resolve(_0x14400c,_0x20f271),_0x42011e[_0x26d812(0xcf)],_0x3fb8be[_0x26d812(0xa8)]));}}return _0x1aafe8;}export function pruneStaleRuntimeSkillLinks(_0x5d4ad9,_0x59447c,_0x62db6={},_0x16d549){const _0x4a6065=a98_0x7e97,_0x3a1eed=resolveSkillSyncPaths(_0x62db6),_0x323c0d=new Set([..._0x59447c][_0x4a6065(0xa7)](_0x3bd212=>_0x3bd212['trim']())[_0x4a6065(0xca)](Boolean)),_0x54833e=_0x16d549?new Set([..._0x16d549][_0x4a6065(0xa7)](_0x201436=>_0x201436[_0x4a6065(0xd5)]())[_0x4a6065(0xca)](Boolean)):undefined,_0x22ea5c=[];for(const _0x5bbb33 of[_0x3a1eed[_0x4a6065(0xaf)],_0x3a1eed[_0x4a6065(0xcd)]]){for(const _0x701f5c of managedAppSkillLinkPaths(_0x5bbb33,_0x5d4ad9)){const _0x4714ed=basename(_0x701f5c)[_0x4a6065(0xba)]((_0x5d4ad9+'--')['length']);if(_0x54833e&&!_0x54833e[_0x4a6065(0xc9)](_0x4714ed))continue;if(_0x323c0d[_0x4a6065(0xc9)](_0x4714ed))continue;_0x22ea5c['push'](removeManagedSkillLink(_0x701f5c,_0x3a1eed[_0x4a6065(0xa8)]));}}return _0x22ea5c;}export function pruneStaleRuntimeSkillCache(_0x2b7397,_0x4db071={}){const _0x1ee96a=a98_0x7e97,_0x229a30=new Set([..._0x2b7397[_0x1ee96a(0xbd)]][_0x1ee96a(0xa7)](_0x1b60b7=>_0x1b60b7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)),_0x1f1a18=_0x2b7397[_0x1ee96a(0xb6)]?new Set([..._0x2b7397[_0x1ee96a(0xb6)]][_0x1ee96a(0xa7)](_0x159fc7=>_0x159fc7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)):undefined,_0x2904d9=_0x2b7397[_0x1ee96a(0xc8)]??[_0x1ee96a(0xbb),_0x1ee96a(0xb0)],_0xd550c=resolve(getRuntimeSkillCacheRoot(_0x2b7397['env'],_0x2b7397[_0x1ee96a(0xb7)],_0x4db071),safePathSegment(_0x2b7397[_0x1ee96a(0xac)],_0x1ee96a(0xac))),_0xf68a39=[];for(const _0x417c81 of _0x2904d9){const _0x3347c6=resolve(_0xd550c,_0x417c81);if(!existsSync(_0x3347c6))continue;for(const _0x205662 of readdirSync(_0x3347c6,{'withFileTypes':!![]})){if(!_0x205662[_0x1ee96a(0xb1)]())continue;const _0x1fbcfe=_0x205662['name'];if(_0x1f1a18&&!_0x1f1a18[_0x1ee96a(0xc9)](_0x1fbcfe))continue;if(_0x229a30['has'](_0x1fbcfe))continue;const _0x2ed4b7=resolve(_0x3347c6,_0x1fbcfe),_0x18dd09=readMetadataIfPresent(resolve(_0x2ed4b7,METADATA_FILE));if(_0x18dd09?.[_0x1ee96a(0xac)]!==_0x2b7397['appCode']||_0x18dd09[_0x1ee96a(0xaa)]!==_0x417c81||_0x18dd09[_0x1ee96a(0xc4)]!==_0x1fbcfe){_0xf68a39[_0x1ee96a(0xa9)]({'path':_0x2ed4b7,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x2ed4b7),_0xf68a39['push']({'path':_0x2ed4b7,'action':_0x1ee96a(0xb2)});}}return _0xf68a39;}export function linkGlobalRuntimeSkills(_0x177db2,_0x502946={}){const _0x14dbbe=a98_0x7e97,_0x3c8de5=resolveSkillSyncPaths(_0x502946),_0x3d3701=[];for(const _0x37e3a2 of _0x177db2){if(_0x37e3a2[_0x14dbbe(0xaa)]!==_0x14dbbe(0xc1))throw CliErrors[_0x14dbbe(0xb3)](_0x14dbbe(0xd4)+_0x37e3a2[_0x14dbbe(0xaa)]);const _0x32e0a8=requireSkillCode(_0x37e3a2[_0x14dbbe(0xa4)]),_0x8cded6=copyManagedSkillDirectory(_0x37e3a2[_0x14dbbe(0xcf)],resolve(_0x3c8de5[_0x14dbbe(0xaf)],_0x32e0a8));_0x3d3701[_0x14dbbe(0xa9)]({..._0x8cded6,'contentHash':_0x37e3a2[_0x14dbbe(0xc0)]});}return _0x3d3701;}function ensureManagedSymlink(_0x9b08fb,_0x372af7,_0x1094a0){const _0x80149=a98_0x7e97;mkdirSync(dirname(_0x9b08fb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x9b08fb)||isDanglingSymlink(_0x9b08fb)){const _0x43e09c=lstatSync(_0x9b08fb);if(!_0x43e09c['isSymbolicLink']())throw CliErrors['validation'](_0x80149(0xd1)+_0x9b08fb);const _0x10618f=resolveSymlinkTarget(_0x9b08fb);if(!isPathInside(realOrResolved(_0x10618f),realOrResolved(_0x1094a0)))throw CliErrors[_0x80149(0xb3)](_0x80149(0xc3)+_0x9b08fb);if(realOrResolved(_0x10618f)===realOrResolved(_0x372af7))return{'path':_0x9b08fb,'target':_0x372af7,'action':'unchanged'};return unlinkSync(_0x9b08fb),symlinkSync(_0x372af7,_0x9b08fb,'dir'),{'path':_0x9b08fb,'target':_0x372af7,'action':_0x80149(0xc6)};}return symlinkSync(_0x372af7,_0x9b08fb,_0x80149(0xcf)),{'path':_0x9b08fb,'target':_0x372af7,'action':'created'};}function managedAppSkillLinkPaths(_0x2e9d30,_0x7f4a1c){const _0x56dfbf=a98_0x7e97;if(!existsSync(_0x2e9d30))return[];const _0x52e61c=_0x7f4a1c+'--';return readdirSync(_0x2e9d30,{'withFileTypes':!![]})[_0x56dfbf(0xca)](_0x2038ed=>_0x2038ed[_0x56dfbf(0xae)][_0x56dfbf(0xb4)](_0x52e61c))[_0x56dfbf(0xa7)](_0xc93c67=>resolve(_0x2e9d30,_0xc93c67[_0x56dfbf(0xae)]));}function a98_0x7e97(_0x708d97,_0x46bd59){_0x708d97=_0x708d97-0xa4;const _0x5ae1bc=a98_0x5ae1();let _0x7e977f=_0x5ae1bc[_0x708d97];return _0x7e977f;}function removeManagedSkillLink(_0x18ab5a,_0x46067b){const _0x5da838=a98_0x7e97,_0x49fb8b=lstatIfPresent(_0x18ab5a);if(!_0x49fb8b?.['isSymbolicLink']())return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xbc)};const _0x5b78c2=resolveSymlinkTarget(_0x18ab5a);if(!isPathInside(realOrResolved(_0x5b78c2),realOrResolved(_0x46067b)))return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xb5)};return unlinkSync(_0x18ab5a),{'path':_0x18ab5a,'action':_0x5da838(0xb2)};}export function copyManagedSkillDirectory(_0x4e6276,_0x27fed1){const _0xdd9c10=a98_0x7e97,_0x35dbe1=resolve(_0x27fed1,METADATA_FILE),_0x52035e=existsSync(_0x27fed1);if(_0x52035e){const _0xf8f457=lstatSync(_0x27fed1);if(_0xf8f457['isSymbolicLink']())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xbe)+_0x27fed1);if(!_0xf8f457[_0xdd9c10(0xb1)]())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xb9)+_0x27fed1);const _0x2e536f=readMetadataIfPresent(_0x35dbe1);if(_0x2e536f?.[_0xdd9c10(0xaa)]!==_0xdd9c10(0xc1))throw CliErrors['validation'](_0xdd9c10(0xcc)+_0x27fed1);}ensureDirSync(dirname(_0x27fed1));const _0x21b33c=_0x52035e?readMetadataIfPresent(_0x35dbe1)?.[_0xdd9c10(0xc0)]:undefined,_0x42d585=readMetadataIfPresent(resolve(_0x4e6276,METADATA_FILE))?.['contentHash'];return _0x52035e&&removeSync(_0x27fed1),copySkillDirectory(_0x4e6276,_0x27fed1),{'path':_0x27fed1,'target':_0x4e6276,'action':!_0x52035e?_0xdd9c10(0xc7):_0x21b33c===_0x42d585?_0xdd9c10(0xa6):_0xdd9c10(0xc6)};}function copySkillDirectory(_0x1aafed,_0x50288b){copySync(_0x1aafed,_0x50288b,{'dereference':![],'overwrite':!![],'filter'(_0x15f451){const _0x2b2b9b=a98_0x7e97;if(lstatSync(_0x15f451)[_0x2b2b9b(0xbf)]())throw CliErrors[_0x2b2b9b(0xb3)](_0x2b2b9b(0xd0)+_0x15f451);return!![];}});}
1
+ (function(_0x52869b,_0x4dea0d){const _0x4bf357=a98_0x1c6d,_0xc2dfd8=_0x52869b();while(!![]){try{const _0x279f14=-parseInt(_0x4bf357(0x1aa))/0x1*(parseInt(_0x4bf357(0x1a6))/0x2)+parseInt(_0x4bf357(0x187))/0x3+-parseInt(_0x4bf357(0x17b))/0x4+-parseInt(_0x4bf357(0x18e))/0x5*(parseInt(_0x4bf357(0x17a))/0x6)+-parseInt(_0x4bf357(0x182))/0x7*(-parseInt(_0x4bf357(0x195))/0x8)+parseInt(_0x4bf357(0x19c))/0x9*(parseInt(_0x4bf357(0x19d))/0xa)+-parseInt(_0x4bf357(0x185))/0xb;if(_0x279f14===_0x4dea0d)break;else _0xc2dfd8['push'](_0xc2dfd8['shift']());}catch(_0xc3c20a){_0xc2dfd8['push'](_0xc2dfd8['shift']());}}}(a98_0x396e,0x603f2));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x396e(){const _0x530ad5=['Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','agentsSkillsDir','skipped','values','not-managed-symlink','182874PykgAD','43888DvWaBR','contentHash','scope','has','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','startsWith','pruneSkillCodes','623903oSuRMs','env','unchanged','6823047DWscIe','metadata-mismatch','1069641aVBZdB','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','name','activeSkillCodes','scopes','map','5YgwioE','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','validation','skill','get','skillCode','16FkKGpz','push','isSymbolicLink','length','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','isDirectory','builtin','27wfFFRn','1757590MuTJcB','accessKey','slice','removed','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','dir','external-symlink','trim','appCode','3064afFiKO','managedRoot','company','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','4KQMkwq'];a98_0x396e=function(){return _0x530ad5;};return a98_0x396e();}import{basename,dirname,resolve}from'node:path';import a98_0x2ea2c2 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_0x2ea2c2;export function linkEffectiveRuntimeSkills(_0x5684ea,_0x3de5d0,_0x34740c={}){const _0x48d671=a98_0x1c6d,_0x4d712d=new Map();for(const _0x4cc6ad of _0x5684ea){const _0x4fb5ce=_0x4cc6ad['skill'][_0x48d671(0x194)];if(!_0x4fb5ce)continue;const _0x53fe47=_0x4d712d[_0x48d671(0x193)](_0x4fb5ce);(!_0x53fe47||_0x4cc6ad[_0x48d671(0x17d)]===_0x48d671(0x189))&&_0x4d712d['set'](_0x4fb5ce,_0x4cc6ad);}const _0x176b6a=[],_0x106f0d=resolveSkillSyncPaths(_0x34740c);for(const _0xf03fbe of _0x4d712d[_0x48d671(0x178)]()){const _0x4fb952=requireSkillCode(_0xf03fbe[_0x48d671(0x192)]),_0x490a46=_0x3de5d0+'--'+_0x4fb952;for(const _0x33c545 of runtimeAgentSkillRoots(_0x106f0d)){_0x176b6a[_0x48d671(0x196)](ensureManagedSymlink(resolve(_0x33c545,_0x490a46),_0xf03fbe[_0x48d671(0x1a2)],_0x106f0d[_0x48d671(0x1a7)]));}}return _0x176b6a;}export function pruneStaleRuntimeSkillLinks(_0x5b835d,_0x293280,_0x538fb2={},_0x204ab0){const _0x58e892=a98_0x1c6d,_0x54e4ea=resolveSkillSyncPaths(_0x538fb2),_0x4dded9=new Set([..._0x293280][_0x58e892(0x18d)](_0x298250=>_0x298250[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)),_0x5596d6=_0x204ab0?new Set([..._0x204ab0][_0x58e892(0x18d)](_0x4630e9=>_0x4630e9[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)):undefined,_0x583a78=[];for(const _0x1651ad of runtimeAgentSkillRoots(_0x54e4ea)){for(const _0x376974 of managedAppSkillLinkPaths(_0x1651ad,_0x5b835d)){const _0x500db4=basename(_0x376974)[_0x58e892(0x19f)]((_0x5b835d+'--')[_0x58e892(0x198)]);if(_0x5596d6&&!_0x5596d6['has'](_0x500db4))continue;if(_0x4dded9['has'](_0x500db4))continue;_0x583a78[_0x58e892(0x196)](removeManagedSkillLink(_0x376974,_0x54e4ea[_0x58e892(0x1a7)]));}}return _0x583a78;}export function pruneStaleRuntimeSkillCache(_0x490815,_0x2b82ce={}){const _0x4465d7=a98_0x1c6d,_0x294d16=new Set([..._0x490815[_0x4465d7(0x18b)]][_0x4465d7(0x18d)](_0x14c69e=>_0x14c69e[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)),_0x51dcd3=_0x490815['pruneSkillCodes']?new Set([..._0x490815[_0x4465d7(0x181)]][_0x4465d7(0x18d)](_0x5a6dc5=>_0x5a6dc5[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)):undefined,_0x1e0f03=_0x490815[_0x4465d7(0x18c)]??[_0x4465d7(0x189),_0x4465d7(0x1a8)],_0x25a383=resolve(getRuntimeSkillCacheRoot(_0x490815[_0x4465d7(0x183)],_0x490815[_0x4465d7(0x19e)],_0x2b82ce),safePathSegment(_0x490815[_0x4465d7(0x1a5)],_0x4465d7(0x1a5))),_0x9cec3d=[];for(const _0x29fe93 of _0x1e0f03){const _0x7dad80=resolve(_0x25a383,_0x29fe93);if(!existsSync(_0x7dad80))continue;for(const _0x31b523 of readdirSync(_0x7dad80,{'withFileTypes':!![]})){if(!_0x31b523['isDirectory']())continue;const _0x24da21=_0x31b523['name'];if(_0x51dcd3&&!_0x51dcd3[_0x4465d7(0x17e)](_0x24da21))continue;if(_0x294d16['has'](_0x24da21))continue;const _0x1cddf5=resolve(_0x7dad80,_0x24da21),_0x4f3858=readMetadataIfPresent(resolve(_0x1cddf5,METADATA_FILE));if(_0x4f3858?.[_0x4465d7(0x1a5)]!==_0x490815['appCode']||_0x4f3858[_0x4465d7(0x17d)]!==_0x29fe93||_0x4f3858[_0x4465d7(0x194)]!==_0x24da21){_0x9cec3d['push']({'path':_0x1cddf5,'action':_0x4465d7(0x177),'reason':_0x4465d7(0x186)});continue;}removeSync(_0x1cddf5),_0x9cec3d[_0x4465d7(0x196)]({'path':_0x1cddf5,'action':'removed'});}}return _0x9cec3d;}export function linkGlobalRuntimeSkills(_0x597de7,_0x49f2e0={}){const _0x30c560=a98_0x1c6d,_0x435e97=resolveSkillSyncPaths(_0x49f2e0),_0x2d5c42=[];for(const _0x37acef of _0x597de7){if(_0x37acef[_0x30c560(0x17d)]!=='builtin')throw CliErrors[_0x30c560(0x191)](_0x30c560(0x1ab)+_0x37acef[_0x30c560(0x17d)]);const _0x4093c1=requireSkillCode(_0x37acef[_0x30c560(0x192)]),_0x4a6c2c=copyManagedSkillDirectory(_0x37acef[_0x30c560(0x1a2)],resolve(_0x435e97[_0x30c560(0x176)],_0x4093c1));_0x2d5c42['push']({..._0x4a6c2c,'contentHash':_0x37acef[_0x30c560(0x17c)]});}return _0x2d5c42;}function ensureManagedSymlink(_0x3bd8e3,_0x6e8270,_0x4df998){const _0xfd4a2b=a98_0x1c6d;mkdirSync(dirname(_0x3bd8e3),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3bd8e3)||isDanglingSymlink(_0x3bd8e3)){const _0x32e5ea=lstatSync(_0x3bd8e3);if(!_0x32e5ea[_0xfd4a2b(0x197)]())throw CliErrors['validation'](_0xfd4a2b(0x1a1)+_0x3bd8e3);const _0x3ff606=resolveSymlinkTarget(_0x3bd8e3);if(!isPathInside(realOrResolved(_0x3ff606),realOrResolved(_0x4df998)))throw CliErrors[_0xfd4a2b(0x191)](_0xfd4a2b(0x1a9)+_0x3bd8e3);if(realOrResolved(_0x3ff606)===realOrResolved(_0x6e8270))return{'path':_0x3bd8e3,'target':_0x6e8270,'action':'unchanged'};return unlinkSync(_0x3bd8e3),symlinkSync(_0x6e8270,_0x3bd8e3,_0xfd4a2b(0x1a2)),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'updated'};}return symlinkSync(_0x6e8270,_0x3bd8e3,'dir'),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'created'};}function managedAppSkillLinkPaths(_0x12ff17,_0x19314f){const _0x15b252=a98_0x1c6d;if(!existsSync(_0x12ff17))return[];const _0x4fff3b=_0x19314f+'--';return readdirSync(_0x12ff17,{'withFileTypes':!![]})[_0x15b252(0x190)](_0x111a33=>_0x111a33[_0x15b252(0x18a)][_0x15b252(0x180)](_0x4fff3b))[_0x15b252(0x18d)](_0x27389e=>resolve(_0x12ff17,_0x27389e[_0x15b252(0x18a)]));}function removeManagedSkillLink(_0x529d36,_0x358c88){const _0x583ab5=a98_0x1c6d,_0x50410a=lstatIfPresent(_0x529d36);if(!_0x50410a?.[_0x583ab5(0x197)]())return{'path':_0x529d36,'action':'skipped','reason':_0x583ab5(0x179)};const _0x54a263=resolveSymlinkTarget(_0x529d36);if(!isPathInside(realOrResolved(_0x54a263),realOrResolved(_0x358c88)))return{'path':_0x529d36,'action':_0x583ab5(0x177),'reason':_0x583ab5(0x1a3)};return unlinkSync(_0x529d36),{'path':_0x529d36,'action':_0x583ab5(0x1a0)};}function a98_0x1c6d(_0x4587dc,_0x1262b1){_0x4587dc=_0x4587dc-0x176;const _0x396e3d=a98_0x396e();let _0x1c6d1e=_0x396e3d[_0x4587dc];return _0x1c6d1e;}export function copyManagedSkillDirectory(_0x4a0db8,_0x4826b0){const _0x5bc075=a98_0x1c6d,_0x1d1e70=resolve(_0x4826b0,METADATA_FILE),_0x41908d=existsSync(_0x4826b0);if(_0x41908d){const _0x184faf=lstatSync(_0x4826b0);if(_0x184faf['isSymbolicLink']())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x17f)+_0x4826b0);if(!_0x184faf[_0x5bc075(0x19a)]())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x188)+_0x4826b0);const _0x139a25=readMetadataIfPresent(_0x1d1e70);if(_0x139a25?.[_0x5bc075(0x17d)]!==_0x5bc075(0x19b))throw CliErrors['validation'](_0x5bc075(0x199)+_0x4826b0);}ensureDirSync(dirname(_0x4826b0));const _0x2e8e15=_0x41908d?readMetadataIfPresent(_0x1d1e70)?.['contentHash']:undefined,_0x241912=readMetadataIfPresent(resolve(_0x4a0db8,METADATA_FILE))?.[_0x5bc075(0x17c)];return _0x41908d&&removeSync(_0x4826b0),copySkillDirectory(_0x4a0db8,_0x4826b0),{'path':_0x4826b0,'target':_0x4a0db8,'action':!_0x41908d?'created':_0x2e8e15===_0x241912?_0x5bc075(0x184):'updated'};}function copySkillDirectory(_0x3bfcbe,_0x28c659){copySync(_0x3bfcbe,_0x28c659,{'dereference':![],'overwrite':!![],'filter'(_0x527c15){const _0x46a2c2=a98_0x1c6d;if(lstatSync(_0x527c15)[_0x46a2c2(0x197)]())throw CliErrors[_0x46a2c2(0x191)](_0x46a2c2(0x18f)+_0x527c15);return!![];}});}
@@ -1 +1 @@
1
- (function(_0xbf41db,_0x437287){const _0x18d6ce=a99_0x323a,_0x4282cc=_0xbf41db();while(!![]){try{const _0x23df33=parseInt(_0x18d6ce(0xe1))/0x1+-parseInt(_0x18d6ce(0xf5))/0x2*(-parseInt(_0x18d6ce(0xf6))/0x3)+-parseInt(_0x18d6ce(0xfa))/0x4*(parseInt(_0x18d6ce(0xe0))/0x5)+-parseInt(_0x18d6ce(0xf1))/0x6*(parseInt(_0x18d6ce(0xd8))/0x7)+-parseInt(_0x18d6ce(0xf3))/0x8+-parseInt(_0x18d6ce(0xec))/0x9*(-parseInt(_0x18d6ce(0xd7))/0xa)+parseInt(_0x18d6ce(0xdb))/0xb;if(_0x23df33===_0x437287)break;else _0x4282cc['push'](_0x4282cc['shift']());}catch(_0x597b8a){_0x4282cc['push'](_0x4282cc['shift']());}}}(a99_0x5d57,0x44017));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x5d57(){const _0x5c32ee=['builtin','sort','884fcxsWV','set','env','startsWith','cacheDir','includes','skillCode','cache','20ojGkEE','21uCTXOP','metadataPath','code','4615567TSWjbj','map','tags','from','linkedPaths','355DduKcd','308053GcAOYE','scope','source','link','get','localeCompare','isDirectory','appCode','dir','linkedPath','filter','1147806azeXLk','isSymbolicLink','scopes','values','claudeSkillsDir','869502Vmspsg','trim','2805184abUUut','name','206HnyoJg','2823OxLCWO','skillMdPath'];a99_0x5d57=function(){return _0x5c32ee;};return a99_0x5d57();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x1bbd05,_0x17ded5={}){const _0x36cfef=a99_0x323a,_0x2233d6=safePathSegment(_0x1bbd05['appCode'],'appCode'),_0x1d37de=normalizeRuntimeSkillScopes(_0x1bbd05[_0x36cfef(0xee)]),_0xd6f6b=new Set(_0x1d37de),_0x10f413=_0x1bbd05[_0x36cfef(0xda)]?.['trim'](),_0x833c7=new Map(),_0x359522=resolve(getRuntimeSkillCacheRoot(_0x1bbd05[_0x36cfef(0xfc)],_0x1bbd05['accessKey'],_0x17ded5),_0x2233d6);for(const _0x1ce169 of _0x1d37de){for(const _0x43cdd4 of localSkillEntryDirs(resolve(_0x359522,_0x1ce169))){collectLocalRuntimeSkill(_0x833c7,_0x43cdd4,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xd6)});}}const _0x9640b2=resolveSkillSyncPaths(_0x17ded5);for(const _0x5466bd of[_0x9640b2['agentsSkillsDir'],_0x9640b2[_0x36cfef(0xf0)]]){for(const _0x2d9c6 of localSkillLinkCandidates(_0x5466bd,_0x2233d6,_0xd6f6b)){collectLocalRuntimeSkill(_0x833c7,_0x2d9c6,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xe4),'linkedPath':_0x2d9c6});}}return Array[_0x36cfef(0xde)](_0x833c7[_0x36cfef(0xef)]())[_0x36cfef(0xf9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49551a){const _0x573889=a99_0x323a;if(!existsSync(_0x49551a))return[];return readdirSync(_0x49551a,{'withFileTypes':!![]})['filter'](_0x2ae7d9=>_0x2ae7d9[_0x573889(0xe7)]()||_0x2ae7d9[_0x573889(0xed)]())[_0x573889(0xdc)](_0x41c3dc=>resolve(_0x49551a,_0x41c3dc[_0x573889(0xf4)]));}function localSkillLinkCandidates(_0x439d01,_0x3fc948,_0x324245){const _0x4e3cae=a99_0x323a;if(!existsSync(_0x439d01))return[];const _0x9fecfa=_0x3fc948+'--';return readdirSync(_0x439d01,{'withFileTypes':!![]})[_0x4e3cae(0xeb)](_0x35cf96=>_0x35cf96[_0x4e3cae(0xe7)]()||_0x35cf96[_0x4e3cae(0xed)]())[_0x4e3cae(0xeb)](_0x595d39=>_0x595d39['name'][_0x4e3cae(0xfd)](_0x9fecfa)||_0x324245['has'](_0x4e3cae(0xf8)))[_0x4e3cae(0xdc)](_0x1dd134=>resolve(_0x439d01,_0x1dd134[_0x4e3cae(0xf4)]));}function collectLocalRuntimeSkill(_0x135d96,_0x266393,_0x1a492e){const _0x2b6fda=a99_0x323a,_0x4c24cf=resolve(_0x266393,METADATA_FILE),_0x773b=readMetadataIfPresent(_0x4c24cf);if(!_0x773b)return;if(_0x773b[_0x2b6fda(0xe8)]!==_0x1a492e[_0x2b6fda(0xe8)])return;if(!isRuntimeSkillScope(_0x773b[_0x2b6fda(0xe2)])||!_0x1a492e['scopes']['has'](_0x773b['scope']))return;const _0x380c74=_0x773b[_0x2b6fda(0xd5)]?.[_0x2b6fda(0xf2)]();if(!_0x380c74)return;if(_0x1a492e['code']&&_0x380c74!==_0x1a492e[_0x2b6fda(0xda)])return;const _0x5a479c=_0x773b['scope']+':'+_0x380c74,_0x4637dd=_0x1a492e[_0x2b6fda(0xea)]?[_0x1a492e[_0x2b6fda(0xea)]]:[],_0x39022c=_0x135d96[_0x2b6fda(0xe5)](_0x5a479c);if(_0x39022c){_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)&&(_0x39022c[_0x2b6fda(0xe9)]=_0x266393,_0x39022c[_0x2b6fda(0xd3)]=_0x266393,_0x39022c[_0x2b6fda(0xf7)]=resolve(_0x266393,SKILL_FILE),_0x39022c[_0x2b6fda(0xd9)]=_0x4c24cf);for(const _0x153f2d of _0x4637dd){!_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xd4)](_0x153f2d)&&_0x39022c[_0x2b6fda(0xdf)]['push'](_0x153f2d);}_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xf9)]();return;}_0x135d96[_0x2b6fda(0xfb)](_0x5a479c,{..._0x773b,'tags':Array['isArray'](_0x773b['tags'])?_0x773b[_0x2b6fda(0xdd)]:[],'scope':_0x773b[_0x2b6fda(0xe2)],'source':'local','dir':_0x266393,'cacheDir':_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)?_0x266393:undefined,'skillMdPath':resolve(_0x266393,SKILL_FILE),'metadataPath':_0x4c24cf,'linkedPaths':_0x4637dd});}function a99_0x323a(_0x278dfe,_0x5c28a1){_0x278dfe=_0x278dfe-0xd3;const _0x5d576d=a99_0x5d57();let _0x323a05=_0x5d576d[_0x278dfe];return _0x323a05;}function compareLocalRuntimeSkills(_0x84f065,_0xcfd87b){const _0x2819c3=a99_0x323a,_0x47cbd7={'personal':0x0,'company':0x1,'builtin':0x2};return _0x47cbd7[_0x84f065[_0x2819c3(0xe2)]]-_0x47cbd7[_0xcfd87b[_0x2819c3(0xe2)]]||_0x84f065[_0x2819c3(0xd5)][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xd5)])||_0x84f065['dir'][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xe9)]);}
1
+ (function(_0x4a6921,_0x50bc0e){const _0xcd023=a99_0x4d80,_0x6cce86=_0x4a6921();while(!![]){try{const _0x574950=-parseInt(_0xcd023(0x1ba))/0x1*(-parseInt(_0xcd023(0x1d9))/0x2)+-parseInt(_0xcd023(0x1c5))/0x3+parseInt(_0xcd023(0x1da))/0x4+parseInt(_0xcd023(0x1cd))/0x5+-parseInt(_0xcd023(0x1bd))/0x6+-parseInt(_0xcd023(0x1c3))/0x7*(parseInt(_0xcd023(0x1d7))/0x8)+-parseInt(_0xcd023(0x1d8))/0x9*(-parseInt(_0xcd023(0x1c7))/0xa);if(_0x574950===_0x50bc0e)break;else _0x6cce86['push'](_0x6cce86['shift']());}catch(_0x3e8867){_0x6cce86['push'](_0x6cce86['shift']());}}}(a99_0x3a01,0x354de));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x4d80(_0x515473,_0x15ab1a){_0x515473=_0x515473-0x1b0;const _0x3a0156=a99_0x3a01();let _0x4d8019=_0x3a0156[_0x515473];return _0x4d8019;}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(_0x34b213,_0x23baed={}){const _0x9df0dd=a99_0x4d80,_0x45ff72=safePathSegment(_0x34b213[_0x9df0dd(0x1b6)],_0x9df0dd(0x1b6)),_0x2a0200=normalizeRuntimeSkillScopes(_0x34b213[_0x9df0dd(0x1d6)]),_0x22a4fd=new Set(_0x2a0200),_0x1952fa=_0x34b213[_0x9df0dd(0x1b0)]?.[_0x9df0dd(0x1bf)](),_0x57292f=new Map(),_0x4d99fb=resolve(getRuntimeSkillCacheRoot(_0x34b213[_0x9df0dd(0x1c2)],_0x34b213['accessKey'],_0x23baed),_0x45ff72);for(const _0x56d3d7 of _0x2a0200){for(const _0xda4456 of localSkillEntryDirs(resolve(_0x4d99fb,_0x56d3d7))){collectLocalRuntimeSkill(_0x57292f,_0xda4456,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1cb)});}}const _0x266322=resolveSkillSyncPaths(_0x23baed);for(const _0xce76da of runtimeAgentSkillRoots(_0x266322)){for(const _0x50dee4 of localSkillLinkCandidates(_0xce76da,_0x45ff72,_0x22a4fd)){collectLocalRuntimeSkill(_0x57292f,_0x50dee4,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1d0),'linkedPath':_0x50dee4});}}return Array[_0x9df0dd(0x1b7)](_0x57292f['values']())[_0x9df0dd(0x1d1)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49e623){const _0x39d16b=a99_0x4d80;if(!existsSync(_0x49e623))return[];return readdirSync(_0x49e623,{'withFileTypes':!![]})['filter'](_0x1316bd=>_0x1316bd['isDirectory']()||_0x1316bd[_0x39d16b(0x1cf)]())[_0x39d16b(0x1d5)](_0x205ef0=>resolve(_0x49e623,_0x205ef0[_0x39d16b(0x1d3)]));}function localSkillLinkCandidates(_0x41bdea,_0x56790d,_0x21fcf7){const _0x2f2924=a99_0x4d80;if(!existsSync(_0x41bdea))return[];const _0xc9693f=_0x56790d+'--';return readdirSync(_0x41bdea,{'withFileTypes':!![]})[_0x2f2924(0x1b5)](_0x134cdd=>_0x134cdd[_0x2f2924(0x1d2)]()||_0x134cdd[_0x2f2924(0x1cf)]())['filter'](_0x306db7=>_0x306db7[_0x2f2924(0x1d3)][_0x2f2924(0x1b2)](_0xc9693f)||_0x21fcf7[_0x2f2924(0x1ce)](_0x2f2924(0x1b3)))[_0x2f2924(0x1d5)](_0x4afa1b=>resolve(_0x41bdea,_0x4afa1b['name']));}function collectLocalRuntimeSkill(_0x2cdec6,_0x3f5db6,_0x137bb3){const _0x359bd8=a99_0x4d80,_0x41165d=resolve(_0x3f5db6,METADATA_FILE),_0x1662e3=readMetadataIfPresent(_0x41165d);if(!_0x1662e3)return;if(_0x1662e3[_0x359bd8(0x1b6)]!==_0x137bb3[_0x359bd8(0x1b6)])return;if(!isRuntimeSkillScope(_0x1662e3[_0x359bd8(0x1b8)])||!_0x137bb3[_0x359bd8(0x1d6)]['has'](_0x1662e3['scope']))return;const _0xa59fa4=_0x1662e3[_0x359bd8(0x1bc)]?.['trim']();if(!_0xa59fa4)return;if(_0x137bb3[_0x359bd8(0x1b0)]&&_0xa59fa4!==_0x137bb3['code'])return;const _0x153b25=_0x1662e3[_0x359bd8(0x1b8)]+':'+_0xa59fa4,_0x5bdccf=_0x137bb3['linkedPath']?[_0x137bb3[_0x359bd8(0x1c9)]]:[],_0x53490b=_0x2cdec6[_0x359bd8(0x1c1)](_0x153b25);if(_0x53490b){_0x137bb3[_0x359bd8(0x1ca)]===_0x359bd8(0x1cb)&&(_0x53490b[_0x359bd8(0x1c0)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1cc)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1be)]=resolve(_0x3f5db6,SKILL_FILE),_0x53490b['metadataPath']=_0x41165d);for(const _0x488030 of _0x5bdccf){!_0x53490b[_0x359bd8(0x1c8)][_0x359bd8(0x1c4)](_0x488030)&&_0x53490b['linkedPaths'][_0x359bd8(0x1d4)](_0x488030);}_0x53490b[_0x359bd8(0x1c8)]['sort']();return;}_0x2cdec6[_0x359bd8(0x1c6)](_0x153b25,{..._0x1662e3,'tags':Array[_0x359bd8(0x1b9)](_0x1662e3[_0x359bd8(0x1b1)])?_0x1662e3[_0x359bd8(0x1b1)]:[],'scope':_0x1662e3[_0x359bd8(0x1b8)],'source':_0x359bd8(0x1b4),'dir':_0x3f5db6,'cacheDir':_0x137bb3[_0x359bd8(0x1ca)]==='cache'?_0x3f5db6:undefined,'skillMdPath':resolve(_0x3f5db6,SKILL_FILE),'metadataPath':_0x41165d,'linkedPaths':_0x5bdccf});}function a99_0x3a01(){const _0x34a124=['local','filter','appCode','from','scope','isArray','208309RtPOYa','localeCompare','skillCode','1033890MZKZix','skillMdPath','trim','dir','get','env','21UKsVgl','includes','644325agsTZt','set','10MmzePs','linkedPaths','linkedPath','source','cache','cacheDir','770440MDivNj','has','isSymbolicLink','link','sort','isDirectory','name','push','map','scopes','929176TqHTAc','1778049GNjoZj','2WtMZBN','1575628eXpyVh','code','tags','startsWith','builtin'];a99_0x3a01=function(){return _0x34a124;};return a99_0x3a01();}function compareLocalRuntimeSkills(_0x48075b,_0x5591f5){const _0x26604d=a99_0x4d80,_0x5cf6be={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5cf6be[_0x48075b[_0x26604d(0x1b8)]]-_0x5cf6be[_0x5591f5['scope']]||_0x48075b[_0x26604d(0x1bc)][_0x26604d(0x1bb)](_0x5591f5[_0x26604d(0x1bc)])||_0x48075b[_0x26604d(0x1c0)][_0x26604d(0x1bb)](_0x5591f5['dir']);}
@@ -1 +1 @@
1
- (function(_0x11973b,_0x352e4a){const _0x16c6e3=a100_0x2015,_0x7077d5=_0x11973b();while(!![]){try{const _0x201ffc=-parseInt(_0x16c6e3(0x1f5))/0x1*(parseInt(_0x16c6e3(0x1d5))/0x2)+parseInt(_0x16c6e3(0x1f0))/0x3*(parseInt(_0x16c6e3(0x1d4))/0x4)+parseInt(_0x16c6e3(0x1eb))/0x5*(-parseInt(_0x16c6e3(0x1d8))/0x6)+parseInt(_0x16c6e3(0x1fd))/0x7+parseInt(_0x16c6e3(0x1df))/0x8*(parseInt(_0x16c6e3(0x1dd))/0x9)+-parseInt(_0x16c6e3(0x1e1))/0xa*(-parseInt(_0x16c6e3(0x1f8))/0xb)+parseInt(_0x16c6e3(0x1ff))/0xc*(-parseInt(_0x16c6e3(0x1db))/0xd);if(_0x201ffc===_0x352e4a)break;else _0x7077d5['push'](_0x7077d5['shift']());}catch(_0x24a639){_0x7077d5['push'](_0x7077d5['shift']());}}}(a100_0x2b96,0x81b7c));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x14a701){const _0x573384=a100_0x2015;return _0x14a701['bytes']??Buffer['from'](_0x14a701[_0x573384(0x1ea)]??'',_0x573384(0x1fb));}function a100_0x2b96(){const _0x35cdb3=['string','3052980xCYtrI','set','1359552mRneqj','Skill\x20file\x20sha256\x20is\x20invalid:\x20','1596vslcNB','65470faNxgK','split','object','704118LDGTom','Duplicate\x20Skill\x20file\x20path:\x20','replace','91UBJsGV','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','11943fTXcHe','length','5288nAfkxR','sort','5990UNmcvq','values','isBuffer','bytes','name','isDirectory','startsWith','isFile','toLowerCase','content','5IuRyOv','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','compare','path','120BYXKZk','has','isArray','test','toString','28saQygI','size','isSafeInteger','18898ctlIom','sha256','from','utf8'];a100_0x2b96=function(){return _0x35cdb3;};return a100_0x2b96();}export function fileText(_0x4883aa){const _0x3bece7=a100_0x2015;return fileContent(_0x4883aa)[_0x3bece7(0x1f4)](_0x3bece7(0x1fb));}export function normalizeLocalFiles(_0x4b8d1e){const _0x3eda37=a100_0x2015;if(!Array[_0x3eda37(0x1f2)](_0x4b8d1e)||_0x4b8d1e[_0x3eda37(0x1de)]===0x0)return[];const _0x23b6d2=new Map();for(const _0x25a5d7 of _0x4b8d1e){if(!_0x25a5d7||typeof _0x25a5d7!==_0x3eda37(0x1d7)||typeof _0x25a5d7['path']!=='string')throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5bce06=normalizeSkillRelativePath(_0x25a5d7[_0x3eda37(0x1ef)]);if(_0x23b6d2[_0x3eda37(0x1f1)](_0x5bce06))throw CliErrors[_0x3eda37(0x1ed)](_0x3eda37(0x1d9)+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]!==undefined&&!Buffer[_0x3eda37(0x1e3)](_0x25a5d7[_0x3eda37(0x1e4)]))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]===undefined&&typeof _0x25a5d7['content']!==_0x3eda37(0x1fc))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x5bce06);const _0x2a357a=fileContent(_0x25a5d7);_0x23b6d2[_0x3eda37(0x1fe)](_0x5bce06,{'path':_0x5bce06,'bytes':_0x2a357a});}return Array['from'](_0x23b6d2[_0x3eda37(0x1e2)]())[_0x3eda37(0x1e0)](compareSkillFiles);}export function normalizeManifestFiles(_0x5a5043){const _0xf83e6e=a100_0x2015;if(!Array[_0xf83e6e(0x1f2)](_0x5a5043)||_0x5a5043[_0xf83e6e(0x1de)]===0x0)return[];const _0x46c26=new Map();for(const _0x5ca8d4 of _0x5a5043){if(!_0x5ca8d4||typeof _0x5ca8d4!==_0xf83e6e(0x1d7)||typeof _0x5ca8d4['path']!==_0xf83e6e(0x1fc))throw CliErrors[_0xf83e6e(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1eac69=normalizeSkillRelativePath(_0x5ca8d4['path']);if(_0x46c26['has'](_0x1eac69))throw CliErrors['validation'](_0xf83e6e(0x1d9)+_0x1eac69);if(!isSha256Hex(_0x5ca8d4[_0xf83e6e(0x1f9)]))throw CliErrors['validation'](_0xf83e6e(0x200)+_0x1eac69);if(!Number[_0xf83e6e(0x1f7)](_0x5ca8d4['size'])||_0x5ca8d4[_0xf83e6e(0x1f6)]<0x0)throw CliErrors[_0xf83e6e(0x1ed)](_0xf83e6e(0x1ec)+_0x1eac69);_0x46c26[_0xf83e6e(0x1fe)](_0x1eac69,{'path':_0x1eac69,'sha256':_0x5ca8d4[_0xf83e6e(0x1f9)][_0xf83e6e(0x1e9)](),'size':_0x5ca8d4[_0xf83e6e(0x1f6)]});}return Array[_0xf83e6e(0x1fa)](_0x46c26[_0xf83e6e(0x1e2)]())[_0xf83e6e(0x1e0)](compareSkillFiles);}export function scanSkillDirectory(_0x219ebd){const _0x3ca635=realpathSync(_0x219ebd),_0x57a5a5=[];function _0x27b849(_0x5bcfc4){const _0x1489bb=a100_0x2015,_0xc38a1f=readdirSync(_0x5bcfc4,{'withFileTypes':!![]})[_0x1489bb(0x1e0)]((_0x2d8392,_0x5e49ec)=>_0x2d8392[_0x1489bb(0x1e5)]['localeCompare'](_0x5e49ec['name']));for(const _0x5404cf of _0xc38a1f){if(_0x5404cf[_0x1489bb(0x1e6)]()&&IGNORED_DIR_NAMES['has'](_0x5404cf['name']))continue;if(IGNORED_FILE_NAMES[_0x1489bb(0x1f1)](_0x5404cf[_0x1489bb(0x1e5)]))continue;const _0x598c20=resolve(_0x5bcfc4,_0x5404cf[_0x1489bb(0x1e5)]);if(_0x5404cf['isSymbolicLink']())throw CliErrors[_0x1489bb(0x1ed)](_0x1489bb(0x1dc)+_0x598c20);const _0x4e4544=toPosixPath(relative(_0x3ca635,_0x598c20));if(_0x5404cf[_0x1489bb(0x1e6)]()){_0x27b849(_0x598c20);continue;}if(!_0x5404cf[_0x1489bb(0x1e8)]())continue;validateSkillRelativePath(_0x4e4544);const _0x46c2f5=readFileSync(_0x598c20);_0x57a5a5['push']({'path':_0x4e4544,'bytes':_0x46c2f5});}}return _0x27b849(_0x3ca635),normalizeLocalFiles(_0x57a5a5);}export function compareSkillFiles(_0x74b858,_0x5c23cc){const _0x216435=a100_0x2015;if(_0x74b858[_0x216435(0x1ef)]===SKILL_FILE)return _0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE?0x0:-0x1;if(_0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE)return 0x1;return Buffer[_0x216435(0x1ee)](Buffer[_0x216435(0x1fa)](_0x74b858[_0x216435(0x1ef)],'utf8'),Buffer[_0x216435(0x1fa)](_0x5c23cc[_0x216435(0x1ef)],_0x216435(0x1fb)));}export function normalizeSkillRelativePath(_0x1a4c3f){const _0x121df6=toPosixPath(_0x1a4c3f['trim']());return validateSkillRelativePath(_0x121df6),_0x121df6;}function a100_0x2015(_0x5625f6,_0x2ba8b4){_0x5625f6=_0x5625f6-0x1d4;const _0x2b96f7=a100_0x2b96();let _0x20158e=_0x2b96f7[_0x5625f6];return _0x20158e;}export function validateSkillRelativePath(_0x138f66){const _0x1c69ff=a100_0x2015;if(!_0x138f66||_0x138f66[_0x1c69ff(0x1e7)]('/')||_0x138f66['includes']('//'))throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);for(const _0x172e16 of _0x138f66[_0x1c69ff(0x1d6)]('/')){if(!_0x172e16||_0x172e16==='.'||_0x172e16==='..')throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);}}export function toPosixPath(_0x3ab747){const _0x344124=a100_0x2015;return _0x3ab747[_0x344124(0x1da)](/\\/g,'/');}export function isSha256Hex(_0x11bd9a){const _0x50c103=a100_0x2015;return typeof _0x11bd9a==='string'&&/^[a-fA-F0-9]{64}$/[_0x50c103(0x1f3)](_0x11bd9a);}
1
+ (function(_0x36be81,_0x134e51){const _0x471461=a100_0x5f18,_0x484342=_0x36be81();while(!![]){try{const _0x128a7a=parseInt(_0x471461(0xd4))/0x1+parseInt(_0x471461(0xf6))/0x2+-parseInt(_0x471461(0xeb))/0x3+-parseInt(_0x471461(0xe4))/0x4+-parseInt(_0x471461(0xf3))/0x5+parseInt(_0x471461(0xe2))/0x6*(-parseInt(_0x471461(0xda))/0x7)+parseInt(_0x471461(0xe6))/0x8*(parseInt(_0x471461(0xe1))/0x9);if(_0x128a7a===_0x134e51)break;else _0x484342['push'](_0x484342['shift']());}catch(_0x186913){_0x484342['push'](_0x484342['shift']());}}}(a100_0x4b18,0xf0a35));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x238e12){const _0x3ecee3=a100_0x5f18;return _0x238e12[_0x3ecee3(0xf4)]??Buffer[_0x3ecee3(0xf8)](_0x238e12[_0x3ecee3(0xee)]??'',_0x3ecee3(0xfe));}export function fileText(_0x15b479){const _0x3edb1f=a100_0x5f18;return fileContent(_0x15b479)[_0x3edb1f(0xd7)]('utf8');}export function normalizeLocalFiles(_0x336578){const _0x128ab9=a100_0x5f18;if(!Array[_0x128ab9(0xe8)](_0x336578)||_0x336578['length']===0x0)return[];const _0x137c11=new Map();for(const _0x3e3d90 of _0x336578){if(!_0x3e3d90||typeof _0x3e3d90!==_0x128ab9(0xd9)||typeof _0x3e3d90[_0x128ab9(0xe5)]!==_0x128ab9(0xf0))throw CliErrors['validation'](_0x128ab9(0xdc));const _0x480013=normalizeSkillRelativePath(_0x3e3d90[_0x128ab9(0xe5)]);if(_0x137c11[_0x128ab9(0xfa)](_0x480013))throw CliErrors[_0x128ab9(0xec)](_0x128ab9(0xde)+_0x480013);if(_0x3e3d90['bytes']!==undefined&&!Buffer['isBuffer'](_0x3e3d90[_0x128ab9(0xf4)]))throw CliErrors['validation'](_0x128ab9(0xd5)+_0x480013);if(_0x3e3d90[_0x128ab9(0xf4)]===undefined&&typeof _0x3e3d90[_0x128ab9(0xee)]!==_0x128ab9(0xf0))throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x480013);const _0x43a564=fileContent(_0x3e3d90);_0x137c11[_0x128ab9(0xf5)](_0x480013,{'path':_0x480013,'bytes':_0x43a564});}return Array[_0x128ab9(0xf8)](_0x137c11[_0x128ab9(0xd3)]())[_0x128ab9(0xf9)](compareSkillFiles);}export function normalizeManifestFiles(_0x727453){const _0x5204ab=a100_0x5f18;if(!Array['isArray'](_0x727453)||_0x727453[_0x5204ab(0xef)]===0x0)return[];const _0x1494d9=new Map();for(const _0xf61b4d of _0x727453){if(!_0xf61b4d||typeof _0xf61b4d!=='object'||typeof _0xf61b4d['path']!==_0x5204ab(0xf0))throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xdc));const _0x3feb71=normalizeSkillRelativePath(_0xf61b4d[_0x5204ab(0xe5)]);if(_0x1494d9['has'](_0x3feb71))throw CliErrors[_0x5204ab(0xec)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3feb71);if(!isSha256Hex(_0xf61b4d['sha256']))throw CliErrors[_0x5204ab(0xec)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x3feb71);if(!Number[_0x5204ab(0xfc)](_0xf61b4d[_0x5204ab(0xdf)])||_0xf61b4d['size']<0x0)throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xed)+_0x3feb71);_0x1494d9[_0x5204ab(0xf5)](_0x3feb71,{'path':_0x3feb71,'sha256':_0xf61b4d[_0x5204ab(0xe3)][_0x5204ab(0xd6)](),'size':_0xf61b4d[_0x5204ab(0xdf)]});}return Array[_0x5204ab(0xf8)](_0x1494d9[_0x5204ab(0xd3)]())[_0x5204ab(0xf9)](compareSkillFiles);}export function scanSkillDirectory(_0x1b2acd){const _0x453c5b=realpathSync(_0x1b2acd),_0x118c0f=[];function _0x4fe350(_0x36cf6f){const _0x2ce979=a100_0x5f18,_0x166212=readdirSync(_0x36cf6f,{'withFileTypes':!![]})[_0x2ce979(0xf9)]((_0x3dc2c0,_0x5df6fb)=>_0x3dc2c0[_0x2ce979(0xe7)][_0x2ce979(0xea)](_0x5df6fb[_0x2ce979(0xe7)]));for(const _0x27e5de of _0x166212){if(_0x27e5de[_0x2ce979(0xe0)]()&&IGNORED_DIR_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;if(IGNORED_FILE_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;const _0x34ffa9=resolve(_0x36cf6f,_0x27e5de[_0x2ce979(0xe7)]);if(_0x27e5de[_0x2ce979(0xf7)]())throw CliErrors[_0x2ce979(0xec)](_0x2ce979(0xdb)+_0x34ffa9);const _0x1e788a=toPosixPath(relative(_0x453c5b,_0x34ffa9));if(_0x27e5de[_0x2ce979(0xe0)]()){_0x4fe350(_0x34ffa9);continue;}if(!_0x27e5de['isFile']())continue;validateSkillRelativePath(_0x1e788a);const _0x3d8638=readFileSync(_0x34ffa9);_0x118c0f[_0x2ce979(0xf2)]({'path':_0x1e788a,'bytes':_0x3d8638});}}return _0x4fe350(_0x453c5b),normalizeLocalFiles(_0x118c0f);}export function compareSkillFiles(_0x58c6a2,_0x510d69){const _0x30c5c5=a100_0x5f18;if(_0x58c6a2['path']===SKILL_FILE)return _0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE?0x0:-0x1;if(_0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x58c6a2[_0x30c5c5(0xe5)],_0x30c5c5(0xfe)),Buffer['from'](_0x510d69['path'],_0x30c5c5(0xfe)));}export function normalizeSkillRelativePath(_0xf5be73){const _0x2c11be=a100_0x5f18,_0x3fe725=toPosixPath(_0xf5be73[_0x2c11be(0xfd)]());return validateSkillRelativePath(_0x3fe725),_0x3fe725;}function a100_0x5f18(_0x41a82d,_0x4e7eb3){_0x41a82d=_0x41a82d-0xd3;const _0x4b18d2=a100_0x4b18();let _0x5f1838=_0x4b18d2[_0x41a82d];return _0x5f1838;}export function validateSkillRelativePath(_0x1da67b){const _0x3a9963=a100_0x5f18;if(!_0x1da67b||_0x1da67b[_0x3a9963(0xfb)]('/')||_0x1da67b[_0x3a9963(0xdd)]('//'))throw CliErrors[_0x3a9963(0xec)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1da67b);for(const _0x5b407b of _0x1da67b['split']('/')){if(!_0x5b407b||_0x5b407b==='.'||_0x5b407b==='..')throw CliErrors['validation'](_0x3a9963(0xd8)+_0x1da67b);}}function a100_0x4b18(){const _0x32b107=['string','replace','push','2568355MZqGvO','bytes','set','1256042xNyseJ','isSymbolicLink','from','sort','has','startsWith','isSafeInteger','trim','utf8','values','1048951dlwZBd','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','toLowerCase','toString','Unsafe\x20Skill\x20file\x20path:\x20','object','63FmuVxi','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','includes','Duplicate\x20Skill\x20file\x20path:\x20','size','isDirectory','59589xLYhYE','850194ImrXEr','sha256','6254828HbZOEK','path','4336NYCEEu','name','isArray','test','localeCompare','2781696dqVsLJ','validation','Skill\x20file\x20size\x20is\x20invalid:\x20','content','length'];a100_0x4b18=function(){return _0x32b107;};return a100_0x4b18();}export function toPosixPath(_0x589947){const _0x5e12d7=a100_0x5f18;return _0x589947[_0x5e12d7(0xf1)](/\\/g,'/');}export function isSha256Hex(_0x4670e0){const _0x58a02c=a100_0x5f18;return typeof _0x4670e0==='string'&&/^[a-fA-F0-9]{64}$/[_0x58a02c(0xe9)](_0x4670e0);}
@@ -1 +1 @@
1
- (function(_0x4ef604,_0x314846){const _0x1063f1=a101_0x4cf6,_0x3f4fe6=_0x4ef604();while(!![]){try{const _0x585038=-parseInt(_0x1063f1(0xb4))/0x1+parseInt(_0x1063f1(0xab))/0x2*(-parseInt(_0x1063f1(0x8c))/0x3)+parseInt(_0x1063f1(0xae))/0x4+parseInt(_0x1063f1(0x9d))/0x5+-parseInt(_0x1063f1(0xad))/0x6*(parseInt(_0x1063f1(0xbc))/0x7)+-parseInt(_0x1063f1(0x9c))/0x8*(-parseInt(_0x1063f1(0x8e))/0x9)+parseInt(_0x1063f1(0xb2))/0xa*(-parseInt(_0x1063f1(0xb5))/0xb);if(_0x585038===_0x314846)break;else _0x3f4fe6['push'](_0x3f4fe6['shift']());}catch(_0x154c8a){_0x3f4fe6['push'](_0x3f4fe6['shift']());}}}(a101_0x4ad8,0xe102e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a101_0x4cf6(_0x5942f3,_0x135071){_0x5942f3=_0x5942f3-0x87;const _0x4ad84f=a101_0x4ad8();let _0x4cf682=_0x4ad84f[_0x5942f3];return _0x4cf682;}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';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x18ccd7,_0x565c01,_0x339759){const _0x3d0406=a101_0x4cf6,_0x478beb=requireSkillCode(_0x18ccd7),_0x1c6bba=requirePackageBytes(_0x478beb,_0x339759[_0x3d0406(0xa3)]),_0x20b936=extractDownloadedPackage(_0x1c6bba),_0x444ba4=_0x20b936[_0x3d0406(0x94)](_0x4e08f7=>_0x4e08f7[_0x3d0406(0xa7)]===SKILL_FILE);if(!_0x444ba4)throw CliErrors['validation'](_0x3d0406(0x89)+SKILL_FILE+':\x20'+_0x478beb);const _0x1db07c=withMaterializedSkillFrontmatter(_0x20b936,_0x18ccd7,_0x478beb),_0x2ece63=_0x1db07c[_0x3d0406(0x94)](_0x40dbfe=>_0x40dbfe[_0x3d0406(0xa7)]===SKILL_FILE),_0x4f123c=fileText(_0x2ece63),_0x13e279=getRuntimeSkillDir(_0x339759[_0x3d0406(0x9f)],_0x339759['accessKey'],_0x339759[_0x3d0406(0x99)],_0x565c01,_0x478beb,_0x339759[_0x3d0406(0xb1)]),_0x2136f8=resolve(_0x13e279,SKILL_FILE),_0x3207ac=resolve(_0x13e279,METADATA_FILE),_0x333afb=contentHash(_0x4f123c),_0x3ae24c=readMetadataIfPresent(_0x3207ac)?.[_0x3d0406(0x9e)];ensurePulledFilesCanBeOverwritten(_0x13e279,_0x3207ac,_0x1db07c,_0x339759[_0x3d0406(0x8d)]===!![]),mkdirSync(_0x13e279,{'recursive':!![],'mode':0x1c0});const _0x54d40a=existsSync(_0x2136f8)?readFileSync(_0x2136f8,'utf8'):undefined;return materializeFiles(_0x13e279,_0x1db07c),removeStaleManagedFiles(_0x13e279,_0x3ae24c,_0x1db07c),writeJsonAtomic(_0x3207ac,buildMetadata(_0x18ccd7,_0x565c01,_0x339759[_0x3d0406(0x99)],_0x333afb,_0x339759[_0x3d0406(0xa6)],_0x1db07c,_0x1c6bba)),{'skill':_0x18ccd7,'scope':_0x565c01,'dir':_0x13e279,'skillMdPath':_0x2136f8,'metadataPath':_0x3207ac,'contentHash':_0x333afb,'changed':_0x54d40a!==_0x4f123c};}function withMaterializedSkillFrontmatter(_0x2284d,_0x182b16,_0x23a34e){const _0x25eb53=a101_0x4cf6,_0xe762f0=skillDisplayName(_0x182b16,_0x23a34e),_0xe32dd5=_0x182b16[_0x25eb53(0x9b)]?.[_0x25eb53(0xa2)]()||_0xe762f0||_0x23a34e;return normalizeLocalFiles(_0x2284d)[_0x25eb53(0x9a)](_0x6e20f7=>{const _0x474b31=_0x25eb53,_0x3c558f=fileText(_0x6e20f7);if(_0x6e20f7[_0x474b31(0xa7)]!==SKILL_FILE)return _0x6e20f7;if(hasYamlFrontmatter(_0x3c558f))return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':withSyncedDisplayName(_0x3c558f,_0xe762f0)};return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':prependSkillFrontmatter(_0x3c558f,{'name':_0x23a34e,'displayName':_0xe762f0,'description':_0xe32dd5})};});}function hasYamlFrontmatter(_0x25ce3d){const _0x426c3b=a101_0x4cf6;return/^\uFEFF?---\s*\r?\n/[_0x426c3b(0x92)](_0x25ce3d);}function prependSkillFrontmatter(_0x386e36,_0x454ecc){const _0x58895d=a101_0x4cf6,_0x2f689f=_0x386e36[_0x58895d(0xaa)](/^\uFEFF/,'');return[_0x58895d(0x87),_0x58895d(0x97)+yamlString(_0x454ecc[_0x58895d(0x90)]),_0x454ecc[_0x58895d(0xb8)]?'displayName:\x20'+yamlString(_0x454ecc['displayName']):undefined,_0x58895d(0xb7)+yamlString(_0x454ecc[_0x58895d(0x9b)]),_0x58895d(0x87),'',_0x2f689f][_0x58895d(0x96)](_0x1bbcb4=>_0x1bbcb4!==undefined)['join']('\x0a');}function yamlString(_0x307da3){const _0x481aa0=a101_0x4cf6;return JSON[_0x481aa0(0xb6)](_0x307da3[_0x481aa0(0xaa)](/\r/g,'')[_0x481aa0(0xa2)]());}function skillDisplayName(_0xd551c2,_0x2ccecb){const _0x1dbfc1=a101_0x4cf6,_0x4a93ad=_0xd551c2[_0x1dbfc1(0x91)]?.['trim']();return _0x4a93ad||_0x2ccecb;}function a101_0x4ad8(){const _0x9e4fbe=['test','keys','find','---\x0a','filter','name:\x20','errors','appCode','map','description','640EzbXhm','6127260MiJTPH','fileHashes','env','validation','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','trim','packageBytes','has','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','pulledAt','path','entries','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','replace','2VbBeeu','length','244290VKsEOk','1672704cuqSZo','isFile','contents','paths','1328460lWDIBl','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','512022kgvZkX','77aleWtg','stringify','description:\x20','displayName','\x0a---\x0a\x0a','set','delete','7MeXHLm','.\x20Changed\x20file:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','contentHash','utf8','2607969EiJqAd','force','183375fKJcjR','match','name','skillName'];a101_0x4ad8=function(){return _0x9e4fbe;};return a101_0x4ad8();}function withSyncedDisplayName(_0x3b7a20,_0x1711fa){const _0x38e6a5=a101_0x4cf6,_0x52fac3=_0x3b7a20[_0x38e6a5(0x8f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52fac3)return _0x3b7a20;const _0x17d675=_0x52fac3[0x1]??'',_0x2687bb=_0x52fac3[0x2]??'',_0x481a46=parseDocument(_0x2687bb);if(_0x481a46[_0x38e6a5(0x98)][_0x38e6a5(0xac)]>0x0||!isMap(_0x481a46[_0x38e6a5(0xb0)]))return _0x3b7a20;if(_0x1711fa)_0x481a46[_0x38e6a5(0xba)](_0x38e6a5(0xb8),_0x1711fa);else{if(_0x481a46[_0x38e6a5(0xa4)](_0x38e6a5(0xb8)))_0x481a46[_0x38e6a5(0xbb)](_0x38e6a5(0xb8));else return _0x3b7a20;}const _0x27cadc=String(_0x481a46)['trimEnd'](),_0x10cb7f=_0x3b7a20['slice'](_0x52fac3[0x0]['length'])[_0x38e6a5(0xaa)](/^\r?\n/,'');return _0x17d675+_0x38e6a5(0x95)+_0x27cadc+_0x38e6a5(0xb9)+_0x10cb7f;}function ensurePulledFilesCanBeOverwritten(_0x2a91c7,_0x1448d2,_0x271344,_0x77f34f){const _0x2d0605=a101_0x4cf6;if(_0x77f34f||!existsSync(_0x1448d2))return;const _0x4ea78b=readMetadataIfPresent(_0x1448d2);if(!_0x4ea78b)return;const _0xc513b8=_0x4ea78b[_0x2d0605(0x9e)]&&Object[_0x2d0605(0x93)](_0x4ea78b[_0x2d0605(0x9e)])[_0x2d0605(0xac)]>0x0?_0x4ea78b[_0x2d0605(0x9e)]:undefined;if(_0xc513b8)for(const [_0xf1816b,_0xc71ab]of Object[_0x2d0605(0xa8)](_0xc513b8)){const _0x44ca40=resolveManagedFilePath(_0x2a91c7,_0xf1816b);if(!existsSync(_0x44ca40))throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0xf1816b);const _0x6f8c9f=lstatSync(_0x44ca40);if(!_0x6f8c9f[_0x2d0605(0xaf)]())throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xb3)+_0xf1816b);const _0x42e8=bufferSha256(readFileSync(_0x44ca40));if(_0x42e8!==_0xc71ab)throw CliErrors[_0x2d0605(0xa0)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2a91c7+_0x2d0605(0xbd)+_0xf1816b,_0x2d0605(0x88)+_0xf1816b);}else{const _0x3430dd=resolve(_0x2a91c7,SKILL_FILE);if(existsSync(_0x3430dd)&&_0x4ea78b[_0x2d0605(0x8a)]){const _0x70087c=contentHash(readFileSync(_0x3430dd,_0x2d0605(0x8b)));if(_0x70087c!==_0x4ea78b['contentHash'])throw CliErrors[_0x2d0605(0xa0)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3430dd,_0x2d0605(0xa1));}}for(const _0x4d6520 of normalizeLocalFiles(_0x271344)){if(_0xc513b8?.[_0x4d6520[_0x2d0605(0xa7)]])continue;if(!_0xc513b8&&_0x4d6520[_0x2d0605(0xa7)]===SKILL_FILE)continue;const _0x45860d=resolveManagedFilePath(_0x2a91c7,_0x4d6520[_0x2d0605(0xa7)]);if(!existsSync(_0x45860d))continue;const _0x46e7e6=lstatSync(_0x45860d);if(!_0x46e7e6[_0x2d0605(0xaf)]())throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xa9)+_0x4d6520['path']);const _0x2f69ed=bufferSha256(readFileSync(_0x45860d));if(_0x2f69ed!==fileHash(_0x4d6520))throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x4d6520[_0x2d0605(0xa7)]);}}function materializeFiles(_0x1b313f,_0x42a501){for(const _0x4447b6 of normalizeLocalFiles(_0x42a501)){const _0x29d526=resolveManagedFilePath(_0x1b313f,_0x4447b6['path']);mkdirSync(dirname(_0x29d526),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x29d526,fileContent(_0x4447b6),0x180);}}function removeStaleManagedFiles(_0x41ef0a,_0x1ca2ae,_0x101d0a){const _0x1c2fc1=a101_0x4cf6;if(!_0x1ca2ae)return;const _0x4567f9=new Set(normalizeLocalFiles(_0x101d0a)[_0x1c2fc1(0x9a)](_0x423747=>_0x423747[_0x1c2fc1(0xa7)]));for(const _0x52eb32 of Object[_0x1c2fc1(0x93)](_0x1ca2ae)){if(_0x4567f9[_0x1c2fc1(0xa4)](_0x52eb32))continue;const _0x30b4fa=resolveManagedFilePath(_0x41ef0a,_0x52eb32);existsSync(_0x30b4fa)&&lstatSync(_0x30b4fa)[_0x1c2fc1(0xaf)]()&&rmSync(_0x30b4fa,{'force':!![]});}}
1
+ (function(_0x135b4c,_0x26f528){const _0x4982bd=a101_0x4c2b,_0x306812=_0x135b4c();while(!![]){try{const _0x19ddcb=-parseInt(_0x4982bd(0xb4))/0x1+-parseInt(_0x4982bd(0xd3))/0x2+parseInt(_0x4982bd(0xbe))/0x3*(-parseInt(_0x4982bd(0xcc))/0x4)+parseInt(_0x4982bd(0xc5))/0x5*(-parseInt(_0x4982bd(0xb1))/0x6)+-parseInt(_0x4982bd(0xd5))/0x7+parseInt(_0x4982bd(0xd7))/0x8+parseInt(_0x4982bd(0xd6))/0x9;if(_0x19ddcb===_0x26f528)break;else _0x306812['push'](_0x306812['shift']());}catch(_0x5a7ac7){_0x306812['push'](_0x306812['shift']());}}}(a101_0x1fde,0xdd90d));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a101_0x4c2b(_0x1ece85,_0x44dbd2){_0x1ece85=_0x1ece85-0xac;const _0x1fde93=a101_0x1fde();let _0x4c2b24=_0x1fde93[_0x1ece85];return _0x4c2b24;}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';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xf9e72e,_0x330c44,_0x9c4bd8){const _0x1712c9=a101_0x4c2b,_0x1b52b5=requireSkillCode(_0xf9e72e),_0x5481a9=requirePackageBytes(_0x1b52b5,_0x9c4bd8[_0x1712c9(0xe4)]),_0x42a0aa=extractDownloadedPackage(_0x5481a9),_0x2b1ffc=_0x42a0aa[_0x1712c9(0xc0)](_0x2d84b0=>_0x2d84b0['path']===SKILL_FILE);if(!_0x2b1ffc)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x1b52b5);const _0x1e7591=withMaterializedSkillFrontmatter(_0x42a0aa,_0xf9e72e,_0x1b52b5),_0xdf1136=_0x1e7591[_0x1712c9(0xc0)](_0x5e6df9=>_0x5e6df9[_0x1712c9(0xaf)]===SKILL_FILE),_0x48f59c=fileText(_0xdf1136),_0x203d94=getRuntimeSkillDir(_0x9c4bd8[_0x1712c9(0xc9)],_0x9c4bd8[_0x1712c9(0xca)],_0x9c4bd8[_0x1712c9(0xc3)],_0x330c44,_0x1b52b5,_0x9c4bd8[_0x1712c9(0xcf)]),_0x3017df=resolve(_0x203d94,SKILL_FILE),_0x29fccc=resolve(_0x203d94,METADATA_FILE),_0xd40ac2=contentHash(_0x48f59c),_0x1e69b4=readMetadataIfPresent(_0x29fccc)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x203d94,_0x29fccc,_0x1e7591,_0x9c4bd8['force']===!![]),mkdirSync(_0x203d94,{'recursive':!![],'mode':0x1c0});const _0x30ae18=existsSync(_0x3017df)?readFileSync(_0x3017df,_0x1712c9(0xd9)):undefined;return materializeFiles(_0x203d94,_0x1e7591),removeStaleManagedFiles(_0x203d94,_0x1e69b4,_0x1e7591),writeJsonAtomic(_0x29fccc,buildMetadata(_0xf9e72e,_0x330c44,_0x9c4bd8[_0x1712c9(0xc3)],_0xd40ac2,_0x9c4bd8[_0x1712c9(0xe5)],_0x1e7591,_0x5481a9)),{'skill':_0xf9e72e,'scope':_0x330c44,'dir':_0x203d94,'skillMdPath':_0x3017df,'metadataPath':_0x29fccc,'contentHash':_0xd40ac2,'changed':_0x30ae18!==_0x48f59c};}function withMaterializedSkillFrontmatter(_0x463411,_0x57b54f,_0x28c42f){const _0x5ed103=a101_0x4c2b,_0x24c6f4=skillDisplayName(_0x57b54f,_0x28c42f),_0x5ba529=_0x57b54f['description']?.[_0x5ed103(0xb0)]()||_0x24c6f4||_0x28c42f;return normalizeLocalFiles(_0x463411)[_0x5ed103(0xd8)](_0x36d488=>{const _0x40040e=_0x5ed103,_0x129a41=fileText(_0x36d488);if(_0x36d488[_0x40040e(0xaf)]!==SKILL_FILE)return _0x36d488;if(hasYamlFrontmatter(_0x129a41))return{'path':_0x36d488[_0x40040e(0xaf)],'content':withSyncedDisplayName(_0x129a41,_0x24c6f4)};return{'path':_0x36d488['path'],'content':prependSkillFrontmatter(_0x129a41,{'name':_0x28c42f,'displayName':_0x24c6f4,'description':_0x5ba529})};});}function hasYamlFrontmatter(_0x56e002){const _0x1f881c=a101_0x4c2b;return/^\uFEFF?---\s*\r?\n/[_0x1f881c(0xac)](_0x56e002);}function prependSkillFrontmatter(_0x16881b,_0x110b41){const _0x427b35=a101_0x4c2b,_0x3c55ae=_0x16881b[_0x427b35(0xc8)](/^\uFEFF/,'');return['---',_0x427b35(0xd1)+yamlString(_0x110b41[_0x427b35(0xcb)]),_0x110b41['displayName']?_0x427b35(0xb9)+yamlString(_0x110b41['displayName']):undefined,_0x427b35(0xdf)+yamlString(_0x110b41[_0x427b35(0xad)]),_0x427b35(0xd4),'',_0x3c55ae][_0x427b35(0xdb)](_0x4d2b41=>_0x4d2b41!==undefined)[_0x427b35(0xbb)]('\x0a');}function yamlString(_0x5ce85e){const _0x5c72df=a101_0x4c2b;return JSON[_0x5c72df(0xae)](_0x5ce85e['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x31edf7,_0x1c1868){const _0xd7326=a101_0x4c2b,_0x5c1a77=_0x31edf7[_0xd7326(0xe1)]?.['trim']();return _0x5c1a77||_0x1c1868;}function withSyncedDisplayName(_0x57bd76,_0x2f87da){const _0x4704ec=a101_0x4c2b,_0x4e3a4e=_0x57bd76['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4e3a4e)return _0x57bd76;const _0x458f9f=_0x4e3a4e[0x1]??'',_0x3e8508=_0x4e3a4e[0x2]??'',_0x548241=parseDocument(_0x3e8508);if(_0x548241['errors'][_0x4704ec(0xc7)]>0x0||!isMap(_0x548241[_0x4704ec(0xb6)]))return _0x57bd76;if(_0x2f87da)_0x548241[_0x4704ec(0xba)](_0x4704ec(0xda),_0x2f87da);else{if(_0x548241[_0x4704ec(0xe3)](_0x4704ec(0xda)))_0x548241[_0x4704ec(0xb2)](_0x4704ec(0xda));else return _0x57bd76;}_0x548241[_0x4704ec(0xb6)][_0x4704ec(0xe2)]=![];const _0x8b59a5=_0x548241[_0x4704ec(0xce)]({'lineWidth':0x0})['trimEnd'](),_0x4c68bb=_0x57bd76[_0x4704ec(0xbc)](_0x4e3a4e[0x0][_0x4704ec(0xc7)])[_0x4704ec(0xc8)](/^\r?\n/,'');return _0x458f9f+_0x4704ec(0xd2)+_0x8b59a5+_0x4704ec(0xb7)+_0x4c68bb;}function ensurePulledFilesCanBeOverwritten(_0x755f37,_0x4e206d,_0x29a17c,_0x5aed0c){const _0x44c2bb=a101_0x4c2b;if(_0x5aed0c||!existsSync(_0x4e206d))return;const _0x322043=readMetadataIfPresent(_0x4e206d);if(!_0x322043)return;const _0x27f619=_0x322043[_0x44c2bb(0xb3)]&&Object[_0x44c2bb(0xbd)](_0x322043[_0x44c2bb(0xb3)])[_0x44c2bb(0xc7)]>0x0?_0x322043[_0x44c2bb(0xb3)]:undefined;if(_0x27f619)for(const [_0x5d2562,_0x513734]of Object[_0x44c2bb(0xde)](_0x27f619)){const _0x351724=resolveManagedFilePath(_0x755f37,_0x5d2562);if(!existsSync(_0x351724))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdd)+_0x5d2562);const _0x8930d1=lstatSync(_0x351724);if(!_0x8930d1['isFile']())throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdc)+_0x5d2562);const _0x436392=bufferSha256(readFileSync(_0x351724));if(_0x436392!==_0x513734)throw CliErrors[_0x44c2bb(0xbf)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x755f37+_0x44c2bb(0xcd)+_0x5d2562,_0x44c2bb(0xe0)+_0x5d2562);}else{const _0x2ef45a=resolve(_0x755f37,SKILL_FILE);if(existsSync(_0x2ef45a)&&_0x322043[_0x44c2bb(0xb5)]){const _0x56dff4=contentHash(readFileSync(_0x2ef45a,_0x44c2bb(0xd9)));if(_0x56dff4!==_0x322043[_0x44c2bb(0xb5)])throw CliErrors['validation'](_0x44c2bb(0xc1)+_0x2ef45a,_0x44c2bb(0xd0));}}for(const _0x37b0ac of normalizeLocalFiles(_0x29a17c)){if(_0x27f619?.[_0x37b0ac['path']])continue;if(!_0x27f619&&_0x37b0ac['path']===SKILL_FILE)continue;const _0x3d29ce=resolveManagedFilePath(_0x755f37,_0x37b0ac[_0x44c2bb(0xaf)]);if(!existsSync(_0x3d29ce))continue;const _0x187715=lstatSync(_0x3d29ce);if(!_0x187715[_0x44c2bb(0xc6)]())throw CliErrors['validation'](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xb8)+_0x37b0ac[_0x44c2bb(0xaf)]);const _0x2aff19=bufferSha256(readFileSync(_0x3d29ce));if(_0x2aff19!==fileHash(_0x37b0ac))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xc4)+_0x37b0ac[_0x44c2bb(0xaf)]);}}function materializeFiles(_0x2d33f7,_0x1b5090){const _0x2e0fb7=a101_0x4c2b;for(const _0x50e9b1 of normalizeLocalFiles(_0x1b5090)){const _0x103b7f=resolveManagedFilePath(_0x2d33f7,_0x50e9b1[_0x2e0fb7(0xaf)]);mkdirSync(dirname(_0x103b7f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x103b7f,fileContent(_0x50e9b1),0x180);}}function removeStaleManagedFiles(_0x2f41fe,_0x332abe,_0x3bbcff){const _0x12c63c=a101_0x4c2b;if(!_0x332abe)return;const _0x4cd09a=new Set(normalizeLocalFiles(_0x3bbcff)[_0x12c63c(0xd8)](_0x31d2f5=>_0x31d2f5[_0x12c63c(0xaf)]));for(const _0x177c6b of Object['keys'](_0x332abe)){if(_0x4cd09a[_0x12c63c(0xe3)](_0x177c6b))continue;const _0x5e350d=resolveManagedFilePath(_0x2f41fe,_0x177c6b);existsSync(_0x5e350d)&&lstatSync(_0x5e350d)['isFile']()&&rmSync(_0x5e350d,{'force':!![]});}}function a101_0x1fde(){const _0x209430=['flow','has','packageBytes','pulledAt','test','description','stringify','path','trim','1450746JEgiqk','delete','fileHashes','269369NoLPuk','contentHash','contents','\x0a---\x0a\x0a','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','displayName:\x20','set','join','slice','keys','117rYmQPE','validation','find','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','35BVoubw','isFile','length','replace','env','accessKey','name','36412vcbJrR','.\x20Changed\x20file:\x20','toString','paths','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','name:\x20','---\x0a','1375632KDgEnn','---','12163193emWRrc','40272894aqjXDd','9400840cELwuj','map','utf8','displayName','filter','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','entries','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','skillName'];a101_0x1fde=function(){return _0x209430;};return a101_0x1fde();}
@@ -1 +1 @@
1
- function a102_0x1ddc(_0x331101,_0x290269){_0x331101=_0x331101-0x17a;const _0x4355bc=a102_0x4355();let _0x1ddce7=_0x4355bc[_0x331101];return _0x1ddce7;}(function(_0x4446f0,_0x4d76a9){const _0x56c812=a102_0x1ddc,_0x2f71c2=_0x4446f0();while(!![]){try{const _0x34f4b9=parseInt(_0x56c812(0x193))/0x1*(parseInt(_0x56c812(0x19b))/0x2)+parseInt(_0x56c812(0x195))/0x3*(-parseInt(_0x56c812(0x185))/0x4)+-parseInt(_0x56c812(0x198))/0x5*(-parseInt(_0x56c812(0x19e))/0x6)+parseInt(_0x56c812(0x17b))/0x7+-parseInt(_0x56c812(0x182))/0x8*(-parseInt(_0x56c812(0x188))/0x9)+parseInt(_0x56c812(0x17c))/0xa*(parseInt(_0x56c812(0x196))/0xb)+parseInt(_0x56c812(0x18f))/0xc*(-parseInt(_0x56c812(0x187))/0xd);if(_0x34f4b9===_0x4d76a9)break;else _0x2f71c2['push'](_0x2f71c2['shift']());}catch(_0x2565c8){_0x2f71c2['push'](_0x2f71c2['shift']());}}}(a102_0x4355,0x1eae3));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(_0x3d3295,_0x25cdbc,_0x14ab0a,_0x1976d6,_0x49ddd8,_0x57fcb8,_0x2570f8){const _0x702c36=a102_0x1ddc,_0x26f445=_0x57fcb8?normalizeLocalFiles(_0x57fcb8):[],_0x2f14bb=!_0x2570f8&&_0x26f445[_0x702c36(0x19c)]>0x0?buildSkillPackage(_0x26f445):undefined,_0xeff923=_0x2570f8?bufferSha256(_0x2570f8):_0x2f14bb?.[_0x702c36(0x194)]['zipSha256'],_0x12907f=_0x2570f8?.[_0x702c36(0x19c)]??_0x2f14bb?.[_0x702c36(0x194)][_0x702c36(0x17f)],_0x1799a1=_0x26f445['length']>0x0?Object[_0x702c36(0x192)](_0x26f445[_0x702c36(0x19a)](_0x33b253=>[_0x33b253[_0x702c36(0x17a)],fileHash(_0x33b253)])):undefined;return{'schemaVersion':_0x26f445[_0x702c36(0x19c)]>0x0?0x2:0x1,'id':_0x3d3295['id'],'appCode':_0x14ab0a,'skillCode':requireSkillCode(_0x3d3295),'skillName':_0x3d3295['skillName'],'description':_0x3d3295['description'],'scope':_0x25cdbc,'readonly':_0x25cdbc!==_0x702c36(0x189)||_0x3d3295[_0x702c36(0x18b)]===!![],'tenantCode':_0x3d3295[_0x702c36(0x184)],'userId':_0x3d3295['userId'],'version':_0x3d3295[_0x702c36(0x199)],'status':_0x3d3295['status'],'tags':Array[_0x702c36(0x180)](_0x3d3295[_0x702c36(0x18d)])?_0x3d3295['tags']:[],'hasUpstreamUpdate':_0x3d3295[_0x702c36(0x190)],'forkedFromSkillId':_0x3d3295['forkedFromSkillId'],'forkedFromVersion':_0x3d3295[_0x702c36(0x18a)],'sourceSessionId':_0x3d3295[_0x702c36(0x18c)],'contentHash':_0x1976d6,'fileHashes':_0x1799a1,'treeHash':_0x26f445[_0x702c36(0x19c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x26f445)):undefined,'ossPath':remoteManifestOssPath(_0x3d3295[_0x702c36(0x183)]),'zipSha256':_0xeff923,'zipSize':_0x12907f,'files':_0x26f445['length']>0x0?_0x26f445['map'](_0x5a6cbb=>({'path':_0x5a6cbb[_0x702c36(0x17a)],'hash':fileHash(_0x5a6cbb),'size':fileContent(_0x5a6cbb)['length']})):undefined,'pulledAt':_0x49ddd8??new Date()[_0x702c36(0x197)]()};}export function requireSkillCode(_0x3011e3){const _0x2b49bd=a102_0x1ddc,_0x2067fe=_0x3011e3[_0x2b49bd(0x19d)]?.[_0x2b49bd(0x17d)]();if(!_0x2067fe)throw CliErrors['validation'](_0x2b49bd(0x19f));return _0x2067fe;}function a102_0x4355(){const _0x35e1d3=['sourceSessionId','tags','Invalid\x20','108aoCpTD','hasUpstreamUpdate','ossPath','fromEntries','164414QOGojQ','manifest','151809gKGChS','22539ILszab','toISOString','5BQXZCu','version','map','2ZOzfdj','length','skillCode','1392306rismFd','Runtime\x20Skill\x20is\x20missing\x20skillCode.','path','255710qXtRrP','310oRilqk','trim','validation','zipSize','isArray','object','414992wklfcj','files','tenantCode','4KJYQPa','utf8','687362eccrdp','27ZxWiGm','personal','forkedFromVersion','readonly'];a102_0x4355=function(){return _0x35e1d3;};return a102_0x4355();}export function readMetadataIfPresent(_0x1d87a2){const _0x546c70=a102_0x1ddc;if(!existsSync(_0x1d87a2))return undefined;try{const _0x34d0ee=JSON['parse'](readFileSync(_0x1d87a2,_0x546c70(0x186)));return _0x34d0ee;}catch{throw CliErrors[_0x546c70(0x17e)](_0x546c70(0x18e)+METADATA_FILE+':\x20'+_0x1d87a2);}}function remoteManifestOssPath(_0xd9a539){const _0x233fdd=a102_0x1ddc;if(!_0xd9a539||typeof _0xd9a539!==_0x233fdd(0x181)||Array['isArray'](_0xd9a539))return undefined;const _0x25437c=_0xd9a539[_0x233fdd(0x191)];return typeof _0x25437c==='string'&&_0x25437c[_0x233fdd(0x17d)]()?_0x25437c[_0x233fdd(0x17d)]():undefined;}
1
+ (function(_0x164432,_0x549f62){const _0x1b4709=a102_0x213f,_0x1c7120=_0x164432();while(!![]){try{const _0x1198f8=parseInt(_0x1b4709(0xca))/0x1+parseInt(_0x1b4709(0xd8))/0x2+-parseInt(_0x1b4709(0xdc))/0x3*(parseInt(_0x1b4709(0xdb))/0x4)+parseInt(_0x1b4709(0xc7))/0x5*(-parseInt(_0x1b4709(0xe1))/0x6)+parseInt(_0x1b4709(0xd3))/0x7*(parseInt(_0x1b4709(0xc8))/0x8)+parseInt(_0x1b4709(0xe6))/0x9*(-parseInt(_0x1b4709(0xcc))/0xa)+parseInt(_0x1b4709(0xd1))/0xb;if(_0x1198f8===_0x549f62)break;else _0x1c7120['push'](_0x1c7120['shift']());}catch(_0x40b75a){_0x1c7120['push'](_0x1c7120['shift']());}}}(a102_0x1d69,0x87141));function a102_0x213f(_0x20f521,_0x3de763){_0x20f521=_0x20f521-0xc1;const _0x1d693e=a102_0x1d69();let _0x213f09=_0x1d693e[_0x20f521];return _0x213f09;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a102_0x1d69(){const _0x3cebd4=['tenantCode','readonly','88746UyLGiR','status','zipSize','ossPath','forkedFromVersion','8283663PoSFGh','files','object','isArray','Invalid\x20','hasUpstreamUpdate','personal','tags','skillCode','105NGVPlS','24648vPLxmH','userId','198546PtvdCs','zipSha256','10TgkZck','toISOString','trim','description','validation','20246941TCrpps','utf8','735Rjtclo','map','version','skillName','forkedFromSkillId','891280AuHwtN','string','length','195052NsdzsP','63dqUzMt','parse','manifest'];a102_0x1d69=function(){return _0x3cebd4;};return a102_0x1d69();}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(_0x4dffe2,_0x3d5b7a,_0x5aedc6,_0x540b34,_0x2a2a88,_0x19cf9a,_0x2f0688){const _0xf1f019=a102_0x213f,_0x5c42dd=_0x19cf9a?normalizeLocalFiles(_0x19cf9a):[],_0x1ee12a=!_0x2f0688&&_0x5c42dd[_0xf1f019(0xda)]>0x0?buildSkillPackage(_0x5c42dd):undefined,_0x1e0866=_0x2f0688?bufferSha256(_0x2f0688):_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xcb)],_0x145998=_0x2f0688?.[_0xf1f019(0xda)]??_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xe3)],_0x68f1ba=_0x5c42dd['length']>0x0?Object['fromEntries'](_0x5c42dd[_0xf1f019(0xd4)](_0x117717=>[_0x117717['path'],fileHash(_0x117717)])):undefined;return{'schemaVersion':_0x5c42dd[_0xf1f019(0xda)]>0x0?0x2:0x1,'id':_0x4dffe2['id'],'appCode':_0x5aedc6,'skillCode':requireSkillCode(_0x4dffe2),'skillName':_0x4dffe2[_0xf1f019(0xd6)],'description':_0x4dffe2[_0xf1f019(0xcf)],'scope':_0x3d5b7a,'readonly':_0x3d5b7a!==_0xf1f019(0xc4)||_0x4dffe2[_0xf1f019(0xe0)]===!![],'tenantCode':_0x4dffe2[_0xf1f019(0xdf)],'userId':_0x4dffe2[_0xf1f019(0xc9)],'version':_0x4dffe2[_0xf1f019(0xd5)],'status':_0x4dffe2[_0xf1f019(0xe2)],'tags':Array[_0xf1f019(0xc1)](_0x4dffe2[_0xf1f019(0xc5)])?_0x4dffe2[_0xf1f019(0xc5)]:[],'hasUpstreamUpdate':_0x4dffe2[_0xf1f019(0xc3)],'forkedFromSkillId':_0x4dffe2[_0xf1f019(0xd7)],'forkedFromVersion':_0x4dffe2[_0xf1f019(0xe5)],'sourceSessionId':_0x4dffe2['sourceSessionId'],'contentHash':_0x540b34,'fileHashes':_0x68f1ba,'treeHash':_0x5c42dd[_0xf1f019(0xda)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5c42dd)):undefined,'ossPath':remoteManifestOssPath(_0x4dffe2[_0xf1f019(0xe7)]),'zipSha256':_0x1e0866,'zipSize':_0x145998,'files':_0x5c42dd[_0xf1f019(0xda)]>0x0?_0x5c42dd[_0xf1f019(0xd4)](_0x58eb87=>({'path':_0x58eb87['path'],'hash':fileHash(_0x58eb87),'size':fileContent(_0x58eb87)[_0xf1f019(0xda)]})):undefined,'pulledAt':_0x2a2a88??new Date()[_0xf1f019(0xcd)]()};}export function requireSkillCode(_0x304ccf){const _0x42edee=a102_0x213f,_0x2b7a15=_0x304ccf[_0x42edee(0xc6)]?.['trim']();if(!_0x2b7a15)throw CliErrors[_0x42edee(0xd0)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x2b7a15;}export function readMetadataIfPresent(_0x4035ff){const _0x25afbd=a102_0x213f;if(!existsSync(_0x4035ff))return undefined;try{const _0x26c404=JSON[_0x25afbd(0xdd)](readFileSync(_0x4035ff,_0x25afbd(0xd2)));return _0x26c404;}catch{throw CliErrors[_0x25afbd(0xd0)](_0x25afbd(0xc2)+METADATA_FILE+':\x20'+_0x4035ff);}}function remoteManifestOssPath(_0x33f21d){const _0x46920e=a102_0x213f;if(!_0x33f21d||typeof _0x33f21d!==_0x46920e(0xe8)||Array[_0x46920e(0xc1)](_0x33f21d))return undefined;const _0x1d3574=_0x33f21d[_0x46920e(0xe4)];return typeof _0x1d3574===_0x46920e(0xd9)&&_0x1d3574[_0x46920e(0xce)]()?_0x1d3574['trim']():undefined;}
@@ -1 +1 @@
1
- function a103_0x1349(){const _0xb76001=['homeDir','.claude','path\x20segment','153684KmJfgu','.agents','trim','3477664NHhUmQ','SKILL_ROOT','282441PLRTEU','skills','3733450mbfahX','9EGCOPZ','skillCode','2196uJrVFs','1685wOodne','1842lddnFU','\x20for\x20local\x20path:\x20','9149cJSGNK','284424JeUweg','homeDirName','includes','CLAUDE_SKILL_ROOT','appCode','Unsafe\x20'];a103_0x1349=function(){return _0xb76001;};return a103_0x1349();}const a103_0x1fe7bf=a103_0x184c;(function(_0x3cfb15,_0xbb37c7){const _0x309c21=a103_0x184c,_0xa5e15c=_0x3cfb15();while(!![]){try{const _0x594c1a=-parseInt(_0x309c21(0x201))/0x1+parseInt(_0x309c21(0x1f2))/0x2+-parseInt(_0x309c21(0x1f7))/0x3+parseInt(_0x309c21(0x1fc))/0x4*(parseInt(_0x309c21(0x1fd))/0x5)+-parseInt(_0x309c21(0x1fe))/0x6*(-parseInt(_0x309c21(0x200))/0x7)+-parseInt(_0x309c21(0x1f5))/0x8+-parseInt(_0x309c21(0x1fa))/0x9*(-parseInt(_0x309c21(0x1f9))/0xa);if(_0x594c1a===_0xbb37c7)break;else _0xa5e15c['push'](_0xa5e15c['shift']());}catch(_0x8806c3){_0xa5e15c['push'](_0xa5e15c['shift']());}}}(a103_0x1349,0x367c2));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(_0x386939={}){const _0x6474ea=a103_0x184c,_0x1d1810=_0x386939[_0x6474ea(0x1ef)]??homedir(),_0x4e6cdf=resolve(_0x1d1810,PRODUCT_CONFIG[_0x6474ea(0x202)],'cache'),_0x473f8a=trimmedEnv(_0x6474ea(0x1f6)),_0x29ae88=trimmedEnv(_0x6474ea(0x204));return{'homeDir':_0x1d1810,'cacheRoot':_0x4e6cdf,'managedRoot':resolve(_0x1d1810,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x386939['agentsSkillsDir']??_0x473f8a??resolve(_0x1d1810,_0x6474ea(0x1f3),_0x6474ea(0x1f8)),'claudeSkillsDir':_0x386939['claudeSkillsDir']??_0x29ae88??resolve(_0x1d1810,_0x6474ea(0x1f0),_0x6474ea(0x1f8))};}export function getRuntimeSkillCacheRoot(_0x540cf8,_0x1556c1,_0x1fe4ac={}){const _0x4ab57b=a103_0x184c,_0x253c3f=resolveSkillSyncPaths(_0x1fe4ac);return resolve(_0x253c3f['cacheRoot'],_0x540cf8,fingerprintAccessKey(_0x1556c1),_0x4ab57b(0x1f8));}export function getRuntimeSkillDir(_0x468438,_0x7247c4,_0x2c44f8,_0x16882a,_0x2b249c,_0x30f498={}){const _0x318ba2=a103_0x184c;return resolve(getRuntimeSkillCacheRoot(_0x468438,_0x7247c4,_0x30f498),safePathSegment(_0x2c44f8,_0x318ba2(0x205)),_0x16882a,safePathSegment(_0x2b249c,_0x318ba2(0x1fb)));}export function safePathSegment(_0x4f9ea0,_0x138d41=a103_0x1fe7bf(0x1f1)){const _0x307fd7=a103_0x1fe7bf;if(!_0x4f9ea0||_0x4f9ea0['includes']('/')||_0x4f9ea0[_0x307fd7(0x203)]('\x5c')||_0x4f9ea0[_0x307fd7(0x203)]('..'))throw CliErrors['validation'](_0x307fd7(0x206)+_0x138d41+_0x307fd7(0x1ff)+_0x4f9ea0);return _0x4f9ea0;}function a103_0x184c(_0x20f06c,_0x3cd320){_0x20f06c=_0x20f06c-0x1ef;const _0x13492c=a103_0x1349();let _0x184c7c=_0x13492c[_0x20f06c];return _0x184c7c;}function trimmedEnv(_0x5b128a){const _0x4fc327=a103_0x1fe7bf,_0x3a60b1=productEnv(_0x5b128a)?.[_0x4fc327(0x1f4)]();return _0x3a60b1?_0x3a60b1:undefined;}
1
+ const a103_0x441804=a103_0x2967;function a103_0x2967(_0x55a807,_0x22ec96){_0x55a807=_0x55a807-0x1b0;const _0x1d60ec=a103_0x1d60();let _0x29674e=_0x1d60ec[_0x55a807];return _0x29674e;}(function(_0x200bf9,_0x51d0df){const _0x506f92=a103_0x2967,_0x4258e5=_0x200bf9();while(!![]){try{const _0x51b352=-parseInt(_0x506f92(0x1be))/0x1+-parseInt(_0x506f92(0x1bd))/0x2*(-parseInt(_0x506f92(0x1c4))/0x3)+parseInt(_0x506f92(0x1ba))/0x4+-parseInt(_0x506f92(0x1c3))/0x5+-parseInt(_0x506f92(0x1b9))/0x6+-parseInt(_0x506f92(0x1b4))/0x7*(-parseInt(_0x506f92(0x1c5))/0x8)+parseInt(_0x506f92(0x1c0))/0x9;if(_0x51b352===_0x51d0df)break;else _0x4258e5['push'](_0x4258e5['shift']());}catch(_0x33afe7){_0x4258e5['push'](_0x4258e5['shift']());}}}(a103_0x1d60,0x50920));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(_0x3dd95d={}){const _0x5cec77=a103_0x2967,_0x4853b1=_0x3dd95d[_0x5cec77(0x1c6)]??homedir(),_0x360117=resolve(_0x4853b1,PRODUCT_CONFIG['homeDirName'],_0x5cec77(0x1bb)),_0xeb23b0=trimmedEnv(_0x5cec77(0x1bc)),_0x4d069f=trimmedEnv(_0x5cec77(0x1c2)),_0x453852=resolve(_0x4853b1,_0x5cec77(0x1b6)),_0x4c230c=_0x3dd95d['workbuddySkillsDir']??(existsSync(_0x453852)?resolve(_0x453852,_0x5cec77(0x1b5)):undefined);return{'homeDir':_0x4853b1,'cacheRoot':_0x360117,'managedRoot':resolve(_0x4853b1,PRODUCT_CONFIG[_0x5cec77(0x1c7)]),'agentsSkillsDir':_0x3dd95d[_0x5cec77(0x1b7)]??_0xeb23b0??resolve(_0x4853b1,_0x5cec77(0x1bf),_0x5cec77(0x1b5)),'claudeSkillsDir':_0x3dd95d[_0x5cec77(0x1cb)]??_0x4d069f??resolve(_0x4853b1,_0x5cec77(0x1b0),_0x5cec77(0x1b5)),'workbuddySkillsDir':_0x4c230c};}export function runtimeAgentSkillRoots(_0x4957fd){const _0x5b95d2=a103_0x2967;return[_0x4957fd[_0x5b95d2(0x1b7)],_0x4957fd[_0x5b95d2(0x1cb)],_0x4957fd[_0x5b95d2(0x1b3)]][_0x5b95d2(0x1c8)](_0x26e213=>Boolean(_0x26e213));}export function getRuntimeSkillCacheRoot(_0x40ff9e,_0x1f0620,_0x2437b8={}){const _0x3bd2e3=a103_0x2967,_0x2a520c=resolveSkillSyncPaths(_0x2437b8);return resolve(_0x2a520c['cacheRoot'],_0x40ff9e,fingerprintAccessKey(_0x1f0620),_0x3bd2e3(0x1b5));}function a103_0x1d60(){const _0x502aef=['2019aizQBA','1138680LzLbzB','homeDir','homeDirName','filter','path\x20segment','appCode','claudeSkillsDir','.claude','trim','skillCode','workbuddySkillsDir','14hvTOSS','skills','.workbuddy','agentsSkillsDir','includes','3928080UAJBaJ','1094676PFiUop','cache','SKILL_ROOT','508yMgFek','487452OwKGPi','.agents','12405294rLzJHO','Unsafe\x20','CLAUDE_SKILL_ROOT','3177495dCsxWg'];a103_0x1d60=function(){return _0x502aef;};return a103_0x1d60();}export function getRuntimeSkillDir(_0x5ed0c0,_0x54ed2f,_0x2e506d,_0x16af7f,_0x26ece4,_0x1c0355={}){const _0x4d9d8f=a103_0x2967;return resolve(getRuntimeSkillCacheRoot(_0x5ed0c0,_0x54ed2f,_0x1c0355),safePathSegment(_0x2e506d,_0x4d9d8f(0x1ca)),_0x16af7f,safePathSegment(_0x26ece4,_0x4d9d8f(0x1b2)));}export function safePathSegment(_0xb90b04,_0x9cb37a=a103_0x441804(0x1c9)){const _0x33c502=a103_0x441804;if(!_0xb90b04||_0xb90b04['includes']('/')||_0xb90b04['includes']('\x5c')||_0xb90b04[_0x33c502(0x1b8)]('..'))throw CliErrors['validation'](_0x33c502(0x1c1)+_0x9cb37a+'\x20for\x20local\x20path:\x20'+_0xb90b04);return _0xb90b04;}function trimmedEnv(_0x2e4bb4){const _0x2223ef=a103_0x441804,_0xf2f461=productEnv(_0x2e4bb4)?.[_0x2223ef(0x1b1)]();return _0xf2f461?_0xf2f461:undefined;}
@@ -1 +1 @@
1
- (function(_0x48d3a6,_0x5dbae1){const _0x4e6639=a104_0x6a9d,_0x55d355=_0x48d3a6();while(!![]){try{const _0x342a4f=parseInt(_0x4e6639(0xea))/0x1*(parseInt(_0x4e6639(0x101))/0x2)+parseInt(_0x4e6639(0x108))/0x3*(-parseInt(_0x4e6639(0x10b))/0x4)+parseInt(_0x4e6639(0x123))/0x5*(parseInt(_0x4e6639(0x103))/0x6)+-parseInt(_0x4e6639(0xeb))/0x7+-parseInt(_0x4e6639(0xf0))/0x8+-parseInt(_0x4e6639(0x122))/0x9+parseInt(_0x4e6639(0x11a))/0xa*(parseInt(_0x4e6639(0x11f))/0xb);if(_0x342a4f===_0x5dbae1)break;else _0x55d355['push'](_0x55d355['shift']());}catch(_0x4df905){_0x55d355['push'](_0x55d355['shift']());}}}(a104_0x55ba,0x4570c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x49be84}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_0x6a9d(_0x4eeacd,_0x8fa6c1){_0x4eeacd=_0x4eeacd-0xe7;const _0x55bab6=a104_0x55ba();let _0x6a9dfc=_0x55bab6[_0x4eeacd];return _0x6a9dfc;}export function resolvePushDirectoryIdentity(_0x27ac44,_0x52ee92,_0x14e299={}){const _0x2d8b9c=a104_0x6a9d,_0x3543f7=resolvePushDirectoryRoot(_0x27ac44),_0x1f0694=readPushMetadataIfPresent(resolve(_0x3543f7,METADATA_FILE),{'ignoreInvalidMetadata':_0x14e299[_0x2d8b9c(0x125)]});if(_0x1f0694?.[_0x2d8b9c(0x116)]&&_0x1f0694[_0x2d8b9c(0x116)]!==_0x52ee92&&!_0x14e299[_0x2d8b9c(0xf2)]&&!_0x14e299[_0x2d8b9c(0x11c)])throw CliErrors[_0x2d8b9c(0x102)]('Skill\x20metadata\x20appCode\x20\x22'+_0x1f0694[_0x2d8b9c(0x116)]+_0x2d8b9c(0x10f)+_0x52ee92+'\x22.');const _0x2c74fa=resolvePushSkillCode(_0x3543f7,_0x52ee92,_0x1f0694,_0x14e299);if(!_0x2c74fa)throw CliErrors[_0x2d8b9c(0x102)](_0x2d8b9c(0xf7)+SKILL_FILE+',\x20'+METADATA_FILE+_0x2d8b9c(0xf1));return{'dir':_0x3543f7,'skillCode':_0x2c74fa,'metadata':_0x1f0694};}export function readPushDirectory(_0x5688f2,_0x244eb4,_0x5398a9={}){const _0x1d420a=a104_0x6a9d,_0x272502=resolvePushDirectoryIdentity(_0x5688f2,_0x244eb4,_0x5398a9),_0x167f07=_0x272502['dir'],_0x2b79a9=resolve(_0x167f07,SKILL_FILE);if(!existsSync(_0x2b79a9)||!lstatSync(_0x2b79a9)[_0x1d420a(0xfd)]())throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0x10c)+SKILL_FILE+':\x20'+_0x2b79a9);const _0xdc5c2d=_0x272502[_0x1d420a(0x119)],_0x1fe307=_0x5398a9[_0x1d420a(0xf6)]??_0x1d420a(0xe9);if(!_0x5398a9['ignoreMetadataScope']&&_0xdc5c2d?.[_0x1d420a(0xf3)]===_0x1d420a(0x107))throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0xed)+METADATA_FILE+_0x1d420a(0xfb)+_0xdc5c2d[_0x1d420a(0xf3)]+'\x22.');if(!_0x5398a9[_0x1d420a(0x105)]&&_0x1fe307==='personal'&&_0xdc5c2d?.['scope']&&_0xdc5c2d[_0x1d420a(0xf3)]!==_0x1d420a(0xe9))throw CliErrors[_0x1d420a(0x102)](_0x1d420a(0xff)+METADATA_FILE+'\x20has\x20scope=\x22'+_0xdc5c2d[_0x1d420a(0xf3)]+'\x22.',_0x1d420a(0x104)+_0x167f07+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x4bfbad=scanSkillDirectory(_0x167f07),_0x274886=buildSkillPackage(_0x4bfbad),_0x164256=readFileSync(_0x2b79a9,_0x1d420a(0xee)),_0x32d8fc=_0x272502[_0x1d420a(0xef)],_0x5e568f=_0x5398a9['ignoreMetadataForPayload']?undefined:_0xdc5c2d,_0x123e42=readSkillDisplayName(_0x164256);return{'skillCode':_0x32d8fc,'metadata':_0xdc5c2d,'frontmatterDisplayName':_0x123e42,'input':{'skillCode':_0x32d8fc,'skillName':_0x123e42??_0x5e568f?.[_0x1d420a(0x124)],'description':_0x5e568f?.[_0x1d420a(0xe7)],'content':_0x164256,'files':_0x274886['manifest'],'packageBase64':_0x274886['packageBase64'],'tags':_0x5e568f?.[_0x1d420a(0x118)],'version':_0x5e568f?.[_0x1d420a(0x100)],'sourceSessionId':_0x5e568f?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x32e2fa,_0x206de3,_0xcf30bd,_0x43efb0={}){const _0x282a22=a104_0x6a9d,_0x19602c=resolvePushDirectoryRoot(_0x32e2fa),_0x1ac3ee=readPushMetadataIfPresent(resolve(_0x19602c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x12904e=requireRemoteScope(_0x206de3),_0x7f1323=readLocalSkillContent(_0x19602c),_0x1a4f1b={..._0x206de3,'appCode':_0x206de3['appCode']??_0xcf30bd,'skillName':_0x206de3[_0x282a22(0x124)]??_0x1ac3ee?.[_0x282a22(0x124)],'description':_0x206de3[_0x282a22(0xe7)]??_0x1ac3ee?.['description'],'tags':Array[_0x282a22(0x106)](_0x206de3[_0x282a22(0x118)])?_0x206de3[_0x282a22(0x118)]:_0x1ac3ee?.[_0x282a22(0x118)],'sourceSessionId':_0x206de3[_0x282a22(0x10e)]??_0x1ac3ee?.[_0x282a22(0x10e)],'content':_0x206de3['content']??_0x7f1323},_0x3759ad=buildMetadata(_0x1a4f1b,_0x12904e,_0xcf30bd,contentHash(_0x7f1323),_0x43efb0[_0x282a22(0xfc)]);writeJsonAtomic(resolve(_0x19602c,METADATA_FILE),_0x3759ad);}function a104_0x55ba(){const _0x425897=['object','sourceSessionId','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','find','company','isDirectory','ignoreMetadataSkillCode','(unknown)','appCode','toLowerCase','tags','metadata','650DxwPhd','Skill\x20directory\x20not\x20found:\x20','ignoreMetadataAppCodeMismatch','slice','string','214247Bnfffw','trim','displayName','3511575WBqgLH','181115Szbrrp','skillName','ignoreInvalidMetadata','description','Remote\x20Skill\x20','personal','1nfTYvr','1062894qvzdQc','some','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','utf8','skillCode','3460448RsOPvq',',\x20or\x20directory\x20name.','allowAppCodeRetarget','scope','\x20has\x20unsupported\x20scope\x20\x22','isSymbolicLink','targetScope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','number','name','Invalid\x20','\x20has\x20scope=\x22','refreshedAt','isFile','path','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','version','249898LtQNbi','validation','18xsOxLu','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','ignoreMetadataScope','isArray','builtin','11643wjwbBe','replace','length','248XenJrf','Missing\x20'];a104_0x55ba=function(){return _0x425897;};return a104_0x55ba();}export function recordPushedRuntimeSkill(_0x2d9fc3,_0x2bfe0b,_0x1c4187,_0x515d80={}){const _0x39cb19=a104_0x6a9d,_0x27dfab=resolvePushDirectoryRoot(_0x2d9fc3),_0x42beac=scanSkillDirectory(_0x27dfab),_0x5bb92f=_0x42beac[_0x39cb19(0x111)](_0x1f2c45=>_0x1f2c45['path']===SKILL_FILE),_0x25d350=_0x5bb92f?fileText(_0x5bb92f):'',_0xf93fe6=tryNormalizePackageManifest(_0x2bfe0b[_0x39cb19(0x110)]),_0x1dc6cc={..._0x2bfe0b,'content':_0x2bfe0b['content']??_0x25d350,'files':_0xf93fe6},_0x4acc92=_0xf93fe6?normalizeLocalFiles(_0x42beac)['filter'](_0x1270b6=>_0xf93fe6[_0x39cb19(0x110)][_0x39cb19(0xec)](_0x1f4f34=>_0x1f4f34['path']===_0x1270b6[_0x39cb19(0xfe)])):undefined,_0x551e6a=buildMetadata(_0x1dc6cc,_0x515d80[_0x39cb19(0xf3)]??_0x39cb19(0xe9),_0x1c4187,contentHash(_0x1dc6cc['content']??''),_0x515d80['pushedAt'],_0x4acc92);writeJsonAtomic(resolve(_0x27dfab,METADATA_FILE),_0x551e6a);}export function deriveSkillCodeFromDirectory(_0x37e888,_0xc07c05){const _0x4e0891=a104_0x6a9d,_0x35a1c0=basename(resolve(_0x37e888)),_0x5bed5f=_0xc07c05+'--';return _0x35a1c0['startsWith'](_0x5bed5f)?_0x35a1c0[_0x4e0891(0x11d)](_0x5bed5f[_0x4e0891(0x10a)]):_0x35a1c0;}function resolvePushSkillCode(_0x1e9021,_0x591dbb,_0x2a14e7,_0x3be5b1){const _0x2d8983=a104_0x6a9d,_0x48e1c9=deriveSkillCodeFromSkillFile(_0x1e9021)||deriveSkillCodeFromDirectory(_0x1e9021,_0x591dbb);if(_0x3be5b1[_0x2d8983(0x114)])return _0x48e1c9;return _0x2a14e7?.[_0x2d8983(0xef)]?.[_0x2d8983(0x120)]()||_0x48e1c9;}function deriveSkillCodeFromSkillFile(_0x5b680a){const _0x4f4f4f=a104_0x6a9d,_0x528f31=resolve(_0x5b680a,SKILL_FILE);if(!existsSync(_0x528f31)||!lstatSync(_0x528f31)['isFile']())return undefined;const _0xd976fc=readFileSync(_0x528f31,_0x4f4f4f(0xee)),_0x1c1e80=_0xd976fc['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1c1e80)return undefined;const _0x357931=parseFrontmatterObject(_0x1c1e80[0x1]??''),_0xc8991c=scalarToString(_0x357931?.[_0x4f4f4f(0xf9)]);return _0xc8991c?slugifySkillName(_0xc8991c):undefined;}function readSkillDisplayName(_0x38948e){const _0x4faa9e=a104_0x6a9d,_0x1b3068=_0x38948e['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1b3068)return undefined;const _0x4b2dee=parseFrontmatterObject(_0x1b3068[0x1]??'');return scalarToString(_0x4b2dee?.[_0x4faa9e(0x121)]);}function slugifySkillName(_0x5a1abf){const _0x172342=a104_0x6a9d,_0x4f50ee=_0x5a1abf[_0x172342(0x120)]()[_0x172342(0x117)]()[_0x172342(0x109)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')['replace'](/-+$/,'')[_0x172342(0x109)](/-{2,}/g,'-');if(!_0x4f50ee)throw CliErrors['validation'](_0x172342(0xfa)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x4f50ee;}function parseFrontmatterObject(_0x2518d2){const _0xa09ac5=a104_0x6a9d;try{const _0x5608b7=a104_0x49be84(_0x2518d2);return _0x5608b7&&typeof _0x5608b7===_0xa09ac5(0x10d)&&!Array['isArray'](_0x5608b7)?_0x5608b7:undefined;}catch{return undefined;}}function scalarToString(_0x4db04f){const _0x5f566c=a104_0x6a9d;if(typeof _0x4db04f===_0x5f566c(0x11e))return _0x4db04f['trim']();if(typeof _0x4db04f===_0x5f566c(0xf8)||typeof _0x4db04f==='boolean')return String(_0x4db04f);return undefined;}function resolvePushDirectoryRoot(_0x128a3f){const _0x5e5984=a104_0x6a9d,_0xb806d1=resolve(_0x128a3f);if(!existsSync(_0xb806d1))throw CliErrors['validation'](_0x5e5984(0x11b)+_0x128a3f);const _0x5ebe22=lstatSync(_0xb806d1);if(_0x5ebe22[_0x5e5984(0x113)]())return _0xb806d1;if(_0x5ebe22[_0x5e5984(0xf5)]()){const _0x1aa312=realpathSync(_0xb806d1);if(lstatSync(_0x1aa312)[_0x5e5984(0x113)]())return _0x1aa312;}throw CliErrors[_0x5e5984(0x102)](_0x5e5984(0x11b)+_0x128a3f);}function requireRemoteScope(_0x20976d){const _0xa2679=a104_0x6a9d;if(_0x20976d[_0xa2679(0xf3)]===_0xa2679(0xe9)||_0x20976d['scope']===_0xa2679(0x112)||_0x20976d[_0xa2679(0xf3)]===_0xa2679(0x107))return _0x20976d[_0xa2679(0xf3)];throw CliErrors[_0xa2679(0x102)](_0xa2679(0xe8)+(_0x20976d[_0xa2679(0xef)]||_0xa2679(0x115))+_0xa2679(0xf4)+(_0x20976d['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x504a4b){const _0x14802d=a104_0x6a9d,_0x3a55e0=resolve(_0x504a4b,SKILL_FILE);return existsSync(_0x3a55e0)&&lstatSync(_0x3a55e0)['isFile']()?readFileSync(_0x3a55e0,_0x14802d(0xee)):'';}function readPushMetadataIfPresent(_0x20aa32,_0x50bf8f={}){const _0x5f57ba=a104_0x6a9d;try{return readMetadataIfPresent(_0x20aa32);}catch(_0x4f8d5b){if(_0x50bf8f[_0x5f57ba(0x125)])return undefined;throw _0x4f8d5b;}}
1
+ (function(_0x1470b7,_0x54c123){const _0x34dea0=a104_0x4ba7,_0x3cfc72=_0x1470b7();while(!![]){try{const _0x68c4e1=parseInt(_0x34dea0(0x15f))/0x1*(-parseInt(_0x34dea0(0x175))/0x2)+-parseInt(_0x34dea0(0x195))/0x3+-parseInt(_0x34dea0(0x18a))/0x4*(-parseInt(_0x34dea0(0x16b))/0x5)+-parseInt(_0x34dea0(0x178))/0x6*(-parseInt(_0x34dea0(0x163))/0x7)+-parseInt(_0x34dea0(0x15c))/0x8+parseInt(_0x34dea0(0x16c))/0x9+-parseInt(_0x34dea0(0x167))/0xa*(parseInt(_0x34dea0(0x191))/0xb);if(_0x68c4e1===_0x54c123)break;else _0x3cfc72['push'](_0x3cfc72['shift']());}catch(_0x2cfde5){_0x3cfc72['push'](_0x3cfc72['shift']());}}}(a104_0x3421,0x773ae));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x3571a2}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(_0x3a9ebc,_0x32a192,_0x457170={}){const _0x1272a6=a104_0x4ba7,_0x4a59af=resolvePushDirectoryRoot(_0x3a9ebc),_0x2df816=readPushMetadataIfPresent(resolve(_0x4a59af,METADATA_FILE),{'ignoreInvalidMetadata':_0x457170['ignoreInvalidMetadata']});if(_0x2df816?.[_0x1272a6(0x165)]&&_0x2df816['appCode']!==_0x32a192&&!_0x457170['allowAppCodeRetarget']&&!_0x457170[_0x1272a6(0x190)])throw CliErrors['validation'](_0x1272a6(0x188)+_0x2df816[_0x1272a6(0x165)]+_0x1272a6(0x16f)+_0x32a192+'\x22.');const _0x5146b3=resolvePushSkillCode(_0x4a59af,_0x32a192,_0x2df816,_0x457170);if(!_0x5146b3)throw CliErrors[_0x1272a6(0x186)](_0x1272a6(0x173)+SKILL_FILE+',\x20'+METADATA_FILE+_0x1272a6(0x171));return{'dir':_0x4a59af,'skillCode':_0x5146b3,'metadata':_0x2df816};}export function readPushDirectory(_0x2e1db2,_0x29f9af,_0x2badc2={}){const _0x36f813=a104_0x4ba7,_0x3f5680=resolvePushDirectoryIdentity(_0x2e1db2,_0x29f9af,_0x2badc2),_0x189ca6=_0x3f5680[_0x36f813(0x174)],_0x3f917e=resolve(_0x189ca6,SKILL_FILE);if(!existsSync(_0x3f917e)||!lstatSync(_0x3f917e)[_0x36f813(0x194)]())throw CliErrors[_0x36f813(0x186)](_0x36f813(0x17e)+SKILL_FILE+':\x20'+_0x3f917e);const _0x595023=_0x3f5680[_0x36f813(0x18b)],_0x9a1043=_0x2badc2[_0x36f813(0x17d)]??_0x36f813(0x16a);if(!_0x2badc2[_0x36f813(0x19b)]&&_0x595023?.[_0x36f813(0x192)]==='builtin')throw CliErrors[_0x36f813(0x186)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x595023[_0x36f813(0x192)]+'\x22.');if(!_0x2badc2['ignoreMetadataScope']&&_0x9a1043===_0x36f813(0x16a)&&_0x595023?.['scope']&&_0x595023[_0x36f813(0x192)]!==_0x36f813(0x16a))throw CliErrors[_0x36f813(0x186)](_0x36f813(0x18d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x595023['scope']+'\x22.',_0x36f813(0x179)+_0x189ca6+_0x36f813(0x193));const _0x345349=scanSkillDirectory(_0x189ca6),_0x5a81a8=buildSkillPackage(_0x345349),_0x5bb0b7=readFileSync(_0x3f917e,'utf8'),_0x2603da=_0x3f5680[_0x36f813(0x182)],_0x12431e=_0x2badc2[_0x36f813(0x16e)]?undefined:_0x595023,_0x365857=readSkillDisplayName(_0x5bb0b7);return{'skillCode':_0x2603da,'metadata':_0x595023,'frontmatterDisplayName':_0x365857,'input':{'skillCode':_0x2603da,'skillName':_0x365857??_0x12431e?.[_0x36f813(0x197)],'description':_0x12431e?.['description'],'content':_0x5bb0b7,'files':_0x5a81a8[_0x36f813(0x18f)],'packageBase64':_0x5a81a8[_0x36f813(0x198)],'tags':_0x12431e?.[_0x36f813(0x19a)],'version':_0x12431e?.[_0x36f813(0x183)],'sourceSessionId':_0x12431e?.['sourceSessionId']}};}function a104_0x4ba7(_0xdc9322,_0xbb5abd){_0xdc9322=_0xdc9322-0x15b;const _0x3421f5=a104_0x3421();let _0x4ba786=_0x3421f5[_0xdc9322];return _0x4ba786;}export function refreshPushDirectoryMetadataFromRemote(_0x51f6b5,_0x330a4d,_0x2aacba,_0x3d16ee={}){const _0xb36063=a104_0x4ba7,_0x4d1f91=resolvePushDirectoryRoot(_0x51f6b5),_0x173d84=readPushMetadataIfPresent(resolve(_0x4d1f91,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2a8ddd=requireRemoteScope(_0x330a4d),_0x319631=readLocalSkillContent(_0x4d1f91),_0xca2160={..._0x330a4d,'appCode':_0x330a4d[_0xb36063(0x165)]??_0x2aacba,'skillName':_0x330a4d[_0xb36063(0x197)]??_0x173d84?.[_0xb36063(0x197)],'description':_0x330a4d[_0xb36063(0x184)]??_0x173d84?.[_0xb36063(0x184)],'tags':Array[_0xb36063(0x15b)](_0x330a4d['tags'])?_0x330a4d[_0xb36063(0x19a)]:_0x173d84?.[_0xb36063(0x19a)],'sourceSessionId':_0x330a4d[_0xb36063(0x199)]??_0x173d84?.['sourceSessionId'],'content':_0x330a4d['content']??_0x319631},_0x560979=buildMetadata(_0xca2160,_0x2a8ddd,_0x2aacba,contentHash(_0x319631),_0x3d16ee['refreshedAt']);writeJsonAtomic(resolve(_0x4d1f91,METADATA_FILE),_0x560979);}export function recordPushedRuntimeSkill(_0x1abffe,_0x5bce73,_0x3ccd5d,_0x5bf212={}){const _0x4f5038=a104_0x4ba7,_0x2905b7=resolvePushDirectoryRoot(_0x1abffe),_0x2804a4=scanSkillDirectory(_0x2905b7),_0x227db2=_0x2804a4[_0x4f5038(0x170)](_0x3e6b87=>_0x3e6b87[_0x4f5038(0x164)]===SKILL_FILE),_0x2c8dc2=_0x227db2?fileText(_0x227db2):'',_0x39f053=tryNormalizePackageManifest(_0x5bce73[_0x4f5038(0x185)]),_0x35fbdd={..._0x5bce73,'content':_0x5bce73[_0x4f5038(0x18e)]??_0x2c8dc2,'files':_0x39f053},_0x4af6c9=_0x39f053?normalizeLocalFiles(_0x2804a4)[_0x4f5038(0x17c)](_0x504231=>_0x39f053['files'][_0x4f5038(0x18c)](_0x1d6b55=>_0x1d6b55[_0x4f5038(0x164)]===_0x504231[_0x4f5038(0x164)])):undefined,_0x2685c4=buildMetadata(_0x35fbdd,_0x5bf212['scope']??_0x4f5038(0x16a),_0x3ccd5d,contentHash(_0x35fbdd[_0x4f5038(0x18e)]??''),_0x5bf212['pushedAt'],_0x4af6c9);writeJsonAtomic(resolve(_0x2905b7,METADATA_FILE),_0x2685c4);}export function deriveSkillCodeFromDirectory(_0x1729dd,_0x16cb90){const _0x1ce96e=a104_0x4ba7,_0x1f3523=basename(resolve(_0x1729dd)),_0x28c8d3=_0x16cb90+'--';return _0x1f3523[_0x1ce96e(0x19c)](_0x28c8d3)?_0x1f3523['slice'](_0x28c8d3[_0x1ce96e(0x168)]):_0x1f3523;}function resolvePushSkillCode(_0x253809,_0x189d06,_0x5d7450,_0x48efb3){const _0x19f0a2=a104_0x4ba7,_0x5f54cd=deriveSkillCodeFromSkillFile(_0x253809)||deriveSkillCodeFromDirectory(_0x253809,_0x189d06);if(_0x48efb3[_0x19f0a2(0x176)])return _0x5f54cd;return _0x5d7450?.[_0x19f0a2(0x182)]?.[_0x19f0a2(0x177)]()||_0x5f54cd;}function deriveSkillCodeFromSkillFile(_0x1efee0){const _0x3e3c67=a104_0x4ba7,_0xf24c2e=resolve(_0x1efee0,SKILL_FILE);if(!existsSync(_0xf24c2e)||!lstatSync(_0xf24c2e)[_0x3e3c67(0x194)]())return undefined;const _0x3b5c09=readFileSync(_0xf24c2e,_0x3e3c67(0x189)),_0x4a7e5d=_0x3b5c09[_0x3e3c67(0x166)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4a7e5d)return undefined;const _0x10fd38=parseFrontmatterObject(_0x4a7e5d[0x1]??''),_0xe95a57=scalarToString(_0x10fd38?.['name']);return _0xe95a57?slugifySkillName(_0xe95a57):undefined;}function readSkillDisplayName(_0x51bec0){const _0x11a5d1=a104_0x4ba7,_0x427849=_0x51bec0[_0x11a5d1(0x166)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x427849)return undefined;const _0x662ad7=parseFrontmatterObject(_0x427849[0x1]??'');return scalarToString(_0x662ad7?.['displayName']);}function slugifySkillName(_0x136ced){const _0x3eaa00=a104_0x4ba7,_0x1a57ed=_0x136ced[_0x3eaa00(0x177)]()[_0x3eaa00(0x172)]()[_0x3eaa00(0x162)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3eaa00(0x162)](/^-+/,'')[_0x3eaa00(0x162)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x1a57ed)throw CliErrors[_0x3eaa00(0x186)](_0x3eaa00(0x161)+SKILL_FILE+_0x3eaa00(0x17b));return _0x1a57ed;}function parseFrontmatterObject(_0x4424c2){const _0x4ea2a2=a104_0x4ba7;try{const _0x56c191=a104_0x3571a2(_0x4424c2);return _0x56c191&&typeof _0x56c191===_0x4ea2a2(0x187)&&!Array['isArray'](_0x56c191)?_0x56c191:undefined;}catch{return undefined;}}function scalarToString(_0x201836){const _0x3ba9df=a104_0x4ba7;if(typeof _0x201836===_0x3ba9df(0x181))return _0x201836[_0x3ba9df(0x177)]();if(typeof _0x201836==='number'||typeof _0x201836===_0x3ba9df(0x15e))return String(_0x201836);return undefined;}function resolvePushDirectoryRoot(_0x4c3f2f){const _0x31e9c6=a104_0x4ba7,_0x4000b1=resolve(_0x4c3f2f);if(!existsSync(_0x4000b1))throw CliErrors[_0x31e9c6(0x186)](_0x31e9c6(0x196)+_0x4c3f2f);const _0x442be4=lstatSync(_0x4000b1);if(_0x442be4[_0x31e9c6(0x180)]())return _0x4000b1;if(_0x442be4['isSymbolicLink']()){const _0x167c5d=realpathSync(_0x4000b1);if(lstatSync(_0x167c5d)['isDirectory']())return _0x167c5d;}throw CliErrors[_0x31e9c6(0x186)]('Skill\x20directory\x20not\x20found:\x20'+_0x4c3f2f);}function requireRemoteScope(_0x1895f7){const _0x49a5f5=a104_0x4ba7;if(_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x16a)||_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x15d)||_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x160))return _0x1895f7['scope'];throw CliErrors[_0x49a5f5(0x186)](_0x49a5f5(0x17a)+(_0x1895f7[_0x49a5f5(0x182)]||_0x49a5f5(0x16d))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x1895f7[_0x49a5f5(0x192)]??_0x49a5f5(0x169))+'\x22.');}function readLocalSkillContent(_0xcd0009){const _0x2c5e11=a104_0x4ba7,_0xd1d1e2=resolve(_0xcd0009,SKILL_FILE);return existsSync(_0xd1d1e2)&&lstatSync(_0xd1d1e2)[_0x2c5e11(0x194)]()?readFileSync(_0xd1d1e2,_0x2c5e11(0x189)):'';}function readPushMetadataIfPresent(_0x4056ad,_0x5b6704={}){const _0x480ae4=a104_0x4ba7;try{return readMetadataIfPresent(_0x4056ad);}catch(_0x41cfae){if(_0x5b6704[_0x480ae4(0x17f)])return undefined;throw _0x41cfae;}}function a104_0x3421(){const _0x3ac1bf=['skillCode','version','description','files','validation','object','Skill\x20metadata\x20appCode\x20\x22','utf8','3832204qviXue','metadata','some','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','content','manifest','ignoreMetadataAppCodeMismatch','11czqZhZ','scope','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','isFile','2477559LbfGuz','Skill\x20directory\x20not\x20found:\x20','skillName','packageBase64','sourceSessionId','tags','ignoreMetadataScope','startsWith','isArray','517368atBvKo','company','boolean','101759PkoNjM','builtin','Invalid\x20','replace','340333gDiuLZ','path','appCode','match','256970KlYbZX','length','unknown','personal','5pKPrBK','2390607MhLKqL','(unknown)','ignoreMetadataForPayload','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','find',',\x20or\x20directory\x20name.','toLowerCase','Unable\x20to\x20resolve\x20skillCode\x20from\x20','dir','6QsgpWW','ignoreMetadataSkillCode','trim','60ExatUo','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Remote\x20Skill\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','filter','targetScope','Missing\x20','ignoreInvalidMetadata','isDirectory','string'];a104_0x3421=function(){return _0x3ac1bf;};return a104_0x3421();}
@@ -1 +1 @@
1
- function a105_0x54ed(_0x36700b,_0x1a2f0a){_0x36700b=_0x36700b-0xf8;const _0x25901d=a105_0x2590();let _0x54edd6=_0x25901d[_0x36700b];return _0x54edd6;}(function(_0x50b795,_0x5a6d07){const _0x1d8bc7=a105_0x54ed,_0x5a4278=_0x50b795();while(!![]){try{const _0x41a21a=parseInt(_0x1d8bc7(0xfa))/0x1*(-parseInt(_0x1d8bc7(0x104))/0x2)+parseInt(_0x1d8bc7(0x105))/0x3+-parseInt(_0x1d8bc7(0xfe))/0x4+-parseInt(_0x1d8bc7(0xf9))/0x5*(-parseInt(_0x1d8bc7(0xfd))/0x6)+-parseInt(_0x1d8bc7(0x107))/0x7*(parseInt(_0x1d8bc7(0x106))/0x8)+parseInt(_0x1d8bc7(0x103))/0x9*(-parseInt(_0x1d8bc7(0x100))/0xa)+-parseInt(_0x1d8bc7(0x102))/0xb*(-parseInt(_0x1d8bc7(0xfc))/0xc);if(_0x41a21a===_0x5a6d07)break;else _0x5a4278['push'](_0x5a4278['shift']());}catch(_0xe076bd){_0x5a4278['push'](_0x5a4278['shift']());}}}(a105_0x2590,0x45052));import{CliErrors}from'../../errors.js';function a105_0x2590(){const _0x28cb9a=['7QdqHir','push','validation','personal','398590cAvAwX','37dZQwQu','company','12aKTQGY','6tufcDg','390284paUOPs','Unsupported\x20runtime\x20Skill\x20scope:\x20','210HDsoCs','length','13193081AReHmQ','76698TGeGjB','20220DdOvQu','403413bmfuCE','3842008cGBeGU'];a105_0x2590=function(){return _0x28cb9a;};return a105_0x2590();}export function normalizeRuntimeSkillScopes(_0x4fe211){const _0x54f06c=a105_0x54ed,_0x333194=_0x4fe211&&_0x4fe211[_0x54f06c(0x101)]>0x0?_0x4fe211:[_0x54f06c(0xf8),'company','builtin'],_0x2e0f94=[];for(const _0x223556 of _0x333194){if(!isRuntimeSkillScope(_0x223556))throw CliErrors[_0x54f06c(0x109)](_0x54f06c(0xff)+_0x223556);!_0x2e0f94['includes'](_0x223556)&&_0x2e0f94[_0x54f06c(0x108)](_0x223556);}return _0x2e0f94;}export function isRuntimeSkillScope(_0xcd8c4b){const _0x4ef2f8=a105_0x54ed;return _0xcd8c4b===_0x4ef2f8(0xf8)||_0xcd8c4b===_0x4ef2f8(0xfb)||_0xcd8c4b==='builtin';}
1
+ function a105_0x2ece(){const _0x56e2e7=['validation','511604DCUORJ','36HcDYJA','company','312cEtBzM','122910rUKumS','804BgwpfP','24031omXVtj','125300YlzWsT','60159HYmWJD','builtin','length','49794mzsHhN','personal','29955mauoBD','18eaKDfT','includes','110vLQXcS'];a105_0x2ece=function(){return _0x56e2e7;};return a105_0x2ece();}(function(_0x3fe35a,_0x233bfe){const _0x485c2a=a105_0x42fe,_0x3b1acf=_0x3fe35a();while(!![]){try{const _0x511c57=parseInt(_0x485c2a(0xb4))/0x1+-parseInt(_0x485c2a(0xae))/0x2*(parseInt(_0x485c2a(0xba))/0x3)+-parseInt(_0x485c2a(0xad))/0x4+parseInt(_0x485c2a(0xab))/0x5*(-parseInt(_0x485c2a(0xb8))/0x6)+-parseInt(_0x485c2a(0xb3))/0x7*(-parseInt(_0x485c2a(0xb0))/0x8)+-parseInt(_0x485c2a(0xbb))/0x9*(parseInt(_0x485c2a(0xb1))/0xa)+-parseInt(_0x485c2a(0xb5))/0xb*(-parseInt(_0x485c2a(0xb2))/0xc);if(_0x511c57===_0x233bfe)break;else _0x3b1acf['push'](_0x3b1acf['shift']());}catch(_0x2eccb7){_0x3b1acf['push'](_0x3b1acf['shift']());}}}(a105_0x2ece,0x1b0e3));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2bcb89){const _0x4c984a=a105_0x42fe,_0x24c23b=_0x2bcb89&&_0x2bcb89[_0x4c984a(0xb7)]>0x0?_0x2bcb89:[_0x4c984a(0xb9),_0x4c984a(0xaf),_0x4c984a(0xb6)],_0x1c6747=[];for(const _0xc4b168 of _0x24c23b){if(!isRuntimeSkillScope(_0xc4b168))throw CliErrors[_0x4c984a(0xac)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0xc4b168);!_0x1c6747[_0x4c984a(0xaa)](_0xc4b168)&&_0x1c6747['push'](_0xc4b168);}return _0x1c6747;}function a105_0x42fe(_0x49b8ff,_0x5596ba){_0x49b8ff=_0x49b8ff-0xaa;const _0x2ece1e=a105_0x2ece();let _0x42fec1=_0x2ece1e[_0x49b8ff];return _0x42fec1;}export function isRuntimeSkillScope(_0x1f5b4f){const _0x4b2504=a105_0x42fe;return _0x1f5b4f===_0x4b2504(0xb9)||_0x1f5b4f===_0x4b2504(0xaf)||_0x1f5b4f==='builtin';}
@@ -1 +1 @@
1
- const a107_0x1e6e73=a107_0x1f13;function a107_0x1f13(_0x2bb9a5,_0x5809b5){_0x2bb9a5=_0x2bb9a5-0xc5;const _0x5ae215=a107_0x5ae2();let _0x1f1326=_0x5ae215[_0x2bb9a5];return _0x1f1326;}(function(_0x52f659,_0x2d55ce){const _0x478c00=a107_0x1f13,_0x4e8841=_0x52f659();while(!![]){try{const _0x823a01=parseInt(_0x478c00(0xcc))/0x1*(-parseInt(_0x478c00(0xd2))/0x2)+-parseInt(_0x478c00(0xcb))/0x3*(parseInt(_0x478c00(0xc8))/0x4)+-parseInt(_0x478c00(0xca))/0x5*(-parseInt(_0x478c00(0xd1))/0x6)+-parseInt(_0x478c00(0xd9))/0x7*(parseInt(_0x478c00(0xc6))/0x8)+-parseInt(_0x478c00(0xd3))/0x9+-parseInt(_0x478c00(0xd8))/0xa+parseInt(_0x478c00(0xda))/0xb;if(_0x823a01===_0x2d55ce)break;else _0x4e8841['push'](_0x4e8841['shift']());}catch(_0x494a48){_0x4e8841['push'](_0x4e8841['shift']());}}}(a107_0x5ae2,0x7ffc8));function a107_0x5ae2(){const _0x428946=['408326vWHbGH','1007244PadRJM','object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','endsWith','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1508110jQKJsB','1495697gBNTuu','21071182WpUbbL','sort','8RQyERE','entries','4TfoQyc','validation','16475vHTatK','2202645CTtZSR','4NzawOI','from','path','1980-01-01T00:00:00.000Z','code','1158FOxlVo'];a107_0x5ae2=function(){return _0x428946;};return a107_0x5ae2();}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x1e6e73(0xcf));export function createDeterministicZipPackage(_0x165372){const _0x493ba9=a107_0x1e6e73,_0x2b5b4f={};for(const _0x2844cd of normalizeLocalFiles(_0x165372)){_0x2b5b4f[_0x2844cd[_0x493ba9(0xce)]]=fileContent(_0x2844cd);}return Buffer['from'](zipSync(_0x2b5b4f,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0xae6705){const _0x1dd5f3=a107_0x1e6e73;if(_0xae6705['length']<0x16)throw CliErrors[_0x1dd5f3(0xc9)](_0x1dd5f3(0xd7));let _0x426157;try{_0x426157=unzipSync(_0xae6705,{'filter'(_0x40447f){const _0x404898=_0x1dd5f3,_0x305a2c=normalizeSkillRelativePath(_0x40447f['name']);if(_0x305a2c[_0x404898(0xd6)]('/'))throw CliErrors[_0x404898(0xc9)](_0x404898(0xd5)+_0x305a2c);return!![];}});}catch(_0x4cb117){if(isRuntimeSkillValidationError(_0x4cb117))throw _0x4cb117;throw CliErrors[_0x1dd5f3(0xc9)](_0x1dd5f3(0xd7));}return Object[_0x1dd5f3(0xc7)](_0x426157)['map'](([_0x418041,_0x17fba5])=>({'path':normalizeSkillRelativePath(_0x418041),'bytes':Buffer[_0x1dd5f3(0xcd)](_0x17fba5)}))[_0x1dd5f3(0xc5)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x53b336){const _0x22c225=a107_0x1e6e73;return typeof _0x53b336===_0x22c225(0xd4)&&_0x53b336!==null&&_0x22c225(0xd0)in _0x53b336&&_0x53b336['code']==='validation_error';}
1
+ function a107_0x3dc2(_0x4be083,_0x58fde2){_0x4be083=_0x4be083-0xba;const _0xf1972d=a107_0xf197();let _0x3dc202=_0xf1972d[_0x4be083];return _0x3dc202;}(function(_0x3a19bf,_0x5babf3){const _0x13aee7=a107_0x3dc2,_0x4fcc1f=_0x3a19bf();while(!![]){try{const _0x331096=parseInt(_0x13aee7(0xc0))/0x1+-parseInt(_0x13aee7(0xc6))/0x2*(-parseInt(_0x13aee7(0xca))/0x3)+parseInt(_0x13aee7(0xbf))/0x4*(-parseInt(_0x13aee7(0xbe))/0x5)+parseInt(_0x13aee7(0xce))/0x6+-parseInt(_0x13aee7(0xba))/0x7+-parseInt(_0x13aee7(0xc4))/0x8*(-parseInt(_0x13aee7(0xc5))/0x9)+parseInt(_0x13aee7(0xc9))/0xa;if(_0x331096===_0x5babf3)break;else _0x4fcc1f['push'](_0x4fcc1f['shift']());}catch(_0x214426){_0x4fcc1f['push'](_0x4fcc1f['shift']());}}}(a107_0xf197,0x9ad22));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x3cc89a){const _0xd15165=a107_0x3dc2,_0x55a0be={};for(const _0x37db3a of normalizeLocalFiles(_0x3cc89a)){_0x55a0be[_0x37db3a[_0xd15165(0xc3)]]=fileContent(_0x37db3a);}return Buffer[_0xd15165(0xbd)](zipSync(_0x55a0be,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x5a3181){const _0x1d1e3d=a107_0x3dc2;if(_0x5a3181[_0x1d1e3d(0xc8)]<0x16)throw CliErrors[_0x1d1e3d(0xbb)](_0x1d1e3d(0xc7));let _0x41a5df;try{_0x41a5df=unzipSync(_0x5a3181,{'filter'(_0x5a912a){const _0x5a0f39=_0x1d1e3d,_0x350d37=normalizeSkillRelativePath(_0x5a912a[_0x5a0f39(0xc2)]);if(_0x350d37[_0x5a0f39(0xbc)]('/'))throw CliErrors[_0x5a0f39(0xbb)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x350d37);return!![];}});}catch(_0x5679fb){if(isRuntimeSkillValidationError(_0x5679fb))throw _0x5679fb;throw CliErrors[_0x1d1e3d(0xbb)](_0x1d1e3d(0xc7));}return Object[_0x1d1e3d(0xcc)](_0x41a5df)[_0x1d1e3d(0xc1)](([_0x46a09d,_0x329f5c])=>({'path':normalizeSkillRelativePath(_0x46a09d),'bytes':Buffer[_0x1d1e3d(0xbd)](_0x329f5c)}))[_0x1d1e3d(0xcb)](compareSkillFiles);}function a107_0xf197(){const _0x27d1f2=['523490owFHHu','map','name','path','150128AJrSVx','99AdXfwv','2512bDrSwv','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','3219650tFPJJt','828PGigQx','sort','entries','code','6296640iwCvJI','5593581NJcUeB','validation','endsWith','from','20WNLbxV','1014748skeKhl'];a107_0xf197=function(){return _0x27d1f2;};return a107_0xf197();}function isRuntimeSkillValidationError(_0x2b6d72){const _0x4ef529=a107_0x3dc2;return typeof _0x2b6d72==='object'&&_0x2b6d72!==null&&_0x4ef529(0xcd)in _0x2b6d72&&_0x2b6d72[_0x4ef529(0xcd)]==='validation_error';}