@lovrabet/lovrabet-cli 2.1.13 → 2.1.14-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/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.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/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/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/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/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.js +1 -1
- package/lib/help.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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a89_0x385f(){const _0x2abbc6=['code','validation','3863432NACblu','response','status','168949bhloYU','7273bXKnlO','1Kjaese','stringify','4278NhvwPK','404463PfUHNb','headers','trim','6280510fqVGwA','message','180ekmAcr','1373530RNwwLT','9DRpcUo','2651995rRcjxj','8WUIqzA'];a89_0x385f=function(){return _0x2abbc6;};return a89_0x385f();}(function(_0x22e59b,_0x2a4a3f){const _0x2a593c=a89_0x50ee,_0x14bf05=_0x22e59b();while(!![]){try{const _0x4cffb9=parseInt(_0x2a593c(0x172))/0x1*(parseInt(_0x2a593c(0x167))/0x2)+-parseInt(_0x2a593c(0x175))/0x3*(-parseInt(_0x2a593c(0x16a))/0x4)+parseInt(_0x2a593c(0x169))/0x5+-parseInt(_0x2a593c(0x174))/0x6*(parseInt(_0x2a593c(0x171))/0x7)+-parseInt(_0x2a593c(0x16d))/0x8*(-parseInt(_0x2a593c(0x168))/0x9)+-parseInt(_0x2a593c(0x164))/0xa+-parseInt(_0x2a593c(0x170))/0xb*(parseInt(_0x2a593c(0x166))/0xc);if(_0x4cffb9===_0x2a4a3f)break;else _0x14bf05['push'](_0x14bf05['shift']());}catch(_0x422e4a){_0x14bf05['push'](_0x14bf05['shift']());}}}(a89_0x385f,0x5a73c));import{LovrabetError}from'@lovrabet/sdk';import{CliErrors}from'../errors.js';import{createRateLimitError,readRetryAfter,readRetryAfterSeconds}from'../framework/rate-limit.js';function a89_0x50ee(_0x6e225,_0x3fe386){_0x6e225=_0x6e225-0x162;const _0x385f1e=a89_0x385f();let _0x50ee03=_0x385f1e[_0x6e225];return _0x50ee03;}export function mapUserFacingExecuteError(_0x2fdf19){const _0x5d8820=a89_0x50ee;if(_0x2fdf19 instanceof LovrabetError){const _0x358063=userFacingLovrabetMessage(_0x2fdf19),_0x2b1425=_0x2fdf19,_0x2a73c3=createRateLimitError({'status':_0x2b1425[_0x5d8820(0x16f)],'errorCode':_0x2b1425[_0x5d8820(0x16b)],'message':_0x358063,'retryAfter':readRetryAfter(_0x2b1425[_0x5d8820(0x16e)]?.[_0x5d8820(0x162)])??readRetryAfterSeconds(_0x2b1425[_0x5d8820(0x16e)])});return _0x2a73c3??CliErrors[_0x5d8820(0x16c)](_0x358063);}return _0x2fdf19;}function userFacingLovrabetMessage(_0x26276c){const _0x537dc0=a89_0x50ee,_0x251d04=_0x26276c['description'];if(_0x251d04!==undefined&&_0x251d04!==null){if(typeof _0x251d04==='string'&&_0x251d04[_0x537dc0(0x163)]())return _0x251d04['trim']();try{return JSON[_0x537dc0(0x173)](_0x251d04);}catch{}}return _0x26276c[_0x537dc0(0x165)];}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a90_0x1fb789=a90_0x5ef9;(function(_0x18637f,_0x46f21b){const _0x1d3181=a90_0x5ef9,_0xae32af=_0x18637f();while(!![]){try{const _0x47dd99=-parseInt(_0x1d3181(0x20e))/0x1*(parseInt(_0x1d3181(0x1df))/0x2)+-parseInt(_0x1d3181(0x1d9))/0x3*(-parseInt(_0x1d3181(0x1e2))/0x4)+parseInt(_0x1d3181(0x20c))/0x5+parseInt(_0x1d3181(0x1db))/0x6+parseInt(_0x1d3181(0x1e5))/0x7+parseInt(_0x1d3181(0x1f0))/0x8+-parseInt(_0x1d3181(0x1e0))/0x9;if(_0x47dd99===_0x46f21b)break;else _0xae32af['push'](_0xae32af['shift']());}catch(_0x5707ac){_0xae32af['push'](_0xae32af['shift']());}}}(a90_0x26e3,0x2bd30));import{runCommandWithAdapter,requireConfirmationPrompt}from'@lovrabet/cli-framework';function a90_0x26e3(){const _0x5bf428=['1193694PoPjAt','rawFlags','cancelled','env','238462FHJtuy','3447513ypyQPV','pretty','11036yvTAQI','appCode','schema','1466542PXsyom','newConfigFileName','../commands/app/remote-source.js','nonInteractive','execute','local-alias','appcode','currentApp','High-risk\x20operation\x20`','app','filter','2481992FAxISC','defaultApp','authRequired','ACCESS_KEY','configMissing','error','accessKey','../core/api-client.js','catch','../core/sdk-client.js','.appcode\x20to\x20','resolve','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.','command','Run\x20`','Unknown\x20app:\x20','appcode\x20\x22','production','object','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','mergedCli','\x20\x20To\x20proceed:\x20','APPCODE','string','trim','_notice','appCodeSource','map','607695myhPoN','name','3EVgVwP','service','format','items','requiresAuth','requiresAppCode','validation','87tZKIjq','defaultVerbose'];a90_0x26e3=function(){return _0x5bf428;};return a90_0x26e3();}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{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';function a90_0x5ef9(_0x5c258d,_0x29fa68){_0x5c258d=_0x5c258d-0x1d3;const _0x26e3de=a90_0x26e3();let _0x5ef99c=_0x26e3de[_0x5c258d];return _0x5ef99c;}export function resolveAuthMode(_0x5692c0){return void _0x5692c0,AUTH_MODE['ClientAk'];}let sdkClientInitialized=![];export function createPipelineEnv(_0x53334b,_0x21f5b0){const _0x323704=a90_0x5ef9,_0xde146=typeof _0x21f5b0[_0x323704(0x1ee)]===_0x323704(0x207)&&_0x21f5b0[_0x323704(0x1ee)][_0x323704(0x208)]();return{'rawFlags':_0x21f5b0,'appCode':_0x53334b['appCode']||productEnv(_0x323704(0x206))||(_0xde146?undefined:readAppCodeFromConfig()),'appCodeSource':_0x53334b['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x21f5b0),'defaultFormat':_0x53334b[_0x323704(0x1d4)],'defaultPageSize':_0x53334b['pageSize'],'defaultVerbose':_0x53334b['verbose'],'riskLevel':_0x53334b['riskLevel'],'accessKey':_0x53334b[_0x323704(0x1f6)],'env':_0x53334b[_0x323704(0x1de)],'mergedCli':{'defaultApp':_0x53334b[_0x323704(0x1f1)],'currentApp':_0x53334b[_0x323704(0x1ec)],'appCode':_0x53334b['appCode']}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x1fb789(0x1ef)](_0xb71dfa=>PIPELINE_FLAG_NAMES['has'](_0xb71dfa[a90_0x1fb789(0x20d)]))[a90_0x1fb789(0x20b)](({name:_0x1e6b91,type:_0x4e63b1,description:_0x5e7d0f})=>({'name':_0x1e6b91,'type':_0x4e63b1,'description':_0x5e7d0f})),'formatOutput':formatOutput,'getCommandLabel'(_0x1d3186){const _0x281afd=a90_0x1fb789;return CLI_BIN_NAME+'\x20'+_0x1d3186[_0x281afd(0x1d3)]+'\x20'+_0x1d3186[_0x281afd(0x1fd)];},'riskPolicy':{'onViolation'(_0xd5af1a){const _0x2d5a8b=a90_0x1fb789;console[_0x2d5a8b(0x1f5)](_0xd5af1a);},'createError'(_0x325d2d){const _0x4f17f8=a90_0x1fb789;return CliErrors[_0x4f17f8(0x1dd)](_0x325d2d);}},async 'prepare'(_0x92d15a,_0x620ca6){const _0x22865c=a90_0x1fb789,_0x58610d=resolveAuthMode(_0x620ca6);if(_0x92d15a[_0x22865c(0x1d6)]!==![]){if(!_0x620ca6['accessKey'])throw CliErrors[_0x22865c(0x1f2)]('Set\x20accessKey\x20in\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x20or\x20pass\x20'+productEnvName(_0x22865c(0x1f3))+'.');const {setActiveAK:_0x39b178}=await import(_0x22865c(0x1f7));_0x39b178(_0x620ca6['accessKey']);}let _0x2ea03b='';if(_0x92d15a[_0x22865c(0x1d7)]!==![]){_0x2ea03b=_0x620ca6[_0x22865c(0x1e3)]??'',_0x2ea03b=await resolveExplicitAppName(_0x92d15a,_0x620ca6,_0x2ea03b);if(!_0x2ea03b){await assertSelectedAppNameIsRuntimeAccessible(_0x92d15a,_0x620ca6);throw CliErrors[_0x22865c(0x1f4)](_0x22865c(0x203)+PRODUCT_CONFIG['newConfigFileName']+'.');}await assertAppCodeIsRuntimeAccessible(_0x92d15a,_0x620ca6,_0x2ea03b);}if(_0x2ea03b){const {initSdkClient:_0x580bc1}=await import(_0x22865c(0x1f9));_0x580bc1({'appCode':_0x2ea03b,'env':_0x620ca6[_0x22865c(0x1de)]??'production','accessKey':_0x620ca6['accessKey'],'authMode':_0x58610d}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x620ca6[_0x22865c(0x1da)]},'numbers':{'pagesize':_0x620ca6['defaultPageSize']}},'extras':{'appCode':_0x2ea03b,'cookie':'','apiDomain':_0x620ca6['apiDomain'],'apiDir':'','accessKey':_0x620ca6['accessKey'],'envName':_0x620ca6[_0x22865c(0x1de)],'mergedCli':_0x620ca6['mergedCli']}};},async 'confirmHighRisk'({def:_0x21164a,env:_0x307a84,flags:_0xe0a927,commandLabel:_0x5cccc7}){const _0x597e34=a90_0x1fb789;if(_0x307a84['isNonInteractive']){const _0x47287c=reconstructCommandArgv(_0x21164a,_0xe0a927);throw CliErrors[_0x597e34(0x1d8)](_0x597e34(0x1ed)+_0x5cccc7+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a'+(_0x597e34(0x205)+_0x47287c));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x21164a,_0x5cccc7,_0xe0a927),'createCancelledError':_0x5918ae=>CliErrors[_0x597e34(0x1dd)](_0x5918ae)});},'mapDryRunError'(_0x15b954){return mapUserFacingExecuteError(_0x15b954);},'mapExecuteError'(_0x4cbb16){return mapUserFacingExecuteError(_0x4cbb16);},async 'finalize'(){const _0x3d26ec=a90_0x1fb789;try{if(sdkClientInitialized){const {clearSdkClient:_0x2d7a6e}=await import(_0x3d26ec(0x1f9));_0x2d7a6e();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0x201e6d}=await import(_0x3d26ec(0x1f7));_0x201e6d();}}};async function resolveExplicitAppName(_0x50d970,_0x1d25b3,_0x4aee2c){const _0x49ad3d=a90_0x1fb789;if(_0x50d970[_0x49ad3d(0x1d7)]===![])return _0x4aee2c;const _0x54b79e=typeof _0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1ee)]===_0x49ad3d(0x207)?_0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1ee)]['trim']():'';if(!_0x54b79e)return _0x4aee2c;const _0x500156=typeof _0x1d25b3['rawFlags'][_0x49ad3d(0x1eb)]===_0x49ad3d(0x207)&&_0x1d25b3[_0x49ad3d(0x1dc)][_0x49ad3d(0x1eb)][_0x49ad3d(0x208)]()||productEnv(_0x49ad3d(0x206));if(_0x500156||_0x1d25b3[_0x49ad3d(0x20a)]===_0x49ad3d(0x1ea))return _0x4aee2c;const {getRemoteAppList:_0x54a99f}=await import('../commands/app/remote-source.js'),_0x3de6a1=await _0x54a99f({'env':_0x1d25b3['env']??_0x49ad3d(0x201),'accessKey':_0x1d25b3[_0x49ad3d(0x1f6)]}),_0xdcb9e1=findAppByName(_0x3de6a1[_0x49ad3d(0x1d5)],_0x54b79e);if(_0xdcb9e1&&!isRuntimeAccessibleApp(_0xdcb9e1))throw runtimeInaccessibleAppError(_0xdcb9e1,'\x22'+_0x54b79e+'\x22');const _0x7ea12e=_0xdcb9e1?.[_0x49ad3d(0x1e3)]?.[_0x49ad3d(0x208)]();if(_0x7ea12e)return _0x7ea12e;throw CliErrors[_0x49ad3d(0x1d8)](_0x49ad3d(0x1ff)+_0x54b79e,_0x49ad3d(0x1fe)+CLI_BIN_NAME+_0x49ad3d(0x1fc)+_0x54b79e+_0x49ad3d(0x1fa)+PRODUCT_CONFIG[_0x49ad3d(0x1e6)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x11cb88,_0x3fe44b){const _0x1585dc=a90_0x1fb789;if(_0x11cb88[_0x1585dc(0x1d7)]===![]||!_0x3fe44b[_0x1585dc(0x1f6)])return;const _0x2cc785=(typeof _0x3fe44b[_0x1585dc(0x1dc)][_0x1585dc(0x1ee)]===_0x1585dc(0x207)&&_0x3fe44b['rawFlags'][_0x1585dc(0x1ee)][_0x1585dc(0x208)]()?_0x3fe44b[_0x1585dc(0x1dc)][_0x1585dc(0x1ee)]:_0x3fe44b[_0x1585dc(0x204)]?.[_0x1585dc(0x1ec)]??_0x3fe44b[_0x1585dc(0x204)]?.['defaultApp'])?.[_0x1585dc(0x208)]();if(!_0x2cc785)return;const {getRemoteAppList:_0x21e1a0}=await import('../commands/app/remote-source.js'),_0x47bd4c=await _0x21e1a0({'env':_0x3fe44b[_0x1585dc(0x1de)]??'production','accessKey':_0x3fe44b[_0x1585dc(0x1f6)]}),_0x3632a5=findAppByName(_0x47bd4c['items'],_0x2cc785);if(_0x3632a5&&!isRuntimeAccessibleApp(_0x3632a5))throw runtimeInaccessibleAppError(_0x3632a5,'\x22'+_0x2cc785+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x1d87f8,_0x2a3a99,_0xd1ff2e){const _0x287a6b=a90_0x1fb789;if(_0x1d87f8[_0x287a6b(0x1d7)]===![]||!_0x2a3a99[_0x287a6b(0x1f6)])return;const {getRemoteAppList:_0x24b158}=await import(_0x287a6b(0x1e7)),_0x73794c=await _0x24b158({'env':_0x2a3a99['env']??_0x287a6b(0x201),'accessKey':_0x2a3a99['accessKey']}),_0x19a5ca=findAppByCode(_0x73794c[_0x287a6b(0x1d5)],_0xd1ff2e);if(_0x19a5ca&&!isRuntimeAccessibleApp(_0x19a5ca))throw runtimeInaccessibleAppError(_0x19a5ca,_0x287a6b(0x200)+_0xd1ff2e+'\x22');}export async function runCommand(_0x1464c7,_0x5769f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x1464c7)?withUpdateNotice(_0x1464c7):_0x1464c7,_0x5769f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x357b34){const _0x16327a=a90_0x1fb789;return!['update',_0x16327a(0x1e4),'doctor']['includes'](_0x357b34[_0x16327a(0x1d3)]);}function withUpdateNotice(_0x276a49){return{..._0x276a49,async 'execute'(_0x39bb10){const _0x28c322=a90_0x5ef9,_0x37767e=shouldResolveUpdateNotice(_0x39bb10)?resolveLatestUpdateNotice()[_0x28c322(0x1f8)](()=>null):Promise[_0x28c322(0x1fb)](null),_0x35084e=await _0x276a49[_0x28c322(0x1e9)](_0x39bb10);return attachUpdateNotice(_0x35084e,await _0x37767e);}};}function shouldResolveUpdateNotice(_0x312103){const _0x58fff2=a90_0x1fb789;return _0x312103['format']===_0x58fff2(0x1e1)&&!_0x312103[_0x58fff2(0x1e8)];}function attachUpdateNotice(_0x2b8ac3,_0x135fc7){const _0x4f7797=a90_0x1fb789;if(!_0x135fc7||!_0x2b8ac3||typeof _0x2b8ac3!==_0x4f7797(0x202))return _0x2b8ac3;const _0x2ee42b=_0x2b8ac3,_0x1d86c1=typeof _0x2ee42b['_notice']===_0x4f7797(0x202)&&_0x2ee42b[_0x4f7797(0x209)]!==null?_0x2ee42b['_notice']:{};return{..._0x2ee42b,'_notice':{..._0x1d86c1,'update':_0x135fc7}};}
|
|
1
|
+
const a90_0x584b15=a90_0x17b4;(function(_0x42bc47,_0x32abc6){const _0x2804f3=a90_0x17b4,_0x313be1=_0x42bc47();while(!![]){try{const _0x47ba30=-parseInt(_0x2804f3(0x18c))/0x1+parseInt(_0x2804f3(0x183))/0x2*(-parseInt(_0x2804f3(0x177))/0x3)+parseInt(_0x2804f3(0x173))/0x4+parseInt(_0x2804f3(0x153))/0x5*(parseInt(_0x2804f3(0x162))/0x6)+-parseInt(_0x2804f3(0x14d))/0x7*(-parseInt(_0x2804f3(0x164))/0x8)+parseInt(_0x2804f3(0x186))/0x9+-parseInt(_0x2804f3(0x187))/0xa*(parseInt(_0x2804f3(0x189))/0xb);if(_0x47ba30===_0x32abc6)break;else _0x313be1['push'](_0x313be1['shift']());}catch(_0x51bdd4){_0x313be1['push'](_0x313be1['shift']());}}}(a90_0x4d0b,0xb5a24));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{resolveLatestUpdateNotice}from'../utils/update-notice.js';import{findAppByCode,findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../commands/app/eligibility.js';function a90_0x17b4(_0x49200a,_0x1b8888){_0x49200a=_0x49200a-0x14d;const _0x4d0bf=a90_0x4d0b();let _0x17b45e=_0x4d0bf[_0x49200a];return _0x17b45e;}export function resolveAuthMode(_0x20e476){const _0x5156f4=a90_0x17b4;return void _0x20e476,AUTH_MODE[_0x5156f4(0x176)];}let sdkClientInitialized=![];export function createPipelineEnv(_0x38e2a7,_0x2c7028){const _0x525f23=a90_0x17b4,_0xb87501=typeof _0x2c7028[_0x525f23(0x154)]===_0x525f23(0x174)&&_0x2c7028['app']['trim']();return{'rawFlags':_0x2c7028,'appCode':_0x38e2a7[_0x525f23(0x15a)]||productEnv('APPCODE')||(_0xb87501?undefined:readAppCodeFromConfig()),'appCodeSource':_0x38e2a7['appCodeSource'],'apiDomain':getApiDomain(),'isNonInteractive':isNonInteractiveMode(_0x2c7028),'defaultFormat':_0x38e2a7[_0x525f23(0x188)],'defaultPageSize':_0x38e2a7[_0x525f23(0x182)],'defaultVerbose':_0x38e2a7[_0x525f23(0x18a)],'riskLevel':_0x38e2a7[_0x525f23(0x178)],'accessKey':_0x38e2a7['accessKey'],'env':_0x38e2a7['env'],'mergedCli':{'defaultApp':_0x38e2a7[_0x525f23(0x168)],'currentApp':_0x38e2a7[_0x525f23(0x155)],'appCode':_0x38e2a7[_0x525f23(0x15a)]}};}const runnerAdapter={'cliErrors':CliErrors,'pipelineFlags':GLOBAL_FLAGS[a90_0x584b15(0x161)](_0x549160=>PIPELINE_FLAG_NAMES['has'](_0x549160['name']))['map'](({name:_0x3d0336,type:_0x41f4be,description:_0x2e9197})=>({'name':_0x3d0336,'type':_0x41f4be,'description':_0x2e9197})),'formatOutput':formatOutput,'getCommandLabel'(_0x2af571){const _0x4c6cad=a90_0x584b15;return CLI_BIN_NAME+'\x20'+_0x2af571[_0x4c6cad(0x184)]+'\x20'+_0x2af571[_0x4c6cad(0x181)];},'riskPolicy':{'onViolation'(_0x30ef36){console['error'](_0x30ef36);},'createError'(_0x15d095){const _0x100c23=a90_0x584b15;return CliErrors[_0x100c23(0x169)](_0x15d095);}},async 'prepare'(_0xae1e82,_0x2091e6){const _0x15bb83=a90_0x584b15,_0x4dcb09=resolveAuthMode(_0x2091e6);if(_0xae1e82[_0x15bb83(0x15c)]!==![]){if(!_0x2091e6['accessKey'])throw CliErrors['authRequired'](_0x15bb83(0x160)+PRODUCT_CONFIG[_0x15bb83(0x185)]+'\x20or\x20pass\x20'+productEnvName(_0x15bb83(0x16c))+'.');const {setActiveAK:_0x274283}=await import(_0x15bb83(0x14e));_0x274283(_0x2091e6[_0x15bb83(0x163)]);}let _0x5a12c1='';if(_0xae1e82[_0x15bb83(0x15b)]!==![]){_0x5a12c1=_0x2091e6[_0x15bb83(0x15a)]??'',_0x5a12c1=await resolveExplicitAppName(_0xae1e82,_0x2091e6,_0x5a12c1);if(!_0x5a12c1){await assertSelectedAppNameIsRuntimeAccessible(_0xae1e82,_0x2091e6);throw CliErrors[_0x15bb83(0x180)](_0x15bb83(0x157)+PRODUCT_CONFIG[_0x15bb83(0x185)]+'.');}await assertAppCodeIsRuntimeAccessible(_0xae1e82,_0x2091e6,_0x5a12c1);}if(_0x5a12c1){const {initSdkClient:_0x2ce5e4}=await import('../core/sdk-client.js');_0x2ce5e4({'appCode':_0x5a12c1,'env':_0x2091e6[_0x15bb83(0x15e)]??'production','accessKey':_0x2091e6[_0x15bb83(0x163)],'authMode':_0x4dcb09}),sdkClientInitialized=!![];}return{'defaults':{'booleans':{'verbose':_0x2091e6[_0x15bb83(0x156)]},'numbers':{'pagesize':_0x2091e6[_0x15bb83(0x16d)]}},'extras':{'appCode':_0x5a12c1,'cookie':'','apiDomain':_0x2091e6[_0x15bb83(0x15d)],'apiDir':'','accessKey':_0x2091e6[_0x15bb83(0x163)],'envName':_0x2091e6[_0x15bb83(0x15e)],'mergedCli':_0x2091e6[_0x15bb83(0x170)]}};},async 'confirmHighRisk'({def:_0x19d49e,env:_0x360f54,flags:_0xe59d7d,commandLabel:_0x45a81c}){const _0x1b7d2e=a90_0x584b15;if(_0x360f54['isNonInteractive']){const _0x3d5cfa=reconstructCommandArgv(_0x19d49e,_0xe59d7d);throw CliErrors[_0x1b7d2e(0x179)](_0x1b7d2e(0x152)+_0x45a81c+_0x1b7d2e(0x175)+('\x20\x20To\x20proceed:\x20'+_0x3d5cfa));}await requireConfirmationPrompt({'lines':buildConfirmationLines(_0x19d49e,_0x45a81c,_0xe59d7d),'createCancelledError':_0x128d1a=>CliErrors[_0x1b7d2e(0x169)](_0x128d1a)});},'mapDryRunError'(_0x2b2c04){return mapUserFacingExecuteError(_0x2b2c04);},'mapExecuteError'(_0x503350){return mapUserFacingExecuteError(_0x503350);},async 'finalize'(){const _0xba07d9=a90_0x584b15;try{if(sdkClientInitialized){const {clearSdkClient:_0x318dfd}=await import('../core/sdk-client.js');_0x318dfd();}}finally{sdkClientInitialized=![];const {clearActiveAK:_0xeebec7}=await import(_0xba07d9(0x14e));_0xeebec7();}}};async function resolveExplicitAppName(_0x4485ba,_0x3c820e,_0x394dee){const _0x2e662e=a90_0x584b15;if(_0x4485ba[_0x2e662e(0x15b)]===![])return _0x394dee;const _0x384365=typeof _0x3c820e[_0x2e662e(0x15f)][_0x2e662e(0x154)]===_0x2e662e(0x174)?_0x3c820e[_0x2e662e(0x15f)]['app']['trim']():'';if(!_0x384365)return _0x394dee;const _0x2ddb51=typeof _0x3c820e[_0x2e662e(0x15f)][_0x2e662e(0x17a)]==='string'&&_0x3c820e[_0x2e662e(0x15f)][_0x2e662e(0x17a)][_0x2e662e(0x17f)]()||productEnv('APPCODE');if(_0x2ddb51||_0x3c820e[_0x2e662e(0x165)]===_0x2e662e(0x172))return _0x394dee;const {getRemoteAppList:_0x14041c}=await import(_0x2e662e(0x150)),_0x1cb193=await _0x14041c({'env':_0x3c820e['env']??'production','accessKey':_0x3c820e[_0x2e662e(0x163)]}),_0x327d04=findAppByName(_0x1cb193[_0x2e662e(0x17c)],_0x384365);if(_0x327d04&&!isRuntimeAccessibleApp(_0x327d04))throw runtimeInaccessibleAppError(_0x327d04,'\x22'+_0x384365+'\x22');const _0x3e1a3b=_0x327d04?.[_0x2e662e(0x15a)]?.[_0x2e662e(0x17f)]();if(_0x3e1a3b)return _0x3e1a3b;throw CliErrors[_0x2e662e(0x179)](_0x2e662e(0x159)+_0x384365,_0x2e662e(0x167)+CLI_BIN_NAME+'\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20add\x20apps.'+_0x384365+_0x2e662e(0x16a)+PRODUCT_CONFIG[_0x2e662e(0x185)]+'.');}async function assertSelectedAppNameIsRuntimeAccessible(_0x5ac541,_0x567b5b){const _0x33a673=a90_0x584b15;if(_0x5ac541[_0x33a673(0x15b)]===![]||!_0x567b5b[_0x33a673(0x163)])return;const _0x178ec1=(typeof _0x567b5b[_0x33a673(0x15f)]['app']===_0x33a673(0x174)&&_0x567b5b[_0x33a673(0x15f)][_0x33a673(0x154)]['trim']()?_0x567b5b[_0x33a673(0x15f)][_0x33a673(0x154)]:_0x567b5b[_0x33a673(0x170)]?.[_0x33a673(0x155)]??_0x567b5b[_0x33a673(0x170)]?.[_0x33a673(0x168)])?.[_0x33a673(0x17f)]();if(!_0x178ec1)return;const {getRemoteAppList:_0x57a3cb}=await import('../commands/app/remote-source.js'),_0x3153d8=await _0x57a3cb({'env':_0x567b5b['env']??_0x33a673(0x17d),'accessKey':_0x567b5b['accessKey']}),_0x39967e=findAppByName(_0x3153d8[_0x33a673(0x17c)],_0x178ec1);if(_0x39967e&&!isRuntimeAccessibleApp(_0x39967e))throw runtimeInaccessibleAppError(_0x39967e,'\x22'+_0x178ec1+'\x22');}async function assertAppCodeIsRuntimeAccessible(_0x34a7eb,_0x154972,_0x1b02de){const _0x41a0e2=a90_0x584b15;if(_0x34a7eb[_0x41a0e2(0x15b)]===![]||!_0x154972[_0x41a0e2(0x163)])return;const {getRemoteAppList:_0x17dd85}=await import(_0x41a0e2(0x150)),_0x2e4920=await _0x17dd85({'env':_0x154972[_0x41a0e2(0x15e)]??'production','accessKey':_0x154972[_0x41a0e2(0x163)]}),_0x312c3f=findAppByCode(_0x2e4920[_0x41a0e2(0x17c)],_0x1b02de);if(_0x312c3f&&!isRuntimeAccessibleApp(_0x312c3f))throw runtimeInaccessibleAppError(_0x312c3f,_0x41a0e2(0x158)+_0x1b02de+'\x22');}export async function runCommand(_0x2da756,_0x5377f1){await runCommandWithAdapter(shouldAttachUpdateNotice(_0x2da756)?withUpdateNotice(_0x2da756):_0x2da756,_0x5377f1,runnerAdapter);}function shouldAttachUpdateNotice(_0x53e628){const _0x277393=a90_0x584b15;return![_0x277393(0x17b),_0x277393(0x171),_0x277393(0x16e)][_0x277393(0x16b)](_0x53e628[_0x277393(0x184)]);}function withUpdateNotice(_0x301886){return{..._0x301886,async 'execute'(_0x4b059e){const _0x2b01f0=a90_0x17b4,_0x212f82=shouldResolveUpdateNotice(_0x4b059e)?resolveLatestUpdateNotice()[_0x2b01f0(0x14f)](()=>null):Promise[_0x2b01f0(0x151)](null),_0x30708a=await _0x301886[_0x2b01f0(0x16f)](_0x4b059e);return attachUpdateNotice(_0x30708a,await _0x212f82);}};}function a90_0x4d0b(){const _0x1c7742=['local-alias','5005304FCyTNO','string','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.\x0a','ClientAk','9sWYHAM','riskLevel','validation','appcode','update','items','production','nonInteractive','trim','configMissing','command','pageSize','704478XehHjk','service','newConfigFileName','591237LZCsGy','10zJsBMC','format','18217804gsPaZJ','verbose','_notice','12957OUTgsp','7pFLTFe','../core/api-client.js','catch','../commands/app/remote-source.js','resolve','High-risk\x20operation\x20`','6640aeITqW','app','currentApp','defaultVerbose','Set\x20appcode\x20via\x20--appcode\x20or\x20in\x20','appcode\x20\x22','Unknown\x20app:\x20','appCode','requiresAppCode','requiresAuth','apiDomain','env','rawFlags','Set\x20accessKey\x20in\x20','filter','5898cDSGtY','accessKey','6778936jEGHrq','appCodeSource','object','Run\x20`','defaultApp','cancelled','.appcode\x20to\x20','includes','ACCESS_KEY','defaultPageSize','doctor','execute','mergedCli','schema'];a90_0x4d0b=function(){return _0x1c7742;};return a90_0x4d0b();}function shouldResolveUpdateNotice(_0x41f49a){const _0x5bbb99=a90_0x584b15;return _0x41f49a[_0x5bbb99(0x188)]==='pretty'&&!_0x41f49a[_0x5bbb99(0x17e)];}function attachUpdateNotice(_0x5c2128,_0x3ba7b3){const _0x2e94ef=a90_0x584b15;if(!_0x3ba7b3||!_0x5c2128||typeof _0x5c2128!=='object')return _0x5c2128;const _0x241d2a=_0x5c2128,_0x59b112=typeof _0x241d2a[_0x2e94ef(0x18b)]===_0x2e94ef(0x166)&&_0x241d2a[_0x2e94ef(0x18b)]!==null?_0x241d2a[_0x2e94ef(0x18b)]:{};return{..._0x241d2a,'_notice':{..._0x59b112,'update':_0x3ba7b3}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x239b(_0x197f27,_0x2e39ee){_0x197f27=_0x197f27-0xa7;const _0x57c6d9=a91_0x57c6();let _0x239b27=_0x57c6d9[_0x197f27];return _0x239b27;}(function(_0x10fc2a,_0x14f3b8){const _0x54edb0=a91_0x239b,_0x5bedee=_0x10fc2a();while(!![]){try{const _0x43f201=parseInt(_0x54edb0(0xb6))/0x1+-parseInt(_0x54edb0(0xba))/0x2+parseInt(_0x54edb0(0xb8))/0x3*(parseInt(_0x54edb0(0xb5))/0x4)+parseInt(_0x54edb0(0xaa))/0x5+parseInt(_0x54edb0(0xaf))/0x6*(-parseInt(_0x54edb0(0xb9))/0x7)+-parseInt(_0x54edb0(0xae))/0x8+parseInt(_0x54edb0(0xb7))/0x9*(parseInt(_0x54edb0(0xb1))/0xa);if(_0x43f201===_0x14f3b8)break;else _0x5bedee['push'](_0x5bedee['shift']());}catch(_0x5ce02e){_0x5bedee['push'](_0x5bedee['shift']());}}}(a91_0x57c6,0xb3713));import{buildSchemaPayload as a91_0x1ba318}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';function a91_0x57c6(){const _0x432cb0=['services','4SSVDEp','1006017rQWCMM','549vTRqtq','426342zXlQUM','14tpOsHQ','827428RQzJAQ','service','none','commands','4171070AsnHbI','auth','requiresAuth','map','8016184OdpEXl','1487526UgIExC','../commands/registry.js','108890KxaKKc','required','filter'];a91_0x57c6=function(){return _0x432cb0;};return a91_0x57c6();}export async function buildSchemaPayload(){const _0x2323aa=a91_0x239b,{serviceRegistry:_0x172264,findDefinition:_0x2012d7}=await import(_0x2323aa(0xb0)),_0xbc560c=new Set(_0x172264[_0x2323aa(0xad)](_0x2b8d0a=>_0x2b8d0a['service'])),_0x21658b=listDynamicServiceEntries()[_0x2323aa(0xb3)](_0x297fa7=>!_0xbc560c['has'](_0x297fa7[_0x2323aa(0xa7)])),_0x73a0ae=a91_0x1ba318({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x172264,_0x21658b),'buildAllFlags':buildAllFlags,'findDefinition':(_0x300217,_0x5b8f8d)=>_0x2012d7(_0x300217,_0x5b8f8d)??findDynamicServiceDefinition(_0x300217,_0x5b8f8d)});return normalizeSchemaPayload(_0x73a0ae);}function normalizeSchemaPayload(_0x13e1e8){const _0x53c01f=a91_0x239b;return{..._0x13e1e8,'schemaVersion':0x2,'services':_0x13e1e8[_0x53c01f(0xb4)]['map'](_0x282972=>({..._0x282972,'commands':_0x282972[_0x53c01f(0xa9)][_0x53c01f(0xad)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x5b1f7e){const _0x4a3dab=a91_0x239b,_0x1f2696=_0x5b1f7e;return{..._0x5b1f7e,'auth':_0x1f2696[_0x4a3dab(0xab)]??(_0x5b1f7e[_0x4a3dab(0xac)]?_0x4a3dab(0xb2):_0x4a3dab(0xa8))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55c77d,_0x281e5d){const _0x2a8a89=a92_0x3d85,_0xa86851=_0x55c77d();while(!![]){try{const _0x292843=-parseInt(_0x2a8a89(0x7d))/0x1+-parseInt(_0x2a8a89(0x81))/0x2*(parseInt(_0x2a8a89(0x83))/0x3)+-parseInt(_0x2a8a89(0x80))/0x4*(parseInt(_0x2a8a89(0x7e))/0x5)+parseInt(_0x2a8a89(0x82))/0x6*(-parseInt(_0x2a8a89(0x86))/0x7)+parseInt(_0x2a8a89(0x84))/0x8*(-parseInt(_0x2a8a89(0x8a))/0x9)+parseInt(_0x2a8a89(0x87))/0xa*(parseInt(_0x2a8a89(0x8b))/0xb)+parseInt(_0x2a8a89(0x85))/0xc;if(_0x292843===_0x281e5d)break;else _0xa86851['push'](_0xa86851['shift']());}catch(_0x52a794){_0xa86851['push'](_0xa86851['shift']());}}}(a92_0x4521,0x8e99a));function a92_0x4521(){const _0x3f51d6=['service','27HgUREP','11UYlkmy','findIndex','568095iTHKnn','255WYimMV','length','25884Fmqcqv','4WYNjfo','6yAvLQw','1191594PKOqyL','1393240KhLGqV','40349292yHBmpH','5198137yAvuJo','1792170GNcRDP','slice'];a92_0x4521=function(){return _0x3f51d6;};return a92_0x4521();}function a92_0x3d85(_0x2f9ffe,_0x3eea30){_0x2f9ffe=_0x2f9ffe-0x7d;const _0x4521be=a92_0x4521();let _0x3d85b9=_0x4521be[_0x2f9ffe];return _0x3d85b9;}export function insertDynamicServicesAfterServiceTree(_0x5428f2,_0x4adc6f){const _0x567e56=a92_0x3d85;if(_0x4adc6f[_0x567e56(0x7f)]===0x0)return[..._0x5428f2];const _0x1c72e7=_0x5428f2[_0x567e56(0x8c)](_0x16ecc2=>_0x16ecc2[_0x567e56(0x89)]===_0x567e56(0x89));if(_0x1c72e7<0x0)return[..._0x5428f2,..._0x4adc6f];return[..._0x5428f2[_0x567e56(0x88)](0x0,_0x1c72e7+0x1),..._0x4adc6f,..._0x5428f2['slice'](_0x1c72e7+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x2793(){var _0x164b28=['428755ulBdHt','9707814egEyyD','3MaTqsv','6wRMxKw','2931112AnVMwY','836278UeXmyQ','2672194tYgTbE','4694HKRQeY','827344xsioUv'];a93_0x2793=function(){return _0x164b28;};return a93_0x2793();}function a93_0x1f87(_0x12fedd,_0x2668b3){_0x12fedd=_0x12fedd-0x1a2;var _0x27939a=a93_0x2793();var _0x1f8794=_0x27939a[_0x12fedd];return _0x1f8794;}(function(_0x531ee0,_0x9959c9){var _0x44f740=a93_0x1f87,_0x433a88=_0x531ee0();while(!![]){try{var _0x5efae3=parseInt(_0x44f740(0x1a6))/0x1+-parseInt(_0x44f740(0x1a4))/0x2*(parseInt(_0x44f740(0x1aa))/0x3)+parseInt(_0x44f740(0x1a7))/0x4+parseInt(_0x44f740(0x1a8))/0x5+parseInt(_0x44f740(0x1a2))/0x6*(-parseInt(_0x44f740(0x1a5))/0x7)+-parseInt(_0x44f740(0x1a3))/0x8+parseInt(_0x44f740(0x1a9))/0x9;if(_0x5efae3===_0x9959c9)break;else _0x433a88['push'](_0x433a88['shift']());}catch(_0x467868){_0x433a88['push'](_0x433a88['shift']());}}}(a93_0x2793,0x332f9));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a94_0x340037=a94_0x3f8a;function a94_0x5440(){const _0x58437b=['6932035tAjcRo','4OvDhWh','3320zbQEpI','9xuSzcO','5102951vClSMn','236172SnZyIx','2.1.14-beta.1','28071CKbsaW','1073196shVzql','1725384otgUFc','b694bd7','2026-07-15T12:26:32.461Z','70918cmJvLH'];a94_0x5440=function(){return _0x58437b;};return a94_0x5440();}(function(_0x211441,_0x4e3cb9){const _0x493914=a94_0x3f8a,_0x37524a=_0x211441();while(!![]){try{const _0x5ec1d8=-parseInt(_0x493914(0x132))/0x1*(parseInt(_0x493914(0x12e))/0x2)+parseInt(_0x493914(0x134))/0x3*(-parseInt(_0x493914(0x130))/0x4)+parseInt(_0x493914(0x12f))/0x5+-parseInt(_0x493914(0x137))/0x6+parseInt(_0x493914(0x133))/0x7+parseInt(_0x493914(0x138))/0x8+parseInt(_0x493914(0x136))/0x9*(-parseInt(_0x493914(0x131))/0xa);if(_0x5ec1d8===_0x4e3cb9)break;else _0x37524a['push'](_0x37524a['shift']());}catch(_0x48d896){_0x37524a['push'](_0x37524a['shift']());}}}(a94_0x5440,0xaf7fc));export const VERSION=a94_0x340037(0x135);function a94_0x3f8a(_0x37e8a1,_0x2b88d7){_0x37e8a1=_0x37e8a1-0x12d;const _0x5440df=a94_0x5440();let _0x3f8a63=_0x5440df[_0x37e8a1];return _0x3f8a63;}export const GIT_TAG='v2.1.14-beta.1';export const GIT_COMMIT=a94_0x340037(0x139);export const BUILD_TIME=a94_0x340037(0x12d);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2dd377,_0x11ac60){const _0x222539=a95_0x26b4,_0x12ef92=_0x2dd377();while(!![]){try{const _0x2e503e=-parseInt(_0x222539(0x164))/0x1+parseInt(_0x222539(0x15f))/0x2+parseInt(_0x222539(0x163))/0x3+parseInt(_0x222539(0x165))/0x4*(-parseInt(_0x222539(0x162))/0x5)+parseInt(_0x222539(0x15c))/0x6+-parseInt(_0x222539(0x161))/0x7*(-parseInt(_0x222539(0x167))/0x8)+parseInt(_0x222539(0x166))/0x9*(-parseInt(_0x222539(0x169))/0xa);if(_0x2e503e===_0x11ac60)break;else _0x12ef92['push'](_0x12ef92['shift']());}catch(_0x3fd380){_0x12ef92['push'](_0x12ef92['shift']());}}}(a95_0x1726,0xb1702));import{jsx as a95_0x5d28f3,jsxs as a95_0x179549}from'react/jsx-runtime';function a95_0x1726(){const _0x1c8a4c=['3555384UvvNVE','\x20to\x20view\x20available\x20commands.','green','483948mBagxI','\x20--help','482181jBVFSg','2595255QTqoEF','617163Pbugcu','493978xRzdPg','4lDcphp','1191627FiQeXr','112MwlLXK','column','20UfcxCU'];a95_0x1726=function(){return _0x1c8a4c;};return a95_0x1726();}import{useEffect}from'react';function a95_0x26b4(_0x4b6a9f,_0x2f852a){_0x4b6a9f=_0x4b6a9f-0x15c;const _0x172686=a95_0x1726();let _0x26b466=_0x172686[_0x4b6a9f];return _0x26b466;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x157197=a95_0x26b4,{exit:_0x462856}=useApp();return useEffect(()=>{_0x462856();},[_0x462856]),a95_0x179549(Box,{'flexDirection':_0x157197(0x168),'marginTop':0x1,'marginBottom':0x1,'children':[a95_0x5d28f3(Box,{'children':a95_0x5d28f3(Text,{'bold':!![],'color':_0x157197(0x15e),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x179549(Box,{'marginTop':0x1,'children':[a95_0x5d28f3(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a95_0x5d28f3(Text,{'bold':!![],'color':_0x157197(0x15e),'children':CLI_BIN_NAME+_0x157197(0x160)}),a95_0x5d28f3(Text,{'dimColor':!![],'children':_0x157197(0x15d)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a96_0x194d(_0x4ec012,_0x213eda){_0x4ec012=_0x4ec012-0xef;const _0x12140f=a96_0x1214();let _0x194d0c=_0x12140f[_0x4ec012];return _0x194d0c;}const a96_0xce7ef6=a96_0x194d;(function(_0x5c8221,_0x3bc979){const _0x2e8dcd=a96_0x194d,_0x21d83d=_0x5c8221();while(!![]){try{const _0x2a74f=parseInt(_0x2e8dcd(0xfd))/0x1*(-parseInt(_0x2e8dcd(0xf4))/0x2)+-parseInt(_0x2e8dcd(0x101))/0x3*(-parseInt(_0x2e8dcd(0x102))/0x4)+-parseInt(_0x2e8dcd(0xf8))/0x5+-parseInt(_0x2e8dcd(0xf1))/0x6+parseInt(_0x2e8dcd(0xf6))/0x7+parseInt(_0x2e8dcd(0xf5))/0x8*(parseInt(_0x2e8dcd(0x103))/0x9)+parseInt(_0x2e8dcd(0xf9))/0xa;if(_0x2a74f===_0x3bc979)break;else _0x21d83d['push'](_0x21d83d['shift']());}catch(_0x4ce029){_0x21d83d['push'](_0x21d83d['shift']());}}}(a96_0x1214,0x88fd2));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x5ce9c9}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x5ce9c9;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a96_0xce7ef6(0xfe)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a96_0x1214(){const _0x36e72b=['exit\x20','trim','3024426yJwAQY','stdio','toString','1951916HfHKrZ','208528dgXUZY','3435061SgVRxf','npx','2116645fmJJzE','9764900atLXnT','status','log','add','1fOInqU','skipNpxSkillsEnvSuffix','pipe','unknown','21NcIQXv','540068WfKeto','18kwtWrK','stderr','join','stdout'];a96_0x1214=function(){return _0x36e72b;};return a96_0x1214();}export function runNpxSkillsAddGlobal(_0xe006d3,_0x37a8e7=LOVRABET_SKILL_SOURCE,_0x743827){const _0x3204e9=a96_0xce7ef6;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x234b52=_0x743827?.[_0x3204e9(0xf2)]??'inherit',_0x587ced=resolveNpmBin(_0x3204e9(0xf7)),_0x5c9366=['skills',_0x3204e9(0xfc),_0x37a8e7,'-g','-y'],_0x57fa48=[_0x587ced,..._0x5c9366][_0x3204e9(0x105)]('\x20');console[_0x3204e9(0xfb)]('*\x20'+_0x57fa48);const _0x4a9069=spawnSync(_0x587ced,_0x5c9366,{'cwd':_0xe006d3,'stdio':_0x234b52,'env':process.env,'shell':![]});if(_0x4a9069[_0x3204e9(0xfa)]===0x0)return{'ok':!![],'status':0x0};let _0x289ccc=_0x3204e9(0xef)+(_0x4a9069[_0x3204e9(0xfa)]??_0x3204e9(0x100));if(_0x234b52===_0x3204e9(0xff)){const _0x26ccbc=_0x4a9069['stderr']?_0x4a9069[_0x3204e9(0x104)]['toString']()['trim']():'',_0x141238=_0x4a9069[_0x3204e9(0x106)]?_0x4a9069[_0x3204e9(0x106)][_0x3204e9(0xf3)]()[_0x3204e9(0xf0)]():'';if(_0x26ccbc)_0x289ccc=_0x26ccbc;else{if(_0x141238)_0x289ccc=_0x141238;}}return{'ok':![],'status':_0x4a9069[_0x3204e9(0xfa)]??null,'error':_0x289ccc};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a97_0x50c223=a97_0x3724;function a97_0x2fae(){const _0x9cab28=['dist','lovrabet.skill.json','8KFcspu','4879090qixzQQ','.svn','.cache','30546780pycmxv','12QFgCUJ','.turbo','7153321PsCrsN','4NDnKYz','node_modules','990651ifRuMh','519267zLBkHA','11598939TDnKNN','.DS_Store','7137900FBaeqd','SKILL.md'];a97_0x2fae=function(){return _0x9cab28;};return a97_0x2fae();}(function(_0xffc4a7,_0x8154c7){const _0x5685de=a97_0x3724,_0x526932=_0xffc4a7();while(!![]){try{const _0x47f6b6=-parseInt(_0x5685de(0xae))/0x1+parseInt(_0x5685de(0xbb))/0x2*(parseInt(_0x5685de(0xaf))/0x3)+-parseInt(_0x5685de(0xac))/0x4*(parseInt(_0x5685de(0xb7))/0x5)+-parseInt(_0x5685de(0xb2))/0x6+-parseInt(_0x5685de(0xbd))/0x7*(-parseInt(_0x5685de(0xb6))/0x8)+-parseInt(_0x5685de(0xb0))/0x9+parseInt(_0x5685de(0xba))/0xa;if(_0x47f6b6===_0x8154c7)break;else _0x526932['push'](_0x526932['shift']());}catch(_0x1cf25b){_0x526932['push'](_0x526932['shift']());}}}(a97_0x2fae,0xa3a11));export const METADATA_FILE=a97_0x50c223(0xb5);export const SKILL_FILE=a97_0x50c223(0xb3);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a97_0x50c223(0xb1)]);function a97_0x3724(_0x388ea2,_0x1e81f3){_0x388ea2=_0x388ea2-0xac;const _0x2fae12=a97_0x2fae();let _0x3724c1=_0x2fae12[_0x388ea2];return _0x3724c1;}export const IGNORED_DIR_NAMES=new Set(['.git','.hg',a97_0x50c223(0xb8),a97_0x50c223(0xad),'.next',a97_0x50c223(0xb4),'build','coverage',a97_0x50c223(0xbc),a97_0x50c223(0xb9)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2c70ea,_0x34fd14){const _0x4d4240=a98_0x47df,_0x556d01=_0x2c70ea();while(!![]){try{const _0x1c687b=-parseInt(_0x4d4240(0x177))/0x1*(parseInt(_0x4d4240(0x17e))/0x2)+-parseInt(_0x4d4240(0x186))/0x3+-parseInt(_0x4d4240(0x180))/0x4+-parseInt(_0x4d4240(0x176))/0x5*(-parseInt(_0x4d4240(0x187))/0x6)+parseInt(_0x4d4240(0x17b))/0x7+-parseInt(_0x4d4240(0x181))/0x8*(-parseInt(_0x4d4240(0x183))/0x9)+parseInt(_0x4d4240(0x17c))/0xa;if(_0x1c687b===_0x34fd14)break;else _0x556d01['push'](_0x556d01['shift']());}catch(_0xaaeb00){_0x556d01['push'](_0x556d01['shift']());}}}(a98_0x3715,0x2919a));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a98_0x47df(_0x49d447,_0x4232be){_0x49d447=_0x49d447-0x176;const _0x37154f=a98_0x3715();let _0x47df9f=_0x37154f[_0x49d447];return _0x47df9f;}import{normalizeSkillRelativePath}from'./local-files.js';function a98_0x3715(){const _0x56de65=['startsWith','9qbPOBx','validation','utf8','537255hwbtAG','31362zooIpF','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','split','275iPvMkt','486BORlpO','endsWith','Unsafe\x20Skill\x20file\x20path:\x20','from','1685614OuyigG','249570Dkqhqv','stringify','246DepNZn','isSymbolicLink','1018216veOCKz','868152czrWCt'];a98_0x3715=function(){return _0x56de65;};return a98_0x3715();}export function resolveManagedFilePath(_0x168e32,_0x2e88ab){const _0x561d39=a98_0x47df,_0x42fbba=normalizeSkillRelativePath(_0x2e88ab),_0x3b9dda=realOrResolved(_0x168e32),_0x938dc4=resolve(_0x3b9dda,..._0x42fbba[_0x561d39(0x189)]('/'));if(!isPathInside(_0x938dc4,_0x3b9dda))throw CliErrors['validation'](_0x561d39(0x179)+_0x2e88ab);return ensureNoSymlinkInManagedPath(_0x3b9dda,_0x42fbba),_0x938dc4;}export function ensureNoSymlinkInManagedPath(_0x126307,_0xd48e39){const _0x3e8924=a98_0x47df;let _0x2d741a=_0x126307;for(const _0x5a49e0 of _0xd48e39[_0x3e8924(0x189)]('/')){_0x2d741a=resolve(_0x2d741a,_0x5a49e0);const _0x1c4176=lstatIfPresent(_0x2d741a);if(_0x1c4176?.[_0x3e8924(0x17f)]())throw CliErrors[_0x3e8924(0x184)](_0x3e8924(0x188)+_0xd48e39);}}export function isDanglingSymlink(_0x4fad0c){const _0x3514fe=a98_0x47df;try{return lstatSync(_0x4fad0c)[_0x3514fe(0x17f)]();}catch{return![];}}export function resolveSymlinkTarget(_0x73a59b){const _0x5aba82=readlinkSync(_0x73a59b);return isAbsolute(_0x5aba82)?_0x5aba82:resolve(dirname(_0x73a59b),_0x5aba82);}export function isPathInside(_0x4508a5,_0x368d00){const _0x1b3bc7=a98_0x47df,_0x1eaf60=_0x4508a5[_0x1b3bc7(0x178)](sep)?_0x4508a5:''+_0x4508a5+sep,_0xafe1d7=_0x368d00[_0x1b3bc7(0x178)](sep)?_0x368d00:''+_0x368d00+sep;return _0x4508a5===_0x368d00||_0x1eaf60[_0x1b3bc7(0x182)](_0xafe1d7);}export function realOrResolved(_0x22b1a5){try{return realpathSync(_0x22b1a5);}catch{return resolve(_0x22b1a5);}}export function lstatIfPresent(_0x23cf11){try{return lstatSync(_0x23cf11);}catch{return undefined;}}export function writeTextAtomic(_0x3c31a8,_0x2819e3,_0x134d57){const _0x154d79=a98_0x47df;writeBytesAtomic(_0x3c31a8,Buffer[_0x154d79(0x17a)](_0x2819e3,_0x154d79(0x185)),_0x134d57);}export function writeBytesAtomic(_0x2167a9,_0x596e95,_0x2eac2f){const _0x5e19f2=_0x2167a9+'.tmp';try{writeFileSync(_0x5e19f2,_0x596e95,{'mode':_0x2eac2f}),renameSync(_0x5e19f2,_0x2167a9);}catch(_0xf9f400){try{rmSync(_0x5e19f2,{'force':!![]});}catch{}throw _0xf9f400;}}export function writeJsonAtomic(_0x80eb93,_0x336d83){const _0xc91b90=a98_0x47df;writeTextAtomic(_0x80eb93,JSON[_0xc91b90(0x17d)](_0x336d83,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a08f6,_0x3b4362){const _0x59bad9=a99_0x5242,_0x133dfc=_0x2a08f6();while(!![]){try{const _0x44dce0=-parseInt(_0x59bad9(0xde))/0x1*(parseInt(_0x59bad9(0xd3))/0x2)+-parseInt(_0x59bad9(0xd2))/0x3+-parseInt(_0x59bad9(0xd1))/0x4+-parseInt(_0x59bad9(0xdc))/0x5+parseInt(_0x59bad9(0xd7))/0x6*(parseInt(_0x59bad9(0xd0))/0x7)+parseInt(_0x59bad9(0xd4))/0x8+parseInt(_0x59bad9(0xd8))/0x9;if(_0x44dce0===_0x3b4362)break;else _0x133dfc['push'](_0x133dfc['shift']());}catch(_0x18145e){_0x133dfc['push'](_0x133dfc['shift']());}}}(a99_0x4328,0x9d473));function a99_0x4328(){const _0x1e5689=['136abwwnZ','8044368YWdNNy','update','sha256','6GcomFb','6315021ctkrFc','size','digest','path','915280HxTeNf','hex','542AzFhdO','103761SaxCgK','3036780nNddAR','296160KqJYQm'];a99_0x4328=function(){return _0x1e5689;};return a99_0x4328();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x54375c){const _0x26cb1f=a99_0x5242;return createHash(_0x26cb1f(0xd6))['update'](_0x54375c)[_0x26cb1f(0xda)](_0x26cb1f(0xdd));}function a99_0x5242(_0x54ec85,_0x4bdbd9){_0x54ec85=_0x54ec85-0xd0;const _0x432809=a99_0x4328();let _0x5242dd=_0x432809[_0x54ec85];return _0x5242dd;}export function fileHash(_0x5de462){return bufferSha256(fileContent(_0x5de462));}export function bufferSha256(_0x4e806d){const _0x36101f=a99_0x5242;return createHash(_0x36101f(0xd6))[_0x36101f(0xd5)](_0x4e806d)[_0x36101f(0xda)](_0x36101f(0xdd));}export function fileTreeHash(_0x4389cb){const _0x535833=a99_0x5242,_0x44fc44=createHash('sha256');for(const _0x165dc9 of normalizeManifestFiles(_0x4389cb)){_0x44fc44[_0x535833(0xd5)](_0x165dc9[_0x535833(0xdb)]),_0x44fc44[_0x535833(0xd5)]('\x00'),_0x44fc44['update'](_0x165dc9[_0x535833(0xd6)]),_0x44fc44[_0x535833(0xd5)]('\x00'),_0x44fc44[_0x535833(0xd5)](String(_0x165dc9[_0x535833(0xd9)])),_0x44fc44['update']('\x00');}return _0x44fc44[_0x535833(0xda)](_0x535833(0xdd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x12a257,_0x4da9ce){const _0x492e59=a100_0x4914,_0x56333c=_0x12a257();while(!![]){try{const _0x1546a9=-parseInt(_0x492e59(0xbb))/0x1*(parseInt(_0x492e59(0xc4))/0x2)+parseInt(_0x492e59(0xca))/0x3*(-parseInt(_0x492e59(0xc3))/0x4)+-parseInt(_0x492e59(0xba))/0x5*(parseInt(_0x492e59(0xbf))/0x6)+-parseInt(_0x492e59(0xb3))/0x7*(parseInt(_0x492e59(0xc5))/0x8)+-parseInt(_0x492e59(0xb4))/0x9*(-parseInt(_0x492e59(0xd1))/0xa)+-parseInt(_0x492e59(0xcf))/0xb*(-parseInt(_0x492e59(0xdf))/0xc)+parseInt(_0x492e59(0xcc))/0xd;if(_0x1546a9===_0x4da9ce)break;else _0x56333c['push'](_0x56333c['shift']());}catch(_0x53c156){_0x56333c['push'](_0x56333c['shift']());}}}(a100_0x53b5,0x71718));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a100_0x48a30c from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a100_0x48a30c;export function linkEffectiveRuntimeSkills(_0x4c0741,_0x576dd7,_0x2c42f0={}){const _0x233d0f=a100_0x4914,_0x4cae71=new Map();for(const _0x588a1a of _0x4c0741){const _0xf31de=_0x588a1a[_0x233d0f(0xbd)][_0x233d0f(0xd6)];if(!_0xf31de)continue;const _0x461001=_0x4cae71[_0x233d0f(0xd9)](_0xf31de);(!_0x461001||_0x588a1a[_0x233d0f(0xdd)]==='personal')&&_0x4cae71[_0x233d0f(0xb5)](_0xf31de,_0x588a1a);}const _0x51e1a2=[],_0x3e173e=resolveSkillSyncPaths(_0x2c42f0);for(const _0x30349a of _0x4cae71[_0x233d0f(0xb6)]()){const _0x450a23=requireSkillCode(_0x30349a['skill']),_0x4a0c1b=_0x576dd7+'--'+_0x450a23;for(const _0xe11668 of runtimeAgentSkillRoots(_0x3e173e)){_0x51e1a2[_0x233d0f(0xc6)](ensureManagedSymlink(resolve(_0xe11668,_0x4a0c1b),_0x30349a['dir'],_0x3e173e[_0x233d0f(0xe6)]));}}return _0x51e1a2;}function a100_0x4914(_0x24ab05,_0x25464b){_0x24ab05=_0x24ab05-0xb3;const _0x53b542=a100_0x53b5();let _0x491447=_0x53b542[_0x24ab05];return _0x491447;}export function pruneStaleRuntimeSkillLinks(_0x508c82,_0x1d2e40,_0x1740e9={},_0x4ada65){const _0x5cb3aa=a100_0x4914,_0x29298e=resolveSkillSyncPaths(_0x1740e9),_0x365548=new Set([..._0x1d2e40][_0x5cb3aa(0xe5)](_0x5248e5=>_0x5248e5[_0x5cb3aa(0xc9)]())[_0x5cb3aa(0xd7)](Boolean)),_0x57a535=_0x4ada65?new Set([..._0x4ada65]['map'](_0x3fa0ac=>_0x3fa0ac[_0x5cb3aa(0xc9)]())[_0x5cb3aa(0xd7)](Boolean)):undefined,_0x189470=[];for(const _0x8a359a of runtimeAgentSkillRoots(_0x29298e)){for(const _0x3620ea of managedAppSkillLinkPaths(_0x8a359a,_0x508c82)){const _0x3f9b57=basename(_0x3620ea)[_0x5cb3aa(0xbc)]((_0x508c82+'--')[_0x5cb3aa(0xbe)]);if(_0x57a535&&!_0x57a535['has'](_0x3f9b57))continue;if(_0x365548[_0x5cb3aa(0xcb)](_0x3f9b57))continue;_0x189470['push'](removeManagedSkillLink(_0x3620ea,_0x29298e[_0x5cb3aa(0xe6)]));}}return _0x189470;}function a100_0x53b5(){const _0x160323=['37008WRgAZG','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','name','validation','appCode','agentsSkillsDir','map','managedRoot','metadata-mismatch','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','2947CWzsdx','5702229DqPRMC','set','values','skipped','scopes','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','185WXXKvK','5tdXaAG','slice','skill','length','49722ZYiLwv','startsWith','dir','pruneSkillCodes','9392ZmjtcJ','103290zmkyGK','10568KNpuNG','push','updated','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','trim','393NbLTzj','has','4588480DMGGIr','external-symlink','unchanged','3234ZGETFB','company','10gxzaJO','not-managed-symlink','isDirectory','created','removed','skillCode','filter','isSymbolicLink','get','personal','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','contentHash','scope','builtin'];a100_0x53b5=function(){return _0x160323;};return a100_0x53b5();}export function pruneStaleRuntimeSkillCache(_0x3a0868,_0x266753={}){const _0x2956b8=a100_0x4914,_0x1e78f7=new Set([..._0x3a0868['activeSkillCodes']][_0x2956b8(0xe5)](_0x3e4271=>_0x3e4271[_0x2956b8(0xc9)]())[_0x2956b8(0xd7)](Boolean)),_0x2549bc=_0x3a0868[_0x2956b8(0xc2)]?new Set([..._0x3a0868[_0x2956b8(0xc2)]][_0x2956b8(0xe5)](_0x4fea22=>_0x4fea22['trim']())[_0x2956b8(0xd7)](Boolean)):undefined,_0x40acb7=_0x3a0868[_0x2956b8(0xb8)]??[_0x2956b8(0xda),_0x2956b8(0xd0)],_0x4ecb6c=resolve(getRuntimeSkillCacheRoot(_0x3a0868['env'],_0x3a0868['accessKey'],_0x266753),safePathSegment(_0x3a0868[_0x2956b8(0xe3)],_0x2956b8(0xe3))),_0x561545=[];for(const _0x20cc57 of _0x40acb7){const _0x588814=resolve(_0x4ecb6c,_0x20cc57);if(!existsSync(_0x588814))continue;for(const _0x14aeb1 of readdirSync(_0x588814,{'withFileTypes':!![]})){if(!_0x14aeb1['isDirectory']())continue;const _0x491801=_0x14aeb1[_0x2956b8(0xe1)];if(_0x2549bc&&!_0x2549bc['has'](_0x491801))continue;if(_0x1e78f7[_0x2956b8(0xcb)](_0x491801))continue;const _0x35370d=resolve(_0x588814,_0x491801),_0x4a3fdf=readMetadataIfPresent(resolve(_0x35370d,METADATA_FILE));if(_0x4a3fdf?.[_0x2956b8(0xe3)]!==_0x3a0868[_0x2956b8(0xe3)]||_0x4a3fdf['scope']!==_0x20cc57||_0x4a3fdf[_0x2956b8(0xd6)]!==_0x491801){_0x561545[_0x2956b8(0xc6)]({'path':_0x35370d,'action':_0x2956b8(0xb7),'reason':_0x2956b8(0xe7)});continue;}removeSync(_0x35370d),_0x561545['push']({'path':_0x35370d,'action':_0x2956b8(0xd5)});}}return _0x561545;}export function linkGlobalRuntimeSkills(_0x5156ad,_0x26820c={}){const _0x50d6dc=a100_0x4914,_0x2d1261=resolveSkillSyncPaths(_0x26820c),_0x15e48e=[];for(const _0x2256fe of _0x5156ad){if(_0x2256fe[_0x50d6dc(0xdd)]!=='builtin')throw CliErrors['validation'](_0x50d6dc(0xe0)+_0x2256fe[_0x50d6dc(0xdd)]);const _0x94b0f1=requireSkillCode(_0x2256fe[_0x50d6dc(0xbd)]),_0x4208a7=copyManagedSkillDirectory(_0x2256fe['dir'],resolve(_0x2d1261[_0x50d6dc(0xe4)],_0x94b0f1));_0x15e48e[_0x50d6dc(0xc6)]({..._0x4208a7,'contentHash':_0x2256fe[_0x50d6dc(0xdc)]});}return _0x15e48e;}function ensureManagedSymlink(_0x3abea1,_0x1ec1e1,_0x2faeab){const _0x253acc=a100_0x4914;mkdirSync(dirname(_0x3abea1),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3abea1)||isDanglingSymlink(_0x3abea1)){const _0x4dfe65=lstatSync(_0x3abea1);if(!_0x4dfe65[_0x253acc(0xd8)]())throw CliErrors[_0x253acc(0xe2)](_0x253acc(0xc8)+_0x3abea1);const _0x4a277d=resolveSymlinkTarget(_0x3abea1);if(!isPathInside(realOrResolved(_0x4a277d),realOrResolved(_0x2faeab)))throw CliErrors[_0x253acc(0xe2)](_0x253acc(0xe8)+_0x3abea1);if(realOrResolved(_0x4a277d)===realOrResolved(_0x1ec1e1))return{'path':_0x3abea1,'target':_0x1ec1e1,'action':_0x253acc(0xce)};return unlinkSync(_0x3abea1),symlinkSync(_0x1ec1e1,_0x3abea1,_0x253acc(0xc1)),{'path':_0x3abea1,'target':_0x1ec1e1,'action':_0x253acc(0xc7)};}return symlinkSync(_0x1ec1e1,_0x3abea1,'dir'),{'path':_0x3abea1,'target':_0x1ec1e1,'action':'created'};}function managedAppSkillLinkPaths(_0x58d506,_0x43edd1){const _0x1a1f09=a100_0x4914;if(!existsSync(_0x58d506))return[];const _0x3a25f7=_0x43edd1+'--';return readdirSync(_0x58d506,{'withFileTypes':!![]})[_0x1a1f09(0xd7)](_0x146a7a=>_0x146a7a[_0x1a1f09(0xe1)][_0x1a1f09(0xc0)](_0x3a25f7))['map'](_0x549bf1=>resolve(_0x58d506,_0x549bf1[_0x1a1f09(0xe1)]));}function removeManagedSkillLink(_0x3a0262,_0x3c63bc){const _0x3d183f=a100_0x4914,_0x3450f5=lstatIfPresent(_0x3a0262);if(!_0x3450f5?.[_0x3d183f(0xd8)]())return{'path':_0x3a0262,'action':_0x3d183f(0xb7),'reason':_0x3d183f(0xd2)};const _0x524d57=resolveSymlinkTarget(_0x3a0262);if(!isPathInside(realOrResolved(_0x524d57),realOrResolved(_0x3c63bc)))return{'path':_0x3a0262,'action':_0x3d183f(0xb7),'reason':_0x3d183f(0xcd)};return unlinkSync(_0x3a0262),{'path':_0x3a0262,'action':_0x3d183f(0xd5)};}export function copyManagedSkillDirectory(_0x5d3383,_0x3a7163){const _0x13176f=a100_0x4914,_0x407c0d=resolve(_0x3a7163,METADATA_FILE),_0x5612ae=existsSync(_0x3a7163);if(_0x5612ae){const _0x2e0de5=lstatSync(_0x3a7163);if(_0x2e0de5['isSymbolicLink']())throw CliErrors[_0x13176f(0xe2)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x3a7163);if(!_0x2e0de5[_0x13176f(0xd3)]())throw CliErrors[_0x13176f(0xe2)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x3a7163);const _0x4a14ef=readMetadataIfPresent(_0x407c0d);if(_0x4a14ef?.[_0x13176f(0xdd)]!==_0x13176f(0xde))throw CliErrors['validation'](_0x13176f(0xdb)+_0x3a7163);}ensureDirSync(dirname(_0x3a7163));const _0x251456=_0x5612ae?readMetadataIfPresent(_0x407c0d)?.[_0x13176f(0xdc)]:undefined,_0x45b88d=readMetadataIfPresent(resolve(_0x5d3383,METADATA_FILE))?.[_0x13176f(0xdc)];return _0x5612ae&&removeSync(_0x3a7163),copySkillDirectory(_0x5d3383,_0x3a7163),{'path':_0x3a7163,'target':_0x5d3383,'action':!_0x5612ae?_0x13176f(0xd4):_0x251456===_0x45b88d?_0x13176f(0xce):'updated'};}function copySkillDirectory(_0x161d08,_0x539234){copySync(_0x161d08,_0x539234,{'dereference':![],'overwrite':!![],'filter'(_0x3562fd){const _0x3bd6ec=a100_0x4914;if(lstatSync(_0x3562fd)[_0x3bd6ec(0xd8)]())throw CliErrors[_0x3bd6ec(0xe2)](_0x3bd6ec(0xb9)+_0x3562fd);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4225ae,_0x332bb7){const _0x1e6084=a101_0x1ecc,_0x520574=_0x4225ae();while(!![]){try{const _0x79a33=-parseInt(_0x1e6084(0xd6))/0x1+-parseInt(_0x1e6084(0xc4))/0x2+-parseInt(_0x1e6084(0xe0))/0x3+-parseInt(_0x1e6084(0xdc))/0x4+parseInt(_0x1e6084(0xcf))/0x5*(parseInt(_0x1e6084(0xe4))/0x6)+-parseInt(_0x1e6084(0xdd))/0x7*(-parseInt(_0x1e6084(0xd0))/0x8)+parseInt(_0x1e6084(0xc0))/0x9;if(_0x79a33===_0x332bb7)break;else _0x520574['push'](_0x520574['shift']());}catch(_0x128ab8){_0x520574['push'](_0x520574['shift']());}}}(a101_0x5a67,0xcac64));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a101_0x1ecc(_0x5a127d,_0x4a2cd1){_0x5a127d=_0x5a127d-0xbf;const _0x5a6761=a101_0x5a67();let _0x1ecc19=_0x5a6761[_0x5a127d];return _0x1ecc19;}export function listLocalRuntimeSkills(_0x98fe33,_0x2ab2cc={}){const _0x4cff1a=a101_0x1ecc,_0x4da0fd=safePathSegment(_0x98fe33[_0x4cff1a(0xbf)],_0x4cff1a(0xbf)),_0x4b3486=normalizeRuntimeSkillScopes(_0x98fe33['scopes']),_0x3656b0=new Set(_0x4b3486),_0x1e64b5=_0x98fe33[_0x4cff1a(0xdf)]?.[_0x4cff1a(0xe1)](),_0x3a47d6=new Map(),_0x5aaef8=resolve(getRuntimeSkillCacheRoot(_0x98fe33['env'],_0x98fe33[_0x4cff1a(0xd9)],_0x2ab2cc),_0x4da0fd);for(const _0x5baab1 of _0x4b3486){for(const _0x2b9136 of localSkillEntryDirs(resolve(_0x5aaef8,_0x5baab1))){collectLocalRuntimeSkill(_0x3a47d6,_0x2b9136,{'appCode':_0x4da0fd,'scopes':_0x3656b0,'code':_0x1e64b5,'source':_0x4cff1a(0xcd)});}}const _0x538c4a=resolveSkillSyncPaths(_0x2ab2cc);for(const _0x345c60 of runtimeAgentSkillRoots(_0x538c4a)){for(const _0x72dadc of localSkillLinkCandidates(_0x345c60,_0x4da0fd,_0x3656b0)){collectLocalRuntimeSkill(_0x3a47d6,_0x72dadc,{'appCode':_0x4da0fd,'scopes':_0x3656b0,'code':_0x1e64b5,'source':_0x4cff1a(0xc2),'linkedPath':_0x72dadc});}}return Array['from'](_0x3a47d6[_0x4cff1a(0xca)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x3c7424){const _0x353cc7=a101_0x1ecc;if(!existsSync(_0x3c7424))return[];return readdirSync(_0x3c7424,{'withFileTypes':!![]})[_0x353cc7(0xdb)](_0x1a4657=>_0x1a4657[_0x353cc7(0xd3)]()||_0x1a4657[_0x353cc7(0xc9)]())[_0x353cc7(0xe5)](_0x279f95=>resolve(_0x3c7424,_0x279f95[_0x353cc7(0xd2)]));}function localSkillLinkCandidates(_0x4417ba,_0xd27abf,_0x195c4f){const _0x3d8c40=a101_0x1ecc;if(!existsSync(_0x4417ba))return[];const _0x453731=_0xd27abf+'--';return readdirSync(_0x4417ba,{'withFileTypes':!![]})[_0x3d8c40(0xdb)](_0x4562fe=>_0x4562fe[_0x3d8c40(0xd3)]()||_0x4562fe['isSymbolicLink']())[_0x3d8c40(0xdb)](_0x47f948=>_0x47f948[_0x3d8c40(0xd2)][_0x3d8c40(0xd7)](_0x453731)||_0x195c4f[_0x3d8c40(0xc7)]('builtin'))['map'](_0x5b9416=>resolve(_0x4417ba,_0x5b9416[_0x3d8c40(0xd2)]));}function a101_0x5a67(){const _0x216a01=['30856aRBiVe','get','name','isDirectory','metadataPath','skillCode','1002108EBPZoj','startsWith','scope','accessKey','dir','filter','3245168vhbBtd','581kXsgIO','source','code','1105101UaBvWg','trim','isArray','tags','4086dlKWsC','map','scopes','appCode','26096940sYMKpq','linkedPaths','link','local','3121214DvRxbj','linkedPath','localeCompare','has','includes','isSymbolicLink','values','push','skillMdPath','cache','sort','9935DBwYKe'];a101_0x5a67=function(){return _0x216a01;};return a101_0x5a67();}function collectLocalRuntimeSkill(_0x425196,_0x3aa0e1,_0x352ab8){const _0x2cac22=a101_0x1ecc,_0x541909=resolve(_0x3aa0e1,METADATA_FILE),_0x4dbdd1=readMetadataIfPresent(_0x541909);if(!_0x4dbdd1)return;if(_0x4dbdd1['appCode']!==_0x352ab8[_0x2cac22(0xbf)])return;if(!isRuntimeSkillScope(_0x4dbdd1[_0x2cac22(0xd8)])||!_0x352ab8[_0x2cac22(0xe6)]['has'](_0x4dbdd1['scope']))return;const _0x58b839=_0x4dbdd1[_0x2cac22(0xd5)]?.['trim']();if(!_0x58b839)return;if(_0x352ab8[_0x2cac22(0xdf)]&&_0x58b839!==_0x352ab8['code'])return;const _0x388c4b=_0x4dbdd1[_0x2cac22(0xd8)]+':'+_0x58b839,_0x4b934c=_0x352ab8[_0x2cac22(0xc5)]?[_0x352ab8[_0x2cac22(0xc5)]]:[],_0x48a66b=_0x425196[_0x2cac22(0xd1)](_0x388c4b);if(_0x48a66b){_0x352ab8[_0x2cac22(0xde)]===_0x2cac22(0xcd)&&(_0x48a66b[_0x2cac22(0xda)]=_0x3aa0e1,_0x48a66b['cacheDir']=_0x3aa0e1,_0x48a66b[_0x2cac22(0xcc)]=resolve(_0x3aa0e1,SKILL_FILE),_0x48a66b[_0x2cac22(0xd4)]=_0x541909);for(const _0x494534 of _0x4b934c){!_0x48a66b[_0x2cac22(0xc1)][_0x2cac22(0xc8)](_0x494534)&&_0x48a66b['linkedPaths'][_0x2cac22(0xcb)](_0x494534);}_0x48a66b[_0x2cac22(0xc1)][_0x2cac22(0xce)]();return;}_0x425196['set'](_0x388c4b,{..._0x4dbdd1,'tags':Array[_0x2cac22(0xe2)](_0x4dbdd1[_0x2cac22(0xe3)])?_0x4dbdd1['tags']:[],'scope':_0x4dbdd1['scope'],'source':_0x2cac22(0xc3),'dir':_0x3aa0e1,'cacheDir':_0x352ab8[_0x2cac22(0xde)]===_0x2cac22(0xcd)?_0x3aa0e1:undefined,'skillMdPath':resolve(_0x3aa0e1,SKILL_FILE),'metadataPath':_0x541909,'linkedPaths':_0x4b934c});}function compareLocalRuntimeSkills(_0x2ceca5,_0x24d002){const _0x327204=a101_0x1ecc,_0x321f97={'personal':0x0,'company':0x1,'builtin':0x2};return _0x321f97[_0x2ceca5[_0x327204(0xd8)]]-_0x321f97[_0x24d002['scope']]||_0x2ceca5[_0x327204(0xd5)][_0x327204(0xc6)](_0x24d002[_0x327204(0xd5)])||_0x2ceca5[_0x327204(0xda)][_0x327204(0xc6)](_0x24d002['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x28e445,_0x5a2578){const _0x517e2f=a102_0x3bf3,_0x5af36f=_0x28e445();while(!![]){try{const _0x147c36=parseInt(_0x517e2f(0xbd))/0x1+parseInt(_0x517e2f(0xb3))/0x2+parseInt(_0x517e2f(0xaf))/0x3+-parseInt(_0x517e2f(0xc2))/0x4*(-parseInt(_0x517e2f(0xb1))/0x5)+parseInt(_0x517e2f(0xbf))/0x6*(parseInt(_0x517e2f(0xc8))/0x7)+-parseInt(_0x517e2f(0xa7))/0x8+-parseInt(_0x517e2f(0xbe))/0x9;if(_0x147c36===_0x5a2578)break;else _0x5af36f['push'](_0x5af36f['shift']());}catch(_0x2cd3f6){_0x5af36f['push'](_0x5af36f['shift']());}}}(a102_0x37c3,0x20170));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0xbc8a4e){const _0x1e9745=a102_0x3bf3;return _0xbc8a4e[_0x1e9745(0xd2)]??Buffer[_0x1e9745(0xb5)](_0xbc8a4e[_0x1e9745(0xc7)]??'',_0x1e9745(0xb4));}export function fileText(_0x15d90b){const _0x1955db=a102_0x3bf3;return fileContent(_0x15d90b)[_0x1955db(0xb2)](_0x1955db(0xb4));}export function normalizeLocalFiles(_0x130232){const _0x489bca=a102_0x3bf3;if(!Array[_0x489bca(0xac)](_0x130232)||_0x130232[_0x489bca(0xb6)]===0x0)return[];const _0x1fe36f=new Map();for(const _0x12d03f of _0x130232){if(!_0x12d03f||typeof _0x12d03f!=='object'||typeof _0x12d03f[_0x489bca(0xae)]!==_0x489bca(0xab))throw CliErrors[_0x489bca(0xb8)](_0x489bca(0xce));const _0x5be95c=normalizeSkillRelativePath(_0x12d03f['path']);if(_0x1fe36f[_0x489bca(0xbb)](_0x5be95c))throw CliErrors[_0x489bca(0xb8)](_0x489bca(0xbc)+_0x5be95c);if(_0x12d03f['bytes']!==undefined&&!Buffer[_0x489bca(0xba)](_0x12d03f['bytes']))throw CliErrors['validation'](_0x489bca(0xa8)+_0x5be95c);if(_0x12d03f[_0x489bca(0xd2)]===undefined&&typeof _0x12d03f[_0x489bca(0xc7)]!==_0x489bca(0xab))throw CliErrors[_0x489bca(0xb8)](_0x489bca(0xc6)+_0x5be95c);const _0x204767=fileContent(_0x12d03f);_0x1fe36f[_0x489bca(0xa5)](_0x5be95c,{'path':_0x5be95c,'bytes':_0x204767});}return Array[_0x489bca(0xb5)](_0x1fe36f['values']())[_0x489bca(0xc1)](compareSkillFiles);}export function normalizeManifestFiles(_0x49e068){const _0x10cfaa=a102_0x3bf3;if(!Array[_0x10cfaa(0xac)](_0x49e068)||_0x49e068['length']===0x0)return[];const _0x3dbced=new Map();for(const _0x395dd6 of _0x49e068){if(!_0x395dd6||typeof _0x395dd6!=='object'||typeof _0x395dd6[_0x10cfaa(0xae)]!==_0x10cfaa(0xab))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1cc990=normalizeSkillRelativePath(_0x395dd6[_0x10cfaa(0xae)]);if(_0x3dbced['has'](_0x1cc990))throw CliErrors[_0x10cfaa(0xb8)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x1cc990);if(!isSha256Hex(_0x395dd6[_0x10cfaa(0xb9)]))throw CliErrors[_0x10cfaa(0xb8)](_0x10cfaa(0xa4)+_0x1cc990);if(!Number[_0x10cfaa(0xc0)](_0x395dd6[_0x10cfaa(0xcb)])||_0x395dd6['size']<0x0)throw CliErrors['validation'](_0x10cfaa(0xc3)+_0x1cc990);_0x3dbced[_0x10cfaa(0xa5)](_0x1cc990,{'path':_0x1cc990,'sha256':_0x395dd6[_0x10cfaa(0xb9)][_0x10cfaa(0xcc)](),'size':_0x395dd6['size']});}return Array[_0x10cfaa(0xb5)](_0x3dbced[_0x10cfaa(0xb7)]())[_0x10cfaa(0xc1)](compareSkillFiles);}export function scanSkillDirectory(_0x3bf882){const _0x31f9a6=realpathSync(_0x3bf882),_0x528d5d=[];function _0x3e3149(_0x7575f5){const _0x2bdc8b=a102_0x3bf3,_0x3f1642=readdirSync(_0x7575f5,{'withFileTypes':!![]})[_0x2bdc8b(0xc1)]((_0x2833f3,_0x1c885)=>_0x2833f3['name'][_0x2bdc8b(0xd0)](_0x1c885[_0x2bdc8b(0xb0)]));for(const _0x5dd72f of _0x3f1642){if(_0x5dd72f[_0x2bdc8b(0xd1)]()&&IGNORED_DIR_NAMES[_0x2bdc8b(0xbb)](_0x5dd72f[_0x2bdc8b(0xb0)]))continue;if(IGNORED_FILE_NAMES[_0x2bdc8b(0xbb)](_0x5dd72f[_0x2bdc8b(0xb0)]))continue;const _0x2a748a=resolve(_0x7575f5,_0x5dd72f[_0x2bdc8b(0xb0)]);if(_0x5dd72f[_0x2bdc8b(0xc4)]())throw CliErrors['validation'](_0x2bdc8b(0xc5)+_0x2a748a);const _0x987dab=toPosixPath(relative(_0x31f9a6,_0x2a748a));if(_0x5dd72f[_0x2bdc8b(0xd1)]()){_0x3e3149(_0x2a748a);continue;}if(!_0x5dd72f[_0x2bdc8b(0xaa)]())continue;validateSkillRelativePath(_0x987dab);const _0x498435=readFileSync(_0x2a748a);_0x528d5d[_0x2bdc8b(0xa9)]({'path':_0x987dab,'bytes':_0x498435});}}return _0x3e3149(_0x31f9a6),normalizeLocalFiles(_0x528d5d);}export function compareSkillFiles(_0x5a02b6,_0x136f0b){const _0xb12892=a102_0x3bf3;if(_0x5a02b6[_0xb12892(0xae)]===SKILL_FILE)return _0x136f0b[_0xb12892(0xae)]===SKILL_FILE?0x0:-0x1;if(_0x136f0b[_0xb12892(0xae)]===SKILL_FILE)return 0x1;return Buffer[_0xb12892(0xa3)](Buffer[_0xb12892(0xb5)](_0x5a02b6[_0xb12892(0xae)],_0xb12892(0xb4)),Buffer[_0xb12892(0xb5)](_0x136f0b['path'],'utf8'));}export function normalizeSkillRelativePath(_0x54b766){const _0xd0f1f1=a102_0x3bf3,_0x5b7d02=toPosixPath(_0x54b766[_0xd0f1f1(0xcd)]());return validateSkillRelativePath(_0x5b7d02),_0x5b7d02;}function a102_0x3bf3(_0x884c40,_0x55e1c0){_0x884c40=_0x884c40-0xa3;const _0x37c355=a102_0x37c3();let _0x3bf394=_0x37c355[_0x884c40];return _0x3bf394;}export function validateSkillRelativePath(_0x24d24b){const _0x44c737=a102_0x3bf3;if(!_0x24d24b||_0x24d24b['startsWith']('/')||_0x24d24b[_0x44c737(0xcf)]('//'))throw CliErrors[_0x44c737(0xb8)](_0x44c737(0xa6)+_0x24d24b);for(const _0x537a94 of _0x24d24b[_0x44c737(0xca)]('/')){if(!_0x537a94||_0x537a94==='.'||_0x537a94==='..')throw CliErrors[_0x44c737(0xb8)](_0x44c737(0xa6)+_0x24d24b);}}export function toPosixPath(_0x3e6ba7){const _0x8fcd86=a102_0x3bf3;return _0x3e6ba7[_0x8fcd86(0xc9)](/\\/g,'/');}export function isSha256Hex(_0x9aafdc){const _0x1364e5=a102_0x3bf3;return typeof _0x9aafdc===_0x1364e5(0xab)&&/^[a-fA-F0-9]{64}$/[_0x1364e5(0xad)](_0x9aafdc);}function a102_0x37c3(){const _0x69d6b4=['utf8','from','length','values','validation','sha256','isBuffer','has','Duplicate\x20Skill\x20file\x20path:\x20','52249ZJTWKA','2178639MGNeDs','150VLEHUl','isSafeInteger','sort','19892cEfRlY','Skill\x20file\x20size\x20is\x20invalid:\x20','isSymbolicLink','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','content','46725IFyOwR','replace','split','size','toLowerCase','trim','Skill\x20file\x20path\x20must\x20be\x20text.','includes','localeCompare','isDirectory','bytes','compare','Skill\x20file\x20sha256\x20is\x20invalid:\x20','set','Unsafe\x20Skill\x20file\x20path:\x20','670704sBUkEa','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','push','isFile','string','isArray','test','path','331671LhSsrb','name','65MMFHNw','toString','126038qvpxBW'];a102_0x37c3=function(){return _0x69d6b4;};return a102_0x37c3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4483c7,_0x43b909){const _0x24b6c1=a103_0x5cb7,_0x1937b6=_0x4483c7();while(!![]){try{const _0x2566bc=-parseInt(_0x24b6c1(0x1e3))/0x1+-parseInt(_0x24b6c1(0x205))/0x2+-parseInt(_0x24b6c1(0x1fc))/0x3+-parseInt(_0x24b6c1(0x212))/0x4*(parseInt(_0x24b6c1(0x1e2))/0x5)+parseInt(_0x24b6c1(0x1f7))/0x6*(parseInt(_0x24b6c1(0x20d))/0x7)+parseInt(_0x24b6c1(0x1f4))/0x8+parseInt(_0x24b6c1(0x20a))/0x9*(parseInt(_0x24b6c1(0x206))/0xa);if(_0x2566bc===_0x43b909)break;else _0x1937b6['push'](_0x1937b6['shift']());}catch(_0xf5dd69){_0x1937b6['push'](_0x1937b6['shift']());}}}(a103_0x4a4f,0xcefcd));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';function a103_0x5cb7(_0x5dac1c,_0x755e58){_0x5dac1c=_0x5dac1c-0x1e1;const _0x4a4f1e=a103_0x4a4f();let _0x5cb7bc=_0x4a4f1e[_0x5dac1c];return _0x5cb7bc;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x37e159,_0x2ceb4f,_0x367969){const _0x54c7fa=a103_0x5cb7,_0xae5962=requireSkillCode(_0x37e159),_0x105da0=requirePackageBytes(_0xae5962,_0x367969[_0x54c7fa(0x1fd)]),_0x1193b8=extractDownloadedPackage(_0x105da0),_0x370300=_0x1193b8[_0x54c7fa(0x1f0)](_0xeac414=>_0xeac414[_0x54c7fa(0x1e9)]===SKILL_FILE);if(!_0x370300)throw CliErrors[_0x54c7fa(0x207)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0xae5962);const _0x51cd89=withMaterializedSkillFrontmatter(_0x1193b8,_0x37e159,_0xae5962),_0x123e09=_0x51cd89[_0x54c7fa(0x1f0)](_0x289bf2=>_0x289bf2[_0x54c7fa(0x1e9)]===SKILL_FILE),_0x63ac49=fileText(_0x123e09),_0x2b3283=getRuntimeSkillDir(_0x367969[_0x54c7fa(0x20f)],_0x367969[_0x54c7fa(0x201)],_0x367969[_0x54c7fa(0x210)],_0x2ceb4f,_0xae5962,_0x367969[_0x54c7fa(0x1ef)]),_0x202df3=resolve(_0x2b3283,SKILL_FILE),_0x2a3ab8=resolve(_0x2b3283,METADATA_FILE),_0x7db6e4=contentHash(_0x63ac49),_0x3f4564=readMetadataIfPresent(_0x2a3ab8)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x2b3283,_0x2a3ab8,_0x51cd89,_0x367969[_0x54c7fa(0x1fb)]===!![]),mkdirSync(_0x2b3283,{'recursive':!![],'mode':0x1c0});const _0xf6d23a=existsSync(_0x202df3)?readFileSync(_0x202df3,_0x54c7fa(0x1e1)):undefined;return materializeFiles(_0x2b3283,_0x51cd89),removeStaleManagedFiles(_0x2b3283,_0x3f4564,_0x51cd89),writeJsonAtomic(_0x2a3ab8,buildMetadata(_0x37e159,_0x2ceb4f,_0x367969['appCode'],_0x7db6e4,_0x367969[_0x54c7fa(0x1eb)],_0x51cd89,_0x105da0)),{'skill':_0x37e159,'scope':_0x2ceb4f,'dir':_0x2b3283,'skillMdPath':_0x202df3,'metadataPath':_0x2a3ab8,'contentHash':_0x7db6e4,'changed':_0xf6d23a!==_0x63ac49};}function withMaterializedSkillFrontmatter(_0x28654f,_0x228fc8,_0x22583e){const _0x48fed8=a103_0x5cb7,_0x3fae2a=skillDisplayName(_0x228fc8,_0x22583e),_0x498942=_0x228fc8['description']?.[_0x48fed8(0x20e)]()||_0x3fae2a||_0x22583e;return normalizeLocalFiles(_0x28654f)[_0x48fed8(0x20c)](_0xd4b601=>{const _0x26498a=_0x48fed8,_0x4412b7=fileText(_0xd4b601);if(_0xd4b601[_0x26498a(0x1e9)]!==SKILL_FILE)return _0xd4b601;if(hasYamlFrontmatter(_0x4412b7))return{'path':_0xd4b601[_0x26498a(0x1e9)],'content':withSyncedDisplayName(_0x4412b7,_0x3fae2a)};return{'path':_0xd4b601[_0x26498a(0x1e9)],'content':prependSkillFrontmatter(_0x4412b7,{'name':_0x22583e,'displayName':_0x3fae2a,'description':_0x498942})};});}function hasYamlFrontmatter(_0x12b7f4){const _0x591d25=a103_0x5cb7;return/^\uFEFF?---\s*\r?\n/[_0x591d25(0x1e7)](_0x12b7f4);}function prependSkillFrontmatter(_0x3e2b4f,_0x557869){const _0x2a20e5=a103_0x5cb7,_0x38d171=_0x3e2b4f['replace'](/^\uFEFF/,'');return[_0x2a20e5(0x20b),'name:\x20'+yamlString(_0x557869[_0x2a20e5(0x1f9)]),_0x557869['displayName']?_0x2a20e5(0x1fa)+yamlString(_0x557869[_0x2a20e5(0x1f8)]):undefined,_0x2a20e5(0x204)+yamlString(_0x557869['description']),'---','',_0x38d171]['filter'](_0x5f3b83=>_0x5f3b83!==undefined)[_0x2a20e5(0x1f2)]('\x0a');}function a103_0x4a4f(){const _0x26549b=['paths','find','fileHashes','join','delete','4785504RQTKuS','---\x0a','toString','593790qzpJfK','displayName','name','displayName:\x20','force','3388500vVdigI','packageBytes','Managed\x20file\x20was\x20removed\x20locally:\x20','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','accessKey','contents','slice','description:\x20','133506UkMOxV','1210Utypud','validation','match','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','234720FYIcEn','---','map','7SaAPEl','trim','env','appCode','replace','12ZEtCcd','utf8','987720asovsd','1216127asOxEU','keys','has','isFile','test','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','path','length','pulledAt','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','skillName','stringify'];a103_0x4a4f=function(){return _0x26549b;};return a103_0x4a4f();}function yamlString(_0x3dfb58){const _0x2152a9=a103_0x5cb7;return JSON[_0x2152a9(0x1ee)](_0x3dfb58[_0x2152a9(0x211)](/\r/g,'')[_0x2152a9(0x20e)]());}function skillDisplayName(_0x329bcc,_0x5e6fd4){const _0x15b4fe=a103_0x5cb7,_0x599728=_0x329bcc[_0x15b4fe(0x1ed)]?.[_0x15b4fe(0x20e)]();return _0x599728||_0x5e6fd4;}function withSyncedDisplayName(_0x147b6e,_0x5a1499){const _0x51ead7=a103_0x5cb7,_0x4b9305=_0x147b6e[_0x51ead7(0x208)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4b9305)return _0x147b6e;const _0x352e9b=_0x4b9305[0x1]??'',_0x1a3343=_0x4b9305[0x2]??'',_0x5d23b3=parseDocument(_0x1a3343);if(_0x5d23b3['errors']['length']>0x0||!isMap(_0x5d23b3[_0x51ead7(0x202)]))return _0x147b6e;if(_0x5a1499)_0x5d23b3['set'](_0x51ead7(0x1f8),_0x5a1499);else{if(_0x5d23b3['has']('displayName'))_0x5d23b3[_0x51ead7(0x1f3)](_0x51ead7(0x1f8));else return _0x147b6e;}forceBlockCollections(_0x5d23b3[_0x51ead7(0x202)]);const _0x25b753=_0x5d23b3[_0x51ead7(0x1f6)]({'lineWidth':0x0})['trimEnd'](),_0x2b56a1=_0x147b6e[_0x51ead7(0x203)](_0x4b9305[0x0][_0x51ead7(0x1ea)])[_0x51ead7(0x211)](/^\r?\n/,'');return _0x352e9b+_0x51ead7(0x1f5)+_0x25b753+'\x0a---\x0a\x0a'+_0x2b56a1;}function forceBlockCollections(_0x2851b6){if(!isNode(_0x2851b6))return;visit(_0x2851b6,(_0x4837b3,_0x2dbe93)=>{isCollection(_0x2dbe93)&&(_0x2dbe93['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x489d94,_0x1fcf54,_0x4f6430,_0x5eb95a){const _0x1b83d2=a103_0x5cb7;if(_0x5eb95a||!existsSync(_0x1fcf54))return;const _0x5f1523=readMetadataIfPresent(_0x1fcf54);if(!_0x5f1523)return;const _0x56b544=_0x5f1523[_0x1b83d2(0x1f1)]&&Object[_0x1b83d2(0x1e4)](_0x5f1523[_0x1b83d2(0x1f1)])[_0x1b83d2(0x1ea)]>0x0?_0x5f1523[_0x1b83d2(0x1f1)]:undefined;if(_0x56b544)for(const [_0x388270,_0x28bfd7]of Object['entries'](_0x56b544)){const _0x5bb5ce=resolveManagedFilePath(_0x489d94,_0x388270);if(!existsSync(_0x5bb5ce))throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1e8)+_0x489d94,_0x1b83d2(0x1fe)+_0x388270);const _0x324977=lstatSync(_0x5bb5ce);if(!_0x324977['isFile']())throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1e8)+_0x489d94,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x388270);const _0x373e72=bufferSha256(readFileSync(_0x5bb5ce));if(_0x373e72!==_0x28bfd7)throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1e8)+_0x489d94+'.\x20Changed\x20file:\x20'+_0x388270,_0x1b83d2(0x200)+_0x388270);}else{const _0x139890=resolve(_0x489d94,SKILL_FILE);if(existsSync(_0x139890)&&_0x5f1523['contentHash']){const _0xf4b10=contentHash(readFileSync(_0x139890,_0x1b83d2(0x1e1)));if(_0xf4b10!==_0x5f1523['contentHash'])throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1ec)+_0x139890,_0x1b83d2(0x209));}}for(const _0x2bff41 of normalizeLocalFiles(_0x4f6430)){if(_0x56b544?.[_0x2bff41[_0x1b83d2(0x1e9)]])continue;if(!_0x56b544&&_0x2bff41[_0x1b83d2(0x1e9)]===SKILL_FILE)continue;const _0x3fa082=resolveManagedFilePath(_0x489d94,_0x2bff41[_0x1b83d2(0x1e9)]);if(!existsSync(_0x3fa082))continue;const _0x133793=lstatSync(_0x3fa082);if(!_0x133793[_0x1b83d2(0x1e6)]())throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1e8)+_0x489d94,_0x1b83d2(0x1ff)+_0x2bff41[_0x1b83d2(0x1e9)]);const _0x3b3085=bufferSha256(readFileSync(_0x3fa082));if(_0x3b3085!==fileHash(_0x2bff41))throw CliErrors[_0x1b83d2(0x207)](_0x1b83d2(0x1e8)+_0x489d94,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x2bff41[_0x1b83d2(0x1e9)]);}}function materializeFiles(_0xc3e3cb,_0xe4f5f1){const _0x1bb7f2=a103_0x5cb7;for(const _0x578903 of normalizeLocalFiles(_0xe4f5f1)){const _0x5e2b4e=resolveManagedFilePath(_0xc3e3cb,_0x578903[_0x1bb7f2(0x1e9)]);mkdirSync(dirname(_0x5e2b4e),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x5e2b4e,fileContent(_0x578903),0x180);}}function removeStaleManagedFiles(_0x3b9187,_0x16ebea,_0x53c56d){const _0xc1a044=a103_0x5cb7;if(!_0x16ebea)return;const _0x15405e=new Set(normalizeLocalFiles(_0x53c56d)[_0xc1a044(0x20c)](_0x599194=>_0x599194[_0xc1a044(0x1e9)]));for(const _0x1e4ed5 of Object[_0xc1a044(0x1e4)](_0x16ebea)){if(_0x15405e[_0xc1a044(0x1e5)](_0x1e4ed5))continue;const _0x399984=resolveManagedFilePath(_0x3b9187,_0x1e4ed5);existsSync(_0x399984)&&lstatSync(_0x399984)[_0xc1a044(0x1e6)]()&&rmSync(_0x399984,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2aa1a3,_0x4ee134){const _0x17693a=a104_0x22a5,_0x3d8467=_0x2aa1a3();while(!![]){try{const _0x30eac6=parseInt(_0x17693a(0xe0))/0x1*(parseInt(_0x17693a(0xf2))/0x2)+-parseInt(_0x17693a(0xe2))/0x3+parseInt(_0x17693a(0xeb))/0x4*(-parseInt(_0x17693a(0xe5))/0x5)+parseInt(_0x17693a(0xda))/0x6*(-parseInt(_0x17693a(0xec))/0x7)+-parseInt(_0x17693a(0xf6))/0x8+-parseInt(_0x17693a(0xf0))/0x9+parseInt(_0x17693a(0xf4))/0xa;if(_0x30eac6===_0x4ee134)break;else _0x3d8467['push'](_0x3d8467['shift']());}catch(_0x31f61d){_0x3d8467['push'](_0x3d8467['shift']());}}}(a104_0x589c,0x51c40));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';function a104_0x589c(){const _0x44fb76=['object','path','2361444BixHHz','Invalid\x20','tenantCode','manifest','description','isArray','11726dPrkXY','files','1281390mhYEJI','utf8','parse','5XUoSAZ','personal','trim','status','ossPath','length','1796996OjjNuv','7mTJhqL','zipSize','tags','zipSha256','2492604MwSeCd','skillName','52cuulPp','toISOString','20709130lScQUr','sourceSessionId','3951744iglFEY','version','map','forkedFromSkillId','hasUpstreamUpdate','validation'];a104_0x589c=function(){return _0x44fb76;};return a104_0x589c();}export function buildMetadata(_0x4ffc76,_0x39bcef,_0x189837,_0x19ac6f,_0x56fe75,_0x3ea7b1,_0x54c6f3){const _0x4238c8=a104_0x22a5,_0x1a54af=_0x3ea7b1?normalizeLocalFiles(_0x3ea7b1):[],_0x34eacc=!_0x54c6f3&&_0x1a54af[_0x4238c8(0xea)]>0x0?buildSkillPackage(_0x1a54af):undefined,_0x1cfd6e=_0x54c6f3?bufferSha256(_0x54c6f3):_0x34eacc?.[_0x4238c8(0xdd)][_0x4238c8(0xef)],_0x2a6f33=_0x54c6f3?.[_0x4238c8(0xea)]??_0x34eacc?.[_0x4238c8(0xdd)][_0x4238c8(0xed)],_0x5158ef=_0x1a54af['length']>0x0?Object['fromEntries'](_0x1a54af[_0x4238c8(0xf8)](_0x2d3cca=>[_0x2d3cca[_0x4238c8(0xd9)],fileHash(_0x2d3cca)])):undefined;return{'schemaVersion':_0x1a54af[_0x4238c8(0xea)]>0x0?0x2:0x1,'id':_0x4ffc76['id'],'appCode':_0x189837,'skillCode':requireSkillCode(_0x4ffc76),'skillName':_0x4ffc76[_0x4238c8(0xf1)],'description':_0x4ffc76[_0x4238c8(0xde)],'scope':_0x39bcef,'readonly':_0x39bcef!==_0x4238c8(0xe6)||_0x4ffc76['readonly']===!![],'tenantCode':_0x4ffc76[_0x4238c8(0xdc)],'userId':_0x4ffc76['userId'],'version':_0x4ffc76[_0x4238c8(0xf7)],'status':_0x4ffc76[_0x4238c8(0xe8)],'tags':Array['isArray'](_0x4ffc76[_0x4238c8(0xee)])?_0x4ffc76['tags']:[],'hasUpstreamUpdate':_0x4ffc76[_0x4238c8(0xfa)],'forkedFromSkillId':_0x4ffc76[_0x4238c8(0xf9)],'forkedFromVersion':_0x4ffc76['forkedFromVersion'],'sourceSessionId':_0x4ffc76[_0x4238c8(0xf5)],'contentHash':_0x19ac6f,'fileHashes':_0x5158ef,'treeHash':_0x1a54af[_0x4238c8(0xea)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x1a54af)):undefined,'ossPath':remoteManifestOssPath(_0x4ffc76[_0x4238c8(0xe1)]),'zipSha256':_0x1cfd6e,'zipSize':_0x2a6f33,'files':_0x1a54af[_0x4238c8(0xea)]>0x0?_0x1a54af[_0x4238c8(0xf8)](_0x7eebdb=>({'path':_0x7eebdb[_0x4238c8(0xd9)],'hash':fileHash(_0x7eebdb),'size':fileContent(_0x7eebdb)[_0x4238c8(0xea)]})):undefined,'pulledAt':_0x56fe75??new Date()[_0x4238c8(0xf3)]()};}export function requireSkillCode(_0x167794){const _0x5c6221=a104_0x22a5,_0x1f9fa3=_0x167794['skillCode']?.[_0x5c6221(0xe7)]();if(!_0x1f9fa3)throw CliErrors[_0x5c6221(0xd7)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x1f9fa3;}function a104_0x22a5(_0x4507e4,_0x548163){_0x4507e4=_0x4507e4-0xd7;const _0x589c5d=a104_0x589c();let _0x22a589=_0x589c5d[_0x4507e4];return _0x22a589;}export function readMetadataIfPresent(_0x570b2e){const _0x24dda6=a104_0x22a5;if(!existsSync(_0x570b2e))return undefined;try{const _0x31b5dc=JSON[_0x24dda6(0xe4)](readFileSync(_0x570b2e,_0x24dda6(0xe3)));return _0x31b5dc;}catch{throw CliErrors[_0x24dda6(0xd7)](_0x24dda6(0xdb)+METADATA_FILE+':\x20'+_0x570b2e);}}function remoteManifestOssPath(_0x3e35de){const _0x42a552=a104_0x22a5;if(!_0x3e35de||typeof _0x3e35de!==_0x42a552(0xd8)||Array[_0x42a552(0xdf)](_0x3e35de))return undefined;const _0x46889a=_0x3e35de[_0x42a552(0xe9)];return typeof _0x46889a==='string'&&_0x46889a[_0x42a552(0xe7)]()?_0x46889a[_0x42a552(0xe7)]():undefined;}
|