@lovrabet/lovrabet-cli 2.1.8-beta.3 → 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_0x188ad5=a40_0x39cc;function a40_0x1771(){const _0x31e032=['schemaVersion','Local\x20service\x20not\x20found:\x20','code','missing','reduce','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','Invalid\x20service\x20manifest\x20JSON:\x20','normalizedManifest','kind','$.services[','flatMap','warnings','trim','object','4fxrMCG','toISOString','].manifest','manifest','invalid','services','isArray','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','8XUDKgu','description','report','risk','cliPath','target','utf8','.tmp','updatedAt','manifests','234mbsVLK','update','file','sourceHash','service','push','3804053UUiqxt','services\x20must\x20be\x20an\x20array','startsWith','serviceCode','localeCompare','command','942429oHQzsN','slice','ENOENT','service.json','1902NeqmCm','map','sha256','2123640XAGXPn','Remove\x20or\x20migrate\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','parse','find','length','path','join','Service\x20manifest\x20validation\x20failed:\x0a','Unsupported\x20schemaVersion:\x20','Service\x20manifest\x20file\x20not\x20found:\x20','findIndex','now','homeDirName','registryIndex','6251UZvRIk','commands','homeDir','importedAt','message','digest','name','13435ZMNqYf','stringify','errors','version','183016EntYUY','Invalid\x20service\x20registry\x20JSON:\x20','validation','filePath','string','Cannot\x20write\x20service\x20registry:\x20','186270VvGmCq'];a40_0x1771=function(){return _0x31e032;};return a40_0x1771();}(function(_0x1e1f72,_0x91084d){const _0x27c324=a40_0x39cc,_0x5848e0=_0x1e1f72();while(!![]){try{const _0x37962f=-parseInt(_0x27c324(0xe0))/0x1*(-parseInt(_0x27c324(0xf9))/0x2)+-parseInt(_0x27c324(0x118))/0x3*(-parseInt(_0x27c324(0x102))/0x4)+parseInt(_0x27c324(0xea))/0x5+parseInt(_0x27c324(0xc7))/0x6*(-parseInt(_0x27c324(0xd9))/0x7)+-parseInt(_0x27c324(0xe4))/0x8*(parseInt(_0x27c324(0x10c))/0x9)+parseInt(_0x27c324(0xca))/0xa+parseInt(_0x27c324(0x112))/0xb;if(_0x37962f===_0x91084d)break;else _0x5848e0['push'](_0x5848e0['shift']());}catch(_0xb11378){_0x5848e0['push'](_0x5848e0['shift']());}}}(a40_0x1771,0x5afea));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';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_0x188ad5(0x11b);export function getServiceRegistryPath(_0x50fcdf={}){const _0xdec98=a40_0x188ad5;return resolve(_0x50fcdf[_0xdec98(0xdb)]??homedir(),PRODUCT_CONFIG[_0xdec98(0xd7)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x473e11={}){const _0x432bb6=a40_0x188ad5,_0x2df002=getServiceRegistryPath(_0x473e11);if(!existsSync(_0x2df002))return emptyServiceRegistry();try{const _0x56dd83=readFileSync(_0x2df002,_0x432bb6(0x108));if(!_0x56dd83['trim']())return emptyServiceRegistry();const _0x39806c=JSON['parse'](_0x56dd83);if(_0x39806c[_0x432bb6(0xeb)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x432bb6(0xe6)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x39806c[_0x432bb6(0xeb)]),_0x432bb6(0xcb)+_0x2df002+'.');if(!Array['isArray'](_0x39806c[_0x432bb6(0xfe)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x39806c[_0x432bb6(0x10a)],'services':_0x39806c[_0x432bb6(0xfe)]};}catch(_0x583018){if(_0x583018 instanceof Error&&_0x583018[_0x432bb6(0xdf)]==='CliError')throw _0x583018;throw CliErrors[_0x432bb6(0xe6)](_0x432bb6(0xe5)+_0x2df002,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x269189,_0x25701d={}){const _0x6b675b=a40_0x188ad5,_0x19ee3a=getServiceRegistryPath(_0x25701d),_0x1ab8d=dirname(_0x19ee3a);!existsSync(_0x1ab8d)&&mkdirSync(_0x1ab8d,{'recursive':!![]});const _0x124af1=_0x19ee3a+_0x6b675b(0x109);try{writeFileSync(_0x124af1,JSON[_0x6b675b(0xe1)](_0x269189,null,0x2)+'\x0a',{'encoding':_0x6b675b(0x108),'mode':0x180}),renameSync(_0x124af1,_0x19ee3a);}catch(_0x7aed67){try{unlinkSync(_0x124af1);}catch{}if(_0x7aed67?.['code']===_0x6b675b(0x11a))throw CliErrors['validation'](_0x6b675b(0xe9)+_0x19ee3a);throw _0x7aed67;}return _0x19ee3a;}export function loadServiceManifestFromFile(_0x20bdca){const _0x5d430c=a40_0x188ad5,_0x3e86a7=resolve(_0x20bdca);if(!existsSync(_0x3e86a7))throw CliErrors['validation'](_0x5d430c(0xd4)+_0x20bdca);let _0x4aa75a;const _0x15d6f1=readFileSync(_0x3e86a7,'utf8');try{_0x4aa75a=JSON[_0x5d430c(0xcd)](_0x15d6f1);}catch{throw CliErrors[_0x5d430c(0xe6)](_0x5d430c(0xf1)+_0x20bdca,_0x5d430c(0x100));}const _0x514ab8=sha256(_0x15d6f1),_0x118edf=extractLoadedServiceManifests(_0x4aa75a,_0x514ab8),_0x31a270=aggregateValidationReports(_0x118edf),_0x241e1c=_0x118edf[0x0];return{'filePath':_0x3e86a7,'hash':_0x514ab8,'kind':isServiceRegistryLike(_0x4aa75a)?'registry':'manifest','manifest':_0x241e1c?.[_0x5d430c(0xfc)]??_0x4aa75a,'report':_0x31a270,'normalizedManifest':_0x118edf[_0x5d430c(0xcf)]===0x1?_0x241e1c?.[_0x5d430c(0xf2)]:undefined,'manifests':_0x118edf};}export function importServiceManifest(_0xbaa92b,_0x175c13={}){const _0x4538f0=a40_0x188ad5,_0x380ced=loadServiceManifestFromFile(_0xbaa92b);if(!_0x380ced['report']['ok'])throw CliErrors[_0x4538f0(0xe6)](formatValidationFailure(_0x380ced['report']),_0x4538f0(0xcc));if(_0x380ced[_0x4538f0(0x10b)][_0x4538f0(0xcf)]===0x0)throw CliErrors['validation'](_0x4538f0(0xf0),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x2332b1=readServiceRegistry(_0x175c13),_0x570f55=(_0x175c13[_0x4538f0(0xd6)]??(()=>new Date()))()['toISOString'](),_0x50f7a7=[];let _0xce1c5c=0x0,_0x566408=0x0;for(const _0x5d1834 of _0x380ced['manifests']){if(!_0x5d1834[_0x4538f0(0xf2)])continue;const _0x5e2864=_0x5d1834[_0x4538f0(0xf2)]['service'][_0x4538f0(0xed)],_0x230a9e={'serviceCode':_0x5e2864,'version':_0x5d1834['normalizedManifest'][_0x4538f0(0xe3)],'importedAt':_0x570f55,'source':{'type':_0x4538f0(0x10e),'path':_0x380ced[_0x4538f0(0xe7)],'hash':_0x5d1834[_0x4538f0(0x10f)]},'manifest':_0x5d1834[_0x4538f0(0xfc)],'normalizedManifest':_0x5d1834[_0x4538f0(0xf2)]},_0x41f93e=_0x2332b1[_0x4538f0(0xfe)][_0x4538f0(0xd5)](_0xfe4e72=>_0xfe4e72[_0x4538f0(0x115)]===_0x5e2864);_0x41f93e>=0x0?(_0x2332b1[_0x4538f0(0xfe)][_0x41f93e]=_0x230a9e,_0x566408++):(_0x2332b1[_0x4538f0(0xfe)][_0x4538f0(0x111)](_0x230a9e),_0xce1c5c++),_0x50f7a7['push'](_0x230a9e);}_0x2332b1[_0x4538f0(0xfe)]['sort']((_0x459ae7,_0x4850ec)=>_0x459ae7[_0x4538f0(0x115)][_0x4538f0(0x116)](_0x4850ec['serviceCode'])),_0x2332b1['updatedAt']=_0x570f55;const _0x5bf085=writeServiceRegistry(_0x2332b1,_0x175c13);return{'registryPath':_0x5bf085,'entry':_0x50f7a7[0x0],'replaced':_0x50f7a7['length']===0x1?_0x566408===0x1:_0x566408>0x0,'entries':_0x50f7a7,'imported':_0xce1c5c,'updated':_0x566408,'serviceCount':_0x2332b1[_0x4538f0(0xfe)][_0x4538f0(0xcf)]};}export function exportServiceManifest(_0x3d2fa4,_0x532b22,_0x3d0546={}){const _0x5db0e1=a40_0x188ad5,_0x3562be=getServiceRegistryPath(_0x3d0546),_0x2bf41b=getLocalServiceEntry(_0x3d2fa4,_0x3d0546);if(!_0x2bf41b)throw CliErrors[_0x5db0e1(0xe6)](_0x5db0e1(0xec)+_0x3d2fa4,_0x5db0e1(0x101));const _0x4dc1e7=resolve(_0x532b22),_0xbbcf1d=dirname(_0x4dc1e7);return!existsSync(_0xbbcf1d)&&mkdirSync(_0xbbcf1d,{'recursive':!![]}),writeFileSync(_0x4dc1e7,JSON[_0x5db0e1(0xe1)](_0x2bf41b[_0x5db0e1(0xfc)],null,0x2)+'\x0a',{'encoding':_0x5db0e1(0x108),'mode':0x180}),{'registryPath':_0x3562be,'filePath':_0x4dc1e7,'entry':_0x2bf41b};}export function removeServiceManifest(_0x1e0a32,_0x54993e={}){const _0x401c90=a40_0x188ad5,_0x54bbc2=readServiceRegistry(_0x54993e),_0x2ad719=_0x1e0a32['trim'](),_0x19420b=_0x54bbc2[_0x401c90(0xfe)][_0x401c90(0xd5)](_0xab158d=>_0xab158d[_0x401c90(0x115)]===_0x2ad719);if(_0x19420b<0x0)throw CliErrors[_0x401c90(0xe6)](_0x401c90(0xec)+_0x2ad719,_0x401c90(0x101));const [_0xb89bb7]=_0x54bbc2['services']['splice'](_0x19420b,0x1),_0xfcb3=(_0x54993e[_0x401c90(0xd6)]??(()=>new Date()))()[_0x401c90(0xfa)]();_0x54bbc2['updatedAt']=_0xfcb3;const _0x49217a=writeServiceRegistry(_0x54bbc2,_0x54993e);return{'registryPath':_0x49217a,'entry':_0xb89bb7,'serviceCount':_0x54bbc2['services'][_0x401c90(0xcf)]};}export function listLocalServices(_0x4e3785={}){return readServiceRegistry(_0x4e3785)['services'];}export function getLocalServiceEntry(_0x187525,_0x22b35a={}){const _0x145490=a40_0x188ad5;return readServiceRegistry(_0x22b35a)[_0x145490(0xfe)][_0x145490(0xce)](_0x4a0cae=>_0x4a0cae['serviceCode']===_0x187525['trim']());}export function listLocalServiceTrees(_0x54b054={}){const _0x45af12=a40_0x188ad5;return readServiceRegistry(_0x54b054)[_0x45af12(0xfe)]['map'](_0xc3f64=>_0xc3f64[_0x45af12(0xf2)]);}export function inspectServiceRegistry(_0x250095={}){const _0x2fa8d6=a40_0x188ad5,_0x3846ce=getServiceRegistryPath(_0x250095);if(!existsSync(_0x3846ce))return emptyServiceRegistryInspection(_0x3846ce,_0x2fa8d6(0xee),![]);try{const _0x33d660=readFileSync(_0x3846ce,_0x2fa8d6(0x108));if(!_0x33d660[_0x2fa8d6(0xf7)]())return emptyServiceRegistryInspection(_0x3846ce,'empty',!![]);const _0x5172d9=JSON[_0x2fa8d6(0xcd)](_0x33d660);if(_0x5172d9[_0x2fa8d6(0xeb)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x3846ce,'invalid',!![]),'schemaVersion':_0x5172d9[_0x2fa8d6(0xeb)],'message':_0x2fa8d6(0xd3)+String(_0x5172d9[_0x2fa8d6(0xeb)])};if(!Array['isArray'](_0x5172d9[_0x2fa8d6(0xfe)]))return{...emptyServiceRegistryInspection(_0x3846ce,_0x2fa8d6(0xfd),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5172d9['updatedAt'],'message':_0x2fa8d6(0x113)};const _0x30fda4=_0x5172d9[_0x2fa8d6(0xfe)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x3846ce,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5172d9[_0x2fa8d6(0x10a)],'serviceCount':_0x30fda4[_0x2fa8d6(0xcf)],'commandCount':_0x30fda4[_0x2fa8d6(0xef)]((_0x3d9028,_0x44b5e7)=>_0x3d9028+_0x44b5e7['commandCount'],0x0),'services':_0x30fda4};}catch(_0x5d9674){return{...emptyServiceRegistryInspection(_0x3846ce,_0x2fa8d6(0xfd),!![]),'message':_0x5d9674 instanceof Error?_0x5d9674[_0x2fa8d6(0xdd)]:String(_0x5d9674)};}}export function formatValidationFailure(_0x52521e){const _0x3c0b7c=a40_0x188ad5,_0x26faf1=_0x52521e['errors'][_0x3c0b7c(0xc8)](_0x462f50=>_0x462f50[_0x3c0b7c(0xd0)]+':\x20'+_0x462f50[_0x3c0b7c(0xdd)]);return _0x3c0b7c(0xd2)+_0x26faf1[_0x3c0b7c(0xd1)]('\x0a');}function extractLoadedServiceManifests(_0xf63d72,_0x91bc01){const _0x4bf2a3=a40_0x188ad5;if(!isServiceRegistryLike(_0xf63d72)){const _0x5b46ec=_0xf63d72,_0x5c641c=validateServiceTreeManifest(_0x5b46ec);return[{'manifest':_0x5b46ec,'report':_0x5c641c,'normalizedManifest':_0x5c641c['ok']?normalizeServiceTreeManifest(_0x5b46ec):undefined,'sourceHash':_0x91bc01}];}return _0xf63d72[_0x4bf2a3(0xfe)][_0x4bf2a3(0xc8)]((_0x5dcecf,_0x11b984)=>{const _0x361be9=_0x4bf2a3,_0x39dab9=isObjectRecord(_0x5dcecf)?_0x5dcecf[_0x361be9(0xfc)]:undefined,_0x548fef=validateServiceTreeManifest(_0x39dab9),_0xb7032a=isObjectRecord(_0x5dcecf)&&typeof _0x5dcecf[_0x361be9(0x115)]===_0x361be9(0xe8)?_0x5dcecf[_0x361be9(0x115)]:undefined;return{'manifest':_0x39dab9,'report':_0x548fef,'normalizedManifest':_0x548fef['ok']?normalizeServiceTreeManifest(_0x39dab9):undefined,'sourceHash':sha256(JSON[_0x361be9(0xe1)](_0x39dab9,null,0x2)+'\x0a'),'registryIndex':_0x11b984,'registryServiceCode':_0xb7032a};});}function aggregateValidationReports(_0x4b5f54){const _0x292b83=a40_0x188ad5,_0x408df5=_0x4b5f54[_0x292b83(0xf5)](_0x4ab869=>_0x4ab869[_0x292b83(0xd8)]===undefined?_0x4ab869[_0x292b83(0x104)][_0x292b83(0xe2)]:_0x4ab869[_0x292b83(0x104)][_0x292b83(0xe2)][_0x292b83(0xc8)](_0x5737b1=>({..._0x5737b1,'path':prefixRegistryIssuePath(_0x4ab869[_0x292b83(0xd8)],_0x5737b1[_0x292b83(0xd0)])}))),_0x3a024f=_0x4b5f54[_0x292b83(0xf5)](_0x5309be=>_0x5309be[_0x292b83(0xd8)]===undefined?_0x5309be[_0x292b83(0x104)][_0x292b83(0xf6)]:_0x5309be[_0x292b83(0x104)]['warnings']['map'](_0x5a0f96=>({..._0x5a0f96,'path':prefixRegistryIssuePath(_0x5309be[_0x292b83(0xd8)],_0x5a0f96[_0x292b83(0xd0)])})));return{'ok':_0x408df5[_0x292b83(0xcf)]===0x0,'errors':_0x408df5,'warnings':_0x3a024f};}function prefixRegistryIssuePath(_0x55c4ae,_0x49695b){const _0x4508fb=a40_0x188ad5;if(_0x49695b==='$')return _0x4508fb(0xf4)+_0x55c4ae+'].manifest';if(_0x49695b[_0x4508fb(0x114)]('$.'))return _0x4508fb(0xf4)+_0x55c4ae+_0x4508fb(0xfb)+_0x49695b[_0x4508fb(0x119)](0x1);if(_0x49695b['startsWith']('$['))return _0x4508fb(0xf4)+_0x55c4ae+_0x4508fb(0xfb)+_0x49695b[_0x4508fb(0x119)](0x1);return'$.services['+_0x55c4ae+'].manifest.'+_0x49695b;}function isServiceRegistryLike(_0xf8b254){const _0x286259=a40_0x188ad5;return isObjectRecord(_0xf8b254)&&_0xf8b254[_0x286259(0xeb)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x286259(0xff)](_0xf8b254[_0x286259(0xfe)]);}function isObjectRecord(_0xa98c4a){const _0x2bb9d8=a40_0x188ad5;return Boolean(_0xa98c4a)&&typeof _0xa98c4a===_0x2bb9d8(0xf8)&&!Array[_0x2bb9d8(0xff)](_0xa98c4a);}function emptyServiceRegistryInspection(_0xe658ab,_0x3c62b5,_0x1164a9){return{'registryPath':_0xe658ab,'exists':_0x1164a9,'status':_0x3c62b5,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x2b6762){const _0x199367=a40_0x188ad5,_0x5eade8=_0x2b6762[_0x199367(0xf2)],_0x3ca9c0=_0x5eade8[_0x199367(0xda)]['map'](_0x73768e=>({'path':_0x73768e[_0x199367(0x106)],'description':_0x73768e[_0x199367(0x103)],'risk':_0x73768e[_0x199367(0x105)],'targetKind':_0x73768e['target'][_0x199367(0xf3)],'targetCommand':_0x73768e[_0x199367(0x107)][_0x199367(0x117)]}));return{'serviceCode':_0x2b6762[_0x199367(0x115)],'name':_0x5eade8[_0x199367(0x110)][_0x199367(0xdf)],'description':_0x5eade8[_0x199367(0x110)][_0x199367(0x103)],'version':_0x2b6762[_0x199367(0xe3)],'importedAt':_0x2b6762[_0x199367(0xdc)],'source':_0x2b6762['source'],'commandCount':_0x3ca9c0[_0x199367(0xcf)],'commands':_0x3ca9c0};}function a40_0x39cc(_0x387c0d,_0xe1ca3a){_0x387c0d=_0x387c0d-0xc7;const _0x1771b4=a40_0x1771();let _0x39cc96=_0x1771b4[_0x387c0d];return _0x39cc96;}function sha256(_0x1557e0){const _0x142f60=a40_0x188ad5;return createHash(_0x142f60(0xc9))[_0x142f60(0x10d)](_0x1557e0)[_0x142f60(0xde)]('hex');}
|
|
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
|
-
function
|
|
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
|
-
|
|
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
|
-
|
|
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();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x2af132=a54_0x9658;(function(_0x52ef7d,_0x5f0e38){const _0x5eb6e3=a54_0x9658,_0x19d3f6=_0x52ef7d();while(!![]){try{const _0x4301a5=-parseInt(_0x5eb6e3(0x1de))/0x1*(parseInt(_0x5eb6e3(0x1dd))/0x2)+-parseInt(_0x5eb6e3(0x200))/0x3*(parseInt(_0x5eb6e3(0x1fd))/0x4)+-parseInt(_0x5eb6e3(0x1dc))/0x5+-parseInt(_0x5eb6e3(0x1e3))/0x6+parseInt(_0x5eb6e3(0x1ef))/0x7+parseInt(_0x5eb6e3(0x1e0))/0x8+parseInt(_0x5eb6e3(0x1f3))/0x9;if(_0x4301a5===_0x5f0e38)break;else _0x19d3f6['push'](_0x19d3f6['shift']());}catch(_0x56178b){_0x19d3f6['push'](_0x19d3f6['shift']());}}}(a54_0x278c,0xcc84e));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a54_0x2af132(0x1df),a54_0x2af132(0x1f9),a54_0x2af132(0x1e9)];export const DEFAULT_SKILL_TARGET=a54_0x2af132(0x1e4);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE='references/runtime-contract.md';export const OUTPUT_CONTRACT_FILE='references/output-contract.md';function a54_0x278c(){const _0x4d84e2=['\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','timestamp','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','6660425LAkkUI','40336RGKjUb','67BcMBBn','write','5597024luwwCD','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','validation','1485348PIzEJF','.agents/skills','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','trainer','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','Invalid\x20Skill\x20name:\x20','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','type','1713754KjQukj','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','Unsupported\x20Skill\x20type:\x20','toISOString','25491870bkABtq','#\x20Output\x20Contract\x0a\x0a','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','SKILL.md','trim','includes','read','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','33084rNfmQH','skillName','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','3VLsfGG'];a54_0x278c=function(){return _0x4d84e2;};return a54_0x278c();}export function validateSkillName(_0xfd9dd2){const _0x2b87b7=a54_0x2af132,_0x4a29ce=_0xfd9dd2['trim']();if(!SKILL_NAME_PATTERN['test'](_0x4a29ce))throw CliErrors[_0x2b87b7(0x1e2)](_0x2b87b7(0x1ec)+_0xfd9dd2+_0x2b87b7(0x203),_0x2b87b7(0x1e7));return _0x4a29ce;}function a54_0x9658(_0x28e758,_0x2d2f9a){_0x28e758=_0x28e758-0x1dc;const _0x278c5d=a54_0x278c();let _0x965886=_0x278c5d[_0x28e758];return _0x965886;}export function normalizeSkillTemplateType(_0x543538){const _0xf4327f=a54_0x2af132,_0x19719c=(_0x543538||_0xf4327f(0x1df))[_0xf4327f(0x1f7)]()||'write';if(SKILL_TYPES[_0xf4327f(0x1f8)](_0x19719c))return _0x19719c;throw CliErrors[_0xf4327f(0x1e2)](_0xf4327f(0x1f1)+_0x543538,'Use\x20one\x20of:\x20'+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x132132){const _0x43fc01=a54_0x2af132,_0x2f381e=validateSkillName(_0x132132[_0x43fc01(0x1fe)]),_0x5e826f=normalizeSkillTemplateType(_0x132132[_0x43fc01(0x1ee)]),_0x36e421=_0x132132[_0x43fc01(0x202)]??new Date()[_0x43fc01(0x1f2)]();return{'skillName':_0x2f381e,'type':_0x5e826f,'files':[{'path':_0x43fc01(0x1f6),'content':renderSkillMd(_0x2f381e,_0x5e826f,_0x36e421)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x2f381e,_0x5e826f)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x2f381e,_0x5e826f)}]};}function renderSkillMd(_0x4f44dc,_0x208d76,_0xe13362){const _0x56411c=a54_0x2af132,_0x4f32ba=typeWorkflow(_0x208d76);return'---\x0aname:\x20'+_0x4f44dc+_0x56411c(0x1ea)+_0x208d76+'\x0a\x20\x20created:\x20\x22'+_0xe13362+_0x56411c(0x1f5)+_0x4f44dc+_0x56411c(0x1e6)+_0x4f32ba+'\x0a\x0a'+businessStateSection(_0x208d76)+_0x56411c(0x1ed);}function renderRuntimeContract(_0x50b274,_0x2686be){const _0x33c2b4=a54_0x2af132,_0x2e1a3b=_0x2686be===_0x33c2b4(0x1df)?_0x33c2b4(0x204):'';return _0x33c2b4(0x1fa)+_0x50b274+_0x33c2b4(0x1e1)+_0x2686be+_0x33c2b4(0x1eb)+_0x2e1a3b+_0x33c2b4(0x1f0);}function renderOutputContract(_0xea0116,_0x268d80){const _0x2a146a=a54_0x2af132,_0x1d7596=_0x268d80===_0x2a146a(0x1df)?_0x2a146a(0x205):_0x268d80+'\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。';return _0x2a146a(0x1f4)+_0xea0116+_0x2a146a(0x1fb)+_0x1d7596+_0x2a146a(0x201);}function typeWorkflow(_0x138f6d){const _0x216301=a54_0x2af132;if(_0x138f6d===_0x216301(0x1f9))return _0x216301(0x1e5);if(_0x138f6d===_0x216301(0x1e9))return _0x216301(0x1e8);return _0x216301(0x1ff);}function businessStateSection(_0x74b6a8){const _0x1d4ddb=a54_0x2af132;if(_0x74b6a8!==_0x1d4ddb(0x1df))return'';return _0x1d4ddb(0x1fc);}
|