@lovrabet/lovrabet-cli 2.1.0-beta.3 → 2.1.0
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.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5232e9,_0x345b68){const _0x407518=a68_0x13aa,_0x14a910=_0x5232e9();while(!![]){try{const _0x2199cd=parseInt(_0x407518(0xf6))/0x1+-parseInt(_0x407518(0xf3))/0x2*(parseInt(_0x407518(0xfd))/0x3)+parseInt(_0x407518(0xee))/0x4+-parseInt(_0x407518(0xfa))/0x5+parseInt(_0x407518(0xf5))/0x6+-parseInt(_0x407518(0xed))/0x7*(-parseInt(_0x407518(0x103))/0x8)+parseInt(_0x407518(0xff))/0x9;if(_0x2199cd===_0x345b68)break;else _0x14a910['push'](_0x14a910['shift']());}catch(_0x1dd25a){_0x14a910['push'](_0x14a910['shift']());}}}(a68_0x3ca6,0x81e9f));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x1d0f7d,_0x1dfb1b,_0x373b63){const _0x22c1c5=a68_0x13aa,_0x21cc08=buildConfirmationContext(_0x1d0f7d,_0x1dfb1b,_0x373b63),_0x12dbc1=[_0x22c1c5(0xf4)+_0x21cc08[_0x22c1c5(0xef)]];return _0x21cc08[_0x22c1c5(0xfb)]&&_0x12dbc1[_0x22c1c5(0xea)]('\x20\x20\x20'+_0x21cc08['description']),_0x21cc08[_0x22c1c5(0xf2)]&&_0x12dbc1[_0x22c1c5(0xea)](_0x22c1c5(0x100)+_0x21cc08[_0x22c1c5(0xf2)]),_0x12dbc1[_0x22c1c5(0xea)](_0x22c1c5(0xec)),_0x12dbc1;}export function reconstructCommandArgv(_0x307118,_0x418e60){const _0x1999f7=a68_0x13aa,_0x1cecba=[CLI_BIN_NAME,_0x307118['service'],_0x307118[_0x1999f7(0x101)]];for(const [_0x79a0b4,_0x3571c6]of Object[_0x1999f7(0xfe)](_0x418e60)){if(_0x3571c6===!![])_0x1cecba['push']('--'+_0x79a0b4);else _0x3571c6!==![]&&_0x3571c6!==undefined&&_0x3571c6!==''&&_0x1cecba['push']('--'+_0x79a0b4+'\x20'+JSON['stringify'](_0x3571c6));}return _0x1cecba[_0x1999f7(0xea)](_0x1999f7(0x105)),_0x1cecba[_0x1999f7(0xf9)]('\x20');}function buildConfirmationContext(_0x2a8f2b,_0x5840ef,_0x4e7902){const _0x15e25f=a68_0x13aa,_0x39dcaa=extractAffectedRecords(_0x4e7902);return{'commandLabel':_0x5840ef,'description':_0x2a8f2b[_0x15e25f(0xfb)],'affectedRecords':_0x39dcaa};}function a68_0x3ca6(){const _0x108778=['\x20\x20\x20Continue?\x20[y/N]\x20','203nRyMXk','3216376LYxPvX','commandLabel','params=','length','affectedRecords','93994jemRmA','⚠\x20\x20High-risk\x20operation:\x20','326148bCrJwS','505189KxVWsd','code=','name=','join','698035YcSFIi','description','params','57YzuBjF','entries','570357fwaNcP','\x20\x20\x20Affected:\x20','command','id=','37976ECbCcE','code','--yes','push','name'];a68_0x3ca6=function(){return _0x108778;};return a68_0x3ca6();}function a68_0x13aa(_0x487c05,_0x38fab4){_0x487c05=_0x487c05-0xea;const _0x3ca688=a68_0x3ca6();let _0x13aae6=_0x3ca688[_0x487c05];return _0x13aae6;}function extractAffectedRecords(_0x3d177e){const _0x3a3f7a=a68_0x13aa,_0x2ea0f6=[];if(_0x3d177e[_0x3a3f7a(0x104)])_0x2ea0f6[_0x3a3f7a(0xea)](_0x3a3f7a(0xf7)+_0x3d177e[_0x3a3f7a(0x104)]);if(_0x3d177e['id'])_0x2ea0f6[_0x3a3f7a(0xea)](_0x3a3f7a(0x102)+_0x3d177e['id']);if(_0x3d177e[_0x3a3f7a(0xeb)])_0x2ea0f6['push'](_0x3a3f7a(0xf8)+_0x3d177e['name']);if(_0x3d177e[_0x3a3f7a(0xfc)])_0x2ea0f6['push'](_0x3a3f7a(0xf0)+_0x3d177e['params']);return _0x2ea0f6[_0x3a3f7a(0xf1)]>0x0?_0x2ea0f6['join'](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2091fa,_0x3eed0a){const _0x592c1e=a69_0x5734,_0x43c60a=_0x2091fa();while(!![]){try{const _0x4c93db=parseInt(_0x592c1e(0x14a))/0x1+parseInt(_0x592c1e(0x149))/0x2+-parseInt(_0x592c1e(0x155))/0x3*(-parseInt(_0x592c1e(0x14d))/0x4)+parseInt(_0x592c1e(0x151))/0x5*(parseInt(_0x592c1e(0x14e))/0x6)+-parseInt(_0x592c1e(0x153))/0x7*(parseInt(_0x592c1e(0x14b))/0x8)+-parseInt(_0x592c1e(0x14f))/0x9+-parseInt(_0x592c1e(0x150))/0xa;if(_0x4c93db===_0x3eed0a)break;else _0x43c60a['push'](_0x43c60a['shift']());}catch(_0x3c1c54){_0x43c60a['push'](_0x43c60a['shift']());}}}(a69_0x4235,0x5f597));import{LovrabetError}from'@lovrabet/sdk';function a69_0x5734(_0x2f838a,_0x3241a0){_0x2f838a=_0x2f838a-0x147;const _0x42358e=a69_0x4235();let _0x57349b=_0x42358e[_0x2f838a];return _0x57349b;}import{CliErrors}from'../errors.js';function a69_0x4235(){const _0x5b1481=['message','7QQVVMW','validation','30507BUuJYR','trim','string','description','1324818wgHiWs','431056BUfdpE','781096zIeCub','stringify','232REdCWs','3498rWcRGM','1666818eVXnXh','17788540INMccJ','6595pNPKcn'];a69_0x4235=function(){return _0x5b1481;};return a69_0x4235();}export function mapUserFacingExecuteError(_0xdeb8d){const _0x3a6713=a69_0x5734;if(_0xdeb8d instanceof LovrabetError)return CliErrors[_0x3a6713(0x154)](userFacingLovrabetMessage(_0xdeb8d));return _0xdeb8d;}function userFacingLovrabetMessage(_0x565fc2){const _0x3895a1=a69_0x5734,_0x4cfb2c=_0x565fc2[_0x3895a1(0x148)];if(_0x4cfb2c!==undefined&&_0x4cfb2c!==null){if(typeof _0x4cfb2c===_0x3895a1(0x147)&&_0x4cfb2c[_0x3895a1(0x156)]())return _0x4cfb2c['trim']();try{return JSON[_0x3895a1(0x14c)](_0x4cfb2c);}catch{}}return _0x565fc2[_0x3895a1(0x152)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a70_0x597b4e=a70_0x59ad;(function(_0x4487c5,_0x1217aa){const _0x58953f=a70_0x59ad,_0x24d5ed=_0x4487c5();while(!![]){try{const _0x46f49c=parseInt(_0x58953f(0x20c))/0x1+parseInt(_0x58953f(0x205))/0x2+parseInt(_0x58953f(0x1ee))/0x3*(-parseInt(_0x58953f(0x21d))/0x4)+-parseInt(_0x58953f(0x222))/0x5+parseInt(_0x58953f(0x21b))/0x6*(parseInt(_0x58953f(0x219))/0x7)+-parseInt(_0x58953f(0x200))/0x8+parseInt(_0x58953f(0x203))/0x9;if(_0x46f49c===_0x1217aa)break;else _0x24d5ed['push'](_0x24d5ed['shift']());}catch(_0x3cbb14){_0x24d5ed['push'](_0x24d5ed['shift']());}}}(a70_0x5838,0x925bc));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';function a70_0x5838(){const _0x284c09=['newConfigFileName','production','mergedCli','resolve','APPCODE','trim','3dgxGEu','nonInteractive','../core/api-client.js','app','service','map','configMissing','verbose','defaultApp','appcode\x20\x22','pageSize','appCodeSource','../commands/app/remote-source.js','items','doctor','validation','appcode','execute','1941128THMFUt','includes','requiresAuth','421974SBnpad','accessKey','1909184dxbrXS','error','Set\x20accessKey\x20in\x20','currentApp','has','defaultVerbose','pretty','65739KONfwI','format','schema','object','../core/sdk-client.js','\x20\x20To\x20proceed:\x20','string','rawFlags','defaultPageSize','Unknown\x20app:\x20','filter','_notice','appCode','119uXbJMi','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','314994VptDqZ','ACCESS_KEY','1190568HnQAWf','apiDomain','cancelled','env','requiresAppCode','4099665vpRPRV'];a70_0x5838=function(){return _0x284c09;};return a70_0x5838();}import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';function a70_0x59ad(_0x34f14a,_0x2bdc16){_0x34f14a=_0x34f14a-0x1e9;const _0x583865=a70_0x5838();let _0x59ad7a=_0x583865[_0x34f14a];return _0x59ad7a;}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(_0x1088e0){return void _0x1088e0,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x568ca3,_0x3c76b8){const _0x1cedcd=a70_0x59ad,_0x10db15=typeof _0x3c76b8['app']===_0x1cedcd(0x212)&&_0x3c76b8['app'][_0x1cedcd(0x1ed)]();return{'rawFlags':_0x3c76b8,'appCode':_0x568ca3['appCode']||productEnv('APPCODE')||(_0x10db15?undefined:readAppCodeFromConfig()),'appCodeSource':_0x568ca3[_0x1cedcd(0x1f9)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x3c76b8),'defaultFormat':_0x568ca3['format'],'defaultPageSize':_0x568ca3[_0x1cedcd(0x1f8)],'defaultVerbose':_0x568ca3[_0x1cedcd(0x1f5)],'riskLevel':_0x568ca3['riskLevel'],'accessKey':_0x568ca3[_0x1cedcd(0x204)],'env':_0x568ca3['env'],'mergedCli':{'defaultApp':_0x568ca3[_0x1cedcd(0x1f6)],'currentApp':_0x568ca3['currentApp'],'appCode':_0x568ca3[_0x1cedcd(0x218)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x597b4e(0x216)](_0x2afb95=>PIPELINE_FLAG_NAMES[a70_0x597b4e(0x209)](_0x2afb95['name']))[a70_0x597b4e(0x1f3)](({name:_0x5ddc41,type:_0x378c02,description:_0x3d7133})=>({'name':_0x5ddc41,'type':_0x378c02,'description':_0x3d7133})),'formatOutput':formatOutput,'getCommandLabel'(_0x12d193){const _0x407668=a70_0x597b4e;return CLI_BIN_NAME+'\x20'+_0x12d193[_0x407668(0x1f2)]+'\x20'+_0x12d193['command'];},'riskPolicy':{'onViolation'(_0x1ca9da){const _0x520514=a70_0x597b4e;console[_0x520514(0x206)](_0x1ca9da);},'createError'(_0xcb5b38){const _0x3b3856=a70_0x597b4e;return CliErrors[_0x3b3856(0x21f)](_0xcb5b38);}},async 'prepare'(_0x17e1b9,_0x4d096b){const _0x426b2f=a70_0x597b4e,_0x109108=resolveAuthMode(_0x4d096b);if(_0x17e1b9[_0x426b2f(0x202)]!==![]){if(!_0x4d096b[_0x426b2f(0x204)])throw CliErrors['authRequired'](_0x426b2f(0x207)+PRODUCT_CONFIG[_0x426b2f(0x223)]+'\x20or\x20pass\x20'+productEnvName(_0x426b2f(0x21c))+'.');const {setActiveAK:_0x7dc820}=await import(_0x426b2f(0x1f0));_0x7dc820(_0x4d096b['accessKey']);}let _0x324ec0='';if(_0x17e1b9['requiresAppCode']!==![]){_0x324ec0=_0x4d096b[_0x426b2f(0x218)]??'',_0x324ec0=await resolveExplicitAppName(_0x17e1b9,_0x4d096b,_0x324ec0);if(!_0x324ec0){await assertSelectedAppNameIsRuntimeAccessible(_0x17e1b9,_0x4d096b);throw CliErrors[_0x426b2f(0x1f4)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x426b2f(0x223)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x17e1b9,_0x4d096b,_0x324ec0);}if(_0x324ec0){const {initSdkClient:_0x527486}=await import(_0x426b2f(0x210));_0x527486({'appCode':_0x324ec0,'env':_0x4d096b[_0x426b2f(0x220)]??'production','accessKey':_0x4d096b[_0x426b2f(0x204)],'authMode':_0x109108});}return{'defaults':{'booleans':{'verbose':_0x4d096b[_0x426b2f(0x20a)]},'numbers':{'pagesize':_0x4d096b[_0x426b2f(0x214)]}},'extras':{'appCode':_0x324ec0,'cookie':'','apiDomain':_0x4d096b[_0x426b2f(0x21e)],'apiDir':'','accessKey':_0x4d096b[_0x426b2f(0x204)],'envName':_0x4d096b['env'],'mergedCli':_0x4d096b['mergedCli']}};},async 'confirmHighRisk'({def:_0x1ee9ac,env:_0x44c9c5,flags:_0xdbf91e,commandLabel:_0x2ab49d}){const _0xdffb49=a70_0x597b4e;if(_0x44c9c5['isNonInteractive']){const _0x1b6f7b=reconstructCommandArgv(_0x1ee9ac,_0xdbf91e);throw CliErrors['validation']('High-risk\x20operation\x20`'+_0x2ab49d+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0xdffb49(0x211)+_0x1b6f7b));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x1ee9ac,_0x2ab49d,_0xdbf91e),'createCancelledError':_0xc5faa0=>CliErrors[_0xdffb49(0x21f)](_0xc5faa0)});},'mapDryRunError'(_0x3d2b9a){return mapUserFacingExecuteError(_0x3d2b9a);},'mapExecuteError'(_0x38517e){return mapUserFacingExecuteError(_0x38517e);},async 'finalize'(){const _0x369533=a70_0x597b4e,{clearActiveAK:_0x12062f}=await import(_0x369533(0x1f0));_0x12062f();}};async function resolveExplicitAppName(_0xe1b7ec,_0x5701e9,_0x5b3166){const _0x3d558f=a70_0x597b4e;if(_0xe1b7ec[_0x3d558f(0x221)]===![])return _0x5b3166;const _0xd1c9a3=typeof _0x5701e9[_0x3d558f(0x213)][_0x3d558f(0x1f1)]==='string'?_0x5701e9[_0x3d558f(0x213)][_0x3d558f(0x1f1)]['trim']():'';if(!_0xd1c9a3)return _0x5b3166;const _0x511efb=typeof _0x5701e9[_0x3d558f(0x213)][_0x3d558f(0x1fe)]===_0x3d558f(0x212)&&_0x5701e9[_0x3d558f(0x213)][_0x3d558f(0x1fe)][_0x3d558f(0x1ed)]()||productEnv(_0x3d558f(0x1ec));if(_0x511efb||_0x5701e9[_0x3d558f(0x1f9)]==='local-alias')return _0x5b3166;const {getRemoteAppList:_0x3bbf9a}=await import(_0x3d558f(0x1fa)),_0x2964af=await _0x3bbf9a({'env':_0x5701e9[_0x3d558f(0x220)]??_0x3d558f(0x1e9),'accessKey':_0x5701e9[_0x3d558f(0x204)]}),_0x2a8e1e=findAppByName(_0x2964af[_0x3d558f(0x1fb)],_0xd1c9a3);if(_0x2a8e1e&&!isRuntimeAccessibleApp(_0x2a8e1e))throw runtimeInaccessibleAppError(_0x2a8e1e,'\x22'+_0xd1c9a3+'\x22');const _0x529242=_0x2a8e1e?.[_0x3d558f(0x218)]?.[_0x3d558f(0x1ed)]();if(_0x529242)return _0x529242;throw CliErrors[_0x3d558f(0x1fd)](_0x3d558f(0x215)+_0xd1c9a3,'Run\x20`'+CLI_BIN_NAME+_0x3d558f(0x21a)+_0xd1c9a3+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x3d558f(0x223)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x360882,_0x9efedf){const _0x27442b=a70_0x597b4e;if(_0x360882[_0x27442b(0x221)]===![]||!_0x9efedf['accessKey'])return;const _0x4ddf15=(typeof _0x9efedf[_0x27442b(0x213)]['app']===_0x27442b(0x212)&&_0x9efedf[_0x27442b(0x213)][_0x27442b(0x1f1)]['trim']()?_0x9efedf[_0x27442b(0x213)][_0x27442b(0x1f1)]:_0x9efedf[_0x27442b(0x1ea)]?.[_0x27442b(0x208)]??_0x9efedf[_0x27442b(0x1ea)]?.['defaultApp'])?.[_0x27442b(0x1ed)]();if(!_0x4ddf15)return;const {getRemoteAppList:_0xd0ef89}=await import(_0x27442b(0x1fa)),_0x27582e=await _0xd0ef89({'env':_0x9efedf[_0x27442b(0x220)]??_0x27442b(0x1e9),'accessKey':_0x9efedf[_0x27442b(0x204)]}),_0x5081f5=findAppByName(_0x27582e['items'],_0x4ddf15);if(_0x5081f5&&!isRuntimeAccessibleApp(_0x5081f5))throw runtimeInaccessibleAppError(_0x5081f5,'\x22'+_0x4ddf15+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x590765,_0x2edff2,_0x21bc82){const _0x2f631b=a70_0x597b4e;if(_0x590765[_0x2f631b(0x221)]===![]||!_0x2edff2[_0x2f631b(0x204)])return;const {getRemoteAppList:_0x5a6d0a}=await import('../commands/app/remote-source.js'),_0x5828e2=await _0x5a6d0a({'env':_0x2edff2[_0x2f631b(0x220)]??_0x2f631b(0x1e9),'accessKey':_0x2edff2[_0x2f631b(0x204)]}),_0x2336e1=findAppByCode(_0x5828e2[_0x2f631b(0x1fb)],_0x21bc82);if(_0x2336e1&&!isRuntimeAccessibleApp(_0x2336e1))throw runtimeInaccessibleAppError(_0x2336e1,_0x2f631b(0x1f7)+_0x21bc82+'\x22');}export async function runCommand(_0x3059d0,_0x52d42a){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x3059d0)?withUpdateNotice(_0x3059d0):_0x3059d0,_0x52d42a,runnerAdapter);}function shouldAttachUpdateNotice(_0x123446){const _0x2ce27c=a70_0x597b4e;return!['update',_0x2ce27c(0x20e),_0x2ce27c(0x1fc)][_0x2ce27c(0x201)](_0x123446[_0x2ce27c(0x1f2)]);}function withUpdateNotice(_0x48db75){return{..._0x48db75,async 'execute'(_0x4d27bb){const _0x1904bc=a70_0x59ad,_0xf506b9=shouldResolveUpdateNotice(_0x4d27bb)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x1904bc(0x1eb)](null),_0x42b5e4=await _0x48db75[_0x1904bc(0x1ff)](_0x4d27bb);return attachUpdateNotice(_0x42b5e4,await _0xf506b9);}};}function shouldResolveUpdateNotice(_0x550ffb){const _0x197f4b=a70_0x597b4e;return _0x550ffb[_0x197f4b(0x20d)]===_0x197f4b(0x20b)&&!_0x550ffb[_0x197f4b(0x1ef)];}function attachUpdateNotice(_0x2c2326,_0x2bfc92){const _0x1285b2=a70_0x597b4e;if(!_0x2bfc92||!_0x2c2326||typeof _0x2c2326!==_0x1285b2(0x20f))return _0x2c2326;const _0x2b17b8=_0x2c2326,_0x452091=typeof _0x2b17b8[_0x1285b2(0x217)]===_0x1285b2(0x20f)&&_0x2b17b8[_0x1285b2(0x217)]!==null?_0x2b17b8[_0x1285b2(0x217)]:{};return{..._0x2b17b8,'_notice':{..._0x452091,'update':_0x2bfc92}};}
|
|
1
|
+
const a70_0x446b2b=a70_0x3107;(function(_0x32856b,_0x5545f8){const _0x140ba7=a70_0x3107,_0x2f4489=_0x32856b();while(!![]){try{const _0x40b5f5=-parseInt(_0x140ba7(0x96))/0x1+parseInt(_0x140ba7(0xa7))/0x2+parseInt(_0x140ba7(0xa2))/0x3*(-parseInt(_0x140ba7(0xbc))/0x4)+-parseInt(_0x140ba7(0xac))/0x5+-parseInt(_0x140ba7(0xad))/0x6+parseInt(_0x140ba7(0x8f))/0x7*(-parseInt(_0x140ba7(0x8b))/0x8)+parseInt(_0x140ba7(0xaf))/0x9;if(_0x40b5f5===_0x5545f8)break;else _0x2f4489['push'](_0x2f4489['shift']());}catch(_0x2c12b){_0x2f4489['push'](_0x2f4489['shift']());}}}(a70_0x3d83,0x6dc02));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(_0x1dd7ee){const _0x218cc1=a70_0x3107;return void _0x1dd7ee,AUTH_MODE[_0x218cc1(0xc3)];}function a70_0x3d83(){const _0x4ca860=['authRequired','22367178NqvhVV','format','rawFlags','ACCESS_KEY','includes','appCodeSource','defaultApp','cancelled','apiDomain','env','string','\x20or\x20pass\x20','currentApp','124324WbzuhZ','object','../core/api-client.js','app','isNonInteractive','requiresAuth','_notice','ClientAk','command','local-alias','accessKey','name','appcode\x20\x22','../core/sdk-client.js','nonInteractive','production','3474696QYCQxw','requiresAppCode','execute','pageSize','7QrguNu','pretty','items','../commands/app/remote-source.js','appCode','riskLevel','schema','461243IGjzqh','defaultVerbose','\x20\x20To\x20proceed:\x20','Set\x20accessKey\x20in\x20','APPCODE','Unknown\x20app:\x20','Run\x20`','verbose','trim','service','resolve','filter','15EXiAAC','newConfigFileName','validation','High-risk\x20operation\x20`','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','1267636wkpRtA','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','defaultPageSize','mergedCli','appcode','3676965rTJtmp','5298864ceXgCY'];a70_0x3d83=function(){return _0x4ca860;};return a70_0x3d83();}export function createPipelineEnv(_0x4f565e,_0x4660ee){const _0xfdc38d=a70_0x3107,_0x25ad00=typeof _0x4660ee['app']==='string'&&_0x4660ee[_0xfdc38d(0xbf)][_0xfdc38d(0x9e)]();return{'rawFlags':_0x4660ee,'appCode':_0x4f565e[_0xfdc38d(0x93)]||productEnv(_0xfdc38d(0x9a))||(_0x25ad00?undefined:readAppCodeFromConfig()),'appCodeSource':_0x4f565e[_0xfdc38d(0xb4)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x4660ee),'defaultFormat':_0x4f565e[_0xfdc38d(0xb0)],'defaultPageSize':_0x4f565e[_0xfdc38d(0x8e)],'defaultVerbose':_0x4f565e[_0xfdc38d(0x9d)],'riskLevel':_0x4f565e[_0xfdc38d(0x94)],'accessKey':_0x4f565e['accessKey'],'env':_0x4f565e[_0xfdc38d(0xb8)],'mergedCli':{'defaultApp':_0x4f565e[_0xfdc38d(0xb5)],'currentApp':_0x4f565e[_0xfdc38d(0xbb)],'appCode':_0x4f565e[_0xfdc38d(0x93)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x446b2b(0xa1)](_0x4ff8ce=>PIPELINE_FLAG_NAMES['has'](_0x4ff8ce[a70_0x446b2b(0x86)]))['map'](({name:_0x51a96d,type:_0x4ba3d7,description:_0x4f9134})=>({'name':_0x51a96d,'type':_0x4ba3d7,'description':_0x4f9134})),'formatOutput':formatOutput,'getCommandLabel'(_0x29c875){const _0x474964=a70_0x446b2b;return CLI_BIN_NAME+'\x20'+_0x29c875[_0x474964(0x9f)]+'\x20'+_0x29c875[_0x474964(0x83)];},'riskPolicy':{'onViolation'(_0x34ce4b){console['error'](_0x34ce4b);},'createError'(_0x1a75f9){const _0x1e7e08=a70_0x446b2b;return CliErrors[_0x1e7e08(0xb6)](_0x1a75f9);}},async 'prepare'(_0x5d8854,_0x1b05e0){const _0x4cf555=a70_0x446b2b,_0x383db6=resolveAuthMode(_0x1b05e0);if(_0x5d8854[_0x4cf555(0xc1)]!==![]){if(!_0x1b05e0[_0x4cf555(0x85)])throw CliErrors[_0x4cf555(0xae)](_0x4cf555(0x99)+PRODUCT_CONFIG[_0x4cf555(0xa3)]+_0x4cf555(0xba)+productEnvName(_0x4cf555(0xb2))+'.');const {setActiveAK:_0x2960cf}=await import(_0x4cf555(0xbe));_0x2960cf(_0x1b05e0[_0x4cf555(0x85)]);}let _0x37b20f='';if(_0x5d8854[_0x4cf555(0x8c)]!==![]){_0x37b20f=_0x1b05e0[_0x4cf555(0x93)]??'',_0x37b20f=await resolveExplicitAppName(_0x5d8854,_0x1b05e0,_0x37b20f);if(!_0x37b20f){await assertSelectedAppNameIsRuntimeAccessible(_0x5d8854,_0x1b05e0);throw CliErrors['configMissing'](_0x4cf555(0xa8)+PRODUCT_CONFIG[_0x4cf555(0xa3)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x5d8854,_0x1b05e0,_0x37b20f);}if(_0x37b20f){const {initSdkClient:_0x86a451}=await import(_0x4cf555(0x88));_0x86a451({'appCode':_0x37b20f,'env':_0x1b05e0['env']??_0x4cf555(0x8a),'accessKey':_0x1b05e0[_0x4cf555(0x85)],'authMode':_0x383db6});}return{'defaults':{'booleans':{'verbose':_0x1b05e0[_0x4cf555(0x97)]},'numbers':{'pagesize':_0x1b05e0[_0x4cf555(0xa9)]}},'extras':{'appCode':_0x37b20f,'cookie':'','apiDomain':_0x1b05e0[_0x4cf555(0xb7)],'apiDir':'','accessKey':_0x1b05e0[_0x4cf555(0x85)],'envName':_0x1b05e0[_0x4cf555(0xb8)],'mergedCli':_0x1b05e0[_0x4cf555(0xaa)]}};},async 'confirmHighRisk'({def:_0x178f8e,env:_0x5bb7d6,flags:_0x2a30b4,commandLabel:_0x266686}){const _0x57431e=a70_0x446b2b;if(_0x5bb7d6[_0x57431e(0xc0)]){const _0x1e5ce4=reconstructCommandArgv(_0x178f8e,_0x2a30b4);throw CliErrors[_0x57431e(0xa4)](_0x57431e(0xa5)+_0x266686+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x57431e(0x98)+_0x1e5ce4));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x178f8e,_0x266686,_0x2a30b4),'createCancelledError':_0x53707e=>CliErrors[_0x57431e(0xb6)](_0x53707e)});},'mapDryRunError'(_0xc2fb17){return mapUserFacingExecuteError(_0xc2fb17);},'mapExecuteError'(_0x57a2c7){return mapUserFacingExecuteError(_0x57a2c7);},async 'finalize'(){const _0x3ee728=a70_0x446b2b,{clearActiveAK:_0x58fef9}=await import(_0x3ee728(0xbe));_0x58fef9();}};async function resolveExplicitAppName(_0x25fdc4,_0x313525,_0x51a1b7){const _0x426c13=a70_0x446b2b;if(_0x25fdc4['requiresAppCode']===![])return _0x51a1b7;const _0x4969cd=typeof _0x313525[_0x426c13(0xb1)][_0x426c13(0xbf)]===_0x426c13(0xb9)?_0x313525['rawFlags'][_0x426c13(0xbf)][_0x426c13(0x9e)]():'';if(!_0x4969cd)return _0x51a1b7;const _0x289302=typeof _0x313525[_0x426c13(0xb1)]['appcode']===_0x426c13(0xb9)&&_0x313525[_0x426c13(0xb1)][_0x426c13(0xab)][_0x426c13(0x9e)]()||productEnv(_0x426c13(0x9a));if(_0x289302||_0x313525[_0x426c13(0xb4)]===_0x426c13(0x84))return _0x51a1b7;const {getRemoteAppList:_0x355e84}=await import(_0x426c13(0x92)),_0x31339e=await _0x355e84({'env':_0x313525[_0x426c13(0xb8)]??_0x426c13(0x8a),'accessKey':_0x313525['accessKey']}),_0x4c6242=findAppByName(_0x31339e[_0x426c13(0x91)],_0x4969cd);if(_0x4c6242&&!isRuntimeAccessibleApp(_0x4c6242))throw runtimeInaccessibleAppError(_0x4c6242,'\x22'+_0x4969cd+'\x22');const _0x1870be=_0x4c6242?.[_0x426c13(0x93)]?.[_0x426c13(0x9e)]();if(_0x1870be)return _0x1870be;throw CliErrors['validation'](_0x426c13(0x9b)+_0x4969cd,_0x426c13(0x9c)+CLI_BIN_NAME+_0x426c13(0xa6)+_0x4969cd+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x426c13(0xa3)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x3e95e5,_0x1171cd){const _0x1fe785=a70_0x446b2b;if(_0x3e95e5[_0x1fe785(0x8c)]===![]||!_0x1171cd[_0x1fe785(0x85)])return;const _0x151bb0=(typeof _0x1171cd[_0x1fe785(0xb1)][_0x1fe785(0xbf)]===_0x1fe785(0xb9)&&_0x1171cd[_0x1fe785(0xb1)][_0x1fe785(0xbf)]['trim']()?_0x1171cd[_0x1fe785(0xb1)][_0x1fe785(0xbf)]:_0x1171cd[_0x1fe785(0xaa)]?.[_0x1fe785(0xbb)]??_0x1171cd[_0x1fe785(0xaa)]?.[_0x1fe785(0xb5)])?.[_0x1fe785(0x9e)]();if(!_0x151bb0)return;const {getRemoteAppList:_0x46c40a}=await import('../commands/app/remote-source.js'),_0x10916e=await _0x46c40a({'env':_0x1171cd['env']??_0x1fe785(0x8a),'accessKey':_0x1171cd[_0x1fe785(0x85)]}),_0xdb4b9e=findAppByName(_0x10916e[_0x1fe785(0x91)],_0x151bb0);if(_0xdb4b9e&&!isRuntimeAccessibleApp(_0xdb4b9e))throw runtimeInaccessibleAppError(_0xdb4b9e,'\x22'+_0x151bb0+'\x22');}function a70_0x3107(_0x2bc1bc,_0x311606){_0x2bc1bc=_0x2bc1bc-0x83;const _0x3d831b=a70_0x3d83();let _0x310735=_0x3d831b[_0x2bc1bc];return _0x310735;}async function assertAppCodeIsRuntimeAccessible(_0x4ac92e,_0x41bcf0,_0x4044fb){const _0x2a4340=a70_0x446b2b;if(_0x4ac92e['requiresAppCode']===![]||!_0x41bcf0[_0x2a4340(0x85)])return;const {getRemoteAppList:_0x2439d2}=await import(_0x2a4340(0x92)),_0xfb2278=await _0x2439d2({'env':_0x41bcf0[_0x2a4340(0xb8)]??_0x2a4340(0x8a),'accessKey':_0x41bcf0['accessKey']}),_0x188d10=findAppByCode(_0xfb2278[_0x2a4340(0x91)],_0x4044fb);if(_0x188d10&&!isRuntimeAccessibleApp(_0x188d10))throw runtimeInaccessibleAppError(_0x188d10,_0x2a4340(0x87)+_0x4044fb+'\x22');}export async function runCommand(_0x371f8c,_0x4ea1a2){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x371f8c)?withUpdateNotice(_0x371f8c):_0x371f8c,_0x4ea1a2,runnerAdapter);}function shouldAttachUpdateNotice(_0x43b709){const _0x37d32c=a70_0x446b2b;return!['update',_0x37d32c(0x95),'doctor'][_0x37d32c(0xb3)](_0x43b709[_0x37d32c(0x9f)]);}function withUpdateNotice(_0x116305){return{..._0x116305,async 'execute'(_0x4b32de){const _0x2b2f01=a70_0x3107,_0x38ba2a=shouldResolveUpdateNotice(_0x4b32de)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x2b2f01(0xa0)](null),_0x252287=await _0x116305[_0x2b2f01(0x8d)](_0x4b32de);return attachUpdateNotice(_0x252287,await _0x38ba2a);}};}function shouldResolveUpdateNotice(_0x13920c){const _0x58a8ec=a70_0x446b2b;return _0x13920c[_0x58a8ec(0xb0)]===_0x58a8ec(0x90)&&!_0x13920c[_0x58a8ec(0x89)];}function attachUpdateNotice(_0x63ef10,_0x4abba1){const _0x21cd5a=a70_0x446b2b;if(!_0x4abba1||!_0x63ef10||typeof _0x63ef10!=='object')return _0x63ef10;const _0x522538=_0x63ef10,_0x1b2615=typeof _0x522538[_0x21cd5a(0xc2)]===_0x21cd5a(0xbd)&&_0x522538[_0x21cd5a(0xc2)]!==null?_0x522538['_notice']:{};return{..._0x522538,'_notice':{..._0x1b2615,'update':_0x4abba1}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x385acd,_0x43a702){const _0x518533=a71_0xefb6,_0x339460=_0x385acd();while(!![]){try{const _0x265f47=-parseInt(_0x518533(0xe9))/0x1+parseInt(_0x518533(0xe7))/0x2*(-parseInt(_0x518533(0xef))/0x3)+parseInt(_0x518533(0xf3))/0x4*(parseInt(_0x518533(0xea))/0x5)+parseInt(_0x518533(0xec))/0x6+-parseInt(_0x518533(0xeb))/0x7*(parseInt(_0x518533(0xe8))/0x8)+-parseInt(_0x518533(0xe6))/0x9+parseInt(_0x518533(0xf1))/0xa;if(_0x265f47===_0x43a702)break;else _0x339460['push'](_0x339460['shift']());}catch(_0x2cf60b){_0x339460['push'](_0x339460['shift']());}}}(a71_0x4347,0x77e5d));import{buildSchemaPayload as a71_0x1965d4}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a71_0x4347(){const _0x493c8d=['25fJHEhi','42QbnnmX','3131394YERxlR','../commands/registry.js','has','6qsXxDX','service','22997500DsqNnm','filter','136516orWULT','5196726nvMkNi','925698OYfmpE','205264tKYNNn','844133ihUAwa'];a71_0x4347=function(){return _0x493c8d;};return a71_0x4347();}function a71_0xefb6(_0x2ec27a,_0x4e4ddc){_0x2ec27a=_0x2ec27a-0xe6;const _0x43474d=a71_0x4347();let _0xefb6e7=_0x43474d[_0x2ec27a];return _0xefb6e7;}export async function buildSchemaPayload(){const _0x13b528=a71_0xefb6,{serviceRegistry:_0x4af93a,findDefinition:_0x34c662}=await import(_0x13b528(0xed)),_0x379454=new Set(_0x4af93a['map'](_0x519975=>_0x519975[_0x13b528(0xf0)])),_0x2dbcf1=listDynamicServiceEntries()[_0x13b528(0xf2)](_0x3eea14=>!_0x379454[_0x13b528(0xee)](_0x3eea14['service']));return a71_0x1965d4({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x4af93a,..._0x2dbcf1],'buildAllFlags':buildAllFlags,'findDefinition':(_0x219858,_0x5b3016)=>_0x34c662(_0x219858,_0x5b3016)??findDynamicServiceDefinition(_0x219858,_0x5b3016)});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a72_0x4e0d(_0x1bced2,_0x145104){_0x1bced2=_0x1bced2-0x7a;var _0x46d75b=a72_0x46d7();var _0x4e0dea=_0x46d75b[_0x1bced2];return _0x4e0dea;}(function(_0x481efb,_0x3b62d8){var _0x53b053=a72_0x4e0d,_0x396032=_0x481efb();while(!![]){try{var _0x363507=parseInt(_0x53b053(0x7d))/0x1+parseInt(_0x53b053(0x85))/0x2*(-parseInt(_0x53b053(0x80))/0x3)+parseInt(_0x53b053(0x7e))/0x4+-parseInt(_0x53b053(0x81))/0x5*(parseInt(_0x53b053(0x84))/0x6)+-parseInt(_0x53b053(0x7a))/0x7*(parseInt(_0x53b053(0x7c))/0x8)+parseInt(_0x53b053(0x83))/0x9*(parseInt(_0x53b053(0x82))/0xa)+parseInt(_0x53b053(0x7b))/0xb*(-parseInt(_0x53b053(0x7f))/0xc);if(_0x363507===_0x3b62d8)break;else _0x396032['push'](_0x396032['shift']());}catch(_0x205dd5){_0x396032['push'](_0x396032['shift']());}}}(a72_0x46d7,0x6b0c1));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a72_0x46d7(){var _0x1e788f=['848472ecWUGH','825491TemzSH','1182192cfUSTM','300dLCnCg','3lAUmOF','87460LSubGu','278440fSfiMA','225KihKdx','168XCkWTh','172128yySlJj','7ytVNtE','306581ROOYiR'];a72_0x46d7=function(){return _0x1e788f;};return a72_0x46d7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x69086a=a73_0x4b08;(function(_0x581322,_0x4971d4){const _0x4fd1df=a73_0x4b08,_0x498940=_0x581322();while(!![]){try{const _0x18520f=-parseInt(_0x4fd1df(0x16f))/0x1*(-parseInt(_0x4fd1df(0x174))/0x2)+-parseInt(_0x4fd1df(0x173))/0x3*(parseInt(_0x4fd1df(0x177))/0x4)+-parseInt(_0x4fd1df(0x179))/0x5+-parseInt(_0x4fd1df(0x171))/0x6*(-parseInt(_0x4fd1df(0x176))/0x7)+parseInt(_0x4fd1df(0x16e))/0x8+parseInt(_0x4fd1df(0x17a))/0x9+parseInt(_0x4fd1df(0x172))/0xa*(-parseInt(_0x4fd1df(0x170))/0xb);if(_0x18520f===_0x4971d4)break;else _0x498940['push'](_0x498940['shift']());}catch(_0x217356){_0x498940['push'](_0x498940['shift']());}}}(a73_0x28ab,0xde6be));export const VERSION='2.1.0';function a73_0x4b08(_0x25d748,_0x4236e8){_0x25d748=_0x25d748-0x16e;const _0x28abd6=a73_0x28ab();let _0x4b087a=_0x28abd6[_0x25d748];return _0x4b087a;}export const GIT_TAG=a73_0x69086a(0x178);export const GIT_COMMIT=a73_0x69086a(0x175);function a73_0x28ab(){const _0x501f28=['3YbOGkV','54pKnAyE','6f9931a','7qfnQVj','2010160DHJeeX','v2.1.0-beta.3','8303340ifrIJI','8063262XGgiyG','14016408FGNGhZ','89PkbZfo','11mfjclX','5340114GBpHJV','4661450PoCSWS'];a73_0x28ab=function(){return _0x501f28;};return a73_0x28ab();}export const BUILD_TIME='2026-07-02T11:52:34.519Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a74_0x3925(){const _0x388799=['\x20\x20Use\x20','3722XrGTup','6ivIfPz','9919LVTuWv','2827RSINYV','311ObCHhk','\x20to\x20view\x20available\x20commands.','4LanBwI','8LMrhfT','156443IBDyhX','1649037tKdMCI','1678390jzgwoq','5030qQBGZY','green','3348441wZuaok','36732bplhLi'];a74_0x3925=function(){return _0x388799;};return a74_0x3925();}(function(_0x27d5f5,_0x3d7ec6){const _0x27018c=a74_0x4a9c,_0x138357=_0x27d5f5();while(!![]){try{const _0x592a12=parseInt(_0x27018c(0x6c))/0x1*(-parseInt(_0x27018c(0x78))/0x2)+-parseInt(_0x27018c(0x71))/0x3*(parseInt(_0x27018c(0x6e))/0x4)+parseInt(_0x27018c(0x72))/0x5*(-parseInt(_0x27018c(0x69))/0x6)+-parseInt(_0x27018c(0x70))/0x7*(-parseInt(_0x27018c(0x6f))/0x8)+-parseInt(_0x27018c(0x75))/0x9+parseInt(_0x27018c(0x73))/0xa*(parseInt(_0x27018c(0x6b))/0xb)+-parseInt(_0x27018c(0x76))/0xc*(-parseInt(_0x27018c(0x6a))/0xd);if(_0x592a12===_0x3d7ec6)break;else _0x138357['push'](_0x138357['shift']());}catch(_0x189288){_0x138357['push'](_0x138357['shift']());}}}(a74_0x3925,0x9eeea));import{jsx as a74_0x3eed75,jsxs as a74_0x1ad490}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a74_0x4a9c(_0x18dabe,_0x56f4e9){_0x18dabe=_0x18dabe-0x69;const _0x392537=a74_0x3925();let _0x4a9c65=_0x392537[_0x18dabe];return _0x4a9c65;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x1c2ee6=a74_0x4a9c,{exit:_0x44d719}=useApp();return useEffect(()=>{_0x44d719();},[_0x44d719]),a74_0x1ad490(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a74_0x3eed75(Box,{'children':a74_0x3eed75(Text,{'bold':!![],'color':_0x1c2ee6(0x74),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a74_0x1ad490(Box,{'marginTop':0x1,'children':[a74_0x3eed75(Text,{'dimColor':!![],'children':_0x1c2ee6(0x77)}),a74_0x3eed75(Text,{'bold':!![],'color':_0x1c2ee6(0x74),'children':CLI_BIN_NAME+'\x20--help'}),a74_0x3eed75(Text,{'dimColor':!![],'children':_0x1c2ee6(0x6d)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a75_0x2c2df1=a75_0x3dff;(function(_0x343c7f,_0x1af7b5){const _0x19e8cb=a75_0x3dff,_0x4b909f=_0x343c7f();while(!![]){try{const _0x393bf5=-parseInt(_0x19e8cb(0x174))/0x1*(parseInt(_0x19e8cb(0x17f))/0x2)+parseInt(_0x19e8cb(0x181))/0x3*(-parseInt(_0x19e8cb(0x175))/0x4)+-parseInt(_0x19e8cb(0x173))/0x5+-parseInt(_0x19e8cb(0x171))/0x6+parseInt(_0x19e8cb(0x17a))/0x7+-parseInt(_0x19e8cb(0x179))/0x8*(parseInt(_0x19e8cb(0x187))/0x9)+-parseInt(_0x19e8cb(0x186))/0xa*(-parseInt(_0x19e8cb(0x176))/0xb);if(_0x393bf5===_0x1af7b5)break;else _0x4b909f['push'](_0x4b909f['shift']());}catch(_0x813e57){_0x4b909f['push'](_0x4b909f['shift']());}}}(a75_0x4f4c,0x959db));function a75_0x3dff(_0x2f064a,_0x561cf3){_0x2f064a=_0x2f064a-0x170;const _0x4f4c52=a75_0x4f4c();let _0x3dff84=_0x4f4c52[_0x2f064a];return _0x3dff84;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a75_0x322bd9}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a75_0x322bd9;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a75_0x2c2df1(0x170)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3ff71c,_0x314372=LOVRABET_SKILL_SOURCE,_0x4ed81e){const _0x58974f=a75_0x2c2df1;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4bd92c=_0x4ed81e?.[_0x58974f(0x188)]??_0x58974f(0x184),_0x1c5d44=resolveNpmBin(_0x58974f(0x177)),_0x558cb9=[_0x58974f(0x17d),_0x58974f(0x182),_0x314372,'-g','-y'],_0x410946=[_0x1c5d44,..._0x558cb9][_0x58974f(0x17c)]('\x20');console[_0x58974f(0x180)]('*\x20'+_0x410946);const _0x5a2f25=spawnSync(_0x1c5d44,_0x558cb9,{'cwd':_0x3ff71c,'stdio':_0x4bd92c,'env':process.env,'shell':![]});if(_0x5a2f25[_0x58974f(0x178)]===0x0)return{'ok':!![],'status':0x0};let _0x52f5bf=_0x58974f(0x17b)+(_0x5a2f25[_0x58974f(0x178)]??'unknown');if(_0x4bd92c==='pipe'){const _0x28c564=_0x5a2f25[_0x58974f(0x172)]?_0x5a2f25[_0x58974f(0x172)][_0x58974f(0x185)]()[_0x58974f(0x17e)]():'',_0x1861ff=_0x5a2f25[_0x58974f(0x183)]?_0x5a2f25[_0x58974f(0x183)][_0x58974f(0x185)]()[_0x58974f(0x17e)]():'';if(_0x28c564)_0x52f5bf=_0x28c564;else{if(_0x1861ff)_0x52f5bf=_0x1861ff;}}return{'ok':![],'status':_0x5a2f25[_0x58974f(0x178)]??null,'error':_0x52f5bf};}function a75_0x4f4c(){const _0x1a822e=['toString','10RGYsog','819mfUydB','stdio','skipNpxSkillsEnvSuffix','6459282kmbQhA','stderr','1896810iYpPUN','51498UnoZpd','93292wsuujK','24073148gyWWbc','npx','status','31896RryCZZ','5728310PEZzXN','exit\x20','join','skills','trim','16bvUCpz','log','21GQYjNe','add','stdout','inherit'];a75_0x4f4c=function(){return _0x1a822e;};return a75_0x4f4c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a76_0x16d29b=a76_0x55f5;(function(_0x4df37e,_0x60fb18){const _0x5eaa97=a76_0x55f5,_0x27092f=_0x4df37e();while(!![]){try{const _0x26ff41=parseInt(_0x5eaa97(0x17f))/0x1*(-parseInt(_0x5eaa97(0x14b))/0x2)+parseInt(_0x5eaa97(0x1c8))/0x3*(parseInt(_0x5eaa97(0x159))/0x4)+parseInt(_0x5eaa97(0x17b))/0x5*(-parseInt(_0x5eaa97(0x1ce))/0x6)+-parseInt(_0x5eaa97(0x118))/0x7+parseInt(_0x5eaa97(0x180))/0x8+-parseInt(_0x5eaa97(0x111))/0x9*(parseInt(_0x5eaa97(0x1a7))/0xa)+parseInt(_0x5eaa97(0x1bc))/0xb;if(_0x26ff41===_0x60fb18)break;else _0x27092f['push'](_0x27092f['shift']());}catch(_0x294be6){_0x27092f['push'](_0x27092f['shift']());}}}(a76_0x122e,0x469fc));import{createHash}from'node:crypto';import{inflateRawSync}from'node:zlib';import{existsSync,lstatSync,mkdirSync,readdirSync,readFileSync,readlinkSync,realpathSync,renameSync,rmSync,symlinkSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a76_0x55f5(_0x200719,_0xffd545){_0x200719=_0x200719-0x111;const _0x122eda=a76_0x122e();let _0x55f5fc=_0x122eda[_0x200719];return _0x55f5fc;}import{basename,dirname,isAbsolute,relative,resolve,sep}from'node:path';import{fingerprintAccessKey}from'../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../constant/product.js';import{CliErrors}from'../errors.js';const METADATA_FILE=a76_0x16d29b(0x1ad),SKILL_FILE='SKILL.md',MAX_SKILL_FILE_COUNT=0xc8,MAX_SKILL_FILE_BYTES=0x100*0x400,MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400,MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400,IGNORED_FILE_NAMES=new Set([METADATA_FILE,a76_0x16d29b(0x11e)]),IGNORED_DIR_NAMES=new Set([a76_0x16d29b(0x192),a76_0x16d29b(0x1b2),a76_0x16d29b(0x19e),a76_0x16d29b(0x149),a76_0x16d29b(0x169),a76_0x16d29b(0x134),a76_0x16d29b(0x1cf),a76_0x16d29b(0x112),'.turbo',a76_0x16d29b(0x13a)]),ZIP_LOCAL_FILE_HEADER_SIGNATURE=0x4034b50,ZIP_CENTRAL_DIRECTORY_SIGNATURE=0x2014b50,ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE=0x6054b50,ZIP_GENERAL_PURPOSE_UTF8=0x800,ZIP_METHOD_STORE=0x0,ZIP_METHOD_DEFLATE=0x8,ZIP_FIXED_DOS_TIME=0x0,ZIP_FIXED_DOS_DATE=0x21,CRC32_TABLE=createCrc32Table();export function resolveSkillSyncPaths(_0x14c50d={}){const _0x521267=a76_0x16d29b,_0x363330=_0x14c50d[_0x521267(0x1c4)]??homedir(),_0x23ec2e=resolve(_0x363330,PRODUCT_CONFIG[_0x521267(0x13e)],_0x521267(0x19d)),_0x5ec5d2=trimmedEnv(_0x521267(0x120)),_0x296f4a=trimmedEnv(_0x521267(0x187));return{'homeDir':_0x363330,'cacheRoot':_0x23ec2e,'managedRoot':resolve(_0x363330,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x14c50d['agentsSkillsDir']??_0x5ec5d2??resolve(_0x363330,'.agents',_0x521267(0x1dc)),'claudeSkillsDir':_0x14c50d[_0x521267(0x1bf)]??_0x296f4a??resolve(_0x363330,_0x521267(0x164),_0x521267(0x1dc))};}export function getRuntimeSkillCacheRoot(_0x5edc6f,_0x590494,_0x3029b9={}){const _0x2a439c=a76_0x16d29b,_0x2ac99c=resolveSkillSyncPaths(_0x3029b9);return resolve(_0x2ac99c['cacheRoot'],_0x5edc6f,fingerprintAccessKey(_0x590494),_0x2a439c(0x1dc));}export function getRuntimeSkillDir(_0x43e6e5,_0x1b4795,_0x5a7f68,_0x2629b6,_0x5dc387,_0x45faea={}){const _0x52fe4e=a76_0x16d29b;return resolve(getRuntimeSkillCacheRoot(_0x43e6e5,_0x1b4795,_0x45faea),safePathSegment(_0x5a7f68,_0x52fe4e(0x17a)),_0x2629b6,safePathSegment(_0x5dc387,_0x52fe4e(0x1a3)));}export function listLocalRuntimeSkills(_0x6e33ad,_0x4cc0dd={}){const _0x29eff8=a76_0x16d29b,_0x2152d9=safePathSegment(_0x6e33ad['appCode'],_0x29eff8(0x17a)),_0x3bc4ff=normalizeRuntimeSkillScopes(_0x6e33ad[_0x29eff8(0x1d3)]),_0x509200=new Set(_0x3bc4ff),_0x36ea43=_0x6e33ad[_0x29eff8(0x1ab)]?.['trim'](),_0x4e8f2b=new Map(),_0x23b06a=resolve(getRuntimeSkillCacheRoot(_0x6e33ad['env'],_0x6e33ad[_0x29eff8(0x18f)],_0x4cc0dd),_0x2152d9);for(const _0x13976e of _0x3bc4ff){for(const _0x745265 of localSkillEntryDirs(resolve(_0x23b06a,_0x13976e))){collectLocalRuntimeSkill(_0x4e8f2b,_0x745265,{'appCode':_0x2152d9,'scopes':_0x509200,'code':_0x36ea43,'source':_0x29eff8(0x19d)});}}const _0x3183ec=resolveSkillSyncPaths(_0x4cc0dd);for(const _0x269360 of[_0x3183ec[_0x29eff8(0x1a9)],_0x3183ec[_0x29eff8(0x1bf)]]){for(const _0x484167 of localSkillLinkCandidates(_0x269360,_0x2152d9,_0x509200)){collectLocalRuntimeSkill(_0x4e8f2b,_0x484167,{'appCode':_0x2152d9,'scopes':_0x509200,'code':_0x36ea43,'source':_0x29eff8(0x166),'linkedPath':_0x484167});}}return Array['from'](_0x4e8f2b[_0x29eff8(0x1ca)]())[_0x29eff8(0x160)](compareLocalRuntimeSkills);}export function contentHash(_0x57d3e7){const _0x219a43=a76_0x16d29b;return createHash(_0x219a43(0x1ac))[_0x219a43(0x197)](_0x57d3e7)['digest'](_0x219a43(0x186));}function fileContent(_0x4e19c6){const _0x580a04=a76_0x16d29b;return _0x4e19c6[_0x580a04(0x1db)]??Buffer[_0x580a04(0x173)](_0x4e19c6[_0x580a04(0x195)]??'',_0x580a04(0x142));}function fileText(_0x1c215a){const _0x3737d6=a76_0x16d29b;return fileContent(_0x1c215a)[_0x3737d6(0x174)](_0x3737d6(0x142));}function fileHash(_0x319c1b){return bufferSha256(fileContent(_0x319c1b));}function bufferSha256(_0x809494){const _0x2c625d=a76_0x16d29b;return createHash(_0x2c625d(0x1ac))['update'](_0x809494)[_0x2c625d(0x12d)]('hex');}export function fileTreeHash(_0x173959){const _0xcd85b0=a76_0x16d29b,_0x4ba952=createHash('sha256');for(const _0x51a180 of normalizeManifestFiles(_0x173959)){_0x4ba952[_0xcd85b0(0x197)](_0x51a180['path']),_0x4ba952['update']('\x00'),_0x4ba952['update'](_0x51a180['sha256']),_0x4ba952[_0xcd85b0(0x197)]('\x00'),_0x4ba952['update'](String(_0x51a180[_0xcd85b0(0x190)])),_0x4ba952['update']('\x00');}return _0x4ba952[_0xcd85b0(0x12d)]('hex');}export function buildSkillPackage(_0x12ac04){const _0x265751=a76_0x16d29b,_0x185839=normalizeLocalFiles(_0x12ac04);if(!_0x185839[_0x265751(0x140)](_0x4569ca=>_0x4569ca['path']===SKILL_FILE))throw CliErrors['validation']('Missing\x20'+SKILL_FILE+_0x265751(0x17c));const _0x5cb0cf=localFilesToManifestFiles(_0x185839),_0x1c2a30=createDeterministicZipPackage(_0x185839);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5cb0cf),'zipSha256':bufferSha256(_0x1c2a30),'zipSize':_0x1c2a30[_0x265751(0x113)],'files':_0x5cb0cf},'packageBytes':_0x1c2a30,'packageBase64':_0x1c2a30[_0x265751(0x174)]('base64')};}export function verifyRuntimeSkillPackage(_0x105d09,_0x2e97c1){const _0x50295f=a76_0x16d29b,_0x5c1acf=normalizePackageManifest(_0x105d09,{'requireOssPath':![]});if(!_0x5c1acf)throw CliErrors[_0x50295f(0x1d2)](_0x50295f(0x11f));return extractAndVerifyPackage(_0x5c1acf,_0x2e97c1);}export function materializeRuntimeSkill(_0x559a47,_0x2ba812,_0x5debd0){const _0x556378=a76_0x16d29b,_0x305377=requireSkillCode(_0x559a47),_0x2773a2=normalizeRemoteManifest(_0x559a47['files']),_0x260881=_0x2773a2!==undefined,_0x4e0040=_0x260881?requirePackageBytes(_0x305377,_0x5debd0['packageBytes']):undefined,_0x498210=_0x260881?extractAndVerifyPackage(_0x2773a2,_0x4e0040):[{'path':SKILL_FILE,'content':_0x559a47['content']??''}],_0x393d5f=_0x498210[_0x556378(0x1cd)](_0x246336=>_0x246336[_0x556378(0x1d7)]===SKILL_FILE);if(!_0x393d5f)throw CliErrors[_0x556378(0x1d2)](_0x556378(0x153)+SKILL_FILE+':\x20'+_0x305377);const _0x315101=fileText(_0x393d5f);if(_0x260881&&_0x559a47['content']!==undefined&&_0x559a47[_0x556378(0x195)]!==_0x315101)throw CliErrors['validation'](_0x556378(0x1be)+SKILL_FILE+_0x556378(0x141)+_0x305377);const _0x421ca9=withMaterializedSkillFrontmatter(_0x498210,_0x559a47,_0x305377),_0x1995fe=_0x421ca9['find'](_0x1f7d84=>_0x1f7d84[_0x556378(0x1d7)]===SKILL_FILE),_0x2f065d=fileText(_0x1995fe),_0x207348=getRuntimeSkillDir(_0x5debd0[_0x556378(0x16d)],_0x5debd0['accessKey'],_0x5debd0[_0x556378(0x17a)],_0x2ba812,_0x305377,_0x5debd0[_0x556378(0x12e)]),_0x4696af=resolve(_0x207348,SKILL_FILE),_0x3a7c13=resolve(_0x207348,METADATA_FILE),_0x349d2c=contentHash(_0x2f065d),_0x1fef6f=readMetadataIfPresent(_0x3a7c13)?.[_0x556378(0x17e)];ensurePulledFilesCanBeOverwritten(_0x207348,_0x3a7c13,_0x421ca9,_0x5debd0['force']===!![]),mkdirSync(_0x207348,{'recursive':!![],'mode':0x1c0});const _0x7e841=existsSync(_0x4696af)?readFileSync(_0x4696af,'utf8'):undefined;return materializeFiles(_0x207348,_0x421ca9),_0x260881&&removeStaleManagedFiles(_0x207348,_0x1fef6f,_0x421ca9),writeJsonAtomic(_0x3a7c13,buildMetadata(_0x559a47,_0x2ba812,_0x5debd0[_0x556378(0x17a)],_0x349d2c,_0x5debd0[_0x556378(0x1a8)],_0x260881?_0x421ca9:undefined)),{'skill':_0x559a47,'scope':_0x2ba812,'dir':_0x207348,'skillMdPath':_0x4696af,'metadataPath':_0x3a7c13,'contentHash':_0x349d2c,'changed':_0x7e841!==_0x2f065d};}function withMaterializedSkillFrontmatter(_0x2b3e5a,_0x1bddb2,_0x5300f4){const _0x45d1db=a76_0x16d29b;return normalizeLocalFiles(_0x2b3e5a)[_0x45d1db(0x1c1)](_0x15587b=>{const _0x43235e=_0x45d1db,_0x8a3eff=fileText(_0x15587b);if(_0x15587b['path']!==SKILL_FILE||hasYamlFrontmatter(_0x8a3eff))return _0x15587b;return{'path':_0x15587b['path'],'content':prependSkillFrontmatter(_0x8a3eff,{'name':_0x5300f4,'description':_0x1bddb2['description']?.[_0x43235e(0x137)]()||_0x1bddb2['skillName']?.[_0x43235e(0x137)]()||_0x5300f4})};});}function hasYamlFrontmatter(_0x150101){return/^\uFEFF?---\s*\r?\n/['test'](_0x150101);}function prependSkillFrontmatter(_0x61829d,_0x361e8f){const _0x1a44c9=a76_0x16d29b,_0x4f79ab=_0x61829d[_0x1a44c9(0x185)](/^\uFEFF/,'');return[_0x1a44c9(0x122),_0x1a44c9(0x19c)+yamlString(_0x361e8f[_0x1a44c9(0x136)]),_0x1a44c9(0x12c)+yamlString(_0x361e8f[_0x1a44c9(0x1bd)]),_0x1a44c9(0x122),'',_0x4f79ab][_0x1a44c9(0x1a6)]('\x0a');}function a76_0x122e(){const _0x4f264c=['Runtime\x20Skill\x20manifest\x20is\x20missing\x20','filter','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','keys','contentHash','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','16228YkyBwe','files','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','linkedPaths','sort','isBuffer','Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.\x20Changed\x20file:\x20','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','.claude','builtin','link','skill','isFile','.next','get','split','readonly','env','Managed\x20file\x20was\x20removed\x20locally:\x20','Unsupported\x20runtime\x20Skill\x20scope:\x20','dir','treeSha256','string','from','toString','personal','updated','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','requireOssPath','alloc','appCode','30285zDsCvS','\x20in\x20Skill\x20file\x20package.','writeUInt32LE','fileHashes','1iIhErb','746104URhxkk','source','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','version','replace','hex','CLAUDE_SKILL_ROOT','skillName','\x20or\x20directory\x20name.','manifest','Runtime\x20Skill\x20package\x20has\x20truncated\x20local\x20header:\x20','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20entry.','accessKey','size','writeUInt16LE','.git','isArray','toLowerCase','content','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','update','set','Runtime\x20Skill\x20package\x20local\x20path\x20mismatch:\x20','has','Skill\x20package\x20exceeds\x20size\x20limit.','name:\x20','cache','.svn','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','push','test','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','skillCode','zipSha256','schemaVersion','join','110YuzsJT','pulledAt','agentsSkillsDir','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','code','sha256','lovrabet.skill.json','Runtime\x20Skill\x20package\x20is\x20missing\x20zip\x20central\x20directory.','parse','isDirectory','skillMdPath','.hg','Runtime\x20Skill\x20package\x20uses\x20unsupported\x20multi-disk\x20zip\x20format.','Skill\x20file\x20exceeds\x20size\x20limit:\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','linkedPath','pruneSkillCodes','startsWith','6842638MXBlDY','description','Runtime\x20Skill\x20package\x20','claudeSkillsDir','isSymbolicLink','map','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','tags','homeDir','company','Runtime\x20Skill\x20package\x20has\x20truncated\x20central\x20directory.','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','399UGUesa','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20offsets.','values','not-managed-symlink','object','find','402ulvBvl','build','scope','sourceSessionId','validation','scopes','Runtime\x20Skill\x20package\x20contains\x20encrypted\x20entries.','managedRoot','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20package-backed\x20Skill:\x20','path','Runtime\x20Skill\x20package\x20central\x20directory\x20size\x20mismatch.','created','unchanged','bytes','skills','concat','Skill\x20file\x20size\x20is\x20invalid:\x20','41958jaIaTZ','coverage','length','removed','cacheDir','readUInt16LE','userId','3359398OEPczR','Missing\x20','isSafeInteger','ossPath','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','metadata-mismatch','.DS_Store','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','SKILL_ROOT','subarray','---','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','activeSkillCodes','Runtime\x20Skill\x20package\x20local\x20header\x20mismatch:\x20','slice','stringify','Runtime\x20Skill\x20package\x20CRC\x20mismatch:\x20','Duplicate\x20Skill\x20file\x20path:\x20','Runtime\x20Skill\x20package\x20size\x20mismatch.','description:\x20','digest','paths','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','external-symlink','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','Unsafe\x20Skill\x20file\x20path:\x20','max','dist','localeCompare','name','trim','pushedAt','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','.cache','Runtime\x20Skill\x20package\x20uncompressed\x20size\x20mismatch:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','packageBase64','homeDirName','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','some','\x20does\x20not\x20match\x20backend\x20content:\x20','utf8','zipSize','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','readUInt32LE','endsWith','toISOString','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20data:\x20','node_modules','Runtime\x20Skill\x20package\x20contains\x20unsupported\x20compression\x20method.','57222LHyluZ','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','includes','skipped','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','tenantCode','.tmp'];a76_0x122e=function(){return _0x4f264c;};return a76_0x122e();}function yamlString(_0xf2baf8){const _0x11421c=a76_0x16d29b;return JSON[_0x11421c(0x128)](_0xf2baf8[_0x11421c(0x185)](/\r/g,'')[_0x11421c(0x137)]());}export function linkEffectiveRuntimeSkills(_0xbfefea,_0x1bc0e4,_0x40265a={}){const _0x3e542d=a76_0x16d29b,_0x501c44=new Map();for(const _0x2360f3 of _0xbfefea){const _0x38dcd4=_0x2360f3[_0x3e542d(0x167)]['skillCode'];if(!_0x38dcd4)continue;const _0x49ac75=_0x501c44[_0x3e542d(0x16a)](_0x38dcd4);(!_0x49ac75||_0x2360f3[_0x3e542d(0x1d0)]===_0x3e542d(0x175))&&_0x501c44[_0x3e542d(0x198)](_0x38dcd4,_0x2360f3);}const _0x1d10a7=[],_0x4152cf=resolveSkillSyncPaths(_0x40265a);for(const _0x4f84ab of _0x501c44['values']()){const _0x551958=requireSkillCode(_0x4f84ab[_0x3e542d(0x167)]),_0x2f0f4b=_0x1bc0e4+'--'+_0x551958;for(const _0x169435 of[_0x4152cf[_0x3e542d(0x1a9)],_0x4152cf[_0x3e542d(0x1bf)]]){_0x1d10a7[_0x3e542d(0x1a0)](ensureManagedSymlink(resolve(_0x169435,_0x2f0f4b),_0x4f84ab[_0x3e542d(0x170)],_0x4152cf[_0x3e542d(0x1d5)]));}}return _0x1d10a7;}export function pruneStaleRuntimeSkillLinks(_0x182b6d,_0x172d24,_0x1c1733={},_0x11d54c){const _0x285ce8=a76_0x16d29b,_0xc80356=resolveSkillSyncPaths(_0x1c1733),_0x1aa1a1=new Set([..._0x172d24][_0x285ce8(0x1c1)](_0x57cd5b=>_0x57cd5b['trim']())['filter'](Boolean)),_0x3f2fb3=_0x11d54c?new Set([..._0x11d54c]['map'](_0x4ee5a0=>_0x4ee5a0[_0x285ce8(0x137)]())[_0x285ce8(0x154)](Boolean)):undefined,_0x2050ef=[];for(const _0x1ecf97 of[_0xc80356['agentsSkillsDir'],_0xc80356['claudeSkillsDir']]){for(const _0x4773df of managedAppSkillLinkPaths(_0x1ecf97,_0x182b6d)){const _0x5ca646=basename(_0x4773df)[_0x285ce8(0x127)]((_0x182b6d+'--')[_0x285ce8(0x113)]);if(_0x3f2fb3&&!_0x3f2fb3[_0x285ce8(0x19a)](_0x5ca646))continue;if(_0x1aa1a1[_0x285ce8(0x19a)](_0x5ca646))continue;_0x2050ef['push'](removeManagedSkillLink(_0x4773df,_0xc80356[_0x285ce8(0x1d5)]));}}return _0x2050ef;}export function pruneStaleRuntimeSkillCache(_0x54441e,_0x5432c5={}){const _0x4837d4=a76_0x16d29b,_0x219d87=new Set([..._0x54441e[_0x4837d4(0x125)]][_0x4837d4(0x1c1)](_0x369df0=>_0x369df0['trim']())[_0x4837d4(0x154)](Boolean)),_0x2a67c6=_0x54441e[_0x4837d4(0x1ba)]?new Set([..._0x54441e[_0x4837d4(0x1ba)]][_0x4837d4(0x1c1)](_0x4848b7=>_0x4848b7['trim']())['filter'](Boolean)):undefined,_0xaa44e=_0x54441e[_0x4837d4(0x1d3)]??[_0x4837d4(0x175),_0x4837d4(0x1c5)],_0x55f7fa=resolve(getRuntimeSkillCacheRoot(_0x54441e['env'],_0x54441e[_0x4837d4(0x18f)],_0x5432c5),safePathSegment(_0x54441e[_0x4837d4(0x17a)],_0x4837d4(0x17a))),_0x1f0af0=[];for(const _0x4dbc3d of _0xaa44e){const _0x5f3ab2=resolve(_0x55f7fa,_0x4dbc3d);if(!existsSync(_0x5f3ab2))continue;for(const _0x2267e8 of readdirSync(_0x5f3ab2,{'withFileTypes':!![]})){if(!_0x2267e8[_0x4837d4(0x1b0)]())continue;const _0xc953ae=_0x2267e8[_0x4837d4(0x136)];if(_0x2a67c6&&!_0x2a67c6['has'](_0xc953ae))continue;if(_0x219d87[_0x4837d4(0x19a)](_0xc953ae))continue;const _0x679577=resolve(_0x5f3ab2,_0xc953ae),_0xc8b9e7=readMetadataIfPresent(resolve(_0x679577,METADATA_FILE));if(_0xc8b9e7?.[_0x4837d4(0x17a)]!==_0x54441e[_0x4837d4(0x17a)]||_0xc8b9e7['scope']!==_0x4dbc3d||_0xc8b9e7['skillCode']!==_0xc953ae){_0x1f0af0[_0x4837d4(0x1a0)]({'path':_0x679577,'action':_0x4837d4(0x14f),'reason':_0x4837d4(0x11d)});continue;}rmSync(_0x679577,{'recursive':!![],'force':!![]}),_0x1f0af0[_0x4837d4(0x1a0)]({'path':_0x679577,'action':_0x4837d4(0x114)});}}return _0x1f0af0;}export function linkGlobalRuntimeSkills(_0x33f31,_0x9de498={}){const _0x5b0ded=a76_0x16d29b,_0x493bdb=resolveSkillSyncPaths(_0x9de498),_0x46befb=[];for(const _0x14fe75 of _0x33f31){if(_0x14fe75[_0x5b0ded(0x1d0)]!==_0x5b0ded(0x165))throw CliErrors[_0x5b0ded(0x1d2)](_0x5b0ded(0x139)+_0x14fe75[_0x5b0ded(0x1d0)]);const _0x1d45f8=requireSkillCode(_0x14fe75[_0x5b0ded(0x167)]),_0x1fa68f=copyManagedSkillDirectory(_0x14fe75['dir'],resolve(_0x493bdb[_0x5b0ded(0x1a9)],_0x1d45f8));_0x46befb['push']({..._0x1fa68f,'contentHash':_0x14fe75[_0x5b0ded(0x157)]});}return _0x46befb;}export function readPushDirectory(_0x3ed17f,_0x2259f6){const _0x221078=a76_0x16d29b,_0x3aa8e3=resolve(_0x3ed17f);if(!existsSync(_0x3aa8e3)||!lstatSync(_0x3aa8e3)[_0x221078(0x1b0)]())throw CliErrors[_0x221078(0x1d2)]('Skill\x20directory\x20not\x20found:\x20'+_0x3ed17f);const _0x2380fd=resolve(_0x3aa8e3,SKILL_FILE);if(!existsSync(_0x2380fd)||!lstatSync(_0x2380fd)[_0x221078(0x168)]())throw CliErrors[_0x221078(0x1d2)](_0x221078(0x119)+SKILL_FILE+':\x20'+_0x2380fd);const _0x20f15f=readMetadataIfPresent(resolve(_0x3aa8e3,METADATA_FILE));if(_0x20f15f?.['scope']&&_0x20f15f[_0x221078(0x1d0)]!==_0x221078(0x175))throw CliErrors[_0x221078(0x1d2)](_0x221078(0x13f)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x20f15f[_0x221078(0x1d0)]+'\x22.');if(_0x20f15f?.[_0x221078(0x17a)]&&_0x20f15f[_0x221078(0x17a)]!==_0x2259f6)throw CliErrors[_0x221078(0x1d2)]('Skill\x20metadata\x20appCode\x20\x22'+_0x20f15f[_0x221078(0x17a)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x2259f6+'\x22.');const _0x25f8af=scanSkillDirectory(_0x3aa8e3),_0x2646af=buildSkillPackage(_0x25f8af),_0x2438f5=readFileSync(_0x2380fd,'utf8'),_0x372d63=_0x20f15f?.[_0x221078(0x1a3)]??deriveSkillCodeFromDirectory(_0x3aa8e3,_0x2259f6);if(!_0x372d63)throw CliErrors[_0x221078(0x1d2)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+_0x221078(0x189));return{'skillCode':_0x372d63,'metadata':_0x20f15f,'input':{'skillCode':_0x372d63,'skillName':_0x20f15f?.[_0x221078(0x188)],'description':_0x20f15f?.['description'],'content':_0x2438f5,'files':_0x2646af[_0x221078(0x18a)],'packageBase64':_0x2646af[_0x221078(0x13d)],'tags':_0x20f15f?.[_0x221078(0x1c3)],'version':_0x20f15f?.[_0x221078(0x184)],'sourceSessionId':_0x20f15f?.[_0x221078(0x1d1)]}};}export function recordPushedRuntimeSkill(_0x46e4ea,_0x470a3b,_0x586096,_0x12e058={}){const _0x2f2263=a76_0x16d29b,_0x53855b=resolve(_0x46e4ea),_0xe7850d=scanSkillDirectory(_0x53855b),_0x10ecf5=_0xe7850d[_0x2f2263(0x1cd)](_0x3fface=>_0x3fface[_0x2f2263(0x1d7)]===SKILL_FILE),_0x3205f2=_0x10ecf5?fileText(_0x10ecf5):'',_0x11ddf9=tryNormalizeRemoteManifest(_0x470a3b[_0x2f2263(0x15a)]),_0x47a0e7={..._0x470a3b,'content':_0x470a3b[_0x2f2263(0x195)]??_0x3205f2,'files':_0x11ddf9},_0x2826c5=_0x11ddf9?normalizeLocalFiles(_0xe7850d)['filter'](_0x35ae63=>_0x11ddf9[_0x2f2263(0x15a)][_0x2f2263(0x140)](_0x29d59e=>_0x29d59e[_0x2f2263(0x1d7)]===_0x35ae63[_0x2f2263(0x1d7)])):undefined,_0x4168ea=buildMetadata(_0x47a0e7,_0x12e058[_0x2f2263(0x1d0)]??_0x2f2263(0x175),_0x586096,contentHash(_0x47a0e7[_0x2f2263(0x195)]??''),_0x12e058[_0x2f2263(0x138)],_0x2826c5);writeJsonAtomic(resolve(_0x53855b,METADATA_FILE),_0x4168ea);}export function deriveSkillCodeFromDirectory(_0x18d584,_0x26f946){const _0x1ef300=a76_0x16d29b,_0x18ed9a=basename(resolve(_0x18d584)),_0x4ad36f=_0x26f946+'--';return _0x18ed9a[_0x1ef300(0x1bb)](_0x4ad36f)?_0x18ed9a[_0x1ef300(0x127)](_0x4ad36f['length']):_0x18ed9a;}export function readMetadataIfPresent(_0x1c5586){const _0x1bf702=a76_0x16d29b;if(!existsSync(_0x1c5586))return undefined;try{const _0x4c669b=JSON[_0x1bf702(0x1af)](readFileSync(_0x1c5586,_0x1bf702(0x142)));return _0x4c669b;}catch{throw CliErrors['validation']('Invalid\x20'+METADATA_FILE+':\x20'+_0x1c5586);}}function normalizeRuntimeSkillScopes(_0xd75494){const _0x589373=a76_0x16d29b,_0x4cb18d=_0xd75494&&_0xd75494[_0x589373(0x113)]>0x0?_0xd75494:[_0x589373(0x175),_0x589373(0x1c5),'builtin'],_0x2a9480=[];for(const _0x290110 of _0x4cb18d){if(!isRuntimeSkillScope(_0x290110))throw CliErrors['validation'](_0x589373(0x16f)+_0x290110);!_0x2a9480[_0x589373(0x14e)](_0x290110)&&_0x2a9480['push'](_0x290110);}return _0x2a9480;}function isRuntimeSkillScope(_0x140352){const _0x53b334=a76_0x16d29b;return _0x140352==='personal'||_0x140352===_0x53b334(0x1c5)||_0x140352===_0x53b334(0x165);}function localSkillEntryDirs(_0x482b50){const _0x2f73f5=a76_0x16d29b;if(!existsSync(_0x482b50))return[];return readdirSync(_0x482b50,{'withFileTypes':!![]})[_0x2f73f5(0x154)](_0x2df2bf=>_0x2df2bf['isDirectory']()||_0x2df2bf[_0x2f73f5(0x1c0)]())[_0x2f73f5(0x1c1)](_0x3b0f31=>resolve(_0x482b50,_0x3b0f31[_0x2f73f5(0x136)]));}function localSkillLinkCandidates(_0xd026d9,_0x514ad2,_0x52d55b){const _0x141f2e=a76_0x16d29b;if(!existsSync(_0xd026d9))return[];const _0x3ebaf2=_0x514ad2+'--';return readdirSync(_0xd026d9,{'withFileTypes':!![]})['filter'](_0x599cbf=>_0x599cbf[_0x141f2e(0x1b0)]()||_0x599cbf[_0x141f2e(0x1c0)]())[_0x141f2e(0x154)](_0x562d46=>_0x562d46[_0x141f2e(0x136)]['startsWith'](_0x3ebaf2)||_0x52d55b[_0x141f2e(0x19a)](_0x141f2e(0x165)))[_0x141f2e(0x1c1)](_0x5cb32b=>resolve(_0xd026d9,_0x5cb32b[_0x141f2e(0x136)]));}function collectLocalRuntimeSkill(_0x645c93,_0x130f59,_0x4c6824){const _0x5e7779=a76_0x16d29b,_0x43d350=resolve(_0x130f59,METADATA_FILE),_0x535964=readMetadataIfPresent(_0x43d350);if(!_0x535964)return;if(_0x535964[_0x5e7779(0x17a)]!==_0x4c6824[_0x5e7779(0x17a)])return;if(!isRuntimeSkillScope(_0x535964['scope'])||!_0x4c6824['scopes']['has'](_0x535964[_0x5e7779(0x1d0)]))return;const _0x18ba68=_0x535964[_0x5e7779(0x1a3)]?.[_0x5e7779(0x137)]();if(!_0x18ba68)return;if(_0x4c6824[_0x5e7779(0x1ab)]&&_0x18ba68!==_0x4c6824[_0x5e7779(0x1ab)])return;const _0x37c436=_0x535964[_0x5e7779(0x1d0)]+':'+_0x18ba68,_0x2e4a46=_0x4c6824[_0x5e7779(0x1b9)]?[_0x4c6824[_0x5e7779(0x1b9)]]:[],_0x5b93bf=_0x645c93[_0x5e7779(0x16a)](_0x37c436);if(_0x5b93bf){_0x4c6824[_0x5e7779(0x181)]===_0x5e7779(0x19d)&&(_0x5b93bf[_0x5e7779(0x170)]=_0x130f59,_0x5b93bf[_0x5e7779(0x115)]=_0x130f59,_0x5b93bf[_0x5e7779(0x1b1)]=resolve(_0x130f59,SKILL_FILE),_0x5b93bf['metadataPath']=_0x43d350);for(const _0x2119df of _0x2e4a46){!_0x5b93bf[_0x5e7779(0x15f)][_0x5e7779(0x14e)](_0x2119df)&&_0x5b93bf[_0x5e7779(0x15f)][_0x5e7779(0x1a0)](_0x2119df);}_0x5b93bf[_0x5e7779(0x15f)][_0x5e7779(0x160)]();return;}_0x645c93[_0x5e7779(0x198)](_0x37c436,{..._0x535964,'tags':Array[_0x5e7779(0x193)](_0x535964[_0x5e7779(0x1c3)])?_0x535964[_0x5e7779(0x1c3)]:[],'scope':_0x535964['scope'],'source':'local','dir':_0x130f59,'cacheDir':_0x4c6824[_0x5e7779(0x181)]===_0x5e7779(0x19d)?_0x130f59:undefined,'skillMdPath':resolve(_0x130f59,SKILL_FILE),'metadataPath':_0x43d350,'linkedPaths':_0x2e4a46});}function compareLocalRuntimeSkills(_0x4c87c7,_0x185267){const _0x50e1b6=a76_0x16d29b,_0x27d743={'personal':0x0,'company':0x1,'builtin':0x2};return _0x27d743[_0x4c87c7[_0x50e1b6(0x1d0)]]-_0x27d743[_0x185267[_0x50e1b6(0x1d0)]]||_0x4c87c7[_0x50e1b6(0x1a3)]['localeCompare'](_0x185267[_0x50e1b6(0x1a3)])||_0x4c87c7[_0x50e1b6(0x170)][_0x50e1b6(0x135)](_0x185267['dir']);}function buildMetadata(_0x49be8c,_0x38764e,_0x1c98a7,_0x43819f,_0x43e573,_0x4fc112){const _0x3bd926=a76_0x16d29b,_0x18fc58=_0x4fc112?normalizeLocalFiles(_0x4fc112):[],_0x460ccd=normalizeRemoteManifest(_0x49be8c[_0x3bd926(0x15a)]),_0x181fd9=_0x18fc58[_0x3bd926(0x113)]>0x0?Object['fromEntries'](_0x18fc58[_0x3bd926(0x1c1)](_0x5392a0=>[_0x5392a0[_0x3bd926(0x1d7)],fileHash(_0x5392a0)])):undefined;return{'schemaVersion':_0x18fc58[_0x3bd926(0x113)]>0x0?0x2:0x1,'id':_0x49be8c['id'],'appCode':_0x1c98a7,'skillCode':requireSkillCode(_0x49be8c),'skillName':_0x49be8c[_0x3bd926(0x188)],'description':_0x49be8c[_0x3bd926(0x1bd)],'scope':_0x38764e,'readonly':_0x38764e!==_0x3bd926(0x175)||_0x49be8c[_0x3bd926(0x16c)]===!![],'tenantCode':_0x49be8c[_0x3bd926(0x151)],'userId':_0x49be8c[_0x3bd926(0x117)],'version':_0x49be8c[_0x3bd926(0x184)],'status':_0x49be8c['status'],'tags':Array[_0x3bd926(0x193)](_0x49be8c['tags'])?_0x49be8c[_0x3bd926(0x1c3)]:[],'hasUpstreamUpdate':_0x49be8c['hasUpstreamUpdate'],'forkedFromSkillId':_0x49be8c[_0x3bd926(0x14c)],'forkedFromVersion':_0x49be8c['forkedFromVersion'],'sourceSessionId':_0x49be8c[_0x3bd926(0x1d1)],'contentHash':_0x43819f,'fileHashes':_0x181fd9,'treeHash':_0x18fc58[_0x3bd926(0x113)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x18fc58)):_0x460ccd?.[_0x3bd926(0x171)],'ossPath':_0x460ccd?.[_0x3bd926(0x11b)],'zipSha256':_0x460ccd?.[_0x3bd926(0x1a4)],'zipSize':_0x460ccd?.[_0x3bd926(0x143)],'files':_0x18fc58[_0x3bd926(0x113)]>0x0?_0x18fc58[_0x3bd926(0x1c1)](_0x1559cf=>({'path':_0x1559cf['path'],'hash':fileHash(_0x1559cf),'size':fileContent(_0x1559cf)[_0x3bd926(0x113)]})):undefined,'pulledAt':_0x43e573??new Date()[_0x3bd926(0x147)]()};}function requireSkillCode(_0x383fad){const _0x140d09=a76_0x16d29b,_0x96ce5e=_0x383fad['skillCode']?.['trim']();if(!_0x96ce5e)throw CliErrors[_0x140d09(0x1d2)](_0x140d09(0x14d));return _0x96ce5e;}function trimmedEnv(_0x33cc57){const _0x1dc5e5=a76_0x16d29b,_0x34a27e=productEnv(_0x33cc57)?.[_0x1dc5e5(0x137)]();return _0x34a27e?_0x34a27e:undefined;}function safePathSegment(_0x1be39b,_0x16e925='path\x20segment'){const _0x2ddd5d=a76_0x16d29b;if(!_0x1be39b||_0x1be39b[_0x2ddd5d(0x14e)]('/')||_0x1be39b['includes']('\x5c')||_0x1be39b[_0x2ddd5d(0x14e)]('..'))throw CliErrors['validation']('Unsafe\x20'+_0x16e925+'\x20for\x20local\x20path:\x20'+_0x1be39b);return _0x1be39b;}function ensurePulledFilesCanBeOverwritten(_0x448dc9,_0xd4dc33,_0x10de7d,_0x2b5a98){const _0x36269e=a76_0x16d29b;if(_0x2b5a98||!existsSync(_0xd4dc33))return;const _0x333eee=readMetadataIfPresent(_0xd4dc33);if(!_0x333eee)return;const _0xc4fd22=_0x333eee['fileHashes']&&Object[_0x36269e(0x156)](_0x333eee[_0x36269e(0x17e)])[_0x36269e(0x113)]>0x0?_0x333eee[_0x36269e(0x17e)]:undefined;if(_0xc4fd22)for(const [_0x52918d,_0x36fe5b]of Object['entries'](_0xc4fd22)){const _0x40b950=resolveManagedFilePath(_0x448dc9,_0x52918d);if(!existsSync(_0x40b950))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x448dc9,_0x36269e(0x16e)+_0x52918d);const _0x1b27a4=lstatSync(_0x40b950);if(!_0x1b27a4[_0x36269e(0x168)]())throw CliErrors['validation'](_0x36269e(0x196)+_0x448dc9,_0x36269e(0x177)+_0x52918d);const _0x30e511=bufferSha256(readFileSync(_0x40b950));if(_0x30e511!==_0x36fe5b)throw CliErrors[_0x36269e(0x1d2)](_0x36269e(0x196)+_0x448dc9+'.\x20Changed\x20file:\x20'+_0x52918d,_0x36269e(0x162)+_0x52918d);}else{const _0x15c5d5=resolve(_0x448dc9,SKILL_FILE);if(existsSync(_0x15c5d5)&&_0x333eee[_0x36269e(0x157)]){const _0x27b26b=contentHash(readFileSync(_0x15c5d5,_0x36269e(0x142)));if(_0x27b26b!==_0x333eee[_0x36269e(0x157)])throw CliErrors['validation'](_0x36269e(0x1b8)+_0x15c5d5,'Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.');}}for(const _0x3068de of normalizeLocalFiles(_0x10de7d)){if(_0xc4fd22?.[_0x3068de[_0x36269e(0x1d7)]])continue;if(!_0xc4fd22&&_0x3068de[_0x36269e(0x1d7)]===SKILL_FILE)continue;const _0x1937f4=resolveManagedFilePath(_0x448dc9,_0x3068de[_0x36269e(0x1d7)]);if(!existsSync(_0x1937f4))continue;const _0x8be7ae=lstatSync(_0x1937f4);if(!_0x8be7ae[_0x36269e(0x168)]())throw CliErrors[_0x36269e(0x1d2)](_0x36269e(0x196)+_0x448dc9,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x3068de[_0x36269e(0x1d7)]);const _0x1cf548=bufferSha256(readFileSync(_0x1937f4));if(_0x1cf548!==fileHash(_0x3068de))throw CliErrors[_0x36269e(0x1d2)](_0x36269e(0x196)+_0x448dc9,_0x36269e(0x15b)+_0x3068de[_0x36269e(0x1d7)]);}}function scanSkillDirectory(_0x311773){const _0x4a1d41=realOrResolved(_0x311773),_0x166dcd=[];let _0xc5521b=0x0;function _0x36ff06(_0x463a5c){const _0x385e1b=a76_0x55f5,_0x27f56d=readdirSync(_0x463a5c,{'withFileTypes':!![]})[_0x385e1b(0x160)]((_0x1e8ac4,_0x261c7b)=>_0x1e8ac4[_0x385e1b(0x136)][_0x385e1b(0x135)](_0x261c7b[_0x385e1b(0x136)]));for(const _0x11a840 of _0x27f56d){if(_0x11a840['isDirectory']()&&IGNORED_DIR_NAMES[_0x385e1b(0x19a)](_0x11a840['name']))continue;if(IGNORED_FILE_NAMES[_0x385e1b(0x19a)](_0x11a840[_0x385e1b(0x136)]))continue;const _0x14c614=resolve(_0x463a5c,_0x11a840[_0x385e1b(0x136)]);if(_0x11a840[_0x385e1b(0x1c0)]())throw CliErrors[_0x385e1b(0x1d2)](_0x385e1b(0x13c)+_0x14c614);const _0x5899e8=toPosixPath(relative(_0x4a1d41,_0x14c614));if(_0x11a840[_0x385e1b(0x1b0)]()){_0x36ff06(_0x14c614);continue;}if(!_0x11a840[_0x385e1b(0x168)]())continue;validateSkillRelativePath(_0x5899e8);const _0x2f206d=readFileSync(_0x14c614);if(_0x2f206d[_0x385e1b(0x113)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x385e1b(0x1d2)](_0x385e1b(0x1b4)+_0x5899e8);_0xc5521b+=_0x2f206d['length'];if(_0xc5521b>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x385e1b(0x1d2)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x166dcd[_0x385e1b(0x1a0)]({'path':_0x5899e8,'bytes':_0x2f206d});if(_0x166dcd[_0x385e1b(0x113)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x385e1b(0x1d2)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');}}return _0x36ff06(_0x4a1d41),normalizeLocalFiles(_0x166dcd);}function normalizeLocalFiles(_0xcb767a){const _0x554b55=a76_0x16d29b;if(!Array[_0x554b55(0x193)](_0xcb767a)||_0xcb767a[_0x554b55(0x113)]===0x0)return[];if(_0xcb767a[_0x554b55(0x113)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x554b55(0x1d2)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x1dd530=new Map();let _0x19e6f6=0x0;for(const _0x5c3c01 of _0xcb767a){if(!_0x5c3c01||typeof _0x5c3c01!==_0x554b55(0x1cc)||typeof _0x5c3c01[_0x554b55(0x1d7)]!==_0x554b55(0x172))throw CliErrors[_0x554b55(0x1d2)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1af9b1=normalizeSkillRelativePath(_0x5c3c01[_0x554b55(0x1d7)]);if(_0x1dd530[_0x554b55(0x19a)](_0x1af9b1))throw CliErrors[_0x554b55(0x1d2)](_0x554b55(0x12a)+_0x1af9b1);if(_0x5c3c01[_0x554b55(0x1db)]!==undefined&&!Buffer[_0x554b55(0x161)](_0x5c3c01[_0x554b55(0x1db)]))throw CliErrors[_0x554b55(0x1d2)](_0x554b55(0x1c7)+_0x1af9b1);if(_0x5c3c01[_0x554b55(0x1db)]===undefined&&typeof _0x5c3c01['content']!=='string')throw CliErrors[_0x554b55(0x1d2)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x1af9b1);const _0x3c9b17=fileContent(_0x5c3c01),_0x41dc3a=_0x3c9b17[_0x554b55(0x113)];if(_0x41dc3a>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x554b55(0x1d2)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0x1af9b1);_0x19e6f6+=_0x41dc3a;if(_0x19e6f6>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x554b55(0x1d2)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x1dd530[_0x554b55(0x198)](_0x1af9b1,{'path':_0x1af9b1,'bytes':_0x3c9b17});}return Array[_0x554b55(0x173)](_0x1dd530[_0x554b55(0x1ca)]())[_0x554b55(0x160)](compareSkillFiles);}function normalizeManifestFiles(_0x54446d){const _0x5a6e9e=a76_0x16d29b;if(!Array[_0x5a6e9e(0x193)](_0x54446d)||_0x54446d[_0x5a6e9e(0x113)]===0x0)return[];if(_0x54446d[_0x5a6e9e(0x113)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5a6e9e(0x1d2)](_0x5a6e9e(0x12f));const _0x476892=new Map();let _0x788ca4=0x0;for(const _0x4b45a4 of _0x54446d){if(!_0x4b45a4||typeof _0x4b45a4!==_0x5a6e9e(0x1cc)||typeof _0x4b45a4[_0x5a6e9e(0x1d7)]!==_0x5a6e9e(0x172))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x21333d=normalizeSkillRelativePath(_0x4b45a4[_0x5a6e9e(0x1d7)]);if(_0x476892[_0x5a6e9e(0x19a)](_0x21333d))throw CliErrors[_0x5a6e9e(0x1d2)](_0x5a6e9e(0x12a)+_0x21333d);if(!isSha256Hex(_0x4b45a4['sha256']))throw CliErrors['validation'](_0x5a6e9e(0x15c)+_0x21333d);if(!Number[_0x5a6e9e(0x11a)](_0x4b45a4[_0x5a6e9e(0x190)])||_0x4b45a4[_0x5a6e9e(0x190)]<0x0)throw CliErrors[_0x5a6e9e(0x1d2)](_0x5a6e9e(0x1de)+_0x21333d);if(_0x4b45a4[_0x5a6e9e(0x190)]>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x5a6e9e(0x1b4)+_0x21333d);_0x788ca4+=_0x4b45a4['size'];if(_0x788ca4>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x5a6e9e(0x1d2)](_0x5a6e9e(0x155));_0x476892[_0x5a6e9e(0x198)](_0x21333d,{'path':_0x21333d,'sha256':_0x4b45a4['sha256'][_0x5a6e9e(0x194)](),'size':_0x4b45a4[_0x5a6e9e(0x190)]});}return Array['from'](_0x476892[_0x5a6e9e(0x1ca)]())[_0x5a6e9e(0x160)](compareSkillFiles);}function normalizeRemoteManifest(_0x11721d){return normalizePackageManifest(_0x11721d,{'requireOssPath':!![]});}function normalizePackageManifest(_0x418f5e,_0x2590bd){const _0x4da729=a76_0x16d29b;if(!_0x418f5e||typeof _0x418f5e!==_0x4da729(0x1cc)||Array[_0x4da729(0x193)](_0x418f5e))return undefined;const _0x3d9b9d=_0x418f5e,_0x457f2c=typeof _0x3d9b9d[_0x4da729(0x11b)]===_0x4da729(0x172)?_0x3d9b9d[_0x4da729(0x11b)]['trim']():undefined;if(_0x2590bd[_0x4da729(0x178)]&&!_0x457f2c)return undefined;if(!Array[_0x4da729(0x193)](_0x3d9b9d[_0x4da729(0x15a)])||_0x3d9b9d[_0x4da729(0x15a)][_0x4da729(0x113)]===0x0)return undefined;if(!isSha256Hex(_0x3d9b9d[_0x4da729(0x171)]))throw CliErrors[_0x4da729(0x1d2)](_0x4da729(0x1a2));if(!isSha256Hex(_0x3d9b9d[_0x4da729(0x1a4)]))throw CliErrors[_0x4da729(0x1d2)](_0x4da729(0x1b5));if(!Number[_0x4da729(0x11a)](_0x3d9b9d[_0x4da729(0x143)])||_0x3d9b9d[_0x4da729(0x143)]<0x0)throw CliErrors[_0x4da729(0x1d2)](_0x4da729(0x182));if(_0x3d9b9d[_0x4da729(0x143)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4da729(0x1d2)](_0x4da729(0x123));const _0x526105=normalizeManifestFiles(_0x3d9b9d[_0x4da729(0x15a)]);if(!_0x526105[_0x4da729(0x140)](_0x40de8f=>_0x40de8f['path']===SKILL_FILE))throw CliErrors[_0x4da729(0x1d2)](_0x4da729(0x153)+SKILL_FILE+'.');const _0x5efb7b=fileTreeHash(_0x526105);if(_0x5efb7b!==_0x3d9b9d['treeSha256'][_0x4da729(0x194)]())throw CliErrors[_0x4da729(0x1d2)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x4da729(0x11a)](_0x3d9b9d[_0x4da729(0x1a5)])?_0x3d9b9d['schemaVersion']:0x2,'ossPath':_0x457f2c,'treeSha256':_0x5efb7b,'zipSha256':_0x3d9b9d[_0x4da729(0x1a4)]['toLowerCase'](),'zipSize':_0x3d9b9d['zipSize'],'files':_0x526105};}function tryNormalizeRemoteManifest(_0x6605ef){return normalizeRemoteManifest(_0x6605ef);}function requirePackageBytes(_0x4a3d2a,_0x287483){const _0x2eaddf=a76_0x16d29b;if(!_0x287483||_0x287483['length']===0x0)throw CliErrors['validation'](_0x2eaddf(0x1d6)+_0x4a3d2a);if(_0x287483['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x2eaddf(0x144)+_0x4a3d2a);return _0x287483;}function localFilesToManifestFiles(_0x54616d){const _0x5c8385=a76_0x16d29b;return normalizeLocalFiles(_0x54616d)[_0x5c8385(0x1c1)](_0x3a455d=>({'path':_0x3a455d[_0x5c8385(0x1d7)],'sha256':fileHash(_0x3a455d),'size':fileContent(_0x3a455d)[_0x5c8385(0x113)]}));}function isSha256Hex(_0x9df37b){const _0xe42458=a76_0x16d29b;return typeof _0x9df37b===_0xe42458(0x172)&&/^[a-fA-F0-9]{64}$/[_0xe42458(0x1a1)](_0x9df37b);}function extractAndVerifyPackage(_0x11b381,_0xa68be2){const _0x3e50cd=a76_0x16d29b,_0x5d1055=normalizePackageManifest(_0x11b381,{'requireOssPath':![]});if(!_0x5d1055)throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x11f));if(_0xa68be2[_0x3e50cd(0x113)]!==_0x5d1055['zipSize'])throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x12b));const _0xd951ec=bufferSha256(_0xa68be2);if(_0xd951ec!==_0x5d1055['zipSha256'])throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x19f));const _0x4b35a9=parseZipPackage(_0xa68be2);if(_0x4b35a9['length']!==_0x5d1055['files'][_0x3e50cd(0x113)])throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x158));const _0x35b951=new Map();for(const _0x11548c of _0x4b35a9){if(_0x35b951[_0x3e50cd(0x19a)](_0x11548c[_0x3e50cd(0x1d7)]))throw CliErrors[_0x3e50cd(0x1d2)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x11548c['path']);_0x35b951[_0x3e50cd(0x198)](_0x11548c[_0x3e50cd(0x1d7)],_0x11548c);}const _0x510cf9=[];for(const _0x5ed518 of _0x5d1055['files']){const _0x28b6b4=_0x35b951[_0x3e50cd(0x16a)](_0x5ed518[_0x3e50cd(0x1d7)]);if(!_0x28b6b4)throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x1aa)+_0x5ed518[_0x3e50cd(0x1d7)]);if(_0x28b6b4[_0x3e50cd(0x1db)]['length']!==_0x5ed518[_0x3e50cd(0x190)])throw CliErrors[_0x3e50cd(0x1d2)](_0x3e50cd(0x15e)+_0x5ed518['path']);const _0x4328e4=bufferSha256(_0x28b6b4[_0x3e50cd(0x1db)]);if(_0x4328e4!==_0x5ed518[_0x3e50cd(0x1ac)])throw CliErrors['validation'](_0x3e50cd(0x15d)+_0x5ed518[_0x3e50cd(0x1d7)]);_0x510cf9[_0x3e50cd(0x1a0)]({'path':_0x5ed518[_0x3e50cd(0x1d7)],'bytes':_0x28b6b4[_0x3e50cd(0x1db)]});}return normalizeLocalFiles(_0x510cf9);}function createDeterministicZipPackage(_0x2504d3){const _0x4ca47e=a76_0x16d29b,_0x397e58=normalizeLocalFiles(_0x2504d3),_0x539bca=[],_0x35fb38=[];let _0xf58b50=0x0;for(const _0x2edadf of _0x397e58){const _0x57867f=Buffer[_0x4ca47e(0x173)](_0x2edadf['path'],_0x4ca47e(0x142)),_0x1c5fdc=fileContent(_0x2edadf),_0x1ed763=crc32(_0x1c5fdc),_0xe9f32b=Buffer['alloc'](0x1e+_0x57867f[_0x4ca47e(0x113)]);_0xe9f32b[_0x4ca47e(0x17d)](ZIP_LOCAL_FILE_HEADER_SIGNATURE,0x0),_0xe9f32b['writeUInt16LE'](0x14,0x4),_0xe9f32b[_0x4ca47e(0x191)](ZIP_GENERAL_PURPOSE_UTF8,0x6),_0xe9f32b[_0x4ca47e(0x191)](ZIP_METHOD_STORE,0x8),_0xe9f32b[_0x4ca47e(0x191)](ZIP_FIXED_DOS_TIME,0xa),_0xe9f32b[_0x4ca47e(0x191)](ZIP_FIXED_DOS_DATE,0xc),_0xe9f32b[_0x4ca47e(0x17d)](_0x1ed763,0xe),_0xe9f32b[_0x4ca47e(0x17d)](_0x1c5fdc[_0x4ca47e(0x113)],0x12),_0xe9f32b[_0x4ca47e(0x17d)](_0x1c5fdc[_0x4ca47e(0x113)],0x16),_0xe9f32b[_0x4ca47e(0x191)](_0x57867f[_0x4ca47e(0x113)],0x1a),_0xe9f32b[_0x4ca47e(0x191)](0x0,0x1c),_0x57867f['copy'](_0xe9f32b,0x1e),_0x539bca[_0x4ca47e(0x1a0)](_0xe9f32b,_0x1c5fdc);const _0x1a20c0=Buffer[_0x4ca47e(0x179)](0x2e+_0x57867f['length']);_0x1a20c0['writeUInt32LE'](ZIP_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x1a20c0[_0x4ca47e(0x191)](0x14,0x4),_0x1a20c0[_0x4ca47e(0x191)](0x14,0x6),_0x1a20c0[_0x4ca47e(0x191)](ZIP_GENERAL_PURPOSE_UTF8,0x8),_0x1a20c0[_0x4ca47e(0x191)](ZIP_METHOD_STORE,0xa),_0x1a20c0[_0x4ca47e(0x191)](ZIP_FIXED_DOS_TIME,0xc),_0x1a20c0['writeUInt16LE'](ZIP_FIXED_DOS_DATE,0xe),_0x1a20c0[_0x4ca47e(0x17d)](_0x1ed763,0x10),_0x1a20c0['writeUInt32LE'](_0x1c5fdc['length'],0x14),_0x1a20c0[_0x4ca47e(0x17d)](_0x1c5fdc[_0x4ca47e(0x113)],0x18),_0x1a20c0[_0x4ca47e(0x191)](_0x57867f['length'],0x1c),_0x1a20c0[_0x4ca47e(0x191)](0x0,0x1e),_0x1a20c0['writeUInt16LE'](0x0,0x20),_0x1a20c0[_0x4ca47e(0x191)](0x0,0x22),_0x1a20c0[_0x4ca47e(0x191)](0x0,0x24),_0x1a20c0['writeUInt32LE'](0x0,0x26),_0x1a20c0[_0x4ca47e(0x17d)](_0xf58b50,0x2a),_0x57867f['copy'](_0x1a20c0,0x2e),_0x35fb38[_0x4ca47e(0x1a0)](_0x1a20c0),_0xf58b50+=_0xe9f32b[_0x4ca47e(0x113)]+_0x1c5fdc[_0x4ca47e(0x113)];}const _0x456313=Buffer[_0x4ca47e(0x1dd)](_0x35fb38),_0x396e5b=_0xf58b50,_0xf50547=_0x456313[_0x4ca47e(0x113)],_0xb5452d=Buffer['alloc'](0x16);_0xb5452d[_0x4ca47e(0x17d)](ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0xb5452d[_0x4ca47e(0x191)](0x0,0x4),_0xb5452d[_0x4ca47e(0x191)](0x0,0x6),_0xb5452d[_0x4ca47e(0x191)](_0x397e58[_0x4ca47e(0x113)],0x8),_0xb5452d[_0x4ca47e(0x191)](_0x397e58[_0x4ca47e(0x113)],0xa),_0xb5452d[_0x4ca47e(0x17d)](_0xf50547,0xc),_0xb5452d[_0x4ca47e(0x17d)](_0x396e5b,0x10),_0xb5452d[_0x4ca47e(0x191)](0x0,0x14);const _0x23e94c=Buffer[_0x4ca47e(0x1dd)]([..._0x539bca,_0x456313,_0xb5452d]);if(_0x23e94c['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4ca47e(0x1d2)](_0x4ca47e(0x19b));return _0x23e94c;}function parseZipPackage(_0x4448c5){const _0x34429f=a76_0x16d29b;if(_0x4448c5[_0x34429f(0x113)]<0x16)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1b6));const _0x5bae6f=findEndOfCentralDirectory(_0x4448c5);if(_0x5bae6f<0x0)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1ae));const _0x5977bb=_0x4448c5[_0x34429f(0x116)](_0x5bae6f+0x4),_0x583222=_0x4448c5[_0x34429f(0x116)](_0x5bae6f+0x6),_0x2f67a8=_0x4448c5[_0x34429f(0x116)](_0x5bae6f+0xa),_0x5e4833=_0x4448c5[_0x34429f(0x145)](_0x5bae6f+0xc),_0x15aa2b=_0x4448c5[_0x34429f(0x145)](_0x5bae6f+0x10);if(_0x5977bb!==0x0||_0x583222!==0x0)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1b3));if(_0x2f67a8>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x18c));if(_0x15aa2b+_0x5e4833>_0x5bae6f||_0x15aa2b>=_0x4448c5[_0x34429f(0x113)])throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1c9));const _0x3516d4=[];let _0x56d597=0x0,_0x3389e2=_0x15aa2b;for(let _0x3adbd7=0x0;_0x3adbd7<_0x2f67a8;_0x3adbd7+=0x1){if(_0x3389e2+0x2e>_0x4448c5[_0x34429f(0x113)])throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1c6));if(_0x4448c5[_0x34429f(0x145)](_0x3389e2)!==ZIP_CENTRAL_DIRECTORY_SIGNATURE)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x18e));const _0x484d7d=_0x4448c5[_0x34429f(0x116)](_0x3389e2+0x8),_0x2b147a=_0x4448c5[_0x34429f(0x116)](_0x3389e2+0xa),_0x593062=_0x4448c5['readUInt32LE'](_0x3389e2+0x10),_0x2144cb=_0x4448c5[_0x34429f(0x145)](_0x3389e2+0x14),_0x34c3c2=_0x4448c5[_0x34429f(0x145)](_0x3389e2+0x18),_0xbfa294=_0x4448c5[_0x34429f(0x116)](_0x3389e2+0x1c),_0x59f947=_0x4448c5['readUInt16LE'](_0x3389e2+0x1e),_0x5dd3ec=_0x4448c5[_0x34429f(0x116)](_0x3389e2+0x20),_0x4d533f=_0x4448c5[_0x34429f(0x145)](_0x3389e2+0x2a),_0x383ff7=_0x3389e2+0x2e,_0x523948=_0x383ff7+_0xbfa294;if(_0x523948>_0x4448c5[_0x34429f(0x113)])throw CliErrors[_0x34429f(0x1d2)]('Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20name.');if((_0x484d7d&0x1)!==0x0)throw CliErrors['validation'](_0x34429f(0x1d4));if(_0x2b147a!==ZIP_METHOD_STORE&&_0x2b147a!==ZIP_METHOD_DEFLATE)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x14a));const _0x353960=normalizeSkillRelativePath(_0x4448c5['subarray'](_0x383ff7,_0x523948)[_0x34429f(0x174)](_0x34429f(0x142)));if(_0x353960[_0x34429f(0x146)]('/'))throw CliErrors['validation'](_0x34429f(0x1c2)+_0x353960);if(_0x34c3c2>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x150)+_0x353960);_0x56d597+=_0x34c3c2;if(_0x56d597>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x34429f(0x131));const _0x4ab4e4=readZipEntryData(_0x4448c5,_0x4d533f,_0x353960,_0x2144cb),_0x425521=_0x2b147a===ZIP_METHOD_STORE?_0x4ab4e4:inflateRawSync(_0x4ab4e4);if(_0x425521[_0x34429f(0x113)]!==_0x34c3c2)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x13b)+_0x353960);if(crc32(_0x425521)!==_0x593062)throw CliErrors['validation'](_0x34429f(0x129)+_0x353960);_0x3516d4['push']({'path':_0x353960,'bytes':_0x425521}),_0x3389e2=_0x523948+_0x59f947+_0x5dd3ec;}if(_0x3389e2!==_0x15aa2b+_0x5e4833)throw CliErrors[_0x34429f(0x1d2)](_0x34429f(0x1d8));return _0x3516d4[_0x34429f(0x160)](compareSkillFiles);}function readZipEntryData(_0x37f4bb,_0x1415b6,_0x8ae75c,_0x1394dc){const _0x56fd1a=a76_0x16d29b;if(_0x1415b6+0x1e>_0x37f4bb[_0x56fd1a(0x113)])throw CliErrors[_0x56fd1a(0x1d2)](_0x56fd1a(0x18b)+_0x8ae75c);if(_0x37f4bb[_0x56fd1a(0x145)](_0x1415b6)!==ZIP_LOCAL_FILE_HEADER_SIGNATURE)throw CliErrors[_0x56fd1a(0x1d2)](_0x56fd1a(0x126)+_0x8ae75c);const _0x4a32bd=_0x37f4bb['readUInt16LE'](_0x1415b6+0x1a),_0x3e6dbd=_0x37f4bb['readUInt16LE'](_0x1415b6+0x1c),_0x364b9e=_0x1415b6+0x1e,_0x329978=_0x364b9e+_0x4a32bd,_0x3c5924=_0x329978+_0x3e6dbd,_0x21a7cb=_0x3c5924+_0x1394dc;if(_0x329978>_0x37f4bb[_0x56fd1a(0x113)]||_0x21a7cb>_0x37f4bb[_0x56fd1a(0x113)])throw CliErrors[_0x56fd1a(0x1d2)](_0x56fd1a(0x148)+_0x8ae75c);const _0x572c65=normalizeSkillRelativePath(_0x37f4bb[_0x56fd1a(0x121)](_0x364b9e,_0x329978)['toString']('utf8'));if(_0x572c65!==_0x8ae75c)throw CliErrors[_0x56fd1a(0x1d2)](_0x56fd1a(0x199)+_0x8ae75c);return _0x37f4bb[_0x56fd1a(0x121)](_0x3c5924,_0x21a7cb);}function findEndOfCentralDirectory(_0x576779){const _0x1102ff=a76_0x16d29b,_0x2827d5=Math[_0x1102ff(0x133)](0x0,_0x576779[_0x1102ff(0x113)]-0x16-0xffff);for(let _0x3b4a68=_0x576779[_0x1102ff(0x113)]-0x16;_0x3b4a68>=_0x2827d5;_0x3b4a68-=0x1){if(_0x576779['readUInt32LE'](_0x3b4a68)===ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE){const _0x584a6f=_0x576779[_0x1102ff(0x116)](_0x3b4a68+0x14);if(_0x3b4a68+0x16+_0x584a6f===_0x576779[_0x1102ff(0x113)])return _0x3b4a68;}}return-0x1;}function createCrc32Table(){const _0x46f78c=new Uint32Array(0x100);for(let _0x37848f=0x0;_0x37848f<0x100;_0x37848f+=0x1){let _0x2fec8a=_0x37848f;for(let _0x4d3fbf=0x0;_0x4d3fbf<0x8;_0x4d3fbf+=0x1){_0x2fec8a=(_0x2fec8a&0x1)!==0x0?0xedb88320^_0x2fec8a>>>0x1:_0x2fec8a>>>0x1;}_0x46f78c[_0x37848f]=_0x2fec8a>>>0x0;}return _0x46f78c;}function crc32(_0x1878a4){let _0x5473be=0xffffffff;for(const _0x1e48e7 of _0x1878a4){_0x5473be=CRC32_TABLE[(_0x5473be^_0x1e48e7)&0xff]^_0x5473be>>>0x8;}return(_0x5473be^0xffffffff)>>>0x0;}function compareSkillFiles(_0x3ab5a6,_0x1a6d8b){const _0x253ca9=a76_0x16d29b;if(_0x3ab5a6['path']===SKILL_FILE)return _0x1a6d8b[_0x253ca9(0x1d7)]===SKILL_FILE?0x0:-0x1;if(_0x1a6d8b['path']===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x253ca9(0x173)](_0x3ab5a6[_0x253ca9(0x1d7)],_0x253ca9(0x142)),Buffer[_0x253ca9(0x173)](_0x1a6d8b[_0x253ca9(0x1d7)],'utf8'));}function materializeFiles(_0x50f7bd,_0x303a49){const _0x181982=a76_0x16d29b;for(const _0x5598f9 of normalizeLocalFiles(_0x303a49)){const _0x37b2f0=resolveManagedFilePath(_0x50f7bd,_0x5598f9[_0x181982(0x1d7)]);mkdirSync(dirname(_0x37b2f0),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x37b2f0,fileContent(_0x5598f9),0x180);}}function removeStaleManagedFiles(_0x29b3bb,_0x2452e9,_0x1d6e1e){const _0x40c909=a76_0x16d29b;if(!_0x2452e9)return;const _0x4625ae=new Set(normalizeLocalFiles(_0x1d6e1e)[_0x40c909(0x1c1)](_0x57a918=>_0x57a918[_0x40c909(0x1d7)]));for(const _0x5ef81c of Object[_0x40c909(0x156)](_0x2452e9)){if(_0x4625ae[_0x40c909(0x19a)](_0x5ef81c))continue;const _0x38796a=resolveManagedFilePath(_0x29b3bb,_0x5ef81c);existsSync(_0x38796a)&&lstatSync(_0x38796a)[_0x40c909(0x168)]()&&rmSync(_0x38796a,{'force':!![]});}}function resolveManagedFilePath(_0x276dfa,_0x40e722){const _0x30c1d3=a76_0x16d29b,_0x4bc778=normalizeSkillRelativePath(_0x40e722),_0x153b3b=realOrResolved(_0x276dfa),_0x12903a=resolve(_0x153b3b,..._0x4bc778['split']('/'));if(!isPathInside(_0x12903a,_0x153b3b))throw CliErrors[_0x30c1d3(0x1d2)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x40e722);return ensureNoSymlinkInManagedPath(_0x153b3b,_0x4bc778),_0x12903a;}function ensureNoSymlinkInManagedPath(_0x438863,_0x17d94b){const _0x1e7c35=a76_0x16d29b;let _0xf70ba9=_0x438863;for(const _0xdce5f5 of _0x17d94b[_0x1e7c35(0x16b)]('/')){_0xf70ba9=resolve(_0xf70ba9,_0xdce5f5);const _0x57a98e=lstatIfPresent(_0xf70ba9);if(_0x57a98e?.[_0x1e7c35(0x1c0)]())throw CliErrors[_0x1e7c35(0x1d2)](_0x1e7c35(0x163)+_0x17d94b);}}function normalizeSkillRelativePath(_0x44f20a){const _0x2ddd0c=a76_0x16d29b,_0x196a9d=toPosixPath(_0x44f20a[_0x2ddd0c(0x137)]());return validateSkillRelativePath(_0x196a9d),_0x196a9d;}function validateSkillRelativePath(_0x68c123){const _0x36aaef=a76_0x16d29b;if(!_0x68c123||_0x68c123['startsWith']('/')||_0x68c123[_0x36aaef(0x14e)]('//'))throw CliErrors[_0x36aaef(0x1d2)](_0x36aaef(0x132)+_0x68c123);for(const _0xb651ea of _0x68c123[_0x36aaef(0x16b)]('/')){if(!_0xb651ea||_0xb651ea==='.'||_0xb651ea==='..')throw CliErrors['validation'](_0x36aaef(0x132)+_0x68c123);}}function toPosixPath(_0x288902){const _0x21ac56=a76_0x16d29b;return _0x288902[_0x21ac56(0x185)](/\\/g,'/');}function ensureManagedSymlink(_0x45762b,_0x187bd6,_0x3c1dca){const _0x347425=a76_0x16d29b;mkdirSync(dirname(_0x45762b),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x45762b)||isDanglingSymlink(_0x45762b)){const _0xdd7175=lstatSync(_0x45762b);if(!_0xdd7175[_0x347425(0x1c0)]())throw CliErrors[_0x347425(0x1d2)](_0x347425(0x1b7)+_0x45762b);const _0x120f0a=resolveSymlinkTarget(_0x45762b);if(!isPathInside(realOrResolved(_0x120f0a),realOrResolved(_0x3c1dca)))throw CliErrors[_0x347425(0x1d2)](_0x347425(0x18d)+_0x45762b);if(realOrResolved(_0x120f0a)===realOrResolved(_0x187bd6))return{'path':_0x45762b,'target':_0x187bd6,'action':_0x347425(0x1da)};return unlinkSync(_0x45762b),symlinkSync(_0x187bd6,_0x45762b,_0x347425(0x170)),{'path':_0x45762b,'target':_0x187bd6,'action':_0x347425(0x176)};}return symlinkSync(_0x187bd6,_0x45762b,_0x347425(0x170)),{'path':_0x45762b,'target':_0x187bd6,'action':_0x347425(0x1d9)};}function managedAppSkillLinkPaths(_0x588cf7,_0x4651e4){const _0x469204=a76_0x16d29b;if(!existsSync(_0x588cf7))return[];const _0x43f5fc=_0x4651e4+'--';return readdirSync(_0x588cf7,{'withFileTypes':!![]})[_0x469204(0x154)](_0x2de4f5=>_0x2de4f5[_0x469204(0x136)]['startsWith'](_0x43f5fc))[_0x469204(0x1c1)](_0x5984ba=>resolve(_0x588cf7,_0x5984ba[_0x469204(0x136)]));}function removeManagedSkillLink(_0x1e3b22,_0x5dcd28){const _0x3ec372=a76_0x16d29b,_0x1f9a37=lstatIfPresent(_0x1e3b22);if(!_0x1f9a37?.[_0x3ec372(0x1c0)]())return{'path':_0x1e3b22,'action':_0x3ec372(0x14f),'reason':_0x3ec372(0x1cb)};const _0x2deced=resolveSymlinkTarget(_0x1e3b22);if(!isPathInside(realOrResolved(_0x2deced),realOrResolved(_0x5dcd28)))return{'path':_0x1e3b22,'action':_0x3ec372(0x14f),'reason':_0x3ec372(0x130)};return unlinkSync(_0x1e3b22),{'path':_0x1e3b22,'action':_0x3ec372(0x114)};}function copyManagedSkillDirectory(_0x452cee,_0x4d6ade){const _0x441e45=a76_0x16d29b,_0x472239=resolve(_0x4d6ade,METADATA_FILE),_0x3ffbba=existsSync(_0x4d6ade);if(_0x3ffbba){const _0xeb792d=lstatSync(_0x4d6ade);if(_0xeb792d[_0x441e45(0x1c0)]())throw CliErrors[_0x441e45(0x1d2)](_0x441e45(0x183)+_0x4d6ade);if(!_0xeb792d[_0x441e45(0x1b0)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x4d6ade);const _0x470cd0=readMetadataIfPresent(_0x472239);if(_0x470cd0?.[_0x441e45(0x1d0)]!==_0x441e45(0x165))throw CliErrors[_0x441e45(0x1d2)](_0x441e45(0x11c)+_0x4d6ade);}mkdirSync(dirname(_0x4d6ade),{'recursive':!![],'mode':0x1c0});const _0x589c85=_0x3ffbba?readMetadataIfPresent(_0x472239)?.[_0x441e45(0x157)]:undefined,_0x94ca2=readMetadataIfPresent(resolve(_0x452cee,METADATA_FILE))?.[_0x441e45(0x157)];return _0x3ffbba&&rmSync(_0x4d6ade,{'recursive':!![],'force':!![]}),copySkillDirectory(_0x452cee,_0x4d6ade),{'path':_0x4d6ade,'target':_0x452cee,'action':!_0x3ffbba?'created':_0x589c85===_0x94ca2?'unchanged':_0x441e45(0x176)};}function copySkillDirectory(_0x46e704,_0x13bf33){const _0x51b877=a76_0x16d29b;mkdirSync(_0x13bf33,{'recursive':!![],'mode':0x1c0});for(const _0x54de93 of readdirSync(_0x46e704,{'withFileTypes':!![]})){const _0x596084=resolve(_0x46e704,_0x54de93[_0x51b877(0x136)]),_0x5daab3=resolve(_0x13bf33,_0x54de93[_0x51b877(0x136)]);if(_0x54de93[_0x51b877(0x1c0)]())throw CliErrors[_0x51b877(0x1d2)](_0x51b877(0x124)+_0x596084);if(_0x54de93[_0x51b877(0x1b0)]()){copySkillDirectory(_0x596084,_0x5daab3);continue;}_0x54de93[_0x51b877(0x168)]()&&writeFileSync(_0x5daab3,readFileSync(_0x596084));}}function isDanglingSymlink(_0x330315){const _0x45352a=a76_0x16d29b;try{return lstatSync(_0x330315)[_0x45352a(0x1c0)]();}catch{return![];}}function resolveSymlinkTarget(_0x157cd4){const _0x4fb54b=readlinkSync(_0x157cd4);return isAbsolute(_0x4fb54b)?_0x4fb54b:resolve(dirname(_0x157cd4),_0x4fb54b);}function isPathInside(_0x4784cc,_0x5cbd24){const _0x1e4988=a76_0x16d29b,_0x456240=_0x4784cc['endsWith'](sep)?_0x4784cc:''+_0x4784cc+sep,_0x17c154=_0x5cbd24[_0x1e4988(0x146)](sep)?_0x5cbd24:''+_0x5cbd24+sep;return _0x4784cc===_0x5cbd24||_0x456240[_0x1e4988(0x1bb)](_0x17c154);}function realOrResolved(_0x48f208){try{return realpathSync(_0x48f208);}catch{return resolve(_0x48f208);}}function lstatIfPresent(_0x338d51){try{return lstatSync(_0x338d51);}catch{return undefined;}}function writeTextAtomic(_0x24e9d1,_0x3cbe54,_0x3d1607){const _0x6355cb=a76_0x16d29b;writeBytesAtomic(_0x24e9d1,Buffer[_0x6355cb(0x173)](_0x3cbe54,_0x6355cb(0x142)),_0x3d1607);}function writeBytesAtomic(_0x5f0e50,_0xf7f10f,_0x54d51d){const _0x1e56ea=a76_0x16d29b,_0xc0fdb2=_0x5f0e50+_0x1e56ea(0x152);try{writeFileSync(_0xc0fdb2,_0xf7f10f,{'mode':_0x54d51d}),renameSync(_0xc0fdb2,_0x5f0e50);}catch(_0x29e4cc){try{rmSync(_0xc0fdb2,{'force':!![]});}catch{}throw _0x29e4cc;}}function writeJsonAtomic(_0x2d3eec,_0x54ddfa){const _0x57dd24=a76_0x16d29b;writeTextAtomic(_0x2d3eec,JSON[_0x57dd24(0x128)](_0x54ddfa,null,0x2)+'\x0a',0x180);}
|
|
1
|
+
const a76_0x109ac1=a76_0x5576;(function(_0x599f37,_0x42b630){const _0x18bde3=a76_0x5576,_0x151f07=_0x599f37();while(!![]){try{const _0x47b79c=parseInt(_0x18bde3(0x1f0))/0x1*(-parseInt(_0x18bde3(0x199))/0x2)+-parseInt(_0x18bde3(0x1e9))/0x3+-parseInt(_0x18bde3(0x256))/0x4+parseInt(_0x18bde3(0x1a2))/0x5+parseInt(_0x18bde3(0x22e))/0x6+-parseInt(_0x18bde3(0x20c))/0x7*(-parseInt(_0x18bde3(0x219))/0x8)+parseInt(_0x18bde3(0x225))/0x9;if(_0x47b79c===_0x42b630)break;else _0x151f07['push'](_0x151f07['shift']());}catch(_0x189952){_0x151f07['push'](_0x151f07['shift']());}}}(a76_0x2a26,0x255f2));import{createHash}from'node:crypto';import{inflateRawSync}from'node:zlib';import{existsSync,lstatSync,mkdirSync,readdirSync,readFileSync,readlinkSync,realpathSync,renameSync,rmSync,symlinkSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{basename,dirname,isAbsolute,relative,resolve,sep}from'node:path';import{fingerprintAccessKey}from'../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../constant/product.js';import{CliErrors}from'../errors.js';const METADATA_FILE=a76_0x109ac1(0x1b2),SKILL_FILE='SKILL.md',MAX_SKILL_FILE_COUNT=0xc8,MAX_SKILL_FILE_BYTES=0x100*0x400,MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400,MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400,IGNORED_FILE_NAMES=new Set([METADATA_FILE,a76_0x109ac1(0x224)]),IGNORED_DIR_NAMES=new Set([a76_0x109ac1(0x1fd),'.hg',a76_0x109ac1(0x252),'node_modules',a76_0x109ac1(0x200),a76_0x109ac1(0x210),'build',a76_0x109ac1(0x1ef),a76_0x109ac1(0x23e),a76_0x109ac1(0x1bc)]),ZIP_LOCAL_FILE_HEADER_SIGNATURE=0x4034b50,ZIP_CENTRAL_DIRECTORY_SIGNATURE=0x2014b50,ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE=0x6054b50,ZIP_GENERAL_PURPOSE_UTF8=0x800,ZIP_METHOD_STORE=0x0,ZIP_METHOD_DEFLATE=0x8,ZIP_FIXED_DOS_TIME=0x0,ZIP_FIXED_DOS_DATE=0x21,CRC32_TABLE=createCrc32Table();export function resolveSkillSyncPaths(_0x27e67b={}){const _0x25698d=a76_0x109ac1,_0x58f9d0=_0x27e67b[_0x25698d(0x1cc)]??homedir(),_0x1bffe7=resolve(_0x58f9d0,PRODUCT_CONFIG['homeDirName'],_0x25698d(0x254)),_0x3ca3c8=trimmedEnv(_0x25698d(0x1e4)),_0x4911ac=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0x58f9d0,'cacheRoot':_0x1bffe7,'managedRoot':resolve(_0x58f9d0,PRODUCT_CONFIG[_0x25698d(0x1f6)]),'agentsSkillsDir':_0x27e67b[_0x25698d(0x1fa)]??_0x3ca3c8??resolve(_0x58f9d0,_0x25698d(0x214),_0x25698d(0x25a)),'claudeSkillsDir':_0x27e67b['claudeSkillsDir']??_0x4911ac??resolve(_0x58f9d0,_0x25698d(0x213),_0x25698d(0x25a))};}export function getRuntimeSkillCacheRoot(_0x1776a3,_0x24d647,_0x5b43c0={}){const _0x4aa8f8=a76_0x109ac1,_0x2b8e9c=resolveSkillSyncPaths(_0x5b43c0);return resolve(_0x2b8e9c['cacheRoot'],_0x1776a3,fingerprintAccessKey(_0x24d647),_0x4aa8f8(0x25a));}export function getRuntimeSkillDir(_0xc27fcb,_0x4d7ab1,_0x154b92,_0x3d43ab,_0x3bc25f,_0x171fb3={}){const _0x2a8dea=a76_0x109ac1;return resolve(getRuntimeSkillCacheRoot(_0xc27fcb,_0x4d7ab1,_0x171fb3),safePathSegment(_0x154b92,_0x2a8dea(0x1c3)),_0x3d43ab,safePathSegment(_0x3bc25f,_0x2a8dea(0x23d)));}export function listLocalRuntimeSkills(_0x16ded6,_0x177862={}){const _0x2a7efe=a76_0x109ac1,_0x5969eb=safePathSegment(_0x16ded6[_0x2a7efe(0x1c3)],'appCode'),_0x56b62b=normalizeRuntimeSkillScopes(_0x16ded6[_0x2a7efe(0x24b)]),_0x4d1669=new Set(_0x56b62b),_0x3e319d=_0x16ded6[_0x2a7efe(0x220)]?.['trim'](),_0x2a78b6=new Map(),_0x534f22=resolve(getRuntimeSkillCacheRoot(_0x16ded6[_0x2a7efe(0x230)],_0x16ded6[_0x2a7efe(0x1a4)],_0x177862),_0x5969eb);for(const _0x16af8b of _0x56b62b){for(const _0x290812 of localSkillEntryDirs(resolve(_0x534f22,_0x16af8b))){collectLocalRuntimeSkill(_0x2a78b6,_0x290812,{'appCode':_0x5969eb,'scopes':_0x4d1669,'code':_0x3e319d,'source':_0x2a7efe(0x254)});}}const _0x4b5321=resolveSkillSyncPaths(_0x177862);for(const _0x5cb9db of[_0x4b5321[_0x2a7efe(0x1fa)],_0x4b5321['claudeSkillsDir']]){for(const _0x1ca421 of localSkillLinkCandidates(_0x5cb9db,_0x5969eb,_0x4d1669)){collectLocalRuntimeSkill(_0x2a78b6,_0x1ca421,{'appCode':_0x5969eb,'scopes':_0x4d1669,'code':_0x3e319d,'source':_0x2a7efe(0x233),'linkedPath':_0x1ca421});}}return Array[_0x2a7efe(0x22d)](_0x2a78b6[_0x2a7efe(0x1d7)]())[_0x2a7efe(0x204)](compareLocalRuntimeSkills);}export function contentHash(_0x460086){const _0x25950a=a76_0x109ac1;return createHash(_0x25950a(0x1f1))[_0x25950a(0x198)](_0x460086)[_0x25950a(0x1c6)](_0x25950a(0x22c));}function fileContent(_0x5a8f80){const _0x1e1623=a76_0x109ac1;return _0x5a8f80[_0x1e1623(0x1e5)]??Buffer['from'](_0x5a8f80[_0x1e1623(0x25b)]??'',_0x1e1623(0x23c));}function fileText(_0x4094fc){const _0x43bdc5=a76_0x109ac1;return fileContent(_0x4094fc)[_0x43bdc5(0x1b8)]('utf8');}function fileHash(_0x2584aa){return bufferSha256(fileContent(_0x2584aa));}function bufferSha256(_0x2ffd86){const _0x5b4e01=a76_0x109ac1;return createHash(_0x5b4e01(0x1f1))[_0x5b4e01(0x198)](_0x2ffd86)[_0x5b4e01(0x1c6)](_0x5b4e01(0x22c));}export function fileTreeHash(_0x1f3062){const _0xb2dcc4=a76_0x109ac1,_0x43797a=createHash(_0xb2dcc4(0x1f1));for(const _0x52be76 of normalizeManifestFiles(_0x1f3062)){_0x43797a[_0xb2dcc4(0x198)](_0x52be76[_0xb2dcc4(0x243)]),_0x43797a[_0xb2dcc4(0x198)]('\x00'),_0x43797a[_0xb2dcc4(0x198)](_0x52be76[_0xb2dcc4(0x1f1)]),_0x43797a['update']('\x00'),_0x43797a['update'](String(_0x52be76[_0xb2dcc4(0x209)])),_0x43797a[_0xb2dcc4(0x198)]('\x00');}return _0x43797a[_0xb2dcc4(0x1c6)]('hex');}export function buildSkillPackage(_0x4bd853){const _0x44dc14=a76_0x109ac1,_0x3d4b0b=normalizeLocalFiles(_0x4bd853);if(!_0x3d4b0b[_0x44dc14(0x217)](_0x2611d7=>_0x2611d7[_0x44dc14(0x243)]===SKILL_FILE))throw CliErrors['validation'](_0x44dc14(0x227)+SKILL_FILE+_0x44dc14(0x258));const _0x58a885=localFilesToManifestFiles(_0x3d4b0b),_0x416f0b=createDeterministicZipPackage(_0x3d4b0b);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x58a885),'zipSha256':bufferSha256(_0x416f0b),'zipSize':_0x416f0b['length'],'files':_0x58a885},'packageBytes':_0x416f0b,'packageBase64':_0x416f0b['toString'](_0x44dc14(0x1b3))};}export function verifyRuntimeSkillPackage(_0x36045b,_0x3e90a3){const _0x256995=a76_0x109ac1,_0x2ea98f=normalizePackageManifest(_0x36045b,{'requireOssPath':![]});if(!_0x2ea98f)throw CliErrors['validation'](_0x256995(0x1a8));return extractAndVerifyPackage(_0x2ea98f,_0x3e90a3);}export function materializeRuntimeSkill(_0x5bbfa9,_0x1aeacf,_0x30df78){const _0x42e25a=a76_0x109ac1,_0x501086=requireSkillCode(_0x5bbfa9),_0x1fa1a0=normalizeRemoteManifest(_0x5bbfa9[_0x42e25a(0x212)]),_0x10d88f=_0x1fa1a0!==undefined,_0x57eeab=_0x10d88f?requirePackageBytes(_0x501086,_0x30df78[_0x42e25a(0x1ec)]):undefined,_0x2de478=_0x10d88f?extractAndVerifyPackage(_0x1fa1a0,_0x57eeab):[{'path':SKILL_FILE,'content':_0x5bbfa9[_0x42e25a(0x25b)]??''}],_0x2ba2e3=_0x2de478[_0x42e25a(0x1b1)](_0x351b15=>_0x351b15[_0x42e25a(0x243)]===SKILL_FILE);if(!_0x2ba2e3)throw CliErrors[_0x42e25a(0x1c9)](_0x42e25a(0x1ad)+SKILL_FILE+':\x20'+_0x501086);const _0x263b67=fileText(_0x2ba2e3);if(_0x10d88f&&_0x5bbfa9['content']!==undefined&&_0x5bbfa9[_0x42e25a(0x25b)]!==_0x263b67)throw CliErrors['validation'](_0x42e25a(0x1b7)+SKILL_FILE+_0x42e25a(0x24c)+_0x501086);const _0x4d3808=withMaterializedSkillFrontmatter(_0x2de478,_0x5bbfa9,_0x501086),_0x3c30df=_0x4d3808[_0x42e25a(0x1b1)](_0x59e305=>_0x59e305[_0x42e25a(0x243)]===SKILL_FILE),_0x25570a=fileText(_0x3c30df),_0x5dab8f=getRuntimeSkillDir(_0x30df78[_0x42e25a(0x230)],_0x30df78[_0x42e25a(0x1a4)],_0x30df78[_0x42e25a(0x1c3)],_0x1aeacf,_0x501086,_0x30df78[_0x42e25a(0x1e7)]),_0x1a40e7=resolve(_0x5dab8f,SKILL_FILE),_0x376bf8=resolve(_0x5dab8f,METADATA_FILE),_0x22fa93=contentHash(_0x25570a),_0xc13c67=readMetadataIfPresent(_0x376bf8)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x5dab8f,_0x376bf8,_0x4d3808,_0x30df78[_0x42e25a(0x21e)]===!![]),mkdirSync(_0x5dab8f,{'recursive':!![],'mode':0x1c0});const _0x796119=existsSync(_0x1a40e7)?readFileSync(_0x1a40e7,'utf8'):undefined;return materializeFiles(_0x5dab8f,_0x4d3808),_0x10d88f&&removeStaleManagedFiles(_0x5dab8f,_0xc13c67,_0x4d3808),writeJsonAtomic(_0x376bf8,buildMetadata(_0x5bbfa9,_0x1aeacf,_0x30df78['appCode'],_0x22fa93,_0x30df78[_0x42e25a(0x1a9)],_0x10d88f?_0x4d3808:undefined)),{'skill':_0x5bbfa9,'scope':_0x1aeacf,'dir':_0x5dab8f,'skillMdPath':_0x1a40e7,'metadataPath':_0x376bf8,'contentHash':_0x22fa93,'changed':_0x796119!==_0x25570a};}function withMaterializedSkillFrontmatter(_0x408c10,_0x108a05,_0x1fb508){const _0x45f055=a76_0x109ac1;return normalizeLocalFiles(_0x408c10)[_0x45f055(0x1cd)](_0x37eb25=>{const _0x1b3d76=_0x45f055,_0x404714=fileText(_0x37eb25);if(_0x37eb25[_0x1b3d76(0x243)]!==SKILL_FILE||hasYamlFrontmatter(_0x404714))return _0x37eb25;return{'path':_0x37eb25[_0x1b3d76(0x243)],'content':prependSkillFrontmatter(_0x404714,{'name':_0x1fb508,'description':_0x108a05[_0x1b3d76(0x21c)]?.[_0x1b3d76(0x1cb)]()||_0x108a05['skillName']?.[_0x1b3d76(0x1cb)]()||_0x1fb508})};});}function a76_0x2a26(){const _0x1f1cca=['scope','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','dir','stringify','skillMdPath','\x20for\x20local\x20path:\x20','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','SKILL_ROOT','bytes','sourceSessionId','paths','skill','470988XPBGJL','isFile','Runtime\x20Skill\x20package\x20has\x20truncated\x20central\x20directory.','packageBytes','Duplicate\x20Skill\x20file\x20path:\x20','managedRoot','coverage','183810WYCuPf','sha256','writeUInt32LE','push','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','linkedPaths','homeDirName','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','schemaVersion','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','agentsSkillsDir','name','set','.git','Skill\x20file\x20path\x20must\x20be\x20text.','status','.next','startsWith','not-managed-symlink','Invalid\x20','sort','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','skipped','zipSize','path\x20segment','size','Runtime\x20Skill\x20is\x20missing\x20skillCode.','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','12159lPlSID','cacheDir','length','isSymbolicLink','dist','forkedFromSkillId','files','.claude','.agents','compare','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','some','readUInt16LE','224DYYHkl','source','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','description','Skill\x20file\x20size\x20is\x20invalid:\x20','force','external-symlink','code','object','Runtime\x20Skill\x20package\x20is\x20missing\x20zip\x20central\x20directory.','Unsupported\x20runtime\x20Skill\x20scope:\x20','.DS_Store','2667114YjDgsT','Skill\x20package\x20exceeds\x20size\x20limit.','Missing\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','test','packageBase64','subarray','hex','from','1548978EEYMvA','metadataPath','env','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','link','company','localeCompare','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.','concat','Runtime\x20Skill\x20package\x20local\x20path\x20mismatch:\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','get','utf8','skillCode','.turbo','toLowerCase','contentHash','Runtime\x20Skill\x20package\x20contains\x20unsupported\x20compression\x20method.','fileHashes','path','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','personal','tenantCode','isDirectory','userId','Unsafe\x20Skill\x20file\x20path:\x20','keys','scopes','\x20does\x20not\x20match\x20backend\x20content:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','replace','Runtime\x20Skill\x20package\x20uncompressed\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','readUInt32LE','.svn','builtin','cache','string','774712QsSniQ','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20central\x20directory\x20size\x20mismatch.','skills','content','toISOString','join','alloc','Duplicate\x20Skill\x20package\x20entry:\x20','update','2JuDEBI','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','requireOssPath','isSafeInteger','Skill\x20file\x20exceeds\x20size\x20limit:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','description:\x20','422065RgvIQx','manifest','accessKey','treeSha256','includes','endsWith','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','pulledAt','unchanged','activeSkillCodes','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','\x20or\x20directory\x20name.','Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.\x20Changed\x20file:\x20','find','lovrabet.skill.json','base64','has','copy','zipSha256','Runtime\x20Skill\x20package\x20','toString','Skill\x20metadata\x20appCode\x20\x22','split','Runtime\x20Skill\x20package\x20has\x20truncated\x20local\x20header:\x20','.cache','.tmp','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20name.','version','created','claudeSkillsDir','slice','appCode','Runtime\x20Skill\x20package\x20contains\x20encrypted\x20entries.','filter','digest','\x20has\x20scope=\x22','skillName','validation','removed','trim','homeDir','map','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','fromEntries','---','isArray','parse','writeUInt16LE','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','values','isBuffer','pushedAt','tags','linkedPath','updated'];a76_0x2a26=function(){return _0x1f1cca;};return a76_0x2a26();}function hasYamlFrontmatter(_0x3cc371){const _0x33ba8a=a76_0x109ac1;return/^\uFEFF?---\s*\r?\n/[_0x33ba8a(0x229)](_0x3cc371);}function prependSkillFrontmatter(_0x5ef23d,_0x159ff5){const _0x320d3b=a76_0x109ac1,_0x3f74c4=_0x5ef23d[_0x320d3b(0x24e)](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x159ff5[_0x320d3b(0x1fb)]),_0x320d3b(0x1a1)+yamlString(_0x159ff5['description']),_0x320d3b(0x1d2),'',_0x3f74c4][_0x320d3b(0x195)]('\x0a');}function yamlString(_0x677960){const _0x96ef2a=a76_0x109ac1;return JSON[_0x96ef2a(0x1e0)](_0x677960['replace'](/\r/g,'')['trim']());}export function linkEffectiveRuntimeSkills(_0x52b025,_0x1859fc,_0x37fbef={}){const _0x2ecfc5=a76_0x109ac1,_0x4d3926=new Map();for(const _0x12fbf6 of _0x52b025){const _0x4df64e=_0x12fbf6['skill'][_0x2ecfc5(0x23d)];if(!_0x4df64e)continue;const _0x2d5760=_0x4d3926[_0x2ecfc5(0x23b)](_0x4df64e);(!_0x2d5760||_0x12fbf6[_0x2ecfc5(0x1dd)]==='personal')&&_0x4d3926[_0x2ecfc5(0x1fc)](_0x4df64e,_0x12fbf6);}const _0xaf113e=[],_0x4076b4=resolveSkillSyncPaths(_0x37fbef);for(const _0x39b39e of _0x4d3926['values']()){const _0x5960db=requireSkillCode(_0x39b39e[_0x2ecfc5(0x1e8)]),_0x33f9ff=_0x1859fc+'--'+_0x5960db;for(const _0x309a34 of[_0x4076b4[_0x2ecfc5(0x1fa)],_0x4076b4[_0x2ecfc5(0x1c1)]]){_0xaf113e[_0x2ecfc5(0x1f3)](ensureManagedSymlink(resolve(_0x309a34,_0x33f9ff),_0x39b39e[_0x2ecfc5(0x1df)],_0x4076b4[_0x2ecfc5(0x1ee)]));}}return _0xaf113e;}export function pruneStaleRuntimeSkillLinks(_0x15a235,_0x392cfd,_0xb68784={},_0x289864){const _0x136b1d=a76_0x109ac1,_0x581c59=resolveSkillSyncPaths(_0xb68784),_0x1b76e9=new Set([..._0x392cfd]['map'](_0x39857e=>_0x39857e[_0x136b1d(0x1cb)]())['filter'](Boolean)),_0x2e05e6=_0x289864?new Set([..._0x289864]['map'](_0x19ddc5=>_0x19ddc5[_0x136b1d(0x1cb)]())[_0x136b1d(0x1c5)](Boolean)):undefined,_0x59e6bf=[];for(const _0xb642d8 of[_0x581c59['agentsSkillsDir'],_0x581c59[_0x136b1d(0x1c1)]]){for(const _0x5e6bdf of managedAppSkillLinkPaths(_0xb642d8,_0x15a235)){const _0x14622a=basename(_0x5e6bdf)['slice']((_0x15a235+'--')[_0x136b1d(0x20e)]);if(_0x2e05e6&&!_0x2e05e6['has'](_0x14622a))continue;if(_0x1b76e9[_0x136b1d(0x1b4)](_0x14622a))continue;_0x59e6bf['push'](removeManagedSkillLink(_0x5e6bdf,_0x581c59[_0x136b1d(0x1ee)]));}}return _0x59e6bf;}export function pruneStaleRuntimeSkillCache(_0x4520bd,_0x474e2b={}){const _0x793775=a76_0x109ac1,_0x3e0c4a=new Set([..._0x4520bd[_0x793775(0x1ab)]][_0x793775(0x1cd)](_0x595fdd=>_0x595fdd[_0x793775(0x1cb)]())[_0x793775(0x1c5)](Boolean)),_0x5ab9e9=_0x4520bd['pruneSkillCodes']?new Set([..._0x4520bd['pruneSkillCodes']][_0x793775(0x1cd)](_0x31021c=>_0x31021c[_0x793775(0x1cb)]())[_0x793775(0x1c5)](Boolean)):undefined,_0x2fdb2b=_0x4520bd[_0x793775(0x24b)]??[_0x793775(0x245),'company'],_0x3c55d5=resolve(getRuntimeSkillCacheRoot(_0x4520bd[_0x793775(0x230)],_0x4520bd[_0x793775(0x1a4)],_0x474e2b),safePathSegment(_0x4520bd[_0x793775(0x1c3)],'appCode')),_0x266f35=[];for(const _0x4f7870 of _0x2fdb2b){const _0x225de5=resolve(_0x3c55d5,_0x4f7870);if(!existsSync(_0x225de5))continue;for(const _0x3e38f1 of readdirSync(_0x225de5,{'withFileTypes':!![]})){if(!_0x3e38f1[_0x793775(0x247)]())continue;const _0x174fa1=_0x3e38f1[_0x793775(0x1fb)];if(_0x5ab9e9&&!_0x5ab9e9[_0x793775(0x1b4)](_0x174fa1))continue;if(_0x3e0c4a['has'](_0x174fa1))continue;const _0x144bd2=resolve(_0x225de5,_0x174fa1),_0x172e59=readMetadataIfPresent(resolve(_0x144bd2,METADATA_FILE));if(_0x172e59?.['appCode']!==_0x4520bd[_0x793775(0x1c3)]||_0x172e59[_0x793775(0x1dd)]!==_0x4f7870||_0x172e59[_0x793775(0x23d)]!==_0x174fa1){_0x266f35[_0x793775(0x1f3)]({'path':_0x144bd2,'action':_0x793775(0x206),'reason':'metadata-mismatch'});continue;}rmSync(_0x144bd2,{'recursive':!![],'force':!![]}),_0x266f35['push']({'path':_0x144bd2,'action':_0x793775(0x1ca)});}}return _0x266f35;}export function linkGlobalRuntimeSkills(_0xa74de,_0x3c2700={}){const _0xcb1c=a76_0x109ac1,_0x59c38a=resolveSkillSyncPaths(_0x3c2700),_0x373d4a=[];for(const _0x20335d of _0xa74de){if(_0x20335d[_0xcb1c(0x1dd)]!==_0xcb1c(0x253))throw CliErrors[_0xcb1c(0x1c9)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x20335d[_0xcb1c(0x1dd)]);const _0x447891=requireSkillCode(_0x20335d['skill']),_0x2c13aa=copyManagedSkillDirectory(_0x20335d[_0xcb1c(0x1df)],resolve(_0x59c38a[_0xcb1c(0x1fa)],_0x447891));_0x373d4a[_0xcb1c(0x1f3)]({..._0x2c13aa,'contentHash':_0x20335d[_0xcb1c(0x240)]});}return _0x373d4a;}export function readPushDirectory(_0xf0b683,_0x9c53d1){const _0x59be04=a76_0x109ac1,_0x172f0e=resolve(_0xf0b683);if(!existsSync(_0x172f0e)||!lstatSync(_0x172f0e)[_0x59be04(0x247)]())throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0xf0b683);const _0x4f7637=resolve(_0x172f0e,SKILL_FILE);if(!existsSync(_0x4f7637)||!lstatSync(_0x4f7637)[_0x59be04(0x1ea)]())throw CliErrors['validation'](_0x59be04(0x227)+SKILL_FILE+':\x20'+_0x4f7637);const _0x1d0fd8=readMetadataIfPresent(resolve(_0x172f0e,METADATA_FILE));if(_0x1d0fd8?.[_0x59be04(0x1dd)]&&_0x1d0fd8['scope']!==_0x59be04(0x245))throw CliErrors[_0x59be04(0x1c9)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x59be04(0x1c7)+_0x1d0fd8[_0x59be04(0x1dd)]+'\x22.');if(_0x1d0fd8?.['appCode']&&_0x1d0fd8['appCode']!==_0x9c53d1)throw CliErrors['validation'](_0x59be04(0x1b9)+_0x1d0fd8['appCode']+_0x59be04(0x257)+_0x9c53d1+'\x22.');const _0x54fc54=scanSkillDirectory(_0x172f0e),_0x311285=buildSkillPackage(_0x54fc54),_0xf6d2e=readFileSync(_0x4f7637,'utf8'),_0x1d1cec=_0x1d0fd8?.[_0x59be04(0x23d)]??deriveSkillCodeFromDirectory(_0x172f0e,_0x9c53d1);if(!_0x1d1cec)throw CliErrors[_0x59be04(0x1c9)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+METADATA_FILE+_0x59be04(0x1af));return{'skillCode':_0x1d1cec,'metadata':_0x1d0fd8,'input':{'skillCode':_0x1d1cec,'skillName':_0x1d0fd8?.[_0x59be04(0x1c8)],'description':_0x1d0fd8?.[_0x59be04(0x21c)],'content':_0xf6d2e,'files':_0x311285[_0x59be04(0x1a3)],'packageBase64':_0x311285[_0x59be04(0x22a)],'tags':_0x1d0fd8?.['tags'],'version':_0x1d0fd8?.[_0x59be04(0x1bf)],'sourceSessionId':_0x1d0fd8?.[_0x59be04(0x1e6)]}};}export function recordPushedRuntimeSkill(_0xb946a3,_0x3ccf8b,_0x2901e2,_0x5612aa={}){const _0x106e1d=a76_0x109ac1,_0x3aca9f=resolve(_0xb946a3),_0x4b444d=scanSkillDirectory(_0x3aca9f),_0x435a28=_0x4b444d[_0x106e1d(0x1b1)](_0x4bf695=>_0x4bf695[_0x106e1d(0x243)]===SKILL_FILE),_0x38156a=_0x435a28?fileText(_0x435a28):'',_0x2a14a9=tryNormalizeRemoteManifest(_0x3ccf8b['files']),_0x26ab28={..._0x3ccf8b,'content':_0x3ccf8b['content']??_0x38156a,'files':_0x2a14a9},_0x31bc7e=_0x2a14a9?normalizeLocalFiles(_0x4b444d)[_0x106e1d(0x1c5)](_0xc5d3b5=>_0x2a14a9['files'][_0x106e1d(0x217)](_0x572ff9=>_0x572ff9['path']===_0xc5d3b5[_0x106e1d(0x243)])):undefined,_0x1cd4b1=buildMetadata(_0x26ab28,_0x5612aa[_0x106e1d(0x1dd)]??_0x106e1d(0x245),_0x2901e2,contentHash(_0x26ab28[_0x106e1d(0x25b)]??''),_0x5612aa[_0x106e1d(0x1d9)],_0x31bc7e);writeJsonAtomic(resolve(_0x3aca9f,METADATA_FILE),_0x1cd4b1);}export function deriveSkillCodeFromDirectory(_0x22d7f5,_0xd2bd6a){const _0x47068a=a76_0x109ac1,_0xbb3ed0=basename(resolve(_0x22d7f5)),_0x5e154d=_0xd2bd6a+'--';return _0xbb3ed0[_0x47068a(0x201)](_0x5e154d)?_0xbb3ed0[_0x47068a(0x1c2)](_0x5e154d[_0x47068a(0x20e)]):_0xbb3ed0;}export function readMetadataIfPresent(_0x4d5471){const _0x2c597a=a76_0x109ac1;if(!existsSync(_0x4d5471))return undefined;try{const _0x3a1664=JSON[_0x2c597a(0x1d4)](readFileSync(_0x4d5471,'utf8'));return _0x3a1664;}catch{throw CliErrors['validation'](_0x2c597a(0x203)+METADATA_FILE+':\x20'+_0x4d5471);}}function normalizeRuntimeSkillScopes(_0x12eb04){const _0x1f1dd9=a76_0x109ac1,_0x20959f=_0x12eb04&&_0x12eb04[_0x1f1dd9(0x20e)]>0x0?_0x12eb04:[_0x1f1dd9(0x245),_0x1f1dd9(0x234),_0x1f1dd9(0x253)],_0x14726e=[];for(const _0x53f13e of _0x20959f){if(!isRuntimeSkillScope(_0x53f13e))throw CliErrors[_0x1f1dd9(0x1c9)](_0x1f1dd9(0x223)+_0x53f13e);!_0x14726e[_0x1f1dd9(0x1a6)](_0x53f13e)&&_0x14726e[_0x1f1dd9(0x1f3)](_0x53f13e);}return _0x14726e;}function isRuntimeSkillScope(_0x44e97a){const _0x25f8c5=a76_0x109ac1;return _0x44e97a===_0x25f8c5(0x245)||_0x44e97a===_0x25f8c5(0x234)||_0x44e97a===_0x25f8c5(0x253);}function localSkillEntryDirs(_0x428d18){const _0x270a41=a76_0x109ac1;if(!existsSync(_0x428d18))return[];return readdirSync(_0x428d18,{'withFileTypes':!![]})[_0x270a41(0x1c5)](_0x35b22d=>_0x35b22d[_0x270a41(0x247)]()||_0x35b22d[_0x270a41(0x20f)]())['map'](_0x589d2f=>resolve(_0x428d18,_0x589d2f[_0x270a41(0x1fb)]));}function localSkillLinkCandidates(_0x556a4e,_0x256457,_0x510369){const _0x4382fd=a76_0x109ac1;if(!existsSync(_0x556a4e))return[];const _0x4809b7=_0x256457+'--';return readdirSync(_0x556a4e,{'withFileTypes':!![]})['filter'](_0x1a7a2e=>_0x1a7a2e['isDirectory']()||_0x1a7a2e[_0x4382fd(0x20f)]())['filter'](_0x5d8979=>_0x5d8979[_0x4382fd(0x1fb)][_0x4382fd(0x201)](_0x4809b7)||_0x510369[_0x4382fd(0x1b4)](_0x4382fd(0x253)))[_0x4382fd(0x1cd)](_0x39687f=>resolve(_0x556a4e,_0x39687f[_0x4382fd(0x1fb)]));}function collectLocalRuntimeSkill(_0x1302a6,_0x22e0c9,_0x123e6b){const _0x1ba777=a76_0x109ac1,_0x5b0b19=resolve(_0x22e0c9,METADATA_FILE),_0x361099=readMetadataIfPresent(_0x5b0b19);if(!_0x361099)return;if(_0x361099['appCode']!==_0x123e6b[_0x1ba777(0x1c3)])return;if(!isRuntimeSkillScope(_0x361099['scope'])||!_0x123e6b[_0x1ba777(0x24b)][_0x1ba777(0x1b4)](_0x361099[_0x1ba777(0x1dd)]))return;const _0x2aa9d3=_0x361099[_0x1ba777(0x23d)]?.[_0x1ba777(0x1cb)]();if(!_0x2aa9d3)return;if(_0x123e6b[_0x1ba777(0x220)]&&_0x2aa9d3!==_0x123e6b[_0x1ba777(0x220)])return;const _0x417f10=_0x361099[_0x1ba777(0x1dd)]+':'+_0x2aa9d3,_0x35961f=_0x123e6b[_0x1ba777(0x1db)]?[_0x123e6b[_0x1ba777(0x1db)]]:[],_0x4e7798=_0x1302a6[_0x1ba777(0x23b)](_0x417f10);if(_0x4e7798){_0x123e6b[_0x1ba777(0x21a)]===_0x1ba777(0x254)&&(_0x4e7798[_0x1ba777(0x1df)]=_0x22e0c9,_0x4e7798[_0x1ba777(0x20d)]=_0x22e0c9,_0x4e7798[_0x1ba777(0x1e1)]=resolve(_0x22e0c9,SKILL_FILE),_0x4e7798[_0x1ba777(0x22f)]=_0x5b0b19);for(const _0x4f4f06 of _0x35961f){!_0x4e7798[_0x1ba777(0x1f5)]['includes'](_0x4f4f06)&&_0x4e7798['linkedPaths'][_0x1ba777(0x1f3)](_0x4f4f06);}_0x4e7798[_0x1ba777(0x1f5)]['sort']();return;}_0x1302a6[_0x1ba777(0x1fc)](_0x417f10,{..._0x361099,'tags':Array[_0x1ba777(0x1d3)](_0x361099[_0x1ba777(0x1da)])?_0x361099[_0x1ba777(0x1da)]:[],'scope':_0x361099[_0x1ba777(0x1dd)],'source':'local','dir':_0x22e0c9,'cacheDir':_0x123e6b[_0x1ba777(0x21a)]==='cache'?_0x22e0c9:undefined,'skillMdPath':resolve(_0x22e0c9,SKILL_FILE),'metadataPath':_0x5b0b19,'linkedPaths':_0x35961f});}function compareLocalRuntimeSkills(_0x10ecb9,_0x5cd14c){const _0x5d79a7=a76_0x109ac1,_0x3ada8e={'personal':0x0,'company':0x1,'builtin':0x2};return _0x3ada8e[_0x10ecb9['scope']]-_0x3ada8e[_0x5cd14c['scope']]||_0x10ecb9['skillCode'][_0x5d79a7(0x235)](_0x5cd14c[_0x5d79a7(0x23d)])||_0x10ecb9['dir'][_0x5d79a7(0x235)](_0x5cd14c[_0x5d79a7(0x1df)]);}function buildMetadata(_0x35ca74,_0x173a45,_0x274b67,_0x434986,_0x43f114,_0x222d5e){const _0x2414e9=a76_0x109ac1,_0x23abca=_0x222d5e?normalizeLocalFiles(_0x222d5e):[],_0x17a8a1=normalizeRemoteManifest(_0x35ca74[_0x2414e9(0x212)]),_0x5a070c=_0x23abca[_0x2414e9(0x20e)]>0x0?Object[_0x2414e9(0x1d1)](_0x23abca[_0x2414e9(0x1cd)](_0x2e26c5=>[_0x2e26c5[_0x2414e9(0x243)],fileHash(_0x2e26c5)])):undefined;return{'schemaVersion':_0x23abca[_0x2414e9(0x20e)]>0x0?0x2:0x1,'id':_0x35ca74['id'],'appCode':_0x274b67,'skillCode':requireSkillCode(_0x35ca74),'skillName':_0x35ca74[_0x2414e9(0x1c8)],'description':_0x35ca74[_0x2414e9(0x21c)],'scope':_0x173a45,'readonly':_0x173a45!==_0x2414e9(0x245)||_0x35ca74['readonly']===!![],'tenantCode':_0x35ca74[_0x2414e9(0x246)],'userId':_0x35ca74[_0x2414e9(0x248)],'version':_0x35ca74[_0x2414e9(0x1bf)],'status':_0x35ca74[_0x2414e9(0x1ff)],'tags':Array['isArray'](_0x35ca74['tags'])?_0x35ca74[_0x2414e9(0x1da)]:[],'hasUpstreamUpdate':_0x35ca74['hasUpstreamUpdate'],'forkedFromSkillId':_0x35ca74[_0x2414e9(0x211)],'forkedFromVersion':_0x35ca74['forkedFromVersion'],'sourceSessionId':_0x35ca74[_0x2414e9(0x1e6)],'contentHash':_0x434986,'fileHashes':_0x5a070c,'treeHash':_0x23abca[_0x2414e9(0x20e)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x23abca)):_0x17a8a1?.[_0x2414e9(0x1a5)],'ossPath':_0x17a8a1?.['ossPath'],'zipSha256':_0x17a8a1?.[_0x2414e9(0x1b6)],'zipSize':_0x17a8a1?.[_0x2414e9(0x207)],'files':_0x23abca[_0x2414e9(0x20e)]>0x0?_0x23abca[_0x2414e9(0x1cd)](_0x31e0cc=>({'path':_0x31e0cc[_0x2414e9(0x243)],'hash':fileHash(_0x31e0cc),'size':fileContent(_0x31e0cc)[_0x2414e9(0x20e)]})):undefined,'pulledAt':_0x43f114??new Date()[_0x2414e9(0x194)]()};}function requireSkillCode(_0x53519a){const _0x5036fd=a76_0x109ac1,_0x53c06c=_0x53519a['skillCode']?.[_0x5036fd(0x1cb)]();if(!_0x53c06c)throw CliErrors[_0x5036fd(0x1c9)](_0x5036fd(0x20a));return _0x53c06c;}function trimmedEnv(_0xbc0be0){const _0x3dadc5=productEnv(_0xbc0be0)?.['trim']();return _0x3dadc5?_0x3dadc5:undefined;}function safePathSegment(_0x1a3f0,_0x398811=a76_0x109ac1(0x208)){const _0x1ac9c9=a76_0x109ac1;if(!_0x1a3f0||_0x1a3f0['includes']('/')||_0x1a3f0[_0x1ac9c9(0x1a6)]('\x5c')||_0x1a3f0[_0x1ac9c9(0x1a6)]('..'))throw CliErrors[_0x1ac9c9(0x1c9)]('Unsafe\x20'+_0x398811+_0x1ac9c9(0x1e2)+_0x1a3f0);return _0x1a3f0;}function ensurePulledFilesCanBeOverwritten(_0xb1a825,_0x52b741,_0x1a469a,_0x1f2fc6){const _0x4bafad=a76_0x109ac1;if(_0x1f2fc6||!existsSync(_0x52b741))return;const _0x54a8ab=readMetadataIfPresent(_0x52b741);if(!_0x54a8ab)return;const _0x37ca8e=_0x54a8ab[_0x4bafad(0x242)]&&Object[_0x4bafad(0x24a)](_0x54a8ab[_0x4bafad(0x242)])[_0x4bafad(0x20e)]>0x0?_0x54a8ab['fileHashes']:undefined;if(_0x37ca8e)for(const [_0xeddceb,_0x312019]of Object['entries'](_0x37ca8e)){const _0x76d750=resolveManagedFilePath(_0xb1a825,_0xeddceb);if(!existsSync(_0x76d750))throw CliErrors[_0x4bafad(0x1c9)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xb1a825,_0x4bafad(0x228)+_0xeddceb);const _0x3b9ce5=lstatSync(_0x76d750);if(!_0x3b9ce5[_0x4bafad(0x1ea)]())throw CliErrors[_0x4bafad(0x1c9)](_0x4bafad(0x205)+_0xb1a825,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0xeddceb);const _0xd25ecf=bufferSha256(readFileSync(_0x76d750));if(_0xd25ecf!==_0x312019)throw CliErrors[_0x4bafad(0x1c9)](_0x4bafad(0x205)+_0xb1a825+'.\x20Changed\x20file:\x20'+_0xeddceb,_0x4bafad(0x1b0)+_0xeddceb);}else{const _0x39b86a=resolve(_0xb1a825,SKILL_FILE);if(existsSync(_0x39b86a)&&_0x54a8ab[_0x4bafad(0x240)]){const _0x53c059=contentHash(readFileSync(_0x39b86a,'utf8'));if(_0x53c059!==_0x54a8ab[_0x4bafad(0x240)])throw CliErrors[_0x4bafad(0x1c9)](_0x4bafad(0x1f7)+_0x39b86a,_0x4bafad(0x237));}}for(const _0x3eea45 of normalizeLocalFiles(_0x1a469a)){if(_0x37ca8e?.[_0x3eea45[_0x4bafad(0x243)]])continue;if(!_0x37ca8e&&_0x3eea45['path']===SKILL_FILE)continue;const _0x5b6159=resolveManagedFilePath(_0xb1a825,_0x3eea45[_0x4bafad(0x243)]);if(!existsSync(_0x5b6159))continue;const _0x53adca=lstatSync(_0x5b6159);if(!_0x53adca[_0x4bafad(0x1ea)]())throw CliErrors[_0x4bafad(0x1c9)](_0x4bafad(0x205)+_0xb1a825,_0x4bafad(0x1d0)+_0x3eea45[_0x4bafad(0x243)]);const _0x1634dc=bufferSha256(readFileSync(_0x5b6159));if(_0x1634dc!==fileHash(_0x3eea45))throw CliErrors[_0x4bafad(0x1c9)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xb1a825,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3eea45[_0x4bafad(0x243)]);}}function scanSkillDirectory(_0x484b02){const _0xb275c3=realOrResolved(_0x484b02),_0x5a26cf=[];let _0x5b8dcb=0x0;function _0x3e71c4(_0xaf3b2b){const _0x356c70=a76_0x5576,_0x131caa=readdirSync(_0xaf3b2b,{'withFileTypes':!![]})[_0x356c70(0x204)]((_0x112856,_0x508b15)=>_0x112856[_0x356c70(0x1fb)][_0x356c70(0x235)](_0x508b15[_0x356c70(0x1fb)]));for(const _0xed3e92 of _0x131caa){if(_0xed3e92[_0x356c70(0x247)]()&&IGNORED_DIR_NAMES['has'](_0xed3e92[_0x356c70(0x1fb)]))continue;if(IGNORED_FILE_NAMES[_0x356c70(0x1b4)](_0xed3e92['name']))continue;const _0x529c15=resolve(_0xaf3b2b,_0xed3e92['name']);if(_0xed3e92[_0x356c70(0x20f)]())throw CliErrors['validation'](_0x356c70(0x1a0)+_0x529c15);const _0xc77a1d=toPosixPath(relative(_0xb275c3,_0x529c15));if(_0xed3e92['isDirectory']()){_0x3e71c4(_0x529c15);continue;}if(!_0xed3e92[_0x356c70(0x1ea)]())continue;validateSkillRelativePath(_0xc77a1d);const _0x3eb3c9=readFileSync(_0x529c15);if(_0x3eb3c9[_0x356c70(0x20e)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x356c70(0x1c9)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0xc77a1d);_0x5b8dcb+=_0x3eb3c9[_0x356c70(0x20e)];if(_0x5b8dcb>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x356c70(0x1c9)](_0x356c70(0x216));_0x5a26cf[_0x356c70(0x1f3)]({'path':_0xc77a1d,'bytes':_0x3eb3c9});if(_0x5a26cf[_0x356c70(0x20e)]>MAX_SKILL_FILE_COUNT)throw CliErrors['validation']('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');}}return _0x3e71c4(_0xb275c3),normalizeLocalFiles(_0x5a26cf);}function normalizeLocalFiles(_0x547f10){const _0x4cef04=a76_0x109ac1;if(!Array[_0x4cef04(0x1d3)](_0x547f10)||_0x547f10[_0x4cef04(0x20e)]===0x0)return[];if(_0x547f10[_0x4cef04(0x20e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x1f4));const _0x2f8ea6=new Map();let _0x5cf030=0x0;for(const _0x5e8b52 of _0x547f10){if(!_0x5e8b52||typeof _0x5e8b52!==_0x4cef04(0x221)||typeof _0x5e8b52[_0x4cef04(0x243)]!==_0x4cef04(0x255))throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x1fe));const _0x49c6f7=normalizeSkillRelativePath(_0x5e8b52[_0x4cef04(0x243)]);if(_0x2f8ea6['has'](_0x49c6f7))throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x1ed)+_0x49c6f7);if(_0x5e8b52[_0x4cef04(0x1e5)]!==undefined&&!Buffer[_0x4cef04(0x1d8)](_0x5e8b52['bytes']))throw CliErrors['validation'](_0x4cef04(0x1cf)+_0x49c6f7);if(_0x5e8b52['bytes']===undefined&&typeof _0x5e8b52[_0x4cef04(0x25b)]!==_0x4cef04(0x255))throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x21b)+_0x49c6f7);const _0x27badb=fileContent(_0x5e8b52),_0x2e0ff7=_0x27badb['length'];if(_0x2e0ff7>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x19f)+_0x49c6f7);_0x5cf030+=_0x2e0ff7;if(_0x5cf030>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4cef04(0x1c9)](_0x4cef04(0x216));_0x2f8ea6[_0x4cef04(0x1fc)](_0x49c6f7,{'path':_0x49c6f7,'bytes':_0x27badb});}return Array[_0x4cef04(0x22d)](_0x2f8ea6['values']())['sort'](compareSkillFiles);}function normalizeManifestFiles(_0x4bfeac){const _0x21479c=a76_0x109ac1;if(!Array[_0x21479c(0x1d3)](_0x4bfeac)||_0x4bfeac[_0x21479c(0x20e)]===0x0)return[];if(_0x4bfeac[_0x21479c(0x20e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x21479c(0x1c9)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x2ddcd5=new Map();let _0xcfaab7=0x0;for(const _0x5ebb0e of _0x4bfeac){if(!_0x5ebb0e||typeof _0x5ebb0e!==_0x21479c(0x221)||typeof _0x5ebb0e[_0x21479c(0x243)]!==_0x21479c(0x255))throw CliErrors[_0x21479c(0x1c9)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3450a4=normalizeSkillRelativePath(_0x5ebb0e[_0x21479c(0x243)]);if(_0x2ddcd5[_0x21479c(0x1b4)](_0x3450a4))throw CliErrors[_0x21479c(0x1c9)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3450a4);if(!isSha256Hex(_0x5ebb0e[_0x21479c(0x1f1)]))throw CliErrors[_0x21479c(0x1c9)](_0x21479c(0x236)+_0x3450a4);if(!Number[_0x21479c(0x19e)](_0x5ebb0e['size'])||_0x5ebb0e[_0x21479c(0x209)]<0x0)throw CliErrors['validation'](_0x21479c(0x21d)+_0x3450a4);if(_0x5ebb0e[_0x21479c(0x209)]>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x21479c(0x19f)+_0x3450a4);_0xcfaab7+=_0x5ebb0e['size'];if(_0xcfaab7>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x21479c(0x1c9)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x2ddcd5[_0x21479c(0x1fc)](_0x3450a4,{'path':_0x3450a4,'sha256':_0x5ebb0e[_0x21479c(0x1f1)]['toLowerCase'](),'size':_0x5ebb0e[_0x21479c(0x209)]});}return Array['from'](_0x2ddcd5['values']())[_0x21479c(0x204)](compareSkillFiles);}function normalizeRemoteManifest(_0x3017b0){return normalizePackageManifest(_0x3017b0,{'requireOssPath':!![]});}function normalizePackageManifest(_0x31e2c0,_0x147957){const _0x4129bd=a76_0x109ac1;if(!_0x31e2c0||typeof _0x31e2c0!==_0x4129bd(0x221)||Array[_0x4129bd(0x1d3)](_0x31e2c0))return undefined;const _0x59b93d=_0x31e2c0,_0x21219f=typeof _0x59b93d['ossPath']===_0x4129bd(0x255)?_0x59b93d['ossPath'][_0x4129bd(0x1cb)]():undefined;if(_0x147957[_0x4129bd(0x19d)]&&!_0x21219f)return undefined;if(!Array[_0x4129bd(0x1d3)](_0x59b93d['files'])||_0x59b93d[_0x4129bd(0x212)][_0x4129bd(0x20e)]===0x0)return undefined;if(!isSha256Hex(_0x59b93d[_0x4129bd(0x1a5)]))throw CliErrors[_0x4129bd(0x1c9)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x59b93d[_0x4129bd(0x1b6)]))throw CliErrors[_0x4129bd(0x1c9)](_0x4129bd(0x1de));if(!Number[_0x4129bd(0x19e)](_0x59b93d[_0x4129bd(0x207)])||_0x59b93d['zipSize']<0x0)throw CliErrors[_0x4129bd(0x1c9)](_0x4129bd(0x244));if(_0x59b93d[_0x4129bd(0x207)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4129bd(0x1c9)](_0x4129bd(0x1d6));const _0xdebcf3=normalizeManifestFiles(_0x59b93d[_0x4129bd(0x212)]);if(!_0xdebcf3[_0x4129bd(0x217)](_0x1cf963=>_0x1cf963[_0x4129bd(0x243)]===SKILL_FILE))throw CliErrors[_0x4129bd(0x1c9)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x3e317c=fileTreeHash(_0xdebcf3);if(_0x3e317c!==_0x59b93d[_0x4129bd(0x1a5)][_0x4129bd(0x23f)]())throw CliErrors[_0x4129bd(0x1c9)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x4129bd(0x19e)](_0x59b93d[_0x4129bd(0x1f8)])?_0x59b93d[_0x4129bd(0x1f8)]:0x2,'ossPath':_0x21219f,'treeSha256':_0x3e317c,'zipSha256':_0x59b93d[_0x4129bd(0x1b6)][_0x4129bd(0x23f)](),'zipSize':_0x59b93d[_0x4129bd(0x207)],'files':_0xdebcf3};}function tryNormalizeRemoteManifest(_0x21ea7c){return normalizeRemoteManifest(_0x21ea7c);}function requirePackageBytes(_0x5d669e,_0xf318d5){const _0x2158ff=a76_0x109ac1;if(!_0xf318d5||_0xf318d5[_0x2158ff(0x20e)]===0x0)throw CliErrors[_0x2158ff(0x1c9)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20package-backed\x20Skill:\x20'+_0x5d669e);if(_0xf318d5[_0x2158ff(0x20e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x2158ff(0x1c9)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20'+_0x5d669e);return _0xf318d5;}function localFilesToManifestFiles(_0x1181e9){const _0x130efd=a76_0x109ac1;return normalizeLocalFiles(_0x1181e9)['map'](_0x335bc9=>({'path':_0x335bc9[_0x130efd(0x243)],'sha256':fileHash(_0x335bc9),'size':fileContent(_0x335bc9)[_0x130efd(0x20e)]}));}function isSha256Hex(_0x131d71){const _0x42fca2=a76_0x109ac1;return typeof _0x131d71===_0x42fca2(0x255)&&/^[a-fA-F0-9]{64}$/[_0x42fca2(0x229)](_0x131d71);}function extractAndVerifyPackage(_0x6c9227,_0x4c527f){const _0xda24ae=a76_0x109ac1,_0x20edda=normalizePackageManifest(_0x6c9227,{'requireOssPath':![]});if(!_0x20edda)throw CliErrors[_0xda24ae(0x1c9)](_0xda24ae(0x1a8));if(_0x4c527f[_0xda24ae(0x20e)]!==_0x20edda[_0xda24ae(0x207)])throw CliErrors[_0xda24ae(0x1c9)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x4d3cb6=bufferSha256(_0x4c527f);if(_0x4d3cb6!==_0x20edda['zipSha256'])throw CliErrors[_0xda24ae(0x1c9)](_0xda24ae(0x250));const _0x2e04ab=parseZipPackage(_0x4c527f);if(_0x2e04ab[_0xda24ae(0x20e)]!==_0x20edda[_0xda24ae(0x212)][_0xda24ae(0x20e)])throw CliErrors[_0xda24ae(0x1c9)](_0xda24ae(0x23a));const _0x65758f=new Map();for(const _0x13797e of _0x2e04ab){if(_0x65758f['has'](_0x13797e[_0xda24ae(0x243)]))throw CliErrors[_0xda24ae(0x1c9)](_0xda24ae(0x197)+_0x13797e[_0xda24ae(0x243)]);_0x65758f[_0xda24ae(0x1fc)](_0x13797e[_0xda24ae(0x243)],_0x13797e);}const _0x15fc4a=[];for(const _0x33d029 of _0x20edda['files']){const _0x504543=_0x65758f[_0xda24ae(0x23b)](_0x33d029[_0xda24ae(0x243)]);if(!_0x504543)throw CliErrors[_0xda24ae(0x1c9)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x33d029[_0xda24ae(0x243)]);if(_0x504543[_0xda24ae(0x1e5)][_0xda24ae(0x20e)]!==_0x33d029['size'])throw CliErrors[_0xda24ae(0x1c9)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x33d029[_0xda24ae(0x243)]);const _0x4c4be0=bufferSha256(_0x504543[_0xda24ae(0x1e5)]);if(_0x4c4be0!==_0x33d029[_0xda24ae(0x1f1)])throw CliErrors[_0xda24ae(0x1c9)](_0xda24ae(0x1ae)+_0x33d029['path']);_0x15fc4a['push']({'path':_0x33d029[_0xda24ae(0x243)],'bytes':_0x504543[_0xda24ae(0x1e5)]});}return normalizeLocalFiles(_0x15fc4a);}function createDeterministicZipPackage(_0x14cb44){const _0x3a7bc3=a76_0x109ac1,_0x34e74d=normalizeLocalFiles(_0x14cb44),_0x7f7d4f=[],_0x3c663e=[];let _0x3a0a9f=0x0;for(const _0x1c0324 of _0x34e74d){const _0xb10a8a=Buffer['from'](_0x1c0324['path'],_0x3a7bc3(0x23c)),_0x1f0718=fileContent(_0x1c0324),_0x2d5ac5=crc32(_0x1f0718),_0x3d7514=Buffer[_0x3a7bc3(0x196)](0x1e+_0xb10a8a[_0x3a7bc3(0x20e)]);_0x3d7514[_0x3a7bc3(0x1f2)](ZIP_LOCAL_FILE_HEADER_SIGNATURE,0x0),_0x3d7514['writeUInt16LE'](0x14,0x4),_0x3d7514['writeUInt16LE'](ZIP_GENERAL_PURPOSE_UTF8,0x6),_0x3d7514['writeUInt16LE'](ZIP_METHOD_STORE,0x8),_0x3d7514[_0x3a7bc3(0x1d5)](ZIP_FIXED_DOS_TIME,0xa),_0x3d7514['writeUInt16LE'](ZIP_FIXED_DOS_DATE,0xc),_0x3d7514[_0x3a7bc3(0x1f2)](_0x2d5ac5,0xe),_0x3d7514[_0x3a7bc3(0x1f2)](_0x1f0718[_0x3a7bc3(0x20e)],0x12),_0x3d7514[_0x3a7bc3(0x1f2)](_0x1f0718[_0x3a7bc3(0x20e)],0x16),_0x3d7514[_0x3a7bc3(0x1d5)](_0xb10a8a[_0x3a7bc3(0x20e)],0x1a),_0x3d7514['writeUInt16LE'](0x0,0x1c),_0xb10a8a[_0x3a7bc3(0x1b5)](_0x3d7514,0x1e),_0x7f7d4f['push'](_0x3d7514,_0x1f0718);const _0x3dbd17=Buffer[_0x3a7bc3(0x196)](0x2e+_0xb10a8a[_0x3a7bc3(0x20e)]);_0x3dbd17['writeUInt32LE'](ZIP_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x3dbd17['writeUInt16LE'](0x14,0x4),_0x3dbd17['writeUInt16LE'](0x14,0x6),_0x3dbd17['writeUInt16LE'](ZIP_GENERAL_PURPOSE_UTF8,0x8),_0x3dbd17['writeUInt16LE'](ZIP_METHOD_STORE,0xa),_0x3dbd17[_0x3a7bc3(0x1d5)](ZIP_FIXED_DOS_TIME,0xc),_0x3dbd17[_0x3a7bc3(0x1d5)](ZIP_FIXED_DOS_DATE,0xe),_0x3dbd17[_0x3a7bc3(0x1f2)](_0x2d5ac5,0x10),_0x3dbd17[_0x3a7bc3(0x1f2)](_0x1f0718['length'],0x14),_0x3dbd17['writeUInt32LE'](_0x1f0718[_0x3a7bc3(0x20e)],0x18),_0x3dbd17[_0x3a7bc3(0x1d5)](_0xb10a8a['length'],0x1c),_0x3dbd17[_0x3a7bc3(0x1d5)](0x0,0x1e),_0x3dbd17[_0x3a7bc3(0x1d5)](0x0,0x20),_0x3dbd17[_0x3a7bc3(0x1d5)](0x0,0x22),_0x3dbd17['writeUInt16LE'](0x0,0x24),_0x3dbd17[_0x3a7bc3(0x1f2)](0x0,0x26),_0x3dbd17['writeUInt32LE'](_0x3a0a9f,0x2a),_0xb10a8a[_0x3a7bc3(0x1b5)](_0x3dbd17,0x2e),_0x3c663e[_0x3a7bc3(0x1f3)](_0x3dbd17),_0x3a0a9f+=_0x3d7514['length']+_0x1f0718[_0x3a7bc3(0x20e)];}const _0x383ad7=Buffer[_0x3a7bc3(0x238)](_0x3c663e),_0x422f2d=_0x3a0a9f,_0x3eb76a=_0x383ad7[_0x3a7bc3(0x20e)],_0x443e37=Buffer['alloc'](0x16);_0x443e37[_0x3a7bc3(0x1f2)](ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x443e37['writeUInt16LE'](0x0,0x4),_0x443e37[_0x3a7bc3(0x1d5)](0x0,0x6),_0x443e37[_0x3a7bc3(0x1d5)](_0x34e74d['length'],0x8),_0x443e37['writeUInt16LE'](_0x34e74d[_0x3a7bc3(0x20e)],0xa),_0x443e37[_0x3a7bc3(0x1f2)](_0x3eb76a,0xc),_0x443e37[_0x3a7bc3(0x1f2)](_0x422f2d,0x10),_0x443e37[_0x3a7bc3(0x1d5)](0x0,0x14);const _0x5176ad=Buffer[_0x3a7bc3(0x238)]([..._0x7f7d4f,_0x383ad7,_0x443e37]);if(_0x5176ad[_0x3a7bc3(0x20e)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x3a7bc3(0x1c9)](_0x3a7bc3(0x226));return _0x5176ad;}function parseZipPackage(_0x30b466){const _0x3f860b=a76_0x109ac1;if(_0x30b466['length']<0x16)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x231));const _0x22b434=findEndOfCentralDirectory(_0x30b466);if(_0x22b434<0x0)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x222));const _0x188ea6=_0x30b466[_0x3f860b(0x218)](_0x22b434+0x4),_0x19a257=_0x30b466['readUInt16LE'](_0x22b434+0x6),_0x1d10d4=_0x30b466['readUInt16LE'](_0x22b434+0xa),_0x4f3b06=_0x30b466[_0x3f860b(0x251)](_0x22b434+0xc),_0x2083e6=_0x30b466[_0x3f860b(0x251)](_0x22b434+0x10);if(_0x188ea6!==0x0||_0x19a257!==0x0)throw CliErrors[_0x3f860b(0x1c9)]('Runtime\x20Skill\x20package\x20uses\x20unsupported\x20multi-disk\x20zip\x20format.');if(_0x1d10d4>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1e3));if(_0x2083e6+_0x4f3b06>_0x22b434||_0x2083e6>=_0x30b466['length'])throw CliErrors[_0x3f860b(0x1c9)]('Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20offsets.');const _0xee7216=[];let _0x1d9c54=0x0,_0x496e5d=_0x2083e6;for(let _0x3f9b9b=0x0;_0x3f9b9b<_0x1d10d4;_0x3f9b9b+=0x1){if(_0x496e5d+0x2e>_0x30b466[_0x3f860b(0x20e)])throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1eb));if(_0x30b466[_0x3f860b(0x251)](_0x496e5d)!==ZIP_CENTRAL_DIRECTORY_SIGNATURE)throw CliErrors[_0x3f860b(0x1c9)]('Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20entry.');const _0x5773d4=_0x30b466[_0x3f860b(0x218)](_0x496e5d+0x8),_0xdba739=_0x30b466[_0x3f860b(0x218)](_0x496e5d+0xa),_0x5bb90c=_0x30b466[_0x3f860b(0x251)](_0x496e5d+0x10),_0x10fa84=_0x30b466[_0x3f860b(0x251)](_0x496e5d+0x14),_0x2a7435=_0x30b466[_0x3f860b(0x251)](_0x496e5d+0x18),_0x119c3b=_0x30b466[_0x3f860b(0x218)](_0x496e5d+0x1c),_0x4d18f7=_0x30b466[_0x3f860b(0x218)](_0x496e5d+0x1e),_0x4025d6=_0x30b466[_0x3f860b(0x218)](_0x496e5d+0x20),_0x47780d=_0x30b466[_0x3f860b(0x251)](_0x496e5d+0x2a),_0x532239=_0x496e5d+0x2e,_0x11f8e6=_0x532239+_0x119c3b;if(_0x11f8e6>_0x30b466[_0x3f860b(0x20e)])throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1be));if((_0x5773d4&0x1)!==0x0)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1c4));if(_0xdba739!==ZIP_METHOD_STORE&&_0xdba739!==ZIP_METHOD_DEFLATE)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x241));const _0x30ffca=normalizeSkillRelativePath(_0x30b466[_0x3f860b(0x22b)](_0x532239,_0x11f8e6)['toString'](_0x3f860b(0x23c)));if(_0x30ffca[_0x3f860b(0x1a7)]('/'))throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x19c)+_0x30ffca);if(_0x2a7435>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1f9)+_0x30ffca);_0x1d9c54+=_0x2a7435;if(_0x1d9c54>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x1ac));const _0x11be6f=readZipEntryData(_0x30b466,_0x47780d,_0x30ffca,_0x10fa84),_0x3a8d32=_0xdba739===ZIP_METHOD_STORE?_0x11be6f:inflateRawSync(_0x11be6f);if(_0x3a8d32[_0x3f860b(0x20e)]!==_0x2a7435)throw CliErrors[_0x3f860b(0x1c9)](_0x3f860b(0x24f)+_0x30ffca);if(crc32(_0x3a8d32)!==_0x5bb90c)throw CliErrors[_0x3f860b(0x1c9)]('Runtime\x20Skill\x20package\x20CRC\x20mismatch:\x20'+_0x30ffca);_0xee7216[_0x3f860b(0x1f3)]({'path':_0x30ffca,'bytes':_0x3a8d32}),_0x496e5d=_0x11f8e6+_0x4d18f7+_0x4025d6;}if(_0x496e5d!==_0x2083e6+_0x4f3b06)throw CliErrors['validation'](_0x3f860b(0x259));return _0xee7216[_0x3f860b(0x204)](compareSkillFiles);}function readZipEntryData(_0x2a8526,_0xac642d,_0xd31e5a,_0x5db0eb){const _0x5b94d0=a76_0x109ac1;if(_0xac642d+0x1e>_0x2a8526[_0x5b94d0(0x20e)])throw CliErrors[_0x5b94d0(0x1c9)](_0x5b94d0(0x1bb)+_0xd31e5a);if(_0x2a8526['readUInt32LE'](_0xac642d)!==ZIP_LOCAL_FILE_HEADER_SIGNATURE)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20local\x20header\x20mismatch:\x20'+_0xd31e5a);const _0x8ae33d=_0x2a8526[_0x5b94d0(0x218)](_0xac642d+0x1a),_0x113897=_0x2a8526['readUInt16LE'](_0xac642d+0x1c),_0x1beb52=_0xac642d+0x1e,_0x41d452=_0x1beb52+_0x8ae33d,_0x42793f=_0x41d452+_0x113897,_0x3374db=_0x42793f+_0x5db0eb;if(_0x41d452>_0x2a8526[_0x5b94d0(0x20e)]||_0x3374db>_0x2a8526[_0x5b94d0(0x20e)])throw CliErrors[_0x5b94d0(0x1c9)]('Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20data:\x20'+_0xd31e5a);const _0x55debe=normalizeSkillRelativePath(_0x2a8526['subarray'](_0x1beb52,_0x41d452)[_0x5b94d0(0x1b8)](_0x5b94d0(0x23c)));if(_0x55debe!==_0xd31e5a)throw CliErrors['validation'](_0x5b94d0(0x239)+_0xd31e5a);return _0x2a8526[_0x5b94d0(0x22b)](_0x42793f,_0x3374db);}function findEndOfCentralDirectory(_0x18964c){const _0x1980ce=a76_0x109ac1,_0x3e3f60=Math['max'](0x0,_0x18964c[_0x1980ce(0x20e)]-0x16-0xffff);for(let _0x565476=_0x18964c[_0x1980ce(0x20e)]-0x16;_0x565476>=_0x3e3f60;_0x565476-=0x1){if(_0x18964c[_0x1980ce(0x251)](_0x565476)===ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE){const _0x1fe95d=_0x18964c[_0x1980ce(0x218)](_0x565476+0x14);if(_0x565476+0x16+_0x1fe95d===_0x18964c['length'])return _0x565476;}}return-0x1;}function createCrc32Table(){const _0x25757f=new Uint32Array(0x100);for(let _0x2b259e=0x0;_0x2b259e<0x100;_0x2b259e+=0x1){let _0x303e7a=_0x2b259e;for(let _0x3a17a7=0x0;_0x3a17a7<0x8;_0x3a17a7+=0x1){_0x303e7a=(_0x303e7a&0x1)!==0x0?0xedb88320^_0x303e7a>>>0x1:_0x303e7a>>>0x1;}_0x25757f[_0x2b259e]=_0x303e7a>>>0x0;}return _0x25757f;}function crc32(_0x4ca9a4){let _0x1fab52=0xffffffff;for(const _0x445b0b of _0x4ca9a4){_0x1fab52=CRC32_TABLE[(_0x1fab52^_0x445b0b)&0xff]^_0x1fab52>>>0x8;}return(_0x1fab52^0xffffffff)>>>0x0;}function compareSkillFiles(_0x4ad207,_0x1251ba){const _0x1a3dc3=a76_0x109ac1;if(_0x4ad207[_0x1a3dc3(0x243)]===SKILL_FILE)return _0x1251ba['path']===SKILL_FILE?0x0:-0x1;if(_0x1251ba[_0x1a3dc3(0x243)]===SKILL_FILE)return 0x1;return Buffer[_0x1a3dc3(0x215)](Buffer[_0x1a3dc3(0x22d)](_0x4ad207[_0x1a3dc3(0x243)],_0x1a3dc3(0x23c)),Buffer[_0x1a3dc3(0x22d)](_0x1251ba[_0x1a3dc3(0x243)],_0x1a3dc3(0x23c)));}function materializeFiles(_0x132bf9,_0xc61ae6){const _0x195ed3=a76_0x109ac1;for(const _0x5e5b59 of normalizeLocalFiles(_0xc61ae6)){const _0x1097bf=resolveManagedFilePath(_0x132bf9,_0x5e5b59[_0x195ed3(0x243)]);mkdirSync(dirname(_0x1097bf),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1097bf,fileContent(_0x5e5b59),0x180);}}function removeStaleManagedFiles(_0x34f456,_0x2e7128,_0x10a4e1){const _0x150abf=a76_0x109ac1;if(!_0x2e7128)return;const _0x3c1169=new Set(normalizeLocalFiles(_0x10a4e1)[_0x150abf(0x1cd)](_0x14b6d9=>_0x14b6d9[_0x150abf(0x243)]));for(const _0x25e49e of Object[_0x150abf(0x24a)](_0x2e7128)){if(_0x3c1169[_0x150abf(0x1b4)](_0x25e49e))continue;const _0xa28610=resolveManagedFilePath(_0x34f456,_0x25e49e);existsSync(_0xa28610)&&lstatSync(_0xa28610)[_0x150abf(0x1ea)]()&&rmSync(_0xa28610,{'force':!![]});}}function resolveManagedFilePath(_0x5ca189,_0x5a4c10){const _0x32e6fb=a76_0x109ac1,_0x5f2f21=normalizeSkillRelativePath(_0x5a4c10),_0x54f44f=realOrResolved(_0x5ca189),_0x11aa6c=resolve(_0x54f44f,..._0x5f2f21['split']('/'));if(!isPathInside(_0x11aa6c,_0x54f44f))throw CliErrors[_0x32e6fb(0x1c9)](_0x32e6fb(0x249)+_0x5a4c10);return ensureNoSymlinkInManagedPath(_0x54f44f,_0x5f2f21),_0x11aa6c;}function ensureNoSymlinkInManagedPath(_0x3a09ec,_0x5118e9){const _0x4c1c6c=a76_0x109ac1;let _0x108126=_0x3a09ec;for(const _0x40af1a of _0x5118e9['split']('/')){_0x108126=resolve(_0x108126,_0x40af1a);const _0x390257=lstatIfPresent(_0x108126);if(_0x390257?.[_0x4c1c6c(0x20f)]())throw CliErrors[_0x4c1c6c(0x1c9)](_0x4c1c6c(0x19b)+_0x5118e9);}}function normalizeSkillRelativePath(_0x28e261){const _0x931cb6=a76_0x109ac1,_0x50bdf5=toPosixPath(_0x28e261[_0x931cb6(0x1cb)]());return validateSkillRelativePath(_0x50bdf5),_0x50bdf5;}function validateSkillRelativePath(_0xb7e80c){const _0x50bd41=a76_0x109ac1;if(!_0xb7e80c||_0xb7e80c[_0x50bd41(0x201)]('/')||_0xb7e80c[_0x50bd41(0x1a6)]('//'))throw CliErrors[_0x50bd41(0x1c9)](_0x50bd41(0x249)+_0xb7e80c);for(const _0x124643 of _0xb7e80c[_0x50bd41(0x1ba)]('/')){if(!_0x124643||_0x124643==='.'||_0x124643==='..')throw CliErrors[_0x50bd41(0x1c9)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0xb7e80c);}}function toPosixPath(_0x27b97b){const _0x27e495=a76_0x109ac1;return _0x27b97b[_0x27e495(0x24e)](/\\/g,'/');}function ensureManagedSymlink(_0x515afd,_0x285549,_0x4fce09){const _0x1c3a42=a76_0x109ac1;mkdirSync(dirname(_0x515afd),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x515afd)||isDanglingSymlink(_0x515afd)){const _0x9c0728=lstatSync(_0x515afd);if(!_0x9c0728['isSymbolicLink']())throw CliErrors[_0x1c3a42(0x1c9)](_0x1c3a42(0x24d)+_0x515afd);const _0x45f6bc=resolveSymlinkTarget(_0x515afd);if(!isPathInside(realOrResolved(_0x45f6bc),realOrResolved(_0x4fce09)))throw CliErrors[_0x1c3a42(0x1c9)](_0x1c3a42(0x232)+_0x515afd);if(realOrResolved(_0x45f6bc)===realOrResolved(_0x285549))return{'path':_0x515afd,'target':_0x285549,'action':_0x1c3a42(0x1aa)};return unlinkSync(_0x515afd),symlinkSync(_0x285549,_0x515afd,_0x1c3a42(0x1df)),{'path':_0x515afd,'target':_0x285549,'action':_0x1c3a42(0x1dc)};}return symlinkSync(_0x285549,_0x515afd,_0x1c3a42(0x1df)),{'path':_0x515afd,'target':_0x285549,'action':_0x1c3a42(0x1c0)};}function managedAppSkillLinkPaths(_0x454b52,_0x3f6145){const _0x327f44=a76_0x109ac1;if(!existsSync(_0x454b52))return[];const _0x44d031=_0x3f6145+'--';return readdirSync(_0x454b52,{'withFileTypes':!![]})[_0x327f44(0x1c5)](_0x310bef=>_0x310bef['name'][_0x327f44(0x201)](_0x44d031))[_0x327f44(0x1cd)](_0x5bb62f=>resolve(_0x454b52,_0x5bb62f[_0x327f44(0x1fb)]));}function a76_0x5576(_0x5e61a7,_0x254bcc){_0x5e61a7=_0x5e61a7-0x194;const _0x2a26e2=a76_0x2a26();let _0x557600=_0x2a26e2[_0x5e61a7];return _0x557600;}function removeManagedSkillLink(_0xe91ad5,_0x3e53f7){const _0x33431a=a76_0x109ac1,_0x48596f=lstatIfPresent(_0xe91ad5);if(!_0x48596f?.['isSymbolicLink']())return{'path':_0xe91ad5,'action':_0x33431a(0x206),'reason':_0x33431a(0x202)};const _0x25e325=resolveSymlinkTarget(_0xe91ad5);if(!isPathInside(realOrResolved(_0x25e325),realOrResolved(_0x3e53f7)))return{'path':_0xe91ad5,'action':_0x33431a(0x206),'reason':_0x33431a(0x21f)};return unlinkSync(_0xe91ad5),{'path':_0xe91ad5,'action':_0x33431a(0x1ca)};}function copyManagedSkillDirectory(_0x4db40d,_0x4e1916){const _0x5728b6=a76_0x109ac1,_0x9f03a7=resolve(_0x4e1916,METADATA_FILE),_0x41fcd8=existsSync(_0x4e1916);if(_0x41fcd8){const _0x1483f3=lstatSync(_0x4e1916);if(_0x1483f3[_0x5728b6(0x20f)]())throw CliErrors[_0x5728b6(0x1c9)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x4e1916);if(!_0x1483f3['isDirectory']())throw CliErrors[_0x5728b6(0x1c9)](_0x5728b6(0x19a)+_0x4e1916);const _0x389f79=readMetadataIfPresent(_0x9f03a7);if(_0x389f79?.[_0x5728b6(0x1dd)]!=='builtin')throw CliErrors['validation'](_0x5728b6(0x20b)+_0x4e1916);}mkdirSync(dirname(_0x4e1916),{'recursive':!![],'mode':0x1c0});const _0x4f0712=_0x41fcd8?readMetadataIfPresent(_0x9f03a7)?.['contentHash']:undefined,_0x2dfbda=readMetadataIfPresent(resolve(_0x4db40d,METADATA_FILE))?.[_0x5728b6(0x240)];return _0x41fcd8&&rmSync(_0x4e1916,{'recursive':!![],'force':!![]}),copySkillDirectory(_0x4db40d,_0x4e1916),{'path':_0x4e1916,'target':_0x4db40d,'action':!_0x41fcd8?_0x5728b6(0x1c0):_0x4f0712===_0x2dfbda?'unchanged':_0x5728b6(0x1dc)};}function copySkillDirectory(_0x27d1a9,_0xd83b55){const _0xbaf6b5=a76_0x109ac1;mkdirSync(_0xd83b55,{'recursive':!![],'mode':0x1c0});for(const _0x50b980 of readdirSync(_0x27d1a9,{'withFileTypes':!![]})){const _0x36c2f1=resolve(_0x27d1a9,_0x50b980[_0xbaf6b5(0x1fb)]),_0x3d8fb3=resolve(_0xd83b55,_0x50b980['name']);if(_0x50b980[_0xbaf6b5(0x20f)]())throw CliErrors[_0xbaf6b5(0x1c9)](_0xbaf6b5(0x1ce)+_0x36c2f1);if(_0x50b980[_0xbaf6b5(0x247)]()){copySkillDirectory(_0x36c2f1,_0x3d8fb3);continue;}_0x50b980['isFile']()&&writeFileSync(_0x3d8fb3,readFileSync(_0x36c2f1));}}function isDanglingSymlink(_0x4415da){const _0x53f078=a76_0x109ac1;try{return lstatSync(_0x4415da)[_0x53f078(0x20f)]();}catch{return![];}}function resolveSymlinkTarget(_0x56ad53){const _0x330578=readlinkSync(_0x56ad53);return isAbsolute(_0x330578)?_0x330578:resolve(dirname(_0x56ad53),_0x330578);}function isPathInside(_0x30b5a3,_0x393f13){const _0x95b2f=a76_0x109ac1,_0x3eee05=_0x30b5a3[_0x95b2f(0x1a7)](sep)?_0x30b5a3:''+_0x30b5a3+sep,_0xfc89b5=_0x393f13[_0x95b2f(0x1a7)](sep)?_0x393f13:''+_0x393f13+sep;return _0x30b5a3===_0x393f13||_0x3eee05[_0x95b2f(0x201)](_0xfc89b5);}function realOrResolved(_0x28c1b8){try{return realpathSync(_0x28c1b8);}catch{return resolve(_0x28c1b8);}}function lstatIfPresent(_0x44ab8a){try{return lstatSync(_0x44ab8a);}catch{return undefined;}}function writeTextAtomic(_0x5a9e4b,_0x2c344c,_0xf56d06){const _0x37901b=a76_0x109ac1;writeBytesAtomic(_0x5a9e4b,Buffer[_0x37901b(0x22d)](_0x2c344c,_0x37901b(0x23c)),_0xf56d06);}function writeBytesAtomic(_0x442b8f,_0x1d0260,_0x5a4cd0){const _0x5969dc=a76_0x109ac1,_0x52c0ff=_0x442b8f+_0x5969dc(0x1bd);try{writeFileSync(_0x52c0ff,_0x1d0260,{'mode':_0x5a4cd0}),renameSync(_0x52c0ff,_0x442b8f);}catch(_0x3babfb){try{rmSync(_0x52c0ff,{'force':!![]});}catch{}throw _0x3babfb;}}function writeJsonAtomic(_0x5e93d4,_0x42a1c7){const _0x42df1d=a76_0x109ac1;writeTextAtomic(_0x5e93d4,JSON[_0x42df1d(0x1e0)](_0x42a1c7,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x11e0(){const _0x2b60ef=['11lkFUqb','890uMscJM','2948kighSQ','23742JnwQGf','446243aopJiE','1127772XlKEQZ','1881070ZpMMJJ','3552OiDlII','4064736PctZKf','16qGOvZj','65YJOtpV','360aWNDDB','422RXYopc'];a77_0x11e0=function(){return _0x2b60ef;};return a77_0x11e0();}function a77_0x43ec(_0x2ccc02,_0x2104c9){_0x2ccc02=_0x2ccc02-0x8b;const _0x11e01c=a77_0x11e0();let _0x43ec73=_0x11e01c[_0x2ccc02];return _0x43ec73;}(function(_0x343013,_0x195549){const _0x1374fb=a77_0x43ec,_0x37080d=_0x343013();while(!![]){try{const _0x210a9c=parseInt(_0x1374fb(0x90))/0x1*(-parseInt(_0x1374fb(0x8e))/0x2)+parseInt(_0x1374fb(0x96))/0x3*(-parseInt(_0x1374fb(0x91))/0x4)+parseInt(_0x1374fb(0x8d))/0x5*(parseInt(_0x1374fb(0x92))/0x6)+parseInt(_0x1374fb(0x93))/0x7*(-parseInt(_0x1374fb(0x8b))/0x8)+-parseInt(_0x1374fb(0x94))/0x9+parseInt(_0x1374fb(0x95))/0xa*(-parseInt(_0x1374fb(0x8f))/0xb)+-parseInt(_0x1374fb(0x97))/0xc*(-parseInt(_0x1374fb(0x8c))/0xd);if(_0x210a9c===_0x195549)break;else _0x37080d['push'](_0x37080d['shift']());}catch(_0x58dd8c){_0x37080d['push'](_0x37080d['shift']());}}}(a77_0x11e0,0x74831));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a78_0x5858(){const _0x5acefa=['info','File','command','duration','map','clear','winstonLogger','logFileName','filter','4828458YhWzIO','5TqrUTs','message','yellow','750488GrHicf','Completed:\x20','trim','error','utf8','toISOString','stringify','setRawCommand','5011377aTZqDM','initWinstonLogger','8196pxTCoj','Starting:\x20','rawCommand','writeFileSync','readLogs','blue','readFileSync','Failed\x20to\x20read\x20logs:','red','parse','log','Failed\x20to\x20clear\x20logs:','join','printf','mkdirSync','level','13775832UJnNRW','existsSync','errors','transports','logFilePath','logTask','584wuAAdF','warn','clearLogs','timestamp','success','4322312pIfIdq','Failed:\x20','currentRawCommand','341835StZcxT','format','now'];a78_0x5858=function(){return _0x5acefa;};return a78_0x5858();}const a78_0x3dc11e=a78_0x2dc1;(function(_0x1f5777,_0x2e26cd){const _0x34a775=a78_0x2dc1,_0x4c4036=_0x1f5777();while(!![]){try{const _0x98b945=parseInt(_0x34a775(0x8f))/0x1+parseInt(_0x34a775(0x87))/0x2*(parseInt(_0x34a775(0x71))/0x3)+-parseInt(_0x34a775(0x67))/0x4*(parseInt(_0x34a775(0x64))/0x5)+-parseInt(_0x34a775(0x9b))/0x6+-parseInt(_0x34a775(0x6f))/0x7+-parseInt(_0x34a775(0x8c))/0x8+parseInt(_0x34a775(0x81))/0x9;if(_0x98b945===_0x2e26cd)break;else _0x4c4036['push'](_0x4c4036['shift']());}catch(_0xf12f2a){_0x4c4036['push'](_0x4c4036['shift']());}}}(a78_0x5858,0x66f1e));import a78_0x4b0112 from'winston';import a78_0x3277ee from'node:fs';import a78_0x346d9d from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';['currentRawCommand']='';constructor(){}[a78_0x3dc11e(0x6e)](_0x195775){const _0x32baa9=a78_0x3dc11e;this[_0x32baa9(0x8e)]=_0x195775;}['setLogPath'](_0x34dee6){const _0x35fe4a=a78_0x3dc11e;this[_0x35fe4a(0x85)]=a78_0x346d9d[_0x35fe4a(0x7d)](_0x34dee6,PRODUCT_CONFIG[_0x35fe4a(0x99)]),this[_0x35fe4a(0x98)]&&this[_0x35fe4a(0x98)][_0x35fe4a(0x97)](),this['initWinstonLogger']();}[a78_0x3dc11e(0x70)](){const _0x26e468=a78_0x3dc11e,_0x5b5a3c=a78_0x346d9d['dirname'](this['logFilePath']);!a78_0x3277ee['existsSync'](_0x5b5a3c)&&a78_0x3277ee[_0x26e468(0x7f)](_0x5b5a3c,{'recursive':!![]});const _0x122948=a78_0x4b0112[_0x26e468(0x90)]['combine'](a78_0x4b0112[_0x26e468(0x90)][_0x26e468(0x8a)](),a78_0x4b0112[_0x26e468(0x90)][_0x26e468(0x83)]({'stack':!![]}),a78_0x4b0112[_0x26e468(0x90)][_0x26e468(0x7e)](_0x3ea557=>{const _0x3e0f16=_0x26e468,_0x4f8c6b={'timestamp':_0x3ea557[_0x3e0f16(0x8a)]||new Date()[_0x3e0f16(0x6c)](),'level':_0x3ea557[_0x3e0f16(0x80)]||_0x3e0f16(0x92),'command':_0x3ea557[_0x3e0f16(0x94)]||'unknown','rawCommand':_0x3ea557[_0x3e0f16(0x73)]||this[_0x3e0f16(0x8e)]||undefined,'message':_0x3ea557[_0x3e0f16(0x65)]||'','duration':_0x3ea557[_0x3e0f16(0x95)]||undefined,'details':_0x3ea557['details']||undefined};return JSON[_0x3e0f16(0x6d)](_0x4f8c6b);}));this[_0x26e468(0x98)]=a78_0x4b0112['createLogger']({'level':_0x26e468(0x92),'format':_0x122948,'transports':[new a78_0x4b0112[(_0x26e468(0x84))][(_0x26e468(0x93))]({'filename':this[_0x26e468(0x85)],'level':'info'})],'silent':![]}),a78_0x4b0112['addColors']({'success':'green','error':_0x26e468(0x79),'warn':_0x26e468(0x66),'info':_0x26e468(0x76)});}[a78_0x3dc11e(0x92)](_0x8c2ff7,_0x15d67d,_0x1e1963){const _0x1cafb6=a78_0x3dc11e;if(!this['logFilePath']||!this[_0x1cafb6(0x98)])return;this[_0x1cafb6(0x98)]['info'](_0x15d67d,{'command':_0x8c2ff7,'details':_0x1e1963});}['success'](_0x41a9de,_0x472ba9,_0x1414c0,_0x448ee9){const _0x214978=a78_0x3dc11e;if(!this[_0x214978(0x85)]||!this[_0x214978(0x98)])return;this[_0x214978(0x98)][_0x214978(0x7b)](_0x214978(0x92),_0x472ba9,{'level':_0x214978(0x8b),'command':_0x41a9de,'duration':_0x1414c0,'details':_0x448ee9});}[a78_0x3dc11e(0x6a)](_0x2ebeda,_0x4e5983,_0x17ce4c){const _0x199ede=a78_0x3dc11e;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x199ede(0x98)][_0x199ede(0x6a)](_0x4e5983,{'command':_0x2ebeda,'details':_0x17ce4c});}['warn'](_0x21d66e,_0x5cbdbc,_0x4ebc7d){const _0x27d3f8=a78_0x3dc11e;if(!this[_0x27d3f8(0x85)]||!this[_0x27d3f8(0x98)])return;this[_0x27d3f8(0x98)][_0x27d3f8(0x88)](_0x5cbdbc,{'command':_0x21d66e,'details':_0x4ebc7d});}async[a78_0x3dc11e(0x86)](_0x490d8d,_0x481e04,_0x58bb4a){const _0xdcc6e4=a78_0x3dc11e,_0x519cb5=Date['now']();this['info'](_0x490d8d,_0xdcc6e4(0x72)+_0x481e04);try{const _0x3241d0=await _0x58bb4a(),_0x5f196f=Date[_0xdcc6e4(0x91)]()-_0x519cb5;return this[_0xdcc6e4(0x8b)](_0x490d8d,_0xdcc6e4(0x68)+_0x481e04,_0x5f196f),_0x3241d0;}catch(_0xcf8275){const _0x462932=Date['now']()-_0x519cb5;this['error'](_0x490d8d,_0xdcc6e4(0x8d)+_0x481e04,{'error':_0xcf8275 instanceof Error?_0xcf8275[_0xdcc6e4(0x65)]:String(_0xcf8275),'duration':_0x462932});throw _0xcf8275;}}[a78_0x3dc11e(0x75)](){const _0x568dd3=a78_0x3dc11e;try{if(!a78_0x3277ee[_0x568dd3(0x82)](this['logFilePath']))return[];const _0x2961eb=a78_0x3277ee[_0x568dd3(0x77)](this[_0x568dd3(0x85)],'utf8');return _0x2961eb['split'](/\r?\n/)[_0x568dd3(0x9a)](_0x422fa8=>_0x422fa8[_0x568dd3(0x69)]())[_0x568dd3(0x96)](_0x80672e=>JSON[_0x568dd3(0x7a)](_0x80672e));}catch(_0xe322ff){return console[_0x568dd3(0x88)](_0x568dd3(0x78),_0xe322ff),[];}}[a78_0x3dc11e(0x89)](){const _0x852d4b=a78_0x3dc11e;try{a78_0x3277ee[_0x852d4b(0x82)](this[_0x852d4b(0x85)])&&a78_0x3277ee[_0x852d4b(0x74)](this['logFilePath'],'',_0x852d4b(0x6b));}catch(_0x25a3e6){console[_0x852d4b(0x88)](_0x852d4b(0x7c),_0x25a3e6);}}['getWinstonInstance'](){const _0x25d756=a78_0x3dc11e;return this[_0x25d756(0x98)];}}function a78_0x2dc1(_0x1a3427,_0x5585d7){_0x1a3427=_0x1a3427-0x64;const _0x585875=a78_0x5858();let _0x2dc15f=_0x585875[_0x1a3427];return _0x2dc15f;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4cc444,_0x125393){var _0x42d623=a79_0x1042,_0x30ea55=_0x4cc444();while(!![]){try{var _0x2607ba=-parseInt(_0x42d623(0x129))/0x1+-parseInt(_0x42d623(0x130))/0x2+parseInt(_0x42d623(0x127))/0x3+parseInt(_0x42d623(0x12b))/0x4+parseInt(_0x42d623(0x124))/0x5*(-parseInt(_0x42d623(0x12a))/0x6)+parseInt(_0x42d623(0x12f))/0x7*(-parseInt(_0x42d623(0x122))/0x8)+-parseInt(_0x42d623(0x128))/0x9*(-parseInt(_0x42d623(0x12c))/0xa);if(_0x2607ba===_0x125393)break;else _0x30ea55['push'](_0x30ea55['shift']());}catch(_0x3e57ab){_0x30ea55['push'](_0x30ea55['shift']());}}}(a79_0x387f,0xc0c7f));function a79_0x1042(_0x2130a3,_0x34f519){_0x2130a3=_0x2130a3-0x121;var _0x387f5c=a79_0x387f();var _0x1042ef=_0x387f5c[_0x2130a3];return _0x1042ef;}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x4b6c55){var _0x35eb13=a79_0x1042;if(!_0x4b6c55)return undefined;try{return JSON[_0x35eb13(0x126)](_0x4b6c55);}catch{throw CliErrors[_0x35eb13(0x131)](_0x35eb13(0x125)+_0x4b6c55);}}function a79_0x387f(){var _0x21d5d4=['1520034MLoZWd','18qdznRC','174479iLcJAl','6kYNEFz','4286056nGivnA','13707030KNmTHo','isArray','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','5509210TNyhbn','2122692fkpTsF','validation','object','8Gtblyu','items','7535560ESKnot','Invalid\x20JSON\x20for\x20--params:\x20','parse'];a79_0x387f=function(){return _0x21d5d4;};return a79_0x387f();}export function parseJsonParamsValue(_0x12a37b){var _0x218d23=a79_0x1042;if(!_0x12a37b)return undefined;try{return JSON[_0x218d23(0x126)](_0x12a37b);}catch{throw CliErrors[_0x218d23(0x131)](_0x218d23(0x125)+_0x12a37b);}}export function parseBatchCreateItemsFromParams(_0x26eb3f){var _0x45c48d=a79_0x1042;if(Array[_0x45c48d(0x12d)](_0x26eb3f))return _0x26eb3f;if(_0x26eb3f!==null&&_0x26eb3f!==undefined&&typeof _0x26eb3f===_0x45c48d(0x121)&&Array[_0x45c48d(0x12d)](_0x26eb3f[_0x45c48d(0x123)]))return _0x26eb3f[_0x45c48d(0x123)];throw CliErrors[_0x45c48d(0x131)](_0x45c48d(0x12e),'Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27');}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a80_0x237d(){const _0x52cb22=['.cmd','18XwRyxO','559614NuDrrG','133310pfksuw','27662JwNqFp','13920rRVZgz','144dMKKic','104GBKczO','54054NtzCde','win32','104476zzzTSj','59506AcwFSO'];a80_0x237d=function(){return _0x52cb22;};return a80_0x237d();}const a80_0x5b5ee2=a80_0x6279;(function(_0x3c5cac,_0x1c8abc){const _0x371e49=a80_0x6279,_0x553199=_0x3c5cac();while(!![]){try{const _0x2eaf21=parseInt(_0x371e49(0xf9))/0x1+parseInt(_0x371e49(0xf2))/0x2+-parseInt(_0x371e49(0xfb))/0x3*(parseInt(_0x371e49(0xf8))/0x4)+-parseInt(_0x371e49(0xfd))/0x5+parseInt(_0x371e49(0xfc))/0x6+parseInt(_0x371e49(0xf6))/0x7*(parseInt(_0x371e49(0xf5))/0x8)+parseInt(_0x371e49(0xf4))/0x9*(parseInt(_0x371e49(0xf3))/0xa);if(_0x2eaf21===_0x1c8abc)break;else _0x553199['push'](_0x553199['shift']());}catch(_0x5a2c2f){_0x553199['push'](_0x553199['shift']());}}}(a80_0x237d,0x19da0));export const isWindows=process['platform']===a80_0x5b5ee2(0xf7);function a80_0x6279(_0x384069,_0x5403c3){_0x384069=_0x384069-0xf2;const _0x237dd2=a80_0x237d();let _0x627973=_0x237dd2[_0x384069];return _0x627973;}export function resolveNpmBin(_0xca4954){const _0x2487e0=a80_0x5b5ee2;return isWindows?_0xca4954+_0x2487e0(0xfa):_0xca4954;}
|