@lovrabet/lovrabet-cli 2.1.2-beta.1 → 2.1.3-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 (108) 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/artifact/index.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/auth/prompt.js +1 -1
  12. package/lib/commands/bff/detail.js +1 -1
  13. package/lib/commands/bff/exec.js +1 -1
  14. package/lib/commands/bff/index.js +1 -1
  15. package/lib/commands/cli-skill/index.js +1 -1
  16. package/lib/commands/common/config-policy.js +1 -1
  17. package/lib/commands/common/constraints.js +1 -1
  18. package/lib/commands/common/flags.js +1 -1
  19. package/lib/commands/config/definitions.js +1 -1
  20. package/lib/commands/config/shared.js +1 -1
  21. package/lib/commands/data/index.js +1 -1
  22. package/lib/commands/dataset/detail.js +1 -1
  23. package/lib/commands/dataset/index.js +1 -1
  24. package/lib/commands/dataset/list.js +1 -1
  25. package/lib/commands/dataset/sdk-doc.js +1 -1
  26. package/lib/commands/doctor.js +1 -1
  27. package/lib/commands/init.js +1 -1
  28. package/lib/commands/kb/index.js +1 -1
  29. package/lib/commands/logs/index.js +1 -1
  30. package/lib/commands/personal-bff/index.js +1 -1
  31. package/lib/commands/registry.js +1 -1
  32. package/lib/commands/schema.js +1 -1
  33. package/lib/commands/service/dynamic.js +1 -1
  34. package/lib/commands/service/index.js +1 -1
  35. package/lib/commands/service/registry.js +1 -1
  36. package/lib/commands/skill/commands/create.js +1 -0
  37. package/lib/commands/skill/commands/install.js +1 -0
  38. package/lib/commands/skill/commands/list.js +1 -0
  39. package/lib/commands/skill/commands/push.js +1 -0
  40. package/lib/commands/skill/commands/validate.js +1 -0
  41. package/lib/commands/skill/flags.js +1 -0
  42. package/lib/commands/skill/index.js +1 -1
  43. package/lib/commands/skill/manifest-helpers.js +1 -0
  44. package/lib/commands/skill/scopes.js +1 -0
  45. package/lib/commands/skill/summary.js +1 -0
  46. package/lib/commands/skill/templates.js +1 -1
  47. package/lib/commands/skill/validate.js +1 -1
  48. package/lib/commands/sql/detail.js +1 -1
  49. package/lib/commands/sql/exec.js +1 -1
  50. package/lib/commands/sql/index.js +1 -1
  51. package/lib/commands/update.js +1 -1
  52. package/lib/commands/workspace/index.js +1 -1
  53. package/lib/config/schema.js +1 -1
  54. package/lib/constant/app.js +1 -1
  55. package/lib/constant/auth-mode.js +1 -1
  56. package/lib/constant/cli.js +1 -1
  57. package/lib/constant/defaults.js +1 -1
  58. package/lib/constant/distribution.js +1 -1
  59. package/lib/constant/domain.js +1 -1
  60. package/lib/constant/env.js +1 -1
  61. package/lib/constant/output.js +1 -1
  62. package/lib/constant/product.js +1 -1
  63. package/lib/constant/risk.js +1 -1
  64. package/lib/constant/url.js +1 -1
  65. package/lib/context.js +1 -1
  66. package/lib/core/api-client.js +1 -1
  67. package/lib/core/db-resolver.js +1 -1
  68. package/lib/core/sdk-client.js +1 -1
  69. package/lib/errors.js +1 -1
  70. package/lib/framework/build-all-flags.js +1 -1
  71. package/lib/framework/dryrun.js +1 -1
  72. package/lib/framework/flags.js +1 -1
  73. package/lib/framework/help.js +1 -1
  74. package/lib/framework/index.js +1 -1
  75. package/lib/framework/output.js +1 -1
  76. package/lib/framework/preparse.js +1 -1
  77. package/lib/framework/response.js +1 -1
  78. package/lib/framework/runner-confirmation.js +1 -1
  79. package/lib/framework/runner-error.js +1 -1
  80. package/lib/framework/runner.js +1 -1
  81. package/lib/framework/schema-export.js +1 -1
  82. package/lib/framework/types.js +1 -1
  83. package/lib/generated/build-info.js +1 -1
  84. package/lib/help.js +1 -1
  85. package/lib/skills/npx-skills-add.js +1 -1
  86. package/lib/skills/runtime-skill-sync/constants.js +1 -0
  87. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
  88. package/lib/skills/runtime-skill-sync/hashing.js +1 -0
  89. package/lib/skills/runtime-skill-sync/links.js +1 -0
  90. package/lib/skills/runtime-skill-sync/list-local.js +1 -0
  91. package/lib/skills/runtime-skill-sync/local-files.js +1 -0
  92. package/lib/skills/runtime-skill-sync/materialize.js +1 -0
  93. package/lib/skills/runtime-skill-sync/metadata.js +1 -0
  94. package/lib/skills/runtime-skill-sync/paths.js +1 -0
  95. package/lib/skills/runtime-skill-sync/push.js +1 -0
  96. package/lib/skills/runtime-skill-sync/scopes.js +1 -0
  97. package/lib/skills/runtime-skill-sync/types.js +1 -0
  98. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
  99. package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
  100. package/lib/skills/runtime-skill-sync.js +1 -1
  101. package/lib/utils/apply-jq-filter.js +1 -1
  102. package/lib/utils/logger.js +1 -1
  103. package/lib/utils/params.js +1 -1
  104. package/lib/utils/platform.js +1 -1
  105. package/lib/utils/update-notice.js +1 -1
  106. package/lib/utils/version.js +1 -1
  107. package/lib/utils/write-cli-side-channel.js +1 -1
  108. package/package.json +4 -1
@@ -1 +1 @@
1
- function a69_0x1a2a(){const _0x83a19a=['134uqvjxH','980212EcQiGR','description','4791DswksG','trim','stringify','8487017CcSimQ','message','validation','18960960uYeQCv','5070972MdZnPJ','7983420OxdIcf','6802700uVKmyH'];a69_0x1a2a=function(){return _0x83a19a;};return a69_0x1a2a();}(function(_0x51777b,_0x982403){const _0x485f1c=a69_0x2b9f,_0x111bab=_0x51777b();while(!![]){try{const _0x40f95f=parseInt(_0x485f1c(0x1a9))/0x1+parseInt(_0x485f1c(0x1a8))/0x2*(parseInt(_0x485f1c(0x1ab))/0x3)+parseInt(_0x485f1c(0x1a5))/0x4+-parseInt(_0x485f1c(0x1a7))/0x5+-parseInt(_0x485f1c(0x1a6))/0x6+-parseInt(_0x485f1c(0x1ae))/0x7+parseInt(_0x485f1c(0x1a4))/0x8;if(_0x40f95f===_0x982403)break;else _0x111bab['push'](_0x111bab['shift']());}catch(_0x334b96){_0x111bab['push'](_0x111bab['shift']());}}}(a69_0x1a2a,0xc891d));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x38ac88){const _0x35fead=a69_0x2b9f;if(_0x38ac88 instanceof LovrabetError)return CliErrors[_0x35fead(0x1a3)](userFacingLovrabetMessage(_0x38ac88));return _0x38ac88;}function a69_0x2b9f(_0x37d11f,_0x5039a3){_0x37d11f=_0x37d11f-0x1a2;const _0x1a2a95=a69_0x1a2a();let _0x2b9f0e=_0x1a2a95[_0x37d11f];return _0x2b9f0e;}function userFacingLovrabetMessage(_0x2d81d0){const _0x15f9ab=a69_0x2b9f,_0xdfac11=_0x2d81d0[_0x15f9ab(0x1aa)];if(_0xdfac11!==undefined&&_0xdfac11!==null){if(typeof _0xdfac11==='string'&&_0xdfac11['trim']())return _0xdfac11[_0x15f9ab(0x1ac)]();try{return JSON[_0x15f9ab(0x1ad)](_0xdfac11);}catch{}}return _0x2d81d0[_0x15f9ab(0x1a2)];}
1
+ (function(_0x82409c,_0x2a2f3b){const _0x54a6ae=a78_0x5640,_0x1c15a2=_0x82409c();while(!![]){try{const _0x49d694=-parseInt(_0x54a6ae(0xec))/0x1*(-parseInt(_0x54a6ae(0xe7))/0x2)+-parseInt(_0x54a6ae(0xdf))/0x3*(parseInt(_0x54a6ae(0xe0))/0x4)+parseInt(_0x54a6ae(0xe4))/0x5*(parseInt(_0x54a6ae(0xed))/0x6)+-parseInt(_0x54a6ae(0xeb))/0x7+parseInt(_0x54a6ae(0xe8))/0x8*(-parseInt(_0x54a6ae(0xde))/0x9)+-parseInt(_0x54a6ae(0xe1))/0xa+parseInt(_0x54a6ae(0xe2))/0xb;if(_0x49d694===_0x2a2f3b)break;else _0x1c15a2['push'](_0x1c15a2['shift']());}catch(_0x145ccc){_0x1c15a2['push'](_0x1c15a2['shift']());}}}(a78_0xfe56,0xaf0ed));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x156207){if(_0x156207 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x156207));return _0x156207;}function a78_0x5640(_0x221122,_0x5fa6b3){_0x221122=_0x221122-0xde;const _0xfe563f=a78_0xfe56();let _0x5640c6=_0xfe563f[_0x221122];return _0x5640c6;}function a78_0xfe56(){const _0x28cc91=['2447920qJUkHT','11869781gDLohR','trim','5HzqbGh','stringify','message','2508278demXAI','69024ggFVoo','string','description','4798479pQarnG','1rjNSwo','8090562uuSZfH','1233MbLtVm','15ACpBCn','681820Olecbw'];a78_0xfe56=function(){return _0x28cc91;};return a78_0xfe56();}function userFacingLovrabetMessage(_0xa71099){const _0x4a2e25=a78_0x5640,_0x36d5cd=_0xa71099[_0x4a2e25(0xea)];if(_0x36d5cd!==undefined&&_0x36d5cd!==null){if(typeof _0x36d5cd===_0x4a2e25(0xe9)&&_0x36d5cd[_0x4a2e25(0xe3)]())return _0x36d5cd[_0x4a2e25(0xe3)]();try{return JSON[_0x4a2e25(0xe5)](_0x36d5cd);}catch{}}return _0xa71099[_0x4a2e25(0xe6)];}
@@ -1 +1 @@
1
- const a70_0x41961a=a70_0x32c7;(function(_0x2082cf,_0x4f570e){const _0x474e8d=a70_0x32c7,_0x305d30=_0x2082cf();while(!![]){try{const _0x59dd28=-parseInt(_0x474e8d(0xe0))/0x1+parseInt(_0x474e8d(0xf1))/0x2+-parseInt(_0x474e8d(0xf0))/0x3*(parseInt(_0x474e8d(0xd3))/0x4)+-parseInt(_0x474e8d(0xf4))/0x5+parseInt(_0x474e8d(0xfb))/0x6+-parseInt(_0x474e8d(0x101))/0x7+parseInt(_0x474e8d(0xff))/0x8;if(_0x59dd28===_0x4f570e)break;else _0x305d30['push'](_0x305d30['shift']());}catch(_0x569c8d){_0x305d30['push'](_0x305d30['shift']());}}}(a70_0x357a,0xb3091));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0xd66002){const _0x3f8004=a70_0x32c7;return void _0xd66002,AUTH_MODE[_0x3f8004(0x100)];}export function createPipelineEnv(_0x4f370f,_0x28ef8c){const _0x201ca3=a70_0x32c7,_0x4c4a91=typeof _0x28ef8c[_0x201ca3(0xec)]===_0x201ca3(0xdc)&&_0x28ef8c[_0x201ca3(0xec)]['trim']();return{'rawFlags':_0x28ef8c,'appCode':_0x4f370f[_0x201ca3(0xd7)]||productEnv(_0x201ca3(0xdf))||(_0x4c4a91?undefined:readAppCodeFromConfig()),'appCodeSource':_0x4f370f[_0x201ca3(0xd4)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x28ef8c),'defaultFormat':_0x4f370f[_0x201ca3(0xe1)],'defaultPageSize':_0x4f370f['pageSize'],'defaultVerbose':_0x4f370f['verbose'],'riskLevel':_0x4f370f['riskLevel'],'accessKey':_0x4f370f[_0x201ca3(0xf7)],'env':_0x4f370f[_0x201ca3(0xcc)],'mergedCli':{'defaultApp':_0x4f370f[_0x201ca3(0xf2)],'currentApp':_0x4f370f[_0x201ca3(0xe8)],'appCode':_0x4f370f[_0x201ca3(0xd7)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x41961a(0xc9)](_0x2a039a=>PIPELINE_FLAG_NAMES[a70_0x41961a(0xf5)](_0x2a039a['name']))[a70_0x41961a(0xe5)](({name:_0x214e07,type:_0x4f4961,description:_0xa90073})=>({'name':_0x214e07,'type':_0x4f4961,'description':_0xa90073})),'formatOutput':formatOutput,'getCommandLabel'(_0x53707c){const _0x2ea2a1=a70_0x41961a;return CLI_BIN_NAME+'\x20'+_0x53707c[_0x2ea2a1(0xf8)]+'\x20'+_0x53707c[_0x2ea2a1(0xda)];},'riskPolicy':{'onViolation'(_0x9f02c8){console['error'](_0x9f02c8);},'createError'(_0x514d13){const _0x5d0b82=a70_0x41961a;return CliErrors[_0x5d0b82(0xee)](_0x514d13);}},async 'prepare'(_0xe3ef4e,_0x59e8b3){const _0x22ab77=a70_0x41961a,_0x3105f1=resolveAuthMode(_0x59e8b3);if(_0xe3ef4e[_0x22ab77(0xdd)]!==![]){if(!_0x59e8b3['accessKey'])throw CliErrors['authRequired'](_0x22ab77(0xe2)+PRODUCT_CONFIG['newConfigFileName']+_0x22ab77(0xe6)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x1af36a}=await import('../core/api-client.js');_0x1af36a(_0x59e8b3[_0x22ab77(0xf7)]);}let _0x4cbe8f='';if(_0xe3ef4e[_0x22ab77(0xeb)]!==![]){_0x4cbe8f=_0x59e8b3[_0x22ab77(0xd7)]??'',_0x4cbe8f=await resolveExplicitAppName(_0xe3ef4e,_0x59e8b3,_0x4cbe8f);if(!_0x4cbe8f){await assertSelectedAppNameIsRuntimeAccessible(_0xe3ef4e,_0x59e8b3);throw CliErrors[_0x22ab77(0xd2)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x22ab77(0xef)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xe3ef4e,_0x59e8b3,_0x4cbe8f);}if(_0x4cbe8f){const {initSdkClient:_0x564b58}=await import(_0x22ab77(0xea));_0x564b58({'appCode':_0x4cbe8f,'env':_0x59e8b3['env']??'production','accessKey':_0x59e8b3[_0x22ab77(0xf7)],'authMode':_0x3105f1});}return{'defaults':{'booleans':{'verbose':_0x59e8b3[_0x22ab77(0xd0)]},'numbers':{'pagesize':_0x59e8b3[_0x22ab77(0xdb)]}},'extras':{'appCode':_0x4cbe8f,'cookie':'','apiDomain':_0x59e8b3['apiDomain'],'apiDir':'','accessKey':_0x59e8b3[_0x22ab77(0xf7)],'envName':_0x59e8b3[_0x22ab77(0xcc)],'mergedCli':_0x59e8b3[_0x22ab77(0xcf)]}};},async 'confirmHighRisk'({def:_0x472aef,env:_0x2283b0,flags:_0xbcd7cd,commandLabel:_0x3f8187}){const _0x1e484c=a70_0x41961a;if(_0x2283b0[_0x1e484c(0xcd)]){const _0x52d68a=reconstructCommandArgv(_0x472aef,_0xbcd7cd);throw CliErrors['validation']('High-risk\x20operation\x20`'+_0x3f8187+_0x1e484c(0xe9)+(_0x1e484c(0xf9)+_0x52d68a));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x472aef,_0x3f8187,_0xbcd7cd),'createCancelledError':_0x6461bc=>CliErrors[_0x1e484c(0xee)](_0x6461bc)});},'mapDryRunError'(_0x230b3e){return mapUserFacingExecuteError(_0x230b3e);},'mapExecuteError'(_0xd9bfa1){return mapUserFacingExecuteError(_0xd9bfa1);},async 'finalize'(){const _0x54ed4e=a70_0x41961a,{clearActiveAK:_0x2aab67}=await import(_0x54ed4e(0xd1));_0x2aab67();}};async function resolveExplicitAppName(_0x81e819,_0x5af1fd,_0x5211d6){const _0x253ca1=a70_0x41961a;if(_0x81e819[_0x253ca1(0xeb)]===![])return _0x5211d6;const _0x5d80ac=typeof _0x5af1fd[_0x253ca1(0xfd)][_0x253ca1(0xec)]===_0x253ca1(0xdc)?_0x5af1fd[_0x253ca1(0xfd)][_0x253ca1(0xec)][_0x253ca1(0xce)]():'';if(!_0x5d80ac)return _0x5211d6;const _0xc0b63c=typeof _0x5af1fd['rawFlags']['appcode']===_0x253ca1(0xdc)&&_0x5af1fd[_0x253ca1(0xfd)][_0x253ca1(0xd8)][_0x253ca1(0xce)]()||productEnv(_0x253ca1(0xdf));if(_0xc0b63c||_0x5af1fd['appCodeSource']==='local-alias')return _0x5211d6;const {getRemoteAppList:_0x42d0d8}=await import(_0x253ca1(0xd6)),_0x3f68f8=await _0x42d0d8({'env':_0x5af1fd[_0x253ca1(0xcc)]??'production','accessKey':_0x5af1fd[_0x253ca1(0xf7)]}),_0x54dbaf=findAppByName(_0x3f68f8[_0x253ca1(0xde)],_0x5d80ac);if(_0x54dbaf&&!isRuntimeAccessibleApp(_0x54dbaf))throw runtimeInaccessibleAppError(_0x54dbaf,'\x22'+_0x5d80ac+'\x22');const _0x12a795=_0x54dbaf?.[_0x253ca1(0xd7)]?.[_0x253ca1(0xce)]();if(_0x12a795)return _0x12a795;throw CliErrors['validation'](_0x253ca1(0xc8)+_0x5d80ac,'Run\x20`'+CLI_BIN_NAME+_0x253ca1(0xf6)+_0x5d80ac+_0x253ca1(0xf3)+PRODUCT_CONFIG[_0x253ca1(0xef)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x370100,_0x2e8259){const _0x22cf58=a70_0x41961a;if(_0x370100['requiresAppCode']===![]||!_0x2e8259[_0x22cf58(0xf7)])return;const _0xcbcabb=(typeof _0x2e8259[_0x22cf58(0xfd)][_0x22cf58(0xec)]===_0x22cf58(0xdc)&&_0x2e8259['rawFlags'][_0x22cf58(0xec)]['trim']()?_0x2e8259[_0x22cf58(0xfd)][_0x22cf58(0xec)]:_0x2e8259[_0x22cf58(0xcf)]?.[_0x22cf58(0xe8)]??_0x2e8259[_0x22cf58(0xcf)]?.[_0x22cf58(0xf2)])?.[_0x22cf58(0xce)]();if(!_0xcbcabb)return;const {getRemoteAppList:_0x1e6366}=await import('../commands/app/remote-source.js'),_0x564b22=await _0x1e6366({'env':_0x2e8259['env']??'production','accessKey':_0x2e8259['accessKey']}),_0x4efcad=findAppByName(_0x564b22['items'],_0xcbcabb);if(_0x4efcad&&!isRuntimeAccessibleApp(_0x4efcad))throw runtimeInaccessibleAppError(_0x4efcad,'\x22'+_0xcbcabb+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x2e308e,_0x446ec5,_0x3de92c){const _0x9bf2ac=a70_0x41961a;if(_0x2e308e['requiresAppCode']===![]||!_0x446ec5[_0x9bf2ac(0xf7)])return;const {getRemoteAppList:_0xdfc6dd}=await import('../commands/app/remote-source.js'),_0x2d542f=await _0xdfc6dd({'env':_0x446ec5[_0x9bf2ac(0xcc)]??_0x9bf2ac(0xd5),'accessKey':_0x446ec5[_0x9bf2ac(0xf7)]}),_0x2899f7=findAppByCode(_0x2d542f[_0x9bf2ac(0xde)],_0x3de92c);if(_0x2899f7&&!isRuntimeAccessibleApp(_0x2899f7))throw runtimeInaccessibleAppError(_0x2899f7,'appcode\x20\x22'+_0x3de92c+'\x22');}export async function runCommand(_0x1705c4,_0x16b682){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1705c4)?withUpdateNotice(_0x1705c4):_0x1705c4,_0x16b682,runnerAdapter);}function a70_0x32c7(_0x4c0050,_0x2827e9){_0x4c0050=_0x4c0050-0xc7;const _0x357a47=a70_0x357a();let _0x32c76f=_0x357a47[_0x4c0050];return _0x32c76f;}function shouldAttachUpdateNotice(_0x47cd4c){const _0x301bda=a70_0x41961a;return![_0x301bda(0xfc),_0x301bda(0xe4),_0x301bda(0xe3)][_0x301bda(0xe7)](_0x47cd4c[_0x301bda(0xf8)]);}function withUpdateNotice(_0x6f1f57){return{..._0x6f1f57,async 'execute'(_0x442ca5){const _0x53cce8=a70_0x32c7,_0x3e10af=shouldResolveUpdateNotice(_0x442ca5)?resolveLatestUpdateNotice()[_0x53cce8(0xed)](()=>null):Promise[_0x53cce8(0xd9)](null),_0x111f5c=await _0x6f1f57[_0x53cce8(0xcb)](_0x442ca5);return attachUpdateNotice(_0x111f5c,await _0x3e10af);}};}function a70_0x357a(){const _0x4977df=['newConfigFileName','21rSFdNc','2863210SVmtYk','defaultApp','.appcode\x20to\x20','1405060CzGvCv','has','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','accessKey','service','\x20\x20To\x20proceed:\x20','_notice','130668fCDUGV','update','rawFlags','nonInteractive','27273128aYUYkh','ClientAk','9566039RgaTxD','pretty','Unknown\x20app:\x20','filter','object','execute','env','isNonInteractive','trim','mergedCli','defaultVerbose','../core/api-client.js','configMissing','801476WdQoQh','appCodeSource','production','../commands/app/remote-source.js','appCode','appcode','resolve','command','defaultPageSize','string','requiresAuth','items','APPCODE','1079023KotJRp','format','Set\x20accessKey\x20in\x20','doctor','schema','map','\x20or\x20pass\x20','includes','currentApp','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','../core/sdk-client.js','requiresAppCode','app','catch','cancelled'];a70_0x357a=function(){return _0x4977df;};return a70_0x357a();}function shouldResolveUpdateNotice(_0x584f37){const _0x3d55bc=a70_0x41961a;return _0x584f37['format']===_0x3d55bc(0xc7)&&!_0x584f37[_0x3d55bc(0xfe)];}function attachUpdateNotice(_0x37c5b7,_0x5398eb){const _0x1d9b8c=a70_0x41961a;if(!_0x5398eb||!_0x37c5b7||typeof _0x37c5b7!==_0x1d9b8c(0xca))return _0x37c5b7;const _0x57f66a=_0x37c5b7,_0x107f4a=typeof _0x57f66a[_0x1d9b8c(0xfa)]===_0x1d9b8c(0xca)&&_0x57f66a[_0x1d9b8c(0xfa)]!==null?_0x57f66a[_0x1d9b8c(0xfa)]:{};return{..._0x57f66a,'_notice':{..._0x107f4a,'update':_0x5398eb}};}
1
+ const a79_0x37c875=a79_0x1b9b;(function(_0x7f4938,_0x949e2a){const _0x5bce8b=a79_0x1b9b,_0x49243c=_0x7f4938();while(!![]){try{const _0xbab19b=-parseInt(_0x5bce8b(0x88))/0x1*(parseInt(_0x5bce8b(0x96))/0x2)+-parseInt(_0x5bce8b(0x7b))/0x3+parseInt(_0x5bce8b(0xa8))/0x4*(parseInt(_0x5bce8b(0xa0))/0x5)+-parseInt(_0x5bce8b(0xb5))/0x6+-parseInt(_0x5bce8b(0x89))/0x7+-parseInt(_0x5bce8b(0x94))/0x8+-parseInt(_0x5bce8b(0x7e))/0x9*(-parseInt(_0x5bce8b(0x82))/0xa);if(_0xbab19b===_0x949e2a)break;else _0x49243c['push'](_0x49243c['shift']());}catch(_0x362b6e){_0x49243c['push'](_0x49243c['shift']());}}}(a79_0xc5ee,0x1d34c));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';function a79_0x1b9b(_0x3f8985,_0x471f00){_0x3f8985=_0x3f8985-0x77;const _0xc5ee21=a79_0xc5ee();let _0x1b9b78=_0xc5ee21[_0x3f8985];return _0x1b9b78;}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(_0x1b8003){const _0x2a9ae5=a79_0x1b9b;return void _0x1b8003,AUTH_MODE[_0x2a9ae5(0x8d)];}export function createPipelineEnv(_0x515423,_0xa99063){const _0x4b81c5=a79_0x1b9b,_0x19fe89=typeof _0xa99063[_0x4b81c5(0xab)]===_0x4b81c5(0xb4)&&_0xa99063[_0x4b81c5(0xab)]['trim']();return{'rawFlags':_0xa99063,'appCode':_0x515423[_0x4b81c5(0x8c)]||productEnv(_0x4b81c5(0xa3))||(_0x19fe89?undefined:readAppCodeFromConfig()),'appCodeSource':_0x515423['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0xa99063),'defaultFormat':_0x515423[_0x4b81c5(0x7a)],'defaultPageSize':_0x515423['pageSize'],'defaultVerbose':_0x515423['verbose'],'riskLevel':_0x515423[_0x4b81c5(0x81)],'accessKey':_0x515423[_0x4b81c5(0x98)],'env':_0x515423['env'],'mergedCli':{'defaultApp':_0x515423['defaultApp'],'currentApp':_0x515423[_0x4b81c5(0x87)],'appCode':_0x515423[_0x4b81c5(0x8c)]}};}function a79_0xc5ee(){const _0x101ba3=['newConfigFileName','production','_notice','appcode','603416FHphgu','map','3756TofJmJ','name','accessKey','Set\x20accessKey\x20in\x20','object','cancelled','execute','validation','catch','command','87595RocGAO','env','doctor','APPCODE','.appcode\x20to\x20','error','requiresAppCode','authRequired','4doyNpB','items','appcode\x20\x22','app','update','High-risk\x20operation\x20`','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','appCodeSource','Unknown\x20app:\x20','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','\x20or\x20pass\x20','string','294336SPxhAC','requiresAuth','../commands/app/remote-source.js','isNonInteractive','format','301662kGcbAb','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','5205501RLtoXU','schema','defaultApp','riskLevel','10PWMJTl','mergedCli','trim','\x20\x20To\x20proceed:\x20','configMissing','currentApp','94QZYfQp','522977jzabic','rawFlags','local-alias','appCode','ClientAk','../core/api-client.js','service'];a79_0xc5ee=function(){return _0x101ba3;};return a79_0xc5ee();}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1e3899=>PIPELINE_FLAG_NAMES['has'](_0x1e3899[a79_0x37c875(0x97)]))[a79_0x37c875(0x95)](({name:_0x514871,type:_0x48503f,description:_0x1197bd})=>({'name':_0x514871,'type':_0x48503f,'description':_0x1197bd})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bc517){const _0x5cfddb=a79_0x37c875;return CLI_BIN_NAME+'\x20'+_0x2bc517[_0x5cfddb(0x8f)]+'\x20'+_0x2bc517[_0x5cfddb(0x9f)];},'riskPolicy':{'onViolation'(_0x1c888a){const _0x112072=a79_0x37c875;console[_0x112072(0xa5)](_0x1c888a);},'createError'(_0x279922){const _0x980fd1=a79_0x37c875;return CliErrors[_0x980fd1(0x9b)](_0x279922);}},async 'prepare'(_0x4e6635,_0x2566e7){const _0x35bdd8=a79_0x37c875,_0x11465d=resolveAuthMode(_0x2566e7);if(_0x4e6635[_0x35bdd8(0x77)]!==![]){if(!_0x2566e7[_0x35bdd8(0x98)])throw CliErrors[_0x35bdd8(0xa7)](_0x35bdd8(0x99)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+_0x35bdd8(0xb3)+productEnvName(_0x35bdd8(0x7c))+'.');const {setActiveAK:_0x17721f}=await import(_0x35bdd8(0x8e));_0x17721f(_0x2566e7['accessKey']);}let _0x159d4e='';if(_0x4e6635['requiresAppCode']!==![]){_0x159d4e=_0x2566e7[_0x35bdd8(0x8c)]??'',_0x159d4e=await resolveExplicitAppName(_0x4e6635,_0x2566e7,_0x159d4e);if(!_0x159d4e){await assertSelectedAppNameIsRuntimeAccessible(_0x4e6635,_0x2566e7);throw CliErrors[_0x35bdd8(0x86)](_0x35bdd8(0xb2)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x4e6635,_0x2566e7,_0x159d4e);}if(_0x159d4e){const {initSdkClient:_0x5895c}=await import('../core/sdk-client.js');_0x5895c({'appCode':_0x159d4e,'env':_0x2566e7[_0x35bdd8(0xa1)]??_0x35bdd8(0x91),'accessKey':_0x2566e7[_0x35bdd8(0x98)],'authMode':_0x11465d});}return{'defaults':{'booleans':{'verbose':_0x2566e7['defaultVerbose']},'numbers':{'pagesize':_0x2566e7[_0x35bdd8(0xb1)]}},'extras':{'appCode':_0x159d4e,'cookie':'','apiDomain':_0x2566e7['apiDomain'],'apiDir':'','accessKey':_0x2566e7[_0x35bdd8(0x98)],'envName':_0x2566e7[_0x35bdd8(0xa1)],'mergedCli':_0x2566e7[_0x35bdd8(0x83)]}};},async 'confirmHighRisk'({def:_0x2b8633,env:_0x7f5463,flags:_0x5add9a,commandLabel:_0x4eca79}){const _0x515ad8=a79_0x37c875;if(_0x7f5463[_0x515ad8(0x79)]){const _0x4925bb=reconstructCommandArgv(_0x2b8633,_0x5add9a);throw CliErrors[_0x515ad8(0x9d)](_0x515ad8(0xad)+_0x4eca79+_0x515ad8(0xae)+(_0x515ad8(0x85)+_0x4925bb));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2b8633,_0x4eca79,_0x5add9a),'createCancelledError':_0x5b4966=>CliErrors[_0x515ad8(0x9b)](_0x5b4966)});},'mapDryRunError'(_0x4168d2){return mapUserFacingExecuteError(_0x4168d2);},'mapExecuteError'(_0xa44eeb){return mapUserFacingExecuteError(_0xa44eeb);},async 'finalize'(){const {clearActiveAK:_0x465602}=await import('../core/api-client.js');_0x465602();}};async function resolveExplicitAppName(_0x441932,_0x5e84ca,_0x2fcf1b){const _0xd5c6a3=a79_0x37c875;if(_0x441932[_0xd5c6a3(0xa6)]===![])return _0x2fcf1b;const _0x4fa833=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0xab)]===_0xd5c6a3(0xb4)?_0x5e84ca[_0xd5c6a3(0x8a)]['app'][_0xd5c6a3(0x84)]():'';if(!_0x4fa833)return _0x2fcf1b;const _0x419491=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]===_0xd5c6a3(0xb4)&&_0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]['trim']()||productEnv(_0xd5c6a3(0xa3));if(_0x419491||_0x5e84ca[_0xd5c6a3(0xaf)]===_0xd5c6a3(0x8b))return _0x2fcf1b;const {getRemoteAppList:_0x31dd86}=await import(_0xd5c6a3(0x78)),_0x5b8ce7=await _0x31dd86({'env':_0x5e84ca[_0xd5c6a3(0xa1)]??_0xd5c6a3(0x91),'accessKey':_0x5e84ca[_0xd5c6a3(0x98)]}),_0x2703be=findAppByName(_0x5b8ce7[_0xd5c6a3(0xa9)],_0x4fa833);if(_0x2703be&&!isRuntimeAccessibleApp(_0x2703be))throw runtimeInaccessibleAppError(_0x2703be,'\x22'+_0x4fa833+'\x22');const _0x2831b4=_0x2703be?.['appCode']?.['trim']();if(_0x2831b4)return _0x2831b4;throw CliErrors[_0xd5c6a3(0x9d)](_0xd5c6a3(0xb0)+_0x4fa833,'Run\x20`'+CLI_BIN_NAME+_0xd5c6a3(0x7d)+_0x4fa833+_0xd5c6a3(0xa4)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x384584,_0x49717f){const _0x37165f=a79_0x37c875;if(_0x384584[_0x37165f(0xa6)]===![]||!_0x49717f[_0x37165f(0x98)])return;const _0x7234a5=(typeof _0x49717f['rawFlags'][_0x37165f(0xab)]===_0x37165f(0xb4)&&_0x49717f[_0x37165f(0x8a)]['app']['trim']()?_0x49717f['rawFlags']['app']:_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x87)]??_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x80)])?.[_0x37165f(0x84)]();if(!_0x7234a5)return;const {getRemoteAppList:_0x508a24}=await import(_0x37165f(0x78)),_0x2a278d=await _0x508a24({'env':_0x49717f[_0x37165f(0xa1)]??_0x37165f(0x91),'accessKey':_0x49717f['accessKey']}),_0x3b1ac9=findAppByName(_0x2a278d['items'],_0x7234a5);if(_0x3b1ac9&&!isRuntimeAccessibleApp(_0x3b1ac9))throw runtimeInaccessibleAppError(_0x3b1ac9,'\x22'+_0x7234a5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x473799,_0x3313f3,_0x4339c5){const _0x5f1966=a79_0x37c875;if(_0x473799[_0x5f1966(0xa6)]===![]||!_0x3313f3[_0x5f1966(0x98)])return;const {getRemoteAppList:_0x580dae}=await import(_0x5f1966(0x78)),_0x5d457e=await _0x580dae({'env':_0x3313f3[_0x5f1966(0xa1)]??'production','accessKey':_0x3313f3[_0x5f1966(0x98)]}),_0xcce01b=findAppByCode(_0x5d457e[_0x5f1966(0xa9)],_0x4339c5);if(_0xcce01b&&!isRuntimeAccessibleApp(_0xcce01b))throw runtimeInaccessibleAppError(_0xcce01b,_0x5f1966(0xaa)+_0x4339c5+'\x22');}export async function runCommand(_0x2062ee,_0x5e1237){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2062ee)?withUpdateNotice(_0x2062ee):_0x2062ee,_0x5e1237,runnerAdapter);}function shouldAttachUpdateNotice(_0x21712e){const _0x19279d=a79_0x37c875;return![_0x19279d(0xac),_0x19279d(0x7f),_0x19279d(0xa2)]['includes'](_0x21712e[_0x19279d(0x8f)]);}function withUpdateNotice(_0x54c3ef){return{..._0x54c3ef,async 'execute'(_0x18e9ad){const _0x59a621=a79_0x1b9b,_0x1d2956=shouldResolveUpdateNotice(_0x18e9ad)?resolveLatestUpdateNotice()[_0x59a621(0x9e)](()=>null):Promise['resolve'](null),_0x55147d=await _0x54c3ef[_0x59a621(0x9c)](_0x18e9ad);return attachUpdateNotice(_0x55147d,await _0x1d2956);}};}function shouldResolveUpdateNotice(_0x24a527){const _0x3183ec=a79_0x37c875;return _0x24a527[_0x3183ec(0x7a)]==='pretty'&&!_0x24a527['nonInteractive'];}function attachUpdateNotice(_0x4ced4d,_0x15f1e9){const _0x5c728b=a79_0x37c875;if(!_0x15f1e9||!_0x4ced4d||typeof _0x4ced4d!==_0x5c728b(0x9a))return _0x4ced4d;const _0x31e253=_0x4ced4d,_0x802c9a=typeof _0x31e253['_notice']===_0x5c728b(0x9a)&&_0x31e253[_0x5c728b(0x92)]!==null?_0x31e253[_0x5c728b(0x92)]:{};return{..._0x31e253,'_notice':{..._0x802c9a,'update':_0x15f1e9}};}
@@ -1 +1 @@
1
- function a71_0x4749(){const _0x519ec2=['368RSiGbV','7478451UBlCKZ','map','120gDJPSD','none','auth','commands','1789412mApVgU','2865PbRqLj','service','13VZDUZd','4771052Fajphx','services','3pSTUca','has','required','36DbUcBW','../commands/registry.js','84567oRWvwF','filter','20DMETZJ','501905wbFlDU','177492fUkZgw'];a71_0x4749=function(){return _0x519ec2;};return a71_0x4749();}(function(_0x38b771,_0x447857){const _0x51395c=a71_0xa89f,_0x2142a3=_0x38b771();while(!![]){try{const _0x45952a=parseInt(_0x51395c(0x1b4))/0x1*(parseInt(_0x51395c(0x1af))/0x2)+parseInt(_0x51395c(0x1b9))/0x3*(parseInt(_0x51395c(0x1b3))/0x4)+-parseInt(_0x51395c(0x1aa))/0x5*(-parseInt(_0x51395c(0x1bc))/0x6)+parseInt(_0x51395c(0x1be))/0x7*(-parseInt(_0x51395c(0x1ac))/0x8)+parseInt(_0x51395c(0x1ad))/0x9+parseInt(_0x51395c(0x1c0))/0xa*(-parseInt(_0x51395c(0x1b7))/0xb)+-parseInt(_0x51395c(0x1ab))/0xc*(-parseInt(_0x51395c(0x1b6))/0xd);if(_0x45952a===_0x447857)break;else _0x2142a3['push'](_0x2142a3['shift']());}catch(_0x2ebba9){_0x2142a3['push'](_0x2142a3['shift']());}}}(a71_0x4749,0x9d3ef));import{buildSchemaPayload as a71_0xab9001}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a71_0xa89f(_0x3f0024,_0x991134){_0x3f0024=_0x3f0024-0x1aa;const _0x474957=a71_0x4749();let _0xa89f03=_0x474957[_0x3f0024];return _0xa89f03;}import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.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 _0x1759fd=a71_0xa89f,{serviceRegistry:_0x5f07b0,findDefinition:_0x64f293}=await import(_0x1759fd(0x1bd)),_0x1ca639=new Set(_0x5f07b0[_0x1759fd(0x1ae)](_0x3f9027=>_0x3f9027[_0x1759fd(0x1b5)])),_0xe5a5b9=listDynamicServiceEntries()[_0x1759fd(0x1bf)](_0x35f655=>!_0x1ca639[_0x1759fd(0x1ba)](_0x35f655[_0x1759fd(0x1b5)])),_0x3d660c=a71_0xab9001({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x5f07b0,..._0xe5a5b9],'buildAllFlags':buildAllFlags,'findDefinition':(_0x2a68e8,_0xa0ece6)=>_0x64f293(_0x2a68e8,_0xa0ece6)??findDynamicServiceDefinition(_0x2a68e8,_0xa0ece6)});return normalizeSchemaPayload(_0x3d660c);}function normalizeSchemaPayload(_0x35d320){const _0x109c74=a71_0xa89f;return{..._0x35d320,'schemaVersion':0x2,'services':_0x35d320[_0x109c74(0x1b8)][_0x109c74(0x1ae)](_0x1a0069=>({..._0x1a0069,'commands':_0x1a0069[_0x109c74(0x1b2)][_0x109c74(0x1ae)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x36f992){const _0x5c4969=a71_0xa89f,_0xfd809f=_0x36f992;return{..._0x36f992,'auth':_0xfd809f[_0x5c4969(0x1b1)]??(_0x36f992['requiresAuth']?_0x5c4969(0x1bb):_0x5c4969(0x1b0))};}
1
+ function a80_0x116d(_0x1f1756,_0x5f0c55){_0x1f1756=_0x1f1756-0xb9;const _0x37dfa5=a80_0x37df();let _0x116ded=_0x37dfa5[_0x1f1756];return _0x116ded;}(function(_0x2b99db,_0x205db8){const _0x436565=a80_0x116d,_0x141363=_0x2b99db();while(!![]){try{const _0x462f9c=parseInt(_0x436565(0xb9))/0x1+parseInt(_0x436565(0xc6))/0x2+parseInt(_0x436565(0xc2))/0x3*(parseInt(_0x436565(0xc4))/0x4)+-parseInt(_0x436565(0xc3))/0x5+-parseInt(_0x436565(0xc0))/0x6+-parseInt(_0x436565(0xc5))/0x7*(-parseInt(_0x436565(0xba))/0x8)+parseInt(_0x436565(0xcb))/0x9*(-parseInt(_0x436565(0xc9))/0xa);if(_0x462f9c===_0x205db8)break;else _0x141363['push'](_0x141363['shift']());}catch(_0xeec0ec){_0x141363['push'](_0x141363['shift']());}}}(a80_0x37df,0x2c08e));import{buildSchemaPayload as a80_0x426c57}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.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 _0x46b62e=a80_0x116d,{serviceRegistry:_0x582786,findDefinition:_0x558211}=await import(_0x46b62e(0xbc)),_0x4d0188=new Set(_0x582786[_0x46b62e(0xbf)](_0x158ece=>_0x158ece['service'])),_0x318a5a=listDynamicServiceEntries()[_0x46b62e(0xbe)](_0x3bc363=>!_0x4d0188[_0x46b62e(0xbb)](_0x3bc363[_0x46b62e(0xca)])),_0x123111=a80_0x426c57({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x582786,..._0x318a5a],'buildAllFlags':buildAllFlags,'findDefinition':(_0x2cb85d,_0x257626)=>_0x558211(_0x2cb85d,_0x257626)??findDynamicServiceDefinition(_0x2cb85d,_0x257626)});return normalizeSchemaPayload(_0x123111);}function normalizeSchemaPayload(_0x59cde6){const _0x9c4986=a80_0x116d;return{..._0x59cde6,'schemaVersion':0x2,'services':_0x59cde6[_0x9c4986(0xc7)][_0x9c4986(0xbf)](_0x3c6434=>({..._0x3c6434,'commands':_0x3c6434[_0x9c4986(0xc1)][_0x9c4986(0xbf)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x5d1ca5){const _0x36a937=a80_0x116d,_0x1206c0=_0x5d1ca5;return{..._0x5d1ca5,'auth':_0x1206c0['auth']??(_0x5d1ca5[_0x36a937(0xc8)]?'required':_0x36a937(0xbd))};}function a80_0x37df(){const _0x585a2b=['requiresAuth','60hgIsQI','service','8577vtrNGt','184156fIbPBM','16btCMVZ','has','../commands/registry.js','none','filter','map','435750RwqNCU','commands','3PFAzxY','1126065ErCvzT','21932OmgsEz','508795KGRQzC','297826tiuoyY','services'];a80_0x37df=function(){return _0x585a2b;};return a80_0x37df();}
@@ -1 +1 @@
1
- (function(_0x493612,_0x13fa3b){var _0x22c0af=a72_0x45af,_0x53f52f=_0x493612();while(!![]){try{var _0x321c92=-parseInt(_0x22c0af(0xfc))/0x1*(-parseInt(_0x22c0af(0x103))/0x2)+parseInt(_0x22c0af(0x100))/0x3*(-parseInt(_0x22c0af(0xff))/0x4)+parseInt(_0x22c0af(0xfe))/0x5*(parseInt(_0x22c0af(0x106))/0x6)+-parseInt(_0x22c0af(0xfd))/0x7+-parseInt(_0x22c0af(0x105))/0x8+parseInt(_0x22c0af(0x102))/0x9+-parseInt(_0x22c0af(0x104))/0xa*(-parseInt(_0x22c0af(0x101))/0xb);if(_0x321c92===_0x13fa3b)break;else _0x53f52f['push'](_0x53f52f['shift']());}catch(_0x1a5f16){_0x53f52f['push'](_0x53f52f['shift']());}}}(a72_0xb5aa,0x832c1));function a72_0x45af(_0x22ec7f,_0x4fec3b){_0x22ec7f=_0x22ec7f-0xfc;var _0xb5aae4=a72_0xb5aa();var _0x45af7e=_0xb5aae4[_0x22ec7f];return _0x45af7e;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a72_0xb5aa(){var _0x155495=['3539543yqKQUM','142390gOWPQb','4WatjKI','1437270toQLzb','429561SwKgEJ','8133786txaMPw','10LrbtqE','70RxPjYd','963296GgiWnw','42UPHZnu','53195DfppCt'];a72_0xb5aa=function(){return _0x155495;};return a72_0xb5aa();}
1
+ function a81_0xf19e(_0xc4286b,_0x48a09e){_0xc4286b=_0xc4286b-0xfd;var _0x356201=a81_0x3562();var _0xf19e11=_0x356201[_0xc4286b];return _0xf19e11;}(function(_0x22e73f,_0x4a653a){var _0x4fad17=a81_0xf19e,_0x462488=_0x22e73f();while(!![]){try{var _0x4f2f37=-parseInt(_0x4fad17(0xfe))/0x1+parseInt(_0x4fad17(0xff))/0x2+parseInt(_0x4fad17(0x101))/0x3+parseInt(_0x4fad17(0x100))/0x4+-parseInt(_0x4fad17(0x103))/0x5*(-parseInt(_0x4fad17(0x102))/0x6)+parseInt(_0x4fad17(0xfd))/0x7+-parseInt(_0x4fad17(0x104))/0x8*(parseInt(_0x4fad17(0x105))/0x9);if(_0x4f2f37===_0x4a653a)break;else _0x462488['push'](_0x462488['shift']());}catch(_0x67df41){_0x462488['push'](_0x462488['shift']());}}}(a81_0x3562,0xa4ab8));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a81_0x3562(){var _0x16479a=['367980wQylzn','77268wKyAYi','395sSjWFn','8pibDJk','4885533BoOYEU','367976wymaco','800335nVmKma','242626LzaSco','2815028naNomg'];a81_0x3562=function(){return _0x16479a;};return a81_0x3562();}
@@ -1 +1 @@
1
- const a73_0x35d3ce=a73_0x2d95;(function(_0x3bc863,_0x47c948){const _0x6c3f6c=a73_0x2d95,_0x3ed998=_0x3bc863();while(!![]){try{const _0x28fae7=parseInt(_0x6c3f6c(0x174))/0x1+-parseInt(_0x6c3f6c(0x171))/0x2+-parseInt(_0x6c3f6c(0x16c))/0x3+-parseInt(_0x6c3f6c(0x16a))/0x4*(parseInt(_0x6c3f6c(0x172))/0x5)+parseInt(_0x6c3f6c(0x16b))/0x6+-parseInt(_0x6c3f6c(0x16e))/0x7+-parseInt(_0x6c3f6c(0x16f))/0x8*(-parseInt(_0x6c3f6c(0x170))/0x9);if(_0x28fae7===_0x47c948)break;else _0x3ed998['push'](_0x3ed998['shift']());}catch(_0x536264){_0x3ed998['push'](_0x3ed998['shift']());}}}(a73_0x588c,0x2e8d8));function a73_0x2d95(_0x1cccc2,_0x981636){_0x1cccc2=_0x1cccc2-0x16a;const _0x588cb7=a73_0x588c();let _0x2d954d=_0x588cb7[_0x1cccc2];return _0x2d954d;}export const VERSION='2.1.2-beta.1';export const GIT_TAG=a73_0x35d3ce(0x173);export const GIT_COMMIT=a73_0x35d3ce(0x16d);function a73_0x588c(){const _0x5d18be=['2639847MWdfgb','32rOEIMI','1697985DyTCni','422702Jwgsqu','70hlAOeg','v2.1.2-beta.1','65994miIQhC','35716EKXfUY','942744wGXGJz','220860ydoZMJ','aedada9'];a73_0x588c=function(){return _0x5d18be;};return a73_0x588c();}export const BUILD_TIME='2026-07-03T12:39:12.918Z';
1
+ const a82_0x336d32=a82_0x244d;(function(_0x3e1ebb,_0x21b3ac){const _0x10c126=a82_0x244d,_0x543def=_0x3e1ebb();while(!![]){try{const _0x25919a=-parseInt(_0x10c126(0x1fe))/0x1+-parseInt(_0x10c126(0x1f5))/0x2*(-parseInt(_0x10c126(0x1fb))/0x3)+-parseInt(_0x10c126(0x1f6))/0x4*(parseInt(_0x10c126(0x1fd))/0x5)+-parseInt(_0x10c126(0x1ff))/0x6*(-parseInt(_0x10c126(0x1fa))/0x7)+-parseInt(_0x10c126(0x1f9))/0x8*(parseInt(_0x10c126(0x1f4))/0x9)+-parseInt(_0x10c126(0x1fc))/0xa+parseInt(_0x10c126(0x1f7))/0xb;if(_0x25919a===_0x21b3ac)break;else _0x543def['push'](_0x543def['shift']());}catch(_0x517aff){_0x543def['push'](_0x543def['shift']());}}}(a82_0x3940,0xb5482));function a82_0x3940(){const _0x48c507=['5265sFzHhj','690732NxxDAT','18732RTsAHO','2026-07-04T02:17:51.702Z','258183yQUOMA','2jryTHQ','4212jhEjPr','21599138FlnJDI','0dfd4b3','128qmHFfF','518IOTSSR','3613887zrhJjO','3981520XQHicH'];a82_0x3940=function(){return _0x48c507;};return a82_0x3940();}export const VERSION='2.1.3-beta.1';function a82_0x244d(_0x2ced4b,_0x2b67d7){_0x2ced4b=_0x2ced4b-0x1f3;const _0x394047=a82_0x3940();let _0x244d5b=_0x394047[_0x2ced4b];return _0x244d5b;}export const GIT_TAG='v2.1.3-beta.1';export const GIT_COMMIT=a82_0x336d32(0x1f8);export const BUILD_TIME=a82_0x336d32(0x1f3);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x522ca0,_0x301c5d){const _0x4f28a7=a74_0x1c07,_0x2878d7=_0x522ca0();while(!![]){try{const _0x487c49=-parseInt(_0x4f28a7(0x13f))/0x1+parseInt(_0x4f28a7(0x137))/0x2*(-parseInt(_0x4f28a7(0x133))/0x3)+-parseInt(_0x4f28a7(0x13e))/0x4*(-parseInt(_0x4f28a7(0x134))/0x5)+parseInt(_0x4f28a7(0x135))/0x6+-parseInt(_0x4f28a7(0x139))/0x7*(parseInt(_0x4f28a7(0x13b))/0x8)+parseInt(_0x4f28a7(0x13d))/0x9*(parseInt(_0x4f28a7(0x13a))/0xa)+parseInt(_0x4f28a7(0x131))/0xb*(parseInt(_0x4f28a7(0x138))/0xc);if(_0x487c49===_0x301c5d)break;else _0x2878d7['push'](_0x2878d7['shift']());}catch(_0x19ab3f){_0x2878d7['push'](_0x2878d7['shift']());}}}(a74_0x4294,0x8e7bc));import{jsx as a74_0xa5217f,jsxs as a74_0x11cb1f}from'react/jsx-runtime';function a74_0x1c07(_0x1fc712,_0x1d4686){_0x1fc712=_0x1fc712-0x130;const _0x4294a4=a74_0x4294();let _0x1c07c4=_0x4294a4[_0x1fc712];return _0x1c07c4;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a74_0x4294(){const _0x50c592=['438516WkuiZj','147WNfsNq','3097660JXSRDc','427048Urdbgn','\x20--help','18sWLyhw','24148JMlwII','438476tPLJUO','\x20\x20Use\x20','253juykXB','column','665727kPflQC','585iQvDpj','1191888bIxzuq','green','2WDxqZx'];a74_0x4294=function(){return _0x50c592;};return a74_0x4294();}export function Help(){const _0x1ced6a=a74_0x1c07,{exit:_0x537d05}=useApp();return useEffect(()=>{_0x537d05();},[_0x537d05]),a74_0x11cb1f(Box,{'flexDirection':_0x1ced6a(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a74_0xa5217f(Box,{'children':a74_0xa5217f(Text,{'bold':!![],'color':_0x1ced6a(0x136),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a74_0x11cb1f(Box,{'marginTop':0x1,'children':[a74_0xa5217f(Text,{'dimColor':!![],'children':_0x1ced6a(0x130)}),a74_0xa5217f(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x1ced6a(0x13c)}),a74_0xa5217f(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x20b88b,_0x3ea441){const _0x5a29e1=a83_0x5854,_0x4347b4=_0x20b88b();while(!![]){try{const _0x3fd0b4=parseInt(_0x5a29e1(0x152))/0x1+-parseInt(_0x5a29e1(0x15a))/0x2*(-parseInt(_0x5a29e1(0x15b))/0x3)+parseInt(_0x5a29e1(0x156))/0x4*(parseInt(_0x5a29e1(0x158))/0x5)+-parseInt(_0x5a29e1(0x15c))/0x6*(-parseInt(_0x5a29e1(0x153))/0x7)+-parseInt(_0x5a29e1(0x151))/0x8+parseInt(_0x5a29e1(0x154))/0x9+-parseInt(_0x5a29e1(0x14f))/0xa;if(_0x3fd0b4===_0x3ea441)break;else _0x4347b4['push'](_0x4347b4['shift']());}catch(_0x5db574){_0x4347b4['push'](_0x4347b4['shift']());}}}(a83_0xebc2,0xd3066));import{jsx as a83_0x4b5f6a,jsxs as a83_0x46d577}from'react/jsx-runtime';function a83_0x5854(_0x4cb4e5,_0x663fba){_0x4cb4e5=_0x4cb4e5-0x14f;const _0xebc29b=a83_0xebc2();let _0x585485=_0xebc29b[_0x4cb4e5];return _0x585485;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a83_0xebc2(){const _0x4e7447=['\x20\x20Use\x20','136198sQdjKd','6BfNNWB','84ziLMUN','4862150Tiwedb','\x20--help','9626880glnaBd','298358REVzSl','215726tkqXUV','12912183aRgeLJ','green','4GaodTF','\x20to\x20view\x20available\x20commands.','1266190WvIegF'];a83_0xebc2=function(){return _0x4e7447;};return a83_0xebc2();}export function Help(){const _0x2e9992=a83_0x5854,{exit:_0xb6966b}=useApp();return useEffect(()=>{_0xb6966b();},[_0xb6966b]),a83_0x46d577(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a83_0x4b5f6a(Box,{'children':a83_0x4b5f6a(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x46d577(Box,{'marginTop':0x1,'children':[a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x159)}),a83_0x4b5f6a(Text,{'bold':!![],'color':_0x2e9992(0x155),'children':CLI_BIN_NAME+_0x2e9992(0x150)}),a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x157)})]})]});}
@@ -1 +1 @@
1
- function a75_0x83fc(_0x17423e,_0x42c759){_0x17423e=_0x17423e-0x1dc;const _0x37368b=a75_0x3736();let _0x83fce7=_0x37368b[_0x17423e];return _0x83fce7;}const a75_0x44408c=a75_0x83fc;(function(_0x1287cf,_0x1899c9){const _0x2f0da8=a75_0x83fc,_0x1e036c=_0x1287cf();while(!![]){try{const _0x1f6c5e=parseInt(_0x2f0da8(0x1dc))/0x1+-parseInt(_0x2f0da8(0x1ea))/0x2+-parseInt(_0x2f0da8(0x1ee))/0x3*(parseInt(_0x2f0da8(0x1f0))/0x4)+parseInt(_0x2f0da8(0x1f1))/0x5*(parseInt(_0x2f0da8(0x1e4))/0x6)+parseInt(_0x2f0da8(0x1f2))/0x7+parseInt(_0x2f0da8(0x1de))/0x8*(-parseInt(_0x2f0da8(0x1df))/0x9)+-parseInt(_0x2f0da8(0x1dd))/0xa;if(_0x1f6c5e===_0x1899c9)break;else _0x1e036c['push'](_0x1e036c['shift']());}catch(_0x4c7486){_0x1e036c['push'](_0x1e036c['shift']());}}}(a75_0x3736,0x370f3));import{spawnSync}from'node:child_process';function a75_0x3736(){const _0x47a4bd=['15VRfoAD','2465267MyFFPM','inherit','305496ZSkPep','1640180CEHEPm','16vcbBik','1016343hhdARO','toString','stdio','stdout','status','704082lGprSl','pipe','npx','trim','unknown','log','625956qnCgwT','skills','stderr','skipNpxSkillsEnvSuffix','8415uaXyLW','add','116wBKpUl'];a75_0x3736=function(){return _0x47a4bd;};return a75_0x3736();}import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a75_0x15d29b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a75_0x15d29b;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a75_0x44408c(0x1ed)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x59cef8,_0x19b598=LOVRABET_SKILL_SOURCE,_0x42895f){const _0x27ce87=a75_0x44408c;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x40bc2e=_0x42895f?.[_0x27ce87(0x1e1)]??_0x27ce87(0x1f3),_0x5ca228=resolveNpmBin(_0x27ce87(0x1e6)),_0x2c9e92=[_0x27ce87(0x1eb),_0x27ce87(0x1ef),_0x19b598,'-g','-y'],_0x3d2826=[_0x5ca228,..._0x2c9e92]['join']('\x20');console[_0x27ce87(0x1e9)]('*\x20'+_0x3d2826);const _0x15ac7b=spawnSync(_0x5ca228,_0x2c9e92,{'cwd':_0x59cef8,'stdio':_0x40bc2e,'env':process.env,'shell':![]});if(_0x15ac7b['status']===0x0)return{'ok':!![],'status':0x0};let _0x4018ce='exit\x20'+(_0x15ac7b[_0x27ce87(0x1e3)]??_0x27ce87(0x1e8));if(_0x40bc2e===_0x27ce87(0x1e5)){const _0x67b887=_0x15ac7b[_0x27ce87(0x1ec)]?_0x15ac7b['stderr'][_0x27ce87(0x1e0)]()[_0x27ce87(0x1e7)]():'',_0x440c23=_0x15ac7b[_0x27ce87(0x1e2)]?_0x15ac7b[_0x27ce87(0x1e2)][_0x27ce87(0x1e0)]()['trim']():'';if(_0x67b887)_0x4018ce=_0x67b887;else{if(_0x440c23)_0x4018ce=_0x440c23;}}return{'ok':![],'status':_0x15ac7b[_0x27ce87(0x1e3)]??null,'error':_0x4018ce};}
1
+ (function(_0x482674,_0x1f616){const _0x2280e5=a84_0x177f,_0x506668=_0x482674();while(!![]){try{const _0x5b0177=-parseInt(_0x2280e5(0x184))/0x1+-parseInt(_0x2280e5(0x190))/0x2*(-parseInt(_0x2280e5(0x192))/0x3)+-parseInt(_0x2280e5(0x18b))/0x4*(parseInt(_0x2280e5(0x183))/0x5)+-parseInt(_0x2280e5(0x18a))/0x6+parseInt(_0x2280e5(0x18f))/0x7+parseInt(_0x2280e5(0x196))/0x8*(-parseInt(_0x2280e5(0x18c))/0x9)+parseInt(_0x2280e5(0x181))/0xa*(parseInt(_0x2280e5(0x193))/0xb);if(_0x5b0177===_0x1f616)break;else _0x506668['push'](_0x506668['shift']());}catch(_0x785e11){_0x506668['push'](_0x506668['shift']());}}}(a84_0x1065,0x8d935));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a84_0x1065(){const _0x3a221c=['34011VOyWCt','pipe','log','5399884qblPXO','87022IkdVoE','toString','21LbbTBg','143tDcLri','status','exit\x20','1480lGvdyH','inherit','stdio','1541270FOnGQB','stderr','538655dhvdKr','605889jHwxcQ','skills','unknown','stdout','add','trim','6522072UEHYEX','4hSuWCb'];a84_0x1065=function(){return _0x3a221c;};return a84_0x1065();}import{LOVRABET_SKILL_SOURCE as a84_0x3c906b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a84_0x177f(_0x5063c0,_0x5a2e90){_0x5063c0=_0x5063c0-0x181;const _0x106538=a84_0x1065();let _0x177f80=_0x106538[_0x5063c0];return _0x177f80;}export const LOVRABET_SKILL_SOURCE=a84_0x3c906b;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5385d5,_0x412881=LOVRABET_SKILL_SOURCE,_0x14ce29){const _0x13dff6=a84_0x177f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2239ee=_0x14ce29?.[_0x13dff6(0x198)]??_0x13dff6(0x197),_0x215815=resolveNpmBin('npx'),_0x428b4b=[_0x13dff6(0x185),_0x13dff6(0x188),_0x412881,'-g','-y'],_0x519dca=[_0x215815,..._0x428b4b]['join']('\x20');console[_0x13dff6(0x18e)]('*\x20'+_0x519dca);const _0x26cbf4=spawnSync(_0x215815,_0x428b4b,{'cwd':_0x5385d5,'stdio':_0x2239ee,'env':process.env,'shell':![]});if(_0x26cbf4['status']===0x0)return{'ok':!![],'status':0x0};let _0x3e7ff0=_0x13dff6(0x195)+(_0x26cbf4['status']??_0x13dff6(0x186));if(_0x2239ee===_0x13dff6(0x18d)){const _0x124973=_0x26cbf4[_0x13dff6(0x182)]?_0x26cbf4[_0x13dff6(0x182)]['toString']()[_0x13dff6(0x189)]():'',_0x36232a=_0x26cbf4[_0x13dff6(0x187)]?_0x26cbf4[_0x13dff6(0x187)][_0x13dff6(0x191)]()[_0x13dff6(0x189)]():'';if(_0x124973)_0x3e7ff0=_0x124973;else{if(_0x36232a)_0x3e7ff0=_0x36232a;}}return{'ok':![],'status':_0x26cbf4[_0x13dff6(0x194)]??null,'error':_0x3e7ff0};}
@@ -0,0 +1 @@
1
+ const a85_0x152b48=a85_0x1b7b;(function(_0x2be32d,_0x11dd6d){const _0x3ed165=a85_0x1b7b,_0x3a09af=_0x2be32d();while(!![]){try{const _0x39df81=-parseInt(_0x3ed165(0xea))/0x1+-parseInt(_0x3ed165(0xf2))/0x2*(-parseInt(_0x3ed165(0xf6))/0x3)+-parseInt(_0x3ed165(0xf1))/0x4*(parseInt(_0x3ed165(0xe8))/0x5)+-parseInt(_0x3ed165(0xe9))/0x6+-parseInt(_0x3ed165(0xeb))/0x7*(parseInt(_0x3ed165(0xf4))/0x8)+-parseInt(_0x3ed165(0xf9))/0x9+parseInt(_0x3ed165(0xf7))/0xa;if(_0x39df81===_0x11dd6d)break;else _0x3a09af['push'](_0x3a09af['shift']());}catch(_0x4c4f94){_0x3a09af['push'](_0x3a09af['shift']());}}}(a85_0x1027,0xd6044));export const METADATA_FILE=a85_0x152b48(0xf8);export const SKILL_FILE='SKILL.md';export const MAX_SKILL_FILE_COUNT=0xc8;export const MAX_SKILL_FILE_BYTES=0x100*0x400;export const MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400;export const MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400;export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a85_0x152b48(0xec)]);function a85_0x1027(){const _0x105993=['7413xKDruz','24698210hRjIIi','lovrabet.skill.json','1896399NRnray','.svn','505iPfZbl','600426IcrnID','613493PvleSQ','6765983KaMALt','.DS_Store','.cache','build','coverage','dist','26672RoPAql','786oQLgVt','.turbo','8HyCWSD','node_modules'];a85_0x1027=function(){return _0x105993;};return a85_0x1027();}function a85_0x1b7b(_0x1fe066,_0x440310){_0x1fe066=_0x1fe066-0xe7;const _0x1027ac=a85_0x1027();let _0x1b7be3=_0x1027ac[_0x1fe066];return _0x1b7be3;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a85_0x152b48(0xe7),a85_0x152b48(0xf5),'.next',a85_0x152b48(0xf0),a85_0x152b48(0xee),a85_0x152b48(0xef),a85_0x152b48(0xf3),a85_0x152b48(0xed)]);
@@ -0,0 +1 @@
1
+ (function(_0x92362c,_0x8f61ee){const _0x32338c=a86_0xc44b,_0x1d0f75=_0x92362c();while(!![]){try{const _0x5c4122=parseInt(_0x32338c(0x190))/0x1*(-parseInt(_0x32338c(0x18c))/0x2)+-parseInt(_0x32338c(0x198))/0x3+parseInt(_0x32338c(0x18d))/0x4*(parseInt(_0x32338c(0x193))/0x5)+-parseInt(_0x32338c(0x18a))/0x6*(-parseInt(_0x32338c(0x197))/0x7)+-parseInt(_0x32338c(0x186))/0x8*(-parseInt(_0x32338c(0x195))/0x9)+parseInt(_0x32338c(0x192))/0xa+-parseInt(_0x32338c(0x191))/0xb*(parseInt(_0x32338c(0x18f))/0xc);if(_0x5c4122===_0x8f61ee)break;else _0x1d0f75['push'](_0x1d0f75['shift']());}catch(_0xc2d92a){_0x1d0f75['push'](_0x1d0f75['shift']());}}}(a86_0x3e3e,0x7226e));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a86_0xc44b(_0x3be67d,_0x4ec175){_0x3be67d=_0x3be67d-0x184;const _0x3e3ee0=a86_0x3e3e();let _0xc44bbc=_0x3e3ee0[_0x3be67d];return _0xc44bbc;}function a86_0x3e3e(){const _0x5d9941=['stringify','split','Unsafe\x20Skill\x20file\x20path:\x20','2074206zUQAUW','isSymbolicLink','8zHrfzj','4eQgcQb','utf8','19922748SHsTKb','19355MExyOh','11AnRLEx','9024330xmAlcU','3251890wQShbB','startsWith','1755VoTSdV','from','7zDJLSn','552921RuhLgu','validation','endsWith','.tmp','20144FedmqB'];a86_0x3e3e=function(){return _0x5d9941;};return a86_0x3e3e();}import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0xd69d5,_0x362eaf){const _0x9a225f=a86_0xc44b,_0x230517=normalizeSkillRelativePath(_0x362eaf),_0x428b5d=realOrResolved(_0xd69d5),_0x5792a3=resolve(_0x428b5d,..._0x230517[_0x9a225f(0x188)]('/'));if(!isPathInside(_0x5792a3,_0x428b5d))throw CliErrors[_0x9a225f(0x199)](_0x9a225f(0x189)+_0x362eaf);return ensureNoSymlinkInManagedPath(_0x428b5d,_0x230517),_0x5792a3;}export function ensureNoSymlinkInManagedPath(_0x59010a,_0x20ba8c){const _0xe75f00=a86_0xc44b;let _0x57cea0=_0x59010a;for(const _0x1b60d7 of _0x20ba8c[_0xe75f00(0x188)]('/')){_0x57cea0=resolve(_0x57cea0,_0x1b60d7);const _0x4a120b=lstatIfPresent(_0x57cea0);if(_0x4a120b?.[_0xe75f00(0x18b)]())throw CliErrors[_0xe75f00(0x199)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x20ba8c);}}export function isDanglingSymlink(_0x406d2f){const _0x5d1bbf=a86_0xc44b;try{return lstatSync(_0x406d2f)[_0x5d1bbf(0x18b)]();}catch{return![];}}export function resolveSymlinkTarget(_0x47fd9e){const _0x483ee1=readlinkSync(_0x47fd9e);return isAbsolute(_0x483ee1)?_0x483ee1:resolve(dirname(_0x47fd9e),_0x483ee1);}export function isPathInside(_0x414112,_0x4957f0){const _0x2a0262=a86_0xc44b,_0x328eca=_0x414112[_0x2a0262(0x184)](sep)?_0x414112:''+_0x414112+sep,_0x3c17cd=_0x4957f0['endsWith'](sep)?_0x4957f0:''+_0x4957f0+sep;return _0x414112===_0x4957f0||_0x328eca[_0x2a0262(0x194)](_0x3c17cd);}export function realOrResolved(_0x1392d2){try{return realpathSync(_0x1392d2);}catch{return resolve(_0x1392d2);}}export function lstatIfPresent(_0x53a8f7){try{return lstatSync(_0x53a8f7);}catch{return undefined;}}export function writeTextAtomic(_0x2f306d,_0x257c54,_0x30461e){const _0x1eff84=a86_0xc44b;writeBytesAtomic(_0x2f306d,Buffer[_0x1eff84(0x196)](_0x257c54,_0x1eff84(0x18e)),_0x30461e);}export function writeBytesAtomic(_0x3a032f,_0x524ce6,_0xf7769f){const _0x3af225=a86_0xc44b,_0x9081aa=_0x3a032f+_0x3af225(0x185);try{writeFileSync(_0x9081aa,_0x524ce6,{'mode':_0xf7769f}),renameSync(_0x9081aa,_0x3a032f);}catch(_0x14e4c9){try{rmSync(_0x9081aa,{'force':!![]});}catch{}throw _0x14e4c9;}}export function writeJsonAtomic(_0x29026f,_0x494c8f){const _0x24e929=a86_0xc44b;writeTextAtomic(_0x29026f,JSON[_0x24e929(0x187)](_0x494c8f,null,0x2)+'\x0a',0x180);}
@@ -0,0 +1 @@
1
+ (function(_0xb4b1cb,_0x1ca13e){const _0x28ca9b=a87_0x4d23,_0x271282=_0xb4b1cb();while(!![]){try{const _0x1e5094=-parseInt(_0x28ca9b(0x1cd))/0x1+-parseInt(_0x28ca9b(0x1cc))/0x2+-parseInt(_0x28ca9b(0x1c7))/0x3+parseInt(_0x28ca9b(0x1c3))/0x4*(-parseInt(_0x28ca9b(0x1d0))/0x5)+-parseInt(_0x28ca9b(0x1ce))/0x6+-parseInt(_0x28ca9b(0x1ca))/0x7*(parseInt(_0x28ca9b(0x1c4))/0x8)+parseInt(_0x28ca9b(0x1c9))/0x9;if(_0x1e5094===_0x1ca13e)break;else _0x271282['push'](_0x271282['shift']());}catch(_0xf06d1e){_0x271282['push'](_0x271282['shift']());}}}(a87_0x3cc7,0x9cd80));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a87_0x4d23(_0x48f008,_0x586ad9){_0x48f008=_0x48f008-0x1c3;const _0x3cc7d8=a87_0x3cc7();let _0x4d2397=_0x3cc7d8[_0x48f008];return _0x4d2397;}function a87_0x3cc7(){const _0x248dd2=['24776hOzTUj','hex','sha256','862464WVIrCI','digest','41342058ZIiigO','1561jgyCLe','path','1240604uSdbfn','905854sUQLgQ','4478232sYEeTm','update','3502415rzIvEP','4boxEUF'];a87_0x3cc7=function(){return _0x248dd2;};return a87_0x3cc7();}export function contentHash(_0x2bba7a){const _0x193054=a87_0x4d23;return createHash('sha256')[_0x193054(0x1cf)](_0x2bba7a)['digest'](_0x193054(0x1c5));}export function fileHash(_0x4b3332){return bufferSha256(fileContent(_0x4b3332));}export function bufferSha256(_0x2a5275){const _0x470de4=a87_0x4d23;return createHash(_0x470de4(0x1c6))[_0x470de4(0x1cf)](_0x2a5275)['digest'](_0x470de4(0x1c5));}export function fileTreeHash(_0x26313a){const _0x2a6774=a87_0x4d23,_0x171bd0=createHash(_0x2a6774(0x1c6));for(const _0x3949a8 of normalizeManifestFiles(_0x26313a)){_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1cb)]),_0x171bd0[_0x2a6774(0x1cf)]('\x00'),_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1c6)]),_0x171bd0['update']('\x00'),_0x171bd0[_0x2a6774(0x1cf)](String(_0x3949a8['size'])),_0x171bd0[_0x2a6774(0x1cf)]('\x00');}return _0x171bd0[_0x2a6774(0x1c8)]('hex');}
@@ -0,0 +1 @@
1
+ (function(_0x367f5d,_0x1073bd){const _0x162b24=a88_0xbaf0,_0x52c87d=_0x367f5d();while(!![]){try{const _0x31d317=parseInt(_0x162b24(0xb2))/0x1*(parseInt(_0x162b24(0xa3))/0x2)+-parseInt(_0x162b24(0xa8))/0x3+-parseInt(_0x162b24(0xa5))/0x4*(parseInt(_0x162b24(0xba))/0x5)+-parseInt(_0x162b24(0x98))/0x6+parseInt(_0x162b24(0xbc))/0x7*(-parseInt(_0x162b24(0xb6))/0x8)+parseInt(_0x162b24(0xac))/0x9*(-parseInt(_0x162b24(0xb7))/0xa)+-parseInt(_0x162b24(0xbb))/0xb*(-parseInt(_0x162b24(0x8e))/0xc);if(_0x31d317===_0x1073bd)break;else _0x52c87d['push'](_0x52c87d['shift']());}catch(_0x9b5608){_0x52c87d['push'](_0x52c87d['shift']());}}}(a88_0x52b9,0x52e11));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a88_0x52b9(){const _0x3ed63f=['trim','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','pruneSkillCodes','not-managed-symlink','skill','name','activeSkillCodes','30798ksQXsh','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isSymbolicLink','scopes','set','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','accessKey','company','contentHash','skillCode','22KRHgLh','skipped','563924rpGvqa','updated','env','1795257oizWTK','appCode','startsWith','isDirectory','4953204oHCyEv','dir','has','personal','claudeSkillsDir','validation','5632bpIZKh','length','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','8MjCqmp','10GdoXWy','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','agentsSkillsDir','10TGoKWH','12870748hcnzyC','4387215ADIXZR','filter','push','24cCwxNr','scope','map'];a88_0x52b9=function(){return _0x3ed63f;};return a88_0x52b9();}import{basename,dirname,resolve}from'node:path';import{copySync,ensureDirSync,removeSync}from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';export function linkEffectiveRuntimeSkills(_0x4d681a,_0x1474b7,_0x9630a9={}){const _0x1baecc=a88_0xbaf0,_0x4a08ae=new Map();for(const _0x9a82d2 of _0x4d681a){const _0x17fd95=_0x9a82d2[_0x1baecc(0x95)][_0x1baecc(0xa2)];if(!_0x17fd95)continue;const _0x211549=_0x4a08ae['get'](_0x17fd95);(!_0x211549||_0x9a82d2[_0x1baecc(0x8f)]===_0x1baecc(0xaf))&&_0x4a08ae[_0x1baecc(0x9c)](_0x17fd95,_0x9a82d2);}const _0x37eb57=[],_0x498ac9=resolveSkillSyncPaths(_0x9630a9);for(const _0x495a0c of _0x4a08ae['values']()){const _0x269517=requireSkillCode(_0x495a0c[_0x1baecc(0x95)]),_0x817a97=_0x1474b7+'--'+_0x269517;for(const _0x122d9f of[_0x498ac9[_0x1baecc(0xb9)],_0x498ac9['claudeSkillsDir']]){_0x37eb57['push'](ensureManagedSymlink(resolve(_0x122d9f,_0x817a97),_0x495a0c[_0x1baecc(0xad)],_0x498ac9['managedRoot']));}}return _0x37eb57;}export function pruneStaleRuntimeSkillLinks(_0x109394,_0x190609,_0x320199={},_0x18cc71){const _0x3b8dfb=a88_0xbaf0,_0x19f52c=resolveSkillSyncPaths(_0x320199),_0x4b4a0e=new Set([..._0x190609][_0x3b8dfb(0x90)](_0xdcb5fb=>_0xdcb5fb[_0x3b8dfb(0x91)]())[_0x3b8dfb(0xbd)](Boolean)),_0x4aaa3f=_0x18cc71?new Set([..._0x18cc71]['map'](_0x4afd74=>_0x4afd74[_0x3b8dfb(0x91)]())['filter'](Boolean)):undefined,_0xcab3cd=[];for(const _0x198a42 of[_0x19f52c[_0x3b8dfb(0xb9)],_0x19f52c[_0x3b8dfb(0xb0)]]){for(const _0x14e2cb of managedAppSkillLinkPaths(_0x198a42,_0x109394)){const _0x153bd4=basename(_0x14e2cb)['slice']((_0x109394+'--')[_0x3b8dfb(0xb3)]);if(_0x4aaa3f&&!_0x4aaa3f['has'](_0x153bd4))continue;if(_0x4b4a0e[_0x3b8dfb(0xae)](_0x153bd4))continue;_0xcab3cd[_0x3b8dfb(0xbe)](removeManagedSkillLink(_0x14e2cb,_0x19f52c['managedRoot']));}}return _0xcab3cd;}export function pruneStaleRuntimeSkillCache(_0x13cdb8,_0x136929={}){const _0x4d5f0c=a88_0xbaf0,_0x2720e4=new Set([..._0x13cdb8[_0x4d5f0c(0x97)]][_0x4d5f0c(0x90)](_0x2005b5=>_0x2005b5['trim']())[_0x4d5f0c(0xbd)](Boolean)),_0x2d5631=_0x13cdb8[_0x4d5f0c(0x93)]?new Set([..._0x13cdb8[_0x4d5f0c(0x93)]][_0x4d5f0c(0x90)](_0x346557=>_0x346557[_0x4d5f0c(0x91)]())[_0x4d5f0c(0xbd)](Boolean)):undefined,_0x18e56e=_0x13cdb8[_0x4d5f0c(0x9b)]??[_0x4d5f0c(0xaf),_0x4d5f0c(0xa0)],_0x2841c0=resolve(getRuntimeSkillCacheRoot(_0x13cdb8[_0x4d5f0c(0xa7)],_0x13cdb8[_0x4d5f0c(0x9f)],_0x136929),safePathSegment(_0x13cdb8['appCode'],'appCode')),_0x17ac2a=[];for(const _0x1a8614 of _0x18e56e){const _0x1c403e=resolve(_0x2841c0,_0x1a8614);if(!existsSync(_0x1c403e))continue;for(const _0x36ad5c of readdirSync(_0x1c403e,{'withFileTypes':!![]})){if(!_0x36ad5c[_0x4d5f0c(0xab)]())continue;const _0x3dd4de=_0x36ad5c[_0x4d5f0c(0x96)];if(_0x2d5631&&!_0x2d5631[_0x4d5f0c(0xae)](_0x3dd4de))continue;if(_0x2720e4[_0x4d5f0c(0xae)](_0x3dd4de))continue;const _0x74208=resolve(_0x1c403e,_0x3dd4de),_0x209fdf=readMetadataIfPresent(resolve(_0x74208,METADATA_FILE));if(_0x209fdf?.[_0x4d5f0c(0xa9)]!==_0x13cdb8[_0x4d5f0c(0xa9)]||_0x209fdf[_0x4d5f0c(0x8f)]!==_0x1a8614||_0x209fdf[_0x4d5f0c(0xa2)]!==_0x3dd4de){_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':_0x4d5f0c(0xa4),'reason':'metadata-mismatch'});continue;}removeSync(_0x74208),_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':'removed'});}}return _0x17ac2a;}export function linkGlobalRuntimeSkills(_0x15072e,_0x1efbc4={}){const _0x1494c6=a88_0xbaf0,_0x16a953=resolveSkillSyncPaths(_0x1efbc4),_0x397801=[];for(const _0x4cf897 of _0x15072e){if(_0x4cf897[_0x1494c6(0x8f)]!=='builtin')throw CliErrors[_0x1494c6(0xb1)](_0x1494c6(0x99)+_0x4cf897[_0x1494c6(0x8f)]);const _0x1d1b43=requireSkillCode(_0x4cf897[_0x1494c6(0x95)]),_0x502c02=copyManagedSkillDirectory(_0x4cf897[_0x1494c6(0xad)],resolve(_0x16a953[_0x1494c6(0xb9)],_0x1d1b43));_0x397801[_0x1494c6(0xbe)]({..._0x502c02,'contentHash':_0x4cf897['contentHash']});}return _0x397801;}function ensureManagedSymlink(_0x377097,_0x1ae5e1,_0x2d4210){const _0x6c84cc=a88_0xbaf0;mkdirSync(dirname(_0x377097),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x377097)||isDanglingSymlink(_0x377097)){const _0x12404c=lstatSync(_0x377097);if(!_0x12404c[_0x6c84cc(0x9a)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x377097);const _0x40e29b=resolveSymlinkTarget(_0x377097);if(!isPathInside(realOrResolved(_0x40e29b),realOrResolved(_0x2d4210)))throw CliErrors[_0x6c84cc(0xb1)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x377097);if(realOrResolved(_0x40e29b)===realOrResolved(_0x1ae5e1))return{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0x9d)};return unlinkSync(_0x377097),symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0xa6)};}return symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':'created'};}function a88_0xbaf0(_0x534465,_0x45a4f8){_0x534465=_0x534465-0x8e;const _0x52b9fd=a88_0x52b9();let _0xbaf0f8=_0x52b9fd[_0x534465];return _0xbaf0f8;}function managedAppSkillLinkPaths(_0x427a73,_0x37c6d5){const _0x36f9bd=a88_0xbaf0;if(!existsSync(_0x427a73))return[];const _0xb236a7=_0x37c6d5+'--';return readdirSync(_0x427a73,{'withFileTypes':!![]})[_0x36f9bd(0xbd)](_0x421b2d=>_0x421b2d[_0x36f9bd(0x96)][_0x36f9bd(0xaa)](_0xb236a7))[_0x36f9bd(0x90)](_0x5b5332=>resolve(_0x427a73,_0x5b5332[_0x36f9bd(0x96)]));}function removeManagedSkillLink(_0x139422,_0x2e1e0d){const _0xec8228=a88_0xbaf0,_0x19b0c3=lstatIfPresent(_0x139422);if(!_0x19b0c3?.[_0xec8228(0x9a)]())return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':_0xec8228(0x94)};const _0x1aed14=resolveSymlinkTarget(_0x139422);if(!isPathInside(realOrResolved(_0x1aed14),realOrResolved(_0x2e1e0d)))return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':'external-symlink'};return unlinkSync(_0x139422),{'path':_0x139422,'action':_0xec8228(0xb5)};}export function copyManagedSkillDirectory(_0xbede47,_0x5582be){const _0x4a4fef=a88_0xbaf0,_0x2f81a5=resolve(_0x5582be,METADATA_FILE),_0x29c79c=existsSync(_0x5582be);if(_0x29c79c){const _0x5e8c38=lstatSync(_0x5582be);if(_0x5e8c38['isSymbolicLink']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0xb8)+_0x5582be);if(!_0x5e8c38['isDirectory']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x9e)+_0x5582be);const _0x558b43=readMetadataIfPresent(_0x2f81a5);if(_0x558b43?.[_0x4a4fef(0x8f)]!=='builtin')throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x92)+_0x5582be);}ensureDirSync(dirname(_0x5582be));const _0x2d1e75=_0x29c79c?readMetadataIfPresent(_0x2f81a5)?.[_0x4a4fef(0xa1)]:undefined,_0x4478ae=readMetadataIfPresent(resolve(_0xbede47,METADATA_FILE))?.['contentHash'];return _0x29c79c&&removeSync(_0x5582be),copySkillDirectory(_0xbede47,_0x5582be),{'path':_0x5582be,'target':_0xbede47,'action':!_0x29c79c?'created':_0x2d1e75===_0x4478ae?_0x4a4fef(0x9d):_0x4a4fef(0xa6)};}function copySkillDirectory(_0x4f8b99,_0x1c9c3f){copySync(_0x4f8b99,_0x1c9c3f,{'dereference':![],'overwrite':!![],'filter'(_0xfc14d4){const _0x1fe8f0=a88_0xbaf0;if(lstatSync(_0xfc14d4)[_0x1fe8f0(0x9a)]())throw CliErrors[_0x1fe8f0(0xb1)](_0x1fe8f0(0xb4)+_0xfc14d4);return!![];}});}
@@ -0,0 +1 @@
1
+ (function(_0x5ddd22,_0x12f2e5){const _0x3a553d=a89_0x2fab,_0x59e54f=_0x5ddd22();while(!![]){try{const _0x181b8f=-parseInt(_0x3a553d(0x121))/0x1+parseInt(_0x3a553d(0x127))/0x2*(-parseInt(_0x3a553d(0x13d))/0x3)+-parseInt(_0x3a553d(0x143))/0x4*(-parseInt(_0x3a553d(0x13b))/0x5)+parseInt(_0x3a553d(0x144))/0x6*(parseInt(_0x3a553d(0x148))/0x7)+-parseInt(_0x3a553d(0x13f))/0x8*(-parseInt(_0x3a553d(0x145))/0x9)+-parseInt(_0x3a553d(0x137))/0xa+-parseInt(_0x3a553d(0x125))/0xb*(parseInt(_0x3a553d(0x126))/0xc);if(_0x181b8f===_0x12f2e5)break;else _0x59e54f['push'](_0x59e54f['shift']());}catch(_0x92b9bc){_0x59e54f['push'](_0x59e54f['shift']());}}}(a89_0x2246,0x3f73c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a89_0x2246(){const _0x50cf95=['env','linkedPath','isArray','140720NNpDRS','values','cache','isDirectory','11gESbLc','983520DChzPP','994622YOxxjs','skillCode','isSymbolicLink','accessKey','builtin','has','source','dir','includes','linkedPaths','tags','scopes','claudeSkillsDir','filter','appCode','push','218990hfXkUy','metadataPath','code','map','770435kdEyWM','sort','3FIGHBu','scope','88NdGfex','trim','localeCompare','agentsSkillsDir','12MlwYyZ','16494dOBbTc','47826WsHQrv','name','cacheDir','1225YCTihg'];a89_0x2246=function(){return _0x50cf95;};return a89_0x2246();}function a89_0x2fab(_0x18b00e,_0x380ae4){_0x18b00e=_0x18b00e-0x11e;const _0x2246dc=a89_0x2246();let _0x2fab54=_0x2246dc[_0x18b00e];return _0x2fab54;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x40a65c,_0xee695a={}){const _0x1f2d75=a89_0x2fab,_0x29d085=safePathSegment(_0x40a65c[_0x1f2d75(0x135)],_0x1f2d75(0x135)),_0x54f4dc=normalizeRuntimeSkillScopes(_0x40a65c[_0x1f2d75(0x132)]),_0x1ed836=new Set(_0x54f4dc),_0x263a27=_0x40a65c[_0x1f2d75(0x139)]?.[_0x1f2d75(0x140)](),_0xbe9f34=new Map(),_0x3c3ffb=resolve(getRuntimeSkillCacheRoot(_0x40a65c[_0x1f2d75(0x11e)],_0x40a65c[_0x1f2d75(0x12a)],_0xee695a),_0x29d085);for(const _0x408bce of _0x54f4dc){for(const _0x2faf5b of localSkillEntryDirs(resolve(_0x3c3ffb,_0x408bce))){collectLocalRuntimeSkill(_0xbe9f34,_0x2faf5b,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':_0x1f2d75(0x123)});}}const _0x86ce84=resolveSkillSyncPaths(_0xee695a);for(const _0x2ddcb6 of[_0x86ce84[_0x1f2d75(0x142)],_0x86ce84[_0x1f2d75(0x133)]]){for(const _0x3e372a of localSkillLinkCandidates(_0x2ddcb6,_0x29d085,_0x1ed836)){collectLocalRuntimeSkill(_0xbe9f34,_0x3e372a,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':'link','linkedPath':_0x3e372a});}}return Array['from'](_0xbe9f34[_0x1f2d75(0x122)]())[_0x1f2d75(0x13c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x557867){const _0x2ca9d6=a89_0x2fab;if(!existsSync(_0x557867))return[];return readdirSync(_0x557867,{'withFileTypes':!![]})[_0x2ca9d6(0x134)](_0x1fc265=>_0x1fc265[_0x2ca9d6(0x124)]()||_0x1fc265[_0x2ca9d6(0x129)]())[_0x2ca9d6(0x13a)](_0x4743dd=>resolve(_0x557867,_0x4743dd[_0x2ca9d6(0x146)]));}function localSkillLinkCandidates(_0x5f45c3,_0x261432,_0x262595){const _0x5cb8b4=a89_0x2fab;if(!existsSync(_0x5f45c3))return[];const _0x326ff3=_0x261432+'--';return readdirSync(_0x5f45c3,{'withFileTypes':!![]})[_0x5cb8b4(0x134)](_0x4cce17=>_0x4cce17[_0x5cb8b4(0x124)]()||_0x4cce17[_0x5cb8b4(0x129)]())[_0x5cb8b4(0x134)](_0x4d2069=>_0x4d2069['name']['startsWith'](_0x326ff3)||_0x262595['has'](_0x5cb8b4(0x12b)))[_0x5cb8b4(0x13a)](_0x598c3f=>resolve(_0x5f45c3,_0x598c3f[_0x5cb8b4(0x146)]));}function collectLocalRuntimeSkill(_0x416aae,_0x4a1cf6,_0x285878){const _0x1afb28=a89_0x2fab,_0x5c894a=resolve(_0x4a1cf6,METADATA_FILE),_0x4f9cb9=readMetadataIfPresent(_0x5c894a);if(!_0x4f9cb9)return;if(_0x4f9cb9[_0x1afb28(0x135)]!==_0x285878['appCode'])return;if(!isRuntimeSkillScope(_0x4f9cb9[_0x1afb28(0x13e)])||!_0x285878['scopes'][_0x1afb28(0x12c)](_0x4f9cb9[_0x1afb28(0x13e)]))return;const _0x52dc06=_0x4f9cb9['skillCode']?.[_0x1afb28(0x140)]();if(!_0x52dc06)return;if(_0x285878[_0x1afb28(0x139)]&&_0x52dc06!==_0x285878['code'])return;const _0x360f19=_0x4f9cb9[_0x1afb28(0x13e)]+':'+_0x52dc06,_0x35cb14=_0x285878['linkedPath']?[_0x285878[_0x1afb28(0x11f)]]:[],_0x145c88=_0x416aae['get'](_0x360f19);if(_0x145c88){_0x285878[_0x1afb28(0x12d)]==='cache'&&(_0x145c88[_0x1afb28(0x12e)]=_0x4a1cf6,_0x145c88[_0x1afb28(0x147)]=_0x4a1cf6,_0x145c88['skillMdPath']=resolve(_0x4a1cf6,SKILL_FILE),_0x145c88[_0x1afb28(0x138)]=_0x5c894a);for(const _0x2121b9 of _0x35cb14){!_0x145c88['linkedPaths'][_0x1afb28(0x12f)](_0x2121b9)&&_0x145c88['linkedPaths'][_0x1afb28(0x136)](_0x2121b9);}_0x145c88[_0x1afb28(0x130)][_0x1afb28(0x13c)]();return;}_0x416aae['set'](_0x360f19,{..._0x4f9cb9,'tags':Array[_0x1afb28(0x120)](_0x4f9cb9[_0x1afb28(0x131)])?_0x4f9cb9[_0x1afb28(0x131)]:[],'scope':_0x4f9cb9['scope'],'source':'local','dir':_0x4a1cf6,'cacheDir':_0x285878[_0x1afb28(0x12d)]===_0x1afb28(0x123)?_0x4a1cf6:undefined,'skillMdPath':resolve(_0x4a1cf6,SKILL_FILE),'metadataPath':_0x5c894a,'linkedPaths':_0x35cb14});}function compareLocalRuntimeSkills(_0x54c392,_0x6ef45e){const _0x373ee2=a89_0x2fab,_0x189b04={'personal':0x0,'company':0x1,'builtin':0x2};return _0x189b04[_0x54c392[_0x373ee2(0x13e)]]-_0x189b04[_0x6ef45e[_0x373ee2(0x13e)]]||_0x54c392[_0x373ee2(0x128)][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x128)])||_0x54c392['dir'][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x12e)]);}
@@ -0,0 +1 @@
1
+ (function(_0x306d23,_0x1d7fd7){const _0xcf382f=a90_0x14db,_0x198087=_0x306d23();while(!![]){try{const _0x177399=-parseInt(_0xcf382f(0x9f))/0x1*(-parseInt(_0xcf382f(0x8f))/0x2)+parseInt(_0xcf382f(0x79))/0x3*(-parseInt(_0xcf382f(0x86))/0x4)+parseInt(_0xcf382f(0x89))/0x5+-parseInt(_0xcf382f(0x91))/0x6+-parseInt(_0xcf382f(0x75))/0x7+-parseInt(_0xcf382f(0x7d))/0x8*(parseInt(_0xcf382f(0x76))/0x9)+parseInt(_0xcf382f(0x9a))/0xa*(parseInt(_0xcf382f(0xa5))/0xb);if(_0x177399===_0x1d7fd7)break;else _0x198087['push'](_0x198087['shift']());}catch(_0x22da44){_0x198087['push'](_0x198087['shift']());}}}(a90_0x13de,0x42284));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,MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_TOTAL_BYTES,SKILL_FILE}from'./constants.js';export function fileContent(_0x23f945){const _0x3ac854=a90_0x14db;return _0x23f945[_0x3ac854(0x8b)]??Buffer[_0x3ac854(0x74)](_0x23f945['content']??'',_0x3ac854(0x8e));}export function fileText(_0x585e0d){const _0x34077a=a90_0x14db;return fileContent(_0x585e0d)[_0x34077a(0x94)](_0x34077a(0x8e));}function a90_0x14db(_0x513da2,_0x2e7847){_0x513da2=_0x513da2-0x72;const _0x13de5c=a90_0x13de();let _0x14db2e=_0x13de5c[_0x513da2];return _0x14db2e;}export function normalizeLocalFiles(_0x2a6bd2){const _0x5298e6=a90_0x14db;if(!Array[_0x5298e6(0x77)](_0x2a6bd2)||_0x2a6bd2[_0x5298e6(0x7e)]===0x0)return[];if(_0x2a6bd2[_0x5298e6(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x8a));const _0x1cc785=new Map();let _0x4d495d=0x0;for(const _0x242010 of _0x2a6bd2){if(!_0x242010||typeof _0x242010!==_0x5298e6(0x7c)||typeof _0x242010[_0x5298e6(0x8d)]!==_0x5298e6(0x80))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x7a));const _0x53c433=normalizeSkillRelativePath(_0x242010[_0x5298e6(0x8d)]);if(_0x1cc785[_0x5298e6(0x97)](_0x53c433))throw CliErrors[_0x5298e6(0x7b)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]!==undefined&&!Buffer[_0x5298e6(0x85)](_0x242010['bytes']))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x95)+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]===undefined&&typeof _0x242010[_0x5298e6(0x87)]!=='string')throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa2)+_0x53c433);const _0x32fb49=fileContent(_0x242010),_0x45f15e=_0x32fb49[_0x5298e6(0x7e)];if(_0x45f15e>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa4)+_0x53c433);_0x4d495d+=_0x45f15e;if(_0x4d495d>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x9e));_0x1cc785[_0x5298e6(0x83)](_0x53c433,{'path':_0x53c433,'bytes':_0x32fb49});}return Array[_0x5298e6(0x74)](_0x1cc785['values']())[_0x5298e6(0x88)](compareSkillFiles);}export function normalizeManifestFiles(_0x14bc83){const _0x565f4c=a90_0x14db;if(!Array[_0x565f4c(0x77)](_0x14bc83)||_0x14bc83['length']===0x0)return[];if(_0x14bc83['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8a));const _0x5a7978=new Map();let _0x4181a8=0x0;for(const _0xc6bfb2 of _0x14bc83){if(!_0xc6bfb2||typeof _0xc6bfb2!==_0x565f4c(0x7c)||typeof _0xc6bfb2['path']!==_0x565f4c(0x80))throw CliErrors[_0x565f4c(0x7b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x46f362=normalizeSkillRelativePath(_0xc6bfb2[_0x565f4c(0x8d)]);if(_0x5a7978[_0x565f4c(0x97)](_0x46f362))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8c)+_0x46f362);if(!isSha256Hex(_0xc6bfb2[_0x565f4c(0x98)]))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x92)+_0x46f362);if(!Number[_0x565f4c(0xa3)](_0xc6bfb2[_0x565f4c(0x78)])||_0xc6bfb2[_0x565f4c(0x78)]<0x0)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x96)+_0x46f362);if(_0xc6bfb2['size']>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x565f4c(0xa4)+_0x46f362);_0x4181a8+=_0xc6bfb2[_0x565f4c(0x78)];if(_0x4181a8>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x565f4c(0x9e));_0x5a7978[_0x565f4c(0x83)](_0x46f362,{'path':_0x46f362,'sha256':_0xc6bfb2['sha256'][_0x565f4c(0x84)](),'size':_0xc6bfb2['size']});}return Array[_0x565f4c(0x74)](_0x5a7978[_0x565f4c(0x9b)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x280c56){const _0x113d40=realpathSync(_0x280c56),_0x59a4be=[];let _0x4c9b1b=0x0;function _0x1dd0f7(_0xb757ef){const _0x4edabd=a90_0x14db,_0x5696ec=readdirSync(_0xb757ef,{'withFileTypes':!![]})['sort']((_0x5cff2f,_0x16b4cd)=>_0x5cff2f[_0x4edabd(0x81)][_0x4edabd(0x93)](_0x16b4cd[_0x4edabd(0x81)]));for(const _0x2b867e of _0x5696ec){if(_0x2b867e[_0x4edabd(0x72)]()&&IGNORED_DIR_NAMES['has'](_0x2b867e[_0x4edabd(0x81)]))continue;if(IGNORED_FILE_NAMES[_0x4edabd(0x97)](_0x2b867e[_0x4edabd(0x81)]))continue;const _0x1f624a=resolve(_0xb757ef,_0x2b867e['name']);if(_0x2b867e['isSymbolicLink']())throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x73)+_0x1f624a);const _0x851c72=toPosixPath(relative(_0x113d40,_0x1f624a));if(_0x2b867e['isDirectory']()){_0x1dd0f7(_0x1f624a);continue;}if(!_0x2b867e[_0x4edabd(0x82)]())continue;validateSkillRelativePath(_0x851c72);const _0x361a2d=readFileSync(_0x1f624a);if(_0x361a2d['length']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0xa4)+_0x851c72);_0x4c9b1b+=_0x361a2d['length'];if(_0x4c9b1b>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4edabd(0x7b)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x59a4be[_0x4edabd(0x7f)]({'path':_0x851c72,'bytes':_0x361a2d});if(_0x59a4be[_0x4edabd(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x8a));}}return _0x1dd0f7(_0x113d40),normalizeLocalFiles(_0x59a4be);}export function compareSkillFiles(_0x36b020,_0x2335c5){const _0x38a062=a90_0x14db;if(_0x36b020[_0x38a062(0x8d)]===SKILL_FILE)return _0x2335c5[_0x38a062(0x8d)]===SKILL_FILE?0x0:-0x1;if(_0x2335c5[_0x38a062(0x8d)]===SKILL_FILE)return 0x1;return Buffer[_0x38a062(0x9c)](Buffer['from'](_0x36b020[_0x38a062(0x8d)],_0x38a062(0x8e)),Buffer[_0x38a062(0x74)](_0x2335c5[_0x38a062(0x8d)],_0x38a062(0x8e)));}export function normalizeSkillRelativePath(_0x4ce4e7){const _0x477e8c=a90_0x14db,_0x57f157=toPosixPath(_0x4ce4e7[_0x477e8c(0x9d)]());return validateSkillRelativePath(_0x57f157),_0x57f157;}export function validateSkillRelativePath(_0x1acb96){const _0x165a5c=a90_0x14db;if(!_0x1acb96||_0x1acb96[_0x165a5c(0xa1)]('/')||_0x1acb96[_0x165a5c(0xa0)]('//'))throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);for(const _0xcb07d6 of _0x1acb96['split']('/')){if(!_0xcb07d6||_0xcb07d6==='.'||_0xcb07d6==='..')throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);}}function a90_0x13de(){const _0x34c272=['2210sdRcgZ','values','compare','trim','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','6JTxThK','includes','startsWith','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isSafeInteger','Skill\x20file\x20exceeds\x20size\x20limit:\x20','23265RKwqmH','isDirectory','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','from','1328656YveUzN','195543SYWXVs','isArray','size','18339KwqwBe','Skill\x20file\x20path\x20must\x20be\x20text.','validation','object','24AkbRsD','length','push','string','name','isFile','set','toLowerCase','isBuffer','276RVbsTp','content','sort','870975FtKYla','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','bytes','Duplicate\x20Skill\x20file\x20path:\x20','path','utf8','117282bDverW','Unsafe\x20Skill\x20file\x20path:\x20','274140dffjQx','Skill\x20file\x20sha256\x20is\x20invalid:\x20','localeCompare','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','has','sha256','test'];a90_0x13de=function(){return _0x34c272;};return a90_0x13de();}export function toPosixPath(_0x584106){return _0x584106['replace'](/\\/g,'/');}export function isSha256Hex(_0x21fa09){const _0x50fede=a90_0x14db;return typeof _0x21fa09===_0x50fede(0x80)&&/^[a-fA-F0-9]{64}$/[_0x50fede(0x99)](_0x21fa09);}
@@ -0,0 +1 @@
1
+ (function(_0x3a4ea0,_0x1859f6){const _0x368fc4=a91_0x3882,_0x419ab8=_0x3a4ea0();while(!![]){try{const _0x5007f6=parseInt(_0x368fc4(0xa7))/0x1+parseInt(_0x368fc4(0xb5))/0x2*(-parseInt(_0x368fc4(0xa4))/0x3)+parseInt(_0x368fc4(0x99))/0x4+parseInt(_0x368fc4(0x9c))/0x5+-parseInt(_0x368fc4(0xbc))/0x6*(-parseInt(_0x368fc4(0xc1))/0x7)+-parseInt(_0x368fc4(0xb3))/0x8*(parseInt(_0x368fc4(0xad))/0x9)+-parseInt(_0x368fc4(0x98))/0xa*(parseInt(_0x368fc4(0xb0))/0xb);if(_0x5007f6===_0x1859f6)break;else _0x419ab8['push'](_0x419ab8['shift']());}catch(_0x515ccf){_0x419ab8['push'](_0x419ab8['shift']());}}}(a91_0x351a,0x5e5c0));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a91_0x351a(){const _0x501333=['Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','force','86946DQTfHk','Runtime\x20Skill\x20package\x20is\x20missing\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','623650wsdUyA','name:\x20','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','stringify','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','64287IzngUQ','Managed\x20file\x20was\x20removed\x20locally:\x20','paths','1999943vaEPKu','keys','map','184zGWRUk','appCode','12tisUhy','path','description:\x20','pulledAt','skillName','test','find','5910ovlNJW','has','fileHashes','.\x20Changed\x20file:\x20','contentHash','595rFPuWj','utf8','isFile','30HQZvjr','1335172acxMgH','replace','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1144740EOcxPY','trim','accessKey','---','description'];a91_0x351a=function(){return _0x501333;};return a91_0x351a();}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 a91_0x3882(_0x504cf7,_0x5338e3){_0x504cf7=_0x504cf7-0x97;const _0x351ade=a91_0x351a();let _0x3882c4=_0x351ade[_0x504cf7];return _0x3882c4;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x34c602,_0x7dba71,_0x1caa92){const _0x408e18=a91_0x3882,_0x306d3b=requireSkillCode(_0x34c602),_0x3a4940=requirePackageBytes(_0x306d3b,_0x1caa92['packageBytes']),_0x5c0515=extractDownloadedPackage(_0x3a4940),_0x32826d=_0x5c0515['find'](_0x19730a=>_0x19730a[_0x408e18(0xb6)]===SKILL_FILE);if(!_0x32826d)throw CliErrors[_0x408e18(0xa9)](_0x408e18(0xa5)+SKILL_FILE+':\x20'+_0x306d3b);const _0x3cf65f=withMaterializedSkillFrontmatter(_0x5c0515,_0x34c602,_0x306d3b),_0x1e6134=_0x3cf65f[_0x408e18(0xbb)](_0x5310f1=>_0x5310f1[_0x408e18(0xb6)]===SKILL_FILE),_0x9caafb=fileText(_0x1e6134),_0x5e6d7c=getRuntimeSkillDir(_0x1caa92['env'],_0x1caa92[_0x408e18(0x9e)],_0x1caa92[_0x408e18(0xb4)],_0x7dba71,_0x306d3b,_0x1caa92[_0x408e18(0xaf)]),_0x58a7c1=resolve(_0x5e6d7c,SKILL_FILE),_0x141b90=resolve(_0x5e6d7c,METADATA_FILE),_0x247ca2=contentHash(_0x9caafb),_0x12162d=readMetadataIfPresent(_0x141b90)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x5e6d7c,_0x141b90,_0x3cf65f,_0x1caa92[_0x408e18(0xa3)]===!![]),mkdirSync(_0x5e6d7c,{'recursive':!![],'mode':0x1c0});const _0x42fede=existsSync(_0x58a7c1)?readFileSync(_0x58a7c1,_0x408e18(0xc2)):undefined;return materializeFiles(_0x5e6d7c,_0x3cf65f),removeStaleManagedFiles(_0x5e6d7c,_0x12162d,_0x3cf65f),writeJsonAtomic(_0x141b90,buildMetadata(_0x34c602,_0x7dba71,_0x1caa92['appCode'],_0x247ca2,_0x1caa92[_0x408e18(0xb8)],_0x3cf65f,_0x3a4940)),{'skill':_0x34c602,'scope':_0x7dba71,'dir':_0x5e6d7c,'skillMdPath':_0x58a7c1,'metadataPath':_0x141b90,'contentHash':_0x247ca2,'changed':_0x42fede!==_0x9caafb};}function withMaterializedSkillFrontmatter(_0x335b9e,_0xc05094,_0x2d7ffe){const _0x52e158=a91_0x3882;return normalizeLocalFiles(_0x335b9e)[_0x52e158(0xb2)](_0x1c3e3e=>{const _0x53fba1=_0x52e158,_0x2a6b47=fileText(_0x1c3e3e);if(_0x1c3e3e[_0x53fba1(0xb6)]!==SKILL_FILE||hasYamlFrontmatter(_0x2a6b47))return _0x1c3e3e;return{'path':_0x1c3e3e[_0x53fba1(0xb6)],'content':prependSkillFrontmatter(_0x2a6b47,{'name':_0x2d7ffe,'description':_0xc05094['description']?.[_0x53fba1(0x9d)]()||_0xc05094[_0x53fba1(0xb9)]?.[_0x53fba1(0x9d)]()||_0x2d7ffe})};});}function hasYamlFrontmatter(_0x3c1ae9){const _0x868d1a=a91_0x3882;return/^\uFEFF?---\s*\r?\n/[_0x868d1a(0xba)](_0x3c1ae9);}function prependSkillFrontmatter(_0x5e02d3,_0x4240da){const _0x1b64e7=a91_0x3882,_0x10965a=_0x5e02d3[_0x1b64e7(0x9a)](/^\uFEFF/,'');return[_0x1b64e7(0x9f),_0x1b64e7(0xa8)+yamlString(_0x4240da['name']),_0x1b64e7(0xb7)+yamlString(_0x4240da[_0x1b64e7(0xa0)]),'---','',_0x10965a]['join']('\x0a');}function yamlString(_0x4121b5){const _0x2e5655=a91_0x3882;return JSON[_0x2e5655(0xab)](_0x4121b5['replace'](/\r/g,'')[_0x2e5655(0x9d)]());}function ensurePulledFilesCanBeOverwritten(_0x30169d,_0x32f41f,_0x24e629,_0x65b5da){const _0x1c741c=a91_0x3882;if(_0x65b5da||!existsSync(_0x32f41f))return;const _0x1e4f05=readMetadataIfPresent(_0x32f41f);if(!_0x1e4f05)return;const _0x365d29=_0x1e4f05[_0x1c741c(0xbe)]&&Object[_0x1c741c(0xb1)](_0x1e4f05[_0x1c741c(0xbe)])['length']>0x0?_0x1e4f05[_0x1c741c(0xbe)]:undefined;if(_0x365d29)for(const [_0x2b8fca,_0x3530c5]of Object['entries'](_0x365d29)){const _0xc07c25=resolveManagedFilePath(_0x30169d,_0x2b8fca);if(!existsSync(_0xc07c25))throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xae)+_0x2b8fca);const _0x7fbabe=lstatSync(_0xc07c25);if(!_0x7fbabe[_0x1c741c(0x97)]())throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xaa)+_0x2b8fca);const _0x143cdb=bufferSha256(readFileSync(_0xc07c25));if(_0x143cdb!==_0x3530c5)throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d+_0x1c741c(0xbf)+_0x2b8fca,_0x1c741c(0xa6)+_0x2b8fca);}else{const _0x268b74=resolve(_0x30169d,SKILL_FILE);if(existsSync(_0x268b74)&&_0x1e4f05[_0x1c741c(0xc0)]){const _0x4e860e=contentHash(readFileSync(_0x268b74,_0x1c741c(0xc2)));if(_0x4e860e!==_0x1e4f05[_0x1c741c(0xc0)])throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa2)+_0x268b74,_0x1c741c(0xac));}}for(const _0x57add0 of normalizeLocalFiles(_0x24e629)){if(_0x365d29?.[_0x57add0[_0x1c741c(0xb6)]])continue;if(!_0x365d29&&_0x57add0[_0x1c741c(0xb6)]===SKILL_FILE)continue;const _0x42bf58=resolveManagedFilePath(_0x30169d,_0x57add0[_0x1c741c(0xb6)]);if(!existsSync(_0x42bf58))continue;const _0x4d021a=lstatSync(_0x42bf58);if(!_0x4d021a['isFile']())throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0x9b)+_0x57add0['path']);const _0x128a53=bufferSha256(readFileSync(_0x42bf58));if(_0x128a53!==fileHash(_0x57add0))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x30169d,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x57add0[_0x1c741c(0xb6)]);}}function materializeFiles(_0x640927,_0x4caf5e){for(const _0x3155e5 of normalizeLocalFiles(_0x4caf5e)){const _0x535ec4=resolveManagedFilePath(_0x640927,_0x3155e5['path']);mkdirSync(dirname(_0x535ec4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x535ec4,fileContent(_0x3155e5),0x180);}}function removeStaleManagedFiles(_0x591ae2,_0x3c6888,_0x2d7caf){const _0x51063d=a91_0x3882;if(!_0x3c6888)return;const _0x1c82ba=new Set(normalizeLocalFiles(_0x2d7caf)[_0x51063d(0xb2)](_0xc381e1=>_0xc381e1[_0x51063d(0xb6)]));for(const _0x520c1e of Object[_0x51063d(0xb1)](_0x3c6888)){if(_0x1c82ba[_0x51063d(0xbd)](_0x520c1e))continue;const _0x524fdb=resolveManagedFilePath(_0x591ae2,_0x520c1e);existsSync(_0x524fdb)&&lstatSync(_0x524fdb)['isFile']()&&rmSync(_0x524fdb,{'force':!![]});}}
@@ -0,0 +1 @@
1
+ function a92_0x134c(){const _0x2bfa61=['length','468209SjCOVb','path','userId','version','utf8','Invalid\x20','3609822IeoPWw','1732932OVGDAM','sourceSessionId','144880WlMDai','description','85aWLZGH','2588670xKpHnb','75604LPMDEz','trim','map','status','isArray','zipSha256','object','skillCode','files','readonly','tenantCode','tags','personal','string','forkedFromVersion','manifest','parse','hasUpstreamUpdate','155fvVIot','validation','toISOString','48McIjDq','skillName','10504qmXIYp','Runtime\x20Skill\x20is\x20missing\x20skillCode.'];a92_0x134c=function(){return _0x2bfa61;};return a92_0x134c();}(function(_0x36a058,_0x4b8244){const _0x169be4=a92_0x5f31,_0x4aaa4c=_0x36a058();while(!![]){try{const _0x1054bb=parseInt(_0x169be4(0x108))/0x1*(parseInt(_0x169be4(0x121))/0x2)+parseInt(_0x169be4(0x104))/0x3+parseInt(_0x169be4(0x10a))/0x4*(parseInt(_0x169be4(0x11c))/0x5)+-parseInt(_0x169be4(0x103))/0x6+-parseInt(_0x169be4(0x124))/0x7*(parseInt(_0x169be4(0x11f))/0x8)+-parseInt(_0x169be4(0x109))/0x9+-parseInt(_0x169be4(0x106))/0xa;if(_0x1054bb===_0x4b8244)break;else _0x4aaa4c['push'](_0x4aaa4c['shift']());}catch(_0x5b45de){_0x4aaa4c['push'](_0x4aaa4c['shift']());}}}(a92_0x134c,0x4a716));import{existsSync,readFileSync}from'node:fs';function a92_0x5f31(_0x5ad472,_0x2adb76){_0x5ad472=_0x5ad472-0x101;const _0x134cc3=a92_0x134c();let _0x5f31b3=_0x134cc3[_0x5ad472];return _0x5f31b3;}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(_0x565546,_0x1ffde9,_0x527ee4,_0x928166,_0x313950,_0x324f8b,_0x5a8f16){const _0x52e759=a92_0x5f31,_0x457e97=_0x324f8b?normalizeLocalFiles(_0x324f8b):[],_0x26eb6e=!_0x5a8f16&&_0x457e97[_0x52e759(0x123)]>0x0?buildSkillPackage(_0x457e97):undefined,_0x81e3af=_0x5a8f16?bufferSha256(_0x5a8f16):_0x26eb6e?.[_0x52e759(0x119)][_0x52e759(0x10f)],_0x1b15c7=_0x5a8f16?.[_0x52e759(0x123)]??_0x26eb6e?.[_0x52e759(0x119)]['zipSize'],_0x20ea73=_0x457e97['length']>0x0?Object['fromEntries'](_0x457e97['map'](_0x224d1d=>[_0x224d1d[_0x52e759(0x125)],fileHash(_0x224d1d)])):undefined;return{'schemaVersion':_0x457e97[_0x52e759(0x123)]>0x0?0x2:0x1,'id':_0x565546['id'],'appCode':_0x527ee4,'skillCode':requireSkillCode(_0x565546),'skillName':_0x565546[_0x52e759(0x120)],'description':_0x565546[_0x52e759(0x107)],'scope':_0x1ffde9,'readonly':_0x1ffde9!==_0x52e759(0x116)||_0x565546[_0x52e759(0x113)]===!![],'tenantCode':_0x565546[_0x52e759(0x114)],'userId':_0x565546[_0x52e759(0x126)],'version':_0x565546[_0x52e759(0x127)],'status':_0x565546[_0x52e759(0x10d)],'tags':Array[_0x52e759(0x10e)](_0x565546[_0x52e759(0x115)])?_0x565546[_0x52e759(0x115)]:[],'hasUpstreamUpdate':_0x565546[_0x52e759(0x11b)],'forkedFromSkillId':_0x565546['forkedFromSkillId'],'forkedFromVersion':_0x565546[_0x52e759(0x118)],'sourceSessionId':_0x565546[_0x52e759(0x105)],'contentHash':_0x928166,'fileHashes':_0x20ea73,'treeHash':_0x457e97[_0x52e759(0x123)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x457e97)):undefined,'ossPath':remoteManifestOssPath(_0x565546[_0x52e759(0x112)]),'zipSha256':_0x81e3af,'zipSize':_0x1b15c7,'files':_0x457e97[_0x52e759(0x123)]>0x0?_0x457e97[_0x52e759(0x10c)](_0x1e551e=>({'path':_0x1e551e[_0x52e759(0x125)],'hash':fileHash(_0x1e551e),'size':fileContent(_0x1e551e)[_0x52e759(0x123)]})):undefined,'pulledAt':_0x313950??new Date()[_0x52e759(0x11e)]()};}export function requireSkillCode(_0x44718c){const _0x5d8954=a92_0x5f31,_0x25d905=_0x44718c[_0x5d8954(0x111)]?.['trim']();if(!_0x25d905)throw CliErrors[_0x5d8954(0x11d)](_0x5d8954(0x122));return _0x25d905;}export function readMetadataIfPresent(_0x31c7ec){const _0x195059=a92_0x5f31;if(!existsSync(_0x31c7ec))return undefined;try{const _0x16f64e=JSON[_0x195059(0x11a)](readFileSync(_0x31c7ec,_0x195059(0x101)));return _0x16f64e;}catch{throw CliErrors[_0x195059(0x11d)](_0x195059(0x102)+METADATA_FILE+':\x20'+_0x31c7ec);}}function remoteManifestOssPath(_0x21eb3e){const _0x5522e4=a92_0x5f31;if(!_0x21eb3e||typeof _0x21eb3e!==_0x5522e4(0x110)||Array[_0x5522e4(0x10e)](_0x21eb3e))return undefined;const _0x40874c=_0x21eb3e['ossPath'];return typeof _0x40874c===_0x5522e4(0x117)&&_0x40874c[_0x5522e4(0x10b)]()?_0x40874c['trim']():undefined;}
@@ -0,0 +1 @@
1
+ const a93_0x1186f9=a93_0x7759;(function(_0x1c0f69,_0x4bcd3c){const _0x3240bf=a93_0x7759,_0x3eb920=_0x1c0f69();while(!![]){try{const _0x7b008f=parseInt(_0x3240bf(0x7d))/0x1*(parseInt(_0x3240bf(0x7c))/0x2)+-parseInt(_0x3240bf(0x7e))/0x3*(-parseInt(_0x3240bf(0x7f))/0x4)+parseInt(_0x3240bf(0x87))/0x5+-parseInt(_0x3240bf(0x81))/0x6*(-parseInt(_0x3240bf(0x88))/0x7)+-parseInt(_0x3240bf(0x83))/0x8*(-parseInt(_0x3240bf(0x77))/0x9)+-parseInt(_0x3240bf(0x89))/0xa+-parseInt(_0x3240bf(0x84))/0xb;if(_0x7b008f===_0x4bcd3c)break;else _0x3eb920['push'](_0x3eb920['shift']());}catch(_0x1122ff){_0x3eb920['push'](_0x3eb920['shift']());}}}(a93_0x3725,0xf0ef1));function a93_0x7759(_0x5af78c,_0x4e7f26){_0x5af78c=_0x5af78c-0x74;const _0x372540=a93_0x3725();let _0x77591f=_0x372540[_0x5af78c];return _0x77591f;}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(_0x25afd4={}){const _0x3bf17d=a93_0x7759,_0xda2a62=_0x25afd4[_0x3bf17d(0x8a)]??homedir(),_0x1bb2ef=resolve(_0xda2a62,PRODUCT_CONFIG['homeDirName'],_0x3bf17d(0x7a)),_0x13a64a=trimmedEnv(_0x3bf17d(0x85)),_0x52ac9e=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0xda2a62,'cacheRoot':_0x1bb2ef,'managedRoot':resolve(_0xda2a62,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x25afd4['agentsSkillsDir']??_0x13a64a??resolve(_0xda2a62,_0x3bf17d(0x80),_0x3bf17d(0x78)),'claudeSkillsDir':_0x25afd4[_0x3bf17d(0x79)]??_0x52ac9e??resolve(_0xda2a62,'.claude',_0x3bf17d(0x78))};}export function getRuntimeSkillCacheRoot(_0x195306,_0x31b3fd,_0x2ecfff={}){const _0x12acf5=a93_0x7759,_0x30418b=resolveSkillSyncPaths(_0x2ecfff);return resolve(_0x30418b[_0x12acf5(0x86)],_0x195306,fingerprintAccessKey(_0x31b3fd),_0x12acf5(0x78));}export function getRuntimeSkillDir(_0x565ea3,_0x91d606,_0x80ef2e,_0x3b588a,_0x276f0b,_0x28d823={}){const _0x3c6f90=a93_0x7759;return resolve(getRuntimeSkillCacheRoot(_0x565ea3,_0x91d606,_0x28d823),safePathSegment(_0x80ef2e,_0x3c6f90(0x76)),_0x3b588a,safePathSegment(_0x276f0b,'skillCode'));}function a93_0x3725(){const _0x571dd0=['1070280JFRjxW','4753VEuXVi','18060940mDCjOn','homeDir','path\x20segment','includes','appCode','39141bUfvuN','skills','claudeSkillsDir','cache','trim','638446UXFcNv','1qCXxHe','5437953cgYCWU','4EsaVfh','.agents','2022dDdFmd','Unsafe\x20','496aOzZPo','565752TOSRwU','SKILL_ROOT','cacheRoot'];a93_0x3725=function(){return _0x571dd0;};return a93_0x3725();}export function safePathSegment(_0x10804e,_0xcffc1e=a93_0x1186f9(0x74)){const _0x225837=a93_0x1186f9;if(!_0x10804e||_0x10804e[_0x225837(0x75)]('/')||_0x10804e[_0x225837(0x75)]('\x5c')||_0x10804e[_0x225837(0x75)]('..'))throw CliErrors['validation'](_0x225837(0x82)+_0xcffc1e+'\x20for\x20local\x20path:\x20'+_0x10804e);return _0x10804e;}function trimmedEnv(_0x314806){const _0x423398=a93_0x1186f9,_0xa12a8d=productEnv(_0x314806)?.[_0x423398(0x7b)]();return _0xa12a8d?_0xa12a8d:undefined;}
@@ -0,0 +1 @@
1
+ (function(_0x5821a0,_0x282cba){const _0x2a7de3=a94_0x5ad4,_0x3db4e7=_0x5821a0();while(!![]){try{const _0x50d265=parseInt(_0x2a7de3(0x10c))/0x1+-parseInt(_0x2a7de3(0xf7))/0x2*(parseInt(_0x2a7de3(0xfa))/0x3)+parseInt(_0x2a7de3(0xef))/0x4+parseInt(_0x2a7de3(0x107))/0x5+-parseInt(_0x2a7de3(0xfc))/0x6*(parseInt(_0x2a7de3(0xfb))/0x7)+parseInt(_0x2a7de3(0xf2))/0x8+parseInt(_0x2a7de3(0x100))/0x9;if(_0x50d265===_0x282cba)break;else _0x3db4e7['push'](_0x3db4e7['shift']());}catch(_0x541cc5){_0x3db4e7['push'](_0x3db4e7['shift']());}}}(a94_0x328e,0x4fd81));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a94_0x5ad4(_0x4b8a19,_0x3eecbc){_0x4b8a19=_0x4b8a19-0xe8;const _0x328e09=a94_0x328e();let _0x5ad439=_0x328e09[_0x4b8a19];return _0x5ad439;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';function a94_0x328e(){const _0x3f9fd0=['filter','pushedAt','files','isFile','6elxEqr','Skill\x20metadata\x20appCode\x20\x22','appCode','116079FzoBcW','97559IMNSgl','276RecGmg','scope','some','version','3525138gEWoTB','personal','Unable\x20to\x20resolve\x20skillCode\x20from\x20','tags','packageBase64','Skill\x20directory\x20not\x20found:\x20','content','41115TLBdXx','startsWith','isDirectory','find','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','135854pMEUjQ','description','length','manifest','isSymbolicLink','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','utf8','\x20or\x20directory\x20name.','path','932968cAoMuz','validation','skillCode','2521768cTkDzQ'];a94_0x328e=function(){return _0x3f9fd0;};return a94_0x328e();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function readPushDirectory(_0x5af865,_0x68ccaa){const _0x4e98fe=a94_0x5ad4,_0x34d58b=resolvePushDirectoryRoot(_0x5af865),_0xf32549=resolve(_0x34d58b,SKILL_FILE);if(!existsSync(_0xf32549)||!lstatSync(_0xf32549)[_0x4e98fe(0xf6)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0xf32549);const _0x5cfad7=readMetadataIfPresent(resolve(_0x34d58b,METADATA_FILE));if(_0x5cfad7?.[_0x4e98fe(0xfd)]&&_0x5cfad7[_0x4e98fe(0xfd)]!==_0x4e98fe(0x101))throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0x10b)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5cfad7['scope']+'\x22.');if(_0x5cfad7?.[_0x4e98fe(0xf9)]&&_0x5cfad7[_0x4e98fe(0xf9)]!==_0x68ccaa)throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0xf8)+_0x5cfad7[_0x4e98fe(0xf9)]+_0x4e98fe(0xeb)+_0x68ccaa+'\x22.');const _0x23f9f5=scanSkillDirectory(_0x34d58b),_0x2df97f=buildSkillPackage(_0x23f9f5),_0x16e3be=readFileSync(_0xf32549,_0x4e98fe(0xec)),_0x3f5bac=_0x5cfad7?.[_0x4e98fe(0xf1)]??deriveSkillCodeFromDirectory(_0x34d58b,_0x68ccaa);if(!_0x3f5bac)throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0x102)+METADATA_FILE+_0x4e98fe(0xed));return{'skillCode':_0x3f5bac,'metadata':_0x5cfad7,'input':{'skillCode':_0x3f5bac,'skillName':_0x5cfad7?.['skillName'],'description':_0x5cfad7?.[_0x4e98fe(0x10d)],'content':_0x16e3be,'files':_0x2df97f[_0x4e98fe(0xe9)],'packageBase64':_0x2df97f[_0x4e98fe(0x104)],'tags':_0x5cfad7?.[_0x4e98fe(0x103)],'version':_0x5cfad7?.[_0x4e98fe(0xff)],'sourceSessionId':_0x5cfad7?.['sourceSessionId']}};}export function recordPushedRuntimeSkill(_0x583cec,_0x2040fd,_0xc241ae,_0x5e676b={}){const _0x1e620e=a94_0x5ad4,_0x5e1072=resolvePushDirectoryRoot(_0x583cec),_0x2bfafc=scanSkillDirectory(_0x5e1072),_0x1df267=_0x2bfafc[_0x1e620e(0x10a)](_0x5dd919=>_0x5dd919[_0x1e620e(0xee)]===SKILL_FILE),_0x44059b=_0x1df267?fileText(_0x1df267):'',_0x38e266=tryNormalizePackageManifest(_0x2040fd['files']),_0x4e4685={..._0x2040fd,'content':_0x2040fd[_0x1e620e(0x106)]??_0x44059b,'files':_0x38e266},_0x596b07=_0x38e266?normalizeLocalFiles(_0x2bfafc)[_0x1e620e(0xf3)](_0x277eb1=>_0x38e266[_0x1e620e(0xf5)][_0x1e620e(0xfe)](_0x50c771=>_0x50c771[_0x1e620e(0xee)]===_0x277eb1[_0x1e620e(0xee)])):undefined,_0x2600c1=buildMetadata(_0x4e4685,_0x5e676b['scope']??'personal',_0xc241ae,contentHash(_0x4e4685['content']??''),_0x5e676b[_0x1e620e(0xf4)],_0x596b07);writeJsonAtomic(resolve(_0x5e1072,METADATA_FILE),_0x2600c1);}export function deriveSkillCodeFromDirectory(_0x459701,_0x44a931){const _0x2837c9=a94_0x5ad4,_0x3b34a9=basename(resolve(_0x459701)),_0x49cf76=_0x44a931+'--';return _0x3b34a9[_0x2837c9(0x108)](_0x49cf76)?_0x3b34a9['slice'](_0x49cf76[_0x2837c9(0xe8)]):_0x3b34a9;}function resolvePushDirectoryRoot(_0x593a18){const _0x45a65a=a94_0x5ad4,_0x4eddc8=resolve(_0x593a18);if(!existsSync(_0x4eddc8))throw CliErrors[_0x45a65a(0xf0)]('Skill\x20directory\x20not\x20found:\x20'+_0x593a18);const _0x5902b1=lstatSync(_0x4eddc8);if(_0x5902b1['isDirectory']())return _0x4eddc8;if(_0x5902b1[_0x45a65a(0xea)]()){const _0x122cfe=realpathSync(_0x4eddc8);if(lstatSync(_0x122cfe)[_0x45a65a(0x109)]())return _0x122cfe;}throw CliErrors['validation'](_0x45a65a(0x105)+_0x593a18);}
@@ -0,0 +1 @@
1
+ (function(_0x25d0a2,_0x206652){const _0x49baa7=a95_0x1fae,_0x468eca=_0x25d0a2();while(!![]){try{const _0x7fdd14=parseInt(_0x49baa7(0x146))/0x1*(parseInt(_0x49baa7(0x145))/0x2)+-parseInt(_0x49baa7(0x14c))/0x3*(-parseInt(_0x49baa7(0x14d))/0x4)+-parseInt(_0x49baa7(0x152))/0x5*(-parseInt(_0x49baa7(0x14e))/0x6)+-parseInt(_0x49baa7(0x149))/0x7+-parseInt(_0x49baa7(0x140))/0x8*(-parseInt(_0x49baa7(0x14f))/0x9)+-parseInt(_0x49baa7(0x144))/0xa*(parseInt(_0x49baa7(0x153))/0xb)+parseInt(_0x49baa7(0x151))/0xc;if(_0x7fdd14===_0x206652)break;else _0x468eca['push'](_0x468eca['shift']());}catch(_0x149693){_0x468eca['push'](_0x468eca['shift']());}}}(a95_0x3810,0x41cfa));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3490b2){const _0x1a61b2=a95_0x1fae,_0x3e5a4d=_0x3490b2&&_0x3490b2[_0x1a61b2(0x143)]>0x0?_0x3490b2:[_0x1a61b2(0x14b),_0x1a61b2(0x147),'builtin'],_0x1777a8=[];for(const _0x3c1e90 of _0x3e5a4d){if(!isRuntimeSkillScope(_0x3c1e90))throw CliErrors[_0x1a61b2(0x148)](_0x1a61b2(0x142)+_0x3c1e90);!_0x1777a8[_0x1a61b2(0x141)](_0x3c1e90)&&_0x1777a8[_0x1a61b2(0x150)](_0x3c1e90);}return _0x1777a8;}function a95_0x3810(){const _0x159fdc=['validation','319648WpTXRS','builtin','personal','195FPBfTi','15172NYyqtp','414KkqpPe','9YMqYAl','push','191892FMuGyp','5455RcboXi','11EGOSaf','1628168oeXAPW','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','length','3079930aDYipA','163766tzJAKw','1CnaHrI','company'];a95_0x3810=function(){return _0x159fdc;};return a95_0x3810();}function a95_0x1fae(_0x51e410,_0x5212ce){_0x51e410=_0x51e410-0x140;const _0x381028=a95_0x3810();let _0x1faeb0=_0x381028[_0x51e410];return _0x1faeb0;}export function isRuntimeSkillScope(_0x269e49){const _0x220a35=a95_0x1fae;return _0x269e49===_0x220a35(0x14b)||_0x269e49==='company'||_0x269e49===_0x220a35(0x14a);}
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ (function(_0x1b471c,_0x3055e8){const _0x3d161f=a97_0x2db1,_0x470b43=_0x1b471c();while(!![]){try{const _0x15fef1=parseInt(_0x3d161f(0x1e3))/0x1*(-parseInt(_0x3d161f(0x1da))/0x2)+parseInt(_0x3d161f(0x1e4))/0x3+-parseInt(_0x3d161f(0x1d9))/0x4+-parseInt(_0x3d161f(0x1e0))/0x5+-parseInt(_0x3d161f(0x1e6))/0x6+-parseInt(_0x3d161f(0x1e7))/0x7+parseInt(_0x3d161f(0x1e5))/0x8;if(_0x15fef1===_0x3055e8)break;else _0x470b43['push'](_0x470b43['shift']());}catch(_0x149d85){_0x470b43['push'](_0x470b43['shift']());}}}(a97_0x3d05,0xc958f));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_PACKAGE_BYTES,MAX_SKILL_TOTAL_BYTES}from'./constants.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');function a97_0x2db1(_0x591da7,_0x4a170b){_0x591da7=_0x591da7-0x1cf;const _0x3d053c=a97_0x3d05();let _0x2db1d3=_0x3d053c[_0x591da7];return _0x2db1d3;}function a97_0x3d05(){const _0x1eea05=['568498AAiltg','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','length','name','Skill\x20package\x20exceeds\x20size\x20limit.','code','map','validation','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','sort','3487768wrMwaL','3284KVIYrG','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','originalSize','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','from','2520335liuaIg','validation_error','entries','471WUXqyB','4182471OhNNOZ','18003440FVvTrb','3535578LVdprd'];a97_0x3d05=function(){return _0x1eea05;};return a97_0x3d05();}export function createDeterministicZipPackage(_0x1ffbb9){const _0x4d7a8c=a97_0x2db1,_0x2e67b3={};for(const _0x2e627d of normalizeLocalFiles(_0x1ffbb9)){_0x2e67b3[_0x2e627d['path']]=fileContent(_0x2e627d);}const _0x404c7a=Buffer[_0x4d7a8c(0x1df)](zipSync(_0x2e67b3,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x404c7a[_0x4d7a8c(0x1d1)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4d7a8c(0x1d6)](_0x4d7a8c(0x1d3));return _0x404c7a;}export function parseZipPackage(_0x1417cb){const _0xcfb968=a97_0x2db1;if(_0x1417cb[_0xcfb968(0x1d1)]<0x16)throw CliErrors['validation'](_0xcfb968(0x1dc));if(_0x1417cb['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0xcfb968(0x1d7));let _0x40186b=0x0,_0x1cdde7=0x0,_0x209aff;try{_0x209aff=unzipSync(_0x1417cb,{'filter'(_0x4ade44){const _0x84a0cf=_0xcfb968,_0x21a6fc=normalizeSkillRelativePath(_0x4ade44[_0x84a0cf(0x1d2)]);if(_0x21a6fc['endsWith']('/'))throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1db)+_0x21a6fc);if(_0x4ade44[_0x84a0cf(0x1dd)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1de)+_0x21a6fc);_0x40186b+=0x1;if(_0x40186b>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1cf));_0x1cdde7+=_0x4ade44[_0x84a0cf(0x1dd)];if(_0x1cdde7>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1d0));return!![];}});}catch(_0x249e4c){if(isRuntimeSkillValidationError(_0x249e4c))throw _0x249e4c;throw CliErrors[_0xcfb968(0x1d6)](_0xcfb968(0x1dc));}return Object[_0xcfb968(0x1e2)](_0x209aff)[_0xcfb968(0x1d5)](([_0x2a5657,_0x4ae2a7])=>({'path':normalizeSkillRelativePath(_0x2a5657),'bytes':Buffer['from'](_0x4ae2a7)}))[_0xcfb968(0x1d8)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x17c763){const _0x4ab5da=a97_0x2db1;return typeof _0x17c763==='object'&&_0x17c763!==null&&_0x4ab5da(0x1d4)in _0x17c763&&_0x17c763['code']===_0x4ab5da(0x1e1);}
@@ -0,0 +1 @@
1
+ (function(_0x5180da,_0x30d325){const _0x4e1802=a98_0x5cd1,_0x5b3957=_0x5180da();while(!![]){try{const _0x13b751=parseInt(_0x4e1802(0xc0))/0x1*(parseInt(_0x4e1802(0xe1))/0x2)+parseInt(_0x4e1802(0xb9))/0x3+-parseInt(_0x4e1802(0xc2))/0x4+-parseInt(_0x4e1802(0xb7))/0x5+-parseInt(_0x4e1802(0xe0))/0x6*(parseInt(_0x4e1802(0xdb))/0x7)+parseInt(_0x4e1802(0xc5))/0x8+parseInt(_0x4e1802(0xb8))/0x9*(parseInt(_0x4e1802(0xd5))/0xa);if(_0x13b751===_0x30d325)break;else _0x5b3957['push'](_0x5b3957['shift']());}catch(_0x3f9605){_0x5b3957['push'](_0x5b3957['shift']());}}}(a98_0x4be2,0xa54ed));import{CliErrors}from'../../errors.js';import{MAX_SKILL_PACKAGE_BYTES,SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a98_0x5cd1(_0x566dc5,_0x530b38){_0x566dc5=_0x566dc5-0xb4;const _0x4be223=a98_0x4be2();let _0x5cd118=_0x4be223[_0x566dc5];return _0x5cd118;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x6d9758){const _0x5bb877=a98_0x5cd1,_0x2d7321=normalizeLocalFiles(_0x6d9758);if(!_0x2d7321[_0x5bb877(0xd6)](_0xb47ef1=>_0xb47ef1[_0x5bb877(0xbf)]===SKILL_FILE))throw CliErrors['validation'](_0x5bb877(0xb4)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x1e78e4=localFilesToManifestFiles(_0x2d7321),_0x2d7af8=createDeterministicZipPackage(_0x2d7321);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x1e78e4),'zipSha256':bufferSha256(_0x2d7af8),'zipSize':_0x2d7af8[_0x5bb877(0xcf)],'files':_0x1e78e4},'packageBytes':_0x2d7af8,'packageBase64':_0x2d7af8['toString'](_0x5bb877(0xbc))};}export function verifyRuntimeSkillPackage(_0x44bd9c,_0x5b71ed){const _0x3cab1c=a98_0x5cd1,_0x1d1291=normalizePackageManifest(_0x44bd9c,{'requireOssPath':![]});if(!_0x1d1291)throw CliErrors[_0x3cab1c(0xd7)](_0x3cab1c(0xd3));return extractAndVerifyPackage(_0x1d1291,_0x5b71ed);}export function verifyRuntimeSkillBundle(_0xeadf5,_0x438e67){const _0x131e2d=a98_0x5cd1,_0x2af11f=normalizePackageManifest(_0xeadf5,{'requireOssPath':![]});if(!_0x2af11f)throw CliErrors['validation'](_0x131e2d(0xd3));if(_0x438e67[_0x131e2d(0xcf)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');return extractAndVerifyPackageFiles(_0x2af11f,_0x438e67);}export function tryNormalizePackageManifest(_0x5ded04){return normalizePackageManifest(_0x5ded04,{'requireOssPath':![]});}export function requirePackageBytes(_0x36813b,_0x457060){const _0x272554=a98_0x5cd1;if(!_0x457060||_0x457060['length']===0x0)throw CliErrors[_0x272554(0xd7)](_0x272554(0xcc)+_0x36813b);if(_0x457060[_0x272554(0xcf)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x272554(0xd7)](_0x272554(0xdd)+_0x36813b);return _0x457060;}function a98_0x4be2(){const _0x4fbb12=['sha256','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','map','6DWweEJ','106XDcohx','set','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','has','Missing\x20','files','push','5340565bHPAzy','9lHCSfb','2563737qwQGjp','isSafeInteger','ossPath','base64','bytes','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','path','7249TgVypp','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','5291980bxgduN','string','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','8379752FsXudh','isArray','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','get','object','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','toLowerCase','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','length','zipSha256','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','size','10247110JMTBPp','some','validation','requireOssPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','zipSize','1699229aNXCxj'];a98_0x4be2=function(){return _0x4fbb12;};return a98_0x4be2();}export function extractDownloadedPackage(_0x3f655){const _0x1fd667=a98_0x5cd1,_0x85f58b=parseZipPackage(_0x3f655)[_0x1fd667(0xdf)](_0x575ce8=>({'path':_0x575ce8[_0x1fd667(0xbf)],'bytes':_0x575ce8[_0x1fd667(0xbd)]}));if(!_0x85f58b[_0x1fd667(0xd6)](_0x3ba25d=>_0x3ba25d[_0x1fd667(0xbf)]===SKILL_FILE))throw CliErrors[_0x1fd667(0xd7)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x85f58b);}export function localFilesToManifestFiles(_0x5d6bd2){const _0x574beb=a98_0x5cd1;return normalizeLocalFiles(_0x5d6bd2)[_0x574beb(0xdf)](_0x9618ff=>({'path':_0x9618ff[_0x574beb(0xbf)],'sha256':fileHash(_0x9618ff),'size':fileContent(_0x9618ff)[_0x574beb(0xcf)]}));}function normalizePackageManifest(_0x249157,_0x53a35d){const _0x264821=a98_0x5cd1;if(!_0x249157||typeof _0x249157!==_0x264821(0xca)||Array[_0x264821(0xc6)](_0x249157))return undefined;const _0x18fea0=_0x249157,_0x17b86f=typeof _0x18fea0[_0x264821(0xbb)]===_0x264821(0xc3)?_0x18fea0[_0x264821(0xbb)]['trim']():undefined;if(_0x53a35d[_0x264821(0xd8)]&&!_0x17b86f)return undefined;if(!Array[_0x264821(0xc6)](_0x18fea0[_0x264821(0xb5)])||_0x18fea0[_0x264821(0xb5)][_0x264821(0xcf)]===0x0)return undefined;if(!isSha256Hex(_0x18fea0['treeSha256']))throw CliErrors[_0x264821(0xd7)](_0x264821(0xd9));if(!isSha256Hex(_0x18fea0[_0x264821(0xd0)]))throw CliErrors[_0x264821(0xd7)](_0x264821(0xc1));if(!Number['isSafeInteger'](_0x18fea0[_0x264821(0xda)])||_0x18fea0[_0x264821(0xda)]<0x0)throw CliErrors[_0x264821(0xd7)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');if(_0x18fea0[_0x264821(0xda)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x264821(0xe3));const _0x150ec3=normalizeManifestFiles(_0x18fea0[_0x264821(0xb5)]);if(!_0x150ec3[_0x264821(0xd6)](_0x290494=>_0x290494[_0x264821(0xbf)]===SKILL_FILE))throw CliErrors[_0x264821(0xd7)](_0x264821(0xbe)+SKILL_FILE+'.');const _0x1eb696=fileTreeHash(_0x150ec3);if(_0x1eb696!==_0x18fea0['treeSha256'][_0x264821(0xcd)]())throw CliErrors['validation'](_0x264821(0xc4));return{'schemaVersion':Number[_0x264821(0xba)](_0x18fea0[_0x264821(0xc7)])?_0x18fea0['schemaVersion']:0x2,'ossPath':_0x17b86f,'treeSha256':_0x1eb696,'zipSha256':_0x18fea0[_0x264821(0xd0)][_0x264821(0xcd)](),'zipSize':_0x18fea0[_0x264821(0xda)],'files':_0x150ec3};}function extractAndVerifyPackage(_0x3c173a,_0x2a4837){const _0x2e1cac=a98_0x5cd1,_0x2fdfbf=normalizePackageManifest(_0x3c173a,{'requireOssPath':![]});if(!_0x2fdfbf)throw CliErrors[_0x2e1cac(0xd7)](_0x2e1cac(0xd3));if(_0x2a4837[_0x2e1cac(0xcf)]!==_0x2fdfbf[_0x2e1cac(0xda)])throw CliErrors['validation'](_0x2e1cac(0xcb));const _0x53d998=bufferSha256(_0x2a4837);if(_0x53d998!==_0x2fdfbf[_0x2e1cac(0xd0)])throw CliErrors[_0x2e1cac(0xd7)](_0x2e1cac(0xce));return extractAndVerifyPackageFiles(_0x2fdfbf,_0x2a4837);}function extractAndVerifyPackageFiles(_0x11b642,_0x57e6fb){const _0x27538e=a98_0x5cd1,_0x1d6b39=parseZipPackage(_0x57e6fb);if(_0x1d6b39[_0x27538e(0xcf)]!==_0x11b642[_0x27538e(0xb5)][_0x27538e(0xcf)])throw CliErrors['validation'](_0x27538e(0xde));const _0x3e5300=new Map();for(const _0x543b38 of _0x1d6b39){if(_0x3e5300[_0x27538e(0xe4)](_0x543b38[_0x27538e(0xbf)]))throw CliErrors[_0x27538e(0xd7)](_0x27538e(0xd2)+_0x543b38[_0x27538e(0xbf)]);_0x3e5300[_0x27538e(0xe2)](_0x543b38[_0x27538e(0xbf)],_0x543b38);}const _0x112899=[];for(const _0x44accf of _0x11b642[_0x27538e(0xb5)]){const _0xf8d8b6=_0x3e5300[_0x27538e(0xc9)](_0x44accf[_0x27538e(0xbf)]);if(!_0xf8d8b6)throw CliErrors[_0x27538e(0xd7)](_0x27538e(0xc8)+_0x44accf['path']);if(_0xf8d8b6[_0x27538e(0xbd)][_0x27538e(0xcf)]!==_0x44accf[_0x27538e(0xd4)])throw CliErrors['validation'](_0x27538e(0xd1)+_0x44accf[_0x27538e(0xbf)]);const _0x322f7f=bufferSha256(_0xf8d8b6['bytes']);if(_0x322f7f!==_0x44accf[_0x27538e(0xdc)])throw CliErrors[_0x27538e(0xd7)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x44accf[_0x27538e(0xbf)]);_0x112899[_0x27538e(0xb6)]({'path':_0x44accf['path'],'bytes':_0xf8d8b6[_0x27538e(0xbd)]});}return normalizeLocalFiles(_0x112899);}
@@ -1 +1 @@
1
- const a76_0x4de48c=a76_0x41d9;(function(_0x2e59a3,_0x334e26){const _0x14afae=a76_0x41d9,_0x1036af=_0x2e59a3();while(!![]){try{const _0x286f16=parseInt(_0x14afae(0x20b))/0x1*(parseInt(_0x14afae(0x279))/0x2)+parseInt(_0x14afae(0x249))/0x3*(-parseInt(_0x14afae(0x21d))/0x4)+parseInt(_0x14afae(0x1f6))/0x5+-parseInt(_0x14afae(0x27f))/0x6*(parseInt(_0x14afae(0x29b))/0x7)+-parseInt(_0x14afae(0x256))/0x8+-parseInt(_0x14afae(0x1ed))/0x9+-parseInt(_0x14afae(0x2b6))/0xa*(-parseInt(_0x14afae(0x231))/0xb);if(_0x286f16===_0x334e26)break;else _0x1036af['push'](_0x1036af['shift']());}catch(_0x2e3a01){_0x1036af['push'](_0x1036af['shift']());}}}(a76_0x4a84,0xe13c0));import{createHash}from'node:crypto';import{inflateRawSync}from'node:zlib';import{existsSync,lstatSync,mkdirSync,readdirSync,readFileSync,readlinkSync,realpathSync,renameSync,rmSync,symlinkSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{basename,dirname,isAbsolute,relative,resolve,sep}from'node:path';import{fingerprintAccessKey}from'../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../constant/product.js';import{CliErrors}from'../errors.js';const METADATA_FILE=a76_0x4de48c(0x24d),SKILL_FILE=a76_0x4de48c(0x232),MAX_SKILL_FILE_COUNT=0xc8,MAX_SKILL_FILE_BYTES=0x100*0x400,MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400,MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400,IGNORED_FILE_NAMES=new Set([METADATA_FILE,a76_0x4de48c(0x259)]),IGNORED_DIR_NAMES=new Set([a76_0x4de48c(0x29e),'.hg',a76_0x4de48c(0x1fb),'node_modules','.next',a76_0x4de48c(0x29a),a76_0x4de48c(0x295),a76_0x4de48c(0x271),a76_0x4de48c(0x1f3),'.cache']),ZIP_LOCAL_FILE_HEADER_SIGNATURE=0x4034b50,ZIP_CENTRAL_DIRECTORY_SIGNATURE=0x2014b50,ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE=0x6054b50,ZIP_GENERAL_PURPOSE_UTF8=0x800,ZIP_METHOD_STORE=0x0,ZIP_METHOD_DEFLATE=0x8,ZIP_FIXED_DOS_TIME=0x0,ZIP_FIXED_DOS_DATE=0x21,CRC32_TABLE=createCrc32Table();export function resolveSkillSyncPaths(_0xc476ed={}){const _0x2d7184=a76_0x4de48c,_0x18c5c5=_0xc476ed['homeDir']??homedir(),_0x565a5d=resolve(_0x18c5c5,PRODUCT_CONFIG[_0x2d7184(0x26d)],'cache'),_0x807f5a=trimmedEnv(_0x2d7184(0x285)),_0x680fa7=trimmedEnv(_0x2d7184(0x26c));return{'homeDir':_0x18c5c5,'cacheRoot':_0x565a5d,'managedRoot':resolve(_0x18c5c5,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0xc476ed[_0x2d7184(0x2a5)]??_0x807f5a??resolve(_0x18c5c5,_0x2d7184(0x297),_0x2d7184(0x2b7)),'claudeSkillsDir':_0xc476ed['claudeSkillsDir']??_0x680fa7??resolve(_0x18c5c5,_0x2d7184(0x2bc),_0x2d7184(0x2b7))};}export function getRuntimeSkillCacheRoot(_0x2636bd,_0x320e17,_0x18a8c8={}){const _0x340244=a76_0x4de48c,_0x27b4ca=resolveSkillSyncPaths(_0x18a8c8);return resolve(_0x27b4ca['cacheRoot'],_0x2636bd,fingerprintAccessKey(_0x320e17),_0x340244(0x2b7));}export function getRuntimeSkillDir(_0x257f6c,_0x5db43e,_0x7a89d7,_0x2a605e,_0x44f547,_0x4ed6e4={}){const _0x49d94f=a76_0x4de48c;return resolve(getRuntimeSkillCacheRoot(_0x257f6c,_0x5db43e,_0x4ed6e4),safePathSegment(_0x7a89d7,_0x49d94f(0x250)),_0x2a605e,safePathSegment(_0x44f547,_0x49d94f(0x22e)));}export function listLocalRuntimeSkills(_0x22204c,_0x50b5d4={}){const _0x316503=a76_0x4de48c,_0x55412a=safePathSegment(_0x22204c['appCode'],_0x316503(0x250)),_0x43b821=normalizeRuntimeSkillScopes(_0x22204c['scopes']),_0x42054f=new Set(_0x43b821),_0xf36bcb=_0x22204c[_0x316503(0x2af)]?.['trim'](),_0x4bbe08=new Map(),_0x4717f9=resolve(getRuntimeSkillCacheRoot(_0x22204c[_0x316503(0x213)],_0x22204c[_0x316503(0x23d)],_0x50b5d4),_0x55412a);for(const _0x11b8ff of _0x43b821){for(const _0xbb6571 of localSkillEntryDirs(resolve(_0x4717f9,_0x11b8ff))){collectLocalRuntimeSkill(_0x4bbe08,_0xbb6571,{'appCode':_0x55412a,'scopes':_0x42054f,'code':_0xf36bcb,'source':_0x316503(0x208)});}}const _0xd0ccd1=resolveSkillSyncPaths(_0x50b5d4);for(const _0x2c8d7d of[_0xd0ccd1['agentsSkillsDir'],_0xd0ccd1[_0x316503(0x258)]]){for(const _0x9ea58a of localSkillLinkCandidates(_0x2c8d7d,_0x55412a,_0x42054f)){collectLocalRuntimeSkill(_0x4bbe08,_0x9ea58a,{'appCode':_0x55412a,'scopes':_0x42054f,'code':_0xf36bcb,'source':_0x316503(0x2bd),'linkedPath':_0x9ea58a});}}return Array[_0x316503(0x290)](_0x4bbe08[_0x316503(0x27c)]())[_0x316503(0x27a)](compareLocalRuntimeSkills);}export function contentHash(_0x84e029){const _0x44d0e2=a76_0x4de48c;return createHash(_0x44d0e2(0x20d))[_0x44d0e2(0x254)](_0x84e029)['digest']('hex');}function fileContent(_0x58597f){const _0x3e4d9a=a76_0x4de48c;return _0x58597f[_0x3e4d9a(0x1f0)]??Buffer['from'](_0x58597f['content']??'',_0x3e4d9a(0x241));}function fileText(_0x254517){const _0x1b87fb=a76_0x4de48c;return fileContent(_0x254517)['toString'](_0x1b87fb(0x241));}function fileHash(_0xc59ab8){return bufferSha256(fileContent(_0xc59ab8));}function bufferSha256(_0x52689e){const _0x47c1b1=a76_0x4de48c;return createHash('sha256')[_0x47c1b1(0x254)](_0x52689e)[_0x47c1b1(0x263)](_0x47c1b1(0x294));}export function fileTreeHash(_0x4934c2){const _0xbdc6ab=a76_0x4de48c,_0x49a495=createHash('sha256');for(const _0xac7d7d of normalizeManifestFiles(_0x4934c2)){_0x49a495['update'](_0xac7d7d['path']),_0x49a495[_0xbdc6ab(0x254)]('\x00'),_0x49a495[_0xbdc6ab(0x254)](_0xac7d7d[_0xbdc6ab(0x20d)]),_0x49a495[_0xbdc6ab(0x254)]('\x00'),_0x49a495[_0xbdc6ab(0x254)](String(_0xac7d7d[_0xbdc6ab(0x22c)])),_0x49a495[_0xbdc6ab(0x254)]('\x00');}return _0x49a495[_0xbdc6ab(0x263)](_0xbdc6ab(0x294));}export function buildSkillPackage(_0x163eae){const _0x584f3c=a76_0x4de48c,_0x3f3b42=normalizeLocalFiles(_0x163eae);if(!_0x3f3b42[_0x584f3c(0x22f)](_0x387f0d=>_0x387f0d['path']===SKILL_FILE))throw CliErrors[_0x584f3c(0x27b)](_0x584f3c(0x244)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x5c0334=localFilesToManifestFiles(_0x3f3b42),_0x4b9217=createDeterministicZipPackage(_0x3f3b42);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c0334),'zipSha256':bufferSha256(_0x4b9217),'zipSize':_0x4b9217['length'],'files':_0x5c0334},'packageBytes':_0x4b9217,'packageBase64':_0x4b9217[_0x584f3c(0x288)](_0x584f3c(0x25c))};}export function verifyRuntimeSkillPackage(_0x33b32f,_0x5a6ac4){const _0x4623fe=a76_0x4de48c,_0x594824=normalizePackageManifest(_0x33b32f,{'requireOssPath':![]});if(!_0x594824)throw CliErrors[_0x4623fe(0x27b)](_0x4623fe(0x278));return extractAndVerifyPackage(_0x594824,_0x5a6ac4);}export function verifyRuntimeSkillBundle(_0x5b82b5,_0x49e628){const _0x340753=a76_0x4de48c,_0x4df52e=normalizePackageManifest(_0x5b82b5,{'requireOssPath':![]});if(!_0x4df52e)throw CliErrors['validation'](_0x340753(0x278));if(_0x49e628[_0x340753(0x28e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x340753(0x205));return extractAndVerifyPackageFiles(_0x4df52e,_0x49e628);}export function materializeRuntimeSkill(_0x54aaa0,_0x54e291,_0x339060){const _0x55d5c5=a76_0x4de48c,_0x5d2f58=requireSkillCode(_0x54aaa0),_0x443d85=normalizeRemoteManifest(_0x54aaa0['files']),_0x1b8b81=_0x443d85!==undefined,_0x14a354=_0x1b8b81?requirePackageBytes(_0x5d2f58,_0x339060[_0x55d5c5(0x2ab)]):undefined,_0x19f9fc=_0x1b8b81?extractAndVerifyPackage(_0x443d85,_0x14a354):[{'path':SKILL_FILE,'content':_0x54aaa0[_0x55d5c5(0x29d)]??''}],_0x1d16b0=_0x19f9fc[_0x55d5c5(0x2b4)](_0x1f52f9=>_0x1f52f9[_0x55d5c5(0x29c)]===SKILL_FILE);if(!_0x1d16b0)throw CliErrors['validation'](_0x55d5c5(0x206)+SKILL_FILE+':\x20'+_0x5d2f58);const _0x597791=fileText(_0x1d16b0);if(_0x1b8b81&&_0x54aaa0[_0x55d5c5(0x29d)]!==undefined&&_0x54aaa0[_0x55d5c5(0x29d)]!==_0x597791)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20'+SKILL_FILE+'\x20does\x20not\x20match\x20backend\x20content:\x20'+_0x5d2f58);const _0x5d59a5=withMaterializedSkillFrontmatter(_0x19f9fc,_0x54aaa0,_0x5d2f58),_0x430bfe=_0x5d59a5[_0x55d5c5(0x2b4)](_0x4bbbe8=>_0x4bbbe8[_0x55d5c5(0x29c)]===SKILL_FILE),_0x5cbe34=fileText(_0x430bfe),_0x2df584=getRuntimeSkillDir(_0x339060['env'],_0x339060[_0x55d5c5(0x23d)],_0x339060[_0x55d5c5(0x250)],_0x54e291,_0x5d2f58,_0x339060[_0x55d5c5(0x261)]),_0x4ae561=resolve(_0x2df584,SKILL_FILE),_0x5e0fca=resolve(_0x2df584,METADATA_FILE),_0x8d48ef=contentHash(_0x5cbe34),_0x218e48=readMetadataIfPresent(_0x5e0fca)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x2df584,_0x5e0fca,_0x5d59a5,_0x339060[_0x55d5c5(0x1fe)]===!![]),mkdirSync(_0x2df584,{'recursive':!![],'mode':0x1c0});const _0x25050d=existsSync(_0x4ae561)?readFileSync(_0x4ae561,_0x55d5c5(0x241)):undefined;return materializeFiles(_0x2df584,_0x5d59a5),_0x1b8b81&&removeStaleManagedFiles(_0x2df584,_0x218e48,_0x5d59a5),writeJsonAtomic(_0x5e0fca,buildMetadata(_0x54aaa0,_0x54e291,_0x339060[_0x55d5c5(0x250)],_0x8d48ef,_0x339060['pulledAt'],_0x1b8b81?_0x5d59a5:undefined)),{'skill':_0x54aaa0,'scope':_0x54e291,'dir':_0x2df584,'skillMdPath':_0x4ae561,'metadataPath':_0x5e0fca,'contentHash':_0x8d48ef,'changed':_0x25050d!==_0x5cbe34};}function withMaterializedSkillFrontmatter(_0x20acaf,_0x218c12,_0xae4da3){return normalizeLocalFiles(_0x20acaf)['map'](_0x553709=>{const _0x39d3db=a76_0x41d9,_0x1c4439=fileText(_0x553709);if(_0x553709[_0x39d3db(0x29c)]!==SKILL_FILE||hasYamlFrontmatter(_0x1c4439))return _0x553709;return{'path':_0x553709['path'],'content':prependSkillFrontmatter(_0x1c4439,{'name':_0xae4da3,'description':_0x218c12[_0x39d3db(0x245)]?.[_0x39d3db(0x230)]()||_0x218c12['skillName']?.[_0x39d3db(0x230)]()||_0xae4da3})};});}function hasYamlFrontmatter(_0x43d8ab){const _0x4656e3=a76_0x4de48c;return/^\uFEFF?---\s*\r?\n/[_0x4656e3(0x253)](_0x43d8ab);}function prependSkillFrontmatter(_0x3aa38a,_0x5dd5d8){const _0xaf1ff2=a76_0x4de48c,_0x4c3b23=_0x3aa38a[_0xaf1ff2(0x214)](/^\uFEFF/,'');return['---',_0xaf1ff2(0x246)+yamlString(_0x5dd5d8['name']),'description:\x20'+yamlString(_0x5dd5d8[_0xaf1ff2(0x245)]),'---','',_0x4c3b23][_0xaf1ff2(0x299)]('\x0a');}function yamlString(_0x2c7d85){const _0x194858=a76_0x4de48c;return JSON[_0x194858(0x23c)](_0x2c7d85[_0x194858(0x214)](/\r/g,'')[_0x194858(0x230)]());}export function linkEffectiveRuntimeSkills(_0x40d65e,_0x1ddcac,_0x4d4e63={}){const _0x45bcf0=a76_0x4de48c,_0x5192b5=new Map();for(const _0x33ad5d of _0x40d65e){const _0xf92d4f=_0x33ad5d['skill'][_0x45bcf0(0x22e)];if(!_0xf92d4f)continue;const _0x19e827=_0x5192b5[_0x45bcf0(0x21f)](_0xf92d4f);(!_0x19e827||_0x33ad5d[_0x45bcf0(0x24e)]===_0x45bcf0(0x242))&&_0x5192b5[_0x45bcf0(0x25a)](_0xf92d4f,_0x33ad5d);}const _0x3787d8=[],_0x434110=resolveSkillSyncPaths(_0x4d4e63);for(const _0x2a7275 of _0x5192b5[_0x45bcf0(0x27c)]()){const _0x143cec=requireSkillCode(_0x2a7275[_0x45bcf0(0x200)]),_0x3a1b5b=_0x1ddcac+'--'+_0x143cec;for(const _0x3ab252 of[_0x434110[_0x45bcf0(0x2a5)],_0x434110[_0x45bcf0(0x258)]]){_0x3787d8[_0x45bcf0(0x264)](ensureManagedSymlink(resolve(_0x3ab252,_0x3a1b5b),_0x2a7275[_0x45bcf0(0x27e)],_0x434110[_0x45bcf0(0x2ac)]));}}return _0x3787d8;}export function pruneStaleRuntimeSkillLinks(_0x1f0f0f,_0x992e85,_0x5c4456={},_0x14b064){const _0x39879e=a76_0x4de48c,_0x4e6553=resolveSkillSyncPaths(_0x5c4456),_0xad7eea=new Set([..._0x992e85][_0x39879e(0x2b3)](_0x17f2d9=>_0x17f2d9[_0x39879e(0x230)]())[_0x39879e(0x2a0)](Boolean)),_0x2e5f8f=_0x14b064?new Set([..._0x14b064][_0x39879e(0x2b3)](_0x1d448b=>_0x1d448b['trim']())[_0x39879e(0x2a0)](Boolean)):undefined,_0x51d238=[];for(const _0x23054e of[_0x4e6553[_0x39879e(0x2a5)],_0x4e6553[_0x39879e(0x258)]]){for(const _0x5f1915 of managedAppSkillLinkPaths(_0x23054e,_0x1f0f0f)){const _0x4612eb=basename(_0x5f1915)[_0x39879e(0x210)]((_0x1f0f0f+'--')[_0x39879e(0x28e)]);if(_0x2e5f8f&&!_0x2e5f8f[_0x39879e(0x21a)](_0x4612eb))continue;if(_0xad7eea['has'](_0x4612eb))continue;_0x51d238['push'](removeManagedSkillLink(_0x5f1915,_0x4e6553[_0x39879e(0x2ac)]));}}return _0x51d238;}export function pruneStaleRuntimeSkillCache(_0x44390b,_0x276e06={}){const _0x4800fc=a76_0x4de48c,_0xfea6b1=new Set([..._0x44390b[_0x4800fc(0x28a)]][_0x4800fc(0x2b3)](_0x586c32=>_0x586c32['trim']())[_0x4800fc(0x2a0)](Boolean)),_0x1b6b27=_0x44390b[_0x4800fc(0x20f)]?new Set([..._0x44390b[_0x4800fc(0x20f)]][_0x4800fc(0x2b3)](_0x4cb5c3=>_0x4cb5c3[_0x4800fc(0x230)]())['filter'](Boolean)):undefined,_0x27f532=_0x44390b[_0x4800fc(0x2ba)]??[_0x4800fc(0x242),_0x4800fc(0x24c)],_0x2b38aa=resolve(getRuntimeSkillCacheRoot(_0x44390b['env'],_0x44390b[_0x4800fc(0x23d)],_0x276e06),safePathSegment(_0x44390b[_0x4800fc(0x250)],_0x4800fc(0x250))),_0x3a1382=[];for(const _0x57dbf1 of _0x27f532){const _0x1b5cae=resolve(_0x2b38aa,_0x57dbf1);if(!existsSync(_0x1b5cae))continue;for(const _0x2026fd of readdirSync(_0x1b5cae,{'withFileTypes':!![]})){if(!_0x2026fd[_0x4800fc(0x2b5)]())continue;const _0xa683c1=_0x2026fd[_0x4800fc(0x223)];if(_0x1b6b27&&!_0x1b6b27[_0x4800fc(0x21a)](_0xa683c1))continue;if(_0xfea6b1[_0x4800fc(0x21a)](_0xa683c1))continue;const _0x3e6a38=resolve(_0x1b5cae,_0xa683c1),_0x795224=readMetadataIfPresent(resolve(_0x3e6a38,METADATA_FILE));if(_0x795224?.[_0x4800fc(0x250)]!==_0x44390b[_0x4800fc(0x250)]||_0x795224[_0x4800fc(0x24e)]!==_0x57dbf1||_0x795224[_0x4800fc(0x22e)]!==_0xa683c1){_0x3a1382[_0x4800fc(0x264)]({'path':_0x3e6a38,'action':_0x4800fc(0x2b2),'reason':_0x4800fc(0x226)});continue;}rmSync(_0x3e6a38,{'recursive':!![],'force':!![]}),_0x3a1382['push']({'path':_0x3e6a38,'action':_0x4800fc(0x203)});}}return _0x3a1382;}export function linkGlobalRuntimeSkills(_0xafb132,_0xe1be97={}){const _0x2e76ed=a76_0x4de48c,_0x18b0bc=resolveSkillSyncPaths(_0xe1be97),_0x4dd549=[];for(const _0x205404 of _0xafb132){if(_0x205404[_0x2e76ed(0x24e)]!==_0x2e76ed(0x238))throw CliErrors[_0x2e76ed(0x27b)](_0x2e76ed(0x21e)+_0x205404[_0x2e76ed(0x24e)]);const _0x1aa3b1=requireSkillCode(_0x205404[_0x2e76ed(0x200)]),_0x445b0d=copyManagedSkillDirectory(_0x205404[_0x2e76ed(0x27e)],resolve(_0x18b0bc[_0x2e76ed(0x2a5)],_0x1aa3b1));_0x4dd549[_0x2e76ed(0x264)]({..._0x445b0d,'contentHash':_0x205404[_0x2e76ed(0x2a9)]});}return _0x4dd549;}export function readPushDirectory(_0x29ddbb,_0x355fc9){const _0x211d19=a76_0x4de48c,_0x4551b1=resolvePushDirectoryRoot(_0x29ddbb),_0x789175=resolve(_0x4551b1,SKILL_FILE);if(!existsSync(_0x789175)||!lstatSync(_0x789175)['isFile']())throw CliErrors[_0x211d19(0x27b)]('Missing\x20'+SKILL_FILE+':\x20'+_0x789175);const _0x50e443=readMetadataIfPresent(resolve(_0x4551b1,METADATA_FILE));if(_0x50e443?.[_0x211d19(0x24e)]&&_0x50e443[_0x211d19(0x24e)]!==_0x211d19(0x242))throw CliErrors['validation'](_0x211d19(0x27d)+METADATA_FILE+_0x211d19(0x1f7)+_0x50e443[_0x211d19(0x24e)]+'\x22.');if(_0x50e443?.['appCode']&&_0x50e443[_0x211d19(0x250)]!==_0x355fc9)throw CliErrors['validation'](_0x211d19(0x2a4)+_0x50e443[_0x211d19(0x250)]+_0x211d19(0x227)+_0x355fc9+'\x22.');const _0x13d6c3=scanSkillDirectory(_0x4551b1),_0x26fc81=buildSkillPackage(_0x13d6c3),_0x3317ee=readFileSync(_0x789175,'utf8'),_0x341cf5=_0x50e443?.[_0x211d19(0x22e)]??deriveSkillCodeFromDirectory(_0x4551b1,_0x355fc9);if(!_0x341cf5)throw CliErrors['validation']('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+'\x20or\x20directory\x20name.');return{'skillCode':_0x341cf5,'metadata':_0x50e443,'input':{'skillCode':_0x341cf5,'skillName':_0x50e443?.[_0x211d19(0x267)],'description':_0x50e443?.[_0x211d19(0x245)],'content':_0x3317ee,'files':_0x26fc81[_0x211d19(0x23e)],'packageBase64':_0x26fc81[_0x211d19(0x2a3)],'tags':_0x50e443?.[_0x211d19(0x289)],'version':_0x50e443?.[_0x211d19(0x221)],'sourceSessionId':_0x50e443?.[_0x211d19(0x2b9)]}};}function resolvePushDirectoryRoot(_0x4ab934){const _0x298ee1=a76_0x4de48c,_0x47c8cc=resolve(_0x4ab934);if(!existsSync(_0x47c8cc))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x4ab934);const _0x9f4c52=lstatSync(_0x47c8cc);if(_0x9f4c52[_0x298ee1(0x2b5)]())return _0x47c8cc;if(_0x9f4c52['isSymbolicLink']()){const _0x117543=realpathSync(_0x47c8cc);if(lstatSync(_0x117543)[_0x298ee1(0x2b5)]())return _0x117543;}throw CliErrors[_0x298ee1(0x27b)](_0x298ee1(0x28c)+_0x4ab934);}export function recordPushedRuntimeSkill(_0x32fa2b,_0x598244,_0x33eb95,_0x268980={}){const _0xb15fdb=a76_0x4de48c,_0x29ab2f=resolvePushDirectoryRoot(_0x32fa2b),_0x1e4cb2=scanSkillDirectory(_0x29ab2f),_0x2253bb=_0x1e4cb2['find'](_0x3a22e1=>_0x3a22e1['path']===SKILL_FILE),_0x56d9f4=_0x2253bb?fileText(_0x2253bb):'',_0x2c7ace=tryNormalizePackageManifest(_0x598244[_0xb15fdb(0x2a8)]),_0x3de526={..._0x598244,'content':_0x598244[_0xb15fdb(0x29d)]??_0x56d9f4,'files':_0x2c7ace},_0x5d9338=_0x2c7ace?normalizeLocalFiles(_0x1e4cb2)['filter'](_0x1b5602=>_0x2c7ace['files'][_0xb15fdb(0x22f)](_0x3f7e5c=>_0x3f7e5c[_0xb15fdb(0x29c)]===_0x1b5602[_0xb15fdb(0x29c)])):undefined,_0x2a406e=buildMetadata(_0x3de526,_0x268980[_0xb15fdb(0x24e)]??'personal',_0x33eb95,contentHash(_0x3de526[_0xb15fdb(0x29d)]??''),_0x268980[_0xb15fdb(0x2a2)],_0x5d9338);writeJsonAtomic(resolve(_0x29ab2f,METADATA_FILE),_0x2a406e);}export function deriveSkillCodeFromDirectory(_0x902828,_0x41389c){const _0x2286a4=a76_0x4de48c,_0x1bf774=basename(resolve(_0x902828)),_0x4f9905=_0x41389c+'--';return _0x1bf774[_0x2286a4(0x2a1)](_0x4f9905)?_0x1bf774[_0x2286a4(0x210)](_0x4f9905[_0x2286a4(0x28e)]):_0x1bf774;}export function readMetadataIfPresent(_0x91fcff){const _0x3d2c1e=a76_0x4de48c;if(!existsSync(_0x91fcff))return undefined;try{const _0x87d62f=JSON[_0x3d2c1e(0x234)](readFileSync(_0x91fcff,_0x3d2c1e(0x241)));return _0x87d62f;}catch{throw CliErrors[_0x3d2c1e(0x27b)](_0x3d2c1e(0x23b)+METADATA_FILE+':\x20'+_0x91fcff);}}function normalizeRuntimeSkillScopes(_0x48effa){const _0x12a3da=a76_0x4de48c,_0x57ffcd=_0x48effa&&_0x48effa[_0x12a3da(0x28e)]>0x0?_0x48effa:[_0x12a3da(0x242),_0x12a3da(0x24c),_0x12a3da(0x238)],_0x59ccf7=[];for(const _0x3f9ee8 of _0x57ffcd){if(!isRuntimeSkillScope(_0x3f9ee8))throw CliErrors[_0x12a3da(0x27b)](_0x12a3da(0x225)+_0x3f9ee8);!_0x59ccf7[_0x12a3da(0x26e)](_0x3f9ee8)&&_0x59ccf7['push'](_0x3f9ee8);}return _0x59ccf7;}function isRuntimeSkillScope(_0x513ac8){const _0x336715=a76_0x4de48c;return _0x513ac8===_0x336715(0x242)||_0x513ac8===_0x336715(0x24c)||_0x513ac8===_0x336715(0x238);}function localSkillEntryDirs(_0x274a28){const _0x1ed38c=a76_0x4de48c;if(!existsSync(_0x274a28))return[];return readdirSync(_0x274a28,{'withFileTypes':!![]})['filter'](_0x514710=>_0x514710['isDirectory']()||_0x514710[_0x1ed38c(0x255)]())[_0x1ed38c(0x2b3)](_0x4bb97d=>resolve(_0x274a28,_0x4bb97d[_0x1ed38c(0x223)]));}function localSkillLinkCandidates(_0xbdff51,_0x50a722,_0x8a8520){const _0x3ac6bc=a76_0x4de48c;if(!existsSync(_0xbdff51))return[];const _0x2f7051=_0x50a722+'--';return readdirSync(_0xbdff51,{'withFileTypes':!![]})['filter'](_0x8afc46=>_0x8afc46['isDirectory']()||_0x8afc46['isSymbolicLink']())[_0x3ac6bc(0x2a0)](_0xba8642=>_0xba8642[_0x3ac6bc(0x223)][_0x3ac6bc(0x2a1)](_0x2f7051)||_0x8a8520[_0x3ac6bc(0x21a)](_0x3ac6bc(0x238)))['map'](_0x34fbc0=>resolve(_0xbdff51,_0x34fbc0[_0x3ac6bc(0x223)]));}function collectLocalRuntimeSkill(_0x21c7e9,_0x48ba74,_0x3aa365){const _0x14a6a5=a76_0x4de48c,_0x2efe13=resolve(_0x48ba74,METADATA_FILE),_0x125bfa=readMetadataIfPresent(_0x2efe13);if(!_0x125bfa)return;if(_0x125bfa[_0x14a6a5(0x250)]!==_0x3aa365[_0x14a6a5(0x250)])return;if(!isRuntimeSkillScope(_0x125bfa[_0x14a6a5(0x24e)])||!_0x3aa365['scopes'][_0x14a6a5(0x21a)](_0x125bfa[_0x14a6a5(0x24e)]))return;const _0x2e6e5c=_0x125bfa['skillCode']?.['trim']();if(!_0x2e6e5c)return;if(_0x3aa365[_0x14a6a5(0x2af)]&&_0x2e6e5c!==_0x3aa365[_0x14a6a5(0x2af)])return;const _0x38efc5=_0x125bfa[_0x14a6a5(0x24e)]+':'+_0x2e6e5c,_0x19f283=_0x3aa365[_0x14a6a5(0x23f)]?[_0x3aa365[_0x14a6a5(0x23f)]]:[],_0x45baed=_0x21c7e9[_0x14a6a5(0x21f)](_0x38efc5);if(_0x45baed){_0x3aa365[_0x14a6a5(0x281)]===_0x14a6a5(0x208)&&(_0x45baed[_0x14a6a5(0x27e)]=_0x48ba74,_0x45baed[_0x14a6a5(0x239)]=_0x48ba74,_0x45baed[_0x14a6a5(0x1f9)]=resolve(_0x48ba74,SKILL_FILE),_0x45baed[_0x14a6a5(0x1ff)]=_0x2efe13);for(const _0x1d4b43 of _0x19f283){!_0x45baed['linkedPaths'][_0x14a6a5(0x26e)](_0x1d4b43)&&_0x45baed[_0x14a6a5(0x29f)][_0x14a6a5(0x264)](_0x1d4b43);}_0x45baed[_0x14a6a5(0x29f)][_0x14a6a5(0x27a)]();return;}_0x21c7e9['set'](_0x38efc5,{..._0x125bfa,'tags':Array[_0x14a6a5(0x2a6)](_0x125bfa[_0x14a6a5(0x289)])?_0x125bfa[_0x14a6a5(0x289)]:[],'scope':_0x125bfa[_0x14a6a5(0x24e)],'source':_0x14a6a5(0x287),'dir':_0x48ba74,'cacheDir':_0x3aa365['source']===_0x14a6a5(0x208)?_0x48ba74:undefined,'skillMdPath':resolve(_0x48ba74,SKILL_FILE),'metadataPath':_0x2efe13,'linkedPaths':_0x19f283});}function compareLocalRuntimeSkills(_0x26729e,_0x556dfb){const _0x3e9008=a76_0x4de48c,_0x83a26a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x83a26a[_0x26729e['scope']]-_0x83a26a[_0x556dfb['scope']]||_0x26729e[_0x3e9008(0x22e)][_0x3e9008(0x280)](_0x556dfb['skillCode'])||_0x26729e[_0x3e9008(0x27e)]['localeCompare'](_0x556dfb[_0x3e9008(0x27e)]);}function buildMetadata(_0x12c726,_0x35ca24,_0x4f7b22,_0x3c36b9,_0x1ad832,_0x395018){const _0x565f67=a76_0x4de48c,_0xaabb4f=_0x395018?normalizeLocalFiles(_0x395018):[],_0x5a86f9=normalizePackageManifest(_0x12c726['files'],{'requireOssPath':![]}),_0x1f6a75=_0xaabb4f['length']>0x0?Object[_0x565f67(0x277)](_0xaabb4f['map'](_0x283455=>[_0x283455[_0x565f67(0x29c)],fileHash(_0x283455)])):undefined;return{'schemaVersion':_0xaabb4f[_0x565f67(0x28e)]>0x0?0x2:0x1,'id':_0x12c726['id'],'appCode':_0x4f7b22,'skillCode':requireSkillCode(_0x12c726),'skillName':_0x12c726[_0x565f67(0x267)],'description':_0x12c726[_0x565f67(0x245)],'scope':_0x35ca24,'readonly':_0x35ca24!==_0x565f67(0x242)||_0x12c726[_0x565f67(0x2aa)]===!![],'tenantCode':_0x12c726[_0x565f67(0x1fa)],'userId':_0x12c726[_0x565f67(0x20a)],'version':_0x12c726[_0x565f67(0x221)],'status':_0x12c726[_0x565f67(0x272)],'tags':Array['isArray'](_0x12c726['tags'])?_0x12c726[_0x565f67(0x289)]:[],'hasUpstreamUpdate':_0x12c726[_0x565f67(0x28f)],'forkedFromSkillId':_0x12c726[_0x565f67(0x243)],'forkedFromVersion':_0x12c726[_0x565f67(0x1fd)],'sourceSessionId':_0x12c726[_0x565f67(0x2b9)],'contentHash':_0x3c36b9,'fileHashes':_0x1f6a75,'treeHash':_0xaabb4f[_0x565f67(0x28e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xaabb4f)):_0x5a86f9?.[_0x565f67(0x24a)],'ossPath':_0x5a86f9?.[_0x565f67(0x20e)],'zipSha256':_0x5a86f9?.[_0x565f67(0x28b)],'zipSize':_0x5a86f9?.[_0x565f67(0x228)],'files':_0xaabb4f[_0x565f67(0x28e)]>0x0?_0xaabb4f[_0x565f67(0x2b3)](_0x2cf6f3=>({'path':_0x2cf6f3[_0x565f67(0x29c)],'hash':fileHash(_0x2cf6f3),'size':fileContent(_0x2cf6f3)['length']})):undefined,'pulledAt':_0x1ad832??new Date()[_0x565f67(0x222)]()};}function requireSkillCode(_0x1555be){const _0x17fc3b=a76_0x4de48c,_0x51c6f8=_0x1555be['skillCode']?.[_0x17fc3b(0x230)]();if(!_0x51c6f8)throw CliErrors['validation'](_0x17fc3b(0x2b0));return _0x51c6f8;}function trimmedEnv(_0x4bbc51){const _0x70e9c3=productEnv(_0x4bbc51)?.['trim']();return _0x70e9c3?_0x70e9c3:undefined;}function safePathSegment(_0x251102,_0x3dc123='path\x20segment'){const _0x5b04df=a76_0x4de48c;if(!_0x251102||_0x251102[_0x5b04df(0x26e)]('/')||_0x251102['includes']('\x5c')||_0x251102[_0x5b04df(0x26e)]('..'))throw CliErrors[_0x5b04df(0x27b)]('Unsafe\x20'+_0x3dc123+_0x5b04df(0x20c)+_0x251102);return _0x251102;}function ensurePulledFilesCanBeOverwritten(_0x3a55c7,_0x35acb6,_0x4999b0,_0x46421c){const _0x1d7901=a76_0x4de48c;if(_0x46421c||!existsSync(_0x35acb6))return;const _0x3d94b9=readMetadataIfPresent(_0x35acb6);if(!_0x3d94b9)return;const _0x189df8=_0x3d94b9['fileHashes']&&Object[_0x1d7901(0x296)](_0x3d94b9[_0x1d7901(0x217)])[_0x1d7901(0x28e)]>0x0?_0x3d94b9[_0x1d7901(0x217)]:undefined;if(_0x189df8)for(const [_0x21fbfb,_0x423a66]of Object[_0x1d7901(0x22d)](_0x189df8)){const _0x387eb1=resolveManagedFilePath(_0x3a55c7,_0x21fbfb);if(!existsSync(_0x387eb1))throw CliErrors['validation'](_0x1d7901(0x2b8)+_0x3a55c7,_0x1d7901(0x207)+_0x21fbfb);const _0x46b92b=lstatSync(_0x387eb1);if(!_0x46b92b['isFile']())throw CliErrors[_0x1d7901(0x27b)](_0x1d7901(0x2b8)+_0x3a55c7,_0x1d7901(0x1ee)+_0x21fbfb);const _0x59c6dd=bufferSha256(readFileSync(_0x387eb1));if(_0x59c6dd!==_0x423a66)throw CliErrors[_0x1d7901(0x27b)](_0x1d7901(0x2b8)+_0x3a55c7+_0x1d7901(0x202)+_0x21fbfb,_0x1d7901(0x1f2)+_0x21fbfb);}else{const _0x2353ff=resolve(_0x3a55c7,SKILL_FILE);if(existsSync(_0x2353ff)&&_0x3d94b9['contentHash']){const _0x19eec9=contentHash(readFileSync(_0x2353ff,_0x1d7901(0x241)));if(_0x19eec9!==_0x3d94b9[_0x1d7901(0x2a9)])throw CliErrors[_0x1d7901(0x27b)](_0x1d7901(0x286)+_0x2353ff,_0x1d7901(0x270));}}for(const _0x4aa6d9 of normalizeLocalFiles(_0x4999b0)){if(_0x189df8?.[_0x4aa6d9[_0x1d7901(0x29c)]])continue;if(!_0x189df8&&_0x4aa6d9[_0x1d7901(0x29c)]===SKILL_FILE)continue;const _0x2673aa=resolveManagedFilePath(_0x3a55c7,_0x4aa6d9[_0x1d7901(0x29c)]);if(!existsSync(_0x2673aa))continue;const _0x5bbf30=lstatSync(_0x2673aa);if(!_0x5bbf30[_0x1d7901(0x201)]())throw CliErrors[_0x1d7901(0x27b)](_0x1d7901(0x2b8)+_0x3a55c7,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x4aa6d9[_0x1d7901(0x29c)]);const _0x154a50=bufferSha256(readFileSync(_0x2673aa));if(_0x154a50!==fileHash(_0x4aa6d9))throw CliErrors[_0x1d7901(0x27b)](_0x1d7901(0x2b8)+_0x3a55c7,_0x1d7901(0x237)+_0x4aa6d9[_0x1d7901(0x29c)]);}}function a76_0x4a84(){const _0x5a8fdb=['includes','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','coverage','status','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','.tmp','writeUInt16LE','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20name.','fromEntries','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','677956hlYOjg','sort','validation','values','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','dir','9865722zeiOcG','localeCompare','source','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','copy','readUInt32LE','SKILL_ROOT','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','local','toString','tags','activeSkillCodes','zipSha256','Skill\x20directory\x20not\x20found:\x20','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20offsets.','length','hasUpstreamUpdate','from','max','unchanged','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','hex','build','keys','.agents','Runtime\x20Skill\x20package\x20CRC\x20mismatch:\x20','join','dist','7TtpMxH','path','content','.git','linkedPaths','filter','startsWith','pushedAt','packageBase64','Skill\x20metadata\x20appCode\x20\x22','agentsSkillsDir','isArray','external-symlink','files','contentHash','readonly','packageBytes','managedRoot','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20package-backed\x20Skill:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','code','Runtime\x20Skill\x20is\x20missing\x20skillCode.','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','skipped','map','find','isDirectory','2710gjScdc','skills','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','sourceSessionId','scopes','Runtime\x20Skill\x20package\x20central\x20directory\x20size\x20mismatch.','.claude','link','Runtime\x20Skill\x20package\x20has\x20truncated\x20central\x20directory.','15715809EFPYsj','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Unsafe\x20Skill\x20file\x20path:\x20','bytes','Runtime\x20Skill\x20package\x20local\x20path\x20mismatch:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','.turbo','Runtime\x20Skill\x20package\x20uses\x20unsupported\x20multi-disk\x20zip\x20format.','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','2090040GGqMtT','\x20has\x20scope=\x22','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','skillMdPath','tenantCode','.svn','schemaVersion','forkedFromVersion','force','metadataPath','skill','isFile','.\x20Changed\x20file:\x20','removed','isSafeInteger','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','cache','Runtime\x20Skill\x20package\x20is\x20missing\x20zip\x20central\x20directory.','userId','1UEBJHg','\x20for\x20local\x20path:\x20','sha256','ossPath','pruneSkillCodes','slice','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','env','replace','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','fileHashes','isBuffer','Duplicate\x20Skill\x20package\x20entry:\x20','has','endsWith','Runtime\x20Skill\x20package\x20local\x20header\x20mismatch:\x20','68LaohNi','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','get','requireOssPath','version','toISOString','name','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20entry.','Unsupported\x20runtime\x20Skill\x20scope:\x20','metadata-mismatch','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','zipSize','toLowerCase','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','concat','size','entries','skillCode','some','trim','242869tYtuWn','SKILL.md','object','parse','created','Skill\x20file\x20path\x20must\x20be\x20text.','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','builtin','cacheDir','not-managed-symlink','Invalid\x20','stringify','accessKey','manifest','linkedPath','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','utf8','personal','forkedFromSkillId','Missing\x20','description','name:\x20','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20data:\x20','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','240453oDAdau','treeSha256','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','company','lovrabet.skill.json','scope','compare','appCode','Skill\x20package\x20exceeds\x20size\x20limit.','Skill\x20file\x20exceeds\x20size\x20limit:\x20','test','update','isSymbolicLink','8518240MdEKKT','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','claudeSkillsDir','.DS_Store','set','string','base64','alloc','writeUInt32LE','Runtime\x20Skill\x20package\x20contains\x20unsupported\x20compression\x20method.','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','paths','split','digest','push','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','subarray','skillName','Runtime\x20Skill\x20package\x20contains\x20encrypted\x20entries.','Runtime\x20Skill\x20package\x20uncompressed\x20size\x20mismatch:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','readUInt16LE','CLAUDE_SKILL_ROOT','homeDirName'];a76_0x4a84=function(){return _0x5a8fdb;};return a76_0x4a84();}function scanSkillDirectory(_0x1fc8d6){const _0x2c053d=realOrResolved(_0x1fc8d6),_0xf301f1=[];let _0x12e9b8=0x0;function _0x1357b5(_0x2a3d5a){const _0x3b6093=a76_0x41d9,_0x41480a=readdirSync(_0x2a3d5a,{'withFileTypes':!![]})[_0x3b6093(0x27a)]((_0x3e0105,_0x3ef9e1)=>_0x3e0105[_0x3b6093(0x223)]['localeCompare'](_0x3ef9e1['name']));for(const _0x4cf903 of _0x41480a){if(_0x4cf903[_0x3b6093(0x2b5)]()&&IGNORED_DIR_NAMES[_0x3b6093(0x21a)](_0x4cf903[_0x3b6093(0x223)]))continue;if(IGNORED_FILE_NAMES[_0x3b6093(0x21a)](_0x4cf903[_0x3b6093(0x223)]))continue;const _0x5df859=resolve(_0x2a3d5a,_0x4cf903['name']);if(_0x4cf903[_0x3b6093(0x255)]())throw CliErrors['validation'](_0x3b6093(0x265)+_0x5df859);const _0x481828=toPosixPath(relative(_0x2c053d,_0x5df859));if(_0x4cf903[_0x3b6093(0x2b5)]()){_0x1357b5(_0x5df859);continue;}if(!_0x4cf903[_0x3b6093(0x201)]())continue;validateSkillRelativePath(_0x481828);const _0x41a5f2=readFileSync(_0x5df859);if(_0x41a5f2[_0x3b6093(0x28e)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x3b6093(0x27b)](_0x3b6093(0x252)+_0x481828);_0x12e9b8+=_0x41a5f2['length'];if(_0x12e9b8>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x3b6093(0x248));_0xf301f1[_0x3b6093(0x264)]({'path':_0x481828,'bytes':_0x41a5f2});if(_0xf301f1[_0x3b6093(0x28e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x3b6093(0x27b)](_0x3b6093(0x216));}}return _0x1357b5(_0x2c053d),normalizeLocalFiles(_0xf301f1);}function normalizeLocalFiles(_0x1ba279){const _0x31ffe1=a76_0x4de48c;if(!Array['isArray'](_0x1ba279)||_0x1ba279[_0x31ffe1(0x28e)]===0x0)return[];if(_0x1ba279[_0x31ffe1(0x28e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x31ffe1(0x27b)](_0x31ffe1(0x216));const _0x2cd329=new Map();let _0x19f0e2=0x0;for(const _0x43df6f of _0x1ba279){if(!_0x43df6f||typeof _0x43df6f!==_0x31ffe1(0x233)||typeof _0x43df6f[_0x31ffe1(0x29c)]!==_0x31ffe1(0x25b))throw CliErrors[_0x31ffe1(0x27b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x249bf3=normalizeSkillRelativePath(_0x43df6f[_0x31ffe1(0x29c)]);if(_0x2cd329[_0x31ffe1(0x21a)](_0x249bf3))throw CliErrors[_0x31ffe1(0x27b)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x249bf3);if(_0x43df6f[_0x31ffe1(0x1f0)]!==undefined&&!Buffer[_0x31ffe1(0x218)](_0x43df6f['bytes']))throw CliErrors['validation'](_0x31ffe1(0x260)+_0x249bf3);if(_0x43df6f[_0x31ffe1(0x1f0)]===undefined&&typeof _0x43df6f[_0x31ffe1(0x29d)]!=='string')throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x249bf3);const _0x1f7d84=fileContent(_0x43df6f),_0x3053bc=_0x1f7d84['length'];if(_0x3053bc>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x31ffe1(0x27b)](_0x31ffe1(0x252)+_0x249bf3);_0x19f0e2+=_0x3053bc;if(_0x19f0e2>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x31ffe1(0x27b)](_0x31ffe1(0x248));_0x2cd329[_0x31ffe1(0x25a)](_0x249bf3,{'path':_0x249bf3,'bytes':_0x1f7d84});}return Array[_0x31ffe1(0x290)](_0x2cd329[_0x31ffe1(0x27c)]())[_0x31ffe1(0x27a)](compareSkillFiles);}function normalizeManifestFiles(_0x2b2df8){const _0x27f9bb=a76_0x4de48c;if(!Array[_0x27f9bb(0x2a6)](_0x2b2df8)||_0x2b2df8[_0x27f9bb(0x28e)]===0x0)return[];if(_0x2b2df8[_0x27f9bb(0x28e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x27f9bb(0x27b)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x2edb75=new Map();let _0x2f16b0=0x0;for(const _0x45c733 of _0x2b2df8){if(!_0x45c733||typeof _0x45c733!==_0x27f9bb(0x233)||typeof _0x45c733[_0x27f9bb(0x29c)]!==_0x27f9bb(0x25b))throw CliErrors['validation'](_0x27f9bb(0x236));const _0x4b791e=normalizeSkillRelativePath(_0x45c733[_0x27f9bb(0x29c)]);if(_0x2edb75[_0x27f9bb(0x21a)](_0x4b791e))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4b791e);if(!isSha256Hex(_0x45c733[_0x27f9bb(0x20d)]))throw CliErrors[_0x27f9bb(0x27b)](_0x27f9bb(0x211)+_0x4b791e);if(!Number['isSafeInteger'](_0x45c733['size'])||_0x45c733[_0x27f9bb(0x22c)]<0x0)throw CliErrors[_0x27f9bb(0x27b)](_0x27f9bb(0x212)+_0x4b791e);if(_0x45c733[_0x27f9bb(0x22c)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x27f9bb(0x27b)](_0x27f9bb(0x252)+_0x4b791e);_0x2f16b0+=_0x45c733[_0x27f9bb(0x22c)];if(_0x2f16b0>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x27f9bb(0x27b)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x2edb75[_0x27f9bb(0x25a)](_0x4b791e,{'path':_0x4b791e,'sha256':_0x45c733[_0x27f9bb(0x20d)][_0x27f9bb(0x229)](),'size':_0x45c733[_0x27f9bb(0x22c)]});}return Array[_0x27f9bb(0x290)](_0x2edb75[_0x27f9bb(0x27c)]())[_0x27f9bb(0x27a)](compareSkillFiles);}function normalizeRemoteManifest(_0x3042d0){return normalizePackageManifest(_0x3042d0,{'requireOssPath':!![]});}function normalizePackageManifest(_0x4ce70d,_0x146e0b){const _0x242c09=a76_0x4de48c;if(!_0x4ce70d||typeof _0x4ce70d!==_0x242c09(0x233)||Array[_0x242c09(0x2a6)](_0x4ce70d))return undefined;const _0x214a63=_0x4ce70d,_0x1ff12c=typeof _0x214a63[_0x242c09(0x20e)]===_0x242c09(0x25b)?_0x214a63[_0x242c09(0x20e)][_0x242c09(0x230)]():undefined;if(_0x146e0b[_0x242c09(0x220)]&&!_0x1ff12c)return undefined;if(!Array['isArray'](_0x214a63[_0x242c09(0x2a8)])||_0x214a63[_0x242c09(0x2a8)]['length']===0x0)return undefined;if(!isSha256Hex(_0x214a63[_0x242c09(0x24a)]))throw CliErrors[_0x242c09(0x27b)](_0x242c09(0x1f8));if(!isSha256Hex(_0x214a63[_0x242c09(0x28b)]))throw CliErrors[_0x242c09(0x27b)](_0x242c09(0x257));if(!Number[_0x242c09(0x204)](_0x214a63['zipSize'])||_0x214a63[_0x242c09(0x228)]<0x0)throw CliErrors[_0x242c09(0x27b)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');if(_0x214a63[_0x242c09(0x228)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x242c09(0x27b)](_0x242c09(0x205));const _0x72d6d0=normalizeManifestFiles(_0x214a63[_0x242c09(0x2a8)]);if(!_0x72d6d0['some'](_0x1498a1=>_0x1498a1['path']===SKILL_FILE))throw CliErrors[_0x242c09(0x27b)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x7d0122=fileTreeHash(_0x72d6d0);if(_0x7d0122!==_0x214a63[_0x242c09(0x24a)]['toLowerCase']())throw CliErrors[_0x242c09(0x27b)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x242c09(0x204)](_0x214a63[_0x242c09(0x1fc)])?_0x214a63[_0x242c09(0x1fc)]:0x2,'ossPath':_0x1ff12c,'treeSha256':_0x7d0122,'zipSha256':_0x214a63['zipSha256'][_0x242c09(0x229)](),'zipSize':_0x214a63['zipSize'],'files':_0x72d6d0};}function tryNormalizeRemoteManifest(_0x555a5e){return normalizeRemoteManifest(_0x555a5e);}function tryNormalizePackageManifest(_0x170b32){return normalizePackageManifest(_0x170b32,{'requireOssPath':![]});}function requirePackageBytes(_0x3db212,_0x22a8b9){const _0x592748=a76_0x4de48c;if(!_0x22a8b9||_0x22a8b9['length']===0x0)throw CliErrors[_0x592748(0x27b)](_0x592748(0x2ad)+_0x3db212);if(_0x22a8b9[_0x592748(0x28e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x592748(0x27b)](_0x592748(0x282)+_0x3db212);return _0x22a8b9;}function localFilesToManifestFiles(_0x96b686){const _0x4ad9f6=a76_0x4de48c;return normalizeLocalFiles(_0x96b686)[_0x4ad9f6(0x2b3)](_0x54b7f1=>({'path':_0x54b7f1['path'],'sha256':fileHash(_0x54b7f1),'size':fileContent(_0x54b7f1)[_0x4ad9f6(0x28e)]}));}function isSha256Hex(_0x107b1c){const _0x27efe3=a76_0x4de48c;return typeof _0x107b1c===_0x27efe3(0x25b)&&/^[a-fA-F0-9]{64}$/[_0x27efe3(0x253)](_0x107b1c);}function extractAndVerifyPackage(_0x4c61c9,_0x1dcb53){const _0x1783da=a76_0x4de48c,_0x18acf7=normalizePackageManifest(_0x4c61c9,{'requireOssPath':![]});if(!_0x18acf7)throw CliErrors[_0x1783da(0x27b)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x1dcb53['length']!==_0x18acf7[_0x1783da(0x228)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x4d0256=bufferSha256(_0x1dcb53);if(_0x4d0256!==_0x18acf7['zipSha256'])throw CliErrors[_0x1783da(0x27b)](_0x1783da(0x293));return extractAndVerifyPackageFiles(_0x18acf7,_0x1dcb53);}function extractAndVerifyPackageFiles(_0x18ffc0,_0x428271){const _0x2be0c7=a76_0x4de48c,_0x445cc9=parseZipPackage(_0x428271);if(_0x445cc9[_0x2be0c7(0x28e)]!==_0x18ffc0[_0x2be0c7(0x2a8)][_0x2be0c7(0x28e)])throw CliErrors[_0x2be0c7(0x27b)](_0x2be0c7(0x215));const _0x418329=new Map();for(const _0x43d2e6 of _0x445cc9){if(_0x418329['has'](_0x43d2e6[_0x2be0c7(0x29c)]))throw CliErrors[_0x2be0c7(0x27b)](_0x2be0c7(0x219)+_0x43d2e6[_0x2be0c7(0x29c)]);_0x418329[_0x2be0c7(0x25a)](_0x43d2e6[_0x2be0c7(0x29c)],_0x43d2e6);}const _0x5aeb18=[];for(const _0x437257 of _0x18ffc0['files']){const _0x453911=_0x418329[_0x2be0c7(0x21f)](_0x437257['path']);if(!_0x453911)throw CliErrors[_0x2be0c7(0x27b)](_0x2be0c7(0x240)+_0x437257['path']);if(_0x453911[_0x2be0c7(0x1f0)]['length']!==_0x437257['size'])throw CliErrors[_0x2be0c7(0x27b)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x437257[_0x2be0c7(0x29c)]);const _0x4b84e6=bufferSha256(_0x453911['bytes']);if(_0x4b84e6!==_0x437257[_0x2be0c7(0x20d)])throw CliErrors[_0x2be0c7(0x27b)](_0x2be0c7(0x24b)+_0x437257[_0x2be0c7(0x29c)]);_0x5aeb18[_0x2be0c7(0x264)]({'path':_0x437257[_0x2be0c7(0x29c)],'bytes':_0x453911[_0x2be0c7(0x1f0)]});}return normalizeLocalFiles(_0x5aeb18);}function a76_0x41d9(_0x272b79,_0x17b6d0){_0x272b79=_0x272b79-0x1ec;const _0x4a84d1=a76_0x4a84();let _0x41d9f3=_0x4a84d1[_0x272b79];return _0x41d9f3;}function createDeterministicZipPackage(_0x5df383){const _0x3ecfe8=a76_0x4de48c,_0x51b924=normalizeLocalFiles(_0x5df383),_0x5de333=[],_0x55a8fb=[];let _0x3b6008=0x0;for(const _0x3be635 of _0x51b924){const _0x9240ae=Buffer[_0x3ecfe8(0x290)](_0x3be635[_0x3ecfe8(0x29c)],_0x3ecfe8(0x241)),_0x2395f7=fileContent(_0x3be635),_0x20b551=crc32(_0x2395f7),_0x343000=Buffer['alloc'](0x1e+_0x9240ae[_0x3ecfe8(0x28e)]);_0x343000[_0x3ecfe8(0x25e)](ZIP_LOCAL_FILE_HEADER_SIGNATURE,0x0),_0x343000[_0x3ecfe8(0x275)](0x14,0x4),_0x343000['writeUInt16LE'](ZIP_GENERAL_PURPOSE_UTF8,0x6),_0x343000[_0x3ecfe8(0x275)](ZIP_METHOD_STORE,0x8),_0x343000[_0x3ecfe8(0x275)](ZIP_FIXED_DOS_TIME,0xa),_0x343000[_0x3ecfe8(0x275)](ZIP_FIXED_DOS_DATE,0xc),_0x343000[_0x3ecfe8(0x25e)](_0x20b551,0xe),_0x343000[_0x3ecfe8(0x25e)](_0x2395f7[_0x3ecfe8(0x28e)],0x12),_0x343000[_0x3ecfe8(0x25e)](_0x2395f7['length'],0x16),_0x343000[_0x3ecfe8(0x275)](_0x9240ae[_0x3ecfe8(0x28e)],0x1a),_0x343000[_0x3ecfe8(0x275)](0x0,0x1c),_0x9240ae[_0x3ecfe8(0x283)](_0x343000,0x1e),_0x5de333[_0x3ecfe8(0x264)](_0x343000,_0x2395f7);const _0x5c7e5d=Buffer[_0x3ecfe8(0x25d)](0x2e+_0x9240ae[_0x3ecfe8(0x28e)]);_0x5c7e5d['writeUInt32LE'](ZIP_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x5c7e5d[_0x3ecfe8(0x275)](0x14,0x4),_0x5c7e5d[_0x3ecfe8(0x275)](0x14,0x6),_0x5c7e5d[_0x3ecfe8(0x275)](ZIP_GENERAL_PURPOSE_UTF8,0x8),_0x5c7e5d[_0x3ecfe8(0x275)](ZIP_METHOD_STORE,0xa),_0x5c7e5d['writeUInt16LE'](ZIP_FIXED_DOS_TIME,0xc),_0x5c7e5d['writeUInt16LE'](ZIP_FIXED_DOS_DATE,0xe),_0x5c7e5d[_0x3ecfe8(0x25e)](_0x20b551,0x10),_0x5c7e5d[_0x3ecfe8(0x25e)](_0x2395f7['length'],0x14),_0x5c7e5d[_0x3ecfe8(0x25e)](_0x2395f7[_0x3ecfe8(0x28e)],0x18),_0x5c7e5d[_0x3ecfe8(0x275)](_0x9240ae[_0x3ecfe8(0x28e)],0x1c),_0x5c7e5d[_0x3ecfe8(0x275)](0x0,0x1e),_0x5c7e5d['writeUInt16LE'](0x0,0x20),_0x5c7e5d[_0x3ecfe8(0x275)](0x0,0x22),_0x5c7e5d[_0x3ecfe8(0x275)](0x0,0x24),_0x5c7e5d[_0x3ecfe8(0x25e)](0x0,0x26),_0x5c7e5d['writeUInt32LE'](_0x3b6008,0x2a),_0x9240ae[_0x3ecfe8(0x283)](_0x5c7e5d,0x2e),_0x55a8fb['push'](_0x5c7e5d),_0x3b6008+=_0x343000[_0x3ecfe8(0x28e)]+_0x2395f7[_0x3ecfe8(0x28e)];}const _0x4485e8=Buffer[_0x3ecfe8(0x22b)](_0x55a8fb),_0x2ee074=_0x3b6008,_0x2369c9=_0x4485e8[_0x3ecfe8(0x28e)],_0x1dbdf=Buffer[_0x3ecfe8(0x25d)](0x16);_0x1dbdf[_0x3ecfe8(0x25e)](ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x1dbdf[_0x3ecfe8(0x275)](0x0,0x4),_0x1dbdf['writeUInt16LE'](0x0,0x6),_0x1dbdf[_0x3ecfe8(0x275)](_0x51b924[_0x3ecfe8(0x28e)],0x8),_0x1dbdf[_0x3ecfe8(0x275)](_0x51b924['length'],0xa),_0x1dbdf['writeUInt32LE'](_0x2369c9,0xc),_0x1dbdf['writeUInt32LE'](_0x2ee074,0x10),_0x1dbdf[_0x3ecfe8(0x275)](0x0,0x14);const _0x4e0333=Buffer['concat']([..._0x5de333,_0x4485e8,_0x1dbdf]);if(_0x4e0333[_0x3ecfe8(0x28e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x3ecfe8(0x251));return _0x4e0333;}function parseZipPackage(_0xc62a03){const _0x4e56e0=a76_0x4de48c;if(_0xc62a03[_0x4e56e0(0x28e)]<0x16)throw CliErrors['validation'](_0x4e56e0(0x1f5));const _0x54d11c=findEndOfCentralDirectory(_0xc62a03);if(_0x54d11c<0x0)throw CliErrors['validation'](_0x4e56e0(0x209));const _0x502114=_0xc62a03['readUInt16LE'](_0x54d11c+0x4),_0x1c18d7=_0xc62a03[_0x4e56e0(0x26b)](_0x54d11c+0x6),_0x4f8b47=_0xc62a03[_0x4e56e0(0x26b)](_0x54d11c+0xa),_0x403b43=_0xc62a03['readUInt32LE'](_0x54d11c+0xc),_0x58ba76=_0xc62a03[_0x4e56e0(0x284)](_0x54d11c+0x10);if(_0x502114!==0x0||_0x1c18d7!==0x0)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x1f4));if(_0x4f8b47>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4e56e0(0x27b)]('Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.');if(_0x58ba76+_0x403b43>_0x54d11c||_0x58ba76>=_0xc62a03[_0x4e56e0(0x28e)])throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x28d));const _0x9d24f0=[];let _0x6bde78=0x0,_0x5e429b=_0x58ba76;for(let _0x167323=0x0;_0x167323<_0x4f8b47;_0x167323+=0x1){if(_0x5e429b+0x2e>_0xc62a03['length'])throw CliErrors['validation'](_0x4e56e0(0x1ec));if(_0xc62a03[_0x4e56e0(0x284)](_0x5e429b)!==ZIP_CENTRAL_DIRECTORY_SIGNATURE)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x224));const _0x43d997=_0xc62a03['readUInt16LE'](_0x5e429b+0x8),_0x1b8826=_0xc62a03['readUInt16LE'](_0x5e429b+0xa),_0x376530=_0xc62a03[_0x4e56e0(0x284)](_0x5e429b+0x10),_0x2d5ab8=_0xc62a03['readUInt32LE'](_0x5e429b+0x14),_0x1e1906=_0xc62a03[_0x4e56e0(0x284)](_0x5e429b+0x18),_0x430f6c=_0xc62a03[_0x4e56e0(0x26b)](_0x5e429b+0x1c),_0x2673f2=_0xc62a03[_0x4e56e0(0x26b)](_0x5e429b+0x1e),_0x387536=_0xc62a03['readUInt16LE'](_0x5e429b+0x20),_0x39183a=_0xc62a03[_0x4e56e0(0x284)](_0x5e429b+0x2a),_0x1538a8=_0x5e429b+0x2e,_0x12b241=_0x1538a8+_0x430f6c;if(_0x12b241>_0xc62a03[_0x4e56e0(0x28e)])throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x276));if((_0x43d997&0x1)!==0x0)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x268));if(_0x1b8826!==ZIP_METHOD_STORE&&_0x1b8826!==ZIP_METHOD_DEFLATE)throw CliErrors['validation'](_0x4e56e0(0x25f));const _0x3b9988=normalizeSkillRelativePath(_0xc62a03[_0x4e56e0(0x266)](_0x1538a8,_0x12b241)['toString']('utf8'));if(_0x3b9988['endsWith']('/'))throw CliErrors[_0x4e56e0(0x27b)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x3b9988);if(_0x1e1906>MAX_SKILL_FILE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20'+_0x3b9988);_0x6bde78+=_0x1e1906;if(_0x6bde78>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x273));const _0xd8a6b4=readZipEntryData(_0xc62a03,_0x39183a,_0x3b9988,_0x2d5ab8),_0x399a1f=_0x1b8826===ZIP_METHOD_STORE?_0xd8a6b4:inflateRawSync(_0xd8a6b4);if(_0x399a1f[_0x4e56e0(0x28e)]!==_0x1e1906)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x269)+_0x3b9988);if(crc32(_0x399a1f)!==_0x376530)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x298)+_0x3b9988);_0x9d24f0[_0x4e56e0(0x264)]({'path':_0x3b9988,'bytes':_0x399a1f}),_0x5e429b=_0x12b241+_0x2673f2+_0x387536;}if(_0x5e429b!==_0x58ba76+_0x403b43)throw CliErrors[_0x4e56e0(0x27b)](_0x4e56e0(0x2bb));return _0x9d24f0[_0x4e56e0(0x27a)](compareSkillFiles);}function readZipEntryData(_0x2dc092,_0x145c45,_0x2487db,_0x5b501b){const _0x332d62=a76_0x4de48c;if(_0x145c45+0x1e>_0x2dc092['length'])throw CliErrors[_0x332d62(0x27b)]('Runtime\x20Skill\x20package\x20has\x20truncated\x20local\x20header:\x20'+_0x2487db);if(_0x2dc092['readUInt32LE'](_0x145c45)!==ZIP_LOCAL_FILE_HEADER_SIGNATURE)throw CliErrors[_0x332d62(0x27b)](_0x332d62(0x21c)+_0x2487db);const _0x6a030a=_0x2dc092[_0x332d62(0x26b)](_0x145c45+0x1a),_0x2c2594=_0x2dc092[_0x332d62(0x26b)](_0x145c45+0x1c),_0x199903=_0x145c45+0x1e,_0x11d671=_0x199903+_0x6a030a,_0x5923e0=_0x11d671+_0x2c2594,_0x195ad9=_0x5923e0+_0x5b501b;if(_0x11d671>_0x2dc092[_0x332d62(0x28e)]||_0x195ad9>_0x2dc092[_0x332d62(0x28e)])throw CliErrors[_0x332d62(0x27b)](_0x332d62(0x247)+_0x2487db);const _0x36d32d=normalizeSkillRelativePath(_0x2dc092[_0x332d62(0x266)](_0x199903,_0x11d671)[_0x332d62(0x288)](_0x332d62(0x241)));if(_0x36d32d!==_0x2487db)throw CliErrors[_0x332d62(0x27b)](_0x332d62(0x1f1)+_0x2487db);return _0x2dc092[_0x332d62(0x266)](_0x5923e0,_0x195ad9);}function findEndOfCentralDirectory(_0x4865fa){const _0x396512=a76_0x4de48c,_0x5dacc0=Math[_0x396512(0x291)](0x0,_0x4865fa[_0x396512(0x28e)]-0x16-0xffff);for(let _0x45ee6e=_0x4865fa[_0x396512(0x28e)]-0x16;_0x45ee6e>=_0x5dacc0;_0x45ee6e-=0x1){if(_0x4865fa['readUInt32LE'](_0x45ee6e)===ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE){const _0x2bfe93=_0x4865fa[_0x396512(0x26b)](_0x45ee6e+0x14);if(_0x45ee6e+0x16+_0x2bfe93===_0x4865fa[_0x396512(0x28e)])return _0x45ee6e;}}return-0x1;}function createCrc32Table(){const _0x28d64c=new Uint32Array(0x100);for(let _0x293681=0x0;_0x293681<0x100;_0x293681+=0x1){let _0x84ca5f=_0x293681;for(let _0x43aed6=0x0;_0x43aed6<0x8;_0x43aed6+=0x1){_0x84ca5f=(_0x84ca5f&0x1)!==0x0?0xedb88320^_0x84ca5f>>>0x1:_0x84ca5f>>>0x1;}_0x28d64c[_0x293681]=_0x84ca5f>>>0x0;}return _0x28d64c;}function crc32(_0x20433a){let _0x2327bb=0xffffffff;for(const _0x1426e3 of _0x20433a){_0x2327bb=CRC32_TABLE[(_0x2327bb^_0x1426e3)&0xff]^_0x2327bb>>>0x8;}return(_0x2327bb^0xffffffff)>>>0x0;}function compareSkillFiles(_0x5b379a,_0x7159fc){const _0x44818b=a76_0x4de48c;if(_0x5b379a[_0x44818b(0x29c)]===SKILL_FILE)return _0x7159fc[_0x44818b(0x29c)]===SKILL_FILE?0x0:-0x1;if(_0x7159fc[_0x44818b(0x29c)]===SKILL_FILE)return 0x1;return Buffer[_0x44818b(0x24f)](Buffer[_0x44818b(0x290)](_0x5b379a[_0x44818b(0x29c)],'utf8'),Buffer[_0x44818b(0x290)](_0x7159fc[_0x44818b(0x29c)],_0x44818b(0x241)));}function materializeFiles(_0x274985,_0x2842d8){const _0x11129e=a76_0x4de48c;for(const _0x393b4b of normalizeLocalFiles(_0x2842d8)){const _0x848405=resolveManagedFilePath(_0x274985,_0x393b4b[_0x11129e(0x29c)]);mkdirSync(dirname(_0x848405),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x848405,fileContent(_0x393b4b),0x180);}}function removeStaleManagedFiles(_0x48d5ff,_0x4c72a9,_0x4710ff){const _0x1f06cb=a76_0x4de48c;if(!_0x4c72a9)return;const _0x66581f=new Set(normalizeLocalFiles(_0x4710ff)['map'](_0x2d9377=>_0x2d9377[_0x1f06cb(0x29c)]));for(const _0x20947e of Object[_0x1f06cb(0x296)](_0x4c72a9)){if(_0x66581f['has'](_0x20947e))continue;const _0x6598ae=resolveManagedFilePath(_0x48d5ff,_0x20947e);existsSync(_0x6598ae)&&lstatSync(_0x6598ae)[_0x1f06cb(0x201)]()&&rmSync(_0x6598ae,{'force':!![]});}}function resolveManagedFilePath(_0x9b4e85,_0x28d7b5){const _0x258dc8=a76_0x4de48c,_0x565244=normalizeSkillRelativePath(_0x28d7b5),_0x299092=realOrResolved(_0x9b4e85),_0x1ceed3=resolve(_0x299092,..._0x565244['split']('/'));if(!isPathInside(_0x1ceed3,_0x299092))throw CliErrors['validation'](_0x258dc8(0x1ef)+_0x28d7b5);return ensureNoSymlinkInManagedPath(_0x299092,_0x565244),_0x1ceed3;}function ensureNoSymlinkInManagedPath(_0x26438a,_0x54d910){const _0x44a596=a76_0x4de48c;let _0xe54514=_0x26438a;for(const _0x30f7f7 of _0x54d910[_0x44a596(0x262)]('/')){_0xe54514=resolve(_0xe54514,_0x30f7f7);const _0x4aa39b=lstatIfPresent(_0xe54514);if(_0x4aa39b?.[_0x44a596(0x255)]())throw CliErrors[_0x44a596(0x27b)](_0x44a596(0x22a)+_0x54d910);}}function normalizeSkillRelativePath(_0x55d2ab){const _0x221ebd=a76_0x4de48c,_0x3f8f71=toPosixPath(_0x55d2ab[_0x221ebd(0x230)]());return validateSkillRelativePath(_0x3f8f71),_0x3f8f71;}function validateSkillRelativePath(_0x41b7e5){const _0x1a9ad0=a76_0x4de48c;if(!_0x41b7e5||_0x41b7e5[_0x1a9ad0(0x2a1)]('/')||_0x41b7e5[_0x1a9ad0(0x26e)]('//'))throw CliErrors[_0x1a9ad0(0x27b)](_0x1a9ad0(0x1ef)+_0x41b7e5);for(const _0x4985e4 of _0x41b7e5['split']('/')){if(!_0x4985e4||_0x4985e4==='.'||_0x4985e4==='..')throw CliErrors[_0x1a9ad0(0x27b)](_0x1a9ad0(0x1ef)+_0x41b7e5);}}function toPosixPath(_0x5850bd){return _0x5850bd['replace'](/\\/g,'/');}function ensureManagedSymlink(_0x2581ae,_0x162c68,_0x285dde){const _0x3fda39=a76_0x4de48c;mkdirSync(dirname(_0x2581ae),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2581ae)||isDanglingSymlink(_0x2581ae)){const _0x2052e1=lstatSync(_0x2581ae);if(!_0x2052e1[_0x3fda39(0x255)]())throw CliErrors[_0x3fda39(0x27b)](_0x3fda39(0x2b1)+_0x2581ae);const _0x5b8dfa=resolveSymlinkTarget(_0x2581ae);if(!isPathInside(realOrResolved(_0x5b8dfa),realOrResolved(_0x285dde)))throw CliErrors[_0x3fda39(0x27b)](_0x3fda39(0x26f)+_0x2581ae);if(realOrResolved(_0x5b8dfa)===realOrResolved(_0x162c68))return{'path':_0x2581ae,'target':_0x162c68,'action':_0x3fda39(0x292)};return unlinkSync(_0x2581ae),symlinkSync(_0x162c68,_0x2581ae,'dir'),{'path':_0x2581ae,'target':_0x162c68,'action':'updated'};}return symlinkSync(_0x162c68,_0x2581ae,_0x3fda39(0x27e)),{'path':_0x2581ae,'target':_0x162c68,'action':_0x3fda39(0x235)};}function managedAppSkillLinkPaths(_0x322c61,_0x26c0a2){const _0x2fd89a=a76_0x4de48c;if(!existsSync(_0x322c61))return[];const _0x197f6e=_0x26c0a2+'--';return readdirSync(_0x322c61,{'withFileTypes':!![]})[_0x2fd89a(0x2a0)](_0xe07d24=>_0xe07d24[_0x2fd89a(0x223)][_0x2fd89a(0x2a1)](_0x197f6e))[_0x2fd89a(0x2b3)](_0x372f34=>resolve(_0x322c61,_0x372f34[_0x2fd89a(0x223)]));}function removeManagedSkillLink(_0x2c3a7d,_0x50f44e){const _0x4b0f68=a76_0x4de48c,_0x271265=lstatIfPresent(_0x2c3a7d);if(!_0x271265?.['isSymbolicLink']())return{'path':_0x2c3a7d,'action':'skipped','reason':_0x4b0f68(0x23a)};const _0x1e0e90=resolveSymlinkTarget(_0x2c3a7d);if(!isPathInside(realOrResolved(_0x1e0e90),realOrResolved(_0x50f44e)))return{'path':_0x2c3a7d,'action':_0x4b0f68(0x2b2),'reason':_0x4b0f68(0x2a7)};return unlinkSync(_0x2c3a7d),{'path':_0x2c3a7d,'action':_0x4b0f68(0x203)};}function copyManagedSkillDirectory(_0xd1b63,_0x13a146){const _0x58e841=a76_0x4de48c,_0x569fbe=resolve(_0x13a146,METADATA_FILE),_0x1f5b3c=existsSync(_0x13a146);if(_0x1f5b3c){const _0x44855f=lstatSync(_0x13a146);if(_0x44855f[_0x58e841(0x255)]())throw CliErrors['validation'](_0x58e841(0x2ae)+_0x13a146);if(!_0x44855f[_0x58e841(0x2b5)]())throw CliErrors[_0x58e841(0x27b)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x13a146);const _0xea78e1=readMetadataIfPresent(_0x569fbe);if(_0xea78e1?.[_0x58e841(0x24e)]!==_0x58e841(0x238))throw CliErrors[_0x58e841(0x27b)](_0x58e841(0x26a)+_0x13a146);}mkdirSync(dirname(_0x13a146),{'recursive':!![],'mode':0x1c0});const _0x32c722=_0x1f5b3c?readMetadataIfPresent(_0x569fbe)?.[_0x58e841(0x2a9)]:undefined,_0x483bb1=readMetadataIfPresent(resolve(_0xd1b63,METADATA_FILE))?.[_0x58e841(0x2a9)];return _0x1f5b3c&&rmSync(_0x13a146,{'recursive':!![],'force':!![]}),copySkillDirectory(_0xd1b63,_0x13a146),{'path':_0x13a146,'target':_0xd1b63,'action':!_0x1f5b3c?_0x58e841(0x235):_0x32c722===_0x483bb1?_0x58e841(0x292):'updated'};}function copySkillDirectory(_0x1894f6,_0x2f9656){const _0x295645=a76_0x4de48c;mkdirSync(_0x2f9656,{'recursive':!![],'mode':0x1c0});for(const _0x543688 of readdirSync(_0x1894f6,{'withFileTypes':!![]})){const _0x58f8bc=resolve(_0x1894f6,_0x543688[_0x295645(0x223)]),_0xd7bc84=resolve(_0x2f9656,_0x543688[_0x295645(0x223)]);if(_0x543688['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x58f8bc);if(_0x543688[_0x295645(0x2b5)]()){copySkillDirectory(_0x58f8bc,_0xd7bc84);continue;}_0x543688[_0x295645(0x201)]()&&writeFileSync(_0xd7bc84,readFileSync(_0x58f8bc));}}function isDanglingSymlink(_0x4b7231){const _0x4a04d1=a76_0x4de48c;try{return lstatSync(_0x4b7231)[_0x4a04d1(0x255)]();}catch{return![];}}function resolveSymlinkTarget(_0x560572){const _0xafd770=readlinkSync(_0x560572);return isAbsolute(_0xafd770)?_0xafd770:resolve(dirname(_0x560572),_0xafd770);}function isPathInside(_0x215820,_0x88fcbd){const _0x56b2d7=a76_0x4de48c,_0x1f34b1=_0x215820[_0x56b2d7(0x21b)](sep)?_0x215820:''+_0x215820+sep,_0x3ff1c7=_0x88fcbd[_0x56b2d7(0x21b)](sep)?_0x88fcbd:''+_0x88fcbd+sep;return _0x215820===_0x88fcbd||_0x1f34b1[_0x56b2d7(0x2a1)](_0x3ff1c7);}function realOrResolved(_0x150ce6){try{return realpathSync(_0x150ce6);}catch{return resolve(_0x150ce6);}}function lstatIfPresent(_0xcca671){try{return lstatSync(_0xcca671);}catch{return undefined;}}function writeTextAtomic(_0x16eeae,_0x12f1f7,_0x4c8a22){const _0x44fcd6=a76_0x4de48c;writeBytesAtomic(_0x16eeae,Buffer[_0x44fcd6(0x290)](_0x12f1f7,_0x44fcd6(0x241)),_0x4c8a22);}function writeBytesAtomic(_0xe008ff,_0x267593,_0x2f4513){const _0x2ff023=a76_0x4de48c,_0x4a6d08=_0xe008ff+_0x2ff023(0x274);try{writeFileSync(_0x4a6d08,_0x267593,{'mode':_0x2f4513}),renameSync(_0x4a6d08,_0xe008ff);}catch(_0xd1a7d7){try{rmSync(_0x4a6d08,{'force':!![]});}catch{}throw _0xd1a7d7;}}function writeJsonAtomic(_0x49e06c,_0x317ffb){const _0x4628bf=a76_0x4de48c;writeTextAtomic(_0x49e06c,JSON[_0x4628bf(0x23c)](_0x317ffb,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x3b2052,_0xc02706){var _0x36e599=a99_0xddf9,_0xc63fea=_0x3b2052();while(!![]){try{var _0x48551=-parseInt(_0x36e599(0x1e0))/0x1+-parseInt(_0x36e599(0x1de))/0x2*(-parseInt(_0x36e599(0x1df))/0x3)+-parseInt(_0x36e599(0x1e5))/0x4*(parseInt(_0x36e599(0x1e4))/0x5)+-parseInt(_0x36e599(0x1e2))/0x6*(-parseInt(_0x36e599(0x1e7))/0x7)+-parseInt(_0x36e599(0x1e6))/0x8+parseInt(_0x36e599(0x1e1))/0x9*(-parseInt(_0x36e599(0x1e3))/0xa)+parseInt(_0x36e599(0x1dd))/0xb;if(_0x48551===_0xc02706)break;else _0xc63fea['push'](_0xc63fea['shift']());}catch(_0x4de156){_0xc63fea['push'](_0xc63fea['shift']());}}}(a99_0x25d2,0xe7744));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a99_0xddf9(_0x1b374e,_0x3f1bdd){_0x1b374e=_0x1b374e-0x1dd;var _0x25d2a2=a99_0x25d2();var _0xddf949=_0x25d2a2[_0x1b374e];return _0xddf949;}function a99_0x25d2(){var _0x151161=['9ZmEMDh','1414446EjiuXI','1270737GAXXxe','12Lwjbvx','30VZJOOb','185bruSRD','74148mPYSCs','9600808mtGpCl','2616362MnstpW','26194619UhimfW','1028780GWhcWU'];a99_0x25d2=function(){return _0x151161;};return a99_0x25d2();}export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,recordPushedRuntimeSkill}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
@@ -1 +1 @@
1
- function a77_0x5bde(){const _0x33de47=['110090rntBHD','57264OffJdA','335YPObZv','24fvUTAq','2569uwhYvr','696lHEdMK','3084PEsmVF','374RlKzZb','279566bLZDqQ','527175VRjHSQ','1231056kjgQRM'];a77_0x5bde=function(){return _0x33de47;};return a77_0x5bde();}(function(_0x6fa7eb,_0x16cb28){const _0x15dd87=a77_0x3c01,_0xacabb0=_0x6fa7eb();while(!![]){try{const _0x5f8d10=-parseInt(_0x15dd87(0x10c))/0x1+-parseInt(_0x15dd87(0x112))/0x2*(-parseInt(_0x15dd87(0x110))/0x3)+parseInt(_0x15dd87(0x10a))/0x4*(parseInt(_0x15dd87(0x111))/0x5)+-parseInt(_0x15dd87(0x10e))/0x6+-parseInt(_0x15dd87(0x113))/0x7*(-parseInt(_0x15dd87(0x114))/0x8)+-parseInt(_0x15dd87(0x10d))/0x9+-parseInt(_0x15dd87(0x10f))/0xa*(-parseInt(_0x15dd87(0x10b))/0xb);if(_0x5f8d10===_0x16cb28)break;else _0xacabb0['push'](_0xacabb0['shift']());}catch(_0x2bcee2){_0xacabb0['push'](_0xacabb0['shift']());}}}(a77_0x5bde,0x2310f));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a77_0x3c01(_0x4e3082,_0x5569a4){_0x4e3082=_0x4e3082-0x10a;const _0x5bde4f=a77_0x5bde();let _0x3c0128=_0x5bde4f[_0x4e3082];return _0x3c0128;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
1
+ (function(_0x4e04be,_0x44588d){const _0x315c7d=a100_0x4a34,_0x257bf8=_0x4e04be();while(!![]){try{const _0xaa681=-parseInt(_0x315c7d(0x17d))/0x1+-parseInt(_0x315c7d(0x17c))/0x2+-parseInt(_0x315c7d(0x17f))/0x3*(-parseInt(_0x315c7d(0x184))/0x4)+-parseInt(_0x315c7d(0x17e))/0x5+parseInt(_0x315c7d(0x183))/0x6+-parseInt(_0x315c7d(0x180))/0x7+-parseInt(_0x315c7d(0x181))/0x8*(-parseInt(_0x315c7d(0x182))/0x9);if(_0xaa681===_0x44588d)break;else _0x257bf8['push'](_0x257bf8['shift']());}catch(_0x426807){_0x257bf8['push'](_0x257bf8['shift']());}}}(a100_0x41b0,0x2e942));function a100_0x4a34(_0x1135db,_0x5a0f95){_0x1135db=_0x1135db-0x17c;const _0x41b0d4=a100_0x41b0();let _0x4a3433=_0x41b0d4[_0x1135db];return _0x4a3433;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a100_0x41b0(){const _0x28a26d=['8atOurM','5305752WpnISs','366354qRuDHR','715308ZWaels','281182aEaqFv','13296lEpwTo','931915FVnoZk','3qJHmKz','2088506JwXFuT'];a100_0x41b0=function(){return _0x28a26d;};return a100_0x41b0();}