@lovrabet/lovrabet-cli 2.1.9-beta.4 → 2.1.10
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_0x35eed1=a40_0x667d;(function(_0x675ec4,_0x20f9a3){const _0x287ae2=a40_0x667d,_0xd1ef56=_0x675ec4();while(!![]){try{const _0x30084f=parseInt(_0x287ae2(0x9b))/0x1+-parseInt(_0x287ae2(0xbf))/0x2*(-parseInt(_0x287ae2(0xc2))/0x3)+parseInt(_0x287ae2(0x9c))/0x4*(-parseInt(_0x287ae2(0x84))/0x5)+parseInt(_0x287ae2(0xa4))/0x6+parseInt(_0x287ae2(0xbd))/0x7+-parseInt(_0x287ae2(0x7b))/0x8*(-parseInt(_0x287ae2(0x7e))/0x9)+-parseInt(_0x287ae2(0xc8))/0xa*(parseInt(_0x287ae2(0xb8))/0xb);if(_0x30084f===_0x20f9a3)break;else _0xd1ef56['push'](_0xd1ef56['shift']());}catch(_0x4a44ff){_0xd1ef56['push'](_0xd1ef56['shift']());}}}(a40_0xe65e,0x5020c));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_0x35eed1(0xca);export function getServiceRegistryPath(_0x3e6931={}){const _0x5c8b38=a40_0x35eed1;return resolve(_0x3e6931[_0x5c8b38(0x86)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3ee74c={}){const _0xb6ba05=a40_0x35eed1,_0x36dc73=getServiceRegistryPath(_0x3ee74c);if(!existsSync(_0x36dc73))return emptyServiceRegistry();try{const _0x442a05=readFileSync(_0x36dc73,'utf8');if(!_0x442a05[_0xb6ba05(0x9f)]())return emptyServiceRegistry();const _0x17eb3c=JSON['parse'](_0x442a05);if(_0x17eb3c[_0xb6ba05(0x7c)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0xb6ba05(0xa8)](_0xb6ba05(0x94)+String(_0x17eb3c['schemaVersion']),'Remove\x20or\x20migrate\x20'+_0x36dc73+'.');if(!Array[_0xb6ba05(0xce)](_0x17eb3c[_0xb6ba05(0xc1)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x17eb3c[_0xb6ba05(0x92)],'services':_0x17eb3c[_0xb6ba05(0xc1)]};}catch(_0x20296c){if(_0x20296c instanceof Error&&_0x20296c[_0xb6ba05(0xc3)]===_0xb6ba05(0xb5))throw _0x20296c;throw CliErrors[_0xb6ba05(0xa8)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x36dc73,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x17704b,_0x31abe9={}){const _0x21a455=a40_0x35eed1,_0x539eed=getServiceRegistryPath(_0x31abe9),_0x268f07=dirname(_0x539eed);!existsSync(_0x268f07)&&mkdirSync(_0x268f07,{'recursive':!![]});const _0x592c44=_0x539eed+_0x21a455(0x7d);try{writeFileSync(_0x592c44,JSON['stringify'](_0x17704b,null,0x2)+'\x0a',{'encoding':_0x21a455(0xbb),'mode':0x180}),renameSync(_0x592c44,_0x539eed);}catch(_0x485b92){try{unlinkSync(_0x592c44);}catch{}if(_0x485b92?.[_0x21a455(0x93)]===_0x21a455(0xa1))throw CliErrors[_0x21a455(0xa8)](_0x21a455(0xbc)+_0x539eed);throw _0x485b92;}return _0x539eed;}export function loadServiceManifestFromFile(_0x6d35fa){const _0x55e545=a40_0x35eed1,_0x309dca=resolve(_0x6d35fa);if(!existsSync(_0x309dca))throw CliErrors[_0x55e545(0xa8)](_0x55e545(0xaa)+_0x6d35fa);let _0x2ea326;const _0x555cf9=readFileSync(_0x309dca,_0x55e545(0xbb));try{_0x2ea326=JSON[_0x55e545(0x9a)](_0x555cf9);}catch{throw CliErrors[_0x55e545(0xa8)](_0x55e545(0xa0)+_0x6d35fa,_0x55e545(0xb9));}const _0x3242c9=sha256(_0x555cf9),_0x22416b=extractLoadedServiceManifests(_0x2ea326,_0x3242c9),_0x23f103=aggregateValidationReports(_0x22416b),_0x4e69a1=_0x22416b[0x0];return{'filePath':_0x309dca,'hash':_0x3242c9,'kind':isServiceRegistryLike(_0x2ea326)?_0x55e545(0x8a):'manifest','manifest':_0x4e69a1?.[_0x55e545(0xae)]??_0x2ea326,'report':_0x23f103,'normalizedManifest':_0x22416b[_0x55e545(0xbe)]===0x1?_0x4e69a1?.[_0x55e545(0xc4)]:undefined,'manifests':_0x22416b};}export function importServiceManifest(_0x537672,_0x2568d2={}){const _0x2e082e=a40_0x35eed1,_0x1ce341=loadServiceManifestFromFile(_0x537672);if(!_0x1ce341[_0x2e082e(0xc0)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x1ce341['report']),_0x2e082e(0xc7));if(_0x1ce341[_0x2e082e(0x95)][_0x2e082e(0xbe)]===0x0)throw CliErrors[_0x2e082e(0xa8)](_0x2e082e(0x96),_0x2e082e(0xa6));const _0x1e276a=readServiceRegistry(_0x2568d2),_0x2d871b=(_0x2568d2[_0x2e082e(0xb6)]??(()=>new Date()))()['toISOString'](),_0x3ea7f0=[];let _0x5939fd=0x0,_0x2d7787=0x0;for(const _0x38bd1b of _0x1ce341[_0x2e082e(0x95)]){if(!_0x38bd1b[_0x2e082e(0xc4)])continue;const _0x3da609=_0x38bd1b['normalizedManifest'][_0x2e082e(0xaf)]['code'],_0x343530={'serviceCode':_0x3da609,'version':_0x38bd1b['normalizedManifest']['version'],'importedAt':_0x2d871b,'source':{'type':_0x2e082e(0xb4),'path':_0x1ce341[_0x2e082e(0x88)],'hash':_0x38bd1b['sourceHash']},'manifest':_0x38bd1b[_0x2e082e(0xae)],'normalizedManifest':_0x38bd1b[_0x2e082e(0xc4)]},_0x530c93=_0x1e276a['services']['findIndex'](_0x20052e=>_0x20052e[_0x2e082e(0x8b)]===_0x3da609);_0x530c93>=0x0?(_0x1e276a[_0x2e082e(0xc1)][_0x530c93]=_0x343530,_0x2d7787++):(_0x1e276a[_0x2e082e(0xc1)][_0x2e082e(0x90)](_0x343530),_0x5939fd++),_0x3ea7f0[_0x2e082e(0x90)](_0x343530);}_0x1e276a[_0x2e082e(0xc1)][_0x2e082e(0x8c)]((_0x50f93b,_0x231aec)=>_0x50f93b[_0x2e082e(0x8b)][_0x2e082e(0x81)](_0x231aec[_0x2e082e(0x8b)])),_0x1e276a[_0x2e082e(0x92)]=_0x2d871b;const _0x5dc981=writeServiceRegistry(_0x1e276a,_0x2568d2);return{'registryPath':_0x5dc981,'entry':_0x3ea7f0[0x0],'replaced':_0x3ea7f0[_0x2e082e(0xbe)]===0x1?_0x2d7787===0x1:_0x2d7787>0x0,'entries':_0x3ea7f0,'imported':_0x5939fd,'updated':_0x2d7787,'serviceCount':_0x1e276a['services'][_0x2e082e(0xbe)]};}export function exportServiceManifest(_0x632c7c,_0x14968c,_0x496c42={}){const _0x24fc03=a40_0x35eed1,_0xb0bc00=getServiceRegistryPath(_0x496c42),_0x525206=getLocalServiceEntry(_0x632c7c,_0x496c42);if(!_0x525206)throw CliErrors[_0x24fc03(0xa8)](_0x24fc03(0xa9)+_0x632c7c,_0x24fc03(0xba));const _0x39920c=resolve(_0x14968c),_0x37ba1d=dirname(_0x39920c);return!existsSync(_0x37ba1d)&&mkdirSync(_0x37ba1d,{'recursive':!![]}),writeFileSync(_0x39920c,JSON[_0x24fc03(0xab)](_0x525206['manifest'],null,0x2)+'\x0a',{'encoding':_0x24fc03(0xbb),'mode':0x180}),{'registryPath':_0xb0bc00,'filePath':_0x39920c,'entry':_0x525206};}function a40_0x667d(_0x5d30d9,_0xd33cfb){_0x5d30d9=_0x5d30d9-0x7b;const _0xe65e49=a40_0xe65e();let _0x667d15=_0xe65e49[_0x5d30d9];return _0x667d15;}export function removeServiceManifest(_0x4eb6de,_0x593fd8={}){const _0x1927c9=a40_0x35eed1,_0x361154=readServiceRegistry(_0x593fd8),_0x42f6d7=_0x4eb6de['trim'](),_0x5af1fb=_0x361154[_0x1927c9(0xc1)][_0x1927c9(0x9d)](_0x55361d=>_0x55361d[_0x1927c9(0x8b)]===_0x42f6d7);if(_0x5af1fb<0x0)throw CliErrors['validation'](_0x1927c9(0xa9)+_0x42f6d7,_0x1927c9(0xba));const [_0x592228]=_0x361154[_0x1927c9(0xc1)][_0x1927c9(0xa3)](_0x5af1fb,0x1),_0x4728f8=(_0x593fd8[_0x1927c9(0xb6)]??(()=>new Date()))()['toISOString']();_0x361154[_0x1927c9(0x92)]=_0x4728f8;const _0x571a14=writeServiceRegistry(_0x361154,_0x593fd8);return{'registryPath':_0x571a14,'entry':_0x592228,'serviceCount':_0x361154[_0x1927c9(0xc1)][_0x1927c9(0xbe)]};}function a40_0xe65e(){const _0x4923e9=['registry','serviceCode','sort','missing','reduce','map','push','digest','updatedAt','code','Unsupported\x20service\x20registry\x20schemaVersion:\x20','manifests','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','commandCount','message','slice','parse','574694oDrQYe','44tFxfne','findIndex','startsWith','trim','Invalid\x20service\x20manifest\x20JSON:\x20','ENOENT','Unsupported\x20schemaVersion:\x20','splice','3535728xMZqSV','].manifest.','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','target','validation','Local\x20service\x20not\x20found:\x20','Service\x20manifest\x20file\x20not\x20found:\x20','stringify','importedAt','update','manifest','service','command','hex','string','flatMap','file','CliError','now','$.services[','6446zbpGgs','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','utf8','Cannot\x20write\x20service\x20registry:\x20','2232027SDtvJR','length','6PxiLHy','report','services','607938APxVBt','name','normalizedManifest','version','join','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','35780KrQkfN','find','service.json','source','registryIndex','path','isArray','542728uovQBz','schemaVersion','.tmp','63RAiugo','kind','sha256','localeCompare','description','errors','63980TLukqQ','commands','homeDir','].manifest','filePath','empty'];a40_0xe65e=function(){return _0x4923e9;};return a40_0xe65e();}export function listLocalServices(_0x42c25e={}){return readServiceRegistry(_0x42c25e)['services'];}export function getLocalServiceEntry(_0x1379f3,_0x389a35={}){const _0x310eea=a40_0x35eed1;return readServiceRegistry(_0x389a35)[_0x310eea(0xc1)][_0x310eea(0xc9)](_0x2ad072=>_0x2ad072[_0x310eea(0x8b)]===_0x1379f3[_0x310eea(0x9f)]());}export function listLocalServiceTrees(_0x4ab414={}){const _0xc13850=a40_0x35eed1;return readServiceRegistry(_0x4ab414)[_0xc13850(0xc1)][_0xc13850(0x8f)](_0xfa8584=>_0xfa8584[_0xc13850(0xc4)]);}export function inspectServiceRegistry(_0x26cc0d={}){const _0x2b145e=a40_0x35eed1,_0xc964d4=getServiceRegistryPath(_0x26cc0d);if(!existsSync(_0xc964d4))return emptyServiceRegistryInspection(_0xc964d4,_0x2b145e(0x8d),![]);try{const _0xcd88d5=readFileSync(_0xc964d4,_0x2b145e(0xbb));if(!_0xcd88d5[_0x2b145e(0x9f)]())return emptyServiceRegistryInspection(_0xc964d4,_0x2b145e(0x89),!![]);const _0x3121c2=JSON[_0x2b145e(0x9a)](_0xcd88d5);if(_0x3121c2['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0xc964d4,'invalid',!![]),'schemaVersion':_0x3121c2['schemaVersion'],'message':_0x2b145e(0xa2)+String(_0x3121c2[_0x2b145e(0x7c)])};if(!Array[_0x2b145e(0xce)](_0x3121c2['services']))return{...emptyServiceRegistryInspection(_0xc964d4,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3121c2['updatedAt'],'message':'services\x20must\x20be\x20an\x20array'};const _0x4aefea=_0x3121c2[_0x2b145e(0xc1)][_0x2b145e(0x8f)](summarizeLocalServiceEntry);return{'registryPath':_0xc964d4,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3121c2[_0x2b145e(0x92)],'serviceCount':_0x4aefea[_0x2b145e(0xbe)],'commandCount':_0x4aefea[_0x2b145e(0x8e)]((_0x31a73b,_0x57272a)=>_0x31a73b+_0x57272a[_0x2b145e(0x97)],0x0),'services':_0x4aefea};}catch(_0x4e71ac){return{...emptyServiceRegistryInspection(_0xc964d4,'invalid',!![]),'message':_0x4e71ac instanceof Error?_0x4e71ac[_0x2b145e(0x98)]:String(_0x4e71ac)};}}export function formatValidationFailure(_0x11cdf5){const _0x5a9b58=a40_0x35eed1,_0x23a6a3=_0x11cdf5[_0x5a9b58(0x83)][_0x5a9b58(0x8f)](_0x2c311f=>_0x2c311f[_0x5a9b58(0xcd)]+':\x20'+_0x2c311f[_0x5a9b58(0x98)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x23a6a3[_0x5a9b58(0xc6)]('\x0a');}function extractLoadedServiceManifests(_0x4f921d,_0x5e4a31){const _0x5dbed1=a40_0x35eed1;if(!isServiceRegistryLike(_0x4f921d)){const _0x3514df=_0x4f921d,_0x445427=validateServiceTreeManifest(_0x3514df);return[{'manifest':_0x3514df,'report':_0x445427,'normalizedManifest':_0x445427['ok']?normalizeServiceTreeManifest(_0x3514df):undefined,'sourceHash':_0x5e4a31}];}return _0x4f921d[_0x5dbed1(0xc1)][_0x5dbed1(0x8f)]((_0x206046,_0x4b6c08)=>{const _0x35ebe1=_0x5dbed1,_0xf260a2=isObjectRecord(_0x206046)?_0x206046[_0x35ebe1(0xae)]:undefined,_0x5e6f57=validateServiceTreeManifest(_0xf260a2),_0x287ba7=isObjectRecord(_0x206046)&&typeof _0x206046[_0x35ebe1(0x8b)]===_0x35ebe1(0xb2)?_0x206046[_0x35ebe1(0x8b)]:undefined;return{'manifest':_0xf260a2,'report':_0x5e6f57,'normalizedManifest':_0x5e6f57['ok']?normalizeServiceTreeManifest(_0xf260a2):undefined,'sourceHash':sha256(JSON[_0x35ebe1(0xab)](_0xf260a2,null,0x2)+'\x0a'),'registryIndex':_0x4b6c08,'registryServiceCode':_0x287ba7};});}function aggregateValidationReports(_0xad4155){const _0x4bf3be=a40_0x35eed1,_0x160f49=_0xad4155[_0x4bf3be(0xb3)](_0x523f70=>_0x523f70[_0x4bf3be(0xcc)]===undefined?_0x523f70[_0x4bf3be(0xc0)][_0x4bf3be(0x83)]:_0x523f70[_0x4bf3be(0xc0)][_0x4bf3be(0x83)][_0x4bf3be(0x8f)](_0xcf4c70=>({..._0xcf4c70,'path':prefixRegistryIssuePath(_0x523f70[_0x4bf3be(0xcc)],_0xcf4c70[_0x4bf3be(0xcd)])}))),_0x2e7dcc=_0xad4155[_0x4bf3be(0xb3)](_0x2650e9=>_0x2650e9['registryIndex']===undefined?_0x2650e9[_0x4bf3be(0xc0)]['warnings']:_0x2650e9[_0x4bf3be(0xc0)]['warnings'][_0x4bf3be(0x8f)](_0x4dbc26=>({..._0x4dbc26,'path':prefixRegistryIssuePath(_0x2650e9[_0x4bf3be(0xcc)],_0x4dbc26[_0x4bf3be(0xcd)])})));return{'ok':_0x160f49[_0x4bf3be(0xbe)]===0x0,'errors':_0x160f49,'warnings':_0x2e7dcc};}function prefixRegistryIssuePath(_0x4bd04e,_0x24355a){const _0x1dd251=a40_0x35eed1;if(_0x24355a==='$')return _0x1dd251(0xb7)+_0x4bd04e+_0x1dd251(0x87);if(_0x24355a[_0x1dd251(0x9e)]('$.'))return'$.services['+_0x4bd04e+_0x1dd251(0x87)+_0x24355a[_0x1dd251(0x99)](0x1);if(_0x24355a[_0x1dd251(0x9e)]('$['))return'$.services['+_0x4bd04e+_0x1dd251(0x87)+_0x24355a[_0x1dd251(0x99)](0x1);return _0x1dd251(0xb7)+_0x4bd04e+_0x1dd251(0xa5)+_0x24355a;}function isServiceRegistryLike(_0xd2dcad){const _0x119dd4=a40_0x35eed1;return isObjectRecord(_0xd2dcad)&&_0xd2dcad[_0x119dd4(0x7c)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0xd2dcad[_0x119dd4(0xc1)]);}function isObjectRecord(_0x515719){const _0x28e9c8=a40_0x35eed1;return Boolean(_0x515719)&&typeof _0x515719==='object'&&!Array[_0x28e9c8(0xce)](_0x515719);}function emptyServiceRegistryInspection(_0x40771c,_0x24739f,_0x29afa6){return{'registryPath':_0x40771c,'exists':_0x29afa6,'status':_0x24739f,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x5840d3){const _0x398df2=a40_0x35eed1,_0x272776=_0x5840d3['normalizedManifest'],_0x4ddfe6=_0x272776[_0x398df2(0x85)][_0x398df2(0x8f)](_0xb11e30=>({'path':_0xb11e30['cliPath'],'description':_0xb11e30[_0x398df2(0x82)],'risk':_0xb11e30['risk'],'targetKind':_0xb11e30['target'][_0x398df2(0x7f)],'targetCommand':_0xb11e30[_0x398df2(0xa7)][_0x398df2(0xb0)]}));return{'serviceCode':_0x5840d3[_0x398df2(0x8b)],'name':_0x272776['service']['name'],'description':_0x272776[_0x398df2(0xaf)][_0x398df2(0x82)],'version':_0x5840d3[_0x398df2(0xc5)],'importedAt':_0x5840d3[_0x398df2(0xac)],'source':_0x5840d3[_0x398df2(0xcb)],'commandCount':_0x4ddfe6[_0x398df2(0xbe)],'commands':_0x4ddfe6};}function sha256(_0x29c0e7){const _0x3a1df5=a40_0x35eed1;return createHash(_0x3a1df5(0x80))[_0x3a1df5(0xad)](_0x29c0e7)[_0x3a1df5(0x91)](_0x3a1df5(0xb1));}
|
|
1
|
+
const a40_0x205c7a=a40_0x376e;(function(_0x19b54a,_0x9204af){const _0x1b1dff=a40_0x376e,_0x1e5a7c=_0x19b54a();while(!![]){try{const _0x3c4e69=parseInt(_0x1b1dff(0x1b7))/0x1+parseInt(_0x1b1dff(0x1f3))/0x2*(-parseInt(_0x1b1dff(0x1bc))/0x3)+parseInt(_0x1b1dff(0x200))/0x4*(parseInt(_0x1b1dff(0x1f2))/0x5)+-parseInt(_0x1b1dff(0x20d))/0x6+-parseInt(_0x1b1dff(0x1db))/0x7+parseInt(_0x1b1dff(0x1c7))/0x8*(parseInt(_0x1b1dff(0x203))/0x9)+parseInt(_0x1b1dff(0x1e1))/0xa;if(_0x3c4e69===_0x9204af)break;else _0x1e5a7c['push'](_0x1e5a7c['shift']());}catch(_0x3ea4c1){_0x1e5a7c['push'](_0x1e5a7c['shift']());}}}(a40_0x13cc,0x90161));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_0x205c7a(0x1dd);export function getServiceRegistryPath(_0x521341={}){const _0x207f2f=a40_0x205c7a;return resolve(_0x521341[_0x207f2f(0x1d8)]??homedir(),PRODUCT_CONFIG[_0x207f2f(0x206)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x784b33={}){const _0x357a28=a40_0x205c7a,_0x2b639a=getServiceRegistryPath(_0x784b33);if(!existsSync(_0x2b639a))return emptyServiceRegistry();try{const _0x3f66a6=readFileSync(_0x2b639a,'utf8');if(!_0x3f66a6['trim']())return emptyServiceRegistry();const _0x46c5c4=JSON[_0x357a28(0x1d4)](_0x3f66a6);if(_0x46c5c4['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x357a28(0x1c4)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x46c5c4[_0x357a28(0x1f8)]),_0x357a28(0x1c3)+_0x2b639a+'.');if(!Array[_0x357a28(0x1cc)](_0x46c5c4[_0x357a28(0x1d7)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x46c5c4[_0x357a28(0x1f5)],'services':_0x46c5c4[_0x357a28(0x1d7)]};}catch(_0x4d82af){if(_0x4d82af instanceof Error&&_0x4d82af[_0x357a28(0x1fc)]===_0x357a28(0x1e4))throw _0x4d82af;throw CliErrors[_0x357a28(0x1c4)](_0x357a28(0x20a)+_0x2b639a,_0x357a28(0x1d3));}}export function writeServiceRegistry(_0x52b741,_0x3713db={}){const _0x27ff9a=a40_0x205c7a,_0xedad9e=getServiceRegistryPath(_0x3713db),_0x2b71b8=dirname(_0xedad9e);!existsSync(_0x2b71b8)&&mkdirSync(_0x2b71b8,{'recursive':!![]});const _0x5b9b96=_0xedad9e+_0x27ff9a(0x1b8);try{writeFileSync(_0x5b9b96,JSON['stringify'](_0x52b741,null,0x2)+'\x0a',{'encoding':_0x27ff9a(0x1df),'mode':0x180}),renameSync(_0x5b9b96,_0xedad9e);}catch(_0x1c8e2f){try{unlinkSync(_0x5b9b96);}catch{}if(_0x1c8e2f?.[_0x27ff9a(0x1d5)]===_0x27ff9a(0x1ec))throw CliErrors['validation'](_0x27ff9a(0x1da)+_0xedad9e);throw _0x1c8e2f;}return _0xedad9e;}export function loadServiceManifestFromFile(_0x560649){const _0x1e7a1a=a40_0x205c7a,_0x1d749f=resolve(_0x560649);if(!existsSync(_0x1d749f))throw CliErrors['validation'](_0x1e7a1a(0x1d1)+_0x560649);let _0x5e3f92;const _0x229210=readFileSync(_0x1d749f,'utf8');try{_0x5e3f92=JSON[_0x1e7a1a(0x1d4)](_0x229210);}catch{throw CliErrors[_0x1e7a1a(0x1c4)](_0x1e7a1a(0x1f4)+_0x560649,_0x1e7a1a(0x1c8));}const _0x2da41d=sha256(_0x229210),_0x164d20=extractLoadedServiceManifests(_0x5e3f92,_0x2da41d),_0x2a393d=aggregateValidationReports(_0x164d20),_0x275b98=_0x164d20[0x0];return{'filePath':_0x1d749f,'hash':_0x2da41d,'kind':isServiceRegistryLike(_0x5e3f92)?_0x1e7a1a(0x1dc):_0x1e7a1a(0x20e),'manifest':_0x275b98?.[_0x1e7a1a(0x20e)]??_0x5e3f92,'report':_0x2a393d,'normalizedManifest':_0x164d20[_0x1e7a1a(0x1cf)]===0x1?_0x275b98?.[_0x1e7a1a(0x1f1)]:undefined,'manifests':_0x164d20};}export function importServiceManifest(_0x4796db,_0x46c44a={}){const _0x202555=a40_0x205c7a,_0x3db917=loadServiceManifestFromFile(_0x4796db);if(!_0x3db917[_0x202555(0x1c6)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x3db917[_0x202555(0x1c6)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x3db917['manifests']['length']===0x0)throw CliErrors[_0x202555(0x1c4)](_0x202555(0x201),_0x202555(0x1fe));const _0x21047b=readServiceRegistry(_0x46c44a),_0x14e28a=(_0x46c44a[_0x202555(0x1de)]??(()=>new Date()))()[_0x202555(0x1ea)](),_0x34ab97=[];let _0x551fed=0x0,_0x51e10b=0x0;for(const _0xd4f490 of _0x3db917[_0x202555(0x20c)]){if(!_0xd4f490[_0x202555(0x1f1)])continue;const _0x14ddcb=_0xd4f490[_0x202555(0x1f1)][_0x202555(0x1c0)]['code'],_0x5dc2ab={'serviceCode':_0x14ddcb,'version':_0xd4f490[_0x202555(0x1f1)][_0x202555(0x1ce)],'importedAt':_0x14e28a,'source':{'type':_0x202555(0x1ed),'path':_0x3db917[_0x202555(0x1fd)],'hash':_0xd4f490[_0x202555(0x1e6)]},'manifest':_0xd4f490['manifest'],'normalizedManifest':_0xd4f490[_0x202555(0x1f1)]},_0x43c16a=_0x21047b[_0x202555(0x1d7)][_0x202555(0x1be)](_0xd6d433=>_0xd6d433['serviceCode']===_0x14ddcb);_0x43c16a>=0x0?(_0x21047b[_0x202555(0x1d7)][_0x43c16a]=_0x5dc2ab,_0x51e10b++):(_0x21047b[_0x202555(0x1d7)]['push'](_0x5dc2ab),_0x551fed++),_0x34ab97[_0x202555(0x1d0)](_0x5dc2ab);}_0x21047b[_0x202555(0x1d7)][_0x202555(0x1f6)]((_0x44743f,_0x35ab13)=>_0x44743f[_0x202555(0x207)][_0x202555(0x1eb)](_0x35ab13[_0x202555(0x207)])),_0x21047b[_0x202555(0x1f5)]=_0x14e28a;const _0x236b33=writeServiceRegistry(_0x21047b,_0x46c44a);return{'registryPath':_0x236b33,'entry':_0x34ab97[0x0],'replaced':_0x34ab97[_0x202555(0x1cf)]===0x1?_0x51e10b===0x1:_0x51e10b>0x0,'entries':_0x34ab97,'imported':_0x551fed,'updated':_0x51e10b,'serviceCount':_0x21047b[_0x202555(0x1d7)][_0x202555(0x1cf)]};}export function exportServiceManifest(_0x116c8e,_0x2265b0,_0x5859de={}){const _0x186ede=a40_0x205c7a,_0x149fa3=getServiceRegistryPath(_0x5859de),_0x560413=getLocalServiceEntry(_0x116c8e,_0x5859de);if(!_0x560413)throw CliErrors[_0x186ede(0x1c4)](_0x186ede(0x1c2)+_0x116c8e,_0x186ede(0x1ca));const _0x4dbf4d=resolve(_0x2265b0),_0x1071af=dirname(_0x4dbf4d);return!existsSync(_0x1071af)&&mkdirSync(_0x1071af,{'recursive':!![]}),writeFileSync(_0x4dbf4d,JSON[_0x186ede(0x1f9)](_0x560413[_0x186ede(0x20e)],null,0x2)+'\x0a',{'encoding':_0x186ede(0x1df),'mode':0x180}),{'registryPath':_0x149fa3,'filePath':_0x4dbf4d,'entry':_0x560413};}export function removeServiceManifest(_0x3ec8f3,_0x14c8ad={}){const _0x2da0b7=a40_0x205c7a,_0x147f74=readServiceRegistry(_0x14c8ad),_0x353013=_0x3ec8f3[_0x2da0b7(0x1b9)](),_0x51d22d=_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x1be)](_0x522c48=>_0x522c48[_0x2da0b7(0x207)]===_0x353013);if(_0x51d22d<0x0)throw CliErrors[_0x2da0b7(0x1c4)](_0x2da0b7(0x1c2)+_0x353013,_0x2da0b7(0x1ca));const [_0xb039d4]=_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x209)](_0x51d22d,0x1),_0x2403b4=(_0x14c8ad['now']??(()=>new Date()))()[_0x2da0b7(0x1ea)]();_0x147f74[_0x2da0b7(0x1f5)]=_0x2403b4;const _0x1bc556=writeServiceRegistry(_0x147f74,_0x14c8ad);return{'registryPath':_0x1bc556,'entry':_0xb039d4,'serviceCount':_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x1cf)]};}export function listLocalServices(_0x551264={}){const _0x254be5=a40_0x205c7a;return readServiceRegistry(_0x551264)[_0x254be5(0x1d7)];}export function getLocalServiceEntry(_0x456ecc,_0xe486f8={}){const _0x41b559=a40_0x205c7a;return readServiceRegistry(_0xe486f8)['services'][_0x41b559(0x1d2)](_0x3e4f1f=>_0x3e4f1f['serviceCode']===_0x456ecc[_0x41b559(0x1b9)]());}export function listLocalServiceTrees(_0x567a83={}){const _0x407240=a40_0x205c7a;return readServiceRegistry(_0x567a83)[_0x407240(0x1d7)][_0x407240(0x1bb)](_0x5d5abc=>_0x5d5abc[_0x407240(0x1f1)]);}export function inspectServiceRegistry(_0x483fdf={}){const _0x62d962=a40_0x205c7a,_0x30b926=getServiceRegistryPath(_0x483fdf);if(!existsSync(_0x30b926))return emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1b6),![]);try{const _0x52f3d4=readFileSync(_0x30b926,_0x62d962(0x1df));if(!_0x52f3d4[_0x62d962(0x1b9)]())return emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1e5),!![]);const _0x31ecd5=JSON[_0x62d962(0x1d4)](_0x52f3d4);if(_0x31ecd5[_0x62d962(0x1f8)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'schemaVersion':_0x31ecd5[_0x62d962(0x1f8)],'message':_0x62d962(0x1cb)+String(_0x31ecd5[_0x62d962(0x1f8)])};if(!Array[_0x62d962(0x1cc)](_0x31ecd5[_0x62d962(0x1d7)]))return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x31ecd5['updatedAt'],'message':_0x62d962(0x1e7)};const _0xfeda9d=_0x31ecd5['services'][_0x62d962(0x1bb)](summarizeLocalServiceEntry);return{'registryPath':_0x30b926,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x31ecd5['updatedAt'],'serviceCount':_0xfeda9d[_0x62d962(0x1cf)],'commandCount':_0xfeda9d[_0x62d962(0x1f0)]((_0x3553ed,_0x3417d9)=>_0x3553ed+_0x3417d9[_0x62d962(0x1e0)],0x0),'services':_0xfeda9d};}catch(_0x1b858f){return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'message':_0x1b858f instanceof Error?_0x1b858f[_0x62d962(0x205)]:String(_0x1b858f)};}}export function formatValidationFailure(_0x190837){const _0x437a4d=a40_0x205c7a,_0x517b0c=_0x190837[_0x437a4d(0x1ee)][_0x437a4d(0x1bb)](_0x1a170b=>_0x1a170b[_0x437a4d(0x1e2)]+':\x20'+_0x1a170b['message']);return _0x437a4d(0x1fa)+_0x517b0c[_0x437a4d(0x1c9)]('\x0a');}function extractLoadedServiceManifests(_0x120603,_0x54b6ee){const _0x19b10c=a40_0x205c7a;if(!isServiceRegistryLike(_0x120603)){const _0x20aaaa=_0x120603,_0x52f1a2=validateServiceTreeManifest(_0x20aaaa);return[{'manifest':_0x20aaaa,'report':_0x52f1a2,'normalizedManifest':_0x52f1a2['ok']?normalizeServiceTreeManifest(_0x20aaaa):undefined,'sourceHash':_0x54b6ee}];}return _0x120603['services'][_0x19b10c(0x1bb)]((_0xf9fb9a,_0x10be7f)=>{const _0x79c0b8=_0x19b10c,_0x27742e=isObjectRecord(_0xf9fb9a)?_0xf9fb9a[_0x79c0b8(0x20e)]:undefined,_0x374d56=validateServiceTreeManifest(_0x27742e),_0x191100=isObjectRecord(_0xf9fb9a)&&typeof _0xf9fb9a[_0x79c0b8(0x207)]===_0x79c0b8(0x1ff)?_0xf9fb9a[_0x79c0b8(0x207)]:undefined;return{'manifest':_0x27742e,'report':_0x374d56,'normalizedManifest':_0x374d56['ok']?normalizeServiceTreeManifest(_0x27742e):undefined,'sourceHash':sha256(JSON[_0x79c0b8(0x1f9)](_0x27742e,null,0x2)+'\x0a'),'registryIndex':_0x10be7f,'registryServiceCode':_0x191100};});}function aggregateValidationReports(_0x4ce061){const _0x585ceb=a40_0x205c7a,_0x46869f=_0x4ce061[_0x585ceb(0x1b5)](_0x28272b=>_0x28272b[_0x585ceb(0x204)]===undefined?_0x28272b[_0x585ceb(0x1c6)][_0x585ceb(0x1ee)]:_0x28272b[_0x585ceb(0x1c6)][_0x585ceb(0x1ee)]['map'](_0x13a030=>({..._0x13a030,'path':prefixRegistryIssuePath(_0x28272b['registryIndex'],_0x13a030[_0x585ceb(0x1e2)])}))),_0x45de38=_0x4ce061[_0x585ceb(0x1b5)](_0x3b5e7f=>_0x3b5e7f[_0x585ceb(0x204)]===undefined?_0x3b5e7f[_0x585ceb(0x1c6)]['warnings']:_0x3b5e7f[_0x585ceb(0x1c6)][_0x585ceb(0x20b)][_0x585ceb(0x1bb)](_0xd875f=>({..._0xd875f,'path':prefixRegistryIssuePath(_0x3b5e7f[_0x585ceb(0x204)],_0xd875f[_0x585ceb(0x1e2)])})));return{'ok':_0x46869f[_0x585ceb(0x1cf)]===0x0,'errors':_0x46869f,'warnings':_0x45de38};}function prefixRegistryIssuePath(_0x478f07,_0x4bde55){const _0x42638a=a40_0x205c7a;if(_0x4bde55==='$')return'$.services['+_0x478f07+'].manifest';if(_0x4bde55['startsWith']('$.'))return _0x42638a(0x1c1)+_0x478f07+'].manifest'+_0x4bde55[_0x42638a(0x1e8)](0x1);if(_0x4bde55[_0x42638a(0x202)]('$['))return _0x42638a(0x1c1)+_0x478f07+_0x42638a(0x1cd)+_0x4bde55[_0x42638a(0x1e8)](0x1);return _0x42638a(0x1c1)+_0x478f07+_0x42638a(0x208)+_0x4bde55;}function a40_0x13cc(){const _0x5282c9=['schemaVersion','stringify','Service\x20manifest\x20validation\x20failed:\x0a','invalid','name','filePath','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','string','268XKLbVX','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','startsWith','924849ZOUHfO','registryIndex','message','homeDirName','serviceCode','].manifest.','splice','Invalid\x20service\x20registry\x20JSON:\x20','warnings','manifests','2631060fHWijO','manifest','flatMap','missing','875631YtCKbq','.tmp','trim','importedAt','map','3GtYjkh','hex','findIndex','digest','service','$.services[','Local\x20service\x20not\x20found:\x20','Remove\x20or\x20migrate\x20','validation','risk','report','64ddhLdc','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','join','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Unsupported\x20schemaVersion:\x20','isArray','].manifest','version','length','push','Service\x20manifest\x20file\x20not\x20found:\x20','find','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','parse','code','commands','services','homeDir','description','Cannot\x20write\x20service\x20registry:\x20','8040529IxMByW','registry','service.json','now','utf8','commandCount','3903310gFIGCj','path','update','CliError','empty','sourceHash','services\x20must\x20be\x20an\x20array','slice','command','toISOString','localeCompare','ENOENT','file','errors','object','reduce','normalizedManifest','26325uebDmX','526942XbUnFC','Invalid\x20service\x20manifest\x20JSON:\x20','updatedAt','sort','target'];a40_0x13cc=function(){return _0x5282c9;};return a40_0x13cc();}function isServiceRegistryLike(_0x5730c2){const _0x35341e=a40_0x205c7a;return isObjectRecord(_0x5730c2)&&_0x5730c2[_0x35341e(0x1f8)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x35341e(0x1cc)](_0x5730c2[_0x35341e(0x1d7)]);}function a40_0x376e(_0x434b86,_0x512717){_0x434b86=_0x434b86-0x1b5;const _0x13ccb1=a40_0x13cc();let _0x376ec2=_0x13ccb1[_0x434b86];return _0x376ec2;}function isObjectRecord(_0x4318af){const _0x2356b0=a40_0x205c7a;return Boolean(_0x4318af)&&typeof _0x4318af===_0x2356b0(0x1ef)&&!Array[_0x2356b0(0x1cc)](_0x4318af);}function emptyServiceRegistryInspection(_0x41d50c,_0x26c3a8,_0x2de5aa){return{'registryPath':_0x41d50c,'exists':_0x2de5aa,'status':_0x26c3a8,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x27c8cf){const _0x60595e=a40_0x205c7a,_0xe20ddf=_0x27c8cf['normalizedManifest'],_0x85e8fa=_0xe20ddf[_0x60595e(0x1d6)]['map'](_0x285a91=>({'path':_0x285a91['cliPath'],'description':_0x285a91[_0x60595e(0x1d9)],'risk':_0x285a91[_0x60595e(0x1c5)],'targetKind':_0x285a91['target']['kind'],'targetCommand':_0x285a91[_0x60595e(0x1f7)][_0x60595e(0x1e9)]}));return{'serviceCode':_0x27c8cf[_0x60595e(0x207)],'name':_0xe20ddf[_0x60595e(0x1c0)][_0x60595e(0x1fc)],'description':_0xe20ddf[_0x60595e(0x1c0)][_0x60595e(0x1d9)],'version':_0x27c8cf[_0x60595e(0x1ce)],'importedAt':_0x27c8cf[_0x60595e(0x1ba)],'source':_0x27c8cf['source'],'commandCount':_0x85e8fa[_0x60595e(0x1cf)],'commands':_0x85e8fa};}function sha256(_0x577dec){const _0x43b5d3=a40_0x205c7a;return createHash('sha256')[_0x43b5d3(0x1e3)](_0x577dec)[_0x43b5d3(0x1bf)](_0x43b5d3(0x1bd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a41_0x444f(_0x638a4,_0x38f8bc){_0x638a4=_0x638a4-0xa8;const _0x23b875=a41_0x23b8();let _0x444fb1=_0x23b875[_0x638a4];return _0x444fb1;}const a41_0x5adb72=a41_0x444f;(function(_0x2d96dd,_0x4d55a7){const _0x149a9c=a41_0x444f,_0x334500=_0x2d96dd();while(!![]){try{const _0x1b2d92=parseInt(_0x149a9c(0xba))/0x1+parseInt(_0x149a9c(0xc6))/0x2+-parseInt(_0x149a9c(0xbf))/0x3*(-parseInt(_0x149a9c(0xaf))/0x4)+parseInt(_0x149a9c(0xbb))/0x5+parseInt(_0x149a9c(0xb8))/0x6+-parseInt(_0x149a9c(0xb4))/0x7*(parseInt(_0x149a9c(0xb9))/0x8)+-parseInt(_0x149a9c(0xa9))/0x9;if(_0x1b2d92===_0x4d55a7)break;else _0x334500['push'](_0x334500['shift']());}catch(_0x1d70cc){_0x334500['push'](_0x334500['shift']());}}}(a41_0x23b8,0x8c798));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';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':a41_0x5adb72(0xab),'command':a41_0x5adb72(0xbc),'description':a41_0x5adb72(0xc4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x5a3fd3){const _0x58b4f9=a41_0x5adb72,_0x5294bf=buildSkillCreatePlan(_0x5a3fd3['str'](_0x58b4f9(0xb5)),_0x5a3fd3['str'](_0x58b4f9(0xbd)),_0x5a3fd3[_0x58b4f9(0xad)](_0x58b4f9(0xbe)));return{'method':_0x58b4f9(0xb6),'url':_0x5294bf[_0x58b4f9(0xc3)],'body':{'skillName':_0x5294bf[_0x58b4f9(0xb7)][_0x58b4f9(0xa8)],'type':_0x5294bf[_0x58b4f9(0xb7)]['type'],'selfContained':!![],'files':_0x5294bf['rendered'][_0x58b4f9(0xb0)][_0x58b4f9(0xc5)](_0x5ebe65=>_0x5ebe65['path'])},'description':_0x58b4f9(0xaa)};},async 'execute'(_0x39eaf7){const _0x3518f2=a41_0x5adb72,_0x39f5d5=buildSkillCreatePlan(_0x39eaf7[_0x3518f2(0xad)](_0x3518f2(0xb5)),_0x39eaf7[_0x3518f2(0xad)](_0x3518f2(0xbd)),_0x39eaf7[_0x3518f2(0xad)](_0x3518f2(0xbe)));return writeSkillDraft(_0x39f5d5,_0x39eaf7['bool'](_0x3518f2(0xc2))),{'ok':!![],'data':{'skillName':_0x39f5d5[_0x3518f2(0xb7)][_0x3518f2(0xa8)],'type':_0x39f5d5['rendered'][_0x3518f2(0xbd)],'dir':_0x39f5d5['skillDir'],'files':_0x39f5d5[_0x3518f2(0xb7)][_0x3518f2(0xb0)][_0x3518f2(0xc5)](_0x2895bc=>_0x2895bc['path'])},'message':'Created\x20local\x20Skill\x20draft\x20'+_0x39f5d5['rendered'][_0x3518f2(0xa8)]};}};function buildSkillCreatePlan(_0x5a2a4c,_0x2c4a0c,_0x20ebd6){const _0x12f8d2=a41_0x5adb72,_0x5f15ab=renderSkillTemplate({'skillName':_0x5a2a4c,'type':_0x2c4a0c}),_0x106e1f=resolve(normalizeSkillTarget(_0x20ebd6));return{'rendered':_0x5f15ab,'targetRoot':_0x106e1f,'skillDir':resolve(_0x106e1f,_0x5f15ab[_0x12f8d2(0xa8)])};}function normalizeSkillTarget(_0x340421){const _0x51f231=a41_0x5adb72;return(_0x340421||DEFAULT_SKILL_TARGET)[_0x51f231(0xc0)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x3de8f8,_0x3c9e51){const _0x16064a=a41_0x5adb72;if(existsSync(_0x3de8f8[_0x16064a(0xc3)])){const _0x1d559c=lstatSync(_0x3de8f8[_0x16064a(0xc3)]);if(!_0x1d559c['isDirectory']()||_0x1d559c[_0x16064a(0xb3)]())throw CliErrors[_0x16064a(0xac)]('Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20'+_0x3de8f8[_0x16064a(0xc3)]);if(!_0x3c9e51)throw CliErrors[_0x16064a(0xac)](_0x16064a(0xb1)+_0x3de8f8['skillDir'],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x26cccb of _0x3de8f8[_0x16064a(0xb7)]['files']){const _0x1deb80=resolve(_0x3de8f8['skillDir'],_0x26cccb[_0x16064a(0xae)]),_0x3bb930=dirname(_0x1deb80);mkdirSync(_0x3bb930,{'recursive':!![]});if(existsSync(_0x1deb80)&&lstatSync(_0x1deb80)['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x1deb80);writeFileSync(_0x1deb80,_0x26cccb[_0x16064a(0xb2)],_0x16064a(0xc1));}}function a41_0x23b8(){const _0x134d3f=['4EPCAOZ','files','Skill\x20directory\x20already\x20exists:\x20','content','isSymbolicLink','182469sBwTiM','name','WRITE','rendered','1374204lEtYOR','136ANrUCC','703539oHgUMC','524705soxSXe','create','type','target','2016243RYXnZR','trim','utf8','force','skillDir','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','map','1651816GyCLwa','skillName','13652820Syuapq','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','skill','validation','str','path'];a41_0x23b8=function(){return _0x134d3f;};return a41_0x23b8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x4c6e8c=a42_0x467f;(function(_0x584bc0,_0x50cd5d){const _0x6bef20=a42_0x467f,_0x593ffa=_0x584bc0();while(!![]){try{const _0x178565=-parseInt(_0x6bef20(0x84))/0x1+parseInt(_0x6bef20(0x6f))/0x2+parseInt(_0x6bef20(0x7a))/0x3*(parseInt(_0x6bef20(0x76))/0x4)+parseInt(_0x6bef20(0x8b))/0x5+-parseInt(_0x6bef20(0x7d))/0x6*(parseInt(_0x6bef20(0x70))/0x7)+-parseInt(_0x6bef20(0x9c))/0x8+parseInt(_0x6bef20(0x86))/0x9*(parseInt(_0x6bef20(0x73))/0xa);if(_0x178565===_0x50cd5d)break;else _0x593ffa['push'](_0x593ffa['shift']());}catch(_0x49083b){_0x593ffa['push'](_0x593ffa['shift']());}}}(a42_0x9225,0x2552d));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';function a42_0x9225(){const _0x3fc168=['reduce','174842KTkLDL','14mnZrJv','map','all','2021990VTVvXN','bool','authRequired','151168SikEPo','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','../../../skills/runtime-skill-sync.js','skipped','24QadQuu','action','unchanged','539814VperPN','filter','company','code','trim','version','accessKey','120724mDsAgl','\x20company\x20Skill(s).','9deZHZV','production','appCode','updated','flatMap','398700kKWxJJ','scope','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','personal','str','removed','../../../core/api-client.js','force','skill','install','envName','write','skillCode','length','\x20personal\x20and\x20','includes','push','1745256glcbvg'];a42_0x9225=function(){return _0x3fc168;};return a42_0x9225();}import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a42_0x4c6e8c(0x93),'command':a42_0x4c6e8c(0x94),'description':a42_0x4c6e8c(0x77),'risk':a42_0x4c6e8c(0x96),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x2dd4af){return syncRuntimeSkills(_0x2dd4af);}};async function syncRuntimeSkills(_0x37a2df){const _0x5ef42e=a42_0x4c6e8c,{downloadRuntimeSkillPackage:_0x727acc,listRuntimeSkills:_0x2c0006}=await import(_0x5ef42e(0x91)),{linkEffectiveRuntimeSkills:_0x4fea0a,materializeRuntimeSkill:_0x341013,pruneStaleRuntimeSkillCache:_0x2cf9f6,pruneStaleRuntimeSkillLinks:_0xd02dcb}=await import(_0x5ef42e(0x78)),_0x50cba7=_0x37a2df[_0x5ef42e(0x8f)](_0x5ef42e(0x80)),_0x24c633=normalizeSyncScopes(_0x37a2df[_0x5ef42e(0x8f)](_0x5ef42e(0x8c))),_0x5732f8=_0x37a2df[_0x5ef42e(0x95)]??_0x5ef42e(0x87),_0x37ebee=_0x37a2df[_0x5ef42e(0x83)],_0x5ac8ff=_0x37a2df[_0x5ef42e(0x74)](_0x5ef42e(0x92));if(!_0x37ebee)throw CliErrors[_0x5ef42e(0x75)](_0x5ef42e(0x8d));const _0xdcfaf8=await Promise[_0x5ef42e(0x72)](_0x24c633[_0x5ef42e(0x71)](_0x2619c5=>_0x2c0006({'appCode':_0x37a2df[_0x5ef42e(0x88)],'scope':_0x2619c5,'code':_0x50cba7[_0x5ef42e(0x81)]()||undefined}))),_0x1e79ca=_0x24c633[_0x5ef42e(0x9a)](_0x5ef42e(0x8e))?_0xdcfaf8[_0x5ef42e(0x8a)]((_0xe6849f,_0x56960c)=>_0x24c633[_0x56960c]===_0x5ef42e(0x8e)?_0xe6849f[_0x5ef42e(0x8e)]:[]):[],_0xd4d47a=_0x24c633['includes'](_0x5ef42e(0x7f))?_0xdcfaf8[_0x5ef42e(0x8a)]((_0x550c3f,_0x54cf11)=>_0x24c633[_0x54cf11]==='company'?_0x550c3f[_0x5ef42e(0x7f)]:[]):[],_0x47dd37=new Set([..._0x1e79ca[_0x5ef42e(0x71)](_0x55d116=>_0x55d116[_0x5ef42e(0x97)]?.[_0x5ef42e(0x81)]())[_0x5ef42e(0x7e)](_0x231692=>Boolean(_0x231692)),..._0xd4d47a[_0x5ef42e(0x71)](_0x5a3153=>_0x5a3153[_0x5ef42e(0x97)]?.[_0x5ef42e(0x81)]())['filter'](_0xcd5eff=>Boolean(_0xcd5eff))]),_0x9663e8=_0x50cba7[_0x5ef42e(0x81)]()?[_0x50cba7[_0x5ef42e(0x81)]()]:undefined,_0x892dcb=_0x24c633['length']===0x2&&_0x24c633[_0x5ef42e(0x9a)](_0x5ef42e(0x8e))&&_0x24c633[_0x5ef42e(0x9a)]('company'),_0x4b0ecf=_0x892dcb?_0xd02dcb(_0x37a2df[_0x5ef42e(0x88)],_0x47dd37,{},_0x9663e8):[],_0x4e0051=_0x2cf9f6({'env':_0x5732f8,'accessKey':_0x37ebee,'appCode':_0x37a2df[_0x5ef42e(0x88)],'activeSkillCodes':_0x47dd37,'pruneSkillCodes':_0x9663e8,'scopes':_0x24c633}),_0x1e0b8f=[];for(const _0x3c9a09 of _0x1e79ca){_0x1e0b8f['push'](_0x341013(_0x3c9a09,'personal',{'env':_0x5732f8,'accessKey':_0x37ebee,'appCode':_0x37a2df['appCode'],'force':_0x5ac8ff,'packageBytes':await downloadSkillPackage(_0x3c9a09,_0x5ef42e(0x8e),_0x37a2df[_0x5ef42e(0x88)],_0x727acc)}));}for(const _0x27c235 of _0xd4d47a){_0x1e0b8f[_0x5ef42e(0x9b)](_0x341013(_0x27c235,'company',{'env':_0x5732f8,'accessKey':_0x37ebee,'appCode':_0x37a2df['appCode'],'force':_0x5ac8ff,'packageBytes':await downloadSkillPackage(_0x27c235,_0x5ef42e(0x7f),_0x37a2df[_0x5ef42e(0x88)],_0x727acc)}));}const _0x106862=_0x4fea0a(_0x1e0b8f,_0x37a2df[_0x5ef42e(0x88)]),_0x27de94=countLinkActions(_0x106862);return{'ok':!![],'data':{'appCode':_0x37a2df[_0x5ef42e(0x88)],'personal':_0x1e79ca[_0x5ef42e(0x98)],'company':_0xd4d47a[_0x5ef42e(0x98)],'materialized':_0x1e0b8f[_0x5ef42e(0x98)],'links':{'total':_0x106862[_0x5ef42e(0x98)],'created':_0x27de94['created']??0x0,'updated':_0x27de94[_0x5ef42e(0x89)]??0x0,'unchanged':_0x27de94[_0x5ef42e(0x7c)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x4b0ecf[_0x5ef42e(0x7e)](_0x3ccd24=>_0x3ccd24[_0x5ef42e(0x7b)]===_0x5ef42e(0x90))['length'],'cacheDirs':_0x4e0051['filter'](_0x3b6dba=>_0x3b6dba[_0x5ef42e(0x7b)]===_0x5ef42e(0x90))[_0x5ef42e(0x98)],'skipped':[..._0x4b0ecf,..._0x4e0051][_0x5ef42e(0x7e)](_0x4226e8=>_0x4226e8[_0x5ef42e(0x7b)]===_0x5ef42e(0x79))[_0x5ef42e(0x98)]},'skills':{'personal':_0x1e79ca['map'](summarizeRuntimeSkill),'company':_0xd4d47a['map'](summarizeRuntimeSkill)}},'message':'Installed\x20'+_0x1e79ca[_0x5ef42e(0x98)]+_0x5ef42e(0x99)+_0xd4d47a['length']+_0x5ef42e(0x85)};}async function downloadSkillPackage(_0x1a1654,_0x103c6a,_0x1af67b,_0x2c3d1d){const _0x9408eb=a42_0x4c6e8c,_0x4d95c1=_0x1a1654[_0x9408eb(0x82)]?.['trim']();return _0x4d95c1?_0x2c3d1d(_0x103c6a,_0x1a1654[_0x9408eb(0x97)],_0x1af67b,_0x4d95c1):_0x2c3d1d(_0x103c6a,_0x1a1654[_0x9408eb(0x97)],_0x1af67b);}function a42_0x467f(_0x47fb60,_0x51802c){_0x47fb60=_0x47fb60-0x6f;const _0x922596=a42_0x9225();let _0x467fb3=_0x922596[_0x47fb60];return _0x467fb3;}function countLinkActions(_0x57852c){const _0x27cd6c=a42_0x4c6e8c;return _0x57852c[_0x27cd6c(0x9d)]((_0x4537de,_0x4a92fe)=>{const _0x2902d2=_0x27cd6c;return _0x4537de[_0x4a92fe[_0x2902d2(0x7b)]]=(_0x4537de[_0x4a92fe[_0x2902d2(0x7b)]]??0x0)+0x1,_0x4537de;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a43_0x49c23a=a43_0x2034;(function(_0x1c603b,_0x119266){const _0x5f4251=a43_0x2034,_0x11f190=_0x1c603b();while(!![]){try{const _0x15af36=parseInt(_0x5f4251(0x16c))/0x1*(parseInt(_0x5f4251(0x170))/0x2)+-parseInt(_0x5f4251(0x15d))/0x3*(-parseInt(_0x5f4251(0x176))/0x4)+parseInt(_0x5f4251(0x161))/0x5+-parseInt(_0x5f4251(0x15c))/0x6*(-parseInt(_0x5f4251(0x174))/0x7)+parseInt(_0x5f4251(0x17a))/0x8+-parseInt(_0x5f4251(0x173))/0x9+-parseInt(_0x5f4251(0x16d))/0xa;if(_0x15af36===_0x119266)break;else _0x11f190['push'](_0x11f190['shift']());}catch(_0x3ea245){_0x11f190['push'](_0x11f190['shift']());}}}(a43_0x5930,0xade83));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';function a43_0x2034(_0x5a7157,_0x2b368e){_0x5a7157=_0x5a7157-0x15a;const _0x5930fc=a43_0x5930();let _0x203460=_0x5930fc[_0x5a7157];return _0x203460;}export const listCommand={'service':a43_0x49c23a(0x15a),'command':a43_0x49c23a(0x164),'description':a43_0x49c23a(0x165),'risk':a43_0x49c23a(0x167),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x4b56a4){const _0x22761a=a43_0x49c23a,_0x762607=_0x4b56a4['str'](_0x22761a(0x16f)),_0x3fcc56=normalizeListScope(_0x4b56a4[_0x22761a(0x16e)](_0x22761a(0x175)));if(_0x4b56a4[_0x22761a(0x16b)](_0x22761a(0x15f))){const _0x3e197c=_0x4b56a4[_0x22761a(0x15b)];if(!_0x3e197c)throw CliErrors[_0x22761a(0x163)]();const {listLocalRuntimeSkills:_0x5e4977}=await import('../../../skills/runtime-skill-sync.js'),_0x728d68=_0x5e4977({'env':_0x4b56a4['envName']??_0x22761a(0x178),'accessKey':_0x3e197c,'appCode':_0x4b56a4[_0x22761a(0x171)],'scopes':listScopeToRuntimeScopes(_0x3fcc56),'code':_0x762607[_0x22761a(0x169)]()||undefined}),_0x29cb54=groupLocalRuntimeSkills(_0x728d68);return{'ok':!![],'data':{'appCode':_0x4b56a4[_0x22761a(0x171)],'source':_0x22761a(0x15f),'scope':_0x3fcc56,'total':_0x728d68[_0x22761a(0x160)],'personal':_0x29cb54[_0x22761a(0x168)][_0x22761a(0x160)],'company':_0x29cb54['company'][_0x22761a(0x160)],'items':_0x728d68['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x29cb54['personal'][_0x22761a(0x162)](summarizeLocalRuntimeSkill),'company':_0x29cb54[_0x22761a(0x179)][_0x22761a(0x162)](summarizeLocalRuntimeSkill)}},'message':_0x22761a(0x15e)+_0x728d68[_0x22761a(0x160)]+_0x22761a(0x166)};}const {listRuntimeSkills:_0x2aaad1}=await import(_0x22761a(0x16a)),_0x3e75a2=await _0x2aaad1({'appCode':_0x4b56a4[_0x22761a(0x171)],'scope':listScopeToRemoteScope(_0x3fcc56),'code':_0x762607[_0x22761a(0x169)]()||undefined}),_0x2502dd=shouldListScope(_0x3fcc56,_0x22761a(0x168))?_0x3e75a2[_0x22761a(0x168)]??[]:[],_0x2ffecf=shouldListScope(_0x3fcc56,_0x22761a(0x179))?_0x3e75a2['company']??[]:[],_0x3f02b4=[..._0x2502dd,..._0x2ffecf];return{'ok':!![],'data':{'appCode':_0x4b56a4[_0x22761a(0x171)],'source':_0x22761a(0x177),'scope':_0x3fcc56,'total':_0x3f02b4[_0x22761a(0x160)],'personal':_0x2502dd[_0x22761a(0x160)],'company':_0x2ffecf[_0x22761a(0x160)],'items':_0x3f02b4[_0x22761a(0x162)](summarizeRuntimeSkill),'skills':{'personal':_0x2502dd[_0x22761a(0x162)](summarizeRuntimeSkill),'company':_0x2ffecf[_0x22761a(0x162)](summarizeRuntimeSkill)}},'message':_0x22761a(0x15e)+_0x3f02b4['length']+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x19ecd6){const _0xd57a6d=a43_0x49c23a;return{'personal':_0x19ecd6['filter'](_0x48a31e=>_0x48a31e['scope']===_0xd57a6d(0x168)),'company':_0x19ecd6['filter'](_0xaf26c3=>_0xaf26c3['scope']===_0xd57a6d(0x179)),'builtin':_0x19ecd6['filter'](_0x54d8ea=>_0x54d8ea[_0xd57a6d(0x175)]===_0xd57a6d(0x172))};}function a43_0x5930(){const _0x71bfa0=['local','length','381205FcrdZg','map','authRequired','list','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','\x20local\x20Skill(s).','read','personal','trim','../../../core/api-client.js','bool','1bOjcwD','18718150zRaSHL','str','code','2364862otndGk','appCode','builtin','3252231GkKGGx','4696489xIjntN','scope','16krludB','remote','production','company','645816CWTUVD','skill','accessKey','12rTrflc','198183OFPvtf','Listed\x20'];a43_0x5930=function(){return _0x71bfa0;};return a43_0x5930();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x185108=a44_0x5775;(function(_0x54071a,_0x2ef627){const _0x24a377=a44_0x5775,_0x3954a5=_0x54071a();while(!![]){try{const _0x57cef0=parseInt(_0x24a377(0xc0))/0x1+-parseInt(_0x24a377(0xba))/0x2+parseInt(_0x24a377(0xb7))/0x3*(parseInt(_0x24a377(0xb9))/0x4)+parseInt(_0x24a377(0xb6))/0x5*(parseInt(_0x24a377(0xc2))/0x6)+-parseInt(_0x24a377(0xbf))/0x7+parseInt(_0x24a377(0xbc))/0x8+-parseInt(_0x24a377(0xbe))/0x9;if(_0x57cef0===_0x2ef627)break;else _0x3954a5['push'](_0x3954a5['shift']());}catch(_0x4c2981){_0x3954a5['push'](_0x3954a5['shift']());}}}(a44_0x2fbd,0xa5883));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a44_0x5775(_0x18f4ec,_0x3df923){_0x18f4ec=_0x18f4ec-0xb6;const _0x2fbd39=a44_0x2fbd();let _0x577523=_0x2fbd39[_0x18f4ec];return _0x577523;}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a44_0x185108(0xc1),'command':a44_0x185108(0xbb),'description':a44_0x185108(0xb8),'risk':a44_0x185108(0xbd),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};function a44_0x2fbd(){const _0x208b5c=['4448188qYgQDG','498210tEwkoG','push','1629928EcHsQy','write','3843135BVtOLH','2667217djPWsl','234702eLbUcp','skill','6156tFRQpv','900SOAKdU','3ibARWi','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review'];a44_0x2fbd=function(){return _0x208b5c;};return a44_0x2fbd();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a45_0x4fcc53=a45_0x4a39;function a45_0x4a39(_0x11bd73,_0x432d8a){_0x11bd73=_0x11bd73-0xc3;const _0x357bdc=a45_0x357b();let _0x4a39f8=_0x357bdc[_0x11bd73];return _0x4a39f8;}function a45_0x357b(){const _0x4b6829=['1791636rhuNoF','27504AvkiMn','2BrdLcS','661101UtRmuq','type','str','strict','873PaZMhd','24SdckYC','dir','validate','10220740cMdVlw','1487600neGpOW','read','Skill\x20validation\x20passed.','278439lSMldP','15234JUnCNl'];a45_0x357b=function(){return _0x4b6829;};return a45_0x357b();}(function(_0x21bed7,_0x31c858){const _0x226e5b=a45_0x4a39,_0xa3051c=_0x21bed7();while(!![]){try{const _0x5f48bd=-parseInt(_0x226e5b(0xc7))/0x1*(-parseInt(_0x226e5b(0xca))/0x2)+parseInt(_0x226e5b(0xc6))/0x3+-parseInt(_0x226e5b(0xc8))/0x4+-parseInt(_0x226e5b(0xc3))/0x5+parseInt(_0x226e5b(0xd0))/0x6*(-parseInt(_0x226e5b(0xcb))/0x7)+parseInt(_0x226e5b(0xc9))/0x8*(parseInt(_0x226e5b(0xcf))/0x9)+parseInt(_0x226e5b(0xd3))/0xa;if(_0x5f48bd===_0x31c858)break;else _0xa3051c['push'](_0xa3051c['shift']());}catch(_0x241fff){_0xa3051c['push'](_0xa3051c['shift']());}}}(a45_0x357b,0x531b6));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':'skill','command':a45_0x4fcc53(0xd2),'description':'Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','risk':a45_0x4fcc53(0xc4),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x42baba){const _0x498307=a45_0x4fcc53,_0x48769b=_0x42baba['bool'](_0x498307(0xce)),_0x2ecce2=validateSkillDirectory(_0x42baba[_0x498307(0xcd)]('dir'),{'strict':_0x48769b});return throwIfSkillValidationFailed(_0x2ecce2,_0x48769b),{'ok':!![],'data':{'dir':_0x2ecce2[_0x498307(0xd1)],'type':_0x2ecce2[_0x498307(0xcc)],'errors':_0x2ecce2['errors'],'warnings':_0x2ecce2['warnings']},'message':_0x498307(0xc5)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x25c40d=a46_0x4725;(function(_0x498997,_0x575d7c){const _0x44f990=a46_0x4725,_0x343591=_0x498997();while(!![]){try{const _0x25e120=-parseInt(_0x44f990(0x80))/0x1+parseInt(_0x44f990(0x7a))/0x2*(parseInt(_0x44f990(0x7e))/0x3)+-parseInt(_0x44f990(0x73))/0x4+parseInt(_0x44f990(0x8a))/0x5*(parseInt(_0x44f990(0x77))/0x6)+-parseInt(_0x44f990(0x7c))/0x7+parseInt(_0x44f990(0x75))/0x8+parseInt(_0x44f990(0x84))/0x9;if(_0x25e120===_0x575d7c)break;else _0x343591['push'](_0x343591['shift']());}catch(_0x11d893){_0x343591['push'](_0x343591['shift']());}}}(a46_0x141f,0x6e418));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a46_0x25c40d(0x8e),'type':a46_0x25c40d(0x78),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a46_0x25c40d(0x85),'type':a46_0x25c40d(0x78),'description':a46_0x25c40d(0x79),'enum':['all',a46_0x25c40d(0x89),a46_0x25c40d(0x86)]};export const PUSH_SCOPE_FLAG={'name':'scope','type':'string','description':a46_0x25c40d(0x8c),'default':a46_0x25c40d(0x89),'enum':[a46_0x25c40d(0x89),a46_0x25c40d(0x86)]};function a46_0x141f(){const _0x5a376d=['Local\x20Skill\x20directory\x20containing\x20SKILL.md','1565696yLNsWs','all','1924884ZgZjjH','string','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','36968oGWBcT','name','2988804ZCslfD','target','60nNSlGE','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','179314bdtnFN','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','3000159kuuajZ','scope','company','dir','write','personal','5WqxUMS','strict','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','confirm-warnings','code','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','force','boolean','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','646652tQqfiq'];a46_0x141f=function(){return _0x5a376d;};return a46_0x141f();}function a46_0x4725(_0x4c0656,_0x24ed58){_0x4c0656=_0x4c0656-0x73;const _0x141f02=a46_0x141f();let _0x4725b8=_0x141f02[_0x4c0656];return _0x4725b8;}export const LIST_SCOPE_FLAG={'name':'scope','type':a46_0x25c40d(0x78),'description':a46_0x25c40d(0x90),'enum':[a46_0x25c40d(0x76),a46_0x25c40d(0x89),a46_0x25c40d(0x86)]};export const LOCAL_FLAG={'name':'local','type':a46_0x25c40d(0x92),'description':a46_0x25c40d(0x7f)};export const DIR_FLAG={'name':a46_0x25c40d(0x87),'type':a46_0x25c40d(0x78),'required':!![],'description':a46_0x25c40d(0x74)};export const CREATE_NAME_FLAG={'name':a46_0x25c40d(0x7b),'type':a46_0x25c40d(0x78),'required':!![],'description':a46_0x25c40d(0x8f),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a46_0x25c40d(0x93)}};export const TYPE_FLAG={'name':'type','type':a46_0x25c40d(0x78),'description':'Skill\x20template\x20type','default':a46_0x25c40d(0x88),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a46_0x25c40d(0x7d),'type':'string','description':a46_0x25c40d(0x82),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a46_0x25c40d(0x91),'type':'boolean','description':a46_0x25c40d(0x83)};export const CONFIRM_WARNINGS_FLAG={'name':a46_0x25c40d(0x8d),'type':a46_0x25c40d(0x92),'description':'Continue\x20company\x20Skill\x20push\x20when\x20SkillHub\x20validation\x20reports\x20warnings'};export const STRICT_FLAG={'name':a46_0x25c40d(0x8b),'type':a46_0x25c40d(0x92),'description':a46_0x25c40d(0x81)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c598d,_0x3ebccc){const _0x54ef70=a47_0xdc5a,_0x146443=_0x1c598d();while(!![]){try{const _0x26dd2d=-parseInt(_0x54ef70(0x121))/0x1*(-parseInt(_0x54ef70(0x128))/0x2)+-parseInt(_0x54ef70(0x120))/0x3*(parseInt(_0x54ef70(0x125))/0x4)+-parseInt(_0x54ef70(0x122))/0x5+-parseInt(_0x54ef70(0x11e))/0x6*(-parseInt(_0x54ef70(0x126))/0x7)+-parseInt(_0x54ef70(0x124))/0x8*(-parseInt(_0x54ef70(0x127))/0x9)+-parseInt(_0x54ef70(0x11d))/0xa*(parseInt(_0x54ef70(0x11f))/0xb)+parseInt(_0x54ef70(0x123))/0xc*(parseInt(_0x54ef70(0x11c))/0xd);if(_0x26dd2d===_0x3ebccc)break;else _0x146443['push'](_0x146443['shift']());}catch(_0xd20501){_0x146443['push'](_0x146443['shift']());}}}(a47_0x3f6c,0x9c3cd));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';function a47_0x3f6c(){const _0x1c57f5=['2184169rduFCU','10rXPJuC','65358ndHyRX','7424263CMVlDV','3nQySLD','864053oWYGvZ','2904815tcjZnU','24NphLpJ','507272fGEQJB','2602456mmikaQ','91VHdDOp','171gkvZII','2JsTPpz'];a47_0x3f6c=function(){return _0x1c57f5;};return a47_0x3f6c();}import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';function a47_0xdc5a(_0x29cf34,_0x39b828){_0x29cf34=_0x29cf34-0x11c;const _0x3f6cc1=a47_0x3f6c();let _0xdc5ae1=_0x3f6cc1[_0x29cf34];return _0xdc5ae1;}export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x39ed26,_0x8378a8){var _0x25142d=a48_0xc7bb,_0x2db825=_0x39ed26();while(!![]){try{var _0x54ab20=-parseInt(_0x25142d(0xa9))/0x1+-parseInt(_0x25142d(0xa8))/0x2+parseInt(_0x25142d(0x9f))/0x3*(-parseInt(_0x25142d(0xa1))/0x4)+-parseInt(_0x25142d(0x9b))/0x5+-parseInt(_0x25142d(0xa6))/0x6*(parseInt(_0x25142d(0xa4))/0x7)+-parseInt(_0x25142d(0xa3))/0x8+-parseInt(_0x25142d(0xa0))/0x9*(-parseInt(_0x25142d(0x9a))/0xa);if(_0x54ab20===_0x8378a8)break;else _0x2db825['push'](_0x2db825['shift']());}catch(_0x2b55fc){_0x2db825['push'](_0x2db825['shift']());}}}(a48_0x40bf,0xb5f56));function a48_0x40bf(){var _0x1ce965=['2865322ZZaIkx','332636DitDNL','files','length','62385860VGALpD','7354220xIMqay','object','ossPath','SKILL.md','2362818apvNuF','9XUMzad','4VRJJzv','string','6452992IfGeKG','7TVrhMY','some','3977478MNkeRH','isArray'];a48_0x40bf=function(){return _0x1ce965;};return a48_0x40bf();}function a48_0xc7bb(_0x5d9f73,_0x2af670){_0x5d9f73=_0x5d9f73-0x9a;var _0x40bffc=a48_0x40bf();var _0xc7bb34=_0x40bffc[_0x5d9f73];return _0xc7bb34;}export function isPackageBackedManifest(_0x3a3f42){var _0x4eb8fa=a48_0xc7bb;return!!_0x3a3f42&&typeof _0x3a3f42===_0x4eb8fa(0x9c)&&!Array[_0x4eb8fa(0xa7)](_0x3a3f42)&&typeof _0x3a3f42['ossPath']===_0x4eb8fa(0xa2)&&_0x3a3f42[_0x4eb8fa(0x9d)][_0x4eb8fa(0xab)]>0x0&&Array['isArray'](_0x3a3f42[_0x4eb8fa(0xaa)]);}export function isMultiFileManifest(_0x4787ec){var _0x5e23fd=a48_0xc7bb;return!!_0x4787ec&&typeof _0x4787ec===_0x5e23fd(0x9c)&&!Array[_0x5e23fd(0xa7)](_0x4787ec)&&Array[_0x5e23fd(0xa7)](_0x4787ec[_0x5e23fd(0xaa)])&&_0x4787ec[_0x5e23fd(0xaa)][_0x5e23fd(0xa5)](_0x3b4046=>_0x3b4046['path']!==_0x5e23fd(0x9e));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3b3f14,_0xc221ee){const _0x16eb30=a49_0x9692,_0x34538b=_0x3b3f14();while(!![]){try{const _0xc50afa=-parseInt(_0x16eb30(0x16e))/0x1+-parseInt(_0x16eb30(0x13a))/0x2+parseInt(_0x16eb30(0x14e))/0x3*(parseInt(_0x16eb30(0x150))/0x4)+parseInt(_0x16eb30(0x13e))/0x5+parseInt(_0x16eb30(0x155))/0x6*(-parseInt(_0x16eb30(0x13d))/0x7)+parseInt(_0x16eb30(0x167))/0x8*(-parseInt(_0x16eb30(0x147))/0x9)+parseInt(_0x16eb30(0x161))/0xa;if(_0xc50afa===_0xc221ee)break;else _0x34538b['push'](_0x34538b['shift']());}catch(_0xc84680){_0x34538b['push'](_0x34538b['shift']());}}}(a49_0x5e1b,0x994f3));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';function a49_0x9692(_0x5d8cce,_0x75da1a){_0x5d8cce=_0x5d8cce-0x13a;const _0x5e1bc1=a49_0x5e1b();let _0x9692a8=_0x5e1bc1[_0x5d8cce];return _0x9692a8;}function a49_0x5e1b(){const _0xa99e09=['Personal','str','POST','\x20for\x20review','545816UPZGvQ','accessKey','version','\x20Skill\x20','skillCode','savedSkill','Created\x20personal\x20Skill\x20','437959WfvqCo','confirmWarnings','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','path','/publish','warnings','status','2459012GZTnxp','bool','validation','133jIsLAA','1526615DFVOSD','remoteForPreflight','join','payload','PRIVATE','/api/cli/v1/skills/','company','../../core/api-client.js','Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','27nGTbFD','input','resolvedSlug','\x20has\x20scope=\x22','Submitted\x20company\x20Skill\x20','files','(unknown)','1592583NjNYaD','/publish/validate','4QsPyPw','trim','appCode','frontmatterDisplayName','authRequired','47442paLtkg','personal','NAMESPACE_ONLY','\x20version\x20','Updated\x20personal\x20Skill\x20','publishInput','../../skills/runtime-skill-sync.js','scope','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','map','existing','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','18141500bumZFM','dir'];a49_0x5e1b=function(){return _0xa99e09;};return a49_0x5e1b();}export async function skillPushDryRun(_0x56c2ac){const _0x32439a=a49_0x9692,{getRuntimeSkillByCode:_0x1c6e0c,validateRuntimeSkillPublish:_0x143fe6}=await import(_0x32439a(0x145)),{readPushDirectory:_0x14c7b5,resolvePushDirectoryIdentity:_0x57c51f}=await import(_0x32439a(0x15b));if(!_0x56c2ac[_0x32439a(0x168)])throw CliErrors[_0x32439a(0x154)]();const _0x52975a=resolvePushScope(_0x56c2ac),_0x143170=validateSkillDirectory(_0x56c2ac[_0x32439a(0x164)](_0x32439a(0x162)));throwIfSkillValidationFailed(_0x143170);const _0x22d4d3=_0x57c51f(_0x143170['dir'],_0x56c2ac[_0x32439a(0x152)],remoteFirstMetadataOptions()),_0x4489bc=await _0x1c6e0c(_0x56c2ac[_0x32439a(0x152)],_0x22d4d3[_0x32439a(0x16b)]);throwIfBuiltinPushTarget(_0x4489bc);if(_0x52975a===_0x32439a(0x144)){const _0xaf2571=_0x14c7b5(_0x143170[_0x32439a(0x162)],_0x56c2ac['appCode'],remoteMissingCompanyReadOptions()),_0x3e2c01=await _0x143fe6(_0x56c2ac[_0x32439a(0x152)],_0xaf2571[_0x32439a(0x148)],{'visibility':_0x32439a(0x157)});return{'method':_0x32439a(0x165),'url':_0x32439a(0x143)+_0x56c2ac[_0x32439a(0x152)]+_0x32439a(0x14f),'body':{'skillCode':_0xaf2571['skillCode'],'visibility':_0x32439a(0x157),'valid':_0x3e2c01['valid'],'errors':_0x3e2c01['errors'],'warnings':_0x3e2c01[_0x32439a(0x173)],'resolvedSlug':_0x3e2c01[_0x32439a(0x149)],'resolvedVersion':_0x3e2c01['resolvedVersion']},'description':_0x32439a(0x170)};}if(_0x4489bc&&_0x4489bc['scope']!==_0x32439a(0x156))throw CliErrors[_0x32439a(0x13c)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x22d4d3[_0x32439a(0x16b)]+_0x32439a(0x14a)+(_0x4489bc[_0x32439a(0x15c)]??'unknown')+'\x22.');const _0x506fa8=_0x14c7b5(_0x143170['dir'],_0x56c2ac[_0x32439a(0x152)],_0x4489bc?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':_0x32439a(0x165),'url':'/api/cli/v1/skills/'+_0x56c2ac[_0x32439a(0x152)]+_0x32439a(0x172),'body':{'skillCode':_0x506fa8[_0x32439a(0x16b)],'visibility':_0x32439a(0x142),'files':_0x506fa8[_0x32439a(0x148)][_0x32439a(0x14c)]?.[_0x32439a(0x14c)][_0x32439a(0x15e)](_0x2c713f=>_0x2c713f[_0x32439a(0x171)])??[]},'description':_0x32439a(0x146)};}export async function skillPushExecute(_0x431642){const _0x3863c2=a49_0x9692,{createPersonalRuntimeSkill:_0x3a3995,downloadRuntimeSkillPackage:_0x4a95fb,getRuntimeSkillByCode:_0x98db4c,publishCompanyRuntimeSkill:_0x52f1f1,updatePersonalRuntimeSkill:_0x2bf3cf,validateRuntimeSkillPublish:_0x54ee1a}=await import(_0x3863c2(0x145)),{verifyRuntimeSkillPackage:_0x2a090e,verifyRuntimeSkillBundle:_0x5692cb,readPushDirectory:_0x5c9b66,refreshPushDirectoryMetadataFromRemote:_0x1f24ab,recordPushedRuntimeSkill:_0xaa28,resolvePushDirectoryIdentity:_0x43f3bc}=await import(_0x3863c2(0x15b));if(!_0x431642[_0x3863c2(0x168)])throw CliErrors[_0x3863c2(0x154)]();const _0x1575a0=resolvePushScope(_0x431642),_0x3e4066=validateSkillDirectory(_0x431642[_0x3863c2(0x164)]('dir'));throwIfSkillValidationFailed(_0x3e4066);const _0x291ed8=_0x3e4066[_0x3863c2(0x162)];let _0x170a45;if(_0x1575a0===_0x3863c2(0x144)){const _0x15e612=_0x43f3bc(_0x291ed8,_0x431642[_0x3863c2(0x152)],remoteFirstMetadataOptions()),_0x4c15e5=await _0x98db4c(_0x431642['appCode'],_0x15e612[_0x3863c2(0x16b)]);throwIfBuiltinPushTarget(_0x4c15e5);if(_0x4c15e5)_0x1f24ab(_0x291ed8,_0x4c15e5,_0x431642[_0x3863c2(0x152)]);const _0x8a7c04=_0x5c9b66(_0x291ed8,_0x431642[_0x3863c2(0x152)],_0x4c15e5?{'targetScope':_0x3863c2(0x144),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x170a45={'scope':_0x3863c2(0x144),'payload':_0x8a7c04,'publishInput':_0x8a7c04[_0x3863c2(0x148)],'remoteForPreflight':_0x4c15e5,'warnings':[]};}else{const _0x20981a=_0x431642[_0x3863c2(0x164)]('appcode')[_0x3863c2(0x151)](),_0x9a45fe=Boolean(_0x20981a),_0x3b3c69=allowRetargetArgs(_0x9a45fe),_0x2a9cd9=_0x43f3bc(_0x291ed8,_0x431642[_0x3863c2(0x152)],{...remoteFirstMetadataOptions(),..._0x3b3c69[0x0]}),_0xf4a870=await _0x98db4c(_0x431642['appCode'],_0x2a9cd9[_0x3863c2(0x16b)]);throwIfBuiltinPushTarget(_0xf4a870);if(_0xf4a870){if(_0xf4a870[_0x3863c2(0x15c)]!==_0x3863c2(0x156)){if(_0x9a45fe)throw CliErrors[_0x3863c2(0x13c)](_0x3863c2(0x15d)+_0x2a9cd9['skillCode']+_0x3863c2(0x14a)+(_0xf4a870[_0x3863c2(0x15c)]??'unknown')+'\x22.');_0x1f24ab(_0x291ed8,_0xf4a870,_0x431642[_0x3863c2(0x152)]);}else!_0x9a45fe&&_0x1f24ab(_0x291ed8,_0xf4a870,_0x431642[_0x3863c2(0x152)]);}const _0x320925=_0x5c9b66(_0x291ed8,_0x431642[_0x3863c2(0x152)],_0xf4a870?remotePersonalReadOptions(_0x9a45fe,_0x3b3c69[0x0]):remoteMissingPersonalReadOptions(_0x3b3c69[0x0])),_0x1965fa=_0xf4a870?.[_0x3863c2(0x15c)]===_0x3863c2(0x156)&&_0xf4a870[_0x3863c2(0x16b)]===_0x320925[_0x3863c2(0x16b)]?_0xf4a870:undefined,_0x401990=_0x9a45fe&&_0x1965fa?withRetargetExistingMetadata(_0x320925['input'],_0x1965fa,{'preferInputSkillName':Boolean(_0x320925[_0x3863c2(0x153)])}):_0x320925[_0x3863c2(0x148)],_0x369587=_0x9a45fe?buildRetargetWarning(_0x2a9cd9['metadata'],_0x431642['appCode']):[];_0x170a45={'scope':_0x3863c2(0x156),'payload':_0x320925,'publishInput':_0x401990,'remoteForPreflight':_0x1965fa,'existing':_0x1965fa,'warnings':[..._0x3e4066['warnings'],..._0x369587]};}const _0x323858=await runRemoteContentPreflight({'scope':_0x170a45['scope'],'remote':_0x170a45[_0x3863c2(0x13f)],'publishInput':_0x170a45[_0x3863c2(0x15a)],'skillCode':_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)],'appCode':_0x431642[_0x3863c2(0x152)],'downloadRuntimeSkillPackage':_0x4a95fb,'verifyRuntimeSkillBundle':_0x5692cb});if(_0x323858[_0x3863c2(0x174)]==='identical')return _0x170a45[_0x3863c2(0x15c)]===_0x3863c2(0x144)?_0xaa28(_0x291ed8,_0x323858[_0x3863c2(0x16c)],_0x431642['appCode'],{'scope':_0x3863c2(0x144)}):_0xaa28(_0x291ed8,_0x323858[_0x3863c2(0x16c)],_0x431642[_0x3863c2(0x152)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x323858[_0x3863c2(0x16c)]),'scope':_0x170a45[_0x3863c2(0x15c)],..._0x170a45[_0x3863c2(0x15c)]==='personal'?{'warnings':_0x170a45['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x170a45[_0x3863c2(0x15c)])+_0x3863c2(0x16a)+_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x170a45['scope']===_0x3863c2(0x144)){const _0x5ec70c=await _0x54ee1a(_0x431642['appCode'],_0x170a45[_0x3863c2(0x15a)],{'visibility':_0x3863c2(0x157)});throwIfPublishValidationFailed(_0x170a45[_0x3863c2(0x141)]['skillCode'],_0x5ec70c);const _0x319adc=_0x431642[_0x3863c2(0x13b)]('confirm-warnings')||_0x431642[_0x3863c2(0x13b)](_0x3863c2(0x16f));if(_0x5ec70c[_0x3863c2(0x173)]['length']>0x0&&!_0x319adc)throw CliErrors[_0x3863c2(0x13c)](_0x3863c2(0x160)+_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)]+'.','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20'+_0x5ec70c[_0x3863c2(0x173)][_0x3863c2(0x140)](';\x20'));const _0x4262a3=await _0x52f1f1(_0x431642[_0x3863c2(0x152)],_0x170a45['publishInput'],{'confirmWarnings':_0x319adc});return _0xaa28(_0x291ed8,{..._0x4262a3,'files':_0x170a45[_0x3863c2(0x15a)]['files']},_0x431642[_0x3863c2(0x152)],{'scope':_0x3863c2(0x144)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4262a3),'scope':_0x3863c2(0x144),'reviewState':'submitted','submittedForReview':!![],'validation':{'warnings':_0x5ec70c[_0x3863c2(0x173)]}},'message':_0x3863c2(0x14b)+_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)]+_0x3863c2(0x158)+(_0x4262a3[_0x3863c2(0x169)]??_0x3863c2(0x14d))+_0x3863c2(0x166)};}const _0x59f6e4=_0x170a45['existing']?await _0x2bf3cf(_0x170a45['payload'][_0x3863c2(0x16b)],_0x431642[_0x3863c2(0x152)],_0x170a45['publishInput']):await _0x3a3995(_0x431642['appCode'],_0x170a45[_0x3863c2(0x15a)]);let _0x1f1063=_0x59f6e4;if(isMultiFileManifest(_0x170a45[_0x3863c2(0x15a)]['files'])){const _0xedef4c=await _0x4a95fb(_0x3863c2(0x156),_0x59f6e4[_0x3863c2(0x16b)]||_0x170a45[_0x3863c2(0x141)]['skillCode'],_0x431642['appCode']);_0x5692cb(_0x170a45[_0x3863c2(0x15a)][_0x3863c2(0x14c)],_0xedef4c),_0x1f1063={..._0x59f6e4,'files':_0x170a45[_0x3863c2(0x15a)][_0x3863c2(0x14c)]};}else{if(isPackageBackedManifest(_0x59f6e4[_0x3863c2(0x14c)])){const _0x69344b=await _0x4a95fb(_0x3863c2(0x156),_0x59f6e4['skillCode']||_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)],_0x431642[_0x3863c2(0x152)]);_0x2a090e(_0x59f6e4[_0x3863c2(0x14c)],_0x69344b);}}return _0xaa28(_0x291ed8,_0x1f1063,_0x431642[_0x3863c2(0x152)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x59f6e4),'warnings':_0x170a45[_0x3863c2(0x173)]},'message':_0x170a45[_0x3863c2(0x15f)]?_0x3863c2(0x159)+_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)]:_0x3863c2(0x16d)+_0x170a45[_0x3863c2(0x141)][_0x3863c2(0x16b)]};}function scopeLabel(_0x3c5ad3){const _0x35ade2=a49_0x9692;return _0x3c5ad3===_0x35ade2(0x144)?'Company':_0x35ade2(0x163);}
|
|
1
|
+
(function(_0x29c7d5,_0x42786c){const _0x3c8733=a49_0x1aba,_0x25468d=_0x29c7d5();while(!![]){try{const _0x48dd53=parseInt(_0x3c8733(0x1db))/0x1*(-parseInt(_0x3c8733(0x1c3))/0x2)+parseInt(_0x3c8733(0x1da))/0x3*(-parseInt(_0x3c8733(0x1e0))/0x4)+-parseInt(_0x3c8733(0x1ee))/0x5*(parseInt(_0x3c8733(0x1b6))/0x6)+-parseInt(_0x3c8733(0x1e8))/0x7*(-parseInt(_0x3c8733(0x1c5))/0x8)+parseInt(_0x3c8733(0x1ea))/0x9*(-parseInt(_0x3c8733(0x1be))/0xa)+parseInt(_0x3c8733(0x1e7))/0xb*(-parseInt(_0x3c8733(0x1bf))/0xc)+-parseInt(_0x3c8733(0x1cd))/0xd*(-parseInt(_0x3c8733(0x1d8))/0xe);if(_0x48dd53===_0x42786c)break;else _0x25468d['push'](_0x25468d['shift']());}catch(_0x4f31e8){_0x25468d['push'](_0x25468d['shift']());}}}(a49_0x1a8d,0x32a4e));function a49_0x1a8d(){const _0x3959ae=['../../core/api-client.js','222vJRXVW','/api/cli/v1/skills/','8oZWgUV','validation','\x20Skill\x20','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','status','payload','../../skills/runtime-skill-sync.js','13IPrtVD','personal','Updated\x20personal\x20Skill\x20','trim','bool','PRIVATE','appcode','path','resolvedVersion','skillCode','savedSkill','14997318EksPbE','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','3SvhEdP','3559VqRZkU','publishInput','warnings','errors','Submitted\x20company\x20Skill\x20','1262064VdRzPZ','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','Created\x20personal\x20Skill\x20','unknown','existing','confirm-warnings','accessKey','99QoMDHC','1209453dDRDbk','(unknown)','50040SxlZPh','length','files','scope','10bjnehQ','company','/publish','NAMESPACE_ONLY','valid','\x20for\x20review','input','str','submitted','version','589812iFgRBz','Company','Personal','confirmWarnings','remoteForPreflight','join','dir','appCode','190hxHaUR','31692eJVmKU','Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'];a49_0x1a8d=function(){return _0x3959ae;};return a49_0x1a8d();}import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';function a49_0x1aba(_0xc7592a,_0x232441){_0xc7592a=_0xc7592a-0x1b3;const _0x1a8dbf=a49_0x1a8d();let _0x1abae0=_0x1a8dbf[_0xc7592a];return _0x1abae0;}import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,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(_0x552065){const _0x908dbe=a49_0x1aba,{getRuntimeSkillByCode:_0x1daf7e,validateRuntimeSkillPublish:_0x277bd9}=await import(_0x908dbe(0x1c2)),{readPushDirectory:_0x2c06c9,resolvePushDirectoryIdentity:_0x5d1d76}=await import(_0x908dbe(0x1cc));if(!_0x552065['accessKey'])throw CliErrors['authRequired']();const _0x15dae0=resolvePushScope(_0x552065),_0x4d10e8=validateSkillDirectory(_0x552065[_0x908dbe(0x1b3)]('dir'));throwIfSkillValidationFailed(_0x4d10e8);const _0x53d8cb=_0x5d1d76(_0x4d10e8['dir'],_0x552065[_0x908dbe(0x1bd)],remoteFirstMetadataOptions()),_0x5a62e8=await _0x1daf7e(_0x552065['appCode'],_0x53d8cb[_0x908dbe(0x1d6)]);throwIfBuiltinPushTarget(_0x5a62e8);if(_0x15dae0===_0x908dbe(0x1ef)){const _0x2afd5c=_0x2c06c9(_0x4d10e8['dir'],_0x552065['appCode'],remoteMissingCompanyReadOptions()),_0x3f4338=await _0x277bd9(_0x552065[_0x908dbe(0x1bd)],_0x2afd5c[_0x908dbe(0x1f4)],{'visibility':_0x908dbe(0x1f1)});return{'method':'POST','url':_0x908dbe(0x1c4)+_0x552065[_0x908dbe(0x1bd)]+'/publish/validate','body':{'skillCode':_0x2afd5c[_0x908dbe(0x1d6)],'visibility':_0x908dbe(0x1f1),'valid':_0x3f4338[_0x908dbe(0x1f2)],'errors':_0x3f4338[_0x908dbe(0x1de)],'warnings':_0x3f4338[_0x908dbe(0x1dd)],'resolvedSlug':_0x3f4338['resolvedSlug'],'resolvedVersion':_0x3f4338[_0x908dbe(0x1d5)]},'description':_0x908dbe(0x1c1)};}if(_0x5a62e8&&_0x5a62e8[_0x908dbe(0x1ed)]!==_0x908dbe(0x1ce))throw CliErrors['validation'](_0x908dbe(0x1c9)+_0x53d8cb['skillCode']+'\x20has\x20scope=\x22'+(_0x5a62e8[_0x908dbe(0x1ed)]??_0x908dbe(0x1e3))+'\x22.');const _0x2328f9=_0x2c06c9(_0x4d10e8[_0x908dbe(0x1bc)],_0x552065[_0x908dbe(0x1bd)],_0x5a62e8?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':'POST','url':_0x908dbe(0x1c4)+_0x552065[_0x908dbe(0x1bd)]+_0x908dbe(0x1f0),'body':{'skillCode':_0x2328f9[_0x908dbe(0x1d6)],'visibility':_0x908dbe(0x1d2),'files':_0x2328f9[_0x908dbe(0x1f4)]['files']?.[_0x908dbe(0x1ec)]['map'](_0xe7be21=>_0xe7be21[_0x908dbe(0x1d4)])??[]},'description':_0x908dbe(0x1c0)};}export async function skillPushExecute(_0x413009){const _0x3e2d83=a49_0x1aba,{createPersonalRuntimeSkill:_0x31e481,downloadRuntimeSkillPackage:_0xcbd817,getRuntimeSkillByCode:_0x4de575,publishCompanyRuntimeSkill:_0x21a639,updatePersonalRuntimeSkill:_0x4035ab,validateRuntimeSkillPublish:_0x360538}=await import(_0x3e2d83(0x1c2)),{verifyRuntimeSkillPackage:_0x127dfb,verifyRuntimeSkillBundle:_0x4d1846,readPushDirectory:_0x2a903d,refreshPushDirectoryMetadataFromRemote:_0x5b1ede,recordPushedRuntimeSkill:_0x4b386c,resolvePushDirectoryIdentity:_0x192e3a}=await import(_0x3e2d83(0x1cc));if(!_0x413009[_0x3e2d83(0x1e6)])throw CliErrors['authRequired']();const _0xa7344f=resolvePushScope(_0x413009),_0xf7103e=validateSkillDirectory(_0x413009[_0x3e2d83(0x1b3)](_0x3e2d83(0x1bc)));throwIfSkillValidationFailed(_0xf7103e);const _0x27f968=_0xf7103e['dir'];let _0x4cf68c;if(_0xa7344f==='company'){const _0x4e2bf0=_0x192e3a(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],remoteFirstMetadataOptions()),_0x2b8f0b=await _0x4de575(_0x413009[_0x3e2d83(0x1bd)],_0x4e2bf0['skillCode']);throwIfBuiltinPushTarget(_0x2b8f0b);if(_0x2b8f0b)_0x5b1ede(_0x27f968,_0x2b8f0b,_0x413009['appCode']);const _0x3529d3=_0x2a903d(_0x27f968,_0x413009['appCode'],_0x2b8f0b?{'targetScope':_0x3e2d83(0x1ef),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x4cf68c={'scope':_0x3e2d83(0x1ef),'payload':_0x3529d3,'publishInput':_0x3529d3['input'],'remoteForPreflight':_0x2b8f0b,'warnings':[]};}else{const _0x3c5bb6=_0x413009[_0x3e2d83(0x1b3)](_0x3e2d83(0x1d3))[_0x3e2d83(0x1d0)](),_0x229e96=Boolean(_0x3c5bb6),_0x5f1a74=allowRetargetArgs(_0x229e96),_0x4d08a1=_0x192e3a(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],{...remoteFirstMetadataOptions(),..._0x5f1a74[0x0]}),_0x52b3fc=await _0x4de575(_0x413009['appCode'],_0x4d08a1[_0x3e2d83(0x1d6)]);throwIfBuiltinPushTarget(_0x52b3fc);if(_0x52b3fc){if(_0x52b3fc[_0x3e2d83(0x1ed)]!==_0x3e2d83(0x1ce)){if(_0x229e96)throw CliErrors[_0x3e2d83(0x1c6)](_0x3e2d83(0x1c9)+_0x4d08a1[_0x3e2d83(0x1d6)]+'\x20has\x20scope=\x22'+(_0x52b3fc['scope']??_0x3e2d83(0x1e3))+'\x22.');_0x5b1ede(_0x27f968,_0x52b3fc,_0x413009['appCode']);}else!_0x229e96&&_0x5b1ede(_0x27f968,_0x52b3fc,_0x413009[_0x3e2d83(0x1bd)]);}const _0x4352a8=_0x2a903d(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],_0x52b3fc?remotePersonalReadOptions(_0x229e96,_0x5f1a74[0x0]):remoteMissingPersonalReadOptions(_0x5f1a74[0x0])),_0x3b3624=_0x52b3fc?.[_0x3e2d83(0x1ed)]===_0x3e2d83(0x1ce)&&_0x52b3fc['skillCode']===_0x4352a8['skillCode']?_0x52b3fc:undefined,_0x3df2b4=_0x229e96&&_0x3b3624?withRetargetExistingMetadata(_0x4352a8[_0x3e2d83(0x1f4)],_0x3b3624,{'preferInputSkillName':Boolean(_0x4352a8['frontmatterDisplayName'])}):_0x4352a8[_0x3e2d83(0x1f4)],_0x23be58=_0x229e96?buildRetargetWarning(_0x4d08a1['metadata'],_0x413009[_0x3e2d83(0x1bd)]):[];_0x4cf68c={'scope':_0x3e2d83(0x1ce),'payload':_0x4352a8,'publishInput':_0x3df2b4,'remoteForPreflight':_0x3b3624,'existing':_0x3b3624,'warnings':[..._0xf7103e[_0x3e2d83(0x1dd)],..._0x23be58]};}const _0x1e5129=await runRemoteContentPreflight({'scope':_0x4cf68c['scope'],'remote':_0x4cf68c[_0x3e2d83(0x1ba)],'publishInput':_0x4cf68c[_0x3e2d83(0x1dc)],'skillCode':_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)],'appCode':_0x413009[_0x3e2d83(0x1bd)],'downloadRuntimeSkillPackage':_0xcbd817,'verifyRuntimeSkillBundle':_0x4d1846});if(_0x1e5129[_0x3e2d83(0x1ca)]==='identical')return _0x4cf68c[_0x3e2d83(0x1ed)]===_0x3e2d83(0x1ef)?_0x4b386c(_0x27f968,_0x1e5129[_0x3e2d83(0x1d7)],_0x413009['appCode'],{'scope':_0x3e2d83(0x1ef)}):_0x4b386c(_0x27f968,_0x1e5129['savedSkill'],_0x413009[_0x3e2d83(0x1bd)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1e5129[_0x3e2d83(0x1d7)]),'scope':_0x4cf68c[_0x3e2d83(0x1ed)],..._0x4cf68c[_0x3e2d83(0x1ed)]==='personal'?{'warnings':_0x4cf68c['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x4cf68c['scope'])+_0x3e2d83(0x1c7)+_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)]+_0x3e2d83(0x1e1)};if(_0x4cf68c['scope']===_0x3e2d83(0x1ef)){const _0x5470b6=await _0x360538(_0x413009['appCode'],_0x4cf68c[_0x3e2d83(0x1dc)],{'visibility':_0x3e2d83(0x1f1)});throwIfPublishValidationFailed(_0x4cf68c['payload'][_0x3e2d83(0x1d6)],_0x5470b6);const _0x284b86=_0x413009[_0x3e2d83(0x1d1)](_0x3e2d83(0x1e5))||_0x413009[_0x3e2d83(0x1d1)](_0x3e2d83(0x1b9));if(_0x5470b6[_0x3e2d83(0x1dd)][_0x3e2d83(0x1eb)]>0x0&&!_0x284b86)throw CliErrors['validation'](_0x3e2d83(0x1d9)+_0x4cf68c['payload'][_0x3e2d83(0x1d6)]+'.',_0x3e2d83(0x1c8)+_0x5470b6[_0x3e2d83(0x1dd)][_0x3e2d83(0x1bb)](';\x20'));const _0x504125=await _0x21a639(_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c[_0x3e2d83(0x1dc)],{'confirmWarnings':_0x284b86});return _0x4b386c(_0x27f968,{..._0x504125,'files':_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)]},_0x413009[_0x3e2d83(0x1bd)],{'scope':_0x3e2d83(0x1ef)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x504125),'scope':_0x3e2d83(0x1ef),'reviewState':_0x3e2d83(0x1b4),'submittedForReview':!![],'validation':{'warnings':_0x5470b6[_0x3e2d83(0x1dd)]}},'message':_0x3e2d83(0x1df)+_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)]+'\x20version\x20'+(_0x504125[_0x3e2d83(0x1b5)]??_0x3e2d83(0x1e9))+_0x3e2d83(0x1f3)};}const _0x143703=_0x4cf68c[_0x3e2d83(0x1e4)]?await _0x4035ab(_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)],_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c['publishInput']):await _0x31e481(_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c[_0x3e2d83(0x1dc)]);let _0x395acd=_0x143703;if(isMultiFileManifest(_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)])){const _0x2bd167=await _0xcbd817(_0x3e2d83(0x1ce),_0x143703['skillCode']||_0x4cf68c[_0x3e2d83(0x1cb)]['skillCode'],_0x413009[_0x3e2d83(0x1bd)]);_0x4d1846(_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)],_0x2bd167),_0x395acd={..._0x143703,'files':_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)]};}else{if(isPackageBackedManifest(_0x143703[_0x3e2d83(0x1ec)])){const _0x2a7c09=await _0xcbd817(_0x3e2d83(0x1ce),_0x143703[_0x3e2d83(0x1d6)]||_0x4cf68c['payload'][_0x3e2d83(0x1d6)],_0x413009[_0x3e2d83(0x1bd)]);_0x127dfb(_0x143703[_0x3e2d83(0x1ec)],_0x2a7c09);}}return _0x4b386c(_0x27f968,_0x395acd,_0x413009[_0x3e2d83(0x1bd)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x143703),'warnings':_0x4cf68c[_0x3e2d83(0x1dd)]},'message':_0x4cf68c['existing']?_0x3e2d83(0x1cf)+_0x4cf68c['payload'][_0x3e2d83(0x1d6)]:_0x3e2d83(0x1e2)+_0x4cf68c[_0x3e2d83(0x1cb)]['skillCode']};}function scopeLabel(_0x10fd9b){const _0x395d80=a49_0x1aba;return _0x10fd9b==='company'?_0x395d80(0x1b7):_0x395d80(0x1b8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x56ddc1,_0x546b51){const _0x2b1f0a=a50_0xc5da,_0x309cdc=_0x56ddc1();while(!![]){try{const _0x56386b=parseInt(_0x2b1f0a(0xa7))/0x1+-parseInt(_0x2b1f0a(0x93))/0x2*(parseInt(_0x2b1f0a(0x9e))/0x3)+-parseInt(_0x2b1f0a(0x9c))/0x4+-parseInt(_0x2b1f0a(0xa0))/0x5*(-parseInt(_0x2b1f0a(0xad))/0x6)+-parseInt(_0x2b1f0a(0xa2))/0x7+parseInt(_0x2b1f0a(0x94))/0x8+-parseInt(_0x2b1f0a(0x92))/0x9*(-parseInt(_0x2b1f0a(0x91))/0xa);if(_0x56386b===_0x546b51)break;else _0x309cdc['push'](_0x309cdc['shift']());}catch(_0x54166d){_0x309cdc['push'](_0x309cdc['shift']());}}}(a50_0x19d4,0x74a55));import{CliErrors}from'../../errors.js';function a50_0x19d4(){const _0x153af1=['6FbCZMV','version','4240615wgiPnE','\x20cannot\x20be\x20pushed.','6277257UOmZTT','builtin','remote','skill-metadata-appcode-retargeted','join','605741AizBNf','scope','Local\x20Skill\x20metadata\x20appCode\x20','(unknown)','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','not-applicable','6xCBiMZ','Company\x20Skill\x20push\x20validation\x20failed\x20for\x20','length','company','personal','errors','identical','downloadRuntimeSkillPackage','\x20after\x20successful\x20push.','SkillHub\x20validation\x20returned\x20invalid.','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','appCode','different','validation','3758000eUjKwZ','18YlStae','801244ITOnZk','7114016IWJLmV','warning','valid','content','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','publishInput','lovrabet.skill.json','files','3675760orRoFK','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.'];a50_0x19d4=function(){return _0x153af1;};return a50_0x19d4();}export function resolvePushScope(_0x9cd3e0){const _0x582b19=a50_0xc5da,_0x497370=_0x9cd3e0['str'](_0x582b19(0xa8))||_0x582b19(0xb1);if(_0x497370===_0x582b19(0xb1)||_0x497370===_0x582b19(0xb0))return _0x497370;throw CliErrors[_0x582b19(0x90)](_0x582b19(0xab)+_0x497370+'\x22.');}export function allowRetargetArgs(_0x29588a){return _0x29588a?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){return{'targetScope':'company',...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0xb5218e={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0xb5218e};}function a50_0xc5da(_0x4df57f,_0x119f2d){_0x4df57f=_0x4df57f-0x90;const _0x19d42a=a50_0x19d4();let _0xc5daa=_0x19d42a[_0x4df57f];return _0xc5daa;}export function remotePersonalReadOptions(_0x525640,_0x3b0e01={}){return{'ignoreInvalidMetadata':!![],..._0x525640?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x3b0e01};}export function throwIfBuiltinPushTarget(_0x5a22f7){const _0x3d6c95=a50_0xc5da;if(_0x5a22f7?.['scope']!==_0x3d6c95(0xa3))return;throw CliErrors[_0x3d6c95(0x90)]('Builtin\x20Skill\x20'+(_0x5a22f7['skillCode']??_0x3d6c95(0xaa))+_0x3d6c95(0xa1),_0x3d6c95(0x9d));}export function throwIfPublishValidationFailed(_0x3e2916,_0x16f13e){const _0x1b073e=a50_0xc5da;if(_0x16f13e[_0x1b073e(0x96)]&&_0x16f13e[_0x1b073e(0xb2)][_0x1b073e(0xaf)]===0x0)return;const _0x197238=_0x16f13e['errors']['length']>0x0?_0x16f13e[_0x1b073e(0xb2)][_0x1b073e(0xa6)](';\x20'):_0x1b073e(0xb6);throw CliErrors[_0x1b073e(0x90)](_0x1b073e(0xae)+_0x3e2916+'.',_0x197238);}export function buildRetargetWarning(_0xceeb1b,_0x46ed12){const _0x489fe5=a50_0xc5da;if(!_0xceeb1b?.['appCode']||_0xceeb1b[_0x489fe5(0xb8)]===_0x46ed12)return[];return[{'level':_0x489fe5(0x95),'ruleId':_0x489fe5(0xa5),'file':_0x489fe5(0x9a),'message':_0x489fe5(0xa9)+_0xceeb1b[_0x489fe5(0xb8)]+_0x489fe5(0x98)+_0x46ed12+_0x489fe5(0xb5),'suggestion':_0x489fe5(0xb7)}];}export async function runRemoteContentPreflight(_0x40bf18){const _0xf7123=a50_0xc5da;if(!_0x40bf18[_0xf7123(0xa4)]||_0x40bf18['remote'][_0xf7123(0xa8)]!==_0x40bf18['scope']||!_0x40bf18[_0xf7123(0x99)][_0xf7123(0x9b)])return{'status':_0xf7123(0xac)};const _0xa8300e=_0x40bf18[_0xf7123(0xa4)]['skillCode']||_0x40bf18['skillCode'];if(!_0xa8300e)return{'status':_0xf7123(0xac)};const _0x49ea96=await _0x40bf18[_0xf7123(0xb4)](_0x40bf18[_0xf7123(0xa8)],_0xa8300e,_0x40bf18[_0xf7123(0xb8)],_0x40bf18[_0xf7123(0xa4)][_0xf7123(0x9f)]);try{_0x40bf18['verifyRuntimeSkillBundle'](_0x40bf18['publishInput'][_0xf7123(0x9b)],_0x49ea96);}catch{return{'status':_0xf7123(0xb9)};}return{'status':_0xf7123(0xb3),'savedSkill':{..._0x40bf18[_0xf7123(0xa4)],'content':_0x40bf18['publishInput'][_0xf7123(0x97)],'files':_0x40bf18[_0xf7123(0x99)][_0xf7123(0x9b)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x14fe21,_0x5e87e9){const _0x58587c=a51_0x1276,_0x6eef28=_0x14fe21();while(!![]){try{const _0x26b41a=-parseInt(_0x58587c(0x9d))/0x1*(parseInt(_0x58587c(0x92))/0x2)+-parseInt(_0x58587c(0x8e))/0x3+-parseInt(_0x58587c(0xa0))/0x4+-parseInt(_0x58587c(0x9b))/0x5+parseInt(_0x58587c(0x90))/0x6*(parseInt(_0x58587c(0xa3))/0x7)+parseInt(_0x58587c(0xa2))/0x8*(-parseInt(_0x58587c(0x9c))/0x9)+parseInt(_0x58587c(0x93))/0xa;if(_0x26b41a===_0x5e87e9)break;else _0x6eef28['push'](_0x6eef28['shift']());}catch(_0x247b0b){_0x6eef28['push'](_0x6eef28['shift']());}}}(a51_0x3b85,0x8b4c1));function a51_0x3b85(){const _0x17f413=['4980TdDNYt','tags','72bswMZw','26695320ETOKmd','skill-metadata-appcode-retargeted','skillName','appCode','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','description','isArray','version','985005KIFVGO','90vfgWbf','17166hlDiHv','\x20after\x20successful\x20push.','preferInputSkillName','712916NrxSKx','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','673680jclnDS','3738UbRIKB','2120655DDESEZ','sourceSessionId'];a51_0x3b85=function(){return _0x17f413;};return a51_0x3b85();}export function withRetargetExistingMetadata(_0x31a5fd,_0x57b29a,_0x2490f5={}){const _0x2fafb8=a51_0x1276,_0x4f2a78=_0x2490f5[_0x2fafb8(0x9f)]?_0x31a5fd[_0x2fafb8(0x95)]??_0x57b29a['skillName']:_0x57b29a['skillName']??_0x31a5fd['skillName'];return{..._0x31a5fd,'skillName':_0x4f2a78,'description':_0x57b29a[_0x2fafb8(0x98)]??_0x31a5fd[_0x2fafb8(0x98)],'tags':Array[_0x2fafb8(0x99)](_0x57b29a[_0x2fafb8(0x91)])?_0x57b29a[_0x2fafb8(0x91)]:_0x31a5fd[_0x2fafb8(0x91)],'version':_0x57b29a['version']??_0x31a5fd[_0x2fafb8(0x9a)],'sourceSessionId':_0x57b29a['sourceSessionId']??_0x31a5fd[_0x2fafb8(0x8f)]};}function a51_0x1276(_0xdc83de,_0x2b411e){_0xdc83de=_0xdc83de-0x8e;const _0x3b852a=a51_0x3b85();let _0x1276ef=_0x3b852a[_0xdc83de];return _0x1276ef;}export function buildRetargetWarning(_0x42151a,_0x12ddf9){const _0x341b58=a51_0x1276;if(!_0x42151a?.['appCode']||_0x42151a['appCode']===_0x12ddf9)return[];return[{'level':'warning','ruleId':_0x341b58(0x94),'file':'lovrabet.skill.json','message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x42151a[_0x341b58(0x96)]+_0x341b58(0x97)+_0x12ddf9+_0x341b58(0x9e),'suggestion':_0x341b58(0xa1)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4366c8,_0x464227){const _0x269464=a52_0x1ad1,_0xebb6bd=_0x4366c8();while(!![]){try{const _0x4cd5c4=-parseInt(_0x269464(0xc3))/0x1+-parseInt(_0x269464(0xc6))/0x2+parseInt(_0x269464(0xbb))/0x3*(parseInt(_0x269464(0xc2))/0x4)+parseInt(_0x269464(0xbe))/0x5*(-parseInt(_0x269464(0xc0))/0x6)+-parseInt(_0x269464(0xc9))/0x7+-parseInt(_0x269464(0xcb))/0x8*(parseInt(_0x269464(0xc5))/0x9)+parseInt(_0x269464(0xca))/0xa;if(_0x4cd5c4===_0x464227)break;else _0xebb6bd['push'](_0xebb6bd['shift']());}catch(_0x720ec1){_0xebb6bd['push'](_0xebb6bd['shift']());}}}(a52_0x31bc,0xaf8b5));function a52_0x31bc(){const _0x3fa123=['all','2643876GVjpdm','489784auNIMG','Unsupported\x20Skill\x20sync\x20scope:\x20','validation','4193553bbNfbk','27454160gfXbyq','8dpfJtx','1763469OlxBfG','personal','trim','1368935llmxWF','company','6zeVqvd','Unsupported\x20Skill\x20list\x20scope:\x20','4LaKjQd','1202688UMjJEO'];a52_0x31bc=function(){return _0x3fa123;};return a52_0x31bc();}import{CliErrors}from'../../errors.js';function a52_0x1ad1(_0x41bbdd,_0x32f080){_0x41bbdd=_0x41bbdd-0xbb;const _0x31bc50=a52_0x31bc();let _0x1ad1d8=_0x31bc50[_0x41bbdd];return _0x1ad1d8;}export function normalizeSyncScopes(_0x5ceb4d){const _0x52bddc=a52_0x1ad1,_0x4b0ada=_0x5ceb4d['trim']();if(!_0x4b0ada||_0x4b0ada===_0x52bddc(0xc4))return[_0x52bddc(0xbc),'company'];if(_0x4b0ada==='personal'||_0x4b0ada==='company')return[_0x4b0ada];throw CliErrors[_0x52bddc(0xc8)](_0x52bddc(0xc7)+_0x5ceb4d);}export function normalizeListScope(_0x25b359){const _0x49006d=a52_0x1ad1,_0x3847bb=_0x25b359[_0x49006d(0xbd)]();if(!_0x3847bb)return'all';if(_0x3847bb==='personal'||_0x3847bb===_0x49006d(0xbf)||_0x3847bb===_0x49006d(0xc4))return _0x3847bb;throw CliErrors[_0x49006d(0xc8)](_0x49006d(0xc1)+_0x25b359);}export function shouldListScope(_0x5d99f4,_0x370a77){if(_0x5d99f4==='all')return!![];return _0x5d99f4===_0x370a77;}export function listScopeToRuntimeScopes(_0x4c8af6){const _0x58a91e=a52_0x1ad1;if(_0x4c8af6===_0x58a91e(0xc4))return[_0x58a91e(0xbc),_0x58a91e(0xbf)];return[_0x4c8af6===_0x58a91e(0xbf)?_0x58a91e(0xbf):_0x4c8af6];}export function listScopeToRemoteScope(_0x296a39){return _0x296a39;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ad05f,_0x2095f9){var _0x21f36d=a53_0x371c,_0x3e3903=_0x5ad05f();while(!![]){try{var _0x44f721=parseInt(_0x21f36d(0x12a))/0x1*(-parseInt(_0x21f36d(0x129))/0x2)+-parseInt(_0x21f36d(0x126))/0x3+parseInt(_0x21f36d(0x137))/0x4+parseInt(_0x21f36d(0x128))/0x5*(parseInt(_0x21f36d(0x131))/0x6)+-parseInt(_0x21f36d(0x139))/0x7+-parseInt(_0x21f36d(0x136))/0x8+parseInt(_0x21f36d(0x127))/0x9;if(_0x44f721===_0x2095f9)break;else _0x3e3903['push'](_0x3e3903['shift']());}catch(_0x5fd961){_0x3e3903['push'](_0x3e3903['shift']());}}}(a53_0x3742,0x1b97a));function a53_0x371c(_0x5bac1c,_0x4e8c8a){_0x5bac1c=_0x5bac1c-0x126;var _0x374288=a53_0x3742();var _0x371c8b=_0x374288[_0x5bac1c];return _0x371c8b;}function a53_0x3742(){var _0x407579=['appCode','readonly','skillName','metadataPath','contentHash','skillMdPath','2190xYBECI','treeHash','scope','cacheDir','skillCode','1067832fNZoDm','154644PiURLw','linkedPaths','1549751rADYhS','version','578382WwIUXc','4624911BsSyCl','2055aQHYHG','27914YBDOcb','3cCRTdP'];a53_0x3742=function(){return _0x407579;};return a53_0x3742();}export function summarizeRuntimeSkill(_0x364e48){var _0x4b2454=a53_0x371c;return{'id':_0x364e48['id'],'skillCode':_0x364e48[_0x4b2454(0x135)],'skillName':_0x364e48[_0x4b2454(0x12d)],'scope':_0x364e48[_0x4b2454(0x133)],'version':_0x364e48[_0x4b2454(0x13a)],'readonly':_0x364e48[_0x4b2454(0x12c)]};}export function summarizeLocalRuntimeSkill(_0x383cbe){var _0x318d69=a53_0x371c;return{'id':_0x383cbe['id'],'skillCode':_0x383cbe[_0x318d69(0x135)],'skillName':_0x383cbe['skillName'],'scope':_0x383cbe['scope'],'appCode':_0x383cbe[_0x318d69(0x12b)],'version':_0x383cbe[_0x318d69(0x13a)],'status':_0x383cbe['status'],'readonly':_0x383cbe[_0x318d69(0x12c)],'tags':_0x383cbe['tags'],'dir':_0x383cbe['dir'],'cacheDir':_0x383cbe[_0x318d69(0x134)],'skillMdPath':_0x383cbe[_0x318d69(0x130)],'metadataPath':_0x383cbe[_0x318d69(0x12e)],'linkedPaths':_0x383cbe[_0x318d69(0x138)],'contentHash':_0x383cbe[_0x318d69(0x12f)],'treeHash':_0x383cbe[_0x318d69(0x132)],'pulledAt':_0x383cbe['pulledAt']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a54_0x3280cd=a54_0x4310;(function(_0xeb84a2,_0x1063f6){const _0x480630=a54_0x4310,_0x33bbf0=_0xeb84a2();while(!![]){try{const _0x399a89=-parseInt(_0x480630(0xf1))/0x1+-parseInt(_0x480630(0x100))/0x2+parseInt(_0x480630(0x106))/0x3*(parseInt(_0x480630(0x113))/0x4)+parseInt(_0x480630(0xfb))/0x5+-parseInt(_0x480630(0x115))/0x6+parseInt(_0x480630(0xf3))/0x7*(-parseInt(_0x480630(0xf7))/0x8)+parseInt(_0x480630(0x101))/0x9;if(_0x399a89===_0x1063f6)break;else _0x33bbf0['push'](_0x33bbf0['shift']());}catch(_0xf55c46){_0x33bbf0['push'](_0x33bbf0['shift']());}}}(a54_0x2fde,0x42b82));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a54_0x3280cd(0x10f),a54_0x3280cd(0x111),a54_0x3280cd(0x10a)];export const DEFAULT_SKILL_TARGET=a54_0x3280cd(0xf4);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a54_0x3280cd(0xf5);export const OUTPUT_CONTRACT_FILE=a54_0x3280cd(0xff);export function validateSkillName(_0x383b46){const _0x49a75b=a54_0x3280cd,_0x2b28a6=_0x383b46[_0x49a75b(0x114)]();if(!SKILL_NAME_PATTERN[_0x49a75b(0x103)](_0x2b28a6))throw CliErrors[_0x49a75b(0x10e)](_0x49a75b(0xfd)+_0x383b46+_0x49a75b(0x112),_0x49a75b(0x116));return _0x2b28a6;}export function normalizeSkillTemplateType(_0x341a2f){const _0x50a293=a54_0x3280cd,_0x8c471b=(_0x341a2f||_0x50a293(0x10f))[_0x50a293(0x114)]()||_0x50a293(0x10f);if(SKILL_TYPES['includes'](_0x8c471b))return _0x8c471b;throw CliErrors['validation'](_0x50a293(0xec)+_0x341a2f,_0x50a293(0x108)+SKILL_TYPES[_0x50a293(0xee)](',\x20')+'.');}export function renderSkillTemplate(_0x3383d0){const _0x1657ca=a54_0x3280cd,_0x25d5bb=validateSkillName(_0x3383d0[_0x1657ca(0xfe)]),_0x809a22=normalizeSkillTemplateType(_0x3383d0[_0x1657ca(0xfa)]),_0x41ca92=_0x3383d0[_0x1657ca(0xf2)]??new Date()[_0x1657ca(0x10c)]();return{'skillName':_0x25d5bb,'type':_0x809a22,'files':[{'path':_0x1657ca(0x102),'content':renderSkillMd(_0x25d5bb,_0x809a22,_0x41ca92)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x25d5bb,_0x809a22)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x25d5bb,_0x809a22)}]};}function a54_0x2fde(){const _0x4036c8=['\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','toISOString','\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','validation','write','\x0a\x20\x20created:\x20\x22','read','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','4804FNsIzX','trim','1121712KeMwEx','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','Unsupported\x20Skill\x20type:\x20','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','join','\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','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','414685cQQihP','timestamp','191408bBgXrk','.agents/skills','references/runtime-contract.md','\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','104HwPZiC','\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','---\x0aname:\x20','type','2040170nzuIvN','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','Invalid\x20Skill\x20name:\x20','skillName','references/output-contract.md','423430cSRzVZ','8474355RaDqkw','SKILL.md','test','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','231BBJHqO','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','Use\x20one\x20of:\x20','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','trainer'];a54_0x2fde=function(){return _0x4036c8;};return a54_0x2fde();}function a54_0x4310(_0x3fb4d4,_0x2271fe){_0x3fb4d4=_0x3fb4d4-0xec;const _0x2fdebb=a54_0x2fde();let _0x431086=_0x2fdebb[_0x3fb4d4];return _0x431086;}function renderSkillMd(_0x35f3dc,_0x5482b2,_0x3e45c6){const _0x1710be=a54_0x3280cd,_0x19c37d=typeWorkflow(_0x5482b2);return _0x1710be(0xf9)+_0x35f3dc+'\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0ametadata:\x0a\x20\x20type:\x20'+_0x5482b2+_0x1710be(0x110)+_0x3e45c6+_0x1710be(0x10b)+_0x35f3dc+_0x1710be(0xf6)+_0x19c37d+'\x0a\x0a'+businessStateSection(_0x5482b2)+_0x1710be(0xef);}function renderRuntimeContract(_0x4035e1,_0x11742f){const _0xa9fb26=a54_0x3280cd,_0x4ca2b6=_0x11742f===_0xa9fb26(0x10f)?_0xa9fb26(0x107):'';return'#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。'+_0x4035e1+'\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='+_0x11742f+_0xa9fb26(0x10d)+_0x4ca2b6+_0xa9fb26(0xf8);}function renderOutputContract(_0x3056c8,_0xabad13){const _0x43f4dd=a54_0x3280cd,_0x283178=_0xabad13==='write'?'write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。':_0xabad13+_0x43f4dd(0xf0);return'#\x20Output\x20Contract\x0a\x0a'+_0x3056c8+'\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'+_0x283178+_0x43f4dd(0x105);}function typeWorkflow(_0x3f8f09){const _0x3bc9d0=a54_0x3280cd;if(_0x3f8f09==='read')return _0x3bc9d0(0x109);if(_0x3f8f09===_0x3bc9d0(0x10a))return _0x3bc9d0(0x104);return _0x3bc9d0(0xfc);}function businessStateSection(_0x4f36fe){const _0x490d14=a54_0x3280cd;if(_0x4f36fe!==_0x490d14(0x10f))return'';return _0x490d14(0xed);}
|