@lovrabet/lovrabet-cli 2.1.14 → 2.1.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/lib/commands/app-config/shared.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x108149,_0xd93da4){const _0x475aa3=a41_0x31f0,_0x4498e0=_0x108149();while(!![]){try{const _0x449ab8=parseInt(_0x475aa3(0x121))/0x1+parseInt(_0x475aa3(0x135))/0x2*(-parseInt(_0x475aa3(0x15e))/0x3)+-parseInt(_0x475aa3(0x133))/0x4+parseInt(_0x475aa3(0x15b))/0x5+-parseInt(_0x475aa3(0x11a))/0x6+parseInt(_0x475aa3(0x149))/0x7+-parseInt(_0x475aa3(0x123))/0x8;if(_0x449ab8===_0xd93da4)break;else _0x4498e0['push'](_0x4498e0['shift']());}catch(_0x4ee45b){_0x4498e0['push'](_0x4498e0['shift']());}}}(a41_0xf7f2,0x4d84e));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';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x155953={}){const _0x1e5cd0=a41_0x31f0;return resolve(_0x155953[_0x1e5cd0(0x152)]??homedir(),PRODUCT_CONFIG[_0x1e5cd0(0x111)],SERVICE_REGISTRY_FILE_NAME);}function a41_0x31f0(_0x2953a9,_0x458419){_0x2953a9=_0x2953a9-0x110;const _0xf7f22a=a41_0xf7f2();let _0x31f0b5=_0xf7f22a[_0x2953a9];return _0x31f0b5;}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x517cbb={}){const _0xd7730d=a41_0x31f0,_0x23f643=getServiceRegistryPath(_0x517cbb);if(!existsSync(_0x23f643))return emptyServiceRegistry();try{const _0x310b4b=readFileSync(_0x23f643,'utf8');if(!_0x310b4b[_0xd7730d(0x166)]())return emptyServiceRegistry();const _0x1c7142=JSON[_0xd7730d(0x134)](_0x310b4b);if(_0x1c7142[_0xd7730d(0x115)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0xd7730d(0x136)](_0xd7730d(0x160)+String(_0x1c7142['schemaVersion']),_0xd7730d(0x141)+_0x23f643+'.');if(!Array[_0xd7730d(0x142)](_0x1c7142[_0xd7730d(0x13a)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1c7142[_0xd7730d(0x14b)],'services':_0x1c7142[_0xd7730d(0x13a)]};}catch(_0x2d9d74){if(_0x2d9d74 instanceof Error&&_0x2d9d74['name']==='CliError')throw _0x2d9d74;throw CliErrors[_0xd7730d(0x136)](_0xd7730d(0x140)+_0x23f643,_0xd7730d(0x13f));}}export function writeServiceRegistry(_0x127631,_0xa02732={}){const _0x35f100=a41_0x31f0,_0x51eca4=getServiceRegistryPath(_0xa02732),_0x3fe8c9=dirname(_0x51eca4);!existsSync(_0x3fe8c9)&&mkdirSync(_0x3fe8c9,{'recursive':!![]});const _0x58c25f=_0x51eca4+_0x35f100(0x12c);try{writeFileSync(_0x58c25f,JSON[_0x35f100(0x147)](_0x127631,null,0x2)+'\x0a',{'encoding':_0x35f100(0x120),'mode':0x180}),renameSync(_0x58c25f,_0x51eca4);}catch(_0x40ee6d){try{unlinkSync(_0x58c25f);}catch{}if(_0x40ee6d?.[_0x35f100(0x161)]===_0x35f100(0x15f))throw CliErrors[_0x35f100(0x136)](_0x35f100(0x164)+_0x51eca4);throw _0x40ee6d;}return _0x51eca4;}export function loadServiceManifestFromFile(_0x451abd){const _0x3560be=a41_0x31f0,_0x9a3f74=resolve(_0x451abd);if(!existsSync(_0x9a3f74))throw CliErrors[_0x3560be(0x136)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x451abd);let _0x4f2f8a;const _0x27e02f=readFileSync(_0x9a3f74,'utf8');try{_0x4f2f8a=JSON[_0x3560be(0x134)](_0x27e02f);}catch{throw CliErrors[_0x3560be(0x136)](_0x3560be(0x11e)+_0x451abd,_0x3560be(0x146));}const _0x6612b2=sha256(_0x27e02f),_0x2ef2a2=extractLoadedServiceManifests(_0x4f2f8a,_0x6612b2),_0x38eeb4=aggregateValidationReports(_0x2ef2a2),_0xec40f4=_0x2ef2a2[0x0];return{'filePath':_0x9a3f74,'hash':_0x6612b2,'kind':isServiceRegistryLike(_0x4f2f8a)?_0x3560be(0x12b):'manifest','manifest':_0xec40f4?.['manifest']??_0x4f2f8a,'report':_0x38eeb4,'normalizedManifest':_0x2ef2a2[_0x3560be(0x155)]===0x1?_0xec40f4?.['normalizedManifest']:undefined,'manifests':_0x2ef2a2};}export function importServiceManifest(_0xf525bb,_0x1465f2={}){const _0x569543=a41_0x31f0,_0x416b42=loadServiceManifestFromFile(_0xf525bb);if(!_0x416b42[_0x569543(0x112)]['ok'])throw CliErrors[_0x569543(0x136)](formatValidationFailure(_0x416b42['report']),_0x569543(0x117));if(_0x416b42[_0x569543(0x15d)]['length']===0x0)throw CliErrors[_0x569543(0x136)](_0x569543(0x158),_0x569543(0x129));const _0x3221d2=readServiceRegistry(_0x1465f2),_0x2db97b=(_0x1465f2[_0x569543(0x116)]??(()=>new Date()))()[_0x569543(0x154)](),_0x57ac35=[];let _0x2abd13=0x0,_0x176818=0x0;for(const _0x223915 of _0x416b42[_0x569543(0x15d)]){if(!_0x223915[_0x569543(0x132)])continue;const _0x59befd=_0x223915['normalizedManifest'][_0x569543(0x13c)][_0x569543(0x161)],_0x2c492a={'serviceCode':_0x59befd,'version':_0x223915[_0x569543(0x132)][_0x569543(0x143)],'importedAt':_0x2db97b,'source':{'type':_0x569543(0x124),'path':_0x416b42[_0x569543(0x13e)],'hash':_0x223915['sourceHash']},'manifest':_0x223915['manifest'],'normalizedManifest':_0x223915[_0x569543(0x132)]},_0x43d10d=_0x3221d2['services'][_0x569543(0x165)](_0x4426b3=>_0x4426b3['serviceCode']===_0x59befd);_0x43d10d>=0x0?(_0x3221d2[_0x569543(0x13a)][_0x43d10d]=_0x2c492a,_0x176818++):(_0x3221d2[_0x569543(0x13a)][_0x569543(0x14a)](_0x2c492a),_0x2abd13++),_0x57ac35['push'](_0x2c492a);}_0x3221d2[_0x569543(0x13a)][_0x569543(0x15c)]((_0x3f1879,_0xf6afef)=>_0x3f1879[_0x569543(0x11d)][_0x569543(0x130)](_0xf6afef[_0x569543(0x11d)])),_0x3221d2[_0x569543(0x14b)]=_0x2db97b;const _0x1f882a=writeServiceRegistry(_0x3221d2,_0x1465f2);return{'registryPath':_0x1f882a,'entry':_0x57ac35[0x0],'replaced':_0x57ac35[_0x569543(0x155)]===0x1?_0x176818===0x1:_0x176818>0x0,'entries':_0x57ac35,'imported':_0x2abd13,'updated':_0x176818,'serviceCount':_0x3221d2[_0x569543(0x13a)][_0x569543(0x155)]};}export function exportServiceManifest(_0x3c8a72,_0x481824,_0x4c8ef4={}){const _0x5d16d7=a41_0x31f0,_0x132512=getServiceRegistryPath(_0x4c8ef4),_0x57ed94=getLocalServiceEntry(_0x3c8a72,_0x4c8ef4);if(!_0x57ed94)throw CliErrors[_0x5d16d7(0x136)](_0x5d16d7(0x156)+_0x3c8a72,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x5052be=resolve(_0x481824),_0x38e4a9=dirname(_0x5052be);return!existsSync(_0x38e4a9)&&mkdirSync(_0x38e4a9,{'recursive':!![]}),writeFileSync(_0x5052be,JSON['stringify'](_0x57ed94['manifest'],null,0x2)+'\x0a',{'encoding':_0x5d16d7(0x120),'mode':0x180}),{'registryPath':_0x132512,'filePath':_0x5052be,'entry':_0x57ed94};}export function removeServiceManifest(_0x57d898,_0xaf374e={}){const _0xb323de=a41_0x31f0,_0x16a813=readServiceRegistry(_0xaf374e),_0x475a71=_0x57d898[_0xb323de(0x166)](),_0x35af1c=_0x16a813[_0xb323de(0x13a)][_0xb323de(0x165)](_0x3f005a=>_0x3f005a[_0xb323de(0x11d)]===_0x475a71);if(_0x35af1c<0x0)throw CliErrors[_0xb323de(0x136)](_0xb323de(0x156)+_0x475a71,_0xb323de(0x139));const [_0x54de8a]=_0x16a813['services'][_0xb323de(0x13d)](_0x35af1c,0x1),_0x4018c8=(_0xaf374e['now']??(()=>new Date()))()[_0xb323de(0x154)]();_0x16a813[_0xb323de(0x14b)]=_0x4018c8;const _0x558cb8=writeServiceRegistry(_0x16a813,_0xaf374e);return{'registryPath':_0x558cb8,'entry':_0x54de8a,'serviceCount':_0x16a813[_0xb323de(0x13a)]['length']};}export function listLocalServices(_0x555085={}){return readServiceRegistry(_0x555085)['services'];}export function getLocalServiceEntry(_0x56d33c,_0x3da530={}){const _0x223663=a41_0x31f0;return readServiceRegistry(_0x3da530)[_0x223663(0x13a)][_0x223663(0x151)](_0x44ad07=>_0x44ad07[_0x223663(0x11d)]===_0x56d33c[_0x223663(0x166)]());}export function listLocalServiceTrees(_0xdbd912={}){const _0x101f9b=a41_0x31f0;return readServiceRegistry(_0xdbd912)['services'][_0x101f9b(0x14e)](_0x45afa6=>_0x45afa6[_0x101f9b(0x132)]);}export function inspectServiceRegistry(_0x461856={}){const _0x3af873=a41_0x31f0,_0x52383a=getServiceRegistryPath(_0x461856);if(!existsSync(_0x52383a))return emptyServiceRegistryInspection(_0x52383a,_0x3af873(0x127),![]);try{const _0x95be6d=readFileSync(_0x52383a,_0x3af873(0x120));if(!_0x95be6d[_0x3af873(0x166)]())return emptyServiceRegistryInspection(_0x52383a,_0x3af873(0x159),!![]);const _0x52136e=JSON[_0x3af873(0x134)](_0x95be6d);if(_0x52136e['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x52383a,_0x3af873(0x128),!![]),'schemaVersion':_0x52136e['schemaVersion'],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x52136e[_0x3af873(0x115)])};if(!Array[_0x3af873(0x142)](_0x52136e[_0x3af873(0x13a)]))return{...emptyServiceRegistryInspection(_0x52383a,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x52136e[_0x3af873(0x14b)],'message':_0x3af873(0x11b)};const _0x8a716e=_0x52136e[_0x3af873(0x13a)][_0x3af873(0x14e)](summarizeLocalServiceEntry);return{'registryPath':_0x52383a,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x52136e[_0x3af873(0x14b)],'serviceCount':_0x8a716e[_0x3af873(0x155)],'commandCount':_0x8a716e['reduce']((_0xf7530b,_0x5bf0b8)=>_0xf7530b+_0x5bf0b8[_0x3af873(0x162)],0x0),'services':_0x8a716e};}catch(_0x26386e){return{...emptyServiceRegistryInspection(_0x52383a,_0x3af873(0x128),!![]),'message':_0x26386e instanceof Error?_0x26386e[_0x3af873(0x12f)]:String(_0x26386e)};}}export function formatValidationFailure(_0x2992bf){const _0x59c554=a41_0x31f0,_0x5f209c=_0x2992bf[_0x59c554(0x126)]['map'](_0x28a720=>_0x28a720[_0x59c554(0x125)]+':\x20'+_0x28a720[_0x59c554(0x12f)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x5f209c[_0x59c554(0x150)]('\x0a');}function extractLoadedServiceManifests(_0xfc2165,_0x1c55d6){const _0x5c9a64=a41_0x31f0;if(!isServiceRegistryLike(_0xfc2165)){const _0xc0213f=_0xfc2165,{manifest:_0x3941db,errors:_0x12af28}=adaptServiceTreeManifestForLegacyFramework(_0xc0213f),_0x44ad37=validateServiceTreeManifest(_0x3941db),_0x533f59=mergeValidationErrors(_0x44ad37,_0x12af28);return[{'manifest':_0xc0213f,'report':_0x533f59,'normalizedManifest':_0x533f59['ok']?normalizeServiceTreeManifest(_0x3941db):undefined,'sourceHash':_0x1c55d6}];}return _0xfc2165[_0x5c9a64(0x13a)]['map']((_0x235298,_0x7f85df)=>{const _0x34919a=_0x5c9a64,_0x27accc=isObjectRecord(_0x235298)?_0x235298[_0x34919a(0x14c)]:undefined,{manifest:_0x51d9ea,errors:_0x2f3804}=adaptServiceTreeManifestForLegacyFramework(_0x27accc),_0x22f45e=validateServiceTreeManifest(_0x51d9ea),_0x1514c1=mergeValidationErrors(_0x22f45e,_0x2f3804),_0x8e9404=isObjectRecord(_0x235298)&&typeof _0x235298[_0x34919a(0x11d)]===_0x34919a(0x15a)?_0x235298['serviceCode']:undefined;return{'manifest':_0x27accc,'report':_0x1514c1,'normalizedManifest':_0x1514c1['ok']?normalizeServiceTreeManifest(_0x51d9ea):undefined,'sourceHash':sha256(JSON[_0x34919a(0x147)](_0x27accc,null,0x2)+'\x0a'),'registryIndex':_0x7f85df,'registryServiceCode':_0x8e9404};});}function mergeValidationErrors(_0x5c1703,_0x3e5e6c){const _0x57a69b=a41_0x31f0,_0x29384d=_0x5c1703[_0x57a69b(0x126)][_0x57a69b(0x14e)](_0x502142=>_0x502142[_0x57a69b(0x12f)]===_0x57a69b(0x119)?{..._0x502142,'message':_0x57a69b(0x12e)}:_0x502142),_0x1d9bd4=[..._0x3e5e6c,..._0x29384d];return{'ok':_0x1d9bd4[_0x57a69b(0x155)]===0x0,'errors':_0x1d9bd4,'warnings':_0x5c1703[_0x57a69b(0x113)]};}function aggregateValidationReports(_0x3178a8){const _0x5ed8d2=a41_0x31f0,_0x4102ce=_0x3178a8[_0x5ed8d2(0x131)](_0xd11b53=>_0xd11b53[_0x5ed8d2(0x11f)]===undefined?_0xd11b53[_0x5ed8d2(0x112)][_0x5ed8d2(0x126)]:_0xd11b53['report'][_0x5ed8d2(0x126)][_0x5ed8d2(0x14e)](_0x19db49=>({..._0x19db49,'path':prefixRegistryIssuePath(_0xd11b53[_0x5ed8d2(0x11f)],_0x19db49[_0x5ed8d2(0x125)])}))),_0x875d82=_0x3178a8[_0x5ed8d2(0x131)](_0x248001=>_0x248001[_0x5ed8d2(0x11f)]===undefined?_0x248001[_0x5ed8d2(0x112)][_0x5ed8d2(0x113)]:_0x248001[_0x5ed8d2(0x112)]['warnings'][_0x5ed8d2(0x14e)](_0x5de21d=>({..._0x5de21d,'path':prefixRegistryIssuePath(_0x248001[_0x5ed8d2(0x11f)],_0x5de21d[_0x5ed8d2(0x125)])})));return{'ok':_0x4102ce['length']===0x0,'errors':_0x4102ce,'warnings':_0x875d82};}function prefixRegistryIssuePath(_0xa7f04b,_0x14d4be){const _0x330055=a41_0x31f0;if(_0x14d4be==='$')return'$.services['+_0xa7f04b+_0x330055(0x13b);if(_0x14d4be[_0x330055(0x138)]('$.'))return'$.services['+_0xa7f04b+'].manifest'+_0x14d4be[_0x330055(0x153)](0x1);if(_0x14d4be[_0x330055(0x138)]('$['))return _0x330055(0x148)+_0xa7f04b+_0x330055(0x13b)+_0x14d4be['slice'](0x1);return'$.services['+_0xa7f04b+_0x330055(0x122)+_0x14d4be;}function isServiceRegistryLike(_0x522d17){const _0x32726a=a41_0x31f0;return isObjectRecord(_0x522d17)&&_0x522d17['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x522d17[_0x32726a(0x13a)]);}function isObjectRecord(_0x312e1d){const _0x5137db=a41_0x31f0;return Boolean(_0x312e1d)&&typeof _0x312e1d==='object'&&!Array[_0x5137db(0x142)](_0x312e1d);}function emptyServiceRegistryInspection(_0x31d94f,_0x5a3454,_0x11043e){return{'registryPath':_0x31d94f,'exists':_0x11043e,'status':_0x5a3454,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function a41_0xf7f2(){const _0x5b5465=['2564470GTMdaq','sort','manifests','6kXGvfR','ENOENT','Unsupported\x20service\x20registry\x20schemaVersion:\x20','code','commandCount','hex','Cannot\x20write\x20service\x20registry:\x20','findIndex','trim','cliPath','homeDirName','report','warnings','command','schemaVersion','now','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','kind','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','67302hckkjI','services\x20must\x20be\x20an\x20array','source','serviceCode','Invalid\x20service\x20manifest\x20JSON:\x20','registryIndex','utf8','465890VmgZHF','].manifest.','7016392gkwGoY','file','path','errors','missing','invalid','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','digest','registry','.tmp','sha256','bff\x20target\x20requires\x20functionName.','message','localeCompare','flatMap','normalizedManifest','129372ZwdALL','parse','238652bjRoZc','validation','name','startsWith','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','services','].manifest','service','splice','filePath','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','Invalid\x20service\x20registry\x20JSON:\x20','Remove\x20or\x20migrate\x20','isArray','version','description','risk','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','stringify','$.services[','3485965mXedEL','push','updatedAt','manifest','target','map','commands','join','find','homeDir','slice','toISOString','length','Local\x20service\x20not\x20found:\x20','importedAt','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','empty','string'];a41_0xf7f2=function(){return _0x5b5465;};return a41_0xf7f2();}function summarizeLocalServiceEntry(_0x142e18){const _0x4a6ba7=a41_0x31f0,_0x346637=_0x142e18[_0x4a6ba7(0x132)],_0x1ac64c=_0x346637[_0x4a6ba7(0x14f)]['map'](_0x5412ee=>({'path':_0x5412ee[_0x4a6ba7(0x110)],'description':_0x5412ee[_0x4a6ba7(0x144)],'risk':_0x5412ee[_0x4a6ba7(0x145)],'targetKind':_0x5412ee[_0x4a6ba7(0x14d)][_0x4a6ba7(0x118)],'targetCommand':_0x5412ee['target'][_0x4a6ba7(0x114)]}));return{'serviceCode':_0x142e18[_0x4a6ba7(0x11d)],'name':_0x346637[_0x4a6ba7(0x13c)][_0x4a6ba7(0x137)],'description':_0x346637[_0x4a6ba7(0x13c)][_0x4a6ba7(0x144)],'version':_0x142e18[_0x4a6ba7(0x143)],'importedAt':_0x142e18[_0x4a6ba7(0x157)],'source':_0x142e18[_0x4a6ba7(0x11c)],'commandCount':_0x1ac64c[_0x4a6ba7(0x155)],'commands':_0x1ac64c};}function sha256(_0x579427){const _0x25de40=a41_0x31f0;return createHash(_0x25de40(0x12d))['update'](_0x579427)[_0x25de40(0x12a)](_0x25de40(0x163));}
|
|
1
|
+
function a40_0x4caa(){const _0x2a7aca=['name','utf8','startsWith','updatedAt','Unsupported\x20schemaVersion:\x20','command','isArray','1560UaGmct','712nfcSeH','map','].manifest.','Cannot\x20write\x20service\x20registry:\x20','2429556ALPwMN','find','push','normalizedManifest','flatMap','filePath','sha256','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','4963VXxDKi','kind','Invalid\x20service\x20manifest\x20JSON:\x20','services','114GILRMS','message','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','length','missing','4055312IQLshf','service.json','version','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','homeDir','slice','5875xXFggL','Unsupported\x20service\x20registry\x20schemaVersion:\x20','manifest','cliPath','manifests','49182353WNQptv','schemaVersion','stringify','warnings','join','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','10cjCFBK','errors','importedAt','serviceCode','digest','commandCount','string','toISOString','report','registry','code','findIndex','sourceHash','target','commands','Local\x20service\x20not\x20found:\x20','validation','sort','path','].manifest','object','trim','description','service','$.services[','16625dcnhVd','registryIndex','10225647hVyUYn','now','invalid','localeCompare','parse','bff\x20target\x20requires\x20functionName.'];a40_0x4caa=function(){return _0x2a7aca;};return a40_0x4caa();}const a40_0x2da636=a40_0x3f10;(function(_0x2f1795,_0x203e4f){const _0x3e5485=a40_0x3f10,_0x42ee35=_0x2f1795();while(!![]){try{const _0x2b47c2=parseInt(_0x3e5485(0x1fd))/0x1*(-parseInt(_0x3e5485(0x1ce))/0x2)+-parseInt(_0x3e5485(0x1c2))/0x3+parseInt(_0x3e5485(0x1be))/0x4*(-parseInt(_0x3e5485(0x1d9))/0x5)+-parseInt(_0x3e5485(0x1bd))/0x6*(parseInt(_0x3e5485(0x1ca))/0x7)+-parseInt(_0x3e5485(0x1d3))/0x8+parseInt(_0x3e5485(0x1ff))/0x9*(-parseInt(_0x3e5485(0x1e4))/0xa)+parseInt(_0x3e5485(0x1de))/0xb;if(_0x2b47c2===_0x203e4f)break;else _0x42ee35['push'](_0x42ee35['shift']());}catch(_0x5e5ba6){_0x42ee35['push'](_0x42ee35['shift']());}}}(a40_0x4caa,0xa54c3));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';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x2da636(0x1d4);export function getServiceRegistryPath(_0x1f9df0={}){const _0x108037=a40_0x2da636;return resolve(_0x1f9df0[_0x108037(0x1d7)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x282f17={}){const _0x47651f=a40_0x2da636,_0x180653=getServiceRegistryPath(_0x282f17);if(!existsSync(_0x180653))return emptyServiceRegistry();try{const _0x49c528=readFileSync(_0x180653,_0x47651f(0x206));if(!_0x49c528['trim']())return emptyServiceRegistry();const _0x211653=JSON[_0x47651f(0x203)](_0x49c528);if(_0x211653['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation'](_0x47651f(0x1da)+String(_0x211653[_0x47651f(0x1df)]),'Remove\x20or\x20migrate\x20'+_0x180653+'.');if(!Array[_0x47651f(0x1bc)](_0x211653[_0x47651f(0x1cd)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x211653[_0x47651f(0x208)],'services':_0x211653[_0x47651f(0x1cd)]};}catch(_0x2ec430){if(_0x2ec430 instanceof Error&&_0x2ec430[_0x47651f(0x205)]==='CliError')throw _0x2ec430;throw CliErrors[_0x47651f(0x1f4)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x180653,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x4da151,_0xdfedf6={}){const _0x57f966=a40_0x2da636,_0x436a5a=getServiceRegistryPath(_0xdfedf6),_0x4d5649=dirname(_0x436a5a);!existsSync(_0x4d5649)&&mkdirSync(_0x4d5649,{'recursive':!![]});const _0x2ead99=_0x436a5a+'.tmp';try{writeFileSync(_0x2ead99,JSON[_0x57f966(0x1e0)](_0x4da151,null,0x2)+'\x0a',{'encoding':_0x57f966(0x206),'mode':0x180}),renameSync(_0x2ead99,_0x436a5a);}catch(_0x53f3ca){try{unlinkSync(_0x2ead99);}catch{}if(_0x53f3ca?.[_0x57f966(0x1ee)]==='ENOENT')throw CliErrors[_0x57f966(0x1f4)](_0x57f966(0x1c1)+_0x436a5a);throw _0x53f3ca;}return _0x436a5a;}export function loadServiceManifestFromFile(_0x2f6ce1){const _0x1052a0=a40_0x2da636,_0x516969=resolve(_0x2f6ce1);if(!existsSync(_0x516969))throw CliErrors[_0x1052a0(0x1f4)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x2f6ce1);let _0x111564;const _0x3458a0=readFileSync(_0x516969,_0x1052a0(0x206));try{_0x111564=JSON[_0x1052a0(0x203)](_0x3458a0);}catch{throw CliErrors[_0x1052a0(0x1f4)](_0x1052a0(0x1cc)+_0x2f6ce1,_0x1052a0(0x1d0));}const _0xa18c1b=sha256(_0x3458a0),_0x34c27a=extractLoadedServiceManifests(_0x111564,_0xa18c1b),_0x13bf9b=aggregateValidationReports(_0x34c27a),_0x4a3c1c=_0x34c27a[0x0];return{'filePath':_0x516969,'hash':_0xa18c1b,'kind':isServiceRegistryLike(_0x111564)?_0x1052a0(0x1ed):_0x1052a0(0x1db),'manifest':_0x4a3c1c?.['manifest']??_0x111564,'report':_0x13bf9b,'normalizedManifest':_0x34c27a[_0x1052a0(0x1d1)]===0x1?_0x4a3c1c?.[_0x1052a0(0x1c5)]:undefined,'manifests':_0x34c27a};}export function importServiceManifest(_0x43f1ab,_0x25036a={}){const _0x4da6e4=a40_0x2da636,_0x7b15b7=loadServiceManifestFromFile(_0x43f1ab);if(!_0x7b15b7[_0x4da6e4(0x1ec)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x7b15b7[_0x4da6e4(0x1ec)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x7b15b7[_0x4da6e4(0x1dd)]['length']===0x0)throw CliErrors[_0x4da6e4(0x1f4)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x4da6e4(0x1d6));const _0xb5dff6=readServiceRegistry(_0x25036a),_0x220630=(_0x25036a['now']??(()=>new Date()))()[_0x4da6e4(0x1eb)](),_0x33a56a=[];let _0x54a2ee=0x0,_0x786c11=0x0;for(const _0x14da28 of _0x7b15b7[_0x4da6e4(0x1dd)]){if(!_0x14da28[_0x4da6e4(0x1c5)])continue;const _0x20038e=_0x14da28['normalizedManifest']['service'][_0x4da6e4(0x1ee)],_0x114c15={'serviceCode':_0x20038e,'version':_0x14da28[_0x4da6e4(0x1c5)][_0x4da6e4(0x1d5)],'importedAt':_0x220630,'source':{'type':'file','path':_0x7b15b7[_0x4da6e4(0x1c7)],'hash':_0x14da28[_0x4da6e4(0x1f0)]},'manifest':_0x14da28['manifest'],'normalizedManifest':_0x14da28[_0x4da6e4(0x1c5)]},_0x3d5564=_0xb5dff6[_0x4da6e4(0x1cd)][_0x4da6e4(0x1ef)](_0x4f3634=>_0x4f3634[_0x4da6e4(0x1e7)]===_0x20038e);_0x3d5564>=0x0?(_0xb5dff6['services'][_0x3d5564]=_0x114c15,_0x786c11++):(_0xb5dff6[_0x4da6e4(0x1cd)]['push'](_0x114c15),_0x54a2ee++),_0x33a56a[_0x4da6e4(0x1c4)](_0x114c15);}_0xb5dff6[_0x4da6e4(0x1cd)][_0x4da6e4(0x1f5)]((_0x5a3d5a,_0x4b32c5)=>_0x5a3d5a['serviceCode'][_0x4da6e4(0x202)](_0x4b32c5[_0x4da6e4(0x1e7)])),_0xb5dff6['updatedAt']=_0x220630;const _0x3d5232=writeServiceRegistry(_0xb5dff6,_0x25036a);return{'registryPath':_0x3d5232,'entry':_0x33a56a[0x0],'replaced':_0x33a56a[_0x4da6e4(0x1d1)]===0x1?_0x786c11===0x1:_0x786c11>0x0,'entries':_0x33a56a,'imported':_0x54a2ee,'updated':_0x786c11,'serviceCount':_0xb5dff6['services'][_0x4da6e4(0x1d1)]};}export function exportServiceManifest(_0x5a1d36,_0x2bf2e5,_0x19cafc={}){const _0x5d665c=a40_0x2da636,_0x544b13=getServiceRegistryPath(_0x19cafc),_0x4fd5a4=getLocalServiceEntry(_0x5a1d36,_0x19cafc);if(!_0x4fd5a4)throw CliErrors[_0x5d665c(0x1f4)](_0x5d665c(0x1f3)+_0x5a1d36,_0x5d665c(0x1c9));const _0x5ed8c4=resolve(_0x2bf2e5),_0x34d582=dirname(_0x5ed8c4);return!existsSync(_0x34d582)&&mkdirSync(_0x34d582,{'recursive':!![]}),writeFileSync(_0x5ed8c4,JSON[_0x5d665c(0x1e0)](_0x4fd5a4[_0x5d665c(0x1db)],null,0x2)+'\x0a',{'encoding':_0x5d665c(0x206),'mode':0x180}),{'registryPath':_0x544b13,'filePath':_0x5ed8c4,'entry':_0x4fd5a4};}export function removeServiceManifest(_0x16ea3d,_0x3bca29={}){const _0x32d13b=a40_0x2da636,_0x1375d3=readServiceRegistry(_0x3bca29),_0x4defdb=_0x16ea3d['trim'](),_0x3f393d=_0x1375d3[_0x32d13b(0x1cd)][_0x32d13b(0x1ef)](_0x2c03f0=>_0x2c03f0[_0x32d13b(0x1e7)]===_0x4defdb);if(_0x3f393d<0x0)throw CliErrors[_0x32d13b(0x1f4)](_0x32d13b(0x1f3)+_0x4defdb,_0x32d13b(0x1c9));const [_0x1eb729]=_0x1375d3[_0x32d13b(0x1cd)]['splice'](_0x3f393d,0x1),_0x162d74=(_0x3bca29[_0x32d13b(0x200)]??(()=>new Date()))()[_0x32d13b(0x1eb)]();_0x1375d3['updatedAt']=_0x162d74;const _0xbfdba5=writeServiceRegistry(_0x1375d3,_0x3bca29);return{'registryPath':_0xbfdba5,'entry':_0x1eb729,'serviceCount':_0x1375d3['services']['length']};}function a40_0x3f10(_0x158417,_0x283c56){_0x158417=_0x158417-0x1bb;const _0x4caa0a=a40_0x4caa();let _0x3f109d=_0x4caa0a[_0x158417];return _0x3f109d;}export function listLocalServices(_0x1fee2d={}){return readServiceRegistry(_0x1fee2d)['services'];}export function getLocalServiceEntry(_0x36f91f,_0x45be10={}){const _0x33414d=a40_0x2da636;return readServiceRegistry(_0x45be10)[_0x33414d(0x1cd)][_0x33414d(0x1c3)](_0x50756c=>_0x50756c[_0x33414d(0x1e7)]===_0x36f91f['trim']());}export function listLocalServiceTrees(_0x4f5eb8={}){const _0x237ead=a40_0x2da636;return readServiceRegistry(_0x4f5eb8)['services'][_0x237ead(0x1bf)](_0x1a20f5=>_0x1a20f5[_0x237ead(0x1c5)]);}export function inspectServiceRegistry(_0x18c654={}){const _0x5c05fe=a40_0x2da636,_0x41fda3=getServiceRegistryPath(_0x18c654);if(!existsSync(_0x41fda3))return emptyServiceRegistryInspection(_0x41fda3,_0x5c05fe(0x1d2),![]);try{const _0x1487f2=readFileSync(_0x41fda3,_0x5c05fe(0x206));if(!_0x1487f2[_0x5c05fe(0x1f9)]())return emptyServiceRegistryInspection(_0x41fda3,'empty',!![]);const _0x4915ac=JSON[_0x5c05fe(0x203)](_0x1487f2);if(_0x4915ac['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x41fda3,'invalid',!![]),'schemaVersion':_0x4915ac[_0x5c05fe(0x1df)],'message':_0x5c05fe(0x209)+String(_0x4915ac['schemaVersion'])};if(!Array['isArray'](_0x4915ac[_0x5c05fe(0x1cd)]))return{...emptyServiceRegistryInspection(_0x41fda3,_0x5c05fe(0x201),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4915ac[_0x5c05fe(0x208)],'message':'services\x20must\x20be\x20an\x20array'};const _0x19d472=_0x4915ac[_0x5c05fe(0x1cd)][_0x5c05fe(0x1bf)](summarizeLocalServiceEntry);return{'registryPath':_0x41fda3,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4915ac[_0x5c05fe(0x208)],'serviceCount':_0x19d472[_0x5c05fe(0x1d1)],'commandCount':_0x19d472['reduce']((_0xe1ef5c,_0x2def2a)=>_0xe1ef5c+_0x2def2a[_0x5c05fe(0x1e9)],0x0),'services':_0x19d472};}catch(_0x11d940){return{...emptyServiceRegistryInspection(_0x41fda3,'invalid',!![]),'message':_0x11d940 instanceof Error?_0x11d940[_0x5c05fe(0x1cf)]:String(_0x11d940)};}}export function formatValidationFailure(_0x12aed1){const _0x1ea46b=a40_0x2da636,_0x420280=_0x12aed1[_0x1ea46b(0x1e5)][_0x1ea46b(0x1bf)](_0x503e60=>_0x503e60[_0x1ea46b(0x1f6)]+':\x20'+_0x503e60['message']);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x420280[_0x1ea46b(0x1e2)]('\x0a');}function extractLoadedServiceManifests(_0x46b9d2,_0xabd4d7){const _0x4ab063=a40_0x2da636;if(!isServiceRegistryLike(_0x46b9d2)){const _0x11eba5=_0x46b9d2,{manifest:_0x42c18e,errors:_0x3b45ae}=adaptServiceTreeManifestForLegacyFramework(_0x11eba5),_0x13b067=validateServiceTreeManifest(_0x42c18e),_0x3908cf=mergeValidationErrors(_0x13b067,_0x3b45ae);return[{'manifest':_0x11eba5,'report':_0x3908cf,'normalizedManifest':_0x3908cf['ok']?normalizeServiceTreeManifest(_0x42c18e):undefined,'sourceHash':_0xabd4d7}];}return _0x46b9d2['services'][_0x4ab063(0x1bf)]((_0x44329b,_0x3c55c7)=>{const _0x1f8bca=_0x4ab063,_0x48511e=isObjectRecord(_0x44329b)?_0x44329b[_0x1f8bca(0x1db)]:undefined,{manifest:_0x33cbff,errors:_0x59cb2a}=adaptServiceTreeManifestForLegacyFramework(_0x48511e),_0x125cdf=validateServiceTreeManifest(_0x33cbff),_0x2d9c9f=mergeValidationErrors(_0x125cdf,_0x59cb2a),_0x4fe37c=isObjectRecord(_0x44329b)&&typeof _0x44329b[_0x1f8bca(0x1e7)]===_0x1f8bca(0x1ea)?_0x44329b[_0x1f8bca(0x1e7)]:undefined;return{'manifest':_0x48511e,'report':_0x2d9c9f,'normalizedManifest':_0x2d9c9f['ok']?normalizeServiceTreeManifest(_0x33cbff):undefined,'sourceHash':sha256(JSON['stringify'](_0x48511e,null,0x2)+'\x0a'),'registryIndex':_0x3c55c7,'registryServiceCode':_0x4fe37c};});}function mergeValidationErrors(_0x30ce7e,_0x4817d8){const _0x207e4b=a40_0x2da636,_0x41aeaf=_0x30ce7e['errors'][_0x207e4b(0x1bf)](_0x5d850d=>_0x5d850d['message']===_0x207e4b(0x1e3)?{..._0x5d850d,'message':_0x207e4b(0x204)}:_0x5d850d),_0x3b92a8=[..._0x4817d8,..._0x41aeaf];return{'ok':_0x3b92a8[_0x207e4b(0x1d1)]===0x0,'errors':_0x3b92a8,'warnings':_0x30ce7e['warnings']};}function aggregateValidationReports(_0x1668fd){const _0x1f4f25=a40_0x2da636,_0x4286df=_0x1668fd['flatMap'](_0x3fe158=>_0x3fe158[_0x1f4f25(0x1fe)]===undefined?_0x3fe158[_0x1f4f25(0x1ec)][_0x1f4f25(0x1e5)]:_0x3fe158['report']['errors'][_0x1f4f25(0x1bf)](_0x4d305a=>({..._0x4d305a,'path':prefixRegistryIssuePath(_0x3fe158[_0x1f4f25(0x1fe)],_0x4d305a[_0x1f4f25(0x1f6)])}))),_0x3d7a65=_0x1668fd[_0x1f4f25(0x1c6)](_0x263f85=>_0x263f85['registryIndex']===undefined?_0x263f85['report']['warnings']:_0x263f85['report'][_0x1f4f25(0x1e1)][_0x1f4f25(0x1bf)](_0x27e920=>({..._0x27e920,'path':prefixRegistryIssuePath(_0x263f85[_0x1f4f25(0x1fe)],_0x27e920['path'])})));return{'ok':_0x4286df[_0x1f4f25(0x1d1)]===0x0,'errors':_0x4286df,'warnings':_0x3d7a65};}function prefixRegistryIssuePath(_0x333263,_0x3f77b3){const _0x385c8a=a40_0x2da636;if(_0x3f77b3==='$')return _0x385c8a(0x1fc)+_0x333263+_0x385c8a(0x1f7);if(_0x3f77b3[_0x385c8a(0x207)]('$.'))return _0x385c8a(0x1fc)+_0x333263+_0x385c8a(0x1f7)+_0x3f77b3[_0x385c8a(0x1d8)](0x1);if(_0x3f77b3[_0x385c8a(0x207)]('$['))return'$.services['+_0x333263+_0x385c8a(0x1f7)+_0x3f77b3[_0x385c8a(0x1d8)](0x1);return _0x385c8a(0x1fc)+_0x333263+_0x385c8a(0x1c0)+_0x3f77b3;}function isServiceRegistryLike(_0x4232e8){const _0x28ce98=a40_0x2da636;return isObjectRecord(_0x4232e8)&&_0x4232e8[_0x28ce98(0x1df)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x28ce98(0x1bc)](_0x4232e8['services']);}function isObjectRecord(_0x20d8cf){const _0x4e72fc=a40_0x2da636;return Boolean(_0x20d8cf)&&typeof _0x20d8cf===_0x4e72fc(0x1f8)&&!Array[_0x4e72fc(0x1bc)](_0x20d8cf);}function emptyServiceRegistryInspection(_0x45c4d0,_0x31a5a4,_0x1c6711){return{'registryPath':_0x45c4d0,'exists':_0x1c6711,'status':_0x31a5a4,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x182a53){const _0x427158=a40_0x2da636,_0x624c0f=_0x182a53[_0x427158(0x1c5)],_0x4ee724=_0x624c0f[_0x427158(0x1f2)][_0x427158(0x1bf)](_0xf48bfc=>({'path':_0xf48bfc[_0x427158(0x1dc)],'description':_0xf48bfc[_0x427158(0x1fa)],'risk':_0xf48bfc['risk'],'targetKind':_0xf48bfc[_0x427158(0x1f1)][_0x427158(0x1cb)],'targetCommand':_0xf48bfc[_0x427158(0x1f1)][_0x427158(0x1bb)]}));return{'serviceCode':_0x182a53[_0x427158(0x1e7)],'name':_0x624c0f[_0x427158(0x1fb)]['name'],'description':_0x624c0f[_0x427158(0x1fb)][_0x427158(0x1fa)],'version':_0x182a53['version'],'importedAt':_0x182a53[_0x427158(0x1e6)],'source':_0x182a53['source'],'commandCount':_0x4ee724[_0x427158(0x1d1)],'commands':_0x4ee724};}function sha256(_0x39f1a9){const _0xeb165b=a40_0x2da636;return createHash(_0xeb165b(0x1c8))['update'](_0x39f1a9)[_0xeb165b(0x1e8)]('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x1877b5=a41_0x4bff;(function(_0xaa9e7d,_0x46b278){const _0x33fa64=a41_0x4bff,_0x4e2fe2=_0xaa9e7d();while(!![]){try{const _0x485a32=parseInt(_0x33fa64(0xb1))/0x1+-parseInt(_0x33fa64(0xbb))/0x2+-parseInt(_0x33fa64(0xc3))/0x3+parseInt(_0x33fa64(0xb7))/0x4+parseInt(_0x33fa64(0xab))/0x5*(parseInt(_0x33fa64(0xad))/0x6)+parseInt(_0x33fa64(0xb9))/0x7*(parseInt(_0x33fa64(0xb3))/0x8)+parseInt(_0x33fa64(0xb5))/0x9;if(_0x485a32===_0x46b278)break;else _0x4e2fe2['push'](_0x4e2fe2['shift']());}catch(_0x188b28){_0x4e2fe2['push'](_0x4e2fe2['shift']());}}}(a41_0x3a80,0x863bb));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';function a41_0x4bff(_0x59a829,_0x3fcfb1){_0x59a829=_0x59a829-0xa5;const _0x3a800d=a41_0x3a80();let _0x4bff2d=_0x3a800d[_0x59a829];return _0x4bff2d;}import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a41_0x1877b5(0xbe),'command':'create','description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':a41_0x1877b5(0xbf),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x5c27b6){const _0x4a0384=a41_0x1877b5,_0x550a07=buildSkillCreatePlan(_0x5c27b6[_0x4a0384(0xae)](_0x4a0384(0xa5)),_0x5c27b6[_0x4a0384(0xae)](_0x4a0384(0xa8)),_0x5c27b6[_0x4a0384(0xae)](_0x4a0384(0xac)));return{'method':_0x4a0384(0xc1),'url':_0x550a07[_0x4a0384(0xb0)],'body':{'skillName':_0x550a07[_0x4a0384(0xba)]['skillName'],'type':_0x550a07[_0x4a0384(0xba)][_0x4a0384(0xa8)],'selfContained':!![],'files':_0x550a07[_0x4a0384(0xba)][_0x4a0384(0xa7)][_0x4a0384(0xb8)](_0x2dd873=>_0x2dd873[_0x4a0384(0xb6)])},'description':_0x4a0384(0xaf)};},async 'execute'(_0x5b0f49){const _0x635d63=a41_0x1877b5,_0x3d3012=buildSkillCreatePlan(_0x5b0f49[_0x635d63(0xae)]('name'),_0x5b0f49['str'](_0x635d63(0xa8)),_0x5b0f49[_0x635d63(0xae)](_0x635d63(0xac)));return writeSkillDraft(_0x3d3012,_0x5b0f49['bool'](_0x635d63(0xa9))),{'ok':!![],'data':{'skillName':_0x3d3012[_0x635d63(0xba)][_0x635d63(0xc2)],'type':_0x3d3012[_0x635d63(0xba)][_0x635d63(0xa8)],'dir':_0x3d3012[_0x635d63(0xb0)],'files':_0x3d3012[_0x635d63(0xba)]['files'][_0x635d63(0xb8)](_0x5809b3=>_0x5809b3[_0x635d63(0xb6)])},'message':_0x635d63(0xbc)+_0x3d3012[_0x635d63(0xba)]['skillName']};}};function buildSkillCreatePlan(_0x5deb60,_0x31ac13,_0x3a86d6){const _0x369b55=a41_0x1877b5,_0x265437=renderSkillTemplate({'skillName':_0x5deb60,'type':_0x31ac13}),_0x1156ab=resolve(normalizeSkillTarget(_0x3a86d6));return{'rendered':_0x265437,'targetRoot':_0x1156ab,'skillDir':resolve(_0x1156ab,_0x265437[_0x369b55(0xc2)])};}function a41_0x3a80(){const _0x550941=['path','1122732FAsCoR','map','7RVczkK','rendered','46092JFfhNk','Created\x20local\x20Skill\x20draft\x20','trim','skill','write','validation','WRITE','skillName','2319282nYzLWC','isSymbolicLink','name','isDirectory','files','type','force','utf8','10895zMunLm','target','276iveZfV','str','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','skillDir','645899gQUtAf','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','2033192ctJlKY','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','584946fAlzYX'];a41_0x3a80=function(){return _0x550941;};return a41_0x3a80();}function normalizeSkillTarget(_0x39e768){const _0x24f4a2=a41_0x1877b5;return(_0x39e768||DEFAULT_SKILL_TARGET)[_0x24f4a2(0xbd)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x50b594,_0x5593d9){const _0x517167=a41_0x1877b5;if(existsSync(_0x50b594['skillDir'])){const _0x2b8733=lstatSync(_0x50b594[_0x517167(0xb0)]);if(!_0x2b8733[_0x517167(0xa6)]()||_0x2b8733[_0x517167(0xc4)]())throw CliErrors[_0x517167(0xc0)](_0x517167(0xb2)+_0x50b594[_0x517167(0xb0)]);if(!_0x5593d9)throw CliErrors[_0x517167(0xc0)]('Skill\x20directory\x20already\x20exists:\x20'+_0x50b594['skillDir'],_0x517167(0xb4));}for(const _0x544d12 of _0x50b594[_0x517167(0xba)]['files']){const _0x4cad86=resolve(_0x50b594['skillDir'],_0x544d12[_0x517167(0xb6)]),_0x4e1c6c=dirname(_0x4cad86);mkdirSync(_0x4e1c6c,{'recursive':!![]});if(existsSync(_0x4cad86)&&lstatSync(_0x4cad86)[_0x517167(0xc4)]())throw CliErrors[_0x517167(0xc0)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x4cad86);writeFileSync(_0x4cad86,_0x544d12['content'],_0x517167(0xaa));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x360b83=a42_0x5aa1;(function(_0x278cd8,_0x27f287){const _0x3ac836=a42_0x5aa1,_0x45b106=_0x278cd8();while(!![]){try{const _0x46bccb=-parseInt(_0x3ac836(0x200))/0x1*(parseInt(_0x3ac836(0x20e))/0x2)+parseInt(_0x3ac836(0x1f9))/0x3*(parseInt(_0x3ac836(0x208))/0x4)+-parseInt(_0x3ac836(0x217))/0x5*(parseInt(_0x3ac836(0x204))/0x6)+-parseInt(_0x3ac836(0x1f8))/0x7+parseInt(_0x3ac836(0x1fb))/0x8+-parseInt(_0x3ac836(0x1f1))/0x9+parseInt(_0x3ac836(0x20a))/0xa*(parseInt(_0x3ac836(0x207))/0xb);if(_0x46bccb===_0x27f287)break;else _0x45b106['push'](_0x45b106['shift']());}catch(_0x2d3192){_0x45b106['push'](_0x45b106['shift']());}}}(a42_0x1199,0x81ded));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a42_0x1199(){const _0x229ff8=['skillCode','6071863JATFRo','213981HPHsAN','flatMap','6952464aEFylg','personal','push','company','removed','1qrozju','bool','updated','filter','6QRekwl','\x20personal\x20and\x20','accessKey','66myuapQ','52cGgtyr','reduce','1487910JDSuZq','production','includes','code','690686yEfBDj','trim','write','\x20company\x20Skill(s).','force','../../../skills/runtime-skill-sync.js','version','appCode','action','582665MOtNzp','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','envName','../../../core/api-client.js','7450389AKKgwa','str','Installed\x20','map','created','length'];a42_0x1199=function(){return _0x229ff8;};return a42_0x1199();}import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':'skill','command':'install','description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':a42_0x360b83(0x210),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x21c81a){return syncRuntimeSkills(_0x21c81a);}};async function syncRuntimeSkills(_0x185bf2){const _0x17c717=a42_0x360b83,{downloadRuntimeSkillPackage:_0x586251,listRuntimeSkills:_0x2d30e8}=await import(_0x17c717(0x21a)),{linkEffectiveRuntimeSkills:_0x2edfca,materializeRuntimeSkill:_0x2989ba,pruneStaleRuntimeSkillCache:_0x199317,pruneStaleRuntimeSkillLinks:_0x68329c}=await import(_0x17c717(0x213)),_0xfd3696=_0x185bf2[_0x17c717(0x1f2)](_0x17c717(0x20d)),_0x1424c5=normalizeSyncScopes(_0x185bf2[_0x17c717(0x1f2)]('scope')),_0x1cd7a3=_0x185bf2[_0x17c717(0x219)]??_0x17c717(0x20b),_0x50242d=_0x185bf2[_0x17c717(0x206)],_0xb0f5e=_0x185bf2[_0x17c717(0x201)](_0x17c717(0x212));if(!_0x50242d)throw CliErrors['authRequired'](_0x17c717(0x218));const _0x534bc6=await Promise['all'](_0x1424c5[_0x17c717(0x1f4)](_0x3bbb15=>_0x2d30e8({'appCode':_0x185bf2['appCode'],'scope':_0x3bbb15,'code':_0xfd3696[_0x17c717(0x20f)]()||undefined}))),_0x18c1b6=_0x1424c5[_0x17c717(0x20c)]('personal')?_0x534bc6[_0x17c717(0x1fa)]((_0xe21ca7,_0x3fc726)=>_0x1424c5[_0x3fc726]==='personal'?_0xe21ca7['personal']:[]):[],_0x3399e5=_0x1424c5[_0x17c717(0x20c)]('company')?_0x534bc6[_0x17c717(0x1fa)]((_0x424250,_0x383942)=>_0x1424c5[_0x383942]==='company'?_0x424250[_0x17c717(0x1fe)]:[]):[],_0x13a88c=new Set([..._0x18c1b6[_0x17c717(0x1f4)](_0x51675a=>_0x51675a[_0x17c717(0x1f7)]?.[_0x17c717(0x20f)]())[_0x17c717(0x203)](_0x20065b=>Boolean(_0x20065b)),..._0x3399e5[_0x17c717(0x1f4)](_0x7afb83=>_0x7afb83[_0x17c717(0x1f7)]?.['trim']())[_0x17c717(0x203)](_0x41962d=>Boolean(_0x41962d))]),_0x3cdb00=_0xfd3696[_0x17c717(0x20f)]()?[_0xfd3696[_0x17c717(0x20f)]()]:undefined,_0x52f227=_0x1424c5[_0x17c717(0x1f6)]===0x2&&_0x1424c5[_0x17c717(0x20c)](_0x17c717(0x1fc))&&_0x1424c5[_0x17c717(0x20c)](_0x17c717(0x1fe)),_0x3e2772=_0x52f227?_0x68329c(_0x185bf2[_0x17c717(0x215)],_0x13a88c,{},_0x3cdb00):[],_0x316ef1=_0x199317({'env':_0x1cd7a3,'accessKey':_0x50242d,'appCode':_0x185bf2[_0x17c717(0x215)],'activeSkillCodes':_0x13a88c,'pruneSkillCodes':_0x3cdb00,'scopes':_0x1424c5}),_0x1ef159=[];for(const _0x3ca655 of _0x18c1b6){_0x1ef159[_0x17c717(0x1fd)](_0x2989ba(_0x3ca655,_0x17c717(0x1fc),{'env':_0x1cd7a3,'accessKey':_0x50242d,'appCode':_0x185bf2[_0x17c717(0x215)],'force':_0xb0f5e,'packageBytes':await downloadSkillPackage(_0x3ca655,_0x17c717(0x1fc),_0x185bf2['appCode'],_0x586251)}));}for(const _0x12b762 of _0x3399e5){_0x1ef159[_0x17c717(0x1fd)](_0x2989ba(_0x12b762,'company',{'env':_0x1cd7a3,'accessKey':_0x50242d,'appCode':_0x185bf2[_0x17c717(0x215)],'force':_0xb0f5e,'packageBytes':await downloadSkillPackage(_0x12b762,'company',_0x185bf2[_0x17c717(0x215)],_0x586251)}));}const _0x15d45c=_0x2edfca(_0x1ef159,_0x185bf2['appCode']),_0x530e0b=countLinkActions(_0x15d45c);return{'ok':!![],'data':{'appCode':_0x185bf2[_0x17c717(0x215)],'personal':_0x18c1b6['length'],'company':_0x3399e5[_0x17c717(0x1f6)],'materialized':_0x1ef159['length'],'links':{'total':_0x15d45c[_0x17c717(0x1f6)],'created':_0x530e0b[_0x17c717(0x1f5)]??0x0,'updated':_0x530e0b[_0x17c717(0x202)]??0x0,'unchanged':_0x530e0b['unchanged']??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x3e2772[_0x17c717(0x203)](_0x108574=>_0x108574[_0x17c717(0x216)]===_0x17c717(0x1ff))[_0x17c717(0x1f6)],'cacheDirs':_0x316ef1[_0x17c717(0x203)](_0x489d2a=>_0x489d2a[_0x17c717(0x216)]===_0x17c717(0x1ff))[_0x17c717(0x1f6)],'skipped':[..._0x3e2772,..._0x316ef1][_0x17c717(0x203)](_0x462bd6=>_0x462bd6[_0x17c717(0x216)]==='skipped')[_0x17c717(0x1f6)]},'skills':{'personal':_0x18c1b6[_0x17c717(0x1f4)](summarizeRuntimeSkill),'company':_0x3399e5[_0x17c717(0x1f4)](summarizeRuntimeSkill)}},'message':_0x17c717(0x1f3)+_0x18c1b6[_0x17c717(0x1f6)]+_0x17c717(0x205)+_0x3399e5[_0x17c717(0x1f6)]+_0x17c717(0x211)};}async function downloadSkillPackage(_0x58cba1,_0x2b4b59,_0x4668c0,_0x1757e6){const _0x3b3eaf=a42_0x360b83,_0x1a6cb5=_0x58cba1[_0x3b3eaf(0x214)]?.[_0x3b3eaf(0x20f)]();return _0x1a6cb5?_0x1757e6(_0x2b4b59,_0x58cba1[_0x3b3eaf(0x1f7)],_0x4668c0,_0x1a6cb5):_0x1757e6(_0x2b4b59,_0x58cba1[_0x3b3eaf(0x1f7)],_0x4668c0);}function a42_0x5aa1(_0x66971b,_0x3aecfb){_0x66971b=_0x66971b-0x1f1;const _0x119947=a42_0x1199();let _0x5aa1ad=_0x119947[_0x66971b];return _0x5aa1ad;}function countLinkActions(_0x2159f2){const _0x2c5cc2=a42_0x360b83;return _0x2159f2[_0x2c5cc2(0x209)]((_0x5c86d5,_0x2f9c87)=>{const _0x24161f=_0x2c5cc2;return _0x5c86d5[_0x2f9c87[_0x24161f(0x216)]]=(_0x5c86d5[_0x2f9c87['action']]??0x0)+0x1,_0x5c86d5;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x40bcdc=a43_0x3a5a;(function(_0x2c6a9a,_0x2a7ef6){const _0x534bc0=a43_0x3a5a,_0x294097=_0x2c6a9a();while(!![]){try{const _0x6e1090=-parseInt(_0x534bc0(0x95))/0x1+parseInt(_0x534bc0(0xa4))/0x2+parseInt(_0x534bc0(0x96))/0x3+-parseInt(_0x534bc0(0xa1))/0x4+-parseInt(_0x534bc0(0x92))/0x5*(-parseInt(_0x534bc0(0xab))/0x6)+parseInt(_0x534bc0(0xa0))/0x7+-parseInt(_0x534bc0(0xa2))/0x8;if(_0x6e1090===_0x2a7ef6)break;else _0x294097['push'](_0x294097['shift']());}catch(_0x1829e5){_0x294097['push'](_0x294097['shift']());}}}(a43_0x57f9,0x75b64));import{CliErrors}from'../../../errors.js';function a43_0x3a5a(_0x3b05ad,_0x119506){_0x3b05ad=_0x3b05ad-0x92;const _0x57f9ea=a43_0x57f9();let _0x3a5a7e=_0x57f9ea[_0x3b05ad];return _0x3a5a7e;}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a43_0x57f9(){const _0x3e6921=['trim','envName','\x20local\x20Skill(s).','18594KbHGfa','appCode','filter','bool','../../../skills/runtime-skill-sync.js','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','1425GfwVPo','authRequired','Listed\x20','871789zEkHIN','1072521OFMVtg','skill','personal','accessKey','code','read','str','map','company','local','435946AqIPAy','1400564QRbdNz','4106608CAfsXJ','list','1828808rSoDQr','length','../../../core/api-client.js','scope'];a43_0x57f9=function(){return _0x3e6921;};return a43_0x57f9();}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a43_0x40bcdc(0x97),'command':a43_0x40bcdc(0xa3),'description':a43_0x40bcdc(0xb0),'risk':a43_0x40bcdc(0x9b),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0xa70644){const _0x4cf1aa=a43_0x40bcdc,_0x23cfc6=_0xa70644['str'](_0x4cf1aa(0x9a)),_0x3af299=normalizeListScope(_0xa70644[_0x4cf1aa(0x9c)]('scope'));if(_0xa70644[_0x4cf1aa(0xae)](_0x4cf1aa(0x9f))){const _0x1c25f8=_0xa70644[_0x4cf1aa(0x99)];if(!_0x1c25f8)throw CliErrors[_0x4cf1aa(0x93)]();const {listLocalRuntimeSkills:_0x5842fd}=await import(_0x4cf1aa(0xaf)),_0x51c2b2=_0x5842fd({'env':_0xa70644[_0x4cf1aa(0xa9)]??'production','accessKey':_0x1c25f8,'appCode':_0xa70644[_0x4cf1aa(0xac)],'scopes':listScopeToRuntimeScopes(_0x3af299),'code':_0x23cfc6[_0x4cf1aa(0xa8)]()||undefined}),_0x1318a5=groupLocalRuntimeSkills(_0x51c2b2);return{'ok':!![],'data':{'appCode':_0xa70644[_0x4cf1aa(0xac)],'source':_0x4cf1aa(0x9f),'scope':_0x3af299,'total':_0x51c2b2[_0x4cf1aa(0xa5)],'personal':_0x1318a5[_0x4cf1aa(0x98)]['length'],'company':_0x1318a5[_0x4cf1aa(0x9e)]['length'],'items':_0x51c2b2[_0x4cf1aa(0x9d)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x1318a5['personal'][_0x4cf1aa(0x9d)](summarizeLocalRuntimeSkill),'company':_0x1318a5[_0x4cf1aa(0x9e)][_0x4cf1aa(0x9d)](summarizeLocalRuntimeSkill)}},'message':_0x4cf1aa(0x94)+_0x51c2b2[_0x4cf1aa(0xa5)]+_0x4cf1aa(0xaa)};}const {listRuntimeSkills:_0xb19fdc}=await import(_0x4cf1aa(0xa6)),_0x4a484=await _0xb19fdc({'appCode':_0xa70644['appCode'],'scope':listScopeToRemoteScope(_0x3af299),'code':_0x23cfc6[_0x4cf1aa(0xa8)]()||undefined}),_0x4df548=shouldListScope(_0x3af299,_0x4cf1aa(0x98))?_0x4a484[_0x4cf1aa(0x98)]??[]:[],_0x1a1061=shouldListScope(_0x3af299,'company')?_0x4a484[_0x4cf1aa(0x9e)]??[]:[],_0x514ae7=[..._0x4df548,..._0x1a1061];return{'ok':!![],'data':{'appCode':_0xa70644[_0x4cf1aa(0xac)],'source':'remote','scope':_0x3af299,'total':_0x514ae7[_0x4cf1aa(0xa5)],'personal':_0x4df548[_0x4cf1aa(0xa5)],'company':_0x1a1061[_0x4cf1aa(0xa5)],'items':_0x514ae7[_0x4cf1aa(0x9d)](summarizeRuntimeSkill),'skills':{'personal':_0x4df548[_0x4cf1aa(0x9d)](summarizeRuntimeSkill),'company':_0x1a1061[_0x4cf1aa(0x9d)](summarizeRuntimeSkill)}},'message':_0x4cf1aa(0x94)+_0x514ae7['length']+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x44b5e3){const _0x4ff5c8=a43_0x40bcdc;return{'personal':_0x44b5e3[_0x4ff5c8(0xad)](_0x3ed833=>_0x3ed833[_0x4ff5c8(0xa7)]===_0x4ff5c8(0x98)),'company':_0x44b5e3[_0x4ff5c8(0xad)](_0x5dee3d=>_0x5dee3d[_0x4ff5c8(0xa7)]===_0x4ff5c8(0x9e)),'builtin':_0x44b5e3[_0x4ff5c8(0xad)](_0x37eda7=>_0x37eda7[_0x4ff5c8(0xa7)]==='builtin')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a44_0x2b9a(){const _0xd1f02c=['6147665QagGjJ','1882098AfYKvx','4904644qqkSWT','push','skill','84403HdEOLQ','14000tlGBvG','3jGBchD','5905278EVhdSp','1000DFqeQK','585322uyxGJP'];a44_0x2b9a=function(){return _0xd1f02c;};return a44_0x2b9a();}const a44_0x4c6763=a44_0x5091;(function(_0x359b22,_0x4c1aae){const _0x54c0ef=a44_0x5091,_0x1cd24d=_0x359b22();while(!![]){try{const _0x9b0427=-parseInt(_0x54c0ef(0x1a2))/0x1+parseInt(_0x54c0ef(0x1a7))/0x2*(-parseInt(_0x54c0ef(0x1a4))/0x3)+parseInt(_0x54c0ef(0x1aa))/0x4+-parseInt(_0x54c0ef(0x1a8))/0x5+parseInt(_0x54c0ef(0x1a5))/0x6+-parseInt(_0x54c0ef(0x1a3))/0x7*(-parseInt(_0x54c0ef(0x1a6))/0x8)+-parseInt(_0x54c0ef(0x1a9))/0x9;if(_0x9b0427===_0x4c1aae)break;else _0x1cd24d['push'](_0x1cd24d['shift']());}catch(_0x3d14f6){_0x1cd24d['push'](_0x1cd24d['shift']());}}}(a44_0x2b9a,0x9d62f));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a44_0x5091(_0x574971,_0x41db1f){_0x574971=_0x574971-0x1a1;const _0x2b9a7e=a44_0x2b9a();let _0x5091ef=_0x2b9a7e[_0x574971];return _0x5091ef;}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a44_0x4c6763(0x1a1),'command':a44_0x4c6763(0x1ab),'description':'Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','risk':'write','flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a45_0x46922a=a45_0x18d8;(function(_0x184c4b,_0x2f5537){const _0x204e67=a45_0x18d8,_0x4f1177=_0x184c4b();while(!![]){try{const _0x2e1cf1=parseInt(_0x204e67(0x181))/0x1*(parseInt(_0x204e67(0x17a))/0x2)+-parseInt(_0x204e67(0x17b))/0x3+parseInt(_0x204e67(0x171))/0x4*(-parseInt(_0x204e67(0x17d))/0x5)+parseInt(_0x204e67(0x179))/0x6*(-parseInt(_0x204e67(0x174))/0x7)+parseInt(_0x204e67(0x170))/0x8*(-parseInt(_0x204e67(0x17c))/0x9)+parseInt(_0x204e67(0x17f))/0xa+parseInt(_0x204e67(0x182))/0xb;if(_0x2e1cf1===_0x2f5537)break;else _0x4f1177['push'](_0x4f1177['shift']());}catch(_0x5c4c72){_0x4f1177['push'](_0x4f1177['shift']());}}}(a45_0x2d82,0x6a51c));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a45_0x2d82(){const _0x268ef2=['type','191501tzuJbl','11632555DKWRVx','16JXczGR','12xsvBUh','strict','Skill\x20validation\x20passed.','143136XaAEvN','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','warnings','dir','validate','138MlAecp','4pYuuPZ','1012749aNPVFT','2525787HGYOLQ','711730TxYKfi','str','7911880HstTCG'];a45_0x2d82=function(){return _0x268ef2;};return a45_0x2d82();}function a45_0x18d8(_0x455a87,_0x230528){_0x455a87=_0x455a87-0x170;const _0x2d82dc=a45_0x2d82();let _0x18d82c=_0x2d82dc[_0x455a87];return _0x18d82c;}export const validateCommand={'service':'skill','command':a45_0x46922a(0x178),'description':a45_0x46922a(0x175),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x1a430b){const _0xa3392f=a45_0x46922a,_0x415dff=_0x1a430b['bool'](_0xa3392f(0x172)),_0x54c482=validateSkillDirectory(_0x1a430b[_0xa3392f(0x17e)]('dir'),{'strict':_0x415dff});return throwIfSkillValidationFailed(_0x54c482,_0x415dff),{'ok':!![],'data':{'dir':_0x54c482[_0xa3392f(0x177)],'type':_0x54c482[_0xa3392f(0x180)],'errors':_0x54c482['errors'],'warnings':_0x54c482[_0xa3392f(0x176)]},'message':_0xa3392f(0x173)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x46db84=a46_0x5b17;(function(_0x38bd7e,_0x8f58e4){const _0x6e3a5d=a46_0x5b17,_0x122638=_0x38bd7e();while(!![]){try{const _0x3ee7a9=parseInt(_0x6e3a5d(0x125))/0x1*(-parseInt(_0x6e3a5d(0x130))/0x2)+parseInt(_0x6e3a5d(0x136))/0x3+parseInt(_0x6e3a5d(0x135))/0x4+-parseInt(_0x6e3a5d(0x11d))/0x5*(parseInt(_0x6e3a5d(0x124))/0x6)+-parseInt(_0x6e3a5d(0x132))/0x7+parseInt(_0x6e3a5d(0x12e))/0x8+parseInt(_0x6e3a5d(0x133))/0x9;if(_0x3ee7a9===_0x8f58e4)break;else _0x122638['push'](_0x122638['shift']());}catch(_0x559b8d){_0x122638['push'](_0x122638['shift']());}}}(a46_0x4056,0x86b47));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a46_0x46db84(0x137),'type':'string','description':a46_0x46db84(0x122)};export const SCOPE_FLAG={'name':'scope','type':a46_0x46db84(0x126),'description':a46_0x46db84(0x11c),'enum':[a46_0x46db84(0x12c),a46_0x46db84(0x11a),'company']};export const PUSH_SCOPE_FLAG={'name':a46_0x46db84(0x120),'type':a46_0x46db84(0x126),'description':a46_0x46db84(0x129),'default':a46_0x46db84(0x11a),'enum':[a46_0x46db84(0x11a),a46_0x46db84(0x127)]};export const LIST_SCOPE_FLAG={'name':a46_0x46db84(0x120),'type':a46_0x46db84(0x126),'description':a46_0x46db84(0x12f),'enum':['all',a46_0x46db84(0x11a),a46_0x46db84(0x127)]};export const LOCAL_FLAG={'name':a46_0x46db84(0x121),'type':a46_0x46db84(0x11f),'description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'};export const DIR_FLAG={'name':'dir','type':a46_0x46db84(0x126),'required':!![],'description':a46_0x46db84(0x11e)};export const CREATE_NAME_FLAG={'name':a46_0x46db84(0x12a),'type':a46_0x46db84(0x126),'required':!![],'description':a46_0x46db84(0x12d),'pattern':{'regex':SKILL_NAME_PATTERN,'description':'lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'}};export const TYPE_FLAG={'name':a46_0x46db84(0x11b),'type':a46_0x46db84(0x126),'description':a46_0x46db84(0x12b),'default':a46_0x46db84(0x131),'enum':[...SKILL_TYPES]};function a46_0x5b17(_0x445fba,_0x24ef34){_0x445fba=_0x445fba-0x11a;const _0x405620=a46_0x4056();let _0x5b178a=_0x405620[_0x445fba];return _0x5b178a;}function a46_0x4056(){const _0x17121f=['Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','4550560ElZRSY','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','2syCopB','write','2082577aBYOBk','7227468tYOtOZ','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','241040wZtkld','3038298zZpwih','code','personal','type','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','5ikcdnh','Local\x20Skill\x20directory\x20containing\x20SKILL.md','boolean','scope','local','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','confirm-warnings','3270138oFLWsF','1050613gBEJWC','string','company','strict','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','name','Skill\x20template\x20type','all'];a46_0x4056=function(){return _0x17121f;};return a46_0x4056();}export const TARGET_FLAG={'name':'target','type':'string','description':'Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':'force','type':a46_0x46db84(0x11f),'description':a46_0x46db84(0x134)};export const CONFIRM_WARNINGS_FLAG={'name':a46_0x46db84(0x123),'type':'boolean','description':'Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings'};export const STRICT_FLAG={'name':a46_0x46db84(0x128),'type':a46_0x46db84(0x11f),'description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1bcaf1,_0x1c52ff){const _0x14f100=a47_0x2e1d,_0x5a6ed6=_0x1bcaf1();while(!![]){try{const _0x5e93fc=parseInt(_0x14f100(0x9e))/0x1+-parseInt(_0x14f100(0x9a))/0x2+-parseInt(_0x14f100(0x97))/0x3*(-parseInt(_0x14f100(0x9b))/0x4)+parseInt(_0x14f100(0x9c))/0x5+-parseInt(_0x14f100(0x99))/0x6+-parseInt(_0x14f100(0x98))/0x7*(parseInt(_0x14f100(0x9f))/0x8)+parseInt(_0x14f100(0x9d))/0x9;if(_0x5e93fc===_0x1c52ff)break;else _0x5a6ed6['push'](_0x5a6ed6['shift']());}catch(_0x5bb098){_0x5a6ed6['push'](_0x5a6ed6['shift']());}}}(a47_0x4813,0x94d55));import{createCommand}from'./commands/create.js';function a47_0x2e1d(_0x598c61,_0x18e97e){_0x598c61=_0x598c61-0x97;const _0x481322=a47_0x4813();let _0x2e1db3=_0x481322[_0x598c61];return _0x2e1db3;}import{installCommand}from'./commands/install.js';function a47_0x4813(){const _0x56a67a=['3cACxnC','28VQJrVl','2649690vJQEWN','2352514adBLEp','3216172oiEHRp','3996935taUnzj','2439909IFdaRf','418278ZDXcWk','130632bywOWl'];a47_0x4813=function(){return _0x56a67a;};return a47_0x4813();}import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a48_0x157c(){var _0x3ca5fe=['483120EENlic','isArray','3168178GWZAUm','some','files','42088VVvuEH','ossPath','2265930iPvMBv','SKILL.md','100mjlECp','length','2555nAuPDS','1lfIkkd','370768ummtWW','30546000KmQTeX','object','2879712zxvXaK'];a48_0x157c=function(){return _0x3ca5fe;};return a48_0x157c();}(function(_0x372dc5,_0x40c7c7){var _0x1c6cd0=a48_0x1780,_0x14d95c=_0x372dc5();while(!![]){try{var _0x17c757=-parseInt(_0x1c6cd0(0x1f3))/0x1*(-parseInt(_0x1c6cd0(0x1fa))/0x2)+parseInt(_0x1c6cd0(0x1f8))/0x3+parseInt(_0x1c6cd0(0x1f4))/0x4*(-parseInt(_0x1c6cd0(0x201))/0x5)+-parseInt(_0x1c6cd0(0x1ff))/0x6+-parseInt(_0x1c6cd0(0x1f2))/0x7*(parseInt(_0x1c6cd0(0x1fd))/0x8)+parseInt(_0x1c6cd0(0x1f7))/0x9+parseInt(_0x1c6cd0(0x1f5))/0xa;if(_0x17c757===_0x40c7c7)break;else _0x14d95c['push'](_0x14d95c['shift']());}catch(_0x32f706){_0x14d95c['push'](_0x14d95c['shift']());}}}(a48_0x157c,0xec501));export function isPackageBackedManifest(_0x767deb){var _0x585e90=a48_0x1780;return!!_0x767deb&&typeof _0x767deb==='object'&&!Array['isArray'](_0x767deb)&&typeof _0x767deb[_0x585e90(0x1fe)]==='string'&&_0x767deb['ossPath'][_0x585e90(0x202)]>0x0&&Array[_0x585e90(0x1f9)](_0x767deb[_0x585e90(0x1fc)]);}function a48_0x1780(_0x509a42,_0x5da796){_0x509a42=_0x509a42-0x1f2;var _0x157cac=a48_0x157c();var _0x17808e=_0x157cac[_0x509a42];return _0x17808e;}export function isMultiFileManifest(_0x38b1da){var _0x1a5174=a48_0x1780;return!!_0x38b1da&&typeof _0x38b1da===_0x1a5174(0x1f6)&&!Array[_0x1a5174(0x1f9)](_0x38b1da)&&Array[_0x1a5174(0x1f9)](_0x38b1da[_0x1a5174(0x1fc)])&&_0x38b1da[_0x1a5174(0x1fc)][_0x1a5174(0x1fb)](_0x1a4e91=>_0x1a4e91['path']!==_0x1a5174(0x200));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1266c2,_0x5ea555){const _0x546085=a50_0x97fd,_0xd0510c=_0x1266c2();while(!![]){try{const _0x841768=parseInt(_0x546085(0x164))/0x1+parseInt(_0x546085(0x162))/0x2*(-parseInt(_0x546085(0x168))/0x3)+parseInt(_0x546085(0x13e))/0x4*(parseInt(_0x546085(0x150))/0x5)+-parseInt(_0x546085(0x139))/0x6*(parseInt(_0x546085(0x14f))/0x7)+parseInt(_0x546085(0x155))/0x8+-parseInt(_0x546085(0x170))/0x9*(parseInt(_0x546085(0x16f))/0xa)+-parseInt(_0x546085(0x171))/0xb*(-parseInt(_0x546085(0x15a))/0xc);if(_0x841768===_0x5ea555)break;else _0xd0510c['push'](_0xd0510c['shift']());}catch(_0x57e2f0){_0xd0510c['push'](_0xd0510c['shift']());}}}(a50_0x457e,0xec5dc));function a50_0x97fd(_0x35e2ec,_0x27ec19){_0x35e2ec=_0x35e2ec-0x134;const _0x457e29=a50_0x457e();let _0x97fd88=_0x457e29[_0x35e2ec];return _0x97fd88;}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,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';function a50_0x457e(){const _0x4b8185=['(unknown)','scope','valid','appCode','5126556MDwSbu','str','input','unknown','dir','\x20for\x20review','/api/cli/v1/skills/','personal','2kqMRWl','existing','611067PdeKVH','PRIVATE','Submitted\x20company\x20Skill\x20','Personal','2173398KqoPYi','\x20has\x20scope=\x22','remoteForPreflight','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','company','skillCode','warnings','1560LzAllr','85014HlidVk','11BEemsf','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','frontmatterDisplayName','status','trim','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','payload','6xoqgtN','resolvedVersion','files','POST','metadata','652uRnhFs','validation','identical','submitted','errors','\x20version\x20','\x20Skill\x20','Company','version','/publish/validate','bool','../../skills/runtime-skill-sync.js','appcode','Updated\x20personal\x20Skill\x20','../../core/api-client.js','publishInput','savedSkill','2279998OOGXlr','37555aknJsU','NAMESPACE_ONLY','accessKey','authRequired','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','9834712IlYDBX'];a50_0x457e=function(){return _0x4b8185;};return a50_0x457e();}import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x2884b8){const _0x514abc=a50_0x97fd,{getRuntimeSkillByCode:_0x18499f,validateRuntimeSkillPublish:_0x5e2734}=await import(_0x514abc(0x14c)),{readPushDirectory:_0x43634e,resolvePushDirectoryIdentity:_0x3937f8}=await import('../../skills/runtime-skill-sync.js');if(!_0x2884b8[_0x514abc(0x152)])throw CliErrors[_0x514abc(0x153)]();const _0x2f7ebf=resolvePushScope(_0x2884b8),_0x53088e=validateSkillDirectory(_0x2884b8[_0x514abc(0x15b)](_0x514abc(0x15e)));throwIfSkillValidationFailed(_0x53088e);const _0x30f75d=_0x3937f8(_0x53088e[_0x514abc(0x15e)],_0x2884b8[_0x514abc(0x159)],remoteFirstMetadataOptions()),_0x3aaea4=await _0x18499f(_0x2884b8[_0x514abc(0x159)],_0x30f75d[_0x514abc(0x16d)]);throwIfBuiltinPushTarget(_0x3aaea4);if(_0x2f7ebf===_0x514abc(0x16c)){const _0x56f05a=_0x43634e(_0x53088e[_0x514abc(0x15e)],_0x2884b8['appCode'],remoteMissingCompanyReadOptions()),_0x4ed88a=await _0x5e2734(_0x2884b8[_0x514abc(0x159)],_0x56f05a[_0x514abc(0x15c)],{'visibility':_0x514abc(0x151)});return{'method':_0x514abc(0x13c),'url':_0x514abc(0x160)+_0x2884b8[_0x514abc(0x159)]+_0x514abc(0x147),'body':{'skillCode':_0x56f05a[_0x514abc(0x16d)],'visibility':'NAMESPACE_ONLY','valid':_0x4ed88a[_0x514abc(0x158)],'errors':_0x4ed88a[_0x514abc(0x142)],'warnings':_0x4ed88a[_0x514abc(0x16e)],'resolvedSlug':_0x4ed88a['resolvedSlug'],'resolvedVersion':_0x4ed88a[_0x514abc(0x13a)]},'description':_0x514abc(0x137)};}if(_0x3aaea4&&_0x3aaea4[_0x514abc(0x157)]!==_0x514abc(0x161))throw CliErrors[_0x514abc(0x13f)](_0x514abc(0x16b)+_0x30f75d[_0x514abc(0x16d)]+_0x514abc(0x169)+(_0x3aaea4['scope']??_0x514abc(0x15d))+'\x22.');const _0x365a18=_0x43634e(_0x53088e[_0x514abc(0x15e)],_0x2884b8[_0x514abc(0x159)],_0x3aaea4?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x1ed825=await _0x5e2734(_0x2884b8[_0x514abc(0x159)],_0x365a18['input'],{'visibility':_0x514abc(0x165)});return{'method':_0x514abc(0x13c),'url':_0x514abc(0x160)+_0x2884b8[_0x514abc(0x159)]+_0x514abc(0x147),'body':{'skillCode':_0x365a18[_0x514abc(0x16d)],'visibility':_0x514abc(0x165),'valid':_0x1ed825['valid'],'errors':_0x1ed825['errors'],'warnings':_0x1ed825[_0x514abc(0x16e)],'resolvedSlug':_0x1ed825['resolvedSlug'],'resolvedVersion':_0x1ed825[_0x514abc(0x13a)]},'description':_0x514abc(0x154)};}export async function skillPushExecute(_0x45ced5){const _0x58fecd=a50_0x97fd,{createPersonalRuntimeSkill:_0x23978a,downloadRuntimeSkillPackage:_0x2c3e28,getRuntimeSkillByCode:_0x1e0445,publishCompanyRuntimeSkill:_0x5a8b6c,updatePersonalRuntimeSkill:_0x47c71b,validateRuntimeSkillPublish:_0x281028}=await import(_0x58fecd(0x14c)),{verifyRuntimeSkillPackage:_0x35f08a,verifyRuntimeSkillBundle:_0x5da668,readPushDirectory:_0x3276c1,refreshPushDirectoryMetadataFromRemote:_0x427dbd,recordPushedRuntimeSkill:_0x310013,resolvePushDirectoryIdentity:_0x40e105}=await import(_0x58fecd(0x149));if(!_0x45ced5[_0x58fecd(0x152)])throw CliErrors['authRequired']();const _0x410ce6=resolvePushScope(_0x45ced5),_0xd15819=_0x45ced5['bool']('confirm-warnings')||_0x45ced5[_0x58fecd(0x148)]('confirmWarnings'),_0x197080=validateSkillDirectory(_0x45ced5['str'](_0x58fecd(0x15e)));throwIfSkillValidationFailed(_0x197080);const _0x22fe81=_0x197080[_0x58fecd(0x15e)];let _0x57db58;if(_0x410ce6===_0x58fecd(0x16c)){const _0x113eea=_0x40e105(_0x22fe81,_0x45ced5[_0x58fecd(0x159)],remoteFirstMetadataOptions()),_0x44b96c=await _0x1e0445(_0x45ced5[_0x58fecd(0x159)],_0x113eea[_0x58fecd(0x16d)]);throwIfBuiltinPushTarget(_0x44b96c);if(_0x44b96c)_0x427dbd(_0x22fe81,_0x44b96c,_0x45ced5[_0x58fecd(0x159)]);const _0x2dc463=_0x3276c1(_0x22fe81,_0x45ced5[_0x58fecd(0x159)],_0x44b96c?{'targetScope':_0x58fecd(0x16c),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x57db58={'scope':_0x58fecd(0x16c),'payload':_0x2dc463,'publishInput':_0x2dc463['input'],'remoteForPreflight':_0x44b96c,'warnings':[]};}else{const _0x55272e=_0x45ced5[_0x58fecd(0x15b)](_0x58fecd(0x14a))[_0x58fecd(0x136)](),_0x3060c3=Boolean(_0x55272e),_0x3b7619=allowRetargetArgs(_0x3060c3),_0x1d60bc=_0x40e105(_0x22fe81,_0x45ced5[_0x58fecd(0x159)],{...remoteFirstMetadataOptions(),..._0x3b7619[0x0]}),_0x3f0dda=await _0x1e0445(_0x45ced5['appCode'],_0x1d60bc[_0x58fecd(0x16d)]);throwIfBuiltinPushTarget(_0x3f0dda);if(_0x3f0dda){if(_0x3f0dda[_0x58fecd(0x157)]!==_0x58fecd(0x161)){if(_0x3060c3)throw CliErrors['validation'](_0x58fecd(0x16b)+_0x1d60bc[_0x58fecd(0x16d)]+'\x20has\x20scope=\x22'+(_0x3f0dda[_0x58fecd(0x157)]??'unknown')+'\x22.');_0x427dbd(_0x22fe81,_0x3f0dda,_0x45ced5[_0x58fecd(0x159)]);}else!_0x3060c3&&_0x427dbd(_0x22fe81,_0x3f0dda,_0x45ced5[_0x58fecd(0x159)]);}const _0x3f95bf=_0x3276c1(_0x22fe81,_0x45ced5[_0x58fecd(0x159)],_0x3f0dda?remotePersonalReadOptions(_0x3060c3,_0x3b7619[0x0]):remoteMissingPersonalReadOptions(_0x3b7619[0x0])),_0x201811=_0x3f0dda?.[_0x58fecd(0x157)]===_0x58fecd(0x161)&&_0x3f0dda['skillCode']===_0x3f95bf['skillCode']?_0x3f0dda:undefined,_0x35750c=_0x3060c3&&_0x201811?withRetargetExistingMetadata(_0x3f95bf[_0x58fecd(0x15c)],_0x201811,{'preferInputSkillName':Boolean(_0x3f95bf[_0x58fecd(0x134)])}):_0x3f95bf['input'],_0x59a0ad=_0x3060c3?buildRetargetWarning(_0x1d60bc[_0x58fecd(0x13d)],_0x45ced5[_0x58fecd(0x159)]):[];_0x57db58={'scope':_0x58fecd(0x161),'payload':_0x3f95bf,'publishInput':_0x35750c,'remoteForPreflight':_0x201811,'existing':_0x201811,'warnings':[..._0x197080['warnings'],..._0x59a0ad]};}const _0x59609a=await runRemoteContentPreflight({'scope':_0x57db58['scope'],'remote':_0x57db58[_0x58fecd(0x16a)],'publishInput':_0x57db58[_0x58fecd(0x14d)],'skillCode':_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)],'appCode':_0x45ced5[_0x58fecd(0x159)],'downloadRuntimeSkillPackage':_0x2c3e28,'verifyRuntimeSkillBundle':_0x5da668});if(_0x59609a[_0x58fecd(0x135)]===_0x58fecd(0x140))return _0x57db58['scope']==='company'?_0x310013(_0x22fe81,_0x59609a[_0x58fecd(0x14e)],_0x45ced5['appCode'],{'scope':_0x58fecd(0x16c)}):_0x310013(_0x22fe81,_0x59609a[_0x58fecd(0x14e)],_0x45ced5[_0x58fecd(0x159)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x59609a[_0x58fecd(0x14e)]),'scope':_0x57db58['scope'],..._0x57db58[_0x58fecd(0x157)]===_0x58fecd(0x161)?{'warnings':_0x57db58['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x57db58[_0x58fecd(0x157)])+_0x58fecd(0x144)+_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)]+_0x58fecd(0x172)};if(_0x57db58[_0x58fecd(0x157)]==='company'){const _0x5c17b9=await _0x281028(_0x45ced5['appCode'],_0x57db58[_0x58fecd(0x14d)],{'visibility':_0x58fecd(0x151)});throwIfPublishValidationFailed('company',_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)],_0x5c17b9),throwIfUnconfirmedPublishWarnings(_0x58fecd(0x16c),_0x57db58['payload'][_0x58fecd(0x16d)],_0x5c17b9[_0x58fecd(0x16e)],_0xd15819);const _0x48bc5b=await _0x5a8b6c(_0x45ced5[_0x58fecd(0x159)],_0x57db58[_0x58fecd(0x14d)],{'confirmWarnings':_0xd15819});return _0x310013(_0x22fe81,{..._0x48bc5b,'files':_0x57db58['publishInput'][_0x58fecd(0x13b)]},_0x45ced5[_0x58fecd(0x159)],{'scope':_0x58fecd(0x16c)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x48bc5b),'scope':_0x58fecd(0x16c),'reviewState':_0x58fecd(0x141),'submittedForReview':!![],'validation':{'warnings':_0x5c17b9[_0x58fecd(0x16e)]}},'message':_0x58fecd(0x166)+_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)]+_0x58fecd(0x143)+(_0x48bc5b[_0x58fecd(0x146)]??_0x58fecd(0x156))+_0x58fecd(0x15f)};}const _0x3b2c7a=await _0x281028(_0x45ced5[_0x58fecd(0x159)],_0x57db58[_0x58fecd(0x14d)],{'visibility':_0x58fecd(0x165)});throwIfPublishValidationFailed('personal',_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)],_0x3b2c7a),throwIfUnconfirmedPublishWarnings(_0x58fecd(0x161),_0x57db58['payload']['skillCode'],_0x3b2c7a['warnings'],_0xd15819);const _0x45a6cf={'confirmWarnings':_0xd15819},_0x4a3052=_0x57db58[_0x58fecd(0x163)]?await _0x47c71b(_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)],_0x45ced5[_0x58fecd(0x159)],_0x57db58[_0x58fecd(0x14d)],_0x45a6cf):await _0x23978a(_0x45ced5['appCode'],_0x57db58[_0x58fecd(0x14d)],_0x45a6cf);let _0x2db28a=_0x4a3052;if(isMultiFileManifest(_0x57db58[_0x58fecd(0x14d)][_0x58fecd(0x13b)])){const _0x322c95=await _0x2c3e28('personal',_0x4a3052[_0x58fecd(0x16d)]||_0x57db58['payload'][_0x58fecd(0x16d)],_0x45ced5[_0x58fecd(0x159)]);_0x5da668(_0x57db58[_0x58fecd(0x14d)][_0x58fecd(0x13b)],_0x322c95),_0x2db28a={..._0x4a3052,'files':_0x57db58['publishInput'][_0x58fecd(0x13b)]};}else{if(isPackageBackedManifest(_0x4a3052[_0x58fecd(0x13b)])){const _0x1cdf9c=await _0x2c3e28(_0x58fecd(0x161),_0x4a3052[_0x58fecd(0x16d)]||_0x57db58[_0x58fecd(0x138)]['skillCode'],_0x45ced5[_0x58fecd(0x159)]);_0x35f08a(_0x4a3052[_0x58fecd(0x13b)],_0x1cdf9c);}}return _0x310013(_0x22fe81,_0x2db28a,_0x45ced5[_0x58fecd(0x159)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4a3052),'warnings':_0x57db58[_0x58fecd(0x16e)],'validation':{'warnings':_0x3b2c7a[_0x58fecd(0x16e)]}},'message':_0x57db58[_0x58fecd(0x163)]?_0x58fecd(0x14b)+_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)]:'Created\x20personal\x20Skill\x20'+_0x57db58[_0x58fecd(0x138)][_0x58fecd(0x16d)]};}function scopeLabel(_0x144f1a){const _0x390746=a50_0x97fd;return _0x144f1a===_0x390746(0x16c)?_0x390746(0x145):_0x390746(0x167);}
|
|
1
|
+
(function(_0x494391,_0x375744){const _0x47496a=a49_0x36df,_0x17680d=_0x494391();while(!![]){try{const _0x12ad42=-parseInt(_0x47496a(0x153))/0x1*(-parseInt(_0x47496a(0x14e))/0x2)+parseInt(_0x47496a(0x142))/0x3+-parseInt(_0x47496a(0x120))/0x4+parseInt(_0x47496a(0x13f))/0x5*(-parseInt(_0x47496a(0x14f))/0x6)+-parseInt(_0x47496a(0x156))/0x7+parseInt(_0x47496a(0x150))/0x8+parseInt(_0x47496a(0x122))/0x9;if(_0x12ad42===_0x375744)break;else _0x17680d['push'](_0x17680d['shift']());}catch(_0x33c8ca){_0x17680d['push'](_0x17680d['shift']());}}}(a49_0x9a63,0xa0e9b));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,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';function a49_0x9a63(){const _0x28798a=['Submitted\x20company\x20Skill\x20','48385CtZsVn','submitted','../../skills/runtime-skill-sync.js','2655078lIEPWz','input','files','validation','POST','/publish/validate','valid','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','skillCode','appcode','trim','Updated\x20personal\x20Skill\x20','34OwzCvp','636OLNyBq','416424YhTEQl','errors','dir','23362pmfkld','../../core/api-client.js','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','329476RUEZdS','accessKey','Created\x20personal\x20Skill\x20','2494756gUJFje','/api/cli/v1/skills/','9192465XEOwof','metadata','savedSkill','appCode','warnings','\x20version\x20','str','confirmWarnings','scope','company','status','publishInput','payload','version','unknown','Personal','authRequired','PRIVATE','bool','resolvedSlug','\x20for\x20review','personal','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','confirm-warnings','\x20has\x20scope=\x22','Company','NAMESPACE_ONLY','\x20Skill\x20'];a49_0x9a63=function(){return _0x28798a;};return a49_0x9a63();}import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x447980){const _0x102342=a49_0x36df,{getRuntimeSkillByCode:_0xcf129e,validateRuntimeSkillPublish:_0x3ce043}=await import(_0x102342(0x154)),{readPushDirectory:_0x38fd26,resolvePushDirectoryIdentity:_0x2a9cbf}=await import(_0x102342(0x141));if(!_0x447980[_0x102342(0x11e)])throw CliErrors['authRequired']();const _0x10c7e8=resolvePushScope(_0x447980),_0x19cc52=validateSkillDirectory(_0x447980[_0x102342(0x128)](_0x102342(0x152)));throwIfSkillValidationFailed(_0x19cc52);const _0x49c473=_0x2a9cbf(_0x19cc52['dir'],_0x447980['appCode'],remoteFirstMetadataOptions()),_0x189ad6=await _0xcf129e(_0x447980[_0x102342(0x125)],_0x49c473[_0x102342(0x14a)]);throwIfBuiltinPushTarget(_0x189ad6);if(_0x10c7e8===_0x102342(0x12b)){const _0x13a3cb=_0x38fd26(_0x19cc52[_0x102342(0x152)],_0x447980[_0x102342(0x125)],remoteMissingCompanyReadOptions()),_0x4f5aa2=await _0x3ce043(_0x447980['appCode'],_0x13a3cb[_0x102342(0x143)],{'visibility':_0x102342(0x13c)});return{'method':_0x102342(0x146),'url':'/api/cli/v1/skills/'+_0x447980[_0x102342(0x125)]+_0x102342(0x147),'body':{'skillCode':_0x13a3cb['skillCode'],'visibility':_0x102342(0x13c),'valid':_0x4f5aa2['valid'],'errors':_0x4f5aa2[_0x102342(0x151)],'warnings':_0x4f5aa2[_0x102342(0x126)],'resolvedSlug':_0x4f5aa2[_0x102342(0x135)],'resolvedVersion':_0x4f5aa2['resolvedVersion']},'description':_0x102342(0x149)};}if(_0x189ad6&&_0x189ad6[_0x102342(0x12a)]!==_0x102342(0x137))throw CliErrors[_0x102342(0x145)](_0x102342(0x155)+_0x49c473[_0x102342(0x14a)]+_0x102342(0x13a)+(_0x189ad6[_0x102342(0x12a)]??'unknown')+'\x22.');const _0x2d21ac=_0x38fd26(_0x19cc52['dir'],_0x447980[_0x102342(0x125)],_0x189ad6?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x1bf524=await _0x3ce043(_0x447980[_0x102342(0x125)],_0x2d21ac[_0x102342(0x143)],{'visibility':_0x102342(0x133)});return{'method':_0x102342(0x146),'url':_0x102342(0x121)+_0x447980[_0x102342(0x125)]+_0x102342(0x147),'body':{'skillCode':_0x2d21ac[_0x102342(0x14a)],'visibility':_0x102342(0x133),'valid':_0x1bf524[_0x102342(0x148)],'errors':_0x1bf524[_0x102342(0x151)],'warnings':_0x1bf524[_0x102342(0x126)],'resolvedSlug':_0x1bf524['resolvedSlug'],'resolvedVersion':_0x1bf524['resolvedVersion']},'description':_0x102342(0x138)};}function a49_0x36df(_0x406a7e,_0x421267){_0x406a7e=_0x406a7e-0x11e;const _0x9a63c0=a49_0x9a63();let _0x36dfb3=_0x9a63c0[_0x406a7e];return _0x36dfb3;}export async function skillPushExecute(_0x1dc314){const _0x10f012=a49_0x36df,{createPersonalRuntimeSkill:_0x557d24,downloadRuntimeSkillPackage:_0x3e4077,getRuntimeSkillByCode:_0x41fedd,publishCompanyRuntimeSkill:_0x1a7107,updatePersonalRuntimeSkill:_0x304eb1,validateRuntimeSkillPublish:_0x54cf93}=await import(_0x10f012(0x154)),{verifyRuntimeSkillPackage:_0x51965c,verifyRuntimeSkillBundle:_0x22715c,readPushDirectory:_0x8ef77,refreshPushDirectoryMetadataFromRemote:_0x4d9fbe,recordPushedRuntimeSkill:_0x4bddde,resolvePushDirectoryIdentity:_0x483b51}=await import(_0x10f012(0x141));if(!_0x1dc314['accessKey'])throw CliErrors[_0x10f012(0x132)]();const _0x572e17=resolvePushScope(_0x1dc314),_0xc2e828=_0x1dc314[_0x10f012(0x134)](_0x10f012(0x139))||_0x1dc314[_0x10f012(0x134)](_0x10f012(0x129)),_0x24d1ed=validateSkillDirectory(_0x1dc314[_0x10f012(0x128)]('dir'));throwIfSkillValidationFailed(_0x24d1ed);const _0x1b5c24=_0x24d1ed[_0x10f012(0x152)];let _0x48847e;if(_0x572e17===_0x10f012(0x12b)){const _0x37e8d7=_0x483b51(_0x1b5c24,_0x1dc314['appCode'],remoteFirstMetadataOptions()),_0x466e97=await _0x41fedd(_0x1dc314[_0x10f012(0x125)],_0x37e8d7[_0x10f012(0x14a)]);throwIfBuiltinPushTarget(_0x466e97);if(_0x466e97)_0x4d9fbe(_0x1b5c24,_0x466e97,_0x1dc314['appCode']);const _0x2b4070=_0x8ef77(_0x1b5c24,_0x1dc314['appCode'],_0x466e97?{'targetScope':_0x10f012(0x12b),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x48847e={'scope':'company','payload':_0x2b4070,'publishInput':_0x2b4070['input'],'remoteForPreflight':_0x466e97,'warnings':[]};}else{const _0x1c93cc=_0x1dc314[_0x10f012(0x128)](_0x10f012(0x14b))[_0x10f012(0x14c)](),_0x3413df=Boolean(_0x1c93cc),_0x62144a=allowRetargetArgs(_0x3413df),_0x19f901=_0x483b51(_0x1b5c24,_0x1dc314[_0x10f012(0x125)],{...remoteFirstMetadataOptions(),..._0x62144a[0x0]}),_0x31eeab=await _0x41fedd(_0x1dc314[_0x10f012(0x125)],_0x19f901[_0x10f012(0x14a)]);throwIfBuiltinPushTarget(_0x31eeab);if(_0x31eeab){if(_0x31eeab[_0x10f012(0x12a)]!==_0x10f012(0x137)){if(_0x3413df)throw CliErrors['validation'](_0x10f012(0x155)+_0x19f901[_0x10f012(0x14a)]+_0x10f012(0x13a)+(_0x31eeab['scope']??_0x10f012(0x130))+'\x22.');_0x4d9fbe(_0x1b5c24,_0x31eeab,_0x1dc314['appCode']);}else!_0x3413df&&_0x4d9fbe(_0x1b5c24,_0x31eeab,_0x1dc314[_0x10f012(0x125)]);}const _0x58c85d=_0x8ef77(_0x1b5c24,_0x1dc314[_0x10f012(0x125)],_0x31eeab?remotePersonalReadOptions(_0x3413df,_0x62144a[0x0]):remoteMissingPersonalReadOptions(_0x62144a[0x0])),_0xdc56b2=_0x31eeab?.[_0x10f012(0x12a)]===_0x10f012(0x137)&&_0x31eeab[_0x10f012(0x14a)]===_0x58c85d[_0x10f012(0x14a)]?_0x31eeab:undefined,_0x1809e8=_0x3413df&&_0xdc56b2?withRetargetExistingMetadata(_0x58c85d[_0x10f012(0x143)],_0xdc56b2,{'preferInputSkillName':Boolean(_0x58c85d['frontmatterDisplayName'])}):_0x58c85d['input'],_0x581473=_0x3413df?buildRetargetWarning(_0x19f901[_0x10f012(0x123)],_0x1dc314[_0x10f012(0x125)]):[];_0x48847e={'scope':_0x10f012(0x137),'payload':_0x58c85d,'publishInput':_0x1809e8,'remoteForPreflight':_0xdc56b2,'existing':_0xdc56b2,'warnings':[..._0x24d1ed[_0x10f012(0x126)],..._0x581473]};}const _0x1657c9=await runRemoteContentPreflight({'scope':_0x48847e[_0x10f012(0x12a)],'remote':_0x48847e['remoteForPreflight'],'publishInput':_0x48847e[_0x10f012(0x12d)],'skillCode':_0x48847e[_0x10f012(0x12e)]['skillCode'],'appCode':_0x1dc314['appCode'],'downloadRuntimeSkillPackage':_0x3e4077,'verifyRuntimeSkillBundle':_0x22715c});if(_0x1657c9[_0x10f012(0x12c)]==='identical')return _0x48847e[_0x10f012(0x12a)]===_0x10f012(0x12b)?_0x4bddde(_0x1b5c24,_0x1657c9[_0x10f012(0x124)],_0x1dc314['appCode'],{'scope':_0x10f012(0x12b)}):_0x4bddde(_0x1b5c24,_0x1657c9[_0x10f012(0x124)],_0x1dc314[_0x10f012(0x125)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1657c9[_0x10f012(0x124)]),'scope':_0x48847e[_0x10f012(0x12a)],..._0x48847e[_0x10f012(0x12a)]===_0x10f012(0x137)?{'warnings':_0x48847e[_0x10f012(0x126)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x48847e[_0x10f012(0x12a)])+_0x10f012(0x13d)+_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x48847e[_0x10f012(0x12a)]===_0x10f012(0x12b)){const _0x491ea8=await _0x54cf93(_0x1dc314['appCode'],_0x48847e[_0x10f012(0x12d)],{'visibility':_0x10f012(0x13c)});throwIfPublishValidationFailed('company',_0x48847e['payload'][_0x10f012(0x14a)],_0x491ea8),throwIfUnconfirmedPublishWarnings(_0x10f012(0x12b),_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)],_0x491ea8[_0x10f012(0x126)],_0xc2e828);const _0x5803fa=await _0x1a7107(_0x1dc314['appCode'],_0x48847e[_0x10f012(0x12d)],{'confirmWarnings':_0xc2e828});return _0x4bddde(_0x1b5c24,{..._0x5803fa,'files':_0x48847e['publishInput']['files']},_0x1dc314[_0x10f012(0x125)],{'scope':_0x10f012(0x12b)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5803fa),'scope':'company','reviewState':_0x10f012(0x140),'submittedForReview':!![],'validation':{'warnings':_0x491ea8['warnings']}},'message':_0x10f012(0x13e)+_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)]+_0x10f012(0x127)+(_0x5803fa[_0x10f012(0x12f)]??'(unknown)')+_0x10f012(0x136)};}const _0x459b16=await _0x54cf93(_0x1dc314['appCode'],_0x48847e['publishInput'],{'visibility':_0x10f012(0x133)});throwIfPublishValidationFailed(_0x10f012(0x137),_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)],_0x459b16),throwIfUnconfirmedPublishWarnings(_0x10f012(0x137),_0x48847e['payload'][_0x10f012(0x14a)],_0x459b16[_0x10f012(0x126)],_0xc2e828);const _0xeeb2b={'confirmWarnings':_0xc2e828},_0x99fd74=_0x48847e['existing']?await _0x304eb1(_0x48847e[_0x10f012(0x12e)]['skillCode'],_0x1dc314[_0x10f012(0x125)],_0x48847e[_0x10f012(0x12d)],_0xeeb2b):await _0x557d24(_0x1dc314[_0x10f012(0x125)],_0x48847e['publishInput'],_0xeeb2b);let _0x4ab503=_0x99fd74;if(isMultiFileManifest(_0x48847e['publishInput'][_0x10f012(0x144)])){const _0x4a4cda=await _0x3e4077('personal',_0x99fd74[_0x10f012(0x14a)]||_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)],_0x1dc314[_0x10f012(0x125)]);_0x22715c(_0x48847e[_0x10f012(0x12d)]['files'],_0x4a4cda),_0x4ab503={..._0x99fd74,'files':_0x48847e[_0x10f012(0x12d)][_0x10f012(0x144)]};}else{if(isPackageBackedManifest(_0x99fd74[_0x10f012(0x144)])){const _0x367314=await _0x3e4077(_0x10f012(0x137),_0x99fd74[_0x10f012(0x14a)]||_0x48847e['payload'][_0x10f012(0x14a)],_0x1dc314[_0x10f012(0x125)]);_0x51965c(_0x99fd74[_0x10f012(0x144)],_0x367314);}}return _0x4bddde(_0x1b5c24,_0x4ab503,_0x1dc314[_0x10f012(0x125)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x99fd74),'warnings':_0x48847e[_0x10f012(0x126)],'validation':{'warnings':_0x459b16[_0x10f012(0x126)]}},'message':_0x48847e['existing']?_0x10f012(0x14d)+_0x48847e[_0x10f012(0x12e)][_0x10f012(0x14a)]:_0x10f012(0x11f)+_0x48847e['payload'][_0x10f012(0x14a)]};}function scopeLabel(_0x500387){const _0x51781e=a49_0x36df;return _0x500387===_0x51781e(0x12b)?_0x51781e(0x13b):_0x51781e(0x131);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5912d5,_0x3137e6){const _0x10c1b3=a50_0x1049,_0x434ce8=_0x5912d5();while(!![]){try{const _0x73e9ff=-parseInt(_0x10c1b3(0x144))/0x1*(-parseInt(_0x10c1b3(0x159))/0x2)+parseInt(_0x10c1b3(0x141))/0x3*(parseInt(_0x10c1b3(0x164))/0x4)+-parseInt(_0x10c1b3(0x15b))/0x5*(-parseInt(_0x10c1b3(0x14a))/0x6)+-parseInt(_0x10c1b3(0x160))/0x7*(parseInt(_0x10c1b3(0x15f))/0x8)+parseInt(_0x10c1b3(0x15a))/0x9*(parseInt(_0x10c1b3(0x14b))/0xa)+parseInt(_0x10c1b3(0x15e))/0xb*(-parseInt(_0x10c1b3(0x169))/0xc)+parseInt(_0x10c1b3(0x155))/0xd*(parseInt(_0x10c1b3(0x142))/0xe);if(_0x73e9ff===_0x3137e6)break;else _0x434ce8['push'](_0x434ce8['shift']());}catch(_0x5c68f1){_0x434ce8['push'](_0x434ce8['shift']());}}}(a50_0x38fe,0x34d36));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x5efc23){const _0x3fb71d=a50_0x1049,_0x500928=_0x5efc23['str']('scope')||'personal';if(_0x500928===_0x3fb71d(0x14f)||_0x500928===_0x3fb71d(0x140))return _0x500928;throw CliErrors[_0x3fb71d(0x151)]('skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22'+_0x500928+'\x22.');}export function allowRetargetArgs(_0x852f0a){return _0x852f0a?[{'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(_0x38c298={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x38c298};}export function remotePersonalReadOptions(_0x805914,_0x2de14e={}){return{'ignoreInvalidMetadata':!![],..._0x805914?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x2de14e};}export function throwIfBuiltinPushTarget(_0x50e171){const _0x27864a=a50_0x1049;if(_0x50e171?.[_0x27864a(0x163)]!==_0x27864a(0x143))return;throw CliErrors[_0x27864a(0x151)](_0x27864a(0x150)+(_0x50e171[_0x27864a(0x13f)]??_0x27864a(0x13d))+_0x27864a(0x158),'Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.');}export function throwIfPublishValidationFailed(_0x4d4383,_0x5991db,_0x5e702a){const _0x424d2e=a50_0x1049;if(_0x5e702a[_0x424d2e(0x15d)][_0x424d2e(0x14d)]===0x0&&(_0x5e702a['valid']||_0x5e702a['warnings'][_0x424d2e(0x14d)]>0x0))return;const _0x47ddd6=_0x5e702a[_0x424d2e(0x15d)][_0x424d2e(0x14d)]>0x0?_0x5e702a[_0x424d2e(0x15d)][_0x424d2e(0x168)](';\x20'):_0x424d2e(0x152),_0x39ba6c=_0x4d4383==='company'?_0x424d2e(0x148):'Personal';throw CliErrors['validation'](_0x39ba6c+_0x424d2e(0x165)+_0x5991db+'.',_0x47ddd6);}export function throwIfUnconfirmedPublishWarnings(_0x77f4e1,_0x24b3a3,_0x5d052b,_0x2ec8fb){const _0x19f69d=a50_0x1049;if(_0x5d052b['length']===0x0||_0x2ec8fb)return;const _0x162c03=_0x77f4e1==='company'?'Company':'Personal';throw CliErrors[_0x19f69d(0x151)](_0x162c03+'\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20'+_0x24b3a3+'.',[_0x19f69d(0x15c),_0x19f69d(0x147),'Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.',_0x19f69d(0x14c)+_0x5d052b[_0x19f69d(0x168)](';\x20')][_0x19f69d(0x168)]('\x20'));}export function buildRetargetWarning(_0x509a07,_0x2e89f2){const _0x1b4464=a50_0x1049;if(!_0x509a07?.['appCode']||_0x509a07[_0x1b4464(0x166)]===_0x2e89f2)return[];return[{'level':_0x1b4464(0x14e),'ruleId':_0x1b4464(0x146),'file':'lovrabet.skill.json','message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x509a07['appCode']+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x2e89f2+_0x1b4464(0x13e),'suggestion':_0x1b4464(0x167)}];}function a50_0x38fe(){const _0x217e20=['builtin','2832OJfCYD','downloadRuntimeSkillPackage','skill-metadata-appcode-retargeted','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','Company','not-applicable','317058fwzTYP','13210oWCYmb','Warnings:\x20','length','warning','personal','Builtin\x20Skill\x20','validation','SkillHub\x20validation\x20returned\x20invalid.','remote','verifyRuntimeSkillBundle','299767xyzyFD','identical','files','\x20cannot\x20be\x20pushed.','254CuTYbx','387XQVzSb','10SPiMDe','Review\x20each\x20warning\x20before\x20continuing.','errors','858594rvIEtj','9704DBicnh','1190wAdYdP','publishInput','version','scope','240444xjsBTn','\x20Skill\x20push\x20validation\x20failed\x20for\x20','appCode','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','join','60OsWcYs','content','(unknown)','\x20after\x20successful\x20push.','skillCode','company','3JZPOvV','140ljZUGO'];a50_0x38fe=function(){return _0x217e20;};return a50_0x38fe();}function a50_0x1049(_0xded0ee,_0x275778){_0xded0ee=_0xded0ee-0x13c;const _0x38fef2=a50_0x38fe();let _0x104998=_0x38fef2[_0xded0ee];return _0x104998;}export async function runRemoteContentPreflight(_0x42b018){const _0x2769d4=a50_0x1049;if(!_0x42b018[_0x2769d4(0x153)]||_0x42b018['remote'][_0x2769d4(0x163)]!==_0x42b018[_0x2769d4(0x163)]||!_0x42b018[_0x2769d4(0x161)][_0x2769d4(0x157)])return{'status':_0x2769d4(0x149)};const _0x1c8936=_0x42b018[_0x2769d4(0x153)][_0x2769d4(0x13f)]||_0x42b018[_0x2769d4(0x13f)];if(!_0x1c8936)return{'status':'not-applicable'};const _0x27b666=await _0x42b018[_0x2769d4(0x145)](_0x42b018['scope'],_0x1c8936,_0x42b018[_0x2769d4(0x166)],_0x42b018[_0x2769d4(0x153)][_0x2769d4(0x162)]);try{_0x42b018[_0x2769d4(0x154)](_0x42b018[_0x2769d4(0x161)][_0x2769d4(0x157)],_0x27b666);}catch{return{'status':'different'};}return{'status':_0x2769d4(0x156),'savedSkill':{..._0x42b018[_0x2769d4(0x153)],'content':_0x42b018[_0x2769d4(0x161)][_0x2769d4(0x13c)],'files':_0x42b018[_0x2769d4(0x161)]['files']}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0x1e18(_0x228dac,_0x365529){_0x228dac=_0x228dac-0x165;const _0x13e6ec=a51_0x13e6();let _0x1e180f=_0x13e6ec[_0x228dac];return _0x1e180f;}function a51_0x13e6(){const _0x2746fe=['394396HstCUj','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','Local\x20Skill\x20metadata\x20appCode\x20','15786xRhyEs','212455eBUcqA','description','8093323kfzxFR','tags','sourceSessionId','skill-metadata-appcode-retargeted','skillName','3584512FPzRum','lovrabet.skill.json','version','5307375XwrcoN','278wyylNU','preferInputSkillName','appCode','\x20after\x20successful\x20push.','warning','6048816kbqifI'];a51_0x13e6=function(){return _0x2746fe;};return a51_0x13e6();}(function(_0x152a05,_0xaf28f8){const _0x247373=a51_0x1e18,_0xbadd2c=_0x152a05();while(!![]){try{const _0x5f491f=-parseInt(_0x247373(0x173))/0x1+parseInt(_0x247373(0x168))/0x2*(-parseInt(_0x247373(0x172))/0x3)+-parseInt(_0x247373(0x16e))/0x4+parseInt(_0x247373(0x167))/0x5+-parseInt(_0x247373(0x16d))/0x6+parseInt(_0x247373(0x175))/0x7+parseInt(_0x247373(0x17a))/0x8;if(_0x5f491f===_0xaf28f8)break;else _0xbadd2c['push'](_0xbadd2c['shift']());}catch(_0x4861f2){_0xbadd2c['push'](_0xbadd2c['shift']());}}}(a51_0x13e6,0x962d0));export function withRetargetExistingMetadata(_0x4644ea,_0x50bf46,_0x144fd8={}){const _0xcb3679=a51_0x1e18,_0xa6e686=_0x144fd8[_0xcb3679(0x169)]?_0x4644ea[_0xcb3679(0x179)]??_0x50bf46['skillName']:_0x50bf46['skillName']??_0x4644ea[_0xcb3679(0x179)];return{..._0x4644ea,'skillName':_0xa6e686,'description':_0x50bf46[_0xcb3679(0x174)]??_0x4644ea['description'],'tags':Array['isArray'](_0x50bf46[_0xcb3679(0x176)])?_0x50bf46[_0xcb3679(0x176)]:_0x4644ea[_0xcb3679(0x176)],'version':_0x50bf46['version']??_0x4644ea[_0xcb3679(0x166)],'sourceSessionId':_0x50bf46[_0xcb3679(0x177)]??_0x4644ea[_0xcb3679(0x177)]};}export function buildRetargetWarning(_0x2f6aad,_0x568fb2){const _0x7c7b1c=a51_0x1e18;if(!_0x2f6aad?.[_0x7c7b1c(0x16a)]||_0x2f6aad[_0x7c7b1c(0x16a)]===_0x568fb2)return[];return[{'level':_0x7c7b1c(0x16c),'ruleId':_0x7c7b1c(0x178),'file':_0x7c7b1c(0x165),'message':_0x7c7b1c(0x171)+_0x2f6aad[_0x7c7b1c(0x16a)]+_0x7c7b1c(0x16f)+_0x568fb2+_0x7c7b1c(0x16b),'suggestion':_0x7c7b1c(0x170)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53cfd4,_0x598c3d){const _0x42606d=a52_0x27ac,_0x15a9f5=_0x53cfd4();while(!![]){try{const _0x39e8cf=parseInt(_0x42606d(0x99))/0x1+-parseInt(_0x42606d(0x8d))/0x2+-parseInt(_0x42606d(0x97))/0x3*(-parseInt(_0x42606d(0x94))/0x4)+parseInt(_0x42606d(0x8e))/0x5*(parseInt(_0x42606d(0x98))/0x6)+parseInt(_0x42606d(0x92))/0x7*(-parseInt(_0x42606d(0x93))/0x8)+-parseInt(_0x42606d(0x9b))/0x9+-parseInt(_0x42606d(0x90))/0xa*(-parseInt(_0x42606d(0x91))/0xb);if(_0x39e8cf===_0x598c3d)break;else _0x15a9f5['push'](_0x15a9f5['shift']());}catch(_0x3e4cfa){_0x15a9f5['push'](_0x15a9f5['shift']());}}}(a52_0x2d60,0xf1326));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x552430){const _0x5a7750=a52_0x27ac,_0x22bf5f=_0x552430[_0x5a7750(0x8b)]();if(!_0x22bf5f||_0x22bf5f==='all')return[_0x5a7750(0x96),'company'];if(_0x22bf5f===_0x5a7750(0x96)||_0x22bf5f==='company')return[_0x22bf5f];throw CliErrors[_0x5a7750(0x9a)]('Unsupported\x20Skill\x20sync\x20scope:\x20'+_0x552430);}export function normalizeListScope(_0x129a5d){const _0x487179=a52_0x27ac,_0x3e3c53=_0x129a5d[_0x487179(0x8b)]();if(!_0x3e3c53)return _0x487179(0x8c);if(_0x3e3c53==='personal'||_0x3e3c53==='company'||_0x3e3c53===_0x487179(0x8c))return _0x3e3c53;throw CliErrors[_0x487179(0x9a)](_0x487179(0x95)+_0x129a5d);}function a52_0x2d60(){const _0xe3a28d=['7aSkSIl','14680936LbbHcn','4SfFdEp','Unsupported\x20Skill\x20list\x20scope:\x20','personal','324903UzVulu','4882212ZnVjRH','651435jopBhl','validation','15471918RMyMAF','trim','all','2796066xmjSte','5IUFkGw','company','170fyzeMR','2825548GtPKfk'];a52_0x2d60=function(){return _0xe3a28d;};return a52_0x2d60();}export function shouldListScope(_0x39d08c,_0x22e258){if(_0x39d08c==='all')return!![];return _0x39d08c===_0x22e258;}export function listScopeToRuntimeScopes(_0x404f29){const _0x3d0527=a52_0x27ac;if(_0x404f29===_0x3d0527(0x8c))return[_0x3d0527(0x96),_0x3d0527(0x8f)];return[_0x404f29==='company'?_0x3d0527(0x8f):_0x404f29];}function a52_0x27ac(_0x5a20ac,_0x186646){_0x5a20ac=_0x5a20ac-0x8b;const _0x2d6034=a52_0x2d60();let _0x27acc0=_0x2d6034[_0x5a20ac];return _0x27acc0;}export function listScopeToRemoteScope(_0x53ee29){return _0x53ee29;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a53_0x2cbf(){var _0x17609f=['linkedPaths','treeHash','skillName','scope','status','readonly','10SoPTLb','61781rysqdR','skillCode','1454360DLsYlM','299434dmKdyk','5316192jWnMwW','6393820tYPhNU','9SaZlis','4009656TrDUxd','appCode','187700pxfDkH','contentHash','metadataPath','cacheDir','tags','21upLwth','dir'];a53_0x2cbf=function(){return _0x17609f;};return a53_0x2cbf();}(function(_0x4bc121,_0x4c5ba3){var _0x4bbeee=a53_0x54ab,_0xfacb56=_0x4bc121();while(!![]){try{var _0x5c7658=parseInt(_0x4bbeee(0x71))/0x1+-parseInt(_0x4bbeee(0x74))/0x2*(-parseInt(_0x4bbeee(0x68))/0x3)+-parseInt(_0x4bbeee(0x7a))/0x4*(-parseInt(_0x4bbeee(0x70))/0x5)+-parseInt(_0x4bbeee(0x78))/0x6+-parseInt(_0x4bbeee(0x75))/0x7+-parseInt(_0x4bbeee(0x73))/0x8*(-parseInt(_0x4bbeee(0x77))/0x9)+parseInt(_0x4bbeee(0x76))/0xa;if(_0x5c7658===_0x4c5ba3)break;else _0xfacb56['push'](_0xfacb56['shift']());}catch(_0x2b0b01){_0xfacb56['push'](_0xfacb56['shift']());}}}(a53_0x2cbf,0x91c67));function a53_0x54ab(_0x4b9519,_0x24b139){_0x4b9519=_0x4b9519-0x66;var _0x2cbf73=a53_0x2cbf();var _0x54ab34=_0x2cbf73[_0x4b9519];return _0x54ab34;}export function summarizeRuntimeSkill(_0x5ea5c4){var _0x21f5d8=a53_0x54ab;return{'id':_0x5ea5c4['id'],'skillCode':_0x5ea5c4[_0x21f5d8(0x72)],'skillName':_0x5ea5c4[_0x21f5d8(0x6c)],'scope':_0x5ea5c4['scope'],'version':_0x5ea5c4['version'],'readonly':_0x5ea5c4['readonly']};}export function summarizeLocalRuntimeSkill(_0x5ce3fe){var _0x33ab2b=a53_0x54ab;return{'id':_0x5ce3fe['id'],'skillCode':_0x5ce3fe[_0x33ab2b(0x72)],'skillName':_0x5ce3fe[_0x33ab2b(0x6c)],'scope':_0x5ce3fe[_0x33ab2b(0x6d)],'appCode':_0x5ce3fe[_0x33ab2b(0x79)],'version':_0x5ce3fe['version'],'status':_0x5ce3fe[_0x33ab2b(0x6e)],'readonly':_0x5ce3fe[_0x33ab2b(0x6f)],'tags':_0x5ce3fe[_0x33ab2b(0x67)],'dir':_0x5ce3fe[_0x33ab2b(0x69)],'cacheDir':_0x5ce3fe[_0x33ab2b(0x66)],'skillMdPath':_0x5ce3fe['skillMdPath'],'metadataPath':_0x5ce3fe[_0x33ab2b(0x7c)],'linkedPaths':_0x5ce3fe[_0x33ab2b(0x6a)],'contentHash':_0x5ce3fe[_0x33ab2b(0x7b)],'treeHash':_0x5ce3fe[_0x33ab2b(0x6b)],'pulledAt':_0x5ce3fe['pulledAt']};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x4895e3=a54_0x5c54;(function(_0x1d20be,_0x486267){const _0x1e5856=a54_0x5c54,_0x57e7ff=_0x1d20be();while(!![]){try{const _0x1cb3ff=-parseInt(_0x1e5856(0xa9))/0x1*(parseInt(_0x1e5856(0xc6))/0x2)+-parseInt(_0x1e5856(0xbe))/0x3*(parseInt(_0x1e5856(0xc9))/0x4)+-parseInt(_0x1e5856(0xcc))/0x5+-parseInt(_0x1e5856(0xbd))/0x6+parseInt(_0x1e5856(0xbc))/0x7*(-parseInt(_0x1e5856(0xb9))/0x8)+parseInt(_0x1e5856(0xbf))/0x9*(-parseInt(_0x1e5856(0xbb))/0xa)+parseInt(_0x1e5856(0xcd))/0xb;if(_0x1cb3ff===_0x486267)break;else _0x57e7ff['push'](_0x57e7ff['shift']());}catch(_0x20e8e8){_0x57e7ff['push'](_0x57e7ff['shift']());}}}(a54_0x1bf3,0x1dd79));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write',a54_0x4895e3(0xc7),a54_0x4895e3(0xc3)];export const DEFAULT_SKILL_TARGET='.agents/skills';export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE='references/runtime-contract.md';export const OUTPUT_CONTRACT_FILE=a54_0x4895e3(0xaa);export function validateSkillName(_0xff8ced){const _0xd647e2=a54_0x4895e3,_0x383598=_0xff8ced[_0xd647e2(0xba)]();if(!SKILL_NAME_PATTERN[_0xd647e2(0xc1)](_0x383598))throw CliErrors[_0xd647e2(0xca)](_0xd647e2(0xb2)+_0xff8ced+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0xd647e2(0xaf));return _0x383598;}export function normalizeSkillTemplateType(_0xd93dfe){const _0x1baec4=a54_0x4895e3,_0x5650c6=(_0xd93dfe||_0x1baec4(0xcb))['trim']()||'write';if(SKILL_TYPES[_0x1baec4(0xc4)](_0x5650c6))return _0x5650c6;throw CliErrors['validation']('Unsupported\x20Skill\x20type:\x20'+_0xd93dfe,'Use\x20one\x20of:\x20'+SKILL_TYPES[_0x1baec4(0xcf)](',\x20')+'.');}export function renderSkillTemplate(_0x3ca3be){const _0x51d1ae=a54_0x4895e3,_0x169d06=validateSkillName(_0x3ca3be[_0x51d1ae(0xc0)]),_0x180129=normalizeSkillTemplateType(_0x3ca3be[_0x51d1ae(0xb6)]),_0x3248a3=_0x3ca3be['timestamp']??new Date()[_0x51d1ae(0xb4)]();return{'skillName':_0x169d06,'type':_0x180129,'files':[{'path':_0x51d1ae(0xb3),'content':renderSkillMd(_0x169d06,_0x180129,_0x3248a3)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x169d06,_0x180129)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x169d06,_0x180129)}]};}function renderSkillMd(_0x2e3fa2,_0x5a90d8,_0x609dc5){const _0x36e3cc=a54_0x4895e3,_0x522a8a=typeWorkflow(_0x5a90d8);return _0x36e3cc(0xb7)+_0x2e3fa2+'\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20'+_0x5a90d8+_0x36e3cc(0xc2)+_0x609dc5+'\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20'+_0x2e3fa2+_0x36e3cc(0xb1)+_0x522a8a+'\x0a\x0a'+businessStateSection(_0x5a90d8)+'\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';}function a54_0x1bf3(){const _0x1c49a3=['1648HGZQAl','validation','write','1087310mJXBmk','10941524EhbfKd','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','join','\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=','\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','102371jcmPmQ','references/output-contract.md','\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','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','Invalid\x20Skill\x20name:\x20','SKILL.md','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','type','---\x0aname:\x20','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','152nGttJg','trim','10alRGHy','73521raSqlO','853680YwYbXo','1449bdokzy','106065IKbata','skillName','test','\x0a\x20\x20created:\x20\x22','trainer','includes','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','2rNmJxQ','read','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。'];a54_0x1bf3=function(){return _0x1c49a3;};return a54_0x1bf3();}function renderRuntimeContract(_0x5510d8,_0x394c50){const _0x2e8af6=a54_0x4895e3,_0x3f917e=_0x394c50==='write'?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return _0x2e8af6(0xac)+_0x5510d8+_0x2e8af6(0xa7)+_0x394c50+_0x2e8af6(0xb5)+_0x3f917e+_0x2e8af6(0xa8);}function renderOutputContract(_0x22af1a,_0x259a25){const _0x53ef41=a54_0x4895e3,_0x3d0ae3=_0x259a25===_0x53ef41(0xcb)?_0x53ef41(0xc8):_0x259a25+_0x53ef41(0xc5);return'#\x20Output\x20Contract\x0a\x0a'+_0x22af1a+_0x53ef41(0xab)+_0x3d0ae3+_0x53ef41(0xb8);}function a54_0x5c54(_0xb875df,_0x3cf9c3){_0xb875df=_0xb875df-0xa7;const _0x1bf3c3=a54_0x1bf3();let _0x5c54b4=_0x1bf3c3[_0xb875df];return _0x5c54b4;}function typeWorkflow(_0x16350a){const _0x100239=a54_0x4895e3;if(_0x16350a==='read')return _0x100239(0xad);if(_0x16350a===_0x100239(0xc3))return _0x100239(0xce);return _0x100239(0xae);}function businessStateSection(_0x4622cc){const _0x4d6f39=a54_0x4895e3;if(_0x4622cc!==_0x4d6f39(0xcb))return'';return _0x4d6f39(0xb0);}
|