@lovrabet/lovrabet-cli 2.1.10 → 2.1.11-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x205c7a=a40_0x376e;(function(_0x19b54a,_0x9204af){const _0x1b1dff=a40_0x376e,_0x1e5a7c=_0x19b54a();while(!![]){try{const _0x3c4e69=parseInt(_0x1b1dff(0x1b7))/0x1+parseInt(_0x1b1dff(0x1f3))/0x2*(-parseInt(_0x1b1dff(0x1bc))/0x3)+parseInt(_0x1b1dff(0x200))/0x4*(parseInt(_0x1b1dff(0x1f2))/0x5)+-parseInt(_0x1b1dff(0x20d))/0x6+-parseInt(_0x1b1dff(0x1db))/0x7+parseInt(_0x1b1dff(0x1c7))/0x8*(parseInt(_0x1b1dff(0x203))/0x9)+parseInt(_0x1b1dff(0x1e1))/0xa;if(_0x3c4e69===_0x9204af)break;else _0x1e5a7c['push'](_0x1e5a7c['shift']());}catch(_0x3ea4c1){_0x1e5a7c['push'](_0x1e5a7c['shift']());}}}(a40_0x13cc,0x90161));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x205c7a(0x1dd);export function getServiceRegistryPath(_0x521341={}){const _0x207f2f=a40_0x205c7a;return resolve(_0x521341[_0x207f2f(0x1d8)]??homedir(),PRODUCT_CONFIG[_0x207f2f(0x206)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x784b33={}){const _0x357a28=a40_0x205c7a,_0x2b639a=getServiceRegistryPath(_0x784b33);if(!existsSync(_0x2b639a))return emptyServiceRegistry();try{const _0x3f66a6=readFileSync(_0x2b639a,'utf8');if(!_0x3f66a6['trim']())return emptyServiceRegistry();const _0x46c5c4=JSON[_0x357a28(0x1d4)](_0x3f66a6);if(_0x46c5c4['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x357a28(0x1c4)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x46c5c4[_0x357a28(0x1f8)]),_0x357a28(0x1c3)+_0x2b639a+'.');if(!Array[_0x357a28(0x1cc)](_0x46c5c4[_0x357a28(0x1d7)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x46c5c4[_0x357a28(0x1f5)],'services':_0x46c5c4[_0x357a28(0x1d7)]};}catch(_0x4d82af){if(_0x4d82af instanceof Error&&_0x4d82af[_0x357a28(0x1fc)]===_0x357a28(0x1e4))throw _0x4d82af;throw CliErrors[_0x357a28(0x1c4)](_0x357a28(0x20a)+_0x2b639a,_0x357a28(0x1d3));}}export function writeServiceRegistry(_0x52b741,_0x3713db={}){const _0x27ff9a=a40_0x205c7a,_0xedad9e=getServiceRegistryPath(_0x3713db),_0x2b71b8=dirname(_0xedad9e);!existsSync(_0x2b71b8)&&mkdirSync(_0x2b71b8,{'recursive':!![]});const _0x5b9b96=_0xedad9e+_0x27ff9a(0x1b8);try{writeFileSync(_0x5b9b96,JSON['stringify'](_0x52b741,null,0x2)+'\x0a',{'encoding':_0x27ff9a(0x1df),'mode':0x180}),renameSync(_0x5b9b96,_0xedad9e);}catch(_0x1c8e2f){try{unlinkSync(_0x5b9b96);}catch{}if(_0x1c8e2f?.[_0x27ff9a(0x1d5)]===_0x27ff9a(0x1ec))throw CliErrors['validation'](_0x27ff9a(0x1da)+_0xedad9e);throw _0x1c8e2f;}return _0xedad9e;}export function loadServiceManifestFromFile(_0x560649){const _0x1e7a1a=a40_0x205c7a,_0x1d749f=resolve(_0x560649);if(!existsSync(_0x1d749f))throw CliErrors['validation'](_0x1e7a1a(0x1d1)+_0x560649);let _0x5e3f92;const _0x229210=readFileSync(_0x1d749f,'utf8');try{_0x5e3f92=JSON[_0x1e7a1a(0x1d4)](_0x229210);}catch{throw CliErrors[_0x1e7a1a(0x1c4)](_0x1e7a1a(0x1f4)+_0x560649,_0x1e7a1a(0x1c8));}const _0x2da41d=sha256(_0x229210),_0x164d20=extractLoadedServiceManifests(_0x5e3f92,_0x2da41d),_0x2a393d=aggregateValidationReports(_0x164d20),_0x275b98=_0x164d20[0x0];return{'filePath':_0x1d749f,'hash':_0x2da41d,'kind':isServiceRegistryLike(_0x5e3f92)?_0x1e7a1a(0x1dc):_0x1e7a1a(0x20e),'manifest':_0x275b98?.[_0x1e7a1a(0x20e)]??_0x5e3f92,'report':_0x2a393d,'normalizedManifest':_0x164d20[_0x1e7a1a(0x1cf)]===0x1?_0x275b98?.[_0x1e7a1a(0x1f1)]:undefined,'manifests':_0x164d20};}export function importServiceManifest(_0x4796db,_0x46c44a={}){const _0x202555=a40_0x205c7a,_0x3db917=loadServiceManifestFromFile(_0x4796db);if(!_0x3db917[_0x202555(0x1c6)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x3db917[_0x202555(0x1c6)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x3db917['manifests']['length']===0x0)throw CliErrors[_0x202555(0x1c4)](_0x202555(0x201),_0x202555(0x1fe));const _0x21047b=readServiceRegistry(_0x46c44a),_0x14e28a=(_0x46c44a[_0x202555(0x1de)]??(()=>new Date()))()[_0x202555(0x1ea)](),_0x34ab97=[];let _0x551fed=0x0,_0x51e10b=0x0;for(const _0xd4f490 of _0x3db917[_0x202555(0x20c)]){if(!_0xd4f490[_0x202555(0x1f1)])continue;const _0x14ddcb=_0xd4f490[_0x202555(0x1f1)][_0x202555(0x1c0)]['code'],_0x5dc2ab={'serviceCode':_0x14ddcb,'version':_0xd4f490[_0x202555(0x1f1)][_0x202555(0x1ce)],'importedAt':_0x14e28a,'source':{'type':_0x202555(0x1ed),'path':_0x3db917[_0x202555(0x1fd)],'hash':_0xd4f490[_0x202555(0x1e6)]},'manifest':_0xd4f490['manifest'],'normalizedManifest':_0xd4f490[_0x202555(0x1f1)]},_0x43c16a=_0x21047b[_0x202555(0x1d7)][_0x202555(0x1be)](_0xd6d433=>_0xd6d433['serviceCode']===_0x14ddcb);_0x43c16a>=0x0?(_0x21047b[_0x202555(0x1d7)][_0x43c16a]=_0x5dc2ab,_0x51e10b++):(_0x21047b[_0x202555(0x1d7)]['push'](_0x5dc2ab),_0x551fed++),_0x34ab97[_0x202555(0x1d0)](_0x5dc2ab);}_0x21047b[_0x202555(0x1d7)][_0x202555(0x1f6)]((_0x44743f,_0x35ab13)=>_0x44743f[_0x202555(0x207)][_0x202555(0x1eb)](_0x35ab13[_0x202555(0x207)])),_0x21047b[_0x202555(0x1f5)]=_0x14e28a;const _0x236b33=writeServiceRegistry(_0x21047b,_0x46c44a);return{'registryPath':_0x236b33,'entry':_0x34ab97[0x0],'replaced':_0x34ab97[_0x202555(0x1cf)]===0x1?_0x51e10b===0x1:_0x51e10b>0x0,'entries':_0x34ab97,'imported':_0x551fed,'updated':_0x51e10b,'serviceCount':_0x21047b[_0x202555(0x1d7)][_0x202555(0x1cf)]};}export function exportServiceManifest(_0x116c8e,_0x2265b0,_0x5859de={}){const _0x186ede=a40_0x205c7a,_0x149fa3=getServiceRegistryPath(_0x5859de),_0x560413=getLocalServiceEntry(_0x116c8e,_0x5859de);if(!_0x560413)throw CliErrors[_0x186ede(0x1c4)](_0x186ede(0x1c2)+_0x116c8e,_0x186ede(0x1ca));const _0x4dbf4d=resolve(_0x2265b0),_0x1071af=dirname(_0x4dbf4d);return!existsSync(_0x1071af)&&mkdirSync(_0x1071af,{'recursive':!![]}),writeFileSync(_0x4dbf4d,JSON[_0x186ede(0x1f9)](_0x560413[_0x186ede(0x20e)],null,0x2)+'\x0a',{'encoding':_0x186ede(0x1df),'mode':0x180}),{'registryPath':_0x149fa3,'filePath':_0x4dbf4d,'entry':_0x560413};}export function removeServiceManifest(_0x3ec8f3,_0x14c8ad={}){const _0x2da0b7=a40_0x205c7a,_0x147f74=readServiceRegistry(_0x14c8ad),_0x353013=_0x3ec8f3[_0x2da0b7(0x1b9)](),_0x51d22d=_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x1be)](_0x522c48=>_0x522c48[_0x2da0b7(0x207)]===_0x353013);if(_0x51d22d<0x0)throw CliErrors[_0x2da0b7(0x1c4)](_0x2da0b7(0x1c2)+_0x353013,_0x2da0b7(0x1ca));const [_0xb039d4]=_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x209)](_0x51d22d,0x1),_0x2403b4=(_0x14c8ad['now']??(()=>new Date()))()[_0x2da0b7(0x1ea)]();_0x147f74[_0x2da0b7(0x1f5)]=_0x2403b4;const _0x1bc556=writeServiceRegistry(_0x147f74,_0x14c8ad);return{'registryPath':_0x1bc556,'entry':_0xb039d4,'serviceCount':_0x147f74[_0x2da0b7(0x1d7)][_0x2da0b7(0x1cf)]};}export function listLocalServices(_0x551264={}){const _0x254be5=a40_0x205c7a;return readServiceRegistry(_0x551264)[_0x254be5(0x1d7)];}export function getLocalServiceEntry(_0x456ecc,_0xe486f8={}){const _0x41b559=a40_0x205c7a;return readServiceRegistry(_0xe486f8)['services'][_0x41b559(0x1d2)](_0x3e4f1f=>_0x3e4f1f['serviceCode']===_0x456ecc[_0x41b559(0x1b9)]());}export function listLocalServiceTrees(_0x567a83={}){const _0x407240=a40_0x205c7a;return readServiceRegistry(_0x567a83)[_0x407240(0x1d7)][_0x407240(0x1bb)](_0x5d5abc=>_0x5d5abc[_0x407240(0x1f1)]);}export function inspectServiceRegistry(_0x483fdf={}){const _0x62d962=a40_0x205c7a,_0x30b926=getServiceRegistryPath(_0x483fdf);if(!existsSync(_0x30b926))return emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1b6),![]);try{const _0x52f3d4=readFileSync(_0x30b926,_0x62d962(0x1df));if(!_0x52f3d4[_0x62d962(0x1b9)]())return emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1e5),!![]);const _0x31ecd5=JSON[_0x62d962(0x1d4)](_0x52f3d4);if(_0x31ecd5[_0x62d962(0x1f8)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'schemaVersion':_0x31ecd5[_0x62d962(0x1f8)],'message':_0x62d962(0x1cb)+String(_0x31ecd5[_0x62d962(0x1f8)])};if(!Array[_0x62d962(0x1cc)](_0x31ecd5[_0x62d962(0x1d7)]))return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x31ecd5['updatedAt'],'message':_0x62d962(0x1e7)};const _0xfeda9d=_0x31ecd5['services'][_0x62d962(0x1bb)](summarizeLocalServiceEntry);return{'registryPath':_0x30b926,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x31ecd5['updatedAt'],'serviceCount':_0xfeda9d[_0x62d962(0x1cf)],'commandCount':_0xfeda9d[_0x62d962(0x1f0)]((_0x3553ed,_0x3417d9)=>_0x3553ed+_0x3417d9[_0x62d962(0x1e0)],0x0),'services':_0xfeda9d};}catch(_0x1b858f){return{...emptyServiceRegistryInspection(_0x30b926,_0x62d962(0x1fb),!![]),'message':_0x1b858f instanceof Error?_0x1b858f[_0x62d962(0x205)]:String(_0x1b858f)};}}export function formatValidationFailure(_0x190837){const _0x437a4d=a40_0x205c7a,_0x517b0c=_0x190837[_0x437a4d(0x1ee)][_0x437a4d(0x1bb)](_0x1a170b=>_0x1a170b[_0x437a4d(0x1e2)]+':\x20'+_0x1a170b['message']);return _0x437a4d(0x1fa)+_0x517b0c[_0x437a4d(0x1c9)]('\x0a');}function extractLoadedServiceManifests(_0x120603,_0x54b6ee){const _0x19b10c=a40_0x205c7a;if(!isServiceRegistryLike(_0x120603)){const _0x20aaaa=_0x120603,_0x52f1a2=validateServiceTreeManifest(_0x20aaaa);return[{'manifest':_0x20aaaa,'report':_0x52f1a2,'normalizedManifest':_0x52f1a2['ok']?normalizeServiceTreeManifest(_0x20aaaa):undefined,'sourceHash':_0x54b6ee}];}return _0x120603['services'][_0x19b10c(0x1bb)]((_0xf9fb9a,_0x10be7f)=>{const _0x79c0b8=_0x19b10c,_0x27742e=isObjectRecord(_0xf9fb9a)?_0xf9fb9a[_0x79c0b8(0x20e)]:undefined,_0x374d56=validateServiceTreeManifest(_0x27742e),_0x191100=isObjectRecord(_0xf9fb9a)&&typeof _0xf9fb9a[_0x79c0b8(0x207)]===_0x79c0b8(0x1ff)?_0xf9fb9a[_0x79c0b8(0x207)]:undefined;return{'manifest':_0x27742e,'report':_0x374d56,'normalizedManifest':_0x374d56['ok']?normalizeServiceTreeManifest(_0x27742e):undefined,'sourceHash':sha256(JSON[_0x79c0b8(0x1f9)](_0x27742e,null,0x2)+'\x0a'),'registryIndex':_0x10be7f,'registryServiceCode':_0x191100};});}function aggregateValidationReports(_0x4ce061){const _0x585ceb=a40_0x205c7a,_0x46869f=_0x4ce061[_0x585ceb(0x1b5)](_0x28272b=>_0x28272b[_0x585ceb(0x204)]===undefined?_0x28272b[_0x585ceb(0x1c6)][_0x585ceb(0x1ee)]:_0x28272b[_0x585ceb(0x1c6)][_0x585ceb(0x1ee)]['map'](_0x13a030=>({..._0x13a030,'path':prefixRegistryIssuePath(_0x28272b['registryIndex'],_0x13a030[_0x585ceb(0x1e2)])}))),_0x45de38=_0x4ce061[_0x585ceb(0x1b5)](_0x3b5e7f=>_0x3b5e7f[_0x585ceb(0x204)]===undefined?_0x3b5e7f[_0x585ceb(0x1c6)]['warnings']:_0x3b5e7f[_0x585ceb(0x1c6)][_0x585ceb(0x20b)][_0x585ceb(0x1bb)](_0xd875f=>({..._0xd875f,'path':prefixRegistryIssuePath(_0x3b5e7f[_0x585ceb(0x204)],_0xd875f[_0x585ceb(0x1e2)])})));return{'ok':_0x46869f[_0x585ceb(0x1cf)]===0x0,'errors':_0x46869f,'warnings':_0x45de38};}function prefixRegistryIssuePath(_0x478f07,_0x4bde55){const _0x42638a=a40_0x205c7a;if(_0x4bde55==='$')return'$.services['+_0x478f07+'].manifest';if(_0x4bde55['startsWith']('$.'))return _0x42638a(0x1c1)+_0x478f07+'].manifest'+_0x4bde55[_0x42638a(0x1e8)](0x1);if(_0x4bde55[_0x42638a(0x202)]('$['))return _0x42638a(0x1c1)+_0x478f07+_0x42638a(0x1cd)+_0x4bde55[_0x42638a(0x1e8)](0x1);return _0x42638a(0x1c1)+_0x478f07+_0x42638a(0x208)+_0x4bde55;}function a40_0x13cc(){const _0x5282c9=['schemaVersion','stringify','Service\x20manifest\x20validation\x20failed:\x0a','invalid','name','filePath','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','string','268XKLbVX','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','startsWith','924849ZOUHfO','registryIndex','message','homeDirName','serviceCode','].manifest.','splice','Invalid\x20service\x20registry\x20JSON:\x20','warnings','manifests','2631060fHWijO','manifest','flatMap','missing','875631YtCKbq','.tmp','trim','importedAt','map','3GtYjkh','hex','findIndex','digest','service','$.services[','Local\x20service\x20not\x20found:\x20','Remove\x20or\x20migrate\x20','validation','risk','report','64ddhLdc','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','join','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Unsupported\x20schemaVersion:\x20','isArray','].manifest','version','length','push','Service\x20manifest\x20file\x20not\x20found:\x20','find','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','parse','code','commands','services','homeDir','description','Cannot\x20write\x20service\x20registry:\x20','8040529IxMByW','registry','service.json','now','utf8','commandCount','3903310gFIGCj','path','update','CliError','empty','sourceHash','services\x20must\x20be\x20an\x20array','slice','command','toISOString','localeCompare','ENOENT','file','errors','object','reduce','normalizedManifest','26325uebDmX','526942XbUnFC','Invalid\x20service\x20manifest\x20JSON:\x20','updatedAt','sort','target'];a40_0x13cc=function(){return _0x5282c9;};return a40_0x13cc();}function isServiceRegistryLike(_0x5730c2){const _0x35341e=a40_0x205c7a;return isObjectRecord(_0x5730c2)&&_0x5730c2[_0x35341e(0x1f8)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x35341e(0x1cc)](_0x5730c2[_0x35341e(0x1d7)]);}function a40_0x376e(_0x434b86,_0x512717){_0x434b86=_0x434b86-0x1b5;const _0x13ccb1=a40_0x13cc();let _0x376ec2=_0x13ccb1[_0x434b86];return _0x376ec2;}function isObjectRecord(_0x4318af){const _0x2356b0=a40_0x205c7a;return Boolean(_0x4318af)&&typeof _0x4318af===_0x2356b0(0x1ef)&&!Array[_0x2356b0(0x1cc)](_0x4318af);}function emptyServiceRegistryInspection(_0x41d50c,_0x26c3a8,_0x2de5aa){return{'registryPath':_0x41d50c,'exists':_0x2de5aa,'status':_0x26c3a8,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x27c8cf){const _0x60595e=a40_0x205c7a,_0xe20ddf=_0x27c8cf['normalizedManifest'],_0x85e8fa=_0xe20ddf[_0x60595e(0x1d6)]['map'](_0x285a91=>({'path':_0x285a91['cliPath'],'description':_0x285a91[_0x60595e(0x1d9)],'risk':_0x285a91[_0x60595e(0x1c5)],'targetKind':_0x285a91['target']['kind'],'targetCommand':_0x285a91[_0x60595e(0x1f7)][_0x60595e(0x1e9)]}));return{'serviceCode':_0x27c8cf[_0x60595e(0x207)],'name':_0xe20ddf[_0x60595e(0x1c0)][_0x60595e(0x1fc)],'description':_0xe20ddf[_0x60595e(0x1c0)][_0x60595e(0x1d9)],'version':_0x27c8cf[_0x60595e(0x1ce)],'importedAt':_0x27c8cf[_0x60595e(0x1ba)],'source':_0x27c8cf['source'],'commandCount':_0x85e8fa[_0x60595e(0x1cf)],'commands':_0x85e8fa};}function sha256(_0x577dec){const _0x43b5d3=a40_0x205c7a;return createHash('sha256')[_0x43b5d3(0x1e3)](_0x577dec)[_0x43b5d3(0x1bf)](_0x43b5d3(0x1bd));}
|
|
1
|
+
const a40_0x21d0d3=a40_0x25f8;(function(_0x3b9d3e,_0x3d0c7c){const _0x4c3a5f=a40_0x25f8,_0x18dd96=_0x3b9d3e();while(!![]){try{const _0x545fec=parseInt(_0x4c3a5f(0x17c))/0x1+-parseInt(_0x4c3a5f(0x18f))/0x2*(-parseInt(_0x4c3a5f(0x145))/0x3)+-parseInt(_0x4c3a5f(0x177))/0x4*(parseInt(_0x4c3a5f(0x157))/0x5)+parseInt(_0x4c3a5f(0x152))/0x6+-parseInt(_0x4c3a5f(0x197))/0x7*(parseInt(_0x4c3a5f(0x151))/0x8)+-parseInt(_0x4c3a5f(0x143))/0x9*(-parseInt(_0x4c3a5f(0x14e))/0xa)+parseInt(_0x4c3a5f(0x173))/0xb*(parseInt(_0x4c3a5f(0x176))/0xc);if(_0x545fec===_0x3d0c7c)break;else _0x18dd96['push'](_0x18dd96['shift']());}catch(_0x3e5836){_0x18dd96['push'](_0x18dd96['shift']());}}}(a40_0x43bf,0x7a946));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';function a40_0x25f8(_0x443e76,_0x425d11){_0x443e76=_0x443e76-0x140;const _0x43bf71=a40_0x43bf();let _0x25f89a=_0x43bf71[_0x443e76];return _0x25f89a;}export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x21d0d3(0x169);export function getServiceRegistryPath(_0x682442={}){const _0x18e0ed=a40_0x21d0d3;return resolve(_0x682442['homeDir']??homedir(),PRODUCT_CONFIG[_0x18e0ed(0x179)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x4942c5={}){const _0x21307c=a40_0x21d0d3,_0x1ab0b2=getServiceRegistryPath(_0x4942c5);if(!existsSync(_0x1ab0b2))return emptyServiceRegistry();try{const _0x54533c=readFileSync(_0x1ab0b2,_0x21307c(0x163));if(!_0x54533c['trim']())return emptyServiceRegistry();const _0x409267=JSON[_0x21307c(0x17e)](_0x54533c);if(_0x409267[_0x21307c(0x16f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x21307c(0x191)](_0x21307c(0x15b)+String(_0x409267[_0x21307c(0x16f)]),_0x21307c(0x178)+_0x1ab0b2+'.');if(!Array[_0x21307c(0x14c)](_0x409267[_0x21307c(0x190)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x409267[_0x21307c(0x14f)],'services':_0x409267[_0x21307c(0x190)]};}catch(_0x2906b5){if(_0x2906b5 instanceof Error&&_0x2906b5[_0x21307c(0x15e)]===_0x21307c(0x16c))throw _0x2906b5;throw CliErrors[_0x21307c(0x191)](_0x21307c(0x160)+_0x1ab0b2,_0x21307c(0x155));}}export function writeServiceRegistry(_0x567192,_0x17a84b={}){const _0x4863b3=a40_0x21d0d3,_0x4ae8ea=getServiceRegistryPath(_0x17a84b),_0x1663ab=dirname(_0x4ae8ea);!existsSync(_0x1663ab)&&mkdirSync(_0x1663ab,{'recursive':!![]});const _0x5480b7=_0x4ae8ea+_0x4863b3(0x14b);try{writeFileSync(_0x5480b7,JSON[_0x4863b3(0x153)](_0x567192,null,0x2)+'\x0a',{'encoding':_0x4863b3(0x163),'mode':0x180}),renameSync(_0x5480b7,_0x4ae8ea);}catch(_0x2c3699){try{unlinkSync(_0x5480b7);}catch{}if(_0x2c3699?.[_0x4863b3(0x189)]===_0x4863b3(0x149))throw CliErrors[_0x4863b3(0x191)](_0x4863b3(0x17d)+_0x4ae8ea);throw _0x2c3699;}return _0x4ae8ea;}export function loadServiceManifestFromFile(_0x16f37c){const _0x3a1846=a40_0x21d0d3,_0x1b0782=resolve(_0x16f37c);if(!existsSync(_0x1b0782))throw CliErrors[_0x3a1846(0x191)](_0x3a1846(0x185)+_0x16f37c);let _0x5ab574;const _0x234721=readFileSync(_0x1b0782,_0x3a1846(0x163));try{_0x5ab574=JSON[_0x3a1846(0x17e)](_0x234721);}catch{throw CliErrors[_0x3a1846(0x191)](_0x3a1846(0x162)+_0x16f37c,_0x3a1846(0x15f));}const _0xbff17d=sha256(_0x234721),_0x5ef06d=extractLoadedServiceManifests(_0x5ab574,_0xbff17d),_0x51fb81=aggregateValidationReports(_0x5ef06d),_0x30e9e4=_0x5ef06d[0x0];return{'filePath':_0x1b0782,'hash':_0xbff17d,'kind':isServiceRegistryLike(_0x5ab574)?_0x3a1846(0x188):'manifest','manifest':_0x30e9e4?.['manifest']??_0x5ab574,'report':_0x51fb81,'normalizedManifest':_0x5ef06d[_0x3a1846(0x140)]===0x1?_0x30e9e4?.[_0x3a1846(0x161)]:undefined,'manifests':_0x5ef06d};}export function importServiceManifest(_0x24f834,_0x57d955={}){const _0x1a6701=a40_0x21d0d3,_0x323a6d=loadServiceManifestFromFile(_0x24f834);if(!_0x323a6d[_0x1a6701(0x174)]['ok'])throw CliErrors[_0x1a6701(0x191)](formatValidationFailure(_0x323a6d[_0x1a6701(0x174)]),_0x1a6701(0x15d));if(_0x323a6d[_0x1a6701(0x17a)]['length']===0x0)throw CliErrors[_0x1a6701(0x191)](_0x1a6701(0x147),_0x1a6701(0x172));const _0x5e19f5=readServiceRegistry(_0x57d955),_0x399dc3=(_0x57d955[_0x1a6701(0x194)]??(()=>new Date()))()[_0x1a6701(0x18d)](),_0x21378f=[];let _0x30a9e3=0x0,_0x2ebf9e=0x0;for(const _0x14c9c0 of _0x323a6d[_0x1a6701(0x17a)]){if(!_0x14c9c0[_0x1a6701(0x161)])continue;const _0x2a810d=_0x14c9c0[_0x1a6701(0x161)]['service'][_0x1a6701(0x189)],_0xc93dd1={'serviceCode':_0x2a810d,'version':_0x14c9c0[_0x1a6701(0x161)][_0x1a6701(0x181)],'importedAt':_0x399dc3,'source':{'type':_0x1a6701(0x16d),'path':_0x323a6d[_0x1a6701(0x195)],'hash':_0x14c9c0[_0x1a6701(0x15a)]},'manifest':_0x14c9c0[_0x1a6701(0x184)],'normalizedManifest':_0x14c9c0[_0x1a6701(0x161)]},_0x3757ba=_0x5e19f5[_0x1a6701(0x190)]['findIndex'](_0x520145=>_0x520145[_0x1a6701(0x182)]===_0x2a810d);_0x3757ba>=0x0?(_0x5e19f5[_0x1a6701(0x190)][_0x3757ba]=_0xc93dd1,_0x2ebf9e++):(_0x5e19f5[_0x1a6701(0x190)][_0x1a6701(0x166)](_0xc93dd1),_0x30a9e3++),_0x21378f[_0x1a6701(0x166)](_0xc93dd1);}_0x5e19f5[_0x1a6701(0x190)][_0x1a6701(0x18c)]((_0x113e22,_0x5861d9)=>_0x113e22[_0x1a6701(0x182)]['localeCompare'](_0x5861d9[_0x1a6701(0x182)])),_0x5e19f5['updatedAt']=_0x399dc3;const _0x4eb3cb=writeServiceRegistry(_0x5e19f5,_0x57d955);return{'registryPath':_0x4eb3cb,'entry':_0x21378f[0x0],'replaced':_0x21378f[_0x1a6701(0x140)]===0x1?_0x2ebf9e===0x1:_0x2ebf9e>0x0,'entries':_0x21378f,'imported':_0x30a9e3,'updated':_0x2ebf9e,'serviceCount':_0x5e19f5[_0x1a6701(0x190)][_0x1a6701(0x140)]};}export function exportServiceManifest(_0x2b3a15,_0x46591a,_0x5cea33={}){const _0x1fb5f3=a40_0x21d0d3,_0x36fcc5=getServiceRegistryPath(_0x5cea33),_0xdece79=getLocalServiceEntry(_0x2b3a15,_0x5cea33);if(!_0xdece79)throw CliErrors[_0x1fb5f3(0x191)]('Local\x20service\x20not\x20found:\x20'+_0x2b3a15,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x5bb978=resolve(_0x46591a),_0x361262=dirname(_0x5bb978);return!existsSync(_0x361262)&&mkdirSync(_0x361262,{'recursive':!![]}),writeFileSync(_0x5bb978,JSON['stringify'](_0xdece79['manifest'],null,0x2)+'\x0a',{'encoding':_0x1fb5f3(0x163),'mode':0x180}),{'registryPath':_0x36fcc5,'filePath':_0x5bb978,'entry':_0xdece79};}export function removeServiceManifest(_0x27589a,_0x3c022d={}){const _0x4a0d69=a40_0x21d0d3,_0x7baf8b=readServiceRegistry(_0x3c022d),_0x37fd64=_0x27589a[_0x4a0d69(0x171)](),_0x1483a8=_0x7baf8b[_0x4a0d69(0x190)][_0x4a0d69(0x183)](_0x1dddcd=>_0x1dddcd[_0x4a0d69(0x182)]===_0x37fd64);if(_0x1483a8<0x0)throw CliErrors[_0x4a0d69(0x191)](_0x4a0d69(0x18e)+_0x37fd64,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x813679]=_0x7baf8b[_0x4a0d69(0x190)][_0x4a0d69(0x156)](_0x1483a8,0x1),_0x49d0f8=(_0x3c022d[_0x4a0d69(0x194)]??(()=>new Date()))()[_0x4a0d69(0x18d)]();_0x7baf8b[_0x4a0d69(0x14f)]=_0x49d0f8;const _0x2602c5=writeServiceRegistry(_0x7baf8b,_0x3c022d);return{'registryPath':_0x2602c5,'entry':_0x813679,'serviceCount':_0x7baf8b[_0x4a0d69(0x190)]['length']};}export function listLocalServices(_0x5211c0={}){const _0x1d645f=a40_0x21d0d3;return readServiceRegistry(_0x5211c0)[_0x1d645f(0x190)];}export function getLocalServiceEntry(_0x217696,_0x184d72={}){const _0xd5155f=a40_0x21d0d3;return readServiceRegistry(_0x184d72)[_0xd5155f(0x190)]['find'](_0x35cde7=>_0x35cde7[_0xd5155f(0x182)]===_0x217696[_0xd5155f(0x171)]());}export function listLocalServiceTrees(_0x53cd55={}){const _0x1ac4bf=a40_0x21d0d3;return readServiceRegistry(_0x53cd55)[_0x1ac4bf(0x190)][_0x1ac4bf(0x16e)](_0x549d11=>_0x549d11[_0x1ac4bf(0x161)]);}export function inspectServiceRegistry(_0x3a5b46={}){const _0x2a8ccf=a40_0x21d0d3,_0x4128ce=getServiceRegistryPath(_0x3a5b46);if(!existsSync(_0x4128ce))return emptyServiceRegistryInspection(_0x4128ce,_0x2a8ccf(0x168),![]);try{const _0x4bfd15=readFileSync(_0x4128ce,_0x2a8ccf(0x163));if(!_0x4bfd15[_0x2a8ccf(0x171)]())return emptyServiceRegistryInspection(_0x4128ce,_0x2a8ccf(0x164),!![]);const _0x3fb773=JSON['parse'](_0x4bfd15);if(_0x3fb773[_0x2a8ccf(0x16f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x4128ce,_0x2a8ccf(0x170),!![]),'schemaVersion':_0x3fb773[_0x2a8ccf(0x16f)],'message':_0x2a8ccf(0x187)+String(_0x3fb773[_0x2a8ccf(0x16f)])};if(!Array['isArray'](_0x3fb773[_0x2a8ccf(0x190)]))return{...emptyServiceRegistryInspection(_0x4128ce,_0x2a8ccf(0x170),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3fb773[_0x2a8ccf(0x14f)],'message':_0x2a8ccf(0x17b)};const _0x38339a=_0x3fb773[_0x2a8ccf(0x190)][_0x2a8ccf(0x16e)](summarizeLocalServiceEntry);return{'registryPath':_0x4128ce,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3fb773[_0x2a8ccf(0x14f)],'serviceCount':_0x38339a[_0x2a8ccf(0x140)],'commandCount':_0x38339a[_0x2a8ccf(0x158)]((_0x2e0ba7,_0x2055f4)=>_0x2e0ba7+_0x2055f4['commandCount'],0x0),'services':_0x38339a};}catch(_0x2c1734){return{...emptyServiceRegistryInspection(_0x4128ce,_0x2a8ccf(0x170),!![]),'message':_0x2c1734 instanceof Error?_0x2c1734['message']:String(_0x2c1734)};}}export function formatValidationFailure(_0x276f07){const _0x4f973d=a40_0x21d0d3,_0x246df2=_0x276f07['errors'][_0x4f973d(0x16e)](_0x2b18d0=>_0x2b18d0[_0x4f973d(0x14a)]+':\x20'+_0x2b18d0['message']);return _0x4f973d(0x18b)+_0x246df2[_0x4f973d(0x159)]('\x0a');}function extractLoadedServiceManifests(_0xc6e8,_0x30b194){const _0x39e510=a40_0x21d0d3;if(!isServiceRegistryLike(_0xc6e8)){const _0x1eaf63=_0xc6e8,_0x4b8b00=validateServiceTreeManifest(_0x1eaf63);return[{'manifest':_0x1eaf63,'report':_0x4b8b00,'normalizedManifest':_0x4b8b00['ok']?normalizeServiceTreeManifest(_0x1eaf63):undefined,'sourceHash':_0x30b194}];}return _0xc6e8[_0x39e510(0x190)][_0x39e510(0x16e)]((_0x55f92b,_0x30f165)=>{const _0x37147=_0x39e510,_0x42e855=isObjectRecord(_0x55f92b)?_0x55f92b[_0x37147(0x184)]:undefined,_0x2359d6=validateServiceTreeManifest(_0x42e855),_0xd21ff6=isObjectRecord(_0x55f92b)&&typeof _0x55f92b[_0x37147(0x182)]===_0x37147(0x16a)?_0x55f92b[_0x37147(0x182)]:undefined;return{'manifest':_0x42e855,'report':_0x2359d6,'normalizedManifest':_0x2359d6['ok']?normalizeServiceTreeManifest(_0x42e855):undefined,'sourceHash':sha256(JSON[_0x37147(0x153)](_0x42e855,null,0x2)+'\x0a'),'registryIndex':_0x30f165,'registryServiceCode':_0xd21ff6};});}function aggregateValidationReports(_0x2069f6){const _0x3a6d19=a40_0x21d0d3,_0x2e7333=_0x2069f6['flatMap'](_0x437406=>_0x437406['registryIndex']===undefined?_0x437406[_0x3a6d19(0x174)][_0x3a6d19(0x144)]:_0x437406[_0x3a6d19(0x174)]['errors']['map'](_0x4ea652=>({..._0x4ea652,'path':prefixRegistryIssuePath(_0x437406[_0x3a6d19(0x142)],_0x4ea652[_0x3a6d19(0x14a)])}))),_0x406fc5=_0x2069f6[_0x3a6d19(0x154)](_0x330428=>_0x330428[_0x3a6d19(0x142)]===undefined?_0x330428[_0x3a6d19(0x174)][_0x3a6d19(0x18a)]:_0x330428[_0x3a6d19(0x174)][_0x3a6d19(0x18a)][_0x3a6d19(0x16e)](_0x3a55a8=>({..._0x3a55a8,'path':prefixRegistryIssuePath(_0x330428[_0x3a6d19(0x142)],_0x3a55a8[_0x3a6d19(0x14a)])})));return{'ok':_0x2e7333[_0x3a6d19(0x140)]===0x0,'errors':_0x2e7333,'warnings':_0x406fc5};}function prefixRegistryIssuePath(_0x5f083c,_0x27dc17){const _0x29e86b=a40_0x21d0d3;if(_0x27dc17==='$')return _0x29e86b(0x180)+_0x5f083c+_0x29e86b(0x141);if(_0x27dc17[_0x29e86b(0x146)]('$.'))return _0x29e86b(0x180)+_0x5f083c+_0x29e86b(0x141)+_0x27dc17[_0x29e86b(0x192)](0x1);if(_0x27dc17[_0x29e86b(0x146)]('$['))return _0x29e86b(0x180)+_0x5f083c+_0x29e86b(0x141)+_0x27dc17[_0x29e86b(0x192)](0x1);return _0x29e86b(0x180)+_0x5f083c+'].manifest.'+_0x27dc17;}function isServiceRegistryLike(_0x23db7f){const _0xb04978=a40_0x21d0d3;return isObjectRecord(_0x23db7f)&&_0x23db7f[_0xb04978(0x16f)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x23db7f[_0xb04978(0x190)]);}function isObjectRecord(_0xba3756){const _0x2ab115=a40_0x21d0d3;return Boolean(_0xba3756)&&typeof _0xba3756===_0x2ab115(0x196)&&!Array[_0x2ab115(0x14c)](_0xba3756);}function emptyServiceRegistryInspection(_0x4e8fe8,_0x59f7f6,_0x2e41f8){return{'registryPath':_0x4e8fe8,'exists':_0x2e41f8,'status':_0x59f7f6,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function a40_0x43bf(){const _0x477ab0=['object','5180322VUCuJp','length','].manifest','registryIndex','18kEEMAE','errors','3YYAJDj','startsWith','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','service','ENOENT','path','.tmp','isArray','hex','861860EnzUSz','updatedAt','sha256','8gzIXJe','2544708oKFJSG','stringify','flatMap','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','splice','235fgrrzH','reduce','join','sourceHash','Unsupported\x20service\x20registry\x20schemaVersion:\x20','target','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','name','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Invalid\x20service\x20registry\x20JSON:\x20','normalizedManifest','Invalid\x20service\x20manifest\x20JSON:\x20','utf8','empty','risk','push','importedAt','missing','service.json','string','source','CliError','file','map','schemaVersion','invalid','trim','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','75669QiidYt','report','cliPath','288tPJodz','64892LoWVna','Remove\x20or\x20migrate\x20','homeDirName','manifests','services\x20must\x20be\x20an\x20array','916654IwwnHC','Cannot\x20write\x20service\x20registry:\x20','parse','kind','$.services[','version','serviceCode','findIndex','manifest','Service\x20manifest\x20file\x20not\x20found:\x20','update','Unsupported\x20schemaVersion:\x20','registry','code','warnings','Service\x20manifest\x20validation\x20failed:\x0a','sort','toISOString','Local\x20service\x20not\x20found:\x20','652746wjaTVC','services','validation','slice','description','now','filePath'];a40_0x43bf=function(){return _0x477ab0;};return a40_0x43bf();}function summarizeLocalServiceEntry(_0x4a7400){const _0x4e0660=a40_0x21d0d3,_0x3c33b7=_0x4a7400[_0x4e0660(0x161)],_0x401884=_0x3c33b7['commands'][_0x4e0660(0x16e)](_0x3c2743=>({'path':_0x3c2743[_0x4e0660(0x175)],'description':_0x3c2743[_0x4e0660(0x193)],'risk':_0x3c2743[_0x4e0660(0x165)],'targetKind':_0x3c2743[_0x4e0660(0x15c)][_0x4e0660(0x17f)],'targetCommand':_0x3c2743[_0x4e0660(0x15c)]['command']}));return{'serviceCode':_0x4a7400['serviceCode'],'name':_0x3c33b7[_0x4e0660(0x148)][_0x4e0660(0x15e)],'description':_0x3c33b7[_0x4e0660(0x148)]['description'],'version':_0x4a7400['version'],'importedAt':_0x4a7400[_0x4e0660(0x167)],'source':_0x4a7400[_0x4e0660(0x16b)],'commandCount':_0x401884['length'],'commands':_0x401884};}function sha256(_0xa692b2){const _0x2f8971=a40_0x21d0d3;return createHash(_0x2f8971(0x150))[_0x2f8971(0x186)](_0xa692b2)['digest'](_0x2f8971(0x14d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a41_0x45a992=a41_0x26b4;(function(_0x4bc0f0,_0x238041){const _0x5b167c=a41_0x26b4,_0x221a9f=_0x4bc0f0();while(!![]){try{const _0x350842=parseInt(_0x5b167c(0x209))/0x1+parseInt(_0x5b167c(0x1f8))/0x2*(parseInt(_0x5b167c(0x1f7))/0x3)+-parseInt(_0x5b167c(0x204))/0x4*(parseInt(_0x5b167c(0x207))/0x5)+parseInt(_0x5b167c(0x20b))/0x6+parseInt(_0x5b167c(0x1eb))/0x7*(parseInt(_0x5b167c(0x1ed))/0x8)+-parseInt(_0x5b167c(0x1f5))/0x9+parseInt(_0x5b167c(0x208))/0xa;if(_0x350842===_0x238041)break;else _0x221a9f['push'](_0x221a9f['shift']());}catch(_0x897690){_0x221a9f['push'](_0x221a9f['shift']());}}}(a41_0x2172,0xed60a));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';function a41_0x2172(){const _0x798d52=['40RklFSu','skillName','Refusing\x20to\x20overwrite\x20symlink:\x20','899335ZsWyrz','9918690akUQeq','296030NwOrOs','Created\x20local\x20Skill\x20draft\x20','8140158DGlSXL','isDirectory','297682TIjrkD','str','56uSENRy','name','validation','rendered','path','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','trim','skillDir','9274023kNxCUt','WRITE','2577423rKsBTY','2RoKeOU','create','bool','files','map','skill','isSymbolicLink','Skill\x20directory\x20already\x20exists:\x20','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','write','type','utf8'];a41_0x2172=function(){return _0x798d52;};return a41_0x2172();}import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';function a41_0x26b4(_0x111a35,_0x540416){_0x111a35=_0x111a35-0x1ea;const _0x217278=a41_0x2172();let _0x26b4b3=_0x217278[_0x111a35];return _0x26b4b3;}import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a41_0x45a992(0x1fd),'command':a41_0x45a992(0x1f9),'description':a41_0x45a992(0x200),'risk':a41_0x45a992(0x201),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x1c8737){const _0x5af5fb=a41_0x45a992,_0x5cd3ea=buildSkillCreatePlan(_0x1c8737[_0x5af5fb(0x1ec)](_0x5af5fb(0x1ee)),_0x1c8737['str']('type'),_0x1c8737[_0x5af5fb(0x1ec)]('target'));return{'method':_0x5af5fb(0x1f6),'url':_0x5cd3ea[_0x5af5fb(0x1f4)],'body':{'skillName':_0x5cd3ea[_0x5af5fb(0x1f0)][_0x5af5fb(0x205)],'type':_0x5cd3ea[_0x5af5fb(0x1f0)][_0x5af5fb(0x202)],'selfContained':!![],'files':_0x5cd3ea[_0x5af5fb(0x1f0)]['files'][_0x5af5fb(0x1fc)](_0x1aff0e=>_0x1aff0e[_0x5af5fb(0x1f1)])},'description':'Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.'};},async 'execute'(_0x359379){const _0x5b655b=a41_0x45a992,_0x11045a=buildSkillCreatePlan(_0x359379['str'](_0x5b655b(0x1ee)),_0x359379[_0x5b655b(0x1ec)]('type'),_0x359379['str']('target'));return writeSkillDraft(_0x11045a,_0x359379[_0x5b655b(0x1fa)]('force')),{'ok':!![],'data':{'skillName':_0x11045a[_0x5b655b(0x1f0)][_0x5b655b(0x205)],'type':_0x11045a[_0x5b655b(0x1f0)][_0x5b655b(0x202)],'dir':_0x11045a[_0x5b655b(0x1f4)],'files':_0x11045a[_0x5b655b(0x1f0)][_0x5b655b(0x1fb)]['map'](_0x3d3448=>_0x3d3448['path'])},'message':_0x5b655b(0x20a)+_0x11045a[_0x5b655b(0x1f0)]['skillName']};}};function buildSkillCreatePlan(_0x23107c,_0x435468,_0x4674db){const _0x3b41b6=renderSkillTemplate({'skillName':_0x23107c,'type':_0x435468}),_0x30fea3=resolve(normalizeSkillTarget(_0x4674db));return{'rendered':_0x3b41b6,'targetRoot':_0x30fea3,'skillDir':resolve(_0x30fea3,_0x3b41b6['skillName'])};}function normalizeSkillTarget(_0x2569c7){const _0x46f92d=a41_0x45a992;return(_0x2569c7||DEFAULT_SKILL_TARGET)[_0x46f92d(0x1f3)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x199cb3,_0x548ed2){const _0x351d69=a41_0x45a992;if(existsSync(_0x199cb3['skillDir'])){const _0xb8c6bd=lstatSync(_0x199cb3['skillDir']);if(!_0xb8c6bd[_0x351d69(0x1ea)]()||_0xb8c6bd[_0x351d69(0x1fe)]())throw CliErrors[_0x351d69(0x1ef)](_0x351d69(0x1f2)+_0x199cb3[_0x351d69(0x1f4)]);if(!_0x548ed2)throw CliErrors[_0x351d69(0x1ef)](_0x351d69(0x1ff)+_0x199cb3[_0x351d69(0x1f4)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x2bac56 of _0x199cb3[_0x351d69(0x1f0)]['files']){const _0x380274=resolve(_0x199cb3[_0x351d69(0x1f4)],_0x2bac56[_0x351d69(0x1f1)]),_0x18bf78=dirname(_0x380274);mkdirSync(_0x18bf78,{'recursive':!![]});if(existsSync(_0x380274)&&lstatSync(_0x380274)[_0x351d69(0x1fe)]())throw CliErrors['validation'](_0x351d69(0x206)+_0x380274);writeFileSync(_0x380274,_0x2bac56['content'],_0x351d69(0x203));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a42_0x4948(){const _0x263f6a=['../../../skills/runtime-skill-sync.js','version','454mwqSnh','includes','str','2167cPNWrj','\x20company\x20Skill(s).','all','930503LNhOZD','install','force','push','trim','8845oVZXlA','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','2760pyhKwa','12cbJOgR','../../../core/api-client.js','length','removed','accessKey','unchanged','Installed\x20','company','68537jkiadi','envName','flatMap','production','scope','1924fIziLt','41240kyBPnY','6PSfRDN','8607AwgfKO','map','22788ZUdBnP','code','appCode','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','31796063QEKEXn','skillCode','write','action','personal','filter','skipped','skill','created'];a42_0x4948=function(){return _0x263f6a;};return a42_0x4948();}const a42_0x2e062b=a42_0x1fc2;(function(_0x160a39,_0x294f58){const _0x111492=a42_0x1fc2,_0x15c02e=_0x160a39();while(!![]){try{const _0xfaa457=parseInt(_0x111492(0xef))/0x1+parseInt(_0x111492(0x108))/0x2*(parseInt(_0x111492(0xf7))/0x3)+parseInt(_0x111492(0xf4))/0x4*(-parseInt(_0x111492(0x113))/0x5)+parseInt(_0x111492(0xf6))/0x6*(parseInt(_0x111492(0x10e))/0x7)+-parseInt(_0x111492(0x115))/0x8*(parseInt(_0x111492(0xf9))/0x9)+-parseInt(_0x111492(0xf5))/0xa*(parseInt(_0x111492(0x10b))/0xb)+parseInt(_0x111492(0x116))/0xc*(parseInt(_0x111492(0xfd))/0xd);if(_0xfaa457===_0x294f58)break;else _0x15c02e['push'](_0x15c02e['shift']());}catch(_0x43f839){_0x15c02e['push'](_0x15c02e['shift']());}}}(a42_0x4948,0xb9f7b));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a42_0x2e062b(0x104),'command':a42_0x2e062b(0x10f),'description':a42_0x2e062b(0x114),'risk':a42_0x2e062b(0xff),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x191c59){return syncRuntimeSkills(_0x191c59);}};async function syncRuntimeSkills(_0x2fbe5e){const _0x5d7951=a42_0x2e062b,{downloadRuntimeSkillPackage:_0x202eef,listRuntimeSkills:_0x496e93}=await import(_0x5d7951(0x117)),{linkEffectiveRuntimeSkills:_0xfbd9b3,materializeRuntimeSkill:_0xda7e8f,pruneStaleRuntimeSkillCache:_0x10e902,pruneStaleRuntimeSkillLinks:_0x35053d}=await import(_0x5d7951(0x106)),_0x28dd38=_0x2fbe5e[_0x5d7951(0x10a)](_0x5d7951(0xfa)),_0x106bc9=normalizeSyncScopes(_0x2fbe5e[_0x5d7951(0x10a)](_0x5d7951(0xf3))),_0x21cf5d=_0x2fbe5e[_0x5d7951(0xf0)]??_0x5d7951(0xf2),_0x2c76dc=_0x2fbe5e[_0x5d7951(0x11a)],_0x5736f7=_0x2fbe5e['bool'](_0x5d7951(0x110));if(!_0x2c76dc)throw CliErrors['authRequired'](_0x5d7951(0xfc));const _0x3ad0fb=await Promise[_0x5d7951(0x10d)](_0x106bc9[_0x5d7951(0xf8)](_0x3eea8a=>_0x496e93({'appCode':_0x2fbe5e['appCode'],'scope':_0x3eea8a,'code':_0x28dd38[_0x5d7951(0x112)]()||undefined}))),_0x481e66=_0x106bc9[_0x5d7951(0x109)](_0x5d7951(0x101))?_0x3ad0fb[_0x5d7951(0xf1)]((_0xd74126,_0x4eaf93)=>_0x106bc9[_0x4eaf93]===_0x5d7951(0x101)?_0xd74126[_0x5d7951(0x101)]:[]):[],_0x458be1=_0x106bc9[_0x5d7951(0x109)]('company')?_0x3ad0fb[_0x5d7951(0xf1)]((_0x56233d,_0x4e373b)=>_0x106bc9[_0x4e373b]===_0x5d7951(0x11d)?_0x56233d[_0x5d7951(0x11d)]:[]):[],_0x5408e2=new Set([..._0x481e66[_0x5d7951(0xf8)](_0x580764=>_0x580764[_0x5d7951(0xfe)]?.['trim']())[_0x5d7951(0x102)](_0xccf62f=>Boolean(_0xccf62f)),..._0x458be1['map'](_0x564b77=>_0x564b77['skillCode']?.[_0x5d7951(0x112)]())[_0x5d7951(0x102)](_0x411017=>Boolean(_0x411017))]),_0xc5d8a5=_0x28dd38['trim']()?[_0x28dd38[_0x5d7951(0x112)]()]:undefined,_0x1774b4=_0x106bc9['length']===0x2&&_0x106bc9['includes'](_0x5d7951(0x101))&&_0x106bc9['includes'](_0x5d7951(0x11d)),_0x48291a=_0x1774b4?_0x35053d(_0x2fbe5e[_0x5d7951(0xfb)],_0x5408e2,{},_0xc5d8a5):[],_0x2e5846=_0x10e902({'env':_0x21cf5d,'accessKey':_0x2c76dc,'appCode':_0x2fbe5e[_0x5d7951(0xfb)],'activeSkillCodes':_0x5408e2,'pruneSkillCodes':_0xc5d8a5,'scopes':_0x106bc9}),_0x2386d4=[];for(const _0x11c593 of _0x481e66){_0x2386d4[_0x5d7951(0x111)](_0xda7e8f(_0x11c593,_0x5d7951(0x101),{'env':_0x21cf5d,'accessKey':_0x2c76dc,'appCode':_0x2fbe5e[_0x5d7951(0xfb)],'force':_0x5736f7,'packageBytes':await downloadSkillPackage(_0x11c593,_0x5d7951(0x101),_0x2fbe5e[_0x5d7951(0xfb)],_0x202eef)}));}for(const _0x5abf53 of _0x458be1){_0x2386d4['push'](_0xda7e8f(_0x5abf53,_0x5d7951(0x11d),{'env':_0x21cf5d,'accessKey':_0x2c76dc,'appCode':_0x2fbe5e[_0x5d7951(0xfb)],'force':_0x5736f7,'packageBytes':await downloadSkillPackage(_0x5abf53,_0x5d7951(0x11d),_0x2fbe5e[_0x5d7951(0xfb)],_0x202eef)}));}const _0x1dce39=_0xfbd9b3(_0x2386d4,_0x2fbe5e['appCode']),_0x173f08=countLinkActions(_0x1dce39);return{'ok':!![],'data':{'appCode':_0x2fbe5e['appCode'],'personal':_0x481e66[_0x5d7951(0x118)],'company':_0x458be1[_0x5d7951(0x118)],'materialized':_0x2386d4['length'],'links':{'total':_0x1dce39[_0x5d7951(0x118)],'created':_0x173f08[_0x5d7951(0x105)]??0x0,'updated':_0x173f08['updated']??0x0,'unchanged':_0x173f08[_0x5d7951(0x11b)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x48291a[_0x5d7951(0x102)](_0x448a94=>_0x448a94[_0x5d7951(0x100)]===_0x5d7951(0x119))[_0x5d7951(0x118)],'cacheDirs':_0x2e5846['filter'](_0x490e0e=>_0x490e0e['action']===_0x5d7951(0x119))[_0x5d7951(0x118)],'skipped':[..._0x48291a,..._0x2e5846]['filter'](_0x5d4c97=>_0x5d4c97['action']===_0x5d7951(0x103))['length']},'skills':{'personal':_0x481e66[_0x5d7951(0xf8)](summarizeRuntimeSkill),'company':_0x458be1['map'](summarizeRuntimeSkill)}},'message':_0x5d7951(0x11c)+_0x481e66[_0x5d7951(0x118)]+'\x20personal\x20and\x20'+_0x458be1['length']+_0x5d7951(0x10c)};}function a42_0x1fc2(_0x31ae29,_0x322ce7){_0x31ae29=_0x31ae29-0xef;const _0x494833=a42_0x4948();let _0x1fc243=_0x494833[_0x31ae29];return _0x1fc243;}async function downloadSkillPackage(_0x264112,_0x73c9fe,_0x5c25e6,_0x4631ac){const _0x1bff02=a42_0x2e062b,_0x507a39=_0x264112[_0x1bff02(0x107)]?.[_0x1bff02(0x112)]();return _0x507a39?_0x4631ac(_0x73c9fe,_0x264112[_0x1bff02(0xfe)],_0x5c25e6,_0x507a39):_0x4631ac(_0x73c9fe,_0x264112['skillCode'],_0x5c25e6);}function countLinkActions(_0x3cd20e){return _0x3cd20e['reduce']((_0x21fd1d,_0x4ff3e4)=>{const _0x5ca163=a42_0x1fc2;return _0x21fd1d[_0x4ff3e4[_0x5ca163(0x100)]]=(_0x21fd1d[_0x4ff3e4['action']]??0x0)+0x1,_0x21fd1d;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x1db9f0=a43_0x2559;(function(_0x4b9fa1,_0x53092b){const _0xe4d296=a43_0x2559,_0x5438a9=_0x4b9fa1();while(!![]){try{const _0x277bc4=parseInt(_0xe4d296(0x15a))/0x1*(-parseInt(_0xe4d296(0x15f))/0x2)+parseInt(_0xe4d296(0x154))/0x3+-parseInt(_0xe4d296(0x16e))/0x4*(-parseInt(_0xe4d296(0x161))/0x5)+-parseInt(_0xe4d296(0x16f))/0x6+parseInt(_0xe4d296(0x160))/0x7*(parseInt(_0xe4d296(0x153))/0x8)+-parseInt(_0xe4d296(0x166))/0x9*(parseInt(_0xe4d296(0x172))/0xa)+-parseInt(_0xe4d296(0x15c))/0xb*(-parseInt(_0xe4d296(0x16b))/0xc);if(_0x277bc4===_0x53092b)break;else _0x5438a9['push'](_0x5438a9['shift']());}catch(_0x211ddc){_0x5438a9['push'](_0x5438a9['shift']());}}}(a43_0x9fad,0xb3f63));import{CliErrors}from'../../../errors.js';function a43_0x2559(_0x128ea9,_0x289e1a){_0x128ea9=_0x128ea9-0x151;const _0x9fadd0=a43_0x9fad();let _0x2559de=_0x9fadd0[_0x128ea9];return _0x2559de;}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a43_0x1db9f0(0x16a),'command':a43_0x1db9f0(0x163),'description':a43_0x1db9f0(0x152),'risk':a43_0x1db9f0(0x15d),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x4121a8){const _0x561eb9=a43_0x1db9f0,_0x1c65df=_0x4121a8[_0x561eb9(0x171)]('code'),_0x38bb34=normalizeListScope(_0x4121a8[_0x561eb9(0x171)](_0x561eb9(0x159)));if(_0x4121a8[_0x561eb9(0x168)](_0x561eb9(0x169))){const _0x528da8=_0x4121a8[_0x561eb9(0x151)];if(!_0x528da8)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x409557}=await import(_0x561eb9(0x164)),_0x24b17a=_0x409557({'env':_0x4121a8[_0x561eb9(0x165)]??'production','accessKey':_0x528da8,'appCode':_0x4121a8[_0x561eb9(0x170)],'scopes':listScopeToRuntimeScopes(_0x38bb34),'code':_0x1c65df[_0x561eb9(0x155)]()||undefined}),_0x9b0b2d=groupLocalRuntimeSkills(_0x24b17a);return{'ok':!![],'data':{'appCode':_0x4121a8[_0x561eb9(0x170)],'source':_0x561eb9(0x169),'scope':_0x38bb34,'total':_0x24b17a['length'],'personal':_0x9b0b2d[_0x561eb9(0x157)]['length'],'company':_0x9b0b2d[_0x561eb9(0x156)][_0x561eb9(0x15b)],'items':_0x24b17a[_0x561eb9(0x16c)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x9b0b2d[_0x561eb9(0x157)][_0x561eb9(0x16c)](summarizeLocalRuntimeSkill),'company':_0x9b0b2d['company'][_0x561eb9(0x16c)](summarizeLocalRuntimeSkill)}},'message':_0x561eb9(0x167)+_0x24b17a[_0x561eb9(0x15b)]+'\x20local\x20Skill(s).'};}const {listRuntimeSkills:_0x31f891}=await import(_0x561eb9(0x173)),_0x33587a=await _0x31f891({'appCode':_0x4121a8[_0x561eb9(0x170)],'scope':listScopeToRemoteScope(_0x38bb34),'code':_0x1c65df[_0x561eb9(0x155)]()||undefined}),_0x58defc=shouldListScope(_0x38bb34,'personal')?_0x33587a[_0x561eb9(0x157)]??[]:[],_0x375dc8=shouldListScope(_0x38bb34,'company')?_0x33587a[_0x561eb9(0x156)]??[]:[],_0x250493=[..._0x58defc,..._0x375dc8];return{'ok':!![],'data':{'appCode':_0x4121a8[_0x561eb9(0x170)],'source':_0x561eb9(0x158),'scope':_0x38bb34,'total':_0x250493[_0x561eb9(0x15b)],'personal':_0x58defc[_0x561eb9(0x15b)],'company':_0x375dc8[_0x561eb9(0x15b)],'items':_0x250493[_0x561eb9(0x16c)](summarizeRuntimeSkill),'skills':{'personal':_0x58defc[_0x561eb9(0x16c)](summarizeRuntimeSkill),'company':_0x375dc8['map'](summarizeRuntimeSkill)}},'message':_0x561eb9(0x167)+_0x250493[_0x561eb9(0x15b)]+_0x561eb9(0x15e)};}};function a43_0x9fad(){const _0x452c3c=['company','personal','remote','scope','217579OLHkZn','length','77143ZKqtPO','read','\x20remote\x20Skill(s).','2yNDhXX','14756oEYkug','1193315nJnIWK','builtin','list','../../../skills/runtime-skill-sync.js','envName','2529LelDkZ','Listed\x20','bool','local','skill','1692bLWFyi','map','filter','4rjfMOi','7896078DeADNf','appCode','str','7270YgIUJS','../../../core/api-client.js','accessKey','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','1328gIPPBA','2692734WxYqTl','trim'];a43_0x9fad=function(){return _0x452c3c;};return a43_0x9fad();}function groupLocalRuntimeSkills(_0x1f1147){const _0x5aeee3=a43_0x1db9f0;return{'personal':_0x1f1147[_0x5aeee3(0x16d)](_0x1c04f7=>_0x1c04f7['scope']===_0x5aeee3(0x157)),'company':_0x1f1147[_0x5aeee3(0x16d)](_0x2d4cad=>_0x2d4cad[_0x5aeee3(0x159)]===_0x5aeee3(0x156)),'builtin':_0x1f1147['filter'](_0xc6d3c8=>_0xc6d3c8[_0x5aeee3(0x159)]===_0x5aeee3(0x162))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x8a6e5c=a44_0x4da1;(function(_0x3f4549,_0x394bdb){const _0x4a8b42=a44_0x4da1,_0x1be4b3=_0x3f4549();while(!![]){try{const _0xe38131=parseInt(_0x4a8b42(0xdc))/0x1*(parseInt(_0x4a8b42(0xe1))/0x2)+-parseInt(_0x4a8b42(0xdd))/0x3+-parseInt(_0x4a8b42(0xda))/0x4+-parseInt(_0x4a8b42(0xd6))/0x5*(parseInt(_0x4a8b42(0xd9))/0x6)+parseInt(_0x4a8b42(0xe4))/0x7*(-parseInt(_0x4a8b42(0xe2))/0x8)+parseInt(_0x4a8b42(0xe3))/0x9*(-parseInt(_0x4a8b42(0xdf))/0xa)+-parseInt(_0x4a8b42(0xd8))/0xb*(-parseInt(_0x4a8b42(0xdb))/0xc);if(_0xe38131===_0x394bdb)break;else _0x1be4b3['push'](_0x1be4b3['shift']());}catch(_0x12d4ec){_0x1be4b3['push'](_0x1be4b3['shift']());}}}(a44_0x2acc,0xaf9ba));function a44_0x4da1(_0x3500e9,_0x23ba6b){_0x3500e9=_0x3500e9-0xd6;const _0x2acc18=a44_0x2acc();let _0x4da123=_0x2acc18[_0x3500e9];return _0x4da123;}import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a44_0x2acc(){const _0x19d035=['Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','14QQsYUu','280zZphPa','447390TCvoQT','14091lZGvvw','5tJglIm','write','80267cbAjNf','3040698HHVIzk','5065128lMWoLx','5880yRdQtz','66277ysBGyu','2938677nJvquU','skill','100JwLNPS'];a44_0x2acc=function(){return _0x19d035;};return a44_0x2acc();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a44_0x8a6e5c(0xde),'command':'push','description':a44_0x8a6e5c(0xe0),'risk':a44_0x8a6e5c(0xd7),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x449e74=a45_0x51c7;function a45_0x51c7(_0x4867dc,_0x5d7392){_0x4867dc=_0x4867dc-0x1af;const _0x5911f5=a45_0x5911();let _0x51c77d=_0x5911f5[_0x4867dc];return _0x51c77d;}(function(_0x528040,_0x2a3f2c){const _0x41f52c=a45_0x51c7,_0x75de09=_0x528040();while(!![]){try{const _0x290493=-parseInt(_0x41f52c(0x1b8))/0x1+-parseInt(_0x41f52c(0x1af))/0x2*(-parseInt(_0x41f52c(0x1b3))/0x3)+-parseInt(_0x41f52c(0x1bb))/0x4*(parseInt(_0x41f52c(0x1b0))/0x5)+-parseInt(_0x41f52c(0x1b4))/0x6+parseInt(_0x41f52c(0x1b6))/0x7*(parseInt(_0x41f52c(0x1b1))/0x8)+-parseInt(_0x41f52c(0x1c2))/0x9+parseInt(_0x41f52c(0x1b5))/0xa*(parseInt(_0x41f52c(0x1c0))/0xb);if(_0x290493===_0x2a3f2c)break;else _0x75de09['push'](_0x75de09['shift']());}catch(_0x2d2e53){_0x75de09['push'](_0x75de09['shift']());}}}(a45_0x5911,0x59139));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a45_0x449e74(0x1be),'command':a45_0x449e74(0x1ba),'description':a45_0x449e74(0x1b7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x208218){const _0x143917=a45_0x449e74,_0x46cc4b=_0x208218[_0x143917(0x1c1)](_0x143917(0x1b2)),_0x5ddaea=validateSkillDirectory(_0x208218[_0x143917(0x1b9)](_0x143917(0x1bd)),{'strict':_0x46cc4b});return throwIfSkillValidationFailed(_0x5ddaea,_0x46cc4b),{'ok':!![],'data':{'dir':_0x5ddaea[_0x143917(0x1bd)],'type':_0x5ddaea['type'],'errors':_0x5ddaea[_0x143917(0x1bf)],'warnings':_0x5ddaea[_0x143917(0x1bc)]},'message':'Skill\x20validation\x20passed.'};}};function a45_0x5911(){const _0xc1cfd2=['44jeZAsu','bool','5080554KveHHZ','2oCYJjr','5RNfuCB','8QAiFZj','strict','669267FUNJgJ','1609674lczcFz','3269260BxcrEH','5004629zGsIlH','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','573424fPhLFP','str','validate','1898696cSWSwH','warnings','dir','skill','errors'];a45_0x5911=function(){return _0xc1cfd2;};return a45_0x5911();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x2bf7(_0x277d72,_0x2897b6){_0x277d72=_0x277d72-0x65;const _0x106e01=a46_0x106e();let _0x2bf7c2=_0x106e01[_0x277d72];return _0x2bf7c2;}const a46_0x184ec5=a46_0x2bf7;(function(_0x560976,_0x355580){const _0xfbf64c=a46_0x2bf7,_0x11d0a3=_0x560976();while(!![]){try{const _0x2cf462=parseInt(_0xfbf64c(0x6d))/0x1*(parseInt(_0xfbf64c(0x6c))/0x2)+parseInt(_0xfbf64c(0x74))/0x3*(parseInt(_0xfbf64c(0x7e))/0x4)+parseInt(_0xfbf64c(0x79))/0x5+parseInt(_0xfbf64c(0x69))/0x6*(-parseInt(_0xfbf64c(0x80))/0x7)+parseInt(_0xfbf64c(0x6b))/0x8*(parseInt(_0xfbf64c(0x78))/0x9)+parseInt(_0xfbf64c(0x84))/0xa+-parseInt(_0xfbf64c(0x76))/0xb;if(_0x2cf462===_0x355580)break;else _0x11d0a3['push'](_0x11d0a3['shift']());}catch(_0x543290){_0x11d0a3['push'](_0x11d0a3['shift']());}}}(a46_0x106e,0x359b7));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a46_0x184ec5(0x65),'type':'string','description':a46_0x184ec5(0x85)};export const SCOPE_FLAG={'name':'scope','type':a46_0x184ec5(0x87),'description':a46_0x184ec5(0x6a),'enum':[a46_0x184ec5(0x70),'personal','company']};function a46_0x106e(){const _0x3d3c83=['force','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','all','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','name','1056843YenMeR','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','12708234JrbmDL','Continue\x20company\x20Skill\x20push\x20when\x20SkillHub\x20validation\x20reports\x20warnings','4518sfGXTr','1839565LtcuGU','personal','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','confirm-warnings','4crjmwT','scope','294wGhZPx','boolean','dir','local','2623940FadamX','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','string','target','write','code','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Skill\x20template\x20type','Local\x20Skill\x20directory\x20containing\x20SKILL.md','21336GcZOlc','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','1872oZdcqR','2aKBTDQ','424165yulQdx'];a46_0x106e=function(){return _0x3d3c83;};return a46_0x106e();}export const PUSH_SCOPE_FLAG={'name':a46_0x184ec5(0x7f),'type':a46_0x184ec5(0x87),'description':a46_0x184ec5(0x7c),'default':'personal','enum':[a46_0x184ec5(0x7a),'company']};export const LIST_SCOPE_FLAG={'name':'scope','type':'string','description':a46_0x184ec5(0x75),'enum':[a46_0x184ec5(0x70),'personal','company']};export const LOCAL_FLAG={'name':a46_0x184ec5(0x83),'type':a46_0x184ec5(0x81),'description':a46_0x184ec5(0x86)};export const DIR_FLAG={'name':a46_0x184ec5(0x82),'type':'string','required':!![],'description':a46_0x184ec5(0x68)};export const CREATE_NAME_FLAG={'name':a46_0x184ec5(0x73),'type':a46_0x184ec5(0x87),'required':!![],'description':a46_0x184ec5(0x7b),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a46_0x184ec5(0x72)}};export const TYPE_FLAG={'name':'type','type':a46_0x184ec5(0x87),'description':a46_0x184ec5(0x67),'default':a46_0x184ec5(0x89),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a46_0x184ec5(0x88),'type':a46_0x184ec5(0x87),'description':a46_0x184ec5(0x6f),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a46_0x184ec5(0x6e),'type':'boolean','description':a46_0x184ec5(0x71)};export const CONFIRM_WARNINGS_FLAG={'name':a46_0x184ec5(0x7d),'type':'boolean','description':a46_0x184ec5(0x77)};export const STRICT_FLAG={'name':'strict','type':a46_0x184ec5(0x81),'description':a46_0x184ec5(0x66)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x243e2d,_0x2ae774){const _0x4885d1=a47_0x1638,_0x24aaac=_0x243e2d();while(!![]){try{const _0x1b36c0=parseInt(_0x4885d1(0xe8))/0x1*(-parseInt(_0x4885d1(0xee))/0x2)+parseInt(_0x4885d1(0xe7))/0x3+parseInt(_0x4885d1(0xeb))/0x4*(parseInt(_0x4885d1(0xe6))/0x5)+parseInt(_0x4885d1(0xe5))/0x6+-parseInt(_0x4885d1(0xed))/0x7+parseInt(_0x4885d1(0xe9))/0x8*(-parseInt(_0x4885d1(0xef))/0x9)+-parseInt(_0x4885d1(0xec))/0xa*(-parseInt(_0x4885d1(0xea))/0xb);if(_0x1b36c0===_0x2ae774)break;else _0x24aaac['push'](_0x24aaac['shift']());}catch(_0x2c7310){_0x24aaac['push'](_0x24aaac['shift']());}}}(a47_0x3366,0xe1371));function a47_0x1638(_0x594fed,_0x31e0c1){_0x594fed=_0x594fed-0xe5;const _0x336603=a47_0x3366();let _0x163811=_0x336603[_0x594fed];return _0x163811;}import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];function a47_0x3366(){const _0x5c74fe=['673223vfidtn','8bkBfBf','22FcxLGn','116tZnZAX','12563840eqOONt','7787829BJHtQB','2jZhpiD','15196824JEXjxG','7146684HzVzmS','29125VvsAgd','1571940CAsUpl'];a47_0x3366=function(){return _0x5c74fe;};return a47_0x3366();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5d0951,_0x3db661){var _0x1d4ab9=a48_0x1487,_0x427d59=_0x5d0951();while(!![]){try{var _0x4d848e=-parseInt(_0x1d4ab9(0xc1))/0x1*(-parseInt(_0x1d4ab9(0xc8))/0x2)+parseInt(_0x1d4ab9(0xc9))/0x3*(-parseInt(_0x1d4ab9(0xc6))/0x4)+-parseInt(_0x1d4ab9(0xc3))/0x5*(-parseInt(_0x1d4ab9(0xc0))/0x6)+parseInt(_0x1d4ab9(0xbb))/0x7*(-parseInt(_0x1d4ab9(0xc7))/0x8)+-parseInt(_0x1d4ab9(0xc5))/0x9*(parseInt(_0x1d4ab9(0xb9))/0xa)+-parseInt(_0x1d4ab9(0xbd))/0xb*(-parseInt(_0x1d4ab9(0xbe))/0xc)+parseInt(_0x1d4ab9(0xbc))/0xd;if(_0x4d848e===_0x3db661)break;else _0x427d59['push'](_0x427d59['shift']());}catch(_0x6aca16){_0x427d59['push'](_0x427d59['shift']());}}}(a48_0x1f95,0xa7f41));function a48_0x1f95(){var _0x4913ec=['object','845035GoZlVF','files','948123zLNfVS','750508NwiLQL','2165616zpUbwU','2IjHVuY','21nLsCeR','isArray','string','ossPath','10WbtSMu','path','21hyRfKk','5504733zMBkgH','10204546aLYZvy','12oizkJE','SKILL.md','42HSKVvH','384603MAvEmH'];a48_0x1f95=function(){return _0x4913ec;};return a48_0x1f95();}function a48_0x1487(_0x209e44,_0x25d8d7){_0x209e44=_0x209e44-0xb8;var _0x1f9591=a48_0x1f95();var _0x14870d=_0x1f9591[_0x209e44];return _0x14870d;}export function isPackageBackedManifest(_0x2c3f79){var _0xab7d77=a48_0x1487;return!!_0x2c3f79&&typeof _0x2c3f79===_0xab7d77(0xc2)&&!Array['isArray'](_0x2c3f79)&&typeof _0x2c3f79[_0xab7d77(0xb8)]===_0xab7d77(0xcb)&&_0x2c3f79[_0xab7d77(0xb8)]['length']>0x0&&Array[_0xab7d77(0xca)](_0x2c3f79['files']);}export function isMultiFileManifest(_0x215faf){var _0x4f3d1a=a48_0x1487;return!!_0x215faf&&typeof _0x215faf===_0x4f3d1a(0xc2)&&!Array[_0x4f3d1a(0xca)](_0x215faf)&&Array[_0x4f3d1a(0xca)](_0x215faf[_0x4f3d1a(0xc4)])&&_0x215faf[_0x4f3d1a(0xc4)]['some'](_0x199f7b=>_0x199f7b[_0x4f3d1a(0xba)]!==_0x4f3d1a(0xbf));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x29c7d5,_0x42786c){const _0x3c8733=a49_0x1aba,_0x25468d=_0x29c7d5();while(!![]){try{const _0x48dd53=parseInt(_0x3c8733(0x1db))/0x1*(-parseInt(_0x3c8733(0x1c3))/0x2)+parseInt(_0x3c8733(0x1da))/0x3*(-parseInt(_0x3c8733(0x1e0))/0x4)+-parseInt(_0x3c8733(0x1ee))/0x5*(parseInt(_0x3c8733(0x1b6))/0x6)+-parseInt(_0x3c8733(0x1e8))/0x7*(-parseInt(_0x3c8733(0x1c5))/0x8)+parseInt(_0x3c8733(0x1ea))/0x9*(-parseInt(_0x3c8733(0x1be))/0xa)+parseInt(_0x3c8733(0x1e7))/0xb*(-parseInt(_0x3c8733(0x1bf))/0xc)+-parseInt(_0x3c8733(0x1cd))/0xd*(-parseInt(_0x3c8733(0x1d8))/0xe);if(_0x48dd53===_0x42786c)break;else _0x25468d['push'](_0x25468d['shift']());}catch(_0x4f31e8){_0x25468d['push'](_0x25468d['shift']());}}}(a49_0x1a8d,0x32a4e));function a49_0x1a8d(){const _0x3959ae=['../../core/api-client.js','222vJRXVW','/api/cli/v1/skills/','8oZWgUV','validation','\x20Skill\x20','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','status','payload','../../skills/runtime-skill-sync.js','13IPrtVD','personal','Updated\x20personal\x20Skill\x20','trim','bool','PRIVATE','appcode','path','resolvedVersion','skillCode','savedSkill','14997318EksPbE','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','3SvhEdP','3559VqRZkU','publishInput','warnings','errors','Submitted\x20company\x20Skill\x20','1262064VdRzPZ','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','Created\x20personal\x20Skill\x20','unknown','existing','confirm-warnings','accessKey','99QoMDHC','1209453dDRDbk','(unknown)','50040SxlZPh','length','files','scope','10bjnehQ','company','/publish','NAMESPACE_ONLY','valid','\x20for\x20review','input','str','submitted','version','589812iFgRBz','Company','Personal','confirmWarnings','remoteForPreflight','join','dir','appCode','190hxHaUR','31692eJVmKU','Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'];a49_0x1a8d=function(){return _0x3959ae;};return a49_0x1a8d();}import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';function a49_0x1aba(_0xc7592a,_0x232441){_0xc7592a=_0xc7592a-0x1b3;const _0x1a8dbf=a49_0x1a8d();let _0x1abae0=_0x1a8dbf[_0xc7592a];return _0x1abae0;}import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x552065){const _0x908dbe=a49_0x1aba,{getRuntimeSkillByCode:_0x1daf7e,validateRuntimeSkillPublish:_0x277bd9}=await import(_0x908dbe(0x1c2)),{readPushDirectory:_0x2c06c9,resolvePushDirectoryIdentity:_0x5d1d76}=await import(_0x908dbe(0x1cc));if(!_0x552065['accessKey'])throw CliErrors['authRequired']();const _0x15dae0=resolvePushScope(_0x552065),_0x4d10e8=validateSkillDirectory(_0x552065[_0x908dbe(0x1b3)]('dir'));throwIfSkillValidationFailed(_0x4d10e8);const _0x53d8cb=_0x5d1d76(_0x4d10e8['dir'],_0x552065[_0x908dbe(0x1bd)],remoteFirstMetadataOptions()),_0x5a62e8=await _0x1daf7e(_0x552065['appCode'],_0x53d8cb[_0x908dbe(0x1d6)]);throwIfBuiltinPushTarget(_0x5a62e8);if(_0x15dae0===_0x908dbe(0x1ef)){const _0x2afd5c=_0x2c06c9(_0x4d10e8['dir'],_0x552065['appCode'],remoteMissingCompanyReadOptions()),_0x3f4338=await _0x277bd9(_0x552065[_0x908dbe(0x1bd)],_0x2afd5c[_0x908dbe(0x1f4)],{'visibility':_0x908dbe(0x1f1)});return{'method':'POST','url':_0x908dbe(0x1c4)+_0x552065[_0x908dbe(0x1bd)]+'/publish/validate','body':{'skillCode':_0x2afd5c[_0x908dbe(0x1d6)],'visibility':_0x908dbe(0x1f1),'valid':_0x3f4338[_0x908dbe(0x1f2)],'errors':_0x3f4338[_0x908dbe(0x1de)],'warnings':_0x3f4338[_0x908dbe(0x1dd)],'resolvedSlug':_0x3f4338['resolvedSlug'],'resolvedVersion':_0x3f4338[_0x908dbe(0x1d5)]},'description':_0x908dbe(0x1c1)};}if(_0x5a62e8&&_0x5a62e8[_0x908dbe(0x1ed)]!==_0x908dbe(0x1ce))throw CliErrors['validation'](_0x908dbe(0x1c9)+_0x53d8cb['skillCode']+'\x20has\x20scope=\x22'+(_0x5a62e8[_0x908dbe(0x1ed)]??_0x908dbe(0x1e3))+'\x22.');const _0x2328f9=_0x2c06c9(_0x4d10e8[_0x908dbe(0x1bc)],_0x552065[_0x908dbe(0x1bd)],_0x5a62e8?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':'POST','url':_0x908dbe(0x1c4)+_0x552065[_0x908dbe(0x1bd)]+_0x908dbe(0x1f0),'body':{'skillCode':_0x2328f9[_0x908dbe(0x1d6)],'visibility':_0x908dbe(0x1d2),'files':_0x2328f9[_0x908dbe(0x1f4)]['files']?.[_0x908dbe(0x1ec)]['map'](_0xe7be21=>_0xe7be21[_0x908dbe(0x1d4)])??[]},'description':_0x908dbe(0x1c0)};}export async function skillPushExecute(_0x413009){const _0x3e2d83=a49_0x1aba,{createPersonalRuntimeSkill:_0x31e481,downloadRuntimeSkillPackage:_0xcbd817,getRuntimeSkillByCode:_0x4de575,publishCompanyRuntimeSkill:_0x21a639,updatePersonalRuntimeSkill:_0x4035ab,validateRuntimeSkillPublish:_0x360538}=await import(_0x3e2d83(0x1c2)),{verifyRuntimeSkillPackage:_0x127dfb,verifyRuntimeSkillBundle:_0x4d1846,readPushDirectory:_0x2a903d,refreshPushDirectoryMetadataFromRemote:_0x5b1ede,recordPushedRuntimeSkill:_0x4b386c,resolvePushDirectoryIdentity:_0x192e3a}=await import(_0x3e2d83(0x1cc));if(!_0x413009[_0x3e2d83(0x1e6)])throw CliErrors['authRequired']();const _0xa7344f=resolvePushScope(_0x413009),_0xf7103e=validateSkillDirectory(_0x413009[_0x3e2d83(0x1b3)](_0x3e2d83(0x1bc)));throwIfSkillValidationFailed(_0xf7103e);const _0x27f968=_0xf7103e['dir'];let _0x4cf68c;if(_0xa7344f==='company'){const _0x4e2bf0=_0x192e3a(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],remoteFirstMetadataOptions()),_0x2b8f0b=await _0x4de575(_0x413009[_0x3e2d83(0x1bd)],_0x4e2bf0['skillCode']);throwIfBuiltinPushTarget(_0x2b8f0b);if(_0x2b8f0b)_0x5b1ede(_0x27f968,_0x2b8f0b,_0x413009['appCode']);const _0x3529d3=_0x2a903d(_0x27f968,_0x413009['appCode'],_0x2b8f0b?{'targetScope':_0x3e2d83(0x1ef),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x4cf68c={'scope':_0x3e2d83(0x1ef),'payload':_0x3529d3,'publishInput':_0x3529d3['input'],'remoteForPreflight':_0x2b8f0b,'warnings':[]};}else{const _0x3c5bb6=_0x413009[_0x3e2d83(0x1b3)](_0x3e2d83(0x1d3))[_0x3e2d83(0x1d0)](),_0x229e96=Boolean(_0x3c5bb6),_0x5f1a74=allowRetargetArgs(_0x229e96),_0x4d08a1=_0x192e3a(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],{...remoteFirstMetadataOptions(),..._0x5f1a74[0x0]}),_0x52b3fc=await _0x4de575(_0x413009['appCode'],_0x4d08a1[_0x3e2d83(0x1d6)]);throwIfBuiltinPushTarget(_0x52b3fc);if(_0x52b3fc){if(_0x52b3fc[_0x3e2d83(0x1ed)]!==_0x3e2d83(0x1ce)){if(_0x229e96)throw CliErrors[_0x3e2d83(0x1c6)](_0x3e2d83(0x1c9)+_0x4d08a1[_0x3e2d83(0x1d6)]+'\x20has\x20scope=\x22'+(_0x52b3fc['scope']??_0x3e2d83(0x1e3))+'\x22.');_0x5b1ede(_0x27f968,_0x52b3fc,_0x413009['appCode']);}else!_0x229e96&&_0x5b1ede(_0x27f968,_0x52b3fc,_0x413009[_0x3e2d83(0x1bd)]);}const _0x4352a8=_0x2a903d(_0x27f968,_0x413009[_0x3e2d83(0x1bd)],_0x52b3fc?remotePersonalReadOptions(_0x229e96,_0x5f1a74[0x0]):remoteMissingPersonalReadOptions(_0x5f1a74[0x0])),_0x3b3624=_0x52b3fc?.[_0x3e2d83(0x1ed)]===_0x3e2d83(0x1ce)&&_0x52b3fc['skillCode']===_0x4352a8['skillCode']?_0x52b3fc:undefined,_0x3df2b4=_0x229e96&&_0x3b3624?withRetargetExistingMetadata(_0x4352a8[_0x3e2d83(0x1f4)],_0x3b3624,{'preferInputSkillName':Boolean(_0x4352a8['frontmatterDisplayName'])}):_0x4352a8[_0x3e2d83(0x1f4)],_0x23be58=_0x229e96?buildRetargetWarning(_0x4d08a1['metadata'],_0x413009[_0x3e2d83(0x1bd)]):[];_0x4cf68c={'scope':_0x3e2d83(0x1ce),'payload':_0x4352a8,'publishInput':_0x3df2b4,'remoteForPreflight':_0x3b3624,'existing':_0x3b3624,'warnings':[..._0xf7103e[_0x3e2d83(0x1dd)],..._0x23be58]};}const _0x1e5129=await runRemoteContentPreflight({'scope':_0x4cf68c['scope'],'remote':_0x4cf68c[_0x3e2d83(0x1ba)],'publishInput':_0x4cf68c[_0x3e2d83(0x1dc)],'skillCode':_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)],'appCode':_0x413009[_0x3e2d83(0x1bd)],'downloadRuntimeSkillPackage':_0xcbd817,'verifyRuntimeSkillBundle':_0x4d1846});if(_0x1e5129[_0x3e2d83(0x1ca)]==='identical')return _0x4cf68c[_0x3e2d83(0x1ed)]===_0x3e2d83(0x1ef)?_0x4b386c(_0x27f968,_0x1e5129[_0x3e2d83(0x1d7)],_0x413009['appCode'],{'scope':_0x3e2d83(0x1ef)}):_0x4b386c(_0x27f968,_0x1e5129['savedSkill'],_0x413009[_0x3e2d83(0x1bd)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1e5129[_0x3e2d83(0x1d7)]),'scope':_0x4cf68c[_0x3e2d83(0x1ed)],..._0x4cf68c[_0x3e2d83(0x1ed)]==='personal'?{'warnings':_0x4cf68c['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x4cf68c['scope'])+_0x3e2d83(0x1c7)+_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)]+_0x3e2d83(0x1e1)};if(_0x4cf68c['scope']===_0x3e2d83(0x1ef)){const _0x5470b6=await _0x360538(_0x413009['appCode'],_0x4cf68c[_0x3e2d83(0x1dc)],{'visibility':_0x3e2d83(0x1f1)});throwIfPublishValidationFailed(_0x4cf68c['payload'][_0x3e2d83(0x1d6)],_0x5470b6);const _0x284b86=_0x413009[_0x3e2d83(0x1d1)](_0x3e2d83(0x1e5))||_0x413009[_0x3e2d83(0x1d1)](_0x3e2d83(0x1b9));if(_0x5470b6[_0x3e2d83(0x1dd)][_0x3e2d83(0x1eb)]>0x0&&!_0x284b86)throw CliErrors['validation'](_0x3e2d83(0x1d9)+_0x4cf68c['payload'][_0x3e2d83(0x1d6)]+'.',_0x3e2d83(0x1c8)+_0x5470b6[_0x3e2d83(0x1dd)][_0x3e2d83(0x1bb)](';\x20'));const _0x504125=await _0x21a639(_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c[_0x3e2d83(0x1dc)],{'confirmWarnings':_0x284b86});return _0x4b386c(_0x27f968,{..._0x504125,'files':_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)]},_0x413009[_0x3e2d83(0x1bd)],{'scope':_0x3e2d83(0x1ef)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x504125),'scope':_0x3e2d83(0x1ef),'reviewState':_0x3e2d83(0x1b4),'submittedForReview':!![],'validation':{'warnings':_0x5470b6[_0x3e2d83(0x1dd)]}},'message':_0x3e2d83(0x1df)+_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)]+'\x20version\x20'+(_0x504125[_0x3e2d83(0x1b5)]??_0x3e2d83(0x1e9))+_0x3e2d83(0x1f3)};}const _0x143703=_0x4cf68c[_0x3e2d83(0x1e4)]?await _0x4035ab(_0x4cf68c[_0x3e2d83(0x1cb)][_0x3e2d83(0x1d6)],_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c['publishInput']):await _0x31e481(_0x413009[_0x3e2d83(0x1bd)],_0x4cf68c[_0x3e2d83(0x1dc)]);let _0x395acd=_0x143703;if(isMultiFileManifest(_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)])){const _0x2bd167=await _0xcbd817(_0x3e2d83(0x1ce),_0x143703['skillCode']||_0x4cf68c[_0x3e2d83(0x1cb)]['skillCode'],_0x413009[_0x3e2d83(0x1bd)]);_0x4d1846(_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)],_0x2bd167),_0x395acd={..._0x143703,'files':_0x4cf68c[_0x3e2d83(0x1dc)][_0x3e2d83(0x1ec)]};}else{if(isPackageBackedManifest(_0x143703[_0x3e2d83(0x1ec)])){const _0x2a7c09=await _0xcbd817(_0x3e2d83(0x1ce),_0x143703[_0x3e2d83(0x1d6)]||_0x4cf68c['payload'][_0x3e2d83(0x1d6)],_0x413009[_0x3e2d83(0x1bd)]);_0x127dfb(_0x143703[_0x3e2d83(0x1ec)],_0x2a7c09);}}return _0x4b386c(_0x27f968,_0x395acd,_0x413009[_0x3e2d83(0x1bd)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x143703),'warnings':_0x4cf68c[_0x3e2d83(0x1dd)]},'message':_0x4cf68c['existing']?_0x3e2d83(0x1cf)+_0x4cf68c['payload'][_0x3e2d83(0x1d6)]:_0x3e2d83(0x1e2)+_0x4cf68c[_0x3e2d83(0x1cb)]['skillCode']};}function scopeLabel(_0x10fd9b){const _0x395d80=a49_0x1aba;return _0x10fd9b==='company'?_0x395d80(0x1b7):_0x395d80(0x1b8);}
|
|
1
|
+
function a49_0x4e36(){const _0x3626dd=['files','frontmatterDisplayName','Updated\x20personal\x20Skill\x20','2185295XwZobD','personal','savedSkill','2213076oKeDoD','remoteForPreflight','confirmWarnings','company','payload','skillCode','validation','length','477433lAKGvt','\x20has\x20scope=\x22','../../skills/runtime-skill-sync.js','appcode','warnings','6418335WYeYbU','../../core/api-client.js','11yWJTCx','resolvedVersion','valid','PRIVATE','accessKey','dir','scope','9jUWfEr','bool','Personal','join','input','version','/api/cli/v1/skills/','str','authRequired','metadata','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','resolvedSlug','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','submitted','NAMESPACE_ONLY','\x20version\x20','Created\x20personal\x20Skill\x20','POST','publishInput','(unknown)','confirm-warnings','existing','8152rFAulb','32500760wXQeYe','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20','Company','948RJlFKQ','appCode','6zHoAoz','\x20for\x20review','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','\x20Skill\x20','unknown','4807272wKortG','map','identical','path'];a49_0x4e36=function(){return _0x3626dd;};return a49_0x4e36();}(function(_0x2eab48,_0x2a24ba){const _0x37d93b=a49_0x4c99,_0x216fcf=_0x2eab48();while(!![]){try{const _0x5e502a=-parseInt(_0x37d93b(0x1c1))/0x1+-parseInt(_0x37d93b(0x1fb))/0x2+parseInt(_0x37d93b(0x1ea))/0x3*(parseInt(_0x37d93b(0x1e6))/0x4)+-parseInt(_0x37d93b(0x1c6))/0x5+parseInt(_0x37d93b(0x1ec))/0x6*(parseInt(_0x37d93b(0x1f8))/0x7)+-parseInt(_0x37d93b(0x1f1))/0x8*(parseInt(_0x37d93b(0x1cf))/0x9)+parseInt(_0x37d93b(0x1e7))/0xa*(parseInt(_0x37d93b(0x1c8))/0xb);if(_0x5e502a===_0x2a24ba)break;else _0x216fcf['push'](_0x216fcf['shift']());}catch(_0x4155ac){_0x216fcf['push'](_0x216fcf['shift']());}}}(a49_0x4e36,0xb41ba));function a49_0x4c99(_0x36a99f,_0x4b937e){_0x36a99f=_0x36a99f-0x1bb;const _0x4e36d4=a49_0x4e36();let _0x4c99af=_0x4e36d4[_0x36a99f];return _0x4c99af;}import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x46d62b){const _0x795212=a49_0x4c99,{getRuntimeSkillByCode:_0x21847d,validateRuntimeSkillPublish:_0x2aac51}=await import(_0x795212(0x1c7)),{readPushDirectory:_0x587fef,resolvePushDirectoryIdentity:_0x4c200a}=await import(_0x795212(0x1c3));if(!_0x46d62b['accessKey'])throw CliErrors[_0x795212(0x1d7)]();const _0x2a36f4=resolvePushScope(_0x46d62b),_0xe78c3=validateSkillDirectory(_0x46d62b[_0x795212(0x1d6)](_0x795212(0x1cd)));throwIfSkillValidationFailed(_0xe78c3);const _0x179a0b=_0x4c200a(_0xe78c3[_0x795212(0x1cd)],_0x46d62b[_0x795212(0x1eb)],remoteFirstMetadataOptions()),_0x4c8895=await _0x21847d(_0x46d62b[_0x795212(0x1eb)],_0x179a0b[_0x795212(0x1be)]);throwIfBuiltinPushTarget(_0x4c8895);if(_0x2a36f4===_0x795212(0x1bc)){const _0x54654d=_0x587fef(_0xe78c3[_0x795212(0x1cd)],_0x46d62b['appCode'],remoteMissingCompanyReadOptions()),_0x41a89c=await _0x2aac51(_0x46d62b[_0x795212(0x1eb)],_0x54654d[_0x795212(0x1d3)],{'visibility':'NAMESPACE_ONLY'});return{'method':_0x795212(0x1e1),'url':_0x795212(0x1d5)+_0x46d62b[_0x795212(0x1eb)]+'/publish/validate','body':{'skillCode':_0x54654d[_0x795212(0x1be)],'visibility':'NAMESPACE_ONLY','valid':_0x41a89c[_0x795212(0x1ca)],'errors':_0x41a89c['errors'],'warnings':_0x41a89c[_0x795212(0x1c5)],'resolvedSlug':_0x41a89c[_0x795212(0x1da)],'resolvedVersion':_0x41a89c[_0x795212(0x1c9)]},'description':_0x795212(0x1d9)};}if(_0x4c8895&&_0x4c8895[_0x795212(0x1ce)]!=='personal')throw CliErrors[_0x795212(0x1bf)](_0x795212(0x1dc)+_0x179a0b[_0x795212(0x1be)]+_0x795212(0x1c2)+(_0x4c8895[_0x795212(0x1ce)]??_0x795212(0x1f0))+'\x22.');const _0x217a79=_0x587fef(_0xe78c3[_0x795212(0x1cd)],_0x46d62b['appCode'],_0x4c8895?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':_0x795212(0x1e1),'url':_0x795212(0x1d5)+_0x46d62b[_0x795212(0x1eb)]+'/publish','body':{'skillCode':_0x217a79[_0x795212(0x1be)],'visibility':_0x795212(0x1cb),'files':_0x217a79[_0x795212(0x1d3)]['files']?.['files'][_0x795212(0x1f2)](_0x2e9d9f=>_0x2e9d9f[_0x795212(0x1f4)])??[]},'description':'Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}export async function skillPushExecute(_0x2064d3){const _0x12ee8c=a49_0x4c99,{createPersonalRuntimeSkill:_0x161aed,downloadRuntimeSkillPackage:_0xfaca56,getRuntimeSkillByCode:_0x9d3f46,publishCompanyRuntimeSkill:_0x42f7ca,updatePersonalRuntimeSkill:_0x2888bb,validateRuntimeSkillPublish:_0x35d1c4}=await import(_0x12ee8c(0x1c7)),{verifyRuntimeSkillPackage:_0x23b904,verifyRuntimeSkillBundle:_0x3a58f2,readPushDirectory:_0x2eecb8,refreshPushDirectoryMetadataFromRemote:_0x21046d,recordPushedRuntimeSkill:_0x12b433,resolvePushDirectoryIdentity:_0x2b5e25}=await import(_0x12ee8c(0x1c3));if(!_0x2064d3[_0x12ee8c(0x1cc)])throw CliErrors[_0x12ee8c(0x1d7)]();const _0x5e9263=resolvePushScope(_0x2064d3),_0x63f48e=validateSkillDirectory(_0x2064d3[_0x12ee8c(0x1d6)]('dir'));throwIfSkillValidationFailed(_0x63f48e);const _0x256490=_0x63f48e[_0x12ee8c(0x1cd)];let _0x11a122;if(_0x5e9263===_0x12ee8c(0x1bc)){const _0x36ed3a=_0x2b5e25(_0x256490,_0x2064d3[_0x12ee8c(0x1eb)],remoteFirstMetadataOptions()),_0x39f60c=await _0x9d3f46(_0x2064d3[_0x12ee8c(0x1eb)],_0x36ed3a[_0x12ee8c(0x1be)]);throwIfBuiltinPushTarget(_0x39f60c);if(_0x39f60c)_0x21046d(_0x256490,_0x39f60c,_0x2064d3[_0x12ee8c(0x1eb)]);const _0x4e8a6f=_0x2eecb8(_0x256490,_0x2064d3['appCode'],_0x39f60c?{'targetScope':'company','ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x11a122={'scope':_0x12ee8c(0x1bc),'payload':_0x4e8a6f,'publishInput':_0x4e8a6f[_0x12ee8c(0x1d3)],'remoteForPreflight':_0x39f60c,'warnings':[]};}else{const _0xa5390c=_0x2064d3[_0x12ee8c(0x1d6)](_0x12ee8c(0x1c4))['trim'](),_0x5d959c=Boolean(_0xa5390c),_0x2a68f9=allowRetargetArgs(_0x5d959c),_0x4c9418=_0x2b5e25(_0x256490,_0x2064d3[_0x12ee8c(0x1eb)],{...remoteFirstMetadataOptions(),..._0x2a68f9[0x0]}),_0x3ba921=await _0x9d3f46(_0x2064d3[_0x12ee8c(0x1eb)],_0x4c9418[_0x12ee8c(0x1be)]);throwIfBuiltinPushTarget(_0x3ba921);if(_0x3ba921){if(_0x3ba921[_0x12ee8c(0x1ce)]!==_0x12ee8c(0x1f9)){if(_0x5d959c)throw CliErrors[_0x12ee8c(0x1bf)](_0x12ee8c(0x1dc)+_0x4c9418[_0x12ee8c(0x1be)]+_0x12ee8c(0x1c2)+(_0x3ba921[_0x12ee8c(0x1ce)]??_0x12ee8c(0x1f0))+'\x22.');_0x21046d(_0x256490,_0x3ba921,_0x2064d3['appCode']);}else!_0x5d959c&&_0x21046d(_0x256490,_0x3ba921,_0x2064d3['appCode']);}const _0x286228=_0x2eecb8(_0x256490,_0x2064d3['appCode'],_0x3ba921?remotePersonalReadOptions(_0x5d959c,_0x2a68f9[0x0]):remoteMissingPersonalReadOptions(_0x2a68f9[0x0])),_0x3c6075=_0x3ba921?.[_0x12ee8c(0x1ce)]==='personal'&&_0x3ba921[_0x12ee8c(0x1be)]===_0x286228[_0x12ee8c(0x1be)]?_0x3ba921:undefined,_0x3484c6=_0x5d959c&&_0x3c6075?withRetargetExistingMetadata(_0x286228['input'],_0x3c6075,{'preferInputSkillName':Boolean(_0x286228[_0x12ee8c(0x1f6)])}):_0x286228['input'],_0x15a621=_0x5d959c?buildRetargetWarning(_0x4c9418[_0x12ee8c(0x1d8)],_0x2064d3['appCode']):[];_0x11a122={'scope':_0x12ee8c(0x1f9),'payload':_0x286228,'publishInput':_0x3484c6,'remoteForPreflight':_0x3c6075,'existing':_0x3c6075,'warnings':[..._0x63f48e[_0x12ee8c(0x1c5)],..._0x15a621]};}const _0x2ac69a=await runRemoteContentPreflight({'scope':_0x11a122[_0x12ee8c(0x1ce)],'remote':_0x11a122[_0x12ee8c(0x1fc)],'publishInput':_0x11a122['publishInput'],'skillCode':_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)],'appCode':_0x2064d3[_0x12ee8c(0x1eb)],'downloadRuntimeSkillPackage':_0xfaca56,'verifyRuntimeSkillBundle':_0x3a58f2});if(_0x2ac69a['status']===_0x12ee8c(0x1f3))return _0x11a122['scope']==='company'?_0x12b433(_0x256490,_0x2ac69a['savedSkill'],_0x2064d3['appCode'],{'scope':_0x12ee8c(0x1bc)}):_0x12b433(_0x256490,_0x2ac69a['savedSkill'],_0x2064d3['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x2ac69a[_0x12ee8c(0x1fa)]),'scope':_0x11a122['scope'],..._0x11a122[_0x12ee8c(0x1ce)]===_0x12ee8c(0x1f9)?{'warnings':_0x11a122[_0x12ee8c(0x1c5)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x11a122[_0x12ee8c(0x1ce)])+_0x12ee8c(0x1ef)+_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)]+_0x12ee8c(0x1db)};if(_0x11a122[_0x12ee8c(0x1ce)]===_0x12ee8c(0x1bc)){const _0x36a4d2=await _0x35d1c4(_0x2064d3[_0x12ee8c(0x1eb)],_0x11a122['publishInput'],{'visibility':_0x12ee8c(0x1de)});throwIfPublishValidationFailed(_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)],_0x36a4d2);const _0xf1498e=_0x2064d3[_0x12ee8c(0x1d0)](_0x12ee8c(0x1e4))||_0x2064d3[_0x12ee8c(0x1d0)](_0x12ee8c(0x1bb));if(_0x36a4d2['warnings'][_0x12ee8c(0x1c0)]>0x0&&!_0xf1498e)throw CliErrors[_0x12ee8c(0x1bf)](_0x12ee8c(0x1ee)+_0x11a122['payload'][_0x12ee8c(0x1be)]+'.',_0x12ee8c(0x1e8)+_0x36a4d2[_0x12ee8c(0x1c5)][_0x12ee8c(0x1d2)](';\x20'));const _0x6fa76e=await _0x42f7ca(_0x2064d3[_0x12ee8c(0x1eb)],_0x11a122[_0x12ee8c(0x1e2)],{'confirmWarnings':_0xf1498e});return _0x12b433(_0x256490,{..._0x6fa76e,'files':_0x11a122[_0x12ee8c(0x1e2)]['files']},_0x2064d3[_0x12ee8c(0x1eb)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x6fa76e),'scope':_0x12ee8c(0x1bc),'reviewState':_0x12ee8c(0x1dd),'submittedForReview':!![],'validation':{'warnings':_0x36a4d2['warnings']}},'message':'Submitted\x20company\x20Skill\x20'+_0x11a122['payload']['skillCode']+_0x12ee8c(0x1df)+(_0x6fa76e[_0x12ee8c(0x1d4)]??_0x12ee8c(0x1e3))+_0x12ee8c(0x1ed)};}const _0x1f69ac=_0x11a122[_0x12ee8c(0x1e5)]?await _0x2888bb(_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)],_0x2064d3[_0x12ee8c(0x1eb)],_0x11a122[_0x12ee8c(0x1e2)]):await _0x161aed(_0x2064d3[_0x12ee8c(0x1eb)],_0x11a122[_0x12ee8c(0x1e2)]);let _0x22dfa2=_0x1f69ac;if(isMultiFileManifest(_0x11a122['publishInput'][_0x12ee8c(0x1f5)])){const _0x4f94d3=await _0xfaca56(_0x12ee8c(0x1f9),_0x1f69ac['skillCode']||_0x11a122['payload'][_0x12ee8c(0x1be)],_0x2064d3['appCode']);_0x3a58f2(_0x11a122['publishInput'][_0x12ee8c(0x1f5)],_0x4f94d3),_0x22dfa2={..._0x1f69ac,'files':_0x11a122[_0x12ee8c(0x1e2)][_0x12ee8c(0x1f5)]};}else{if(isPackageBackedManifest(_0x1f69ac[_0x12ee8c(0x1f5)])){const _0x4b0f14=await _0xfaca56('personal',_0x1f69ac[_0x12ee8c(0x1be)]||_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)],_0x2064d3[_0x12ee8c(0x1eb)]);_0x23b904(_0x1f69ac[_0x12ee8c(0x1f5)],_0x4b0f14);}}return _0x12b433(_0x256490,_0x22dfa2,_0x2064d3[_0x12ee8c(0x1eb)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1f69ac),'warnings':_0x11a122[_0x12ee8c(0x1c5)]},'message':_0x11a122[_0x12ee8c(0x1e5)]?_0x12ee8c(0x1f7)+_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)]:_0x12ee8c(0x1e0)+_0x11a122[_0x12ee8c(0x1bd)][_0x12ee8c(0x1be)]};}function scopeLabel(_0x6652c7){const _0xee9cee=a49_0x4c99;return _0x6652c7==='company'?_0xee9cee(0x1e9):_0xee9cee(0x1d1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d560b,_0x5a2dbc){const _0x17b81f=a50_0x39e7,_0x3dba28=_0x1d560b();while(!![]){try{const _0x1839e4=-parseInt(_0x17b81f(0x1d8))/0x1*(-parseInt(_0x17b81f(0x1ec))/0x2)+parseInt(_0x17b81f(0x1e4))/0x3*(parseInt(_0x17b81f(0x1d9))/0x4)+-parseInt(_0x17b81f(0x1dd))/0x5*(-parseInt(_0x17b81f(0x1e5))/0x6)+parseInt(_0x17b81f(0x1eb))/0x7*(-parseInt(_0x17b81f(0x1f6))/0x8)+parseInt(_0x17b81f(0x1e1))/0x9+-parseInt(_0x17b81f(0x1d2))/0xa+parseInt(_0x17b81f(0x1f2))/0xb*(-parseInt(_0x17b81f(0x1d5))/0xc);if(_0x1839e4===_0x5a2dbc)break;else _0x3dba28['push'](_0x3dba28['shift']());}catch(_0x3cb797){_0x3dba28['push'](_0x3dba28['shift']());}}}(a50_0x3555,0x5927a));function a50_0x3555(){const _0x41a0bd=['1526HtzLil','6100SwMdQU','SkillHub\x20validation\x20returned\x20invalid.','lovrabet.skill.json','company','1420gsXeKR','remote','errors','personal','5816277CQBIfn','(unknown)','Company\x20Skill\x20push\x20validation\x20failed\x20for\x20','669yMgFuj','7782zzqUeC','version','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','content','Builtin\x20Skill\x20','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','413qEfhNz','458NHNOSM','validation','join','appCode','skillCode','publishInput','99TvfwHL','scope','Local\x20Skill\x20metadata\x20appCode\x20','length','13168qdILgX','identical','not-applicable','verifyRuntimeSkillBundle','str','\x20cannot\x20be\x20pushed.','119070kbWYIA','files','different','1639908unDWJV','downloadRuntimeSkillPackage','skill-metadata-appcode-retargeted'];a50_0x3555=function(){return _0x41a0bd;};return a50_0x3555();}import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x4abff4){const _0x48a3ef=a50_0x39e7,_0x4035c3=_0x4abff4[_0x48a3ef(0x1fa)](_0x48a3ef(0x1f3))||'personal';if(_0x4035c3===_0x48a3ef(0x1e0)||_0x4035c3===_0x48a3ef(0x1dc))return _0x4035c3;throw CliErrors[_0x48a3ef(0x1ed)]('skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22'+_0x4035c3+'\x22.');}function a50_0x39e7(_0x354751,_0x2596e2){_0x354751=_0x354751-0x1d2;const _0x3555be=a50_0x3555();let _0x39e719=_0x3555be[_0x354751];return _0x39e719;}export function allowRetargetArgs(_0x1a716a){return _0x1a716a?[{'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(_0x59eeac={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x59eeac};}export function remotePersonalReadOptions(_0x7de996,_0x29342a={}){return{'ignoreInvalidMetadata':!![],..._0x7de996?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x29342a};}export function throwIfBuiltinPushTarget(_0x200344){const _0x26c52d=a50_0x39e7;if(_0x200344?.['scope']!=='builtin')return;throw CliErrors[_0x26c52d(0x1ed)](_0x26c52d(0x1e9)+(_0x200344[_0x26c52d(0x1f0)]??_0x26c52d(0x1e2))+_0x26c52d(0x1fb),_0x26c52d(0x1e7));}export function throwIfPublishValidationFailed(_0x546136,_0xf7000d){const _0xfce169=a50_0x39e7;if(_0xf7000d['valid']&&_0xf7000d[_0xfce169(0x1df)][_0xfce169(0x1f5)]===0x0)return;const _0xdffa32=_0xf7000d[_0xfce169(0x1df)][_0xfce169(0x1f5)]>0x0?_0xf7000d['errors'][_0xfce169(0x1ee)](';\x20'):_0xfce169(0x1da);throw CliErrors[_0xfce169(0x1ed)](_0xfce169(0x1e3)+_0x546136+'.',_0xdffa32);}export function buildRetargetWarning(_0x3cbf6a,_0x3a6d2d){const _0xf39e90=a50_0x39e7;if(!_0x3cbf6a?.['appCode']||_0x3cbf6a['appCode']===_0x3a6d2d)return[];return[{'level':'warning','ruleId':_0xf39e90(0x1d7),'file':_0xf39e90(0x1db),'message':_0xf39e90(0x1f4)+_0x3cbf6a[_0xf39e90(0x1ef)]+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x3a6d2d+'\x20after\x20successful\x20push.','suggestion':_0xf39e90(0x1ea)}];}export async function runRemoteContentPreflight(_0x517257){const _0x39a606=a50_0x39e7;if(!_0x517257[_0x39a606(0x1de)]||_0x517257[_0x39a606(0x1de)][_0x39a606(0x1f3)]!==_0x517257[_0x39a606(0x1f3)]||!_0x517257[_0x39a606(0x1f1)]['files'])return{'status':_0x39a606(0x1f8)};const _0x5cbf80=_0x517257[_0x39a606(0x1de)]['skillCode']||_0x517257['skillCode'];if(!_0x5cbf80)return{'status':'not-applicable'};const _0xa1e7a8=await _0x517257[_0x39a606(0x1d6)](_0x517257['scope'],_0x5cbf80,_0x517257[_0x39a606(0x1ef)],_0x517257[_0x39a606(0x1de)][_0x39a606(0x1e6)]);try{_0x517257[_0x39a606(0x1f9)](_0x517257['publishInput'][_0x39a606(0x1d3)],_0xa1e7a8);}catch{return{'status':_0x39a606(0x1d4)};}return{'status':_0x39a606(0x1f7),'savedSkill':{..._0x517257[_0x39a606(0x1de)],'content':_0x517257[_0x39a606(0x1f1)][_0x39a606(0x1e8)],'files':_0x517257[_0x39a606(0x1f1)][_0x39a606(0x1d3)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x11d96e,_0x4d56a0){const _0x5654ec=a51_0x523f,_0x244a73=_0x11d96e();while(!![]){try{const _0x37030b=-parseInt(_0x5654ec(0x14a))/0x1+-parseInt(_0x5654ec(0x144))/0x2+-parseInt(_0x5654ec(0x152))/0x3*(-parseInt(_0x5654ec(0x14f))/0x4)+parseInt(_0x5654ec(0x145))/0x5+-parseInt(_0x5654ec(0x141))/0x6+-parseInt(_0x5654ec(0x14d))/0x7*(-parseInt(_0x5654ec(0x13f))/0x8)+parseInt(_0x5654ec(0x140))/0x9;if(_0x37030b===_0x4d56a0)break;else _0x244a73['push'](_0x244a73['shift']());}catch(_0x31b615){_0x244a73['push'](_0x244a73['shift']());}}}(a51_0x2d5b,0xdb493));function a51_0x523f(_0x4c626c,_0x170a08){_0x4c626c=_0x4c626c-0x13e;const _0x2d5b5b=a51_0x2d5b();let _0x523f9e=_0x2d5b5b[_0x4c626c];return _0x523f9e;}export function withRetargetExistingMetadata(_0x3180f1,_0x8d3e41,_0x5a1490={}){const _0x2abbae=a51_0x523f,_0x304e1c=_0x5a1490[_0x2abbae(0x148)]?_0x3180f1[_0x2abbae(0x142)]??_0x8d3e41[_0x2abbae(0x142)]:_0x8d3e41[_0x2abbae(0x142)]??_0x3180f1[_0x2abbae(0x142)];return{..._0x3180f1,'skillName':_0x304e1c,'description':_0x8d3e41[_0x2abbae(0x149)]??_0x3180f1[_0x2abbae(0x149)],'tags':Array[_0x2abbae(0x151)](_0x8d3e41['tags'])?_0x8d3e41['tags']:_0x3180f1['tags'],'version':_0x8d3e41[_0x2abbae(0x13e)]??_0x3180f1['version'],'sourceSessionId':_0x8d3e41[_0x2abbae(0x146)]??_0x3180f1[_0x2abbae(0x146)]};}export function buildRetargetWarning(_0x3bc5b1,_0x459009){const _0x5a9727=a51_0x523f;if(!_0x3bc5b1?.[_0x5a9727(0x14b)]||_0x3bc5b1['appCode']===_0x459009)return[];return[{'level':_0x5a9727(0x14c),'ruleId':_0x5a9727(0x147),'file':_0x5a9727(0x14e),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x3bc5b1['appCode']+_0x5a9727(0x150)+_0x459009+'\x20after\x20successful\x20push.','suggestion':_0x5a9727(0x143)}];}function a51_0x2d5b(){const _0x39bf28=['Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','1443702olhkTE','1872640TQcwID','sourceSessionId','skill-metadata-appcode-retargeted','preferInputSkillName','description','1570137YDSViF','appCode','warning','688758fgWAwS','lovrabet.skill.json','328meNrTB','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','isArray','26007XYZMNt','version','16akDQRh','28022148bWBPhY','7233378MzLAlS','skillName'];a51_0x2d5b=function(){return _0x39bf28;};return a51_0x2d5b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c7147,_0x2681b9){const _0x22752f=a52_0x34ba,_0x3685a3=_0x3c7147();while(!![]){try{const _0x45e7de=parseInt(_0x22752f(0x18c))/0x1*(parseInt(_0x22752f(0x181))/0x2)+parseInt(_0x22752f(0x17b))/0x3+parseInt(_0x22752f(0x18a))/0x4*(parseInt(_0x22752f(0x17f))/0x5)+-parseInt(_0x22752f(0x184))/0x6*(parseInt(_0x22752f(0x188))/0x7)+-parseInt(_0x22752f(0x180))/0x8+-parseInt(_0x22752f(0x185))/0x9*(-parseInt(_0x22752f(0x17e))/0xa)+parseInt(_0x22752f(0x17c))/0xb*(parseInt(_0x22752f(0x187))/0xc);if(_0x45e7de===_0x2681b9)break;else _0x3685a3['push'](_0x3685a3['shift']());}catch(_0x453ac9){_0x3685a3['push'](_0x3685a3['shift']());}}}(a52_0x3fea,0x3124e));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x1de31f){const _0x1f4f03=a52_0x34ba,_0x1c278d=_0x1de31f[_0x1f4f03(0x17a)]();if(!_0x1c278d||_0x1c278d==='all')return[_0x1f4f03(0x186),_0x1f4f03(0x17d)];if(_0x1c278d===_0x1f4f03(0x186)||_0x1c278d===_0x1f4f03(0x17d))return[_0x1c278d];throw CliErrors[_0x1f4f03(0x189)](_0x1f4f03(0x183)+_0x1de31f);}export function normalizeListScope(_0x2ff851){const _0x373a54=a52_0x34ba,_0x4d5dea=_0x2ff851[_0x373a54(0x17a)]();if(!_0x4d5dea)return _0x373a54(0x182);if(_0x4d5dea==='personal'||_0x4d5dea===_0x373a54(0x17d)||_0x4d5dea===_0x373a54(0x182))return _0x4d5dea;throw CliErrors[_0x373a54(0x189)](_0x373a54(0x18b)+_0x2ff851);}function a52_0x34ba(_0x4c0f35,_0x5ea0d4){_0x4c0f35=_0x4c0f35-0x17a;const _0x3feadb=a52_0x3fea();let _0x34baa4=_0x3feadb[_0x4c0f35];return _0x34baa4;}export function shouldListScope(_0x462882,_0x1924bd){const _0x4637f4=a52_0x34ba;if(_0x462882===_0x4637f4(0x182))return!![];return _0x462882===_0x1924bd;}export function listScopeToRuntimeScopes(_0x717ea8){const _0x57dfb6=a52_0x34ba;if(_0x717ea8===_0x57dfb6(0x182))return['personal',_0x57dfb6(0x17d)];return[_0x717ea8===_0x57dfb6(0x17d)?'company':_0x717ea8];}function a52_0x3fea(){const _0x5d7df7=['validation','117716SNJoBh','Unsupported\x20Skill\x20list\x20scope:\x20','2MFNecb','trim','499368KXOEBK','11BTauni','company','10pvFojD','5jUUTRh','1353960LYCWOu','76214RGgwJu','all','Unsupported\x20Skill\x20sync\x20scope:\x20','250968dyakfl','657819YSYSwp','personal','3315804ktSYsy','42KORCay'];a52_0x3fea=function(){return _0x5d7df7;};return a52_0x3fea();}export function listScopeToRemoteScope(_0x297c4e){return _0x297c4e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x595af2,_0x20933d){var _0x3c5a55=a53_0x3cfa,_0x3c8660=_0x595af2();while(!![]){try{var _0x51fcc0=parseInt(_0x3c5a55(0xa4))/0x1*(-parseInt(_0x3c5a55(0xac))/0x2)+-parseInt(_0x3c5a55(0xa8))/0x3+parseInt(_0x3c5a55(0xad))/0x4+parseInt(_0x3c5a55(0xae))/0x5+parseInt(_0x3c5a55(0xa6))/0x6*(-parseInt(_0x3c5a55(0x9e))/0x7)+-parseInt(_0x3c5a55(0xb0))/0x8*(-parseInt(_0x3c5a55(0xb4))/0x9)+parseInt(_0x3c5a55(0x9d))/0xa*(parseInt(_0x3c5a55(0xaa))/0xb);if(_0x51fcc0===_0x20933d)break;else _0x3c8660['push'](_0x3c8660['shift']());}catch(_0x599a04){_0x3c8660['push'](_0x3c8660['shift']());}}}(a53_0x186f,0x9268d));export function summarizeRuntimeSkill(_0x49aaf8){var _0x3c1022=a53_0x3cfa;return{'id':_0x49aaf8['id'],'skillCode':_0x49aaf8[_0x3c1022(0xa1)],'skillName':_0x49aaf8[_0x3c1022(0x9f)],'scope':_0x49aaf8['scope'],'version':_0x49aaf8[_0x3c1022(0xa0)],'readonly':_0x49aaf8['readonly']};}function a53_0x3cfa(_0x20448e,_0x199b83){_0x20448e=_0x20448e-0x9d;var _0x186fe1=a53_0x186f();var _0x3cfa80=_0x186fe1[_0x20448e];return _0x3cfa80;}export function summarizeLocalRuntimeSkill(_0x594282){var _0x1318d4=a53_0x3cfa;return{'id':_0x594282['id'],'skillCode':_0x594282[_0x1318d4(0xa1)],'skillName':_0x594282[_0x1318d4(0x9f)],'scope':_0x594282['scope'],'appCode':_0x594282[_0x1318d4(0xa5)],'version':_0x594282['version'],'status':_0x594282[_0x1318d4(0xaf)],'readonly':_0x594282['readonly'],'tags':_0x594282[_0x1318d4(0xa7)],'dir':_0x594282[_0x1318d4(0xb3)],'cacheDir':_0x594282[_0x1318d4(0xa9)],'skillMdPath':_0x594282[_0x1318d4(0xb2)],'metadataPath':_0x594282[_0x1318d4(0xab)],'linkedPaths':_0x594282[_0x1318d4(0xa3)],'contentHash':_0x594282[_0x1318d4(0xb1)],'treeHash':_0x594282[_0x1318d4(0xa2)],'pulledAt':_0x594282['pulledAt']};}function a53_0x186f(){var _0x3b1d08=['888910dJduvC','7VgiVNe','skillName','version','skillCode','treeHash','linkedPaths','239451nVAQCO','appCode','181842OCMjcz','tags','2240403NMldrj','cacheDir','121OiTbuu','metadataPath','6woVldt','2065084EITsgn','141935ACypJr','status','4581560Ijjcpa','contentHash','skillMdPath','dir','9mNohJi'];a53_0x186f=function(){return _0x3b1d08;};return a53_0x186f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x138eb8=a54_0x37dc;(function(_0x450463,_0x2ac216){const _0x8f73e2=a54_0x37dc,_0x2c8a8c=_0x450463();while(!![]){try{const _0x2efca2=parseInt(_0x8f73e2(0x83))/0x1*(parseInt(_0x8f73e2(0x91))/0x2)+parseInt(_0x8f73e2(0x8f))/0x3*(-parseInt(_0x8f73e2(0xa2))/0x4)+parseInt(_0x8f73e2(0x8b))/0x5*(parseInt(_0x8f73e2(0x9c))/0x6)+parseInt(_0x8f73e2(0x98))/0x7*(-parseInt(_0x8f73e2(0x85))/0x8)+parseInt(_0x8f73e2(0x89))/0x9+parseInt(_0x8f73e2(0xa6))/0xa*(-parseInt(_0x8f73e2(0x97))/0xb)+parseInt(_0x8f73e2(0x99))/0xc*(parseInt(_0x8f73e2(0x9d))/0xd);if(_0x2efca2===_0x2ac216)break;else _0x2c8a8c['push'](_0x2c8a8c['shift']());}catch(_0x4df0b0){_0x2c8a8c['push'](_0x2c8a8c['shift']());}}}(a54_0x299a,0x4f81f));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write','read','trainer'];export const DEFAULT_SKILL_TARGET=a54_0x138eb8(0x92);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_0x138eb8(0x9e);export function validateSkillName(_0x35d52c){const _0x2fd287=a54_0x138eb8,_0x68a7a2=_0x35d52c['trim']();if(!SKILL_NAME_PATTERN[_0x2fd287(0x7d)](_0x68a7a2))throw CliErrors[_0x2fd287(0x81)](_0x2fd287(0xa1)+_0x35d52c+_0x2fd287(0xa5),_0x2fd287(0x94));return _0x68a7a2;}function a54_0x37dc(_0x2b6fa2,_0x11bd28){_0x2b6fa2=_0x2b6fa2-0x7d;const _0x299ab7=a54_0x299a();let _0x37dcec=_0x299ab7[_0x2b6fa2];return _0x37dcec;}export function normalizeSkillTemplateType(_0x3db97c){const _0x9d600c=a54_0x138eb8,_0x1a51a9=(_0x3db97c||_0x9d600c(0x86))['trim']()||'write';if(SKILL_TYPES[_0x9d600c(0xa3)](_0x1a51a9))return _0x1a51a9;throw CliErrors['validation'](_0x9d600c(0x9f)+_0x3db97c,'Use\x20one\x20of:\x20'+SKILL_TYPES[_0x9d600c(0x90)](',\x20')+'.');}export function renderSkillTemplate(_0xd9e918){const _0x32ce4f=a54_0x138eb8,_0x2becf0=validateSkillName(_0xd9e918[_0x32ce4f(0x80)]),_0x41d532=normalizeSkillTemplateType(_0xd9e918[_0x32ce4f(0x8d)]),_0x3d9d96=_0xd9e918[_0x32ce4f(0x7e)]??new Date()[_0x32ce4f(0xa4)]();return{'skillName':_0x2becf0,'type':_0x41d532,'files':[{'path':'SKILL.md','content':renderSkillMd(_0x2becf0,_0x41d532,_0x3d9d96)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x2becf0,_0x41d532)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x2becf0,_0x41d532)}]};}function renderSkillMd(_0x59b955,_0x141889,_0x355543){const _0x24a27e=a54_0x138eb8,_0x512765=typeWorkflow(_0x141889);return _0x24a27e(0x82)+_0x59b955+_0x24a27e(0x9a)+_0x141889+_0x24a27e(0xa7)+_0x355543+_0x24a27e(0x95)+_0x59b955+_0x24a27e(0x9b)+_0x512765+'\x0a\x0a'+businessStateSection(_0x141889)+_0x24a27e(0x93);}function renderRuntimeContract(_0x47c4c3,_0x42c63d){const _0x588757=a54_0x138eb8,_0xef003d=_0x42c63d===_0x588757(0x86)?_0x588757(0x96):'';return _0x588757(0x7f)+_0x47c4c3+'\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='+_0x42c63d+'\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'+_0xef003d+'\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';}function renderOutputContract(_0x3c4104,_0x36cef8){const _0x158763=a54_0x138eb8,_0x157822=_0x36cef8===_0x158763(0x86)?'write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。':_0x36cef8+_0x158763(0xa0);return _0x158763(0x87)+_0x3c4104+'\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'+_0x157822+_0x158763(0x84);}function typeWorkflow(_0x15a127){const _0x77ea60=a54_0x138eb8;if(_0x15a127==='read')return _0x77ea60(0x8c);if(_0x15a127===_0x77ea60(0xa8))return _0x77ea60(0x88);return _0x77ea60(0x8e);}function a54_0x299a(){const _0xeb9df1=['146676bEAMMc','3393WkuwEY','references/output-contract.md','Unsupported\x20Skill\x20type:\x20','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','Invalid\x20Skill\x20name:\x20','12uurdeZ','includes','toISOString','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','270khsJiU','\x0a\x20\x20created:\x20\x22','trainer','test','timestamp','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','skillName','validation','---\x0aname:\x20','56662rAXsWY','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','8FVgbTm','write','#\x20Output\x20Contract\x0a\x0a','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','3410136frFndc','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','45XfmCZL','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','type','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','199371ohaaoy','join','4naaCro','.agents/skills','\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','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','245113Ahptgq','1226162PNELad','27108pZbFWk','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\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'];a54_0x299a=function(){return _0xeb9df1;};return a54_0x299a();}function businessStateSection(_0x276ba1){const _0x1c453f=a54_0x138eb8;if(_0x276ba1!==_0x1c453f(0x86))return'';return _0x1c453f(0x8a);}
|