@lovrabet/lovrabet-cli 2.1.14 → 2.1.15

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 (120) 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/artifact/index.js +1 -1
  12. package/lib/commands/auth/index.js +1 -1
  13. package/lib/commands/auth/prompt.js +1 -1
  14. package/lib/commands/bff/detail.js +1 -1
  15. package/lib/commands/bff/exec.js +1 -1
  16. package/lib/commands/bff/index.js +1 -1
  17. package/lib/commands/cli-skill/index.js +1 -1
  18. package/lib/commands/common/config-policy.js +1 -1
  19. package/lib/commands/common/constraints.js +1 -1
  20. package/lib/commands/common/flags.js +1 -1
  21. package/lib/commands/common/local-file.js +1 -1
  22. package/lib/commands/config/definitions.js +1 -1
  23. package/lib/commands/config/shared.js +1 -1
  24. package/lib/commands/data/index.js +1 -1
  25. package/lib/commands/dataset/detail.js +1 -1
  26. package/lib/commands/dataset/index.js +1 -1
  27. package/lib/commands/dataset/list.js +1 -1
  28. package/lib/commands/dataset/sdk-doc.js +1 -1
  29. package/lib/commands/doctor.js +1 -1
  30. package/lib/commands/file/index.js +1 -1
  31. package/lib/commands/init.js +1 -1
  32. package/lib/commands/kb/index.js +1 -1
  33. package/lib/commands/logs/index.js +1 -1
  34. package/lib/commands/ocr/index.js +1 -1
  35. package/lib/commands/personal-bff/index.js +1 -1
  36. package/lib/commands/registry.js +1 -1
  37. package/lib/commands/schema.js +1 -1
  38. package/lib/commands/service/dynamic.js +1 -1
  39. package/lib/commands/service/function-name-adapter.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/rate-limit.js +1 -1
  87. package/lib/framework/response.js +1 -1
  88. package/lib/framework/runner-confirmation.js +1 -1
  89. package/lib/framework/runner-error.js +1 -1
  90. package/lib/framework/runner.js +1 -1
  91. package/lib/framework/schema-export.js +1 -1
  92. package/lib/framework/service-order.js +1 -1
  93. package/lib/framework/types.js +1 -1
  94. package/lib/generated/build-info.js +1 -1
  95. package/lib/help.js +1 -1
  96. package/lib/skills/npx-skills-add.js +1 -1
  97. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  98. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  99. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  100. package/lib/skills/runtime-skill-sync/links.js +1 -1
  101. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  102. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  103. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  104. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  105. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  106. package/lib/skills/runtime-skill-sync/push.js +1 -1
  107. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  110. package/lib/skills/runtime-skill-sync.js +1 -1
  111. package/lib/utils/apply-jq-filter.js +1 -1
  112. package/lib/utils/logger.js +1 -1
  113. package/lib/utils/lossless-json.js +1 -1
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +1 -1
  120. package/lib/commands/app-config/shared.js +0 -1
@@ -1 +1 @@
1
- (function(_0x593fd0,_0x323232){const _0x494e5b=a89_0x46ce,_0x2dc137=_0x593fd0();while(!![]){try{const _0x38d075=-parseInt(_0x494e5b(0x150))/0x1*(-parseInt(_0x494e5b(0x156))/0x2)+parseInt(_0x494e5b(0x15e))/0x3+-parseInt(_0x494e5b(0x158))/0x4*(-parseInt(_0x494e5b(0x152))/0x5)+-parseInt(_0x494e5b(0x14e))/0x6+parseInt(_0x494e5b(0x153))/0x7*(-parseInt(_0x494e5b(0x159))/0x8)+-parseInt(_0x494e5b(0x14f))/0x9*(parseInt(_0x494e5b(0x157))/0xa)+parseInt(_0x494e5b(0x15b))/0xb;if(_0x38d075===_0x323232)break;else _0x2dc137['push'](_0x2dc137['shift']());}catch(_0x5b786b){_0x2dc137['push'](_0x2dc137['shift']());}}}(a89_0x3de9,0xb84e8));function a89_0x3de9(){const _0x54e670=['4BazZTg','5710olbcwd','148ovvDdT','1001192CoSajP','trim','25330976GdNVNo','code','stringify','3573084QYqbpD','description','response','8131620IPtaFN','16182rPCzOf','45719EjJSXo','status','57785GpbnMe','49TsZgap','string','headers'];a89_0x3de9=function(){return _0x54e670;};return a89_0x3de9();}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';function a89_0x46ce(_0x446ddd,_0x119f37){_0x446ddd=_0x446ddd-0x14c;const _0x3de92f=a89_0x3de9();let _0x46cefa=_0x3de92f[_0x446ddd];return _0x46cefa;}import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x119805){const _0x28a866=a89_0x46ce;if(_0x119805 instanceof LovrabetError){const _0xb2b740=userFacingLovrabetMessage(_0x119805),_0x19b813=_0x119805,_0x4cee1c=createRateLimitError({'status':_0x19b813[_0x28a866(0x151)],'errorCode':_0x19b813[_0x28a866(0x15c)],'message':_0xb2b740,'retryAfter':readRetryAfter(_0x19b813[_0x28a866(0x14d)]?.[_0x28a866(0x155)])??readRetryAfterSeconds(_0x19b813['response'])});return _0x4cee1c??CliErrors['validation'](_0xb2b740);}return _0x119805;}function userFacingLovrabetMessage(_0x5cf1dd){const _0x3b5a49=a89_0x46ce,_0x59dfe8=_0x5cf1dd[_0x3b5a49(0x14c)];if(_0x59dfe8!==undefined&&_0x59dfe8!==null){if(typeof _0x59dfe8===_0x3b5a49(0x154)&&_0x59dfe8[_0x3b5a49(0x15a)]())return _0x59dfe8[_0x3b5a49(0x15a)]();try{return JSON[_0x3b5a49(0x15d)](_0x59dfe8);}catch{}}return _0x5cf1dd['message'];}
1
+ (function(_0x135f8c,_0x44e2a6){const _0x522ad2=a88_0x4d77,_0x57aca6=_0x135f8c();while(!![]){try{const _0x6cee96=parseInt(_0x522ad2(0x13a))/0x1+parseInt(_0x522ad2(0x138))/0x2+parseInt(_0x522ad2(0x13f))/0x3+-parseInt(_0x522ad2(0x134))/0x4+parseInt(_0x522ad2(0x139))/0x5+parseInt(_0x522ad2(0x132))/0x6+-parseInt(_0x522ad2(0x133))/0x7*(parseInt(_0x522ad2(0x137))/0x8);if(_0x6cee96===_0x44e2a6)break;else _0x57aca6['push'](_0x57aca6['shift']());}catch(_0x44179d){_0x57aca6['push'](_0x57aca6['shift']());}}}(a88_0x53c2,0x97979));import{LovrabetError}from'@lovrabet/sdk';function a88_0x53c2(){const _0xf1f7a0=['stringify','description','string','851196wBNqTi','message','code','response','6540438duBPAh','7gkExQE','4189036Okierw','status','headers','3697840SNVBak','516794KNfNzx','2242750HLyTIK','49658BbHuao','trim'];a88_0x53c2=function(){return _0xf1f7a0;};return a88_0x53c2();}import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a88_0x4d77(_0x215106,_0x1c9be1){_0x215106=_0x215106-0x132;const _0x53c21e=a88_0x53c2();let _0x4d7748=_0x53c21e[_0x215106];return _0x4d7748;}export function mapUserFacingExecuteError(_0x56245f){const _0x115c88=a88_0x4d77;if(_0x56245f instanceof LovrabetError){const _0x11b1cf=userFacingLovrabetMessage(_0x56245f),_0x32e644=_0x56245f,_0x3c169b=createRateLimitError({'status':_0x32e644[_0x115c88(0x135)],'errorCode':_0x32e644[_0x115c88(0x141)],'message':_0x11b1cf,'retryAfter':readRetryAfter(_0x32e644[_0x115c88(0x142)]?.[_0x115c88(0x136)])??readRetryAfterSeconds(_0x32e644['response'])});return _0x3c169b??CliErrors['validation'](_0x11b1cf);}return _0x56245f;}function userFacingLovrabetMessage(_0x2b4136){const _0x100fa2=a88_0x4d77,_0x324821=_0x2b4136[_0x100fa2(0x13d)];if(_0x324821!==undefined&&_0x324821!==null){if(typeof _0x324821===_0x100fa2(0x13e)&&_0x324821[_0x100fa2(0x13b)]())return _0x324821[_0x100fa2(0x13b)]();try{return JSON[_0x100fa2(0x13c)](_0x324821);}catch{}}return _0x2b4136[_0x100fa2(0x140)];}
@@ -1 +1 @@
1
- const a90_0x5a594d=a90_0x2ef7;(function(_0x563864,_0x390624){const _0x2d98a5=a90_0x2ef7,_0x24bbdf=_0x563864();while(!![]){try{const _0x4e5acb=-parseInt(_0x2d98a5(0x128))/0x1+-parseInt(_0x2d98a5(0xfe))/0x2+-parseInt(_0x2d98a5(0x106))/0x3+-parseInt(_0x2d98a5(0x101))/0x4+parseInt(_0x2d98a5(0x112))/0x5+parseInt(_0x2d98a5(0x137))/0x6*(-parseInt(_0x2d98a5(0x11c))/0x7)+parseInt(_0x2d98a5(0x10a))/0x8*(parseInt(_0x2d98a5(0x117))/0x9);if(_0x4e5acb===_0x390624)break;else _0x24bbdf['push'](_0x24bbdf['shift']());}catch(_0x7138d0){_0x24bbdf['push'](_0x24bbdf['shift']());}}}(a90_0xb2c7,0x26970));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a90_0x2ef7(_0x2987aa,_0x5d2d41){_0x2987aa=_0x2987aa-0xfd;const _0xb2c7da=a90_0xb2c7();let _0x2ef7c2=_0xb2c7da[_0x2987aa];return _0x2ef7c2;}import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x43a0d4){return void _0x43a0d4,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x5154ac,_0x12be6b){const _0x1a22b2=a90_0x2ef7,_0x5442f8=typeof _0x12be6b[_0x1a22b2(0x10c)]===_0x1a22b2(0x138)&&_0x12be6b['app'][_0x1a22b2(0x108)]();return{'rawFlags':_0x12be6b,'appCode':_0x5154ac[_0x1a22b2(0x134)]||productEnv(_0x1a22b2(0x10d))||(_0x5442f8?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5154ac[_0x1a22b2(0x118)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x12be6b),'defaultFormat':_0x5154ac['format'],'defaultPageSize':_0x5154ac[_0x1a22b2(0x125)],'defaultVerbose':_0x5154ac[_0x1a22b2(0x129)],'riskLevel':_0x5154ac[_0x1a22b2(0x135)],'accessKey':_0x5154ac[_0x1a22b2(0x127)],'env':_0x5154ac['env'],'mergedCli':{'defaultApp':_0x5154ac[_0x1a22b2(0x10e)],'currentApp':_0x5154ac[_0x1a22b2(0x12e)],'appCode':_0x5154ac[_0x1a22b2(0x134)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x20a459=>PIPELINE_FLAG_NAMES[a90_0x5a594d(0x11a)](_0x20a459[a90_0x5a594d(0x131)]))[a90_0x5a594d(0x130)](({name:_0x1eccd8,type:_0x7dfb52,description:_0x4ddd34})=>({'name':_0x1eccd8,'type':_0x7dfb52,'description':_0x4ddd34})),'formatOutput':formatOutput,'getCommandLabel'(_0x56f792){const _0x147fe7=a90_0x5a594d;return CLI_BIN_NAME+'\x20'+_0x56f792[_0x147fe7(0x107)]+'\x20'+_0x56f792[_0x147fe7(0x133)];},'riskPolicy':{'onViolation'(_0x3b17e4){const _0x237ebb=a90_0x5a594d;console[_0x237ebb(0x11b)](_0x3b17e4);},'createError'(_0x467932){const _0x502478=a90_0x5a594d;return CliErrors[_0x502478(0x12f)](_0x467932);}},async 'prepare'(_0x287277,_0xa4e9f){const _0x548f84=a90_0x5a594d,_0x331f00=resolveAuthMode(_0xa4e9f);if(_0x287277[_0x548f84(0x121)]!==![]){if(!_0xa4e9f[_0x548f84(0x127)])throw CliErrors[_0x548f84(0x114)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x548f84(0x12c)]+_0x548f84(0x13b)+productEnvName(_0x548f84(0x111))+'.');const {setActiveAK:_0x12833d}=await import(_0x548f84(0xfd));_0x12833d(_0xa4e9f['accessKey']);}let _0xd6c4a3='';if(_0x287277[_0x548f84(0x11e)]!==![]){_0xd6c4a3=_0xa4e9f[_0x548f84(0x134)]??'',_0xd6c4a3=await resolveExplicitAppName(_0x287277,_0xa4e9f,_0xd6c4a3);if(!_0xd6c4a3){await assertSelectedAppNameIsRuntimeAccessible(_0x287277,_0xa4e9f);throw CliErrors[_0x548f84(0x103)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x548f84(0x12c)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x287277,_0xa4e9f,_0xd6c4a3);}if(_0xd6c4a3){const {initSdkClient:_0x423e50}=await import(_0x548f84(0x104));_0x423e50({'appCode':_0xd6c4a3,'env':_0xa4e9f[_0x548f84(0x122)]??_0x548f84(0x13e),'accessKey':_0xa4e9f[_0x548f84(0x127)],'authMode':_0x331f00}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0xa4e9f[_0x548f84(0x126)]},'numbers':{'pagesize':_0xa4e9f[_0x548f84(0x110)]}},'extras':{'appCode':_0xd6c4a3,'cookie':'','apiDomain':_0xa4e9f[_0x548f84(0x13d)],'apiDir':'','accessKey':_0xa4e9f[_0x548f84(0x127)],'envName':_0xa4e9f['env'],'mergedCli':_0xa4e9f[_0x548f84(0x139)]}};},async 'confirmHighRisk'({def:_0x49b8aa,env:_0x198790,flags:_0x5b618b,commandLabel:_0x8ff103}){const _0x41fd35=a90_0x5a594d;if(_0x198790[_0x41fd35(0x10f)]){const _0x5a7c5b=reconstructCommandArgv(_0x49b8aa,_0x5b618b);throw CliErrors[_0x41fd35(0x13a)](_0x41fd35(0x136)+_0x8ff103+_0x41fd35(0x12b)+(_0x41fd35(0x10b)+_0x5a7c5b));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x49b8aa,_0x8ff103,_0x5b618b),'createCancelledError':_0x1b3663=>CliErrors[_0x41fd35(0x12f)](_0x1b3663)});},'mapDryRunError'(_0x3127d6){return mapUserFacingExecuteError(_0x3127d6);},'mapExecuteError'(_0x28dffe){return mapUserFacingExecuteError(_0x28dffe);},async 'finalize'(){const _0x30c683=a90_0x5a594d;try{if(sdkClientInitialized){const {clearSdkClient:_0x46519a}=await import('../core/sdk-client.js');_0x46519a();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x520c65}=await import(_0x30c683(0xfd));_0x520c65();}}};async function resolveExplicitAppName(_0x7b758c,_0x4e0ccf,_0x38a8a5){const _0x4c1a38=a90_0x5a594d;if(_0x7b758c[_0x4c1a38(0x11e)]===![])return _0x38a8a5;const _0x56b037=typeof _0x4e0ccf[_0x4c1a38(0x100)][_0x4c1a38(0x10c)]==='string'?_0x4e0ccf[_0x4c1a38(0x100)][_0x4c1a38(0x10c)]['trim']():'';if(!_0x56b037)return _0x38a8a5;const _0x5d2eeb=typeof _0x4e0ccf['rawFlags'][_0x4c1a38(0x132)]===_0x4c1a38(0x138)&&_0x4e0ccf[_0x4c1a38(0x100)][_0x4c1a38(0x132)]['trim']()||productEnv('APPCODE');if(_0x5d2eeb||_0x4e0ccf[_0x4c1a38(0x118)]==='local-alias')return _0x38a8a5;const {getRemoteAppList:_0x294c2f}=await import(_0x4c1a38(0x13c)),_0x1f1401=await _0x294c2f({'env':_0x4e0ccf[_0x4c1a38(0x122)]??_0x4c1a38(0x13e),'accessKey':_0x4e0ccf[_0x4c1a38(0x127)]}),_0xef784c=findAppByName(_0x1f1401[_0x4c1a38(0x115)],_0x56b037);if(_0xef784c&&!isRuntimeAccessibleApp(_0xef784c))throw runtimeInaccessibleAppError(_0xef784c,'\x22'+_0x56b037+'\x22');const _0x1fa463=_0xef784c?.['appCode']?.[_0x4c1a38(0x108)]();if(_0x1fa463)return _0x1fa463;throw CliErrors[_0x4c1a38(0x13a)](_0x4c1a38(0x119)+_0x56b037,_0x4c1a38(0x12a)+CLI_BIN_NAME+_0x4c1a38(0x11d)+_0x56b037+_0x4c1a38(0x120)+PRODUCT_CONFIG[_0x4c1a38(0x12c)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x8f674c,_0x323566){const _0x43f2a2=a90_0x5a594d;if(_0x8f674c[_0x43f2a2(0x11e)]===![]||!_0x323566[_0x43f2a2(0x127)])return;const _0x1154da=(typeof _0x323566['rawFlags']['app']==='string'&&_0x323566[_0x43f2a2(0x100)]['app'][_0x43f2a2(0x108)]()?_0x323566['rawFlags']['app']:_0x323566[_0x43f2a2(0x139)]?.[_0x43f2a2(0x12e)]??_0x323566['mergedCli']?.[_0x43f2a2(0x10e)])?.[_0x43f2a2(0x108)]();if(!_0x1154da)return;const {getRemoteAppList:_0x31799b}=await import(_0x43f2a2(0x13c)),_0x44509d=await _0x31799b({'env':_0x323566[_0x43f2a2(0x122)]??_0x43f2a2(0x13e),'accessKey':_0x323566[_0x43f2a2(0x127)]}),_0x32a2f4=findAppByName(_0x44509d[_0x43f2a2(0x115)],_0x1154da);if(_0x32a2f4&&!isRuntimeAccessibleApp(_0x32a2f4))throw runtimeInaccessibleAppError(_0x32a2f4,'\x22'+_0x1154da+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x123cc2,_0x4cfe27,_0x5398d2){const _0x134b3b=a90_0x5a594d;if(_0x123cc2[_0x134b3b(0x11e)]===![]||!_0x4cfe27[_0x134b3b(0x127)])return;const {getRemoteAppList:_0x4d41a8}=await import(_0x134b3b(0x13c)),_0x34d7e8=await _0x4d41a8({'env':_0x4cfe27['env']??_0x134b3b(0x13e),'accessKey':_0x4cfe27[_0x134b3b(0x127)]}),_0x510fbb=findAppByCode(_0x34d7e8[_0x134b3b(0x115)],_0x5398d2);if(_0x510fbb&&!isRuntimeAccessibleApp(_0x510fbb))throw runtimeInaccessibleAppError(_0x510fbb,'appcode\x20\x22'+_0x5398d2+'\x22');}function a90_0xb2c7(){const _0x2910ae=['app','APPCODE','defaultApp','isNonInteractive','defaultPageSize','ACCESS_KEY','1400010zmBLjl','includes','authRequired','items','object','67167bDMCTI','appCodeSource','Unknown\x20app:\x20','has','error','7KuFanu','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','requiresAppCode','catch','.appcode\x20to\x20','requiresAuth','env','format','_notice','pageSize','defaultVerbose','accessKey','57562bFOIqG','verbose','Run\x20`','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','newConfigFileName','nonInteractive','currentApp','cancelled','map','name','appcode','command','appCode','riskLevel','High-risk\x20operation\x20`','1340760QrJXpe','string','mergedCli','validation','\x20or\x20pass\x20','../commands/app/remote-source.js','apiDomain','production','../core/api-client.js','350306FfMRWH','pretty','rawFlags','913576MFHsAC','resolve','configMissing','../core/sdk-client.js','execute','349506EGHYsa','service','trim','schema','728zklKzM','\x20\x20To\x20proceed:\x20'];a90_0xb2c7=function(){return _0x2910ae;};return a90_0xb2c7();}export async function runCommand(_0x40b6e4,_0x43f393){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x40b6e4)?withUpdateNotice(_0x40b6e4):_0x40b6e4,_0x43f393,runnerAdapter);}function shouldAttachUpdateNotice(_0x4c582e){const _0x200a83=a90_0x5a594d;return!['update',_0x200a83(0x109),'doctor'][_0x200a83(0x113)](_0x4c582e['service']);}function withUpdateNotice(_0x3f4c2b){return{..._0x3f4c2b,async 'execute'(_0x109471){const _0x4e212a=a90_0x2ef7,_0x516bf4=shouldResolveUpdateNotice(_0x109471)?resolveLatestUpdateNotice()[_0x4e212a(0x11f)](()=>null):Promise[_0x4e212a(0x102)](null),_0x5ef7af=await _0x3f4c2b[_0x4e212a(0x105)](_0x109471);return attachUpdateNotice(_0x5ef7af,await _0x516bf4);}};}function shouldResolveUpdateNotice(_0x4c7892){const _0x59903f=a90_0x5a594d;return _0x4c7892[_0x59903f(0x123)]===_0x59903f(0xff)&&!_0x4c7892[_0x59903f(0x12d)];}function attachUpdateNotice(_0x13a2a9,_0x2b7c3d){const _0x19a315=a90_0x5a594d;if(!_0x2b7c3d||!_0x13a2a9||typeof _0x13a2a9!=='object')return _0x13a2a9;const _0x44b9f5=_0x13a2a9,_0x53c082=typeof _0x44b9f5['_notice']===_0x19a315(0x116)&&_0x44b9f5[_0x19a315(0x124)]!==null?_0x44b9f5[_0x19a315(0x124)]:{};return{..._0x44b9f5,'_notice':{..._0x53c082,'update':_0x2b7c3d}};}
1
+ const a89_0x2dfd4e=a89_0xaa98;(function(_0x18364d,_0x5b22af){const _0x2767ac=a89_0xaa98,_0x229912=_0x18364d();while(!![]){try{const _0x17ecf6=parseInt(_0x2767ac(0x183))/0x1*(parseInt(_0x2767ac(0x1a5))/0x2)+parseInt(_0x2767ac(0x184))/0x3+-parseInt(_0x2767ac(0x173))/0x4+-parseInt(_0x2767ac(0x16c))/0x5*(-parseInt(_0x2767ac(0x1a2))/0x6)+-parseInt(_0x2767ac(0x195))/0x7+-parseInt(_0x2767ac(0x1a0))/0x8*(parseInt(_0x2767ac(0x19e))/0x9)+parseInt(_0x2767ac(0x196))/0xa;if(_0x17ecf6===_0x5b22af)break;else _0x229912['push'](_0x229912['shift']());}catch(_0x142f9a){_0x229912['push'](_0x229912['shift']());}}}(a89_0x4831,0x3a45c));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';function a89_0xaa98(_0x4b8b0e,_0x48d590){_0x4b8b0e=_0x4b8b0e-0x16c;const _0x4831d1=a89_0x4831();let _0xaa98f1=_0x4831d1[_0x4b8b0e];return _0xaa98f1;}import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x57e70b){return void _0x57e70b,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x39abde,_0x455602){const _0x2a1df0=a89_0xaa98,_0x405e8e=typeof _0x455602['app']===_0x2a1df0(0x1a6)&&_0x455602['app'][_0x2a1df0(0x187)]();return{'rawFlags':_0x455602,'appCode':_0x39abde[_0x2a1df0(0x194)]||productEnv(_0x2a1df0(0x178))||(_0x405e8e?undefined:readAppCodeFromConfig()),'appCodeSource':_0x39abde['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x455602),'defaultFormat':_0x39abde['format'],'defaultPageSize':_0x39abde['pageSize'],'defaultVerbose':_0x39abde['verbose'],'riskLevel':_0x39abde['riskLevel'],'accessKey':_0x39abde[_0x2a1df0(0x191)],'env':_0x39abde['env'],'mergedCli':{'defaultApp':_0x39abde[_0x2a1df0(0x17f)],'currentApp':_0x39abde[_0x2a1df0(0x179)],'appCode':_0x39abde[_0x2a1df0(0x194)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a89_0x2dfd4e(0x174)](_0x3edd4b=>PIPELINE_FLAG_NAMES[a89_0x2dfd4e(0x186)](_0x3edd4b[a89_0x2dfd4e(0x19a)]))['map'](({name:_0x4bf0b6,type:_0x4cbddc,description:_0x2c7314})=>({'name':_0x4bf0b6,'type':_0x4cbddc,'description':_0x2c7314})),'formatOutput':formatOutput,'getCommandLabel'(_0x2d6f8a){return CLI_BIN_NAME+'\x20'+_0x2d6f8a['service']+'\x20'+_0x2d6f8a['command'];},'riskPolicy':{'onViolation'(_0x56d997){console['error'](_0x56d997);},'createError'(_0x47e4c7){const _0x85e613=a89_0x2dfd4e;return CliErrors[_0x85e613(0x16f)](_0x47e4c7);}},async 'prepare'(_0x383ec8,_0x27e087){const _0x5115b9=a89_0x2dfd4e,_0x361409=resolveAuthMode(_0x27e087);if(_0x383ec8[_0x5115b9(0x185)]!==![]){if(!_0x27e087[_0x5115b9(0x191)])throw CliErrors[_0x5115b9(0x17a)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5115b9(0x176)]+'\x20or\x20pass\x20'+productEnvName(_0x5115b9(0x19b))+'.');const {setActiveAK:_0x16dc33}=await import('../core/api-client.js');_0x16dc33(_0x27e087[_0x5115b9(0x191)]);}let _0x88f4f6='';if(_0x383ec8[_0x5115b9(0x18e)]!==![]){_0x88f4f6=_0x27e087['appCode']??'',_0x88f4f6=await resolveExplicitAppName(_0x383ec8,_0x27e087,_0x88f4f6);if(!_0x88f4f6){await assertSelectedAppNameIsRuntimeAccessible(_0x383ec8,_0x27e087);throw CliErrors['configMissing'](_0x5115b9(0x1a4)+PRODUCT_CONFIG[_0x5115b9(0x176)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x383ec8,_0x27e087,_0x88f4f6);}if(_0x88f4f6){const {initSdkClient:_0x1cfb2d}=await import(_0x5115b9(0x18f));_0x1cfb2d({'appCode':_0x88f4f6,'env':_0x27e087[_0x5115b9(0x18a)]??'production','accessKey':_0x27e087[_0x5115b9(0x191)],'authMode':_0x361409}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x27e087[_0x5115b9(0x172)]},'numbers':{'pagesize':_0x27e087[_0x5115b9(0x175)]}},'extras':{'appCode':_0x88f4f6,'cookie':'','apiDomain':_0x27e087[_0x5115b9(0x17b)],'apiDir':'','accessKey':_0x27e087[_0x5115b9(0x191)],'envName':_0x27e087['env'],'mergedCli':_0x27e087['mergedCli']}};},async 'confirmHighRisk'({def:_0x3400cb,env:_0x3c965c,flags:_0x3e37e0,commandLabel:_0x26a788}){const _0x3e1e63=a89_0x2dfd4e;if(_0x3c965c[_0x3e1e63(0x171)]){const _0x17e65f=reconstructCommandArgv(_0x3400cb,_0x3e37e0);throw CliErrors[_0x3e1e63(0x18b)](_0x3e1e63(0x1a3)+_0x26a788+_0x3e1e63(0x198)+(_0x3e1e63(0x16d)+_0x17e65f));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3400cb,_0x26a788,_0x3e37e0),'createCancelledError':_0x3cbba4=>CliErrors[_0x3e1e63(0x16f)](_0x3cbba4)});},'mapDryRunError'(_0x5a94fa){return mapUserFacingExecuteError(_0x5a94fa);},'mapExecuteError'(_0x400dd6){return mapUserFacingExecuteError(_0x400dd6);},async 'finalize'(){const _0x3aad52=a89_0x2dfd4e;try{if(sdkClientInitialized){const {clearSdkClient:_0xc907cf}=await import(_0x3aad52(0x18f));_0xc907cf();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x37769a}=await import(_0x3aad52(0x197));_0x37769a();}}};async function resolveExplicitAppName(_0x19435f,_0x1206f1,_0x4856ca){const _0x31fa78=a89_0x2dfd4e;if(_0x19435f[_0x31fa78(0x18e)]===![])return _0x4856ca;const _0x2dcfe1=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x182)]===_0x31fa78(0x1a6)?_0x1206f1['rawFlags'][_0x31fa78(0x182)][_0x31fa78(0x187)]():'';if(!_0x2dcfe1)return _0x4856ca;const _0x50f633=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)]==='string'&&_0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)][_0x31fa78(0x187)]()||productEnv(_0x31fa78(0x178));if(_0x50f633||_0x1206f1['appCodeSource']===_0x31fa78(0x190))return _0x4856ca;const {getRemoteAppList:_0x379f5a}=await import(_0x31fa78(0x192)),_0x500f86=await _0x379f5a({'env':_0x1206f1['env']??'production','accessKey':_0x1206f1[_0x31fa78(0x191)]}),_0x1ffadb=findAppByName(_0x500f86['items'],_0x2dcfe1);if(_0x1ffadb&&!isRuntimeAccessibleApp(_0x1ffadb))throw runtimeInaccessibleAppError(_0x1ffadb,'\x22'+_0x2dcfe1+'\x22');const _0x53679c=_0x1ffadb?.[_0x31fa78(0x194)]?.[_0x31fa78(0x187)]();if(_0x53679c)return _0x53679c;throw CliErrors[_0x31fa78(0x18b)](_0x31fa78(0x177)+_0x2dcfe1,'Run\x20`'+CLI_BIN_NAME+_0x31fa78(0x19c)+_0x2dcfe1+_0x31fa78(0x19d)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4ac8d9,_0x74359b){const _0x48f94b=a89_0x2dfd4e;if(_0x4ac8d9['requiresAppCode']===![]||!_0x74359b[_0x48f94b(0x191)])return;const _0x4a9cf4=(typeof _0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]===_0x48f94b(0x1a6)&&_0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]['trim']()?_0x74359b['rawFlags'][_0x48f94b(0x182)]:_0x74359b['mergedCli']?.['currentApp']??_0x74359b[_0x48f94b(0x18c)]?.[_0x48f94b(0x17f)])?.[_0x48f94b(0x187)]();if(!_0x4a9cf4)return;const {getRemoteAppList:_0x36719b}=await import('../commands/app/remote-source.js'),_0x2dc0fb=await _0x36719b({'env':_0x74359b[_0x48f94b(0x18a)]??_0x48f94b(0x17d),'accessKey':_0x74359b[_0x48f94b(0x191)]}),_0x4fe72e=findAppByName(_0x2dc0fb[_0x48f94b(0x1a1)],_0x4a9cf4);if(_0x4fe72e&&!isRuntimeAccessibleApp(_0x4fe72e))throw runtimeInaccessibleAppError(_0x4fe72e,'\x22'+_0x4a9cf4+'\x22');}function a89_0x4831(){const _0x18c6c4=['_notice','appcode\x20\x22','env','validation','mergedCli','appcode','requiresAppCode','../core/sdk-client.js','local-alias','accessKey','../commands/app/remote-source.js','rawFlags','appCode','2142763ldyDeS','6444440GgbJTv','../core/api-client.js','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','resolve','name','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','.appcode\x20to\x20','1331901Ptudfa','update','8gVXFOS','items','24kINZml','High-risk\x20operation\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','106394TjKCXs','string','44005tncpdY','\x20\x20To\x20proceed:\x20','pretty','cancelled','service','isNonInteractive','defaultVerbose','1574912zGmDmU','filter','defaultPageSize','newConfigFileName','Unknown\x20app:\x20','APPCODE','currentApp','authRequired','apiDomain','schema','production','catch','defaultApp','includes','execute','app','1gGJGct','1060995OBxXjx','requiresAuth','has','trim'];a89_0x4831=function(){return _0x18c6c4;};return a89_0x4831();}async function assertAppCodeIsRuntimeAccessible(_0x411a9b,_0x2e887b,_0x1039d9){const _0x101bd1=a89_0x2dfd4e;if(_0x411a9b[_0x101bd1(0x18e)]===![]||!_0x2e887b[_0x101bd1(0x191)])return;const {getRemoteAppList:_0x5df7e9}=await import(_0x101bd1(0x192)),_0x308365=await _0x5df7e9({'env':_0x2e887b[_0x101bd1(0x18a)]??'production','accessKey':_0x2e887b[_0x101bd1(0x191)]}),_0x42c91c=findAppByCode(_0x308365['items'],_0x1039d9);if(_0x42c91c&&!isRuntimeAccessibleApp(_0x42c91c))throw runtimeInaccessibleAppError(_0x42c91c,_0x101bd1(0x189)+_0x1039d9+'\x22');}export async function runCommand(_0x3a98b7,_0xda11f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x3a98b7)?withUpdateNotice(_0x3a98b7):_0x3a98b7,_0xda11f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x4cf824){const _0xd30b4d=a89_0x2dfd4e;return![_0xd30b4d(0x19f),_0xd30b4d(0x17c),'doctor'][_0xd30b4d(0x180)](_0x4cf824[_0xd30b4d(0x170)]);}function withUpdateNotice(_0x4cc924){return{..._0x4cc924,async 'execute'(_0x6cf0a8){const _0x57bf8f=a89_0xaa98,_0x28453b=shouldResolveUpdateNotice(_0x6cf0a8)?resolveLatestUpdateNotice()[_0x57bf8f(0x17e)](()=>null):Promise[_0x57bf8f(0x199)](null),_0xdf72b5=await _0x4cc924[_0x57bf8f(0x181)](_0x6cf0a8);return attachUpdateNotice(_0xdf72b5,await _0x28453b);}};}function shouldResolveUpdateNotice(_0x1e2642){const _0x4549fe=a89_0x2dfd4e;return _0x1e2642['format']===_0x4549fe(0x16e)&&!_0x1e2642['nonInteractive'];}function attachUpdateNotice(_0x36d7a8,_0x357254){const _0x565f96=a89_0x2dfd4e;if(!_0x357254||!_0x36d7a8||typeof _0x36d7a8!=='object')return _0x36d7a8;const _0x387feb=_0x36d7a8,_0x2e0a5a=typeof _0x387feb[_0x565f96(0x188)]==='object'&&_0x387feb[_0x565f96(0x188)]!==null?_0x387feb[_0x565f96(0x188)]:{};return{..._0x387feb,'_notice':{..._0x2e0a5a,'update':_0x357254}};}
@@ -1 +1 @@
1
- (function(_0x2b8f8e,_0x2145dc){const _0x148421=a91_0x5f3f,_0x112525=_0x2b8f8e();while(!![]){try{const _0x5d5188=-parseInt(_0x148421(0x132))/0x1+-parseInt(_0x148421(0x128))/0x2*(parseInt(_0x148421(0x126))/0x3)+parseInt(_0x148421(0x12c))/0x4*(parseInt(_0x148421(0x129))/0x5)+-parseInt(_0x148421(0x125))/0x6+parseInt(_0x148421(0x130))/0x7*(-parseInt(_0x148421(0x12d))/0x8)+parseInt(_0x148421(0x127))/0x9+-parseInt(_0x148421(0x12f))/0xa*(-parseInt(_0x148421(0x12e))/0xb);if(_0x5d5188===_0x2145dc)break;else _0x112525['push'](_0x112525['shift']());}catch(_0x2fabbd){_0x112525['push'](_0x112525['shift']());}}}(a91_0x3b48,0x1ab7a));import{buildSchemaPayload as a91_0x5eca01}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a91_0x5f3f(_0x3d989e,_0x3c7359){_0x3d989e=_0x3d989e-0x123;const _0x3b48f5=a91_0x3b48();let _0x5f3f41=_0x3b48f5[_0x3d989e];return _0x5f3f41;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a91_0x3b48(){const _0x4873f9=['806142lfUUtT','6qFJwPK','955170FhIZPi','123208MoRhZK','199635XLFbzp','map','../commands/registry.js','4WmfqJQ','16yFdErT','13255icrxzp','3490lOigXl','431746vBgYcX','commands','76247vlhqhn','required','service','auth','none'];a91_0x3b48=function(){return _0x4873f9;};return a91_0x3b48();}export async function buildSchemaPayload(){const _0x5553d0=a91_0x5f3f,{serviceRegistry:_0x2d137f,findDefinition:_0x476793}=await import(_0x5553d0(0x12b)),_0xbcbfa6=new Set(_0x2d137f[_0x5553d0(0x12a)](_0x35e72a=>_0x35e72a[_0x5553d0(0x134)])),_0x25049f=listDynamicServiceEntries()['filter'](_0x6429a=>!_0xbcbfa6['has'](_0x6429a[_0x5553d0(0x134)])),_0x408aa6=a91_0x5eca01({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x2d137f,_0x25049f),'buildAllFlags':buildAllFlags,'findDefinition':(_0x43a49c,_0x2e570b)=>_0x476793(_0x43a49c,_0x2e570b)??findDynamicServiceDefinition(_0x43a49c,_0x2e570b)});return normalizeSchemaPayload(_0x408aa6);}function normalizeSchemaPayload(_0x38da66){const _0xc49eec=a91_0x5f3f;return{..._0x38da66,'schemaVersion':0x2,'services':_0x38da66['services'][_0xc49eec(0x12a)](_0x4c4886=>({..._0x4c4886,'commands':_0x4c4886[_0xc49eec(0x131)][_0xc49eec(0x12a)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x2a58c1){const _0x556a59=a91_0x5f3f,_0x5a69cf=_0x2a58c1;return{..._0x2a58c1,'auth':_0x5a69cf[_0x556a59(0x123)]??(_0x2a58c1['requiresAuth']?_0x556a59(0x133):_0x556a59(0x124))};}
1
+ (function(_0x663364,_0x183286){const _0x35ed4b=a90_0x24dc,_0x3aff62=_0x663364();while(!![]){try{const _0x3df043=-parseInt(_0x35ed4b(0x1d2))/0x1+parseInt(_0x35ed4b(0x1d0))/0x2+parseInt(_0x35ed4b(0x1c4))/0x3+-parseInt(_0x35ed4b(0x1cb))/0x4*(parseInt(_0x35ed4b(0x1c7))/0x5)+-parseInt(_0x35ed4b(0x1cf))/0x6*(-parseInt(_0x35ed4b(0x1c2))/0x7)+parseInt(_0x35ed4b(0x1c3))/0x8*(parseInt(_0x35ed4b(0x1c5))/0x9)+parseInt(_0x35ed4b(0x1c8))/0xa;if(_0x3df043===_0x183286)break;else _0x3aff62['push'](_0x3aff62['shift']());}catch(_0x675241){_0x3aff62['push'](_0x3aff62['shift']());}}}(a90_0x128d,0x618d5));import{buildSchemaPayload as a90_0x308526}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x54f30b=a90_0x24dc,{serviceRegistry:_0x13391d,findDefinition:_0x52d6f5}=await import(_0x54f30b(0x1cc)),_0x54a6a5=new Set(_0x13391d[_0x54f30b(0x1ce)](_0x198984=>_0x198984['service'])),_0x5b534f=listDynamicServiceEntries()[_0x54f30b(0x1ca)](_0x527e35=>!_0x54a6a5[_0x54f30b(0x1cd)](_0x527e35['service'])),_0x595df6=a90_0x308526({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x13391d,_0x5b534f),'buildAllFlags':buildAllFlags,'findDefinition':(_0x5f515c,_0xd357e7)=>_0x52d6f5(_0x5f515c,_0xd357e7)??findDynamicServiceDefinition(_0x5f515c,_0xd357e7)});return normalizeSchemaPayload(_0x595df6);}function normalizeSchemaPayload(_0x3ba4a8){const _0x189689=a90_0x24dc;return{..._0x3ba4a8,'schemaVersion':0x2,'services':_0x3ba4a8[_0x189689(0x1c6)]['map'](_0x1405cb=>({..._0x1405cb,'commands':_0x1405cb[_0x189689(0x1d1)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x55f55a){const _0x47a220=a90_0x24dc,_0x1e8c24=_0x55f55a;return{..._0x55f55a,'auth':_0x1e8c24[_0x47a220(0x1d3)]??(_0x55f55a[_0x47a220(0x1c9)]?_0x47a220(0x1d4):_0x47a220(0x1d5))};}function a90_0x24dc(_0x14b489,_0x40a16a){_0x14b489=_0x14b489-0x1c2;const _0x128d1d=a90_0x128d();let _0x24dc06=_0x128d1d[_0x14b489];return _0x24dc06;}function a90_0x128d(){const _0xb0aaaf=['auth','required','none','2037bAvZWj','214432miSiuZ','742896cYHnld','234KKXfag','services','15yTewhM','2895060lyQFpk','requiresAuth','filter','887676IgfVod','../commands/registry.js','has','map','3822qJKVNc','731666LmiRVb','commands','719912zVsSQN'];a90_0x128d=function(){return _0xb0aaaf;};return a90_0x128d();}
@@ -1 +1 @@
1
- function a92_0x3135(){const _0x531d6b=['464835slAQzf','service','813070XenjSe','length','14HBIpiD','slice','12349rCmSai','1528896TciqPT','10xTVtxH','1295976gBpgPO','431448YKzACu','117aEhgtE','1562862mloLXL'];a92_0x3135=function(){return _0x531d6b;};return a92_0x3135();}(function(_0x4cc398,_0x5f5166){const _0xccbad0=a92_0x34de,_0x2a4662=_0x4cc398();while(!![]){try{const _0x311382=-parseInt(_0xccbad0(0x19b))/0x1+-parseInt(_0xccbad0(0x1a1))/0x2+-parseInt(_0xccbad0(0x1a2))/0x3+-parseInt(_0xccbad0(0x19f))/0x4*(parseInt(_0xccbad0(0x19d))/0x5)+-parseInt(_0xccbad0(0x19e))/0x6*(-parseInt(_0xccbad0(0x199))/0x7)+parseInt(_0xccbad0(0x19c))/0x8+-parseInt(_0xccbad0(0x1a0))/0x9*(-parseInt(_0xccbad0(0x197))/0xa);if(_0x311382===_0x5f5166)break;else _0x2a4662['push'](_0x2a4662['shift']());}catch(_0x25f25c){_0x2a4662['push'](_0x2a4662['shift']());}}}(a92_0x3135,0x7de3e));function a92_0x34de(_0x5ee700,_0x40d466){_0x5ee700=_0x5ee700-0x197;const _0x313597=a92_0x3135();let _0x34ded2=_0x313597[_0x5ee700];return _0x34ded2;}export function insertDynamicServicesAfterServiceTree(_0xc4088,_0x5c32a7){const _0x1e9a92=a92_0x34de;if(_0x5c32a7[_0x1e9a92(0x198)]===0x0)return[..._0xc4088];const _0xa67a98=_0xc4088['findIndex'](_0x2716e1=>_0x2716e1[_0x1e9a92(0x1a3)]===_0x1e9a92(0x1a3));if(_0xa67a98<0x0)return[..._0xc4088,..._0x5c32a7];return[..._0xc4088[_0x1e9a92(0x19a)](0x0,_0xa67a98+0x1),..._0x5c32a7,..._0xc4088[_0x1e9a92(0x19a)](_0xa67a98+0x1)];}
1
+ function a91_0xac5d(_0x4067de,_0x34455d){_0x4067de=_0x4067de-0x174;const _0x1a2c95=a91_0x1a2c();let _0xac5dc3=_0x1a2c95[_0x4067de];return _0xac5dc3;}(function(_0x1feb80,_0x38e901){const _0x2ccd90=a91_0xac5d,_0x1de35e=_0x1feb80();while(!![]){try{const _0x21cf9a=parseInt(_0x2ccd90(0x180))/0x1+-parseInt(_0x2ccd90(0x175))/0x2+parseInt(_0x2ccd90(0x17d))/0x3*(-parseInt(_0x2ccd90(0x181))/0x4)+-parseInt(_0x2ccd90(0x176))/0x5*(parseInt(_0x2ccd90(0x179))/0x6)+-parseInt(_0x2ccd90(0x17c))/0x7+-parseInt(_0x2ccd90(0x17f))/0x8*(-parseInt(_0x2ccd90(0x178))/0x9)+parseInt(_0x2ccd90(0x17e))/0xa;if(_0x21cf9a===_0x38e901)break;else _0x1de35e['push'](_0x1de35e['shift']());}catch(_0x3c8599){_0x1de35e['push'](_0x1de35e['shift']());}}}(a91_0x1a2c,0xb4137));export function insertDynamicServicesAfterServiceTree(_0x5cd2be,_0x34f4f1){const _0xfa3fc=a91_0xac5d;if(_0x34f4f1[_0xfa3fc(0x174)]===0x0)return[..._0x5cd2be];const _0xa68644=_0x5cd2be[_0xfa3fc(0x17a)](_0x3b6f92=>_0x3b6f92[_0xfa3fc(0x177)]==='service');if(_0xa68644<0x0)return[..._0x5cd2be,..._0x34f4f1];return[..._0x5cd2be[_0xfa3fc(0x17b)](0x0,_0xa68644+0x1),..._0x34f4f1,..._0x5cd2be[_0xfa3fc(0x17b)](_0xa68644+0x1)];}function a91_0x1a2c(){const _0x4f5d3c=['34205ZNKWGP','service','8275482bqLNYr','942KzkdoQ','findIndex','slice','5956580wHhhWd','559947cZfqcC','14266150AkImEQ','8MOdnWA','823767EUGNMf','8HiKqUE','length','268028ZOBIah'];a91_0x1a2c=function(){return _0x4f5d3c;};return a91_0x1a2c();}
@@ -1 +1 @@
1
- (function(_0x478d69,_0x3abf4b){var _0xd04fc8=a93_0xfef0,_0x400535=_0x478d69();while(!![]){try{var _0x11bf4a=parseInt(_0xd04fc8(0x189))/0x1+parseInt(_0xd04fc8(0x192))/0x2+parseInt(_0xd04fc8(0x18a))/0x3*(parseInt(_0xd04fc8(0x188))/0x4)+parseInt(_0xd04fc8(0x18c))/0x5+-parseInt(_0xd04fc8(0x190))/0x6*(parseInt(_0xd04fc8(0x18d))/0x7)+parseInt(_0xd04fc8(0x191))/0x8*(-parseInt(_0xd04fc8(0x18f))/0x9)+-parseInt(_0xd04fc8(0x18b))/0xa*(-parseInt(_0xd04fc8(0x18e))/0xb);if(_0x11bf4a===_0x3abf4b)break;else _0x400535['push'](_0x400535['shift']());}catch(_0x472e3f){_0x400535['push'](_0x400535['shift']());}}}(a93_0x5420,0x658fd));function a93_0xfef0(_0x39cb56,_0x5b98f0){_0x39cb56=_0x39cb56-0x188;var _0x542037=a93_0x5420();var _0xfef0ba=_0x542037[_0x39cb56];return _0xfef0ba;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a93_0x5420(){var _0x33b883=['215037lvFyrm','4270SZGVDu','602930fyURjh','1841FuIdeb','5379RFqjlo','27fmcbVE','12708DzHYEQ','596728tygrHk','305406kbjAAW','20BgqQax','356317NhxLOT'];a93_0x5420=function(){return _0x33b883;};return a93_0x5420();}
1
+ function a92_0x2caf(_0x5177b2,_0x1c26ae){_0x5177b2=_0x5177b2-0xbb;var _0x579a2c=a92_0x579a();var _0x2caf16=_0x579a2c[_0x5177b2];return _0x2caf16;}function a92_0x579a(){var _0x270838=['257150AjIZIK','431336myMULO','885588HEZCqA','2572260dHWVAu','5183490WPclzr','3609621hbPmqO','4DjWwfk','10DrFSYm','843368STrjKS','126UOFOTp'];a92_0x579a=function(){return _0x270838;};return a92_0x579a();}(function(_0x297d7a,_0x524d39){var _0x3b249c=a92_0x2caf,_0x145132=_0x297d7a();while(!![]){try{var _0x54b3d2=parseInt(_0x3b249c(0xc2))/0x1+parseInt(_0x3b249c(0xc4))/0x2+-parseInt(_0x3b249c(0xbc))/0x3*(parseInt(_0x3b249c(0xc0))/0x4)+-parseInt(_0x3b249c(0xbe))/0x5+-parseInt(_0x3b249c(0xbd))/0x6+parseInt(_0x3b249c(0xc3))/0x7*(parseInt(_0x3b249c(0xbb))/0x8)+-parseInt(_0x3b249c(0xbf))/0x9*(-parseInt(_0x3b249c(0xc1))/0xa);if(_0x54b3d2===_0x524d39)break;else _0x145132['push'](_0x145132['shift']());}catch(_0x2cb85e){_0x145132['push'](_0x145132['shift']());}}}(a92_0x579a,0x8e502));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a94_0x4d05e9=a94_0x5d17;(function(_0x1826ab,_0xf1202d){const _0x5c8703=a94_0x5d17,_0x5dcd7e=_0x1826ab();while(!![]){try{const _0x18b324=parseInt(_0x5c8703(0xa3))/0x1*(parseInt(_0x5c8703(0x9b))/0x2)+parseInt(_0x5c8703(0x9a))/0x3+-parseInt(_0x5c8703(0x9f))/0x4*(-parseInt(_0x5c8703(0xa1))/0x5)+-parseInt(_0x5c8703(0xa0))/0x6+-parseInt(_0x5c8703(0x9d))/0x7*(parseInt(_0x5c8703(0x98))/0x8)+-parseInt(_0x5c8703(0x99))/0x9+parseInt(_0x5c8703(0x9e))/0xa;if(_0x18b324===_0xf1202d)break;else _0x5dcd7e['push'](_0x5dcd7e['shift']());}catch(_0x4e9917){_0x5dcd7e['push'](_0x5dcd7e['shift']());}}}(a94_0x20a3,0xa1369));export const VERSION=a94_0x4d05e9(0x9c);export const GIT_TAG=a94_0x4d05e9(0x97);export const GIT_COMMIT='b694bd7';function a94_0x20a3(){const _0x2a1e2a=['1733283LQbklX','85234AXkpLK','2.1.14','140vROZJf','8003260iaSHji','75732HmJjAJ','6491964FDgvCL','265gQMXfD','2026-07-15T12:34:00.962Z','25DpZdrl','v2.1.14-beta.1','501608LaZLme','4055562ByBFzM'];a94_0x20a3=function(){return _0x2a1e2a;};return a94_0x20a3();}function a94_0x5d17(_0x5650e4,_0x544ffc){_0x5650e4=_0x5650e4-0x97;const _0x20a350=a94_0x20a3();let _0x5d17d3=_0x20a350[_0x5650e4];return _0x5d17d3;}export const BUILD_TIME=a94_0x4d05e9(0xa2);
1
+ const a93_0x8c27f7=a93_0x3d12;(function(_0x2634ce,_0x59dd57){const _0x325900=a93_0x3d12,_0x36b4e6=_0x2634ce();while(!![]){try{const _0xf2bb2b=parseInt(_0x325900(0x10c))/0x1*(parseInt(_0x325900(0x106))/0x2)+-parseInt(_0x325900(0x102))/0x3+parseInt(_0x325900(0x100))/0x4*(parseInt(_0x325900(0x109))/0x5)+-parseInt(_0x325900(0x105))/0x6*(parseInt(_0x325900(0xff))/0x7)+-parseInt(_0x325900(0x10b))/0x8+-parseInt(_0x325900(0x108))/0x9+parseInt(_0x325900(0x101))/0xa*(parseInt(_0x325900(0x103))/0xb);if(_0xf2bb2b===_0x59dd57)break;else _0x36b4e6['push'](_0x36b4e6['shift']());}catch(_0x3fd157){_0x36b4e6['push'](_0x36b4e6['shift']());}}}(a93_0x10d6,0x21c3c));export const VERSION=a93_0x8c27f7(0x104);export const GIT_TAG='v2.1.15-beta.1';export const GIT_COMMIT=a93_0x8c27f7(0x107);function a93_0x3d12(_0x3c920e,_0x291719){_0x3c920e=_0x3c920e-0xff;const _0x10d6f5=a93_0x10d6();let _0x3d12b5=_0x10d6f5[_0x3c920e];return _0x3d12b5;}function a93_0x10d6(){const _0x474994=['211384MYxWFc','124UvJyxX','70doYiEk','4bOCBlr','116440cXHDlT','330hjLhNP','55KViDaU','2.1.15','85674jXLrpv','3804EFgQqY','00f3d96','1662399KoeHJn','991330jBSooZ','2026-07-16T11:49:15.465Z'];a93_0x10d6=function(){return _0x474994;};return a93_0x10d6();}export const BUILD_TIME=a93_0x8c27f7(0x10a);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a95_0x7e18(){const _0x9c35d7=['column','5WAzZzr','40214fVFpCC','7RZTPrz','23560jBpFME','1079496jHMKuk','2751100FeJFSF','1946145LypSQH','\x20\x20Use\x20','3hHDTeC','green','1416078tRMLFe','\x20to\x20view\x20available\x20commands.','1665528mGdcTf','\x20--help'];a95_0x7e18=function(){return _0x9c35d7;};return a95_0x7e18();}(function(_0x4f699c,_0x58ec05){const _0x9299bf=a95_0x1c07,_0x320842=_0x4f699c();while(!![]){try{const _0x3e8d65=-parseInt(_0x9299bf(0xc5))/0x1*(-parseInt(_0x9299bf(0xc6))/0x2)+parseInt(_0x9299bf(0xcd))/0x3*(-parseInt(_0x9299bf(0xd1))/0x4)+parseInt(_0x9299bf(0xcb))/0x5+parseInt(_0x9299bf(0xcf))/0x6*(-parseInt(_0x9299bf(0xc7))/0x7)+-parseInt(_0x9299bf(0xc8))/0x8+parseInt(_0x9299bf(0xc9))/0x9+parseInt(_0x9299bf(0xca))/0xa;if(_0x3e8d65===_0x58ec05)break;else _0x320842['push'](_0x320842['shift']());}catch(_0x556eca){_0x320842['push'](_0x320842['shift']());}}}(a95_0x7e18,0x38066));import{jsx as a95_0x2ba98c,jsxs as a95_0x4818d6}from'react/jsx-runtime';function a95_0x1c07(_0xa48157,_0x103fc3){_0xa48157=_0xa48157-0xc3;const _0x7e1889=a95_0x7e18();let _0x1c0760=_0x7e1889[_0xa48157];return _0x1c0760;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x24587e=a95_0x1c07,{exit:_0x24caf6}=useApp();return useEffect(()=>{_0x24caf6();},[_0x24caf6]),a95_0x4818d6(Box,{'flexDirection':_0x24587e(0xc4),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0x2ba98c(Box,{'children':a95_0x2ba98c(Text,{'bold':!![],'color':_0x24587e(0xce),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x4818d6(Box,{'marginTop':0x1,'children':[a95_0x2ba98c(Text,{'dimColor':!![],'children':_0x24587e(0xcc)}),a95_0x2ba98c(Text,{'bold':!![],'color':_0x24587e(0xce),'children':CLI_BIN_NAME+_0x24587e(0xc3)}),a95_0x2ba98c(Text,{'dimColor':!![],'children':_0x24587e(0xd0)})]})]});}
1
+ function a94_0x3c55(_0x5c1a14,_0x3338ba){_0x5c1a14=_0x5c1a14-0x18b;const _0x104edf=a94_0x104e();let _0x3c55c5=_0x104edf[_0x5c1a14];return _0x3c55c5;}(function(_0x100ec8,_0x31024a){const _0x35a59e=a94_0x3c55,_0x2f61de=_0x100ec8();while(!![]){try{const _0xc8f61e=-parseInt(_0x35a59e(0x18d))/0x1+parseInt(_0x35a59e(0x18e))/0x2*(parseInt(_0x35a59e(0x193))/0x3)+-parseInt(_0x35a59e(0x196))/0x4+parseInt(_0x35a59e(0x190))/0x5+parseInt(_0x35a59e(0x195))/0x6*(parseInt(_0x35a59e(0x192))/0x7)+-parseInt(_0x35a59e(0x18c))/0x8+parseInt(_0x35a59e(0x18b))/0x9;if(_0xc8f61e===_0x31024a)break;else _0x2f61de['push'](_0x2f61de['shift']());}catch(_0x23aa0a){_0x2f61de['push'](_0x2f61de['shift']());}}}(a94_0x104e,0x721a0));import{jsx as a94_0x4d3a2f,jsxs as a94_0x332b7e}from'react/jsx-runtime';import{useEffect}from'react';function a94_0x104e(){const _0x374371=['532lmAIia','\x20to\x20view\x20available\x20commands.','3726370qJjXYR','column','7RzPLOA','10488hEUVJf','green','1503702qGMzSi','633868aXLueh','248310bTzoon','7167888xFflRl','431604txfasu'];a94_0x104e=function(){return _0x374371;};return a94_0x104e();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x25a4a2=a94_0x3c55,{exit:_0x200415}=useApp();return useEffect(()=>{_0x200415();},[_0x200415]),a94_0x332b7e(Box,{'flexDirection':_0x25a4a2(0x191),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x4d3a2f(Box,{'children':a94_0x4d3a2f(Text,{'bold':!![],'color':_0x25a4a2(0x194),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x332b7e(Box,{'marginTop':0x1,'children':[a94_0x4d3a2f(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a94_0x4d3a2f(Text,{'bold':!![],'color':_0x25a4a2(0x194),'children':CLI_BIN_NAME+'\x20--help'}),a94_0x4d3a2f(Text,{'dimColor':!![],'children':_0x25a4a2(0x18f)})]})]});}
@@ -1 +1 @@
1
- function a96_0x37bd(){const _0x5b2795=['2657479BTrlUW','toString','exit\x20','24OVvvQy','stdio','932UYlMNc','6339HEKarv','59890TlQYLt','unknown','log','612FgVFzm','npx','stderr','1608575wOEWmQ','skills','skipNpxSkillsEnvSuffix','8zMrQRt','status','199062lOvSah','trim','7264144EEeVLs','133xiDYDV','join','74446cMvfwD','stdout'];a96_0x37bd=function(){return _0x5b2795;};return a96_0x37bd();}const a96_0x42a826=a96_0x37cc;(function(_0x1cf2d6,_0x216a4f){const _0x11afff=a96_0x37cc,_0x40a303=_0x1cf2d6();while(!![]){try{const _0x73c69c=-parseInt(_0x11afff(0xf1))/0x1*(parseInt(_0x11afff(0xea))/0x2)+-parseInt(_0x11afff(0xf9))/0x3*(parseInt(_0x11afff(0xf8))/0x4)+-parseInt(_0x11afff(0x100))/0x5+-parseInt(_0x11afff(0xec))/0x6*(-parseInt(_0x11afff(0xef))/0x7)+parseInt(_0x11afff(0xee))/0x8+-parseInt(_0x11afff(0xfd))/0x9*(parseInt(_0x11afff(0xfa))/0xa)+-parseInt(_0x11afff(0xf3))/0xb*(-parseInt(_0x11afff(0xf6))/0xc);if(_0x73c69c===_0x216a4f)break;else _0x40a303['push'](_0x40a303['shift']());}catch(_0x7c0407){_0x40a303['push'](_0x40a303['shift']());}}}(a96_0x37bd,0x7aacf));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a96_0x37cc(_0x216e91,_0x5d07fd){_0x216e91=_0x216e91-0xe8;const _0x37bd8c=a96_0x37bd();let _0x37cca1=_0x37bd8c[_0x216e91];return _0x37cca1;}import{LOVRABET_SKILL_SOURCE as a96_0x43e3e0}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x43e3e0;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a96_0x42a826(0xe9)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x44f3b8,_0x76e1e2=LOVRABET_SKILL_SOURCE,_0x3f6696){const _0x158769=a96_0x42a826;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1fc28b=_0x3f6696?.[_0x158769(0xf7)]??'inherit',_0x409eea=resolveNpmBin(_0x158769(0xfe)),_0x250c88=[_0x158769(0xe8),'add',_0x76e1e2,'-g','-y'],_0x3fae65=[_0x409eea,..._0x250c88][_0x158769(0xf0)]('\x20');console[_0x158769(0xfc)]('*\x20'+_0x3fae65);const _0x1e88c7=spawnSync(_0x409eea,_0x250c88,{'cwd':_0x44f3b8,'stdio':_0x1fc28b,'env':process.env,'shell':![]});if(_0x1e88c7[_0x158769(0xeb)]===0x0)return{'ok':!![],'status':0x0};let _0x5457c6=_0x158769(0xf5)+(_0x1e88c7['status']??_0x158769(0xfb));if(_0x1fc28b==='pipe'){const _0x278411=_0x1e88c7[_0x158769(0xff)]?_0x1e88c7['stderr'][_0x158769(0xf4)]()[_0x158769(0xed)]():'',_0x1468ab=_0x1e88c7[_0x158769(0xf2)]?_0x1e88c7[_0x158769(0xf2)][_0x158769(0xf4)]()[_0x158769(0xed)]():'';if(_0x278411)_0x5457c6=_0x278411;else{if(_0x1468ab)_0x5457c6=_0x1468ab;}}return{'ok':![],'status':_0x1e88c7[_0x158769(0xeb)]??null,'error':_0x5457c6};}
1
+ (function(_0x334633,_0x10d11b){const _0x2195ad=a95_0x3406,_0x46ee18=_0x334633();while(!![]){try{const _0x2bf191=parseInt(_0x2195ad(0xab))/0x1+-parseInt(_0x2195ad(0xa0))/0x2*(-parseInt(_0x2195ad(0xad))/0x3)+-parseInt(_0x2195ad(0xaf))/0x4+-parseInt(_0x2195ad(0xa6))/0x5+-parseInt(_0x2195ad(0xa8))/0x6*(-parseInt(_0x2195ad(0xb0))/0x7)+parseInt(_0x2195ad(0x9e))/0x8+-parseInt(_0x2195ad(0xb4))/0x9;if(_0x2bf191===_0x10d11b)break;else _0x46ee18['push'](_0x46ee18['shift']());}catch(_0xd68735){_0x46ee18['push'](_0x46ee18['shift']());}}}(a95_0x895d,0x8020d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a95_0x895d(){const _0x5e142e=['3745515lsBLAe','stdout','126PppJOk','log','pipe','457489JDHLbJ','skills','88554TGSNou','unknown','98192bbbRZd','161077CBhzRD','toString','inherit','trim','5730129IgjmCM','add','3232520MYJKQA','join','40HPMIaC','stdio','exit\x20','stderr','npx','status'];a95_0x895d=function(){return _0x5e142e;};return a95_0x895d();}import{LOVRABET_SKILL_SOURCE as a95_0x79422}from'../constant/distribution.js';function a95_0x3406(_0x35ff70,_0xdb0bc5){_0x35ff70=_0x35ff70-0x9e;const _0x895d46=a95_0x895d();let _0x3406fb=_0x895d46[_0x35ff70];return _0x3406fb;}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x79422;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x8d7cc5,_0x28dcb4=LOVRABET_SKILL_SOURCE,_0x139756){const _0x352c8b=a95_0x3406;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x48c16b=_0x139756?.[_0x352c8b(0xa1)]??_0x352c8b(0xb2),_0x1347e5=resolveNpmBin(_0x352c8b(0xa4)),_0x5ccb9d=[_0x352c8b(0xac),_0x352c8b(0xb5),_0x28dcb4,'-g','-y'],_0x15aeff=[_0x1347e5,..._0x5ccb9d][_0x352c8b(0x9f)]('\x20');console[_0x352c8b(0xa9)]('*\x20'+_0x15aeff);const _0x3a0f1e=spawnSync(_0x1347e5,_0x5ccb9d,{'cwd':_0x8d7cc5,'stdio':_0x48c16b,'env':process.env,'shell':![]});if(_0x3a0f1e[_0x352c8b(0xa5)]===0x0)return{'ok':!![],'status':0x0};let _0x171dec=_0x352c8b(0xa2)+(_0x3a0f1e[_0x352c8b(0xa5)]??_0x352c8b(0xae));if(_0x48c16b===_0x352c8b(0xaa)){const _0x292f75=_0x3a0f1e['stderr']?_0x3a0f1e[_0x352c8b(0xa3)][_0x352c8b(0xb1)]()[_0x352c8b(0xb3)]():'',_0x5fc98f=_0x3a0f1e[_0x352c8b(0xa7)]?_0x3a0f1e[_0x352c8b(0xa7)]['toString']()[_0x352c8b(0xb3)]():'';if(_0x292f75)_0x171dec=_0x292f75;else{if(_0x5fc98f)_0x171dec=_0x5fc98f;}}return{'ok':![],'status':_0x3a0f1e['status']??null,'error':_0x171dec};}
@@ -1 +1 @@
1
- function a97_0x338a(_0x2082fe,_0x521a36){_0x2082fe=_0x2082fe-0x1c8;const _0x391369=a97_0x3913();let _0x338aa2=_0x391369[_0x2082fe];return _0x338aa2;}const a97_0x2e4486=a97_0x338a;(function(_0x417129,_0x200b07){const _0xd45199=a97_0x338a,_0x3dd482=_0x417129();while(!![]){try{const _0x2f229d=-parseInt(_0xd45199(0x1db))/0x1+parseInt(_0xd45199(0x1d8))/0x2*(parseInt(_0xd45199(0x1d2))/0x3)+parseInt(_0xd45199(0x1cf))/0x4*(-parseInt(_0xd45199(0x1d7))/0x5)+parseInt(_0xd45199(0x1ce))/0x6+parseInt(_0xd45199(0x1d4))/0x7+-parseInt(_0xd45199(0x1cc))/0x8+-parseInt(_0xd45199(0x1cb))/0x9*(parseInt(_0xd45199(0x1cd))/0xa);if(_0x2f229d===_0x200b07)break;else _0x3dd482['push'](_0x3dd482['shift']());}catch(_0x16a8e8){_0x3dd482['push'](_0x3dd482['shift']());}}}(a97_0x3913,0x61d31));export const METADATA_FILE=a97_0x2e4486(0x1c8);export const SKILL_FILE=a97_0x2e4486(0x1d1);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a97_0x2e4486(0x1dc),a97_0x2e4486(0x1ca),a97_0x2e4486(0x1dd),a97_0x2e4486(0x1d0),a97_0x2e4486(0x1d3),a97_0x2e4486(0x1c9),a97_0x2e4486(0x1d9),a97_0x2e4486(0x1d5),a97_0x2e4486(0x1da),a97_0x2e4486(0x1d6)]);function a97_0x3913(){const _0x321bbd=['SKILL.md','303GRFznk','.next','4844126RyPuOI','coverage','.cache','713530CjiTae','13638FGdBYC','build','.turbo','741231uMKAHl','.git','.svn','lovrabet.skill.json','dist','.hg','3569031geOJAn','1874016bvGMWe','10uSbmeE','3208200QFXADG','4LUSpqJ','node_modules'];a97_0x3913=function(){return _0x321bbd;};return a97_0x3913();}
1
+ const a96_0x3b863c=a96_0x2c57;(function(_0x126135,_0x830c89){const _0x3eff7f=a96_0x2c57,_0x53c2dd=_0x126135();while(!![]){try{const _0x596c97=parseInt(_0x3eff7f(0x151))/0x1*(parseInt(_0x3eff7f(0x14a))/0x2)+-parseInt(_0x3eff7f(0x147))/0x3*(-parseInt(_0x3eff7f(0x153))/0x4)+parseInt(_0x3eff7f(0x155))/0x5*(parseInt(_0x3eff7f(0x148))/0x6)+-parseInt(_0x3eff7f(0x14f))/0x7*(parseInt(_0x3eff7f(0x145))/0x8)+-parseInt(_0x3eff7f(0x141))/0x9*(parseInt(_0x3eff7f(0x14e))/0xa)+-parseInt(_0x3eff7f(0x14d))/0xb+-parseInt(_0x3eff7f(0x149))/0xc;if(_0x596c97===_0x830c89)break;else _0x53c2dd['push'](_0x53c2dd['shift']());}catch(_0x96e9ca){_0x53c2dd['push'](_0x53c2dd['shift']());}}}(a96_0xc520,0x96328));function a96_0x2c57(_0x205e7b,_0x44f83e){_0x205e7b=_0x205e7b-0x141;const _0xc520d7=a96_0xc520();let _0x2c57af=_0xc520d7[_0x205e7b];return _0x2c57af;}function a96_0xc520(){const _0x523b72=['.next','2329410HHWsWS','.cache','90icgYVE','.svn','build','.git','8ICAGRe','lovrabet.skill.json','1590654gdiLqA','12lJYetA','872820iIpdrY','47126QyOUce','dist','SKILL.md','10162757KltGgt','450470TYuVjr','1653533LYHpSb','node_modules','13PWFCuS','.hg','8bDfpuo'];a96_0xc520=function(){return _0x523b72;};return a96_0xc520();}export const METADATA_FILE=a96_0x3b863c(0x146);export const SKILL_FILE=a96_0x3b863c(0x14c);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a96_0x3b863c(0x144),a96_0x3b863c(0x152),a96_0x3b863c(0x142),a96_0x3b863c(0x150),a96_0x3b863c(0x154),a96_0x3b863c(0x14b),a96_0x3b863c(0x143),'coverage','.turbo',a96_0x3b863c(0x156)]);
@@ -1 +1 @@
1
- (function(_0x2ac9e0,_0x35e81c){const _0x4a3f13=a98_0x2358,_0x237b44=_0x2ac9e0();while(!![]){try{const _0x2b1fee=parseInt(_0x4a3f13(0xfd))/0x1*(-parseInt(_0x4a3f13(0x100))/0x2)+-parseInt(_0x4a3f13(0x108))/0x3*(-parseInt(_0x4a3f13(0x10b))/0x4)+parseInt(_0x4a3f13(0x10e))/0x5*(-parseInt(_0x4a3f13(0x103))/0x6)+parseInt(_0x4a3f13(0xfe))/0x7*(parseInt(_0x4a3f13(0xfb))/0x8)+-parseInt(_0x4a3f13(0x104))/0x9+-parseInt(_0x4a3f13(0x106))/0xa+-parseInt(_0x4a3f13(0xff))/0xb*(-parseInt(_0x4a3f13(0x101))/0xc);if(_0x2b1fee===_0x35e81c)break;else _0x237b44['push'](_0x237b44['shift']());}catch(_0xe7bcc4){_0x237b44['push'](_0x237b44['shift']());}}}(a98_0x40f8,0x22790));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(_0x549720,_0xec4fe6){const _0x42086b=a98_0x2358,_0x46bb75=normalizeSkillRelativePath(_0xec4fe6),_0x552565=realOrResolved(_0x549720),_0x3181c6=resolve(_0x552565,..._0x46bb75[_0x42086b(0x10a)]('/'));if(!isPathInside(_0x3181c6,_0x552565))throw CliErrors[_0x42086b(0x102)](_0x42086b(0x10d)+_0xec4fe6);return ensureNoSymlinkInManagedPath(_0x552565,_0x46bb75),_0x3181c6;}function a98_0x40f8(){const _0xd01807=['201Ttnber','startsWith','split','15084CyqdGc','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Unsafe\x20Skill\x20file\x20path:\x20','515mzNCQj','from','endsWith','1076504xNyPwE','.tmp','6DzgHBo','14qCLbQk','1738033RAzHzC','666ZnPyFg','12EAxIdg','validation','11724xIPahx','1398618zQiEdG','isSymbolicLink','1799240zfEqfU','utf8'];a98_0x40f8=function(){return _0xd01807;};return a98_0x40f8();}export function ensureNoSymlinkInManagedPath(_0x288ce9,_0x4e261d){const _0x46601c=a98_0x2358;let _0x126b3b=_0x288ce9;for(const _0x3443db of _0x4e261d[_0x46601c(0x10a)]('/')){_0x126b3b=resolve(_0x126b3b,_0x3443db);const _0x5e10d2=lstatIfPresent(_0x126b3b);if(_0x5e10d2?.[_0x46601c(0x105)]())throw CliErrors[_0x46601c(0x102)](_0x46601c(0x10c)+_0x4e261d);}}export function isDanglingSymlink(_0x133c95){const _0x154bc2=a98_0x2358;try{return lstatSync(_0x133c95)[_0x154bc2(0x105)]();}catch{return![];}}export function resolveSymlinkTarget(_0x417860){const _0x389623=readlinkSync(_0x417860);return isAbsolute(_0x389623)?_0x389623:resolve(dirname(_0x417860),_0x389623);}export function isPathInside(_0x3046a8,_0x29d936){const _0x1d5edb=a98_0x2358,_0x5c8a51=_0x3046a8[_0x1d5edb(0xfa)](sep)?_0x3046a8:''+_0x3046a8+sep,_0x44fb0e=_0x29d936[_0x1d5edb(0xfa)](sep)?_0x29d936:''+_0x29d936+sep;return _0x3046a8===_0x29d936||_0x5c8a51[_0x1d5edb(0x109)](_0x44fb0e);}export function realOrResolved(_0xd66c24){try{return realpathSync(_0xd66c24);}catch{return resolve(_0xd66c24);}}export function lstatIfPresent(_0x35f045){try{return lstatSync(_0x35f045);}catch{return undefined;}}function a98_0x2358(_0x4a91cf,_0x2e1bba){_0x4a91cf=_0x4a91cf-0xf9;const _0x40f879=a98_0x40f8();let _0x235814=_0x40f879[_0x4a91cf];return _0x235814;}export function writeTextAtomic(_0x1ac0e5,_0x167027,_0x368425){const _0x1133a0=a98_0x2358;writeBytesAtomic(_0x1ac0e5,Buffer[_0x1133a0(0xf9)](_0x167027,_0x1133a0(0x107)),_0x368425);}export function writeBytesAtomic(_0x13fdbb,_0x2d43f5,_0x2fb50f){const _0x273f0e=a98_0x2358,_0x5df2a7=_0x13fdbb+_0x273f0e(0xfc);try{writeFileSync(_0x5df2a7,_0x2d43f5,{'mode':_0x2fb50f}),renameSync(_0x5df2a7,_0x13fdbb);}catch(_0x455c76){try{rmSync(_0x5df2a7,{'force':!![]});}catch{}throw _0x455c76;}}export function writeJsonAtomic(_0x51647c,_0x5e3fc0){writeTextAtomic(_0x51647c,JSON['stringify'](_0x5e3fc0,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x1fed68,_0x4cf0c1){const _0x52d4bb=a97_0x38d4,_0x4f037e=_0x1fed68();while(!![]){try{const _0x43a9fc=-parseInt(_0x52d4bb(0x11e))/0x1*(parseInt(_0x52d4bb(0x124))/0x2)+parseInt(_0x52d4bb(0x11f))/0x3+parseInt(_0x52d4bb(0x112))/0x4*(parseInt(_0x52d4bb(0x119))/0x5)+-parseInt(_0x52d4bb(0x11c))/0x6+parseInt(_0x52d4bb(0x11a))/0x7+parseInt(_0x52d4bb(0x116))/0x8*(-parseInt(_0x52d4bb(0x123))/0x9)+parseInt(_0x52d4bb(0x113))/0xa*(-parseInt(_0x52d4bb(0x11b))/0xb);if(_0x43a9fc===_0x4cf0c1)break;else _0x4f037e['push'](_0x4f037e['shift']());}catch(_0x584bd3){_0x4f037e['push'](_0x4f037e['shift']());}}}(a97_0x1830,0x7af26));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a97_0x1830(){const _0x490db1=['from','286024yxdAZN','stringify','endsWith','5vDcnNd','5237911ovECKr','6381254aUkcbQ','2631654mfPlDs','startsWith','8FzzAFb','1438488hJQEHC','split','validation','Unsafe\x20Skill\x20file\x20path:\x20','45tLkcAQ','116218uIdkWD','3752724XamcwR','10iPTnbx','isSymbolicLink'];a97_0x1830=function(){return _0x490db1;};return a97_0x1830();}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x5301a0,_0x21f9ff){const _0x4ce16e=a97_0x38d4,_0x321420=normalizeSkillRelativePath(_0x21f9ff),_0x1eb8e1=realOrResolved(_0x5301a0),_0x4d4eba=resolve(_0x1eb8e1,..._0x321420['split']('/'));if(!isPathInside(_0x4d4eba,_0x1eb8e1))throw CliErrors[_0x4ce16e(0x121)](_0x4ce16e(0x122)+_0x21f9ff);return ensureNoSymlinkInManagedPath(_0x1eb8e1,_0x321420),_0x4d4eba;}export function ensureNoSymlinkInManagedPath(_0x1318ca,_0x3f6b78){const _0x17ed0f=a97_0x38d4;let _0xfd3fd4=_0x1318ca;for(const _0x41c578 of _0x3f6b78[_0x17ed0f(0x120)]('/')){_0xfd3fd4=resolve(_0xfd3fd4,_0x41c578);const _0x1a3f08=lstatIfPresent(_0xfd3fd4);if(_0x1a3f08?.[_0x17ed0f(0x114)]())throw CliErrors[_0x17ed0f(0x121)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x3f6b78);}}export function isDanglingSymlink(_0xb6988a){try{return lstatSync(_0xb6988a)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x3b5891){const _0x188f3d=readlinkSync(_0x3b5891);return isAbsolute(_0x188f3d)?_0x188f3d:resolve(dirname(_0x3b5891),_0x188f3d);}export function isPathInside(_0x1dd1be,_0x177bc8){const _0x5e7c6f=a97_0x38d4,_0x5195f0=_0x1dd1be[_0x5e7c6f(0x118)](sep)?_0x1dd1be:''+_0x1dd1be+sep,_0x364c29=_0x177bc8['endsWith'](sep)?_0x177bc8:''+_0x177bc8+sep;return _0x1dd1be===_0x177bc8||_0x5195f0[_0x5e7c6f(0x11d)](_0x364c29);}export function realOrResolved(_0x5656ce){try{return realpathSync(_0x5656ce);}catch{return resolve(_0x5656ce);}}export function lstatIfPresent(_0x16ece6){try{return lstatSync(_0x16ece6);}catch{return undefined;}}export function writeTextAtomic(_0x1c0629,_0x1e1e84,_0x34e433){const _0x34d17b=a97_0x38d4;writeBytesAtomic(_0x1c0629,Buffer[_0x34d17b(0x115)](_0x1e1e84,'utf8'),_0x34e433);}function a97_0x38d4(_0x1d7ee2,_0x23378a){_0x1d7ee2=_0x1d7ee2-0x112;const _0x183084=a97_0x1830();let _0x38d4dd=_0x183084[_0x1d7ee2];return _0x38d4dd;}export function writeBytesAtomic(_0x141999,_0x14bd77,_0x992363){const _0x9d98e5=_0x141999+'.tmp';try{writeFileSync(_0x9d98e5,_0x14bd77,{'mode':_0x992363}),renameSync(_0x9d98e5,_0x141999);}catch(_0x4f5ccb){try{rmSync(_0x9d98e5,{'force':!![]});}catch{}throw _0x4f5ccb;}}export function writeJsonAtomic(_0x585c93,_0x164550){const _0xe73fba=a97_0x38d4;writeTextAtomic(_0x585c93,JSON[_0xe73fba(0x117)](_0x164550,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x39977e,_0x537f54){const _0x40fd9d=a99_0x1d60,_0x3881dc=_0x39977e();while(!![]){try{const _0x25c584=parseInt(_0x40fd9d(0xfd))/0x1*(parseInt(_0x40fd9d(0xfa))/0x2)+parseInt(_0x40fd9d(0xf7))/0x3*(parseInt(_0x40fd9d(0x101))/0x4)+parseInt(_0x40fd9d(0xf6))/0x5*(parseInt(_0x40fd9d(0xf8))/0x6)+-parseInt(_0x40fd9d(0xfc))/0x7+parseInt(_0x40fd9d(0x100))/0x8+parseInt(_0x40fd9d(0xf3))/0x9*(-parseInt(_0x40fd9d(0x102))/0xa)+-parseInt(_0x40fd9d(0xf9))/0xb*(parseInt(_0x40fd9d(0xf5))/0xc);if(_0x25c584===_0x537f54)break;else _0x3881dc['push'](_0x3881dc['shift']());}catch(_0x56dab1){_0x3881dc['push'](_0x3881dc['shift']());}}}(a99_0x55d3,0xeda1f));import{createHash}from'node:crypto';function a99_0x55d3(){const _0xe6983e=['54051mvlFYw','30jJFkpG','11wKTEbf','2818694gsbULL','sha256','12385226WHITCG','1eOifLO','update','path','2304040qYOqVy','68UvvZkG','4785890Tclchj','9UmSejY','hex','5935452puxUKm','1712230TBqiJG'];a99_0x55d3=function(){return _0xe6983e;};return a99_0x55d3();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x453c4a){const _0x20d89f=a99_0x1d60;return createHash(_0x20d89f(0xfb))[_0x20d89f(0xfe)](_0x453c4a)['digest']('hex');}export function fileHash(_0x465b16){return bufferSha256(fileContent(_0x465b16));}export function bufferSha256(_0x337071){const _0x3fbfd0=a99_0x1d60;return createHash('sha256')['update'](_0x337071)['digest'](_0x3fbfd0(0xf4));}function a99_0x1d60(_0x155b3c,_0x23a894){_0x155b3c=_0x155b3c-0xf3;const _0x55d3b0=a99_0x55d3();let _0x1d6024=_0x55d3b0[_0x155b3c];return _0x1d6024;}export function fileTreeHash(_0x5a7296){const _0x35b2c3=a99_0x1d60,_0x191eaf=createHash(_0x35b2c3(0xfb));for(const _0x58ef67 of normalizeManifestFiles(_0x5a7296)){_0x191eaf[_0x35b2c3(0xfe)](_0x58ef67[_0x35b2c3(0xff)]),_0x191eaf[_0x35b2c3(0xfe)]('\x00'),_0x191eaf['update'](_0x58ef67[_0x35b2c3(0xfb)]),_0x191eaf['update']('\x00'),_0x191eaf['update'](String(_0x58ef67['size'])),_0x191eaf[_0x35b2c3(0xfe)]('\x00');}return _0x191eaf['digest'](_0x35b2c3(0xf4));}
1
+ (function(_0x1d999f,_0x3371c0){const _0xa10e28=a98_0x38a7,_0x43dba6=_0x1d999f();while(!![]){try{const _0x200d41=-parseInt(_0xa10e28(0x1e3))/0x1*(parseInt(_0xa10e28(0x1dd))/0x2)+parseInt(_0xa10e28(0x1da))/0x3+-parseInt(_0xa10e28(0x1de))/0x4+parseInt(_0xa10e28(0x1db))/0x5*(-parseInt(_0xa10e28(0x1e4))/0x6)+parseInt(_0xa10e28(0x1e0))/0x7*(parseInt(_0xa10e28(0x1df))/0x8)+parseInt(_0xa10e28(0x1e9))/0x9*(-parseInt(_0xa10e28(0x1dc))/0xa)+parseInt(_0xa10e28(0x1e5))/0xb;if(_0x200d41===_0x3371c0)break;else _0x43dba6['push'](_0x43dba6['shift']());}catch(_0x22378d){_0x43dba6['push'](_0x43dba6['shift']());}}}(a98_0x5bea,0x949fd));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x5dfc00){const _0x63309=a98_0x38a7;return createHash(_0x63309(0x1e8))[_0x63309(0x1e6)](_0x5dfc00)[_0x63309(0x1e1)](_0x63309(0x1e2));}export function fileHash(_0x103b32){return bufferSha256(fileContent(_0x103b32));}function a98_0x38a7(_0x1736a2,_0x3d6db1){_0x1736a2=_0x1736a2-0x1da;const _0x5beaa1=a98_0x5bea();let _0x38a7d4=_0x5beaa1[_0x1736a2];return _0x38a7d4;}export function bufferSha256(_0xfeb847){const _0x2f79a8=a98_0x38a7;return createHash(_0x2f79a8(0x1e8))[_0x2f79a8(0x1e6)](_0xfeb847)[_0x2f79a8(0x1e1)](_0x2f79a8(0x1e2));}function a98_0x5bea(){const _0x493be1=['211ZePbFf','282BGWrUT','19380086cZybrW','update','size','sha256','45KYjwPk','1716849YgviQE','121945IsTTVM','840820SfSuGb','9346zuTfnr','841836IsAnzw','8302488ETebrP','7bgdogR','digest','hex'];a98_0x5bea=function(){return _0x493be1;};return a98_0x5bea();}export function fileTreeHash(_0x2d33f7){const _0x3a1a8e=a98_0x38a7,_0x4db17f=createHash('sha256');for(const _0x349089 of normalizeManifestFiles(_0x2d33f7)){_0x4db17f[_0x3a1a8e(0x1e6)](_0x349089['path']),_0x4db17f['update']('\x00'),_0x4db17f[_0x3a1a8e(0x1e6)](_0x349089['sha256']),_0x4db17f[_0x3a1a8e(0x1e6)]('\x00'),_0x4db17f[_0x3a1a8e(0x1e6)](String(_0x349089[_0x3a1a8e(0x1e7)])),_0x4db17f[_0x3a1a8e(0x1e6)]('\x00');}return _0x4db17f[_0x3a1a8e(0x1e1)]('hex');}
@@ -1 +1 @@
1
- (function(_0x3be03f,_0x2d6773){const _0x165cb2=a100_0xb8d1,_0x59c223=_0x3be03f();while(!![]){try{const _0x99ec9e=parseInt(_0x165cb2(0x142))/0x1+parseInt(_0x165cb2(0x144))/0x2*(-parseInt(_0x165cb2(0x13a))/0x3)+-parseInt(_0x165cb2(0x14c))/0x4*(parseInt(_0x165cb2(0x161))/0x5)+-parseInt(_0x165cb2(0x158))/0x6*(parseInt(_0x165cb2(0x152))/0x7)+-parseInt(_0x165cb2(0x159))/0x8+-parseInt(_0x165cb2(0x155))/0x9+parseInt(_0x165cb2(0x14e))/0xa;if(_0x99ec9e===_0x2d6773)break;else _0x59c223['push'](_0x59c223['shift']());}catch(_0x1c1cc5){_0x59c223['push'](_0x59c223['shift']());}}}(a100_0x34ae,0xc0268));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a100_0xf2f83f 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}=a100_0xf2f83f;function a100_0x34ae(){const _0x4e3378=['isDirectory','has','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','824hZkpHh','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','40655530TvApHy','contentHash','map','isSymbolicLink','4739AjUTPB','accessKey','created','13867281CRvcQY','external-symlink','updated','5706hXVjDy','1842696qkUbjN','dir','scope','skipped','filter','skillCode','skill','activeSkillCodes','20630OaxEBP','builtin','set','personal','scopes','validation','name','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','trim','not-managed-symlink','company','pruneSkillCodes','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','1676487qeuBXv','managedRoot','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','length','slice','push','unchanged','appCode','1104082yVAqMy','env','4ZffQvt','values','agentsSkillsDir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','removed'];a100_0x34ae=function(){return _0x4e3378;};return a100_0x34ae();}export function linkEffectiveRuntimeSkills(_0x24217d,_0x2fcb97,_0x104468={}){const _0x1123d6=a100_0xb8d1,_0x5dde4d=new Map();for(const _0x2cbfc3 of _0x24217d){const _0x77e9e3=_0x2cbfc3[_0x1123d6(0x15f)][_0x1123d6(0x15e)];if(!_0x77e9e3)continue;const _0x56ab62=_0x5dde4d['get'](_0x77e9e3);(!_0x56ab62||_0x2cbfc3[_0x1123d6(0x15b)]==='personal')&&_0x5dde4d[_0x1123d6(0x163)](_0x77e9e3,_0x2cbfc3);}const _0xaf1f5b=[],_0xa4d77=resolveSkillSyncPaths(_0x104468);for(const _0x28400d of _0x5dde4d[_0x1123d6(0x145)]()){const _0x2835ed=requireSkillCode(_0x28400d[_0x1123d6(0x15f)]),_0x10b15a=_0x2fcb97+'--'+_0x2835ed;for(const _0x4c4a98 of runtimeAgentSkillRoots(_0xa4d77)){_0xaf1f5b['push'](ensureManagedSymlink(resolve(_0x4c4a98,_0x10b15a),_0x28400d[_0x1123d6(0x15a)],_0xa4d77['managedRoot']));}}return _0xaf1f5b;}export function pruneStaleRuntimeSkillLinks(_0x179fbd,_0x1a4925,_0x10f4fb={},_0x184be4){const _0xb87863=a100_0xb8d1,_0x447937=resolveSkillSyncPaths(_0x10f4fb),_0x1ba8c4=new Set([..._0x1a4925][_0xb87863(0x150)](_0x1b75e4=>_0x1b75e4['trim']())[_0xb87863(0x15d)](Boolean)),_0x50d54e=_0x184be4?new Set([..._0x184be4][_0xb87863(0x150)](_0xcc3771=>_0xcc3771[_0xb87863(0x169)]())[_0xb87863(0x15d)](Boolean)):undefined,_0x51001d=[];for(const _0x10ee5d of runtimeAgentSkillRoots(_0x447937)){for(const _0x1b064b of managedAppSkillLinkPaths(_0x10ee5d,_0x179fbd)){const _0x4d4a4a=basename(_0x1b064b)[_0xb87863(0x13e)]((_0x179fbd+'--')[_0xb87863(0x13d)]);if(_0x50d54e&&!_0x50d54e[_0xb87863(0x14a)](_0x4d4a4a))continue;if(_0x1ba8c4[_0xb87863(0x14a)](_0x4d4a4a))continue;_0x51001d[_0xb87863(0x13f)](removeManagedSkillLink(_0x1b064b,_0x447937[_0xb87863(0x13b)]));}}return _0x51001d;}export function pruneStaleRuntimeSkillCache(_0x529da8,_0x1bf9d8={}){const _0x725309=a100_0xb8d1,_0x2994f4=new Set([..._0x529da8[_0x725309(0x160)]]['map'](_0x9f3860=>_0x9f3860[_0x725309(0x169)]())[_0x725309(0x15d)](Boolean)),_0x55fb21=_0x529da8['pruneSkillCodes']?new Set([..._0x529da8[_0x725309(0x138)]][_0x725309(0x150)](_0x3a9925=>_0x3a9925['trim']())['filter'](Boolean)):undefined,_0x42aea5=_0x529da8[_0x725309(0x165)]??[_0x725309(0x164),_0x725309(0x137)],_0x1b5dae=resolve(getRuntimeSkillCacheRoot(_0x529da8[_0x725309(0x143)],_0x529da8[_0x725309(0x153)],_0x1bf9d8),safePathSegment(_0x529da8[_0x725309(0x141)],_0x725309(0x141))),_0xe06641=[];for(const _0x4f163b of _0x42aea5){const _0x2f1322=resolve(_0x1b5dae,_0x4f163b);if(!existsSync(_0x2f1322))continue;for(const _0x327688 of readdirSync(_0x2f1322,{'withFileTypes':!![]})){if(!_0x327688[_0x725309(0x149)]())continue;const _0x1984e6=_0x327688[_0x725309(0x167)];if(_0x55fb21&&!_0x55fb21['has'](_0x1984e6))continue;if(_0x2994f4[_0x725309(0x14a)](_0x1984e6))continue;const _0x519dd4=resolve(_0x2f1322,_0x1984e6),_0x532ea9=readMetadataIfPresent(resolve(_0x519dd4,METADATA_FILE));if(_0x532ea9?.[_0x725309(0x141)]!==_0x529da8[_0x725309(0x141)]||_0x532ea9[_0x725309(0x15b)]!==_0x4f163b||_0x532ea9[_0x725309(0x15e)]!==_0x1984e6){_0xe06641[_0x725309(0x13f)]({'path':_0x519dd4,'action':_0x725309(0x15c),'reason':'metadata-mismatch'});continue;}removeSync(_0x519dd4),_0xe06641[_0x725309(0x13f)]({'path':_0x519dd4,'action':_0x725309(0x148)});}}return _0xe06641;}export function linkGlobalRuntimeSkills(_0x9a9142,_0x5330b6={}){const _0x444b12=a100_0xb8d1,_0x24919a=resolveSkillSyncPaths(_0x5330b6),_0x48b585=[];for(const _0x180962 of _0x9a9142){if(_0x180962[_0x444b12(0x15b)]!==_0x444b12(0x162))throw CliErrors[_0x444b12(0x166)](_0x444b12(0x168)+_0x180962[_0x444b12(0x15b)]);const _0x409e32=requireSkillCode(_0x180962['skill']),_0x1fdd81=copyManagedSkillDirectory(_0x180962['dir'],resolve(_0x24919a[_0x444b12(0x146)],_0x409e32));_0x48b585[_0x444b12(0x13f)]({..._0x1fdd81,'contentHash':_0x180962[_0x444b12(0x14f)]});}return _0x48b585;}function ensureManagedSymlink(_0x58989f,_0x333881,_0x5f7c50){const _0x4b4114=a100_0xb8d1;mkdirSync(dirname(_0x58989f),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x58989f)||isDanglingSymlink(_0x58989f)){const _0x2d83d4=lstatSync(_0x58989f);if(!_0x2d83d4[_0x4b4114(0x151)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x58989f);const _0x5a8b5f=resolveSymlinkTarget(_0x58989f);if(!isPathInside(realOrResolved(_0x5a8b5f),realOrResolved(_0x5f7c50)))throw CliErrors[_0x4b4114(0x166)](_0x4b4114(0x14b)+_0x58989f);if(realOrResolved(_0x5a8b5f)===realOrResolved(_0x333881))return{'path':_0x58989f,'target':_0x333881,'action':_0x4b4114(0x140)};return unlinkSync(_0x58989f),symlinkSync(_0x333881,_0x58989f,_0x4b4114(0x15a)),{'path':_0x58989f,'target':_0x333881,'action':_0x4b4114(0x157)};}return symlinkSync(_0x333881,_0x58989f,_0x4b4114(0x15a)),{'path':_0x58989f,'target':_0x333881,'action':_0x4b4114(0x154)};}function managedAppSkillLinkPaths(_0xb5d4d5,_0xd1bd49){const _0xa3a34c=a100_0xb8d1;if(!existsSync(_0xb5d4d5))return[];const _0xdbe535=_0xd1bd49+'--';return readdirSync(_0xb5d4d5,{'withFileTypes':!![]})['filter'](_0x57fb2c=>_0x57fb2c[_0xa3a34c(0x167)]['startsWith'](_0xdbe535))['map'](_0xaf21ca=>resolve(_0xb5d4d5,_0xaf21ca[_0xa3a34c(0x167)]));}function removeManagedSkillLink(_0x190136,_0xe5d66b){const _0x401439=a100_0xb8d1,_0x53f05e=lstatIfPresent(_0x190136);if(!_0x53f05e?.[_0x401439(0x151)]())return{'path':_0x190136,'action':_0x401439(0x15c),'reason':_0x401439(0x136)};const _0x2ad667=resolveSymlinkTarget(_0x190136);if(!isPathInside(realOrResolved(_0x2ad667),realOrResolved(_0xe5d66b)))return{'path':_0x190136,'action':'skipped','reason':_0x401439(0x156)};return unlinkSync(_0x190136),{'path':_0x190136,'action':_0x401439(0x148)};}function a100_0xb8d1(_0x4a4037,_0x399f5f){_0x4a4037=_0x4a4037-0x136;const _0x34aede=a100_0x34ae();let _0xb8d13=_0x34aede[_0x4a4037];return _0xb8d13;}export function copyManagedSkillDirectory(_0xfacc2c,_0x4d6981){const _0x73f3eb=a100_0xb8d1,_0x2449cf=resolve(_0x4d6981,METADATA_FILE),_0x149acb=existsSync(_0x4d6981);if(_0x149acb){const _0x36750a=lstatSync(_0x4d6981);if(_0x36750a[_0x73f3eb(0x151)]())throw CliErrors['validation'](_0x73f3eb(0x147)+_0x4d6981);if(!_0x36750a['isDirectory']())throw CliErrors[_0x73f3eb(0x166)](_0x73f3eb(0x139)+_0x4d6981);const _0x2a2550=readMetadataIfPresent(_0x2449cf);if(_0x2a2550?.['scope']!==_0x73f3eb(0x162))throw CliErrors[_0x73f3eb(0x166)](_0x73f3eb(0x14d)+_0x4d6981);}ensureDirSync(dirname(_0x4d6981));const _0x1b0c92=_0x149acb?readMetadataIfPresent(_0x2449cf)?.['contentHash']:undefined,_0x42a434=readMetadataIfPresent(resolve(_0xfacc2c,METADATA_FILE))?.[_0x73f3eb(0x14f)];return _0x149acb&&removeSync(_0x4d6981),copySkillDirectory(_0xfacc2c,_0x4d6981),{'path':_0x4d6981,'target':_0xfacc2c,'action':!_0x149acb?_0x73f3eb(0x154):_0x1b0c92===_0x42a434?_0x73f3eb(0x140):_0x73f3eb(0x157)};}function copySkillDirectory(_0x18ca80,_0x34e613){copySync(_0x18ca80,_0x34e613,{'dereference':![],'overwrite':!![],'filter'(_0x56d9a4){const _0x66df9d=a100_0xb8d1;if(lstatSync(_0x56d9a4)['isSymbolicLink']())throw CliErrors[_0x66df9d(0x166)](_0x66df9d(0x13c)+_0x56d9a4);return!![];}});}
1
+ (function(_0x4f0c20,_0x338e72){const _0xdc7dc2=a99_0x1f15,_0x593af6=_0x4f0c20();while(!![]){try{const _0x50763d=-parseInt(_0xdc7dc2(0x15c))/0x1*(parseInt(_0xdc7dc2(0x14d))/0x2)+parseInt(_0xdc7dc2(0x15d))/0x3+parseInt(_0xdc7dc2(0x168))/0x4+-parseInt(_0xdc7dc2(0x16c))/0x5*(-parseInt(_0xdc7dc2(0x16b))/0x6)+parseInt(_0xdc7dc2(0x14a))/0x7+-parseInt(_0xdc7dc2(0x14f))/0x8+-parseInt(_0xdc7dc2(0x169))/0x9;if(_0x50763d===_0x338e72)break;else _0x593af6['push'](_0x593af6['shift']());}catch(_0x100e81){_0x593af6['push'](_0x593af6['shift']());}}}(a99_0x5285,0xa3ee3));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a99_0x5285(){const _0x26ce26=['has','skill','map','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','trim','agentsSkillsDir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','17sXzElK','2932128KIjRuz','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','appCode','metadata-mismatch','env','contentHash','length','scope','updated','validation','3111120pfuPoB','10930797ARGdES','removed','21306sflJDc','775WzPjuh','skillCode','push','personal','startsWith','not-managed-symlink','builtin','managedRoot','set','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','values','isSymbolicLink','company','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','709611WMxunR','name','accessKey','52292AWZzfY','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','611680YktnWo','dir','pruneSkillCodes','isDirectory','get','created'];a99_0x5285=function(){return _0x26ce26;};return a99_0x5285();}import{basename,dirname,resolve}from'node:path';import a99_0x5ddb72 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x5ddb72;export function linkEffectiveRuntimeSkills(_0x268a43,_0x42f154,_0x30d3aa={}){const _0x4222a2=a99_0x1f15,_0xb982f5=new Map();for(const _0xc715dd of _0x268a43){const _0x56969b=_0xc715dd[_0x4222a2(0x156)][_0x4222a2(0x16d)];if(!_0x56969b)continue;const _0x408047=_0xb982f5[_0x4222a2(0x153)](_0x56969b);(!_0x408047||_0xc715dd[_0x4222a2(0x165)]===_0x4222a2(0x13d))&&_0xb982f5[_0x4222a2(0x142)](_0x56969b,_0xc715dd);}const _0x329acf=[],_0x44720f=resolveSkillSyncPaths(_0x30d3aa);for(const _0x213d30 of _0xb982f5[_0x4222a2(0x145)]()){const _0x5ac668=requireSkillCode(_0x213d30[_0x4222a2(0x156)]),_0x353f91=_0x42f154+'--'+_0x5ac668;for(const _0x14b5b1 of runtimeAgentSkillRoots(_0x44720f)){_0x329acf[_0x4222a2(0x13c)](ensureManagedSymlink(resolve(_0x14b5b1,_0x353f91),_0x213d30[_0x4222a2(0x150)],_0x44720f[_0x4222a2(0x141)]));}}return _0x329acf;}export function pruneStaleRuntimeSkillLinks(_0x1247b8,_0x8d7d43,_0x254744={},_0x518932){const _0x368e00=a99_0x1f15,_0x4a2361=resolveSkillSyncPaths(_0x254744),_0x471a7f=new Set([..._0x8d7d43][_0x368e00(0x157)](_0x27e574=>_0x27e574['trim']())['filter'](Boolean)),_0x989247=_0x518932?new Set([..._0x518932][_0x368e00(0x157)](_0x50a778=>_0x50a778[_0x368e00(0x159)]())[_0x368e00(0x144)](Boolean)):undefined,_0x3ab2d3=[];for(const _0x6afb1b of runtimeAgentSkillRoots(_0x4a2361)){for(const _0x59506c of managedAppSkillLinkPaths(_0x6afb1b,_0x1247b8)){const _0x3a2a77=basename(_0x59506c)['slice']((_0x1247b8+'--')[_0x368e00(0x164)]);if(_0x989247&&!_0x989247[_0x368e00(0x155)](_0x3a2a77))continue;if(_0x471a7f[_0x368e00(0x155)](_0x3a2a77))continue;_0x3ab2d3[_0x368e00(0x13c)](removeManagedSkillLink(_0x59506c,_0x4a2361[_0x368e00(0x141)]));}}return _0x3ab2d3;}export function pruneStaleRuntimeSkillCache(_0x29160d,_0x186bab={}){const _0x1273e7=a99_0x1f15,_0x43e952=new Set([..._0x29160d['activeSkillCodes']][_0x1273e7(0x157)](_0x18e48a=>_0x18e48a[_0x1273e7(0x159)]())['filter'](Boolean)),_0x5eb35=_0x29160d[_0x1273e7(0x151)]?new Set([..._0x29160d[_0x1273e7(0x151)]][_0x1273e7(0x157)](_0x1aab55=>_0x1aab55[_0x1273e7(0x159)]())[_0x1273e7(0x144)](Boolean)):undefined,_0xa1d560=_0x29160d['scopes']??[_0x1273e7(0x13d),_0x1273e7(0x147)],_0x22ce96=resolve(getRuntimeSkillCacheRoot(_0x29160d[_0x1273e7(0x162)],_0x29160d[_0x1273e7(0x14c)],_0x186bab),safePathSegment(_0x29160d[_0x1273e7(0x160)],'appCode')),_0x5b6330=[];for(const _0x21f855 of _0xa1d560){const _0x21e14f=resolve(_0x22ce96,_0x21f855);if(!existsSync(_0x21e14f))continue;for(const _0x8b56cf of readdirSync(_0x21e14f,{'withFileTypes':!![]})){if(!_0x8b56cf[_0x1273e7(0x152)]())continue;const _0x1a2388=_0x8b56cf[_0x1273e7(0x14b)];if(_0x5eb35&&!_0x5eb35['has'](_0x1a2388))continue;if(_0x43e952[_0x1273e7(0x155)](_0x1a2388))continue;const _0xa5137f=resolve(_0x21e14f,_0x1a2388),_0x3e573f=readMetadataIfPresent(resolve(_0xa5137f,METADATA_FILE));if(_0x3e573f?.[_0x1273e7(0x160)]!==_0x29160d[_0x1273e7(0x160)]||_0x3e573f[_0x1273e7(0x165)]!==_0x21f855||_0x3e573f['skillCode']!==_0x1a2388){_0x5b6330[_0x1273e7(0x13c)]({'path':_0xa5137f,'action':_0x1273e7(0x15e),'reason':_0x1273e7(0x161)});continue;}removeSync(_0xa5137f),_0x5b6330[_0x1273e7(0x13c)]({'path':_0xa5137f,'action':_0x1273e7(0x16a)});}}return _0x5b6330;}export function linkGlobalRuntimeSkills(_0x49f48c,_0x132d5b={}){const _0x4fa8a8=a99_0x1f15,_0x50e989=resolveSkillSyncPaths(_0x132d5b),_0x2c34f3=[];for(const _0x2c3aa8 of _0x49f48c){if(_0x2c3aa8[_0x4fa8a8(0x165)]!==_0x4fa8a8(0x140))throw CliErrors[_0x4fa8a8(0x167)](_0x4fa8a8(0x14e)+_0x2c3aa8[_0x4fa8a8(0x165)]);const _0x1e2b4f=requireSkillCode(_0x2c3aa8[_0x4fa8a8(0x156)]),_0x97ce8=copyManagedSkillDirectory(_0x2c3aa8[_0x4fa8a8(0x150)],resolve(_0x50e989[_0x4fa8a8(0x15a)],_0x1e2b4f));_0x2c34f3[_0x4fa8a8(0x13c)]({..._0x97ce8,'contentHash':_0x2c3aa8['contentHash']});}return _0x2c34f3;}function ensureManagedSymlink(_0x2f32dd,_0x238fc2,_0x2f069a){const _0x56f9b5=a99_0x1f15;mkdirSync(dirname(_0x2f32dd),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2f32dd)||isDanglingSymlink(_0x2f32dd)){const _0xfcbe8b=lstatSync(_0x2f32dd);if(!_0xfcbe8b['isSymbolicLink']())throw CliErrors[_0x56f9b5(0x167)](_0x56f9b5(0x15f)+_0x2f32dd);const _0x460d22=resolveSymlinkTarget(_0x2f32dd);if(!isPathInside(realOrResolved(_0x460d22),realOrResolved(_0x2f069a)))throw CliErrors[_0x56f9b5(0x167)](_0x56f9b5(0x158)+_0x2f32dd);if(realOrResolved(_0x460d22)===realOrResolved(_0x238fc2))return{'path':_0x2f32dd,'target':_0x238fc2,'action':_0x56f9b5(0x148)};return unlinkSync(_0x2f32dd),symlinkSync(_0x238fc2,_0x2f32dd,_0x56f9b5(0x150)),{'path':_0x2f32dd,'target':_0x238fc2,'action':_0x56f9b5(0x166)};}return symlinkSync(_0x238fc2,_0x2f32dd,_0x56f9b5(0x150)),{'path':_0x2f32dd,'target':_0x238fc2,'action':'created'};}function managedAppSkillLinkPaths(_0x221e21,_0x33c078){const _0x1ccbfb=a99_0x1f15;if(!existsSync(_0x221e21))return[];const _0x45821d=_0x33c078+'--';return readdirSync(_0x221e21,{'withFileTypes':!![]})[_0x1ccbfb(0x144)](_0x1bd2c9=>_0x1bd2c9[_0x1ccbfb(0x14b)][_0x1ccbfb(0x13e)](_0x45821d))[_0x1ccbfb(0x157)](_0x55489a=>resolve(_0x221e21,_0x55489a[_0x1ccbfb(0x14b)]));}function removeManagedSkillLink(_0x38bf53,_0x314e45){const _0x5f3928=a99_0x1f15,_0x5a94a0=lstatIfPresent(_0x38bf53);if(!_0x5a94a0?.[_0x5f3928(0x146)]())return{'path':_0x38bf53,'action':_0x5f3928(0x15e),'reason':_0x5f3928(0x13f)};const _0x4566d4=resolveSymlinkTarget(_0x38bf53);if(!isPathInside(realOrResolved(_0x4566d4),realOrResolved(_0x314e45)))return{'path':_0x38bf53,'action':_0x5f3928(0x15e),'reason':'external-symlink'};return unlinkSync(_0x38bf53),{'path':_0x38bf53,'action':'removed'};}export function copyManagedSkillDirectory(_0x76bae1,_0x10fc5e){const _0x37f786=a99_0x1f15,_0x26f2dd=resolve(_0x10fc5e,METADATA_FILE),_0x42fb6b=existsSync(_0x10fc5e);if(_0x42fb6b){const _0xcd80aa=lstatSync(_0x10fc5e);if(_0xcd80aa['isSymbolicLink']())throw CliErrors[_0x37f786(0x167)](_0x37f786(0x149)+_0x10fc5e);if(!_0xcd80aa[_0x37f786(0x152)]())throw CliErrors['validation'](_0x37f786(0x15b)+_0x10fc5e);const _0x2e15ac=readMetadataIfPresent(_0x26f2dd);if(_0x2e15ac?.[_0x37f786(0x165)]!==_0x37f786(0x140))throw CliErrors[_0x37f786(0x167)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x10fc5e);}ensureDirSync(dirname(_0x10fc5e));const _0x5a49bd=_0x42fb6b?readMetadataIfPresent(_0x26f2dd)?.[_0x37f786(0x163)]:undefined,_0xb537b8=readMetadataIfPresent(resolve(_0x76bae1,METADATA_FILE))?.[_0x37f786(0x163)];return _0x42fb6b&&removeSync(_0x10fc5e),copySkillDirectory(_0x76bae1,_0x10fc5e),{'path':_0x10fc5e,'target':_0x76bae1,'action':!_0x42fb6b?_0x37f786(0x154):_0x5a49bd===_0xb537b8?_0x37f786(0x148):'updated'};}function a99_0x1f15(_0x25a027,_0x29efdf){_0x25a027=_0x25a027-0x13c;const _0x52859d=a99_0x5285();let _0x1f15ef=_0x52859d[_0x25a027];return _0x1f15ef;}function copySkillDirectory(_0x1b52e6,_0x3a8f60){copySync(_0x1b52e6,_0x3a8f60,{'dereference':![],'overwrite':!![],'filter'(_0x56c632){const _0x1b0b81=a99_0x1f15;if(lstatSync(_0x56c632)['isSymbolicLink']())throw CliErrors['validation'](_0x1b0b81(0x143)+_0x56c632);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x535275,_0x18f158){const _0x49216c=a101_0x94c2,_0x329173=_0x535275();while(!![]){try{const _0x1a782a=-parseInt(_0x49216c(0x182))/0x1+-parseInt(_0x49216c(0x183))/0x2*(parseInt(_0x49216c(0x193))/0x3)+parseInt(_0x49216c(0x195))/0x4+-parseInt(_0x49216c(0x198))/0x5*(-parseInt(_0x49216c(0x18b))/0x6)+-parseInt(_0x49216c(0x18f))/0x7+parseInt(_0x49216c(0x199))/0x8+parseInt(_0x49216c(0x18c))/0x9;if(_0x1a782a===_0x18f158)break;else _0x329173['push'](_0x329173['shift']());}catch(_0x3559dc){_0x329173['push'](_0x329173['shift']());}}}(a101_0x1b23,0x9b130));function a101_0x1b23(){const _0x454631=['sort','source','44538qQfkmy','19772847ZKuYKB','includes','link','5213103eBJQpY','isDirectory','code','scopes','2957133NTGVlX','metadataPath','1619468cuEgQD','isSymbolicLink','local','230nMlxdS','4994672gdprsN','accessKey','trim','linkedPath','values','cache','scope','tags','filter','has','skillCode','appCode','startsWith','linkedPaths','push','builtin','1202018BClJFC','2mLvkwu','name','dir','cacheDir','map','set'];a101_0x1b23=function(){return _0x454631;};return a101_0x1b23();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x145822,_0x189939={}){const _0x2623ca=a101_0x94c2,_0xeeef93=safePathSegment(_0x145822[_0x2623ca(0x1a4)],_0x2623ca(0x1a4)),_0x86c149=normalizeRuntimeSkillScopes(_0x145822[_0x2623ca(0x192)]),_0x425b95=new Set(_0x86c149),_0x1ea8b0=_0x145822[_0x2623ca(0x191)]?.[_0x2623ca(0x19b)](),_0x5769af=new Map(),_0x2e0cd0=resolve(getRuntimeSkillCacheRoot(_0x145822['env'],_0x145822[_0x2623ca(0x19a)],_0x189939),_0xeeef93);for(const _0x59ae93 of _0x86c149){for(const _0x3bc30a of localSkillEntryDirs(resolve(_0x2e0cd0,_0x59ae93))){collectLocalRuntimeSkill(_0x5769af,_0x3bc30a,{'appCode':_0xeeef93,'scopes':_0x425b95,'code':_0x1ea8b0,'source':_0x2623ca(0x19e)});}}const _0x7af1ac=resolveSkillSyncPaths(_0x189939);for(const _0x20c639 of runtimeAgentSkillRoots(_0x7af1ac)){for(const _0x1ccf4b of localSkillLinkCandidates(_0x20c639,_0xeeef93,_0x425b95)){collectLocalRuntimeSkill(_0x5769af,_0x1ccf4b,{'appCode':_0xeeef93,'scopes':_0x425b95,'code':_0x1ea8b0,'source':_0x2623ca(0x18e),'linkedPath':_0x1ccf4b});}}return Array['from'](_0x5769af[_0x2623ca(0x19d)]())[_0x2623ca(0x189)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x12f758){const _0x32b361=a101_0x94c2;if(!existsSync(_0x12f758))return[];return readdirSync(_0x12f758,{'withFileTypes':!![]})['filter'](_0x1b0557=>_0x1b0557['isDirectory']()||_0x1b0557[_0x32b361(0x196)]())['map'](_0x269efb=>resolve(_0x12f758,_0x269efb[_0x32b361(0x184)]));}function localSkillLinkCandidates(_0x4a3d13,_0x9ab3b4,_0x46fa99){const _0x426500=a101_0x94c2;if(!existsSync(_0x4a3d13))return[];const _0x4157a0=_0x9ab3b4+'--';return readdirSync(_0x4a3d13,{'withFileTypes':!![]})[_0x426500(0x1a1)](_0x1d3258=>_0x1d3258[_0x426500(0x190)]()||_0x1d3258[_0x426500(0x196)]())[_0x426500(0x1a1)](_0x33b0cd=>_0x33b0cd['name'][_0x426500(0x1a5)](_0x4157a0)||_0x46fa99[_0x426500(0x1a2)](_0x426500(0x1a8)))[_0x426500(0x187)](_0x141dae=>resolve(_0x4a3d13,_0x141dae[_0x426500(0x184)]));}function collectLocalRuntimeSkill(_0xd95b24,_0x4d7d54,_0x37a749){const _0x3da448=a101_0x94c2,_0x39edcc=resolve(_0x4d7d54,METADATA_FILE),_0x4451d4=readMetadataIfPresent(_0x39edcc);if(!_0x4451d4)return;if(_0x4451d4[_0x3da448(0x1a4)]!==_0x37a749[_0x3da448(0x1a4)])return;if(!isRuntimeSkillScope(_0x4451d4[_0x3da448(0x19f)])||!_0x37a749[_0x3da448(0x192)][_0x3da448(0x1a2)](_0x4451d4[_0x3da448(0x19f)]))return;const _0x8a69b5=_0x4451d4[_0x3da448(0x1a3)]?.[_0x3da448(0x19b)]();if(!_0x8a69b5)return;if(_0x37a749[_0x3da448(0x191)]&&_0x8a69b5!==_0x37a749[_0x3da448(0x191)])return;const _0x381146=_0x4451d4[_0x3da448(0x19f)]+':'+_0x8a69b5,_0x25af52=_0x37a749['linkedPath']?[_0x37a749[_0x3da448(0x19c)]]:[],_0x4213e1=_0xd95b24['get'](_0x381146);if(_0x4213e1){_0x37a749[_0x3da448(0x18a)]===_0x3da448(0x19e)&&(_0x4213e1[_0x3da448(0x185)]=_0x4d7d54,_0x4213e1[_0x3da448(0x186)]=_0x4d7d54,_0x4213e1['skillMdPath']=resolve(_0x4d7d54,SKILL_FILE),_0x4213e1[_0x3da448(0x194)]=_0x39edcc);for(const _0x200d00 of _0x25af52){!_0x4213e1[_0x3da448(0x1a6)][_0x3da448(0x18d)](_0x200d00)&&_0x4213e1[_0x3da448(0x1a6)][_0x3da448(0x1a7)](_0x200d00);}_0x4213e1[_0x3da448(0x1a6)]['sort']();return;}_0xd95b24[_0x3da448(0x188)](_0x381146,{..._0x4451d4,'tags':Array['isArray'](_0x4451d4[_0x3da448(0x1a0)])?_0x4451d4[_0x3da448(0x1a0)]:[],'scope':_0x4451d4['scope'],'source':_0x3da448(0x197),'dir':_0x4d7d54,'cacheDir':_0x37a749[_0x3da448(0x18a)]===_0x3da448(0x19e)?_0x4d7d54:undefined,'skillMdPath':resolve(_0x4d7d54,SKILL_FILE),'metadataPath':_0x39edcc,'linkedPaths':_0x25af52});}function a101_0x94c2(_0x1ade41,_0x206229){_0x1ade41=_0x1ade41-0x182;const _0x1b2380=a101_0x1b23();let _0x94c277=_0x1b2380[_0x1ade41];return _0x94c277;}function compareLocalRuntimeSkills(_0x50d410,_0x189819){const _0x5c2836=a101_0x94c2,_0x2a6a39={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2a6a39[_0x50d410[_0x5c2836(0x19f)]]-_0x2a6a39[_0x189819[_0x5c2836(0x19f)]]||_0x50d410['skillCode']['localeCompare'](_0x189819[_0x5c2836(0x1a3)])||_0x50d410[_0x5c2836(0x185)]['localeCompare'](_0x189819['dir']);}
1
+ (function(_0x17d00a,_0x3ff5e9){const _0x1677b0=a100_0x3d54,_0xce3656=_0x17d00a();while(!![]){try{const _0x1e739f=-parseInt(_0x1677b0(0x1a2))/0x1+-parseInt(_0x1677b0(0x1c1))/0x2+parseInt(_0x1677b0(0x1c4))/0x3+-parseInt(_0x1677b0(0x1a5))/0x4+parseInt(_0x1677b0(0x1a1))/0x5*(parseInt(_0x1677b0(0x1c2))/0x6)+parseInt(_0x1677b0(0x1bc))/0x7*(parseInt(_0x1677b0(0x1b2))/0x8)+-parseInt(_0x1677b0(0x1a4))/0x9*(parseInt(_0x1677b0(0x19f))/0xa);if(_0x1e739f===_0x3ff5e9)break;else _0xce3656['push'](_0xce3656['shift']());}catch(_0x1d705f){_0xce3656['push'](_0xce3656['shift']());}}}(a100_0x3b71,0x1b0e1));function a100_0x3d54(_0x12b9af,_0x3d2b67){_0x12b9af=_0x12b9af-0x19d;const _0x3b712f=a100_0x3b71();let _0x3d546c=_0x3b712f[_0x12b9af];return _0x3d546c;}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a100_0x3b71(){const _0x465239=['name','set','16XuvVAR','includes','linkedPaths','linkedPath','filter','values','appCode','isSymbolicLink','accessKey','isArray','561785KxjCXQ','sort','code','env','skillMdPath','114838dqVunc','1986SYifXb','get','453246InUBJp','isDirectory','metadataPath','has','builtin','650DdwwSd','scope','710IHJqLV','26822WnTHEK','cache','8865EwpFaS','398044KLfitB','source','map','push','from','skillCode','cacheDir','localeCompare','dir','link','tags'];a100_0x3b71=function(){return _0x465239;};return a100_0x3b71();}export function listLocalRuntimeSkills(_0x31e9f1,_0x34ed41={}){const _0x5940c2=a100_0x3d54,_0x29753c=safePathSegment(_0x31e9f1['appCode'],_0x5940c2(0x1b8)),_0x3be635=normalizeRuntimeSkillScopes(_0x31e9f1['scopes']),_0x334944=new Set(_0x3be635),_0x2e3e5d=_0x31e9f1[_0x5940c2(0x1be)]?.['trim'](),_0x1983f4=new Map(),_0x2fceff=resolve(getRuntimeSkillCacheRoot(_0x31e9f1[_0x5940c2(0x1bf)],_0x31e9f1[_0x5940c2(0x1ba)],_0x34ed41),_0x29753c);for(const _0x2609ce of _0x3be635){for(const _0x20ca1f of localSkillEntryDirs(resolve(_0x2fceff,_0x2609ce))){collectLocalRuntimeSkill(_0x1983f4,_0x20ca1f,{'appCode':_0x29753c,'scopes':_0x334944,'code':_0x2e3e5d,'source':_0x5940c2(0x1a3)});}}const _0x5cec25=resolveSkillSyncPaths(_0x34ed41);for(const _0x4321a2 of runtimeAgentSkillRoots(_0x5cec25)){for(const _0x82f746 of localSkillLinkCandidates(_0x4321a2,_0x29753c,_0x334944)){collectLocalRuntimeSkill(_0x1983f4,_0x82f746,{'appCode':_0x29753c,'scopes':_0x334944,'code':_0x2e3e5d,'source':_0x5940c2(0x1ae),'linkedPath':_0x82f746});}}return Array[_0x5940c2(0x1a9)](_0x1983f4[_0x5940c2(0x1b7)]())[_0x5940c2(0x1bd)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x242c64){const _0x544e1b=a100_0x3d54;if(!existsSync(_0x242c64))return[];return readdirSync(_0x242c64,{'withFileTypes':!![]})[_0x544e1b(0x1b6)](_0x11b95d=>_0x11b95d[_0x544e1b(0x1c5)]()||_0x11b95d[_0x544e1b(0x1b9)]())[_0x544e1b(0x1a7)](_0x432cf2=>resolve(_0x242c64,_0x432cf2[_0x544e1b(0x1b0)]));}function localSkillLinkCandidates(_0x54f571,_0xc66c1c,_0x242990){const _0x8a8022=a100_0x3d54;if(!existsSync(_0x54f571))return[];const _0x54c77f=_0xc66c1c+'--';return readdirSync(_0x54f571,{'withFileTypes':!![]})['filter'](_0x78b221=>_0x78b221[_0x8a8022(0x1c5)]()||_0x78b221[_0x8a8022(0x1b9)]())['filter'](_0x49af1e=>_0x49af1e['name']['startsWith'](_0x54c77f)||_0x242990[_0x8a8022(0x19d)](_0x8a8022(0x19e)))[_0x8a8022(0x1a7)](_0x20f200=>resolve(_0x54f571,_0x20f200['name']));}function collectLocalRuntimeSkill(_0x542e84,_0x18d4ce,_0x52ac2b){const _0x115498=a100_0x3d54,_0x20f6e0=resolve(_0x18d4ce,METADATA_FILE),_0x2eb9c3=readMetadataIfPresent(_0x20f6e0);if(!_0x2eb9c3)return;if(_0x2eb9c3['appCode']!==_0x52ac2b[_0x115498(0x1b8)])return;if(!isRuntimeSkillScope(_0x2eb9c3[_0x115498(0x1a0)])||!_0x52ac2b['scopes'][_0x115498(0x19d)](_0x2eb9c3['scope']))return;const _0x4ed241=_0x2eb9c3[_0x115498(0x1aa)]?.['trim']();if(!_0x4ed241)return;if(_0x52ac2b['code']&&_0x4ed241!==_0x52ac2b['code'])return;const _0x57c8ba=_0x2eb9c3[_0x115498(0x1a0)]+':'+_0x4ed241,_0x3ffd95=_0x52ac2b[_0x115498(0x1b5)]?[_0x52ac2b['linkedPath']]:[],_0x6325ce=_0x542e84[_0x115498(0x1c3)](_0x57c8ba);if(_0x6325ce){_0x52ac2b[_0x115498(0x1a6)]===_0x115498(0x1a3)&&(_0x6325ce[_0x115498(0x1ad)]=_0x18d4ce,_0x6325ce[_0x115498(0x1ab)]=_0x18d4ce,_0x6325ce[_0x115498(0x1c0)]=resolve(_0x18d4ce,SKILL_FILE),_0x6325ce[_0x115498(0x1c6)]=_0x20f6e0);for(const _0x1d93cf of _0x3ffd95){!_0x6325ce['linkedPaths'][_0x115498(0x1b3)](_0x1d93cf)&&_0x6325ce[_0x115498(0x1b4)][_0x115498(0x1a8)](_0x1d93cf);}_0x6325ce[_0x115498(0x1b4)][_0x115498(0x1bd)]();return;}_0x542e84[_0x115498(0x1b1)](_0x57c8ba,{..._0x2eb9c3,'tags':Array[_0x115498(0x1bb)](_0x2eb9c3[_0x115498(0x1af)])?_0x2eb9c3['tags']:[],'scope':_0x2eb9c3[_0x115498(0x1a0)],'source':'local','dir':_0x18d4ce,'cacheDir':_0x52ac2b[_0x115498(0x1a6)]===_0x115498(0x1a3)?_0x18d4ce:undefined,'skillMdPath':resolve(_0x18d4ce,SKILL_FILE),'metadataPath':_0x20f6e0,'linkedPaths':_0x3ffd95});}function compareLocalRuntimeSkills(_0x2b6c54,_0x20cd52){const _0x34ebe2=a100_0x3d54,_0x41ac18={'personal':0x0,'company':0x1,'builtin':0x2};return _0x41ac18[_0x2b6c54[_0x34ebe2(0x1a0)]]-_0x41ac18[_0x20cd52[_0x34ebe2(0x1a0)]]||_0x2b6c54['skillCode'][_0x34ebe2(0x1ac)](_0x20cd52[_0x34ebe2(0x1aa)])||_0x2b6c54[_0x34ebe2(0x1ad)]['localeCompare'](_0x20cd52['dir']);}
@@ -1 +1 @@
1
- (function(_0x45e397,_0x24449a){const _0x533f68=a102_0xe9b4,_0x36e6c6=_0x45e397();while(!![]){try{const _0x169fee=parseInt(_0x533f68(0x1ca))/0x1+parseInt(_0x533f68(0x1d5))/0x2*(parseInt(_0x533f68(0x1cc))/0x3)+parseInt(_0x533f68(0x1ea))/0x4+parseInt(_0x533f68(0x1e5))/0x5*(-parseInt(_0x533f68(0x1d3))/0x6)+parseInt(_0x533f68(0x1e7))/0x7*(-parseInt(_0x533f68(0x1de))/0x8)+-parseInt(_0x533f68(0x1e3))/0x9+parseInt(_0x533f68(0x1d8))/0xa;if(_0x169fee===_0x24449a)break;else _0x36e6c6['push'](_0x36e6c6['shift']());}catch(_0x21bdc7){_0x36e6c6['push'](_0x36e6c6['shift']());}}}(a102_0x1ec5,0x9ffb2));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a102_0xe9b4(_0x44cddc,_0x2722f5){_0x44cddc=_0x44cddc-0x1c6;const _0x1ec5b6=a102_0x1ec5();let _0xe9b425=_0x1ec5b6[_0x44cddc];return _0xe9b425;}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(_0x1b4bea){const _0x3e1f3a=a102_0xe9b4;return _0x1b4bea[_0x3e1f3a(0x1e9)]??Buffer['from'](_0x1b4bea[_0x3e1f3a(0x1d1)]??'','utf8');}export function fileText(_0x5ad1c3){const _0x3f0114=a102_0xe9b4;return fileContent(_0x5ad1c3)[_0x3f0114(0x1ec)](_0x3f0114(0x1c9));}export function normalizeLocalFiles(_0x3afcd5){const _0xe4fbac=a102_0xe9b4;if(!Array[_0xe4fbac(0x1d9)](_0x3afcd5)||_0x3afcd5['length']===0x0)return[];const _0x26da7c=new Map();for(const _0x29925a of _0x3afcd5){if(!_0x29925a||typeof _0x29925a!==_0xe4fbac(0x1e2)||typeof _0x29925a[_0xe4fbac(0x1dc)]!==_0xe4fbac(0x1db))throw CliErrors['validation'](_0xe4fbac(0x1e1));const _0x4aa204=normalizeSkillRelativePath(_0x29925a[_0xe4fbac(0x1dc)]);if(_0x26da7c[_0xe4fbac(0x1d6)](_0x4aa204))throw CliErrors[_0xe4fbac(0x1cf)](_0xe4fbac(0x1c7)+_0x4aa204);if(_0x29925a[_0xe4fbac(0x1e9)]!==undefined&&!Buffer[_0xe4fbac(0x1f0)](_0x29925a[_0xe4fbac(0x1e9)]))throw CliErrors[_0xe4fbac(0x1cf)](_0xe4fbac(0x1e4)+_0x4aa204);if(_0x29925a[_0xe4fbac(0x1e9)]===undefined&&typeof _0x29925a[_0xe4fbac(0x1d1)]!==_0xe4fbac(0x1db))throw CliErrors[_0xe4fbac(0x1cf)](_0xe4fbac(0x1ef)+_0x4aa204);const _0x384796=fileContent(_0x29925a);_0x26da7c[_0xe4fbac(0x1ee)](_0x4aa204,{'path':_0x4aa204,'bytes':_0x384796});}return Array['from'](_0x26da7c[_0xe4fbac(0x1c6)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x4e940f){const _0x584675=a102_0xe9b4;if(!Array[_0x584675(0x1d9)](_0x4e940f)||_0x4e940f[_0x584675(0x1df)]===0x0)return[];const _0x18f30d=new Map();for(const _0x3c3bc0 of _0x4e940f){if(!_0x3c3bc0||typeof _0x3c3bc0!==_0x584675(0x1e2)||typeof _0x3c3bc0[_0x584675(0x1dc)]!==_0x584675(0x1db))throw CliErrors[_0x584675(0x1cf)](_0x584675(0x1e1));const _0x2bfd2c=normalizeSkillRelativePath(_0x3c3bc0[_0x584675(0x1dc)]);if(_0x18f30d[_0x584675(0x1d6)](_0x2bfd2c))throw CliErrors['validation'](_0x584675(0x1c7)+_0x2bfd2c);if(!isSha256Hex(_0x3c3bc0['sha256']))throw CliErrors[_0x584675(0x1cf)](_0x584675(0x1ce)+_0x2bfd2c);if(!Number['isSafeInteger'](_0x3c3bc0[_0x584675(0x1ed)])||_0x3c3bc0[_0x584675(0x1ed)]<0x0)throw CliErrors[_0x584675(0x1cf)](_0x584675(0x1d4)+_0x2bfd2c);_0x18f30d[_0x584675(0x1ee)](_0x2bfd2c,{'path':_0x2bfd2c,'sha256':_0x3c3bc0[_0x584675(0x1f1)][_0x584675(0x1cd)](),'size':_0x3c3bc0[_0x584675(0x1ed)]});}return Array[_0x584675(0x1f2)](_0x18f30d[_0x584675(0x1c6)]())[_0x584675(0x1dd)](compareSkillFiles);}export function scanSkillDirectory(_0x2b9313){const _0x409ba7=realpathSync(_0x2b9313),_0x454cb7=[];function _0x1b9dec(_0x2bcff9){const _0x42939f=a102_0xe9b4,_0xfd1ab0=readdirSync(_0x2bcff9,{'withFileTypes':!![]})[_0x42939f(0x1dd)]((_0xe43c37,_0x5dd9e5)=>_0xe43c37[_0x42939f(0x1e0)][_0x42939f(0x1d0)](_0x5dd9e5[_0x42939f(0x1e0)]));for(const _0x8b33 of _0xfd1ab0){if(_0x8b33[_0x42939f(0x1d7)]()&&IGNORED_DIR_NAMES['has'](_0x8b33['name']))continue;if(IGNORED_FILE_NAMES[_0x42939f(0x1d6)](_0x8b33[_0x42939f(0x1e0)]))continue;const _0x13a1a0=resolve(_0x2bcff9,_0x8b33[_0x42939f(0x1e0)]);if(_0x8b33[_0x42939f(0x1e6)]())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x13a1a0);const _0x2ddd5e=toPosixPath(relative(_0x409ba7,_0x13a1a0));if(_0x8b33[_0x42939f(0x1d7)]()){_0x1b9dec(_0x13a1a0);continue;}if(!_0x8b33[_0x42939f(0x1eb)]())continue;validateSkillRelativePath(_0x2ddd5e);const _0x35510b=readFileSync(_0x13a1a0);_0x454cb7[_0x42939f(0x1e8)]({'path':_0x2ddd5e,'bytes':_0x35510b});}}return _0x1b9dec(_0x409ba7),normalizeLocalFiles(_0x454cb7);}export function compareSkillFiles(_0x1d9f29,_0x5b6887){const _0x2fef5f=a102_0xe9b4;if(_0x1d9f29[_0x2fef5f(0x1dc)]===SKILL_FILE)return _0x5b6887[_0x2fef5f(0x1dc)]===SKILL_FILE?0x0:-0x1;if(_0x5b6887[_0x2fef5f(0x1dc)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x1d9f29[_0x2fef5f(0x1dc)],_0x2fef5f(0x1c9)),Buffer['from'](_0x5b6887[_0x2fef5f(0x1dc)],'utf8'));}export function normalizeSkillRelativePath(_0x2d57f3){const _0x5e8068=toPosixPath(_0x2d57f3['trim']());return validateSkillRelativePath(_0x5e8068),_0x5e8068;}export function validateSkillRelativePath(_0x44240a){const _0x23b5e7=a102_0xe9b4;if(!_0x44240a||_0x44240a[_0x23b5e7(0x1d2)]('/')||_0x44240a[_0x23b5e7(0x1c8)]('//'))throw CliErrors[_0x23b5e7(0x1cf)](_0x23b5e7(0x1da)+_0x44240a);for(const _0x289fbb of _0x44240a[_0x23b5e7(0x1cb)]('/')){if(!_0x289fbb||_0x289fbb==='.'||_0x289fbb==='..')throw CliErrors[_0x23b5e7(0x1cf)](_0x23b5e7(0x1da)+_0x44240a);}}export function toPosixPath(_0x12a33f){return _0x12a33f['replace'](/\\/g,'/');}function a102_0x1ec5(){const _0x36eefc=['Unsafe\x20Skill\x20file\x20path:\x20','string','path','sort','2883472baymUJ','length','name','Skill\x20file\x20path\x20must\x20be\x20text.','object','2193102PHibTP','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','120CMyDUx','isSymbolicLink','7NSOMwY','push','bytes','3337548fEqszG','isFile','toString','size','set','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isBuffer','sha256','from','values','Duplicate\x20Skill\x20file\x20path:\x20','includes','utf8','56476RpDzxo','split','777bVVKsK','toLowerCase','Skill\x20file\x20sha256\x20is\x20invalid:\x20','validation','localeCompare','content','startsWith','267990Ufxjhp','Skill\x20file\x20size\x20is\x20invalid:\x20','4538bKvCss','has','isDirectory','8528200nrphzm','isArray'];a102_0x1ec5=function(){return _0x36eefc;};return a102_0x1ec5();}export function isSha256Hex(_0x15f525){const _0x425254=a102_0xe9b4;return typeof _0x15f525===_0x425254(0x1db)&&/^[a-fA-F0-9]{64}$/['test'](_0x15f525);}
1
+ (function(_0x5f1604,_0x475eec){const _0x9c1a6a=a101_0x52ce,_0x30a654=_0x5f1604();while(!![]){try{const _0x9f126b=-parseInt(_0x9c1a6a(0x13a))/0x1*(parseInt(_0x9c1a6a(0x120))/0x2)+parseInt(_0x9c1a6a(0x143))/0x3+parseInt(_0x9c1a6a(0x129))/0x4+-parseInt(_0x9c1a6a(0x11c))/0x5+parseInt(_0x9c1a6a(0x139))/0x6*(-parseInt(_0x9c1a6a(0x130))/0x7)+parseInt(_0x9c1a6a(0x13f))/0x8+parseInt(_0x9c1a6a(0x13c))/0x9;if(_0x9f126b===_0x475eec)break;else _0x30a654['push'](_0x30a654['shift']());}catch(_0x29256f){_0x30a654['push'](_0x30a654['shift']());}}}(a101_0x351d,0x6a4e8));function a101_0x351d(){const _0x3c69ea=['size','from','isDirectory','toString','object','toLowerCase','string','Skill\x20file\x20path\x20must\x20be\x20text.','10146qcgYvw','371FkcIIZ','isSymbolicLink','5824764ecqNvr','length','validation','3272104BiZgCm','isBuffer','path','bytes','377373Juxjjv','compare','test','name','content','push','675470NArbtq','isFile','values','sha256','4460bxAWqU','Unsafe\x20Skill\x20file\x20path:\x20','Duplicate\x20Skill\x20file\x20path:\x20','includes','Skill\x20file\x20size\x20is\x20invalid:\x20','isArray','Skill\x20file\x20sha256\x20is\x20invalid:\x20','sort','replace','1208388VGfeMT','utf8','localeCompare','isSafeInteger','set','startsWith','has','357IcrwUs'];a101_0x351d=function(){return _0x3c69ea;};return a101_0x351d();}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(_0x5a6c24){const _0x307c80=a101_0x52ce;return _0x5a6c24[_0x307c80(0x142)]??Buffer[_0x307c80(0x132)](_0x5a6c24[_0x307c80(0x147)]??'',_0x307c80(0x12a));}export function fileText(_0xd8f98e){const _0x2113ae=a101_0x52ce;return fileContent(_0xd8f98e)[_0x2113ae(0x134)]('utf8');}export function normalizeLocalFiles(_0x240fa3){const _0x5e1916=a101_0x52ce;if(!Array[_0x5e1916(0x125)](_0x240fa3)||_0x240fa3[_0x5e1916(0x13d)]===0x0)return[];const _0x36b82d=new Map();for(const _0x48108f of _0x240fa3){if(!_0x48108f||typeof _0x48108f!==_0x5e1916(0x135)||typeof _0x48108f[_0x5e1916(0x141)]!==_0x5e1916(0x137))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x300c31=normalizeSkillRelativePath(_0x48108f[_0x5e1916(0x141)]);if(_0x36b82d[_0x5e1916(0x12f)](_0x300c31))throw CliErrors[_0x5e1916(0x13e)](_0x5e1916(0x122)+_0x300c31);if(_0x48108f[_0x5e1916(0x142)]!==undefined&&!Buffer[_0x5e1916(0x140)](_0x48108f['bytes']))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x300c31);if(_0x48108f[_0x5e1916(0x142)]===undefined&&typeof _0x48108f[_0x5e1916(0x147)]!==_0x5e1916(0x137))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x300c31);const _0x379324=fileContent(_0x48108f);_0x36b82d[_0x5e1916(0x12d)](_0x300c31,{'path':_0x300c31,'bytes':_0x379324});}return Array[_0x5e1916(0x132)](_0x36b82d[_0x5e1916(0x11e)]())[_0x5e1916(0x127)](compareSkillFiles);}export function normalizeManifestFiles(_0x812707){const _0x256127=a101_0x52ce;if(!Array[_0x256127(0x125)](_0x812707)||_0x812707[_0x256127(0x13d)]===0x0)return[];const _0x11914=new Map();for(const _0x5bb14e of _0x812707){if(!_0x5bb14e||typeof _0x5bb14e!=='object'||typeof _0x5bb14e[_0x256127(0x141)]!=='string')throw CliErrors['validation'](_0x256127(0x138));const _0x27e45d=normalizeSkillRelativePath(_0x5bb14e['path']);if(_0x11914[_0x256127(0x12f)](_0x27e45d))throw CliErrors[_0x256127(0x13e)](_0x256127(0x122)+_0x27e45d);if(!isSha256Hex(_0x5bb14e[_0x256127(0x11f)]))throw CliErrors[_0x256127(0x13e)](_0x256127(0x126)+_0x27e45d);if(!Number[_0x256127(0x12c)](_0x5bb14e['size'])||_0x5bb14e[_0x256127(0x131)]<0x0)throw CliErrors[_0x256127(0x13e)](_0x256127(0x124)+_0x27e45d);_0x11914[_0x256127(0x12d)](_0x27e45d,{'path':_0x27e45d,'sha256':_0x5bb14e[_0x256127(0x11f)][_0x256127(0x136)](),'size':_0x5bb14e[_0x256127(0x131)]});}return Array[_0x256127(0x132)](_0x11914['values']())[_0x256127(0x127)](compareSkillFiles);}export function scanSkillDirectory(_0x441ec1){const _0x21f11f=realpathSync(_0x441ec1),_0x5a40a8=[];function _0x474f87(_0x195a9c){const _0x541280=a101_0x52ce,_0x2522e2=readdirSync(_0x195a9c,{'withFileTypes':!![]})['sort']((_0x31ecd5,_0x1df2c8)=>_0x31ecd5[_0x541280(0x146)][_0x541280(0x12b)](_0x1df2c8[_0x541280(0x146)]));for(const _0x527657 of _0x2522e2){if(_0x527657[_0x541280(0x133)]()&&IGNORED_DIR_NAMES[_0x541280(0x12f)](_0x527657[_0x541280(0x146)]))continue;if(IGNORED_FILE_NAMES[_0x541280(0x12f)](_0x527657['name']))continue;const _0x1e8f37=resolve(_0x195a9c,_0x527657[_0x541280(0x146)]);if(_0x527657[_0x541280(0x13b)]())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x1e8f37);const _0x2e9889=toPosixPath(relative(_0x21f11f,_0x1e8f37));if(_0x527657['isDirectory']()){_0x474f87(_0x1e8f37);continue;}if(!_0x527657[_0x541280(0x11d)]())continue;validateSkillRelativePath(_0x2e9889);const _0xa47420=readFileSync(_0x1e8f37);_0x5a40a8[_0x541280(0x148)]({'path':_0x2e9889,'bytes':_0xa47420});}}return _0x474f87(_0x21f11f),normalizeLocalFiles(_0x5a40a8);}export function compareSkillFiles(_0x1d11ae,_0x552379){const _0x59fdcb=a101_0x52ce;if(_0x1d11ae[_0x59fdcb(0x141)]===SKILL_FILE)return _0x552379[_0x59fdcb(0x141)]===SKILL_FILE?0x0:-0x1;if(_0x552379['path']===SKILL_FILE)return 0x1;return Buffer[_0x59fdcb(0x144)](Buffer[_0x59fdcb(0x132)](_0x1d11ae['path'],_0x59fdcb(0x12a)),Buffer[_0x59fdcb(0x132)](_0x552379[_0x59fdcb(0x141)],_0x59fdcb(0x12a)));}export function normalizeSkillRelativePath(_0x140cb8){const _0x94dba1=toPosixPath(_0x140cb8['trim']());return validateSkillRelativePath(_0x94dba1),_0x94dba1;}export function validateSkillRelativePath(_0x5d41d1){const _0xfe9902=a101_0x52ce;if(!_0x5d41d1||_0x5d41d1[_0xfe9902(0x12e)]('/')||_0x5d41d1[_0xfe9902(0x123)]('//'))throw CliErrors['validation'](_0xfe9902(0x121)+_0x5d41d1);for(const _0x1cb964 of _0x5d41d1['split']('/')){if(!_0x1cb964||_0x1cb964==='.'||_0x1cb964==='..')throw CliErrors[_0xfe9902(0x13e)](_0xfe9902(0x121)+_0x5d41d1);}}export function toPosixPath(_0x23cfa7){const _0x5b626d=a101_0x52ce;return _0x23cfa7[_0x5b626d(0x128)](/\\/g,'/');}function a101_0x52ce(_0x1b8071,_0x136b2e){_0x1b8071=_0x1b8071-0x11c;const _0x351d7f=a101_0x351d();let _0x52ce5c=_0x351d7f[_0x1b8071];return _0x52ce5c;}export function isSha256Hex(_0x50c401){const _0x531570=a101_0x52ce;return typeof _0x50c401===_0x531570(0x137)&&/^[a-fA-F0-9]{64}$/[_0x531570(0x145)](_0x50c401);}
@@ -1 +1 @@
1
- (function(_0x58f90b,_0x247c01){const _0xf2afa3=a103_0x5204,_0x51f0f4=_0x58f90b();while(!![]){try{const _0x17d489=parseInt(_0xf2afa3(0x95))/0x1+parseInt(_0xf2afa3(0x87))/0x2+parseInt(_0xf2afa3(0x9c))/0x3+parseInt(_0xf2afa3(0x90))/0x4+parseInt(_0xf2afa3(0xb0))/0x5+-parseInt(_0xf2afa3(0x9b))/0x6*(parseInt(_0xf2afa3(0xa3))/0x7)+-parseInt(_0xf2afa3(0xaa))/0x8*(parseInt(_0xf2afa3(0x82))/0x9);if(_0x17d489===_0x247c01)break;else _0x51f0f4['push'](_0x51f0f4['shift']());}catch(_0x29044d){_0x51f0f4['push'](_0x51f0f4['shift']());}}}(a103_0xfe9c,0x98d54));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a103_0xfe9c(){const _0x31d3be=['Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','contentHash','test','533900yzXpsr','\x0a---\x0a\x0a','---','contents','replace','description','set','packageBytes','toString','593032vBKYau','slice','has','map','path','916704XJigXT','trim','isFile','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName','14838URnbIw','37653fIPClP','delete','skillName','name:\x20','accessKey','keys','trimEnd','917ckDuRM','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','length','join','pulledAt','stringify','match','8YBuOYZ','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','flow','find','Managed\x20file\x20was\x20removed\x20locally:\x20','fileHashes','4481690dJAKsd','env','name','paths','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','utf8','description:\x20','displayName:\x20','filter','11617506edfeDS','validation'];a103_0xfe9c=function(){return _0x31d3be;};return a103_0xfe9c();}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xbd0fb5,_0x43e151,_0x25adae){const _0x4e40c3=a103_0x5204,_0x5f1995=requireSkillCode(_0xbd0fb5),_0x358c1c=requirePackageBytes(_0x5f1995,_0x25adae[_0x4e40c3(0x8e)]),_0x468f75=extractDownloadedPackage(_0x358c1c),_0x49db93=_0x468f75[_0x4e40c3(0xad)](_0x396c90=>_0x396c90[_0x4e40c3(0x94)]===SKILL_FILE);if(!_0x49db93)throw CliErrors[_0x4e40c3(0x83)](_0x4e40c3(0x99)+SKILL_FILE+':\x20'+_0x5f1995);const _0x43ef28=withMaterializedSkillFrontmatter(_0x468f75,_0xbd0fb5,_0x5f1995),_0x25abb6=_0x43ef28[_0x4e40c3(0xad)](_0x1fd0fa=>_0x1fd0fa[_0x4e40c3(0x94)]===SKILL_FILE),_0x93492c=fileText(_0x25abb6),_0x19dffa=getRuntimeSkillDir(_0x25adae[_0x4e40c3(0xb1)],_0x25adae[_0x4e40c3(0xa0)],_0x25adae['appCode'],_0x43e151,_0x5f1995,_0x25adae[_0x4e40c3(0xb3)]),_0x3dd12e=resolve(_0x19dffa,SKILL_FILE),_0x4d5991=resolve(_0x19dffa,METADATA_FILE),_0x27d6f3=contentHash(_0x93492c),_0x4ce540=readMetadataIfPresent(_0x4d5991)?.[_0x4e40c3(0xaf)];ensurePulledFilesCanBeOverwritten(_0x19dffa,_0x4d5991,_0x43ef28,_0x25adae['force']===!![]),mkdirSync(_0x19dffa,{'recursive':!![],'mode':0x1c0});const _0x4d5bf7=existsSync(_0x3dd12e)?readFileSync(_0x3dd12e,'utf8'):undefined;return materializeFiles(_0x19dffa,_0x43ef28),removeStaleManagedFiles(_0x19dffa,_0x4ce540,_0x43ef28),writeJsonAtomic(_0x4d5991,buildMetadata(_0xbd0fb5,_0x43e151,_0x25adae['appCode'],_0x27d6f3,_0x25adae[_0x4e40c3(0xa7)],_0x43ef28,_0x358c1c)),{'skill':_0xbd0fb5,'scope':_0x43e151,'dir':_0x19dffa,'skillMdPath':_0x3dd12e,'metadataPath':_0x4d5991,'contentHash':_0x27d6f3,'changed':_0x4d5bf7!==_0x93492c};}function withMaterializedSkillFrontmatter(_0x24df68,_0x5d1eba,_0x398c5c){const _0x2c2eea=a103_0x5204,_0x11a892=skillDisplayName(_0x5d1eba,_0x398c5c),_0x2ad871=_0x5d1eba['description']?.[_0x2c2eea(0x96)]()||_0x11a892||_0x398c5c;return normalizeLocalFiles(_0x24df68)[_0x2c2eea(0x93)](_0x16a307=>{const _0x28a75a=_0x2c2eea,_0x1527bb=fileText(_0x16a307);if(_0x16a307['path']!==SKILL_FILE)return _0x16a307;if(hasYamlFrontmatter(_0x1527bb))return{'path':_0x16a307[_0x28a75a(0x94)],'content':withSyncedDisplayName(_0x1527bb,_0x11a892)};return{'path':_0x16a307[_0x28a75a(0x94)],'content':prependSkillFrontmatter(_0x1527bb,{'name':_0x398c5c,'displayName':_0x11a892,'description':_0x2ad871})};});}function hasYamlFrontmatter(_0x3e7cbe){const _0x46712a=a103_0x5204;return/^\uFEFF?---\s*\r?\n/[_0x46712a(0x86)](_0x3e7cbe);}function a103_0x5204(_0x34c913,_0x2b1ca8){_0x34c913=_0x34c913-0x80;const _0xfe9c7c=a103_0xfe9c();let _0x5204bc=_0xfe9c7c[_0x34c913];return _0x5204bc;}function prependSkillFrontmatter(_0x557b37,_0x56c81f){const _0x58d2d6=a103_0x5204,_0x24c376=_0x557b37['replace'](/^\uFEFF/,'');return['---',_0x58d2d6(0x9f)+yamlString(_0x56c81f[_0x58d2d6(0xb2)]),_0x56c81f['displayName']?_0x58d2d6(0x80)+yamlString(_0x56c81f[_0x58d2d6(0x9a)]):undefined,_0x58d2d6(0xb6)+yamlString(_0x56c81f[_0x58d2d6(0x8c)]),_0x58d2d6(0x89),'',_0x24c376][_0x58d2d6(0x81)](_0x5514e9=>_0x5514e9!==undefined)[_0x58d2d6(0xa6)]('\x0a');}function yamlString(_0x38a207){const _0xe36d8b=a103_0x5204;return JSON[_0xe36d8b(0xa8)](_0x38a207[_0xe36d8b(0x8b)](/\r/g,'')[_0xe36d8b(0x96)]());}function skillDisplayName(_0x4de749,_0x13c7ae){const _0x1e26b3=a103_0x5204,_0x3e2d84=_0x4de749[_0x1e26b3(0x9e)]?.[_0x1e26b3(0x96)]();return _0x3e2d84||_0x13c7ae;}function withSyncedDisplayName(_0x10d44d,_0x311a50){const _0x203631=a103_0x5204,_0xa49111=_0x10d44d[_0x203631(0xa9)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa49111)return _0x10d44d;const _0x3def80=_0xa49111[0x1]??'',_0x24175c=_0xa49111[0x2]??'',_0x124843=parseDocument(_0x24175c);if(_0x124843['errors'][_0x203631(0xa5)]>0x0||!isMap(_0x124843['contents']))return _0x10d44d;if(_0x311a50)_0x124843[_0x203631(0x8d)](_0x203631(0x9a),_0x311a50);else{if(_0x124843[_0x203631(0x92)](_0x203631(0x9a)))_0x124843[_0x203631(0x9d)](_0x203631(0x9a));else return _0x10d44d;}forceBlockCollections(_0x124843[_0x203631(0x8a)]);const _0x243faf=_0x124843[_0x203631(0x8f)]({'lineWidth':0x0})[_0x203631(0xa2)](),_0x1ebec3=_0x10d44d[_0x203631(0x91)](_0xa49111[0x0][_0x203631(0xa5)])[_0x203631(0x8b)](/^\r?\n/,'');return _0x3def80+'---\x0a'+_0x243faf+_0x203631(0x88)+_0x1ebec3;}function forceBlockCollections(_0x49d385){if(!isNode(_0x49d385))return;visit(_0x49d385,(_0x1d2c55,_0x2367a2)=>{const _0x557a51=a103_0x5204;isCollection(_0x2367a2)&&(_0x2367a2[_0x557a51(0xac)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x277418,_0x407b36,_0x192d4c,_0x3f3840){const _0x4f3bdd=a103_0x5204;if(_0x3f3840||!existsSync(_0x407b36))return;const _0x1fdad7=readMetadataIfPresent(_0x407b36);if(!_0x1fdad7)return;const _0x283314=_0x1fdad7[_0x4f3bdd(0xaf)]&&Object[_0x4f3bdd(0xa1)](_0x1fdad7[_0x4f3bdd(0xaf)])[_0x4f3bdd(0xa5)]>0x0?_0x1fdad7[_0x4f3bdd(0xaf)]:undefined;if(_0x283314)for(const [_0x3c3fca,_0x46091e]of Object['entries'](_0x283314)){const _0x17ae7b=resolveManagedFilePath(_0x277418,_0x3c3fca);if(!existsSync(_0x17ae7b))throw CliErrors[_0x4f3bdd(0x83)](_0x4f3bdd(0x98)+_0x277418,_0x4f3bdd(0xae)+_0x3c3fca);const _0x3b3cc0=lstatSync(_0x17ae7b);if(!_0x3b3cc0[_0x4f3bdd(0x97)]())throw CliErrors[_0x4f3bdd(0x83)](_0x4f3bdd(0x98)+_0x277418,_0x4f3bdd(0xa4)+_0x3c3fca);const _0xff1f87=bufferSha256(readFileSync(_0x17ae7b));if(_0xff1f87!==_0x46091e)throw CliErrors[_0x4f3bdd(0x83)](_0x4f3bdd(0x98)+_0x277418+'.\x20Changed\x20file:\x20'+_0x3c3fca,_0x4f3bdd(0x84)+_0x3c3fca);}else{const _0x294dea=resolve(_0x277418,SKILL_FILE);if(existsSync(_0x294dea)&&_0x1fdad7[_0x4f3bdd(0x85)]){const _0xc920dd=contentHash(readFileSync(_0x294dea,_0x4f3bdd(0xb5)));if(_0xc920dd!==_0x1fdad7['contentHash'])throw CliErrors[_0x4f3bdd(0x83)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x294dea,_0x4f3bdd(0xab));}}for(const _0x39be79 of normalizeLocalFiles(_0x192d4c)){if(_0x283314?.[_0x39be79['path']])continue;if(!_0x283314&&_0x39be79[_0x4f3bdd(0x94)]===SKILL_FILE)continue;const _0x49c044=resolveManagedFilePath(_0x277418,_0x39be79['path']);if(!existsSync(_0x49c044))continue;const _0x35e155=lstatSync(_0x49c044);if(!_0x35e155[_0x4f3bdd(0x97)]())throw CliErrors[_0x4f3bdd(0x83)](_0x4f3bdd(0x98)+_0x277418,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x39be79[_0x4f3bdd(0x94)]);const _0x15f4f8=bufferSha256(readFileSync(_0x49c044));if(_0x15f4f8!==fileHash(_0x39be79))throw CliErrors[_0x4f3bdd(0x83)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x277418,_0x4f3bdd(0xb4)+_0x39be79[_0x4f3bdd(0x94)]);}}function materializeFiles(_0x5d2ec4,_0x55443e){const _0x5c42e1=a103_0x5204;for(const _0x4dbbde of normalizeLocalFiles(_0x55443e)){const _0x24042e=resolveManagedFilePath(_0x5d2ec4,_0x4dbbde[_0x5c42e1(0x94)]);mkdirSync(dirname(_0x24042e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x24042e,fileContent(_0x4dbbde),0x180);}}function removeStaleManagedFiles(_0x371b1d,_0x3fc794,_0x2c3a99){const _0x2d031c=a103_0x5204;if(!_0x3fc794)return;const _0x5578cf=new Set(normalizeLocalFiles(_0x2c3a99)[_0x2d031c(0x93)](_0x22ef77=>_0x22ef77[_0x2d031c(0x94)]));for(const _0x48330e of Object['keys'](_0x3fc794)){if(_0x5578cf[_0x2d031c(0x92)](_0x48330e))continue;const _0x171968=resolveManagedFilePath(_0x371b1d,_0x48330e);existsSync(_0x171968)&&lstatSync(_0x171968)[_0x2d031c(0x97)]()&&rmSync(_0x171968,{'force':!![]});}}
1
+ (function(_0x546fcc,_0x5ab9a7){const _0x3ec7ac=a102_0x4259,_0x455b06=_0x546fcc();while(!![]){try{const _0x1b54c1=-parseInt(_0x3ec7ac(0x120))/0x1*(parseInt(_0x3ec7ac(0x124))/0x2)+-parseInt(_0x3ec7ac(0x12f))/0x3+parseInt(_0x3ec7ac(0x13f))/0x4+parseInt(_0x3ec7ac(0x119))/0x5*(-parseInt(_0x3ec7ac(0x144))/0x6)+parseInt(_0x3ec7ac(0x110))/0x7*(-parseInt(_0x3ec7ac(0x11e))/0x8)+parseInt(_0x3ec7ac(0x13d))/0x9+-parseInt(_0x3ec7ac(0x143))/0xa*(-parseInt(_0x3ec7ac(0x132))/0xb);if(_0x1b54c1===_0x5ab9a7)break;else _0x455b06['push'](_0x455b06['shift']());}catch(_0x5606d8){_0x455b06['push'](_0x455b06['shift']());}}}(a102_0x278e,0xcd923));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';function a102_0x4259(_0x17db30,_0x1d0c08){_0x17db30=_0x17db30-0x10d;const _0x278eb5=a102_0x278e();let _0x4259d9=_0x278eb5[_0x17db30];return _0x4259d9;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x56cdb2,_0x10b6e1,_0x2c9763){const _0x3e49c3=a102_0x4259,_0x3fd486=requireSkillCode(_0x56cdb2),_0x9e4dbc=requirePackageBytes(_0x3fd486,_0x2c9763['packageBytes']),_0x52902d=extractDownloadedPackage(_0x9e4dbc),_0x46a8b9=_0x52902d[_0x3e49c3(0x122)](_0x2056a1=>_0x2056a1[_0x3e49c3(0x12c)]===SKILL_FILE);if(!_0x46a8b9)throw CliErrors[_0x3e49c3(0x145)](_0x3e49c3(0x141)+SKILL_FILE+':\x20'+_0x3fd486);const _0x4f6fe4=withMaterializedSkillFrontmatter(_0x52902d,_0x56cdb2,_0x3fd486),_0x1c6768=_0x4f6fe4['find'](_0x1f9dda=>_0x1f9dda['path']===SKILL_FILE),_0x1165f9=fileText(_0x1c6768),_0x3185ab=getRuntimeSkillDir(_0x2c9763[_0x3e49c3(0x131)],_0x2c9763['accessKey'],_0x2c9763['appCode'],_0x10b6e1,_0x3fd486,_0x2c9763[_0x3e49c3(0x11a)]),_0x358696=resolve(_0x3185ab,SKILL_FILE),_0x2b75b9=resolve(_0x3185ab,METADATA_FILE),_0x4dcbb6=contentHash(_0x1165f9),_0x428950=readMetadataIfPresent(_0x2b75b9)?.[_0x3e49c3(0x13b)];ensurePulledFilesCanBeOverwritten(_0x3185ab,_0x2b75b9,_0x4f6fe4,_0x2c9763[_0x3e49c3(0x116)]===!![]),mkdirSync(_0x3185ab,{'recursive':!![],'mode':0x1c0});const _0x2acd48=existsSync(_0x358696)?readFileSync(_0x358696,_0x3e49c3(0x123)):undefined;return materializeFiles(_0x3185ab,_0x4f6fe4),removeStaleManagedFiles(_0x3185ab,_0x428950,_0x4f6fe4),writeJsonAtomic(_0x2b75b9,buildMetadata(_0x56cdb2,_0x10b6e1,_0x2c9763['appCode'],_0x4dcbb6,_0x2c9763[_0x3e49c3(0x12e)],_0x4f6fe4,_0x9e4dbc)),{'skill':_0x56cdb2,'scope':_0x10b6e1,'dir':_0x3185ab,'skillMdPath':_0x358696,'metadataPath':_0x2b75b9,'contentHash':_0x4dcbb6,'changed':_0x2acd48!==_0x1165f9};}function withMaterializedSkillFrontmatter(_0xbe62c6,_0xf41bf2,_0x3bb3c1){const _0x11dc4f=a102_0x4259,_0x4a0a27=skillDisplayName(_0xf41bf2,_0x3bb3c1),_0x429f25=_0xf41bf2[_0x11dc4f(0x137)]?.['trim']()||_0x4a0a27||_0x3bb3c1;return normalizeLocalFiles(_0xbe62c6)[_0x11dc4f(0x11d)](_0x2c29f2=>{const _0x3a6e89=_0x11dc4f,_0x4bce68=fileText(_0x2c29f2);if(_0x2c29f2['path']!==SKILL_FILE)return _0x2c29f2;if(hasYamlFrontmatter(_0x4bce68))return{'path':_0x2c29f2[_0x3a6e89(0x12c)],'content':withSyncedDisplayName(_0x4bce68,_0x4a0a27)};return{'path':_0x2c29f2[_0x3a6e89(0x12c)],'content':prependSkillFrontmatter(_0x4bce68,{'name':_0x3bb3c1,'displayName':_0x4a0a27,'description':_0x429f25})};});}function hasYamlFrontmatter(_0x578662){const _0x1343c6=a102_0x4259;return/^\uFEFF?---\s*\r?\n/[_0x1343c6(0x111)](_0x578662);}function prependSkillFrontmatter(_0x225739,_0x175bb1){const _0x1bac8f=a102_0x4259,_0x475276=_0x225739['replace'](/^\uFEFF/,'');return[_0x1bac8f(0x12a),_0x1bac8f(0x13e)+yamlString(_0x175bb1[_0x1bac8f(0x13c)]),_0x175bb1['displayName']?_0x1bac8f(0x139)+yamlString(_0x175bb1[_0x1bac8f(0x126)]):undefined,'description:\x20'+yamlString(_0x175bb1[_0x1bac8f(0x137)]),_0x1bac8f(0x12a),'',_0x475276][_0x1bac8f(0x118)](_0x823f11=>_0x823f11!==undefined)[_0x1bac8f(0x13a)]('\x0a');}function yamlString(_0xd8ffee){const _0x10efb2=a102_0x4259;return JSON['stringify'](_0xd8ffee['replace'](/\r/g,'')[_0x10efb2(0x133)]());}function skillDisplayName(_0x48521b,_0x58477e){const _0x2b9606=a102_0x4259,_0x1901c6=_0x48521b[_0x2b9606(0x134)]?.[_0x2b9606(0x133)]();return _0x1901c6||_0x58477e;}function withSyncedDisplayName(_0x5f5762,_0x44aa9d){const _0x36117d=a102_0x4259,_0x1f3614=_0x5f5762[_0x36117d(0x12d)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1f3614)return _0x5f5762;const _0x564f1b=_0x1f3614[0x1]??'',_0x205c0b=_0x1f3614[0x2]??'',_0x66555c=parseDocument(_0x205c0b);if(_0x66555c[_0x36117d(0x11b)]['length']>0x0||!isMap(_0x66555c[_0x36117d(0x142)]))return _0x5f5762;if(_0x44aa9d)_0x66555c[_0x36117d(0x112)](_0x36117d(0x126),_0x44aa9d);else{if(_0x66555c[_0x36117d(0x11c)]('displayName'))_0x66555c[_0x36117d(0x135)](_0x36117d(0x126));else return _0x5f5762;}forceBlockCollections(_0x66555c[_0x36117d(0x142)]);const _0x286a64=_0x66555c[_0x36117d(0x10e)]({'lineWidth':0x0})[_0x36117d(0x11f)](),_0x143b1b=_0x5f5762[_0x36117d(0x138)](_0x1f3614[0x0]['length'])[_0x36117d(0x113)](/^\r?\n/,'');return _0x564f1b+_0x36117d(0x125)+_0x286a64+_0x36117d(0x114)+_0x143b1b;}function forceBlockCollections(_0x212d47){if(!isNode(_0x212d47))return;visit(_0x212d47,(_0x4b5dbf,_0x4b9778)=>{const _0x264fb8=a102_0x4259;isCollection(_0x4b9778)&&(_0x4b9778[_0x264fb8(0x140)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x39636f,_0x177b8c,_0x272111,_0x59e989){const _0xb31b4=a102_0x4259;if(_0x59e989||!existsSync(_0x177b8c))return;const _0x58868f=readMetadataIfPresent(_0x177b8c);if(!_0x58868f)return;const _0x31b056=_0x58868f[_0xb31b4(0x13b)]&&Object[_0xb31b4(0x10f)](_0x58868f[_0xb31b4(0x13b)])['length']>0x0?_0x58868f['fileHashes']:undefined;if(_0x31b056)for(const [_0x281677,_0x307c8e]of Object['entries'](_0x31b056)){const _0xc5e20f=resolveManagedFilePath(_0x39636f,_0x281677);if(!existsSync(_0xc5e20f))throw CliErrors['validation'](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x136)+_0x281677);const _0x3f6788=lstatSync(_0xc5e20f);if(!_0x3f6788[_0xb31b4(0x115)]())throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x130)+_0x281677);const _0x12d873=bufferSha256(readFileSync(_0xc5e20f));if(_0x12d873!==_0x307c8e)throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f+_0xb31b4(0x128)+_0x281677,_0xb31b4(0x117)+_0x281677);}else{const _0x5c9bb4=resolve(_0x39636f,SKILL_FILE);if(existsSync(_0x5c9bb4)&&_0x58868f['contentHash']){const _0x87e09e=contentHash(readFileSync(_0x5c9bb4,_0xb31b4(0x123)));if(_0x87e09e!==_0x58868f[_0xb31b4(0x127)])throw CliErrors[_0xb31b4(0x145)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5c9bb4,_0xb31b4(0x12b));}}for(const _0x42cb4e of normalizeLocalFiles(_0x272111)){if(_0x31b056?.[_0x42cb4e[_0xb31b4(0x12c)]])continue;if(!_0x31b056&&_0x42cb4e['path']===SKILL_FILE)continue;const _0x220f89=resolveManagedFilePath(_0x39636f,_0x42cb4e['path']);if(!existsSync(_0x220f89))continue;const _0x2b223b=lstatSync(_0x220f89);if(!_0x2b223b[_0xb31b4(0x115)]())throw CliErrors['validation'](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x129)+_0x42cb4e[_0xb31b4(0x12c)]);const _0x52a8f8=bufferSha256(readFileSync(_0x220f89));if(_0x52a8f8!==fileHash(_0x42cb4e))throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x10d)+_0x42cb4e[_0xb31b4(0x12c)]);}}function materializeFiles(_0x281c25,_0x3cb135){const _0x30f427=a102_0x4259;for(const _0x519f51 of normalizeLocalFiles(_0x3cb135)){const _0x3b5df3=resolveManagedFilePath(_0x281c25,_0x519f51[_0x30f427(0x12c)]);mkdirSync(dirname(_0x3b5df3),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3b5df3,fileContent(_0x519f51),0x180);}}function a102_0x278e(){const _0x1df5c7=['24984VrIjCm','trimEnd','445UhTsOz','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','find','utf8','6756ANElEk','---\x0a','displayName','contentHash','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','path','match','pulledAt','4134813HsxcJE','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','env','11TRkfiw','trim','skillName','delete','Managed\x20file\x20was\x20removed\x20locally:\x20','description','slice','displayName:\x20','join','fileHashes','name','13795830WzJhjH','name:\x20','973668UTQJvA','flow','Runtime\x20Skill\x20package\x20is\x20missing\x20','contents','27743890ELISgO','6tyvyUl','validation','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','toString','keys','287IfeZLZ','test','set','replace','\x0a---\x0a\x0a','isFile','force','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','filter','3495665ULPrJY','paths','errors','has','map'];a102_0x278e=function(){return _0x1df5c7;};return a102_0x278e();}function removeStaleManagedFiles(_0x265a63,_0xc50eb3,_0x16d1b0){const _0xf5ce2=a102_0x4259;if(!_0xc50eb3)return;const _0x30337b=new Set(normalizeLocalFiles(_0x16d1b0)[_0xf5ce2(0x11d)](_0x5ad167=>_0x5ad167[_0xf5ce2(0x12c)]));for(const _0x2cfc72 of Object[_0xf5ce2(0x10f)](_0xc50eb3)){if(_0x30337b[_0xf5ce2(0x11c)](_0x2cfc72))continue;const _0x24e6e7=resolveManagedFilePath(_0x265a63,_0x2cfc72);existsSync(_0x24e6e7)&&lstatSync(_0x24e6e7)['isFile']()&&rmSync(_0x24e6e7,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x4b408a,_0x4f4f5e){const _0x97045c=a104_0x18e3,_0x32850f=_0x4b408a();while(!![]){try{const _0x37486a=-parseInt(_0x97045c(0x161))/0x1+parseInt(_0x97045c(0x156))/0x2+parseInt(_0x97045c(0x163))/0x3+parseInt(_0x97045c(0x151))/0x4+-parseInt(_0x97045c(0x15e))/0x5*(parseInt(_0x97045c(0x159))/0x6)+-parseInt(_0x97045c(0x146))/0x7*(-parseInt(_0x97045c(0x160))/0x8)+-parseInt(_0x97045c(0x14d))/0x9;if(_0x37486a===_0x4f4f5e)break;else _0x32850f['push'](_0x32850f['shift']());}catch(_0x4e6f11){_0x32850f['push'](_0x32850f['shift']());}}}(a104_0x6f93,0x89eea));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(_0x4f3475,_0xf1e7bf,_0x412827,_0x3094f4,_0x2c6989,_0x515508,_0x1d04f9){const _0x49d0d2=a104_0x18e3,_0x592bc6=_0x515508?normalizeLocalFiles(_0x515508):[],_0x4f9fbe=!_0x1d04f9&&_0x592bc6[_0x49d0d2(0x15b)]>0x0?buildSkillPackage(_0x592bc6):undefined,_0x8373d0=_0x1d04f9?bufferSha256(_0x1d04f9):_0x4f9fbe?.[_0x49d0d2(0x147)]['zipSha256'],_0x255543=_0x1d04f9?.[_0x49d0d2(0x15b)]??_0x4f9fbe?.[_0x49d0d2(0x147)][_0x49d0d2(0x152)],_0x87c7=_0x592bc6['length']>0x0?Object[_0x49d0d2(0x164)](_0x592bc6[_0x49d0d2(0x150)](_0x3cedb5=>[_0x3cedb5[_0x49d0d2(0x14f)],fileHash(_0x3cedb5)])):undefined;return{'schemaVersion':_0x592bc6[_0x49d0d2(0x15b)]>0x0?0x2:0x1,'id':_0x4f3475['id'],'appCode':_0x412827,'skillCode':requireSkillCode(_0x4f3475),'skillName':_0x4f3475[_0x49d0d2(0x15d)],'description':_0x4f3475[_0x49d0d2(0x153)],'scope':_0xf1e7bf,'readonly':_0xf1e7bf!==_0x49d0d2(0x165)||_0x4f3475[_0x49d0d2(0x14e)]===!![],'tenantCode':_0x4f3475[_0x49d0d2(0x149)],'userId':_0x4f3475[_0x49d0d2(0x15a)],'version':_0x4f3475['version'],'status':_0x4f3475[_0x49d0d2(0x162)],'tags':Array[_0x49d0d2(0x148)](_0x4f3475['tags'])?_0x4f3475[_0x49d0d2(0x14b)]:[],'hasUpstreamUpdate':_0x4f3475[_0x49d0d2(0x14c)],'forkedFromSkillId':_0x4f3475[_0x49d0d2(0x168)],'forkedFromVersion':_0x4f3475[_0x49d0d2(0x155)],'sourceSessionId':_0x4f3475[_0x49d0d2(0x15c)],'contentHash':_0x3094f4,'fileHashes':_0x87c7,'treeHash':_0x592bc6[_0x49d0d2(0x15b)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x592bc6)):undefined,'ossPath':remoteManifestOssPath(_0x4f3475[_0x49d0d2(0x167)]),'zipSha256':_0x8373d0,'zipSize':_0x255543,'files':_0x592bc6['length']>0x0?_0x592bc6[_0x49d0d2(0x150)](_0xd362a1=>({'path':_0xd362a1[_0x49d0d2(0x14f)],'hash':fileHash(_0xd362a1),'size':fileContent(_0xd362a1)[_0x49d0d2(0x15b)]})):undefined,'pulledAt':_0x2c6989??new Date()[_0x49d0d2(0x169)]()};}export function requireSkillCode(_0x569daa){const _0x56dcc2=a104_0x18e3,_0xc10dc0=_0x569daa[_0x56dcc2(0x15f)]?.[_0x56dcc2(0x14a)]();if(!_0xc10dc0)throw CliErrors[_0x56dcc2(0x157)](_0x56dcc2(0x16a));return _0xc10dc0;}export function readMetadataIfPresent(_0x57d608){const _0x48e6aa=a104_0x18e3;if(!existsSync(_0x57d608))return undefined;try{const _0x307da1=JSON[_0x48e6aa(0x166)](readFileSync(_0x57d608,'utf8'));return _0x307da1;}catch{throw CliErrors[_0x48e6aa(0x157)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x57d608);}}function a104_0x6f93(){const _0xc7e7eb=['map','2296244HAWGgF','zipSize','description','ossPath','forkedFromVersion','1887944uyNaID','validation','object','6POOQxk','userId','length','sourceSessionId','skillName','2451845TyZfrz','skillCode','3477320lvjheR','310310ThmiFU','status','756129MqfHiH','fromEntries','personal','parse','files','forkedFromSkillId','toISOString','Runtime\x20Skill\x20is\x20missing\x20skillCode.','string','7fuYoMY','manifest','isArray','tenantCode','trim','tags','hasUpstreamUpdate','7551828dBuGdE','readonly','path'];a104_0x6f93=function(){return _0xc7e7eb;};return a104_0x6f93();}function a104_0x18e3(_0x173f00,_0x4e94d3){_0x173f00=_0x173f00-0x146;const _0x6f93a3=a104_0x6f93();let _0x18e383=_0x6f93a3[_0x173f00];return _0x18e383;}function remoteManifestOssPath(_0x59ca06){const _0x320069=a104_0x18e3;if(!_0x59ca06||typeof _0x59ca06!==_0x320069(0x158)||Array['isArray'](_0x59ca06))return undefined;const _0x2d958b=_0x59ca06[_0x320069(0x154)];return typeof _0x2d958b===_0x320069(0x16b)&&_0x2d958b['trim']()?_0x2d958b[_0x320069(0x14a)]():undefined;}
1
+ (function(_0x216403,_0x3a4602){const _0x1f7bd7=a103_0x1069,_0x3f6c4d=_0x216403();while(!![]){try{const _0x67fc6f=-parseInt(_0x1f7bd7(0x113))/0x1*(parseInt(_0x1f7bd7(0x101))/0x2)+parseInt(_0x1f7bd7(0x112))/0x3+-parseInt(_0x1f7bd7(0x10c))/0x4*(-parseInt(_0x1f7bd7(0x11a))/0x5)+parseInt(_0x1f7bd7(0x110))/0x6*(parseInt(_0x1f7bd7(0x102))/0x7)+-parseInt(_0x1f7bd7(0x11e))/0x8+-parseInt(_0x1f7bd7(0x119))/0x9*(parseInt(_0x1f7bd7(0x11c))/0xa)+parseInt(_0x1f7bd7(0x111))/0xb;if(_0x67fc6f===_0x3a4602)break;else _0x3f6c4d['push'](_0x3f6c4d['shift']());}catch(_0x951fe1){_0x3f6c4d['push'](_0x3f6c4d['shift']());}}}(a103_0x4b77,0xf30d8));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';function a103_0x4b77(){const _0x57008d=['Runtime\x20Skill\x20is\x20missing\x20skillCode.','personal','8128xOcKWh','4310572kxgVjO','toISOString','trim','ossPath','sourceSessionId','path','files','status','map','zipSha256','4iHLcZh','tenantCode','manifest','skillName','12tSOCjK','3270971vmOCPN','1769646YnCBPe','337bRSKTd','Invalid\x20','description','skillCode','hasUpstreamUpdate','parse','93186dhwymU','8231950YIYYuN','isArray','970eaChpE','length','3166200UovNYL','zipSize','string','readonly','tags','object'];a103_0x4b77=function(){return _0x57008d;};return a103_0x4b77();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3c6d26,_0x4885a6,_0x4d906a,_0x3fe569,_0x587839,_0x26453e,_0xbb9ae7){const _0x45d1bf=a103_0x1069,_0x433e9f=_0x26453e?normalizeLocalFiles(_0x26453e):[],_0x112f2a=!_0xbb9ae7&&_0x433e9f[_0x45d1bf(0x11d)]>0x0?buildSkillPackage(_0x433e9f):undefined,_0x5c2bb8=_0xbb9ae7?bufferSha256(_0xbb9ae7):_0x112f2a?.[_0x45d1bf(0x10e)][_0x45d1bf(0x10b)],_0x151bb8=_0xbb9ae7?.[_0x45d1bf(0x11d)]??_0x112f2a?.[_0x45d1bf(0x10e)][_0x45d1bf(0x11f)],_0x144713=_0x433e9f[_0x45d1bf(0x11d)]>0x0?Object['fromEntries'](_0x433e9f['map'](_0x29707d=>[_0x29707d[_0x45d1bf(0x107)],fileHash(_0x29707d)])):undefined;return{'schemaVersion':_0x433e9f[_0x45d1bf(0x11d)]>0x0?0x2:0x1,'id':_0x3c6d26['id'],'appCode':_0x4d906a,'skillCode':requireSkillCode(_0x3c6d26),'skillName':_0x3c6d26[_0x45d1bf(0x10f)],'description':_0x3c6d26[_0x45d1bf(0x115)],'scope':_0x4885a6,'readonly':_0x4885a6!==_0x45d1bf(0x100)||_0x3c6d26[_0x45d1bf(0x121)]===!![],'tenantCode':_0x3c6d26[_0x45d1bf(0x10d)],'userId':_0x3c6d26['userId'],'version':_0x3c6d26['version'],'status':_0x3c6d26[_0x45d1bf(0x109)],'tags':Array[_0x45d1bf(0x11b)](_0x3c6d26['tags'])?_0x3c6d26[_0x45d1bf(0xfd)]:[],'hasUpstreamUpdate':_0x3c6d26[_0x45d1bf(0x117)],'forkedFromSkillId':_0x3c6d26['forkedFromSkillId'],'forkedFromVersion':_0x3c6d26['forkedFromVersion'],'sourceSessionId':_0x3c6d26[_0x45d1bf(0x106)],'contentHash':_0x3fe569,'fileHashes':_0x144713,'treeHash':_0x433e9f[_0x45d1bf(0x11d)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x433e9f)):undefined,'ossPath':remoteManifestOssPath(_0x3c6d26[_0x45d1bf(0x108)]),'zipSha256':_0x5c2bb8,'zipSize':_0x151bb8,'files':_0x433e9f[_0x45d1bf(0x11d)]>0x0?_0x433e9f[_0x45d1bf(0x10a)](_0x8275e=>({'path':_0x8275e['path'],'hash':fileHash(_0x8275e),'size':fileContent(_0x8275e)['length']})):undefined,'pulledAt':_0x587839??new Date()[_0x45d1bf(0x103)]()};}function a103_0x1069(_0x51eecc,_0xccf4f){_0x51eecc=_0x51eecc-0xfd;const _0x4b771c=a103_0x4b77();let _0x106976=_0x4b771c[_0x51eecc];return _0x106976;}export function requireSkillCode(_0x51d6cc){const _0x184c80=a103_0x1069,_0x1cca42=_0x51d6cc[_0x184c80(0x116)]?.[_0x184c80(0x104)]();if(!_0x1cca42)throw CliErrors['validation'](_0x184c80(0xff));return _0x1cca42;}export function readMetadataIfPresent(_0x47d0c7){const _0x3972d2=a103_0x1069;if(!existsSync(_0x47d0c7))return undefined;try{const _0x5c3b07=JSON[_0x3972d2(0x118)](readFileSync(_0x47d0c7,'utf8'));return _0x5c3b07;}catch{throw CliErrors['validation'](_0x3972d2(0x114)+METADATA_FILE+':\x20'+_0x47d0c7);}}function remoteManifestOssPath(_0xfc8d6e){const _0x318a7e=a103_0x1069;if(!_0xfc8d6e||typeof _0xfc8d6e!==_0x318a7e(0xfe)||Array['isArray'](_0xfc8d6e))return undefined;const _0x466b39=_0xfc8d6e[_0x318a7e(0x105)];return typeof _0x466b39===_0x318a7e(0x120)&&_0x466b39['trim']()?_0x466b39['trim']():undefined;}