@lovrabet/lovrabet-cli 2.1.13-beta.1 → 2.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/function-name-adapter.js +1 -1
  41. package/lib/commands/service/index.js +1 -1
  42. package/lib/commands/service/registry.js +1 -1
  43. package/lib/commands/skill/commands/create.js +1 -1
  44. package/lib/commands/skill/commands/install.js +1 -1
  45. package/lib/commands/skill/commands/list.js +1 -1
  46. package/lib/commands/skill/commands/push.js +1 -1
  47. package/lib/commands/skill/commands/validate.js +1 -1
  48. package/lib/commands/skill/flags.js +1 -1
  49. package/lib/commands/skill/index.js +1 -1
  50. package/lib/commands/skill/manifest-helpers.js +1 -1
  51. package/lib/commands/skill/push-execute.js +1 -1
  52. package/lib/commands/skill/push-flow-helpers.js +1 -1
  53. package/lib/commands/skill/push-retarget.js +1 -1
  54. package/lib/commands/skill/scopes.js +1 -1
  55. package/lib/commands/skill/summary.js +1 -1
  56. package/lib/commands/skill/templates.js +1 -1
  57. package/lib/commands/skill/validate.js +1 -1
  58. package/lib/commands/sql/detail.js +1 -1
  59. package/lib/commands/sql/exec.js +1 -1
  60. package/lib/commands/sql/index.js +1 -1
  61. package/lib/commands/update.js +1 -1
  62. package/lib/commands/workspace/index.js +1 -1
  63. package/lib/config/schema.js +1 -1
  64. package/lib/constant/app.js +1 -1
  65. package/lib/constant/auth-mode.js +1 -1
  66. package/lib/constant/cli.js +1 -1
  67. package/lib/constant/defaults.js +1 -1
  68. package/lib/constant/distribution.js +1 -1
  69. package/lib/constant/domain.js +1 -1
  70. package/lib/constant/env.js +1 -1
  71. package/lib/constant/output.js +1 -1
  72. package/lib/constant/product.js +1 -1
  73. package/lib/constant/risk.js +1 -1
  74. package/lib/constant/url.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/db-resolver.js +1 -1
  78. package/lib/core/sdk-client.js +1 -1
  79. package/lib/errors.js +1 -1
  80. package/lib/framework/build-all-flags.js +1 -1
  81. package/lib/framework/dryrun.js +1 -1
  82. package/lib/framework/flags.js +1 -1
  83. package/lib/framework/help.js +1 -1
  84. package/lib/framework/index.js +1 -1
  85. package/lib/framework/output.js +1 -1
  86. package/lib/framework/preparse.js +1 -1
  87. package/lib/framework/rate-limit.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/lossless-json.js +1 -1
  115. package/lib/utils/params.js +1 -1
  116. package/lib/utils/platform.js +1 -1
  117. package/lib/utils/update-notice.js +1 -1
  118. package/lib/utils/version.js +1 -1
  119. package/lib/utils/write-cli-side-channel.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- function a89_0x56ff(){const _0x37e090=['936342wfSEJl','message','status','10rCudGq','response','128IOPjxE','6223356KUQfaG','3032419henDod','30663ghgtFn','1340262qLvVsP','description','stringify','validation','code','1227272GVeBHJ','1KafwOs','string','914865tSQGiD','12qWzejg','24UJjFRp','5LoUSQp','headers','trim'];a89_0x56ff=function(){return _0x37e090;};return a89_0x56ff();}(function(_0x23e11e,_0x2343fe){const _0x2b73c6=a89_0x1171,_0x1813dd=_0x23e11e();while(!![]){try{const _0x3be77c=parseInt(_0x2b73c6(0x119))/0x1*(parseInt(_0x2b73c6(0x118))/0x2)+parseInt(_0x2b73c6(0x112))/0x3*(parseInt(_0x2b73c6(0x10f))/0x4)+-parseInt(_0x2b73c6(0x11e))/0x5*(parseInt(_0x2b73c6(0x121))/0x6)+-parseInt(_0x2b73c6(0x11b))/0x7*(-parseInt(_0x2b73c6(0x11d))/0x8)+-parseInt(_0x2b73c6(0x110))/0x9*(parseInt(_0x2b73c6(0x124))/0xa)+parseInt(_0x2b73c6(0x113))/0xb+-parseInt(_0x2b73c6(0x11c))/0xc*(parseInt(_0x2b73c6(0x111))/0xd);if(_0x3be77c===_0x2343fe)break;else _0x1813dd['push'](_0x1813dd['shift']());}catch(_0xfb2767){_0x1813dd['push'](_0x1813dd['shift']());}}}(a89_0x56ff,0x5b447));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a89_0x1171(_0x34d08a,_0x567c09){_0x34d08a=_0x34d08a-0x10f;const _0x56ff9e=a89_0x56ff();let _0x11719a=_0x56ff9e[_0x34d08a];return _0x11719a;}export function mapUserFacingExecuteError(_0x40e029){const _0xa32044=a89_0x1171;if(_0x40e029 instanceof LovrabetError){const _0x3af68c=userFacingLovrabetMessage(_0x40e029),_0x3d6620=_0x40e029,_0x200d2b=createRateLimitError({'status':_0x3d6620[_0xa32044(0x123)],'errorCode':_0x3d6620[_0xa32044(0x117)],'message':_0x3af68c,'retryAfter':readRetryAfter(_0x3d6620[_0xa32044(0x125)]?.[_0xa32044(0x11f)])??readRetryAfterSeconds(_0x3d6620['response'])});return _0x200d2b??CliErrors[_0xa32044(0x116)](_0x3af68c);}return _0x40e029;}function userFacingLovrabetMessage(_0x1d8259){const _0x405a3f=a89_0x1171,_0x211640=_0x1d8259[_0x405a3f(0x114)];if(_0x211640!==undefined&&_0x211640!==null){if(typeof _0x211640===_0x405a3f(0x11a)&&_0x211640[_0x405a3f(0x120)]())return _0x211640[_0x405a3f(0x120)]();try{return JSON[_0x405a3f(0x115)](_0x211640);}catch{}}return _0x1d8259[_0x405a3f(0x122)];}
1
+ (function(_0x54067a,_0xa90b9d){const _0x15a06d=a89_0x2214,_0x903271=_0x54067a();while(!![]){try{const _0x5b1cfc=-parseInt(_0x15a06d(0xeb))/0x1*(-parseInt(_0x15a06d(0xf0))/0x2)+parseInt(_0x15a06d(0xe2))/0x3*(-parseInt(_0x15a06d(0xe9))/0x4)+parseInt(_0x15a06d(0xed))/0x5+-parseInt(_0x15a06d(0xdf))/0x6+parseInt(_0x15a06d(0xe1))/0x7+parseInt(_0x15a06d(0xe5))/0x8*(-parseInt(_0x15a06d(0xe6))/0x9)+-parseInt(_0x15a06d(0xe7))/0xa*(-parseInt(_0x15a06d(0xe8))/0xb);if(_0x5b1cfc===_0xa90b9d)break;else _0x903271['push'](_0x903271['shift']());}catch(_0x2609fa){_0x903271['push'](_0x903271['shift']());}}}(a89_0x4124,0x9f907));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';function a89_0x4124(){const _0x4e519a=['response','2169324IJCbte','validation','134435iwIOIR','27681jPzrDw','trim','message','8BXNaNv','7874001SeUcKZ','6740KfeytR','23419lWKLXC','116ngaqrC','stringify','146917BbFjJU','string','1313495cwiZhN','status','description','6RUhLyA','code'];a89_0x4124=function(){return _0x4e519a;};return a89_0x4124();}function a89_0x2214(_0x37a198,_0x4acb45){_0x37a198=_0x37a198-0xdd;const _0x41247f=a89_0x4124();let _0x221410=_0x41247f[_0x37a198];return _0x221410;}import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x29a3e2){const _0x2c6f74=a89_0x2214;if(_0x29a3e2 instanceof LovrabetError){const _0x496650=userFacingLovrabetMessage(_0x29a3e2),_0x41884d=_0x29a3e2,_0x32707d=createRateLimitError({'status':_0x41884d[_0x2c6f74(0xee)],'errorCode':_0x41884d[_0x2c6f74(0xdd)],'message':_0x496650,'retryAfter':readRetryAfter(_0x41884d[_0x2c6f74(0xde)]?.['headers'])??readRetryAfterSeconds(_0x41884d['response'])});return _0x32707d??CliErrors[_0x2c6f74(0xe0)](_0x496650);}return _0x29a3e2;}function userFacingLovrabetMessage(_0x848d38){const _0x13c0bf=a89_0x2214,_0x2830bd=_0x848d38[_0x13c0bf(0xef)];if(_0x2830bd!==undefined&&_0x2830bd!==null){if(typeof _0x2830bd===_0x13c0bf(0xec)&&_0x2830bd[_0x13c0bf(0xe3)]())return _0x2830bd[_0x13c0bf(0xe3)]();try{return JSON[_0x13c0bf(0xea)](_0x2830bd);}catch{}}return _0x848d38[_0x13c0bf(0xe4)];}
@@ -1 +1 @@
1
- const a90_0x4eeae2=a90_0x1136;(function(_0x5e88cd,_0x1451f8){const _0x334cd3=a90_0x1136,_0x21fe7d=_0x5e88cd();while(!![]){try{const _0x2037fc=-parseInt(_0x334cd3(0xfa))/0x1*(-parseInt(_0x334cd3(0x136))/0x2)+-parseInt(_0x334cd3(0x111))/0x3*(-parseInt(_0x334cd3(0x124))/0x4)+parseInt(_0x334cd3(0x120))/0x5+parseInt(_0x334cd3(0x125))/0x6+parseInt(_0x334cd3(0x10c))/0x7*(parseInt(_0x334cd3(0x127))/0x8)+parseInt(_0x334cd3(0x10f))/0x9*(parseInt(_0x334cd3(0x11f))/0xa)+-parseInt(_0x334cd3(0x105))/0xb*(parseInt(_0x334cd3(0x122))/0xc);if(_0x2037fc===_0x1451f8)break;else _0x21fe7d['push'](_0x21fe7d['shift']());}catch(_0xd4391d){_0x21fe7d['push'](_0x21fe7d['shift']());}}}(a90_0x1f7d,0x469d9));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(_0xe39ac2){return void _0xe39ac2,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x5dc982,_0x3ea477){const _0x28aa4a=a90_0x1136,_0x183a8b=typeof _0x3ea477['app']==='string'&&_0x3ea477[_0x28aa4a(0xfd)]['trim']();return{'rawFlags':_0x3ea477,'appCode':_0x5dc982[_0x28aa4a(0x137)]||productEnv('APPCODE')||(_0x183a8b?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5dc982[_0x28aa4a(0x12b)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3ea477),'defaultFormat':_0x5dc982[_0x28aa4a(0x121)],'defaultPageSize':_0x5dc982[_0x28aa4a(0x118)],'defaultVerbose':_0x5dc982['verbose'],'riskLevel':_0x5dc982[_0x28aa4a(0x113)],'accessKey':_0x5dc982[_0x28aa4a(0xfe)],'env':_0x5dc982[_0x28aa4a(0x128)],'mergedCli':{'defaultApp':_0x5dc982[_0x28aa4a(0x10b)],'currentApp':_0x5dc982[_0x28aa4a(0x104)],'appCode':_0x5dc982[_0x28aa4a(0x137)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x4eeae2(0x11a)](_0x15080a=>PIPELINE_FLAG_NAMES['has'](_0x15080a['name']))[a90_0x4eeae2(0xff)](({name:_0xc70390,type:_0x34ebf0,description:_0xb0d7c2})=>({'name':_0xc70390,'type':_0x34ebf0,'description':_0xb0d7c2})),'formatOutput':formatOutput,'getCommandLabel'(_0xf1a95){const _0x1ba08e=a90_0x4eeae2;return CLI_BIN_NAME+'\x20'+_0xf1a95[_0x1ba08e(0x103)]+'\x20'+_0xf1a95[_0x1ba08e(0x117)];},'riskPolicy':{'onViolation'(_0x4aed9e){const _0x43f8d9=a90_0x4eeae2;console[_0x43f8d9(0x11d)](_0x4aed9e);},'createError'(_0x399525){return CliErrors['cancelled'](_0x399525);}},async 'prepare'(_0x4e9df4,_0x1f842){const _0x52d553=a90_0x4eeae2,_0x431fc8=resolveAuthMode(_0x1f842);if(_0x4e9df4['requiresAuth']!==![]){if(!_0x1f842[_0x52d553(0xfe)])throw CliErrors[_0x52d553(0x11c)](_0x52d553(0x116)+PRODUCT_CONFIG[_0x52d553(0x130)]+'\x20or\x20pass\x20'+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0xdc2606}=await import(_0x52d553(0x134));_0xdc2606(_0x1f842['accessKey']);}let _0x93d3f9='';if(_0x4e9df4['requiresAppCode']!==![]){_0x93d3f9=_0x1f842[_0x52d553(0x137)]??'',_0x93d3f9=await resolveExplicitAppName(_0x4e9df4,_0x1f842,_0x93d3f9);if(!_0x93d3f9){await assertSelectedAppNameIsRuntimeAccessible(_0x4e9df4,_0x1f842);throw CliErrors[_0x52d553(0x12f)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x4e9df4,_0x1f842,_0x93d3f9);}if(_0x93d3f9){const {initSdkClient:_0x314dc3}=await import('../core/sdk-client.js');_0x314dc3({'appCode':_0x93d3f9,'env':_0x1f842[_0x52d553(0x128)]??_0x52d553(0x102),'accessKey':_0x1f842[_0x52d553(0xfe)],'authMode':_0x431fc8}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x1f842[_0x52d553(0x11e)]},'numbers':{'pagesize':_0x1f842[_0x52d553(0x12e)]}},'extras':{'appCode':_0x93d3f9,'cookie':'','apiDomain':_0x1f842[_0x52d553(0x106)],'apiDir':'','accessKey':_0x1f842['accessKey'],'envName':_0x1f842[_0x52d553(0x128)],'mergedCli':_0x1f842[_0x52d553(0x123)]}};},async 'confirmHighRisk'({def:_0x236b89,env:_0x1570ae,flags:_0x4a1959,commandLabel:_0x18bb57}){const _0x64c5ce=a90_0x4eeae2;if(_0x1570ae[_0x64c5ce(0x112)]){const _0x5a4670=reconstructCommandArgv(_0x236b89,_0x4a1959);throw CliErrors[_0x64c5ce(0x109)]('High-risk\x20operation\x20`'+_0x18bb57+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x64c5ce(0x138)+_0x5a4670));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x236b89,_0x18bb57,_0x4a1959),'createCancelledError':_0x266361=>CliErrors[_0x64c5ce(0x108)](_0x266361)});},'mapDryRunError'(_0xe69e30){return mapUserFacingExecuteError(_0xe69e30);},'mapExecuteError'(_0x112cd9){return mapUserFacingExecuteError(_0x112cd9);},async 'finalize'(){const _0x52646e=a90_0x4eeae2;try{if(sdkClientInitialized){const {clearSdkClient:_0x256a75}=await import(_0x52646e(0x107));_0x256a75();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x3da727}=await import(_0x52646e(0x134));_0x3da727();}}};async function resolveExplicitAppName(_0x20edfd,_0x1129c6,_0x132e97){const _0x2ac6c4=a90_0x4eeae2;if(_0x20edfd[_0x2ac6c4(0x12c)]===![])return _0x132e97;const _0x2834a6=typeof _0x1129c6[_0x2ac6c4(0x12a)][_0x2ac6c4(0xfd)]===_0x2ac6c4(0x133)?_0x1129c6[_0x2ac6c4(0x12a)]['app'][_0x2ac6c4(0x131)]():'';if(!_0x2834a6)return _0x132e97;const _0x57927e=typeof _0x1129c6[_0x2ac6c4(0x12a)][_0x2ac6c4(0x11b)]===_0x2ac6c4(0x133)&&_0x1129c6[_0x2ac6c4(0x12a)][_0x2ac6c4(0x11b)][_0x2ac6c4(0x131)]()||productEnv(_0x2ac6c4(0x12d));if(_0x57927e||_0x1129c6[_0x2ac6c4(0x12b)]===_0x2ac6c4(0x115))return _0x132e97;const {getRemoteAppList:_0x3b4d75}=await import(_0x2ac6c4(0x132)),_0x28e2b6=await _0x3b4d75({'env':_0x1129c6[_0x2ac6c4(0x128)]??_0x2ac6c4(0x102),'accessKey':_0x1129c6[_0x2ac6c4(0xfe)]}),_0x58afef=findAppByName(_0x28e2b6['items'],_0x2834a6);if(_0x58afef&&!isRuntimeAccessibleApp(_0x58afef))throw runtimeInaccessibleAppError(_0x58afef,'\x22'+_0x2834a6+'\x22');const _0x1e771d=_0x58afef?.[_0x2ac6c4(0x137)]?.[_0x2ac6c4(0x131)]();if(_0x1e771d)return _0x1e771d;throw CliErrors[_0x2ac6c4(0x109)](_0x2ac6c4(0xfb)+_0x2834a6,_0x2ac6c4(0x100)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x2834a6+_0x2ac6c4(0x135)+PRODUCT_CONFIG[_0x2ac6c4(0x130)]+'.');}function a90_0x1136(_0x268487,_0x5a8d82){_0x268487=_0x268487-0xfa;const _0x1f7d78=a90_0x1f7d();let _0x1136ef=_0x1f7d78[_0x268487];return _0x1136ef;}async function assertSelectedAppNameIsRuntimeAccessible(_0x51f977,_0x2b2bb1){const _0x4980ea=a90_0x4eeae2;if(_0x51f977[_0x4980ea(0x12c)]===![]||!_0x2b2bb1['accessKey'])return;const _0x224958=(typeof _0x2b2bb1[_0x4980ea(0x12a)][_0x4980ea(0xfd)]==='string'&&_0x2b2bb1[_0x4980ea(0x12a)][_0x4980ea(0xfd)][_0x4980ea(0x131)]()?_0x2b2bb1[_0x4980ea(0x12a)][_0x4980ea(0xfd)]:_0x2b2bb1[_0x4980ea(0x123)]?.[_0x4980ea(0x104)]??_0x2b2bb1['mergedCli']?.[_0x4980ea(0x10b)])?.[_0x4980ea(0x131)]();if(!_0x224958)return;const {getRemoteAppList:_0x30f20c}=await import(_0x4980ea(0x132)),_0x360cb3=await _0x30f20c({'env':_0x2b2bb1['env']??_0x4980ea(0x102),'accessKey':_0x2b2bb1['accessKey']}),_0x50eebe=findAppByName(_0x360cb3[_0x4980ea(0x101)],_0x224958);if(_0x50eebe&&!isRuntimeAccessibleApp(_0x50eebe))throw runtimeInaccessibleAppError(_0x50eebe,'\x22'+_0x224958+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5dc22b,_0x4f3452,_0x558aec){const _0x2b5287=a90_0x4eeae2;if(_0x5dc22b['requiresAppCode']===![]||!_0x4f3452['accessKey'])return;const {getRemoteAppList:_0x30f802}=await import(_0x2b5287(0x132)),_0x29113c=await _0x30f802({'env':_0x4f3452[_0x2b5287(0x128)]??_0x2b5287(0x102),'accessKey':_0x4f3452[_0x2b5287(0xfe)]}),_0x47142f=findAppByCode(_0x29113c[_0x2b5287(0x101)],_0x558aec);if(_0x47142f&&!isRuntimeAccessibleApp(_0x47142f))throw runtimeInaccessibleAppError(_0x47142f,'appcode\x20\x22'+_0x558aec+'\x22');}export async function runCommand(_0x307437,_0x2309a2){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x307437)?withUpdateNotice(_0x307437):_0x307437,_0x2309a2,runnerAdapter);}function a90_0x1f7d(){const _0x20399d=['259180YpkJVd','format','4239288dSoXvp','mergedCli','19240osyjOk','863352sfiDtM','doctor','1578712WYTXtz','env','pretty','rawFlags','appCodeSource','requiresAppCode','APPCODE','defaultPageSize','configMissing','newConfigFileName','trim','../commands/app/remote-source.js','string','../core/api-client.js','.appcode\x20to\x20','2DEAFZn','appCode','\x20\x20To\x20proceed:\x20','_notice','189529kKAvAi','Unknown\x20app:\x20','resolve','app','accessKey','map','Run\x20`','items','production','service','currentApp','11IGHNnk','apiDomain','../core/sdk-client.js','cancelled','validation','execute','defaultApp','7AcXmzH','includes','schema','2007JtVRds','object','30EShroX','isNonInteractive','riskLevel','nonInteractive','local-alias','Set\x20accessKey\x20in\x20','command','pageSize','update','filter','appcode','authRequired','error','defaultVerbose','530bayEBa'];a90_0x1f7d=function(){return _0x20399d;};return a90_0x1f7d();}function shouldAttachUpdateNotice(_0x20d1dc){const _0x4e0e3b=a90_0x4eeae2;return![_0x4e0e3b(0x119),_0x4e0e3b(0x10e),_0x4e0e3b(0x126)][_0x4e0e3b(0x10d)](_0x20d1dc['service']);}function withUpdateNotice(_0x5c3964){return{..._0x5c3964,async 'execute'(_0x1643a0){const _0x48f4cf=a90_0x1136,_0x511621=shouldResolveUpdateNotice(_0x1643a0)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x48f4cf(0xfc)](null),_0x7ffbd9=await _0x5c3964[_0x48f4cf(0x10a)](_0x1643a0);return attachUpdateNotice(_0x7ffbd9,await _0x511621);}};}function shouldResolveUpdateNotice(_0x180818){const _0x48204f=a90_0x4eeae2;return _0x180818['format']===_0x48204f(0x129)&&!_0x180818[_0x48204f(0x114)];}function attachUpdateNotice(_0x30683b,_0x243dc5){const _0x1fe6ae=a90_0x4eeae2;if(!_0x243dc5||!_0x30683b||typeof _0x30683b!==_0x1fe6ae(0x110))return _0x30683b;const _0x5e5239=_0x30683b,_0x46c81d=typeof _0x5e5239[_0x1fe6ae(0x139)]===_0x1fe6ae(0x110)&&_0x5e5239[_0x1fe6ae(0x139)]!==null?_0x5e5239[_0x1fe6ae(0x139)]:{};return{..._0x5e5239,'_notice':{..._0x46c81d,'update':_0x243dc5}};}
1
+ const a90_0x1fb789=a90_0x5ef9;(function(_0x18637f,_0x46f21b){const _0x1d3181=a90_0x5ef9,_0xae32af=_0x18637f();while(!![]){try{const _0x47dd99=-parseInt(_0x1d3181(0x20e))/0x1*(parseInt(_0x1d3181(0x1df))/0x2)+-parseInt(_0x1d3181(0x1d9))/0x3*(-parseInt(_0x1d3181(0x1e2))/0x4)+parseInt(_0x1d3181(0x20c))/0x5+parseInt(_0x1d3181(0x1db))/0x6+parseInt(_0x1d3181(0x1e5))/0x7+parseInt(_0x1d3181(0x1f0))/0x8+-parseInt(_0x1d3181(0x1e0))/0x9;if(_0x47dd99===_0x46f21b)break;else _0xae32af['push'](_0xae32af['shift']());}catch(_0x5707ac){_0xae32af['push'](_0xae32af['shift']());}}}(a90_0x26e3,0x2bd30));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a90_0x26e3(){const _0x5bf428=['1193694PoPjAt','rawFlags','cancelled','env','238462FHJtuy','3447513ypyQPV','pretty','11036yvTAQI','appCode','schema','1466542PXsyom','newConfigFileName','../commands/app/remote-source.js','nonInteractive','execute','local-alias','appcode','currentApp','High-risk\x20operation\x20`','app','filter','2481992FAxISC','defaultApp','authRequired','ACCESS_KEY','configMissing','error','accessKey','../core/api-client.js','catch','../core/sdk-client.js','.appcode\x20to\x20','resolve','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','command','Run\x20`','Unknown\x20app:\x20','appcode\x20\x22','production','object','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','mergedCli','\x20\x20To\x20proceed:\x20','APPCODE','string','trim','_notice','appCodeSource','map','607695myhPoN','name','3EVgVwP','service','format','items','requiresAuth','requiresAppCode','validation','87tZKIjq','defaultVerbose'];a90_0x26e3=function(){return _0x5bf428;};return a90_0x26e3();}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';function a90_0x5ef9(_0x5c258d,_0x29fa68){_0x5c258d=_0x5c258d-0x1d3;const _0x26e3de=a90_0x26e3();let _0x5ef99c=_0x26e3de[_0x5c258d];return _0x5ef99c;}export function resolveAuthMode(_0x5692c0){return void _0x5692c0,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x53334b,_0x21f5b0){const _0x323704=a90_0x5ef9,_0xde146=typeof _0x21f5b0[_0x323704(0x1ee)]===_0x323704(0x207)&&_0x21f5b0[_0x323704(0x1ee)][_0x323704(0x208)]();return{'rawFlags':_0x21f5b0,'appCode':_0x53334b['appCode']||productEnv(_0x323704(0x206))||(_0xde146?undefined:readAppCodeFromConfig()),'appCodeSource':_0x53334b['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x21f5b0),'defaultFormat':_0x53334b[_0x323704(0x1d4)],'defaultPageSize':_0x53334b['pageSize'],'defaultVerbose':_0x53334b['verbose'],'riskLevel':_0x53334b['riskLevel'],'accessKey':_0x53334b[_0x323704(0x1f6)],'env':_0x53334b[_0x323704(0x1de)],'mergedCli':{'defaultApp':_0x53334b[_0x323704(0x1f1)],'currentApp':_0x53334b[_0x323704(0x1ec)],'appCode':_0x53334b['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x1fb789(0x1ef)](_0xb71dfa=>PIPELINE_FLAG_NAMES['has'](_0xb71dfa[a90_0x1fb789(0x20d)]))[a90_0x1fb789(0x20b)](({name:_0x1e6b91,type:_0x4e63b1,description:_0x5e7d0f})=>({'name':_0x1e6b91,'type':_0x4e63b1,'description':_0x5e7d0f})),'formatOutput':formatOutput,'getCommandLabel'(_0x1d3186){const _0x281afd=a90_0x1fb789;return CLI_BIN_NAME+'\x20'+_0x1d3186[_0x281afd(0x1d3)]+'\x20'+_0x1d3186[_0x281afd(0x1fd)];},'riskPolicy':{'onViolation'(_0xd5af1a){const _0x2d5a8b=a90_0x1fb789;console[_0x2d5a8b(0x1f5)](_0xd5af1a);},'createError'(_0x325d2d){const _0x4f17f8=a90_0x1fb789;return CliErrors[_0x4f17f8(0x1dd)](_0x325d2d);}},async 'prepare'(_0x92d15a,_0x620ca6){const _0x22865c=a90_0x1fb789,_0x58610d=resolveAuthMode(_0x620ca6);if(_0x92d15a[_0x22865c(0x1d6)]!==![]){if(!_0x620ca6['accessKey'])throw CliErrors[_0x22865c(0x1f2)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x22865c(0x1f3))+'.');const {setActiveAK:_0x39b178}=await import(_0x22865c(0x1f7));_0x39b178(_0x620ca6['accessKey']);}let _0x2ea03b='';if(_0x92d15a[_0x22865c(0x1d7)]!==![]){_0x2ea03b=_0x620ca6[_0x22865c(0x1e3)]??'',_0x2ea03b=await resolveExplicitAppName(_0x92d15a,_0x620ca6,_0x2ea03b);if(!_0x2ea03b){await assertSelectedAppNameIsRuntimeAccessible(_0x92d15a,_0x620ca6);throw CliErrors[_0x22865c(0x1f4)](_0x22865c(0x203)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x92d15a,_0x620ca6,_0x2ea03b);}if(_0x2ea03b){const {initSdkClient:_0x580bc1}=await import(_0x22865c(0x1f9));_0x580bc1({'appCode':_0x2ea03b,'env':_0x620ca6[_0x22865c(0x1de)]??'production','accessKey':_0x620ca6['accessKey'],'authMode':_0x58610d}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x620ca6[_0x22865c(0x1da)]},'numbers':{'pagesize':_0x620ca6['defaultPageSize']}},'extras':{'appCode':_0x2ea03b,'cookie':'','apiDomain':_0x620ca6['apiDomain'],'apiDir':'','accessKey':_0x620ca6['accessKey'],'envName':_0x620ca6[_0x22865c(0x1de)],'mergedCli':_0x620ca6['mergedCli']}};},async 'confirmHighRisk'({def:_0x21164a,env:_0x307a84,flags:_0xe0a927,commandLabel:_0x5cccc7}){const _0x597e34=a90_0x1fb789;if(_0x307a84['isNonInteractive']){const _0x47287c=reconstructCommandArgv(_0x21164a,_0xe0a927);throw CliErrors[_0x597e34(0x1d8)](_0x597e34(0x1ed)+_0x5cccc7+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x597e34(0x205)+_0x47287c));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x21164a,_0x5cccc7,_0xe0a927),'createCancelledError':_0x5918ae=>CliErrors[_0x597e34(0x1dd)](_0x5918ae)});},'mapDryRunError'(_0x15b954){return mapUserFacingExecuteError(_0x15b954);},'mapExecuteError'(_0x4cbb16){return mapUserFacingExecuteError(_0x4cbb16);},async 'finalize'(){const _0x3d26ec=a90_0x1fb789;try{if(sdkClientInitialized){const {clearSdkClient:_0x2d7a6e}=await import(_0x3d26ec(0x1f9));_0x2d7a6e();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x201e6d}=await import(_0x3d26ec(0x1f7));_0x201e6d();}}};async function resolveExplicitAppName(_0x50d970,_0x1d25b3,_0x4aee2c){const _0x49ad3d=a90_0x1fb789;if(_0x50d970[_0x49ad3d(0x1d7)]===![])return _0x4aee2c;const _0x54b79e=typeof _0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1ee)]===_0x49ad3d(0x207)?_0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1ee)]['trim']():'';if(!_0x54b79e)return _0x4aee2c;const _0x500156=typeof _0x1d25b3['rawFlags'][_0x49ad3d(0x1eb)]===_0x49ad3d(0x207)&&_0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1eb)][_0x49ad3d(0x208)]()||productEnv(_0x49ad3d(0x206));if(_0x500156||_0x1d25b3[_0x49ad3d(0x20a)]===_0x49ad3d(0x1ea))return _0x4aee2c;const {getRemoteAppList:_0x54a99f}=await import('../commands/app/remote-source.js'),_0x3de6a1=await _0x54a99f({'env':_0x1d25b3['env']??_0x49ad3d(0x201),'accessKey':_0x1d25b3[_0x49ad3d(0x1f6)]}),_0xdcb9e1=findAppByName(_0x3de6a1[_0x49ad3d(0x1d5)],_0x54b79e);if(_0xdcb9e1&&!isRuntimeAccessibleApp(_0xdcb9e1))throw runtimeInaccessibleAppError(_0xdcb9e1,'\x22'+_0x54b79e+'\x22');const _0x7ea12e=_0xdcb9e1?.[_0x49ad3d(0x1e3)]?.[_0x49ad3d(0x208)]();if(_0x7ea12e)return _0x7ea12e;throw CliErrors[_0x49ad3d(0x1d8)](_0x49ad3d(0x1ff)+_0x54b79e,_0x49ad3d(0x1fe)+CLI_BIN_NAME+_0x49ad3d(0x1fc)+_0x54b79e+_0x49ad3d(0x1fa)+PRODUCT_CONFIG[_0x49ad3d(0x1e6)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x11cb88,_0x3fe44b){const _0x1585dc=a90_0x1fb789;if(_0x11cb88[_0x1585dc(0x1d7)]===![]||!_0x3fe44b[_0x1585dc(0x1f6)])return;const _0x2cc785=(typeof _0x3fe44b[_0x1585dc(0x1dc)][_0x1585dc(0x1ee)]===_0x1585dc(0x207)&&_0x3fe44b['rawFlags'][_0x1585dc(0x1ee)][_0x1585dc(0x208)]()?_0x3fe44b[_0x1585dc(0x1dc)][_0x1585dc(0x1ee)]:_0x3fe44b[_0x1585dc(0x204)]?.[_0x1585dc(0x1ec)]??_0x3fe44b[_0x1585dc(0x204)]?.['defaultApp'])?.[_0x1585dc(0x208)]();if(!_0x2cc785)return;const {getRemoteAppList:_0x21e1a0}=await import('../commands/app/remote-source.js'),_0x47bd4c=await _0x21e1a0({'env':_0x3fe44b[_0x1585dc(0x1de)]??'production','accessKey':_0x3fe44b[_0x1585dc(0x1f6)]}),_0x3632a5=findAppByName(_0x47bd4c['items'],_0x2cc785);if(_0x3632a5&&!isRuntimeAccessibleApp(_0x3632a5))throw runtimeInaccessibleAppError(_0x3632a5,'\x22'+_0x2cc785+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1d87f8,_0x2a3a99,_0xd1ff2e){const _0x287a6b=a90_0x1fb789;if(_0x1d87f8[_0x287a6b(0x1d7)]===![]||!_0x2a3a99[_0x287a6b(0x1f6)])return;const {getRemoteAppList:_0x24b158}=await import(_0x287a6b(0x1e7)),_0x73794c=await _0x24b158({'env':_0x2a3a99['env']??_0x287a6b(0x201),'accessKey':_0x2a3a99['accessKey']}),_0x19a5ca=findAppByCode(_0x73794c[_0x287a6b(0x1d5)],_0xd1ff2e);if(_0x19a5ca&&!isRuntimeAccessibleApp(_0x19a5ca))throw runtimeInaccessibleAppError(_0x19a5ca,_0x287a6b(0x200)+_0xd1ff2e+'\x22');}export async function runCommand(_0x1464c7,_0x5769f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1464c7)?withUpdateNotice(_0x1464c7):_0x1464c7,_0x5769f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x357b34){const _0x16327a=a90_0x1fb789;return!['update',_0x16327a(0x1e4),'doctor']['includes'](_0x357b34[_0x16327a(0x1d3)]);}function withUpdateNotice(_0x276a49){return{..._0x276a49,async 'execute'(_0x39bb10){const _0x28c322=a90_0x5ef9,_0x37767e=shouldResolveUpdateNotice(_0x39bb10)?resolveLatestUpdateNotice()[_0x28c322(0x1f8)](()=>null):Promise[_0x28c322(0x1fb)](null),_0x35084e=await _0x276a49[_0x28c322(0x1e9)](_0x39bb10);return attachUpdateNotice(_0x35084e,await _0x37767e);}};}function shouldResolveUpdateNotice(_0x312103){const _0x58fff2=a90_0x1fb789;return _0x312103['format']===_0x58fff2(0x1e1)&&!_0x312103[_0x58fff2(0x1e8)];}function attachUpdateNotice(_0x2b8ac3,_0x135fc7){const _0x4f7797=a90_0x1fb789;if(!_0x135fc7||!_0x2b8ac3||typeof _0x2b8ac3!==_0x4f7797(0x202))return _0x2b8ac3;const _0x2ee42b=_0x2b8ac3,_0x1d86c1=typeof _0x2ee42b['_notice']===_0x4f7797(0x202)&&_0x2ee42b[_0x4f7797(0x209)]!==null?_0x2ee42b['_notice']:{};return{..._0x2ee42b,'_notice':{..._0x1d86c1,'update':_0x135fc7}};}
@@ -1 +1 @@
1
- (function(_0x3efa26,_0x12b8ac){const _0x2d72d6=a91_0x489a,_0x35eb2e=_0x3efa26();while(!![]){try{const _0x5c516e=-parseInt(_0x2d72d6(0x18e))/0x1+parseInt(_0x2d72d6(0x189))/0x2+-parseInt(_0x2d72d6(0x18a))/0x3*(-parseInt(_0x2d72d6(0x17f))/0x4)+-parseInt(_0x2d72d6(0x18d))/0x5+-parseInt(_0x2d72d6(0x181))/0x6+-parseInt(_0x2d72d6(0x188))/0x7*(parseInt(_0x2d72d6(0x180))/0x8)+parseInt(_0x2d72d6(0x183))/0x9;if(_0x5c516e===_0x12b8ac)break;else _0x35eb2e['push'](_0x35eb2e['shift']());}catch(_0x4df71c){_0x35eb2e['push'](_0x35eb2e['shift']());}}}(a91_0x41a8,0x8cd2c));import{buildSchemaPayload as a91_0x263164}from'@lovrabet/cli-framework';function a91_0x41a8(){const _0x184ae5=['1042260YzgyKd','has','required','28mnsqKg','10960yjPNnC','1742082nurzyN','services','9669411jiYfMF','none','requiresAuth','map','../commands/registry.js','749wuFQlK','1169370lYKjZm','256407kyKeNr','service','auth','1006690kUNZcb'];a91_0x41a8=function(){return _0x184ae5;};return a91_0x41a8();}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a91_0x489a(_0x24f76e,_0x3224f2){_0x24f76e=_0x24f76e-0x17e;const _0x41a851=a91_0x41a8();let _0x489af0=_0x41a851[_0x24f76e];return _0x489af0;}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 _0x53822e=a91_0x489a,{serviceRegistry:_0x5dbed9,findDefinition:_0x43b28f}=await import(_0x53822e(0x187)),_0x22881d=new Set(_0x5dbed9['map'](_0x39f04f=>_0x39f04f[_0x53822e(0x18b)])),_0x1b69e7=listDynamicServiceEntries()['filter'](_0x40487e=>!_0x22881d[_0x53822e(0x18f)](_0x40487e['service'])),_0x570264=a91_0x263164({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x5dbed9,_0x1b69e7),'buildAllFlags':buildAllFlags,'findDefinition':(_0x54623a,_0x38af05)=>_0x43b28f(_0x54623a,_0x38af05)??findDynamicServiceDefinition(_0x54623a,_0x38af05)});return normalizeSchemaPayload(_0x570264);}function normalizeSchemaPayload(_0x3578ca){const _0x33b786=a91_0x489a;return{..._0x3578ca,'schemaVersion':0x2,'services':_0x3578ca[_0x33b786(0x182)][_0x33b786(0x186)](_0x314d41=>({..._0x314d41,'commands':_0x314d41['commands'][_0x33b786(0x186)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x41b8a5){const _0x5e4ac7=a91_0x489a,_0x1dde05=_0x41b8a5;return{..._0x41b8a5,'auth':_0x1dde05[_0x5e4ac7(0x18c)]??(_0x41b8a5[_0x5e4ac7(0x185)]?_0x5e4ac7(0x17e):_0x5e4ac7(0x184))};}
1
+ function a91_0x4f87(_0x44edb0,_0x116c9e){_0x44edb0=_0x44edb0-0x14b;const _0x2cbe99=a91_0x2cbe();let _0x4f8791=_0x2cbe99[_0x44edb0];return _0x4f8791;}(function(_0x22aae2,_0x32eaa2){const _0xe82ce=a91_0x4f87,_0x1c080f=_0x22aae2();while(!![]){try{const _0x30e07c=parseInt(_0xe82ce(0x156))/0x1*(parseInt(_0xe82ce(0x150))/0x2)+-parseInt(_0xe82ce(0x159))/0x3+-parseInt(_0xe82ce(0x152))/0x4+-parseInt(_0xe82ce(0x14f))/0x5+-parseInt(_0xe82ce(0x154))/0x6*(-parseInt(_0xe82ce(0x157))/0x7)+parseInt(_0xe82ce(0x155))/0x8+-parseInt(_0xe82ce(0x153))/0x9;if(_0x30e07c===_0x32eaa2)break;else _0x1c080f['push'](_0x1c080f['shift']());}catch(_0x2c59a7){_0x1c080f['push'](_0x1c080f['shift']());}}}(a91_0x2cbe,0x59d25));import{buildSchemaPayload as a91_0x4008ea}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 _0x21ebf0=a91_0x4f87,{serviceRegistry:_0xd75450,findDefinition:_0x3745e7}=await import('../commands/registry.js'),_0x1546d0=new Set(_0xd75450[_0x21ebf0(0x14b)](_0x54c6b8=>_0x54c6b8[_0x21ebf0(0x158)])),_0x34f9d4=listDynamicServiceEntries()['filter'](_0x5d7a68=>!_0x1546d0[_0x21ebf0(0x14c)](_0x5d7a68[_0x21ebf0(0x158)])),_0x1a01cc=a91_0x4008ea({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0xd75450,_0x34f9d4),'buildAllFlags':buildAllFlags,'findDefinition':(_0x557b18,_0x283a33)=>_0x3745e7(_0x557b18,_0x283a33)??findDynamicServiceDefinition(_0x557b18,_0x283a33)});return normalizeSchemaPayload(_0x1a01cc);}function a91_0x2cbe(){const _0x336c79=['3414159URrlUi','48030zMkqNu','4390192mTUVQJ','2HHffbX','406HIVuFb','service','373641EJMmeh','auth','map','has','commands','services','49935sphmcl','468522yGpWAP','required','2399168XlSCSw'];a91_0x2cbe=function(){return _0x336c79;};return a91_0x2cbe();}function normalizeSchemaPayload(_0x234782){const _0x13ff82=a91_0x4f87;return{..._0x234782,'schemaVersion':0x2,'services':_0x234782[_0x13ff82(0x14e)][_0x13ff82(0x14b)](_0x200898=>({..._0x200898,'commands':_0x200898[_0x13ff82(0x14d)][_0x13ff82(0x14b)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3f96e2){const _0x577787=a91_0x4f87,_0x574414=_0x3f96e2;return{..._0x3f96e2,'auth':_0x574414[_0x577787(0x15a)]??(_0x3f96e2['requiresAuth']?_0x577787(0x151):'none')};}
@@ -1 +1 @@
1
- function a92_0x1fea(){const _0xc5a8d1=['37736bLajbt','length','service','73585cRtypE','708468hvlEKx','1900296sfSiKs','710812cJcADR','18PwAXem','14fqAHDh','2150224pnmdSJ','5806070JFKAdI','11TqzCoK','slice','88WlFymQ'];a92_0x1fea=function(){return _0xc5a8d1;};return a92_0x1fea();}(function(_0x462926,_0x3b3024){const _0x9daffd=a92_0x5b8d,_0x3274ce=_0x462926();while(!![]){try{const _0x37daec=-parseInt(_0x9daffd(0xd6))/0x1+parseInt(_0x9daffd(0xce))/0x2+parseInt(_0x9daffd(0xcc))/0x3+parseInt(_0x9daffd(0xd5))/0x4*(parseInt(_0x9daffd(0xcb))/0x5)+parseInt(_0x9daffd(0xcd))/0x6*(parseInt(_0x9daffd(0xd0))/0x7)+parseInt(_0x9daffd(0xd1))/0x8*(-parseInt(_0x9daffd(0xcf))/0x9)+parseInt(_0x9daffd(0xd2))/0xa*(-parseInt(_0x9daffd(0xd3))/0xb);if(_0x37daec===_0x3b3024)break;else _0x3274ce['push'](_0x3274ce['shift']());}catch(_0x331dbf){_0x3274ce['push'](_0x3274ce['shift']());}}}(a92_0x1fea,0x5fea5));function a92_0x5b8d(_0x4da4e5,_0xd7a944){_0x4da4e5=_0x4da4e5-0xca;const _0x1fea54=a92_0x1fea();let _0x5b8d54=_0x1fea54[_0x4da4e5];return _0x5b8d54;}export function insertDynamicServicesAfterServiceTree(_0x274fef,_0xcc9a9d){const _0x49c3ad=a92_0x5b8d;if(_0xcc9a9d[_0x49c3ad(0xd7)]===0x0)return[..._0x274fef];const _0x31214f=_0x274fef['findIndex'](_0x1779f7=>_0x1779f7[_0x49c3ad(0xca)]===_0x49c3ad(0xca));if(_0x31214f<0x0)return[..._0x274fef,..._0xcc9a9d];return[..._0x274fef[_0x49c3ad(0xd4)](0x0,_0x31214f+0x1),..._0xcc9a9d,..._0x274fef['slice'](_0x31214f+0x1)];}
1
+ function a92_0x2c78(){const _0x11497f=['408894GHxEMc','2386566KSgZHC','384MnUabI','8neFHvU','34685FaWzQE','1467092XQvjEL','slice','2559564LjHyyd','875594UZAfAU','106083SwvYvN'];a92_0x2c78=function(){return _0x11497f;};return a92_0x2c78();}(function(_0x2445fa,_0x10c3e5){const _0x1d0650=a92_0x3751,_0x5230f5=_0x2445fa();while(!![]){try{const _0x46a80f=parseInt(_0x1d0650(0x12b))/0x1+parseInt(_0x1d0650(0x133))/0x2+-parseInt(_0x1d0650(0x134))/0x3+-parseInt(_0x1d0650(0x130))/0x4+parseInt(_0x1d0650(0x12f))/0x5*(parseInt(_0x1d0650(0x12d))/0x6)+-parseInt(_0x1d0650(0x12c))/0x7+-parseInt(_0x1d0650(0x12e))/0x8*(parseInt(_0x1d0650(0x132))/0x9);if(_0x46a80f===_0x10c3e5)break;else _0x5230f5['push'](_0x5230f5['shift']());}catch(_0x49ed76){_0x5230f5['push'](_0x5230f5['shift']());}}}(a92_0x2c78,0x40417));function a92_0x3751(_0x43ef7f,_0xc6f76){_0x43ef7f=_0x43ef7f-0x12b;const _0x2c7875=a92_0x2c78();let _0x3751e5=_0x2c7875[_0x43ef7f];return _0x3751e5;}export function insertDynamicServicesAfterServiceTree(_0x280094,_0x9f53eb){const _0x311d6d=a92_0x3751;if(_0x9f53eb['length']===0x0)return[..._0x280094];const _0x1d9bb2=_0x280094['findIndex'](_0x21fd15=>_0x21fd15['service']==='service');if(_0x1d9bb2<0x0)return[..._0x280094,..._0x9f53eb];return[..._0x280094[_0x311d6d(0x131)](0x0,_0x1d9bb2+0x1),..._0x9f53eb,..._0x280094['slice'](_0x1d9bb2+0x1)];}
@@ -1 +1 @@
1
- function a93_0xf02f(_0x20ba0c,_0x1188b8){_0x20ba0c=_0x20ba0c-0x13b;var _0x4621cd=a93_0x4621();var _0xf02f49=_0x4621cd[_0x20ba0c];return _0xf02f49;}(function(_0x40b7f7,_0x4eb821){var _0x295377=a93_0xf02f,_0x50bf7c=_0x40b7f7();while(!![]){try{var _0x5da613=parseInt(_0x295377(0x145))/0x1+-parseInt(_0x295377(0x13c))/0x2*(parseInt(_0x295377(0x13f))/0x3)+-parseInt(_0x295377(0x146))/0x4*(-parseInt(_0x295377(0x13d))/0x5)+parseInt(_0x295377(0x143))/0x6+parseInt(_0x295377(0x142))/0x7*(parseInt(_0x295377(0x140))/0x8)+parseInt(_0x295377(0x141))/0x9*(parseInt(_0x295377(0x13b))/0xa)+parseInt(_0x295377(0x13e))/0xb*(-parseInt(_0x295377(0x144))/0xc);if(_0x5da613===_0x4eb821)break;else _0x50bf7c['push'](_0x50bf7c['shift']());}catch(_0x469024){_0x50bf7c['push'](_0x50bf7c['shift']());}}}(a93_0x4621,0x9b095));function a93_0x4621(){var _0x2ed714=['2406enBbVR','8JLhTMa','395982pLPpLc','6214733BBMjOs','6925686uWpuru','24612dNoOAJ','851254gjHkTL','38840WaRLLT','20rwAcCV','734WLpMNi','630QLrHwO','17567RSOJFf'];a93_0x4621=function(){return _0x2ed714;};return a93_0x4621();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a93_0x5956(_0x4e95d9,_0x84e0bd){_0x4e95d9=_0x4e95d9-0xa2;var _0x1e2429=a93_0x1e24();var _0x5956e9=_0x1e2429[_0x4e95d9];return _0x5956e9;}(function(_0x1b115b,_0x3f657d){var _0x385b70=a93_0x5956,_0x26ac02=_0x1b115b();while(!![]){try{var _0x52ab97=-parseInt(_0x385b70(0xa3))/0x1+parseInt(_0x385b70(0xa9))/0x2+parseInt(_0x385b70(0xa6))/0x3*(parseInt(_0x385b70(0xa8))/0x4)+-parseInt(_0x385b70(0xaa))/0x5+parseInt(_0x385b70(0xa7))/0x6+parseInt(_0x385b70(0xa2))/0x7*(parseInt(_0x385b70(0xa5))/0x8)+-parseInt(_0x385b70(0xa4))/0x9;if(_0x52ab97===_0x3f657d)break;else _0x26ac02['push'](_0x26ac02['shift']());}catch(_0x1cf127){_0x26ac02['push'](_0x26ac02['shift']());}}}(a93_0x1e24,0x27d9e));function a93_0x1e24(){var _0x624408=['283416VaWCLY','4OpQWvk','195224XmNbzb','650035GimudG','7FbQfSm','67470bpUPiZ','1002573duHXZY','138616lUteuT','929787bdGyem'];a93_0x1e24=function(){return _0x624408;};return a93_0x1e24();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a94_0x489428=a94_0x45c1;(function(_0x54b2f0,_0x3a8c4a){const _0x510cda=a94_0x45c1,_0x5026cf=_0x54b2f0();while(!![]){try{const _0x5c00e2=parseInt(_0x510cda(0xaf))/0x1+parseInt(_0x510cda(0xb7))/0x2+-parseInt(_0x510cda(0xb2))/0x3*(-parseInt(_0x510cda(0xb4))/0x4)+-parseInt(_0x510cda(0xb8))/0x5+parseInt(_0x510cda(0xae))/0x6*(-parseInt(_0x510cda(0xb1))/0x7)+parseInt(_0x510cda(0xb6))/0x8*(parseInt(_0x510cda(0xb3))/0x9)+parseInt(_0x510cda(0xb5))/0xa;if(_0x5c00e2===_0x3a8c4a)break;else _0x5026cf['push'](_0x5026cf['shift']());}catch(_0x5833d9){_0x5026cf['push'](_0x5026cf['shift']());}}}(a94_0x4acd,0xbf542));export const VERSION=a94_0x489428(0xb0);export const GIT_TAG='v2.1.13-beta.1';export const GIT_COMMIT=a94_0x489428(0xad);function a94_0x45c1(_0x169860,_0x1d8af7){_0x169860=_0x169860-0xac;const _0x4acd88=a94_0x4acd();let _0x45c15a=_0x4acd88[_0x169860];return _0x45c15a;}function a94_0x4acd(){const _0x3b5c03=['186288hUHuvf','1202246xoCEhv','2.1.13-beta.1','245Kbucqd','808485gDudCG','9JyeEvA','8UEDLbh','1376380hIiOTN','5261224UmXkLu','1666694wDubcP','7497560ysRLOj','2026-07-14T15:02:38.454Z','4541b6d'];a94_0x4acd=function(){return _0x3b5c03;};return a94_0x4acd();}export const BUILD_TIME=a94_0x489428(0xac);
1
+ const a94_0x501673=a94_0x2fb5;function a94_0xc563(){const _0xb32263=['v2.1.13-beta.1','6657270uiPJOw','24EPqiup','366414BCqfAm','1341032JyDfmU','4541b6d','3zpeyMv','2.1.13','4199405heiVPG','2026-07-14T15:18:20.801Z','100QcEtuc','43815DzfVKL','425286tgtWHb','35811410HGOAtD'];a94_0xc563=function(){return _0xb32263;};return a94_0xc563();}(function(_0x2d22d1,_0x4373c6){const _0x7a5bbf=a94_0x2fb5,_0x2c4ace=_0x2d22d1();while(!![]){try{const _0x119095=parseInt(_0x7a5bbf(0xad))/0x1*(-parseInt(_0x7a5bbf(0xaa))/0x2)+-parseInt(_0x7a5bbf(0xa4))/0x3*(parseInt(_0x7a5bbf(0xa3))/0x4)+-parseInt(_0x7a5bbf(0xa1))/0x5+-parseInt(_0x7a5bbf(0xa8))/0x6+-parseInt(_0x7a5bbf(0xab))/0x7+-parseInt(_0x7a5bbf(0xa9))/0x8*(-parseInt(_0x7a5bbf(0xa5))/0x9)+parseInt(_0x7a5bbf(0xa6))/0xa;if(_0x119095===_0x4373c6)break;else _0x2c4ace['push'](_0x2c4ace['shift']());}catch(_0x3f5e75){_0x2c4ace['push'](_0x2c4ace['shift']());}}}(a94_0xc563,0xa2e13));export const VERSION=a94_0x501673(0xae);export const GIT_TAG=a94_0x501673(0xa7);export const GIT_COMMIT=a94_0x501673(0xac);function a94_0x2fb5(_0x2a25bd,_0x32da42){_0x2a25bd=_0x2a25bd-0xa1;const _0xc56372=a94_0xc563();let _0x2fb5c2=_0xc56372[_0x2a25bd];return _0x2fb5c2;}export const BUILD_TIME=a94_0x501673(0xa2);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x55cc8c,_0x4bcf5a){const _0x2a59d3=a95_0x2162,_0x2810ad=_0x55cc8c();while(!![]){try{const _0x49eaec=parseInt(_0x2a59d3(0xca))/0x1+-parseInt(_0x2a59d3(0xcd))/0x2+-parseInt(_0x2a59d3(0xc6))/0x3+parseInt(_0x2a59d3(0xd0))/0x4*(parseInt(_0x2a59d3(0xc4))/0x5)+-parseInt(_0x2a59d3(0xc9))/0x6*(-parseInt(_0x2a59d3(0xc8))/0x7)+parseInt(_0x2a59d3(0xc5))/0x8*(-parseInt(_0x2a59d3(0xcc))/0x9)+-parseInt(_0x2a59d3(0xce))/0xa*(-parseInt(_0x2a59d3(0xcb))/0xb);if(_0x49eaec===_0x4bcf5a)break;else _0x2810ad['push'](_0x2810ad['shift']());}catch(_0x3ba322){_0x2810ad['push'](_0x2810ad['shift']());}}}(a95_0x27b1,0x7fe55));import{jsx as a95_0x31e4e2,jsxs as a95_0x1e30f6}from'react/jsx-runtime';function a95_0x2162(_0x15a330,_0x52e800){_0x15a330=_0x15a330-0xc4;const _0x27b159=a95_0x27b1();let _0x216205=_0x27b159[_0x15a330];return _0x216205;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a95_0x27b1(){const _0x29ec83=['416846urTDrg','7485820GJqsux','\x20to\x20view\x20available\x20commands.','188pWCwYE','\x20--help','\x20\x20Use\x20','37990RvhEmM','2932632oCSWgO','2947035eRQlHW','green','152761xlPBEA','186nDsyZO','665586pDLwFv','11YWeMYN','18HOgBSP'];a95_0x27b1=function(){return _0x29ec83;};return a95_0x27b1();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x314027=a95_0x2162,{exit:_0x104625}=useApp();return useEffect(()=>{_0x104625();},[_0x104625]),a95_0x1e30f6(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a95_0x31e4e2(Box,{'children':a95_0x31e4e2(Text,{'bold':!![],'color':_0x314027(0xc7),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x1e30f6(Box,{'marginTop':0x1,'children':[a95_0x31e4e2(Text,{'dimColor':!![],'children':_0x314027(0xd2)}),a95_0x31e4e2(Text,{'bold':!![],'color':_0x314027(0xc7),'children':CLI_BIN_NAME+_0x314027(0xd1)}),a95_0x31e4e2(Text,{'dimColor':!![],'children':_0x314027(0xcf)})]})]});}
1
+ function a95_0x475c(_0x41f18d,_0x3d901c){_0x41f18d=_0x41f18d-0x16d;const _0x5d892e=a95_0x5d89();let _0x475ca6=_0x5d892e[_0x41f18d];return _0x475ca6;}(function(_0x27f278,_0x13fdb4){const _0xb7409b=a95_0x475c,_0x56b762=_0x27f278();while(!![]){try{const _0x46aa97=parseInt(_0xb7409b(0x173))/0x1+parseInt(_0xb7409b(0x179))/0x2+-parseInt(_0xb7409b(0x177))/0x3+-parseInt(_0xb7409b(0x17a))/0x4*(-parseInt(_0xb7409b(0x16d))/0x5)+parseInt(_0xb7409b(0x175))/0x6*(-parseInt(_0xb7409b(0x170))/0x7)+-parseInt(_0xb7409b(0x172))/0x8+parseInt(_0xb7409b(0x178))/0x9*(parseInt(_0xb7409b(0x176))/0xa);if(_0x46aa97===_0x13fdb4)break;else _0x56b762['push'](_0x56b762['shift']());}catch(_0x144457){_0x56b762['push'](_0x56b762['shift']());}}}(a95_0x5d89,0x24fb6));import{jsx as a95_0xf1efa9,jsxs as a95_0x315757}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a95_0x5d89(){const _0x47cf27=['2316536fiUOqM','81487dKvQKZ','\x20to\x20view\x20available\x20commands.','8160oypBjD','4750taGvQQ','589623DzqhUH','11673iBsIjd','397814gaQRzf','19828IcHcEO','\x20\x20Use\x20','5NKuudT','green','column','1358oPbEjM','\x20--help'];a95_0x5d89=function(){return _0x47cf27;};return a95_0x5d89();}export function Help(){const _0xad01ec=a95_0x475c,{exit:_0x2ce816}=useApp();return useEffect(()=>{_0x2ce816();},[_0x2ce816]),a95_0x315757(Box,{'flexDirection':_0xad01ec(0x16f),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0xf1efa9(Box,{'children':a95_0xf1efa9(Text,{'bold':!![],'color':_0xad01ec(0x16e),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x315757(Box,{'marginTop':0x1,'children':[a95_0xf1efa9(Text,{'dimColor':!![],'children':_0xad01ec(0x17b)}),a95_0xf1efa9(Text,{'bold':!![],'color':_0xad01ec(0x16e),'children':CLI_BIN_NAME+_0xad01ec(0x171)}),a95_0xf1efa9(Text,{'dimColor':!![],'children':_0xad01ec(0x174)})]})]});}
@@ -1 +1 @@
1
- (function(_0x41cdb2,_0x2828be){const _0x224d26=a96_0x4086,_0x29ad8f=_0x41cdb2();while(!![]){try{const _0x2fcc94=-parseInt(_0x224d26(0x177))/0x1*(parseInt(_0x224d26(0x176))/0x2)+parseInt(_0x224d26(0x17a))/0x3+-parseInt(_0x224d26(0x17b))/0x4+parseInt(_0x224d26(0x16f))/0x5+-parseInt(_0x224d26(0x17e))/0x6+-parseInt(_0x224d26(0x172))/0x7+parseInt(_0x224d26(0x175))/0x8;if(_0x2fcc94===_0x2828be)break;else _0x29ad8f['push'](_0x29ad8f['shift']());}catch(_0x39f749){_0x29ad8f['push'](_0x29ad8f['shift']());}}}(a96_0x14c5,0x26d26));import{spawnSync}from'node:child_process';function a96_0x4086(_0x2b8300,_0x11f689){_0x2b8300=_0x2b8300-0x16d;const _0x14c51c=a96_0x14c5();let _0x408656=_0x14c51c[_0x2b8300];return _0x408656;}function a96_0x14c5(){const _0x22b823=['skills','6385272pSThPk','173526GiAmwC','3WxnLIA','stderr','trim','17076WauFJb','370960YHtNEY','unknown','stdout','1617738HsAolA','status','stdio','exit\x20','npx','969095ePycuc','pipe','toString','1512028xuzwym','inherit'];a96_0x14c5=function(){return _0x22b823;};return a96_0x14c5();}import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x2ab6b4}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x2ab6b4;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(_0x3a6ea3,_0x38625a=LOVRABET_SKILL_SOURCE,_0x5f2aa6){const _0x47a7a5=a96_0x4086;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x508979=_0x5f2aa6?.[_0x47a7a5(0x180)]??_0x47a7a5(0x173),_0x46b6a4=resolveNpmBin(_0x47a7a5(0x16e)),_0xc6ed4e=[_0x47a7a5(0x174),'add',_0x38625a,'-g','-y'],_0x197719=[_0x46b6a4,..._0xc6ed4e]['join']('\x20');console['log']('*\x20'+_0x197719);const _0x579e41=spawnSync(_0x46b6a4,_0xc6ed4e,{'cwd':_0x3a6ea3,'stdio':_0x508979,'env':process.env,'shell':![]});if(_0x579e41[_0x47a7a5(0x17f)]===0x0)return{'ok':!![],'status':0x0};let _0x43c08a=_0x47a7a5(0x16d)+(_0x579e41[_0x47a7a5(0x17f)]??_0x47a7a5(0x17c));if(_0x508979===_0x47a7a5(0x170)){const _0x9c9a44=_0x579e41['stderr']?_0x579e41[_0x47a7a5(0x178)][_0x47a7a5(0x171)]()['trim']():'',_0x5e0636=_0x579e41[_0x47a7a5(0x17d)]?_0x579e41[_0x47a7a5(0x17d)]['toString']()[_0x47a7a5(0x179)]():'';if(_0x9c9a44)_0x43c08a=_0x9c9a44;else{if(_0x5e0636)_0x43c08a=_0x5e0636;}}return{'ok':![],'status':_0x579e41[_0x47a7a5(0x17f)]??null,'error':_0x43c08a};}
1
+ (function(_0x3b6eb4,_0x394ee5){const _0x4812fc=a96_0x58cd,_0x23ce04=_0x3b6eb4();while(!![]){try{const _0xafb38f=-parseInt(_0x4812fc(0xfa))/0x1+parseInt(_0x4812fc(0x101))/0x2+-parseInt(_0x4812fc(0x10d))/0x3*(-parseInt(_0x4812fc(0x109))/0x4)+-parseInt(_0x4812fc(0x10a))/0x5*(-parseInt(_0x4812fc(0x105))/0x6)+-parseInt(_0x4812fc(0xfb))/0x7*(parseInt(_0x4812fc(0x10c))/0x8)+-parseInt(_0x4812fc(0x104))/0x9+parseInt(_0x4812fc(0xfe))/0xa;if(_0xafb38f===_0x394ee5)break;else _0x23ce04['push'](_0x23ce04['shift']());}catch(_0x2eeb8e){_0x23ce04['push'](_0x23ce04['shift']());}}}(a96_0x4344,0xbeb2b));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x311d89}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x311d89;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);function a96_0x4344(){const _0xa35a59=['stdout','40rIgpRp','3dwiJLV','toString','stdio','1401682knfuPT','760893bMBFTO','unknown','trim','13302960WnMHsQ','skills','stderr','1652892mLtkqh','npx','status','276273scKEAY','287490hJNykO','add','log','join','1825944MMHizc','15hSORVc'];a96_0x4344=function(){return _0xa35a59;};return a96_0x4344();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a96_0x58cd(_0x3d3d2b,_0x2b9349){_0x3d3d2b=_0x3d3d2b-0xfa;const _0x4344cf=a96_0x4344();let _0x58cd8d=_0x4344cf[_0x3d3d2b];return _0x58cd8d;}export function runNpxSkillsAddGlobal(_0x4fd287,_0x3d33b9=LOVRABET_SKILL_SOURCE,_0x57871f){const _0x5ab521=a96_0x58cd;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x459633=_0x57871f?.[_0x5ab521(0x10f)]??'inherit',_0x51f255=resolveNpmBin(_0x5ab521(0x102)),_0x3329b6=[_0x5ab521(0xff),_0x5ab521(0x106),_0x3d33b9,'-g','-y'],_0x3f41db=[_0x51f255,..._0x3329b6][_0x5ab521(0x108)]('\x20');console[_0x5ab521(0x107)]('*\x20'+_0x3f41db);const _0x529848=spawnSync(_0x51f255,_0x3329b6,{'cwd':_0x4fd287,'stdio':_0x459633,'env':process.env,'shell':![]});if(_0x529848['status']===0x0)return{'ok':!![],'status':0x0};let _0x133877='exit\x20'+(_0x529848[_0x5ab521(0x103)]??_0x5ab521(0xfc));if(_0x459633==='pipe'){const _0x4a3772=_0x529848['stderr']?_0x529848[_0x5ab521(0x100)][_0x5ab521(0x10e)]()[_0x5ab521(0xfd)]():'',_0x40602a=_0x529848[_0x5ab521(0x10b)]?_0x529848[_0x5ab521(0x10b)][_0x5ab521(0x10e)]()[_0x5ab521(0xfd)]():'';if(_0x4a3772)_0x133877=_0x4a3772;else{if(_0x40602a)_0x133877=_0x40602a;}}return{'ok':![],'status':_0x529848['status']??null,'error':_0x133877};}
@@ -1 +1 @@
1
- const a97_0x30ca55=a97_0x4a0a;(function(_0x1d0dbf,_0x4ee7ab){const _0x43de92=a97_0x4a0a,_0x2df677=_0x1d0dbf();while(!![]){try{const _0x26e03b=parseInt(_0x43de92(0x12a))/0x1*(-parseInt(_0x43de92(0x122))/0x2)+-parseInt(_0x43de92(0x12e))/0x3+parseInt(_0x43de92(0x135))/0x4*(parseInt(_0x43de92(0x12f))/0x5)+-parseInt(_0x43de92(0x130))/0x6*(parseInt(_0x43de92(0x121))/0x7)+parseInt(_0x43de92(0x123))/0x8+parseInt(_0x43de92(0x132))/0x9*(-parseInt(_0x43de92(0x127))/0xa)+-parseInt(_0x43de92(0x12d))/0xb*(-parseInt(_0x43de92(0x120))/0xc);if(_0x26e03b===_0x4ee7ab)break;else _0x2df677['push'](_0x2df677['shift']());}catch(_0x6086a4){_0x2df677['push'](_0x2df677['shift']());}}}(a97_0x195f,0x7d87e));export const METADATA_FILE=a97_0x30ca55(0x12b);function a97_0x195f(){const _0x4ada3e=['4694076ltFubX','build','9hCrCgO','.hg','.turbo','190040VRVxLO','5340ZmoPrd','7fJQnDb','4LFThQK','1714904TSaaDj','.git','coverage','.cache','6542540VpGIKA','.svn','node_modules','15809dMakBm','lovrabet.skill.json','SKILL.md','61897nEAdWw','2635548ZiOIGw','15cllOMc'];a97_0x195f=function(){return _0x4ada3e;};return a97_0x195f();}export const SKILL_FILE=a97_0x30ca55(0x12c);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a97_0x4a0a(_0x59c7c8,_0x21e636){_0x59c7c8=_0x59c7c8-0x120;const _0x195f63=a97_0x195f();let _0x4a0ab3=_0x195f63[_0x59c7c8];return _0x4a0ab3;}export const IGNORED_DIR_NAMES=new Set([a97_0x30ca55(0x124),a97_0x30ca55(0x133),a97_0x30ca55(0x128),a97_0x30ca55(0x129),'.next','dist',a97_0x30ca55(0x131),a97_0x30ca55(0x125),a97_0x30ca55(0x134),a97_0x30ca55(0x126)]);
1
+ function a97_0x18ee(){const _0x1dae04=['16XDUWIa','node_modules','.turbo','9531511dknGuU','9vLVvUU','128467kDvXaz','110748ptCUeG','.next','.git','2595166TmnhXC','.DS_Store','20946445ECZqZt','5gpsdtc','lovrabet.skill.json','3180340mLhRhs','2smLwnv','52iCtsiV','.hg','SKILL.md','6800322gmWBdP','12pzrOOZ','.cache'];a97_0x18ee=function(){return _0x1dae04;};return a97_0x18ee();}const a97_0x3723d2=a97_0x3c2f;(function(_0x42eefa,_0x5c20de){const _0x1b1c91=a97_0x3c2f,_0x384f29=_0x42eefa();while(!![]){try{const _0x2f33d5=parseInt(_0x1b1c91(0x1bf))/0x1*(-parseInt(_0x1b1c91(0x1c9))/0x2)+-parseInt(_0x1b1c91(0x1c0))/0x3*(-parseInt(_0x1b1c91(0x1b4))/0x4)+-parseInt(_0x1b1c91(0x1c6))/0x5*(parseInt(_0x1b1c91(0x1b7))/0x6)+-parseInt(_0x1b1c91(0x1c3))/0x7*(parseInt(_0x1b1c91(0x1ba))/0x8)+-parseInt(_0x1b1c91(0x1be))/0x9*(parseInt(_0x1b1c91(0x1c8))/0xa)+-parseInt(_0x1b1c91(0x1bd))/0xb*(-parseInt(_0x1b1c91(0x1b8))/0xc)+parseInt(_0x1b1c91(0x1c5))/0xd;if(_0x2f33d5===_0x5c20de)break;else _0x384f29['push'](_0x384f29['shift']());}catch(_0x101700){_0x384f29['push'](_0x384f29['shift']());}}}(a97_0x18ee,0x9b596));export const METADATA_FILE=a97_0x3723d2(0x1c7);export const SKILL_FILE=a97_0x3723d2(0x1b6);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x3723d2(0x1c4)]);function a97_0x3c2f(_0x5c38fd,_0x34fdd4){_0x5c38fd=_0x5c38fd-0x1b4;const _0x18ee33=a97_0x18ee();let _0x3c2ff3=_0x18ee33[_0x5c38fd];return _0x3c2ff3;}export const IGNORED_DIR_NAMES=new Set([a97_0x3723d2(0x1c2),a97_0x3723d2(0x1b5),'.svn',a97_0x3723d2(0x1bb),a97_0x3723d2(0x1c1),'dist','build','coverage',a97_0x3723d2(0x1bc),a97_0x3723d2(0x1b9)]);
@@ -1 +1 @@
1
- (function(_0x52b16d,_0x1607f7){const _0x3c0d6d=a98_0x5e43,_0x4f403a=_0x52b16d();while(!![]){try{const _0x406eb7=parseInt(_0x3c0d6d(0x97))/0x1*(parseInt(_0x3c0d6d(0x8d))/0x2)+parseInt(_0x3c0d6d(0x89))/0x3+-parseInt(_0x3c0d6d(0x91))/0x4*(parseInt(_0x3c0d6d(0x86))/0x5)+parseInt(_0x3c0d6d(0x8a))/0x6+parseInt(_0x3c0d6d(0x88))/0x7+parseInt(_0x3c0d6d(0x90))/0x8*(parseInt(_0x3c0d6d(0x8c))/0x9)+-parseInt(_0x3c0d6d(0x87))/0xa;if(_0x406eb7===_0x1607f7)break;else _0x4f403a['push'](_0x4f403a['shift']());}catch(_0x300758){_0x4f403a['push'](_0x4f403a['shift']());}}}(a98_0x3c77,0xe2fb2));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x4546b3,_0x4753db){const _0x1d960e=a98_0x5e43,_0x5b6196=normalizeSkillRelativePath(_0x4753db),_0xbbd338=realOrResolved(_0x4546b3),_0x24ee87=resolve(_0xbbd338,..._0x5b6196[_0x1d960e(0x96)]('/'));if(!isPathInside(_0x24ee87,_0xbbd338))throw CliErrors[_0x1d960e(0x93)](_0x1d960e(0x92)+_0x4753db);return ensureNoSymlinkInManagedPath(_0xbbd338,_0x5b6196),_0x24ee87;}export function ensureNoSymlinkInManagedPath(_0x20d798,_0x4a27e0){const _0x425b01=a98_0x5e43;let _0x85c359=_0x20d798;for(const _0x1018aa of _0x4a27e0[_0x425b01(0x96)]('/')){_0x85c359=resolve(_0x85c359,_0x1018aa);const _0x2aff98=lstatIfPresent(_0x85c359);if(_0x2aff98?.['isSymbolicLink']())throw CliErrors[_0x425b01(0x93)](_0x425b01(0x85)+_0x4a27e0);}}export function isDanglingSymlink(_0x3c8673){const _0x4667cc=a98_0x5e43;try{return lstatSync(_0x3c8673)[_0x4667cc(0x8f)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4eb586){const _0x5d6368=readlinkSync(_0x4eb586);return isAbsolute(_0x5d6368)?_0x5d6368:resolve(dirname(_0x4eb586),_0x5d6368);}export function isPathInside(_0x4bcb30,_0x2d40c6){const _0xb0bbac=a98_0x5e43,_0x499f11=_0x4bcb30['endsWith'](sep)?_0x4bcb30:''+_0x4bcb30+sep,_0x5d074e=_0x2d40c6[_0xb0bbac(0x95)](sep)?_0x2d40c6:''+_0x2d40c6+sep;return _0x4bcb30===_0x2d40c6||_0x499f11[_0xb0bbac(0x94)](_0x5d074e);}export function realOrResolved(_0x3d1219){try{return realpathSync(_0x3d1219);}catch{return resolve(_0x3d1219);}}function a98_0x5e43(_0x32a581,_0x447748){_0x32a581=_0x32a581-0x85;const _0x3c7782=a98_0x3c77();let _0x5e4322=_0x3c7782[_0x32a581];return _0x5e4322;}export function lstatIfPresent(_0x14ff5f){try{return lstatSync(_0x14ff5f);}catch{return undefined;}}export function writeTextAtomic(_0x6d4b57,_0x29e07a,_0x320684){const _0x3e86fd=a98_0x5e43;writeBytesAtomic(_0x6d4b57,Buffer['from'](_0x29e07a,_0x3e86fd(0x8b)),_0x320684);}function a98_0x3c77(){const _0x2ba696=['9732430kdcHpH','3186449ovtmom','3775944iYBLvO','4608282Vrddqs','utf8','54ySCvqj','244794BihuPY','stringify','isSymbolicLink','457184FAJfmb','308mbZSyY','Unsafe\x20Skill\x20file\x20path:\x20','validation','startsWith','endsWith','split','2bQTIZu','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','75755ISiwyd'];a98_0x3c77=function(){return _0x2ba696;};return a98_0x3c77();}export function writeBytesAtomic(_0x53f2c2,_0x582583,_0x5065c1){const _0x57732a=_0x53f2c2+'.tmp';try{writeFileSync(_0x57732a,_0x582583,{'mode':_0x5065c1}),renameSync(_0x57732a,_0x53f2c2);}catch(_0x2b4838){try{rmSync(_0x57732a,{'force':!![]});}catch{}throw _0x2b4838;}}export function writeJsonAtomic(_0x3ce958,_0xa09f33){const _0x354352=a98_0x5e43;writeTextAtomic(_0x3ce958,JSON[_0x354352(0x8e)](_0xa09f33,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x46c285,_0x20e839){const _0x1c2844=a98_0x51ac,_0x2d11bc=_0x46c285();while(!![]){try{const _0x116a56=-parseInt(_0x1c2844(0x14b))/0x1*(parseInt(_0x1c2844(0x144))/0x2)+parseInt(_0x1c2844(0x147))/0x3+-parseInt(_0x1c2844(0x151))/0x4+parseInt(_0x1c2844(0x153))/0x5*(parseInt(_0x1c2844(0x148))/0x6)+parseInt(_0x1c2844(0x157))/0x7+-parseInt(_0x1c2844(0x14f))/0x8*(parseInt(_0x1c2844(0x14a))/0x9)+-parseInt(_0x1c2844(0x155))/0xa;if(_0x116a56===_0x20e839)break;else _0x2d11bc['push'](_0x2d11bc['shift']());}catch(_0x5c0cc2){_0x2d11bc['push'](_0x2d11bc['shift']());}}}(a98_0x4605,0x55d79));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x58789d,_0xd583e4){const _0x3672a1=a98_0x51ac,_0x349130=normalizeSkillRelativePath(_0xd583e4),_0x84fd82=realOrResolved(_0x58789d),_0x1c6b58=resolve(_0x84fd82,..._0x349130[_0x3672a1(0x154)]('/'));if(!isPathInside(_0x1c6b58,_0x84fd82))throw CliErrors[_0x3672a1(0x14c)](_0x3672a1(0x150)+_0xd583e4);return ensureNoSymlinkInManagedPath(_0x84fd82,_0x349130),_0x1c6b58;}export function ensureNoSymlinkInManagedPath(_0x2bd0bd,_0x337947){const _0x39438b=a98_0x51ac;let _0x416c92=_0x2bd0bd;for(const _0x28b30d of _0x337947['split']('/')){_0x416c92=resolve(_0x416c92,_0x28b30d);const _0x2a90fc=lstatIfPresent(_0x416c92);if(_0x2a90fc?.[_0x39438b(0x145)]())throw CliErrors[_0x39438b(0x14c)](_0x39438b(0x14e)+_0x337947);}}export function isDanglingSymlink(_0x30715e){try{return lstatSync(_0x30715e)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0xea4c45){const _0x364425=readlinkSync(_0xea4c45);return isAbsolute(_0x364425)?_0x364425:resolve(dirname(_0xea4c45),_0x364425);}function a98_0x4605(){const _0x2744db=['endsWith','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','95392lcBAKx','Unsafe\x20Skill\x20file\x20path:\x20','2010320iHmaik','stringify','16770kQLoXc','split','5748310ZpeSWO','.tmp','2415644GXoFTo','utf8','9014RltwOa','isSymbolicLink','from','2050272dfYxJz','1194TNMMTy','startsWith','45qqxOvh','46rgDnOd','validation'];a98_0x4605=function(){return _0x2744db;};return a98_0x4605();}export function isPathInside(_0x23a86e,_0x3fd650){const _0x101c57=a98_0x51ac,_0x18e2e1=_0x23a86e[_0x101c57(0x14d)](sep)?_0x23a86e:''+_0x23a86e+sep,_0x6076f9=_0x3fd650[_0x101c57(0x14d)](sep)?_0x3fd650:''+_0x3fd650+sep;return _0x23a86e===_0x3fd650||_0x18e2e1[_0x101c57(0x149)](_0x6076f9);}export function realOrResolved(_0x38ee9f){try{return realpathSync(_0x38ee9f);}catch{return resolve(_0x38ee9f);}}export function lstatIfPresent(_0x3b09d){try{return lstatSync(_0x3b09d);}catch{return undefined;}}function a98_0x51ac(_0x4c2850,_0x2e2999){_0x4c2850=_0x4c2850-0x144;const _0x460523=a98_0x4605();let _0x51ac9e=_0x460523[_0x4c2850];return _0x51ac9e;}export function writeTextAtomic(_0x36adb8,_0x99b390,_0x1a000b){const _0x5d11ce=a98_0x51ac;writeBytesAtomic(_0x36adb8,Buffer[_0x5d11ce(0x146)](_0x99b390,_0x5d11ce(0x158)),_0x1a000b);}export function writeBytesAtomic(_0x873b31,_0x2cd7b6,_0x1d7dd9){const _0x30871e=a98_0x51ac,_0x215c4d=_0x873b31+_0x30871e(0x156);try{writeFileSync(_0x215c4d,_0x2cd7b6,{'mode':_0x1d7dd9}),renameSync(_0x215c4d,_0x873b31);}catch(_0x2ae930){try{rmSync(_0x215c4d,{'force':!![]});}catch{}throw _0x2ae930;}}export function writeJsonAtomic(_0x23205a,_0x452734){const _0x20a5df=a98_0x51ac;writeTextAtomic(_0x23205a,JSON[_0x20a5df(0x152)](_0x452734,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0xfa08d3,_0x352c81){const _0x499e50=a99_0x4727,_0x3ab6bc=_0xfa08d3();while(!![]){try{const _0xdecc1f=parseInt(_0x499e50(0x9f))/0x1*(parseInt(_0x499e50(0xa9))/0x2)+-parseInt(_0x499e50(0xaa))/0x3+-parseInt(_0x499e50(0xa3))/0x4+-parseInt(_0x499e50(0xab))/0x5+parseInt(_0x499e50(0xa7))/0x6*(parseInt(_0x499e50(0xa2))/0x7)+parseInt(_0x499e50(0xa0))/0x8+parseInt(_0x499e50(0xa5))/0x9*(parseInt(_0x499e50(0xa8))/0xa);if(_0xdecc1f===_0x352c81)break;else _0x3ab6bc['push'](_0x3ab6bc['shift']());}catch(_0x499837){_0x3ab6bc['push'](_0x3ab6bc['shift']());}}}(a99_0x5023,0xa5a99));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2eeb5c){const _0x31cd86=a99_0x4727;return createHash(_0x31cd86(0xa1))[_0x31cd86(0xad)](_0x2eeb5c)['digest'](_0x31cd86(0xac));}function a99_0x4727(_0x4030d1,_0x2cadf5){_0x4030d1=_0x4030d1-0x9f;const _0x50237a=a99_0x5023();let _0x472734=_0x50237a[_0x4030d1];return _0x472734;}export function fileHash(_0x10faa5){return bufferSha256(fileContent(_0x10faa5));}export function bufferSha256(_0x503512){const _0x17f99f=a99_0x4727;return createHash(_0x17f99f(0xa1))[_0x17f99f(0xad)](_0x503512)[_0x17f99f(0xa6)](_0x17f99f(0xac));}function a99_0x5023(){const _0x56ed0a=['5576712QLfwjE','sha256','3446023QwJKsh','553660ZGKwlj','size','1905129bASCQD','digest','12nmbXge','30IypAAf','219540NSTvDZ','3955428OmZbqp','4748280UhzBEY','hex','update','7mIGmTS'];a99_0x5023=function(){return _0x56ed0a;};return a99_0x5023();}export function fileTreeHash(_0x5e4123){const _0x1e03e2=a99_0x4727,_0x289b74=createHash(_0x1e03e2(0xa1));for(const _0x4d6a3d of normalizeManifestFiles(_0x5e4123)){_0x289b74['update'](_0x4d6a3d['path']),_0x289b74[_0x1e03e2(0xad)]('\x00'),_0x289b74[_0x1e03e2(0xad)](_0x4d6a3d[_0x1e03e2(0xa1)]),_0x289b74[_0x1e03e2(0xad)]('\x00'),_0x289b74[_0x1e03e2(0xad)](String(_0x4d6a3d[_0x1e03e2(0xa4)])),_0x289b74[_0x1e03e2(0xad)]('\x00');}return _0x289b74[_0x1e03e2(0xa6)](_0x1e03e2(0xac));}
1
+ (function(_0x59887d,_0x3cef0e){const _0x3b5fa4=a99_0x57fe,_0x1590b0=_0x59887d();while(!![]){try{const _0x22d2b4=-parseInt(_0x3b5fa4(0x1e1))/0x1*(parseInt(_0x3b5fa4(0x1dc))/0x2)+parseInt(_0x3b5fa4(0x1d6))/0x3*(-parseInt(_0x3b5fa4(0x1d7))/0x4)+parseInt(_0x3b5fa4(0x1dd))/0x5+-parseInt(_0x3b5fa4(0x1de))/0x6*(-parseInt(_0x3b5fa4(0x1db))/0x7)+-parseInt(_0x3b5fa4(0x1e3))/0x8+parseInt(_0x3b5fa4(0x1d8))/0x9+-parseInt(_0x3b5fa4(0x1df))/0xa*(parseInt(_0x3b5fa4(0x1e5))/0xb);if(_0x22d2b4===_0x3cef0e)break;else _0x1590b0['push'](_0x1590b0['shift']());}catch(_0x276792){_0x1590b0['push'](_0x1590b0['shift']());}}}(a99_0x10ef,0x6351b));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a99_0x10ef(){const _0x3d490b=['21uCYPKE','4bEBMhk','935940AoamRb','492546eQHeiP','19430OKRsLn','update','15453seAdLR','hex','3338432zCOnYr','path','99jEGUgo','digest','1038yGuxHq','496gcfSIh','4337559salWgt','sha256','size'];a99_0x10ef=function(){return _0x3d490b;};return a99_0x10ef();}export function contentHash(_0x521152){const _0x2831ee=a99_0x57fe;return createHash(_0x2831ee(0x1d9))[_0x2831ee(0x1e0)](_0x521152)['digest']('hex');}function a99_0x57fe(_0x16de65,_0x394bb3){_0x16de65=_0x16de65-0x1d6;const _0x10ef73=a99_0x10ef();let _0x57fe67=_0x10ef73[_0x16de65];return _0x57fe67;}export function fileHash(_0x4feb57){return bufferSha256(fileContent(_0x4feb57));}export function bufferSha256(_0x50e7c9){const _0x433034=a99_0x57fe;return createHash(_0x433034(0x1d9))['update'](_0x50e7c9)[_0x433034(0x1e6)](_0x433034(0x1e2));}export function fileTreeHash(_0x4925bc){const _0x19f59f=a99_0x57fe,_0x49795d=createHash('sha256');for(const _0x5d3685 of normalizeManifestFiles(_0x4925bc)){_0x49795d['update'](_0x5d3685[_0x19f59f(0x1e4)]),_0x49795d[_0x19f59f(0x1e0)]('\x00'),_0x49795d[_0x19f59f(0x1e0)](_0x5d3685[_0x19f59f(0x1d9)]),_0x49795d[_0x19f59f(0x1e0)]('\x00'),_0x49795d[_0x19f59f(0x1e0)](String(_0x5d3685[_0x19f59f(0x1da)])),_0x49795d[_0x19f59f(0x1e0)]('\x00');}return _0x49795d[_0x19f59f(0x1e6)](_0x19f59f(0x1e2));}
@@ -1 +1 @@
1
- (function(_0x259875,_0x423947){const _0x328f43=a100_0x3171,_0x4252ef=_0x259875();while(!![]){try{const _0x50e94a=-parseInt(_0x328f43(0x193))/0x1+-parseInt(_0x328f43(0x194))/0x2*(parseInt(_0x328f43(0x196))/0x3)+-parseInt(_0x328f43(0x1ae))/0x4*(-parseInt(_0x328f43(0x190))/0x5)+parseInt(_0x328f43(0x186))/0x6+parseInt(_0x328f43(0x182))/0x7*(-parseInt(_0x328f43(0x198))/0x8)+parseInt(_0x328f43(0x192))/0x9*(parseInt(_0x328f43(0x18c))/0xa)+-parseInt(_0x328f43(0x1ad))/0xb;if(_0x50e94a===_0x423947)break;else _0x4252ef['push'](_0x4252ef['shift']());}catch(_0x854212){_0x4252ef['push'](_0x4252ef['shift']());}}}(a100_0x1368,0x7c020));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a100_0x3171(_0x3f9acd,_0x5d9ae6){_0x3f9acd=_0x3f9acd-0x17c;const _0x136855=a100_0x1368();let _0x317130=_0x136855[_0x3f9acd];return _0x317130;}import a100_0x3296ae from'fs-extra';function a100_0x1368(){const _0x41f0ab=['created','unchanged','isDirectory','7419841tCfhlV','7748YejLme','startsWith','env','name','external-symlink','builtin','has','98bEgkxd','values','managedRoot','contentHash','5385384gZSGmI','pruneSkillCodes','appCode','validation','scope','removed','65290FZMSlR','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','get','slice','2095MejAtf','skipped','738SjLGeI','27547LxJuEO','6gCBegb','skillCode','395949cHemGH','company','364904wlgoDj','map','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','dir','agentsSkillsDir','updated','accessKey','not-managed-symlink','activeSkillCodes','trim','scopes','skill','personal','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','filter','push','isSymbolicLink','set'];a100_0x1368=function(){return _0x41f0ab;};return a100_0x1368();}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x3296ae;export function linkEffectiveRuntimeSkills(_0x3b4c1f,_0x5eb8c5,_0x16f5d3={}){const _0x1f324e=a100_0x3171,_0x4c4aaa=new Map();for(const _0x1e5774 of _0x3b4c1f){const _0x4fa1c0=_0x1e5774[_0x1f324e(0x1a3)][_0x1f324e(0x195)];if(!_0x4fa1c0)continue;const _0x2bf92e=_0x4c4aaa[_0x1f324e(0x18e)](_0x4fa1c0);(!_0x2bf92e||_0x1e5774[_0x1f324e(0x18a)]===_0x1f324e(0x1a4))&&_0x4c4aaa[_0x1f324e(0x1a9)](_0x4fa1c0,_0x1e5774);}const _0xd10288=[],_0x1c0a25=resolveSkillSyncPaths(_0x16f5d3);for(const _0x2c0ad3 of _0x4c4aaa[_0x1f324e(0x183)]()){const _0x1d6bd1=requireSkillCode(_0x2c0ad3[_0x1f324e(0x1a3)]),_0x5c2d49=_0x5eb8c5+'--'+_0x1d6bd1;for(const _0x17d4b2 of runtimeAgentSkillRoots(_0x1c0a25)){_0xd10288[_0x1f324e(0x1a7)](ensureManagedSymlink(resolve(_0x17d4b2,_0x5c2d49),_0x2c0ad3[_0x1f324e(0x19b)],_0x1c0a25[_0x1f324e(0x184)]));}}return _0xd10288;}export function pruneStaleRuntimeSkillLinks(_0x50f87d,_0x1cffa7,_0x1c00b6={},_0x40bcc3){const _0x2d9f58=a100_0x3171,_0x58ff06=resolveSkillSyncPaths(_0x1c00b6),_0x2e0297=new Set([..._0x1cffa7][_0x2d9f58(0x199)](_0x40ebb3=>_0x40ebb3[_0x2d9f58(0x1a1)]())[_0x2d9f58(0x1a6)](Boolean)),_0x2f3b6e=_0x40bcc3?new Set([..._0x40bcc3][_0x2d9f58(0x199)](_0x2b8d6f=>_0x2b8d6f[_0x2d9f58(0x1a1)]())[_0x2d9f58(0x1a6)](Boolean)):undefined,_0x6d4ef=[];for(const _0x2fe674 of runtimeAgentSkillRoots(_0x58ff06)){for(const _0x1c4ee8 of managedAppSkillLinkPaths(_0x2fe674,_0x50f87d)){const _0x2e04de=basename(_0x1c4ee8)[_0x2d9f58(0x18f)]((_0x50f87d+'--')['length']);if(_0x2f3b6e&&!_0x2f3b6e[_0x2d9f58(0x181)](_0x2e04de))continue;if(_0x2e0297[_0x2d9f58(0x181)](_0x2e04de))continue;_0x6d4ef[_0x2d9f58(0x1a7)](removeManagedSkillLink(_0x1c4ee8,_0x58ff06[_0x2d9f58(0x184)]));}}return _0x6d4ef;}export function pruneStaleRuntimeSkillCache(_0x192c7d,_0x35c324={}){const _0x1d28f8=a100_0x3171,_0x4b92d0=new Set([..._0x192c7d[_0x1d28f8(0x1a0)]]['map'](_0x5ad9d4=>_0x5ad9d4[_0x1d28f8(0x1a1)]())[_0x1d28f8(0x1a6)](Boolean)),_0xa1e784=_0x192c7d[_0x1d28f8(0x187)]?new Set([..._0x192c7d[_0x1d28f8(0x187)]][_0x1d28f8(0x199)](_0xf0fcdb=>_0xf0fcdb[_0x1d28f8(0x1a1)]())[_0x1d28f8(0x1a6)](Boolean)):undefined,_0x106d19=_0x192c7d[_0x1d28f8(0x1a2)]??[_0x1d28f8(0x1a4),_0x1d28f8(0x197)],_0x491305=resolve(getRuntimeSkillCacheRoot(_0x192c7d[_0x1d28f8(0x17d)],_0x192c7d[_0x1d28f8(0x19e)],_0x35c324),safePathSegment(_0x192c7d[_0x1d28f8(0x188)],'appCode')),_0x203dce=[];for(const _0x479403 of _0x106d19){const _0x2abc01=resolve(_0x491305,_0x479403);if(!existsSync(_0x2abc01))continue;for(const _0x2e446b of readdirSync(_0x2abc01,{'withFileTypes':!![]})){if(!_0x2e446b['isDirectory']())continue;const _0x5e3f73=_0x2e446b[_0x1d28f8(0x17e)];if(_0xa1e784&&!_0xa1e784[_0x1d28f8(0x181)](_0x5e3f73))continue;if(_0x4b92d0[_0x1d28f8(0x181)](_0x5e3f73))continue;const _0x4c8f9d=resolve(_0x2abc01,_0x5e3f73),_0x18dc0b=readMetadataIfPresent(resolve(_0x4c8f9d,METADATA_FILE));if(_0x18dc0b?.[_0x1d28f8(0x188)]!==_0x192c7d[_0x1d28f8(0x188)]||_0x18dc0b[_0x1d28f8(0x18a)]!==_0x479403||_0x18dc0b[_0x1d28f8(0x195)]!==_0x5e3f73){_0x203dce[_0x1d28f8(0x1a7)]({'path':_0x4c8f9d,'action':_0x1d28f8(0x191),'reason':'metadata-mismatch'});continue;}removeSync(_0x4c8f9d),_0x203dce[_0x1d28f8(0x1a7)]({'path':_0x4c8f9d,'action':_0x1d28f8(0x18b)});}}return _0x203dce;}export function linkGlobalRuntimeSkills(_0x5bd698,_0x6c2bd4={}){const _0x1d6258=a100_0x3171,_0x3db4b5=resolveSkillSyncPaths(_0x6c2bd4),_0x4e3853=[];for(const _0x205631 of _0x5bd698){if(_0x205631[_0x1d6258(0x18a)]!==_0x1d6258(0x180))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x205631[_0x1d6258(0x18a)]);const _0x3f4c1d=requireSkillCode(_0x205631[_0x1d6258(0x1a3)]),_0x4314cb=copyManagedSkillDirectory(_0x205631[_0x1d6258(0x19b)],resolve(_0x3db4b5[_0x1d6258(0x19c)],_0x3f4c1d));_0x4e3853['push']({..._0x4314cb,'contentHash':_0x205631[_0x1d6258(0x185)]});}return _0x4e3853;}function ensureManagedSymlink(_0x5b59ca,_0x6c62c4,_0x587b95){const _0x3a3973=a100_0x3171;mkdirSync(dirname(_0x5b59ca),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5b59ca)||isDanglingSymlink(_0x5b59ca)){const _0x26d4b0=lstatSync(_0x5b59ca);if(!_0x26d4b0['isSymbolicLink']())throw CliErrors[_0x3a3973(0x189)](_0x3a3973(0x18d)+_0x5b59ca);const _0x104003=resolveSymlinkTarget(_0x5b59ca);if(!isPathInside(realOrResolved(_0x104003),realOrResolved(_0x587b95)))throw CliErrors[_0x3a3973(0x189)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x5b59ca);if(realOrResolved(_0x104003)===realOrResolved(_0x6c62c4))return{'path':_0x5b59ca,'target':_0x6c62c4,'action':_0x3a3973(0x1ab)};return unlinkSync(_0x5b59ca),symlinkSync(_0x6c62c4,_0x5b59ca,_0x3a3973(0x19b)),{'path':_0x5b59ca,'target':_0x6c62c4,'action':'updated'};}return symlinkSync(_0x6c62c4,_0x5b59ca,'dir'),{'path':_0x5b59ca,'target':_0x6c62c4,'action':_0x3a3973(0x1aa)};}function managedAppSkillLinkPaths(_0x553bf3,_0x59113e){const _0x1f1c0c=a100_0x3171;if(!existsSync(_0x553bf3))return[];const _0x38ae22=_0x59113e+'--';return readdirSync(_0x553bf3,{'withFileTypes':!![]})['filter'](_0x43c63a=>_0x43c63a[_0x1f1c0c(0x17e)][_0x1f1c0c(0x17c)](_0x38ae22))[_0x1f1c0c(0x199)](_0x4c1263=>resolve(_0x553bf3,_0x4c1263[_0x1f1c0c(0x17e)]));}function removeManagedSkillLink(_0x537f44,_0x3dee16){const _0x4e4f5c=a100_0x3171,_0x15fb44=lstatIfPresent(_0x537f44);if(!_0x15fb44?.[_0x4e4f5c(0x1a8)]())return{'path':_0x537f44,'action':_0x4e4f5c(0x191),'reason':_0x4e4f5c(0x19f)};const _0x587a50=resolveSymlinkTarget(_0x537f44);if(!isPathInside(realOrResolved(_0x587a50),realOrResolved(_0x3dee16)))return{'path':_0x537f44,'action':_0x4e4f5c(0x191),'reason':_0x4e4f5c(0x17f)};return unlinkSync(_0x537f44),{'path':_0x537f44,'action':_0x4e4f5c(0x18b)};}export function copyManagedSkillDirectory(_0x7a2568,_0x300a8a){const _0xbe7060=a100_0x3171,_0x42db71=resolve(_0x300a8a,METADATA_FILE),_0x2cb3a8=existsSync(_0x300a8a);if(_0x2cb3a8){const _0x4b26e2=lstatSync(_0x300a8a);if(_0x4b26e2[_0xbe7060(0x1a8)]())throw CliErrors['validation'](_0xbe7060(0x1a5)+_0x300a8a);if(!_0x4b26e2[_0xbe7060(0x1ac)]())throw CliErrors[_0xbe7060(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x300a8a);const _0x2d55c0=readMetadataIfPresent(_0x42db71);if(_0x2d55c0?.[_0xbe7060(0x18a)]!==_0xbe7060(0x180))throw CliErrors[_0xbe7060(0x189)](_0xbe7060(0x19a)+_0x300a8a);}ensureDirSync(dirname(_0x300a8a));const _0x32e04f=_0x2cb3a8?readMetadataIfPresent(_0x42db71)?.[_0xbe7060(0x185)]:undefined,_0x415ebe=readMetadataIfPresent(resolve(_0x7a2568,METADATA_FILE))?.[_0xbe7060(0x185)];return _0x2cb3a8&&removeSync(_0x300a8a),copySkillDirectory(_0x7a2568,_0x300a8a),{'path':_0x300a8a,'target':_0x7a2568,'action':!_0x2cb3a8?_0xbe7060(0x1aa):_0x32e04f===_0x415ebe?_0xbe7060(0x1ab):_0xbe7060(0x19d)};}function copySkillDirectory(_0x4b59ef,_0x1c3614){copySync(_0x4b59ef,_0x1c3614,{'dereference':![],'overwrite':!![],'filter'(_0x145b56){if(lstatSync(_0x145b56)['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x145b56);return!![];}});}
1
+ (function(_0x433d87,_0xa35db8){const _0x1dde68=a100_0x4d71,_0x3a03d2=_0x433d87();while(!![]){try{const _0x18989e=-parseInt(_0x1dde68(0x138))/0x1+-parseInt(_0x1dde68(0x14d))/0x2*(-parseInt(_0x1dde68(0x136))/0x3)+parseInt(_0x1dde68(0x135))/0x4*(parseInt(_0x1dde68(0x152))/0x5)+parseInt(_0x1dde68(0x155))/0x6*(-parseInt(_0x1dde68(0x12f))/0x7)+parseInt(_0x1dde68(0x153))/0x8+-parseInt(_0x1dde68(0x15d))/0x9*(-parseInt(_0x1dde68(0x132))/0xa)+parseInt(_0x1dde68(0x147))/0xb*(parseInt(_0x1dde68(0x15b))/0xc);if(_0x18989e===_0xa35db8)break;else _0x3a03d2['push'](_0x3a03d2['shift']());}catch(_0x41cb7e){_0x3a03d2['push'](_0x3a03d2['shift']());}}}(a100_0x51fa,0x1ecc5));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a100_0x51fa(){const _0x4a4d9e=['skill','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','40nTcPFV','4784oekvqb','startsWith','84LTnAMC','created','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','filter','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','1212UYLwhK','contentHash','9pINjVy','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isSymbolicLink','isDirectory','pruneSkillCodes','skipped','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','activeSkillCodes','appCode','84245DXFOBv','external-symlink','unchanged','506840ULxHBI','env','map','59012PwZues','3WXgSwv','validation','240781eOKAUM','values','scopes','skillCode','trim','accessKey','personal','length','builtin','get','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','name','has','scope','company','32989IhXeOk','push','updated','managedRoot','removed','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','126430OFzzVZ','set','slice'];a100_0x51fa=function(){return _0x4a4d9e;};return a100_0x51fa();}import a100_0x4fa020 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x4fa020;export function linkEffectiveRuntimeSkills(_0x543e30,_0x1ce33f,_0x444498={}){const _0x464f53=a100_0x4d71,_0x4c6134=new Map();for(const _0x30a0f5 of _0x543e30){const _0x53b038=_0x30a0f5[_0x464f53(0x150)][_0x464f53(0x13b)];if(!_0x53b038)continue;const _0x3aa737=_0x4c6134[_0x464f53(0x141)](_0x53b038);(!_0x3aa737||_0x30a0f5['scope']===_0x464f53(0x13e))&&_0x4c6134[_0x464f53(0x14e)](_0x53b038,_0x30a0f5);}const _0x25c143=[],_0x189d41=resolveSkillSyncPaths(_0x444498);for(const _0x5f4e08 of _0x4c6134[_0x464f53(0x139)]()){const _0x19df31=requireSkillCode(_0x5f4e08[_0x464f53(0x150)]),_0x556590=_0x1ce33f+'--'+_0x19df31;for(const _0x546486 of runtimeAgentSkillRoots(_0x189d41)){_0x25c143[_0x464f53(0x148)](ensureManagedSymlink(resolve(_0x546486,_0x556590),_0x5f4e08[_0x464f53(0x159)],_0x189d41[_0x464f53(0x14a)]));}}return _0x25c143;}export function pruneStaleRuntimeSkillLinks(_0x51c280,_0x5b943f,_0x2d0e6b={},_0x598a76){const _0x45061c=a100_0x4d71,_0x53c49a=resolveSkillSyncPaths(_0x2d0e6b),_0x5e411c=new Set([..._0x5b943f][_0x45061c(0x134)](_0x39b7dc=>_0x39b7dc[_0x45061c(0x13c)]())[_0x45061c(0x158)](Boolean)),_0x568c5f=_0x598a76?new Set([..._0x598a76][_0x45061c(0x134)](_0x4036f7=>_0x4036f7[_0x45061c(0x13c)]())[_0x45061c(0x158)](Boolean)):undefined,_0x34df15=[];for(const _0x351fec of runtimeAgentSkillRoots(_0x53c49a)){for(const _0x4498dd of managedAppSkillLinkPaths(_0x351fec,_0x51c280)){const _0x56a476=basename(_0x4498dd)[_0x45061c(0x14f)]((_0x51c280+'--')[_0x45061c(0x13f)]);if(_0x568c5f&&!_0x568c5f[_0x45061c(0x144)](_0x56a476))continue;if(_0x5e411c[_0x45061c(0x144)](_0x56a476))continue;_0x34df15[_0x45061c(0x148)](removeManagedSkillLink(_0x4498dd,_0x53c49a[_0x45061c(0x14a)]));}}return _0x34df15;}export function pruneStaleRuntimeSkillCache(_0x5ea006,_0x3ac774={}){const _0x39a0e9=a100_0x4d71,_0x31dda2=new Set([..._0x5ea006[_0x39a0e9(0x12d)]][_0x39a0e9(0x134)](_0x4dcd27=>_0x4dcd27[_0x39a0e9(0x13c)]())[_0x39a0e9(0x158)](Boolean)),_0xcc9fde=_0x5ea006[_0x39a0e9(0x12a)]?new Set([..._0x5ea006[_0x39a0e9(0x12a)]][_0x39a0e9(0x134)](_0x2f5404=>_0x2f5404[_0x39a0e9(0x13c)]())['filter'](Boolean)):undefined,_0x1adc7f=_0x5ea006[_0x39a0e9(0x13a)]??['personal',_0x39a0e9(0x146)],_0x43e936=resolve(getRuntimeSkillCacheRoot(_0x5ea006[_0x39a0e9(0x133)],_0x5ea006[_0x39a0e9(0x13d)],_0x3ac774),safePathSegment(_0x5ea006[_0x39a0e9(0x12e)],_0x39a0e9(0x12e))),_0x2d856e=[];for(const _0x187906 of _0x1adc7f){const _0x27ac26=resolve(_0x43e936,_0x187906);if(!existsSync(_0x27ac26))continue;for(const _0x4cec88 of readdirSync(_0x27ac26,{'withFileTypes':!![]})){if(!_0x4cec88[_0x39a0e9(0x129)]())continue;const _0x250278=_0x4cec88[_0x39a0e9(0x143)];if(_0xcc9fde&&!_0xcc9fde['has'](_0x250278))continue;if(_0x31dda2[_0x39a0e9(0x144)](_0x250278))continue;const _0x3a5b88=resolve(_0x27ac26,_0x250278),_0x237dcd=readMetadataIfPresent(resolve(_0x3a5b88,METADATA_FILE));if(_0x237dcd?.[_0x39a0e9(0x12e)]!==_0x5ea006[_0x39a0e9(0x12e)]||_0x237dcd['scope']!==_0x187906||_0x237dcd[_0x39a0e9(0x13b)]!==_0x250278){_0x2d856e[_0x39a0e9(0x148)]({'path':_0x3a5b88,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x3a5b88),_0x2d856e[_0x39a0e9(0x148)]({'path':_0x3a5b88,'action':_0x39a0e9(0x14b)});}}return _0x2d856e;}export function linkGlobalRuntimeSkills(_0x3ec7d6,_0x317195={}){const _0x40d677=a100_0x4d71,_0x1b9bbc=resolveSkillSyncPaths(_0x317195),_0x12eb6d=[];for(const _0x26026b of _0x3ec7d6){if(_0x26026b[_0x40d677(0x145)]!==_0x40d677(0x140))throw CliErrors[_0x40d677(0x137)](_0x40d677(0x15e)+_0x26026b['scope']);const _0x579af2=requireSkillCode(_0x26026b[_0x40d677(0x150)]),_0xbd7d0c=copyManagedSkillDirectory(_0x26026b[_0x40d677(0x159)],resolve(_0x1b9bbc['agentsSkillsDir'],_0x579af2));_0x12eb6d[_0x40d677(0x148)]({..._0xbd7d0c,'contentHash':_0x26026b[_0x40d677(0x15c)]});}return _0x12eb6d;}function ensureManagedSymlink(_0x206260,_0x19ce27,_0x3de179){const _0x4a738a=a100_0x4d71;mkdirSync(dirname(_0x206260),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x206260)||isDanglingSymlink(_0x206260)){const _0xc0e123=lstatSync(_0x206260);if(!_0xc0e123[_0x4a738a(0x15f)]())throw CliErrors['validation'](_0x4a738a(0x151)+_0x206260);const _0x372226=resolveSymlinkTarget(_0x206260);if(!isPathInside(realOrResolved(_0x372226),realOrResolved(_0x3de179)))throw CliErrors[_0x4a738a(0x137)](_0x4a738a(0x14c)+_0x206260);if(realOrResolved(_0x372226)===realOrResolved(_0x19ce27))return{'path':_0x206260,'target':_0x19ce27,'action':_0x4a738a(0x131)};return unlinkSync(_0x206260),symlinkSync(_0x19ce27,_0x206260,'dir'),{'path':_0x206260,'target':_0x19ce27,'action':_0x4a738a(0x149)};}return symlinkSync(_0x19ce27,_0x206260,_0x4a738a(0x159)),{'path':_0x206260,'target':_0x19ce27,'action':_0x4a738a(0x156)};}function managedAppSkillLinkPaths(_0x401a2d,_0x32d2f6){const _0x2c7b6a=a100_0x4d71;if(!existsSync(_0x401a2d))return[];const _0x505e96=_0x32d2f6+'--';return readdirSync(_0x401a2d,{'withFileTypes':!![]})['filter'](_0x42d1cb=>_0x42d1cb[_0x2c7b6a(0x143)][_0x2c7b6a(0x154)](_0x505e96))[_0x2c7b6a(0x134)](_0x4fe9f9=>resolve(_0x401a2d,_0x4fe9f9[_0x2c7b6a(0x143)]));}function removeManagedSkillLink(_0x437184,_0x21af0f){const _0x2eccef=a100_0x4d71,_0x1ef7e7=lstatIfPresent(_0x437184);if(!_0x1ef7e7?.[_0x2eccef(0x15f)]())return{'path':_0x437184,'action':_0x2eccef(0x12b),'reason':'not-managed-symlink'};const _0x6ba0bc=resolveSymlinkTarget(_0x437184);if(!isPathInside(realOrResolved(_0x6ba0bc),realOrResolved(_0x21af0f)))return{'path':_0x437184,'action':'skipped','reason':_0x2eccef(0x130)};return unlinkSync(_0x437184),{'path':_0x437184,'action':_0x2eccef(0x14b)};}function a100_0x4d71(_0x38217b,_0x2862a5){_0x38217b=_0x38217b-0x129;const _0x51faba=a100_0x51fa();let _0x4d71d5=_0x51faba[_0x38217b];return _0x4d71d5;}export function copyManagedSkillDirectory(_0x46932e,_0x2b9389){const _0x2f31c6=a100_0x4d71,_0x91ac7e=resolve(_0x2b9389,METADATA_FILE),_0x21f1f4=existsSync(_0x2b9389);if(_0x21f1f4){const _0x56e249=lstatSync(_0x2b9389);if(_0x56e249[_0x2f31c6(0x15f)]())throw CliErrors[_0x2f31c6(0x137)](_0x2f31c6(0x157)+_0x2b9389);if(!_0x56e249[_0x2f31c6(0x129)]())throw CliErrors[_0x2f31c6(0x137)](_0x2f31c6(0x142)+_0x2b9389);const _0x4fbfcd=readMetadataIfPresent(_0x91ac7e);if(_0x4fbfcd?.[_0x2f31c6(0x145)]!=='builtin')throw CliErrors[_0x2f31c6(0x137)](_0x2f31c6(0x15a)+_0x2b9389);}ensureDirSync(dirname(_0x2b9389));const _0x28c7d5=_0x21f1f4?readMetadataIfPresent(_0x91ac7e)?.[_0x2f31c6(0x15c)]:undefined,_0x3e8613=readMetadataIfPresent(resolve(_0x46932e,METADATA_FILE))?.['contentHash'];return _0x21f1f4&&removeSync(_0x2b9389),copySkillDirectory(_0x46932e,_0x2b9389),{'path':_0x2b9389,'target':_0x46932e,'action':!_0x21f1f4?_0x2f31c6(0x156):_0x28c7d5===_0x3e8613?'unchanged':_0x2f31c6(0x149)};}function copySkillDirectory(_0x268a57,_0x3412ac){copySync(_0x268a57,_0x3412ac,{'dereference':![],'overwrite':!![],'filter'(_0x37752e){const _0x45ec0a=a100_0x4d71;if(lstatSync(_0x37752e)['isSymbolicLink']())throw CliErrors[_0x45ec0a(0x137)](_0x45ec0a(0x12c)+_0x37752e);return!![];}});}
@@ -1 +1 @@
1
- function a101_0x1358(_0x244f5c,_0x1374f2){_0x244f5c=_0x244f5c-0xd5;const _0x5e5ba4=a101_0x5e5b();let _0x1358ef=_0x5e5ba4[_0x244f5c];return _0x1358ef;}(function(_0x10389d,_0x27a0df){const _0x41bedf=a101_0x1358,_0x3591b8=_0x10389d();while(!![]){try{const _0x3a7716=-parseInt(_0x41bedf(0xe7))/0x1+-parseInt(_0x41bedf(0xdc))/0x2+parseInt(_0x41bedf(0xed))/0x3+-parseInt(_0x41bedf(0xe2))/0x4+parseInt(_0x41bedf(0xe0))/0x5+-parseInt(_0x41bedf(0xe1))/0x6*(parseInt(_0x41bedf(0xd7))/0x7)+parseInt(_0x41bedf(0xf5))/0x8;if(_0x3a7716===_0x27a0df)break;else _0x3591b8['push'](_0x3591b8['shift']());}catch(_0x4f4ed3){_0x3591b8['push'](_0x3591b8['shift']());}}}(a101_0x5e5b,0xf180c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x23a5d2,_0x4a68f0={}){const _0x1f1952=a101_0x1358,_0x36a24c=safePathSegment(_0x23a5d2['appCode'],'appCode'),_0x57856b=normalizeRuntimeSkillScopes(_0x23a5d2[_0x1f1952(0xfc)]),_0x21b10c=new Set(_0x57856b),_0x9d00d8=_0x23a5d2[_0x1f1952(0xd6)]?.[_0x1f1952(0xeb)](),_0x131142=new Map(),_0x2e4bf4=resolve(getRuntimeSkillCacheRoot(_0x23a5d2[_0x1f1952(0xf8)],_0x23a5d2[_0x1f1952(0xfb)],_0x4a68f0),_0x36a24c);for(const _0x558bcc of _0x57856b){for(const _0x807127 of localSkillEntryDirs(resolve(_0x2e4bf4,_0x558bcc))){collectLocalRuntimeSkill(_0x131142,_0x807127,{'appCode':_0x36a24c,'scopes':_0x21b10c,'code':_0x9d00d8,'source':_0x1f1952(0xfd)});}}const _0x5601b1=resolveSkillSyncPaths(_0x4a68f0);for(const _0x3018ec of runtimeAgentSkillRoots(_0x5601b1)){for(const _0x15b102 of localSkillLinkCandidates(_0x3018ec,_0x36a24c,_0x21b10c)){collectLocalRuntimeSkill(_0x131142,_0x15b102,{'appCode':_0x36a24c,'scopes':_0x21b10c,'code':_0x9d00d8,'source':'link','linkedPath':_0x15b102});}}return Array[_0x1f1952(0xe4)](_0x131142[_0x1f1952(0xdb)]())[_0x1f1952(0xd9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4a07ed){const _0x460dfc=a101_0x1358;if(!existsSync(_0x4a07ed))return[];return readdirSync(_0x4a07ed,{'withFileTypes':!![]})[_0x460dfc(0xf6)](_0x15760a=>_0x15760a[_0x460dfc(0xd8)]()||_0x15760a[_0x460dfc(0xef)]())['map'](_0x20be04=>resolve(_0x4a07ed,_0x20be04[_0x460dfc(0xe9)]));}function localSkillLinkCandidates(_0x384854,_0x8d462d,_0x39b810){const _0x50627f=a101_0x1358;if(!existsSync(_0x384854))return[];const _0x53e6d4=_0x8d462d+'--';return readdirSync(_0x384854,{'withFileTypes':!![]})['filter'](_0x3e3cab=>_0x3e3cab[_0x50627f(0xd8)]()||_0x3e3cab[_0x50627f(0xef)]())['filter'](_0x150e78=>_0x150e78[_0x50627f(0xe9)][_0x50627f(0xf2)](_0x53e6d4)||_0x39b810[_0x50627f(0xdd)]('builtin'))[_0x50627f(0xda)](_0xe57293=>resolve(_0x384854,_0xe57293[_0x50627f(0xe9)]));}function collectLocalRuntimeSkill(_0x5838f2,_0x3c53c4,_0x2922fe){const _0x55d2bd=a101_0x1358,_0x341395=resolve(_0x3c53c4,METADATA_FILE),_0xba8c49=readMetadataIfPresent(_0x341395);if(!_0xba8c49)return;if(_0xba8c49[_0x55d2bd(0xf4)]!==_0x2922fe['appCode'])return;if(!isRuntimeSkillScope(_0xba8c49[_0x55d2bd(0xfa)])||!_0x2922fe[_0x55d2bd(0xfc)]['has'](_0xba8c49['scope']))return;const _0x430510=_0xba8c49[_0x55d2bd(0xf1)]?.[_0x55d2bd(0xeb)]();if(!_0x430510)return;if(_0x2922fe[_0x55d2bd(0xd6)]&&_0x430510!==_0x2922fe[_0x55d2bd(0xd6)])return;const _0x17f88a=_0xba8c49[_0x55d2bd(0xfa)]+':'+_0x430510,_0x3cb0ab=_0x2922fe['linkedPath']?[_0x2922fe[_0x55d2bd(0xea)]]:[],_0x25fd69=_0x5838f2[_0x55d2bd(0xe8)](_0x17f88a);if(_0x25fd69){_0x2922fe[_0x55d2bd(0xf9)]===_0x55d2bd(0xfd)&&(_0x25fd69['dir']=_0x3c53c4,_0x25fd69[_0x55d2bd(0xf7)]=_0x3c53c4,_0x25fd69['skillMdPath']=resolve(_0x3c53c4,SKILL_FILE),_0x25fd69[_0x55d2bd(0xdf)]=_0x341395);for(const _0x7b645a of _0x3cb0ab){!_0x25fd69[_0x55d2bd(0xee)][_0x55d2bd(0xf0)](_0x7b645a)&&_0x25fd69['linkedPaths'][_0x55d2bd(0xe5)](_0x7b645a);}_0x25fd69[_0x55d2bd(0xee)][_0x55d2bd(0xd9)]();return;}_0x5838f2[_0x55d2bd(0xe3)](_0x17f88a,{..._0xba8c49,'tags':Array[_0x55d2bd(0xec)](_0xba8c49[_0x55d2bd(0xd5)])?_0xba8c49[_0x55d2bd(0xd5)]:[],'scope':_0xba8c49[_0x55d2bd(0xfa)],'source':_0x55d2bd(0xf3),'dir':_0x3c53c4,'cacheDir':_0x2922fe['source']===_0x55d2bd(0xfd)?_0x3c53c4:undefined,'skillMdPath':resolve(_0x3c53c4,SKILL_FILE),'metadataPath':_0x341395,'linkedPaths':_0x3cb0ab});}function a101_0x5e5b(){const _0x1d9a9d=['get','name','linkedPath','trim','isArray','1086642CYkPaY','linkedPaths','isSymbolicLink','includes','skillCode','startsWith','local','appCode','16161960qNnNSY','filter','cacheDir','env','source','scope','accessKey','scopes','cache','tags','code','4249qSADqq','isDirectory','sort','map','values','2287746aHOBVc','has','localeCompare','metadataPath','5074430NqwCfx','3954RhSHtO','1014948mcbrVn','set','from','push','dir','610526CJrxIl'];a101_0x5e5b=function(){return _0x1d9a9d;};return a101_0x5e5b();}function compareLocalRuntimeSkills(_0x240f17,_0x4e845e){const _0x922dbb=a101_0x1358,_0x167426={'personal':0x0,'company':0x1,'builtin':0x2};return _0x167426[_0x240f17[_0x922dbb(0xfa)]]-_0x167426[_0x4e845e['scope']]||_0x240f17[_0x922dbb(0xf1)][_0x922dbb(0xde)](_0x4e845e[_0x922dbb(0xf1)])||_0x240f17[_0x922dbb(0xe6)][_0x922dbb(0xde)](_0x4e845e[_0x922dbb(0xe6)]);}
1
+ (function(_0x189ca9,_0x2fb88d){const _0x21c3de=a101_0x294e,_0x4e3865=_0x189ca9();while(!![]){try{const _0x53b66b=-parseInt(_0x21c3de(0x192))/0x1+parseInt(_0x21c3de(0x18f))/0x2+-parseInt(_0x21c3de(0x19b))/0x3*(-parseInt(_0x21c3de(0x196))/0x4)+parseInt(_0x21c3de(0x1a9))/0x5+parseInt(_0x21c3de(0x19f))/0x6*(parseInt(_0x21c3de(0x1a7))/0x7)+parseInt(_0x21c3de(0x194))/0x8*(parseInt(_0x21c3de(0x187))/0x9)+-parseInt(_0x21c3de(0x19c))/0xa;if(_0x53b66b===_0x2fb88d)break;else _0x4e3865['push'](_0x4e3865['shift']());}catch(_0x334d79){_0x4e3865['push'](_0x4e3865['shift']());}}}(a101_0x2d30,0x6de91));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_0x294e(_0x15d32e,_0x18e64c){_0x15d32e=_0x15d32e-0x187;const _0x2d3039=a101_0x2d30();let _0x294ec3=_0x2d3039[_0x15d32e];return _0x294ec3;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x90457b,_0x5e6ad8={}){const _0x411550=a101_0x294e,_0x529afd=safePathSegment(_0x90457b[_0x411550(0x193)],_0x411550(0x193)),_0x5b759e=normalizeRuntimeSkillScopes(_0x90457b[_0x411550(0x1a4)]),_0x292cae=new Set(_0x5b759e),_0x39c484=_0x90457b[_0x411550(0x18e)]?.['trim'](),_0x27a6b2=new Map(),_0x163947=resolve(getRuntimeSkillCacheRoot(_0x90457b[_0x411550(0x1a2)],_0x90457b['accessKey'],_0x5e6ad8),_0x529afd);for(const _0x59f55b of _0x5b759e){for(const _0x416618 of localSkillEntryDirs(resolve(_0x163947,_0x59f55b))){collectLocalRuntimeSkill(_0x27a6b2,_0x416618,{'appCode':_0x529afd,'scopes':_0x292cae,'code':_0x39c484,'source':_0x411550(0x198)});}}const _0x2b1a1f=resolveSkillSyncPaths(_0x5e6ad8);for(const _0x11598c of runtimeAgentSkillRoots(_0x2b1a1f)){for(const _0xbb6b97 of localSkillLinkCandidates(_0x11598c,_0x529afd,_0x292cae)){collectLocalRuntimeSkill(_0x27a6b2,_0xbb6b97,{'appCode':_0x529afd,'scopes':_0x292cae,'code':_0x39c484,'source':_0x411550(0x1a0),'linkedPath':_0xbb6b97});}}return Array[_0x411550(0x1a8)](_0x27a6b2[_0x411550(0x1ad)]())[_0x411550(0x1aa)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4918e9){const _0x5e2e3d=a101_0x294e;if(!existsSync(_0x4918e9))return[];return readdirSync(_0x4918e9,{'withFileTypes':!![]})[_0x5e2e3d(0x1a5)](_0x28f41f=>_0x28f41f[_0x5e2e3d(0x189)]()||_0x28f41f[_0x5e2e3d(0x188)]())['map'](_0x1f2651=>resolve(_0x4918e9,_0x1f2651['name']));}function localSkillLinkCandidates(_0x4ff9db,_0x4e92e2,_0x5ce872){const _0x2ccb90=a101_0x294e;if(!existsSync(_0x4ff9db))return[];const _0x360bb8=_0x4e92e2+'--';return readdirSync(_0x4ff9db,{'withFileTypes':!![]})['filter'](_0x27ab6c=>_0x27ab6c[_0x2ccb90(0x189)]()||_0x27ab6c[_0x2ccb90(0x188)]())[_0x2ccb90(0x1a5)](_0x4bd96f=>_0x4bd96f['name'][_0x2ccb90(0x1ac)](_0x360bb8)||_0x5ce872[_0x2ccb90(0x18c)](_0x2ccb90(0x18b)))[_0x2ccb90(0x197)](_0x27c25c=>resolve(_0x4ff9db,_0x27c25c['name']));}function a101_0x2d30(){const _0x1fac60=['3398000LmdOEA','sort','linkedPaths','startsWith','values','9UHAgbA','isSymbolicLink','isDirectory','skillMdPath','builtin','has','dir','code','1035938zrHZkz','localeCompare','get','779649iygWZw','appCode','6188464norrzK','cacheDir','10728GewAcY','map','cache','includes','isArray','81PDVvUj','10206830LosZxx','linkedPath','metadataPath','48KchFTj','link','tags','env','skillCode','scopes','filter','scope','181111DvukGW','from'];a101_0x2d30=function(){return _0x1fac60;};return a101_0x2d30();}function collectLocalRuntimeSkill(_0x31644a,_0x4b26a3,_0x59af5a){const _0x411b64=a101_0x294e,_0x535093=resolve(_0x4b26a3,METADATA_FILE),_0x43695b=readMetadataIfPresent(_0x535093);if(!_0x43695b)return;if(_0x43695b[_0x411b64(0x193)]!==_0x59af5a[_0x411b64(0x193)])return;if(!isRuntimeSkillScope(_0x43695b[_0x411b64(0x1a6)])||!_0x59af5a[_0x411b64(0x1a4)][_0x411b64(0x18c)](_0x43695b[_0x411b64(0x1a6)]))return;const _0x212738=_0x43695b[_0x411b64(0x1a3)]?.['trim']();if(!_0x212738)return;if(_0x59af5a['code']&&_0x212738!==_0x59af5a[_0x411b64(0x18e)])return;const _0x27e76b=_0x43695b['scope']+':'+_0x212738,_0x3f0859=_0x59af5a[_0x411b64(0x19d)]?[_0x59af5a[_0x411b64(0x19d)]]:[],_0x175e9a=_0x31644a[_0x411b64(0x191)](_0x27e76b);if(_0x175e9a){_0x59af5a['source']===_0x411b64(0x198)&&(_0x175e9a[_0x411b64(0x18d)]=_0x4b26a3,_0x175e9a[_0x411b64(0x195)]=_0x4b26a3,_0x175e9a[_0x411b64(0x18a)]=resolve(_0x4b26a3,SKILL_FILE),_0x175e9a[_0x411b64(0x19e)]=_0x535093);for(const _0x55af24 of _0x3f0859){!_0x175e9a[_0x411b64(0x1ab)][_0x411b64(0x199)](_0x55af24)&&_0x175e9a[_0x411b64(0x1ab)]['push'](_0x55af24);}_0x175e9a['linkedPaths'][_0x411b64(0x1aa)]();return;}_0x31644a['set'](_0x27e76b,{..._0x43695b,'tags':Array[_0x411b64(0x19a)](_0x43695b[_0x411b64(0x1a1)])?_0x43695b[_0x411b64(0x1a1)]:[],'scope':_0x43695b[_0x411b64(0x1a6)],'source':'local','dir':_0x4b26a3,'cacheDir':_0x59af5a['source']===_0x411b64(0x198)?_0x4b26a3:undefined,'skillMdPath':resolve(_0x4b26a3,SKILL_FILE),'metadataPath':_0x535093,'linkedPaths':_0x3f0859});}function compareLocalRuntimeSkills(_0x270bf6,_0x17ca10){const _0x4e8a79=a101_0x294e,_0x2a30e8={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2a30e8[_0x270bf6[_0x4e8a79(0x1a6)]]-_0x2a30e8[_0x17ca10[_0x4e8a79(0x1a6)]]||_0x270bf6[_0x4e8a79(0x1a3)]['localeCompare'](_0x17ca10[_0x4e8a79(0x1a3)])||_0x270bf6[_0x4e8a79(0x18d)][_0x4e8a79(0x190)](_0x17ca10[_0x4e8a79(0x18d)]);}
@@ -1 +1 @@
1
- function a102_0x276d(_0x1d39fe,_0x26246d){_0x1d39fe=_0x1d39fe-0x1f1;const _0xd3efb9=a102_0xd3ef();let _0x276def=_0xd3efb9[_0x1d39fe];return _0x276def;}(function(_0x1205f7,_0x2d225e){const _0xc21ec3=a102_0x276d,_0x39c964=_0x1205f7();while(!![]){try{const _0x4d584b=-parseInt(_0xc21ec3(0x21a))/0x1+parseInt(_0xc21ec3(0x20e))/0x2+parseInt(_0xc21ec3(0x1f1))/0x3+parseInt(_0xc21ec3(0x208))/0x4*(parseInt(_0xc21ec3(0x202))/0x5)+-parseInt(_0xc21ec3(0x1f4))/0x6*(-parseInt(_0xc21ec3(0x1f6))/0x7)+parseInt(_0xc21ec3(0x21f))/0x8+parseInt(_0xc21ec3(0x1fa))/0x9*(-parseInt(_0xc21ec3(0x1f7))/0xa);if(_0x4d584b===_0x2d225e)break;else _0x39c964['push'](_0x39c964['shift']());}catch(_0x2aa287){_0x39c964['push'](_0x39c964['shift']());}}}(a102_0xd3ef,0x39625));function a102_0xd3ef(){const _0x253f83=['isSafeInteger','localeCompare','isDirectory','values','split','898846McndTt','Duplicate\x20Skill\x20file\x20path:\x20','toLowerCase','bytes','isFile','test','object','toString','isArray','sha256','string','validation','203995SKFOAD','from','Skill\x20file\x20sha256\x20is\x20invalid:\x20','includes','utf8','1427336AZttdV','length','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','1068114YHOoiE','Skill\x20file\x20size\x20is\x20invalid:\x20','push','116238HNcCsX','content','98yMFcLB','3785890OqoVbE','sort','Unsafe\x20Skill\x20file\x20path:\x20','27OreVWR','has','compare','path','size','startsWith','trim','name','405cPHmYl','replace','set','Skill\x20file\x20path\x20must\x20be\x20text.','isBuffer','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','15788fxlAYA'];a102_0xd3ef=function(){return _0x253f83;};return a102_0xd3ef();}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(_0x22bf8a){const _0x4b195a=a102_0x276d;return _0x22bf8a[_0x4b195a(0x211)]??Buffer[_0x4b195a(0x21b)](_0x22bf8a['content']??'','utf8');}export function fileText(_0x5ed4b2){const _0x31344e=a102_0x276d;return fileContent(_0x5ed4b2)[_0x31344e(0x215)](_0x31344e(0x21e));}export function normalizeLocalFiles(_0x15c6e3){const _0x47ab62=a102_0x276d;if(!Array[_0x47ab62(0x216)](_0x15c6e3)||_0x15c6e3[_0x47ab62(0x220)]===0x0)return[];const _0x32ae8a=new Map();for(const _0x4e2fc4 of _0x15c6e3){if(!_0x4e2fc4||typeof _0x4e2fc4!=='object'||typeof _0x4e2fc4['path']!=='string')throw CliErrors['validation'](_0x47ab62(0x205));const _0x921b34=normalizeSkillRelativePath(_0x4e2fc4[_0x47ab62(0x1fd)]);if(_0x32ae8a['has'](_0x921b34))throw CliErrors[_0x47ab62(0x219)](_0x47ab62(0x20f)+_0x921b34);if(_0x4e2fc4['bytes']!==undefined&&!Buffer[_0x47ab62(0x206)](_0x4e2fc4[_0x47ab62(0x211)]))throw CliErrors[_0x47ab62(0x219)](_0x47ab62(0x207)+_0x921b34);if(_0x4e2fc4[_0x47ab62(0x211)]===undefined&&typeof _0x4e2fc4[_0x47ab62(0x1f5)]!==_0x47ab62(0x218))throw CliErrors['validation'](_0x47ab62(0x221)+_0x921b34);const _0x374d79=fileContent(_0x4e2fc4);_0x32ae8a[_0x47ab62(0x204)](_0x921b34,{'path':_0x921b34,'bytes':_0x374d79});}return Array[_0x47ab62(0x21b)](_0x32ae8a[_0x47ab62(0x20c)]())[_0x47ab62(0x1f8)](compareSkillFiles);}export function normalizeManifestFiles(_0x44d04e){const _0x269d18=a102_0x276d;if(!Array[_0x269d18(0x216)](_0x44d04e)||_0x44d04e['length']===0x0)return[];const _0x5a244f=new Map();for(const _0x1d2884 of _0x44d04e){if(!_0x1d2884||typeof _0x1d2884!==_0x269d18(0x214)||typeof _0x1d2884[_0x269d18(0x1fd)]!==_0x269d18(0x218))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x205));const _0x3a39ff=normalizeSkillRelativePath(_0x1d2884['path']);if(_0x5a244f[_0x269d18(0x1fb)](_0x3a39ff))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x20f)+_0x3a39ff);if(!isSha256Hex(_0x1d2884[_0x269d18(0x217)]))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x21c)+_0x3a39ff);if(!Number[_0x269d18(0x209)](_0x1d2884['size'])||_0x1d2884[_0x269d18(0x1fe)]<0x0)throw CliErrors[_0x269d18(0x219)](_0x269d18(0x1f2)+_0x3a39ff);_0x5a244f[_0x269d18(0x204)](_0x3a39ff,{'path':_0x3a39ff,'sha256':_0x1d2884[_0x269d18(0x217)][_0x269d18(0x210)](),'size':_0x1d2884[_0x269d18(0x1fe)]});}return Array[_0x269d18(0x21b)](_0x5a244f[_0x269d18(0x20c)]())[_0x269d18(0x1f8)](compareSkillFiles);}export function scanSkillDirectory(_0x3a2a86){const _0x13d416=realpathSync(_0x3a2a86),_0x32be80=[];function _0x6530cb(_0x2c6a3d){const _0x62db0b=a102_0x276d,_0x31afdb=readdirSync(_0x2c6a3d,{'withFileTypes':!![]})[_0x62db0b(0x1f8)]((_0x2b489a,_0x108b7f)=>_0x2b489a[_0x62db0b(0x201)][_0x62db0b(0x20a)](_0x108b7f['name']));for(const _0x2848b9 of _0x31afdb){if(_0x2848b9[_0x62db0b(0x20b)]()&&IGNORED_DIR_NAMES[_0x62db0b(0x1fb)](_0x2848b9[_0x62db0b(0x201)]))continue;if(IGNORED_FILE_NAMES[_0x62db0b(0x1fb)](_0x2848b9[_0x62db0b(0x201)]))continue;const _0x36f323=resolve(_0x2c6a3d,_0x2848b9[_0x62db0b(0x201)]);if(_0x2848b9['isSymbolicLink']())throw CliErrors[_0x62db0b(0x219)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x36f323);const _0x5f0201=toPosixPath(relative(_0x13d416,_0x36f323));if(_0x2848b9['isDirectory']()){_0x6530cb(_0x36f323);continue;}if(!_0x2848b9[_0x62db0b(0x212)]())continue;validateSkillRelativePath(_0x5f0201);const _0x15beef=readFileSync(_0x36f323);_0x32be80[_0x62db0b(0x1f3)]({'path':_0x5f0201,'bytes':_0x15beef});}}return _0x6530cb(_0x13d416),normalizeLocalFiles(_0x32be80);}export function compareSkillFiles(_0x176729,_0x2451fc){const _0x1dc5e9=a102_0x276d;if(_0x176729[_0x1dc5e9(0x1fd)]===SKILL_FILE)return _0x2451fc[_0x1dc5e9(0x1fd)]===SKILL_FILE?0x0:-0x1;if(_0x2451fc[_0x1dc5e9(0x1fd)]===SKILL_FILE)return 0x1;return Buffer[_0x1dc5e9(0x1fc)](Buffer[_0x1dc5e9(0x21b)](_0x176729[_0x1dc5e9(0x1fd)],_0x1dc5e9(0x21e)),Buffer[_0x1dc5e9(0x21b)](_0x2451fc[_0x1dc5e9(0x1fd)],_0x1dc5e9(0x21e)));}export function normalizeSkillRelativePath(_0x576fc7){const _0x26319f=a102_0x276d,_0x45113b=toPosixPath(_0x576fc7[_0x26319f(0x200)]());return validateSkillRelativePath(_0x45113b),_0x45113b;}export function validateSkillRelativePath(_0x35dedc){const _0x2952ef=a102_0x276d;if(!_0x35dedc||_0x35dedc[_0x2952ef(0x1ff)]('/')||_0x35dedc[_0x2952ef(0x21d)]('//'))throw CliErrors[_0x2952ef(0x219)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x35dedc);for(const _0xf3f788 of _0x35dedc[_0x2952ef(0x20d)]('/')){if(!_0xf3f788||_0xf3f788==='.'||_0xf3f788==='..')throw CliErrors[_0x2952ef(0x219)](_0x2952ef(0x1f9)+_0x35dedc);}}export function toPosixPath(_0x8931ba){const _0x579ec2=a102_0x276d;return _0x8931ba[_0x579ec2(0x203)](/\\/g,'/');}export function isSha256Hex(_0x2c4ade){const _0x1d1d7b=a102_0x276d;return typeof _0x2c4ade==='string'&&/^[a-fA-F0-9]{64}$/[_0x1d1d7b(0x213)](_0x2c4ade);}
1
+ (function(_0xc3fd5a,_0x1d4922){const _0x2818d1=a102_0x572e,_0x41e3f0=_0xc3fd5a();while(!![]){try{const _0x3801d0=parseInt(_0x2818d1(0x7c))/0x1*(-parseInt(_0x2818d1(0x91))/0x2)+-parseInt(_0x2818d1(0x75))/0x3+parseInt(_0x2818d1(0x8e))/0x4*(parseInt(_0x2818d1(0x6b))/0x5)+-parseInt(_0x2818d1(0x95))/0x6+-parseInt(_0x2818d1(0x84))/0x7*(-parseInt(_0x2818d1(0x8c))/0x8)+parseInt(_0x2818d1(0x8a))/0x9*(-parseInt(_0x2818d1(0x94))/0xa)+-parseInt(_0x2818d1(0x8f))/0xb*(-parseInt(_0x2818d1(0x83))/0xc);if(_0x3801d0===_0x1d4922)break;else _0x41e3f0['push'](_0x41e3f0['shift']());}catch(_0x195c95){_0x41e3f0['push'](_0x41e3f0['shift']());}}}(a102_0x5b25,0x45ae7));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(_0x1edc77){const _0x453d9a=a102_0x572e;return _0x1edc77[_0x453d9a(0x7e)]??Buffer['from'](_0x1edc77[_0x453d9a(0x6a)]??'',_0x453d9a(0x8d));}function a102_0x5b25(){const _0x91d0b1=['506UnMDIJ','isArray','2rKcndZ','isFile','localeCompare','10RgqACO','1196082TRsDYN','sha256','Skill\x20file\x20path\x20must\x20be\x20text.','length','content','5lrkkhM','string','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isSafeInteger','startsWith','isDirectory','object','Unsafe\x20Skill\x20file\x20path:\x20','test','replace','296985KOeXzz','Skill\x20file\x20sha256\x20is\x20invalid:\x20','compare','from','split','has','name','544001jKkybn','Duplicate\x20Skill\x20file\x20path:\x20','bytes','path','sort','isBuffer','toString','212376JEdokw','1147573VXRoWT','size','validation','set','values','includes','4276809LblLpm','Skill\x20file\x20size\x20is\x20invalid:\x20','24GDKWsN','utf8','1188136bBDkph'];a102_0x5b25=function(){return _0x91d0b1;};return a102_0x5b25();}export function fileText(_0x49ca54){const _0x2a1682=a102_0x572e;return fileContent(_0x49ca54)[_0x2a1682(0x82)](_0x2a1682(0x8d));}export function normalizeLocalFiles(_0x4fc847){const _0x334f4f=a102_0x572e;if(!Array[_0x334f4f(0x90)](_0x4fc847)||_0x4fc847[_0x334f4f(0x69)]===0x0)return[];const _0x464a5d=new Map();for(const _0x54bd65 of _0x4fc847){if(!_0x54bd65||typeof _0x54bd65!=='object'||typeof _0x54bd65[_0x334f4f(0x7f)]!==_0x334f4f(0x6c))throw CliErrors['validation'](_0x334f4f(0x97));const _0x350b09=normalizeSkillRelativePath(_0x54bd65['path']);if(_0x464a5d[_0x334f4f(0x7a)](_0x350b09))throw CliErrors[_0x334f4f(0x86)](_0x334f4f(0x7d)+_0x350b09);if(_0x54bd65[_0x334f4f(0x7e)]!==undefined&&!Buffer[_0x334f4f(0x81)](_0x54bd65[_0x334f4f(0x7e)]))throw CliErrors['validation'](_0x334f4f(0x6d)+_0x350b09);if(_0x54bd65['bytes']===undefined&&typeof _0x54bd65[_0x334f4f(0x6a)]!==_0x334f4f(0x6c))throw CliErrors[_0x334f4f(0x86)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x350b09);const _0x30dbf0=fileContent(_0x54bd65);_0x464a5d[_0x334f4f(0x87)](_0x350b09,{'path':_0x350b09,'bytes':_0x30dbf0});}return Array['from'](_0x464a5d[_0x334f4f(0x88)]())[_0x334f4f(0x80)](compareSkillFiles);}function a102_0x572e(_0x215761,_0x26a280){_0x215761=_0x215761-0x69;const _0x5b25cc=a102_0x5b25();let _0x572e18=_0x5b25cc[_0x215761];return _0x572e18;}export function normalizeManifestFiles(_0x100638){const _0x3d695b=a102_0x572e;if(!Array[_0x3d695b(0x90)](_0x100638)||_0x100638[_0x3d695b(0x69)]===0x0)return[];const _0x5d4623=new Map();for(const _0x23e85c of _0x100638){if(!_0x23e85c||typeof _0x23e85c!==_0x3d695b(0x71)||typeof _0x23e85c['path']!=='string')throw CliErrors[_0x3d695b(0x86)](_0x3d695b(0x97));const _0x57b4a5=normalizeSkillRelativePath(_0x23e85c[_0x3d695b(0x7f)]);if(_0x5d4623[_0x3d695b(0x7a)](_0x57b4a5))throw CliErrors[_0x3d695b(0x86)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x57b4a5);if(!isSha256Hex(_0x23e85c[_0x3d695b(0x96)]))throw CliErrors[_0x3d695b(0x86)](_0x3d695b(0x76)+_0x57b4a5);if(!Number[_0x3d695b(0x6e)](_0x23e85c[_0x3d695b(0x85)])||_0x23e85c[_0x3d695b(0x85)]<0x0)throw CliErrors[_0x3d695b(0x86)](_0x3d695b(0x8b)+_0x57b4a5);_0x5d4623[_0x3d695b(0x87)](_0x57b4a5,{'path':_0x57b4a5,'sha256':_0x23e85c[_0x3d695b(0x96)]['toLowerCase'](),'size':_0x23e85c['size']});}return Array[_0x3d695b(0x78)](_0x5d4623[_0x3d695b(0x88)]())[_0x3d695b(0x80)](compareSkillFiles);}export function scanSkillDirectory(_0x286098){const _0x1ae604=realpathSync(_0x286098),_0x32773d=[];function _0x131744(_0x35a5f0){const _0x5430ac=a102_0x572e,_0x218be8=readdirSync(_0x35a5f0,{'withFileTypes':!![]})[_0x5430ac(0x80)]((_0xdc6882,_0x34f1d5)=>_0xdc6882['name'][_0x5430ac(0x93)](_0x34f1d5[_0x5430ac(0x7b)]));for(const _0x30e210 of _0x218be8){if(_0x30e210[_0x5430ac(0x70)]()&&IGNORED_DIR_NAMES[_0x5430ac(0x7a)](_0x30e210[_0x5430ac(0x7b)]))continue;if(IGNORED_FILE_NAMES[_0x5430ac(0x7a)](_0x30e210[_0x5430ac(0x7b)]))continue;const _0x2d507e=resolve(_0x35a5f0,_0x30e210[_0x5430ac(0x7b)]);if(_0x30e210['isSymbolicLink']())throw CliErrors[_0x5430ac(0x86)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x2d507e);const _0x2b1c8e=toPosixPath(relative(_0x1ae604,_0x2d507e));if(_0x30e210[_0x5430ac(0x70)]()){_0x131744(_0x2d507e);continue;}if(!_0x30e210[_0x5430ac(0x92)]())continue;validateSkillRelativePath(_0x2b1c8e);const _0x73f105=readFileSync(_0x2d507e);_0x32773d['push']({'path':_0x2b1c8e,'bytes':_0x73f105});}}return _0x131744(_0x1ae604),normalizeLocalFiles(_0x32773d);}export function compareSkillFiles(_0x211fbc,_0x1e889f){const _0x4c98da=a102_0x572e;if(_0x211fbc['path']===SKILL_FILE)return _0x1e889f['path']===SKILL_FILE?0x0:-0x1;if(_0x1e889f[_0x4c98da(0x7f)]===SKILL_FILE)return 0x1;return Buffer[_0x4c98da(0x77)](Buffer[_0x4c98da(0x78)](_0x211fbc[_0x4c98da(0x7f)],_0x4c98da(0x8d)),Buffer[_0x4c98da(0x78)](_0x1e889f['path'],_0x4c98da(0x8d)));}export function normalizeSkillRelativePath(_0x358361){const _0xf06e7=toPosixPath(_0x358361['trim']());return validateSkillRelativePath(_0xf06e7),_0xf06e7;}export function validateSkillRelativePath(_0x5142b8){const _0x77d10=a102_0x572e;if(!_0x5142b8||_0x5142b8[_0x77d10(0x6f)]('/')||_0x5142b8[_0x77d10(0x89)]('//'))throw CliErrors[_0x77d10(0x86)](_0x77d10(0x72)+_0x5142b8);for(const _0x2605c2 of _0x5142b8[_0x77d10(0x79)]('/')){if(!_0x2605c2||_0x2605c2==='.'||_0x2605c2==='..')throw CliErrors[_0x77d10(0x86)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5142b8);}}export function toPosixPath(_0x305086){const _0x18d062=a102_0x572e;return _0x305086[_0x18d062(0x74)](/\\/g,'/');}export function isSha256Hex(_0x331cdc){const _0x1f4eab=a102_0x572e;return typeof _0x331cdc===_0x1f4eab(0x6c)&&/^[a-fA-F0-9]{64}$/[_0x1f4eab(0x73)](_0x331cdc);}
@@ -1 +1 @@
1
- function a103_0x2153(){const _0x1efd27=['test','length','77pgalsq','accessKey','env','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','28713933vfAQkA','contents','force','has','1394882dfjqPL','keys','find','fileHashes','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','utf8','---\x0a','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','trimEnd','1424KbMHRT','displayName:\x20','entries','pulledAt','8538762yqExie','slice','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description:\x20','1142048FoxuKW','errors','path','\x0a---\x0a\x0a','Managed\x20file\x20was\x20removed\x20locally:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','delete','description','toString','map','appCode','contentHash','name:\x20','isFile','---','packageBytes','603080gxydXb','replace','2757273mnFZNz','match','filter','trim','displayName','16990veAOlv'];a103_0x2153=function(){return _0x1efd27;};return a103_0x2153();}(function(_0x3cc729,_0x5945da){const _0x522892=a103_0x491e,_0x14725c=_0x3cc729();while(!![]){try{const _0x4a10a3=-parseInt(_0x522892(0xec))/0x1+parseInt(_0x522892(0x10e))/0x2+-parseInt(_0x522892(0xfe))/0x3+parseInt(_0x522892(0x118))/0x4*(parseInt(_0x522892(0x103))/0x5)+-parseInt(_0x522892(0xe7))/0x6+-parseInt(_0x522892(0x106))/0x7*(parseInt(_0x522892(0xfc))/0x8)+parseInt(_0x522892(0x10a))/0x9;if(_0x4a10a3===_0x5945da)break;else _0x14725c['push'](_0x14725c['shift']());}catch(_0xb1842c){_0x14725c['push'](_0x14725c['shift']());}}}(a103_0x2153,0xbf6c1));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';function a103_0x491e(_0x391590,_0xf3bf84){_0x391590=_0x391590-0xe6;const _0x2153cd=a103_0x2153();let _0x491e97=_0x2153cd[_0x391590];return _0x491e97;}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(_0x280952,_0x10fda8,_0x34f8a1){const _0x4771f=a103_0x491e,_0x5ee2b2=requireSkillCode(_0x280952),_0x46d235=requirePackageBytes(_0x5ee2b2,_0x34f8a1[_0x4771f(0xfb)]),_0x2ecfd1=extractDownloadedPackage(_0x46d235),_0x1862be=_0x2ecfd1['find'](_0x790d03=>_0x790d03[_0x4771f(0xee)]===SKILL_FILE);if(!_0x1862be)throw CliErrors[_0x4771f(0xe9)](_0x4771f(0x113)+SKILL_FILE+':\x20'+_0x5ee2b2);const _0x111c56=withMaterializedSkillFrontmatter(_0x2ecfd1,_0x280952,_0x5ee2b2),_0x29b3eb=_0x111c56[_0x4771f(0x110)](_0x23be2c=>_0x23be2c[_0x4771f(0xee)]===SKILL_FILE),_0x23adb4=fileText(_0x29b3eb),_0x4c24bd=getRuntimeSkillDir(_0x34f8a1[_0x4771f(0x108)],_0x34f8a1[_0x4771f(0x107)],_0x34f8a1['appCode'],_0x10fda8,_0x5ee2b2,_0x34f8a1['paths']),_0x4b93d0=resolve(_0x4c24bd,SKILL_FILE),_0x1260d9=resolve(_0x4c24bd,METADATA_FILE),_0x1c1414=contentHash(_0x23adb4),_0x3afa2c=readMetadataIfPresent(_0x1260d9)?.[_0x4771f(0x111)];ensurePulledFilesCanBeOverwritten(_0x4c24bd,_0x1260d9,_0x111c56,_0x34f8a1[_0x4771f(0x10c)]===!![]),mkdirSync(_0x4c24bd,{'recursive':!![],'mode':0x1c0});const _0x33be24=existsSync(_0x4b93d0)?readFileSync(_0x4b93d0,'utf8'):undefined;return materializeFiles(_0x4c24bd,_0x111c56),removeStaleManagedFiles(_0x4c24bd,_0x3afa2c,_0x111c56),writeJsonAtomic(_0x1260d9,buildMetadata(_0x280952,_0x10fda8,_0x34f8a1[_0x4771f(0xf6)],_0x1c1414,_0x34f8a1[_0x4771f(0xe6)],_0x111c56,_0x46d235)),{'skill':_0x280952,'scope':_0x10fda8,'dir':_0x4c24bd,'skillMdPath':_0x4b93d0,'metadataPath':_0x1260d9,'contentHash':_0x1c1414,'changed':_0x33be24!==_0x23adb4};}function withMaterializedSkillFrontmatter(_0x18714f,_0x2c6e97,_0x3904cc){const _0xc089b6=a103_0x491e,_0x2e8a2e=skillDisplayName(_0x2c6e97,_0x3904cc),_0x5e255e=_0x2c6e97[_0xc089b6(0xf3)]?.['trim']()||_0x2e8a2e||_0x3904cc;return normalizeLocalFiles(_0x18714f)[_0xc089b6(0xf5)](_0x10fd2e=>{const _0xdc2e59=_0xc089b6,_0x5232e8=fileText(_0x10fd2e);if(_0x10fd2e[_0xdc2e59(0xee)]!==SKILL_FILE)return _0x10fd2e;if(hasYamlFrontmatter(_0x5232e8))return{'path':_0x10fd2e[_0xdc2e59(0xee)],'content':withSyncedDisplayName(_0x5232e8,_0x2e8a2e)};return{'path':_0x10fd2e[_0xdc2e59(0xee)],'content':prependSkillFrontmatter(_0x5232e8,{'name':_0x3904cc,'displayName':_0x2e8a2e,'description':_0x5e255e})};});}function hasYamlFrontmatter(_0x508e46){const _0x56e339=a103_0x491e;return/^\uFEFF?---\s*\r?\n/[_0x56e339(0x104)](_0x508e46);}function prependSkillFrontmatter(_0x3b5dda,_0x59ea6c){const _0x59a12a=a103_0x491e,_0x2993e1=_0x3b5dda[_0x59a12a(0xfd)](/^\uFEFF/,'');return['---',_0x59a12a(0xf8)+yamlString(_0x59ea6c['name']),_0x59ea6c[_0x59a12a(0x102)]?_0x59a12a(0x119)+yamlString(_0x59ea6c[_0x59a12a(0x102)]):undefined,_0x59a12a(0xeb)+yamlString(_0x59ea6c['description']),_0x59a12a(0xfa),'',_0x2993e1][_0x59a12a(0x100)](_0x153f71=>_0x153f71!==undefined)['join']('\x0a');}function yamlString(_0x309d5c){const _0x8ee180=a103_0x491e;return JSON['stringify'](_0x309d5c[_0x8ee180(0xfd)](/\r/g,'')[_0x8ee180(0x101)]());}function skillDisplayName(_0x29ffdd,_0x2c0704){const _0x1a5185=a103_0x491e,_0x48c53a=_0x29ffdd[_0x1a5185(0x112)]?.['trim']();return _0x48c53a||_0x2c0704;}function withSyncedDisplayName(_0x475c4d,_0x483805){const _0x507172=a103_0x491e,_0x5dbce4=_0x475c4d[_0x507172(0xff)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5dbce4)return _0x475c4d;const _0x243051=_0x5dbce4[0x1]??'',_0x18c58c=_0x5dbce4[0x2]??'',_0x31a4fe=parseDocument(_0x18c58c);if(_0x31a4fe[_0x507172(0xed)][_0x507172(0x105)]>0x0||!isMap(_0x31a4fe[_0x507172(0x10b)]))return _0x475c4d;if(_0x483805)_0x31a4fe['set']('displayName',_0x483805);else{if(_0x31a4fe[_0x507172(0x10d)]('displayName'))_0x31a4fe[_0x507172(0xf2)](_0x507172(0x102));else return _0x475c4d;}forceBlockCollections(_0x31a4fe[_0x507172(0x10b)]);const _0x39a196=_0x31a4fe[_0x507172(0xf4)]({'lineWidth':0x0})[_0x507172(0x117)](),_0xd95d65=_0x475c4d[_0x507172(0xe8)](_0x5dbce4[0x0]['length'])[_0x507172(0xfd)](/^\r?\n/,'');return _0x243051+_0x507172(0x115)+_0x39a196+_0x507172(0xef)+_0xd95d65;}function forceBlockCollections(_0x918ff9){if(!isNode(_0x918ff9))return;visit(_0x918ff9,(_0x3f365c,_0x221269)=>{isCollection(_0x221269)&&(_0x221269['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2604e6,_0x1e6dbd,_0xcb07f4,_0x25d1c6){const _0x1a3064=a103_0x491e;if(_0x25d1c6||!existsSync(_0x1e6dbd))return;const _0x58abea=readMetadataIfPresent(_0x1e6dbd);if(!_0x58abea)return;const _0x161a17=_0x58abea[_0x1a3064(0x111)]&&Object['keys'](_0x58abea[_0x1a3064(0x111)])[_0x1a3064(0x105)]>0x0?_0x58abea[_0x1a3064(0x111)]:undefined;if(_0x161a17)for(const [_0x404c53,_0x3e97a8]of Object[_0x1a3064(0x11a)](_0x161a17)){const _0x3e1a4d=resolveManagedFilePath(_0x2604e6,_0x404c53);if(!existsSync(_0x3e1a4d))throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6,_0x1a3064(0xf0)+_0x404c53);const _0x20e93f=lstatSync(_0x3e1a4d);if(!_0x20e93f[_0x1a3064(0xf9)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2604e6,_0x1a3064(0xea)+_0x404c53);const _0x8a36f1=bufferSha256(readFileSync(_0x3e1a4d));if(_0x8a36f1!==_0x3e97a8)throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6+'.\x20Changed\x20file:\x20'+_0x404c53,_0x1a3064(0xf1)+_0x404c53);}else{const _0x46221f=resolve(_0x2604e6,SKILL_FILE);if(existsSync(_0x46221f)&&_0x58abea['contentHash']){const _0x13a559=contentHash(readFileSync(_0x46221f,_0x1a3064(0x114)));if(_0x13a559!==_0x58abea[_0x1a3064(0xf7)])throw CliErrors[_0x1a3064(0xe9)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x46221f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x11030e of normalizeLocalFiles(_0xcb07f4)){if(_0x161a17?.[_0x11030e['path']])continue;if(!_0x161a17&&_0x11030e[_0x1a3064(0xee)]===SKILL_FILE)continue;const _0x5ca4db=resolveManagedFilePath(_0x2604e6,_0x11030e['path']);if(!existsSync(_0x5ca4db))continue;const _0x1707ae=lstatSync(_0x5ca4db);if(!_0x1707ae[_0x1a3064(0xf9)]())throw CliErrors['validation'](_0x1a3064(0x116)+_0x2604e6,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x11030e[_0x1a3064(0xee)]);const _0x2efbd0=bufferSha256(readFileSync(_0x5ca4db));if(_0x2efbd0!==fileHash(_0x11030e))throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6,_0x1a3064(0x109)+_0x11030e[_0x1a3064(0xee)]);}}function materializeFiles(_0x8d9399,_0x4eb256){const _0x512903=a103_0x491e;for(const _0x2141f4 of normalizeLocalFiles(_0x4eb256)){const _0x1aea19=resolveManagedFilePath(_0x8d9399,_0x2141f4[_0x512903(0xee)]);mkdirSync(dirname(_0x1aea19),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1aea19,fileContent(_0x2141f4),0x180);}}function removeStaleManagedFiles(_0x46a9b2,_0x30956b,_0x383d5b){const _0x1ecc13=a103_0x491e;if(!_0x30956b)return;const _0x597646=new Set(normalizeLocalFiles(_0x383d5b)[_0x1ecc13(0xf5)](_0x39f07e=>_0x39f07e[_0x1ecc13(0xee)]));for(const _0x2fc1a2 of Object[_0x1ecc13(0x10f)](_0x30956b)){if(_0x597646[_0x1ecc13(0x10d)](_0x2fc1a2))continue;const _0x25f600=resolveManagedFilePath(_0x46a9b2,_0x2fc1a2);existsSync(_0x25f600)&&lstatSync(_0x25f600)[_0x1ecc13(0xf9)]()&&rmSync(_0x25f600,{'force':!![]});}}
1
+ (function(_0x381a42,_0x3ba413){const _0x121f42=a103_0x1a27,_0x3ed127=_0x381a42();while(!![]){try{const _0x1763c0=-parseInt(_0x121f42(0x137))/0x1*(-parseInt(_0x121f42(0x147))/0x2)+-parseInt(_0x121f42(0x11f))/0x3*(parseInt(_0x121f42(0x126))/0x4)+parseInt(_0x121f42(0x121))/0x5*(parseInt(_0x121f42(0x111))/0x6)+-parseInt(_0x121f42(0x11e))/0x7*(-parseInt(_0x121f42(0x12f))/0x8)+-parseInt(_0x121f42(0x13b))/0x9*(-parseInt(_0x121f42(0x130))/0xa)+parseInt(_0x121f42(0x11a))/0xb+-parseInt(_0x121f42(0x13f))/0xc;if(_0x1763c0===_0x3ba413)break;else _0x3ed127['push'](_0x3ed127['shift']());}catch(_0x4c6327){_0x3ed127['push'](_0x3ed127['shift']());}}}(a103_0x4e97,0x94bc7));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';function a103_0x4e97(){const _0x44711b=['description','trim','7WFZtbo','100101QMqBTl','find','5AsFkGZ','validation','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','trimEnd','contents','20dSEDqO','length','packageBytes','\x0a---\x0a\x0a','displayName','map','toString','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','fileHashes','1930648IcZVsZ','20HhSJyn','keys','join','errors','accessKey','utf8','Runtime\x20Skill\x20package\x20is\x20missing\x20','3089lntJwk','skillName','flow','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','1065816jmvidU','env','---','test','11817684dcEmdW','delete','replace','force','appCode','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','isFile','paths','178UnIPaI','match','entries','displayName:\x20','---\x0a','name','2001864QGRqvH','description:\x20','contentHash','slice','has','stringify','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','path','pulledAt','7415331PKRqdv','.\x20Changed\x20file:\x20'];a103_0x4e97=function(){return _0x44711b;};return a103_0x4e97();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a103_0x1a27(_0x2dbcae,_0x2523ec){_0x2dbcae=_0x2dbcae-0x10f;const _0x4e97a0=a103_0x4e97();let _0x1a2753=_0x4e97a0[_0x2dbcae];return _0x1a2753;}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(_0x6dc0ae,_0x51eecf,_0x25de99){const _0x19cdce=a103_0x1a27,_0x1338f2=requireSkillCode(_0x6dc0ae),_0x82302f=requirePackageBytes(_0x1338f2,_0x25de99[_0x19cdce(0x128)]),_0x434fc9=extractDownloadedPackage(_0x82302f),_0x4f80a6=_0x434fc9['find'](_0x4a8998=>_0x4a8998[_0x19cdce(0x118)]===SKILL_FILE);if(!_0x4f80a6)throw CliErrors[_0x19cdce(0x122)](_0x19cdce(0x136)+SKILL_FILE+':\x20'+_0x1338f2);const _0x588d64=withMaterializedSkillFrontmatter(_0x434fc9,_0x6dc0ae,_0x1338f2),_0x313840=_0x588d64[_0x19cdce(0x120)](_0x2e9495=>_0x2e9495[_0x19cdce(0x118)]===SKILL_FILE),_0x2ab13b=fileText(_0x313840),_0x246998=getRuntimeSkillDir(_0x25de99[_0x19cdce(0x13c)],_0x25de99[_0x19cdce(0x134)],_0x25de99[_0x19cdce(0x143)],_0x51eecf,_0x1338f2,_0x25de99[_0x19cdce(0x146)]),_0x3fa0d1=resolve(_0x246998,SKILL_FILE),_0x13d681=resolve(_0x246998,METADATA_FILE),_0x556060=contentHash(_0x2ab13b),_0x37be66=readMetadataIfPresent(_0x13d681)?.[_0x19cdce(0x12e)];ensurePulledFilesCanBeOverwritten(_0x246998,_0x13d681,_0x588d64,_0x25de99[_0x19cdce(0x142)]===!![]),mkdirSync(_0x246998,{'recursive':!![],'mode':0x1c0});const _0x3fe367=existsSync(_0x3fa0d1)?readFileSync(_0x3fa0d1,'utf8'):undefined;return materializeFiles(_0x246998,_0x588d64),removeStaleManagedFiles(_0x246998,_0x37be66,_0x588d64),writeJsonAtomic(_0x13d681,buildMetadata(_0x6dc0ae,_0x51eecf,_0x25de99[_0x19cdce(0x143)],_0x556060,_0x25de99[_0x19cdce(0x119)],_0x588d64,_0x82302f)),{'skill':_0x6dc0ae,'scope':_0x51eecf,'dir':_0x246998,'skillMdPath':_0x3fa0d1,'metadataPath':_0x13d681,'contentHash':_0x556060,'changed':_0x3fe367!==_0x2ab13b};}function withMaterializedSkillFrontmatter(_0x378021,_0x299714,_0xa24fc7){const _0x9f609e=a103_0x1a27,_0x2d1bb4=skillDisplayName(_0x299714,_0xa24fc7),_0x2e4688=_0x299714[_0x9f609e(0x11c)]?.[_0x9f609e(0x11d)]()||_0x2d1bb4||_0xa24fc7;return normalizeLocalFiles(_0x378021)[_0x9f609e(0x12b)](_0x37d4b7=>{const _0x5746bc=_0x9f609e,_0x1c11b1=fileText(_0x37d4b7);if(_0x37d4b7[_0x5746bc(0x118)]!==SKILL_FILE)return _0x37d4b7;if(hasYamlFrontmatter(_0x1c11b1))return{'path':_0x37d4b7[_0x5746bc(0x118)],'content':withSyncedDisplayName(_0x1c11b1,_0x2d1bb4)};return{'path':_0x37d4b7[_0x5746bc(0x118)],'content':prependSkillFrontmatter(_0x1c11b1,{'name':_0xa24fc7,'displayName':_0x2d1bb4,'description':_0x2e4688})};});}function hasYamlFrontmatter(_0x3d99be){const _0x8fb8ba=a103_0x1a27;return/^\uFEFF?---\s*\r?\n/[_0x8fb8ba(0x13e)](_0x3d99be);}function prependSkillFrontmatter(_0x35da44,_0x3b28d6){const _0x3e8be9=a103_0x1a27,_0x17fcbe=_0x35da44['replace'](/^\uFEFF/,'');return[_0x3e8be9(0x13d),'name:\x20'+yamlString(_0x3b28d6[_0x3e8be9(0x110)]),_0x3b28d6[_0x3e8be9(0x12a)]?_0x3e8be9(0x14a)+yamlString(_0x3b28d6['displayName']):undefined,_0x3e8be9(0x112)+yamlString(_0x3b28d6[_0x3e8be9(0x11c)]),'---','',_0x17fcbe]['filter'](_0x255f75=>_0x255f75!==undefined)[_0x3e8be9(0x132)]('\x0a');}function yamlString(_0x179c3e){const _0x2da5af=a103_0x1a27;return JSON[_0x2da5af(0x116)](_0x179c3e[_0x2da5af(0x141)](/\r/g,'')['trim']());}function skillDisplayName(_0x529ae2,_0x2915df){const _0xfecf03=a103_0x1a27,_0x3a5707=_0x529ae2[_0xfecf03(0x138)]?.['trim']();return _0x3a5707||_0x2915df;}function withSyncedDisplayName(_0x3e73e9,_0x3fbd14){const _0x9e4a49=a103_0x1a27,_0xa363af=_0x3e73e9[_0x9e4a49(0x148)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa363af)return _0x3e73e9;const _0x201be8=_0xa363af[0x1]??'',_0xa180b0=_0xa363af[0x2]??'',_0x44f67e=parseDocument(_0xa180b0);if(_0x44f67e[_0x9e4a49(0x133)]['length']>0x0||!isMap(_0x44f67e[_0x9e4a49(0x125)]))return _0x3e73e9;if(_0x3fbd14)_0x44f67e['set'](_0x9e4a49(0x12a),_0x3fbd14);else{if(_0x44f67e[_0x9e4a49(0x115)](_0x9e4a49(0x12a)))_0x44f67e[_0x9e4a49(0x140)](_0x9e4a49(0x12a));else return _0x3e73e9;}forceBlockCollections(_0x44f67e['contents']);const _0x2ecb0f=_0x44f67e[_0x9e4a49(0x12c)]({'lineWidth':0x0})[_0x9e4a49(0x124)](),_0x21bd28=_0x3e73e9[_0x9e4a49(0x114)](_0xa363af[0x0]['length'])[_0x9e4a49(0x141)](/^\r?\n/,'');return _0x201be8+_0x9e4a49(0x10f)+_0x2ecb0f+_0x9e4a49(0x129)+_0x21bd28;}function forceBlockCollections(_0x497d9f){if(!isNode(_0x497d9f))return;visit(_0x497d9f,(_0x8d16d0,_0x24d9b0)=>{const _0x2c8374=a103_0x1a27;isCollection(_0x24d9b0)&&(_0x24d9b0[_0x2c8374(0x139)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x3d9ec5,_0x530746,_0x5d0d07,_0x4b0c50){const _0xd42a7d=a103_0x1a27;if(_0x4b0c50||!existsSync(_0x530746))return;const _0x2f61ee=readMetadataIfPresent(_0x530746);if(!_0x2f61ee)return;const _0x5621fa=_0x2f61ee[_0xd42a7d(0x12e)]&&Object[_0xd42a7d(0x131)](_0x2f61ee[_0xd42a7d(0x12e)])[_0xd42a7d(0x127)]>0x0?_0x2f61ee[_0xd42a7d(0x12e)]:undefined;if(_0x5621fa)for(const [_0x2311b0,_0x42cf1a]of Object[_0xd42a7d(0x149)](_0x5621fa)){const _0x1075cb=resolveManagedFilePath(_0x3d9ec5,_0x2311b0);if(!existsSync(_0x1075cb))throw CliErrors[_0xd42a7d(0x122)](_0xd42a7d(0x12d)+_0x3d9ec5,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x2311b0);const _0xe10190=lstatSync(_0x1075cb);if(!_0xe10190[_0xd42a7d(0x145)]())throw CliErrors[_0xd42a7d(0x122)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x3d9ec5,_0xd42a7d(0x13a)+_0x2311b0);const _0x39f181=bufferSha256(readFileSync(_0x1075cb));if(_0x39f181!==_0x42cf1a)throw CliErrors[_0xd42a7d(0x122)](_0xd42a7d(0x12d)+_0x3d9ec5+_0xd42a7d(0x11b)+_0x2311b0,_0xd42a7d(0x117)+_0x2311b0);}else{const _0x2a06ec=resolve(_0x3d9ec5,SKILL_FILE);if(existsSync(_0x2a06ec)&&_0x2f61ee[_0xd42a7d(0x113)]){const _0x1ca8cd=contentHash(readFileSync(_0x2a06ec,_0xd42a7d(0x135)));if(_0x1ca8cd!==_0x2f61ee[_0xd42a7d(0x113)])throw CliErrors[_0xd42a7d(0x122)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x2a06ec,_0xd42a7d(0x144));}}for(const _0x19c032 of normalizeLocalFiles(_0x5d0d07)){if(_0x5621fa?.[_0x19c032['path']])continue;if(!_0x5621fa&&_0x19c032[_0xd42a7d(0x118)]===SKILL_FILE)continue;const _0x193f10=resolveManagedFilePath(_0x3d9ec5,_0x19c032[_0xd42a7d(0x118)]);if(!existsSync(_0x193f10))continue;const _0x1efdc4=lstatSync(_0x193f10);if(!_0x1efdc4[_0xd42a7d(0x145)]())throw CliErrors[_0xd42a7d(0x122)](_0xd42a7d(0x12d)+_0x3d9ec5,_0xd42a7d(0x123)+_0x19c032[_0xd42a7d(0x118)]);const _0x551b34=bufferSha256(readFileSync(_0x193f10));if(_0x551b34!==fileHash(_0x19c032))throw CliErrors['validation'](_0xd42a7d(0x12d)+_0x3d9ec5,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x19c032['path']);}}function materializeFiles(_0xca3d61,_0x7f8f4c){const _0x31ea73=a103_0x1a27;for(const _0x5cfc69 of normalizeLocalFiles(_0x7f8f4c)){const _0x4e9f3a=resolveManagedFilePath(_0xca3d61,_0x5cfc69[_0x31ea73(0x118)]);mkdirSync(dirname(_0x4e9f3a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4e9f3a,fileContent(_0x5cfc69),0x180);}}function removeStaleManagedFiles(_0x41e476,_0x345d95,_0x377d1d){const _0x4695e4=a103_0x1a27;if(!_0x345d95)return;const _0x7047f5=new Set(normalizeLocalFiles(_0x377d1d)[_0x4695e4(0x12b)](_0x48163d=>_0x48163d['path']));for(const _0x516d51 of Object[_0x4695e4(0x131)](_0x345d95)){if(_0x7047f5[_0x4695e4(0x115)](_0x516d51))continue;const _0x4570a2=resolveManagedFilePath(_0x41e476,_0x516d51);existsSync(_0x4570a2)&&lstatSync(_0x4570a2)[_0x4695e4(0x145)]()&&rmSync(_0x4570a2,{'force':!![]});}}
@@ -1 +1 @@
1
- function a104_0xd06d(){const _0x5ad9b3=['zipSha256','10QApddw','forkedFromVersion','string','status','Runtime\x20Skill\x20is\x20missing\x20skillCode.','tags','trim','11UfWnLZ','length','forkedFromSkillId','validation','map','skillCode','skillName','toISOString','path','4456VEKFIa','11711080IKsyVx','Invalid\x20','userId','4688TCGzcY','zipSize','manifest','personal','tenantCode','sourceSessionId','fromEntries','version','1698ReoVoF','2126350fvtWVn','files','isArray','ossPath','778506mdPPej','1099mYCYwJ','3192822LkUXEe','hasUpstreamUpdate','93404gcpzLo','description'];a104_0xd06d=function(){return _0x5ad9b3;};return a104_0xd06d();}(function(_0x229ecc,_0x26f9bf){const _0x4b86f5=a104_0x2c47,_0x31fe90=_0x229ecc();while(!![]){try{const _0x3e845f=-parseInt(_0x4b86f5(0x177))/0x1*(parseInt(_0x4b86f5(0x174))/0x2)+-parseInt(_0x4b86f5(0x16b))/0x3*(parseInt(_0x4b86f5(0x187))/0x4)+parseInt(_0x4b86f5(0x16c))/0x5+parseInt(_0x4b86f5(0x170))/0x6+-parseInt(_0x4b86f5(0x171))/0x7*(-parseInt(_0x4b86f5(0x163))/0x8)+-parseInt(_0x4b86f5(0x172))/0x9+-parseInt(_0x4b86f5(0x188))/0xa*(-parseInt(_0x4b86f5(0x17e))/0xb);if(_0x3e845f===_0x26f9bf)break;else _0x31fe90['push'](_0x31fe90['shift']());}catch(_0x445b7b){_0x31fe90['push'](_0x31fe90['shift']());}}}(a104_0xd06d,0x59505));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(_0x55e07a,_0x5901b6,_0x6b7e36,_0x32cb0e,_0x33a0b2,_0x397a6d,_0x376013){const _0x553912=a104_0x2c47,_0x46a954=_0x397a6d?normalizeLocalFiles(_0x397a6d):[],_0x4d508e=!_0x376013&&_0x46a954['length']>0x0?buildSkillPackage(_0x46a954):undefined,_0x3ee3e3=_0x376013?bufferSha256(_0x376013):_0x4d508e?.[_0x553912(0x165)][_0x553912(0x176)],_0xfad316=_0x376013?.[_0x553912(0x17f)]??_0x4d508e?.[_0x553912(0x165)][_0x553912(0x164)],_0x50e65d=_0x46a954[_0x553912(0x17f)]>0x0?Object[_0x553912(0x169)](_0x46a954[_0x553912(0x182)](_0x3ab7e2=>[_0x3ab7e2[_0x553912(0x186)],fileHash(_0x3ab7e2)])):undefined;return{'schemaVersion':_0x46a954[_0x553912(0x17f)]>0x0?0x2:0x1,'id':_0x55e07a['id'],'appCode':_0x6b7e36,'skillCode':requireSkillCode(_0x55e07a),'skillName':_0x55e07a[_0x553912(0x184)],'description':_0x55e07a[_0x553912(0x175)],'scope':_0x5901b6,'readonly':_0x5901b6!==_0x553912(0x166)||_0x55e07a['readonly']===!![],'tenantCode':_0x55e07a[_0x553912(0x167)],'userId':_0x55e07a[_0x553912(0x162)],'version':_0x55e07a[_0x553912(0x16a)],'status':_0x55e07a[_0x553912(0x17a)],'tags':Array[_0x553912(0x16e)](_0x55e07a['tags'])?_0x55e07a[_0x553912(0x17c)]:[],'hasUpstreamUpdate':_0x55e07a[_0x553912(0x173)],'forkedFromSkillId':_0x55e07a[_0x553912(0x180)],'forkedFromVersion':_0x55e07a[_0x553912(0x178)],'sourceSessionId':_0x55e07a[_0x553912(0x168)],'contentHash':_0x32cb0e,'fileHashes':_0x50e65d,'treeHash':_0x46a954[_0x553912(0x17f)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x46a954)):undefined,'ossPath':remoteManifestOssPath(_0x55e07a[_0x553912(0x16d)]),'zipSha256':_0x3ee3e3,'zipSize':_0xfad316,'files':_0x46a954[_0x553912(0x17f)]>0x0?_0x46a954['map'](_0x3d50b4=>({'path':_0x3d50b4['path'],'hash':fileHash(_0x3d50b4),'size':fileContent(_0x3d50b4)[_0x553912(0x17f)]})):undefined,'pulledAt':_0x33a0b2??new Date()[_0x553912(0x185)]()};}function a104_0x2c47(_0x274961,_0x479f09){_0x274961=_0x274961-0x161;const _0xd06d91=a104_0xd06d();let _0x2c4701=_0xd06d91[_0x274961];return _0x2c4701;}export function requireSkillCode(_0x53247f){const _0x65d942=a104_0x2c47,_0x4c7171=_0x53247f[_0x65d942(0x183)]?.['trim']();if(!_0x4c7171)throw CliErrors[_0x65d942(0x181)](_0x65d942(0x17b));return _0x4c7171;}export function readMetadataIfPresent(_0x19e969){const _0x2cfd56=a104_0x2c47;if(!existsSync(_0x19e969))return undefined;try{const _0x2ea332=JSON['parse'](readFileSync(_0x19e969,'utf8'));return _0x2ea332;}catch{throw CliErrors['validation'](_0x2cfd56(0x161)+METADATA_FILE+':\x20'+_0x19e969);}}function remoteManifestOssPath(_0x416da1){const _0x57fb80=a104_0x2c47;if(!_0x416da1||typeof _0x416da1!=='object'||Array[_0x57fb80(0x16e)](_0x416da1))return undefined;const _0x574a13=_0x416da1[_0x57fb80(0x16f)];return typeof _0x574a13===_0x57fb80(0x179)&&_0x574a13[_0x57fb80(0x17d)]()?_0x574a13['trim']():undefined;}
1
+ (function(_0x150808,_0x243690){const _0x58385f=a104_0x1da5,_0x5cfcb8=_0x150808();while(!![]){try{const _0xfcaccf=parseInt(_0x58385f(0x157))/0x1*(-parseInt(_0x58385f(0x14f))/0x2)+parseInt(_0x58385f(0x145))/0x3*(-parseInt(_0x58385f(0x13f))/0x4)+-parseInt(_0x58385f(0x152))/0x5+parseInt(_0x58385f(0x159))/0x6+parseInt(_0x58385f(0x162))/0x7*(-parseInt(_0x58385f(0x156))/0x8)+parseInt(_0x58385f(0x14c))/0x9*(-parseInt(_0x58385f(0x15a))/0xa)+parseInt(_0x58385f(0x142))/0xb;if(_0xfcaccf===_0x243690)break;else _0x5cfcb8['push'](_0x5cfcb8['shift']());}catch(_0x3017f1){_0x5cfcb8['push'](_0x5cfcb8['shift']());}}}(a104_0x57b4,0x614e9));import{existsSync,readFileSync}from'node:fs';function a104_0x1da5(_0x17f5fb,_0x4ce48b){_0x17f5fb=_0x17f5fb-0x13b;const _0x57b48c=a104_0x57b4();let _0x1da590=_0x57b48c[_0x17f5fb];return _0x1da590;}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(_0x360e7e,_0x32046c,_0x1a64fe,_0xfe6a2,_0x150a08,_0x3d2079,_0x334039){const _0x1f227c=a104_0x1da5,_0x147a2b=_0x3d2079?normalizeLocalFiles(_0x3d2079):[],_0x4f3954=!_0x334039&&_0x147a2b[_0x1f227c(0x151)]>0x0?buildSkillPackage(_0x147a2b):undefined,_0x5a8401=_0x334039?bufferSha256(_0x334039):_0x4f3954?.[_0x1f227c(0x163)][_0x1f227c(0x155)],_0x327d9a=_0x334039?.[_0x1f227c(0x151)]??_0x4f3954?.[_0x1f227c(0x163)][_0x1f227c(0x15e)],_0x178aa2=_0x147a2b[_0x1f227c(0x151)]>0x0?Object[_0x1f227c(0x15d)](_0x147a2b[_0x1f227c(0x14b)](_0x4ff2a1=>[_0x4ff2a1['path'],fileHash(_0x4ff2a1)])):undefined;return{'schemaVersion':_0x147a2b[_0x1f227c(0x151)]>0x0?0x2:0x1,'id':_0x360e7e['id'],'appCode':_0x1a64fe,'skillCode':requireSkillCode(_0x360e7e),'skillName':_0x360e7e[_0x1f227c(0x150)],'description':_0x360e7e['description'],'scope':_0x32046c,'readonly':_0x32046c!==_0x1f227c(0x13e)||_0x360e7e[_0x1f227c(0x153)]===!![],'tenantCode':_0x360e7e[_0x1f227c(0x15c)],'userId':_0x360e7e[_0x1f227c(0x147)],'version':_0x360e7e[_0x1f227c(0x14d)],'status':_0x360e7e[_0x1f227c(0x154)],'tags':Array[_0x1f227c(0x13c)](_0x360e7e[_0x1f227c(0x14e)])?_0x360e7e[_0x1f227c(0x14e)]:[],'hasUpstreamUpdate':_0x360e7e['hasUpstreamUpdate'],'forkedFromSkillId':_0x360e7e[_0x1f227c(0x158)],'forkedFromVersion':_0x360e7e[_0x1f227c(0x148)],'sourceSessionId':_0x360e7e[_0x1f227c(0x143)],'contentHash':_0xfe6a2,'fileHashes':_0x178aa2,'treeHash':_0x147a2b['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x147a2b)):undefined,'ossPath':remoteManifestOssPath(_0x360e7e[_0x1f227c(0x141)]),'zipSha256':_0x5a8401,'zipSize':_0x327d9a,'files':_0x147a2b['length']>0x0?_0x147a2b['map'](_0x3a4a52=>({'path':_0x3a4a52[_0x1f227c(0x13b)],'hash':fileHash(_0x3a4a52),'size':fileContent(_0x3a4a52)[_0x1f227c(0x151)]})):undefined,'pulledAt':_0x150a08??new Date()[_0x1f227c(0x140)]()};}export function requireSkillCode(_0x56a1c7){const _0x18fe92=a104_0x1da5,_0x32f043=_0x56a1c7[_0x18fe92(0x144)]?.[_0x18fe92(0x146)]();if(!_0x32f043)throw CliErrors[_0x18fe92(0x15f)](_0x18fe92(0x160));return _0x32f043;}export function readMetadataIfPresent(_0x125078){const _0x31fbd4=a104_0x1da5;if(!existsSync(_0x125078))return undefined;try{const _0x31e8ff=JSON['parse'](readFileSync(_0x125078,_0x31fbd4(0x161)));return _0x31e8ff;}catch{throw CliErrors[_0x31fbd4(0x15f)](_0x31fbd4(0x149)+METADATA_FILE+':\x20'+_0x125078);}}function remoteManifestOssPath(_0x5b7373){const _0x240ac1=a104_0x1da5;if(!_0x5b7373||typeof _0x5b7373!==_0x240ac1(0x13d)||Array[_0x240ac1(0x13c)](_0x5b7373))return undefined;const _0x1a7def=_0x5b7373[_0x240ac1(0x14a)];return typeof _0x1a7def===_0x240ac1(0x15b)&&_0x1a7def['trim']()?_0x1a7def[_0x240ac1(0x146)]():undefined;}function a104_0x57b4(){const _0x42d26d=['trim','userId','forkedFromVersion','Invalid\x20','ossPath','map','100917wuOpYV','version','tags','528072XJYLCD','skillName','length','3859800fTvotY','readonly','status','zipSha256','3488CCwrTk','2ZukrKp','forkedFromSkillId','1318608NlgYzH','230IUyevB','string','tenantCode','fromEntries','zipSize','validation','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','3290hCdfTb','manifest','path','isArray','object','personal','524LgOLRG','toISOString','files','27538621ehbVjm','sourceSessionId','skillCode','12867VzTIZG'];a104_0x57b4=function(){return _0x42d26d;};return a104_0x57b4();}