@lovrabet/lovrabet-cli 2.1.8-beta.2 → 2.1.8
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/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/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/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
|
-
const a40_0x429bf4=a40_0x23f9;(function(_0x1d59e3,_0x51eedb){const _0xba4d8a=a40_0x23f9,_0x20a989=_0x1d59e3();while(!![]){try{const _0x29c8be=parseInt(_0xba4d8a(0x151))/0x1*(parseInt(_0xba4d8a(0x17c))/0x2)+-parseInt(_0xba4d8a(0x178))/0x3+-parseInt(_0xba4d8a(0x17d))/0x4+-parseInt(_0xba4d8a(0x191))/0x5+parseInt(_0xba4d8a(0x16a))/0x6*(parseInt(_0xba4d8a(0x167))/0x7)+parseInt(_0xba4d8a(0x152))/0x8+-parseInt(_0xba4d8a(0x183))/0x9;if(_0x29c8be===_0x51eedb)break;else _0x20a989['push'](_0x20a989['shift']());}catch(_0x1550c1){_0x20a989['push'](_0x20a989['shift']());}}}(a40_0x2a71,0x2351a));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a40_0x23f9(_0x4430b4,_0x396047){_0x4430b4=_0x4430b4-0x14a;const _0x2a7189=a40_0x2a71();let _0x23f9cf=_0x2a7189[_0x4430b4];return _0x23f9cf;}import{dirname,resolve}from'node:path';function a40_0x2a71(){const _0x44caa2=['warnings','string','description','slice','cliPath','ENOENT','update','serviceCode','map','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Remove\x20or\x20migrate\x20','utf8','splice','validation','13541fpctJF','1825904YDaYcL','toISOString','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','normalizedManifest','source','$.services[','localeCompare','isArray','risk','parse','service.json','errors','now','registryIndex','importedAt','Local\x20service\x20not\x20found:\x20','sha256','invalid','].manifest','stringify','303793VbETEg','CliError','hex','18UCbSAD','name','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','Invalid\x20service\x20registry\x20JSON:\x20','empty','.tmp','message','sourceHash','updatedAt','schemaVersion','manifest','reduce','flatMap','filePath','371838zmzIcm','find','push','length','20tTSwku','568676LNxHnb','registry','services\x20must\x20be\x20an\x20array','trim','join','Invalid\x20service\x20manifest\x20JSON:\x20','369657PtBXoX','Cannot\x20write\x20service\x20registry:\x20','sort','target','Service\x20manifest\x20file\x20not\x20found:\x20','object','command','path','service','startsWith','commands','homeDir','version','services','209955lYBwwu','manifests','commandCount','kind','findIndex','report'];a40_0x2a71=function(){return _0x44caa2;};return a40_0x2a71();}import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x429bf4(0x15d);export function getServiceRegistryPath(_0xe5d804={}){const _0x53af49=a40_0x429bf4;return resolve(_0xe5d804[_0x53af49(0x18e)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3b4500={}){const _0x5c5c23=a40_0x429bf4,_0x14686a=getServiceRegistryPath(_0x3b4500);if(!existsSync(_0x14686a))return emptyServiceRegistry();try{const _0x456fc5=readFileSync(_0x14686a,_0x5c5c23(0x14e));if(!_0x456fc5['trim']())return emptyServiceRegistry();const _0x44762a=JSON['parse'](_0x456fc5);if(_0x44762a[_0x5c5c23(0x173)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x5c5c23(0x150)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x44762a[_0x5c5c23(0x173)]),_0x5c5c23(0x14d)+_0x14686a+'.');if(!Array[_0x5c5c23(0x15a)](_0x44762a['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x44762a[_0x5c5c23(0x172)],'services':_0x44762a[_0x5c5c23(0x190)]};}catch(_0x1c1e17){if(_0x1c1e17 instanceof Error&&_0x1c1e17[_0x5c5c23(0x16b)]===_0x5c5c23(0x168))throw _0x1c1e17;throw CliErrors[_0x5c5c23(0x150)](_0x5c5c23(0x16d)+_0x14686a,_0x5c5c23(0x154));}}export function writeServiceRegistry(_0x49912d,_0x5f3e2f={}){const _0x57f515=a40_0x429bf4,_0x57e997=getServiceRegistryPath(_0x5f3e2f),_0x4243f9=dirname(_0x57e997);!existsSync(_0x4243f9)&&mkdirSync(_0x4243f9,{'recursive':!![]});const _0x3f3a8b=_0x57e997+_0x57f515(0x16f);try{writeFileSync(_0x3f3a8b,JSON[_0x57f515(0x166)](_0x49912d,null,0x2)+'\x0a',{'encoding':_0x57f515(0x14e),'mode':0x180}),renameSync(_0x3f3a8b,_0x57e997);}catch(_0xd747c3){try{unlinkSync(_0x3f3a8b);}catch{}if(_0xd747c3?.['code']===_0x57f515(0x19c))throw CliErrors[_0x57f515(0x150)](_0x57f515(0x184)+_0x57e997);throw _0xd747c3;}return _0x57e997;}export function loadServiceManifestFromFile(_0x4981a9){const _0xa9454a=a40_0x429bf4,_0x1f4e7c=resolve(_0x4981a9);if(!existsSync(_0x1f4e7c))throw CliErrors[_0xa9454a(0x150)](_0xa9454a(0x187)+_0x4981a9);let _0x19a7b7;const _0x94330f=readFileSync(_0x1f4e7c,_0xa9454a(0x14e));try{_0x19a7b7=JSON[_0xa9454a(0x15c)](_0x94330f);}catch{throw CliErrors[_0xa9454a(0x150)](_0xa9454a(0x182)+_0x4981a9,_0xa9454a(0x155));}const _0x1b9461=sha256(_0x94330f),_0x2998f5=extractLoadedServiceManifests(_0x19a7b7,_0x1b9461),_0x275529=aggregateValidationReports(_0x2998f5),_0x48fd98=_0x2998f5[0x0];return{'filePath':_0x1f4e7c,'hash':_0x1b9461,'kind':isServiceRegistryLike(_0x19a7b7)?_0xa9454a(0x17e):_0xa9454a(0x174),'manifest':_0x48fd98?.[_0xa9454a(0x174)]??_0x19a7b7,'report':_0x275529,'normalizedManifest':_0x2998f5[_0xa9454a(0x17b)]===0x1?_0x48fd98?.[_0xa9454a(0x156)]:undefined,'manifests':_0x2998f5};}export function importServiceManifest(_0x57cc38,_0x4b100c={}){const _0x551974=a40_0x429bf4,_0x898907=loadServiceManifestFromFile(_0x57cc38);if(!_0x898907[_0x551974(0x196)]['ok'])throw CliErrors[_0x551974(0x150)](formatValidationFailure(_0x898907[_0x551974(0x196)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x898907[_0x551974(0x192)][_0x551974(0x17b)]===0x0)throw CliErrors['validation'](_0x551974(0x16c),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x30c129=readServiceRegistry(_0x4b100c),_0x546b0f=(_0x4b100c['now']??(()=>new Date()))()[_0x551974(0x153)](),_0xeba832=[];let _0x4b937d=0x0,_0x207cf1=0x0;for(const _0x3827b7 of _0x898907['manifests']){if(!_0x3827b7[_0x551974(0x156)])continue;const _0xe070f4=_0x3827b7['normalizedManifest'][_0x551974(0x18b)]['code'],_0x60403c={'serviceCode':_0xe070f4,'version':_0x3827b7[_0x551974(0x156)][_0x551974(0x18f)],'importedAt':_0x546b0f,'source':{'type':'file','path':_0x898907[_0x551974(0x177)],'hash':_0x3827b7[_0x551974(0x171)]},'manifest':_0x3827b7[_0x551974(0x174)],'normalizedManifest':_0x3827b7[_0x551974(0x156)]},_0xe656d1=_0x30c129[_0x551974(0x190)][_0x551974(0x195)](_0x158548=>_0x158548['serviceCode']===_0xe070f4);_0xe656d1>=0x0?(_0x30c129[_0x551974(0x190)][_0xe656d1]=_0x60403c,_0x207cf1++):(_0x30c129[_0x551974(0x190)]['push'](_0x60403c),_0x4b937d++),_0xeba832[_0x551974(0x17a)](_0x60403c);}_0x30c129[_0x551974(0x190)][_0x551974(0x185)]((_0x454b64,_0x322dd9)=>_0x454b64[_0x551974(0x14a)][_0x551974(0x159)](_0x322dd9[_0x551974(0x14a)])),_0x30c129[_0x551974(0x172)]=_0x546b0f;const _0x5d4759=writeServiceRegistry(_0x30c129,_0x4b100c);return{'registryPath':_0x5d4759,'entry':_0xeba832[0x0],'replaced':_0xeba832[_0x551974(0x17b)]===0x1?_0x207cf1===0x1:_0x207cf1>0x0,'entries':_0xeba832,'imported':_0x4b937d,'updated':_0x207cf1,'serviceCount':_0x30c129[_0x551974(0x190)]['length']};}export function exportServiceManifest(_0x1a0937,_0x489d65,_0x23c9c0={}){const _0x5d0c94=a40_0x429bf4,_0xc24e8c=getServiceRegistryPath(_0x23c9c0),_0x368248=getLocalServiceEntry(_0x1a0937,_0x23c9c0);if(!_0x368248)throw CliErrors[_0x5d0c94(0x150)](_0x5d0c94(0x162)+_0x1a0937,_0x5d0c94(0x14c));const _0x170ad0=resolve(_0x489d65),_0x132753=dirname(_0x170ad0);return!existsSync(_0x132753)&&mkdirSync(_0x132753,{'recursive':!![]}),writeFileSync(_0x170ad0,JSON[_0x5d0c94(0x166)](_0x368248[_0x5d0c94(0x174)],null,0x2)+'\x0a',{'encoding':_0x5d0c94(0x14e),'mode':0x180}),{'registryPath':_0xc24e8c,'filePath':_0x170ad0,'entry':_0x368248};}export function removeServiceManifest(_0x203159,_0xd66e55={}){const _0x2335ae=a40_0x429bf4,_0x5a9d34=readServiceRegistry(_0xd66e55),_0x41f406=_0x203159[_0x2335ae(0x180)](),_0x185afe=_0x5a9d34[_0x2335ae(0x190)][_0x2335ae(0x195)](_0xdb1a66=>_0xdb1a66[_0x2335ae(0x14a)]===_0x41f406);if(_0x185afe<0x0)throw CliErrors['validation'](_0x2335ae(0x162)+_0x41f406,_0x2335ae(0x14c));const [_0x24e0f6]=_0x5a9d34[_0x2335ae(0x190)][_0x2335ae(0x14f)](_0x185afe,0x1),_0x47ebdd=(_0xd66e55[_0x2335ae(0x15f)]??(()=>new Date()))()[_0x2335ae(0x153)]();_0x5a9d34['updatedAt']=_0x47ebdd;const _0x3136e4=writeServiceRegistry(_0x5a9d34,_0xd66e55);return{'registryPath':_0x3136e4,'entry':_0x24e0f6,'serviceCount':_0x5a9d34['services'][_0x2335ae(0x17b)]};}export function listLocalServices(_0x546242={}){const _0x5ed2ad=a40_0x429bf4;return readServiceRegistry(_0x546242)[_0x5ed2ad(0x190)];}export function getLocalServiceEntry(_0x973861,_0x39d5ad={}){const _0x5461f5=a40_0x429bf4;return readServiceRegistry(_0x39d5ad)[_0x5461f5(0x190)][_0x5461f5(0x179)](_0x3eac2a=>_0x3eac2a[_0x5461f5(0x14a)]===_0x973861['trim']());}export function listLocalServiceTrees(_0x4553e={}){const _0xc89b34=a40_0x429bf4;return readServiceRegistry(_0x4553e)['services'][_0xc89b34(0x14b)](_0xbafcb6=>_0xbafcb6[_0xc89b34(0x156)]);}export function inspectServiceRegistry(_0x563311={}){const _0x4aa78c=a40_0x429bf4,_0x31a1be=getServiceRegistryPath(_0x563311);if(!existsSync(_0x31a1be))return emptyServiceRegistryInspection(_0x31a1be,'missing',![]);try{const _0x3206ea=readFileSync(_0x31a1be,_0x4aa78c(0x14e));if(!_0x3206ea[_0x4aa78c(0x180)]())return emptyServiceRegistryInspection(_0x31a1be,_0x4aa78c(0x16e),!![]);const _0x393b4e=JSON[_0x4aa78c(0x15c)](_0x3206ea);if(_0x393b4e[_0x4aa78c(0x173)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x31a1be,_0x4aa78c(0x164),!![]),'schemaVersion':_0x393b4e[_0x4aa78c(0x173)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x393b4e['schemaVersion'])};if(!Array[_0x4aa78c(0x15a)](_0x393b4e[_0x4aa78c(0x190)]))return{...emptyServiceRegistryInspection(_0x31a1be,_0x4aa78c(0x164),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x393b4e['updatedAt'],'message':_0x4aa78c(0x17f)};const _0x43dc9c=_0x393b4e[_0x4aa78c(0x190)][_0x4aa78c(0x14b)](summarizeLocalServiceEntry);return{'registryPath':_0x31a1be,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x393b4e[_0x4aa78c(0x172)],'serviceCount':_0x43dc9c['length'],'commandCount':_0x43dc9c[_0x4aa78c(0x175)]((_0x401c54,_0x2af51f)=>_0x401c54+_0x2af51f[_0x4aa78c(0x193)],0x0),'services':_0x43dc9c};}catch(_0x2ba81e){return{...emptyServiceRegistryInspection(_0x31a1be,_0x4aa78c(0x164),!![]),'message':_0x2ba81e instanceof Error?_0x2ba81e[_0x4aa78c(0x170)]:String(_0x2ba81e)};}}export function formatValidationFailure(_0x164e19){const _0x2db630=a40_0x429bf4,_0x3df705=_0x164e19[_0x2db630(0x15e)][_0x2db630(0x14b)](_0x977ecb=>_0x977ecb['path']+':\x20'+_0x977ecb[_0x2db630(0x170)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x3df705[_0x2db630(0x181)]('\x0a');}function extractLoadedServiceManifests(_0x22c28f,_0x4bce89){const _0xd9439a=a40_0x429bf4;if(!isServiceRegistryLike(_0x22c28f)){const _0x161910=_0x22c28f,_0x2dbd26=validateServiceTreeManifest(_0x161910);return[{'manifest':_0x161910,'report':_0x2dbd26,'normalizedManifest':_0x2dbd26['ok']?normalizeServiceTreeManifest(_0x161910):undefined,'sourceHash':_0x4bce89}];}return _0x22c28f[_0xd9439a(0x190)][_0xd9439a(0x14b)]((_0x5ea5cd,_0x6f9593)=>{const _0x4cc296=_0xd9439a,_0x2d8c10=isObjectRecord(_0x5ea5cd)?_0x5ea5cd['manifest']:undefined,_0x4ee4d7=validateServiceTreeManifest(_0x2d8c10),_0x25be52=isObjectRecord(_0x5ea5cd)&&typeof _0x5ea5cd[_0x4cc296(0x14a)]===_0x4cc296(0x198)?_0x5ea5cd[_0x4cc296(0x14a)]:undefined;return{'manifest':_0x2d8c10,'report':_0x4ee4d7,'normalizedManifest':_0x4ee4d7['ok']?normalizeServiceTreeManifest(_0x2d8c10):undefined,'sourceHash':sha256(JSON['stringify'](_0x2d8c10,null,0x2)+'\x0a'),'registryIndex':_0x6f9593,'registryServiceCode':_0x25be52};});}function aggregateValidationReports(_0x30e170){const _0x52f364=a40_0x429bf4,_0x17a71b=_0x30e170[_0x52f364(0x176)](_0x271a41=>_0x271a41['registryIndex']===undefined?_0x271a41[_0x52f364(0x196)][_0x52f364(0x15e)]:_0x271a41[_0x52f364(0x196)][_0x52f364(0x15e)]['map'](_0x5e20f2=>({..._0x5e20f2,'path':prefixRegistryIssuePath(_0x271a41['registryIndex'],_0x5e20f2[_0x52f364(0x18a)])}))),_0x35611d=_0x30e170['flatMap'](_0x5948cb=>_0x5948cb[_0x52f364(0x160)]===undefined?_0x5948cb[_0x52f364(0x196)][_0x52f364(0x197)]:_0x5948cb[_0x52f364(0x196)][_0x52f364(0x197)][_0x52f364(0x14b)](_0x57403b=>({..._0x57403b,'path':prefixRegistryIssuePath(_0x5948cb['registryIndex'],_0x57403b['path'])})));return{'ok':_0x17a71b[_0x52f364(0x17b)]===0x0,'errors':_0x17a71b,'warnings':_0x35611d};}function prefixRegistryIssuePath(_0x5456e9,_0x3e6e4a){const _0x382e61=a40_0x429bf4;if(_0x3e6e4a==='$')return _0x382e61(0x158)+_0x5456e9+_0x382e61(0x165);if(_0x3e6e4a[_0x382e61(0x18c)]('$.'))return _0x382e61(0x158)+_0x5456e9+_0x382e61(0x165)+_0x3e6e4a[_0x382e61(0x19a)](0x1);if(_0x3e6e4a[_0x382e61(0x18c)]('$['))return _0x382e61(0x158)+_0x5456e9+'].manifest'+_0x3e6e4a[_0x382e61(0x19a)](0x1);return _0x382e61(0x158)+_0x5456e9+'].manifest.'+_0x3e6e4a;}function isServiceRegistryLike(_0x3ba4e1){const _0x2e9c2f=a40_0x429bf4;return isObjectRecord(_0x3ba4e1)&&_0x3ba4e1[_0x2e9c2f(0x173)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x2e9c2f(0x15a)](_0x3ba4e1['services']);}function isObjectRecord(_0x1cb85f){const _0x12e4c7=a40_0x429bf4;return Boolean(_0x1cb85f)&&typeof _0x1cb85f===_0x12e4c7(0x188)&&!Array[_0x12e4c7(0x15a)](_0x1cb85f);}function emptyServiceRegistryInspection(_0x5988c9,_0xf529fc,_0x2d61c5){return{'registryPath':_0x5988c9,'exists':_0x2d61c5,'status':_0xf529fc,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x19520a){const _0x14897a=a40_0x429bf4,_0x94fbbb=_0x19520a['normalizedManifest'],_0x481455=_0x94fbbb[_0x14897a(0x18d)]['map'](_0x25f3b6=>({'path':_0x25f3b6[_0x14897a(0x19b)],'description':_0x25f3b6[_0x14897a(0x199)],'risk':_0x25f3b6[_0x14897a(0x15b)],'targetKind':_0x25f3b6[_0x14897a(0x186)][_0x14897a(0x194)],'targetCommand':_0x25f3b6[_0x14897a(0x186)][_0x14897a(0x189)]}));return{'serviceCode':_0x19520a[_0x14897a(0x14a)],'name':_0x94fbbb[_0x14897a(0x18b)][_0x14897a(0x16b)],'description':_0x94fbbb[_0x14897a(0x18b)][_0x14897a(0x199)],'version':_0x19520a[_0x14897a(0x18f)],'importedAt':_0x19520a[_0x14897a(0x161)],'source':_0x19520a[_0x14897a(0x157)],'commandCount':_0x481455[_0x14897a(0x17b)],'commands':_0x481455};}function sha256(_0x40b4f1){const _0x532707=a40_0x429bf4;return createHash(_0x532707(0x163))[_0x532707(0x19d)](_0x40b4f1)['digest'](_0x532707(0x169));}
|
|
1
|
+
const a40_0x4e3a7e=a40_0x5b08;(function(_0x4a48f6,_0x113272){const _0x5577bd=a40_0x5b08,_0x3a054a=_0x4a48f6();while(!![]){try{const _0x2f434e=-parseInt(_0x5577bd(0x214))/0x1+-parseInt(_0x5577bd(0x20f))/0x2+-parseInt(_0x5577bd(0x1e2))/0x3+-parseInt(_0x5577bd(0x217))/0x4+parseInt(_0x5577bd(0x218))/0x5*(-parseInt(_0x5577bd(0x1e5))/0x6)+-parseInt(_0x5577bd(0x1d6))/0x7*(parseInt(_0x5577bd(0x1f8))/0x8)+parseInt(_0x5577bd(0x20b))/0x9*(parseInt(_0x5577bd(0x21f))/0xa);if(_0x2f434e===_0x113272)break;else _0x3a054a['push'](_0x3a054a['shift']());}catch(_0x4e40d6){_0x3a054a['push'](_0x3a054a['shift']());}}}(a40_0x3414,0x766f9));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a40_0x3414(){const _0x15cc30=['homeDirName','splice','Invalid\x20service\x20manifest\x20JSON:\x20','slice','name','serviceCode','216aYYGKJ','kind','commands','now','Service\x20manifest\x20file\x20not\x20found:\x20','command','push','report','normalizedManifest','commandCount','service','warnings','target','length','risk','flatMap','trim','path','Unsupported\x20service\x20registry\x20schemaVersion:\x20','9UiiPHc','$.services[','services\x20must\x20be\x20an\x20array','message','1753488kTrpmA','importedAt','filePath','].manifest','services','457352XDtkET','find','utf8','3582876HzgTGY','5lkMeLQ','toISOString','version','hex','cliPath','invalid','sort','46914050zDUZOb','reduce','Service\x20manifest\x20validation\x20failed:\x0a','digest','sha256','localeCompare','object','startsWith','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','ENOENT','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','parse','222558OZtxjm','Local\x20service\x20not\x20found:\x20','CliError','code','].manifest.','manifest','updatedAt','service.json','findIndex','.tmp','description','Invalid\x20service\x20registry\x20JSON:\x20','466506Plhyhw','isArray','source','5775222UpjVgv','empty','schemaVersion','Cannot\x20write\x20service\x20registry:\x20','stringify','manifests','map','registryIndex','join','validation','missing','errors','registry'];a40_0x3414=function(){return _0x15cc30;};return a40_0x3414();}import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x4e3a7e(0x1dd);function a40_0x5b08(_0x24ff98,_0x2ff7f7){_0x24ff98=_0x24ff98-0x1d6;const _0x3414f9=a40_0x3414();let _0x5b0884=_0x3414f9[_0x24ff98];return _0x5b0884;}export function getServiceRegistryPath(_0x5ce85a={}){const _0x29b6b8=a40_0x4e3a7e;return resolve(_0x5ce85a['homeDir']??homedir(),PRODUCT_CONFIG[_0x29b6b8(0x1f2)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3c7a16={}){const _0x35e7b4=a40_0x4e3a7e,_0x24c066=getServiceRegistryPath(_0x3c7a16);if(!existsSync(_0x24c066))return emptyServiceRegistry();try{const _0x4b281c=readFileSync(_0x24c066,_0x35e7b4(0x216));if(!_0x4b281c[_0x35e7b4(0x208)]())return emptyServiceRegistry();const _0x394343=JSON[_0x35e7b4(0x22a)](_0x4b281c);if(_0x394343['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x35e7b4(0x1ee)](_0x35e7b4(0x20a)+String(_0x394343[_0x35e7b4(0x1e7)]),'Remove\x20or\x20migrate\x20'+_0x24c066+'.');if(!Array['isArray'](_0x394343[_0x35e7b4(0x213)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x394343['updatedAt'],'services':_0x394343[_0x35e7b4(0x213)]};}catch(_0x54c0bd){if(_0x54c0bd instanceof Error&&_0x54c0bd[_0x35e7b4(0x1f6)]===_0x35e7b4(0x1d8))throw _0x54c0bd;throw CliErrors['validation'](_0x35e7b4(0x1e1)+_0x24c066,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x2679d8,_0x1e7dd0={}){const _0x3be339=a40_0x4e3a7e,_0x114fde=getServiceRegistryPath(_0x1e7dd0),_0x3db39d=dirname(_0x114fde);!existsSync(_0x3db39d)&&mkdirSync(_0x3db39d,{'recursive':!![]});const _0x26789a=_0x114fde+_0x3be339(0x1df);try{writeFileSync(_0x26789a,JSON['stringify'](_0x2679d8,null,0x2)+'\x0a',{'encoding':_0x3be339(0x216),'mode':0x180}),renameSync(_0x26789a,_0x114fde);}catch(_0x5e4794){try{unlinkSync(_0x26789a);}catch{}if(_0x5e4794?.['code']===_0x3be339(0x228))throw CliErrors[_0x3be339(0x1ee)](_0x3be339(0x1e8)+_0x114fde);throw _0x5e4794;}return _0x114fde;}export function loadServiceManifestFromFile(_0x13d16b){const _0xa86e31=a40_0x4e3a7e,_0x3c1842=resolve(_0x13d16b);if(!existsSync(_0x3c1842))throw CliErrors[_0xa86e31(0x1ee)](_0xa86e31(0x1fc)+_0x13d16b);let _0x43bdf7;const _0x4ba178=readFileSync(_0x3c1842,_0xa86e31(0x216));try{_0x43bdf7=JSON[_0xa86e31(0x22a)](_0x4ba178);}catch{throw CliErrors[_0xa86e31(0x1ee)](_0xa86e31(0x1f4)+_0x13d16b,_0xa86e31(0x227));}const _0x42d02d=sha256(_0x4ba178),_0x3c7236=extractLoadedServiceManifests(_0x43bdf7,_0x42d02d),_0x2a76bc=aggregateValidationReports(_0x3c7236),_0x59628d=_0x3c7236[0x0];return{'filePath':_0x3c1842,'hash':_0x42d02d,'kind':isServiceRegistryLike(_0x43bdf7)?_0xa86e31(0x1f1):_0xa86e31(0x1db),'manifest':_0x59628d?.['manifest']??_0x43bdf7,'report':_0x2a76bc,'normalizedManifest':_0x3c7236[_0xa86e31(0x205)]===0x1?_0x59628d?.[_0xa86e31(0x200)]:undefined,'manifests':_0x3c7236};}export function importServiceManifest(_0x38d0ef,_0x7c0228={}){const _0x5206e3=a40_0x4e3a7e,_0x3bab4a=loadServiceManifestFromFile(_0x38d0ef);if(!_0x3bab4a[_0x5206e3(0x1ff)]['ok'])throw CliErrors[_0x5206e3(0x1ee)](formatValidationFailure(_0x3bab4a[_0x5206e3(0x1ff)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x3bab4a[_0x5206e3(0x1ea)][_0x5206e3(0x205)]===0x0)throw CliErrors[_0x5206e3(0x1ee)](_0x5206e3(0x229),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x3e06ef=readServiceRegistry(_0x7c0228),_0x597834=(_0x7c0228[_0x5206e3(0x1fb)]??(()=>new Date()))()[_0x5206e3(0x219)](),_0x477827=[];let _0x9448a4=0x0,_0x2bf281=0x0;for(const _0x1ffcbf of _0x3bab4a[_0x5206e3(0x1ea)]){if(!_0x1ffcbf[_0x5206e3(0x200)])continue;const _0x1a68dd=_0x1ffcbf['normalizedManifest']['service'][_0x5206e3(0x1d9)],_0x280d45={'serviceCode':_0x1a68dd,'version':_0x1ffcbf[_0x5206e3(0x200)][_0x5206e3(0x21a)],'importedAt':_0x597834,'source':{'type':'file','path':_0x3bab4a[_0x5206e3(0x211)],'hash':_0x1ffcbf['sourceHash']},'manifest':_0x1ffcbf[_0x5206e3(0x1db)],'normalizedManifest':_0x1ffcbf[_0x5206e3(0x200)]},_0x1762ed=_0x3e06ef['services'][_0x5206e3(0x1de)](_0x3fabaf=>_0x3fabaf[_0x5206e3(0x1f7)]===_0x1a68dd);_0x1762ed>=0x0?(_0x3e06ef['services'][_0x1762ed]=_0x280d45,_0x2bf281++):(_0x3e06ef[_0x5206e3(0x213)][_0x5206e3(0x1fe)](_0x280d45),_0x9448a4++),_0x477827[_0x5206e3(0x1fe)](_0x280d45);}_0x3e06ef[_0x5206e3(0x213)][_0x5206e3(0x21e)]((_0x31db62,_0x3f23bc)=>_0x31db62[_0x5206e3(0x1f7)][_0x5206e3(0x224)](_0x3f23bc['serviceCode'])),_0x3e06ef[_0x5206e3(0x1dc)]=_0x597834;const _0x112849=writeServiceRegistry(_0x3e06ef,_0x7c0228);return{'registryPath':_0x112849,'entry':_0x477827[0x0],'replaced':_0x477827[_0x5206e3(0x205)]===0x1?_0x2bf281===0x1:_0x2bf281>0x0,'entries':_0x477827,'imported':_0x9448a4,'updated':_0x2bf281,'serviceCount':_0x3e06ef[_0x5206e3(0x213)][_0x5206e3(0x205)]};}export function exportServiceManifest(_0x4679da,_0x49bfb0,_0x5ee75f={}){const _0x47b0a1=a40_0x4e3a7e,_0x33ffc9=getServiceRegistryPath(_0x5ee75f),_0x45f910=getLocalServiceEntry(_0x4679da,_0x5ee75f);if(!_0x45f910)throw CliErrors[_0x47b0a1(0x1ee)]('Local\x20service\x20not\x20found:\x20'+_0x4679da,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x3d0748=resolve(_0x49bfb0),_0x145bd3=dirname(_0x3d0748);return!existsSync(_0x145bd3)&&mkdirSync(_0x145bd3,{'recursive':!![]}),writeFileSync(_0x3d0748,JSON[_0x47b0a1(0x1e9)](_0x45f910['manifest'],null,0x2)+'\x0a',{'encoding':_0x47b0a1(0x216),'mode':0x180}),{'registryPath':_0x33ffc9,'filePath':_0x3d0748,'entry':_0x45f910};}export function removeServiceManifest(_0x1748a5,_0x2b356e={}){const _0x48c224=a40_0x4e3a7e,_0x13ccbe=readServiceRegistry(_0x2b356e),_0x44182a=_0x1748a5[_0x48c224(0x208)](),_0x378262=_0x13ccbe[_0x48c224(0x213)]['findIndex'](_0x50770a=>_0x50770a[_0x48c224(0x1f7)]===_0x44182a);if(_0x378262<0x0)throw CliErrors[_0x48c224(0x1ee)](_0x48c224(0x1d7)+_0x44182a,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x1eb17a]=_0x13ccbe[_0x48c224(0x213)][_0x48c224(0x1f3)](_0x378262,0x1),_0x1c3b83=(_0x2b356e[_0x48c224(0x1fb)]??(()=>new Date()))()['toISOString']();_0x13ccbe[_0x48c224(0x1dc)]=_0x1c3b83;const _0x4f9b30=writeServiceRegistry(_0x13ccbe,_0x2b356e);return{'registryPath':_0x4f9b30,'entry':_0x1eb17a,'serviceCount':_0x13ccbe[_0x48c224(0x213)][_0x48c224(0x205)]};}export function listLocalServices(_0xbc5019={}){const _0x5ef9f5=a40_0x4e3a7e;return readServiceRegistry(_0xbc5019)[_0x5ef9f5(0x213)];}export function getLocalServiceEntry(_0x346a23,_0x3ade08={}){const _0x452bc9=a40_0x4e3a7e;return readServiceRegistry(_0x3ade08)[_0x452bc9(0x213)][_0x452bc9(0x215)](_0x1e45c1=>_0x1e45c1[_0x452bc9(0x1f7)]===_0x346a23[_0x452bc9(0x208)]());}export function listLocalServiceTrees(_0x219032={}){const _0x1e4f97=a40_0x4e3a7e;return readServiceRegistry(_0x219032)[_0x1e4f97(0x213)][_0x1e4f97(0x1eb)](_0x5d7d3f=>_0x5d7d3f['normalizedManifest']);}export function inspectServiceRegistry(_0x358f5a={}){const _0x46c39f=a40_0x4e3a7e,_0x3966c1=getServiceRegistryPath(_0x358f5a);if(!existsSync(_0x3966c1))return emptyServiceRegistryInspection(_0x3966c1,_0x46c39f(0x1ef),![]);try{const _0x146f1f=readFileSync(_0x3966c1,_0x46c39f(0x216));if(!_0x146f1f[_0x46c39f(0x208)]())return emptyServiceRegistryInspection(_0x3966c1,_0x46c39f(0x1e6),!![]);const _0x1da214=JSON['parse'](_0x146f1f);if(_0x1da214[_0x46c39f(0x1e7)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x3966c1,_0x46c39f(0x21d),!![]),'schemaVersion':_0x1da214['schemaVersion'],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x1da214['schemaVersion'])};if(!Array[_0x46c39f(0x1e3)](_0x1da214[_0x46c39f(0x213)]))return{...emptyServiceRegistryInspection(_0x3966c1,_0x46c39f(0x21d),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1da214[_0x46c39f(0x1dc)],'message':_0x46c39f(0x20d)};const _0x2e1abc=_0x1da214[_0x46c39f(0x213)][_0x46c39f(0x1eb)](summarizeLocalServiceEntry);return{'registryPath':_0x3966c1,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1da214[_0x46c39f(0x1dc)],'serviceCount':_0x2e1abc[_0x46c39f(0x205)],'commandCount':_0x2e1abc[_0x46c39f(0x220)]((_0x32c24b,_0x4a549c)=>_0x32c24b+_0x4a549c[_0x46c39f(0x201)],0x0),'services':_0x2e1abc};}catch(_0x4eb405){return{...emptyServiceRegistryInspection(_0x3966c1,_0x46c39f(0x21d),!![]),'message':_0x4eb405 instanceof Error?_0x4eb405[_0x46c39f(0x20e)]:String(_0x4eb405)};}}export function formatValidationFailure(_0x52576e){const _0x2888ff=a40_0x4e3a7e,_0x3b3b35=_0x52576e[_0x2888ff(0x1f0)][_0x2888ff(0x1eb)](_0xd7c448=>_0xd7c448['path']+':\x20'+_0xd7c448[_0x2888ff(0x20e)]);return _0x2888ff(0x221)+_0x3b3b35[_0x2888ff(0x1ed)]('\x0a');}function extractLoadedServiceManifests(_0x523bc0,_0x2cefeb){const _0x4a77f7=a40_0x4e3a7e;if(!isServiceRegistryLike(_0x523bc0)){const _0x4571a8=_0x523bc0,_0x4293f0=validateServiceTreeManifest(_0x4571a8);return[{'manifest':_0x4571a8,'report':_0x4293f0,'normalizedManifest':_0x4293f0['ok']?normalizeServiceTreeManifest(_0x4571a8):undefined,'sourceHash':_0x2cefeb}];}return _0x523bc0[_0x4a77f7(0x213)][_0x4a77f7(0x1eb)]((_0x31cbe3,_0x4ebbd0)=>{const _0x42e9a1=_0x4a77f7,_0x4a06e9=isObjectRecord(_0x31cbe3)?_0x31cbe3[_0x42e9a1(0x1db)]:undefined,_0x164586=validateServiceTreeManifest(_0x4a06e9),_0x538bc8=isObjectRecord(_0x31cbe3)&&typeof _0x31cbe3[_0x42e9a1(0x1f7)]==='string'?_0x31cbe3[_0x42e9a1(0x1f7)]:undefined;return{'manifest':_0x4a06e9,'report':_0x164586,'normalizedManifest':_0x164586['ok']?normalizeServiceTreeManifest(_0x4a06e9):undefined,'sourceHash':sha256(JSON['stringify'](_0x4a06e9,null,0x2)+'\x0a'),'registryIndex':_0x4ebbd0,'registryServiceCode':_0x538bc8};});}function aggregateValidationReports(_0x16ed9e){const _0xcd05b8=a40_0x4e3a7e,_0x546722=_0x16ed9e[_0xcd05b8(0x207)](_0x48e505=>_0x48e505[_0xcd05b8(0x1ec)]===undefined?_0x48e505[_0xcd05b8(0x1ff)][_0xcd05b8(0x1f0)]:_0x48e505[_0xcd05b8(0x1ff)]['errors'][_0xcd05b8(0x1eb)](_0x9a2245=>({..._0x9a2245,'path':prefixRegistryIssuePath(_0x48e505[_0xcd05b8(0x1ec)],_0x9a2245[_0xcd05b8(0x209)])}))),_0x3aa839=_0x16ed9e['flatMap'](_0x54ee92=>_0x54ee92[_0xcd05b8(0x1ec)]===undefined?_0x54ee92[_0xcd05b8(0x1ff)]['warnings']:_0x54ee92[_0xcd05b8(0x1ff)][_0xcd05b8(0x203)][_0xcd05b8(0x1eb)](_0x1c8ee7=>({..._0x1c8ee7,'path':prefixRegistryIssuePath(_0x54ee92[_0xcd05b8(0x1ec)],_0x1c8ee7[_0xcd05b8(0x209)])})));return{'ok':_0x546722[_0xcd05b8(0x205)]===0x0,'errors':_0x546722,'warnings':_0x3aa839};}function prefixRegistryIssuePath(_0x202008,_0x16373e){const _0x3748dd=a40_0x4e3a7e;if(_0x16373e==='$')return _0x3748dd(0x20c)+_0x202008+'].manifest';if(_0x16373e[_0x3748dd(0x226)]('$.'))return'$.services['+_0x202008+_0x3748dd(0x212)+_0x16373e['slice'](0x1);if(_0x16373e[_0x3748dd(0x226)]('$['))return _0x3748dd(0x20c)+_0x202008+_0x3748dd(0x212)+_0x16373e[_0x3748dd(0x1f5)](0x1);return _0x3748dd(0x20c)+_0x202008+_0x3748dd(0x1da)+_0x16373e;}function isServiceRegistryLike(_0x395564){const _0x3aa86f=a40_0x4e3a7e;return isObjectRecord(_0x395564)&&_0x395564[_0x3aa86f(0x1e7)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x3aa86f(0x1e3)](_0x395564[_0x3aa86f(0x213)]);}function isObjectRecord(_0x38b685){const _0x4737d4=a40_0x4e3a7e;return Boolean(_0x38b685)&&typeof _0x38b685===_0x4737d4(0x225)&&!Array[_0x4737d4(0x1e3)](_0x38b685);}function emptyServiceRegistryInspection(_0x4daab1,_0x1370ce,_0x206406){return{'registryPath':_0x4daab1,'exists':_0x206406,'status':_0x1370ce,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1f53a0){const _0x24cf31=a40_0x4e3a7e,_0x12648d=_0x1f53a0[_0x24cf31(0x200)],_0x2cfa03=_0x12648d[_0x24cf31(0x1fa)][_0x24cf31(0x1eb)](_0x5bded5=>({'path':_0x5bded5[_0x24cf31(0x21c)],'description':_0x5bded5[_0x24cf31(0x1e0)],'risk':_0x5bded5[_0x24cf31(0x206)],'targetKind':_0x5bded5[_0x24cf31(0x204)][_0x24cf31(0x1f9)],'targetCommand':_0x5bded5[_0x24cf31(0x204)][_0x24cf31(0x1fd)]}));return{'serviceCode':_0x1f53a0[_0x24cf31(0x1f7)],'name':_0x12648d[_0x24cf31(0x202)][_0x24cf31(0x1f6)],'description':_0x12648d[_0x24cf31(0x202)]['description'],'version':_0x1f53a0[_0x24cf31(0x21a)],'importedAt':_0x1f53a0[_0x24cf31(0x210)],'source':_0x1f53a0[_0x24cf31(0x1e4)],'commandCount':_0x2cfa03[_0x24cf31(0x205)],'commands':_0x2cfa03};}function sha256(_0x108e25){const _0x1baf66=a40_0x4e3a7e;return createHash(_0x1baf66(0x223))['update'](_0x108e25)[_0x1baf66(0x222)](_0x1baf66(0x21b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x33d901,_0x36b0c6){const _0xf95e53=a41_0x4941,_0xbb3cc2=_0x33d901();while(!![]){try{const _0x53f995=parseInt(_0xf95e53(0xa8))/0x1+-parseInt(_0xf95e53(0xb0))/0x2*(parseInt(_0xf95e53(0xa4))/0x3)+-parseInt(_0xf95e53(0xab))/0x4+parseInt(_0xf95e53(0xb5))/0x5+-parseInt(_0xf95e53(0xb4))/0x6*(parseInt(_0xf95e53(0xb8))/0x7)+parseInt(_0xf95e53(0xa0))/0x8+parseInt(_0xf95e53(0xb6))/0x9;if(_0x53f995===_0x36b0c6)break;else _0xbb3cc2['push'](_0xbb3cc2['shift']());}catch(_0x293e8d){_0xbb3cc2['push'](_0xbb3cc2['shift']());}}}(a41_0x4447,0x2e2f6));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';function a41_0x4447(){const _0x28d0bc=['validation','name','utf8','428331ESVjgh','str','isSymbolicLink','map','20194GBbXlk','WRITE','trim','155012SJgyHs','rendered','skillName','force','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','4PbFHJv','path','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','target','413718UBdIoG','459655WlKGeT','2847348XFOKXo','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','21ipszaC','Created\x20local\x20Skill\x20draft\x20','type','isDirectory','files','skillDir','2334744ooKrtL'];a41_0x4447=function(){return _0x28d0bc;};return a41_0x4447();}function a41_0x4941(_0x4fd268,_0x56c217){_0x4fd268=_0x4fd268-0x9d;const _0x444740=a41_0x4447();let _0x494104=_0x444740[_0x4fd268];return _0x494104;}import{CliErrors}from'../../../errors.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':'create','description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x454f28){const _0x4a1fdc=a41_0x4941,_0x22d115=buildSkillCreatePlan(_0x454f28[_0x4a1fdc(0xa5)](_0x4a1fdc(0xa2)),_0x454f28[_0x4a1fdc(0xa5)](_0x4a1fdc(0xba)),_0x454f28['str'](_0x4a1fdc(0xb3)));return{'method':_0x4a1fdc(0xa9),'url':_0x22d115[_0x4a1fdc(0x9f)],'body':{'skillName':_0x22d115[_0x4a1fdc(0xac)][_0x4a1fdc(0xad)],'type':_0x22d115[_0x4a1fdc(0xac)][_0x4a1fdc(0xba)],'selfContained':!![],'files':_0x22d115['rendered']['files'][_0x4a1fdc(0xa7)](_0x28178f=>_0x28178f[_0x4a1fdc(0xb1)])},'description':_0x4a1fdc(0xaf)};},async 'execute'(_0x277fbc){const _0x763e55=a41_0x4941,_0x3685d5=buildSkillCreatePlan(_0x277fbc[_0x763e55(0xa5)]('name'),_0x277fbc[_0x763e55(0xa5)](_0x763e55(0xba)),_0x277fbc['str'](_0x763e55(0xb3)));return writeSkillDraft(_0x3685d5,_0x277fbc['bool'](_0x763e55(0xae))),{'ok':!![],'data':{'skillName':_0x3685d5['rendered'][_0x763e55(0xad)],'type':_0x3685d5[_0x763e55(0xac)][_0x763e55(0xba)],'dir':_0x3685d5[_0x763e55(0x9f)],'files':_0x3685d5['rendered'][_0x763e55(0x9e)][_0x763e55(0xa7)](_0x1ffa8a=>_0x1ffa8a['path'])},'message':_0x763e55(0xb9)+_0x3685d5[_0x763e55(0xac)][_0x763e55(0xad)]};}};function buildSkillCreatePlan(_0x1e7f86,_0xd9a5f3,_0x8f0913){const _0x3f4365=renderSkillTemplate({'skillName':_0x1e7f86,'type':_0xd9a5f3}),_0x20d2c1=resolve(normalizeSkillTarget(_0x8f0913));return{'rendered':_0x3f4365,'targetRoot':_0x20d2c1,'skillDir':resolve(_0x20d2c1,_0x3f4365['skillName'])};}function normalizeSkillTarget(_0x3a3f76){const _0x530e66=a41_0x4941;return(_0x3a3f76||DEFAULT_SKILL_TARGET)[_0x530e66(0xaa)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x5d7c59,_0x48fe54){const _0x2228ec=a41_0x4941;if(existsSync(_0x5d7c59['skillDir'])){const _0x3d8693=lstatSync(_0x5d7c59[_0x2228ec(0x9f)]);if(!_0x3d8693[_0x2228ec(0x9d)]()||_0x3d8693[_0x2228ec(0xa6)]())throw CliErrors[_0x2228ec(0xa1)](_0x2228ec(0xb2)+_0x5d7c59[_0x2228ec(0x9f)]);if(!_0x48fe54)throw CliErrors[_0x2228ec(0xa1)]('Skill\x20directory\x20already\x20exists:\x20'+_0x5d7c59[_0x2228ec(0x9f)],_0x2228ec(0xb7));}for(const _0x20b401 of _0x5d7c59[_0x2228ec(0xac)]['files']){const _0x34d080=resolve(_0x5d7c59[_0x2228ec(0x9f)],_0x20b401[_0x2228ec(0xb1)]),_0x5c2df4=dirname(_0x34d080);mkdirSync(_0x5c2df4,{'recursive':!![]});if(existsSync(_0x34d080)&&lstatSync(_0x34d080)['isSymbolicLink']())throw CliErrors[_0x2228ec(0xa1)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x34d080);writeFileSync(_0x34d080,_0x20b401['content'],_0x2228ec(0xa3));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x1d7ea0=a42_0x2606;function a42_0x2606(_0x46ab29,_0x391d8f){_0x46ab29=_0x46ab29-0xa8;const _0xdfb21b=a42_0xdfb2();let _0x26069d=_0xdfb21b[_0x46ab29];return _0x26069d;}(function(_0x3f8145,_0x2ec11f){const _0x2d651e=a42_0x2606,_0x29329d=_0x3f8145();while(!![]){try{const _0x828f8b=-parseInt(_0x2d651e(0xc9))/0x1*(parseInt(_0x2d651e(0xb2))/0x2)+parseInt(_0x2d651e(0xc2))/0x3*(-parseInt(_0x2d651e(0xc6))/0x4)+parseInt(_0x2d651e(0xcc))/0x5+parseInt(_0x2d651e(0xd3))/0x6*(-parseInt(_0x2d651e(0xc0))/0x7)+-parseInt(_0x2d651e(0xb0))/0x8*(-parseInt(_0x2d651e(0xb9))/0x9)+-parseInt(_0x2d651e(0xca))/0xa+parseInt(_0x2d651e(0xcb))/0xb*(parseInt(_0x2d651e(0xb7))/0xc);if(_0x828f8b===_0x2ec11f)break;else _0x29329d['push'](_0x29329d['shift']());}catch(_0x5672d6){_0x29329d['push'](_0x29329d['shift']());}}}(a42_0xdfb2,0xcb0cc));function a42_0xdfb2(){const _0x1de84d=['2910988jZbdvs','push','all','9754elPTEe','2244540KXyosw','1480083FRPiAV','2504085byRpRn','skipped','../../../skills/runtime-skill-sync.js','authRequired','appCode','includes','removed','12opZtjM','reduce','str','\x20company\x20Skill(s).','company','../../../core/api-client.js','action','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','personal','8pnoBVC','install','244JtxUoc','updated','code','filter','Installed\x20','372zhccug','created','2929086IOjIcM','scope','trim','unchanged','skill','skillCode','length','4535251VSgWPH','production','6FNHnwY','map','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','flatMap'];a42_0xdfb2=function(){return _0x1de84d;};return a42_0xdfb2();}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a42_0x1d7ea0(0xbd),'command':a42_0x1d7ea0(0xb1),'description':a42_0x1d7ea0(0xc4),'risk':'write','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG],async 'execute'(_0x26c8b7){return syncRuntimeSkills(_0x26c8b7);}};async function syncRuntimeSkills(_0x108cdd){const _0x531c4f=a42_0x1d7ea0,{downloadRuntimeSkillPackage:_0x14b992,listRuntimeSkills:_0x7e3822}=await import(_0x531c4f(0xac)),{linkEffectiveRuntimeSkills:_0x20717d,materializeRuntimeSkill:_0x5d197d,pruneStaleRuntimeSkillCache:_0x558199,pruneStaleRuntimeSkillLinks:_0x1cbd3a}=await import(_0x531c4f(0xce)),_0xa46db7=_0x108cdd[_0x531c4f(0xa9)](_0x531c4f(0xb4)),_0x5143f6=normalizeSyncScopes(_0x108cdd[_0x531c4f(0xa9)](_0x531c4f(0xba))),_0x535514=_0x108cdd['envName']??_0x531c4f(0xc1),_0x23bac7=_0x108cdd['accessKey'];if(!_0x23bac7)throw CliErrors[_0x531c4f(0xcf)](_0x531c4f(0xae));const _0x54423b=await Promise[_0x531c4f(0xc8)](_0x5143f6['map'](_0x24b427=>_0x7e3822({'appCode':_0x108cdd[_0x531c4f(0xd0)],'scope':_0x24b427,'code':_0xa46db7[_0x531c4f(0xbb)]()||undefined}))),_0x146dd0=_0x5143f6[_0x531c4f(0xd1)](_0x531c4f(0xaf))?_0x54423b[_0x531c4f(0xc5)]((_0x5b7683,_0x2735c2)=>_0x5143f6[_0x2735c2]===_0x531c4f(0xaf)?_0x5b7683['personal']:[]):[],_0x1698ff=_0x5143f6['includes']('company')?_0x54423b[_0x531c4f(0xc5)]((_0x4810b8,_0xc53ef1)=>_0x5143f6[_0xc53ef1]==='company'?_0x4810b8[_0x531c4f(0xab)]:[]):[],_0x1104ab=new Set([..._0x146dd0[_0x531c4f(0xc3)](_0x37ea38=>_0x37ea38[_0x531c4f(0xbe)]?.['trim']())[_0x531c4f(0xb5)](_0x1d7d2e=>Boolean(_0x1d7d2e)),..._0x1698ff['map'](_0x2a592f=>_0x2a592f[_0x531c4f(0xbe)]?.[_0x531c4f(0xbb)]())[_0x531c4f(0xb5)](_0x445b1a=>Boolean(_0x445b1a))]),_0x4dfb23=_0xa46db7[_0x531c4f(0xbb)]()?[_0xa46db7[_0x531c4f(0xbb)]()]:undefined,_0x20eea8=_0x5143f6[_0x531c4f(0xbf)]===0x2&&_0x5143f6[_0x531c4f(0xd1)](_0x531c4f(0xaf))&&_0x5143f6[_0x531c4f(0xd1)](_0x531c4f(0xab)),_0x25a328=_0x20eea8?_0x1cbd3a(_0x108cdd['appCode'],_0x1104ab,{},_0x4dfb23):[],_0x15b3a2=_0x558199({'env':_0x535514,'accessKey':_0x23bac7,'appCode':_0x108cdd[_0x531c4f(0xd0)],'activeSkillCodes':_0x1104ab,'pruneSkillCodes':_0x4dfb23,'scopes':_0x5143f6}),_0x5f4778=[];for(const _0x27d68a of _0x146dd0){_0x5f4778[_0x531c4f(0xc7)](_0x5d197d(_0x27d68a,_0x531c4f(0xaf),{'env':_0x535514,'accessKey':_0x23bac7,'appCode':_0x108cdd['appCode'],'packageBytes':await downloadSkillPackage(_0x27d68a,_0x531c4f(0xaf),_0x108cdd[_0x531c4f(0xd0)],_0x14b992)}));}for(const _0x4cffb1 of _0x1698ff){_0x5f4778['push'](_0x5d197d(_0x4cffb1,_0x531c4f(0xab),{'env':_0x535514,'accessKey':_0x23bac7,'appCode':_0x108cdd[_0x531c4f(0xd0)],'packageBytes':await downloadSkillPackage(_0x4cffb1,_0x531c4f(0xab),_0x108cdd[_0x531c4f(0xd0)],_0x14b992)}));}const _0x35df2a=_0x20717d(_0x5f4778,_0x108cdd[_0x531c4f(0xd0)]),_0x47517f=countLinkActions(_0x35df2a);return{'ok':!![],'data':{'appCode':_0x108cdd[_0x531c4f(0xd0)],'personal':_0x146dd0[_0x531c4f(0xbf)],'company':_0x1698ff['length'],'materialized':_0x5f4778['length'],'links':{'total':_0x35df2a[_0x531c4f(0xbf)],'created':_0x47517f[_0x531c4f(0xb8)]??0x0,'updated':_0x47517f[_0x531c4f(0xb3)]??0x0,'unchanged':_0x47517f[_0x531c4f(0xbc)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x25a328[_0x531c4f(0xb5)](_0x24e9a1=>_0x24e9a1[_0x531c4f(0xad)]===_0x531c4f(0xd2))['length'],'cacheDirs':_0x15b3a2[_0x531c4f(0xb5)](_0x2fcc15=>_0x2fcc15[_0x531c4f(0xad)]===_0x531c4f(0xd2))['length'],'skipped':[..._0x25a328,..._0x15b3a2][_0x531c4f(0xb5)](_0x271f7b=>_0x271f7b[_0x531c4f(0xad)]===_0x531c4f(0xcd))[_0x531c4f(0xbf)]},'skills':{'personal':_0x146dd0['map'](summarizeRuntimeSkill),'company':_0x1698ff['map'](summarizeRuntimeSkill)}},'message':_0x531c4f(0xb6)+_0x146dd0['length']+'\x20personal\x20and\x20'+_0x1698ff[_0x531c4f(0xbf)]+_0x531c4f(0xaa)};}async function downloadSkillPackage(_0x2a7248,_0x52ae88,_0x3b55f3,_0x366894){const _0x41dadd=a42_0x1d7ea0,_0x42ac19=_0x2a7248['version']?.[_0x41dadd(0xbb)]();return _0x42ac19?_0x366894(_0x52ae88,_0x2a7248[_0x41dadd(0xbe)],_0x3b55f3,_0x42ac19):_0x366894(_0x52ae88,_0x2a7248[_0x41dadd(0xbe)],_0x3b55f3);}function countLinkActions(_0x23c45e){const _0x532294=a42_0x1d7ea0;return _0x23c45e[_0x532294(0xa8)]((_0x24e3d6,_0x49f97b)=>{const _0x304c77=_0x532294;return _0x24e3d6[_0x49f97b[_0x304c77(0xad)]]=(_0x24e3d6[_0x49f97b[_0x304c77(0xad)]]??0x0)+0x1,_0x24e3d6;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a43_0x45a8(_0x370ac0,_0x4daf9b){_0x370ac0=_0x370ac0-0x17f;const _0x11d304=a43_0x11d3();let _0x45a85e=_0x11d304[_0x370ac0];return _0x45a85e;}const a43_0x29f45a=a43_0x45a8;(function(_0x3cf4a3,_0x57d167){const _0x2b5f51=a43_0x45a8,_0x5833e3=_0x3cf4a3();while(!![]){try{const _0x35b879=parseInt(_0x2b5f51(0x196))/0x1*(parseInt(_0x2b5f51(0x190))/0x2)+parseInt(_0x2b5f51(0x194))/0x3*(parseInt(_0x2b5f51(0x19c))/0x4)+parseInt(_0x2b5f51(0x188))/0x5*(parseInt(_0x2b5f51(0x185))/0x6)+parseInt(_0x2b5f51(0x186))/0x7+parseInt(_0x2b5f51(0x184))/0x8*(parseInt(_0x2b5f51(0x182))/0x9)+-parseInt(_0x2b5f51(0x17f))/0xa*(parseInt(_0x2b5f51(0x18c))/0xb)+-parseInt(_0x2b5f51(0x180))/0xc;if(_0x35b879===_0x57d167)break;else _0x5833e3['push'](_0x5833e3['shift']());}catch(_0x11bfb7){_0x5833e3['push'](_0x5833e3['shift']());}}}(a43_0x11d3,0xb5622));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';function a43_0x11d3(){const _0x8f89ed=['appCode','3783867LMdYCg','str','457519iHVrYo','bool','authRequired','length','remote','scope','4sbUqYG','../../../skills/runtime-skill-sync.js','../../../core/api-client.js','map','skill','local','26270qOJijv','40481136AdCRDT','filter','2520018POVuRD','read','32vqPkaU','133854yySDxz','9638664WRzySz','\x20local\x20Skill(s).','215dusFid','company','builtin','list','4433eGAoNA','\x20remote\x20Skill(s).','Listed\x20','production','2lZhkFE','personal','trim'];a43_0x11d3=function(){return _0x8f89ed;};return a43_0x11d3();}import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a43_0x29f45a(0x1a0),'command':a43_0x29f45a(0x18b),'description':'List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','risk':a43_0x29f45a(0x183),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x904317){const _0x580545=a43_0x29f45a,_0x5143c6=_0x904317[_0x580545(0x195)]('code'),_0x186983=normalizeListScope(_0x904317['str'](_0x580545(0x19b)));if(_0x904317[_0x580545(0x197)](_0x580545(0x1a1))){const _0x462056=_0x904317['accessKey'];if(!_0x462056)throw CliErrors[_0x580545(0x198)]();const {listLocalRuntimeSkills:_0xc69092}=await import(_0x580545(0x19d)),_0x3754d6=_0xc69092({'env':_0x904317['envName']??_0x580545(0x18f),'accessKey':_0x462056,'appCode':_0x904317[_0x580545(0x193)],'scopes':listScopeToRuntimeScopes(_0x186983),'code':_0x5143c6[_0x580545(0x192)]()||undefined}),_0x1f55d2=groupLocalRuntimeSkills(_0x3754d6);return{'ok':!![],'data':{'appCode':_0x904317[_0x580545(0x193)],'source':_0x580545(0x1a1),'scope':_0x186983,'total':_0x3754d6[_0x580545(0x199)],'personal':_0x1f55d2[_0x580545(0x191)][_0x580545(0x199)],'company':_0x1f55d2[_0x580545(0x189)][_0x580545(0x199)],'items':_0x3754d6[_0x580545(0x19f)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x1f55d2[_0x580545(0x191)]['map'](summarizeLocalRuntimeSkill),'company':_0x1f55d2[_0x580545(0x189)][_0x580545(0x19f)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x3754d6[_0x580545(0x199)]+_0x580545(0x187)};}const {listRuntimeSkills:_0x5b6ade}=await import(_0x580545(0x19e)),_0xc8454c=await _0x5b6ade({'appCode':_0x904317[_0x580545(0x193)],'scope':listScopeToRemoteScope(_0x186983),'code':_0x5143c6[_0x580545(0x192)]()||undefined}),_0x45d678=shouldListScope(_0x186983,_0x580545(0x191))?_0xc8454c[_0x580545(0x191)]??[]:[],_0x386d6f=shouldListScope(_0x186983,_0x580545(0x189))?_0xc8454c[_0x580545(0x189)]??[]:[],_0x161e15=[..._0x45d678,..._0x386d6f];return{'ok':!![],'data':{'appCode':_0x904317[_0x580545(0x193)],'source':_0x580545(0x19a),'scope':_0x186983,'total':_0x161e15['length'],'personal':_0x45d678['length'],'company':_0x386d6f[_0x580545(0x199)],'items':_0x161e15[_0x580545(0x19f)](summarizeRuntimeSkill),'skills':{'personal':_0x45d678[_0x580545(0x19f)](summarizeRuntimeSkill),'company':_0x386d6f['map'](summarizeRuntimeSkill)}},'message':_0x580545(0x18e)+_0x161e15['length']+_0x580545(0x18d)};}};function groupLocalRuntimeSkills(_0x20ef44){const _0x422930=a43_0x29f45a;return{'personal':_0x20ef44[_0x422930(0x181)](_0xa7da64=>_0xa7da64[_0x422930(0x19b)]===_0x422930(0x191)),'company':_0x20ef44[_0x422930(0x181)](_0x80a4d7=>_0x80a4d7[_0x422930(0x19b)]===_0x422930(0x189)),'builtin':_0x20ef44[_0x422930(0x181)](_0x18c72d=>_0x18c72d[_0x422930(0x19b)]===_0x422930(0x18a))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x225730=a44_0x79d6;(function(_0x14f9b7,_0x4768a1){const _0x2663f2=a44_0x79d6,_0x5465ca=_0x14f9b7();while(!![]){try{const _0x5d673c=-parseInt(_0x2663f2(0x17e))/0x1+parseInt(_0x2663f2(0x176))/0x2+parseInt(_0x2663f2(0x175))/0x3*(parseInt(_0x2663f2(0x172))/0x4)+parseInt(_0x2663f2(0x174))/0x5*(-parseInt(_0x2663f2(0x17f))/0x6)+parseInt(_0x2663f2(0x178))/0x7*(-parseInt(_0x2663f2(0x17d))/0x8)+-parseInt(_0x2663f2(0x17a))/0x9*(parseInt(_0x2663f2(0x17b))/0xa)+-parseInt(_0x2663f2(0x173))/0xb*(-parseInt(_0x2663f2(0x17c))/0xc);if(_0x5d673c===_0x4768a1)break;else _0x5465ca['push'](_0x5465ca['shift']());}catch(_0x2afba6){_0x5465ca['push'](_0x5465ca['shift']());}}}(a44_0x12c7,0xa2a09));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';function a44_0x12c7(){const _0x15d7ad=['4voteVr','129756yGkgSy','2973545PNGDnJ','3991326onfSaQ','279852ByYhqs','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','94997nMOayX','skill','3042684qoYBIV','20oJSsON','1968lrykXg','568VMicwH','504389IdgbPa','6HVcJpC','write'];a44_0x12c7=function(){return _0x15d7ad;};return a44_0x12c7();}function a44_0x79d6(_0x2461d9,_0x345da9){_0x2461d9=_0x2461d9-0x171;const _0x12c7d9=a44_0x12c7();let _0x79d65c=_0x12c7d9[_0x2461d9];return _0x79d65c;}export const pushCommand={'service':a44_0x225730(0x179),'command':'push','description':a44_0x225730(0x177),'risk':a44_0x225730(0x171),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x25ba4e=a45_0x36c3;(function(_0x102c9d,_0x2de8c6){const _0x27ff9f=a45_0x36c3,_0xe58973=_0x102c9d();while(!![]){try{const _0x755afe=-parseInt(_0x27ff9f(0xb8))/0x1+-parseInt(_0x27ff9f(0xbb))/0x2*(parseInt(_0x27ff9f(0xbd))/0x3)+parseInt(_0x27ff9f(0xbe))/0x4+parseInt(_0x27ff9f(0xb7))/0x5+-parseInt(_0x27ff9f(0xb9))/0x6+parseInt(_0x27ff9f(0xc4))/0x7+-parseInt(_0x27ff9f(0xc3))/0x8*(-parseInt(_0x27ff9f(0xba))/0x9);if(_0x755afe===_0x2de8c6)break;else _0xe58973['push'](_0xe58973['shift']());}catch(_0x1c46a6){_0xe58973['push'](_0xe58973['shift']());}}}(a45_0x1e74,0x552e4));function a45_0x36c3(_0x1bf446,_0x579c08){_0x1bf446=_0x1bf446-0xb5;const _0x1e74d6=a45_0x1e74();let _0x36c3fc=_0x1e74d6[_0x1bf446];return _0x36c3fc;}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a45_0x1e74(){const _0x3fd61d=['3895661oSxnSK','bool','skill','str','2401310ggGXKg','282898EYxcmG','1233372AJLdsk','90153bgeknd','309544jYzElL','Skill\x20validation\x20passed.','12CdpUaa','1638584CGDOLa','type','errors','dir','validate','8YAxnGp'];a45_0x1e74=function(){return _0x3fd61d;};return a45_0x1e74();}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a45_0x25ba4e(0xb5),'command':a45_0x25ba4e(0xc2),'description':'Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x4da73b){const _0x4c3e51=a45_0x25ba4e,_0x1e6933=_0x4da73b[_0x4c3e51(0xc5)]('strict'),_0x4a0e22=validateSkillDirectory(_0x4da73b[_0x4c3e51(0xb6)](_0x4c3e51(0xc1)),{'strict':_0x1e6933});return throwIfSkillValidationFailed(_0x4a0e22,_0x1e6933),{'ok':!![],'data':{'dir':_0x4a0e22[_0x4c3e51(0xc1)],'type':_0x4a0e22[_0x4c3e51(0xbf)],'errors':_0x4a0e22[_0x4c3e51(0xc0)],'warnings':_0x4a0e22['warnings']},'message':_0x4c3e51(0xbc)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x368c76=a46_0x16d3;(function(_0x456b83,_0x84c09b){const _0x2904ad=a46_0x16d3,_0x4d9afd=_0x456b83();while(!![]){try{const _0xff07f4=-parseInt(_0x2904ad(0xd2))/0x1*(parseInt(_0x2904ad(0xc1))/0x2)+-parseInt(_0x2904ad(0xc3))/0x3*(-parseInt(_0x2904ad(0xd3))/0x4)+parseInt(_0x2904ad(0xbc))/0x5+-parseInt(_0x2904ad(0xd8))/0x6+-parseInt(_0x2904ad(0xca))/0x7*(-parseInt(_0x2904ad(0xbe))/0x8)+parseInt(_0x2904ad(0xc4))/0x9*(parseInt(_0x2904ad(0xcb))/0xa)+parseInt(_0x2904ad(0xd4))/0xb*(-parseInt(_0x2904ad(0xd1))/0xc);if(_0xff07f4===_0x84c09b)break;else _0x4d9afd['push'](_0x4d9afd['shift']());}catch(_0x58e933){_0x4d9afd['push'](_0x4d9afd['shift']());}}}(a46_0x3c96,0x81a1b));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':'code','type':a46_0x368c76(0xd6),'description':a46_0x368c76(0xdb)};export const SCOPE_FLAG={'name':a46_0x368c76(0xcc),'type':a46_0x368c76(0xd6),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a46_0x368c76(0xcd),a46_0x368c76(0xc9),'company']};export const PUSH_SCOPE_FLAG={'name':a46_0x368c76(0xcc),'type':a46_0x368c76(0xd6),'description':a46_0x368c76(0xc0),'default':a46_0x368c76(0xc9),'enum':['personal','company']};export const LIST_SCOPE_FLAG={'name':a46_0x368c76(0xcc),'type':a46_0x368c76(0xd6),'description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':[a46_0x368c76(0xcd),a46_0x368c76(0xc9),'company']};export const LOCAL_FLAG={'name':'local','type':a46_0x368c76(0xc7),'description':a46_0x368c76(0xc6)};function a46_0x3c96(){const _0x1b7a06=['450aEMVLb','type','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','boolean','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','personal','288778FxKtTC','22060ywLmnw','scope','all','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','Skill\x20template\x20type','397200GVQLQP','34ylfCFT','4VhZsTM','22dSBtRJ','write','string','Local\x20Skill\x20directory\x20containing\x20SKILL.md','2311080YNkHev','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Overwrite\x20generated\x20files\x20when\x20the\x20Skill\x20directory\x20already\x20exists','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','2052770TXavfa','name','56GuKwtJ','force','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','15870QjnnZE','dir','1327527bcmDYe'];a46_0x3c96=function(){return _0x1b7a06;};return a46_0x3c96();}export const DIR_FLAG={'name':a46_0x368c76(0xc2),'type':'string','required':!![],'description':a46_0x368c76(0xd7)};export const CREATE_NAME_FLAG={'name':a46_0x368c76(0xbd),'type':a46_0x368c76(0xd6),'required':!![],'description':a46_0x368c76(0xce),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a46_0x368c76(0xc8)}};export const TYPE_FLAG={'name':a46_0x368c76(0xc5),'type':a46_0x368c76(0xd6),'description':a46_0x368c76(0xd0),'default':a46_0x368c76(0xd5),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':'target','type':a46_0x368c76(0xd6),'description':a46_0x368c76(0xcf),'default':DEFAULT_SKILL_TARGET};function a46_0x16d3(_0x55900f,_0x304779){_0x55900f=_0x55900f-0xbc;const _0x3c96dc=a46_0x3c96();let _0x16d333=_0x3c96dc[_0x55900f];return _0x16d333;}export const FORCE_FLAG={'name':a46_0x368c76(0xbf),'type':a46_0x368c76(0xc7),'description':a46_0x368c76(0xda)};export const CONFIRM_WARNINGS_FLAG={'name':'confirm-warnings','type':a46_0x368c76(0xc7),'description':'Continue\x20company\x20Skill\x20push\x20when\x20SkillHub\x20validation\x20reports\x20warnings'};export const STRICT_FLAG={'name':'strict','type':a46_0x368c76(0xc7),'description':a46_0x368c76(0xd9)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x60c492,_0x4ca24a){const _0x421678=a47_0x4f3e,_0x36fb4b=_0x60c492();while(!![]){try{const _0x219c63=-parseInt(_0x421678(0x1e5))/0x1*(-parseInt(_0x421678(0x1e9))/0x2)+parseInt(_0x421678(0x1df))/0x3*(-parseInt(_0x421678(0x1e7))/0x4)+-parseInt(_0x421678(0x1e4))/0x5*(-parseInt(_0x421678(0x1e2))/0x6)+-parseInt(_0x421678(0x1ea))/0x7*(-parseInt(_0x421678(0x1e0))/0x8)+parseInt(_0x421678(0x1e8))/0x9+parseInt(_0x421678(0x1e6))/0xa*(parseInt(_0x421678(0x1de))/0xb)+-parseInt(_0x421678(0x1e1))/0xc*(parseInt(_0x421678(0x1e3))/0xd);if(_0x219c63===_0x4ca24a)break;else _0x36fb4b['push'](_0x36fb4b['shift']());}catch(_0x538a3d){_0x36fb4b['push'](_0x36fb4b['shift']());}}}(a47_0x3898,0x2e185));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';function a47_0x4f3e(_0x5249ce,_0x250d6e){_0x5249ce=_0x5249ce-0x1de;const _0x389804=a47_0x3898();let _0x4f3eb4=_0x389804[_0x5249ce];return _0x4f3eb4;}import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];function a47_0x3898(){const _0x1321ec=['72kWdPmE','1208457qxMKEZ','20YVNIbH','42soQxDS','473zmyrHQ','23139lzhlBX','135816MYEDIR','3246996ivohPx','144534dkEikG','26oolwTK','45EBjXoP','36070fqYdjX','12830QLVlFu'];a47_0x3898=function(){return _0x1321ec;};return a47_0x3898();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a48_0x2f38(){var _0x17b5fe=['24CvNIVw','path','3296584NmzztS','some','1ioKvPE','781YcPtkm','files','ossPath','isArray','164ffEgcI','35544kDUSqp','length','12965lMlXDN','9RtRbbn','object','1641045mOFZeC','SKILL.md','15027sJTTDR','string','3017790vRZekR','575458FLXpnb'];a48_0x2f38=function(){return _0x17b5fe;};return a48_0x2f38();}(function(_0x4f8c8e,_0x486215){var _0x33ed9d=a48_0x18ad,_0x18920f=_0x4f8c8e();while(!![]){try{var _0x4180e2=parseInt(_0x33ed9d(0x7b))/0x1*(-parseInt(_0x33ed9d(0x76))/0x2)+parseInt(_0x33ed9d(0x73))/0x3*(-parseInt(_0x33ed9d(0x6b))/0x4)+parseInt(_0x33ed9d(0x6e))/0x5*(parseInt(_0x33ed9d(0x77))/0x6)+parseInt(_0x33ed9d(0x71))/0x7+parseInt(_0x33ed9d(0x79))/0x8*(parseInt(_0x33ed9d(0x6f))/0x9)+parseInt(_0x33ed9d(0x75))/0xa+-parseInt(_0x33ed9d(0x7c))/0xb*(parseInt(_0x33ed9d(0x6c))/0xc);if(_0x4180e2===_0x486215)break;else _0x18920f['push'](_0x18920f['shift']());}catch(_0x3d347f){_0x18920f['push'](_0x18920f['shift']());}}}(a48_0x2f38,0x3e51b));function a48_0x18ad(_0x1fae7e,_0x295c8a){_0x1fae7e=_0x1fae7e-0x68;var _0x2f38d9=a48_0x2f38();var _0x18ad21=_0x2f38d9[_0x1fae7e];return _0x18ad21;}export function isPackageBackedManifest(_0x14646b){var _0x4098af=a48_0x18ad;return!!_0x14646b&&typeof _0x14646b===_0x4098af(0x70)&&!Array[_0x4098af(0x6a)](_0x14646b)&&typeof _0x14646b[_0x4098af(0x69)]===_0x4098af(0x74)&&_0x14646b[_0x4098af(0x69)][_0x4098af(0x6d)]>0x0&&Array[_0x4098af(0x6a)](_0x14646b[_0x4098af(0x68)]);}export function isMultiFileManifest(_0x4c9cfc){var _0x20551b=a48_0x18ad;return!!_0x4c9cfc&&typeof _0x4c9cfc===_0x20551b(0x70)&&!Array[_0x20551b(0x6a)](_0x4c9cfc)&&Array[_0x20551b(0x6a)](_0x4c9cfc[_0x20551b(0x68)])&&_0x4c9cfc['files'][_0x20551b(0x7a)](_0x4faa8c=>_0x4faa8c[_0x20551b(0x78)]!==_0x20551b(0x72));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b5768,_0x295633){const _0x1195bc=a49_0x41b8,_0x45744a=_0x2b5768();while(!![]){try{const _0x184959=-parseInt(_0x1195bc(0xb8))/0x1+-parseInt(_0x1195bc(0xa3))/0x2+-parseInt(_0x1195bc(0xaa))/0x3+-parseInt(_0x1195bc(0x95))/0x4*(parseInt(_0x1195bc(0x98))/0x5)+-parseInt(_0x1195bc(0xb7))/0x6+parseInt(_0x1195bc(0x90))/0x7*(parseInt(_0x1195bc(0x8d))/0x8)+parseInt(_0x1195bc(0x8c))/0x9;if(_0x184959===_0x295633)break;else _0x45744a['push'](_0x45744a['shift']());}catch(_0x117718){_0x45744a['push'](_0x45744a['shift']());}}}(a49_0x515d,0x5b480));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';function a49_0x41b8(_0x156cca,_0x3c4e57){_0x156cca=_0x156cca-0x89;const _0x515d80=a49_0x515d();let _0x41b8f1=_0x515d80[_0x156cca];return _0x41b8f1;}import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';function a49_0x515d(){const _0x4e6e2f=['/publish/validate','/api/cli/v1/skills/','5NYbOgd','scope','skillCode','company','authRequired','confirmWarnings','join','files','appCode','\x20version\x20','frontmatterDisplayName','1058800rDjZiN','confirm-warnings','unknown','bool','NAMESPACE_ONLY','personal','length','1440246Tgnxke','path','str','/publish','POST','submitted','\x20for\x20review','../../skills/runtime-skill-sync.js','input','metadata','\x20has\x20scope=\x22','validation','Updated\x20personal\x20Skill\x20','2458506YmihsU','198453nUkhmL','appcode','accessKey','../../core/api-client.js','Submitted\x20company\x20Skill\x20','dir','valid','15695703EkhyaS','848vBTPCO','map','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20','34335JNZPJL','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','warnings','Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','trim','1089292kEGkIh'];a49_0x515d=function(){return _0x4e6e2f;};return a49_0x515d();}import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,throwIfBuiltinPushTarget,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x546b21){const _0x10abce=a49_0x41b8,{getRuntimeSkillByCode:_0xb3647,validateRuntimeSkillPublish:_0x27ed01}=await import(_0x10abce(0xbb)),{readPushDirectory:_0x3cbd4d,resolvePushDirectoryIdentity:_0x5ed99e}=await import(_0x10abce(0xb1));if(!_0x546b21[_0x10abce(0xba)])throw CliErrors[_0x10abce(0x9c)]();const _0xa15cf7=resolvePushScope(_0x546b21),_0x5e5861=validateSkillDirectory(_0x546b21[_0x10abce(0xac)](_0x10abce(0x8a)));throwIfSkillValidationFailed(_0x5e5861);const _0x309842=_0x5ed99e(_0x5e5861[_0x10abce(0x8a)],_0x546b21['appCode'],remoteFirstMetadataOptions()),_0x43b1ae=await _0xb3647(_0x546b21[_0x10abce(0xa0)],_0x309842[_0x10abce(0x9a)]);throwIfBuiltinPushTarget(_0x43b1ae);if(_0xa15cf7===_0x10abce(0x9b)){const _0x57998d=_0x3cbd4d(_0x5e5861['dir'],_0x546b21[_0x10abce(0xa0)],remoteMissingCompanyReadOptions()),_0x413314=await _0x27ed01(_0x546b21[_0x10abce(0xa0)],_0x57998d[_0x10abce(0xb2)],{'visibility':_0x10abce(0xa7)});return{'method':_0x10abce(0xae),'url':'/api/cli/v1/skills/'+_0x546b21[_0x10abce(0xa0)]+_0x10abce(0x96),'body':{'skillCode':_0x57998d[_0x10abce(0x9a)],'visibility':_0x10abce(0xa7),'valid':_0x413314[_0x10abce(0x8b)],'errors':_0x413314['errors'],'warnings':_0x413314[_0x10abce(0x92)],'resolvedSlug':_0x413314['resolvedSlug'],'resolvedVersion':_0x413314['resolvedVersion']},'description':'Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'};}if(_0x43b1ae&&_0x43b1ae[_0x10abce(0x99)]!=='personal')throw CliErrors[_0x10abce(0xb5)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x309842[_0x10abce(0x9a)]+_0x10abce(0xb4)+(_0x43b1ae[_0x10abce(0x99)]??_0x10abce(0xa5))+'\x22.');const _0x5557f0=_0x3cbd4d(_0x5e5861[_0x10abce(0x8a)],_0x546b21[_0x10abce(0xa0)],_0x43b1ae?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':_0x10abce(0xae),'url':_0x10abce(0x97)+_0x546b21['appCode']+_0x10abce(0xad),'body':{'skillCode':_0x5557f0[_0x10abce(0x9a)],'visibility':'PRIVATE','files':_0x5557f0[_0x10abce(0xb2)]['files']?.[_0x10abce(0x9f)][_0x10abce(0x8e)](_0x5e9618=>_0x5e9618[_0x10abce(0xab)])??[]},'description':_0x10abce(0x93)};}export async function skillPushExecute(_0x2b4df8){const _0x31794b=a49_0x41b8,{createPersonalRuntimeSkill:_0x5bd901,downloadRuntimeSkillPackage:_0x1ea74c,getRuntimeSkillByCode:_0x1f6f96,publishCompanyRuntimeSkill:_0x44e955,updatePersonalRuntimeSkill:_0x3414dc,validateRuntimeSkillPublish:_0x572af}=await import('../../core/api-client.js'),{verifyRuntimeSkillPackage:_0x2a6a1a,verifyRuntimeSkillBundle:_0x57ed5a,readPushDirectory:_0x54809e,refreshPushDirectoryMetadataFromRemote:_0x2e6c49,recordPushedRuntimeSkill:_0x45a3f3,resolvePushDirectoryIdentity:_0x4b5c94}=await import('../../skills/runtime-skill-sync.js');if(!_0x2b4df8[_0x31794b(0xba)])throw CliErrors[_0x31794b(0x9c)]();const _0x43bf8d=resolvePushScope(_0x2b4df8),_0x180b48=validateSkillDirectory(_0x2b4df8[_0x31794b(0xac)](_0x31794b(0x8a)));throwIfSkillValidationFailed(_0x180b48);const _0xd57147=_0x180b48[_0x31794b(0x8a)];if(_0x43bf8d===_0x31794b(0x9b)){const _0x56b122=_0x4b5c94(_0xd57147,_0x2b4df8[_0x31794b(0xa0)],remoteFirstMetadataOptions()),_0x51dc9a=await _0x1f6f96(_0x2b4df8['appCode'],_0x56b122[_0x31794b(0x9a)]);throwIfBuiltinPushTarget(_0x51dc9a);if(_0x51dc9a)_0x2e6c49(_0xd57147,_0x51dc9a,_0x2b4df8[_0x31794b(0xa0)]);const _0x4957e0=_0x54809e(_0xd57147,_0x2b4df8['appCode'],_0x51dc9a?{'targetScope':_0x31794b(0x9b),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions()),_0x24acc0=await _0x572af(_0x2b4df8[_0x31794b(0xa0)],_0x4957e0['input'],{'visibility':_0x31794b(0xa7)});throwIfPublishValidationFailed(_0x4957e0['skillCode'],_0x24acc0);const _0x30e75f=_0x2b4df8[_0x31794b(0xa6)](_0x31794b(0xa4))||_0x2b4df8[_0x31794b(0xa6)](_0x31794b(0x9d));if(_0x24acc0[_0x31794b(0x92)][_0x31794b(0xa9)]>0x0&&!_0x30e75f)throw CliErrors[_0x31794b(0xb5)](_0x31794b(0x91)+_0x4957e0[_0x31794b(0x9a)]+'.',_0x31794b(0x8f)+_0x24acc0[_0x31794b(0x92)][_0x31794b(0x9e)](';\x20'));const _0x293c72=await _0x44e955(_0x2b4df8[_0x31794b(0xa0)],_0x4957e0[_0x31794b(0xb2)],{'confirmWarnings':_0x30e75f});return _0x45a3f3(_0xd57147,{..._0x293c72,'files':_0x4957e0[_0x31794b(0xb2)][_0x31794b(0x9f)]},_0x2b4df8['appCode'],{'scope':_0x31794b(0x9b)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x293c72),'scope':_0x31794b(0x9b),'reviewState':_0x31794b(0xaf),'submittedForReview':!![],'validation':{'warnings':_0x24acc0[_0x31794b(0x92)]}},'message':_0x31794b(0x89)+_0x4957e0[_0x31794b(0x9a)]+_0x31794b(0xa1)+(_0x293c72['version']??'(unknown)')+_0x31794b(0xb0)};}const _0x298fed=_0x2b4df8[_0x31794b(0xac)](_0x31794b(0xb9))[_0x31794b(0x94)](),_0x1681c3=Boolean(_0x298fed),_0x1b37e8=allowRetargetArgs(_0x1681c3),_0x45456f=_0x4b5c94(_0xd57147,_0x2b4df8[_0x31794b(0xa0)],{...remoteFirstMetadataOptions(),..._0x1b37e8[0x0]}),_0x603534=await _0x1f6f96(_0x2b4df8[_0x31794b(0xa0)],_0x45456f[_0x31794b(0x9a)]);throwIfBuiltinPushTarget(_0x603534);if(_0x603534){if(_0x603534[_0x31794b(0x99)]!=='personal'){if(_0x1681c3)throw CliErrors['validation']('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x45456f['skillCode']+_0x31794b(0xb4)+(_0x603534[_0x31794b(0x99)]??_0x31794b(0xa5))+'\x22.');_0x2e6c49(_0xd57147,_0x603534,_0x2b4df8['appCode']);}else!_0x1681c3&&_0x2e6c49(_0xd57147,_0x603534,_0x2b4df8['appCode']);}const _0x4e6c1e=_0x54809e(_0xd57147,_0x2b4df8[_0x31794b(0xa0)],_0x603534?remotePersonalReadOptions(_0x1681c3,_0x1b37e8[0x0]):remoteMissingPersonalReadOptions(_0x1b37e8[0x0])),_0x1d2e2b=_0x603534?.[_0x31794b(0x99)]===_0x31794b(0xa8)&&_0x603534['skillCode']===_0x4e6c1e[_0x31794b(0x9a)]?_0x603534:undefined,_0x2e6634=_0x1681c3&&_0x1d2e2b?withRetargetExistingMetadata(_0x4e6c1e[_0x31794b(0xb2)],_0x1d2e2b,{'preferInputSkillName':Boolean(_0x4e6c1e[_0x31794b(0xa2)])}):_0x4e6c1e[_0x31794b(0xb2)],_0x4f3388=_0x1d2e2b?await _0x3414dc(_0x4e6c1e[_0x31794b(0x9a)],_0x2b4df8['appCode'],_0x2e6634):await _0x5bd901(_0x2b4df8[_0x31794b(0xa0)],_0x2e6634);let _0x1b4aa5=_0x4f3388;if(isMultiFileManifest(_0x4e6c1e[_0x31794b(0xb2)]['files'])){const _0x3eae59=await _0x1ea74c(_0x31794b(0xa8),_0x4f3388[_0x31794b(0x9a)]||_0x4e6c1e[_0x31794b(0x9a)],_0x2b4df8[_0x31794b(0xa0)]);_0x57ed5a(_0x4e6c1e[_0x31794b(0xb2)][_0x31794b(0x9f)],_0x3eae59),_0x1b4aa5={..._0x4f3388,'files':_0x4e6c1e['input'][_0x31794b(0x9f)]};}else{if(isPackageBackedManifest(_0x4f3388[_0x31794b(0x9f)])){const _0x9bf29=await _0x1ea74c(_0x31794b(0xa8),_0x4f3388[_0x31794b(0x9a)]||_0x4e6c1e[_0x31794b(0x9a)],_0x2b4df8[_0x31794b(0xa0)]);_0x2a6a1a(_0x4f3388[_0x31794b(0x9f)],_0x9bf29);}}_0x45a3f3(_0xd57147,_0x1b4aa5,_0x2b4df8['appCode']);const _0x35415e=_0x1681c3?buildRetargetWarning(_0x45456f[_0x31794b(0xb3)],_0x2b4df8['appCode']):[];return{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4f3388),'warnings':[..._0x180b48['warnings'],..._0x35415e]},'message':_0x1d2e2b?_0x31794b(0xb6)+_0x4e6c1e[_0x31794b(0x9a)]:'Created\x20personal\x20Skill\x20'+_0x4e6c1e[_0x31794b(0x9a)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a50_0x18fb(_0x5197d4,_0x174b16){_0x5197d4=_0x5197d4-0x1ed;const _0x5da184=a50_0x5da1();let _0x18fb74=_0x5da184[_0x5197d4];return _0x18fb74;}(function(_0xac01f4,_0x52d147){const _0x26d8be=a50_0x18fb,_0x240b14=_0xac01f4();while(!![]){try{const _0x46cf04=parseInt(_0x26d8be(0x1f6))/0x1*(parseInt(_0x26d8be(0x1f8))/0x2)+-parseInt(_0x26d8be(0x1fa))/0x3*(-parseInt(_0x26d8be(0x204))/0x4)+-parseInt(_0x26d8be(0x1ff))/0x5+-parseInt(_0x26d8be(0x1f1))/0x6*(parseInt(_0x26d8be(0x1f7))/0x7)+parseInt(_0x26d8be(0x208))/0x8+-parseInt(_0x26d8be(0x203))/0x9*(-parseInt(_0x26d8be(0x1fc))/0xa)+-parseInt(_0x26d8be(0x20a))/0xb;if(_0x46cf04===_0x52d147)break;else _0x240b14['push'](_0x240b14['shift']());}catch(_0x1b6035){_0x240b14['push'](_0x240b14['shift']());}}}(a50_0x5da1,0x31a83));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x4d12c8){const _0x14125c=a50_0x18fb,_0x3883fb=_0x4d12c8[_0x14125c(0x1ef)]('scope')||_0x14125c(0x1fe);if(_0x3883fb===_0x14125c(0x1fe)||_0x3883fb==='company')return _0x3883fb;throw CliErrors[_0x14125c(0x1f4)](_0x14125c(0x1ed)+_0x3883fb+'\x22.');}function a50_0x5da1(){const _0x3ce6be=['Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','validation','scope','1mFwHnm','189133HpFYAv','792282ZofvoH','appCode','3MgrWru','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','655740lehpHy','Company\x20Skill\x20push\x20validation\x20failed\x20for\x20','personal','1188050NeTfVI','warning','\x20cannot\x20be\x20pushed.','Builtin\x20Skill\x20','36ZIBQDV','1434012zbHaUh','errors','length','skill-metadata-appcode-retargeted','2393136ZKoVsf','\x20after\x20successful\x20push.','6950966AVlHUq','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','company','str','valid','54bTDUYU','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'];a50_0x5da1=function(){return _0x3ce6be;};return a50_0x5da1();}export function allowRetargetArgs(_0x51bf2e){return _0x51bf2e?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x4779aa=a50_0x18fb;return{'targetScope':_0x4779aa(0x1ee),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x29fc7b={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x29fc7b};}export function remotePersonalReadOptions(_0x1698e0,_0x2f80e7={}){return{'ignoreInvalidMetadata':!![],..._0x1698e0?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x2f80e7};}export function throwIfBuiltinPushTarget(_0x2d97b3){const _0x215f06=a50_0x18fb;if(_0x2d97b3?.[_0x215f06(0x1f5)]!=='builtin')return;throw CliErrors[_0x215f06(0x1f4)](_0x215f06(0x202)+(_0x2d97b3['skillCode']??'(unknown)')+_0x215f06(0x201),_0x215f06(0x1f3));}export function throwIfPublishValidationFailed(_0x44a931,_0x30eb00){const _0x19c79a=a50_0x18fb;if(_0x30eb00[_0x19c79a(0x1f0)]&&_0x30eb00['errors'][_0x19c79a(0x206)]===0x0)return;const _0x5b4832=_0x30eb00[_0x19c79a(0x205)][_0x19c79a(0x206)]>0x0?_0x30eb00[_0x19c79a(0x205)]['join'](';\x20'):'SkillHub\x20validation\x20returned\x20invalid.';throw CliErrors[_0x19c79a(0x1f4)](_0x19c79a(0x1fd)+_0x44a931+'.',_0x5b4832);}export function buildRetargetWarning(_0x459f89,_0x507fba){const _0x76f6e=a50_0x18fb;if(!_0x459f89?.['appCode']||_0x459f89[_0x76f6e(0x1f9)]===_0x507fba)return[];return[{'level':_0x76f6e(0x200),'ruleId':_0x76f6e(0x207),'file':'lovrabet.skill.json','message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x459f89[_0x76f6e(0x1f9)]+_0x76f6e(0x1fb)+_0x507fba+_0x76f6e(0x209),'suggestion':_0x76f6e(0x1f2)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xcf6df5,_0x3160b1){const _0x213ffd=a51_0x2159,_0x3a6ee2=_0xcf6df5();while(!![]){try{const _0xf553d5=-parseInt(_0x213ffd(0x140))/0x1+parseInt(_0x213ffd(0x141))/0x2*(-parseInt(_0x213ffd(0x143))/0x3)+-parseInt(_0x213ffd(0x144))/0x4*(-parseInt(_0x213ffd(0x142))/0x5)+-parseInt(_0x213ffd(0x13d))/0x6+parseInt(_0x213ffd(0x147))/0x7+parseInt(_0x213ffd(0x13f))/0x8+-parseInt(_0x213ffd(0x13c))/0x9*(-parseInt(_0x213ffd(0x149))/0xa);if(_0xf553d5===_0x3160b1)break;else _0x3a6ee2['push'](_0x3a6ee2['shift']());}catch(_0x3e67ec){_0x3a6ee2['push'](_0x3a6ee2['shift']());}}}(a51_0x5392,0x66a54));function a51_0x2159(_0x577722,_0x43a0aa){_0x577722=_0x577722-0x133;const _0x539275=a51_0x5392();let _0x21591a=_0x539275[_0x577722];return _0x21591a;}export function withRetargetExistingMetadata(_0x1b8c0c,_0x39d178,_0x260608={}){const _0x17304c=a51_0x2159,_0xf7630a=_0x260608[_0x17304c(0x13b)]?_0x1b8c0c[_0x17304c(0x135)]??_0x39d178['skillName']:_0x39d178[_0x17304c(0x135)]??_0x1b8c0c[_0x17304c(0x135)];return{..._0x1b8c0c,'skillName':_0xf7630a,'description':_0x39d178[_0x17304c(0x133)]??_0x1b8c0c['description'],'tags':Array[_0x17304c(0x13a)](_0x39d178['tags'])?_0x39d178['tags']:_0x1b8c0c[_0x17304c(0x146)],'version':_0x39d178[_0x17304c(0x137)]??_0x1b8c0c[_0x17304c(0x137)],'sourceSessionId':_0x39d178['sourceSessionId']??_0x1b8c0c[_0x17304c(0x13e)]};}function a51_0x5392(){const _0x48879c=['appCode','isArray','preferInputSkillName','5481jLxalv','2761296KQufMd','sourceSessionId','6452920bCJZdz','324354PtMGuS','1196tVfdUL','25jWrgYx','789MWioQy','66484IawzGg','warning','tags','328083MiDLjq','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','6990uXaDVS','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','Local\x20Skill\x20metadata\x20appCode\x20','description','lovrabet.skill.json','skillName','\x20after\x20successful\x20push.','version','skill-metadata-appcode-retargeted'];a51_0x5392=function(){return _0x48879c;};return a51_0x5392();}export function buildRetargetWarning(_0x1feb52,_0x52d793){const _0x1e7667=a51_0x2159;if(!_0x1feb52?.[_0x1e7667(0x139)]||_0x1feb52[_0x1e7667(0x139)]===_0x52d793)return[];return[{'level':_0x1e7667(0x145),'ruleId':_0x1e7667(0x138),'file':_0x1e7667(0x134),'message':_0x1e7667(0x14b)+_0x1feb52[_0x1e7667(0x139)]+_0x1e7667(0x14a)+_0x52d793+_0x1e7667(0x136),'suggestion':_0x1e7667(0x148)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5b4e53,_0x3871f7){const _0x1c7952=a52_0x5cc2,_0x55947b=_0x5b4e53();while(!![]){try{const _0x31b5db=parseInt(_0x1c7952(0x105))/0x1+-parseInt(_0x1c7952(0x107))/0x2*(-parseInt(_0x1c7952(0xf7))/0x3)+parseInt(_0x1c7952(0x103))/0x4*(-parseInt(_0x1c7952(0x102))/0x5)+parseInt(_0x1c7952(0xfd))/0x6+parseInt(_0x1c7952(0xfb))/0x7+-parseInt(_0x1c7952(0x104))/0x8+-parseInt(_0x1c7952(0xf9))/0x9*(parseInt(_0x1c7952(0xfe))/0xa);if(_0x31b5db===_0x3871f7)break;else _0x55947b['push'](_0x55947b['shift']());}catch(_0x360926){_0x55947b['push'](_0x55947b['shift']());}}}(a52_0x51ae,0x48f4d));import{CliErrors}from'../../errors.js';function a52_0x51ae(){const _0x21782d=['89433pbywpa','trim','3197418aADFUv','validation','568278tOJyrX','670XsfSwg','Unsupported\x20Skill\x20sync\x20scope:\x20','all','company','154685NMBVWc','12yvjsYh','878360FlLUUg','370541VvnnDg','Unsupported\x20Skill\x20list\x20scope:\x20','172ssbRFY','8553TOVxNt','personal'];a52_0x51ae=function(){return _0x21782d;};return a52_0x51ae();}function a52_0x5cc2(_0x2b35da,_0xe8c9b0){_0x2b35da=_0x2b35da-0xf7;const _0x51aee1=a52_0x51ae();let _0x5cc224=_0x51aee1[_0x2b35da];return _0x5cc224;}export function normalizeSyncScopes(_0x55918c){const _0xaa623b=a52_0x5cc2,_0xcf9d69=_0x55918c[_0xaa623b(0xfa)]();if(!_0xcf9d69||_0xcf9d69===_0xaa623b(0x100))return[_0xaa623b(0xf8),_0xaa623b(0x101)];if(_0xcf9d69===_0xaa623b(0xf8)||_0xcf9d69===_0xaa623b(0x101))return[_0xcf9d69];throw CliErrors[_0xaa623b(0xfc)](_0xaa623b(0xff)+_0x55918c);}export function normalizeListScope(_0x562fc0){const _0x20b689=a52_0x5cc2,_0x58622f=_0x562fc0['trim']();if(!_0x58622f)return _0x20b689(0x100);if(_0x58622f===_0x20b689(0xf8)||_0x58622f===_0x20b689(0x101)||_0x58622f===_0x20b689(0x100))return _0x58622f;throw CliErrors[_0x20b689(0xfc)](_0x20b689(0x106)+_0x562fc0);}export function shouldListScope(_0x1da2d3,_0x2641e3){const _0x1ed1f1=a52_0x5cc2;if(_0x1da2d3===_0x1ed1f1(0x100))return!![];return _0x1da2d3===_0x2641e3;}export function listScopeToRuntimeScopes(_0x55459b){const _0xfe325f=a52_0x5cc2;if(_0x55459b===_0xfe325f(0x100))return[_0xfe325f(0xf8),_0xfe325f(0x101)];return[_0x55459b==='company'?_0xfe325f(0x101):_0x55459b];}export function listScopeToRemoteScope(_0x9a8b96){return _0x9a8b96;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x5e8c(_0x2f67d1,_0x7522c2){_0x2f67d1=_0x2f67d1-0x1d0;var _0x41b2f1=a53_0x41b2();var _0x5e8c3f=_0x41b2f1[_0x2f67d1];return _0x5e8c3f;}(function(_0x2c459a,_0xff8465){var _0x5101c3=a53_0x5e8c,_0x2e5915=_0x2c459a();while(!![]){try{var _0x505fa9=parseInt(_0x5101c3(0x1d6))/0x1*(-parseInt(_0x5101c3(0x1db))/0x2)+parseInt(_0x5101c3(0x1dd))/0x3*(parseInt(_0x5101c3(0x1dc))/0x4)+parseInt(_0x5101c3(0x1e4))/0x5*(parseInt(_0x5101c3(0x1d8))/0x6)+parseInt(_0x5101c3(0x1da))/0x7*(parseInt(_0x5101c3(0x1e6))/0x8)+parseInt(_0x5101c3(0x1d4))/0x9+parseInt(_0x5101c3(0x1d3))/0xa*(-parseInt(_0x5101c3(0x1d5))/0xb)+-parseInt(_0x5101c3(0x1e5))/0xc*(-parseInt(_0x5101c3(0x1e7))/0xd);if(_0x505fa9===_0xff8465)break;else _0x2e5915['push'](_0x2e5915['shift']());}catch(_0x3cb76d){_0x2e5915['push'](_0x2e5915['shift']());}}}(a53_0x41b2,0x61710));export function summarizeRuntimeSkill(_0x1075ec){var _0x3f1452=a53_0x5e8c;return{'id':_0x1075ec['id'],'skillCode':_0x1075ec[_0x3f1452(0x1e9)],'skillName':_0x1075ec[_0x3f1452(0x1df)],'scope':_0x1075ec['scope'],'version':_0x1075ec[_0x3f1452(0x1e1)],'readonly':_0x1075ec['readonly']};}export function summarizeLocalRuntimeSkill(_0x5b19fb){var _0x1795f1=a53_0x5e8c;return{'id':_0x5b19fb['id'],'skillCode':_0x5b19fb[_0x1795f1(0x1e9)],'skillName':_0x5b19fb[_0x1795f1(0x1df)],'scope':_0x5b19fb[_0x1795f1(0x1d9)],'appCode':_0x5b19fb['appCode'],'version':_0x5b19fb[_0x1795f1(0x1e1)],'status':_0x5b19fb[_0x1795f1(0x1d2)],'readonly':_0x5b19fb['readonly'],'tags':_0x5b19fb[_0x1795f1(0x1e0)],'dir':_0x5b19fb['dir'],'cacheDir':_0x5b19fb[_0x1795f1(0x1e2)],'skillMdPath':_0x5b19fb[_0x1795f1(0x1d1)],'metadataPath':_0x5b19fb[_0x1795f1(0x1e8)],'linkedPaths':_0x5b19fb[_0x1795f1(0x1d0)],'contentHash':_0x5b19fb[_0x1795f1(0x1d7)],'treeHash':_0x5b19fb[_0x1795f1(0x1e3)],'pulledAt':_0x5b19fb[_0x1795f1(0x1de)]};}function a53_0x41b2(){var _0x91d055=['42152GVDEjW','13567aBpttm','contentHash','6bgJQSB','scope','280USmkLU','110AliNKt','4ZINQbC','1424748tyovzn','pulledAt','skillName','tags','version','cacheDir','treeHash','1763115DohPVC','4084356pLIusF','36040ypJkIo','13UhkSFN','metadataPath','skillCode','linkedPaths','skillMdPath','status','1140HNAJEr','2106459uLKGXR'];a53_0x41b2=function(){return _0x91d055;};return a53_0x41b2();}
|