@lovrabet/lovrabet-cli 2.1.22 → 2.1.23-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/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.d.ts +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.d.ts +2 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a94_0x4b62(){const _0x2f64ab=['production','newConfigFileName','verbose','string','../core/sdk-client.js','380526wDBbtG','2499040lZVOog','riskLevel','apiDomain','validation','doctor','appcode\x20\x22','3798258gVMrsm','_notice','\x20\x20To\x20proceed:\x20','service','has','formatOutput','appCode','defaultVerbose','pretty','rawFlags','ACCESS_KEY','currentApp','89878FJATGS','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','Run\x20`','nonInteractive','cancelled','accessKey','confirmHighRisk','High-risk\x20operation\x20`','ClientAk','.appcode\x20to\x20','6568eorsls','requiresAuth','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','mergedCli','error','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','defaultPageSize','15966LgayNJ','local-alias','defaultApp','Set\x20accessKey\x20in\x20','14322wpfFlu','isNonInteractive','app','Unknown\x20app:\x20','execute','requiresAppCode','trim','appCodeSource','\x20or\x20pass\x20','7ySbxoQ','3555735BPeAim','authRequired','catch','12HFgjvj','name','object','18XxnYKs','../commands/app/remote-source.js','map','29712QVXBMN','items','../core/api-client.js','format','env','appcode'];a94_0x4b62=function(){return _0x2f64ab;};return a94_0x4b62();}(function(_0x2927a0,_0x1f9c6f){const _0x1bbbb3=a94_0x1015,_0x4fce1d=_0x2927a0();while(!![]){try{const _0x3141f2=parseInt(_0x1bbbb3(0x116))/0x1*(-parseInt(_0x1bbbb3(0xf5))/0x2)+-parseInt(_0x1bbbb3(0x103))/0x3*(parseInt(_0x1bbbb3(0x138))/0x4)+-parseInt(_0x1bbbb3(0x135))/0x5+-parseInt(_0x1bbbb3(0x10a))/0x6*(-parseInt(_0x1bbbb3(0x134))/0x7)+-parseInt(_0x1bbbb3(0x120))/0x8*(parseInt(_0x1bbbb3(0x127))/0x9)+parseInt(_0x1bbbb3(0x104))/0xa+parseInt(_0x1bbbb3(0x12b))/0xb*(parseInt(_0x1bbbb3(0xf8))/0xc);if(_0x3141f2===_0x1f9c6f)break;else _0x4fce1d['push'](_0x4fce1d['shift']());}catch(_0x22780d){_0x4fce1d['push'](_0x4fce1d['shift']());}}}(a94_0x4b62,0xb7066));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';function a94_0x1015(_0x2319e2,_0x3b0d04){_0x2319e2=_0x2319e2-0xf4;const _0x4b628d=a94_0x4b62();let _0x1015fe=_0x4b628d[_0x2319e2];return _0x1015fe;}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(_0x43b615){const _0x117bf6=a94_0x1015;return void _0x43b615,AUTH_MODE[_0x117bf6(0x11e)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x322e19,_0x47f4c4){const _0x535b1b=a94_0x1015,_0x5d1cdd=typeof _0x47f4c4[_0x535b1b(0x12d)]==='string'&&_0x47f4c4[_0x535b1b(0x12d)][_0x535b1b(0x131)]();return{'rawFlags':_0x47f4c4,'appCode':_0x322e19[_0x535b1b(0x110)]||productEnv('APPCODE')||(_0x5d1cdd?undefined:readAppCodeFromConfig()),'appCodeSource':_0x322e19['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x47f4c4),'defaultFormat':_0x322e19[_0x535b1b(0xfb)],'defaultPageSize':_0x322e19['pageSize'],'defaultVerbose':_0x322e19[_0x535b1b(0x100)],'riskLevel':_0x322e19[_0x535b1b(0x105)],'accessKey':_0x322e19[_0x535b1b(0x11b)],'env':_0x322e19[_0x535b1b(0xfc)],'mergedCli':{'defaultApp':_0x322e19[_0x535b1b(0x129)],'currentApp':_0x322e19[_0x535b1b(0x115)],'appCode':_0x322e19[_0x535b1b(0x110)]}};}export function createLovrabetRunnerAdapter(_0x1b4e6a={}){const _0x7998b5=a94_0x1015,_0x33e8e5={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS['filter'](_0x35a4de=>PIPELINE_FLAG_NAMES[_0x7998b5(0x10e)](_0x35a4de[_0x7998b5(0x139)]))[_0x7998b5(0xf7)](({name:_0x3e52ed,type:_0x1138b1,description:_0x3034f1})=>({'name':_0x3e52ed,'type':_0x1138b1,'description':_0x3034f1})),'formatOutput':_0x1b4e6a[_0x7998b5(0x10f)]??formatOutput,'getCommandLabel'(_0x2a6f73){return CLI_BIN_NAME+'\x20'+_0x2a6f73['service']+'\x20'+_0x2a6f73['command'];},'riskPolicy':{'onViolation'(_0x2ebcc2){const _0x50c0ba=_0x7998b5;console[_0x50c0ba(0x124)](_0x2ebcc2);},'createError'(_0x5b9ce8){return CliErrors['cancelled'](_0x5b9ce8);}},async 'prepare'(_0x1799b7,_0x5b7532){const _0x2e074f=_0x7998b5,_0x1b88ad=resolveAuthMode(_0x5b7532);if(_0x1799b7[_0x2e074f(0x121)]!==![]){if(!_0x5b7532['accessKey'])throw CliErrors[_0x2e074f(0x136)](_0x2e074f(0x12a)+PRODUCT_CONFIG[_0x2e074f(0xff)]+_0x2e074f(0x133)+productEnvName(_0x2e074f(0x114))+'.');const {setActiveAK:_0x41f03c}=await import(_0x2e074f(0xfa));_0x41f03c(_0x5b7532[_0x2e074f(0x11b)]);}let _0x473875='';if(_0x1799b7[_0x2e074f(0x130)]!==![]){_0x473875=_0x5b7532['appCode']??'',_0x473875=await resolveExplicitAppName(_0x1799b7,_0x5b7532,_0x473875);if(!_0x473875){await assertSelectedAppNameIsRuntimeAccessible(_0x1799b7,_0x5b7532);throw CliErrors['configMissing'](_0x2e074f(0x122)+PRODUCT_CONFIG[_0x2e074f(0xff)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x1799b7,_0x5b7532,_0x473875);}if(_0x473875){const {initSdkClient:_0x3f66b4}=await import(_0x2e074f(0x102));_0x3f66b4({'appCode':_0x473875,'env':_0x5b7532[_0x2e074f(0xfc)]??'production','accessKey':_0x5b7532['accessKey'],'authMode':_0x1b88ad}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x5b7532[_0x2e074f(0x111)]},'numbers':{'pagesize':_0x5b7532[_0x2e074f(0x126)]}},'extras':{'appCode':_0x473875,'cookie':'','apiDomain':_0x5b7532[_0x2e074f(0x106)],'apiDir':'','accessKey':_0x5b7532['accessKey'],'envName':_0x5b7532[_0x2e074f(0xfc)],'mergedCli':_0x5b7532['mergedCli']}};},'confirmHighRisk':_0x1b4e6a[_0x7998b5(0x11c)]??(async({def:_0x546c7b,env:_0xda0e4f,flags:_0x1dd843,commandLabel:_0x1486fa})=>{const _0x4257af=_0x7998b5;if(_0xda0e4f[_0x4257af(0x12c)]){const _0x50f15c=reconstructCommandArgv(_0x546c7b,_0x1dd843);throw CliErrors[_0x4257af(0x107)](_0x4257af(0x11d)+_0x1486fa+_0x4257af(0x125)+(_0x4257af(0x10c)+_0x50f15c));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x546c7b,_0x1486fa,_0x1dd843),'createCancelledError':_0x2cb0e6=>CliErrors[_0x4257af(0x11a)](_0x2cb0e6)});}),'mapDryRunError'(_0x2fa549){return mapUserFacingExecuteError(_0x2fa549);},'mapExecuteError'(_0x12beca){return mapUserFacingExecuteError(_0x12beca);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x33e8e5;}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x26afbf=a94_0x1015;try{if(sdkClientInitialized){const {clearSdkClient:_0xe4b3b7}=await import(_0x26afbf(0x102));_0xe4b3b7();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xbe438}=await import(_0x26afbf(0xfa));_0xbe438();}}async function resolveExplicitAppName(_0x968aef,_0x1b5411,_0x5cf606){const _0x197f3a=a94_0x1015;if(_0x968aef['requiresAppCode']===![])return _0x5cf606;const _0x3401ee=typeof _0x1b5411[_0x197f3a(0x113)][_0x197f3a(0x12d)]===_0x197f3a(0x101)?_0x1b5411[_0x197f3a(0x113)][_0x197f3a(0x12d)]['trim']():'';if(!_0x3401ee)return _0x5cf606;const _0x5e82ee=typeof _0x1b5411[_0x197f3a(0x113)][_0x197f3a(0xfd)]===_0x197f3a(0x101)&&_0x1b5411[_0x197f3a(0x113)][_0x197f3a(0xfd)][_0x197f3a(0x131)]()||productEnv('APPCODE');if(_0x5e82ee||_0x1b5411[_0x197f3a(0x132)]===_0x197f3a(0x128))return _0x5cf606;const {getRemoteAppList:_0x51681a}=await import(_0x197f3a(0xf6)),_0x3dd633=await _0x51681a({'env':_0x1b5411[_0x197f3a(0xfc)]??_0x197f3a(0xfe),'accessKey':_0x1b5411[_0x197f3a(0x11b)]}),_0x1be791=findAppByName(_0x3dd633[_0x197f3a(0xf9)],_0x3401ee);if(_0x1be791&&!isRuntimeAccessibleApp(_0x1be791))throw runtimeInaccessibleAppError(_0x1be791,'\x22'+_0x3401ee+'\x22');const _0x16eff9=_0x1be791?.[_0x197f3a(0x110)]?.[_0x197f3a(0x131)]();if(_0x16eff9)return _0x16eff9;throw CliErrors['validation'](_0x197f3a(0x12e)+_0x3401ee,_0x197f3a(0x118)+CLI_BIN_NAME+_0x197f3a(0x117)+_0x3401ee+_0x197f3a(0x11f)+PRODUCT_CONFIG[_0x197f3a(0xff)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x17e622,_0x53041a){const _0x24e648=a94_0x1015;if(_0x17e622[_0x24e648(0x130)]===![]||!_0x53041a[_0x24e648(0x11b)])return;const _0x59eae1=(typeof _0x53041a[_0x24e648(0x113)][_0x24e648(0x12d)]===_0x24e648(0x101)&&_0x53041a[_0x24e648(0x113)][_0x24e648(0x12d)][_0x24e648(0x131)]()?_0x53041a['rawFlags'][_0x24e648(0x12d)]:_0x53041a[_0x24e648(0x123)]?.[_0x24e648(0x115)]??_0x53041a[_0x24e648(0x123)]?.[_0x24e648(0x129)])?.[_0x24e648(0x131)]();if(!_0x59eae1)return;const {getRemoteAppList:_0x97667e}=await import(_0x24e648(0xf6)),_0x291c60=await _0x97667e({'env':_0x53041a[_0x24e648(0xfc)]??_0x24e648(0xfe),'accessKey':_0x53041a[_0x24e648(0x11b)]}),_0x2c516b=findAppByName(_0x291c60[_0x24e648(0xf9)],_0x59eae1);if(_0x2c516b&&!isRuntimeAccessibleApp(_0x2c516b))throw runtimeInaccessibleAppError(_0x2c516b,'\x22'+_0x59eae1+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x259254,_0xe578b3,_0x23d456){const _0x3ab133=a94_0x1015;if(_0x259254['requiresAppCode']===![]||!_0xe578b3[_0x3ab133(0x11b)])return;const {getRemoteAppList:_0x4febfd}=await import('../commands/app/remote-source.js'),_0x48b92b=await _0x4febfd({'env':_0xe578b3[_0x3ab133(0xfc)]??_0x3ab133(0xfe),'accessKey':_0xe578b3['accessKey']}),_0x2509ab=findAppByCode(_0x48b92b['items'],_0x23d456);if(_0x2509ab&&!isRuntimeAccessibleApp(_0x2509ab))throw runtimeInaccessibleAppError(_0x2509ab,_0x3ab133(0x109)+_0x23d456+'\x22');}export async function runCommand(_0x390de6,_0x3a3a88,_0x377f0a=terminalRunnerAdapter){const _0x508685=a94_0x1015;assertKnownCommandFlags(_0x390de6,_0x3a3a88[_0x508685(0x113)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x390de6)?withUpdateNotice(_0x390de6):_0x390de6,_0x3a3a88,_0x377f0a);}function shouldAttachUpdateNotice(_0x471bef){const _0x3a7799=a94_0x1015;return!['update','schema',_0x3a7799(0x108)]['includes'](_0x471bef[_0x3a7799(0x10d)]);}function withUpdateNotice(_0x531163){return{..._0x531163,async 'execute'(_0x58b1bc){const _0x45b0d8=a94_0x1015,_0x4acb46=shouldResolveUpdateNotice(_0x58b1bc)?resolveLatestUpdateNotice()[_0x45b0d8(0x137)](()=>null):Promise['resolve'](null),_0x51a7a1=await _0x531163[_0x45b0d8(0x12f)](_0x58b1bc);return attachUpdateNotice(_0x51a7a1,await _0x4acb46);}};}function shouldResolveUpdateNotice(_0x160059){const _0x5d043b=a94_0x1015;return _0x160059[_0x5d043b(0xfb)]===_0x5d043b(0x112)&&!_0x160059[_0x5d043b(0x119)];}function attachUpdateNotice(_0x16cbe8,_0x2e7495){const _0x8778e9=a94_0x1015;if(!_0x2e7495||!_0x16cbe8||typeof _0x16cbe8!==_0x8778e9(0xf4))return _0x16cbe8;const _0x4180dd=_0x16cbe8,_0x493ca3=typeof _0x4180dd[_0x8778e9(0x10b)]===_0x8778e9(0xf4)&&_0x4180dd[_0x8778e9(0x10b)]!==null?_0x4180dd['_notice']:{};return{..._0x4180dd,'_notice':{..._0x493ca3,'update':_0x2e7495}};}
|
|
1
|
+
(function(_0xde57e5,_0x52013c){const _0x5ae85e=a94_0x5ae7,_0x205a83=_0xde57e5();while(!![]){try{const _0x18a399=-parseInt(_0x5ae85e(0x20b))/0x1+-parseInt(_0x5ae85e(0x213))/0x2*(parseInt(_0x5ae85e(0x1d9))/0x3)+parseInt(_0x5ae85e(0x1f5))/0x4+parseInt(_0x5ae85e(0x202))/0x5*(-parseInt(_0x5ae85e(0x1f4))/0x6)+parseInt(_0x5ae85e(0x1d8))/0x7+parseInt(_0x5ae85e(0x1df))/0x8+parseInt(_0x5ae85e(0x1ef))/0x9;if(_0x18a399===_0x52013c)break;else _0x205a83['push'](_0x205a83['shift']());}catch(_0x197541){_0x205a83['push'](_0x205a83['shift']());}}}(a94_0x2153,0x48d7b));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';import{formatOutput}from'../framework/output.js';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME,GLOBAL_FLAGS,PIPELINE_FLAG_NAMES}from'../constant/cli.js';import{PRODUCT_CONFIG,productEnv,productEnvName}from'../constant/product.js';import{isNonInteractiveMode,readAppCodeFromConfig}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{getApiDomain}from'../constant/domain.js';import{buildConfirmationLines,reconstructCommandArgv}from'../framework/runner-confirmation.js';import{mapUserFacingExecuteError}from'../framework/runner-error.js';import{assertKnownCommandFlags}from'../framework/raw-flags.js';import{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';export function resolveAuthMode(_0x9abd8a){const _0x2e63b7=a94_0x5ae7;return void _0x9abd8a,AUTH_MODE[_0x2e63b7(0x1e9)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x439014,_0x407881){const _0x583deb=a94_0x5ae7,_0x885619=typeof _0x407881[_0x583deb(0x20d)]===_0x583deb(0x1e3)&&_0x407881[_0x583deb(0x20d)][_0x583deb(0x1d7)]();return{'rawFlags':_0x407881,'appCode':_0x439014[_0x583deb(0x1f1)]||productEnv(_0x583deb(0x204))||(_0x885619?undefined:readAppCodeFromConfig()),'appCodeSource':_0x439014[_0x583deb(0x1fe)],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x407881),'defaultFormat':_0x439014[_0x583deb(0x1fb)],'defaultPageSize':_0x439014[_0x583deb(0x211)],'defaultVerbose':_0x439014[_0x583deb(0x207)],'riskLevel':_0x439014['riskLevel'],'accessKey':_0x439014[_0x583deb(0x208)],'env':_0x439014[_0x583deb(0x1f8)],'mergedCli':{'defaultApp':_0x439014[_0x583deb(0x1fa)],'currentApp':_0x439014['currentApp'],'appCode':_0x439014['appCode']}};}export function createLovrabetRunnerAdapter(_0x585f23={}){const _0x493212=a94_0x5ae7,_0x4799c9={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[_0x493212(0x1e2)](_0x9ea6cb=>PIPELINE_FLAG_NAMES[_0x493212(0x1f3)](_0x9ea6cb[_0x493212(0x212)]))[_0x493212(0x217)](({name:_0x13bf55,type:_0xe28789,description:_0x4505b0})=>({'name':_0x13bf55,'type':_0xe28789,'description':_0x4505b0})),'formatOutput':_0x585f23[_0x493212(0x1db)]??formatOutput,'getCommandLabel'(_0x11f3c1){const _0x469565=_0x493212;return CLI_BIN_NAME+'\x20'+_0x11f3c1[_0x469565(0x1e8)]+'\x20'+_0x11f3c1[_0x469565(0x205)];},'riskPolicy':{'onViolation'(_0x1950a1){const _0xcfaa73=_0x493212;console[_0xcfaa73(0x206)](_0x1950a1);},'createError'(_0x188e7c){const _0x1fcd00=_0x493212;return CliErrors[_0x1fcd00(0x20e)](_0x188e7c);}},async 'prepare'(_0x3bcff3,_0x2b44f6){const _0x514de0=_0x493212,_0x53cf4f=resolveAuthMode(_0x2b44f6);if(_0x3bcff3[_0x514de0(0x214)]!==![]){if(!_0x2b44f6['accessKey'])throw CliErrors[_0x514de0(0x210)](_0x514de0(0x1e7)+PRODUCT_CONFIG[_0x514de0(0x1fc)]+_0x514de0(0x1ed)+productEnvName(_0x514de0(0x20f))+'.');const {setActiveAK:_0x5c40bf}=await import(_0x514de0(0x219));_0x5c40bf(_0x2b44f6[_0x514de0(0x208)]);}let _0x2b822d='';if(_0x3bcff3[_0x514de0(0x1e0)]!==![]){_0x2b822d=_0x2b44f6[_0x514de0(0x1f1)]??'',_0x2b822d=await resolveExplicitAppName(_0x3bcff3,_0x2b44f6,_0x2b822d);if(!_0x2b822d){await assertSelectedAppNameIsRuntimeAccessible(_0x3bcff3,_0x2b44f6);throw CliErrors[_0x514de0(0x1f6)](_0x514de0(0x216)+PRODUCT_CONFIG[_0x514de0(0x1fc)]+'.');}await assertAppCodeIsRuntimeAccessible(_0x3bcff3,_0x2b44f6,_0x2b822d);}if(_0x2b822d){const {initSdkClient:_0x1ae07a}=await import(_0x514de0(0x1ec));_0x1ae07a({'appCode':_0x2b822d,'env':_0x2b44f6[_0x514de0(0x1f8)]??_0x514de0(0x1ff),'accessKey':_0x2b44f6['accessKey'],'authMode':_0x53cf4f}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2b44f6[_0x514de0(0x20a)]},'numbers':{'pagesize':_0x2b44f6[_0x514de0(0x1de)]}},'extras':{'appCode':_0x2b822d,'cookie':'','apiDomain':_0x2b44f6[_0x514de0(0x209)],'apiDir':'','accessKey':_0x2b44f6[_0x514de0(0x208)],'envName':_0x2b44f6[_0x514de0(0x1f8)],'mergedCli':_0x2b44f6[_0x514de0(0x20c)]}};},'confirmHighRisk':_0x585f23[_0x493212(0x1f0)]??(async({def:_0x57fcd7,env:_0x5b4994,flags:_0x3bd00c,commandLabel:_0x280829})=>{const _0x22170f=_0x493212;if(_0x5b4994[_0x22170f(0x201)]){const _0xa1c88f=reconstructCommandArgv(_0x57fcd7,_0x3bd00c);throw CliErrors[_0x22170f(0x1f9)]('High-risk\x20operation\x20`'+_0x280829+_0x22170f(0x1e4)+('\x20\x20To\x20proceed:\x20'+_0xa1c88f));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x57fcd7,_0x280829,_0x3bd00c),'createCancelledError':_0x394fe7=>CliErrors[_0x22170f(0x20e)](_0x394fe7)});}),'mapDryRunError'(_0x5c2f08){return mapUserFacingExecuteError(_0x5c2f08);},'mapExecuteError'(_0x3fde52){return mapUserFacingExecuteError(_0x3fde52);},async 'finalize'(){await finalizeLovrabetRuntimeState();}};return _0x4799c9;}function a94_0x2153(){const _0x437259=['verbose','accessKey','apiDomain','defaultVerbose','413946EiNccG','mergedCli','app','cancelled','ACCESS_KEY','authRequired','pageSize','name','2QJXSGX','requiresAuth','appcode\x20\x22','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','map','currentApp','../core/api-client.js','execute','rawFlags','resolve','trim','110936xoMiRx','1241619CShOXP','pretty','formatOutput','_notice','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','defaultPageSize','4767336uwLaAT','requiresAppCode','local-alias','filter','string','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','../commands/app/remote-source.js','Run\x20`','Set\x20accessKey\x20in\x20','service','ClientAk','object','catch','../core/sdk-client.js','\x20or\x20pass\x20','Unknown\x20app:\x20','4632300WVATUp','confirmHighRisk','appCode','includes','has','6fkRROe','2293452BIUBKi','configMissing','nonInteractive','env','validation','defaultApp','format','newConfigFileName','items','appCodeSource','production','doctor','isNonInteractive','2868230XSATvE','appcode','APPCODE','command','error'];a94_0x2153=function(){return _0x437259;};return a94_0x2153();}const terminalRunnerAdapter=createLovrabetRunnerAdapter();export async function finalizeLovrabetRuntimeState(){const _0x551b7f=a94_0x5ae7;try{if(sdkClientInitialized){const {clearSdkClient:_0x4ba51c}=await import(_0x551b7f(0x1ec));_0x4ba51c();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x18525b}=await import(_0x551b7f(0x219));_0x18525b();}}async function resolveExplicitAppName(_0x35449e,_0x3b6fee,_0x54c34e){const _0x25f637=a94_0x5ae7;if(_0x35449e[_0x25f637(0x1e0)]===![])return _0x54c34e;const _0x35978e=typeof _0x3b6fee[_0x25f637(0x1d5)]['app']==='string'?_0x3b6fee[_0x25f637(0x1d5)]['app'][_0x25f637(0x1d7)]():'';if(!_0x35978e)return _0x54c34e;const _0x36f26b=typeof _0x3b6fee[_0x25f637(0x1d5)][_0x25f637(0x203)]===_0x25f637(0x1e3)&&_0x3b6fee['rawFlags'][_0x25f637(0x203)][_0x25f637(0x1d7)]()||productEnv(_0x25f637(0x204));if(_0x36f26b||_0x3b6fee[_0x25f637(0x1fe)]===_0x25f637(0x1e1))return _0x54c34e;const {getRemoteAppList:_0x42b67b}=await import(_0x25f637(0x1e5)),_0x4ac086=await _0x42b67b({'env':_0x3b6fee[_0x25f637(0x1f8)]??'production','accessKey':_0x3b6fee['accessKey']}),_0x2ff057=findAppByName(_0x4ac086[_0x25f637(0x1fd)],_0x35978e);if(_0x2ff057&&!isRuntimeAccessibleApp(_0x2ff057))throw runtimeInaccessibleAppError(_0x2ff057,'\x22'+_0x35978e+'\x22');const _0x51146b=_0x2ff057?.[_0x25f637(0x1f1)]?.[_0x25f637(0x1d7)]();if(_0x51146b)return _0x51146b;throw CliErrors[_0x25f637(0x1f9)](_0x25f637(0x1ee)+_0x35978e,_0x25f637(0x1e6)+CLI_BIN_NAME+_0x25f637(0x1dd)+_0x35978e+'.appcode\x20to\x20'+PRODUCT_CONFIG[_0x25f637(0x1fc)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x4d2b29,_0x3d69ec){const _0x10fa63=a94_0x5ae7;if(_0x4d2b29['requiresAppCode']===![]||!_0x3d69ec[_0x10fa63(0x208)])return;const _0x5449a7=(typeof _0x3d69ec[_0x10fa63(0x1d5)]['app']===_0x10fa63(0x1e3)&&_0x3d69ec[_0x10fa63(0x1d5)][_0x10fa63(0x20d)]['trim']()?_0x3d69ec[_0x10fa63(0x1d5)][_0x10fa63(0x20d)]:_0x3d69ec['mergedCli']?.[_0x10fa63(0x218)]??_0x3d69ec[_0x10fa63(0x20c)]?.[_0x10fa63(0x1fa)])?.[_0x10fa63(0x1d7)]();if(!_0x5449a7)return;const {getRemoteAppList:_0x41aa47}=await import('../commands/app/remote-source.js'),_0x89c540=await _0x41aa47({'env':_0x3d69ec['env']??_0x10fa63(0x1ff),'accessKey':_0x3d69ec[_0x10fa63(0x208)]}),_0x109756=findAppByName(_0x89c540['items'],_0x5449a7);if(_0x109756&&!isRuntimeAccessibleApp(_0x109756))throw runtimeInaccessibleAppError(_0x109756,'\x22'+_0x5449a7+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1df900,_0x501d4f,_0x3172b7){const _0x4553bd=a94_0x5ae7;if(_0x1df900['requiresAppCode']===![]||!_0x501d4f[_0x4553bd(0x208)])return;const {getRemoteAppList:_0xa3c512}=await import('../commands/app/remote-source.js'),_0x397e95=await _0xa3c512({'env':_0x501d4f[_0x4553bd(0x1f8)]??'production','accessKey':_0x501d4f[_0x4553bd(0x208)]}),_0x5085dc=findAppByCode(_0x397e95[_0x4553bd(0x1fd)],_0x3172b7);if(_0x5085dc&&!isRuntimeAccessibleApp(_0x5085dc))throw runtimeInaccessibleAppError(_0x5085dc,_0x4553bd(0x215)+_0x3172b7+'\x22');}export async function runCommand(_0x597496,_0x26ef2c,_0x42081e=terminalRunnerAdapter){const _0x4d879c=a94_0x5ae7;assertKnownCommandFlags(_0x597496,_0x26ef2c[_0x4d879c(0x1d5)]),await runCommandWithAdapter(shouldAttachUpdateNotice(_0x597496)?withUpdateNotice(_0x597496):_0x597496,_0x26ef2c,_0x42081e);}function shouldAttachUpdateNotice(_0x245e69){const _0x5b543a=a94_0x5ae7;return!['update','schema',_0x5b543a(0x200)][_0x5b543a(0x1f2)](_0x245e69[_0x5b543a(0x1e8)]);}function withUpdateNotice(_0x35f702){return{..._0x35f702,async 'execute'(_0x2d5b64){const _0x31f690=a94_0x5ae7,_0x2e7924=shouldResolveUpdateNotice(_0x2d5b64)?resolveLatestUpdateNotice()[_0x31f690(0x1eb)](()=>null):Promise[_0x31f690(0x1d6)](null),_0x280cfa=await _0x35f702[_0x31f690(0x21a)](_0x2d5b64);return attachUpdateNotice(_0x280cfa,await _0x2e7924);}};}function a94_0x5ae7(_0x1d4b26,_0x20591b){_0x1d4b26=_0x1d4b26-0x1d5;const _0x2153ba=a94_0x2153();let _0x5ae79b=_0x2153ba[_0x1d4b26];return _0x5ae79b;}function shouldResolveUpdateNotice(_0x4ac8b8){const _0x25fb5c=a94_0x5ae7;return _0x4ac8b8[_0x25fb5c(0x1fb)]===_0x25fb5c(0x1da)&&!_0x4ac8b8[_0x25fb5c(0x1f7)];}function attachUpdateNotice(_0x2d754c,_0x248f95){const _0x28a2c2=a94_0x5ae7;if(!_0x248f95||!_0x2d754c||typeof _0x2d754c!==_0x28a2c2(0x1ea))return _0x2d754c;const _0x3e604c=_0x2d754c,_0x49edf8=typeof _0x3e604c[_0x28a2c2(0x1dc)]==='object'&&_0x3e604c[_0x28a2c2(0x1dc)]!==null?_0x3e604c[_0x28a2c2(0x1dc)]:{};return{..._0x3e604c,'_notice':{..._0x49edf8,'update':_0x248f95}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e25ac,_0xbba1db){const _0xf5f57c=a95_0x46e5,_0x5a4496=_0x3e25ac();while(!![]){try{const _0x3c0cd0=-parseInt(_0xf5f57c(0x10d))/0x1*(-parseInt(_0xf5f57c(0x10f))/0x2)+-parseInt(_0xf5f57c(0x117))/0x3+-parseInt(_0xf5f57c(0x111))/0x4*(parseInt(_0xf5f57c(0x11a))/0x5)+parseInt(_0xf5f57c(0x11b))/0x6+-parseInt(_0xf5f57c(0x119))/0x7*(-parseInt(_0xf5f57c(0x10e))/0x8)+parseInt(_0xf5f57c(0x115))/0x9+-parseInt(_0xf5f57c(0x11c))/0xa;if(_0x3c0cd0===_0xbba1db)break;else _0x5a4496['push'](_0x5a4496['shift']());}catch(_0x6b1f7e){_0x5a4496['push'](_0x5a4496['shift']());}}}(a95_0x37bb,0x2aa73));function a95_0x46e5(_0x41446e,_0x20d39d){_0x41446e=_0x41446e-0x10a;const _0x37bbc7=a95_0x37bb();let _0x46e5cf=_0x37bbc7[_0x41446e];return _0x46e5cf;}import{buildSchemaPayload as a95_0x57ebe9}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';function a95_0x37bb(){const _0x45d33b=['54884rhPUXJ','required','map','../commands/registry.js','1848645eKgFYe','requiresAuth','878640AnoVPO','service','683221Ajdgny','5JlnLwH','1969050WVuSVU','3196740YtDxWN','filter','commands','has','services','889TIebJs','8RyHVMr','382DQwtQV','none'];a95_0x37bb=function(){return _0x45d33b;};return a95_0x37bb();}import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x128247=a95_0x46e5,{serviceRegistry:_0x328bba,findDefinition:_0x342ba7}=await import(_0x128247(0x114)),_0x3628b3=new Set(_0x328bba[_0x128247(0x113)](_0x3b1e3e=>_0x3b1e3e['service'])),_0xbbddc4=listDynamicServiceEntries()[_0x128247(0x11d)](_0x8a9a96=>!_0x3628b3[_0x128247(0x10b)](_0x8a9a96[_0x128247(0x118)])),_0x557e63=a95_0x57ebe9({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x328bba,_0xbbddc4),'buildAllFlags':buildAllFlags,'findDefinition':(_0x3255f3,_0x3b9461)=>_0x342ba7(_0x3255f3,_0x3b9461)??findDynamicServiceDefinition(_0x3255f3,_0x3b9461)});return normalizeSchemaPayload(_0x557e63);}function normalizeSchemaPayload(_0x5b619e){const _0x545e06=a95_0x46e5;return{..._0x5b619e,'schemaVersion':0x2,'services':_0x5b619e[_0x545e06(0x10c)][_0x545e06(0x113)](_0x597a8b=>({..._0x597a8b,'commands':_0x597a8b[_0x545e06(0x10a)][_0x545e06(0x113)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x2d3245){const _0xa30edb=a95_0x46e5,_0x28ab8e=_0x2d3245;return{..._0x2d3245,'auth':_0x28ab8e['auth']??(_0x2d3245[_0xa30edb(0x116)]?_0xa30edb(0x112):_0xa30edb(0x110))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a5685,_0x5bfdf3){const _0x14faea=a96_0xa37d,_0x4efb8a=_0x3a5685();while(!![]){try{const _0x524d86=-parseInt(_0x14faea(0x16b))/0x1+parseInt(_0x14faea(0x16f))/0x2*(parseInt(_0x14faea(0x16e))/0x3)+-parseInt(_0x14faea(0x168))/0x4+-parseInt(_0x14faea(0x171))/0x5+parseInt(_0x14faea(0x16d))/0x6*(-parseInt(_0x14faea(0x169))/0x7)+parseInt(_0x14faea(0x16a))/0x8+parseInt(_0x14faea(0x16c))/0x9;if(_0x524d86===_0x5bfdf3)break;else _0x4efb8a['push'](_0x4efb8a['shift']());}catch(_0x92b60a){_0x4efb8a['push'](_0x4efb8a['shift']());}}}(a96_0x4f61,0x5e231));export function insertDynamicServicesAfterServiceTree(_0x16e468,_0x5f23bb){const _0x29589c=a96_0xa37d;if(_0x5f23bb['length']===0x0)return[..._0x16e468];const _0x4f91cf=_0x16e468[_0x29589c(0x172)](_0x5a6190=>_0x5a6190['service']===_0x29589c(0x167));if(_0x4f91cf<0x0)return[..._0x16e468,..._0x5f23bb];return[..._0x16e468['slice'](0x0,_0x4f91cf+0x1),..._0x5f23bb,..._0x16e468[_0x29589c(0x170)](_0x4f91cf+0x1)];}function a96_0xa37d(_0x2cfe92,_0x4118aa){_0x2cfe92=_0x2cfe92-0x167;const _0x4f61bf=a96_0x4f61();let _0xa37dee=_0x4f61bf[_0x2cfe92];return _0xa37dee;}function a96_0x4f61(){const _0x95a50=['slice','2514885rolRsY','findIndex','service','2999456TeooHv','98273vTuAuB','2827176zjHaFy','201235iWIDKC','11693475LFjupZ','186YgLmZg','6xEWepe','622198ajbPQW'];a96_0x4f61=function(){return _0x95a50;};return a96_0x4f61();}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x10340f,_0x34740b){var _0x40ec80=a97_0x1e51,_0x120ae2=_0x10340f();while(!![]){try{var _0x53d31f=-parseInt(_0x40ec80(0xa8))/0x1*(-parseInt(_0x40ec80(0xac))/0x2)+-parseInt(_0x40ec80(0xa5))/0x3*(parseInt(_0x40ec80(0xad))/0x4)+-parseInt(_0x40ec80(0xab))/0x5*(parseInt(_0x40ec80(0xa9))/0x6)+parseInt(_0x40ec80(0xa7))/0x7+-parseInt(_0x40ec80(0xaf))/0x8+-parseInt(_0x40ec80(0xa6))/0x9*(-parseInt(_0x40ec80(0xaa))/0xa)+parseInt(_0x40ec80(0xae))/0xb;if(_0x53d31f===_0x34740b)break;else _0x120ae2['push'](_0x120ae2['shift']());}catch(_0x22122f){_0x120ae2['push'](_0x120ae2['shift']());}}}(a97_0x1f2d,0x4b352));function a97_0x1f2d(){var _0x598806=['6225caKRKC','11980BDVICF','4NfbFOk','3065612TpTPrF','409552QxtEQe','1018497rZFxgp','90eqcCuP','396662GjkEAV','44oKVofD','870xwMUAQ','280350pEzNIk'];a97_0x1f2d=function(){return _0x598806;};return a97_0x1f2d();}function a97_0x1e51(_0x140b54,_0x739747){_0x140b54=_0x140b54-0xa5;var _0x1f2dbd=a97_0x1f2d();var _0x1e51cd=_0x1f2dbd[_0x140b54];return _0x1e51cd;}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const VERSION = "2.1.
|
|
2
|
-
export declare const GIT_TAG = "v2.1.
|
|
3
|
-
export declare const GIT_COMMIT = "
|
|
4
|
-
export declare const BUILD_TIME = "2026-08-
|
|
1
|
+
export declare const VERSION = "2.1.23-beta.1";
|
|
2
|
+
export declare const GIT_TAG = "v2.1.23-beta.1";
|
|
3
|
+
export declare const GIT_COMMIT = "b067200";
|
|
4
|
+
export declare const BUILD_TIME = "2026-08-06T16:11:51.308Z";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a98_0x10e69f=a98_0x1672;(function(_0x4cd757,_0x56b22a){const _0x3fe076=a98_0x1672,_0x3894ac=_0x4cd757();while(!![]){try{const _0x5e9804=-parseInt(_0x3fe076(0x1a0))/0x1*(parseInt(_0x3fe076(0x1a4))/0x2)+parseInt(_0x3fe076(0x1ae))/0x3*(-parseInt(_0x3fe076(0x1a6))/0x4)+parseInt(_0x3fe076(0x1a2))/0x5*(parseInt(_0x3fe076(0x1ad))/0x6)+-parseInt(_0x3fe076(0x1ab))/0x7*(-parseInt(_0x3fe076(0x1a1))/0x8)+-parseInt(_0x3fe076(0x1a5))/0x9+parseInt(_0x3fe076(0x1ac))/0xa*(parseInt(_0x3fe076(0x1aa))/0xb)+parseInt(_0x3fe076(0x1a8))/0xc;if(_0x5e9804===_0x56b22a)break;else _0x3894ac['push'](_0x3894ac['shift']());}catch(_0xe8497b){_0x3894ac['push'](_0x3894ac['shift']());}}}(a98_0x4ba7,0xa8d41));export const VERSION='2.1.23-beta.1';function a98_0x4ba7(){const _0x1cfa3c=['2026-08-06T16:11:51.308Z','144ggAqru','5657094OCFImD','236GKIeAB','b067200','16696128TbkeiN','v2.1.23-beta.1','3693327pmnveZ','329obZOWO','30lEkgEc','168sCxyRY','63417ojsntg','8412Pjejnh','67800zLRdNv','67145Kyxvqy'];a98_0x4ba7=function(){return _0x1cfa3c;};return a98_0x4ba7();}export const GIT_TAG=a98_0x10e69f(0x1a9);export const GIT_COMMIT=a98_0x10e69f(0x1a7);function a98_0x1672(_0x3242f7,_0x23c111){_0x3242f7=_0x3242f7-0x1a0;const _0x4ba700=a98_0x4ba7();let _0x16722e=_0x4ba700[_0x3242f7];return _0x16722e;}export const BUILD_TIME=a98_0x10e69f(0x1a3);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15b154,_0x75a95a){const _0x35d79a=a99_0x2854,_0x5651ff=_0x15b154();while(!![]){try{const _0x4ab586=parseInt(_0x35d79a(0x1c6))/0x1+parseInt(_0x35d79a(0x1c5))/0x2*(parseInt(_0x35d79a(0x1c4))/0x3)+-parseInt(_0x35d79a(0x1c7))/0x4*(-parseInt(_0x35d79a(0x1cb))/0x5)+-parseInt(_0x35d79a(0x1bf))/0x6+-parseInt(_0x35d79a(0x1c8))/0x7+parseInt(_0x35d79a(0x1c2))/0x8*(parseInt(_0x35d79a(0x1c0))/0x9)+parseInt(_0x35d79a(0x1bd))/0xa;if(_0x4ab586===_0x75a95a)break;else _0x5651ff['push'](_0x5651ff['shift']());}catch(_0x318ffe){_0x5651ff['push'](_0x5651ff['shift']());}}}(a99_0xbf4b,0x46b75));function a99_0xbf4b(){const _0x3ba4d7=['4uSzqKC','2787092ubsgYz','\x20--help','column','398535NCmLyp','3434030ArKpGr','\x20to\x20view\x20available\x20commands.','2440296WtVbLZ','503073DWzBbz','green','72ooUfwb','\x20\x20Use\x20','111JCmYoX','794icLtem','153653IujLqG'];a99_0xbf4b=function(){return _0x3ba4d7;};return a99_0xbf4b();}import{jsx as a99_0x3f7362,jsxs as a99_0x28dbef}from'react/jsx-runtime';import{useEffect}from'react';function a99_0x2854(_0x4cd30f,_0x37df0b){_0x4cd30f=_0x4cd30f-0x1bd;const _0xbf4b74=a99_0xbf4b();let _0x285451=_0xbf4b74[_0x4cd30f];return _0x285451;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x2a1495=a99_0x2854,{exit:_0x1c95bf}=useApp();return useEffect(()=>{_0x1c95bf();},[_0x1c95bf]),a99_0x28dbef(Box,{'flexDirection':_0x2a1495(0x1ca),'marginTop':0x1,'marginBottom':0x1,'children':[a99_0x3f7362(Box,{'children':a99_0x3f7362(Text,{'bold':!![],'color':_0x2a1495(0x1c1),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a99_0x28dbef(Box,{'marginTop':0x1,'children':[a99_0x3f7362(Text,{'dimColor':!![],'children':_0x2a1495(0x1c3)}),a99_0x3f7362(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x2a1495(0x1c9)}),a99_0x3f7362(Text,{'dimColor':!![],'children':_0x2a1495(0x1be)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x38424a,_0x2f6349){const _0x19d89a=a100_0x4024,_0x12654b=_0x38424a();while(!![]){try{const _0x2260b3=-parseInt(_0x19d89a(0x85))/0x1*(-parseInt(_0x19d89a(0x84))/0x2)+parseInt(_0x19d89a(0x7f))/0x3*(-parseInt(_0x19d89a(0x8b))/0x4)+parseInt(_0x19d89a(0x82))/0x5+-parseInt(_0x19d89a(0x87))/0x6+-parseInt(_0x19d89a(0x89))/0x7+parseInt(_0x19d89a(0x86))/0x8+-parseInt(_0x19d89a(0x83))/0x9;if(_0x2260b3===_0x2f6349)break;else _0x12654b['push'](_0x12654b['shift']());}catch(_0x1088cb){_0x12654b['push'](_0x12654b['shift']());}}}(a100_0x1107,0xc5c50));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x1880ab,_0x335052,_0x131a9d){const _0x1a4c50=normalizeText(_0x1880ab['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x3c26dc=normalizeText(_0x1880ab['description'],DESCRIPTION_MAX_LENGTH);return{'operation':_0x335052,'risk':requireWriteRisk(_0x1880ab),'description':_0x1a4c50||_0x3c26dc||'执行该写入操作',..._0x131a9d?{'signal':_0x131a9d}:{}};}function requireWriteRisk(_0x2c3e91){const _0x48398e=a100_0x4024;if(_0x2c3e91['risk']===_0x48398e(0x7d)||_0x2c3e91[_0x48398e(0x7e)]===_0x48398e(0x8a))return _0x2c3e91[_0x48398e(0x7e)];throw new Error('Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.');}function a100_0x1107(){const _0x201c00=['98JMvXZn','7775rsnpSk','12297064gblTEn','4023726qeCXUv','trim','9071909KMcoWB','high-risk-write','2072fNfhRr','write','risk','1086iyFmDw','slice','replace','6859030yLBggn','2931534nzRGMp'];a100_0x1107=function(){return _0x201c00;};return a100_0x1107();}function a100_0x4024(_0x43b364,_0x35bb65){_0x43b364=_0x43b364-0x7d;const _0x11073d=a100_0x1107();let _0x4024e8=_0x11073d[_0x43b364];return _0x4024e8;}function normalizeText(_0x48d84b,_0xb2078e){const _0x5163d7=a100_0x4024;if(typeof _0x48d84b!=='string')return'';return _0x48d84b[_0x5163d7(0x81)](/[\u0000-\u001f\u007f]+/g,'\x20')['replace'](/\s+/g,'\x20')[_0x5163d7(0x88)]()[_0x5163d7(0x80)](0x0,_0xb2078e);}
|
package/lib/runtime/event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40f366,_0x217183){const _0x1eed80=a101_0x2f81,_0x3e4ec6=_0x40f366();while(!![]){try{const _0x4b48a6=parseInt(_0x1eed80(0x1a3))/0x1*(parseInt(_0x1eed80(0x196))/0x2)+-parseInt(_0x1eed80(0x1a0))/0x3*(-parseInt(_0x1eed80(0x1a2))/0x4)+parseInt(_0x1eed80(0x198))/0x5*(parseInt(_0x1eed80(0x191))/0x6)+-parseInt(_0x1eed80(0x1a1))/0x7*(parseInt(_0x1eed80(0x19d))/0x8)+-parseInt(_0x1eed80(0x199))/0x9*(-parseInt(_0x1eed80(0x19f))/0xa)+-parseInt(_0x1eed80(0x19a))/0xb*(-parseInt(_0x1eed80(0x195))/0xc)+-parseInt(_0x1eed80(0x1a4))/0xd;if(_0x4b48a6===_0x217183)break;else _0x3e4ec6['push'](_0x3e4ec6['shift']());}catch(_0x4a2a26){_0x3e4ec6['push'](_0x3e4ec6['shift']());}}}(a101_0x5e6a,0xe53c0));function a101_0x2f81(_0x195e55,_0x500366){_0x195e55=_0x195e55-0x191;const _0x5e6afd=a101_0x5e6a();let _0x2f812f=_0x5e6afd[_0x195e55];return _0x2f812f;}function a101_0x5e6a(){const _0x1f747a=['46720FrKkit','2730GKBtLA','3036551QoYdjG','5724wNhNLY','42myqaSm','47840416mfDjtI','48nOcIjS','filter','join','writeEventSubject','12CEOcbj','61726TnoDUo','command','1117255bUqCgo','18DlXTwf','7230971BelSNu','trim','risk','8uMOQsJ','lovrabet.write.completed'];a101_0x5e6a=function(){return _0x1f747a;};return a101_0x5e6a();}export function canonicalLovrabetOperation(_0x2a4e84){const _0x27dcff=a101_0x2f81;return[_0x2a4e84['service'],..._0x2a4e84[_0x27dcff(0x197)][_0x27dcff(0x19b)]()['split'](/\s+/)][_0x27dcff(0x192)](Boolean)[_0x27dcff(0x193)]('.');}export function createLovrabetWriteMetadata(_0x45bda7,_0x4ee3d2,_0x2bf51b,_0x319610){const _0x2646f1=a101_0x2f81;if(_0x319610||_0x2bf51b['ok']!==!![]||_0x45bda7[_0x2646f1(0x19c)]!=='write'&&_0x45bda7['risk']!=='high-risk-write')return undefined;const _0x582f7e=_0x45bda7[_0x2646f1(0x194)]?.(_0x2bf51b),_0x5973d1={'type':_0x2646f1(0x19e),'operation':_0x4ee3d2,'risk':_0x45bda7[_0x2646f1(0x19c)],..._0x582f7e?{'subject':_0x582f7e}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x5973d1}};}
|
package/lib/runtime/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export type { InvokeLovrabetOptions, InvokeLovrabetResult, LovrabetConfirmationA
|
|
|
8
8
|
* 通过与终端 CLI 相同的 registry 和 runner 执行一组 Lovrabet argv。
|
|
9
9
|
*
|
|
10
10
|
* write 命令在副作用发生前调用确认适配器;成功后返回可供 OpenCode 持久化的 metadata。
|
|
11
|
-
*
|
|
11
|
+
* 人工确认不占用进程级执行队列,只有依赖共享认证和 SDK 状态的执行阶段才会串行。
|
|
12
12
|
*/
|
|
13
13
|
export declare function invokeLovrabet(argv: readonly string[], options: InvokeLovrabetOptions): Promise<InvokeLovrabetResult>;
|
package/lib/runtime/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56a682,_0x32be54){const _0x3c6020=a102_0x1d12,_0x5773bc=_0x56a682();while(!![]){try{const _0x13e1eb=parseInt(_0x3c6020(0x12c))/0x1*(parseInt(_0x3c6020(0x12a))/0x2)+-parseInt(_0x3c6020(0x137))/0x3*(parseInt(_0x3c6020(0x128))/0x4)+-parseInt(_0x3c6020(0x125))/0x5+parseInt(_0x3c6020(0x145))/0x6+-parseInt(_0x3c6020(0x138))/0x7+-parseInt(_0x3c6020(0x135))/0x8*(parseInt(_0x3c6020(0x13f))/0x9)+-parseInt(_0x3c6020(0x130))/0xa*(-parseInt(_0x3c6020(0x144))/0xb);if(_0x13e1eb===_0x32be54)break;else _0x5773bc['push'](_0x5773bc['shift']());}catch(_0x932069){_0x5773bc['push'](_0x5773bc['shift']());}}}(a102_0x2ff2,0x73958));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a102_0x2ff2(){const _0x1d2a43=['execute','1fMsTpp','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','signal','aborted','3014050uHDYPy','stringify','risk','riskLevel','message','864UZwtIA','high-risk-write','3uqMKJX','5480125QmJiFB','dryRun','command','write','confirm','rawFlags','data','30474FINUWh','definition','confirmation','format','dry-run','33TONbKi','1428300Sbihye','args','reason','result','1067700djhBoT','present','isNonInteractive','911936CBtutO','yes','1842508UzeRvS'];a102_0x2ff2=function(){return _0x1d2a43;};return a102_0x2ff2();}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';function a102_0x1d12(_0x55c0be,_0x906e52){_0x55c0be=_0x55c0be-0x122;const _0x2ff214=a102_0x2ff2();let _0x1d1238=_0x2ff214[_0x55c0be];return _0x1d1238;}import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x17345d,command:_0x4491df,risk:_0x123422,dryRun:_0x835424}){const _0x185487=a102_0x1d12;return JSON[_0x185487(0x131)]({'ok':_0x17345d['ok'],'command':_0x4491df,'risk':_0x123422,..._0x835424?{'dryRun':!![]}:{},..._0x17345d[_0x185487(0x13e)]!==undefined?{'data':_0x17345d[_0x185487(0x13e)]}:{},..._0x17345d[_0x185487(0x134)]?{'message':_0x17345d[_0x185487(0x134)]}:{}});}};export async function invokeLovrabet(_0x3a10c4,_0x3daf34){const _0x55acf1=a102_0x1d12;throwIfAborted(_0x3daf34[_0x55acf1(0x12e)]);const _0x1a144c=await resolveLovrabetInvocation(_0x3a10c4),_0x18e032=canonicalLovrabetOperation(_0x1a144c[_0x55acf1(0x140)]);return await confirmWriteBeforeQueue(_0x1a144c[_0x55acf1(0x140)],_0x1a144c[_0x55acf1(0x13d)],_0x18e032,_0x3daf34),runSerialized(async()=>{const _0x37b26f=_0x55acf1;throwIfAborted(_0x3daf34['signal']);const _0x124e4e={},_0x2acdb6=buildConfigFromFlags(_0x1a144c[_0x37b26f(0x13d)]);await initGlobalEnvironment(_0x2acdb6);const _0x2a7964=createPipelineEnv(_0x2acdb6,{..._0x1a144c[_0x37b26f(0x13d)],'yes':_0x1a144c['definition'][_0x37b26f(0x132)]===_0x37b26f(0x136)?!![]:_0x1a144c[_0x37b26f(0x13d)][_0x37b26f(0x129)],'nonInteractive':!![]});_0x2a7964['args']=_0x1a144c[_0x37b26f(0x122)],_0x2a7964[_0x37b26f(0x127)]=!![],_0x2a7964[_0x37b26f(0x133)]='high-risk-write';const _0xdb391=withAbortSignal(_0x1a144c[_0x37b26f(0x140)],_0x3daf34['signal']),_0x75f369=createLovrabetRunnerAdapter({'formatOutput'(_0x3c27a4,_0x806e1a){const _0x3553de=_0x37b26f;_0x124e4e['result']=_0x3c27a4,_0x124e4e[_0x3553de(0x13a)]=_0x806e1a[_0x3553de(0x13a)],_0x124e4e[_0x3553de(0x132)]=_0x806e1a[_0x3553de(0x132)],_0x124e4e[_0x3553de(0x142)]=_0x806e1a[_0x3553de(0x142)],_0x124e4e[_0x3553de(0x139)]=_0x806e1a[_0x3553de(0x139)]===!![];},async 'confirmHighRisk'(){throw new Error('Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.');}});try{await runCommand(_0xdb391,_0x2a7964,_0x75f369);if(!_0x124e4e['result']||!_0x124e4e['command']||!_0x124e4e[_0x37b26f(0x132)]||!_0x124e4e[_0x37b26f(0x142)])throw new Error(_0x37b26f(0x12d));const _0x82ae49=_0x3daf34['presentation']??defaultPresentation,_0x524362=_0x124e4e[_0x37b26f(0x139)]===!![],_0xee80c7={'result':_0x124e4e[_0x37b26f(0x124)],'command':_0x124e4e[_0x37b26f(0x13a)],'operation':_0x18e032,'risk':_0x124e4e[_0x37b26f(0x132)],'format':_0x124e4e[_0x37b26f(0x142)],'dryRun':_0x524362},_0x4b2ac5=createLovrabetWriteMetadata(_0x1a144c[_0x37b26f(0x140)],_0x18e032,_0x124e4e['result'],_0x524362);let _0x4ea2af;try{_0x4ea2af=await _0x82ae49[_0x37b26f(0x126)](_0xee80c7);}catch(_0x21f1d1){if(!_0x4b2ac5||_0x82ae49===defaultPresentation)throw _0x21f1d1;_0x4ea2af=await defaultPresentation['present'](_0xee80c7);}return{'operation':_0x18e032,'risk':_0x124e4e['risk'],'mode':_0x524362?_0x37b26f(0x143):'execute','result':_0x124e4e[_0x37b26f(0x124)],'output':_0x4ea2af,..._0x4b2ac5?{'metadata':_0x4b2ac5}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x469511,_0x1d029f,_0x387d92,_0x5e993b){const _0x52483b=a102_0x1d12;if(_0x1d029f[_0x52483b(0x139)]===!![]||_0x469511[_0x52483b(0x132)]!==_0x52483b(0x13b)&&_0x469511['risk']!==_0x52483b(0x136))return;await _0x5e993b[_0x52483b(0x141)][_0x52483b(0x13c)](buildLovrabetConfirmationRequest(_0x469511,_0x387d92,_0x5e993b[_0x52483b(0x12e)]));}function withAbortSignal(_0x432d5c,_0x23b985){return{..._0x432d5c,async 'execute'(_0x3e4d12){const _0x3be170=a102_0x1d12;return throwIfAborted(_0x23b985),_0x432d5c[_0x3be170(0x12b)](_0x3e4d12);}};}function throwIfAborted(_0x2c03a2){const _0x286c0f=a102_0x1d12;if(_0x2c03a2?.[_0x286c0f(0x12f)])throw _0x2c03a2['reason']instanceof Error?_0x2c03a2[_0x286c0f(0x123)]:new DOMException('Lovrabet\x20invocation\x20aborted.','AbortError');}
|
package/lib/runtime/queue.d.ts
CHANGED
package/lib/runtime/queue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0x319c62=a103_0x29a8;(function(_0x12d4d7,_0x7ed287){const _0x282002=a103_0x29a8,_0x2f9d70=_0x12d4d7();while(!![]){try{const _0x13f096=parseInt(_0x282002(0x1a1))/0x1*(parseInt(_0x282002(0x1a7))/0x2)+parseInt(_0x282002(0x1ab))/0x3+parseInt(_0x282002(0x1a8))/0x4*(parseInt(_0x282002(0x1a6))/0x5)+-parseInt(_0x282002(0x1a5))/0x6+-parseInt(_0x282002(0x1aa))/0x7+-parseInt(_0x282002(0x1a4))/0x8+-parseInt(_0x282002(0x1a9))/0x9*(parseInt(_0x282002(0x1a2))/0xa);if(_0x13f096===_0x7ed287)break;else _0x2f9d70['push'](_0x2f9d70['shift']());}catch(_0x53d5b4){_0x2f9d70['push'](_0x2f9d70['shift']());}}}(a103_0x1f53,0xc8843));function a103_0x29a8(_0x2b36cb,_0x3ac12d){_0x2b36cb=_0x2b36cb-0x1a1;const _0x1f53f1=a103_0x1f53();let _0x29a87e=_0x1f53f1[_0x2b36cb];return _0x29a87e;}let tail=Promise[a103_0x319c62(0x1ac)]();function a103_0x1f53(){const _0x418f4f=['2947338ffXAtd','1123295ktbCOk','2CeOwWW','28xBBXyV','34929cTUNqH','265055lVcZjd','2036949MdGZwF','resolve','428529OkGVua','2570jntpaw','catch','2658440rPNCMJ'];a103_0x1f53=function(){return _0x418f4f;};return a103_0x1f53();}export async function runSerialized(_0x2bb630){const _0x35010a=a103_0x319c62,_0x3b4de5=tail;let _0x352fb2;tail=new Promise(_0x449150=>{_0x352fb2=_0x449150;}),await _0x3b4de5[_0x35010a(0x1a3)](()=>undefined);try{return await _0x2bb630();}finally{_0x352fb2();}}
|
package/lib/runtime/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a104_0x1072(_0x23f6d5,_0x3bd688){_0x23f6d5=_0x23f6d5-0xba;const _0x2c146d=a104_0x2c14();let _0x1072e4=_0x2c146d[_0x23f6d5];return _0x1072e4;}(function(_0xf482b5,_0x2916aa){const _0x3c2727=a104_0x1072,_0x4da6d2=_0xf482b5();while(!![]){try{const _0x4f0f93=parseInt(_0x3c2727(0xc3))/0x1*(parseInt(_0x3c2727(0xc7))/0x2)+-parseInt(_0x3c2727(0xba))/0x3*(parseInt(_0x3c2727(0xc6))/0x4)+parseInt(_0x3c2727(0xc1))/0x5+-parseInt(_0x3c2727(0xcf))/0x6+-parseInt(_0x3c2727(0xcb))/0x7*(parseInt(_0x3c2727(0xc8))/0x8)+parseInt(_0x3c2727(0xc0))/0x9+parseInt(_0x3c2727(0xca))/0xa*(-parseInt(_0x3c2727(0xc2))/0xb);if(_0x4f0f93===_0x2916aa)break;else _0x4da6d2['push'](_0x4da6d2['shift']());}catch(_0x3ac14c){_0x4da6d2['push'](_0x4da6d2['shift']());}}}(a104_0x2c14,0x244a3));import a104_0x4ca695 from'meow';import{findDefinition,getServiceEntry,isKnownService}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a104_0x2c14(){const _0x2c94a4=['validation','103548FFKiTh','50854aFURyj','104MBsOIF','flags','2650cpXYOB','63525XbVBBw','slice','assign','flatMap','747180edaslY','6zbgIVS','definition','../commands/registry.js','input','unknownCommand','join','2263194SsZCAk','811660qkJINH','902puCXbx','2YSTKXc','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.'];a104_0x2c14=function(){return _0x2c94a4;};return a104_0x2c14();}export async function resolveLovrabetInvocation(_0x40ea96){const _0x475c0f=a104_0x1072,_0x506cec=a104_0x4ca695('',{'importMeta':import.meta,'argv':_0x40ea96,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x12086d=[..._0x506cec[_0x475c0f(0xbd)]],_0x53c59a=_0x506cec[_0x475c0f(0xc9)];await correctFlags(_0x53c59a);const _0x41c887=_0x12086d[0x0];if(!_0x41c887)throw CliErrors[_0x475c0f(0xc5)](_0x475c0f(0xc4));if(!isKnownService(_0x41c887)){const _0x16b9c2=resolveDynamicServiceCommand(_0x12086d,_0x53c59a);if(!_0x16b9c2)throw CliErrors['unknownCommand'](_0x12086d[_0x475c0f(0xbf)]('\x20'));return Object[_0x475c0f(0xcd)](_0x53c59a,_0x16b9c2[_0x475c0f(0xc9)]),{'definition':_0x16b9c2[_0x475c0f(0xbb)],'rawFlags':_0x53c59a,'args':_0x16b9c2['args']};}const _0x3c8fc1=getServiceEntry(_0x41c887),_0x276910=_0x12086d[0x1]||_0x3c8fc1['defaultCommand'];if(!_0x276910)throw CliErrors[_0x475c0f(0xc5)]('Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'+_0x41c887+'\x22.');const _0x4fa35f=findDefinition(_0x41c887,_0x276910);if(!_0x4fa35f)throw CliErrors[_0x475c0f(0xbe)](_0x41c887+'\x20'+_0x276910);return{'definition':_0x4fa35f,'rawFlags':_0x53c59a,'args':_0x12086d[_0x475c0f(0xcc)](0x2)};}async function correctFlags(_0x5c519d){const _0x57b067=a104_0x1072;try{const {correctFlags:_0x11f4a5}=await import('../framework/preparse.js'),{getAllDefinitions:_0x131291}=await import(_0x57b067(0xbc)),_0x372537=_0x131291()[_0x57b067(0xce)](_0x426ec=>_0x426ec[_0x57b067(0xc9)]??[]),_0x423ab4=_0x11f4a5(_0x5c519d,_0x372537);Object[_0x57b067(0xcd)](_0x5c519d,_0x423ab4['flags']);}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a106_0x544445=a106_0x3795;(function(_0x1e4f6a,_0x1dd7bf){const _0x2d55a9=a106_0x3795,_0x2263a5=_0x1e4f6a();while(!![]){try{const _0x9279f4=parseInt(_0x2d55a9(0x15b))/0x1*(-parseInt(_0x2d55a9(0x15a))/0x2)+-parseInt(_0x2d55a9(0x157))/0x3*(parseInt(_0x2d55a9(0x153))/0x4)+parseInt(_0x2d55a9(0x152))/0x5*(-parseInt(_0x2d55a9(0x14b))/0x6)+-parseInt(_0x2d55a9(0x158))/0x7+-parseInt(_0x2d55a9(0x150))/0x8*(-parseInt(_0x2d55a9(0x148))/0x9)+parseInt(_0x2d55a9(0x14c))/0xa+parseInt(_0x2d55a9(0x147))/0xb;if(_0x9279f4===_0x1dd7bf)break;else _0x2263a5['push'](_0x2263a5['shift']());}catch(_0x25d9fa){_0x2263a5['push'](_0x2263a5['shift']());}}}(a106_0x1bd1,0x32476));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a106_0x3795(_0x10d176,_0x195de0){_0x10d176=_0x10d176-0x147;const _0x1bd117=a106_0x1bd1();let _0x379510=_0x1bd117[_0x10d176];return _0x379510;}function a106_0x1bd1(){const _0xc3bfa1=['stdout','8izObEU','trim','10unVBWt','2452VVDeNq','log','unknown','stdio','1641orYjJe','1933162IxsjVT','inherit','31578voIpvP','10JoTFPf','toString','7151562qkirVf','262323pkkfjV','npx','skipNpxSkillsEnvSuffix','71964MuWJSA','3200080AgpBXK','add','status'];a106_0x1bd1=function(){return _0xc3bfa1;};return a106_0x1bd1();}import{LOVRABET_SKILL_SOURCE as a106_0x19caf1}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a106_0x19caf1;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a106_0x544445(0x14a)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x4b0bb0,_0x4ad2d5=LOVRABET_SKILL_SOURCE,_0x5a712e){const _0x1680e8=a106_0x544445;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x48a5e2=_0x5a712e?.[_0x1680e8(0x156)]??_0x1680e8(0x159),_0x3d38a0=resolveNpmBin(_0x1680e8(0x149)),_0x138b5f=['skills',_0x1680e8(0x14d),_0x4ad2d5,'-g','-y'],_0x32a1cb=[_0x3d38a0,..._0x138b5f]['join']('\x20');console[_0x1680e8(0x154)]('*\x20'+_0x32a1cb);const _0x4553a7=spawnSync(_0x3d38a0,_0x138b5f,{'cwd':_0x4b0bb0,'stdio':_0x48a5e2,'env':process.env,'shell':![]});if(_0x4553a7['status']===0x0)return{'ok':!![],'status':0x0};let _0x1f68f8='exit\x20'+(_0x4553a7['status']??_0x1680e8(0x155));if(_0x48a5e2==='pipe'){const _0x452313=_0x4553a7['stderr']?_0x4553a7['stderr']['toString']()[_0x1680e8(0x151)]():'',_0x55be07=_0x4553a7[_0x1680e8(0x14f)]?_0x4553a7['stdout'][_0x1680e8(0x15c)]()['trim']():'';if(_0x452313)_0x1f68f8=_0x452313;else{if(_0x55be07)_0x1f68f8=_0x55be07;}}return{'ok':![],'status':_0x4553a7[_0x1680e8(0x14e)]??null,'error':_0x1f68f8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a107_0x1434(){const _0x1475cc=['.turbo','SKILL.md','.git','.DS_Store','610722yusEAA','3044010nrExoE','5631647CiHTiq','node_modules','3371961MutTjK','lovrabet.skill.json','.hg','.cache','6094464cDlJuf','1475836nNizMj','2PIwozA','6VJKMcM','6460900tyDGyj','9wNGiAa'];a107_0x1434=function(){return _0x1475cc;};return a107_0x1434();}const a107_0x5c71a5=a107_0xa20f;(function(_0x2b13ba,_0x11a560){const _0x2421ca=a107_0xa20f,_0x29d796=_0x2b13ba();while(!![]){try{const _0x4c2a56=parseInt(_0x2421ca(0x1ef))/0x1+parseInt(_0x2421ca(0x1e7))/0x2*(-parseInt(_0x2421ca(0x1f3))/0x3)+-parseInt(_0x2421ca(0x1e6))/0x4+parseInt(_0x2421ca(0x1f0))/0x5*(-parseInt(_0x2421ca(0x1e8))/0x6)+parseInt(_0x2421ca(0x1f1))/0x7+parseInt(_0x2421ca(0x1e5))/0x8+-parseInt(_0x2421ca(0x1ea))/0x9*(-parseInt(_0x2421ca(0x1e9))/0xa);if(_0x4c2a56===_0x11a560)break;else _0x29d796['push'](_0x29d796['shift']());}catch(_0x37e0c8){_0x29d796['push'](_0x29d796['shift']());}}}(a107_0x1434,0xb01f1));export const METADATA_FILE=a107_0x5c71a5(0x1f4);export const SKILL_FILE=a107_0x5c71a5(0x1ec);function a107_0xa20f(_0x36e088,_0x5564ca){_0x36e088=_0x36e088-0x1e5;const _0x143499=a107_0x1434();let _0xa20f45=_0x143499[_0x36e088];return _0xa20f45;}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a107_0x5c71a5(0x1ee)]);export const IGNORED_DIR_NAMES=new Set([a107_0x5c71a5(0x1ed),a107_0x5c71a5(0x1f5),'.svn',a107_0x5c71a5(0x1f2),'.next','dist','build','coverage',a107_0x5c71a5(0x1eb),a107_0x5c71a5(0x1f6)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b34c1,_0x1d8832){const _0x4f52dc=a108_0x48fb,_0x26c6df=_0x3b34c1();while(!![]){try{const _0x1e1119=parseInt(_0x4f52dc(0x1e1))/0x1+-parseInt(_0x4f52dc(0x1e9))/0x2+-parseInt(_0x4f52dc(0x1e7))/0x3*(parseInt(_0x4f52dc(0x1ed))/0x4)+parseInt(_0x4f52dc(0x1dc))/0x5*(-parseInt(_0x4f52dc(0x1ee))/0x6)+parseInt(_0x4f52dc(0x1e5))/0x7+parseInt(_0x4f52dc(0x1e2))/0x8*(-parseInt(_0x4f52dc(0x1e0))/0x9)+parseInt(_0x4f52dc(0x1df))/0xa;if(_0x1e1119===_0x1d8832)break;else _0x26c6df['push'](_0x26c6df['shift']());}catch(_0x1a5adb){_0x26c6df['push'](_0x26c6df['shift']());}}}(a108_0x1034,0xb417e));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x58295d,_0x80c5b9){const _0x2edc78=a108_0x48fb,_0x546c79=normalizeSkillRelativePath(_0x80c5b9),_0x3ff635=realOrResolved(_0x58295d),_0x2eb09d=resolve(_0x3ff635,..._0x546c79[_0x2edc78(0x1de)]('/'));if(!isPathInside(_0x2eb09d,_0x3ff635))throw CliErrors[_0x2edc78(0x1ec)](_0x2edc78(0x1ef)+_0x80c5b9);return ensureNoSymlinkInManagedPath(_0x3ff635,_0x546c79),_0x2eb09d;}function a108_0x1034(){const _0x50e6f7=['utf8','6100052gTUFFs','endsWith','636iXEgsV','stringify','1987684czaKbB','from','isSymbolicLink','validation','13780iwPfoG','6UhpzXh','Unsafe\x20Skill\x20file\x20path:\x20','5431475waypAK','startsWith','split','25342880zWeqcB','10455228geAIfM','1304107jSBEem','8upSJgs','.tmp'];a108_0x1034=function(){return _0x50e6f7;};return a108_0x1034();}function a108_0x48fb(_0x24d575,_0x168679){_0x24d575=_0x24d575-0x1dc;const _0x1034ed=a108_0x1034();let _0x48fb10=_0x1034ed[_0x24d575];return _0x48fb10;}export function ensureNoSymlinkInManagedPath(_0xa82c6a,_0x215d8d){const _0x2d07a5=a108_0x48fb;let _0x696630=_0xa82c6a;for(const _0x2a209f of _0x215d8d[_0x2d07a5(0x1de)]('/')){_0x696630=resolve(_0x696630,_0x2a209f);const _0x2c5238=lstatIfPresent(_0x696630);if(_0x2c5238?.[_0x2d07a5(0x1eb)]())throw CliErrors[_0x2d07a5(0x1ec)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x215d8d);}}export function isDanglingSymlink(_0x2e2980){try{return lstatSync(_0x2e2980)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x501c78){const _0x32c643=readlinkSync(_0x501c78);return isAbsolute(_0x32c643)?_0x32c643:resolve(dirname(_0x501c78),_0x32c643);}export function isPathInside(_0x8e9735,_0x1b1997){const _0x1dcbc4=a108_0x48fb,_0x421902=_0x8e9735[_0x1dcbc4(0x1e6)](sep)?_0x8e9735:''+_0x8e9735+sep,_0x3b8161=_0x1b1997['endsWith'](sep)?_0x1b1997:''+_0x1b1997+sep;return _0x8e9735===_0x1b1997||_0x421902[_0x1dcbc4(0x1dd)](_0x3b8161);}export function realOrResolved(_0x8f00ec){try{return realpathSync(_0x8f00ec);}catch{return resolve(_0x8f00ec);}}export function lstatIfPresent(_0x513047){try{return lstatSync(_0x513047);}catch{return undefined;}}export function writeTextAtomic(_0x32b391,_0x40d0f7,_0xe9d895){const _0x3bb3b6=a108_0x48fb;writeBytesAtomic(_0x32b391,Buffer[_0x3bb3b6(0x1ea)](_0x40d0f7,_0x3bb3b6(0x1e4)),_0xe9d895);}export function writeBytesAtomic(_0x22294b,_0x39026b,_0x509445){const _0x438460=a108_0x48fb,_0x5ecabb=_0x22294b+_0x438460(0x1e3);try{writeFileSync(_0x5ecabb,_0x39026b,{'mode':_0x509445}),renameSync(_0x5ecabb,_0x22294b);}catch(_0x116347){try{rmSync(_0x5ecabb,{'force':!![]});}catch{}throw _0x116347;}}export function writeJsonAtomic(_0x32bdbc,_0x3450ed){const _0x2594b2=a108_0x48fb;writeTextAtomic(_0x32bdbc,JSON[_0x2594b2(0x1e8)](_0x3450ed,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22443d,_0x1a3984){const _0xd434ea=a109_0x5a5b,_0x26f09c=_0x22443d();while(!![]){try{const _0x42f5ab=-parseInt(_0xd434ea(0x1ad))/0x1*(parseInt(_0xd434ea(0x1b3))/0x2)+-parseInt(_0xd434ea(0x1ba))/0x3*(-parseInt(_0xd434ea(0x1b0))/0x4)+parseInt(_0xd434ea(0x1b2))/0x5+-parseInt(_0xd434ea(0x1b4))/0x6*(parseInt(_0xd434ea(0x1bb))/0x7)+-parseInt(_0xd434ea(0x1b9))/0x8*(parseInt(_0xd434ea(0x1b7))/0x9)+-parseInt(_0xd434ea(0x1bd))/0xa+-parseInt(_0xd434ea(0x1af))/0xb*(-parseInt(_0xd434ea(0x1b5))/0xc);if(_0x42f5ab===_0x1a3984)break;else _0x26f09c['push'](_0x26f09c['shift']());}catch(_0x49d831){_0x26f09c['push'](_0x26f09c['shift']());}}}(a109_0x42e5,0xf1d21));function a109_0x5a5b(_0x336afc,_0x548bca){_0x336afc=_0x336afc-0x1ad;const _0x42e598=a109_0x42e5();let _0x5a5bf3=_0x42e598[_0x336afc];return _0x5a5bf3;}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x5dc10d){const _0x4bbb2f=a109_0x5a5b;return createHash(_0x4bbb2f(0x1b6))[_0x4bbb2f(0x1b8)](_0x5dc10d)[_0x4bbb2f(0x1bc)](_0x4bbb2f(0x1ae));}export function fileHash(_0x31fdcf){return bufferSha256(fileContent(_0x31fdcf));}export function bufferSha256(_0x9bd059){const _0x5dc94f=a109_0x5a5b;return createHash(_0x5dc94f(0x1b6))[_0x5dc94f(0x1b8)](_0x9bd059)['digest']('hex');}function a109_0x42e5(){const _0x3ae7ab=['454932JxZFGQ','update','152obAhDN','10623WWCfum','32837qbqhck','digest','199430WrowHV','20927CKSWAd','hex','35871zvevSs','1288CipWsc','path','2533075fzIafL','2xHvRUJ','906fSiPts','3876ejFRkN','sha256'];a109_0x42e5=function(){return _0x3ae7ab;};return a109_0x42e5();}export function fileTreeHash(_0x363591){const _0x3add7e=a109_0x5a5b,_0x57be6e=createHash(_0x3add7e(0x1b6));for(const _0x39080d of normalizeManifestFiles(_0x363591)){_0x57be6e[_0x3add7e(0x1b8)](_0x39080d[_0x3add7e(0x1b1)]),_0x57be6e['update']('\x00'),_0x57be6e['update'](_0x39080d[_0x3add7e(0x1b6)]),_0x57be6e[_0x3add7e(0x1b8)]('\x00'),_0x57be6e[_0x3add7e(0x1b8)](String(_0x39080d['size'])),_0x57be6e[_0x3add7e(0x1b8)]('\x00');}return _0x57be6e[_0x3add7e(0x1bc)](_0x3add7e(0x1ae));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a110_0x39cb(_0xd5b66d,_0x5e5515){_0xd5b66d=_0xd5b66d-0x130;const _0x44a7eb=a110_0x44a7();let _0x39cb8d=_0x44a7eb[_0xd5b66d];return _0x39cb8d;}function a110_0x44a7(){const _0x57dbf7=['128029hsmPRy','freeze','1202AeTzft','14maGFuo','cwd','30HvGtLg','2092528YCbeIC','4046430MtDteD','9trzekR','managedRoot','1140504nYFfIH','project','skills','appCode','1783200gazjza','368410SQbTlh','183pjZXSD','948AvGhVa','global'];a110_0x44a7=function(){return _0x57dbf7;};return a110_0x44a7();}const a110_0x433f99=a110_0x39cb;(function(_0x9e7c80,_0x5ac708){const _0x2472fe=a110_0x39cb,_0x5c2f0e=_0x9e7c80();while(!![]){try{const _0x5e4a34=-parseInt(_0x2472fe(0x134))/0x1*(parseInt(_0x2472fe(0x139))/0x2)+parseInt(_0x2472fe(0x141))/0x3+parseInt(_0x2472fe(0x13d))/0x4+parseInt(_0x2472fe(0x133))/0x5*(-parseInt(_0x2472fe(0x13c))/0x6)+parseInt(_0x2472fe(0x13a))/0x7*(parseInt(_0x2472fe(0x132))/0x8)+parseInt(_0x2472fe(0x13f))/0x9*(parseInt(_0x2472fe(0x13e))/0xa)+parseInt(_0x2472fe(0x137))/0xb*(-parseInt(_0x2472fe(0x135))/0xc);if(_0x5e4a34===_0x5ac708)break;else _0x5c2f0e['push'](_0x5c2f0e['shift']());}catch(_0xd7ac1f){_0x5c2f0e['push'](_0x5c2f0e['shift']());}}}(a110_0x44a7,0x56e1d));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x4a6e86,_0x302627=a110_0x433f99(0x136),_0x907ecc={}){const _0x11afb3=a110_0x433f99,_0x56466b=resolveSkillSyncPaths(_0x907ecc),_0x4e771a=safePathSegment(_0x4a6e86,_0x11afb3(0x131)),_0x403c1e=_0x302627===_0x11afb3(0x142)?[resolve(_0x907ecc[_0x11afb3(0x13b)]??process[_0x11afb3(0x13b)](),'.agents',_0x11afb3(0x130))]:runtimeAgentSkillRoots(_0x56466b);return Object['freeze']({'scope':_0x302627,'appCode':_0x4e771a,'skillRoots':Object[_0x11afb3(0x138)](_0x403c1e),'managedRoot':_0x56466b[_0x11afb3(0x140)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a111_0x4f2c16=a111_0x3a4b;function a111_0x48f1(){const _0xb95e75=['Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','skipped','validation','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','696enRaph','removed','skillCode','631264KPKLkE','trim','metadataPath','3044328iedShN','appCode','isDirectory','agentsSkillsDir','activeSkillCodes','linked-from-protected-root','lovrabet','project','accessKey','pruneSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skill','protectedLinkRoots','values','external-symlink','metadata-mismatch','4rxRxJn','created','has','dir','isSymbolicLink','unchanged','19736343FffrRk','filter','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','map','push','updated','scopes','name','managedRoot','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','scope','slice','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','runtime-observe','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','contentHash','env','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','1091311yyDXrW','set','2053090ZmfQSp','builtin','personal','length','get','secret-retriever','1653BiXonp','6476130fDKDVo','startsWith'];a111_0x48f1=function(){return _0xb95e75;};return a111_0x48f1();}(function(_0x31b91e,_0x4de220){const _0x5ea6a6=a111_0x3a4b,_0x311963=_0x31b91e();while(!![]){try{const _0x285fa2=parseInt(_0x5ea6a6(0x117))/0x1+parseInt(_0x5ea6a6(0x126))/0x2*(-parseInt(_0x5ea6a6(0x11f))/0x3)+parseInt(_0x5ea6a6(0x13c))/0x4*(parseInt(_0x5ea6a6(0x119))/0x5)+parseInt(_0x5ea6a6(0x120))/0x6+parseInt(_0x5ea6a6(0x12c))/0x7+-parseInt(_0x5ea6a6(0x129))/0x8+-parseInt(_0x5ea6a6(0x142))/0x9;if(_0x285fa2===_0x4de220)break;else _0x311963['push'](_0x311963['shift']());}catch(_0x3bee62){_0x311963['push'](_0x311963['shift']());}}}(a111_0x48f1,0x86e9d));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a111_0x343c5c from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a111_0x3a4b(_0x5dca4e,_0x81ba10){_0x5dca4e=_0x5dca4e-0x106;const _0x48f1e1=a111_0x48f1();let _0x3a4b53=_0x48f1e1[_0x5dca4e];return _0x3a4b53;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a111_0x343c5c,RESERVED_PROJECT_SKILL_CODES=new Set([a111_0x4f2c16(0x132),a111_0x4f2c16(0x112),a111_0x4f2c16(0x11e)]);export function linkEffectiveRuntimeSkills(_0x3e8bfc,_0x3d4631){const _0x156237=a111_0x4f2c16,_0x3eb284=new Map();for(const _0x29d216 of _0x3e8bfc){const _0x3899e5=_0x29d216[_0x156237(0x137)]['skillCode'];if(!_0x3899e5)continue;const _0x146335=_0x3eb284[_0x156237(0x11d)](_0x3899e5);(!_0x146335||_0x29d216[_0x156237(0x10f)]===_0x156237(0x11b))&&_0x3eb284[_0x156237(0x118)](_0x3899e5,_0x29d216);}const _0x593f3f=[];for(const _0x493924 of _0x3eb284[_0x156237(0x139)]()){const _0x6e0653=requireSkillCode(_0x493924['skill']),_0x19e999=readMetadataIfPresent(_0x493924[_0x156237(0x12b)]);if(_0x19e999?.[_0x156237(0x12d)]!==_0x3d4631[_0x156237(0x12d)]||_0x19e999[_0x156237(0x128)]!==_0x6e0653)throw CliErrors[_0x156237(0x124)](_0x156237(0x122)+_0x3d4631[_0x156237(0x12d)]+':\x20'+_0x493924['metadataPath']);const _0x43f7af=runtimeSkillLinkName(_0x3d4631,_0x6e0653);for(const _0x4681a6 of _0x3d4631['skillRoots']){_0x593f3f[_0x156237(0x109)](ensureManagedSymlink(resolve(_0x4681a6,_0x43f7af),_0x493924[_0x156237(0x13f)],_0x3d4631,_0x6e0653));}}return _0x593f3f;}export function pruneStaleRuntimeSkillLinks(_0x451c32,_0x18a321,_0x1d75e4){const _0x261189=a111_0x4f2c16,_0x1dbde2=new Set([..._0x18a321]['map'](_0x46958b=>_0x46958b[_0x261189(0x12a)]())[_0x261189(0x106)](Boolean)),_0x23d163=_0x1d75e4?new Set([..._0x1d75e4]['map'](_0x39c5f7=>_0x39c5f7[_0x261189(0x12a)]())[_0x261189(0x106)](Boolean)):undefined,_0x5a9b0e=[];for(const _0x1dd6e0 of _0x451c32['skillRoots']){for(const _0x1a3a52 of managedTargetSkillLinkPaths(_0x1dd6e0,_0x451c32)){const _0x2011dd=runtimeSkillCodeFromLink(_0x451c32,_0x1a3a52);if(_0x23d163&&!_0x23d163[_0x261189(0x13e)](_0x2011dd))continue;if(_0x1dbde2[_0x261189(0x13e)](_0x2011dd))continue;_0x5a9b0e[_0x261189(0x109)](removeManagedSkillLink(_0x1a3a52,_0x451c32,_0x2011dd));}}return _0x5a9b0e;}export function pruneStaleRuntimeSkillCache(_0x172a34,_0x270dd3={}){const _0x4f94e7=a111_0x4f2c16,_0x7bf64d=new Set([..._0x172a34[_0x4f94e7(0x130)]][_0x4f94e7(0x108)](_0x3d2b5d=>_0x3d2b5d['trim']())[_0x4f94e7(0x106)](Boolean)),_0x170450=_0x172a34['pruneSkillCodes']?new Set([..._0x172a34[_0x4f94e7(0x135)]][_0x4f94e7(0x108)](_0x16d7fa=>_0x16d7fa[_0x4f94e7(0x12a)]())[_0x4f94e7(0x106)](Boolean)):undefined,_0x2fc0b9=_0x172a34[_0x4f94e7(0x10b)]??['personal','company'],_0x16136b=resolve(getRuntimeSkillCacheRoot(_0x172a34[_0x4f94e7(0x115)],_0x172a34[_0x4f94e7(0x134)],_0x270dd3),safePathSegment(_0x172a34['appCode'],_0x4f94e7(0x12d))),_0x523a9c=[];for(const _0x2e3e19 of _0x2fc0b9){const _0x414b2b=resolve(_0x16136b,_0x2e3e19);if(!existsSync(_0x414b2b))continue;for(const _0x512ae1 of readdirSync(_0x414b2b,{'withFileTypes':!![]})){if(!_0x512ae1[_0x4f94e7(0x12e)]())continue;const _0x12ec24=_0x512ae1['name'];if(_0x170450&&!_0x170450['has'](_0x12ec24))continue;if(_0x7bf64d[_0x4f94e7(0x13e)](_0x12ec24))continue;const _0x29a443=resolve(_0x414b2b,_0x12ec24),_0x58ddaa=readMetadataIfPresent(resolve(_0x29a443,METADATA_FILE));if(_0x58ddaa?.[_0x4f94e7(0x12d)]!==_0x172a34[_0x4f94e7(0x12d)]||_0x58ddaa['scope']!==_0x2e3e19||_0x58ddaa[_0x4f94e7(0x128)]!==_0x12ec24){_0x523a9c[_0x4f94e7(0x109)]({'path':_0x29a443,'action':_0x4f94e7(0x123),'reason':_0x4f94e7(0x13b)});continue;}if(isLinkedFromAnyRoot(_0x29a443,_0x172a34[_0x4f94e7(0x138)]??[])){_0x523a9c[_0x4f94e7(0x109)]({'path':_0x29a443,'action':_0x4f94e7(0x123),'reason':_0x4f94e7(0x131)});continue;}removeSync(_0x29a443),_0x523a9c[_0x4f94e7(0x109)]({'path':_0x29a443,'action':'removed'});}}return _0x523a9c;}export function linkGlobalRuntimeSkills(_0x30fd7b,_0x5db20d={}){const _0x1f352b=a111_0x4f2c16,_0x1ad368=resolveSkillSyncPaths(_0x5db20d),_0x15ba60=[];for(const _0x2a56f7 of _0x30fd7b){if(_0x2a56f7[_0x1f352b(0x10f)]!=='builtin')throw CliErrors[_0x1f352b(0x124)](_0x1f352b(0x116)+_0x2a56f7[_0x1f352b(0x10f)]);const _0xf842e3=requireSkillCode(_0x2a56f7[_0x1f352b(0x137)]),_0x16744a=copyManagedSkillDirectory(_0x2a56f7[_0x1f352b(0x13f)],resolve(_0x1ad368[_0x1f352b(0x12f)],_0xf842e3));_0x15ba60[_0x1f352b(0x109)]({..._0x16744a,'contentHash':_0x2a56f7[_0x1f352b(0x114)]});}return _0x15ba60;}function ensureManagedSymlink(_0x37bdd1,_0x566ac0,_0x695322,_0x1eb911){const _0x29062a=a111_0x4f2c16;mkdirSync(dirname(_0x37bdd1),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x37bdd1)||isDanglingSymlink(_0x37bdd1)){const _0x1ff5bd=lstatSync(_0x37bdd1);if(!_0x1ff5bd['isSymbolicLink']())throw CliErrors[_0x29062a(0x124)](_0x29062a(0x113)+_0x37bdd1);const _0x54ca04=resolveSymlinkTarget(_0x37bdd1);if(!isPathInside(realOrResolved(_0x54ca04),realOrResolved(_0x695322[_0x29062a(0x10d)])))throw CliErrors[_0x29062a(0x124)](_0x29062a(0x136)+_0x37bdd1);if(realOrResolved(_0x54ca04)===realOrResolved(_0x566ac0))return{'path':_0x37bdd1,'target':_0x566ac0,'action':_0x29062a(0x141)};const _0x5be9d2=readMetadataIfPresent(resolve(_0x54ca04,METADATA_FILE));if(_0x695322[_0x29062a(0x10f)]===_0x29062a(0x133)&&(_0x5be9d2?.[_0x29062a(0x12d)]!==_0x695322[_0x29062a(0x12d)]||_0x5be9d2[_0x29062a(0x128)]!==_0x1eb911))throw CliErrors['validation'](_0x29062a(0x10e)+_0x37bdd1);return unlinkSync(_0x37bdd1),symlinkSync(_0x566ac0,_0x37bdd1,_0x29062a(0x13f)),{'path':_0x37bdd1,'target':_0x566ac0,'action':_0x29062a(0x10a)};}return symlinkSync(_0x566ac0,_0x37bdd1,_0x29062a(0x13f)),{'path':_0x37bdd1,'target':_0x566ac0,'action':_0x29062a(0x13d)};}function managedTargetSkillLinkPaths(_0xb7a8d7,_0x46f390){const _0x352eb8=a111_0x4f2c16;if(!existsSync(_0xb7a8d7))return[];const _0x4f05ff=_0x46f390[_0x352eb8(0x12d)]+'--';return readdirSync(_0xb7a8d7,{'withFileTypes':!![]})[_0x352eb8(0x106)](_0x1b8122=>_0x46f390['scope']==='project'||_0x1b8122[_0x352eb8(0x10c)][_0x352eb8(0x121)](_0x4f05ff))['map'](_0xdff138=>resolve(_0xb7a8d7,_0xdff138[_0x352eb8(0x10c)]));}function removeManagedSkillLink(_0x349971,_0x1a1eba,_0x57e56e){const _0x3f1cae=a111_0x4f2c16,_0x1f851c=lstatIfPresent(_0x349971);if(!_0x1f851c?.[_0x3f1cae(0x140)]())return{'path':_0x349971,'action':_0x3f1cae(0x123),'reason':'not-managed-symlink'};const _0x308a0d=resolveSymlinkTarget(_0x349971);if(!isPathInside(realOrResolved(_0x308a0d),realOrResolved(_0x1a1eba['managedRoot'])))return{'path':_0x349971,'action':_0x3f1cae(0x123),'reason':_0x3f1cae(0x13a)};const _0x5883a2=readMetadataIfPresent(resolve(_0x308a0d,METADATA_FILE));if(_0x1a1eba['scope']==='project'&&(_0x5883a2?.[_0x3f1cae(0x12d)]!==_0x1a1eba[_0x3f1cae(0x12d)]||_0x5883a2[_0x3f1cae(0x128)]!==_0x57e56e))return{'path':_0x349971,'action':_0x3f1cae(0x123),'reason':'metadata-mismatch'};return unlinkSync(_0x349971),{'path':_0x349971,'action':_0x3f1cae(0x127)};}function isLinkedFromAnyRoot(_0x39d375,_0xeb2e9b){const _0x24be15=a111_0x4f2c16,_0x432649=realOrResolved(_0x39d375);for(const _0x31b9af of _0xeb2e9b){if(!existsSync(_0x31b9af))continue;for(const _0x12b556 of readdirSync(_0x31b9af,{'withFileTypes':!![]})){if(!_0x12b556[_0x24be15(0x140)]())continue;const _0x4fdff2=resolve(_0x31b9af,_0x12b556[_0x24be15(0x10c)]);if(realOrResolved(resolveSymlinkTarget(_0x4fdff2))===_0x432649)return!![];}}return![];}function runtimeSkillLinkName(_0x11a579,_0xadf1b9){const _0x398f52=a111_0x4f2c16,_0x154c17=safePathSegment(_0xadf1b9,_0x398f52(0x128));if(_0x11a579[_0x398f52(0x10f)]===_0x398f52(0x133)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x154c17))throw CliErrors['validation'](_0x398f52(0x125)+_0x154c17);return _0x11a579[_0x398f52(0x10f)]===_0x398f52(0x133)?_0x154c17:_0x11a579['appCode']+'--'+_0x154c17;}function runtimeSkillCodeFromLink(_0x130a62,_0x4b54a9){const _0x440b8d=a111_0x4f2c16,_0x24c360=basename(_0x4b54a9);return _0x130a62[_0x440b8d(0x10f)]===_0x440b8d(0x133)?_0x24c360:_0x24c360[_0x440b8d(0x110)]((_0x130a62[_0x440b8d(0x12d)]+'--')[_0x440b8d(0x11c)]);}export function copyManagedSkillDirectory(_0x18c076,_0x53bc72){const _0x2b65a3=a111_0x4f2c16,_0x50aa97=resolve(_0x53bc72,METADATA_FILE),_0x425094=existsSync(_0x53bc72);if(_0x425094){const _0x46e414=lstatSync(_0x53bc72);if(_0x46e414[_0x2b65a3(0x140)]())throw CliErrors[_0x2b65a3(0x124)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x53bc72);if(!_0x46e414['isDirectory']())throw CliErrors[_0x2b65a3(0x124)](_0x2b65a3(0x111)+_0x53bc72);const _0x3fec6c=readMetadataIfPresent(_0x50aa97);if(_0x3fec6c?.[_0x2b65a3(0x10f)]!==_0x2b65a3(0x11a))throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x53bc72);}ensureDirSync(dirname(_0x53bc72));const _0x2c8fe1=_0x425094?readMetadataIfPresent(_0x50aa97)?.['contentHash']:undefined,_0x2906fc=readMetadataIfPresent(resolve(_0x18c076,METADATA_FILE))?.[_0x2b65a3(0x114)];return _0x425094&&removeSync(_0x53bc72),copySkillDirectory(_0x18c076,_0x53bc72),{'path':_0x53bc72,'target':_0x18c076,'action':!_0x425094?_0x2b65a3(0x13d):_0x2c8fe1===_0x2906fc?_0x2b65a3(0x141):_0x2b65a3(0x10a)};}function copySkillDirectory(_0x29d038,_0x25d097){copySync(_0x29d038,_0x25d097,{'dereference':![],'overwrite':!![],'filter'(_0x145e45){const _0x208b6b=a111_0x3a4b;if(lstatSync(_0x145e45)[_0x208b6b(0x140)]())throw CliErrors['validation'](_0x208b6b(0x107)+_0x145e45);return!![];}});}
|
|
1
|
+
const a111_0x378089=a111_0x59a0;(function(_0x5dba55,_0x26a5a5){const _0x3d9e74=a111_0x59a0,_0x1a8822=_0x5dba55();while(!![]){try{const _0xd27857=-parseInt(_0x3d9e74(0x1e0))/0x1*(-parseInt(_0x3d9e74(0x1e9))/0x2)+-parseInt(_0x3d9e74(0x20e))/0x3*(parseInt(_0x3d9e74(0x205))/0x4)+-parseInt(_0x3d9e74(0x1db))/0x5*(parseInt(_0x3d9e74(0x1ea))/0x6)+-parseInt(_0x3d9e74(0x1e7))/0x7*(parseInt(_0x3d9e74(0x210))/0x8)+parseInt(_0x3d9e74(0x209))/0x9*(parseInt(_0x3d9e74(0x1fe))/0xa)+-parseInt(_0x3d9e74(0x1ef))/0xb+parseInt(_0x3d9e74(0x1f5))/0xc;if(_0xd27857===_0x26a5a5)break;else _0x1a8822['push'](_0x1a8822['shift']());}catch(_0x4b8da1){_0x1a8822['push'](_0x1a8822['shift']());}}}(a111_0x4b04,0xd7b31));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a111_0x467500 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a111_0x59a0(_0x1ae50c,_0x48b7b6){_0x1ae50c=_0x1ae50c-0x1db;const _0x4b0476=a111_0x4b04();let _0x59a0f4=_0x4b0476[_0x1ae50c];return _0x59a0f4;}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a111_0x467500,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet','runtime-observe',a111_0x378089(0x1e4)]);export function linkEffectiveRuntimeSkills(_0x2fdcb0,_0x274faf){const _0x307599=a111_0x378089,_0x38b837=new Map();for(const _0x360d60 of _0x2fdcb0){const _0x3975dc=_0x360d60['skill'][_0x307599(0x1e3)];if(!_0x3975dc)continue;const _0x26ec60=_0x38b837['get'](_0x3975dc);(!_0x26ec60||_0x360d60[_0x307599(0x204)]==='personal')&&_0x38b837['set'](_0x3975dc,_0x360d60);}const _0x455f52=[];for(const _0x366737 of _0x38b837['values']()){const _0x1f1026=requireSkillCode(_0x366737[_0x307599(0x1ed)]),_0x5a4967=readMetadataIfPresent(_0x366737[_0x307599(0x201)]);if(_0x5a4967?.[_0x307599(0x20c)]!==_0x274faf[_0x307599(0x20c)]||_0x5a4967['skillCode']!==_0x1f1026)throw CliErrors[_0x307599(0x1f2)](_0x307599(0x207)+_0x274faf[_0x307599(0x20c)]+':\x20'+_0x366737['metadataPath']);const _0x1dfd2b=runtimeSkillLinkName(_0x274faf,_0x1f1026);for(const _0x391522 of _0x274faf['skillRoots']){_0x455f52[_0x307599(0x1dd)](ensureManagedSymlink(resolve(_0x391522,_0x1dfd2b),_0x366737['dir'],_0x274faf,_0x1f1026));}}return _0x455f52;}export function pruneStaleRuntimeSkillLinks(_0x35d7b9,_0x58bb79,_0x5f8695){const _0x2861ed=a111_0x378089,_0x8e93fb=new Set([..._0x58bb79][_0x2861ed(0x1ec)](_0x568ba8=>_0x568ba8[_0x2861ed(0x1fc)]())['filter'](Boolean)),_0x2bc782=_0x5f8695?new Set([..._0x5f8695][_0x2861ed(0x1ec)](_0x9ca8da=>_0x9ca8da[_0x2861ed(0x1fc)]())['filter'](Boolean)):undefined,_0x2c8268=[];for(const _0x22555e of _0x35d7b9[_0x2861ed(0x206)]){for(const _0x55fedd of managedTargetSkillLinkPaths(_0x22555e,_0x35d7b9)){const _0x309d8e=runtimeSkillCodeFromLink(_0x35d7b9,_0x55fedd);if(_0x2bc782&&!_0x2bc782[_0x2861ed(0x211)](_0x309d8e))continue;if(_0x8e93fb[_0x2861ed(0x211)](_0x309d8e))continue;_0x2c8268['push'](removeManagedSkillLink(_0x55fedd,_0x35d7b9,_0x309d8e));}}return _0x2c8268;}export function pruneStaleRuntimeSkillCache(_0x4a8058,_0x148058={}){const _0x311127=a111_0x378089,_0xb864d=new Set([..._0x4a8058[_0x311127(0x1f0)]][_0x311127(0x1ec)](_0x42c311=>_0x42c311[_0x311127(0x1fc)]())[_0x311127(0x202)](Boolean)),_0x5936c8=_0x4a8058[_0x311127(0x1ee)]?new Set([..._0x4a8058['pruneSkillCodes']][_0x311127(0x1ec)](_0x17ceaa=>_0x17ceaa[_0x311127(0x1fc)]())[_0x311127(0x202)](Boolean)):undefined,_0x3ca4f2=_0x4a8058['scopes']??[_0x311127(0x1f1),_0x311127(0x1de)],_0x1c4a1a=resolve(getRuntimeSkillCacheRoot(_0x4a8058[_0x311127(0x1f6)],_0x4a8058['accessKey'],_0x148058),safePathSegment(_0x4a8058[_0x311127(0x20c)],_0x311127(0x20c))),_0x4e5a41=[];for(const _0x403b11 of _0x3ca4f2){const _0x5e8d5e=resolve(_0x1c4a1a,_0x403b11);if(!existsSync(_0x5e8d5e))continue;for(const _0x24c075 of readdirSync(_0x5e8d5e,{'withFileTypes':!![]})){if(!_0x24c075[_0x311127(0x1fd)]())continue;const _0x43024a=_0x24c075['name'];if(_0x5936c8&&!_0x5936c8['has'](_0x43024a))continue;if(_0xb864d[_0x311127(0x211)](_0x43024a))continue;const _0x17ee9c=resolve(_0x5e8d5e,_0x43024a),_0x53c5a8=readMetadataIfPresent(resolve(_0x17ee9c,METADATA_FILE));if(_0x53c5a8?.[_0x311127(0x20c)]!==_0x4a8058['appCode']||_0x53c5a8[_0x311127(0x204)]!==_0x403b11||_0x53c5a8[_0x311127(0x1e3)]!==_0x43024a){_0x4e5a41[_0x311127(0x1dd)]({'path':_0x17ee9c,'action':_0x311127(0x1df),'reason':_0x311127(0x20d)});continue;}if(isLinkedFromAnyRoot(_0x17ee9c,_0x4a8058[_0x311127(0x200)]??[])){_0x4e5a41[_0x311127(0x1dd)]({'path':_0x17ee9c,'action':_0x311127(0x1df),'reason':_0x311127(0x1f9)});continue;}removeSync(_0x17ee9c),_0x4e5a41['push']({'path':_0x17ee9c,'action':_0x311127(0x1eb)});}}return _0x4e5a41;}export function linkGlobalRuntimeSkills(_0x962f56,_0x301082={}){const _0x5983d8=a111_0x378089,_0x596b13=resolveSkillSyncPaths(_0x301082),_0x54af31=[];for(const _0x1d4b88 of _0x962f56){if(_0x1d4b88[_0x5983d8(0x204)]!==_0x5983d8(0x1f8))throw CliErrors[_0x5983d8(0x1f2)](_0x5983d8(0x1fa)+_0x1d4b88[_0x5983d8(0x204)]);const _0x228f53=requireSkillCode(_0x1d4b88[_0x5983d8(0x1ed)]),_0x2845e5=copyManagedSkillDirectory(_0x1d4b88[_0x5983d8(0x1f3)],resolve(_0x596b13['agentsSkillsDir'],_0x228f53));_0x54af31[_0x5983d8(0x1dd)]({..._0x2845e5,'contentHash':_0x1d4b88[_0x5983d8(0x20a)]});}return _0x54af31;}function ensureManagedSymlink(_0xe316a3,_0xb9d777,_0x47f353,_0x28c97c){const _0x3278a7=a111_0x378089;mkdirSync(dirname(_0xe316a3),{'recursive':!![],'mode':0x1c0});if(existsSync(_0xe316a3)||isDanglingSymlink(_0xe316a3)){const _0x37425c=lstatSync(_0xe316a3);if(!_0x37425c['isSymbolicLink']())throw CliErrors[_0x3278a7(0x1f2)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0xe316a3);const _0x4aedb8=resolveSymlinkTarget(_0xe316a3);if(!isPathInside(realOrResolved(_0x4aedb8),realOrResolved(_0x47f353[_0x3278a7(0x20f)])))throw CliErrors[_0x3278a7(0x1f2)](_0x3278a7(0x203)+_0xe316a3);if(realOrResolved(_0x4aedb8)===realOrResolved(_0xb9d777))return{'path':_0xe316a3,'target':_0xb9d777,'action':_0x3278a7(0x208)};const _0x33f4f8=readMetadataIfPresent(resolve(_0x4aedb8,METADATA_FILE));if(_0x47f353[_0x3278a7(0x204)]===_0x3278a7(0x1ff)&&(_0x33f4f8?.[_0x3278a7(0x20c)]!==_0x47f353[_0x3278a7(0x20c)]||_0x33f4f8[_0x3278a7(0x1e3)]!==_0x28c97c))throw CliErrors[_0x3278a7(0x1f2)](_0x3278a7(0x1f4)+_0xe316a3);return unlinkSync(_0xe316a3),symlinkSync(_0xb9d777,_0xe316a3,_0x3278a7(0x1f3)),{'path':_0xe316a3,'target':_0xb9d777,'action':_0x3278a7(0x1e1)};}return symlinkSync(_0xb9d777,_0xe316a3,'dir'),{'path':_0xe316a3,'target':_0xb9d777,'action':'created'};}function a111_0x4b04(){const _0x25a13f=['startsWith','appCode','metadata-mismatch','4504119XcWyqz','managedRoot','8WWDuFc','has','565hBXQDm','length','push','company','skipped','9670ArfzQS','updated','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skillCode','secret-retriever','not-managed-symlink','name','6398238zfQqDT','created','6ILBIXt','67086JJibVU','removed','map','skill','pruneSkillCodes','18314758RGlzVZ','activeSkillCodes','personal','validation','dir','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','64896408PErwQq','env','isSymbolicLink','builtin','linked-from-protected-root','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','trim','isDirectory','10EJBlLJ','project','protectedLinkRoots','metadataPath','filter','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','scope','4qUszNw','skillRoots','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','unchanged','7112691fKFXzw','contentHash'];a111_0x4b04=function(){return _0x25a13f;};return a111_0x4b04();}function managedTargetSkillLinkPaths(_0x4dfbfd,_0xd2587c){const _0x89c221=a111_0x378089;if(!existsSync(_0x4dfbfd))return[];const _0x395c43=_0xd2587c['appCode']+'--';return readdirSync(_0x4dfbfd,{'withFileTypes':!![]})['filter'](_0x2f225a=>_0xd2587c[_0x89c221(0x204)]===_0x89c221(0x1ff)||_0x2f225a[_0x89c221(0x1e6)][_0x89c221(0x20b)](_0x395c43))[_0x89c221(0x1ec)](_0x509db0=>resolve(_0x4dfbfd,_0x509db0[_0x89c221(0x1e6)]));}function removeManagedSkillLink(_0x4baa4c,_0x4d5229,_0x1d120e){const _0x42eb7b=a111_0x378089,_0xdca7d4=lstatIfPresent(_0x4baa4c);if(!_0xdca7d4?.['isSymbolicLink']())return{'path':_0x4baa4c,'action':_0x42eb7b(0x1df),'reason':_0x42eb7b(0x1e5)};const _0x4f9960=resolveSymlinkTarget(_0x4baa4c);if(!isPathInside(realOrResolved(_0x4f9960),realOrResolved(_0x4d5229[_0x42eb7b(0x20f)])))return{'path':_0x4baa4c,'action':'skipped','reason':'external-symlink'};const _0x4c4115=readMetadataIfPresent(resolve(_0x4f9960,METADATA_FILE));if(_0x4d5229[_0x42eb7b(0x204)]==='project'&&(_0x4c4115?.[_0x42eb7b(0x20c)]!==_0x4d5229[_0x42eb7b(0x20c)]||_0x4c4115[_0x42eb7b(0x1e3)]!==_0x1d120e))return{'path':_0x4baa4c,'action':_0x42eb7b(0x1df),'reason':_0x42eb7b(0x20d)};return unlinkSync(_0x4baa4c),{'path':_0x4baa4c,'action':'removed'};}function isLinkedFromAnyRoot(_0xe727da,_0x379183){const _0x545a4e=a111_0x378089,_0x346664=realOrResolved(_0xe727da);for(const _0x30ea38 of _0x379183){if(!existsSync(_0x30ea38))continue;for(const _0xf9113e of readdirSync(_0x30ea38,{'withFileTypes':!![]})){if(!_0xf9113e['isSymbolicLink']())continue;const _0x50d34f=resolve(_0x30ea38,_0xf9113e[_0x545a4e(0x1e6)]);if(realOrResolved(resolveSymlinkTarget(_0x50d34f))===_0x346664)return!![];}}return![];}function runtimeSkillLinkName(_0x545a92,_0x948794){const _0x3ce4f3=a111_0x378089,_0xd3deb8=safePathSegment(_0x948794,_0x3ce4f3(0x1e3));if(_0x545a92['scope']===_0x3ce4f3(0x1ff)&&RESERVED_PROJECT_SKILL_CODES['has'](_0xd3deb8))throw CliErrors[_0x3ce4f3(0x1f2)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0xd3deb8);return _0x545a92['scope']===_0x3ce4f3(0x1ff)?_0xd3deb8:_0x545a92['appCode']+'--'+_0xd3deb8;}function runtimeSkillCodeFromLink(_0x24ed93,_0x6fe1ae){const _0xaffc2c=a111_0x378089,_0x2e5f4c=basename(_0x6fe1ae);return _0x24ed93['scope']===_0xaffc2c(0x1ff)?_0x2e5f4c:_0x2e5f4c['slice']((_0x24ed93[_0xaffc2c(0x20c)]+'--')[_0xaffc2c(0x1dc)]);}export function copyManagedSkillDirectory(_0x5bf38d,_0x443448){const _0x10fc6c=a111_0x378089,_0x5f09c0=resolve(_0x443448,METADATA_FILE),_0x45d320=existsSync(_0x443448);if(_0x45d320){const _0x1b5743=lstatSync(_0x443448);if(_0x1b5743[_0x10fc6c(0x1f7)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x443448);if(!_0x1b5743['isDirectory']())throw CliErrors[_0x10fc6c(0x1f2)](_0x10fc6c(0x1e2)+_0x443448);const _0x12915a=readMetadataIfPresent(_0x5f09c0);if(_0x12915a?.[_0x10fc6c(0x204)]!==_0x10fc6c(0x1f8))throw CliErrors[_0x10fc6c(0x1f2)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x443448);}ensureDirSync(dirname(_0x443448));const _0xebd934=_0x45d320?readMetadataIfPresent(_0x5f09c0)?.[_0x10fc6c(0x20a)]:undefined,_0x3d9ebf=readMetadataIfPresent(resolve(_0x5bf38d,METADATA_FILE))?.[_0x10fc6c(0x20a)];return _0x45d320&&removeSync(_0x443448),copySkillDirectory(_0x5bf38d,_0x443448),{'path':_0x443448,'target':_0x5bf38d,'action':!_0x45d320?_0x10fc6c(0x1e8):_0xebd934===_0x3d9ebf?_0x10fc6c(0x208):_0x10fc6c(0x1e1)};}function copySkillDirectory(_0x5769f1,_0x5f2403){copySync(_0x5769f1,_0x5f2403,{'dereference':![],'overwrite':!![],'filter'(_0x215722){const _0x3e9f54=a111_0x59a0;if(lstatSync(_0x215722)[_0x3e9f54(0x1f7)]())throw CliErrors[_0x3e9f54(0x1f2)](_0x3e9f54(0x1fb)+_0x215722);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30f19c,_0xd5c3eb){const _0x4cb01b=a112_0x3e95,_0x57026b=_0x30f19c();while(!![]){try{const _0x11c361=parseInt(_0x4cb01b(0x8d))/0x1*(parseInt(_0x4cb01b(0x8a))/0x2)+-parseInt(_0x4cb01b(0x86))/0x3+parseInt(_0x4cb01b(0x8c))/0x4*(-parseInt(_0x4cb01b(0x88))/0x5)+parseInt(_0x4cb01b(0xa3))/0x6+-parseInt(_0x4cb01b(0x83))/0x7+parseInt(_0x4cb01b(0x84))/0x8+parseInt(_0x4cb01b(0x93))/0x9;if(_0x11c361===_0xd5c3eb)break;else _0x57026b['push'](_0x57026b['shift']());}catch(_0x1dce93){_0x57026b['push'](_0x57026b['shift']());}}}(a112_0x186e,0x1c244));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x40d902,_0x1fe55b,_0x4f36be={}){const _0x1acd1b=a112_0x3e95,_0x466905=safePathSegment(_0x40d902[_0x1acd1b(0x9e)],_0x1acd1b(0x9e));if(_0x1fe55b[_0x1acd1b(0x9e)]!==_0x466905)throw CliErrors[_0x1acd1b(0x7b)](_0x1acd1b(0x85)+_0x1fe55b[_0x1acd1b(0x9e)]+_0x1acd1b(0x98)+_0x466905);const _0x29c8bd=normalizeRuntimeSkillScopes(_0x40d902['scopes']),_0x6da047=new Set(_0x29c8bd),_0x55ea33=_0x40d902[_0x1acd1b(0x82)]?.['trim'](),_0x3b77b8=new Map(),_0x8efca7=resolve(getRuntimeSkillCacheRoot(_0x40d902[_0x1acd1b(0xa0)],_0x40d902[_0x1acd1b(0x81)],_0x4f36be),_0x466905);for(const _0x5f4d7f of _0x29c8bd){for(const _0x434f52 of localSkillEntryDirs(resolve(_0x8efca7,_0x5f4d7f))){collectLocalRuntimeSkill(_0x3b77b8,_0x434f52,{'appCode':_0x466905,'scopes':_0x6da047,'code':_0x55ea33,'source':_0x1acd1b(0x8b)});}}for(const _0x2415f7 of _0x1fe55b[_0x1acd1b(0xa6)]){for(const _0x45df4a of localSkillLinkCandidates(_0x2415f7,_0x1fe55b,_0x6da047)){collectLocalRuntimeSkill(_0x3b77b8,_0x45df4a,{'appCode':_0x466905,'scopes':_0x6da047,'code':_0x55ea33,'source':_0x1acd1b(0x8f),'linkedPath':_0x45df4a});}}return Array[_0x1acd1b(0x8e)](_0x3b77b8[_0x1acd1b(0xa2)]())[_0x1acd1b(0x90)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x1315e8){const _0x1f6a30=a112_0x3e95;if(!existsSync(_0x1315e8))return[];return readdirSync(_0x1315e8,{'withFileTypes':!![]})['filter'](_0x5b6b0b=>_0x5b6b0b[_0x1f6a30(0x9b)]()||_0x5b6b0b['isSymbolicLink']())[_0x1f6a30(0x7e)](_0x472b55=>resolve(_0x1315e8,_0x472b55[_0x1f6a30(0x7a)]));}function a112_0x3e95(_0x38f5d2,_0x458544){_0x38f5d2=_0x38f5d2-0x78;const _0x186e01=a112_0x186e();let _0x3e9572=_0x186e01[_0x38f5d2];return _0x3e9572;}function localSkillLinkCandidates(_0x353c68,_0x18249d,_0x3b28be){const _0x1ec96c=a112_0x3e95;if(!existsSync(_0x353c68))return[];const _0x3860dc=_0x18249d['appCode']+'--';return readdirSync(_0x353c68,{'withFileTypes':!![]})[_0x1ec96c(0x78)](_0x1073cf=>_0x1073cf['isDirectory']()||_0x1073cf[_0x1ec96c(0x97)]())[_0x1ec96c(0x78)](_0x3a829d=>_0x18249d[_0x1ec96c(0x9a)]===_0x1ec96c(0xa5)||_0x3a829d[_0x1ec96c(0x7a)][_0x1ec96c(0x7d)](_0x3860dc)||_0x3b28be[_0x1ec96c(0x79)](_0x1ec96c(0x92)))[_0x1ec96c(0x7e)](_0x1ab859=>resolve(_0x353c68,_0x1ab859[_0x1ec96c(0x7a)]));}function collectLocalRuntimeSkill(_0x177084,_0x4004a9,_0x46c900){const _0x667ab7=a112_0x3e95,_0x3ff8b0=resolve(_0x4004a9,METADATA_FILE),_0x2930e3=readMetadataIfPresent(_0x3ff8b0);if(!_0x2930e3)return;if(_0x2930e3[_0x667ab7(0x9e)]!==_0x46c900[_0x667ab7(0x9e)])return;if(!isRuntimeSkillScope(_0x2930e3['scope'])||!_0x46c900['scopes'][_0x667ab7(0x79)](_0x2930e3['scope']))return;const _0x170b78=_0x2930e3[_0x667ab7(0x87)]?.[_0x667ab7(0x9c)]();if(!_0x170b78)return;if(_0x46c900[_0x667ab7(0x82)]&&_0x170b78!==_0x46c900['code'])return;const _0x3e4110=_0x2930e3[_0x667ab7(0x9a)]+':'+_0x170b78,_0x45453f=_0x46c900[_0x667ab7(0xa1)]?[_0x46c900[_0x667ab7(0xa1)]]:[],_0x3615a2=_0x177084['get'](_0x3e4110);if(_0x3615a2){_0x46c900[_0x667ab7(0x7c)]===_0x667ab7(0x8b)&&(_0x3615a2[_0x667ab7(0x9f)]=_0x4004a9,_0x3615a2[_0x667ab7(0x94)]=_0x4004a9,_0x3615a2['skillMdPath']=resolve(_0x4004a9,SKILL_FILE),_0x3615a2[_0x667ab7(0x9d)]=_0x3ff8b0);for(const _0x272829 of _0x45453f){!_0x3615a2[_0x667ab7(0x89)][_0x667ab7(0x96)](_0x272829)&&_0x3615a2['linkedPaths'][_0x667ab7(0x91)](_0x272829);}_0x3615a2['linkedPaths'][_0x667ab7(0x90)]();return;}_0x177084[_0x667ab7(0xa4)](_0x3e4110,{..._0x2930e3,'tags':Array[_0x667ab7(0x7f)](_0x2930e3[_0x667ab7(0x99)])?_0x2930e3[_0x667ab7(0x99)]:[],'scope':_0x2930e3[_0x667ab7(0x9a)],'source':_0x667ab7(0x80),'dir':_0x4004a9,'cacheDir':_0x46c900['source']===_0x667ab7(0x8b)?_0x4004a9:undefined,'skillMdPath':resolve(_0x4004a9,SKILL_FILE),'metadataPath':_0x3ff8b0,'linkedPaths':_0x45453f});}function a112_0x186e(){const _0x2950ca=['has','name','validation','source','startsWith','map','isArray','local','accessKey','code','393309jIAQFs','162176wRRJVT','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','335808SMeWWe','skillCode','6225elXgVC','linkedPaths','69782MecohW','cache','344ITBomD','5vZhfqb','from','link','sort','push','builtin','1537344GzGica','cacheDir','localeCompare','includes','isSymbolicLink','\x20!=\x20','tags','scope','isDirectory','trim','metadataPath','appCode','dir','env','linkedPath','values','149508bBdyeQ','set','project','skillRoots','filter'];a112_0x186e=function(){return _0x2950ca;};return a112_0x186e();}function compareLocalRuntimeSkills(_0x240a09,_0x336f07){const _0x5be004=a112_0x3e95,_0x491f9a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x491f9a[_0x240a09[_0x5be004(0x9a)]]-_0x491f9a[_0x336f07[_0x5be004(0x9a)]]||_0x240a09[_0x5be004(0x87)][_0x5be004(0x95)](_0x336f07[_0x5be004(0x87)])||_0x240a09[_0x5be004(0x9f)]['localeCompare'](_0x336f07[_0x5be004(0x9f)]);}
|