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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/index.js +1 -1
  41. package/lib/commands/service/registry.js +1 -1
  42. package/lib/commands/skill/commands/create.js +1 -1
  43. package/lib/commands/skill/commands/install.js +1 -1
  44. package/lib/commands/skill/commands/list.js +1 -1
  45. package/lib/commands/skill/commands/push.js +1 -1
  46. package/lib/commands/skill/commands/validate.js +1 -1
  47. package/lib/commands/skill/flags.js +1 -1
  48. package/lib/commands/skill/index.js +1 -1
  49. package/lib/commands/skill/manifest-helpers.js +1 -1
  50. package/lib/commands/skill/push-execute.js +1 -1
  51. package/lib/commands/skill/push-flow-helpers.js +1 -1
  52. package/lib/commands/skill/push-retarget.js +1 -1
  53. package/lib/commands/skill/scopes.js +1 -1
  54. package/lib/commands/skill/summary.js +1 -1
  55. package/lib/commands/skill/templates.js +1 -1
  56. package/lib/commands/skill/validate.js +1 -1
  57. package/lib/commands/sql/detail.js +1 -1
  58. package/lib/commands/sql/exec.js +1 -1
  59. package/lib/commands/sql/index.js +1 -1
  60. package/lib/commands/update.js +1 -1
  61. package/lib/commands/workspace/index.js +1 -1
  62. package/lib/config/schema.js +1 -1
  63. package/lib/constant/app.js +1 -1
  64. package/lib/constant/auth-mode.js +1 -1
  65. package/lib/constant/cli.js +1 -1
  66. package/lib/constant/defaults.js +1 -1
  67. package/lib/constant/distribution.js +1 -1
  68. package/lib/constant/domain.js +1 -1
  69. package/lib/constant/env.js +1 -1
  70. package/lib/constant/output.js +1 -1
  71. package/lib/constant/product.js +1 -1
  72. package/lib/constant/risk.js +1 -1
  73. package/lib/constant/url.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/db-resolver.js +1 -1
  77. package/lib/core/sdk-client.js +1 -1
  78. package/lib/errors.js +1 -1
  79. package/lib/framework/build-all-flags.js +1 -1
  80. package/lib/framework/dryrun.js +1 -1
  81. package/lib/framework/flags.js +1 -1
  82. package/lib/framework/help.js +1 -1
  83. package/lib/framework/index.js +1 -1
  84. package/lib/framework/output.js +1 -1
  85. package/lib/framework/preparse.js +1 -1
  86. package/lib/framework/response.js +1 -1
  87. package/lib/framework/runner-confirmation.js +1 -1
  88. package/lib/framework/runner-error.js +1 -1
  89. package/lib/framework/runner.js +1 -1
  90. package/lib/framework/schema-export.js +1 -1
  91. package/lib/framework/service-order.js +1 -1
  92. package/lib/framework/types.js +1 -1
  93. package/lib/generated/build-info.js +1 -1
  94. package/lib/help.js +1 -1
  95. package/lib/skills/npx-skills-add.js +1 -1
  96. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  97. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  98. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  99. package/lib/skills/runtime-skill-sync/links.js +1 -1
  100. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  101. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  102. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  103. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  104. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  105. package/lib/skills/runtime-skill-sync/push.js +1 -1
  106. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  107. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  108. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  109. package/lib/skills/runtime-skill-sync.js +1 -1
  110. package/lib/utils/apply-jq-filter.js +1 -1
  111. package/lib/utils/logger.js +1 -1
  112. package/lib/utils/params.js +1 -1
  113. package/lib/utils/platform.js +1 -1
  114. package/lib/utils/update-notice.js +1 -1
  115. package/lib/utils/version.js +1 -1
  116. package/lib/utils/write-cli-side-channel.js +1 -1
  117. package/package.json +1 -1
@@ -1 +1 @@
1
- const a88_0x1dcf10=a88_0xde3e;(function(_0x8d26ae,_0x407ac9){const _0x2f89d2=a88_0xde3e,_0x435195=_0x8d26ae();while(!![]){try{const _0x3d9cb0=-parseInt(_0x2f89d2(0x18e))/0x1+parseInt(_0x2f89d2(0x172))/0x2*(-parseInt(_0x2f89d2(0x15b))/0x3)+-parseInt(_0x2f89d2(0x17c))/0x4*(parseInt(_0x2f89d2(0x182))/0x5)+-parseInt(_0x2f89d2(0x17a))/0x6+-parseInt(_0x2f89d2(0x186))/0x7*(-parseInt(_0x2f89d2(0x159))/0x8)+-parseInt(_0x2f89d2(0x165))/0x9+-parseInt(_0x2f89d2(0x194))/0xa*(-parseInt(_0x2f89d2(0x18b))/0xb);if(_0x3d9cb0===_0x407ac9)break;else _0x435195['push'](_0x435195['shift']());}catch(_0x1a596a){_0x435195['push'](_0x435195['shift']());}}}(a88_0x2ef9,0xea6a5));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';function a88_0x2ef9(){const _0x26ada5=['isNonInteractive','.appcode\x20to\x20','execute','../core/api-client.js','service','defaultApp','validation','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','70677NYDHZJ','schema','production','appCodeSource','ACCESS_KEY','newConfigFileName','authRequired','includes','requiresAuth','configMissing','Unknown\x20app:\x20','../core/sdk-client.js','doctor','21674yjuzDh','mergedCli','update','riskLevel','defaultPageSize','pretty','filter','High-risk\x20operation\x20`','4614474zLujbr','app','1360356InvkCG','defaultVerbose','error','appCode','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','Run\x20`','25UBlzLd','currentApp','name','items','170975GBHuai','verbose','appcode','format','map','121XmLkNQ','accessKey','env','10238eGOSvL','cancelled','string','pageSize','apiDomain','rawFlags','3179130zsQDgR','APPCODE','_notice','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','object','requiresAppCode','local-alias','../commands/app/remote-source.js','424nNORyN','trim','372JxRKwJ','ClientAk'];a88_0x2ef9=function(){return _0x26ada5;};return a88_0x2ef9();}import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';function a88_0xde3e(_0x5aa338,_0x4b3aa1){_0x5aa338=_0x5aa338-0x158;const _0x2ef924=a88_0x2ef9();let _0xde3e91=_0x2ef924[_0x5aa338];return _0xde3e91;}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(_0x577aae){const _0x14f9b4=a88_0xde3e;return void _0x577aae,AUTH_MODE[_0x14f9b4(0x15c)];}export function createPipelineEnv(_0x3c2af2,_0x10aebc){const _0x59b4b3=a88_0xde3e,_0x789aa=typeof _0x10aebc[_0x59b4b3(0x17b)]===_0x59b4b3(0x190)&&_0x10aebc['app'][_0x59b4b3(0x15a)]();return{'rawFlags':_0x10aebc,'appCode':_0x3c2af2[_0x59b4b3(0x17f)]||productEnv(_0x59b4b3(0x195))||(_0x789aa?undefined:readAppCodeFromConfig()),'appCodeSource':_0x3c2af2[_0x59b4b3(0x168)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x10aebc),'defaultFormat':_0x3c2af2[_0x59b4b3(0x189)],'defaultPageSize':_0x3c2af2[_0x59b4b3(0x191)],'defaultVerbose':_0x3c2af2[_0x59b4b3(0x187)],'riskLevel':_0x3c2af2[_0x59b4b3(0x175)],'accessKey':_0x3c2af2[_0x59b4b3(0x18c)],'env':_0x3c2af2['env'],'mergedCli':{'defaultApp':_0x3c2af2['defaultApp'],'currentApp':_0x3c2af2[_0x59b4b3(0x183)],'appCode':_0x3c2af2[_0x59b4b3(0x17f)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x1dcf10(0x178)](_0x5de768=>PIPELINE_FLAG_NAMES['has'](_0x5de768[a88_0x1dcf10(0x184)]))[a88_0x1dcf10(0x18a)](({name:_0x1be36a,type:_0x48635c,description:_0x23a775})=>({'name':_0x1be36a,'type':_0x48635c,'description':_0x23a775})),'formatOutput':formatOutput,'getCommandLabel'(_0x428de6){const _0xe940dc=a88_0x1dcf10;return CLI_BIN_NAME+'\x20'+_0x428de6[_0xe940dc(0x161)]+'\x20'+_0x428de6['command'];},'riskPolicy':{'onViolation'(_0x40d1ca){const _0xadbd07=a88_0x1dcf10;console[_0xadbd07(0x17e)](_0x40d1ca);},'createError'(_0xbd3b12){const _0x1d092b=a88_0x1dcf10;return CliErrors[_0x1d092b(0x18f)](_0xbd3b12);}},async 'prepare'(_0x34f7bf,_0x118029){const _0x26bf06=a88_0x1dcf10,_0x4c2354=resolveAuthMode(_0x118029);if(_0x34f7bf[_0x26bf06(0x16d)]!==![]){if(!_0x118029[_0x26bf06(0x18c)])throw CliErrors[_0x26bf06(0x16b)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x26bf06(0x16a)]+'\x20or\x20pass\x20'+productEnvName(_0x26bf06(0x169))+'.');const {setActiveAK:_0x5bdf0b}=await import(_0x26bf06(0x160));_0x5bdf0b(_0x118029[_0x26bf06(0x18c)]);}let _0x125099='';if(_0x34f7bf[_0x26bf06(0x199)]!==![]){_0x125099=_0x118029[_0x26bf06(0x17f)]??'',_0x125099=await resolveExplicitAppName(_0x34f7bf,_0x118029,_0x125099);if(!_0x125099){await assertSelectedAppNameIsRuntimeAccessible(_0x34f7bf,_0x118029);throw CliErrors[_0x26bf06(0x16e)](_0x26bf06(0x180)+PRODUCT_CONFIG[_0x26bf06(0x16a)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x34f7bf,_0x118029,_0x125099);}if(_0x125099){const {initSdkClient:_0x555e1a}=await import(_0x26bf06(0x170));_0x555e1a({'appCode':_0x125099,'env':_0x118029[_0x26bf06(0x18d)]??'production','accessKey':_0x118029['accessKey'],'authMode':_0x4c2354});}return{'defaults':{'booleans':{'verbose':_0x118029[_0x26bf06(0x17d)]},'numbers':{'pagesize':_0x118029[_0x26bf06(0x176)]}},'extras':{'appCode':_0x125099,'cookie':'','apiDomain':_0x118029[_0x26bf06(0x192)],'apiDir':'','accessKey':_0x118029[_0x26bf06(0x18c)],'envName':_0x118029['env'],'mergedCli':_0x118029[_0x26bf06(0x173)]}};},async 'confirmHighRisk'({def:_0x1bb2dd,env:_0x5bd980,flags:_0x27edf2,commandLabel:_0x1ccdba}){const _0x2aa2f9=a88_0x1dcf10;if(_0x5bd980[_0x2aa2f9(0x15d)]){const _0x4e17ec=reconstructCommandArgv(_0x1bb2dd,_0x27edf2);throw CliErrors[_0x2aa2f9(0x163)](_0x2aa2f9(0x179)+_0x1ccdba+_0x2aa2f9(0x164)+('\x20\x20To\x20proceed:\x20'+_0x4e17ec));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1bb2dd,_0x1ccdba,_0x27edf2),'createCancelledError':_0x2892f1=>CliErrors[_0x2aa2f9(0x18f)](_0x2892f1)});},'mapDryRunError'(_0x156ec3){return mapUserFacingExecuteError(_0x156ec3);},'mapExecuteError'(_0x366d60){return mapUserFacingExecuteError(_0x366d60);},async 'finalize'(){const _0x5e553a=a88_0x1dcf10,{clearActiveAK:_0x5a9181}=await import(_0x5e553a(0x160));_0x5a9181();}};async function resolveExplicitAppName(_0x160239,_0x83f0e1,_0x210c4f){const _0x5f3e6c=a88_0x1dcf10;if(_0x160239['requiresAppCode']===![])return _0x210c4f;const _0x594815=typeof _0x83f0e1[_0x5f3e6c(0x193)][_0x5f3e6c(0x17b)]===_0x5f3e6c(0x190)?_0x83f0e1[_0x5f3e6c(0x193)]['app'][_0x5f3e6c(0x15a)]():'';if(!_0x594815)return _0x210c4f;const _0x4a6a41=typeof _0x83f0e1[_0x5f3e6c(0x193)][_0x5f3e6c(0x188)]===_0x5f3e6c(0x190)&&_0x83f0e1['rawFlags'][_0x5f3e6c(0x188)][_0x5f3e6c(0x15a)]()||productEnv(_0x5f3e6c(0x195));if(_0x4a6a41||_0x83f0e1['appCodeSource']===_0x5f3e6c(0x19a))return _0x210c4f;const {getRemoteAppList:_0x1c74dd}=await import('../commands/app/remote-source.js'),_0x37711c=await _0x1c74dd({'env':_0x83f0e1['env']??'production','accessKey':_0x83f0e1['accessKey']}),_0xf729a1=findAppByName(_0x37711c[_0x5f3e6c(0x185)],_0x594815);if(_0xf729a1&&!isRuntimeAccessibleApp(_0xf729a1))throw runtimeInaccessibleAppError(_0xf729a1,'\x22'+_0x594815+'\x22');const _0x348e9d=_0xf729a1?.[_0x5f3e6c(0x17f)]?.['trim']();if(_0x348e9d)return _0x348e9d;throw CliErrors['validation'](_0x5f3e6c(0x16f)+_0x594815,_0x5f3e6c(0x181)+CLI_BIN_NAME+_0x5f3e6c(0x197)+_0x594815+_0x5f3e6c(0x15e)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1e25e6,_0x593685){const _0x4bca02=a88_0x1dcf10;if(_0x1e25e6[_0x4bca02(0x199)]===![]||!_0x593685[_0x4bca02(0x18c)])return;const _0x3bf0b9=(typeof _0x593685[_0x4bca02(0x193)][_0x4bca02(0x17b)]==='string'&&_0x593685[_0x4bca02(0x193)][_0x4bca02(0x17b)][_0x4bca02(0x15a)]()?_0x593685[_0x4bca02(0x193)][_0x4bca02(0x17b)]:_0x593685[_0x4bca02(0x173)]?.[_0x4bca02(0x183)]??_0x593685[_0x4bca02(0x173)]?.[_0x4bca02(0x162)])?.['trim']();if(!_0x3bf0b9)return;const {getRemoteAppList:_0x4ed495}=await import('../commands/app/remote-source.js'),_0x118d5c=await _0x4ed495({'env':_0x593685[_0x4bca02(0x18d)]??_0x4bca02(0x167),'accessKey':_0x593685[_0x4bca02(0x18c)]}),_0x3f9f50=findAppByName(_0x118d5c[_0x4bca02(0x185)],_0x3bf0b9);if(_0x3f9f50&&!isRuntimeAccessibleApp(_0x3f9f50))throw runtimeInaccessibleAppError(_0x3f9f50,'\x22'+_0x3bf0b9+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x4250c2,_0x4fa4c6,_0x566445){const _0x222d0d=a88_0x1dcf10;if(_0x4250c2['requiresAppCode']===![]||!_0x4fa4c6[_0x222d0d(0x18c)])return;const {getRemoteAppList:_0x1bc997}=await import(_0x222d0d(0x158)),_0x256ad4=await _0x1bc997({'env':_0x4fa4c6[_0x222d0d(0x18d)]??'production','accessKey':_0x4fa4c6['accessKey']}),_0x46b3b4=findAppByCode(_0x256ad4[_0x222d0d(0x185)],_0x566445);if(_0x46b3b4&&!isRuntimeAccessibleApp(_0x46b3b4))throw runtimeInaccessibleAppError(_0x46b3b4,'appcode\x20\x22'+_0x566445+'\x22');}export async function runCommand(_0x5af4e6,_0x228bd4){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x5af4e6)?withUpdateNotice(_0x5af4e6):_0x5af4e6,_0x228bd4,runnerAdapter);}function shouldAttachUpdateNotice(_0xc1ad0b){const _0x492c24=a88_0x1dcf10;return![_0x492c24(0x174),_0x492c24(0x166),_0x492c24(0x171)][_0x492c24(0x16c)](_0xc1ad0b[_0x492c24(0x161)]);}function withUpdateNotice(_0x200929){return{..._0x200929,async 'execute'(_0x475dc4){const _0x59792a=a88_0xde3e,_0x4d0361=shouldResolveUpdateNotice(_0x475dc4)?resolveLatestUpdateNotice()['catch'](()=>null):Promise['resolve'](null),_0x4fb196=await _0x200929[_0x59792a(0x15f)](_0x475dc4);return attachUpdateNotice(_0x4fb196,await _0x4d0361);}};}function shouldResolveUpdateNotice(_0x39521d){const _0x432ef5=a88_0x1dcf10;return _0x39521d[_0x432ef5(0x189)]===_0x432ef5(0x177)&&!_0x39521d['nonInteractive'];}function attachUpdateNotice(_0x3b3b9f,_0x45aa03){const _0x257774=a88_0x1dcf10;if(!_0x45aa03||!_0x3b3b9f||typeof _0x3b3b9f!==_0x257774(0x198))return _0x3b3b9f;const _0x3ee97f=_0x3b3b9f,_0x4866dc=typeof _0x3ee97f[_0x257774(0x196)]==='object'&&_0x3ee97f[_0x257774(0x196)]!==null?_0x3ee97f[_0x257774(0x196)]:{};return{..._0x3ee97f,'_notice':{..._0x4866dc,'update':_0x45aa03}};}
1
+ const a88_0x17d848=a88_0x2a7c;(function(_0x44e6a4,_0x2d192b){const _0xf9f2d=a88_0x2a7c,_0x554af2=_0x44e6a4();while(!![]){try{const _0x1ea9a7=parseInt(_0xf9f2d(0x14d))/0x1*(parseInt(_0xf9f2d(0x135))/0x2)+parseInt(_0xf9f2d(0x150))/0x3*(parseInt(_0xf9f2d(0x12b))/0x4)+parseInt(_0xf9f2d(0x153))/0x5*(-parseInt(_0xf9f2d(0x12e))/0x6)+parseInt(_0xf9f2d(0x14b))/0x7+-parseInt(_0xf9f2d(0x128))/0x8*(parseInt(_0xf9f2d(0x125))/0x9)+parseInt(_0xf9f2d(0x139))/0xa*(parseInt(_0xf9f2d(0x147))/0xb)+-parseInt(_0xf9f2d(0x14f))/0xc;if(_0x1ea9a7===_0x2d192b)break;else _0x554af2['push'](_0x554af2['shift']());}catch(_0x3165a9){_0x554af2['push'](_0x554af2['shift']());}}}(a88_0x5ab7,0xc9e58));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a88_0x5ab7(){const _0x2c75fa=['1115901lkZGOT','app','pageSize','40XZfjrZ','appcode','../core/api-client.js','8LOBdXL','env','authRequired','1614162FELKAu','items','../commands/app/remote-source.js','execute','pretty','mergedCli','nonInteractive','2CFVrtd','format','newConfigFileName','\x20\x20To\x20proceed:\x20','10EuPFXU','currentApp','defaultPageSize','includes','accessKey','name','string','isNonInteractive','ACCESS_KEY','verbose','has','production','Unknown\x20app:\x20','validation','8756737NbgdVO','apiDomain','local-alias','cancelled','10463684QdJWzW','rawFlags','659641rTuSlu','APPCODE','12769080mgOFec','1358427CplwjP','object','riskLevel','25TCtXmy','trim','filter','ClientAk','_notice','doctor','\x20or\x20pass\x20','requiresAppCode','defaultApp','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','requiresAuth','appCodeSource','defaultVerbose','appCode','catch','schema','service'];a88_0x5ab7=function(){return _0x2c75fa;};return a88_0x5ab7();}import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';function a88_0x2a7c(_0x47be6c,_0x1e64a9){_0x47be6c=_0x47be6c-0x121;const _0x5ab7be=a88_0x5ab7();let _0x2a7cc1=_0x5ab7be[_0x47be6c];return _0x2a7cc1;}import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x4727da){const _0x183925=a88_0x2a7c;return void _0x4727da,AUTH_MODE[_0x183925(0x156)];}export function createPipelineEnv(_0x439e58,_0x4990ed){const _0x192d3c=a88_0x2a7c,_0x2371c9=typeof _0x4990ed[_0x192d3c(0x126)]===_0x192d3c(0x13f)&&_0x4990ed[_0x192d3c(0x126)]['trim']();return{'rawFlags':_0x4990ed,'appCode':_0x439e58['appCode']||productEnv(_0x192d3c(0x14e))||(_0x2371c9?undefined:readAppCodeFromConfig()),'appCodeSource':_0x439e58[_0x192d3c(0x15e)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x4990ed),'defaultFormat':_0x439e58[_0x192d3c(0x136)],'defaultPageSize':_0x439e58[_0x192d3c(0x127)],'defaultVerbose':_0x439e58[_0x192d3c(0x142)],'riskLevel':_0x439e58[_0x192d3c(0x152)],'accessKey':_0x439e58[_0x192d3c(0x13d)],'env':_0x439e58[_0x192d3c(0x12c)],'mergedCli':{'defaultApp':_0x439e58[_0x192d3c(0x15b)],'currentApp':_0x439e58[_0x192d3c(0x13a)],'appCode':_0x439e58[_0x192d3c(0x121)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a88_0x17d848(0x155)](_0x32aa0e=>PIPELINE_FLAG_NAMES[a88_0x17d848(0x143)](_0x32aa0e[a88_0x17d848(0x13e)]))['map'](({name:_0x3f7db5,type:_0x40af4d,description:_0x315c1b})=>({'name':_0x3f7db5,'type':_0x40af4d,'description':_0x315c1b})),'formatOutput':formatOutput,'getCommandLabel'(_0x2d9e01){return CLI_BIN_NAME+'\x20'+_0x2d9e01['service']+'\x20'+_0x2d9e01['command'];},'riskPolicy':{'onViolation'(_0x56352d){console['error'](_0x56352d);},'createError'(_0x3b97f5){return CliErrors['cancelled'](_0x3b97f5);}},async 'prepare'(_0x3abe5a,_0x2b27c1){const _0x8bbefe=a88_0x17d848,_0x136db2=resolveAuthMode(_0x2b27c1);if(_0x3abe5a[_0x8bbefe(0x15d)]!==![]){if(!_0x2b27c1[_0x8bbefe(0x13d)])throw CliErrors[_0x8bbefe(0x12d)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x8bbefe(0x137)]+_0x8bbefe(0x159)+productEnvName(_0x8bbefe(0x141))+'.');const {setActiveAK:_0x42c359}=await import('../core/api-client.js');_0x42c359(_0x2b27c1[_0x8bbefe(0x13d)]);}let _0x7be541='';if(_0x3abe5a[_0x8bbefe(0x15a)]!==![]){_0x7be541=_0x2b27c1['appCode']??'',_0x7be541=await resolveExplicitAppName(_0x3abe5a,_0x2b27c1,_0x7be541);if(!_0x7be541){await assertSelectedAppNameIsRuntimeAccessible(_0x3abe5a,_0x2b27c1);throw CliErrors['configMissing'](_0x8bbefe(0x15c)+PRODUCT_CONFIG[_0x8bbefe(0x137)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3abe5a,_0x2b27c1,_0x7be541);}if(_0x7be541){const {initSdkClient:_0x3bdc66}=await import('../core/sdk-client.js');_0x3bdc66({'appCode':_0x7be541,'env':_0x2b27c1[_0x8bbefe(0x12c)]??_0x8bbefe(0x144),'accessKey':_0x2b27c1[_0x8bbefe(0x13d)],'authMode':_0x136db2});}return{'defaults':{'booleans':{'verbose':_0x2b27c1[_0x8bbefe(0x15f)]},'numbers':{'pagesize':_0x2b27c1[_0x8bbefe(0x13b)]}},'extras':{'appCode':_0x7be541,'cookie':'','apiDomain':_0x2b27c1[_0x8bbefe(0x148)],'apiDir':'','accessKey':_0x2b27c1[_0x8bbefe(0x13d)],'envName':_0x2b27c1['env'],'mergedCli':_0x2b27c1[_0x8bbefe(0x133)]}};},async 'confirmHighRisk'({def:_0xc6777d,env:_0x2c1e1f,flags:_0x3ba064,commandLabel:_0x235854}){const _0xb13b18=a88_0x17d848;if(_0x2c1e1f[_0xb13b18(0x140)]){const _0x333e78=reconstructCommandArgv(_0xc6777d,_0x3ba064);throw CliErrors[_0xb13b18(0x146)]('High-risk\x20operation\x20`'+_0x235854+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0xb13b18(0x138)+_0x333e78));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0xc6777d,_0x235854,_0x3ba064),'createCancelledError':_0x57583c=>CliErrors[_0xb13b18(0x14a)](_0x57583c)});},'mapDryRunError'(_0x4f949f){return mapUserFacingExecuteError(_0x4f949f);},'mapExecuteError'(_0x301407){return mapUserFacingExecuteError(_0x301407);},async 'finalize'(){const _0x24b04b=a88_0x17d848,{clearActiveAK:_0xc08407}=await import(_0x24b04b(0x12a));_0xc08407();}};async function resolveExplicitAppName(_0x44f5b4,_0x4ffa9a,_0xe2a6e8){const _0x3c0192=a88_0x17d848;if(_0x44f5b4[_0x3c0192(0x15a)]===![])return _0xe2a6e8;const _0x22ade0=typeof _0x4ffa9a['rawFlags'][_0x3c0192(0x126)]===_0x3c0192(0x13f)?_0x4ffa9a[_0x3c0192(0x14c)]['app'][_0x3c0192(0x154)]():'';if(!_0x22ade0)return _0xe2a6e8;const _0x2289af=typeof _0x4ffa9a[_0x3c0192(0x14c)][_0x3c0192(0x129)]==='string'&&_0x4ffa9a[_0x3c0192(0x14c)][_0x3c0192(0x129)][_0x3c0192(0x154)]()||productEnv(_0x3c0192(0x14e));if(_0x2289af||_0x4ffa9a[_0x3c0192(0x15e)]===_0x3c0192(0x149))return _0xe2a6e8;const {getRemoteAppList:_0x3bee1a}=await import(_0x3c0192(0x130)),_0x7908a3=await _0x3bee1a({'env':_0x4ffa9a['env']??_0x3c0192(0x144),'accessKey':_0x4ffa9a[_0x3c0192(0x13d)]}),_0x4b0e3c=findAppByName(_0x7908a3[_0x3c0192(0x12f)],_0x22ade0);if(_0x4b0e3c&&!isRuntimeAccessibleApp(_0x4b0e3c))throw runtimeInaccessibleAppError(_0x4b0e3c,'\x22'+_0x22ade0+'\x22');const _0x134c5c=_0x4b0e3c?.['appCode']?.[_0x3c0192(0x154)]();if(_0x134c5c)return _0x134c5c;throw CliErrors[_0x3c0192(0x146)](_0x3c0192(0x145)+_0x22ade0,'Run\x20`'+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x22ade0+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x3c0192(0x137)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0xbda7e6,_0x145571){const _0x143197=a88_0x17d848;if(_0xbda7e6[_0x143197(0x15a)]===![]||!_0x145571[_0x143197(0x13d)])return;const _0x1f0a4b=(typeof _0x145571[_0x143197(0x14c)][_0x143197(0x126)]===_0x143197(0x13f)&&_0x145571[_0x143197(0x14c)][_0x143197(0x126)]['trim']()?_0x145571[_0x143197(0x14c)][_0x143197(0x126)]:_0x145571[_0x143197(0x133)]?.[_0x143197(0x13a)]??_0x145571[_0x143197(0x133)]?.[_0x143197(0x15b)])?.['trim']();if(!_0x1f0a4b)return;const {getRemoteAppList:_0x3192c0}=await import(_0x143197(0x130)),_0x30480d=await _0x3192c0({'env':_0x145571['env']??_0x143197(0x144),'accessKey':_0x145571[_0x143197(0x13d)]}),_0x1f620e=findAppByName(_0x30480d['items'],_0x1f0a4b);if(_0x1f620e&&!isRuntimeAccessibleApp(_0x1f620e))throw runtimeInaccessibleAppError(_0x1f620e,'\x22'+_0x1f0a4b+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x42569b,_0x46bb10,_0xa683d6){const _0x224964=a88_0x17d848;if(_0x42569b[_0x224964(0x15a)]===![]||!_0x46bb10[_0x224964(0x13d)])return;const {getRemoteAppList:_0x2447af}=await import(_0x224964(0x130)),_0x49702f=await _0x2447af({'env':_0x46bb10[_0x224964(0x12c)]??'production','accessKey':_0x46bb10['accessKey']}),_0x4d1d80=findAppByCode(_0x49702f[_0x224964(0x12f)],_0xa683d6);if(_0x4d1d80&&!isRuntimeAccessibleApp(_0x4d1d80))throw runtimeInaccessibleAppError(_0x4d1d80,'appcode\x20\x22'+_0xa683d6+'\x22');}export async function runCommand(_0x2453e4,_0x1a7c6e){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2453e4)?withUpdateNotice(_0x2453e4):_0x2453e4,_0x1a7c6e,runnerAdapter);}function shouldAttachUpdateNotice(_0x28e010){const _0x4da613=a88_0x17d848;return!['update',_0x4da613(0x123),_0x4da613(0x158)][_0x4da613(0x13c)](_0x28e010[_0x4da613(0x124)]);}function withUpdateNotice(_0x3f1d22){return{..._0x3f1d22,async 'execute'(_0x22c3cf){const _0x3039a=a88_0x2a7c,_0x236bdc=shouldResolveUpdateNotice(_0x22c3cf)?resolveLatestUpdateNotice()[_0x3039a(0x122)](()=>null):Promise['resolve'](null),_0x3fa06f=await _0x3f1d22[_0x3039a(0x131)](_0x22c3cf);return attachUpdateNotice(_0x3fa06f,await _0x236bdc);}};}function shouldResolveUpdateNotice(_0x1ecf78){const _0x5896f7=a88_0x17d848;return _0x1ecf78['format']===_0x5896f7(0x132)&&!_0x1ecf78[_0x5896f7(0x134)];}function attachUpdateNotice(_0x5cd2cb,_0x3acad3){const _0x13c6b4=a88_0x17d848;if(!_0x3acad3||!_0x5cd2cb||typeof _0x5cd2cb!=='object')return _0x5cd2cb;const _0x321704=_0x5cd2cb,_0x3648ec=typeof _0x321704[_0x13c6b4(0x157)]===_0x13c6b4(0x151)&&_0x321704[_0x13c6b4(0x157)]!==null?_0x321704[_0x13c6b4(0x157)]:{};return{..._0x321704,'_notice':{..._0x3648ec,'update':_0x3acad3}};}
@@ -1 +1 @@
1
- (function(_0x451f05,_0x3d5bb1){const _0x512f49=a89_0x2cec,_0x4707f8=_0x451f05();while(!![]){try{const _0x5f65f4=-parseInt(_0x512f49(0x152))/0x1+parseInt(_0x512f49(0x15b))/0x2+-parseInt(_0x512f49(0x155))/0x3+parseInt(_0x512f49(0x160))/0x4+-parseInt(_0x512f49(0x15d))/0x5*(-parseInt(_0x512f49(0x163))/0x6)+-parseInt(_0x512f49(0x157))/0x7+parseInt(_0x512f49(0x161))/0x8*(parseInt(_0x512f49(0x15a))/0x9);if(_0x5f65f4===_0x3d5bb1)break;else _0x4707f8['push'](_0x4707f8['shift']());}catch(_0x3249b8){_0x4707f8['push'](_0x4707f8['shift']());}}}(a89_0x47df,0xcf076));import{buildSchemaPayload as a89_0xb5b2be}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a89_0x2cec(_0x3e41c7,_0x2ac143){_0x3e41c7=_0x3e41c7-0x152;const _0x47df05=a89_0x47df();let _0x2cec0f=_0x47df05[_0x3e41c7];return _0x2cec0f;}function a89_0x47df(){const _0x453908=['1884126KeRVXB','none','10997343HZqELX','auth','has','73341AqrKmD','2955760QkJmIc','map','2750645vIPCvi','requiresAuth','../commands/registry.js','2693240Utlnbr','8DrMRrr','services','18WgjPcA','commands','762645AxgLKu','required','service'];a89_0x47df=function(){return _0x453908;};return a89_0x47df();}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 _0x1a37e4=a89_0x2cec,{serviceRegistry:_0x562aa6,findDefinition:_0x1b70d7}=await import(_0x1a37e4(0x15f)),_0xa72468=new Set(_0x562aa6[_0x1a37e4(0x15c)](_0x1d28a3=>_0x1d28a3[_0x1a37e4(0x154)])),_0x551601=listDynamicServiceEntries()['filter'](_0x2455e1=>!_0xa72468[_0x1a37e4(0x159)](_0x2455e1[_0x1a37e4(0x154)])),_0x4e6bdc=a89_0xb5b2be({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x562aa6,_0x551601),'buildAllFlags':buildAllFlags,'findDefinition':(_0x1e3a70,_0x155d9b)=>_0x1b70d7(_0x1e3a70,_0x155d9b)??findDynamicServiceDefinition(_0x1e3a70,_0x155d9b)});return normalizeSchemaPayload(_0x4e6bdc);}function normalizeSchemaPayload(_0x267d52){const _0x441748=a89_0x2cec;return{..._0x267d52,'schemaVersion':0x2,'services':_0x267d52[_0x441748(0x162)][_0x441748(0x15c)](_0x45a9c5=>({..._0x45a9c5,'commands':_0x45a9c5[_0x441748(0x164)][_0x441748(0x15c)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x23e6de){const _0x2a257d=a89_0x2cec,_0x47a92f=_0x23e6de;return{..._0x23e6de,'auth':_0x47a92f[_0x2a257d(0x158)]??(_0x23e6de[_0x2a257d(0x15e)]?_0x2a257d(0x153):_0x2a257d(0x156))};}
1
+ (function(_0x1e7dee,_0x44bd8b){const _0x3e5c6f=a89_0x1b67,_0x6136a4=_0x1e7dee();while(!![]){try{const _0x55d3d9=parseInt(_0x3e5c6f(0x178))/0x1*(-parseInt(_0x3e5c6f(0x187))/0x2)+-parseInt(_0x3e5c6f(0x17e))/0x3+parseInt(_0x3e5c6f(0x186))/0x4*(-parseInt(_0x3e5c6f(0x180))/0x5)+parseInt(_0x3e5c6f(0x189))/0x6+parseInt(_0x3e5c6f(0x18b))/0x7*(-parseInt(_0x3e5c6f(0x18a))/0x8)+parseInt(_0x3e5c6f(0x17f))/0x9+-parseInt(_0x3e5c6f(0x17d))/0xa*(-parseInt(_0x3e5c6f(0x17c))/0xb);if(_0x55d3d9===_0x44bd8b)break;else _0x6136a4['push'](_0x6136a4['shift']());}catch(_0x47548b){_0x6136a4['push'](_0x6136a4['shift']());}}}(a89_0x5c84,0x3ca06));function a89_0x5c84(){const _0x4fd164=['20SQTxbE','filter','980328TZbXqW','8usHKfr','246953PEUfYy','30658rfsdjP','../commands/registry.js','auth','requiresAuth','9926917xdbihC','10WQEztl','1374564aZBovF','569214zqFhOP','20spoEhi','service','has','commands','required','map','80708keoEDC'];a89_0x5c84=function(){return _0x4fd164;};return a89_0x5c84();}import{buildSchemaPayload as a89_0x2d13a6}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a89_0x1b67(_0x5ad322,_0x2bccad){_0x5ad322=_0x5ad322-0x178;const _0x5c845f=a89_0x5c84();let _0x1b6799=_0x5c845f[_0x5ad322];return _0x1b6799;}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 _0x24cb4c=a89_0x1b67,{serviceRegistry:_0x3790f6,findDefinition:_0x2e697e}=await import(_0x24cb4c(0x179)),_0x34f43e=new Set(_0x3790f6[_0x24cb4c(0x185)](_0x23e5ac=>_0x23e5ac[_0x24cb4c(0x181)])),_0x219592=listDynamicServiceEntries()[_0x24cb4c(0x188)](_0x3ffc96=>!_0x34f43e[_0x24cb4c(0x182)](_0x3ffc96[_0x24cb4c(0x181)])),_0x4866f3=a89_0x2d13a6({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x3790f6,_0x219592),'buildAllFlags':buildAllFlags,'findDefinition':(_0x529ea4,_0x36d856)=>_0x2e697e(_0x529ea4,_0x36d856)??findDynamicServiceDefinition(_0x529ea4,_0x36d856)});return normalizeSchemaPayload(_0x4866f3);}function normalizeSchemaPayload(_0x102d36){const _0x155194=a89_0x1b67;return{..._0x102d36,'schemaVersion':0x2,'services':_0x102d36['services'][_0x155194(0x185)](_0x4ec015=>({..._0x4ec015,'commands':_0x4ec015[_0x155194(0x183)][_0x155194(0x185)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x3489e4){const _0xfd6a9f=a89_0x1b67,_0x348c15=_0x3489e4;return{..._0x3489e4,'auth':_0x348c15[_0xfd6a9f(0x17a)]??(_0x3489e4[_0xfd6a9f(0x17b)]?_0xfd6a9f(0x184):'none')};}
@@ -1 +1 @@
1
- (function(_0x2ed7aa,_0x2eb7c5){const _0x22650e=a90_0x5bba,_0x48996d=_0x2ed7aa();while(!![]){try{const _0x1eb1ab=-parseInt(_0x22650e(0x16f))/0x1+parseInt(_0x22650e(0x17a))/0x2*(parseInt(_0x22650e(0x173))/0x3)+-parseInt(_0x22650e(0x179))/0x4*(-parseInt(_0x22650e(0x177))/0x5)+-parseInt(_0x22650e(0x170))/0x6*(-parseInt(_0x22650e(0x176))/0x7)+-parseInt(_0x22650e(0x175))/0x8*(parseInt(_0x22650e(0x178))/0x9)+parseInt(_0x22650e(0x171))/0xa+-parseInt(_0x22650e(0x174))/0xb*(parseInt(_0x22650e(0x17c))/0xc);if(_0x1eb1ab===_0x2eb7c5)break;else _0x48996d['push'](_0x48996d['shift']());}catch(_0x2986f6){_0x48996d['push'](_0x48996d['shift']());}}}(a90_0x577a,0xd37d5));function a90_0x577a(){const _0x83f5d5=['911981ntkRxk','20XceYFm','203976BAPduF','968052XPMpFo','2GewGhJ','length','120bDMxpZ','findIndex','900744sGuSzt','12yEpNBj','15276350qMjRsl','slice','3237114XeHDWz','804221CZrJKl','472BwHtJb'];a90_0x577a=function(){return _0x83f5d5;};return a90_0x577a();}function a90_0x5bba(_0x5355c0,_0x23be15){_0x5355c0=_0x5355c0-0x16f;const _0x577a60=a90_0x577a();let _0x5bbae7=_0x577a60[_0x5355c0];return _0x5bbae7;}export function insertDynamicServicesAfterServiceTree(_0x185a1d,_0xba72c7){const _0x5716b6=a90_0x5bba;if(_0xba72c7[_0x5716b6(0x17b)]===0x0)return[..._0x185a1d];const _0x1b12fa=_0x185a1d[_0x5716b6(0x17d)](_0x33e484=>_0x33e484['service']==='service');if(_0x1b12fa<0x0)return[..._0x185a1d,..._0xba72c7];return[..._0x185a1d[_0x5716b6(0x172)](0x0,_0x1b12fa+0x1),..._0xba72c7,..._0x185a1d[_0x5716b6(0x172)](_0x1b12fa+0x1)];}
1
+ (function(_0x5a3652,_0x5c4bca){const _0x4f3b42=a90_0x2d22,_0x458bf9=_0x5a3652();while(!![]){try{const _0x3ee3a1=-parseInt(_0x4f3b42(0x10a))/0x1*(-parseInt(_0x4f3b42(0x105))/0x2)+parseInt(_0x4f3b42(0x10d))/0x3+parseInt(_0x4f3b42(0x107))/0x4*(parseInt(_0x4f3b42(0x10e))/0x5)+-parseInt(_0x4f3b42(0x106))/0x6+parseInt(_0x4f3b42(0x103))/0x7+parseInt(_0x4f3b42(0x101))/0x8*(parseInt(_0x4f3b42(0x109))/0x9)+parseInt(_0x4f3b42(0x10f))/0xa*(-parseInt(_0x4f3b42(0x104))/0xb);if(_0x3ee3a1===_0x5c4bca)break;else _0x458bf9['push'](_0x458bf9['shift']());}catch(_0x6f2254){_0x458bf9['push'](_0x458bf9['shift']());}}}(a90_0x37c4,0xe3b3e));function a90_0x37c4(){const _0x5bbdf5=['412173ERYFNQ','1FxvpIp','findIndex','service','4704816Pgnbqm','5NOYwid','1469680BWztWZ','136JcnhoE','length','2675344asMZKl','143DyOeEh','40666gCrpae','10059834olinpg','7082188ltnhPY','slice'];a90_0x37c4=function(){return _0x5bbdf5;};return a90_0x37c4();}function a90_0x2d22(_0x5617ab,_0x36eb83){_0x5617ab=_0x5617ab-0x101;const _0x37c4af=a90_0x37c4();let _0x2d2259=_0x37c4af[_0x5617ab];return _0x2d2259;}export function insertDynamicServicesAfterServiceTree(_0x20b038,_0x2fd789){const _0x1c3d36=a90_0x2d22;if(_0x2fd789[_0x1c3d36(0x102)]===0x0)return[..._0x20b038];const _0x561ef3=_0x20b038[_0x1c3d36(0x10b)](_0x4f1801=>_0x4f1801[_0x1c3d36(0x10c)]==='service');if(_0x561ef3<0x0)return[..._0x20b038,..._0x2fd789];return[..._0x20b038[_0x1c3d36(0x108)](0x0,_0x561ef3+0x1),..._0x2fd789,..._0x20b038[_0x1c3d36(0x108)](_0x561ef3+0x1)];}
@@ -1 +1 @@
1
- function a91_0x57eb(){var _0x1d09fa=['8112BpQLKE','774756uduHTf','20410QgxZAE','8CRTmLE','4037zbGoPp','2072grwItN','885585hHGWmO','4572909gqypuu','2185998EyIyeJ','237826jNvUiP','6rEMSah'];a91_0x57eb=function(){return _0x1d09fa;};return a91_0x57eb();}(function(_0x5e5924,_0x3ea751){var _0x138f50=a91_0x38c2,_0x2dc0b2=_0x5e5924();while(!![]){try{var _0xd6e01f=parseInt(_0x138f50(0x157))/0x1+-parseInt(_0x138f50(0x154))/0x2*(-parseInt(_0x138f50(0x155))/0x3)+parseInt(_0x138f50(0x159))/0x4*(parseInt(_0x138f50(0x15c))/0x5)+-parseInt(_0x138f50(0x15e))/0x6+parseInt(_0x138f50(0x15b))/0x7*(-parseInt(_0x138f50(0x156))/0x8)+parseInt(_0x138f50(0x15d))/0x9+parseInt(_0x138f50(0x158))/0xa*(-parseInt(_0x138f50(0x15a))/0xb);if(_0xd6e01f===_0x3ea751)break;else _0x2dc0b2['push'](_0x2dc0b2['shift']());}catch(_0x20ee69){_0x2dc0b2['push'](_0x2dc0b2['shift']());}}}(a91_0x57eb,0x70a51));function a91_0x38c2(_0x18706c,_0x5be407){_0x18706c=_0x18706c-0x154;var _0x57eb00=a91_0x57eb();var _0x38c2a9=_0x57eb00[_0x18706c];return _0x38c2a9;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a91_0x5242(_0x1e8ae0,_0x26b70f){_0x1e8ae0=_0x1e8ae0-0x161;var _0x49fdea=a91_0x49fd();var _0x5242fa=_0x49fdea[_0x1e8ae0];return _0x5242fa;}function a91_0x49fd(){var _0x315784=['429zpyfcg','7924869MRFQiN','975030OyZYHj','846gpfaLN','4gNKafQ','7872425RWDHZw','10iWRaIS','461443VCZMYd','8204SaGQqb','345036woNsTI','4gcwGeC','1112688PDIVZC'];a91_0x49fd=function(){return _0x315784;};return a91_0x49fd();}(function(_0x9dbd27,_0x4395da){var _0x7cce5d=a91_0x5242,_0xaede41=_0x9dbd27();while(!![]){try{var _0x4da909=parseInt(_0x7cce5d(0x16b))/0x1*(parseInt(_0x7cce5d(0x162))/0x2)+-parseInt(_0x7cce5d(0x166))/0x3+-parseInt(_0x7cce5d(0x168))/0x4*(parseInt(_0x7cce5d(0x169))/0x5)+parseInt(_0x7cce5d(0x167))/0x6*(-parseInt(_0x7cce5d(0x16c))/0x7)+parseInt(_0x7cce5d(0x163))/0x8+parseInt(_0x7cce5d(0x165))/0x9*(parseInt(_0x7cce5d(0x16a))/0xa)+parseInt(_0x7cce5d(0x164))/0xb*(parseInt(_0x7cce5d(0x161))/0xc);if(_0x4da909===_0x4395da)break;else _0xaede41['push'](_0xaede41['shift']());}catch(_0x289e3b){_0xaede41['push'](_0xaede41['shift']());}}}(a91_0x49fd,0xf3edd));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a92_0x23ed4c=a92_0x2183;(function(_0x4513a0,_0x2fd344){const _0x150d8b=a92_0x2183,_0xaec112=_0x4513a0();while(!![]){try{const _0x7bcc11=-parseInt(_0x150d8b(0x96))/0x1+-parseInt(_0x150d8b(0x99))/0x2+-parseInt(_0x150d8b(0x97))/0x3*(-parseInt(_0x150d8b(0x98))/0x4)+-parseInt(_0x150d8b(0x9b))/0x5+-parseInt(_0x150d8b(0x94))/0x6+-parseInt(_0x150d8b(0x9c))/0x7*(-parseInt(_0x150d8b(0x9a))/0x8)+-parseInt(_0x150d8b(0x93))/0x9*(-parseInt(_0x150d8b(0x95))/0xa);if(_0x7bcc11===_0x2fd344)break;else _0xaec112['push'](_0xaec112['shift']());}catch(_0x54055e){_0xaec112['push'](_0xaec112['shift']());}}}(a92_0x48ff,0x842d1));export const VERSION='2.1.8';export const GIT_TAG='v2.1.8-beta.3';function a92_0x2183(_0x4b4ed0,_0x5f4a9b){_0x4b4ed0=_0x4b4ed0-0x93;const _0x48ff8a=a92_0x48ff();let _0x21834a=_0x48ff8a[_0x4b4ed0];return _0x21834a;}export const GIT_COMMIT=a92_0x23ed4c(0x9d);function a92_0x48ff(){const _0xaa5a1f=['11973LAvTrX','740pueeeB','1965964BIbnnP','720zIDeCk','1853765vEpnOu','9905KmcIOd','18d879c','18mtUbqr','2792286PFOGLh','8179900Yhiwry','141156eSvtfE'];a92_0x48ff=function(){return _0xaa5a1f;};return a92_0x48ff();}export const BUILD_TIME='2026-07-08T06:21:25.636Z';
1
+ const a92_0x5dcb80=a92_0x1bf4;(function(_0x203637,_0x337f3a){const _0x549bd7=a92_0x1bf4,_0x55c08a=_0x203637();while(!![]){try{const _0xe48755=-parseInt(_0x549bd7(0x184))/0x1+-parseInt(_0x549bd7(0x187))/0x2+parseInt(_0x549bd7(0x181))/0x3*(-parseInt(_0x549bd7(0x182))/0x4)+parseInt(_0x549bd7(0x17f))/0x5+-parseInt(_0x549bd7(0x188))/0x6*(-parseInt(_0x549bd7(0x183))/0x7)+-parseInt(_0x549bd7(0x18a))/0x8+-parseInt(_0x549bd7(0x189))/0x9*(-parseInt(_0x549bd7(0x185))/0xa);if(_0xe48755===_0x337f3a)break;else _0x55c08a['push'](_0x55c08a['shift']());}catch(_0x192b06){_0x55c08a['push'](_0x55c08a['shift']());}}}(a92_0x1d63,0x1a99c));function a92_0x1d63(){const _0x3aaf76=['10254UTwezI','226242Vepdqs','780520eNgbGw','f0b64e6','21265nusnVU','2026-07-08T08:15:27.965Z','1257YylQeu','364zKcATq','14sLZPoF','93680EWKAeX','180XunWde','v2.1.9-beta.1','243650jhmAaN'];a92_0x1d63=function(){return _0x3aaf76;};return a92_0x1d63();}export const VERSION='2.1.9-beta.1';export const GIT_TAG=a92_0x5dcb80(0x186);function a92_0x1bf4(_0x1429f7,_0x269809){_0x1429f7=_0x1429f7-0x17e;const _0x1d63ae=a92_0x1d63();let _0x1bf41d=_0x1d63ae[_0x1429f7];return _0x1bf41d;}export const GIT_COMMIT=a92_0x5dcb80(0x17e);export const BUILD_TIME=a92_0x5dcb80(0x180);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3c6fc9,_0x42b12c){const _0x11e8e4=a93_0x70c8,_0x3c5876=_0x3c6fc9();while(!![]){try{const _0x7a3768=-parseInt(_0x11e8e4(0x13f))/0x1+-parseInt(_0x11e8e4(0x143))/0x2+-parseInt(_0x11e8e4(0x146))/0x3*(parseInt(_0x11e8e4(0x147))/0x4)+parseInt(_0x11e8e4(0x140))/0x5*(-parseInt(_0x11e8e4(0x141))/0x6)+parseInt(_0x11e8e4(0x13a))/0x7*(parseInt(_0x11e8e4(0x142))/0x8)+parseInt(_0x11e8e4(0x13b))/0x9*(-parseInt(_0x11e8e4(0x144))/0xa)+-parseInt(_0x11e8e4(0x145))/0xb*(-parseInt(_0x11e8e4(0x138))/0xc);if(_0x7a3768===_0x42b12c)break;else _0x3c5876['push'](_0x3c5876['shift']());}catch(_0x16b515){_0x3c5876['push'](_0x3c5876['shift']());}}}(a93_0x4f8b,0x29c16));function a93_0x4f8b(){const _0x348ef6=['42kGreUN','67492tRYUZX','16036932RLJAye','column','7bbISNe','51759fZTpaw','green','\x20to\x20view\x20available\x20commands.','\x20--help','320251nTJnbN','1664445ViOZDb','6OaivTk','109472cdTyUa','27310ILwHRE','480mcoWUH','11HtEQmd'];a93_0x4f8b=function(){return _0x348ef6;};return a93_0x4f8b();}import{jsx as a93_0xf0c6fb,jsxs as a93_0x2aa40f}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x70c8(_0x4bd139,_0x4dee9a){_0x4bd139=_0x4bd139-0x138;const _0x4f8b7e=a93_0x4f8b();let _0x70c818=_0x4f8b7e[_0x4bd139];return _0x70c818;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x247870=a93_0x70c8,{exit:_0x26cde1}=useApp();return useEffect(()=>{_0x26cde1();},[_0x26cde1]),a93_0x2aa40f(Box,{'flexDirection':_0x247870(0x139),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0xf0c6fb(Box,{'children':a93_0xf0c6fb(Text,{'bold':!![],'color':_0x247870(0x13c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x2aa40f(Box,{'marginTop':0x1,'children':[a93_0xf0c6fb(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0xf0c6fb(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x247870(0x13e)}),a93_0xf0c6fb(Text,{'dimColor':!![],'children':_0x247870(0x13d)})]})]});}
1
+ function a93_0x5201(_0x1e583d,_0x3b6a7a){_0x1e583d=_0x1e583d-0x108;const _0x1adc8c=a93_0x1adc();let _0x52015f=_0x1adc8c[_0x1e583d];return _0x52015f;}(function(_0x14ac02,_0x43314f){const _0x2107e3=a93_0x5201,_0x4cb0cf=_0x14ac02();while(!![]){try{const _0x13bb14=parseInt(_0x2107e3(0x111))/0x1*(parseInt(_0x2107e3(0x10d))/0x2)+parseInt(_0x2107e3(0x116))/0x3+-parseInt(_0x2107e3(0x10b))/0x4*(parseInt(_0x2107e3(0x114))/0x5)+-parseInt(_0x2107e3(0x110))/0x6*(parseInt(_0x2107e3(0x115))/0x7)+-parseInt(_0x2107e3(0x109))/0x8+parseInt(_0x2107e3(0x108))/0x9+-parseInt(_0x2107e3(0x10f))/0xa*(-parseInt(_0x2107e3(0x112))/0xb);if(_0x13bb14===_0x43314f)break;else _0x4cb0cf['push'](_0x4cb0cf['shift']());}catch(_0x49f58b){_0x4cb0cf['push'](_0x4cb0cf['shift']());}}}(a93_0x1adc,0x90738));import{jsx as a93_0x108c9d,jsxs as a93_0x3720fa}from'react/jsx-runtime';import{useEffect}from'react';function a93_0x1adc(){const _0x2da253=['32UZEvxL','286BuQsWj','\x20to\x20view\x20available\x20commands.','1268560dSwmCc','217yuIGWo','1208367IadosF','7633746SNYYwk','5049264eiWMmv','column','12ujCnMr','green','11576EMGvXm','\x20\x20Use\x20','400650TslgDr','95598MGrawr'];a93_0x1adc=function(){return _0x2da253;};return a93_0x1adc();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x2a6b73=a93_0x5201,{exit:_0x2a6101}=useApp();return useEffect(()=>{_0x2a6101();},[_0x2a6101]),a93_0x3720fa(Box,{'flexDirection':_0x2a6b73(0x10a),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x108c9d(Box,{'children':a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x3720fa(Box,{'marginTop':0x1,'children':[a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x10e)}),a93_0x108c9d(Text,{'bold':!![],'color':_0x2a6b73(0x10c),'children':CLI_BIN_NAME+'\x20--help'}),a93_0x108c9d(Text,{'dimColor':!![],'children':_0x2a6b73(0x113)})]})]});}
@@ -1 +1 @@
1
- (function(_0x134a10,_0x321d09){const _0x90f2b7=a94_0x5f2a,_0x477a2f=_0x134a10();while(!![]){try{const _0x52549e=parseInt(_0x90f2b7(0xee))/0x1+parseInt(_0x90f2b7(0xe0))/0x2*(-parseInt(_0x90f2b7(0xe7))/0x3)+-parseInt(_0x90f2b7(0xed))/0x4*(parseInt(_0x90f2b7(0xdb))/0x5)+parseInt(_0x90f2b7(0xda))/0x6+-parseInt(_0x90f2b7(0xea))/0x7*(parseInt(_0x90f2b7(0xdf))/0x8)+-parseInt(_0x90f2b7(0xe1))/0x9*(parseInt(_0x90f2b7(0xf1))/0xa)+-parseInt(_0x90f2b7(0xe5))/0xb*(-parseInt(_0x90f2b7(0xe4))/0xc);if(_0x52549e===_0x321d09)break;else _0x477a2f['push'](_0x477a2f['shift']());}catch(_0x568ffa){_0x477a2f['push'](_0x477a2f['shift']());}}}(a94_0x4f1c,0x188c1));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a94_0x5f2a(_0x260262,_0x14ed47){_0x260262=_0x260262-0xda;const _0x4f1c2b=a94_0x4f1c();let _0x5f2a3e=_0x4f1c2b[_0x260262];return _0x5f2a3e;}import{LOVRABET_SKILL_SOURCE as a94_0x2a79c3}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x2a79c3;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);function a94_0x4f1c(){const _0x3043d2=['exit\x20','add','168jGHNuA','130537AQZGem','inherit','3PaVWdF','stdout','npx','14QQppkn','toString','stderr','632TtyULT','101084taPoYF','unknown','join','10qDqHeN','pipe','924822EsWwbD','785tUpfEU','trim','status','skills','317728JyTxdJ','270626PgLjfa','731367rwBMtX'];a94_0x4f1c=function(){return _0x3043d2;};return a94_0x4f1c();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x577716,_0xc6c944=LOVRABET_SKILL_SOURCE,_0x210575){const _0x89001a=a94_0x5f2a;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x9b7972=_0x210575?.['stdio']??_0x89001a(0xe6),_0x48c4bb=resolveNpmBin(_0x89001a(0xe9)),_0x579cfe=[_0x89001a(0xde),_0x89001a(0xe3),_0xc6c944,'-g','-y'],_0x1497b0=[_0x48c4bb,..._0x579cfe][_0x89001a(0xf0)]('\x20');console['log']('*\x20'+_0x1497b0);const _0x1b8815=spawnSync(_0x48c4bb,_0x579cfe,{'cwd':_0x577716,'stdio':_0x9b7972,'env':process.env,'shell':![]});if(_0x1b8815[_0x89001a(0xdd)]===0x0)return{'ok':!![],'status':0x0};let _0x2c920e=_0x89001a(0xe2)+(_0x1b8815[_0x89001a(0xdd)]??_0x89001a(0xef));if(_0x9b7972===_0x89001a(0xf2)){const _0x9590ea=_0x1b8815[_0x89001a(0xec)]?_0x1b8815['stderr']['toString']()[_0x89001a(0xdc)]():'',_0x235a2c=_0x1b8815[_0x89001a(0xe8)]?_0x1b8815[_0x89001a(0xe8)][_0x89001a(0xeb)]()[_0x89001a(0xdc)]():'';if(_0x9590ea)_0x2c920e=_0x9590ea;else{if(_0x235a2c)_0x2c920e=_0x235a2c;}}return{'ok':![],'status':_0x1b8815['status']??null,'error':_0x2c920e};}
1
+ const a94_0x35c427=a94_0x179a;(function(_0x37c532,_0x23f92b){const _0xc3895=a94_0x179a,_0x5cee84=_0x37c532();while(!![]){try{const _0x528cbd=parseInt(_0xc3895(0xcb))/0x1*(parseInt(_0xc3895(0xd6))/0x2)+-parseInt(_0xc3895(0xcf))/0x3+parseInt(_0xc3895(0xd0))/0x4+parseInt(_0xc3895(0xca))/0x5+-parseInt(_0xc3895(0xdc))/0x6*(parseInt(_0xc3895(0xd2))/0x7)+-parseInt(_0xc3895(0xce))/0x8+parseInt(_0xc3895(0xd4))/0x9*(-parseInt(_0xc3895(0xd9))/0xa);if(_0x528cbd===_0x23f92b)break;else _0x5cee84['push'](_0x5cee84['shift']());}catch(_0x140ef7){_0x5cee84['push'](_0x5cee84['shift']());}}}(a94_0x4a75,0x35ee6));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x58c1bb}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x179a(_0xd0a859,_0x334c22){_0xd0a859=_0xd0a859-0xca;const _0x4a7522=a94_0x4a75();let _0x179abc=_0x4a7522[_0xd0a859];return _0x179abc;}function a94_0x4a75(){const _0x155791=['2TGYvgA','trim','stdout','1092760RrWGlN','302106iLwpOU','1698744ucOfpC','stdio','239218oyHoSc','skipNpxSkillsEnvSuffix','9OWgmNe','stderr','67908vsyIcJ','log','add','1342990eFfMqK','toString','status','36dEGRBX','inherit','1524740GpBdga'];a94_0x4a75=function(){return _0x155791;};return a94_0x4a75();}export const LOVRABET_SKILL_SOURCE=a94_0x58c1bb;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a94_0x35c427(0xd3)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x409e69,_0x2dd140=LOVRABET_SKILL_SOURCE,_0x380d1c){const _0x2ea2dc=a94_0x35c427;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x36defb=_0x380d1c?.[_0x2ea2dc(0xd1)]??_0x2ea2dc(0xdd),_0x5b5053=resolveNpmBin('npx'),_0x58dd25=['skills',_0x2ea2dc(0xd8),_0x2dd140,'-g','-y'],_0x20bb9e=[_0x5b5053,..._0x58dd25]['join']('\x20');console[_0x2ea2dc(0xd7)]('*\x20'+_0x20bb9e);const _0x3bf2d2=spawnSync(_0x5b5053,_0x58dd25,{'cwd':_0x409e69,'stdio':_0x36defb,'env':process.env,'shell':![]});if(_0x3bf2d2['status']===0x0)return{'ok':!![],'status':0x0};let _0x46eedb='exit\x20'+(_0x3bf2d2['status']??'unknown');if(_0x36defb==='pipe'){const _0x4cc064=_0x3bf2d2[_0x2ea2dc(0xd5)]?_0x3bf2d2[_0x2ea2dc(0xd5)][_0x2ea2dc(0xda)]()[_0x2ea2dc(0xcc)]():'',_0x5f2125=_0x3bf2d2['stdout']?_0x3bf2d2[_0x2ea2dc(0xcd)][_0x2ea2dc(0xda)]()['trim']():'';if(_0x4cc064)_0x46eedb=_0x4cc064;else{if(_0x5f2125)_0x46eedb=_0x5f2125;}}return{'ok':![],'status':_0x3bf2d2[_0x2ea2dc(0xdb)]??null,'error':_0x46eedb};}
@@ -1 +1 @@
1
- function a95_0x1611(_0x5b565c,_0x2c8a56){_0x5b565c=_0x5b565c-0xc8;const _0x5cfba0=a95_0x5cfb();let _0x161167=_0x5cfba0[_0x5b565c];return _0x161167;}const a95_0x421507=a95_0x1611;(function(_0x5a04ce,_0x241cd9){const _0x3fd7e7=a95_0x1611,_0x5a50a5=_0x5a04ce();while(!![]){try{const _0x31b7f1=parseInt(_0x3fd7e7(0xd1))/0x1*(-parseInt(_0x3fd7e7(0xd9))/0x2)+-parseInt(_0x3fd7e7(0xda))/0x3*(-parseInt(_0x3fd7e7(0xd2))/0x4)+-parseInt(_0x3fd7e7(0xce))/0x5*(parseInt(_0x3fd7e7(0xd4))/0x6)+parseInt(_0x3fd7e7(0xd3))/0x7*(parseInt(_0x3fd7e7(0xd5))/0x8)+-parseInt(_0x3fd7e7(0xd8))/0x9*(parseInt(_0x3fd7e7(0xc9))/0xa)+parseInt(_0x3fd7e7(0xd7))/0xb+-parseInt(_0x3fd7e7(0xcd))/0xc*(-parseInt(_0x3fd7e7(0xc8))/0xd);if(_0x31b7f1===_0x241cd9)break;else _0x5a50a5['push'](_0x5a50a5['shift']());}catch(_0x149b80){_0x5a50a5['push'](_0x5a50a5['shift']());}}}(a95_0x5cfb,0xa859c));function a95_0x5cfb(){const _0x29505c=['1257MpCkYv','.git','coverage','.hg','node_modules','SKILL.md','26wjhVrv','12106460lrrhhx','.svn','lovrabet.skill.json','.turbo','10618212MOqNSG','15qbMyhK','.cache','.next','9WqztjN','1964EXevyo','924091SJsNIJ','253884GCduLX','8IIzdrJ','dist','3492687EsbaHu','9jFJspM','88402NCKmct'];a95_0x5cfb=function(){return _0x29505c;};return a95_0x5cfb();}export const METADATA_FILE=a95_0x421507(0xcb);export const SKILL_FILE=a95_0x421507(0xdf);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a95_0x421507(0xdb),a95_0x421507(0xdd),a95_0x421507(0xca),a95_0x421507(0xde),a95_0x421507(0xd0),a95_0x421507(0xd6),'build',a95_0x421507(0xdc),a95_0x421507(0xcc),a95_0x421507(0xcf)]);
1
+ function a95_0x6e30(_0x2c184e,_0x2e2088){_0x2c184e=_0x2c184e-0x76;const _0x217f8b=a95_0x217f();let _0x6e30af=_0x217f8b[_0x2c184e];return _0x6e30af;}const a95_0x24dc43=a95_0x6e30;(function(_0x36f9fb,_0x19d0ee){const _0x837d23=a95_0x6e30,_0x4213dd=_0x36f9fb();while(!![]){try{const _0x4479b0=parseInt(_0x837d23(0x89))/0x1+-parseInt(_0x837d23(0x76))/0x2*(parseInt(_0x837d23(0x7a))/0x3)+-parseInt(_0x837d23(0x7f))/0x4*(-parseInt(_0x837d23(0x7c))/0x5)+parseInt(_0x837d23(0x87))/0x6+-parseInt(_0x837d23(0x84))/0x7+parseInt(_0x837d23(0x7e))/0x8+-parseInt(_0x837d23(0x79))/0x9*(parseInt(_0x837d23(0x83))/0xa);if(_0x4479b0===_0x19d0ee)break;else _0x4213dd['push'](_0x4213dd['shift']());}catch(_0x310389){_0x4213dd['push'](_0x4213dd['shift']());}}}(a95_0x217f,0xc1c38));export const METADATA_FILE=a95_0x24dc43(0x81);export const SKILL_FILE=a95_0x24dc43(0x7d);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x24dc43(0x82)]);export const IGNORED_DIR_NAMES=new Set([a95_0x24dc43(0x88),a95_0x24dc43(0x86),a95_0x24dc43(0x8a),a95_0x24dc43(0x85),a95_0x24dc43(0x78),a95_0x24dc43(0x80),'build',a95_0x24dc43(0x7b),a95_0x24dc43(0x8b),a95_0x24dc43(0x77)]);function a95_0x217f(){const _0x18ab9c=['94TMwjsc','.cache','.next','4153356UNRjfa','67137owOSZg','coverage','15kZNbmQ','SKILL.md','5314696fcVrpx','1873340RcJlPr','dist','lovrabet.skill.json','.DS_Store','10Uwkozk','10702048AOyWFj','node_modules','.hg','4997898myYrqJ','.git','933492nupnfM','.svn','.turbo'];a95_0x217f=function(){return _0x18ab9c;};return a95_0x217f();}
@@ -1 +1 @@
1
- (function(_0xdcdacf,_0xdcbe86){const _0x5e1c80=a96_0x3b10,_0x575a27=_0xdcdacf();while(!![]){try{const _0x10977b=parseInt(_0x5e1c80(0x123))/0x1+parseInt(_0x5e1c80(0x12c))/0x2+parseInt(_0x5e1c80(0x126))/0x3*(parseInt(_0x5e1c80(0x12d))/0x4)+-parseInt(_0x5e1c80(0x130))/0x5+-parseInt(_0x5e1c80(0x124))/0x6+-parseInt(_0x5e1c80(0x12b))/0x7*(-parseInt(_0x5e1c80(0x127))/0x8)+-parseInt(_0x5e1c80(0x131))/0x9*(parseInt(_0x5e1c80(0x120))/0xa);if(_0x10977b===_0xdcbe86)break;else _0x575a27['push'](_0x575a27['shift']());}catch(_0x544d89){_0x575a27['push'](_0x575a27['shift']());}}}(a96_0x35cf,0x73608));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(_0x23325d,_0x3d60f4){const _0x217c10=a96_0x3b10,_0x19a5d7=normalizeSkillRelativePath(_0x3d60f4),_0xc14f11=realOrResolved(_0x23325d),_0x4ff1f9=resolve(_0xc14f11,..._0x19a5d7[_0x217c10(0x132)]('/'));if(!isPathInside(_0x4ff1f9,_0xc14f11))throw CliErrors[_0x217c10(0x128)](_0x217c10(0x129)+_0x3d60f4);return ensureNoSymlinkInManagedPath(_0xc14f11,_0x19a5d7),_0x4ff1f9;}export function ensureNoSymlinkInManagedPath(_0x1763ae,_0x48137f){const _0x773494=a96_0x3b10;let _0x1038d0=_0x1763ae;for(const _0x3651fb of _0x48137f[_0x773494(0x132)]('/')){_0x1038d0=resolve(_0x1038d0,_0x3651fb);const _0x5d94aa=lstatIfPresent(_0x1038d0);if(_0x5d94aa?.['isSymbolicLink']())throw CliErrors[_0x773494(0x128)](_0x773494(0x12f)+_0x48137f);}}export function isDanglingSymlink(_0x123d4f){try{return lstatSync(_0x123d4f)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x564da7){const _0x36b8d9=readlinkSync(_0x564da7);return isAbsolute(_0x36b8d9)?_0x36b8d9:resolve(dirname(_0x564da7),_0x36b8d9);}export function isPathInside(_0x3dccee,_0x5ef511){const _0x5c1d1e=a96_0x3b10,_0x552948=_0x3dccee[_0x5c1d1e(0x125)](sep)?_0x3dccee:''+_0x3dccee+sep,_0x5ecdad=_0x5ef511['endsWith'](sep)?_0x5ef511:''+_0x5ef511+sep;return _0x3dccee===_0x5ef511||_0x552948[_0x5c1d1e(0x122)](_0x5ecdad);}function a96_0x3b10(_0x4ae4bf,_0x785434){_0x4ae4bf=_0x4ae4bf-0x120;const _0x35cf9a=a96_0x35cf();let _0x3b10f1=_0x35cf9a[_0x4ae4bf];return _0x3b10f1;}export function realOrResolved(_0x4e9331){try{return realpathSync(_0x4e9331);}catch{return resolve(_0x4e9331);}}export function lstatIfPresent(_0xe498df){try{return lstatSync(_0xe498df);}catch{return undefined;}}export function writeTextAtomic(_0x28b7af,_0x12d562,_0x3d9b7d){const _0x109c5f=a96_0x3b10;writeBytesAtomic(_0x28b7af,Buffer[_0x109c5f(0x121)](_0x12d562,_0x109c5f(0x12e)),_0x3d9b7d);}export function writeBytesAtomic(_0x364677,_0x180deb,_0xbc3cba){const _0x1a49fe=_0x364677+'.tmp';try{writeFileSync(_0x1a49fe,_0x180deb,{'mode':_0xbc3cba}),renameSync(_0x1a49fe,_0x364677);}catch(_0x57de8a){try{rmSync(_0x1a49fe,{'force':!![]});}catch{}throw _0x57de8a;}}export function writeJsonAtomic(_0x3c0157,_0x181d73){const _0x10475f=a96_0x3b10;writeTextAtomic(_0x3c0157,JSON[_0x10475f(0x12a)](_0x181d73,null,0x2)+'\x0a',0x180);}function a96_0x35cf(){const _0x4f35af=['4921992fmulxW','endsWith','1122219qJMlJu','1173704cKgcad','validation','Unsafe\x20Skill\x20file\x20path:\x20','stringify','35PTTnlk','868536xPPejm','4QvfPnm','utf8','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','1577750eyOYlX','108ZxvIrd','split','229630JvyuEU','from','startsWith','342116zWXPyk'];a96_0x35cf=function(){return _0x4f35af;};return a96_0x35cf();}
1
+ (function(_0xecea20,_0x5dba62){const _0x5e6a39=a96_0x834f,_0x4ef8cf=_0xecea20();while(!![]){try{const _0x4e7ac4=parseInt(_0x5e6a39(0x189))/0x1*(-parseInt(_0x5e6a39(0x17a))/0x2)+-parseInt(_0x5e6a39(0x188))/0x3+parseInt(_0x5e6a39(0x174))/0x4*(-parseInt(_0x5e6a39(0x177))/0x5)+-parseInt(_0x5e6a39(0x178))/0x6+parseInt(_0x5e6a39(0x180))/0x7*(parseInt(_0x5e6a39(0x175))/0x8)+-parseInt(_0x5e6a39(0x185))/0x9*(parseInt(_0x5e6a39(0x17d))/0xa)+parseInt(_0x5e6a39(0x17f))/0xb*(parseInt(_0x5e6a39(0x17e))/0xc);if(_0x4e7ac4===_0x5dba62)break;else _0x4ef8cf['push'](_0x4ef8cf['shift']());}catch(_0x39b8d6){_0x4ef8cf['push'](_0x4ef8cf['shift']());}}}(a96_0xffe8,0xd8441));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x1e339c,_0x4b6097){const _0x5f568c=a96_0x834f,_0x425994=normalizeSkillRelativePath(_0x4b6097),_0x41b3f3=realOrResolved(_0x1e339c),_0x240415=resolve(_0x41b3f3,..._0x425994['split']('/'));if(!isPathInside(_0x240415,_0x41b3f3))throw CliErrors[_0x5f568c(0x17b)](_0x5f568c(0x184)+_0x4b6097);return ensureNoSymlinkInManagedPath(_0x41b3f3,_0x425994),_0x240415;}export function ensureNoSymlinkInManagedPath(_0x48ba5f,_0xc8a49){const _0x5cacb0=a96_0x834f;let _0x44e0f7=_0x48ba5f;for(const _0x126f2c of _0xc8a49[_0x5cacb0(0x183)]('/')){_0x44e0f7=resolve(_0x44e0f7,_0x126f2c);const _0x3f6a48=lstatIfPresent(_0x44e0f7);if(_0x3f6a48?.['isSymbolicLink']())throw CliErrors[_0x5cacb0(0x17b)](_0x5cacb0(0x186)+_0xc8a49);}}function a96_0x834f(_0x19d76b,_0x5d5e69){_0x19d76b=_0x19d76b-0x174;const _0xffe8f7=a96_0xffe8();let _0x834fe7=_0xffe8f7[_0x19d76b];return _0x834fe7;}export function isDanglingSymlink(_0x2a781f){const _0x31e111=a96_0x834f;try{return lstatSync(_0x2a781f)[_0x31e111(0x17c)]();}catch{return![];}}export function resolveSymlinkTarget(_0x20b1d4){const _0xd6ed4f=readlinkSync(_0x20b1d4);return isAbsolute(_0xd6ed4f)?_0xd6ed4f:resolve(dirname(_0x20b1d4),_0xd6ed4f);}export function isPathInside(_0x1d4a75,_0x5f000b){const _0x2e4d48=a96_0x834f,_0x1f6d72=_0x1d4a75[_0x2e4d48(0x182)](sep)?_0x1d4a75:''+_0x1d4a75+sep,_0x49f025=_0x5f000b[_0x2e4d48(0x182)](sep)?_0x5f000b:''+_0x5f000b+sep;return _0x1d4a75===_0x5f000b||_0x1f6d72[_0x2e4d48(0x187)](_0x49f025);}export function realOrResolved(_0x36acd4){try{return realpathSync(_0x36acd4);}catch{return resolve(_0x36acd4);}}export function lstatIfPresent(_0x14ff42){try{return lstatSync(_0x14ff42);}catch{return undefined;}}export function writeTextAtomic(_0x439314,_0x5ec459,_0x92594e){const _0x34c66d=a96_0x834f;writeBytesAtomic(_0x439314,Buffer[_0x34c66d(0x181)](_0x5ec459,_0x34c66d(0x179)),_0x92594e);}function a96_0xffe8(){const _0x2506f4=['1149771CljaHu','1384KTDRcx','10950280KzcjSO','.tmp','15245rIjAkc','4766070ATcvkX','utf8','2tRNySk','validation','isSymbolicLink','20KfMyCT','6684QCtRhg','91201mFCwmz','7CMeoha','from','endsWith','split','Unsafe\x20Skill\x20file\x20path:\x20','5913054dPAQKt','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','startsWith','2363895mPhArs'];a96_0xffe8=function(){return _0x2506f4;};return a96_0xffe8();}export function writeBytesAtomic(_0x821586,_0x4536b6,_0x53c2be){const _0x492e6c=a96_0x834f,_0x22587d=_0x821586+_0x492e6c(0x176);try{writeFileSync(_0x22587d,_0x4536b6,{'mode':_0x53c2be}),renameSync(_0x22587d,_0x821586);}catch(_0x1e472f){try{rmSync(_0x22587d,{'force':!![]});}catch{}throw _0x1e472f;}}export function writeJsonAtomic(_0x29def7,_0x19289d){writeTextAtomic(_0x29def7,JSON['stringify'](_0x19289d,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x2fdf60,_0x5e9b2c){const _0x523467=a97_0x1c3a,_0x18c819=_0x2fdf60();while(!![]){try{const _0x3e830e=parseInt(_0x523467(0x73))/0x1*(parseInt(_0x523467(0x7d))/0x2)+parseInt(_0x523467(0x7b))/0x3+-parseInt(_0x523467(0x7e))/0x4*(parseInt(_0x523467(0x7c))/0x5)+-parseInt(_0x523467(0x78))/0x6+parseInt(_0x523467(0x7a))/0x7+-parseInt(_0x523467(0x75))/0x8+parseInt(_0x523467(0x7f))/0x9;if(_0x3e830e===_0x5e9b2c)break;else _0x18c819['push'](_0x18c819['shift']());}catch(_0x9fc3e2){_0x18c819['push'](_0x18c819['shift']());}}}(a97_0x599c,0x82513));function a97_0x599c(){const _0x2445b5=['7243OveRas','size','7294648RRFXCf','sha256','hex','6131400uHXJah','digest','492877yJbbDP','2986677USopKL','85FzZzwJ','4JpXsFG','50356jHFuqQ','14409603bkPzet','update'];a97_0x599c=function(){return _0x2445b5;};return a97_0x599c();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x4765b0){const _0x3beb2b=a97_0x1c3a;return createHash(_0x3beb2b(0x76))[_0x3beb2b(0x80)](_0x4765b0)[_0x3beb2b(0x79)](_0x3beb2b(0x77));}function a97_0x1c3a(_0x5ba587,_0x112d27){_0x5ba587=_0x5ba587-0x73;const _0x599c6c=a97_0x599c();let _0x1c3a16=_0x599c6c[_0x5ba587];return _0x1c3a16;}export function fileHash(_0x1af56a){return bufferSha256(fileContent(_0x1af56a));}export function bufferSha256(_0x11ab0f){const _0x279f35=a97_0x1c3a;return createHash(_0x279f35(0x76))[_0x279f35(0x80)](_0x11ab0f)['digest']('hex');}export function fileTreeHash(_0x164258){const _0x3a4055=a97_0x1c3a,_0x1204df=createHash(_0x3a4055(0x76));for(const _0x2fb790 of normalizeManifestFiles(_0x164258)){_0x1204df[_0x3a4055(0x80)](_0x2fb790['path']),_0x1204df[_0x3a4055(0x80)]('\x00'),_0x1204df[_0x3a4055(0x80)](_0x2fb790[_0x3a4055(0x76)]),_0x1204df[_0x3a4055(0x80)]('\x00'),_0x1204df[_0x3a4055(0x80)](String(_0x2fb790[_0x3a4055(0x74)])),_0x1204df['update']('\x00');}return _0x1204df[_0x3a4055(0x79)](_0x3a4055(0x77));}
1
+ (function(_0xd934e8,_0x578f3c){const _0x2f19b7=a97_0x1e22,_0x550266=_0xd934e8();while(!![]){try{const _0x4ded22=parseInt(_0x2f19b7(0x1cb))/0x1*(-parseInt(_0x2f19b7(0x1c3))/0x2)+-parseInt(_0x2f19b7(0x1c7))/0x3*(parseInt(_0x2f19b7(0x1be))/0x4)+-parseInt(_0x2f19b7(0x1c1))/0x5*(parseInt(_0x2f19b7(0x1bf))/0x6)+parseInt(_0x2f19b7(0x1c9))/0x7+parseInt(_0x2f19b7(0x1c6))/0x8+-parseInt(_0x2f19b7(0x1c2))/0x9+parseInt(_0x2f19b7(0x1c0))/0xa;if(_0x4ded22===_0x578f3c)break;else _0x550266['push'](_0x550266['shift']());}catch(_0x58956f){_0x550266['push'](_0x550266['shift']());}}}(a97_0x469a,0xda626));import{createHash}from'node:crypto';function a97_0x1e22(_0x3eddd9,_0x3d389b){_0x3eddd9=_0x3eddd9-0x1bd;const _0x469a95=a97_0x469a();let _0x1e22ff=_0x469a95[_0x3eddd9];return _0x1e22ff;}function a97_0x469a(){const _0x6300d0=['2306559bxbiIb','sha256','4230625AujZLn','digest','3GnWSib','path','4dHVhZG','138990UTTNsh','31009370MDCkvF','25ORQHrA','15747957dmsTmt','253898CBBBeg','hex','update','1635904jaQBRK'];a97_0x469a=function(){return _0x6300d0;};return a97_0x469a();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xc57bba){const _0x3788c7=a97_0x1e22;return createHash(_0x3788c7(0x1c8))[_0x3788c7(0x1c5)](_0xc57bba)[_0x3788c7(0x1ca)]('hex');}export function fileHash(_0x883372){return bufferSha256(fileContent(_0x883372));}export function bufferSha256(_0x3c337b){const _0x5be195=a97_0x1e22;return createHash('sha256')[_0x5be195(0x1c5)](_0x3c337b)[_0x5be195(0x1ca)](_0x5be195(0x1c4));}export function fileTreeHash(_0x22d591){const _0x1d5a75=a97_0x1e22,_0x17a7d9=createHash(_0x1d5a75(0x1c8));for(const _0x468810 of normalizeManifestFiles(_0x22d591)){_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1bd)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9['update'](_0x468810[_0x1d5a75(0x1c8)]),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00'),_0x17a7d9[_0x1d5a75(0x1c5)](String(_0x468810['size'])),_0x17a7d9[_0x1d5a75(0x1c5)]('\x00');}return _0x17a7d9[_0x1d5a75(0x1ca)]('hex');}
@@ -1 +1 @@
1
- (function(_0x4d54a6,_0x20a242){const _0x25b049=a98_0x24b1,_0x351d8b=_0x4d54a6();while(!![]){try{const _0x560027=parseInt(_0x25b049(0x165))/0x1*(parseInt(_0x25b049(0x16f))/0x2)+-parseInt(_0x25b049(0x184))/0x3*(-parseInt(_0x25b049(0x174))/0x4)+-parseInt(_0x25b049(0x15b))/0x5+-parseInt(_0x25b049(0x160))/0x6*(parseInt(_0x25b049(0x166))/0x7)+-parseInt(_0x25b049(0x17f))/0x8*(-parseInt(_0x25b049(0x176))/0x9)+-parseInt(_0x25b049(0x177))/0xa+parseInt(_0x25b049(0x17d))/0xb;if(_0x560027===_0x20a242)break;else _0x351d8b['push'](_0x351d8b['shift']());}catch(_0x14c29e){_0x351d8b['push'](_0x351d8b['shift']());}}}(a98_0x292c,0xa95f3));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x44d28c from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a98_0x292c(){const _0x55973a=['2000270BYUPZC','trim','env','length','updated','1770HHOJgE','scope','has','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','skillCode','20549EXUkBG','28882RUGJNA','created','get','name','values','external-symlink','claudeSkillsDir','set','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','52GzgoWu','map','metadata-mismatch','removed','pruneSkillCodes','1092ZOGQyw','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','2402919GtemaY','8461120pnISBg','push','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','slice','isDirectory','accessKey','11544775uWXLgg','startsWith','40qioxEs','appCode','not-managed-symlink','skill','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','2619dQnexy','builtin','skipped','isSymbolicLink','filter','validation','unchanged','dir','agentsSkillsDir','managedRoot','contentHash','personal','activeSkillCodes','scopes'];a98_0x292c=function(){return _0x55973a;};return a98_0x292c();}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x44d28c;export function linkEffectiveRuntimeSkills(_0x1d1311,_0x4a3dba,_0x39104e={}){const _0x4426ab=a98_0x24b1,_0x30ba70=new Map();for(const _0x154a01 of _0x1d1311){const _0x4b35e2=_0x154a01[_0x4426ab(0x182)][_0x4426ab(0x164)];if(!_0x4b35e2)continue;const _0x34d8c1=_0x30ba70[_0x4426ab(0x168)](_0x4b35e2);(!_0x34d8c1||_0x154a01['scope']==='personal')&&_0x30ba70[_0x4426ab(0x16d)](_0x4b35e2,_0x154a01);}const _0x350e90=[],_0x4a32d3=resolveSkillSyncPaths(_0x39104e);for(const _0x29b3c6 of _0x30ba70[_0x4426ab(0x16a)]()){const _0x47ebc3=requireSkillCode(_0x29b3c6[_0x4426ab(0x182)]),_0x2c971b=_0x4a3dba+'--'+_0x47ebc3;for(const _0x324a8a of[_0x4a32d3['agentsSkillsDir'],_0x4a32d3['claudeSkillsDir']]){_0x350e90['push'](ensureManagedSymlink(resolve(_0x324a8a,_0x2c971b),_0x29b3c6[_0x4426ab(0x154)],_0x4a32d3[_0x4426ab(0x156)]));}}return _0x350e90;}export function pruneStaleRuntimeSkillLinks(_0x57da9e,_0x531cbc,_0x8e8e29={},_0x4acb7c){const _0x1159bc=a98_0x24b1,_0x3bda8f=resolveSkillSyncPaths(_0x8e8e29),_0x2ba1c8=new Set([..._0x531cbc][_0x1159bc(0x170)](_0x1689ae=>_0x1689ae['trim']())[_0x1159bc(0x188)](Boolean)),_0x50f44f=_0x4acb7c?new Set([..._0x4acb7c][_0x1159bc(0x170)](_0x2a00b0=>_0x2a00b0[_0x1159bc(0x15c)]())[_0x1159bc(0x188)](Boolean)):undefined,_0x5d299d=[];for(const _0x5ba3cd of[_0x3bda8f[_0x1159bc(0x155)],_0x3bda8f[_0x1159bc(0x16c)]]){for(const _0x4ce98e of managedAppSkillLinkPaths(_0x5ba3cd,_0x57da9e)){const _0x166fc7=basename(_0x4ce98e)[_0x1159bc(0x17a)]((_0x57da9e+'--')[_0x1159bc(0x15e)]);if(_0x50f44f&&!_0x50f44f['has'](_0x166fc7))continue;if(_0x2ba1c8[_0x1159bc(0x162)](_0x166fc7))continue;_0x5d299d['push'](removeManagedSkillLink(_0x4ce98e,_0x3bda8f['managedRoot']));}}return _0x5d299d;}export function pruneStaleRuntimeSkillCache(_0x47a9a3,_0x395583={}){const _0x2c02fe=a98_0x24b1,_0x2c0ba1=new Set([..._0x47a9a3[_0x2c02fe(0x159)]][_0x2c02fe(0x170)](_0x62640c=>_0x62640c['trim']())[_0x2c02fe(0x188)](Boolean)),_0x2d919f=_0x47a9a3[_0x2c02fe(0x173)]?new Set([..._0x47a9a3['pruneSkillCodes']]['map'](_0x51e245=>_0x51e245[_0x2c02fe(0x15c)]())[_0x2c02fe(0x188)](Boolean)):undefined,_0xecd13b=_0x47a9a3[_0x2c02fe(0x15a)]??[_0x2c02fe(0x158),'company'],_0x2993f0=resolve(getRuntimeSkillCacheRoot(_0x47a9a3[_0x2c02fe(0x15d)],_0x47a9a3[_0x2c02fe(0x17c)],_0x395583),safePathSegment(_0x47a9a3[_0x2c02fe(0x180)],_0x2c02fe(0x180))),_0x2fa1a6=[];for(const _0x597cf1 of _0xecd13b){const _0x505018=resolve(_0x2993f0,_0x597cf1);if(!existsSync(_0x505018))continue;for(const _0x51ca10 of readdirSync(_0x505018,{'withFileTypes':!![]})){if(!_0x51ca10[_0x2c02fe(0x17b)]())continue;const _0x18e42d=_0x51ca10[_0x2c02fe(0x169)];if(_0x2d919f&&!_0x2d919f[_0x2c02fe(0x162)](_0x18e42d))continue;if(_0x2c0ba1[_0x2c02fe(0x162)](_0x18e42d))continue;const _0x3d5cb6=resolve(_0x505018,_0x18e42d),_0x5cc98c=readMetadataIfPresent(resolve(_0x3d5cb6,METADATA_FILE));if(_0x5cc98c?.[_0x2c02fe(0x180)]!==_0x47a9a3[_0x2c02fe(0x180)]||_0x5cc98c[_0x2c02fe(0x161)]!==_0x597cf1||_0x5cc98c[_0x2c02fe(0x164)]!==_0x18e42d){_0x2fa1a6[_0x2c02fe(0x178)]({'path':_0x3d5cb6,'action':'skipped','reason':_0x2c02fe(0x171)});continue;}removeSync(_0x3d5cb6),_0x2fa1a6['push']({'path':_0x3d5cb6,'action':_0x2c02fe(0x172)});}}return _0x2fa1a6;}export function linkGlobalRuntimeSkills(_0x5aa720,_0x575db1={}){const _0x3388c8=a98_0x24b1,_0x3103e3=resolveSkillSyncPaths(_0x575db1),_0x152510=[];for(const _0x1e5e78 of _0x5aa720){if(_0x1e5e78[_0x3388c8(0x161)]!==_0x3388c8(0x185))throw CliErrors[_0x3388c8(0x189)](_0x3388c8(0x16e)+_0x1e5e78[_0x3388c8(0x161)]);const _0x5c692b=requireSkillCode(_0x1e5e78[_0x3388c8(0x182)]),_0x5497b4=copyManagedSkillDirectory(_0x1e5e78[_0x3388c8(0x154)],resolve(_0x3103e3['agentsSkillsDir'],_0x5c692b));_0x152510['push']({..._0x5497b4,'contentHash':_0x1e5e78[_0x3388c8(0x157)]});}return _0x152510;}function ensureManagedSymlink(_0x5920e8,_0x2b34df,_0x44839c){const _0x3e9c0a=a98_0x24b1;mkdirSync(dirname(_0x5920e8),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5920e8)||isDanglingSymlink(_0x5920e8)){const _0x557c78=lstatSync(_0x5920e8);if(!_0x557c78[_0x3e9c0a(0x187)]())throw CliErrors[_0x3e9c0a(0x189)](_0x3e9c0a(0x163)+_0x5920e8);const _0x17bd87=resolveSymlinkTarget(_0x5920e8);if(!isPathInside(realOrResolved(_0x17bd87),realOrResolved(_0x44839c)))throw CliErrors[_0x3e9c0a(0x189)](_0x3e9c0a(0x175)+_0x5920e8);if(realOrResolved(_0x17bd87)===realOrResolved(_0x2b34df))return{'path':_0x5920e8,'target':_0x2b34df,'action':_0x3e9c0a(0x18a)};return unlinkSync(_0x5920e8),symlinkSync(_0x2b34df,_0x5920e8,_0x3e9c0a(0x154)),{'path':_0x5920e8,'target':_0x2b34df,'action':_0x3e9c0a(0x15f)};}return symlinkSync(_0x2b34df,_0x5920e8,'dir'),{'path':_0x5920e8,'target':_0x2b34df,'action':'created'};}function managedAppSkillLinkPaths(_0x108e3a,_0x400618){const _0x78dfe1=a98_0x24b1;if(!existsSync(_0x108e3a))return[];const _0x47654b=_0x400618+'--';return readdirSync(_0x108e3a,{'withFileTypes':!![]})[_0x78dfe1(0x188)](_0x10c8fb=>_0x10c8fb['name'][_0x78dfe1(0x17e)](_0x47654b))[_0x78dfe1(0x170)](_0x497f5e=>resolve(_0x108e3a,_0x497f5e[_0x78dfe1(0x169)]));}function removeManagedSkillLink(_0xaafe52,_0x4472ab){const _0xc5f225=a98_0x24b1,_0x321bcb=lstatIfPresent(_0xaafe52);if(!_0x321bcb?.['isSymbolicLink']())return{'path':_0xaafe52,'action':_0xc5f225(0x186),'reason':_0xc5f225(0x181)};const _0x395961=resolveSymlinkTarget(_0xaafe52);if(!isPathInside(realOrResolved(_0x395961),realOrResolved(_0x4472ab)))return{'path':_0xaafe52,'action':_0xc5f225(0x186),'reason':_0xc5f225(0x16b)};return unlinkSync(_0xaafe52),{'path':_0xaafe52,'action':_0xc5f225(0x172)};}export function copyManagedSkillDirectory(_0x450b65,_0x3a2eb4){const _0x1ebd26=a98_0x24b1,_0x421921=resolve(_0x3a2eb4,METADATA_FILE),_0x100b92=existsSync(_0x3a2eb4);if(_0x100b92){const _0x3f1f6f=lstatSync(_0x3a2eb4);if(_0x3f1f6f[_0x1ebd26(0x187)]())throw CliErrors[_0x1ebd26(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x3a2eb4);if(!_0x3f1f6f[_0x1ebd26(0x17b)]())throw CliErrors[_0x1ebd26(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x3a2eb4);const _0x3dd10e=readMetadataIfPresent(_0x421921);if(_0x3dd10e?.[_0x1ebd26(0x161)]!==_0x1ebd26(0x185))throw CliErrors['validation'](_0x1ebd26(0x179)+_0x3a2eb4);}ensureDirSync(dirname(_0x3a2eb4));const _0x574b15=_0x100b92?readMetadataIfPresent(_0x421921)?.[_0x1ebd26(0x157)]:undefined,_0x13a086=readMetadataIfPresent(resolve(_0x450b65,METADATA_FILE))?.[_0x1ebd26(0x157)];return _0x100b92&&removeSync(_0x3a2eb4),copySkillDirectory(_0x450b65,_0x3a2eb4),{'path':_0x3a2eb4,'target':_0x450b65,'action':!_0x100b92?_0x1ebd26(0x167):_0x574b15===_0x13a086?_0x1ebd26(0x18a):_0x1ebd26(0x15f)};}function a98_0x24b1(_0x55bd9b,_0x3609ce){_0x55bd9b=_0x55bd9b-0x154;const _0x292c96=a98_0x292c();let _0x24b141=_0x292c96[_0x55bd9b];return _0x24b141;}function copySkillDirectory(_0x4652fb,_0x536fe3){copySync(_0x4652fb,_0x536fe3,{'dereference':![],'overwrite':!![],'filter'(_0x373428){const _0x211527=a98_0x24b1;if(lstatSync(_0x373428)[_0x211527(0x187)]())throw CliErrors['validation'](_0x211527(0x183)+_0x373428);return!![];}});}
1
+ (function(_0x34f897,_0x1c9ece){const _0x1580a4=a98_0x7e97,_0x84fbec=_0x34f897();while(!![]){try{const _0x2970cf=parseInt(_0x1580a4(0xad))/0x1+parseInt(_0x1580a4(0xb8))/0x2+-parseInt(_0x1580a4(0xd2))/0x3+-parseInt(_0x1580a4(0xcb))/0x4+-parseInt(_0x1580a4(0xa5))/0x5+parseInt(_0x1580a4(0xc2))/0x6+-parseInt(_0x1580a4(0xce))/0x7;if(_0x2970cf===_0x1c9ece)break;else _0x84fbec['push'](_0x84fbec['shift']());}catch(_0x308bb4){_0x84fbec['push'](_0x84fbec['shift']());}}}(a98_0x5ae1,0x96ba4));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x1ab013 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a98_0x5ae1(){const _0x37272c=['updated','created','scopes','has','filter','11680tAUIyi','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','claudeSkillsDir','134204utquLh','dir','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','3082947CTeHXH','get','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','trim','skill','2824300QsKmTu','unchanged','map','managedRoot','push','scope','values','appCode','1021354oyIpyM','name','agentsSkillsDir','company','isDirectory','removed','validation','startsWith','external-symlink','pruneSkillCodes','accessKey','2078182XoWVSc','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','slice','personal','not-managed-symlink','activeSkillCodes','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','isSymbolicLink','contentHash','builtin','1029216lntsIf','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skillCode','skipped'];a98_0x5ae1=function(){return _0x37272c;};return a98_0x5ae1();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x1ab013;export function linkEffectiveRuntimeSkills(_0x71d73f,_0x3b9517,_0x5372dd={}){const _0x26d812=a98_0x7e97,_0x1dddf3=new Map();for(const _0x1bd2f5 of _0x71d73f){const _0x4cc646=_0x1bd2f5[_0x26d812(0xa4)][_0x26d812(0xc4)];if(!_0x4cc646)continue;const _0x5ab6a5=_0x1dddf3[_0x26d812(0xd3)](_0x4cc646);(!_0x5ab6a5||_0x1bd2f5[_0x26d812(0xaa)]===_0x26d812(0xbb))&&_0x1dddf3['set'](_0x4cc646,_0x1bd2f5);}const _0x1aafe8=[],_0x3fb8be=resolveSkillSyncPaths(_0x5372dd);for(const _0x42011e of _0x1dddf3[_0x26d812(0xab)]()){const _0x4c38d5=requireSkillCode(_0x42011e[_0x26d812(0xa4)]),_0x20f271=_0x3b9517+'--'+_0x4c38d5;for(const _0x14400c of[_0x3fb8be[_0x26d812(0xaf)],_0x3fb8be[_0x26d812(0xcd)]]){_0x1aafe8['push'](ensureManagedSymlink(resolve(_0x14400c,_0x20f271),_0x42011e[_0x26d812(0xcf)],_0x3fb8be[_0x26d812(0xa8)]));}}return _0x1aafe8;}export function pruneStaleRuntimeSkillLinks(_0x5d4ad9,_0x59447c,_0x62db6={},_0x16d549){const _0x4a6065=a98_0x7e97,_0x3a1eed=resolveSkillSyncPaths(_0x62db6),_0x323c0d=new Set([..._0x59447c][_0x4a6065(0xa7)](_0x3bd212=>_0x3bd212['trim']())[_0x4a6065(0xca)](Boolean)),_0x54833e=_0x16d549?new Set([..._0x16d549][_0x4a6065(0xa7)](_0x201436=>_0x201436[_0x4a6065(0xd5)]())[_0x4a6065(0xca)](Boolean)):undefined,_0x22ea5c=[];for(const _0x5bbb33 of[_0x3a1eed[_0x4a6065(0xaf)],_0x3a1eed[_0x4a6065(0xcd)]]){for(const _0x701f5c of managedAppSkillLinkPaths(_0x5bbb33,_0x5d4ad9)){const _0x4714ed=basename(_0x701f5c)[_0x4a6065(0xba)]((_0x5d4ad9+'--')['length']);if(_0x54833e&&!_0x54833e[_0x4a6065(0xc9)](_0x4714ed))continue;if(_0x323c0d[_0x4a6065(0xc9)](_0x4714ed))continue;_0x22ea5c['push'](removeManagedSkillLink(_0x701f5c,_0x3a1eed[_0x4a6065(0xa8)]));}}return _0x22ea5c;}export function pruneStaleRuntimeSkillCache(_0x2b7397,_0x4db071={}){const _0x1ee96a=a98_0x7e97,_0x229a30=new Set([..._0x2b7397[_0x1ee96a(0xbd)]][_0x1ee96a(0xa7)](_0x1b60b7=>_0x1b60b7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)),_0x1f1a18=_0x2b7397[_0x1ee96a(0xb6)]?new Set([..._0x2b7397[_0x1ee96a(0xb6)]][_0x1ee96a(0xa7)](_0x159fc7=>_0x159fc7[_0x1ee96a(0xd5)]())[_0x1ee96a(0xca)](Boolean)):undefined,_0x2904d9=_0x2b7397[_0x1ee96a(0xc8)]??[_0x1ee96a(0xbb),_0x1ee96a(0xb0)],_0xd550c=resolve(getRuntimeSkillCacheRoot(_0x2b7397['env'],_0x2b7397[_0x1ee96a(0xb7)],_0x4db071),safePathSegment(_0x2b7397[_0x1ee96a(0xac)],_0x1ee96a(0xac))),_0xf68a39=[];for(const _0x417c81 of _0x2904d9){const _0x3347c6=resolve(_0xd550c,_0x417c81);if(!existsSync(_0x3347c6))continue;for(const _0x205662 of readdirSync(_0x3347c6,{'withFileTypes':!![]})){if(!_0x205662[_0x1ee96a(0xb1)]())continue;const _0x1fbcfe=_0x205662['name'];if(_0x1f1a18&&!_0x1f1a18[_0x1ee96a(0xc9)](_0x1fbcfe))continue;if(_0x229a30['has'](_0x1fbcfe))continue;const _0x2ed4b7=resolve(_0x3347c6,_0x1fbcfe),_0x18dd09=readMetadataIfPresent(resolve(_0x2ed4b7,METADATA_FILE));if(_0x18dd09?.[_0x1ee96a(0xac)]!==_0x2b7397['appCode']||_0x18dd09[_0x1ee96a(0xaa)]!==_0x417c81||_0x18dd09[_0x1ee96a(0xc4)]!==_0x1fbcfe){_0xf68a39[_0x1ee96a(0xa9)]({'path':_0x2ed4b7,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x2ed4b7),_0xf68a39['push']({'path':_0x2ed4b7,'action':_0x1ee96a(0xb2)});}}return _0xf68a39;}export function linkGlobalRuntimeSkills(_0x177db2,_0x502946={}){const _0x14dbbe=a98_0x7e97,_0x3c8de5=resolveSkillSyncPaths(_0x502946),_0x3d3701=[];for(const _0x37e3a2 of _0x177db2){if(_0x37e3a2[_0x14dbbe(0xaa)]!==_0x14dbbe(0xc1))throw CliErrors[_0x14dbbe(0xb3)](_0x14dbbe(0xd4)+_0x37e3a2[_0x14dbbe(0xaa)]);const _0x32e0a8=requireSkillCode(_0x37e3a2[_0x14dbbe(0xa4)]),_0x8cded6=copyManagedSkillDirectory(_0x37e3a2[_0x14dbbe(0xcf)],resolve(_0x3c8de5[_0x14dbbe(0xaf)],_0x32e0a8));_0x3d3701[_0x14dbbe(0xa9)]({..._0x8cded6,'contentHash':_0x37e3a2[_0x14dbbe(0xc0)]});}return _0x3d3701;}function ensureManagedSymlink(_0x9b08fb,_0x372af7,_0x1094a0){const _0x80149=a98_0x7e97;mkdirSync(dirname(_0x9b08fb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x9b08fb)||isDanglingSymlink(_0x9b08fb)){const _0x43e09c=lstatSync(_0x9b08fb);if(!_0x43e09c['isSymbolicLink']())throw CliErrors['validation'](_0x80149(0xd1)+_0x9b08fb);const _0x10618f=resolveSymlinkTarget(_0x9b08fb);if(!isPathInside(realOrResolved(_0x10618f),realOrResolved(_0x1094a0)))throw CliErrors[_0x80149(0xb3)](_0x80149(0xc3)+_0x9b08fb);if(realOrResolved(_0x10618f)===realOrResolved(_0x372af7))return{'path':_0x9b08fb,'target':_0x372af7,'action':'unchanged'};return unlinkSync(_0x9b08fb),symlinkSync(_0x372af7,_0x9b08fb,'dir'),{'path':_0x9b08fb,'target':_0x372af7,'action':_0x80149(0xc6)};}return symlinkSync(_0x372af7,_0x9b08fb,_0x80149(0xcf)),{'path':_0x9b08fb,'target':_0x372af7,'action':'created'};}function managedAppSkillLinkPaths(_0x2e9d30,_0x7f4a1c){const _0x56dfbf=a98_0x7e97;if(!existsSync(_0x2e9d30))return[];const _0x52e61c=_0x7f4a1c+'--';return readdirSync(_0x2e9d30,{'withFileTypes':!![]})[_0x56dfbf(0xca)](_0x2038ed=>_0x2038ed[_0x56dfbf(0xae)][_0x56dfbf(0xb4)](_0x52e61c))[_0x56dfbf(0xa7)](_0xc93c67=>resolve(_0x2e9d30,_0xc93c67[_0x56dfbf(0xae)]));}function a98_0x7e97(_0x708d97,_0x46bd59){_0x708d97=_0x708d97-0xa4;const _0x5ae1bc=a98_0x5ae1();let _0x7e977f=_0x5ae1bc[_0x708d97];return _0x7e977f;}function removeManagedSkillLink(_0x18ab5a,_0x46067b){const _0x5da838=a98_0x7e97,_0x49fb8b=lstatIfPresent(_0x18ab5a);if(!_0x49fb8b?.['isSymbolicLink']())return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xbc)};const _0x5b78c2=resolveSymlinkTarget(_0x18ab5a);if(!isPathInside(realOrResolved(_0x5b78c2),realOrResolved(_0x46067b)))return{'path':_0x18ab5a,'action':_0x5da838(0xc5),'reason':_0x5da838(0xb5)};return unlinkSync(_0x18ab5a),{'path':_0x18ab5a,'action':_0x5da838(0xb2)};}export function copyManagedSkillDirectory(_0x4e6276,_0x27fed1){const _0xdd9c10=a98_0x7e97,_0x35dbe1=resolve(_0x27fed1,METADATA_FILE),_0x52035e=existsSync(_0x27fed1);if(_0x52035e){const _0xf8f457=lstatSync(_0x27fed1);if(_0xf8f457['isSymbolicLink']())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xbe)+_0x27fed1);if(!_0xf8f457[_0xdd9c10(0xb1)]())throw CliErrors[_0xdd9c10(0xb3)](_0xdd9c10(0xb9)+_0x27fed1);const _0x2e536f=readMetadataIfPresent(_0x35dbe1);if(_0x2e536f?.[_0xdd9c10(0xaa)]!==_0xdd9c10(0xc1))throw CliErrors['validation'](_0xdd9c10(0xcc)+_0x27fed1);}ensureDirSync(dirname(_0x27fed1));const _0x21b33c=_0x52035e?readMetadataIfPresent(_0x35dbe1)?.[_0xdd9c10(0xc0)]:undefined,_0x42d585=readMetadataIfPresent(resolve(_0x4e6276,METADATA_FILE))?.['contentHash'];return _0x52035e&&removeSync(_0x27fed1),copySkillDirectory(_0x4e6276,_0x27fed1),{'path':_0x27fed1,'target':_0x4e6276,'action':!_0x52035e?_0xdd9c10(0xc7):_0x21b33c===_0x42d585?_0xdd9c10(0xa6):_0xdd9c10(0xc6)};}function copySkillDirectory(_0x1aafed,_0x50288b){copySync(_0x1aafed,_0x50288b,{'dereference':![],'overwrite':!![],'filter'(_0x15f451){const _0x2b2b9b=a98_0x7e97;if(lstatSync(_0x15f451)[_0x2b2b9b(0xbf)]())throw CliErrors[_0x2b2b9b(0xb3)](_0x2b2b9b(0xd0)+_0x15f451);return!![];}});}
@@ -1 +1 @@
1
- (function(_0xc328d8,_0x27e46a){const _0x5a4965=a99_0x2424,_0x111e53=_0xc328d8();while(!![]){try{const _0x3ec993=-parseInt(_0x5a4965(0x1bd))/0x1+parseInt(_0x5a4965(0x1b0))/0x2+parseInt(_0x5a4965(0x19e))/0x3*(-parseInt(_0x5a4965(0x1b6))/0x4)+-parseInt(_0x5a4965(0x1a3))/0x5*(parseInt(_0x5a4965(0x1a4))/0x6)+parseInt(_0x5a4965(0x1bb))/0x7*(-parseInt(_0x5a4965(0x1a6))/0x8)+parseInt(_0x5a4965(0x198))/0x9*(-parseInt(_0x5a4965(0x1a5))/0xa)+parseInt(_0x5a4965(0x19d))/0xb;if(_0x3ec993===_0x27e46a)break;else _0x111e53['push'](_0x111e53['shift']());}catch(_0x4f17c2){_0x111e53['push'](_0x111e53['shift']());}}}(a99_0x2bcb,0xb7723));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,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a99_0x2424(_0x20a067,_0x3d8ca7){_0x20a067=_0x20a067-0x193;const _0x2bcb44=a99_0x2bcb();let _0x242436=_0x2bcb44[_0x20a067];return _0x242436;}export function listLocalRuntimeSkills(_0x3e1187,_0x336c0d={}){const _0x335b82=a99_0x2424,_0x145b78=safePathSegment(_0x3e1187[_0x335b82(0x19a)],_0x335b82(0x19a)),_0x1f1e74=normalizeRuntimeSkillScopes(_0x3e1187['scopes']),_0x2fed5f=new Set(_0x1f1e74),_0x3cf04a=_0x3e1187[_0x335b82(0x1b7)]?.[_0x335b82(0x1a1)](),_0x3e34a5=new Map(),_0x317998=resolve(getRuntimeSkillCacheRoot(_0x3e1187[_0x335b82(0x1b1)],_0x3e1187[_0x335b82(0x1ba)],_0x336c0d),_0x145b78);for(const _0x32c735 of _0x1f1e74){for(const _0x28ae99 of localSkillEntryDirs(resolve(_0x317998,_0x32c735))){collectLocalRuntimeSkill(_0x3e34a5,_0x28ae99,{'appCode':_0x145b78,'scopes':_0x2fed5f,'code':_0x3cf04a,'source':_0x335b82(0x1a9)});}}const _0x791653=resolveSkillSyncPaths(_0x336c0d);for(const _0x491abe of[_0x791653[_0x335b82(0x195)],_0x791653[_0x335b82(0x1ac)]]){for(const _0x596785 of localSkillLinkCandidates(_0x491abe,_0x145b78,_0x2fed5f)){collectLocalRuntimeSkill(_0x3e34a5,_0x596785,{'appCode':_0x145b78,'scopes':_0x2fed5f,'code':_0x3cf04a,'source':_0x335b82(0x1ab),'linkedPath':_0x596785});}}return Array[_0x335b82(0x19c)](_0x3e34a5[_0x335b82(0x1be)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4315c4){const _0xce5608=a99_0x2424;if(!existsSync(_0x4315c4))return[];return readdirSync(_0x4315c4,{'withFileTypes':!![]})[_0xce5608(0x1b5)](_0x52ab2c=>_0x52ab2c[_0xce5608(0x194)]()||_0x52ab2c[_0xce5608(0x196)]())[_0xce5608(0x19b)](_0x555c55=>resolve(_0x4315c4,_0x555c55[_0xce5608(0x1a2)]));}function a99_0x2bcb(){const _0x3bbebe=['code','startsWith','get','accessKey','7mmnWcT','scopes','852437lpVgUU','values','includes','isDirectory','agentsSkillsDir','isSymbolicLink','skillMdPath','135uxMAQw','linkedPaths','appCode','map','from','45854523suqKUF','239007GJiauK','push','set','trim','name','875395cmPaQE','12QZfQcv','911030QpOAeK','3785384jhUulq','local','dir','cache','metadataPath','link','claudeSkillsDir','linkedPath','localeCompare','tags','365596dnCQTI','env','scope','builtin','skillCode','filter','28hBBIZu'];a99_0x2bcb=function(){return _0x3bbebe;};return a99_0x2bcb();}function localSkillLinkCandidates(_0x461332,_0x5d203e,_0x2520ed){const _0x242b82=a99_0x2424;if(!existsSync(_0x461332))return[];const _0x3c2b93=_0x5d203e+'--';return readdirSync(_0x461332,{'withFileTypes':!![]})[_0x242b82(0x1b5)](_0x282c78=>_0x282c78['isDirectory']()||_0x282c78['isSymbolicLink']())[_0x242b82(0x1b5)](_0x378324=>_0x378324[_0x242b82(0x1a2)][_0x242b82(0x1b8)](_0x3c2b93)||_0x2520ed['has'](_0x242b82(0x1b3)))['map'](_0x83fd9=>resolve(_0x461332,_0x83fd9[_0x242b82(0x1a2)]));}function collectLocalRuntimeSkill(_0x597f98,_0x2ed043,_0x367dae){const _0x338f92=a99_0x2424,_0x2200e4=resolve(_0x2ed043,METADATA_FILE),_0x3474c7=readMetadataIfPresent(_0x2200e4);if(!_0x3474c7)return;if(_0x3474c7['appCode']!==_0x367dae['appCode'])return;if(!isRuntimeSkillScope(_0x3474c7[_0x338f92(0x1b2)])||!_0x367dae[_0x338f92(0x1bc)]['has'](_0x3474c7[_0x338f92(0x1b2)]))return;const _0x3bb511=_0x3474c7[_0x338f92(0x1b4)]?.['trim']();if(!_0x3bb511)return;if(_0x367dae[_0x338f92(0x1b7)]&&_0x3bb511!==_0x367dae['code'])return;const _0x13da60=_0x3474c7[_0x338f92(0x1b2)]+':'+_0x3bb511,_0x47c09a=_0x367dae[_0x338f92(0x1ad)]?[_0x367dae['linkedPath']]:[],_0x1573e0=_0x597f98[_0x338f92(0x1b9)](_0x13da60);if(_0x1573e0){_0x367dae['source']==='cache'&&(_0x1573e0['dir']=_0x2ed043,_0x1573e0['cacheDir']=_0x2ed043,_0x1573e0[_0x338f92(0x197)]=resolve(_0x2ed043,SKILL_FILE),_0x1573e0[_0x338f92(0x1aa)]=_0x2200e4);for(const _0x995324 of _0x47c09a){!_0x1573e0[_0x338f92(0x199)][_0x338f92(0x193)](_0x995324)&&_0x1573e0[_0x338f92(0x199)][_0x338f92(0x19f)](_0x995324);}_0x1573e0[_0x338f92(0x199)]['sort']();return;}_0x597f98[_0x338f92(0x1a0)](_0x13da60,{..._0x3474c7,'tags':Array['isArray'](_0x3474c7['tags'])?_0x3474c7[_0x338f92(0x1af)]:[],'scope':_0x3474c7[_0x338f92(0x1b2)],'source':_0x338f92(0x1a7),'dir':_0x2ed043,'cacheDir':_0x367dae['source']===_0x338f92(0x1a9)?_0x2ed043:undefined,'skillMdPath':resolve(_0x2ed043,SKILL_FILE),'metadataPath':_0x2200e4,'linkedPaths':_0x47c09a});}function compareLocalRuntimeSkills(_0x2ef0c9,_0xe85c27){const _0x563a30=a99_0x2424,_0x4310c3={'personal':0x0,'company':0x1,'builtin':0x2};return _0x4310c3[_0x2ef0c9['scope']]-_0x4310c3[_0xe85c27['scope']]||_0x2ef0c9[_0x563a30(0x1b4)][_0x563a30(0x1ae)](_0xe85c27[_0x563a30(0x1b4)])||_0x2ef0c9[_0x563a30(0x1a8)][_0x563a30(0x1ae)](_0xe85c27[_0x563a30(0x1a8)]);}
1
+ (function(_0xbf41db,_0x437287){const _0x18d6ce=a99_0x323a,_0x4282cc=_0xbf41db();while(!![]){try{const _0x23df33=parseInt(_0x18d6ce(0xe1))/0x1+-parseInt(_0x18d6ce(0xf5))/0x2*(-parseInt(_0x18d6ce(0xf6))/0x3)+-parseInt(_0x18d6ce(0xfa))/0x4*(parseInt(_0x18d6ce(0xe0))/0x5)+-parseInt(_0x18d6ce(0xf1))/0x6*(parseInt(_0x18d6ce(0xd8))/0x7)+-parseInt(_0x18d6ce(0xf3))/0x8+-parseInt(_0x18d6ce(0xec))/0x9*(-parseInt(_0x18d6ce(0xd7))/0xa)+parseInt(_0x18d6ce(0xdb))/0xb;if(_0x23df33===_0x437287)break;else _0x4282cc['push'](_0x4282cc['shift']());}catch(_0x597b8a){_0x4282cc['push'](_0x4282cc['shift']());}}}(a99_0x5d57,0x44017));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a99_0x5d57(){const _0x5c32ee=['builtin','sort','884fcxsWV','set','env','startsWith','cacheDir','includes','skillCode','cache','20ojGkEE','21uCTXOP','metadataPath','code','4615567TSWjbj','map','tags','from','linkedPaths','355DduKcd','308053GcAOYE','scope','source','link','get','localeCompare','isDirectory','appCode','dir','linkedPath','filter','1147806azeXLk','isSymbolicLink','scopes','values','claudeSkillsDir','869502Vmspsg','trim','2805184abUUut','name','206HnyoJg','2823OxLCWO','skillMdPath'];a99_0x5d57=function(){return _0x5c32ee;};return a99_0x5d57();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x1bbd05,_0x17ded5={}){const _0x36cfef=a99_0x323a,_0x2233d6=safePathSegment(_0x1bbd05['appCode'],'appCode'),_0x1d37de=normalizeRuntimeSkillScopes(_0x1bbd05[_0x36cfef(0xee)]),_0xd6f6b=new Set(_0x1d37de),_0x10f413=_0x1bbd05[_0x36cfef(0xda)]?.['trim'](),_0x833c7=new Map(),_0x359522=resolve(getRuntimeSkillCacheRoot(_0x1bbd05[_0x36cfef(0xfc)],_0x1bbd05['accessKey'],_0x17ded5),_0x2233d6);for(const _0x1ce169 of _0x1d37de){for(const _0x43cdd4 of localSkillEntryDirs(resolve(_0x359522,_0x1ce169))){collectLocalRuntimeSkill(_0x833c7,_0x43cdd4,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xd6)});}}const _0x9640b2=resolveSkillSyncPaths(_0x17ded5);for(const _0x5466bd of[_0x9640b2['agentsSkillsDir'],_0x9640b2[_0x36cfef(0xf0)]]){for(const _0x2d9c6 of localSkillLinkCandidates(_0x5466bd,_0x2233d6,_0xd6f6b)){collectLocalRuntimeSkill(_0x833c7,_0x2d9c6,{'appCode':_0x2233d6,'scopes':_0xd6f6b,'code':_0x10f413,'source':_0x36cfef(0xe4),'linkedPath':_0x2d9c6});}}return Array[_0x36cfef(0xde)](_0x833c7[_0x36cfef(0xef)]())[_0x36cfef(0xf9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x49551a){const _0x573889=a99_0x323a;if(!existsSync(_0x49551a))return[];return readdirSync(_0x49551a,{'withFileTypes':!![]})['filter'](_0x2ae7d9=>_0x2ae7d9[_0x573889(0xe7)]()||_0x2ae7d9[_0x573889(0xed)]())[_0x573889(0xdc)](_0x41c3dc=>resolve(_0x49551a,_0x41c3dc[_0x573889(0xf4)]));}function localSkillLinkCandidates(_0x439d01,_0x3fc948,_0x324245){const _0x4e3cae=a99_0x323a;if(!existsSync(_0x439d01))return[];const _0x9fecfa=_0x3fc948+'--';return readdirSync(_0x439d01,{'withFileTypes':!![]})[_0x4e3cae(0xeb)](_0x35cf96=>_0x35cf96[_0x4e3cae(0xe7)]()||_0x35cf96[_0x4e3cae(0xed)]())[_0x4e3cae(0xeb)](_0x595d39=>_0x595d39['name'][_0x4e3cae(0xfd)](_0x9fecfa)||_0x324245['has'](_0x4e3cae(0xf8)))[_0x4e3cae(0xdc)](_0x1dd134=>resolve(_0x439d01,_0x1dd134[_0x4e3cae(0xf4)]));}function collectLocalRuntimeSkill(_0x135d96,_0x266393,_0x1a492e){const _0x2b6fda=a99_0x323a,_0x4c24cf=resolve(_0x266393,METADATA_FILE),_0x773b=readMetadataIfPresent(_0x4c24cf);if(!_0x773b)return;if(_0x773b[_0x2b6fda(0xe8)]!==_0x1a492e[_0x2b6fda(0xe8)])return;if(!isRuntimeSkillScope(_0x773b[_0x2b6fda(0xe2)])||!_0x1a492e['scopes']['has'](_0x773b['scope']))return;const _0x380c74=_0x773b[_0x2b6fda(0xd5)]?.[_0x2b6fda(0xf2)]();if(!_0x380c74)return;if(_0x1a492e['code']&&_0x380c74!==_0x1a492e[_0x2b6fda(0xda)])return;const _0x5a479c=_0x773b['scope']+':'+_0x380c74,_0x4637dd=_0x1a492e[_0x2b6fda(0xea)]?[_0x1a492e[_0x2b6fda(0xea)]]:[],_0x39022c=_0x135d96[_0x2b6fda(0xe5)](_0x5a479c);if(_0x39022c){_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)&&(_0x39022c[_0x2b6fda(0xe9)]=_0x266393,_0x39022c[_0x2b6fda(0xd3)]=_0x266393,_0x39022c[_0x2b6fda(0xf7)]=resolve(_0x266393,SKILL_FILE),_0x39022c[_0x2b6fda(0xd9)]=_0x4c24cf);for(const _0x153f2d of _0x4637dd){!_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xd4)](_0x153f2d)&&_0x39022c[_0x2b6fda(0xdf)]['push'](_0x153f2d);}_0x39022c[_0x2b6fda(0xdf)][_0x2b6fda(0xf9)]();return;}_0x135d96[_0x2b6fda(0xfb)](_0x5a479c,{..._0x773b,'tags':Array['isArray'](_0x773b['tags'])?_0x773b[_0x2b6fda(0xdd)]:[],'scope':_0x773b[_0x2b6fda(0xe2)],'source':'local','dir':_0x266393,'cacheDir':_0x1a492e[_0x2b6fda(0xe3)]===_0x2b6fda(0xd6)?_0x266393:undefined,'skillMdPath':resolve(_0x266393,SKILL_FILE),'metadataPath':_0x4c24cf,'linkedPaths':_0x4637dd});}function a99_0x323a(_0x278dfe,_0x5c28a1){_0x278dfe=_0x278dfe-0xd3;const _0x5d576d=a99_0x5d57();let _0x323a05=_0x5d576d[_0x278dfe];return _0x323a05;}function compareLocalRuntimeSkills(_0x84f065,_0xcfd87b){const _0x2819c3=a99_0x323a,_0x47cbd7={'personal':0x0,'company':0x1,'builtin':0x2};return _0x47cbd7[_0x84f065[_0x2819c3(0xe2)]]-_0x47cbd7[_0xcfd87b[_0x2819c3(0xe2)]]||_0x84f065[_0x2819c3(0xd5)][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xd5)])||_0x84f065['dir'][_0x2819c3(0xe6)](_0xcfd87b[_0x2819c3(0xe9)]);}
@@ -1 +1 @@
1
- (function(_0x3db9de,_0x378d02){const _0x40d078=a100_0x132f,_0x4532ef=_0x3db9de();while(!![]){try{const _0x4306dd=parseInt(_0x40d078(0x134))/0x1*(parseInt(_0x40d078(0x112))/0x2)+-parseInt(_0x40d078(0x113))/0x3+parseInt(_0x40d078(0x12e))/0x4+parseInt(_0x40d078(0x124))/0x5+parseInt(_0x40d078(0x123))/0x6*(parseInt(_0x40d078(0x117))/0x7)+-parseInt(_0x40d078(0x114))/0x8*(parseInt(_0x40d078(0x115))/0x9)+-parseInt(_0x40d078(0x10f))/0xa*(-parseInt(_0x40d078(0x11f))/0xb);if(_0x4306dd===_0x378d02)break;else _0x4532ef['push'](_0x4532ef['shift']());}catch(_0x4fd976){_0x4532ef['push'](_0x4532ef['shift']());}}}(a100_0x4705,0xd94d8));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(_0x25e8f7){const _0x4c4643=a100_0x132f;return _0x25e8f7[_0x4c4643(0x120)]??Buffer[_0x4c4643(0x12c)](_0x25e8f7['content']??'',_0x4c4643(0x127));}export function fileText(_0x53b211){const _0x247cfe=a100_0x132f;return fileContent(_0x53b211)[_0x247cfe(0x10e)]('utf8');}export function normalizeLocalFiles(_0x363a4d){const _0x2bae80=a100_0x132f;if(!Array[_0x2bae80(0x138)](_0x363a4d)||_0x363a4d[_0x2bae80(0x13a)]===0x0)return[];const _0x25b007=new Map();for(const _0x3bd052 of _0x363a4d){if(!_0x3bd052||typeof _0x3bd052!==_0x2bae80(0x122)||typeof _0x3bd052['path']!==_0x2bae80(0x132))throw CliErrors[_0x2bae80(0x128)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3850a1=normalizeSkillRelativePath(_0x3bd052[_0x2bae80(0x131)]);if(_0x25b007[_0x2bae80(0x135)](_0x3850a1))throw CliErrors['validation'](_0x2bae80(0x12b)+_0x3850a1);if(_0x3bd052[_0x2bae80(0x120)]!==undefined&&!Buffer[_0x2bae80(0x11d)](_0x3bd052['bytes']))throw CliErrors[_0x2bae80(0x128)](_0x2bae80(0x110)+_0x3850a1);if(_0x3bd052['bytes']===undefined&&typeof _0x3bd052[_0x2bae80(0x139)]!=='string')throw CliErrors[_0x2bae80(0x128)](_0x2bae80(0x12d)+_0x3850a1);const _0x26d206=fileContent(_0x3bd052);_0x25b007[_0x2bae80(0x12a)](_0x3850a1,{'path':_0x3850a1,'bytes':_0x26d206});}return Array[_0x2bae80(0x12c)](_0x25b007[_0x2bae80(0x130)]())['sort'](compareSkillFiles);}function a100_0x4705(){const _0x364829=['Duplicate\x20Skill\x20file\x20path:\x20','from','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','643732BVxesm','localeCompare','values','path','string','test','1619791OpemSh','has','Skill\x20file\x20path\x20must\x20be\x20text.','includes','isArray','content','length','split','compare','toLowerCase','isDirectory','toString','3297040GrABjh','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isSymbolicLink','2BmvrvG','3309339KePOeM','72tFalUj','1626597cxshkK','sort','7BefhCQ','size','startsWith','sha256','isSafeInteger','Skill\x20file\x20size\x20is\x20invalid:\x20','isBuffer','push','33KhzZNv','bytes','Unsafe\x20Skill\x20file\x20path:\x20','object','2885712kXMcSh','1844970DWyUHj','name','replace','utf8','validation','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','set'];a100_0x4705=function(){return _0x364829;};return a100_0x4705();}export function normalizeManifestFiles(_0x42eff4){const _0x2afb19=a100_0x132f;if(!Array['isArray'](_0x42eff4)||_0x42eff4[_0x2afb19(0x13a)]===0x0)return[];const _0x5cde7d=new Map();for(const _0x1a542e of _0x42eff4){if(!_0x1a542e||typeof _0x1a542e!==_0x2afb19(0x122)||typeof _0x1a542e['path']!==_0x2afb19(0x132))throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x136));const _0x2270ba=normalizeSkillRelativePath(_0x1a542e[_0x2afb19(0x131)]);if(_0x5cde7d[_0x2afb19(0x135)](_0x2270ba))throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x12b)+_0x2270ba);if(!isSha256Hex(_0x1a542e[_0x2afb19(0x11a)]))throw CliErrors[_0x2afb19(0x128)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x2270ba);if(!Number[_0x2afb19(0x11b)](_0x1a542e[_0x2afb19(0x118)])||_0x1a542e[_0x2afb19(0x118)]<0x0)throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x11c)+_0x2270ba);_0x5cde7d[_0x2afb19(0x12a)](_0x2270ba,{'path':_0x2270ba,'sha256':_0x1a542e[_0x2afb19(0x11a)][_0x2afb19(0x13d)](),'size':_0x1a542e[_0x2afb19(0x118)]});}return Array['from'](_0x5cde7d['values']())[_0x2afb19(0x116)](compareSkillFiles);}export function scanSkillDirectory(_0x144e27){const _0x350e00=realpathSync(_0x144e27),_0x59d327=[];function _0x28a8b9(_0x73c0d1){const _0x4029d5=a100_0x132f,_0xde56c1=readdirSync(_0x73c0d1,{'withFileTypes':!![]})[_0x4029d5(0x116)]((_0xae9e8e,_0x3ce783)=>_0xae9e8e[_0x4029d5(0x125)][_0x4029d5(0x12f)](_0x3ce783[_0x4029d5(0x125)]));for(const _0x3e2053 of _0xde56c1){if(_0x3e2053['isDirectory']()&&IGNORED_DIR_NAMES[_0x4029d5(0x135)](_0x3e2053[_0x4029d5(0x125)]))continue;if(IGNORED_FILE_NAMES[_0x4029d5(0x135)](_0x3e2053[_0x4029d5(0x125)]))continue;const _0x29f5fd=resolve(_0x73c0d1,_0x3e2053['name']);if(_0x3e2053[_0x4029d5(0x111)]())throw CliErrors[_0x4029d5(0x128)](_0x4029d5(0x129)+_0x29f5fd);const _0x41a49c=toPosixPath(relative(_0x350e00,_0x29f5fd));if(_0x3e2053[_0x4029d5(0x10d)]()){_0x28a8b9(_0x29f5fd);continue;}if(!_0x3e2053['isFile']())continue;validateSkillRelativePath(_0x41a49c);const _0x3c9193=readFileSync(_0x29f5fd);_0x59d327[_0x4029d5(0x11e)]({'path':_0x41a49c,'bytes':_0x3c9193});}}return _0x28a8b9(_0x350e00),normalizeLocalFiles(_0x59d327);}export function compareSkillFiles(_0x4867bd,_0x24421c){const _0x383d64=a100_0x132f;if(_0x4867bd[_0x383d64(0x131)]===SKILL_FILE)return _0x24421c[_0x383d64(0x131)]===SKILL_FILE?0x0:-0x1;if(_0x24421c[_0x383d64(0x131)]===SKILL_FILE)return 0x1;return Buffer[_0x383d64(0x13c)](Buffer[_0x383d64(0x12c)](_0x4867bd[_0x383d64(0x131)],_0x383d64(0x127)),Buffer[_0x383d64(0x12c)](_0x24421c[_0x383d64(0x131)],'utf8'));}function a100_0x132f(_0x1bc1b2,_0x118546){_0x1bc1b2=_0x1bc1b2-0x10d;const _0x47057c=a100_0x4705();let _0x132f11=_0x47057c[_0x1bc1b2];return _0x132f11;}export function normalizeSkillRelativePath(_0x579b44){const _0x5bc2f9=toPosixPath(_0x579b44['trim']());return validateSkillRelativePath(_0x5bc2f9),_0x5bc2f9;}export function validateSkillRelativePath(_0xb3720e){const _0x343298=a100_0x132f;if(!_0xb3720e||_0xb3720e[_0x343298(0x119)]('/')||_0xb3720e[_0x343298(0x137)]('//'))throw CliErrors[_0x343298(0x128)](_0x343298(0x121)+_0xb3720e);for(const _0x14aeb8 of _0xb3720e[_0x343298(0x13b)]('/')){if(!_0x14aeb8||_0x14aeb8==='.'||_0x14aeb8==='..')throw CliErrors['validation'](_0x343298(0x121)+_0xb3720e);}}export function toPosixPath(_0x4e9e83){const _0x58a068=a100_0x132f;return _0x4e9e83[_0x58a068(0x126)](/\\/g,'/');}export function isSha256Hex(_0x45a8d1){const _0x2a68b6=a100_0x132f;return typeof _0x45a8d1==='string'&&/^[a-fA-F0-9]{64}$/[_0x2a68b6(0x133)](_0x45a8d1);}
1
+ (function(_0x11973b,_0x352e4a){const _0x16c6e3=a100_0x2015,_0x7077d5=_0x11973b();while(!![]){try{const _0x201ffc=-parseInt(_0x16c6e3(0x1f5))/0x1*(parseInt(_0x16c6e3(0x1d5))/0x2)+parseInt(_0x16c6e3(0x1f0))/0x3*(parseInt(_0x16c6e3(0x1d4))/0x4)+parseInt(_0x16c6e3(0x1eb))/0x5*(-parseInt(_0x16c6e3(0x1d8))/0x6)+parseInt(_0x16c6e3(0x1fd))/0x7+parseInt(_0x16c6e3(0x1df))/0x8*(parseInt(_0x16c6e3(0x1dd))/0x9)+-parseInt(_0x16c6e3(0x1e1))/0xa*(-parseInt(_0x16c6e3(0x1f8))/0xb)+parseInt(_0x16c6e3(0x1ff))/0xc*(-parseInt(_0x16c6e3(0x1db))/0xd);if(_0x201ffc===_0x352e4a)break;else _0x7077d5['push'](_0x7077d5['shift']());}catch(_0x24a639){_0x7077d5['push'](_0x7077d5['shift']());}}}(a100_0x2b96,0x81b7c));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x14a701){const _0x573384=a100_0x2015;return _0x14a701['bytes']??Buffer['from'](_0x14a701[_0x573384(0x1ea)]??'',_0x573384(0x1fb));}function a100_0x2b96(){const _0x35cdb3=['string','3052980xCYtrI','set','1359552mRneqj','Skill\x20file\x20sha256\x20is\x20invalid:\x20','1596vslcNB','65470faNxgK','split','object','704118LDGTom','Duplicate\x20Skill\x20file\x20path:\x20','replace','91UBJsGV','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','11943fTXcHe','length','5288nAfkxR','sort','5990UNmcvq','values','isBuffer','bytes','name','isDirectory','startsWith','isFile','toLowerCase','content','5IuRyOv','Skill\x20file\x20size\x20is\x20invalid:\x20','validation','compare','path','120BYXKZk','has','isArray','test','toString','28saQygI','size','isSafeInteger','18898ctlIom','sha256','from','utf8'];a100_0x2b96=function(){return _0x35cdb3;};return a100_0x2b96();}export function fileText(_0x4883aa){const _0x3bece7=a100_0x2015;return fileContent(_0x4883aa)[_0x3bece7(0x1f4)](_0x3bece7(0x1fb));}export function normalizeLocalFiles(_0x4b8d1e){const _0x3eda37=a100_0x2015;if(!Array[_0x3eda37(0x1f2)](_0x4b8d1e)||_0x4b8d1e[_0x3eda37(0x1de)]===0x0)return[];const _0x23b6d2=new Map();for(const _0x25a5d7 of _0x4b8d1e){if(!_0x25a5d7||typeof _0x25a5d7!==_0x3eda37(0x1d7)||typeof _0x25a5d7['path']!=='string')throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5bce06=normalizeSkillRelativePath(_0x25a5d7[_0x3eda37(0x1ef)]);if(_0x23b6d2[_0x3eda37(0x1f1)](_0x5bce06))throw CliErrors[_0x3eda37(0x1ed)](_0x3eda37(0x1d9)+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]!==undefined&&!Buffer[_0x3eda37(0x1e3)](_0x25a5d7[_0x3eda37(0x1e4)]))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x5bce06);if(_0x25a5d7[_0x3eda37(0x1e4)]===undefined&&typeof _0x25a5d7['content']!==_0x3eda37(0x1fc))throw CliErrors[_0x3eda37(0x1ed)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x5bce06);const _0x2a357a=fileContent(_0x25a5d7);_0x23b6d2[_0x3eda37(0x1fe)](_0x5bce06,{'path':_0x5bce06,'bytes':_0x2a357a});}return Array['from'](_0x23b6d2[_0x3eda37(0x1e2)]())[_0x3eda37(0x1e0)](compareSkillFiles);}export function normalizeManifestFiles(_0x5a5043){const _0xf83e6e=a100_0x2015;if(!Array[_0xf83e6e(0x1f2)](_0x5a5043)||_0x5a5043[_0xf83e6e(0x1de)]===0x0)return[];const _0x46c26=new Map();for(const _0x5ca8d4 of _0x5a5043){if(!_0x5ca8d4||typeof _0x5ca8d4!==_0xf83e6e(0x1d7)||typeof _0x5ca8d4['path']!==_0xf83e6e(0x1fc))throw CliErrors[_0xf83e6e(0x1ed)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1eac69=normalizeSkillRelativePath(_0x5ca8d4['path']);if(_0x46c26['has'](_0x1eac69))throw CliErrors['validation'](_0xf83e6e(0x1d9)+_0x1eac69);if(!isSha256Hex(_0x5ca8d4[_0xf83e6e(0x1f9)]))throw CliErrors['validation'](_0xf83e6e(0x200)+_0x1eac69);if(!Number[_0xf83e6e(0x1f7)](_0x5ca8d4['size'])||_0x5ca8d4[_0xf83e6e(0x1f6)]<0x0)throw CliErrors[_0xf83e6e(0x1ed)](_0xf83e6e(0x1ec)+_0x1eac69);_0x46c26[_0xf83e6e(0x1fe)](_0x1eac69,{'path':_0x1eac69,'sha256':_0x5ca8d4[_0xf83e6e(0x1f9)][_0xf83e6e(0x1e9)](),'size':_0x5ca8d4[_0xf83e6e(0x1f6)]});}return Array[_0xf83e6e(0x1fa)](_0x46c26[_0xf83e6e(0x1e2)]())[_0xf83e6e(0x1e0)](compareSkillFiles);}export function scanSkillDirectory(_0x219ebd){const _0x3ca635=realpathSync(_0x219ebd),_0x57a5a5=[];function _0x27b849(_0x5bcfc4){const _0x1489bb=a100_0x2015,_0xc38a1f=readdirSync(_0x5bcfc4,{'withFileTypes':!![]})[_0x1489bb(0x1e0)]((_0x2d8392,_0x5e49ec)=>_0x2d8392[_0x1489bb(0x1e5)]['localeCompare'](_0x5e49ec['name']));for(const _0x5404cf of _0xc38a1f){if(_0x5404cf[_0x1489bb(0x1e6)]()&&IGNORED_DIR_NAMES['has'](_0x5404cf['name']))continue;if(IGNORED_FILE_NAMES[_0x1489bb(0x1f1)](_0x5404cf[_0x1489bb(0x1e5)]))continue;const _0x598c20=resolve(_0x5bcfc4,_0x5404cf[_0x1489bb(0x1e5)]);if(_0x5404cf['isSymbolicLink']())throw CliErrors[_0x1489bb(0x1ed)](_0x1489bb(0x1dc)+_0x598c20);const _0x4e4544=toPosixPath(relative(_0x3ca635,_0x598c20));if(_0x5404cf[_0x1489bb(0x1e6)]()){_0x27b849(_0x598c20);continue;}if(!_0x5404cf[_0x1489bb(0x1e8)]())continue;validateSkillRelativePath(_0x4e4544);const _0x46c2f5=readFileSync(_0x598c20);_0x57a5a5['push']({'path':_0x4e4544,'bytes':_0x46c2f5});}}return _0x27b849(_0x3ca635),normalizeLocalFiles(_0x57a5a5);}export function compareSkillFiles(_0x74b858,_0x5c23cc){const _0x216435=a100_0x2015;if(_0x74b858[_0x216435(0x1ef)]===SKILL_FILE)return _0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE?0x0:-0x1;if(_0x5c23cc[_0x216435(0x1ef)]===SKILL_FILE)return 0x1;return Buffer[_0x216435(0x1ee)](Buffer[_0x216435(0x1fa)](_0x74b858[_0x216435(0x1ef)],'utf8'),Buffer[_0x216435(0x1fa)](_0x5c23cc[_0x216435(0x1ef)],_0x216435(0x1fb)));}export function normalizeSkillRelativePath(_0x1a4c3f){const _0x121df6=toPosixPath(_0x1a4c3f['trim']());return validateSkillRelativePath(_0x121df6),_0x121df6;}function a100_0x2015(_0x5625f6,_0x2ba8b4){_0x5625f6=_0x5625f6-0x1d4;const _0x2b96f7=a100_0x2b96();let _0x20158e=_0x2b96f7[_0x5625f6];return _0x20158e;}export function validateSkillRelativePath(_0x138f66){const _0x1c69ff=a100_0x2015;if(!_0x138f66||_0x138f66[_0x1c69ff(0x1e7)]('/')||_0x138f66['includes']('//'))throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);for(const _0x172e16 of _0x138f66[_0x1c69ff(0x1d6)]('/')){if(!_0x172e16||_0x172e16==='.'||_0x172e16==='..')throw CliErrors[_0x1c69ff(0x1ed)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x138f66);}}export function toPosixPath(_0x3ab747){const _0x344124=a100_0x2015;return _0x3ab747[_0x344124(0x1da)](/\\/g,'/');}export function isSha256Hex(_0x11bd9a){const _0x50c103=a100_0x2015;return typeof _0x11bd9a==='string'&&/^[a-fA-F0-9]{64}$/[_0x50c103(0x1f3)](_0x11bd9a);}
@@ -1 +1 @@
1
- (function(_0xfd62c0,_0x547550){const _0x459a48=a101_0x2574,_0xc892e6=_0xfd62c0();while(!![]){try{const _0x4d6138=-parseInt(_0x459a48(0x135))/0x1*(-parseInt(_0x459a48(0x122))/0x2)+-parseInt(_0x459a48(0x146))/0x3*(parseInt(_0x459a48(0x128))/0x4)+-parseInt(_0x459a48(0x14d))/0x5*(-parseInt(_0x459a48(0x151))/0x6)+parseInt(_0x459a48(0x125))/0x7*(parseInt(_0x459a48(0x130))/0x8)+-parseInt(_0x459a48(0x138))/0x9+parseInt(_0x459a48(0x12b))/0xa+parseInt(_0x459a48(0x129))/0xb;if(_0x4d6138===_0x547550)break;else _0xc892e6['push'](_0xc892e6['shift']());}catch(_0x254cdf){_0xc892e6['push'](_0xc892e6['shift']());}}}(a101_0x4e6c,0xc45da));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';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a101_0x4e6c(){const _0x5576ac=['length','test','description','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','env','map','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','39yOzkGU','entries','appCode','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','stringify','contents','displayName','365DWgUtx','---\x0a','trimEnd','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','17634ldOVhr','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','skillName','name','displayName:\x20','89428XvYYHO','force','utf8','7CZXjVm','pulledAt','Managed\x20file\x20was\x20removed\x20locally:\x20','274136pNcDWQ','8420302JEThje','Runtime\x20Skill\x20package\x20is\x20missing\x20','2456850OgBdDl','replace','trim','validation','path','3669576MaFiPi','.\x20Changed\x20file:\x20','fileHashes','isFile','keys','19ohCMfB','has','---','7548489SrrMlw','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','accessKey','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','contentHash','filter','join'];a101_0x4e6c=function(){return _0x5576ac;};return a101_0x4e6c();}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';function a101_0x2574(_0x45ac48,_0xd008a9){_0x45ac48=_0x45ac48-0x122;const _0x4e6c47=a101_0x4e6c();let _0x2574a1=_0x4e6c47[_0x45ac48];return _0x2574a1;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x578b3f,_0x5da9fa,_0xf7cb6){const _0x20a466=a101_0x2574,_0x3f2681=requireSkillCode(_0x578b3f),_0xebf01c=requirePackageBytes(_0x3f2681,_0xf7cb6['packageBytes']),_0x35a0c9=extractDownloadedPackage(_0xebf01c),_0xc3e2e3=_0x35a0c9['find'](_0xe9716e=>_0xe9716e[_0x20a466(0x12f)]===SKILL_FILE);if(!_0xc3e2e3)throw CliErrors[_0x20a466(0x12e)](_0x20a466(0x12a)+SKILL_FILE+':\x20'+_0x3f2681);const _0x41c142=withMaterializedSkillFrontmatter(_0x35a0c9,_0x578b3f,_0x3f2681),_0x5e645a=_0x41c142['find'](_0x12fea2=>_0x12fea2[_0x20a466(0x12f)]===SKILL_FILE),_0x2aaffc=fileText(_0x5e645a),_0x35d3fe=getRuntimeSkillDir(_0xf7cb6[_0x20a466(0x143)],_0xf7cb6[_0x20a466(0x13a)],_0xf7cb6[_0x20a466(0x148)],_0x5da9fa,_0x3f2681,_0xf7cb6['paths']),_0x4efa52=resolve(_0x35d3fe,SKILL_FILE),_0x41c741=resolve(_0x35d3fe,METADATA_FILE),_0xb56850=contentHash(_0x2aaffc),_0x14c6f3=readMetadataIfPresent(_0x41c741)?.[_0x20a466(0x132)];ensurePulledFilesCanBeOverwritten(_0x35d3fe,_0x41c741,_0x41c142,_0xf7cb6[_0x20a466(0x123)]===!![]),mkdirSync(_0x35d3fe,{'recursive':!![],'mode':0x1c0});const _0x448e0b=existsSync(_0x4efa52)?readFileSync(_0x4efa52,_0x20a466(0x124)):undefined;return materializeFiles(_0x35d3fe,_0x41c142),removeStaleManagedFiles(_0x35d3fe,_0x14c6f3,_0x41c142),writeJsonAtomic(_0x41c741,buildMetadata(_0x578b3f,_0x5da9fa,_0xf7cb6['appCode'],_0xb56850,_0xf7cb6[_0x20a466(0x126)],_0x41c142,_0xebf01c)),{'skill':_0x578b3f,'scope':_0x5da9fa,'dir':_0x35d3fe,'skillMdPath':_0x4efa52,'metadataPath':_0x41c741,'contentHash':_0xb56850,'changed':_0x448e0b!==_0x2aaffc};}function withMaterializedSkillFrontmatter(_0x94878,_0x4e753c,_0x1487f6){const _0x50ef1d=a101_0x2574,_0x3a90e8=skillDisplayName(_0x4e753c,_0x1487f6),_0xa8bcd2=_0x4e753c[_0x50ef1d(0x141)]?.[_0x50ef1d(0x12d)]()||_0x3a90e8||_0x1487f6;return normalizeLocalFiles(_0x94878)[_0x50ef1d(0x144)](_0x442413=>{const _0x236550=_0x50ef1d,_0x5f49d7=fileText(_0x442413);if(_0x442413[_0x236550(0x12f)]!==SKILL_FILE)return _0x442413;if(hasYamlFrontmatter(_0x5f49d7))return{'path':_0x442413[_0x236550(0x12f)],'content':withSyncedDisplayName(_0x5f49d7,_0x3a90e8)};return{'path':_0x442413[_0x236550(0x12f)],'content':prependSkillFrontmatter(_0x5f49d7,{'name':_0x1487f6,'displayName':_0x3a90e8,'description':_0xa8bcd2})};});}function hasYamlFrontmatter(_0x1dfe65){const _0x194c97=a101_0x2574;return/^\uFEFF?---\s*\r?\n/[_0x194c97(0x140)](_0x1dfe65);}function prependSkillFrontmatter(_0x594806,_0x29596c){const _0x420185=a101_0x2574,_0x27f504=_0x594806['replace'](/^\uFEFF/,'');return[_0x420185(0x137),'name:\x20'+yamlString(_0x29596c[_0x420185(0x154)]),_0x29596c[_0x420185(0x14c)]?_0x420185(0x155)+yamlString(_0x29596c['displayName']):undefined,'description:\x20'+yamlString(_0x29596c[_0x420185(0x141)]),_0x420185(0x137),'',_0x27f504][_0x420185(0x13d)](_0x33b628=>_0x33b628!==undefined)[_0x420185(0x13e)]('\x0a');}function yamlString(_0x210c83){const _0x10f518=a101_0x2574;return JSON[_0x10f518(0x14a)](_0x210c83[_0x10f518(0x12c)](/\r/g,'')[_0x10f518(0x12d)]());}function skillDisplayName(_0x4fb34a,_0x14e962){const _0x5395f5=a101_0x2574,_0x58e0e4=_0x4fb34a[_0x5395f5(0x153)]?.['trim']();return _0x58e0e4||_0x14e962;}function withSyncedDisplayName(_0x183e80,_0x1142af){const _0x328b53=a101_0x2574,_0x141a77=_0x183e80['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x141a77)return _0x183e80;const _0x40f9f8=_0x141a77[0x1]??'',_0x5d6ff5=_0x141a77[0x2]??'',_0x3a8209=parseDocument(_0x5d6ff5);if(_0x3a8209['errors'][_0x328b53(0x13f)]>0x0||!isMap(_0x3a8209[_0x328b53(0x14b)]))return _0x183e80;if(_0x1142af)_0x3a8209['set'](_0x328b53(0x14c),_0x1142af);else{if(_0x3a8209[_0x328b53(0x136)](_0x328b53(0x14c)))_0x3a8209['delete'](_0x328b53(0x14c));else return _0x183e80;}const _0x351611=String(_0x3a8209)[_0x328b53(0x14f)](),_0x21ef65=_0x183e80['slice'](_0x141a77[0x0][_0x328b53(0x13f)])['replace'](/^\r?\n/,'');return _0x40f9f8+_0x328b53(0x14e)+_0x351611+'\x0a---\x0a\x0a'+_0x21ef65;}function ensurePulledFilesCanBeOverwritten(_0x11d500,_0x3cd022,_0x23724e,_0x23749b){const _0x17b40e=a101_0x2574;if(_0x23749b||!existsSync(_0x3cd022))return;const _0x564942=readMetadataIfPresent(_0x3cd022);if(!_0x564942)return;const _0x15f658=_0x564942[_0x17b40e(0x132)]&&Object['keys'](_0x564942[_0x17b40e(0x132)])['length']>0x0?_0x564942[_0x17b40e(0x132)]:undefined;if(_0x15f658)for(const [_0x2d76cc,_0xa85584]of Object[_0x17b40e(0x147)](_0x15f658)){const _0x147b79=resolveManagedFilePath(_0x11d500,_0x2d76cc);if(!existsSync(_0x147b79))throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x127)+_0x2d76cc);const _0x3ba555=lstatSync(_0x147b79);if(!_0x3ba555[_0x17b40e(0x133)]())throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x149)+_0x2d76cc);const _0x1f16f0=bufferSha256(readFileSync(_0x147b79));if(_0x1f16f0!==_0xa85584)throw CliErrors[_0x17b40e(0x12e)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x11d500+_0x17b40e(0x131)+_0x2d76cc,_0x17b40e(0x139)+_0x2d76cc);}else{const _0x2d032a=resolve(_0x11d500,SKILL_FILE);if(existsSync(_0x2d032a)&&_0x564942[_0x17b40e(0x13c)]){const _0x4b15c3=contentHash(readFileSync(_0x2d032a,'utf8'));if(_0x4b15c3!==_0x564942[_0x17b40e(0x13c)])throw CliErrors['validation'](_0x17b40e(0x145)+_0x2d032a,_0x17b40e(0x152));}}for(const _0x594323 of normalizeLocalFiles(_0x23724e)){if(_0x15f658?.[_0x594323[_0x17b40e(0x12f)]])continue;if(!_0x15f658&&_0x594323[_0x17b40e(0x12f)]===SKILL_FILE)continue;const _0x595ccc=resolveManagedFilePath(_0x11d500,_0x594323['path']);if(!existsSync(_0x595ccc))continue;const _0x58d4e0=lstatSync(_0x595ccc);if(!_0x58d4e0[_0x17b40e(0x133)]())throw CliErrors[_0x17b40e(0x12e)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x11d500,_0x17b40e(0x142)+_0x594323[_0x17b40e(0x12f)]);const _0x58c9ad=bufferSha256(readFileSync(_0x595ccc));if(_0x58c9ad!==fileHash(_0x594323))throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x13b)+_0x594323[_0x17b40e(0x12f)]);}}function materializeFiles(_0x1ff89e,_0x4448f0){const _0x393df2=a101_0x2574;for(const _0x5e6e51 of normalizeLocalFiles(_0x4448f0)){const _0x247103=resolveManagedFilePath(_0x1ff89e,_0x5e6e51[_0x393df2(0x12f)]);mkdirSync(dirname(_0x247103),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x247103,fileContent(_0x5e6e51),0x180);}}function removeStaleManagedFiles(_0xe5fc02,_0x151d6d,_0x201b0c){const _0x4dfa80=a101_0x2574;if(!_0x151d6d)return;const _0x5cfc4e=new Set(normalizeLocalFiles(_0x201b0c)[_0x4dfa80(0x144)](_0x180087=>_0x180087['path']));for(const _0x5bc467 of Object[_0x4dfa80(0x134)](_0x151d6d)){if(_0x5cfc4e[_0x4dfa80(0x136)](_0x5bc467))continue;const _0x56228a=resolveManagedFilePath(_0xe5fc02,_0x5bc467);existsSync(_0x56228a)&&lstatSync(_0x56228a)[_0x4dfa80(0x133)]()&&rmSync(_0x56228a,{'force':!![]});}}
1
+ (function(_0x4ef604,_0x314846){const _0x1063f1=a101_0x4cf6,_0x3f4fe6=_0x4ef604();while(!![]){try{const _0x585038=-parseInt(_0x1063f1(0xb4))/0x1+parseInt(_0x1063f1(0xab))/0x2*(-parseInt(_0x1063f1(0x8c))/0x3)+parseInt(_0x1063f1(0xae))/0x4+parseInt(_0x1063f1(0x9d))/0x5+-parseInt(_0x1063f1(0xad))/0x6*(parseInt(_0x1063f1(0xbc))/0x7)+-parseInt(_0x1063f1(0x9c))/0x8*(-parseInt(_0x1063f1(0x8e))/0x9)+parseInt(_0x1063f1(0xb2))/0xa*(-parseInt(_0x1063f1(0xb5))/0xb);if(_0x585038===_0x314846)break;else _0x3f4fe6['push'](_0x3f4fe6['shift']());}catch(_0x154c8a){_0x3f4fe6['push'](_0x3f4fe6['shift']());}}}(a101_0x4ad8,0xe102e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a101_0x4cf6(_0x5942f3,_0x135071){_0x5942f3=_0x5942f3-0x87;const _0x4ad84f=a101_0x4ad8();let _0x4cf682=_0x4ad84f[_0x5942f3];return _0x4cf682;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x18ccd7,_0x565c01,_0x339759){const _0x3d0406=a101_0x4cf6,_0x478beb=requireSkillCode(_0x18ccd7),_0x1c6bba=requirePackageBytes(_0x478beb,_0x339759[_0x3d0406(0xa3)]),_0x20b936=extractDownloadedPackage(_0x1c6bba),_0x444ba4=_0x20b936[_0x3d0406(0x94)](_0x4e08f7=>_0x4e08f7[_0x3d0406(0xa7)]===SKILL_FILE);if(!_0x444ba4)throw CliErrors['validation'](_0x3d0406(0x89)+SKILL_FILE+':\x20'+_0x478beb);const _0x1db07c=withMaterializedSkillFrontmatter(_0x20b936,_0x18ccd7,_0x478beb),_0x2ece63=_0x1db07c[_0x3d0406(0x94)](_0x40dbfe=>_0x40dbfe[_0x3d0406(0xa7)]===SKILL_FILE),_0x4f123c=fileText(_0x2ece63),_0x13e279=getRuntimeSkillDir(_0x339759[_0x3d0406(0x9f)],_0x339759['accessKey'],_0x339759[_0x3d0406(0x99)],_0x565c01,_0x478beb,_0x339759[_0x3d0406(0xb1)]),_0x2136f8=resolve(_0x13e279,SKILL_FILE),_0x3207ac=resolve(_0x13e279,METADATA_FILE),_0x333afb=contentHash(_0x4f123c),_0x3ae24c=readMetadataIfPresent(_0x3207ac)?.[_0x3d0406(0x9e)];ensurePulledFilesCanBeOverwritten(_0x13e279,_0x3207ac,_0x1db07c,_0x339759[_0x3d0406(0x8d)]===!![]),mkdirSync(_0x13e279,{'recursive':!![],'mode':0x1c0});const _0x54d40a=existsSync(_0x2136f8)?readFileSync(_0x2136f8,'utf8'):undefined;return materializeFiles(_0x13e279,_0x1db07c),removeStaleManagedFiles(_0x13e279,_0x3ae24c,_0x1db07c),writeJsonAtomic(_0x3207ac,buildMetadata(_0x18ccd7,_0x565c01,_0x339759[_0x3d0406(0x99)],_0x333afb,_0x339759[_0x3d0406(0xa6)],_0x1db07c,_0x1c6bba)),{'skill':_0x18ccd7,'scope':_0x565c01,'dir':_0x13e279,'skillMdPath':_0x2136f8,'metadataPath':_0x3207ac,'contentHash':_0x333afb,'changed':_0x54d40a!==_0x4f123c};}function withMaterializedSkillFrontmatter(_0x2284d,_0x182b16,_0x23a34e){const _0x25eb53=a101_0x4cf6,_0xe762f0=skillDisplayName(_0x182b16,_0x23a34e),_0xe32dd5=_0x182b16[_0x25eb53(0x9b)]?.[_0x25eb53(0xa2)]()||_0xe762f0||_0x23a34e;return normalizeLocalFiles(_0x2284d)[_0x25eb53(0x9a)](_0x6e20f7=>{const _0x474b31=_0x25eb53,_0x3c558f=fileText(_0x6e20f7);if(_0x6e20f7[_0x474b31(0xa7)]!==SKILL_FILE)return _0x6e20f7;if(hasYamlFrontmatter(_0x3c558f))return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':withSyncedDisplayName(_0x3c558f,_0xe762f0)};return{'path':_0x6e20f7[_0x474b31(0xa7)],'content':prependSkillFrontmatter(_0x3c558f,{'name':_0x23a34e,'displayName':_0xe762f0,'description':_0xe32dd5})};});}function hasYamlFrontmatter(_0x25ce3d){const _0x426c3b=a101_0x4cf6;return/^\uFEFF?---\s*\r?\n/[_0x426c3b(0x92)](_0x25ce3d);}function prependSkillFrontmatter(_0x386e36,_0x454ecc){const _0x58895d=a101_0x4cf6,_0x2f689f=_0x386e36[_0x58895d(0xaa)](/^\uFEFF/,'');return[_0x58895d(0x87),_0x58895d(0x97)+yamlString(_0x454ecc[_0x58895d(0x90)]),_0x454ecc[_0x58895d(0xb8)]?'displayName:\x20'+yamlString(_0x454ecc['displayName']):undefined,_0x58895d(0xb7)+yamlString(_0x454ecc[_0x58895d(0x9b)]),_0x58895d(0x87),'',_0x2f689f][_0x58895d(0x96)](_0x1bbcb4=>_0x1bbcb4!==undefined)['join']('\x0a');}function yamlString(_0x307da3){const _0x481aa0=a101_0x4cf6;return JSON[_0x481aa0(0xb6)](_0x307da3[_0x481aa0(0xaa)](/\r/g,'')[_0x481aa0(0xa2)]());}function skillDisplayName(_0xd551c2,_0x2ccecb){const _0x1dbfc1=a101_0x4cf6,_0x4a93ad=_0xd551c2[_0x1dbfc1(0x91)]?.['trim']();return _0x4a93ad||_0x2ccecb;}function a101_0x4ad8(){const _0x9e4fbe=['test','keys','find','---\x0a','filter','name:\x20','errors','appCode','map','description','640EzbXhm','6127260MiJTPH','fileHashes','env','validation','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','trim','packageBytes','has','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','pulledAt','path','entries','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','replace','2VbBeeu','length','244290VKsEOk','1672704cuqSZo','isFile','contents','paths','1328460lWDIBl','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','512022kgvZkX','77aleWtg','stringify','description:\x20','displayName','\x0a---\x0a\x0a','set','delete','7MeXHLm','.\x20Changed\x20file:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','contentHash','utf8','2607969EiJqAd','force','183375fKJcjR','match','name','skillName'];a101_0x4ad8=function(){return _0x9e4fbe;};return a101_0x4ad8();}function withSyncedDisplayName(_0x3b7a20,_0x1711fa){const _0x38e6a5=a101_0x4cf6,_0x52fac3=_0x3b7a20[_0x38e6a5(0x8f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52fac3)return _0x3b7a20;const _0x17d675=_0x52fac3[0x1]??'',_0x2687bb=_0x52fac3[0x2]??'',_0x481a46=parseDocument(_0x2687bb);if(_0x481a46[_0x38e6a5(0x98)][_0x38e6a5(0xac)]>0x0||!isMap(_0x481a46[_0x38e6a5(0xb0)]))return _0x3b7a20;if(_0x1711fa)_0x481a46[_0x38e6a5(0xba)](_0x38e6a5(0xb8),_0x1711fa);else{if(_0x481a46[_0x38e6a5(0xa4)](_0x38e6a5(0xb8)))_0x481a46[_0x38e6a5(0xbb)](_0x38e6a5(0xb8));else return _0x3b7a20;}const _0x27cadc=String(_0x481a46)['trimEnd'](),_0x10cb7f=_0x3b7a20['slice'](_0x52fac3[0x0]['length'])[_0x38e6a5(0xaa)](/^\r?\n/,'');return _0x17d675+_0x38e6a5(0x95)+_0x27cadc+_0x38e6a5(0xb9)+_0x10cb7f;}function ensurePulledFilesCanBeOverwritten(_0x2a91c7,_0x1448d2,_0x271344,_0x77f34f){const _0x2d0605=a101_0x4cf6;if(_0x77f34f||!existsSync(_0x1448d2))return;const _0x4ea78b=readMetadataIfPresent(_0x1448d2);if(!_0x4ea78b)return;const _0xc513b8=_0x4ea78b[_0x2d0605(0x9e)]&&Object[_0x2d0605(0x93)](_0x4ea78b[_0x2d0605(0x9e)])[_0x2d0605(0xac)]>0x0?_0x4ea78b[_0x2d0605(0x9e)]:undefined;if(_0xc513b8)for(const [_0xf1816b,_0xc71ab]of Object[_0x2d0605(0xa8)](_0xc513b8)){const _0x44ca40=resolveManagedFilePath(_0x2a91c7,_0xf1816b);if(!existsSync(_0x44ca40))throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0xf1816b);const _0x6f8c9f=lstatSync(_0x44ca40);if(!_0x6f8c9f[_0x2d0605(0xaf)]())throw CliErrors['validation'](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xb3)+_0xf1816b);const _0x42e8=bufferSha256(readFileSync(_0x44ca40));if(_0x42e8!==_0xc71ab)throw CliErrors[_0x2d0605(0xa0)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2a91c7+_0x2d0605(0xbd)+_0xf1816b,_0x2d0605(0x88)+_0xf1816b);}else{const _0x3430dd=resolve(_0x2a91c7,SKILL_FILE);if(existsSync(_0x3430dd)&&_0x4ea78b[_0x2d0605(0x8a)]){const _0x70087c=contentHash(readFileSync(_0x3430dd,_0x2d0605(0x8b)));if(_0x70087c!==_0x4ea78b['contentHash'])throw CliErrors[_0x2d0605(0xa0)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x3430dd,_0x2d0605(0xa1));}}for(const _0x4d6520 of normalizeLocalFiles(_0x271344)){if(_0xc513b8?.[_0x4d6520[_0x2d0605(0xa7)]])continue;if(!_0xc513b8&&_0x4d6520[_0x2d0605(0xa7)]===SKILL_FILE)continue;const _0x45860d=resolveManagedFilePath(_0x2a91c7,_0x4d6520[_0x2d0605(0xa7)]);if(!existsSync(_0x45860d))continue;const _0x46e7e6=lstatSync(_0x45860d);if(!_0x46e7e6[_0x2d0605(0xaf)]())throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,_0x2d0605(0xa9)+_0x4d6520['path']);const _0x2f69ed=bufferSha256(readFileSync(_0x45860d));if(_0x2f69ed!==fileHash(_0x4d6520))throw CliErrors[_0x2d0605(0xa0)](_0x2d0605(0xa5)+_0x2a91c7,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x4d6520[_0x2d0605(0xa7)]);}}function materializeFiles(_0x1b313f,_0x42a501){for(const _0x4447b6 of normalizeLocalFiles(_0x42a501)){const _0x29d526=resolveManagedFilePath(_0x1b313f,_0x4447b6['path']);mkdirSync(dirname(_0x29d526),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x29d526,fileContent(_0x4447b6),0x180);}}function removeStaleManagedFiles(_0x41ef0a,_0x1ca2ae,_0x101d0a){const _0x1c2fc1=a101_0x4cf6;if(!_0x1ca2ae)return;const _0x4567f9=new Set(normalizeLocalFiles(_0x101d0a)[_0x1c2fc1(0x9a)](_0x423747=>_0x423747[_0x1c2fc1(0xa7)]));for(const _0x52eb32 of Object[_0x1c2fc1(0x93)](_0x1ca2ae)){if(_0x4567f9[_0x1c2fc1(0xa4)](_0x52eb32))continue;const _0x30b4fa=resolveManagedFilePath(_0x41ef0a,_0x52eb32);existsSync(_0x30b4fa)&&lstatSync(_0x30b4fa)[_0x1c2fc1(0xaf)]()&&rmSync(_0x30b4fa,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x55e4b5,_0x13a10e){const _0x3ed626=a102_0x692e,_0xbfc815=_0x55e4b5();while(!![]){try{const _0x2f0df1=parseInt(_0x3ed626(0x9a))/0x1+parseInt(_0x3ed626(0xa2))/0x2*(parseInt(_0x3ed626(0x94))/0x3)+parseInt(_0x3ed626(0x8f))/0x4+parseInt(_0x3ed626(0xa1))/0x5*(parseInt(_0x3ed626(0x9c))/0x6)+-parseInt(_0x3ed626(0x98))/0x7*(parseInt(_0x3ed626(0x88))/0x8)+-parseInt(_0x3ed626(0x86))/0x9*(parseInt(_0x3ed626(0x85))/0xa)+parseInt(_0x3ed626(0xa6))/0xb*(-parseInt(_0x3ed626(0x87))/0xc);if(_0x2f0df1===_0x13a10e)break;else _0xbfc815['push'](_0xbfc815['shift']());}catch(_0x129784){_0xbfc815['push'](_0xbfc815['shift']());}}}(a102_0x4a61,0x5f311));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a102_0x4a61(){const _0x23f54e=['13196kWycKd','version','Invalid\x20','map','491557YZOdrF','isArray','personal','10kVNHLM','6425883sZLqDo','108uOukgc','32rHVZLV','zipSha256','fromEntries','skillName','path','parse','sourceSessionId','2815084QSJVDe','files','string','trim','tenantCode','351JwhjXK','manifest','length','zipSize','593278wxOzIE','forkedFromSkillId','287718amhWdm','skillCode','81636FAkyww','object','utf8','status','validation','30eOaIcG'];a102_0x4a61=function(){return _0x23f54e;};return a102_0x4a61();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x464be1,_0xf1a61b,_0x439260,_0x27ddca,_0x29a842,_0x38c0e0,_0xb3d680){const _0x27fb5d=a102_0x692e,_0x4c85cf=_0x38c0e0?normalizeLocalFiles(_0x38c0e0):[],_0x2c3f45=!_0xb3d680&&_0x4c85cf[_0x27fb5d(0x96)]>0x0?buildSkillPackage(_0x4c85cf):undefined,_0x27c030=_0xb3d680?bufferSha256(_0xb3d680):_0x2c3f45?.['manifest'][_0x27fb5d(0x89)],_0x1be8ea=_0xb3d680?.[_0x27fb5d(0x96)]??_0x2c3f45?.[_0x27fb5d(0x95)][_0x27fb5d(0x97)],_0x872a4=_0x4c85cf[_0x27fb5d(0x96)]>0x0?Object[_0x27fb5d(0x8a)](_0x4c85cf[_0x27fb5d(0xa5)](_0x14d172=>[_0x14d172[_0x27fb5d(0x8c)],fileHash(_0x14d172)])):undefined;return{'schemaVersion':_0x4c85cf[_0x27fb5d(0x96)]>0x0?0x2:0x1,'id':_0x464be1['id'],'appCode':_0x439260,'skillCode':requireSkillCode(_0x464be1),'skillName':_0x464be1[_0x27fb5d(0x8b)],'description':_0x464be1['description'],'scope':_0xf1a61b,'readonly':_0xf1a61b!==_0x27fb5d(0x84)||_0x464be1['readonly']===!![],'tenantCode':_0x464be1[_0x27fb5d(0x93)],'userId':_0x464be1['userId'],'version':_0x464be1[_0x27fb5d(0xa3)],'status':_0x464be1[_0x27fb5d(0x9f)],'tags':Array['isArray'](_0x464be1['tags'])?_0x464be1['tags']:[],'hasUpstreamUpdate':_0x464be1['hasUpstreamUpdate'],'forkedFromSkillId':_0x464be1[_0x27fb5d(0x99)],'forkedFromVersion':_0x464be1['forkedFromVersion'],'sourceSessionId':_0x464be1[_0x27fb5d(0x8e)],'contentHash':_0x27ddca,'fileHashes':_0x872a4,'treeHash':_0x4c85cf[_0x27fb5d(0x96)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x4c85cf)):undefined,'ossPath':remoteManifestOssPath(_0x464be1[_0x27fb5d(0x90)]),'zipSha256':_0x27c030,'zipSize':_0x1be8ea,'files':_0x4c85cf[_0x27fb5d(0x96)]>0x0?_0x4c85cf['map'](_0x1a44a4=>({'path':_0x1a44a4['path'],'hash':fileHash(_0x1a44a4),'size':fileContent(_0x1a44a4)[_0x27fb5d(0x96)]})):undefined,'pulledAt':_0x29a842??new Date()['toISOString']()};}function a102_0x692e(_0x946f24,_0x1740bd){_0x946f24=_0x946f24-0x83;const _0x4a6166=a102_0x4a61();let _0x692e16=_0x4a6166[_0x946f24];return _0x692e16;}export function requireSkillCode(_0x31cd58){const _0x31178d=a102_0x692e,_0x26852a=_0x31cd58[_0x31178d(0x9b)]?.[_0x31178d(0x92)]();if(!_0x26852a)throw CliErrors[_0x31178d(0xa0)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x26852a;}export function readMetadataIfPresent(_0x4aa514){const _0x22b2ac=a102_0x692e;if(!existsSync(_0x4aa514))return undefined;try{const _0x2b9bfc=JSON[_0x22b2ac(0x8d)](readFileSync(_0x4aa514,_0x22b2ac(0x9e)));return _0x2b9bfc;}catch{throw CliErrors['validation'](_0x22b2ac(0xa4)+METADATA_FILE+':\x20'+_0x4aa514);}}function remoteManifestOssPath(_0x1ab7f8){const _0xdd549c=a102_0x692e;if(!_0x1ab7f8||typeof _0x1ab7f8!==_0xdd549c(0x9d)||Array[_0xdd549c(0x83)](_0x1ab7f8))return undefined;const _0x337447=_0x1ab7f8['ossPath'];return typeof _0x337447===_0xdd549c(0x91)&&_0x337447[_0xdd549c(0x92)]()?_0x337447['trim']():undefined;}
1
+ function a102_0x1ddc(_0x331101,_0x290269){_0x331101=_0x331101-0x17a;const _0x4355bc=a102_0x4355();let _0x1ddce7=_0x4355bc[_0x331101];return _0x1ddce7;}(function(_0x4446f0,_0x4d76a9){const _0x56c812=a102_0x1ddc,_0x2f71c2=_0x4446f0();while(!![]){try{const _0x34f4b9=parseInt(_0x56c812(0x193))/0x1*(parseInt(_0x56c812(0x19b))/0x2)+parseInt(_0x56c812(0x195))/0x3*(-parseInt(_0x56c812(0x185))/0x4)+-parseInt(_0x56c812(0x198))/0x5*(-parseInt(_0x56c812(0x19e))/0x6)+parseInt(_0x56c812(0x17b))/0x7+-parseInt(_0x56c812(0x182))/0x8*(-parseInt(_0x56c812(0x188))/0x9)+parseInt(_0x56c812(0x17c))/0xa*(parseInt(_0x56c812(0x196))/0xb)+parseInt(_0x56c812(0x18f))/0xc*(-parseInt(_0x56c812(0x187))/0xd);if(_0x34f4b9===_0x4d76a9)break;else _0x2f71c2['push'](_0x2f71c2['shift']());}catch(_0x2565c8){_0x2f71c2['push'](_0x2f71c2['shift']());}}}(a102_0x4355,0x1eae3));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3d3295,_0x25cdbc,_0x14ab0a,_0x1976d6,_0x49ddd8,_0x57fcb8,_0x2570f8){const _0x702c36=a102_0x1ddc,_0x26f445=_0x57fcb8?normalizeLocalFiles(_0x57fcb8):[],_0x2f14bb=!_0x2570f8&&_0x26f445[_0x702c36(0x19c)]>0x0?buildSkillPackage(_0x26f445):undefined,_0xeff923=_0x2570f8?bufferSha256(_0x2570f8):_0x2f14bb?.[_0x702c36(0x194)]['zipSha256'],_0x12907f=_0x2570f8?.[_0x702c36(0x19c)]??_0x2f14bb?.[_0x702c36(0x194)][_0x702c36(0x17f)],_0x1799a1=_0x26f445['length']>0x0?Object[_0x702c36(0x192)](_0x26f445[_0x702c36(0x19a)](_0x33b253=>[_0x33b253[_0x702c36(0x17a)],fileHash(_0x33b253)])):undefined;return{'schemaVersion':_0x26f445[_0x702c36(0x19c)]>0x0?0x2:0x1,'id':_0x3d3295['id'],'appCode':_0x14ab0a,'skillCode':requireSkillCode(_0x3d3295),'skillName':_0x3d3295['skillName'],'description':_0x3d3295['description'],'scope':_0x25cdbc,'readonly':_0x25cdbc!==_0x702c36(0x189)||_0x3d3295[_0x702c36(0x18b)]===!![],'tenantCode':_0x3d3295[_0x702c36(0x184)],'userId':_0x3d3295['userId'],'version':_0x3d3295[_0x702c36(0x199)],'status':_0x3d3295['status'],'tags':Array[_0x702c36(0x180)](_0x3d3295[_0x702c36(0x18d)])?_0x3d3295['tags']:[],'hasUpstreamUpdate':_0x3d3295[_0x702c36(0x190)],'forkedFromSkillId':_0x3d3295['forkedFromSkillId'],'forkedFromVersion':_0x3d3295[_0x702c36(0x18a)],'sourceSessionId':_0x3d3295[_0x702c36(0x18c)],'contentHash':_0x1976d6,'fileHashes':_0x1799a1,'treeHash':_0x26f445[_0x702c36(0x19c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x26f445)):undefined,'ossPath':remoteManifestOssPath(_0x3d3295[_0x702c36(0x183)]),'zipSha256':_0xeff923,'zipSize':_0x12907f,'files':_0x26f445['length']>0x0?_0x26f445['map'](_0x5a6cbb=>({'path':_0x5a6cbb[_0x702c36(0x17a)],'hash':fileHash(_0x5a6cbb),'size':fileContent(_0x5a6cbb)['length']})):undefined,'pulledAt':_0x49ddd8??new Date()[_0x702c36(0x197)]()};}export function requireSkillCode(_0x3011e3){const _0x2b49bd=a102_0x1ddc,_0x2067fe=_0x3011e3[_0x2b49bd(0x19d)]?.[_0x2b49bd(0x17d)]();if(!_0x2067fe)throw CliErrors['validation'](_0x2b49bd(0x19f));return _0x2067fe;}function a102_0x4355(){const _0x35e1d3=['sourceSessionId','tags','Invalid\x20','108aoCpTD','hasUpstreamUpdate','ossPath','fromEntries','164414QOGojQ','manifest','151809gKGChS','22539ILszab','toISOString','5BQXZCu','version','map','2ZOzfdj','length','skillCode','1392306rismFd','Runtime\x20Skill\x20is\x20missing\x20skillCode.','path','255710qXtRrP','310oRilqk','trim','validation','zipSize','isArray','object','414992wklfcj','files','tenantCode','4KJYQPa','utf8','687362eccrdp','27ZxWiGm','personal','forkedFromVersion','readonly'];a102_0x4355=function(){return _0x35e1d3;};return a102_0x4355();}export function readMetadataIfPresent(_0x1d87a2){const _0x546c70=a102_0x1ddc;if(!existsSync(_0x1d87a2))return undefined;try{const _0x34d0ee=JSON['parse'](readFileSync(_0x1d87a2,_0x546c70(0x186)));return _0x34d0ee;}catch{throw CliErrors[_0x546c70(0x17e)](_0x546c70(0x18e)+METADATA_FILE+':\x20'+_0x1d87a2);}}function remoteManifestOssPath(_0xd9a539){const _0x233fdd=a102_0x1ddc;if(!_0xd9a539||typeof _0xd9a539!==_0x233fdd(0x181)||Array['isArray'](_0xd9a539))return undefined;const _0x25437c=_0xd9a539[_0x233fdd(0x191)];return typeof _0x25437c==='string'&&_0x25437c[_0x233fdd(0x17d)]()?_0x25437c[_0x233fdd(0x17d)]():undefined;}
@@ -1 +1 @@
1
- (function(_0x2fd316,_0x168a56){const _0x186200=a103_0x4d0f,_0x1c4d6e=_0x2fd316();while(!![]){try{const _0x321218=-parseInt(_0x186200(0x17a))/0x1+parseInt(_0x186200(0x17b))/0x2*(-parseInt(_0x186200(0x174))/0x3)+parseInt(_0x186200(0x173))/0x4*(parseInt(_0x186200(0x179))/0x5)+-parseInt(_0x186200(0x170))/0x6*(-parseInt(_0x186200(0x163))/0x7)+parseInt(_0x186200(0x166))/0x8+parseInt(_0x186200(0x16d))/0x9+-parseInt(_0x186200(0x172))/0xa*(parseInt(_0x186200(0x167))/0xb);if(_0x321218===_0x168a56)break;else _0x1c4d6e['push'](_0x1c4d6e['shift']());}catch(_0x34f8e2){_0x1c4d6e['push'](_0x1c4d6e['shift']());}}}(a103_0xf31f,0x81add));function a103_0xf31f(){const _0x4a79ac=['claudeSkillsDir','cache','SKILL_ROOT','7777395jDibFF','homeDirName','CLAUDE_SKILL_ROOT','1032sKwERu','.agents','6369470fgppwR','6512SJvVvF','6tGqBXs','homeDir','agentsSkillsDir','appCode','cacheRoot','560yytnmt','239292nrTRcq','137726WcCnAe','Unsafe\x20','.claude','includes','5362HNdIMJ','skills','trim','2935096ouktcE','11FLLEPv','\x20for\x20local\x20path:\x20','skillCode'];a103_0xf31f=function(){return _0x4a79ac;};return a103_0xf31f();}function a103_0x4d0f(_0x23aa34,_0x2cf64e){_0x23aa34=_0x23aa34-0x160;const _0xf31f3b=a103_0xf31f();let _0x4d0fff=_0xf31f3b[_0x23aa34];return _0x4d0fff;}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(_0xac9a05={}){const _0x233223=a103_0x4d0f,_0x140ac9=_0xac9a05[_0x233223(0x175)]??homedir(),_0x416503=resolve(_0x140ac9,PRODUCT_CONFIG[_0x233223(0x16e)],_0x233223(0x16b)),_0x1a4752=trimmedEnv(_0x233223(0x16c)),_0x2cecda=trimmedEnv(_0x233223(0x16f));return{'homeDir':_0x140ac9,'cacheRoot':_0x416503,'managedRoot':resolve(_0x140ac9,PRODUCT_CONFIG[_0x233223(0x16e)]),'agentsSkillsDir':_0xac9a05[_0x233223(0x176)]??_0x1a4752??resolve(_0x140ac9,_0x233223(0x171),_0x233223(0x164)),'claudeSkillsDir':_0xac9a05[_0x233223(0x16a)]??_0x2cecda??resolve(_0x140ac9,_0x233223(0x161),'skills')};}export function getRuntimeSkillCacheRoot(_0x36c125,_0x1121b6,_0x9c1f78={}){const _0x1f7627=a103_0x4d0f,_0x2ad41e=resolveSkillSyncPaths(_0x9c1f78);return resolve(_0x2ad41e[_0x1f7627(0x178)],_0x36c125,fingerprintAccessKey(_0x1121b6),_0x1f7627(0x164));}export function getRuntimeSkillDir(_0x426908,_0x3d65c7,_0x4eb2ce,_0x1ba61e,_0x5ca416,_0x4fba3e={}){const _0x27e98e=a103_0x4d0f;return resolve(getRuntimeSkillCacheRoot(_0x426908,_0x3d65c7,_0x4fba3e),safePathSegment(_0x4eb2ce,_0x27e98e(0x177)),_0x1ba61e,safePathSegment(_0x5ca416,_0x27e98e(0x169)));}export function safePathSegment(_0x3e59df,_0x519644='path\x20segment'){const _0x2768a7=a103_0x4d0f;if(!_0x3e59df||_0x3e59df[_0x2768a7(0x162)]('/')||_0x3e59df[_0x2768a7(0x162)]('\x5c')||_0x3e59df[_0x2768a7(0x162)]('..'))throw CliErrors['validation'](_0x2768a7(0x160)+_0x519644+_0x2768a7(0x168)+_0x3e59df);return _0x3e59df;}function trimmedEnv(_0x3bf285){const _0x186566=a103_0x4d0f,_0x507307=productEnv(_0x3bf285)?.[_0x186566(0x165)]();return _0x507307?_0x507307:undefined;}
1
+ function a103_0x1349(){const _0xb76001=['homeDir','.claude','path\x20segment','153684KmJfgu','.agents','trim','3477664NHhUmQ','SKILL_ROOT','282441PLRTEU','skills','3733450mbfahX','9EGCOPZ','skillCode','2196uJrVFs','1685wOodne','1842lddnFU','\x20for\x20local\x20path:\x20','9149cJSGNK','284424JeUweg','homeDirName','includes','CLAUDE_SKILL_ROOT','appCode','Unsafe\x20'];a103_0x1349=function(){return _0xb76001;};return a103_0x1349();}const a103_0x1fe7bf=a103_0x184c;(function(_0x3cfb15,_0xbb37c7){const _0x309c21=a103_0x184c,_0xa5e15c=_0x3cfb15();while(!![]){try{const _0x594c1a=-parseInt(_0x309c21(0x201))/0x1+parseInt(_0x309c21(0x1f2))/0x2+-parseInt(_0x309c21(0x1f7))/0x3+parseInt(_0x309c21(0x1fc))/0x4*(parseInt(_0x309c21(0x1fd))/0x5)+-parseInt(_0x309c21(0x1fe))/0x6*(-parseInt(_0x309c21(0x200))/0x7)+-parseInt(_0x309c21(0x1f5))/0x8+-parseInt(_0x309c21(0x1fa))/0x9*(-parseInt(_0x309c21(0x1f9))/0xa);if(_0x594c1a===_0xbb37c7)break;else _0xa5e15c['push'](_0xa5e15c['shift']());}catch(_0x8806c3){_0xa5e15c['push'](_0xa5e15c['shift']());}}}(a103_0x1349,0x367c2));import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x386939={}){const _0x6474ea=a103_0x184c,_0x1d1810=_0x386939[_0x6474ea(0x1ef)]??homedir(),_0x4e6cdf=resolve(_0x1d1810,PRODUCT_CONFIG[_0x6474ea(0x202)],'cache'),_0x473f8a=trimmedEnv(_0x6474ea(0x1f6)),_0x29ae88=trimmedEnv(_0x6474ea(0x204));return{'homeDir':_0x1d1810,'cacheRoot':_0x4e6cdf,'managedRoot':resolve(_0x1d1810,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x386939['agentsSkillsDir']??_0x473f8a??resolve(_0x1d1810,_0x6474ea(0x1f3),_0x6474ea(0x1f8)),'claudeSkillsDir':_0x386939['claudeSkillsDir']??_0x29ae88??resolve(_0x1d1810,_0x6474ea(0x1f0),_0x6474ea(0x1f8))};}export function getRuntimeSkillCacheRoot(_0x540cf8,_0x1556c1,_0x1fe4ac={}){const _0x4ab57b=a103_0x184c,_0x253c3f=resolveSkillSyncPaths(_0x1fe4ac);return resolve(_0x253c3f['cacheRoot'],_0x540cf8,fingerprintAccessKey(_0x1556c1),_0x4ab57b(0x1f8));}export function getRuntimeSkillDir(_0x468438,_0x7247c4,_0x2c44f8,_0x16882a,_0x2b249c,_0x30f498={}){const _0x318ba2=a103_0x184c;return resolve(getRuntimeSkillCacheRoot(_0x468438,_0x7247c4,_0x30f498),safePathSegment(_0x2c44f8,_0x318ba2(0x205)),_0x16882a,safePathSegment(_0x2b249c,_0x318ba2(0x1fb)));}export function safePathSegment(_0x4f9ea0,_0x138d41=a103_0x1fe7bf(0x1f1)){const _0x307fd7=a103_0x1fe7bf;if(!_0x4f9ea0||_0x4f9ea0['includes']('/')||_0x4f9ea0[_0x307fd7(0x203)]('\x5c')||_0x4f9ea0[_0x307fd7(0x203)]('..'))throw CliErrors['validation'](_0x307fd7(0x206)+_0x138d41+_0x307fd7(0x1ff)+_0x4f9ea0);return _0x4f9ea0;}function a103_0x184c(_0x20f06c,_0x3cd320){_0x20f06c=_0x20f06c-0x1ef;const _0x13492c=a103_0x1349();let _0x184c7c=_0x13492c[_0x20f06c];return _0x184c7c;}function trimmedEnv(_0x5b128a){const _0x4fc327=a103_0x1fe7bf,_0x3a60b1=productEnv(_0x5b128a)?.[_0x4fc327(0x1f4)]();return _0x3a60b1?_0x3a60b1:undefined;}