@lovrabet/lovrabet-cli 2.1.22-beta.2 → 2.1.22-beta.4
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.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.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/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.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.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/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(_0x86a11,_0xf61b7b){const _0x6e781e=a94_0x164f,_0x46f373=_0x86a11();while(!![]){try{const _0x29f069=parseInt(_0x6e781e(0x7b))/0x1*(-parseInt(_0x6e781e(0xaa))/0x2)+-parseInt(_0x6e781e(0xab))/0x3*(-parseInt(_0x6e781e(0xa8))/0x4)+-parseInt(_0x6e781e(0x9d))/0x5*(parseInt(_0x6e781e(0xa9))/0x6)+parseInt(_0x6e781e(0x9b))/0x7*(parseInt(_0x6e781e(0xad))/0x8)+parseInt(_0x6e781e(0x8d))/0x9*(parseInt(_0x6e781e(0x7a))/0xa)+-parseInt(_0x6e781e(0x89))/0xb+parseInt(_0x6e781e(0x98))/0xc;if(_0x29f069===_0xf61b7b)break;else _0x46f373['push'](_0x46f373['shift']());}catch(_0x303d81){_0x46f373['push'](_0x46f373['shift']());}}}(a94_0x2550,0xd8b46));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(_0x44cfdb){const _0x185b69=a94_0x164f;return void _0x44cfdb,AUTH_MODE[_0x185b69(0x84)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x5c9a6e,_0x4e2a64){const _0xa67345=a94_0x164f,_0x188786=typeof _0x4e2a64['app']==='string'&&_0x4e2a64[_0xa67345(0xa2)][_0xa67345(0x91)]();return{'rawFlags':_0x4e2a64,'appCode':_0x5c9a6e[_0xa67345(0x8e)]||productEnv(_0xa67345(0x90))||(_0x188786?undefined:readAppCodeFromConfig()),'appCodeSource':_0x5c9a6e['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x4e2a64),'defaultFormat':_0x5c9a6e[_0xa67345(0xaf)],'defaultPageSize':_0x5c9a6e[_0xa67345(0x87)],'defaultVerbose':_0x5c9a6e['verbose'],'riskLevel':_0x5c9a6e[_0xa67345(0x80)],'accessKey':_0x5c9a6e[_0xa67345(0x8c)],'env':_0x5c9a6e[_0xa67345(0x82)],'mergedCli':{'defaultApp':_0x5c9a6e[_0xa67345(0x7f)],'currentApp':_0x5c9a6e[_0xa67345(0x97)],'appCode':_0x5c9a6e['appCode']}};}export function createLovrabetRunnerAdapter(_0x50a172={}){const _0x38668d=a94_0x164f,_0x47263f={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x1dbad3=>PIPELINE_FLAG_NAMES[_0x38668d(0x86)](_0x1dbad3[_0x38668d(0x9e)]))[_0x38668d(0x7c)](({name:_0x1e979e,type:_0x37ae5a,description:_0x23ade0})=>({'name':_0x1e979e,'type':_0x37ae5a,'description':_0x23ade0})),'formatOutput':_0x50a172[_0x38668d(0xa3)]??formatOutput,'getCommandLabel'(_0x578a21){const _0x359fd0=_0x38668d;return CLI_BIN_NAME+'\x20'+_0x578a21[_0x359fd0(0x93)]+'\x20'+_0x578a21[_0x359fd0(0x6e)];},'riskPolicy':{'onViolation'(_0x9fe36f){const _0x384657=_0x38668d;console[_0x384657(0x99)](_0x9fe36f);},'createError'(_0x1586cd){return CliErrors['cancelled'](_0x1586cd);}},async 'prepare'(_0x7c3154,_0xd912f0){const _0x2eda54=_0x38668d,_0x330948=resolveAuthMode(_0xd912f0);if(_0x7c3154[_0x2eda54(0x7e)]!==![]){if(!_0xd912f0[_0x2eda54(0x8c)])throw CliErrors[_0x2eda54(0x79)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x2eda54(0x78)]+_0x2eda54(0x92)+productEnvName(_0x2eda54(0x75))+'.');const {setActiveAK:_0x261ec9}=await import('../core/api-client.js');_0x261ec9(_0xd912f0[_0x2eda54(0x8c)]);}let _0x51a015='';if(_0x7c3154[_0x2eda54(0xac)]!==![]){_0x51a015=_0xd912f0[_0x2eda54(0x8e)]??'',_0x51a015=await resolveExplicitAppName(_0x7c3154,_0xd912f0,_0x51a015);if(!_0x51a015){await assertSelectedAppNameIsRuntimeAccessible(_0x7c3154,_0xd912f0);throw CliErrors[_0x2eda54(0x8a)](_0x2eda54(0x85)+PRODUCT_CONFIG[_0x2eda54(0x78)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x7c3154,_0xd912f0,_0x51a015);}if(_0x51a015){const {initSdkClient:_0x2158b1}=await import(_0x2eda54(0x72));_0x2158b1({'appCode':_0x51a015,'env':_0xd912f0[_0x2eda54(0x82)]??'production','accessKey':_0xd912f0['accessKey'],'authMode':_0x330948}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0xd912f0[_0x2eda54(0x8f)]},'numbers':{'pagesize':_0xd912f0['defaultPageSize']}},'extras':{'appCode':_0x51a015,'cookie':'','apiDomain':_0xd912f0['apiDomain'],'apiDir':'','accessKey':_0xd912f0[_0x2eda54(0x8c)],'envName':_0xd912f0[_0x2eda54(0x82)],'mergedCli':_0xd912f0[_0x2eda54(0xa5)]}};},'confirmHighRisk':_0x50a172[_0x38668d(0x6d)]??(async({def:_0x3bab96,env:_0x5a4e4b,flags:_0x5cd61f,commandLabel:_0x5b72ae})=>{const _0x57dde7=_0x38668d;if(_0x5a4e4b[_0x57dde7(0xa6)]){const _0x29ad2e=reconstructCommandArgv(_0x3bab96,_0x5cd61f);throw CliErrors[_0x57dde7(0x96)]('High-risk\x20operation\x20`'+_0x5b72ae+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x57dde7(0x6c)+_0x29ad2e));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x3bab96,_0x5b72ae,_0x5cd61f),'createCancelledError':_0x181c61=>CliErrors['cancelled'](_0x181c61)});}),'mapDryRunError'(_0x22f08b){return mapUserFacingExecuteError(_0x22f08b);},'mapExecuteError'(_0x2946b8){return mapUserFacingExecuteError(_0x2946b8);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x47263f;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x1b3870=a94_0x164f;try{if(sdkClientInitialized){const {clearSdkClient:_0x32d74b}=await import(_0x1b3870(0x72));_0x32d74b();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x309960}=await import(_0x1b3870(0x83));_0x309960();}}async function resolveExplicitAppName(_0xb3d645,_0x13a7d4,_0x321044){const _0x450022=a94_0x164f;if(_0xb3d645[_0x450022(0xac)]===![])return _0x321044;const _0x5f3232=typeof _0x13a7d4[_0x450022(0xa1)][_0x450022(0xa2)]===_0x450022(0xa4)?_0x13a7d4[_0x450022(0xa1)][_0x450022(0xa2)]['trim']():'';if(!_0x5f3232)return _0x321044;const _0xeb0aec=typeof _0x13a7d4[_0x450022(0xa1)]['appcode']===_0x450022(0xa4)&&_0x13a7d4['rawFlags'][_0x450022(0x7d)]['trim']()||productEnv(_0x450022(0x90));if(_0xeb0aec||_0x13a7d4[_0x450022(0xae)]==='local-alias')return _0x321044;const {getRemoteAppList:_0x3cf505}=await import(_0x450022(0x76)),_0x1858e5=await _0x3cf505({'env':_0x13a7d4['env']??_0x450022(0x70),'accessKey':_0x13a7d4['accessKey']}),_0x5d2826=findAppByName(_0x1858e5['items'],_0x5f3232);if(_0x5d2826&&!isRuntimeAccessibleApp(_0x5d2826))throw runtimeInaccessibleAppError(_0x5d2826,'\x22'+_0x5f3232+'\x22');const _0x11a45f=_0x5d2826?.[_0x450022(0x8e)]?.[_0x450022(0x91)]();if(_0x11a45f)return _0x11a45f;throw CliErrors[_0x450022(0x96)](_0x450022(0x73)+_0x5f3232,_0x450022(0x94)+CLI_BIN_NAME+_0x450022(0xa7)+_0x5f3232+_0x450022(0x71)+PRODUCT_CONFIG[_0x450022(0x78)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x303917,_0x4ab5b1){const _0x20d4b0=a94_0x164f;if(_0x303917[_0x20d4b0(0xac)]===![]||!_0x4ab5b1[_0x20d4b0(0x8c)])return;const _0x34b1a5=(typeof _0x4ab5b1[_0x20d4b0(0xa1)][_0x20d4b0(0xa2)]===_0x20d4b0(0xa4)&&_0x4ab5b1[_0x20d4b0(0xa1)][_0x20d4b0(0xa2)][_0x20d4b0(0x91)]()?_0x4ab5b1[_0x20d4b0(0xa1)]['app']:_0x4ab5b1['mergedCli']?.[_0x20d4b0(0x97)]??_0x4ab5b1['mergedCli']?.[_0x20d4b0(0x7f)])?.[_0x20d4b0(0x91)]();if(!_0x34b1a5)return;const {getRemoteAppList:_0x1092bd}=await import('../commands/app/remote-source.js'),_0x2ae6ca=await _0x1092bd({'env':_0x4ab5b1['env']??_0x20d4b0(0x70),'accessKey':_0x4ab5b1[_0x20d4b0(0x8c)]}),_0x3ec863=findAppByName(_0x2ae6ca[_0x20d4b0(0x9c)],_0x34b1a5);if(_0x3ec863&&!isRuntimeAccessibleApp(_0x3ec863))throw runtimeInaccessibleAppError(_0x3ec863,'\x22'+_0x34b1a5+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1b1b75,_0x14738f,_0x242e40){const _0x3a2002=a94_0x164f;if(_0x1b1b75[_0x3a2002(0xac)]===![]||!_0x14738f[_0x3a2002(0x8c)])return;const {getRemoteAppList:_0x11fe38}=await import(_0x3a2002(0x76)),_0xf44d3a=await _0x11fe38({'env':_0x14738f[_0x3a2002(0x82)]??_0x3a2002(0x70),'accessKey':_0x14738f[_0x3a2002(0x8c)]}),_0x4a2d2f=findAppByCode(_0xf44d3a[_0x3a2002(0x9c)],_0x242e40);if(_0x4a2d2f&&!isRuntimeAccessibleApp(_0x4a2d2f))throw runtimeInaccessibleAppError(_0x4a2d2f,_0x3a2002(0x77)+_0x242e40+'\x22');}function a94_0x2550(){const _0x32d4bb=['has','pageSize','doctor','5495919viGuDL','configMissing','includes','accessKey','3987zDfujv','appCode','defaultVerbose','APPCODE','trim','\x20or\x20pass\x20','service','Run\x20`','schema','validation','currentApp','680412HZwmYb','error','resolve','42UgwdZn','items','49840XDMtCv','name','_notice','execute','rawFlags','app','formatOutput','string','mergedCli','isNonInteractive','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','4096psQxHK','264jKCRfr','570344FVEvWo','1149LcFTaK','requiresAppCode','1522720DZoXQg','appCodeSource','format','\x20\x20To\x20proceed:\x20','confirmHighRisk','command','catch','production','.appcode\x20to\x20','../core/sdk-client.js','Unknown\x20app:\x20','pretty','ACCESS_KEY','../commands/app/remote-source.js','appcode\x20\x22','newConfigFileName','authRequired','11740NNYPFZ','1bbMXBx','map','appcode','requiresAuth','defaultApp','riskLevel','update','env','../core/api-client.js','ClientAk','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'];a94_0x2550=function(){return _0x32d4bb;};return a94_0x2550();}function a94_0x164f(_0x578dcb,_0x15969b){_0x578dcb=_0x578dcb-0x6c;const _0x2550d1=a94_0x2550();let _0x164f76=_0x2550d1[_0x578dcb];return _0x164f76;}export async function runCommand(_0x4c6e3e,_0x569a50,_0x245195=terminalRunnerAdapter){const _0x56e1f9=a94_0x164f;assertKnownCommandFlags(_0x4c6e3e,_0x569a50[_0x56e1f9(0xa1)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x4c6e3e)?withUpdateNotice(_0x4c6e3e):_0x4c6e3e,_0x569a50,_0x245195);}function shouldAttachUpdateNotice(_0x37a9c3){const _0x4b3588=a94_0x164f;return![_0x4b3588(0x81),_0x4b3588(0x95),_0x4b3588(0x88)][_0x4b3588(0x8b)](_0x37a9c3[_0x4b3588(0x93)]);}function withUpdateNotice(_0x40facd){return{..._0x40facd,async 'execute'(_0x544f18){const _0x566d1e=a94_0x164f,_0x4de679=shouldResolveUpdateNotice(_0x544f18)?resolveLatestUpdateNotice()[_0x566d1e(0x6f)](()=>null):Promise[_0x566d1e(0x9a)](null),_0x2b1d96=await _0x40facd[_0x566d1e(0xa0)](_0x544f18);return attachUpdateNotice(_0x2b1d96,await _0x4de679);}};}function shouldResolveUpdateNotice(_0x10d58a){const _0x472b2e=a94_0x164f;return _0x10d58a[_0x472b2e(0xaf)]===_0x472b2e(0x74)&&!_0x10d58a['nonInteractive'];}function attachUpdateNotice(_0x420164,_0x286c22){const _0x5cd8c2=a94_0x164f;if(!_0x286c22||!_0x420164||typeof _0x420164!=='object')return _0x420164;const _0x5449ef=_0x420164,_0x27e6f9=typeof _0x5449ef[_0x5cd8c2(0x9f)]==='object'&&_0x5449ef[_0x5cd8c2(0x9f)]!==null?_0x5449ef[_0x5cd8c2(0x9f)]:{};return{..._0x5449ef,'_notice':{..._0x27e6f9,'update':_0x286c22}};}
|
|
1
|
+
(function(_0x16ff8c,_0x2d3499){const _0x27375a=a94_0x415f,_0x92a792=_0x16ff8c();while(!![]){try{const _0x4e3b10=-parseInt(_0x27375a(0x1c0))/0x1+-parseInt(_0x27375a(0x198))/0x2*(-parseInt(_0x27375a(0x1af))/0x3)+parseInt(_0x27375a(0x1b6))/0x4*(parseInt(_0x27375a(0x1bb))/0x5)+-parseInt(_0x27375a(0x19e))/0x6*(parseInt(_0x27375a(0x1a0))/0x7)+-parseInt(_0x27375a(0x19a))/0x8+-parseInt(_0x27375a(0x1ca))/0x9*(-parseInt(_0x27375a(0x1c1))/0xa)+-parseInt(_0x27375a(0x1b8))/0xb*(-parseInt(_0x27375a(0x1a8))/0xc);if(_0x4e3b10===_0x2d3499)break;else _0x92a792['push'](_0x92a792['shift']());}catch(_0x54cfdc){_0x92a792['push'](_0x92a792['shift']());}}}(a94_0x1314,0xc683d));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(_0x281173){const _0x46f37d=a94_0x415f;return void _0x281173,AUTH_MODE[_0x46f37d(0x1a1)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x29099a,_0x277314){const _0x1c001e=a94_0x415f,_0x32e59b=typeof _0x277314[_0x1c001e(0x1a9)]==='string'&&_0x277314[_0x1c001e(0x1a9)][_0x1c001e(0x1cb)]();return{'rawFlags':_0x277314,'appCode':_0x29099a[_0x1c001e(0x1c5)]||productEnv(_0x1c001e(0x1cf))||(_0x32e59b?undefined:readAppCodeFromConfig()),'appCodeSource':_0x29099a[_0x1c001e(0x1b3)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x277314),'defaultFormat':_0x29099a[_0x1c001e(0x1b0)],'defaultPageSize':_0x29099a[_0x1c001e(0x1b4)],'defaultVerbose':_0x29099a[_0x1c001e(0x1c7)],'riskLevel':_0x29099a[_0x1c001e(0x197)],'accessKey':_0x29099a['accessKey'],'env':_0x29099a[_0x1c001e(0x1ab)],'mergedCli':{'defaultApp':_0x29099a['defaultApp'],'currentApp':_0x29099a[_0x1c001e(0x19b)],'appCode':_0x29099a[_0x1c001e(0x1c5)]}};}export function createLovrabetRunnerAdapter(_0x1437c7={}){const _0x2aa07c=a94_0x415f,_0xd17b56={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x2aa07c(0x1a7)](_0x1bacc6=>PIPELINE_FLAG_NAMES[_0x2aa07c(0x19d)](_0x1bacc6[_0x2aa07c(0x1b1)]))[_0x2aa07c(0x196)](({name:_0x2746f0,type:_0x12f166,description:_0x43a697})=>({'name':_0x2746f0,'type':_0x12f166,'description':_0x43a697})),'formatOutput':_0x1437c7[_0x2aa07c(0x1a5)]??formatOutput,'getCommandLabel'(_0x42ea0a){const _0xeb680c=_0x2aa07c;return CLI_BIN_NAME+'\x20'+_0x42ea0a[_0xeb680c(0x1ba)]+'\x20'+_0x42ea0a[_0xeb680c(0x1d6)];},'riskPolicy':{'onViolation'(_0x1e5981){console['error'](_0x1e5981);},'createError'(_0x5b2998){const _0x216afd=_0x2aa07c;return CliErrors[_0x216afd(0x1d7)](_0x5b2998);}},async 'prepare'(_0x250486,_0x1cabfa){const _0x13c8b2=_0x2aa07c,_0x4902cc=resolveAuthMode(_0x1cabfa);if(_0x250486['requiresAuth']!==![]){if(!_0x1cabfa[_0x13c8b2(0x1cd)])throw CliErrors[_0x13c8b2(0x1bc)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG[_0x13c8b2(0x1d2)]+_0x13c8b2(0x1d0)+productEnvName(_0x13c8b2(0x19c))+'.');const {setActiveAK:_0x1ba463}=await import(_0x13c8b2(0x1c2));_0x1ba463(_0x1cabfa[_0x13c8b2(0x1cd)]);}let _0x449a6c='';if(_0x250486['requiresAppCode']!==![]){_0x449a6c=_0x1cabfa['appCode']??'',_0x449a6c=await resolveExplicitAppName(_0x250486,_0x1cabfa,_0x449a6c);if(!_0x449a6c){await assertSelectedAppNameIsRuntimeAccessible(_0x250486,_0x1cabfa);throw CliErrors[_0x13c8b2(0x1b9)]('Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20'+PRODUCT_CONFIG[_0x13c8b2(0x1d2)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x250486,_0x1cabfa,_0x449a6c);}if(_0x449a6c){const {initSdkClient:_0x46eda9}=await import(_0x13c8b2(0x1bd));_0x46eda9({'appCode':_0x449a6c,'env':_0x1cabfa[_0x13c8b2(0x1ab)]??'production','accessKey':_0x1cabfa['accessKey'],'authMode':_0x4902cc}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x1cabfa[_0x13c8b2(0x1c3)]},'numbers':{'pagesize':_0x1cabfa[_0x13c8b2(0x1c8)]}},'extras':{'appCode':_0x449a6c,'cookie':'','apiDomain':_0x1cabfa['apiDomain'],'apiDir':'','accessKey':_0x1cabfa[_0x13c8b2(0x1cd)],'envName':_0x1cabfa['env'],'mergedCli':_0x1cabfa['mergedCli']}};},'confirmHighRisk':_0x1437c7[_0x2aa07c(0x1a3)]??(async({def:_0x54ffca,env:_0x17d48b,flags:_0x1ad1c0,commandLabel:_0xff81e9})=>{const _0x1ae00c=_0x2aa07c;if(_0x17d48b['isNonInteractive']){const _0x29a8de=reconstructCommandArgv(_0x54ffca,_0x1ad1c0);throw CliErrors['validation'](_0x1ae00c(0x19f)+_0xff81e9+_0x1ae00c(0x1d3)+('\x20\x20To\x20proceed:\x20'+_0x29a8de));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x54ffca,_0xff81e9,_0x1ad1c0),'createCancelledError':_0x32a6a2=>CliErrors['cancelled'](_0x32a6a2)});}),'mapDryRunError'(_0x2f43d0){return mapUserFacingExecuteError(_0x2f43d0);},'mapExecuteError'(_0x40fb7e){return mapUserFacingExecuteError(_0x40fb7e);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0xd17b56;}function a94_0x415f(_0x457eae,_0xe3115e){_0x457eae=_0x457eae-0x196;const _0x13145b=a94_0x1314();let _0x415f33=_0x13145b[_0x457eae];return _0x415f33;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x2c5572=a94_0x415f;try{if(sdkClientInitialized){const {clearSdkClient:_0x5ef3aa}=await import(_0x2c5572(0x1bd));_0x5ef3aa();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xf4749}=await import(_0x2c5572(0x1c2));_0xf4749();}}async function resolveExplicitAppName(_0x39fc20,_0x4f8681,_0x5d7111){const _0x3abaf9=a94_0x415f;if(_0x39fc20['requiresAppCode']===![])return _0x5d7111;const _0xca87c1=typeof _0x4f8681[_0x3abaf9(0x1ae)]['app']==='string'?_0x4f8681[_0x3abaf9(0x1ae)]['app']['trim']():'';if(!_0xca87c1)return _0x5d7111;const _0x2b8305=typeof _0x4f8681['rawFlags'][_0x3abaf9(0x1a4)]===_0x3abaf9(0x1c9)&&_0x4f8681[_0x3abaf9(0x1ae)][_0x3abaf9(0x1a4)][_0x3abaf9(0x1cb)]()||productEnv('APPCODE');if(_0x2b8305||_0x4f8681['appCodeSource']===_0x3abaf9(0x1b5))return _0x5d7111;const {getRemoteAppList:_0x45f8e2}=await import('../commands/app/remote-source.js'),_0x44e289=await _0x45f8e2({'env':_0x4f8681['env']??_0x3abaf9(0x1be),'accessKey':_0x4f8681['accessKey']}),_0x315e0f=findAppByName(_0x44e289[_0x3abaf9(0x1b7)],_0xca87c1);if(_0x315e0f&&!isRuntimeAccessibleApp(_0x315e0f))throw runtimeInaccessibleAppError(_0x315e0f,'\x22'+_0xca87c1+'\x22');const _0x92c0d6=_0x315e0f?.[_0x3abaf9(0x1c5)]?.[_0x3abaf9(0x1cb)]();if(_0x92c0d6)return _0x92c0d6;throw CliErrors['validation'](_0x3abaf9(0x1b2)+_0xca87c1,_0x3abaf9(0x1d1)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0xca87c1+_0x3abaf9(0x1c6)+PRODUCT_CONFIG[_0x3abaf9(0x1d2)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4a1dca,_0x2310db){const _0x2824db=a94_0x415f;if(_0x4a1dca[_0x2824db(0x1a2)]===![]||!_0x2310db[_0x2824db(0x1cd)])return;const _0x4c3e04=(typeof _0x2310db[_0x2824db(0x1ae)]['app']===_0x2824db(0x1c9)&&_0x2310db['rawFlags']['app'][_0x2824db(0x1cb)]()?_0x2310db[_0x2824db(0x1ae)][_0x2824db(0x1a9)]:_0x2310db[_0x2824db(0x1ce)]?.[_0x2824db(0x19b)]??_0x2310db[_0x2824db(0x1ce)]?.[_0x2824db(0x1c4)])?.[_0x2824db(0x1cb)]();if(!_0x4c3e04)return;const {getRemoteAppList:_0x3621e1}=await import(_0x2824db(0x1ad)),_0x39d8c3=await _0x3621e1({'env':_0x2310db[_0x2824db(0x1ab)]??_0x2824db(0x1be),'accessKey':_0x2310db[_0x2824db(0x1cd)]}),_0x9dd138=findAppByName(_0x39d8c3[_0x2824db(0x1b7)],_0x4c3e04);if(_0x9dd138&&!isRuntimeAccessibleApp(_0x9dd138))throw runtimeInaccessibleAppError(_0x9dd138,'\x22'+_0x4c3e04+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5af3dd,_0x3e8d7c,_0x294f9b){const _0x3779fa=a94_0x415f;if(_0x5af3dd[_0x3779fa(0x1a2)]===![]||!_0x3e8d7c[_0x3779fa(0x1cd)])return;const {getRemoteAppList:_0x5e67d9}=await import(_0x3779fa(0x1ad)),_0x51d590=await _0x5e67d9({'env':_0x3e8d7c[_0x3779fa(0x1ab)]??'production','accessKey':_0x3e8d7c[_0x3779fa(0x1cd)]}),_0xb5a447=findAppByCode(_0x51d590['items'],_0x294f9b);if(_0xb5a447&&!isRuntimeAccessibleApp(_0xb5a447))throw runtimeInaccessibleAppError(_0xb5a447,_0x3779fa(0x1ac)+_0x294f9b+'\x22');}export async function runCommand(_0x16afd1,_0x49071c,_0x1d90c3=terminalRunnerAdapter){const _0x24cfcd=a94_0x415f;assertKnownCommandFlags(_0x16afd1,_0x49071c[_0x24cfcd(0x1ae)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x16afd1)?withUpdateNotice(_0x16afd1):_0x16afd1,_0x49071c,_0x1d90c3);}function shouldAttachUpdateNotice(_0x19a507){const _0x2733da=a94_0x415f;return!['update',_0x2733da(0x1d4),_0x2733da(0x199)][_0x2733da(0x1d5)](_0x19a507[_0x2733da(0x1ba)]);}function a94_0x1314(){const _0x18c122=['appcode\x20\x22','../commands/app/remote-source.js','rawFlags','4196091byLyhl','format','name','Unknown\x20app:\x20','appCodeSource','pageSize','local-alias','328saABba','items','17930ZUvEmU','configMissing','service','52285yPGoYh','authRequired','../core/sdk-client.js','production','catch','929836IqMkrF','980RfCcdx','../core/api-client.js','defaultVerbose','defaultApp','appCode','.appcode\x20to\x20','verbose','defaultPageSize','string','36BUrVtO','trim','execute','accessKey','mergedCli','APPCODE','\x20or\x20pass\x20','Run\x20`','newConfigFileName','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','schema','includes','command','cancelled','_notice','map','riskLevel','2AytDPV','doctor','12802336HbJzQw','currentApp','ACCESS_KEY','has','24MPyxmW','High-risk\x20operation\x20`','1809409iatzHd','ClientAk','requiresAppCode','confirmHighRisk','appcode','formatOutput','nonInteractive','filter','15612fULgqi','app','resolve','env'];a94_0x1314=function(){return _0x18c122;};return a94_0x1314();}function withUpdateNotice(_0xea7e1){return{..._0xea7e1,async 'execute'(_0x58683f){const _0x1217eb=a94_0x415f,_0x4d557f=shouldResolveUpdateNotice(_0x58683f)?resolveLatestUpdateNotice()[_0x1217eb(0x1bf)](()=>null):Promise[_0x1217eb(0x1aa)](null),_0x4089a2=await _0xea7e1[_0x1217eb(0x1cc)](_0x58683f);return attachUpdateNotice(_0x4089a2,await _0x4d557f);}};}function shouldResolveUpdateNotice(_0x5138d1){const _0x372094=a94_0x415f;return _0x5138d1[_0x372094(0x1b0)]==='pretty'&&!_0x5138d1[_0x372094(0x1a6)];}function attachUpdateNotice(_0x4188a8,_0x34f412){const _0x2fd24a=a94_0x415f;if(!_0x34f412||!_0x4188a8||typeof _0x4188a8!=='object')return _0x4188a8;const _0x34ba76=_0x4188a8,_0x25005a=typeof _0x34ba76[_0x2fd24a(0x1d8)]==='object'&&_0x34ba76[_0x2fd24a(0x1d8)]!==null?_0x34ba76[_0x2fd24a(0x1d8)]:{};return{..._0x34ba76,'_notice':{..._0x25005a,'update':_0x34f412}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3db99f,_0x545b3b){const _0x490b5b=a95_0x2a69,_0x309691=_0x3db99f();while(!![]){try{const _0x4dd2d0=-parseInt(_0x490b5b(0x107))/0x1*(-parseInt(_0x490b5b(0x101))/0x2)+-parseInt(_0x490b5b(0xfc))/0x3*(parseInt(_0x490b5b(0xfb))/0x4)+parseInt(_0x490b5b(0x104))/0x5*(-parseInt(_0x490b5b(0xfe))/0x6)+-parseInt(_0x490b5b(0xf6))/0x7+parseInt(_0x490b5b(0xfd))/0x8*(parseInt(_0x490b5b(0x106))/0x9)+-parseInt(_0x490b5b(0xf8))/0xa+parseInt(_0x490b5b(0x100))/0xb;if(_0x4dd2d0===_0x545b3b)break;else _0x309691['push'](_0x309691['shift']());}catch(_0xae7489){_0x309691['push'](_0x309691['shift']());}}}(a95_0x755d,0x2eb46));import{buildSchemaPayload as a95_0x257362}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a95_0x2a69(_0x49738d,_0x5996f1){_0x49738d=_0x49738d-0xf5;const _0x755d2f=a95_0x755d();let _0x2a6924=_0x755d2f[_0x49738d];return _0x2a6924;}import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a95_0x755d(){const _0x391f08=['../commands/registry.js','service','587692xtsets','requiresAuth','719520FzDAul','auth','services','16wLLeDn','185034WnJVdO','368360lWSWbL','246sSbHFL','map','5252764FzgIpD','90qVdNAJ','required','filter','42035GaxjVl','none','54zEuxFx','4107rgKUyw'];a95_0x755d=function(){return _0x391f08;};return a95_0x755d();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x53d3de=a95_0x2a69,{serviceRegistry:_0x41e59a,findDefinition:_0x1d310c}=await import(_0x53d3de(0x108)),_0x5f064c=new Set(_0x41e59a['map'](_0x325438=>_0x325438[_0x53d3de(0xf5)])),_0x2e39b9=listDynamicServiceEntries()[_0x53d3de(0x103)](_0x472a26=>!_0x5f064c['has'](_0x472a26['service'])),_0x5a0f9=a95_0x257362({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x41e59a,_0x2e39b9),'buildAllFlags':buildAllFlags,'findDefinition':(_0x30b1c2,_0x19aef2)=>_0x1d310c(_0x30b1c2,_0x19aef2)??findDynamicServiceDefinition(_0x30b1c2,_0x19aef2)});return normalizeSchemaPayload(_0x5a0f9);}function normalizeSchemaPayload(_0x502a2d){const _0x328371=a95_0x2a69;return{..._0x502a2d,'schemaVersion':0x2,'services':_0x502a2d[_0x328371(0xfa)][_0x328371(0xff)](_0x35f82a=>({..._0x35f82a,'commands':_0x35f82a['commands'][_0x328371(0xff)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x341bbd){const _0x30fe24=a95_0x2a69,_0x44c334=_0x341bbd;return{..._0x341bbd,'auth':_0x44c334[_0x30fe24(0xf9)]??(_0x341bbd[_0x30fe24(0xf7)]?_0x30fe24(0x102):_0x30fe24(0x105))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fb8c4,_0xe85ad){const _0x463ef9=a96_0x27fb,_0x4b83bb=_0x2fb8c4();while(!![]){try{const _0x73f53c=parseInt(_0x463ef9(0xb0))/0x1+-parseInt(_0x463ef9(0xb8))/0x2+parseInt(_0x463ef9(0xb2))/0x3+-parseInt(_0x463ef9(0xaf))/0x4*(-parseInt(_0x463ef9(0xae))/0x5)+-parseInt(_0x463ef9(0xb5))/0x6*(-parseInt(_0x463ef9(0xb3))/0x7)+parseInt(_0x463ef9(0xad))/0x8+-parseInt(_0x463ef9(0xb1))/0x9;if(_0x73f53c===_0xe85ad)break;else _0x4b83bb['push'](_0x4b83bb['shift']());}catch(_0x458fee){_0x4b83bb['push'](_0x4b83bb['shift']());}}}(a96_0x3dc3,0xd282f));export function insertDynamicServicesAfterServiceTree(_0xd505b9,_0x537cde){const _0x496fbd=a96_0x27fb;if(_0x537cde[_0x496fbd(0xb6)]===0x0)return[..._0xd505b9];const _0x204bd6=_0xd505b9[_0x496fbd(0xb7)](_0x4a1915=>_0x4a1915[_0x496fbd(0xac)]===_0x496fbd(0xac));if(_0x204bd6<0x0)return[..._0xd505b9,..._0x537cde];return[..._0xd505b9['slice'](0x0,_0x204bd6+0x1),..._0x537cde,..._0xd505b9[_0x496fbd(0xb4)](_0x204bd6+0x1)];}function a96_0x27fb(_0x5ec4a5,_0x2b0732){_0x5ec4a5=_0x5ec4a5-0xac;const _0x3dc3d4=a96_0x3dc3();let _0x27fbca=_0x3dc3d4[_0x5ec4a5];return _0x27fbca;}function a96_0x3dc3(){const _0x3413fb=['5dKHFdG','3830680fuuZuG','282458ncIfVL','9712530CnvvTQ','890079QCfdfh','752038BaePor','slice','6syXpjH','length','findIndex','1855754XSYNJF','service','9800376otmCFp'];a96_0x3dc3=function(){return _0x3413fb;};return a96_0x3dc3();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x19af57,_0x530274){var _0x11a6a0=a97_0x4b76,_0x2bd590=_0x19af57();while(!![]){try{var _0x52de6c=parseInt(_0x11a6a0(0x1b4))/0x1+parseInt(_0x11a6a0(0x1ba))/0x2*(-parseInt(_0x11a6a0(0x1b9))/0x3)+-parseInt(_0x11a6a0(0x1b7))/0x4+-parseInt(_0x11a6a0(0x1bc))/0x5*(-parseInt(_0x11a6a0(0x1bb))/0x6)+-parseInt(_0x11a6a0(0x1b8))/0x7*(parseInt(_0x11a6a0(0x1b5))/0x8)+-parseInt(_0x11a6a0(0x1bd))/0x9+parseInt(_0x11a6a0(0x1b6))/0xa;if(_0x52de6c===_0x530274)break;else _0x2bd590['push'](_0x2bd590['shift']());}catch(_0x2e4d4a){_0x2bd590['push'](_0x2bd590['shift']());}}}(a97_0xfc2a,0xcaad6));function a97_0x4b76(_0x20300f,_0x413d0c){_0x20300f=_0x20300f-0x1b4;var _0xfc2a9f=a97_0xfc2a();var _0x4b7675=_0xfc2a9f[_0x20300f];return _0x4b7675;}function a97_0xfc2a(){var _0x5cd052=['24cCkWNU','95315VSDzrl','4853007bewMYU','668325MYRwmW','84776VmhXUy','26311310qlAhgR','2913808LauKEQ','777KhYnlF','19050iPdsFG','32aoLkxX'];a97_0xfc2a=function(){return _0x5cd052;};return a97_0xfc2a();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.1.22-beta.
|
|
2
|
-
export declare const GIT_TAG = "v2.1.22-beta.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.1.22-beta.4";
|
|
2
|
+
export declare const GIT_TAG = "v2.1.22-beta.4";
|
|
3
|
+
export declare const GIT_COMMIT = "107bec0";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-05T14:13:57.028Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x2a9e11=a98_0x32fa;(function(_0x4fca6e,_0x1d3820){const _0xe44978=a98_0x32fa,_0x13c810=_0x4fca6e();while(!![]){try{const _0x29c166=parseInt(_0xe44978(0xe1))/0x1*(parseInt(_0xe44978(0xe6))/0x2)+-parseInt(_0xe44978(0xe0))/0x3+parseInt(_0xe44978(0xdb))/0x4*(parseInt(_0xe44978(0xe2))/0x5)+-parseInt(_0xe44978(0xe3))/0x6+-parseInt(_0xe44978(0xdd))/0x7+-parseInt(_0xe44978(0xdf))/0x8+parseInt(_0xe44978(0xe5))/0x9;if(_0x29c166===_0x1d3820)break;else _0x13c810['push'](_0x13c810['shift']());}catch(_0x5372f9){_0x13c810['push'](_0x13c810['shift']());}}}(a98_0x2703,0xc8506));function a98_0x32fa(_0x15f85c,_0xf0ed9e){_0x15f85c=_0x15f85c-0xdb;const _0x27037a=a98_0x2703();let _0x32faf7=_0x27037a[_0x15f85c];return _0x32faf7;}export const VERSION='2.1.22-beta.4';export const GIT_TAG=a98_0x2a9e11(0xdc);export const GIT_COMMIT=a98_0x2a9e11(0xe4);export const BUILD_TIME=a98_0x2a9e11(0xde);function a98_0x2703(){const _0x45ef9f=['3325626UNtaMq','107bec0','14415678Zgvbdl','378amPScB','292LdGgVq','v2.1.22-beta.4','3161137jFDvek','2026-08-05T14:13:57.028Z','4151680zbdini','540207CkNmWj','2561swmfTH','30110jvsXZP'];a98_0x2703=function(){return _0x45ef9f;};return a98_0x2703();}
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x566443,_0xf23bf){const _0x86efa3=a99_0x1001,_0x2e1edf=_0x566443();while(!![]){try{const _0x57a965=-parseInt(_0x86efa3(0xcf))/0x1+-parseInt(_0x86efa3(0xd0))/0x2+parseInt(_0x86efa3(0xcc))/0x3+-parseInt(_0x86efa3(0xd1))/0x4+-parseInt(_0x86efa3(0xcb))/0x5*(parseInt(_0x86efa3(0xcd))/0x6)+parseInt(_0x86efa3(0xc8))/0x7+parseInt(_0x86efa3(0xc9))/0x8;if(_0x57a965===_0xf23bf)break;else _0x2e1edf['push'](_0x2e1edf['shift']());}catch(_0x535e23){_0x2e1edf['push'](_0x2e1edf['shift']());}}}(a99_0x2095,0xdbb9c));import{jsx as a99_0x5c7139,jsxs as a99_0x39536c}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a99_0x1001(_0x37ed2e,_0x17e8c4){_0x37ed2e=_0x37ed2e-0xc7;const _0x2095ce=a99_0x2095();let _0x100133=_0x2095ce[_0x37ed2e];return _0x100133;}function a99_0x2095(){const _0x1979b2=['6976640WCehlq','\x20to\x20view\x20available\x20commands.','8472828tKUAGa','24884560fyIFSp','\x20\x20Use\x20','2779145QjbgOq','1825584pAgdsC','6YCdnVl','green','373747XzBtNA','2711540KVcPRZ'];a99_0x2095=function(){return _0x1979b2;};return a99_0x2095();}export function Help(){const _0x5f1f22=a99_0x1001,{exit:_0x3821df}=useApp();return useEffect(()=>{_0x3821df();},[_0x3821df]),a99_0x39536c(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a99_0x5c7139(Box,{'children':a99_0x5c7139(Text,{'bold':!![],'color':_0x5f1f22(0xce),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a99_0x39536c(Box,{'marginTop':0x1,'children':[a99_0x5c7139(Text,{'dimColor':!![],'children':_0x5f1f22(0xca)}),a99_0x5c7139(Text,{'bold':!![],'color':_0x5f1f22(0xce),'children':CLI_BIN_NAME+'\x20--help'}),a99_0x5c7139(Text,{'dimColor':!![],'children':_0x5f1f22(0xc7)})]})]});}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a100_0x2b1a(){const _0x1a19ca=['230YPPllD','2444496RSZtWr','writeEventSubject','3004837PEBozK','310308hDOFym','150cvhhfC','high-risk-write','255105YdnGIM','1289346SIJQVE','32Cgeorj','12DchmYB','filter','split','107555OUAFHE','7GqsKVk','trim','join','4393HlvQUh','risk'];a100_0x2b1a=function(){return _0x1a19ca;};return a100_0x2b1a();}(function(_0x4eea93,_0x5271d0){const _0x20520e=a100_0x5f04,_0x5364cc=_0x4eea93();while(!![]){try{const _0x27ae69=-parseInt(_0x20520e(0xa7))/0x1*(-parseInt(_0x20520e(0x9b))/0x2)+-parseInt(_0x20520e(0x9e))/0x3+parseInt(_0x20520e(0x9f))/0x4*(-parseInt(_0x20520e(0xa3))/0x5)+parseInt(_0x20520e(0xad))/0x6*(parseInt(_0x20520e(0xa4))/0x7)+-parseInt(_0x20520e(0xaa))/0x8+parseInt(_0x20520e(0x9d))/0x9*(parseInt(_0x20520e(0xa9))/0xa)+parseInt(_0x20520e(0xac))/0xb*(parseInt(_0x20520e(0xa0))/0xc);if(_0x27ae69===_0x5271d0)break;else _0x5364cc['push'](_0x5364cc['shift']());}catch(_0x4a15c0){_0x5364cc['push'](_0x5364cc['shift']());}}}(a100_0x2b1a,0x6160f));export function canonicalLovrabetOperation(_0x3ea360){const _0x3fc94f=a100_0x5f04;return[_0x3ea360['service'],..._0x3ea360['command'][_0x3fc94f(0xa5)]()[_0x3fc94f(0xa2)](/\s+/)][_0x3fc94f(0xa1)](Boolean)[_0x3fc94f(0xa6)]('.');}function a100_0x5f04(_0x44d92c,_0x49a596){_0x44d92c=_0x44d92c-0x9b;const _0x2b1ae9=a100_0x2b1a();let _0x5f0451=_0x2b1ae9[_0x44d92c];return _0x5f0451;}export function createLovrabetWriteMetadata(_0x1d7f16,_0x1fef4d,_0x2d8609,_0x15047c){const _0x4e39dd=a100_0x5f04;if(_0x15047c||_0x2d8609['ok']!==!![]||_0x1d7f16['risk']!=='write'&&_0x1d7f16[_0x4e39dd(0xa8)]!==_0x4e39dd(0x9c))return undefined;const _0x20b040=_0x1d7f16[_0x4e39dd(0xab)]?.(_0x2d8609),_0x4bd5e0={'type':'lovrabet.write.completed','operation':_0x1fef4d,'risk':_0x1d7f16[_0x4e39dd(0xa8)],..._0x20b040?{'subject':_0x20b040}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x4bd5e0}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a101_0xeaea(_0x208ddc,_0x151287){_0x208ddc=_0x208ddc-0x136;const _0x3c6f24=a101_0x3c6f();let _0xeaea0a=_0x3c6f24[_0x208ddc];return _0xeaea0a;}(function(_0x559957,_0x1aeef2){const _0x32ec56=a101_0xeaea,_0x3b39c8=_0x559957();while(!![]){try{const _0x269561=parseInt(_0x32ec56(0x159))/0x1+-parseInt(_0x32ec56(0x150))/0x2*(parseInt(_0x32ec56(0x13b))/0x3)+-parseInt(_0x32ec56(0x143))/0x4*(parseInt(_0x32ec56(0x142))/0x5)+parseInt(_0x32ec56(0x15a))/0x6+parseInt(_0x32ec56(0x13a))/0x7+-parseInt(_0x32ec56(0x14a))/0x8+-parseInt(_0x32ec56(0x139))/0x9*(-parseInt(_0x32ec56(0x153))/0xa);if(_0x269561===_0x1aeef2)break;else _0x3b39c8['push'](_0x3b39c8['shift']());}catch(_0x598ab8){_0x3b39c8['push'](_0x3b39c8['shift']());}}}(a101_0x3c6f,0xd5d15));function a101_0x3c6f(){const _0x17a215=['present','yes','signal','args','245yOgYjt','18160yLuNLc','Lovrabet\x20invocation\x20aborted.','presentation','format','command','high-risk-write','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','8852440MjuPwl','dry-run','write','aborted','reason','result','226bJTfdz','definition','data','2645340EBHsqL','confirm','dryRun','riskLevel','rawFlags','isNonInteractive','124404Fmbjci','7732254eIxFFk','description','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','risk','36ovnuKM','8147419WusnpN','37974EMzWOS','execute','confirmation'];a101_0x3c6f=function(){return _0x17a215;};return a101_0x3c6f();}import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x34ac7a,command:_0x38402b,risk:_0x187b3c,dryRun:_0x416506}){const _0x36fa62=a101_0xeaea;return JSON['stringify']({'ok':_0x34ac7a['ok'],'command':_0x38402b,'risk':_0x187b3c,..._0x416506?{'dryRun':!![]}:{},..._0x34ac7a['data']!==undefined?{'data':_0x34ac7a[_0x36fa62(0x152)]}:{},..._0x34ac7a['message']?{'message':_0x34ac7a['message']}:{}});}};export async function invokeLovrabet(_0x240b4a,_0x10a483){return runSerialized(async()=>{const _0x1026eb=a101_0xeaea;throwIfAborted(_0x10a483[_0x1026eb(0x140)]);const _0xd8cb49=await resolveLovrabetInvocation(_0x240b4a),_0x27d5bb=canonicalLovrabetOperation(_0xd8cb49[_0x1026eb(0x151)]),_0x2806f0={},_0x278b64=buildConfigFromFlags(_0xd8cb49[_0x1026eb(0x157)]);await initGlobalEnvironment(_0x278b64);const _0x5b8446=createPipelineEnv(_0x278b64,{..._0xd8cb49[_0x1026eb(0x157)],'yes':_0xd8cb49['definition'][_0x1026eb(0x138)]==='high-risk-write'?!![]:_0xd8cb49[_0x1026eb(0x157)][_0x1026eb(0x13f)],'nonInteractive':!![]});_0x5b8446[_0x1026eb(0x141)]=_0xd8cb49[_0x1026eb(0x141)],_0x5b8446[_0x1026eb(0x158)]=!![],_0x5b8446[_0x1026eb(0x156)]='high-risk-write';const _0xee1ca5=withEmbeddedLifecycle(_0xd8cb49[_0x1026eb(0x151)],_0x27d5bb,_0x10a483),_0x15b508=createLovrabetRunnerAdapter({'formatOutput'(_0x1c1d47,_0x3cf468){const _0x3b5a5a=_0x1026eb;_0x2806f0[_0x3b5a5a(0x14f)]=_0x1c1d47,_0x2806f0[_0x3b5a5a(0x147)]=_0x3cf468['command'],_0x2806f0[_0x3b5a5a(0x138)]=_0x3cf468[_0x3b5a5a(0x138)],_0x2806f0[_0x3b5a5a(0x146)]=_0x3cf468[_0x3b5a5a(0x146)],_0x2806f0[_0x3b5a5a(0x155)]=_0x3cf468[_0x3b5a5a(0x155)]===!![];},async 'confirmHighRisk'(){const _0x28c714=_0x1026eb;throw new Error(_0x28c714(0x149));}});try{await runCommand(_0xee1ca5,_0x5b8446,_0x15b508);if(!_0x2806f0[_0x1026eb(0x14f)]||!_0x2806f0[_0x1026eb(0x147)]||!_0x2806f0[_0x1026eb(0x138)]||!_0x2806f0['format'])throw new Error(_0x1026eb(0x137));const _0x3b31a8=_0x10a483[_0x1026eb(0x145)]??defaultPresentation,_0x76822b=_0x2806f0['dryRun']===!![],_0x4d1574={'result':_0x2806f0[_0x1026eb(0x14f)],'command':_0x2806f0[_0x1026eb(0x147)],'operation':_0x27d5bb,'risk':_0x2806f0[_0x1026eb(0x138)],'format':_0x2806f0[_0x1026eb(0x146)],'dryRun':_0x76822b},_0x407524=createLovrabetWriteMetadata(_0xd8cb49[_0x1026eb(0x151)],_0x27d5bb,_0x2806f0[_0x1026eb(0x14f)],_0x76822b);let _0x25dc31;try{_0x25dc31=await _0x3b31a8[_0x1026eb(0x13e)](_0x4d1574);}catch(_0x1c48f4){if(!_0x407524||_0x3b31a8===defaultPresentation)throw _0x1c48f4;_0x25dc31=await defaultPresentation[_0x1026eb(0x13e)](_0x4d1574);}return{'operation':_0x27d5bb,'risk':_0x2806f0['risk'],'mode':_0x76822b?_0x1026eb(0x14b):'execute','result':_0x2806f0[_0x1026eb(0x14f)],'output':_0x25dc31,..._0x407524?{'metadata':_0x407524}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function withEmbeddedLifecycle(_0x2798f1,_0x5b8d92,_0x165fb2){return{..._0x2798f1,async 'execute'(_0x3d25e7){const _0x4579a9=a101_0xeaea;return throwIfAborted(_0x165fb2[_0x4579a9(0x140)]),(_0x2798f1[_0x4579a9(0x138)]===_0x4579a9(0x14c)||_0x2798f1[_0x4579a9(0x138)]===_0x4579a9(0x148))&&await _0x165fb2[_0x4579a9(0x13d)][_0x4579a9(0x154)]({'operation':_0x5b8d92,'risk':_0x2798f1[_0x4579a9(0x138)],'description':_0x2798f1[_0x4579a9(0x136)],..._0x165fb2[_0x4579a9(0x140)]?{'signal':_0x165fb2[_0x4579a9(0x140)]}:{}}),throwIfAborted(_0x165fb2[_0x4579a9(0x140)]),_0x2798f1[_0x4579a9(0x13c)](_0x3d25e7);}};}function throwIfAborted(_0x5438d8){const _0x2eca0b=a101_0xeaea;if(_0x5438d8?.[_0x2eca0b(0x14d)])throw _0x5438d8[_0x2eca0b(0x14e)]instanceof Error?_0x5438d8[_0x2eca0b(0x14e)]:new DOMException(_0x2eca0b(0x144),'AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x430596=a102_0x4a50;(function(_0x5bbb25,_0x53f24a){const _0x401434=a102_0x4a50,_0x352175=_0x5bbb25();while(!![]){try{const _0x35ea29=parseInt(_0x401434(0x1f2))/0x1*(-parseInt(_0x401434(0x1ec))/0x2)+-parseInt(_0x401434(0x1e9))/0x3+parseInt(_0x401434(0x1f0))/0x4+-parseInt(_0x401434(0x1f1))/0x5*(parseInt(_0x401434(0x1eb))/0x6)+parseInt(_0x401434(0x1f4))/0x7*(parseInt(_0x401434(0x1ee))/0x8)+-parseInt(_0x401434(0x1ef))/0x9+parseInt(_0x401434(0x1f3))/0xa;if(_0x35ea29===_0x53f24a)break;else _0x352175['push'](_0x352175['shift']());}catch(_0x4743a0){_0x352175['push'](_0x352175['shift']());}}}(a102_0x48e2,0x2667f));function a102_0x48e2(){const _0x40c920=['resolve','364128lArQIS','119070QPfnBO','426796UBlvzJ','1458605QyFygV','5469sCFEMY','7846840DjNKKp','14ozLymu','625260nUvkAG','catch','6HmlKrw','114bvriea'];a102_0x48e2=function(){return _0x40c920;};return a102_0x48e2();}let tail=Promise[a102_0x430596(0x1ed)]();function a102_0x4a50(_0x1c0685,_0x5098e2){_0x1c0685=_0x1c0685-0x1e9;const _0x48e28b=a102_0x48e2();let _0x4a5062=_0x48e28b[_0x1c0685];return _0x4a5062;}export async function runSerialized(_0x284abf){const _0x356b06=a102_0x430596,_0x2fcaaa=tail;let _0x1bd193;tail=new Promise(_0x7d1150=>{_0x1bd193=_0x7d1150;}),await _0x2fcaaa[_0x356b06(0x1ea)](()=>undefined);try{return await _0x284abf();}finally{_0x1bd193();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3dd38b,_0x260663){const _0x21bf0b=a103_0x4340,_0x3abcce=_0x3dd38b();while(!![]){try{const _0x483617=parseInt(_0x21bf0b(0x88))/0x1*(parseInt(_0x21bf0b(0x89))/0x2)+parseInt(_0x21bf0b(0x97))/0x3*(parseInt(_0x21bf0b(0x9b))/0x4)+parseInt(_0x21bf0b(0x99))/0x5+-parseInt(_0x21bf0b(0x96))/0x6*(-parseInt(_0x21bf0b(0x91))/0x7)+-parseInt(_0x21bf0b(0x8a))/0x8*(parseInt(_0x21bf0b(0x87))/0x9)+-parseInt(_0x21bf0b(0x9c))/0xa*(-parseInt(_0x21bf0b(0x9d))/0xb)+-parseInt(_0x21bf0b(0x95))/0xc;if(_0x483617===_0x260663)break;else _0x3abcce['push'](_0x3abcce['shift']());}catch(_0x314fe9){_0x3abcce['push'](_0x3abcce['shift']());}}}(a103_0x1d38,0x72ca7));import a103_0x3f9ec5 from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a103_0x4340(_0x3f8a36,_0x2b1456){_0x3f8a36=_0x3f8a36-0x86;const _0x1d38bc=a103_0x1d38();let _0x434049=_0x1d38bc[_0x3f8a36];return _0x434049;}export async function resolveLovrabetInvocation(_0x355845){const _0x53eb20=a103_0x4340,_0x4ca9ca=a103_0x3f9ec5('',{'importMeta':import.meta,'argv':_0x355845,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x3a431f=[..._0x4ca9ca[_0x53eb20(0x94)]],_0x35e53e=_0x4ca9ca[_0x53eb20(0x86)];await correctFlags(_0x35e53e);const _0x57e792=_0x3a431f[0x0];if(!_0x57e792)throw CliErrors[_0x53eb20(0x9a)](_0x53eb20(0x8b));if(!isKnownService(_0x57e792)){const _0xb5ccf4=resolveDynamicServiceCommand(_0x3a431f,_0x35e53e);if(!_0xb5ccf4)throw CliErrors[_0x53eb20(0x90)](_0x3a431f[_0x53eb20(0x98)]('\x20'));return Object[_0x53eb20(0x92)](_0x35e53e,_0xb5ccf4[_0x53eb20(0x86)]),{'definition':_0xb5ccf4[_0x53eb20(0x93)],'rawFlags':_0x35e53e,'args':_0xb5ccf4['args']};}const _0x426ad9=getServiceEntry(_0x57e792),_0x198388=_0x3a431f[0x1]||_0x426ad9['defaultCommand'];if(!_0x198388)throw CliErrors[_0x53eb20(0x9a)]('Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'+_0x57e792+'\x22.');const _0x186103=findDefinition(_0x57e792,_0x198388);if(!_0x186103)throw CliErrors['unknownCommand'](_0x57e792+'\x20'+_0x198388);return{'definition':_0x186103,'rawFlags':_0x35e53e,'args':_0x3a431f[_0x53eb20(0x8d)](0x2)};}function a103_0x1d38(){const _0x2f52f3=['4938000TJPnXW','18efZTmj','3TzWQzb','join','1081625TNJaaQ','validation','1948372nWEEqZ','10kWGTzq','2056835zZLlHa','flags','108153UBVwgb','7kXxmnK','18346GYTmFh','328EnxcDh','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','../commands/registry.js','slice','flatMap','../framework/preparse.js','unknownCommand','979454MMjumK','assign','definition','input'];a103_0x1d38=function(){return _0x2f52f3;};return a103_0x1d38();}async function correctFlags(_0x52994b){const _0x106fb4=a103_0x4340;try{const {correctFlags:_0x34235a}=await import(_0x106fb4(0x8f)),{getAllDefinitions:_0x1753c7}=await import(_0x106fb4(0x8c)),_0x51821a=_0x1753c7()[_0x106fb4(0x8e)](_0x14ed89=>_0x14ed89[_0x106fb4(0x86)]??[]),_0x140faa=_0x34235a(_0x52994b,_0x51821a);Object[_0x106fb4(0x92)](_0x52994b,_0x140faa[_0x106fb4(0x86)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x17f32e=a105_0x3680;(function(_0x29f756,_0x2b6f4a){const _0x55687e=a105_0x3680,_0xdd51e2=_0x29f756();while(!![]){try{const _0x103073=parseInt(_0x55687e(0x116))/0x1*(parseInt(_0x55687e(0x10d))/0x2)+parseInt(_0x55687e(0x110))/0x3+-parseInt(_0x55687e(0x118))/0x4*(-parseInt(_0x55687e(0x10a))/0x5)+parseInt(_0x55687e(0x115))/0x6*(parseInt(_0x55687e(0x10f))/0x7)+parseInt(_0x55687e(0x114))/0x8*(parseInt(_0x55687e(0x117))/0x9)+parseInt(_0x55687e(0x11f))/0xa*(-parseInt(_0x55687e(0x11c))/0xb)+-parseInt(_0x55687e(0x112))/0xc;if(_0x103073===_0x2b6f4a)break;else _0xdd51e2['push'](_0xdd51e2['shift']());}catch(_0x59c86e){_0xdd51e2['push'](_0xdd51e2['shift']());}}}(a105_0x108d,0x84930));import{spawnSync}from'node:child_process';function a105_0x108d(){const _0x4ef01f=['9318735leEUHK','3320buJuWG','skipNpxSkillsEnvSuffix','stdout','pipe','1562077pCjBkS','log','inherit','30yxiFgp','exit\x20','toString','status','1315fNbxkW','join','unknown','242wdouUc','trim','10920VQUHdi','2451279YibpEP','skills','15502116MHfEeo','stdio','8ehloVy','168NKtyWg','1210oTAFcL'];a105_0x108d=function(){return _0x4ef01f;};return a105_0x108d();}import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a105_0x20e696}from'../constant/distribution.js';function a105_0x3680(_0x25e626,_0x583d48){_0x25e626=_0x25e626-0x107;const _0x108d7a=a105_0x108d();let _0x36807b=_0x108d7a[_0x25e626];return _0x36807b;}import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a105_0x20e696;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a105_0x17f32e(0x119)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x2c80c3,_0x36dd46=LOVRABET_SKILL_SOURCE,_0x19404b){const _0x1741c2=a105_0x17f32e;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x51f5a4=_0x19404b?.[_0x1741c2(0x113)]??_0x1741c2(0x11e),_0x184530=resolveNpmBin('npx'),_0x49eda0=[_0x1741c2(0x111),'add',_0x36dd46,'-g','-y'],_0x143ce5=[_0x184530,..._0x49eda0][_0x1741c2(0x10b)]('\x20');console[_0x1741c2(0x11d)]('*\x20'+_0x143ce5);const _0x65d8f1=spawnSync(_0x184530,_0x49eda0,{'cwd':_0x2c80c3,'stdio':_0x51f5a4,'env':process.env,'shell':![]});if(_0x65d8f1['status']===0x0)return{'ok':!![],'status':0x0};let _0x1ed15d=_0x1741c2(0x107)+(_0x65d8f1[_0x1741c2(0x109)]??_0x1741c2(0x10c));if(_0x51f5a4===_0x1741c2(0x11b)){const _0x213f53=_0x65d8f1['stderr']?_0x65d8f1['stderr'][_0x1741c2(0x108)]()[_0x1741c2(0x10e)]():'',_0x475d7e=_0x65d8f1['stdout']?_0x65d8f1[_0x1741c2(0x11a)]['toString']()[_0x1741c2(0x10e)]():'';if(_0x213f53)_0x1ed15d=_0x213f53;else{if(_0x475d7e)_0x1ed15d=_0x475d7e;}}return{'ok':![],'status':_0x65d8f1[_0x1741c2(0x109)]??null,'error':_0x1ed15d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x392919=a106_0x4451;function a106_0x4451(_0x188f8a,_0x463c31){_0x188f8a=_0x188f8a-0x122;const _0x55d20b=a106_0x55d2();let _0x445153=_0x55d20b[_0x188f8a];return _0x445153;}function a106_0x55d2(){const _0x4d6ae8=['.DS_Store','10079514UHGlYB','426483AjwBQP','6381995iLCBuz','dist','.cache','build','1612gUuJGS','node_modules','826070APeqZn','10kbFpCk','4241312vjdzxo','909CmqaYA','11828727pGljAe','lovrabet.skill.json','.svn','.turbo','20IocZel'];a106_0x55d2=function(){return _0x4d6ae8;};return a106_0x55d2();}(function(_0x32b660,_0x4a26c9){const _0x1c147b=a106_0x4451,_0x506f32=_0x32b660();while(!![]){try{const _0x27d3ad=-parseInt(_0x1c147b(0x12a))/0x1*(parseInt(_0x1c147b(0x125))/0x2)+parseInt(_0x1c147b(0x132))/0x3*(parseInt(_0x1c147b(0x12f))/0x4)+parseInt(_0x1c147b(0x133))/0x5+parseInt(_0x1c147b(0x131))/0x6+-parseInt(_0x1c147b(0x127))/0x7+-parseInt(_0x1c147b(0x129))/0x8+-parseInt(_0x1c147b(0x12b))/0x9*(parseInt(_0x1c147b(0x128))/0xa);if(_0x27d3ad===_0x4a26c9)break;else _0x506f32['push'](_0x506f32['shift']());}catch(_0xf8b61e){_0x506f32['push'](_0x506f32['shift']());}}}(a106_0x55d2,0xed4d8));export const METADATA_FILE=a106_0x392919(0x12c);export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a106_0x392919(0x130)]);export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a106_0x392919(0x12d),a106_0x392919(0x126),'.next',a106_0x392919(0x122),a106_0x392919(0x124),'coverage',a106_0x392919(0x12e),a106_0x392919(0x123)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49a04c,_0x5ab6ac){const _0x164a00=a107_0x41e5,_0x438da8=_0x49a04c();while(!![]){try{const _0x97a34b=parseInt(_0x164a00(0xbf))/0x1*(parseInt(_0x164a00(0xb8))/0x2)+-parseInt(_0x164a00(0xc5))/0x3+parseInt(_0x164a00(0xc8))/0x4*(-parseInt(_0x164a00(0xb9))/0x5)+-parseInt(_0x164a00(0xbc))/0x6*(parseInt(_0x164a00(0xb7))/0x7)+-parseInt(_0x164a00(0xc3))/0x8+parseInt(_0x164a00(0xbd))/0x9*(-parseInt(_0x164a00(0xc2))/0xa)+parseInt(_0x164a00(0xba))/0xb*(parseInt(_0x164a00(0xc0))/0xc);if(_0x97a34b===_0x5ab6ac)break;else _0x438da8['push'](_0x438da8['shift']());}catch(_0x1adaf4){_0x438da8['push'](_0x438da8['shift']());}}}(a107_0x4a72,0x54adf));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(_0x3f8d53,_0x589cfb){const _0x21ba6f=a107_0x41e5,_0x312efa=normalizeSkillRelativePath(_0x589cfb),_0x15bf73=realOrResolved(_0x3f8d53),_0x412dd5=resolve(_0x15bf73,..._0x312efa['split']('/'));if(!isPathInside(_0x412dd5,_0x15bf73))throw CliErrors[_0x21ba6f(0xc1)](_0x21ba6f(0xb6)+_0x589cfb);return ensureNoSymlinkInManagedPath(_0x15bf73,_0x312efa),_0x412dd5;}export function ensureNoSymlinkInManagedPath(_0x32bcab,_0x4c9682){const _0x3aa41f=a107_0x41e5;let _0x15076e=_0x32bcab;for(const _0x119982 of _0x4c9682[_0x3aa41f(0xc4)]('/')){_0x15076e=resolve(_0x15076e,_0x119982);const _0x417205=lstatIfPresent(_0x15076e);if(_0x417205?.[_0x3aa41f(0xc6)]())throw CliErrors[_0x3aa41f(0xc1)](_0x3aa41f(0xb5)+_0x4c9682);}}export function isDanglingSymlink(_0x1d60d9){const _0x55e182=a107_0x41e5;try{return lstatSync(_0x1d60d9)[_0x55e182(0xc6)]();}catch{return![];}}function a107_0x4a72(){const _0xf037ee=['7hKDqDc','13174LUEymP','25eMiZql','1024133BblSUq','from','2496636HqgurL','1647ZVKwTS','endsWith','23JEzmyg','156FOWaUq','validation','1630bYjfdn','1454656Zjmurx','split','79083ohGJYf','isSymbolicLink','.tmp','288692OYHynr','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Unsafe\x20Skill\x20file\x20path:\x20'];a107_0x4a72=function(){return _0xf037ee;};return a107_0x4a72();}export function resolveSymlinkTarget(_0x5302c5){const _0x4e6f3b=readlinkSync(_0x5302c5);return isAbsolute(_0x4e6f3b)?_0x4e6f3b:resolve(dirname(_0x5302c5),_0x4e6f3b);}export function isPathInside(_0x2e2f53,_0x5c7b30){const _0x3a4043=a107_0x41e5,_0x34834c=_0x2e2f53[_0x3a4043(0xbe)](sep)?_0x2e2f53:''+_0x2e2f53+sep,_0x1124f7=_0x5c7b30[_0x3a4043(0xbe)](sep)?_0x5c7b30:''+_0x5c7b30+sep;return _0x2e2f53===_0x5c7b30||_0x34834c['startsWith'](_0x1124f7);}export function realOrResolved(_0x1048b3){try{return realpathSync(_0x1048b3);}catch{return resolve(_0x1048b3);}}function a107_0x41e5(_0x43c296,_0x2ab478){_0x43c296=_0x43c296-0xb5;const _0x4a72f7=a107_0x4a72();let _0x41e5d8=_0x4a72f7[_0x43c296];return _0x41e5d8;}export function lstatIfPresent(_0x217418){try{return lstatSync(_0x217418);}catch{return undefined;}}export function writeTextAtomic(_0x579edf,_0x5abfa2,_0x4c16c8){const _0x436f89=a107_0x41e5;writeBytesAtomic(_0x579edf,Buffer[_0x436f89(0xbb)](_0x5abfa2,'utf8'),_0x4c16c8);}export function writeBytesAtomic(_0x54c777,_0x5d4b49,_0x343577){const _0x3ea99a=a107_0x41e5,_0xb35990=_0x54c777+_0x3ea99a(0xc7);try{writeFileSync(_0xb35990,_0x5d4b49,{'mode':_0x343577}),renameSync(_0xb35990,_0x54c777);}catch(_0x5ce4e3){try{rmSync(_0xb35990,{'force':!![]});}catch{}throw _0x5ce4e3;}}export function writeJsonAtomic(_0x15b166,_0xa06a21){writeTextAtomic(_0x15b166,JSON['stringify'](_0xa06a21,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a5a9b,_0x30ae6c){const _0x4d2c39=a108_0x3f33,_0x44c257=_0x1a5a9b();while(!![]){try{const _0x762cd=parseInt(_0x4d2c39(0x8d))/0x1*(-parseInt(_0x4d2c39(0x87))/0x2)+-parseInt(_0x4d2c39(0x82))/0x3*(-parseInt(_0x4d2c39(0x89))/0x4)+parseInt(_0x4d2c39(0x81))/0x5*(parseInt(_0x4d2c39(0x86))/0x6)+parseInt(_0x4d2c39(0x85))/0x7+-parseInt(_0x4d2c39(0x88))/0x8*(-parseInt(_0x4d2c39(0x8e))/0x9)+-parseInt(_0x4d2c39(0x84))/0xa*(-parseInt(_0x4d2c39(0x8a))/0xb)+-parseInt(_0x4d2c39(0x7f))/0xc;if(_0x762cd===_0x30ae6c)break;else _0x44c257['push'](_0x44c257['shift']());}catch(_0x196f4c){_0x44c257['push'](_0x44c257['shift']());}}}(a108_0x598e,0x21378));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x4525c3){const _0x33f119=a108_0x3f33;return createHash(_0x33f119(0x8b))[_0x33f119(0x80)](_0x4525c3)[_0x33f119(0x83)](_0x33f119(0x8c));}function a108_0x3f33(_0x348861,_0x40cc3c){_0x348861=_0x348861-0x7f;const _0x598e4a=a108_0x598e();let _0x3f33fe=_0x598e4a[_0x348861];return _0x3f33fe;}export function fileHash(_0x5b3b69){return bufferSha256(fileContent(_0x5b3b69));}export function bufferSha256(_0x51ef56){const _0x227ef2=a108_0x3f33;return createHash(_0x227ef2(0x8b))[_0x227ef2(0x80)](_0x51ef56)[_0x227ef2(0x83)]('hex');}function a108_0x598e(){const _0x1f334a=['1394974fobwti','12MkxgEx','114050LhhmQy','16BuAmWx','2044gaEZgv','11TPekqo','sha256','hex','1IgDZdP','666uoZwGO','6051492DSDwqQ','update','326285ApyXAO','627cOnVPA','digest','2606290vaMvKQ'];a108_0x598e=function(){return _0x1f334a;};return a108_0x598e();}export function fileTreeHash(_0x33868a){const _0x1fb8dc=a108_0x3f33,_0x411b8a=createHash('sha256');for(const _0x4bf12d of normalizeManifestFiles(_0x33868a)){_0x411b8a[_0x1fb8dc(0x80)](_0x4bf12d['path']),_0x411b8a[_0x1fb8dc(0x80)]('\x00'),_0x411b8a[_0x1fb8dc(0x80)](_0x4bf12d[_0x1fb8dc(0x8b)]),_0x411b8a[_0x1fb8dc(0x80)]('\x00'),_0x411b8a[_0x1fb8dc(0x80)](String(_0x4bf12d['size'])),_0x411b8a['update']('\x00');}return _0x411b8a[_0x1fb8dc(0x83)](_0x1fb8dc(0x8c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a109_0x426f(){const _0x542ccc=['skills','6953488zRnHUM','3431016wlkvSA','freeze','cwd','1MrrFUO','1561680bXnAoR','18SPjxSR','.agents','1736LZvSuJ','project','3wspBGd','1623947mJtPuO','20bqIEmW','6196488EGjgCe','492JLOzrO','460581pAOMlQ','24012UCdZKd','appCode'];a109_0x426f=function(){return _0x542ccc;};return a109_0x426f();}function a109_0x3c34(_0x5e63c9,_0x33ff6e){_0x5e63c9=_0x5e63c9-0x1c2;const _0x426ff7=a109_0x426f();let _0x3c345f=_0x426ff7[_0x5e63c9];return _0x3c345f;}(function(_0x435c52,_0x5f058b){const _0x44f7a2=a109_0x3c34,_0x4a4090=_0x435c52();while(!![]){try{const _0x2b9809=parseInt(_0x44f7a2(0x1c2))/0x1*(-parseInt(_0x44f7a2(0x1d2))/0x2)+-parseInt(_0x44f7a2(0x1c8))/0x3*(parseInt(_0x44f7a2(0x1cb))/0x4)+-parseInt(_0x44f7a2(0x1c3))/0x5+parseInt(_0x44f7a2(0x1ce))/0x6*(parseInt(_0x44f7a2(0x1c6))/0x7)+-parseInt(_0x44f7a2(0x1d1))/0x8*(parseInt(_0x44f7a2(0x1c4))/0x9)+parseInt(_0x44f7a2(0x1ca))/0xa*(parseInt(_0x44f7a2(0x1cd))/0xb)+-parseInt(_0x44f7a2(0x1cc))/0xc*(-parseInt(_0x44f7a2(0x1c9))/0xd);if(_0x2b9809===_0x5f058b)break;else _0x4a4090['push'](_0x4a4090['shift']());}catch(_0x216f53){_0x4a4090['push'](_0x4a4090['shift']());}}}(a109_0x426f,0xd7793));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x424657,_0x90fa8e='global',_0x2d28b6={}){const _0x448ff4=a109_0x3c34,_0x294803=resolveSkillSyncPaths(_0x2d28b6),_0x5bfe99=safePathSegment(_0x424657,_0x448ff4(0x1cf)),_0x36471b=_0x90fa8e===_0x448ff4(0x1c7)?[resolve(_0x2d28b6[_0x448ff4(0x1d4)]??process[_0x448ff4(0x1d4)](),_0x448ff4(0x1c5),_0x448ff4(0x1d0))]:runtimeAgentSkillRoots(_0x294803);return Object[_0x448ff4(0x1d3)]({'scope':_0x90fa8e,'appCode':_0x5bfe99,'skillRoots':Object['freeze'](_0x36471b),'managedRoot':_0x294803['managedRoot']});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a110_0x25f8f5=a110_0x5089;(function(_0x5556ea,_0x16727d){const _0xc2c7a6=a110_0x5089,_0xe1b40d=_0x5556ea();while(!![]){try{const _0x48e69a=parseInt(_0xc2c7a6(0x150))/0x1*(-parseInt(_0xc2c7a6(0x172))/0x2)+-parseInt(_0xc2c7a6(0x173))/0x3+parseInt(_0xc2c7a6(0x156))/0x4+-parseInt(_0xc2c7a6(0x164))/0x5+-parseInt(_0xc2c7a6(0x15b))/0x6+parseInt(_0xc2c7a6(0x17f))/0x7*(-parseInt(_0xc2c7a6(0x177))/0x8)+parseInt(_0xc2c7a6(0x16b))/0x9;if(_0x48e69a===_0x16727d)break;else _0xe1b40d['push'](_0xe1b40d['shift']());}catch(_0x523f61){_0xe1b40d['push'](_0xe1b40d['shift']());}}}(a110_0x54ba,0xb02fc));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a110_0x42ca26 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a110_0x54ba(){const _0x32922f=['Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','1543dfhqQv','project','metadataPath','length','set','contentHash','1466512xxyDwU','values','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','startsWith','7214688jZnVQW','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','map','env','skillRoots','accessKey','runtime-observe','push','not-managed-symlink','2652985xuzFCF','pruneSkillCodes','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','appCode','personal','scope','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','37747521uUlaZt','isDirectory','external-symlink','builtin','validation','created','unchanged','344ZjMomJ','2618337pjIWdr','metadata-mismatch','dir','company','24tDdYWp','lovrabet','isSymbolicLink','scopes','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','linked-from-protected-root','skillCode','2258473CXkGAC','get','filter','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','removed','protectedLinkRoots','agentsSkillsDir','has','trim','activeSkillCodes','managedRoot','skill','name','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'];a110_0x54ba=function(){return _0x32922f;};return a110_0x54ba();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a110_0x42ca26,RESERVED_PROJECT_SKILL_CODES=new Set([a110_0x25f8f5(0x178),a110_0x25f8f5(0x161),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x67485f,_0x240dae){const _0x5655dd=a110_0x25f8f5,_0x141d1d=new Map();for(const _0x521847 of _0x67485f){const _0x21d596=_0x521847['skill'][_0x5655dd(0x17e)];if(!_0x21d596)continue;const _0x53143a=_0x141d1d[_0x5655dd(0x180)](_0x21d596);(!_0x53143a||_0x521847[_0x5655dd(0x169)]===_0x5655dd(0x168))&&_0x141d1d[_0x5655dd(0x154)](_0x21d596,_0x521847);}const _0x264174=[];for(const _0x2a8374 of _0x141d1d[_0x5655dd(0x157)]()){const _0x30c33b=requireSkillCode(_0x2a8374['skill']),_0x354faf=readMetadataIfPresent(_0x2a8374['metadataPath']);if(_0x354faf?.['appCode']!==_0x240dae[_0x5655dd(0x167)]||_0x354faf[_0x5655dd(0x17e)]!==_0x30c33b)throw CliErrors[_0x5655dd(0x16f)](_0x5655dd(0x15c)+_0x240dae[_0x5655dd(0x167)]+':\x20'+_0x2a8374[_0x5655dd(0x152)]);const _0x18d715=runtimeSkillLinkName(_0x240dae,_0x30c33b);for(const _0x447c4b of _0x240dae[_0x5655dd(0x15f)]){_0x264174[_0x5655dd(0x162)](ensureManagedSymlink(resolve(_0x447c4b,_0x18d715),_0x2a8374['dir'],_0x240dae,_0x30c33b));}}return _0x264174;}export function pruneStaleRuntimeSkillLinks(_0xcfb6,_0x487c9b,_0x57ebdf){const _0x260bd4=a110_0x25f8f5,_0x5d5fb2=new Set([..._0x487c9b][_0x260bd4(0x15d)](_0x8434c5=>_0x8434c5[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)),_0xc75592=_0x57ebdf?new Set([..._0x57ebdf][_0x260bd4(0x15d)](_0x9cf2a4=>_0x9cf2a4[_0x260bd4(0x148)]())[_0x260bd4(0x181)](Boolean)):undefined,_0x2f383f=[];for(const _0x2cc253 of _0xcfb6[_0x260bd4(0x15f)]){for(const _0x2e5fdd of managedTargetSkillLinkPaths(_0x2cc253,_0xcfb6)){const _0x4c998c=runtimeSkillCodeFromLink(_0xcfb6,_0x2e5fdd);if(_0xc75592&&!_0xc75592[_0x260bd4(0x147)](_0x4c998c))continue;if(_0x5d5fb2[_0x260bd4(0x147)](_0x4c998c))continue;_0x2f383f[_0x260bd4(0x162)](removeManagedSkillLink(_0x2e5fdd,_0xcfb6,_0x4c998c));}}return _0x2f383f;}export function pruneStaleRuntimeSkillCache(_0xbd4f51,_0x35280a={}){const _0x4ecce2=a110_0x25f8f5,_0x14a944=new Set([..._0xbd4f51[_0x4ecce2(0x149)]][_0x4ecce2(0x15d)](_0x3ce3ba=>_0x3ce3ba[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)),_0x27f3db=_0xbd4f51[_0x4ecce2(0x165)]?new Set([..._0xbd4f51[_0x4ecce2(0x165)]][_0x4ecce2(0x15d)](_0x3fa05d=>_0x3fa05d[_0x4ecce2(0x148)]())[_0x4ecce2(0x181)](Boolean)):undefined,_0x91c51a=_0xbd4f51[_0x4ecce2(0x17a)]??['personal',_0x4ecce2(0x176)],_0x4088e7=resolve(getRuntimeSkillCacheRoot(_0xbd4f51[_0x4ecce2(0x15e)],_0xbd4f51[_0x4ecce2(0x160)],_0x35280a),safePathSegment(_0xbd4f51[_0x4ecce2(0x167)],_0x4ecce2(0x167))),_0xfd1e02=[];for(const _0x1dff2f of _0x91c51a){const _0x750b5c=resolve(_0x4088e7,_0x1dff2f);if(!existsSync(_0x750b5c))continue;for(const _0x52e607 of readdirSync(_0x750b5c,{'withFileTypes':!![]})){if(!_0x52e607[_0x4ecce2(0x16c)]())continue;const _0x24da32=_0x52e607[_0x4ecce2(0x14c)];if(_0x27f3db&&!_0x27f3db[_0x4ecce2(0x147)](_0x24da32))continue;if(_0x14a944[_0x4ecce2(0x147)](_0x24da32))continue;const _0x110416=resolve(_0x750b5c,_0x24da32),_0x233430=readMetadataIfPresent(resolve(_0x110416,METADATA_FILE));if(_0x233430?.[_0x4ecce2(0x167)]!==_0xbd4f51['appCode']||_0x233430[_0x4ecce2(0x169)]!==_0x1dff2f||_0x233430[_0x4ecce2(0x17e)]!==_0x24da32){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x17b),'reason':_0x4ecce2(0x174)});continue;}if(isLinkedFromAnyRoot(_0x110416,_0xbd4f51[_0x4ecce2(0x145)]??[])){_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':'skipped','reason':_0x4ecce2(0x17d)});continue;}removeSync(_0x110416),_0xfd1e02[_0x4ecce2(0x162)]({'path':_0x110416,'action':_0x4ecce2(0x183)});}}return _0xfd1e02;}export function linkGlobalRuntimeSkills(_0x3004fd,_0x1cca58={}){const _0x2e4238=a110_0x25f8f5,_0x500be2=resolveSkillSyncPaths(_0x1cca58),_0x17ee46=[];for(const _0x27b662 of _0x3004fd){if(_0x27b662[_0x2e4238(0x169)]!==_0x2e4238(0x16e))throw CliErrors[_0x2e4238(0x16f)](_0x2e4238(0x158)+_0x27b662[_0x2e4238(0x169)]);const _0x508120=requireSkillCode(_0x27b662[_0x2e4238(0x14b)]),_0x4c54c2=copyManagedSkillDirectory(_0x27b662['dir'],resolve(_0x500be2[_0x2e4238(0x146)],_0x508120));_0x17ee46[_0x2e4238(0x162)]({..._0x4c54c2,'contentHash':_0x27b662[_0x2e4238(0x155)]});}return _0x17ee46;}function ensureManagedSymlink(_0x1811cc,_0x1fb20f,_0x15aa40,_0x352070){const _0x163725=a110_0x25f8f5;mkdirSync(dirname(_0x1811cc),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1811cc)||isDanglingSymlink(_0x1811cc)){const _0x5a71dc=lstatSync(_0x1811cc);if(!_0x5a71dc['isSymbolicLink']())throw CliErrors[_0x163725(0x16f)](_0x163725(0x159)+_0x1811cc);const _0x46bab8=resolveSymlinkTarget(_0x1811cc);if(!isPathInside(realOrResolved(_0x46bab8),realOrResolved(_0x15aa40['managedRoot'])))throw CliErrors[_0x163725(0x16f)](_0x163725(0x16a)+_0x1811cc);if(realOrResolved(_0x46bab8)===realOrResolved(_0x1fb20f))return{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x171)};const _0x1cf819=readMetadataIfPresent(resolve(_0x46bab8,METADATA_FILE));if(_0x15aa40[_0x163725(0x169)]===_0x163725(0x151)&&(_0x1cf819?.[_0x163725(0x167)]!==_0x15aa40['appCode']||_0x1cf819['skillCode']!==_0x352070))throw CliErrors[_0x163725(0x16f)](_0x163725(0x166)+_0x1811cc);return unlinkSync(_0x1811cc),symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':'updated'};}return symlinkSync(_0x1fb20f,_0x1811cc,_0x163725(0x175)),{'path':_0x1811cc,'target':_0x1fb20f,'action':_0x163725(0x170)};}function managedTargetSkillLinkPaths(_0x39166d,_0xd52d){const _0x132381=a110_0x25f8f5;if(!existsSync(_0x39166d))return[];const _0x3a1380=_0xd52d['appCode']+'--';return readdirSync(_0x39166d,{'withFileTypes':!![]})[_0x132381(0x181)](_0x321dc0=>_0xd52d[_0x132381(0x169)]===_0x132381(0x151)||_0x321dc0[_0x132381(0x14c)][_0x132381(0x15a)](_0x3a1380))[_0x132381(0x15d)](_0x2cfe14=>resolve(_0x39166d,_0x2cfe14['name']));}function removeManagedSkillLink(_0x4a8228,_0x10c11e,_0x1a405e){const _0x4d5fd7=a110_0x25f8f5,_0x2bb4f3=lstatIfPresent(_0x4a8228);if(!_0x2bb4f3?.[_0x4d5fd7(0x179)]())return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x163)};const _0x1b4118=resolveSymlinkTarget(_0x4a8228);if(!isPathInside(realOrResolved(_0x1b4118),realOrResolved(_0x10c11e[_0x4d5fd7(0x14a)])))return{'path':_0x4a8228,'action':'skipped','reason':_0x4d5fd7(0x16d)};const _0x260af3=readMetadataIfPresent(resolve(_0x1b4118,METADATA_FILE));if(_0x10c11e[_0x4d5fd7(0x169)]===_0x4d5fd7(0x151)&&(_0x260af3?.['appCode']!==_0x10c11e[_0x4d5fd7(0x167)]||_0x260af3['skillCode']!==_0x1a405e))return{'path':_0x4a8228,'action':_0x4d5fd7(0x17b),'reason':_0x4d5fd7(0x174)};return unlinkSync(_0x4a8228),{'path':_0x4a8228,'action':_0x4d5fd7(0x183)};}function a110_0x5089(_0x39c620,_0x190933){_0x39c620=_0x39c620-0x145;const _0x54bae8=a110_0x54ba();let _0x508963=_0x54bae8[_0x39c620];return _0x508963;}function isLinkedFromAnyRoot(_0x311d64,_0x1cb995){const _0x465880=a110_0x25f8f5,_0x41e7a2=realOrResolved(_0x311d64);for(const _0x373363 of _0x1cb995){if(!existsSync(_0x373363))continue;for(const _0x5bb266 of readdirSync(_0x373363,{'withFileTypes':!![]})){if(!_0x5bb266[_0x465880(0x179)]())continue;const _0xa2468f=resolve(_0x373363,_0x5bb266[_0x465880(0x14c)]);if(realOrResolved(resolveSymlinkTarget(_0xa2468f))===_0x41e7a2)return!![];}}return![];}function runtimeSkillLinkName(_0x2d1dd0,_0x58992e){const _0x4db7fc=a110_0x25f8f5,_0x4045db=safePathSegment(_0x58992e,'skillCode');if(_0x2d1dd0[_0x4db7fc(0x169)]===_0x4db7fc(0x151)&&RESERVED_PROJECT_SKILL_CODES[_0x4db7fc(0x147)](_0x4045db))throw CliErrors['validation'](_0x4db7fc(0x14e)+_0x4045db);return _0x2d1dd0[_0x4db7fc(0x169)]==='project'?_0x4045db:_0x2d1dd0[_0x4db7fc(0x167)]+'--'+_0x4045db;}function runtimeSkillCodeFromLink(_0xb44c5b,_0x33c5e4){const _0x2c7a15=a110_0x25f8f5,_0x20c0c4=basename(_0x33c5e4);return _0xb44c5b[_0x2c7a15(0x169)]===_0x2c7a15(0x151)?_0x20c0c4:_0x20c0c4['slice']((_0xb44c5b[_0x2c7a15(0x167)]+'--')[_0x2c7a15(0x153)]);}export function copyManagedSkillDirectory(_0x188501,_0x1d56bd){const _0x153738=a110_0x25f8f5,_0x5a1efd=resolve(_0x1d56bd,METADATA_FILE),_0x7cfcbf=existsSync(_0x1d56bd);if(_0x7cfcbf){const _0x327e61=lstatSync(_0x1d56bd);if(_0x327e61[_0x153738(0x179)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x14d)+_0x1d56bd);if(!_0x327e61[_0x153738(0x16c)]())throw CliErrors[_0x153738(0x16f)](_0x153738(0x182)+_0x1d56bd);const _0x489412=readMetadataIfPresent(_0x5a1efd);if(_0x489412?.['scope']!==_0x153738(0x16e))throw CliErrors[_0x153738(0x16f)](_0x153738(0x17c)+_0x1d56bd);}ensureDirSync(dirname(_0x1d56bd));const _0x4f3427=_0x7cfcbf?readMetadataIfPresent(_0x5a1efd)?.[_0x153738(0x155)]:undefined,_0x12e166=readMetadataIfPresent(resolve(_0x188501,METADATA_FILE))?.[_0x153738(0x155)];return _0x7cfcbf&&removeSync(_0x1d56bd),copySkillDirectory(_0x188501,_0x1d56bd),{'path':_0x1d56bd,'target':_0x188501,'action':!_0x7cfcbf?_0x153738(0x170):_0x4f3427===_0x12e166?'unchanged':'updated'};}function copySkillDirectory(_0x381bfc,_0xee2b93){copySync(_0x381bfc,_0xee2b93,{'dereference':![],'overwrite':!![],'filter'(_0x5da4d1){const _0x3c3c45=a110_0x5089;if(lstatSync(_0x5da4d1)[_0x3c3c45(0x179)]())throw CliErrors[_0x3c3c45(0x16f)](_0x3c3c45(0x14f)+_0x5da4d1);return!![];}});}
|
|
1
|
+
const a110_0x31efcf=a110_0x3dda;(function(_0x5b7ac3,_0x3d12eb){const _0x420484=a110_0x3dda,_0x1e0bec=_0x5b7ac3();while(!![]){try{const _0x1ea162=-parseInt(_0x420484(0xe3))/0x1*(parseInt(_0x420484(0xe0))/0x2)+-parseInt(_0x420484(0xf6))/0x3*(parseInt(_0x420484(0xf9))/0x4)+-parseInt(_0x420484(0x104))/0x5+-parseInt(_0x420484(0xd8))/0x6+-parseInt(_0x420484(0xe9))/0x7+parseInt(_0x420484(0xef))/0x8*(-parseInt(_0x420484(0xe6))/0x9)+parseInt(_0x420484(0xd7))/0xa;if(_0x1ea162===_0x3d12eb)break;else _0x1e0bec['push'](_0x1e0bec['shift']());}catch(_0x3a1302){_0x1e0bec['push'](_0x1e0bec['shift']());}}}(a110_0x4ae7,0xb49dd));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a110_0x401720 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a110_0x4ae7(){const _0x280be9=['appCode','updated','linked-from-protected-root','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','4mzYQYi','filter','managedRoot','376361hAYLhQ','set','company','6678171BqpsRZ','skillCode','skillRoots','9522513pjVzNe','activeSkillCodes','pruneSkillCodes','slice','skipped','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','8fLZyRI','external-symlink','protectedLinkRoots','runtime-observe','isSymbolicLink','isDirectory','contentHash','21aExyjs','scopes','personal','290908szacri','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','trim','builtin','push','secret-retriever','created','unchanged','length','env','removed','303325kRhkSq','project','values','accessKey','validation','metadata-mismatch','map','skill','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','scope','dir','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','name','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','metadataPath','lovrabet','has','agentsSkillsDir','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','52236710pYhkOB','6354072jTFKJl','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','startsWith','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'];a110_0x4ae7=function(){return _0x280be9;};return a110_0x4ae7();}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}=a110_0x401720,RESERVED_PROJECT_SKILL_CODES=new Set([a110_0x31efcf(0x113),a110_0x31efcf(0xf2),a110_0x31efcf(0xfe)]);export function linkEffectiveRuntimeSkills(_0x440049,_0x3e1c68){const _0x514f59=a110_0x31efcf,_0x512057=new Map();for(const _0x8c8e85 of _0x440049){const _0x4f0033=_0x8c8e85[_0x514f59(0x10b)][_0x514f59(0xe7)];if(!_0x4f0033)continue;const _0x391adf=_0x512057['get'](_0x4f0033);(!_0x391adf||_0x8c8e85[_0x514f59(0x10d)]===_0x514f59(0xf8))&&_0x512057[_0x514f59(0xe4)](_0x4f0033,_0x8c8e85);}const _0x2af3da=[];for(const _0x3b12e5 of _0x512057[_0x514f59(0x106)]()){const _0x180747=requireSkillCode(_0x3b12e5['skill']),_0x166cbe=readMetadataIfPresent(_0x3b12e5[_0x514f59(0x112)]);if(_0x166cbe?.[_0x514f59(0xdc)]!==_0x3e1c68[_0x514f59(0xdc)]||_0x166cbe[_0x514f59(0xe7)]!==_0x180747)throw CliErrors['validation'](_0x514f59(0x10f)+_0x3e1c68['appCode']+':\x20'+_0x3b12e5[_0x514f59(0x112)]);const _0x50d287=runtimeSkillLinkName(_0x3e1c68,_0x180747);for(const _0x3baa0c of _0x3e1c68[_0x514f59(0xe8)]){_0x2af3da[_0x514f59(0xfd)](ensureManagedSymlink(resolve(_0x3baa0c,_0x50d287),_0x3b12e5['dir'],_0x3e1c68,_0x180747));}}return _0x2af3da;}function a110_0x3dda(_0x1a2803,_0x5d5be2){_0x1a2803=_0x1a2803-0xd7;const _0x4ae746=a110_0x4ae7();let _0x3dda3b=_0x4ae746[_0x1a2803];return _0x3dda3b;}export function pruneStaleRuntimeSkillLinks(_0xa95a4d,_0x800c4f,_0x5861e9){const _0x6fefa2=a110_0x31efcf,_0x26efb0=new Set([..._0x800c4f][_0x6fefa2(0x10a)](_0x18f70f=>_0x18f70f[_0x6fefa2(0xfb)]())[_0x6fefa2(0xe1)](Boolean)),_0x403d23=_0x5861e9?new Set([..._0x5861e9][_0x6fefa2(0x10a)](_0x1ee0d5=>_0x1ee0d5[_0x6fefa2(0xfb)]())[_0x6fefa2(0xe1)](Boolean)):undefined,_0x5b6713=[];for(const _0x576511 of _0xa95a4d[_0x6fefa2(0xe8)]){for(const _0x3cbdeb of managedTargetSkillLinkPaths(_0x576511,_0xa95a4d)){const _0x4fa5a3=runtimeSkillCodeFromLink(_0xa95a4d,_0x3cbdeb);if(_0x403d23&&!_0x403d23[_0x6fefa2(0x114)](_0x4fa5a3))continue;if(_0x26efb0[_0x6fefa2(0x114)](_0x4fa5a3))continue;_0x5b6713[_0x6fefa2(0xfd)](removeManagedSkillLink(_0x3cbdeb,_0xa95a4d,_0x4fa5a3));}}return _0x5b6713;}export function pruneStaleRuntimeSkillCache(_0x52d5ab,_0x137f67={}){const _0xf15218=a110_0x31efcf,_0x132cae=new Set([..._0x52d5ab[_0xf15218(0xea)]][_0xf15218(0x10a)](_0x55dc92=>_0x55dc92[_0xf15218(0xfb)]())[_0xf15218(0xe1)](Boolean)),_0x243443=_0x52d5ab[_0xf15218(0xeb)]?new Set([..._0x52d5ab[_0xf15218(0xeb)]][_0xf15218(0x10a)](_0xab8e62=>_0xab8e62[_0xf15218(0xfb)]())['filter'](Boolean)):undefined,_0x192a59=_0x52d5ab[_0xf15218(0xf7)]??['personal',_0xf15218(0xe5)],_0x2da2b0=resolve(getRuntimeSkillCacheRoot(_0x52d5ab[_0xf15218(0x102)],_0x52d5ab[_0xf15218(0x107)],_0x137f67),safePathSegment(_0x52d5ab[_0xf15218(0xdc)],'appCode')),_0x49a63a=[];for(const _0x4bcb18 of _0x192a59){const _0x58061b=resolve(_0x2da2b0,_0x4bcb18);if(!existsSync(_0x58061b))continue;for(const _0x2dcf84 of readdirSync(_0x58061b,{'withFileTypes':!![]})){if(!_0x2dcf84[_0xf15218(0xf4)]())continue;const _0x4e52f5=_0x2dcf84[_0xf15218(0x110)];if(_0x243443&&!_0x243443[_0xf15218(0x114)](_0x4e52f5))continue;if(_0x132cae[_0xf15218(0x114)](_0x4e52f5))continue;const _0x1ceaac=resolve(_0x58061b,_0x4e52f5),_0x3a8aa9=readMetadataIfPresent(resolve(_0x1ceaac,METADATA_FILE));if(_0x3a8aa9?.[_0xf15218(0xdc)]!==_0x52d5ab['appCode']||_0x3a8aa9[_0xf15218(0x10d)]!==_0x4bcb18||_0x3a8aa9[_0xf15218(0xe7)]!==_0x4e52f5){_0x49a63a[_0xf15218(0xfd)]({'path':_0x1ceaac,'action':_0xf15218(0xed),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x1ceaac,_0x52d5ab[_0xf15218(0xf1)]??[])){_0x49a63a[_0xf15218(0xfd)]({'path':_0x1ceaac,'action':'skipped','reason':_0xf15218(0xde)});continue;}removeSync(_0x1ceaac),_0x49a63a[_0xf15218(0xfd)]({'path':_0x1ceaac,'action':_0xf15218(0x103)});}}return _0x49a63a;}export function linkGlobalRuntimeSkills(_0x2047a8,_0x312271={}){const _0x2fc8fc=a110_0x31efcf,_0x31be76=resolveSkillSyncPaths(_0x312271),_0x57f5af=[];for(const _0x3f50fa of _0x2047a8){if(_0x3f50fa['scope']!==_0x2fc8fc(0xfc))throw CliErrors[_0x2fc8fc(0x108)](_0x2fc8fc(0xdb)+_0x3f50fa['scope']);const _0x54dce4=requireSkillCode(_0x3f50fa[_0x2fc8fc(0x10b)]),_0x1a2d52=copyManagedSkillDirectory(_0x3f50fa[_0x2fc8fc(0x10e)],resolve(_0x31be76[_0x2fc8fc(0x115)],_0x54dce4));_0x57f5af[_0x2fc8fc(0xfd)]({..._0x1a2d52,'contentHash':_0x3f50fa[_0x2fc8fc(0xf5)]});}return _0x57f5af;}function ensureManagedSymlink(_0x4f7b18,_0x3af540,_0x9a7a46,_0xde2e8a){const _0x12231e=a110_0x31efcf;mkdirSync(dirname(_0x4f7b18),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4f7b18)||isDanglingSymlink(_0x4f7b18)){const _0x1350bf=lstatSync(_0x4f7b18);if(!_0x1350bf['isSymbolicLink']())throw CliErrors[_0x12231e(0x108)](_0x12231e(0x116)+_0x4f7b18);const _0x27b6a9=resolveSymlinkTarget(_0x4f7b18);if(!isPathInside(realOrResolved(_0x27b6a9),realOrResolved(_0x9a7a46[_0x12231e(0xe2)])))throw CliErrors[_0x12231e(0x108)](_0x12231e(0xd9)+_0x4f7b18);if(realOrResolved(_0x27b6a9)===realOrResolved(_0x3af540))return{'path':_0x4f7b18,'target':_0x3af540,'action':_0x12231e(0x100)};const _0x4f2d5a=readMetadataIfPresent(resolve(_0x27b6a9,METADATA_FILE));if(_0x9a7a46[_0x12231e(0x10d)]==='project'&&(_0x4f2d5a?.[_0x12231e(0xdc)]!==_0x9a7a46[_0x12231e(0xdc)]||_0x4f2d5a[_0x12231e(0xe7)]!==_0xde2e8a))throw CliErrors['validation'](_0x12231e(0xfa)+_0x4f7b18);return unlinkSync(_0x4f7b18),symlinkSync(_0x3af540,_0x4f7b18,_0x12231e(0x10e)),{'path':_0x4f7b18,'target':_0x3af540,'action':_0x12231e(0xdd)};}return symlinkSync(_0x3af540,_0x4f7b18,_0x12231e(0x10e)),{'path':_0x4f7b18,'target':_0x3af540,'action':_0x12231e(0xff)};}function managedTargetSkillLinkPaths(_0x50ffd7,_0x57e575){const _0x1fd43e=a110_0x31efcf;if(!existsSync(_0x50ffd7))return[];const _0x4c891e=_0x57e575[_0x1fd43e(0xdc)]+'--';return readdirSync(_0x50ffd7,{'withFileTypes':!![]})[_0x1fd43e(0xe1)](_0x5da330=>_0x57e575[_0x1fd43e(0x10d)]==='project'||_0x5da330[_0x1fd43e(0x110)][_0x1fd43e(0xda)](_0x4c891e))[_0x1fd43e(0x10a)](_0xdfb19e=>resolve(_0x50ffd7,_0xdfb19e['name']));}function removeManagedSkillLink(_0x2a44b8,_0x4e0685,_0x3b6d95){const _0x57f1ba=a110_0x31efcf,_0x2fd648=lstatIfPresent(_0x2a44b8);if(!_0x2fd648?.[_0x57f1ba(0xf3)]())return{'path':_0x2a44b8,'action':_0x57f1ba(0xed),'reason':'not-managed-symlink'};const _0xc22aad=resolveSymlinkTarget(_0x2a44b8);if(!isPathInside(realOrResolved(_0xc22aad),realOrResolved(_0x4e0685['managedRoot'])))return{'path':_0x2a44b8,'action':_0x57f1ba(0xed),'reason':_0x57f1ba(0xf0)};const _0x10dec3=readMetadataIfPresent(resolve(_0xc22aad,METADATA_FILE));if(_0x4e0685[_0x57f1ba(0x10d)]===_0x57f1ba(0x105)&&(_0x10dec3?.['appCode']!==_0x4e0685[_0x57f1ba(0xdc)]||_0x10dec3[_0x57f1ba(0xe7)]!==_0x3b6d95))return{'path':_0x2a44b8,'action':_0x57f1ba(0xed),'reason':_0x57f1ba(0x109)};return unlinkSync(_0x2a44b8),{'path':_0x2a44b8,'action':_0x57f1ba(0x103)};}function isLinkedFromAnyRoot(_0x4a87de,_0x4e337d){const _0x1ed826=a110_0x31efcf,_0x479aab=realOrResolved(_0x4a87de);for(const _0x4fcae6 of _0x4e337d){if(!existsSync(_0x4fcae6))continue;for(const _0x3805e1 of readdirSync(_0x4fcae6,{'withFileTypes':!![]})){if(!_0x3805e1[_0x1ed826(0xf3)]())continue;const _0x1acdb6=resolve(_0x4fcae6,_0x3805e1['name']);if(realOrResolved(resolveSymlinkTarget(_0x1acdb6))===_0x479aab)return!![];}}return![];}function runtimeSkillLinkName(_0x39cd85,_0x53159e){const _0x5cda08=a110_0x31efcf,_0x129758=safePathSegment(_0x53159e,'skillCode');if(_0x39cd85['scope']==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x5cda08(0x114)](_0x129758))throw CliErrors[_0x5cda08(0x108)](_0x5cda08(0xdf)+_0x129758);return _0x39cd85[_0x5cda08(0x10d)]===_0x5cda08(0x105)?_0x129758:_0x39cd85[_0x5cda08(0xdc)]+'--'+_0x129758;}function runtimeSkillCodeFromLink(_0x405204,_0x3bd97d){const _0x53a2f4=a110_0x31efcf,_0x22c67e=basename(_0x3bd97d);return _0x405204[_0x53a2f4(0x10d)]==='project'?_0x22c67e:_0x22c67e[_0x53a2f4(0xec)]((_0x405204[_0x53a2f4(0xdc)]+'--')[_0x53a2f4(0x101)]);}export function copyManagedSkillDirectory(_0x228920,_0x4b1451){const _0x135f47=a110_0x31efcf,_0x3e9f9a=resolve(_0x4b1451,METADATA_FILE),_0xa4ae25=existsSync(_0x4b1451);if(_0xa4ae25){const _0x5b612c=lstatSync(_0x4b1451);if(_0x5b612c['isSymbolicLink']())throw CliErrors[_0x135f47(0x108)](_0x135f47(0x10c)+_0x4b1451);if(!_0x5b612c[_0x135f47(0xf4)]())throw CliErrors[_0x135f47(0x108)](_0x135f47(0x111)+_0x4b1451);const _0x988064=readMetadataIfPresent(_0x3e9f9a);if(_0x988064?.[_0x135f47(0x10d)]!==_0x135f47(0xfc))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x4b1451);}ensureDirSync(dirname(_0x4b1451));const _0x29f6f0=_0xa4ae25?readMetadataIfPresent(_0x3e9f9a)?.[_0x135f47(0xf5)]:undefined,_0x55d1a5=readMetadataIfPresent(resolve(_0x228920,METADATA_FILE))?.[_0x135f47(0xf5)];return _0xa4ae25&&removeSync(_0x4b1451),copySkillDirectory(_0x228920,_0x4b1451),{'path':_0x4b1451,'target':_0x228920,'action':!_0xa4ae25?_0x135f47(0xff):_0x29f6f0===_0x55d1a5?_0x135f47(0x100):_0x135f47(0xdd)};}function copySkillDirectory(_0x4a6708,_0x557c48){copySync(_0x4a6708,_0x557c48,{'dereference':![],'overwrite':!![],'filter'(_0x59d0cc){const _0x6a2718=a110_0x3dda;if(lstatSync(_0x59d0cc)['isSymbolicLink']())throw CliErrors['validation'](_0x6a2718(0xee)+_0x59d0cc);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x132ab4,_0x45ea25){const _0xe3d712=a111_0x2bed,_0x224c5b=_0x132ab4();while(!![]){try{const _0x3e74a3=parseInt(_0xe3d712(0x1ff))/0x1+parseInt(_0xe3d712(0x1eb))/0x2*(parseInt(_0xe3d712(0x1ef))/0x3)+-parseInt(_0xe3d712(0x1fa))/0x4*(-parseInt(_0xe3d712(0x211))/0x5)+parseInt(_0xe3d712(0x219))/0x6*(-parseInt(_0xe3d712(0x214))/0x7)+parseInt(_0xe3d712(0x20e))/0x8*(parseInt(_0xe3d712(0x1f3))/0x9)+-parseInt(_0xe3d712(0x216))/0xa*(parseInt(_0xe3d712(0x1f0))/0xb)+-parseInt(_0xe3d712(0x1f2))/0xc*(parseInt(_0xe3d712(0x215))/0xd);if(_0x3e74a3===_0x45ea25)break;else _0x224c5b['push'](_0x224c5b['shift']());}catch(_0x1f7d38){_0x224c5b['push'](_0x224c5b['shift']());}}}(a111_0x149b,0xcac37));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a111_0x149b(){const _0x2af08c=['source','link','local','from','map','skillRoots','project','linkedPath','includes','push','scope','cacheDir','appCode','builtin','76704pXhaCp','accessKey','linkedPaths','3860405tDyEZe','filter','localeCompare','706881cqSyhc','525993edcpWT','50ZLjrrv','has','trim','24yMuTKh','values','tags','58600xSWoLQ','name','skillCode','sort','168UKZqgn','737110XfyUfT','scopes','708vihWlJ','540VSkGFD','get','cache','isArray','startsWith','isDirectory','code','8GPdiSZ','dir','metadataPath','\x20!=\x20','isSymbolicLink','196458LLtVsR'];a111_0x149b=function(){return _0x2af08c;};return a111_0x149b();}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(_0xfcb479,_0x3130eb,_0xad4fd3={}){const _0x31dde1=a111_0x2bed,_0x408ba8=safePathSegment(_0xfcb479[_0x31dde1(0x20c)],_0x31dde1(0x20c));if(_0x3130eb[_0x31dde1(0x20c)]!==_0x408ba8)throw CliErrors['validation']('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x3130eb['appCode']+_0x31dde1(0x1fd)+_0x408ba8);const _0x39857f=normalizeRuntimeSkillScopes(_0xfcb479[_0x31dde1(0x1f1)]),_0x46799e=new Set(_0x39857f),_0x304998=_0xfcb479['code']?.[_0x31dde1(0x218)](),_0x544fe0=new Map(),_0x3f61ab=resolve(getRuntimeSkillCacheRoot(_0xfcb479['env'],_0xfcb479[_0x31dde1(0x20f)],_0xad4fd3),_0x408ba8);for(const _0x29937b of _0x39857f){for(const _0x354711 of localSkillEntryDirs(resolve(_0x3f61ab,_0x29937b))){collectLocalRuntimeSkill(_0x544fe0,_0x354711,{'appCode':_0x408ba8,'scopes':_0x46799e,'code':_0x304998,'source':_0x31dde1(0x1f5)});}}for(const _0x26a0e6 of _0x3130eb[_0x31dde1(0x205)]){for(const _0x21b435 of localSkillLinkCandidates(_0x26a0e6,_0x3130eb,_0x46799e)){collectLocalRuntimeSkill(_0x544fe0,_0x21b435,{'appCode':_0x408ba8,'scopes':_0x46799e,'code':_0x304998,'source':_0x31dde1(0x201),'linkedPath':_0x21b435});}}return Array[_0x31dde1(0x203)](_0x544fe0[_0x31dde1(0x1e9)]())[_0x31dde1(0x1ee)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x88a17e){const _0x4c0ca6=a111_0x2bed;if(!existsSync(_0x88a17e))return[];return readdirSync(_0x88a17e,{'withFileTypes':!![]})[_0x4c0ca6(0x212)](_0x5b09a6=>_0x5b09a6['isDirectory']()||_0x5b09a6[_0x4c0ca6(0x1fe)]())[_0x4c0ca6(0x204)](_0x1b7eca=>resolve(_0x88a17e,_0x1b7eca['name']));}function a111_0x2bed(_0x10c0db,_0x12204c){_0x10c0db=_0x10c0db-0x1e9;const _0x149bb6=a111_0x149b();let _0x2bed88=_0x149bb6[_0x10c0db];return _0x2bed88;}function localSkillLinkCandidates(_0x4d94a6,_0x4dc9da,_0x2933a1){const _0x4d35b5=a111_0x2bed;if(!existsSync(_0x4d94a6))return[];const _0x1b03af=_0x4dc9da[_0x4d35b5(0x20c)]+'--';return readdirSync(_0x4d94a6,{'withFileTypes':!![]})[_0x4d35b5(0x212)](_0x4eec18=>_0x4eec18[_0x4d35b5(0x1f8)]()||_0x4eec18['isSymbolicLink']())[_0x4d35b5(0x212)](_0x5ed0fa=>_0x4dc9da['scope']===_0x4d35b5(0x206)||_0x5ed0fa[_0x4d35b5(0x1ec)][_0x4d35b5(0x1f7)](_0x1b03af)||_0x2933a1[_0x4d35b5(0x217)](_0x4d35b5(0x20d)))[_0x4d35b5(0x204)](_0x5d7604=>resolve(_0x4d94a6,_0x5d7604[_0x4d35b5(0x1ec)]));}function collectLocalRuntimeSkill(_0x1636dd,_0x1f25e4,_0x4b811c){const _0x13d519=a111_0x2bed,_0x4ecfee=resolve(_0x1f25e4,METADATA_FILE),_0x314ea2=readMetadataIfPresent(_0x4ecfee);if(!_0x314ea2)return;if(_0x314ea2['appCode']!==_0x4b811c[_0x13d519(0x20c)])return;if(!isRuntimeSkillScope(_0x314ea2[_0x13d519(0x20a)])||!_0x4b811c[_0x13d519(0x1f1)][_0x13d519(0x217)](_0x314ea2[_0x13d519(0x20a)]))return;const _0x4fca14=_0x314ea2['skillCode']?.[_0x13d519(0x218)]();if(!_0x4fca14)return;if(_0x4b811c[_0x13d519(0x1f9)]&&_0x4fca14!==_0x4b811c[_0x13d519(0x1f9)])return;const _0x407d69=_0x314ea2[_0x13d519(0x20a)]+':'+_0x4fca14,_0x164426=_0x4b811c['linkedPath']?[_0x4b811c[_0x13d519(0x207)]]:[],_0x1b84e5=_0x1636dd[_0x13d519(0x1f4)](_0x407d69);if(_0x1b84e5){_0x4b811c[_0x13d519(0x200)]===_0x13d519(0x1f5)&&(_0x1b84e5[_0x13d519(0x1fb)]=_0x1f25e4,_0x1b84e5[_0x13d519(0x20b)]=_0x1f25e4,_0x1b84e5['skillMdPath']=resolve(_0x1f25e4,SKILL_FILE),_0x1b84e5[_0x13d519(0x1fc)]=_0x4ecfee);for(const _0x3a2ef7 of _0x164426){!_0x1b84e5[_0x13d519(0x210)][_0x13d519(0x208)](_0x3a2ef7)&&_0x1b84e5[_0x13d519(0x210)][_0x13d519(0x209)](_0x3a2ef7);}_0x1b84e5['linkedPaths'][_0x13d519(0x1ee)]();return;}_0x1636dd['set'](_0x407d69,{..._0x314ea2,'tags':Array[_0x13d519(0x1f6)](_0x314ea2[_0x13d519(0x1ea)])?_0x314ea2['tags']:[],'scope':_0x314ea2['scope'],'source':_0x13d519(0x202),'dir':_0x1f25e4,'cacheDir':_0x4b811c[_0x13d519(0x200)]===_0x13d519(0x1f5)?_0x1f25e4:undefined,'skillMdPath':resolve(_0x1f25e4,SKILL_FILE),'metadataPath':_0x4ecfee,'linkedPaths':_0x164426});}function compareLocalRuntimeSkills(_0x3ec3e3,_0x590096){const _0x128954=a111_0x2bed,_0x1bc480={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1bc480[_0x3ec3e3['scope']]-_0x1bc480[_0x590096[_0x128954(0x20a)]]||_0x3ec3e3[_0x128954(0x1ed)][_0x128954(0x213)](_0x590096[_0x128954(0x1ed)])||_0x3ec3e3[_0x128954(0x1fb)][_0x128954(0x213)](_0x590096['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22c5e2,_0x4bc00d){const _0x30a8a8=a112_0x13e3,_0x412ab5=_0x22c5e2();while(!![]){try{const _0x1e18c9=-parseInt(_0x30a8a8(0xb6))/0x1+parseInt(_0x30a8a8(0xbf))/0x2*(-parseInt(_0x30a8a8(0xa3))/0x3)+-parseInt(_0x30a8a8(0x9f))/0x4+-parseInt(_0x30a8a8(0x99))/0x5*(-parseInt(_0x30a8a8(0x9a))/0x6)+parseInt(_0x30a8a8(0xa5))/0x7*(parseInt(_0x30a8a8(0xa8))/0x8)+-parseInt(_0x30a8a8(0xbd))/0x9+parseInt(_0x30a8a8(0xba))/0xa*(parseInt(_0x30a8a8(0xaa))/0xb);if(_0x1e18c9===_0x4bc00d)break;else _0x412ab5['push'](_0x412ab5['shift']());}catch(_0xef8644){_0x412ab5['push'](_0x412ab5['shift']());}}}(a112_0x3dcc,0x3a0c6));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x7c6919){const _0x52f555=a112_0x13e3;return _0x7c6919[_0x52f555(0xb3)]??Buffer[_0x52f555(0xab)](_0x7c6919['content']??'','utf8');}export function fileText(_0x5127fe){const _0x54431b=a112_0x13e3;return fileContent(_0x5127fe)[_0x54431b(0xb0)](_0x54431b(0x96));}function a112_0x13e3(_0x2df5b3,_0x244883){_0x2df5b3=_0x2df5b3-0x93;const _0x3dcc9b=a112_0x3dcc();let _0x13e36e=_0x3dcc9b[_0x2df5b3];return _0x13e36e;}export function normalizeLocalFiles(_0x5a8930){const _0x2d4c11=a112_0x13e3;if(!Array[_0x2d4c11(0xb8)](_0x5a8930)||_0x5a8930['length']===0x0)return[];const _0x446622=new Map();for(const _0x39d397 of _0x5a8930){if(!_0x39d397||typeof _0x39d397!==_0x2d4c11(0xa4)||typeof _0x39d397[_0x2d4c11(0xb4)]!==_0x2d4c11(0xb1))throw CliErrors[_0x2d4c11(0x93)](_0x2d4c11(0xb7));const _0x266fcc=normalizeSkillRelativePath(_0x39d397[_0x2d4c11(0xb4)]);if(_0x446622[_0x2d4c11(0x9d)](_0x266fcc))throw CliErrors[_0x2d4c11(0x93)](_0x2d4c11(0xb9)+_0x266fcc);if(_0x39d397[_0x2d4c11(0xb3)]!==undefined&&!Buffer[_0x2d4c11(0xac)](_0x39d397[_0x2d4c11(0xb3)]))throw CliErrors['validation'](_0x2d4c11(0x9c)+_0x266fcc);if(_0x39d397['bytes']===undefined&&typeof _0x39d397[_0x2d4c11(0xae)]!==_0x2d4c11(0xb1))throw CliErrors[_0x2d4c11(0x93)](_0x2d4c11(0xa6)+_0x266fcc);const _0x1be130=fileContent(_0x39d397);_0x446622[_0x2d4c11(0x98)](_0x266fcc,{'path':_0x266fcc,'bytes':_0x1be130});}return Array[_0x2d4c11(0xab)](_0x446622[_0x2d4c11(0xa7)]())[_0x2d4c11(0xbb)](compareSkillFiles);}export function normalizeManifestFiles(_0x187641){const _0x42fd10=a112_0x13e3;if(!Array[_0x42fd10(0xb8)](_0x187641)||_0x187641['length']===0x0)return[];const _0x10a8a7=new Map();for(const _0x37200b of _0x187641){if(!_0x37200b||typeof _0x37200b!=='object'||typeof _0x37200b['path']!==_0x42fd10(0xb1))throw CliErrors[_0x42fd10(0x93)](_0x42fd10(0xb7));const _0x4e928a=normalizeSkillRelativePath(_0x37200b['path']);if(_0x10a8a7[_0x42fd10(0x9d)](_0x4e928a))throw CliErrors[_0x42fd10(0x93)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4e928a);if(!isSha256Hex(_0x37200b['sha256']))throw CliErrors['validation'](_0x42fd10(0xc1)+_0x4e928a);if(!Number[_0x42fd10(0xaf)](_0x37200b['size'])||_0x37200b[_0x42fd10(0xbe)]<0x0)throw CliErrors[_0x42fd10(0x93)](_0x42fd10(0x9e)+_0x4e928a);_0x10a8a7[_0x42fd10(0x98)](_0x4e928a,{'path':_0x4e928a,'sha256':_0x37200b['sha256'][_0x42fd10(0xad)](),'size':_0x37200b[_0x42fd10(0xbe)]});}return Array[_0x42fd10(0xab)](_0x10a8a7[_0x42fd10(0xa7)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x535465){const _0x737f7a=realpathSync(_0x535465),_0x43f1da=[];function _0x5eec1d(_0x59adb2){const _0x126092=a112_0x13e3,_0x385f3d=readdirSync(_0x59adb2,{'withFileTypes':!![]})[_0x126092(0xbb)]((_0xe24b06,_0x5566a7)=>_0xe24b06[_0x126092(0x97)][_0x126092(0xc0)](_0x5566a7[_0x126092(0x97)]));for(const _0x2c71bc of _0x385f3d){if(_0x2c71bc['isDirectory']()&&IGNORED_DIR_NAMES[_0x126092(0x9d)](_0x2c71bc['name']))continue;if(IGNORED_FILE_NAMES[_0x126092(0x9d)](_0x2c71bc[_0x126092(0x97)]))continue;const _0x471dbb=resolve(_0x59adb2,_0x2c71bc[_0x126092(0x97)]);if(_0x2c71bc['isSymbolicLink']())throw CliErrors[_0x126092(0x93)](_0x126092(0xa0)+_0x471dbb);const _0x5b92a4=toPosixPath(relative(_0x737f7a,_0x471dbb));if(_0x2c71bc[_0x126092(0xa1)]()){_0x5eec1d(_0x471dbb);continue;}if(!_0x2c71bc[_0x126092(0x9b)]())continue;validateSkillRelativePath(_0x5b92a4);const _0x589fbc=readFileSync(_0x471dbb);_0x43f1da[_0x126092(0xc2)]({'path':_0x5b92a4,'bytes':_0x589fbc});}}return _0x5eec1d(_0x737f7a),normalizeLocalFiles(_0x43f1da);}export function compareSkillFiles(_0x22391b,_0x43b7a1){const _0x2e0067=a112_0x13e3;if(_0x22391b[_0x2e0067(0xb4)]===SKILL_FILE)return _0x43b7a1['path']===SKILL_FILE?0x0:-0x1;if(_0x43b7a1[_0x2e0067(0xb4)]===SKILL_FILE)return 0x1;return Buffer[_0x2e0067(0xb2)](Buffer[_0x2e0067(0xab)](_0x22391b[_0x2e0067(0xb4)],'utf8'),Buffer[_0x2e0067(0xab)](_0x43b7a1[_0x2e0067(0xb4)],_0x2e0067(0x96)));}export function normalizeSkillRelativePath(_0x23636b){const _0x56e6d1=a112_0x13e3,_0x5a9e4e=toPosixPath(_0x23636b[_0x56e6d1(0x94)]());return validateSkillRelativePath(_0x5a9e4e),_0x5a9e4e;}export function validateSkillRelativePath(_0x170e0b){const _0x1b5b8c=a112_0x13e3;if(!_0x170e0b||_0x170e0b[_0x1b5b8c(0xa2)]('/')||_0x170e0b[_0x1b5b8c(0x95)]('//'))throw CliErrors[_0x1b5b8c(0x93)](_0x1b5b8c(0xb5)+_0x170e0b);for(const _0xf18370 of _0x170e0b['split']('/')){if(!_0xf18370||_0xf18370==='.'||_0xf18370==='..')throw CliErrors[_0x1b5b8c(0x93)](_0x1b5b8c(0xb5)+_0x170e0b);}}export function toPosixPath(_0x34c3d2){const _0x19187c=a112_0x13e3;return _0x34c3d2[_0x19187c(0xbc)](/\\/g,'/');}export function isSha256Hex(_0x957a53){const _0x5bf6b9=a112_0x13e3;return typeof _0x957a53===_0x5bf6b9(0xb1)&&/^[a-fA-F0-9]{64}$/[_0x5bf6b9(0xa9)](_0x957a53);}function a112_0x3dcc(){const _0x105a17=['values','3656288Kkkvgi','test','11FxOuNX','from','isBuffer','toLowerCase','content','isSafeInteger','toString','string','compare','bytes','path','Unsafe\x20Skill\x20file\x20path:\x20','149882OQsIuP','Skill\x20file\x20path\x20must\x20be\x20text.','isArray','Duplicate\x20Skill\x20file\x20path:\x20','4981490iciiRO','sort','replace','107973CdcSkl','size','38cDwwiu','localeCompare','Skill\x20file\x20sha256\x20is\x20invalid:\x20','push','validation','trim','includes','utf8','name','set','10FYyDtW','658662AlNygm','isFile','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','has','Skill\x20file\x20size\x20is\x20invalid:\x20','1791884uMhHEY','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','isDirectory','startsWith','51651lxcUGl','object','7sJaYkT','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'];a112_0x3dcc=function(){return _0x105a17;};return a112_0x3dcc();}
|