@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) 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/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -0
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/response.js +1 -1
  90. package/lib/framework/runner-confirmation.js +1 -1
  91. package/lib/framework/runner-error.js +1 -1
  92. package/lib/framework/runner.js +1 -1
  93. package/lib/framework/schema-export.js +1 -1
  94. package/lib/framework/service-order.js +1 -1
  95. package/lib/framework/types.js +1 -1
  96. package/lib/generated/build-info.js +1 -1
  97. package/lib/help.js +1 -1
  98. package/lib/skills/npx-skills-add.js +1 -1
  99. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  100. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  101. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  102. package/lib/skills/runtime-skill-sync/links.js +1 -1
  103. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  104. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  105. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  106. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  107. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  108. package/lib/skills/runtime-skill-sync/push.js +1 -1
  109. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  111. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  112. package/lib/skills/runtime-skill-sync.js +1 -1
  113. package/lib/utils/apply-jq-filter.js +1 -1
  114. package/lib/utils/logger.js +1 -1
  115. package/lib/utils/lossless-json.js +1 -1
  116. package/lib/utils/params.js +1 -1
  117. package/lib/utils/platform.js +1 -1
  118. package/lib/utils/update-notice.js +1 -1
  119. package/lib/utils/version.js +1 -1
  120. package/lib/utils/write-cli-side-channel.js +1 -1
  121. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1bf929,_0x3b03d8){const _0x3d04f9=a89_0x3043,_0x4afc16=_0x1bf929();while(!![]){try{const _0x15d056=parseInt(_0x3d04f9(0xad))/0x1*(-parseInt(_0x3d04f9(0xae))/0x2)+-parseInt(_0x3d04f9(0xa7))/0x3*(parseInt(_0x3d04f9(0xa9))/0x4)+parseInt(_0x3d04f9(0xa8))/0x5+parseInt(_0x3d04f9(0xab))/0x6*(-parseInt(_0x3d04f9(0xa5))/0x7)+-parseInt(_0x3d04f9(0xa6))/0x8+parseInt(_0x3d04f9(0xb1))/0x9*(parseInt(_0x3d04f9(0xb3))/0xa)+-parseInt(_0x3d04f9(0xac))/0xb*(-parseInt(_0x3d04f9(0xa3))/0xc);if(_0x15d056===_0x3b03d8)break;else _0x4afc16['push'](_0x4afc16['shift']());}catch(_0x254075){_0x4afc16['push'](_0x4afc16['shift']());}}}(a89_0xd649,0x5dee7));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';function a89_0x3043(_0x429d88,_0x57702e){_0x429d88=_0x429d88-0xa3;const _0xd6492b=a89_0xd649();let _0x304320=_0xd6492b[_0x429d88];return _0x304320;}import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x3edaa7){const _0x2850b0=a89_0x3043;if(_0x3edaa7 instanceof LovrabetError){const _0x3ba742=userFacingLovrabetMessage(_0x3edaa7),_0x53d2ca=_0x3edaa7,_0x179cf0=createRateLimitError({'status':_0x53d2ca[_0x2850b0(0xa4)],'errorCode':_0x53d2ca[_0x2850b0(0xb0)],'message':_0x3ba742,'retryAfter':readRetryAfter(_0x53d2ca[_0x2850b0(0xb2)]?.[_0x2850b0(0xb6)])??readRetryAfterSeconds(_0x53d2ca['response'])});return _0x179cf0??CliErrors[_0x2850b0(0xb4)](_0x3ba742);}return _0x3edaa7;}function a89_0xd649(){const _0x3f9f52=['status','12061DAoYdJ','1081544EPGOhW','3333XIXOIv','3427590zoLsKD','1644KmIhXi','description','2076gnoEZB','6480815rKOECq','40tvRimZ','6236dPNkrI','message','code','792OErQBu','response','48040PUEJUn','validation','string','headers','12gxKMkR'];a89_0xd649=function(){return _0x3f9f52;};return a89_0xd649();}function userFacingLovrabetMessage(_0x513fd1){const _0x5d321b=a89_0x3043,_0x160801=_0x513fd1[_0x5d321b(0xaa)];if(_0x160801!==undefined&&_0x160801!==null){if(typeof _0x160801===_0x5d321b(0xb5)&&_0x160801['trim']())return _0x160801['trim']();try{return JSON['stringify'](_0x160801);}catch{}}return _0x513fd1[_0x5d321b(0xaf)];}
1
+ (function(_0xcea7da,_0x52a5c6){const _0x8fd658=a90_0x4bd3,_0x30beea=_0xcea7da();while(!![]){try{const _0x7a1a3a=parseInt(_0x8fd658(0xef))/0x1*(parseInt(_0x8fd658(0xe5))/0x2)+parseInt(_0x8fd658(0xe9))/0x3*(parseInt(_0x8fd658(0xeb))/0x4)+parseInt(_0x8fd658(0xf3))/0x5*(parseInt(_0x8fd658(0xee))/0x6)+-parseInt(_0x8fd658(0xea))/0x7*(-parseInt(_0x8fd658(0xf8))/0x8)+parseInt(_0x8fd658(0xec))/0x9+-parseInt(_0x8fd658(0xe7))/0xa+-parseInt(_0x8fd658(0xf5))/0xb*(parseInt(_0x8fd658(0xe8))/0xc);if(_0x7a1a3a===_0x52a5c6)break;else _0x30beea['push'](_0x30beea['shift']());}catch(_0x363d5b){_0x30beea['push'](_0x30beea['shift']());}}}(a90_0x258b,0xeafc7));function a90_0x4bd3(_0x2d7acb,_0x1aacbe){_0x2d7acb=_0x2d7acb-0xe5;const _0x258bda=a90_0x258b();let _0x4bd34=_0x258bda[_0x2d7acb];return _0x4bd34;}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x7cc4b4){const _0x115f71=a90_0x4bd3;if(_0x7cc4b4 instanceof LovrabetError){const _0x4da3f8=userFacingLovrabetMessage(_0x7cc4b4),_0x2925c4=_0x7cc4b4,_0x128db3=createRateLimitError({'status':_0x2925c4['status'],'errorCode':_0x2925c4[_0x115f71(0xf4)],'message':_0x4da3f8,'retryAfter':readRetryAfter(_0x2925c4[_0x115f71(0xf1)]?.['headers'])??readRetryAfterSeconds(_0x2925c4[_0x115f71(0xf1)])});return _0x128db3??CliErrors[_0x115f71(0xed)](_0x4da3f8);}return _0x7cc4b4;}function a90_0x258b(){const _0x41754f=['validation','10703766slznIl','55eHknqm','message','response','description','5uZSpQG','code','9460DySfdP','string','trim','34664FpvKID','66914qVHwCS','stringify','10154500wEflOW','63636ynjJrA','654ERswRi','1463rBgsFl','11212AYbJLl','12580074gQrwjx'];a90_0x258b=function(){return _0x41754f;};return a90_0x258b();}function userFacingLovrabetMessage(_0x5f01af){const _0x455fcf=a90_0x4bd3,_0x4d3259=_0x5f01af[_0x455fcf(0xf2)];if(_0x4d3259!==undefined&&_0x4d3259!==null){if(typeof _0x4d3259===_0x455fcf(0xf6)&&_0x4d3259['trim']())return _0x4d3259[_0x455fcf(0xf7)]();try{return JSON[_0x455fcf(0xe6)](_0x4d3259);}catch{}}return _0x5f01af[_0x455fcf(0xf0)];}
@@ -1 +1 @@
1
- const a90_0x3e0f78=a90_0xf023;(function(_0x31554d,_0x5a8b55){const _0x396237=a90_0xf023,_0x15fe23=_0x31554d();while(!![]){try{const _0x5eb778=parseInt(_0x396237(0x117))/0x1*(parseInt(_0x396237(0xf6))/0x2)+parseInt(_0x396237(0xf8))/0x3+parseInt(_0x396237(0x102))/0x4*(parseInt(_0x396237(0x10a))/0x5)+-parseInt(_0x396237(0x104))/0x6+-parseInt(_0x396237(0x107))/0x7+-parseInt(_0x396237(0x122))/0x8+-parseInt(_0x396237(0x12d))/0x9;if(_0x5eb778===_0x5a8b55)break;else _0x15fe23['push'](_0x15fe23['shift']());}catch(_0x499f19){_0x15fe23['push'](_0x15fe23['shift']());}}}(a90_0x3aee,0x4208f));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';function a90_0x3aee(){const _0x2781a2=['authRequired','APPCODE','string','catch','ACCESS_KEY','642eMlHBO','format','887856dDDAuE','accessKey','configMissing','appCode','newConfigFileName','_notice','env','object','service','has','32516cyyMrI','riskLevel','766266UjuyEQ','defaultApp','ClientAk','2464644KkaScZ','requiresAppCode','production','225lGvXQm','\x20or\x20pass\x20','command','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','.appcode\x20to\x20','execute','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../core/sdk-client.js','items','apiDomain','nonInteractive','error','defaultVerbose','577oZSmIq','name','defaultPageSize','app','validation','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','currentApp','filter','appcode\x20\x22','appcode','verbose','456144uvJEeU','cancelled','Run\x20`','../commands/app/remote-source.js','pageSize','appCodeSource','trim','resolve','schema','\x20\x20To\x20proceed:\x20','isNonInteractive','357066MtHUXC','Unknown\x20app:\x20','mergedCli','../core/api-client.js','rawFlags','requiresAuth','local-alias','pretty'];a90_0x3aee=function(){return _0x2781a2;};return a90_0x3aee();}import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x52e3df){const _0x2e14b6=a90_0xf023;return void _0x52e3df,AUTH_MODE[_0x2e14b6(0x106)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x5d8ddd,_0x5d3563){const _0x3fa880=a90_0xf023,_0x5a92bf=typeof _0x5d3563[_0x3fa880(0x11a)]==='string'&&_0x5d3563[_0x3fa880(0x11a)][_0x3fa880(0x128)]();return{'rawFlags':_0x5d3563,'appCode':_0x5d8ddd[_0x3fa880(0xfb)]||productEnv(_0x3fa880(0xf2))||(_0x5a92bf?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5d8ddd[_0x3fa880(0x127)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5d3563),'defaultFormat':_0x5d8ddd['format'],'defaultPageSize':_0x5d8ddd[_0x3fa880(0x126)],'defaultVerbose':_0x5d8ddd[_0x3fa880(0x121)],'riskLevel':_0x5d8ddd[_0x3fa880(0x103)],'accessKey':_0x5d8ddd[_0x3fa880(0xf9)],'env':_0x5d8ddd[_0x3fa880(0xfe)],'mergedCli':{'defaultApp':_0x5d8ddd['defaultApp'],'currentApp':_0x5d8ddd[_0x3fa880(0x11d)],'appCode':_0x5d8ddd[_0x3fa880(0xfb)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x3e0f78(0x11e)](_0x4c0e7a=>PIPELINE_FLAG_NAMES[a90_0x3e0f78(0x101)](_0x4c0e7a[a90_0x3e0f78(0x118)]))['map'](({name:_0x15206f,type:_0x1a3923,description:_0x165fd1})=>({'name':_0x15206f,'type':_0x1a3923,'description':_0x165fd1})),'formatOutput':formatOutput,'getCommandLabel'(_0x3fba3f){const _0xbceb04=a90_0x3e0f78;return CLI_BIN_NAME+'\x20'+_0x3fba3f[_0xbceb04(0x100)]+'\x20'+_0x3fba3f[_0xbceb04(0x10c)];},'riskPolicy':{'onViolation'(_0xf54dbc){const _0x35bc7b=a90_0x3e0f78;console[_0x35bc7b(0x115)](_0xf54dbc);},'createError'(_0x1deaea){const _0x54835d=a90_0x3e0f78;return CliErrors[_0x54835d(0x123)](_0x1deaea);}},async 'prepare'(_0x3ed928,_0x51aafd){const _0x28b6a9=a90_0x3e0f78,_0x553ce4=resolveAuthMode(_0x51aafd);if(_0x3ed928[_0x28b6a9(0xee)]!==![]){if(!_0x51aafd[_0x28b6a9(0xf9)])throw CliErrors[_0x28b6a9(0xf1)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x28b6a9(0xfc)]+_0x28b6a9(0x10b)+productEnvName(_0x28b6a9(0xf5))+'.');const {setActiveAK:_0x9f89b8}=await import(_0x28b6a9(0x130));_0x9f89b8(_0x51aafd['accessKey']);}let _0x2ae7ee='';if(_0x3ed928['requiresAppCode']!==![]){_0x2ae7ee=_0x51aafd[_0x28b6a9(0xfb)]??'',_0x2ae7ee=await resolveExplicitAppName(_0x3ed928,_0x51aafd,_0x2ae7ee);if(!_0x2ae7ee){await assertSelectedAppNameIsRuntimeAccessible(_0x3ed928,_0x51aafd);throw CliErrors[_0x28b6a9(0xfa)](_0x28b6a9(0x10d)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x3ed928,_0x51aafd,_0x2ae7ee);}if(_0x2ae7ee){const {initSdkClient:_0x384ffa}=await import(_0x28b6a9(0x111));_0x384ffa({'appCode':_0x2ae7ee,'env':_0x51aafd['env']??_0x28b6a9(0x109),'accessKey':_0x51aafd[_0x28b6a9(0xf9)],'authMode':_0x553ce4}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x51aafd[_0x28b6a9(0x116)]},'numbers':{'pagesize':_0x51aafd[_0x28b6a9(0x119)]}},'extras':{'appCode':_0x2ae7ee,'cookie':'','apiDomain':_0x51aafd[_0x28b6a9(0x113)],'apiDir':'','accessKey':_0x51aafd[_0x28b6a9(0xf9)],'envName':_0x51aafd[_0x28b6a9(0xfe)],'mergedCli':_0x51aafd[_0x28b6a9(0x12f)]}};},async 'confirmHighRisk'({def:_0x502e08,env:_0x4db959,flags:_0x4d7034,commandLabel:_0x16dd33}){const _0x2230f5=a90_0x3e0f78;if(_0x4db959[_0x2230f5(0x12c)]){const _0x535846=reconstructCommandArgv(_0x502e08,_0x4d7034);throw CliErrors[_0x2230f5(0x11b)]('High-risk\x20operation\x20`'+_0x16dd33+_0x2230f5(0x11c)+(_0x2230f5(0x12b)+_0x535846));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x502e08,_0x16dd33,_0x4d7034),'createCancelledError':_0x53d190=>CliErrors[_0x2230f5(0x123)](_0x53d190)});},'mapDryRunError'(_0x55ed22){return mapUserFacingExecuteError(_0x55ed22);},'mapExecuteError'(_0x2e05d4){return mapUserFacingExecuteError(_0x2e05d4);},async 'finalize'(){const _0x11e9e0=a90_0x3e0f78;try{if(sdkClientInitialized){const {clearSdkClient:_0x3a6fa7}=await import(_0x11e9e0(0x111));_0x3a6fa7();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x1ba8ea}=await import(_0x11e9e0(0x130));_0x1ba8ea();}}};async function resolveExplicitAppName(_0x50ae5e,_0x2e7a56,_0xd28069){const _0x385970=a90_0x3e0f78;if(_0x50ae5e[_0x385970(0x108)]===![])return _0xd28069;const _0x3eb3d9=typeof _0x2e7a56['rawFlags'][_0x385970(0x11a)]===_0x385970(0xf3)?_0x2e7a56['rawFlags'][_0x385970(0x11a)][_0x385970(0x128)]():'';if(!_0x3eb3d9)return _0xd28069;const _0x9081b2=typeof _0x2e7a56[_0x385970(0xed)]['appcode']==='string'&&_0x2e7a56[_0x385970(0xed)][_0x385970(0x120)][_0x385970(0x128)]()||productEnv('APPCODE');if(_0x9081b2||_0x2e7a56[_0x385970(0x127)]===_0x385970(0xef))return _0xd28069;const {getRemoteAppList:_0x49a3ff}=await import(_0x385970(0x125)),_0x152850=await _0x49a3ff({'env':_0x2e7a56[_0x385970(0xfe)]??_0x385970(0x109),'accessKey':_0x2e7a56['accessKey']}),_0x3457e8=findAppByName(_0x152850[_0x385970(0x112)],_0x3eb3d9);if(_0x3457e8&&!isRuntimeAccessibleApp(_0x3457e8))throw runtimeInaccessibleAppError(_0x3457e8,'\x22'+_0x3eb3d9+'\x22');const _0x3aa614=_0x3457e8?.[_0x385970(0xfb)]?.[_0x385970(0x128)]();if(_0x3aa614)return _0x3aa614;throw CliErrors['validation'](_0x385970(0x12e)+_0x3eb3d9,_0x385970(0x124)+CLI_BIN_NAME+_0x385970(0x110)+_0x3eb3d9+_0x385970(0x10e)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x3c9da9,_0x3efd6d){const _0x3c8f42=a90_0x3e0f78;if(_0x3c9da9[_0x3c8f42(0x108)]===![]||!_0x3efd6d[_0x3c8f42(0xf9)])return;const _0x1b6534=(typeof _0x3efd6d[_0x3c8f42(0xed)][_0x3c8f42(0x11a)]===_0x3c8f42(0xf3)&&_0x3efd6d['rawFlags'][_0x3c8f42(0x11a)][_0x3c8f42(0x128)]()?_0x3efd6d[_0x3c8f42(0xed)][_0x3c8f42(0x11a)]:_0x3efd6d[_0x3c8f42(0x12f)]?.[_0x3c8f42(0x11d)]??_0x3efd6d[_0x3c8f42(0x12f)]?.[_0x3c8f42(0x105)])?.[_0x3c8f42(0x128)]();if(!_0x1b6534)return;const {getRemoteAppList:_0x3dad84}=await import(_0x3c8f42(0x125)),_0x1c33c3=await _0x3dad84({'env':_0x3efd6d[_0x3c8f42(0xfe)]??_0x3c8f42(0x109),'accessKey':_0x3efd6d['accessKey']}),_0x31007d=findAppByName(_0x1c33c3[_0x3c8f42(0x112)],_0x1b6534);if(_0x31007d&&!isRuntimeAccessibleApp(_0x31007d))throw runtimeInaccessibleAppError(_0x31007d,'\x22'+_0x1b6534+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xa6b102,_0x2add3a,_0x5ec1f2){const _0x37772d=a90_0x3e0f78;if(_0xa6b102[_0x37772d(0x108)]===![]||!_0x2add3a['accessKey'])return;const {getRemoteAppList:_0x444496}=await import('../commands/app/remote-source.js'),_0x3e95b5=await _0x444496({'env':_0x2add3a[_0x37772d(0xfe)]??_0x37772d(0x109),'accessKey':_0x2add3a[_0x37772d(0xf9)]}),_0x1ac01b=findAppByCode(_0x3e95b5[_0x37772d(0x112)],_0x5ec1f2);if(_0x1ac01b&&!isRuntimeAccessibleApp(_0x1ac01b))throw runtimeInaccessibleAppError(_0x1ac01b,_0x37772d(0x11f)+_0x5ec1f2+'\x22');}export async function runCommand(_0x15a070,_0x1f4386){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x15a070)?withUpdateNotice(_0x15a070):_0x15a070,_0x1f4386,runnerAdapter);}function shouldAttachUpdateNotice(_0x4486e2){const _0x209507=a90_0x3e0f78;return!['update',_0x209507(0x12a),'doctor']['includes'](_0x4486e2[_0x209507(0x100)]);}function a90_0xf023(_0x5ee44c,_0x17177b){_0x5ee44c=_0x5ee44c-0xed;const _0x3aeea1=a90_0x3aee();let _0xf02399=_0x3aeea1[_0x5ee44c];return _0xf02399;}function withUpdateNotice(_0x5570d5){return{..._0x5570d5,async 'execute'(_0xca3160){const _0x16291b=a90_0xf023,_0x39ecb2=shouldResolveUpdateNotice(_0xca3160)?resolveLatestUpdateNotice()[_0x16291b(0xf4)](()=>null):Promise[_0x16291b(0x129)](null),_0x48d118=await _0x5570d5[_0x16291b(0x10f)](_0xca3160);return attachUpdateNotice(_0x48d118,await _0x39ecb2);}};}function shouldResolveUpdateNotice(_0x470122){const _0x26ab0b=a90_0x3e0f78;return _0x470122[_0x26ab0b(0xf7)]===_0x26ab0b(0xf0)&&!_0x470122[_0x26ab0b(0x114)];}function attachUpdateNotice(_0x228ac7,_0x2840ad){const _0x3c5e41=a90_0x3e0f78;if(!_0x2840ad||!_0x228ac7||typeof _0x228ac7!==_0x3c5e41(0xff))return _0x228ac7;const _0x2883d0=_0x228ac7,_0x213b20=typeof _0x2883d0[_0x3c5e41(0xfd)]===_0x3c5e41(0xff)&&_0x2883d0['_notice']!==null?_0x2883d0[_0x3c5e41(0xfd)]:{};return{..._0x2883d0,'_notice':{..._0x213b20,'update':_0x2840ad}};}
1
+ const a91_0x55155e=a91_0xe260;(function(_0x1a2342,_0x199a3e){const _0x43d584=a91_0xe260,_0x1f70d2=_0x1a2342();while(!![]){try{const _0xcd9633=parseInt(_0x43d584(0x223))/0x1*(-parseInt(_0x43d584(0x22c))/0x2)+-parseInt(_0x43d584(0x205))/0x3+parseInt(_0x43d584(0x20c))/0x4*(parseInt(_0x43d584(0x229))/0x5)+parseInt(_0x43d584(0x21e))/0x6+-parseInt(_0x43d584(0x208))/0x7*(-parseInt(_0x43d584(0x1f5))/0x8)+-parseInt(_0x43d584(0x1fe))/0x9+-parseInt(_0x43d584(0x1fc))/0xa;if(_0xcd9633===_0x199a3e)break;else _0x1f70d2['push'](_0x1f70d2['shift']());}catch(_0x31c169){_0x1f70d2['push'](_0x1f70d2['shift']());}}}(a91_0x3a3b,0x9ee6c));function a91_0xe260(_0x257abf,_0x3d3e36){_0x257abf=_0x257abf-0x1ec;const _0x3a3b22=a91_0x3a3b();let _0xe2603=_0x3a3b22[_0x257abf];return _0xe2603;}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';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x2d65f1){const _0x5a8a33=a91_0xe260;return void _0x2d65f1,AUTH_MODE[_0x5a8a33(0x228)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x1e83dd,_0x49da95){const _0xa03955=a91_0xe260,_0x20958b=typeof _0x49da95[_0xa03955(0x213)]==='string'&&_0x49da95[_0xa03955(0x213)]['trim']();return{'rawFlags':_0x49da95,'appCode':_0x1e83dd['appCode']||productEnv(_0xa03955(0x1f4))||(_0x20958b?undefined:readAppCodeFromConfig()),'appCodeSource':_0x1e83dd['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x49da95),'defaultFormat':_0x1e83dd[_0xa03955(0x222)],'defaultPageSize':_0x1e83dd[_0xa03955(0x214)],'defaultVerbose':_0x1e83dd[_0xa03955(0x21c)],'riskLevel':_0x1e83dd[_0xa03955(0x1fb)],'accessKey':_0x1e83dd[_0xa03955(0x1f8)],'env':_0x1e83dd[_0xa03955(0x20b)],'mergedCli':{'defaultApp':_0x1e83dd['defaultApp'],'currentApp':_0x1e83dd[_0xa03955(0x217)],'appCode':_0x1e83dd[_0xa03955(0x220)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a91_0x55155e(0x210)](_0x86c8a7=>PIPELINE_FLAG_NAMES[a91_0x55155e(0x1f3)](_0x86c8a7['name']))[a91_0x55155e(0x1ed)](({name:_0x1352e3,type:_0x1dbb48,description:_0x25ae73})=>({'name':_0x1352e3,'type':_0x1dbb48,'description':_0x25ae73})),'formatOutput':formatOutput,'getCommandLabel'(_0xcdc5da){const _0x6ea999=a91_0x55155e;return CLI_BIN_NAME+'\x20'+_0xcdc5da[_0x6ea999(0x1f7)]+'\x20'+_0xcdc5da[_0x6ea999(0x1ff)];},'riskPolicy':{'onViolation'(_0x3c68bb){const _0x359816=a91_0x55155e;console[_0x359816(0x22a)](_0x3c68bb);},'createError'(_0x540c69){const _0x2e1001=a91_0x55155e;return CliErrors[_0x2e1001(0x1ec)](_0x540c69);}},async 'prepare'(_0xd64a80,_0x4198ea){const _0x80bfa8=a91_0x55155e,_0x13046d=resolveAuthMode(_0x4198ea);if(_0xd64a80['requiresAuth']!==![]){if(!_0x4198ea[_0x80bfa8(0x1f8)])throw CliErrors[_0x80bfa8(0x20e)](_0x80bfa8(0x1f6)+PRODUCT_CONFIG[_0x80bfa8(0x212)]+_0x80bfa8(0x211)+productEnvName(_0x80bfa8(0x22d))+'.');const {setActiveAK:_0x3a178f}=await import('../core/api-client.js');_0x3a178f(_0x4198ea['accessKey']);}let _0x56fdc9='';if(_0xd64a80[_0x80bfa8(0x21f)]!==![]){_0x56fdc9=_0x4198ea['appCode']??'',_0x56fdc9=await resolveExplicitAppName(_0xd64a80,_0x4198ea,_0x56fdc9);if(!_0x56fdc9){await assertSelectedAppNameIsRuntimeAccessible(_0xd64a80,_0x4198ea);throw CliErrors['configMissing'](_0x80bfa8(0x21a)+PRODUCT_CONFIG[_0x80bfa8(0x212)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xd64a80,_0x4198ea,_0x56fdc9);}if(_0x56fdc9){const {initSdkClient:_0x109d09}=await import(_0x80bfa8(0x20a));_0x109d09({'appCode':_0x56fdc9,'env':_0x4198ea[_0x80bfa8(0x20b)]??_0x80bfa8(0x215),'accessKey':_0x4198ea[_0x80bfa8(0x1f8)],'authMode':_0x13046d}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x4198ea['defaultVerbose']},'numbers':{'pagesize':_0x4198ea[_0x80bfa8(0x1f1)]}},'extras':{'appCode':_0x56fdc9,'cookie':'','apiDomain':_0x4198ea['apiDomain'],'apiDir':'','accessKey':_0x4198ea[_0x80bfa8(0x1f8)],'envName':_0x4198ea['env'],'mergedCli':_0x4198ea[_0x80bfa8(0x207)]}};},async 'confirmHighRisk'({def:_0x1ca688,env:_0x10df0c,flags:_0x17b060,commandLabel:_0x5466d0}){const _0x47a4f8=a91_0x55155e;if(_0x10df0c[_0x47a4f8(0x201)]){const _0x4643c7=reconstructCommandArgv(_0x1ca688,_0x17b060);throw CliErrors[_0x47a4f8(0x204)](_0x47a4f8(0x1ef)+_0x5466d0+_0x47a4f8(0x1f9)+(_0x47a4f8(0x1ee)+_0x4643c7));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1ca688,_0x5466d0,_0x17b060),'createCancelledError':_0x38aa32=>CliErrors['cancelled'](_0x38aa32)});},'mapDryRunError'(_0x4c832b){return mapUserFacingExecuteError(_0x4c832b);},'mapExecuteError'(_0x2d97f3){return mapUserFacingExecuteError(_0x2d97f3);},async 'finalize'(){const _0x2300e9=a91_0x55155e;try{if(sdkClientInitialized){const {clearSdkClient:_0x54ab61}=await import(_0x2300e9(0x20a));_0x54ab61();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x2ecb09}=await import('../core/api-client.js');_0x2ecb09();}}};async function resolveExplicitAppName(_0x4d5977,_0x49ea34,_0x5ea8eb){const _0x1b8ff3=a91_0x55155e;if(_0x4d5977[_0x1b8ff3(0x21f)]===![])return _0x5ea8eb;const _0x34fcfe=typeof _0x49ea34[_0x1b8ff3(0x224)]['app']===_0x1b8ff3(0x221)?_0x49ea34[_0x1b8ff3(0x224)][_0x1b8ff3(0x213)][_0x1b8ff3(0x219)]():'';if(!_0x34fcfe)return _0x5ea8eb;const _0x351cd2=typeof _0x49ea34[_0x1b8ff3(0x224)][_0x1b8ff3(0x21b)]==='string'&&_0x49ea34[_0x1b8ff3(0x224)][_0x1b8ff3(0x21b)][_0x1b8ff3(0x219)]()||productEnv(_0x1b8ff3(0x1f4));if(_0x351cd2||_0x49ea34[_0x1b8ff3(0x227)]===_0x1b8ff3(0x22b))return _0x5ea8eb;const {getRemoteAppList:_0x1be920}=await import('../commands/app/remote-source.js'),_0x31864d=await _0x1be920({'env':_0x49ea34[_0x1b8ff3(0x20b)]??_0x1b8ff3(0x215),'accessKey':_0x49ea34[_0x1b8ff3(0x1f8)]}),_0x5f45bd=findAppByName(_0x31864d[_0x1b8ff3(0x218)],_0x34fcfe);if(_0x5f45bd&&!isRuntimeAccessibleApp(_0x5f45bd))throw runtimeInaccessibleAppError(_0x5f45bd,'\x22'+_0x34fcfe+'\x22');const _0x5a5c26=_0x5f45bd?.[_0x1b8ff3(0x220)]?.[_0x1b8ff3(0x219)]();if(_0x5a5c26)return _0x5a5c26;throw CliErrors['validation'](_0x1b8ff3(0x1fd)+_0x34fcfe,_0x1b8ff3(0x206)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x34fcfe+_0x1b8ff3(0x203)+PRODUCT_CONFIG[_0x1b8ff3(0x212)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x29b919,_0x31dbfd){const _0x32918f=a91_0x55155e;if(_0x29b919[_0x32918f(0x21f)]===![]||!_0x31dbfd[_0x32918f(0x1f8)])return;const _0x2bf3a=(typeof _0x31dbfd[_0x32918f(0x224)][_0x32918f(0x213)]==='string'&&_0x31dbfd['rawFlags'][_0x32918f(0x213)][_0x32918f(0x219)]()?_0x31dbfd[_0x32918f(0x224)][_0x32918f(0x213)]:_0x31dbfd[_0x32918f(0x207)]?.[_0x32918f(0x217)]??_0x31dbfd['mergedCli']?.[_0x32918f(0x209)])?.[_0x32918f(0x219)]();if(!_0x2bf3a)return;const {getRemoteAppList:_0x400193}=await import(_0x32918f(0x216)),_0x532671=await _0x400193({'env':_0x31dbfd[_0x32918f(0x20b)]??_0x32918f(0x215),'accessKey':_0x31dbfd[_0x32918f(0x1f8)]}),_0x9ec9f2=findAppByName(_0x532671[_0x32918f(0x218)],_0x2bf3a);if(_0x9ec9f2&&!isRuntimeAccessibleApp(_0x9ec9f2))throw runtimeInaccessibleAppError(_0x9ec9f2,'\x22'+_0x2bf3a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1f9019,_0x5d469b,_0x23a30e){const _0x47b27b=a91_0x55155e;if(_0x1f9019[_0x47b27b(0x21f)]===![]||!_0x5d469b[_0x47b27b(0x1f8)])return;const {getRemoteAppList:_0x5a9ee8}=await import(_0x47b27b(0x216)),_0x1c768b=await _0x5a9ee8({'env':_0x5d469b[_0x47b27b(0x20b)]??'production','accessKey':_0x5d469b[_0x47b27b(0x1f8)]}),_0x55b3ca=findAppByCode(_0x1c768b['items'],_0x23a30e);if(_0x55b3ca&&!isRuntimeAccessibleApp(_0x55b3ca))throw runtimeInaccessibleAppError(_0x55b3ca,_0x47b27b(0x1fa)+_0x23a30e+'\x22');}export async function runCommand(_0x10bc5a,_0x1dbb2b){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x10bc5a)?withUpdateNotice(_0x10bc5a):_0x10bc5a,_0x1dbb2b,runnerAdapter);}function shouldAttachUpdateNotice(_0x258d5e){const _0xf77c73=a91_0x55155e;return![_0xf77c73(0x226),_0xf77c73(0x200),_0xf77c73(0x21d)][_0xf77c73(0x20f)](_0x258d5e[_0xf77c73(0x1f7)]);}function a91_0x3a3b(){const _0x47849b=['execute','.appcode\x20to\x20','validation','408738lHSfsn','Run\x20`','mergedCli','21pxewrW','defaultApp','../core/sdk-client.js','env','4oZQRqc','resolve','authRequired','includes','filter','\x20or\x20pass\x20','newConfigFileName','app','pageSize','production','../commands/app/remote-source.js','currentApp','items','trim','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','appcode','verbose','doctor','6170808qmusev','requiresAppCode','appCode','string','format','91893fbYyir','rawFlags','_notice','update','appCodeSource','ClientAk','2646725KzmHmo','error','local-alias','6bfDQWD','ACCESS_KEY','cancelled','map','\x20\x20To\x20proceed:\x20','High-risk\x20operation\x20`','object','defaultPageSize','nonInteractive','has','APPCODE','495736GYVqzN','Set\x20accessKey\x20in\x20','service','accessKey','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','appcode\x20\x22','riskLevel','886380lfDOgp','Unknown\x20app:\x20','5330619tKhhaC','command','schema','isNonInteractive'];a91_0x3a3b=function(){return _0x47849b;};return a91_0x3a3b();}function withUpdateNotice(_0x5878d1){return{..._0x5878d1,async 'execute'(_0x4279d2){const _0x25513a=a91_0xe260,_0xe568a7=shouldResolveUpdateNotice(_0x4279d2)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x25513a(0x20d)](null),_0x2734d6=await _0x5878d1[_0x25513a(0x202)](_0x4279d2);return attachUpdateNotice(_0x2734d6,await _0xe568a7);}};}function shouldResolveUpdateNotice(_0x49a93f){const _0x4e1065=a91_0x55155e;return _0x49a93f[_0x4e1065(0x222)]==='pretty'&&!_0x49a93f[_0x4e1065(0x1f2)];}function attachUpdateNotice(_0x1350d8,_0x13a9d1){const _0x328040=a91_0x55155e;if(!_0x13a9d1||!_0x1350d8||typeof _0x1350d8!==_0x328040(0x1f0))return _0x1350d8;const _0x4e35af=_0x1350d8,_0x295990=typeof _0x4e35af[_0x328040(0x225)]===_0x328040(0x1f0)&&_0x4e35af[_0x328040(0x225)]!==null?_0x4e35af['_notice']:{};return{..._0x4e35af,'_notice':{..._0x295990,'update':_0x13a9d1}};}
@@ -1 +1 @@
1
- function a91_0x2ba1(_0x9a6b3c,_0x5ba7a4){_0x9a6b3c=_0x9a6b3c-0xe5;const _0xbac294=a91_0xbac2();let _0x2ba1dd=_0xbac294[_0x9a6b3c];return _0x2ba1dd;}(function(_0x3950b3,_0x331acb){const _0x158549=a91_0x2ba1,_0x2658b2=_0x3950b3();while(!![]){try{const _0x47362f=-parseInt(_0x158549(0xf3))/0x1*(parseInt(_0x158549(0xe5))/0x2)+-parseInt(_0x158549(0xf2))/0x3+-parseInt(_0x158549(0xf0))/0x4+parseInt(_0x158549(0xeb))/0x5*(-parseInt(_0x158549(0xe6))/0x6)+parseInt(_0x158549(0xf5))/0x7*(-parseInt(_0x158549(0xef))/0x8)+parseInt(_0x158549(0xee))/0x9*(-parseInt(_0x158549(0xf6))/0xa)+parseInt(_0x158549(0xea))/0xb*(parseInt(_0x158549(0xf1))/0xc);if(_0x47362f===_0x331acb)break;else _0x2658b2['push'](_0x2658b2['shift']());}catch(_0x49c5eb){_0x2658b2['push'](_0x2658b2['shift']());}}}(a91_0xbac2,0x82f44));function a91_0xbac2(){const _0x1e0d4b=['871050TwxFMf','12eaHAMw','auth','1652728iMAwOL','40gsjPsd','service','requiresAuth','has','151366cyzgNN','1132038SIMixB','required','services','none','32329FzdQEg','5nfFoYX','../commands/registry.js','map','1580247Hzufqg','16uLFZVi','574280mJFMej','13236OmUFOE'];a91_0xbac2=function(){return _0x1e0d4b;};return a91_0xbac2();}import{buildSchemaPayload as a91_0x30788d}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 _0x279262=a91_0x2ba1,{serviceRegistry:_0x51aaa0,findDefinition:_0x4d6dd6}=await import(_0x279262(0xec)),_0x288ace=new Set(_0x51aaa0[_0x279262(0xed)](_0x80fb2c=>_0x80fb2c[_0x279262(0xf7)])),_0x403580=listDynamicServiceEntries()['filter'](_0x9961c8=>!_0x288ace[_0x279262(0xf9)](_0x9961c8[_0x279262(0xf7)])),_0x1c21c3=a91_0x30788d({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x51aaa0,_0x403580),'buildAllFlags':buildAllFlags,'findDefinition':(_0x6d4b9d,_0x28df7e)=>_0x4d6dd6(_0x6d4b9d,_0x28df7e)??findDynamicServiceDefinition(_0x6d4b9d,_0x28df7e)});return normalizeSchemaPayload(_0x1c21c3);}function normalizeSchemaPayload(_0x3125b4){const _0x432778=a91_0x2ba1;return{..._0x3125b4,'schemaVersion':0x2,'services':_0x3125b4[_0x432778(0xe8)][_0x432778(0xed)](_0x3558ce=>({..._0x3558ce,'commands':_0x3558ce['commands'][_0x432778(0xed)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x5606d9){const _0x4b26fd=a91_0x2ba1,_0x54e5df=_0x5606d9;return{..._0x5606d9,'auth':_0x54e5df[_0x4b26fd(0xf4)]??(_0x5606d9[_0x4b26fd(0xf8)]?_0x4b26fd(0xe7):_0x4b26fd(0xe9))};}
1
+ (function(_0x4cdec3,_0x36b7f4){const _0x533171=a92_0x27df,_0x4fe5e5=_0x4cdec3();while(!![]){try{const _0x2744f3=parseInt(_0x533171(0x176))/0x1+parseInt(_0x533171(0x17b))/0x2*(-parseInt(_0x533171(0x179))/0x3)+parseInt(_0x533171(0x16a))/0x4+parseInt(_0x533171(0x16b))/0x5*(-parseInt(_0x533171(0x16c))/0x6)+-parseInt(_0x533171(0x177))/0x7+parseInt(_0x533171(0x173))/0x8*(-parseInt(_0x533171(0x175))/0x9)+parseInt(_0x533171(0x174))/0xa*(parseInt(_0x533171(0x17c))/0xb);if(_0x2744f3===_0x36b7f4)break;else _0x4fe5e5['push'](_0x4fe5e5['shift']());}catch(_0xd2fc74){_0x4fe5e5['push'](_0x4fe5e5['shift']());}}}(a92_0x3de9,0xc4e33));import{buildSchemaPayload as a92_0x124942}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a92_0x3de9(){const _0x2cae48=['../commands/registry.js','map','24nCpbjI','23091020RFxXLf','2035881QCmhdM','946934UPfObP','506072GERoQn','filter','3217248VbxROf','requiresAuth','2TjBcqp','11xkGviG','2635640xyWWXS','20otPvsv','1927734gqfeqG','service','required','has','none'];a92_0x3de9=function(){return _0x2cae48;};return a92_0x3de9();}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';function a92_0x27df(_0x4ad50c,_0x4083cc){_0x4ad50c=_0x4ad50c-0x16a;const _0x3de957=a92_0x3de9();let _0x27dff1=_0x3de957[_0x4ad50c];return _0x27dff1;}export async function buildSchemaPayload(){const _0x50e7e7=a92_0x27df,{serviceRegistry:_0x219095,findDefinition:_0x233d5f}=await import(_0x50e7e7(0x171)),_0x28c5ac=new Set(_0x219095['map'](_0x55445a=>_0x55445a[_0x50e7e7(0x16d)])),_0x13097e=listDynamicServiceEntries()[_0x50e7e7(0x178)](_0xb65083=>!_0x28c5ac[_0x50e7e7(0x16f)](_0xb65083[_0x50e7e7(0x16d)])),_0xaa1983=a92_0x124942({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x219095,_0x13097e),'buildAllFlags':buildAllFlags,'findDefinition':(_0x42c7bb,_0x1258bd)=>_0x233d5f(_0x42c7bb,_0x1258bd)??findDynamicServiceDefinition(_0x42c7bb,_0x1258bd)});return normalizeSchemaPayload(_0xaa1983);}function normalizeSchemaPayload(_0x57c6ec){const _0xe38edf=a92_0x27df;return{..._0x57c6ec,'schemaVersion':0x2,'services':_0x57c6ec['services'][_0xe38edf(0x172)](_0x1353a8=>({..._0x1353a8,'commands':_0x1353a8['commands']['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x207532){const _0x873e7d=a92_0x27df,_0x45d932=_0x207532;return{..._0x207532,'auth':_0x45d932['auth']??(_0x207532[_0x873e7d(0x17a)]?_0x873e7d(0x16e):_0x873e7d(0x170))};}
@@ -1 +1 @@
1
- (function(_0xb0dd84,_0x5e072a){const _0x42b8ac=a92_0x38ba,_0x35b0c6=_0xb0dd84();while(!![]){try{const _0x3eb6f5=-parseInt(_0x42b8ac(0x134))/0x1*(-parseInt(_0x42b8ac(0x13a))/0x2)+-parseInt(_0x42b8ac(0x138))/0x3+-parseInt(_0x42b8ac(0x140))/0x4*(parseInt(_0x42b8ac(0x139))/0x5)+parseInt(_0x42b8ac(0x141))/0x6+parseInt(_0x42b8ac(0x137))/0x7*(-parseInt(_0x42b8ac(0x136))/0x8)+parseInt(_0x42b8ac(0x13b))/0x9+-parseInt(_0x42b8ac(0x13e))/0xa*(parseInt(_0x42b8ac(0x133))/0xb);if(_0x3eb6f5===_0x5e072a)break;else _0x35b0c6['push'](_0x35b0c6['shift']());}catch(_0xafb08a){_0x35b0c6['push'](_0x35b0c6['shift']());}}}(a92_0x3bbf,0x98839));function a92_0x38ba(_0x408e20,_0x2f348d){_0x408e20=_0x408e20-0x133;const _0x3bbfe1=a92_0x3bbf();let _0x38ba8c=_0x3bbfe1[_0x408e20];return _0x38ba8c;}export function insertDynamicServicesAfterServiceTree(_0x2098c4,_0xfeb909){const _0x438b6f=a92_0x38ba;if(_0xfeb909[_0x438b6f(0x13f)]===0x0)return[..._0x2098c4];const _0xe55cf2=_0x2098c4[_0x438b6f(0x13d)](_0x4b0edc=>_0x4b0edc[_0x438b6f(0x135)]===_0x438b6f(0x135));if(_0xe55cf2<0x0)return[..._0x2098c4,..._0xfeb909];return[..._0x2098c4[_0x438b6f(0x13c)](0x0,_0xe55cf2+0x1),..._0xfeb909,..._0x2098c4[_0x438b6f(0x13c)](_0xe55cf2+0x1)];}function a92_0x3bbf(){const _0x3d0343=['slice','findIndex','663240pNgkhw','length','20pwEkAp','7431390BzsgrO','209IyACvY','1Fsgyuz','service','8LHIXKH','3602389woxbEm','17565VFUTVr','566855WJxubG','1831178qMjYQl','7362324DJBSEq'];a92_0x3bbf=function(){return _0x3d0343;};return a92_0x3bbf();}
1
+ (function(_0x2c9556,_0x3d62da){const _0x3e67af=a93_0x68b8,_0x4ac166=_0x2c9556();while(!![]){try{const _0x48d446=parseInt(_0x3e67af(0x1f2))/0x1+-parseInt(_0x3e67af(0x1f5))/0x2+parseInt(_0x3e67af(0x1fb))/0x3*(parseInt(_0x3e67af(0x1f4))/0x4)+parseInt(_0x3e67af(0x1f3))/0x5+parseInt(_0x3e67af(0x1f9))/0x6*(-parseInt(_0x3e67af(0x1f1))/0x7)+-parseInt(_0x3e67af(0x1f7))/0x8+parseInt(_0x3e67af(0x1fa))/0x9;if(_0x48d446===_0x3d62da)break;else _0x4ac166['push'](_0x4ac166['shift']());}catch(_0x44406a){_0x4ac166['push'](_0x4ac166['shift']());}}}(a93_0x16a4,0x3c1fa));function a93_0x16a4(){const _0x94dee5=['slice','790888DHYRxC','service','18XHJTEZ','1513422GwRvNE','3252ahaFKR','length','95949FdIzFR','440070llkpaK','670305pRgaFc','268CcXSeP','857338KGAGAV'];a93_0x16a4=function(){return _0x94dee5;};return a93_0x16a4();}function a93_0x68b8(_0x511b5c,_0xd47127){_0x511b5c=_0x511b5c-0x1f1;const _0x16a49c=a93_0x16a4();let _0x68b8dd=_0x16a49c[_0x511b5c];return _0x68b8dd;}export function insertDynamicServicesAfterServiceTree(_0x2b9a18,_0x387261){const _0x445fb6=a93_0x68b8;if(_0x387261[_0x445fb6(0x1fc)]===0x0)return[..._0x2b9a18];const _0x2757fe=_0x2b9a18['findIndex'](_0x40ad3c=>_0x40ad3c[_0x445fb6(0x1f8)]===_0x445fb6(0x1f8));if(_0x2757fe<0x0)return[..._0x2b9a18,..._0x387261];return[..._0x2b9a18[_0x445fb6(0x1f6)](0x0,_0x2757fe+0x1),..._0x387261,..._0x2b9a18[_0x445fb6(0x1f6)](_0x2757fe+0x1)];}
@@ -1 +1 @@
1
- (function(_0x3e65dd,_0x3decd5){var _0x234f33=a93_0x4d0a,_0x255cf6=_0x3e65dd();while(!![]){try{var _0xd79709=-parseInt(_0x234f33(0x1fb))/0x1+parseInt(_0x234f33(0x1fa))/0x2*(-parseInt(_0x234f33(0x1f3))/0x3)+parseInt(_0x234f33(0x1f6))/0x4*(parseInt(_0x234f33(0x1fc))/0x5)+-parseInt(_0x234f33(0x1fd))/0x6+-parseInt(_0x234f33(0x1f7))/0x7*(parseInt(_0x234f33(0x1f5))/0x8)+parseInt(_0x234f33(0x1f4))/0x9+parseInt(_0x234f33(0x1f8))/0xa*(parseInt(_0x234f33(0x1f9))/0xb);if(_0xd79709===_0x3decd5)break;else _0x255cf6['push'](_0x255cf6['shift']());}catch(_0x1125eb){_0x255cf6['push'](_0x255cf6['shift']());}}}(a93_0x3d4d,0x7ffc8));function a93_0x4d0a(_0x1f8524,_0x2f9d70){_0x1f8524=_0x1f8524-0x1f3;var _0x3d4d46=a93_0x3d4d();var _0x4d0adb=_0x3d4d46[_0x1f8524];return _0x4d0adb;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a93_0x3d4d(){var _0x54a5f6=['5253Qmgiyr','408339DCKFKM','152bWSKmY','104QjbxWE','124957CFOeVR','1030QhUoqK','256058qGDfwj','826mogLcb','940407UiannY','135285gTGDBX','3717096UwHciq'];a93_0x3d4d=function(){return _0x54a5f6;};return a93_0x3d4d();}
1
+ function a94_0x4d87(){var _0x2292e3=['1833975ZyZAVR','351498Ypdpax','19230930lGPjCO','3874906TnXJfT','8yOzjoe','47010cooVrM','6HxHQqP','136PXVHgY','914230QPeWnX','329772wDCizU'];a94_0x4d87=function(){return _0x2292e3;};return a94_0x4d87();}(function(_0x226445,_0xdbf32){var _0x24f634=a94_0x373f,_0x1b407f=_0x226445();while(!![]){try{var _0x66a431=-parseInt(_0x24f634(0xd9))/0x1+-parseInt(_0x24f634(0xd7))/0x2+parseInt(_0x24f634(0xd3))/0x3*(-parseInt(_0x24f634(0xd5))/0x4)+parseInt(_0x24f634(0xd6))/0x5*(parseInt(_0x24f634(0xd4))/0x6)+-parseInt(_0x24f634(0xdb))/0x7*(parseInt(_0x24f634(0xd2))/0x8)+-parseInt(_0x24f634(0xd8))/0x9+parseInt(_0x24f634(0xda))/0xa;if(_0x66a431===_0xdbf32)break;else _0x1b407f['push'](_0x1b407f['shift']());}catch(_0x568d7e){_0x1b407f['push'](_0x1b407f['shift']());}}}(a94_0x4d87,0x491b2));function a94_0x373f(_0x3f6b8f,_0x5d05df){_0x3f6b8f=_0x3f6b8f-0xd2;var _0x4d87ac=a94_0x4d87();var _0x373f4d=_0x4d87ac[_0x3f6b8f];return _0x373f4d;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a94_0x66d1db=a94_0x4a88;(function(_0x25f10f,_0x4b4eae){const _0x2f1162=a94_0x4a88,_0x52e787=_0x25f10f();while(!![]){try{const _0x17a085=parseInt(_0x2f1162(0x181))/0x1+parseInt(_0x2f1162(0x176))/0x2+-parseInt(_0x2f1162(0x17e))/0x3+-parseInt(_0x2f1162(0x175))/0x4*(-parseInt(_0x2f1162(0x180))/0x5)+parseInt(_0x2f1162(0x17b))/0x6+-parseInt(_0x2f1162(0x17a))/0x7*(parseInt(_0x2f1162(0x17d))/0x8)+-parseInt(_0x2f1162(0x177))/0x9*(parseInt(_0x2f1162(0x17c))/0xa);if(_0x17a085===_0x4b4eae)break;else _0x52e787['push'](_0x52e787['shift']());}catch(_0x4c6835){_0x52e787['push'](_0x52e787['shift']());}}}(a94_0x2f48,0xdf530));export const VERSION=a94_0x66d1db(0x178);function a94_0x2f48(){const _0x597ed2=['2226645yiNBTC','1453156vMdRVR','12hOtsyO','785362zFoSBc','283329unLKfB','2.1.17','df45865','1368409dFYDnt','5773722IzlmbA','20onZkJe','64KeRMVa','4807551bcNUuf','2026-07-20T11:44:07.458Z'];a94_0x2f48=function(){return _0x597ed2;};return a94_0x2f48();}function a94_0x4a88(_0x3df930,_0x4fb455){_0x3df930=_0x3df930-0x175;const _0x2f4856=a94_0x2f48();let _0x4a8879=_0x2f4856[_0x3df930];return _0x4a8879;}export const GIT_TAG='v2.1.16';export const GIT_COMMIT=a94_0x66d1db(0x179);export const BUILD_TIME=a94_0x66d1db(0x17f);
1
+ const a95_0x49984c=a95_0x2802;(function(_0x2a5ffc,_0x1a1d50){const _0x3f073e=a95_0x2802,_0x15455a=_0x2a5ffc();while(!![]){try{const _0x355434=parseInt(_0x3f073e(0xf8))/0x1+parseInt(_0x3f073e(0xfe))/0x2*(-parseInt(_0x3f073e(0xf7))/0x3)+parseInt(_0x3f073e(0xfa))/0x4+parseInt(_0x3f073e(0x100))/0x5+parseInt(_0x3f073e(0x101))/0x6*(-parseInt(_0x3f073e(0x104))/0x7)+parseInt(_0x3f073e(0x103))/0x8*(-parseInt(_0x3f073e(0xff))/0x9)+-parseInt(_0x3f073e(0xfc))/0xa*(-parseInt(_0x3f073e(0x102))/0xb);if(_0x355434===_0x1a1d50)break;else _0x15455a['push'](_0x15455a['shift']());}catch(_0x16b560){_0x15455a['push'](_0x15455a['shift']());}}}(a95_0x5dd6,0x28af5));function a95_0x5dd6(){const _0x28993c=['v2.1.18-beta.1','847060txmAcr','969f480','2023870hnGTFA','2026-07-28T08:58:10.443Z','4742BHsqpZ','522oPgdyX','912295EeCxnK','16908eFXHFu','11WixxsD','29608TCqNSu','595hjIigR','345ndcNUC','296887wUfpMN'];a95_0x5dd6=function(){return _0x28993c;};return a95_0x5dd6();}export const VERSION='2.1.18-beta.1';export const GIT_TAG=a95_0x49984c(0xf9);function a95_0x2802(_0x56c5a8,_0x2c29c9){_0x56c5a8=_0x56c5a8-0xf7;const _0x5dd627=a95_0x5dd6();let _0x2802b8=_0x5dd627[_0x56c5a8];return _0x2802b8;}export const GIT_COMMIT=a95_0x49984c(0xfb);export const BUILD_TIME=a95_0x49984c(0xfd);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0xeb335d,_0x5e8714){const _0x3f9c1b=a95_0x2135,_0x4c9ff9=_0xeb335d();while(!![]){try{const _0x2d1830=-parseInt(_0x3f9c1b(0x16c))/0x1+parseInt(_0x3f9c1b(0x169))/0x2*(-parseInt(_0x3f9c1b(0x16a))/0x3)+-parseInt(_0x3f9c1b(0x168))/0x4+-parseInt(_0x3f9c1b(0x162))/0x5*(-parseInt(_0x3f9c1b(0x166))/0x6)+-parseInt(_0x3f9c1b(0x16b))/0x7+-parseInt(_0x3f9c1b(0x16e))/0x8*(parseInt(_0x3f9c1b(0x164))/0x9)+parseInt(_0x3f9c1b(0x161))/0xa;if(_0x2d1830===_0x5e8714)break;else _0x4c9ff9['push'](_0x4c9ff9['shift']());}catch(_0x5d8a7c){_0x4c9ff9['push'](_0x4c9ff9['shift']());}}}(a95_0x4dc0,0x539c3));function a95_0x4dc0(){const _0x3f4057=['2966124zqJzhp','312055LXRIeq','column','24dRPEkH','\x20--help','21922220KaLucY','5ERsLFL','\x20to\x20view\x20available\x20commands.','803403jMEnTI','green','146238nYvjSI','\x20\x20Use\x20','2731424KxfrSJ','53624zuTQki','21OpUqyG'];a95_0x4dc0=function(){return _0x3f4057;};return a95_0x4dc0();}import{jsx as a95_0xc2fe25,jsxs as a95_0x1fdca5}from'react/jsx-runtime';import{useEffect}from'react';function a95_0x2135(_0xd2f06c,_0x46e001){_0xd2f06c=_0xd2f06c-0x161;const _0x4dc009=a95_0x4dc0();let _0x2135af=_0x4dc009[_0xd2f06c];return _0x2135af;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x53825c=a95_0x2135,{exit:_0x4bb7a4}=useApp();return useEffect(()=>{_0x4bb7a4();},[_0x4bb7a4]),a95_0x1fdca5(Box,{'flexDirection':_0x53825c(0x16d),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0xc2fe25(Box,{'children':a95_0xc2fe25(Text,{'bold':!![],'color':_0x53825c(0x165),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x1fdca5(Box,{'marginTop':0x1,'children':[a95_0xc2fe25(Text,{'dimColor':!![],'children':_0x53825c(0x167)}),a95_0xc2fe25(Text,{'bold':!![],'color':_0x53825c(0x165),'children':CLI_BIN_NAME+_0x53825c(0x16f)}),a95_0xc2fe25(Text,{'dimColor':!![],'children':_0x53825c(0x163)})]})]});}
1
+ (function(_0x5bc73a,_0x1faac0){const _0x34c6d5=a96_0x584c,_0x5bb04d=_0x5bc73a();while(!![]){try{const _0x10601e=-parseInt(_0x34c6d5(0x12e))/0x1+-parseInt(_0x34c6d5(0x134))/0x2+parseInt(_0x34c6d5(0x131))/0x3*(-parseInt(_0x34c6d5(0x135))/0x4)+-parseInt(_0x34c6d5(0x138))/0x5+parseInt(_0x34c6d5(0x130))/0x6*(-parseInt(_0x34c6d5(0x137))/0x7)+-parseInt(_0x34c6d5(0x133))/0x8+-parseInt(_0x34c6d5(0x12d))/0x9*(-parseInt(_0x34c6d5(0x139))/0xa);if(_0x10601e===_0x1faac0)break;else _0x5bb04d['push'](_0x5bb04d['shift']());}catch(_0x133432){_0x5bb04d['push'](_0x5bb04d['shift']());}}}(a96_0x3b9c,0x2f164));import{jsx as a96_0x16ddd4,jsxs as a96_0x2fd043}from'react/jsx-runtime';function a96_0x3b9c(){const _0x3ab635=['\x20--help','253278gUCfev','3942OcIHBu','\x20to\x20view\x20available\x20commands.','2712944IZlBlb','2696ljxeZx','732prWUWc','green','28jdaCDU','1337290nMXFXu','302450mjxeIK','423UNRXZX','211409zQXnYk'];a96_0x3b9c=function(){return _0x3ab635;};return a96_0x3b9c();}function a96_0x584c(_0x13ae6f,_0xf8c3c5){_0x13ae6f=_0x13ae6f-0x12d;const _0x3b9cb2=a96_0x3b9c();let _0x584cda=_0x3b9cb2[_0x13ae6f];return _0x584cda;}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 _0x8452e9=a96_0x584c,{exit:_0x173019}=useApp();return useEffect(()=>{_0x173019();},[_0x173019]),a96_0x2fd043(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a96_0x16ddd4(Box,{'children':a96_0x16ddd4(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a96_0x2fd043(Box,{'marginTop':0x1,'children':[a96_0x16ddd4(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a96_0x16ddd4(Text,{'bold':!![],'color':_0x8452e9(0x136),'children':CLI_BIN_NAME+_0x8452e9(0x12f)}),a96_0x16ddd4(Text,{'dimColor':!![],'children':_0x8452e9(0x132)})]})]});}
@@ -1 +1 @@
1
- function a96_0x1580(_0x408930,_0x34fc38){_0x408930=_0x408930-0x177;const _0xeb5b5c=a96_0xeb5b();let _0x1580f4=_0xeb5b5c[_0x408930];return _0x1580f4;}(function(_0x110d38,_0x579593){const _0x41295b=a96_0x1580,_0x4c30a8=_0x110d38();while(!![]){try{const _0x3005c2=-parseInt(_0x41295b(0x184))/0x1+parseInt(_0x41295b(0x17c))/0x2+-parseInt(_0x41295b(0x17a))/0x3*(parseInt(_0x41295b(0x17b))/0x4)+parseInt(_0x41295b(0x180))/0x5+parseInt(_0x41295b(0x188))/0x6+parseInt(_0x41295b(0x17d))/0x7*(parseInt(_0x41295b(0x177))/0x8)+parseInt(_0x41295b(0x182))/0x9*(-parseInt(_0x41295b(0x179))/0xa);if(_0x3005c2===_0x579593)break;else _0x4c30a8['push'](_0x4c30a8['shift']());}catch(_0x4820f0){_0x4c30a8['push'](_0x4c30a8['shift']());}}}(a96_0xeb5b,0x85f9d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x309ede}from'../constant/distribution.js';function a96_0xeb5b(){const _0x48e0f3=['inherit','27192aWjcQD','exit\x20','add','unknown','3839262WSkwcv','8ZciHnN','stdout','1050UDRfMD','18DsUgtI','671272wqDEMC','722436nbiEen','3884279SCaTpQ','status','stderr','878815CgfKlr','trim','12762sKchCY'];a96_0xeb5b=function(){return _0x48e0f3;};return a96_0xeb5b();}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x309ede;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(_0x35ccf8,_0x4fce62=LOVRABET_SKILL_SOURCE,_0x4f7eab){const _0x1252da=a96_0x1580;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3f80eb=_0x4f7eab?.['stdio']??_0x1252da(0x183),_0x44335b=resolveNpmBin('npx'),_0x40ef74=['skills',_0x1252da(0x186),_0x4fce62,'-g','-y'],_0x49c8a1=[_0x44335b,..._0x40ef74]['join']('\x20');console['log']('*\x20'+_0x49c8a1);const _0x19183b=spawnSync(_0x44335b,_0x40ef74,{'cwd':_0x35ccf8,'stdio':_0x3f80eb,'env':process.env,'shell':![]});if(_0x19183b[_0x1252da(0x17e)]===0x0)return{'ok':!![],'status':0x0};let _0x460ca2=_0x1252da(0x185)+(_0x19183b['status']??_0x1252da(0x187));if(_0x3f80eb==='pipe'){const _0x1b4c34=_0x19183b[_0x1252da(0x17f)]?_0x19183b['stderr']['toString']()['trim']():'',_0x58385d=_0x19183b[_0x1252da(0x178)]?_0x19183b[_0x1252da(0x178)]['toString']()[_0x1252da(0x181)]():'';if(_0x1b4c34)_0x460ca2=_0x1b4c34;else{if(_0x58385d)_0x460ca2=_0x58385d;}}return{'ok':![],'status':_0x19183b['status']??null,'error':_0x460ca2};}
1
+ function a97_0x58ca(_0x26762f,_0x4d148b){_0x26762f=_0x26762f-0x1b7;const _0xb46d5d=a97_0xb46d();let _0x58cac0=_0xb46d5d[_0x26762f];return _0x58cac0;}const a97_0x5d31bd=a97_0x58ca;(function(_0x5175c7,_0x748323){const _0x9ca356=a97_0x58ca,_0x4e090a=_0x5175c7();while(!![]){try{const _0x3988a8=-parseInt(_0x9ca356(0x1bc))/0x1+parseInt(_0x9ca356(0x1c2))/0x2+parseInt(_0x9ca356(0x1b9))/0x3+-parseInt(_0x9ca356(0x1c5))/0x4*(parseInt(_0x9ca356(0x1b8))/0x5)+-parseInt(_0x9ca356(0x1ba))/0x6+-parseInt(_0x9ca356(0x1c9))/0x7*(-parseInt(_0x9ca356(0x1c6))/0x8)+parseInt(_0x9ca356(0x1cb))/0x9;if(_0x3988a8===_0x748323)break;else _0x4e090a['push'](_0x4e090a['shift']());}catch(_0x5b0a19){_0x4e090a['push'](_0x4e090a['shift']());}}}(a97_0xb46d,0xb3a17));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a97_0x1bc37a}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a97_0x1bc37a;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a97_0x5d31bd(0x1bb)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x45fa7b,_0x3f2d20=LOVRABET_SKILL_SOURCE,_0x4370f5){const _0x536425=a97_0x5d31bd;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x510514=_0x4370f5?.['stdio']??'inherit',_0x4c20fc=resolveNpmBin(_0x536425(0x1c7)),_0x5ddb15=['skills','add',_0x3f2d20,'-g','-y'],_0x211a42=[_0x4c20fc,..._0x5ddb15][_0x536425(0x1c1)]('\x20');console[_0x536425(0x1c0)]('*\x20'+_0x211a42);const _0x35c250=spawnSync(_0x4c20fc,_0x5ddb15,{'cwd':_0x45fa7b,'stdio':_0x510514,'env':process.env,'shell':![]});if(_0x35c250['status']===0x0)return{'ok':!![],'status':0x0};let _0x3e8f77=_0x536425(0x1ca)+(_0x35c250['status']??_0x536425(0x1be));if(_0x510514===_0x536425(0x1bd)){const _0x5ccd61=_0x35c250['stderr']?_0x35c250[_0x536425(0x1c4)][_0x536425(0x1b7)]()[_0x536425(0x1c3)]():'',_0x3fcd5f=_0x35c250[_0x536425(0x1c8)]?_0x35c250['stdout'][_0x536425(0x1b7)]()[_0x536425(0x1c3)]():'';if(_0x5ccd61)_0x3e8f77=_0x5ccd61;else{if(_0x3fcd5f)_0x3e8f77=_0x3fcd5f;}}return{'ok':![],'status':_0x35c250[_0x536425(0x1bf)]??null,'error':_0x3e8f77};}function a97_0xb46d(){const _0xd57ad6=['710168RBEdav','144HpGBTR','npx','stdout','450100AtkGkN','exit\x20','2122866uqvgiQ','toString','15lFrRzT','1045242DUHQpt','3501618HhrBtS','skipNpxSkillsEnvSuffix','806440TpaKzq','pipe','unknown','status','log','join','1833496rKKGWf','trim','stderr'];a97_0xb46d=function(){return _0xd57ad6;};return a97_0xb46d();}
@@ -1 +1 @@
1
- function a97_0xc1a5(_0x24dfec,_0x595af7){_0x24dfec=_0x24dfec-0x10d;const _0x2dd51e=a97_0x2dd5();let _0xc1a51a=_0x2dd51e[_0x24dfec];return _0xc1a51a;}const a97_0x5db986=a97_0xc1a5;function a97_0x2dd5(){const _0x3298db=['dist','.DS_Store','3108AwYpyn','4362xeUZzp','.svn','961689hxCvyt','.cache','713nulrNz','230brvrAT','.next','coverage','12aIdyCS','17777052JMcxgK','.git','node_modules','865aZbFUg','lovrabet.skill.json','build','117783NRqWkj','SKILL.md','.hg','189DqpOFS','426288uAhxAl','16315629mBPnHF'];a97_0x2dd5=function(){return _0x3298db;};return a97_0x2dd5();}(function(_0x5f2404,_0x560e0f){const _0x4c1735=a97_0xc1a5,_0x5648dc=_0x5f2404();while(!![]){try{const _0x61c020=parseInt(_0x4c1735(0x11d))/0x1*(parseInt(_0x4c1735(0x119))/0x2)+-parseInt(_0x4c1735(0x11b))/0x3*(-parseInt(_0x4c1735(0x121))/0x4)+-parseInt(_0x4c1735(0x10d))/0x5*(-parseInt(_0x4c1735(0x118))/0x6)+parseInt(_0x4c1735(0x113))/0x7*(-parseInt(_0x4c1735(0x114))/0x8)+-parseInt(_0x4c1735(0x110))/0x9*(parseInt(_0x4c1735(0x11e))/0xa)+-parseInt(_0x4c1735(0x115))/0xb+parseInt(_0x4c1735(0x122))/0xc;if(_0x61c020===_0x560e0f)break;else _0x5648dc['push'](_0x5648dc['shift']());}catch(_0x47f224){_0x5648dc['push'](_0x5648dc['shift']());}}}(a97_0x2dd5,0xd322f));export const METADATA_FILE=a97_0x5db986(0x10e);export const SKILL_FILE=a97_0x5db986(0x111);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x5db986(0x117)]);export const IGNORED_DIR_NAMES=new Set([a97_0x5db986(0x123),a97_0x5db986(0x112),a97_0x5db986(0x11a),a97_0x5db986(0x124),a97_0x5db986(0x11f),a97_0x5db986(0x116),a97_0x5db986(0x10f),a97_0x5db986(0x120),'.turbo',a97_0x5db986(0x11c)]);
1
+ const a98_0x3807dc=a98_0x23d9;function a98_0x36e8(){const _0x3544e8=['.git','.hg','8izYwUW','203446jOgGdX','410gTPNsq','22857xAeJoc','12bnBTDB','build','10027866ytoflH','8ufMtRP','.turbo','lovrabet.skill.json','387135diHgKt','14937659CsmioE','.cache','10759567UzYApN','5543195KzNLeD','568JFCkLA','SKILL.md','node_modules','.svn','.next'];a98_0x36e8=function(){return _0x3544e8;};return a98_0x36e8();}(function(_0x1b3481,_0x249ce1){const _0x51c596=a98_0x23d9,_0x43bbea=_0x1b3481();while(!![]){try{const _0x5c3f2a=-parseInt(_0x51c596(0x10a))/0x1*(-parseInt(_0x51c596(0x104))/0x2)+parseInt(_0x51c596(0x106))/0x3*(-parseInt(_0x51c596(0xfc))/0x4)+parseInt(_0x51c596(0xfb))/0x5+parseInt(_0x51c596(0x109))/0x6+-parseInt(_0x51c596(0xfa))/0x7*(-parseInt(_0x51c596(0x103))/0x8)+-parseInt(_0x51c596(0x10d))/0x9*(parseInt(_0x51c596(0x105))/0xa)+-parseInt(_0x51c596(0x10e))/0xb*(parseInt(_0x51c596(0x107))/0xc);if(_0x5c3f2a===_0x249ce1)break;else _0x43bbea['push'](_0x43bbea['shift']());}catch(_0x19bb11){_0x43bbea['push'](_0x43bbea['shift']());}}}(a98_0x36e8,0xe2665));export const METADATA_FILE=a98_0x3807dc(0x10c);export const SKILL_FILE=a98_0x3807dc(0xfd);function a98_0x23d9(_0xc77066,_0x237a7c){_0xc77066=_0xc77066-0xfa;const _0x36e8bd=a98_0x36e8();let _0x23d9aa=_0x36e8bd[_0xc77066];return _0x23d9aa;}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a98_0x3807dc(0x101),a98_0x3807dc(0x102),a98_0x3807dc(0xff),a98_0x3807dc(0xfe),a98_0x3807dc(0x100),'dist',a98_0x3807dc(0x108),'coverage',a98_0x3807dc(0x10b),a98_0x3807dc(0x10f)]);
@@ -1 +1 @@
1
- (function(_0x4e2fc1,_0x497142){const _0x20d47d=a98_0x5b32,_0x5c9bd2=_0x4e2fc1();while(!![]){try{const _0x53a23c=parseInt(_0x20d47d(0x1f0))/0x1+parseInt(_0x20d47d(0x1e5))/0x2+-parseInt(_0x20d47d(0x1eb))/0x3*(-parseInt(_0x20d47d(0x1f2))/0x4)+-parseInt(_0x20d47d(0x1f3))/0x5*(parseInt(_0x20d47d(0x1f4))/0x6)+-parseInt(_0x20d47d(0x1f5))/0x7+parseInt(_0x20d47d(0x1ee))/0x8*(-parseInt(_0x20d47d(0x1f1))/0x9)+parseInt(_0x20d47d(0x1e3))/0xa*(parseInt(_0x20d47d(0x1e9))/0xb);if(_0x53a23c===_0x497142)break;else _0x5c9bd2['push'](_0x5c9bd2['shift']());}catch(_0x33f97c){_0x5c9bd2['push'](_0x5c9bd2['shift']());}}}(a98_0x36d6,0x8f12a));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a98_0x36d6(){const _0x25cf6f=['22057yIpRas','171mkoNEX','8GYZYyF','2441065CuVZgJ','6IiHRZu','2329278ICOJzu','165860APIveN','.tmp','1672544xfQOJw','split','endsWith','from','121ncyHPV','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','1453803RIxULk','validation','utf8','253888piDwYL','isSymbolicLink'];a98_0x36d6=function(){return _0x25cf6f;};return a98_0x36d6();}import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x2e75cd,_0x483525){const _0x57e6a2=a98_0x5b32,_0x5c32b8=normalizeSkillRelativePath(_0x483525),_0x19a39c=realOrResolved(_0x2e75cd),_0x4d7c72=resolve(_0x19a39c,..._0x5c32b8['split']('/'));if(!isPathInside(_0x4d7c72,_0x19a39c))throw CliErrors[_0x57e6a2(0x1ec)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x483525);return ensureNoSymlinkInManagedPath(_0x19a39c,_0x5c32b8),_0x4d7c72;}export function ensureNoSymlinkInManagedPath(_0x287d7a,_0x17839b){const _0x43c8fb=a98_0x5b32;let _0x438606=_0x287d7a;for(const _0x884195 of _0x17839b[_0x43c8fb(0x1e6)]('/')){_0x438606=resolve(_0x438606,_0x884195);const _0x234b01=lstatIfPresent(_0x438606);if(_0x234b01?.['isSymbolicLink']())throw CliErrors['validation'](_0x43c8fb(0x1ea)+_0x17839b);}}export function isDanglingSymlink(_0x5cfe5b){const _0x1b3ce5=a98_0x5b32;try{return lstatSync(_0x5cfe5b)[_0x1b3ce5(0x1ef)]();}catch{return![];}}export function resolveSymlinkTarget(_0x58fff1){const _0x4f48dd=readlinkSync(_0x58fff1);return isAbsolute(_0x4f48dd)?_0x4f48dd:resolve(dirname(_0x58fff1),_0x4f48dd);}export function isPathInside(_0x21f3eb,_0x2c6e48){const _0x4f25c4=a98_0x5b32,_0x56d5e1=_0x21f3eb[_0x4f25c4(0x1e7)](sep)?_0x21f3eb:''+_0x21f3eb+sep,_0x186976=_0x2c6e48[_0x4f25c4(0x1e7)](sep)?_0x2c6e48:''+_0x2c6e48+sep;return _0x21f3eb===_0x2c6e48||_0x56d5e1['startsWith'](_0x186976);}export function realOrResolved(_0x253b86){try{return realpathSync(_0x253b86);}catch{return resolve(_0x253b86);}}export function lstatIfPresent(_0xc56105){try{return lstatSync(_0xc56105);}catch{return undefined;}}function a98_0x5b32(_0x40bc7f,_0x54f919){_0x40bc7f=_0x40bc7f-0x1e3;const _0x36d6ee=a98_0x36d6();let _0x5b32f6=_0x36d6ee[_0x40bc7f];return _0x5b32f6;}export function writeTextAtomic(_0x354ba6,_0x2bff06,_0x109425){const _0x507ea6=a98_0x5b32;writeBytesAtomic(_0x354ba6,Buffer[_0x507ea6(0x1e8)](_0x2bff06,_0x507ea6(0x1ed)),_0x109425);}export function writeBytesAtomic(_0xbf0aea,_0x2788aa,_0x24d0f8){const _0x36357d=a98_0x5b32,_0x2e19cb=_0xbf0aea+_0x36357d(0x1e4);try{writeFileSync(_0x2e19cb,_0x2788aa,{'mode':_0x24d0f8}),renameSync(_0x2e19cb,_0xbf0aea);}catch(_0x5cb591){try{rmSync(_0x2e19cb,{'force':!![]});}catch{}throw _0x5cb591;}}export function writeJsonAtomic(_0x506602,_0x1d2345){writeTextAtomic(_0x506602,JSON['stringify'](_0x1d2345,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x2cbdd8,_0x2a11be){const _0x126c4b=a99_0x22f9,_0x2be957=_0x2cbdd8();while(!![]){try{const _0x3c1b9e=-parseInt(_0x126c4b(0x1f4))/0x1*(-parseInt(_0x126c4b(0x1ea))/0x2)+parseInt(_0x126c4b(0x1f3))/0x3*(parseInt(_0x126c4b(0x1ed))/0x4)+parseInt(_0x126c4b(0x1f1))/0x5+parseInt(_0x126c4b(0x1ef))/0x6+parseInt(_0x126c4b(0x1f8))/0x7+parseInt(_0x126c4b(0x1f0))/0x8+-parseInt(_0x126c4b(0x1ec))/0x9;if(_0x3c1b9e===_0x2a11be)break;else _0x2be957['push'](_0x2be957['shift']());}catch(_0xfaabc5){_0x2be957['push'](_0x2be957['shift']());}}}(a99_0x2993,0xb52f6));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a99_0x22f9(_0x25d673,_0x2d7367){_0x25d673=_0x25d673-0x1ea;const _0x299307=a99_0x2993();let _0x22f96a=_0x299307[_0x25d673];return _0x22f96a;}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a99_0x2993(){const _0x1e0864=['validation','endsWith','split','7949011lmGQFk','Unsafe\x20Skill\x20file\x20path:\x20','stringify','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','from','158PcwWBs','isSymbolicLink','32581134pgovHI','826552WwYlUF','startsWith','3514332HyOkqc','932576EfkNLN','2395930ENklce','utf8','21XwaVdT','7579Urwaat'];a99_0x2993=function(){return _0x1e0864;};return a99_0x2993();}export function resolveManagedFilePath(_0x2a8ff9,_0x530c40){const _0x3d5ba5=a99_0x22f9,_0x41447d=normalizeSkillRelativePath(_0x530c40),_0x35328e=realOrResolved(_0x2a8ff9),_0x212c8d=resolve(_0x35328e,..._0x41447d[_0x3d5ba5(0x1f7)]('/'));if(!isPathInside(_0x212c8d,_0x35328e))throw CliErrors[_0x3d5ba5(0x1f5)](_0x3d5ba5(0x1f9)+_0x530c40);return ensureNoSymlinkInManagedPath(_0x35328e,_0x41447d),_0x212c8d;}export function ensureNoSymlinkInManagedPath(_0xfb2fcf,_0x448d08){const _0x24c85f=a99_0x22f9;let _0x10a770=_0xfb2fcf;for(const _0xb2cb4a of _0x448d08['split']('/')){_0x10a770=resolve(_0x10a770,_0xb2cb4a);const _0x17d9cb=lstatIfPresent(_0x10a770);if(_0x17d9cb?.[_0x24c85f(0x1eb)]())throw CliErrors[_0x24c85f(0x1f5)](_0x24c85f(0x1fb)+_0x448d08);}}export function isDanglingSymlink(_0x17af92){const _0x595a55=a99_0x22f9;try{return lstatSync(_0x17af92)[_0x595a55(0x1eb)]();}catch{return![];}}export function resolveSymlinkTarget(_0x26a9ee){const _0x730614=readlinkSync(_0x26a9ee);return isAbsolute(_0x730614)?_0x730614:resolve(dirname(_0x26a9ee),_0x730614);}export function isPathInside(_0xb6d8dc,_0x4dd801){const _0x562749=a99_0x22f9,_0x21a9be=_0xb6d8dc[_0x562749(0x1f6)](sep)?_0xb6d8dc:''+_0xb6d8dc+sep,_0x34d959=_0x4dd801[_0x562749(0x1f6)](sep)?_0x4dd801:''+_0x4dd801+sep;return _0xb6d8dc===_0x4dd801||_0x21a9be[_0x562749(0x1ee)](_0x34d959);}export function realOrResolved(_0x2e7bca){try{return realpathSync(_0x2e7bca);}catch{return resolve(_0x2e7bca);}}export function lstatIfPresent(_0x197163){try{return lstatSync(_0x197163);}catch{return undefined;}}export function writeTextAtomic(_0x36bc0a,_0xdf5b12,_0x592867){const _0x9b28d1=a99_0x22f9;writeBytesAtomic(_0x36bc0a,Buffer[_0x9b28d1(0x1fc)](_0xdf5b12,_0x9b28d1(0x1f2)),_0x592867);}export function writeBytesAtomic(_0xc7b84d,_0x261162,_0x3dbdc9){const _0x5cc4bc=_0xc7b84d+'.tmp';try{writeFileSync(_0x5cc4bc,_0x261162,{'mode':_0x3dbdc9}),renameSync(_0x5cc4bc,_0xc7b84d);}catch(_0x3e6c94){try{rmSync(_0x5cc4bc,{'force':!![]});}catch{}throw _0x3e6c94;}}export function writeJsonAtomic(_0x573d8c,_0x3d392f){const _0xa5fbc4=a99_0x22f9;writeTextAtomic(_0x573d8c,JSON[_0xa5fbc4(0x1fa)](_0x3d392f,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x3489ac,_0x1e0057){const _0xd0d913=a99_0x13e7,_0x13b7b9=_0x3489ac();while(!![]){try{const _0xd2860d=parseInt(_0xd0d913(0xcb))/0x1*(parseInt(_0xd0d913(0xd7))/0x2)+-parseInt(_0xd0d913(0xd0))/0x3+-parseInt(_0xd0d913(0xd3))/0x4+parseInt(_0xd0d913(0xce))/0x5*(parseInt(_0xd0d913(0xd9))/0x6)+-parseInt(_0xd0d913(0xcf))/0x7+parseInt(_0xd0d913(0xd2))/0x8*(-parseInt(_0xd0d913(0xd4))/0x9)+parseInt(_0xd0d913(0xd1))/0xa;if(_0xd2860d===_0x1e0057)break;else _0x13b7b9['push'](_0x13b7b9['shift']());}catch(_0xf70541){_0x13b7b9['push'](_0x13b7b9['shift']());}}}(a99_0x4489,0x31975));import{createHash}from'node:crypto';function a99_0x13e7(_0x18df9d,_0x1d1406){_0x18df9d=_0x18df9d-0xcb;const _0x448993=a99_0x4489();let _0x13e7b5=_0x448993[_0x18df9d];return _0x13e7b5;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x41b8fe){const _0x4bf0f3=a99_0x13e7;return createHash(_0x4bf0f3(0xd5))[_0x4bf0f3(0xd8)](_0x41b8fe)['digest'](_0x4bf0f3(0xcc));}export function fileHash(_0xb34ba2){return bufferSha256(fileContent(_0xb34ba2));}export function bufferSha256(_0x8cd0cf){const _0x41cb08=a99_0x13e7;return createHash('sha256')['update'](_0x8cd0cf)[_0x41cb08(0xcd)](_0x41cb08(0xcc));}export function fileTreeHash(_0x11a845){const _0x508a92=a99_0x13e7,_0x5bd335=createHash(_0x508a92(0xd5));for(const _0x16d49d of normalizeManifestFiles(_0x11a845)){_0x5bd335[_0x508a92(0xd8)](_0x16d49d[_0x508a92(0xd6)]),_0x5bd335[_0x508a92(0xd8)]('\x00'),_0x5bd335[_0x508a92(0xd8)](_0x16d49d[_0x508a92(0xd5)]),_0x5bd335[_0x508a92(0xd8)]('\x00'),_0x5bd335[_0x508a92(0xd8)](String(_0x16d49d['size'])),_0x5bd335[_0x508a92(0xd8)]('\x00');}return _0x5bd335[_0x508a92(0xcd)]('hex');}function a99_0x4489(){const _0x2665d4=['8GhFSfk','1037772cwVdEh','1893492dpCWvt','sha256','path','402652fhMiZe','update','78YogTbM','1bratqD','hex','digest','105035HIldBI','1816255oapLST','315306jhKVBD','5631060OMnWwN'];a99_0x4489=function(){return _0x2665d4;};return a99_0x4489();}
1
+ (function(_0x2387b1,_0x3e689b){const _0x34fc33=a100_0x57c8,_0x1a0037=_0x2387b1();while(!![]){try{const _0x1375e4=-parseInt(_0x34fc33(0x133))/0x1+-parseInt(_0x34fc33(0x132))/0x2*(-parseInt(_0x34fc33(0x136))/0x3)+-parseInt(_0x34fc33(0x137))/0x4*(parseInt(_0x34fc33(0x131))/0x5)+parseInt(_0x34fc33(0x130))/0x6*(-parseInt(_0x34fc33(0x139))/0x7)+-parseInt(_0x34fc33(0x135))/0x8*(parseInt(_0x34fc33(0x138))/0x9)+parseInt(_0x34fc33(0x12e))/0xa+parseInt(_0x34fc33(0x134))/0xb*(parseInt(_0x34fc33(0x12c))/0xc);if(_0x1375e4===_0x3e689b)break;else _0x1a0037['push'](_0x1a0037['shift']());}catch(_0x11ad17){_0x1a0037['push'](_0x1a0037['shift']());}}}(a100_0x29a4,0x1c8d4));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x25eaea){const _0x273083=a100_0x57c8;return createHash(_0x273083(0x12f))['update'](_0x25eaea)[_0x273083(0x12d)](_0x273083(0x12a));}export function fileHash(_0x46053b){return bufferSha256(fileContent(_0x46053b));}export function bufferSha256(_0x5c1046){const _0x50e7a4=a100_0x57c8;return createHash(_0x50e7a4(0x12f))[_0x50e7a4(0x128)](_0x5c1046)[_0x50e7a4(0x12d)]('hex');}function a100_0x29a4(){const _0x3da6cd=['46204HBlKBT','18edBuai','308jXNoJG','update','path','hex','size','12QfDNWR','digest','1295660HBGEWc','sha256','2712THdncf','100gbKsWW','74IfJvtp','132159UwlKlc','3249015wXVRrG','103112XOiDaB','8178yHyxoI'];a100_0x29a4=function(){return _0x3da6cd;};return a100_0x29a4();}function a100_0x57c8(_0x558ad0,_0x29b25b){_0x558ad0=_0x558ad0-0x128;const _0x29a43a=a100_0x29a4();let _0x57c8fd=_0x29a43a[_0x558ad0];return _0x57c8fd;}export function fileTreeHash(_0x4d01b6){const _0x4502ef=a100_0x57c8,_0x58c1e2=createHash(_0x4502ef(0x12f));for(const _0x2b0a4c of normalizeManifestFiles(_0x4d01b6)){_0x58c1e2[_0x4502ef(0x128)](_0x2b0a4c[_0x4502ef(0x129)]),_0x58c1e2[_0x4502ef(0x128)]('\x00'),_0x58c1e2['update'](_0x2b0a4c[_0x4502ef(0x12f)]),_0x58c1e2[_0x4502ef(0x128)]('\x00'),_0x58c1e2['update'](String(_0x2b0a4c[_0x4502ef(0x12b)])),_0x58c1e2['update']('\x00');}return _0x58c1e2[_0x4502ef(0x12d)](_0x4502ef(0x12a));}
@@ -1 +1 @@
1
- (function(_0xbc437f,_0x42dad2){const _0xf3e765=a100_0x8073,_0x78963b=_0xbc437f();while(!![]){try{const _0x37f515=-parseInt(_0xf3e765(0x19c))/0x1*(parseInt(_0xf3e765(0x17e))/0x2)+-parseInt(_0xf3e765(0x198))/0x3+parseInt(_0xf3e765(0x188))/0x4+parseInt(_0xf3e765(0x17f))/0x5+-parseInt(_0xf3e765(0x18f))/0x6*(-parseInt(_0xf3e765(0x182))/0x7)+parseInt(_0xf3e765(0x195))/0x8+parseInt(_0xf3e765(0x1a9))/0x9;if(_0x37f515===_0x42dad2)break;else _0x78963b['push'](_0x78963b['shift']());}catch(_0x209a14){_0x78963b['push'](_0x78963b['shift']());}}}(a100_0x4b3e,0x36163));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a100_0x55dc3d from'fs-extra';import{CliErrors}from'../../errors.js';function a100_0x8073(_0x498c88,_0x504bd8){_0x498c88=_0x498c88-0x17e;const _0x4b3e5b=a100_0x4b3e();let _0x8073b3=_0x4b3e5b[_0x498c88];return _0x8073b3;}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_0x55dc3d;export function linkEffectiveRuntimeSkills(_0x3a96c3,_0x1c560c,_0x44e226={}){const _0x39e1bd=a100_0x8073,_0x304c4e=new Map();for(const _0x3734f5 of _0x3a96c3){const _0x7de34d=_0x3734f5[_0x39e1bd(0x19d)][_0x39e1bd(0x191)];if(!_0x7de34d)continue;const _0x2da51f=_0x304c4e[_0x39e1bd(0x18b)](_0x7de34d);(!_0x2da51f||_0x3734f5[_0x39e1bd(0x19f)]===_0x39e1bd(0x1a4))&&_0x304c4e['set'](_0x7de34d,_0x3734f5);}const _0x22a9ce=[],_0x2a69dd=resolveSkillSyncPaths(_0x44e226);for(const _0x594280 of _0x304c4e['values']()){const _0x47e0a4=requireSkillCode(_0x594280[_0x39e1bd(0x19d)]),_0x266bc5=_0x1c560c+'--'+_0x47e0a4;for(const _0x147310 of runtimeAgentSkillRoots(_0x2a69dd)){_0x22a9ce[_0x39e1bd(0x18e)](ensureManagedSymlink(resolve(_0x147310,_0x266bc5),_0x594280[_0x39e1bd(0x1a1)],_0x2a69dd[_0x39e1bd(0x194)]));}}return _0x22a9ce;}export function pruneStaleRuntimeSkillLinks(_0x567a17,_0x5f081f,_0x8be93e={},_0x4b6961){const _0x21f55e=a100_0x8073,_0x349aa1=resolveSkillSyncPaths(_0x8be93e),_0x526918=new Set([..._0x5f081f][_0x21f55e(0x186)](_0x3ba788=>_0x3ba788[_0x21f55e(0x18a)]())['filter'](Boolean)),_0x28e9dd=_0x4b6961?new Set([..._0x4b6961][_0x21f55e(0x186)](_0xfaeb42=>_0xfaeb42[_0x21f55e(0x18a)]())[_0x21f55e(0x197)](Boolean)):undefined,_0x32c0cd=[];for(const _0xc94637 of runtimeAgentSkillRoots(_0x349aa1)){for(const _0x5d5f8c of managedAppSkillLinkPaths(_0xc94637,_0x567a17)){const _0x1c65f2=basename(_0x5d5f8c)[_0x21f55e(0x183)]((_0x567a17+'--')[_0x21f55e(0x189)]);if(_0x28e9dd&&!_0x28e9dd['has'](_0x1c65f2))continue;if(_0x526918['has'](_0x1c65f2))continue;_0x32c0cd['push'](removeManagedSkillLink(_0x5d5f8c,_0x349aa1[_0x21f55e(0x194)]));}}return _0x32c0cd;}export function pruneStaleRuntimeSkillCache(_0x451f68,_0x1cd711={}){const _0x4b049d=a100_0x8073,_0x3b3ef2=new Set([..._0x451f68[_0x4b049d(0x1a0)]]['map'](_0x15d09c=>_0x15d09c[_0x4b049d(0x18a)]())[_0x4b049d(0x197)](Boolean)),_0x1e1fd0=_0x451f68['pruneSkillCodes']?new Set([..._0x451f68[_0x4b049d(0x193)]][_0x4b049d(0x186)](_0x411321=>_0x411321[_0x4b049d(0x18a)]())[_0x4b049d(0x197)](Boolean)):undefined,_0x32b2cd=_0x451f68[_0x4b049d(0x19b)]??[_0x4b049d(0x1a4),_0x4b049d(0x1ab)],_0x4caf96=resolve(getRuntimeSkillCacheRoot(_0x451f68['env'],_0x451f68['accessKey'],_0x1cd711),safePathSegment(_0x451f68[_0x4b049d(0x19e)],_0x4b049d(0x19e))),_0xb53576=[];for(const _0x2be327 of _0x32b2cd){const _0xd3bdf5=resolve(_0x4caf96,_0x2be327);if(!existsSync(_0xd3bdf5))continue;for(const _0x2e48f8 of readdirSync(_0xd3bdf5,{'withFileTypes':!![]})){if(!_0x2e48f8[_0x4b049d(0x181)]())continue;const _0x230426=_0x2e48f8['name'];if(_0x1e1fd0&&!_0x1e1fd0[_0x4b049d(0x1a8)](_0x230426))continue;if(_0x3b3ef2['has'](_0x230426))continue;const _0x51f289=resolve(_0xd3bdf5,_0x230426),_0x4d2693=readMetadataIfPresent(resolve(_0x51f289,METADATA_FILE));if(_0x4d2693?.[_0x4b049d(0x19e)]!==_0x451f68[_0x4b049d(0x19e)]||_0x4d2693['scope']!==_0x2be327||_0x4d2693[_0x4b049d(0x191)]!==_0x230426){_0xb53576[_0x4b049d(0x18e)]({'path':_0x51f289,'action':_0x4b049d(0x1a3),'reason':_0x4b049d(0x185)});continue;}removeSync(_0x51f289),_0xb53576[_0x4b049d(0x18e)]({'path':_0x51f289,'action':_0x4b049d(0x190)});}}return _0xb53576;}export function linkGlobalRuntimeSkills(_0x12a580,_0x428845={}){const _0x47189b=a100_0x8073,_0x5a8d7e=resolveSkillSyncPaths(_0x428845),_0x5bc029=[];for(const _0x1066a1 of _0x12a580){if(_0x1066a1[_0x47189b(0x19f)]!==_0x47189b(0x180))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x1066a1[_0x47189b(0x19f)]);const _0x4b938c=requireSkillCode(_0x1066a1[_0x47189b(0x19d)]),_0x102bb9=copyManagedSkillDirectory(_0x1066a1[_0x47189b(0x1a1)],resolve(_0x5a8d7e[_0x47189b(0x192)],_0x4b938c));_0x5bc029[_0x47189b(0x18e)]({..._0x102bb9,'contentHash':_0x1066a1['contentHash']});}return _0x5bc029;}function ensureManagedSymlink(_0x21b758,_0x301a65,_0x18ee0b){const _0x5be49a=a100_0x8073;mkdirSync(dirname(_0x21b758),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x21b758)||isDanglingSymlink(_0x21b758)){const _0x10a633=lstatSync(_0x21b758);if(!_0x10a633[_0x5be49a(0x1a2)]())throw CliErrors['validation'](_0x5be49a(0x18c)+_0x21b758);const _0x3f0170=resolveSymlinkTarget(_0x21b758);if(!isPathInside(realOrResolved(_0x3f0170),realOrResolved(_0x18ee0b)))throw CliErrors[_0x5be49a(0x196)](_0x5be49a(0x1ae)+_0x21b758);if(realOrResolved(_0x3f0170)===realOrResolved(_0x301a65))return{'path':_0x21b758,'target':_0x301a65,'action':_0x5be49a(0x1a7)};return unlinkSync(_0x21b758),symlinkSync(_0x301a65,_0x21b758,'dir'),{'path':_0x21b758,'target':_0x301a65,'action':'updated'};}return symlinkSync(_0x301a65,_0x21b758,_0x5be49a(0x1a1)),{'path':_0x21b758,'target':_0x301a65,'action':'created'};}function managedAppSkillLinkPaths(_0x2b16ec,_0x5a5bf9){const _0x42b45a=a100_0x8073;if(!existsSync(_0x2b16ec))return[];const _0x4ed4f6=_0x5a5bf9+'--';return readdirSync(_0x2b16ec,{'withFileTypes':!![]})[_0x42b45a(0x197)](_0x434963=>_0x434963[_0x42b45a(0x184)][_0x42b45a(0x1aa)](_0x4ed4f6))[_0x42b45a(0x186)](_0x30090f=>resolve(_0x2b16ec,_0x30090f[_0x42b45a(0x184)]));}function removeManagedSkillLink(_0x1950df,_0x4da55b){const _0x4ed5e4=a100_0x8073,_0x16ef16=lstatIfPresent(_0x1950df);if(!_0x16ef16?.[_0x4ed5e4(0x1a2)]())return{'path':_0x1950df,'action':_0x4ed5e4(0x1a3),'reason':_0x4ed5e4(0x1ac)};const _0x4e39fb=resolveSymlinkTarget(_0x1950df);if(!isPathInside(realOrResolved(_0x4e39fb),realOrResolved(_0x4da55b)))return{'path':_0x1950df,'action':_0x4ed5e4(0x1a3),'reason':'external-symlink'};return unlinkSync(_0x1950df),{'path':_0x1950df,'action':_0x4ed5e4(0x190)};}export function copyManagedSkillDirectory(_0x4200bf,_0x88f67){const _0x2e632b=a100_0x8073,_0x3d20ad=resolve(_0x88f67,METADATA_FILE),_0xcdbff5=existsSync(_0x88f67);if(_0xcdbff5){const _0x32d4b5=lstatSync(_0x88f67);if(_0x32d4b5[_0x2e632b(0x1a2)]())throw CliErrors[_0x2e632b(0x196)](_0x2e632b(0x19a)+_0x88f67);if(!_0x32d4b5[_0x2e632b(0x181)]())throw CliErrors['validation'](_0x2e632b(0x187)+_0x88f67);const _0x1c708c=readMetadataIfPresent(_0x3d20ad);if(_0x1c708c?.[_0x2e632b(0x19f)]!==_0x2e632b(0x180))throw CliErrors[_0x2e632b(0x196)](_0x2e632b(0x18d)+_0x88f67);}ensureDirSync(dirname(_0x88f67));const _0x4a0301=_0xcdbff5?readMetadataIfPresent(_0x3d20ad)?.['contentHash']:undefined,_0x1ea508=readMetadataIfPresent(resolve(_0x4200bf,METADATA_FILE))?.[_0x2e632b(0x199)];return _0xcdbff5&&removeSync(_0x88f67),copySkillDirectory(_0x4200bf,_0x88f67),{'path':_0x88f67,'target':_0x4200bf,'action':!_0xcdbff5?_0x2e632b(0x1ad):_0x4a0301===_0x1ea508?_0x2e632b(0x1a7):_0x2e632b(0x1a5)};}function a100_0x4b3e(){const _0x19335b=['skipped','personal','updated','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','unchanged','has','3126915QcXBmL','startsWith','company','not-managed-symlink','created','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','2pCYxXH','1597395wBtCvC','builtin','isDirectory','21CVGNTE','slice','name','metadata-mismatch','map','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','173656UcrgNv','length','trim','get','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','push','297186pINXDV','removed','skillCode','agentsSkillsDir','pruneSkillCodes','managedRoot','220736BKdCch','validation','filter','674013YPaRwR','contentHash','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','scopes','440303swQkuv','skill','appCode','scope','activeSkillCodes','dir','isSymbolicLink'];a100_0x4b3e=function(){return _0x19335b;};return a100_0x4b3e();}function copySkillDirectory(_0x98c006,_0x4ae516){copySync(_0x98c006,_0x4ae516,{'dereference':![],'overwrite':!![],'filter'(_0x4cccc1){const _0x5b1514=a100_0x8073;if(lstatSync(_0x4cccc1)[_0x5b1514(0x1a2)]())throw CliErrors['validation'](_0x5b1514(0x1a6)+_0x4cccc1);return!![];}});}
1
+ (function(_0x245d3a,_0x56d9c6){const _0x1ad0e=a101_0x151c,_0x3b9442=_0x245d3a();while(!![]){try{const _0x57e9fe=-parseInt(_0x1ad0e(0x1d5))/0x1*(parseInt(_0x1ad0e(0x1d1))/0x2)+parseInt(_0x1ad0e(0x1b5))/0x3+parseInt(_0x1ad0e(0x1c1))/0x4+parseInt(_0x1ad0e(0x1ab))/0x5*(-parseInt(_0x1ad0e(0x1cd))/0x6)+-parseInt(_0x1ad0e(0x1a6))/0x7*(parseInt(_0x1ad0e(0x1cc))/0x8)+-parseInt(_0x1ad0e(0x1be))/0x9*(parseInt(_0x1ad0e(0x1d0))/0xa)+parseInt(_0x1ad0e(0x1bf))/0xb*(parseInt(_0x1ad0e(0x1b6))/0xc);if(_0x57e9fe===_0x56d9c6)break;else _0x3b9442['push'](_0x3b9442['shift']());}catch(_0x4e8675){_0x3b9442['push'](_0x3b9442['shift']());}}}(a101_0x5e2d,0x3ad48));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a101_0x12ef64 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a101_0x5e2d(){const _0x39a021=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','815463LAZYKs','12YUYvVk','validation','unchanged','removed','personal','builtin','get','managedRoot','128556kPZpTt','4908497jTLrSV','trim','1597768PbaFFr','env','appCode','created','skillCode','has','contentHash','length','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','metadata-mismatch','updated','1730072zPKQNV','2610066JIKcVL','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skill','140iYkQpf','712nThVCC','values','accessKey','scopes','71hcrsZP','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','isSymbolicLink','company','7kxaSSg','set','filter','map','scope','5iblsZO','name','startsWith','isDirectory','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skipped','push','external-symlink','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'];a101_0x5e2d=function(){return _0x39a021;};return a101_0x5e2d();}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}=a101_0x12ef64;export function linkEffectiveRuntimeSkills(_0x85caa6,_0x26a467,_0x1c3d26={}){const _0x270839=a101_0x151c,_0x320ba9=new Map();for(const _0x46e574 of _0x85caa6){const _0x11d205=_0x46e574[_0x270839(0x1cf)][_0x270839(0x1c5)];if(!_0x11d205)continue;const _0x351113=_0x320ba9[_0x270839(0x1bc)](_0x11d205);(!_0x351113||_0x46e574[_0x270839(0x1aa)]===_0x270839(0x1ba))&&_0x320ba9[_0x270839(0x1a7)](_0x11d205,_0x46e574);}const _0x3df0d6=[],_0x165a74=resolveSkillSyncPaths(_0x1c3d26);for(const _0x256de9 of _0x320ba9[_0x270839(0x1d2)]()){const _0x361825=requireSkillCode(_0x256de9['skill']),_0x5990a8=_0x26a467+'--'+_0x361825;for(const _0x1a9326 of runtimeAgentSkillRoots(_0x165a74)){_0x3df0d6[_0x270839(0x1b1)](ensureManagedSymlink(resolve(_0x1a9326,_0x5990a8),_0x256de9[_0x270839(0x1d6)],_0x165a74[_0x270839(0x1bd)]));}}return _0x3df0d6;}export function pruneStaleRuntimeSkillLinks(_0x59e3ef,_0x267761,_0xfb08ca={},_0x592721){const _0x31949c=a101_0x151c,_0x21aafd=resolveSkillSyncPaths(_0xfb08ca),_0x415fbe=new Set([..._0x267761]['map'](_0x1470af=>_0x1470af[_0x31949c(0x1c0)]())[_0x31949c(0x1a8)](Boolean)),_0x52d7fa=_0x592721?new Set([..._0x592721][_0x31949c(0x1a9)](_0x425d7a=>_0x425d7a[_0x31949c(0x1c0)]())['filter'](Boolean)):undefined,_0xb10f46=[];for(const _0xa185f5 of runtimeAgentSkillRoots(_0x21aafd)){for(const _0x3f14fb of managedAppSkillLinkPaths(_0xa185f5,_0x59e3ef)){const _0x396ea0=basename(_0x3f14fb)['slice']((_0x59e3ef+'--')[_0x31949c(0x1c8)]);if(_0x52d7fa&&!_0x52d7fa['has'](_0x396ea0))continue;if(_0x415fbe['has'](_0x396ea0))continue;_0xb10f46['push'](removeManagedSkillLink(_0x3f14fb,_0x21aafd[_0x31949c(0x1bd)]));}}return _0xb10f46;}export function pruneStaleRuntimeSkillCache(_0x30e981,_0x9855e5={}){const _0x12c40c=a101_0x151c,_0x35f9ed=new Set([..._0x30e981['activeSkillCodes']][_0x12c40c(0x1a9)](_0x26f789=>_0x26f789[_0x12c40c(0x1c0)]())[_0x12c40c(0x1a8)](Boolean)),_0x4bc2bc=_0x30e981['pruneSkillCodes']?new Set([..._0x30e981['pruneSkillCodes']]['map'](_0x2ef328=>_0x2ef328[_0x12c40c(0x1c0)]())[_0x12c40c(0x1a8)](Boolean)):undefined,_0x511e8e=_0x30e981[_0x12c40c(0x1d4)]??[_0x12c40c(0x1ba),_0x12c40c(0x1d9)],_0x19f6da=resolve(getRuntimeSkillCacheRoot(_0x30e981[_0x12c40c(0x1c2)],_0x30e981[_0x12c40c(0x1d3)],_0x9855e5),safePathSegment(_0x30e981['appCode'],_0x12c40c(0x1c3))),_0x47b1a2=[];for(const _0x5da3ba of _0x511e8e){const _0x15a5e7=resolve(_0x19f6da,_0x5da3ba);if(!existsSync(_0x15a5e7))continue;for(const _0xead56 of readdirSync(_0x15a5e7,{'withFileTypes':!![]})){if(!_0xead56['isDirectory']())continue;const _0xc957e4=_0xead56[_0x12c40c(0x1ac)];if(_0x4bc2bc&&!_0x4bc2bc['has'](_0xc957e4))continue;if(_0x35f9ed[_0x12c40c(0x1c6)](_0xc957e4))continue;const _0x161377=resolve(_0x15a5e7,_0xc957e4),_0x2534ce=readMetadataIfPresent(resolve(_0x161377,METADATA_FILE));if(_0x2534ce?.[_0x12c40c(0x1c3)]!==_0x30e981[_0x12c40c(0x1c3)]||_0x2534ce['scope']!==_0x5da3ba||_0x2534ce['skillCode']!==_0xc957e4){_0x47b1a2[_0x12c40c(0x1b1)]({'path':_0x161377,'action':_0x12c40c(0x1b0),'reason':_0x12c40c(0x1ca)});continue;}removeSync(_0x161377),_0x47b1a2['push']({'path':_0x161377,'action':_0x12c40c(0x1b9)});}}return _0x47b1a2;}export function linkGlobalRuntimeSkills(_0x1ac744,_0x19d108={}){const _0x118d6d=a101_0x151c,_0x2ac260=resolveSkillSyncPaths(_0x19d108),_0x27c8ab=[];for(const _0x4cdf3f of _0x1ac744){if(_0x4cdf3f[_0x118d6d(0x1aa)]!==_0x118d6d(0x1bb))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x4cdf3f[_0x118d6d(0x1aa)]);const _0x231c2d=requireSkillCode(_0x4cdf3f[_0x118d6d(0x1cf)]),_0x5510bd=copyManagedSkillDirectory(_0x4cdf3f['dir'],resolve(_0x2ac260['agentsSkillsDir'],_0x231c2d));_0x27c8ab[_0x118d6d(0x1b1)]({..._0x5510bd,'contentHash':_0x4cdf3f[_0x118d6d(0x1c7)]});}return _0x27c8ab;}function a101_0x151c(_0x2fc6d1,_0x4182b1){_0x2fc6d1=_0x2fc6d1-0x1a6;const _0x5e2d43=a101_0x5e2d();let _0x151cf0=_0x5e2d43[_0x2fc6d1];return _0x151cf0;}function ensureManagedSymlink(_0x24f536,_0x59cf03,_0x5e5079){const _0x509a90=a101_0x151c;mkdirSync(dirname(_0x24f536),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x24f536)||isDanglingSymlink(_0x24f536)){const _0x44c6ca=lstatSync(_0x24f536);if(!_0x44c6ca['isSymbolicLink']())throw CliErrors[_0x509a90(0x1b7)](_0x509a90(0x1b3)+_0x24f536);const _0xffb0e6=resolveSymlinkTarget(_0x24f536);if(!isPathInside(realOrResolved(_0xffb0e6),realOrResolved(_0x5e5079)))throw CliErrors[_0x509a90(0x1b7)](_0x509a90(0x1ce)+_0x24f536);if(realOrResolved(_0xffb0e6)===realOrResolved(_0x59cf03))return{'path':_0x24f536,'target':_0x59cf03,'action':_0x509a90(0x1b8)};return unlinkSync(_0x24f536),symlinkSync(_0x59cf03,_0x24f536,'dir'),{'path':_0x24f536,'target':_0x59cf03,'action':'updated'};}return symlinkSync(_0x59cf03,_0x24f536,_0x509a90(0x1d6)),{'path':_0x24f536,'target':_0x59cf03,'action':_0x509a90(0x1c4)};}function managedAppSkillLinkPaths(_0x2f4e7c,_0x20710b){const _0x212c8d=a101_0x151c;if(!existsSync(_0x2f4e7c))return[];const _0x3f57c1=_0x20710b+'--';return readdirSync(_0x2f4e7c,{'withFileTypes':!![]})[_0x212c8d(0x1a8)](_0x4a1cba=>_0x4a1cba['name'][_0x212c8d(0x1ad)](_0x3f57c1))[_0x212c8d(0x1a9)](_0x5a503a=>resolve(_0x2f4e7c,_0x5a503a[_0x212c8d(0x1ac)]));}function removeManagedSkillLink(_0x3d7c14,_0x2475a4){const _0x15b479=a101_0x151c,_0x3cbecc=lstatIfPresent(_0x3d7c14);if(!_0x3cbecc?.[_0x15b479(0x1d8)]())return{'path':_0x3d7c14,'action':_0x15b479(0x1b0),'reason':'not-managed-symlink'};const _0x543423=resolveSymlinkTarget(_0x3d7c14);if(!isPathInside(realOrResolved(_0x543423),realOrResolved(_0x2475a4)))return{'path':_0x3d7c14,'action':_0x15b479(0x1b0),'reason':_0x15b479(0x1b2)};return unlinkSync(_0x3d7c14),{'path':_0x3d7c14,'action':_0x15b479(0x1b9)};}export function copyManagedSkillDirectory(_0x24fefd,_0x107022){const _0x1bf83c=a101_0x151c,_0x486c40=resolve(_0x107022,METADATA_FILE),_0x47cc95=existsSync(_0x107022);if(_0x47cc95){const _0x8dcda0=lstatSync(_0x107022);if(_0x8dcda0[_0x1bf83c(0x1d8)]())throw CliErrors[_0x1bf83c(0x1b7)](_0x1bf83c(0x1c9)+_0x107022);if(!_0x8dcda0[_0x1bf83c(0x1ae)]())throw CliErrors['validation'](_0x1bf83c(0x1af)+_0x107022);const _0x525b79=readMetadataIfPresent(_0x486c40);if(_0x525b79?.['scope']!==_0x1bf83c(0x1bb))throw CliErrors['validation'](_0x1bf83c(0x1d7)+_0x107022);}ensureDirSync(dirname(_0x107022));const _0x1be41a=_0x47cc95?readMetadataIfPresent(_0x486c40)?.['contentHash']:undefined,_0x5321d2=readMetadataIfPresent(resolve(_0x24fefd,METADATA_FILE))?.[_0x1bf83c(0x1c7)];return _0x47cc95&&removeSync(_0x107022),copySkillDirectory(_0x24fefd,_0x107022),{'path':_0x107022,'target':_0x24fefd,'action':!_0x47cc95?'created':_0x1be41a===_0x5321d2?'unchanged':_0x1bf83c(0x1cb)};}function copySkillDirectory(_0xd6326e,_0x4d93d1){copySync(_0xd6326e,_0x4d93d1,{'dereference':![],'overwrite':!![],'filter'(_0x337259){const _0x184bc9=a101_0x151c;if(lstatSync(_0x337259)[_0x184bc9(0x1d8)]())throw CliErrors[_0x184bc9(0x1b7)](_0x184bc9(0x1b4)+_0x337259);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x1b950d,_0x3092c9){const _0x1572b0=a101_0x2b98,_0x575347=_0x1b950d();while(!![]){try{const _0x6bf0bc=-parseInt(_0x1572b0(0x1ec))/0x1*(parseInt(_0x1572b0(0x1ef))/0x2)+parseInt(_0x1572b0(0x1f1))/0x3+-parseInt(_0x1572b0(0x1cf))/0x4*(-parseInt(_0x1572b0(0x1da))/0x5)+-parseInt(_0x1572b0(0x1d1))/0x6+-parseInt(_0x1572b0(0x1d9))/0x7*(parseInt(_0x1572b0(0x1d3))/0x8)+parseInt(_0x1572b0(0x1cc))/0x9*(-parseInt(_0x1572b0(0x1e6))/0xa)+parseInt(_0x1572b0(0x1ed))/0xb*(parseInt(_0x1572b0(0x1dd))/0xc);if(_0x6bf0bc===_0x3092c9)break;else _0x575347['push'](_0x575347['shift']());}catch(_0xdf481e){_0x575347['push'](_0x575347['shift']());}}}(a101_0x4bbe,0x30862));function a101_0x2b98(_0x1c8135,_0x13ef5e){_0x1c8135=_0x1c8135-0x1cc;const _0x4bbef1=a101_0x4bbe();let _0x2b989f=_0x4bbef1[_0x1c8135];return _0x2b989f;}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a101_0x4bbe(){const _0x429387=['linkedPath','builtin','10BTrSJE','link','sort','startsWith','set','source','7dsJKDs','927751Buwpik','scopes','12346mJnKUT','map','202047JmHFlH','trim','scope','cacheDir','push','env','metadataPath','name','includes','3105414megTEX','has','skillMdPath','4RHfYzX','appCode','1422396jVzFXV','filter','3368ZIQbyu','dir','cache','tags','code','linkedPaths','6244OXViMW','179135Lkczjx','isDirectory','isArray','156RjDpDC','skillCode','from','get','values','isSymbolicLink','localeCompare'];a101_0x4bbe=function(){return _0x429387;};return a101_0x4bbe();}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x22adaa,_0x6d97b1={}){const _0x4cfb1b=a101_0x2b98,_0x1558fb=safePathSegment(_0x22adaa['appCode'],_0x4cfb1b(0x1d0)),_0x45503c=normalizeRuntimeSkillScopes(_0x22adaa[_0x4cfb1b(0x1ee)]),_0x11603a=new Set(_0x45503c),_0x1111ac=_0x22adaa[_0x4cfb1b(0x1d7)]?.[_0x4cfb1b(0x1f2)](),_0x14a9a5=new Map(),_0x3f1907=resolve(getRuntimeSkillCacheRoot(_0x22adaa[_0x4cfb1b(0x1f6)],_0x22adaa['accessKey'],_0x6d97b1),_0x1558fb);for(const _0x165d22 of _0x45503c){for(const _0x3eb56e of localSkillEntryDirs(resolve(_0x3f1907,_0x165d22))){collectLocalRuntimeSkill(_0x14a9a5,_0x3eb56e,{'appCode':_0x1558fb,'scopes':_0x11603a,'code':_0x1111ac,'source':_0x4cfb1b(0x1d5)});}}const _0xb413ba=resolveSkillSyncPaths(_0x6d97b1);for(const _0x5e355b of runtimeAgentSkillRoots(_0xb413ba)){for(const _0x218bda of localSkillLinkCandidates(_0x5e355b,_0x1558fb,_0x11603a)){collectLocalRuntimeSkill(_0x14a9a5,_0x218bda,{'appCode':_0x1558fb,'scopes':_0x11603a,'code':_0x1111ac,'source':_0x4cfb1b(0x1e7),'linkedPath':_0x218bda});}}return Array[_0x4cfb1b(0x1df)](_0x14a9a5[_0x4cfb1b(0x1e1)]())[_0x4cfb1b(0x1e8)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x10c106){const _0x50b27d=a101_0x2b98;if(!existsSync(_0x10c106))return[];return readdirSync(_0x10c106,{'withFileTypes':!![]})[_0x50b27d(0x1d2)](_0x4ddd4f=>_0x4ddd4f[_0x50b27d(0x1db)]()||_0x4ddd4f[_0x50b27d(0x1e2)]())[_0x50b27d(0x1f0)](_0x215b55=>resolve(_0x10c106,_0x215b55['name']));}function localSkillLinkCandidates(_0x4aa7e3,_0x191f5f,_0x3dc5af){const _0x2f3a82=a101_0x2b98;if(!existsSync(_0x4aa7e3))return[];const _0x4f2c81=_0x191f5f+'--';return readdirSync(_0x4aa7e3,{'withFileTypes':!![]})[_0x2f3a82(0x1d2)](_0x43961c=>_0x43961c[_0x2f3a82(0x1db)]()||_0x43961c[_0x2f3a82(0x1e2)]())[_0x2f3a82(0x1d2)](_0x491c95=>_0x491c95['name'][_0x2f3a82(0x1e9)](_0x4f2c81)||_0x3dc5af[_0x2f3a82(0x1cd)](_0x2f3a82(0x1e5)))[_0x2f3a82(0x1f0)](_0x1f5c66=>resolve(_0x4aa7e3,_0x1f5c66[_0x2f3a82(0x1f8)]));}function collectLocalRuntimeSkill(_0x157fa4,_0x32d901,_0x3d330e){const _0x24ffe7=a101_0x2b98,_0x399e93=resolve(_0x32d901,METADATA_FILE),_0x5ea0c2=readMetadataIfPresent(_0x399e93);if(!_0x5ea0c2)return;if(_0x5ea0c2[_0x24ffe7(0x1d0)]!==_0x3d330e[_0x24ffe7(0x1d0)])return;if(!isRuntimeSkillScope(_0x5ea0c2[_0x24ffe7(0x1f3)])||!_0x3d330e['scopes'][_0x24ffe7(0x1cd)](_0x5ea0c2[_0x24ffe7(0x1f3)]))return;const _0x4953c3=_0x5ea0c2[_0x24ffe7(0x1de)]?.['trim']();if(!_0x4953c3)return;if(_0x3d330e['code']&&_0x4953c3!==_0x3d330e[_0x24ffe7(0x1d7)])return;const _0x10e022=_0x5ea0c2[_0x24ffe7(0x1f3)]+':'+_0x4953c3,_0x3aaef1=_0x3d330e[_0x24ffe7(0x1e4)]?[_0x3d330e['linkedPath']]:[],_0x13eda1=_0x157fa4[_0x24ffe7(0x1e0)](_0x10e022);if(_0x13eda1){_0x3d330e[_0x24ffe7(0x1eb)]===_0x24ffe7(0x1d5)&&(_0x13eda1[_0x24ffe7(0x1d4)]=_0x32d901,_0x13eda1[_0x24ffe7(0x1f4)]=_0x32d901,_0x13eda1[_0x24ffe7(0x1ce)]=resolve(_0x32d901,SKILL_FILE),_0x13eda1[_0x24ffe7(0x1f7)]=_0x399e93);for(const _0x178e95 of _0x3aaef1){!_0x13eda1[_0x24ffe7(0x1d8)][_0x24ffe7(0x1f9)](_0x178e95)&&_0x13eda1[_0x24ffe7(0x1d8)][_0x24ffe7(0x1f5)](_0x178e95);}_0x13eda1[_0x24ffe7(0x1d8)][_0x24ffe7(0x1e8)]();return;}_0x157fa4[_0x24ffe7(0x1ea)](_0x10e022,{..._0x5ea0c2,'tags':Array[_0x24ffe7(0x1dc)](_0x5ea0c2['tags'])?_0x5ea0c2[_0x24ffe7(0x1d6)]:[],'scope':_0x5ea0c2[_0x24ffe7(0x1f3)],'source':'local','dir':_0x32d901,'cacheDir':_0x3d330e[_0x24ffe7(0x1eb)]==='cache'?_0x32d901:undefined,'skillMdPath':resolve(_0x32d901,SKILL_FILE),'metadataPath':_0x399e93,'linkedPaths':_0x3aaef1});}function compareLocalRuntimeSkills(_0x4ca22a,_0x4d073f){const _0x123ace=a101_0x2b98,_0x58d78b={'personal':0x0,'company':0x1,'builtin':0x2};return _0x58d78b[_0x4ca22a[_0x123ace(0x1f3)]]-_0x58d78b[_0x4d073f['scope']]||_0x4ca22a['skillCode'][_0x123ace(0x1e3)](_0x4d073f[_0x123ace(0x1de)])||_0x4ca22a[_0x123ace(0x1d4)][_0x123ace(0x1e3)](_0x4d073f[_0x123ace(0x1d4)]);}
1
+ (function(_0x33150c,_0x5b1568){const _0x2aa0d=a102_0x132e,_0x1b6ac4=_0x33150c();while(!![]){try{const _0x19464c=-parseInt(_0x2aa0d(0x1db))/0x1*(parseInt(_0x2aa0d(0x1d4))/0x2)+parseInt(_0x2aa0d(0x1d6))/0x3+parseInt(_0x2aa0d(0x1e0))/0x4*(parseInt(_0x2aa0d(0x1e6))/0x5)+parseInt(_0x2aa0d(0x1de))/0x6*(-parseInt(_0x2aa0d(0x1cf))/0x7)+parseInt(_0x2aa0d(0x1c9))/0x8*(-parseInt(_0x2aa0d(0x1c8))/0x9)+parseInt(_0x2aa0d(0x1ca))/0xa+-parseInt(_0x2aa0d(0x1e7))/0xb*(parseInt(_0x2aa0d(0x1cd))/0xc);if(_0x19464c===_0x5b1568)break;else _0x1b6ac4['push'](_0x1b6ac4['shift']());}catch(_0x100729){_0x1b6ac4['push'](_0x1b6ac4['shift']());}}}(a102_0x1346,0x2cc96));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a102_0x1346(){const _0x1d3b9b=['env','80599raTsuQ','from','isSymbolicLink','293310JFjrOU','cacheDir','587348ALutOk','trim','isArray','scope','builtin','includes','10KCkvOI','5198083EmgpIb','local','map','sort','cache','source','metadataPath','get','push','name','linkedPaths','startsWith','linkedPath','52506gWMozX','136EffmxU','2478630DmJmSk','code','skillMdPath','12REVQOu','localeCompare','7feOiNi','dir','values','has','tags','2pSMtWU','filter','1029372hiiIhz','skillCode','link','appCode'];a102_0x1346=function(){return _0x1d3b9b;};return a102_0x1346();}import{readMetadataIfPresent}from'./metadata.js';function a102_0x132e(_0x46f89d,_0x2c6c5f){_0x46f89d=_0x46f89d-0x1be;const _0x1346e0=a102_0x1346();let _0x132ee8=_0x1346e0[_0x46f89d];return _0x132ee8;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x5696f9,_0xd4f6e9={}){const _0x130bf4=a102_0x132e,_0xe41249=safePathSegment(_0x5696f9[_0x130bf4(0x1d9)],_0x130bf4(0x1d9)),_0x26832e=normalizeRuntimeSkillScopes(_0x5696f9['scopes']),_0x5affff=new Set(_0x26832e),_0x11afc6=_0x5696f9['code']?.[_0x130bf4(0x1e1)](),_0x5384c7=new Map(),_0x406172=resolve(getRuntimeSkillCacheRoot(_0x5696f9[_0x130bf4(0x1da)],_0x5696f9['accessKey'],_0xd4f6e9),_0xe41249);for(const _0xa82896 of _0x26832e){for(const _0x5de5dc of localSkillEntryDirs(resolve(_0x406172,_0xa82896))){collectLocalRuntimeSkill(_0x5384c7,_0x5de5dc,{'appCode':_0xe41249,'scopes':_0x5affff,'code':_0x11afc6,'source':_0x130bf4(0x1bf)});}}const _0x88d6aa=resolveSkillSyncPaths(_0xd4f6e9);for(const _0x4d8604 of runtimeAgentSkillRoots(_0x88d6aa)){for(const _0x3cf59b of localSkillLinkCandidates(_0x4d8604,_0xe41249,_0x5affff)){collectLocalRuntimeSkill(_0x5384c7,_0x3cf59b,{'appCode':_0xe41249,'scopes':_0x5affff,'code':_0x11afc6,'source':_0x130bf4(0x1d8),'linkedPath':_0x3cf59b});}}return Array[_0x130bf4(0x1dc)](_0x5384c7[_0x130bf4(0x1d1)]())[_0x130bf4(0x1be)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x214648){const _0xcdf682=a102_0x132e;if(!existsSync(_0x214648))return[];return readdirSync(_0x214648,{'withFileTypes':!![]})[_0xcdf682(0x1d5)](_0x2221b4=>_0x2221b4['isDirectory']()||_0x2221b4[_0xcdf682(0x1dd)]())[_0xcdf682(0x1e9)](_0x580074=>resolve(_0x214648,_0x580074[_0xcdf682(0x1c4)]));}function localSkillLinkCandidates(_0x2d0a06,_0x366328,_0x24657b){const _0x549236=a102_0x132e;if(!existsSync(_0x2d0a06))return[];const _0x21c23e=_0x366328+'--';return readdirSync(_0x2d0a06,{'withFileTypes':!![]})['filter'](_0x3f1980=>_0x3f1980['isDirectory']()||_0x3f1980[_0x549236(0x1dd)]())[_0x549236(0x1d5)](_0x2e70c0=>_0x2e70c0[_0x549236(0x1c4)][_0x549236(0x1c6)](_0x21c23e)||_0x24657b['has'](_0x549236(0x1e4)))[_0x549236(0x1e9)](_0x256191=>resolve(_0x2d0a06,_0x256191[_0x549236(0x1c4)]));}function collectLocalRuntimeSkill(_0x44f154,_0x44e653,_0x4fc0a9){const _0xb35d52=a102_0x132e,_0x38845e=resolve(_0x44e653,METADATA_FILE),_0x10377d=readMetadataIfPresent(_0x38845e);if(!_0x10377d)return;if(_0x10377d['appCode']!==_0x4fc0a9['appCode'])return;if(!isRuntimeSkillScope(_0x10377d[_0xb35d52(0x1e3)])||!_0x4fc0a9['scopes'][_0xb35d52(0x1d2)](_0x10377d[_0xb35d52(0x1e3)]))return;const _0x23b67c=_0x10377d[_0xb35d52(0x1d7)]?.[_0xb35d52(0x1e1)]();if(!_0x23b67c)return;if(_0x4fc0a9[_0xb35d52(0x1cb)]&&_0x23b67c!==_0x4fc0a9['code'])return;const _0x1f7f9a=_0x10377d[_0xb35d52(0x1e3)]+':'+_0x23b67c,_0x19cb55=_0x4fc0a9['linkedPath']?[_0x4fc0a9[_0xb35d52(0x1c7)]]:[],_0x46edea=_0x44f154[_0xb35d52(0x1c2)](_0x1f7f9a);if(_0x46edea){_0x4fc0a9['source']===_0xb35d52(0x1bf)&&(_0x46edea[_0xb35d52(0x1d0)]=_0x44e653,_0x46edea[_0xb35d52(0x1df)]=_0x44e653,_0x46edea[_0xb35d52(0x1cc)]=resolve(_0x44e653,SKILL_FILE),_0x46edea[_0xb35d52(0x1c1)]=_0x38845e);for(const _0x1f2255 of _0x19cb55){!_0x46edea[_0xb35d52(0x1c5)][_0xb35d52(0x1e5)](_0x1f2255)&&_0x46edea[_0xb35d52(0x1c5)][_0xb35d52(0x1c3)](_0x1f2255);}_0x46edea[_0xb35d52(0x1c5)][_0xb35d52(0x1be)]();return;}_0x44f154['set'](_0x1f7f9a,{..._0x10377d,'tags':Array[_0xb35d52(0x1e2)](_0x10377d[_0xb35d52(0x1d3)])?_0x10377d[_0xb35d52(0x1d3)]:[],'scope':_0x10377d[_0xb35d52(0x1e3)],'source':_0xb35d52(0x1e8),'dir':_0x44e653,'cacheDir':_0x4fc0a9[_0xb35d52(0x1c0)]===_0xb35d52(0x1bf)?_0x44e653:undefined,'skillMdPath':resolve(_0x44e653,SKILL_FILE),'metadataPath':_0x38845e,'linkedPaths':_0x19cb55});}function compareLocalRuntimeSkills(_0x49367e,_0x4de45b){const _0x1a44dd=a102_0x132e,_0x17b506={'personal':0x0,'company':0x1,'builtin':0x2};return _0x17b506[_0x49367e[_0x1a44dd(0x1e3)]]-_0x17b506[_0x4de45b['scope']]||_0x49367e[_0x1a44dd(0x1d7)]['localeCompare'](_0x4de45b[_0x1a44dd(0x1d7)])||_0x49367e['dir'][_0x1a44dd(0x1ce)](_0x4de45b[_0x1a44dd(0x1d0)]);}
@@ -1 +1 @@
1
- (function(_0xa62085,_0x1d6d45){const _0x436e44=a102_0x5241,_0x2920dd=_0xa62085();while(!![]){try{const _0x5c383d=parseInt(_0x436e44(0xd2))/0x1+parseInt(_0x436e44(0xc3))/0x2+-parseInt(_0x436e44(0xc4))/0x3+-parseInt(_0x436e44(0xc2))/0x4+parseInt(_0x436e44(0xbe))/0x5*(-parseInt(_0x436e44(0xcf))/0x6)+-parseInt(_0x436e44(0xcc))/0x7*(-parseInt(_0x436e44(0xb5))/0x8)+-parseInt(_0x436e44(0xb7))/0x9;if(_0x5c383d===_0x1d6d45)break;else _0x2920dd['push'](_0x2920dd['shift']());}catch(_0x5bd073){_0x2920dd['push'](_0x2920dd['shift']());}}}(a102_0xc7d6,0x426c3));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(_0x15dbf1){const _0x3bfeac=a102_0x5241;return _0x15dbf1[_0x3bfeac(0xb8)]??Buffer[_0x3bfeac(0xbd)](_0x15dbf1[_0x3bfeac(0xc9)]??'',_0x3bfeac(0xd6));}export function fileText(_0x336c7b){const _0x44db3c=a102_0x5241;return fileContent(_0x336c7b)[_0x44db3c(0xdb)](_0x44db3c(0xd6));}export function normalizeLocalFiles(_0x556809){const _0x3bc5cc=a102_0x5241;if(!Array[_0x3bc5cc(0xd4)](_0x556809)||_0x556809[_0x3bc5cc(0xd9)]===0x0)return[];const _0x5e3e83=new Map();for(const _0x2fb295 of _0x556809){if(!_0x2fb295||typeof _0x2fb295!==_0x3bc5cc(0xda)||typeof _0x2fb295[_0x3bc5cc(0xc6)]!==_0x3bc5cc(0xb9))throw CliErrors[_0x3bc5cc(0xbb)](_0x3bc5cc(0xcb));const _0x394b73=normalizeSkillRelativePath(_0x2fb295['path']);if(_0x5e3e83[_0x3bc5cc(0xc7)](_0x394b73))throw CliErrors[_0x3bc5cc(0xbb)](_0x3bc5cc(0xc8)+_0x394b73);if(_0x2fb295['bytes']!==undefined&&!Buffer[_0x3bc5cc(0xaf)](_0x2fb295[_0x3bc5cc(0xb8)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x394b73);if(_0x2fb295['bytes']===undefined&&typeof _0x2fb295[_0x3bc5cc(0xc9)]!==_0x3bc5cc(0xb9))throw CliErrors[_0x3bc5cc(0xbb)](_0x3bc5cc(0xb3)+_0x394b73);const _0x40df65=fileContent(_0x2fb295);_0x5e3e83[_0x3bc5cc(0xba)](_0x394b73,{'path':_0x394b73,'bytes':_0x40df65});}return Array['from'](_0x5e3e83[_0x3bc5cc(0xce)]())[_0x3bc5cc(0xcd)](compareSkillFiles);}function a102_0x5241(_0x41ae4,_0x3b45c4){_0x41ae4=_0x41ae4-0xae;const _0xc7d6ca=a102_0xc7d6();let _0x524120=_0xc7d6ca[_0x41ae4];return _0x524120;}export function normalizeManifestFiles(_0x2ebbce){const _0x5c6089=a102_0x5241;if(!Array[_0x5c6089(0xd4)](_0x2ebbce)||_0x2ebbce[_0x5c6089(0xd9)]===0x0)return[];const _0x538a44=new Map();for(const _0x5aa0f3 of _0x2ebbce){if(!_0x5aa0f3||typeof _0x5aa0f3!==_0x5c6089(0xda)||typeof _0x5aa0f3[_0x5c6089(0xc6)]!==_0x5c6089(0xb9))throw CliErrors[_0x5c6089(0xbb)](_0x5c6089(0xcb));const _0x4f622c=normalizeSkillRelativePath(_0x5aa0f3['path']);if(_0x538a44['has'](_0x4f622c))throw CliErrors[_0x5c6089(0xbb)](_0x5c6089(0xc8)+_0x4f622c);if(!isSha256Hex(_0x5aa0f3[_0x5c6089(0xd3)]))throw CliErrors['validation'](_0x5c6089(0xb6)+_0x4f622c);if(!Number['isSafeInteger'](_0x5aa0f3[_0x5c6089(0xd8)])||_0x5aa0f3['size']<0x0)throw CliErrors[_0x5c6089(0xbb)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x4f622c);_0x538a44[_0x5c6089(0xba)](_0x4f622c,{'path':_0x4f622c,'sha256':_0x5aa0f3['sha256'][_0x5c6089(0xbc)](),'size':_0x5aa0f3[_0x5c6089(0xd8)]});}return Array[_0x5c6089(0xbd)](_0x538a44[_0x5c6089(0xce)]())[_0x5c6089(0xcd)](compareSkillFiles);}export function scanSkillDirectory(_0x62d49a){const _0x2903a8=realpathSync(_0x62d49a),_0xa1cdcf=[];function _0x813962(_0x58fadd){const _0x2b22e7=a102_0x5241,_0x5e8ec1=readdirSync(_0x58fadd,{'withFileTypes':!![]})['sort']((_0x541593,_0x11371d)=>_0x541593[_0x2b22e7(0xca)][_0x2b22e7(0xd0)](_0x11371d[_0x2b22e7(0xca)]));for(const _0x54f275 of _0x5e8ec1){if(_0x54f275['isDirectory']()&&IGNORED_DIR_NAMES[_0x2b22e7(0xc7)](_0x54f275[_0x2b22e7(0xca)]))continue;if(IGNORED_FILE_NAMES[_0x2b22e7(0xc7)](_0x54f275['name']))continue;const _0x51fcd2=resolve(_0x58fadd,_0x54f275[_0x2b22e7(0xca)]);if(_0x54f275[_0x2b22e7(0xb2)]())throw CliErrors[_0x2b22e7(0xbb)](_0x2b22e7(0xb0)+_0x51fcd2);const _0x174691=toPosixPath(relative(_0x2903a8,_0x51fcd2));if(_0x54f275[_0x2b22e7(0xbf)]()){_0x813962(_0x51fcd2);continue;}if(!_0x54f275[_0x2b22e7(0xd5)]())continue;validateSkillRelativePath(_0x174691);const _0x3dfe0f=readFileSync(_0x51fcd2);_0xa1cdcf[_0x2b22e7(0xb1)]({'path':_0x174691,'bytes':_0x3dfe0f});}}return _0x813962(_0x2903a8),normalizeLocalFiles(_0xa1cdcf);}export function compareSkillFiles(_0x11cc42,_0x58d6b0){const _0xec263b=a102_0x5241;if(_0x11cc42[_0xec263b(0xc6)]===SKILL_FILE)return _0x58d6b0[_0xec263b(0xc6)]===SKILL_FILE?0x0:-0x1;if(_0x58d6b0['path']===SKILL_FILE)return 0x1;return Buffer[_0xec263b(0xb4)](Buffer[_0xec263b(0xbd)](_0x11cc42[_0xec263b(0xc6)],_0xec263b(0xd6)),Buffer['from'](_0x58d6b0[_0xec263b(0xc6)],_0xec263b(0xd6)));}export function normalizeSkillRelativePath(_0x4b9481){const _0x2cfa28=toPosixPath(_0x4b9481['trim']());return validateSkillRelativePath(_0x2cfa28),_0x2cfa28;}export function validateSkillRelativePath(_0x31eb06){const _0x2e6ce3=a102_0x5241;if(!_0x31eb06||_0x31eb06[_0x2e6ce3(0xc0)]('/')||_0x31eb06[_0x2e6ce3(0xd7)]('//'))throw CliErrors['validation'](_0x2e6ce3(0xc5)+_0x31eb06);for(const _0x13e6ff of _0x31eb06[_0x2e6ce3(0xc1)]('/')){if(!_0x13e6ff||_0x13e6ff==='.'||_0x13e6ff==='..')throw CliErrors[_0x2e6ce3(0xbb)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x31eb06);}}function a102_0xc7d6(){const _0x242e8d=['Skill\x20file\x20path\x20must\x20be\x20text.','119YYDUeN','sort','values','149718ZTDuGi','localeCompare','test','489744jCCUyI','sha256','isArray','isFile','utf8','includes','size','length','object','toString','replace','isBuffer','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','push','isSymbolicLink','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','compare','187664VRHhAI','Skill\x20file\x20sha256\x20is\x20invalid:\x20','125244LfSOyk','bytes','string','set','validation','toLowerCase','from','80WJWcGw','isDirectory','startsWith','split','799984XdIXOP','639516amMEGZ','969183NDXImN','Unsafe\x20Skill\x20file\x20path:\x20','path','has','Duplicate\x20Skill\x20file\x20path:\x20','content','name'];a102_0xc7d6=function(){return _0x242e8d;};return a102_0xc7d6();}export function toPosixPath(_0xfb8d05){const _0xc943be=a102_0x5241;return _0xfb8d05[_0xc943be(0xae)](/\\/g,'/');}export function isSha256Hex(_0x31ec9e){const _0x475894=a102_0x5241;return typeof _0x31ec9e===_0x475894(0xb9)&&/^[a-fA-F0-9]{64}$/[_0x475894(0xd1)](_0x31ec9e);}
1
+ (function(_0x1722d2,_0x4e7e93){const _0x57b5c4=a103_0xd260,_0x18998f=_0x1722d2();while(!![]){try{const _0x354bf4=parseInt(_0x57b5c4(0x143))/0x1+parseInt(_0x57b5c4(0x12a))/0x2*(-parseInt(_0x57b5c4(0x12c))/0x3)+parseInt(_0x57b5c4(0x135))/0x4+-parseInt(_0x57b5c4(0x13e))/0x5+parseInt(_0x57b5c4(0x150))/0x6*(-parseInt(_0x57b5c4(0x151))/0x7)+parseInt(_0x57b5c4(0x133))/0x8+-parseInt(_0x57b5c4(0x14f))/0x9*(-parseInt(_0x57b5c4(0x147))/0xa);if(_0x354bf4===_0x4e7e93)break;else _0x18998f['push'](_0x18998f['shift']());}catch(_0x474405){_0x18998f['push'](_0x18998f['shift']());}}}(a103_0x2602,0xa2dea));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(_0xf64203){const _0x36d1ad=a103_0xd260;return _0xf64203['bytes']??Buffer[_0x36d1ad(0x14d)](_0xf64203['content']??'',_0x36d1ad(0x12e));}export function fileText(_0x2a1075){const _0xaf46b2=a103_0xd260;return fileContent(_0x2a1075)['toString'](_0xaf46b2(0x12e));}export function normalizeLocalFiles(_0x484e26){const _0x275b09=a103_0xd260;if(!Array[_0x275b09(0x131)](_0x484e26)||_0x484e26[_0x275b09(0x132)]===0x0)return[];const _0x505a17=new Map();for(const _0x26e819 of _0x484e26){if(!_0x26e819||typeof _0x26e819!==_0x275b09(0x146)||typeof _0x26e819[_0x275b09(0x129)]!==_0x275b09(0x130))throw CliErrors[_0x275b09(0x134)](_0x275b09(0x13f));const _0x16d05d=normalizeSkillRelativePath(_0x26e819['path']);if(_0x505a17[_0x275b09(0x148)](_0x16d05d))throw CliErrors[_0x275b09(0x134)](_0x275b09(0x145)+_0x16d05d);if(_0x26e819['bytes']!==undefined&&!Buffer['isBuffer'](_0x26e819[_0x275b09(0x14c)]))throw CliErrors[_0x275b09(0x134)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x16d05d);if(_0x26e819[_0x275b09(0x14c)]===undefined&&typeof _0x26e819[_0x275b09(0x142)]!==_0x275b09(0x130))throw CliErrors[_0x275b09(0x134)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x16d05d);const _0x58098d=fileContent(_0x26e819);_0x505a17[_0x275b09(0x137)](_0x16d05d,{'path':_0x16d05d,'bytes':_0x58098d});}return Array['from'](_0x505a17['values']())[_0x275b09(0x13c)](compareSkillFiles);}export function normalizeManifestFiles(_0x2eef21){const _0xefc9de=a103_0xd260;if(!Array[_0xefc9de(0x131)](_0x2eef21)||_0x2eef21['length']===0x0)return[];const _0xb48d4c=new Map();for(const _0x2ffc93 of _0x2eef21){if(!_0x2ffc93||typeof _0x2ffc93!==_0xefc9de(0x146)||typeof _0x2ffc93['path']!=='string')throw CliErrors[_0xefc9de(0x134)](_0xefc9de(0x13f));const _0x4273ed=normalizeSkillRelativePath(_0x2ffc93['path']);if(_0xb48d4c[_0xefc9de(0x148)](_0x4273ed))throw CliErrors[_0xefc9de(0x134)](_0xefc9de(0x145)+_0x4273ed);if(!isSha256Hex(_0x2ffc93[_0xefc9de(0x12f)]))throw CliErrors[_0xefc9de(0x134)](_0xefc9de(0x139)+_0x4273ed);if(!Number[_0xefc9de(0x14e)](_0x2ffc93[_0xefc9de(0x138)])||_0x2ffc93['size']<0x0)throw CliErrors[_0xefc9de(0x134)](_0xefc9de(0x136)+_0x4273ed);_0xb48d4c[_0xefc9de(0x137)](_0x4273ed,{'path':_0x4273ed,'sha256':_0x2ffc93[_0xefc9de(0x12f)][_0xefc9de(0x13d)](),'size':_0x2ffc93['size']});}return Array[_0xefc9de(0x14d)](_0xb48d4c[_0xefc9de(0x14b)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x2b6c84){const _0x3153bd=realpathSync(_0x2b6c84),_0x51b52e=[];function _0x525eea(_0x3be01b){const _0x563d6a=a103_0xd260,_0x3d60dd=readdirSync(_0x3be01b,{'withFileTypes':!![]})[_0x563d6a(0x13c)]((_0x43e8b8,_0x4b9838)=>_0x43e8b8[_0x563d6a(0x144)][_0x563d6a(0x153)](_0x4b9838[_0x563d6a(0x144)]));for(const _0x5a667b of _0x3d60dd){if(_0x5a667b['isDirectory']()&&IGNORED_DIR_NAMES[_0x563d6a(0x148)](_0x5a667b[_0x563d6a(0x144)]))continue;if(IGNORED_FILE_NAMES[_0x563d6a(0x148)](_0x5a667b['name']))continue;const _0x287619=resolve(_0x3be01b,_0x5a667b['name']);if(_0x5a667b[_0x563d6a(0x12d)]())throw CliErrors['validation'](_0x563d6a(0x141)+_0x287619);const _0x3d7624=toPosixPath(relative(_0x3153bd,_0x287619));if(_0x5a667b[_0x563d6a(0x154)]()){_0x525eea(_0x287619);continue;}if(!_0x5a667b['isFile']())continue;validateSkillRelativePath(_0x3d7624);const _0x5e206a=readFileSync(_0x287619);_0x51b52e[_0x563d6a(0x13b)]({'path':_0x3d7624,'bytes':_0x5e206a});}}return _0x525eea(_0x3153bd),normalizeLocalFiles(_0x51b52e);}export function compareSkillFiles(_0x114079,_0xd88f76){const _0x2ed7d6=a103_0xd260;if(_0x114079[_0x2ed7d6(0x129)]===SKILL_FILE)return _0xd88f76['path']===SKILL_FILE?0x0:-0x1;if(_0xd88f76[_0x2ed7d6(0x129)]===SKILL_FILE)return 0x1;return Buffer[_0x2ed7d6(0x14a)](Buffer[_0x2ed7d6(0x14d)](_0x114079[_0x2ed7d6(0x129)],'utf8'),Buffer[_0x2ed7d6(0x14d)](_0xd88f76['path'],_0x2ed7d6(0x12e)));}function a103_0xd260(_0x656160,_0x3b6f5d){_0x656160=_0x656160-0x129;const _0x260202=a103_0x2602();let _0xd260d5=_0x260202[_0x656160];return _0xd260d5;}export function normalizeSkillRelativePath(_0x4fbd18){const _0x321730=a103_0xd260,_0x258f4e=toPosixPath(_0x4fbd18[_0x321730(0x12b)]());return validateSkillRelativePath(_0x258f4e),_0x258f4e;}export function validateSkillRelativePath(_0x2ddd38){const _0x2cc0bb=a103_0xd260;if(!_0x2ddd38||_0x2ddd38['startsWith']('/')||_0x2ddd38['includes']('//'))throw CliErrors[_0x2cc0bb(0x134)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x2ddd38);for(const _0x4ad241 of _0x2ddd38[_0x2cc0bb(0x13a)]('/')){if(!_0x4ad241||_0x4ad241==='.'||_0x4ad241==='..')throw CliErrors[_0x2cc0bb(0x134)](_0x2cc0bb(0x140)+_0x2ddd38);}}function a103_0x2602(){const _0x5a0452=['5100470wvQWOD','Skill\x20file\x20path\x20must\x20be\x20text.','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','content','475636SaeZZm','name','Duplicate\x20Skill\x20file\x20path:\x20','object','7952010orrrBa','has','replace','compare','values','bytes','from','isSafeInteger','9leMkFp','6jfQzKd','5392163GVWONo','test','localeCompare','isDirectory','path','2XnOYQS','trim','380658EcyxIr','isSymbolicLink','utf8','sha256','string','isArray','length','7127496EXgHUf','validation','1690516jgwCFx','Skill\x20file\x20size\x20is\x20invalid:\x20','set','size','Skill\x20file\x20sha256\x20is\x20invalid:\x20','split','push','sort','toLowerCase'];a103_0x2602=function(){return _0x5a0452;};return a103_0x2602();}export function toPosixPath(_0x51c8a4){const _0x197aaa=a103_0xd260;return _0x51c8a4[_0x197aaa(0x149)](/\\/g,'/');}export function isSha256Hex(_0xa31199){const _0x375732=a103_0xd260;return typeof _0xa31199===_0x375732(0x130)&&/^[a-fA-F0-9]{64}$/[_0x375732(0x152)](_0xa31199);}
@@ -1 +1 @@
1
- function a103_0x5ced(){const _0x2db730=['contents','delete','88iLaOWo','length','env','483607THaQPH','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','accessKey','skillName','6004638BWpjGi','description:\x20','find','fileHashes','path','appCode','5vqrEcT','test','.\x20Changed\x20file:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','8Lscxbd','toString','name:\x20','---\x0a','match','126917Wsotpn','7052010XxSajP','name','contentHash','isFile','displayName','stringify','entries','---','keys','trim','validation','1420376GLmjcx','join','map','trimEnd','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','has','406707vseQBd','paths','set','filter','utf8','description','errors','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','replace','4122675zDVNqP','pulledAt'];a103_0x5ced=function(){return _0x2db730;};return a103_0x5ced();}(function(_0xda60c3,_0x10e190){const _0x2f6cde=a103_0x334c,_0x23c80c=_0xda60c3();while(!![]){try{const _0x189c21=-parseInt(_0x2f6cde(0x148))/0x1+parseInt(_0x2f6cde(0x167))/0x2+parseInt(_0x2f6cde(0x16d))/0x3*(-parseInt(_0x2f6cde(0x156))/0x4)+parseInt(_0x2f6cde(0x152))/0x5*(parseInt(_0x2f6cde(0x14c))/0x6)+parseInt(_0x2f6cde(0x15b))/0x7*(-parseInt(_0x2f6cde(0x145))/0x8)+parseInt(_0x2f6cde(0x141))/0x9+-parseInt(_0x2f6cde(0x15c))/0xa;if(_0x189c21===_0x10e190)break;else _0x23c80c['push'](_0x23c80c['shift']());}catch(_0x477603){_0x23c80c['push'](_0x23c80c['shift']());}}}(a103_0x5ced,0x7c6d1));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x910000,_0x1b25e6,_0x3f9eb6){const _0x150cbd=a103_0x334c,_0x46f9c1=requireSkillCode(_0x910000),_0x1c2c83=requirePackageBytes(_0x46f9c1,_0x3f9eb6['packageBytes']),_0x27c09c=extractDownloadedPackage(_0x1c2c83),_0x35e0d0=_0x27c09c[_0x150cbd(0x14e)](_0x5b30e4=>_0x5b30e4['path']===SKILL_FILE);if(!_0x35e0d0)throw CliErrors[_0x150cbd(0x166)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x46f9c1);const _0x224041=withMaterializedSkillFrontmatter(_0x27c09c,_0x910000,_0x46f9c1),_0x4632cd=_0x224041[_0x150cbd(0x14e)](_0x1364c2=>_0x1364c2[_0x150cbd(0x150)]===SKILL_FILE),_0x36269f=fileText(_0x4632cd),_0x6210dd=getRuntimeSkillDir(_0x3f9eb6[_0x150cbd(0x147)],_0x3f9eb6[_0x150cbd(0x14a)],_0x3f9eb6[_0x150cbd(0x151)],_0x1b25e6,_0x46f9c1,_0x3f9eb6[_0x150cbd(0x16e)]),_0x2cb55b=resolve(_0x6210dd,SKILL_FILE),_0x20c46b=resolve(_0x6210dd,METADATA_FILE),_0x4c6097=contentHash(_0x36269f),_0x349abe=readMetadataIfPresent(_0x20c46b)?.[_0x150cbd(0x14f)];ensurePulledFilesCanBeOverwritten(_0x6210dd,_0x20c46b,_0x224041,_0x3f9eb6['force']===!![]),mkdirSync(_0x6210dd,{'recursive':!![],'mode':0x1c0});const _0x9bb633=existsSync(_0x2cb55b)?readFileSync(_0x2cb55b,'utf8'):undefined;return materializeFiles(_0x6210dd,_0x224041),removeStaleManagedFiles(_0x6210dd,_0x349abe,_0x224041),writeJsonAtomic(_0x20c46b,buildMetadata(_0x910000,_0x1b25e6,_0x3f9eb6[_0x150cbd(0x151)],_0x4c6097,_0x3f9eb6[_0x150cbd(0x142)],_0x224041,_0x1c2c83)),{'skill':_0x910000,'scope':_0x1b25e6,'dir':_0x6210dd,'skillMdPath':_0x2cb55b,'metadataPath':_0x20c46b,'contentHash':_0x4c6097,'changed':_0x9bb633!==_0x36269f};}function withMaterializedSkillFrontmatter(_0x32751f,_0x2edc43,_0x5357fd){const _0xf6403c=a103_0x334c,_0x20439f=skillDisplayName(_0x2edc43,_0x5357fd),_0x3a802e=_0x2edc43[_0xf6403c(0x172)]?.['trim']()||_0x20439f||_0x5357fd;return normalizeLocalFiles(_0x32751f)[_0xf6403c(0x169)](_0x13e7dc=>{const _0x1b28e2=_0xf6403c,_0x1a8f59=fileText(_0x13e7dc);if(_0x13e7dc[_0x1b28e2(0x150)]!==SKILL_FILE)return _0x13e7dc;if(hasYamlFrontmatter(_0x1a8f59))return{'path':_0x13e7dc[_0x1b28e2(0x150)],'content':withSyncedDisplayName(_0x1a8f59,_0x20439f)};return{'path':_0x13e7dc[_0x1b28e2(0x150)],'content':prependSkillFrontmatter(_0x1a8f59,{'name':_0x5357fd,'displayName':_0x20439f,'description':_0x3a802e})};});}function hasYamlFrontmatter(_0x1e80a7){const _0x8dd337=a103_0x334c;return/^\uFEFF?---\s*\r?\n/[_0x8dd337(0x153)](_0x1e80a7);}function prependSkillFrontmatter(_0x2a090b,_0x485e2a){const _0x248df6=a103_0x334c,_0x14149d=_0x2a090b[_0x248df6(0x140)](/^\uFEFF/,'');return[_0x248df6(0x163),_0x248df6(0x158)+yamlString(_0x485e2a[_0x248df6(0x15d)]),_0x485e2a['displayName']?'displayName:\x20'+yamlString(_0x485e2a[_0x248df6(0x160)]):undefined,_0x248df6(0x14d)+yamlString(_0x485e2a[_0x248df6(0x172)]),_0x248df6(0x163),'',_0x14149d][_0x248df6(0x170)](_0x3b08f1=>_0x3b08f1!==undefined)[_0x248df6(0x168)]('\x0a');}function a103_0x334c(_0xc7dd08,_0x57ece1){_0xc7dd08=_0xc7dd08-0x140;const _0x5cedd4=a103_0x5ced();let _0x334cee=_0x5cedd4[_0xc7dd08];return _0x334cee;}function yamlString(_0x2880cf){const _0x4295fd=a103_0x334c;return JSON[_0x4295fd(0x161)](_0x2880cf[_0x4295fd(0x140)](/\r/g,'')[_0x4295fd(0x165)]());}function skillDisplayName(_0x4c9825,_0x1b48d0){const _0x5076a2=a103_0x334c,_0x4bae5b=_0x4c9825[_0x5076a2(0x14b)]?.['trim']();return _0x4bae5b||_0x1b48d0;}function withSyncedDisplayName(_0x253b2,_0x3c81db){const _0x32dcf0=a103_0x334c,_0x4bba6b=_0x253b2[_0x32dcf0(0x15a)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bba6b)return _0x253b2;const _0x13727c=_0x4bba6b[0x1]??'',_0x57aa08=_0x4bba6b[0x2]??'',_0x826cbc=parseDocument(_0x57aa08);if(_0x826cbc[_0x32dcf0(0x173)][_0x32dcf0(0x146)]>0x0||!isMap(_0x826cbc['contents']))return _0x253b2;if(_0x3c81db)_0x826cbc[_0x32dcf0(0x16f)](_0x32dcf0(0x160),_0x3c81db);else{if(_0x826cbc[_0x32dcf0(0x16c)](_0x32dcf0(0x160)))_0x826cbc[_0x32dcf0(0x144)](_0x32dcf0(0x160));else return _0x253b2;}forceBlockCollections(_0x826cbc[_0x32dcf0(0x143)]);const _0x5a4e4b=_0x826cbc[_0x32dcf0(0x157)]({'lineWidth':0x0})[_0x32dcf0(0x16a)](),_0x57c4b2=_0x253b2['slice'](_0x4bba6b[0x0][_0x32dcf0(0x146)])[_0x32dcf0(0x140)](/^\r?\n/,'');return _0x13727c+_0x32dcf0(0x159)+_0x5a4e4b+'\x0a---\x0a\x0a'+_0x57c4b2;}function forceBlockCollections(_0x585a6e){if(!isNode(_0x585a6e))return;visit(_0x585a6e,(_0x5ca3c9,_0x2ea0e4)=>{isCollection(_0x2ea0e4)&&(_0x2ea0e4['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1c3e6b,_0x312684,_0x4f2a2d,_0x45a699){const _0x4429a6=a103_0x334c;if(_0x45a699||!existsSync(_0x312684))return;const _0x436aa0=readMetadataIfPresent(_0x312684);if(!_0x436aa0)return;const _0x287f51=_0x436aa0['fileHashes']&&Object[_0x4429a6(0x164)](_0x436aa0[_0x4429a6(0x14f)])[_0x4429a6(0x146)]>0x0?_0x436aa0[_0x4429a6(0x14f)]:undefined;if(_0x287f51)for(const [_0x4e7f37,_0x3a3931]of Object[_0x4429a6(0x162)](_0x287f51)){const _0x237af6=resolveManagedFilePath(_0x1c3e6b,_0x4e7f37);if(!existsSync(_0x237af6))throw CliErrors['validation'](_0x4429a6(0x149)+_0x1c3e6b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x4e7f37);const _0x5d2cc9=lstatSync(_0x237af6);if(!_0x5d2cc9[_0x4429a6(0x15f)]())throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x4e7f37);const _0x4f4b48=bufferSha256(readFileSync(_0x237af6));if(_0x4f4b48!==_0x3a3931)throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b+_0x4429a6(0x154)+_0x4e7f37,_0x4429a6(0x174)+_0x4e7f37);}else{const _0x50e858=resolve(_0x1c3e6b,SKILL_FILE);if(existsSync(_0x50e858)&&_0x436aa0['contentHash']){const _0x11466d=contentHash(readFileSync(_0x50e858,_0x4429a6(0x171)));if(_0x11466d!==_0x436aa0[_0x4429a6(0x15e)])throw CliErrors['validation'](_0x4429a6(0x155)+_0x50e858,_0x4429a6(0x16b));}}for(const _0x3d71f8 of normalizeLocalFiles(_0x4f2a2d)){if(_0x287f51?.[_0x3d71f8[_0x4429a6(0x150)]])continue;if(!_0x287f51&&_0x3d71f8[_0x4429a6(0x150)]===SKILL_FILE)continue;const _0x423087=resolveManagedFilePath(_0x1c3e6b,_0x3d71f8[_0x4429a6(0x150)]);if(!existsSync(_0x423087))continue;const _0x6fbfe1=lstatSync(_0x423087);if(!_0x6fbfe1['isFile']())throw CliErrors[_0x4429a6(0x166)](_0x4429a6(0x149)+_0x1c3e6b,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3d71f8[_0x4429a6(0x150)]);const _0x4fb6ec=bufferSha256(readFileSync(_0x423087));if(_0x4fb6ec!==fileHash(_0x3d71f8))throw CliErrors[_0x4429a6(0x166)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1c3e6b,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3d71f8[_0x4429a6(0x150)]);}}function materializeFiles(_0x467793,_0x354d2e){const _0x5ad738=a103_0x334c;for(const _0xcb7706 of normalizeLocalFiles(_0x354d2e)){const _0x896409=resolveManagedFilePath(_0x467793,_0xcb7706[_0x5ad738(0x150)]);mkdirSync(dirname(_0x896409),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x896409,fileContent(_0xcb7706),0x180);}}function removeStaleManagedFiles(_0x5e0355,_0x494d65,_0x12bd64){const _0x5bd2e2=a103_0x334c;if(!_0x494d65)return;const _0x41d224=new Set(normalizeLocalFiles(_0x12bd64)[_0x5bd2e2(0x169)](_0x7b96cb=>_0x7b96cb[_0x5bd2e2(0x150)]));for(const _0x2ac9f9 of Object[_0x5bd2e2(0x164)](_0x494d65)){if(_0x41d224['has'](_0x2ac9f9))continue;const _0x259caa=resolveManagedFilePath(_0x5e0355,_0x2ac9f9);existsSync(_0x259caa)&&lstatSync(_0x259caa)[_0x5bd2e2(0x15f)]()&&rmSync(_0x259caa,{'force':!![]});}}
1
+ (function(_0xba5b7e,_0x5620b9){const _0x122142=a104_0x1e73,_0x24ee60=_0xba5b7e();while(!![]){try{const _0xeccf5f=parseInt(_0x122142(0x14f))/0x1*(-parseInt(_0x122142(0x17e))/0x2)+parseInt(_0x122142(0x15c))/0x3+parseInt(_0x122142(0x154))/0x4+parseInt(_0x122142(0x16d))/0x5+parseInt(_0x122142(0x164))/0x6+parseInt(_0x122142(0x173))/0x7*(-parseInt(_0x122142(0x161))/0x8)+parseInt(_0x122142(0x163))/0x9*(-parseInt(_0x122142(0x149))/0xa);if(_0xeccf5f===_0x5620b9)break;else _0x24ee60['push'](_0x24ee60['shift']());}catch(_0x4dc50e){_0x24ee60['push'](_0x24ee60['shift']());}}}(a104_0x5c56,0x64575));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x21d6d7,_0x21b4f3,_0x5a20b0){const _0xc0b200=a104_0x1e73,_0x36a541=requireSkillCode(_0x21d6d7),_0x478e0e=requirePackageBytes(_0x36a541,_0x5a20b0[_0xc0b200(0x17c)]),_0x1c2cf6=extractDownloadedPackage(_0x478e0e),_0x191206=_0x1c2cf6[_0xc0b200(0x168)](_0x14eec2=>_0x14eec2[_0xc0b200(0x15f)]===SKILL_FILE);if(!_0x191206)throw CliErrors[_0xc0b200(0x14c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x36a541);const _0x26545d=withMaterializedSkillFrontmatter(_0x1c2cf6,_0x21d6d7,_0x36a541),_0x3b47dc=_0x26545d[_0xc0b200(0x168)](_0x2d8522=>_0x2d8522[_0xc0b200(0x15f)]===SKILL_FILE),_0x277679=fileText(_0x3b47dc),_0x5767c5=getRuntimeSkillDir(_0x5a20b0[_0xc0b200(0x150)],_0x5a20b0[_0xc0b200(0x17b)],_0x5a20b0[_0xc0b200(0x17a)],_0x21b4f3,_0x36a541,_0x5a20b0['paths']),_0x53abc0=resolve(_0x5767c5,SKILL_FILE),_0x1697b8=resolve(_0x5767c5,METADATA_FILE),_0x4daf69=contentHash(_0x277679),_0x3b4449=readMetadataIfPresent(_0x1697b8)?.[_0xc0b200(0x158)];ensurePulledFilesCanBeOverwritten(_0x5767c5,_0x1697b8,_0x26545d,_0x5a20b0[_0xc0b200(0x176)]===!![]),mkdirSync(_0x5767c5,{'recursive':!![],'mode':0x1c0});const _0x569454=existsSync(_0x53abc0)?readFileSync(_0x53abc0,_0xc0b200(0x165)):undefined;return materializeFiles(_0x5767c5,_0x26545d),removeStaleManagedFiles(_0x5767c5,_0x3b4449,_0x26545d),writeJsonAtomic(_0x1697b8,buildMetadata(_0x21d6d7,_0x21b4f3,_0x5a20b0[_0xc0b200(0x17a)],_0x4daf69,_0x5a20b0[_0xc0b200(0x16c)],_0x26545d,_0x478e0e)),{'skill':_0x21d6d7,'scope':_0x21b4f3,'dir':_0x5767c5,'skillMdPath':_0x53abc0,'metadataPath':_0x1697b8,'contentHash':_0x4daf69,'changed':_0x569454!==_0x277679};}function withMaterializedSkillFrontmatter(_0x5012ac,_0x4efa4f,_0x45dfbb){const _0x255c12=a104_0x1e73,_0x178791=skillDisplayName(_0x4efa4f,_0x45dfbb),_0x1debef=_0x4efa4f['description']?.[_0x255c12(0x15e)]()||_0x178791||_0x45dfbb;return normalizeLocalFiles(_0x5012ac)[_0x255c12(0x178)](_0x19b2c9=>{const _0x217d76=_0x255c12,_0xff41fd=fileText(_0x19b2c9);if(_0x19b2c9[_0x217d76(0x15f)]!==SKILL_FILE)return _0x19b2c9;if(hasYamlFrontmatter(_0xff41fd))return{'path':_0x19b2c9[_0x217d76(0x15f)],'content':withSyncedDisplayName(_0xff41fd,_0x178791)};return{'path':_0x19b2c9[_0x217d76(0x15f)],'content':prependSkillFrontmatter(_0xff41fd,{'name':_0x45dfbb,'displayName':_0x178791,'description':_0x1debef})};});}function hasYamlFrontmatter(_0x16ff8f){const _0xb38a87=a104_0x1e73;return/^\uFEFF?---\s*\r?\n/[_0xb38a87(0x167)](_0x16ff8f);}function prependSkillFrontmatter(_0x2c75a3,_0x406158){const _0x332831=a104_0x1e73,_0x53890c=_0x2c75a3[_0x332831(0x15a)](/^\uFEFF/,'');return[_0x332831(0x156),_0x332831(0x16b)+yamlString(_0x406158[_0x332831(0x171)]),_0x406158[_0x332831(0x17f)]?_0x332831(0x155)+yamlString(_0x406158[_0x332831(0x17f)]):undefined,_0x332831(0x172)+yamlString(_0x406158[_0x332831(0x177)]),_0x332831(0x156),'',_0x53890c][_0x332831(0x174)](_0x1dc40c=>_0x1dc40c!==undefined)['join']('\x0a');}function yamlString(_0x16a291){return JSON['stringify'](_0x16a291['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x7ac22,_0x1c4c0a){const _0x4ebbac=a104_0x1e73,_0x1d150a=_0x7ac22[_0x4ebbac(0x14e)]?.['trim']();return _0x1d150a||_0x1c4c0a;}function withSyncedDisplayName(_0x3d7afb,_0x27f8f6){const _0x3d9765=a104_0x1e73,_0x2abb01=_0x3d7afb[_0x3d9765(0x153)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2abb01)return _0x3d7afb;const _0x480bf9=_0x2abb01[0x1]??'',_0x7261d4=_0x2abb01[0x2]??'',_0x10fca7=parseDocument(_0x7261d4);if(_0x10fca7[_0x3d9765(0x166)][_0x3d9765(0x15d)]>0x0||!isMap(_0x10fca7[_0x3d9765(0x170)]))return _0x3d7afb;if(_0x27f8f6)_0x10fca7[_0x3d9765(0x179)]('displayName',_0x27f8f6);else{if(_0x10fca7[_0x3d9765(0x16e)](_0x3d9765(0x17f)))_0x10fca7[_0x3d9765(0x159)]('displayName');else return _0x3d7afb;}forceBlockCollections(_0x10fca7[_0x3d9765(0x170)]);const _0x4e2fc0=_0x10fca7[_0x3d9765(0x148)]({'lineWidth':0x0})[_0x3d9765(0x14a)](),_0x3fe34f=_0x3d7afb[_0x3d9765(0x152)](_0x2abb01[0x0][_0x3d9765(0x15d)])['replace'](/^\r?\n/,'');return _0x480bf9+'---\x0a'+_0x4e2fc0+_0x3d9765(0x17d)+_0x3fe34f;}function forceBlockCollections(_0x211e59){if(!isNode(_0x211e59))return;visit(_0x211e59,(_0x2d72f5,_0x56dcf5)=>{const _0x92d396=a104_0x1e73;isCollection(_0x56dcf5)&&(_0x56dcf5[_0x92d396(0x160)]=![]);});}function a104_0x5c56(){const _0x4fc5bf=['Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','contents','name','description:\x20','5397XvmANM','filter','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','force','description','map','set','appCode','accessKey','packageBytes','\x0a---\x0a\x0a','6CxdsXc','displayName','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','toString','2850nxqRxw','trimEnd','isFile','validation','Managed\x20file\x20was\x20removed\x20locally:\x20','skillName','257513UDByWE','env','contentHash','slice','match','2367660cVzWuz','displayName:\x20','---','keys','fileHashes','delete','replace','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','560724mFxpCB','length','trim','path','flow','1168brzIKB','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','729Znscve','2690544JpsBaQ','utf8','errors','test','find','entries','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','name:\x20','pulledAt','459700mtYBIO','has'];a104_0x5c56=function(){return _0x4fc5bf;};return a104_0x5c56();}function a104_0x1e73(_0xac784f,_0x560caf){_0xac784f=_0xac784f-0x147;const _0x5c565b=a104_0x5c56();let _0x1e738a=_0x5c565b[_0xac784f];return _0x1e738a;}function ensurePulledFilesCanBeOverwritten(_0x48efce,_0x23cbca,_0x51a453,_0x29cceb){const _0x4851c4=a104_0x1e73;if(_0x29cceb||!existsSync(_0x23cbca))return;const _0x4eb880=readMetadataIfPresent(_0x23cbca);if(!_0x4eb880)return;const _0xa755d4=_0x4eb880[_0x4851c4(0x158)]&&Object[_0x4851c4(0x157)](_0x4eb880['fileHashes'])[_0x4851c4(0x15d)]>0x0?_0x4eb880['fileHashes']:undefined;if(_0xa755d4)for(const [_0x2b0b1e,_0x1d2d69]of Object[_0x4851c4(0x169)](_0xa755d4)){const _0x1b7f7c=resolveManagedFilePath(_0x48efce,_0x2b0b1e);if(!existsSync(_0x1b7f7c))throw CliErrors[_0x4851c4(0x14c)](_0x4851c4(0x147)+_0x48efce,_0x4851c4(0x14d)+_0x2b0b1e);const _0x3bf828=lstatSync(_0x1b7f7c);if(!_0x3bf828['isFile']())throw CliErrors['validation'](_0x4851c4(0x147)+_0x48efce,_0x4851c4(0x175)+_0x2b0b1e);const _0x44a4b6=bufferSha256(readFileSync(_0x1b7f7c));if(_0x44a4b6!==_0x1d2d69)throw CliErrors[_0x4851c4(0x14c)](_0x4851c4(0x147)+_0x48efce+'.\x20Changed\x20file:\x20'+_0x2b0b1e,_0x4851c4(0x15b)+_0x2b0b1e);}else{const _0x1081e9=resolve(_0x48efce,SKILL_FILE);if(existsSync(_0x1081e9)&&_0x4eb880[_0x4851c4(0x151)]){const _0x50b04b=contentHash(readFileSync(_0x1081e9,_0x4851c4(0x165)));if(_0x50b04b!==_0x4eb880[_0x4851c4(0x151)])throw CliErrors['validation'](_0x4851c4(0x16a)+_0x1081e9,_0x4851c4(0x162));}}for(const _0x19552f of normalizeLocalFiles(_0x51a453)){if(_0xa755d4?.[_0x19552f[_0x4851c4(0x15f)]])continue;if(!_0xa755d4&&_0x19552f['path']===SKILL_FILE)continue;const _0x3c25c3=resolveManagedFilePath(_0x48efce,_0x19552f['path']);if(!existsSync(_0x3c25c3))continue;const _0x5a04a9=lstatSync(_0x3c25c3);if(!_0x5a04a9['isFile']())throw CliErrors[_0x4851c4(0x14c)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x48efce,_0x4851c4(0x16f)+_0x19552f[_0x4851c4(0x15f)]);const _0x1089d8=bufferSha256(readFileSync(_0x3c25c3));if(_0x1089d8!==fileHash(_0x19552f))throw CliErrors['validation'](_0x4851c4(0x147)+_0x48efce,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x19552f['path']);}}function materializeFiles(_0x348cf5,_0x551c1d){for(const _0xb4e8de of normalizeLocalFiles(_0x551c1d)){const _0x171395=resolveManagedFilePath(_0x348cf5,_0xb4e8de['path']);mkdirSync(dirname(_0x171395),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x171395,fileContent(_0xb4e8de),0x180);}}function removeStaleManagedFiles(_0x436a96,_0x2a3ad0,_0x1f75f2){const _0x5e954d=a104_0x1e73;if(!_0x2a3ad0)return;const _0x2a1d1e=new Set(normalizeLocalFiles(_0x1f75f2)[_0x5e954d(0x178)](_0x5822ae=>_0x5822ae['path']));for(const _0x447457 of Object[_0x5e954d(0x157)](_0x2a3ad0)){if(_0x2a1d1e[_0x5e954d(0x16e)](_0x447457))continue;const _0x59e8ab=resolveManagedFilePath(_0x436a96,_0x447457);existsSync(_0x59e8ab)&&lstatSync(_0x59e8ab)[_0x5e954d(0x14b)]()&&rmSync(_0x59e8ab,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0xf7ac8e,_0x3dba8a){const _0x52791a=a104_0x570e,_0x51f370=_0xf7ac8e();while(!![]){try{const _0x41f78a=-parseInt(_0x52791a(0x1b5))/0x1+-parseInt(_0x52791a(0x1b7))/0x2+-parseInt(_0x52791a(0x1af))/0x3*(parseInt(_0x52791a(0x1a6))/0x4)+parseInt(_0x52791a(0x1a3))/0x5*(-parseInt(_0x52791a(0x1ba))/0x6)+-parseInt(_0x52791a(0x1a5))/0x7+-parseInt(_0x52791a(0x1b1))/0x8*(-parseInt(_0x52791a(0x199))/0x9)+-parseInt(_0x52791a(0x1a1))/0xa*(-parseInt(_0x52791a(0x1ac))/0xb);if(_0x41f78a===_0x3dba8a)break;else _0x51f370['push'](_0x51f370['shift']());}catch(_0x35db08){_0x51f370['push'](_0x51f370['shift']());}}}(a104_0x8df7,0xa3b1d));function a104_0x8df7(){const _0x2552b8=['length','version','skillCode','710VgZldK','trim','303965AAykRM','map','3455354TzLMti','1260bCGbfN','tenantCode','status','readonly','string','userId','497629aPUUHY','ossPath','zipSize','8229ebEedj','description','448VSwPVW','validation','tags','personal','41410OWEuvD','files','1922774oaDuao','manifest','object','24axuzoh','skillName','isArray','zipSha256','path','parse','9990akAwDc','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','forkedFromSkillId','hasUpstreamUpdate'];a104_0x8df7=function(){return _0x2552b8;};return a104_0x8df7();}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(_0x6e09cd,_0x24ce30,_0x54fcd2,_0x47c4f6,_0x1b0996,_0x4297f8,_0x1a1b11){const _0x4a452f=a104_0x570e,_0x1751bf=_0x4297f8?normalizeLocalFiles(_0x4297f8):[],_0x278af8=!_0x1a1b11&&_0x1751bf[_0x4a452f(0x19e)]>0x0?buildSkillPackage(_0x1751bf):undefined,_0x148298=_0x1a1b11?bufferSha256(_0x1a1b11):_0x278af8?.[_0x4a452f(0x1b8)][_0x4a452f(0x196)],_0x2a0bb6=_0x1a1b11?.[_0x4a452f(0x19e)]??_0x278af8?.['manifest'][_0x4a452f(0x1ae)],_0x1c28b7=_0x1751bf['length']>0x0?Object['fromEntries'](_0x1751bf[_0x4a452f(0x1a4)](_0x1906c7=>[_0x1906c7[_0x4a452f(0x197)],fileHash(_0x1906c7)])):undefined;return{'schemaVersion':_0x1751bf[_0x4a452f(0x19e)]>0x0?0x2:0x1,'id':_0x6e09cd['id'],'appCode':_0x54fcd2,'skillCode':requireSkillCode(_0x6e09cd),'skillName':_0x6e09cd[_0x4a452f(0x1bb)],'description':_0x6e09cd[_0x4a452f(0x1b0)],'scope':_0x24ce30,'readonly':_0x24ce30!==_0x4a452f(0x1b4)||_0x6e09cd[_0x4a452f(0x1a9)]===!![],'tenantCode':_0x6e09cd[_0x4a452f(0x1a7)],'userId':_0x6e09cd[_0x4a452f(0x1ab)],'version':_0x6e09cd[_0x4a452f(0x19f)],'status':_0x6e09cd[_0x4a452f(0x1a8)],'tags':Array[_0x4a452f(0x195)](_0x6e09cd[_0x4a452f(0x1b3)])?_0x6e09cd[_0x4a452f(0x1b3)]:[],'hasUpstreamUpdate':_0x6e09cd[_0x4a452f(0x19d)],'forkedFromSkillId':_0x6e09cd[_0x4a452f(0x19c)],'forkedFromVersion':_0x6e09cd['forkedFromVersion'],'sourceSessionId':_0x6e09cd['sourceSessionId'],'contentHash':_0x47c4f6,'fileHashes':_0x1c28b7,'treeHash':_0x1751bf[_0x4a452f(0x19e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x1751bf)):undefined,'ossPath':remoteManifestOssPath(_0x6e09cd[_0x4a452f(0x1b6)]),'zipSha256':_0x148298,'zipSize':_0x2a0bb6,'files':_0x1751bf[_0x4a452f(0x19e)]>0x0?_0x1751bf[_0x4a452f(0x1a4)](_0x201e2f=>({'path':_0x201e2f['path'],'hash':fileHash(_0x201e2f),'size':fileContent(_0x201e2f)[_0x4a452f(0x19e)]})):undefined,'pulledAt':_0x1b0996??new Date()['toISOString']()};}export function requireSkillCode(_0xd8d73a){const _0x1c3c6c=a104_0x570e,_0x3d6c6d=_0xd8d73a[_0x1c3c6c(0x1a0)]?.[_0x1c3c6c(0x1a2)]();if(!_0x3d6c6d)throw CliErrors[_0x1c3c6c(0x1b2)](_0x1c3c6c(0x19a));return _0x3d6c6d;}function a104_0x570e(_0x281ffa,_0x31e954){_0x281ffa=_0x281ffa-0x195;const _0x8df74=a104_0x8df7();let _0x570ebd=_0x8df74[_0x281ffa];return _0x570ebd;}export function readMetadataIfPresent(_0x2e76b4){const _0xc04701=a104_0x570e;if(!existsSync(_0x2e76b4))return undefined;try{const _0x338173=JSON[_0xc04701(0x198)](readFileSync(_0x2e76b4,_0xc04701(0x19b)));return _0x338173;}catch{throw CliErrors[_0xc04701(0x1b2)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x2e76b4);}}function remoteManifestOssPath(_0x328160){const _0xff40c8=a104_0x570e;if(!_0x328160||typeof _0x328160!==_0xff40c8(0x1b9)||Array['isArray'](_0x328160))return undefined;const _0x51e7f1=_0x328160[_0xff40c8(0x1ad)];return typeof _0x51e7f1===_0xff40c8(0x1aa)&&_0x51e7f1[_0xff40c8(0x1a2)]()?_0x51e7f1[_0xff40c8(0x1a2)]():undefined;}
1
+ (function(_0xaac85,_0x3ab98e){const _0x239ff9=a105_0x154e,_0x3eae88=_0xaac85();while(!![]){try{const _0x58962a=parseInt(_0x239ff9(0x1a2))/0x1+-parseInt(_0x239ff9(0x193))/0x2+-parseInt(_0x239ff9(0x19f))/0x3+parseInt(_0x239ff9(0x1a3))/0x4*(-parseInt(_0x239ff9(0x199))/0x5)+-parseInt(_0x239ff9(0x194))/0x6*(parseInt(_0x239ff9(0x1a6))/0x7)+parseInt(_0x239ff9(0x192))/0x8*(parseInt(_0x239ff9(0x1ad))/0x9)+parseInt(_0x239ff9(0x1a1))/0xa*(parseInt(_0x239ff9(0x190))/0xb);if(_0x58962a===_0x3ab98e)break;else _0x3eae88['push'](_0x3eae88['shift']());}catch(_0xbc6623){_0x3eae88['push'](_0x3eae88['shift']());}}}(a105_0x24ba,0x664a2));import{existsSync,readFileSync}from'node:fs';function a105_0x24ba(){const _0x3d3412=['tags','object','length','files','1350635wlxsEk','status','description','manifest','readonly','Invalid\x20','1440915scrYon','zipSha256','8393670ugUqJk','300652NgQlRq','8hmeZre','utf8','userId','668346DWvghw','Runtime\x20Skill\x20is\x20missing\x20skillCode.','toISOString','hasUpstreamUpdate','isArray','personal','path','18utRBHR','forkedFromSkillId','validation','trim','11QtvOyt','map','2985504softwk','702760SDgJSl','6eRytMM'];a105_0x24ba=function(){return _0x3d3412;};return a105_0x24ba();}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';function a105_0x154e(_0x147201,_0x576a78){_0x147201=_0x147201-0x18d;const _0x24ba54=a105_0x24ba();let _0x154ea9=_0x24ba54[_0x147201];return _0x154ea9;}export function buildMetadata(_0xca5244,_0x516709,_0x5c328e,_0x2832e9,_0x542156,_0x41e5c9,_0xdfde58){const _0x28a65e=a105_0x154e,_0x57d289=_0x41e5c9?normalizeLocalFiles(_0x41e5c9):[],_0xbfdf26=!_0xdfde58&&_0x57d289['length']>0x0?buildSkillPackage(_0x57d289):undefined,_0x3370b2=_0xdfde58?bufferSha256(_0xdfde58):_0xbfdf26?.[_0x28a65e(0x19c)][_0x28a65e(0x1a0)],_0x4bb107=_0xdfde58?.[_0x28a65e(0x197)]??_0xbfdf26?.[_0x28a65e(0x19c)]['zipSize'],_0x1b086c=_0x57d289[_0x28a65e(0x197)]>0x0?Object['fromEntries'](_0x57d289[_0x28a65e(0x191)](_0x22eea3=>[_0x22eea3[_0x28a65e(0x1ac)],fileHash(_0x22eea3)])):undefined;return{'schemaVersion':_0x57d289[_0x28a65e(0x197)]>0x0?0x2:0x1,'id':_0xca5244['id'],'appCode':_0x5c328e,'skillCode':requireSkillCode(_0xca5244),'skillName':_0xca5244['skillName'],'description':_0xca5244[_0x28a65e(0x19b)],'scope':_0x516709,'readonly':_0x516709!==_0x28a65e(0x1ab)||_0xca5244[_0x28a65e(0x19d)]===!![],'tenantCode':_0xca5244['tenantCode'],'userId':_0xca5244[_0x28a65e(0x1a5)],'version':_0xca5244['version'],'status':_0xca5244[_0x28a65e(0x19a)],'tags':Array[_0x28a65e(0x1aa)](_0xca5244[_0x28a65e(0x195)])?_0xca5244[_0x28a65e(0x195)]:[],'hasUpstreamUpdate':_0xca5244[_0x28a65e(0x1a9)],'forkedFromSkillId':_0xca5244[_0x28a65e(0x18d)],'forkedFromVersion':_0xca5244['forkedFromVersion'],'sourceSessionId':_0xca5244['sourceSessionId'],'contentHash':_0x2832e9,'fileHashes':_0x1b086c,'treeHash':_0x57d289['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x57d289)):undefined,'ossPath':remoteManifestOssPath(_0xca5244[_0x28a65e(0x198)]),'zipSha256':_0x3370b2,'zipSize':_0x4bb107,'files':_0x57d289['length']>0x0?_0x57d289[_0x28a65e(0x191)](_0x355974=>({'path':_0x355974[_0x28a65e(0x1ac)],'hash':fileHash(_0x355974),'size':fileContent(_0x355974)['length']})):undefined,'pulledAt':_0x542156??new Date()[_0x28a65e(0x1a8)]()};}export function requireSkillCode(_0x5dfce3){const _0x322c55=a105_0x154e,_0x1514b2=_0x5dfce3['skillCode']?.[_0x322c55(0x18f)]();if(!_0x1514b2)throw CliErrors['validation'](_0x322c55(0x1a7));return _0x1514b2;}export function readMetadataIfPresent(_0x11210f){const _0x3b1f86=a105_0x154e;if(!existsSync(_0x11210f))return undefined;try{const _0x572dee=JSON['parse'](readFileSync(_0x11210f,_0x3b1f86(0x1a4)));return _0x572dee;}catch{throw CliErrors[_0x3b1f86(0x18e)](_0x3b1f86(0x19e)+METADATA_FILE+':\x20'+_0x11210f);}}function remoteManifestOssPath(_0x432aa9){const _0x4b810e=a105_0x154e;if(!_0x432aa9||typeof _0x432aa9!==_0x4b810e(0x196)||Array[_0x4b810e(0x1aa)](_0x432aa9))return undefined;const _0x551471=_0x432aa9['ossPath'];return typeof _0x551471==='string'&&_0x551471[_0x4b810e(0x18f)]()?_0x551471['trim']():undefined;}