@lovrabet/lovrabet-cli 2.1.2 → 2.1.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/commands/create.js +1 -0
- package/lib/commands/skill/commands/install.js +1 -0
- package/lib/commands/skill/commands/list.js +1 -0
- package/lib/commands/skill/commands/push.js +1 -0
- package/lib/commands/skill/commands/validate.js +1 -0
- package/lib/commands/skill/flags.js +1 -0
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -0
- package/lib/commands/skill/scopes.js +1 -0
- package/lib/commands/skill/summary.js +1 -0
- 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/constants.js +1 -0
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -0
- package/lib/skills/runtime-skill-sync/hashing.js +1 -0
- package/lib/skills/runtime-skill-sync/links.js +1 -0
- package/lib/skills/runtime-skill-sync/list-local.js +1 -0
- package/lib/skills/runtime-skill-sync/local-files.js +1 -0
- package/lib/skills/runtime-skill-sync/materialize.js +1 -0
- package/lib/skills/runtime-skill-sync/metadata.js +1 -0
- package/lib/skills/runtime-skill-sync/paths.js +1 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -0
- package/lib/skills/runtime-skill-sync/scopes.js +1 -0
- package/lib/skills/runtime-skill-sync/types.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -0
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -0
- 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 +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x82409c,_0x2a2f3b){const _0x54a6ae=a78_0x5640,_0x1c15a2=_0x82409c();while(!![]){try{const _0x49d694=-parseInt(_0x54a6ae(0xec))/0x1*(-parseInt(_0x54a6ae(0xe7))/0x2)+-parseInt(_0x54a6ae(0xdf))/0x3*(parseInt(_0x54a6ae(0xe0))/0x4)+parseInt(_0x54a6ae(0xe4))/0x5*(parseInt(_0x54a6ae(0xed))/0x6)+-parseInt(_0x54a6ae(0xeb))/0x7+parseInt(_0x54a6ae(0xe8))/0x8*(-parseInt(_0x54a6ae(0xde))/0x9)+-parseInt(_0x54a6ae(0xe1))/0xa+parseInt(_0x54a6ae(0xe2))/0xb;if(_0x49d694===_0x2a2f3b)break;else _0x1c15a2['push'](_0x1c15a2['shift']());}catch(_0x145ccc){_0x1c15a2['push'](_0x1c15a2['shift']());}}}(a78_0xfe56,0xaf0ed));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';export function mapUserFacingExecuteError(_0x156207){if(_0x156207 instanceof LovrabetError)return CliErrors['validation'](userFacingLovrabetMessage(_0x156207));return _0x156207;}function a78_0x5640(_0x221122,_0x5fa6b3){_0x221122=_0x221122-0xde;const _0xfe563f=a78_0xfe56();let _0x5640c6=_0xfe563f[_0x221122];return _0x5640c6;}function a78_0xfe56(){const _0x28cc91=['2447920qJUkHT','11869781gDLohR','trim','5HzqbGh','stringify','message','2508278demXAI','69024ggFVoo','string','description','4798479pQarnG','1rjNSwo','8090562uuSZfH','1233MbLtVm','15ACpBCn','681820Olecbw'];a78_0xfe56=function(){return _0x28cc91;};return a78_0xfe56();}function userFacingLovrabetMessage(_0xa71099){const _0x4a2e25=a78_0x5640,_0x36d5cd=_0xa71099[_0x4a2e25(0xea)];if(_0x36d5cd!==undefined&&_0x36d5cd!==null){if(typeof _0x36d5cd===_0x4a2e25(0xe9)&&_0x36d5cd[_0x4a2e25(0xe3)]())return _0x36d5cd[_0x4a2e25(0xe3)]();try{return JSON[_0x4a2e25(0xe5)](_0x36d5cd);}catch{}}return _0xa71099[_0x4a2e25(0xe6)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a70_0x255ede=a70_0x5d80;(function(_0x110126,_0x4cec4e){const _0x3404ff=a70_0x5d80,_0x2dfa8c=_0x110126();while(!![]){try{const _0x40c971=parseInt(_0x3404ff(0x196))/0x1*(parseInt(_0x3404ff(0x1a0))/0x2)+parseInt(_0x3404ff(0x188))/0x3*(-parseInt(_0x3404ff(0x195))/0x4)+parseInt(_0x3404ff(0x1b6))/0x5+-parseInt(_0x3404ff(0x198))/0x6+-parseInt(_0x3404ff(0x18a))/0x7+parseInt(_0x3404ff(0x19d))/0x8+parseInt(_0x3404ff(0x17f))/0x9;if(_0x40c971===_0x4cec4e)break;else _0x2dfa8c['push'](_0x2dfa8c['shift']());}catch(_0x92af10){_0x2dfa8c['push'](_0x2dfa8c['shift']());}}}(a70_0x19f9,0xb0038));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a70_0x5d80(_0xa5fbb7,_0x27bd90){_0xa5fbb7=_0xa5fbb7-0x17e;const _0x19f9d7=a70_0x19f9();let _0x5d80b7=_0x19f9d7[_0xa5fbb7];return _0x5d80b7;}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';function a70_0x19f9(){const _0x4e2366=['../commands/app/remote-source.js','755085JzKsfD','APPCODE','error','requiresAppCode','format','accessKey','apiDomain','../core/api-client.js','map','5174091bPeKiT','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','newConfigFileName','cancelled','production','currentApp','nonInteractive','appCode','15AyuccM','update','2364915HPyHvP','mergedCli','filter','schema','pretty','name','.appcode\x20to\x20','has','catch','appcode','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','356620YZNCkE','44207yXcSVW','local-alias','2770188fNqZUQ','service','execute','defaultPageSize','app','374120ZgbPwX','validation','trim','54PhtYhF','string','env','pageSize','defaultApp','includes','_notice','High-risk\x20operation\x20`','requiresAuth','rawFlags','appcode\x20\x22','object','Set\x20accessKey\x20in\x20','configMissing','command','items','\x20\x20To\x20proceed:\x20','Unknown\x20app:\x20','riskLevel','authRequired','ACCESS_KEY'];a70_0x19f9=function(){return _0x4e2366;};return a70_0x19f9();}export function resolveAuthMode(_0x1b938c){return void _0x1b938c,AUTH_MODE['ClientAk'];}export function createPipelineEnv(_0x22a08d,_0x492cb4){const _0x2662f5=a70_0x5d80,_0x39237a=typeof _0x492cb4[_0x2662f5(0x19c)]===_0x2662f5(0x1a1)&&_0x492cb4[_0x2662f5(0x19c)][_0x2662f5(0x19f)]();return{'rawFlags':_0x492cb4,'appCode':_0x22a08d[_0x2662f5(0x187)]||productEnv('APPCODE')||(_0x39237a?undefined:readAppCodeFromConfig()),'appCodeSource':_0x22a08d['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x492cb4),'defaultFormat':_0x22a08d[_0x2662f5(0x1ba)],'defaultPageSize':_0x22a08d[_0x2662f5(0x1a3)],'defaultVerbose':_0x22a08d['verbose'],'riskLevel':_0x22a08d[_0x2662f5(0x1b2)],'accessKey':_0x22a08d[_0x2662f5(0x1bb)],'env':_0x22a08d['env'],'mergedCli':{'defaultApp':_0x22a08d[_0x2662f5(0x1a4)],'currentApp':_0x22a08d['currentApp'],'appCode':_0x22a08d[_0x2662f5(0x187)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a70_0x255ede(0x18c)](_0x565641=>PIPELINE_FLAG_NAMES[a70_0x255ede(0x191)](_0x565641[a70_0x255ede(0x18f)]))[a70_0x255ede(0x17e)](({name:_0x4d4060,type:_0x4856a2,description:_0x339698})=>({'name':_0x4d4060,'type':_0x4856a2,'description':_0x339698})),'formatOutput':formatOutput,'getCommandLabel'(_0x2b5b44){const _0x593e6e=a70_0x255ede;return CLI_BIN_NAME+'\x20'+_0x2b5b44[_0x593e6e(0x199)]+'\x20'+_0x2b5b44[_0x593e6e(0x1ae)];},'riskPolicy':{'onViolation'(_0x313f55){const _0x1b87ad=a70_0x255ede;console[_0x1b87ad(0x1b8)](_0x313f55);},'createError'(_0x17b2e7){return CliErrors['cancelled'](_0x17b2e7);}},async 'prepare'(_0x20fdd4,_0x2e3216){const _0x2d5f90=a70_0x255ede,_0x15c3ec=resolveAuthMode(_0x2e3216);if(_0x20fdd4[_0x2d5f90(0x1a8)]!==![]){if(!_0x2e3216['accessKey'])throw CliErrors[_0x2d5f90(0x1b3)](_0x2d5f90(0x1ac)+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x2d5f90(0x1b4))+'.');const {setActiveAK:_0x451606}=await import(_0x2d5f90(0x1bd));_0x451606(_0x2e3216[_0x2d5f90(0x1bb)]);}let _0xf3bca8='';if(_0x20fdd4[_0x2d5f90(0x1b9)]!==![]){_0xf3bca8=_0x2e3216['appCode']??'',_0xf3bca8=await resolveExplicitAppName(_0x20fdd4,_0x2e3216,_0xf3bca8);if(!_0xf3bca8){await assertSelectedAppNameIsRuntimeAccessible(_0x20fdd4,_0x2e3216);throw CliErrors[_0x2d5f90(0x1ad)](_0x2d5f90(0x181)+PRODUCT_CONFIG[_0x2d5f90(0x182)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x20fdd4,_0x2e3216,_0xf3bca8);}if(_0xf3bca8){const {initSdkClient:_0x4ffc8e}=await import('../core/sdk-client.js');_0x4ffc8e({'appCode':_0xf3bca8,'env':_0x2e3216[_0x2d5f90(0x1a2)]??_0x2d5f90(0x184),'accessKey':_0x2e3216[_0x2d5f90(0x1bb)],'authMode':_0x15c3ec});}return{'defaults':{'booleans':{'verbose':_0x2e3216['defaultVerbose']},'numbers':{'pagesize':_0x2e3216[_0x2d5f90(0x19b)]}},'extras':{'appCode':_0xf3bca8,'cookie':'','apiDomain':_0x2e3216[_0x2d5f90(0x1bc)],'apiDir':'','accessKey':_0x2e3216['accessKey'],'envName':_0x2e3216[_0x2d5f90(0x1a2)],'mergedCli':_0x2e3216[_0x2d5f90(0x18b)]}};},async 'confirmHighRisk'({def:_0x532cfe,env:_0x495345,flags:_0x2191a3,commandLabel:_0x3876ac}){const _0x2d5871=a70_0x255ede;if(_0x495345['isNonInteractive']){const _0x4bf07d=reconstructCommandArgv(_0x532cfe,_0x2191a3);throw CliErrors[_0x2d5871(0x19e)](_0x2d5871(0x1a7)+_0x3876ac+_0x2d5871(0x180)+(_0x2d5871(0x1b0)+_0x4bf07d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x532cfe,_0x3876ac,_0x2191a3),'createCancelledError':_0x5d9c5b=>CliErrors[_0x2d5871(0x183)](_0x5d9c5b)});},'mapDryRunError'(_0x5c90c8){return mapUserFacingExecuteError(_0x5c90c8);},'mapExecuteError'(_0x5e44ed){return mapUserFacingExecuteError(_0x5e44ed);},async 'finalize'(){const {clearActiveAK:_0x22c47e}=await import('../core/api-client.js');_0x22c47e();}};async function resolveExplicitAppName(_0x521c62,_0x3ae8b9,_0x490518){const _0x25bc3b=a70_0x255ede;if(_0x521c62[_0x25bc3b(0x1b9)]===![])return _0x490518;const _0x2e2a52=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]==='string'?_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x19c)]['trim']():'';if(!_0x2e2a52)return _0x490518;const _0x189c67=typeof _0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)]===_0x25bc3b(0x1a1)&&_0x3ae8b9[_0x25bc3b(0x1a9)][_0x25bc3b(0x193)][_0x25bc3b(0x19f)]()||productEnv(_0x25bc3b(0x1b7));if(_0x189c67||_0x3ae8b9['appCodeSource']===_0x25bc3b(0x197))return _0x490518;const {getRemoteAppList:_0x4ba4dd}=await import(_0x25bc3b(0x1b5)),_0x96536f=await _0x4ba4dd({'env':_0x3ae8b9[_0x25bc3b(0x1a2)]??'production','accessKey':_0x3ae8b9[_0x25bc3b(0x1bb)]}),_0x39539f=findAppByName(_0x96536f[_0x25bc3b(0x1af)],_0x2e2a52);if(_0x39539f&&!isRuntimeAccessibleApp(_0x39539f))throw runtimeInaccessibleAppError(_0x39539f,'\x22'+_0x2e2a52+'\x22');const _0x13de07=_0x39539f?.[_0x25bc3b(0x187)]?.['trim']();if(_0x13de07)return _0x13de07;throw CliErrors[_0x25bc3b(0x19e)](_0x25bc3b(0x1b1)+_0x2e2a52,'Run\x20`'+CLI_BIN_NAME+_0x25bc3b(0x194)+_0x2e2a52+_0x25bc3b(0x190)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x438dda,_0x1e86ef){const _0x3c5edc=a70_0x255ede;if(_0x438dda[_0x3c5edc(0x1b9)]===![]||!_0x1e86ef[_0x3c5edc(0x1bb)])return;const _0xbb0c5a=(typeof _0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]===_0x3c5edc(0x1a1)&&_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)][_0x3c5edc(0x19f)]()?_0x1e86ef[_0x3c5edc(0x1a9)][_0x3c5edc(0x19c)]:_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x185)]??_0x1e86ef[_0x3c5edc(0x18b)]?.[_0x3c5edc(0x1a4)])?.['trim']();if(!_0xbb0c5a)return;const {getRemoteAppList:_0x29239b}=await import('../commands/app/remote-source.js'),_0x4ab1c1=await _0x29239b({'env':_0x1e86ef['env']??'production','accessKey':_0x1e86ef[_0x3c5edc(0x1bb)]}),_0x1748ed=findAppByName(_0x4ab1c1[_0x3c5edc(0x1af)],_0xbb0c5a);if(_0x1748ed&&!isRuntimeAccessibleApp(_0x1748ed))throw runtimeInaccessibleAppError(_0x1748ed,'\x22'+_0xbb0c5a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5bd68e,_0x18484d,_0xb611c0){const _0x276538=a70_0x255ede;if(_0x5bd68e[_0x276538(0x1b9)]===![]||!_0x18484d['accessKey'])return;const {getRemoteAppList:_0xa65335}=await import(_0x276538(0x1b5)),_0x15c03e=await _0xa65335({'env':_0x18484d[_0x276538(0x1a2)]??_0x276538(0x184),'accessKey':_0x18484d[_0x276538(0x1bb)]}),_0x4d2fde=findAppByCode(_0x15c03e['items'],_0xb611c0);if(_0x4d2fde&&!isRuntimeAccessibleApp(_0x4d2fde))throw runtimeInaccessibleAppError(_0x4d2fde,_0x276538(0x1aa)+_0xb611c0+'\x22');}export async function runCommand(_0x505c7a,_0x220925){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x505c7a)?withUpdateNotice(_0x505c7a):_0x505c7a,_0x220925,runnerAdapter);}function shouldAttachUpdateNotice(_0x446074){const _0x546923=a70_0x255ede;return![_0x546923(0x189),_0x546923(0x18d),'doctor'][_0x546923(0x1a5)](_0x446074[_0x546923(0x199)]);}function withUpdateNotice(_0x2d5ef3){return{..._0x2d5ef3,async 'execute'(_0xc7d3f9){const _0x4e9146=a70_0x5d80,_0x1d8f00=shouldResolveUpdateNotice(_0xc7d3f9)?resolveLatestUpdateNotice()[_0x4e9146(0x192)](()=>null):Promise['resolve'](null),_0x3dab1e=await _0x2d5ef3[_0x4e9146(0x19a)](_0xc7d3f9);return attachUpdateNotice(_0x3dab1e,await _0x1d8f00);}};}function shouldResolveUpdateNotice(_0x570d28){const _0x4c0eb4=a70_0x255ede;return _0x570d28[_0x4c0eb4(0x1ba)]===_0x4c0eb4(0x18e)&&!_0x570d28[_0x4c0eb4(0x186)];}function attachUpdateNotice(_0x32cc3b,_0x22fc38){const _0x540a26=a70_0x255ede;if(!_0x22fc38||!_0x32cc3b||typeof _0x32cc3b!==_0x540a26(0x1ab))return _0x32cc3b;const _0x362460=_0x32cc3b,_0x3325da=typeof _0x362460['_notice']==='object'&&_0x362460[_0x540a26(0x1a6)]!==null?_0x362460['_notice']:{};return{..._0x362460,'_notice':{..._0x3325da,'update':_0x22fc38}};}
|
|
1
|
+
const a79_0x37c875=a79_0x1b9b;(function(_0x7f4938,_0x949e2a){const _0x5bce8b=a79_0x1b9b,_0x49243c=_0x7f4938();while(!![]){try{const _0xbab19b=-parseInt(_0x5bce8b(0x88))/0x1*(parseInt(_0x5bce8b(0x96))/0x2)+-parseInt(_0x5bce8b(0x7b))/0x3+parseInt(_0x5bce8b(0xa8))/0x4*(parseInt(_0x5bce8b(0xa0))/0x5)+-parseInt(_0x5bce8b(0xb5))/0x6+-parseInt(_0x5bce8b(0x89))/0x7+-parseInt(_0x5bce8b(0x94))/0x8+-parseInt(_0x5bce8b(0x7e))/0x9*(-parseInt(_0x5bce8b(0x82))/0xa);if(_0xbab19b===_0x949e2a)break;else _0x49243c['push'](_0x49243c['shift']());}catch(_0x362b6e){_0x49243c['push'](_0x49243c['shift']());}}}(a79_0xc5ee,0x1d34c));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';function a79_0x1b9b(_0x3f8985,_0x471f00){_0x3f8985=_0x3f8985-0x77;const _0xc5ee21=a79_0xc5ee();let _0x1b9b78=_0xc5ee21[_0x3f8985];return _0x1b9b78;}import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x1b8003){const _0x2a9ae5=a79_0x1b9b;return void _0x1b8003,AUTH_MODE[_0x2a9ae5(0x8d)];}export function createPipelineEnv(_0x515423,_0xa99063){const _0x4b81c5=a79_0x1b9b,_0x19fe89=typeof _0xa99063[_0x4b81c5(0xab)]===_0x4b81c5(0xb4)&&_0xa99063[_0x4b81c5(0xab)]['trim']();return{'rawFlags':_0xa99063,'appCode':_0x515423[_0x4b81c5(0x8c)]||productEnv(_0x4b81c5(0xa3))||(_0x19fe89?undefined:readAppCodeFromConfig()),'appCodeSource':_0x515423['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0xa99063),'defaultFormat':_0x515423[_0x4b81c5(0x7a)],'defaultPageSize':_0x515423['pageSize'],'defaultVerbose':_0x515423['verbose'],'riskLevel':_0x515423[_0x4b81c5(0x81)],'accessKey':_0x515423[_0x4b81c5(0x98)],'env':_0x515423['env'],'mergedCli':{'defaultApp':_0x515423['defaultApp'],'currentApp':_0x515423[_0x4b81c5(0x87)],'appCode':_0x515423[_0x4b81c5(0x8c)]}};}function a79_0xc5ee(){const _0x101ba3=['newConfigFileName','production','_notice','appcode','603416FHphgu','map','3756TofJmJ','name','accessKey','Set\x20accessKey\x20in\x20','object','cancelled','execute','validation','catch','command','87595RocGAO','env','doctor','APPCODE','.appcode\x20to\x20','error','requiresAppCode','authRequired','4doyNpB','items','appcode\x20\x22','app','update','High-risk\x20operation\x20`','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','appCodeSource','Unknown\x20app:\x20','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','\x20or\x20pass\x20','string','294336SPxhAC','requiresAuth','../commands/app/remote-source.js','isNonInteractive','format','301662kGcbAb','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','5205501RLtoXU','schema','defaultApp','riskLevel','10PWMJTl','mergedCli','trim','\x20\x20To\x20proceed:\x20','configMissing','currentApp','94QZYfQp','522977jzabic','rawFlags','local-alias','appCode','ClientAk','../core/api-client.js','service'];a79_0xc5ee=function(){return _0x101ba3;};return a79_0xc5ee();}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1e3899=>PIPELINE_FLAG_NAMES['has'](_0x1e3899[a79_0x37c875(0x97)]))[a79_0x37c875(0x95)](({name:_0x514871,type:_0x48503f,description:_0x1197bd})=>({'name':_0x514871,'type':_0x48503f,'description':_0x1197bd})),'formatOutput':formatOutput,'getCommandLabel'(_0x2bc517){const _0x5cfddb=a79_0x37c875;return CLI_BIN_NAME+'\x20'+_0x2bc517[_0x5cfddb(0x8f)]+'\x20'+_0x2bc517[_0x5cfddb(0x9f)];},'riskPolicy':{'onViolation'(_0x1c888a){const _0x112072=a79_0x37c875;console[_0x112072(0xa5)](_0x1c888a);},'createError'(_0x279922){const _0x980fd1=a79_0x37c875;return CliErrors[_0x980fd1(0x9b)](_0x279922);}},async 'prepare'(_0x4e6635,_0x2566e7){const _0x35bdd8=a79_0x37c875,_0x11465d=resolveAuthMode(_0x2566e7);if(_0x4e6635[_0x35bdd8(0x77)]!==![]){if(!_0x2566e7[_0x35bdd8(0x98)])throw CliErrors[_0x35bdd8(0xa7)](_0x35bdd8(0x99)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+_0x35bdd8(0xb3)+productEnvName(_0x35bdd8(0x7c))+'.');const {setActiveAK:_0x17721f}=await import(_0x35bdd8(0x8e));_0x17721f(_0x2566e7['accessKey']);}let _0x159d4e='';if(_0x4e6635['requiresAppCode']!==![]){_0x159d4e=_0x2566e7[_0x35bdd8(0x8c)]??'',_0x159d4e=await resolveExplicitAppName(_0x4e6635,_0x2566e7,_0x159d4e);if(!_0x159d4e){await assertSelectedAppNameIsRuntimeAccessible(_0x4e6635,_0x2566e7);throw CliErrors[_0x35bdd8(0x86)](_0x35bdd8(0xb2)+PRODUCT_CONFIG[_0x35bdd8(0x90)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x4e6635,_0x2566e7,_0x159d4e);}if(_0x159d4e){const {initSdkClient:_0x5895c}=await import('../core/sdk-client.js');_0x5895c({'appCode':_0x159d4e,'env':_0x2566e7[_0x35bdd8(0xa1)]??_0x35bdd8(0x91),'accessKey':_0x2566e7[_0x35bdd8(0x98)],'authMode':_0x11465d});}return{'defaults':{'booleans':{'verbose':_0x2566e7['defaultVerbose']},'numbers':{'pagesize':_0x2566e7[_0x35bdd8(0xb1)]}},'extras':{'appCode':_0x159d4e,'cookie':'','apiDomain':_0x2566e7['apiDomain'],'apiDir':'','accessKey':_0x2566e7[_0x35bdd8(0x98)],'envName':_0x2566e7[_0x35bdd8(0xa1)],'mergedCli':_0x2566e7[_0x35bdd8(0x83)]}};},async 'confirmHighRisk'({def:_0x2b8633,env:_0x7f5463,flags:_0x5add9a,commandLabel:_0x4eca79}){const _0x515ad8=a79_0x37c875;if(_0x7f5463[_0x515ad8(0x79)]){const _0x4925bb=reconstructCommandArgv(_0x2b8633,_0x5add9a);throw CliErrors[_0x515ad8(0x9d)](_0x515ad8(0xad)+_0x4eca79+_0x515ad8(0xae)+(_0x515ad8(0x85)+_0x4925bb));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2b8633,_0x4eca79,_0x5add9a),'createCancelledError':_0x5b4966=>CliErrors[_0x515ad8(0x9b)](_0x5b4966)});},'mapDryRunError'(_0x4168d2){return mapUserFacingExecuteError(_0x4168d2);},'mapExecuteError'(_0xa44eeb){return mapUserFacingExecuteError(_0xa44eeb);},async 'finalize'(){const {clearActiveAK:_0x465602}=await import('../core/api-client.js');_0x465602();}};async function resolveExplicitAppName(_0x441932,_0x5e84ca,_0x2fcf1b){const _0xd5c6a3=a79_0x37c875;if(_0x441932[_0xd5c6a3(0xa6)]===![])return _0x2fcf1b;const _0x4fa833=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0xab)]===_0xd5c6a3(0xb4)?_0x5e84ca[_0xd5c6a3(0x8a)]['app'][_0xd5c6a3(0x84)]():'';if(!_0x4fa833)return _0x2fcf1b;const _0x419491=typeof _0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]===_0xd5c6a3(0xb4)&&_0x5e84ca[_0xd5c6a3(0x8a)][_0xd5c6a3(0x93)]['trim']()||productEnv(_0xd5c6a3(0xa3));if(_0x419491||_0x5e84ca[_0xd5c6a3(0xaf)]===_0xd5c6a3(0x8b))return _0x2fcf1b;const {getRemoteAppList:_0x31dd86}=await import(_0xd5c6a3(0x78)),_0x5b8ce7=await _0x31dd86({'env':_0x5e84ca[_0xd5c6a3(0xa1)]??_0xd5c6a3(0x91),'accessKey':_0x5e84ca[_0xd5c6a3(0x98)]}),_0x2703be=findAppByName(_0x5b8ce7[_0xd5c6a3(0xa9)],_0x4fa833);if(_0x2703be&&!isRuntimeAccessibleApp(_0x2703be))throw runtimeInaccessibleAppError(_0x2703be,'\x22'+_0x4fa833+'\x22');const _0x2831b4=_0x2703be?.['appCode']?.['trim']();if(_0x2831b4)return _0x2831b4;throw CliErrors[_0xd5c6a3(0x9d)](_0xd5c6a3(0xb0)+_0x4fa833,'Run\x20`'+CLI_BIN_NAME+_0xd5c6a3(0x7d)+_0x4fa833+_0xd5c6a3(0xa4)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x384584,_0x49717f){const _0x37165f=a79_0x37c875;if(_0x384584[_0x37165f(0xa6)]===![]||!_0x49717f[_0x37165f(0x98)])return;const _0x7234a5=(typeof _0x49717f['rawFlags'][_0x37165f(0xab)]===_0x37165f(0xb4)&&_0x49717f[_0x37165f(0x8a)]['app']['trim']()?_0x49717f['rawFlags']['app']:_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x87)]??_0x49717f[_0x37165f(0x83)]?.[_0x37165f(0x80)])?.[_0x37165f(0x84)]();if(!_0x7234a5)return;const {getRemoteAppList:_0x508a24}=await import(_0x37165f(0x78)),_0x2a278d=await _0x508a24({'env':_0x49717f[_0x37165f(0xa1)]??_0x37165f(0x91),'accessKey':_0x49717f['accessKey']}),_0x3b1ac9=findAppByName(_0x2a278d['items'],_0x7234a5);if(_0x3b1ac9&&!isRuntimeAccessibleApp(_0x3b1ac9))throw runtimeInaccessibleAppError(_0x3b1ac9,'\x22'+_0x7234a5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x473799,_0x3313f3,_0x4339c5){const _0x5f1966=a79_0x37c875;if(_0x473799[_0x5f1966(0xa6)]===![]||!_0x3313f3[_0x5f1966(0x98)])return;const {getRemoteAppList:_0x580dae}=await import(_0x5f1966(0x78)),_0x5d457e=await _0x580dae({'env':_0x3313f3[_0x5f1966(0xa1)]??'production','accessKey':_0x3313f3[_0x5f1966(0x98)]}),_0xcce01b=findAppByCode(_0x5d457e[_0x5f1966(0xa9)],_0x4339c5);if(_0xcce01b&&!isRuntimeAccessibleApp(_0xcce01b))throw runtimeInaccessibleAppError(_0xcce01b,_0x5f1966(0xaa)+_0x4339c5+'\x22');}export async function runCommand(_0x2062ee,_0x5e1237){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2062ee)?withUpdateNotice(_0x2062ee):_0x2062ee,_0x5e1237,runnerAdapter);}function shouldAttachUpdateNotice(_0x21712e){const _0x19279d=a79_0x37c875;return![_0x19279d(0xac),_0x19279d(0x7f),_0x19279d(0xa2)]['includes'](_0x21712e[_0x19279d(0x8f)]);}function withUpdateNotice(_0x54c3ef){return{..._0x54c3ef,async 'execute'(_0x18e9ad){const _0x59a621=a79_0x1b9b,_0x1d2956=shouldResolveUpdateNotice(_0x18e9ad)?resolveLatestUpdateNotice()[_0x59a621(0x9e)](()=>null):Promise['resolve'](null),_0x55147d=await _0x54c3ef[_0x59a621(0x9c)](_0x18e9ad);return attachUpdateNotice(_0x55147d,await _0x1d2956);}};}function shouldResolveUpdateNotice(_0x24a527){const _0x3183ec=a79_0x37c875;return _0x24a527[_0x3183ec(0x7a)]==='pretty'&&!_0x24a527['nonInteractive'];}function attachUpdateNotice(_0x4ced4d,_0x15f1e9){const _0x5c728b=a79_0x37c875;if(!_0x15f1e9||!_0x4ced4d||typeof _0x4ced4d!==_0x5c728b(0x9a))return _0x4ced4d;const _0x31e253=_0x4ced4d,_0x802c9a=typeof _0x31e253['_notice']===_0x5c728b(0x9a)&&_0x31e253[_0x5c728b(0x92)]!==null?_0x31e253[_0x5c728b(0x92)]:{};return{..._0x31e253,'_notice':{..._0x802c9a,'update':_0x15f1e9}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a80_0x116d(_0x1f1756,_0x5f0c55){_0x1f1756=_0x1f1756-0xb9;const _0x37dfa5=a80_0x37df();let _0x116ded=_0x37dfa5[_0x1f1756];return _0x116ded;}(function(_0x2b99db,_0x205db8){const _0x436565=a80_0x116d,_0x141363=_0x2b99db();while(!![]){try{const _0x462f9c=parseInt(_0x436565(0xb9))/0x1+parseInt(_0x436565(0xc6))/0x2+parseInt(_0x436565(0xc2))/0x3*(parseInt(_0x436565(0xc4))/0x4)+-parseInt(_0x436565(0xc3))/0x5+-parseInt(_0x436565(0xc0))/0x6+-parseInt(_0x436565(0xc5))/0x7*(-parseInt(_0x436565(0xba))/0x8)+parseInt(_0x436565(0xcb))/0x9*(-parseInt(_0x436565(0xc9))/0xa);if(_0x462f9c===_0x205db8)break;else _0x141363['push'](_0x141363['shift']());}catch(_0xeec0ec){_0x141363['push'](_0x141363['shift']());}}}(a80_0x37df,0x2c08e));import{buildSchemaPayload as a80_0x426c57}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x46b62e=a80_0x116d,{serviceRegistry:_0x582786,findDefinition:_0x558211}=await import(_0x46b62e(0xbc)),_0x4d0188=new Set(_0x582786[_0x46b62e(0xbf)](_0x158ece=>_0x158ece['service'])),_0x318a5a=listDynamicServiceEntries()[_0x46b62e(0xbe)](_0x3bc363=>!_0x4d0188[_0x46b62e(0xbb)](_0x3bc363[_0x46b62e(0xca)])),_0x123111=a80_0x426c57({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':[..._0x582786,..._0x318a5a],'buildAllFlags':buildAllFlags,'findDefinition':(_0x2cb85d,_0x257626)=>_0x558211(_0x2cb85d,_0x257626)??findDynamicServiceDefinition(_0x2cb85d,_0x257626)});return normalizeSchemaPayload(_0x123111);}function normalizeSchemaPayload(_0x59cde6){const _0x9c4986=a80_0x116d;return{..._0x59cde6,'schemaVersion':0x2,'services':_0x59cde6[_0x9c4986(0xc7)][_0x9c4986(0xbf)](_0x3c6434=>({..._0x3c6434,'commands':_0x3c6434[_0x9c4986(0xc1)][_0x9c4986(0xbf)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x5d1ca5){const _0x36a937=a80_0x116d,_0x1206c0=_0x5d1ca5;return{..._0x5d1ca5,'auth':_0x1206c0['auth']??(_0x5d1ca5[_0x36a937(0xc8)]?'required':_0x36a937(0xbd))};}function a80_0x37df(){const _0x585a2b=['requiresAuth','60hgIsQI','service','8577vtrNGt','184156fIbPBM','16btCMVZ','has','../commands/registry.js','none','filter','map','435750RwqNCU','commands','3PFAzxY','1126065ErCvzT','21932OmgsEz','508795KGRQzC','297826tiuoyY','services'];a80_0x37df=function(){return _0x585a2b;};return a80_0x37df();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0xf19e(_0xc4286b,_0x48a09e){_0xc4286b=_0xc4286b-0xfd;var _0x356201=a81_0x3562();var _0xf19e11=_0x356201[_0xc4286b];return _0xf19e11;}(function(_0x22e73f,_0x4a653a){var _0x4fad17=a81_0xf19e,_0x462488=_0x22e73f();while(!![]){try{var _0x4f2f37=-parseInt(_0x4fad17(0xfe))/0x1+parseInt(_0x4fad17(0xff))/0x2+parseInt(_0x4fad17(0x101))/0x3+parseInt(_0x4fad17(0x100))/0x4+-parseInt(_0x4fad17(0x103))/0x5*(-parseInt(_0x4fad17(0x102))/0x6)+parseInt(_0x4fad17(0xfd))/0x7+-parseInt(_0x4fad17(0x104))/0x8*(parseInt(_0x4fad17(0x105))/0x9);if(_0x4f2f37===_0x4a653a)break;else _0x462488['push'](_0x462488['shift']());}catch(_0x67df41){_0x462488['push'](_0x462488['shift']());}}}(a81_0x3562,0xa4ab8));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a81_0x3562(){var _0x16479a=['367980wQylzn','77268wKyAYi','395sSjWFn','8pibDJk','4885533BoOYEU','367976wymaco','800335nVmKma','242626LzaSco','2815028naNomg'];a81_0x3562=function(){return _0x16479a;};return a81_0x3562();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x336d32=a82_0x244d;(function(_0x3e1ebb,_0x21b3ac){const _0x10c126=a82_0x244d,_0x543def=_0x3e1ebb();while(!![]){try{const _0x25919a=-parseInt(_0x10c126(0x1fe))/0x1+-parseInt(_0x10c126(0x1f5))/0x2*(-parseInt(_0x10c126(0x1fb))/0x3)+-parseInt(_0x10c126(0x1f6))/0x4*(parseInt(_0x10c126(0x1fd))/0x5)+-parseInt(_0x10c126(0x1ff))/0x6*(-parseInt(_0x10c126(0x1fa))/0x7)+-parseInt(_0x10c126(0x1f9))/0x8*(parseInt(_0x10c126(0x1f4))/0x9)+-parseInt(_0x10c126(0x1fc))/0xa+parseInt(_0x10c126(0x1f7))/0xb;if(_0x25919a===_0x21b3ac)break;else _0x543def['push'](_0x543def['shift']());}catch(_0x517aff){_0x543def['push'](_0x543def['shift']());}}}(a82_0x3940,0xb5482));function a82_0x3940(){const _0x48c507=['5265sFzHhj','690732NxxDAT','18732RTsAHO','2026-07-04T02:17:51.702Z','258183yQUOMA','2jryTHQ','4212jhEjPr','21599138FlnJDI','0dfd4b3','128qmHFfF','518IOTSSR','3613887zrhJjO','3981520XQHicH'];a82_0x3940=function(){return _0x48c507;};return a82_0x3940();}export const VERSION='2.1.3-beta.1';function a82_0x244d(_0x2ced4b,_0x2b67d7){_0x2ced4b=_0x2ced4b-0x1f3;const _0x394047=a82_0x3940();let _0x244d5b=_0x394047[_0x2ced4b];return _0x244d5b;}export const GIT_TAG='v2.1.3-beta.1';export const GIT_COMMIT=a82_0x336d32(0x1f8);export const BUILD_TIME=a82_0x336d32(0x1f3);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x20b88b,_0x3ea441){const _0x5a29e1=a83_0x5854,_0x4347b4=_0x20b88b();while(!![]){try{const _0x3fd0b4=parseInt(_0x5a29e1(0x152))/0x1+-parseInt(_0x5a29e1(0x15a))/0x2*(-parseInt(_0x5a29e1(0x15b))/0x3)+parseInt(_0x5a29e1(0x156))/0x4*(parseInt(_0x5a29e1(0x158))/0x5)+-parseInt(_0x5a29e1(0x15c))/0x6*(-parseInt(_0x5a29e1(0x153))/0x7)+-parseInt(_0x5a29e1(0x151))/0x8+parseInt(_0x5a29e1(0x154))/0x9+-parseInt(_0x5a29e1(0x14f))/0xa;if(_0x3fd0b4===_0x3ea441)break;else _0x4347b4['push'](_0x4347b4['shift']());}catch(_0x5db574){_0x4347b4['push'](_0x4347b4['shift']());}}}(a83_0xebc2,0xd3066));import{jsx as a83_0x4b5f6a,jsxs as a83_0x46d577}from'react/jsx-runtime';function a83_0x5854(_0x4cb4e5,_0x663fba){_0x4cb4e5=_0x4cb4e5-0x14f;const _0xebc29b=a83_0xebc2();let _0x585485=_0xebc29b[_0x4cb4e5];return _0x585485;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a83_0xebc2(){const _0x4e7447=['\x20\x20Use\x20','136198sQdjKd','6BfNNWB','84ziLMUN','4862150Tiwedb','\x20--help','9626880glnaBd','298358REVzSl','215726tkqXUV','12912183aRgeLJ','green','4GaodTF','\x20to\x20view\x20available\x20commands.','1266190WvIegF'];a83_0xebc2=function(){return _0x4e7447;};return a83_0xebc2();}export function Help(){const _0x2e9992=a83_0x5854,{exit:_0xb6966b}=useApp();return useEffect(()=>{_0xb6966b();},[_0xb6966b]),a83_0x46d577(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a83_0x4b5f6a(Box,{'children':a83_0x4b5f6a(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a83_0x46d577(Box,{'marginTop':0x1,'children':[a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x159)}),a83_0x4b5f6a(Text,{'bold':!![],'color':_0x2e9992(0x155),'children':CLI_BIN_NAME+_0x2e9992(0x150)}),a83_0x4b5f6a(Text,{'dimColor':!![],'children':_0x2e9992(0x157)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x482674,_0x1f616){const _0x2280e5=a84_0x177f,_0x506668=_0x482674();while(!![]){try{const _0x5b0177=-parseInt(_0x2280e5(0x184))/0x1+-parseInt(_0x2280e5(0x190))/0x2*(-parseInt(_0x2280e5(0x192))/0x3)+-parseInt(_0x2280e5(0x18b))/0x4*(parseInt(_0x2280e5(0x183))/0x5)+-parseInt(_0x2280e5(0x18a))/0x6+parseInt(_0x2280e5(0x18f))/0x7+parseInt(_0x2280e5(0x196))/0x8*(-parseInt(_0x2280e5(0x18c))/0x9)+parseInt(_0x2280e5(0x181))/0xa*(parseInt(_0x2280e5(0x193))/0xb);if(_0x5b0177===_0x1f616)break;else _0x506668['push'](_0x506668['shift']());}catch(_0x785e11){_0x506668['push'](_0x506668['shift']());}}}(a84_0x1065,0x8d935));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a84_0x1065(){const _0x3a221c=['34011VOyWCt','pipe','log','5399884qblPXO','87022IkdVoE','toString','21LbbTBg','143tDcLri','status','exit\x20','1480lGvdyH','inherit','stdio','1541270FOnGQB','stderr','538655dhvdKr','605889jHwxcQ','skills','unknown','stdout','add','trim','6522072UEHYEX','4hSuWCb'];a84_0x1065=function(){return _0x3a221c;};return a84_0x1065();}import{LOVRABET_SKILL_SOURCE as a84_0x3c906b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a84_0x177f(_0x5063c0,_0x5a2e90){_0x5063c0=_0x5063c0-0x181;const _0x106538=a84_0x1065();let _0x177f80=_0x106538[_0x5063c0];return _0x177f80;}export const LOVRABET_SKILL_SOURCE=a84_0x3c906b;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x5385d5,_0x412881=LOVRABET_SKILL_SOURCE,_0x14ce29){const _0x13dff6=a84_0x177f;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2239ee=_0x14ce29?.[_0x13dff6(0x198)]??_0x13dff6(0x197),_0x215815=resolveNpmBin('npx'),_0x428b4b=[_0x13dff6(0x185),_0x13dff6(0x188),_0x412881,'-g','-y'],_0x519dca=[_0x215815,..._0x428b4b]['join']('\x20');console[_0x13dff6(0x18e)]('*\x20'+_0x519dca);const _0x26cbf4=spawnSync(_0x215815,_0x428b4b,{'cwd':_0x5385d5,'stdio':_0x2239ee,'env':process.env,'shell':![]});if(_0x26cbf4['status']===0x0)return{'ok':!![],'status':0x0};let _0x3e7ff0=_0x13dff6(0x195)+(_0x26cbf4['status']??_0x13dff6(0x186));if(_0x2239ee===_0x13dff6(0x18d)){const _0x124973=_0x26cbf4[_0x13dff6(0x182)]?_0x26cbf4[_0x13dff6(0x182)]['toString']()[_0x13dff6(0x189)]():'',_0x36232a=_0x26cbf4[_0x13dff6(0x187)]?_0x26cbf4[_0x13dff6(0x187)][_0x13dff6(0x191)]()[_0x13dff6(0x189)]():'';if(_0x124973)_0x3e7ff0=_0x124973;else{if(_0x36232a)_0x3e7ff0=_0x36232a;}}return{'ok':![],'status':_0x26cbf4[_0x13dff6(0x194)]??null,'error':_0x3e7ff0};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a85_0x152b48=a85_0x1b7b;(function(_0x2be32d,_0x11dd6d){const _0x3ed165=a85_0x1b7b,_0x3a09af=_0x2be32d();while(!![]){try{const _0x39df81=-parseInt(_0x3ed165(0xea))/0x1+-parseInt(_0x3ed165(0xf2))/0x2*(-parseInt(_0x3ed165(0xf6))/0x3)+-parseInt(_0x3ed165(0xf1))/0x4*(parseInt(_0x3ed165(0xe8))/0x5)+-parseInt(_0x3ed165(0xe9))/0x6+-parseInt(_0x3ed165(0xeb))/0x7*(parseInt(_0x3ed165(0xf4))/0x8)+-parseInt(_0x3ed165(0xf9))/0x9+parseInt(_0x3ed165(0xf7))/0xa;if(_0x39df81===_0x11dd6d)break;else _0x3a09af['push'](_0x3a09af['shift']());}catch(_0x4c4f94){_0x3a09af['push'](_0x3a09af['shift']());}}}(a85_0x1027,0xd6044));export const METADATA_FILE=a85_0x152b48(0xf8);export const SKILL_FILE='SKILL.md';export const MAX_SKILL_FILE_COUNT=0xc8;export const MAX_SKILL_FILE_BYTES=0x100*0x400;export const MAX_SKILL_TOTAL_BYTES=0x2*0x400*0x400;export const MAX_SKILL_PACKAGE_BYTES=0x4*0x400*0x400;export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a85_0x152b48(0xec)]);function a85_0x1027(){const _0x105993=['7413xKDruz','24698210hRjIIi','lovrabet.skill.json','1896399NRnray','.svn','505iPfZbl','600426IcrnID','613493PvleSQ','6765983KaMALt','.DS_Store','.cache','build','coverage','dist','26672RoPAql','786oQLgVt','.turbo','8HyCWSD','node_modules'];a85_0x1027=function(){return _0x105993;};return a85_0x1027();}function a85_0x1b7b(_0x1fe066,_0x440310){_0x1fe066=_0x1fe066-0xe7;const _0x1027ac=a85_0x1027();let _0x1b7be3=_0x1027ac[_0x1fe066];return _0x1b7be3;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a85_0x152b48(0xe7),a85_0x152b48(0xf5),'.next',a85_0x152b48(0xf0),a85_0x152b48(0xee),a85_0x152b48(0xef),a85_0x152b48(0xf3),a85_0x152b48(0xed)]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x92362c,_0x8f61ee){const _0x32338c=a86_0xc44b,_0x1d0f75=_0x92362c();while(!![]){try{const _0x5c4122=parseInt(_0x32338c(0x190))/0x1*(-parseInt(_0x32338c(0x18c))/0x2)+-parseInt(_0x32338c(0x198))/0x3+parseInt(_0x32338c(0x18d))/0x4*(parseInt(_0x32338c(0x193))/0x5)+-parseInt(_0x32338c(0x18a))/0x6*(-parseInt(_0x32338c(0x197))/0x7)+-parseInt(_0x32338c(0x186))/0x8*(-parseInt(_0x32338c(0x195))/0x9)+parseInt(_0x32338c(0x192))/0xa+-parseInt(_0x32338c(0x191))/0xb*(parseInt(_0x32338c(0x18f))/0xc);if(_0x5c4122===_0x8f61ee)break;else _0x1d0f75['push'](_0x1d0f75['shift']());}catch(_0xc2d92a){_0x1d0f75['push'](_0x1d0f75['shift']());}}}(a86_0x3e3e,0x7226e));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a86_0xc44b(_0x3be67d,_0x4ec175){_0x3be67d=_0x3be67d-0x184;const _0x3e3ee0=a86_0x3e3e();let _0xc44bbc=_0x3e3ee0[_0x3be67d];return _0xc44bbc;}function a86_0x3e3e(){const _0x5d9941=['stringify','split','Unsafe\x20Skill\x20file\x20path:\x20','2074206zUQAUW','isSymbolicLink','8zHrfzj','4eQgcQb','utf8','19922748SHsTKb','19355MExyOh','11AnRLEx','9024330xmAlcU','3251890wQShbB','startsWith','1755VoTSdV','from','7zDJLSn','552921RuhLgu','validation','endsWith','.tmp','20144FedmqB'];a86_0x3e3e=function(){return _0x5d9941;};return a86_0x3e3e();}import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0xd69d5,_0x362eaf){const _0x9a225f=a86_0xc44b,_0x230517=normalizeSkillRelativePath(_0x362eaf),_0x428b5d=realOrResolved(_0xd69d5),_0x5792a3=resolve(_0x428b5d,..._0x230517[_0x9a225f(0x188)]('/'));if(!isPathInside(_0x5792a3,_0x428b5d))throw CliErrors[_0x9a225f(0x199)](_0x9a225f(0x189)+_0x362eaf);return ensureNoSymlinkInManagedPath(_0x428b5d,_0x230517),_0x5792a3;}export function ensureNoSymlinkInManagedPath(_0x59010a,_0x20ba8c){const _0xe75f00=a86_0xc44b;let _0x57cea0=_0x59010a;for(const _0x1b60d7 of _0x20ba8c[_0xe75f00(0x188)]('/')){_0x57cea0=resolve(_0x57cea0,_0x1b60d7);const _0x4a120b=lstatIfPresent(_0x57cea0);if(_0x4a120b?.[_0xe75f00(0x18b)]())throw CliErrors[_0xe75f00(0x199)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x20ba8c);}}export function isDanglingSymlink(_0x406d2f){const _0x5d1bbf=a86_0xc44b;try{return lstatSync(_0x406d2f)[_0x5d1bbf(0x18b)]();}catch{return![];}}export function resolveSymlinkTarget(_0x47fd9e){const _0x483ee1=readlinkSync(_0x47fd9e);return isAbsolute(_0x483ee1)?_0x483ee1:resolve(dirname(_0x47fd9e),_0x483ee1);}export function isPathInside(_0x414112,_0x4957f0){const _0x2a0262=a86_0xc44b,_0x328eca=_0x414112[_0x2a0262(0x184)](sep)?_0x414112:''+_0x414112+sep,_0x3c17cd=_0x4957f0['endsWith'](sep)?_0x4957f0:''+_0x4957f0+sep;return _0x414112===_0x4957f0||_0x328eca[_0x2a0262(0x194)](_0x3c17cd);}export function realOrResolved(_0x1392d2){try{return realpathSync(_0x1392d2);}catch{return resolve(_0x1392d2);}}export function lstatIfPresent(_0x53a8f7){try{return lstatSync(_0x53a8f7);}catch{return undefined;}}export function writeTextAtomic(_0x2f306d,_0x257c54,_0x30461e){const _0x1eff84=a86_0xc44b;writeBytesAtomic(_0x2f306d,Buffer[_0x1eff84(0x196)](_0x257c54,_0x1eff84(0x18e)),_0x30461e);}export function writeBytesAtomic(_0x3a032f,_0x524ce6,_0xf7769f){const _0x3af225=a86_0xc44b,_0x9081aa=_0x3a032f+_0x3af225(0x185);try{writeFileSync(_0x9081aa,_0x524ce6,{'mode':_0xf7769f}),renameSync(_0x9081aa,_0x3a032f);}catch(_0x14e4c9){try{rmSync(_0x9081aa,{'force':!![]});}catch{}throw _0x14e4c9;}}export function writeJsonAtomic(_0x29026f,_0x494c8f){const _0x24e929=a86_0xc44b;writeTextAtomic(_0x29026f,JSON[_0x24e929(0x187)](_0x494c8f,null,0x2)+'\x0a',0x180);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xb4b1cb,_0x1ca13e){const _0x28ca9b=a87_0x4d23,_0x271282=_0xb4b1cb();while(!![]){try{const _0x1e5094=-parseInt(_0x28ca9b(0x1cd))/0x1+-parseInt(_0x28ca9b(0x1cc))/0x2+-parseInt(_0x28ca9b(0x1c7))/0x3+parseInt(_0x28ca9b(0x1c3))/0x4*(-parseInt(_0x28ca9b(0x1d0))/0x5)+-parseInt(_0x28ca9b(0x1ce))/0x6+-parseInt(_0x28ca9b(0x1ca))/0x7*(parseInt(_0x28ca9b(0x1c4))/0x8)+parseInt(_0x28ca9b(0x1c9))/0x9;if(_0x1e5094===_0x1ca13e)break;else _0x271282['push'](_0x271282['shift']());}catch(_0xf06d1e){_0x271282['push'](_0x271282['shift']());}}}(a87_0x3cc7,0x9cd80));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a87_0x4d23(_0x48f008,_0x586ad9){_0x48f008=_0x48f008-0x1c3;const _0x3cc7d8=a87_0x3cc7();let _0x4d2397=_0x3cc7d8[_0x48f008];return _0x4d2397;}function a87_0x3cc7(){const _0x248dd2=['24776hOzTUj','hex','sha256','862464WVIrCI','digest','41342058ZIiigO','1561jgyCLe','path','1240604uSdbfn','905854sUQLgQ','4478232sYEeTm','update','3502415rzIvEP','4boxEUF'];a87_0x3cc7=function(){return _0x248dd2;};return a87_0x3cc7();}export function contentHash(_0x2bba7a){const _0x193054=a87_0x4d23;return createHash('sha256')[_0x193054(0x1cf)](_0x2bba7a)['digest'](_0x193054(0x1c5));}export function fileHash(_0x4b3332){return bufferSha256(fileContent(_0x4b3332));}export function bufferSha256(_0x2a5275){const _0x470de4=a87_0x4d23;return createHash(_0x470de4(0x1c6))[_0x470de4(0x1cf)](_0x2a5275)['digest'](_0x470de4(0x1c5));}export function fileTreeHash(_0x26313a){const _0x2a6774=a87_0x4d23,_0x171bd0=createHash(_0x2a6774(0x1c6));for(const _0x3949a8 of normalizeManifestFiles(_0x26313a)){_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1cb)]),_0x171bd0[_0x2a6774(0x1cf)]('\x00'),_0x171bd0[_0x2a6774(0x1cf)](_0x3949a8[_0x2a6774(0x1c6)]),_0x171bd0['update']('\x00'),_0x171bd0[_0x2a6774(0x1cf)](String(_0x3949a8['size'])),_0x171bd0[_0x2a6774(0x1cf)]('\x00');}return _0x171bd0[_0x2a6774(0x1c8)]('hex');}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x367f5d,_0x1073bd){const _0x162b24=a88_0xbaf0,_0x52c87d=_0x367f5d();while(!![]){try{const _0x31d317=parseInt(_0x162b24(0xb2))/0x1*(parseInt(_0x162b24(0xa3))/0x2)+-parseInt(_0x162b24(0xa8))/0x3+-parseInt(_0x162b24(0xa5))/0x4*(parseInt(_0x162b24(0xba))/0x5)+-parseInt(_0x162b24(0x98))/0x6+parseInt(_0x162b24(0xbc))/0x7*(-parseInt(_0x162b24(0xb6))/0x8)+parseInt(_0x162b24(0xac))/0x9*(-parseInt(_0x162b24(0xb7))/0xa)+-parseInt(_0x162b24(0xbb))/0xb*(-parseInt(_0x162b24(0x8e))/0xc);if(_0x31d317===_0x1073bd)break;else _0x52c87d['push'](_0x52c87d['shift']());}catch(_0x9b5608){_0x52c87d['push'](_0x52c87d['shift']());}}}(a88_0x52b9,0x52e11));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a88_0x52b9(){const _0x3ed63f=['trim','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','pruneSkillCodes','not-managed-symlink','skill','name','activeSkillCodes','30798ksQXsh','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isSymbolicLink','scopes','set','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','accessKey','company','contentHash','skillCode','22KRHgLh','skipped','563924rpGvqa','updated','env','1795257oizWTK','appCode','startsWith','isDirectory','4953204oHCyEv','dir','has','personal','claudeSkillsDir','validation','5632bpIZKh','length','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','8MjCqmp','10GdoXWy','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','agentsSkillsDir','10TGoKWH','12870748hcnzyC','4387215ADIXZR','filter','push','24cCwxNr','scope','map'];a88_0x52b9=function(){return _0x3ed63f;};return a88_0x52b9();}import{basename,dirname,resolve}from'node:path';import{copySync,ensureDirSync,removeSync}from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';export function linkEffectiveRuntimeSkills(_0x4d681a,_0x1474b7,_0x9630a9={}){const _0x1baecc=a88_0xbaf0,_0x4a08ae=new Map();for(const _0x9a82d2 of _0x4d681a){const _0x17fd95=_0x9a82d2[_0x1baecc(0x95)][_0x1baecc(0xa2)];if(!_0x17fd95)continue;const _0x211549=_0x4a08ae['get'](_0x17fd95);(!_0x211549||_0x9a82d2[_0x1baecc(0x8f)]===_0x1baecc(0xaf))&&_0x4a08ae[_0x1baecc(0x9c)](_0x17fd95,_0x9a82d2);}const _0x37eb57=[],_0x498ac9=resolveSkillSyncPaths(_0x9630a9);for(const _0x495a0c of _0x4a08ae['values']()){const _0x269517=requireSkillCode(_0x495a0c[_0x1baecc(0x95)]),_0x817a97=_0x1474b7+'--'+_0x269517;for(const _0x122d9f of[_0x498ac9[_0x1baecc(0xb9)],_0x498ac9['claudeSkillsDir']]){_0x37eb57['push'](ensureManagedSymlink(resolve(_0x122d9f,_0x817a97),_0x495a0c[_0x1baecc(0xad)],_0x498ac9['managedRoot']));}}return _0x37eb57;}export function pruneStaleRuntimeSkillLinks(_0x109394,_0x190609,_0x320199={},_0x18cc71){const _0x3b8dfb=a88_0xbaf0,_0x19f52c=resolveSkillSyncPaths(_0x320199),_0x4b4a0e=new Set([..._0x190609][_0x3b8dfb(0x90)](_0xdcb5fb=>_0xdcb5fb[_0x3b8dfb(0x91)]())[_0x3b8dfb(0xbd)](Boolean)),_0x4aaa3f=_0x18cc71?new Set([..._0x18cc71]['map'](_0x4afd74=>_0x4afd74[_0x3b8dfb(0x91)]())['filter'](Boolean)):undefined,_0xcab3cd=[];for(const _0x198a42 of[_0x19f52c[_0x3b8dfb(0xb9)],_0x19f52c[_0x3b8dfb(0xb0)]]){for(const _0x14e2cb of managedAppSkillLinkPaths(_0x198a42,_0x109394)){const _0x153bd4=basename(_0x14e2cb)['slice']((_0x109394+'--')[_0x3b8dfb(0xb3)]);if(_0x4aaa3f&&!_0x4aaa3f['has'](_0x153bd4))continue;if(_0x4b4a0e[_0x3b8dfb(0xae)](_0x153bd4))continue;_0xcab3cd[_0x3b8dfb(0xbe)](removeManagedSkillLink(_0x14e2cb,_0x19f52c['managedRoot']));}}return _0xcab3cd;}export function pruneStaleRuntimeSkillCache(_0x13cdb8,_0x136929={}){const _0x4d5f0c=a88_0xbaf0,_0x2720e4=new Set([..._0x13cdb8[_0x4d5f0c(0x97)]][_0x4d5f0c(0x90)](_0x2005b5=>_0x2005b5['trim']())[_0x4d5f0c(0xbd)](Boolean)),_0x2d5631=_0x13cdb8[_0x4d5f0c(0x93)]?new Set([..._0x13cdb8[_0x4d5f0c(0x93)]][_0x4d5f0c(0x90)](_0x346557=>_0x346557[_0x4d5f0c(0x91)]())[_0x4d5f0c(0xbd)](Boolean)):undefined,_0x18e56e=_0x13cdb8[_0x4d5f0c(0x9b)]??[_0x4d5f0c(0xaf),_0x4d5f0c(0xa0)],_0x2841c0=resolve(getRuntimeSkillCacheRoot(_0x13cdb8[_0x4d5f0c(0xa7)],_0x13cdb8[_0x4d5f0c(0x9f)],_0x136929),safePathSegment(_0x13cdb8['appCode'],'appCode')),_0x17ac2a=[];for(const _0x1a8614 of _0x18e56e){const _0x1c403e=resolve(_0x2841c0,_0x1a8614);if(!existsSync(_0x1c403e))continue;for(const _0x36ad5c of readdirSync(_0x1c403e,{'withFileTypes':!![]})){if(!_0x36ad5c[_0x4d5f0c(0xab)]())continue;const _0x3dd4de=_0x36ad5c[_0x4d5f0c(0x96)];if(_0x2d5631&&!_0x2d5631[_0x4d5f0c(0xae)](_0x3dd4de))continue;if(_0x2720e4[_0x4d5f0c(0xae)](_0x3dd4de))continue;const _0x74208=resolve(_0x1c403e,_0x3dd4de),_0x209fdf=readMetadataIfPresent(resolve(_0x74208,METADATA_FILE));if(_0x209fdf?.[_0x4d5f0c(0xa9)]!==_0x13cdb8[_0x4d5f0c(0xa9)]||_0x209fdf[_0x4d5f0c(0x8f)]!==_0x1a8614||_0x209fdf[_0x4d5f0c(0xa2)]!==_0x3dd4de){_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':_0x4d5f0c(0xa4),'reason':'metadata-mismatch'});continue;}removeSync(_0x74208),_0x17ac2a[_0x4d5f0c(0xbe)]({'path':_0x74208,'action':'removed'});}}return _0x17ac2a;}export function linkGlobalRuntimeSkills(_0x15072e,_0x1efbc4={}){const _0x1494c6=a88_0xbaf0,_0x16a953=resolveSkillSyncPaths(_0x1efbc4),_0x397801=[];for(const _0x4cf897 of _0x15072e){if(_0x4cf897[_0x1494c6(0x8f)]!=='builtin')throw CliErrors[_0x1494c6(0xb1)](_0x1494c6(0x99)+_0x4cf897[_0x1494c6(0x8f)]);const _0x1d1b43=requireSkillCode(_0x4cf897[_0x1494c6(0x95)]),_0x502c02=copyManagedSkillDirectory(_0x4cf897[_0x1494c6(0xad)],resolve(_0x16a953[_0x1494c6(0xb9)],_0x1d1b43));_0x397801[_0x1494c6(0xbe)]({..._0x502c02,'contentHash':_0x4cf897['contentHash']});}return _0x397801;}function ensureManagedSymlink(_0x377097,_0x1ae5e1,_0x2d4210){const _0x6c84cc=a88_0xbaf0;mkdirSync(dirname(_0x377097),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x377097)||isDanglingSymlink(_0x377097)){const _0x12404c=lstatSync(_0x377097);if(!_0x12404c[_0x6c84cc(0x9a)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x377097);const _0x40e29b=resolveSymlinkTarget(_0x377097);if(!isPathInside(realOrResolved(_0x40e29b),realOrResolved(_0x2d4210)))throw CliErrors[_0x6c84cc(0xb1)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x377097);if(realOrResolved(_0x40e29b)===realOrResolved(_0x1ae5e1))return{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0x9d)};return unlinkSync(_0x377097),symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':_0x6c84cc(0xa6)};}return symlinkSync(_0x1ae5e1,_0x377097,_0x6c84cc(0xad)),{'path':_0x377097,'target':_0x1ae5e1,'action':'created'};}function a88_0xbaf0(_0x534465,_0x45a4f8){_0x534465=_0x534465-0x8e;const _0x52b9fd=a88_0x52b9();let _0xbaf0f8=_0x52b9fd[_0x534465];return _0xbaf0f8;}function managedAppSkillLinkPaths(_0x427a73,_0x37c6d5){const _0x36f9bd=a88_0xbaf0;if(!existsSync(_0x427a73))return[];const _0xb236a7=_0x37c6d5+'--';return readdirSync(_0x427a73,{'withFileTypes':!![]})[_0x36f9bd(0xbd)](_0x421b2d=>_0x421b2d[_0x36f9bd(0x96)][_0x36f9bd(0xaa)](_0xb236a7))[_0x36f9bd(0x90)](_0x5b5332=>resolve(_0x427a73,_0x5b5332[_0x36f9bd(0x96)]));}function removeManagedSkillLink(_0x139422,_0x2e1e0d){const _0xec8228=a88_0xbaf0,_0x19b0c3=lstatIfPresent(_0x139422);if(!_0x19b0c3?.[_0xec8228(0x9a)]())return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':_0xec8228(0x94)};const _0x1aed14=resolveSymlinkTarget(_0x139422);if(!isPathInside(realOrResolved(_0x1aed14),realOrResolved(_0x2e1e0d)))return{'path':_0x139422,'action':_0xec8228(0xa4),'reason':'external-symlink'};return unlinkSync(_0x139422),{'path':_0x139422,'action':_0xec8228(0xb5)};}export function copyManagedSkillDirectory(_0xbede47,_0x5582be){const _0x4a4fef=a88_0xbaf0,_0x2f81a5=resolve(_0x5582be,METADATA_FILE),_0x29c79c=existsSync(_0x5582be);if(_0x29c79c){const _0x5e8c38=lstatSync(_0x5582be);if(_0x5e8c38['isSymbolicLink']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0xb8)+_0x5582be);if(!_0x5e8c38['isDirectory']())throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x9e)+_0x5582be);const _0x558b43=readMetadataIfPresent(_0x2f81a5);if(_0x558b43?.[_0x4a4fef(0x8f)]!=='builtin')throw CliErrors[_0x4a4fef(0xb1)](_0x4a4fef(0x92)+_0x5582be);}ensureDirSync(dirname(_0x5582be));const _0x2d1e75=_0x29c79c?readMetadataIfPresent(_0x2f81a5)?.[_0x4a4fef(0xa1)]:undefined,_0x4478ae=readMetadataIfPresent(resolve(_0xbede47,METADATA_FILE))?.['contentHash'];return _0x29c79c&&removeSync(_0x5582be),copySkillDirectory(_0xbede47,_0x5582be),{'path':_0x5582be,'target':_0xbede47,'action':!_0x29c79c?'created':_0x2d1e75===_0x4478ae?_0x4a4fef(0x9d):_0x4a4fef(0xa6)};}function copySkillDirectory(_0x4f8b99,_0x1c9c3f){copySync(_0x4f8b99,_0x1c9c3f,{'dereference':![],'overwrite':!![],'filter'(_0xfc14d4){const _0x1fe8f0=a88_0xbaf0;if(lstatSync(_0xfc14d4)[_0x1fe8f0(0x9a)]())throw CliErrors[_0x1fe8f0(0xb1)](_0x1fe8f0(0xb4)+_0xfc14d4);return!![];}});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5ddd22,_0x12f2e5){const _0x3a553d=a89_0x2fab,_0x59e54f=_0x5ddd22();while(!![]){try{const _0x181b8f=-parseInt(_0x3a553d(0x121))/0x1+parseInt(_0x3a553d(0x127))/0x2*(-parseInt(_0x3a553d(0x13d))/0x3)+-parseInt(_0x3a553d(0x143))/0x4*(-parseInt(_0x3a553d(0x13b))/0x5)+parseInt(_0x3a553d(0x144))/0x6*(parseInt(_0x3a553d(0x148))/0x7)+-parseInt(_0x3a553d(0x13f))/0x8*(-parseInt(_0x3a553d(0x145))/0x9)+-parseInt(_0x3a553d(0x137))/0xa+-parseInt(_0x3a553d(0x125))/0xb*(parseInt(_0x3a553d(0x126))/0xc);if(_0x181b8f===_0x12f2e5)break;else _0x59e54f['push'](_0x59e54f['shift']());}catch(_0x92b9bc){_0x59e54f['push'](_0x59e54f['shift']());}}}(a89_0x2246,0x3f73c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a89_0x2246(){const _0x50cf95=['env','linkedPath','isArray','140720NNpDRS','values','cache','isDirectory','11gESbLc','983520DChzPP','994622YOxxjs','skillCode','isSymbolicLink','accessKey','builtin','has','source','dir','includes','linkedPaths','tags','scopes','claudeSkillsDir','filter','appCode','push','218990hfXkUy','metadataPath','code','map','770435kdEyWM','sort','3FIGHBu','scope','88NdGfex','trim','localeCompare','agentsSkillsDir','12MlwYyZ','16494dOBbTc','47826WsHQrv','name','cacheDir','1225YCTihg'];a89_0x2246=function(){return _0x50cf95;};return a89_0x2246();}function a89_0x2fab(_0x18b00e,_0x380ae4){_0x18b00e=_0x18b00e-0x11e;const _0x2246dc=a89_0x2246();let _0x2fab54=_0x2246dc[_0x18b00e];return _0x2fab54;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x40a65c,_0xee695a={}){const _0x1f2d75=a89_0x2fab,_0x29d085=safePathSegment(_0x40a65c[_0x1f2d75(0x135)],_0x1f2d75(0x135)),_0x54f4dc=normalizeRuntimeSkillScopes(_0x40a65c[_0x1f2d75(0x132)]),_0x1ed836=new Set(_0x54f4dc),_0x263a27=_0x40a65c[_0x1f2d75(0x139)]?.[_0x1f2d75(0x140)](),_0xbe9f34=new Map(),_0x3c3ffb=resolve(getRuntimeSkillCacheRoot(_0x40a65c[_0x1f2d75(0x11e)],_0x40a65c[_0x1f2d75(0x12a)],_0xee695a),_0x29d085);for(const _0x408bce of _0x54f4dc){for(const _0x2faf5b of localSkillEntryDirs(resolve(_0x3c3ffb,_0x408bce))){collectLocalRuntimeSkill(_0xbe9f34,_0x2faf5b,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':_0x1f2d75(0x123)});}}const _0x86ce84=resolveSkillSyncPaths(_0xee695a);for(const _0x2ddcb6 of[_0x86ce84[_0x1f2d75(0x142)],_0x86ce84[_0x1f2d75(0x133)]]){for(const _0x3e372a of localSkillLinkCandidates(_0x2ddcb6,_0x29d085,_0x1ed836)){collectLocalRuntimeSkill(_0xbe9f34,_0x3e372a,{'appCode':_0x29d085,'scopes':_0x1ed836,'code':_0x263a27,'source':'link','linkedPath':_0x3e372a});}}return Array['from'](_0xbe9f34[_0x1f2d75(0x122)]())[_0x1f2d75(0x13c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x557867){const _0x2ca9d6=a89_0x2fab;if(!existsSync(_0x557867))return[];return readdirSync(_0x557867,{'withFileTypes':!![]})[_0x2ca9d6(0x134)](_0x1fc265=>_0x1fc265[_0x2ca9d6(0x124)]()||_0x1fc265[_0x2ca9d6(0x129)]())[_0x2ca9d6(0x13a)](_0x4743dd=>resolve(_0x557867,_0x4743dd[_0x2ca9d6(0x146)]));}function localSkillLinkCandidates(_0x5f45c3,_0x261432,_0x262595){const _0x5cb8b4=a89_0x2fab;if(!existsSync(_0x5f45c3))return[];const _0x326ff3=_0x261432+'--';return readdirSync(_0x5f45c3,{'withFileTypes':!![]})[_0x5cb8b4(0x134)](_0x4cce17=>_0x4cce17[_0x5cb8b4(0x124)]()||_0x4cce17[_0x5cb8b4(0x129)]())[_0x5cb8b4(0x134)](_0x4d2069=>_0x4d2069['name']['startsWith'](_0x326ff3)||_0x262595['has'](_0x5cb8b4(0x12b)))[_0x5cb8b4(0x13a)](_0x598c3f=>resolve(_0x5f45c3,_0x598c3f[_0x5cb8b4(0x146)]));}function collectLocalRuntimeSkill(_0x416aae,_0x4a1cf6,_0x285878){const _0x1afb28=a89_0x2fab,_0x5c894a=resolve(_0x4a1cf6,METADATA_FILE),_0x4f9cb9=readMetadataIfPresent(_0x5c894a);if(!_0x4f9cb9)return;if(_0x4f9cb9[_0x1afb28(0x135)]!==_0x285878['appCode'])return;if(!isRuntimeSkillScope(_0x4f9cb9[_0x1afb28(0x13e)])||!_0x285878['scopes'][_0x1afb28(0x12c)](_0x4f9cb9[_0x1afb28(0x13e)]))return;const _0x52dc06=_0x4f9cb9['skillCode']?.[_0x1afb28(0x140)]();if(!_0x52dc06)return;if(_0x285878[_0x1afb28(0x139)]&&_0x52dc06!==_0x285878['code'])return;const _0x360f19=_0x4f9cb9[_0x1afb28(0x13e)]+':'+_0x52dc06,_0x35cb14=_0x285878['linkedPath']?[_0x285878[_0x1afb28(0x11f)]]:[],_0x145c88=_0x416aae['get'](_0x360f19);if(_0x145c88){_0x285878[_0x1afb28(0x12d)]==='cache'&&(_0x145c88[_0x1afb28(0x12e)]=_0x4a1cf6,_0x145c88[_0x1afb28(0x147)]=_0x4a1cf6,_0x145c88['skillMdPath']=resolve(_0x4a1cf6,SKILL_FILE),_0x145c88[_0x1afb28(0x138)]=_0x5c894a);for(const _0x2121b9 of _0x35cb14){!_0x145c88['linkedPaths'][_0x1afb28(0x12f)](_0x2121b9)&&_0x145c88['linkedPaths'][_0x1afb28(0x136)](_0x2121b9);}_0x145c88[_0x1afb28(0x130)][_0x1afb28(0x13c)]();return;}_0x416aae['set'](_0x360f19,{..._0x4f9cb9,'tags':Array[_0x1afb28(0x120)](_0x4f9cb9[_0x1afb28(0x131)])?_0x4f9cb9[_0x1afb28(0x131)]:[],'scope':_0x4f9cb9['scope'],'source':'local','dir':_0x4a1cf6,'cacheDir':_0x285878[_0x1afb28(0x12d)]===_0x1afb28(0x123)?_0x4a1cf6:undefined,'skillMdPath':resolve(_0x4a1cf6,SKILL_FILE),'metadataPath':_0x5c894a,'linkedPaths':_0x35cb14});}function compareLocalRuntimeSkills(_0x54c392,_0x6ef45e){const _0x373ee2=a89_0x2fab,_0x189b04={'personal':0x0,'company':0x1,'builtin':0x2};return _0x189b04[_0x54c392[_0x373ee2(0x13e)]]-_0x189b04[_0x6ef45e[_0x373ee2(0x13e)]]||_0x54c392[_0x373ee2(0x128)][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x128)])||_0x54c392['dir'][_0x373ee2(0x141)](_0x6ef45e[_0x373ee2(0x12e)]);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x306d23,_0x1d7fd7){const _0xcf382f=a90_0x14db,_0x198087=_0x306d23();while(!![]){try{const _0x177399=-parseInt(_0xcf382f(0x9f))/0x1*(-parseInt(_0xcf382f(0x8f))/0x2)+parseInt(_0xcf382f(0x79))/0x3*(-parseInt(_0xcf382f(0x86))/0x4)+parseInt(_0xcf382f(0x89))/0x5+-parseInt(_0xcf382f(0x91))/0x6+-parseInt(_0xcf382f(0x75))/0x7+-parseInt(_0xcf382f(0x7d))/0x8*(parseInt(_0xcf382f(0x76))/0x9)+parseInt(_0xcf382f(0x9a))/0xa*(parseInt(_0xcf382f(0xa5))/0xb);if(_0x177399===_0x1d7fd7)break;else _0x198087['push'](_0x198087['shift']());}catch(_0x22da44){_0x198087['push'](_0x198087['shift']());}}}(a90_0x13de,0x42284));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_TOTAL_BYTES,SKILL_FILE}from'./constants.js';export function fileContent(_0x23f945){const _0x3ac854=a90_0x14db;return _0x23f945[_0x3ac854(0x8b)]??Buffer[_0x3ac854(0x74)](_0x23f945['content']??'',_0x3ac854(0x8e));}export function fileText(_0x585e0d){const _0x34077a=a90_0x14db;return fileContent(_0x585e0d)[_0x34077a(0x94)](_0x34077a(0x8e));}function a90_0x14db(_0x513da2,_0x2e7847){_0x513da2=_0x513da2-0x72;const _0x13de5c=a90_0x13de();let _0x14db2e=_0x13de5c[_0x513da2];return _0x14db2e;}export function normalizeLocalFiles(_0x2a6bd2){const _0x5298e6=a90_0x14db;if(!Array[_0x5298e6(0x77)](_0x2a6bd2)||_0x2a6bd2[_0x5298e6(0x7e)]===0x0)return[];if(_0x2a6bd2[_0x5298e6(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x8a));const _0x1cc785=new Map();let _0x4d495d=0x0;for(const _0x242010 of _0x2a6bd2){if(!_0x242010||typeof _0x242010!==_0x5298e6(0x7c)||typeof _0x242010[_0x5298e6(0x8d)]!==_0x5298e6(0x80))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x7a));const _0x53c433=normalizeSkillRelativePath(_0x242010[_0x5298e6(0x8d)]);if(_0x1cc785[_0x5298e6(0x97)](_0x53c433))throw CliErrors[_0x5298e6(0x7b)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]!==undefined&&!Buffer[_0x5298e6(0x85)](_0x242010['bytes']))throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x95)+_0x53c433);if(_0x242010[_0x5298e6(0x8b)]===undefined&&typeof _0x242010[_0x5298e6(0x87)]!=='string')throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa2)+_0x53c433);const _0x32fb49=fileContent(_0x242010),_0x45f15e=_0x32fb49[_0x5298e6(0x7e)];if(_0x45f15e>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0xa4)+_0x53c433);_0x4d495d+=_0x45f15e;if(_0x4d495d>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x5298e6(0x7b)](_0x5298e6(0x9e));_0x1cc785[_0x5298e6(0x83)](_0x53c433,{'path':_0x53c433,'bytes':_0x32fb49});}return Array[_0x5298e6(0x74)](_0x1cc785['values']())[_0x5298e6(0x88)](compareSkillFiles);}export function normalizeManifestFiles(_0x14bc83){const _0x565f4c=a90_0x14db;if(!Array[_0x565f4c(0x77)](_0x14bc83)||_0x14bc83['length']===0x0)return[];if(_0x14bc83['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8a));const _0x5a7978=new Map();let _0x4181a8=0x0;for(const _0xc6bfb2 of _0x14bc83){if(!_0xc6bfb2||typeof _0xc6bfb2!==_0x565f4c(0x7c)||typeof _0xc6bfb2['path']!==_0x565f4c(0x80))throw CliErrors[_0x565f4c(0x7b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x46f362=normalizeSkillRelativePath(_0xc6bfb2[_0x565f4c(0x8d)]);if(_0x5a7978[_0x565f4c(0x97)](_0x46f362))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x8c)+_0x46f362);if(!isSha256Hex(_0xc6bfb2[_0x565f4c(0x98)]))throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x92)+_0x46f362);if(!Number[_0x565f4c(0xa3)](_0xc6bfb2[_0x565f4c(0x78)])||_0xc6bfb2[_0x565f4c(0x78)]<0x0)throw CliErrors[_0x565f4c(0x7b)](_0x565f4c(0x96)+_0x46f362);if(_0xc6bfb2['size']>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x565f4c(0xa4)+_0x46f362);_0x4181a8+=_0xc6bfb2[_0x565f4c(0x78)];if(_0x4181a8>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x565f4c(0x9e));_0x5a7978[_0x565f4c(0x83)](_0x46f362,{'path':_0x46f362,'sha256':_0xc6bfb2['sha256'][_0x565f4c(0x84)](),'size':_0xc6bfb2['size']});}return Array[_0x565f4c(0x74)](_0x5a7978[_0x565f4c(0x9b)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x280c56){const _0x113d40=realpathSync(_0x280c56),_0x59a4be=[];let _0x4c9b1b=0x0;function _0x1dd0f7(_0xb757ef){const _0x4edabd=a90_0x14db,_0x5696ec=readdirSync(_0xb757ef,{'withFileTypes':!![]})['sort']((_0x5cff2f,_0x16b4cd)=>_0x5cff2f[_0x4edabd(0x81)][_0x4edabd(0x93)](_0x16b4cd[_0x4edabd(0x81)]));for(const _0x2b867e of _0x5696ec){if(_0x2b867e[_0x4edabd(0x72)]()&&IGNORED_DIR_NAMES['has'](_0x2b867e[_0x4edabd(0x81)]))continue;if(IGNORED_FILE_NAMES[_0x4edabd(0x97)](_0x2b867e[_0x4edabd(0x81)]))continue;const _0x1f624a=resolve(_0xb757ef,_0x2b867e['name']);if(_0x2b867e['isSymbolicLink']())throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x73)+_0x1f624a);const _0x851c72=toPosixPath(relative(_0x113d40,_0x1f624a));if(_0x2b867e['isDirectory']()){_0x1dd0f7(_0x1f624a);continue;}if(!_0x2b867e[_0x4edabd(0x82)]())continue;validateSkillRelativePath(_0x851c72);const _0x361a2d=readFileSync(_0x1f624a);if(_0x361a2d['length']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0xa4)+_0x851c72);_0x4c9b1b+=_0x361a2d['length'];if(_0x4c9b1b>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x4edabd(0x7b)]('Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.');_0x59a4be[_0x4edabd(0x7f)]({'path':_0x851c72,'bytes':_0x361a2d});if(_0x59a4be[_0x4edabd(0x7e)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x4edabd(0x7b)](_0x4edabd(0x8a));}}return _0x1dd0f7(_0x113d40),normalizeLocalFiles(_0x59a4be);}export function compareSkillFiles(_0x36b020,_0x2335c5){const _0x38a062=a90_0x14db;if(_0x36b020[_0x38a062(0x8d)]===SKILL_FILE)return _0x2335c5[_0x38a062(0x8d)]===SKILL_FILE?0x0:-0x1;if(_0x2335c5[_0x38a062(0x8d)]===SKILL_FILE)return 0x1;return Buffer[_0x38a062(0x9c)](Buffer['from'](_0x36b020[_0x38a062(0x8d)],_0x38a062(0x8e)),Buffer[_0x38a062(0x74)](_0x2335c5[_0x38a062(0x8d)],_0x38a062(0x8e)));}export function normalizeSkillRelativePath(_0x4ce4e7){const _0x477e8c=a90_0x14db,_0x57f157=toPosixPath(_0x4ce4e7[_0x477e8c(0x9d)]());return validateSkillRelativePath(_0x57f157),_0x57f157;}export function validateSkillRelativePath(_0x1acb96){const _0x165a5c=a90_0x14db;if(!_0x1acb96||_0x1acb96[_0x165a5c(0xa1)]('/')||_0x1acb96[_0x165a5c(0xa0)]('//'))throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);for(const _0xcb07d6 of _0x1acb96['split']('/')){if(!_0xcb07d6||_0xcb07d6==='.'||_0xcb07d6==='..')throw CliErrors[_0x165a5c(0x7b)](_0x165a5c(0x90)+_0x1acb96);}}function a90_0x13de(){const _0x34c272=['2210sdRcgZ','values','compare','trim','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','6JTxThK','includes','startsWith','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','isSafeInteger','Skill\x20file\x20exceeds\x20size\x20limit:\x20','23265RKwqmH','isDirectory','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','from','1328656YveUzN','195543SYWXVs','isArray','size','18339KwqwBe','Skill\x20file\x20path\x20must\x20be\x20text.','validation','object','24AkbRsD','length','push','string','name','isFile','set','toLowerCase','isBuffer','276RVbsTp','content','sort','870975FtKYla','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','bytes','Duplicate\x20Skill\x20file\x20path:\x20','path','utf8','117282bDverW','Unsafe\x20Skill\x20file\x20path:\x20','274140dffjQx','Skill\x20file\x20sha256\x20is\x20invalid:\x20','localeCompare','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','has','sha256','test'];a90_0x13de=function(){return _0x34c272;};return a90_0x13de();}export function toPosixPath(_0x584106){return _0x584106['replace'](/\\/g,'/');}export function isSha256Hex(_0x21fa09){const _0x50fede=a90_0x14db;return typeof _0x21fa09===_0x50fede(0x80)&&/^[a-fA-F0-9]{64}$/[_0x50fede(0x99)](_0x21fa09);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3a4ea0,_0x1859f6){const _0x368fc4=a91_0x3882,_0x419ab8=_0x3a4ea0();while(!![]){try{const _0x5007f6=parseInt(_0x368fc4(0xa7))/0x1+parseInt(_0x368fc4(0xb5))/0x2*(-parseInt(_0x368fc4(0xa4))/0x3)+parseInt(_0x368fc4(0x99))/0x4+parseInt(_0x368fc4(0x9c))/0x5+-parseInt(_0x368fc4(0xbc))/0x6*(-parseInt(_0x368fc4(0xc1))/0x7)+-parseInt(_0x368fc4(0xb3))/0x8*(parseInt(_0x368fc4(0xad))/0x9)+-parseInt(_0x368fc4(0x98))/0xa*(parseInt(_0x368fc4(0xb0))/0xb);if(_0x5007f6===_0x1859f6)break;else _0x419ab8['push'](_0x419ab8['shift']());}catch(_0x515ccf){_0x419ab8['push'](_0x419ab8['shift']());}}}(a91_0x351a,0x5e5c0));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a91_0x351a(){const _0x501333=['Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','force','86946DQTfHk','Runtime\x20Skill\x20package\x20is\x20missing\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','623650wsdUyA','name:\x20','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','stringify','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','64287IzngUQ','Managed\x20file\x20was\x20removed\x20locally:\x20','paths','1999943vaEPKu','keys','map','184zGWRUk','appCode','12tisUhy','path','description:\x20','pulledAt','skillName','test','find','5910ovlNJW','has','fileHashes','.\x20Changed\x20file:\x20','contentHash','595rFPuWj','utf8','isFile','30HQZvjr','1335172acxMgH','replace','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1144740EOcxPY','trim','accessKey','---','description'];a91_0x351a=function(){return _0x501333;};return a91_0x351a();}import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';function a91_0x3882(_0x504cf7,_0x5338e3){_0x504cf7=_0x504cf7-0x97;const _0x351ade=a91_0x351a();let _0x3882c4=_0x351ade[_0x504cf7];return _0x3882c4;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x34c602,_0x7dba71,_0x1caa92){const _0x408e18=a91_0x3882,_0x306d3b=requireSkillCode(_0x34c602),_0x3a4940=requirePackageBytes(_0x306d3b,_0x1caa92['packageBytes']),_0x5c0515=extractDownloadedPackage(_0x3a4940),_0x32826d=_0x5c0515['find'](_0x19730a=>_0x19730a[_0x408e18(0xb6)]===SKILL_FILE);if(!_0x32826d)throw CliErrors[_0x408e18(0xa9)](_0x408e18(0xa5)+SKILL_FILE+':\x20'+_0x306d3b);const _0x3cf65f=withMaterializedSkillFrontmatter(_0x5c0515,_0x34c602,_0x306d3b),_0x1e6134=_0x3cf65f[_0x408e18(0xbb)](_0x5310f1=>_0x5310f1[_0x408e18(0xb6)]===SKILL_FILE),_0x9caafb=fileText(_0x1e6134),_0x5e6d7c=getRuntimeSkillDir(_0x1caa92['env'],_0x1caa92[_0x408e18(0x9e)],_0x1caa92[_0x408e18(0xb4)],_0x7dba71,_0x306d3b,_0x1caa92[_0x408e18(0xaf)]),_0x58a7c1=resolve(_0x5e6d7c,SKILL_FILE),_0x141b90=resolve(_0x5e6d7c,METADATA_FILE),_0x247ca2=contentHash(_0x9caafb),_0x12162d=readMetadataIfPresent(_0x141b90)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x5e6d7c,_0x141b90,_0x3cf65f,_0x1caa92[_0x408e18(0xa3)]===!![]),mkdirSync(_0x5e6d7c,{'recursive':!![],'mode':0x1c0});const _0x42fede=existsSync(_0x58a7c1)?readFileSync(_0x58a7c1,_0x408e18(0xc2)):undefined;return materializeFiles(_0x5e6d7c,_0x3cf65f),removeStaleManagedFiles(_0x5e6d7c,_0x12162d,_0x3cf65f),writeJsonAtomic(_0x141b90,buildMetadata(_0x34c602,_0x7dba71,_0x1caa92['appCode'],_0x247ca2,_0x1caa92[_0x408e18(0xb8)],_0x3cf65f,_0x3a4940)),{'skill':_0x34c602,'scope':_0x7dba71,'dir':_0x5e6d7c,'skillMdPath':_0x58a7c1,'metadataPath':_0x141b90,'contentHash':_0x247ca2,'changed':_0x42fede!==_0x9caafb};}function withMaterializedSkillFrontmatter(_0x335b9e,_0xc05094,_0x2d7ffe){const _0x52e158=a91_0x3882;return normalizeLocalFiles(_0x335b9e)[_0x52e158(0xb2)](_0x1c3e3e=>{const _0x53fba1=_0x52e158,_0x2a6b47=fileText(_0x1c3e3e);if(_0x1c3e3e[_0x53fba1(0xb6)]!==SKILL_FILE||hasYamlFrontmatter(_0x2a6b47))return _0x1c3e3e;return{'path':_0x1c3e3e[_0x53fba1(0xb6)],'content':prependSkillFrontmatter(_0x2a6b47,{'name':_0x2d7ffe,'description':_0xc05094['description']?.[_0x53fba1(0x9d)]()||_0xc05094[_0x53fba1(0xb9)]?.[_0x53fba1(0x9d)]()||_0x2d7ffe})};});}function hasYamlFrontmatter(_0x3c1ae9){const _0x868d1a=a91_0x3882;return/^\uFEFF?---\s*\r?\n/[_0x868d1a(0xba)](_0x3c1ae9);}function prependSkillFrontmatter(_0x5e02d3,_0x4240da){const _0x1b64e7=a91_0x3882,_0x10965a=_0x5e02d3[_0x1b64e7(0x9a)](/^\uFEFF/,'');return[_0x1b64e7(0x9f),_0x1b64e7(0xa8)+yamlString(_0x4240da['name']),_0x1b64e7(0xb7)+yamlString(_0x4240da[_0x1b64e7(0xa0)]),'---','',_0x10965a]['join']('\x0a');}function yamlString(_0x4121b5){const _0x2e5655=a91_0x3882;return JSON[_0x2e5655(0xab)](_0x4121b5['replace'](/\r/g,'')[_0x2e5655(0x9d)]());}function ensurePulledFilesCanBeOverwritten(_0x30169d,_0x32f41f,_0x24e629,_0x65b5da){const _0x1c741c=a91_0x3882;if(_0x65b5da||!existsSync(_0x32f41f))return;const _0x1e4f05=readMetadataIfPresent(_0x32f41f);if(!_0x1e4f05)return;const _0x365d29=_0x1e4f05[_0x1c741c(0xbe)]&&Object[_0x1c741c(0xb1)](_0x1e4f05[_0x1c741c(0xbe)])['length']>0x0?_0x1e4f05[_0x1c741c(0xbe)]:undefined;if(_0x365d29)for(const [_0x2b8fca,_0x3530c5]of Object['entries'](_0x365d29)){const _0xc07c25=resolveManagedFilePath(_0x30169d,_0x2b8fca);if(!existsSync(_0xc07c25))throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xae)+_0x2b8fca);const _0x7fbabe=lstatSync(_0xc07c25);if(!_0x7fbabe[_0x1c741c(0x97)]())throw CliErrors['validation'](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0xaa)+_0x2b8fca);const _0x143cdb=bufferSha256(readFileSync(_0xc07c25));if(_0x143cdb!==_0x3530c5)throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d+_0x1c741c(0xbf)+_0x2b8fca,_0x1c741c(0xa6)+_0x2b8fca);}else{const _0x268b74=resolve(_0x30169d,SKILL_FILE);if(existsSync(_0x268b74)&&_0x1e4f05[_0x1c741c(0xc0)]){const _0x4e860e=contentHash(readFileSync(_0x268b74,_0x1c741c(0xc2)));if(_0x4e860e!==_0x1e4f05[_0x1c741c(0xc0)])throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa2)+_0x268b74,_0x1c741c(0xac));}}for(const _0x57add0 of normalizeLocalFiles(_0x24e629)){if(_0x365d29?.[_0x57add0[_0x1c741c(0xb6)]])continue;if(!_0x365d29&&_0x57add0[_0x1c741c(0xb6)]===SKILL_FILE)continue;const _0x42bf58=resolveManagedFilePath(_0x30169d,_0x57add0[_0x1c741c(0xb6)]);if(!existsSync(_0x42bf58))continue;const _0x4d021a=lstatSync(_0x42bf58);if(!_0x4d021a['isFile']())throw CliErrors[_0x1c741c(0xa9)](_0x1c741c(0xa1)+_0x30169d,_0x1c741c(0x9b)+_0x57add0['path']);const _0x128a53=bufferSha256(readFileSync(_0x42bf58));if(_0x128a53!==fileHash(_0x57add0))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x30169d,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x57add0[_0x1c741c(0xb6)]);}}function materializeFiles(_0x640927,_0x4caf5e){for(const _0x3155e5 of normalizeLocalFiles(_0x4caf5e)){const _0x535ec4=resolveManagedFilePath(_0x640927,_0x3155e5['path']);mkdirSync(dirname(_0x535ec4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x535ec4,fileContent(_0x3155e5),0x180);}}function removeStaleManagedFiles(_0x591ae2,_0x3c6888,_0x2d7caf){const _0x51063d=a91_0x3882;if(!_0x3c6888)return;const _0x1c82ba=new Set(normalizeLocalFiles(_0x2d7caf)[_0x51063d(0xb2)](_0xc381e1=>_0xc381e1[_0x51063d(0xb6)]));for(const _0x520c1e of Object[_0x51063d(0xb1)](_0x3c6888)){if(_0x1c82ba[_0x51063d(0xbd)](_0x520c1e))continue;const _0x524fdb=resolveManagedFilePath(_0x591ae2,_0x520c1e);existsSync(_0x524fdb)&&lstatSync(_0x524fdb)['isFile']()&&rmSync(_0x524fdb,{'force':!![]});}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a92_0x134c(){const _0x2bfa61=['length','468209SjCOVb','path','userId','version','utf8','Invalid\x20','3609822IeoPWw','1732932OVGDAM','sourceSessionId','144880WlMDai','description','85aWLZGH','2588670xKpHnb','75604LPMDEz','trim','map','status','isArray','zipSha256','object','skillCode','files','readonly','tenantCode','tags','personal','string','forkedFromVersion','manifest','parse','hasUpstreamUpdate','155fvVIot','validation','toISOString','48McIjDq','skillName','10504qmXIYp','Runtime\x20Skill\x20is\x20missing\x20skillCode.'];a92_0x134c=function(){return _0x2bfa61;};return a92_0x134c();}(function(_0x36a058,_0x4b8244){const _0x169be4=a92_0x5f31,_0x4aaa4c=_0x36a058();while(!![]){try{const _0x1054bb=parseInt(_0x169be4(0x108))/0x1*(parseInt(_0x169be4(0x121))/0x2)+parseInt(_0x169be4(0x104))/0x3+parseInt(_0x169be4(0x10a))/0x4*(parseInt(_0x169be4(0x11c))/0x5)+-parseInt(_0x169be4(0x103))/0x6+-parseInt(_0x169be4(0x124))/0x7*(parseInt(_0x169be4(0x11f))/0x8)+-parseInt(_0x169be4(0x109))/0x9+-parseInt(_0x169be4(0x106))/0xa;if(_0x1054bb===_0x4b8244)break;else _0x4aaa4c['push'](_0x4aaa4c['shift']());}catch(_0x5b45de){_0x4aaa4c['push'](_0x4aaa4c['shift']());}}}(a92_0x134c,0x4a716));import{existsSync,readFileSync}from'node:fs';function a92_0x5f31(_0x5ad472,_0x2adb76){_0x5ad472=_0x5ad472-0x101;const _0x134cc3=a92_0x134c();let _0x5f31b3=_0x134cc3[_0x5ad472];return _0x5f31b3;}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x565546,_0x1ffde9,_0x527ee4,_0x928166,_0x313950,_0x324f8b,_0x5a8f16){const _0x52e759=a92_0x5f31,_0x457e97=_0x324f8b?normalizeLocalFiles(_0x324f8b):[],_0x26eb6e=!_0x5a8f16&&_0x457e97[_0x52e759(0x123)]>0x0?buildSkillPackage(_0x457e97):undefined,_0x81e3af=_0x5a8f16?bufferSha256(_0x5a8f16):_0x26eb6e?.[_0x52e759(0x119)][_0x52e759(0x10f)],_0x1b15c7=_0x5a8f16?.[_0x52e759(0x123)]??_0x26eb6e?.[_0x52e759(0x119)]['zipSize'],_0x20ea73=_0x457e97['length']>0x0?Object['fromEntries'](_0x457e97['map'](_0x224d1d=>[_0x224d1d[_0x52e759(0x125)],fileHash(_0x224d1d)])):undefined;return{'schemaVersion':_0x457e97[_0x52e759(0x123)]>0x0?0x2:0x1,'id':_0x565546['id'],'appCode':_0x527ee4,'skillCode':requireSkillCode(_0x565546),'skillName':_0x565546[_0x52e759(0x120)],'description':_0x565546[_0x52e759(0x107)],'scope':_0x1ffde9,'readonly':_0x1ffde9!==_0x52e759(0x116)||_0x565546[_0x52e759(0x113)]===!![],'tenantCode':_0x565546[_0x52e759(0x114)],'userId':_0x565546[_0x52e759(0x126)],'version':_0x565546[_0x52e759(0x127)],'status':_0x565546[_0x52e759(0x10d)],'tags':Array[_0x52e759(0x10e)](_0x565546[_0x52e759(0x115)])?_0x565546[_0x52e759(0x115)]:[],'hasUpstreamUpdate':_0x565546[_0x52e759(0x11b)],'forkedFromSkillId':_0x565546['forkedFromSkillId'],'forkedFromVersion':_0x565546[_0x52e759(0x118)],'sourceSessionId':_0x565546[_0x52e759(0x105)],'contentHash':_0x928166,'fileHashes':_0x20ea73,'treeHash':_0x457e97[_0x52e759(0x123)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x457e97)):undefined,'ossPath':remoteManifestOssPath(_0x565546[_0x52e759(0x112)]),'zipSha256':_0x81e3af,'zipSize':_0x1b15c7,'files':_0x457e97[_0x52e759(0x123)]>0x0?_0x457e97[_0x52e759(0x10c)](_0x1e551e=>({'path':_0x1e551e[_0x52e759(0x125)],'hash':fileHash(_0x1e551e),'size':fileContent(_0x1e551e)[_0x52e759(0x123)]})):undefined,'pulledAt':_0x313950??new Date()[_0x52e759(0x11e)]()};}export function requireSkillCode(_0x44718c){const _0x5d8954=a92_0x5f31,_0x25d905=_0x44718c[_0x5d8954(0x111)]?.['trim']();if(!_0x25d905)throw CliErrors[_0x5d8954(0x11d)](_0x5d8954(0x122));return _0x25d905;}export function readMetadataIfPresent(_0x31c7ec){const _0x195059=a92_0x5f31;if(!existsSync(_0x31c7ec))return undefined;try{const _0x16f64e=JSON[_0x195059(0x11a)](readFileSync(_0x31c7ec,_0x195059(0x101)));return _0x16f64e;}catch{throw CliErrors[_0x195059(0x11d)](_0x195059(0x102)+METADATA_FILE+':\x20'+_0x31c7ec);}}function remoteManifestOssPath(_0x21eb3e){const _0x5522e4=a92_0x5f31;if(!_0x21eb3e||typeof _0x21eb3e!==_0x5522e4(0x110)||Array[_0x5522e4(0x10e)](_0x21eb3e))return undefined;const _0x40874c=_0x21eb3e['ossPath'];return typeof _0x40874c===_0x5522e4(0x117)&&_0x40874c[_0x5522e4(0x10b)]()?_0x40874c['trim']():undefined;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a93_0x1186f9=a93_0x7759;(function(_0x1c0f69,_0x4bcd3c){const _0x3240bf=a93_0x7759,_0x3eb920=_0x1c0f69();while(!![]){try{const _0x7b008f=parseInt(_0x3240bf(0x7d))/0x1*(parseInt(_0x3240bf(0x7c))/0x2)+-parseInt(_0x3240bf(0x7e))/0x3*(-parseInt(_0x3240bf(0x7f))/0x4)+parseInt(_0x3240bf(0x87))/0x5+-parseInt(_0x3240bf(0x81))/0x6*(-parseInt(_0x3240bf(0x88))/0x7)+-parseInt(_0x3240bf(0x83))/0x8*(-parseInt(_0x3240bf(0x77))/0x9)+-parseInt(_0x3240bf(0x89))/0xa+-parseInt(_0x3240bf(0x84))/0xb;if(_0x7b008f===_0x4bcd3c)break;else _0x3eb920['push'](_0x3eb920['shift']());}catch(_0x1122ff){_0x3eb920['push'](_0x3eb920['shift']());}}}(a93_0x3725,0xf0ef1));function a93_0x7759(_0x5af78c,_0x4e7f26){_0x5af78c=_0x5af78c-0x74;const _0x372540=a93_0x3725();let _0x77591f=_0x372540[_0x5af78c];return _0x77591f;}import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x25afd4={}){const _0x3bf17d=a93_0x7759,_0xda2a62=_0x25afd4[_0x3bf17d(0x8a)]??homedir(),_0x1bb2ef=resolve(_0xda2a62,PRODUCT_CONFIG['homeDirName'],_0x3bf17d(0x7a)),_0x13a64a=trimmedEnv(_0x3bf17d(0x85)),_0x52ac9e=trimmedEnv('CLAUDE_SKILL_ROOT');return{'homeDir':_0xda2a62,'cacheRoot':_0x1bb2ef,'managedRoot':resolve(_0xda2a62,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x25afd4['agentsSkillsDir']??_0x13a64a??resolve(_0xda2a62,_0x3bf17d(0x80),_0x3bf17d(0x78)),'claudeSkillsDir':_0x25afd4[_0x3bf17d(0x79)]??_0x52ac9e??resolve(_0xda2a62,'.claude',_0x3bf17d(0x78))};}export function getRuntimeSkillCacheRoot(_0x195306,_0x31b3fd,_0x2ecfff={}){const _0x12acf5=a93_0x7759,_0x30418b=resolveSkillSyncPaths(_0x2ecfff);return resolve(_0x30418b[_0x12acf5(0x86)],_0x195306,fingerprintAccessKey(_0x31b3fd),_0x12acf5(0x78));}export function getRuntimeSkillDir(_0x565ea3,_0x91d606,_0x80ef2e,_0x3b588a,_0x276f0b,_0x28d823={}){const _0x3c6f90=a93_0x7759;return resolve(getRuntimeSkillCacheRoot(_0x565ea3,_0x91d606,_0x28d823),safePathSegment(_0x80ef2e,_0x3c6f90(0x76)),_0x3b588a,safePathSegment(_0x276f0b,'skillCode'));}function a93_0x3725(){const _0x571dd0=['1070280JFRjxW','4753VEuXVi','18060940mDCjOn','homeDir','path\x20segment','includes','appCode','39141bUfvuN','skills','claudeSkillsDir','cache','trim','638446UXFcNv','1qCXxHe','5437953cgYCWU','4EsaVfh','.agents','2022dDdFmd','Unsafe\x20','496aOzZPo','565752TOSRwU','SKILL_ROOT','cacheRoot'];a93_0x3725=function(){return _0x571dd0;};return a93_0x3725();}export function safePathSegment(_0x10804e,_0xcffc1e=a93_0x1186f9(0x74)){const _0x225837=a93_0x1186f9;if(!_0x10804e||_0x10804e[_0x225837(0x75)]('/')||_0x10804e[_0x225837(0x75)]('\x5c')||_0x10804e[_0x225837(0x75)]('..'))throw CliErrors['validation'](_0x225837(0x82)+_0xcffc1e+'\x20for\x20local\x20path:\x20'+_0x10804e);return _0x10804e;}function trimmedEnv(_0x314806){const _0x423398=a93_0x1186f9,_0xa12a8d=productEnv(_0x314806)?.[_0x423398(0x7b)]();return _0xa12a8d?_0xa12a8d:undefined;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5821a0,_0x282cba){const _0x2a7de3=a94_0x5ad4,_0x3db4e7=_0x5821a0();while(!![]){try{const _0x50d265=parseInt(_0x2a7de3(0x10c))/0x1+-parseInt(_0x2a7de3(0xf7))/0x2*(parseInt(_0x2a7de3(0xfa))/0x3)+parseInt(_0x2a7de3(0xef))/0x4+parseInt(_0x2a7de3(0x107))/0x5+-parseInt(_0x2a7de3(0xfc))/0x6*(parseInt(_0x2a7de3(0xfb))/0x7)+parseInt(_0x2a7de3(0xf2))/0x8+parseInt(_0x2a7de3(0x100))/0x9;if(_0x50d265===_0x282cba)break;else _0x3db4e7['push'](_0x3db4e7['shift']());}catch(_0x541cc5){_0x3db4e7['push'](_0x3db4e7['shift']());}}}(a94_0x328e,0x4fd81));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a94_0x5ad4(_0x4b8a19,_0x3eecbc){_0x4b8a19=_0x4b8a19-0xe8;const _0x328e09=a94_0x328e();let _0x5ad439=_0x328e09[_0x4b8a19];return _0x5ad439;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';function a94_0x328e(){const _0x3f9fd0=['filter','pushedAt','files','isFile','6elxEqr','Skill\x20metadata\x20appCode\x20\x22','appCode','116079FzoBcW','97559IMNSgl','276RecGmg','scope','some','version','3525138gEWoTB','personal','Unable\x20to\x20resolve\x20skillCode\x20from\x20','tags','packageBase64','Skill\x20directory\x20not\x20found:\x20','content','41115TLBdXx','startsWith','isDirectory','find','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','135854pMEUjQ','description','length','manifest','isSymbolicLink','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','utf8','\x20or\x20directory\x20name.','path','932968cAoMuz','validation','skillCode','2521768cTkDzQ'];a94_0x328e=function(){return _0x3f9fd0;};return a94_0x328e();}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function readPushDirectory(_0x5af865,_0x68ccaa){const _0x4e98fe=a94_0x5ad4,_0x34d58b=resolvePushDirectoryRoot(_0x5af865),_0xf32549=resolve(_0x34d58b,SKILL_FILE);if(!existsSync(_0xf32549)||!lstatSync(_0xf32549)[_0x4e98fe(0xf6)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0xf32549);const _0x5cfad7=readMetadataIfPresent(resolve(_0x34d58b,METADATA_FILE));if(_0x5cfad7?.[_0x4e98fe(0xfd)]&&_0x5cfad7[_0x4e98fe(0xfd)]!==_0x4e98fe(0x101))throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0x10b)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5cfad7['scope']+'\x22.');if(_0x5cfad7?.[_0x4e98fe(0xf9)]&&_0x5cfad7[_0x4e98fe(0xf9)]!==_0x68ccaa)throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0xf8)+_0x5cfad7[_0x4e98fe(0xf9)]+_0x4e98fe(0xeb)+_0x68ccaa+'\x22.');const _0x23f9f5=scanSkillDirectory(_0x34d58b),_0x2df97f=buildSkillPackage(_0x23f9f5),_0x16e3be=readFileSync(_0xf32549,_0x4e98fe(0xec)),_0x3f5bac=_0x5cfad7?.[_0x4e98fe(0xf1)]??deriveSkillCodeFromDirectory(_0x34d58b,_0x68ccaa);if(!_0x3f5bac)throw CliErrors[_0x4e98fe(0xf0)](_0x4e98fe(0x102)+METADATA_FILE+_0x4e98fe(0xed));return{'skillCode':_0x3f5bac,'metadata':_0x5cfad7,'input':{'skillCode':_0x3f5bac,'skillName':_0x5cfad7?.['skillName'],'description':_0x5cfad7?.[_0x4e98fe(0x10d)],'content':_0x16e3be,'files':_0x2df97f[_0x4e98fe(0xe9)],'packageBase64':_0x2df97f[_0x4e98fe(0x104)],'tags':_0x5cfad7?.[_0x4e98fe(0x103)],'version':_0x5cfad7?.[_0x4e98fe(0xff)],'sourceSessionId':_0x5cfad7?.['sourceSessionId']}};}export function recordPushedRuntimeSkill(_0x583cec,_0x2040fd,_0xc241ae,_0x5e676b={}){const _0x1e620e=a94_0x5ad4,_0x5e1072=resolvePushDirectoryRoot(_0x583cec),_0x2bfafc=scanSkillDirectory(_0x5e1072),_0x1df267=_0x2bfafc[_0x1e620e(0x10a)](_0x5dd919=>_0x5dd919[_0x1e620e(0xee)]===SKILL_FILE),_0x44059b=_0x1df267?fileText(_0x1df267):'',_0x38e266=tryNormalizePackageManifest(_0x2040fd['files']),_0x4e4685={..._0x2040fd,'content':_0x2040fd[_0x1e620e(0x106)]??_0x44059b,'files':_0x38e266},_0x596b07=_0x38e266?normalizeLocalFiles(_0x2bfafc)[_0x1e620e(0xf3)](_0x277eb1=>_0x38e266[_0x1e620e(0xf5)][_0x1e620e(0xfe)](_0x50c771=>_0x50c771[_0x1e620e(0xee)]===_0x277eb1[_0x1e620e(0xee)])):undefined,_0x2600c1=buildMetadata(_0x4e4685,_0x5e676b['scope']??'personal',_0xc241ae,contentHash(_0x4e4685['content']??''),_0x5e676b[_0x1e620e(0xf4)],_0x596b07);writeJsonAtomic(resolve(_0x5e1072,METADATA_FILE),_0x2600c1);}export function deriveSkillCodeFromDirectory(_0x459701,_0x44a931){const _0x2837c9=a94_0x5ad4,_0x3b34a9=basename(resolve(_0x459701)),_0x49cf76=_0x44a931+'--';return _0x3b34a9[_0x2837c9(0x108)](_0x49cf76)?_0x3b34a9['slice'](_0x49cf76[_0x2837c9(0xe8)]):_0x3b34a9;}function resolvePushDirectoryRoot(_0x593a18){const _0x45a65a=a94_0x5ad4,_0x4eddc8=resolve(_0x593a18);if(!existsSync(_0x4eddc8))throw CliErrors[_0x45a65a(0xf0)]('Skill\x20directory\x20not\x20found:\x20'+_0x593a18);const _0x5902b1=lstatSync(_0x4eddc8);if(_0x5902b1['isDirectory']())return _0x4eddc8;if(_0x5902b1[_0x45a65a(0xea)]()){const _0x122cfe=realpathSync(_0x4eddc8);if(lstatSync(_0x122cfe)[_0x45a65a(0x109)]())return _0x122cfe;}throw CliErrors['validation'](_0x45a65a(0x105)+_0x593a18);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x25d0a2,_0x206652){const _0x49baa7=a95_0x1fae,_0x468eca=_0x25d0a2();while(!![]){try{const _0x7fdd14=parseInt(_0x49baa7(0x146))/0x1*(parseInt(_0x49baa7(0x145))/0x2)+-parseInt(_0x49baa7(0x14c))/0x3*(-parseInt(_0x49baa7(0x14d))/0x4)+-parseInt(_0x49baa7(0x152))/0x5*(-parseInt(_0x49baa7(0x14e))/0x6)+-parseInt(_0x49baa7(0x149))/0x7+-parseInt(_0x49baa7(0x140))/0x8*(-parseInt(_0x49baa7(0x14f))/0x9)+-parseInt(_0x49baa7(0x144))/0xa*(parseInt(_0x49baa7(0x153))/0xb)+parseInt(_0x49baa7(0x151))/0xc;if(_0x7fdd14===_0x206652)break;else _0x468eca['push'](_0x468eca['shift']());}catch(_0x149693){_0x468eca['push'](_0x468eca['shift']());}}}(a95_0x3810,0x41cfa));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x3490b2){const _0x1a61b2=a95_0x1fae,_0x3e5a4d=_0x3490b2&&_0x3490b2[_0x1a61b2(0x143)]>0x0?_0x3490b2:[_0x1a61b2(0x14b),_0x1a61b2(0x147),'builtin'],_0x1777a8=[];for(const _0x3c1e90 of _0x3e5a4d){if(!isRuntimeSkillScope(_0x3c1e90))throw CliErrors[_0x1a61b2(0x148)](_0x1a61b2(0x142)+_0x3c1e90);!_0x1777a8[_0x1a61b2(0x141)](_0x3c1e90)&&_0x1777a8[_0x1a61b2(0x150)](_0x3c1e90);}return _0x1777a8;}function a95_0x3810(){const _0x159fdc=['validation','319648WpTXRS','builtin','personal','195FPBfTi','15172NYyqtp','414KkqpPe','9YMqYAl','push','191892FMuGyp','5455RcboXi','11EGOSaf','1628168oeXAPW','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','length','3079930aDYipA','163766tzJAKw','1CnaHrI','company'];a95_0x3810=function(){return _0x159fdc;};return a95_0x3810();}function a95_0x1fae(_0x51e410,_0x5212ce){_0x51e410=_0x51e410-0x140;const _0x381028=a95_0x3810();let _0x1faeb0=_0x381028[_0x51e410];return _0x1faeb0;}export function isRuntimeSkillScope(_0x269e49){const _0x220a35=a95_0x1fae;return _0x269e49===_0x220a35(0x14b)||_0x269e49==='company'||_0x269e49===_0x220a35(0x14a);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1b471c,_0x3055e8){const _0x3d161f=a97_0x2db1,_0x470b43=_0x1b471c();while(!![]){try{const _0x15fef1=parseInt(_0x3d161f(0x1e3))/0x1*(-parseInt(_0x3d161f(0x1da))/0x2)+parseInt(_0x3d161f(0x1e4))/0x3+-parseInt(_0x3d161f(0x1d9))/0x4+-parseInt(_0x3d161f(0x1e0))/0x5+-parseInt(_0x3d161f(0x1e6))/0x6+-parseInt(_0x3d161f(0x1e7))/0x7+parseInt(_0x3d161f(0x1e5))/0x8;if(_0x15fef1===_0x3055e8)break;else _0x470b43['push'](_0x470b43['shift']());}catch(_0x149d85){_0x470b43['push'](_0x470b43['shift']());}}}(a97_0x3d05,0xc958f));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{MAX_SKILL_FILE_BYTES,MAX_SKILL_FILE_COUNT,MAX_SKILL_PACKAGE_BYTES,MAX_SKILL_TOTAL_BYTES}from'./constants.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');function a97_0x2db1(_0x591da7,_0x4a170b){_0x591da7=_0x591da7-0x1cf;const _0x3d053c=a97_0x3d05();let _0x2db1d3=_0x3d053c[_0x591da7];return _0x2db1d3;}function a97_0x3d05(){const _0x1eea05=['568498AAiltg','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','length','name','Skill\x20package\x20exceeds\x20size\x20limit.','code','map','validation','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','sort','3487768wrMwaL','3284KVIYrG','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','originalSize','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','from','2520335liuaIg','validation_error','entries','471WUXqyB','4182471OhNNOZ','18003440FVvTrb','3535578LVdprd'];a97_0x3d05=function(){return _0x1eea05;};return a97_0x3d05();}export function createDeterministicZipPackage(_0x1ffbb9){const _0x4d7a8c=a97_0x2db1,_0x2e67b3={};for(const _0x2e627d of normalizeLocalFiles(_0x1ffbb9)){_0x2e67b3[_0x2e627d['path']]=fileContent(_0x2e627d);}const _0x404c7a=Buffer[_0x4d7a8c(0x1df)](zipSync(_0x2e67b3,{'level':0x0,'mtime':ZIP_MTIME}));if(_0x404c7a[_0x4d7a8c(0x1d1)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4d7a8c(0x1d6)](_0x4d7a8c(0x1d3));return _0x404c7a;}export function parseZipPackage(_0x1417cb){const _0xcfb968=a97_0x2db1;if(_0x1417cb[_0xcfb968(0x1d1)]<0x16)throw CliErrors['validation'](_0xcfb968(0x1dc));if(_0x1417cb['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0xcfb968(0x1d7));let _0x40186b=0x0,_0x1cdde7=0x0,_0x209aff;try{_0x209aff=unzipSync(_0x1417cb,{'filter'(_0x4ade44){const _0x84a0cf=_0xcfb968,_0x21a6fc=normalizeSkillRelativePath(_0x4ade44[_0x84a0cf(0x1d2)]);if(_0x21a6fc['endsWith']('/'))throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1db)+_0x21a6fc);if(_0x4ade44[_0x84a0cf(0x1dd)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1de)+_0x21a6fc);_0x40186b+=0x1;if(_0x40186b>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1cf));_0x1cdde7+=_0x4ade44[_0x84a0cf(0x1dd)];if(_0x1cdde7>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x84a0cf(0x1d6)](_0x84a0cf(0x1d0));return!![];}});}catch(_0x249e4c){if(isRuntimeSkillValidationError(_0x249e4c))throw _0x249e4c;throw CliErrors[_0xcfb968(0x1d6)](_0xcfb968(0x1dc));}return Object[_0xcfb968(0x1e2)](_0x209aff)[_0xcfb968(0x1d5)](([_0x2a5657,_0x4ae2a7])=>({'path':normalizeSkillRelativePath(_0x2a5657),'bytes':Buffer['from'](_0x4ae2a7)}))[_0xcfb968(0x1d8)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x17c763){const _0x4ab5da=a97_0x2db1;return typeof _0x17c763==='object'&&_0x17c763!==null&&_0x4ab5da(0x1d4)in _0x17c763&&_0x17c763['code']===_0x4ab5da(0x1e1);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5180da,_0x30d325){const _0x4e1802=a98_0x5cd1,_0x5b3957=_0x5180da();while(!![]){try{const _0x13b751=parseInt(_0x4e1802(0xc0))/0x1*(parseInt(_0x4e1802(0xe1))/0x2)+parseInt(_0x4e1802(0xb9))/0x3+-parseInt(_0x4e1802(0xc2))/0x4+-parseInt(_0x4e1802(0xb7))/0x5+-parseInt(_0x4e1802(0xe0))/0x6*(parseInt(_0x4e1802(0xdb))/0x7)+parseInt(_0x4e1802(0xc5))/0x8+parseInt(_0x4e1802(0xb8))/0x9*(parseInt(_0x4e1802(0xd5))/0xa);if(_0x13b751===_0x30d325)break;else _0x5b3957['push'](_0x5b3957['shift']());}catch(_0x3f9605){_0x5b3957['push'](_0x5b3957['shift']());}}}(a98_0x4be2,0xa54ed));import{CliErrors}from'../../errors.js';import{MAX_SKILL_PACKAGE_BYTES,SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a98_0x5cd1(_0x566dc5,_0x530b38){_0x566dc5=_0x566dc5-0xb4;const _0x4be223=a98_0x4be2();let _0x5cd118=_0x4be223[_0x566dc5];return _0x5cd118;}import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x6d9758){const _0x5bb877=a98_0x5cd1,_0x2d7321=normalizeLocalFiles(_0x6d9758);if(!_0x2d7321[_0x5bb877(0xd6)](_0xb47ef1=>_0xb47ef1[_0x5bb877(0xbf)]===SKILL_FILE))throw CliErrors['validation'](_0x5bb877(0xb4)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x1e78e4=localFilesToManifestFiles(_0x2d7321),_0x2d7af8=createDeterministicZipPackage(_0x2d7321);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x1e78e4),'zipSha256':bufferSha256(_0x2d7af8),'zipSize':_0x2d7af8[_0x5bb877(0xcf)],'files':_0x1e78e4},'packageBytes':_0x2d7af8,'packageBase64':_0x2d7af8['toString'](_0x5bb877(0xbc))};}export function verifyRuntimeSkillPackage(_0x44bd9c,_0x5b71ed){const _0x3cab1c=a98_0x5cd1,_0x1d1291=normalizePackageManifest(_0x44bd9c,{'requireOssPath':![]});if(!_0x1d1291)throw CliErrors[_0x3cab1c(0xd7)](_0x3cab1c(0xd3));return extractAndVerifyPackage(_0x1d1291,_0x5b71ed);}export function verifyRuntimeSkillBundle(_0xeadf5,_0x438e67){const _0x131e2d=a98_0x5cd1,_0x2af11f=normalizePackageManifest(_0xeadf5,{'requireOssPath':![]});if(!_0x2af11f)throw CliErrors['validation'](_0x131e2d(0xd3));if(_0x438e67[_0x131e2d(0xcf)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');return extractAndVerifyPackageFiles(_0x2af11f,_0x438e67);}export function tryNormalizePackageManifest(_0x5ded04){return normalizePackageManifest(_0x5ded04,{'requireOssPath':![]});}export function requirePackageBytes(_0x36813b,_0x457060){const _0x272554=a98_0x5cd1;if(!_0x457060||_0x457060['length']===0x0)throw CliErrors[_0x272554(0xd7)](_0x272554(0xcc)+_0x36813b);if(_0x457060[_0x272554(0xcf)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x272554(0xd7)](_0x272554(0xdd)+_0x36813b);return _0x457060;}function a98_0x4be2(){const _0x4fbb12=['sha256','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','map','6DWweEJ','106XDcohx','set','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.','has','Missing\x20','files','push','5340565bHPAzy','9lHCSfb','2563737qwQGjp','isSafeInteger','ossPath','base64','bytes','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','path','7249TgVypp','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','5291980bxgduN','string','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','8379752FsXudh','isArray','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','get','object','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','toLowerCase','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','length','zipSha256','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','size','10247110JMTBPp','some','validation','requireOssPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','zipSize','1699229aNXCxj'];a98_0x4be2=function(){return _0x4fbb12;};return a98_0x4be2();}export function extractDownloadedPackage(_0x3f655){const _0x1fd667=a98_0x5cd1,_0x85f58b=parseZipPackage(_0x3f655)[_0x1fd667(0xdf)](_0x575ce8=>({'path':_0x575ce8[_0x1fd667(0xbf)],'bytes':_0x575ce8[_0x1fd667(0xbd)]}));if(!_0x85f58b[_0x1fd667(0xd6)](_0x3ba25d=>_0x3ba25d[_0x1fd667(0xbf)]===SKILL_FILE))throw CliErrors[_0x1fd667(0xd7)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x85f58b);}export function localFilesToManifestFiles(_0x5d6bd2){const _0x574beb=a98_0x5cd1;return normalizeLocalFiles(_0x5d6bd2)[_0x574beb(0xdf)](_0x9618ff=>({'path':_0x9618ff[_0x574beb(0xbf)],'sha256':fileHash(_0x9618ff),'size':fileContent(_0x9618ff)[_0x574beb(0xcf)]}));}function normalizePackageManifest(_0x249157,_0x53a35d){const _0x264821=a98_0x5cd1;if(!_0x249157||typeof _0x249157!==_0x264821(0xca)||Array[_0x264821(0xc6)](_0x249157))return undefined;const _0x18fea0=_0x249157,_0x17b86f=typeof _0x18fea0[_0x264821(0xbb)]===_0x264821(0xc3)?_0x18fea0[_0x264821(0xbb)]['trim']():undefined;if(_0x53a35d[_0x264821(0xd8)]&&!_0x17b86f)return undefined;if(!Array[_0x264821(0xc6)](_0x18fea0[_0x264821(0xb5)])||_0x18fea0[_0x264821(0xb5)][_0x264821(0xcf)]===0x0)return undefined;if(!isSha256Hex(_0x18fea0['treeSha256']))throw CliErrors[_0x264821(0xd7)](_0x264821(0xd9));if(!isSha256Hex(_0x18fea0[_0x264821(0xd0)]))throw CliErrors[_0x264821(0xd7)](_0x264821(0xc1));if(!Number['isSafeInteger'](_0x18fea0[_0x264821(0xda)])||_0x18fea0[_0x264821(0xda)]<0x0)throw CliErrors[_0x264821(0xd7)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');if(_0x18fea0[_0x264821(0xda)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation'](_0x264821(0xe3));const _0x150ec3=normalizeManifestFiles(_0x18fea0[_0x264821(0xb5)]);if(!_0x150ec3[_0x264821(0xd6)](_0x290494=>_0x290494[_0x264821(0xbf)]===SKILL_FILE))throw CliErrors[_0x264821(0xd7)](_0x264821(0xbe)+SKILL_FILE+'.');const _0x1eb696=fileTreeHash(_0x150ec3);if(_0x1eb696!==_0x18fea0['treeSha256'][_0x264821(0xcd)]())throw CliErrors['validation'](_0x264821(0xc4));return{'schemaVersion':Number[_0x264821(0xba)](_0x18fea0[_0x264821(0xc7)])?_0x18fea0['schemaVersion']:0x2,'ossPath':_0x17b86f,'treeSha256':_0x1eb696,'zipSha256':_0x18fea0[_0x264821(0xd0)][_0x264821(0xcd)](),'zipSize':_0x18fea0[_0x264821(0xda)],'files':_0x150ec3};}function extractAndVerifyPackage(_0x3c173a,_0x2a4837){const _0x2e1cac=a98_0x5cd1,_0x2fdfbf=normalizePackageManifest(_0x3c173a,{'requireOssPath':![]});if(!_0x2fdfbf)throw CliErrors[_0x2e1cac(0xd7)](_0x2e1cac(0xd3));if(_0x2a4837[_0x2e1cac(0xcf)]!==_0x2fdfbf[_0x2e1cac(0xda)])throw CliErrors['validation'](_0x2e1cac(0xcb));const _0x53d998=bufferSha256(_0x2a4837);if(_0x53d998!==_0x2fdfbf[_0x2e1cac(0xd0)])throw CliErrors[_0x2e1cac(0xd7)](_0x2e1cac(0xce));return extractAndVerifyPackageFiles(_0x2fdfbf,_0x2a4837);}function extractAndVerifyPackageFiles(_0x11b642,_0x57e6fb){const _0x27538e=a98_0x5cd1,_0x1d6b39=parseZipPackage(_0x57e6fb);if(_0x1d6b39[_0x27538e(0xcf)]!==_0x11b642[_0x27538e(0xb5)][_0x27538e(0xcf)])throw CliErrors['validation'](_0x27538e(0xde));const _0x3e5300=new Map();for(const _0x543b38 of _0x1d6b39){if(_0x3e5300[_0x27538e(0xe4)](_0x543b38[_0x27538e(0xbf)]))throw CliErrors[_0x27538e(0xd7)](_0x27538e(0xd2)+_0x543b38[_0x27538e(0xbf)]);_0x3e5300[_0x27538e(0xe2)](_0x543b38[_0x27538e(0xbf)],_0x543b38);}const _0x112899=[];for(const _0x44accf of _0x11b642[_0x27538e(0xb5)]){const _0xf8d8b6=_0x3e5300[_0x27538e(0xc9)](_0x44accf[_0x27538e(0xbf)]);if(!_0xf8d8b6)throw CliErrors[_0x27538e(0xd7)](_0x27538e(0xc8)+_0x44accf['path']);if(_0xf8d8b6[_0x27538e(0xbd)][_0x27538e(0xcf)]!==_0x44accf[_0x27538e(0xd4)])throw CliErrors['validation'](_0x27538e(0xd1)+_0x44accf[_0x27538e(0xbf)]);const _0x322f7f=bufferSha256(_0xf8d8b6['bytes']);if(_0x322f7f!==_0x44accf[_0x27538e(0xdc)])throw CliErrors[_0x27538e(0xd7)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x44accf[_0x27538e(0xbf)]);_0x112899[_0x27538e(0xb6)]({'path':_0x44accf['path'],'bytes':_0xf8d8b6[_0x27538e(0xbd)]});}return normalizeLocalFiles(_0x112899);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a76_0x19070f=a76_0x30dc;(function(_0x13243a,_0x3d5e5c){const _0x164902=a76_0x30dc,_0x1e8a93=_0x13243a();while(!![]){try{const _0x74b48a=parseInt(_0x164902(0x18c))/0x1+-parseInt(_0x164902(0x131))/0x2+parseInt(_0x164902(0x182))/0x3+-parseInt(_0x164902(0x178))/0x4+-parseInt(_0x164902(0x185))/0x5*(-parseInt(_0x164902(0x1c6))/0x6)+parseInt(_0x164902(0x141))/0x7*(parseInt(_0x164902(0x1c8))/0x8)+-parseInt(_0x164902(0x15d))/0x9*(parseInt(_0x164902(0x1b9))/0xa);if(_0x74b48a===_0x3d5e5c)break;else _0x1e8a93['push'](_0x1e8a93['shift']());}catch(_0x28ae6a){_0x1e8a93['push'](_0x1e8a93['shift']());}}}(a76_0x8c76,0x85d6f));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='lovrabet.skill.json',SKILL_FILE=a76_0x19070f(0x135),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_0x19070f(0x1b8)]),IGNORED_DIR_NAMES=new Set([a76_0x19070f(0x1e1),a76_0x19070f(0x1e3),'.svn','node_modules',a76_0x19070f(0x179),a76_0x19070f(0x14d),a76_0x19070f(0x1b1),a76_0x19070f(0x144),'.turbo','.cache']),ZIP_LOCAL_FILE_HEADER_SIGNATURE=0x4034b50,ZIP_CENTRAL_DIRECTORY_SIGNATURE=0x2014b50,ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE=0x6054b50,ZIP_GENERAL_PURPOSE_UTF8=0x800,ZIP_METHOD_STORE=0x0,ZIP_METHOD_DEFLATE=0x8,ZIP_FIXED_DOS_TIME=0x0,ZIP_FIXED_DOS_DATE=0x21,CRC32_TABLE=createCrc32Table();export function resolveSkillSyncPaths(_0x584a92={}){const _0x565021=a76_0x19070f,_0x5f2223=_0x584a92[_0x565021(0x16f)]??homedir(),_0xf54495=resolve(_0x5f2223,PRODUCT_CONFIG[_0x565021(0x14e)],'cache'),_0x41de57=trimmedEnv(_0x565021(0x1a1)),_0x16a292=trimmedEnv(_0x565021(0x125));return{'homeDir':_0x5f2223,'cacheRoot':_0xf54495,'managedRoot':resolve(_0x5f2223,PRODUCT_CONFIG[_0x565021(0x14e)]),'agentsSkillsDir':_0x584a92[_0x565021(0x1b4)]??_0x41de57??resolve(_0x5f2223,_0x565021(0x14c),'skills'),'claudeSkillsDir':_0x584a92[_0x565021(0x190)]??_0x16a292??resolve(_0x5f2223,'.claude',_0x565021(0x1a9))};}export function getRuntimeSkillCacheRoot(_0x587e43,_0x531387,_0x527e5d={}){const _0x334710=a76_0x19070f,_0x37bdf2=resolveSkillSyncPaths(_0x527e5d);return resolve(_0x37bdf2[_0x334710(0x195)],_0x587e43,fingerprintAccessKey(_0x531387),_0x334710(0x1a9));}export function getRuntimeSkillDir(_0x243177,_0x10e28c,_0xc5f2e1,_0x45b493,_0x27d3db,_0x10a9ab={}){const _0x310646=a76_0x19070f;return resolve(getRuntimeSkillCacheRoot(_0x243177,_0x10e28c,_0x10a9ab),safePathSegment(_0xc5f2e1,'appCode'),_0x45b493,safePathSegment(_0x27d3db,_0x310646(0x143)));}export function listLocalRuntimeSkills(_0x3c1766,_0x58dee1={}){const _0xa4546a=a76_0x19070f,_0x129e8b=safePathSegment(_0x3c1766['appCode'],_0xa4546a(0x1ce)),_0x4ed618=normalizeRuntimeSkillScopes(_0x3c1766[_0xa4546a(0x171)]),_0x87a0a6=new Set(_0x4ed618),_0x3c973e=_0x3c1766[_0xa4546a(0x157)]?.[_0xa4546a(0x12d)](),_0x177481=new Map(),_0x110fbd=resolve(getRuntimeSkillCacheRoot(_0x3c1766[_0xa4546a(0x1d4)],_0x3c1766[_0xa4546a(0x1c5)],_0x58dee1),_0x129e8b);for(const _0x4b3007 of _0x4ed618){for(const _0x348d64 of localSkillEntryDirs(resolve(_0x110fbd,_0x4b3007))){collectLocalRuntimeSkill(_0x177481,_0x348d64,{'appCode':_0x129e8b,'scopes':_0x87a0a6,'code':_0x3c973e,'source':_0xa4546a(0x13d)});}}const _0x4a3974=resolveSkillSyncPaths(_0x58dee1);for(const _0x5eb2c1 of[_0x4a3974[_0xa4546a(0x1b4)],_0x4a3974[_0xa4546a(0x190)]]){for(const _0x31c10e of localSkillLinkCandidates(_0x5eb2c1,_0x129e8b,_0x87a0a6)){collectLocalRuntimeSkill(_0x177481,_0x31c10e,{'appCode':_0x129e8b,'scopes':_0x87a0a6,'code':_0x3c973e,'source':_0xa4546a(0x1d7),'linkedPath':_0x31c10e});}}return Array['from'](_0x177481[_0xa4546a(0x16d)]())[_0xa4546a(0x134)](compareLocalRuntimeSkills);}export function contentHash(_0x1c8cdf){const _0x5356a7=a76_0x19070f;return createHash('sha256')[_0x5356a7(0x196)](_0x1c8cdf)[_0x5356a7(0x14f)]('hex');}function fileContent(_0x9281ed){const _0x166eb9=a76_0x19070f;return _0x9281ed[_0x166eb9(0x1d6)]??Buffer[_0x166eb9(0x180)](_0x9281ed[_0x166eb9(0x1ad)]??'',_0x166eb9(0x16e));}function fileText(_0x5d1868){const _0x49dc19=a76_0x19070f;return fileContent(_0x5d1868)[_0x49dc19(0x13a)](_0x49dc19(0x16e));}function fileHash(_0xb7538){return bufferSha256(fileContent(_0xb7538));}function bufferSha256(_0x1c533c){const _0x973c32=a76_0x19070f;return createHash('sha256')[_0x973c32(0x196)](_0x1c533c)[_0x973c32(0x14f)](_0x973c32(0x146));}export function fileTreeHash(_0x348bf5){const _0x4216e9=a76_0x19070f,_0x3e06c6=createHash(_0x4216e9(0x11e));for(const _0x629ba5 of normalizeManifestFiles(_0x348bf5)){_0x3e06c6[_0x4216e9(0x196)](_0x629ba5['path']),_0x3e06c6['update']('\x00'),_0x3e06c6[_0x4216e9(0x196)](_0x629ba5['sha256']),_0x3e06c6['update']('\x00'),_0x3e06c6[_0x4216e9(0x196)](String(_0x629ba5[_0x4216e9(0x136)])),_0x3e06c6['update']('\x00');}return _0x3e06c6[_0x4216e9(0x14f)](_0x4216e9(0x146));}export function buildSkillPackage(_0x253a1b){const _0x117e67=a76_0x19070f,_0x389d69=normalizeLocalFiles(_0x253a1b);if(!_0x389d69[_0x117e67(0x1b2)](_0x5b5b84=>_0x5b5b84['path']===SKILL_FILE))throw CliErrors[_0x117e67(0x194)](_0x117e67(0x133)+SKILL_FILE+_0x117e67(0x137));const _0x199d29=localFilesToManifestFiles(_0x389d69),_0x3c381b=createDeterministicZipPackage(_0x389d69);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x199d29),'zipSha256':bufferSha256(_0x3c381b),'zipSize':_0x3c381b[_0x117e67(0x1dc)],'files':_0x199d29},'packageBytes':_0x3c381b,'packageBase64':_0x3c381b[_0x117e67(0x13a)](_0x117e67(0x199))};}export function verifyRuntimeSkillPackage(_0x50104d,_0xaeeb60){const _0x43759f=a76_0x19070f,_0x2ee81d=normalizePackageManifest(_0x50104d,{'requireOssPath':![]});if(!_0x2ee81d)throw CliErrors[_0x43759f(0x194)](_0x43759f(0x115));return extractAndVerifyPackage(_0x2ee81d,_0xaeeb60);}export function verifyRuntimeSkillBundle(_0x7c3e69,_0x2d03e3){const _0x5c666d=a76_0x19070f,_0x507090=normalizePackageManifest(_0x7c3e69,{'requireOssPath':![]});if(!_0x507090)throw CliErrors[_0x5c666d(0x194)](_0x5c666d(0x115));if(_0x2d03e3[_0x5c666d(0x1dc)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x5c666d(0x194)]('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');return extractAndVerifyPackageFiles(_0x507090,_0x2d03e3);}export function materializeRuntimeSkill(_0x518aab,_0x3405dc,_0x326b5c){const _0xd4bce8=a76_0x19070f,_0x346109=requireSkillCode(_0x518aab),_0x12280c=normalizeRemoteManifest(_0x518aab[_0xd4bce8(0x16c)]),_0x4c59f6=_0x12280c!==undefined,_0x32275a=_0x4c59f6?requirePackageBytes(_0x346109,_0x326b5c[_0xd4bce8(0x11f)]):undefined,_0x555f19=_0x4c59f6?extractAndVerifyPackage(_0x12280c,_0x32275a):[{'path':SKILL_FILE,'content':_0x518aab[_0xd4bce8(0x1ad)]??''}],_0x2d11ec=_0x555f19['find'](_0xd52a96=>_0xd52a96[_0xd4bce8(0x1e2)]===SKILL_FILE);if(!_0x2d11ec)throw CliErrors[_0xd4bce8(0x194)](_0xd4bce8(0x139)+SKILL_FILE+':\x20'+_0x346109);const _0x151d5b=fileText(_0x2d11ec);if(_0x4c59f6&&_0x518aab['content']!==undefined&&_0x518aab[_0xd4bce8(0x1ad)]!==_0x151d5b)throw CliErrors[_0xd4bce8(0x194)](_0xd4bce8(0x181)+SKILL_FILE+_0xd4bce8(0x114)+_0x346109);const _0x1b6282=withMaterializedSkillFrontmatter(_0x555f19,_0x518aab,_0x346109),_0x4ed342=_0x1b6282[_0xd4bce8(0x120)](_0x43e557=>_0x43e557[_0xd4bce8(0x1e2)]===SKILL_FILE),_0x328ff3=fileText(_0x4ed342),_0x315132=getRuntimeSkillDir(_0x326b5c[_0xd4bce8(0x1d4)],_0x326b5c[_0xd4bce8(0x1c5)],_0x326b5c[_0xd4bce8(0x1ce)],_0x3405dc,_0x346109,_0x326b5c[_0xd4bce8(0x153)]),_0x1f807c=resolve(_0x315132,SKILL_FILE),_0x393250=resolve(_0x315132,METADATA_FILE),_0x426089=contentHash(_0x328ff3),_0x55e595=readMetadataIfPresent(_0x393250)?.[_0xd4bce8(0x159)];ensurePulledFilesCanBeOverwritten(_0x315132,_0x393250,_0x1b6282,_0x326b5c[_0xd4bce8(0x1c0)]===!![]),mkdirSync(_0x315132,{'recursive':!![],'mode':0x1c0});const _0x198a3b=existsSync(_0x1f807c)?readFileSync(_0x1f807c,_0xd4bce8(0x16e)):undefined;return materializeFiles(_0x315132,_0x1b6282),_0x4c59f6&&removeStaleManagedFiles(_0x315132,_0x55e595,_0x1b6282),writeJsonAtomic(_0x393250,buildMetadata(_0x518aab,_0x3405dc,_0x326b5c[_0xd4bce8(0x1ce)],_0x426089,_0x326b5c[_0xd4bce8(0x1c4)],_0x4c59f6?_0x1b6282:undefined)),{'skill':_0x518aab,'scope':_0x3405dc,'dir':_0x315132,'skillMdPath':_0x1f807c,'metadataPath':_0x393250,'contentHash':_0x426089,'changed':_0x198a3b!==_0x328ff3};}function withMaterializedSkillFrontmatter(_0x3c9835,_0x290f30,_0x1ed3ff){const _0x4d6792=a76_0x19070f;return normalizeLocalFiles(_0x3c9835)[_0x4d6792(0x1c7)](_0x4c6914=>{const _0x5ab37b=_0x4d6792,_0x2b590a=fileText(_0x4c6914);if(_0x4c6914[_0x5ab37b(0x1e2)]!==SKILL_FILE||hasYamlFrontmatter(_0x2b590a))return _0x4c6914;return{'path':_0x4c6914['path'],'content':prependSkillFrontmatter(_0x2b590a,{'name':_0x1ed3ff,'description':_0x290f30[_0x5ab37b(0x1c3)]?.[_0x5ab37b(0x12d)]()||_0x290f30[_0x5ab37b(0x14b)]?.[_0x5ab37b(0x12d)]()||_0x1ed3ff})};});}function hasYamlFrontmatter(_0x4c84be){const _0x1c3d8f=a76_0x19070f;return/^\uFEFF?---\s*\r?\n/[_0x1c3d8f(0x1d3)](_0x4c84be);}function prependSkillFrontmatter(_0x144dd1,_0x1c960a){const _0x10765c=a76_0x19070f,_0x4b2ae6=_0x144dd1[_0x10765c(0x1db)](/^\uFEFF/,'');return['---',_0x10765c(0x18e)+yamlString(_0x1c960a[_0x10765c(0x1b3)]),_0x10765c(0x130)+yamlString(_0x1c960a[_0x10765c(0x1c3)]),_0x10765c(0x15f),'',_0x4b2ae6][_0x10765c(0x160)]('\x0a');}function yamlString(_0x3c3519){const _0x483e76=a76_0x19070f;return JSON[_0x483e76(0x173)](_0x3c3519[_0x483e76(0x1db)](/\r/g,'')['trim']());}function a76_0x30dc(_0x3a9eb7,_0x49796b){_0x3a9eb7=_0x3a9eb7-0x114;const _0x8c76a1=a76_0x8c76();let _0x30dc28=_0x8c76a1[_0x3a9eb7];return _0x30dc28;}export function linkEffectiveRuntimeSkills(_0x24738b,_0x46ff38,_0x1d4a9f={}){const _0x4f75a3=a76_0x19070f,_0x2c903f=new Map();for(const _0x53e331 of _0x24738b){const _0x4df7ba=_0x53e331[_0x4f75a3(0x118)]['skillCode'];if(!_0x4df7ba)continue;const _0x2a5b4c=_0x2c903f[_0x4f75a3(0x17c)](_0x4df7ba);(!_0x2a5b4c||_0x53e331['scope']===_0x4f75a3(0x1bf))&&_0x2c903f[_0x4f75a3(0x167)](_0x4df7ba,_0x53e331);}const _0x11a14e=[],_0xb31ecb=resolveSkillSyncPaths(_0x1d4a9f);for(const _0x4e4050 of _0x2c903f['values']()){const _0x2257b0=requireSkillCode(_0x4e4050[_0x4f75a3(0x118)]),_0x6eb880=_0x46ff38+'--'+_0x2257b0;for(const _0x2e0d2a of[_0xb31ecb['agentsSkillsDir'],_0xb31ecb['claudeSkillsDir']]){_0x11a14e[_0x4f75a3(0x1ca)](ensureManagedSymlink(resolve(_0x2e0d2a,_0x6eb880),_0x4e4050[_0x4f75a3(0x15c)],_0xb31ecb['managedRoot']));}}return _0x11a14e;}export function pruneStaleRuntimeSkillLinks(_0x2d2ba3,_0x149166,_0x399adc={},_0x377878){const _0x30e330=a76_0x19070f,_0x22d6b9=resolveSkillSyncPaths(_0x399adc),_0x562429=new Set([..._0x149166][_0x30e330(0x1c7)](_0x490652=>_0x490652[_0x30e330(0x12d)]())['filter'](Boolean)),_0x46a21b=_0x377878?new Set([..._0x377878][_0x30e330(0x1c7)](_0x379513=>_0x379513[_0x30e330(0x12d)]())[_0x30e330(0x1a6)](Boolean)):undefined,_0x2d6391=[];for(const _0x1d08bc of[_0x22d6b9['agentsSkillsDir'],_0x22d6b9[_0x30e330(0x190)]]){for(const _0xac7079 of managedAppSkillLinkPaths(_0x1d08bc,_0x2d2ba3)){const _0x4b58af=basename(_0xac7079)[_0x30e330(0x13e)]((_0x2d2ba3+'--')[_0x30e330(0x1dc)]);if(_0x46a21b&&!_0x46a21b[_0x30e330(0x117)](_0x4b58af))continue;if(_0x562429[_0x30e330(0x117)](_0x4b58af))continue;_0x2d6391[_0x30e330(0x1ca)](removeManagedSkillLink(_0xac7079,_0x22d6b9[_0x30e330(0x12f)]));}}return _0x2d6391;}export function pruneStaleRuntimeSkillCache(_0x2eb9e7,_0x49c059={}){const _0x115072=a76_0x19070f,_0x404ba8=new Set([..._0x2eb9e7[_0x115072(0x151)]][_0x115072(0x1c7)](_0x185afb=>_0x185afb[_0x115072(0x12d)]())['filter'](Boolean)),_0xf2eb1f=_0x2eb9e7['pruneSkillCodes']?new Set([..._0x2eb9e7['pruneSkillCodes']]['map'](_0x12a86e=>_0x12a86e['trim']())['filter'](Boolean)):undefined,_0x4f06de=_0x2eb9e7['scopes']??[_0x115072(0x1bf),'company'],_0x8b075e=resolve(getRuntimeSkillCacheRoot(_0x2eb9e7[_0x115072(0x1d4)],_0x2eb9e7['accessKey'],_0x49c059),safePathSegment(_0x2eb9e7[_0x115072(0x1ce)],_0x115072(0x1ce))),_0x1677b9=[];for(const _0x323f4e of _0x4f06de){const _0x3a0765=resolve(_0x8b075e,_0x323f4e);if(!existsSync(_0x3a0765))continue;for(const _0xcd0eef of readdirSync(_0x3a0765,{'withFileTypes':!![]})){if(!_0xcd0eef[_0x115072(0x156)]())continue;const _0x6b8a29=_0xcd0eef[_0x115072(0x1b3)];if(_0xf2eb1f&&!_0xf2eb1f['has'](_0x6b8a29))continue;if(_0x404ba8[_0x115072(0x117)](_0x6b8a29))continue;const _0x5a10aa=resolve(_0x3a0765,_0x6b8a29),_0x5df4eb=readMetadataIfPresent(resolve(_0x5a10aa,METADATA_FILE));if(_0x5df4eb?.[_0x115072(0x1ce)]!==_0x2eb9e7[_0x115072(0x1ce)]||_0x5df4eb[_0x115072(0x19c)]!==_0x323f4e||_0x5df4eb[_0x115072(0x143)]!==_0x6b8a29){_0x1677b9[_0x115072(0x1ca)]({'path':_0x5a10aa,'action':'skipped','reason':_0x115072(0x1d0)});continue;}rmSync(_0x5a10aa,{'recursive':!![],'force':!![]}),_0x1677b9['push']({'path':_0x5a10aa,'action':_0x115072(0x119)});}}return _0x1677b9;}export function linkGlobalRuntimeSkills(_0x4fb3cc,_0x593660={}){const _0x54e3f1=a76_0x19070f,_0xc2ef70=resolveSkillSyncPaths(_0x593660),_0x5bac36=[];for(const _0x4eb19f of _0x4fb3cc){if(_0x4eb19f[_0x54e3f1(0x19c)]!==_0x54e3f1(0x142))throw CliErrors[_0x54e3f1(0x194)](_0x54e3f1(0x15a)+_0x4eb19f['scope']);const _0x227f41=requireSkillCode(_0x4eb19f['skill']),_0x4b413d=copyManagedSkillDirectory(_0x4eb19f[_0x54e3f1(0x15c)],resolve(_0xc2ef70['agentsSkillsDir'],_0x227f41));_0x5bac36[_0x54e3f1(0x1ca)]({..._0x4b413d,'contentHash':_0x4eb19f['contentHash']});}return _0x5bac36;}export function readPushDirectory(_0x26034d,_0x762135){const _0x3c36ea=a76_0x19070f,_0x3bb42c=resolvePushDirectoryRoot(_0x26034d),_0x65a7b3=resolve(_0x3bb42c,SKILL_FILE);if(!existsSync(_0x65a7b3)||!lstatSync(_0x65a7b3)['isFile']())throw CliErrors[_0x3c36ea(0x194)](_0x3c36ea(0x133)+SKILL_FILE+':\x20'+_0x65a7b3);const _0x122593=readMetadataIfPresent(resolve(_0x3bb42c,METADATA_FILE));if(_0x122593?.[_0x3c36ea(0x19c)]&&_0x122593[_0x3c36ea(0x19c)]!=='personal')throw CliErrors[_0x3c36ea(0x194)](_0x3c36ea(0x19e)+METADATA_FILE+_0x3c36ea(0x148)+_0x122593[_0x3c36ea(0x19c)]+'\x22.');if(_0x122593?.[_0x3c36ea(0x1ce)]&&_0x122593[_0x3c36ea(0x1ce)]!==_0x762135)throw CliErrors['validation'](_0x3c36ea(0x1d1)+_0x122593[_0x3c36ea(0x1ce)]+_0x3c36ea(0x175)+_0x762135+'\x22.');const _0x15f99e=scanSkillDirectory(_0x3bb42c),_0x149669=buildSkillPackage(_0x15f99e),_0x428b33=readFileSync(_0x65a7b3,_0x3c36ea(0x16e)),_0x3e8ded=_0x122593?.[_0x3c36ea(0x143)]??deriveSkillCodeFromDirectory(_0x3bb42c,_0x762135);if(!_0x3e8ded)throw CliErrors[_0x3c36ea(0x194)](_0x3c36ea(0x176)+METADATA_FILE+_0x3c36ea(0x1d5));return{'skillCode':_0x3e8ded,'metadata':_0x122593,'input':{'skillCode':_0x3e8ded,'skillName':_0x122593?.[_0x3c36ea(0x14b)],'description':_0x122593?.['description'],'content':_0x428b33,'files':_0x149669[_0x3c36ea(0x1a4)],'packageBase64':_0x149669[_0x3c36ea(0x172)],'tags':_0x122593?.[_0x3c36ea(0x187)],'version':_0x122593?.['version'],'sourceSessionId':_0x122593?.[_0x3c36ea(0x1bb)]}};}function resolvePushDirectoryRoot(_0x208a46){const _0x2f82f8=a76_0x19070f,_0xf57041=resolve(_0x208a46);if(!existsSync(_0xf57041))throw CliErrors[_0x2f82f8(0x194)](_0x2f82f8(0x126)+_0x208a46);const _0x11b102=lstatSync(_0xf57041);if(_0x11b102[_0x2f82f8(0x156)]())return _0xf57041;if(_0x11b102[_0x2f82f8(0x138)]()){const _0x3acab0=realpathSync(_0xf57041);if(lstatSync(_0x3acab0)[_0x2f82f8(0x156)]())return _0x3acab0;}throw CliErrors[_0x2f82f8(0x194)](_0x2f82f8(0x126)+_0x208a46);}export function recordPushedRuntimeSkill(_0x24866c,_0x4d29af,_0x1f7760,_0x50b187={}){const _0x55299f=a76_0x19070f,_0x1356a3=resolvePushDirectoryRoot(_0x24866c),_0x590872=scanSkillDirectory(_0x1356a3),_0xf7fcaf=_0x590872[_0x55299f(0x120)](_0x2d370d=>_0x2d370d['path']===SKILL_FILE),_0x449634=_0xf7fcaf?fileText(_0xf7fcaf):'',_0x139d9c=tryNormalizePackageManifest(_0x4d29af[_0x55299f(0x16c)]),_0x3f4bc8={..._0x4d29af,'content':_0x4d29af['content']??_0x449634,'files':_0x139d9c},_0x597055=_0x139d9c?normalizeLocalFiles(_0x590872)[_0x55299f(0x1a6)](_0x296519=>_0x139d9c['files'][_0x55299f(0x1b2)](_0x344152=>_0x344152[_0x55299f(0x1e2)]===_0x296519['path'])):undefined,_0x38c7ae=buildMetadata(_0x3f4bc8,_0x50b187['scope']??_0x55299f(0x1bf),_0x1f7760,contentHash(_0x3f4bc8[_0x55299f(0x1ad)]??''),_0x50b187[_0x55299f(0x13c)],_0x597055);writeJsonAtomic(resolve(_0x1356a3,METADATA_FILE),_0x38c7ae);}export function deriveSkillCodeFromDirectory(_0x459ee8,_0xec2654){const _0x1d7b01=a76_0x19070f,_0x499f6e=basename(resolve(_0x459ee8)),_0x12a8a4=_0xec2654+'--';return _0x499f6e[_0x1d7b01(0x1e0)](_0x12a8a4)?_0x499f6e[_0x1d7b01(0x13e)](_0x12a8a4[_0x1d7b01(0x1dc)]):_0x499f6e;}export function readMetadataIfPresent(_0x48ae14){const _0x1b207c=a76_0x19070f;if(!existsSync(_0x48ae14))return undefined;try{const _0x50f3c4=JSON[_0x1b207c(0x16a)](readFileSync(_0x48ae14,_0x1b207c(0x16e)));return _0x50f3c4;}catch{throw CliErrors[_0x1b207c(0x194)](_0x1b207c(0x189)+METADATA_FILE+':\x20'+_0x48ae14);}}function normalizeRuntimeSkillScopes(_0x18545f){const _0x18b7db=a76_0x19070f,_0x528484=_0x18545f&&_0x18545f[_0x18b7db(0x1dc)]>0x0?_0x18545f:['personal',_0x18b7db(0x1c9),_0x18b7db(0x142)],_0x979b0c=[];for(const _0x14d992 of _0x528484){if(!isRuntimeSkillScope(_0x14d992))throw CliErrors[_0x18b7db(0x194)](_0x18b7db(0x128)+_0x14d992);!_0x979b0c['includes'](_0x14d992)&&_0x979b0c[_0x18b7db(0x1ca)](_0x14d992);}return _0x979b0c;}function isRuntimeSkillScope(_0x3c29f9){const _0x33e32c=a76_0x19070f;return _0x3c29f9===_0x33e32c(0x1bf)||_0x3c29f9===_0x33e32c(0x1c9)||_0x3c29f9===_0x33e32c(0x142);}function localSkillEntryDirs(_0x59aef5){const _0x50dafe=a76_0x19070f;if(!existsSync(_0x59aef5))return[];return readdirSync(_0x59aef5,{'withFileTypes':!![]})[_0x50dafe(0x1a6)](_0x52c18d=>_0x52c18d[_0x50dafe(0x156)]()||_0x52c18d[_0x50dafe(0x138)]())[_0x50dafe(0x1c7)](_0x24a3ec=>resolve(_0x59aef5,_0x24a3ec['name']));}function localSkillLinkCandidates(_0x320192,_0x3f93f2,_0x231301){const _0x1fa9be=a76_0x19070f;if(!existsSync(_0x320192))return[];const _0x51b868=_0x3f93f2+'--';return readdirSync(_0x320192,{'withFileTypes':!![]})[_0x1fa9be(0x1a6)](_0x24a517=>_0x24a517[_0x1fa9be(0x156)]()||_0x24a517[_0x1fa9be(0x138)]())[_0x1fa9be(0x1a6)](_0x452828=>_0x452828[_0x1fa9be(0x1b3)][_0x1fa9be(0x1e0)](_0x51b868)||_0x231301[_0x1fa9be(0x117)]('builtin'))[_0x1fa9be(0x1c7)](_0x531a99=>resolve(_0x320192,_0x531a99[_0x1fa9be(0x1b3)]));}function collectLocalRuntimeSkill(_0x180373,_0xc376c0,_0x213d22){const _0x193d89=a76_0x19070f,_0x43ff10=resolve(_0xc376c0,METADATA_FILE),_0x17ec58=readMetadataIfPresent(_0x43ff10);if(!_0x17ec58)return;if(_0x17ec58['appCode']!==_0x213d22[_0x193d89(0x1ce)])return;if(!isRuntimeSkillScope(_0x17ec58[_0x193d89(0x19c)])||!_0x213d22[_0x193d89(0x171)][_0x193d89(0x117)](_0x17ec58[_0x193d89(0x19c)]))return;const _0x5dc380=_0x17ec58[_0x193d89(0x143)]?.[_0x193d89(0x12d)]();if(!_0x5dc380)return;if(_0x213d22[_0x193d89(0x157)]&&_0x5dc380!==_0x213d22[_0x193d89(0x157)])return;const _0x1b7a8f=_0x17ec58[_0x193d89(0x19c)]+':'+_0x5dc380,_0x2ca886=_0x213d22[_0x193d89(0x1aa)]?[_0x213d22[_0x193d89(0x1aa)]]:[],_0x47791b=_0x180373[_0x193d89(0x17c)](_0x1b7a8f);if(_0x47791b){_0x213d22[_0x193d89(0x1a8)]===_0x193d89(0x13d)&&(_0x47791b[_0x193d89(0x15c)]=_0xc376c0,_0x47791b['cacheDir']=_0xc376c0,_0x47791b[_0x193d89(0x1df)]=resolve(_0xc376c0,SKILL_FILE),_0x47791b[_0x193d89(0x168)]=_0x43ff10);for(const _0x53c3fb of _0x2ca886){!_0x47791b[_0x193d89(0x1d2)]['includes'](_0x53c3fb)&&_0x47791b[_0x193d89(0x1d2)][_0x193d89(0x1ca)](_0x53c3fb);}_0x47791b['linkedPaths'][_0x193d89(0x134)]();return;}_0x180373[_0x193d89(0x167)](_0x1b7a8f,{..._0x17ec58,'tags':Array[_0x193d89(0x155)](_0x17ec58[_0x193d89(0x187)])?_0x17ec58[_0x193d89(0x187)]:[],'scope':_0x17ec58[_0x193d89(0x19c)],'source':_0x193d89(0x1c2),'dir':_0xc376c0,'cacheDir':_0x213d22[_0x193d89(0x1a8)]==='cache'?_0xc376c0:undefined,'skillMdPath':resolve(_0xc376c0,SKILL_FILE),'metadataPath':_0x43ff10,'linkedPaths':_0x2ca886});}function compareLocalRuntimeSkills(_0x472801,_0x43d979){const _0x342146=a76_0x19070f,_0x17e282={'personal':0x0,'company':0x1,'builtin':0x2};return _0x17e282[_0x472801[_0x342146(0x19c)]]-_0x17e282[_0x43d979['scope']]||_0x472801['skillCode']['localeCompare'](_0x43d979['skillCode'])||_0x472801[_0x342146(0x15c)]['localeCompare'](_0x43d979[_0x342146(0x15c)]);}function buildMetadata(_0x22abff,_0x2aae3c,_0x18ad33,_0x2cac92,_0x30cc11,_0x308052){const _0x1085ca=a76_0x19070f,_0x20d058=_0x308052?normalizeLocalFiles(_0x308052):[],_0x242127=normalizePackageManifest(_0x22abff[_0x1085ca(0x16c)],{'requireOssPath':![]}),_0x4aae32=_0x20d058[_0x1085ca(0x1dc)]>0x0?Object[_0x1085ca(0x1ae)](_0x20d058[_0x1085ca(0x1c7)](_0x27ee36=>[_0x27ee36['path'],fileHash(_0x27ee36)])):undefined;return{'schemaVersion':_0x20d058[_0x1085ca(0x1dc)]>0x0?0x2:0x1,'id':_0x22abff['id'],'appCode':_0x18ad33,'skillCode':requireSkillCode(_0x22abff),'skillName':_0x22abff['skillName'],'description':_0x22abff[_0x1085ca(0x1c3)],'scope':_0x2aae3c,'readonly':_0x2aae3c!==_0x1085ca(0x1bf)||_0x22abff['readonly']===!![],'tenantCode':_0x22abff[_0x1085ca(0x174)],'userId':_0x22abff[_0x1085ca(0x145)],'version':_0x22abff[_0x1085ca(0x11a)],'status':_0x22abff[_0x1085ca(0x1de)],'tags':Array[_0x1085ca(0x155)](_0x22abff[_0x1085ca(0x187)])?_0x22abff[_0x1085ca(0x187)]:[],'hasUpstreamUpdate':_0x22abff['hasUpstreamUpdate'],'forkedFromSkillId':_0x22abff[_0x1085ca(0x17d)],'forkedFromVersion':_0x22abff['forkedFromVersion'],'sourceSessionId':_0x22abff['sourceSessionId'],'contentHash':_0x2cac92,'fileHashes':_0x4aae32,'treeHash':_0x20d058[_0x1085ca(0x1dc)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x20d058)):_0x242127?.[_0x1085ca(0x11b)],'ossPath':_0x242127?.[_0x1085ca(0x11d)],'zipSha256':_0x242127?.[_0x1085ca(0x116)],'zipSize':_0x242127?.[_0x1085ca(0x165)],'files':_0x20d058[_0x1085ca(0x1dc)]>0x0?_0x20d058['map'](_0x16e147=>({'path':_0x16e147[_0x1085ca(0x1e2)],'hash':fileHash(_0x16e147),'size':fileContent(_0x16e147)['length']})):undefined,'pulledAt':_0x30cc11??new Date()['toISOString']()};}function requireSkillCode(_0x5db22a){const _0x16b9ac=a76_0x19070f,_0x16210b=_0x5db22a[_0x16b9ac(0x143)]?.[_0x16b9ac(0x12d)]();if(!_0x16210b)throw CliErrors[_0x16b9ac(0x194)](_0x16b9ac(0x1bc));return _0x16210b;}function trimmedEnv(_0x504917){const _0x550344=a76_0x19070f,_0x21b76a=productEnv(_0x504917)?.[_0x550344(0x12d)]();return _0x21b76a?_0x21b76a:undefined;}function safePathSegment(_0x5036c0,_0x225c85=a76_0x19070f(0x1cf)){const _0x239318=a76_0x19070f;if(!_0x5036c0||_0x5036c0[_0x239318(0x19a)]('/')||_0x5036c0['includes']('\x5c')||_0x5036c0[_0x239318(0x19a)]('..'))throw CliErrors[_0x239318(0x194)](_0x239318(0x197)+_0x225c85+'\x20for\x20local\x20path:\x20'+_0x5036c0);return _0x5036c0;}function ensurePulledFilesCanBeOverwritten(_0x52744f,_0x4add2f,_0x56fbfd,_0x4cb77b){const _0x545ae0=a76_0x19070f;if(_0x4cb77b||!existsSync(_0x4add2f))return;const _0x3c9d7b=readMetadataIfPresent(_0x4add2f);if(!_0x3c9d7b)return;const _0x1fe802=_0x3c9d7b['fileHashes']&&Object[_0x545ae0(0x150)](_0x3c9d7b[_0x545ae0(0x159)])['length']>0x0?_0x3c9d7b[_0x545ae0(0x159)]:undefined;if(_0x1fe802)for(const [_0x1beb5e,_0x5326d7]of Object[_0x545ae0(0x12e)](_0x1fe802)){const _0x25570f=resolveManagedFilePath(_0x52744f,_0x1beb5e);if(!existsSync(_0x25570f))throw CliErrors[_0x545ae0(0x194)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x52744f,_0x545ae0(0x140)+_0x1beb5e);const _0x24a2f2=lstatSync(_0x25570f);if(!_0x24a2f2['isFile']())throw CliErrors['validation'](_0x545ae0(0x149)+_0x52744f,_0x545ae0(0x1a7)+_0x1beb5e);const _0x45ff0d=bufferSha256(readFileSync(_0x25570f));if(_0x45ff0d!==_0x5326d7)throw CliErrors[_0x545ae0(0x194)](_0x545ae0(0x149)+_0x52744f+_0x545ae0(0x1ba)+_0x1beb5e,_0x545ae0(0x1c1)+_0x1beb5e);}else{const _0x54afee=resolve(_0x52744f,SKILL_FILE);if(existsSync(_0x54afee)&&_0x3c9d7b[_0x545ae0(0x15b)]){const _0x3c70ed=contentHash(readFileSync(_0x54afee,_0x545ae0(0x16e)));if(_0x3c70ed!==_0x3c9d7b['contentHash'])throw CliErrors['validation'](_0x545ae0(0x1cc)+_0x54afee,_0x545ae0(0x1ab));}}for(const _0x3bdeee of normalizeLocalFiles(_0x56fbfd)){if(_0x1fe802?.[_0x3bdeee[_0x545ae0(0x1e2)]])continue;if(!_0x1fe802&&_0x3bdeee[_0x545ae0(0x1e2)]===SKILL_FILE)continue;const _0x1da354=resolveManagedFilePath(_0x52744f,_0x3bdeee[_0x545ae0(0x1e2)]);if(!existsSync(_0x1da354))continue;const _0x48372d=lstatSync(_0x1da354);if(!_0x48372d[_0x545ae0(0x18b)]())throw CliErrors[_0x545ae0(0x194)](_0x545ae0(0x149)+_0x52744f,_0x545ae0(0x15e)+_0x3bdeee[_0x545ae0(0x1e2)]);const _0x499364=bufferSha256(readFileSync(_0x1da354));if(_0x499364!==fileHash(_0x3bdeee))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x52744f,_0x545ae0(0x17b)+_0x3bdeee[_0x545ae0(0x1e2)]);}}function scanSkillDirectory(_0x5555c2){const _0xb59cb8=realOrResolved(_0x5555c2),_0x1e6eb1=[];let _0x238fa1=0x0;function _0x5f0c7c(_0x5b213c){const _0x2d6fbe=a76_0x30dc,_0x242120=readdirSync(_0x5b213c,{'withFileTypes':!![]})[_0x2d6fbe(0x134)]((_0x3451bf,_0x1fa94e)=>_0x3451bf[_0x2d6fbe(0x1b3)]['localeCompare'](_0x1fa94e['name']));for(const _0x2ebf38 of _0x242120){if(_0x2ebf38[_0x2d6fbe(0x156)]()&&IGNORED_DIR_NAMES[_0x2d6fbe(0x117)](_0x2ebf38[_0x2d6fbe(0x1b3)]))continue;if(IGNORED_FILE_NAMES['has'](_0x2ebf38[_0x2d6fbe(0x1b3)]))continue;const _0x523d1b=resolve(_0x5b213c,_0x2ebf38[_0x2d6fbe(0x1b3)]);if(_0x2ebf38['isSymbolicLink']())throw CliErrors['validation'](_0x2d6fbe(0x124)+_0x523d1b);const _0x22fc94=toPosixPath(relative(_0xb59cb8,_0x523d1b));if(_0x2ebf38[_0x2d6fbe(0x156)]()){_0x5f0c7c(_0x523d1b);continue;}if(!_0x2ebf38['isFile']())continue;validateSkillRelativePath(_0x22fc94);const _0x3f861f=readFileSync(_0x523d1b);if(_0x3f861f[_0x2d6fbe(0x1dc)]>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x2d6fbe(0x194)](_0x2d6fbe(0x1dd)+_0x22fc94);_0x238fa1+=_0x3f861f[_0x2d6fbe(0x1dc)];if(_0x238fa1>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x2d6fbe(0x194)](_0x2d6fbe(0x127));_0x1e6eb1[_0x2d6fbe(0x1ca)]({'path':_0x22fc94,'bytes':_0x3f861f});if(_0x1e6eb1['length']>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x2d6fbe(0x194)](_0x2d6fbe(0x161));}}return _0x5f0c7c(_0xb59cb8),normalizeLocalFiles(_0x1e6eb1);}function normalizeLocalFiles(_0xe39cae){const _0x28e700=a76_0x19070f;if(!Array[_0x28e700(0x155)](_0xe39cae)||_0xe39cae[_0x28e700(0x1dc)]===0x0)return[];if(_0xe39cae[_0x28e700(0x1dc)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x28e700(0x194)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x11fcb1=new Map();let _0x2e7976=0x0;for(const _0x4d447a of _0xe39cae){if(!_0x4d447a||typeof _0x4d447a!==_0x28e700(0x1cd)||typeof _0x4d447a[_0x28e700(0x1e2)]!=='string')throw CliErrors[_0x28e700(0x194)](_0x28e700(0x123));const _0x3d520a=normalizeSkillRelativePath(_0x4d447a[_0x28e700(0x1e2)]);if(_0x11fcb1[_0x28e700(0x117)](_0x3d520a))throw CliErrors[_0x28e700(0x194)](_0x28e700(0x1b5)+_0x3d520a);if(_0x4d447a[_0x28e700(0x1d6)]!==undefined&&!Buffer['isBuffer'](_0x4d447a['bytes']))throw CliErrors[_0x28e700(0x194)](_0x28e700(0x1a0)+_0x3d520a);if(_0x4d447a['bytes']===undefined&&typeof _0x4d447a['content']!==_0x28e700(0x191))throw CliErrors[_0x28e700(0x194)](_0x28e700(0x1af)+_0x3d520a);const _0x3a11c6=fileContent(_0x4d447a),_0x47df48=_0x3a11c6['length'];if(_0x47df48>MAX_SKILL_FILE_BYTES)throw CliErrors['validation'](_0x28e700(0x1dd)+_0x3d520a);_0x2e7976+=_0x47df48;if(_0x2e7976>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x28e700(0x127));_0x11fcb1[_0x28e700(0x167)](_0x3d520a,{'path':_0x3d520a,'bytes':_0x3a11c6});}return Array[_0x28e700(0x180)](_0x11fcb1[_0x28e700(0x16d)]())[_0x28e700(0x134)](compareSkillFiles);}function normalizeManifestFiles(_0x4d6882){const _0x31070e=a76_0x19070f;if(!Array[_0x31070e(0x155)](_0x4d6882)||_0x4d6882['length']===0x0)return[];if(_0x4d6882[_0x31070e(0x1dc)]>MAX_SKILL_FILE_COUNT)throw CliErrors[_0x31070e(0x194)]('Skill\x20directory\x20exceeds\x20file\x20count\x20limit.');const _0x38723e=new Map();let _0x2eaf7c=0x0;for(const _0x3062e6 of _0x4d6882){if(!_0x3062e6||typeof _0x3062e6!=='object'||typeof _0x3062e6['path']!==_0x31070e(0x191))throw CliErrors[_0x31070e(0x194)](_0x31070e(0x123));const _0x1176a8=normalizeSkillRelativePath(_0x3062e6[_0x31070e(0x1e2)]);if(_0x38723e[_0x31070e(0x117)](_0x1176a8))throw CliErrors[_0x31070e(0x194)](_0x31070e(0x1b5)+_0x1176a8);if(!isSha256Hex(_0x3062e6['sha256']))throw CliErrors[_0x31070e(0x194)](_0x31070e(0x177)+_0x1176a8);if(!Number[_0x31070e(0x129)](_0x3062e6[_0x31070e(0x136)])||_0x3062e6[_0x31070e(0x136)]<0x0)throw CliErrors[_0x31070e(0x194)](_0x31070e(0x13f)+_0x1176a8);if(_0x3062e6['size']>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x31070e(0x194)](_0x31070e(0x1dd)+_0x1176a8);_0x2eaf7c+=_0x3062e6[_0x31070e(0x136)];if(_0x2eaf7c>MAX_SKILL_TOTAL_BYTES)throw CliErrors['validation'](_0x31070e(0x127));_0x38723e[_0x31070e(0x167)](_0x1176a8,{'path':_0x1176a8,'sha256':_0x3062e6[_0x31070e(0x11e)][_0x31070e(0x158)](),'size':_0x3062e6[_0x31070e(0x136)]});}return Array[_0x31070e(0x180)](_0x38723e[_0x31070e(0x16d)]())[_0x31070e(0x134)](compareSkillFiles);}function normalizeRemoteManifest(_0x4052dd){return normalizePackageManifest(_0x4052dd,{'requireOssPath':!![]});}function normalizePackageManifest(_0x411fc8,_0x333224){const _0x479bd0=a76_0x19070f;if(!_0x411fc8||typeof _0x411fc8!==_0x479bd0(0x1cd)||Array[_0x479bd0(0x155)](_0x411fc8))return undefined;const _0x244344=_0x411fc8,_0x464274=typeof _0x244344[_0x479bd0(0x11d)]===_0x479bd0(0x191)?_0x244344[_0x479bd0(0x11d)]['trim']():undefined;if(_0x333224[_0x479bd0(0x1ac)]&&!_0x464274)return undefined;if(!Array[_0x479bd0(0x155)](_0x244344[_0x479bd0(0x16c)])||_0x244344['files']['length']===0x0)return undefined;if(!isSha256Hex(_0x244344['treeSha256']))throw CliErrors[_0x479bd0(0x194)](_0x479bd0(0x12b));if(!isSha256Hex(_0x244344[_0x479bd0(0x116)]))throw CliErrors[_0x479bd0(0x194)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x479bd0(0x129)](_0x244344['zipSize'])||_0x244344['zipSize']<0x0)throw CliErrors[_0x479bd0(0x194)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');if(_0x244344[_0x479bd0(0x165)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit.');const _0x52f30a=normalizeManifestFiles(_0x244344[_0x479bd0(0x16c)]);if(!_0x52f30a[_0x479bd0(0x1b2)](_0x22a38b=>_0x22a38b[_0x479bd0(0x1e2)]===SKILL_FILE))throw CliErrors[_0x479bd0(0x194)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x28ff79=fileTreeHash(_0x52f30a);if(_0x28ff79!==_0x244344['treeSha256'][_0x479bd0(0x158)]())throw CliErrors[_0x479bd0(0x194)](_0x479bd0(0x12a));return{'schemaVersion':Number[_0x479bd0(0x129)](_0x244344[_0x479bd0(0x19b)])?_0x244344['schemaVersion']:0x2,'ossPath':_0x464274,'treeSha256':_0x28ff79,'zipSha256':_0x244344[_0x479bd0(0x116)][_0x479bd0(0x158)](),'zipSize':_0x244344[_0x479bd0(0x165)],'files':_0x52f30a};}function tryNormalizeRemoteManifest(_0x2df75b){return normalizeRemoteManifest(_0x2df75b);}function tryNormalizePackageManifest(_0x5d2071){return normalizePackageManifest(_0x5d2071,{'requireOssPath':![]});}function requirePackageBytes(_0x2cc506,_0x2dee63){const _0x31af26=a76_0x19070f;if(!_0x2dee63||_0x2dee63[_0x31af26(0x1dc)]===0x0)throw CliErrors[_0x31af26(0x194)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20package-backed\x20Skill:\x20'+_0x2cc506);if(_0x2dee63[_0x31af26(0x1dc)]>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x31af26(0x194)](_0x31af26(0x1b6)+_0x2cc506);return _0x2dee63;}function localFilesToManifestFiles(_0x54a695){const _0xae7634=a76_0x19070f;return normalizeLocalFiles(_0x54a695)[_0xae7634(0x1c7)](_0x215b02=>({'path':_0x215b02['path'],'sha256':fileHash(_0x215b02),'size':fileContent(_0x215b02)[_0xae7634(0x1dc)]}));}function isSha256Hex(_0x4ce6c7){const _0x43ac81=a76_0x19070f;return typeof _0x4ce6c7===_0x43ac81(0x191)&&/^[a-fA-F0-9]{64}$/[_0x43ac81(0x1d3)](_0x4ce6c7);}function extractAndVerifyPackage(_0x56d161,_0x3939c5){const _0x396006=a76_0x19070f,_0x18788b=normalizePackageManifest(_0x56d161,{'requireOssPath':![]});if(!_0x18788b)throw CliErrors[_0x396006(0x194)](_0x396006(0x115));if(_0x3939c5[_0x396006(0x1dc)]!==_0x18788b[_0x396006(0x165)])throw CliErrors[_0x396006(0x194)](_0x396006(0x163));const _0x94a5f0=bufferSha256(_0x3939c5);if(_0x94a5f0!==_0x18788b['zipSha256'])throw CliErrors[_0x396006(0x194)](_0x396006(0x18d));return extractAndVerifyPackageFiles(_0x18788b,_0x3939c5);}function extractAndVerifyPackageFiles(_0x5d7063,_0x1e5c34){const _0x3fcc67=a76_0x19070f,_0x4791d3=parseZipPackage(_0x1e5c34);if(_0x4791d3[_0x3fcc67(0x1dc)]!==_0x5d7063[_0x3fcc67(0x16c)][_0x3fcc67(0x1dc)])throw CliErrors[_0x3fcc67(0x194)](_0x3fcc67(0x17e));const _0x19b549=new Map();for(const _0x2805d3 of _0x4791d3){if(_0x19b549[_0x3fcc67(0x117)](_0x2805d3['path']))throw CliErrors['validation'](_0x3fcc67(0x193)+_0x2805d3[_0x3fcc67(0x1e2)]);_0x19b549[_0x3fcc67(0x167)](_0x2805d3[_0x3fcc67(0x1e2)],_0x2805d3);}const _0x2cd17a=[];for(const _0x25ae79 of _0x5d7063[_0x3fcc67(0x16c)]){const _0x2a5d6b=_0x19b549[_0x3fcc67(0x17c)](_0x25ae79['path']);if(!_0x2a5d6b)throw CliErrors[_0x3fcc67(0x194)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x25ae79[_0x3fcc67(0x1e2)]);if(_0x2a5d6b[_0x3fcc67(0x1d6)][_0x3fcc67(0x1dc)]!==_0x25ae79[_0x3fcc67(0x136)])throw CliErrors[_0x3fcc67(0x194)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x25ae79['path']);const _0x495199=bufferSha256(_0x2a5d6b[_0x3fcc67(0x1d6)]);if(_0x495199!==_0x25ae79[_0x3fcc67(0x11e)])throw CliErrors[_0x3fcc67(0x194)](_0x3fcc67(0x17a)+_0x25ae79[_0x3fcc67(0x1e2)]);_0x2cd17a[_0x3fcc67(0x1ca)]({'path':_0x25ae79[_0x3fcc67(0x1e2)],'bytes':_0x2a5d6b[_0x3fcc67(0x1d6)]});}return normalizeLocalFiles(_0x2cd17a);}function createDeterministicZipPackage(_0x45877e){const _0x4ca98e=a76_0x19070f,_0xa03dc7=normalizeLocalFiles(_0x45877e),_0x563e01=[],_0x531ef1=[];let _0x37f22c=0x0;for(const _0x23c977 of _0xa03dc7){const _0x4859ba=Buffer['from'](_0x23c977['path'],'utf8'),_0x17fa96=fileContent(_0x23c977),_0x4f989f=crc32(_0x17fa96),_0x236cf8=Buffer[_0x4ca98e(0x1b7)](0x1e+_0x4859ba['length']);_0x236cf8['writeUInt32LE'](ZIP_LOCAL_FILE_HEADER_SIGNATURE,0x0),_0x236cf8[_0x4ca98e(0x184)](0x14,0x4),_0x236cf8[_0x4ca98e(0x184)](ZIP_GENERAL_PURPOSE_UTF8,0x6),_0x236cf8[_0x4ca98e(0x184)](ZIP_METHOD_STORE,0x8),_0x236cf8['writeUInt16LE'](ZIP_FIXED_DOS_TIME,0xa),_0x236cf8[_0x4ca98e(0x184)](ZIP_FIXED_DOS_DATE,0xc),_0x236cf8[_0x4ca98e(0x1bd)](_0x4f989f,0xe),_0x236cf8['writeUInt32LE'](_0x17fa96[_0x4ca98e(0x1dc)],0x12),_0x236cf8[_0x4ca98e(0x1bd)](_0x17fa96[_0x4ca98e(0x1dc)],0x16),_0x236cf8['writeUInt16LE'](_0x4859ba[_0x4ca98e(0x1dc)],0x1a),_0x236cf8[_0x4ca98e(0x184)](0x0,0x1c),_0x4859ba['copy'](_0x236cf8,0x1e),_0x563e01[_0x4ca98e(0x1ca)](_0x236cf8,_0x17fa96);const _0x43f6f9=Buffer[_0x4ca98e(0x1b7)](0x2e+_0x4859ba[_0x4ca98e(0x1dc)]);_0x43f6f9['writeUInt32LE'](ZIP_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x43f6f9[_0x4ca98e(0x184)](0x14,0x4),_0x43f6f9[_0x4ca98e(0x184)](0x14,0x6),_0x43f6f9[_0x4ca98e(0x184)](ZIP_GENERAL_PURPOSE_UTF8,0x8),_0x43f6f9[_0x4ca98e(0x184)](ZIP_METHOD_STORE,0xa),_0x43f6f9['writeUInt16LE'](ZIP_FIXED_DOS_TIME,0xc),_0x43f6f9['writeUInt16LE'](ZIP_FIXED_DOS_DATE,0xe),_0x43f6f9[_0x4ca98e(0x1bd)](_0x4f989f,0x10),_0x43f6f9['writeUInt32LE'](_0x17fa96[_0x4ca98e(0x1dc)],0x14),_0x43f6f9[_0x4ca98e(0x1bd)](_0x17fa96[_0x4ca98e(0x1dc)],0x18),_0x43f6f9[_0x4ca98e(0x184)](_0x4859ba[_0x4ca98e(0x1dc)],0x1c),_0x43f6f9[_0x4ca98e(0x184)](0x0,0x1e),_0x43f6f9[_0x4ca98e(0x184)](0x0,0x20),_0x43f6f9[_0x4ca98e(0x184)](0x0,0x22),_0x43f6f9['writeUInt16LE'](0x0,0x24),_0x43f6f9[_0x4ca98e(0x1bd)](0x0,0x26),_0x43f6f9['writeUInt32LE'](_0x37f22c,0x2a),_0x4859ba['copy'](_0x43f6f9,0x2e),_0x531ef1['push'](_0x43f6f9),_0x37f22c+=_0x236cf8[_0x4ca98e(0x1dc)]+_0x17fa96[_0x4ca98e(0x1dc)];}const _0x3ee513=Buffer[_0x4ca98e(0x152)](_0x531ef1),_0x4adf1e=_0x37f22c,_0x9e15ee=_0x3ee513[_0x4ca98e(0x1dc)],_0x41a38c=Buffer[_0x4ca98e(0x1b7)](0x16);_0x41a38c[_0x4ca98e(0x1bd)](ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE,0x0),_0x41a38c[_0x4ca98e(0x184)](0x0,0x4),_0x41a38c[_0x4ca98e(0x184)](0x0,0x6),_0x41a38c[_0x4ca98e(0x184)](_0xa03dc7[_0x4ca98e(0x1dc)],0x8),_0x41a38c[_0x4ca98e(0x184)](_0xa03dc7[_0x4ca98e(0x1dc)],0xa),_0x41a38c[_0x4ca98e(0x1bd)](_0x9e15ee,0xc),_0x41a38c[_0x4ca98e(0x1bd)](_0x4adf1e,0x10),_0x41a38c[_0x4ca98e(0x184)](0x0,0x14);const _0x5edfb1=Buffer[_0x4ca98e(0x152)]([..._0x563e01,_0x3ee513,_0x41a38c]);if(_0x5edfb1['length']>MAX_SKILL_PACKAGE_BYTES)throw CliErrors[_0x4ca98e(0x194)]('Skill\x20package\x20exceeds\x20size\x20limit.');return _0x5edfb1;}function parseZipPackage(_0x2517bd){const _0x466987=a76_0x19070f;if(_0x2517bd['length']<0x16)throw CliErrors[_0x466987(0x194)](_0x466987(0x14a));const _0x1d9ed4=findEndOfCentralDirectory(_0x2517bd);if(_0x1d9ed4<0x0)throw CliErrors[_0x466987(0x194)](_0x466987(0x162));const _0x4a75a3=_0x2517bd['readUInt16LE'](_0x1d9ed4+0x4),_0x1a3ea5=_0x2517bd[_0x466987(0x1a2)](_0x1d9ed4+0x6),_0x1409a7=_0x2517bd[_0x466987(0x1a2)](_0x1d9ed4+0xa),_0x545926=_0x2517bd['readUInt32LE'](_0x1d9ed4+0xc),_0x4818b6=_0x2517bd[_0x466987(0x122)](_0x1d9ed4+0x10);if(_0x4a75a3!==0x0||_0x1a3ea5!==0x0)throw CliErrors[_0x466987(0x194)](_0x466987(0x1be));if(_0x1409a7>MAX_SKILL_FILE_COUNT)throw CliErrors['validation'](_0x466987(0x154));if(_0x4818b6+_0x545926>_0x1d9ed4||_0x4818b6>=_0x2517bd[_0x466987(0x1dc)])throw CliErrors[_0x466987(0x194)](_0x466987(0x17f));const _0x3c81d3=[];let _0x25fe9e=0x0,_0x1fcd05=_0x4818b6;for(let _0x3fef6c=0x0;_0x3fef6c<_0x1409a7;_0x3fef6c+=0x1){if(_0x1fcd05+0x2e>_0x2517bd[_0x466987(0x1dc)])throw CliErrors[_0x466987(0x194)](_0x466987(0x16b));if(_0x2517bd[_0x466987(0x122)](_0x1fcd05)!==ZIP_CENTRAL_DIRECTORY_SIGNATURE)throw CliErrors[_0x466987(0x194)](_0x466987(0x192));const _0x5e85d3=_0x2517bd[_0x466987(0x1a2)](_0x1fcd05+0x8),_0x3da30f=_0x2517bd[_0x466987(0x1a2)](_0x1fcd05+0xa),_0x154c55=_0x2517bd[_0x466987(0x122)](_0x1fcd05+0x10),_0x47f4d9=_0x2517bd[_0x466987(0x122)](_0x1fcd05+0x14),_0x5e6d58=_0x2517bd[_0x466987(0x122)](_0x1fcd05+0x18),_0x5c50a2=_0x2517bd[_0x466987(0x1a2)](_0x1fcd05+0x1c),_0x3dfa6d=_0x2517bd[_0x466987(0x1a2)](_0x1fcd05+0x1e),_0x3d45f1=_0x2517bd['readUInt16LE'](_0x1fcd05+0x20),_0x19303a=_0x2517bd[_0x466987(0x122)](_0x1fcd05+0x2a),_0x4d4860=_0x1fcd05+0x2e,_0x59e686=_0x4d4860+_0x5c50a2;if(_0x59e686>_0x2517bd['length'])throw CliErrors[_0x466987(0x194)](_0x466987(0x132));if((_0x5e85d3&0x1)!==0x0)throw CliErrors[_0x466987(0x194)](_0x466987(0x19d));if(_0x3da30f!==ZIP_METHOD_STORE&&_0x3da30f!==ZIP_METHOD_DEFLATE)throw CliErrors['validation'](_0x466987(0x164));const _0x547758=normalizeSkillRelativePath(_0x2517bd[_0x466987(0x18f)](_0x4d4860,_0x59e686)['toString'](_0x466987(0x16e)));if(_0x547758[_0x466987(0x188)]('/'))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x547758);if(_0x5e6d58>MAX_SKILL_FILE_BYTES)throw CliErrors[_0x466987(0x194)](_0x466987(0x11c)+_0x547758);_0x25fe9e+=_0x5e6d58;if(_0x25fe9e>MAX_SKILL_TOTAL_BYTES)throw CliErrors[_0x466987(0x194)](_0x466987(0x183));const _0x3252c9=readZipEntryData(_0x2517bd,_0x19303a,_0x547758,_0x47f4d9),_0x19b8a2=_0x3da30f===ZIP_METHOD_STORE?_0x3252c9:inflateRawSync(_0x3252c9);if(_0x19b8a2['length']!==_0x5e6d58)throw CliErrors['validation'](_0x466987(0x12c)+_0x547758);if(crc32(_0x19b8a2)!==_0x154c55)throw CliErrors[_0x466987(0x194)](_0x466987(0x18a)+_0x547758);_0x3c81d3[_0x466987(0x1ca)]({'path':_0x547758,'bytes':_0x19b8a2}),_0x1fcd05=_0x59e686+_0x3dfa6d+_0x3d45f1;}if(_0x1fcd05!==_0x4818b6+_0x545926)throw CliErrors[_0x466987(0x194)](_0x466987(0x170));return _0x3c81d3[_0x466987(0x134)](compareSkillFiles);}function readZipEntryData(_0x21eec5,_0x446c90,_0x417096,_0x4d75a9){const _0x49f299=a76_0x19070f;if(_0x446c90+0x1e>_0x21eec5[_0x49f299(0x1dc)])throw CliErrors[_0x49f299(0x194)]('Runtime\x20Skill\x20package\x20has\x20truncated\x20local\x20header:\x20'+_0x417096);if(_0x21eec5[_0x49f299(0x122)](_0x446c90)!==ZIP_LOCAL_FILE_HEADER_SIGNATURE)throw CliErrors[_0x49f299(0x194)]('Runtime\x20Skill\x20package\x20local\x20header\x20mismatch:\x20'+_0x417096);const _0x5b4536=_0x21eec5[_0x49f299(0x1a2)](_0x446c90+0x1a),_0x5d9489=_0x21eec5['readUInt16LE'](_0x446c90+0x1c),_0x391558=_0x446c90+0x1e,_0x44aab1=_0x391558+_0x5b4536,_0x4e0471=_0x44aab1+_0x5d9489,_0x488655=_0x4e0471+_0x4d75a9;if(_0x44aab1>_0x21eec5['length']||_0x488655>_0x21eec5[_0x49f299(0x1dc)])throw CliErrors['validation'](_0x49f299(0x1d9)+_0x417096);const _0xb6b2d8=normalizeSkillRelativePath(_0x21eec5[_0x49f299(0x18f)](_0x391558,_0x44aab1)[_0x49f299(0x13a)](_0x49f299(0x16e)));if(_0xb6b2d8!==_0x417096)throw CliErrors['validation'](_0x49f299(0x1da)+_0x417096);return _0x21eec5[_0x49f299(0x18f)](_0x4e0471,_0x488655);}function findEndOfCentralDirectory(_0x188d8b){const _0x139f02=a76_0x19070f,_0x40e05d=Math[_0x139f02(0x121)](0x0,_0x188d8b[_0x139f02(0x1dc)]-0x16-0xffff);for(let _0x3dcf0b=_0x188d8b[_0x139f02(0x1dc)]-0x16;_0x3dcf0b>=_0x40e05d;_0x3dcf0b-=0x1){if(_0x188d8b[_0x139f02(0x122)](_0x3dcf0b)===ZIP_END_OF_CENTRAL_DIRECTORY_SIGNATURE){const _0x434173=_0x188d8b[_0x139f02(0x1a2)](_0x3dcf0b+0x14);if(_0x3dcf0b+0x16+_0x434173===_0x188d8b['length'])return _0x3dcf0b;}}return-0x1;}function createCrc32Table(){const _0x59a40f=new Uint32Array(0x100);for(let _0x6c17b2=0x0;_0x6c17b2<0x100;_0x6c17b2+=0x1){let _0x59754b=_0x6c17b2;for(let _0x3f16b2=0x0;_0x3f16b2<0x8;_0x3f16b2+=0x1){_0x59754b=(_0x59754b&0x1)!==0x0?0xedb88320^_0x59754b>>>0x1:_0x59754b>>>0x1;}_0x59a40f[_0x6c17b2]=_0x59754b>>>0x0;}return _0x59a40f;}function crc32(_0x36b20a){let _0x4e7a9b=0xffffffff;for(const _0x16996b of _0x36b20a){_0x4e7a9b=CRC32_TABLE[(_0x4e7a9b^_0x16996b)&0xff]^_0x4e7a9b>>>0x8;}return(_0x4e7a9b^0xffffffff)>>>0x0;}function compareSkillFiles(_0xcaa722,_0x26beaf){const _0x5bd187=a76_0x19070f;if(_0xcaa722[_0x5bd187(0x1e2)]===SKILL_FILE)return _0x26beaf[_0x5bd187(0x1e2)]===SKILL_FILE?0x0:-0x1;if(_0x26beaf[_0x5bd187(0x1e2)]===SKILL_FILE)return 0x1;return Buffer[_0x5bd187(0x1d8)](Buffer[_0x5bd187(0x180)](_0xcaa722[_0x5bd187(0x1e2)],_0x5bd187(0x16e)),Buffer[_0x5bd187(0x180)](_0x26beaf[_0x5bd187(0x1e2)],_0x5bd187(0x16e)));}function materializeFiles(_0x2ff58c,_0xe26d4d){const _0xbe07a=a76_0x19070f;for(const _0x1ed7b6 of normalizeLocalFiles(_0xe26d4d)){const _0x4ca898=resolveManagedFilePath(_0x2ff58c,_0x1ed7b6[_0xbe07a(0x1e2)]);mkdirSync(dirname(_0x4ca898),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x4ca898,fileContent(_0x1ed7b6),0x180);}}function removeStaleManagedFiles(_0x5772f1,_0x29957f,_0x1a7b44){const _0x3f7080=a76_0x19070f;if(!_0x29957f)return;const _0x551028=new Set(normalizeLocalFiles(_0x1a7b44)[_0x3f7080(0x1c7)](_0x47d929=>_0x47d929[_0x3f7080(0x1e2)]));for(const _0x165307 of Object[_0x3f7080(0x150)](_0x29957f)){if(_0x551028['has'](_0x165307))continue;const _0x518c81=resolveManagedFilePath(_0x5772f1,_0x165307);existsSync(_0x518c81)&&lstatSync(_0x518c81)['isFile']()&&rmSync(_0x518c81,{'force':!![]});}}function resolveManagedFilePath(_0x1e02e7,_0x517a10){const _0xd23d91=a76_0x19070f,_0x1b4c83=normalizeSkillRelativePath(_0x517a10),_0x28c75f=realOrResolved(_0x1e02e7),_0x1dd133=resolve(_0x28c75f,..._0x1b4c83[_0xd23d91(0x13b)]('/'));if(!isPathInside(_0x1dd133,_0x28c75f))throw CliErrors[_0xd23d91(0x194)](_0xd23d91(0x1b0)+_0x517a10);return ensureNoSymlinkInManagedPath(_0x28c75f,_0x1b4c83),_0x1dd133;}function ensureNoSymlinkInManagedPath(_0x27865a,_0x4a2345){const _0x5822e9=a76_0x19070f;let _0x13001d=_0x27865a;for(const _0x32d246 of _0x4a2345[_0x5822e9(0x13b)]('/')){_0x13001d=resolve(_0x13001d,_0x32d246);const _0x2b81a3=lstatIfPresent(_0x13001d);if(_0x2b81a3?.[_0x5822e9(0x138)]())throw CliErrors['validation']('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x4a2345);}}function normalizeSkillRelativePath(_0x43a780){const _0x2d50a3=a76_0x19070f,_0x5bb09a=toPosixPath(_0x43a780[_0x2d50a3(0x12d)]());return validateSkillRelativePath(_0x5bb09a),_0x5bb09a;}function a76_0x8c76(){const _0x3f71dd=['tags','endsWith','Invalid\x20','Runtime\x20Skill\x20package\x20CRC\x20mismatch:\x20','isFile','475371CICZXF','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','name:\x20','subarray','claudeSkillsDir','string','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20entry.','Duplicate\x20Skill\x20package\x20entry:\x20','validation','cacheRoot','update','Unsafe\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','base64','includes','schemaVersion','scope','Runtime\x20Skill\x20package\x20contains\x20encrypted\x20entries.','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','SKILL_ROOT','readUInt16LE','external-symlink','manifest','unchanged','filter','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','source','skills','linkedPath','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','requireOssPath','content','fromEntries','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Unsafe\x20Skill\x20file\x20path:\x20','build','some','name','agentsSkillsDir','Duplicate\x20Skill\x20file\x20path:\x20','Runtime\x20Skill\x20package\x20exceeds\x20size\x20limit:\x20','alloc','.DS_Store','20KsyLQJ','.\x20Changed\x20file:\x20','sourceSessionId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','writeUInt32LE','Runtime\x20Skill\x20package\x20uses\x20unsupported\x20multi-disk\x20zip\x20format.','personal','force','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','local','description','pulledAt','accessKey','18ufkhRL','map','4280DyoOXk','company','push','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','object','appCode','path\x20segment','metadata-mismatch','Skill\x20metadata\x20appCode\x20\x22','linkedPaths','test','env','\x20or\x20directory\x20name.','bytes','link','compare','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20data:\x20','Runtime\x20Skill\x20package\x20local\x20path\x20mismatch:\x20','replace','length','Skill\x20file\x20exceeds\x20size\x20limit:\x20','status','skillMdPath','startsWith','.git','path','.hg','\x20does\x20not\x20match\x20backend\x20content:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','zipSha256','has','skill','removed','version','treeSha256','Runtime\x20Skill\x20package\x20file\x20exceeds\x20size\x20limit:\x20','ossPath','sha256','packageBytes','find','max','readUInt32LE','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','CLAUDE_SKILL_ROOT','Skill\x20directory\x20not\x20found:\x20','Skill\x20directory\x20exceeds\x20total\x20file\x20size\x20limit.','Unsupported\x20runtime\x20Skill\x20scope:\x20','isSafeInteger','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20uncompressed\x20size\x20mismatch:\x20','trim','entries','managedRoot','description:\x20','2019294eqmPOL','Runtime\x20Skill\x20package\x20has\x20truncated\x20entry\x20name.','Missing\x20','sort','SKILL.md','size','\x20in\x20Skill\x20file\x20package.','isSymbolicLink','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','toString','split','pushedAt','cache','slice','Skill\x20file\x20size\x20is\x20invalid:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','13363NmDXDM','builtin','skillCode','coverage','userId','hex','skipped','\x20has\x20scope=\x22','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','skillName','.agents','dist','homeDirName','digest','keys','activeSkillCodes','concat','paths','Runtime\x20Skill\x20package\x20exceeds\x20file\x20count\x20limit.','isArray','isDirectory','code','toLowerCase','fileHashes','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','contentHash','dir','5917356HgamDl','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','---','join','Skill\x20directory\x20exceeds\x20file\x20count\x20limit.','Runtime\x20Skill\x20package\x20is\x20missing\x20zip\x20central\x20directory.','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20contains\x20unsupported\x20compression\x20method.','zipSize','not-managed-symlink','set','metadataPath','.tmp','parse','Runtime\x20Skill\x20package\x20has\x20truncated\x20central\x20directory.','files','values','utf8','homeDir','Runtime\x20Skill\x20package\x20central\x20directory\x20size\x20mismatch.','scopes','packageBase64','stringify','tenantCode','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','497064aSlrWG','.next','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','get','forkedFromSkillId','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','Runtime\x20Skill\x20package\x20has\x20invalid\x20central\x20directory\x20offsets.','from','Runtime\x20Skill\x20package\x20','2097468VDfmcY','Runtime\x20Skill\x20package\x20exceeds\x20total\x20file\x20size\x20limit.','writeUInt16LE','1335410gbdxvl','updated'];a76_0x8c76=function(){return _0x3f71dd;};return a76_0x8c76();}function validateSkillRelativePath(_0x3280e0){const _0x4677ec=a76_0x19070f;if(!_0x3280e0||_0x3280e0['startsWith']('/')||_0x3280e0[_0x4677ec(0x19a)]('//'))throw CliErrors[_0x4677ec(0x194)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3280e0);for(const _0x4da1f1 of _0x3280e0[_0x4677ec(0x13b)]('/')){if(!_0x4da1f1||_0x4da1f1==='.'||_0x4da1f1==='..')throw CliErrors[_0x4677ec(0x194)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3280e0);}}function toPosixPath(_0x5365f1){const _0x23a784=a76_0x19070f;return _0x5365f1[_0x23a784(0x1db)](/\\/g,'/');}function ensureManagedSymlink(_0x4c99ba,_0x32ceb0,_0x34c2c0){const _0x2daaac=a76_0x19070f;mkdirSync(dirname(_0x4c99ba),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4c99ba)||isDanglingSymlink(_0x4c99ba)){const _0x4dd557=lstatSync(_0x4c99ba);if(!_0x4dd557[_0x2daaac(0x138)]())throw CliErrors[_0x2daaac(0x194)](_0x2daaac(0x198)+_0x4c99ba);const _0x511aaa=resolveSymlinkTarget(_0x4c99ba);if(!isPathInside(realOrResolved(_0x511aaa),realOrResolved(_0x34c2c0)))throw CliErrors[_0x2daaac(0x194)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x4c99ba);if(realOrResolved(_0x511aaa)===realOrResolved(_0x32ceb0))return{'path':_0x4c99ba,'target':_0x32ceb0,'action':_0x2daaac(0x1a5)};return unlinkSync(_0x4c99ba),symlinkSync(_0x32ceb0,_0x4c99ba,_0x2daaac(0x15c)),{'path':_0x4c99ba,'target':_0x32ceb0,'action':_0x2daaac(0x186)};}return symlinkSync(_0x32ceb0,_0x4c99ba,_0x2daaac(0x15c)),{'path':_0x4c99ba,'target':_0x32ceb0,'action':'created'};}function managedAppSkillLinkPaths(_0x57ffca,_0x478df2){const _0x300dc9=a76_0x19070f;if(!existsSync(_0x57ffca))return[];const _0xec17cd=_0x478df2+'--';return readdirSync(_0x57ffca,{'withFileTypes':!![]})[_0x300dc9(0x1a6)](_0x3cb693=>_0x3cb693[_0x300dc9(0x1b3)][_0x300dc9(0x1e0)](_0xec17cd))[_0x300dc9(0x1c7)](_0x27b63a=>resolve(_0x57ffca,_0x27b63a[_0x300dc9(0x1b3)]));}function removeManagedSkillLink(_0x1e5c66,_0x12cf30){const _0x37a965=a76_0x19070f,_0x1aa3aa=lstatIfPresent(_0x1e5c66);if(!_0x1aa3aa?.[_0x37a965(0x138)]())return{'path':_0x1e5c66,'action':_0x37a965(0x147),'reason':_0x37a965(0x166)};const _0x9a15d=resolveSymlinkTarget(_0x1e5c66);if(!isPathInside(realOrResolved(_0x9a15d),realOrResolved(_0x12cf30)))return{'path':_0x1e5c66,'action':_0x37a965(0x147),'reason':_0x37a965(0x1a3)};return unlinkSync(_0x1e5c66),{'path':_0x1e5c66,'action':_0x37a965(0x119)};}function copyManagedSkillDirectory(_0x3f0f71,_0x81a184){const _0x1a60b1=a76_0x19070f,_0x1e9919=resolve(_0x81a184,METADATA_FILE),_0x2eb72c=existsSync(_0x81a184);if(_0x2eb72c){const _0x26f482=lstatSync(_0x81a184);if(_0x26f482[_0x1a60b1(0x138)]())throw CliErrors[_0x1a60b1(0x194)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x81a184);if(!_0x26f482[_0x1a60b1(0x156)]())throw CliErrors[_0x1a60b1(0x194)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x81a184);const _0x1d8465=readMetadataIfPresent(_0x1e9919);if(_0x1d8465?.[_0x1a60b1(0x19c)]!==_0x1a60b1(0x142))throw CliErrors[_0x1a60b1(0x194)](_0x1a60b1(0x1cb)+_0x81a184);}mkdirSync(dirname(_0x81a184),{'recursive':!![],'mode':0x1c0});const _0x5dda04=_0x2eb72c?readMetadataIfPresent(_0x1e9919)?.[_0x1a60b1(0x15b)]:undefined,_0x10c2e2=readMetadataIfPresent(resolve(_0x3f0f71,METADATA_FILE))?.[_0x1a60b1(0x15b)];return _0x2eb72c&&rmSync(_0x81a184,{'recursive':!![],'force':!![]}),copySkillDirectory(_0x3f0f71,_0x81a184),{'path':_0x81a184,'target':_0x3f0f71,'action':!_0x2eb72c?'created':_0x5dda04===_0x10c2e2?_0x1a60b1(0x1a5):_0x1a60b1(0x186)};}function copySkillDirectory(_0x34c279,_0x29baeb){const _0x11e1d9=a76_0x19070f;mkdirSync(_0x29baeb,{'recursive':!![],'mode':0x1c0});for(const _0x1e092f of readdirSync(_0x34c279,{'withFileTypes':!![]})){const _0x464261=resolve(_0x34c279,_0x1e092f[_0x11e1d9(0x1b3)]),_0x56ec22=resolve(_0x29baeb,_0x1e092f[_0x11e1d9(0x1b3)]);if(_0x1e092f[_0x11e1d9(0x138)]())throw CliErrors[_0x11e1d9(0x194)](_0x11e1d9(0x19f)+_0x464261);if(_0x1e092f[_0x11e1d9(0x156)]()){copySkillDirectory(_0x464261,_0x56ec22);continue;}_0x1e092f[_0x11e1d9(0x18b)]()&&writeFileSync(_0x56ec22,readFileSync(_0x464261));}}function isDanglingSymlink(_0x39c4cf){try{return lstatSync(_0x39c4cf)['isSymbolicLink']();}catch{return![];}}function resolveSymlinkTarget(_0x163b40){const _0x21ba0c=readlinkSync(_0x163b40);return isAbsolute(_0x21ba0c)?_0x21ba0c:resolve(dirname(_0x163b40),_0x21ba0c);}function isPathInside(_0x2f93dd,_0x4c2f40){const _0x5e2517=a76_0x19070f,_0x2e073b=_0x2f93dd['endsWith'](sep)?_0x2f93dd:''+_0x2f93dd+sep,_0x328eef=_0x4c2f40[_0x5e2517(0x188)](sep)?_0x4c2f40:''+_0x4c2f40+sep;return _0x2f93dd===_0x4c2f40||_0x2e073b['startsWith'](_0x328eef);}function realOrResolved(_0x228bb3){try{return realpathSync(_0x228bb3);}catch{return resolve(_0x228bb3);}}function lstatIfPresent(_0x3ddf78){try{return lstatSync(_0x3ddf78);}catch{return undefined;}}function writeTextAtomic(_0x5dc016,_0x1c6794,_0x1f4fab){const _0x1eb61e=a76_0x19070f;writeBytesAtomic(_0x5dc016,Buffer[_0x1eb61e(0x180)](_0x1c6794,'utf8'),_0x1f4fab);}function writeBytesAtomic(_0x442400,_0x313a7e,_0x5d3e98){const _0x15415b=a76_0x19070f,_0x26e876=_0x442400+_0x15415b(0x169);try{writeFileSync(_0x26e876,_0x313a7e,{'mode':_0x5d3e98}),renameSync(_0x26e876,_0x442400);}catch(_0x2a42b5){try{rmSync(_0x26e876,{'force':!![]});}catch{}throw _0x2a42b5;}}function writeJsonAtomic(_0x1da984,_0x497d14){const _0x5422b9=a76_0x19070f;writeTextAtomic(_0x1da984,JSON[_0x5422b9(0x173)](_0x497d14,null,0x2)+'\x0a',0x180);}
|
|
1
|
+
(function(_0x3b2052,_0xc02706){var _0x36e599=a99_0xddf9,_0xc63fea=_0x3b2052();while(!![]){try{var _0x48551=-parseInt(_0x36e599(0x1e0))/0x1+-parseInt(_0x36e599(0x1de))/0x2*(-parseInt(_0x36e599(0x1df))/0x3)+-parseInt(_0x36e599(0x1e5))/0x4*(parseInt(_0x36e599(0x1e4))/0x5)+-parseInt(_0x36e599(0x1e2))/0x6*(-parseInt(_0x36e599(0x1e7))/0x7)+-parseInt(_0x36e599(0x1e6))/0x8+parseInt(_0x36e599(0x1e1))/0x9*(-parseInt(_0x36e599(0x1e3))/0xa)+parseInt(_0x36e599(0x1dd))/0xb;if(_0x48551===_0xc02706)break;else _0xc63fea['push'](_0xc63fea['shift']());}catch(_0x4de156){_0xc63fea['push'](_0xc63fea['shift']());}}}(a99_0x25d2,0xe7744));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a99_0xddf9(_0x1b374e,_0x3f1bdd){_0x1b374e=_0x1b374e-0x1dd;var _0x25d2a2=a99_0x25d2();var _0xddf949=_0x25d2a2[_0x1b374e];return _0xddf949;}function a99_0x25d2(){var _0x151161=['9ZmEMDh','1414446EjiuXI','1270737GAXXxe','12Lwjbvx','30VZJOOb','185bruSRD','74148mPYSCs','9600808mtGpCl','2616362MnstpW','26194619UhimfW','1028780GWhcWU'];a99_0x25d2=function(){return _0x151161;};return a99_0x25d2();}export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,recordPushedRuntimeSkill}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4e04be,_0x44588d){const _0x315c7d=a100_0x4a34,_0x257bf8=_0x4e04be();while(!![]){try{const _0xaa681=-parseInt(_0x315c7d(0x17d))/0x1+-parseInt(_0x315c7d(0x17c))/0x2+-parseInt(_0x315c7d(0x17f))/0x3*(-parseInt(_0x315c7d(0x184))/0x4)+-parseInt(_0x315c7d(0x17e))/0x5+parseInt(_0x315c7d(0x183))/0x6+-parseInt(_0x315c7d(0x180))/0x7+-parseInt(_0x315c7d(0x181))/0x8*(-parseInt(_0x315c7d(0x182))/0x9);if(_0xaa681===_0x44588d)break;else _0x257bf8['push'](_0x257bf8['shift']());}catch(_0x426807){_0x257bf8['push'](_0x257bf8['shift']());}}}(a100_0x41b0,0x2e942));function a100_0x4a34(_0x1135db,_0x5a0f95){_0x1135db=_0x1135db-0x17c;const _0x41b0d4=a100_0x41b0();let _0x4a3433=_0x41b0d4[_0x1135db];return _0x4a3433;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a100_0x41b0(){const _0x28a26d=['8atOurM','5305752WpnISs','366354qRuDHR','715308ZWaels','281182aEaqFv','13296lEpwTo','931915FVnoZk','3qJHmKz','2088506JwXFuT'];a100_0x41b0=function(){return _0x28a26d;};return a100_0x41b0();}
|