@lovrabet/lovrabet-cli 2.1.23-beta.3 → 2.1.23
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/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.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/common/local-file.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/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.d.ts +2 -8
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.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 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.d.ts +6 -0
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.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/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.d.ts +4 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.d.ts +1 -0
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x267aaf,_0x2ee980){const _0x12e079=a94_0x194f,_0x3f1e19=_0x267aaf();while(!![]){try{const _0x5e6963=parseInt(_0x12e079(0x15a))/0x1+parseInt(_0x12e079(0x14f))/0x2*(parseInt(_0x12e079(0x17c))/0x3)+parseInt(_0x12e079(0x145))/0x4*(-parseInt(_0x12e079(0x17f))/0x5)+-parseInt(_0x12e079(0x143))/0x6*(-parseInt(_0x12e079(0x162))/0x7)+-parseInt(_0x12e079(0x153))/0x8*(-parseInt(_0x12e079(0x169))/0x9)+-parseInt(_0x12e079(0x148))/0xa*(-parseInt(_0x12e079(0x147))/0xb)+-parseInt(_0x12e079(0x146))/0xc;if(_0x5e6963===_0x2ee980)break;else _0x3f1e19['push'](_0x3f1e19['shift']());}catch(_0x4f385f){_0x3f1e19['push'](_0x3f1e19['shift']());}}}(a94_0x587f,0xbb6a3));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';function a94_0x587f(){const _0x32d2ab=['catch','3065UTMPJz','update','rawFlags','appCodeSource','mergedCli','../core/api-client.js','verbose','newConfigFileName','defaultPageSize','cancelled','confirmHighRisk','54CgbGMs','../core/sdk-client.js','5528nEShra','11121000fufFfn','539EFiopu','106570OngWdY','trim','execute','authRequired','../commands/app/remote-source.js','_notice','pretty','132qjepVI','error','ACCESS_KEY','string','8lgPJCE','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','currentApp','APPCODE','requiresAuth','doctor','appcode','627394xePzFT','isNonInteractive','object','High-risk\x20operation\x20`','accessKey','items','service','validation','100765Ecliad','local-alias','riskLevel','schema','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','includes','apiDomain','4852773wVwgHy','env','appcode\x20\x22','command','configMissing','Run\x20`','filter','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','\x20\x20To\x20proceed:\x20','name','\x20or\x20pass\x20','Unknown\x20app:\x20','appCode','production','requiresAppCode','ClientAk','map','pageSize','defaultApp','32874lbBdze','app'];a94_0x587f=function(){return _0x32d2ab;};return a94_0x587f();}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{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x565b36){const _0x1e2622=a94_0x194f;return void _0x565b36,AUTH_MODE[_0x1e2622(0x178)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x43beb2,_0x264cbd){const _0x20e00f=a94_0x194f,_0x4e4459=typeof _0x264cbd['app']==='string'&&_0x264cbd[_0x20e00f(0x17d)][_0x20e00f(0x149)]();return{'rawFlags':_0x264cbd,'appCode':_0x43beb2[_0x20e00f(0x175)]||productEnv('APPCODE')||(_0x4e4459?undefined:readAppCodeFromConfig()),'appCodeSource':_0x43beb2[_0x20e00f(0x182)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x264cbd),'defaultFormat':_0x43beb2['format'],'defaultPageSize':_0x43beb2[_0x20e00f(0x17a)],'defaultVerbose':_0x43beb2[_0x20e00f(0x185)],'riskLevel':_0x43beb2[_0x20e00f(0x164)],'accessKey':_0x43beb2[_0x20e00f(0x15e)],'env':_0x43beb2['env'],'mergedCli':{'defaultApp':_0x43beb2[_0x20e00f(0x17b)],'currentApp':_0x43beb2[_0x20e00f(0x155)],'appCode':_0x43beb2['appCode']}};}function a94_0x194f(_0x179dce,_0x3aa958){_0x179dce=_0x179dce-0x140;const _0x587ff6=a94_0x587f();let _0x194fcb=_0x587ff6[_0x179dce];return _0x194fcb;}export function createLovrabetRunnerAdapter(_0x87231b={}){const _0x4f1c5e=a94_0x194f,_0x1d7e49={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x4f1c5e(0x16f)](_0x522b86=>PIPELINE_FLAG_NAMES['has'](_0x522b86[_0x4f1c5e(0x172)]))[_0x4f1c5e(0x179)](({name:_0x51d938,type:_0x22aa4e,description:_0x97d80f})=>({'name':_0x51d938,'type':_0x22aa4e,'description':_0x97d80f})),'formatOutput':_0x87231b['formatOutput']??formatOutput,'getCommandLabel'(_0x328221){const _0x3e51dd=_0x4f1c5e;return CLI_BIN_NAME+'\x20'+_0x328221['service']+'\x20'+_0x328221[_0x3e51dd(0x16c)];},'riskPolicy':{'onViolation'(_0xbb3556){const _0x9c934e=_0x4f1c5e;console[_0x9c934e(0x150)](_0xbb3556);},'createError'(_0x23fd34){const _0x2d492f=_0x4f1c5e;return CliErrors[_0x2d492f(0x141)](_0x23fd34);}},async 'prepare'(_0x44d73b,_0x76fe35){const _0x4294d5=_0x4f1c5e,_0x40f7d1=resolveAuthMode(_0x76fe35);if(_0x44d73b[_0x4294d5(0x157)]!==![]){if(!_0x76fe35[_0x4294d5(0x15e)])throw CliErrors[_0x4294d5(0x14b)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x4294d5(0x186)]+_0x4294d5(0x173)+productEnvName(_0x4294d5(0x151))+'.');const {setActiveAK:_0x3ee172}=await import(_0x4294d5(0x184));_0x3ee172(_0x76fe35[_0x4294d5(0x15e)]);}let _0x4d2817='';if(_0x44d73b[_0x4294d5(0x177)]!==![]){_0x4d2817=_0x76fe35[_0x4294d5(0x175)]??'',_0x4d2817=await resolveExplicitAppName(_0x44d73b,_0x76fe35,_0x4d2817);if(!_0x4d2817){await assertSelectedAppNameIsRuntimeAccessible(_0x44d73b,_0x76fe35);throw CliErrors[_0x4294d5(0x16d)](_0x4294d5(0x170)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x44d73b,_0x76fe35,_0x4d2817);}if(_0x4d2817){const {initSdkClient:_0x334dd6}=await import(_0x4294d5(0x144));_0x334dd6({'appCode':_0x4d2817,'env':_0x76fe35[_0x4294d5(0x16a)]??'production','accessKey':_0x76fe35['accessKey'],'authMode':_0x40f7d1}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x76fe35['defaultVerbose']},'numbers':{'pagesize':_0x76fe35[_0x4294d5(0x140)]}},'extras':{'appCode':_0x4d2817,'cookie':'','apiDomain':_0x76fe35[_0x4294d5(0x168)],'apiDir':'','accessKey':_0x76fe35[_0x4294d5(0x15e)],'envName':_0x76fe35[_0x4294d5(0x16a)],'mergedCli':_0x76fe35[_0x4294d5(0x183)]}};},'confirmHighRisk':_0x87231b[_0x4f1c5e(0x142)]??(async({def:_0x572a74,env:_0x230742,flags:_0xee1fb7,commandLabel:_0x1d9080})=>{const _0x339f61=_0x4f1c5e;if(_0x230742[_0x339f61(0x15b)]){const _0x4ff33d=reconstructCommandArgv(_0x572a74,_0xee1fb7);throw CliErrors[_0x339f61(0x161)](_0x339f61(0x15d)+_0x1d9080+_0x339f61(0x154)+(_0x339f61(0x171)+_0x4ff33d));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x572a74,_0x1d9080,_0xee1fb7),'createCancelledError':_0x3857cb=>CliErrors[_0x339f61(0x141)](_0x3857cb)});}),'mapDryRunError'(_0x40b129){return mapUserFacingExecuteError(_0x40b129);},'mapExecuteError'(_0x542b89){return mapUserFacingExecuteError(_0x542b89);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x1d7e49;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x19eded=a94_0x194f;try{if(sdkClientInitialized){const {clearSdkClient:_0x368eb3}=await import(_0x19eded(0x144));_0x368eb3();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x381dc2}=await import(_0x19eded(0x184));_0x381dc2();}}async function resolveExplicitAppName(_0x52b218,_0xfdd5ec,_0x3ff09a){const _0x113224=a94_0x194f;if(_0x52b218[_0x113224(0x177)]===![])return _0x3ff09a;const _0x133a2d=typeof _0xfdd5ec[_0x113224(0x181)][_0x113224(0x17d)]===_0x113224(0x152)?_0xfdd5ec[_0x113224(0x181)][_0x113224(0x17d)][_0x113224(0x149)]():'';if(!_0x133a2d)return _0x3ff09a;const _0x368573=typeof _0xfdd5ec['rawFlags'][_0x113224(0x159)]===_0x113224(0x152)&&_0xfdd5ec[_0x113224(0x181)]['appcode'][_0x113224(0x149)]()||productEnv(_0x113224(0x156));if(_0x368573||_0xfdd5ec['appCodeSource']===_0x113224(0x163))return _0x3ff09a;const {getRemoteAppList:_0x1d043d}=await import(_0x113224(0x14c)),_0x602cce=await _0x1d043d({'env':_0xfdd5ec[_0x113224(0x16a)]??_0x113224(0x176),'accessKey':_0xfdd5ec['accessKey']}),_0x3c520e=findAppByName(_0x602cce['items'],_0x133a2d);if(_0x3c520e&&!isRuntimeAccessibleApp(_0x3c520e))throw runtimeInaccessibleAppError(_0x3c520e,'\x22'+_0x133a2d+'\x22');const _0x3eca1b=_0x3c520e?.[_0x113224(0x175)]?.['trim']();if(_0x3eca1b)return _0x3eca1b;throw CliErrors['validation'](_0x113224(0x174)+_0x133a2d,_0x113224(0x16e)+CLI_BIN_NAME+_0x113224(0x166)+_0x133a2d+'.appcode\x20to\x20'+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x1f5c05,_0x242bb7){const _0x7be4b3=a94_0x194f;if(_0x1f5c05['requiresAppCode']===![]||!_0x242bb7['accessKey'])return;const _0x1b84ff=(typeof _0x242bb7[_0x7be4b3(0x181)][_0x7be4b3(0x17d)]==='string'&&_0x242bb7[_0x7be4b3(0x181)]['app'][_0x7be4b3(0x149)]()?_0x242bb7[_0x7be4b3(0x181)][_0x7be4b3(0x17d)]:_0x242bb7['mergedCli']?.[_0x7be4b3(0x155)]??_0x242bb7['mergedCli']?.[_0x7be4b3(0x17b)])?.[_0x7be4b3(0x149)]();if(!_0x1b84ff)return;const {getRemoteAppList:_0xd8d8ba}=await import(_0x7be4b3(0x14c)),_0x54fd89=await _0xd8d8ba({'env':_0x242bb7[_0x7be4b3(0x16a)]??_0x7be4b3(0x176),'accessKey':_0x242bb7[_0x7be4b3(0x15e)]}),_0x4a5d84=findAppByName(_0x54fd89[_0x7be4b3(0x15f)],_0x1b84ff);if(_0x4a5d84&&!isRuntimeAccessibleApp(_0x4a5d84))throw runtimeInaccessibleAppError(_0x4a5d84,'\x22'+_0x1b84ff+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5ab60c,_0x32f1c8,_0x2986b4){const _0x4da22b=a94_0x194f;if(_0x5ab60c[_0x4da22b(0x177)]===![]||!_0x32f1c8[_0x4da22b(0x15e)])return;const {getRemoteAppList:_0x2d0c87}=await import(_0x4da22b(0x14c)),_0x43642e=await _0x2d0c87({'env':_0x32f1c8['env']??_0x4da22b(0x176),'accessKey':_0x32f1c8[_0x4da22b(0x15e)]}),_0x4c461b=findAppByCode(_0x43642e[_0x4da22b(0x15f)],_0x2986b4);if(_0x4c461b&&!isRuntimeAccessibleApp(_0x4c461b))throw runtimeInaccessibleAppError(_0x4c461b,_0x4da22b(0x16b)+_0x2986b4+'\x22');}export async function runCommand(_0x4d04f4,_0x28a337,_0x594878=terminalRunnerAdapter){const _0x5f2ef4=a94_0x194f;assertKnownCommandFlags(_0x4d04f4,_0x28a337[_0x5f2ef4(0x181)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x4d04f4)?withUpdateNotice(_0x4d04f4):_0x4d04f4,_0x28a337,_0x594878);}function shouldAttachUpdateNotice(_0x4a31df){const _0x3e4909=a94_0x194f;return![_0x3e4909(0x180),_0x3e4909(0x165),_0x3e4909(0x158)][_0x3e4909(0x167)](_0x4a31df[_0x3e4909(0x160)]);}function withUpdateNotice(_0x33545a){return{..._0x33545a,async 'execute'(_0x22c250){const _0x4daf36=a94_0x194f,_0x3c7f59=shouldResolveUpdateNotice(_0x22c250)?resolveLatestUpdateNotice()[_0x4daf36(0x17e)](()=>null):Promise['resolve'](null),_0x407b2b=await _0x33545a[_0x4daf36(0x14a)](_0x22c250);return attachUpdateNotice(_0x407b2b,await _0x3c7f59);}};}function shouldResolveUpdateNotice(_0x38dace){const _0x54935f=a94_0x194f;return _0x38dace['format']===_0x54935f(0x14e)&&!_0x38dace['nonInteractive'];}function attachUpdateNotice(_0x4c893e,_0x1db3ea){const _0x557c3a=a94_0x194f;if(!_0x1db3ea||!_0x4c893e||typeof _0x4c893e!==_0x557c3a(0x15c))return _0x4c893e;const _0x3a5d0d=_0x4c893e,_0x20ded0=typeof _0x3a5d0d[_0x557c3a(0x14d)]==='object'&&_0x3a5d0d[_0x557c3a(0x14d)]!==null?_0x3a5d0d['_notice']:{};return{..._0x3a5d0d,'_notice':{..._0x20ded0,'update':_0x1db3ea}};}
|
|
1
|
+
(function(_0x5c58fd,_0x36eef0){const _0x43b024=a94_0x4577,_0x4e025a=_0x5c58fd();while(!![]){try{const _0x5951e4=parseInt(_0x43b024(0x109))/0x1+parseInt(_0x43b024(0xec))/0x2+parseInt(_0x43b024(0xd0))/0x3*(-parseInt(_0x43b024(0xd7))/0x4)+-parseInt(_0x43b024(0xe5))/0x5*(-parseInt(_0x43b024(0xdf))/0x6)+-parseInt(_0x43b024(0xda))/0x7*(parseInt(_0x43b024(0xc9))/0x8)+-parseInt(_0x43b024(0xca))/0x9+parseInt(_0x43b024(0xd8))/0xa*(parseInt(_0x43b024(0xf0))/0xb);if(_0x5951e4===_0x36eef0)break;else _0x4e025a['push'](_0x4e025a['shift']());}catch(_0xfa6c51){_0x4e025a['push'](_0x4e025a['shift']());}}}(a94_0x1e2b,0x1c6a8));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x98a372){const _0x117dc3=a94_0x4577;return void _0x98a372,AUTH_MODE[_0x117dc3(0xe4)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x37fb53,_0x2df8f0){const _0x162ba4=a94_0x4577,_0x2c0641=typeof _0x2df8f0['app']===_0x162ba4(0x107)&&_0x2df8f0[_0x162ba4(0xe3)][_0x162ba4(0xe2)]();return{'rawFlags':_0x2df8f0,'appCode':_0x37fb53['appCode']||productEnv(_0x162ba4(0xcd))||(_0x2c0641?undefined:readAppCodeFromConfig()),'appCodeSource':_0x37fb53[_0x162ba4(0xc8)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x2df8f0),'defaultFormat':_0x37fb53['format'],'defaultPageSize':_0x37fb53['pageSize'],'defaultVerbose':_0x37fb53[_0x162ba4(0x103)],'riskLevel':_0x37fb53[_0x162ba4(0xed)],'accessKey':_0x37fb53[_0x162ba4(0x104)],'env':_0x37fb53[_0x162ba4(0xd5)],'mergedCli':{'defaultApp':_0x37fb53[_0x162ba4(0xf1)],'currentApp':_0x37fb53['currentApp'],'appCode':_0x37fb53['appCode']}};}export function createLovrabetRunnerAdapter(_0x295cf3={}){const _0x5b1d58=a94_0x4577,_0x5bb302={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x5b1d58(0xd4)](_0x2bce59=>PIPELINE_FLAG_NAMES[_0x5b1d58(0xfb)](_0x2bce59['name']))[_0x5b1d58(0x10a)](({name:_0x5a22b3,type:_0x1f2432,description:_0x11fb14})=>({'name':_0x5a22b3,'type':_0x1f2432,'description':_0x11fb14})),'formatOutput':_0x295cf3[_0x5b1d58(0xfa)]??formatOutput,'getCommandLabel'(_0x3e4f36){const _0x528de7=_0x5b1d58;return CLI_BIN_NAME+'\x20'+_0x3e4f36[_0x528de7(0x101)]+'\x20'+_0x3e4f36[_0x528de7(0xd6)];},'riskPolicy':{'onViolation'(_0x4e7ab7){const _0x2bc532=_0x5b1d58;console[_0x2bc532(0xdc)](_0x4e7ab7);},'createError'(_0x5e4a57){const _0x15ee93=_0x5b1d58;return CliErrors[_0x15ee93(0xcc)](_0x5e4a57);}},async 'prepare'(_0x229e45,_0x51db54){const _0x41b44a=_0x5b1d58,_0x144986=resolveAuthMode(_0x51db54);if(_0x229e45[_0x41b44a(0xf4)]!==![]){if(!_0x51db54[_0x41b44a(0x104)])throw CliErrors[_0x41b44a(0xf2)](_0x41b44a(0x102)+PRODUCT_CONFIG['newConfigFileName']+_0x41b44a(0xd9)+productEnvName('ACCESS_KEY')+'.');const {setActiveAK:_0x2b00c4}=await import(_0x41b44a(0xe1));_0x2b00c4(_0x51db54[_0x41b44a(0x104)]);}let _0x180c6f='';if(_0x229e45['requiresAppCode']!==![]){_0x180c6f=_0x51db54['appCode']??'',_0x180c6f=await resolveExplicitAppName(_0x229e45,_0x51db54,_0x180c6f);if(!_0x180c6f){await assertSelectedAppNameIsRuntimeAccessible(_0x229e45,_0x51db54);throw CliErrors[_0x41b44a(0xcb)](_0x41b44a(0xcf)+PRODUCT_CONFIG[_0x41b44a(0xd2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x229e45,_0x51db54,_0x180c6f);}if(_0x180c6f){const {initSdkClient:_0x369a85}=await import(_0x41b44a(0xf7));_0x369a85({'appCode':_0x180c6f,'env':_0x51db54[_0x41b44a(0xd5)]??_0x41b44a(0xdd),'accessKey':_0x51db54[_0x41b44a(0x104)],'authMode':_0x144986}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x51db54[_0x41b44a(0x106)]},'numbers':{'pagesize':_0x51db54[_0x41b44a(0x108)]}},'extras':{'appCode':_0x180c6f,'cookie':'','apiDomain':_0x51db54['apiDomain'],'apiDir':'','accessKey':_0x51db54[_0x41b44a(0x104)],'envName':_0x51db54['env'],'mergedCli':_0x51db54['mergedCli']}};},'confirmHighRisk':_0x295cf3[_0x5b1d58(0xef)]??(async({def:_0x3df037,env:_0x47d562,flags:_0xa451c1,commandLabel:_0x51f2a3})=>{const _0x3eaa6f=_0x5b1d58;if(_0x47d562[_0x3eaa6f(0xea)]){const _0x3ebbaa=reconstructCommandArgv(_0x3df037,_0xa451c1);throw CliErrors[_0x3eaa6f(0xde)]('High-risk\x20operation\x20`'+_0x51f2a3+_0x3eaa6f(0xfe)+('\x20\x20To\x20proceed:\x20'+_0x3ebbaa));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3df037,_0x51f2a3,_0xa451c1),'createCancelledError':_0x527ce4=>CliErrors['cancelled'](_0x527ce4)});}),'mapDryRunError'(_0x5216c8){return mapUserFacingExecuteError(_0x5216c8);},'mapExecuteError'(_0x236056){return mapUserFacingExecuteError(_0x236056);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x5bb302;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x9ccacc=a94_0x4577;try{if(sdkClientInitialized){const {clearSdkClient:_0x405968}=await import('../core/sdk-client.js');_0x405968();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x3a09fa}=await import(_0x9ccacc(0xe1));_0x3a09fa();}}async function resolveExplicitAppName(_0xa8d603,_0x383665,_0xc2e4c4){const _0x5505aa=a94_0x4577;if(_0xa8d603[_0x5505aa(0xe9)]===![])return _0xc2e4c4;const _0x449612=typeof _0x383665[_0x5505aa(0x100)][_0x5505aa(0xe3)]===_0x5505aa(0x107)?_0x383665[_0x5505aa(0x100)][_0x5505aa(0xe3)][_0x5505aa(0xe2)]():'';if(!_0x449612)return _0xc2e4c4;const _0x116c4f=typeof _0x383665['rawFlags']['appcode']===_0x5505aa(0x107)&&_0x383665['rawFlags'][_0x5505aa(0xe6)][_0x5505aa(0xe2)]()||productEnv('APPCODE');if(_0x116c4f||_0x383665[_0x5505aa(0xc8)]===_0x5505aa(0xf3))return _0xc2e4c4;const {getRemoteAppList:_0x43672b}=await import('../commands/app/remote-source.js'),_0x5de988=await _0x43672b({'env':_0x383665[_0x5505aa(0xd5)]??_0x5505aa(0xdd),'accessKey':_0x383665[_0x5505aa(0x104)]}),_0xe452a2=findAppByName(_0x5de988[_0x5505aa(0xee)],_0x449612);if(_0xe452a2&&!isRuntimeAccessibleApp(_0xe452a2))throw runtimeInaccessibleAppError(_0xe452a2,'\x22'+_0x449612+'\x22');const _0xf2cf22=_0xe452a2?.[_0x5505aa(0xe0)]?.['trim']();if(_0xf2cf22)return _0xf2cf22;throw CliErrors[_0x5505aa(0xde)](_0x5505aa(0xfd)+_0x449612,'Run\x20`'+CLI_BIN_NAME+_0x5505aa(0xf8)+_0x449612+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x5505aa(0xd2)]+'.');}function a94_0x1e2b(){const _0x4a437f=['requiresAuth','doctor','_notice','../core/sdk-client.js','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','../commands/app/remote-source.js','formatOutput','has','update','Unknown\x20app:\x20','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','pretty','rawFlags','service','Set\x20accessKey\x20in\x20','verbose','accessKey','includes','defaultVerbose','string','defaultPageSize','160618CaOhea','map','nonInteractive','appCodeSource','45808iNEnkJ','1482021KirWAt','configMissing','cancelled','APPCODE','mergedCli','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','27CZeoxi','currentApp','newConfigFileName','resolve','filter','env','command','98772OFVoSK','2742340YiSBqI','\x20or\x20pass\x20','21lVZwDB','execute','error','production','validation','6KycWFX','appCode','../core/api-client.js','trim','app','ClientAk','105065xYhomN','appcode','object','format','requiresAppCode','isNonInteractive','schema','129222EoqyTO','riskLevel','items','confirmHighRisk','11UMLYKm','defaultApp','authRequired','local-alias'];a94_0x1e2b=function(){return _0x4a437f;};return a94_0x1e2b();}async function assertSelectedAppNameIsRuntimeAccessible(_0x22d4aa,_0x42f811){const _0x8eb7c1=a94_0x4577;if(_0x22d4aa[_0x8eb7c1(0xe9)]===![]||!_0x42f811[_0x8eb7c1(0x104)])return;const _0x4eb0cc=(typeof _0x42f811[_0x8eb7c1(0x100)][_0x8eb7c1(0xe3)]===_0x8eb7c1(0x107)&&_0x42f811[_0x8eb7c1(0x100)][_0x8eb7c1(0xe3)][_0x8eb7c1(0xe2)]()?_0x42f811['rawFlags']['app']:_0x42f811[_0x8eb7c1(0xce)]?.[_0x8eb7c1(0xd1)]??_0x42f811[_0x8eb7c1(0xce)]?.[_0x8eb7c1(0xf1)])?.[_0x8eb7c1(0xe2)]();if(!_0x4eb0cc)return;const {getRemoteAppList:_0x2d1a9f}=await import(_0x8eb7c1(0xf9)),_0x1c1b7d=await _0x2d1a9f({'env':_0x42f811['env']??_0x8eb7c1(0xdd),'accessKey':_0x42f811[_0x8eb7c1(0x104)]}),_0x3699ef=findAppByName(_0x1c1b7d['items'],_0x4eb0cc);if(_0x3699ef&&!isRuntimeAccessibleApp(_0x3699ef))throw runtimeInaccessibleAppError(_0x3699ef,'\x22'+_0x4eb0cc+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x34c238,_0x25a41b,_0x142b20){const _0x3bc8c0=a94_0x4577;if(_0x34c238[_0x3bc8c0(0xe9)]===![]||!_0x25a41b[_0x3bc8c0(0x104)])return;const {getRemoteAppList:_0x5ab2ea}=await import('../commands/app/remote-source.js'),_0x213c59=await _0x5ab2ea({'env':_0x25a41b[_0x3bc8c0(0xd5)]??'production','accessKey':_0x25a41b['accessKey']}),_0x31961d=findAppByCode(_0x213c59[_0x3bc8c0(0xee)],_0x142b20);if(_0x31961d&&!isRuntimeAccessibleApp(_0x31961d))throw runtimeInaccessibleAppError(_0x31961d,'appcode\x20\x22'+_0x142b20+'\x22');}export async function runCommand(_0x35a855,_0x362e17,_0x5c5d5b=terminalRunnerAdapter){const _0x2abda9=a94_0x4577;assertKnownCommandFlags(_0x35a855,_0x362e17[_0x2abda9(0x100)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x35a855)?withUpdateNotice(_0x35a855):_0x35a855,_0x362e17,_0x5c5d5b);}function shouldAttachUpdateNotice(_0x8c7b20){const _0x19cdf0=a94_0x4577;return![_0x19cdf0(0xfc),_0x19cdf0(0xeb),_0x19cdf0(0xf5)][_0x19cdf0(0x105)](_0x8c7b20[_0x19cdf0(0x101)]);}function withUpdateNotice(_0x4c0989){return{..._0x4c0989,async 'execute'(_0xeebd4d){const _0x31ee20=a94_0x4577,_0x5a81c1=shouldResolveUpdateNotice(_0xeebd4d)?resolveLatestUpdateNotice()['catch'](()=>null):Promise[_0x31ee20(0xd3)](null),_0x2c829e=await _0x4c0989[_0x31ee20(0xdb)](_0xeebd4d);return attachUpdateNotice(_0x2c829e,await _0x5a81c1);}};}function shouldResolveUpdateNotice(_0x5033e5){const _0x4d5888=a94_0x4577;return _0x5033e5[_0x4d5888(0xe8)]===_0x4d5888(0xff)&&!_0x5033e5[_0x4d5888(0xc7)];}function a94_0x4577(_0xb46737,_0x2b9442){_0xb46737=_0xb46737-0xc7;const _0x1e2b10=a94_0x1e2b();let _0x4577a3=_0x1e2b10[_0xb46737];return _0x4577a3;}function attachUpdateNotice(_0x8823d9,_0x16ad16){const _0x536b19=a94_0x4577;if(!_0x16ad16||!_0x8823d9||typeof _0x8823d9!==_0x536b19(0xe7))return _0x8823d9;const _0x159a11=_0x8823d9,_0x507d9f=typeof _0x159a11[_0x536b19(0xf6)]==='object'&&_0x159a11[_0x536b19(0xf6)]!==null?_0x159a11[_0x536b19(0xf6)]:{};return{..._0x159a11,'_notice':{..._0x507d9f,'update':_0x16ad16}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x470c42,_0x3ff41a){const _0x454632=a95_0x5422,_0x1d26d2=_0x470c42();while(!![]){try{const _0x4ce4d1=-parseInt(_0x454632(0x147))/0x1*(parseInt(_0x454632(0x139))/0x2)+parseInt(_0x454632(0x134))/0x3*(-parseInt(_0x454632(0x137))/0x4)+-parseInt(_0x454632(0x13a))/0x5+parseInt(_0x454632(0x140))/0x6+parseInt(_0x454632(0x143))/0x7+parseInt(_0x454632(0x135))/0x8+parseInt(_0x454632(0x13f))/0x9*(parseInt(_0x454632(0x146))/0xa);if(_0x4ce4d1===_0x3ff41a)break;else _0x1d26d2['push'](_0x1d26d2['shift']());}catch(_0x203454){_0x1d26d2['push'](_0x1d26d2['shift']());}}}(a95_0x4f22,0xba619));import{buildSchemaPayload as a95_0x14418d}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a95_0x4f22(){const _0x418cf1=['commands','none','7839657aWsUee','services','../commands/registry.js','10ZirugS','1AteTXp','4573773KhgHDV','10676728BAsMEh','filter','4UkcQII','service','2559352GgFyCm','5480935KZPYvb','required','auth','requiresAuth','map','18510354AemSat','915738udHSVG'];a95_0x4f22=function(){return _0x418cf1;};return a95_0x4f22();}import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x41e452=a95_0x5422,{serviceRegistry:_0x34bdc0,findDefinition:_0x329199}=await import(_0x41e452(0x145)),_0x2e83a0=new Set(_0x34bdc0[_0x41e452(0x13e)](_0x141741=>_0x141741['service'])),_0x2c80d3=listDynamicServiceEntries()[_0x41e452(0x136)](_0x335b52=>!_0x2e83a0['has'](_0x335b52[_0x41e452(0x138)])),_0x24c173=a95_0x14418d({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x34bdc0,_0x2c80d3),'buildAllFlags':buildAllFlags,'findDefinition':(_0x549d3f,_0x2a4148)=>_0x329199(_0x549d3f,_0x2a4148)??findDynamicServiceDefinition(_0x549d3f,_0x2a4148)});return normalizeSchemaPayload(_0x24c173);}function normalizeSchemaPayload(_0x2b8ca8){const _0x5801b3=a95_0x5422;return{..._0x2b8ca8,'schemaVersion':0x2,'services':_0x2b8ca8[_0x5801b3(0x144)]['map'](_0x39665a=>({..._0x39665a,'commands':_0x39665a[_0x5801b3(0x141)][_0x5801b3(0x13e)](normalizeSchemaCommand)}))};}function a95_0x5422(_0x17d98f,_0x5b271e){_0x17d98f=_0x17d98f-0x134;const _0x4f2234=a95_0x4f22();let _0x5422e5=_0x4f2234[_0x17d98f];return _0x5422e5;}function normalizeSchemaCommand(_0x3eb8b6){const _0xdc37ae=a95_0x5422,_0x3d1db7=_0x3eb8b6;return{..._0x3eb8b6,'auth':_0x3d1db7[_0xdc37ae(0x13c)]??(_0x3eb8b6[_0xdc37ae(0x13d)]?_0xdc37ae(0x13b):_0xdc37ae(0x142))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x584540,_0x55b0d6){const _0x1a5baf=a96_0x4403,_0x1b8493=_0x584540();while(!![]){try{const _0x2e0492=parseInt(_0x1a5baf(0x118))/0x1+parseInt(_0x1a5baf(0x111))/0x2+-parseInt(_0x1a5baf(0x11a))/0x3*(-parseInt(_0x1a5baf(0x11c))/0x4)+parseInt(_0x1a5baf(0x117))/0x5*(-parseInt(_0x1a5baf(0x11d))/0x6)+parseInt(_0x1a5baf(0x112))/0x7*(parseInt(_0x1a5baf(0x114))/0x8)+parseInt(_0x1a5baf(0x113))/0x9*(-parseInt(_0x1a5baf(0x11e))/0xa)+-parseInt(_0x1a5baf(0x11b))/0xb;if(_0x2e0492===_0x55b0d6)break;else _0x1b8493['push'](_0x1b8493['shift']());}catch(_0x4d2acd){_0x1b8493['push'](_0x1b8493['shift']());}}}(a96_0x5754,0xa90ba));export function insertDynamicServicesAfterServiceTree(_0x5b8408,_0x7f1ccc){const _0x57fbe3=a96_0x4403;if(_0x7f1ccc[_0x57fbe3(0x110)]===0x0)return[..._0x5b8408];const _0x260752=_0x5b8408[_0x57fbe3(0x115)](_0x52c2bb=>_0x52c2bb[_0x57fbe3(0x119)]===_0x57fbe3(0x119));if(_0x260752<0x0)return[..._0x5b8408,..._0x7f1ccc];return[..._0x5b8408[_0x57fbe3(0x116)](0x0,_0x260752+0x1),..._0x7f1ccc,..._0x5b8408[_0x57fbe3(0x116)](_0x260752+0x1)];}function a96_0x4403(_0x3c913d,_0x59c264){_0x3c913d=_0x3c913d-0x110;const _0x57540f=a96_0x5754();let _0x440394=_0x57540f[_0x3c913d];return _0x440394;}function a96_0x5754(){const _0x4c877a=['13869086VqfFiN','5210684HwigJI','6LhxzEn','3117430jLwmPJ','length','1722790mroZCI','8329349YOQNog','36DFLICd','8ibSsmB','findIndex','slice','2521405aglGfi','350516XwlRQG','service','3TdVCAD'];a96_0x5754=function(){return _0x4c877a;};return a96_0x5754();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x4cb3(_0x47ee70,_0x2334d1){_0x47ee70=_0x47ee70-0x70;var _0x3599b8=a97_0x3599();var _0x4cb31b=_0x3599b8[_0x47ee70];return _0x4cb31b;}(function(_0x4e4a6b,_0xc8d8c2){var _0x4102c3=a97_0x4cb3,_0x13c067=_0x4e4a6b();while(!![]){try{var _0x5a639d=-parseInt(_0x4102c3(0x75))/0x1+-parseInt(_0x4102c3(0x78))/0x2+parseInt(_0x4102c3(0x72))/0x3+-parseInt(_0x4102c3(0x71))/0x4*(parseInt(_0x4102c3(0x73))/0x5)+-parseInt(_0x4102c3(0x77))/0x6*(parseInt(_0x4102c3(0x79))/0x7)+parseInt(_0x4102c3(0x76))/0x8*(-parseInt(_0x4102c3(0x74))/0x9)+parseInt(_0x4102c3(0x70))/0xa;if(_0x5a639d===_0xc8d8c2)break;else _0x13c067['push'](_0x13c067['shift']());}catch(_0x4e8b0f){_0x13c067['push'](_0x13c067['shift']());}}}(a97_0x3599,0x1b122));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a97_0x3599(){var _0x355b7c=['15956BwbmRn','601734CpvqiY','45PislHS','9846laZoeb','217035FrvsZW','152KzRisD','482424LpLkfJ','361816uZAvQW','14xIUqdI','5257420BiYOPm'];a97_0x3599=function(){return _0x355b7c;};return a97_0x3599();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.1.23
|
|
2
|
-
export declare const GIT_TAG = "v2.1.23
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.1.23";
|
|
2
|
+
export declare const GIT_TAG = "v2.1.23";
|
|
3
|
+
export declare const GIT_COMMIT = "ecc8d0d";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-11T06:56:44.567Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x1ce2f5=a98_0x40ae;function a98_0x40ae(_0x13c911,_0x708d8){_0x13c911=_0x13c911-0xc6;const _0x3d3153=a98_0x3d31();let _0x40aee5=_0x3d3153[_0x13c911];return _0x40aee5;}(function(_0x353dc3,_0x4f061b){const _0x486721=a98_0x40ae,_0x2209f2=_0x353dc3();while(!![]){try{const _0xb2ec69=-parseInt(_0x486721(0xcd))/0x1+parseInt(_0x486721(0xc9))/0x2*(parseInt(_0x486721(0xcb))/0x3)+parseInt(_0x486721(0xd4))/0x4*(-parseInt(_0x486721(0xcf))/0x5)+-parseInt(_0x486721(0xc8))/0x6+-parseInt(_0x486721(0xc6))/0x7*(-parseInt(_0x486721(0xca))/0x8)+-parseInt(_0x486721(0xcc))/0x9*(-parseInt(_0x486721(0xd3))/0xa)+parseInt(_0x486721(0xd1))/0xb;if(_0xb2ec69===_0x4f061b)break;else _0x2209f2['push'](_0x2209f2['shift']());}catch(_0x358b63){_0x2209f2['push'](_0x2209f2['shift']());}}}(a98_0x3d31,0x4aac1));export const VERSION=a98_0x1ce2f5(0xce);function a98_0x3d31(){const _0x4779a1=['1481256qHKxSa','179777HNVJfb','2.1.23','165QVQCyI','2026-08-11T06:56:44.567Z','4932873ZyfjMs','ecc8d0d','10wnEmHd','43908WqZBpT','173768sgSCbA','v2.1.23','1982442ixAADB','38254afOege','176tZPHlA','3JfTurt'];a98_0x3d31=function(){return _0x4779a1;};return a98_0x3d31();}export const GIT_TAG=a98_0x1ce2f5(0xc7);export const GIT_COMMIT=a98_0x1ce2f5(0xd2);export const BUILD_TIME=a98_0x1ce2f5(0xd0);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44140a,_0x1dfd66){const _0xd0a4c7=a99_0x1242,_0x2958ae=_0x44140a();while(!![]){try{const _0x2bff88=parseInt(_0xd0a4c7(0x1a3))/0x1+parseInt(_0xd0a4c7(0x1ab))/0x2+-parseInt(_0xd0a4c7(0x1a4))/0x3+parseInt(_0xd0a4c7(0x1ac))/0x4*(-parseInt(_0xd0a4c7(0x1a9))/0x5)+parseInt(_0xd0a4c7(0x1a1))/0x6+-parseInt(_0xd0a4c7(0x1a6))/0x7+-parseInt(_0xd0a4c7(0x1ae))/0x8*(parseInt(_0xd0a4c7(0x1a2))/0x9);if(_0x2bff88===_0x1dfd66)break;else _0x2958ae['push'](_0x2958ae['shift']());}catch(_0x4dcce6){_0x2958ae['push'](_0x2958ae['shift']());}}}(a99_0x4c27,0x38647));import{jsx as a99_0x378f55,jsxs as a99_0x552a82}from'react/jsx-runtime';function a99_0x1242(_0xf6ced0,_0x5d6aec){_0xf6ced0=_0xf6ced0-0x1a1;const _0x4c27e3=a99_0x4c27();let _0x124247=_0x4c27e3[_0xf6ced0];return _0x124247;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x5d0b66=a99_0x1242,{exit:_0x9be6df}=useApp();return useEffect(()=>{_0x9be6df();},[_0x9be6df]),a99_0x552a82(Box,{'flexDirection':_0x5d0b66(0x1a5),'marginTop':0x1,'marginBottom':0x1,'children':[a99_0x378f55(Box,{'children':a99_0x378f55(Text,{'bold':!![],'color':_0x5d0b66(0x1a8),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a99_0x552a82(Box,{'marginTop':0x1,'children':[a99_0x378f55(Text,{'dimColor':!![],'children':_0x5d0b66(0x1a7)}),a99_0x378f55(Text,{'bold':!![],'color':_0x5d0b66(0x1a8),'children':CLI_BIN_NAME+_0x5d0b66(0x1ad)}),a99_0x378f55(Text,{'dimColor':!![],'children':_0x5d0b66(0x1aa)})]})]});}function a99_0x4c27(){const _0x3e545f=['281197AcQKin','68883SSOvbm','column','228704WFtuLF','\x20\x20Use\x20','green','145qqvZEu','\x20to\x20view\x20available\x20commands.','915472jWxIBV','13844eDOGLz','\x20--help','3009336Oexcko','145314xjxOXU','9MMdUol'];a99_0x4c27=function(){return _0x3e545f;};return a99_0x4c27();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4b37fc,_0x3e3f58){const _0x613eb9=a100_0x2f70,_0x3d6279=_0x4b37fc();while(!![]){try{const _0x1249ca=-parseInt(_0x613eb9(0x152))/0x1*(parseInt(_0x613eb9(0x157))/0x2)+parseInt(_0x613eb9(0x15c))/0x3*(-parseInt(_0x613eb9(0x14e))/0x4)+parseInt(_0x613eb9(0x153))/0x5+-parseInt(_0x613eb9(0x156))/0x6+-parseInt(_0x613eb9(0x151))/0x7*(-parseInt(_0x613eb9(0x159))/0x8)+-parseInt(_0x613eb9(0x155))/0x9*(-parseInt(_0x613eb9(0x15f))/0xa)+-parseInt(_0x613eb9(0x15e))/0xb*(-parseInt(_0x613eb9(0x15b))/0xc);if(_0x1249ca===_0x3e3f58)break;else _0x3d6279['push'](_0x3d6279['shift']());}catch(_0x2f0110){_0x3d6279['push'](_0x3d6279['shift']());}}}(a100_0x293b,0xc2f5f));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x420618,_0x258d14,_0x14975f){const _0x4ed2ad=a100_0x2f70,_0x3d7b9d=normalizeText(_0x420618[_0x4ed2ad(0x158)],DESCRIPTION_MAX_LENGTH),_0x515c80=normalizeText(_0x420618[_0x4ed2ad(0x154)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x258d14,'risk':requireWriteRisk(_0x420618),'description':_0x3d7b9d||_0x515c80||'执行该写入操作',..._0x14975f?{'signal':_0x14975f}:{}};}function a100_0x293b(){const _0x5b3d26=['5128lsCORe','risk','replace','21oNwPOs','10qpMAnI','6951360kRFyoA','description','86373UGtcdN','4797000nCQgPK','235126elHehj','confirmationDescription','2652080ksUrXv','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','983472LdhbYv','1863ZDUlfp','write','132OIsDfe','210caWGVH'];a100_0x293b=function(){return _0x5b3d26;};return a100_0x293b();}function a100_0x2f70(_0x132953,_0x1f2971){_0x132953=_0x132953-0x14e;const _0x293b5b=a100_0x293b();let _0x2f7068=_0x293b5b[_0x132953];return _0x2f7068;}function requireWriteRisk(_0x3ab8a8){const _0xc2baf0=a100_0x2f70;if(_0x3ab8a8['risk']===_0xc2baf0(0x15d)||_0x3ab8a8['risk']==='high-risk-write')return _0x3ab8a8[_0xc2baf0(0x14f)];throw new Error(_0xc2baf0(0x15a));}function normalizeText(_0x244b97,_0x18b707){const _0x435942=a100_0x2f70;if(typeof _0x244b97!=='string')return'';return _0x244b97[_0x435942(0x150)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x435942(0x150)](/\s+/g,'\x20')['trim']()['slice'](0x0,_0x18b707);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a101_0x2d49(){const _0x24e920=['filter','556532jMZEqX','5559957KxMTya','386ASwDQI','write','1923ZhyYcO','command','lovrabet.write.completed','150iiZiCU','8tkLYdp','535986ERTmZx','514290LQChYQ','writeEventSubject','15gIwWyh','risk','split','1593468EswkrI','1946406xActFO'];a101_0x2d49=function(){return _0x24e920;};return a101_0x2d49();}(function(_0x5df780,_0x5af094){const _0x144a39=a101_0x35d7,_0x4301b6=_0x5df780();while(!![]){try{const _0x33ca24=-parseInt(_0x144a39(0x17e))/0x1*(-parseInt(_0x144a39(0x17c))/0x2)+parseInt(_0x144a39(0x178))/0x3+-parseInt(_0x144a39(0x17a))/0x4*(-parseInt(_0x144a39(0x186))/0x5)+parseInt(_0x144a39(0x177))/0x6+parseInt(_0x144a39(0x184))/0x7+-parseInt(_0x144a39(0x182))/0x8*(parseInt(_0x144a39(0x17b))/0x9)+parseInt(_0x144a39(0x181))/0xa*(-parseInt(_0x144a39(0x183))/0xb);if(_0x33ca24===_0x5af094)break;else _0x4301b6['push'](_0x4301b6['shift']());}catch(_0x5b3cb8){_0x4301b6['push'](_0x4301b6['shift']());}}}(a101_0x2d49,0x686cd));function a101_0x35d7(_0x170bea,_0x789d58){_0x170bea=_0x170bea-0x177;const _0x2d49f8=a101_0x2d49();let _0x35d787=_0x2d49f8[_0x170bea];return _0x35d787;}export function canonicalLovrabetOperation(_0x1897da){const _0x258ed0=a101_0x35d7;return[_0x1897da['service'],..._0x1897da[_0x258ed0(0x17f)]['trim']()[_0x258ed0(0x188)](/\s+/)][_0x258ed0(0x179)](Boolean)['join']('.');}export function createLovrabetWriteMetadata(_0x48ff6e,_0x432ae0,_0x356267,_0x225cf6){const _0x1ba03c=a101_0x35d7;if(_0x225cf6||_0x356267['ok']!==!![]||_0x48ff6e[_0x1ba03c(0x187)]!==_0x1ba03c(0x17d)&&_0x48ff6e['risk']!=='high-risk-write')return undefined;const _0x231c6e=_0x48ff6e[_0x1ba03c(0x185)]?.(_0x356267),_0x384b11={'type':_0x1ba03c(0x180),'operation':_0x432ae0,'risk':_0x48ff6e['risk'],..._0x231c6e?{'subject':_0x231c6e}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x384b11}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3ad799,_0xa2066d){const _0x2d294b=a102_0x3bad,_0x73ab6=_0x3ad799();while(!![]){try{const _0x2795d8=parseInt(_0x2d294b(0x183))/0x1*(parseInt(_0x2d294b(0x19b))/0x2)+-parseInt(_0x2d294b(0x18a))/0x3+-parseInt(_0x2d294b(0x196))/0x4*(parseInt(_0x2d294b(0x193))/0x5)+parseInt(_0x2d294b(0x17d))/0x6*(parseInt(_0x2d294b(0x199))/0x7)+parseInt(_0x2d294b(0x198))/0x8*(-parseInt(_0x2d294b(0x19f))/0x9)+-parseInt(_0x2d294b(0x18c))/0xa*(parseInt(_0x2d294b(0x192))/0xb)+parseInt(_0x2d294b(0x197))/0xc;if(_0x2795d8===_0xa2066d)break;else _0x73ab6['push'](_0x73ab6['shift']());}catch(_0x567baf){_0x73ab6['push'](_0x73ab6['shift']());}}}(a102_0x11cc,0xa62de));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x4f699e,command:_0x117580,risk:_0x176849,dryRun:_0x4b83f5}){const _0x4cf5ea=a102_0x3bad;return JSON[_0x4cf5ea(0x195)]({'ok':_0x4f699e['ok'],'command':_0x117580,'risk':_0x176849,..._0x4b83f5?{'dryRun':!![]}:{},..._0x4f699e[_0x4cf5ea(0x19a)]!==undefined?{'data':_0x4f699e[_0x4cf5ea(0x19a)]}:{},..._0x4f699e[_0x4cf5ea(0x181)]?{'message':_0x4f699e[_0x4cf5ea(0x181)]}:{}});}};function a102_0x11cc(){const _0x51d81f=['Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','confirmation','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','dry-run','reason','1970370hLnSsS','args','270GlLUfR','definition','command','isNonInteractive','format','result','238953Crdzpv','5OlJLcL','aborted','stringify','4817412tCrBcR','27131280piOBdh','136fewPEE','5463136bxtkCn','data','4agMqWC','riskLevel','yes','risk','437490aXDcpw','present','signal','high-risk-write','6ahTNLa','execute','presentation','write','message','rawFlags','456658tdXKER','dryRun'];a102_0x11cc=function(){return _0x51d81f;};return a102_0x11cc();}export async function invokeLovrabet(_0x3537b0,_0x4c52cd){const _0x6c7402=a102_0x3bad;throwIfAborted(_0x4c52cd['signal']);const _0x4c0588=await resolveLovrabetInvocation(_0x3537b0),_0x11b84b=canonicalLovrabetOperation(_0x4c0588[_0x6c7402(0x18d)]);return await confirmWriteBeforeQueue(_0x4c0588[_0x6c7402(0x18d)],_0x4c0588[_0x6c7402(0x182)],_0x11b84b,_0x4c52cd),runSerialized(async()=>{const _0x2e826b=_0x6c7402;throwIfAborted(_0x4c52cd['signal']);const _0xb2d47a={},_0x374633=buildConfigFromFlags(_0x4c0588['rawFlags']);await initGlobalEnvironment(_0x374633);const _0x174a4d=createPipelineEnv(_0x374633,{..._0x4c0588['rawFlags'],'yes':_0x4c0588[_0x2e826b(0x18d)]['risk']===_0x2e826b(0x1a2)?!![]:_0x4c0588[_0x2e826b(0x182)][_0x2e826b(0x19d)],'nonInteractive':!![]});_0x174a4d[_0x2e826b(0x18b)]=_0x4c0588[_0x2e826b(0x18b)],_0x174a4d[_0x2e826b(0x18f)]=!![],_0x174a4d[_0x2e826b(0x19c)]=_0x2e826b(0x1a2);const _0x3c2eed=withAbortSignal(_0x4c0588[_0x2e826b(0x18d)],_0x4c52cd[_0x2e826b(0x1a1)]),_0x2c2e32=createLovrabetRunnerAdapter({'formatOutput'(_0x191646,_0x34fbd0){const _0x5ad3f4=_0x2e826b;_0xb2d47a['result']=_0x191646,_0xb2d47a[_0x5ad3f4(0x18e)]=_0x34fbd0[_0x5ad3f4(0x18e)],_0xb2d47a['risk']=_0x34fbd0[_0x5ad3f4(0x19e)],_0xb2d47a[_0x5ad3f4(0x190)]=_0x34fbd0[_0x5ad3f4(0x190)],_0xb2d47a[_0x5ad3f4(0x184)]=_0x34fbd0[_0x5ad3f4(0x184)]===!![];},async 'confirmHighRisk'(){const _0x7b083b=_0x2e826b;throw new Error(_0x7b083b(0x187));}});try{await runCommand(_0x3c2eed,_0x174a4d,_0x2c2e32);if(!_0xb2d47a[_0x2e826b(0x191)]||!_0xb2d47a[_0x2e826b(0x18e)]||!_0xb2d47a['risk']||!_0xb2d47a[_0x2e826b(0x190)])throw new Error(_0x2e826b(0x185));const _0x4f2c01=_0x4c52cd[_0x2e826b(0x17f)]??defaultPresentation,_0x3e27ad=_0xb2d47a[_0x2e826b(0x184)]===!![],_0x365402={'result':_0xb2d47a[_0x2e826b(0x191)],'command':_0xb2d47a[_0x2e826b(0x18e)],'operation':_0x11b84b,'risk':_0xb2d47a[_0x2e826b(0x19e)],'format':_0xb2d47a[_0x2e826b(0x190)],'dryRun':_0x3e27ad},_0x55ac41=createLovrabetWriteMetadata(_0x4c0588[_0x2e826b(0x18d)],_0x11b84b,_0xb2d47a[_0x2e826b(0x191)],_0x3e27ad);let _0x3294aa;try{_0x3294aa=await _0x4f2c01[_0x2e826b(0x1a0)](_0x365402);}catch(_0x455f2c){if(!_0x55ac41||_0x4f2c01===defaultPresentation)throw _0x455f2c;_0x3294aa=await defaultPresentation[_0x2e826b(0x1a0)](_0x365402);}return{'operation':_0x11b84b,'risk':_0xb2d47a[_0x2e826b(0x19e)],'mode':_0x3e27ad?_0x2e826b(0x188):'execute','result':_0xb2d47a[_0x2e826b(0x191)],'output':_0x3294aa,..._0x55ac41?{'metadata':_0x55ac41}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x3f8659,_0x5603f3,_0x3df16d,_0x54dce7){const _0x16ee61=a102_0x3bad;if(_0x5603f3['dryRun']===!![]||_0x3f8659[_0x16ee61(0x19e)]!==_0x16ee61(0x180)&&_0x3f8659[_0x16ee61(0x19e)]!=='high-risk-write')return;await _0x54dce7[_0x16ee61(0x186)]['confirm'](buildLovrabetConfirmationRequest(_0x3f8659,_0x3df16d,_0x54dce7['signal']));}function a102_0x3bad(_0x2e38fc,_0x340c8e){_0x2e38fc=_0x2e38fc-0x17d;const _0x11cc91=a102_0x11cc();let _0x3bad7=_0x11cc91[_0x2e38fc];return _0x3bad7;}function withAbortSignal(_0x33f972,_0x35bdf6){return{..._0x33f972,async 'execute'(_0x392b05){const _0x56dcb9=a102_0x3bad;return throwIfAborted(_0x35bdf6),_0x33f972[_0x56dcb9(0x17e)](_0x392b05);}};}function throwIfAborted(_0x1ea6b1){const _0x4588e5=a102_0x3bad;if(_0x1ea6b1?.[_0x4588e5(0x194)])throw _0x1ea6b1[_0x4588e5(0x189)]instanceof Error?_0x1ea6b1[_0x4588e5(0x189)]:new DOMException('Lovrabet\x20invocation\x20aborted.','AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a103_0x4845f3=a103_0x4c5e;(function(_0x18e819,_0x42d94f){const _0x6e7e2c=a103_0x4c5e,_0x43aa14=_0x18e819();while(!![]){try{const _0x30cebd=-parseInt(_0x6e7e2c(0xd9))/0x1*(parseInt(_0x6e7e2c(0xd6))/0x2)+-parseInt(_0x6e7e2c(0xd7))/0x3+parseInt(_0x6e7e2c(0xda))/0x4*(-parseInt(_0x6e7e2c(0xd3))/0x5)+parseInt(_0x6e7e2c(0xd4))/0x6+parseInt(_0x6e7e2c(0xd5))/0x7+-parseInt(_0x6e7e2c(0xd2))/0x8+parseInt(_0x6e7e2c(0xdb))/0x9;if(_0x30cebd===_0x42d94f)break;else _0x43aa14['push'](_0x43aa14['shift']());}catch(_0x62cb7){_0x43aa14['push'](_0x43aa14['shift']());}}}(a103_0x3e3c,0x5fcad));function a103_0x4c5e(_0x52b281,_0x1bc4ec){_0x52b281=_0x52b281-0xd2;const _0x3e3c61=a103_0x3e3c();let _0x4c5e3b=_0x3e3c61[_0x52b281];return _0x4c5e3b;}let tail=Promise[a103_0x4845f3(0xdc)]();export async function runSerialized(_0x333397){const _0xc55ad6=a103_0x4845f3,_0x2368eb=tail;let _0x18bbf1;tail=new Promise(_0x449740=>{_0x18bbf1=_0x449740;}),await _0x2368eb[_0xc55ad6(0xd8)](()=>undefined);try{return await _0x333397();}finally{_0x18bbf1();}}function a103_0x3e3c(){const _0x5cf686=['6160704fTakOi','5sPCdrt','2835840cPyRZg','738675cVYqVC','81038BibbfM','551241zyFtLg','catch','2BazLpE','266776pwvcVB','8241903MTmjSG','resolve'];a103_0x3e3c=function(){return _0x5cf686;};return a103_0x3e3c();}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17a559,_0x240069){const _0xb9b143=a104_0x52ee,_0x5197d4=_0x17a559();while(!![]){try{const _0x295351=-parseInt(_0xb9b143(0xde))/0x1*(-parseInt(_0xb9b143(0xeb))/0x2)+-parseInt(_0xb9b143(0xe1))/0x3+-parseInt(_0xb9b143(0xd8))/0x4*(-parseInt(_0xb9b143(0xea))/0x5)+-parseInt(_0xb9b143(0xdd))/0x6+-parseInt(_0xb9b143(0xd9))/0x7+parseInt(_0xb9b143(0xe2))/0x8*(-parseInt(_0xb9b143(0xe0))/0x9)+parseInt(_0xb9b143(0xe4))/0xa;if(_0x295351===_0x240069)break;else _0x5197d4['push'](_0x5197d4['shift']());}catch(_0x5acd8e){_0x5197d4['push'](_0x5197d4['shift']());}}}(a104_0x2334,0x6c1a7));import a104_0x1c04e4 from'meow';function a104_0x2334(){const _0x48d078=['6005528rrZLJQ','unknownCommand','16363070pbHVXt','args','message','hint','join','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','255aIKjGv','75692PTpbIB','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','definition','input','slice','flags','4044ISAcXe','4418659ceKIFW','defaultCommand','validation','assign','678810PyoTLi','11AVNEYL','../commands/registry.js','9CdPwHT','498960vhUZTf'];a104_0x2334=function(){return _0x48d078;};return a104_0x2334();}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x483f88){const _0x1d4785=a104_0x52ee,_0x29e266=a104_0x1c04e4('',{'importMeta':import.meta,'argv':_0x483f88,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0xd2356e=[..._0x29e266[_0x1d4785(0xd5)]],_0x4f0339=_0x29e266[_0x1d4785(0xd7)];await correctFlags(_0x4f0339);const _0x39a088=_0xd2356e[0x0];if(!_0x39a088)throw CliErrors[_0x1d4785(0xdb)](_0x1d4785(0xe9));const _0x2c0134=resolveRemovedCommand(_0x39a088,_0xd2356e[0x1]);if(_0x2c0134)throw CliErrors['validation'](_0x2c0134[_0x1d4785(0xe6)],_0x2c0134[_0x1d4785(0xe7)]);if(!isKnownService(_0x39a088)){const _0x538d76=resolveDynamicServiceCommand(_0xd2356e,_0x4f0339);if(!_0x538d76)throw CliErrors[_0x1d4785(0xe3)](_0xd2356e[_0x1d4785(0xe8)]('\x20'));return Object[_0x1d4785(0xdc)](_0x4f0339,_0x538d76[_0x1d4785(0xd7)]),{'definition':_0x538d76[_0x1d4785(0xd4)],'rawFlags':_0x4f0339,'args':_0x538d76[_0x1d4785(0xe5)]};}const _0x220a86=getServiceEntry(_0x39a088),_0x56a963=_0xd2356e[0x1]||_0x220a86[_0x1d4785(0xda)];if(!_0x56a963)throw CliErrors[_0x1d4785(0xdb)](_0x1d4785(0xec)+_0x39a088+'\x22.');const _0x411335=findDefinition(_0x39a088,_0x56a963);if(!_0x411335)throw CliErrors[_0x1d4785(0xe3)](_0x39a088+'\x20'+_0x56a963);return{'definition':_0x411335,'rawFlags':_0x4f0339,'args':_0xd2356e[_0x1d4785(0xd6)](0x2)};}function a104_0x52ee(_0x316033,_0x14f409){_0x316033=_0x316033-0xd4;const _0x23341e=a104_0x2334();let _0x52ee9b=_0x23341e[_0x316033];return _0x52ee9b;}async function correctFlags(_0x11a76d){const _0x463095=a104_0x52ee;try{const {correctFlags:_0x3e5665}=await import('../framework/preparse.js'),{getAllDefinitions:_0x207e70}=await import(_0x463095(0xdf)),_0x3a938a=_0x207e70()['flatMap'](_0xc9b2a2=>_0xc9b2a2['flags']??[]),_0x1af762=_0x3e5665(_0x11a76d,_0x3a938a);Object[_0x463095(0xdc)](_0x11a76d,_0x1af762[_0x463095(0xd7)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x103eb2=a106_0x1d40;function a106_0x1d40(_0x772e3d,_0x24d4d2){_0x772e3d=_0x772e3d-0x101;const _0x52718f=a106_0x5271();let _0x1d4027=_0x52718f[_0x772e3d];return _0x1d4027;}(function(_0x3d6a2a,_0x1424fb){const _0x1721d=a106_0x1d40,_0x29c7f4=_0x3d6a2a();while(!![]){try{const _0x247f08=-parseInt(_0x1721d(0x10e))/0x1+-parseInt(_0x1721d(0x12b))/0x2*(-parseInt(_0x1721d(0x12d))/0x3)+parseInt(_0x1721d(0x128))/0x4+parseInt(_0x1721d(0x11a))/0x5*(parseInt(_0x1721d(0x102))/0x6)+-parseInt(_0x1721d(0x118))/0x7+-parseInt(_0x1721d(0x109))/0x8*(parseInt(_0x1721d(0x12f))/0x9)+-parseInt(_0x1721d(0x108))/0xa;if(_0x247f08===_0x1424fb)break;else _0x29c7f4['push'](_0x29c7f4['shift']());}catch(_0x384537){_0x29c7f4['push'](_0x29c7f4['shift']());}}}(a106_0x5271,0xf2991));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a106_0x2b19a2}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a106_0x2b19a2;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a106_0x103eb2(0x10d)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a106_0x103eb2(0x10f)];export function resolveGlobalSkillName(_0x3425cf){const _0x2b639c=a106_0x103eb2;switch(_0x3425cf[_0x2b639c(0x123)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x53ee6e,_0x54e84a,_0x1c47bd){return{'ok':![],'status':_0x54e84a,'code':_0x53ee6e,'error':'['+_0x53ee6e+']\x20'+_0x1c47bd};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a106_0x5271(){const _0x1ed240=['16648pswKzj','stdio','pipe','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','internalSkillSource','257316JqedNc','globalSkillName','toString','unverifiable','EACCES','warn','stderr','PERMISSION_DENIED','CHILD_TERMINATED','join','6171690Lonwgd','Installer\x20reported\x20','385kjmIDU','reason','exit\x20','state','checked','presence','code','CHILD_EXIT_NONZERO','INSTALL_PARTIAL','trim','NPX_NOT_FOUND','log','EPERM','status','2672928kbijJq','\x20failed\x20target(s)','match','434490jIeLvq','add','18qxmeqB','signal','405PXmFdF','!\x20Could\x20not\x20verify\x20\x22','stdout','absent','skills','144174ipEZrr','SKILL_NOT_INSTALLED','npx','npx\x20terminated\x20by\x20signal\x20','message','error','15956230KriscF'];a106_0x5271=function(){return _0x1ed240;};return a106_0x5271();}export function runNpxSkillsAddGlobal(_0x2521f1,_0x1c9e1a=LOVRABET_SKILL_SOURCE,_0x24c7d5){const _0x503baa=a106_0x103eb2;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4d4702=resolveNpmBin(_0x503baa(0x104)),_0x167344=[_0x503baa(0x101),_0x503baa(0x12c),_0x1c9e1a,'-g','-y'],_0x3d1ec7=[_0x4d4702,..._0x167344]['join']('\x20');console[_0x503baa(0x125)]('*\x20'+_0x3d1ec7);const _0x45fae2=spawnSync(_0x4d4702,_0x167344,{'cwd':_0x2521f1,'stdio':'pipe','env':process.env,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x432d5a=[_0x45fae2[_0x503baa(0x131)]?_0x45fae2[_0x503baa(0x131)][_0x503baa(0x110)]():'',_0x45fae2[_0x503baa(0x114)]?_0x45fae2[_0x503baa(0x114)][_0x503baa(0x110)]():'']['filter'](Boolean)[_0x503baa(0x117)]('\x0a')[_0x503baa(0x123)]();_0x24c7d5?.[_0x503baa(0x10a)]!==_0x503baa(0x10b)&&_0x432d5a&&console[_0x503baa(0x125)](_0x432d5a);if(_0x45fae2[_0x503baa(0x107)]){const _0x20241f=_0x45fae2[_0x503baa(0x107)],_0xe9a847=_0x20241f[_0x503baa(0x120)]==='ENOENT'?_0x503baa(0x124):_0x20241f[_0x503baa(0x120)]===_0x503baa(0x126)||_0x20241f['code']===_0x503baa(0x112)?_0x503baa(0x115):'SPAWN_FAILED';return failure(_0xe9a847,_0x45fae2[_0x503baa(0x127)],_0x20241f[_0x503baa(0x106)]);}if(_0x45fae2[_0x503baa(0x12e)])return failure(_0x503baa(0x116),_0x45fae2[_0x503baa(0x127)],_0x503baa(0x105)+_0x45fae2['signal']);if(_0x45fae2[_0x503baa(0x127)]!==0x0)return failure(_0x503baa(0x121),_0x45fae2['status'],_0x432d5a||_0x503baa(0x11c)+(_0x45fae2['status']??'unknown'));const _0x5f381e=_0x432d5a[_0x503baa(0x12a)](/Failed to install\s+(\d+)/i);if(_0x5f381e&&Number(_0x5f381e[0x1])>0x0)return failure(_0x503baa(0x122),0x0,_0x503baa(0x119)+_0x5f381e[0x1]+_0x503baa(0x129)+(_0x432d5a?':\x0a'+_0x432d5a:''));const _0x27ea08=resolveGlobalSkillName(_0x1c9e1a);if(_0x27ea08){const _0xcae2e1=resolveInstalledSkill(_0x27ea08,_0x24c7d5?.[_0x503baa(0x11f)]);if(_0xcae2e1['state']===_0x503baa(0x132))return failure(_0x503baa(0x103),0x0,'Skill\x20\x22'+_0x27ea08+_0x503baa(0x10c)+_0xcae2e1[_0x503baa(0x11e)][_0x503baa(0x117)](',\x20')+')');_0xcae2e1[_0x503baa(0x11d)]===_0x503baa(0x111)&&console[_0x503baa(0x113)](_0x503baa(0x130)+_0x27ea08+'\x22\x20install\x20state:\x20'+_0xcae2e1[_0x503baa(0x11b)]);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a107_0x114a1a=a107_0x4298;(function(_0x4d1e01,_0x1b8d57){const _0xe9eb4f=a107_0x4298,_0x43ae4b=_0x4d1e01();while(!![]){try{const _0x2d3aa4=-parseInt(_0xe9eb4f(0xfb))/0x1*(-parseInt(_0xe9eb4f(0x103))/0x2)+-parseInt(_0xe9eb4f(0xfc))/0x3+-parseInt(_0xe9eb4f(0x101))/0x4*(parseInt(_0xe9eb4f(0xfa))/0x5)+-parseInt(_0xe9eb4f(0x108))/0x6*(parseInt(_0xe9eb4f(0x102))/0x7)+-parseInt(_0xe9eb4f(0x10a))/0x8*(-parseInt(_0xe9eb4f(0x10d))/0x9)+-parseInt(_0xe9eb4f(0x107))/0xa*(parseInt(_0xe9eb4f(0xff))/0xb)+-parseInt(_0xe9eb4f(0xfe))/0xc*(-parseInt(_0xe9eb4f(0x106))/0xd);if(_0x2d3aa4===_0x1b8d57)break;else _0x43ae4b['push'](_0x43ae4b['shift']());}catch(_0x1c8d35){_0x43ae4b['push'](_0x43ae4b['shift']());}}}(a107_0x3870,0x4ca32));export const METADATA_FILE=a107_0x114a1a(0x10c);function a107_0x4298(_0x4f8b77,_0x36e389){_0x4f8b77=_0x4f8b77-0xf9;const _0x38705c=a107_0x3870();let _0x4298e7=_0x38705c[_0x4f8b77];return _0x4298e7;}export const SKILL_FILE=a107_0x114a1a(0x100);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a107_0x3870(){const _0x207cc2=['SKILL.md','392edzFIf','7WWGbWb','2620yfcjSi','node_modules','.turbo','91NoITnQ','10YjJotP','1302102GNjeks','.cache','1168616GyRrsm','.hg','lovrabet.skill.json','27adNjMM','coverage','16585EVPcQh','3zCrPQG','4707AQexnR','.next','1225908OHilVw','3296876QYTGWP'];a107_0x3870=function(){return _0x207cc2;};return a107_0x3870();}export const IGNORED_DIR_NAMES=new Set(['.git',a107_0x114a1a(0x10b),'.svn',a107_0x114a1a(0x104),a107_0x114a1a(0xfd),'dist','build',a107_0x114a1a(0xf9),a107_0x114a1a(0x105),a107_0x114a1a(0x109)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x829388,_0x2b5aa9){const _0x5e916c=a108_0x227f,_0x5d82c5=_0x829388();while(!![]){try{const _0x4dca97=parseInt(_0x5e916c(0x1ba))/0x1+-parseInt(_0x5e916c(0x1c6))/0x2*(parseInt(_0x5e916c(0x1ca))/0x3)+parseInt(_0x5e916c(0x1c0))/0x4+-parseInt(_0x5e916c(0x1c1))/0x5*(-parseInt(_0x5e916c(0x1c9))/0x6)+-parseInt(_0x5e916c(0x1c8))/0x7*(parseInt(_0x5e916c(0x1bd))/0x8)+parseInt(_0x5e916c(0x1c2))/0x9+-parseInt(_0x5e916c(0x1bc))/0xa;if(_0x4dca97===_0x2b5aa9)break;else _0x5d82c5['push'](_0x5d82c5['shift']());}catch(_0x1e1769){_0x5d82c5['push'](_0x5d82c5['shift']());}}}(a108_0xcb5a,0x29e90));function a108_0x227f(_0x5115b0,_0x51a33b){_0x5115b0=_0x5115b0-0x1ba;const _0xcb5a54=a108_0xcb5a();let _0x227fee=_0xcb5a54[_0x5115b0];return _0x227fee;}import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x50fec2,_0x2f2491){const _0x50fcd7=a108_0x227f,_0x2a271c=normalizeSkillRelativePath(_0x2f2491),_0x1d995d=realOrResolved(_0x50fec2),_0x53c9b8=resolve(_0x1d995d,..._0x2a271c[_0x50fcd7(0x1bb)]('/'));if(!isPathInside(_0x53c9b8,_0x1d995d))throw CliErrors[_0x50fcd7(0x1cc)](_0x50fcd7(0x1be)+_0x2f2491);return ensureNoSymlinkInManagedPath(_0x1d995d,_0x2a271c),_0x53c9b8;}export function ensureNoSymlinkInManagedPath(_0x3b5a24,_0x2c9575){const _0x4d6b43=a108_0x227f;let _0x295db5=_0x3b5a24;for(const _0x19567d of _0x2c9575[_0x4d6b43(0x1bb)]('/')){_0x295db5=resolve(_0x295db5,_0x19567d);const _0x448adf=lstatIfPresent(_0x295db5);if(_0x448adf?.['isSymbolicLink']())throw CliErrors[_0x4d6b43(0x1cc)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x2c9575);}}export function isDanglingSymlink(_0xefc14f){const _0x3edc0d=a108_0x227f;try{return lstatSync(_0xefc14f)[_0x3edc0d(0x1c3)]();}catch{return![];}}export function resolveSymlinkTarget(_0x566905){const _0x3d122f=readlinkSync(_0x566905);return isAbsolute(_0x3d122f)?_0x3d122f:resolve(dirname(_0x566905),_0x3d122f);}function a108_0xcb5a(){const _0x3ee315=['Unsafe\x20Skill\x20file\x20path:\x20','utf8','245052ToCyJp','20MCMaHs','2454786MdbQUX','isSymbolicLink','.tmp','from','11318kwDrsQ','startsWith','19138oTVjAb','222078rDawZU','114FeqMmA','stringify','validation','191213QNkBJC','split','2127580uFhcTi','216JZtLeY'];a108_0xcb5a=function(){return _0x3ee315;};return a108_0xcb5a();}export function isPathInside(_0x5ca3b1,_0x54a799){const _0x587bc3=a108_0x227f,_0x1d5033=_0x5ca3b1['endsWith'](sep)?_0x5ca3b1:''+_0x5ca3b1+sep,_0x3f1e0b=_0x54a799['endsWith'](sep)?_0x54a799:''+_0x54a799+sep;return _0x5ca3b1===_0x54a799||_0x1d5033[_0x587bc3(0x1c7)](_0x3f1e0b);}export function realOrResolved(_0x4c6be6){try{return realpathSync(_0x4c6be6);}catch{return resolve(_0x4c6be6);}}export function lstatIfPresent(_0x3190a8){try{return lstatSync(_0x3190a8);}catch{return undefined;}}export function writeTextAtomic(_0x32f8e0,_0x459f12,_0x181182){const _0x130b21=a108_0x227f;writeBytesAtomic(_0x32f8e0,Buffer[_0x130b21(0x1c5)](_0x459f12,_0x130b21(0x1bf)),_0x181182);}export function writeBytesAtomic(_0xe29902,_0x34c466,_0xe4ea36){const _0x517e57=a108_0x227f,_0x37858f=_0xe29902+_0x517e57(0x1c4);try{writeFileSync(_0x37858f,_0x34c466,{'mode':_0xe4ea36}),renameSync(_0x37858f,_0xe29902);}catch(_0x4b291a){try{rmSync(_0x37858f,{'force':!![]});}catch{}throw _0x4b291a;}}export function writeJsonAtomic(_0x4f0e1f,_0x3f232c){const _0x593886=a108_0x227f;writeTextAtomic(_0x4f0e1f,JSON[_0x593886(0x1cb)](_0x3f232c,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x89ff41,_0x260962){const _0x14d9cf=a109_0x34cb,_0x4f2407=_0x89ff41();while(!![]){try{const _0x3ae883=-parseInt(_0x14d9cf(0xd1))/0x1+parseInt(_0x14d9cf(0xc9))/0x2+-parseInt(_0x14d9cf(0xcc))/0x3+-parseInt(_0x14d9cf(0xc5))/0x4+parseInt(_0x14d9cf(0xcd))/0x5+parseInt(_0x14d9cf(0xc7))/0x6*(-parseInt(_0x14d9cf(0xc8))/0x7)+parseInt(_0x14d9cf(0xd2))/0x8;if(_0x3ae883===_0x260962)break;else _0x4f2407['push'](_0x4f2407['shift']());}catch(_0x2b6295){_0x4f2407['push'](_0x4f2407['shift']());}}}(a109_0x2023,0x82e5c));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x5f0b70){const _0x38c6fb=a109_0x34cb;return createHash(_0x38c6fb(0xce))[_0x38c6fb(0xc6)](_0x5f0b70)['digest'](_0x38c6fb(0xca));}function a109_0x34cb(_0x1b9ee0,_0x57ec98){_0x1b9ee0=_0x1b9ee0-0xc5;const _0x202375=a109_0x2023();let _0x34cb8f=_0x202375[_0x1b9ee0];return _0x34cb8f;}export function fileHash(_0x485cc8){return bufferSha256(fileContent(_0x485cc8));}function a109_0x2023(){const _0x20a35c=['digest','932035lirhLa','22598224ZRkbkc','1854956QsbjWr','update','156438XXtCnD','231vGiMkV','544830qkRVty','hex','size','1196685bTTnNs','470205OexcOZ','sha256','path'];a109_0x2023=function(){return _0x20a35c;};return a109_0x2023();}export function bufferSha256(_0x15eee2){const _0x54ca21=a109_0x34cb;return createHash(_0x54ca21(0xce))[_0x54ca21(0xc6)](_0x15eee2)[_0x54ca21(0xd0)](_0x54ca21(0xca));}export function fileTreeHash(_0x385fb6){const _0x36aed9=a109_0x34cb,_0x5b5be6=createHash(_0x36aed9(0xce));for(const _0x5d4206 of normalizeManifestFiles(_0x385fb6)){_0x5b5be6[_0x36aed9(0xc6)](_0x5d4206[_0x36aed9(0xcf)]),_0x5b5be6['update']('\x00'),_0x5b5be6['update'](_0x5d4206[_0x36aed9(0xce)]),_0x5b5be6[_0x36aed9(0xc6)]('\x00'),_0x5b5be6['update'](String(_0x5d4206[_0x36aed9(0xcb)])),_0x5b5be6[_0x36aed9(0xc6)]('\x00');}return _0x5b5be6[_0x36aed9(0xd0)](_0x36aed9(0xca));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a110_0x3991b1=a110_0x1809;(function(_0x1451e7,_0x303122){const _0x1b4b6b=a110_0x1809,_0x36a954=_0x1451e7();while(!![]){try{const _0x2f0377=parseInt(_0x1b4b6b(0x10e))/0x1*(parseInt(_0x1b4b6b(0x113))/0x2)+-parseInt(_0x1b4b6b(0x106))/0x3*(-parseInt(_0x1b4b6b(0x110))/0x4)+-parseInt(_0x1b4b6b(0x10d))/0x5*(parseInt(_0x1b4b6b(0x109))/0x6)+parseInt(_0x1b4b6b(0x10c))/0x7+parseInt(_0x1b4b6b(0x107))/0x8*(parseInt(_0x1b4b6b(0x10f))/0x9)+parseInt(_0x1b4b6b(0x112))/0xa+-parseInt(_0x1b4b6b(0x111))/0xb;if(_0x2f0377===_0x303122)break;else _0x36a954['push'](_0x36a954['shift']());}catch(_0x41279d){_0x36a954['push'](_0x36a954['shift']());}}}(a110_0x1236,0xe0967));function a110_0x1809(_0x42cc3b,_0x41092b){_0x42cc3b=_0x42cc3b-0x105;const _0x1236db=a110_0x1236();let _0x180919=_0x1236db[_0x42cc3b];return _0x180919;}import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x41a57a,_0x5f29aa=a110_0x3991b1(0x108),_0x5ccdc4={}){const _0x153708=a110_0x3991b1,_0x39e776=resolveSkillSyncPaths(_0x5ccdc4),_0x56d91b=safePathSegment(_0x41a57a,_0x153708(0x10b)),_0x360e82=_0x5f29aa===_0x153708(0x114)?[resolve(_0x5ccdc4['cwd']??process['cwd'](),_0x153708(0x115),_0x153708(0x10a))]:runtimeAgentSkillRoots(_0x39e776);return Object[_0x153708(0x105)]({'scope':_0x5f29aa,'appCode':_0x56d91b,'skillRoots':Object[_0x153708(0x105)](_0x360e82),'managedRoot':_0x39e776['managedRoot']});}function a110_0x1236(){const _0x215260=['2155220YVOiUu','7963RhpiTN','9tQHvpU','8hKeKNL','43282107ZLsygy','13448950kfsDCF','246FwnNoj','project','.agents','freeze','2156118XnZnuF','10370064GgDPKX','global','6SOATjZ','skills','appCode','1593746DoSBSq'];a110_0x1236=function(){return _0x215260;};return a110_0x1236();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a111_0x4b2fee=a111_0x3040;(function(_0x5b7bde,_0x2bda19){const _0x29b6e7=a111_0x3040,_0x1b35c8=_0x5b7bde();while(!![]){try{const _0x35ba14=-parseInt(_0x29b6e7(0x1d1))/0x1+-parseInt(_0x29b6e7(0x1db))/0x2*(parseInt(_0x29b6e7(0x1cd))/0x3)+parseInt(_0x29b6e7(0x1c7))/0x4*(parseInt(_0x29b6e7(0x1c5))/0x5)+-parseInt(_0x29b6e7(0x1f2))/0x6+parseInt(_0x29b6e7(0x1ce))/0x7*(parseInt(_0x29b6e7(0x1c4))/0x8)+-parseInt(_0x29b6e7(0x1e6))/0x9+parseInt(_0x29b6e7(0x1e3))/0xa;if(_0x35ba14===_0x2bda19)break;else _0x1b35c8['push'](_0x1b35c8['shift']());}catch(_0x3cfe2a){_0x1b35c8['push'](_0x1b35c8['shift']());}}}(a111_0x474b,0x25a93));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a111_0x445c91 from'fs-extra';import{CliErrors}from'../../errors.js';function a111_0x474b(){const _0x1a8142=['appCode','skipped','filter','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','has','activeSkillCodes','6cpdqGi','metadataPath','skill','isSymbolicLink','skillCode','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','created','personal','5226580tzVLiO','accessKey','metadata-mismatch','824706KfurUd','scope','dir','pruneSkillCodes','validation','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','project','values','updated','contentHash','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','length','1412982hoFUXn','isDirectory','secret-retriever','removed','runtime-observe','external-symlink','trim','agentsSkillsDir','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','name','lovrabet','1257864pTkQoE','23210qIXPwn','map','188RIuCtA','startsWith','env','managedRoot','builtin','set','277674NIHAVs','7KwuGOu','push','unchanged','139001lubTnL','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','slice','scopes'];a111_0x474b=function(){return _0x1a8142;};return a111_0x474b();}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';const {copySync,ensureDirSync,removeSync}=a111_0x445c91,RESERVED_PROJECT_SKILL_CODES=new Set([a111_0x4b2fee(0x1c3),a111_0x4b2fee(0x1bd),a111_0x4b2fee(0x1f4)]);export function linkEffectiveRuntimeSkills(_0x56d39a,_0xdf5747){const _0x5aa808=a111_0x4b2fee,_0xc5c708=new Map();for(const _0x4f2fab of _0x56d39a){const _0x4992a6=_0x4f2fab['skill'][_0x5aa808(0x1df)];if(!_0x4992a6)continue;const _0x16d9ae=_0xc5c708['get'](_0x4992a6);(!_0x16d9ae||_0x4f2fab['scope']===_0x5aa808(0x1e2))&&_0xc5c708[_0x5aa808(0x1cc)](_0x4992a6,_0x4f2fab);}const _0x47ed21=[];for(const _0x532e7c of _0xc5c708[_0x5aa808(0x1ed)]()){const _0x3a0443=requireSkillCode(_0x532e7c['skill']),_0x1c867f=readMetadataIfPresent(_0x532e7c[_0x5aa808(0x1dc)]);if(_0x1c867f?.[_0x5aa808(0x1d5)]!==_0xdf5747[_0x5aa808(0x1d5)]||_0x1c867f[_0x5aa808(0x1df)]!==_0x3a0443)throw CliErrors[_0x5aa808(0x1ea)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0xdf5747['appCode']+':\x20'+_0x532e7c[_0x5aa808(0x1dc)]);const _0xae67e=runtimeSkillLinkName(_0xdf5747,_0x3a0443);for(const _0x34f9e3 of _0xdf5747['skillRoots']){_0x47ed21[_0x5aa808(0x1cf)](ensureManagedSymlink(resolve(_0x34f9e3,_0xae67e),_0x532e7c[_0x5aa808(0x1e8)],_0xdf5747,_0x3a0443));}}return _0x47ed21;}export function pruneStaleRuntimeSkillLinks(_0x333220,_0x54a1bd,_0x346c1d){const _0x11355e=a111_0x4b2fee,_0x5a6261=new Set([..._0x54a1bd]['map'](_0x546281=>_0x546281[_0x11355e(0x1bf)]())[_0x11355e(0x1d7)](Boolean)),_0x48eea4=_0x346c1d?new Set([..._0x346c1d]['map'](_0x53452e=>_0x53452e[_0x11355e(0x1bf)]())[_0x11355e(0x1d7)](Boolean)):undefined,_0x3e9c69=[];for(const _0x565975 of _0x333220['skillRoots']){for(const _0x12b390 of managedTargetSkillLinkPaths(_0x565975,_0x333220)){const _0x2c2ca0=runtimeSkillCodeFromLink(_0x333220,_0x12b390);if(_0x48eea4&&!_0x48eea4[_0x11355e(0x1d9)](_0x2c2ca0))continue;if(_0x5a6261['has'](_0x2c2ca0))continue;_0x3e9c69['push'](removeManagedSkillLink(_0x12b390,_0x333220,_0x2c2ca0));}}return _0x3e9c69;}export function pruneStaleRuntimeSkillCache(_0x4c0d2e,_0x144e4e={}){const _0x402960=a111_0x4b2fee,_0x27cb7c=new Set([..._0x4c0d2e[_0x402960(0x1da)]][_0x402960(0x1c6)](_0x794cad=>_0x794cad['trim']())[_0x402960(0x1d7)](Boolean)),_0x5b0d9d=_0x4c0d2e[_0x402960(0x1e9)]?new Set([..._0x4c0d2e[_0x402960(0x1e9)]][_0x402960(0x1c6)](_0x1a9220=>_0x1a9220[_0x402960(0x1bf)]())[_0x402960(0x1d7)](Boolean)):undefined,_0x4477b2=_0x4c0d2e[_0x402960(0x1d4)]??[_0x402960(0x1e2),'company'],_0x5599de=resolve(getRuntimeSkillCacheRoot(_0x4c0d2e[_0x402960(0x1c9)],_0x4c0d2e[_0x402960(0x1e4)],_0x144e4e),safePathSegment(_0x4c0d2e[_0x402960(0x1d5)],_0x402960(0x1d5))),_0x50d5dc=[];for(const _0x498d7b of _0x4477b2){const _0x1e86d1=resolve(_0x5599de,_0x498d7b);if(!existsSync(_0x1e86d1))continue;for(const _0x4a6584 of readdirSync(_0x1e86d1,{'withFileTypes':!![]})){if(!_0x4a6584[_0x402960(0x1f3)]())continue;const _0x21ed51=_0x4a6584[_0x402960(0x1c2)];if(_0x5b0d9d&&!_0x5b0d9d['has'](_0x21ed51))continue;if(_0x27cb7c[_0x402960(0x1d9)](_0x21ed51))continue;const _0x52fc24=resolve(_0x1e86d1,_0x21ed51),_0x47e01f=readMetadataIfPresent(resolve(_0x52fc24,METADATA_FILE));if(_0x47e01f?.['appCode']!==_0x4c0d2e[_0x402960(0x1d5)]||_0x47e01f[_0x402960(0x1e7)]!==_0x498d7b||_0x47e01f[_0x402960(0x1df)]!==_0x21ed51){_0x50d5dc[_0x402960(0x1cf)]({'path':_0x52fc24,'action':'skipped','reason':_0x402960(0x1e5)});continue;}if(isLinkedFromAnyRoot(_0x52fc24,_0x4c0d2e['protectedLinkRoots']??[])){_0x50d5dc['push']({'path':_0x52fc24,'action':_0x402960(0x1d6),'reason':'linked-from-protected-root'});continue;}removeSync(_0x52fc24),_0x50d5dc[_0x402960(0x1cf)]({'path':_0x52fc24,'action':'removed'});}}return _0x50d5dc;}export function linkGlobalRuntimeSkills(_0x41e6c4,_0x2707c6={}){const _0x19d7a=a111_0x4b2fee,_0x540ca6=resolveSkillSyncPaths(_0x2707c6),_0x5eb473=[];for(const _0x3a5dc7 of _0x41e6c4){if(_0x3a5dc7[_0x19d7a(0x1e7)]!==_0x19d7a(0x1cb))throw CliErrors[_0x19d7a(0x1ea)](_0x19d7a(0x1e0)+_0x3a5dc7[_0x19d7a(0x1e7)]);const _0x13768c=requireSkillCode(_0x3a5dc7[_0x19d7a(0x1dd)]),_0x3544d3=copyManagedSkillDirectory(_0x3a5dc7[_0x19d7a(0x1e8)],resolve(_0x540ca6[_0x19d7a(0x1c0)],_0x13768c));_0x5eb473[_0x19d7a(0x1cf)]({..._0x3544d3,'contentHash':_0x3a5dc7['contentHash']});}return _0x5eb473;}function ensureManagedSymlink(_0x3211c6,_0x1f943b,_0x4fdce4,_0xb8cb32){const _0x523850=a111_0x4b2fee;mkdirSync(dirname(_0x3211c6),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3211c6)||isDanglingSymlink(_0x3211c6)){const _0x1dbb7b=lstatSync(_0x3211c6);if(!_0x1dbb7b[_0x523850(0x1de)]())throw CliErrors[_0x523850(0x1ea)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x3211c6);const _0xe721c7=resolveSymlinkTarget(_0x3211c6);if(!isPathInside(realOrResolved(_0xe721c7),realOrResolved(_0x4fdce4['managedRoot'])))throw CliErrors['validation'](_0x523850(0x1d2)+_0x3211c6);if(realOrResolved(_0xe721c7)===realOrResolved(_0x1f943b))return{'path':_0x3211c6,'target':_0x1f943b,'action':_0x523850(0x1d0)};const _0xf4ff81=readMetadataIfPresent(resolve(_0xe721c7,METADATA_FILE));if(_0x4fdce4['scope']==='project'&&(_0xf4ff81?.[_0x523850(0x1d5)]!==_0x4fdce4[_0x523850(0x1d5)]||_0xf4ff81[_0x523850(0x1df)]!==_0xb8cb32))throw CliErrors[_0x523850(0x1ea)](_0x523850(0x1d8)+_0x3211c6);return unlinkSync(_0x3211c6),symlinkSync(_0x1f943b,_0x3211c6,'dir'),{'path':_0x3211c6,'target':_0x1f943b,'action':_0x523850(0x1ee)};}return symlinkSync(_0x1f943b,_0x3211c6,_0x523850(0x1e8)),{'path':_0x3211c6,'target':_0x1f943b,'action':_0x523850(0x1e1)};}function managedTargetSkillLinkPaths(_0x5445cd,_0x420379){const _0x56316c=a111_0x4b2fee;if(!existsSync(_0x5445cd))return[];const _0x3f1826=_0x420379['appCode']+'--';return readdirSync(_0x5445cd,{'withFileTypes':!![]})[_0x56316c(0x1d7)](_0x239ec4=>_0x420379[_0x56316c(0x1e7)]===_0x56316c(0x1ec)||_0x239ec4[_0x56316c(0x1c2)][_0x56316c(0x1c8)](_0x3f1826))[_0x56316c(0x1c6)](_0x5abc7b=>resolve(_0x5445cd,_0x5abc7b[_0x56316c(0x1c2)]));}function removeManagedSkillLink(_0xc2a237,_0x6bbb3e,_0x1f7d29){const _0x19d8b6=a111_0x4b2fee,_0x5753f7=lstatIfPresent(_0xc2a237);if(!_0x5753f7?.[_0x19d8b6(0x1de)]())return{'path':_0xc2a237,'action':_0x19d8b6(0x1d6),'reason':'not-managed-symlink'};const _0x2af3bb=resolveSymlinkTarget(_0xc2a237);if(!isPathInside(realOrResolved(_0x2af3bb),realOrResolved(_0x6bbb3e[_0x19d8b6(0x1ca)])))return{'path':_0xc2a237,'action':_0x19d8b6(0x1d6),'reason':_0x19d8b6(0x1be)};const _0x443c94=readMetadataIfPresent(resolve(_0x2af3bb,METADATA_FILE));if(_0x6bbb3e['scope']===_0x19d8b6(0x1ec)&&(_0x443c94?.[_0x19d8b6(0x1d5)]!==_0x6bbb3e[_0x19d8b6(0x1d5)]||_0x443c94[_0x19d8b6(0x1df)]!==_0x1f7d29))return{'path':_0xc2a237,'action':_0x19d8b6(0x1d6),'reason':_0x19d8b6(0x1e5)};return unlinkSync(_0xc2a237),{'path':_0xc2a237,'action':_0x19d8b6(0x1f5)};}function isLinkedFromAnyRoot(_0x46d349,_0x5860e2){const _0x400475=a111_0x4b2fee,_0x4ff74d=realOrResolved(_0x46d349);for(const _0x1e02fc of _0x5860e2){if(!existsSync(_0x1e02fc))continue;for(const _0xa1f298 of readdirSync(_0x1e02fc,{'withFileTypes':!![]})){if(!_0xa1f298[_0x400475(0x1de)]())continue;const _0x1ad833=resolve(_0x1e02fc,_0xa1f298['name']);if(realOrResolved(resolveSymlinkTarget(_0x1ad833))===_0x4ff74d)return!![];}}return![];}function runtimeSkillLinkName(_0x53de97,_0x1bfe3a){const _0x34df8d=a111_0x4b2fee,_0x567f1e=safePathSegment(_0x1bfe3a,_0x34df8d(0x1df));if(_0x53de97['scope']==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x34df8d(0x1d9)](_0x567f1e))throw CliErrors[_0x34df8d(0x1ea)](_0x34df8d(0x1c1)+_0x567f1e);return _0x53de97[_0x34df8d(0x1e7)]===_0x34df8d(0x1ec)?_0x567f1e:_0x53de97[_0x34df8d(0x1d5)]+'--'+_0x567f1e;}function runtimeSkillCodeFromLink(_0x3bceb1,_0x189d39){const _0x516106=a111_0x4b2fee,_0x56fb80=basename(_0x189d39);return _0x3bceb1[_0x516106(0x1e7)]==='project'?_0x56fb80:_0x56fb80[_0x516106(0x1d3)]((_0x3bceb1[_0x516106(0x1d5)]+'--')[_0x516106(0x1f1)]);}function a111_0x3040(_0x17f30b,_0x15a853){_0x17f30b=_0x17f30b-0x1bd;const _0x474b84=a111_0x474b();let _0x3040ba=_0x474b84[_0x17f30b];return _0x3040ba;}export function copyManagedSkillDirectory(_0x437ed3,_0x249bd8){const _0x5d8367=a111_0x4b2fee,_0xae593f=resolve(_0x249bd8,METADATA_FILE),_0x38f6af=existsSync(_0x249bd8);if(_0x38f6af){const _0x12e77d=lstatSync(_0x249bd8);if(_0x12e77d[_0x5d8367(0x1de)]())throw CliErrors[_0x5d8367(0x1ea)](_0x5d8367(0x1f0)+_0x249bd8);if(!_0x12e77d['isDirectory']())throw CliErrors[_0x5d8367(0x1ea)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x249bd8);const _0x26a2c2=readMetadataIfPresent(_0xae593f);if(_0x26a2c2?.[_0x5d8367(0x1e7)]!==_0x5d8367(0x1cb))throw CliErrors[_0x5d8367(0x1ea)](_0x5d8367(0x1eb)+_0x249bd8);}ensureDirSync(dirname(_0x249bd8));const _0x4db899=_0x38f6af?readMetadataIfPresent(_0xae593f)?.[_0x5d8367(0x1ef)]:undefined,_0x102dc6=readMetadataIfPresent(resolve(_0x437ed3,METADATA_FILE))?.[_0x5d8367(0x1ef)];return _0x38f6af&&removeSync(_0x249bd8),copySkillDirectory(_0x437ed3,_0x249bd8),{'path':_0x249bd8,'target':_0x437ed3,'action':!_0x38f6af?_0x5d8367(0x1e1):_0x4db899===_0x102dc6?'unchanged':_0x5d8367(0x1ee)};}function copySkillDirectory(_0x1394d4,_0x248a14){copySync(_0x1394d4,_0x248a14,{'dereference':![],'overwrite':!![],'filter'(_0x258b81){const _0x16e3ba=a111_0x3040;if(lstatSync(_0x258b81)[_0x16e3ba(0x1de)]())throw CliErrors[_0x16e3ba(0x1ea)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x258b81);return!![];}});}
|
|
1
|
+
const a111_0x4ef7e3=a111_0x311e;(function(_0x53bcce,_0x2ae1bb){const _0x12635e=a111_0x311e,_0x5d09ce=_0x53bcce();while(!![]){try{const _0x2310e0=parseInt(_0x12635e(0x11b))/0x1+parseInt(_0x12635e(0x110))/0x2*(-parseInt(_0x12635e(0x146))/0x3)+parseInt(_0x12635e(0x12a))/0x4*(parseInt(_0x12635e(0x11f))/0x5)+-parseInt(_0x12635e(0x139))/0x6+-parseInt(_0x12635e(0x10e))/0x7*(-parseInt(_0x12635e(0x116))/0x8)+-parseInt(_0x12635e(0x127))/0x9*(parseInt(_0x12635e(0x117))/0xa)+parseInt(_0x12635e(0x13a))/0xb;if(_0x2310e0===_0x2ae1bb)break;else _0x5d09ce['push'](_0x5d09ce['shift']());}catch(_0x18cc1c){_0x5d09ce['push'](_0x5d09ce['shift']());}}}(a111_0x3f1b,0x24cbe));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a111_0x45d3f0 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';function a111_0x311e(_0x4e7588,_0x2f4a89){_0x4e7588=_0x4e7588-0x10c;const _0x3f1bf5=a111_0x3f1b();let _0x311e19=_0x3f1bf5[_0x4e7588];return _0x311e19;}const {copySync,ensureDirSync,removeSync}=a111_0x45d3f0,RESERVED_PROJECT_SKILL_CODES=new Set([a111_0x4ef7e3(0x144),a111_0x4ef7e3(0x145),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x5a7d86,_0x1f1f13){const _0x3a8d4c=a111_0x4ef7e3,_0x2a7034=new Map();for(const _0x9468e8 of _0x5a7d86){const _0x5a1496=_0x9468e8['skill'][_0x3a8d4c(0x11e)];if(!_0x5a1496)continue;const _0x2ca0bc=_0x2a7034[_0x3a8d4c(0x120)](_0x5a1496);(!_0x2ca0bc||_0x9468e8['scope']==='personal')&&_0x2a7034[_0x3a8d4c(0x129)](_0x5a1496,_0x9468e8);}const _0x4351b4=[];for(const _0x429492 of _0x2a7034['values']()){const _0x36ef89=requireSkillCode(_0x429492[_0x3a8d4c(0x131)]),_0x2a7e34=readMetadataIfPresent(_0x429492['metadataPath']);if(_0x2a7e34?.[_0x3a8d4c(0x13c)]!==_0x1f1f13[_0x3a8d4c(0x13c)]||_0x2a7e34['skillCode']!==_0x36ef89)throw CliErrors['validation'](_0x3a8d4c(0x11d)+_0x1f1f13[_0x3a8d4c(0x13c)]+':\x20'+_0x429492[_0x3a8d4c(0x121)]);const _0x2ce2e5=runtimeSkillLinkName(_0x1f1f13,_0x36ef89);for(const _0x21987c of _0x1f1f13[_0x3a8d4c(0x149)]){_0x4351b4['push'](ensureManagedSymlink(resolve(_0x21987c,_0x2ce2e5),_0x429492[_0x3a8d4c(0x14b)],_0x1f1f13,_0x36ef89));}}return _0x4351b4;}export function pruneStaleRuntimeSkillLinks(_0xc14f8a,_0xd6b08c,_0x4fac51){const _0x994788=a111_0x4ef7e3,_0x2fa759=new Set([..._0xd6b08c][_0x994788(0x111)](_0x1a2db6=>_0x1a2db6[_0x994788(0x10c)]())['filter'](Boolean)),_0x343d1a=_0x4fac51?new Set([..._0x4fac51][_0x994788(0x111)](_0x19c687=>_0x19c687[_0x994788(0x10c)]())['filter'](Boolean)):undefined,_0x9e7a36=[];for(const _0x2abfef of _0xc14f8a['skillRoots']){for(const _0x527e65 of managedTargetSkillLinkPaths(_0x2abfef,_0xc14f8a)){const _0x2b3017=runtimeSkillCodeFromLink(_0xc14f8a,_0x527e65);if(_0x343d1a&&!_0x343d1a[_0x994788(0x113)](_0x2b3017))continue;if(_0x2fa759['has'](_0x2b3017))continue;_0x9e7a36[_0x994788(0x142)](removeManagedSkillLink(_0x527e65,_0xc14f8a,_0x2b3017));}}return _0x9e7a36;}export function pruneStaleRuntimeSkillCache(_0x79a07d,_0x348f1a={}){const _0x32d92c=a111_0x4ef7e3,_0x27a803=new Set([..._0x79a07d[_0x32d92c(0x126)]][_0x32d92c(0x111)](_0x2ffab9=>_0x2ffab9[_0x32d92c(0x10c)]())['filter'](Boolean)),_0xb89967=_0x79a07d[_0x32d92c(0x125)]?new Set([..._0x79a07d[_0x32d92c(0x125)]][_0x32d92c(0x111)](_0x5dd440=>_0x5dd440[_0x32d92c(0x10c)]())[_0x32d92c(0x13f)](Boolean)):undefined,_0x162076=_0x79a07d[_0x32d92c(0x118)]??[_0x32d92c(0x135),'company'],_0x380175=resolve(getRuntimeSkillCacheRoot(_0x79a07d[_0x32d92c(0x148)],_0x79a07d['accessKey'],_0x348f1a),safePathSegment(_0x79a07d['appCode'],_0x32d92c(0x13c))),_0x4860e1=[];for(const _0x13e4fb of _0x162076){const _0x2cebe1=resolve(_0x380175,_0x13e4fb);if(!existsSync(_0x2cebe1))continue;for(const _0x160f4d of readdirSync(_0x2cebe1,{'withFileTypes':!![]})){if(!_0x160f4d[_0x32d92c(0x10f)]())continue;const _0x321743=_0x160f4d['name'];if(_0xb89967&&!_0xb89967[_0x32d92c(0x113)](_0x321743))continue;if(_0x27a803[_0x32d92c(0x113)](_0x321743))continue;const _0x3aee34=resolve(_0x2cebe1,_0x321743),_0x3dfc7e=readMetadataIfPresent(resolve(_0x3aee34,METADATA_FILE));if(_0x3dfc7e?.[_0x32d92c(0x13c)]!==_0x79a07d[_0x32d92c(0x13c)]||_0x3dfc7e[_0x32d92c(0x124)]!==_0x13e4fb||_0x3dfc7e['skillCode']!==_0x321743){_0x4860e1[_0x32d92c(0x142)]({'path':_0x3aee34,'action':_0x32d92c(0x12b),'reason':_0x32d92c(0x11a)});continue;}if(isLinkedFromAnyRoot(_0x3aee34,_0x79a07d[_0x32d92c(0x137)]??[])){_0x4860e1[_0x32d92c(0x142)]({'path':_0x3aee34,'action':_0x32d92c(0x12b),'reason':_0x32d92c(0x13d)});continue;}removeSync(_0x3aee34),_0x4860e1[_0x32d92c(0x142)]({'path':_0x3aee34,'action':_0x32d92c(0x141)});}}return _0x4860e1;}export function linkGlobalRuntimeSkills(_0x1f5f88,_0x5b5e9f={}){const _0x52a389=a111_0x4ef7e3,_0x1df583=resolveSkillSyncPaths(_0x5b5e9f),_0x2b30fc=[];for(const _0x5aa613 of _0x1f5f88){if(_0x5aa613[_0x52a389(0x124)]!==_0x52a389(0x130))throw CliErrors[_0x52a389(0x114)](_0x52a389(0x12f)+_0x5aa613['scope']);const _0xebf498=requireSkillCode(_0x5aa613[_0x52a389(0x131)]),_0xc7a820=copyManagedSkillDirectory(_0x5aa613[_0x52a389(0x14b)],resolve(_0x1df583[_0x52a389(0x136)],_0xebf498));_0x2b30fc['push']({..._0xc7a820,'contentHash':_0x5aa613[_0x52a389(0x119)]});}return _0x2b30fc;}function ensureManagedSymlink(_0x215a8b,_0x1c794b,_0x26057f,_0x3527fc){const _0x2f1194=a111_0x4ef7e3;mkdirSync(dirname(_0x215a8b),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x215a8b)||isDanglingSymlink(_0x215a8b)){const _0x3c3b5d=lstatSync(_0x215a8b);if(!_0x3c3b5d['isSymbolicLink']())throw CliErrors[_0x2f1194(0x114)](_0x2f1194(0x138)+_0x215a8b);const _0x620aa=resolveSymlinkTarget(_0x215a8b);if(!isPathInside(realOrResolved(_0x620aa),realOrResolved(_0x26057f[_0x2f1194(0x12d)])))throw CliErrors['validation'](_0x2f1194(0x122)+_0x215a8b);if(realOrResolved(_0x620aa)===realOrResolved(_0x1c794b))return{'path':_0x215a8b,'target':_0x1c794b,'action':'unchanged'};const _0x4ae89c=readMetadataIfPresent(resolve(_0x620aa,METADATA_FILE));if(_0x26057f['scope']===_0x2f1194(0x134)&&(_0x4ae89c?.[_0x2f1194(0x13c)]!==_0x26057f[_0x2f1194(0x13c)]||_0x4ae89c[_0x2f1194(0x11e)]!==_0x3527fc))throw CliErrors['validation'](_0x2f1194(0x115)+_0x215a8b);return unlinkSync(_0x215a8b),symlinkSync(_0x1c794b,_0x215a8b,'dir'),{'path':_0x215a8b,'target':_0x1c794b,'action':_0x2f1194(0x123)};}return symlinkSync(_0x1c794b,_0x215a8b,_0x2f1194(0x14b)),{'path':_0x215a8b,'target':_0x1c794b,'action':_0x2f1194(0x13b)};}function a111_0x3f1b(){const _0x58c42f=['updated','scope','pruneSkillCodes','activeSkillCodes','18uIHzaf','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','set','36184XrTpDj','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','managedRoot','not-managed-symlink','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','builtin','skill','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','external-symlink','project','personal','agentsSkillsDir','protectedLinkRoots','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','568440hDvOqg','4877004CxAVxv','created','appCode','linked-from-protected-root','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','filter','name','removed','push','length','lovrabet','runtime-observe','3OljNBW','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','env','skillRoots','slice','dir','trim','startsWith','33089uNAAai','isDirectory','460802iQcPPk','map','isSymbolicLink','has','validation','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','232kviwOU','1409020adeiHY','scopes','contentHash','metadata-mismatch','32480RwtzYT','unchanged','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','skillCode','80uPMMhD','get','metadataPath','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'];a111_0x3f1b=function(){return _0x58c42f;};return a111_0x3f1b();}function managedTargetSkillLinkPaths(_0x5c8933,_0x4b528a){const _0x5b0ff6=a111_0x4ef7e3;if(!existsSync(_0x5c8933))return[];const _0x5aad49=_0x4b528a['appCode']+'--';return readdirSync(_0x5c8933,{'withFileTypes':!![]})[_0x5b0ff6(0x13f)](_0x2cceb2=>_0x4b528a[_0x5b0ff6(0x124)]===_0x5b0ff6(0x134)||_0x2cceb2[_0x5b0ff6(0x140)][_0x5b0ff6(0x10d)](_0x5aad49))['map'](_0x3ac82c=>resolve(_0x5c8933,_0x3ac82c[_0x5b0ff6(0x140)]));}function removeManagedSkillLink(_0xadac75,_0x56787f,_0xb5526){const _0x50dbd2=a111_0x4ef7e3,_0x465960=lstatIfPresent(_0xadac75);if(!_0x465960?.[_0x50dbd2(0x112)]())return{'path':_0xadac75,'action':_0x50dbd2(0x12b),'reason':_0x50dbd2(0x12e)};const _0x3262dd=resolveSymlinkTarget(_0xadac75);if(!isPathInside(realOrResolved(_0x3262dd),realOrResolved(_0x56787f[_0x50dbd2(0x12d)])))return{'path':_0xadac75,'action':_0x50dbd2(0x12b),'reason':_0x50dbd2(0x133)};const _0x18fd26=readMetadataIfPresent(resolve(_0x3262dd,METADATA_FILE));if(_0x56787f[_0x50dbd2(0x124)]===_0x50dbd2(0x134)&&(_0x18fd26?.[_0x50dbd2(0x13c)]!==_0x56787f[_0x50dbd2(0x13c)]||_0x18fd26['skillCode']!==_0xb5526))return{'path':_0xadac75,'action':_0x50dbd2(0x12b),'reason':_0x50dbd2(0x11a)};return unlinkSync(_0xadac75),{'path':_0xadac75,'action':'removed'};}function isLinkedFromAnyRoot(_0x382151,_0x36f5d5){const _0x1bdf1a=a111_0x4ef7e3,_0x274920=realOrResolved(_0x382151);for(const _0x4333a5 of _0x36f5d5){if(!existsSync(_0x4333a5))continue;for(const _0x192588 of readdirSync(_0x4333a5,{'withFileTypes':!![]})){if(!_0x192588[_0x1bdf1a(0x112)]())continue;const _0x42857c=resolve(_0x4333a5,_0x192588[_0x1bdf1a(0x140)]);if(realOrResolved(resolveSymlinkTarget(_0x42857c))===_0x274920)return!![];}}return![];}function runtimeSkillLinkName(_0x379c16,_0x1b2579){const _0x3b04bf=a111_0x4ef7e3,_0x585986=safePathSegment(_0x1b2579,_0x3b04bf(0x11e));if(_0x379c16[_0x3b04bf(0x124)]===_0x3b04bf(0x134)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x585986))throw CliErrors['validation'](_0x3b04bf(0x132)+_0x585986);return _0x379c16[_0x3b04bf(0x124)]===_0x3b04bf(0x134)?_0x585986:_0x379c16[_0x3b04bf(0x13c)]+'--'+_0x585986;}function runtimeSkillCodeFromLink(_0xeca8be,_0xa057bf){const _0xb5242a=a111_0x4ef7e3,_0xaa2a15=basename(_0xa057bf);return _0xeca8be['scope']===_0xb5242a(0x134)?_0xaa2a15:_0xaa2a15[_0xb5242a(0x14a)]((_0xeca8be['appCode']+'--')[_0xb5242a(0x143)]);}export function copyManagedSkillDirectory(_0x4fd3f8,_0x369d96){const _0x32e8e0=a111_0x4ef7e3,_0x5a4ed0=resolve(_0x369d96,METADATA_FILE),_0x26f4eb=existsSync(_0x369d96);if(_0x26f4eb){const _0x4247c0=lstatSync(_0x369d96);if(_0x4247c0[_0x32e8e0(0x112)]())throw CliErrors[_0x32e8e0(0x114)](_0x32e8e0(0x128)+_0x369d96);if(!_0x4247c0[_0x32e8e0(0x10f)]())throw CliErrors['validation'](_0x32e8e0(0x13e)+_0x369d96);const _0x573877=readMetadataIfPresent(_0x5a4ed0);if(_0x573877?.[_0x32e8e0(0x124)]!==_0x32e8e0(0x130))throw CliErrors[_0x32e8e0(0x114)](_0x32e8e0(0x12c)+_0x369d96);}ensureDirSync(dirname(_0x369d96));const _0x410754=_0x26f4eb?readMetadataIfPresent(_0x5a4ed0)?.['contentHash']:undefined,_0x56c5c3=readMetadataIfPresent(resolve(_0x4fd3f8,METADATA_FILE))?.[_0x32e8e0(0x119)];return _0x26f4eb&&removeSync(_0x369d96),copySkillDirectory(_0x4fd3f8,_0x369d96),{'path':_0x369d96,'target':_0x4fd3f8,'action':!_0x26f4eb?_0x32e8e0(0x13b):_0x410754===_0x56c5c3?_0x32e8e0(0x11c):_0x32e8e0(0x123)};}function copySkillDirectory(_0x5db7b2,_0x1cda64){copySync(_0x5db7b2,_0x1cda64,{'dereference':![],'overwrite':!![],'filter'(_0x298dc4){const _0x1a34e3=a111_0x311e;if(lstatSync(_0x298dc4)[_0x1a34e3(0x112)]())throw CliErrors['validation'](_0x1a34e3(0x147)+_0x298dc4);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x443c72,_0x2d5713){const _0x4f0ab5=a112_0x5df0,_0x5c9007=_0x443c72();while(!![]){try{const _0x590ef5=-parseInt(_0x4f0ab5(0x139))/0x1*(-parseInt(_0x4f0ab5(0x11e))/0x2)+parseInt(_0x4f0ab5(0x112))/0x3+-parseInt(_0x4f0ab5(0x11a))/0x4*(-parseInt(_0x4f0ab5(0x116))/0x5)+parseInt(_0x4f0ab5(0x129))/0x6*(-parseInt(_0x4f0ab5(0x128))/0x7)+parseInt(_0x4f0ab5(0x12c))/0x8+-parseInt(_0x4f0ab5(0x11c))/0x9+parseInt(_0x4f0ab5(0x127))/0xa;if(_0x590ef5===_0x2d5713)break;else _0x5c9007['push'](_0x5c9007['shift']());}catch(_0x3013d4){_0x5c9007['push'](_0x5c9007['shift']());}}}(a112_0x31ee,0x2e937));function a112_0x5df0(_0x5bccf7,_0xf43273){_0x5bccf7=_0x5bccf7-0x10d;const _0x31ee42=a112_0x31ee();let _0x5df00f=_0x31ee42[_0x5bccf7];return _0x5df00f;}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x18ab20,_0x1de857,_0x59c771={}){const _0x5858bd=a112_0x5df0,_0x304bec=safePathSegment(_0x18ab20[_0x5858bd(0x130)],_0x5858bd(0x130));if(_0x1de857[_0x5858bd(0x130)]!==_0x304bec)throw CliErrors[_0x5858bd(0x12e)]('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x1de857[_0x5858bd(0x130)]+'\x20!=\x20'+_0x304bec);const _0x3f4dbe=normalizeRuntimeSkillScopes(_0x18ab20['scopes']),_0x5e876a=new Set(_0x3f4dbe),_0x4ef3eb=_0x18ab20['code']?.[_0x5858bd(0x119)](),_0x172f55=new Map(),_0x45c693=resolve(getRuntimeSkillCacheRoot(_0x18ab20[_0x5858bd(0x124)],_0x18ab20['accessKey'],_0x59c771),_0x304bec);for(const _0x447f17 of _0x3f4dbe){for(const _0x1f92b4 of localSkillEntryDirs(resolve(_0x45c693,_0x447f17))){collectLocalRuntimeSkill(_0x172f55,_0x1f92b4,{'appCode':_0x304bec,'scopes':_0x5e876a,'code':_0x4ef3eb,'source':'cache'});}}for(const _0xf283ec of _0x1de857[_0x5858bd(0x136)]){for(const _0x27dadb of localSkillLinkCandidates(_0xf283ec,_0x1de857,_0x5e876a)){collectLocalRuntimeSkill(_0x172f55,_0x27dadb,{'appCode':_0x304bec,'scopes':_0x5e876a,'code':_0x4ef3eb,'source':'link','linkedPath':_0x27dadb});}}return Array[_0x5858bd(0x115)](_0x172f55[_0x5858bd(0x118)]())[_0x5858bd(0x134)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x25a8f4){const _0x5f5b53=a112_0x5df0;if(!existsSync(_0x25a8f4))return[];return readdirSync(_0x25a8f4,{'withFileTypes':!![]})[_0x5f5b53(0x12d)](_0x36d531=>_0x36d531['isDirectory']()||_0x36d531['isSymbolicLink']())[_0x5f5b53(0x131)](_0x5b5fa0=>resolve(_0x25a8f4,_0x5b5fa0[_0x5f5b53(0x122)]));}function a112_0x31ee(){const _0x55b094=['trim','39092bfZuLD','isDirectory','2818314YSuwxj','local','110566kotClr','project','linkedPaths','skillMdPath','name','scopes','env','cache','code','611830daWJru','74669sEnEWG','120ICOsGh','push','cacheDir','602784IrUoxT','filter','validation','set','appCode','map','linkedPath','isSymbolicLink','sort','dir','skillRoots','source','get','2Kpyqsx','scope','skillCode','has','tags','startsWith','1117302XpLxwr','metadataPath','includes','from','50qiOksR','isArray','values'];a112_0x31ee=function(){return _0x55b094;};return a112_0x31ee();}function localSkillLinkCandidates(_0x5b83d0,_0x58d5a3,_0x1ba748){const _0x59ae16=a112_0x5df0;if(!existsSync(_0x5b83d0))return[];const _0x3d6fd2=_0x58d5a3[_0x59ae16(0x130)]+'--';return readdirSync(_0x5b83d0,{'withFileTypes':!![]})[_0x59ae16(0x12d)](_0x2e587f=>_0x2e587f[_0x59ae16(0x11b)]()||_0x2e587f[_0x59ae16(0x133)]())[_0x59ae16(0x12d)](_0x1711f3=>_0x58d5a3[_0x59ae16(0x10d)]===_0x59ae16(0x11f)||_0x1711f3[_0x59ae16(0x122)][_0x59ae16(0x111)](_0x3d6fd2)||_0x1ba748[_0x59ae16(0x10f)]('builtin'))[_0x59ae16(0x131)](_0x4bf09f=>resolve(_0x5b83d0,_0x4bf09f[_0x59ae16(0x122)]));}function collectLocalRuntimeSkill(_0x500cdd,_0xaca0e4,_0xbe29f1){const _0x5ae4c2=a112_0x5df0,_0x50f163=resolve(_0xaca0e4,METADATA_FILE),_0x5701e3=readMetadataIfPresent(_0x50f163);if(!_0x5701e3)return;if(_0x5701e3[_0x5ae4c2(0x130)]!==_0xbe29f1[_0x5ae4c2(0x130)])return;if(!isRuntimeSkillScope(_0x5701e3[_0x5ae4c2(0x10d)])||!_0xbe29f1[_0x5ae4c2(0x123)]['has'](_0x5701e3['scope']))return;const _0x412e81=_0x5701e3[_0x5ae4c2(0x10e)]?.['trim']();if(!_0x412e81)return;if(_0xbe29f1[_0x5ae4c2(0x126)]&&_0x412e81!==_0xbe29f1[_0x5ae4c2(0x126)])return;const _0x6105d7=_0x5701e3[_0x5ae4c2(0x10d)]+':'+_0x412e81,_0x13cfa3=_0xbe29f1[_0x5ae4c2(0x132)]?[_0xbe29f1['linkedPath']]:[],_0x17b181=_0x500cdd[_0x5ae4c2(0x138)](_0x6105d7);if(_0x17b181){_0xbe29f1[_0x5ae4c2(0x137)]===_0x5ae4c2(0x125)&&(_0x17b181[_0x5ae4c2(0x135)]=_0xaca0e4,_0x17b181[_0x5ae4c2(0x12b)]=_0xaca0e4,_0x17b181[_0x5ae4c2(0x121)]=resolve(_0xaca0e4,SKILL_FILE),_0x17b181[_0x5ae4c2(0x113)]=_0x50f163);for(const _0x1fc1fd of _0x13cfa3){!_0x17b181[_0x5ae4c2(0x120)][_0x5ae4c2(0x114)](_0x1fc1fd)&&_0x17b181[_0x5ae4c2(0x120)][_0x5ae4c2(0x12a)](_0x1fc1fd);}_0x17b181['linkedPaths'][_0x5ae4c2(0x134)]();return;}_0x500cdd[_0x5ae4c2(0x12f)](_0x6105d7,{..._0x5701e3,'tags':Array[_0x5ae4c2(0x117)](_0x5701e3['tags'])?_0x5701e3[_0x5ae4c2(0x110)]:[],'scope':_0x5701e3['scope'],'source':_0x5ae4c2(0x11d),'dir':_0xaca0e4,'cacheDir':_0xbe29f1[_0x5ae4c2(0x137)]==='cache'?_0xaca0e4:undefined,'skillMdPath':resolve(_0xaca0e4,SKILL_FILE),'metadataPath':_0x50f163,'linkedPaths':_0x13cfa3});}function compareLocalRuntimeSkills(_0x54683b,_0xd8774f){const _0x5cb3ca=a112_0x5df0,_0x49a644={'personal':0x0,'company':0x1,'builtin':0x2};return _0x49a644[_0x54683b['scope']]-_0x49a644[_0xd8774f[_0x5cb3ca(0x10d)]]||_0x54683b[_0x5cb3ca(0x10e)]['localeCompare'](_0xd8774f[_0x5cb3ca(0x10e)])||_0x54683b[_0x5cb3ca(0x135)]['localeCompare'](_0xd8774f[_0x5cb3ca(0x135)]);}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { LocalSkillFile, RuntimeSkillFile } from "./types.js";
|
|
2
|
+
export interface ScanSkillDirectoryOptions {
|
|
3
|
+
excludedFilePaths?: readonly string[];
|
|
4
|
+
}
|
|
2
5
|
/** Converts a local file entry into bytes for hashing, packaging, or writes. */
|
|
3
6
|
export declare function fileContent(file: LocalSkillFile): Buffer;
|
|
4
7
|
/** Decodes a local file entry as UTF-8 text for SKILL.md and metadata logic. */
|
|
@@ -8,7 +11,7 @@ export declare function normalizeLocalFiles(files: LocalSkillFile[] | undefined)
|
|
|
8
11
|
/** Normalizes remote manifest entries and validates hash and size metadata. */
|
|
9
12
|
export declare function normalizeManifestFiles(files: RuntimeSkillFile[] | undefined): RuntimeSkillFile[];
|
|
10
13
|
/** Scans a Skill directory into normalized package entries while skipping local-only files. */
|
|
11
|
-
export declare function scanSkillDirectory(dir: string): LocalSkillFile[];
|
|
14
|
+
export declare function scanSkillDirectory(dir: string, options?: ScanSkillDirectoryOptions): LocalSkillFile[];
|
|
12
15
|
/** Sorts SKILL.md first and then keeps the remaining file paths deterministic. */
|
|
13
16
|
export declare function compareSkillFiles(a: {
|
|
14
17
|
path: string;
|