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

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 (119) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +156 -0
  3. package/lib/cli.js +1 -1
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.js +1 -1
  6. package/lib/commands/app/definitions.js +1 -1
  7. package/lib/commands/app/eligibility.js +1 -1
  8. package/lib/commands/app/mock-loader.js +1 -1
  9. package/lib/commands/app/remote-source.js +1 -1
  10. package/lib/commands/app/shared.js +1 -1
  11. package/lib/commands/app-config/get.js +1 -1
  12. package/lib/commands/app-config/index.js +1 -1
  13. package/lib/commands/app-config/shared.js +1 -1
  14. package/lib/commands/artifact/index.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/index.js +1 -1
  28. package/lib/commands/dataset/detail.js +1 -1
  29. package/lib/commands/dataset/index.js +1 -1
  30. package/lib/commands/dataset/list.js +1 -1
  31. package/lib/commands/dataset/sdk-doc.js +1 -1
  32. package/lib/commands/doctor.js +1 -1
  33. package/lib/commands/file/index.js +1 -1
  34. package/lib/commands/init.js +1 -1
  35. package/lib/commands/kb/index.js +1 -1
  36. package/lib/commands/logs/index.js +1 -1
  37. package/lib/commands/ocr/index.js +1 -1
  38. package/lib/commands/personal-bff/index.js +1 -1
  39. package/lib/commands/registry.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/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/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +18 -2
@@ -1 +1 @@
1
- function a87_0x11d3(_0x263fe2,_0x126385){_0x263fe2=_0x263fe2-0x124;const _0x5595bf=a87_0x5595();let _0x11d37e=_0x5595bf[_0x263fe2];return _0x11d37e;}(function(_0x2efca7,_0x2e0444){const _0x384b3c=a87_0x11d3,_0x40ee46=_0x2efca7();while(!![]){try{const _0x347c97=parseInt(_0x384b3c(0x133))/0x1+-parseInt(_0x384b3c(0x12b))/0x2*(-parseInt(_0x384b3c(0x12e))/0x3)+-parseInt(_0x384b3c(0x134))/0x4+-parseInt(_0x384b3c(0x125))/0x5*(-parseInt(_0x384b3c(0x132))/0x6)+-parseInt(_0x384b3c(0x130))/0x7*(-parseInt(_0x384b3c(0x127))/0x8)+parseInt(_0x384b3c(0x12a))/0x9*(-parseInt(_0x384b3c(0x131))/0xa)+-parseInt(_0x384b3c(0x124))/0xb;if(_0x347c97===_0x2e0444)break;else _0x40ee46['push'](_0x40ee46['shift']());}catch(_0x150739){_0x40ee46['push'](_0x40ee46['shift']());}}}(a87_0x5595,0x2211b));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x1d0f08){const _0x277530=a87_0x11d3;if(_0x1d0f08 instanceof LovrabetError)return CliErrors[_0x277530(0x129)](userFacingLovrabetMessage(_0x1d0f08));return _0x1d0f08;}function a87_0x5595(){const _0x11dbf5=['150biPGAl','214460mvDGXs','287856gDwGbg','2576112vilDCt','230RHUxXg','trim','664zZErcR','string','validation','45xfyzeh','36818lnIRgX','message','stringify','12feSQGE','description','19348TFbdxh','145910KxqKXh'];a87_0x5595=function(){return _0x11dbf5;};return a87_0x5595();}function userFacingLovrabetMessage(_0x3814fc){const _0x1215ac=a87_0x11d3,_0x34265e=_0x3814fc[_0x1215ac(0x12f)];if(_0x34265e!==undefined&&_0x34265e!==null){if(typeof _0x34265e===_0x1215ac(0x128)&&_0x34265e[_0x1215ac(0x126)]())return _0x34265e[_0x1215ac(0x126)]();try{return JSON[_0x1215ac(0x12d)](_0x34265e);}catch{}}return _0x3814fc[_0x1215ac(0x12c)];}
1
+ (function(_0x13140e,_0x15a4d5){const _0x49b7fe=a87_0x2dbe,_0xd4f4d6=_0x13140e();while(!![]){try{const _0x3e1769=parseInt(_0x49b7fe(0x18f))/0x1*(-parseInt(_0x49b7fe(0x198))/0x2)+-parseInt(_0x49b7fe(0x193))/0x3+parseInt(_0x49b7fe(0x194))/0x4+-parseInt(_0x49b7fe(0x18d))/0x5+-parseInt(_0x49b7fe(0x197))/0x6+parseInt(_0x49b7fe(0x192))/0x7*(-parseInt(_0x49b7fe(0x18e))/0x8)+parseInt(_0x49b7fe(0x18c))/0x9;if(_0x3e1769===_0x15a4d5)break;else _0xd4f4d6['push'](_0xd4f4d6['shift']());}catch(_0x58dd70){_0xd4f4d6['push'](_0xd4f4d6['shift']());}}}(a87_0x1e52,0x734c3));function a87_0x1e52(){const _0x7dc607=['652137QvwMMM','352980NWdsrn','validation','trim','2311278qXGxqI','168tjZMfZ','message','16043868ojSYLO','1127635jnRacy','3896WQsnFG','200Chdhou','string','stringify','7959nQhofd'];a87_0x1e52=function(){return _0x7dc607;};return a87_0x1e52();}import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';function a87_0x2dbe(_0x3a4d31,_0x4a58e0){_0x3a4d31=_0x3a4d31-0x18b;const _0x1e5233=a87_0x1e52();let _0x2dbeea=_0x1e5233[_0x3a4d31];return _0x2dbeea;}export function mapUserFacingExecuteError(_0xac7f0b){const _0x11e596=a87_0x2dbe;if(_0xac7f0b instanceof LovrabetError)return CliErrors[_0x11e596(0x195)](userFacingLovrabetMessage(_0xac7f0b));return _0xac7f0b;}function userFacingLovrabetMessage(_0x578af){const _0x8abf5d=a87_0x2dbe,_0x2a509f=_0x578af['description'];if(_0x2a509f!==undefined&&_0x2a509f!==null){if(typeof _0x2a509f===_0x8abf5d(0x190)&&_0x2a509f[_0x8abf5d(0x196)]())return _0x2a509f['trim']();try{return JSON[_0x8abf5d(0x191)](_0x2a509f);}catch{}}return _0x578af[_0x8abf5d(0x18b)];}
@@ -1 +1 @@
1
- const a88_0x492026=a88_0x4c65;(function(_0x69df70,_0x14f573){const _0x4090f5=a88_0x4c65,_0x381311=_0x69df70();while(!![]){try{const _0x1f3c16=parseInt(_0x4090f5(0x13e))/0x1*(-parseInt(_0x4090f5(0x16a))/0x2)+parseInt(_0x4090f5(0x15b))/0x3*(parseInt(_0x4090f5(0x13b))/0x4)+-parseInt(_0x4090f5(0x151))/0x5+-parseInt(_0x4090f5(0x152))/0x6+-parseInt(_0x4090f5(0x131))/0x7*(parseInt(_0x4090f5(0x130))/0x8)+parseInt(_0x4090f5(0x170))/0x9+-parseInt(_0x4090f5(0x149))/0xa*(-parseInt(_0x4090f5(0x15d))/0xb);if(_0x1f3c16===_0x14f573)break;else _0x381311['push'](_0x381311['shift']());}catch(_0x4f32aa){_0x381311['push'](_0x381311['shift']());}}}(a88_0x55bc,0x5e9a0));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a88_0x55bc(){const _0x2ea959=['doctor','currentApp','ClientAk','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','requiresAppCode','90365LzKWHs','564414kmhseh','error','appcode','trim','items','newConfigFileName','Set\x20accessKey\x20in\x20','format','High-risk\x20operation\x20`','3zvGJUW','string','67001gGkprT','../commands/app/remote-source.js','Unknown\x20app:\x20','schema','local-alias','../core/sdk-client.js','APPCODE','service','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','defaultPageSize','object','.appcode\x20to\x20','nonInteractive','2PTeANj','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','env','defaultApp','_notice','has','6965676gSiPxa','appcode\x20\x22','161464zZdBFx','119lmSXqx','name','ACCESS_KEY','app','mergedCli','production','map','requiresAuth','pageSize','../core/api-client.js','216540zAjhdH','catch','cancelled','3631uNIzbn','apiDomain','rawFlags','appCode','update','configMissing','validation','Run\x20`','accessKey','defaultVerbose','appCodeSource','30ynVfgK','\x20\x20To\x20proceed:\x20','\x20or\x20pass\x20'];a88_0x55bc=function(){return _0x2ea959;};return a88_0x55bc();}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';function a88_0x4c65(_0x55205,_0x2c87b5){_0x55205=_0x55205-0x12f;const _0x55bc10=a88_0x55bc();let _0x4c655a=_0x55bc10[_0x55205];return _0x4c655a;}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(_0x650826){const _0x219d8b=a88_0x4c65;return void _0x650826,AUTH_MODE[_0x219d8b(0x14e)];}export function createPipelineEnv(_0x18e33e,_0x87a6bc){const _0x3805e3=a88_0x4c65,_0x43e0ed=typeof _0x87a6bc['app']==='string'&&_0x87a6bc[_0x3805e3(0x134)]['trim']();return{'rawFlags':_0x87a6bc,'appCode':_0x18e33e[_0x3805e3(0x141)]||productEnv('APPCODE')||(_0x43e0ed?undefined:readAppCodeFromConfig()),'appCodeSource':_0x18e33e[_0x3805e3(0x148)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x87a6bc),'defaultFormat':_0x18e33e[_0x3805e3(0x159)],'defaultPageSize':_0x18e33e[_0x3805e3(0x139)],'defaultVerbose':_0x18e33e['verbose'],'riskLevel':_0x18e33e['riskLevel'],'accessKey':_0x18e33e[_0x3805e3(0x146)],'env':_0x18e33e[_0x3805e3(0x16c)],'mergedCli':{'defaultApp':_0x18e33e['defaultApp'],'currentApp':_0x18e33e[_0x3805e3(0x14d)],'appCode':_0x18e33e[_0x3805e3(0x141)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1ef777=>PIPELINE_FLAG_NAMES[a88_0x492026(0x16f)](_0x1ef777[a88_0x492026(0x132)]))[a88_0x492026(0x137)](({name:_0x500535,type:_0x202c3a,description:_0x376bf6})=>({'name':_0x500535,'type':_0x202c3a,'description':_0x376bf6})),'formatOutput':formatOutput,'getCommandLabel'(_0x3b1f04){const _0x11aa7e=a88_0x492026;return CLI_BIN_NAME+'\x20'+_0x3b1f04[_0x11aa7e(0x164)]+'\x20'+_0x3b1f04['command'];},'riskPolicy':{'onViolation'(_0x46f2c9){const _0x5c2c4e=a88_0x492026;console[_0x5c2c4e(0x153)](_0x46f2c9);},'createError'(_0x1a5fde){const _0x4b4acc=a88_0x492026;return CliErrors[_0x4b4acc(0x13d)](_0x1a5fde);}},async 'prepare'(_0x3b493c,_0x1f2d6e){const _0x14e202=a88_0x492026,_0x336ab6=resolveAuthMode(_0x1f2d6e);if(_0x3b493c[_0x14e202(0x138)]!==![]){if(!_0x1f2d6e['accessKey'])throw CliErrors['authRequired'](_0x14e202(0x158)+PRODUCT_CONFIG[_0x14e202(0x157)]+_0x14e202(0x14b)+productEnvName(_0x14e202(0x133))+'.');const {setActiveAK:_0x4a59a6}=await import(_0x14e202(0x13a));_0x4a59a6(_0x1f2d6e[_0x14e202(0x146)]);}let _0x123dbf='';if(_0x3b493c[_0x14e202(0x150)]!==![]){_0x123dbf=_0x1f2d6e[_0x14e202(0x141)]??'',_0x123dbf=await resolveExplicitAppName(_0x3b493c,_0x1f2d6e,_0x123dbf);if(!_0x123dbf){await assertSelectedAppNameIsRuntimeAccessible(_0x3b493c,_0x1f2d6e);throw CliErrors[_0x14e202(0x143)](_0x14e202(0x14f)+PRODUCT_CONFIG[_0x14e202(0x157)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3b493c,_0x1f2d6e,_0x123dbf);}if(_0x123dbf){const {initSdkClient:_0x268fd5}=await import(_0x14e202(0x162));_0x268fd5({'appCode':_0x123dbf,'env':_0x1f2d6e['env']??_0x14e202(0x136),'accessKey':_0x1f2d6e['accessKey'],'authMode':_0x336ab6});}return{'defaults':{'booleans':{'verbose':_0x1f2d6e[_0x14e202(0x147)]},'numbers':{'pagesize':_0x1f2d6e[_0x14e202(0x166)]}},'extras':{'appCode':_0x123dbf,'cookie':'','apiDomain':_0x1f2d6e[_0x14e202(0x13f)],'apiDir':'','accessKey':_0x1f2d6e['accessKey'],'envName':_0x1f2d6e[_0x14e202(0x16c)],'mergedCli':_0x1f2d6e[_0x14e202(0x135)]}};},async 'confirmHighRisk'({def:_0x54d9f8,env:_0x2de1f1,flags:_0xf2c46e,commandLabel:_0xc7f7a1}){const _0x143e7a=a88_0x492026;if(_0x2de1f1['isNonInteractive']){const _0x4f9162=reconstructCommandArgv(_0x54d9f8,_0xf2c46e);throw CliErrors['validation'](_0x143e7a(0x15a)+_0xc7f7a1+_0x143e7a(0x16b)+(_0x143e7a(0x14a)+_0x4f9162));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x54d9f8,_0xc7f7a1,_0xf2c46e),'createCancelledError':_0x91ae82=>CliErrors['cancelled'](_0x91ae82)});},'mapDryRunError'(_0x3269f9){return mapUserFacingExecuteError(_0x3269f9);},'mapExecuteError'(_0x44d9b4){return mapUserFacingExecuteError(_0x44d9b4);},async 'finalize'(){const {clearActiveAK:_0x5b9f13}=await import('../core/api-client.js');_0x5b9f13();}};async function resolveExplicitAppName(_0x41219a,_0xe06cd,_0x575ded){const _0x4a168d=a88_0x492026;if(_0x41219a[_0x4a168d(0x150)]===![])return _0x575ded;const _0x1e180b=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)]==='string'?_0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x134)][_0x4a168d(0x155)]():'';if(!_0x1e180b)return _0x575ded;const _0x28ce6f=typeof _0xe06cd[_0x4a168d(0x140)][_0x4a168d(0x154)]===_0x4a168d(0x15c)&&_0xe06cd[_0x4a168d(0x140)]['appcode'][_0x4a168d(0x155)]()||productEnv(_0x4a168d(0x163));if(_0x28ce6f||_0xe06cd[_0x4a168d(0x148)]===_0x4a168d(0x161))return _0x575ded;const {getRemoteAppList:_0x1f0a93}=await import(_0x4a168d(0x15e)),_0x5c8fc7=await _0x1f0a93({'env':_0xe06cd['env']??'production','accessKey':_0xe06cd['accessKey']}),_0x359ebc=findAppByName(_0x5c8fc7['items'],_0x1e180b);if(_0x359ebc&&!isRuntimeAccessibleApp(_0x359ebc))throw runtimeInaccessibleAppError(_0x359ebc,'\x22'+_0x1e180b+'\x22');const _0x2a1efd=_0x359ebc?.[_0x4a168d(0x141)]?.[_0x4a168d(0x155)]();if(_0x2a1efd)return _0x2a1efd;throw CliErrors[_0x4a168d(0x144)](_0x4a168d(0x15f)+_0x1e180b,_0x4a168d(0x145)+CLI_BIN_NAME+_0x4a168d(0x165)+_0x1e180b+_0x4a168d(0x168)+PRODUCT_CONFIG[_0x4a168d(0x157)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xc8dd1f,_0x38cebe){const _0x558c12=a88_0x492026;if(_0xc8dd1f[_0x558c12(0x150)]===![]||!_0x38cebe['accessKey'])return;const _0x4a27e1=(typeof _0x38cebe['rawFlags']['app']===_0x558c12(0x15c)&&_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)][_0x558c12(0x155)]()?_0x38cebe[_0x558c12(0x140)][_0x558c12(0x134)]:_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x14d)]??_0x38cebe[_0x558c12(0x135)]?.[_0x558c12(0x16d)])?.['trim']();if(!_0x4a27e1)return;const {getRemoteAppList:_0x4ec1ca}=await import(_0x558c12(0x15e)),_0x42c8b7=await _0x4ec1ca({'env':_0x38cebe[_0x558c12(0x16c)]??'production','accessKey':_0x38cebe[_0x558c12(0x146)]}),_0x45fc52=findAppByName(_0x42c8b7[_0x558c12(0x156)],_0x4a27e1);if(_0x45fc52&&!isRuntimeAccessibleApp(_0x45fc52))throw runtimeInaccessibleAppError(_0x45fc52,'\x22'+_0x4a27e1+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x11bc04,_0x3bc1a0,_0x75a17){const _0x5387a1=a88_0x492026;if(_0x11bc04[_0x5387a1(0x150)]===![]||!_0x3bc1a0[_0x5387a1(0x146)])return;const {getRemoteAppList:_0x4f8282}=await import(_0x5387a1(0x15e)),_0x459f3e=await _0x4f8282({'env':_0x3bc1a0[_0x5387a1(0x16c)]??_0x5387a1(0x136),'accessKey':_0x3bc1a0[_0x5387a1(0x146)]}),_0x122c1b=findAppByCode(_0x459f3e['items'],_0x75a17);if(_0x122c1b&&!isRuntimeAccessibleApp(_0x122c1b))throw runtimeInaccessibleAppError(_0x122c1b,_0x5387a1(0x12f)+_0x75a17+'\x22');}export async function runCommand(_0x21466f,_0x693ad7){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x21466f)?withUpdateNotice(_0x21466f):_0x21466f,_0x693ad7,runnerAdapter);}function shouldAttachUpdateNotice(_0x309504){const _0x33e237=a88_0x492026;return![_0x33e237(0x142),_0x33e237(0x160),_0x33e237(0x14c)]['includes'](_0x309504[_0x33e237(0x164)]);}function withUpdateNotice(_0x417dc6){return{..._0x417dc6,async 'execute'(_0x21bd0a){const _0x3e8d1a=a88_0x4c65,_0x41fafb=shouldResolveUpdateNotice(_0x21bd0a)?resolveLatestUpdateNotice()[_0x3e8d1a(0x13c)](()=>null):Promise['resolve'](null),_0x16ab77=await _0x417dc6['execute'](_0x21bd0a);return attachUpdateNotice(_0x16ab77,await _0x41fafb);}};}function shouldResolveUpdateNotice(_0x27cf9d){const _0x38d0f9=a88_0x492026;return _0x27cf9d[_0x38d0f9(0x159)]==='pretty'&&!_0x27cf9d[_0x38d0f9(0x169)];}function attachUpdateNotice(_0x3a3d3a,_0x16b490){const _0x210201=a88_0x492026;if(!_0x16b490||!_0x3a3d3a||typeof _0x3a3d3a!=='object')return _0x3a3d3a;const _0x303fc0=_0x3a3d3a,_0x3552b1=typeof _0x303fc0[_0x210201(0x16e)]===_0x210201(0x167)&&_0x303fc0['_notice']!==null?_0x303fc0[_0x210201(0x16e)]:{};return{..._0x303fc0,'_notice':{..._0x3552b1,'update':_0x16b490}};}
1
+ const a88_0x22e442=a88_0x191f;(function(_0x4bad0c,_0x3fa147){const _0x1a9550=a88_0x191f,_0x4378b8=_0x4bad0c();while(!![]){try{const _0x5980fd=-parseInt(_0x1a9550(0x1a2))/0x1+-parseInt(_0x1a9550(0x19c))/0x2+parseInt(_0x1a9550(0x187))/0x3+-parseInt(_0x1a9550(0x17d))/0x4*(-parseInt(_0x1a9550(0x1a5))/0x5)+-parseInt(_0x1a9550(0x1a7))/0x6*(-parseInt(_0x1a9550(0x1ac))/0x7)+-parseInt(_0x1a9550(0x185))/0x8*(parseInt(_0x1a9550(0x192))/0x9)+parseInt(_0x1a9550(0x188))/0xa;if(_0x5980fd===_0x3fa147)break;else _0x4378b8['push'](_0x4378b8['shift']());}catch(_0x5242b5){_0x4378b8['push'](_0x4378b8['shift']());}}}(a88_0x3709,0xa1a09));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a88_0x3709(){const _0x51b661=['app','14XQxDRl','accessKey','../core/sdk-client.js','defaultVerbose','nonInteractive','Set\x20accessKey\x20in\x20','ClientAk','update','trim','error','doctor','catch','filter','mergedCli','currentApp','verbose','riskLevel','service','120ICkMmH','APPCODE','../core/api-client.js','has','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','_notice','apiDomain','items','205864hOxEjI','string','225789jQCnuk','21112160USCQvh','appCode','object','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','\x20\x20To\x20proceed:\x20','requiresAppCode','configMissing','newConfigFileName','defaultPageSize','pretty','387ZHUqKX','validation','rawFlags','.appcode\x20to\x20','pageSize','High-risk\x20operation\x20`','Unknown\x20app:\x20','appcode\x20\x22','Run\x20`','cancelled','398494FnxtNr','authRequired','local-alias','schema','../commands/app/remote-source.js','execute','1117490mKvhTP','isNonInteractive','appCodeSource','70960RktMeq','production','1419126CgWNxq','env','appcode','format'];a88_0x3709=function(){return _0x51b661;};return a88_0x3709();}import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a88_0x191f(_0x39ad3f,_0x59451a){_0x39ad3f=_0x39ad3f-0x17c;const _0x3709cb=a88_0x3709();let _0x191f8e=_0x3709cb[_0x39ad3f];return _0x191f8e;}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(_0x328e76){const _0x3e3f98=a88_0x191f;return void _0x328e76,AUTH_MODE[_0x3e3f98(0x1b2)];}export function createPipelineEnv(_0x4912d0,_0x3d00ed){const _0x17f9d1=a88_0x191f,_0x5e20e3=typeof _0x3d00ed[_0x17f9d1(0x1ab)]===_0x17f9d1(0x186)&&_0x3d00ed[_0x17f9d1(0x1ab)][_0x17f9d1(0x1b4)]();return{'rawFlags':_0x3d00ed,'appCode':_0x4912d0['appCode']||productEnv('APPCODE')||(_0x5e20e3?undefined:readAppCodeFromConfig()),'appCodeSource':_0x4912d0[_0x17f9d1(0x1a4)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3d00ed),'defaultFormat':_0x4912d0[_0x17f9d1(0x1aa)],'defaultPageSize':_0x4912d0[_0x17f9d1(0x196)],'defaultVerbose':_0x4912d0[_0x17f9d1(0x1bb)],'riskLevel':_0x4912d0[_0x17f9d1(0x1bc)],'accessKey':_0x4912d0[_0x17f9d1(0x1ad)],'env':_0x4912d0[_0x17f9d1(0x1a8)],'mergedCli':{'defaultApp':_0x4912d0['defaultApp'],'currentApp':_0x4912d0['currentApp'],'appCode':_0x4912d0['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x22e442(0x1b8)](_0x381b65=>PIPELINE_FLAG_NAMES[a88_0x22e442(0x180)](_0x381b65['name']))['map'](({name:_0x462ae1,type:_0xb8cb38,description:_0x217861})=>({'name':_0x462ae1,'type':_0xb8cb38,'description':_0x217861})),'formatOutput':formatOutput,'getCommandLabel'(_0x514bdc){const _0x469f48=a88_0x22e442;return CLI_BIN_NAME+'\x20'+_0x514bdc[_0x469f48(0x17c)]+'\x20'+_0x514bdc['command'];},'riskPolicy':{'onViolation'(_0x12da57){const _0x3c8950=a88_0x22e442;console[_0x3c8950(0x1b5)](_0x12da57);},'createError'(_0x500d27){const _0x3268f5=a88_0x22e442;return CliErrors[_0x3268f5(0x19b)](_0x500d27);}},async 'prepare'(_0x8f7f6b,_0x2cd2eb){const _0x18a360=a88_0x22e442,_0x33c7b8=resolveAuthMode(_0x2cd2eb);if(_0x8f7f6b['requiresAuth']!==![]){if(!_0x2cd2eb[_0x18a360(0x1ad)])throw CliErrors[_0x18a360(0x19d)](_0x18a360(0x1b1)+PRODUCT_CONFIG[_0x18a360(0x18f)]+'\x20or\x20pass\x20'+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x35eb7d}=await import(_0x18a360(0x17f));_0x35eb7d(_0x2cd2eb[_0x18a360(0x1ad)]);}let _0x3cb2f5='';if(_0x8f7f6b[_0x18a360(0x18d)]!==![]){_0x3cb2f5=_0x2cd2eb[_0x18a360(0x189)]??'',_0x3cb2f5=await resolveExplicitAppName(_0x8f7f6b,_0x2cd2eb,_0x3cb2f5);if(!_0x3cb2f5){await assertSelectedAppNameIsRuntimeAccessible(_0x8f7f6b,_0x2cd2eb);throw CliErrors[_0x18a360(0x18e)](_0x18a360(0x181)+PRODUCT_CONFIG[_0x18a360(0x18f)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x8f7f6b,_0x2cd2eb,_0x3cb2f5);}if(_0x3cb2f5){const {initSdkClient:_0x17fe8e}=await import(_0x18a360(0x1ae));_0x17fe8e({'appCode':_0x3cb2f5,'env':_0x2cd2eb[_0x18a360(0x1a8)]??'production','accessKey':_0x2cd2eb[_0x18a360(0x1ad)],'authMode':_0x33c7b8});}return{'defaults':{'booleans':{'verbose':_0x2cd2eb[_0x18a360(0x1af)]},'numbers':{'pagesize':_0x2cd2eb[_0x18a360(0x190)]}},'extras':{'appCode':_0x3cb2f5,'cookie':'','apiDomain':_0x2cd2eb[_0x18a360(0x183)],'apiDir':'','accessKey':_0x2cd2eb[_0x18a360(0x1ad)],'envName':_0x2cd2eb['env'],'mergedCli':_0x2cd2eb[_0x18a360(0x1b9)]}};},async 'confirmHighRisk'({def:_0x59c90e,env:_0x186cab,flags:_0x49c6ba,commandLabel:_0x2c7ccd}){const _0x3d0fcc=a88_0x22e442;if(_0x186cab[_0x3d0fcc(0x1a3)]){const _0x2c5c71=reconstructCommandArgv(_0x59c90e,_0x49c6ba);throw CliErrors['validation'](_0x3d0fcc(0x197)+_0x2c7ccd+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x3d0fcc(0x18c)+_0x2c5c71));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x59c90e,_0x2c7ccd,_0x49c6ba),'createCancelledError':_0x3fd27c=>CliErrors[_0x3d0fcc(0x19b)](_0x3fd27c)});},'mapDryRunError'(_0x109aa1){return mapUserFacingExecuteError(_0x109aa1);},'mapExecuteError'(_0x46e5a6){return mapUserFacingExecuteError(_0x46e5a6);},async 'finalize'(){const {clearActiveAK:_0xc06ddd}=await import('../core/api-client.js');_0xc06ddd();}};async function resolveExplicitAppName(_0xfd6cf7,_0x548bc0,_0x4511b1){const _0x5cd99d=a88_0x22e442;if(_0xfd6cf7['requiresAppCode']===![])return _0x4511b1;const _0x2b2079=typeof _0x548bc0[_0x5cd99d(0x194)][_0x5cd99d(0x1ab)]===_0x5cd99d(0x186)?_0x548bc0[_0x5cd99d(0x194)][_0x5cd99d(0x1ab)]['trim']():'';if(!_0x2b2079)return _0x4511b1;const _0x1a84ad=typeof _0x548bc0[_0x5cd99d(0x194)][_0x5cd99d(0x1a9)]===_0x5cd99d(0x186)&&_0x548bc0[_0x5cd99d(0x194)][_0x5cd99d(0x1a9)]['trim']()||productEnv(_0x5cd99d(0x17e));if(_0x1a84ad||_0x548bc0['appCodeSource']===_0x5cd99d(0x19e))return _0x4511b1;const {getRemoteAppList:_0x5c65d6}=await import(_0x5cd99d(0x1a0)),_0x46102a=await _0x5c65d6({'env':_0x548bc0['env']??_0x5cd99d(0x1a6),'accessKey':_0x548bc0['accessKey']}),_0x52841c=findAppByName(_0x46102a[_0x5cd99d(0x184)],_0x2b2079);if(_0x52841c&&!isRuntimeAccessibleApp(_0x52841c))throw runtimeInaccessibleAppError(_0x52841c,'\x22'+_0x2b2079+'\x22');const _0x12876d=_0x52841c?.[_0x5cd99d(0x189)]?.[_0x5cd99d(0x1b4)]();if(_0x12876d)return _0x12876d;throw CliErrors[_0x5cd99d(0x193)](_0x5cd99d(0x198)+_0x2b2079,_0x5cd99d(0x19a)+CLI_BIN_NAME+_0x5cd99d(0x18b)+_0x2b2079+_0x5cd99d(0x195)+PRODUCT_CONFIG[_0x5cd99d(0x18f)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x310ecf,_0x5b3405){const _0x26669b=a88_0x22e442;if(_0x310ecf['requiresAppCode']===![]||!_0x5b3405[_0x26669b(0x1ad)])return;const _0x10719d=(typeof _0x5b3405['rawFlags'][_0x26669b(0x1ab)]===_0x26669b(0x186)&&_0x5b3405['rawFlags'][_0x26669b(0x1ab)]['trim']()?_0x5b3405[_0x26669b(0x194)]['app']:_0x5b3405['mergedCli']?.[_0x26669b(0x1ba)]??_0x5b3405[_0x26669b(0x1b9)]?.['defaultApp'])?.[_0x26669b(0x1b4)]();if(!_0x10719d)return;const {getRemoteAppList:_0x93e1af}=await import('../commands/app/remote-source.js'),_0x36e084=await _0x93e1af({'env':_0x5b3405[_0x26669b(0x1a8)]??_0x26669b(0x1a6),'accessKey':_0x5b3405[_0x26669b(0x1ad)]}),_0x1a24ce=findAppByName(_0x36e084[_0x26669b(0x184)],_0x10719d);if(_0x1a24ce&&!isRuntimeAccessibleApp(_0x1a24ce))throw runtimeInaccessibleAppError(_0x1a24ce,'\x22'+_0x10719d+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x12386c,_0x259358,_0x1c9ad3){const _0x5386a1=a88_0x22e442;if(_0x12386c[_0x5386a1(0x18d)]===![]||!_0x259358['accessKey'])return;const {getRemoteAppList:_0x3bcf8b}=await import(_0x5386a1(0x1a0)),_0x4dc09f=await _0x3bcf8b({'env':_0x259358[_0x5386a1(0x1a8)]??_0x5386a1(0x1a6),'accessKey':_0x259358[_0x5386a1(0x1ad)]}),_0x4a292e=findAppByCode(_0x4dc09f['items'],_0x1c9ad3);if(_0x4a292e&&!isRuntimeAccessibleApp(_0x4a292e))throw runtimeInaccessibleAppError(_0x4a292e,_0x5386a1(0x199)+_0x1c9ad3+'\x22');}export async function runCommand(_0x549cec,_0x48b3d9){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x549cec)?withUpdateNotice(_0x549cec):_0x549cec,_0x48b3d9,runnerAdapter);}function shouldAttachUpdateNotice(_0x432ea3){const _0x3509be=a88_0x22e442;return![_0x3509be(0x1b3),_0x3509be(0x19f),_0x3509be(0x1b6)]['includes'](_0x432ea3[_0x3509be(0x17c)]);}function withUpdateNotice(_0x35d9ae){return{..._0x35d9ae,async 'execute'(_0x436f11){const _0x71bc52=a88_0x191f,_0x1f3cbf=shouldResolveUpdateNotice(_0x436f11)?resolveLatestUpdateNotice()[_0x71bc52(0x1b7)](()=>null):Promise['resolve'](null),_0x2fa881=await _0x35d9ae[_0x71bc52(0x1a1)](_0x436f11);return attachUpdateNotice(_0x2fa881,await _0x1f3cbf);}};}function shouldResolveUpdateNotice(_0x44398c){const _0x725727=a88_0x22e442;return _0x44398c[_0x725727(0x1aa)]===_0x725727(0x191)&&!_0x44398c[_0x725727(0x1b0)];}function attachUpdateNotice(_0x283be9,_0x270dda){const _0x5a99f3=a88_0x22e442;if(!_0x270dda||!_0x283be9||typeof _0x283be9!=='object')return _0x283be9;const _0x1f1e0a=_0x283be9,_0x14a9ad=typeof _0x1f1e0a[_0x5a99f3(0x182)]===_0x5a99f3(0x18a)&&_0x1f1e0a[_0x5a99f3(0x182)]!==null?_0x1f1e0a[_0x5a99f3(0x182)]:{};return{..._0x1f1e0a,'_notice':{..._0x14a9ad,'update':_0x270dda}};}
@@ -1 +1 @@
1
- (function(_0x2dd5d1,_0x794c0f){const _0x19b4a1=a89_0x59a0,_0x48aa43=_0x2dd5d1();while(!![]){try{const _0x309bee=parseInt(_0x19b4a1(0x130))/0x1*(parseInt(_0x19b4a1(0x12a))/0x2)+parseInt(_0x19b4a1(0x12c))/0x3*(-parseInt(_0x19b4a1(0x134))/0x4)+parseInt(_0x19b4a1(0x136))/0x5+-parseInt(_0x19b4a1(0x126))/0x6+-parseInt(_0x19b4a1(0x127))/0x7*(-parseInt(_0x19b4a1(0x129))/0x8)+-parseInt(_0x19b4a1(0x132))/0x9+-parseInt(_0x19b4a1(0x139))/0xa*(-parseInt(_0x19b4a1(0x137))/0xb);if(_0x309bee===_0x794c0f)break;else _0x48aa43['push'](_0x48aa43['shift']());}catch(_0x2d18d0){_0x48aa43['push'](_0x48aa43['shift']());}}}(a89_0x1187,0x36715));import{buildSchemaPayload as a89_0x3bfac}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';function a89_0x1187(){const _0x3f86e1=['7381319TSMaND','requiresAuth','10FtNmRs','auth','2215140SSgChr','294uGsfCH','has','61624cvNwHn','2YuCdpW','services','1187997FlxSzF','none','service','filter','5437wqQmGs','../commands/registry.js','3540411UEdSyj','commands','4McRDoB','map','1907865NIjzxj'];a89_0x1187=function(){return _0x3f86e1;};return a89_0x1187();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x5c0b5f=a89_0x59a0,{serviceRegistry:_0x2e7a95,findDefinition:_0x2a941}=await import(_0x5c0b5f(0x131)),_0x4b11a0=new Set(_0x2e7a95[_0x5c0b5f(0x135)](_0x4c7813=>_0x4c7813[_0x5c0b5f(0x12e)])),_0x370264=listDynamicServiceEntries()[_0x5c0b5f(0x12f)](_0x4fb9e5=>!_0x4b11a0[_0x5c0b5f(0x128)](_0x4fb9e5[_0x5c0b5f(0x12e)])),_0xf1df55=a89_0x3bfac({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x2e7a95,_0x370264),'buildAllFlags':buildAllFlags,'findDefinition':(_0x54ce28,_0x217724)=>_0x2a941(_0x54ce28,_0x217724)??findDynamicServiceDefinition(_0x54ce28,_0x217724)});return normalizeSchemaPayload(_0xf1df55);}function a89_0x59a0(_0x1c27b8,_0x4ea21f){_0x1c27b8=_0x1c27b8-0x126;const _0x1187c3=a89_0x1187();let _0x59a0b9=_0x1187c3[_0x1c27b8];return _0x59a0b9;}function normalizeSchemaPayload(_0x412316){const _0x5844a8=a89_0x59a0;return{..._0x412316,'schemaVersion':0x2,'services':_0x412316[_0x5844a8(0x12b)][_0x5844a8(0x135)](_0x13fe2d=>({..._0x13fe2d,'commands':_0x13fe2d[_0x5844a8(0x133)][_0x5844a8(0x135)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x411838){const _0x267733=a89_0x59a0,_0x134349=_0x411838;return{..._0x411838,'auth':_0x134349[_0x267733(0x13a)]??(_0x411838[_0x267733(0x138)]?'required':_0x267733(0x12d))};}
1
+ function a89_0x480d(){const _0x20fd3d=['590417AvGken','commands','service','../commands/registry.js','94878jhVdNZ','3797420nTcbib','has','341300uuWypg','985710zNKVQg','none','456hfRPGf','562239lphkXw','4439694VxbcSz','requiresAuth','10rwKHeF','required','map','filter','auth','services'];a89_0x480d=function(){return _0x20fd3d;};return a89_0x480d();}(function(_0x52e493,_0x59fa28){const _0x1ab76c=a89_0x34b4,_0x36be77=_0x52e493();while(!![]){try{const _0x2ae2fa=parseInt(_0x1ab76c(0x126))/0x1+parseInt(_0x1ab76c(0x120))/0x2*(parseInt(_0x1ab76c(0x11d))/0x3)+-parseInt(_0x1ab76c(0x12b))/0x4+parseInt(_0x1ab76c(0x12d))/0x5+-parseInt(_0x1ab76c(0x12e))/0x6+parseInt(_0x1ab76c(0x11e))/0x7+parseInt(_0x1ab76c(0x11c))/0x8*(-parseInt(_0x1ab76c(0x12a))/0x9);if(_0x2ae2fa===_0x59fa28)break;else _0x36be77['push'](_0x36be77['shift']());}catch(_0x2c859d){_0x36be77['push'](_0x36be77['shift']());}}}(a89_0x480d,0x7dd7a));import{buildSchemaPayload as a89_0x5bc606}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 _0x448960=a89_0x34b4,{serviceRegistry:_0x52042f,findDefinition:_0x1b1be5}=await import(_0x448960(0x129)),_0x273ad5=new Set(_0x52042f[_0x448960(0x122)](_0x2e3bb5=>_0x2e3bb5[_0x448960(0x128)])),_0x43ec92=listDynamicServiceEntries()[_0x448960(0x123)](_0x4a5a3=>!_0x273ad5[_0x448960(0x12c)](_0x4a5a3['service'])),_0x3cf762=a89_0x5bc606({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x52042f,_0x43ec92),'buildAllFlags':buildAllFlags,'findDefinition':(_0x2122fc,_0x3b02e5)=>_0x1b1be5(_0x2122fc,_0x3b02e5)??findDynamicServiceDefinition(_0x2122fc,_0x3b02e5)});return normalizeSchemaPayload(_0x3cf762);}function normalizeSchemaPayload(_0x453294){const _0x5f3d59=a89_0x34b4;return{..._0x453294,'schemaVersion':0x2,'services':_0x453294[_0x5f3d59(0x125)][_0x5f3d59(0x122)](_0x451a0b=>({..._0x451a0b,'commands':_0x451a0b[_0x5f3d59(0x127)][_0x5f3d59(0x122)](normalizeSchemaCommand)}))};}function a89_0x34b4(_0xf83ede,_0x6992c3){_0xf83ede=_0xf83ede-0x11b;const _0x480ddf=a89_0x480d();let _0x34b477=_0x480ddf[_0xf83ede];return _0x34b477;}function normalizeSchemaCommand(_0x52a4b3){const _0x509647=a89_0x34b4,_0x403cb7=_0x52a4b3;return{..._0x52a4b3,'auth':_0x403cb7[_0x509647(0x124)]??(_0x52a4b3[_0x509647(0x11f)]?_0x509647(0x121):_0x509647(0x11b))};}
@@ -1 +1 @@
1
- function a90_0x40ae(_0x59aa2d,_0x33c50f){_0x59aa2d=_0x59aa2d-0x195;const _0x186d98=a90_0x186d();let _0x40ae1a=_0x186d98[_0x59aa2d];return _0x40ae1a;}(function(_0x309912,_0x53b733){const _0x55c286=a90_0x40ae,_0x59c831=_0x309912();while(!![]){try{const _0x43695a=parseInt(_0x55c286(0x19d))/0x1*(parseInt(_0x55c286(0x19c))/0x2)+-parseInt(_0x55c286(0x197))/0x3+parseInt(_0x55c286(0x1a0))/0x4+-parseInt(_0x55c286(0x1a1))/0x5+-parseInt(_0x55c286(0x19a))/0x6*(-parseInt(_0x55c286(0x19f))/0x7)+-parseInt(_0x55c286(0x195))/0x8*(parseInt(_0x55c286(0x198))/0x9)+parseInt(_0x55c286(0x19e))/0xa;if(_0x43695a===_0x53b733)break;else _0x59c831['push'](_0x59c831['shift']());}catch(_0xb66123){_0x59c831['push'](_0x59c831['shift']());}}}(a90_0x186d,0x5b624));function a90_0x186d(){const _0x3a2b73=['2675280ZjeyEw','14VkOhzv','2641944bWWYwK','3705830fudSPR','8BcflWN','service','840492VqmbXb','1783647VHmJjt','slice','425622gkJOso','length','358wcMQrY','2927TDbWUj'];a90_0x186d=function(){return _0x3a2b73;};return a90_0x186d();}export function insertDynamicServicesAfterServiceTree(_0x3b3c27,_0x56d36b){const _0x393923=a90_0x40ae;if(_0x56d36b[_0x393923(0x19b)]===0x0)return[..._0x3b3c27];const _0x5d362e=_0x3b3c27['findIndex'](_0x2143a0=>_0x2143a0[_0x393923(0x196)]===_0x393923(0x196));if(_0x5d362e<0x0)return[..._0x3b3c27,..._0x56d36b];return[..._0x3b3c27['slice'](0x0,_0x5d362e+0x1),..._0x56d36b,..._0x3b3c27[_0x393923(0x199)](_0x5d362e+0x1)];}
1
+ function a90_0x2c3a(_0x5354f0,_0x5e0c8c){_0x5354f0=_0x5354f0-0x1ac;const _0x1a11cb=a90_0x1a11();let _0x2c3a72=_0x1a11cb[_0x5354f0];return _0x2c3a72;}(function(_0x3e92fd,_0x3ddf99){const _0x158fa6=a90_0x2c3a,_0x1b9061=_0x3e92fd();while(!![]){try{const _0x57d034=parseInt(_0x158fa6(0x1b3))/0x1+parseInt(_0x158fa6(0x1b7))/0x2+-parseInt(_0x158fa6(0x1b1))/0x3*(parseInt(_0x158fa6(0x1b4))/0x4)+-parseInt(_0x158fa6(0x1b6))/0x5*(parseInt(_0x158fa6(0x1ad))/0x6)+-parseInt(_0x158fa6(0x1b8))/0x7*(-parseInt(_0x158fa6(0x1b0))/0x8)+parseInt(_0x158fa6(0x1ae))/0x9*(-parseInt(_0x158fa6(0x1bb))/0xa)+parseInt(_0x158fa6(0x1b5))/0xb*(parseInt(_0x158fa6(0x1ba))/0xc);if(_0x57d034===_0x3ddf99)break;else _0x1b9061['push'](_0x1b9061['shift']());}catch(_0x10f6d5){_0x1b9061['push'](_0x1b9061['shift']());}}}(a90_0x1a11,0x1fca4));export function insertDynamicServicesAfterServiceTree(_0x1450a8,_0xd16a8f){const _0x16114d=a90_0x2c3a;if(_0xd16a8f[_0x16114d(0x1b2)]===0x0)return[..._0x1450a8];const _0x38fdb3=_0x1450a8[_0x16114d(0x1af)](_0x4c59fd=>_0x4c59fd[_0x16114d(0x1ac)]==='service');if(_0x38fdb3<0x0)return[..._0x1450a8,..._0xd16a8f];return[..._0x1450a8[_0x16114d(0x1b9)](0x0,_0x38fdb3+0x1),..._0xd16a8f,..._0x1450a8[_0x16114d(0x1b9)](_0x38fdb3+0x1)];}function a90_0x1a11(){const _0x238a7c=['96RdWBCy','166630CKnytK','service','55992uigXCa','135QvlJng','findIndex','8owkSHo','39ePsuuu','length','41346vjASOY','18812OaheRn','48499nODBmX','55msCUJS','485472jIBRcN','1572158btYBXc','slice'];a90_0x1a11=function(){return _0x238a7c;};return a90_0x1a11();}
@@ -1 +1 @@
1
- (function(_0x1755d4,_0x53333f){var _0x52aec3=a91_0x49be,_0x51cf86=_0x1755d4();while(!![]){try{var _0x3f845b=-parseInt(_0x52aec3(0x90))/0x1+parseInt(_0x52aec3(0x96))/0x2+-parseInt(_0x52aec3(0x95))/0x3*(-parseInt(_0x52aec3(0x8f))/0x4)+parseInt(_0x52aec3(0x8d))/0x5*(-parseInt(_0x52aec3(0x93))/0x6)+parseInt(_0x52aec3(0x8c))/0x7+-parseInt(_0x52aec3(0x92))/0x8*(parseInt(_0x52aec3(0x94))/0x9)+parseInt(_0x52aec3(0x8e))/0xa*(parseInt(_0x52aec3(0x91))/0xb);if(_0x3f845b===_0x53333f)break;else _0x51cf86['push'](_0x51cf86['shift']());}catch(_0x117322){_0x51cf86['push'](_0x51cf86['shift']());}}}(a91_0x40cb,0xea85f));function a91_0x40cb(){var _0x214f06=['2300935kabEqv','5WXYuUv','2870mhsvRU','16ScGuuC','1598989GHkmSt','90541rNJmey','88CgeFxx','7762254xpNrcd','191979Ktugqi','669078FvuEiy','1009680PUEaHa'];a91_0x40cb=function(){return _0x214f06;};return a91_0x40cb();}function a91_0x49be(_0xa26ab3,_0x4459dd){_0xa26ab3=_0xa26ab3-0x8c;var _0x40cbfe=a91_0x40cb();var _0x49bed3=_0x40cbfe[_0xa26ab3];return _0x49bed3;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ (function(_0x2e3b96,_0x4a4ef0){var _0x394627=a91_0x755b,_0x27433d=_0x2e3b96();while(!![]){try{var _0x5e8c0a=-parseInt(_0x394627(0x14f))/0x1+parseInt(_0x394627(0x151))/0x2*(parseInt(_0x394627(0x155))/0x3)+-parseInt(_0x394627(0x14e))/0x4*(parseInt(_0x394627(0x156))/0x5)+-parseInt(_0x394627(0x152))/0x6+-parseInt(_0x394627(0x14d))/0x7*(-parseInt(_0x394627(0x154))/0x8)+parseInt(_0x394627(0x157))/0x9*(-parseInt(_0x394627(0x150))/0xa)+-parseInt(_0x394627(0x153))/0xb*(-parseInt(_0x394627(0x14c))/0xc);if(_0x5e8c0a===_0x4a4ef0)break;else _0x27433d['push'](_0x27433d['shift']());}catch(_0x759060){_0x27433d['push'](_0x27433d['shift']());}}}(a91_0x5212,0x75d4a));function a91_0x755b(_0x200307,_0xa1e51){_0x200307=_0x200307-0x14c;var _0x5212bc=a91_0x5212();var _0x755b1a=_0x5212bc[_0x200307];return _0x755b1a;}function a91_0x5212(){var _0x4885d1=['1849692bkRVtR','15087787tpgwOY','5243352napbfl','21876QezVzl','4174970pHtKzQ','9OkXBYl','24MDErmj','7yjIfIL','4zMyxOB','886733HgHmuS','9443460tmQTAO','16nuuVXj'];a91_0x5212=function(){return _0x4885d1;};return a91_0x5212();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a92_0x51dbf0=a92_0x1783;function a92_0x3be4(){const _0x27f7df=['2VHjFfJ','70awVAIE','12843qyQtvm','2026-07-08T08:37:40.551Z','952065hloLRq','v2.1.9-beta.2','479568pkaWOy','7vQOALR','289068PpBxxH','32URJDUA','232420XpjVYf','2.1.9-beta.2','370a45a','352432HcvfwY','679855hehTlP'];a92_0x3be4=function(){return _0x27f7df;};return a92_0x3be4();}function a92_0x1783(_0x1e6bc5,_0x163835){_0x1e6bc5=_0x1e6bc5-0x100;const _0x3be47d=a92_0x3be4();let _0x178396=_0x3be47d[_0x1e6bc5];return _0x178396;}(function(_0x23877b,_0x717714){const _0x3e17af=a92_0x1783,_0x45241e=_0x23877b();while(!![]){try{const _0x411bc1=parseInt(_0x3e17af(0x10a))/0x1+parseInt(_0x3e17af(0x108))/0x2*(parseInt(_0x3e17af(0x101))/0x3)+parseInt(_0x3e17af(0x102))/0x4*(-parseInt(_0x3e17af(0x103))/0x5)+parseInt(_0x3e17af(0x10e))/0x6+parseInt(_0x3e17af(0x100))/0x7*(parseInt(_0x3e17af(0x106))/0x8)+-parseInt(_0x3e17af(0x10c))/0x9+parseInt(_0x3e17af(0x109))/0xa*(parseInt(_0x3e17af(0x107))/0xb);if(_0x411bc1===_0x717714)break;else _0x45241e['push'](_0x45241e['shift']());}catch(_0x57d3cf){_0x45241e['push'](_0x45241e['shift']());}}}(a92_0x3be4,0x2deff));export const VERSION=a92_0x51dbf0(0x104);export const GIT_TAG=a92_0x51dbf0(0x10d);export const GIT_COMMIT=a92_0x51dbf0(0x105);export const BUILD_TIME=a92_0x51dbf0(0x10b);
1
+ const a92_0x5b3621=a92_0x76bd;(function(_0x100635,_0x26762d){const _0x274341=a92_0x76bd,_0xec6507=_0x100635();while(!![]){try{const _0x44dded=parseInt(_0x274341(0x1bb))/0x1*(-parseInt(_0x274341(0x1b3))/0x2)+-parseInt(_0x274341(0x1b2))/0x3*(parseInt(_0x274341(0x1ba))/0x4)+parseInt(_0x274341(0x1b9))/0x5*(parseInt(_0x274341(0x1be))/0x6)+-parseInt(_0x274341(0x1af))/0x7*(parseInt(_0x274341(0x1b1))/0x8)+-parseInt(_0x274341(0x1b6))/0x9+-parseInt(_0x274341(0x1b8))/0xa*(-parseInt(_0x274341(0x1b5))/0xb)+parseInt(_0x274341(0x1bc))/0xc;if(_0x44dded===_0x26762d)break;else _0xec6507['push'](_0xec6507['shift']());}catch(_0x561b5e){_0xec6507['push'](_0xec6507['shift']());}}}(a92_0x1de9,0x6d6d6));export const VERSION=a92_0x5b3621(0x1b7);export const GIT_TAG=a92_0x5b3621(0x1b4);export const GIT_COMMIT=a92_0x5b3621(0x1b0);function a92_0x76bd(_0x213805,_0x509cd6){_0x213805=_0x213805-0x1af;const _0x1de930=a92_0x1de9();let _0x76bd6f=_0x1de930[_0x213805];return _0x76bd6f;}function a92_0x1de9(){const _0x134533=['7143228ciLwZO','2.1.9-beta.4','70ntOPea','5HNPtae','52cPmnxw','5XcTnMN','5387808ulBaso','2026-07-09T06:33:29.629Z','5043858todmCT','136717xQkksC','fb11c6a','8DBPVkF','9726WAuMsR','126418iQqmiv','v2.1.9-beta.4','518573JIKsoH'];a92_0x1de9=function(){return _0x134533;};return a92_0x1de9();}export const BUILD_TIME=a92_0x5b3621(0x1bd);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x24ee6e,_0x371999){const _0x5dcad4=a93_0x4b76,_0x3c5a3c=_0x24ee6e();while(!![]){try{const _0xce818c=-parseInt(_0x5dcad4(0x18c))/0x1+-parseInt(_0x5dcad4(0x18a))/0x2+-parseInt(_0x5dcad4(0x180))/0x3*(-parseInt(_0x5dcad4(0x185))/0x4)+-parseInt(_0x5dcad4(0x188))/0x5*(parseInt(_0x5dcad4(0x17f))/0x6)+-parseInt(_0x5dcad4(0x187))/0x7+-parseInt(_0x5dcad4(0x189))/0x8+-parseInt(_0x5dcad4(0x182))/0x9*(-parseInt(_0x5dcad4(0x183))/0xa);if(_0xce818c===_0x371999)break;else _0x3c5a3c['push'](_0x3c5a3c['shift']());}catch(_0x3738e0){_0x3c5a3c['push'](_0x3c5a3c['shift']());}}}(a93_0x50b9,0xaaf31));import{jsx as a93_0x413fac,jsxs as a93_0x33d83a}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x4b76(_0x253cea,_0x2c803a){_0x253cea=_0x253cea-0x17f;const _0x50b98c=a93_0x50b9();let _0x4b76c0=_0x50b98c[_0x253cea];return _0x4b76c0;}function a93_0x50b9(){const _0xace8b0=['4056148IRSejw','column','7059451WCseUY','10rnUzps','8246440HDTyLo','1410386igPzKK','\x20--help','260401zkCShf','677874QVKPAy','3CPxTML','green','26253198CIZWSq','10WIiHla','\x20\x20Use\x20'];a93_0x50b9=function(){return _0xace8b0;};return a93_0x50b9();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x51c281=a93_0x4b76,{exit:_0x39e9c3}=useApp();return useEffect(()=>{_0x39e9c3();},[_0x39e9c3]),a93_0x33d83a(Box,{'flexDirection':_0x51c281(0x186),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x413fac(Box,{'children':a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x33d83a(Box,{'marginTop':0x1,'children':[a93_0x413fac(Text,{'dimColor':!![],'children':_0x51c281(0x184)}),a93_0x413fac(Text,{'bold':!![],'color':_0x51c281(0x181),'children':CLI_BIN_NAME+_0x51c281(0x18b)}),a93_0x413fac(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x113e26,_0x437232){const _0x2d4d7d=a93_0x138c,_0x9c3859=_0x113e26();while(!![]){try{const _0x4fc398=parseInt(_0x2d4d7d(0x1d8))/0x1*(parseInt(_0x2d4d7d(0x1e2))/0x2)+-parseInt(_0x2d4d7d(0x1d6))/0x3*(parseInt(_0x2d4d7d(0x1df))/0x4)+parseInt(_0x2d4d7d(0x1da))/0x5+-parseInt(_0x2d4d7d(0x1de))/0x6+-parseInt(_0x2d4d7d(0x1dc))/0x7+-parseInt(_0x2d4d7d(0x1d7))/0x8*(-parseInt(_0x2d4d7d(0x1db))/0x9)+parseInt(_0x2d4d7d(0x1e1))/0xa*(parseInt(_0x2d4d7d(0x1dd))/0xb);if(_0x4fc398===_0x437232)break;else _0x9c3859['push'](_0x9c3859['shift']());}catch(_0x337e1e){_0x9c3859['push'](_0x9c3859['shift']());}}}(a93_0x1199,0x6271c));function a93_0x138c(_0x8c575,_0x4644ff){_0x8c575=_0x8c575-0x1d5;const _0x11991f=a93_0x1199();let _0x138c13=_0x11991f[_0x8c575];return _0x138c13;}import{jsx as a93_0x308087,jsxs as a93_0x78bdc7}from'react/jsx-runtime';function a93_0x1199(){const _0x5ddd32=['6410ZDmysJ','2GkhEfA','column','2031jvMaNP','22072uhWrdz','138683ySFjiC','\x20--help','723965kcGfxY','729tmhjJS','2558444StNkXN','24629omyAdn','3307626QjXitW','3676QiHtJm','green'];a93_0x1199=function(){return _0x5ddd32;};return a93_0x1199();}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x1b719e=a93_0x138c,{exit:_0x5be056}=useApp();return useEffect(()=>{_0x5be056();},[_0x5be056]),a93_0x78bdc7(Box,{'flexDirection':_0x1b719e(0x1d5),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x308087(Box,{'children':a93_0x308087(Text,{'bold':!![],'color':_0x1b719e(0x1e0),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x78bdc7(Box,{'marginTop':0x1,'children':[a93_0x308087(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0x308087(Text,{'bold':!![],'color':_0x1b719e(0x1e0),'children':CLI_BIN_NAME+_0x1b719e(0x1d9)}),a93_0x308087(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
@@ -1 +1 @@
1
- const a94_0x569b3b=a94_0x2abf;(function(_0x53c16a,_0x1bae33){const _0x99ee15=a94_0x2abf,_0x16b17d=_0x53c16a();while(!![]){try{const _0x5eb8c9=-parseInt(_0x99ee15(0x155))/0x1+-parseInt(_0x99ee15(0x151))/0x2+parseInt(_0x99ee15(0x154))/0x3+parseInt(_0x99ee15(0x141))/0x4*(parseInt(_0x99ee15(0x142))/0x5)+-parseInt(_0x99ee15(0x157))/0x6*(parseInt(_0x99ee15(0x14f))/0x7)+parseInt(_0x99ee15(0x152))/0x8*(parseInt(_0x99ee15(0x15a))/0x9)+-parseInt(_0x99ee15(0x145))/0xa*(-parseInt(_0x99ee15(0x158))/0xb);if(_0x5eb8c9===_0x1bae33)break;else _0x16b17d['push'](_0x16b17d['shift']());}catch(_0x4d3750){_0x16b17d['push'](_0x16b17d['shift']());}}}(a94_0x5c64,0x6630d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x47d02c}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x47d02c;function a94_0x2abf(_0xa14ed3,_0x4491e6){_0xa14ed3=_0xa14ed3-0x141;const _0x5c6483=a94_0x5c64();let _0x2abf07=_0x5c6483[_0xa14ed3];return _0x2abf07;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x569b3b(0x143)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x5c64(){const _0x4fc78c=['status','136380skiOGx','npx','add','stdio','trim','exit\x20','stdout','toString','stderr','skills','28QrfpCV','log','538166pTmfwO','64kwnRvs','inherit','2098551ANXoMg','579863BpnNgu','join','322386zRUCvZ','22KNoqiM','pipe','203157JBijMF','56104CsilsF','205McGROJ','skipNpxSkillsEnvSuffix'];a94_0x5c64=function(){return _0x4fc78c;};return a94_0x5c64();}export function runNpxSkillsAddGlobal(_0x24a924,_0x2ff690=LOVRABET_SKILL_SOURCE,_0x3fa8f7){const _0x17f5ca=a94_0x569b3b;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5e86b9=_0x3fa8f7?.[_0x17f5ca(0x148)]??_0x17f5ca(0x153),_0x120ea5=resolveNpmBin(_0x17f5ca(0x146)),_0x30d485=[_0x17f5ca(0x14e),_0x17f5ca(0x147),_0x2ff690,'-g','-y'],_0x3b50c5=[_0x120ea5,..._0x30d485][_0x17f5ca(0x156)]('\x20');console[_0x17f5ca(0x150)]('*\x20'+_0x3b50c5);const _0x2f7227=spawnSync(_0x120ea5,_0x30d485,{'cwd':_0x24a924,'stdio':_0x5e86b9,'env':process.env,'shell':![]});if(_0x2f7227[_0x17f5ca(0x144)]===0x0)return{'ok':!![],'status':0x0};let _0x3a8479=_0x17f5ca(0x14a)+(_0x2f7227[_0x17f5ca(0x144)]??'unknown');if(_0x5e86b9===_0x17f5ca(0x159)){const _0x4a1af4=_0x2f7227[_0x17f5ca(0x14d)]?_0x2f7227['stderr']['toString']()[_0x17f5ca(0x149)]():'',_0x5f4b79=_0x2f7227[_0x17f5ca(0x14b)]?_0x2f7227[_0x17f5ca(0x14b)][_0x17f5ca(0x14c)]()['trim']():'';if(_0x4a1af4)_0x3a8479=_0x4a1af4;else{if(_0x5f4b79)_0x3a8479=_0x5f4b79;}}return{'ok':![],'status':_0x2f7227[_0x17f5ca(0x144)]??null,'error':_0x3a8479};}
1
+ const a94_0xe2f963=a94_0x3ef8;(function(_0x24ec4a,_0x397aa0){const _0x585d96=a94_0x3ef8,_0x243f52=_0x24ec4a();while(!![]){try{const _0x7fab40=parseInt(_0x585d96(0xd5))/0x1+parseInt(_0x585d96(0xe5))/0x2*(-parseInt(_0x585d96(0xe3))/0x3)+-parseInt(_0x585d96(0xd2))/0x4*(parseInt(_0x585d96(0xdd))/0x5)+parseInt(_0x585d96(0xe0))/0x6*(-parseInt(_0x585d96(0xe1))/0x7)+parseInt(_0x585d96(0xdb))/0x8+-parseInt(_0x585d96(0xd3))/0x9+parseInt(_0x585d96(0xd9))/0xa;if(_0x7fab40===_0x397aa0)break;else _0x243f52['push'](_0x243f52['shift']());}catch(_0x2bdf45){_0x243f52['push'](_0x243f52['shift']());}}}(a94_0xc702,0xbabcd));function a94_0xc702(){const _0x10a23a=['7179781EFgoHa','skills','4058946epNjAr','status','2DBZMOk','join','toString','add','618076OBdVQj','9275490OkkWWb','stderr','897638YaLzkm','log','stdout','skipNpxSkillsEnvSuffix','43533290fqmRVL','trim','38544hUtSQL','unknown','35nGpErU','stdio','exit\x20','6JiPezH'];a94_0xc702=function(){return _0x10a23a;};return a94_0xc702();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x155a9e}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x155a9e;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0xe2f963(0xd8)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a94_0x3ef8(_0x110de6,_0x1b0dc5){_0x110de6=_0x110de6-0xcf;const _0xc7021b=a94_0xc702();let _0x3ef876=_0xc7021b[_0x110de6];return _0x3ef876;}export function runNpxSkillsAddGlobal(_0x31f0f3,_0x3ca77f=LOVRABET_SKILL_SOURCE,_0x3f5acb){const _0x414b1a=a94_0xe2f963;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x148280=_0x3f5acb?.[_0x414b1a(0xde)]??'inherit',_0x3be75d=resolveNpmBin('npx'),_0x53410a=[_0x414b1a(0xe2),_0x414b1a(0xd1),_0x3ca77f,'-g','-y'],_0x176975=[_0x3be75d,..._0x53410a][_0x414b1a(0xcf)]('\x20');console[_0x414b1a(0xd6)]('*\x20'+_0x176975);const _0x10f43a=spawnSync(_0x3be75d,_0x53410a,{'cwd':_0x31f0f3,'stdio':_0x148280,'env':process.env,'shell':![]});if(_0x10f43a[_0x414b1a(0xe4)]===0x0)return{'ok':!![],'status':0x0};let _0x30132f=_0x414b1a(0xdf)+(_0x10f43a[_0x414b1a(0xe4)]??_0x414b1a(0xdc));if(_0x148280==='pipe'){const _0x493ddd=_0x10f43a[_0x414b1a(0xd4)]?_0x10f43a[_0x414b1a(0xd4)][_0x414b1a(0xd0)]()[_0x414b1a(0xda)]():'',_0x32b16c=_0x10f43a[_0x414b1a(0xd7)]?_0x10f43a[_0x414b1a(0xd7)][_0x414b1a(0xd0)]()[_0x414b1a(0xda)]():'';if(_0x493ddd)_0x30132f=_0x493ddd;else{if(_0x32b16c)_0x30132f=_0x32b16c;}}return{'ok':![],'status':_0x10f43a[_0x414b1a(0xe4)]??null,'error':_0x30132f};}
@@ -1 +1 @@
1
- function a95_0x2d43(){const _0x57fa0d=['.hg','88OrgfJc','build','coverage','.next','7827183RgBHqW','10jdUkmp','10060xeNxac','dist','8ACwxxj','6mkGHZP','node_modules','SKILL.md','.git','76993EcUZIN','.cache','8481ngyAfh','.svn','660624lpXjtH','1178436hLxzei','.DS_Store','.turbo','5946672yxQmfF','lovrabet.skill.json','13422vzMHmU'];a95_0x2d43=function(){return _0x57fa0d;};return a95_0x2d43();}const a95_0x212497=a95_0x2bdd;(function(_0x4170a9,_0x8788e4){const _0x475a94=a95_0x2bdd,_0x11fb38=_0x4170a9();while(!![]){try{const _0x5f3054=-parseInt(_0x475a94(0x90))/0x1*(-parseInt(_0x475a94(0x85))/0x2)+-parseInt(_0x475a94(0x7f))/0x3*(parseInt(_0x475a94(0x8f))/0x4)+parseInt(_0x475a94(0x8c))/0x5*(parseInt(_0x475a94(0x80))/0x6)+-parseInt(_0x475a94(0x7b))/0x7*(parseInt(_0x475a94(0x87))/0x8)+parseInt(_0x475a94(0x8b))/0x9+parseInt(_0x475a94(0x8d))/0xa*(-parseInt(_0x475a94(0x7d))/0xb)+parseInt(_0x475a94(0x83))/0xc;if(_0x5f3054===_0x8788e4)break;else _0x11fb38['push'](_0x11fb38['shift']());}catch(_0x521b1d){_0x11fb38['push'](_0x11fb38['shift']());}}}(a95_0x2d43,0x709ea));function a95_0x2bdd(_0x4dd300,_0x5e3766){_0x4dd300=_0x4dd300-0x7a;const _0x2d4300=a95_0x2d43();let _0x2bdd6a=_0x2d4300[_0x4dd300];return _0x2bdd6a;}export const METADATA_FILE=a95_0x212497(0x84);export const SKILL_FILE=a95_0x212497(0x92);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x212497(0x81)]);export const IGNORED_DIR_NAMES=new Set([a95_0x212497(0x7a),a95_0x212497(0x86),a95_0x212497(0x7e),a95_0x212497(0x91),a95_0x212497(0x8a),a95_0x212497(0x8e),a95_0x212497(0x88),a95_0x212497(0x89),a95_0x212497(0x82),a95_0x212497(0x7c)]);
1
+ const a95_0x4c0495=a95_0x5c39;function a95_0x5c39(_0x47ae22,_0x2442b2){_0x47ae22=_0x47ae22-0xdb;const _0x14bbf5=a95_0x14bb();let _0x5c395d=_0x14bbf5[_0x47ae22];return _0x5c395d;}function a95_0x14bb(){const _0x5d59c9=['25837kYKFmp','600hgykcp','node_modules','.git','.DS_Store','.hg','16tULBBc','.svn','771586yDBqZP','SKILL.md','lovrabet.skill.json','1142815OthRFg','dist','coverage','4021530gfdyjn','3411729mQzJzl','.turbo','1SgvGcr','791492HjMYRu','189585mQwrmk'];a95_0x14bb=function(){return _0x5d59c9;};return a95_0x14bb();}(function(_0x4f9009,_0x2e63b1){const _0x27a1e2=a95_0x5c39,_0x5ce8ca=_0x4f9009();while(!![]){try{const _0x220f02=parseInt(_0x27a1e2(0xe8))/0x1*(-parseInt(_0x27a1e2(0xdf))/0x2)+parseInt(_0x27a1e2(0xea))/0x3+-parseInt(_0x27a1e2(0xe9))/0x4+parseInt(_0x27a1e2(0xe2))/0x5+-parseInt(_0x27a1e2(0xec))/0x6*(-parseInt(_0x27a1e2(0xeb))/0x7)+-parseInt(_0x27a1e2(0xdd))/0x8*(-parseInt(_0x27a1e2(0xe6))/0x9)+-parseInt(_0x27a1e2(0xe5))/0xa;if(_0x220f02===_0x2e63b1)break;else _0x5ce8ca['push'](_0x5ce8ca['shift']());}catch(_0x17dcba){_0x5ce8ca['push'](_0x5ce8ca['shift']());}}}(a95_0x14bb,0x69c31));export const METADATA_FILE=a95_0x4c0495(0xe1);export const SKILL_FILE=a95_0x4c0495(0xe0);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x4c0495(0xdb)]);export const IGNORED_DIR_NAMES=new Set([a95_0x4c0495(0xee),a95_0x4c0495(0xdc),a95_0x4c0495(0xde),a95_0x4c0495(0xed),'.next',a95_0x4c0495(0xe3),'build',a95_0x4c0495(0xe4),a95_0x4c0495(0xe7),'.cache']);
@@ -1 +1 @@
1
- (function(_0x4893bd,_0x2096c5){const _0x1aa94e=a96_0x5f1e,_0x168a22=_0x4893bd();while(!![]){try{const _0x5d07fd=parseInt(_0x1aa94e(0x16d))/0x1*(parseInt(_0x1aa94e(0x167))/0x2)+-parseInt(_0x1aa94e(0x168))/0x3+-parseInt(_0x1aa94e(0x164))/0x4+parseInt(_0x1aa94e(0x163))/0x5+parseInt(_0x1aa94e(0x165))/0x6+-parseInt(_0x1aa94e(0x162))/0x7+parseInt(_0x1aa94e(0x16a))/0x8*(-parseInt(_0x1aa94e(0x161))/0x9);if(_0x5d07fd===_0x2096c5)break;else _0x168a22['push'](_0x168a22['shift']());}catch(_0x8f6ea7){_0x168a22['push'](_0x168a22['shift']());}}}(a96_0x24b4,0xd6531));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x73d299,_0x48d49c){const _0x8f5ddc=a96_0x5f1e,_0x1f8aa7=normalizeSkillRelativePath(_0x48d49c),_0xe31a65=realOrResolved(_0x73d299),_0x447bd9=resolve(_0xe31a65,..._0x1f8aa7['split']('/'));if(!isPathInside(_0x447bd9,_0xe31a65))throw CliErrors['validation'](_0x8f5ddc(0x16e)+_0x48d49c);return ensureNoSymlinkInManagedPath(_0xe31a65,_0x1f8aa7),_0x447bd9;}export function ensureNoSymlinkInManagedPath(_0x24caf8,_0x510769){const _0x5acad1=a96_0x5f1e;let _0x27a87b=_0x24caf8;for(const _0x1046cb of _0x510769[_0x5acad1(0x16c)]('/')){_0x27a87b=resolve(_0x27a87b,_0x1046cb);const _0x244c75=lstatIfPresent(_0x27a87b);if(_0x244c75?.[_0x5acad1(0x166)]())throw CliErrors['validation'](_0x5acad1(0x15f)+_0x510769);}}export function isDanglingSymlink(_0x347d7a){const _0x71dd58=a96_0x5f1e;try{return lstatSync(_0x347d7a)[_0x71dd58(0x166)]();}catch{return![];}}function a96_0x5f1e(_0x11d69b,_0x101412){_0x11d69b=_0x11d69b-0x15e;const _0x24b4ca=a96_0x24b4();let _0x5f1e00=_0x24b4ca[_0x11d69b];return _0x5f1e00;}export function resolveSymlinkTarget(_0x4180a8){const _0x173a7f=readlinkSync(_0x4180a8);return isAbsolute(_0x173a7f)?_0x173a7f:resolve(dirname(_0x4180a8),_0x173a7f);}export function isPathInside(_0x409455,_0x5a2cf3){const _0x328e29=a96_0x5f1e,_0x502e3b=_0x409455['endsWith'](sep)?_0x409455:''+_0x409455+sep,_0x543965=_0x5a2cf3['endsWith'](sep)?_0x5a2cf3:''+_0x5a2cf3+sep;return _0x409455===_0x5a2cf3||_0x502e3b[_0x328e29(0x169)](_0x543965);}export function realOrResolved(_0xdd9f13){try{return realpathSync(_0xdd9f13);}catch{return resolve(_0xdd9f13);}}export function lstatIfPresent(_0x139421){try{return lstatSync(_0x139421);}catch{return undefined;}}export function writeTextAtomic(_0xc7a174,_0x23d2ec,_0x3946cd){const _0x2bd1f4=a96_0x5f1e;writeBytesAtomic(_0xc7a174,Buffer['from'](_0x23d2ec,_0x2bd1f4(0x160)),_0x3946cd);}export function writeBytesAtomic(_0x28e6a2,_0x4df269,_0x205b38){const _0x281d91=a96_0x5f1e,_0x289262=_0x28e6a2+_0x281d91(0x15e);try{writeFileSync(_0x289262,_0x4df269,{'mode':_0x205b38}),renameSync(_0x289262,_0x28e6a2);}catch(_0x176857){try{rmSync(_0x289262,{'force':!![]});}catch{}throw _0x176857;}}export function writeJsonAtomic(_0xfc23f2,_0x3906af){const _0x36336e=a96_0x5f1e;writeTextAtomic(_0xfc23f2,JSON[_0x36336e(0x16b)](_0x3906af,null,0x2)+'\x0a',0x180);}function a96_0x24b4(){const _0x41c985=['3594246SuyCrm','isSymbolicLink','1506aUCNVz','795855ZZrcIG','startsWith','6808KWwQLi','stringify','split','653ZaGHnl','Unsafe\x20Skill\x20file\x20path:\x20','.tmp','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','utf8','4473YyvSNc','2679999cCecsz','8522715zhWONX','3385324LQSDps'];a96_0x24b4=function(){return _0x41c985;};return a96_0x24b4();}
1
+ (function(_0x58f49c,_0x49bd97){const _0x963b7c=a96_0x3914,_0x119aa9=_0x58f49c();while(!![]){try{const _0x3b5651=parseInt(_0x963b7c(0x106))/0x1+-parseInt(_0x963b7c(0x10e))/0x2+-parseInt(_0x963b7c(0x10c))/0x3*(parseInt(_0x963b7c(0x108))/0x4)+-parseInt(_0x963b7c(0xff))/0x5*(-parseInt(_0x963b7c(0x10d))/0x6)+-parseInt(_0x963b7c(0x109))/0x7*(parseInt(_0x963b7c(0x107))/0x8)+-parseInt(_0x963b7c(0x102))/0x9*(-parseInt(_0x963b7c(0xfd))/0xa)+parseInt(_0x963b7c(0x105))/0xb*(parseInt(_0x963b7c(0x10b))/0xc);if(_0x3b5651===_0x49bd97)break;else _0x119aa9['push'](_0x119aa9['shift']());}catch(_0xd83cba){_0x119aa9['push'](_0x119aa9['shift']());}}}(a96_0x2870,0x7cace));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(_0x28e9d9,_0x2402fa){const _0x3f7e4a=a96_0x3914,_0x4611c6=normalizeSkillRelativePath(_0x2402fa),_0x2cc712=realOrResolved(_0x28e9d9),_0x56a985=resolve(_0x2cc712,..._0x4611c6[_0x3f7e4a(0x10f)]('/'));if(!isPathInside(_0x56a985,_0x2cc712))throw CliErrors[_0x3f7e4a(0x100)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x2402fa);return ensureNoSymlinkInManagedPath(_0x2cc712,_0x4611c6),_0x56a985;}export function ensureNoSymlinkInManagedPath(_0x198a5f,_0x35eae4){const _0x26c4c0=a96_0x3914;let _0xabd1d=_0x198a5f;for(const _0x16f19e of _0x35eae4[_0x26c4c0(0x10f)]('/')){_0xabd1d=resolve(_0xabd1d,_0x16f19e);const _0x1443cc=lstatIfPresent(_0xabd1d);if(_0x1443cc?.[_0x26c4c0(0x103)]())throw CliErrors[_0x26c4c0(0x100)](_0x26c4c0(0x104)+_0x35eae4);}}function a96_0x3914(_0x8e1abb,_0x42a0c4){_0x8e1abb=_0x8e1abb-0xfb;const _0x2870b3=a96_0x2870();let _0x39147a=_0x2870b3[_0x8e1abb];return _0x39147a;}export function isDanglingSymlink(_0xb15d4e){try{return lstatSync(_0xb15d4e)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x17f29b){const _0x469c73=readlinkSync(_0x17f29b);return isAbsolute(_0x469c73)?_0x469c73:resolve(dirname(_0x17f29b),_0x469c73);}function a96_0x2870(){const _0x36375a=['startsWith','4293585RJihms','isSymbolicLink','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','11MTbJVE','573820gfBmUW','352gdDiWg','64FLnphy','33691eIgbWT','endsWith','3162252xpZgPz','29910LBDdUx','3606EgHGby','1080046iRcklM','split','utf8','.tmp','from','10SKdFNu','stringify','895UmQvxt','validation'];a96_0x2870=function(){return _0x36375a;};return a96_0x2870();}export function isPathInside(_0x28164b,_0x1b8822){const _0x2a2d8a=a96_0x3914,_0x2fa747=_0x28164b['endsWith'](sep)?_0x28164b:''+_0x28164b+sep,_0x268ff4=_0x1b8822[_0x2a2d8a(0x10a)](sep)?_0x1b8822:''+_0x1b8822+sep;return _0x28164b===_0x1b8822||_0x2fa747[_0x2a2d8a(0x101)](_0x268ff4);}export function realOrResolved(_0x9fe9ff){try{return realpathSync(_0x9fe9ff);}catch{return resolve(_0x9fe9ff);}}export function lstatIfPresent(_0x524573){try{return lstatSync(_0x524573);}catch{return undefined;}}export function writeTextAtomic(_0x30ba04,_0x1e6d5a,_0x5859c3){const _0x4d207b=a96_0x3914;writeBytesAtomic(_0x30ba04,Buffer[_0x4d207b(0xfc)](_0x1e6d5a,_0x4d207b(0x110)),_0x5859c3);}export function writeBytesAtomic(_0x2a56e4,_0x34ba82,_0x4cee6d){const _0x2facc9=a96_0x3914,_0x38747f=_0x2a56e4+_0x2facc9(0xfb);try{writeFileSync(_0x38747f,_0x34ba82,{'mode':_0x4cee6d}),renameSync(_0x38747f,_0x2a56e4);}catch(_0x4b7908){try{rmSync(_0x38747f,{'force':!![]});}catch{}throw _0x4b7908;}}export function writeJsonAtomic(_0x2412f0,_0x281465){const _0x57679a=a96_0x3914;writeTextAtomic(_0x2412f0,JSON[_0x57679a(0xfe)](_0x281465,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x282ceb,_0x245767){const _0x293ff6=a97_0x3bab,_0x28fbc0=_0x282ceb();while(!![]){try{const _0x1f1ca5=-parseInt(_0x293ff6(0x158))/0x1+parseInt(_0x293ff6(0x160))/0x2*(parseInt(_0x293ff6(0x15b))/0x3)+parseInt(_0x293ff6(0x163))/0x4*(-parseInt(_0x293ff6(0x15f))/0x5)+-parseInt(_0x293ff6(0x161))/0x6+parseInt(_0x293ff6(0x157))/0x7+-parseInt(_0x293ff6(0x15e))/0x8+-parseInt(_0x293ff6(0x15c))/0x9*(-parseInt(_0x293ff6(0x15d))/0xa);if(_0x1f1ca5===_0x245767)break;else _0x28fbc0['push'](_0x28fbc0['shift']());}catch(_0xc1acdf){_0x28fbc0['push'](_0x28fbc0['shift']());}}}(a97_0x155b,0x6bea1));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x22043c){const _0x40a4c4=a97_0x3bab;return createHash(_0x40a4c4(0x165))[_0x40a4c4(0x162)](_0x22043c)[_0x40a4c4(0x164)](_0x40a4c4(0x15a));}function a97_0x155b(){const _0xfe8549=['path','hex','6hxsrEm','2277NJDvGW','30700fKJMPG','6338968zbVuSe','280zHvwzq','639862OJobav','2323494IwdPZt','update','9068nmvwKN','digest','sha256','4923289dsqzPz','371310bqqcMo'];a97_0x155b=function(){return _0xfe8549;};return a97_0x155b();}export function fileHash(_0x2f1dc0){return bufferSha256(fileContent(_0x2f1dc0));}export function bufferSha256(_0x347a52){const _0x8172cf=a97_0x3bab;return createHash('sha256')[_0x8172cf(0x162)](_0x347a52)[_0x8172cf(0x164)](_0x8172cf(0x15a));}function a97_0x3bab(_0x3a5560,_0x243471){_0x3a5560=_0x3a5560-0x157;const _0x155bec=a97_0x155b();let _0x3babc0=_0x155bec[_0x3a5560];return _0x3babc0;}export function fileTreeHash(_0x12d96a){const _0x28d0ce=a97_0x3bab,_0x2dacd8=createHash(_0x28d0ce(0x165));for(const _0x94eff1 of normalizeManifestFiles(_0x12d96a)){_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x159)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](_0x94eff1[_0x28d0ce(0x165)]),_0x2dacd8[_0x28d0ce(0x162)]('\x00'),_0x2dacd8[_0x28d0ce(0x162)](String(_0x94eff1['size'])),_0x2dacd8[_0x28d0ce(0x162)]('\x00');}return _0x2dacd8[_0x28d0ce(0x164)](_0x28d0ce(0x15a));}
1
+ (function(_0x3382f1,_0x1ad538){const _0x4e35f2=a97_0x1223,_0x2be9bd=_0x3382f1();while(!![]){try{const _0x539331=-parseInt(_0x4e35f2(0x1da))/0x1*(-parseInt(_0x4e35f2(0x1ce))/0x2)+parseInt(_0x4e35f2(0x1d7))/0x3*(-parseInt(_0x4e35f2(0x1d2))/0x4)+parseInt(_0x4e35f2(0x1d3))/0x5+-parseInt(_0x4e35f2(0x1d8))/0x6+parseInt(_0x4e35f2(0x1d6))/0x7+parseInt(_0x4e35f2(0x1d4))/0x8+-parseInt(_0x4e35f2(0x1d1))/0x9;if(_0x539331===_0x1ad538)break;else _0x2be9bd['push'](_0x2be9bd['shift']());}catch(_0x1c5f1c){_0x2be9bd['push'](_0x2be9bd['shift']());}}}(a97_0x221b,0x9d191));import{createHash}from'node:crypto';function a97_0x1223(_0xff604d,_0x1b857b){_0xff604d=_0xff604d-0x1cd;const _0x221bf8=a97_0x221b();let _0x122385=_0x221bf8[_0xff604d];return _0x122385;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x54abe7){const _0x5d34d4=a97_0x1223;return createHash(_0x5d34d4(0x1d5))[_0x5d34d4(0x1cf)](_0x54abe7)[_0x5d34d4(0x1d9)](_0x5d34d4(0x1cd));}function a97_0x221b(){const _0x346843=['334QehoYo','update','path','2252493qkEOLt','32ULGhET','1145980ZPnZJs','5913472KVTDuy','sha256','8274483acZlei','386790YZQUVN','1846542WzIeGl','digest','494vkRigL','hex'];a97_0x221b=function(){return _0x346843;};return a97_0x221b();}export function fileHash(_0x79b9c5){return bufferSha256(fileContent(_0x79b9c5));}export function bufferSha256(_0x45a599){const _0x2524d0=a97_0x1223;return createHash(_0x2524d0(0x1d5))['update'](_0x45a599)[_0x2524d0(0x1d9)]('hex');}export function fileTreeHash(_0x2b93a0){const _0x4de6ed=a97_0x1223,_0x4fc2ba=createHash(_0x4de6ed(0x1d5));for(const _0x3a03d7 of normalizeManifestFiles(_0x2b93a0)){_0x4fc2ba['update'](_0x3a03d7[_0x4de6ed(0x1d0)]),_0x4fc2ba['update']('\x00'),_0x4fc2ba[_0x4de6ed(0x1cf)](_0x3a03d7[_0x4de6ed(0x1d5)]),_0x4fc2ba[_0x4de6ed(0x1cf)]('\x00'),_0x4fc2ba[_0x4de6ed(0x1cf)](String(_0x3a03d7['size'])),_0x4fc2ba[_0x4de6ed(0x1cf)]('\x00');}return _0x4fc2ba[_0x4de6ed(0x1d9)](_0x4de6ed(0x1cd));}
@@ -1 +1 @@
1
- (function(_0x52869b,_0x4dea0d){const _0x4bf357=a98_0x1c6d,_0xc2dfd8=_0x52869b();while(!![]){try{const _0x279f14=-parseInt(_0x4bf357(0x1aa))/0x1*(parseInt(_0x4bf357(0x1a6))/0x2)+parseInt(_0x4bf357(0x187))/0x3+-parseInt(_0x4bf357(0x17b))/0x4+-parseInt(_0x4bf357(0x18e))/0x5*(parseInt(_0x4bf357(0x17a))/0x6)+-parseInt(_0x4bf357(0x182))/0x7*(-parseInt(_0x4bf357(0x195))/0x8)+parseInt(_0x4bf357(0x19c))/0x9*(parseInt(_0x4bf357(0x19d))/0xa)+-parseInt(_0x4bf357(0x185))/0xb;if(_0x279f14===_0x4dea0d)break;else _0xc2dfd8['push'](_0xc2dfd8['shift']());}catch(_0xc3c20a){_0xc2dfd8['push'](_0xc2dfd8['shift']());}}}(a98_0x396e,0x603f2));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a98_0x396e(){const _0x530ad5=['Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','agentsSkillsDir','skipped','values','not-managed-symlink','182874PykgAD','43888DvWaBR','contentHash','scope','has','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','startsWith','pruneSkillCodes','623903oSuRMs','env','unchanged','6823047DWscIe','metadata-mismatch','1069641aVBZdB','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','name','activeSkillCodes','scopes','map','5YgwioE','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','validation','skill','get','skillCode','16FkKGpz','push','isSymbolicLink','length','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','isDirectory','builtin','27wfFFRn','1757590MuTJcB','accessKey','slice','removed','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','dir','external-symlink','trim','appCode','3064afFiKO','managedRoot','company','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','4KQMkwq'];a98_0x396e=function(){return _0x530ad5;};return a98_0x396e();}import{basename,dirname,resolve}from'node:path';import a98_0x2ea2c2 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x2ea2c2;export function linkEffectiveRuntimeSkills(_0x5684ea,_0x3de5d0,_0x34740c={}){const _0x48d671=a98_0x1c6d,_0x4d712d=new Map();for(const _0x4cc6ad of _0x5684ea){const _0x4fb5ce=_0x4cc6ad['skill'][_0x48d671(0x194)];if(!_0x4fb5ce)continue;const _0x53fe47=_0x4d712d[_0x48d671(0x193)](_0x4fb5ce);(!_0x53fe47||_0x4cc6ad[_0x48d671(0x17d)]===_0x48d671(0x189))&&_0x4d712d['set'](_0x4fb5ce,_0x4cc6ad);}const _0x176b6a=[],_0x106f0d=resolveSkillSyncPaths(_0x34740c);for(const _0xf03fbe of _0x4d712d[_0x48d671(0x178)]()){const _0x4fb952=requireSkillCode(_0xf03fbe[_0x48d671(0x192)]),_0x490a46=_0x3de5d0+'--'+_0x4fb952;for(const _0x33c545 of runtimeAgentSkillRoots(_0x106f0d)){_0x176b6a[_0x48d671(0x196)](ensureManagedSymlink(resolve(_0x33c545,_0x490a46),_0xf03fbe[_0x48d671(0x1a2)],_0x106f0d[_0x48d671(0x1a7)]));}}return _0x176b6a;}export function pruneStaleRuntimeSkillLinks(_0x5b835d,_0x293280,_0x538fb2={},_0x204ab0){const _0x58e892=a98_0x1c6d,_0x54e4ea=resolveSkillSyncPaths(_0x538fb2),_0x4dded9=new Set([..._0x293280][_0x58e892(0x18d)](_0x298250=>_0x298250[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)),_0x5596d6=_0x204ab0?new Set([..._0x204ab0][_0x58e892(0x18d)](_0x4630e9=>_0x4630e9[_0x58e892(0x1a4)]())[_0x58e892(0x190)](Boolean)):undefined,_0x583a78=[];for(const _0x1651ad of runtimeAgentSkillRoots(_0x54e4ea)){for(const _0x376974 of managedAppSkillLinkPaths(_0x1651ad,_0x5b835d)){const _0x500db4=basename(_0x376974)[_0x58e892(0x19f)]((_0x5b835d+'--')[_0x58e892(0x198)]);if(_0x5596d6&&!_0x5596d6['has'](_0x500db4))continue;if(_0x4dded9['has'](_0x500db4))continue;_0x583a78[_0x58e892(0x196)](removeManagedSkillLink(_0x376974,_0x54e4ea[_0x58e892(0x1a7)]));}}return _0x583a78;}export function pruneStaleRuntimeSkillCache(_0x490815,_0x2b82ce={}){const _0x4465d7=a98_0x1c6d,_0x294d16=new Set([..._0x490815[_0x4465d7(0x18b)]][_0x4465d7(0x18d)](_0x14c69e=>_0x14c69e[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)),_0x51dcd3=_0x490815['pruneSkillCodes']?new Set([..._0x490815[_0x4465d7(0x181)]][_0x4465d7(0x18d)](_0x5a6dc5=>_0x5a6dc5[_0x4465d7(0x1a4)]())[_0x4465d7(0x190)](Boolean)):undefined,_0x1e0f03=_0x490815[_0x4465d7(0x18c)]??[_0x4465d7(0x189),_0x4465d7(0x1a8)],_0x25a383=resolve(getRuntimeSkillCacheRoot(_0x490815[_0x4465d7(0x183)],_0x490815[_0x4465d7(0x19e)],_0x2b82ce),safePathSegment(_0x490815[_0x4465d7(0x1a5)],_0x4465d7(0x1a5))),_0x9cec3d=[];for(const _0x29fe93 of _0x1e0f03){const _0x7dad80=resolve(_0x25a383,_0x29fe93);if(!existsSync(_0x7dad80))continue;for(const _0x31b523 of readdirSync(_0x7dad80,{'withFileTypes':!![]})){if(!_0x31b523['isDirectory']())continue;const _0x24da21=_0x31b523['name'];if(_0x51dcd3&&!_0x51dcd3[_0x4465d7(0x17e)](_0x24da21))continue;if(_0x294d16['has'](_0x24da21))continue;const _0x1cddf5=resolve(_0x7dad80,_0x24da21),_0x4f3858=readMetadataIfPresent(resolve(_0x1cddf5,METADATA_FILE));if(_0x4f3858?.[_0x4465d7(0x1a5)]!==_0x490815['appCode']||_0x4f3858[_0x4465d7(0x17d)]!==_0x29fe93||_0x4f3858[_0x4465d7(0x194)]!==_0x24da21){_0x9cec3d['push']({'path':_0x1cddf5,'action':_0x4465d7(0x177),'reason':_0x4465d7(0x186)});continue;}removeSync(_0x1cddf5),_0x9cec3d[_0x4465d7(0x196)]({'path':_0x1cddf5,'action':'removed'});}}return _0x9cec3d;}export function linkGlobalRuntimeSkills(_0x597de7,_0x49f2e0={}){const _0x30c560=a98_0x1c6d,_0x435e97=resolveSkillSyncPaths(_0x49f2e0),_0x2d5c42=[];for(const _0x37acef of _0x597de7){if(_0x37acef[_0x30c560(0x17d)]!=='builtin')throw CliErrors[_0x30c560(0x191)](_0x30c560(0x1ab)+_0x37acef[_0x30c560(0x17d)]);const _0x4093c1=requireSkillCode(_0x37acef[_0x30c560(0x192)]),_0x4a6c2c=copyManagedSkillDirectory(_0x37acef[_0x30c560(0x1a2)],resolve(_0x435e97[_0x30c560(0x176)],_0x4093c1));_0x2d5c42['push']({..._0x4a6c2c,'contentHash':_0x37acef[_0x30c560(0x17c)]});}return _0x2d5c42;}function ensureManagedSymlink(_0x3bd8e3,_0x6e8270,_0x4df998){const _0xfd4a2b=a98_0x1c6d;mkdirSync(dirname(_0x3bd8e3),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3bd8e3)||isDanglingSymlink(_0x3bd8e3)){const _0x32e5ea=lstatSync(_0x3bd8e3);if(!_0x32e5ea[_0xfd4a2b(0x197)]())throw CliErrors['validation'](_0xfd4a2b(0x1a1)+_0x3bd8e3);const _0x3ff606=resolveSymlinkTarget(_0x3bd8e3);if(!isPathInside(realOrResolved(_0x3ff606),realOrResolved(_0x4df998)))throw CliErrors[_0xfd4a2b(0x191)](_0xfd4a2b(0x1a9)+_0x3bd8e3);if(realOrResolved(_0x3ff606)===realOrResolved(_0x6e8270))return{'path':_0x3bd8e3,'target':_0x6e8270,'action':'unchanged'};return unlinkSync(_0x3bd8e3),symlinkSync(_0x6e8270,_0x3bd8e3,_0xfd4a2b(0x1a2)),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'updated'};}return symlinkSync(_0x6e8270,_0x3bd8e3,'dir'),{'path':_0x3bd8e3,'target':_0x6e8270,'action':'created'};}function managedAppSkillLinkPaths(_0x12ff17,_0x19314f){const _0x15b252=a98_0x1c6d;if(!existsSync(_0x12ff17))return[];const _0x4fff3b=_0x19314f+'--';return readdirSync(_0x12ff17,{'withFileTypes':!![]})[_0x15b252(0x190)](_0x111a33=>_0x111a33[_0x15b252(0x18a)][_0x15b252(0x180)](_0x4fff3b))[_0x15b252(0x18d)](_0x27389e=>resolve(_0x12ff17,_0x27389e[_0x15b252(0x18a)]));}function removeManagedSkillLink(_0x529d36,_0x358c88){const _0x583ab5=a98_0x1c6d,_0x50410a=lstatIfPresent(_0x529d36);if(!_0x50410a?.[_0x583ab5(0x197)]())return{'path':_0x529d36,'action':'skipped','reason':_0x583ab5(0x179)};const _0x54a263=resolveSymlinkTarget(_0x529d36);if(!isPathInside(realOrResolved(_0x54a263),realOrResolved(_0x358c88)))return{'path':_0x529d36,'action':_0x583ab5(0x177),'reason':_0x583ab5(0x1a3)};return unlinkSync(_0x529d36),{'path':_0x529d36,'action':_0x583ab5(0x1a0)};}function a98_0x1c6d(_0x4587dc,_0x1262b1){_0x4587dc=_0x4587dc-0x176;const _0x396e3d=a98_0x396e();let _0x1c6d1e=_0x396e3d[_0x4587dc];return _0x1c6d1e;}export function copyManagedSkillDirectory(_0x4a0db8,_0x4826b0){const _0x5bc075=a98_0x1c6d,_0x1d1e70=resolve(_0x4826b0,METADATA_FILE),_0x41908d=existsSync(_0x4826b0);if(_0x41908d){const _0x184faf=lstatSync(_0x4826b0);if(_0x184faf['isSymbolicLink']())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x17f)+_0x4826b0);if(!_0x184faf[_0x5bc075(0x19a)]())throw CliErrors[_0x5bc075(0x191)](_0x5bc075(0x188)+_0x4826b0);const _0x139a25=readMetadataIfPresent(_0x1d1e70);if(_0x139a25?.[_0x5bc075(0x17d)]!==_0x5bc075(0x19b))throw CliErrors['validation'](_0x5bc075(0x199)+_0x4826b0);}ensureDirSync(dirname(_0x4826b0));const _0x2e8e15=_0x41908d?readMetadataIfPresent(_0x1d1e70)?.['contentHash']:undefined,_0x241912=readMetadataIfPresent(resolve(_0x4a0db8,METADATA_FILE))?.[_0x5bc075(0x17c)];return _0x41908d&&removeSync(_0x4826b0),copySkillDirectory(_0x4a0db8,_0x4826b0),{'path':_0x4826b0,'target':_0x4a0db8,'action':!_0x41908d?'created':_0x2e8e15===_0x241912?_0x5bc075(0x184):'updated'};}function copySkillDirectory(_0x3bfcbe,_0x28c659){copySync(_0x3bfcbe,_0x28c659,{'dereference':![],'overwrite':!![],'filter'(_0x527c15){const _0x46a2c2=a98_0x1c6d;if(lstatSync(_0x527c15)[_0x46a2c2(0x197)]())throw CliErrors[_0x46a2c2(0x191)](_0x46a2c2(0x18f)+_0x527c15);return!![];}});}
1
+ (function(_0x5b62aa,_0x29b03c){const _0x3a7f94=a98_0x14ff,_0x478dab=_0x5b62aa();while(!![]){try{const _0x54d829=parseInt(_0x3a7f94(0x100))/0x1+parseInt(_0x3a7f94(0x117))/0x2*(-parseInt(_0x3a7f94(0x121))/0x3)+parseInt(_0x3a7f94(0x108))/0x4*(-parseInt(_0x3a7f94(0x111))/0x5)+parseInt(_0x3a7f94(0x11c))/0x6+-parseInt(_0x3a7f94(0x122))/0x7*(-parseInt(_0x3a7f94(0xfd))/0x8)+-parseInt(_0x3a7f94(0x10e))/0x9+parseInt(_0x3a7f94(0x107))/0xa;if(_0x54d829===_0x29b03c)break;else _0x478dab['push'](_0x478dab['shift']());}catch(_0x57f9c1){_0x478dab['push'](_0x478dab['shift']());}}}(a98_0x1243,0xd84e1));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x50fb86 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x50fb86;export function linkEffectiveRuntimeSkills(_0x5b1e5d,_0x4b232b,_0x5cb14e={}){const _0x31f043=a98_0x14ff,_0x35b7cc=new Map();for(const _0x10d1e3 of _0x5b1e5d){const _0x2c109c=_0x10d1e3[_0x31f043(0x106)]['skillCode'];if(!_0x2c109c)continue;const _0x1baaf2=_0x35b7cc[_0x31f043(0x120)](_0x2c109c);(!_0x1baaf2||_0x10d1e3['scope']===_0x31f043(0x118))&&_0x35b7cc[_0x31f043(0x10c)](_0x2c109c,_0x10d1e3);}const _0x1baf7f=[],_0x244e99=resolveSkillSyncPaths(_0x5cb14e);for(const _0x11ee8d of _0x35b7cc['values']()){const _0x39347f=requireSkillCode(_0x11ee8d[_0x31f043(0x106)]),_0x55abdc=_0x4b232b+'--'+_0x39347f;for(const _0x569a84 of runtimeAgentSkillRoots(_0x244e99)){_0x1baf7f[_0x31f043(0x127)](ensureManagedSymlink(resolve(_0x569a84,_0x55abdc),_0x11ee8d[_0x31f043(0x10b)],_0x244e99[_0x31f043(0x115)]));}}return _0x1baf7f;}function a98_0x14ff(_0xe65f7b,_0x3021d7){_0xe65f7b=_0xe65f7b-0xf7;const _0x124345=a98_0x1243();let _0x14ffde=_0x124345[_0xe65f7b];return _0x14ffde;}export function pruneStaleRuntimeSkillLinks(_0x54b6d2,_0x4bc60a,_0x3b93fa={},_0xeaa06f){const _0x468462=a98_0x14ff,_0x27b20f=resolveSkillSyncPaths(_0x3b93fa),_0x572268=new Set([..._0x4bc60a][_0x468462(0xfa)](_0x1ebb2d=>_0x1ebb2d[_0x468462(0x123)]())['filter'](Boolean)),_0x2ea8d6=_0xeaa06f?new Set([..._0xeaa06f][_0x468462(0xfa)](_0x203998=>_0x203998[_0x468462(0x123)]())[_0x468462(0x102)](Boolean)):undefined,_0x9952c2=[];for(const _0x349443 of runtimeAgentSkillRoots(_0x27b20f)){for(const _0x1a1d79 of managedAppSkillLinkPaths(_0x349443,_0x54b6d2)){const _0x2436a1=basename(_0x1a1d79)[_0x468462(0xf9)]((_0x54b6d2+'--')['length']);if(_0x2ea8d6&&!_0x2ea8d6[_0x468462(0x116)](_0x2436a1))continue;if(_0x572268[_0x468462(0x116)](_0x2436a1))continue;_0x9952c2[_0x468462(0x127)](removeManagedSkillLink(_0x1a1d79,_0x27b20f['managedRoot']));}}return _0x9952c2;}function a98_0x1243(){const _0xe0ae69=['updated','company','skillCode','3673494vGsnhb','activeSkillCodes','scopes','created','get','3xBZoHj','256914cVaFWi','trim','not-managed-symlink','startsWith','pruneSkillCodes','push','isSymbolicLink','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','slice','map','metadata-mismatch','scope','128ODdFvZ','removed','builtin','1604433lOwKHf','name','filter','env','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','validation','skill','14426760PlRDFB','1048pkYGnF','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','skipped','dir','set','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','13855995aHWyFF','appCode','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','14285IebZhg','contentHash','isDirectory','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','managedRoot','has','2145032qbVDaz','personal'];a98_0x1243=function(){return _0xe0ae69;};return a98_0x1243();}export function pruneStaleRuntimeSkillCache(_0x4e168a,_0x510e8d={}){const _0x3eb51d=a98_0x14ff,_0x44e07a=new Set([..._0x4e168a[_0x3eb51d(0x11d)]][_0x3eb51d(0xfa)](_0x47730e=>_0x47730e[_0x3eb51d(0x123)]())[_0x3eb51d(0x102)](Boolean)),_0x2daaf3=_0x4e168a[_0x3eb51d(0x126)]?new Set([..._0x4e168a[_0x3eb51d(0x126)]][_0x3eb51d(0xfa)](_0x584ae1=>_0x584ae1[_0x3eb51d(0x123)]())[_0x3eb51d(0x102)](Boolean)):undefined,_0x52ced0=_0x4e168a[_0x3eb51d(0x11e)]??[_0x3eb51d(0x118),_0x3eb51d(0x11a)],_0x4c28d1=resolve(getRuntimeSkillCacheRoot(_0x4e168a[_0x3eb51d(0x103)],_0x4e168a['accessKey'],_0x510e8d),safePathSegment(_0x4e168a[_0x3eb51d(0x10f)],_0x3eb51d(0x10f))),_0x50fa81=[];for(const _0x3ced2d of _0x52ced0){const _0x2fad04=resolve(_0x4c28d1,_0x3ced2d);if(!existsSync(_0x2fad04))continue;for(const _0x1fdd93 of readdirSync(_0x2fad04,{'withFileTypes':!![]})){if(!_0x1fdd93[_0x3eb51d(0x113)]())continue;const _0x34cd5a=_0x1fdd93['name'];if(_0x2daaf3&&!_0x2daaf3[_0x3eb51d(0x116)](_0x34cd5a))continue;if(_0x44e07a[_0x3eb51d(0x116)](_0x34cd5a))continue;const _0xd90d31=resolve(_0x2fad04,_0x34cd5a),_0x134250=readMetadataIfPresent(resolve(_0xd90d31,METADATA_FILE));if(_0x134250?.['appCode']!==_0x4e168a[_0x3eb51d(0x10f)]||_0x134250[_0x3eb51d(0xfc)]!==_0x3ced2d||_0x134250[_0x3eb51d(0x11b)]!==_0x34cd5a){_0x50fa81['push']({'path':_0xd90d31,'action':_0x3eb51d(0x10a),'reason':_0x3eb51d(0xfb)});continue;}removeSync(_0xd90d31),_0x50fa81['push']({'path':_0xd90d31,'action':'removed'});}}return _0x50fa81;}export function linkGlobalRuntimeSkills(_0x2d2a3d,_0xbe4fcd={}){const _0x483c9e=a98_0x14ff,_0x3a5396=resolveSkillSyncPaths(_0xbe4fcd),_0x3faf54=[];for(const _0x39b403 of _0x2d2a3d){if(_0x39b403[_0x483c9e(0xfc)]!==_0x483c9e(0xff))throw CliErrors[_0x483c9e(0x105)](_0x483c9e(0x114)+_0x39b403[_0x483c9e(0xfc)]);const _0x257384=requireSkillCode(_0x39b403[_0x483c9e(0x106)]),_0x379015=copyManagedSkillDirectory(_0x39b403[_0x483c9e(0x10b)],resolve(_0x3a5396['agentsSkillsDir'],_0x257384));_0x3faf54[_0x483c9e(0x127)]({..._0x379015,'contentHash':_0x39b403[_0x483c9e(0x112)]});}return _0x3faf54;}function ensureManagedSymlink(_0x5019f4,_0x24ece4,_0x449816){const _0x28972b=a98_0x14ff;mkdirSync(dirname(_0x5019f4),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5019f4)||isDanglingSymlink(_0x5019f4)){const _0x3c599f=lstatSync(_0x5019f4);if(!_0x3c599f['isSymbolicLink']())throw CliErrors['validation'](_0x28972b(0x104)+_0x5019f4);const _0x42110b=resolveSymlinkTarget(_0x5019f4);if(!isPathInside(realOrResolved(_0x42110b),realOrResolved(_0x449816)))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x5019f4);if(realOrResolved(_0x42110b)===realOrResolved(_0x24ece4))return{'path':_0x5019f4,'target':_0x24ece4,'action':'unchanged'};return unlinkSync(_0x5019f4),symlinkSync(_0x24ece4,_0x5019f4,_0x28972b(0x10b)),{'path':_0x5019f4,'target':_0x24ece4,'action':_0x28972b(0x119)};}return symlinkSync(_0x24ece4,_0x5019f4,_0x28972b(0x10b)),{'path':_0x5019f4,'target':_0x24ece4,'action':_0x28972b(0x11f)};}function managedAppSkillLinkPaths(_0x2097a6,_0xfc18b){const _0x5530e9=a98_0x14ff;if(!existsSync(_0x2097a6))return[];const _0x2f5e7f=_0xfc18b+'--';return readdirSync(_0x2097a6,{'withFileTypes':!![]})['filter'](_0x438862=>_0x438862[_0x5530e9(0x101)][_0x5530e9(0x125)](_0x2f5e7f))[_0x5530e9(0xfa)](_0x66d844=>resolve(_0x2097a6,_0x66d844[_0x5530e9(0x101)]));}function removeManagedSkillLink(_0x5d6a67,_0x46c032){const _0x4a5358=a98_0x14ff,_0x3a585f=lstatIfPresent(_0x5d6a67);if(!_0x3a585f?.[_0x4a5358(0xf7)]())return{'path':_0x5d6a67,'action':_0x4a5358(0x10a),'reason':_0x4a5358(0x124)};const _0x52915d=resolveSymlinkTarget(_0x5d6a67);if(!isPathInside(realOrResolved(_0x52915d),realOrResolved(_0x46c032)))return{'path':_0x5d6a67,'action':'skipped','reason':'external-symlink'};return unlinkSync(_0x5d6a67),{'path':_0x5d6a67,'action':_0x4a5358(0xfe)};}export function copyManagedSkillDirectory(_0x4d029c,_0x3f2ec6){const _0x55d47f=a98_0x14ff,_0x243ffd=resolve(_0x3f2ec6,METADATA_FILE),_0x119070=existsSync(_0x3f2ec6);if(_0x119070){const _0x5acdcc=lstatSync(_0x3f2ec6);if(_0x5acdcc[_0x55d47f(0xf7)]())throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0xf8)+_0x3f2ec6);if(!_0x5acdcc['isDirectory']())throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0x10d)+_0x3f2ec6);const _0x1146a9=readMetadataIfPresent(_0x243ffd);if(_0x1146a9?.[_0x55d47f(0xfc)]!==_0x55d47f(0xff))throw CliErrors[_0x55d47f(0x105)](_0x55d47f(0x109)+_0x3f2ec6);}ensureDirSync(dirname(_0x3f2ec6));const _0x3a2a10=_0x119070?readMetadataIfPresent(_0x243ffd)?.[_0x55d47f(0x112)]:undefined,_0x58d8ae=readMetadataIfPresent(resolve(_0x4d029c,METADATA_FILE))?.[_0x55d47f(0x112)];return _0x119070&&removeSync(_0x3f2ec6),copySkillDirectory(_0x4d029c,_0x3f2ec6),{'path':_0x3f2ec6,'target':_0x4d029c,'action':!_0x119070?_0x55d47f(0x11f):_0x3a2a10===_0x58d8ae?'unchanged':_0x55d47f(0x119)};}function copySkillDirectory(_0x5ab4ca,_0x2a60ef){copySync(_0x5ab4ca,_0x2a60ef,{'dereference':![],'overwrite':!![],'filter'(_0x5b3088){const _0x1bb0ce=a98_0x14ff;if(lstatSync(_0x5b3088)['isSymbolicLink']())throw CliErrors['validation'](_0x1bb0ce(0x110)+_0x5b3088);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x4a6921,_0x50bc0e){const _0xcd023=a99_0x4d80,_0x6cce86=_0x4a6921();while(!![]){try{const _0x574950=-parseInt(_0xcd023(0x1ba))/0x1*(-parseInt(_0xcd023(0x1d9))/0x2)+-parseInt(_0xcd023(0x1c5))/0x3+parseInt(_0xcd023(0x1da))/0x4+parseInt(_0xcd023(0x1cd))/0x5+-parseInt(_0xcd023(0x1bd))/0x6+-parseInt(_0xcd023(0x1c3))/0x7*(parseInt(_0xcd023(0x1d7))/0x8)+-parseInt(_0xcd023(0x1d8))/0x9*(-parseInt(_0xcd023(0x1c7))/0xa);if(_0x574950===_0x50bc0e)break;else _0x6cce86['push'](_0x6cce86['shift']());}catch(_0x3e8867){_0x6cce86['push'](_0x6cce86['shift']());}}}(a99_0x3a01,0x354de));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x4d80(_0x515473,_0x15ab1a){_0x515473=_0x515473-0x1b0;const _0x3a0156=a99_0x3a01();let _0x4d8019=_0x3a0156[_0x515473];return _0x4d8019;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x34b213,_0x23baed={}){const _0x9df0dd=a99_0x4d80,_0x45ff72=safePathSegment(_0x34b213[_0x9df0dd(0x1b6)],_0x9df0dd(0x1b6)),_0x2a0200=normalizeRuntimeSkillScopes(_0x34b213[_0x9df0dd(0x1d6)]),_0x22a4fd=new Set(_0x2a0200),_0x1952fa=_0x34b213[_0x9df0dd(0x1b0)]?.[_0x9df0dd(0x1bf)](),_0x57292f=new Map(),_0x4d99fb=resolve(getRuntimeSkillCacheRoot(_0x34b213[_0x9df0dd(0x1c2)],_0x34b213['accessKey'],_0x23baed),_0x45ff72);for(const _0x56d3d7 of _0x2a0200){for(const _0xda4456 of localSkillEntryDirs(resolve(_0x4d99fb,_0x56d3d7))){collectLocalRuntimeSkill(_0x57292f,_0xda4456,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1cb)});}}const _0x266322=resolveSkillSyncPaths(_0x23baed);for(const _0xce76da of runtimeAgentSkillRoots(_0x266322)){for(const _0x50dee4 of localSkillLinkCandidates(_0xce76da,_0x45ff72,_0x22a4fd)){collectLocalRuntimeSkill(_0x57292f,_0x50dee4,{'appCode':_0x45ff72,'scopes':_0x22a4fd,'code':_0x1952fa,'source':_0x9df0dd(0x1d0),'linkedPath':_0x50dee4});}}return Array[_0x9df0dd(0x1b7)](_0x57292f['values']())[_0x9df0dd(0x1d1)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49e623){const _0x39d16b=a99_0x4d80;if(!existsSync(_0x49e623))return[];return readdirSync(_0x49e623,{'withFileTypes':!![]})['filter'](_0x1316bd=>_0x1316bd['isDirectory']()||_0x1316bd[_0x39d16b(0x1cf)]())[_0x39d16b(0x1d5)](_0x205ef0=>resolve(_0x49e623,_0x205ef0[_0x39d16b(0x1d3)]));}function localSkillLinkCandidates(_0x41bdea,_0x56790d,_0x21fcf7){const _0x2f2924=a99_0x4d80;if(!existsSync(_0x41bdea))return[];const _0xc9693f=_0x56790d+'--';return readdirSync(_0x41bdea,{'withFileTypes':!![]})[_0x2f2924(0x1b5)](_0x134cdd=>_0x134cdd[_0x2f2924(0x1d2)]()||_0x134cdd[_0x2f2924(0x1cf)]())['filter'](_0x306db7=>_0x306db7[_0x2f2924(0x1d3)][_0x2f2924(0x1b2)](_0xc9693f)||_0x21fcf7[_0x2f2924(0x1ce)](_0x2f2924(0x1b3)))[_0x2f2924(0x1d5)](_0x4afa1b=>resolve(_0x41bdea,_0x4afa1b['name']));}function collectLocalRuntimeSkill(_0x2cdec6,_0x3f5db6,_0x137bb3){const _0x359bd8=a99_0x4d80,_0x41165d=resolve(_0x3f5db6,METADATA_FILE),_0x1662e3=readMetadataIfPresent(_0x41165d);if(!_0x1662e3)return;if(_0x1662e3[_0x359bd8(0x1b6)]!==_0x137bb3[_0x359bd8(0x1b6)])return;if(!isRuntimeSkillScope(_0x1662e3[_0x359bd8(0x1b8)])||!_0x137bb3[_0x359bd8(0x1d6)]['has'](_0x1662e3['scope']))return;const _0xa59fa4=_0x1662e3[_0x359bd8(0x1bc)]?.['trim']();if(!_0xa59fa4)return;if(_0x137bb3[_0x359bd8(0x1b0)]&&_0xa59fa4!==_0x137bb3['code'])return;const _0x153b25=_0x1662e3[_0x359bd8(0x1b8)]+':'+_0xa59fa4,_0x5bdccf=_0x137bb3['linkedPath']?[_0x137bb3[_0x359bd8(0x1c9)]]:[],_0x53490b=_0x2cdec6[_0x359bd8(0x1c1)](_0x153b25);if(_0x53490b){_0x137bb3[_0x359bd8(0x1ca)]===_0x359bd8(0x1cb)&&(_0x53490b[_0x359bd8(0x1c0)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1cc)]=_0x3f5db6,_0x53490b[_0x359bd8(0x1be)]=resolve(_0x3f5db6,SKILL_FILE),_0x53490b['metadataPath']=_0x41165d);for(const _0x488030 of _0x5bdccf){!_0x53490b[_0x359bd8(0x1c8)][_0x359bd8(0x1c4)](_0x488030)&&_0x53490b['linkedPaths'][_0x359bd8(0x1d4)](_0x488030);}_0x53490b[_0x359bd8(0x1c8)]['sort']();return;}_0x2cdec6[_0x359bd8(0x1c6)](_0x153b25,{..._0x1662e3,'tags':Array[_0x359bd8(0x1b9)](_0x1662e3[_0x359bd8(0x1b1)])?_0x1662e3[_0x359bd8(0x1b1)]:[],'scope':_0x1662e3[_0x359bd8(0x1b8)],'source':_0x359bd8(0x1b4),'dir':_0x3f5db6,'cacheDir':_0x137bb3[_0x359bd8(0x1ca)]==='cache'?_0x3f5db6:undefined,'skillMdPath':resolve(_0x3f5db6,SKILL_FILE),'metadataPath':_0x41165d,'linkedPaths':_0x5bdccf});}function a99_0x3a01(){const _0x34a124=['local','filter','appCode','from','scope','isArray','208309RtPOYa','localeCompare','skillCode','1033890MZKZix','skillMdPath','trim','dir','get','env','21UKsVgl','includes','644325agsTZt','set','10MmzePs','linkedPaths','linkedPath','source','cache','cacheDir','770440MDivNj','has','isSymbolicLink','link','sort','isDirectory','name','push','map','scopes','929176TqHTAc','1778049GNjoZj','2WtMZBN','1575628eXpyVh','code','tags','startsWith','builtin'];a99_0x3a01=function(){return _0x34a124;};return a99_0x3a01();}function compareLocalRuntimeSkills(_0x48075b,_0x5591f5){const _0x26604d=a99_0x4d80,_0x5cf6be={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5cf6be[_0x48075b[_0x26604d(0x1b8)]]-_0x5cf6be[_0x5591f5['scope']]||_0x48075b[_0x26604d(0x1bc)][_0x26604d(0x1bb)](_0x5591f5[_0x26604d(0x1bc)])||_0x48075b[_0x26604d(0x1c0)][_0x26604d(0x1bb)](_0x5591f5['dir']);}
1
+ (function(_0x54ed89,_0x190cb6){const _0x5dde46=a99_0x2cbf,_0x2664e2=_0x54ed89();while(!![]){try{const _0x256825=-parseInt(_0x5dde46(0x19e))/0x1*(parseInt(_0x5dde46(0x186))/0x2)+-parseInt(_0x5dde46(0x18a))/0x3+parseInt(_0x5dde46(0x193))/0x4*(parseInt(_0x5dde46(0x195))/0x5)+-parseInt(_0x5dde46(0x1a3))/0x6+-parseInt(_0x5dde46(0x182))/0x7*(parseInt(_0x5dde46(0x190))/0x8)+parseInt(_0x5dde46(0x18c))/0x9+-parseInt(_0x5dde46(0x187))/0xa*(-parseInt(_0x5dde46(0x1a2))/0xb);if(_0x256825===_0x190cb6)break;else _0x2664e2['push'](_0x2664e2['shift']());}catch(_0x477d86){_0x2664e2['push'](_0x2664e2['shift']());}}}(a99_0x4110,0x61eac));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a99_0x4110(){const _0x56bb6f=['code','linkedPath','35iGzLlX','isArray','tags','has','175942dCWOkc','1140fGiuIH','scope','builtin','1517424sKDVpO','skillCode','3221388HuxnOk','startsWith','scopes','from','1012040mmWROl','appCode','cacheDir','201964viyxdD','filter','55IMXNmR','includes','set','get','dir','name','env','source','sort','2hpGZrs','cache','map','push','110022oRYkwI','2029308VGcXYq','localeCompare','link','isDirectory','isSymbolicLink','local','linkedPaths'];a99_0x4110=function(){return _0x56bb6f;};return a99_0x4110();}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x705c65,_0x12e6dd={}){const _0x4190dd=a99_0x2cbf,_0x5735d5=safePathSegment(_0x705c65[_0x4190dd(0x191)],'appCode'),_0x14c793=normalizeRuntimeSkillScopes(_0x705c65[_0x4190dd(0x18e)]),_0x3b23f6=new Set(_0x14c793),_0x4113c3=_0x705c65[_0x4190dd(0x180)]?.['trim'](),_0x276ca6=new Map(),_0x7669d3=resolve(getRuntimeSkillCacheRoot(_0x705c65[_0x4190dd(0x19b)],_0x705c65['accessKey'],_0x12e6dd),_0x5735d5);for(const _0x511c1a of _0x14c793){for(const _0x159da0 of localSkillEntryDirs(resolve(_0x7669d3,_0x511c1a))){collectLocalRuntimeSkill(_0x276ca6,_0x159da0,{'appCode':_0x5735d5,'scopes':_0x3b23f6,'code':_0x4113c3,'source':_0x4190dd(0x19f)});}}const _0x3e6ad1=resolveSkillSyncPaths(_0x12e6dd);for(const _0x243c41 of runtimeAgentSkillRoots(_0x3e6ad1)){for(const _0x340629 of localSkillLinkCandidates(_0x243c41,_0x5735d5,_0x3b23f6)){collectLocalRuntimeSkill(_0x276ca6,_0x340629,{'appCode':_0x5735d5,'scopes':_0x3b23f6,'code':_0x4113c3,'source':_0x4190dd(0x1a5),'linkedPath':_0x340629});}}return Array[_0x4190dd(0x18f)](_0x276ca6['values']())[_0x4190dd(0x19d)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x38d141){const _0x1af525=a99_0x2cbf;if(!existsSync(_0x38d141))return[];return readdirSync(_0x38d141,{'withFileTypes':!![]})[_0x1af525(0x194)](_0x2ae780=>_0x2ae780['isDirectory']()||_0x2ae780[_0x1af525(0x17d)]())[_0x1af525(0x1a0)](_0x106a8b=>resolve(_0x38d141,_0x106a8b[_0x1af525(0x19a)]));}function localSkillLinkCandidates(_0x2a5bcf,_0x57fe90,_0x1f2a21){const _0x50b9d3=a99_0x2cbf;if(!existsSync(_0x2a5bcf))return[];const _0x1866f5=_0x57fe90+'--';return readdirSync(_0x2a5bcf,{'withFileTypes':!![]})[_0x50b9d3(0x194)](_0x908a6a=>_0x908a6a[_0x50b9d3(0x1a6)]()||_0x908a6a['isSymbolicLink']())['filter'](_0x14f84c=>_0x14f84c[_0x50b9d3(0x19a)][_0x50b9d3(0x18d)](_0x1866f5)||_0x1f2a21['has'](_0x50b9d3(0x189)))[_0x50b9d3(0x1a0)](_0x45a556=>resolve(_0x2a5bcf,_0x45a556[_0x50b9d3(0x19a)]));}function collectLocalRuntimeSkill(_0x5116b2,_0x29df67,_0x2cee7d){const _0x5270f7=a99_0x2cbf,_0x4c9b8d=resolve(_0x29df67,METADATA_FILE),_0x265258=readMetadataIfPresent(_0x4c9b8d);if(!_0x265258)return;if(_0x265258[_0x5270f7(0x191)]!==_0x2cee7d[_0x5270f7(0x191)])return;if(!isRuntimeSkillScope(_0x265258['scope'])||!_0x2cee7d['scopes'][_0x5270f7(0x185)](_0x265258[_0x5270f7(0x188)]))return;const _0x189f6e=_0x265258[_0x5270f7(0x18b)]?.['trim']();if(!_0x189f6e)return;if(_0x2cee7d[_0x5270f7(0x180)]&&_0x189f6e!==_0x2cee7d[_0x5270f7(0x180)])return;const _0x5a9a9f=_0x265258[_0x5270f7(0x188)]+':'+_0x189f6e,_0x259f61=_0x2cee7d[_0x5270f7(0x181)]?[_0x2cee7d['linkedPath']]:[],_0x501de7=_0x5116b2[_0x5270f7(0x198)](_0x5a9a9f);if(_0x501de7){_0x2cee7d['source']===_0x5270f7(0x19f)&&(_0x501de7['dir']=_0x29df67,_0x501de7[_0x5270f7(0x192)]=_0x29df67,_0x501de7['skillMdPath']=resolve(_0x29df67,SKILL_FILE),_0x501de7['metadataPath']=_0x4c9b8d);for(const _0x1732a2 of _0x259f61){!_0x501de7['linkedPaths'][_0x5270f7(0x196)](_0x1732a2)&&_0x501de7[_0x5270f7(0x17f)][_0x5270f7(0x1a1)](_0x1732a2);}_0x501de7[_0x5270f7(0x17f)][_0x5270f7(0x19d)]();return;}_0x5116b2[_0x5270f7(0x197)](_0x5a9a9f,{..._0x265258,'tags':Array[_0x5270f7(0x183)](_0x265258['tags'])?_0x265258[_0x5270f7(0x184)]:[],'scope':_0x265258[_0x5270f7(0x188)],'source':_0x5270f7(0x17e),'dir':_0x29df67,'cacheDir':_0x2cee7d[_0x5270f7(0x19c)]===_0x5270f7(0x19f)?_0x29df67:undefined,'skillMdPath':resolve(_0x29df67,SKILL_FILE),'metadataPath':_0x4c9b8d,'linkedPaths':_0x259f61});}function a99_0x2cbf(_0x3dd378,_0x32ca3e){_0x3dd378=_0x3dd378-0x17d;const _0x41102b=a99_0x4110();let _0x2cbfff=_0x41102b[_0x3dd378];return _0x2cbfff;}function compareLocalRuntimeSkills(_0x21a98a,_0x13e16b){const _0x8cf0cd=a99_0x2cbf,_0x2d7db5={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2d7db5[_0x21a98a['scope']]-_0x2d7db5[_0x13e16b[_0x8cf0cd(0x188)]]||_0x21a98a[_0x8cf0cd(0x18b)]['localeCompare'](_0x13e16b[_0x8cf0cd(0x18b)])||_0x21a98a[_0x8cf0cd(0x199)][_0x8cf0cd(0x1a4)](_0x13e16b[_0x8cf0cd(0x199)]);}
@@ -1 +1 @@
1
- (function(_0x36be81,_0x134e51){const _0x471461=a100_0x5f18,_0x484342=_0x36be81();while(!![]){try{const _0x128a7a=parseInt(_0x471461(0xd4))/0x1+parseInt(_0x471461(0xf6))/0x2+-parseInt(_0x471461(0xeb))/0x3+-parseInt(_0x471461(0xe4))/0x4+-parseInt(_0x471461(0xf3))/0x5+parseInt(_0x471461(0xe2))/0x6*(-parseInt(_0x471461(0xda))/0x7)+parseInt(_0x471461(0xe6))/0x8*(parseInt(_0x471461(0xe1))/0x9);if(_0x128a7a===_0x134e51)break;else _0x484342['push'](_0x484342['shift']());}catch(_0x186913){_0x484342['push'](_0x484342['shift']());}}}(a100_0x4b18,0xf0a35));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x238e12){const _0x3ecee3=a100_0x5f18;return _0x238e12[_0x3ecee3(0xf4)]??Buffer[_0x3ecee3(0xf8)](_0x238e12[_0x3ecee3(0xee)]??'',_0x3ecee3(0xfe));}export function fileText(_0x15b479){const _0x3edb1f=a100_0x5f18;return fileContent(_0x15b479)[_0x3edb1f(0xd7)]('utf8');}export function normalizeLocalFiles(_0x336578){const _0x128ab9=a100_0x5f18;if(!Array[_0x128ab9(0xe8)](_0x336578)||_0x336578['length']===0x0)return[];const _0x137c11=new Map();for(const _0x3e3d90 of _0x336578){if(!_0x3e3d90||typeof _0x3e3d90!==_0x128ab9(0xd9)||typeof _0x3e3d90[_0x128ab9(0xe5)]!==_0x128ab9(0xf0))throw CliErrors['validation'](_0x128ab9(0xdc));const _0x480013=normalizeSkillRelativePath(_0x3e3d90[_0x128ab9(0xe5)]);if(_0x137c11[_0x128ab9(0xfa)](_0x480013))throw CliErrors[_0x128ab9(0xec)](_0x128ab9(0xde)+_0x480013);if(_0x3e3d90['bytes']!==undefined&&!Buffer['isBuffer'](_0x3e3d90[_0x128ab9(0xf4)]))throw CliErrors['validation'](_0x128ab9(0xd5)+_0x480013);if(_0x3e3d90[_0x128ab9(0xf4)]===undefined&&typeof _0x3e3d90[_0x128ab9(0xee)]!==_0x128ab9(0xf0))throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x480013);const _0x43a564=fileContent(_0x3e3d90);_0x137c11[_0x128ab9(0xf5)](_0x480013,{'path':_0x480013,'bytes':_0x43a564});}return Array[_0x128ab9(0xf8)](_0x137c11[_0x128ab9(0xd3)]())[_0x128ab9(0xf9)](compareSkillFiles);}export function normalizeManifestFiles(_0x727453){const _0x5204ab=a100_0x5f18;if(!Array['isArray'](_0x727453)||_0x727453[_0x5204ab(0xef)]===0x0)return[];const _0x1494d9=new Map();for(const _0xf61b4d of _0x727453){if(!_0xf61b4d||typeof _0xf61b4d!=='object'||typeof _0xf61b4d['path']!==_0x5204ab(0xf0))throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xdc));const _0x3feb71=normalizeSkillRelativePath(_0xf61b4d[_0x5204ab(0xe5)]);if(_0x1494d9['has'](_0x3feb71))throw CliErrors[_0x5204ab(0xec)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3feb71);if(!isSha256Hex(_0xf61b4d['sha256']))throw CliErrors[_0x5204ab(0xec)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x3feb71);if(!Number[_0x5204ab(0xfc)](_0xf61b4d[_0x5204ab(0xdf)])||_0xf61b4d['size']<0x0)throw CliErrors[_0x5204ab(0xec)](_0x5204ab(0xed)+_0x3feb71);_0x1494d9[_0x5204ab(0xf5)](_0x3feb71,{'path':_0x3feb71,'sha256':_0xf61b4d[_0x5204ab(0xe3)][_0x5204ab(0xd6)](),'size':_0xf61b4d[_0x5204ab(0xdf)]});}return Array[_0x5204ab(0xf8)](_0x1494d9[_0x5204ab(0xd3)]())[_0x5204ab(0xf9)](compareSkillFiles);}export function scanSkillDirectory(_0x1b2acd){const _0x453c5b=realpathSync(_0x1b2acd),_0x118c0f=[];function _0x4fe350(_0x36cf6f){const _0x2ce979=a100_0x5f18,_0x166212=readdirSync(_0x36cf6f,{'withFileTypes':!![]})[_0x2ce979(0xf9)]((_0x3dc2c0,_0x5df6fb)=>_0x3dc2c0[_0x2ce979(0xe7)][_0x2ce979(0xea)](_0x5df6fb[_0x2ce979(0xe7)]));for(const _0x27e5de of _0x166212){if(_0x27e5de[_0x2ce979(0xe0)]()&&IGNORED_DIR_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;if(IGNORED_FILE_NAMES[_0x2ce979(0xfa)](_0x27e5de[_0x2ce979(0xe7)]))continue;const _0x34ffa9=resolve(_0x36cf6f,_0x27e5de[_0x2ce979(0xe7)]);if(_0x27e5de[_0x2ce979(0xf7)]())throw CliErrors[_0x2ce979(0xec)](_0x2ce979(0xdb)+_0x34ffa9);const _0x1e788a=toPosixPath(relative(_0x453c5b,_0x34ffa9));if(_0x27e5de[_0x2ce979(0xe0)]()){_0x4fe350(_0x34ffa9);continue;}if(!_0x27e5de['isFile']())continue;validateSkillRelativePath(_0x1e788a);const _0x3d8638=readFileSync(_0x34ffa9);_0x118c0f[_0x2ce979(0xf2)]({'path':_0x1e788a,'bytes':_0x3d8638});}}return _0x4fe350(_0x453c5b),normalizeLocalFiles(_0x118c0f);}export function compareSkillFiles(_0x58c6a2,_0x510d69){const _0x30c5c5=a100_0x5f18;if(_0x58c6a2['path']===SKILL_FILE)return _0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE?0x0:-0x1;if(_0x510d69[_0x30c5c5(0xe5)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x58c6a2[_0x30c5c5(0xe5)],_0x30c5c5(0xfe)),Buffer['from'](_0x510d69['path'],_0x30c5c5(0xfe)));}export function normalizeSkillRelativePath(_0xf5be73){const _0x2c11be=a100_0x5f18,_0x3fe725=toPosixPath(_0xf5be73[_0x2c11be(0xfd)]());return validateSkillRelativePath(_0x3fe725),_0x3fe725;}function a100_0x5f18(_0x41a82d,_0x4e7eb3){_0x41a82d=_0x41a82d-0xd3;const _0x4b18d2=a100_0x4b18();let _0x5f1838=_0x4b18d2[_0x41a82d];return _0x5f1838;}export function validateSkillRelativePath(_0x1da67b){const _0x3a9963=a100_0x5f18;if(!_0x1da67b||_0x1da67b[_0x3a9963(0xfb)]('/')||_0x1da67b[_0x3a9963(0xdd)]('//'))throw CliErrors[_0x3a9963(0xec)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1da67b);for(const _0x5b407b of _0x1da67b['split']('/')){if(!_0x5b407b||_0x5b407b==='.'||_0x5b407b==='..')throw CliErrors['validation'](_0x3a9963(0xd8)+_0x1da67b);}}function a100_0x4b18(){const _0x32b107=['string','replace','push','2568355MZqGvO','bytes','set','1256042xNyseJ','isSymbolicLink','from','sort','has','startsWith','isSafeInteger','trim','utf8','values','1048951dlwZBd','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','toLowerCase','toString','Unsafe\x20Skill\x20file\x20path:\x20','object','63FmuVxi','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','includes','Duplicate\x20Skill\x20file\x20path:\x20','size','isDirectory','59589xLYhYE','850194ImrXEr','sha256','6254828HbZOEK','path','4336NYCEEu','name','isArray','test','localeCompare','2781696dqVsLJ','validation','Skill\x20file\x20size\x20is\x20invalid:\x20','content','length'];a100_0x4b18=function(){return _0x32b107;};return a100_0x4b18();}export function toPosixPath(_0x589947){const _0x5e12d7=a100_0x5f18;return _0x589947[_0x5e12d7(0xf1)](/\\/g,'/');}export function isSha256Hex(_0x4670e0){const _0x58a02c=a100_0x5f18;return typeof _0x4670e0==='string'&&/^[a-fA-F0-9]{64}$/[_0x58a02c(0xe9)](_0x4670e0);}
1
+ (function(_0x51c592,_0xbc827d){const _0x47d176=a100_0x52aa,_0x382a27=_0x51c592();while(!![]){try{const _0x391a6f=-parseInt(_0x47d176(0x190))/0x1*(-parseInt(_0x47d176(0x1a4))/0x2)+parseInt(_0x47d176(0x19d))/0x3*(parseInt(_0x47d176(0x1a5))/0x4)+-parseInt(_0x47d176(0x196))/0x5*(-parseInt(_0x47d176(0x185))/0x6)+parseInt(_0x47d176(0x192))/0x7+parseInt(_0x47d176(0x194))/0x8+parseInt(_0x47d176(0x191))/0x9+-parseInt(_0x47d176(0x19c))/0xa;if(_0x391a6f===_0xbc827d)break;else _0x382a27['push'](_0x382a27['shift']());}catch(_0x1d2913){_0x382a27['push'](_0x382a27['shift']());}}}(a100_0x4767,0xdcf86));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(_0x2ab759){const _0x446628=a100_0x52aa;return _0x2ab759['bytes']??Buffer[_0x446628(0x1a8)](_0x2ab759['content']??'',_0x446628(0x19e));}export function fileText(_0x55281d){const _0x13f4de=a100_0x52aa;return fileContent(_0x55281d)[_0x13f4de(0x18e)](_0x13f4de(0x19e));}export function normalizeLocalFiles(_0xa99885){const _0x327adc=a100_0x52aa;if(!Array['isArray'](_0xa99885)||_0xa99885[_0x327adc(0x195)]===0x0)return[];const _0x9abd09=new Map();for(const _0x56cd1c of _0xa99885){if(!_0x56cd1c||typeof _0x56cd1c!=='object'||typeof _0x56cd1c['path']!=='string')throw CliErrors[_0x327adc(0x18c)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1934c1=normalizeSkillRelativePath(_0x56cd1c[_0x327adc(0x18f)]);if(_0x9abd09[_0x327adc(0x180)](_0x1934c1))throw CliErrors[_0x327adc(0x18c)](_0x327adc(0x19b)+_0x1934c1);if(_0x56cd1c['bytes']!==undefined&&!Buffer[_0x327adc(0x1a2)](_0x56cd1c[_0x327adc(0x189)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x1934c1);if(_0x56cd1c[_0x327adc(0x189)]===undefined&&typeof _0x56cd1c[_0x327adc(0x1a3)]!=='string')throw CliErrors['validation'](_0x327adc(0x181)+_0x1934c1);const _0x33d04f=fileContent(_0x56cd1c);_0x9abd09[_0x327adc(0x18a)](_0x1934c1,{'path':_0x1934c1,'bytes':_0x33d04f});}return Array['from'](_0x9abd09[_0x327adc(0x19a)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x21af01){const _0x5a09ec=a100_0x52aa;if(!Array[_0x5a09ec(0x17f)](_0x21af01)||_0x21af01[_0x5a09ec(0x195)]===0x0)return[];const _0x5539bd=new Map();for(const _0x2813c9 of _0x21af01){if(!_0x2813c9||typeof _0x2813c9!=='object'||typeof _0x2813c9[_0x5a09ec(0x18f)]!==_0x5a09ec(0x19f))throw CliErrors[_0x5a09ec(0x18c)](_0x5a09ec(0x197));const _0x5160ab=normalizeSkillRelativePath(_0x2813c9[_0x5a09ec(0x18f)]);if(_0x5539bd['has'](_0x5160ab))throw CliErrors[_0x5a09ec(0x18c)](_0x5a09ec(0x19b)+_0x5160ab);if(!isSha256Hex(_0x2813c9[_0x5a09ec(0x187)]))throw CliErrors[_0x5a09ec(0x18c)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x5160ab);if(!Number[_0x5a09ec(0x183)](_0x2813c9[_0x5a09ec(0x1a6)])||_0x2813c9['size']<0x0)throw CliErrors[_0x5a09ec(0x18c)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x5160ab);_0x5539bd[_0x5a09ec(0x18a)](_0x5160ab,{'path':_0x5160ab,'sha256':_0x2813c9[_0x5a09ec(0x187)][_0x5a09ec(0x199)](),'size':_0x2813c9['size']});}return Array[_0x5a09ec(0x1a8)](_0x5539bd['values']())[_0x5a09ec(0x1a0)](compareSkillFiles);}export function scanSkillDirectory(_0x517406){const _0x3dc70e=realpathSync(_0x517406),_0x53471=[];function _0xea05ee(_0x3bc06d){const _0xc37a8f=a100_0x52aa,_0x30c746=readdirSync(_0x3bc06d,{'withFileTypes':!![]})['sort']((_0x1052d5,_0x230dca)=>_0x1052d5[_0xc37a8f(0x184)][_0xc37a8f(0x186)](_0x230dca[_0xc37a8f(0x184)]));for(const _0x9b071a of _0x30c746){if(_0x9b071a['isDirectory']()&&IGNORED_DIR_NAMES[_0xc37a8f(0x180)](_0x9b071a['name']))continue;if(IGNORED_FILE_NAMES[_0xc37a8f(0x180)](_0x9b071a['name']))continue;const _0x1483cc=resolve(_0x3bc06d,_0x9b071a[_0xc37a8f(0x184)]);if(_0x9b071a[_0xc37a8f(0x188)]())throw CliErrors[_0xc37a8f(0x18c)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x1483cc);const _0x4219eb=toPosixPath(relative(_0x3dc70e,_0x1483cc));if(_0x9b071a[_0xc37a8f(0x198)]()){_0xea05ee(_0x1483cc);continue;}if(!_0x9b071a[_0xc37a8f(0x193)]())continue;validateSkillRelativePath(_0x4219eb);const _0x16501c=readFileSync(_0x1483cc);_0x53471[_0xc37a8f(0x1a7)]({'path':_0x4219eb,'bytes':_0x16501c});}}return _0xea05ee(_0x3dc70e),normalizeLocalFiles(_0x53471);}export function compareSkillFiles(_0x496484,_0x4f1752){const _0x33975d=a100_0x52aa;if(_0x496484[_0x33975d(0x18f)]===SKILL_FILE)return _0x4f1752[_0x33975d(0x18f)]===SKILL_FILE?0x0:-0x1;if(_0x4f1752[_0x33975d(0x18f)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x33975d(0x1a8)](_0x496484[_0x33975d(0x18f)],_0x33975d(0x19e)),Buffer[_0x33975d(0x1a8)](_0x4f1752[_0x33975d(0x18f)],_0x33975d(0x19e)));}export function normalizeSkillRelativePath(_0x3fe5e3){const _0x73b57c=a100_0x52aa,_0x57515f=toPosixPath(_0x3fe5e3[_0x73b57c(0x18d)]());return validateSkillRelativePath(_0x57515f),_0x57515f;}function a100_0x4767(){const _0x9a84e0=['994200ZybXWb','localeCompare','sha256','isSymbolicLink','bytes','set','Unsafe\x20Skill\x20file\x20path:\x20','validation','trim','toString','path','373261jObXjT','10496619LFhPzE','8678341XFlYal','isFile','1418144lbViIP','length','40zJSKcV','Skill\x20file\x20path\x20must\x20be\x20text.','isDirectory','toLowerCase','values','Duplicate\x20Skill\x20file\x20path:\x20','52707200QQsIIq','12jsfsQM','utf8','string','sort','includes','isBuffer','content','8vbLPSn','773848klGFQd','size','push','from','isArray','has','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','startsWith','isSafeInteger','name'];a100_0x4767=function(){return _0x9a84e0;};return a100_0x4767();}export function validateSkillRelativePath(_0x56af1c){const _0x533849=a100_0x52aa;if(!_0x56af1c||_0x56af1c[_0x533849(0x182)]('/')||_0x56af1c[_0x533849(0x1a1)]('//'))throw CliErrors[_0x533849(0x18c)](_0x533849(0x18b)+_0x56af1c);for(const _0x9dd6af of _0x56af1c['split']('/')){if(!_0x9dd6af||_0x9dd6af==='.'||_0x9dd6af==='..')throw CliErrors[_0x533849(0x18c)](_0x533849(0x18b)+_0x56af1c);}}export function toPosixPath(_0xa9b600){return _0xa9b600['replace'](/\\/g,'/');}function a100_0x52aa(_0x35229d,_0x4c7390){_0x35229d=_0x35229d-0x17f;const _0x476733=a100_0x4767();let _0x52aa4e=_0x476733[_0x35229d];return _0x52aa4e;}export function isSha256Hex(_0xc8de33){return typeof _0xc8de33==='string'&&/^[a-fA-F0-9]{64}$/['test'](_0xc8de33);}
@@ -1 +1 @@
1
- (function(_0x135b4c,_0x26f528){const _0x4982bd=a101_0x4c2b,_0x306812=_0x135b4c();while(!![]){try{const _0x19ddcb=-parseInt(_0x4982bd(0xb4))/0x1+-parseInt(_0x4982bd(0xd3))/0x2+parseInt(_0x4982bd(0xbe))/0x3*(-parseInt(_0x4982bd(0xcc))/0x4)+parseInt(_0x4982bd(0xc5))/0x5*(-parseInt(_0x4982bd(0xb1))/0x6)+-parseInt(_0x4982bd(0xd5))/0x7+parseInt(_0x4982bd(0xd7))/0x8+parseInt(_0x4982bd(0xd6))/0x9;if(_0x19ddcb===_0x26f528)break;else _0x306812['push'](_0x306812['shift']());}catch(_0x5a7ac7){_0x306812['push'](_0x306812['shift']());}}}(a101_0x1fde,0xdd90d));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a101_0x4c2b(_0x1ece85,_0x44dbd2){_0x1ece85=_0x1ece85-0xac;const _0x1fde93=a101_0x1fde();let _0x4c2b24=_0x1fde93[_0x1ece85];return _0x4c2b24;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0xf9e72e,_0x330c44,_0x9c4bd8){const _0x1712c9=a101_0x4c2b,_0x1b52b5=requireSkillCode(_0xf9e72e),_0x5481a9=requirePackageBytes(_0x1b52b5,_0x9c4bd8[_0x1712c9(0xe4)]),_0x42a0aa=extractDownloadedPackage(_0x5481a9),_0x2b1ffc=_0x42a0aa[_0x1712c9(0xc0)](_0x2d84b0=>_0x2d84b0['path']===SKILL_FILE);if(!_0x2b1ffc)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x1b52b5);const _0x1e7591=withMaterializedSkillFrontmatter(_0x42a0aa,_0xf9e72e,_0x1b52b5),_0xdf1136=_0x1e7591[_0x1712c9(0xc0)](_0x5e6df9=>_0x5e6df9[_0x1712c9(0xaf)]===SKILL_FILE),_0x48f59c=fileText(_0xdf1136),_0x203d94=getRuntimeSkillDir(_0x9c4bd8[_0x1712c9(0xc9)],_0x9c4bd8[_0x1712c9(0xca)],_0x9c4bd8[_0x1712c9(0xc3)],_0x330c44,_0x1b52b5,_0x9c4bd8[_0x1712c9(0xcf)]),_0x3017df=resolve(_0x203d94,SKILL_FILE),_0x29fccc=resolve(_0x203d94,METADATA_FILE),_0xd40ac2=contentHash(_0x48f59c),_0x1e69b4=readMetadataIfPresent(_0x29fccc)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x203d94,_0x29fccc,_0x1e7591,_0x9c4bd8['force']===!![]),mkdirSync(_0x203d94,{'recursive':!![],'mode':0x1c0});const _0x30ae18=existsSync(_0x3017df)?readFileSync(_0x3017df,_0x1712c9(0xd9)):undefined;return materializeFiles(_0x203d94,_0x1e7591),removeStaleManagedFiles(_0x203d94,_0x1e69b4,_0x1e7591),writeJsonAtomic(_0x29fccc,buildMetadata(_0xf9e72e,_0x330c44,_0x9c4bd8[_0x1712c9(0xc3)],_0xd40ac2,_0x9c4bd8[_0x1712c9(0xe5)],_0x1e7591,_0x5481a9)),{'skill':_0xf9e72e,'scope':_0x330c44,'dir':_0x203d94,'skillMdPath':_0x3017df,'metadataPath':_0x29fccc,'contentHash':_0xd40ac2,'changed':_0x30ae18!==_0x48f59c};}function withMaterializedSkillFrontmatter(_0x463411,_0x57b54f,_0x28c42f){const _0x5ed103=a101_0x4c2b,_0x24c6f4=skillDisplayName(_0x57b54f,_0x28c42f),_0x5ba529=_0x57b54f['description']?.[_0x5ed103(0xb0)]()||_0x24c6f4||_0x28c42f;return normalizeLocalFiles(_0x463411)[_0x5ed103(0xd8)](_0x36d488=>{const _0x40040e=_0x5ed103,_0x129a41=fileText(_0x36d488);if(_0x36d488[_0x40040e(0xaf)]!==SKILL_FILE)return _0x36d488;if(hasYamlFrontmatter(_0x129a41))return{'path':_0x36d488[_0x40040e(0xaf)],'content':withSyncedDisplayName(_0x129a41,_0x24c6f4)};return{'path':_0x36d488['path'],'content':prependSkillFrontmatter(_0x129a41,{'name':_0x28c42f,'displayName':_0x24c6f4,'description':_0x5ba529})};});}function hasYamlFrontmatter(_0x56e002){const _0x1f881c=a101_0x4c2b;return/^\uFEFF?---\s*\r?\n/[_0x1f881c(0xac)](_0x56e002);}function prependSkillFrontmatter(_0x16881b,_0x110b41){const _0x427b35=a101_0x4c2b,_0x3c55ae=_0x16881b[_0x427b35(0xc8)](/^\uFEFF/,'');return['---',_0x427b35(0xd1)+yamlString(_0x110b41[_0x427b35(0xcb)]),_0x110b41['displayName']?_0x427b35(0xb9)+yamlString(_0x110b41['displayName']):undefined,_0x427b35(0xdf)+yamlString(_0x110b41[_0x427b35(0xad)]),_0x427b35(0xd4),'',_0x3c55ae][_0x427b35(0xdb)](_0x4d2b41=>_0x4d2b41!==undefined)[_0x427b35(0xbb)]('\x0a');}function yamlString(_0x5ce85e){const _0x5c72df=a101_0x4c2b;return JSON[_0x5c72df(0xae)](_0x5ce85e['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x31edf7,_0x1c1868){const _0xd7326=a101_0x4c2b,_0x5c1a77=_0x31edf7[_0xd7326(0xe1)]?.['trim']();return _0x5c1a77||_0x1c1868;}function withSyncedDisplayName(_0x57bd76,_0x2f87da){const _0x4704ec=a101_0x4c2b,_0x4e3a4e=_0x57bd76['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4e3a4e)return _0x57bd76;const _0x458f9f=_0x4e3a4e[0x1]??'',_0x3e8508=_0x4e3a4e[0x2]??'',_0x548241=parseDocument(_0x3e8508);if(_0x548241['errors'][_0x4704ec(0xc7)]>0x0||!isMap(_0x548241[_0x4704ec(0xb6)]))return _0x57bd76;if(_0x2f87da)_0x548241[_0x4704ec(0xba)](_0x4704ec(0xda),_0x2f87da);else{if(_0x548241[_0x4704ec(0xe3)](_0x4704ec(0xda)))_0x548241[_0x4704ec(0xb2)](_0x4704ec(0xda));else return _0x57bd76;}_0x548241[_0x4704ec(0xb6)][_0x4704ec(0xe2)]=![];const _0x8b59a5=_0x548241[_0x4704ec(0xce)]({'lineWidth':0x0})['trimEnd'](),_0x4c68bb=_0x57bd76[_0x4704ec(0xbc)](_0x4e3a4e[0x0][_0x4704ec(0xc7)])[_0x4704ec(0xc8)](/^\r?\n/,'');return _0x458f9f+_0x4704ec(0xd2)+_0x8b59a5+_0x4704ec(0xb7)+_0x4c68bb;}function ensurePulledFilesCanBeOverwritten(_0x755f37,_0x4e206d,_0x29a17c,_0x5aed0c){const _0x44c2bb=a101_0x4c2b;if(_0x5aed0c||!existsSync(_0x4e206d))return;const _0x322043=readMetadataIfPresent(_0x4e206d);if(!_0x322043)return;const _0x27f619=_0x322043[_0x44c2bb(0xb3)]&&Object[_0x44c2bb(0xbd)](_0x322043[_0x44c2bb(0xb3)])[_0x44c2bb(0xc7)]>0x0?_0x322043[_0x44c2bb(0xb3)]:undefined;if(_0x27f619)for(const [_0x5d2562,_0x513734]of Object[_0x44c2bb(0xde)](_0x27f619)){const _0x351724=resolveManagedFilePath(_0x755f37,_0x5d2562);if(!existsSync(_0x351724))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdd)+_0x5d2562);const _0x8930d1=lstatSync(_0x351724);if(!_0x8930d1['isFile']())throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xdc)+_0x5d2562);const _0x436392=bufferSha256(readFileSync(_0x351724));if(_0x436392!==_0x513734)throw CliErrors[_0x44c2bb(0xbf)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x755f37+_0x44c2bb(0xcd)+_0x5d2562,_0x44c2bb(0xe0)+_0x5d2562);}else{const _0x2ef45a=resolve(_0x755f37,SKILL_FILE);if(existsSync(_0x2ef45a)&&_0x322043[_0x44c2bb(0xb5)]){const _0x56dff4=contentHash(readFileSync(_0x2ef45a,_0x44c2bb(0xd9)));if(_0x56dff4!==_0x322043[_0x44c2bb(0xb5)])throw CliErrors['validation'](_0x44c2bb(0xc1)+_0x2ef45a,_0x44c2bb(0xd0));}}for(const _0x37b0ac of normalizeLocalFiles(_0x29a17c)){if(_0x27f619?.[_0x37b0ac['path']])continue;if(!_0x27f619&&_0x37b0ac['path']===SKILL_FILE)continue;const _0x3d29ce=resolveManagedFilePath(_0x755f37,_0x37b0ac[_0x44c2bb(0xaf)]);if(!existsSync(_0x3d29ce))continue;const _0x187715=lstatSync(_0x3d29ce);if(!_0x187715[_0x44c2bb(0xc6)]())throw CliErrors['validation'](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xb8)+_0x37b0ac[_0x44c2bb(0xaf)]);const _0x2aff19=bufferSha256(readFileSync(_0x3d29ce));if(_0x2aff19!==fileHash(_0x37b0ac))throw CliErrors[_0x44c2bb(0xbf)](_0x44c2bb(0xc2)+_0x755f37,_0x44c2bb(0xc4)+_0x37b0ac[_0x44c2bb(0xaf)]);}}function materializeFiles(_0x2d33f7,_0x1b5090){const _0x2e0fb7=a101_0x4c2b;for(const _0x50e9b1 of normalizeLocalFiles(_0x1b5090)){const _0x103b7f=resolveManagedFilePath(_0x2d33f7,_0x50e9b1[_0x2e0fb7(0xaf)]);mkdirSync(dirname(_0x103b7f),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x103b7f,fileContent(_0x50e9b1),0x180);}}function removeStaleManagedFiles(_0x2f41fe,_0x332abe,_0x3bbcff){const _0x12c63c=a101_0x4c2b;if(!_0x332abe)return;const _0x4cd09a=new Set(normalizeLocalFiles(_0x3bbcff)[_0x12c63c(0xd8)](_0x31d2f5=>_0x31d2f5[_0x12c63c(0xaf)]));for(const _0x177c6b of Object['keys'](_0x332abe)){if(_0x4cd09a[_0x12c63c(0xe3)](_0x177c6b))continue;const _0x5e350d=resolveManagedFilePath(_0x2f41fe,_0x177c6b);existsSync(_0x5e350d)&&lstatSync(_0x5e350d)['isFile']()&&rmSync(_0x5e350d,{'force':!![]});}}function a101_0x1fde(){const _0x209430=['flow','has','packageBytes','pulledAt','test','description','stringify','path','trim','1450746JEgiqk','delete','fileHashes','269369NoLPuk','contentHash','contents','\x0a---\x0a\x0a','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','displayName:\x20','set','join','slice','keys','117rYmQPE','validation','find','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','35BVoubw','isFile','length','replace','env','accessKey','name','36412vcbJrR','.\x20Changed\x20file:\x20','toString','paths','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','name:\x20','---\x0a','1375632KDgEnn','---','12163193emWRrc','40272894aqjXDd','9400840cELwuj','map','utf8','displayName','filter','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','entries','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','skillName'];a101_0x1fde=function(){return _0x209430;};return a101_0x1fde();}
1
+ (function(_0x21a292,_0x1468c8){const _0x47661c=a101_0x5ceb,_0x197600=_0x21a292();while(!![]){try{const _0x3044a2=parseInt(_0x47661c(0x125))/0x1+parseInt(_0x47661c(0x106))/0x2*(-parseInt(_0x47661c(0x10b))/0x3)+parseInt(_0x47661c(0x10f))/0x4+-parseInt(_0x47661c(0xf3))/0x5*(-parseInt(_0x47661c(0x109))/0x6)+-parseInt(_0x47661c(0xfd))/0x7*(parseInt(_0x47661c(0x11c))/0x8)+parseInt(_0x47661c(0xf4))/0x9+-parseInt(_0x47661c(0xf5))/0xa;if(_0x3044a2===_0x1468c8)break;else _0x197600['push'](_0x197600['shift']());}catch(_0x3cf333){_0x197600['push'](_0x197600['shift']());}}}(a101_0x2700,0xede5e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x38f277,_0x46f904,_0x30b6b3){const _0x2c45b2=a101_0x5ceb,_0x457935=requireSkillCode(_0x38f277),_0x50ce18=requirePackageBytes(_0x457935,_0x30b6b3[_0x2c45b2(0x112)]),_0x43f43f=extractDownloadedPackage(_0x50ce18),_0x273bb1=_0x43f43f[_0x2c45b2(0xfa)](_0x46e1a6=>_0x46e1a6['path']===SKILL_FILE);if(!_0x273bb1)throw CliErrors['validation'](_0x2c45b2(0xf7)+SKILL_FILE+':\x20'+_0x457935);const _0x1aa4a9=withMaterializedSkillFrontmatter(_0x43f43f,_0x38f277,_0x457935),_0x405034=_0x1aa4a9['find'](_0x2c9a2a=>_0x2c9a2a['path']===SKILL_FILE),_0x2f4a2f=fileText(_0x405034),_0x3463cd=getRuntimeSkillDir(_0x30b6b3[_0x2c45b2(0x11a)],_0x30b6b3[_0x2c45b2(0x123)],_0x30b6b3['appCode'],_0x46f904,_0x457935,_0x30b6b3[_0x2c45b2(0x104)]),_0x231f56=resolve(_0x3463cd,SKILL_FILE),_0x10b684=resolve(_0x3463cd,METADATA_FILE),_0x5a4af6=contentHash(_0x2f4a2f),_0x4b7400=readMetadataIfPresent(_0x10b684)?.[_0x2c45b2(0xf0)];ensurePulledFilesCanBeOverwritten(_0x3463cd,_0x10b684,_0x1aa4a9,_0x30b6b3[_0x2c45b2(0x124)]===!![]),mkdirSync(_0x3463cd,{'recursive':!![],'mode':0x1c0});const _0x6b144e=existsSync(_0x231f56)?readFileSync(_0x231f56,_0x2c45b2(0x118)):undefined;return materializeFiles(_0x3463cd,_0x1aa4a9),removeStaleManagedFiles(_0x3463cd,_0x4b7400,_0x1aa4a9),writeJsonAtomic(_0x10b684,buildMetadata(_0x38f277,_0x46f904,_0x30b6b3[_0x2c45b2(0xf8)],_0x5a4af6,_0x30b6b3[_0x2c45b2(0x121)],_0x1aa4a9,_0x50ce18)),{'skill':_0x38f277,'scope':_0x46f904,'dir':_0x3463cd,'skillMdPath':_0x231f56,'metadataPath':_0x10b684,'contentHash':_0x5a4af6,'changed':_0x6b144e!==_0x2f4a2f};}function withMaterializedSkillFrontmatter(_0x44276e,_0x456ea1,_0x4b2d26){const _0xa7b1e8=a101_0x5ceb,_0x3cdc54=skillDisplayName(_0x456ea1,_0x4b2d26),_0x5daff0=_0x456ea1[_0xa7b1e8(0x10a)]?.[_0xa7b1e8(0x115)]()||_0x3cdc54||_0x4b2d26;return normalizeLocalFiles(_0x44276e)[_0xa7b1e8(0xf9)](_0x1e3cc5=>{const _0x391f46=_0xa7b1e8,_0x1fff18=fileText(_0x1e3cc5);if(_0x1e3cc5['path']!==SKILL_FILE)return _0x1e3cc5;if(hasYamlFrontmatter(_0x1fff18))return{'path':_0x1e3cc5['path'],'content':withSyncedDisplayName(_0x1fff18,_0x3cdc54)};return{'path':_0x1e3cc5[_0x391f46(0x110)],'content':prependSkillFrontmatter(_0x1fff18,{'name':_0x4b2d26,'displayName':_0x3cdc54,'description':_0x5daff0})};});}function hasYamlFrontmatter(_0x36b407){return/^\uFEFF?---\s*\r?\n/['test'](_0x36b407);}function prependSkillFrontmatter(_0x584715,_0xf00ed8){const _0x1b7830=a101_0x5ceb,_0x43a135=_0x584715[_0x1b7830(0x108)](/^\uFEFF/,'');return[_0x1b7830(0x114),_0x1b7830(0x119)+yamlString(_0xf00ed8[_0x1b7830(0x105)]),_0xf00ed8[_0x1b7830(0x103)]?'displayName:\x20'+yamlString(_0xf00ed8[_0x1b7830(0x103)]):undefined,_0x1b7830(0x113)+yamlString(_0xf00ed8[_0x1b7830(0x10a)]),_0x1b7830(0x114),'',_0x43a135]['filter'](_0x2dec0e=>_0x2dec0e!==undefined)[_0x1b7830(0xf2)]('\x0a');}function yamlString(_0x17f1fd){const _0x2cdba3=a101_0x5ceb;return JSON[_0x2cdba3(0x117)](_0x17f1fd[_0x2cdba3(0x108)](/\r/g,'')[_0x2cdba3(0x115)]());}function skillDisplayName(_0x43222e,_0x5eb67f){const _0x1f7c39=a101_0x5ceb,_0x4e3ff2=_0x43222e[_0x1f7c39(0x100)]?.[_0x1f7c39(0x115)]();return _0x4e3ff2||_0x5eb67f;}function withSyncedDisplayName(_0x59ed2a,_0x204766){const _0x1b196d=a101_0x5ceb,_0x565bff=_0x59ed2a[_0x1b196d(0x11f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x565bff)return _0x59ed2a;const _0x4b9cc5=_0x565bff[0x1]??'',_0x3c4bb5=_0x565bff[0x2]??'',_0x1ecaf1=parseDocument(_0x3c4bb5);if(_0x1ecaf1[_0x1b196d(0xf6)][_0x1b196d(0x102)]>0x0||!isMap(_0x1ecaf1[_0x1b196d(0xff)]))return _0x59ed2a;if(_0x204766)_0x1ecaf1[_0x1b196d(0x120)](_0x1b196d(0x103),_0x204766);else{if(_0x1ecaf1['has'](_0x1b196d(0x103)))_0x1ecaf1['delete'](_0x1b196d(0x103));else return _0x59ed2a;}forceBlockCollections(_0x1ecaf1[_0x1b196d(0xff)]);const _0x3c8c8c=_0x1ecaf1['toString']({'lineWidth':0x0})['trimEnd'](),_0x210002=_0x59ed2a[_0x1b196d(0xfc)](_0x565bff[0x0][_0x1b196d(0x102)])[_0x1b196d(0x108)](/^\r?\n/,'');return _0x4b9cc5+_0x1b196d(0x10c)+_0x3c8c8c+_0x1b196d(0xfe)+_0x210002;}function forceBlockCollections(_0x4ec2f6){if(!isNode(_0x4ec2f6))return;visit(_0x4ec2f6,(_0x1f21f7,_0x28373d)=>{isCollection(_0x28373d)&&(_0x28373d['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1fb740,_0x404e89,_0x475b09,_0x167d12){const _0x1beb38=a101_0x5ceb;if(_0x167d12||!existsSync(_0x404e89))return;const _0x53da84=readMetadataIfPresent(_0x404e89);if(!_0x53da84)return;const _0x318d3b=_0x53da84['fileHashes']&&Object[_0x1beb38(0xf1)](_0x53da84[_0x1beb38(0xf0)])[_0x1beb38(0x102)]>0x0?_0x53da84[_0x1beb38(0xf0)]:undefined;if(_0x318d3b)for(const [_0x287c1f,_0x3feea8]of Object[_0x1beb38(0x107)](_0x318d3b)){const _0x3aa204=resolveManagedFilePath(_0x1fb740,_0x287c1f);if(!existsSync(_0x3aa204))throw CliErrors[_0x1beb38(0x101)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1fb740,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x287c1f);const _0x392e2e=lstatSync(_0x3aa204);if(!_0x392e2e[_0x1beb38(0x111)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1fb740,_0x1beb38(0x122)+_0x287c1f);const _0x54b8f0=bufferSha256(readFileSync(_0x3aa204));if(_0x54b8f0!==_0x3feea8)throw CliErrors[_0x1beb38(0x101)](_0x1beb38(0x10e)+_0x1fb740+_0x1beb38(0x11d)+_0x287c1f,_0x1beb38(0x10d)+_0x287c1f);}else{const _0x5e21bb=resolve(_0x1fb740,SKILL_FILE);if(existsSync(_0x5e21bb)&&_0x53da84[_0x1beb38(0x126)]){const _0x5a74dd=contentHash(readFileSync(_0x5e21bb,_0x1beb38(0x118)));if(_0x5a74dd!==_0x53da84[_0x1beb38(0x126)])throw CliErrors['validation'](_0x1beb38(0x11b)+_0x5e21bb,_0x1beb38(0x116));}}for(const _0x220a52 of normalizeLocalFiles(_0x475b09)){if(_0x318d3b?.[_0x220a52[_0x1beb38(0x110)]])continue;if(!_0x318d3b&&_0x220a52[_0x1beb38(0x110)]===SKILL_FILE)continue;const _0x485783=resolveManagedFilePath(_0x1fb740,_0x220a52[_0x1beb38(0x110)]);if(!existsSync(_0x485783))continue;const _0x52b6ae=lstatSync(_0x485783);if(!_0x52b6ae[_0x1beb38(0x111)]())throw CliErrors[_0x1beb38(0x101)](_0x1beb38(0x10e)+_0x1fb740,_0x1beb38(0xfb)+_0x220a52[_0x1beb38(0x110)]);const _0x2e20d5=bufferSha256(readFileSync(_0x485783));if(_0x2e20d5!==fileHash(_0x220a52))throw CliErrors['validation'](_0x1beb38(0x10e)+_0x1fb740,_0x1beb38(0x11e)+_0x220a52[_0x1beb38(0x110)]);}}function a101_0x2700(){const _0xc706c7=['Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','19384meKppw','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','match','set','pulledAt','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','accessKey','force','1726425ZRSyKT','contentHash','fileHashes','keys','join','10CxRqaB','10030725YPLdzB','10723040oLQZpg','errors','Runtime\x20Skill\x20package\x20is\x20missing\x20','appCode','map','find','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','slice','4599bblLUf','\x0a---\x0a\x0a','contents','skillName','validation','length','displayName','paths','name','381250SEkpbF','entries','replace','327126JSjPqd','description','6eaETei','---\x0a','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','4279612cWASof','path','isFile','packageBytes','description:\x20','---','trim','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','stringify','utf8','name:\x20','env'];a101_0x2700=function(){return _0xc706c7;};return a101_0x2700();}function materializeFiles(_0x14fde0,_0x10557e){const _0x53c541=a101_0x5ceb;for(const _0x91045a of normalizeLocalFiles(_0x10557e)){const _0x51e2a9=resolveManagedFilePath(_0x14fde0,_0x91045a[_0x53c541(0x110)]);mkdirSync(dirname(_0x51e2a9),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x51e2a9,fileContent(_0x91045a),0x180);}}function a101_0x5ceb(_0x100ae5,_0x54abd0){_0x100ae5=_0x100ae5-0xf0;const _0x270046=a101_0x2700();let _0x5cebda=_0x270046[_0x100ae5];return _0x5cebda;}function removeStaleManagedFiles(_0x4181da,_0x36dd0f,_0x296298){const _0x562ce9=a101_0x5ceb;if(!_0x36dd0f)return;const _0x3d608f=new Set(normalizeLocalFiles(_0x296298)[_0x562ce9(0xf9)](_0x462109=>_0x462109[_0x562ce9(0x110)]));for(const _0x5d73f0 of Object['keys'](_0x36dd0f)){if(_0x3d608f['has'](_0x5d73f0))continue;const _0x5ba1dc=resolveManagedFilePath(_0x4181da,_0x5d73f0);existsSync(_0x5ba1dc)&&lstatSync(_0x5ba1dc)[_0x562ce9(0x111)]()&&rmSync(_0x5ba1dc,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x164432,_0x549f62){const _0x1b4709=a102_0x213f,_0x1c7120=_0x164432();while(!![]){try{const _0x1198f8=parseInt(_0x1b4709(0xca))/0x1+parseInt(_0x1b4709(0xd8))/0x2+-parseInt(_0x1b4709(0xdc))/0x3*(parseInt(_0x1b4709(0xdb))/0x4)+parseInt(_0x1b4709(0xc7))/0x5*(-parseInt(_0x1b4709(0xe1))/0x6)+parseInt(_0x1b4709(0xd3))/0x7*(parseInt(_0x1b4709(0xc8))/0x8)+parseInt(_0x1b4709(0xe6))/0x9*(-parseInt(_0x1b4709(0xcc))/0xa)+parseInt(_0x1b4709(0xd1))/0xb;if(_0x1198f8===_0x549f62)break;else _0x1c7120['push'](_0x1c7120['shift']());}catch(_0x40b75a){_0x1c7120['push'](_0x1c7120['shift']());}}}(a102_0x1d69,0x87141));function a102_0x213f(_0x20f521,_0x3de763){_0x20f521=_0x20f521-0xc1;const _0x1d693e=a102_0x1d69();let _0x213f09=_0x1d693e[_0x20f521];return _0x213f09;}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a102_0x1d69(){const _0x3cebd4=['tenantCode','readonly','88746UyLGiR','status','zipSize','ossPath','forkedFromVersion','8283663PoSFGh','files','object','isArray','Invalid\x20','hasUpstreamUpdate','personal','tags','skillCode','105NGVPlS','24648vPLxmH','userId','198546PtvdCs','zipSha256','10TgkZck','toISOString','trim','description','validation','20246941TCrpps','utf8','735Rjtclo','map','version','skillName','forkedFromSkillId','891280AuHwtN','string','length','195052NsdzsP','63dqUzMt','parse','manifest'];a102_0x1d69=function(){return _0x3cebd4;};return a102_0x1d69();}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4dffe2,_0x3d5b7a,_0x5aedc6,_0x540b34,_0x2a2a88,_0x19cf9a,_0x2f0688){const _0xf1f019=a102_0x213f,_0x5c42dd=_0x19cf9a?normalizeLocalFiles(_0x19cf9a):[],_0x1ee12a=!_0x2f0688&&_0x5c42dd[_0xf1f019(0xda)]>0x0?buildSkillPackage(_0x5c42dd):undefined,_0x1e0866=_0x2f0688?bufferSha256(_0x2f0688):_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xcb)],_0x145998=_0x2f0688?.[_0xf1f019(0xda)]??_0x1ee12a?.[_0xf1f019(0xde)][_0xf1f019(0xe3)],_0x68f1ba=_0x5c42dd['length']>0x0?Object['fromEntries'](_0x5c42dd[_0xf1f019(0xd4)](_0x117717=>[_0x117717['path'],fileHash(_0x117717)])):undefined;return{'schemaVersion':_0x5c42dd[_0xf1f019(0xda)]>0x0?0x2:0x1,'id':_0x4dffe2['id'],'appCode':_0x5aedc6,'skillCode':requireSkillCode(_0x4dffe2),'skillName':_0x4dffe2[_0xf1f019(0xd6)],'description':_0x4dffe2[_0xf1f019(0xcf)],'scope':_0x3d5b7a,'readonly':_0x3d5b7a!==_0xf1f019(0xc4)||_0x4dffe2[_0xf1f019(0xe0)]===!![],'tenantCode':_0x4dffe2[_0xf1f019(0xdf)],'userId':_0x4dffe2[_0xf1f019(0xc9)],'version':_0x4dffe2[_0xf1f019(0xd5)],'status':_0x4dffe2[_0xf1f019(0xe2)],'tags':Array[_0xf1f019(0xc1)](_0x4dffe2[_0xf1f019(0xc5)])?_0x4dffe2[_0xf1f019(0xc5)]:[],'hasUpstreamUpdate':_0x4dffe2[_0xf1f019(0xc3)],'forkedFromSkillId':_0x4dffe2[_0xf1f019(0xd7)],'forkedFromVersion':_0x4dffe2[_0xf1f019(0xe5)],'sourceSessionId':_0x4dffe2['sourceSessionId'],'contentHash':_0x540b34,'fileHashes':_0x68f1ba,'treeHash':_0x5c42dd[_0xf1f019(0xda)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5c42dd)):undefined,'ossPath':remoteManifestOssPath(_0x4dffe2[_0xf1f019(0xe7)]),'zipSha256':_0x1e0866,'zipSize':_0x145998,'files':_0x5c42dd[_0xf1f019(0xda)]>0x0?_0x5c42dd[_0xf1f019(0xd4)](_0x58eb87=>({'path':_0x58eb87['path'],'hash':fileHash(_0x58eb87),'size':fileContent(_0x58eb87)[_0xf1f019(0xda)]})):undefined,'pulledAt':_0x2a2a88??new Date()[_0xf1f019(0xcd)]()};}export function requireSkillCode(_0x304ccf){const _0x42edee=a102_0x213f,_0x2b7a15=_0x304ccf[_0x42edee(0xc6)]?.['trim']();if(!_0x2b7a15)throw CliErrors[_0x42edee(0xd0)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x2b7a15;}export function readMetadataIfPresent(_0x4035ff){const _0x25afbd=a102_0x213f;if(!existsSync(_0x4035ff))return undefined;try{const _0x26c404=JSON[_0x25afbd(0xdd)](readFileSync(_0x4035ff,_0x25afbd(0xd2)));return _0x26c404;}catch{throw CliErrors[_0x25afbd(0xd0)](_0x25afbd(0xc2)+METADATA_FILE+':\x20'+_0x4035ff);}}function remoteManifestOssPath(_0x33f21d){const _0x46920e=a102_0x213f;if(!_0x33f21d||typeof _0x33f21d!==_0x46920e(0xe8)||Array[_0x46920e(0xc1)](_0x33f21d))return undefined;const _0x1d3574=_0x33f21d[_0x46920e(0xe4)];return typeof _0x1d3574===_0x46920e(0xd9)&&_0x1d3574[_0x46920e(0xce)]()?_0x1d3574['trim']():undefined;}
1
+ (function(_0x160303,_0x3d5c4c){const _0x3bd872=a102_0x5928,_0x17e54c=_0x160303();while(!![]){try{const _0x5d9bd4=parseInt(_0x3bd872(0x1c7))/0x1+parseInt(_0x3bd872(0x1bb))/0x2*(-parseInt(_0x3bd872(0x1c4))/0x3)+parseInt(_0x3bd872(0x1cb))/0x4+-parseInt(_0x3bd872(0x1ba))/0x5+parseInt(_0x3bd872(0x1cd))/0x6+parseInt(_0x3bd872(0x1bd))/0x7+parseInt(_0x3bd872(0x1df))/0x8;if(_0x5d9bd4===_0x3d5c4c)break;else _0x17e54c['push'](_0x17e54c['shift']());}catch(_0x48ca46){_0x17e54c['push'](_0x17e54c['shift']());}}}(a102_0x9814,0xb1811));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a102_0x5928(_0x5160f2,_0x52a56d){_0x5160f2=_0x5160f2-0x1b8;const _0x9814b2=a102_0x9814();let _0x592819=_0x9814b2[_0x5160f2];return _0x592819;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x2cbe6f,_0x35fc41,_0x2edd60,_0x46b8bc,_0x12bd2f,_0x504564,_0x4df0dd){const _0x12f65e=a102_0x5928,_0x466efb=_0x504564?normalizeLocalFiles(_0x504564):[],_0x2853a4=!_0x4df0dd&&_0x466efb['length']>0x0?buildSkillPackage(_0x466efb):undefined,_0x1d78ba=_0x4df0dd?bufferSha256(_0x4df0dd):_0x2853a4?.[_0x12f65e(0x1c9)][_0x12f65e(0x1d0)],_0x558d15=_0x4df0dd?.[_0x12f65e(0x1c8)]??_0x2853a4?.[_0x12f65e(0x1c9)][_0x12f65e(0x1ce)],_0x17849b=_0x466efb[_0x12f65e(0x1c8)]>0x0?Object[_0x12f65e(0x1be)](_0x466efb['map'](_0x56819e=>[_0x56819e['path'],fileHash(_0x56819e)])):undefined;return{'schemaVersion':_0x466efb[_0x12f65e(0x1c8)]>0x0?0x2:0x1,'id':_0x2cbe6f['id'],'appCode':_0x2edd60,'skillCode':requireSkillCode(_0x2cbe6f),'skillName':_0x2cbe6f[_0x12f65e(0x1bc)],'description':_0x2cbe6f[_0x12f65e(0x1c6)],'scope':_0x35fc41,'readonly':_0x35fc41!==_0x12f65e(0x1db)||_0x2cbe6f[_0x12f65e(0x1dd)]===!![],'tenantCode':_0x2cbe6f[_0x12f65e(0x1cf)],'userId':_0x2cbe6f[_0x12f65e(0x1d9)],'version':_0x2cbe6f[_0x12f65e(0x1ca)],'status':_0x2cbe6f[_0x12f65e(0x1d5)],'tags':Array[_0x12f65e(0x1d7)](_0x2cbe6f[_0x12f65e(0x1d2)])?_0x2cbe6f[_0x12f65e(0x1d2)]:[],'hasUpstreamUpdate':_0x2cbe6f[_0x12f65e(0x1cc)],'forkedFromSkillId':_0x2cbe6f[_0x12f65e(0x1d1)],'forkedFromVersion':_0x2cbe6f[_0x12f65e(0x1bf)],'sourceSessionId':_0x2cbe6f['sourceSessionId'],'contentHash':_0x46b8bc,'fileHashes':_0x17849b,'treeHash':_0x466efb[_0x12f65e(0x1c8)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x466efb)):undefined,'ossPath':remoteManifestOssPath(_0x2cbe6f[_0x12f65e(0x1c5)]),'zipSha256':_0x1d78ba,'zipSize':_0x558d15,'files':_0x466efb['length']>0x0?_0x466efb[_0x12f65e(0x1c3)](_0x30d71f=>({'path':_0x30d71f[_0x12f65e(0x1dc)],'hash':fileHash(_0x30d71f),'size':fileContent(_0x30d71f)[_0x12f65e(0x1c8)]})):undefined,'pulledAt':_0x12bd2f??new Date()[_0x12f65e(0x1de)]()};}export function requireSkillCode(_0x47ea7b){const _0x43f97a=a102_0x5928,_0xa8f159=_0x47ea7b[_0x43f97a(0x1d6)]?.['trim']();if(!_0xa8f159)throw CliErrors[_0x43f97a(0x1b9)](_0x43f97a(0x1c2));return _0xa8f159;}export function readMetadataIfPresent(_0x7e79db){const _0x240962=a102_0x5928;if(!existsSync(_0x7e79db))return undefined;try{const _0x3419e2=JSON[_0x240962(0x1d3)](readFileSync(_0x7e79db,_0x240962(0x1c0)));return _0x3419e2;}catch{throw CliErrors[_0x240962(0x1b9)](_0x240962(0x1da)+METADATA_FILE+':\x20'+_0x7e79db);}}function a102_0x9814(){const _0x5ae123=['forkedFromSkillId','tags','parse','string','status','skillCode','isArray','object','userId','Invalid\x20','personal','path','readonly','toISOString','1892576XlcvyX','trim','validation','5797195PcOMqk','16xyBHti','skillName','9429721QHdxIF','fromEntries','forkedFromVersion','utf8','ossPath','Runtime\x20Skill\x20is\x20missing\x20skillCode.','map','405894woxIIv','files','description','654395zSDEwX','length','manifest','version','304116famTMN','hasUpstreamUpdate','3928686BsjliC','zipSize','tenantCode','zipSha256'];a102_0x9814=function(){return _0x5ae123;};return a102_0x9814();}function remoteManifestOssPath(_0x89942){const _0x5779d4=a102_0x5928;if(!_0x89942||typeof _0x89942!==_0x5779d4(0x1d8)||Array[_0x5779d4(0x1d7)](_0x89942))return undefined;const _0x394c66=_0x89942[_0x5779d4(0x1c1)];return typeof _0x394c66===_0x5779d4(0x1d4)&&_0x394c66[_0x5779d4(0x1b8)]()?_0x394c66['trim']():undefined;}
@@ -1 +1 @@
1
- const a103_0x441804=a103_0x2967;function a103_0x2967(_0x55a807,_0x22ec96){_0x55a807=_0x55a807-0x1b0;const _0x1d60ec=a103_0x1d60();let _0x29674e=_0x1d60ec[_0x55a807];return _0x29674e;}(function(_0x200bf9,_0x51d0df){const _0x506f92=a103_0x2967,_0x4258e5=_0x200bf9();while(!![]){try{const _0x51b352=-parseInt(_0x506f92(0x1be))/0x1+-parseInt(_0x506f92(0x1bd))/0x2*(-parseInt(_0x506f92(0x1c4))/0x3)+parseInt(_0x506f92(0x1ba))/0x4+-parseInt(_0x506f92(0x1c3))/0x5+-parseInt(_0x506f92(0x1b9))/0x6+-parseInt(_0x506f92(0x1b4))/0x7*(-parseInt(_0x506f92(0x1c5))/0x8)+parseInt(_0x506f92(0x1c0))/0x9;if(_0x51b352===_0x51d0df)break;else _0x4258e5['push'](_0x4258e5['shift']());}catch(_0x33afe7){_0x4258e5['push'](_0x4258e5['shift']());}}}(a103_0x1d60,0x50920));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3dd95d={}){const _0x5cec77=a103_0x2967,_0x4853b1=_0x3dd95d[_0x5cec77(0x1c6)]??homedir(),_0x360117=resolve(_0x4853b1,PRODUCT_CONFIG['homeDirName'],_0x5cec77(0x1bb)),_0xeb23b0=trimmedEnv(_0x5cec77(0x1bc)),_0x4d069f=trimmedEnv(_0x5cec77(0x1c2)),_0x453852=resolve(_0x4853b1,_0x5cec77(0x1b6)),_0x4c230c=_0x3dd95d['workbuddySkillsDir']??(existsSync(_0x453852)?resolve(_0x453852,_0x5cec77(0x1b5)):undefined);return{'homeDir':_0x4853b1,'cacheRoot':_0x360117,'managedRoot':resolve(_0x4853b1,PRODUCT_CONFIG[_0x5cec77(0x1c7)]),'agentsSkillsDir':_0x3dd95d[_0x5cec77(0x1b7)]??_0xeb23b0??resolve(_0x4853b1,_0x5cec77(0x1bf),_0x5cec77(0x1b5)),'claudeSkillsDir':_0x3dd95d[_0x5cec77(0x1cb)]??_0x4d069f??resolve(_0x4853b1,_0x5cec77(0x1b0),_0x5cec77(0x1b5)),'workbuddySkillsDir':_0x4c230c};}export function runtimeAgentSkillRoots(_0x4957fd){const _0x5b95d2=a103_0x2967;return[_0x4957fd[_0x5b95d2(0x1b7)],_0x4957fd[_0x5b95d2(0x1cb)],_0x4957fd[_0x5b95d2(0x1b3)]][_0x5b95d2(0x1c8)](_0x26e213=>Boolean(_0x26e213));}export function getRuntimeSkillCacheRoot(_0x40ff9e,_0x1f0620,_0x2437b8={}){const _0x3bd2e3=a103_0x2967,_0x2a520c=resolveSkillSyncPaths(_0x2437b8);return resolve(_0x2a520c['cacheRoot'],_0x40ff9e,fingerprintAccessKey(_0x1f0620),_0x3bd2e3(0x1b5));}function a103_0x1d60(){const _0x502aef=['2019aizQBA','1138680LzLbzB','homeDir','homeDirName','filter','path\x20segment','appCode','claudeSkillsDir','.claude','trim','skillCode','workbuddySkillsDir','14hvTOSS','skills','.workbuddy','agentsSkillsDir','includes','3928080UAJBaJ','1094676PFiUop','cache','SKILL_ROOT','508yMgFek','487452OwKGPi','.agents','12405294rLzJHO','Unsafe\x20','CLAUDE_SKILL_ROOT','3177495dCsxWg'];a103_0x1d60=function(){return _0x502aef;};return a103_0x1d60();}export function getRuntimeSkillDir(_0x5ed0c0,_0x54ed2f,_0x2e506d,_0x16af7f,_0x26ece4,_0x1c0355={}){const _0x4d9d8f=a103_0x2967;return resolve(getRuntimeSkillCacheRoot(_0x5ed0c0,_0x54ed2f,_0x1c0355),safePathSegment(_0x2e506d,_0x4d9d8f(0x1ca)),_0x16af7f,safePathSegment(_0x26ece4,_0x4d9d8f(0x1b2)));}export function safePathSegment(_0xb90b04,_0x9cb37a=a103_0x441804(0x1c9)){const _0x33c502=a103_0x441804;if(!_0xb90b04||_0xb90b04['includes']('/')||_0xb90b04['includes']('\x5c')||_0xb90b04[_0x33c502(0x1b8)]('..'))throw CliErrors['validation'](_0x33c502(0x1c1)+_0x9cb37a+'\x20for\x20local\x20path:\x20'+_0xb90b04);return _0xb90b04;}function trimmedEnv(_0x2e4bb4){const _0x2223ef=a103_0x441804,_0xf2f461=productEnv(_0x2e4bb4)?.[_0x2223ef(0x1b1)]();return _0xf2f461?_0xf2f461:undefined;}
1
+ const a103_0x552df6=a103_0x7b36;(function(_0x76ca26,_0x38ba97){const _0x5a542a=a103_0x7b36,_0x75e1c0=_0x76ca26();while(!![]){try{const _0x133647=-parseInt(_0x5a542a(0xba))/0x1*(parseInt(_0x5a542a(0xb3))/0x2)+parseInt(_0x5a542a(0xb6))/0x3*(-parseInt(_0x5a542a(0xc2))/0x4)+-parseInt(_0x5a542a(0xbc))/0x5+parseInt(_0x5a542a(0xae))/0x6+-parseInt(_0x5a542a(0xaf))/0x7*(parseInt(_0x5a542a(0xbf))/0x8)+-parseInt(_0x5a542a(0xc4))/0x9+-parseInt(_0x5a542a(0xb5))/0xa*(-parseInt(_0x5a542a(0xc6))/0xb);if(_0x133647===_0x38ba97)break;else _0x75e1c0['push'](_0x75e1c0['shift']());}catch(_0x4aaccb){_0x75e1c0['push'](_0x75e1c0['shift']());}}}(a103_0x1214,0xb659f));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x25d553={}){const _0x5646d5=a103_0x7b36,_0x482299=_0x25d553[_0x5646d5(0xac)]??homedir(),_0x1a1d19=resolve(_0x482299,PRODUCT_CONFIG[_0x5646d5(0xc5)],_0x5646d5(0xbb)),_0x4bb9d1=trimmedEnv(_0x5646d5(0xc0)),_0x234bd3=trimmedEnv(_0x5646d5(0xaa)),_0x450728=resolve(_0x482299,_0x5646d5(0xb4)),_0x2bc3b9=_0x25d553['workbuddySkillsDir']??(existsSync(_0x450728)?resolve(_0x450728,_0x5646d5(0xbd)):undefined);return{'homeDir':_0x482299,'cacheRoot':_0x1a1d19,'managedRoot':resolve(_0x482299,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x25d553['agentsSkillsDir']??_0x4bb9d1??resolve(_0x482299,_0x5646d5(0xad),_0x5646d5(0xbd)),'claudeSkillsDir':_0x25d553['claudeSkillsDir']??_0x234bd3??resolve(_0x482299,_0x5646d5(0xb2),_0x5646d5(0xbd)),'workbuddySkillsDir':_0x2bc3b9};}export function runtimeAgentSkillRoots(_0xa1b0d0){const _0x4d5a40=a103_0x7b36;return[_0xa1b0d0[_0x4d5a40(0xb0)],_0xa1b0d0['claudeSkillsDir'],_0xa1b0d0[_0x4d5a40(0xb1)]][_0x4d5a40(0xc3)](_0x36cecd=>Boolean(_0x36cecd));}function a103_0x7b36(_0x5dbc2d,_0x34ecd9){_0x5dbc2d=_0x5dbc2d-0xaa;const _0x1214c9=a103_0x1214();let _0x7b3685=_0x1214c9[_0x5dbc2d];return _0x7b3685;}export function getRuntimeSkillCacheRoot(_0x11a5d4,_0x426618,_0x4cfef3={}){const _0x19d2ee=a103_0x7b36,_0x1df1c4=resolveSkillSyncPaths(_0x4cfef3);return resolve(_0x1df1c4['cacheRoot'],_0x11a5d4,fingerprintAccessKey(_0x426618),_0x19d2ee(0xbd));}function a103_0x1214(){const _0x3b928d=['969aNMZkR','\x20for\x20local\x20path:\x20','appCode','path\x20segment','1357nZZhiB','cache','4191195fFYKGf','skills','Unsafe\x20','1488VhRPlM','SKILL_ROOT','validation','3748tNRlSd','filter','423819lKUDPo','homeDirName','231LMUAwd','CLAUDE_SKILL_ROOT','includes','homeDir','.agents','7227096PIAKJK','36680KKArNP','agentsSkillsDir','workbuddySkillsDir','.claude','2138XxKTbL','.workbuddy','1502690qAAheW'];a103_0x1214=function(){return _0x3b928d;};return a103_0x1214();}export function getRuntimeSkillDir(_0x29e7b6,_0x2f0bba,_0x1ccecf,_0x7cb0a5,_0x4950a0,_0x5648c3={}){const _0xc1745f=a103_0x7b36;return resolve(getRuntimeSkillCacheRoot(_0x29e7b6,_0x2f0bba,_0x5648c3),safePathSegment(_0x1ccecf,_0xc1745f(0xb8)),_0x7cb0a5,safePathSegment(_0x4950a0,'skillCode'));}export function safePathSegment(_0x2b10f8,_0x436bee=a103_0x552df6(0xb9)){const _0x31c71b=a103_0x552df6;if(!_0x2b10f8||_0x2b10f8[_0x31c71b(0xab)]('/')||_0x2b10f8[_0x31c71b(0xab)]('\x5c')||_0x2b10f8[_0x31c71b(0xab)]('..'))throw CliErrors[_0x31c71b(0xc1)](_0x31c71b(0xbe)+_0x436bee+_0x31c71b(0xb7)+_0x2b10f8);return _0x2b10f8;}function trimmedEnv(_0x31a27d){const _0x2ca958=productEnv(_0x31a27d)?.['trim']();return _0x2ca958?_0x2ca958:undefined;}