@lovrabet/lovrabet-cli 2.1.0 → 2.1.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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(_0x13eca0,_0x17d94a){const _0x5d9ac6=a68_0x1920,_0x19b551=_0x13eca0();while(!![]){try{const _0x57174d=parseInt(_0x5d9ac6(0x1de))/0x1+-parseInt(_0x5d9ac6(0x1cc))/0x2*(parseInt(_0x5d9ac6(0x1cd))/0x3)+parseInt(_0x5d9ac6(0x1ca))/0x4*(-parseInt(_0x5d9ac6(0x1da))/0x5)+parseInt(_0x5d9ac6(0x1c8))/0x6+parseInt(_0x5d9ac6(0x1dc))/0x7*(-parseInt(_0x5d9ac6(0x1d8))/0x8)+parseInt(_0x5d9ac6(0x1d5))/0x9*(-parseInt(_0x5d9ac6(0x1db))/0xa)+parseInt(_0x5d9ac6(0x1e5))/0xb;if(_0x57174d===_0x17d94a)break;else _0x19b551['push'](_0x19b551['shift']());}catch(_0xe98726){_0x19b551['push'](_0x19b551['shift']());}}}(a68_0x2842,0xcebd2));import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x2b526d,_0x3cba39,_0x3251a){const _0x172697=a68_0x1920,_0x1609e7=buildConfirmationContext(_0x2b526d,_0x3cba39,_0x3251a),_0x41c5ce=[_0x172697(0x1e0)+_0x1609e7[_0x172697(0x1e3)]];return _0x1609e7[_0x172697(0x1dd)]&&_0x41c5ce['push'](_0x172697(0x1d0)+_0x1609e7['description']),_0x1609e7[_0x172697(0x1d9)]&&_0x41c5ce[_0x172697(0x1e2)](_0x172697(0x1c9)+_0x1609e7['affectedRecords']),_0x41c5ce[_0x172697(0x1e2)](_0x172697(0x1cb)),_0x41c5ce;}export function reconstructCommandArgv(_0x3d3aef,_0x23c4b8){const _0x1a90b7=a68_0x1920,_0x247281=[CLI_BIN_NAME,_0x3d3aef[_0x1a90b7(0x1cf)],_0x3d3aef[_0x1a90b7(0x1d7)]];for(const [_0x2863e6,_0x3b4fb7]of Object[_0x1a90b7(0x1d1)](_0x23c4b8)){if(_0x3b4fb7===!![])_0x247281[_0x1a90b7(0x1e2)]('--'+_0x2863e6);else _0x3b4fb7!==![]&&_0x3b4fb7!==undefined&&_0x3b4fb7!==''&&_0x247281[_0x1a90b7(0x1e2)]('--'+_0x2863e6+'\x20'+JSON[_0x1a90b7(0x1df)](_0x3b4fb7));}return _0x247281[_0x1a90b7(0x1e2)](_0x1a90b7(0x1d4)),_0x247281[_0x1a90b7(0x1d6)]('\x20');}function a68_0x2842(){const _0xe61de7=['\x20\x20\x20Continue?\x20[y/N]\x20','756opWrQu','12861HFhtUS','id=','service','\x20\x20\x20','entries','params','params=','--yes','477TCfRMf','join','command','8sCstGN','affectedRecords','30NBPMMi','23930PYXMbM','9098754yQLOJZ','description','1533793kLVdSm','stringify','⚠\x20\x20High-risk\x20operation:\x20','code=','push','commandLabel','code','21154463JPhjvD','9792450QZICOb','\x20\x20\x20Affected:\x20','796708wZkESQ'];a68_0x2842=function(){return _0xe61de7;};return a68_0x2842();}function buildConfirmationContext(_0x107d6f,_0x279c9c,_0x287be3){const _0x34e5c1=a68_0x1920,_0x53208b=extractAffectedRecords(_0x287be3);return{'commandLabel':_0x279c9c,'description':_0x107d6f[_0x34e5c1(0x1dd)],'affectedRecords':_0x53208b};}function a68_0x1920(_0x296a11,_0x331f25){_0x296a11=_0x296a11-0x1c8;const _0x2842b9=a68_0x2842();let _0x1920bf=_0x2842b9[_0x296a11];return _0x1920bf;}function extractAffectedRecords(_0x325d02){const _0x21d469=a68_0x1920,_0x51381f=[];if(_0x325d02[_0x21d469(0x1e4)])_0x51381f[_0x21d469(0x1e2)](_0x21d469(0x1e1)+_0x325d02[_0x21d469(0x1e4)]);if(_0x325d02['id'])_0x51381f[_0x21d469(0x1e2)](_0x21d469(0x1ce)+_0x325d02['id']);if(_0x325d02['name'])_0x51381f['push']('name='+_0x325d02['name']);if(_0x325d02[_0x21d469(0x1d2)])_0x51381f['push'](_0x21d469(0x1d3)+_0x325d02['params']);return _0x51381f['length']>0x0?_0x51381f[_0x21d469(0x1d6)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15263f,_0x457718){const _0x2d448e=a69_0x1bbf,_0x43f687=_0x15263f();while(!![]){try{const _0xf8b2d7=-parseInt(_0x2d448e(0x18b))/0x1+-parseInt(_0x2d448e(0x185))/0x2+-parseInt(_0x2d448e(0x187))/0x3+parseInt(_0x2d448e(0x18f))/0x4*(-parseInt(_0x2d448e(0x18a))/0x5)+-parseInt(_0x2d448e(0x182))/0x6*(parseInt(_0x2d448e(0x18c))/0x7)+parseInt(_0x2d448e(0x18e))/0x8+parseInt(_0x2d448e(0x189))/0x9*(parseInt(_0x2d448e(0x186))/0xa);if(_0xf8b2d7===_0x457718)break;else _0x43f687['push'](_0x43f687['shift']());}catch(_0x1e81ce){_0x43f687['push'](_0x43f687['shift']());}}}(a69_0x2ea3,0x7e9cd));import{LovrabetError}from'@lovrabet/sdk';function a69_0x1bbf(_0x4af07a,_0x2bafe9){_0x4af07a=_0x4af07a-0x181;const _0x2ea32e=a69_0x2ea3();let _0x1bbfe5=_0x2ea32e[_0x4af07a];return _0x1bbfe5;}import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x1ed518){if(_0x1ed518 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x1ed518));return _0x1ed518;}function userFacingLovrabetMessage(_0x2f1ca8){const _0xde3c0a=a69_0x1bbf,_0x12b714=_0x2f1ca8[_0xde3c0a(0x18d)];if(_0x12b714!==undefined&&_0x12b714!==null){if(typeof _0x12b714===_0xde3c0a(0x183)&&_0x12b714[_0xde3c0a(0x181)]())return _0x12b714['trim']();try{return JSON[_0xde3c0a(0x188)](_0x12b714);}catch{}}return _0x2f1ca8[_0xde3c0a(0x184)];}function a69_0x2ea3(){const _0xa78ecb=['1134gZSNIB','string','message','15218MVZKJW','1833630kHMTAB','1037925xJSQrU','stringify','54pMUaTt','579055fvUOGf','349507BNTmqs','3598KgnuDF','description','4528776brRqac','12uwNZhC','trim'];a69_0x2ea3=function(){return _0xa78ecb;};return a69_0x2ea3();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
const a70_0x5b0c6f=a70_0xeb00;(function(_0x34a288,_0x14be6d){const _0x67ff9a=a70_0xeb00,_0x3384a6=_0x34a288();while(!![]){try{const _0x1851ee=parseInt(_0x67ff9a(0x176))/0x1*(-parseInt(_0x67ff9a(0x16e))/0x2)+-parseInt(_0x67ff9a(0x14d))/0x3+parseInt(_0x67ff9a(0x166))/0x4+-parseInt(_0x67ff9a(0x16a))/0x5+parseInt(_0x67ff9a(0x163))/0x6+-parseInt(_0x67ff9a(0x152))/0x7*(parseInt(_0x67ff9a(0x179))/0x8)+-parseInt(_0x67ff9a(0x173))/0x9*(-parseInt(_0x67ff9a(0x175))/0xa);if(_0x1851ee===_0x14be6d)break;else _0x3384a6['push'](_0x3384a6['shift']());}catch(_0x55abb2){_0x3384a6['push'](_0x3384a6['shift']());}}}(a70_0xb79f,0xdf40e));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(_0x146124){const _0x5e2b92=a70_0xeb00;return void _0x146124,AUTH_MODE[_0x5e2b92(0x188)];}export function createPipelineEnv(_0x60fc4c,_0x2aeae2){const _0x2bbb12=a70_0xeb00,_0x5b3790=typeof _0x2aeae2[_0x2bbb12(0x184)]==='string'&&_0x2aeae2[_0x2bbb12(0x184)][_0x2bbb12(0x172)]();return{'rawFlags':_0x2aeae2,'appCode':_0x60fc4c[_0x2bbb12(0x18b)]||productEnv(_0x2bbb12(0x18f))||(_0x5b3790?undefined:readAppCodeFromConfig()),'appCodeSource':_0x60fc4c[_0x2bbb12(0x154)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x2aeae2),'defaultFormat':_0x60fc4c[_0x2bbb12(0x183)],'defaultPageSize':_0x60fc4c[_0x2bbb12(0x15d)],'defaultVerbose':_0x60fc4c[_0x2bbb12(0x170)],'riskLevel':_0x60fc4c[_0x2bbb12(0x167)],'accessKey':_0x60fc4c['accessKey'],'env':_0x60fc4c[_0x2bbb12(0x181)],'mergedCli':{'defaultApp':_0x60fc4c[_0x2bbb12(0x18c)],'currentApp':_0x60fc4c[_0x2bbb12(0x164)],'appCode':_0x60fc4c[_0x2bbb12(0x18b)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x5b0c6f(0x182)](_0x1ef5f9=>PIPELINE_FLAG_NAMES[a70_0x5b0c6f(0x177)](_0x1ef5f9['name']))[a70_0x5b0c6f(0x174)](({name:_0x2a1eff,type:_0x25b6aa,description:_0x23f9da})=>({'name':_0x2a1eff,'type':_0x25b6aa,'description':_0x23f9da})),'formatOutput':formatOutput,'getCommandLabel'(_0x4897b6){const _0x131e26=a70_0x5b0c6f;return CLI_BIN_NAME+'\x20'+_0x4897b6['service']+'\x20'+_0x4897b6[_0x131e26(0x17d)];},'riskPolicy':{'onViolation'(_0x547c42){const _0x16cee0=a70_0x5b0c6f;console[_0x16cee0(0x168)](_0x547c42);},'createError'(_0x3f2829){const _0x506abe=a70_0x5b0c6f;return CliErrors[_0x506abe(0x15e)](_0x3f2829);}},async 'prepare'(_0x27efd3,_0x12a948){const _0x45389c=a70_0x5b0c6f,_0x14587d=resolveAuthMode(_0x12a948);if(_0x27efd3['requiresAuth']!==![]){if(!_0x12a948['accessKey'])throw CliErrors[_0x45389c(0x155)](_0x45389c(0x157)+PRODUCT_CONFIG[_0x45389c(0x16c)]+_0x45389c(0x150)+productEnvName(_0x45389c(0x165))+'.');const {setActiveAK:_0x1879c8}=await import('../core/api-client.js');_0x1879c8(_0x12a948['accessKey']);}let _0x13113f='';if(_0x27efd3[_0x45389c(0x17c)]!==![]){_0x13113f=_0x12a948[_0x45389c(0x18b)]??'',_0x13113f=await resolveExplicitAppName(_0x27efd3,_0x12a948,_0x13113f);if(!_0x13113f){await assertSelectedAppNameIsRuntimeAccessible(_0x27efd3,_0x12a948);throw CliErrors['configMissing'](_0x45389c(0x15c)+PRODUCT_CONFIG[_0x45389c(0x16c)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x27efd3,_0x12a948,_0x13113f);}if(_0x13113f){const {initSdkClient:_0x479ecb}=await import('../core/sdk-client.js');_0x479ecb({'appCode':_0x13113f,'env':_0x12a948[_0x45389c(0x181)]??'production','accessKey':_0x12a948['accessKey'],'authMode':_0x14587d});}return{'defaults':{'booleans':{'verbose':_0x12a948[_0x45389c(0x187)]},'numbers':{'pagesize':_0x12a948[_0x45389c(0x17b)]}},'extras':{'appCode':_0x13113f,'cookie':'','apiDomain':_0x12a948[_0x45389c(0x151)],'apiDir':'','accessKey':_0x12a948['accessKey'],'envName':_0x12a948[_0x45389c(0x181)],'mergedCli':_0x12a948[_0x45389c(0x14e)]}};},async 'confirmHighRisk'({def:_0x38fc78,env:_0x6ae467,flags:_0x536677,commandLabel:_0x22164d}){const _0x3f2eed=a70_0x5b0c6f;if(_0x6ae467[_0x3f2eed(0x18a)]){const _0x4fcf18=reconstructCommandArgv(_0x38fc78,_0x536677);throw CliErrors[_0x3f2eed(0x16f)](_0x3f2eed(0x178)+_0x22164d+_0x3f2eed(0x14f)+(_0x3f2eed(0x158)+_0x4fcf18));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x38fc78,_0x22164d,_0x536677),'createCancelledError':_0x30d480=>CliErrors[_0x3f2eed(0x15e)](_0x30d480)});},'mapDryRunError'(_0x48510b){return mapUserFacingExecuteError(_0x48510b);},'mapExecuteError'(_0xbdb58b){return mapUserFacingExecuteError(_0xbdb58b);},async 'finalize'(){const _0x4b4d48=a70_0x5b0c6f,{clearActiveAK:_0x2cf6f2}=await import(_0x4b4d48(0x17f));_0x2cf6f2();}};async function resolveExplicitAppName(_0x51be31,_0x4e911e,_0x1d1662){const _0x1629a1=a70_0x5b0c6f;if(_0x51be31[_0x1629a1(0x17c)]===![])return _0x1d1662;const _0x564ba8=typeof _0x4e911e[_0x1629a1(0x185)][_0x1629a1(0x184)]===_0x1629a1(0x16d)?_0x4e911e['rawFlags'][_0x1629a1(0x184)][_0x1629a1(0x172)]():'';if(!_0x564ba8)return _0x1d1662;const _0x77fcf=typeof _0x4e911e['rawFlags']['appcode']===_0x1629a1(0x16d)&&_0x4e911e[_0x1629a1(0x185)][_0x1629a1(0x17a)][_0x1629a1(0x172)]()||productEnv(_0x1629a1(0x18f));if(_0x77fcf||_0x4e911e['appCodeSource']==='local-alias')return _0x1d1662;const {getRemoteAppList:_0x25331c}=await import('../commands/app/remote-source.js'),_0x344f11=await _0x25331c({'env':_0x4e911e[_0x1629a1(0x181)]??'production','accessKey':_0x4e911e[_0x1629a1(0x15b)]}),_0x5315e0=findAppByName(_0x344f11[_0x1629a1(0x156)],_0x564ba8);if(_0x5315e0&&!isRuntimeAccessibleApp(_0x5315e0))throw runtimeInaccessibleAppError(_0x5315e0,'\x22'+_0x564ba8+'\x22');const _0x552dc2=_0x5315e0?.[_0x1629a1(0x18b)]?.[_0x1629a1(0x172)]();if(_0x552dc2)return _0x552dc2;throw CliErrors[_0x1629a1(0x16f)](_0x1629a1(0x171)+_0x564ba8,_0x1629a1(0x159)+CLI_BIN_NAME+_0x1629a1(0x17e)+_0x564ba8+_0x1629a1(0x189)+PRODUCT_CONFIG[_0x1629a1(0x16c)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x56f5b0,_0x2d8053){const _0x144cbb=a70_0x5b0c6f;if(_0x56f5b0[_0x144cbb(0x17c)]===![]||!_0x2d8053[_0x144cbb(0x15b)])return;const _0x4e5440=(typeof _0x2d8053[_0x144cbb(0x185)][_0x144cbb(0x184)]==='string'&&_0x2d8053[_0x144cbb(0x185)]['app'][_0x144cbb(0x172)]()?_0x2d8053[_0x144cbb(0x185)][_0x144cbb(0x184)]:_0x2d8053['mergedCli']?.[_0x144cbb(0x164)]??_0x2d8053[_0x144cbb(0x14e)]?.[_0x144cbb(0x18c)])?.[_0x144cbb(0x172)]();if(!_0x4e5440)return;const {getRemoteAppList:_0x1ec0f2}=await import(_0x144cbb(0x160)),_0x15c05c=await _0x1ec0f2({'env':_0x2d8053['env']??'production','accessKey':_0x2d8053[_0x144cbb(0x15b)]}),_0x4a7851=findAppByName(_0x15c05c[_0x144cbb(0x156)],_0x4e5440);if(_0x4a7851&&!isRuntimeAccessibleApp(_0x4a7851))throw runtimeInaccessibleAppError(_0x4a7851,'\x22'+_0x4e5440+'\x22');}function a70_0xeb00(_0x4e0e0e,_0x24ce04){_0x4e0e0e=_0x4e0e0e-0x14d;const _0xb79f26=a70_0xb79f();let _0xeb00cc=_0xb79f26[_0x4e0e0e];return _0xeb00cc;}async function assertAppCodeIsRuntimeAccessible(_0x1c29ab,_0x51dfda,_0x49f050){const _0x594735=a70_0x5b0c6f;if(_0x1c29ab[_0x594735(0x17c)]===![]||!_0x51dfda[_0x594735(0x15b)])return;const {getRemoteAppList:_0x215f09}=await import(_0x594735(0x160)),_0xce86b6=await _0x215f09({'env':_0x51dfda[_0x594735(0x181)]??'production','accessKey':_0x51dfda[_0x594735(0x15b)]}),_0x40ada0=findAppByCode(_0xce86b6[_0x594735(0x156)],_0x49f050);if(_0x40ada0&&!isRuntimeAccessibleApp(_0x40ada0))throw runtimeInaccessibleAppError(_0x40ada0,_0x594735(0x180)+_0x49f050+'\x22');}export async function runCommand(_0x1e0e69,_0x3b8883){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1e0e69)?withUpdateNotice(_0x1e0e69):_0x1e0e69,_0x3b8883,runnerAdapter);}function shouldAttachUpdateNotice(_0x564348){const _0x4f0b2b=a70_0x5b0c6f;return![_0x4f0b2b(0x162),'schema',_0x4f0b2b(0x161)][_0x4f0b2b(0x169)](_0x564348[_0x4f0b2b(0x16b)]);}function withUpdateNotice(_0x3b8a95){return{..._0x3b8a95,async 'execute'(_0x1978ef){const _0x190cde=a70_0xeb00,_0x5a5301=shouldResolveUpdateNotice(_0x1978ef)?resolveLatestUpdateNotice()[_0x190cde(0x15a)](()=>null):Promise[_0x190cde(0x15f)](null),_0x295bc8=await _0x3b8a95[_0x190cde(0x18e)](_0x1978ef);return attachUpdateNotice(_0x295bc8,await _0x5a5301);}};}function shouldResolveUpdateNotice(_0x2a4d16){const _0x3a02dd=a70_0x5b0c6f;return _0x2a4d16[_0x3a02dd(0x183)]===_0x3a02dd(0x153)&&!_0x2a4d16['nonInteractive'];}function attachUpdateNotice(_0x5a1635,_0x582ff8){const _0x38d166=a70_0x5b0c6f;if(!_0x582ff8||!_0x5a1635||typeof _0x5a1635!==_0x38d166(0x186))return _0x5a1635;const _0x281934=_0x5a1635,_0xdfcd48=typeof _0x281934['_notice']===_0x38d166(0x186)&&_0x281934[_0x38d166(0x18d)]!==null?_0x281934['_notice']:{};return{..._0x281934,'_notice':{..._0xdfcd48,'update':_0x582ff8}};}function a70_0xb79f(){const _0x5575ab=['riskLevel','error','includes','839435bLBiao','service','newConfigFileName','string','1905334sXkHoL','validation','verbose','Unknown\x20app:\x20','trim','9976329bvFxaq','map','30EdmoNN','1FmJeqd','has','High-risk\x20operation\x20`','48hFmvsY','appcode','defaultPageSize','requiresAppCode','command','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../core/api-client.js','appcode\x20\x22','env','filter','format','app','rawFlags','object','defaultVerbose','ClientAk','.appcode\x20to\x20','isNonInteractive','appCode','defaultApp','_notice','execute','APPCODE','2267835pPBFyu','mergedCli','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','\x20or\x20pass\x20','apiDomain','1001014lWqMOb','pretty','appCodeSource','authRequired','items','Set\x20accessKey\x20in\x20','\x20\x20To\x20proceed:\x20','Run\x20`','catch','accessKey','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','pageSize','cancelled','resolve','../commands/app/remote-source.js','doctor','update','1629738pmxJnG','currentApp','ACCESS_KEY','207564nFRufs'];a70_0xb79f=function(){return _0x5575ab;};return a70_0xb79f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x312a07,_0x59df62){const _0x100a08=a71_0xfa0f,_0x493d50=_0x312a07();while(!![]){try{const _0x15a08d=-parseInt(_0x100a08(0x1c1))/0x1*(-parseInt(_0x100a08(0x1b9))/0x2)+-parseInt(_0x100a08(0x1ba))/0x3+-parseInt(_0x100a08(0x1c2))/0x4*(parseInt(_0x100a08(0x1c4))/0x5)+-parseInt(_0x100a08(0x1bc))/0x6*(-parseInt(_0x100a08(0x1bf))/0x7)+parseInt(_0x100a08(0x1bb))/0x8+-parseInt(_0x100a08(0x1c6))/0x9+parseInt(_0x100a08(0x1bd))/0xa;if(_0x15a08d===_0x59df62)break;else _0x493d50['push'](_0x493d50['shift']());}catch(_0x1a8c09){_0x493d50['push'](_0x493d50['shift']());}}}(a71_0xd6b3,0x611a0));import{buildSchemaPayload as a71_0x2a1bbf}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a71_0xd6b3(){const _0x557a50=['1095309QNnVZS','2doHnHv','2151336uVZsaS','2224632fQnBBM','6DcFTta','7351850QuDhDi','has','3686291HvLrpH','map','299542dDchln','32588gFnSAv','service','370NxPPCO','filter'];a71_0xd6b3=function(){return _0x557a50;};return a71_0xd6b3();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a71_0xfa0f(_0x2188b3,_0x490653){_0x2188b3=_0x2188b3-0x1b9;const _0xd6b330=a71_0xd6b3();let _0xfa0f0d=_0xd6b330[_0x2188b3];return _0xfa0f0d;}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x1fcc38=a71_0xfa0f,{serviceRegistry:_0x2c8917,findDefinition:_0x26c6a7}=await import('../commands/registry.js'),_0x55bc73=new Set(_0x2c8917[_0x1fcc38(0x1c0)](_0x2fec18=>_0x2fec18[_0x1fcc38(0x1c3)])),_0x2c2f8=listDynamicServiceEntries()[_0x1fcc38(0x1c5)](_0x36cfe4=>!_0x55bc73[_0x1fcc38(0x1be)](_0x36cfe4[_0x1fcc38(0x1c3)]));return a71_0x2a1bbf({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x2c8917,..._0x2c2f8],'buildAllFlags':buildAllFlags,'findDefinition':(_0x401765,_0x3c4d18)=>_0x26c6a7(_0x401765,_0x3c4d18)??findDynamicServiceDefinition(_0x401765,_0x3c4d18)});}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3bad96,_0x4b652e){var _0xd33185=a72_0x3d54,_0x416ac0=_0x3bad96();while(!![]){try{var _0x2edfa3=-parseInt(_0xd33185(0x141))/0x1+-parseInt(_0xd33185(0x143))/0x2+-parseInt(_0xd33185(0x149))/0x3*(parseInt(_0xd33185(0x142))/0x4)+parseInt(_0xd33185(0x140))/0x5+parseInt(_0xd33185(0x146))/0x6*(-parseInt(_0xd33185(0x144))/0x7)+parseInt(_0xd33185(0x147))/0x8+-parseInt(_0xd33185(0x148))/0x9*(-parseInt(_0xd33185(0x145))/0xa);if(_0x2edfa3===_0x4b652e)break;else _0x416ac0['push'](_0x416ac0['shift']());}catch(_0x193195){_0x416ac0['push'](_0x416ac0['shift']());}}}(a72_0x1e85,0x8ce1c));function a72_0x3d54(_0x42764e,_0x47f2ae){_0x42764e=_0x42764e-0x140;var _0x1e8585=a72_0x1e85();var _0x3d54d9=_0x1e8585[_0x42764e];return _0x3d54d9;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a72_0x1e85(){var _0xf87b22=['1556168PDIvrQ','1872060rwAVTx','57603ZjZIYF','3490wScZNY','258FLcoYr','4588432BtQqXm','31203GgdcSV','3FgPBKD','2932135CKgwRK','113993VagKCK'];a72_0x1e85=function(){return _0xf87b22;};return a72_0x1e85();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x3e3153=a73_0x58d1;function a73_0x58d1(_0x3b812d,_0x1b471f){_0x3b812d=_0x3b812d-0xea;const _0x31d715=a73_0x31d7();let _0x58d138=_0x31d715[_0x3b812d];return _0x58d138;}(function(_0xbe3935,_0x45c03d){const _0x3511a3=a73_0x58d1,_0x5591d0=_0xbe3935();while(!![]){try{const _0x396b5b=-parseInt(_0x3511a3(0xee))/0x1+-parseInt(_0x3511a3(0xf3))/0x2+-parseInt(_0x3511a3(0xf1))/0x3*(parseInt(_0x3511a3(0xef))/0x4)+-parseInt(_0x3511a3(0xec))/0x5*(parseInt(_0x3511a3(0xed))/0x6)+-parseInt(_0x3511a3(0xf2))/0x7*(-parseInt(_0x3511a3(0xf5))/0x8)+parseInt(_0x3511a3(0xea))/0x9+parseInt(_0x3511a3(0xf0))/0xa*(parseInt(_0x3511a3(0xf4))/0xb);if(_0x396b5b===_0x45c03d)break;else _0x5591d0['push'](_0x5591d0['shift']());}catch(_0x46425a){_0x5591d0['push'](_0x5591d0['shift']());}}}(a73_0x31d7,0x28e66));function a73_0x31d7(){const _0x1d9c97=['6BpEcnW','14DZwjxr','420764QoJESq','49566UjsQWS','138152sVNEIU','2.1.1-beta.1','v2.1.1-beta.1','1049004LkUzpH','2026-07-03T03:00:50.570Z','1607560QgmiVe','6JiXpii','280012FNlcNU','542252axTnhF','2440IKheAr'];a73_0x31d7=function(){return _0x1d9c97;};return a73_0x31d7();}export const VERSION=a73_0x3e3153(0xf6);export const GIT_TAG=a73_0x3e3153(0xf7);export const GIT_COMMIT='89ebe34';export const BUILD_TIME=a73_0x3e3153(0xeb);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55aa7b,_0x34ef76){const _0x1179ab=a74_0x359e,_0x2048eb=_0x55aa7b();while(!![]){try{const _0x5983fb=parseInt(_0x1179ab(0x1bf))/0x1*(-parseInt(_0x1179ab(0x1c0))/0x2)+parseInt(_0x1179ab(0x1be))/0x3+parseInt(_0x1179ab(0x1b9))/0x4+parseInt(_0x1179ab(0x1b5))/0x5+-parseInt(_0x1179ab(0x1b6))/0x6*(parseInt(_0x1179ab(0x1bd))/0x7)+parseInt(_0x1179ab(0x1bb))/0x8+-parseInt(_0x1179ab(0x1b8))/0x9;if(_0x5983fb===_0x34ef76)break;else _0x2048eb['push'](_0x2048eb['shift']());}catch(_0x2be8c6){_0x2048eb['push'](_0x2048eb['shift']());}}}(a74_0x4a62,0xecfc7));function a74_0x359e(_0x51994a,_0x5773fb){_0x51994a=_0x51994a-0x1b4;const _0x4a6204=a74_0x4a62();let _0x359eb5=_0x4a6204[_0x51994a];return _0x359eb5;}import{jsx as a74_0x52ec34,jsxs as a74_0x5af66e}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x448d27=a74_0x359e,{exit:_0x5e69ad}=useApp();return useEffect(()=>{_0x5e69ad();},[_0x5e69ad]),a74_0x5af66e(Box,{'flexDirection':_0x448d27(0x1b7),'marginTop':0x1,'marginBottom':0x1,'children':[a74_0x52ec34(Box,{'children':a74_0x52ec34(Text,{'bold':!![],'color':_0x448d27(0x1ba),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a74_0x5af66e(Box,{'marginTop':0x1,'children':[a74_0x52ec34(Text,{'dimColor':!![],'children':_0x448d27(0x1bc)}),a74_0x52ec34(Text,{'bold':!![],'color':_0x448d27(0x1ba),'children':CLI_BIN_NAME+_0x448d27(0x1b4)}),a74_0x52ec34(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}function a74_0x4a62(){const _0x33370a=['12859392Jhcnds','\x20\x20Use\x20','12035317JDdXda','1596705iILQUj','15509YLrDcm','94rGWGEE','\x20--help','7187735OyZrxM','6QVxNaR','column','2306448Uyyqdz','392060xDZwKh','green'];a74_0x4a62=function(){return _0x33370a;};return a74_0x4a62();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a75_0x260d07=a75_0x56c7;function a75_0x56c7(_0x1ed651,_0x3f8c72){_0x1ed651=_0x1ed651-0x1b9;const _0x44a444=a75_0x44a4();let _0x56c78a=_0x44a444[_0x1ed651];return _0x56c78a;}(function(_0x3e2fa0,_0x215746){const _0x38a1a2=a75_0x56c7,_0x3a23b2=_0x3e2fa0();while(!![]){try{const _0x2438ce=-parseInt(_0x38a1a2(0x1bd))/0x1*(-parseInt(_0x38a1a2(0x1c6))/0x2)+-parseInt(_0x38a1a2(0x1ce))/0x3*(parseInt(_0x38a1a2(0x1c4))/0x4)+-parseInt(_0x38a1a2(0x1bb))/0x5*(parseInt(_0x38a1a2(0x1ca))/0x6)+-parseInt(_0x38a1a2(0x1cb))/0x7*(parseInt(_0x38a1a2(0x1cf))/0x8)+-parseInt(_0x38a1a2(0x1bc))/0x9*(-parseInt(_0x38a1a2(0x1d1))/0xa)+parseInt(_0x38a1a2(0x1c2))/0xb+-parseInt(_0x38a1a2(0x1c5))/0xc*(-parseInt(_0x38a1a2(0x1cc))/0xd);if(_0x2438ce===_0x215746)break;else _0x3a23b2['push'](_0x3a23b2['shift']());}catch(_0x55fc98){_0x3a23b2['push'](_0x3a23b2['shift']());}}}(a75_0x44a4,0xce7b4));function a75_0x44a4(){const _0x30860e=['skills','4112lNjxnt','12ANXHNV','170ukzMpU','exit\x20','stdout','skipNpxSkillsEnvSuffix','6nNCcPp','3084025TnFsxA','17989907sPlUgx','npx','1803NZbRnY','16ETNbYK','join','10taatdp','stdio','pipe','3435590tCEYIl','10961505zNxGdc','3269ZtdlIq','add','trim','toString','stderr','1674145WUGawF'];a75_0x44a4=function(){return _0x30860e;};return a75_0x44a4();}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a75_0x3c1d3d}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a75_0x3c1d3d;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a75_0x260d07(0x1c9)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x4f55a0,_0x4c40ac=LOVRABET_SKILL_SOURCE,_0x14b831){const _0x14731f=a75_0x260d07;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x249788=_0x14b831?.[_0x14731f(0x1b9)]??'inherit',_0x3236b9=resolveNpmBin(_0x14731f(0x1cd)),_0x51639c=[_0x14731f(0x1c3),_0x14731f(0x1be),_0x4c40ac,'-g','-y'],_0x59c700=[_0x3236b9,..._0x51639c][_0x14731f(0x1d0)]('\x20');console['log']('*\x20'+_0x59c700);const _0x1ec302=spawnSync(_0x3236b9,_0x51639c,{'cwd':_0x4f55a0,'stdio':_0x249788,'env':process.env,'shell':![]});if(_0x1ec302['status']===0x0)return{'ok':!![],'status':0x0};let _0x4fcedb=_0x14731f(0x1c7)+(_0x1ec302['status']??'unknown');if(_0x249788===_0x14731f(0x1ba)){const _0x355f91=_0x1ec302[_0x14731f(0x1c1)]?_0x1ec302['stderr'][_0x14731f(0x1c0)]()[_0x14731f(0x1bf)]():'',_0x40822d=_0x1ec302[_0x14731f(0x1c8)]?_0x1ec302['stdout'][_0x14731f(0x1c0)]()['trim']():'';if(_0x355f91)_0x4fcedb=_0x355f91;else{if(_0x40822d)_0x4fcedb=_0x40822d;}}return{'ok':![],'status':_0x1ec302['status']??null,'error':_0x4fcedb};}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a76_0x2cc1d9=a76_0x4e55;(function(_0x3f1d7f,_0x584e3d){const _0x9e1873=a76_0x4e55,_0x41b99e=_0x3f1d7f();while(!![]){try{const _0x58670c=parseInt(_0x9e1873(0x16b))/0x1*(parseInt(_0x9e1873(0x17d))/0x2)+parseInt(_0x9e1873(0x14b))/0x3+-parseInt(_0x9e1873(0x166))/0x4+parseInt(_0x9e1873(0x1b3))/0x5+parseInt(_0x9e1873(0x16c))/0x6+parseInt(_0x9e1873(0x1fc))/0x7+-parseInt(_0x9e1873(0x185))/0x8;if(_0x58670c===_0x584e3d)break;else _0x41b99e['push'](_0x41b99e['shift']());}catch(_0x3fec8d){_0x41b99e['push'](_0x41b99e['shift']());}}}(a76_0x519e,0x8ac49));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_0x2cc1d9(0x1a6),SKILL_FILE=a76_0x2cc1d9(0x200),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_0x2cc1d9(0x15f)]),IGNORED_DIR_NAMES=new Set(['.git',a76_0x2cc1d9(0x1d7),a76_0x2cc1d9(0x18d),a76_0x2cc1d9(0x13e),a76_0x2cc1d9(0x145),a76_0x2cc1d9(0x1cd),a76_0x2cc1d9(0x17f),'coverage',a76_0x2cc1d9(0x14c),a76_0x2cc1d9(0x184)]),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(_0x4efb18={}){const _0x47e536=a76_0x2cc1d9,_0x274c3c=_0x4efb18[_0x47e536(0x135)]??homedir(),_0x10735b=resolve(_0x274c3c,PRODUCT_CONFIG[_0x47e536(0x16f)],_0x47e536(0x1a2)),_0x144ba6=trimmedEnv(_0x47e536(0x205)),_0x6b578e=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0x274c3c,'cacheRoot':_0x10735b,'managedRoot':resolve(_0x274c3c,PRODUCT_CONFIG[_0x47e536(0x16f)]),'agentsSkillsDir':_0x4efb18[_0x47e536(0x14a)]??_0x144ba6??resolve(_0x274c3c,_0x47e536(0x19f),_0x47e536(0x15d)),'claudeSkillsDir':_0x4efb18[_0x47e536(0x175)]??_0x6b578e??resolve(_0x274c3c,_0x47e536(0x1b4),_0x47e536(0x15d))};}export function getRuntimeSkillCacheRoot(_0x19a802,_0xfae044,_0x3dc13a={}){const _0x20da43=resolveSkillSyncPaths(_0x3dc13a);return resolve(_0x20da43['cacheRoot'],_0x19a802,fingerprintAccessKey(_0xfae044),'skills');}export function getRuntimeSkillDir(_0x53cb05,_0x3999e0,_0x5a32ce,_0x66e80d,_0x273715,_0x2498f6={}){const _0x446457=a76_0x2cc1d9;return resolve(getRuntimeSkillCacheRoot(_0x53cb05,_0x3999e0,_0x2498f6),safePathSegment(_0x5a32ce,_0x446457(0x190)),_0x66e80d,safePathSegment(_0x273715,_0x446457(0x1aa)));}export function listLocalRuntimeSkills(_0x4b0508,_0x244cf0={}){const _0x2452d9=a76_0x2cc1d9,_0x32e261=safePathSegment(_0x4b0508[_0x2452d9(0x190)],'appCode'),_0x1ffb2c=normalizeRuntimeSkillScopes(_0x4b0508[_0x2452d9(0x1f9)]),_0x322342=new Set(_0x1ffb2c),_0x561eb3=_0x4b0508[_0x2452d9(0x1f2)]?.['trim'](),_0x4565df=new Map(),_0xaa0ec4=resolve(getRuntimeSkillCacheRoot(_0x4b0508[_0x2452d9(0x1bf)],_0x4b0508[_0x2452d9(0x13a)],_0x244cf0),_0x32e261);for(const _0x396153 of _0x1ffb2c){for(const _0x487c38 of localSkillEntryDirs(resolve(_0xaa0ec4,_0x396153))){collectLocalRuntimeSkill(_0x4565df,_0x487c38,{'appCode':_0x32e261,'scopes':_0x322342,'code':_0x561eb3,'source':_0x2452d9(0x1a2)});}}const _0x2d9aa7=resolveSkillSyncPaths(_0x244cf0);for(const _0x57173e of[_0x2d9aa7[_0x2452d9(0x14a)],_0x2d9aa7[_0x2452d9(0x175)]]){for(const _0x2953e1 of localSkillLinkCandidates(_0x57173e,_0x32e261,_0x322342)){collectLocalRuntimeSkill(_0x4565df,_0x2953e1,{'appCode':_0x32e261,'scopes':_0x322342,'code':_0x561eb3,'source':_0x2452d9(0x1d0),'linkedPath':_0x2953e1});}}return Array[_0x2452d9(0x18a)](_0x4565df[_0x2452d9(0x1b2)]())[_0x2452d9(0x1c6)](compareLocalRuntimeSkills);}export function contentHash(_0x31ffdb){const _0x965ac6=a76_0x2cc1d9;return createHash(_0x965ac6(0x136))[_0x965ac6(0x1eb)](_0x31ffdb)[_0x965ac6(0x134)]('hex');}function fileContent(_0x92b717){const _0x829cdb=a76_0x2cc1d9;return _0x92b717[_0x829cdb(0x148)]??Buffer[_0x829cdb(0x18a)](_0x92b717[_0x829cdb(0x188)]??'',_0x829cdb(0x1fa));}function fileText(_0x5ae6ff){return fileContent(_0x5ae6ff)['toString']('utf8');}function fileHash(_0x17510e){return bufferSha256(fileContent(_0x17510e));}function bufferSha256(_0xc7e99a){const _0x21a5ed=a76_0x2cc1d9;return createHash(_0x21a5ed(0x136))[_0x21a5ed(0x1eb)](_0xc7e99a)[_0x21a5ed(0x134)](_0x21a5ed(0x1a3));}export function fileTreeHash(_0x7519af){const _0x3f5c2b=a76_0x2cc1d9,_0x489f1d=createHash('sha256');for(const _0x4e9ebc of normalizeManifestFiles(_0x7519af)){_0x489f1d['update'](_0x4e9ebc[_0x3f5c2b(0x174)]),_0x489f1d[_0x3f5c2b(0x1eb)]('\x00'),_0x489f1d[_0x3f5c2b(0x1eb)](_0x4e9ebc[_0x3f5c2b(0x136)]),_0x489f1d['update']('\x00'),_0x489f1d[_0x3f5c2b(0x1eb)](String(_0x4e9ebc[_0x3f5c2b(0x1db)])),_0x489f1d['update']('\x00');}return _0x489f1d[_0x3f5c2b(0x134)](_0x3f5c2b(0x1a3));}export function buildSkillPackage(_0x346d39){const _0x2b0493=a76_0x2cc1d9,_0x21196f=normalizeLocalFiles(_0x346d39);if(!_0x21196f['some'](_0x3bb08c=>_0x3bb08c[_0x2b0493(0x174)]===SKILL_FILE))throw CliErrors['validation'](_0x2b0493(0x14e)+SKILL_FILE+_0x2b0493(0x1e1));const _0x596ae2=localFilesToManifestFiles(_0x21196f),_0x2bb7ea=createDeterministicZipPackage(_0x21196f);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x596ae2),'zipSha256':bufferSha256(_0x2bb7ea),'zipSize':_0x2bb7ea[_0x2b0493(0x170)],'files':_0x596ae2},'packageBytes':_0x2bb7ea,'packageBase64':_0x2bb7ea['toString'](_0x2b0493(0x161))};}export function verifyRuntimeSkillPackage(_0x29d5ca,_0x447adc){const _0x426f2d=a76_0x2cc1d9,_0x2bc72e=normalizePackageManifest(_0x29d5ca,{'requireOssPath':![]});if(!_0x2bc72e)throw CliErrors[_0x426f2d(0x198)](_0x426f2d(0x1b1));return extractAndVerifyPackage(_0x2bc72e,_0x447adc);}function a76_0x519e(){const _0x374036=['schemaVersion','Runtime\x20Skill\x20package\x20central\x20directory\x20size\x20mismatch.','treeSha256','accessKey','status','isSafeInteger','split','node_modules','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','force','endsWith','keys','parse','paths','.next','managedRoot','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','bytes','skill','agentsSkillsDir','1079427RBoqHb','.turbo','readUInt32LE','Missing\x20','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20data:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','\x20or\x20directory\x20name.','max','join','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','builtin','files','subarray','removed','Managed\x20file\x20was\x20removed\x20locally:\x20','skills','Skill\x20package\x20exceeds\x20size\x20limit.','.DS_Store','test','base64','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','isBuffer','metadataPath','contentHash','4495892RfJpmq','Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','Runtime\x20Skill\x20package\x20CRC\x20mismatch:\x20','105JGKNpH','4002720hjMIoV','stringify','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','homeDirName','length','writeUInt16LE','Runtime\x20Skill\x20package\x20local\x20header\x20mismatch:\x20','hasUpstreamUpdate','path','claudeSkillsDir','isFile','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','version','description','fileHashes','readUInt16LE','skillMdPath','18078oFABtR','Runtime\x20Skill\x20package\x20has\x20truncated\x20central\x20directory.','build','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20package-backed\x20Skill:\x20','ossPath','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','.cache','11319392swjSUO','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','zipSha256','content','startsWith','from','compare','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20entry.','.svn','toString','includes','appCode','set','filter','not-managed-symlink','Runtime\x20Skill\x20package\x20local\x20path\x20mismatch:\x20','fromEntries','Unsupported\x20runtime\x20Skill\x20scope:\x20','Push\x20the\x20directory\x20first\x20or\x20rerun\x20pull\x20with\x20a\x20future\x20force\x20option.\x20Changed\x20file:\x20','validation','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20','source','toISOString','Skill\x20metadata\x20appCode\x20\x22','.agents','.tmp','sourceSessionId','cache','hex','Invalid\x20','Runtime\x20Skill\x20package\x20contains\x20unsupported\x20compression\x20method.','lovrabet.skill.json','copy','writeUInt32LE','\x20does\x20not\x20match\x20backend\x20content:\x20','skillCode','linkedPath','unchanged','slice','name','Skill\x20directory\x20not\x20found:\x20','cacheDir','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','values','1041565RYlzOE','.claude','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','localeCompare','string','isDirectory','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20offsets.','Skill\x20file\x20path\x20must\x20be\x20text.','linkedPaths','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Unsafe\x20Skill\x20file\x20path:\x20','env','dir','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','\x20has\x20scope=\x22','skillName','.\x20Changed\x20file:\x20','---','sort','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','toLowerCase','readonly','push','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','path\x20segment','dist','Runtime\x20Skill\x20package\x20has\x20truncated\x20local\x20header:\x20','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20name.','link','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','scope','zipSize','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','requireOssPath','forkedFromVersion','.hg','some','\x20for\x20local\x20path:\x20','Runtime\x20Skill\x20package\x20uncompressed\x20size\x20mismatch:\x20','size','Runtime\x20Skill\x20package\x20size\x20mismatch.','updated','Runtime\x20Skill\x20package\x20is\x20missing\x20zip\x20central\x20directory.','Unsafe\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','map','company','trim','personal','pruneSkillCodes','object','update','tenantCode','replace','pushedAt','has','Skill\x20file\x20exceeds\x20size\x20limit:\x20','concat','code','tags','isSymbolicLink','find','alloc','name:\x20','get','scopes','utf8','description:\x20','6460671ZtOnhI','Runtime\x20Skill\x20package\x20contains\x20encrypted\x20entries.','entries','local','SKILL.md','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','skipped','userId','Duplicate\x20Skill\x20file\x20path:\x20','SKILL_ROOT','isArray','pulledAt','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','created','digest','homeDir','sha256'];a76_0x519e=function(){return _0x374036;};return a76_0x519e();}export function verifyRuntimeSkillBundle(_0x380270,_0x372d6f){const _0x193519=a76_0x2cc1d9,_0x28a094=normalizePackageManifest(_0x380270,{'requireOssPath':![]});if(!_0x28a094)throw CliErrors[_0x193519(0x198)](_0x193519(0x1b1));if(_0x372d6f[_0x193519(0x170)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x193519(0x198)](_0x193519(0x183));return extractAndVerifyPackageFiles(_0x28a094,_0x372d6f);}export function materializeRuntimeSkill(_0x49609b,_0x34836a,_0x6b8419){const _0x251043=a76_0x2cc1d9,_0x46728c=requireSkillCode(_0x49609b),_0x5b0ae2=normalizeRemoteManifest(_0x49609b['files']),_0xaf3c77=_0x5b0ae2!==undefined,_0x60b381=_0xaf3c77?requirePackageBytes(_0x46728c,_0x6b8419['packageBytes']):undefined,_0x2db9bf=_0xaf3c77?extractAndVerifyPackage(_0x5b0ae2,_0x60b381):[{'path':SKILL_FILE,'content':_0x49609b[_0x251043(0x188)]??''}],_0x2684cf=_0x2db9bf[_0x251043(0x1f5)](_0xa368b1=>_0xa368b1[_0x251043(0x174)]===SKILL_FILE);if(!_0x2684cf)throw CliErrors[_0x251043(0x198)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x46728c);const _0x3fb785=fileText(_0x2684cf);if(_0xaf3c77&&_0x49609b[_0x251043(0x188)]!==undefined&&_0x49609b[_0x251043(0x188)]!==_0x3fb785)throw CliErrors[_0x251043(0x198)](_0x251043(0x19b)+SKILL_FILE+_0x251043(0x1a9)+_0x46728c);const _0x36e28d=withMaterializedSkillFrontmatter(_0x2db9bf,_0x49609b,_0x46728c),_0x14ec0a=_0x36e28d[_0x251043(0x1f5)](_0x19e476=>_0x19e476[_0x251043(0x174)]===SKILL_FILE),_0x411d88=fileText(_0x14ec0a),_0x437976=getRuntimeSkillDir(_0x6b8419[_0x251043(0x1bf)],_0x6b8419[_0x251043(0x13a)],_0x6b8419[_0x251043(0x190)],_0x34836a,_0x46728c,_0x6b8419[_0x251043(0x144)]),_0x3aea04=resolve(_0x437976,SKILL_FILE),_0x4a3b2b=resolve(_0x437976,METADATA_FILE),_0x398193=contentHash(_0x411d88),_0xdeb9a7=readMetadataIfPresent(_0x4a3b2b)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x437976,_0x4a3b2b,_0x36e28d,_0x6b8419[_0x251043(0x140)]===!![]),mkdirSync(_0x437976,{'recursive':!![],'mode':0x1c0});const _0x38fd1a=existsSync(_0x3aea04)?readFileSync(_0x3aea04,_0x251043(0x1fa)):undefined;return materializeFiles(_0x437976,_0x36e28d),_0xaf3c77&&removeStaleManagedFiles(_0x437976,_0xdeb9a7,_0x36e28d),writeJsonAtomic(_0x4a3b2b,buildMetadata(_0x49609b,_0x34836a,_0x6b8419[_0x251043(0x190)],_0x398193,_0x6b8419[_0x251043(0x131)],_0xaf3c77?_0x36e28d:undefined)),{'skill':_0x49609b,'scope':_0x34836a,'dir':_0x437976,'skillMdPath':_0x3aea04,'metadataPath':_0x4a3b2b,'contentHash':_0x398193,'changed':_0x38fd1a!==_0x411d88};}function withMaterializedSkillFrontmatter(_0x259c27,_0x2f94db,_0x183b43){const _0x5c2e38=a76_0x2cc1d9;return normalizeLocalFiles(_0x259c27)[_0x5c2e38(0x1e5)](_0x4e2939=>{const _0x336aa5=_0x5c2e38,_0x48ea61=fileText(_0x4e2939);if(_0x4e2939[_0x336aa5(0x174)]!==SKILL_FILE||hasYamlFrontmatter(_0x48ea61))return _0x4e2939;return{'path':_0x4e2939['path'],'content':prependSkillFrontmatter(_0x48ea61,{'name':_0x183b43,'description':_0x2f94db['description']?.[_0x336aa5(0x1e7)]()||_0x2f94db[_0x336aa5(0x1c3)]?.[_0x336aa5(0x1e7)]()||_0x183b43})};});}function hasYamlFrontmatter(_0x1d20bc){const _0x542b88=a76_0x2cc1d9;return/^\uFEFF?---\s*\r?\n/[_0x542b88(0x160)](_0x1d20bc);}function prependSkillFrontmatter(_0x512797,_0x17b400){const _0x212988=a76_0x2cc1d9,_0x2706c3=_0x512797[_0x212988(0x1ed)](/^\uFEFF/,'');return[_0x212988(0x1c5),_0x212988(0x1f7)+yamlString(_0x17b400[_0x212988(0x1ae)]),_0x212988(0x1fb)+yamlString(_0x17b400[_0x212988(0x179)]),_0x212988(0x1c5),'',_0x2706c3][_0x212988(0x154)]('\x0a');}function yamlString(_0x14bd2c){const _0x242776=a76_0x2cc1d9;return JSON[_0x242776(0x16d)](_0x14bd2c[_0x242776(0x1ed)](/\r/g,'')[_0x242776(0x1e7)]());}export function linkEffectiveRuntimeSkills(_0x516770,_0x30a55f,_0x43142e={}){const _0xbd8ef6=a76_0x2cc1d9,_0x296fa6=new Map();for(const _0xa6b4ad of _0x516770){const _0x130cbe=_0xa6b4ad['skill'][_0xbd8ef6(0x1aa)];if(!_0x130cbe)continue;const _0x17c453=_0x296fa6[_0xbd8ef6(0x1f8)](_0x130cbe);(!_0x17c453||_0xa6b4ad[_0xbd8ef6(0x1d2)]==='personal')&&_0x296fa6['set'](_0x130cbe,_0xa6b4ad);}const _0x619a3e=[],_0x1c1d11=resolveSkillSyncPaths(_0x43142e);for(const _0x293a4b of _0x296fa6[_0xbd8ef6(0x1b2)]()){const _0x5015b8=requireSkillCode(_0x293a4b['skill']),_0x1ea0cd=_0x30a55f+'--'+_0x5015b8;for(const _0x32a19c of[_0x1c1d11[_0xbd8ef6(0x14a)],_0x1c1d11[_0xbd8ef6(0x175)]]){_0x619a3e['push'](ensureManagedSymlink(resolve(_0x32a19c,_0x1ea0cd),_0x293a4b['dir'],_0x1c1d11[_0xbd8ef6(0x146)]));}}return _0x619a3e;}export function pruneStaleRuntimeSkillLinks(_0x57a4ab,_0x26ae40,_0x1228eb={},_0x510d72){const _0x4fe463=a76_0x2cc1d9,_0x445744=resolveSkillSyncPaths(_0x1228eb),_0x4a2780=new Set([..._0x26ae40]['map'](_0x42c2d2=>_0x42c2d2[_0x4fe463(0x1e7)]())['filter'](Boolean)),_0x16fd5f=_0x510d72?new Set([..._0x510d72]['map'](_0x3039f4=>_0x3039f4[_0x4fe463(0x1e7)]())[_0x4fe463(0x192)](Boolean)):undefined,_0x21e027=[];for(const _0x1521a0 of[_0x445744[_0x4fe463(0x14a)],_0x445744[_0x4fe463(0x175)]]){for(const _0x5d52a2 of managedAppSkillLinkPaths(_0x1521a0,_0x57a4ab)){const _0x51b08b=basename(_0x5d52a2)[_0x4fe463(0x1ad)]((_0x57a4ab+'--')[_0x4fe463(0x170)]);if(_0x16fd5f&&!_0x16fd5f[_0x4fe463(0x1ef)](_0x51b08b))continue;if(_0x4a2780[_0x4fe463(0x1ef)](_0x51b08b))continue;_0x21e027[_0x4fe463(0x1ca)](removeManagedSkillLink(_0x5d52a2,_0x445744['managedRoot']));}}return _0x21e027;}export function pruneStaleRuntimeSkillCache(_0x19ca74,_0x25c92e={}){const _0x4df91a=a76_0x2cc1d9,_0x7b4ede=new Set([..._0x19ca74['activeSkillCodes']][_0x4df91a(0x1e5)](_0x306312=>_0x306312[_0x4df91a(0x1e7)]())[_0x4df91a(0x192)](Boolean)),_0x3ff4f3=_0x19ca74['pruneSkillCodes']?new Set([..._0x19ca74[_0x4df91a(0x1e9)]][_0x4df91a(0x1e5)](_0x976b9d=>_0x976b9d[_0x4df91a(0x1e7)]())['filter'](Boolean)):undefined,_0x4ffd95=_0x19ca74[_0x4df91a(0x1f9)]??[_0x4df91a(0x1e8),_0x4df91a(0x1e6)],_0x53bbdf=resolve(getRuntimeSkillCacheRoot(_0x19ca74[_0x4df91a(0x1bf)],_0x19ca74[_0x4df91a(0x13a)],_0x25c92e),safePathSegment(_0x19ca74[_0x4df91a(0x190)],'appCode')),_0x4ac614=[];for(const _0x2c5e3f of _0x4ffd95){const _0x676431=resolve(_0x53bbdf,_0x2c5e3f);if(!existsSync(_0x676431))continue;for(const _0x4fa3de of readdirSync(_0x676431,{'withFileTypes':!![]})){if(!_0x4fa3de[_0x4df91a(0x1b8)]())continue;const _0x2453e9=_0x4fa3de[_0x4df91a(0x1ae)];if(_0x3ff4f3&&!_0x3ff4f3[_0x4df91a(0x1ef)](_0x2453e9))continue;if(_0x7b4ede[_0x4df91a(0x1ef)](_0x2453e9))continue;const _0x3fa777=resolve(_0x676431,_0x2453e9),_0x2d1eeb=readMetadataIfPresent(resolve(_0x3fa777,METADATA_FILE));if(_0x2d1eeb?.['appCode']!==_0x19ca74[_0x4df91a(0x190)]||_0x2d1eeb['scope']!==_0x2c5e3f||_0x2d1eeb[_0x4df91a(0x1aa)]!==_0x2453e9){_0x4ac614['push']({'path':_0x3fa777,'action':'skipped','reason':'metadata-mismatch'});continue;}rmSync(_0x3fa777,{'recursive':!![],'force':!![]}),_0x4ac614[_0x4df91a(0x1ca)]({'path':_0x3fa777,'action':_0x4df91a(0x15b)});}}return _0x4ac614;}export function linkGlobalRuntimeSkills(_0x978238,_0x47167d={}){const _0x2c3851=a76_0x2cc1d9,_0x22e69c=resolveSkillSyncPaths(_0x47167d),_0x207e49=[];for(const _0x10aced of _0x978238){if(_0x10aced['scope']!==_0x2c3851(0x158))throw CliErrors['validation'](_0x2c3851(0x16e)+_0x10aced[_0x2c3851(0x1d2)]);const _0x393699=requireSkillCode(_0x10aced[_0x2c3851(0x149)]),_0x12c37f=copyManagedSkillDirectory(_0x10aced['dir'],resolve(_0x22e69c[_0x2c3851(0x14a)],_0x393699));_0x207e49[_0x2c3851(0x1ca)]({..._0x12c37f,'contentHash':_0x10aced[_0x2c3851(0x165)]});}return _0x207e49;}export function readPushDirectory(_0x4b4974,_0x587ffb){const _0x19e405=a76_0x2cc1d9,_0x2d0887=resolvePushDirectoryRoot(_0x4b4974),_0x14b739=resolve(_0x2d0887,SKILL_FILE);if(!existsSync(_0x14b739)||!lstatSync(_0x14b739)[_0x19e405(0x176)]())throw CliErrors[_0x19e405(0x198)](_0x19e405(0x14e)+SKILL_FILE+':\x20'+_0x14b739);const _0x4bdc3e=readMetadataIfPresent(resolve(_0x2d0887,METADATA_FILE));if(_0x4bdc3e?.[_0x19e405(0x1d2)]&&_0x4bdc3e['scope']!==_0x19e405(0x1e8))throw CliErrors[_0x19e405(0x198)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x19e405(0x1c2)+_0x4bdc3e[_0x19e405(0x1d2)]+'\x22.');if(_0x4bdc3e?.[_0x19e405(0x190)]&&_0x4bdc3e[_0x19e405(0x190)]!==_0x587ffb)throw CliErrors[_0x19e405(0x198)](_0x19e405(0x19e)+_0x4bdc3e['appCode']+_0x19e405(0x1c7)+_0x587ffb+'\x22.');const _0x40cc05=scanSkillDirectory(_0x2d0887),_0x39d5fa=buildSkillPackage(_0x40cc05),_0x48fe83=readFileSync(_0x14b739,_0x19e405(0x1fa)),_0x4398b1=_0x4bdc3e?.[_0x19e405(0x1aa)]??deriveSkillCodeFromDirectory(_0x2d0887,_0x587ffb);if(!_0x4398b1)throw CliErrors[_0x19e405(0x198)](_0x19e405(0x168)+METADATA_FILE+_0x19e405(0x152));return{'skillCode':_0x4398b1,'metadata':_0x4bdc3e,'input':{'skillCode':_0x4398b1,'skillName':_0x4bdc3e?.[_0x19e405(0x1c3)],'description':_0x4bdc3e?.[_0x19e405(0x179)],'content':_0x48fe83,'files':_0x39d5fa['manifest'],'packageBase64':_0x39d5fa['packageBase64'],'tags':_0x4bdc3e?.[_0x19e405(0x1f3)],'version':_0x4bdc3e?.[_0x19e405(0x178)],'sourceSessionId':_0x4bdc3e?.[_0x19e405(0x1a1)]}};}function resolvePushDirectoryRoot(_0x453daa){const _0x3c3e06=a76_0x2cc1d9,_0x2dce5=resolve(_0x453daa);if(!existsSync(_0x2dce5))throw CliErrors['validation'](_0x3c3e06(0x1af)+_0x453daa);const _0x563107=lstatSync(_0x2dce5);if(_0x563107[_0x3c3e06(0x1b8)]())return _0x2dce5;if(_0x563107[_0x3c3e06(0x1f4)]()){const _0x1acf21=realpathSync(_0x2dce5);if(lstatSync(_0x1acf21)[_0x3c3e06(0x1b8)]())return _0x1acf21;}throw CliErrors[_0x3c3e06(0x198)](_0x3c3e06(0x1af)+_0x453daa);}export function recordPushedRuntimeSkill(_0xad8707,_0x71dfe1,_0x533c6d,_0x57fc98={}){const _0x35ad20=a76_0x2cc1d9,_0x55a982=resolvePushDirectoryRoot(_0xad8707),_0xf8320d=scanSkillDirectory(_0x55a982),_0x21d8cf=_0xf8320d['find'](_0x204644=>_0x204644[_0x35ad20(0x174)]===SKILL_FILE),_0x44d3c2=_0x21d8cf?fileText(_0x21d8cf):'',_0x91b210=tryNormalizePackageManifest(_0x71dfe1[_0x35ad20(0x159)]),_0x4979fd={..._0x71dfe1,'content':_0x71dfe1[_0x35ad20(0x188)]??_0x44d3c2,'files':_0x91b210},_0x4238cb=_0x91b210?normalizeLocalFiles(_0xf8320d)['filter'](_0x5d675d=>_0x91b210[_0x35ad20(0x159)][_0x35ad20(0x1d8)](_0x53afda=>_0x53afda[_0x35ad20(0x174)]===_0x5d675d[_0x35ad20(0x174)])):undefined,_0x4a4761=buildMetadata(_0x4979fd,_0x57fc98[_0x35ad20(0x1d2)]??_0x35ad20(0x1e8),_0x533c6d,contentHash(_0x4979fd[_0x35ad20(0x188)]??''),_0x57fc98[_0x35ad20(0x1ee)],_0x4238cb);writeJsonAtomic(resolve(_0x55a982,METADATA_FILE),_0x4a4761);}export function deriveSkillCodeFromDirectory(_0x1d4bd7,_0x4edb3d){const _0x4ea1be=a76_0x2cc1d9,_0x514db8=basename(resolve(_0x1d4bd7)),_0x40c956=_0x4edb3d+'--';return _0x514db8['startsWith'](_0x40c956)?_0x514db8[_0x4ea1be(0x1ad)](_0x40c956['length']):_0x514db8;}export function readMetadataIfPresent(_0x5062b1){const _0x4d8b61=a76_0x2cc1d9;if(!existsSync(_0x5062b1))return undefined;try{const _0x5b255c=JSON[_0x4d8b61(0x143)](readFileSync(_0x5062b1,_0x4d8b61(0x1fa)));return _0x5b255c;}catch{throw CliErrors['validation'](_0x4d8b61(0x1a4)+METADATA_FILE+':\x20'+_0x5062b1);}}function normalizeRuntimeSkillScopes(_0x2796d8){const _0x4883bf=a76_0x2cc1d9,_0x2875fe=_0x2796d8&&_0x2796d8[_0x4883bf(0x170)]>0x0?_0x2796d8:[_0x4883bf(0x1e8),_0x4883bf(0x1e6),_0x4883bf(0x158)],_0x2a15c2=[];for(const _0x4f8eb4 of _0x2875fe){if(!isRuntimeSkillScope(_0x4f8eb4))throw CliErrors[_0x4883bf(0x198)](_0x4883bf(0x196)+_0x4f8eb4);!_0x2a15c2['includes'](_0x4f8eb4)&&_0x2a15c2[_0x4883bf(0x1ca)](_0x4f8eb4);}return _0x2a15c2;}function isRuntimeSkillScope(_0x3aaf8b){const _0x5cc13f=a76_0x2cc1d9;return _0x3aaf8b==='personal'||_0x3aaf8b===_0x5cc13f(0x1e6)||_0x3aaf8b===_0x5cc13f(0x158);}function localSkillEntryDirs(_0x15cc18){const _0x1c5562=a76_0x2cc1d9;if(!existsSync(_0x15cc18))return[];return readdirSync(_0x15cc18,{'withFileTypes':!![]})[_0x1c5562(0x192)](_0x4239cc=>_0x4239cc[_0x1c5562(0x1b8)]()||_0x4239cc[_0x1c5562(0x1f4)]())[_0x1c5562(0x1e5)](_0x5e3b12=>resolve(_0x15cc18,_0x5e3b12[_0x1c5562(0x1ae)]));}function localSkillLinkCandidates(_0x49eeec,_0x42f987,_0x49e276){const _0x17f1e6=a76_0x2cc1d9;if(!existsSync(_0x49eeec))return[];const _0x22bacc=_0x42f987+'--';return readdirSync(_0x49eeec,{'withFileTypes':!![]})['filter'](_0x1cd657=>_0x1cd657[_0x17f1e6(0x1b8)]()||_0x1cd657[_0x17f1e6(0x1f4)]())[_0x17f1e6(0x192)](_0x307695=>_0x307695[_0x17f1e6(0x1ae)][_0x17f1e6(0x189)](_0x22bacc)||_0x49e276[_0x17f1e6(0x1ef)](_0x17f1e6(0x158)))[_0x17f1e6(0x1e5)](_0x557da3=>resolve(_0x49eeec,_0x557da3[_0x17f1e6(0x1ae)]));}function collectLocalRuntimeSkill(_0x5d7dcb,_0x5bfff4,_0x551fe2){const _0x529cd6=a76_0x2cc1d9,_0x197e88=resolve(_0x5bfff4,METADATA_FILE),_0x193ecb=readMetadataIfPresent(_0x197e88);if(!_0x193ecb)return;if(_0x193ecb[_0x529cd6(0x190)]!==_0x551fe2['appCode'])return;if(!isRuntimeSkillScope(_0x193ecb['scope'])||!_0x551fe2[_0x529cd6(0x1f9)]['has'](_0x193ecb[_0x529cd6(0x1d2)]))return;const _0x263bc8=_0x193ecb[_0x529cd6(0x1aa)]?.['trim']();if(!_0x263bc8)return;if(_0x551fe2[_0x529cd6(0x1f2)]&&_0x263bc8!==_0x551fe2[_0x529cd6(0x1f2)])return;const _0x173541=_0x193ecb[_0x529cd6(0x1d2)]+':'+_0x263bc8,_0x2cf06b=_0x551fe2[_0x529cd6(0x1ab)]?[_0x551fe2[_0x529cd6(0x1ab)]]:[],_0x426360=_0x5d7dcb[_0x529cd6(0x1f8)](_0x173541);if(_0x426360){_0x551fe2[_0x529cd6(0x19c)]==='cache'&&(_0x426360[_0x529cd6(0x1c0)]=_0x5bfff4,_0x426360[_0x529cd6(0x1b0)]=_0x5bfff4,_0x426360[_0x529cd6(0x17c)]=resolve(_0x5bfff4,SKILL_FILE),_0x426360[_0x529cd6(0x164)]=_0x197e88);for(const _0x15aca0 of _0x2cf06b){!_0x426360[_0x529cd6(0x1bb)][_0x529cd6(0x18f)](_0x15aca0)&&_0x426360[_0x529cd6(0x1bb)][_0x529cd6(0x1ca)](_0x15aca0);}_0x426360[_0x529cd6(0x1bb)][_0x529cd6(0x1c6)]();return;}_0x5d7dcb[_0x529cd6(0x191)](_0x173541,{..._0x193ecb,'tags':Array[_0x529cd6(0x206)](_0x193ecb[_0x529cd6(0x1f3)])?_0x193ecb['tags']:[],'scope':_0x193ecb['scope'],'source':_0x529cd6(0x1ff),'dir':_0x5bfff4,'cacheDir':_0x551fe2['source']==='cache'?_0x5bfff4:undefined,'skillMdPath':resolve(_0x5bfff4,SKILL_FILE),'metadataPath':_0x197e88,'linkedPaths':_0x2cf06b});}function compareLocalRuntimeSkills(_0x1bf594,_0x1427d3){const _0x47ef6e=a76_0x2cc1d9,_0x132091={'personal':0x0,'company':0x1,'builtin':0x2};return _0x132091[_0x1bf594[_0x47ef6e(0x1d2)]]-_0x132091[_0x1427d3[_0x47ef6e(0x1d2)]]||_0x1bf594[_0x47ef6e(0x1aa)][_0x47ef6e(0x1b6)](_0x1427d3[_0x47ef6e(0x1aa)])||_0x1bf594[_0x47ef6e(0x1c0)][_0x47ef6e(0x1b6)](_0x1427d3[_0x47ef6e(0x1c0)]);}function buildMetadata(_0x32ba21,_0x3614ec,_0x3003d0,_0x42633d,_0x11f719,_0x2bc9fc){const _0xb4701a=a76_0x2cc1d9,_0x3603c9=_0x2bc9fc?normalizeLocalFiles(_0x2bc9fc):[],_0x22d18b=normalizePackageManifest(_0x32ba21['files'],{'requireOssPath':![]}),_0x43341d=_0x3603c9[_0xb4701a(0x170)]>0x0?Object[_0xb4701a(0x195)](_0x3603c9['map'](_0x40d04a=>[_0x40d04a[_0xb4701a(0x174)],fileHash(_0x40d04a)])):undefined;return{'schemaVersion':_0x3603c9[_0xb4701a(0x170)]>0x0?0x2:0x1,'id':_0x32ba21['id'],'appCode':_0x3003d0,'skillCode':requireSkillCode(_0x32ba21),'skillName':_0x32ba21[_0xb4701a(0x1c3)],'description':_0x32ba21[_0xb4701a(0x179)],'scope':_0x3614ec,'readonly':_0x3614ec!==_0xb4701a(0x1e8)||_0x32ba21[_0xb4701a(0x1c9)]===!![],'tenantCode':_0x32ba21[_0xb4701a(0x1ec)],'userId':_0x32ba21[_0xb4701a(0x203)],'version':_0x32ba21[_0xb4701a(0x178)],'status':_0x32ba21[_0xb4701a(0x13b)],'tags':Array['isArray'](_0x32ba21[_0xb4701a(0x1f3)])?_0x32ba21[_0xb4701a(0x1f3)]:[],'hasUpstreamUpdate':_0x32ba21[_0xb4701a(0x173)],'forkedFromSkillId':_0x32ba21['forkedFromSkillId'],'forkedFromVersion':_0x32ba21[_0xb4701a(0x1d6)],'sourceSessionId':_0x32ba21[_0xb4701a(0x1a1)],'contentHash':_0x42633d,'fileHashes':_0x43341d,'treeHash':_0x3603c9[_0xb4701a(0x170)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x3603c9)):_0x22d18b?.[_0xb4701a(0x139)],'ossPath':_0x22d18b?.[_0xb4701a(0x181)],'zipSha256':_0x22d18b?.['zipSha256'],'zipSize':_0x22d18b?.[_0xb4701a(0x1d3)],'files':_0x3603c9['length']>0x0?_0x3603c9[_0xb4701a(0x1e5)](_0xf57d7a=>({'path':_0xf57d7a['path'],'hash':fileHash(_0xf57d7a),'size':fileContent(_0xf57d7a)[_0xb4701a(0x170)]})):undefined,'pulledAt':_0x11f719??new Date()[_0xb4701a(0x19d)]()};}function requireSkillCode(_0x234151){const _0x563f37=a76_0x2cc1d9,_0x5c64ad=_0x234151[_0x563f37(0x1aa)]?.[_0x563f37(0x1e7)]();if(!_0x5c64ad)throw CliErrors[_0x563f37(0x198)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x5c64ad;}function trimmedEnv(_0x5154f8){const _0x5994d1=a76_0x2cc1d9,_0x19c3f3=productEnv(_0x5154f8)?.[_0x5994d1(0x1e7)]();return _0x19c3f3?_0x19c3f3:undefined;}function safePathSegment(_0x5f1148,_0x15bcba=a76_0x2cc1d9(0x1cc)){const _0x2c969a=a76_0x2cc1d9;if(!_0x5f1148||_0x5f1148[_0x2c969a(0x18f)]('/')||_0x5f1148[_0x2c969a(0x18f)]('\x5c')||_0x5f1148[_0x2c969a(0x18f)]('..'))throw CliErrors[_0x2c969a(0x198)](_0x2c969a(0x1df)+_0x15bcba+_0x2c969a(0x1d9)+_0x5f1148);return _0x5f1148;}function ensurePulledFilesCanBeOverwritten(_0x70fa5c,_0x331ca9,_0x54c135,_0x2b58ea){const _0x541bb9=a76_0x2cc1d9;if(_0x2b58ea||!existsSync(_0x331ca9))return;const _0x1f2851=readMetadataIfPresent(_0x331ca9);if(!_0x1f2851)return;const _0x2e144c=_0x1f2851['fileHashes']&&Object['keys'](_0x1f2851[_0x541bb9(0x17a)])[_0x541bb9(0x170)]>0x0?_0x1f2851[_0x541bb9(0x17a)]:undefined;if(_0x2e144c)for(const [_0x41031f,_0x947428]of Object[_0x541bb9(0x1fe)](_0x2e144c)){const _0x518957=resolveManagedFilePath(_0x70fa5c,_0x41031f);if(!existsSync(_0x518957))throw CliErrors[_0x541bb9(0x198)](_0x541bb9(0x150)+_0x70fa5c,_0x541bb9(0x15c)+_0x41031f);const _0x2d7e81=lstatSync(_0x518957);if(!_0x2d7e81[_0x541bb9(0x176)]())throw CliErrors[_0x541bb9(0x198)](_0x541bb9(0x150)+_0x70fa5c,_0x541bb9(0x1e0)+_0x41031f);const _0xed5603=bufferSha256(readFileSync(_0x518957));if(_0xed5603!==_0x947428)throw CliErrors[_0x541bb9(0x198)](_0x541bb9(0x150)+_0x70fa5c+_0x541bb9(0x1c4)+_0x41031f,_0x541bb9(0x197)+_0x41031f);}else{const _0x463551=resolve(_0x70fa5c,SKILL_FILE);if(existsSync(_0x463551)&&_0x1f2851[_0x541bb9(0x165)]){const _0x2231c7=contentHash(readFileSync(_0x463551,_0x541bb9(0x1fa)));if(_0x2231c7!==_0x1f2851[_0x541bb9(0x165)])throw CliErrors[_0x541bb9(0x198)](_0x541bb9(0x1bc)+_0x463551,_0x541bb9(0x167));}}for(const _0x4e0c68 of normalizeLocalFiles(_0x54c135)){if(_0x2e144c?.[_0x4e0c68[_0x541bb9(0x174)]])continue;if(!_0x2e144c&&_0x4e0c68[_0x541bb9(0x174)]===SKILL_FILE)continue;const _0x5c9eb1=resolveManagedFilePath(_0x70fa5c,_0x4e0c68[_0x541bb9(0x174)]);if(!existsSync(_0x5c9eb1))continue;const _0x3bf31e=lstatSync(_0x5c9eb1);if(!_0x3bf31e[_0x541bb9(0x176)]())throw CliErrors[_0x541bb9(0x198)](_0x541bb9(0x150)+_0x70fa5c,_0x541bb9(0x147)+_0x4e0c68['path']);const _0x1d52b4=bufferSha256(readFileSync(_0x5c9eb1));if(_0x1d52b4!==fileHash(_0x4e0c68))throw CliErrors[_0x541bb9(0x198)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x70fa5c,_0x541bb9(0x199)+_0x4e0c68['path']);}}function scanSkillDirectory(_0x2960d2){const _0x11b38e=realOrResolved(_0x2960d2),_0x2f949f=[];let _0x2c2d87=0x0;function _0x78a31c(_0x256c8d){const _0x4fd9d1=a76_0x4e55,_0x4d1b30=readdirSync(_0x256c8d,{'withFileTypes':!![]})[_0x4fd9d1(0x1c6)]((_0x447f56,_0x5eebcb)=>_0x447f56[_0x4fd9d1(0x1ae)][_0x4fd9d1(0x1b6)](_0x5eebcb['name']));for(const _0x5712d4 of _0x4d1b30){if(_0x5712d4[_0x4fd9d1(0x1b8)]()&&IGNORED_DIR_NAMES[_0x4fd9d1(0x1ef)](_0x5712d4[_0x4fd9d1(0x1ae)]))continue;if(IGNORED_FILE_NAMES['has'](_0x5712d4[_0x4fd9d1(0x1ae)]))continue;const _0x23a026=resolve(_0x256c8d,_0x5712d4[_0x4fd9d1(0x1ae)]);if(_0x5712d4['isSymbolicLink']())throw CliErrors[_0x4fd9d1(0x198)](_0x4fd9d1(0x1e4)+_0x23a026);const _0x33751e=toPosixPath(relative(_0x11b38e,_0x23a026));if(_0x5712d4[_0x4fd9d1(0x1b8)]()){_0x78a31c(_0x23a026);continue;}if(!_0x5712d4[_0x4fd9d1(0x176)]())continue;validateSkillRelativePath(_0x33751e);const _0x3385ea=readFileSync(_0x23a026);if(_0x3385ea[_0x4fd9d1(0x170)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x4fd9d1(0x198)](_0x4fd9d1(0x1f0)+_0x33751e);_0x2c2d87+=_0x3385ea[_0x4fd9d1(0x170)];if(_0x2c2d87>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4fd9d1(0x198)](_0x4fd9d1(0x1cb));_0x2f949f[_0x4fd9d1(0x1ca)]({'path':_0x33751e,'bytes':_0x3385ea});if(_0x2f949f[_0x4fd9d1(0x170)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4fd9d1(0x198)](_0x4fd9d1(0x186));}}return _0x78a31c(_0x11b38e),normalizeLocalFiles(_0x2f949f);}function normalizeLocalFiles(_0x3e088d){const _0x271647=a76_0x2cc1d9;if(!Array[_0x271647(0x206)](_0x3e088d)||_0x3e088d[_0x271647(0x170)]===0x0)return[];if(_0x3e088d[_0x271647(0x170)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x271647(0x198)](_0x271647(0x186));const _0x32029c=new Map();let _0x32302d=0x0;for(const _0x28115c of _0x3e088d){if(!_0x28115c||typeof _0x28115c!==_0x271647(0x1ea)||typeof _0x28115c['path']!==_0x271647(0x1b7))throw CliErrors[_0x271647(0x198)](_0x271647(0x1ba));const _0x117b7e=normalizeSkillRelativePath(_0x28115c[_0x271647(0x174)]);if(_0x32029c[_0x271647(0x1ef)](_0x117b7e))throw CliErrors['validation'](_0x271647(0x204)+_0x117b7e);if(_0x28115c['bytes']!==undefined&&!Buffer[_0x271647(0x163)](_0x28115c[_0x271647(0x148)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x117b7e);if(_0x28115c[_0x271647(0x148)]===undefined&&typeof _0x28115c[_0x271647(0x188)]!=='string')throw CliErrors[_0x271647(0x198)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x117b7e);const _0x2d56cc=fileContent(_0x28115c),_0x5b5800=_0x2d56cc['length'];if(_0x5b5800>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x271647(0x198)](_0x271647(0x1f0)+_0x117b7e);_0x32302d+=_0x5b5800;if(_0x32302d>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x271647(0x198)](_0x271647(0x1cb));_0x32029c['set'](_0x117b7e,{'path':_0x117b7e,'bytes':_0x2d56cc});}return Array[_0x271647(0x18a)](_0x32029c[_0x271647(0x1b2)]())[_0x271647(0x1c6)](compareSkillFiles);}function normalizeManifestFiles(_0x4de038){const _0xd529b6=a76_0x2cc1d9;if(!Array[_0xd529b6(0x206)](_0x4de038)||_0x4de038['length']===0x0)return[];if(_0x4de038['length']>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0xd529b6(0x186));const _0x4d936f=new Map();let _0x553ab8=0x0;for(const _0x353dec of _0x4de038){if(!_0x353dec||typeof _0x353dec!==_0xd529b6(0x1ea)||typeof _0x353dec['path']!==_0xd529b6(0x1b7))throw CliErrors[_0xd529b6(0x198)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x307a72=normalizeSkillRelativePath(_0x353dec['path']);if(_0x4d936f['has'](_0x307a72))throw CliErrors[_0xd529b6(0x198)](_0xd529b6(0x204)+_0x307a72);if(!isSha256Hex(_0x353dec[_0xd529b6(0x136)]))throw CliErrors[_0xd529b6(0x198)](_0xd529b6(0x1e3)+_0x307a72);if(!Number[_0xd529b6(0x13c)](_0x353dec['size'])||_0x353dec[_0xd529b6(0x1db)]<0x0)throw CliErrors[_0xd529b6(0x198)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x307a72);if(_0x353dec['size']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0xd529b6(0x198)]('Skill\x20file\x20exceeds\x20size\x20limit:\x20'+_0x307a72);_0x553ab8+=_0x353dec['size'];if(_0x553ab8>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0xd529b6(0x1cb));_0x4d936f[_0xd529b6(0x191)](_0x307a72,{'path':_0x307a72,'sha256':_0x353dec['sha256'][_0xd529b6(0x1c8)](),'size':_0x353dec['size']});}return Array[_0xd529b6(0x18a)](_0x4d936f[_0xd529b6(0x1b2)]())[_0xd529b6(0x1c6)](compareSkillFiles);}function normalizeRemoteManifest(_0x548441){return normalizePackageManifest(_0x548441,{'requireOssPath':!![]});}function normalizePackageManifest(_0x36627c,_0x14618e){const _0x339c62=a76_0x2cc1d9;if(!_0x36627c||typeof _0x36627c!=='object'||Array[_0x339c62(0x206)](_0x36627c))return undefined;const _0x5f6f50=_0x36627c,_0x57df7=typeof _0x5f6f50[_0x339c62(0x181)]===_0x339c62(0x1b7)?_0x5f6f50[_0x339c62(0x181)][_0x339c62(0x1e7)]():undefined;if(_0x14618e[_0x339c62(0x1d5)]&&!_0x57df7)return undefined;if(!Array[_0x339c62(0x206)](_0x5f6f50[_0x339c62(0x159)])||_0x5f6f50[_0x339c62(0x159)][_0x339c62(0x170)]===0x0)return undefined;if(!isSha256Hex(_0x5f6f50[_0x339c62(0x139)]))throw CliErrors[_0x339c62(0x198)](_0x339c62(0x1d4));if(!isSha256Hex(_0x5f6f50[_0x339c62(0x187)]))throw CliErrors[_0x339c62(0x198)](_0x339c62(0x182));if(!Number['isSafeInteger'](_0x5f6f50['zipSize'])||_0x5f6f50[_0x339c62(0x1d3)]<0x0)throw CliErrors[_0x339c62(0x198)](_0x339c62(0x1c1));if(_0x5f6f50[_0x339c62(0x1d3)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x339c62(0x198)](_0x339c62(0x183));const _0x5a1774=normalizeManifestFiles(_0x5f6f50[_0x339c62(0x159)]);if(!_0x5a1774['some'](_0x303b04=>_0x303b04[_0x339c62(0x174)]===SKILL_FILE))throw CliErrors[_0x339c62(0x198)](_0x339c62(0x156)+SKILL_FILE+'.');const _0x30d283=fileTreeHash(_0x5a1774);if(_0x30d283!==_0x5f6f50[_0x339c62(0x139)][_0x339c62(0x1c8)]())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x339c62(0x13c)](_0x5f6f50['schemaVersion'])?_0x5f6f50[_0x339c62(0x137)]:0x2,'ossPath':_0x57df7,'treeSha256':_0x30d283,'zipSha256':_0x5f6f50[_0x339c62(0x187)][_0x339c62(0x1c8)](),'zipSize':_0x5f6f50[_0x339c62(0x1d3)],'files':_0x5a1774};}function tryNormalizeRemoteManifest(_0x265827){return normalizeRemoteManifest(_0x265827);}function tryNormalizePackageManifest(_0x1247d6){return normalizePackageManifest(_0x1247d6,{'requireOssPath':![]});}function requirePackageBytes(_0x29b602,_0x1c0086){const _0x11457a=a76_0x2cc1d9;if(!_0x1c0086||_0x1c0086['length']===0x0)throw CliErrors[_0x11457a(0x198)](_0x11457a(0x180)+_0x29b602);if(_0x1c0086['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20'+_0x29b602);return _0x1c0086;}function localFilesToManifestFiles(_0x452ea8){const _0x4e0cc4=a76_0x2cc1d9;return normalizeLocalFiles(_0x452ea8)[_0x4e0cc4(0x1e5)](_0x12df48=>({'path':_0x12df48[_0x4e0cc4(0x174)],'sha256':fileHash(_0x12df48),'size':fileContent(_0x12df48)[_0x4e0cc4(0x170)]}));}function a76_0x4e55(_0xb98ecd,_0x325713){_0xb98ecd=_0xb98ecd-0x131;const _0x519e08=a76_0x519e();let _0x4e55d4=_0x519e08[_0xb98ecd];return _0x4e55d4;}function isSha256Hex(_0x2a8a12){const _0x3a08b3=a76_0x2cc1d9;return typeof _0x2a8a12===_0x3a08b3(0x1b7)&&/^[a-fA-F0-9]{64}$/[_0x3a08b3(0x160)](_0x2a8a12);}function extractAndVerifyPackage(_0x3eceaf,_0x1a939b){const _0x1484c7=a76_0x2cc1d9,_0x26d87e=normalizePackageManifest(_0x3eceaf,{'requireOssPath':![]});if(!_0x26d87e)throw CliErrors[_0x1484c7(0x198)](_0x1484c7(0x1b1));if(_0x1a939b['length']!==_0x26d87e[_0x1484c7(0x1d3)])throw CliErrors['validation'](_0x1484c7(0x1dc));const _0x257c47=bufferSha256(_0x1a939b);if(_0x257c47!==_0x26d87e['zipSha256'])throw CliErrors[_0x1484c7(0x198)](_0x1484c7(0x1e2));return extractAndVerifyPackageFiles(_0x26d87e,_0x1a939b);}function extractAndVerifyPackageFiles(_0x3ddc1c,_0x5071e5){const _0x3b88e3=a76_0x2cc1d9,_0x1a85d4=parseZipPackage(_0x5071e5);if(_0x1a85d4[_0x3b88e3(0x170)]!==_0x3ddc1c['files'][_0x3b88e3(0x170)])throw CliErrors[_0x3b88e3(0x198)](_0x3b88e3(0x201));const _0x50cb35=new Map();for(const _0x9b7947 of _0x1a85d4){if(_0x50cb35['has'](_0x9b7947[_0x3b88e3(0x174)]))throw CliErrors[_0x3b88e3(0x198)](_0x3b88e3(0x19a)+_0x9b7947[_0x3b88e3(0x174)]);_0x50cb35[_0x3b88e3(0x191)](_0x9b7947[_0x3b88e3(0x174)],_0x9b7947);}const _0x2ae248=[];for(const _0x16bc55 of _0x3ddc1c['files']){const _0x54c57c=_0x50cb35[_0x3b88e3(0x1f8)](_0x16bc55['path']);if(!_0x54c57c)throw CliErrors[_0x3b88e3(0x198)](_0x3b88e3(0x1b5)+_0x16bc55['path']);if(_0x54c57c[_0x3b88e3(0x148)][_0x3b88e3(0x170)]!==_0x16bc55[_0x3b88e3(0x1db)])throw CliErrors[_0x3b88e3(0x198)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x16bc55[_0x3b88e3(0x174)]);const _0x152eee=bufferSha256(_0x54c57c['bytes']);if(_0x152eee!==_0x16bc55['sha256'])throw CliErrors[_0x3b88e3(0x198)](_0x3b88e3(0x162)+_0x16bc55[_0x3b88e3(0x174)]);_0x2ae248['push']({'path':_0x16bc55[_0x3b88e3(0x174)],'bytes':_0x54c57c[_0x3b88e3(0x148)]});}return normalizeLocalFiles(_0x2ae248);}function createDeterministicZipPackage(_0x38de9e){const _0x357a89=a76_0x2cc1d9,_0x3258cd=normalizeLocalFiles(_0x38de9e),_0xa4f53e=[],_0x224c93=[];let _0x138b14=0x0;for(const _0x498e80 of _0x3258cd){const _0x478137=Buffer[_0x357a89(0x18a)](_0x498e80['path'],_0x357a89(0x1fa)),_0x353581=fileContent(_0x498e80),_0x385885=crc32(_0x353581),_0x384a8f=Buffer[_0x357a89(0x1f6)](0x1e+_0x478137['length']);_0x384a8f[_0x357a89(0x1a8)](ZIP_LOCAL_FILE_HEADER_SIGNATURE,0x0),_0x384a8f['writeUInt16LE'](0x14,0x4),_0x384a8f[_0x357a89(0x171)](ZIP_GENERAL_PURPOSE_UTF8,0x6),_0x384a8f[_0x357a89(0x171)](ZIP_METHOD_STORE,0x8),_0x384a8f[_0x357a89(0x171)](ZIP_FIXED_DOS_TIME,0xa),_0x384a8f[_0x357a89(0x171)](ZIP_FIXED_DOS_DATE,0xc),_0x384a8f['writeUInt32LE'](_0x385885,0xe),_0x384a8f['writeUInt32LE'](_0x353581['length'],0x12),_0x384a8f[_0x357a89(0x1a8)](_0x353581[_0x357a89(0x170)],0x16),_0x384a8f['writeUInt16LE'](_0x478137[_0x357a89(0x170)],0x1a),_0x384a8f[_0x357a89(0x171)](0x0,0x1c),_0x478137[_0x357a89(0x1a7)](_0x384a8f,0x1e),_0xa4f53e[_0x357a89(0x1ca)](_0x384a8f,_0x353581);const _0x590f62=Buffer[_0x357a89(0x1f6)](0x2e+_0x478137['length']);_0x590f62[_0x357a89(0x1a8)](ZIP_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x590f62[_0x357a89(0x171)](0x14,0x4),_0x590f62[_0x357a89(0x171)](0x14,0x6),_0x590f62[_0x357a89(0x171)](ZIP_GENERAL_PURPOSE_UTF8,0x8),_0x590f62[_0x357a89(0x171)](ZIP_METHOD_STORE,0xa),_0x590f62[_0x357a89(0x171)](ZIP_FIXED_DOS_TIME,0xc),_0x590f62[_0x357a89(0x171)](ZIP_FIXED_DOS_DATE,0xe),_0x590f62[_0x357a89(0x1a8)](_0x385885,0x10),_0x590f62[_0x357a89(0x1a8)](_0x353581[_0x357a89(0x170)],0x14),_0x590f62['writeUInt32LE'](_0x353581[_0x357a89(0x170)],0x18),_0x590f62['writeUInt16LE'](_0x478137[_0x357a89(0x170)],0x1c),_0x590f62['writeUInt16LE'](0x0,0x1e),_0x590f62[_0x357a89(0x171)](0x0,0x20),_0x590f62[_0x357a89(0x171)](0x0,0x22),_0x590f62[_0x357a89(0x171)](0x0,0x24),_0x590f62[_0x357a89(0x1a8)](0x0,0x26),_0x590f62[_0x357a89(0x1a8)](_0x138b14,0x2a),_0x478137[_0x357a89(0x1a7)](_0x590f62,0x2e),_0x224c93['push'](_0x590f62),_0x138b14+=_0x384a8f['length']+_0x353581[_0x357a89(0x170)];}const _0x37cf48=Buffer[_0x357a89(0x1f1)](_0x224c93),_0x2d17cc=_0x138b14,_0x3eb99e=_0x37cf48['length'],_0x3653f1=Buffer[_0x357a89(0x1f6)](0x16);_0x3653f1[_0x357a89(0x1a8)](ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x3653f1[_0x357a89(0x171)](0x0,0x4),_0x3653f1['writeUInt16LE'](0x0,0x6),_0x3653f1[_0x357a89(0x171)](_0x3258cd[_0x357a89(0x170)],0x8),_0x3653f1[_0x357a89(0x171)](_0x3258cd[_0x357a89(0x170)],0xa),_0x3653f1[_0x357a89(0x1a8)](_0x3eb99e,0xc),_0x3653f1[_0x357a89(0x1a8)](_0x2d17cc,0x10),_0x3653f1[_0x357a89(0x171)](0x0,0x14);const _0x14e36e=Buffer['concat']([..._0xa4f53e,_0x37cf48,_0x3653f1]);if(_0x14e36e[_0x357a89(0x170)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x357a89(0x198)](_0x357a89(0x15e));return _0x14e36e;}function parseZipPackage(_0x4c6179){const _0x2e0003=a76_0x2cc1d9;if(_0x4c6179[_0x2e0003(0x170)]<0x16)throw CliErrors['validation'](_0x2e0003(0x151));const _0x4e44a9=findEndOfCentralDirectory(_0x4c6179);if(_0x4e44a9<0x0)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1de));const _0x3e4db9=_0x4c6179[_0x2e0003(0x17b)](_0x4e44a9+0x4),_0x30c843=_0x4c6179[_0x2e0003(0x17b)](_0x4e44a9+0x6),_0x288c8c=_0x4c6179[_0x2e0003(0x17b)](_0x4e44a9+0xa),_0x281ad8=_0x4c6179['readUInt32LE'](_0x4e44a9+0xc),_0x3a25da=_0x4c6179['readUInt32LE'](_0x4e44a9+0x10);if(_0x3e4db9!==0x0||_0x30c843!==0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20uses\x20unsupported\x20multi-disk\x20zip\x20format.');if(_0x288c8c>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x132));if(_0x3a25da+_0x281ad8>_0x4e44a9||_0x3a25da>=_0x4c6179['length'])throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1b9));const _0x510d99=[];let _0x3dd5f3=0x0,_0x1c1e60=_0x3a25da;for(let _0x46ddd6=0x0;_0x46ddd6<_0x288c8c;_0x46ddd6+=0x1){if(_0x1c1e60+0x2e>_0x4c6179[_0x2e0003(0x170)])throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x17e));if(_0x4c6179[_0x2e0003(0x14d)](_0x1c1e60)!==ZIP_CENTRAL_DIRECTORY_SIGNATURE)throw CliErrors['validation'](_0x2e0003(0x18c));const _0x5e5168=_0x4c6179[_0x2e0003(0x17b)](_0x1c1e60+0x8),_0xbee845=_0x4c6179[_0x2e0003(0x17b)](_0x1c1e60+0xa),_0x1ea27e=_0x4c6179[_0x2e0003(0x14d)](_0x1c1e60+0x10),_0x3bd724=_0x4c6179[_0x2e0003(0x14d)](_0x1c1e60+0x14),_0x265bb3=_0x4c6179[_0x2e0003(0x14d)](_0x1c1e60+0x18),_0x345261=_0x4c6179[_0x2e0003(0x17b)](_0x1c1e60+0x1c),_0x52f01b=_0x4c6179[_0x2e0003(0x17b)](_0x1c1e60+0x1e),_0x38f9a5=_0x4c6179[_0x2e0003(0x17b)](_0x1c1e60+0x20),_0x1953d4=_0x4c6179[_0x2e0003(0x14d)](_0x1c1e60+0x2a),_0x2b561c=_0x1c1e60+0x2e,_0x3f847d=_0x2b561c+_0x345261;if(_0x3f847d>_0x4c6179[_0x2e0003(0x170)])throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1cf));if((_0x5e5168&0x1)!==0x0)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1fd));if(_0xbee845!==ZIP_METHOD_STORE&&_0xbee845!==ZIP_METHOD_DEFLATE)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1a5));const _0x2fd152=normalizeSkillRelativePath(_0x4c6179[_0x2e0003(0x15a)](_0x2b561c,_0x3f847d)[_0x2e0003(0x18e)]('utf8'));if(_0x2fd152['endsWith']('/'))throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x13f)+_0x2fd152);if(_0x265bb3>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1d1)+_0x2fd152);_0x3dd5f3+=_0x265bb3;if(_0x3dd5f3>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x2e0003(0x198)]('Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.');const _0xcf4dfd=readZipEntryData(_0x4c6179,_0x1953d4,_0x2fd152,_0x3bd724),_0x308130=_0xbee845===ZIP_METHOD_STORE?_0xcf4dfd:inflateRawSync(_0xcf4dfd);if(_0x308130[_0x2e0003(0x170)]!==_0x265bb3)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x1da)+_0x2fd152);if(crc32(_0x308130)!==_0x1ea27e)throw CliErrors[_0x2e0003(0x198)](_0x2e0003(0x16a)+_0x2fd152);_0x510d99[_0x2e0003(0x1ca)]({'path':_0x2fd152,'bytes':_0x308130}),_0x1c1e60=_0x3f847d+_0x52f01b+_0x38f9a5;}if(_0x1c1e60!==_0x3a25da+_0x281ad8)throw CliErrors['validation'](_0x2e0003(0x138));return _0x510d99[_0x2e0003(0x1c6)](compareSkillFiles);}function readZipEntryData(_0x1d3d26,_0x47eeb5,_0x1fda37,_0x2ef8ab){const _0x5e1028=a76_0x2cc1d9;if(_0x47eeb5+0x1e>_0x1d3d26[_0x5e1028(0x170)])throw CliErrors['validation'](_0x5e1028(0x1ce)+_0x1fda37);if(_0x1d3d26[_0x5e1028(0x14d)](_0x47eeb5)!==ZIP_LOCAL_FILE_HEADER_SIGNATURE)throw CliErrors[_0x5e1028(0x198)](_0x5e1028(0x172)+_0x1fda37);const _0x25f31c=_0x1d3d26[_0x5e1028(0x17b)](_0x47eeb5+0x1a),_0x5d87ab=_0x1d3d26['readUInt16LE'](_0x47eeb5+0x1c),_0x3244ab=_0x47eeb5+0x1e,_0x344619=_0x3244ab+_0x25f31c,_0x4b3110=_0x344619+_0x5d87ab,_0xfb0a73=_0x4b3110+_0x2ef8ab;if(_0x344619>_0x1d3d26[_0x5e1028(0x170)]||_0xfb0a73>_0x1d3d26['length'])throw CliErrors[_0x5e1028(0x198)](_0x5e1028(0x14f)+_0x1fda37);const _0x281405=normalizeSkillRelativePath(_0x1d3d26[_0x5e1028(0x15a)](_0x3244ab,_0x344619)['toString'](_0x5e1028(0x1fa)));if(_0x281405!==_0x1fda37)throw CliErrors['validation'](_0x5e1028(0x194)+_0x1fda37);return _0x1d3d26[_0x5e1028(0x15a)](_0x4b3110,_0xfb0a73);}function findEndOfCentralDirectory(_0x2fb34f){const _0x59bae2=a76_0x2cc1d9,_0x32d116=Math[_0x59bae2(0x153)](0x0,_0x2fb34f['length']-0x16-0xffff);for(let _0x2a72cc=_0x2fb34f[_0x59bae2(0x170)]-0x16;_0x2a72cc>=_0x32d116;_0x2a72cc-=0x1){if(_0x2fb34f[_0x59bae2(0x14d)](_0x2a72cc)===ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE){const _0xae4c17=_0x2fb34f['readUInt16LE'](_0x2a72cc+0x14);if(_0x2a72cc+0x16+_0xae4c17===_0x2fb34f['length'])return _0x2a72cc;}}return-0x1;}function createCrc32Table(){const _0x51adf2=new Uint32Array(0x100);for(let _0x27f774=0x0;_0x27f774<0x100;_0x27f774+=0x1){let _0xbc2162=_0x27f774;for(let _0x5d487b=0x0;_0x5d487b<0x8;_0x5d487b+=0x1){_0xbc2162=(_0xbc2162&0x1)!==0x0?0xedb88320^_0xbc2162>>>0x1:_0xbc2162>>>0x1;}_0x51adf2[_0x27f774]=_0xbc2162>>>0x0;}return _0x51adf2;}function crc32(_0x4cab1c){let _0x2a47e4=0xffffffff;for(const _0x3865eb of _0x4cab1c){_0x2a47e4=CRC32_TABLE[(_0x2a47e4^_0x3865eb)&0xff]^_0x2a47e4>>>0x8;}return(_0x2a47e4^0xffffffff)>>>0x0;}function compareSkillFiles(_0x407299,_0x2c4030){const _0x394fbf=a76_0x2cc1d9;if(_0x407299[_0x394fbf(0x174)]===SKILL_FILE)return _0x2c4030[_0x394fbf(0x174)]===SKILL_FILE?0x0:-0x1;if(_0x2c4030[_0x394fbf(0x174)]===SKILL_FILE)return 0x1;return Buffer[_0x394fbf(0x18b)](Buffer[_0x394fbf(0x18a)](_0x407299[_0x394fbf(0x174)],_0x394fbf(0x1fa)),Buffer[_0x394fbf(0x18a)](_0x2c4030[_0x394fbf(0x174)],_0x394fbf(0x1fa)));}function materializeFiles(_0x1ab727,_0x48810d){const _0x5fca3e=a76_0x2cc1d9;for(const _0x4e85a7 of normalizeLocalFiles(_0x48810d)){const _0x588ed5=resolveManagedFilePath(_0x1ab727,_0x4e85a7[_0x5fca3e(0x174)]);mkdirSync(dirname(_0x588ed5),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x588ed5,fileContent(_0x4e85a7),0x180);}}function removeStaleManagedFiles(_0xac4442,_0x5af48a,_0x2c4511){const _0x512527=a76_0x2cc1d9;if(!_0x5af48a)return;const _0x39c303=new Set(normalizeLocalFiles(_0x2c4511)[_0x512527(0x1e5)](_0x504049=>_0x504049[_0x512527(0x174)]));for(const _0x3cf172 of Object[_0x512527(0x142)](_0x5af48a)){if(_0x39c303[_0x512527(0x1ef)](_0x3cf172))continue;const _0x4a77a7=resolveManagedFilePath(_0xac4442,_0x3cf172);existsSync(_0x4a77a7)&&lstatSync(_0x4a77a7)[_0x512527(0x176)]()&&rmSync(_0x4a77a7,{'force':!![]});}}function resolveManagedFilePath(_0x105b27,_0x29e689){const _0x158995=a76_0x2cc1d9,_0x60c281=normalizeSkillRelativePath(_0x29e689),_0x4b4528=realOrResolved(_0x105b27),_0x51ea03=resolve(_0x4b4528,..._0x60c281[_0x158995(0x13d)]('/'));if(!isPathInside(_0x51ea03,_0x4b4528))throw CliErrors[_0x158995(0x198)](_0x158995(0x1be)+_0x29e689);return ensureNoSymlinkInManagedPath(_0x4b4528,_0x60c281),_0x51ea03;}function ensureNoSymlinkInManagedPath(_0x8afd7c,_0x9b6c7b){const _0xf860b5=a76_0x2cc1d9;let _0x2a5cd9=_0x8afd7c;for(const _0x47f10c of _0x9b6c7b[_0xf860b5(0x13d)]('/')){_0x2a5cd9=resolve(_0x2a5cd9,_0x47f10c);const _0x46013d=lstatIfPresent(_0x2a5cd9);if(_0x46013d?.[_0xf860b5(0x1f4)]())throw CliErrors['validation'](_0xf860b5(0x1bd)+_0x9b6c7b);}}function normalizeSkillRelativePath(_0x3e6fad){const _0x5335a6=a76_0x2cc1d9,_0x5b3345=toPosixPath(_0x3e6fad[_0x5335a6(0x1e7)]());return validateSkillRelativePath(_0x5b3345),_0x5b3345;}function validateSkillRelativePath(_0x4788a1){const _0x3c0001=a76_0x2cc1d9;if(!_0x4788a1||_0x4788a1[_0x3c0001(0x189)]('/')||_0x4788a1[_0x3c0001(0x18f)]('//'))throw CliErrors[_0x3c0001(0x198)](_0x3c0001(0x1be)+_0x4788a1);for(const _0x17cca3 of _0x4788a1[_0x3c0001(0x13d)]('/')){if(!_0x17cca3||_0x17cca3==='.'||_0x17cca3==='..')throw CliErrors[_0x3c0001(0x198)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x4788a1);}}function toPosixPath(_0x35a7ea){return _0x35a7ea['replace'](/\\/g,'/');}function ensureManagedSymlink(_0x4cb405,_0xf31093,_0x4220ac){const _0x3b4704=a76_0x2cc1d9;mkdirSync(dirname(_0x4cb405),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4cb405)||isDanglingSymlink(_0x4cb405)){const _0x33a993=lstatSync(_0x4cb405);if(!_0x33a993[_0x3b4704(0x1f4)]())throw CliErrors['validation'](_0x3b4704(0x155)+_0x4cb405);const _0x3e4dc1=resolveSymlinkTarget(_0x4cb405);if(!isPathInside(realOrResolved(_0x3e4dc1),realOrResolved(_0x4220ac)))throw CliErrors[_0x3b4704(0x198)](_0x3b4704(0x157)+_0x4cb405);if(realOrResolved(_0x3e4dc1)===realOrResolved(_0xf31093))return{'path':_0x4cb405,'target':_0xf31093,'action':_0x3b4704(0x1ac)};return unlinkSync(_0x4cb405),symlinkSync(_0xf31093,_0x4cb405,_0x3b4704(0x1c0)),{'path':_0x4cb405,'target':_0xf31093,'action':_0x3b4704(0x1dd)};}return symlinkSync(_0xf31093,_0x4cb405,_0x3b4704(0x1c0)),{'path':_0x4cb405,'target':_0xf31093,'action':_0x3b4704(0x133)};}function managedAppSkillLinkPaths(_0x30b2fb,_0x3a368b){const _0x3e8660=a76_0x2cc1d9;if(!existsSync(_0x30b2fb))return[];const _0x4619dd=_0x3a368b+'--';return readdirSync(_0x30b2fb,{'withFileTypes':!![]})[_0x3e8660(0x192)](_0x381003=>_0x381003[_0x3e8660(0x1ae)][_0x3e8660(0x189)](_0x4619dd))[_0x3e8660(0x1e5)](_0x39fbe6=>resolve(_0x30b2fb,_0x39fbe6[_0x3e8660(0x1ae)]));}function removeManagedSkillLink(_0x432776,_0x2b98d0){const _0x4510c5=a76_0x2cc1d9,_0x5d5f9e=lstatIfPresent(_0x432776);if(!_0x5d5f9e?.[_0x4510c5(0x1f4)]())return{'path':_0x432776,'action':_0x4510c5(0x202),'reason':_0x4510c5(0x193)};const _0x2288d5=resolveSymlinkTarget(_0x432776);if(!isPathInside(realOrResolved(_0x2288d5),realOrResolved(_0x2b98d0)))return{'path':_0x432776,'action':_0x4510c5(0x202),'reason':'external-symlink'};return unlinkSync(_0x432776),{'path':_0x432776,'action':_0x4510c5(0x15b)};}function copyManagedSkillDirectory(_0x113f06,_0x2873a4){const _0x3c7ff3=a76_0x2cc1d9,_0x4cacf7=resolve(_0x2873a4,METADATA_FILE),_0x2eee7b=existsSync(_0x2873a4);if(_0x2eee7b){const _0xd4ee82=lstatSync(_0x2873a4);if(_0xd4ee82[_0x3c7ff3(0x1f4)]())throw CliErrors[_0x3c7ff3(0x198)](_0x3c7ff3(0x177)+_0x2873a4);if(!_0xd4ee82['isDirectory']())throw CliErrors[_0x3c7ff3(0x198)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x2873a4);const _0x16f18d=readMetadataIfPresent(_0x4cacf7);if(_0x16f18d?.[_0x3c7ff3(0x1d2)]!==_0x3c7ff3(0x158))throw CliErrors[_0x3c7ff3(0x198)](_0x3c7ff3(0x169)+_0x2873a4);}mkdirSync(dirname(_0x2873a4),{'recursive':!![],'mode':0x1c0});const _0xbd9ac1=_0x2eee7b?readMetadataIfPresent(_0x4cacf7)?.[_0x3c7ff3(0x165)]:undefined,_0x28a3d5=readMetadataIfPresent(resolve(_0x113f06,METADATA_FILE))?.[_0x3c7ff3(0x165)];return _0x2eee7b&&rmSync(_0x2873a4,{'recursive':!![],'force':!![]}),copySkillDirectory(_0x113f06,_0x2873a4),{'path':_0x2873a4,'target':_0x113f06,'action':!_0x2eee7b?_0x3c7ff3(0x133):_0xbd9ac1===_0x28a3d5?_0x3c7ff3(0x1ac):'updated'};}function copySkillDirectory(_0x5c8828,_0x4f701a){const _0x5be58c=a76_0x2cc1d9;mkdirSync(_0x4f701a,{'recursive':!![],'mode':0x1c0});for(const _0x4e1cbc of readdirSync(_0x5c8828,{'withFileTypes':!![]})){const _0x5a3173=resolve(_0x5c8828,_0x4e1cbc[_0x5be58c(0x1ae)]),_0x30000a=resolve(_0x4f701a,_0x4e1cbc[_0x5be58c(0x1ae)]);if(_0x4e1cbc['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x5a3173);if(_0x4e1cbc[_0x5be58c(0x1b8)]()){copySkillDirectory(_0x5a3173,_0x30000a);continue;}_0x4e1cbc[_0x5be58c(0x176)]()&&writeFileSync(_0x30000a,readFileSync(_0x5a3173));}}function isDanglingSymlink(_0x283083){try{return lstatSync(_0x283083)['isSymbolicLink']();}catch{return![];}}function resolveSymlinkTarget(_0x4027b0){const _0x1be291=readlinkSync(_0x4027b0);return isAbsolute(_0x1be291)?_0x1be291:resolve(dirname(_0x4027b0),_0x1be291);}function isPathInside(_0x1f4a71,_0x1aba39){const _0xe99a2d=a76_0x2cc1d9,_0x25d411=_0x1f4a71[_0xe99a2d(0x141)](sep)?_0x1f4a71:''+_0x1f4a71+sep,_0x51341d=_0x1aba39[_0xe99a2d(0x141)](sep)?_0x1aba39:''+_0x1aba39+sep;return _0x1f4a71===_0x1aba39||_0x25d411[_0xe99a2d(0x189)](_0x51341d);}function realOrResolved(_0x4f9225){try{return realpathSync(_0x4f9225);}catch{return resolve(_0x4f9225);}}function lstatIfPresent(_0x1e51bb){try{return lstatSync(_0x1e51bb);}catch{return undefined;}}function writeTextAtomic(_0x4d448f,_0x3dea54,_0x21ca87){const _0x3b7a76=a76_0x2cc1d9;writeBytesAtomic(_0x4d448f,Buffer[_0x3b7a76(0x18a)](_0x3dea54,'utf8'),_0x21ca87);}function writeBytesAtomic(_0x2ceff3,_0x2a9ea0,_0x16ef3a){const _0x50a6e5=a76_0x2cc1d9,_0x13e8d3=_0x2ceff3+_0x50a6e5(0x1a0);try{writeFileSync(_0x13e8d3,_0x2a9ea0,{'mode':_0x16ef3a}),renameSync(_0x13e8d3,_0x2ceff3);}catch(_0x409d53){try{rmSync(_0x13e8d3,{'force':!![]});}catch{}throw _0x409d53;}}function writeJsonAtomic(_0x3eb581,_0x1172ca){writeTextAtomic(_0x3eb581,JSON['stringify'](_0x1172ca,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x52405e,_0x5ebe60){const _0x1aa86f=a77_0x4ba2,_0x7ef093=_0x52405e();while(!![]){try{const _0x2b74d6=parseInt(_0x1aa86f(0x154))/0x1*(-parseInt(_0x1aa86f(0x155))/0x2)+-parseInt(_0x1aa86f(0x15d))/0x3*(-parseInt(_0x1aa86f(0x158))/0x4)+-parseInt(_0x1aa86f(0x15e))/0x5+-parseInt(_0x1aa86f(0x15b))/0x6+parseInt(_0x1aa86f(0x15a))/0x7*(-parseInt(_0x1aa86f(0x15f))/0x8)+parseInt(_0x1aa86f(0x156))/0x9*(-parseInt(_0x1aa86f(0x15c))/0xa)+-parseInt(_0x1aa86f(0x159))/0xb*(-parseInt(_0x1aa86f(0x157))/0xc);if(_0x2b74d6===_0x5ebe60)break;else _0x7ef093['push'](_0x7ef093['shift']());}catch(_0x1160a3){_0x7ef093['push'](_0x7ef093['shift']());}}}(a77_0x11b3,0x886c5));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a77_0x11b3(){const _0x204cce=['240RiuomU','3lCLeHZ','178425CeGOcE','184TuMMJb','6494TffJnu','246GaeqCy','179154qNMDXd','3120uIlksc','1972636esECyo','116600bgKqNQ','175651SQryHg','4806240JhUQiF'];a77_0x11b3=function(){return _0x204cce;};return a77_0x11b3();}function a77_0x4ba2(_0x463981,_0x1f37bd){_0x463981=_0x463981-0x154;const _0x11b31d=a77_0x11b3();let _0x4ba2da=_0x11b31d[_0x463981];return _0x4ba2da;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a78_0x1348de=a78_0x4066;function a78_0x5259(){const _0x3b4c68=['command','join','success','message','readLogs','utf8','initWinstonLogger','stringify','setRawCommand','Completed:\x20','829074qoMzLa','19607550WUtlMT','Failed\x20to\x20read\x20logs:','details','readFileSync','Failed\x20to\x20clear\x20logs:','550540Kupawd','info','now','addColors','createLogger','209514KgaxiN','transports','dirname','winstonLogger','warn','118uUedDQ','49QTujLX','filter','Failed:\x20','rawCommand','red','split','clearLogs','log','existsSync','parse','logFilePath','yellow','5QOCDDl','writeFileSync','level','trim','10940bVjHpB','6320430aRUSTP','toISOString','combine','blue','format','timestamp','green','2903560VUeWbz','getWinstonInstance','printf','error','map','currentRawCommand'];a78_0x5259=function(){return _0x3b4c68;};return a78_0x5259();}(function(_0x57b7b9,_0x5ac890){const _0x4fe2df=a78_0x4066,_0x4166bb=_0x57b7b9();while(!![]){try{const _0x4d7125=-parseInt(_0x4fe2df(0x1a9))/0x1*(parseInt(_0x4fe2df(0x198))/0x2)+-parseInt(_0x4fe2df(0x188))/0x3+-parseInt(_0x4fe2df(0x18e))/0x4*(-parseInt(_0x4fe2df(0x1a5))/0x5)+-parseInt(_0x4fe2df(0x193))/0x6*(-parseInt(_0x4fe2df(0x199))/0x7)+-parseInt(_0x4fe2df(0x1b1))/0x8+-parseInt(_0x4fe2df(0x1aa))/0x9+parseInt(_0x4fe2df(0x189))/0xa;if(_0x4d7125===_0x5ac890)break;else _0x4166bb['push'](_0x4166bb['shift']());}catch(_0x3f2e3b){_0x4166bb['push'](_0x4166bb['shift']());}}}(a78_0x5259,0x56dce));function a78_0x4066(_0x24f46,_0x509920){_0x24f46=_0x24f46-0x187;const _0x525912=a78_0x5259();let _0x40665a=_0x525912[_0x24f46];return _0x40665a;}import a78_0x152788 from'winston';import a78_0x377c6c from'node:fs';import a78_0x14a5d8 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a78_0x1348de(0x196)];[a78_0x1348de(0x1a3)]='';[a78_0x1348de(0x1b6)]='';constructor(){}[a78_0x1348de(0x1bf)](_0x71518f){const _0x547b80=a78_0x1348de;this[_0x547b80(0x1b6)]=_0x71518f;}['setLogPath'](_0x1ce166){const _0x5d698b=a78_0x1348de;this[_0x5d698b(0x1a3)]=a78_0x14a5d8[_0x5d698b(0x1b8)](_0x1ce166,PRODUCT_CONFIG['logFileName']),this['winstonLogger']&&this[_0x5d698b(0x196)]['clear'](),this[_0x5d698b(0x1bd)]();}['initWinstonLogger'](){const _0x343162=a78_0x1348de,_0x1d5508=a78_0x14a5d8[_0x343162(0x195)](this['logFilePath']);!a78_0x377c6c['existsSync'](_0x1d5508)&&a78_0x377c6c['mkdirSync'](_0x1d5508,{'recursive':!![]});const _0x3b389c=a78_0x152788[_0x343162(0x1ae)][_0x343162(0x1ac)](a78_0x152788['format'][_0x343162(0x1af)](),a78_0x152788[_0x343162(0x1ae)]['errors']({'stack':!![]}),a78_0x152788[_0x343162(0x1ae)][_0x343162(0x1b3)](_0x2032fa=>{const _0x288633=_0x343162,_0x2cea72={'timestamp':_0x2032fa[_0x288633(0x1af)]||new Date()[_0x288633(0x1ab)](),'level':_0x2032fa[_0x288633(0x1a7)]||'info','command':_0x2032fa[_0x288633(0x1b7)]||'unknown','rawCommand':_0x2032fa[_0x288633(0x19c)]||this[_0x288633(0x1b6)]||undefined,'message':_0x2032fa[_0x288633(0x1ba)]||'','duration':_0x2032fa['duration']||undefined,'details':_0x2032fa[_0x288633(0x18b)]||undefined};return JSON[_0x288633(0x1be)](_0x2cea72);}));this[_0x343162(0x196)]=a78_0x152788[_0x343162(0x192)]({'level':_0x343162(0x18f),'format':_0x3b389c,'transports':[new a78_0x152788[(_0x343162(0x194))]['File']({'filename':this[_0x343162(0x1a3)],'level':'info'})],'silent':![]}),a78_0x152788[_0x343162(0x191)]({'success':_0x343162(0x1b0),'error':_0x343162(0x19d),'warn':_0x343162(0x1a4),'info':_0x343162(0x1ad)});}[a78_0x1348de(0x18f)](_0x3aebb3,_0x372f90,_0x8deb3c){const _0x5b0324=a78_0x1348de;if(!this[_0x5b0324(0x1a3)]||!this[_0x5b0324(0x196)])return;this[_0x5b0324(0x196)][_0x5b0324(0x18f)](_0x372f90,{'command':_0x3aebb3,'details':_0x8deb3c});}[a78_0x1348de(0x1b9)](_0x303bbc,_0x29063e,_0x206ff4,_0xc3acc4){const _0x585a25=a78_0x1348de;if(!this['logFilePath']||!this[_0x585a25(0x196)])return;this[_0x585a25(0x196)][_0x585a25(0x1a0)](_0x585a25(0x18f),_0x29063e,{'level':_0x585a25(0x1b9),'command':_0x303bbc,'duration':_0x206ff4,'details':_0xc3acc4});}['error'](_0x421091,_0x453580,_0x5b1d9b){const _0x4645dd=a78_0x1348de;if(!this[_0x4645dd(0x1a3)]||!this[_0x4645dd(0x196)])return;this[_0x4645dd(0x196)][_0x4645dd(0x1b4)](_0x453580,{'command':_0x421091,'details':_0x5b1d9b});}[a78_0x1348de(0x197)](_0xde79d5,_0x4fc216,_0x1c615c){const _0xf0ea62=a78_0x1348de;if(!this['logFilePath']||!this[_0xf0ea62(0x196)])return;this[_0xf0ea62(0x196)][_0xf0ea62(0x197)](_0x4fc216,{'command':_0xde79d5,'details':_0x1c615c});}async['logTask'](_0x430fe1,_0x4425ae,_0x5b9433){const _0x51cc39=a78_0x1348de,_0xd4c897=Date[_0x51cc39(0x190)]();this['info'](_0x430fe1,'Starting:\x20'+_0x4425ae);try{const _0x1db187=await _0x5b9433(),_0x38c4db=Date[_0x51cc39(0x190)]()-_0xd4c897;return this['success'](_0x430fe1,_0x51cc39(0x187)+_0x4425ae,_0x38c4db),_0x1db187;}catch(_0x3ffdcd){const _0x215bfd=Date[_0x51cc39(0x190)]()-_0xd4c897;this[_0x51cc39(0x1b4)](_0x430fe1,_0x51cc39(0x19b)+_0x4425ae,{'error':_0x3ffdcd instanceof Error?_0x3ffdcd[_0x51cc39(0x1ba)]:String(_0x3ffdcd),'duration':_0x215bfd});throw _0x3ffdcd;}}[a78_0x1348de(0x1bb)](){const _0x55c4e7=a78_0x1348de;try{if(!a78_0x377c6c['existsSync'](this[_0x55c4e7(0x1a3)]))return[];const _0x3e9d3f=a78_0x377c6c[_0x55c4e7(0x18c)](this['logFilePath'],_0x55c4e7(0x1bc));return _0x3e9d3f[_0x55c4e7(0x19e)](/\r?\n/)[_0x55c4e7(0x19a)](_0x59b608=>_0x59b608[_0x55c4e7(0x1a8)]())[_0x55c4e7(0x1b5)](_0x3f4be9=>JSON[_0x55c4e7(0x1a2)](_0x3f4be9));}catch(_0x13d634){return console['warn'](_0x55c4e7(0x18a),_0x13d634),[];}}[a78_0x1348de(0x19f)](){const _0x3a9970=a78_0x1348de;try{a78_0x377c6c[_0x3a9970(0x1a1)](this['logFilePath'])&&a78_0x377c6c[_0x3a9970(0x1a6)](this[_0x3a9970(0x1a3)],'',_0x3a9970(0x1bc));}catch(_0x466e10){console['warn'](_0x3a9970(0x18d),_0x466e10);}}[a78_0x1348de(0x1b2)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a79_0x1ae3(){var _0x3dae18=['402899Rxpjgc','20gIcLnh','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','75290BSVPFq','3ZPVWfU','1600990BIntGa','209016CSBSwB','items','isArray','parse','204965yhlJVM','object','Invalid\x20JSON\x20for\x20--params:\x20','validation','1229364CDuorv','8TIlDEu','698665gniDJZ','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','6Bqkwqu'];a79_0x1ae3=function(){return _0x3dae18;};return a79_0x1ae3();}(function(_0x2146f3,_0x442da4){var _0x2984a2=a79_0x5cc0,_0x3e9f27=_0x2146f3();while(!![]){try{var _0x26ce61=parseInt(_0x2984a2(0x90))/0x1*(-parseInt(_0x2984a2(0x8f))/0x2)+-parseInt(_0x2984a2(0x92))/0x3*(-parseInt(_0x2984a2(0x8d))/0x4)+-parseInt(_0x2984a2(0x83))/0x5*(-parseInt(_0x2984a2(0x8b))/0x6)+-parseInt(_0x2984a2(0x8c))/0x7*(parseInt(_0x2984a2(0x88))/0x8)+parseInt(_0x2984a2(0x87))/0x9+-parseInt(_0x2984a2(0x91))/0xa+parseInt(_0x2984a2(0x89))/0xb;if(_0x26ce61===_0x442da4)break;else _0x3e9f27['push'](_0x3e9f27['shift']());}catch(_0x48a0f5){_0x3e9f27['push'](_0x3e9f27['shift']());}}}(a79_0x1ae3,0x3f339));import{CliErrors}from'../errors.js';export function parseJsonParams(_0x32c1cf){var _0xe0f32b=a79_0x5cc0;if(!_0x32c1cf)return undefined;try{return JSON['parse'](_0x32c1cf);}catch{throw CliErrors[_0xe0f32b(0x86)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x32c1cf);}}export function parseJsonParamsValue(_0x3cde2f){var _0x1be9f0=a79_0x5cc0;if(!_0x3cde2f)return undefined;try{return JSON[_0x1be9f0(0x82)](_0x3cde2f);}catch{throw CliErrors['validation'](_0x1be9f0(0x85)+_0x3cde2f);}}function a79_0x5cc0(_0x1dee75,_0x46e87){_0x1dee75=_0x1dee75-0x80;var _0x1ae3f6=a79_0x1ae3();var _0x5cc03b=_0x1ae3f6[_0x1dee75];return _0x5cc03b;}export function parseBatchCreateItemsFromParams(_0x3ffc82){var _0x527aa1=a79_0x5cc0;if(Array[_0x527aa1(0x81)](_0x3ffc82))return _0x3ffc82;if(_0x3ffc82!==null&&_0x3ffc82!==undefined&&typeof _0x3ffc82===_0x527aa1(0x84)&&Array[_0x527aa1(0x81)](_0x3ffc82[_0x527aa1(0x80)]))return _0x3ffc82['items'];throw CliErrors[_0x527aa1(0x86)](_0x527aa1(0x8e),_0x527aa1(0x8a));}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a80_0x204c15=a80_0x455b;function a80_0x455b(_0x36fe02,_0x510c6f){_0x36fe02=_0x36fe02-0xc2;const _0x20b767=a80_0x20b7();let _0x455b51=_0x20b767[_0x36fe02];return _0x455b51;}function a80_0x20b7(){const _0x5ce31b=['1229643yfSWNH','.cmd','8fGcFnQ','2359368gfzZYR','10BVKIHU','901441ZhokTZ','1809206soYIjb','99nxudNK','705927TwvXHV','platform','1302810iYQLNo','1878412SkHWvG','win32','2DMExRI'];a80_0x20b7=function(){return _0x5ce31b;};return a80_0x20b7();}(function(_0xaf10bd,_0x55c0f){const _0x1b9624=a80_0x455b,_0x519fa4=_0xaf10bd();while(!![]){try{const _0x3bdd32=parseInt(_0x1b9624(0xc3))/0x1*(parseInt(_0x1b9624(0xcb))/0x2)+parseInt(_0x1b9624(0xc6))/0x3+-parseInt(_0x1b9624(0xc9))/0x4*(-parseInt(_0x1b9624(0xc2))/0x5)+-parseInt(_0x1b9624(0xcf))/0x6+parseInt(_0x1b9624(0xc4))/0x7+-parseInt(_0x1b9624(0xce))/0x8*(parseInt(_0x1b9624(0xcc))/0x9)+parseInt(_0x1b9624(0xc8))/0xa*(-parseInt(_0x1b9624(0xc5))/0xb);if(_0x3bdd32===_0x55c0f)break;else _0x519fa4['push'](_0x519fa4['shift']());}catch(_0x1e5345){_0x519fa4['push'](_0x519fa4['shift']());}}}(a80_0x20b7,0x9a4de));export const isWindows=process[a80_0x204c15(0xc7)]===a80_0x204c15(0xca);export function resolveNpmBin(_0x170431){const _0x1daf3a=a80_0x204c15;return isWindows?_0x170431+_0x1daf3a(0xcd):_0x170431;}
|