@lovrabet/lovrabet-cli 2.1.21 → 2.1.22-beta.2
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/README.md +1 -1
- 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.d.ts +4 -0
- package/lib/commands/skill/commands/diagram.js +1 -0
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.d.ts +5 -0
- package/lib/commands/skill/diagram.js +1 -0
- package/lib/commands/skill/flags.d.ts +6 -0
- 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.d.ts +4 -0
- 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.d.ts +52 -0
- 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 +3 -1
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x43a065,_0x4693b7){const _0x1a0603=a92_0x561e,_0x329db1=_0x43a065();while(!![]){try{const _0x2b6d8a=-parseInt(_0x1a0603(0x159))/0x1*(-parseInt(_0x1a0603(0x150))/0x2)+-parseInt(_0x1a0603(0x15a))/0x3+-parseInt(_0x1a0603(0x15d))/0x4+parseInt(_0x1a0603(0x18a))/0x5+parseInt(_0x1a0603(0x182))/0x6*(parseInt(_0x1a0603(0x14c))/0x7)+-parseInt(_0x1a0603(0x189))/0x8+parseInt(_0x1a0603(0x168))/0x9*(parseInt(_0x1a0603(0x188))/0xa);if(_0x2b6d8a===_0x4693b7)break;else _0x329db1['push'](_0x329db1['shift']());}catch(_0x1fb88f){_0x329db1['push'](_0x329db1['shift']());}}}(a92_0x1552,0x83177));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(_0x35cb02){const _0x2764dd=a92_0x561e;return void _0x35cb02,AUTH_MODE[_0x2764dd(0x177)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x2bffc1,_0x5dc3b3){const _0x39529f=a92_0x561e,_0x4a53b9=typeof _0x5dc3b3[_0x39529f(0x16e)]==='string'&&_0x5dc3b3[_0x39529f(0x16e)][_0x39529f(0x165)]();return{'rawFlags':_0x5dc3b3,'appCode':_0x2bffc1[_0x39529f(0x15c)]||productEnv(_0x39529f(0x152))||(_0x4a53b9?undefined:readAppCodeFromConfig()),'appCodeSource':_0x2bffc1[_0x39529f(0x151)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x5dc3b3),'defaultFormat':_0x2bffc1[_0x39529f(0x171)],'defaultPageSize':_0x2bffc1[_0x39529f(0x156)],'defaultVerbose':_0x2bffc1[_0x39529f(0x181)],'riskLevel':_0x2bffc1[_0x39529f(0x172)],'accessKey':_0x2bffc1[_0x39529f(0x16a)],'env':_0x2bffc1[_0x39529f(0x176)],'mergedCli':{'defaultApp':_0x2bffc1[_0x39529f(0x163)],'currentApp':_0x2bffc1[_0x39529f(0x16f)],'appCode':_0x2bffc1[_0x39529f(0x15c)]}};}export function createLovrabetRunnerAdapter(_0x278789={}){const _0x4ebec2=a92_0x561e,_0x2e3aa4={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x4ebec2(0x18b)](_0x1ac239=>PIPELINE_FLAG_NAMES['has'](_0x1ac239[_0x4ebec2(0x170)]))[_0x4ebec2(0x17c)](({name:_0x279e76,type:_0x3bd618,description:_0x4105c5})=>({'name':_0x279e76,'type':_0x3bd618,'description':_0x4105c5})),'formatOutput':_0x278789[_0x4ebec2(0x15e)]??formatOutput,'getCommandLabel'(_0x19e584){const _0x9a808e=_0x4ebec2;return CLI_BIN_NAME+'\x20'+_0x19e584[_0x9a808e(0x16c)]+'\x20'+_0x19e584['command'];},'riskPolicy':{'onViolation'(_0x3959e3){console['error'](_0x3959e3);},'createError'(_0x4b8aef){return CliErrors['cancelled'](_0x4b8aef);}},async 'prepare'(_0x46af50,_0x2c3616){const _0xdd35dd=_0x4ebec2,_0x18fc60=resolveAuthMode(_0x2c3616);if(_0x46af50[_0xdd35dd(0x185)]!==![]){if(!_0x2c3616['accessKey'])throw CliErrors['authRequired'](_0xdd35dd(0x173)+PRODUCT_CONFIG[_0xdd35dd(0x158)]+_0xdd35dd(0x167)+productEnvName(_0xdd35dd(0x18e))+'.');const {setActiveAK:_0x3c10df}=await import('../core/api-client.js');_0x3c10df(_0x2c3616['accessKey']);}let _0x5c7490='';if(_0x46af50[_0xdd35dd(0x153)]!==![]){_0x5c7490=_0x2c3616[_0xdd35dd(0x15c)]??'',_0x5c7490=await resolveExplicitAppName(_0x46af50,_0x2c3616,_0x5c7490);if(!_0x5c7490){await assertSelectedAppNameIsRuntimeAccessible(_0x46af50,_0x2c3616);throw CliErrors[_0xdd35dd(0x17d)](_0xdd35dd(0x18d)+PRODUCT_CONFIG[_0xdd35dd(0x158)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x46af50,_0x2c3616,_0x5c7490);}if(_0x5c7490){const {initSdkClient:_0x126070}=await import('../core/sdk-client.js');_0x126070({'appCode':_0x5c7490,'env':_0x2c3616[_0xdd35dd(0x176)]??_0xdd35dd(0x178),'accessKey':_0x2c3616[_0xdd35dd(0x16a)],'authMode':_0x18fc60}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2c3616[_0xdd35dd(0x166)]},'numbers':{'pagesize':_0x2c3616[_0xdd35dd(0x162)]}},'extras':{'appCode':_0x5c7490,'cookie':'','apiDomain':_0x2c3616[_0xdd35dd(0x184)],'apiDir':'','accessKey':_0x2c3616[_0xdd35dd(0x16a)],'envName':_0x2c3616[_0xdd35dd(0x176)],'mergedCli':_0x2c3616[_0xdd35dd(0x180)]}};},'confirmHighRisk':_0x278789['confirmHighRisk']??(async({def:_0x183251,env:_0x58e355,flags:_0x55d454,commandLabel:_0x5a7ef4})=>{const _0x83edbd=_0x4ebec2;if(_0x58e355[_0x83edbd(0x14e)]){const _0x1b459b=reconstructCommandArgv(_0x183251,_0x55d454);throw CliErrors[_0x83edbd(0x169)](_0x83edbd(0x186)+_0x5a7ef4+_0x83edbd(0x157)+(_0x83edbd(0x164)+_0x1b459b));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x183251,_0x5a7ef4,_0x55d454),'createCancelledError':_0xc8e2a3=>CliErrors['cancelled'](_0xc8e2a3)});}),'mapDryRunError'(_0x561971){return mapUserFacingExecuteError(_0x561971);},'mapExecuteError'(_0x260f4e){return mapUserFacingExecuteError(_0x260f4e);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x2e3aa4;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x2f131f=a92_0x561e;try{if(sdkClientInitialized){const {clearSdkClient:_0x28f3f5}=await import('../core/sdk-client.js');_0x28f3f5();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x176734}=await import(_0x2f131f(0x179));_0x176734();}}async function resolveExplicitAppName(_0x468e8d,_0x2130e6,_0x1483ab){const _0x330c15=a92_0x561e;if(_0x468e8d[_0x330c15(0x153)]===![])return _0x1483ab;const _0x54bd78=typeof _0x2130e6[_0x330c15(0x15f)][_0x330c15(0x16e)]==='string'?_0x2130e6[_0x330c15(0x15f)][_0x330c15(0x16e)][_0x330c15(0x165)]():'';if(!_0x54bd78)return _0x1483ab;const _0x476d9c=typeof _0x2130e6[_0x330c15(0x15f)][_0x330c15(0x160)]==='string'&&_0x2130e6[_0x330c15(0x15f)]['appcode'][_0x330c15(0x165)]()||productEnv('APPCODE');if(_0x476d9c||_0x2130e6['appCodeSource']===_0x330c15(0x155))return _0x1483ab;const {getRemoteAppList:_0x2b3ed0}=await import(_0x330c15(0x17f)),_0x2c1aec=await _0x2b3ed0({'env':_0x2130e6[_0x330c15(0x176)]??_0x330c15(0x178),'accessKey':_0x2130e6[_0x330c15(0x16a)]}),_0x6397a5=findAppByName(_0x2c1aec['items'],_0x54bd78);if(_0x6397a5&&!isRuntimeAccessibleApp(_0x6397a5))throw runtimeInaccessibleAppError(_0x6397a5,'\x22'+_0x54bd78+'\x22');const _0x85b56b=_0x6397a5?.['appCode']?.[_0x330c15(0x165)]();if(_0x85b56b)return _0x85b56b;throw CliErrors[_0x330c15(0x169)](_0x330c15(0x17b)+_0x54bd78,_0x330c15(0x16b)+CLI_BIN_NAME+_0x330c15(0x183)+_0x54bd78+_0x330c15(0x18c)+PRODUCT_CONFIG[_0x330c15(0x158)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4c6445,_0x20541f){const _0x522218=a92_0x561e;if(_0x4c6445[_0x522218(0x153)]===![]||!_0x20541f[_0x522218(0x16a)])return;const _0x74d51a=(typeof _0x20541f[_0x522218(0x15f)][_0x522218(0x16e)]===_0x522218(0x14f)&&_0x20541f[_0x522218(0x15f)][_0x522218(0x16e)][_0x522218(0x165)]()?_0x20541f[_0x522218(0x15f)][_0x522218(0x16e)]:_0x20541f[_0x522218(0x180)]?.[_0x522218(0x16f)]??_0x20541f[_0x522218(0x180)]?.[_0x522218(0x163)])?.[_0x522218(0x165)]();if(!_0x74d51a)return;const {getRemoteAppList:_0x47b963}=await import('../commands/app/remote-source.js'),_0x5d8311=await _0x47b963({'env':_0x20541f[_0x522218(0x176)]??'production','accessKey':_0x20541f[_0x522218(0x16a)]}),_0x22e785=findAppByName(_0x5d8311[_0x522218(0x175)],_0x74d51a);if(_0x22e785&&!isRuntimeAccessibleApp(_0x22e785))throw runtimeInaccessibleAppError(_0x22e785,'\x22'+_0x74d51a+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x36c213,_0x262e9a,_0x3d8014){const _0x52ac1d=a92_0x561e;if(_0x36c213[_0x52ac1d(0x153)]===![]||!_0x262e9a[_0x52ac1d(0x16a)])return;const {getRemoteAppList:_0x317d71}=await import('../commands/app/remote-source.js'),_0x1f0cfa=await _0x317d71({'env':_0x262e9a['env']??_0x52ac1d(0x178),'accessKey':_0x262e9a[_0x52ac1d(0x16a)]}),_0x512899=findAppByCode(_0x1f0cfa[_0x52ac1d(0x175)],_0x3d8014);if(_0x512899&&!isRuntimeAccessibleApp(_0x512899))throw runtimeInaccessibleAppError(_0x512899,_0x52ac1d(0x16d)+_0x3d8014+'\x22');}function a92_0x561e(_0x53189f,_0x4bf555){_0x53189f=_0x53189f-0x14c;const _0x155235=a92_0x1552();let _0x561e0e=_0x155235[_0x53189f];return _0x561e0e;}function a92_0x1552(){const _0x4a9258=['\x20or\x20pass\x20','2693583pryoUU','validation','accessKey','Run\x20`','service','appcode\x20\x22','app','currentApp','name','format','riskLevel','Set\x20accessKey\x20in\x20','execute','items','env','ClientAk','production','../core/api-client.js','_notice','Unknown\x20app:\x20','map','configMissing','nonInteractive','../commands/app/remote-source.js','mergedCli','verbose','114ssMlvI','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','apiDomain','requiresAuth','High-risk\x20operation\x20`','schema','20TindzS','7568848nNuoGG','1125455vMesMN','filter','.appcode\x20to\x20','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','ACCESS_KEY','object','catch','290395fADfwk','update','isNonInteractive','string','17028scWBid','appCodeSource','APPCODE','requiresAppCode','pretty','local-alias','pageSize','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','newConfigFileName','36DOqBtA','474339NshexB','resolve','appCode','1108856eqohQC','formatOutput','rawFlags','appcode','doctor','defaultPageSize','defaultApp','\x20\x20To\x20proceed:\x20','trim','defaultVerbose'];a92_0x1552=function(){return _0x4a9258;};return a92_0x1552();}export async function runCommand(_0x3c06e6,_0x934204,_0x5b8e10=terminalRunnerAdapter){assertKnownCommandFlags(_0x3c06e6,_0x934204['rawFlags']),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x3c06e6)?withUpdateNotice(_0x3c06e6):_0x3c06e6,_0x934204,_0x5b8e10);}function shouldAttachUpdateNotice(_0x2ceb8f){const _0x13c8b6=a92_0x561e;return![_0x13c8b6(0x14d),_0x13c8b6(0x187),_0x13c8b6(0x161)]['includes'](_0x2ceb8f['service']);}function withUpdateNotice(_0x322ee9){return{..._0x322ee9,async 'execute'(_0x57b0ab){const _0x3e9794=a92_0x561e,_0x5b4dbf=shouldResolveUpdateNotice(_0x57b0ab)?resolveLatestUpdateNotice()[_0x3e9794(0x190)](()=>null):Promise[_0x3e9794(0x15b)](null),_0x2cbb37=await _0x322ee9[_0x3e9794(0x174)](_0x57b0ab);return attachUpdateNotice(_0x2cbb37,await _0x5b4dbf);}};}function shouldResolveUpdateNotice(_0x48b9da){const _0x57ce9a=a92_0x561e;return _0x48b9da[_0x57ce9a(0x171)]===_0x57ce9a(0x154)&&!_0x48b9da[_0x57ce9a(0x17e)];}function attachUpdateNotice(_0x13e07d,_0x555e7a){const _0x6003d7=a92_0x561e;if(!_0x555e7a||!_0x13e07d||typeof _0x13e07d!==_0x6003d7(0x18f))return _0x13e07d;const _0x66c980=_0x13e07d,_0x3be42c=typeof _0x66c980[_0x6003d7(0x17a)]==='object'&&_0x66c980[_0x6003d7(0x17a)]!==null?_0x66c980[_0x6003d7(0x17a)]:{};return{..._0x66c980,'_notice':{..._0x3be42c,'update':_0x555e7a}};}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3acd50,_0x258048){const _0x49942b=a95_0x4b39,_0x46aa91=_0x3acd50();while(!![]){try{const _0x313360=-parseInt(_0x49942b(0xf5))/0x1+parseInt(_0x49942b(0xf6))/0x2+parseInt(_0x49942b(0xfb))/0x3*(parseInt(_0x49942b(0xf1))/0x4)+-parseInt(_0x49942b(0xf8))/0x5*(parseInt(_0x49942b(0xf0))/0x6)+-parseInt(_0x49942b(0xff))/0x7+parseInt(_0x49942b(0xf4))/0x8*(-parseInt(_0x49942b(0xfe))/0x9)+-parseInt(_0x49942b(0xfc))/0xa*(-parseInt(_0x49942b(0x100))/0xb);if(_0x313360===_0x258048)break;else _0x46aa91['push'](_0x46aa91['shift']());}catch(_0x4c6680){_0x46aa91['push'](_0x46aa91['shift']());}}}(a95_0x4b42,0x9b9e9));function a95_0x4b39(_0x102683,_0x3d24af){_0x102683=_0x102683-0xf0;const _0x4b4290=a95_0x4b42();let _0x4b3958=_0x4b4290[_0x102683];return _0x4b3958;}function a95_0x4b42(){const _0x24b753=['114XgPNxK','2948228uFFMTs','map','has','15352CKhfqb','601451bHVFpd','518894sMMwdo','none','97175sKqqwe','auth','service','3WFeQZZ','10qzCQqA','commands','1386dwNoof','5809874OvDqiv','19108507qUKbSu','requiresAuth'];a95_0x4b42=function(){return _0x24b753;};return a95_0x4b42();}import{buildSchemaPayload as a95_0x3c8431}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x287e78=a95_0x4b39,{serviceRegistry:_0x3f7da3,findDefinition:_0xa91e1a}=await import('../commands/registry.js'),_0x4ca737=new Set(_0x3f7da3[_0x287e78(0xf2)](_0x209659=>_0x209659['service'])),_0x5c4d1c=listDynamicServiceEntries()['filter'](_0x1c79c9=>!_0x4ca737[_0x287e78(0xf3)](_0x1c79c9[_0x287e78(0xfa)])),_0x3b082d=a95_0x3c8431({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x3f7da3,_0x5c4d1c),'buildAllFlags':buildAllFlags,'findDefinition':(_0x292354,_0xe04eaa)=>_0xa91e1a(_0x292354,_0xe04eaa)??findDynamicServiceDefinition(_0x292354,_0xe04eaa)});return normalizeSchemaPayload(_0x3b082d);}function normalizeSchemaPayload(_0x2ae45b){const _0x4df706=a95_0x4b39;return{..._0x2ae45b,'schemaVersion':0x2,'services':_0x2ae45b['services'][_0x4df706(0xf2)](_0x36a268=>({..._0x36a268,'commands':_0x36a268[_0x4df706(0xfd)][_0x4df706(0xf2)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x655b2){const _0x410fb4=a95_0x4b39,_0x45c0f3=_0x655b2;return{..._0x655b2,'auth':_0x45c0f3[_0x410fb4(0xf9)]??(_0x655b2[_0x410fb4(0x101)]?'required':_0x410fb4(0xf7))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3d9182,_0x4a5cd7){const _0x37090e=a96_0x4018,_0x4c24ce=_0x3d9182();while(!![]){try{const _0x3fc308=-parseInt(_0x37090e(0x198))/0x1+parseInt(_0x37090e(0x195))/0x2+parseInt(_0x37090e(0x197))/0x3+parseInt(_0x37090e(0x19b))/0x4+parseInt(_0x37090e(0x19d))/0x5*(parseInt(_0x37090e(0x194))/0x6)+-parseInt(_0x37090e(0x193))/0x7*(-parseInt(_0x37090e(0x199))/0x8)+-parseInt(_0x37090e(0x19a))/0x9;if(_0x3fc308===_0x4a5cd7)break;else _0x4c24ce['push'](_0x4c24ce['shift']());}catch(_0x21242c){_0x4c24ce['push'](_0x4c24ce['shift']());}}}(a96_0x11f1,0x7691e));export function insertDynamicServicesAfterServiceTree(_0x1b3944,_0xf1232c){const _0x53b736=a96_0x4018;if(_0xf1232c[_0x53b736(0x192)]===0x0)return[..._0x1b3944];const _0xc44cd2=_0x1b3944['findIndex'](_0x3b755b=>_0x3b755b[_0x53b736(0x19c)]===_0x53b736(0x19c));if(_0xc44cd2<0x0)return[..._0x1b3944,..._0xf1232c];return[..._0x1b3944[_0x53b736(0x196)](0x0,_0xc44cd2+0x1),..._0xf1232c,..._0x1b3944[_0x53b736(0x196)](_0xc44cd2+0x1)];}function a96_0x4018(_0x31a2ec,_0x32643d){_0x31a2ec=_0x31a2ec-0x192;const _0x11f1ff=a96_0x11f1();let _0x40185e=_0x11f1ff[_0x31a2ec];return _0x40185e;}function a96_0x11f1(){const _0x505490=['length','7ZrGtZt','18CVgkOt','331168RmGINo','slice','1676841nTKehw','905522YalKSO','757072ommsPr','2166876UeGOgY','449648TnxWeC','service','1167285CpqCcB'];a96_0x11f1=function(){return _0x505490;};return a96_0x11f1();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x561f1a,_0x3d5017){var _0x47589c=a97_0x34cd,_0x41b72c=_0x561f1a();while(!![]){try{var _0x196626=parseInt(_0x47589c(0x195))/0x1*(-parseInt(_0x47589c(0x197))/0x2)+-parseInt(_0x47589c(0x190))/0x3+-parseInt(_0x47589c(0x18e))/0x4+parseInt(_0x47589c(0x192))/0x5+parseInt(_0x47589c(0x191))/0x6*(parseInt(_0x47589c(0x194))/0x7)+-parseInt(_0x47589c(0x193))/0x8*(parseInt(_0x47589c(0x196))/0x9)+parseInt(_0x47589c(0x18f))/0xa;if(_0x196626===_0x3d5017)break;else _0x41b72c['push'](_0x41b72c['shift']());}catch(_0x4df269){_0x41b72c['push'](_0x41b72c['shift']());}}}(a97_0x4a3c,0x57569));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a97_0x34cd(_0x2691aa,_0x5aeda9){_0x2691aa=_0x2691aa-0x18e;var _0x4a3c27=a97_0x4a3c();var _0x34cd72=_0x4a3c27[_0x2691aa];return _0x34cd72;}function a97_0x4a3c(){var _0xa598cc=['1925528twheth','5666410RTCznK','285369PEQFVu','23988nBYhBn','2784510mvfNaZ','14264hpcwcg','217uEvczH','106411VnrFRv','1044ZHGTzJ','2HUeJxo'];a97_0x4a3c=function(){return _0xa598cc;};return a97_0x4a3c();}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.1.
|
|
2
|
-
export declare const GIT_TAG = "v2.1.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.1.22-beta.2";
|
|
2
|
+
export declare const GIT_TAG = "v2.1.22-beta.2";
|
|
3
|
+
export declare const GIT_COMMIT = "3d78f11";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-05T13:16:34.593Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x2d773e=a98_0x3dbe;(function(_0x14ef31,_0x1e024c){const _0x54c8a1=a98_0x3dbe,_0x4d3922=_0x14ef31();while(!![]){try{const _0x9199f7=-parseInt(_0x54c8a1(0xd1))/0x1+-parseInt(_0x54c8a1(0xd0))/0x2+parseInt(_0x54c8a1(0xcb))/0x3+parseInt(_0x54c8a1(0xcc))/0x4*(-parseInt(_0x54c8a1(0xce))/0x5)+parseInt(_0x54c8a1(0xd3))/0x6*(parseInt(_0x54c8a1(0xc9))/0x7)+-parseInt(_0x54c8a1(0xd4))/0x8+parseInt(_0x54c8a1(0xcf))/0x9;if(_0x9199f7===_0x1e024c)break;else _0x4d3922['push'](_0x4d3922['shift']());}catch(_0x3435b5){_0x4d3922['push'](_0x4d3922['shift']());}}}(a98_0x18c8,0x22db7));function a98_0x18c8(){const _0x1d390d=['1926659cylPLr','2026-08-05T13:16:34.593Z','442248bJztwQ','72QeHeoR','v2.1.22-beta.2','18090ehROTz','510066EkImXw','117326iaIxBa','91090odrlTW','2.1.22-beta.2','6XsuzcX','973400ehmCtP'];a98_0x18c8=function(){return _0x1d390d;};return a98_0x18c8();}export const VERSION=a98_0x2d773e(0xd2);function a98_0x3dbe(_0x2d57ad,_0xd0931b){_0x2d57ad=_0x2d57ad-0xc9;const _0x18c8c5=a98_0x18c8();let _0x3dbecb=_0x18c8c5[_0x2d57ad];return _0x3dbecb;}export const GIT_TAG=a98_0x2d773e(0xcd);export const GIT_COMMIT='3d78f11';export const BUILD_TIME=a98_0x2d773e(0xca);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1a372f,_0x18b428){const _0x5d9e9f=a99_0x2aaa,_0x51d2ae=_0x1a372f();while(!![]){try{const _0x869185=parseInt(_0x5d9e9f(0xea))/0x1*(parseInt(_0x5d9e9f(0xec))/0x2)+parseInt(_0x5d9e9f(0xf7))/0x3*(-parseInt(_0x5d9e9f(0xf2))/0x4)+-parseInt(_0x5d9e9f(0xef))/0x5*(parseInt(_0x5d9e9f(0xf6))/0x6)+-parseInt(_0x5d9e9f(0xf1))/0x7*(-parseInt(_0x5d9e9f(0xf8))/0x8)+-parseInt(_0x5d9e9f(0xf3))/0x9+-parseInt(_0x5d9e9f(0xe9))/0xa*(parseInt(_0x5d9e9f(0xe8))/0xb)+parseInt(_0x5d9e9f(0xee))/0xc*(parseInt(_0x5d9e9f(0xf4))/0xd);if(_0x869185===_0x18b428)break;else _0x51d2ae['push'](_0x51d2ae['shift']());}catch(_0x20641d){_0x51d2ae['push'](_0x51d2ae['shift']());}}}(a99_0x316f,0x9a437));import{jsx as a99_0x5b3826,jsxs as a99_0x2451b8}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a99_0x2aaa(_0x3faaf6,_0x397503){_0x3faaf6=_0x3faaf6-0xe8;const _0x316fb3=a99_0x316f();let _0x2aaa6c=_0x316fb3[_0x3faaf6];return _0x2aaa6c;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x13d9d9=a99_0x2aaa,{exit:_0x45ef6d}=useApp();return useEffect(()=>{_0x45ef6d();},[_0x45ef6d]),a99_0x2451b8(Box,{'flexDirection':_0x13d9d9(0xeb),'marginTop':0x1,'marginBottom':0x1,'children':[a99_0x5b3826(Box,{'children':a99_0x5b3826(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a99_0x2451b8(Box,{'marginTop':0x1,'children':[a99_0x5b3826(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a99_0x5b3826(Text,{'bold':!![],'color':_0x13d9d9(0xf5),'children':CLI_BIN_NAME+_0x13d9d9(0xf0)}),a99_0x5b3826(Text,{'dimColor':!![],'children':_0x13d9d9(0xed)})]})]});}function a99_0x316f(){const _0xc196f7=['3430600FrBXio','\x20--help','35YvKcCw','375404YgEslB','4195485NqCiiq','91Tcphcv','green','6FifOXD','3SOMmPk','209048mKKrKB','832282lYwgFW','150ySAjmm','446155ZvcDCy','column','2ahpPVx','\x20to\x20view\x20available\x20commands.','4176204IZOXqM'];a99_0x316f=function(){return _0xc196f7;};return a99_0x316f();}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14a7cb,_0x26efd9){const _0x49ab6f=a100_0x53e1,_0x202751=_0x14a7cb();while(!![]){try{const _0x50cd8e=parseInt(_0x49ab6f(0xd7))/0x1+-parseInt(_0x49ab6f(0xd8))/0x2+-parseInt(_0x49ab6f(0xd0))/0x3+parseInt(_0x49ab6f(0xce))/0x4+parseInt(_0x49ab6f(0xd3))/0x5+parseInt(_0x49ab6f(0xd2))/0x6*(-parseInt(_0x49ab6f(0xd1))/0x7)+parseInt(_0x49ab6f(0xcd))/0x8;if(_0x50cd8e===_0x26efd9)break;else _0x202751['push'](_0x202751['shift']());}catch(_0x477a77){_0x202751['push'](_0x202751['shift']());}}}(a100_0x5bfc,0x1e903));function a100_0x53e1(_0x1de0c0,_0x4003cd){_0x1de0c0=_0x1de0c0-0xcb;const _0x5bfca2=a100_0x5bfc();let _0x53e1e0=_0x5bfca2[_0x1de0c0];return _0x53e1e0;}export function canonicalLovrabetOperation(_0xf3860e){const _0x2f7b2d=a100_0x53e1;return[_0xf3860e[_0x2f7b2d(0xdc)],..._0xf3860e[_0x2f7b2d(0xdb)][_0x2f7b2d(0xcb)]()[_0x2f7b2d(0xcf)](/\s+/)][_0x2f7b2d(0xcc)](Boolean)[_0x2f7b2d(0xd9)]('.');}export function createLovrabetWriteMetadata(_0x307a14,_0x19394d,_0xe9f75e,_0x24ce21){const _0x20ab54=a100_0x53e1;if(_0x24ce21||_0xe9f75e['ok']!==!![]||_0x307a14['risk']!==_0x20ab54(0xda)&&_0x307a14['risk']!==_0x20ab54(0xd4))return undefined;const _0x162053=_0x307a14['writeEventSubject']?.(_0xe9f75e),_0x4b2b7b={'type':_0x20ab54(0xd6),'operation':_0x19394d,'risk':_0x307a14[_0x20ab54(0xd5)],..._0x162053?{'subject':_0x162053}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x4b2b7b}};}function a100_0x5bfc(){const _0x44a889=['trim','filter','321008DwPSxE','68644sbXkoS','split','39672lpTvRG','115612pzKaWq','84IYHxJV','912710RyXIbF','high-risk-write','risk','lovrabet.write.completed','226005crEZhe','192398iSrePH','join','write','command','service'];a100_0x5bfc=function(){return _0x44a889;};return a100_0x5bfc();}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x141862,_0x21797c){const _0xdf920f=a101_0xcd0e,_0x49c1d9=_0x141862();while(!![]){try{const _0x49f2d4=parseInt(_0xdf920f(0x10a))/0x1+parseInt(_0xdf920f(0x113))/0x2+parseInt(_0xdf920f(0x105))/0x3*(parseInt(_0xdf920f(0x114))/0x4)+-parseInt(_0xdf920f(0x125))/0x5*(parseInt(_0xdf920f(0x127))/0x6)+parseInt(_0xdf920f(0x103))/0x7+parseInt(_0xdf920f(0x122))/0x8*(parseInt(_0xdf920f(0x121))/0x9)+parseInt(_0xdf920f(0x108))/0xa*(-parseInt(_0xdf920f(0x119))/0xb);if(_0x49f2d4===_0x21797c)break;else _0x49c1d9['push'](_0x49c1d9['shift']());}catch(_0x5107f6){_0x49c1d9['push'](_0x49c1d9['shift']());}}}(a101_0x8f0c,0x3621d));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a101_0xcd0e(_0x2d3361,_0x33cd76){_0x2d3361=_0x2d3361-0x102;const _0x8f0ccd=a101_0x8f0c();let _0xcd0e54=_0x8f0ccd[_0x2d3361];return _0xcd0e54;}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';function a101_0x8f0c(){const _0x2828d2=['args','AbortError','definition','11cvWvbo','risk','data','write','dry-run','reason','rawFlags','aborted','53127uIKWiI','600jTASSf','result','description','1721415LUEHnj','format','6erUUVr','execute','present','246008bFBDHd','signal','87627OAMCOz','dryRun','stringify','7536350OVqPRC','riskLevel','352680lQrKyz','command','isNonInteractive','confirmation','Lovrabet\x20invocation\x20aborted.','presentation','high-risk-write','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','confirm','277172VlDxAO','48kfqwaj','yes'];a101_0x8f0c=function(){return _0x2828d2;};return a101_0x8f0c();}import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x2a89b3,command:_0x24afa3,risk:_0x279034,dryRun:_0xe95bcc}){const _0x25eb19=a101_0xcd0e;return JSON[_0x25eb19(0x107)]({'ok':_0x2a89b3['ok'],'command':_0x24afa3,'risk':_0x279034,..._0xe95bcc?{'dryRun':!![]}:{},..._0x2a89b3[_0x25eb19(0x11b)]!==undefined?{'data':_0x2a89b3['data']}:{},..._0x2a89b3['message']?{'message':_0x2a89b3['message']}:{}});}};export async function invokeLovrabet(_0x4fc875,_0x3d1543){return runSerialized(async()=>{const _0xc8c6e8=a101_0xcd0e;throwIfAborted(_0x3d1543[_0xc8c6e8(0x104)]);const _0x30b713=await resolveLovrabetInvocation(_0x4fc875),_0x33c91f=canonicalLovrabetOperation(_0x30b713[_0xc8c6e8(0x118)]),_0x2417cc={},_0x44af55=buildConfigFromFlags(_0x30b713[_0xc8c6e8(0x11f)]);await initGlobalEnvironment(_0x44af55);const _0x1ebc95=createPipelineEnv(_0x44af55,{..._0x30b713[_0xc8c6e8(0x11f)],'yes':_0x30b713[_0xc8c6e8(0x118)][_0xc8c6e8(0x11a)]===_0xc8c6e8(0x110)?!![]:_0x30b713['rawFlags'][_0xc8c6e8(0x115)],'nonInteractive':!![]});_0x1ebc95['args']=_0x30b713[_0xc8c6e8(0x116)],_0x1ebc95[_0xc8c6e8(0x10c)]=!![],_0x1ebc95[_0xc8c6e8(0x109)]='high-risk-write';const _0x3fe219=withEmbeddedLifecycle(_0x30b713['definition'],_0x33c91f,_0x3d1543),_0x407d0d=createLovrabetRunnerAdapter({'formatOutput'(_0xe8a854,_0x53b887){const _0x45db47=_0xc8c6e8;_0x2417cc['result']=_0xe8a854,_0x2417cc[_0x45db47(0x10b)]=_0x53b887[_0x45db47(0x10b)],_0x2417cc['risk']=_0x53b887[_0x45db47(0x11a)],_0x2417cc['format']=_0x53b887['format'],_0x2417cc[_0x45db47(0x106)]=_0x53b887[_0x45db47(0x106)]===!![];},async 'confirmHighRisk'(){const _0x32e8a3=_0xc8c6e8;throw new Error(_0x32e8a3(0x111));}});try{await runCommand(_0x3fe219,_0x1ebc95,_0x407d0d);if(!_0x2417cc[_0xc8c6e8(0x123)]||!_0x2417cc[_0xc8c6e8(0x10b)]||!_0x2417cc['risk']||!_0x2417cc[_0xc8c6e8(0x126)])throw new Error('Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x454d5c=_0x3d1543[_0xc8c6e8(0x10f)]??defaultPresentation,_0x3097de=_0x2417cc['dryRun']===!![],_0x2f4be3={'result':_0x2417cc['result'],'command':_0x2417cc[_0xc8c6e8(0x10b)],'operation':_0x33c91f,'risk':_0x2417cc['risk'],'format':_0x2417cc['format'],'dryRun':_0x3097de},_0x5b2b1c=createLovrabetWriteMetadata(_0x30b713[_0xc8c6e8(0x118)],_0x33c91f,_0x2417cc[_0xc8c6e8(0x123)],_0x3097de);let _0x5131cf;try{_0x5131cf=await _0x454d5c[_0xc8c6e8(0x102)](_0x2f4be3);}catch(_0x534296){if(!_0x5b2b1c||_0x454d5c===defaultPresentation)throw _0x534296;_0x5131cf=await defaultPresentation[_0xc8c6e8(0x102)](_0x2f4be3);}return{'operation':_0x33c91f,'risk':_0x2417cc['risk'],'mode':_0x3097de?_0xc8c6e8(0x11d):_0xc8c6e8(0x128),'result':_0x2417cc[_0xc8c6e8(0x123)],'output':_0x5131cf,..._0x5b2b1c?{'metadata':_0x5b2b1c}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function withEmbeddedLifecycle(_0x5544a1,_0x58e43a,_0x3410c4){return{..._0x5544a1,async 'execute'(_0x322964){const _0x4b69d0=a101_0xcd0e;return throwIfAborted(_0x3410c4[_0x4b69d0(0x104)]),(_0x5544a1[_0x4b69d0(0x11a)]===_0x4b69d0(0x11c)||_0x5544a1[_0x4b69d0(0x11a)]===_0x4b69d0(0x110))&&await _0x3410c4[_0x4b69d0(0x10d)][_0x4b69d0(0x112)]({'operation':_0x58e43a,'risk':_0x5544a1[_0x4b69d0(0x11a)],'description':_0x5544a1[_0x4b69d0(0x124)],..._0x3410c4['signal']?{'signal':_0x3410c4[_0x4b69d0(0x104)]}:{}}),throwIfAborted(_0x3410c4[_0x4b69d0(0x104)]),_0x5544a1[_0x4b69d0(0x128)](_0x322964);}};}function throwIfAborted(_0x4ebf3a){const _0x46b86f=a101_0xcd0e;if(_0x4ebf3a?.[_0x46b86f(0x120)])throw _0x4ebf3a[_0x46b86f(0x11e)]instanceof Error?_0x4ebf3a[_0x46b86f(0x11e)]:new DOMException(_0x46b86f(0x10e),_0x46b86f(0x117));}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a102_0x3dad76=a102_0x5827;(function(_0x329a9d,_0x30267c){const _0x26ef81=a102_0x5827,_0x72a2c5=_0x329a9d();while(!![]){try{const _0x51e91f=-parseInt(_0x26ef81(0xaa))/0x1+parseInt(_0x26ef81(0xa8))/0x2+parseInt(_0x26ef81(0xac))/0x3+parseInt(_0x26ef81(0xa6))/0x4+parseInt(_0x26ef81(0xa9))/0x5+parseInt(_0x26ef81(0xa5))/0x6+-parseInt(_0x26ef81(0xa7))/0x7;if(_0x51e91f===_0x30267c)break;else _0x72a2c5['push'](_0x72a2c5['shift']());}catch(_0x1ff070){_0x72a2c5['push'](_0x72a2c5['shift']());}}}(a102_0x112e,0x60cec));let tail=Promise[a102_0x3dad76(0xab)]();export async function runSerialized(_0x1d7cc1){const _0x23c73c=a102_0x3dad76,_0x68e8ae=tail;let _0x5c6408;tail=new Promise(_0x49f616=>{_0x5c6408=_0x49f616;}),await _0x68e8ae[_0x23c73c(0xad)](()=>undefined);try{return await _0x1d7cc1();}finally{_0x5c6408();}}function a102_0x5827(_0x51941,_0x5fa686){_0x51941=_0x51941-0xa5;const _0x112ec4=a102_0x112e();let _0x5827f7=_0x112ec4[_0x51941];return _0x5827f7;}function a102_0x112e(){const _0x3a2b85=['4624812YaXfFt','1614256aCHLQU','10937283xBItec','520004whAWDd','3756515njjVjL','285805OhWWzh','resolve','177381ulxBYz','catch'];a102_0x112e=function(){return _0x3a2b85;};return a102_0x112e();}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30dd90,_0x87af1){const _0x37bcb9=a103_0x6e3e,_0x5e0d48=_0x30dd90();while(!![]){try{const _0x4b6cb0=-parseInt(_0x37bcb9(0x19d))/0x1+-parseInt(_0x37bcb9(0x192))/0x2+-parseInt(_0x37bcb9(0x191))/0x3+-parseInt(_0x37bcb9(0x196))/0x4+parseInt(_0x37bcb9(0x195))/0x5+parseInt(_0x37bcb9(0x19e))/0x6+parseInt(_0x37bcb9(0x19a))/0x7;if(_0x4b6cb0===_0x87af1)break;else _0x5e0d48['push'](_0x5e0d48['shift']());}catch(_0xb3b69f){_0x5e0d48['push'](_0x5e0d48['shift']());}}}(a103_0x4c42,0x6ac59));import a103_0x37f8fd from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a103_0x4c42(){const _0x489709=['../commands/registry.js','878920mjmIsR','2127528KNOHdI','definition','flags','args','13459369pufejv','unknownCommand','validation','530958BMdOiw','2707446aXeZbT','defaultCommand','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','join','flatMap','1725882RIvAwa','948642vOFJdV','slice'];a103_0x4c42=function(){return _0x489709;};return a103_0x4c42();}import{buildMeowFlags}from'../constant/cli.js';function a103_0x6e3e(_0x5cb80d,_0x3e6d5d){_0x5cb80d=_0x5cb80d-0x18d;const _0x4c4250=a103_0x4c42();let _0x6e3eae=_0x4c4250[_0x5cb80d];return _0x6e3eae;}import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x1b8184){const _0x19afd4=a103_0x6e3e,_0x1c6aa2=a103_0x37f8fd('',{'importMeta':import.meta,'argv':_0x1b8184,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x1bc603=[..._0x1c6aa2['input']],_0x148367=_0x1c6aa2[_0x19afd4(0x198)];await correctFlags(_0x148367);const _0x1fdafc=_0x1bc603[0x0];if(!_0x1fdafc)throw CliErrors['validation']('Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.');if(!isKnownService(_0x1fdafc)){const _0x300d19=resolveDynamicServiceCommand(_0x1bc603,_0x148367);if(!_0x300d19)throw CliErrors[_0x19afd4(0x19b)](_0x1bc603[_0x19afd4(0x18f)]('\x20'));return Object['assign'](_0x148367,_0x300d19[_0x19afd4(0x198)]),{'definition':_0x300d19[_0x19afd4(0x197)],'rawFlags':_0x148367,'args':_0x300d19[_0x19afd4(0x199)]};}const _0x3d00c3=getServiceEntry(_0x1fdafc),_0x2b71bf=_0x1bc603[0x1]||_0x3d00c3[_0x19afd4(0x18d)];if(!_0x2b71bf)throw CliErrors[_0x19afd4(0x19c)](_0x19afd4(0x18e)+_0x1fdafc+'\x22.');const _0x47067f=findDefinition(_0x1fdafc,_0x2b71bf);if(!_0x47067f)throw CliErrors[_0x19afd4(0x19b)](_0x1fdafc+'\x20'+_0x2b71bf);return{'definition':_0x47067f,'rawFlags':_0x148367,'args':_0x1bc603[_0x19afd4(0x193)](0x2)};}async function correctFlags(_0x2f0482){const _0x6bf252=a103_0x6e3e;try{const {correctFlags:_0x54a4d8}=await import('../framework/preparse.js'),{getAllDefinitions:_0x4ae29b}=await import(_0x6bf252(0x194)),_0x38bb66=_0x4ae29b()[_0x6bf252(0x190)](_0x40c945=>_0x40c945['flags']??[]),_0x3d097f=_0x54a4d8(_0x2f0482,_0x38bb66);Object['assign'](_0x2f0482,_0x3d097f[_0x6bf252(0x198)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a105_0x50e626=a105_0x3ce6;(function(_0x445315,_0x2bf905){const _0x37e8a5=a105_0x3ce6,_0x19f72d=_0x445315();while(!![]){try{const _0x2dfd42=-parseInt(_0x37e8a5(0x120))/0x1*(-parseInt(_0x37e8a5(0x12b))/0x2)+-parseInt(_0x37e8a5(0x11a))/0x3*(parseInt(_0x37e8a5(0x121))/0x4)+-parseInt(_0x37e8a5(0x127))/0x5*(parseInt(_0x37e8a5(0x128))/0x6)+parseInt(_0x37e8a5(0x132))/0x7*(-parseInt(_0x37e8a5(0x119))/0x8)+-parseInt(_0x37e8a5(0x11e))/0x9*(-parseInt(_0x37e8a5(0x12c))/0xa)+-parseInt(_0x37e8a5(0x126))/0xb*(-parseInt(_0x37e8a5(0x12f))/0xc)+parseInt(_0x37e8a5(0x12d))/0xd*(parseInt(_0x37e8a5(0x130))/0xe);if(_0x2dfd42===_0x2bf905)break;else _0x19f72d['push'](_0x19f72d['shift']());}catch(_0xb22d20){_0x19f72d['push'](_0x19f72d['shift']());}}}(a105_0x20f1,0x54b7e));function a105_0x3ce6(_0x266839,_0x3114c2){_0x266839=_0x266839-0x119;const _0x20f1ab=a105_0x20f1();let _0x3ce6f8=_0x20f1ab[_0x266839];return _0x3ce6f8;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a105_0x5427fa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a105_0x5427fa;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a105_0x50e626(0x124)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a105_0x20f1(){const _0x17c732=['pipe','exit\x20','log','285003lEuqXW','status','373918TnIRHM','62092USXFjC','stderr','inherit','skipNpxSkillsEnvSuffix','trim','1922085dAEECB','146705AkfUPd','6HkNRxB','toString','join','2ydNSBg','10BjqXmr','13zooWjL','skills','36zxwMYd','4269874yOCUOa','stdout','7HjGpqP','4880528eadesb','48eTGEHJ'];a105_0x20f1=function(){return _0x17c732;};return a105_0x20f1();}export function runNpxSkillsAddGlobal(_0x1801b2,_0x4d1cd1=LOVRABET_SKILL_SOURCE,_0x1f44ba){const _0x1cc845=a105_0x50e626;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x22f532=_0x1f44ba?.['stdio']??_0x1cc845(0x123),_0x23bee1=resolveNpmBin('npx'),_0x132fd6=[_0x1cc845(0x12e),'add',_0x4d1cd1,'-g','-y'],_0x4f0f9f=[_0x23bee1,..._0x132fd6][_0x1cc845(0x12a)]('\x20');console[_0x1cc845(0x11d)]('*\x20'+_0x4f0f9f);const _0x42f767=spawnSync(_0x23bee1,_0x132fd6,{'cwd':_0x1801b2,'stdio':_0x22f532,'env':process.env,'shell':![]});if(_0x42f767[_0x1cc845(0x11f)]===0x0)return{'ok':!![],'status':0x0};let _0x278c31=_0x1cc845(0x11c)+(_0x42f767[_0x1cc845(0x11f)]??'unknown');if(_0x22f532===_0x1cc845(0x11b)){const _0x1e87aa=_0x42f767[_0x1cc845(0x122)]?_0x42f767[_0x1cc845(0x122)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'',_0x28a4b7=_0x42f767[_0x1cc845(0x131)]?_0x42f767[_0x1cc845(0x131)][_0x1cc845(0x129)]()[_0x1cc845(0x125)]():'';if(_0x1e87aa)_0x278c31=_0x1e87aa;else{if(_0x28a4b7)_0x278c31=_0x28a4b7;}}return{'ok':![],'status':_0x42f767['status']??null,'error':_0x278c31};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x11c773=a106_0x3c2a;(function(_0x5dc078,_0x13907c){const _0x5e6d41=a106_0x3c2a,_0x2661f5=_0x5dc078();while(!![]){try{const _0x17f935=-parseInt(_0x5e6d41(0x128))/0x1*(parseInt(_0x5e6d41(0x126))/0x2)+parseInt(_0x5e6d41(0x124))/0x3*(-parseInt(_0x5e6d41(0x11d))/0x4)+-parseInt(_0x5e6d41(0x11f))/0x5*(parseInt(_0x5e6d41(0x11a))/0x6)+parseInt(_0x5e6d41(0x11e))/0x7+-parseInt(_0x5e6d41(0x12c))/0x8+parseInt(_0x5e6d41(0x119))/0x9+parseInt(_0x5e6d41(0x123))/0xa*(parseInt(_0x5e6d41(0x121))/0xb);if(_0x17f935===_0x13907c)break;else _0x2661f5['push'](_0x2661f5['shift']());}catch(_0x43f04a){_0x2661f5['push'](_0x2661f5['shift']());}}}(a106_0x5798,0xc972c));export const METADATA_FILE=a106_0x11c773(0x11b);export const SKILL_FILE=a106_0x11c773(0x120);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a106_0x11c773(0x12a)]);function a106_0x5798(){const _0x4e8d28=['node_modules','29084cMggXH','10809134YXogHi','6737805XQvpsi','SKILL.md','1921249xBlynU','dist','30ZzyVec','69BIvVPG','.cache','22226SVXPMz','build','5dBPxIu','.svn','.DS_Store','.hg','6228760jyNJFW','.turbo','.next','9953523wtsEvh','6JfvVPT','lovrabet.skill.json'];a106_0x5798=function(){return _0x4e8d28;};return a106_0x5798();}function a106_0x3c2a(_0x4d1467,_0x34e984){_0x4d1467=_0x4d1467-0x119;const _0x579885=a106_0x5798();let _0x3c2aed=_0x579885[_0x4d1467];return _0x3c2aed;}export const IGNORED_DIR_NAMES=new Set(['.git',a106_0x11c773(0x12b),a106_0x11c773(0x129),a106_0x11c773(0x11c),a106_0x11c773(0x12e),a106_0x11c773(0x122),a106_0x11c773(0x127),'coverage',a106_0x11c773(0x12d),a106_0x11c773(0x125)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f2491,_0x1c60ec){const _0x3b47f3=a107_0x2c0c,_0x1eb488=_0x5f2491();while(!![]){try{const _0x3508d4=parseInt(_0x3b47f3(0x1d8))/0x1*(parseInt(_0x3b47f3(0x1d1))/0x2)+parseInt(_0x3b47f3(0x1d2))/0x3+parseInt(_0x3b47f3(0x1d4))/0x4+-parseInt(_0x3b47f3(0x1d3))/0x5+parseInt(_0x3b47f3(0x1cd))/0x6*(-parseInt(_0x3b47f3(0x1d5))/0x7)+-parseInt(_0x3b47f3(0x1d9))/0x8+-parseInt(_0x3b47f3(0x1d7))/0x9*(parseInt(_0x3b47f3(0x1cb))/0xa);if(_0x3508d4===_0x1c60ec)break;else _0x1eb488['push'](_0x1eb488['shift']());}catch(_0x288360){_0x1eb488['push'](_0x1eb488['shift']());}}}(a107_0x5774,0x8c2da));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(_0x413811,_0x2ee123){const _0x5b60c2=a107_0x2c0c,_0x14d542=normalizeSkillRelativePath(_0x2ee123),_0x4c5b2d=realOrResolved(_0x413811),_0x1620de=resolve(_0x4c5b2d,..._0x14d542['split']('/'));if(!isPathInside(_0x1620de,_0x4c5b2d))throw CliErrors[_0x5b60c2(0x1d0)](_0x5b60c2(0x1cf)+_0x2ee123);return ensureNoSymlinkInManagedPath(_0x4c5b2d,_0x14d542),_0x1620de;}export function ensureNoSymlinkInManagedPath(_0x4bf8ff,_0x472fb6){const _0x3a0328=a107_0x2c0c;let _0xc4787f=_0x4bf8ff;for(const _0x4d123a of _0x472fb6[_0x3a0328(0x1ca)]('/')){_0xc4787f=resolve(_0xc4787f,_0x4d123a);const _0x1deecf=lstatIfPresent(_0xc4787f);if(_0x1deecf?.[_0x3a0328(0x1d6)]())throw CliErrors[_0x3a0328(0x1d0)](_0x3a0328(0x1da)+_0x472fb6);}}function a107_0x5774(){const _0x4c2fe8=['36747tstTQu','43NPTPeC','1733888jpHrJj','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','split','2830SzceOr','from','18iJoMoU','utf8','Unsafe\x20Skill\x20file\x20path:\x20','validation','50628dDugOo','1580613uEoHQy','71450xoTzEZ','1635204oXRAEZ','148141WJHaUp','isSymbolicLink'];a107_0x5774=function(){return _0x4c2fe8;};return a107_0x5774();}function a107_0x2c0c(_0x107791,_0x2f106c){_0x107791=_0x107791-0x1ca;const _0x57749c=a107_0x5774();let _0x2c0cf6=_0x57749c[_0x107791];return _0x2c0cf6;}export function isDanglingSymlink(_0x55c99e){const _0x102bff=a107_0x2c0c;try{return lstatSync(_0x55c99e)[_0x102bff(0x1d6)]();}catch{return![];}}export function resolveSymlinkTarget(_0x617b80){const _0x3a023b=readlinkSync(_0x617b80);return isAbsolute(_0x3a023b)?_0x3a023b:resolve(dirname(_0x617b80),_0x3a023b);}export function isPathInside(_0x598ef7,_0x3d2cbd){const _0x3364f5=_0x598ef7['endsWith'](sep)?_0x598ef7:''+_0x598ef7+sep,_0xdffed4=_0x3d2cbd['endsWith'](sep)?_0x3d2cbd:''+_0x3d2cbd+sep;return _0x598ef7===_0x3d2cbd||_0x3364f5['startsWith'](_0xdffed4);}export function realOrResolved(_0x507d1c){try{return realpathSync(_0x507d1c);}catch{return resolve(_0x507d1c);}}export function lstatIfPresent(_0x332c34){try{return lstatSync(_0x332c34);}catch{return undefined;}}export function writeTextAtomic(_0x35e812,_0x19c5ac,_0x5a8e87){const _0x28194b=a107_0x2c0c;writeBytesAtomic(_0x35e812,Buffer[_0x28194b(0x1cc)](_0x19c5ac,_0x28194b(0x1ce)),_0x5a8e87);}export function writeBytesAtomic(_0x24df1a,_0xf738f8,_0x39599e){const _0x940400=_0x24df1a+'.tmp';try{writeFileSync(_0x940400,_0xf738f8,{'mode':_0x39599e}),renameSync(_0x940400,_0x24df1a);}catch(_0xb55115){try{rmSync(_0x940400,{'force':!![]});}catch{}throw _0xb55115;}}export function writeJsonAtomic(_0x135b33,_0x3ede7c){writeTextAtomic(_0x135b33,JSON['stringify'](_0x3ede7c,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x568790,_0x300158){const _0x273e2b=a108_0x51ba,_0x2c5058=_0x568790();while(!![]){try{const _0x47a916=-parseInt(_0x273e2b(0xa0))/0x1+parseInt(_0x273e2b(0x9d))/0x2+-parseInt(_0x273e2b(0x9c))/0x3+-parseInt(_0x273e2b(0xa7))/0x4+parseInt(_0x273e2b(0xa5))/0x5*(parseInt(_0x273e2b(0xa8))/0x6)+parseInt(_0x273e2b(0xa4))/0x7*(-parseInt(_0x273e2b(0x99))/0x8)+parseInt(_0x273e2b(0xa3))/0x9*(parseInt(_0x273e2b(0xa2))/0xa);if(_0x47a916===_0x300158)break;else _0x2c5058['push'](_0x2c5058['shift']());}catch(_0x37ac58){_0x2c5058['push'](_0x2c5058['shift']());}}}(a108_0x1cf0,0xcabd0));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x3b2105){const _0x2d6e88=a108_0x51ba;return createHash(_0x2d6e88(0x9b))[_0x2d6e88(0x9f)](_0x3b2105)[_0x2d6e88(0xa1)]('hex');}function a108_0x51ba(_0x2c1f58,_0x21cbb8){_0x2c1f58=_0x2c1f58-0x99;const _0x1cf0b4=a108_0x1cf0();let _0x51ba9b=_0x1cf0b4[_0x2c1f58];return _0x51ba9b;}export function fileHash(_0x3171c8){return bufferSha256(fileContent(_0x3171c8));}export function bufferSha256(_0x55c8b0){const _0xed589f=a108_0x51ba;return createHash(_0xed589f(0x9b))[_0xed589f(0x9f)](_0x55c8b0)[_0xed589f(0xa1)](_0xed589f(0xa6));}export function fileTreeHash(_0x5f37df){const _0x2f6333=a108_0x51ba,_0x11a216=createHash('sha256');for(const _0x52b073 of normalizeManifestFiles(_0x5f37df)){_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9e)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](_0x52b073[_0x2f6333(0x9b)]),_0x11a216[_0x2f6333(0x9f)]('\x00'),_0x11a216[_0x2f6333(0x9f)](String(_0x52b073[_0x2f6333(0x9a)])),_0x11a216['update']('\x00');}return _0x11a216[_0x2f6333(0xa1)](_0x2f6333(0xa6));}function a108_0x1cf0(){const _0x22f249=['sha256','4044624lLoXLG','2936206xKfxDz','path','update','1147894lNkvey','digest','20558410dMHADL','9rknIvp','7FNmvMo','20gkTPoR','hex','1556248GdjYtb','1379682OoPrtp','5825216bcKoyC','size'];a108_0x1cf0=function(){return _0x22f249;};return a108_0x1cf0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a109_0x27fc(_0x3f346b,_0x3cbb94){_0x3f346b=_0x3f346b-0x120;const _0x84f067=a109_0x84f0();let _0x27fc0a=_0x84f067[_0x3f346b];return _0x27fc0a;}function a109_0x84f0(){const _0x292d6f=['project','12RnXIYM','managedRoot','39582lTkmlC','skills','.agents','8631416MwFQGR','8840676dsPNNv','85868GIGFTB','7RRGDnm','39305JvNsdg','116FSomkb','3229110fCMRfd','cwd','11oLTdGN','6762684xtDNUn','730PYyhji'];a109_0x84f0=function(){return _0x292d6f;};return a109_0x84f0();}(function(_0x5ca8f6,_0x573d5c){const _0x83e66b=a109_0x27fc,_0x38940d=_0x5ca8f6();while(!![]){try{const _0x46a581=-parseInt(_0x83e66b(0x120))/0x1*(parseInt(_0x83e66b(0x127))/0x2)+-parseInt(_0x83e66b(0x12b))/0x3+-parseInt(_0x83e66b(0x12a))/0x4*(parseInt(_0x83e66b(0x129))/0x5)+parseInt(_0x83e66b(0x126))/0x6+parseInt(_0x83e66b(0x128))/0x7*(parseInt(_0x83e66b(0x125))/0x8)+-parseInt(_0x83e66b(0x122))/0x9*(parseInt(_0x83e66b(0x12f))/0xa)+parseInt(_0x83e66b(0x12d))/0xb*(parseInt(_0x83e66b(0x12e))/0xc);if(_0x46a581===_0x573d5c)break;else _0x38940d['push'](_0x38940d['shift']());}catch(_0x178e82){_0x38940d['push'](_0x38940d['shift']());}}}(a109_0x84f0,0xee1e1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x39b116,_0x572f23='global',_0x5a9844={}){const _0x5874d6=a109_0x27fc,_0xd04817=resolveSkillSyncPaths(_0x5a9844),_0x5bdf1b=safePathSegment(_0x39b116,'appCode'),_0x3a5b4e=_0x572f23===_0x5874d6(0x130)?[resolve(_0x5a9844[_0x5874d6(0x12c)]??process[_0x5874d6(0x12c)](),_0x5874d6(0x124),_0x5874d6(0x123))]:runtimeAgentSkillRoots(_0xd04817);return Object['freeze']({'scope':_0x572f23,'appCode':_0x5bdf1b,'skillRoots':Object['freeze'](_0x3a5b4e),'managedRoot':_0xd04817[_0x5874d6(0x121)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a108_0x2ed8b0=a108_0x4a3b;(function(_0x3ea659,_0x257b4c){const _0x12e988=a108_0x4a3b,_0x39c38c=_0x3ea659();while(!![]){try{const _0x4fb09f=-parseInt(_0x12e988(0xf9))/0x1*(parseInt(_0x12e988(0x128))/0x2)+-parseInt(_0x12e988(0x10d))/0x3+parseInt(_0x12e988(0x129))/0x4+parseInt(_0x12e988(0x101))/0x5+-parseInt(_0x12e988(0x125))/0x6+-parseInt(_0x12e988(0xff))/0x7*(-parseInt(_0x12e988(0x10c))/0x8)+parseInt(_0x12e988(0x115))/0x9*(parseInt(_0x12e988(0x105))/0xa);if(_0x4fb09f===_0x257b4c)break;else _0x39c38c['push'](_0x39c38c['shift']());}catch(_0x35034e){_0x39c38c['push'](_0x39c38c['shift']());}}}(a108_0x19d7,0x40b0a));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a108_0x20ea3e from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a108_0x20ea3e,RESERVED_PROJECT_SKILL_CODES=new Set([a108_0x2ed8b0(0x103),'runtime-observe',a108_0x2ed8b0(0x11d)]);export function linkEffectiveRuntimeSkills(_0x3fa37d,_0x1580b3){const _0x9565c9=a108_0x2ed8b0,_0x14d0bc=new Map();for(const _0x3874b7 of _0x3fa37d){const _0x1cc0c1=_0x3874b7[_0x9565c9(0x11f)][_0x9565c9(0x12e)];if(!_0x1cc0c1)continue;const _0x2b7373=_0x14d0bc[_0x9565c9(0x127)](_0x1cc0c1);(!_0x2b7373||_0x3874b7[_0x9565c9(0x11c)]==='personal')&&_0x14d0bc['set'](_0x1cc0c1,_0x3874b7);}const _0x5d177d=[];for(const _0x19698a of _0x14d0bc[_0x9565c9(0x12b)]()){const _0x17478a=requireSkillCode(_0x19698a[_0x9565c9(0x11f)]),_0xe9e9ed=readMetadataIfPresent(_0x19698a[_0x9565c9(0x122)]);if(_0xe9e9ed?.['appCode']!==_0x1580b3[_0x9565c9(0x10b)]||_0xe9e9ed[_0x9565c9(0x12e)]!==_0x17478a)throw CliErrors[_0x9565c9(0x111)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x1580b3[_0x9565c9(0x10b)]+':\x20'+_0x19698a[_0x9565c9(0x122)]);const _0x598ddf=runtimeSkillLinkName(_0x1580b3,_0x17478a);for(const _0x30d8ca of _0x1580b3[_0x9565c9(0x112)]){_0x5d177d[_0x9565c9(0xf8)](ensureManagedSymlink(resolve(_0x30d8ca,_0x598ddf),_0x19698a[_0x9565c9(0x104)],_0x1580b3,_0x17478a));}}return _0x5d177d;}export function pruneStaleRuntimeSkillLinks(_0x241292,_0x383460,_0x57c4b6){const _0x9cd2ec=a108_0x2ed8b0,_0x291151=new Set([..._0x383460][_0x9cd2ec(0x114)](_0x4819bf=>_0x4819bf[_0x9cd2ec(0x11b)]())['filter'](Boolean)),_0x8f432c=_0x57c4b6?new Set([..._0x57c4b6][_0x9cd2ec(0x114)](_0x3a1081=>_0x3a1081[_0x9cd2ec(0x11b)]())[_0x9cd2ec(0xfc)](Boolean)):undefined,_0x240fdb=[];for(const _0x213af1 of _0x241292[_0x9cd2ec(0x112)]){for(const _0x4c9df9 of managedTargetSkillLinkPaths(_0x213af1,_0x241292)){const _0x140554=runtimeSkillCodeFromLink(_0x241292,_0x4c9df9);if(_0x8f432c&&!_0x8f432c[_0x9cd2ec(0x119)](_0x140554))continue;if(_0x291151[_0x9cd2ec(0x119)](_0x140554))continue;_0x240fdb[_0x9cd2ec(0xf8)](removeManagedSkillLink(_0x4c9df9,_0x241292,_0x140554));}}return _0x240fdb;}export function pruneStaleRuntimeSkillCache(_0x15b05a,_0x13c0c8={}){const _0x581d7d=a108_0x2ed8b0,_0x15f2ea=new Set([..._0x15b05a['activeSkillCodes']][_0x581d7d(0x114)](_0x1d4064=>_0x1d4064[_0x581d7d(0x11b)]())[_0x581d7d(0xfc)](Boolean)),_0x29d2c3=_0x15b05a[_0x581d7d(0x10f)]?new Set([..._0x15b05a['pruneSkillCodes']]['map'](_0x2ebe04=>_0x2ebe04[_0x581d7d(0x11b)]())[_0x581d7d(0xfc)](Boolean)):undefined,_0x169cc7=_0x15b05a[_0x581d7d(0x12d)]??[_0x581d7d(0x108),_0x581d7d(0xf3)],_0x27dd17=resolve(getRuntimeSkillCacheRoot(_0x15b05a[_0x581d7d(0x12c)],_0x15b05a[_0x581d7d(0x120)],_0x13c0c8),safePathSegment(_0x15b05a[_0x581d7d(0x10b)],_0x581d7d(0x10b))),_0x3f3f1a=[];for(const _0x31fad2 of _0x169cc7){const _0x483e65=resolve(_0x27dd17,_0x31fad2);if(!existsSync(_0x483e65))continue;for(const _0xfcd05 of readdirSync(_0x483e65,{'withFileTypes':!![]})){if(!_0xfcd05[_0x581d7d(0x11e)]())continue;const _0x2dbe04=_0xfcd05[_0x581d7d(0x124)];if(_0x29d2c3&&!_0x29d2c3[_0x581d7d(0x119)](_0x2dbe04))continue;if(_0x15f2ea[_0x581d7d(0x119)](_0x2dbe04))continue;const _0x4c78b1=resolve(_0x483e65,_0x2dbe04),_0x5715be=readMetadataIfPresent(resolve(_0x4c78b1,METADATA_FILE));if(_0x5715be?.[_0x581d7d(0x10b)]!==_0x15b05a[_0x581d7d(0x10b)]||_0x5715be[_0x581d7d(0x11c)]!==_0x31fad2||_0x5715be[_0x581d7d(0x12e)]!==_0x2dbe04){_0x3f3f1a['push']({'path':_0x4c78b1,'action':_0x581d7d(0x10a),'reason':_0x581d7d(0xf2)});continue;}if(isLinkedFromAnyRoot(_0x4c78b1,_0x15b05a[_0x581d7d(0x113)]??[])){_0x3f3f1a[_0x581d7d(0xf8)]({'path':_0x4c78b1,'action':_0x581d7d(0x10a),'reason':_0x581d7d(0x117)});continue;}removeSync(_0x4c78b1),_0x3f3f1a['push']({'path':_0x4c78b1,'action':_0x581d7d(0x107)});}}return _0x3f3f1a;}function a108_0x19d7(){const _0x102cbc=['unchanged','38094eekIXA','updated','2495395TzFUNR','managedRoot','lovrabet','dir','571420RgKgGI','created','removed','personal','not-managed-symlink','skipped','appCode','296MCtyoD','1260012KVLntK','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','pruneSkillCodes','builtin','validation','skillRoots','protectedLinkRoots','map','54gLZcJS','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','linked-from-protected-root','agentsSkillsDir','has','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','trim','scope','secret-retriever','isDirectory','skill','accessKey','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','metadataPath','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','name','180390xqywQX','startsWith','get','1007910WYHomN','702836iLjDtO','project','values','env','scopes','skillCode','metadata-mismatch','company','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','length','isSymbolicLink','push','1WOvwpI','slice','external-symlink','filter','contentHash'];a108_0x19d7=function(){return _0x102cbc;};return a108_0x19d7();}function a108_0x4a3b(_0xa531e4,_0x1b19c5){_0xa531e4=_0xa531e4-0xf2;const _0x19d7e3=a108_0x19d7();let _0x4a3bc3=_0x19d7e3[_0xa531e4];return _0x4a3bc3;}export function linkGlobalRuntimeSkills(_0x535552,_0x191811={}){const _0x1adcbe=a108_0x2ed8b0,_0x5cf66d=resolveSkillSyncPaths(_0x191811),_0x545de0=[];for(const _0x2b9291 of _0x535552){if(_0x2b9291[_0x1adcbe(0x11c)]!==_0x1adcbe(0x110))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x2b9291[_0x1adcbe(0x11c)]);const _0x52b9db=requireSkillCode(_0x2b9291[_0x1adcbe(0x11f)]),_0x598555=copyManagedSkillDirectory(_0x2b9291[_0x1adcbe(0x104)],resolve(_0x5cf66d[_0x1adcbe(0x118)],_0x52b9db));_0x545de0[_0x1adcbe(0xf8)]({..._0x598555,'contentHash':_0x2b9291[_0x1adcbe(0xfd)]});}return _0x545de0;}function ensureManagedSymlink(_0x23e405,_0x22bbf1,_0x388867,_0x1e4b7c){const _0x43475d=a108_0x2ed8b0;mkdirSync(dirname(_0x23e405),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x23e405)||isDanglingSymlink(_0x23e405)){const _0x536abf=lstatSync(_0x23e405);if(!_0x536abf[_0x43475d(0xf7)]())throw CliErrors['validation'](_0x43475d(0xf5)+_0x23e405);const _0x2ff349=resolveSymlinkTarget(_0x23e405);if(!isPathInside(realOrResolved(_0x2ff349),realOrResolved(_0x388867['managedRoot'])))throw CliErrors[_0x43475d(0x111)](_0x43475d(0x10e)+_0x23e405);if(realOrResolved(_0x2ff349)===realOrResolved(_0x22bbf1))return{'path':_0x23e405,'target':_0x22bbf1,'action':_0x43475d(0xfe)};const _0x3f3342=readMetadataIfPresent(resolve(_0x2ff349,METADATA_FILE));if(_0x388867['scope']===_0x43475d(0x12a)&&(_0x3f3342?.[_0x43475d(0x10b)]!==_0x388867[_0x43475d(0x10b)]||_0x3f3342[_0x43475d(0x12e)]!==_0x1e4b7c))throw CliErrors[_0x43475d(0x111)](_0x43475d(0x121)+_0x23e405);return unlinkSync(_0x23e405),symlinkSync(_0x22bbf1,_0x23e405,'dir'),{'path':_0x23e405,'target':_0x22bbf1,'action':_0x43475d(0x100)};}return symlinkSync(_0x22bbf1,_0x23e405,_0x43475d(0x104)),{'path':_0x23e405,'target':_0x22bbf1,'action':_0x43475d(0x106)};}function managedTargetSkillLinkPaths(_0x58646c,_0x5a189f){const _0x5bc2ef=a108_0x2ed8b0;if(!existsSync(_0x58646c))return[];const _0x4da635=_0x5a189f[_0x5bc2ef(0x10b)]+'--';return readdirSync(_0x58646c,{'withFileTypes':!![]})['filter'](_0x92575c=>_0x5a189f[_0x5bc2ef(0x11c)]===_0x5bc2ef(0x12a)||_0x92575c['name'][_0x5bc2ef(0x126)](_0x4da635))[_0x5bc2ef(0x114)](_0x3b3f02=>resolve(_0x58646c,_0x3b3f02[_0x5bc2ef(0x124)]));}function removeManagedSkillLink(_0x3834db,_0x28266a,_0x5c4617){const _0x39b0bb=a108_0x2ed8b0,_0x630a8a=lstatIfPresent(_0x3834db);if(!_0x630a8a?.['isSymbolicLink']())return{'path':_0x3834db,'action':_0x39b0bb(0x10a),'reason':_0x39b0bb(0x109)};const _0x204879=resolveSymlinkTarget(_0x3834db);if(!isPathInside(realOrResolved(_0x204879),realOrResolved(_0x28266a[_0x39b0bb(0x102)])))return{'path':_0x3834db,'action':'skipped','reason':_0x39b0bb(0xfb)};const _0xa3e93b=readMetadataIfPresent(resolve(_0x204879,METADATA_FILE));if(_0x28266a[_0x39b0bb(0x11c)]===_0x39b0bb(0x12a)&&(_0xa3e93b?.[_0x39b0bb(0x10b)]!==_0x28266a[_0x39b0bb(0x10b)]||_0xa3e93b['skillCode']!==_0x5c4617))return{'path':_0x3834db,'action':_0x39b0bb(0x10a),'reason':_0x39b0bb(0xf2)};return unlinkSync(_0x3834db),{'path':_0x3834db,'action':_0x39b0bb(0x107)};}function isLinkedFromAnyRoot(_0x2c3a73,_0x57e735){const _0x138833=realOrResolved(_0x2c3a73);for(const _0x2e20b5 of _0x57e735){if(!existsSync(_0x2e20b5))continue;for(const _0x32828d of readdirSync(_0x2e20b5,{'withFileTypes':!![]})){if(!_0x32828d['isSymbolicLink']())continue;const _0x209f7a=resolve(_0x2e20b5,_0x32828d['name']);if(realOrResolved(resolveSymlinkTarget(_0x209f7a))===_0x138833)return!![];}}return![];}function runtimeSkillLinkName(_0x51c760,_0x50f7d8){const _0x5877c9=a108_0x2ed8b0,_0x216bb5=safePathSegment(_0x50f7d8,_0x5877c9(0x12e));if(_0x51c760[_0x5877c9(0x11c)]===_0x5877c9(0x12a)&&RESERVED_PROJECT_SKILL_CODES[_0x5877c9(0x119)](_0x216bb5))throw CliErrors[_0x5877c9(0x111)](_0x5877c9(0x116)+_0x216bb5);return _0x51c760[_0x5877c9(0x11c)]===_0x5877c9(0x12a)?_0x216bb5:_0x51c760[_0x5877c9(0x10b)]+'--'+_0x216bb5;}function runtimeSkillCodeFromLink(_0x3f8f71,_0x1ec9e7){const _0x1d6a01=a108_0x2ed8b0,_0x5e37b3=basename(_0x1ec9e7);return _0x3f8f71['scope']===_0x1d6a01(0x12a)?_0x5e37b3:_0x5e37b3[_0x1d6a01(0xfa)]((_0x3f8f71['appCode']+'--')[_0x1d6a01(0xf6)]);}export function copyManagedSkillDirectory(_0x21635d,_0x34dc4a){const _0x54adf2=a108_0x2ed8b0,_0x1c906d=resolve(_0x34dc4a,METADATA_FILE),_0x1f11df=existsSync(_0x34dc4a);if(_0x1f11df){const _0x4768c6=lstatSync(_0x34dc4a);if(_0x4768c6['isSymbolicLink']())throw CliErrors[_0x54adf2(0x111)](_0x54adf2(0xf4)+_0x34dc4a);if(!_0x4768c6[_0x54adf2(0x11e)]())throw CliErrors[_0x54adf2(0x111)](_0x54adf2(0x123)+_0x34dc4a);const _0x3703ce=readMetadataIfPresent(_0x1c906d);if(_0x3703ce?.[_0x54adf2(0x11c)]!==_0x54adf2(0x110))throw CliErrors['validation'](_0x54adf2(0x11a)+_0x34dc4a);}ensureDirSync(dirname(_0x34dc4a));const _0x31ca2a=_0x1f11df?readMetadataIfPresent(_0x1c906d)?.[_0x54adf2(0xfd)]:undefined,_0x14b2b1=readMetadataIfPresent(resolve(_0x21635d,METADATA_FILE))?.['contentHash'];return _0x1f11df&&removeSync(_0x34dc4a),copySkillDirectory(_0x21635d,_0x34dc4a),{'path':_0x34dc4a,'target':_0x21635d,'action':!_0x1f11df?_0x54adf2(0x106):_0x31ca2a===_0x14b2b1?_0x54adf2(0xfe):'updated'};}function copySkillDirectory(_0x5d3535,_0x236036){copySync(_0x5d3535,_0x236036,{'dereference':![],'overwrite':!![],'filter'(_0x4fd411){const _0x1735ab=a108_0x4a3b;if(lstatSync(_0x4fd411)[_0x1735ab(0xf7)]())throw CliErrors[_0x1735ab(0x111)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x4fd411);return!![];}});}
|
|
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 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6dda9a,_0x55be22){const _0x21c441=a111_0xb8f7,_0x34ac88=_0x6dda9a();while(!![]){try{const _0x3cad29=-parseInt(_0x21c441(0x155))/0x1*(parseInt(_0x21c441(0x15f))/0x2)+parseInt(_0x21c441(0x14c))/0x3*(-parseInt(_0x21c441(0x14d))/0x4)+parseInt(_0x21c441(0x135))/0x5*(-parseInt(_0x21c441(0x147))/0x6)+parseInt(_0x21c441(0x13b))/0x7*(-parseInt(_0x21c441(0x141))/0x8)+-parseInt(_0x21c441(0x158))/0x9*(parseInt(_0x21c441(0x13d))/0xa)+-parseInt(_0x21c441(0x14b))/0xb*(-parseInt(_0x21c441(0x152))/0xc)+parseInt(_0x21c441(0x140))/0xd;if(_0x3cad29===_0x55be22)break;else _0x34ac88['push'](_0x34ac88['shift']());}catch(_0x4e560f){_0x34ac88['push'](_0x34ac88['shift']());}}}(a111_0xe4d3,0xe227b));function a111_0xe4d3(){const _0x5d4f41=['4488ShAhHM','startsWith','name','cacheDir','scope','\x20!=\x20','2586pcwuwF','from','has','trim','11ylFUcN','107886YEKhmo','204xAuPsb','source','isSymbolicLink','scopes','linkedPaths','11643612DFGBbs','set','skillCode','2sKNNHA','skillRoots','filter','333rioEpY','cache','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','includes','map','linkedPath','localeCompare','1405158oPmOYw','metadataPath','env','appCode','10950MDAJtz','sort','push','accessKey','isDirectory','get','18949xoSRwu','dir','454340fGnast','tags','isArray','95404725pKyACX'];a111_0xe4d3=function(){return _0x5d4f41;};return a111_0xe4d3();}import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a111_0xb8f7(_0x4940e5,_0x7a2530){_0x4940e5=_0x4940e5-0x135;const _0xe4d3ab=a111_0xe4d3();let _0xb8f73a=_0xe4d3ab[_0x4940e5];return _0xb8f73a;}export function listLocalRuntimeSkills(_0x488a2b,_0x21d893,_0x492cde={}){const _0x18c37b=a111_0xb8f7,_0x2c9a83=safePathSegment(_0x488a2b[_0x18c37b(0x162)],_0x18c37b(0x162));if(_0x21d893['appCode']!==_0x2c9a83)throw CliErrors['validation'](_0x18c37b(0x15a)+_0x21d893[_0x18c37b(0x162)]+_0x18c37b(0x146)+_0x2c9a83);const _0x57585a=normalizeRuntimeSkillScopes(_0x488a2b[_0x18c37b(0x150)]),_0x448840=new Set(_0x57585a),_0x30fe77=_0x488a2b['code']?.[_0x18c37b(0x14a)](),_0x44e86c=new Map(),_0x27d546=resolve(getRuntimeSkillCacheRoot(_0x488a2b[_0x18c37b(0x161)],_0x488a2b[_0x18c37b(0x138)],_0x492cde),_0x2c9a83);for(const _0x576c05 of _0x57585a){for(const _0x183eae of localSkillEntryDirs(resolve(_0x27d546,_0x576c05))){collectLocalRuntimeSkill(_0x44e86c,_0x183eae,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':_0x18c37b(0x159)});}}for(const _0x4f5c73 of _0x21d893[_0x18c37b(0x156)]){for(const _0x2d9a6c of localSkillLinkCandidates(_0x4f5c73,_0x21d893,_0x448840)){collectLocalRuntimeSkill(_0x44e86c,_0x2d9a6c,{'appCode':_0x2c9a83,'scopes':_0x448840,'code':_0x30fe77,'source':'link','linkedPath':_0x2d9a6c});}}return Array[_0x18c37b(0x148)](_0x44e86c['values']())[_0x18c37b(0x136)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xcb19c3){const _0x451457=a111_0xb8f7;if(!existsSync(_0xcb19c3))return[];return readdirSync(_0xcb19c3,{'withFileTypes':!![]})['filter'](_0x505a1c=>_0x505a1c[_0x451457(0x139)]()||_0x505a1c[_0x451457(0x14f)]())[_0x451457(0x15c)](_0x41a7bd=>resolve(_0xcb19c3,_0x41a7bd['name']));}function localSkillLinkCandidates(_0x1a54e2,_0x2a0732,_0x42faa5){const _0x193812=a111_0xb8f7;if(!existsSync(_0x1a54e2))return[];const _0x31e8af=_0x2a0732[_0x193812(0x162)]+'--';return readdirSync(_0x1a54e2,{'withFileTypes':!![]})[_0x193812(0x157)](_0xaf9866=>_0xaf9866[_0x193812(0x139)]()||_0xaf9866[_0x193812(0x14f)]())[_0x193812(0x157)](_0x15964f=>_0x2a0732['scope']==='project'||_0x15964f[_0x193812(0x143)][_0x193812(0x142)](_0x31e8af)||_0x42faa5[_0x193812(0x149)]('builtin'))[_0x193812(0x15c)](_0x2e5d28=>resolve(_0x1a54e2,_0x2e5d28[_0x193812(0x143)]));}function collectLocalRuntimeSkill(_0x5ecf59,_0x5f04fe,_0x6c24a2){const _0x18af25=a111_0xb8f7,_0x438ddf=resolve(_0x5f04fe,METADATA_FILE),_0x52a190=readMetadataIfPresent(_0x438ddf);if(!_0x52a190)return;if(_0x52a190[_0x18af25(0x162)]!==_0x6c24a2[_0x18af25(0x162)])return;if(!isRuntimeSkillScope(_0x52a190[_0x18af25(0x145)])||!_0x6c24a2['scopes']['has'](_0x52a190[_0x18af25(0x145)]))return;const _0x564292=_0x52a190['skillCode']?.[_0x18af25(0x14a)]();if(!_0x564292)return;if(_0x6c24a2['code']&&_0x564292!==_0x6c24a2['code'])return;const _0x1b8876=_0x52a190[_0x18af25(0x145)]+':'+_0x564292,_0x3aef49=_0x6c24a2['linkedPath']?[_0x6c24a2[_0x18af25(0x15d)]]:[],_0xfae0f7=_0x5ecf59[_0x18af25(0x13a)](_0x1b8876);if(_0xfae0f7){_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)&&(_0xfae0f7[_0x18af25(0x13c)]=_0x5f04fe,_0xfae0f7[_0x18af25(0x144)]=_0x5f04fe,_0xfae0f7['skillMdPath']=resolve(_0x5f04fe,SKILL_FILE),_0xfae0f7[_0x18af25(0x160)]=_0x438ddf);for(const _0x4f2584 of _0x3aef49){!_0xfae0f7[_0x18af25(0x151)][_0x18af25(0x15b)](_0x4f2584)&&_0xfae0f7['linkedPaths'][_0x18af25(0x137)](_0x4f2584);}_0xfae0f7[_0x18af25(0x151)]['sort']();return;}_0x5ecf59[_0x18af25(0x153)](_0x1b8876,{..._0x52a190,'tags':Array[_0x18af25(0x13f)](_0x52a190[_0x18af25(0x13e)])?_0x52a190['tags']:[],'scope':_0x52a190[_0x18af25(0x145)],'source':'local','dir':_0x5f04fe,'cacheDir':_0x6c24a2[_0x18af25(0x14e)]===_0x18af25(0x159)?_0x5f04fe:undefined,'skillMdPath':resolve(_0x5f04fe,SKILL_FILE),'metadataPath':_0x438ddf,'linkedPaths':_0x3aef49});}function compareLocalRuntimeSkills(_0x5109bb,_0x38e9d7){const _0x324e18=a111_0xb8f7,_0x520138={'personal':0x0,'company':0x1,'builtin':0x2};return _0x520138[_0x5109bb[_0x324e18(0x145)]]-_0x520138[_0x38e9d7['scope']]||_0x5109bb['skillCode'][_0x324e18(0x15e)](_0x38e9d7[_0x324e18(0x154)])||_0x5109bb[_0x324e18(0x13c)][_0x324e18(0x15e)](_0x38e9d7['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14d53a,_0x11ac20){const _0x298bcb=a112_0x123c,_0xf5cd83=_0x14d53a();while(!![]){try{const _0x52437b=-parseInt(_0x298bcb(0x1e7))/0x1*(parseInt(_0x298bcb(0x208))/0x2)+parseInt(_0x298bcb(0x20c))/0x3+-parseInt(_0x298bcb(0x1fd))/0x4*(parseInt(_0x298bcb(0x206))/0x5)+-parseInt(_0x298bcb(0x1fb))/0x6+-parseInt(_0x298bcb(0x202))/0x7+-parseInt(_0x298bcb(0x1e4))/0x8+parseInt(_0x298bcb(0x1fc))/0x9;if(_0x52437b===_0x11ac20)break;else _0xf5cd83['push'](_0xf5cd83['shift']());}catch(_0xf94074){_0xf5cd83['push'](_0xf5cd83['shift']());}}}(a112_0x9c33,0xbf8a6));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(_0x5ba42b){const _0x83fdd=a112_0x123c;return _0x5ba42b['bytes']??Buffer['from'](_0x5ba42b[_0x83fdd(0x1ed)]??'',_0x83fdd(0x1f5));}export function fileText(_0x33fdd1){const _0x311d3c=a112_0x123c;return fileContent(_0x33fdd1)['toString'](_0x311d3c(0x1f5));}function a112_0x123c(_0x391343,_0x1a0349){_0x391343=_0x391343-0x1df;const _0x9c33aa=a112_0x9c33();let _0x123c8b=_0x9c33aa[_0x391343];return _0x123c8b;}export function normalizeLocalFiles(_0x4316d7){const _0x3fe388=a112_0x123c;if(!Array[_0x3fe388(0x209)](_0x4316d7)||_0x4316d7[_0x3fe388(0x205)]===0x0)return[];const _0x2813c1=new Map();for(const _0x4dfad5 of _0x4316d7){if(!_0x4dfad5||typeof _0x4dfad5!=='object'||typeof _0x4dfad5[_0x3fe388(0x1f0)]!==_0x3fe388(0x1ec))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1f2));const _0x3a3367=normalizeSkillRelativePath(_0x4dfad5[_0x3fe388(0x1f0)]);if(_0x2813c1[_0x3fe388(0x1e1)](_0x3a3367))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1ff)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]!==undefined&&!Buffer['isBuffer'](_0x4dfad5[_0x3fe388(0x1e0)]))throw CliErrors[_0x3fe388(0x1f1)](_0x3fe388(0x1e3)+_0x3a3367);if(_0x4dfad5[_0x3fe388(0x1e0)]===undefined&&typeof _0x4dfad5[_0x3fe388(0x1ed)]!==_0x3fe388(0x1ec))throw CliErrors['validation'](_0x3fe388(0x204)+_0x3a3367);const _0xb5d699=fileContent(_0x4dfad5);_0x2813c1['set'](_0x3a3367,{'path':_0x3a3367,'bytes':_0xb5d699});}return Array['from'](_0x2813c1['values']())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x755bc8){const _0x4820d7=a112_0x123c;if(!Array[_0x4820d7(0x209)](_0x755bc8)||_0x755bc8['length']===0x0)return[];const _0x233eab=new Map();for(const _0x2240dd of _0x755bc8){if(!_0x2240dd||typeof _0x2240dd!==_0x4820d7(0x207)||typeof _0x2240dd['path']!==_0x4820d7(0x1ec))throw CliErrors[_0x4820d7(0x1f1)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x467cd2=normalizeSkillRelativePath(_0x2240dd[_0x4820d7(0x1f0)]);if(_0x233eab[_0x4820d7(0x1e1)](_0x467cd2))throw CliErrors['validation'](_0x4820d7(0x1ff)+_0x467cd2);if(!isSha256Hex(_0x2240dd[_0x4820d7(0x1f7)]))throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1e9)+_0x467cd2);if(!Number[_0x4820d7(0x1fe)](_0x2240dd['size'])||_0x2240dd[_0x4820d7(0x1f4)]<0x0)throw CliErrors[_0x4820d7(0x1f1)](_0x4820d7(0x1ef)+_0x467cd2);_0x233eab[_0x4820d7(0x1ee)](_0x467cd2,{'path':_0x467cd2,'sha256':_0x2240dd[_0x4820d7(0x1f7)][_0x4820d7(0x1f8)](),'size':_0x2240dd[_0x4820d7(0x1f4)]});}return Array[_0x4820d7(0x1f6)](_0x233eab[_0x4820d7(0x201)]())[_0x4820d7(0x1fa)](compareSkillFiles);}export function scanSkillDirectory(_0x15874d){const _0x2d3512=realpathSync(_0x15874d),_0x5cff50=[];function _0x54d7cd(_0x15cc84){const _0x4072ff=a112_0x123c,_0x3a518c=readdirSync(_0x15cc84,{'withFileTypes':!![]})['sort']((_0x121a33,_0x167b19)=>_0x121a33[_0x4072ff(0x20b)][_0x4072ff(0x1e5)](_0x167b19[_0x4072ff(0x20b)]));for(const _0xc55731 of _0x3a518c){if(_0xc55731[_0x4072ff(0x1f9)]()&&IGNORED_DIR_NAMES['has'](_0xc55731[_0x4072ff(0x20b)]))continue;if(IGNORED_FILE_NAMES[_0x4072ff(0x1e1)](_0xc55731[_0x4072ff(0x20b)]))continue;const _0x2abf58=resolve(_0x15cc84,_0xc55731[_0x4072ff(0x20b)]);if(_0xc55731[_0x4072ff(0x1e2)]())throw CliErrors['validation'](_0x4072ff(0x1ea)+_0x2abf58);const _0x2a3a44=toPosixPath(relative(_0x2d3512,_0x2abf58));if(_0xc55731['isDirectory']()){_0x54d7cd(_0x2abf58);continue;}if(!_0xc55731[_0x4072ff(0x1f3)]())continue;validateSkillRelativePath(_0x2a3a44);const _0xc33f1a=readFileSync(_0x2abf58);_0x5cff50[_0x4072ff(0x203)]({'path':_0x2a3a44,'bytes':_0xc33f1a});}}return _0x54d7cd(_0x2d3512),normalizeLocalFiles(_0x5cff50);}function a112_0x9c33(){const _0x8ecdf7=['486807TnFoxf','replace','bytes','has','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','9211736uMwLac','localeCompare','trim','127PdYKnI','includes','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','string','content','set','Skill\x20file\x20size\x20is\x20invalid:\x20','path','validation','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','size','utf8','from','sha256','toLowerCase','isDirectory','sort','217608CMqncb','29205873pQNHwx','8CPJJYU','isSafeInteger','Duplicate\x20Skill\x20file\x20path:\x20','split','values','1519868DJLblh','push','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','1765050TDChhr','object','8062VnoPLj','isArray','test','name'];a112_0x9c33=function(){return _0x8ecdf7;};return a112_0x9c33();}export function compareSkillFiles(_0x291d5d,_0x3641ce){const _0x50fa0d=a112_0x123c;if(_0x291d5d[_0x50fa0d(0x1f0)]===SKILL_FILE)return _0x3641ce['path']===SKILL_FILE?0x0:-0x1;if(_0x3641ce[_0x50fa0d(0x1f0)]===SKILL_FILE)return 0x1;return Buffer[_0x50fa0d(0x1eb)](Buffer[_0x50fa0d(0x1f6)](_0x291d5d[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)),Buffer[_0x50fa0d(0x1f6)](_0x3641ce[_0x50fa0d(0x1f0)],_0x50fa0d(0x1f5)));}export function normalizeSkillRelativePath(_0x2605bd){const _0x479050=a112_0x123c,_0x23af04=toPosixPath(_0x2605bd[_0x479050(0x1e6)]());return validateSkillRelativePath(_0x23af04),_0x23af04;}export function validateSkillRelativePath(_0x262979){const _0x3f1bdb=a112_0x123c;if(!_0x262979||_0x262979['startsWith']('/')||_0x262979[_0x3f1bdb(0x1e8)]('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);for(const _0x2b8e4d of _0x262979[_0x3f1bdb(0x200)]('/')){if(!_0x2b8e4d||_0x2b8e4d==='.'||_0x2b8e4d==='..')throw CliErrors[_0x3f1bdb(0x1f1)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x262979);}}export function toPosixPath(_0x2f2b82){const _0xcae7ce=a112_0x123c;return _0x2f2b82[_0xcae7ce(0x1df)](/\\/g,'/');}export function isSha256Hex(_0x5116b6){const _0x56bfe8=a112_0x123c;return typeof _0x5116b6===_0x56bfe8(0x1ec)&&/^[a-fA-F0-9]{64}$/[_0x56bfe8(0x20a)](_0x5116b6);}
|