@lovrabet/lovrabet-cli 2.2.4 → 2.2.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.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.d.ts +7 -0
- 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.d.ts +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ed0f0,_0x30e137){const _0x1fbf1b=a114_0x1a23,_0x4b961d=_0x4ed0f0();while(!![]){try{const _0x45857f=parseInt(_0x1fbf1b(0x195))/0x1+-parseInt(_0x1fbf1b(0x19f))/0x2*(parseInt(_0x1fbf1b(0x199))/0x3)+-parseInt(_0x1fbf1b(0x19b))/0x4+parseInt(_0x1fbf1b(0x1a8))/0x5*(parseInt(_0x1fbf1b(0x1a4))/0x6)+parseInt(_0x1fbf1b(0x1b2))/0x7*(-parseInt(_0x1fbf1b(0x1a7))/0x8)+parseInt(_0x1fbf1b(0x198))/0x9*(parseInt(_0x1fbf1b(0x1ab))/0xa)+parseInt(_0x1fbf1b(0x190))/0xb*(-parseInt(_0x1fbf1b(0x193))/0xc);if(_0x45857f===_0x30e137)break;else _0x4b961d['push'](_0x4b961d['shift']());}catch(_0x4c726a){_0x4b961d['push'](_0x4b961d['shift']());}}}(a114_0x4ec0,0x3c6de));function a114_0x4ec0(){const _0x52806c=['150573zAzNBD','description','1009544rwdNGz','title=','schedule-id','params=','4NYNLKT','name','length','cron','scheduled-at=','42BSmrNq','\x20\x20\x20Continue?\x20[y/N]\x20','title','248mbSplW','232635hQaiAX','join','\x20\x20\x20','3777670ZrOTeP','affectedRecords','scheduled-at','service','stringify','cron=','name=','88046IIEVne','push','11yusriG','params','command','1932648afbABd','\x20\x20\x20Affected:\x20','447802IaeqCq','kind','id=','9iFXIEF'];a114_0x4ec0=function(){return _0x52806c;};return a114_0x4ec0();}function a114_0x1a23(_0xf6842d,_0x10ba83){_0xf6842d=_0xf6842d-0x18f;const _0x4ec099=a114_0x4ec0();let _0x1a23ab=_0x4ec099[_0xf6842d];return _0x1a23ab;}import{CLI_BIN_NAME}from'../constant/cli.js';export function buildConfirmationLines(_0x31e896,_0x5f5485,_0x3bbe2f){const _0x406283=a114_0x1a23,_0x15fec7=buildConfirmationContext(_0x31e896,_0x5f5485,_0x3bbe2f),_0x4364dd=['⚠\x20\x20High-risk\x20operation:\x20'+_0x15fec7['commandLabel']];return _0x15fec7[_0x406283(0x19a)]&&_0x4364dd[_0x406283(0x18f)](_0x406283(0x1aa)+_0x15fec7[_0x406283(0x19a)]),_0x15fec7[_0x406283(0x1ac)]&&_0x4364dd[_0x406283(0x18f)](_0x406283(0x194)+_0x15fec7['affectedRecords']),_0x4364dd[_0x406283(0x18f)](_0x406283(0x1a5)),_0x4364dd;}export function reconstructCommandArgv(_0xa85e32,_0xeca345){const _0x255b73=a114_0x1a23,_0x26487c=[CLI_BIN_NAME,_0xa85e32[_0x255b73(0x1ae)],_0xa85e32[_0x255b73(0x192)]];for(const [_0x54cd6b,_0x39c964]of Object['entries'](_0xeca345)){if(_0x39c964===!![])_0x26487c[_0x255b73(0x18f)]('--'+_0x54cd6b);else _0x39c964!==![]&&_0x39c964!==undefined&&_0x39c964!==''&&_0x26487c[_0x255b73(0x18f)]('--'+_0x54cd6b+'\x20'+JSON[_0x255b73(0x1af)](_0x39c964));}return _0x26487c[_0x255b73(0x18f)]('--yes'),_0x26487c['join']('\x20');}function buildConfirmationContext(_0x1f758a,_0x1aaa72,_0x320c94){const _0x4053f6=a114_0x1a23,_0x1f78b2=extractAffectedRecords(_0x320c94);return{'commandLabel':_0x1aaa72,'description':_0x1f758a[_0x4053f6(0x19a)],'affectedRecords':_0x1f78b2};}function extractAffectedRecords(_0x58de55){const _0x3b58ca=a114_0x1a23,_0x17c189=[];if(_0x58de55['code'])_0x17c189['push']('code='+_0x58de55['code']);if(_0x58de55['id'])_0x17c189[_0x3b58ca(0x18f)](_0x3b58ca(0x197)+_0x58de55['id']);if(_0x58de55['schedule-id'])_0x17c189[_0x3b58ca(0x18f)]('schedule-id='+_0x58de55[_0x3b58ca(0x19d)]);if(_0x58de55[_0x3b58ca(0x1a0)])_0x17c189[_0x3b58ca(0x18f)](_0x3b58ca(0x1b1)+_0x58de55['name']);if(_0x58de55[_0x3b58ca(0x1a6)])_0x17c189['push'](_0x3b58ca(0x19c)+_0x58de55['title']);if(_0x58de55[_0x3b58ca(0x196)])_0x17c189[_0x3b58ca(0x18f)]('kind='+_0x58de55[_0x3b58ca(0x196)]);if(_0x58de55[_0x3b58ca(0x1a2)])_0x17c189[_0x3b58ca(0x18f)](_0x3b58ca(0x1b0)+_0x58de55[_0x3b58ca(0x1a2)]);if(_0x58de55['scheduled-at'])_0x17c189[_0x3b58ca(0x18f)](_0x3b58ca(0x1a3)+_0x58de55[_0x3b58ca(0x1ad)]);if(_0x58de55['channel'])_0x17c189[_0x3b58ca(0x18f)]('channel='+_0x58de55['channel']);if(_0x58de55[_0x3b58ca(0x191)])_0x17c189[_0x3b58ca(0x18f)](_0x3b58ca(0x19e)+_0x58de55[_0x3b58ca(0x191)]);return _0x17c189[_0x3b58ca(0x1a1)]>0x0?_0x17c189[_0x3b58ca(0x1a9)](',\x20'):undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a115_0xbc18(){const _0x3c451f=['10cyQZdU','4NjTmnG','273qxHktk','2181066BWVnyU','3068MZAQwn','859467cdBDqv','validation','trim','1081036AnZVOF','status','string','code','13028lFJTTB','132cjtJCR','stringify','57144lmJeQX','14780wuEgYi','152472EdOPuB','message','response','6174cztgBK'];a115_0xbc18=function(){return _0x3c451f;};return a115_0xbc18();}(function(_0x47e26c,_0x3c8242){const _0x1bd92b=a115_0x2d15,_0xc28184=_0x47e26c();while(!![]){try{const _0x29c301=-parseInt(_0x1bd92b(0xe5))/0x1*(parseInt(_0x1bd92b(0xe6))/0x2)+parseInt(_0x1bd92b(0xf3))/0x3*(-parseInt(_0x1bd92b(0xef))/0x4)+parseInt(_0x1bd92b(0xee))/0x5*(parseInt(_0x1bd92b(0xf1))/0x6)+-parseInt(_0x1bd92b(0xf0))/0x7*(-parseInt(_0x1bd92b(0xea))/0x8)+parseInt(_0x1bd92b(0xed))/0x9*(-parseInt(_0x1bd92b(0xe9))/0xa)+parseInt(_0x1bd92b(0xe1))/0xb+parseInt(_0x1bd92b(0xe8))/0xc*(parseInt(_0x1bd92b(0xf2))/0xd);if(_0x29c301===_0x3c8242)break;else _0xc28184['push'](_0xc28184['shift']());}catch(_0x102600){_0xc28184['push'](_0xc28184['shift']());}}}(a115_0xbc18,0x81eda));import{LovrabetError}from'@lovrabet/sdk';function a115_0x2d15(_0x1591ba,_0x5394b4){_0x1591ba=_0x1591ba-0xe0;const _0xbc18cd=a115_0xbc18();let _0x2d1547=_0xbc18cd[_0x1591ba];return _0x2d1547;}import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';export function mapUserFacingExecuteError(_0x3f1390){const _0x4616d7=a115_0x2d15;if(_0x3f1390 instanceof LovrabetError){const _0x1f556c=userFacingLovrabetMessage(_0x3f1390),_0x12fc42=_0x3f1390,_0x4d1d52=createRateLimitError({'status':_0x12fc42[_0x4616d7(0xe2)],'errorCode':_0x12fc42[_0x4616d7(0xe4)],'message':_0x1f556c,'retryAfter':readRetryAfter(_0x12fc42['response']?.['headers'])??readRetryAfterSeconds(_0x12fc42[_0x4616d7(0xec)])});return _0x4d1d52??CliErrors[_0x4616d7(0xf4)](_0x1f556c);}return _0x3f1390;}function userFacingLovrabetMessage(_0x1776e7){const _0x376b1c=a115_0x2d15,_0x2e5d9f=_0x1776e7['description'];if(_0x2e5d9f!==undefined&&_0x2e5d9f!==null){if(typeof _0x2e5d9f===_0x376b1c(0xe3)&&_0x2e5d9f[_0x376b1c(0xe0)]())return _0x2e5d9f[_0x376b1c(0xe0)]();try{return JSON[_0x376b1c(0xe7)](_0x2e5d9f);}catch{}}return _0x1776e7[_0x376b1c(0xeb)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xf8cd34,_0x44794c){const _0x245843=a116_0x31e8,_0x57b235=_0xf8cd34();while(!![]){try{const _0x5d5b7c=-parseInt(_0x245843(0x1c0))/0x1+-parseInt(_0x245843(0x1ea))/0x2+-parseInt(_0x245843(0x1ca))/0x3*(-parseInt(_0x245843(0x1bc))/0x4)+-parseInt(_0x245843(0x1d0))/0x5+parseInt(_0x245843(0x1d6))/0x6+parseInt(_0x245843(0x1e8))/0x7*(-parseInt(_0x245843(0x1bf))/0x8)+-parseInt(_0x245843(0x1c2))/0x9*(-parseInt(_0x245843(0x1c9))/0xa);if(_0x5d5b7c===_0x44794c)break;else _0x57b235['push'](_0x57b235['shift']());}catch(_0x2c3697){_0x57b235['push'](_0x57b235['shift']());}}}(a116_0x6c21,0x8894e));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';function a116_0x6c21(){const _0x6b4b73=['cancelled','has','local-alias','appcode','ClientAk','trim','catch','format','ACCESS_KEY','production','newConfigFileName','object','428071CbGviC','validation','1567714CtUiUA','resolve','execute','../core/api-client.js','includes','defaultPageSize','filter','update','error','Run\x20`','nonInteractive','configMissing','appCodeSource','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','pretty','map','\x20\x20To\x20proceed:\x20','app','../core/sdk-client.js','string','env','4Bpraqq','authRequired','service','136NRiImG','784810CfrVFP','Unknown\x20app:\x20','95535fChEMv','items','_notice','APPCODE','currentApp','defaultApp','../commands/app/remote-source.js','2830Sricgc','500667weihJg','Set\x20accessKey\x20in\x20','appcode\x20\x22','appCode','pageSize','requiresAuth','4165400enRIVE','mergedCli','High-risk\x20operation\x20`','confirmHighRisk','rawFlags','verbose','4979112uXWfLD','name','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','requiresAppCode','accessKey','command'];a116_0x6c21=function(){return _0x6b4b73;};return a116_0x6c21();}function a116_0x31e8(_0xc9303a,_0x5254a2){_0xc9303a=_0xc9303a-0x1a9;const _0x6c21e8=a116_0x6c21();let _0x31e80b=_0x6c21e8[_0xc9303a];return _0x31e80b;}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(_0x893db8){const _0x3d0b99=a116_0x31e8;return void _0x893db8,AUTH_MODE[_0x3d0b99(0x1e0)];}let sdkClientInitialized=![];export function createPipelineEnv(_0xbd9763,_0x1be7be){const _0x4851ce=a116_0x31e8,_0x5573b1=typeof _0x1be7be[_0x4851ce(0x1b8)]==='string'&&_0x1be7be[_0x4851ce(0x1b8)][_0x4851ce(0x1e1)]();return{'rawFlags':_0x1be7be,'appCode':_0xbd9763[_0x4851ce(0x1cd)]||productEnv('APPCODE')||(_0x5573b1?undefined:readAppCodeFromConfig()),'appCodeSource':_0xbd9763[_0x4851ce(0x1b3)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x1be7be),'defaultFormat':_0xbd9763[_0x4851ce(0x1e3)],'defaultPageSize':_0xbd9763[_0x4851ce(0x1ce)],'defaultVerbose':_0xbd9763[_0x4851ce(0x1d5)],'riskLevel':_0xbd9763['riskLevel'],'accessKey':_0xbd9763['accessKey'],'env':_0xbd9763[_0x4851ce(0x1bb)],'mergedCli':{'defaultApp':_0xbd9763[_0x4851ce(0x1c7)],'currentApp':_0xbd9763[_0x4851ce(0x1c6)],'appCode':_0xbd9763['appCode']}};}export function createLovrabetRunnerAdapter(_0x3e8d9b={}){const _0x236b2d=a116_0x31e8,_0x134946={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x236b2d(0x1ad)](_0x19d141=>PIPELINE_FLAG_NAMES[_0x236b2d(0x1dd)](_0x19d141[_0x236b2d(0x1d7)]))[_0x236b2d(0x1b6)](({name:_0x13c06c,type:_0x266a2d,description:_0x31b6d0})=>({'name':_0x13c06c,'type':_0x266a2d,'description':_0x31b6d0})),'formatOutput':_0x3e8d9b['formatOutput']??formatOutput,'getCommandLabel'(_0x276cf9){const _0x3bd7a2=_0x236b2d;return CLI_BIN_NAME+'\x20'+_0x276cf9['service']+'\x20'+_0x276cf9[_0x3bd7a2(0x1db)];},'riskPolicy':{'onViolation'(_0x36b7fb){const _0x20ef09=_0x236b2d;console[_0x20ef09(0x1af)](_0x36b7fb);},'createError'(_0xe64087){const _0x5babb5=_0x236b2d;return CliErrors[_0x5babb5(0x1dc)](_0xe64087);}},async 'prepare'(_0xf850f1,_0x4ee43b){const _0x4f892a=_0x236b2d,_0x540e1c=resolveAuthMode(_0x4ee43b);if(_0xf850f1[_0x4f892a(0x1cf)]!==![]){if(!_0x4ee43b[_0x4f892a(0x1da)])throw CliErrors[_0x4f892a(0x1bd)](_0x4f892a(0x1cb)+PRODUCT_CONFIG[_0x4f892a(0x1e6)]+'\x20or\x20pass\x20'+productEnvName(_0x4f892a(0x1e4))+'.');const {setActiveAK:_0x50752b}=await import(_0x4f892a(0x1aa));_0x50752b(_0x4ee43b[_0x4f892a(0x1da)]);}let _0x1a280f='';if(_0xf850f1[_0x4f892a(0x1d9)]!==![]){_0x1a280f=_0x4ee43b[_0x4f892a(0x1cd)]??'',_0x1a280f=await resolveExplicitAppName(_0xf850f1,_0x4ee43b,_0x1a280f);if(!_0x1a280f){await assertSelectedAppNameIsRuntimeAccessible(_0xf850f1,_0x4ee43b);throw CliErrors[_0x4f892a(0x1b2)](_0x4f892a(0x1b4)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0xf850f1,_0x4ee43b,_0x1a280f);}if(_0x1a280f){const {initSdkClient:_0x1ddd90}=await import('../core/sdk-client.js');_0x1ddd90({'appCode':_0x1a280f,'env':_0x4ee43b[_0x4f892a(0x1bb)]??_0x4f892a(0x1e5),'accessKey':_0x4ee43b['accessKey'],'authMode':_0x540e1c}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x4ee43b['defaultVerbose']},'numbers':{'pagesize':_0x4ee43b[_0x4f892a(0x1ac)]}},'extras':{'appCode':_0x1a280f,'cookie':'','apiDomain':_0x4ee43b['apiDomain'],'apiDir':'','accessKey':_0x4ee43b[_0x4f892a(0x1da)],'envName':_0x4ee43b[_0x4f892a(0x1bb)],'mergedCli':_0x4ee43b[_0x4f892a(0x1d1)]}};},'confirmHighRisk':_0x3e8d9b[_0x236b2d(0x1d3)]??(async({def:_0x2781f8,env:_0x5112d7,flags:_0x3032cd,commandLabel:_0x18a621})=>{const _0x53f948=_0x236b2d;if(_0x5112d7['isNonInteractive']){const _0x12e3eb=reconstructCommandArgv(_0x2781f8,_0x3032cd);throw CliErrors[_0x53f948(0x1e9)](_0x53f948(0x1d2)+_0x18a621+_0x53f948(0x1d8)+(_0x53f948(0x1b7)+_0x12e3eb));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2781f8,_0x18a621,_0x3032cd),'createCancelledError':_0x36fd2c=>CliErrors[_0x53f948(0x1dc)](_0x36fd2c)});}),'mapDryRunError'(_0x49e92d){return mapUserFacingExecuteError(_0x49e92d);},'mapExecuteError'(_0x302e03){return mapUserFacingExecuteError(_0x302e03);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x134946;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x56ca55=a116_0x31e8;try{if(sdkClientInitialized){const {clearSdkClient:_0x4cca83}=await import(_0x56ca55(0x1b9));_0x4cca83();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x462cf7}=await import(_0x56ca55(0x1aa));_0x462cf7();}}async function resolveExplicitAppName(_0x14e911,_0x3fecbb,_0x3a8ef5){const _0x5d7284=a116_0x31e8;if(_0x14e911[_0x5d7284(0x1d9)]===![])return _0x3a8ef5;const _0x2689d5=typeof _0x3fecbb[_0x5d7284(0x1d4)][_0x5d7284(0x1b8)]===_0x5d7284(0x1ba)?_0x3fecbb[_0x5d7284(0x1d4)][_0x5d7284(0x1b8)][_0x5d7284(0x1e1)]():'';if(!_0x2689d5)return _0x3a8ef5;const _0x1953ea=typeof _0x3fecbb['rawFlags'][_0x5d7284(0x1df)]===_0x5d7284(0x1ba)&&_0x3fecbb[_0x5d7284(0x1d4)]['appcode'][_0x5d7284(0x1e1)]()||productEnv(_0x5d7284(0x1c5));if(_0x1953ea||_0x3fecbb[_0x5d7284(0x1b3)]===_0x5d7284(0x1de))return _0x3a8ef5;const {getRemoteAppList:_0x1e57c0}=await import('../commands/app/remote-source.js'),_0x26516e=await _0x1e57c0({'env':_0x3fecbb['env']??_0x5d7284(0x1e5),'accessKey':_0x3fecbb[_0x5d7284(0x1da)]}),_0x5c505b=findAppByName(_0x26516e[_0x5d7284(0x1c3)],_0x2689d5);if(_0x5c505b&&!isRuntimeAccessibleApp(_0x5c505b))throw runtimeInaccessibleAppError(_0x5c505b,'\x22'+_0x2689d5+'\x22');const _0x3c860f=_0x5c505b?.[_0x5d7284(0x1cd)]?.['trim']();if(_0x3c860f)return _0x3c860f;throw CliErrors[_0x5d7284(0x1e9)](_0x5d7284(0x1c1)+_0x2689d5,_0x5d7284(0x1b0)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x2689d5+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x5d7284(0x1e6)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x2caea6,_0x5adf71){const _0x3c30dc=a116_0x31e8;if(_0x2caea6['requiresAppCode']===![]||!_0x5adf71[_0x3c30dc(0x1da)])return;const _0x1c2515=(typeof _0x5adf71[_0x3c30dc(0x1d4)][_0x3c30dc(0x1b8)]===_0x3c30dc(0x1ba)&&_0x5adf71['rawFlags'][_0x3c30dc(0x1b8)][_0x3c30dc(0x1e1)]()?_0x5adf71[_0x3c30dc(0x1d4)][_0x3c30dc(0x1b8)]:_0x5adf71['mergedCli']?.[_0x3c30dc(0x1c6)]??_0x5adf71[_0x3c30dc(0x1d1)]?.[_0x3c30dc(0x1c7)])?.[_0x3c30dc(0x1e1)]();if(!_0x1c2515)return;const {getRemoteAppList:_0xe9542}=await import(_0x3c30dc(0x1c8)),_0x138367=await _0xe9542({'env':_0x5adf71['env']??_0x3c30dc(0x1e5),'accessKey':_0x5adf71['accessKey']}),_0x1834d9=findAppByName(_0x138367[_0x3c30dc(0x1c3)],_0x1c2515);if(_0x1834d9&&!isRuntimeAccessibleApp(_0x1834d9))throw runtimeInaccessibleAppError(_0x1834d9,'\x22'+_0x1c2515+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x5533ff,_0x3742bf,_0x3d00f0){const _0x17e4c9=a116_0x31e8;if(_0x5533ff['requiresAppCode']===![]||!_0x3742bf[_0x17e4c9(0x1da)])return;const {getRemoteAppList:_0x3e53b4}=await import(_0x17e4c9(0x1c8)),_0x1c64ff=await _0x3e53b4({'env':_0x3742bf[_0x17e4c9(0x1bb)]??_0x17e4c9(0x1e5),'accessKey':_0x3742bf[_0x17e4c9(0x1da)]}),_0x3517bc=findAppByCode(_0x1c64ff['items'],_0x3d00f0);if(_0x3517bc&&!isRuntimeAccessibleApp(_0x3517bc))throw runtimeInaccessibleAppError(_0x3517bc,_0x17e4c9(0x1cc)+_0x3d00f0+'\x22');}export async function runCommand(_0xaa993,_0x4079c6,_0x8a469a=terminalRunnerAdapter){const _0x16f04a=a116_0x31e8;assertKnownCommandFlags(_0xaa993,_0x4079c6[_0x16f04a(0x1d4)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0xaa993)?withUpdateNotice(_0xaa993):_0xaa993,_0x4079c6,_0x8a469a);}function shouldAttachUpdateNotice(_0x565beb){const _0x6ca9d8=a116_0x31e8;return![_0x6ca9d8(0x1ae),'schema','doctor'][_0x6ca9d8(0x1ab)](_0x565beb[_0x6ca9d8(0x1be)]);}function withUpdateNotice(_0x58951e){return{..._0x58951e,async 'execute'(_0x11ba96){const _0x21455e=a116_0x31e8,_0x201f87=shouldResolveUpdateNotice(_0x11ba96)?resolveLatestUpdateNotice()[_0x21455e(0x1e2)](()=>null):Promise[_0x21455e(0x1eb)](null),_0x40ab16=await _0x58951e[_0x21455e(0x1a9)](_0x11ba96);return attachUpdateNotice(_0x40ab16,await _0x201f87);}};}function shouldResolveUpdateNotice(_0x2d01ca){const _0x44626d=a116_0x31e8;return _0x2d01ca['format']===_0x44626d(0x1b5)&&!_0x2d01ca[_0x44626d(0x1b1)];}function attachUpdateNotice(_0x459247,_0x1c996e){const _0x290664=a116_0x31e8;if(!_0x1c996e||!_0x459247||typeof _0x459247!==_0x290664(0x1e7))return _0x459247;const _0x4068ae=_0x459247,_0x74a0b2=typeof _0x4068ae[_0x290664(0x1c4)]===_0x290664(0x1e7)&&_0x4068ae['_notice']!==null?_0x4068ae[_0x290664(0x1c4)]:{};return{..._0x4068ae,'_notice':{..._0x74a0b2,'update':_0x1c996e}};}
|
|
1
|
+
(function(_0x13aa09,_0x3519d0){const _0x2be804=a116_0xc0ee,_0x4badbc=_0x13aa09();while(!![]){try{const _0xd31df5=-parseInt(_0x2be804(0xa6))/0x1*(-parseInt(_0x2be804(0x97))/0x2)+-parseInt(_0x2be804(0xa3))/0x3*(parseInt(_0x2be804(0x9b))/0x4)+-parseInt(_0x2be804(0x93))/0x5*(parseInt(_0x2be804(0xa5))/0x6)+-parseInt(_0x2be804(0x8c))/0x7+-parseInt(_0x2be804(0xc0))/0x8+-parseInt(_0x2be804(0xc6))/0x9+parseInt(_0x2be804(0xbe))/0xa;if(_0xd31df5===_0x3519d0)break;else _0x4badbc['push'](_0x4badbc['shift']());}catch(_0x544d26){_0x4badbc['push'](_0x4badbc['shift']());}}}(a116_0x24aa,0x2163a));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a116_0x24aa(){const _0x4b198c=['APPCODE','accessKey','format','cancelled','has','1540749Xcwqbr','resolve','schema','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','validation','catch','\x20\x20To\x20proceed:\x20','1255fgPUMv','../core/sdk-client.js','Run\x20`','../core/api-client.js','24410DPbCIR','riskLevel','update','configMissing','87820xRrOaQ','isNonInteractive','filter','string','name','\x20or\x20pass\x20','env','local-alias','21obLSDb','production','6138BXWAeU','1HMmcnJ','Unknown\x20app:\x20','requiresAppCode','.appcode\x20to\x20','command','appCode','app','includes','map','mergedCli','rawFlags','currentApp','defaultApp','appcode','defaultPageSize','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','High-risk\x20operation\x20`','ACCESS_KEY','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','trim','authRequired','items','confirmHighRisk','../commands/app/remote-source.js','8702580eOSWsF','pretty','504848yarAZv','apiDomain','_notice','doctor','object','appcode\x20\x22','468270NiLEmI','Set\x20accessKey\x20in\x20','nonInteractive','newConfigFileName','ClientAk','appCodeSource'];a116_0x24aa=function(){return _0x4b198c;};return a116_0x24aa();}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(_0x2bd525){const _0x431932=a116_0xc0ee;return void _0x2bd525,AUTH_MODE[_0x431932(0x85)];}function a116_0xc0ee(_0xffbc40,_0x2d7cb5){_0xffbc40=_0xffbc40-0x84;const _0x24aa9e=a116_0x24aa();let _0xc0eec=_0x24aa9e[_0xffbc40];return _0xc0eec;}let sdkClientInitialized=![];export function createPipelineEnv(_0x56ffbe,_0x498c72){const _0x197964=a116_0xc0ee,_0x39cfdc=typeof _0x498c72[_0x197964(0xac)]===_0x197964(0x9e)&&_0x498c72[_0x197964(0xac)][_0x197964(0xb9)]();return{'rawFlags':_0x498c72,'appCode':_0x56ffbe[_0x197964(0xab)]||productEnv(_0x197964(0x87))||(_0x39cfdc?undefined:readAppCodeFromConfig()),'appCodeSource':_0x56ffbe[_0x197964(0x86)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x498c72),'defaultFormat':_0x56ffbe[_0x197964(0x89)],'defaultPageSize':_0x56ffbe['pageSize'],'defaultVerbose':_0x56ffbe['verbose'],'riskLevel':_0x56ffbe[_0x197964(0x98)],'accessKey':_0x56ffbe[_0x197964(0x88)],'env':_0x56ffbe['env'],'mergedCli':{'defaultApp':_0x56ffbe[_0x197964(0xb2)],'currentApp':_0x56ffbe['currentApp'],'appCode':_0x56ffbe['appCode']}};}export function createLovrabetRunnerAdapter(_0x1be562={}){const _0x176c93=a116_0xc0ee,_0x1b181d={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x176c93(0x9d)](_0x2533eb=>PIPELINE_FLAG_NAMES[_0x176c93(0x8b)](_0x2533eb[_0x176c93(0x9f)]))[_0x176c93(0xae)](({name:_0x1a5fb3,type:_0x52d15d,description:_0x4d10e9})=>({'name':_0x1a5fb3,'type':_0x52d15d,'description':_0x4d10e9})),'formatOutput':_0x1be562['formatOutput']??formatOutput,'getCommandLabel'(_0x23e15a){const _0x4c04ba=_0x176c93;return CLI_BIN_NAME+'\x20'+_0x23e15a['service']+'\x20'+_0x23e15a[_0x4c04ba(0xaa)];},'riskPolicy':{'onViolation'(_0x164aa3){console['error'](_0x164aa3);},'createError'(_0x488563){const _0x34c480=_0x176c93;return CliErrors[_0x34c480(0x8a)](_0x488563);}},async 'prepare'(_0x1321d9,_0x57acb7){const _0x4b38df=_0x176c93,_0x15579b=resolveAuthMode(_0x57acb7);if(_0x1321d9['requiresAuth']!==![]){if(!_0x57acb7[_0x4b38df(0x88)])throw CliErrors[_0x4b38df(0xba)](_0x4b38df(0xc7)+PRODUCT_CONFIG[_0x4b38df(0x84)]+_0x4b38df(0xa0)+productEnvName(_0x4b38df(0xb7))+'.');const {setActiveAK:_0x590d4d}=await import(_0x4b38df(0x96));_0x590d4d(_0x57acb7['accessKey']);}let _0xb4f794='';if(_0x1321d9[_0x4b38df(0xa8)]!==![]){_0xb4f794=_0x57acb7[_0x4b38df(0xab)]??'',_0xb4f794=await resolveExplicitAppName(_0x1321d9,_0x57acb7,_0xb4f794);if(!_0xb4f794){await assertSelectedAppNameIsRuntimeAccessible(_0x1321d9,_0x57acb7);throw CliErrors[_0x4b38df(0x9a)](_0x4b38df(0xb5)+PRODUCT_CONFIG[_0x4b38df(0x84)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x1321d9,_0x57acb7,_0xb4f794);}if(_0xb4f794){const {initSdkClient:_0x531e34}=await import(_0x4b38df(0x94));_0x531e34({'appCode':_0xb4f794,'env':_0x57acb7[_0x4b38df(0xa1)]??_0x4b38df(0xa4),'accessKey':_0x57acb7[_0x4b38df(0x88)],'authMode':_0x15579b}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x57acb7['defaultVerbose']},'numbers':{'pagesize':_0x57acb7[_0x4b38df(0xb4)]}},'extras':{'appCode':_0xb4f794,'cookie':'','apiDomain':_0x57acb7[_0x4b38df(0xc1)],'apiDir':'','accessKey':_0x57acb7[_0x4b38df(0x88)],'envName':_0x57acb7['env'],'mergedCli':_0x57acb7[_0x4b38df(0xaf)]}};},'confirmHighRisk':_0x1be562[_0x176c93(0xbc)]??(async({def:_0x2a8e20,env:_0x180dab,flags:_0x48b212,commandLabel:_0x51e9cb})=>{const _0x2c6587=_0x176c93;if(_0x180dab[_0x2c6587(0x9c)]){const _0x313faf=reconstructCommandArgv(_0x2a8e20,_0x48b212);throw CliErrors[_0x2c6587(0x90)](_0x2c6587(0xb6)+_0x51e9cb+_0x2c6587(0x8f)+(_0x2c6587(0x92)+_0x313faf));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x2a8e20,_0x51e9cb,_0x48b212),'createCancelledError':_0x40df3b=>CliErrors['cancelled'](_0x40df3b)});}),'mapDryRunError'(_0x247ba4){return mapUserFacingExecuteError(_0x247ba4);},'mapExecuteError'(_0x2fd425){return mapUserFacingExecuteError(_0x2fd425);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x1b181d;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x24baaa=a116_0xc0ee;try{if(sdkClientInitialized){const {clearSdkClient:_0x4b60ee}=await import('../core/sdk-client.js');_0x4b60ee();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x30e15e}=await import(_0x24baaa(0x96));_0x30e15e();}}async function resolveExplicitAppName(_0x17716c,_0x593464,_0x32a645){const _0x27d26d=a116_0xc0ee;if(_0x17716c[_0x27d26d(0xa8)]===![])return _0x32a645;const _0x3a64ed=typeof _0x593464[_0x27d26d(0xb0)][_0x27d26d(0xac)]===_0x27d26d(0x9e)?_0x593464[_0x27d26d(0xb0)]['app'][_0x27d26d(0xb9)]():'';if(!_0x3a64ed)return _0x32a645;const _0xdd0784=typeof _0x593464[_0x27d26d(0xb0)][_0x27d26d(0xb3)]===_0x27d26d(0x9e)&&_0x593464[_0x27d26d(0xb0)]['appcode'][_0x27d26d(0xb9)]()||productEnv('APPCODE');if(_0xdd0784||_0x593464[_0x27d26d(0x86)]===_0x27d26d(0xa2))return _0x32a645;const {getRemoteAppList:_0x3c2385}=await import(_0x27d26d(0xbd)),_0x26c6bd=await _0x3c2385({'env':_0x593464[_0x27d26d(0xa1)]??'production','accessKey':_0x593464['accessKey']}),_0x3d81b2=findAppByName(_0x26c6bd[_0x27d26d(0xbb)],_0x3a64ed);if(_0x3d81b2&&!isRuntimeAccessibleApp(_0x3d81b2))throw runtimeInaccessibleAppError(_0x3d81b2,'\x22'+_0x3a64ed+'\x22');const _0x18cd69=_0x3d81b2?.[_0x27d26d(0xab)]?.[_0x27d26d(0xb9)]();if(_0x18cd69)return _0x18cd69;throw CliErrors[_0x27d26d(0x90)](_0x27d26d(0xa7)+_0x3a64ed,_0x27d26d(0x95)+CLI_BIN_NAME+_0x27d26d(0xb8)+_0x3a64ed+_0x27d26d(0xa9)+PRODUCT_CONFIG['newConfigFileName']+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x2b76a2,_0x5308f9){const _0x2dcd47=a116_0xc0ee;if(_0x2b76a2['requiresAppCode']===![]||!_0x5308f9[_0x2dcd47(0x88)])return;const _0x53aa49=(typeof _0x5308f9['rawFlags'][_0x2dcd47(0xac)]===_0x2dcd47(0x9e)&&_0x5308f9[_0x2dcd47(0xb0)][_0x2dcd47(0xac)]['trim']()?_0x5308f9[_0x2dcd47(0xb0)]['app']:_0x5308f9['mergedCli']?.[_0x2dcd47(0xb1)]??_0x5308f9[_0x2dcd47(0xaf)]?.[_0x2dcd47(0xb2)])?.[_0x2dcd47(0xb9)]();if(!_0x53aa49)return;const {getRemoteAppList:_0x500816}=await import(_0x2dcd47(0xbd)),_0x1535f0=await _0x500816({'env':_0x5308f9[_0x2dcd47(0xa1)]??_0x2dcd47(0xa4),'accessKey':_0x5308f9[_0x2dcd47(0x88)]}),_0xb4aca0=findAppByName(_0x1535f0[_0x2dcd47(0xbb)],_0x53aa49);if(_0xb4aca0&&!isRuntimeAccessibleApp(_0xb4aca0))throw runtimeInaccessibleAppError(_0xb4aca0,'\x22'+_0x53aa49+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x52f712,_0x23c6c1,_0x43981a){const _0x338650=a116_0xc0ee;if(_0x52f712[_0x338650(0xa8)]===![]||!_0x23c6c1[_0x338650(0x88)])return;const {getRemoteAppList:_0x9cd9d3}=await import('../commands/app/remote-source.js'),_0x58c8fd=await _0x9cd9d3({'env':_0x23c6c1[_0x338650(0xa1)]??_0x338650(0xa4),'accessKey':_0x23c6c1[_0x338650(0x88)]}),_0x3be53e=findAppByCode(_0x58c8fd[_0x338650(0xbb)],_0x43981a);if(_0x3be53e&&!isRuntimeAccessibleApp(_0x3be53e))throw runtimeInaccessibleAppError(_0x3be53e,_0x338650(0xc5)+_0x43981a+'\x22');}export async function runCommand(_0x599aa0,_0x27b401,_0x59bfa0=terminalRunnerAdapter){const _0x19cb03=a116_0xc0ee;assertKnownCommandFlags(_0x599aa0,_0x27b401[_0x19cb03(0xb0)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x599aa0)?withUpdateNotice(_0x599aa0):_0x599aa0,_0x27b401,_0x59bfa0);}function shouldAttachUpdateNotice(_0xeb11f1){const _0x522783=a116_0xc0ee;return![_0x522783(0x99),_0x522783(0x8e),_0x522783(0xc3)][_0x522783(0xad)](_0xeb11f1['service']);}function withUpdateNotice(_0x2ba9f8){return{..._0x2ba9f8,async 'execute'(_0x29da83){const _0x17c878=a116_0xc0ee,_0x1b9dcb=shouldResolveUpdateNotice(_0x29da83)?resolveLatestUpdateNotice()[_0x17c878(0x91)](()=>null):Promise[_0x17c878(0x8d)](null),_0x2dc3d5=await _0x2ba9f8['execute'](_0x29da83);return attachUpdateNotice(_0x2dc3d5,await _0x1b9dcb);}};}function shouldResolveUpdateNotice(_0x3f592e){const _0x3e2282=a116_0xc0ee;return _0x3f592e[_0x3e2282(0x89)]===_0x3e2282(0xbf)&&!_0x3f592e[_0x3e2282(0xc8)];}function attachUpdateNotice(_0xf73884,_0x15a57b){const _0x35789c=a116_0xc0ee;if(!_0x15a57b||!_0xf73884||typeof _0xf73884!==_0x35789c(0xc4))return _0xf73884;const _0x209b87=_0xf73884,_0x8dc10e=typeof _0x209b87[_0x35789c(0xc2)]===_0x35789c(0xc4)&&_0x209b87[_0x35789c(0xc2)]!==null?_0x209b87[_0x35789c(0xc2)]:{};return{..._0x209b87,'_notice':{..._0x8dc10e,'update':_0x15a57b}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4dd38b,_0x4d4b82){const _0x54e80d=a117_0x498a,_0x765cae=_0x4dd38b();while(!![]){try{const _0x247f0d=-parseInt(_0x54e80d(0x154))/0x1*(-parseInt(_0x54e80d(0x151))/0x2)+-parseInt(_0x54e80d(0x160))/0x3+parseInt(_0x54e80d(0x152))/0x4*(parseInt(_0x54e80d(0x155))/0x5)+-parseInt(_0x54e80d(0x14e))/0x6*(-parseInt(_0x54e80d(0x150))/0x7)+parseInt(_0x54e80d(0x15b))/0x8*(-parseInt(_0x54e80d(0x158))/0x9)+-parseInt(_0x54e80d(0x156))/0xa+-parseInt(_0x54e80d(0x153))/0xb*(-parseInt(_0x54e80d(0x15d))/0xc);if(_0x247f0d===_0x4d4b82)break;else _0x765cae['push'](_0x765cae['shift']());}catch(_0x2fcf34){_0x765cae['push'](_0x765cae['shift']());}}}(a117_0x8d18,0x95b60));import{buildSchemaPayload as a117_0x3b887b}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';function a117_0x8d18(){const _0x4be010=['commands','3337185YmWWjG','../commands/registry.js','none','4949082QHQzsd','map','7BTsVkQ','16fkrqpH','18276eYuFLe','15009511VBLjrz','95359MwIlMI','345xmCUoL','4987160pWjIvC','filter','149022Oxitbj','auth','requiresAuth','504tCRrdY','services','12hKgXwy','service'];a117_0x8d18=function(){return _0x4be010;};return a117_0x8d18();}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';function a117_0x498a(_0x1b6edf,_0x5af0f7){_0x1b6edf=_0x1b6edf-0x14e;const _0x8d18d0=a117_0x8d18();let _0x498a39=_0x8d18d0[_0x1b6edf];return _0x498a39;}export async function buildSchemaPayload(){const _0x45271f=a117_0x498a,{serviceRegistry:_0x3a3938,findDefinition:_0x1cbbd6}=await import(_0x45271f(0x161)),_0xe75be0=new Set(_0x3a3938[_0x45271f(0x14f)](_0x288eab=>_0x288eab[_0x45271f(0x15e)])),_0xae4bea=listDynamicServiceEntries()[_0x45271f(0x157)](_0x4e43a0=>!_0xe75be0['has'](_0x4e43a0[_0x45271f(0x15e)])),_0xc33d33=a117_0x3b887b({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x3a3938,_0xae4bea),'buildAllFlags':buildAllFlags,'findDefinition':(_0x353a7a,_0x1ec29d)=>_0x1cbbd6(_0x353a7a,_0x1ec29d)??findDynamicServiceDefinition(_0x353a7a,_0x1ec29d)});return normalizeSchemaPayload(_0xc33d33);}function normalizeSchemaPayload(_0x43cba2){const _0x3aa538=a117_0x498a;return{..._0x43cba2,'schemaVersion':0x2,'services':_0x43cba2[_0x3aa538(0x15c)][_0x3aa538(0x14f)](_0x270fbd=>({..._0x270fbd,'commands':_0x270fbd[_0x3aa538(0x15f)][_0x3aa538(0x14f)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x1e54ea){const _0x3a2d6d=a117_0x498a,_0x1b3914=_0x1e54ea;return{..._0x1e54ea,'auth':_0x1b3914[_0x3a2d6d(0x159)]??(_0x1e54ea[_0x3a2d6d(0x15a)]?'required':_0x3a2d6d(0x162))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a118_0x3670(_0x5702a1,_0x90abc3){_0x5702a1=_0x5702a1-0x1b5;const _0x49c9f3=a118_0x49c9();let _0x3670d9=_0x49c9f3[_0x5702a1];return _0x3670d9;}function a118_0x49c9(){const _0x4da480=['1584gNEDOd','length','1181956NBpIqK','2199449MSfpvR','findIndex','968120qzZBio','service','351369pLdOQA','1328beznqp','slice','1325964DVAgRZ','3575064mnhMhi','9iSLhaB'];a118_0x49c9=function(){return _0x4da480;};return a118_0x49c9();}(function(_0x50ed7f,_0x5e362a){const _0x3b2c89=a118_0x3670,_0x3ecbea=_0x50ed7f();while(!![]){try{const _0x2b98ee=parseInt(_0x3b2c89(0x1c0))/0x1+parseInt(_0x3b2c89(0x1c1))/0x2*(-parseInt(_0x3b2c89(0x1b9))/0x3)+parseInt(_0x3b2c89(0x1bb))/0x4+-parseInt(_0x3b2c89(0x1be))/0x5+parseInt(_0x3b2c89(0x1b6))/0x6+parseInt(_0x3b2c89(0x1bc))/0x7+-parseInt(_0x3b2c89(0x1b7))/0x8*(parseInt(_0x3b2c89(0x1b8))/0x9);if(_0x2b98ee===_0x5e362a)break;else _0x3ecbea['push'](_0x3ecbea['shift']());}catch(_0x3bd17e){_0x3ecbea['push'](_0x3ecbea['shift']());}}}(a118_0x49c9,0x2e9f0));export function insertDynamicServicesAfterServiceTree(_0x268999,_0x505bdb){const _0x2638ec=a118_0x3670;if(_0x505bdb[_0x2638ec(0x1ba)]===0x0)return[..._0x268999];const _0x76c093=_0x268999[_0x2638ec(0x1bd)](_0x625684=>_0x625684[_0x2638ec(0x1bf)]===_0x2638ec(0x1bf));if(_0x76c093<0x0)return[..._0x268999,..._0x505bdb];return[..._0x268999[_0x2638ec(0x1b5)](0x0,_0x76c093+0x1),..._0x505bdb,..._0x268999[_0x2638ec(0x1b5)](_0x76c093+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xe24ad6,_0x50f9e8){var _0x12019b=a119_0x926c,_0x2dae56=_0xe24ad6();while(!![]){try{var _0x166306=-parseInt(_0x12019b(0x134))/0x1*(-parseInt(_0x12019b(0x13a))/0x2)+parseInt(_0x12019b(0x135))/0x3+parseInt(_0x12019b(0x138))/0x4+-parseInt(_0x12019b(0x137))/0x5+parseInt(_0x12019b(0x133))/0x6*(parseInt(_0x12019b(0x139))/0x7)+-parseInt(_0x12019b(0x136))/0x8+parseInt(_0x12019b(0x132))/0x9;if(_0x166306===_0x50f9e8)break;else _0x2dae56['push'](_0x2dae56['shift']());}catch(_0x901aa9){_0x2dae56['push'](_0x2dae56['shift']());}}}(a119_0x556a,0x280e8));function a119_0x556a(){var _0x488c89=['291776YbPLxH','910uarhYw','1228ijOVVB','842931MzJfNW','3954MLHdYa','299ofnBNn','211899wocwXD','1059840ErFPLp','1049700ouaVxE'];a119_0x556a=function(){return _0x488c89;};return a119_0x556a();}function a119_0x926c(_0x29488b,_0x568d4a){_0x29488b=_0x29488b-0x132;var _0x556ab3=a119_0x556a();var _0x926c1e=_0x556ab3[_0x29488b];return _0x926c1e;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.2.
|
|
2
|
-
export declare const GIT_TAG = "v2.2.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.2.5-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.2.5-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "18fb20e";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-19T10:51:28.780Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a120_0x1d47ad=a120_0x1cf5;(function(_0x3fc9bd,_0x446c11){const _0x4135b3=a120_0x1cf5,_0x317249=_0x3fc9bd();while(!![]){try{const _0x454865=-parseInt(_0x4135b3(0x169))/0x1*(-parseInt(_0x4135b3(0x172))/0x2)+-parseInt(_0x4135b3(0x170))/0x3+-parseInt(_0x4135b3(0x16d))/0x4+-parseInt(_0x4135b3(0x16a))/0x5+parseInt(_0x4135b3(0x168))/0x6+parseInt(_0x4135b3(0x16b))/0x7+parseInt(_0x4135b3(0x16c))/0x8*(parseInt(_0x4135b3(0x171))/0x9);if(_0x454865===_0x446c11)break;else _0x317249['push'](_0x317249['shift']());}catch(_0x33c3fa){_0x317249['push'](_0x317249['shift']());}}}(a120_0x2330,0x3f8a8));function a120_0x2330(){const _0x365d90=['2026-08-19T10:51:28.780Z','2.2.5-beta.1','494994nRAdmC','9WAhRNK','1013128XWdWdj','18fb20e','1017006kWetCV','1EEwOZG','898005kAynia','1604785ptgKGg','1420112lkrmgP','1911884yZOeRz'];a120_0x2330=function(){return _0x365d90;};return a120_0x2330();}function a120_0x1cf5(_0x55ab68,_0x29dd81){_0x55ab68=_0x55ab68-0x168;const _0x23302e=a120_0x2330();let _0x1cf5ce=_0x23302e[_0x55ab68];return _0x1cf5ce;}export const VERSION=a120_0x1d47ad(0x16f);export const GIT_TAG='v2.2.5-beta.1';export const GIT_COMMIT=a120_0x1d47ad(0x173);export const BUILD_TIME=a120_0x1d47ad(0x16e);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f6ef1,_0x5733b2){const _0x4c1589=a121_0x3a00,_0x48c67e=_0x3f6ef1();while(!![]){try{const _0x5b512b=parseInt(_0x4c1589(0x1c1))/0x1+parseInt(_0x4c1589(0x1c0))/0x2*(parseInt(_0x4c1589(0x1c6))/0x3)+-parseInt(_0x4c1589(0x1bc))/0x4*(parseInt(_0x4c1589(0x1c3))/0x5)+-parseInt(_0x4c1589(0x1c2))/0x6+parseInt(_0x4c1589(0x1b9))/0x7*(-parseInt(_0x4c1589(0x1bd))/0x8)+-parseInt(_0x4c1589(0x1c4))/0x9*(parseInt(_0x4c1589(0x1bf))/0xa)+parseInt(_0x4c1589(0x1be))/0xb*(parseInt(_0x4c1589(0x1b7))/0xc);if(_0x5b512b===_0x5733b2)break;else _0x48c67e['push'](_0x48c67e['shift']());}catch(_0x7a6e24){_0x48c67e['push'](_0x48c67e['shift']());}}}(a121_0x58a1,0xb785a));import{jsx as a121_0x379661,jsxs as a121_0x9d75b9}from'react/jsx-runtime';function a121_0x58a1(){const _0x3bffac=['924zMIXPj','green','2429UozBnK','\x20--help','column','49556ExKzdN','27656dExoah','410135ADgjQi','190Aeiocp','330402HcHIkj','126758huBhzO','1344480zEPzaS','260ysZmZY','162621wXjFuC','\x20\x20Use\x20','3cIStaT'];a121_0x58a1=function(){return _0x3bffac;};return a121_0x58a1();}function a121_0x3a00(_0x1fa5e6,_0x9107de){_0x1fa5e6=_0x1fa5e6-0x1b7;const _0x58a14a=a121_0x58a1();let _0x3a005b=_0x58a14a[_0x1fa5e6];return _0x3a005b;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4f8aed=a121_0x3a00,{exit:_0x2014fa}=useApp();return useEffect(()=>{_0x2014fa();},[_0x2014fa]),a121_0x9d75b9(Box,{'flexDirection':_0x4f8aed(0x1bb),'marginTop':0x1,'marginBottom':0x1,'children':[a121_0x379661(Box,{'children':a121_0x379661(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a121_0x9d75b9(Box,{'marginTop':0x1,'children':[a121_0x379661(Text,{'dimColor':!![],'children':_0x4f8aed(0x1c5)}),a121_0x379661(Text,{'bold':!![],'color':_0x4f8aed(0x1b8),'children':CLI_BIN_NAME+_0x4f8aed(0x1ba)}),a121_0x379661(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
|
package/lib/postinstall.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x38b999,_0x225fd3){const _0x2e44c0=a122_0x3a75,_0x36e968=_0x38b999();while(!![]){try{const _0xae78d3=-parseInt(_0x2e44c0(0x17c))/0x1*(parseInt(_0x2e44c0(0x17e))/0x2)+parseInt(_0x2e44c0(0x185))/0x3*(-parseInt(_0x2e44c0(0x179))/0x4)+parseInt(_0x2e44c0(0x175))/0x5*(-parseInt(_0x2e44c0(0x176))/0x6)+parseInt(_0x2e44c0(0x181))/0x7*(parseInt(_0x2e44c0(0x182))/0x8)+parseInt(_0x2e44c0(0x180))/0x9+parseInt(_0x2e44c0(0x171))/0xa+parseInt(_0x2e44c0(0x17b))/0xb;if(_0xae78d3===_0x225fd3)break;else _0x36e968['push'](_0x36e968['shift']());}catch(_0x3c9aed){_0x36e968['push'](_0x36e968['shift']());}}}(a122_0x3bc5,0x33136));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a122_0x3a75(_0x368140,_0x25fff2){_0x368140=_0x368140-0x16e;const _0x3bc560=a122_0x3bc5();let _0x3a7551=_0x3bc560[_0x368140];return _0x3a7551;}function a122_0x3bc5(){const _0x263cb0=['warn','20456WwsJfY','already\x20current','5684569SpUCuj','562QipYhy','Repair\x20with:\x20','588MUtXDt','repairCommand','56223wmArhH','5509ZqdTgb','720lhQsTp','skillVersion','installedPath','138SQHFLl','\x20at\x20','[BUILTIN_SKILL_INSTALL_','FAILED','2550590UQgPUy','code','log','changed','5UHRKuf','1435422ITeZUu','Installation\x20failed'];a122_0x3bc5=function(){return _0x263cb0;};return a122_0x3bc5();}export async function runPostinstall(_0x24ee50={}){const _0x553b08=a122_0x3a75,_0x4f07dc=installBuiltinSkill(_0x24ee50);if(_0x4f07dc['ok']){const _0x5e9d25=_0x4f07dc[_0x553b08(0x174)]?'installed':_0x553b08(0x17a),_0x53ede4=_0x4f07dc[_0x553b08(0x184)]?_0x553b08(0x16e)+_0x4f07dc[_0x553b08(0x184)]:'\x20via\x20skills@latest';return console[_0x553b08(0x173)]('Lovrabet\x20Built-in\x20Skill\x20'+_0x4f07dc[_0x553b08(0x183)]+'\x20'+_0x5e9d25+_0x53ede4),_0x4f07dc;}const _0x251a92=_0x553b08(0x16f)+(_0x4f07dc[_0x553b08(0x172)]??_0x553b08(0x170))+']\x20'+(_0x4f07dc['error']??_0x553b08(0x177))+'.\x20'+(_0x553b08(0x17d)+_0x4f07dc[_0x553b08(0x17f)]);if(_0x4f07dc['code']==='SOURCE_INVALID')throw new Error(_0x251a92);return console[_0x553b08(0x178)](_0x251a92),_0x4f07dc;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2987b0,_0x33a56b){const _0x55e270=a123_0x31b5,_0x2c0f68=_0x2987b0();while(!![]){try{const _0x44691e=-parseInt(_0x55e270(0x14f))/0x1+-parseInt(_0x55e270(0x14c))/0x2*(-parseInt(_0x55e270(0x14d))/0x3)+-parseInt(_0x55e270(0x15a))/0x4*(-parseInt(_0x55e270(0x151))/0x5)+-parseInt(_0x55e270(0x156))/0x6*(-parseInt(_0x55e270(0x157))/0x7)+parseInt(_0x55e270(0x153))/0x8+-parseInt(_0x55e270(0x15c))/0x9+parseInt(_0x55e270(0x14b))/0xa;if(_0x44691e===_0x33a56b)break;else _0x2c0f68['push'](_0x2c0f68['shift']());}catch(_0x3a1037){_0x2c0f68['push'](_0x2c0f68['shift']());}}}(a123_0x3052,0x9d985));function a123_0x31b5(_0x36726d,_0x15f5ed){_0x36726d=_0x36726d-0x14b;const _0x305286=a123_0x3052();let _0x31b544=_0x305286[_0x36726d];return _0x31b544;}const DESCRIPTION_MAX_LENGTH=0x1f4;function a123_0x3052(){const _0x12348d=['description','232840ktknLW','replace','6082512DwpYDs','risk','write','6630vWtCjy','315GsQWkt','string','high-risk-write','16HUIoRG','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','2466801rGiggp','slice','2720690xgOUUO','92602jwzBet','57ddPbjs','trim','1228501XpTXHx'];a123_0x3052=function(){return _0x12348d;};return a123_0x3052();}export function buildLovrabetConfirmationRequest(_0x8982d9,_0x3b77b2,_0x5f3a44){const _0x3e8979=a123_0x31b5,_0x1b0752=normalizeText(_0x8982d9['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x401fb9=normalizeText(_0x8982d9[_0x3e8979(0x150)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x3b77b2,'risk':requireWriteRisk(_0x8982d9),'description':_0x1b0752||_0x401fb9||'执行该写入操作',..._0x5f3a44?{'signal':_0x5f3a44}:{}};}function requireWriteRisk(_0x5882e8){const _0x1b33b9=a123_0x31b5;if(_0x5882e8['risk']===_0x1b33b9(0x155)||_0x5882e8[_0x1b33b9(0x154)]===_0x1b33b9(0x159))return _0x5882e8['risk'];throw new Error(_0x1b33b9(0x15b));}function normalizeText(_0x30477f,_0x3ff5a4){const _0x3dd7e0=a123_0x31b5;if(typeof _0x30477f!==_0x3dd7e0(0x158))return'';return _0x30477f[_0x3dd7e0(0x152)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x3dd7e0(0x152)](/\s+/g,'\x20')[_0x3dd7e0(0x14e)]()[_0x3dd7e0(0x15d)](0x0,_0x3ff5a4);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a124_0x41eb(){const _0x57258d=['writeEventSubject','join','10HoNwTm','command','243972evkLwN','442308TEdmRc','risk','2892lNjhcB','1367300zYaSHo','service','3558213FIKeKu','180551VKWImj','9gpelKU','split','56BzRlgk','filter','trim','19766zqFdvQ'];a124_0x41eb=function(){return _0x57258d;};return a124_0x41eb();}(function(_0x434edd,_0x444fca){const _0x1c8fc1=a124_0x3222,_0x14a838=_0x434edd();while(!![]){try{const _0xc0eb6c=-parseInt(_0x1c8fc1(0x15a))/0x1+parseInt(_0x1c8fc1(0x155))/0x2+parseInt(_0x1c8fc1(0x150))/0x3*(parseInt(_0x1c8fc1(0x14b))/0x4)+parseInt(_0x1c8fc1(0x14c))/0x5+-parseInt(_0x1c8fc1(0x15b))/0x6+parseInt(_0x1c8fc1(0x14f))/0x7*(-parseInt(_0x1c8fc1(0x152))/0x8)+parseInt(_0x1c8fc1(0x14e))/0x9*(parseInt(_0x1c8fc1(0x158))/0xa);if(_0xc0eb6c===_0x444fca)break;else _0x14a838['push'](_0x14a838['shift']());}catch(_0x44a499){_0x14a838['push'](_0x14a838['shift']());}}}(a124_0x41eb,0x2c964));export function canonicalLovrabetOperation(_0x14863e){const _0x3ae3f2=a124_0x3222;return[_0x14863e[_0x3ae3f2(0x14d)],..._0x14863e[_0x3ae3f2(0x159)][_0x3ae3f2(0x154)]()[_0x3ae3f2(0x151)](/\s+/)][_0x3ae3f2(0x153)](Boolean)[_0x3ae3f2(0x157)]('.');}function a124_0x3222(_0x334a69,_0x594efd){_0x334a69=_0x334a69-0x14a;const _0x41eb91=a124_0x41eb();let _0x322211=_0x41eb91[_0x334a69];return _0x322211;}export function createLovrabetWriteMetadata(_0x51ff8d,_0x1cd2b2,_0x200d54,_0x4719a6){const _0x12bac9=a124_0x3222;if(_0x4719a6||_0x200d54['ok']!==!![]||_0x51ff8d[_0x12bac9(0x14a)]!=='write'&&_0x51ff8d[_0x12bac9(0x14a)]!=='high-risk-write')return undefined;const _0x20dc98=_0x51ff8d[_0x12bac9(0x156)]?.(_0x200d54),_0x3c7c40={'type':'lovrabet.write.completed','operation':_0x1cd2b2,'risk':_0x51ff8d[_0x12bac9(0x14a)],..._0x20dc98?{'subject':_0x20dc98}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x3c7c40}};}
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a36f9,_0xdecfa6){const _0x1014d=a125_0x4f2c,_0x83e578=_0x5a36f9();while(!![]){try{const _0x62165c=-parseInt(_0x1014d(0x145))/0x1*(-parseInt(_0x1014d(0x135))/0x2)+-parseInt(_0x1014d(0x142))/0x3+parseInt(_0x1014d(0x137))/0x4+parseInt(_0x1014d(0x132))/0x5*(-parseInt(_0x1014d(0x149))/0x6)+-parseInt(_0x1014d(0x134))/0x7*(parseInt(_0x1014d(0x13f))/0x8)+-parseInt(_0x1014d(0x14a))/0x9+-parseInt(_0x1014d(0x12b))/0xa*(-parseInt(_0x1014d(0x129))/0xb);if(_0x62165c===_0xdecfa6)break;else _0x83e578['push'](_0x83e578['shift']());}catch(_0x2f6284){_0x83e578['push'](_0x83e578['shift']());}}}(a125_0x4bf8,0xac1cd));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';function a125_0x4bf8(){const _0x3de538=['message','90UzFWbT','rawFlags','signal','execute','write','dryRun','dry-run','6821065LWhJpz','definition','6901076BJJEmq','122440MBpUGS','confirm','2433124GkmkGb','aborted','format','present','riskLevel','args','risk','high-risk-write','8rcBYVc','stringify','Lovrabet\x20invocation\x20aborted.','2869029XUOFIb','reason','command','9cUCDJe','presentation','data','confirmation','6xgLwxl','1071549kcputH','result','3631463YjFqXn'];a125_0x4bf8=function(){return _0x3de538;};return a125_0x4bf8();}function a125_0x4f2c(_0x15d31a,_0x4d7e8d){_0x15d31a=_0x15d31a-0x129;const _0x4bf879=a125_0x4bf8();let _0x4f2cf7=_0x4bf879[_0x15d31a];return _0x4f2cf7;}import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x4f97a1,command:_0x327395,risk:_0xe23d65,dryRun:_0x179f17}){const _0x42756a=a125_0x4f2c;return JSON[_0x42756a(0x140)]({'ok':_0x4f97a1['ok'],'command':_0x327395,'risk':_0xe23d65,..._0x179f17?{'dryRun':!![]}:{},..._0x4f97a1[_0x42756a(0x147)]!==undefined?{'data':_0x4f97a1['data']}:{},..._0x4f97a1[_0x42756a(0x12a)]?{'message':_0x4f97a1['message']}:{}});}};export async function invokeLovrabet(_0x1c46a0,_0x337f9e){const _0x1a4e23=a125_0x4f2c;throwIfAborted(_0x337f9e[_0x1a4e23(0x12d)]);const _0x2a6907=await resolveLovrabetInvocation(_0x1c46a0),_0x3b890b=canonicalLovrabetOperation(_0x2a6907[_0x1a4e23(0x133)]);return await confirmWriteBeforeQueue(_0x2a6907[_0x1a4e23(0x133)],_0x2a6907[_0x1a4e23(0x12c)],_0x3b890b,_0x337f9e),runSerialized(async()=>{const _0x2a4c10=_0x1a4e23;throwIfAborted(_0x337f9e['signal']);const _0x19d20a={},_0xeeffc7=buildConfigFromFlags(_0x2a6907['rawFlags']);await initGlobalEnvironment(_0xeeffc7);const _0x52970b=createPipelineEnv(_0xeeffc7,{..._0x2a6907[_0x2a4c10(0x12c)],'yes':_0x2a6907[_0x2a4c10(0x133)][_0x2a4c10(0x13d)]===_0x2a4c10(0x13e)?!![]:_0x2a6907['rawFlags']['yes'],'nonInteractive':!![]});_0x52970b[_0x2a4c10(0x13c)]=_0x2a6907[_0x2a4c10(0x13c)],_0x52970b['isNonInteractive']=!![],_0x52970b[_0x2a4c10(0x13b)]=_0x2a4c10(0x13e);const _0x1c8ad2=withAbortSignal(_0x2a6907[_0x2a4c10(0x133)],_0x337f9e[_0x2a4c10(0x12d)]),_0x17f34c=createLovrabetRunnerAdapter({'formatOutput'(_0x2e96cd,_0x22e182){const _0x323540=_0x2a4c10;_0x19d20a['result']=_0x2e96cd,_0x19d20a[_0x323540(0x144)]=_0x22e182[_0x323540(0x144)],_0x19d20a[_0x323540(0x13d)]=_0x22e182['risk'],_0x19d20a[_0x323540(0x139)]=_0x22e182[_0x323540(0x139)],_0x19d20a[_0x323540(0x130)]=_0x22e182[_0x323540(0x130)]===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.');}});try{await runCommand(_0x1c8ad2,_0x52970b,_0x17f34c);if(!_0x19d20a['result']||!_0x19d20a['command']||!_0x19d20a[_0x2a4c10(0x13d)]||!_0x19d20a[_0x2a4c10(0x139)])throw new Error('Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.');const _0x495e60=_0x337f9e[_0x2a4c10(0x146)]??defaultPresentation,_0x116fa0=_0x19d20a['dryRun']===!![],_0x57773a={'result':_0x19d20a[_0x2a4c10(0x14b)],'command':_0x19d20a[_0x2a4c10(0x144)],'operation':_0x3b890b,'risk':_0x19d20a[_0x2a4c10(0x13d)],'format':_0x19d20a[_0x2a4c10(0x139)],'dryRun':_0x116fa0},_0x1c282d=createLovrabetWriteMetadata(_0x2a6907[_0x2a4c10(0x133)],_0x3b890b,_0x19d20a[_0x2a4c10(0x14b)],_0x116fa0);let _0x17ef86;try{_0x17ef86=await _0x495e60[_0x2a4c10(0x13a)](_0x57773a);}catch(_0x393ea1){if(!_0x1c282d||_0x495e60===defaultPresentation)throw _0x393ea1;_0x17ef86=await defaultPresentation[_0x2a4c10(0x13a)](_0x57773a);}return{'operation':_0x3b890b,'risk':_0x19d20a['risk'],'mode':_0x116fa0?_0x2a4c10(0x131):_0x2a4c10(0x12e),'result':_0x19d20a[_0x2a4c10(0x14b)],'output':_0x17ef86,..._0x1c282d?{'metadata':_0x1c282d}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x18ca77,_0x3499e9,_0x305983,_0x5be3fd){const _0x1e72ea=a125_0x4f2c;if(_0x3499e9[_0x1e72ea(0x130)]===!![]||_0x18ca77[_0x1e72ea(0x13d)]!==_0x1e72ea(0x12f)&&_0x18ca77[_0x1e72ea(0x13d)]!==_0x1e72ea(0x13e))return;await _0x5be3fd[_0x1e72ea(0x148)][_0x1e72ea(0x136)](buildLovrabetConfirmationRequest(_0x18ca77,_0x305983,_0x5be3fd[_0x1e72ea(0x12d)]));}function withAbortSignal(_0x36b68c,_0x4eb5c6){return{..._0x36b68c,async 'execute'(_0x319eb8){const _0x5d0247=a125_0x4f2c;return throwIfAborted(_0x4eb5c6),_0x36b68c[_0x5d0247(0x12e)](_0x319eb8);}};}function throwIfAborted(_0x270456){const _0x437d89=a125_0x4f2c;if(_0x270456?.[_0x437d89(0x138)])throw _0x270456[_0x437d89(0x143)]instanceof Error?_0x270456[_0x437d89(0x143)]:new DOMException(_0x437d89(0x141),'AbortError');}
|
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a126_0xff403d=a126_0x2b76;function a126_0x2b76(_0x3b1fbe,_0x53af49){_0x3b1fbe=_0x3b1fbe-0xbc;const _0x135b93=a126_0x135b();let _0x2b76fb=_0x135b93[_0x3b1fbe];return _0x2b76fb;}(function(_0x42c754,_0x35c6af){const _0x4f3320=a126_0x2b76,_0x475978=_0x42c754();while(!![]){try{const _0x3791df=parseInt(_0x4f3320(0xc6))/0x1+parseInt(_0x4f3320(0xc5))/0x2+parseInt(_0x4f3320(0xc2))/0x3+-parseInt(_0x4f3320(0xbc))/0x4*(parseInt(_0x4f3320(0xc4))/0x5)+-parseInt(_0x4f3320(0xc3))/0x6*(-parseInt(_0x4f3320(0xbd))/0x7)+-parseInt(_0x4f3320(0xc7))/0x8*(parseInt(_0x4f3320(0xbf))/0x9)+-parseInt(_0x4f3320(0xc0))/0xa;if(_0x3791df===_0x35c6af)break;else _0x475978['push'](_0x475978['shift']());}catch(_0x25d53d){_0x475978['push'](_0x475978['shift']());}}}(a126_0x135b,0x1e8b4));function a126_0x135b(){const _0x3f5d0d=['28097uoUfrJ','308968gXashs','5928IGmePE','14AHzcAY','catch','9MkStrj','1592250awYstD','resolve','556332ePqMVc','542634hPMiSy','530VZBazi','171254AUDUNJ'];a126_0x135b=function(){return _0x3f5d0d;};return a126_0x135b();}let tail=Promise[a126_0xff403d(0xc1)]();export async function runSerialized(_0x300017){const _0x19b596=a126_0xff403d,_0x30b12c=tail;let _0x77df4e;tail=new Promise(_0x2735c4=>{_0x77df4e=_0x2735c4;}),await _0x30b12c[_0x19b596(0xbe)](()=>undefined);try{return await _0x300017();}finally{_0x77df4e();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4e64be,_0x5d4864){const _0x403f49=a127_0x1497,_0x5c4556=_0x4e64be();while(!![]){try{const _0x409248=parseInt(_0x403f49(0x8b))/0x1+parseInt(_0x403f49(0x7d))/0x2*(-parseInt(_0x403f49(0x93))/0x3)+-parseInt(_0x403f49(0x82))/0x4*(parseInt(_0x403f49(0x84))/0x5)+parseInt(_0x403f49(0x92))/0x6*(parseInt(_0x403f49(0x8f))/0x7)+-parseInt(_0x403f49(0x8e))/0x8*(parseInt(_0x403f49(0x91))/0x9)+parseInt(_0x403f49(0x8a))/0xa+-parseInt(_0x403f49(0x90))/0xb*(-parseInt(_0x403f49(0x8d))/0xc);if(_0x409248===_0x5d4864)break;else _0x5c4556['push'](_0x5c4556['shift']());}catch(_0x44a35c){_0x5c4556['push'](_0x5c4556['shift']());}}}(a127_0x54bf,0x558df));import a127_0x4edca6 from'meow';function a127_0x54bf(){const _0x3d6620=['definition','10dpOLCx','assign','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','../framework/preparse.js','flags','message','4829470zyumLL','459434OkPyuu','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','12OcxRyG','24PHPjet','7245tZIPrM','5891050JlXHYs','1500543mgkbun','2106NQTpqI','2742YejVNC','unknownCommand','args','1140lMRBVo','flatMap','join','validation','input','939248WoEYiv'];a127_0x54bf=function(){return _0x3d6620;};return a127_0x54bf();}function a127_0x1497(_0x1265c1,_0x57c838){_0x1265c1=_0x1265c1-0x7b;const _0x54bfb6=a127_0x54bf();let _0x149760=_0x54bfb6[_0x1265c1];return _0x149760;}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x598711){const _0x1311b2=a127_0x1497,_0x411206=a127_0x4edca6('',{'importMeta':import.meta,'argv':_0x598711,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x3b0172=[..._0x411206[_0x1311b2(0x81)]],_0x37220b=_0x411206[_0x1311b2(0x88)];await correctFlags(_0x37220b);const _0x147078=_0x3b0172[0x0];if(!_0x147078)throw CliErrors['validation'](_0x1311b2(0x8c));const _0x525c9a=resolveRemovedCommand(_0x147078,_0x3b0172[0x1]);if(_0x525c9a)throw CliErrors[_0x1311b2(0x80)](_0x525c9a[_0x1311b2(0x89)],_0x525c9a['hint']);if(!isKnownService(_0x147078)){const _0x2c55c9=resolveDynamicServiceCommand(_0x3b0172,_0x37220b);if(!_0x2c55c9)throw CliErrors[_0x1311b2(0x7b)](_0x3b0172[_0x1311b2(0x7f)]('\x20'));return Object[_0x1311b2(0x85)](_0x37220b,_0x2c55c9[_0x1311b2(0x88)]),{'definition':_0x2c55c9[_0x1311b2(0x83)],'rawFlags':_0x37220b,'args':_0x2c55c9[_0x1311b2(0x7c)]};}const _0x1ee559=getServiceEntry(_0x147078),_0x3bcd82=_0x3b0172[0x1]||_0x1ee559['defaultCommand'];if(!_0x3bcd82)throw CliErrors[_0x1311b2(0x80)](_0x1311b2(0x86)+_0x147078+'\x22.');const _0x1c4ceb=findDefinition(_0x147078,_0x3bcd82);if(!_0x1c4ceb)throw CliErrors[_0x1311b2(0x7b)](_0x147078+'\x20'+_0x3bcd82);return{'definition':_0x1c4ceb,'rawFlags':_0x37220b,'args':_0x3b0172['slice'](0x2)};}async function correctFlags(_0x31d294){const _0x326523=a127_0x1497;try{const {correctFlags:_0x1737fc}=await import(_0x326523(0x87)),{getAllDefinitions:_0x510f01}=await import('../commands/registry.js'),_0x488308=_0x510f01()[_0x326523(0x7e)](_0x50dab4=>_0x50dab4[_0x326523(0x88)]??[]),_0x32622f=_0x1737fc(_0x31d294,_0x488308);Object[_0x326523(0x85)](_0x31d294,_0x32622f[_0x326523(0x88)]);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a129_0x498046=a129_0x5202;(function(_0x2f08db,_0x15da65){const _0x262ba9=a129_0x5202,_0x458c5a=_0x2f08db();while(!![]){try{const _0x46ab44=parseInt(_0x262ba9(0x118))/0x1*(-parseInt(_0x262ba9(0x104))/0x2)+parseInt(_0x262ba9(0x12e))/0x3+-parseInt(_0x262ba9(0x102))/0x4*(-parseInt(_0x262ba9(0xfc))/0x5)+parseInt(_0x262ba9(0xfd))/0x6+-parseInt(_0x262ba9(0x105))/0x7*(parseInt(_0x262ba9(0x11b))/0x8)+-parseInt(_0x262ba9(0x107))/0x9*(-parseInt(_0x262ba9(0xfa))/0xa)+-parseInt(_0x262ba9(0x11d))/0xb;if(_0x46ab44===_0x15da65)break;else _0x458c5a['push'](_0x458c5a['shift']());}catch(_0x5bf6ca){_0x458c5a['push'](_0x458c5a['shift']());}}}(a129_0x3be1,0xe2609));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='lovrabet\x20cli-skill\x20install',SKILL_NAME=a129_0x498046(0x110);function frontmatterValue(_0x202d8d,_0x8bde57){const _0x4e869d=a129_0x498046;return _0x202d8d[_0x4e869d(0xf6)](new RegExp('^'+_0x8bde57+_0x4e869d(0x111),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x5b241e,_0x1f769c=_0x5b241e){const _0x3c2320=a129_0x498046;return readdirSync(_0x1f769c,{'withFileTypes':!![]})['flatMap'](_0x77c2e2=>{const _0x2ab4c2=a129_0x5202,_0x44d1c6=join(_0x1f769c,_0x77c2e2['name']),_0x5cb787=lstatSync(_0x44d1c6);if(_0x5cb787[_0x2ab4c2(0x129)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0x44d1c6);if(_0x5cb787[_0x2ab4c2(0x106)]())return listFiles(_0x5b241e,_0x44d1c6);if(!_0x5cb787[_0x2ab4c2(0x128)]())throw new Error(_0x2ab4c2(0x108)+_0x44d1c6);return[relative(_0x5b241e,_0x44d1c6)['split'](sep)['join']('/')];})[_0x3c2320(0x130)]((_0x14e0b8,_0x7694ab)=>_0x14e0b8<_0x7694ab?-0x1:_0x14e0b8>_0x7694ab?0x1:0x0);}function a129_0x3be1(){const _0x497f07=['absent','message','skillVersion','version_mismatch','lovrabet',':\x5cs*(.+)$','lovrabet.manifest.json','packageRoot','split','SKILL.md','unverifiable','digest','60257VBWfMb','state','utf8','8NbyiUy','INSTALL_FAILED','32141219GkPRBL','Unsafe\x20manifest\x20path:\x20','manifest','packageVersion','stdio','unknown','schemaVersion','installedPath','every','pipe','SOURCE_INVALID','isFile','isSymbolicLink','files','present','hex','current','3384861WQniFy','error','sort','reason','VERIFY_FAILED','update','match','includes','skills','version','5494730iGCMSj','path','1843575RijjAd','2896002OsFpvY','parse','missing','Installed\x20Skill\x20state\x20is\x20','status','20yJwuMw','name','22cHsKzM','4136657KqcnDk','isDirectory','27VmUUvs','Unsupported\x20Skill\x20entry:\x20','skills@latest\x20exited\x20','home','length'];a129_0x3be1=function(){return _0x497f07;};return a129_0x3be1();}function digestFiles(_0x38b845,_0x2f5cad){const _0x5623a0=a129_0x498046,_0x3e2929=createHash('sha256');for(const _0x1f4976 of _0x2f5cad){if(_0x1f4976['startsWith']('/')||_0x1f4976['split']('/')['includes']('..')||_0x1f4976[_0x5623a0(0xf7)]('\x5c'))throw new Error(_0x5623a0(0x11e)+_0x1f4976);_0x3e2929[_0x5623a0(0xf5)](_0x1f4976),_0x3e2929['update']('\x00'),_0x3e2929['update'](readFileSync(join(_0x38b845,..._0x1f4976[_0x5623a0(0x114)]('/')))),_0x3e2929[_0x5623a0(0xf5)]('\x00');}return _0x3e2929[_0x5623a0(0x117)](_0x5623a0(0x12c));}function sameFiles(_0x442eba,_0x304557){const _0x276b40=a129_0x498046;return _0x442eba[_0x276b40(0x10b)]===_0x304557[_0x276b40(0x10b)]&&_0x442eba[_0x276b40(0x125)]((_0x53b6a9,_0x1ffd3f)=>_0x53b6a9===_0x304557[_0x1ffd3f]);}function readSource(_0xd11224){const _0xafb639=a129_0x498046,_0x5b7405=JSON[_0xafb639(0xfe)](readFileSync(join(_0xd11224,'package.json'),'utf8')),_0x2df2c2=JSON[_0xafb639(0xfe)](readFileSync(join(_0xd11224,_0xafb639(0xf8),_0xafb639(0x112)),_0xafb639(0x11a))),_0x36a855=join(_0xd11224,_0xafb639(0xf8),SKILL_NAME),_0x410ffe=frontmatterValue(readFileSync(join(_0x36a855,_0xafb639(0x115)),'utf8'),'version'),_0x54f9e0=listFiles(_0x36a855);if(_0x2df2c2[_0xafb639(0x123)]!==0x1||_0x2df2c2[_0xafb639(0x103)]!==SKILL_NAME||!_0x5b7405['version']||_0x2df2c2[_0xafb639(0x120)]!==_0x5b7405[_0xafb639(0xf9)]||_0x2df2c2[_0xafb639(0x10e)]!==_0x5b7405[_0xafb639(0xf9)]||_0x410ffe!==_0x5b7405[_0xafb639(0xf9)]||!sameFiles(_0x54f9e0,_0x2df2c2['files'])||digestFiles(_0x36a855,_0x54f9e0)!==_0x2df2c2[_0xafb639(0x117)])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x5b7405['version'],'skillVersion':_0x410ffe,'root':_0x36a855,'manifest':_0x2df2c2};}function installedSkillPath(_0x202bbb){const _0x26b506=a129_0x498046,_0x140a10=resolveInstalledSkill(SKILL_NAME,{'home':_0x202bbb});if(_0x140a10[_0x26b506(0x119)]===_0x26b506(0x12b))return{'state':'present','path':dirname(_0x140a10['path'])};if(_0x140a10[_0x26b506(0x119)]===_0x26b506(0x10c))return{'state':_0x26b506(0xff)};return{'state':_0x26b506(0x116),'reason':_0x140a10[_0x26b506(0x131)]};}function a129_0x5202(_0x186cd5,_0x4a1f71){_0x186cd5=_0x186cd5-0xf4;const _0x3be198=a129_0x3be1();let _0x520207=_0x3be198[_0x186cd5];return _0x520207;}export function inspectInstalledBuiltinSkillVersion(_0x1b9298,_0x1d32b3={}){const _0x17b760=a129_0x498046,_0x3c2081=installedSkillPath(_0x1d32b3['home']??homedir());if(_0x3c2081[_0x17b760(0x119)]===_0x17b760(0xff))return{'state':_0x17b760(0xff),'expectedVersion':_0x1b9298,'repairCommand':REPAIR_COMMAND};if(_0x3c2081[_0x17b760(0x119)]===_0x17b760(0x116))return{'state':_0x17b760(0x116),'expectedVersion':_0x1b9298,'reason':_0x3c2081[_0x17b760(0x131)],'repairCommand':REPAIR_COMMAND};try{const _0xfa3652=frontmatterValue(readFileSync(join(_0x3c2081[_0x17b760(0xfb)],_0x17b760(0x115)),_0x17b760(0x11a)),_0x17b760(0xf9));return{'state':_0xfa3652===_0x1b9298?_0x17b760(0x12d):_0x17b760(0x10f),'expectedVersion':_0x1b9298,'skillVersion':_0xfa3652,'installedPath':_0x3c2081[_0x17b760(0xfb)],'repairCommand':REPAIR_COMMAND};}catch(_0x4587d1){return{'state':_0x17b760(0x116),'expectedVersion':_0x1b9298,'installedPath':_0x3c2081['path'],'reason':_0x4587d1 instanceof Error?_0x4587d1[_0x17b760(0x10d)]:String(_0x4587d1),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x2aa50b={}){const _0x1cd0bc=a129_0x498046,_0x28c896=_0x2aa50b[_0x1cd0bc(0x113)]??DEFAULT_PACKAGE_ROOT;let _0x335dc8;try{_0x335dc8=readSource(_0x28c896);}catch(_0x241fa1){return{'state':_0x1cd0bc(0x116),'packageVersion':_0x1cd0bc(0x122),'reason':_0x241fa1 instanceof Error?_0x241fa1[_0x1cd0bc(0x10d)]:String(_0x241fa1),'repairCommand':REPAIR_COMMAND};}const _0x13682a=installedSkillPath(_0x2aa50b[_0x1cd0bc(0x10a)]??homedir());if(_0x13682a[_0x1cd0bc(0x119)]===_0x1cd0bc(0xff))return{'state':_0x1cd0bc(0xff),'packageVersion':_0x335dc8['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x13682a['state']===_0x1cd0bc(0x116))return{'state':_0x1cd0bc(0x116),'packageVersion':_0x335dc8[_0x1cd0bc(0x120)],'reason':_0x13682a[_0x1cd0bc(0x131)],'repairCommand':REPAIR_COMMAND};try{const _0x19a58e=frontmatterValue(readFileSync(join(_0x13682a['path'],_0x1cd0bc(0x115)),_0x1cd0bc(0x11a)),'version');if(_0x19a58e!==_0x335dc8[_0x1cd0bc(0x10e)])return{'state':'version_mismatch','packageVersion':_0x335dc8['packageVersion'],'skillVersion':_0x19a58e,'installedPath':_0x13682a[_0x1cd0bc(0xfb)],'repairCommand':REPAIR_COMMAND};const _0x4faa5e=listFiles(_0x13682a[_0x1cd0bc(0xfb)]),_0x10016d=digestFiles(_0x13682a[_0x1cd0bc(0xfb)],_0x4faa5e);return{'state':sameFiles(_0x4faa5e,_0x335dc8[_0x1cd0bc(0x11f)][_0x1cd0bc(0x12a)])&&_0x10016d===_0x335dc8[_0x1cd0bc(0x11f)][_0x1cd0bc(0x117)]?_0x1cd0bc(0x12d):'content_mismatch','packageVersion':_0x335dc8[_0x1cd0bc(0x120)],'skillVersion':_0x19a58e,'installedPath':_0x13682a[_0x1cd0bc(0xfb)],'digest':_0x10016d,'repairCommand':REPAIR_COMMAND};}catch(_0x140823){return{'state':_0x1cd0bc(0x116),'packageVersion':_0x335dc8['packageVersion'],'installedPath':_0x13682a[_0x1cd0bc(0xfb)],'reason':_0x140823 instanceof Error?_0x140823[_0x1cd0bc(0x10d)]:String(_0x140823),'repairCommand':REPAIR_COMMAND};}}function failure(_0x247f03,_0x332174,_0x244998,_0x167d0a){const _0x41df72=a129_0x498046;return{'ok':![],'code':_0x247f03,'packageVersion':_0x332174[_0x41df72(0x120)],'skillVersion':_0x332174[_0x41df72(0x10e)],'installedPath':_0x167d0a,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x244998 instanceof Error?_0x244998['message']:String(_0x244998)};}export function installBuiltinSkill(_0x42aafb={}){const _0x376781=a129_0x498046,_0x5a1407=_0x42aafb[_0x376781(0x113)]??DEFAULT_PACKAGE_ROOT,_0x34ddba=_0x42aafb[_0x376781(0x10a)]??homedir();let _0x53e9e6;try{_0x53e9e6=readSource(_0x5a1407);}catch(_0x46ea2a){return failure(_0x376781(0x127),{'packageVersion':'unknown','skillVersion':'unknown'},_0x46ea2a);}const _0x11ef50=inspectBuiltinSkill({'packageRoot':_0x5a1407,'home':_0x34ddba}),_0x1c8c76=runNpxSkillsAddGlobal(_0x5a1407,_0x53e9e6['root'],{'stdio':_0x42aafb[_0x376781(0x121)]??_0x376781(0x126),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x34ddba}});if(_0x1c8c76['skipped'])return{'ok':!![],'packageVersion':_0x53e9e6[_0x376781(0x120)],'skillVersion':_0x53e9e6[_0x376781(0x10e)],'installedPath':_0x11ef50['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x1c8c76['ok'])return failure(_0x376781(0x11c),_0x53e9e6,_0x1c8c76[_0x376781(0x12f)]??_0x376781(0x109)+_0x1c8c76[_0x376781(0x101)]);const _0x5113b6=inspectBuiltinSkill({'packageRoot':_0x5a1407,'home':_0x34ddba});if(_0x5113b6[_0x376781(0x119)]!==_0x376781(0x12d))return failure(_0x376781(0xf4),_0x53e9e6,_0x5113b6['reason']??_0x376781(0x100)+_0x5113b6[_0x376781(0x119)],_0x5113b6[_0x376781(0x124)]);return{'ok':!![],'packageVersion':_0x53e9e6[_0x376781(0x120)],'skillVersion':_0x53e9e6['skillVersion'],'installedPath':_0x5113b6[_0x376781(0x124)],'changed':_0x11ef50[_0x376781(0x119)]!==_0x376781(0x12d),'repairCommand':REPAIR_COMMAND};}
|
|
1
|
+
function a129_0x2f0b(_0x7d1c34,_0x83923c){_0x7d1c34=_0x7d1c34-0x64;const _0x189fb7=a129_0x189f();let _0x2f0b9b=_0x189fb7[_0x7d1c34];return _0x2f0b9b;}const a129_0x4712ec=a129_0x2f0b;(function(_0x3aaede,_0x311f61){const _0x3c016e=a129_0x2f0b,_0x50be6c=_0x3aaede();while(!![]){try{const _0x3236ac=parseInt(_0x3c016e(0x65))/0x1*(parseInt(_0x3c016e(0x8c))/0x2)+-parseInt(_0x3c016e(0xa7))/0x3*(parseInt(_0x3c016e(0xa0))/0x4)+-parseInt(_0x3c016e(0x93))/0x5*(parseInt(_0x3c016e(0x7b))/0x6)+-parseInt(_0x3c016e(0x99))/0x7*(-parseInt(_0x3c016e(0x94))/0x8)+parseInt(_0x3c016e(0x69))/0x9*(parseInt(_0x3c016e(0x7f))/0xa)+parseInt(_0x3c016e(0x87))/0xb*(parseInt(_0x3c016e(0x7d))/0xc)+-parseInt(_0x3c016e(0x67))/0xd;if(_0x3236ac===_0x311f61)break;else _0x50be6c['push'](_0x50be6c['shift']());}catch(_0x3c9152){_0x50be6c['push'](_0x50be6c['shift']());}}}(a129_0x189f,0xca92c));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';function a129_0x189f(){const _0x58fe9d=['19240962ncLCUL','trim','537741aTNGAY','every','stdio','isSymbolicLink','path','includes','lovrabet\x20cli-skill\x20install','reason','sha256','sort','SKILL.md','message','length','Unsafe\x20manifest\x20path:\x20','parse','files','unknown','state','3782166KbknkH','packageRoot','6013788uxYIsk','absent','210DNWEbs','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','version_mismatch','Symbolic\x20link\x20is\x20not\x20allowed:\x20','manifest','utf8','pipe','packageVersion','11BfGSgk','startsWith','isFile','skillVersion','update','4040MXwBie','VERIFY_FAILED','root','schemaVersion','unverifiable','home','split','10nmaqUA','16712EMBUWa','error','skills','status','installedPath','2051OdUHqc','hex','package.json',':\x5cs*(.+)$','name','present','INSTALL_FAILED','12kkFALz','digest','Installed\x20Skill\x20state\x20is\x20','match','skills@latest\x20exited\x20','version','missing','90219GFCeMh','Unsupported\x20Skill\x20entry:\x20','current','640tarOAg','skipped'];a129_0x189f=function(){return _0x58fe9d;};return a129_0x189f();}const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a129_0x4712ec(0x6f),SKILL_NAME='lovrabet';function frontmatterValue(_0x2d0406,_0x376fd1){const _0x57e780=a129_0x4712ec;return _0x2d0406[_0x57e780(0xa3)](new RegExp('^'+_0x376fd1+_0x57e780(0x9c),'m'))?.[0x1]?.[_0x57e780(0x68)]()??'';}function listFiles(_0x51c7cf,_0x33cc83=_0x51c7cf){const _0x511349=a129_0x4712ec;return readdirSync(_0x33cc83,{'withFileTypes':!![]})['flatMap'](_0x3b6f7b=>{const _0x3693e8=a129_0x2f0b,_0x10b5ae=join(_0x33cc83,_0x3b6f7b[_0x3693e8(0x9d)]),_0x903f18=lstatSync(_0x10b5ae);if(_0x903f18[_0x3693e8(0x6c)]())throw new Error(_0x3693e8(0x82)+_0x10b5ae);if(_0x903f18['isDirectory']())return listFiles(_0x51c7cf,_0x10b5ae);if(!_0x903f18[_0x3693e8(0x89)]())throw new Error(_0x3693e8(0xa8)+_0x10b5ae);return[relative(_0x51c7cf,_0x10b5ae)[_0x3693e8(0x92)](sep)['join']('/')];})[_0x511349(0x72)]((_0x5ea979,_0xc71c55)=>_0x5ea979<_0xc71c55?-0x1:_0x5ea979>_0xc71c55?0x1:0x0);}function digestFiles(_0x3d3b0a,_0x41ae2c){const _0x39e5f9=a129_0x4712ec,_0x1f5ee6=createHash(_0x39e5f9(0x71));for(const _0x3cd850 of _0x41ae2c){if(_0x3cd850[_0x39e5f9(0x88)]('/')||_0x3cd850[_0x39e5f9(0x92)]('/')[_0x39e5f9(0x6e)]('..')||_0x3cd850[_0x39e5f9(0x6e)]('\x5c'))throw new Error(_0x39e5f9(0x76)+_0x3cd850);_0x1f5ee6[_0x39e5f9(0x8b)](_0x3cd850),_0x1f5ee6[_0x39e5f9(0x8b)]('\x00'),_0x1f5ee6[_0x39e5f9(0x8b)](readFileSync(join(_0x3d3b0a,..._0x3cd850['split']('/')))),_0x1f5ee6[_0x39e5f9(0x8b)]('\x00');}return _0x1f5ee6['digest'](_0x39e5f9(0x9a));}function sameFiles(_0x57d288,_0x122390){const _0x1b576b=a129_0x4712ec;return _0x57d288[_0x1b576b(0x75)]===_0x122390['length']&&_0x57d288[_0x1b576b(0x6a)]((_0x5cf4a0,_0x4982d2)=>_0x5cf4a0===_0x122390[_0x4982d2]);}function readSource(_0x2cc4b6){const _0x55ac12=a129_0x4712ec,_0x3b084d=JSON[_0x55ac12(0x77)](readFileSync(join(_0x2cc4b6,_0x55ac12(0x9b)),_0x55ac12(0x84))),_0x45dc3f=JSON['parse'](readFileSync(join(_0x2cc4b6,_0x55ac12(0x96),'lovrabet.manifest.json'),_0x55ac12(0x84))),_0x3c10db=join(_0x2cc4b6,_0x55ac12(0x96),SKILL_NAME),_0x487e19=frontmatterValue(readFileSync(join(_0x3c10db,'SKILL.md'),_0x55ac12(0x84)),'version'),_0x28bc82=listFiles(_0x3c10db);if(_0x45dc3f[_0x55ac12(0x8f)]!==0x1||_0x45dc3f[_0x55ac12(0x9d)]!==SKILL_NAME||!_0x3b084d[_0x55ac12(0xa5)]||_0x45dc3f['packageVersion']!==_0x3b084d[_0x55ac12(0xa5)]||_0x45dc3f['skillVersion']!==_0x3b084d['version']||_0x487e19!==_0x3b084d[_0x55ac12(0xa5)]||!sameFiles(_0x28bc82,_0x45dc3f[_0x55ac12(0x78)])||digestFiles(_0x3c10db,_0x28bc82)!==_0x45dc3f[_0x55ac12(0xa1)])throw new Error(_0x55ac12(0x80));return{'packageVersion':_0x3b084d[_0x55ac12(0xa5)],'skillVersion':_0x487e19,'root':_0x3c10db,'manifest':_0x45dc3f};}function installedSkillPath(_0x5de2ae){const _0x4bdce1=a129_0x4712ec,_0xe5e585=resolveInstalledSkill(SKILL_NAME,{'home':_0x5de2ae});if(_0xe5e585[_0x4bdce1(0x7a)]===_0x4bdce1(0x9e))return{'state':_0x4bdce1(0x9e),'path':dirname(_0xe5e585[_0x4bdce1(0x6d)])};if(_0xe5e585['state']===_0x4bdce1(0x7e))return{'state':'missing'};return{'state':_0x4bdce1(0x90),'reason':_0xe5e585[_0x4bdce1(0x70)]};}export function inspectInstalledBuiltinSkillVersion(_0x1e04d6,_0x383217={}){const _0x379438=a129_0x4712ec,_0x4c7227=installedSkillPath(_0x383217[_0x379438(0x91)]??homedir());if(_0x4c7227[_0x379438(0x7a)]===_0x379438(0xa6))return{'state':_0x379438(0xa6),'expectedVersion':_0x1e04d6,'repairCommand':REPAIR_COMMAND};if(_0x4c7227[_0x379438(0x7a)]===_0x379438(0x90))return{'state':_0x379438(0x90),'expectedVersion':_0x1e04d6,'reason':_0x4c7227[_0x379438(0x70)],'repairCommand':REPAIR_COMMAND};try{const _0x1cd86b=frontmatterValue(readFileSync(join(_0x4c7227[_0x379438(0x6d)],_0x379438(0x73)),_0x379438(0x84)),_0x379438(0xa5));return{'state':_0x1cd86b===_0x1e04d6?_0x379438(0x64):_0x379438(0x81),'expectedVersion':_0x1e04d6,'skillVersion':_0x1cd86b,'installedPath':_0x4c7227[_0x379438(0x6d)],'repairCommand':REPAIR_COMMAND};}catch(_0x156be9){return{'state':_0x379438(0x90),'expectedVersion':_0x1e04d6,'installedPath':_0x4c7227[_0x379438(0x6d)],'reason':_0x156be9 instanceof Error?_0x156be9[_0x379438(0x74)]:String(_0x156be9),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x28db1d={}){const _0x16e93d=a129_0x4712ec,_0x33ea08=_0x28db1d[_0x16e93d(0x7c)]??DEFAULT_PACKAGE_ROOT;let _0x454c21;try{_0x454c21=readSource(_0x33ea08);}catch(_0x2f202d){return{'state':_0x16e93d(0x90),'packageVersion':_0x16e93d(0x79),'reason':_0x2f202d instanceof Error?_0x2f202d[_0x16e93d(0x74)]:String(_0x2f202d),'repairCommand':REPAIR_COMMAND};}const _0x2bc212=installedSkillPath(_0x28db1d[_0x16e93d(0x91)]??homedir());if(_0x2bc212[_0x16e93d(0x7a)]===_0x16e93d(0xa6))return{'state':'missing','packageVersion':_0x454c21[_0x16e93d(0x86)],'repairCommand':REPAIR_COMMAND};if(_0x2bc212[_0x16e93d(0x7a)]==='unverifiable')return{'state':'unverifiable','packageVersion':_0x454c21[_0x16e93d(0x86)],'reason':_0x2bc212[_0x16e93d(0x70)],'repairCommand':REPAIR_COMMAND};try{const _0x480c59=frontmatterValue(readFileSync(join(_0x2bc212['path'],_0x16e93d(0x73)),_0x16e93d(0x84)),'version');if(_0x480c59!==_0x454c21['skillVersion'])return{'state':_0x16e93d(0x81),'packageVersion':_0x454c21[_0x16e93d(0x86)],'skillVersion':_0x480c59,'installedPath':_0x2bc212[_0x16e93d(0x6d)],'repairCommand':REPAIR_COMMAND};const _0x548015=listFiles(_0x2bc212[_0x16e93d(0x6d)]),_0x501546=digestFiles(_0x2bc212[_0x16e93d(0x6d)],_0x548015);return{'state':sameFiles(_0x548015,_0x454c21[_0x16e93d(0x83)]['files'])&&_0x501546===_0x454c21[_0x16e93d(0x83)]['digest']?_0x16e93d(0x64):'content_mismatch','packageVersion':_0x454c21['packageVersion'],'skillVersion':_0x480c59,'installedPath':_0x2bc212['path'],'digest':_0x501546,'repairCommand':REPAIR_COMMAND};}catch(_0x330ac6){return{'state':_0x16e93d(0x90),'packageVersion':_0x454c21[_0x16e93d(0x86)],'installedPath':_0x2bc212[_0x16e93d(0x6d)],'reason':_0x330ac6 instanceof Error?_0x330ac6['message']:String(_0x330ac6),'repairCommand':REPAIR_COMMAND};}}function failure(_0xa54691,_0x5b7145,_0x3643ce,_0x1eca8d){const _0x36eff3=a129_0x4712ec;return{'ok':![],'code':_0xa54691,'packageVersion':_0x5b7145[_0x36eff3(0x86)],'skillVersion':_0x5b7145[_0x36eff3(0x8a)],'installedPath':_0x1eca8d,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x3643ce instanceof Error?_0x3643ce[_0x36eff3(0x74)]:String(_0x3643ce)};}export function installBuiltinSkill(_0x574fe6={}){const _0x4658e1=a129_0x4712ec,_0x2c0417=_0x574fe6[_0x4658e1(0x7c)]??DEFAULT_PACKAGE_ROOT,_0xd5662a=_0x574fe6[_0x4658e1(0x91)]??homedir();let _0x5334c3;try{_0x5334c3=readSource(_0x2c0417);}catch(_0x1ec631){return failure('SOURCE_INVALID',{'packageVersion':_0x4658e1(0x79),'skillVersion':'unknown'},_0x1ec631);}const _0xfe0eb7=inspectBuiltinSkill({'packageRoot':_0x2c0417,'home':_0xd5662a}),_0x2cf36d=runNpxSkillsAddGlobal(_0x2c0417,_0x5334c3[_0x4658e1(0x8e)],{'stdio':_0x574fe6[_0x4658e1(0x6b)]??_0x4658e1(0x85),'expectedSkillName':SKILL_NAME,'presence':{'home':_0xd5662a}});if(_0x2cf36d[_0x4658e1(0x66)])return{'ok':!![],'packageVersion':_0x5334c3[_0x4658e1(0x86)],'skillVersion':_0x5334c3[_0x4658e1(0x8a)],'installedPath':_0xfe0eb7[_0x4658e1(0x98)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x2cf36d['ok'])return failure(_0x4658e1(0x9f),_0x5334c3,_0x2cf36d[_0x4658e1(0x95)]??_0x4658e1(0xa4)+_0x2cf36d[_0x4658e1(0x97)]);const _0x3885ef=inspectBuiltinSkill({'packageRoot':_0x2c0417,'home':_0xd5662a});if(_0x3885ef['state']!==_0x4658e1(0x64))return failure(_0x4658e1(0x8d),_0x5334c3,_0x3885ef[_0x4658e1(0x70)]??_0x4658e1(0xa2)+_0x3885ef[_0x4658e1(0x7a)],_0x3885ef[_0x4658e1(0x98)]);return{'ok':!![],'packageVersion':_0x5334c3[_0x4658e1(0x86)],'skillVersion':_0x5334c3['skillVersion'],'installedPath':_0x3885ef['installedPath'],'changed':_0xfe0eb7[_0x4658e1(0x7a)]!==_0x4658e1(0x64),'repairCommand':REPAIR_COMMAND};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x51ac8d=a130_0x5861;(function(_0xbfc59b,_0x1dad45){const _0x2f0f0d=a130_0x5861,_0xe96a18=_0xbfc59b();while(!![]){try{const _0x3b0e34=-parseInt(_0x2f0f0d(0xf9))/0x1*(parseInt(_0x2f0f0d(0x10e))/0x2)+-parseInt(_0x2f0f0d(0x107))/0x3*(-parseInt(_0x2f0f0d(0xec))/0x4)+parseInt(_0x2f0f0d(0x103))/0x5+-parseInt(_0x2f0f0d(0xe2))/0x6+parseInt(_0x2f0f0d(0x10d))/0x7*(parseInt(_0x2f0f0d(0x10a))/0x8)+-parseInt(_0x2f0f0d(0xf1))/0x9*(parseInt(_0x2f0f0d(0xfe))/0xa)+parseInt(_0x2f0f0d(0xf8))/0xb*(-parseInt(_0x2f0f0d(0xfc))/0xc);if(_0x3b0e34===_0x1dad45)break;else _0xe96a18['push'](_0xe96a18['shift']());}catch(_0x165fab){_0xe96a18['push'](_0xe96a18['shift']());}}}(a130_0x1304,0x7666a));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a130_0xebd067}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a130_0xebd067;function a130_0x5861(_0x100fd6,_0x4cf6ee){_0x100fd6=_0x100fd6-0xdd;const _0x130414=a130_0x1304();let _0x586135=_0x130414[_0x100fd6];return _0x586135;}export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a130_0x51ac8d(0xf2)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a130_0x51ac8d(0xea)];export function resolveGlobalSkillName(_0x19b2ac){const _0x43f393=a130_0x51ac8d;switch(_0x19b2ac[_0x43f393(0xe7)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a130_0x51ac8d(0xfd)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x3ee519,_0x196c53,_0x2cf5c0){return{'ok':![],'status':_0x196c53,'code':_0x3ee519,'error':'['+_0x3ee519+']\x20'+_0x2cf5c0};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a130_0x1304(){const _0x4fafbb=['error','stdout','8gLYoov','match','Installer\x20reported\x20','2348969PfvqXR','218ewxXWu','add','CHILD_EXIT_NONZERO','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','signal','log','state','expectedSkillName','NPX_NOT_FOUND','presence','exit\x20','pipe','3888294zNBPAS','absent','EPERM','warn','\x20failed\x20target(s)','trim','\x22\x20install\x20state:\x20','EACCES','globalSkillName','ENOENT','36HfTujj','status','!\x20Could\x20not\x20verify\x20\x22','unverifiable','stdio','1091781PfJkGz','internalSkillSource','join','filter','PERMISSION_DENIED','SKILL_NOT_INSTALLED','message','3731585gMBETw','863PlRqIp','reason','npx\x20terminated\x20by\x20signal\x20','12BQcAsI','skipNpxSkillsEnvSuffix','20UGPNxM','SPAWN_FAILED','skills@latest','code','unknown','2773980mPXOxb','toString','INSTALL_PARTIAL','NPM_CONFIG_GLOBAL','306192LDmVAs'];a130_0x1304=function(){return _0x4fafbb;};return a130_0x1304();}export function runNpxSkillsAddGlobal(_0x545b82,_0x16e780=LOVRABET_SKILL_SOURCE,_0x63934f){const _0x4fb318=a130_0x51ac8d;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x446f57=resolveNpmBin('npx'),_0x25beae=['-y',_0x4fb318(0x100),_0x4fb318(0x10f),_0x16e780,'-g','-y'],_0x56849c=[_0x446f57,..._0x25beae][_0x4fb318(0xf3)]('\x20');console[_0x4fb318(0x113)]('*\x20'+_0x56849c);const _0x3e2ff7={...process.env};delete _0x3e2ff7['npm_config_global'],delete _0x3e2ff7[_0x4fb318(0x106)];const _0x55a969=spawnSync(_0x446f57,_0x25beae,{'cwd':_0x545b82,'stdio':_0x4fb318(0xe1),'env':_0x3e2ff7,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x262cd7=[_0x55a969[_0x4fb318(0x109)]?_0x55a969[_0x4fb318(0x109)][_0x4fb318(0x104)]():'',_0x55a969['stderr']?_0x55a969['stderr'][_0x4fb318(0x104)]():''][_0x4fb318(0xf4)](Boolean)['join']('\x0a')['trim']();_0x63934f?.[_0x4fb318(0xf0)]!=='pipe'&&_0x262cd7&&console[_0x4fb318(0x113)](_0x262cd7);if(_0x55a969[_0x4fb318(0x108)]){const _0x3643aa=_0x55a969[_0x4fb318(0x108)],_0x1b4f3e=_0x3643aa[_0x4fb318(0x101)]===_0x4fb318(0xeb)?_0x4fb318(0xde):_0x3643aa[_0x4fb318(0x101)]===_0x4fb318(0xe4)||_0x3643aa[_0x4fb318(0x101)]===_0x4fb318(0xe9)?_0x4fb318(0xf5):_0x4fb318(0xff);return failure(_0x1b4f3e,_0x55a969['status'],_0x3643aa[_0x4fb318(0xf7)]);}if(_0x55a969[_0x4fb318(0x112)])return failure('CHILD_TERMINATED',_0x55a969['status'],_0x4fb318(0xfb)+_0x55a969[_0x4fb318(0x112)]);if(_0x55a969[_0x4fb318(0xed)]!==0x0)return failure(_0x4fb318(0x110),_0x55a969['status'],_0x262cd7||_0x4fb318(0xe0)+(_0x55a969[_0x4fb318(0xed)]??_0x4fb318(0x102)));const _0x465232=_0x262cd7[_0x4fb318(0x10b)](/Failed to install\s+(\d+)/i);if(_0x465232&&Number(_0x465232[0x1])>0x0)return failure(_0x4fb318(0x105),0x0,_0x4fb318(0x10c)+_0x465232[0x1]+_0x4fb318(0xe6)+(_0x262cd7?':\x0a'+_0x262cd7:''));const _0x517e45=_0x63934f?.[_0x4fb318(0xdd)]??resolveGlobalSkillName(_0x16e780);if(_0x517e45){const _0x1da019=resolveInstalledSkill(_0x517e45,_0x63934f?.[_0x4fb318(0xdf)]);if(_0x1da019[_0x4fb318(0x114)]===_0x4fb318(0xe3))return failure(_0x4fb318(0xf6),0x0,'Skill\x20\x22'+_0x517e45+_0x4fb318(0x111)+_0x1da019['checked'][_0x4fb318(0xf3)](',\x20')+')');_0x1da019[_0x4fb318(0x114)]===_0x4fb318(0xef)&&console[_0x4fb318(0xe5)](_0x4fb318(0xee)+_0x517e45+_0x4fb318(0xe8)+_0x1da019[_0x4fb318(0xfa)]);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a131_0x4b4fa8=a131_0x4518;(function(_0x10059e,_0xeb5205){const _0x446fc2=a131_0x4518,_0x27f28c=_0x10059e();while(!![]){try{const _0x40b719=-parseInt(_0x446fc2(0xef))/0x1*(-parseInt(_0x446fc2(0xe9))/0x2)+-parseInt(_0x446fc2(0xeb))/0x3+-parseInt(_0x446fc2(0xec))/0x4*(-parseInt(_0x446fc2(0xf3))/0x5)+parseInt(_0x446fc2(0xe3))/0x6*(-parseInt(_0x446fc2(0xe2))/0x7)+parseInt(_0x446fc2(0xe8))/0x8*(parseInt(_0x446fc2(0xee))/0x9)+-parseInt(_0x446fc2(0xe4))/0xa+parseInt(_0x446fc2(0xf4))/0xb;if(_0x40b719===_0xeb5205)break;else _0x27f28c['push'](_0x27f28c['shift']());}catch(_0x459e2f){_0x27f28c['push'](_0x27f28c['shift']());}}}(a131_0x5f22,0xb13ed));export const METADATA_FILE=a131_0x4b4fa8(0xf1);function a131_0x5f22(){const _0x21b2c7=['.cache','1955979ktnRte','7065MIpgtI','coverage','lovrabet.skill.json','dist','25KDAsYS','5029255mpdWVe','.next','343NpdWbK','35538zhrIcA','7102730qcfNbK','node_modules','.svn','build','16UsFrFY','142TsZrQA','.DS_Store','3252840dUvQKd','1133836zlAxbu'];a131_0x5f22=function(){return _0x21b2c7;};return a131_0x5f22();}export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a131_0x4b4fa8(0xea)]);function a131_0x4518(_0x396d86,_0x40364d){_0x396d86=_0x396d86-0xe2;const _0x5f22c2=a131_0x5f22();let _0x451829=_0x5f22c2[_0x396d86];return _0x451829;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a131_0x4b4fa8(0xe6),a131_0x4b4fa8(0xe5),a131_0x4b4fa8(0xf5),a131_0x4b4fa8(0xf2),a131_0x4b4fa8(0xe7),a131_0x4b4fa8(0xf0),'.turbo',a131_0x4b4fa8(0xed)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d883b,_0x297eec){const _0x326c25=a132_0x1d2a,_0x258b63=_0x2d883b();while(!![]){try{const _0x38eb55=parseInt(_0x326c25(0x153))/0x1*(-parseInt(_0x326c25(0x14a))/0x2)+parseInt(_0x326c25(0x149))/0x3+parseInt(_0x326c25(0x151))/0x4+parseInt(_0x326c25(0x145))/0x5+-parseInt(_0x326c25(0x14e))/0x6*(-parseInt(_0x326c25(0x143))/0x7)+-parseInt(_0x326c25(0x147))/0x8*(parseInt(_0x326c25(0x144))/0x9)+-parseInt(_0x326c25(0x150))/0xa;if(_0x38eb55===_0x297eec)break;else _0x258b63['push'](_0x258b63['shift']());}catch(_0x190399){_0x258b63['push'](_0x258b63['shift']());}}}(a132_0x3f9f,0x55bae));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';function a132_0x1d2a(_0x4cbfb7,_0x2dff2a){_0x4cbfb7=_0x4cbfb7-0x141;const _0x3f9fc0=a132_0x3f9f();let _0x1d2a7c=_0x3f9fc0[_0x4cbfb7];return _0x1d2a7c;}import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x262cd0,_0x36fcec){const _0x4dad04=a132_0x1d2a,_0x416ef6=normalizeSkillRelativePath(_0x36fcec),_0x5a915f=realOrResolved(_0x262cd0),_0x682da5=resolve(_0x5a915f,..._0x416ef6[_0x4dad04(0x14d)]('/'));if(!isPathInside(_0x682da5,_0x5a915f))throw CliErrors[_0x4dad04(0x146)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x36fcec);return ensureNoSymlinkInManagedPath(_0x5a915f,_0x416ef6),_0x682da5;}export function ensureNoSymlinkInManagedPath(_0x1abb6a,_0x598016){const _0x4066d1=a132_0x1d2a;let _0x3b5163=_0x1abb6a;for(const _0x37b644 of _0x598016[_0x4066d1(0x14d)]('/')){_0x3b5163=resolve(_0x3b5163,_0x37b644);const _0x125f9d=lstatIfPresent(_0x3b5163);if(_0x125f9d?.['isSymbolicLink']())throw CliErrors[_0x4066d1(0x146)](_0x4066d1(0x14b)+_0x598016);}}export function isDanglingSymlink(_0x420c1c){const _0xc0ce17=a132_0x1d2a;try{return lstatSync(_0x420c1c)[_0xc0ce17(0x14c)]();}catch{return![];}}export function resolveSymlinkTarget(_0x53e938){const _0x57d401=readlinkSync(_0x53e938);return isAbsolute(_0x57d401)?_0x57d401:resolve(dirname(_0x53e938),_0x57d401);}export function isPathInside(_0x43da60,_0x55802c){const _0x52db7e=a132_0x1d2a,_0x26ad89=_0x43da60[_0x52db7e(0x141)](sep)?_0x43da60:''+_0x43da60+sep,_0x2a7fe1=_0x55802c[_0x52db7e(0x141)](sep)?_0x55802c:''+_0x55802c+sep;return _0x43da60===_0x55802c||_0x26ad89[_0x52db7e(0x14f)](_0x2a7fe1);}export function realOrResolved(_0x30c6c5){try{return realpathSync(_0x30c6c5);}catch{return resolve(_0x30c6c5);}}export function lstatIfPresent(_0x91f9bf){try{return lstatSync(_0x91f9bf);}catch{return undefined;}}export function writeTextAtomic(_0x264ebf,_0x45496d,_0x5496b3){const _0xa413f2=a132_0x1d2a;writeBytesAtomic(_0x264ebf,Buffer['from'](_0x45496d,_0xa413f2(0x142)),_0x5496b3);}function a132_0x3f9f(){const _0x1171b3=['utf8','10381KFGdkb','18xSomJp','2330955sBuxnN','validation','158392nQZJha','.tmp','68127ushcFC','259514UeAGYY','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','isSymbolicLink','split','1878AhKyNB','startsWith','11199070FHUorh','2749332RDuugu','stringify','1VwVzHb','endsWith'];a132_0x3f9f=function(){return _0x1171b3;};return a132_0x3f9f();}export function writeBytesAtomic(_0x36089d,_0x45b483,_0x549fee){const _0x33e306=a132_0x1d2a,_0x1544cf=_0x36089d+_0x33e306(0x148);try{writeFileSync(_0x1544cf,_0x45b483,{'mode':_0x549fee}),renameSync(_0x1544cf,_0x36089d);}catch(_0x16a0ea){try{rmSync(_0x1544cf,{'force':!![]});}catch{}throw _0x16a0ea;}}export function writeJsonAtomic(_0x193c1a,_0x6e9e40){const _0x8562b0=a132_0x1d2a;writeTextAtomic(_0x193c1a,JSON[_0x8562b0(0x152)](_0x6e9e40,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x457f89,_0x4a601b){const _0x584346=a133_0x47eb,_0x1853bb=_0x457f89();while(!![]){try{const _0x21bc53=-parseInt(_0x584346(0x1de))/0x1*(-parseInt(_0x584346(0x1dc))/0x2)+-parseInt(_0x584346(0x1e2))/0x3+parseInt(_0x584346(0x1db))/0x4*(parseInt(_0x584346(0x1e1))/0x5)+-parseInt(_0x584346(0x1e0))/0x6+parseInt(_0x584346(0x1d9))/0x7*(-parseInt(_0x584346(0x1dd))/0x8)+parseInt(_0x584346(0x1d7))/0x9+parseInt(_0x584346(0x1d8))/0xa;if(_0x21bc53===_0x4a601b)break;else _0x1853bb['push'](_0x1853bb['shift']());}catch(_0x2372c9){_0x1853bb['push'](_0x1853bb['shift']());}}}(a133_0x4818,0x3f55b));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a133_0x47eb(_0x3d5b1b,_0x1ef402){_0x3d5b1b=_0x3d5b1b-0x1d4;const _0x481821=a133_0x4818();let _0x47eb75=_0x481821[_0x3d5b1b];return _0x47eb75;}export function contentHash(_0x49a3c8){const _0xd9422e=a133_0x47eb;return createHash(_0xd9422e(0x1df))[_0xd9422e(0x1e3)](_0x49a3c8)[_0xd9422e(0x1d6)](_0xd9422e(0x1da));}function a133_0x4818(){const _0x5a67d3=['21zakaKT','hex','55732rKXQwN','215626xPZcPG','1116200PgzHzx','1CxcCCm','sha256','488850IiXYhj','150oltDlw','1199634ZJmTli','update','path','size','digest','1330650aobAas','4856940rFBjnA'];a133_0x4818=function(){return _0x5a67d3;};return a133_0x4818();}export function fileHash(_0x47c21d){return bufferSha256(fileContent(_0x47c21d));}export function bufferSha256(_0x59712c){const _0xc8984c=a133_0x47eb;return createHash(_0xc8984c(0x1df))['update'](_0x59712c)[_0xc8984c(0x1d6)](_0xc8984c(0x1da));}export function fileTreeHash(_0x151bf2){const _0x39ba28=a133_0x47eb,_0x527f74=createHash(_0x39ba28(0x1df));for(const _0x47ac3d of normalizeManifestFiles(_0x151bf2)){_0x527f74[_0x39ba28(0x1e3)](_0x47ac3d[_0x39ba28(0x1d4)]),_0x527f74[_0x39ba28(0x1e3)]('\x00'),_0x527f74[_0x39ba28(0x1e3)](_0x47ac3d['sha256']),_0x527f74[_0x39ba28(0x1e3)]('\x00'),_0x527f74[_0x39ba28(0x1e3)](String(_0x47ac3d[_0x39ba28(0x1d5)])),_0x527f74[_0x39ba28(0x1e3)]('\x00');}return _0x527f74['digest'](_0x39ba28(0x1da));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a134_0x1a7b(_0x3a682c,_0x111293){_0x3a682c=_0x3a682c-0x1d9;const _0x1a1778=a134_0x1a17();let _0x1a7b32=_0x1a1778[_0x3a682c];return _0x1a7b32;}const a134_0x60047b=a134_0x1a7b;(function(_0x137a30,_0x254abd){const _0x4fd7c1=a134_0x1a7b,_0x546e65=_0x137a30();while(!![]){try{const _0x477e69=parseInt(_0x4fd7c1(0x1da))/0x1*(-parseInt(_0x4fd7c1(0x1de))/0x2)+parseInt(_0x4fd7c1(0x1e2))/0x3+-parseInt(_0x4fd7c1(0x1e4))/0x4+parseInt(_0x4fd7c1(0x1dd))/0x5+-parseInt(_0x4fd7c1(0x1e7))/0x6+parseInt(_0x4fd7c1(0x1e8))/0x7*(-parseInt(_0x4fd7c1(0x1dc))/0x8)+-parseInt(_0x4fd7c1(0x1e6))/0x9*(-parseInt(_0x4fd7c1(0x1e1))/0xa);if(_0x477e69===_0x254abd)break;else _0x546e65['push'](_0x546e65['shift']());}catch(_0x482c47){_0x546e65['push'](_0x546e65['shift']());}}}(a134_0x1a17,0x84114));function a134_0x1a17(){const _0x3ce69b=['.agents','2290504Vhcdxl','1564560xPLRIV','1601994IDSvfp','project','global','230XrFtnx','1035804KPUXxK','freeze','4102248cqhGbF','managedRoot','1116873HtVHGB','5151546dsCKMz','7IrKlHQ','appCode','skills','cwd','1aNMTwF'];a134_0x1a17=function(){return _0x3ce69b;};return a134_0x1a17();}import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x44d4dd,_0x50b102=a134_0x60047b(0x1e0),_0x3869d5={}){const _0x175926=a134_0x60047b,_0x1761a0=resolveSkillSyncPaths(_0x3869d5),_0x529c4f=safePathSegment(_0x44d4dd,_0x175926(0x1e9)),_0x4b5971=_0x50b102===_0x175926(0x1df)?[resolve(_0x3869d5[_0x175926(0x1d9)]??process['cwd'](),_0x175926(0x1db),_0x175926(0x1ea))]:runtimeAgentSkillRoots(_0x1761a0);return Object['freeze']({'scope':_0x50b102,'appCode':_0x529c4f,'skillRoots':Object[_0x175926(0x1e3)](_0x4b5971),'managedRoot':_0x1761a0[_0x175926(0x1e5)]});}
|