@lovrabet/lovrabet-cli 2.1.15 → 2.1.16-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -0
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/function-name-adapter.js +1 -1
  41. package/lib/commands/service/index.js +1 -1
  42. package/lib/commands/service/registry.js +1 -1
  43. package/lib/commands/skill/commands/create.js +1 -1
  44. package/lib/commands/skill/commands/install.js +1 -1
  45. package/lib/commands/skill/commands/list.js +1 -1
  46. package/lib/commands/skill/commands/push.js +1 -1
  47. package/lib/commands/skill/commands/validate.js +1 -1
  48. package/lib/commands/skill/flags.js +1 -1
  49. package/lib/commands/skill/index.js +1 -1
  50. package/lib/commands/skill/manifest-helpers.js +1 -1
  51. package/lib/commands/skill/push-execute.js +1 -1
  52. package/lib/commands/skill/push-flow-helpers.js +1 -1
  53. package/lib/commands/skill/push-retarget.js +1 -1
  54. package/lib/commands/skill/scopes.js +1 -1
  55. package/lib/commands/skill/summary.js +1 -1
  56. package/lib/commands/skill/templates.js +1 -1
  57. package/lib/commands/skill/validate.js +1 -1
  58. package/lib/commands/sql/detail.js +1 -1
  59. package/lib/commands/sql/exec.js +1 -1
  60. package/lib/commands/sql/index.js +1 -1
  61. package/lib/commands/update.js +1 -1
  62. package/lib/commands/workspace/index.js +1 -1
  63. package/lib/config/schema.js +1 -1
  64. package/lib/constant/app.js +1 -1
  65. package/lib/constant/auth-mode.js +1 -1
  66. package/lib/constant/cli.js +1 -1
  67. package/lib/constant/defaults.js +1 -1
  68. package/lib/constant/distribution.js +1 -1
  69. package/lib/constant/domain.js +1 -1
  70. package/lib/constant/env.js +1 -1
  71. package/lib/constant/output.js +1 -1
  72. package/lib/constant/product.js +1 -1
  73. package/lib/constant/risk.js +1 -1
  74. package/lib/constant/url.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/db-resolver.js +1 -1
  78. package/lib/core/sdk-client.js +1 -1
  79. package/lib/errors.js +1 -1
  80. package/lib/framework/build-all-flags.js +1 -1
  81. package/lib/framework/dryrun.js +1 -1
  82. package/lib/framework/flags.js +1 -1
  83. package/lib/framework/help.js +1 -1
  84. package/lib/framework/index.js +1 -1
  85. package/lib/framework/output.js +1 -1
  86. package/lib/framework/preparse.js +1 -1
  87. package/lib/framework/rate-limit.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/lossless-json.js +1 -1
  115. package/lib/utils/params.js +1 -1
  116. package/lib/utils/platform.js +1 -1
  117. package/lib/utils/update-notice.js +1 -1
  118. package/lib/utils/version.js +1 -1
  119. package/lib/utils/write-cli-side-channel.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- const a89_0x2dfd4e=a89_0xaa98;(function(_0x18364d,_0x5b22af){const _0x2767ac=a89_0xaa98,_0x229912=_0x18364d();while(!![]){try{const _0x17ecf6=parseInt(_0x2767ac(0x183))/0x1*(parseInt(_0x2767ac(0x1a5))/0x2)+parseInt(_0x2767ac(0x184))/0x3+-parseInt(_0x2767ac(0x173))/0x4+-parseInt(_0x2767ac(0x16c))/0x5*(-parseInt(_0x2767ac(0x1a2))/0x6)+-parseInt(_0x2767ac(0x195))/0x7+-parseInt(_0x2767ac(0x1a0))/0x8*(parseInt(_0x2767ac(0x19e))/0x9)+parseInt(_0x2767ac(0x196))/0xa;if(_0x17ecf6===_0x5b22af)break;else _0x229912['push'](_0x229912['shift']());}catch(_0x142f9a){_0x229912['push'](_0x229912['shift']());}}}(a89_0x4831,0x3a45c));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';function a89_0xaa98(_0x4b8b0e,_0x48d590){_0x4b8b0e=_0x4b8b0e-0x16c;const _0x4831d1=a89_0x4831();let _0xaa98f1=_0x4831d1[_0x4b8b0e];return _0xaa98f1;}import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x57e70b){return void _0x57e70b,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x39abde,_0x455602){const _0x2a1df0=a89_0xaa98,_0x405e8e=typeof _0x455602['app']===_0x2a1df0(0x1a6)&&_0x455602['app'][_0x2a1df0(0x187)]();return{'rawFlags':_0x455602,'appCode':_0x39abde[_0x2a1df0(0x194)]||productEnv(_0x2a1df0(0x178))||(_0x405e8e?undefined:readAppCodeFromConfig()),'appCodeSource':_0x39abde['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x455602),'defaultFormat':_0x39abde['format'],'defaultPageSize':_0x39abde['pageSize'],'defaultVerbose':_0x39abde['verbose'],'riskLevel':_0x39abde['riskLevel'],'accessKey':_0x39abde[_0x2a1df0(0x191)],'env':_0x39abde['env'],'mergedCli':{'defaultApp':_0x39abde[_0x2a1df0(0x17f)],'currentApp':_0x39abde[_0x2a1df0(0x179)],'appCode':_0x39abde[_0x2a1df0(0x194)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a89_0x2dfd4e(0x174)](_0x3edd4b=>PIPELINE_FLAG_NAMES[a89_0x2dfd4e(0x186)](_0x3edd4b[a89_0x2dfd4e(0x19a)]))['map'](({name:_0x4bf0b6,type:_0x4cbddc,description:_0x2c7314})=>({'name':_0x4bf0b6,'type':_0x4cbddc,'description':_0x2c7314})),'formatOutput':formatOutput,'getCommandLabel'(_0x2d6f8a){return CLI_BIN_NAME+'\x20'+_0x2d6f8a['service']+'\x20'+_0x2d6f8a['command'];},'riskPolicy':{'onViolation'(_0x56d997){console['error'](_0x56d997);},'createError'(_0x47e4c7){const _0x85e613=a89_0x2dfd4e;return CliErrors[_0x85e613(0x16f)](_0x47e4c7);}},async 'prepare'(_0x383ec8,_0x27e087){const _0x5115b9=a89_0x2dfd4e,_0x361409=resolveAuthMode(_0x27e087);if(_0x383ec8[_0x5115b9(0x185)]!==![]){if(!_0x27e087[_0x5115b9(0x191)])throw CliErrors[_0x5115b9(0x17a)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x5115b9(0x176)]+'\x20or\x20pass\x20'+productEnvName(_0x5115b9(0x19b))+'.');const {setActiveAK:_0x16dc33}=await import('../core/api-client.js');_0x16dc33(_0x27e087[_0x5115b9(0x191)]);}let _0x88f4f6='';if(_0x383ec8[_0x5115b9(0x18e)]!==![]){_0x88f4f6=_0x27e087['appCode']??'',_0x88f4f6=await resolveExplicitAppName(_0x383ec8,_0x27e087,_0x88f4f6);if(!_0x88f4f6){await assertSelectedAppNameIsRuntimeAccessible(_0x383ec8,_0x27e087);throw CliErrors['configMissing'](_0x5115b9(0x1a4)+PRODUCT_CONFIG[_0x5115b9(0x176)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x383ec8,_0x27e087,_0x88f4f6);}if(_0x88f4f6){const {initSdkClient:_0x1cfb2d}=await import(_0x5115b9(0x18f));_0x1cfb2d({'appCode':_0x88f4f6,'env':_0x27e087[_0x5115b9(0x18a)]??'production','accessKey':_0x27e087[_0x5115b9(0x191)],'authMode':_0x361409}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x27e087[_0x5115b9(0x172)]},'numbers':{'pagesize':_0x27e087[_0x5115b9(0x175)]}},'extras':{'appCode':_0x88f4f6,'cookie':'','apiDomain':_0x27e087[_0x5115b9(0x17b)],'apiDir':'','accessKey':_0x27e087[_0x5115b9(0x191)],'envName':_0x27e087['env'],'mergedCli':_0x27e087['mergedCli']}};},async 'confirmHighRisk'({def:_0x3400cb,env:_0x3c965c,flags:_0x3e37e0,commandLabel:_0x26a788}){const _0x3e1e63=a89_0x2dfd4e;if(_0x3c965c[_0x3e1e63(0x171)]){const _0x17e65f=reconstructCommandArgv(_0x3400cb,_0x3e37e0);throw CliErrors[_0x3e1e63(0x18b)](_0x3e1e63(0x1a3)+_0x26a788+_0x3e1e63(0x198)+(_0x3e1e63(0x16d)+_0x17e65f));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3400cb,_0x26a788,_0x3e37e0),'createCancelledError':_0x3cbba4=>CliErrors[_0x3e1e63(0x16f)](_0x3cbba4)});},'mapDryRunError'(_0x5a94fa){return mapUserFacingExecuteError(_0x5a94fa);},'mapExecuteError'(_0x400dd6){return mapUserFacingExecuteError(_0x400dd6);},async 'finalize'(){const _0x3aad52=a89_0x2dfd4e;try{if(sdkClientInitialized){const {clearSdkClient:_0xc907cf}=await import(_0x3aad52(0x18f));_0xc907cf();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x37769a}=await import(_0x3aad52(0x197));_0x37769a();}}};async function resolveExplicitAppName(_0x19435f,_0x1206f1,_0x4856ca){const _0x31fa78=a89_0x2dfd4e;if(_0x19435f[_0x31fa78(0x18e)]===![])return _0x4856ca;const _0x2dcfe1=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x182)]===_0x31fa78(0x1a6)?_0x1206f1['rawFlags'][_0x31fa78(0x182)][_0x31fa78(0x187)]():'';if(!_0x2dcfe1)return _0x4856ca;const _0x50f633=typeof _0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)]==='string'&&_0x1206f1[_0x31fa78(0x193)][_0x31fa78(0x18d)][_0x31fa78(0x187)]()||productEnv(_0x31fa78(0x178));if(_0x50f633||_0x1206f1['appCodeSource']===_0x31fa78(0x190))return _0x4856ca;const {getRemoteAppList:_0x379f5a}=await import(_0x31fa78(0x192)),_0x500f86=await _0x379f5a({'env':_0x1206f1['env']??'production','accessKey':_0x1206f1[_0x31fa78(0x191)]}),_0x1ffadb=findAppByName(_0x500f86['items'],_0x2dcfe1);if(_0x1ffadb&&!isRuntimeAccessibleApp(_0x1ffadb))throw runtimeInaccessibleAppError(_0x1ffadb,'\x22'+_0x2dcfe1+'\x22');const _0x53679c=_0x1ffadb?.[_0x31fa78(0x194)]?.[_0x31fa78(0x187)]();if(_0x53679c)return _0x53679c;throw CliErrors[_0x31fa78(0x18b)](_0x31fa78(0x177)+_0x2dcfe1,'Run\x20`'+CLI_BIN_NAME+_0x31fa78(0x19c)+_0x2dcfe1+_0x31fa78(0x19d)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4ac8d9,_0x74359b){const _0x48f94b=a89_0x2dfd4e;if(_0x4ac8d9['requiresAppCode']===![]||!_0x74359b[_0x48f94b(0x191)])return;const _0x4a9cf4=(typeof _0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]===_0x48f94b(0x1a6)&&_0x74359b[_0x48f94b(0x193)][_0x48f94b(0x182)]['trim']()?_0x74359b['rawFlags'][_0x48f94b(0x182)]:_0x74359b['mergedCli']?.['currentApp']??_0x74359b[_0x48f94b(0x18c)]?.[_0x48f94b(0x17f)])?.[_0x48f94b(0x187)]();if(!_0x4a9cf4)return;const {getRemoteAppList:_0x36719b}=await import('../commands/app/remote-source.js'),_0x2dc0fb=await _0x36719b({'env':_0x74359b[_0x48f94b(0x18a)]??_0x48f94b(0x17d),'accessKey':_0x74359b[_0x48f94b(0x191)]}),_0x4fe72e=findAppByName(_0x2dc0fb[_0x48f94b(0x1a1)],_0x4a9cf4);if(_0x4fe72e&&!isRuntimeAccessibleApp(_0x4fe72e))throw runtimeInaccessibleAppError(_0x4fe72e,'\x22'+_0x4a9cf4+'\x22');}function a89_0x4831(){const _0x18c6c4=['_notice','appcode\x20\x22','env','validation','mergedCli','appcode','requiresAppCode','../core/sdk-client.js','local-alias','accessKey','../commands/app/remote-source.js','rawFlags','appCode','2142763ldyDeS','6444440GgbJTv','../core/api-client.js','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','resolve','name','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','.appcode\x20to\x20','1331901Ptudfa','update','8gVXFOS','items','24kINZml','High-risk\x20operation\x20`','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','106394TjKCXs','string','44005tncpdY','\x20\x20To\x20proceed:\x20','pretty','cancelled','service','isNonInteractive','defaultVerbose','1574912zGmDmU','filter','defaultPageSize','newConfigFileName','Unknown\x20app:\x20','APPCODE','currentApp','authRequired','apiDomain','schema','production','catch','defaultApp','includes','execute','app','1gGJGct','1060995OBxXjx','requiresAuth','has','trim'];a89_0x4831=function(){return _0x18c6c4;};return a89_0x4831();}async function assertAppCodeIsRuntimeAccessible(_0x411a9b,_0x2e887b,_0x1039d9){const _0x101bd1=a89_0x2dfd4e;if(_0x411a9b[_0x101bd1(0x18e)]===![]||!_0x2e887b[_0x101bd1(0x191)])return;const {getRemoteAppList:_0x5df7e9}=await import(_0x101bd1(0x192)),_0x308365=await _0x5df7e9({'env':_0x2e887b[_0x101bd1(0x18a)]??'production','accessKey':_0x2e887b[_0x101bd1(0x191)]}),_0x42c91c=findAppByCode(_0x308365['items'],_0x1039d9);if(_0x42c91c&&!isRuntimeAccessibleApp(_0x42c91c))throw runtimeInaccessibleAppError(_0x42c91c,_0x101bd1(0x189)+_0x1039d9+'\x22');}export async function runCommand(_0x3a98b7,_0xda11f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x3a98b7)?withUpdateNotice(_0x3a98b7):_0x3a98b7,_0xda11f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x4cf824){const _0xd30b4d=a89_0x2dfd4e;return![_0xd30b4d(0x19f),_0xd30b4d(0x17c),'doctor'][_0xd30b4d(0x180)](_0x4cf824[_0xd30b4d(0x170)]);}function withUpdateNotice(_0x4cc924){return{..._0x4cc924,async 'execute'(_0x6cf0a8){const _0x57bf8f=a89_0xaa98,_0x28453b=shouldResolveUpdateNotice(_0x6cf0a8)?resolveLatestUpdateNotice()[_0x57bf8f(0x17e)](()=>null):Promise[_0x57bf8f(0x199)](null),_0xdf72b5=await _0x4cc924[_0x57bf8f(0x181)](_0x6cf0a8);return attachUpdateNotice(_0xdf72b5,await _0x28453b);}};}function shouldResolveUpdateNotice(_0x1e2642){const _0x4549fe=a89_0x2dfd4e;return _0x1e2642['format']===_0x4549fe(0x16e)&&!_0x1e2642['nonInteractive'];}function attachUpdateNotice(_0x36d7a8,_0x357254){const _0x565f96=a89_0x2dfd4e;if(!_0x357254||!_0x36d7a8||typeof _0x36d7a8!=='object')return _0x36d7a8;const _0x387feb=_0x36d7a8,_0x2e0a5a=typeof _0x387feb[_0x565f96(0x188)]==='object'&&_0x387feb[_0x565f96(0x188)]!==null?_0x387feb[_0x565f96(0x188)]:{};return{..._0x387feb,'_notice':{..._0x2e0a5a,'update':_0x357254}};}
1
+ const a90_0x15d0f2=a90_0x4d7c;(function(_0x599efa,_0x4898de){const _0x5d269c=a90_0x4d7c,_0x547973=_0x599efa();while(!![]){try{const _0x437658=parseInt(_0x5d269c(0x19c))/0x1*(-parseInt(_0x5d269c(0x1c1))/0x2)+parseInt(_0x5d269c(0x1aa))/0x3*(parseInt(_0x5d269c(0x1b8))/0x4)+-parseInt(_0x5d269c(0x19b))/0x5+parseInt(_0x5d269c(0x1bf))/0x6+-parseInt(_0x5d269c(0x1b3))/0x7+-parseInt(_0x5d269c(0x192))/0x8+parseInt(_0x5d269c(0x1b4))/0x9;if(_0x437658===_0x4898de)break;else _0x547973['push'](_0x547973['shift']());}catch(_0x3739a9){_0x547973['push'](_0x547973['shift']());}}}(a90_0x4b19,0x34773));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(_0x3647d3){const _0x4fa8fb=a90_0x4d7c;return void _0x3647d3,AUTH_MODE[_0x4fa8fb(0x1b9)];}let sdkClientInitialized=![];function a90_0x4d7c(_0x21334c,_0x1f89cf){_0x21334c=_0x21334c-0x18a;const _0x4b19a7=a90_0x4b19();let _0x4d7cb6=_0x4b19a7[_0x21334c];return _0x4d7cb6;}export function createPipelineEnv(_0x2228e1,_0xd12d96){const _0x4c620b=a90_0x4d7c,_0x5bb03f=typeof _0xd12d96[_0x4c620b(0x1b7)]===_0x4c620b(0x1ba)&&_0xd12d96[_0x4c620b(0x1b7)][_0x4c620b(0x19d)]();return{'rawFlags':_0xd12d96,'appCode':_0x2228e1[_0x4c620b(0x1ae)]||productEnv('APPCODE')||(_0x5bb03f?undefined:readAppCodeFromConfig()),'appCodeSource':_0x2228e1['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0xd12d96),'defaultFormat':_0x2228e1[_0x4c620b(0x1a8)],'defaultPageSize':_0x2228e1['pageSize'],'defaultVerbose':_0x2228e1[_0x4c620b(0x198)],'riskLevel':_0x2228e1['riskLevel'],'accessKey':_0x2228e1['accessKey'],'env':_0x2228e1[_0x4c620b(0x1af)],'mergedCli':{'defaultApp':_0x2228e1[_0x4c620b(0x1be)],'currentApp':_0x2228e1[_0x4c620b(0x1b1)],'appCode':_0x2228e1[_0x4c620b(0x1ae)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x15d0f2(0x1c6)](_0x2e1f45=>PIPELINE_FLAG_NAMES[a90_0x15d0f2(0x193)](_0x2e1f45[a90_0x15d0f2(0x1a2)]))[a90_0x15d0f2(0x18e)](({name:_0x262f01,type:_0x4c560c,description:_0x45e180})=>({'name':_0x262f01,'type':_0x4c560c,'description':_0x45e180})),'formatOutput':formatOutput,'getCommandLabel'(_0x304a03){const _0x3ebc7f=a90_0x15d0f2;return CLI_BIN_NAME+'\x20'+_0x304a03['service']+'\x20'+_0x304a03[_0x3ebc7f(0x1bb)];},'riskPolicy':{'onViolation'(_0x43fcb8){const _0x5e5e19=a90_0x15d0f2;console[_0x5e5e19(0x1ad)](_0x43fcb8);},'createError'(_0x298304){const _0x4292b9=a90_0x15d0f2;return CliErrors[_0x4292b9(0x1b5)](_0x298304);}},async 'prepare'(_0xe24764,_0x2c9a50){const _0x54716d=a90_0x15d0f2,_0x588b20=resolveAuthMode(_0x2c9a50);if(_0xe24764['requiresAuth']!==![]){if(!_0x2c9a50[_0x54716d(0x1b2)])throw CliErrors['authRequired'](_0x54716d(0x1bc)+PRODUCT_CONFIG[_0x54716d(0x1b6)]+_0x54716d(0x18b)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0xc27d1f}=await import(_0x54716d(0x191));_0xc27d1f(_0x2c9a50[_0x54716d(0x1b2)]);}let _0x4080ac='';if(_0xe24764[_0x54716d(0x19e)]!==![]){_0x4080ac=_0x2c9a50['appCode']??'',_0x4080ac=await resolveExplicitAppName(_0xe24764,_0x2c9a50,_0x4080ac);if(!_0x4080ac){await assertSelectedAppNameIsRuntimeAccessible(_0xe24764,_0x2c9a50);throw CliErrors[_0x54716d(0x18c)](_0x54716d(0x1c5)+PRODUCT_CONFIG[_0x54716d(0x1b6)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xe24764,_0x2c9a50,_0x4080ac);}if(_0x4080ac){const {initSdkClient:_0x39bbcd}=await import(_0x54716d(0x1a3));_0x39bbcd({'appCode':_0x4080ac,'env':_0x2c9a50[_0x54716d(0x1af)]??'production','accessKey':_0x2c9a50[_0x54716d(0x1b2)],'authMode':_0x588b20}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2c9a50['defaultVerbose']},'numbers':{'pagesize':_0x2c9a50[_0x54716d(0x18f)]}},'extras':{'appCode':_0x4080ac,'cookie':'','apiDomain':_0x2c9a50[_0x54716d(0x1a0)],'apiDir':'','accessKey':_0x2c9a50[_0x54716d(0x1b2)],'envName':_0x2c9a50[_0x54716d(0x1af)],'mergedCli':_0x2c9a50[_0x54716d(0x19a)]}};},async 'confirmHighRisk'({def:_0x3a83b5,env:_0x2c1189,flags:_0x32fbac,commandLabel:_0x9d9bcc}){const _0x137525=a90_0x15d0f2;if(_0x2c1189[_0x137525(0x190)]){const _0x593bc2=reconstructCommandArgv(_0x3a83b5,_0x32fbac);throw CliErrors[_0x137525(0x194)](_0x137525(0x1b0)+_0x9d9bcc+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x137525(0x1bd)+_0x593bc2));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3a83b5,_0x9d9bcc,_0x32fbac),'createCancelledError':_0x54a166=>CliErrors['cancelled'](_0x54a166)});},'mapDryRunError'(_0x14ceb7){return mapUserFacingExecuteError(_0x14ceb7);},'mapExecuteError'(_0x3e294f){return mapUserFacingExecuteError(_0x3e294f);},async 'finalize'(){const _0x5d42cd=a90_0x15d0f2;try{if(sdkClientInitialized){const {clearSdkClient:_0x195b4e}=await import('../core/sdk-client.js');_0x195b4e();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x110f22}=await import(_0x5d42cd(0x191));_0x110f22();}}};async function resolveExplicitAppName(_0x2167e4,_0x3e1bf7,_0x59ae6c){const _0x499c3e=a90_0x15d0f2;if(_0x2167e4['requiresAppCode']===![])return _0x59ae6c;const _0x8eda78=typeof _0x3e1bf7[_0x499c3e(0x1c0)][_0x499c3e(0x1b7)]===_0x499c3e(0x1ba)?_0x3e1bf7['rawFlags'][_0x499c3e(0x1b7)][_0x499c3e(0x19d)]():'';if(!_0x8eda78)return _0x59ae6c;const _0x5cd88c=typeof _0x3e1bf7['rawFlags']['appcode']===_0x499c3e(0x1ba)&&_0x3e1bf7[_0x499c3e(0x1c0)][_0x499c3e(0x1a5)][_0x499c3e(0x19d)]()||productEnv('APPCODE');if(_0x5cd88c||_0x3e1bf7[_0x499c3e(0x18d)]===_0x499c3e(0x1a1))return _0x59ae6c;const {getRemoteAppList:_0xd1c622}=await import(_0x499c3e(0x197)),_0x279675=await _0xd1c622({'env':_0x3e1bf7[_0x499c3e(0x1af)]??_0x499c3e(0x199),'accessKey':_0x3e1bf7['accessKey']}),_0x3aa8b5=findAppByName(_0x279675[_0x499c3e(0x1c4)],_0x8eda78);if(_0x3aa8b5&&!isRuntimeAccessibleApp(_0x3aa8b5))throw runtimeInaccessibleAppError(_0x3aa8b5,'\x22'+_0x8eda78+'\x22');const _0x21d5d2=_0x3aa8b5?.[_0x499c3e(0x1ae)]?.['trim']();if(_0x21d5d2)return _0x21d5d2;throw CliErrors[_0x499c3e(0x194)]('Unknown\x20app:\x20'+_0x8eda78,_0x499c3e(0x1ac)+CLI_BIN_NAME+_0x499c3e(0x196)+_0x8eda78+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x499c3e(0x1b6)]+'.');}function a90_0x4b19(){const _0xe17522=['doctor','75828vnccZx','resolve','Run\x20`','error','appCode','env','High-risk\x20operation\x20`','currentApp','accessKey','1433873gRPprl','8678385WUYOTk','cancelled','newConfigFileName','app','4EIZYgr','ClientAk','string','command','Set\x20accessKey\x20in\x20','\x20\x20To\x20proceed:\x20','defaultApp','26916wyEqxe','rawFlags','2TUFNAz','execute','_notice','items','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','filter','update','service','\x20or\x20pass\x20','configMissing','appCodeSource','map','defaultPageSize','isNonInteractive','../core/api-client.js','1291008WOMESv','has','validation','pretty','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../commands/app/remote-source.js','verbose','production','mergedCli','495355AVmubG','313842OIqdhR','trim','requiresAppCode','catch','apiDomain','local-alias','name','../core/sdk-client.js','includes','appcode','object','appcode\x20\x22','format'];a90_0x4b19=function(){return _0xe17522;};return a90_0x4b19();}async function assertSelectedAppNameIsRuntimeAccessible(_0x1670b8,_0x5384c8){const _0x3493e8=a90_0x15d0f2;if(_0x1670b8[_0x3493e8(0x19e)]===![]||!_0x5384c8[_0x3493e8(0x1b2)])return;const _0x4fe4bc=(typeof _0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]===_0x3493e8(0x1ba)&&_0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]['trim']()?_0x5384c8[_0x3493e8(0x1c0)][_0x3493e8(0x1b7)]:_0x5384c8['mergedCli']?.['currentApp']??_0x5384c8['mergedCli']?.[_0x3493e8(0x1be)])?.[_0x3493e8(0x19d)]();if(!_0x4fe4bc)return;const {getRemoteAppList:_0x1fbbca}=await import(_0x3493e8(0x197)),_0x29aca7=await _0x1fbbca({'env':_0x5384c8[_0x3493e8(0x1af)]??_0x3493e8(0x199),'accessKey':_0x5384c8[_0x3493e8(0x1b2)]}),_0x3405bf=findAppByName(_0x29aca7[_0x3493e8(0x1c4)],_0x4fe4bc);if(_0x3405bf&&!isRuntimeAccessibleApp(_0x3405bf))throw runtimeInaccessibleAppError(_0x3405bf,'\x22'+_0x4fe4bc+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0xd22b2e,_0x4f2213,_0x351192){const _0x47d35c=a90_0x15d0f2;if(_0xd22b2e[_0x47d35c(0x19e)]===![]||!_0x4f2213['accessKey'])return;const {getRemoteAppList:_0x293ab2}=await import('../commands/app/remote-source.js'),_0x3b8c30=await _0x293ab2({'env':_0x4f2213[_0x47d35c(0x1af)]??_0x47d35c(0x199),'accessKey':_0x4f2213[_0x47d35c(0x1b2)]}),_0x320925=findAppByCode(_0x3b8c30[_0x47d35c(0x1c4)],_0x351192);if(_0x320925&&!isRuntimeAccessibleApp(_0x320925))throw runtimeInaccessibleAppError(_0x320925,_0x47d35c(0x1a7)+_0x351192+'\x22');}export async function runCommand(_0x216fe4,_0x4406b0){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x216fe4)?withUpdateNotice(_0x216fe4):_0x216fe4,_0x4406b0,runnerAdapter);}function shouldAttachUpdateNotice(_0x1b360f){const _0x5b2425=a90_0x15d0f2;return![_0x5b2425(0x1c7),'schema',_0x5b2425(0x1a9)][_0x5b2425(0x1a4)](_0x1b360f[_0x5b2425(0x18a)]);}function withUpdateNotice(_0x5177a9){return{..._0x5177a9,async 'execute'(_0x4a5cd4){const _0x56a820=a90_0x4d7c,_0x17588f=shouldResolveUpdateNotice(_0x4a5cd4)?resolveLatestUpdateNotice()[_0x56a820(0x19f)](()=>null):Promise[_0x56a820(0x1ab)](null),_0x565859=await _0x5177a9[_0x56a820(0x1c2)](_0x4a5cd4);return attachUpdateNotice(_0x565859,await _0x17588f);}};}function shouldResolveUpdateNotice(_0x119817){const _0x49901e=a90_0x15d0f2;return _0x119817[_0x49901e(0x1a8)]===_0x49901e(0x195)&&!_0x119817['nonInteractive'];}function attachUpdateNotice(_0x1510cb,_0x38ab61){const _0xbac0a0=a90_0x15d0f2;if(!_0x38ab61||!_0x1510cb||typeof _0x1510cb!=='object')return _0x1510cb;const _0x6ea783=_0x1510cb,_0x3e3327=typeof _0x6ea783[_0xbac0a0(0x1c3)]===_0xbac0a0(0x1a6)&&_0x6ea783[_0xbac0a0(0x1c3)]!==null?_0x6ea783[_0xbac0a0(0x1c3)]:{};return{..._0x6ea783,'_notice':{..._0x3e3327,'update':_0x38ab61}};}
@@ -1 +1 @@
1
- (function(_0x663364,_0x183286){const _0x35ed4b=a90_0x24dc,_0x3aff62=_0x663364();while(!![]){try{const _0x3df043=-parseInt(_0x35ed4b(0x1d2))/0x1+parseInt(_0x35ed4b(0x1d0))/0x2+parseInt(_0x35ed4b(0x1c4))/0x3+-parseInt(_0x35ed4b(0x1cb))/0x4*(parseInt(_0x35ed4b(0x1c7))/0x5)+-parseInt(_0x35ed4b(0x1cf))/0x6*(-parseInt(_0x35ed4b(0x1c2))/0x7)+parseInt(_0x35ed4b(0x1c3))/0x8*(parseInt(_0x35ed4b(0x1c5))/0x9)+parseInt(_0x35ed4b(0x1c8))/0xa;if(_0x3df043===_0x183286)break;else _0x3aff62['push'](_0x3aff62['shift']());}catch(_0x675241){_0x3aff62['push'](_0x3aff62['shift']());}}}(a90_0x128d,0x618d5));import{buildSchemaPayload as a90_0x308526}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x54f30b=a90_0x24dc,{serviceRegistry:_0x13391d,findDefinition:_0x52d6f5}=await import(_0x54f30b(0x1cc)),_0x54a6a5=new Set(_0x13391d[_0x54f30b(0x1ce)](_0x198984=>_0x198984['service'])),_0x5b534f=listDynamicServiceEntries()[_0x54f30b(0x1ca)](_0x527e35=>!_0x54a6a5[_0x54f30b(0x1cd)](_0x527e35['service'])),_0x595df6=a90_0x308526({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x13391d,_0x5b534f),'buildAllFlags':buildAllFlags,'findDefinition':(_0x5f515c,_0xd357e7)=>_0x52d6f5(_0x5f515c,_0xd357e7)??findDynamicServiceDefinition(_0x5f515c,_0xd357e7)});return normalizeSchemaPayload(_0x595df6);}function normalizeSchemaPayload(_0x3ba4a8){const _0x189689=a90_0x24dc;return{..._0x3ba4a8,'schemaVersion':0x2,'services':_0x3ba4a8[_0x189689(0x1c6)]['map'](_0x1405cb=>({..._0x1405cb,'commands':_0x1405cb[_0x189689(0x1d1)]['map'](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x55f55a){const _0x47a220=a90_0x24dc,_0x1e8c24=_0x55f55a;return{..._0x55f55a,'auth':_0x1e8c24[_0x47a220(0x1d3)]??(_0x55f55a[_0x47a220(0x1c9)]?_0x47a220(0x1d4):_0x47a220(0x1d5))};}function a90_0x24dc(_0x14b489,_0x40a16a){_0x14b489=_0x14b489-0x1c2;const _0x128d1d=a90_0x128d();let _0x24dc06=_0x128d1d[_0x14b489];return _0x24dc06;}function a90_0x128d(){const _0xb0aaaf=['auth','required','none','2037bAvZWj','214432miSiuZ','742896cYHnld','234KKXfag','services','15yTewhM','2895060lyQFpk','requiresAuth','filter','887676IgfVod','../commands/registry.js','has','map','3822qJKVNc','731666LmiRVb','commands','719912zVsSQN'];a90_0x128d=function(){return _0xb0aaaf;};return a90_0x128d();}
1
+ (function(_0x1c699f,_0x2392c8){const _0x10bc0b=a91_0x4eb8,_0x38a339=_0x1c699f();while(!![]){try{const _0x3ebed8=-parseInt(_0x10bc0b(0x179))/0x1*(parseInt(_0x10bc0b(0x16a))/0x2)+parseInt(_0x10bc0b(0x173))/0x3*(-parseInt(_0x10bc0b(0x172))/0x4)+-parseInt(_0x10bc0b(0x16e))/0x5*(-parseInt(_0x10bc0b(0x17a))/0x6)+parseInt(_0x10bc0b(0x178))/0x7+-parseInt(_0x10bc0b(0x170))/0x8+-parseInt(_0x10bc0b(0x16b))/0x9*(-parseInt(_0x10bc0b(0x16f))/0xa)+-parseInt(_0x10bc0b(0x168))/0xb*(-parseInt(_0x10bc0b(0x176))/0xc);if(_0x3ebed8===_0x2392c8)break;else _0x38a339['push'](_0x38a339['shift']());}catch(_0x522756){_0x38a339['push'](_0x38a339['shift']());}}}(a91_0x4cce,0x2242e));import{buildSchemaPayload as a91_0x37ca09}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a91_0x4eb8(_0x4ac661,_0x530f0d){_0x4ac661=_0x4ac661-0x167;const _0x4cce91=a91_0x4cce();let _0x4eb859=_0x4cce91[_0x4ac661];return _0x4eb859;}function a91_0x4cce(){const _0x2d99ca=['171NXRAyw','required','none','5MqPgzw','108890rBvSgi','1607104LRQhhQ','auth','2164zmoaXk','9RcRAyh','../commands/registry.js','service','96XAyzIY','has','708673aReqCg','283wPrWUp','931926noRxEs','map','214731iOvkGk','commands','1956ioCgUZ'];a91_0x4cce=function(){return _0x2d99ca;};return a91_0x4cce();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x562fca=a91_0x4eb8,{serviceRegistry:_0x43e838,findDefinition:_0xb33933}=await import(_0x562fca(0x174)),_0x4382fe=new Set(_0x43e838[_0x562fca(0x167)](_0xea0f38=>_0xea0f38[_0x562fca(0x175)])),_0x32e5cf=listDynamicServiceEntries()['filter'](_0x2f8c7a=>!_0x4382fe[_0x562fca(0x177)](_0x2f8c7a[_0x562fca(0x175)])),_0x1aff7e=a91_0x37ca09({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x43e838,_0x32e5cf),'buildAllFlags':buildAllFlags,'findDefinition':(_0x131e86,_0x3d9e09)=>_0xb33933(_0x131e86,_0x3d9e09)??findDynamicServiceDefinition(_0x131e86,_0x3d9e09)});return normalizeSchemaPayload(_0x1aff7e);}function normalizeSchemaPayload(_0x5cec7a){const _0x55d81f=a91_0x4eb8;return{..._0x5cec7a,'schemaVersion':0x2,'services':_0x5cec7a['services'][_0x55d81f(0x167)](_0xb39152=>({..._0xb39152,'commands':_0xb39152[_0x55d81f(0x169)][_0x55d81f(0x167)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x36b327){const _0x495809=a91_0x4eb8,_0x542fe0=_0x36b327;return{..._0x36b327,'auth':_0x542fe0[_0x495809(0x171)]??(_0x36b327['requiresAuth']?_0x495809(0x16c):_0x495809(0x16d))};}
@@ -1 +1 @@
1
- function a91_0xac5d(_0x4067de,_0x34455d){_0x4067de=_0x4067de-0x174;const _0x1a2c95=a91_0x1a2c();let _0xac5dc3=_0x1a2c95[_0x4067de];return _0xac5dc3;}(function(_0x1feb80,_0x38e901){const _0x2ccd90=a91_0xac5d,_0x1de35e=_0x1feb80();while(!![]){try{const _0x21cf9a=parseInt(_0x2ccd90(0x180))/0x1+-parseInt(_0x2ccd90(0x175))/0x2+parseInt(_0x2ccd90(0x17d))/0x3*(-parseInt(_0x2ccd90(0x181))/0x4)+-parseInt(_0x2ccd90(0x176))/0x5*(parseInt(_0x2ccd90(0x179))/0x6)+-parseInt(_0x2ccd90(0x17c))/0x7+-parseInt(_0x2ccd90(0x17f))/0x8*(-parseInt(_0x2ccd90(0x178))/0x9)+parseInt(_0x2ccd90(0x17e))/0xa;if(_0x21cf9a===_0x38e901)break;else _0x1de35e['push'](_0x1de35e['shift']());}catch(_0x3c8599){_0x1de35e['push'](_0x1de35e['shift']());}}}(a91_0x1a2c,0xb4137));export function insertDynamicServicesAfterServiceTree(_0x5cd2be,_0x34f4f1){const _0xfa3fc=a91_0xac5d;if(_0x34f4f1[_0xfa3fc(0x174)]===0x0)return[..._0x5cd2be];const _0xa68644=_0x5cd2be[_0xfa3fc(0x17a)](_0x3b6f92=>_0x3b6f92[_0xfa3fc(0x177)]==='service');if(_0xa68644<0x0)return[..._0x5cd2be,..._0x34f4f1];return[..._0x5cd2be[_0xfa3fc(0x17b)](0x0,_0xa68644+0x1),..._0x34f4f1,..._0x5cd2be[_0xfa3fc(0x17b)](_0xa68644+0x1)];}function a91_0x1a2c(){const _0x4f5d3c=['34205ZNKWGP','service','8275482bqLNYr','942KzkdoQ','findIndex','slice','5956580wHhhWd','559947cZfqcC','14266150AkImEQ','8MOdnWA','823767EUGNMf','8HiKqUE','length','268028ZOBIah'];a91_0x1a2c=function(){return _0x4f5d3c;};return a91_0x1a2c();}
1
+ function a92_0x32c6(){const _0x1b3553=['length','service','slice','1069898gwOyuE','439320kaWcXl','3244844bmpefY','6535728WwbBqY','1688940KebzYx','1giDYib','findIndex','3648430hRCRRJ','2031953sPIeFk','6ydWUHo'];a92_0x32c6=function(){return _0x1b3553;};return a92_0x32c6();}(function(_0x428a68,_0x504deb){const _0x2a01a7=a92_0x1e51,_0x486c54=_0x428a68();while(!![]){try{const _0x3d2a92=parseInt(_0x2a01a7(0x1b9))/0x1*(-parseInt(_0x2a01a7(0x1b4))/0x2)+parseInt(_0x2a01a7(0x1b8))/0x3+parseInt(_0x2a01a7(0x1b6))/0x4+parseInt(_0x2a01a7(0x1ae))/0x5*(-parseInt(_0x2a01a7(0x1b0))/0x6)+-parseInt(_0x2a01a7(0x1af))/0x7+parseInt(_0x2a01a7(0x1b5))/0x8+parseInt(_0x2a01a7(0x1b7))/0x9;if(_0x3d2a92===_0x504deb)break;else _0x486c54['push'](_0x486c54['shift']());}catch(_0x5de2c9){_0x486c54['push'](_0x486c54['shift']());}}}(a92_0x32c6,0x92940));function a92_0x1e51(_0x595248,_0x36d258){_0x595248=_0x595248-0x1ae;const _0x32c6a8=a92_0x32c6();let _0x1e51cf=_0x32c6a8[_0x595248];return _0x1e51cf;}export function insertDynamicServicesAfterServiceTree(_0x32504d,_0x2e34bb){const _0x2331e5=a92_0x1e51;if(_0x2e34bb[_0x2331e5(0x1b1)]===0x0)return[..._0x32504d];const _0x4743ca=_0x32504d[_0x2331e5(0x1ba)](_0x2bf7d0=>_0x2bf7d0[_0x2331e5(0x1b2)]===_0x2331e5(0x1b2));if(_0x4743ca<0x0)return[..._0x32504d,..._0x2e34bb];return[..._0x32504d[_0x2331e5(0x1b3)](0x0,_0x4743ca+0x1),..._0x2e34bb,..._0x32504d[_0x2331e5(0x1b3)](_0x4743ca+0x1)];}
@@ -1 +1 @@
1
- function a92_0x2caf(_0x5177b2,_0x1c26ae){_0x5177b2=_0x5177b2-0xbb;var _0x579a2c=a92_0x579a();var _0x2caf16=_0x579a2c[_0x5177b2];return _0x2caf16;}function a92_0x579a(){var _0x270838=['257150AjIZIK','431336myMULO','885588HEZCqA','2572260dHWVAu','5183490WPclzr','3609621hbPmqO','4DjWwfk','10DrFSYm','843368STrjKS','126UOFOTp'];a92_0x579a=function(){return _0x270838;};return a92_0x579a();}(function(_0x297d7a,_0x524d39){var _0x3b249c=a92_0x2caf,_0x145132=_0x297d7a();while(!![]){try{var _0x54b3d2=parseInt(_0x3b249c(0xc2))/0x1+parseInt(_0x3b249c(0xc4))/0x2+-parseInt(_0x3b249c(0xbc))/0x3*(parseInt(_0x3b249c(0xc0))/0x4)+-parseInt(_0x3b249c(0xbe))/0x5+-parseInt(_0x3b249c(0xbd))/0x6+parseInt(_0x3b249c(0xc3))/0x7*(parseInt(_0x3b249c(0xbb))/0x8)+-parseInt(_0x3b249c(0xbf))/0x9*(-parseInt(_0x3b249c(0xc1))/0xa);if(_0x54b3d2===_0x524d39)break;else _0x145132['push'](_0x145132['shift']());}catch(_0x2cb85e){_0x145132['push'](_0x145132['shift']());}}}(a92_0x579a,0x8e502));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a93_0x3b1d(_0xc74b52,_0x11c69f){_0xc74b52=_0xc74b52-0x1e9;var _0x4f739f=a93_0x4f73();var _0x3b1dcc=_0x4f739f[_0xc74b52];return _0x3b1dcc;}function a93_0x4f73(){var _0xb03a28=['3828916RbYVKi','520630TXOjKK','1124388FhfULa','6169254nNkGXr','1600545JvnFja','738912MLIPlb','1448485gQMOKN'];a93_0x4f73=function(){return _0xb03a28;};return a93_0x4f73();}(function(_0x4cdf2e,_0xfa1800){var _0x284a0d=a93_0x3b1d,_0x41db23=_0x4cdf2e();while(!![]){try{var _0x26b886=parseInt(_0x284a0d(0x1ed))/0x1+-parseInt(_0x284a0d(0x1ea))/0x2+parseInt(_0x284a0d(0x1e9))/0x3+-parseInt(_0x284a0d(0x1ee))/0x4+-parseInt(_0x284a0d(0x1eb))/0x5+parseInt(_0x284a0d(0x1ef))/0x6+-parseInt(_0x284a0d(0x1ec))/0x7;if(_0x26b886===_0xfa1800)break;else _0x41db23['push'](_0x41db23['shift']());}catch(_0x5cc1f1){_0x41db23['push'](_0x41db23['shift']());}}}(a93_0x4f73,0x914ac));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a93_0x8c27f7=a93_0x3d12;(function(_0x2634ce,_0x59dd57){const _0x325900=a93_0x3d12,_0x36b4e6=_0x2634ce();while(!![]){try{const _0xf2bb2b=parseInt(_0x325900(0x10c))/0x1*(parseInt(_0x325900(0x106))/0x2)+-parseInt(_0x325900(0x102))/0x3+parseInt(_0x325900(0x100))/0x4*(parseInt(_0x325900(0x109))/0x5)+-parseInt(_0x325900(0x105))/0x6*(parseInt(_0x325900(0xff))/0x7)+-parseInt(_0x325900(0x10b))/0x8+-parseInt(_0x325900(0x108))/0x9+parseInt(_0x325900(0x101))/0xa*(parseInt(_0x325900(0x103))/0xb);if(_0xf2bb2b===_0x59dd57)break;else _0x36b4e6['push'](_0x36b4e6['shift']());}catch(_0x3fd157){_0x36b4e6['push'](_0x36b4e6['shift']());}}}(a93_0x10d6,0x21c3c));export const VERSION=a93_0x8c27f7(0x104);export const GIT_TAG='v2.1.15-beta.1';export const GIT_COMMIT=a93_0x8c27f7(0x107);function a93_0x3d12(_0x3c920e,_0x291719){_0x3c920e=_0x3c920e-0xff;const _0x10d6f5=a93_0x10d6();let _0x3d12b5=_0x10d6f5[_0x3c920e];return _0x3d12b5;}function a93_0x10d6(){const _0x474994=['211384MYxWFc','124UvJyxX','70doYiEk','4bOCBlr','116440cXHDlT','330hjLhNP','55KViDaU','2.1.15','85674jXLrpv','3804EFgQqY','00f3d96','1662399KoeHJn','991330jBSooZ','2026-07-16T11:49:15.465Z'];a93_0x10d6=function(){return _0x474994;};return a93_0x10d6();}export const BUILD_TIME=a93_0x8c27f7(0x10a);
1
+ const a94_0xecebf=a94_0x3f4a;function a94_0x5cee(){const _0x45578e=['310KEoMyL','388665qFEPPt','v2.1.16-beta.2','8223520zSvcFl','400669lIdAQg','28VCiTnI','11320177qpOTeP','1090747XlMzvV','331735ulsQkt','6cErbNk','2.1.16-beta.2','2026-07-18T09:23:20.944Z','12HjpNwo','1156383sPXYum'];a94_0x5cee=function(){return _0x45578e;};return a94_0x5cee();}function a94_0x3f4a(_0x56ee8d,_0x589d9e){_0x56ee8d=_0x56ee8d-0x15e;const _0x5ceec3=a94_0x5cee();let _0x3f4aef=_0x5ceec3[_0x56ee8d];return _0x3f4aef;}(function(_0x29da04,_0x3d57b0){const _0x4127eb=a94_0x3f4a,_0x47c9c5=_0x29da04();while(!![]){try{const _0x16dc2a=-parseInt(_0x4127eb(0x167))/0x1+-parseInt(_0x4127eb(0x15e))/0x2*(-parseInt(_0x4127eb(0x162))/0x3)+-parseInt(_0x4127eb(0x168))/0x4*(parseInt(_0x4127eb(0x16b))/0x5)+-parseInt(_0x4127eb(0x161))/0x6*(parseInt(_0x4127eb(0x16a))/0x7)+parseInt(_0x4127eb(0x166))/0x8+parseInt(_0x4127eb(0x164))/0x9*(-parseInt(_0x4127eb(0x163))/0xa)+parseInt(_0x4127eb(0x169))/0xb;if(_0x16dc2a===_0x3d57b0)break;else _0x47c9c5['push'](_0x47c9c5['shift']());}catch(_0xcbfed7){_0x47c9c5['push'](_0x47c9c5['shift']());}}}(a94_0x5cee,0xaa663));export const VERSION=a94_0xecebf(0x15f);export const GIT_TAG=a94_0xecebf(0x165);export const GIT_COMMIT='b478d0e';export const BUILD_TIME=a94_0xecebf(0x160);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- function a94_0x3c55(_0x5c1a14,_0x3338ba){_0x5c1a14=_0x5c1a14-0x18b;const _0x104edf=a94_0x104e();let _0x3c55c5=_0x104edf[_0x5c1a14];return _0x3c55c5;}(function(_0x100ec8,_0x31024a){const _0x35a59e=a94_0x3c55,_0x2f61de=_0x100ec8();while(!![]){try{const _0xc8f61e=-parseInt(_0x35a59e(0x18d))/0x1+parseInt(_0x35a59e(0x18e))/0x2*(parseInt(_0x35a59e(0x193))/0x3)+-parseInt(_0x35a59e(0x196))/0x4+parseInt(_0x35a59e(0x190))/0x5+parseInt(_0x35a59e(0x195))/0x6*(parseInt(_0x35a59e(0x192))/0x7)+-parseInt(_0x35a59e(0x18c))/0x8+parseInt(_0x35a59e(0x18b))/0x9;if(_0xc8f61e===_0x31024a)break;else _0x2f61de['push'](_0x2f61de['shift']());}catch(_0x23aa0a){_0x2f61de['push'](_0x2f61de['shift']());}}}(a94_0x104e,0x721a0));import{jsx as a94_0x4d3a2f,jsxs as a94_0x332b7e}from'react/jsx-runtime';import{useEffect}from'react';function a94_0x104e(){const _0x374371=['532lmAIia','\x20to\x20view\x20available\x20commands.','3726370qJjXYR','column','7RzPLOA','10488hEUVJf','green','1503702qGMzSi','633868aXLueh','248310bTzoon','7167888xFflRl','431604txfasu'];a94_0x104e=function(){return _0x374371;};return a94_0x104e();}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x25a4a2=a94_0x3c55,{exit:_0x200415}=useApp();return useEffect(()=>{_0x200415();},[_0x200415]),a94_0x332b7e(Box,{'flexDirection':_0x25a4a2(0x191),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x4d3a2f(Box,{'children':a94_0x4d3a2f(Text,{'bold':!![],'color':_0x25a4a2(0x194),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x332b7e(Box,{'marginTop':0x1,'children':[a94_0x4d3a2f(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a94_0x4d3a2f(Text,{'bold':!![],'color':_0x25a4a2(0x194),'children':CLI_BIN_NAME+'\x20--help'}),a94_0x4d3a2f(Text,{'dimColor':!![],'children':_0x25a4a2(0x18f)})]})]});}
1
+ (function(_0x12766e,_0x5b46a6){const _0x1ce5b6=a95_0x3595,_0x5ac6d4=_0x12766e();while(!![]){try{const _0x1cf4c9=parseInt(_0x1ce5b6(0x16c))/0x1+-parseInt(_0x1ce5b6(0x171))/0x2+parseInt(_0x1ce5b6(0x167))/0x3*(-parseInt(_0x1ce5b6(0x172))/0x4)+parseInt(_0x1ce5b6(0x16f))/0x5*(-parseInt(_0x1ce5b6(0x16e))/0x6)+-parseInt(_0x1ce5b6(0x16a))/0x7+-parseInt(_0x1ce5b6(0x16b))/0x8+parseInt(_0x1ce5b6(0x170))/0x9;if(_0x1cf4c9===_0x5b46a6)break;else _0x5ac6d4['push'](_0x5ac6d4['shift']());}catch(_0xcd584){_0x5ac6d4['push'](_0x5ac6d4['shift']());}}}(a95_0x165e,0x212b0));function a95_0x3595(_0x327e72,_0x34eca3){_0x327e72=_0x327e72-0x167;const _0x165e9b=a95_0x165e();let _0x3595c3=_0x165e9b[_0x327e72];return _0x3595c3;}function a95_0x165e(){const _0x268386=['green','3702npdxVw','1055QKKzUe','4193730bVeiWC','119372ogxUMB','236GqQrqq','\x20--help','5091vAUhsR','\x20\x20Use\x20','column','193865BoKpJZ','1177832LqszRw','134806vqTAfn'];a95_0x165e=function(){return _0x268386;};return a95_0x165e();}import{jsx as a95_0x1e2407,jsxs as a95_0x2f86c3}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4f735c=a95_0x3595,{exit:_0xc7bb65}=useApp();return useEffect(()=>{_0xc7bb65();},[_0xc7bb65]),a95_0x2f86c3(Box,{'flexDirection':_0x4f735c(0x169),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0x1e2407(Box,{'children':a95_0x1e2407(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x2f86c3(Box,{'marginTop':0x1,'children':[a95_0x1e2407(Text,{'dimColor':!![],'children':_0x4f735c(0x168)}),a95_0x1e2407(Text,{'bold':!![],'color':_0x4f735c(0x16d),'children':CLI_BIN_NAME+_0x4f735c(0x173)}),a95_0x1e2407(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
@@ -1 +1 @@
1
- (function(_0x334633,_0x10d11b){const _0x2195ad=a95_0x3406,_0x46ee18=_0x334633();while(!![]){try{const _0x2bf191=parseInt(_0x2195ad(0xab))/0x1+-parseInt(_0x2195ad(0xa0))/0x2*(-parseInt(_0x2195ad(0xad))/0x3)+-parseInt(_0x2195ad(0xaf))/0x4+-parseInt(_0x2195ad(0xa6))/0x5+-parseInt(_0x2195ad(0xa8))/0x6*(-parseInt(_0x2195ad(0xb0))/0x7)+parseInt(_0x2195ad(0x9e))/0x8+-parseInt(_0x2195ad(0xb4))/0x9;if(_0x2bf191===_0x10d11b)break;else _0x46ee18['push'](_0x46ee18['shift']());}catch(_0xd68735){_0x46ee18['push'](_0x46ee18['shift']());}}}(a95_0x895d,0x8020d));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a95_0x895d(){const _0x5e142e=['3745515lsBLAe','stdout','126PppJOk','log','pipe','457489JDHLbJ','skills','88554TGSNou','unknown','98192bbbRZd','161077CBhzRD','toString','inherit','trim','5730129IgjmCM','add','3232520MYJKQA','join','40HPMIaC','stdio','exit\x20','stderr','npx','status'];a95_0x895d=function(){return _0x5e142e;};return a95_0x895d();}import{LOVRABET_SKILL_SOURCE as a95_0x79422}from'../constant/distribution.js';function a95_0x3406(_0x35ff70,_0xdb0bc5){_0x35ff70=_0x35ff70-0x9e;const _0x895d46=a95_0x895d();let _0x3406fb=_0x895d46[_0x35ff70];return _0x3406fb;}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x79422;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(_0x8d7cc5,_0x28dcb4=LOVRABET_SKILL_SOURCE,_0x139756){const _0x352c8b=a95_0x3406;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x48c16b=_0x139756?.[_0x352c8b(0xa1)]??_0x352c8b(0xb2),_0x1347e5=resolveNpmBin(_0x352c8b(0xa4)),_0x5ccb9d=[_0x352c8b(0xac),_0x352c8b(0xb5),_0x28dcb4,'-g','-y'],_0x15aeff=[_0x1347e5,..._0x5ccb9d][_0x352c8b(0x9f)]('\x20');console[_0x352c8b(0xa9)]('*\x20'+_0x15aeff);const _0x3a0f1e=spawnSync(_0x1347e5,_0x5ccb9d,{'cwd':_0x8d7cc5,'stdio':_0x48c16b,'env':process.env,'shell':![]});if(_0x3a0f1e[_0x352c8b(0xa5)]===0x0)return{'ok':!![],'status':0x0};let _0x171dec=_0x352c8b(0xa2)+(_0x3a0f1e[_0x352c8b(0xa5)]??_0x352c8b(0xae));if(_0x48c16b===_0x352c8b(0xaa)){const _0x292f75=_0x3a0f1e['stderr']?_0x3a0f1e[_0x352c8b(0xa3)][_0x352c8b(0xb1)]()[_0x352c8b(0xb3)]():'',_0x5fc98f=_0x3a0f1e[_0x352c8b(0xa7)]?_0x3a0f1e[_0x352c8b(0xa7)]['toString']()[_0x352c8b(0xb3)]():'';if(_0x292f75)_0x171dec=_0x292f75;else{if(_0x5fc98f)_0x171dec=_0x5fc98f;}}return{'ok':![],'status':_0x3a0f1e['status']??null,'error':_0x171dec};}
1
+ (function(_0x18bd11,_0x23440d){const _0x1f1eed=a96_0x4144,_0x17fc5c=_0x18bd11();while(!![]){try{const _0x17d8dc=-parseInt(_0x1f1eed(0x1c4))/0x1+parseInt(_0x1f1eed(0x1bd))/0x2*(-parseInt(_0x1f1eed(0x1bc))/0x3)+parseInt(_0x1f1eed(0x1c6))/0x4*(-parseInt(_0x1f1eed(0x1cf))/0x5)+parseInt(_0x1f1eed(0x1be))/0x6*(parseInt(_0x1f1eed(0x1c7))/0x7)+-parseInt(_0x1f1eed(0x1c0))/0x8+-parseInt(_0x1f1eed(0x1c8))/0x9+parseInt(_0x1f1eed(0x1ca))/0xa*(parseInt(_0x1f1eed(0x1cb))/0xb);if(_0x17d8dc===_0x23440d)break;else _0x17fc5c['push'](_0x17fc5c['shift']());}catch(_0x23ffb1){_0x17fc5c['push'](_0x17fc5c['shift']());}}}(a96_0x5ddd,0x24d13));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x1d5b88}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a96_0x4144(_0x3964c0,_0x3c3d13){_0x3964c0=_0x3964c0-0x1bc;const _0x5dddd9=a96_0x5ddd();let _0x4144d5=_0x5dddd9[_0x3964c0];return _0x4144d5;}export const LOVRABET_SKILL_SOURCE=a96_0x1d5b88;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a96_0x5ddd(){const _0x384512=['1017558IKMBbr','join','10mvNAKS','8363069DiiGBU','pipe','skills','toString','42350isgfME','stdout','inherit','npx','status','138MQXFOw','2446ISpWJT','6JAHXbf','trim','1358104QWZAwY','exit\x20','stderr','unknown','267256HJBIOQ','add','100jQRClZ','1460291XMEuNh'];a96_0x5ddd=function(){return _0x384512;};return a96_0x5ddd();}export function runNpxSkillsAddGlobal(_0x2350db,_0x2e71a9=LOVRABET_SKILL_SOURCE,_0x43e1a3){const _0x209500=a96_0x4144;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5567c9=_0x43e1a3?.['stdio']??_0x209500(0x1d1),_0x14bf28=resolveNpmBin(_0x209500(0x1d2)),_0x3f8dee=[_0x209500(0x1cd),_0x209500(0x1c5),_0x2e71a9,'-g','-y'],_0x54b395=[_0x14bf28,..._0x3f8dee][_0x209500(0x1c9)]('\x20');console['log']('*\x20'+_0x54b395);const _0x128f07=spawnSync(_0x14bf28,_0x3f8dee,{'cwd':_0x2350db,'stdio':_0x5567c9,'env':process.env,'shell':![]});if(_0x128f07[_0x209500(0x1d3)]===0x0)return{'ok':!![],'status':0x0};let _0x3a2093=_0x209500(0x1c1)+(_0x128f07[_0x209500(0x1d3)]??_0x209500(0x1c3));if(_0x5567c9===_0x209500(0x1cc)){const _0x703c23=_0x128f07[_0x209500(0x1c2)]?_0x128f07[_0x209500(0x1c2)][_0x209500(0x1ce)]()['trim']():'',_0x44e038=_0x128f07[_0x209500(0x1d0)]?_0x128f07[_0x209500(0x1d0)][_0x209500(0x1ce)]()[_0x209500(0x1bf)]():'';if(_0x703c23)_0x3a2093=_0x703c23;else{if(_0x44e038)_0x3a2093=_0x44e038;}}return{'ok':![],'status':_0x128f07[_0x209500(0x1d3)]??null,'error':_0x3a2093};}
@@ -1 +1 @@
1
- const a96_0x3b863c=a96_0x2c57;(function(_0x126135,_0x830c89){const _0x3eff7f=a96_0x2c57,_0x53c2dd=_0x126135();while(!![]){try{const _0x596c97=parseInt(_0x3eff7f(0x151))/0x1*(parseInt(_0x3eff7f(0x14a))/0x2)+-parseInt(_0x3eff7f(0x147))/0x3*(-parseInt(_0x3eff7f(0x153))/0x4)+parseInt(_0x3eff7f(0x155))/0x5*(parseInt(_0x3eff7f(0x148))/0x6)+-parseInt(_0x3eff7f(0x14f))/0x7*(parseInt(_0x3eff7f(0x145))/0x8)+-parseInt(_0x3eff7f(0x141))/0x9*(parseInt(_0x3eff7f(0x14e))/0xa)+-parseInt(_0x3eff7f(0x14d))/0xb+-parseInt(_0x3eff7f(0x149))/0xc;if(_0x596c97===_0x830c89)break;else _0x53c2dd['push'](_0x53c2dd['shift']());}catch(_0x96e9ca){_0x53c2dd['push'](_0x53c2dd['shift']());}}}(a96_0xc520,0x96328));function a96_0x2c57(_0x205e7b,_0x44f83e){_0x205e7b=_0x205e7b-0x141;const _0xc520d7=a96_0xc520();let _0x2c57af=_0xc520d7[_0x205e7b];return _0x2c57af;}function a96_0xc520(){const _0x523b72=['.next','2329410HHWsWS','.cache','90icgYVE','.svn','build','.git','8ICAGRe','lovrabet.skill.json','1590654gdiLqA','12lJYetA','872820iIpdrY','47126QyOUce','dist','SKILL.md','10162757KltGgt','450470TYuVjr','1653533LYHpSb','node_modules','13PWFCuS','.hg','8bDfpuo'];a96_0xc520=function(){return _0x523b72;};return a96_0xc520();}export const METADATA_FILE=a96_0x3b863c(0x146);export const SKILL_FILE=a96_0x3b863c(0x14c);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a96_0x3b863c(0x144),a96_0x3b863c(0x152),a96_0x3b863c(0x142),a96_0x3b863c(0x150),a96_0x3b863c(0x154),a96_0x3b863c(0x14b),a96_0x3b863c(0x143),'coverage','.turbo',a96_0x3b863c(0x156)]);
1
+ function a97_0x11c2(){const _0x57d3e8=['dist','.next','.cache','259193gbRRwn','build','21DCLZxU','86134FJPjVg','2797686khUzbu','8733165ZeHyLw','5382400cLzRDi','1070ytkyHC','.hg','8Grngsr','569956yufznf','coverage','.svn','node_modules','7pKUGAG','.DS_Store','.git','4480821PuLnPC'];a97_0x11c2=function(){return _0x57d3e8;};return a97_0x11c2();}function a97_0x9430(_0x2f2e47,_0x119ea0){_0x2f2e47=_0x2f2e47-0x14b;const _0x11c2e5=a97_0x11c2();let _0x9430c5=_0x11c2e5[_0x2f2e47];return _0x9430c5;}const a97_0x5c9dc1=a97_0x9430;(function(_0x3a767f,_0x5a36ab){const _0x321c7b=a97_0x9430,_0x6d4ad6=_0x3a767f();while(!![]){try{const _0x5454e5=parseInt(_0x321c7b(0x14d))/0x1*(-parseInt(_0x321c7b(0x157))/0x2)+parseInt(_0x321c7b(0x156))/0x3*(parseInt(_0x321c7b(0x15e))/0x4)+-parseInt(_0x321c7b(0x15a))/0x5+parseInt(_0x321c7b(0x158))/0x6+-parseInt(_0x321c7b(0x159))/0x7+-parseInt(_0x321c7b(0x15d))/0x8*(parseInt(_0x321c7b(0x150))/0x9)+-parseInt(_0x321c7b(0x15b))/0xa*(-parseInt(_0x321c7b(0x154))/0xb);if(_0x5454e5===_0x5a36ab)break;else _0x6d4ad6['push'](_0x6d4ad6['shift']());}catch(_0x2b60af){_0x6d4ad6['push'](_0x6d4ad6['shift']());}}}(a97_0x11c2,0xd255c));export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x5c9dc1(0x14e)]);export const IGNORED_DIR_NAMES=new Set([a97_0x5c9dc1(0x14f),a97_0x5c9dc1(0x15c),a97_0x5c9dc1(0x14b),a97_0x5c9dc1(0x14c),a97_0x5c9dc1(0x152),a97_0x5c9dc1(0x151),a97_0x5c9dc1(0x155),a97_0x5c9dc1(0x15f),'.turbo',a97_0x5c9dc1(0x153)]);
@@ -1 +1 @@
1
- (function(_0x1fed68,_0x4cf0c1){const _0x52d4bb=a97_0x38d4,_0x4f037e=_0x1fed68();while(!![]){try{const _0x43a9fc=-parseInt(_0x52d4bb(0x11e))/0x1*(parseInt(_0x52d4bb(0x124))/0x2)+parseInt(_0x52d4bb(0x11f))/0x3+parseInt(_0x52d4bb(0x112))/0x4*(parseInt(_0x52d4bb(0x119))/0x5)+-parseInt(_0x52d4bb(0x11c))/0x6+parseInt(_0x52d4bb(0x11a))/0x7+parseInt(_0x52d4bb(0x116))/0x8*(-parseInt(_0x52d4bb(0x123))/0x9)+parseInt(_0x52d4bb(0x113))/0xa*(-parseInt(_0x52d4bb(0x11b))/0xb);if(_0x43a9fc===_0x4cf0c1)break;else _0x4f037e['push'](_0x4f037e['shift']());}catch(_0x584bd3){_0x4f037e['push'](_0x4f037e['shift']());}}}(a97_0x1830,0x7af26));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a97_0x1830(){const _0x490db1=['from','286024yxdAZN','stringify','endsWith','5vDcnNd','5237911ovECKr','6381254aUkcbQ','2631654mfPlDs','startsWith','8FzzAFb','1438488hJQEHC','split','validation','Unsafe\x20Skill\x20file\x20path:\x20','45tLkcAQ','116218uIdkWD','3752724XamcwR','10iPTnbx','isSymbolicLink'];a97_0x1830=function(){return _0x490db1;};return a97_0x1830();}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x5301a0,_0x21f9ff){const _0x4ce16e=a97_0x38d4,_0x321420=normalizeSkillRelativePath(_0x21f9ff),_0x1eb8e1=realOrResolved(_0x5301a0),_0x4d4eba=resolve(_0x1eb8e1,..._0x321420['split']('/'));if(!isPathInside(_0x4d4eba,_0x1eb8e1))throw CliErrors[_0x4ce16e(0x121)](_0x4ce16e(0x122)+_0x21f9ff);return ensureNoSymlinkInManagedPath(_0x1eb8e1,_0x321420),_0x4d4eba;}export function ensureNoSymlinkInManagedPath(_0x1318ca,_0x3f6b78){const _0x17ed0f=a97_0x38d4;let _0xfd3fd4=_0x1318ca;for(const _0x41c578 of _0x3f6b78[_0x17ed0f(0x120)]('/')){_0xfd3fd4=resolve(_0xfd3fd4,_0x41c578);const _0x1a3f08=lstatIfPresent(_0xfd3fd4);if(_0x1a3f08?.[_0x17ed0f(0x114)]())throw CliErrors[_0x17ed0f(0x121)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x3f6b78);}}export function isDanglingSymlink(_0xb6988a){try{return lstatSync(_0xb6988a)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x3b5891){const _0x188f3d=readlinkSync(_0x3b5891);return isAbsolute(_0x188f3d)?_0x188f3d:resolve(dirname(_0x3b5891),_0x188f3d);}export function isPathInside(_0x1dd1be,_0x177bc8){const _0x5e7c6f=a97_0x38d4,_0x5195f0=_0x1dd1be[_0x5e7c6f(0x118)](sep)?_0x1dd1be:''+_0x1dd1be+sep,_0x364c29=_0x177bc8['endsWith'](sep)?_0x177bc8:''+_0x177bc8+sep;return _0x1dd1be===_0x177bc8||_0x5195f0[_0x5e7c6f(0x11d)](_0x364c29);}export function realOrResolved(_0x5656ce){try{return realpathSync(_0x5656ce);}catch{return resolve(_0x5656ce);}}export function lstatIfPresent(_0x16ece6){try{return lstatSync(_0x16ece6);}catch{return undefined;}}export function writeTextAtomic(_0x1c0629,_0x1e1e84,_0x34e433){const _0x34d17b=a97_0x38d4;writeBytesAtomic(_0x1c0629,Buffer[_0x34d17b(0x115)](_0x1e1e84,'utf8'),_0x34e433);}function a97_0x38d4(_0x1d7ee2,_0x23378a){_0x1d7ee2=_0x1d7ee2-0x112;const _0x183084=a97_0x1830();let _0x38d4dd=_0x183084[_0x1d7ee2];return _0x38d4dd;}export function writeBytesAtomic(_0x141999,_0x14bd77,_0x992363){const _0x9d98e5=_0x141999+'.tmp';try{writeFileSync(_0x9d98e5,_0x14bd77,{'mode':_0x992363}),renameSync(_0x9d98e5,_0x141999);}catch(_0x4f5ccb){try{rmSync(_0x9d98e5,{'force':!![]});}catch{}throw _0x4f5ccb;}}export function writeJsonAtomic(_0x585c93,_0x164550){const _0xe73fba=a97_0x38d4;writeTextAtomic(_0x585c93,JSON[_0xe73fba(0x117)](_0x164550,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x182ae1,_0x3f2acc){const _0x1e6006=a98_0x4403,_0x4bcaa7=_0x182ae1();while(!![]){try{const _0xc4571=-parseInt(_0x1e6006(0x92))/0x1*(parseInt(_0x1e6006(0x95))/0x2)+parseInt(_0x1e6006(0x8d))/0x3+-parseInt(_0x1e6006(0x8e))/0x4*(parseInt(_0x1e6006(0x8c))/0x5)+-parseInt(_0x1e6006(0x99))/0x6+parseInt(_0x1e6006(0x94))/0x7+parseInt(_0x1e6006(0x93))/0x8+parseInt(_0x1e6006(0x90))/0x9;if(_0xc4571===_0x3f2acc)break;else _0x4bcaa7['push'](_0x4bcaa7['shift']());}catch(_0x764914){_0x4bcaa7['push'](_0x4bcaa7['shift']());}}}(a98_0x46a9,0xdfe9b));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x6a6b2,_0x213c60){const _0x279a4c=a98_0x4403,_0x19a223=normalizeSkillRelativePath(_0x213c60),_0x114518=realOrResolved(_0x6a6b2),_0x5e8676=resolve(_0x114518,..._0x19a223[_0x279a4c(0x8b)]('/'));if(!isPathInside(_0x5e8676,_0x114518))throw CliErrors[_0x279a4c(0x9c)](_0x279a4c(0x96)+_0x213c60);return ensureNoSymlinkInManagedPath(_0x114518,_0x19a223),_0x5e8676;}export function ensureNoSymlinkInManagedPath(_0x4afd2e,_0x50ae08){const _0x5a2e8b=a98_0x4403;let _0x28e46a=_0x4afd2e;for(const _0x7b2e60 of _0x50ae08[_0x5a2e8b(0x8b)]('/')){_0x28e46a=resolve(_0x28e46a,_0x7b2e60);const _0x216062=lstatIfPresent(_0x28e46a);if(_0x216062?.[_0x5a2e8b(0x91)]())throw CliErrors[_0x5a2e8b(0x9c)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x50ae08);}}export function isDanglingSymlink(_0x55d02e){const _0x97cde9=a98_0x4403;try{return lstatSync(_0x55d02e)[_0x97cde9(0x91)]();}catch{return![];}}export function resolveSymlinkTarget(_0x6d97da){const _0x14ec65=readlinkSync(_0x6d97da);return isAbsolute(_0x14ec65)?_0x14ec65:resolve(dirname(_0x6d97da),_0x14ec65);}export function isPathInside(_0x14170e,_0x4db3d8){const _0x2aa494=a98_0x4403,_0x36e9be=_0x14170e[_0x2aa494(0x9a)](sep)?_0x14170e:''+_0x14170e+sep,_0x46362c=_0x4db3d8[_0x2aa494(0x9a)](sep)?_0x4db3d8:''+_0x4db3d8+sep;return _0x14170e===_0x4db3d8||_0x36e9be[_0x2aa494(0x97)](_0x46362c);}export function realOrResolved(_0x31191e){try{return realpathSync(_0x31191e);}catch{return resolve(_0x31191e);}}export function lstatIfPresent(_0x44dde8){try{return lstatSync(_0x44dde8);}catch{return undefined;}}function a98_0x4403(_0x2d0372,_0x315e88){_0x2d0372=_0x2d0372-0x8b;const _0x46a951=a98_0x46a9();let _0x44038d=_0x46a951[_0x2d0372];return _0x44038d;}export function writeTextAtomic(_0x4903f,_0x48df06,_0x4d0c2d){const _0x4dfdec=a98_0x4403;writeBytesAtomic(_0x4903f,Buffer[_0x4dfdec(0x8f)](_0x48df06,_0x4dfdec(0x9b)),_0x4d0c2d);}function a98_0x46a9(){const _0x242125=['from','17797761xiUCDP','isSymbolicLink','1422972SoiAqJ','9443160dcMXQL','4646663esMSvS','2QRmJnP','Unsafe\x20Skill\x20file\x20path:\x20','startsWith','.tmp','6388104vwFZrs','endsWith','utf8','validation','split','1061425xxRYEU','1933485gaJKss','20DCOsIv'];a98_0x46a9=function(){return _0x242125;};return a98_0x46a9();}export function writeBytesAtomic(_0x5b05e3,_0x4d421b,_0x4e15ec){const _0x2f92f1=a98_0x4403,_0x4143ea=_0x5b05e3+_0x2f92f1(0x98);try{writeFileSync(_0x4143ea,_0x4d421b,{'mode':_0x4e15ec}),renameSync(_0x4143ea,_0x5b05e3);}catch(_0x73a104){try{rmSync(_0x4143ea,{'force':!![]});}catch{}throw _0x73a104;}}export function writeJsonAtomic(_0x1d376e,_0xe049e0){writeTextAtomic(_0x1d376e,JSON['stringify'](_0xe049e0,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x1d999f,_0x3371c0){const _0xa10e28=a98_0x38a7,_0x43dba6=_0x1d999f();while(!![]){try{const _0x200d41=-parseInt(_0xa10e28(0x1e3))/0x1*(parseInt(_0xa10e28(0x1dd))/0x2)+parseInt(_0xa10e28(0x1da))/0x3+-parseInt(_0xa10e28(0x1de))/0x4+parseInt(_0xa10e28(0x1db))/0x5*(-parseInt(_0xa10e28(0x1e4))/0x6)+parseInt(_0xa10e28(0x1e0))/0x7*(parseInt(_0xa10e28(0x1df))/0x8)+parseInt(_0xa10e28(0x1e9))/0x9*(-parseInt(_0xa10e28(0x1dc))/0xa)+parseInt(_0xa10e28(0x1e5))/0xb;if(_0x200d41===_0x3371c0)break;else _0x43dba6['push'](_0x43dba6['shift']());}catch(_0x22378d){_0x43dba6['push'](_0x43dba6['shift']());}}}(a98_0x5bea,0x949fd));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x5dfc00){const _0x63309=a98_0x38a7;return createHash(_0x63309(0x1e8))[_0x63309(0x1e6)](_0x5dfc00)[_0x63309(0x1e1)](_0x63309(0x1e2));}export function fileHash(_0x103b32){return bufferSha256(fileContent(_0x103b32));}function a98_0x38a7(_0x1736a2,_0x3d6db1){_0x1736a2=_0x1736a2-0x1da;const _0x5beaa1=a98_0x5bea();let _0x38a7d4=_0x5beaa1[_0x1736a2];return _0x38a7d4;}export function bufferSha256(_0xfeb847){const _0x2f79a8=a98_0x38a7;return createHash(_0x2f79a8(0x1e8))[_0x2f79a8(0x1e6)](_0xfeb847)[_0x2f79a8(0x1e1)](_0x2f79a8(0x1e2));}function a98_0x5bea(){const _0x493be1=['211ZePbFf','282BGWrUT','19380086cZybrW','update','size','sha256','45KYjwPk','1716849YgviQE','121945IsTTVM','840820SfSuGb','9346zuTfnr','841836IsAnzw','8302488ETebrP','7bgdogR','digest','hex'];a98_0x5bea=function(){return _0x493be1;};return a98_0x5bea();}export function fileTreeHash(_0x2d33f7){const _0x3a1a8e=a98_0x38a7,_0x4db17f=createHash('sha256');for(const _0x349089 of normalizeManifestFiles(_0x2d33f7)){_0x4db17f[_0x3a1a8e(0x1e6)](_0x349089['path']),_0x4db17f['update']('\x00'),_0x4db17f[_0x3a1a8e(0x1e6)](_0x349089['sha256']),_0x4db17f[_0x3a1a8e(0x1e6)]('\x00'),_0x4db17f[_0x3a1a8e(0x1e6)](String(_0x349089[_0x3a1a8e(0x1e7)])),_0x4db17f[_0x3a1a8e(0x1e6)]('\x00');}return _0x4db17f[_0x3a1a8e(0x1e1)]('hex');}
1
+ (function(_0x5e038b,_0x340109){const _0x2b842c=a99_0x31d1,_0x58ed63=_0x5e038b();while(!![]){try{const _0x3d9f68=-parseInt(_0x2b842c(0x178))/0x1+parseInt(_0x2b842c(0x181))/0x2+parseInt(_0x2b842c(0x184))/0x3*(parseInt(_0x2b842c(0x17c))/0x4)+-parseInt(_0x2b842c(0x17b))/0x5*(-parseInt(_0x2b842c(0x17d))/0x6)+-parseInt(_0x2b842c(0x176))/0x7+parseInt(_0x2b842c(0x182))/0x8+-parseInt(_0x2b842c(0x183))/0x9*(parseInt(_0x2b842c(0x179))/0xa);if(_0x3d9f68===_0x340109)break;else _0x58ed63['push'](_0x58ed63['shift']());}catch(_0x3452a6){_0x58ed63['push'](_0x58ed63['shift']());}}}(a99_0x45a6,0x20596));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a99_0x45a6(){const _0x4f8f81=['3QLwHZj','hex','171024EgNLCh','digest','181522ZkEaEb','10GjFOae','update','5sJtalh','489544MUAuFN','756906gzyETT','sha256','path','size','228990gxqDCA','1054584tNMBzP','1407591aVTBpZ'];a99_0x45a6=function(){return _0x4f8f81;};return a99_0x45a6();}function a99_0x31d1(_0x336d75,_0x35248b){_0x336d75=_0x336d75-0x175;const _0x45a61b=a99_0x45a6();let _0x31d1c9=_0x45a61b[_0x336d75];return _0x31d1c9;}export function contentHash(_0x18d6ca){const _0x5def39=a99_0x31d1;return createHash('sha256')[_0x5def39(0x17a)](_0x18d6ca)[_0x5def39(0x177)](_0x5def39(0x175));}export function fileHash(_0x1fac65){return bufferSha256(fileContent(_0x1fac65));}export function bufferSha256(_0x3ca245){const _0x7eeb9d=a99_0x31d1;return createHash('sha256')[_0x7eeb9d(0x17a)](_0x3ca245)['digest'](_0x7eeb9d(0x175));}export function fileTreeHash(_0x4aa96d){const _0x19ccf3=a99_0x31d1,_0x3b5f6c=createHash(_0x19ccf3(0x17e));for(const _0x45a93f of normalizeManifestFiles(_0x4aa96d)){_0x3b5f6c[_0x19ccf3(0x17a)](_0x45a93f[_0x19ccf3(0x17f)]),_0x3b5f6c[_0x19ccf3(0x17a)]('\x00'),_0x3b5f6c[_0x19ccf3(0x17a)](_0x45a93f[_0x19ccf3(0x17e)]),_0x3b5f6c['update']('\x00'),_0x3b5f6c[_0x19ccf3(0x17a)](String(_0x45a93f[_0x19ccf3(0x180)])),_0x3b5f6c[_0x19ccf3(0x17a)]('\x00');}return _0x3b5f6c[_0x19ccf3(0x177)](_0x19ccf3(0x175));}
@@ -1 +1 @@
1
- (function(_0x4f0c20,_0x338e72){const _0xdc7dc2=a99_0x1f15,_0x593af6=_0x4f0c20();while(!![]){try{const _0x50763d=-parseInt(_0xdc7dc2(0x15c))/0x1*(parseInt(_0xdc7dc2(0x14d))/0x2)+parseInt(_0xdc7dc2(0x15d))/0x3+parseInt(_0xdc7dc2(0x168))/0x4+-parseInt(_0xdc7dc2(0x16c))/0x5*(-parseInt(_0xdc7dc2(0x16b))/0x6)+parseInt(_0xdc7dc2(0x14a))/0x7+-parseInt(_0xdc7dc2(0x14f))/0x8+-parseInt(_0xdc7dc2(0x169))/0x9;if(_0x50763d===_0x338e72)break;else _0x593af6['push'](_0x593af6['shift']());}catch(_0x100e81){_0x593af6['push'](_0x593af6['shift']());}}}(a99_0x5285,0xa3ee3));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a99_0x5285(){const _0x26ce26=['has','skill','map','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','trim','agentsSkillsDir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','17sXzElK','2932128KIjRuz','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','appCode','metadata-mismatch','env','contentHash','length','scope','updated','validation','3111120pfuPoB','10930797ARGdES','removed','21306sflJDc','775WzPjuh','skillCode','push','personal','startsWith','not-managed-symlink','builtin','managedRoot','set','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','values','isSymbolicLink','company','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','709611WMxunR','name','accessKey','52292AWZzfY','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','611680YktnWo','dir','pruneSkillCodes','isDirectory','get','created'];a99_0x5285=function(){return _0x26ce26;};return a99_0x5285();}import{basename,dirname,resolve}from'node:path';import a99_0x5ddb72 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x5ddb72;export function linkEffectiveRuntimeSkills(_0x268a43,_0x42f154,_0x30d3aa={}){const _0x4222a2=a99_0x1f15,_0xb982f5=new Map();for(const _0xc715dd of _0x268a43){const _0x56969b=_0xc715dd[_0x4222a2(0x156)][_0x4222a2(0x16d)];if(!_0x56969b)continue;const _0x408047=_0xb982f5[_0x4222a2(0x153)](_0x56969b);(!_0x408047||_0xc715dd[_0x4222a2(0x165)]===_0x4222a2(0x13d))&&_0xb982f5[_0x4222a2(0x142)](_0x56969b,_0xc715dd);}const _0x329acf=[],_0x44720f=resolveSkillSyncPaths(_0x30d3aa);for(const _0x213d30 of _0xb982f5[_0x4222a2(0x145)]()){const _0x5ac668=requireSkillCode(_0x213d30[_0x4222a2(0x156)]),_0x353f91=_0x42f154+'--'+_0x5ac668;for(const _0x14b5b1 of runtimeAgentSkillRoots(_0x44720f)){_0x329acf[_0x4222a2(0x13c)](ensureManagedSymlink(resolve(_0x14b5b1,_0x353f91),_0x213d30[_0x4222a2(0x150)],_0x44720f[_0x4222a2(0x141)]));}}return _0x329acf;}export function pruneStaleRuntimeSkillLinks(_0x1247b8,_0x8d7d43,_0x254744={},_0x518932){const _0x368e00=a99_0x1f15,_0x4a2361=resolveSkillSyncPaths(_0x254744),_0x471a7f=new Set([..._0x8d7d43][_0x368e00(0x157)](_0x27e574=>_0x27e574['trim']())['filter'](Boolean)),_0x989247=_0x518932?new Set([..._0x518932][_0x368e00(0x157)](_0x50a778=>_0x50a778[_0x368e00(0x159)]())[_0x368e00(0x144)](Boolean)):undefined,_0x3ab2d3=[];for(const _0x6afb1b of runtimeAgentSkillRoots(_0x4a2361)){for(const _0x59506c of managedAppSkillLinkPaths(_0x6afb1b,_0x1247b8)){const _0x3a2a77=basename(_0x59506c)['slice']((_0x1247b8+'--')[_0x368e00(0x164)]);if(_0x989247&&!_0x989247[_0x368e00(0x155)](_0x3a2a77))continue;if(_0x471a7f[_0x368e00(0x155)](_0x3a2a77))continue;_0x3ab2d3[_0x368e00(0x13c)](removeManagedSkillLink(_0x59506c,_0x4a2361[_0x368e00(0x141)]));}}return _0x3ab2d3;}export function pruneStaleRuntimeSkillCache(_0x29160d,_0x186bab={}){const _0x1273e7=a99_0x1f15,_0x43e952=new Set([..._0x29160d['activeSkillCodes']][_0x1273e7(0x157)](_0x18e48a=>_0x18e48a[_0x1273e7(0x159)]())['filter'](Boolean)),_0x5eb35=_0x29160d[_0x1273e7(0x151)]?new Set([..._0x29160d[_0x1273e7(0x151)]][_0x1273e7(0x157)](_0x1aab55=>_0x1aab55[_0x1273e7(0x159)]())[_0x1273e7(0x144)](Boolean)):undefined,_0xa1d560=_0x29160d['scopes']??[_0x1273e7(0x13d),_0x1273e7(0x147)],_0x22ce96=resolve(getRuntimeSkillCacheRoot(_0x29160d[_0x1273e7(0x162)],_0x29160d[_0x1273e7(0x14c)],_0x186bab),safePathSegment(_0x29160d[_0x1273e7(0x160)],'appCode')),_0x5b6330=[];for(const _0x21f855 of _0xa1d560){const _0x21e14f=resolve(_0x22ce96,_0x21f855);if(!existsSync(_0x21e14f))continue;for(const _0x8b56cf of readdirSync(_0x21e14f,{'withFileTypes':!![]})){if(!_0x8b56cf[_0x1273e7(0x152)]())continue;const _0x1a2388=_0x8b56cf[_0x1273e7(0x14b)];if(_0x5eb35&&!_0x5eb35['has'](_0x1a2388))continue;if(_0x43e952[_0x1273e7(0x155)](_0x1a2388))continue;const _0xa5137f=resolve(_0x21e14f,_0x1a2388),_0x3e573f=readMetadataIfPresent(resolve(_0xa5137f,METADATA_FILE));if(_0x3e573f?.[_0x1273e7(0x160)]!==_0x29160d[_0x1273e7(0x160)]||_0x3e573f[_0x1273e7(0x165)]!==_0x21f855||_0x3e573f['skillCode']!==_0x1a2388){_0x5b6330[_0x1273e7(0x13c)]({'path':_0xa5137f,'action':_0x1273e7(0x15e),'reason':_0x1273e7(0x161)});continue;}removeSync(_0xa5137f),_0x5b6330[_0x1273e7(0x13c)]({'path':_0xa5137f,'action':_0x1273e7(0x16a)});}}return _0x5b6330;}export function linkGlobalRuntimeSkills(_0x49f48c,_0x132d5b={}){const _0x4fa8a8=a99_0x1f15,_0x50e989=resolveSkillSyncPaths(_0x132d5b),_0x2c34f3=[];for(const _0x2c3aa8 of _0x49f48c){if(_0x2c3aa8[_0x4fa8a8(0x165)]!==_0x4fa8a8(0x140))throw CliErrors[_0x4fa8a8(0x167)](_0x4fa8a8(0x14e)+_0x2c3aa8[_0x4fa8a8(0x165)]);const _0x1e2b4f=requireSkillCode(_0x2c3aa8[_0x4fa8a8(0x156)]),_0x97ce8=copyManagedSkillDirectory(_0x2c3aa8[_0x4fa8a8(0x150)],resolve(_0x50e989[_0x4fa8a8(0x15a)],_0x1e2b4f));_0x2c34f3[_0x4fa8a8(0x13c)]({..._0x97ce8,'contentHash':_0x2c3aa8['contentHash']});}return _0x2c34f3;}function ensureManagedSymlink(_0x2f32dd,_0x238fc2,_0x2f069a){const _0x56f9b5=a99_0x1f15;mkdirSync(dirname(_0x2f32dd),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2f32dd)||isDanglingSymlink(_0x2f32dd)){const _0xfcbe8b=lstatSync(_0x2f32dd);if(!_0xfcbe8b['isSymbolicLink']())throw CliErrors[_0x56f9b5(0x167)](_0x56f9b5(0x15f)+_0x2f32dd);const _0x460d22=resolveSymlinkTarget(_0x2f32dd);if(!isPathInside(realOrResolved(_0x460d22),realOrResolved(_0x2f069a)))throw CliErrors[_0x56f9b5(0x167)](_0x56f9b5(0x158)+_0x2f32dd);if(realOrResolved(_0x460d22)===realOrResolved(_0x238fc2))return{'path':_0x2f32dd,'target':_0x238fc2,'action':_0x56f9b5(0x148)};return unlinkSync(_0x2f32dd),symlinkSync(_0x238fc2,_0x2f32dd,_0x56f9b5(0x150)),{'path':_0x2f32dd,'target':_0x238fc2,'action':_0x56f9b5(0x166)};}return symlinkSync(_0x238fc2,_0x2f32dd,_0x56f9b5(0x150)),{'path':_0x2f32dd,'target':_0x238fc2,'action':'created'};}function managedAppSkillLinkPaths(_0x221e21,_0x33c078){const _0x1ccbfb=a99_0x1f15;if(!existsSync(_0x221e21))return[];const _0x45821d=_0x33c078+'--';return readdirSync(_0x221e21,{'withFileTypes':!![]})[_0x1ccbfb(0x144)](_0x1bd2c9=>_0x1bd2c9[_0x1ccbfb(0x14b)][_0x1ccbfb(0x13e)](_0x45821d))[_0x1ccbfb(0x157)](_0x55489a=>resolve(_0x221e21,_0x55489a[_0x1ccbfb(0x14b)]));}function removeManagedSkillLink(_0x38bf53,_0x314e45){const _0x5f3928=a99_0x1f15,_0x5a94a0=lstatIfPresent(_0x38bf53);if(!_0x5a94a0?.[_0x5f3928(0x146)]())return{'path':_0x38bf53,'action':_0x5f3928(0x15e),'reason':_0x5f3928(0x13f)};const _0x4566d4=resolveSymlinkTarget(_0x38bf53);if(!isPathInside(realOrResolved(_0x4566d4),realOrResolved(_0x314e45)))return{'path':_0x38bf53,'action':_0x5f3928(0x15e),'reason':'external-symlink'};return unlinkSync(_0x38bf53),{'path':_0x38bf53,'action':'removed'};}export function copyManagedSkillDirectory(_0x76bae1,_0x10fc5e){const _0x37f786=a99_0x1f15,_0x26f2dd=resolve(_0x10fc5e,METADATA_FILE),_0x42fb6b=existsSync(_0x10fc5e);if(_0x42fb6b){const _0xcd80aa=lstatSync(_0x10fc5e);if(_0xcd80aa['isSymbolicLink']())throw CliErrors[_0x37f786(0x167)](_0x37f786(0x149)+_0x10fc5e);if(!_0xcd80aa[_0x37f786(0x152)]())throw CliErrors['validation'](_0x37f786(0x15b)+_0x10fc5e);const _0x2e15ac=readMetadataIfPresent(_0x26f2dd);if(_0x2e15ac?.[_0x37f786(0x165)]!==_0x37f786(0x140))throw CliErrors[_0x37f786(0x167)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x10fc5e);}ensureDirSync(dirname(_0x10fc5e));const _0x5a49bd=_0x42fb6b?readMetadataIfPresent(_0x26f2dd)?.[_0x37f786(0x163)]:undefined,_0xb537b8=readMetadataIfPresent(resolve(_0x76bae1,METADATA_FILE))?.[_0x37f786(0x163)];return _0x42fb6b&&removeSync(_0x10fc5e),copySkillDirectory(_0x76bae1,_0x10fc5e),{'path':_0x10fc5e,'target':_0x76bae1,'action':!_0x42fb6b?_0x37f786(0x154):_0x5a49bd===_0xb537b8?_0x37f786(0x148):'updated'};}function a99_0x1f15(_0x25a027,_0x29efdf){_0x25a027=_0x25a027-0x13c;const _0x52859d=a99_0x5285();let _0x1f15ef=_0x52859d[_0x25a027];return _0x1f15ef;}function copySkillDirectory(_0x1b52e6,_0x3a8f60){copySync(_0x1b52e6,_0x3a8f60,{'dereference':![],'overwrite':!![],'filter'(_0x56c632){const _0x1b0b81=a99_0x1f15;if(lstatSync(_0x56c632)['isSymbolicLink']())throw CliErrors['validation'](_0x1b0b81(0x143)+_0x56c632);return!![];}});}
1
+ (function(_0x332d0e,_0x2ba8ff){const _0x14dac6=a100_0x2147,_0x20ad44=_0x332d0e();while(!![]){try{const _0x4626e5=-parseInt(_0x14dac6(0x196))/0x1+parseInt(_0x14dac6(0x195))/0x2+parseInt(_0x14dac6(0x198))/0x3*(-parseInt(_0x14dac6(0x18b))/0x4)+-parseInt(_0x14dac6(0x190))/0x5*(parseInt(_0x14dac6(0x1b0))/0x6)+parseInt(_0x14dac6(0x184))/0x7*(parseInt(_0x14dac6(0x182))/0x8)+-parseInt(_0x14dac6(0x193))/0x9*(-parseInt(_0x14dac6(0x180))/0xa)+-parseInt(_0x14dac6(0x1ab))/0xb*(-parseInt(_0x14dac6(0x186))/0xc);if(_0x4626e5===_0x2ba8ff)break;else _0x20ad44['push'](_0x20ad44['shift']());}catch(_0x29f629){_0x20ad44['push'](_0x20ad44['shift']());}}}(a100_0x25ef,0x5574d));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a100_0x2147(_0x4b83c6,_0x92e823){_0x4b83c6=_0x4b83c6-0x17e;const _0x25efac=a100_0x25ef();let _0x2147e0=_0x25efac[_0x4b83c6];return _0x2147e0;}import{basename,dirname,resolve}from'node:path';function a100_0x25ef(){const _0x2302cd=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','managedRoot','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','removed','trim','filter','external-symlink','metadata-mismatch','map','2850342VMLfTV','company','skipped','validation','slice','138yrOeqE','push','agentsSkillsDir','contentHash','60iBpJYx','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','4000904nLNBVz','dir','7LYTQfe','name','12FBdvJH','pruneSkillCodes','unchanged','skillCode','values','833104aZQysd','scope','updated','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','not-managed-symlink','49390agHaND','isSymbolicLink','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','494694ZQHhzR','accessKey','1215708HUyOJk','494834CvsJCu','has','9PtoTro','personal','created','appCode','builtin','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','get','env','skill','length'];a100_0x25ef=function(){return _0x2302cd;};return a100_0x25ef();}import a100_0x175501 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x175501;export function linkEffectiveRuntimeSkills(_0x43cfdb,_0x1da7ef,_0x525898={}){const _0x504d35=a100_0x2147,_0x575eba=new Map();for(const _0x440370 of _0x43cfdb){const _0x5010f0=_0x440370[_0x504d35(0x1a0)][_0x504d35(0x189)];if(!_0x5010f0)continue;const _0x38020f=_0x575eba[_0x504d35(0x19e)](_0x5010f0);(!_0x38020f||_0x440370['scope']===_0x504d35(0x199))&&_0x575eba['set'](_0x5010f0,_0x440370);}const _0x530fd6=[],_0x405b96=resolveSkillSyncPaths(_0x525898);for(const _0x5af725 of _0x575eba[_0x504d35(0x18a)]()){const _0x5282a8=requireSkillCode(_0x5af725[_0x504d35(0x1a0)]),_0x344a8f=_0x1da7ef+'--'+_0x5282a8;for(const _0x23e91c of runtimeAgentSkillRoots(_0x405b96)){_0x530fd6['push'](ensureManagedSymlink(resolve(_0x23e91c,_0x344a8f),_0x5af725['dir'],_0x405b96[_0x504d35(0x1a3)]));}}return _0x530fd6;}export function pruneStaleRuntimeSkillLinks(_0x2324d5,_0x17ec2e,_0x54f732={},_0x501e6c){const _0x400a02=a100_0x2147,_0x33edd0=resolveSkillSyncPaths(_0x54f732),_0x5120ee=new Set([..._0x17ec2e][_0x400a02(0x1aa)](_0x818ee8=>_0x818ee8[_0x400a02(0x1a6)]())['filter'](Boolean)),_0x5a8d9d=_0x501e6c?new Set([..._0x501e6c][_0x400a02(0x1aa)](_0x1d38fb=>_0x1d38fb[_0x400a02(0x1a6)]())[_0x400a02(0x1a7)](Boolean)):undefined,_0x4356a5=[];for(const _0x12ef4c of runtimeAgentSkillRoots(_0x33edd0)){for(const _0x2ee12f of managedAppSkillLinkPaths(_0x12ef4c,_0x2324d5)){const _0x9bec46=basename(_0x2ee12f)[_0x400a02(0x1af)]((_0x2324d5+'--')[_0x400a02(0x1a1)]);if(_0x5a8d9d&&!_0x5a8d9d[_0x400a02(0x197)](_0x9bec46))continue;if(_0x5120ee['has'](_0x9bec46))continue;_0x4356a5[_0x400a02(0x1b1)](removeManagedSkillLink(_0x2ee12f,_0x33edd0[_0x400a02(0x1a3)]));}}return _0x4356a5;}export function pruneStaleRuntimeSkillCache(_0x4b4e5e,_0x1b3060={}){const _0xf67faf=a100_0x2147,_0xcd5eda=new Set([..._0x4b4e5e['activeSkillCodes']][_0xf67faf(0x1aa)](_0x564047=>_0x564047[_0xf67faf(0x1a6)]())[_0xf67faf(0x1a7)](Boolean)),_0x4973c7=_0x4b4e5e[_0xf67faf(0x187)]?new Set([..._0x4b4e5e[_0xf67faf(0x187)]][_0xf67faf(0x1aa)](_0x5b2176=>_0x5b2176[_0xf67faf(0x1a6)]())[_0xf67faf(0x1a7)](Boolean)):undefined,_0x2e2bcf=_0x4b4e5e['scopes']??[_0xf67faf(0x199),_0xf67faf(0x1ac)],_0x4aa8ea=resolve(getRuntimeSkillCacheRoot(_0x4b4e5e[_0xf67faf(0x19f)],_0x4b4e5e[_0xf67faf(0x194)],_0x1b3060),safePathSegment(_0x4b4e5e[_0xf67faf(0x19b)],_0xf67faf(0x19b))),_0x4f25b9=[];for(const _0x4f440c of _0x2e2bcf){const _0x9fd21d=resolve(_0x4aa8ea,_0x4f440c);if(!existsSync(_0x9fd21d))continue;for(const _0x277a72 of readdirSync(_0x9fd21d,{'withFileTypes':!![]})){if(!_0x277a72['isDirectory']())continue;const _0x3352c6=_0x277a72[_0xf67faf(0x185)];if(_0x4973c7&&!_0x4973c7['has'](_0x3352c6))continue;if(_0xcd5eda[_0xf67faf(0x197)](_0x3352c6))continue;const _0x4f3911=resolve(_0x9fd21d,_0x3352c6),_0x1ea97d=readMetadataIfPresent(resolve(_0x4f3911,METADATA_FILE));if(_0x1ea97d?.[_0xf67faf(0x19b)]!==_0x4b4e5e[_0xf67faf(0x19b)]||_0x1ea97d[_0xf67faf(0x18c)]!==_0x4f440c||_0x1ea97d['skillCode']!==_0x3352c6){_0x4f25b9[_0xf67faf(0x1b1)]({'path':_0x4f3911,'action':_0xf67faf(0x1ad),'reason':_0xf67faf(0x1a9)});continue;}removeSync(_0x4f3911),_0x4f25b9[_0xf67faf(0x1b1)]({'path':_0x4f3911,'action':_0xf67faf(0x1a5)});}}return _0x4f25b9;}export function linkGlobalRuntimeSkills(_0x3f9dac,_0x2e3acb={}){const _0x57236b=a100_0x2147,_0x43753e=resolveSkillSyncPaths(_0x2e3acb),_0x5d32e5=[];for(const _0xcd3f5d of _0x3f9dac){if(_0xcd3f5d[_0x57236b(0x18c)]!=='builtin')throw CliErrors['validation'](_0x57236b(0x1a4)+_0xcd3f5d[_0x57236b(0x18c)]);const _0xbc8b90=requireSkillCode(_0xcd3f5d[_0x57236b(0x1a0)]),_0x4309cb=copyManagedSkillDirectory(_0xcd3f5d[_0x57236b(0x183)],resolve(_0x43753e[_0x57236b(0x17e)],_0xbc8b90));_0x5d32e5[_0x57236b(0x1b1)]({..._0x4309cb,'contentHash':_0xcd3f5d['contentHash']});}return _0x5d32e5;}function ensureManagedSymlink(_0x82e8de,_0x32f681,_0x382db0){const _0x1eb4d3=a100_0x2147;mkdirSync(dirname(_0x82e8de),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x82e8de)||isDanglingSymlink(_0x82e8de)){const _0x1a1598=lstatSync(_0x82e8de);if(!_0x1a1598[_0x1eb4d3(0x191)]())throw CliErrors[_0x1eb4d3(0x1ae)](_0x1eb4d3(0x181)+_0x82e8de);const _0x41b63c=resolveSymlinkTarget(_0x82e8de);if(!isPathInside(realOrResolved(_0x41b63c),realOrResolved(_0x382db0)))throw CliErrors[_0x1eb4d3(0x1ae)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x82e8de);if(realOrResolved(_0x41b63c)===realOrResolved(_0x32f681))return{'path':_0x82e8de,'target':_0x32f681,'action':_0x1eb4d3(0x188)};return unlinkSync(_0x82e8de),symlinkSync(_0x32f681,_0x82e8de,_0x1eb4d3(0x183)),{'path':_0x82e8de,'target':_0x32f681,'action':_0x1eb4d3(0x18d)};}return symlinkSync(_0x32f681,_0x82e8de,_0x1eb4d3(0x183)),{'path':_0x82e8de,'target':_0x32f681,'action':'created'};}function managedAppSkillLinkPaths(_0x15fd0f,_0xc9bd2a){const _0x5509fd=a100_0x2147;if(!existsSync(_0x15fd0f))return[];const _0x3eebf7=_0xc9bd2a+'--';return readdirSync(_0x15fd0f,{'withFileTypes':!![]})[_0x5509fd(0x1a7)](_0x39b530=>_0x39b530['name']['startsWith'](_0x3eebf7))['map'](_0x2996f1=>resolve(_0x15fd0f,_0x2996f1[_0x5509fd(0x185)]));}function removeManagedSkillLink(_0x5a6774,_0x4186cc){const _0x30067f=a100_0x2147,_0x40f93c=lstatIfPresent(_0x5a6774);if(!_0x40f93c?.[_0x30067f(0x191)]())return{'path':_0x5a6774,'action':_0x30067f(0x1ad),'reason':_0x30067f(0x18f)};const _0xb21cec=resolveSymlinkTarget(_0x5a6774);if(!isPathInside(realOrResolved(_0xb21cec),realOrResolved(_0x4186cc)))return{'path':_0x5a6774,'action':_0x30067f(0x1ad),'reason':_0x30067f(0x1a8)};return unlinkSync(_0x5a6774),{'path':_0x5a6774,'action':_0x30067f(0x1a5)};}export function copyManagedSkillDirectory(_0x439efd,_0x51da58){const _0x598277=a100_0x2147,_0x4c7aca=resolve(_0x51da58,METADATA_FILE),_0x646284=existsSync(_0x51da58);if(_0x646284){const _0x2ecbb4=lstatSync(_0x51da58);if(_0x2ecbb4[_0x598277(0x191)]())throw CliErrors[_0x598277(0x1ae)](_0x598277(0x18e)+_0x51da58);if(!_0x2ecbb4['isDirectory']())throw CliErrors[_0x598277(0x1ae)](_0x598277(0x192)+_0x51da58);const _0x46aabc=readMetadataIfPresent(_0x4c7aca);if(_0x46aabc?.[_0x598277(0x18c)]!==_0x598277(0x19c))throw CliErrors[_0x598277(0x1ae)](_0x598277(0x19d)+_0x51da58);}ensureDirSync(dirname(_0x51da58));const _0x1e2eb7=_0x646284?readMetadataIfPresent(_0x4c7aca)?.['contentHash']:undefined,_0xa8579d=readMetadataIfPresent(resolve(_0x439efd,METADATA_FILE))?.[_0x598277(0x17f)];return _0x646284&&removeSync(_0x51da58),copySkillDirectory(_0x439efd,_0x51da58),{'path':_0x51da58,'target':_0x439efd,'action':!_0x646284?_0x598277(0x19a):_0x1e2eb7===_0xa8579d?'unchanged':'updated'};}function copySkillDirectory(_0xabbcec,_0x428d0b){copySync(_0xabbcec,_0x428d0b,{'dereference':![],'overwrite':!![],'filter'(_0x3288f5){const _0x314ba2=a100_0x2147;if(lstatSync(_0x3288f5)[_0x314ba2(0x191)]())throw CliErrors[_0x314ba2(0x1ae)](_0x314ba2(0x1a2)+_0x3288f5);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x17d00a,_0x3ff5e9){const _0x1677b0=a100_0x3d54,_0xce3656=_0x17d00a();while(!![]){try{const _0x1e739f=-parseInt(_0x1677b0(0x1a2))/0x1+-parseInt(_0x1677b0(0x1c1))/0x2+parseInt(_0x1677b0(0x1c4))/0x3+-parseInt(_0x1677b0(0x1a5))/0x4+parseInt(_0x1677b0(0x1a1))/0x5*(parseInt(_0x1677b0(0x1c2))/0x6)+parseInt(_0x1677b0(0x1bc))/0x7*(parseInt(_0x1677b0(0x1b2))/0x8)+-parseInt(_0x1677b0(0x1a4))/0x9*(parseInt(_0x1677b0(0x19f))/0xa);if(_0x1e739f===_0x3ff5e9)break;else _0xce3656['push'](_0xce3656['shift']());}catch(_0x1d705f){_0xce3656['push'](_0xce3656['shift']());}}}(a100_0x3b71,0x1b0e1));function a100_0x3d54(_0x12b9af,_0x3d2b67){_0x12b9af=_0x12b9af-0x19d;const _0x3b712f=a100_0x3b71();let _0x3d546c=_0x3b712f[_0x12b9af];return _0x3d546c;}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a100_0x3b71(){const _0x465239=['name','set','16XuvVAR','includes','linkedPaths','linkedPath','filter','values','appCode','isSymbolicLink','accessKey','isArray','561785KxjCXQ','sort','code','env','skillMdPath','114838dqVunc','1986SYifXb','get','453246InUBJp','isDirectory','metadataPath','has','builtin','650DdwwSd','scope','710IHJqLV','26822WnTHEK','cache','8865EwpFaS','398044KLfitB','source','map','push','from','skillCode','cacheDir','localeCompare','dir','link','tags'];a100_0x3b71=function(){return _0x465239;};return a100_0x3b71();}export function listLocalRuntimeSkills(_0x31e9f1,_0x34ed41={}){const _0x5940c2=a100_0x3d54,_0x29753c=safePathSegment(_0x31e9f1['appCode'],_0x5940c2(0x1b8)),_0x3be635=normalizeRuntimeSkillScopes(_0x31e9f1['scopes']),_0x334944=new Set(_0x3be635),_0x2e3e5d=_0x31e9f1[_0x5940c2(0x1be)]?.['trim'](),_0x1983f4=new Map(),_0x2fceff=resolve(getRuntimeSkillCacheRoot(_0x31e9f1[_0x5940c2(0x1bf)],_0x31e9f1[_0x5940c2(0x1ba)],_0x34ed41),_0x29753c);for(const _0x2609ce of _0x3be635){for(const _0x20ca1f of localSkillEntryDirs(resolve(_0x2fceff,_0x2609ce))){collectLocalRuntimeSkill(_0x1983f4,_0x20ca1f,{'appCode':_0x29753c,'scopes':_0x334944,'code':_0x2e3e5d,'source':_0x5940c2(0x1a3)});}}const _0x5cec25=resolveSkillSyncPaths(_0x34ed41);for(const _0x4321a2 of runtimeAgentSkillRoots(_0x5cec25)){for(const _0x82f746 of localSkillLinkCandidates(_0x4321a2,_0x29753c,_0x334944)){collectLocalRuntimeSkill(_0x1983f4,_0x82f746,{'appCode':_0x29753c,'scopes':_0x334944,'code':_0x2e3e5d,'source':_0x5940c2(0x1ae),'linkedPath':_0x82f746});}}return Array[_0x5940c2(0x1a9)](_0x1983f4[_0x5940c2(0x1b7)]())[_0x5940c2(0x1bd)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x242c64){const _0x544e1b=a100_0x3d54;if(!existsSync(_0x242c64))return[];return readdirSync(_0x242c64,{'withFileTypes':!![]})[_0x544e1b(0x1b6)](_0x11b95d=>_0x11b95d[_0x544e1b(0x1c5)]()||_0x11b95d[_0x544e1b(0x1b9)]())[_0x544e1b(0x1a7)](_0x432cf2=>resolve(_0x242c64,_0x432cf2[_0x544e1b(0x1b0)]));}function localSkillLinkCandidates(_0x54f571,_0xc66c1c,_0x242990){const _0x8a8022=a100_0x3d54;if(!existsSync(_0x54f571))return[];const _0x54c77f=_0xc66c1c+'--';return readdirSync(_0x54f571,{'withFileTypes':!![]})['filter'](_0x78b221=>_0x78b221[_0x8a8022(0x1c5)]()||_0x78b221[_0x8a8022(0x1b9)]())['filter'](_0x49af1e=>_0x49af1e['name']['startsWith'](_0x54c77f)||_0x242990[_0x8a8022(0x19d)](_0x8a8022(0x19e)))[_0x8a8022(0x1a7)](_0x20f200=>resolve(_0x54f571,_0x20f200['name']));}function collectLocalRuntimeSkill(_0x542e84,_0x18d4ce,_0x52ac2b){const _0x115498=a100_0x3d54,_0x20f6e0=resolve(_0x18d4ce,METADATA_FILE),_0x2eb9c3=readMetadataIfPresent(_0x20f6e0);if(!_0x2eb9c3)return;if(_0x2eb9c3['appCode']!==_0x52ac2b[_0x115498(0x1b8)])return;if(!isRuntimeSkillScope(_0x2eb9c3[_0x115498(0x1a0)])||!_0x52ac2b['scopes'][_0x115498(0x19d)](_0x2eb9c3['scope']))return;const _0x4ed241=_0x2eb9c3[_0x115498(0x1aa)]?.['trim']();if(!_0x4ed241)return;if(_0x52ac2b['code']&&_0x4ed241!==_0x52ac2b['code'])return;const _0x57c8ba=_0x2eb9c3[_0x115498(0x1a0)]+':'+_0x4ed241,_0x3ffd95=_0x52ac2b[_0x115498(0x1b5)]?[_0x52ac2b['linkedPath']]:[],_0x6325ce=_0x542e84[_0x115498(0x1c3)](_0x57c8ba);if(_0x6325ce){_0x52ac2b[_0x115498(0x1a6)]===_0x115498(0x1a3)&&(_0x6325ce[_0x115498(0x1ad)]=_0x18d4ce,_0x6325ce[_0x115498(0x1ab)]=_0x18d4ce,_0x6325ce[_0x115498(0x1c0)]=resolve(_0x18d4ce,SKILL_FILE),_0x6325ce[_0x115498(0x1c6)]=_0x20f6e0);for(const _0x1d93cf of _0x3ffd95){!_0x6325ce['linkedPaths'][_0x115498(0x1b3)](_0x1d93cf)&&_0x6325ce[_0x115498(0x1b4)][_0x115498(0x1a8)](_0x1d93cf);}_0x6325ce[_0x115498(0x1b4)][_0x115498(0x1bd)]();return;}_0x542e84[_0x115498(0x1b1)](_0x57c8ba,{..._0x2eb9c3,'tags':Array[_0x115498(0x1bb)](_0x2eb9c3[_0x115498(0x1af)])?_0x2eb9c3['tags']:[],'scope':_0x2eb9c3[_0x115498(0x1a0)],'source':'local','dir':_0x18d4ce,'cacheDir':_0x52ac2b[_0x115498(0x1a6)]===_0x115498(0x1a3)?_0x18d4ce:undefined,'skillMdPath':resolve(_0x18d4ce,SKILL_FILE),'metadataPath':_0x20f6e0,'linkedPaths':_0x3ffd95});}function compareLocalRuntimeSkills(_0x2b6c54,_0x20cd52){const _0x34ebe2=a100_0x3d54,_0x41ac18={'personal':0x0,'company':0x1,'builtin':0x2};return _0x41ac18[_0x2b6c54[_0x34ebe2(0x1a0)]]-_0x41ac18[_0x20cd52[_0x34ebe2(0x1a0)]]||_0x2b6c54['skillCode'][_0x34ebe2(0x1ac)](_0x20cd52[_0x34ebe2(0x1aa)])||_0x2b6c54[_0x34ebe2(0x1ad)]['localeCompare'](_0x20cd52['dir']);}
1
+ (function(_0x2635cd,_0x39cfa7){const _0x227d6d=a101_0x1444,_0x254902=_0x2635cd();while(!![]){try{const _0xbcf672=parseInt(_0x227d6d(0x1b3))/0x1+-parseInt(_0x227d6d(0x1be))/0x2+parseInt(_0x227d6d(0x1bc))/0x3+parseInt(_0x227d6d(0x1b4))/0x4*(parseInt(_0x227d6d(0x1c8))/0x5)+-parseInt(_0x227d6d(0x1bd))/0x6*(-parseInt(_0x227d6d(0x1d5))/0x7)+-parseInt(_0x227d6d(0x1ac))/0x8+-parseInt(_0x227d6d(0x1cd))/0x9;if(_0xbcf672===_0x39cfa7)break;else _0x254902['push'](_0x254902['shift']());}catch(_0x56cd86){_0x254902['push'](_0x254902['shift']());}}}(a101_0x2b37,0x3d06e));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a101_0x2b37(){const _0x435036=['values','link','sort','449585UgDEmX','99508qhBxQY','local','tags','skillMdPath','map','trim','env','cache','573378lPIsdu','1660674svFkRc','721494ChqfJj','includes','code','isDirectory','skillCode','filter','dir','accessKey','push','isArray','5JoZjFb','isSymbolicLink','set','scopes','get','500517pdmgfU','appCode','metadataPath','linkedPath','localeCompare','source','linkedPaths','has','7MlbOYU','2208328EjTwXu','name','builtin','scope'];a101_0x2b37=function(){return _0x435036;};return a101_0x2b37();}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a101_0x1444(_0x4ce043,_0x23369f){_0x4ce043=_0x4ce043-0x1ac;const _0x2b37bf=a101_0x2b37();let _0x14447b=_0x2b37bf[_0x4ce043];return _0x14447b;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x2ad00b,_0x1e1e0b={}){const _0x4a4479=a101_0x1444,_0x2987f0=safePathSegment(_0x2ad00b[_0x4a4479(0x1ce)],'appCode'),_0x3b453f=normalizeRuntimeSkillScopes(_0x2ad00b[_0x4a4479(0x1cb)]),_0x5e532d=new Set(_0x3b453f),_0x5744f4=_0x2ad00b[_0x4a4479(0x1c0)]?.[_0x4a4479(0x1b9)](),_0x213bd3=new Map(),_0x4c412b=resolve(getRuntimeSkillCacheRoot(_0x2ad00b[_0x4a4479(0x1ba)],_0x2ad00b[_0x4a4479(0x1c5)],_0x1e1e0b),_0x2987f0);for(const _0x582f85 of _0x3b453f){for(const _0x39af4b of localSkillEntryDirs(resolve(_0x4c412b,_0x582f85))){collectLocalRuntimeSkill(_0x213bd3,_0x39af4b,{'appCode':_0x2987f0,'scopes':_0x5e532d,'code':_0x5744f4,'source':_0x4a4479(0x1bb)});}}const _0x3d2a35=resolveSkillSyncPaths(_0x1e1e0b);for(const _0x1b13bb of runtimeAgentSkillRoots(_0x3d2a35)){for(const _0x52e156 of localSkillLinkCandidates(_0x1b13bb,_0x2987f0,_0x5e532d)){collectLocalRuntimeSkill(_0x213bd3,_0x52e156,{'appCode':_0x2987f0,'scopes':_0x5e532d,'code':_0x5744f4,'source':_0x4a4479(0x1b1),'linkedPath':_0x52e156});}}return Array['from'](_0x213bd3[_0x4a4479(0x1b0)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x594722){const _0x20b76b=a101_0x1444;if(!existsSync(_0x594722))return[];return readdirSync(_0x594722,{'withFileTypes':!![]})['filter'](_0x14788b=>_0x14788b[_0x20b76b(0x1c1)]()||_0x14788b['isSymbolicLink']())['map'](_0x4bf373=>resolve(_0x594722,_0x4bf373[_0x20b76b(0x1ad)]));}function localSkillLinkCandidates(_0x37b16f,_0x3b4a01,_0x9f797e){const _0x1e57b9=a101_0x1444;if(!existsSync(_0x37b16f))return[];const _0x45542a=_0x3b4a01+'--';return readdirSync(_0x37b16f,{'withFileTypes':!![]})[_0x1e57b9(0x1c3)](_0xda9f85=>_0xda9f85['isDirectory']()||_0xda9f85[_0x1e57b9(0x1c9)]())['filter'](_0x2dd3fc=>_0x2dd3fc['name']['startsWith'](_0x45542a)||_0x9f797e[_0x1e57b9(0x1d4)](_0x1e57b9(0x1ae)))[_0x1e57b9(0x1b8)](_0x2bbc9a=>resolve(_0x37b16f,_0x2bbc9a['name']));}function collectLocalRuntimeSkill(_0x1fa8ec,_0x4aa8f8,_0x1dc46c){const _0x102a85=a101_0x1444,_0x145f7e=resolve(_0x4aa8f8,METADATA_FILE),_0x13dcc2=readMetadataIfPresent(_0x145f7e);if(!_0x13dcc2)return;if(_0x13dcc2[_0x102a85(0x1ce)]!==_0x1dc46c['appCode'])return;if(!isRuntimeSkillScope(_0x13dcc2['scope'])||!_0x1dc46c[_0x102a85(0x1cb)][_0x102a85(0x1d4)](_0x13dcc2[_0x102a85(0x1af)]))return;const _0x4c936d=_0x13dcc2[_0x102a85(0x1c2)]?.[_0x102a85(0x1b9)]();if(!_0x4c936d)return;if(_0x1dc46c[_0x102a85(0x1c0)]&&_0x4c936d!==_0x1dc46c[_0x102a85(0x1c0)])return;const _0x8d5403=_0x13dcc2[_0x102a85(0x1af)]+':'+_0x4c936d,_0x59b3b9=_0x1dc46c[_0x102a85(0x1d0)]?[_0x1dc46c[_0x102a85(0x1d0)]]:[],_0x171199=_0x1fa8ec[_0x102a85(0x1cc)](_0x8d5403);if(_0x171199){_0x1dc46c[_0x102a85(0x1d2)]===_0x102a85(0x1bb)&&(_0x171199[_0x102a85(0x1c4)]=_0x4aa8f8,_0x171199['cacheDir']=_0x4aa8f8,_0x171199[_0x102a85(0x1b7)]=resolve(_0x4aa8f8,SKILL_FILE),_0x171199[_0x102a85(0x1cf)]=_0x145f7e);for(const _0x47f4ff of _0x59b3b9){!_0x171199['linkedPaths'][_0x102a85(0x1bf)](_0x47f4ff)&&_0x171199['linkedPaths'][_0x102a85(0x1c6)](_0x47f4ff);}_0x171199[_0x102a85(0x1d3)][_0x102a85(0x1b2)]();return;}_0x1fa8ec[_0x102a85(0x1ca)](_0x8d5403,{..._0x13dcc2,'tags':Array[_0x102a85(0x1c7)](_0x13dcc2[_0x102a85(0x1b6)])?_0x13dcc2[_0x102a85(0x1b6)]:[],'scope':_0x13dcc2[_0x102a85(0x1af)],'source':_0x102a85(0x1b5),'dir':_0x4aa8f8,'cacheDir':_0x1dc46c[_0x102a85(0x1d2)]===_0x102a85(0x1bb)?_0x4aa8f8:undefined,'skillMdPath':resolve(_0x4aa8f8,SKILL_FILE),'metadataPath':_0x145f7e,'linkedPaths':_0x59b3b9});}function compareLocalRuntimeSkills(_0x5be142,_0x1fbd3d){const _0x4eb93d=a101_0x1444,_0x5b030c={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5b030c[_0x5be142[_0x4eb93d(0x1af)]]-_0x5b030c[_0x1fbd3d['scope']]||_0x5be142[_0x4eb93d(0x1c2)][_0x4eb93d(0x1d1)](_0x1fbd3d[_0x4eb93d(0x1c2)])||_0x5be142['dir']['localeCompare'](_0x1fbd3d[_0x4eb93d(0x1c4)]);}
@@ -1 +1 @@
1
- (function(_0x5f1604,_0x475eec){const _0x9c1a6a=a101_0x52ce,_0x30a654=_0x5f1604();while(!![]){try{const _0x9f126b=-parseInt(_0x9c1a6a(0x13a))/0x1*(parseInt(_0x9c1a6a(0x120))/0x2)+parseInt(_0x9c1a6a(0x143))/0x3+parseInt(_0x9c1a6a(0x129))/0x4+-parseInt(_0x9c1a6a(0x11c))/0x5+parseInt(_0x9c1a6a(0x139))/0x6*(-parseInt(_0x9c1a6a(0x130))/0x7)+parseInt(_0x9c1a6a(0x13f))/0x8+parseInt(_0x9c1a6a(0x13c))/0x9;if(_0x9f126b===_0x475eec)break;else _0x30a654['push'](_0x30a654['shift']());}catch(_0x29256f){_0x30a654['push'](_0x30a654['shift']());}}}(a101_0x351d,0x6a4e8));function a101_0x351d(){const _0x3c69ea=['size','from','isDirectory','toString','object','toLowerCase','string','Skill\x20file\x20path\x20must\x20be\x20text.','10146qcgYvw','371FkcIIZ','isSymbolicLink','5824764ecqNvr','length','validation','3272104BiZgCm','isBuffer','path','bytes','377373Juxjjv','compare','test','name','content','push','675470NArbtq','isFile','values','sha256','4460bxAWqU','Unsafe\x20Skill\x20file\x20path:\x20','Duplicate\x20Skill\x20file\x20path:\x20','includes','Skill\x20file\x20size\x20is\x20invalid:\x20','isArray','Skill\x20file\x20sha256\x20is\x20invalid:\x20','sort','replace','1208388VGfeMT','utf8','localeCompare','isSafeInteger','set','startsWith','has','357IcrwUs'];a101_0x351d=function(){return _0x3c69ea;};return a101_0x351d();}import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x5a6c24){const _0x307c80=a101_0x52ce;return _0x5a6c24[_0x307c80(0x142)]??Buffer[_0x307c80(0x132)](_0x5a6c24[_0x307c80(0x147)]??'',_0x307c80(0x12a));}export function fileText(_0xd8f98e){const _0x2113ae=a101_0x52ce;return fileContent(_0xd8f98e)[_0x2113ae(0x134)]('utf8');}export function normalizeLocalFiles(_0x240fa3){const _0x5e1916=a101_0x52ce;if(!Array[_0x5e1916(0x125)](_0x240fa3)||_0x240fa3[_0x5e1916(0x13d)]===0x0)return[];const _0x36b82d=new Map();for(const _0x48108f of _0x240fa3){if(!_0x48108f||typeof _0x48108f!==_0x5e1916(0x135)||typeof _0x48108f[_0x5e1916(0x141)]!==_0x5e1916(0x137))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x300c31=normalizeSkillRelativePath(_0x48108f[_0x5e1916(0x141)]);if(_0x36b82d[_0x5e1916(0x12f)](_0x300c31))throw CliErrors[_0x5e1916(0x13e)](_0x5e1916(0x122)+_0x300c31);if(_0x48108f[_0x5e1916(0x142)]!==undefined&&!Buffer[_0x5e1916(0x140)](_0x48108f['bytes']))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x300c31);if(_0x48108f[_0x5e1916(0x142)]===undefined&&typeof _0x48108f[_0x5e1916(0x147)]!==_0x5e1916(0x137))throw CliErrors[_0x5e1916(0x13e)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x300c31);const _0x379324=fileContent(_0x48108f);_0x36b82d[_0x5e1916(0x12d)](_0x300c31,{'path':_0x300c31,'bytes':_0x379324});}return Array[_0x5e1916(0x132)](_0x36b82d[_0x5e1916(0x11e)]())[_0x5e1916(0x127)](compareSkillFiles);}export function normalizeManifestFiles(_0x812707){const _0x256127=a101_0x52ce;if(!Array[_0x256127(0x125)](_0x812707)||_0x812707[_0x256127(0x13d)]===0x0)return[];const _0x11914=new Map();for(const _0x5bb14e of _0x812707){if(!_0x5bb14e||typeof _0x5bb14e!=='object'||typeof _0x5bb14e[_0x256127(0x141)]!=='string')throw CliErrors['validation'](_0x256127(0x138));const _0x27e45d=normalizeSkillRelativePath(_0x5bb14e['path']);if(_0x11914[_0x256127(0x12f)](_0x27e45d))throw CliErrors[_0x256127(0x13e)](_0x256127(0x122)+_0x27e45d);if(!isSha256Hex(_0x5bb14e[_0x256127(0x11f)]))throw CliErrors[_0x256127(0x13e)](_0x256127(0x126)+_0x27e45d);if(!Number[_0x256127(0x12c)](_0x5bb14e['size'])||_0x5bb14e[_0x256127(0x131)]<0x0)throw CliErrors[_0x256127(0x13e)](_0x256127(0x124)+_0x27e45d);_0x11914[_0x256127(0x12d)](_0x27e45d,{'path':_0x27e45d,'sha256':_0x5bb14e[_0x256127(0x11f)][_0x256127(0x136)](),'size':_0x5bb14e[_0x256127(0x131)]});}return Array[_0x256127(0x132)](_0x11914['values']())[_0x256127(0x127)](compareSkillFiles);}export function scanSkillDirectory(_0x441ec1){const _0x21f11f=realpathSync(_0x441ec1),_0x5a40a8=[];function _0x474f87(_0x195a9c){const _0x541280=a101_0x52ce,_0x2522e2=readdirSync(_0x195a9c,{'withFileTypes':!![]})['sort']((_0x31ecd5,_0x1df2c8)=>_0x31ecd5[_0x541280(0x146)][_0x541280(0x12b)](_0x1df2c8[_0x541280(0x146)]));for(const _0x527657 of _0x2522e2){if(_0x527657[_0x541280(0x133)]()&&IGNORED_DIR_NAMES[_0x541280(0x12f)](_0x527657[_0x541280(0x146)]))continue;if(IGNORED_FILE_NAMES[_0x541280(0x12f)](_0x527657['name']))continue;const _0x1e8f37=resolve(_0x195a9c,_0x527657[_0x541280(0x146)]);if(_0x527657[_0x541280(0x13b)]())throw CliErrors['validation']('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x1e8f37);const _0x2e9889=toPosixPath(relative(_0x21f11f,_0x1e8f37));if(_0x527657['isDirectory']()){_0x474f87(_0x1e8f37);continue;}if(!_0x527657[_0x541280(0x11d)]())continue;validateSkillRelativePath(_0x2e9889);const _0xa47420=readFileSync(_0x1e8f37);_0x5a40a8[_0x541280(0x148)]({'path':_0x2e9889,'bytes':_0xa47420});}}return _0x474f87(_0x21f11f),normalizeLocalFiles(_0x5a40a8);}export function compareSkillFiles(_0x1d11ae,_0x552379){const _0x59fdcb=a101_0x52ce;if(_0x1d11ae[_0x59fdcb(0x141)]===SKILL_FILE)return _0x552379[_0x59fdcb(0x141)]===SKILL_FILE?0x0:-0x1;if(_0x552379['path']===SKILL_FILE)return 0x1;return Buffer[_0x59fdcb(0x144)](Buffer[_0x59fdcb(0x132)](_0x1d11ae['path'],_0x59fdcb(0x12a)),Buffer[_0x59fdcb(0x132)](_0x552379[_0x59fdcb(0x141)],_0x59fdcb(0x12a)));}export function normalizeSkillRelativePath(_0x140cb8){const _0x94dba1=toPosixPath(_0x140cb8['trim']());return validateSkillRelativePath(_0x94dba1),_0x94dba1;}export function validateSkillRelativePath(_0x5d41d1){const _0xfe9902=a101_0x52ce;if(!_0x5d41d1||_0x5d41d1[_0xfe9902(0x12e)]('/')||_0x5d41d1[_0xfe9902(0x123)]('//'))throw CliErrors['validation'](_0xfe9902(0x121)+_0x5d41d1);for(const _0x1cb964 of _0x5d41d1['split']('/')){if(!_0x1cb964||_0x1cb964==='.'||_0x1cb964==='..')throw CliErrors[_0xfe9902(0x13e)](_0xfe9902(0x121)+_0x5d41d1);}}export function toPosixPath(_0x23cfa7){const _0x5b626d=a101_0x52ce;return _0x23cfa7[_0x5b626d(0x128)](/\\/g,'/');}function a101_0x52ce(_0x1b8071,_0x136b2e){_0x1b8071=_0x1b8071-0x11c;const _0x351d7f=a101_0x351d();let _0x52ce5c=_0x351d7f[_0x1b8071];return _0x52ce5c;}export function isSha256Hex(_0x50c401){const _0x531570=a101_0x52ce;return typeof _0x50c401===_0x531570(0x137)&&/^[a-fA-F0-9]{64}$/[_0x531570(0x145)](_0x50c401);}
1
+ function a102_0x1a13(){const _0x1e1e44=['size','compare','startsWith','Skill\x20file\x20sha256\x20is\x20invalid:\x20','string','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','toLowerCase','test','isArray','286279WAYPPj','1657878fYDAYF','length','Skill\x20file\x20size\x20is\x20invalid:\x20','has','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','sort','validation','bytes','object','from','content','1013367fQDUgq','Unsafe\x20Skill\x20file\x20path:\x20','localeCompare','isBuffer','path','isFile','10984932TbwNBQ','2772735HNqIYu','values','toString','includes','sha256','457012PncGTB','split','name','replace','606392ZANpMc','Duplicate\x20Skill\x20file\x20path:\x20','isSafeInteger','216BrtgTI','utf8','15hdDPel','trim'];a102_0x1a13=function(){return _0x1e1e44;};return a102_0x1a13();}(function(_0xc5e025,_0x5d6996){const _0x32a6c7=a102_0x3212,_0x3b292b=_0xc5e025();while(!![]){try{const _0x30638c=parseInt(_0x32a6c7(0x12d))/0x1+parseInt(_0x32a6c7(0x139))/0x2*(-parseInt(_0x32a6c7(0x115))/0x3)+-parseInt(_0x32a6c7(0x110))/0x4+parseInt(_0x32a6c7(0x134))/0x5+parseInt(_0x32a6c7(0x122))/0x6+parseInt(_0x32a6c7(0x121))/0x7*(-parseInt(_0x32a6c7(0x113))/0x8)+parseInt(_0x32a6c7(0x133))/0x9;if(_0x30638c===_0x5d6996)break;else _0x3b292b['push'](_0x3b292b['shift']());}catch(_0x2765cd){_0x3b292b['push'](_0x3b292b['shift']());}}}(a102_0x1a13,0xa2b3c));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a102_0x3212(_0xe67b68,_0x2e2129){_0xe67b68=_0xe67b68-0x110;const _0x1a13e9=a102_0x1a13();let _0x321208=_0x1a13e9[_0xe67b68];return _0x321208;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x4bb254){const _0x4e8a38=a102_0x3212;return _0x4bb254['bytes']??Buffer[_0x4e8a38(0x12b)](_0x4bb254[_0x4e8a38(0x12c)]??'',_0x4e8a38(0x114));}export function fileText(_0x5c103b){const _0x22cf72=a102_0x3212;return fileContent(_0x5c103b)[_0x22cf72(0x136)](_0x22cf72(0x114));}export function normalizeLocalFiles(_0x16c01a){const _0x2a5059=a102_0x3212;if(!Array[_0x2a5059(0x120)](_0x16c01a)||_0x16c01a[_0x2a5059(0x123)]===0x0)return[];const _0x3fa5df=new Map();for(const _0x4b634e of _0x16c01a){if(!_0x4b634e||typeof _0x4b634e!==_0x2a5059(0x12a)||typeof _0x4b634e[_0x2a5059(0x131)]!==_0x2a5059(0x11b))throw CliErrors['validation'](_0x2a5059(0x11c));const _0xb42714=normalizeSkillRelativePath(_0x4b634e[_0x2a5059(0x131)]);if(_0x3fa5df[_0x2a5059(0x125)](_0xb42714))throw CliErrors[_0x2a5059(0x128)](_0x2a5059(0x111)+_0xb42714);if(_0x4b634e[_0x2a5059(0x129)]!==undefined&&!Buffer[_0x2a5059(0x130)](_0x4b634e['bytes']))throw CliErrors[_0x2a5059(0x128)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0xb42714);if(_0x4b634e[_0x2a5059(0x129)]===undefined&&typeof _0x4b634e['content']!==_0x2a5059(0x11b))throw CliErrors[_0x2a5059(0x128)](_0x2a5059(0x126)+_0xb42714);const _0x2fd44b=fileContent(_0x4b634e);_0x3fa5df['set'](_0xb42714,{'path':_0xb42714,'bytes':_0x2fd44b});}return Array[_0x2a5059(0x12b)](_0x3fa5df[_0x2a5059(0x135)]())[_0x2a5059(0x127)](compareSkillFiles);}export function normalizeManifestFiles(_0x21575d){const _0x5b161b=a102_0x3212;if(!Array['isArray'](_0x21575d)||_0x21575d[_0x5b161b(0x123)]===0x0)return[];const _0x33befd=new Map();for(const _0x571492 of _0x21575d){if(!_0x571492||typeof _0x571492!==_0x5b161b(0x12a)||typeof _0x571492[_0x5b161b(0x131)]!==_0x5b161b(0x11b))throw CliErrors['validation'](_0x5b161b(0x11c));const _0x3fe55f=normalizeSkillRelativePath(_0x571492[_0x5b161b(0x131)]);if(_0x33befd[_0x5b161b(0x125)](_0x3fe55f))throw CliErrors[_0x5b161b(0x128)](_0x5b161b(0x111)+_0x3fe55f);if(!isSha256Hex(_0x571492[_0x5b161b(0x138)]))throw CliErrors[_0x5b161b(0x128)](_0x5b161b(0x11a)+_0x3fe55f);if(!Number[_0x5b161b(0x112)](_0x571492['size'])||_0x571492[_0x5b161b(0x117)]<0x0)throw CliErrors['validation'](_0x5b161b(0x124)+_0x3fe55f);_0x33befd['set'](_0x3fe55f,{'path':_0x3fe55f,'sha256':_0x571492['sha256'][_0x5b161b(0x11e)](),'size':_0x571492['size']});}return Array[_0x5b161b(0x12b)](_0x33befd['values']())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x37ee64){const _0x5c650c=realpathSync(_0x37ee64),_0xb3d045=[];function _0x516cda(_0xa91c09){const _0x20d9ad=a102_0x3212,_0x4de279=readdirSync(_0xa91c09,{'withFileTypes':!![]})[_0x20d9ad(0x127)]((_0x1b3bea,_0x3595a3)=>_0x1b3bea[_0x20d9ad(0x13b)][_0x20d9ad(0x12f)](_0x3595a3['name']));for(const _0x1dfacd of _0x4de279){if(_0x1dfacd['isDirectory']()&&IGNORED_DIR_NAMES[_0x20d9ad(0x125)](_0x1dfacd[_0x20d9ad(0x13b)]))continue;if(IGNORED_FILE_NAMES[_0x20d9ad(0x125)](_0x1dfacd[_0x20d9ad(0x13b)]))continue;const _0x300a63=resolve(_0xa91c09,_0x1dfacd[_0x20d9ad(0x13b)]);if(_0x1dfacd['isSymbolicLink']())throw CliErrors[_0x20d9ad(0x128)](_0x20d9ad(0x11d)+_0x300a63);const _0x1a8643=toPosixPath(relative(_0x5c650c,_0x300a63));if(_0x1dfacd['isDirectory']()){_0x516cda(_0x300a63);continue;}if(!_0x1dfacd[_0x20d9ad(0x132)]())continue;validateSkillRelativePath(_0x1a8643);const _0xa41d8c=readFileSync(_0x300a63);_0xb3d045['push']({'path':_0x1a8643,'bytes':_0xa41d8c});}}return _0x516cda(_0x5c650c),normalizeLocalFiles(_0xb3d045);}export function compareSkillFiles(_0x28497d,_0xe23159){const _0x3b5224=a102_0x3212;if(_0x28497d[_0x3b5224(0x131)]===SKILL_FILE)return _0xe23159[_0x3b5224(0x131)]===SKILL_FILE?0x0:-0x1;if(_0xe23159[_0x3b5224(0x131)]===SKILL_FILE)return 0x1;return Buffer[_0x3b5224(0x118)](Buffer[_0x3b5224(0x12b)](_0x28497d[_0x3b5224(0x131)],'utf8'),Buffer['from'](_0xe23159[_0x3b5224(0x131)],'utf8'));}export function normalizeSkillRelativePath(_0x2713a4){const _0x45c6cb=a102_0x3212,_0x4c2270=toPosixPath(_0x2713a4[_0x45c6cb(0x116)]());return validateSkillRelativePath(_0x4c2270),_0x4c2270;}export function validateSkillRelativePath(_0x19f760){const _0x3307e4=a102_0x3212;if(!_0x19f760||_0x19f760[_0x3307e4(0x119)]('/')||_0x19f760[_0x3307e4(0x137)]('//'))throw CliErrors[_0x3307e4(0x128)](_0x3307e4(0x12e)+_0x19f760);for(const _0x13d525 of _0x19f760[_0x3307e4(0x13a)]('/')){if(!_0x13d525||_0x13d525==='.'||_0x13d525==='..')throw CliErrors[_0x3307e4(0x128)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x19f760);}}export function toPosixPath(_0x57b8e8){const _0x52e5fc=a102_0x3212;return _0x57b8e8[_0x52e5fc(0x13c)](/\\/g,'/');}export function isSha256Hex(_0x398cc6){const _0x24bcc1=a102_0x3212;return typeof _0x398cc6===_0x24bcc1(0x11b)&&/^[a-fA-F0-9]{64}$/[_0x24bcc1(0x11f)](_0x398cc6);}
@@ -1 +1 @@
1
- (function(_0x546fcc,_0x5ab9a7){const _0x3ec7ac=a102_0x4259,_0x455b06=_0x546fcc();while(!![]){try{const _0x1b54c1=-parseInt(_0x3ec7ac(0x120))/0x1*(parseInt(_0x3ec7ac(0x124))/0x2)+-parseInt(_0x3ec7ac(0x12f))/0x3+parseInt(_0x3ec7ac(0x13f))/0x4+parseInt(_0x3ec7ac(0x119))/0x5*(-parseInt(_0x3ec7ac(0x144))/0x6)+parseInt(_0x3ec7ac(0x110))/0x7*(-parseInt(_0x3ec7ac(0x11e))/0x8)+parseInt(_0x3ec7ac(0x13d))/0x9+-parseInt(_0x3ec7ac(0x143))/0xa*(-parseInt(_0x3ec7ac(0x132))/0xb);if(_0x1b54c1===_0x5ab9a7)break;else _0x455b06['push'](_0x455b06['shift']());}catch(_0x5606d8){_0x455b06['push'](_0x455b06['shift']());}}}(a102_0x278e,0xcd923));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';function a102_0x4259(_0x17db30,_0x1d0c08){_0x17db30=_0x17db30-0x10d;const _0x278eb5=a102_0x278e();let _0x4259d9=_0x278eb5[_0x17db30];return _0x4259d9;}import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x56cdb2,_0x10b6e1,_0x2c9763){const _0x3e49c3=a102_0x4259,_0x3fd486=requireSkillCode(_0x56cdb2),_0x9e4dbc=requirePackageBytes(_0x3fd486,_0x2c9763['packageBytes']),_0x52902d=extractDownloadedPackage(_0x9e4dbc),_0x46a8b9=_0x52902d[_0x3e49c3(0x122)](_0x2056a1=>_0x2056a1[_0x3e49c3(0x12c)]===SKILL_FILE);if(!_0x46a8b9)throw CliErrors[_0x3e49c3(0x145)](_0x3e49c3(0x141)+SKILL_FILE+':\x20'+_0x3fd486);const _0x4f6fe4=withMaterializedSkillFrontmatter(_0x52902d,_0x56cdb2,_0x3fd486),_0x1c6768=_0x4f6fe4['find'](_0x1f9dda=>_0x1f9dda['path']===SKILL_FILE),_0x1165f9=fileText(_0x1c6768),_0x3185ab=getRuntimeSkillDir(_0x2c9763[_0x3e49c3(0x131)],_0x2c9763['accessKey'],_0x2c9763['appCode'],_0x10b6e1,_0x3fd486,_0x2c9763[_0x3e49c3(0x11a)]),_0x358696=resolve(_0x3185ab,SKILL_FILE),_0x2b75b9=resolve(_0x3185ab,METADATA_FILE),_0x4dcbb6=contentHash(_0x1165f9),_0x428950=readMetadataIfPresent(_0x2b75b9)?.[_0x3e49c3(0x13b)];ensurePulledFilesCanBeOverwritten(_0x3185ab,_0x2b75b9,_0x4f6fe4,_0x2c9763[_0x3e49c3(0x116)]===!![]),mkdirSync(_0x3185ab,{'recursive':!![],'mode':0x1c0});const _0x2acd48=existsSync(_0x358696)?readFileSync(_0x358696,_0x3e49c3(0x123)):undefined;return materializeFiles(_0x3185ab,_0x4f6fe4),removeStaleManagedFiles(_0x3185ab,_0x428950,_0x4f6fe4),writeJsonAtomic(_0x2b75b9,buildMetadata(_0x56cdb2,_0x10b6e1,_0x2c9763['appCode'],_0x4dcbb6,_0x2c9763[_0x3e49c3(0x12e)],_0x4f6fe4,_0x9e4dbc)),{'skill':_0x56cdb2,'scope':_0x10b6e1,'dir':_0x3185ab,'skillMdPath':_0x358696,'metadataPath':_0x2b75b9,'contentHash':_0x4dcbb6,'changed':_0x2acd48!==_0x1165f9};}function withMaterializedSkillFrontmatter(_0xbe62c6,_0xf41bf2,_0x3bb3c1){const _0x11dc4f=a102_0x4259,_0x4a0a27=skillDisplayName(_0xf41bf2,_0x3bb3c1),_0x429f25=_0xf41bf2[_0x11dc4f(0x137)]?.['trim']()||_0x4a0a27||_0x3bb3c1;return normalizeLocalFiles(_0xbe62c6)[_0x11dc4f(0x11d)](_0x2c29f2=>{const _0x3a6e89=_0x11dc4f,_0x4bce68=fileText(_0x2c29f2);if(_0x2c29f2['path']!==SKILL_FILE)return _0x2c29f2;if(hasYamlFrontmatter(_0x4bce68))return{'path':_0x2c29f2[_0x3a6e89(0x12c)],'content':withSyncedDisplayName(_0x4bce68,_0x4a0a27)};return{'path':_0x2c29f2[_0x3a6e89(0x12c)],'content':prependSkillFrontmatter(_0x4bce68,{'name':_0x3bb3c1,'displayName':_0x4a0a27,'description':_0x429f25})};});}function hasYamlFrontmatter(_0x578662){const _0x1343c6=a102_0x4259;return/^\uFEFF?---\s*\r?\n/[_0x1343c6(0x111)](_0x578662);}function prependSkillFrontmatter(_0x225739,_0x175bb1){const _0x1bac8f=a102_0x4259,_0x475276=_0x225739['replace'](/^\uFEFF/,'');return[_0x1bac8f(0x12a),_0x1bac8f(0x13e)+yamlString(_0x175bb1[_0x1bac8f(0x13c)]),_0x175bb1['displayName']?_0x1bac8f(0x139)+yamlString(_0x175bb1[_0x1bac8f(0x126)]):undefined,'description:\x20'+yamlString(_0x175bb1[_0x1bac8f(0x137)]),_0x1bac8f(0x12a),'',_0x475276][_0x1bac8f(0x118)](_0x823f11=>_0x823f11!==undefined)[_0x1bac8f(0x13a)]('\x0a');}function yamlString(_0xd8ffee){const _0x10efb2=a102_0x4259;return JSON['stringify'](_0xd8ffee['replace'](/\r/g,'')[_0x10efb2(0x133)]());}function skillDisplayName(_0x48521b,_0x58477e){const _0x2b9606=a102_0x4259,_0x1901c6=_0x48521b[_0x2b9606(0x134)]?.[_0x2b9606(0x133)]();return _0x1901c6||_0x58477e;}function withSyncedDisplayName(_0x5f5762,_0x44aa9d){const _0x36117d=a102_0x4259,_0x1f3614=_0x5f5762[_0x36117d(0x12d)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1f3614)return _0x5f5762;const _0x564f1b=_0x1f3614[0x1]??'',_0x205c0b=_0x1f3614[0x2]??'',_0x66555c=parseDocument(_0x205c0b);if(_0x66555c[_0x36117d(0x11b)]['length']>0x0||!isMap(_0x66555c[_0x36117d(0x142)]))return _0x5f5762;if(_0x44aa9d)_0x66555c[_0x36117d(0x112)](_0x36117d(0x126),_0x44aa9d);else{if(_0x66555c[_0x36117d(0x11c)]('displayName'))_0x66555c[_0x36117d(0x135)](_0x36117d(0x126));else return _0x5f5762;}forceBlockCollections(_0x66555c[_0x36117d(0x142)]);const _0x286a64=_0x66555c[_0x36117d(0x10e)]({'lineWidth':0x0})[_0x36117d(0x11f)](),_0x143b1b=_0x5f5762[_0x36117d(0x138)](_0x1f3614[0x0]['length'])[_0x36117d(0x113)](/^\r?\n/,'');return _0x564f1b+_0x36117d(0x125)+_0x286a64+_0x36117d(0x114)+_0x143b1b;}function forceBlockCollections(_0x212d47){if(!isNode(_0x212d47))return;visit(_0x212d47,(_0x4b5dbf,_0x4b9778)=>{const _0x264fb8=a102_0x4259;isCollection(_0x4b9778)&&(_0x4b9778[_0x264fb8(0x140)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x39636f,_0x177b8c,_0x272111,_0x59e989){const _0xb31b4=a102_0x4259;if(_0x59e989||!existsSync(_0x177b8c))return;const _0x58868f=readMetadataIfPresent(_0x177b8c);if(!_0x58868f)return;const _0x31b056=_0x58868f[_0xb31b4(0x13b)]&&Object[_0xb31b4(0x10f)](_0x58868f[_0xb31b4(0x13b)])['length']>0x0?_0x58868f['fileHashes']:undefined;if(_0x31b056)for(const [_0x281677,_0x307c8e]of Object['entries'](_0x31b056)){const _0xc5e20f=resolveManagedFilePath(_0x39636f,_0x281677);if(!existsSync(_0xc5e20f))throw CliErrors['validation'](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x136)+_0x281677);const _0x3f6788=lstatSync(_0xc5e20f);if(!_0x3f6788[_0xb31b4(0x115)]())throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x130)+_0x281677);const _0x12d873=bufferSha256(readFileSync(_0xc5e20f));if(_0x12d873!==_0x307c8e)throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f+_0xb31b4(0x128)+_0x281677,_0xb31b4(0x117)+_0x281677);}else{const _0x5c9bb4=resolve(_0x39636f,SKILL_FILE);if(existsSync(_0x5c9bb4)&&_0x58868f['contentHash']){const _0x87e09e=contentHash(readFileSync(_0x5c9bb4,_0xb31b4(0x123)));if(_0x87e09e!==_0x58868f[_0xb31b4(0x127)])throw CliErrors[_0xb31b4(0x145)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5c9bb4,_0xb31b4(0x12b));}}for(const _0x42cb4e of normalizeLocalFiles(_0x272111)){if(_0x31b056?.[_0x42cb4e[_0xb31b4(0x12c)]])continue;if(!_0x31b056&&_0x42cb4e['path']===SKILL_FILE)continue;const _0x220f89=resolveManagedFilePath(_0x39636f,_0x42cb4e['path']);if(!existsSync(_0x220f89))continue;const _0x2b223b=lstatSync(_0x220f89);if(!_0x2b223b[_0xb31b4(0x115)]())throw CliErrors['validation'](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x129)+_0x42cb4e[_0xb31b4(0x12c)]);const _0x52a8f8=bufferSha256(readFileSync(_0x220f89));if(_0x52a8f8!==fileHash(_0x42cb4e))throw CliErrors[_0xb31b4(0x145)](_0xb31b4(0x121)+_0x39636f,_0xb31b4(0x10d)+_0x42cb4e[_0xb31b4(0x12c)]);}}function materializeFiles(_0x281c25,_0x3cb135){const _0x30f427=a102_0x4259;for(const _0x519f51 of normalizeLocalFiles(_0x3cb135)){const _0x3b5df3=resolveManagedFilePath(_0x281c25,_0x519f51[_0x30f427(0x12c)]);mkdirSync(dirname(_0x3b5df3),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3b5df3,fileContent(_0x519f51),0x180);}}function a102_0x278e(){const _0x1df5c7=['24984VrIjCm','trimEnd','445UhTsOz','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','find','utf8','6756ANElEk','---\x0a','displayName','contentHash','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','path','match','pulledAt','4134813HsxcJE','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','env','11TRkfiw','trim','skillName','delete','Managed\x20file\x20was\x20removed\x20locally:\x20','description','slice','displayName:\x20','join','fileHashes','name','13795830WzJhjH','name:\x20','973668UTQJvA','flow','Runtime\x20Skill\x20package\x20is\x20missing\x20','contents','27743890ELISgO','6tyvyUl','validation','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','toString','keys','287IfeZLZ','test','set','replace','\x0a---\x0a\x0a','isFile','force','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','filter','3495665ULPrJY','paths','errors','has','map'];a102_0x278e=function(){return _0x1df5c7;};return a102_0x278e();}function removeStaleManagedFiles(_0x265a63,_0xc50eb3,_0x16d1b0){const _0xf5ce2=a102_0x4259;if(!_0xc50eb3)return;const _0x30337b=new Set(normalizeLocalFiles(_0x16d1b0)[_0xf5ce2(0x11d)](_0x5ad167=>_0x5ad167[_0xf5ce2(0x12c)]));for(const _0x2cfc72 of Object[_0xf5ce2(0x10f)](_0xc50eb3)){if(_0x30337b[_0xf5ce2(0x11c)](_0x2cfc72))continue;const _0x24e6e7=resolveManagedFilePath(_0x265a63,_0x2cfc72);existsSync(_0x24e6e7)&&lstatSync(_0x24e6e7)['isFile']()&&rmSync(_0x24e6e7,{'force':!![]});}}
1
+ (function(_0x3ac73c,_0x2cdf02){const _0x3b7b5e=a103_0x2f7f,_0x19d792=_0x3ac73c();while(!![]){try{const _0x13f5d8=parseInt(_0x3b7b5e(0x1db))/0x1+-parseInt(_0x3b7b5e(0x1df))/0x2*(-parseInt(_0x3b7b5e(0x1bc))/0x3)+parseInt(_0x3b7b5e(0x1e0))/0x4+-parseInt(_0x3b7b5e(0x1ae))/0x5+-parseInt(_0x3b7b5e(0x1c2))/0x6*(parseInt(_0x3b7b5e(0x1cb))/0x7)+-parseInt(_0x3b7b5e(0x1d3))/0x8*(parseInt(_0x3b7b5e(0x1d1))/0x9)+parseInt(_0x3b7b5e(0x1a6))/0xa*(-parseInt(_0x3b7b5e(0x1aa))/0xb);if(_0x13f5d8===_0x2cdf02)break;else _0x19d792['push'](_0x19d792['shift']());}catch(_0x103f65){_0x19d792['push'](_0x19d792['shift']());}}}(a103_0x47ad,0xa3c0f));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5f09b4,_0x5b0c7b,_0x2cf32e){const _0x366e39=a103_0x2f7f,_0x54e129=requireSkillCode(_0x5f09b4),_0x158b9e=requirePackageBytes(_0x54e129,_0x2cf32e[_0x366e39(0x1b9)]),_0xd896a=extractDownloadedPackage(_0x158b9e),_0x58b28c=_0xd896a[_0x366e39(0x1c5)](_0x566168=>_0x566168['path']===SKILL_FILE);if(!_0x58b28c)throw CliErrors[_0x366e39(0x1ca)](_0x366e39(0x1d2)+SKILL_FILE+':\x20'+_0x54e129);const _0x38b346=withMaterializedSkillFrontmatter(_0xd896a,_0x5f09b4,_0x54e129),_0x133a01=_0x38b346['find'](_0x1e98b7=>_0x1e98b7['path']===SKILL_FILE),_0x3672cb=fileText(_0x133a01),_0x1aac86=getRuntimeSkillDir(_0x2cf32e[_0x366e39(0x1a7)],_0x2cf32e[_0x366e39(0x1bb)],_0x2cf32e[_0x366e39(0x1c4)],_0x5b0c7b,_0x54e129,_0x2cf32e[_0x366e39(0x1c0)]),_0x2ef52a=resolve(_0x1aac86,SKILL_FILE),_0x3eeb7c=resolve(_0x1aac86,METADATA_FILE),_0x4d4504=contentHash(_0x3672cb),_0x2952aa=readMetadataIfPresent(_0x3eeb7c)?.[_0x366e39(0x1d0)];ensurePulledFilesCanBeOverwritten(_0x1aac86,_0x3eeb7c,_0x38b346,_0x2cf32e[_0x366e39(0x1c9)]===!![]),mkdirSync(_0x1aac86,{'recursive':!![],'mode':0x1c0});const _0x414047=existsSync(_0x2ef52a)?readFileSync(_0x2ef52a,_0x366e39(0x1a8)):undefined;return materializeFiles(_0x1aac86,_0x38b346),removeStaleManagedFiles(_0x1aac86,_0x2952aa,_0x38b346),writeJsonAtomic(_0x3eeb7c,buildMetadata(_0x5f09b4,_0x5b0c7b,_0x2cf32e[_0x366e39(0x1c4)],_0x4d4504,_0x2cf32e[_0x366e39(0x1dd)],_0x38b346,_0x158b9e)),{'skill':_0x5f09b4,'scope':_0x5b0c7b,'dir':_0x1aac86,'skillMdPath':_0x2ef52a,'metadataPath':_0x3eeb7c,'contentHash':_0x4d4504,'changed':_0x414047!==_0x3672cb};}function a103_0x2f7f(_0xc1cc4b,_0x12f1a6){_0xc1cc4b=_0xc1cc4b-0x1a5;const _0x47ad7f=a103_0x47ad();let _0x2f7f2c=_0x47ad7f[_0xc1cc4b];return _0x2f7f2c;}function a103_0x47ad(){const _0x41139e=['412297uEOeFo','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','pulledAt','test','2NgAxIJ','4633768EiCvSV','has','entries','filter','toString','10CheXTP','env','utf8','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','10242122KQlqxK','match','skillName','replace','591785vzElgJ','trim','description:\x20','trimEnd','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','contents','keys','displayName','name:\x20','length','packageBytes','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','accessKey','3398634PCcmwM','contentHash','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','paths','name','36pjTOYk','isFile','appCode','find','join','description','---','force','validation','1007363OcXVTs','path','slice','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','errors','fileHashes','1079721lBtQsj','Runtime\x20Skill\x20package\x20is\x20missing\x20','8Ltlhub','Managed\x20file\x20was\x20removed\x20locally:\x20','map','displayName:\x20','set','delete','flow','\x0a---\x0a\x0a'];a103_0x47ad=function(){return _0x41139e;};return a103_0x47ad();}function withMaterializedSkillFrontmatter(_0x43e540,_0x142e5c,_0x2534be){const _0x555f41=a103_0x2f7f,_0x4448cd=skillDisplayName(_0x142e5c,_0x2534be),_0x209ca2=_0x142e5c[_0x555f41(0x1c7)]?.[_0x555f41(0x1af)]()||_0x4448cd||_0x2534be;return normalizeLocalFiles(_0x43e540)[_0x555f41(0x1d5)](_0x22ba6f=>{const _0x541e79=_0x555f41,_0x5da8eb=fileText(_0x22ba6f);if(_0x22ba6f[_0x541e79(0x1cc)]!==SKILL_FILE)return _0x22ba6f;if(hasYamlFrontmatter(_0x5da8eb))return{'path':_0x22ba6f[_0x541e79(0x1cc)],'content':withSyncedDisplayName(_0x5da8eb,_0x4448cd)};return{'path':_0x22ba6f[_0x541e79(0x1cc)],'content':prependSkillFrontmatter(_0x5da8eb,{'name':_0x2534be,'displayName':_0x4448cd,'description':_0x209ca2})};});}function hasYamlFrontmatter(_0x137c92){const _0x19b51f=a103_0x2f7f;return/^\uFEFF?---\s*\r?\n/[_0x19b51f(0x1de)](_0x137c92);}function prependSkillFrontmatter(_0x3d61ff,_0x27cd0f){const _0x423776=a103_0x2f7f,_0x3b5ced=_0x3d61ff[_0x423776(0x1ad)](/^\uFEFF/,'');return[_0x423776(0x1c8),_0x423776(0x1b7)+yamlString(_0x27cd0f[_0x423776(0x1c1)]),_0x27cd0f[_0x423776(0x1b6)]?_0x423776(0x1d6)+yamlString(_0x27cd0f[_0x423776(0x1b6)]):undefined,_0x423776(0x1b0)+yamlString(_0x27cd0f[_0x423776(0x1c7)]),'---','',_0x3b5ced][_0x423776(0x1e3)](_0x289a84=>_0x289a84!==undefined)[_0x423776(0x1c6)]('\x0a');}function yamlString(_0x2fc160){const _0x1ae98d=a103_0x2f7f;return JSON['stringify'](_0x2fc160[_0x1ae98d(0x1ad)](/\r/g,'')[_0x1ae98d(0x1af)]());}function skillDisplayName(_0x424a36,_0x1f9277){const _0x1c2736=a103_0x2f7f,_0x27452c=_0x424a36[_0x1c2736(0x1ac)]?.[_0x1c2736(0x1af)]();return _0x27452c||_0x1f9277;}function withSyncedDisplayName(_0x5eb579,_0x2296d1){const _0x3422ba=a103_0x2f7f,_0x243881=_0x5eb579[_0x3422ba(0x1ab)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x243881)return _0x5eb579;const _0x1b9411=_0x243881[0x1]??'',_0x502c97=_0x243881[0x2]??'',_0x46f681=parseDocument(_0x502c97);if(_0x46f681[_0x3422ba(0x1cf)][_0x3422ba(0x1b8)]>0x0||!isMap(_0x46f681[_0x3422ba(0x1b4)]))return _0x5eb579;if(_0x2296d1)_0x46f681[_0x3422ba(0x1d7)]('displayName',_0x2296d1);else{if(_0x46f681[_0x3422ba(0x1e1)](_0x3422ba(0x1b6)))_0x46f681[_0x3422ba(0x1d8)](_0x3422ba(0x1b6));else return _0x5eb579;}forceBlockCollections(_0x46f681[_0x3422ba(0x1b4)]);const _0x1b67e2=_0x46f681[_0x3422ba(0x1a5)]({'lineWidth':0x0})[_0x3422ba(0x1b1)](),_0x9227=_0x5eb579[_0x3422ba(0x1cd)](_0x243881[0x0][_0x3422ba(0x1b8)])[_0x3422ba(0x1ad)](/^\r?\n/,'');return _0x1b9411+_0x3422ba(0x1bf)+_0x1b67e2+_0x3422ba(0x1da)+_0x9227;}function forceBlockCollections(_0x3cdf5c){if(!isNode(_0x3cdf5c))return;visit(_0x3cdf5c,(_0x54d4dd,_0x30bfcb)=>{const _0x2b4e06=a103_0x2f7f;isCollection(_0x30bfcb)&&(_0x30bfcb[_0x2b4e06(0x1d9)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1f06f3,_0x418d88,_0x48e836,_0x44fd6b){const _0x71c0ea=a103_0x2f7f;if(_0x44fd6b||!existsSync(_0x418d88))return;const _0x19abaa=readMetadataIfPresent(_0x418d88);if(!_0x19abaa)return;const _0x1945e7=_0x19abaa[_0x71c0ea(0x1d0)]&&Object[_0x71c0ea(0x1b5)](_0x19abaa[_0x71c0ea(0x1d0)])[_0x71c0ea(0x1b8)]>0x0?_0x19abaa[_0x71c0ea(0x1d0)]:undefined;if(_0x1945e7)for(const [_0x6642f3,_0x17ef03]of Object[_0x71c0ea(0x1e2)](_0x1945e7)){const _0x5cd57b=resolveManagedFilePath(_0x1f06f3,_0x6642f3);if(!existsSync(_0x5cd57b))throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1d4)+_0x6642f3);const _0x2a1d62=lstatSync(_0x5cd57b);if(!_0x2a1d62['isFile']())throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1dc)+_0x6642f3);const _0x4a36d5=bufferSha256(readFileSync(_0x5cd57b));if(_0x4a36d5!==_0x17ef03)throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3+_0x71c0ea(0x1b2)+_0x6642f3,_0x71c0ea(0x1b3)+_0x6642f3);}else{const _0x4e2ff9=resolve(_0x1f06f3,SKILL_FILE);if(existsSync(_0x4e2ff9)&&_0x19abaa['contentHash']){const _0xac3fd1=contentHash(readFileSync(_0x4e2ff9,_0x71c0ea(0x1a8)));if(_0xac3fd1!==_0x19abaa[_0x71c0ea(0x1bd)])throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1ce)+_0x4e2ff9,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x1ae74b of normalizeLocalFiles(_0x48e836)){if(_0x1945e7?.[_0x1ae74b[_0x71c0ea(0x1cc)]])continue;if(!_0x1945e7&&_0x1ae74b[_0x71c0ea(0x1cc)]===SKILL_FILE)continue;const _0x4483f4=resolveManagedFilePath(_0x1f06f3,_0x1ae74b['path']);if(!existsSync(_0x4483f4))continue;const _0x273def=lstatSync(_0x4483f4);if(!_0x273def['isFile']())throw CliErrors['validation'](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1a9)+_0x1ae74b['path']);const _0x8b4613=bufferSha256(readFileSync(_0x4483f4));if(_0x8b4613!==fileHash(_0x1ae74b))throw CliErrors[_0x71c0ea(0x1ca)](_0x71c0ea(0x1be)+_0x1f06f3,_0x71c0ea(0x1ba)+_0x1ae74b['path']);}}function materializeFiles(_0x446e01,_0xdea142){const _0x3b59d3=a103_0x2f7f;for(const _0x26436a of normalizeLocalFiles(_0xdea142)){const _0xd65fbd=resolveManagedFilePath(_0x446e01,_0x26436a[_0x3b59d3(0x1cc)]);mkdirSync(dirname(_0xd65fbd),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0xd65fbd,fileContent(_0x26436a),0x180);}}function removeStaleManagedFiles(_0x4496e2,_0x14ff56,_0x180a19){const _0x17cecb=a103_0x2f7f;if(!_0x14ff56)return;const _0x4d2c0a=new Set(normalizeLocalFiles(_0x180a19)[_0x17cecb(0x1d5)](_0x356822=>_0x356822['path']));for(const _0x4d5acd of Object[_0x17cecb(0x1b5)](_0x14ff56)){if(_0x4d2c0a[_0x17cecb(0x1e1)](_0x4d5acd))continue;const _0x519f93=resolveManagedFilePath(_0x4496e2,_0x4d5acd);existsSync(_0x519f93)&&lstatSync(_0x519f93)[_0x17cecb(0x1c3)]()&&rmSync(_0x519f93,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x216403,_0x3a4602){const _0x1f7bd7=a103_0x1069,_0x3f6c4d=_0x216403();while(!![]){try{const _0x67fc6f=-parseInt(_0x1f7bd7(0x113))/0x1*(parseInt(_0x1f7bd7(0x101))/0x2)+parseInt(_0x1f7bd7(0x112))/0x3+-parseInt(_0x1f7bd7(0x10c))/0x4*(-parseInt(_0x1f7bd7(0x11a))/0x5)+parseInt(_0x1f7bd7(0x110))/0x6*(parseInt(_0x1f7bd7(0x102))/0x7)+-parseInt(_0x1f7bd7(0x11e))/0x8+-parseInt(_0x1f7bd7(0x119))/0x9*(parseInt(_0x1f7bd7(0x11c))/0xa)+parseInt(_0x1f7bd7(0x111))/0xb;if(_0x67fc6f===_0x3a4602)break;else _0x3f6c4d['push'](_0x3f6c4d['shift']());}catch(_0x951fe1){_0x3f6c4d['push'](_0x3f6c4d['shift']());}}}(a103_0x4b77,0xf30d8));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a103_0x4b77(){const _0x57008d=['Runtime\x20Skill\x20is\x20missing\x20skillCode.','personal','8128xOcKWh','4310572kxgVjO','toISOString','trim','ossPath','sourceSessionId','path','files','status','map','zipSha256','4iHLcZh','tenantCode','manifest','skillName','12tSOCjK','3270971vmOCPN','1769646YnCBPe','337bRSKTd','Invalid\x20','description','skillCode','hasUpstreamUpdate','parse','93186dhwymU','8231950YIYYuN','isArray','970eaChpE','length','3166200UovNYL','zipSize','string','readonly','tags','object'];a103_0x4b77=function(){return _0x57008d;};return a103_0x4b77();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x3c6d26,_0x4885a6,_0x4d906a,_0x3fe569,_0x587839,_0x26453e,_0xbb9ae7){const _0x45d1bf=a103_0x1069,_0x433e9f=_0x26453e?normalizeLocalFiles(_0x26453e):[],_0x112f2a=!_0xbb9ae7&&_0x433e9f[_0x45d1bf(0x11d)]>0x0?buildSkillPackage(_0x433e9f):undefined,_0x5c2bb8=_0xbb9ae7?bufferSha256(_0xbb9ae7):_0x112f2a?.[_0x45d1bf(0x10e)][_0x45d1bf(0x10b)],_0x151bb8=_0xbb9ae7?.[_0x45d1bf(0x11d)]??_0x112f2a?.[_0x45d1bf(0x10e)][_0x45d1bf(0x11f)],_0x144713=_0x433e9f[_0x45d1bf(0x11d)]>0x0?Object['fromEntries'](_0x433e9f['map'](_0x29707d=>[_0x29707d[_0x45d1bf(0x107)],fileHash(_0x29707d)])):undefined;return{'schemaVersion':_0x433e9f[_0x45d1bf(0x11d)]>0x0?0x2:0x1,'id':_0x3c6d26['id'],'appCode':_0x4d906a,'skillCode':requireSkillCode(_0x3c6d26),'skillName':_0x3c6d26[_0x45d1bf(0x10f)],'description':_0x3c6d26[_0x45d1bf(0x115)],'scope':_0x4885a6,'readonly':_0x4885a6!==_0x45d1bf(0x100)||_0x3c6d26[_0x45d1bf(0x121)]===!![],'tenantCode':_0x3c6d26[_0x45d1bf(0x10d)],'userId':_0x3c6d26['userId'],'version':_0x3c6d26['version'],'status':_0x3c6d26[_0x45d1bf(0x109)],'tags':Array[_0x45d1bf(0x11b)](_0x3c6d26['tags'])?_0x3c6d26[_0x45d1bf(0xfd)]:[],'hasUpstreamUpdate':_0x3c6d26[_0x45d1bf(0x117)],'forkedFromSkillId':_0x3c6d26['forkedFromSkillId'],'forkedFromVersion':_0x3c6d26['forkedFromVersion'],'sourceSessionId':_0x3c6d26[_0x45d1bf(0x106)],'contentHash':_0x3fe569,'fileHashes':_0x144713,'treeHash':_0x433e9f[_0x45d1bf(0x11d)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x433e9f)):undefined,'ossPath':remoteManifestOssPath(_0x3c6d26[_0x45d1bf(0x108)]),'zipSha256':_0x5c2bb8,'zipSize':_0x151bb8,'files':_0x433e9f[_0x45d1bf(0x11d)]>0x0?_0x433e9f[_0x45d1bf(0x10a)](_0x8275e=>({'path':_0x8275e['path'],'hash':fileHash(_0x8275e),'size':fileContent(_0x8275e)['length']})):undefined,'pulledAt':_0x587839??new Date()[_0x45d1bf(0x103)]()};}function a103_0x1069(_0x51eecc,_0xccf4f){_0x51eecc=_0x51eecc-0xfd;const _0x4b771c=a103_0x4b77();let _0x106976=_0x4b771c[_0x51eecc];return _0x106976;}export function requireSkillCode(_0x51d6cc){const _0x184c80=a103_0x1069,_0x1cca42=_0x51d6cc[_0x184c80(0x116)]?.[_0x184c80(0x104)]();if(!_0x1cca42)throw CliErrors['validation'](_0x184c80(0xff));return _0x1cca42;}export function readMetadataIfPresent(_0x47d0c7){const _0x3972d2=a103_0x1069;if(!existsSync(_0x47d0c7))return undefined;try{const _0x5c3b07=JSON[_0x3972d2(0x118)](readFileSync(_0x47d0c7,'utf8'));return _0x5c3b07;}catch{throw CliErrors['validation'](_0x3972d2(0x114)+METADATA_FILE+':\x20'+_0x47d0c7);}}function remoteManifestOssPath(_0xfc8d6e){const _0x318a7e=a103_0x1069;if(!_0xfc8d6e||typeof _0xfc8d6e!==_0x318a7e(0xfe)||Array['isArray'](_0xfc8d6e))return undefined;const _0x466b39=_0xfc8d6e[_0x318a7e(0x105)];return typeof _0x466b39===_0x318a7e(0x120)&&_0x466b39['trim']()?_0x466b39['trim']():undefined;}
1
+ (function(_0x57ad66,_0x1d5337){const _0x2f58e8=a104_0x4b51,_0x3d27e1=_0x57ad66();while(!![]){try{const _0x2943fd=-parseInt(_0x2f58e8(0xda))/0x1*(-parseInt(_0x2f58e8(0xc8))/0x2)+parseInt(_0x2f58e8(0xc1))/0x3*(-parseInt(_0x2f58e8(0xc3))/0x4)+parseInt(_0x2f58e8(0xc6))/0x5+-parseInt(_0x2f58e8(0xc2))/0x6*(parseInt(_0x2f58e8(0xd0))/0x7)+-parseInt(_0x2f58e8(0xe2))/0x8*(-parseInt(_0x2f58e8(0xe5))/0x9)+parseInt(_0x2f58e8(0xbd))/0xa+-parseInt(_0x2f58e8(0xdf))/0xb*(parseInt(_0x2f58e8(0xd5))/0xc);if(_0x2943fd===_0x1d5337)break;else _0x3d27e1['push'](_0x3d27e1['shift']());}catch(_0x4dcf22){_0x3d27e1['push'](_0x3d27e1['shift']());}}}(a104_0x17cf,0x98d1d));import{existsSync,readFileSync}from'node:fs';function a104_0x17cf(){const _0x356765=['object','Invalid\x20','9toGdCE','status','zipSha256','4488050XYpcvt','forkedFromVersion','fromEntries','forkedFromSkillId','2482953yjqdYV','12NTuLVF','4IgZrEK','skillCode','userId','420395bhmJBX','validation','3436LUkGxC','readonly','version','map','personal','tenantCode','tags','parse','1952321nAMMpv','sourceSessionId','string','hasUpstreamUpdate','path','33492GrJqIR','trim','manifest','description','ossPath','533ANMKnM','skillName','toISOString','Runtime\x20Skill\x20is\x20missing\x20skillCode.','utf8','1199nJBgcE','length','isArray','6936376LzAozM'];a104_0x17cf=function(){return _0x356765;};return a104_0x17cf();}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(_0x11a3e1,_0x50504d,_0x3c6e70,_0x4b3682,_0x6a9a9a,_0x27dc9d,_0x5b9905){const _0x42d879=a104_0x4b51,_0x35afeb=_0x27dc9d?normalizeLocalFiles(_0x27dc9d):[],_0x11bfd9=!_0x5b9905&&_0x35afeb['length']>0x0?buildSkillPackage(_0x35afeb):undefined,_0x5864c8=_0x5b9905?bufferSha256(_0x5b9905):_0x11bfd9?.[_0x42d879(0xd7)][_0x42d879(0xbc)],_0x4a26b7=_0x5b9905?.['length']??_0x11bfd9?.[_0x42d879(0xd7)]['zipSize'],_0x4dda6f=_0x35afeb[_0x42d879(0xe0)]>0x0?Object[_0x42d879(0xbf)](_0x35afeb['map'](_0x1f099e=>[_0x1f099e[_0x42d879(0xd4)],fileHash(_0x1f099e)])):undefined;return{'schemaVersion':_0x35afeb[_0x42d879(0xe0)]>0x0?0x2:0x1,'id':_0x11a3e1['id'],'appCode':_0x3c6e70,'skillCode':requireSkillCode(_0x11a3e1),'skillName':_0x11a3e1[_0x42d879(0xdb)],'description':_0x11a3e1[_0x42d879(0xd8)],'scope':_0x50504d,'readonly':_0x50504d!==_0x42d879(0xcc)||_0x11a3e1[_0x42d879(0xc9)]===!![],'tenantCode':_0x11a3e1[_0x42d879(0xcd)],'userId':_0x11a3e1[_0x42d879(0xc5)],'version':_0x11a3e1[_0x42d879(0xca)],'status':_0x11a3e1[_0x42d879(0xe6)],'tags':Array[_0x42d879(0xe1)](_0x11a3e1[_0x42d879(0xce)])?_0x11a3e1[_0x42d879(0xce)]:[],'hasUpstreamUpdate':_0x11a3e1[_0x42d879(0xd3)],'forkedFromSkillId':_0x11a3e1[_0x42d879(0xc0)],'forkedFromVersion':_0x11a3e1[_0x42d879(0xbe)],'sourceSessionId':_0x11a3e1[_0x42d879(0xd1)],'contentHash':_0x4b3682,'fileHashes':_0x4dda6f,'treeHash':_0x35afeb[_0x42d879(0xe0)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x35afeb)):undefined,'ossPath':remoteManifestOssPath(_0x11a3e1['files']),'zipSha256':_0x5864c8,'zipSize':_0x4a26b7,'files':_0x35afeb[_0x42d879(0xe0)]>0x0?_0x35afeb[_0x42d879(0xcb)](_0x5cbede=>({'path':_0x5cbede[_0x42d879(0xd4)],'hash':fileHash(_0x5cbede),'size':fileContent(_0x5cbede)['length']})):undefined,'pulledAt':_0x6a9a9a??new Date()[_0x42d879(0xdc)]()};}function a104_0x4b51(_0x1aa4ec,_0xf4e8c9){_0x1aa4ec=_0x1aa4ec-0xbc;const _0x17cfea=a104_0x17cf();let _0x4b5131=_0x17cfea[_0x1aa4ec];return _0x4b5131;}export function requireSkillCode(_0x237c4b){const _0x19ac03=a104_0x4b51,_0x2bb98a=_0x237c4b[_0x19ac03(0xc4)]?.[_0x19ac03(0xd6)]();if(!_0x2bb98a)throw CliErrors[_0x19ac03(0xc7)](_0x19ac03(0xdd));return _0x2bb98a;}export function readMetadataIfPresent(_0x604e91){const _0x4eb975=a104_0x4b51;if(!existsSync(_0x604e91))return undefined;try{const _0x1a8e03=JSON[_0x4eb975(0xcf)](readFileSync(_0x604e91,_0x4eb975(0xde)));return _0x1a8e03;}catch{throw CliErrors[_0x4eb975(0xc7)](_0x4eb975(0xe4)+METADATA_FILE+':\x20'+_0x604e91);}}function remoteManifestOssPath(_0x48755a){const _0x4f0658=a104_0x4b51;if(!_0x48755a||typeof _0x48755a!==_0x4f0658(0xe3)||Array[_0x4f0658(0xe1)](_0x48755a))return undefined;const _0x11ac7b=_0x48755a[_0x4f0658(0xd9)];return typeof _0x11ac7b===_0x4f0658(0xd2)&&_0x11ac7b[_0x4f0658(0xd6)]()?_0x11ac7b[_0x4f0658(0xd6)]():undefined;}
@@ -1 +1 @@
1
- const a104_0x15bc85=a104_0x6557;(function(_0x157d79,_0xc39159){const _0x42d9d0=a104_0x6557,_0x5dd6e8=_0x157d79();while(!![]){try{const _0x382ef1=-parseInt(_0x42d9d0(0xd0))/0x1+parseInt(_0x42d9d0(0xd2))/0x2*(-parseInt(_0x42d9d0(0xca))/0x3)+-parseInt(_0x42d9d0(0xd1))/0x4*(-parseInt(_0x42d9d0(0xb9))/0x5)+-parseInt(_0x42d9d0(0xc0))/0x6*(-parseInt(_0x42d9d0(0xd3))/0x7)+-parseInt(_0x42d9d0(0xcb))/0x8*(-parseInt(_0x42d9d0(0xbc))/0x9)+parseInt(_0x42d9d0(0xc3))/0xa+-parseInt(_0x42d9d0(0xba))/0xb*(parseInt(_0x42d9d0(0xc5))/0xc);if(_0x382ef1===_0xc39159)break;else _0x5dd6e8['push'](_0x5dd6e8['shift']());}catch(_0x68828f){_0x5dd6e8['push'](_0x5dd6e8['shift']());}}}(a104_0x2bdd,0x9ca96));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3ded42={}){const _0x2b8dad=a104_0x6557,_0x22eac7=_0x3ded42[_0x2b8dad(0xbd)]??homedir(),_0x25b113=resolve(_0x22eac7,PRODUCT_CONFIG[_0x2b8dad(0xce)],_0x2b8dad(0xbe)),_0x379f25=trimmedEnv('SKILL_ROOT'),_0x1b93ff=trimmedEnv(_0x2b8dad(0xcc)),_0x5768c7=resolve(_0x22eac7,'.workbuddy'),_0x21ecec=_0x3ded42[_0x2b8dad(0xb8)]??(existsSync(_0x5768c7)?resolve(_0x5768c7,_0x2b8dad(0xbf)):undefined);return{'homeDir':_0x22eac7,'cacheRoot':_0x25b113,'managedRoot':resolve(_0x22eac7,PRODUCT_CONFIG[_0x2b8dad(0xce)]),'agentsSkillsDir':_0x3ded42['agentsSkillsDir']??_0x379f25??resolve(_0x22eac7,'.agents',_0x2b8dad(0xbf)),'claudeSkillsDir':_0x3ded42[_0x2b8dad(0xc8)]??_0x1b93ff??resolve(_0x22eac7,'.claude',_0x2b8dad(0xbf)),'workbuddySkillsDir':_0x21ecec};}export function runtimeAgentSkillRoots(_0x1bca20){const _0x2c81d4=a104_0x6557;return[_0x1bca20[_0x2c81d4(0xc9)],_0x1bca20[_0x2c81d4(0xc8)],_0x1bca20['workbuddySkillsDir']][_0x2c81d4(0xc4)](_0x547efe=>Boolean(_0x547efe));}function a104_0x2bdd(){const _0x48c06f=['homeDir','cache','skills','356334lJVGPZ','trim','Unsafe\x20','11278370asjkRx','filter','12auOeol','path\x20segment','includes','claudeSkillsDir','agentsSkillsDir','3AZOREL','152YPxWNt','CLAUDE_SKILL_ROOT','skillCode','homeDirName','cacheRoot','471281jKppfY','191136LGPhOw','1029122WheVzN','21TeorgY','workbuddySkillsDir','20jeLSww','6810991lvOlkb','appCode','355059mmohRT'];a104_0x2bdd=function(){return _0x48c06f;};return a104_0x2bdd();}export function getRuntimeSkillCacheRoot(_0x3e17f6,_0x474347,_0x44e112={}){const _0x693d3e=a104_0x6557,_0x3ec696=resolveSkillSyncPaths(_0x44e112);return resolve(_0x3ec696[_0x693d3e(0xcf)],_0x3e17f6,fingerprintAccessKey(_0x474347),_0x693d3e(0xbf));}export function getRuntimeSkillDir(_0x53fc59,_0x418eb2,_0x2b1ed6,_0x4136b4,_0x261d96,_0x400e5b={}){const _0x3b03b2=a104_0x6557;return resolve(getRuntimeSkillCacheRoot(_0x53fc59,_0x418eb2,_0x400e5b),safePathSegment(_0x2b1ed6,_0x3b03b2(0xbb)),_0x4136b4,safePathSegment(_0x261d96,_0x3b03b2(0xcd)));}export function safePathSegment(_0x62b327,_0x431c67=a104_0x15bc85(0xc6)){const _0x296c71=a104_0x15bc85;if(!_0x62b327||_0x62b327[_0x296c71(0xc7)]('/')||_0x62b327['includes']('\x5c')||_0x62b327[_0x296c71(0xc7)]('..'))throw CliErrors['validation'](_0x296c71(0xc2)+_0x431c67+'\x20for\x20local\x20path:\x20'+_0x62b327);return _0x62b327;}function a104_0x6557(_0x339a95,_0x16d044){_0x339a95=_0x339a95-0xb8;const _0x2bddaa=a104_0x2bdd();let _0x65576f=_0x2bddaa[_0x339a95];return _0x65576f;}function trimmedEnv(_0x48b75f){const _0x4ac464=a104_0x15bc85,_0x9619da=productEnv(_0x48b75f)?.[_0x4ac464(0xc1)]();return _0x9619da?_0x9619da:undefined;}
1
+ const a105_0x29a435=a105_0x56c1;(function(_0x5c16ab,_0x5b322c){const _0x331432=a105_0x56c1,_0xa4e978=_0x5c16ab();while(!![]){try{const _0x56fc0d=-parseInt(_0x331432(0xbe))/0x1+-parseInt(_0x331432(0xb4))/0x2+parseInt(_0x331432(0xa1))/0x3*(parseInt(_0x331432(0xb7))/0x4)+-parseInt(_0x331432(0xa5))/0x5*(-parseInt(_0x331432(0xa4))/0x6)+-parseInt(_0x331432(0xb6))/0x7+-parseInt(_0x331432(0xbf))/0x8*(parseInt(_0x331432(0xbb))/0x9)+-parseInt(_0x331432(0xaf))/0xa*(-parseInt(_0x331432(0xb2))/0xb);if(_0x56fc0d===_0x5b322c)break;else _0xa4e978['push'](_0xa4e978['shift']());}catch(_0x445013){_0xa4e978['push'](_0xa4e978['shift']());}}}(a105_0x3f89,0xbe934));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x2c5f45={}){const _0x15fde6=a105_0x56c1,_0x24b832=_0x2c5f45[_0x15fde6(0xa6)]??homedir(),_0x48db51=resolve(_0x24b832,PRODUCT_CONFIG[_0x15fde6(0xa9)],_0x15fde6(0xaa)),_0x1a7915=trimmedEnv('SKILL_ROOT'),_0x4aaabc=trimmedEnv(_0x15fde6(0xb5)),_0x31ed68=resolve(_0x24b832,_0x15fde6(0xb0)),_0x48f77f=_0x2c5f45[_0x15fde6(0xba)]??(existsSync(_0x31ed68)?resolve(_0x31ed68,'skills'):undefined);return{'homeDir':_0x24b832,'cacheRoot':_0x48db51,'managedRoot':resolve(_0x24b832,PRODUCT_CONFIG[_0x15fde6(0xa9)]),'agentsSkillsDir':_0x2c5f45[_0x15fde6(0xb8)]??_0x1a7915??resolve(_0x24b832,_0x15fde6(0xac),'skills'),'claudeSkillsDir':_0x2c5f45[_0x15fde6(0xb1)]??_0x4aaabc??resolve(_0x24b832,_0x15fde6(0xae),_0x15fde6(0xa2)),'workbuddySkillsDir':_0x48f77f};}export function runtimeAgentSkillRoots(_0x44f657){const _0x589021=a105_0x56c1;return[_0x44f657['agentsSkillsDir'],_0x44f657['claudeSkillsDir'],_0x44f657[_0x589021(0xba)]][_0x589021(0xad)](_0x388a63=>Boolean(_0x388a63));}export function getRuntimeSkillCacheRoot(_0x3ef9ec,_0x188862,_0x45b4e7={}){const _0x126af6=a105_0x56c1,_0x25e348=resolveSkillSyncPaths(_0x45b4e7);return resolve(_0x25e348[_0x126af6(0xa3)],_0x3ef9ec,fingerprintAccessKey(_0x188862),_0x126af6(0xa2));}function a105_0x56c1(_0x445c53,_0x3627d4){_0x445c53=_0x445c53-0xa1;const _0x3f893a=a105_0x3f89();let _0x56c19b=_0x3f893a[_0x445c53];return _0x56c19b;}export function getRuntimeSkillDir(_0x17c192,_0x1d0e80,_0x555d74,_0x4ab31f,_0x8cc15f,_0x26f562={}){const _0x4f673f=a105_0x56c1;return resolve(getRuntimeSkillCacheRoot(_0x17c192,_0x1d0e80,_0x26f562),safePathSegment(_0x555d74,_0x4f673f(0xbd)),_0x4ab31f,safePathSegment(_0x8cc15f,_0x4f673f(0xa8)));}export function safePathSegment(_0x12033e,_0x214287=a105_0x29a435(0xb9)){const _0x36cdb7=a105_0x29a435;if(!_0x12033e||_0x12033e[_0x36cdb7(0xa7)]('/')||_0x12033e['includes']('\x5c')||_0x12033e[_0x36cdb7(0xa7)]('..'))throw CliErrors[_0x36cdb7(0xab)](_0x36cdb7(0xbc)+_0x214287+_0x36cdb7(0xb3)+_0x12033e);return _0x12033e;}function a105_0x3f89(){const _0x42d9dc=['claudeSkillsDir','22935385UPqMrV','\x20for\x20local\x20path:\x20','1439844fRmNRM','CLAUDE_SKILL_ROOT','8979047lKDovL','340404zXYEcG','agentsSkillsDir','path\x20segment','workbuddySkillsDir','432EubJGr','Unsafe\x20','appCode','537917fHNtRh','23144VUbkdq','27upHBwj','skills','cacheRoot','4134HxILHt','4420jujOtK','homeDir','includes','skillCode','homeDirName','cache','validation','.agents','filter','.claude','10FiTXyc','.workbuddy'];a105_0x3f89=function(){return _0x42d9dc;};return a105_0x3f89();}function trimmedEnv(_0xf0b65f){const _0x4c638f=productEnv(_0xf0b65f)?.['trim']();return _0x4c638f?_0x4c638f:undefined;}