@lovrabet/lovrabet-cli 2.1.10 → 2.1.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_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
|
+
(function(_0x293cfc,_0x589dba){const _0x55699c=a40_0x532c,_0x392b33=_0x293cfc();while(!![]){try{const _0x13b632=parseInt(_0x55699c(0xff))/0x1+parseInt(_0x55699c(0xb3))/0x2+-parseInt(_0x55699c(0xe1))/0x3*(-parseInt(_0x55699c(0xba))/0x4)+-parseInt(_0x55699c(0xe8))/0x5*(-parseInt(_0x55699c(0xd0))/0x6)+-parseInt(_0x55699c(0xee))/0x7*(parseInt(_0x55699c(0xcd))/0x8)+parseInt(_0x55699c(0xdb))/0x9+-parseInt(_0x55699c(0xe2))/0xa;if(_0x13b632===_0x589dba)break;else _0x392b33['push'](_0x392b33['shift']());}catch(_0x3f55aa){_0x392b33['push'](_0x392b33['shift']());}}}(a40_0x5d53,0xdcf72));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_0x5d53(){const _0xe5a9eb=['description','services','5VJBdhU','updatedAt','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','].manifest.','sourceHash','services\x20must\x20be\x20an\x20array','235851TFdLut','CliError','file','slice','Invalid\x20service\x20manifest\x20JSON:\x20','warnings','isArray','Service\x20manifest\x20validation\x20failed:\x0a','join','filePath','digest','push','hex','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','flatMap','startsWith','Service\x20manifest\x20file\x20not\x20found:\x20','1024689XFLbJA','update','localeCompare','version','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','commands','errors','Local\x20service\x20not\x20found:\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','schemaVersion','2722632PuLdRL','invalid','toISOString','Remove\x20or\x20migrate\x20','message','splice','commandCount','5063172DzVREK','utf8','registryIndex','string','target','stringify','manifest','parse','homeDir','ENOENT','empty','Unsupported\x20schemaVersion:\x20','name','code','command','trim','findIndex','Invalid\x20service\x20registry\x20JSON:\x20','validation','152dxKTHI','kind','service','5074530LOxqag','path','serviceCode','missing','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','homeDirName','report','$.services[','length','object','normalizedManifest','507123iuKIyH','importedAt','now','registry','Cannot\x20write\x20service\x20registry:\x20','map','3jnydTa','30086590ZqXqwO','manifests','sha256','].manifest'];a40_0x5d53=function(){return _0xe5a9eb;};return a40_0x5d53();}export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0xdf9368={}){const _0x3e8993=a40_0x532c;return resolve(_0xdf9368[_0x3e8993(0xc2)]??homedir(),PRODUCT_CONFIG[_0x3e8993(0xd5)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3182a5={}){const _0x5435a3=a40_0x532c,_0x133667=getServiceRegistryPath(_0x3182a5);if(!existsSync(_0x133667))return emptyServiceRegistry();try{const _0xc391a2=readFileSync(_0x133667,_0x5435a3(0xbb));if(!_0xc391a2[_0x5435a3(0xc9)]())return emptyServiceRegistry();const _0x27b0d9=JSON[_0x5435a3(0xc1)](_0xc391a2);if(_0x27b0d9[_0x5435a3(0xb2)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation']('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x27b0d9[_0x5435a3(0xb2)]),_0x5435a3(0xb6)+_0x133667+'.');if(!Array[_0x5435a3(0xf4)](_0x27b0d9[_0x5435a3(0xe7)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x27b0d9[_0x5435a3(0xe9)],'services':_0x27b0d9[_0x5435a3(0xe7)]};}catch(_0x347275){if(_0x347275 instanceof Error&&_0x347275[_0x5435a3(0xc6)]===_0x5435a3(0xef))throw _0x347275;throw CliErrors['validation'](_0x5435a3(0xcb)+_0x133667,_0x5435a3(0x103));}}export function writeServiceRegistry(_0x5ddef8,_0x3be21b={}){const _0x4f8033=a40_0x532c,_0x2e67fa=getServiceRegistryPath(_0x3be21b),_0x192864=dirname(_0x2e67fa);!existsSync(_0x192864)&&mkdirSync(_0x192864,{'recursive':!![]});const _0x10dabd=_0x2e67fa+'.tmp';try{writeFileSync(_0x10dabd,JSON[_0x4f8033(0xbf)](_0x5ddef8,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x10dabd,_0x2e67fa);}catch(_0x44ccef){try{unlinkSync(_0x10dabd);}catch{}if(_0x44ccef?.[_0x4f8033(0xc7)]===_0x4f8033(0xc3))throw CliErrors['validation'](_0x4f8033(0xdf)+_0x2e67fa);throw _0x44ccef;}return _0x2e67fa;}function a40_0x532c(_0x578b40,_0x46f585){_0x578b40=_0x578b40-0xb2;const _0x5d5356=a40_0x5d53();let _0x532ccb=_0x5d5356[_0x578b40];return _0x532ccb;}export function loadServiceManifestFromFile(_0x33d142){const _0x4b3566=a40_0x532c,_0x88c2f7=resolve(_0x33d142);if(!existsSync(_0x88c2f7))throw CliErrors[_0x4b3566(0xcc)](_0x4b3566(0xfe)+_0x33d142);let _0x78f769;const _0x56069b=readFileSync(_0x88c2f7,_0x4b3566(0xbb));try{_0x78f769=JSON[_0x4b3566(0xc1)](_0x56069b);}catch{throw CliErrors['validation'](_0x4b3566(0xf2)+_0x33d142,'Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.');}const _0x538bc5=sha256(_0x56069b),_0x4fa179=extractLoadedServiceManifests(_0x78f769,_0x538bc5),_0x559de2=aggregateValidationReports(_0x4fa179),_0x3a11dc=_0x4fa179[0x0];return{'filePath':_0x88c2f7,'hash':_0x538bc5,'kind':isServiceRegistryLike(_0x78f769)?_0x4b3566(0xde):_0x4b3566(0xc0),'manifest':_0x3a11dc?.[_0x4b3566(0xc0)]??_0x78f769,'report':_0x559de2,'normalizedManifest':_0x4fa179['length']===0x1?_0x3a11dc?.[_0x4b3566(0xda)]:undefined,'manifests':_0x4fa179};}export function importServiceManifest(_0x36635e,_0x31d605={}){const _0x13413d=a40_0x532c,_0x30a94f=loadServiceManifestFromFile(_0x36635e);if(!_0x30a94f[_0x13413d(0xd6)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x30a94f['report']),_0x13413d(0x107));if(_0x30a94f['manifests'][_0x13413d(0xd8)]===0x0)throw CliErrors['validation'](_0x13413d(0xea),_0x13413d(0xfb));const _0x52f3e=readServiceRegistry(_0x31d605),_0xcfad9=(_0x31d605[_0x13413d(0xdd)]??(()=>new Date()))()[_0x13413d(0xb5)](),_0x488471=[];let _0x4a83fb=0x0,_0x2ed3ba=0x0;for(const _0x470c67 of _0x30a94f[_0x13413d(0xe3)]){if(!_0x470c67['normalizedManifest'])continue;const _0x1b3bd8=_0x470c67[_0x13413d(0xda)][_0x13413d(0xcf)][_0x13413d(0xc7)],_0x2b657b={'serviceCode':_0x1b3bd8,'version':_0x470c67[_0x13413d(0xda)][_0x13413d(0x102)],'importedAt':_0xcfad9,'source':{'type':_0x13413d(0xf0),'path':_0x30a94f[_0x13413d(0xf7)],'hash':_0x470c67[_0x13413d(0xec)]},'manifest':_0x470c67[_0x13413d(0xc0)],'normalizedManifest':_0x470c67['normalizedManifest']},_0x4eabc0=_0x52f3e[_0x13413d(0xe7)][_0x13413d(0xca)](_0x10368a=>_0x10368a['serviceCode']===_0x1b3bd8);_0x4eabc0>=0x0?(_0x52f3e[_0x13413d(0xe7)][_0x4eabc0]=_0x2b657b,_0x2ed3ba++):(_0x52f3e['services'][_0x13413d(0xf9)](_0x2b657b),_0x4a83fb++),_0x488471[_0x13413d(0xf9)](_0x2b657b);}_0x52f3e['services']['sort']((_0x2fd0f2,_0x44f0e4)=>_0x2fd0f2['serviceCode'][_0x13413d(0x101)](_0x44f0e4[_0x13413d(0xd2)])),_0x52f3e['updatedAt']=_0xcfad9;const _0x4a50a2=writeServiceRegistry(_0x52f3e,_0x31d605);return{'registryPath':_0x4a50a2,'entry':_0x488471[0x0],'replaced':_0x488471[_0x13413d(0xd8)]===0x1?_0x2ed3ba===0x1:_0x2ed3ba>0x0,'entries':_0x488471,'imported':_0x4a83fb,'updated':_0x2ed3ba,'serviceCount':_0x52f3e[_0x13413d(0xe7)][_0x13413d(0xd8)]};}export function exportServiceManifest(_0x2cb198,_0x124ef4,_0x463a5c={}){const _0x450486=a40_0x532c,_0x1c91a3=getServiceRegistryPath(_0x463a5c),_0xd59bf3=getLocalServiceEntry(_0x2cb198,_0x463a5c);if(!_0xd59bf3)throw CliErrors[_0x450486(0xcc)]('Local\x20service\x20not\x20found:\x20'+_0x2cb198,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x1b0169=resolve(_0x124ef4),_0x392d6d=dirname(_0x1b0169);return!existsSync(_0x392d6d)&&mkdirSync(_0x392d6d,{'recursive':!![]}),writeFileSync(_0x1b0169,JSON[_0x450486(0xbf)](_0xd59bf3[_0x450486(0xc0)],null,0x2)+'\x0a',{'encoding':_0x450486(0xbb),'mode':0x180}),{'registryPath':_0x1c91a3,'filePath':_0x1b0169,'entry':_0xd59bf3};}export function removeServiceManifest(_0x563d31,_0x4f71cc={}){const _0xdc76df=a40_0x532c,_0x1e5190=readServiceRegistry(_0x4f71cc),_0x4b351a=_0x563d31[_0xdc76df(0xc9)](),_0x42aba4=_0x1e5190[_0xdc76df(0xe7)][_0xdc76df(0xca)](_0x407a2f=>_0x407a2f[_0xdc76df(0xd2)]===_0x4b351a);if(_0x42aba4<0x0)throw CliErrors['validation'](_0xdc76df(0x106)+_0x4b351a,_0xdc76df(0xd4));const [_0x3f6a46]=_0x1e5190[_0xdc76df(0xe7)][_0xdc76df(0xb8)](_0x42aba4,0x1),_0x4c678e=(_0x4f71cc[_0xdc76df(0xdd)]??(()=>new Date()))()['toISOString']();_0x1e5190[_0xdc76df(0xe9)]=_0x4c678e;const _0x5c49a0=writeServiceRegistry(_0x1e5190,_0x4f71cc);return{'registryPath':_0x5c49a0,'entry':_0x3f6a46,'serviceCount':_0x1e5190[_0xdc76df(0xe7)][_0xdc76df(0xd8)]};}export function listLocalServices(_0x3c97f6={}){const _0x32849f=a40_0x532c;return readServiceRegistry(_0x3c97f6)[_0x32849f(0xe7)];}export function getLocalServiceEntry(_0x26c516,_0x1b1dd5={}){const _0x14c297=a40_0x532c;return readServiceRegistry(_0x1b1dd5)[_0x14c297(0xe7)]['find'](_0x35567c=>_0x35567c[_0x14c297(0xd2)]===_0x26c516[_0x14c297(0xc9)]());}export function listLocalServiceTrees(_0x533179={}){const _0x4ab25f=a40_0x532c;return readServiceRegistry(_0x533179)[_0x4ab25f(0xe7)][_0x4ab25f(0xe0)](_0x386c41=>_0x386c41[_0x4ab25f(0xda)]);}export function inspectServiceRegistry(_0x1d148f={}){const _0x4ed176=a40_0x532c,_0x23c423=getServiceRegistryPath(_0x1d148f);if(!existsSync(_0x23c423))return emptyServiceRegistryInspection(_0x23c423,_0x4ed176(0xd3),![]);try{const _0x2a53e2=readFileSync(_0x23c423,'utf8');if(!_0x2a53e2[_0x4ed176(0xc9)]())return emptyServiceRegistryInspection(_0x23c423,_0x4ed176(0xc4),!![]);const _0x130def=JSON[_0x4ed176(0xc1)](_0x2a53e2);if(_0x130def[_0x4ed176(0xb2)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x23c423,_0x4ed176(0xb4),!![]),'schemaVersion':_0x130def['schemaVersion'],'message':_0x4ed176(0xc5)+String(_0x130def[_0x4ed176(0xb2)])};if(!Array['isArray'](_0x130def[_0x4ed176(0xe7)]))return{...emptyServiceRegistryInspection(_0x23c423,_0x4ed176(0xb4),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x130def[_0x4ed176(0xe9)],'message':_0x4ed176(0xed)};const _0x5e18ed=_0x130def[_0x4ed176(0xe7)][_0x4ed176(0xe0)](summarizeLocalServiceEntry);return{'registryPath':_0x23c423,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x130def['updatedAt'],'serviceCount':_0x5e18ed[_0x4ed176(0xd8)],'commandCount':_0x5e18ed['reduce']((_0x1452fc,_0x2f9b25)=>_0x1452fc+_0x2f9b25[_0x4ed176(0xb9)],0x0),'services':_0x5e18ed};}catch(_0x3ea293){return{...emptyServiceRegistryInspection(_0x23c423,_0x4ed176(0xb4),!![]),'message':_0x3ea293 instanceof Error?_0x3ea293[_0x4ed176(0xb7)]:String(_0x3ea293)};}}export function formatValidationFailure(_0x80131d){const _0x4bec38=a40_0x532c,_0x5b580a=_0x80131d[_0x4bec38(0x105)][_0x4bec38(0xe0)](_0x407057=>_0x407057[_0x4bec38(0xd1)]+':\x20'+_0x407057[_0x4bec38(0xb7)]);return _0x4bec38(0xf5)+_0x5b580a[_0x4bec38(0xf6)]('\x0a');}function extractLoadedServiceManifests(_0x5815cc,_0x1b853a){const _0x4446a4=a40_0x532c;if(!isServiceRegistryLike(_0x5815cc)){const _0x4cf0f1=_0x5815cc,_0x2a1f14=validateServiceTreeManifest(_0x4cf0f1);return[{'manifest':_0x4cf0f1,'report':_0x2a1f14,'normalizedManifest':_0x2a1f14['ok']?normalizeServiceTreeManifest(_0x4cf0f1):undefined,'sourceHash':_0x1b853a}];}return _0x5815cc[_0x4446a4(0xe7)][_0x4446a4(0xe0)]((_0xe8732,_0x18831c)=>{const _0x50d288=_0x4446a4,_0x1e3b3d=isObjectRecord(_0xe8732)?_0xe8732[_0x50d288(0xc0)]:undefined,_0x5928b7=validateServiceTreeManifest(_0x1e3b3d),_0x39bf86=isObjectRecord(_0xe8732)&&typeof _0xe8732[_0x50d288(0xd2)]===_0x50d288(0xbd)?_0xe8732[_0x50d288(0xd2)]:undefined;return{'manifest':_0x1e3b3d,'report':_0x5928b7,'normalizedManifest':_0x5928b7['ok']?normalizeServiceTreeManifest(_0x1e3b3d):undefined,'sourceHash':sha256(JSON[_0x50d288(0xbf)](_0x1e3b3d,null,0x2)+'\x0a'),'registryIndex':_0x18831c,'registryServiceCode':_0x39bf86};});}function aggregateValidationReports(_0x1a9b47){const _0x5e3223=a40_0x532c,_0x59c5f6=_0x1a9b47[_0x5e3223(0xfc)](_0x4b3fc3=>_0x4b3fc3[_0x5e3223(0xbc)]===undefined?_0x4b3fc3['report'][_0x5e3223(0x105)]:_0x4b3fc3['report']['errors'][_0x5e3223(0xe0)](_0x53825e=>({..._0x53825e,'path':prefixRegistryIssuePath(_0x4b3fc3[_0x5e3223(0xbc)],_0x53825e[_0x5e3223(0xd1)])}))),_0x59acbf=_0x1a9b47[_0x5e3223(0xfc)](_0x43329b=>_0x43329b[_0x5e3223(0xbc)]===undefined?_0x43329b[_0x5e3223(0xd6)]['warnings']:_0x43329b[_0x5e3223(0xd6)][_0x5e3223(0xf3)][_0x5e3223(0xe0)](_0x4c018a=>({..._0x4c018a,'path':prefixRegistryIssuePath(_0x43329b['registryIndex'],_0x4c018a[_0x5e3223(0xd1)])})));return{'ok':_0x59c5f6[_0x5e3223(0xd8)]===0x0,'errors':_0x59c5f6,'warnings':_0x59acbf};}function prefixRegistryIssuePath(_0x8263cc,_0x304eb2){const _0x65fa83=a40_0x532c;if(_0x304eb2==='$')return _0x65fa83(0xd7)+_0x8263cc+_0x65fa83(0xe5);if(_0x304eb2[_0x65fa83(0xfd)]('$.'))return _0x65fa83(0xd7)+_0x8263cc+'].manifest'+_0x304eb2[_0x65fa83(0xf1)](0x1);if(_0x304eb2[_0x65fa83(0xfd)]('$['))return _0x65fa83(0xd7)+_0x8263cc+'].manifest'+_0x304eb2[_0x65fa83(0xf1)](0x1);return'$.services['+_0x8263cc+_0x65fa83(0xeb)+_0x304eb2;}function isServiceRegistryLike(_0x553d8d){const _0x1e0c88=a40_0x532c;return isObjectRecord(_0x553d8d)&&_0x553d8d[_0x1e0c88(0xb2)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x1e0c88(0xf4)](_0x553d8d[_0x1e0c88(0xe7)]);}function isObjectRecord(_0x8a811){const _0x1176b4=a40_0x532c;return Boolean(_0x8a811)&&typeof _0x8a811===_0x1176b4(0xd9)&&!Array[_0x1176b4(0xf4)](_0x8a811);}function emptyServiceRegistryInspection(_0x1ba8b5,_0x44973a,_0x4d502a){return{'registryPath':_0x1ba8b5,'exists':_0x4d502a,'status':_0x44973a,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x3d8a48){const _0x8d5128=a40_0x532c,_0x4eb005=_0x3d8a48['normalizedManifest'],_0x300e1f=_0x4eb005[_0x8d5128(0x104)][_0x8d5128(0xe0)](_0x39bbf0=>({'path':_0x39bbf0['cliPath'],'description':_0x39bbf0[_0x8d5128(0xe6)],'risk':_0x39bbf0['risk'],'targetKind':_0x39bbf0[_0x8d5128(0xbe)][_0x8d5128(0xce)],'targetCommand':_0x39bbf0[_0x8d5128(0xbe)][_0x8d5128(0xc8)]}));return{'serviceCode':_0x3d8a48[_0x8d5128(0xd2)],'name':_0x4eb005[_0x8d5128(0xcf)][_0x8d5128(0xc6)],'description':_0x4eb005[_0x8d5128(0xcf)][_0x8d5128(0xe6)],'version':_0x3d8a48[_0x8d5128(0x102)],'importedAt':_0x3d8a48[_0x8d5128(0xdc)],'source':_0x3d8a48['source'],'commandCount':_0x300e1f[_0x8d5128(0xd8)],'commands':_0x300e1f};}function sha256(_0x228f8b){const _0x5cd720=a40_0x532c;return createHash(_0x5cd720(0xe4))[_0x5cd720(0x100)](_0x228f8b)[_0x5cd720(0xf8)](_0x5cd720(0xfa));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a41_0xd08aed=a41_0xed7a;(function(_0x449607,_0x482750){const _0x5bbb27=a41_0xed7a,_0x3d4142=_0x449607();while(!![]){try{const _0x404ce2=-parseInt(_0x5bbb27(0x89))/0x1*(-parseInt(_0x5bbb27(0x82))/0x2)+parseInt(_0x5bbb27(0x80))/0x3*(-parseInt(_0x5bbb27(0x81))/0x4)+-parseInt(_0x5bbb27(0x79))/0x5*(-parseInt(_0x5bbb27(0x70))/0x6)+parseInt(_0x5bbb27(0x8f))/0x7*(parseInt(_0x5bbb27(0x71))/0x8)+-parseInt(_0x5bbb27(0x78))/0x9+parseInt(_0x5bbb27(0x92))/0xa*(parseInt(_0x5bbb27(0x74))/0xb)+-parseInt(_0x5bbb27(0x87))/0xc;if(_0x404ce2===_0x482750)break;else _0x3d4142['push'](_0x3d4142['shift']());}catch(_0x32a1c8){_0x3d4142['push'](_0x3d4142['shift']());}}}(a41_0x5c32,0x8eabe));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a41_0xd08aed(0x8d),'command':a41_0xd08aed(0x7f),'description':a41_0xd08aed(0x84),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x179d54){const _0xbaebfd=a41_0xd08aed,_0x41a775=buildSkillCreatePlan(_0x179d54[_0xbaebfd(0x6e)]('name'),_0x179d54[_0xbaebfd(0x6e)]('type'),_0x179d54[_0xbaebfd(0x6e)](_0xbaebfd(0x85)));return{'method':_0xbaebfd(0x75),'url':_0x41a775[_0xbaebfd(0x77)],'body':{'skillName':_0x41a775[_0xbaebfd(0x88)][_0xbaebfd(0x86)],'type':_0x41a775['rendered'][_0xbaebfd(0x83)],'selfContained':!![],'files':_0x41a775[_0xbaebfd(0x88)][_0xbaebfd(0x90)][_0xbaebfd(0x8a)](_0x308111=>_0x308111[_0xbaebfd(0x8e)])},'description':_0xbaebfd(0x7b)};},async 'execute'(_0x5ec278){const _0x4455a6=a41_0xd08aed,_0x1dac52=buildSkillCreatePlan(_0x5ec278['str'](_0x4455a6(0x7e)),_0x5ec278['str'](_0x4455a6(0x83)),_0x5ec278[_0x4455a6(0x6e)](_0x4455a6(0x85)));return writeSkillDraft(_0x1dac52,_0x5ec278[_0x4455a6(0x73)](_0x4455a6(0x7d))),{'ok':!![],'data':{'skillName':_0x1dac52[_0x4455a6(0x88)]['skillName'],'type':_0x1dac52[_0x4455a6(0x88)][_0x4455a6(0x83)],'dir':_0x1dac52[_0x4455a6(0x77)],'files':_0x1dac52[_0x4455a6(0x88)][_0x4455a6(0x90)][_0x4455a6(0x8a)](_0xd3594a=>_0xd3594a[_0x4455a6(0x8e)])},'message':_0x4455a6(0x6f)+_0x1dac52[_0x4455a6(0x88)][_0x4455a6(0x86)]};}};function a41_0xed7a(_0x4b0bdb,_0x5ef1ee){_0x4b0bdb=_0x4b0bdb-0x6c;const _0x5c323d=a41_0x5c32();let _0xed7ae2=_0x5c323d[_0x4b0bdb];return _0xed7ae2;}function buildSkillCreatePlan(_0x45f94a,_0x32c647,_0x157b27){const _0x5cea65=a41_0xd08aed,_0x385e24=renderSkillTemplate({'skillName':_0x45f94a,'type':_0x32c647}),_0x525d00=resolve(normalizeSkillTarget(_0x157b27));return{'rendered':_0x385e24,'targetRoot':_0x525d00,'skillDir':resolve(_0x525d00,_0x385e24[_0x5cea65(0x86)])};}function a41_0x5c32(){const _0x3994b9=['WRITE','Refusing\x20to\x20overwrite\x20symlink:\x20','skillDir','8041383jmGlub','5714205OrUYVh','isDirectory','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','utf8','force','name','create','39JTMaXx','99068hUIftN','191554vZxCBk','type','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','target','skillName','28165404PMiTsT','rendered','11HZhWst','map','Skill\x20directory\x20already\x20exists:\x20','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','skill','path','7530782KKdVXJ','files','content','1510IkhsSG','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','isSymbolicLink','str','Created\x20local\x20Skill\x20draft\x20','6ESPgfQ','8WwwXat','validation','bool','63723tJWYYg'];a41_0x5c32=function(){return _0x3994b9;};return a41_0x5c32();}function normalizeSkillTarget(_0x1256c0){return(_0x1256c0||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x44acb4,_0x13c61f){const _0x1cfce0=a41_0xd08aed;if(existsSync(_0x44acb4['skillDir'])){const _0x1b4569=lstatSync(_0x44acb4['skillDir']);if(!_0x1b4569[_0x1cfce0(0x7a)]()||_0x1b4569[_0x1cfce0(0x6d)]())throw CliErrors[_0x1cfce0(0x72)](_0x1cfce0(0x6c)+_0x44acb4[_0x1cfce0(0x77)]);if(!_0x13c61f)throw CliErrors[_0x1cfce0(0x72)](_0x1cfce0(0x8b)+_0x44acb4[_0x1cfce0(0x77)],_0x1cfce0(0x8c));}for(const _0x18d0fc of _0x44acb4[_0x1cfce0(0x88)][_0x1cfce0(0x90)]){const _0x5b315c=resolve(_0x44acb4[_0x1cfce0(0x77)],_0x18d0fc[_0x1cfce0(0x8e)]),_0x446cc5=dirname(_0x5b315c);mkdirSync(_0x446cc5,{'recursive':!![]});if(existsSync(_0x5b315c)&&lstatSync(_0x5b315c)[_0x1cfce0(0x6d)]())throw CliErrors[_0x1cfce0(0x72)](_0x1cfce0(0x76)+_0x5b315c);writeFileSync(_0x5b315c,_0x18d0fc[_0x1cfce0(0x91)],_0x1cfce0(0x7c));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x27595a=a42_0x8cfa;function a42_0x2fe0(){const _0x51c3b3=['personal','4788817xcUNWx','production','../../../core/api-client.js','all','appCode','unchanged','42iWRvcW','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','action','531gfDfkE','authRequired','13565ImoYGf','removed','map','install','6448prVLZt','flatMap','company','trim','8361gtOXau','envName','version','8019137mGikSY','created','14257440KluLku','skill','accessKey','code','write','force','filter','scope','str','\x20company\x20Skill(s).','326aMNZQL','length','\x20personal\x20and\x20','skillCode','Installed\x20','12Akvtxz','23924wfppek','includes','push','1538ePdavx','updated','reduce'];a42_0x2fe0=function(){return _0x51c3b3;};return a42_0x2fe0();}(function(_0x9140fb,_0x411aac){const _0x522d7c=a42_0x8cfa,_0x3d70f0=_0x9140fb();while(!![]){try{const _0x59b1ec=-parseInt(_0x522d7c(0x156))/0x1*(parseInt(_0x522d7c(0x15f))/0x2)+parseInt(_0x522d7c(0x16c))/0x3*(parseInt(_0x522d7c(0x15c))/0x4)+parseInt(_0x522d7c(0x16e))/0x5*(-parseInt(_0x522d7c(0x169))/0x6)+-parseInt(_0x522d7c(0x179))/0x7+parseInt(_0x522d7c(0x172))/0x8*(-parseInt(_0x522d7c(0x176))/0x9)+parseInt(_0x522d7c(0x17b))/0xa+parseInt(_0x522d7c(0x163))/0xb*(parseInt(_0x522d7c(0x15b))/0xc);if(_0x59b1ec===_0x411aac)break;else _0x3d70f0['push'](_0x3d70f0['shift']());}catch(_0x4e3983){_0x3d70f0['push'](_0x3d70f0['shift']());}}}(a42_0x2fe0,0xb87de));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_0x27595a(0x17c),'command':a42_0x27595a(0x171),'description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':a42_0x27595a(0x17f),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x37898a){return syncRuntimeSkills(_0x37898a);}};async function syncRuntimeSkills(_0x4d4942){const _0x379427=a42_0x27595a,{downloadRuntimeSkillPackage:_0x42efbe,listRuntimeSkills:_0x23f79b}=await import(_0x379427(0x165)),{linkEffectiveRuntimeSkills:_0x4e931d,materializeRuntimeSkill:_0x4f3cb7,pruneStaleRuntimeSkillCache:_0x2ff8c4,pruneStaleRuntimeSkillLinks:_0x4d7dc2}=await import('../../../skills/runtime-skill-sync.js'),_0x26c373=_0x4d4942[_0x379427(0x183)](_0x379427(0x17e)),_0x4e5ffa=normalizeSyncScopes(_0x4d4942[_0x379427(0x183)](_0x379427(0x182))),_0x3bf4cf=_0x4d4942[_0x379427(0x177)]??_0x379427(0x164),_0x437bfc=_0x4d4942[_0x379427(0x17d)],_0x167a85=_0x4d4942['bool'](_0x379427(0x180));if(!_0x437bfc)throw CliErrors[_0x379427(0x16d)](_0x379427(0x16a));const _0x29a015=await Promise[_0x379427(0x166)](_0x4e5ffa[_0x379427(0x170)](_0x330f26=>_0x23f79b({'appCode':_0x4d4942[_0x379427(0x167)],'scope':_0x330f26,'code':_0x26c373['trim']()||undefined}))),_0x40e8d8=_0x4e5ffa['includes'](_0x379427(0x162))?_0x29a015[_0x379427(0x173)]((_0x1acda3,_0x1c7881)=>_0x4e5ffa[_0x1c7881]===_0x379427(0x162)?_0x1acda3[_0x379427(0x162)]:[]):[],_0x52b762=_0x4e5ffa[_0x379427(0x15d)]('company')?_0x29a015['flatMap']((_0x839ebe,_0x2368ba)=>_0x4e5ffa[_0x2368ba]===_0x379427(0x174)?_0x839ebe[_0x379427(0x174)]:[]):[],_0x2e3b3d=new Set([..._0x40e8d8[_0x379427(0x170)](_0x11c3ad=>_0x11c3ad[_0x379427(0x159)]?.[_0x379427(0x175)]())[_0x379427(0x181)](_0xa51352=>Boolean(_0xa51352)),..._0x52b762['map'](_0x5ebc6e=>_0x5ebc6e[_0x379427(0x159)]?.[_0x379427(0x175)]())[_0x379427(0x181)](_0x301f5d=>Boolean(_0x301f5d))]),_0x45b9d2=_0x26c373[_0x379427(0x175)]()?[_0x26c373[_0x379427(0x175)]()]:undefined,_0x56e566=_0x4e5ffa[_0x379427(0x157)]===0x2&&_0x4e5ffa[_0x379427(0x15d)]('personal')&&_0x4e5ffa[_0x379427(0x15d)](_0x379427(0x174)),_0x5c3916=_0x56e566?_0x4d7dc2(_0x4d4942[_0x379427(0x167)],_0x2e3b3d,{},_0x45b9d2):[],_0x576c97=_0x2ff8c4({'env':_0x3bf4cf,'accessKey':_0x437bfc,'appCode':_0x4d4942[_0x379427(0x167)],'activeSkillCodes':_0x2e3b3d,'pruneSkillCodes':_0x45b9d2,'scopes':_0x4e5ffa}),_0x36b85d=[];for(const _0x1e8ee8 of _0x40e8d8){_0x36b85d[_0x379427(0x15e)](_0x4f3cb7(_0x1e8ee8,'personal',{'env':_0x3bf4cf,'accessKey':_0x437bfc,'appCode':_0x4d4942[_0x379427(0x167)],'force':_0x167a85,'packageBytes':await downloadSkillPackage(_0x1e8ee8,_0x379427(0x162),_0x4d4942[_0x379427(0x167)],_0x42efbe)}));}for(const _0x42bd2a of _0x52b762){_0x36b85d[_0x379427(0x15e)](_0x4f3cb7(_0x42bd2a,_0x379427(0x174),{'env':_0x3bf4cf,'accessKey':_0x437bfc,'appCode':_0x4d4942[_0x379427(0x167)],'force':_0x167a85,'packageBytes':await downloadSkillPackage(_0x42bd2a,'company',_0x4d4942['appCode'],_0x42efbe)}));}const _0x3abc09=_0x4e931d(_0x36b85d,_0x4d4942[_0x379427(0x167)]),_0xbc8287=countLinkActions(_0x3abc09);return{'ok':!![],'data':{'appCode':_0x4d4942[_0x379427(0x167)],'personal':_0x40e8d8[_0x379427(0x157)],'company':_0x52b762['length'],'materialized':_0x36b85d['length'],'links':{'total':_0x3abc09[_0x379427(0x157)],'created':_0xbc8287[_0x379427(0x17a)]??0x0,'updated':_0xbc8287[_0x379427(0x160)]??0x0,'unchanged':_0xbc8287[_0x379427(0x168)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x5c3916['filter'](_0x4ce936=>_0x4ce936['action']===_0x379427(0x16f))[_0x379427(0x157)],'cacheDirs':_0x576c97[_0x379427(0x181)](_0x589dcf=>_0x589dcf[_0x379427(0x16b)]===_0x379427(0x16f))[_0x379427(0x157)],'skipped':[..._0x5c3916,..._0x576c97][_0x379427(0x181)](_0x23d73e=>_0x23d73e[_0x379427(0x16b)]==='skipped')[_0x379427(0x157)]},'skills':{'personal':_0x40e8d8['map'](summarizeRuntimeSkill),'company':_0x52b762[_0x379427(0x170)](summarizeRuntimeSkill)}},'message':_0x379427(0x15a)+_0x40e8d8[_0x379427(0x157)]+_0x379427(0x158)+_0x52b762['length']+_0x379427(0x184)};}function a42_0x8cfa(_0x50c393,_0x53153b){_0x50c393=_0x50c393-0x156;const _0x2fe075=a42_0x2fe0();let _0x8cfa2b=_0x2fe075[_0x50c393];return _0x8cfa2b;}async function downloadSkillPackage(_0x2abd87,_0x5c83ef,_0x18101a,_0x51a111){const _0x28c2bf=a42_0x27595a,_0x17e4d9=_0x2abd87[_0x28c2bf(0x178)]?.[_0x28c2bf(0x175)]();return _0x17e4d9?_0x51a111(_0x5c83ef,_0x2abd87[_0x28c2bf(0x159)],_0x18101a,_0x17e4d9):_0x51a111(_0x5c83ef,_0x2abd87[_0x28c2bf(0x159)],_0x18101a);}function countLinkActions(_0x54f25e){const _0x615224=a42_0x27595a;return _0x54f25e[_0x615224(0x161)]((_0x5e6c2b,_0x214753)=>{const _0x27dde2=_0x615224;return _0x5e6c2b[_0x214753[_0x27dde2(0x16b)]]=(_0x5e6c2b[_0x214753[_0x27dde2(0x16b)]]??0x0)+0x1,_0x5e6c2b;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x517ba3=a43_0x3840;(function(_0x47e8cf,_0x473254){const _0x4abf67=a43_0x3840,_0x41e9cf=_0x47e8cf();while(!![]){try{const _0x3760d4=-parseInt(_0x4abf67(0xb4))/0x1*(parseInt(_0x4abf67(0xc3))/0x2)+parseInt(_0x4abf67(0xac))/0x3*(-parseInt(_0x4abf67(0xbe))/0x4)+parseInt(_0x4abf67(0xb8))/0x5+parseInt(_0x4abf67(0xc1))/0x6*(parseInt(_0x4abf67(0xb5))/0x7)+-parseInt(_0x4abf67(0xbf))/0x8+-parseInt(_0x4abf67(0xbb))/0x9*(-parseInt(_0x4abf67(0xb6))/0xa)+-parseInt(_0x4abf67(0xb7))/0xb;if(_0x3760d4===_0x473254)break;else _0x41e9cf['push'](_0x41e9cf['shift']());}catch(_0x460543){_0x41e9cf['push'](_0x41e9cf['shift']());}}}(a43_0x3ad5,0xf411e));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a43_0x3ad5(){const _0x3f657a=['envName','bool','personal','builtin','../../../skills/runtime-skill-sync.js','local','filter','1060491cQNuZN','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','scope','code','company','map','list','skill','184627fYAlDK','322uCSIbe','6911980KoNEfC','4823775trdTqF','3557045vnPovs','authRequired','read','9kwbofF','appCode','\x20remote\x20Skill(s).','4gfDjCX','3642688LhzZmk','trim','230556eSPYVP','production','10hppbXa','../../../core/api-client.js','\x20local\x20Skill(s).','Listed\x20','length'];a43_0x3ad5=function(){return _0x3f657a;};return a43_0x3ad5();}function a43_0x3840(_0x1bab97,_0x1c2c95){_0x1bab97=_0x1bab97-0xa8;const _0x3ad564=a43_0x3ad5();let _0x38409c=_0x3ad564[_0x1bab97];return _0x38409c;}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a43_0x517ba3(0xb3),'command':a43_0x517ba3(0xb2),'description':a43_0x517ba3(0xad),'risk':a43_0x517ba3(0xba),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x3cc6c0){const _0x5d2e7f=a43_0x517ba3,_0x3540df=_0x3cc6c0['str'](_0x5d2e7f(0xaf)),_0x1f76e4=normalizeListScope(_0x3cc6c0['str'](_0x5d2e7f(0xae)));if(_0x3cc6c0[_0x5d2e7f(0xc9)](_0x5d2e7f(0xaa))){const _0x369017=_0x3cc6c0['accessKey'];if(!_0x369017)throw CliErrors[_0x5d2e7f(0xb9)]();const {listLocalRuntimeSkills:_0x8393dd}=await import(_0x5d2e7f(0xa9)),_0x20dfc8=_0x8393dd({'env':_0x3cc6c0[_0x5d2e7f(0xc8)]??_0x5d2e7f(0xc2),'accessKey':_0x369017,'appCode':_0x3cc6c0[_0x5d2e7f(0xbc)],'scopes':listScopeToRuntimeScopes(_0x1f76e4),'code':_0x3540df[_0x5d2e7f(0xc0)]()||undefined}),_0x4f3477=groupLocalRuntimeSkills(_0x20dfc8);return{'ok':!![],'data':{'appCode':_0x3cc6c0[_0x5d2e7f(0xbc)],'source':_0x5d2e7f(0xaa),'scope':_0x1f76e4,'total':_0x20dfc8['length'],'personal':_0x4f3477['personal']['length'],'company':_0x4f3477['company'][_0x5d2e7f(0xc7)],'items':_0x20dfc8[_0x5d2e7f(0xb1)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x4f3477[_0x5d2e7f(0xca)][_0x5d2e7f(0xb1)](summarizeLocalRuntimeSkill),'company':_0x4f3477['company'][_0x5d2e7f(0xb1)](summarizeLocalRuntimeSkill)}},'message':_0x5d2e7f(0xc6)+_0x20dfc8[_0x5d2e7f(0xc7)]+_0x5d2e7f(0xc5)};}const {listRuntimeSkills:_0xac7440}=await import(_0x5d2e7f(0xc4)),_0x21e481=await _0xac7440({'appCode':_0x3cc6c0['appCode'],'scope':listScopeToRemoteScope(_0x1f76e4),'code':_0x3540df[_0x5d2e7f(0xc0)]()||undefined}),_0x1ae657=shouldListScope(_0x1f76e4,_0x5d2e7f(0xca))?_0x21e481[_0x5d2e7f(0xca)]??[]:[],_0x106094=shouldListScope(_0x1f76e4,_0x5d2e7f(0xb0))?_0x21e481[_0x5d2e7f(0xb0)]??[]:[],_0x4d9e25=[..._0x1ae657,..._0x106094];return{'ok':!![],'data':{'appCode':_0x3cc6c0[_0x5d2e7f(0xbc)],'source':'remote','scope':_0x1f76e4,'total':_0x4d9e25[_0x5d2e7f(0xc7)],'personal':_0x1ae657[_0x5d2e7f(0xc7)],'company':_0x106094[_0x5d2e7f(0xc7)],'items':_0x4d9e25[_0x5d2e7f(0xb1)](summarizeRuntimeSkill),'skills':{'personal':_0x1ae657[_0x5d2e7f(0xb1)](summarizeRuntimeSkill),'company':_0x106094[_0x5d2e7f(0xb1)](summarizeRuntimeSkill)}},'message':_0x5d2e7f(0xc6)+_0x4d9e25[_0x5d2e7f(0xc7)]+_0x5d2e7f(0xbd)};}};function groupLocalRuntimeSkills(_0x1057e2){const _0x5bfcfc=a43_0x517ba3;return{'personal':_0x1057e2[_0x5bfcfc(0xab)](_0x1c6cce=>_0x1c6cce[_0x5bfcfc(0xae)]===_0x5bfcfc(0xca)),'company':_0x1057e2[_0x5bfcfc(0xab)](_0x1b28ec=>_0x1b28ec[_0x5bfcfc(0xae)]===_0x5bfcfc(0xb0)),'builtin':_0x1057e2['filter'](_0x132642=>_0x132642[_0x5bfcfc(0xae)]===_0x5bfcfc(0xa8))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a44_0x7f0a(){const _0x354e6c=['2581252snZbcy','36HzCLyw','write','20AiSnkx','5899302NTKxCI','skill','116854DrLmVD','45sZuKMR','509470ROnNWp','5601170RNJjoO','98912DMTidq','931777aMAalP','push','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review'];a44_0x7f0a=function(){return _0x354e6c;};return a44_0x7f0a();}const a44_0x46b5aa=a44_0x3117;(function(_0x2c8c5f,_0x52ee56){const _0x4c8e8e=a44_0x3117,_0x44fa4b=_0x2c8c5f();while(!![]){try{const _0x4719bb=parseInt(_0x4c8e8e(0x1db))/0x1+parseInt(_0x4c8e8e(0x1d9))/0x2*(-parseInt(_0x4c8e8e(0x1da))/0x3)+-parseInt(_0x4c8e8e(0x1d3))/0x4+parseInt(_0x4c8e8e(0x1ce))/0x5+parseInt(_0x4c8e8e(0x1d4))/0x6*(-parseInt(_0x4c8e8e(0x1d0))/0x7)+-parseInt(_0x4c8e8e(0x1cf))/0x8+-parseInt(_0x4c8e8e(0x1d7))/0x9*(-parseInt(_0x4c8e8e(0x1d6))/0xa);if(_0x4719bb===_0x52ee56)break;else _0x44fa4b['push'](_0x44fa4b['shift']());}catch(_0x5e3a2a){_0x44fa4b['push'](_0x44fa4b['shift']());}}}(a44_0x7f0a,0x946a8));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';function a44_0x3117(_0x51df9c,_0x47ef18){_0x51df9c=_0x51df9c-0x1ce;const _0x7f0a8=a44_0x7f0a();let _0x3117f8=_0x7f0a8[_0x51df9c];return _0x3117f8;}export const pushCommand={'service':a44_0x46b5aa(0x1d8),'command':a44_0x46b5aa(0x1d1),'description':a44_0x46b5aa(0x1d2),'risk':a44_0x46b5aa(0x1d5),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a45_0x4c91(_0x4ed4cf,_0x56a2ff){_0x4ed4cf=_0x4ed4cf-0xdb;const _0x150e8c=a45_0x150e();let _0x4c916e=_0x150e8c[_0x4ed4cf];return _0x4c916e;}const a45_0x1cac96=a45_0x4c91;function a45_0x150e(){const _0x4e1ee3=['4771880hpLNnH','validate','dir','bool','Skill\x20validation\x20passed.','3271740emRJKw','41104hJXFun','3CfhuVE','warnings','str','9wfPmaf','type','2631890ZLmFeu','211252ztoELk','1329265TcFhRC','6833727YCYDOh','strict'];a45_0x150e=function(){return _0x4e1ee3;};return a45_0x150e();}(function(_0x5bebae,_0x156709){const _0x3ac5f0=a45_0x4c91,_0x4e7a2b=_0x5bebae();while(!![]){try{const _0x2aaa66=parseInt(_0x3ac5f0(0xde))/0x1*(parseInt(_0x3ac5f0(0xdd))/0x2)+parseInt(_0x3ac5f0(0xe1))/0x3*(-parseInt(_0x3ac5f0(0xe4))/0x4)+-parseInt(_0x3ac5f0(0xe3))/0x5+-parseInt(_0x3ac5f0(0xdc))/0x6+parseInt(_0x3ac5f0(0xe5))/0x7+parseInt(_0x3ac5f0(0xe8))/0x8+parseInt(_0x3ac5f0(0xe6))/0x9;if(_0x2aaa66===_0x156709)break;else _0x4e7a2b['push'](_0x4e7a2b['shift']());}catch(_0x4a05ef){_0x4e7a2b['push'](_0x4e7a2b['shift']());}}}(a45_0x150e,0x5c190));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':'skill','command':a45_0x1cac96(0xe9),'description':'Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x3cf72f){const _0x1a4e3f=a45_0x1cac96,_0x27d4fd=_0x3cf72f[_0x1a4e3f(0xeb)](_0x1a4e3f(0xe7)),_0x49708e=validateSkillDirectory(_0x3cf72f[_0x1a4e3f(0xe0)](_0x1a4e3f(0xea)),{'strict':_0x27d4fd});return throwIfSkillValidationFailed(_0x49708e,_0x27d4fd),{'ok':!![],'data':{'dir':_0x49708e[_0x1a4e3f(0xea)],'type':_0x49708e[_0x1a4e3f(0xe2)],'errors':_0x49708e['errors'],'warnings':_0x49708e[_0x1a4e3f(0xdf)]},'message':_0x1a4e3f(0xdb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0xda7a(){const _0x366f80=['Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','scope','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','boolean','code','string','company','104736oBFbEv','1390816TSusRw','name','confirm-warnings','Skill\x20template\x20type','type','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','write','12844143SpqBEY','29814zNDFgd','3IdXJGt','strict','personal','target','dir','all','3223736VDlvRz','1802510MLkUpD','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','1999890dSzszr','1428YXBvYa'];a46_0xda7a=function(){return _0x366f80;};return a46_0xda7a();}const a46_0x575ba8=a46_0x52c2;(function(_0x77a255,_0x460123){const _0x3f8ec8=a46_0x52c2,_0x22b380=_0x77a255();while(!![]){try{const _0x151424=parseInt(_0x3f8ec8(0x92))/0x1+-parseInt(_0x3f8ec8(0x88))/0x2+-parseInt(_0x3f8ec8(0x9e))/0x3*(-parseInt(_0x3f8ec8(0xa4))/0x4)+parseInt(_0x3f8ec8(0xa5))/0x5+-parseInt(_0x3f8ec8(0x9d))/0x6*(parseInt(_0x3f8ec8(0x89))/0x7)+-parseInt(_0x3f8ec8(0x93))/0x8+parseInt(_0x3f8ec8(0x9c))/0x9;if(_0x151424===_0x460123)break;else _0x22b380['push'](_0x22b380['shift']());}catch(_0x12b33a){_0x22b380['push'](_0x22b380['shift']());}}}(a46_0xda7a,0x7cb6a));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a46_0x575ba8(0x8f),'type':a46_0x575ba8(0x90),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a46_0x575ba8(0x8c),'type':a46_0x575ba8(0x90),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a46_0x575ba8(0xa3),a46_0x575ba8(0xa0),a46_0x575ba8(0x91)]};export const PUSH_SCOPE_FLAG={'name':a46_0x575ba8(0x8c),'type':a46_0x575ba8(0x90),'description':a46_0x575ba8(0x8d),'default':a46_0x575ba8(0xa0),'enum':[a46_0x575ba8(0xa0),a46_0x575ba8(0x91)]};export const LIST_SCOPE_FLAG={'name':a46_0x575ba8(0x8c),'type':'string','description':a46_0x575ba8(0x99),'enum':['all','personal',a46_0x575ba8(0x91)]};export const LOCAL_FLAG={'name':'local','type':a46_0x575ba8(0x8e),'description':a46_0x575ba8(0x98)};export const DIR_FLAG={'name':a46_0x575ba8(0xa2),'type':'string','required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};export const CREATE_NAME_FLAG={'name':a46_0x575ba8(0x94),'type':a46_0x575ba8(0x90),'required':!![],'description':a46_0x575ba8(0x8a),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a46_0x575ba8(0xa6)}};export const TYPE_FLAG={'name':a46_0x575ba8(0x97),'type':a46_0x575ba8(0x90),'description':a46_0x575ba8(0x96),'default':a46_0x575ba8(0x9b),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a46_0x575ba8(0xa1),'type':a46_0x575ba8(0x90),'description':a46_0x575ba8(0x8b),'default':DEFAULT_SKILL_TARGET};function a46_0x52c2(_0x407adf,_0x4196ca){_0x407adf=_0x407adf-0x88;const _0xda7a6a=a46_0xda7a();let _0x52c20c=_0xda7a6a[_0x407adf];return _0x52c20c;}export const FORCE_FLAG={'name':'force','type':'boolean','description':'Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists'};export const CONFIRM_WARNINGS_FLAG={'name':a46_0x575ba8(0x95),'type':'boolean','description':'Continue\x20company\x20Skill\x20push\x20when\x20SkillHub\x20validation\x20reports\x20warnings'};export const STRICT_FLAG={'name':a46_0x575ba8(0x9f),'type':'boolean','description':a46_0x575ba8(0x9a)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x101429,_0x299280){const _0x3746c3=a47_0x186f,_0x5bbc3f=_0x101429();while(!![]){try{const _0x45d79c=parseInt(_0x3746c3(0x7c))/0x1+-parseInt(_0x3746c3(0x76))/0x2*(parseInt(_0x3746c3(0x7e))/0x3)+-parseInt(_0x3746c3(0x75))/0x4+-parseInt(_0x3746c3(0x77))/0x5*(parseInt(_0x3746c3(0x79))/0x6)+-parseInt(_0x3746c3(0x7a))/0x7+-parseInt(_0x3746c3(0x78))/0x8+-parseInt(_0x3746c3(0x7b))/0x9*(-parseInt(_0x3746c3(0x7d))/0xa);if(_0x45d79c===_0x299280)break;else _0x5bbc3f['push'](_0x5bbc3f['shift']());}catch(_0x349af4){_0x5bbc3f['push'](_0x5bbc3f['shift']());}}}(a47_0x5489,0x66a47));function a47_0x5489(){const _0x5a17ea=['812124WdJsuf','817848qLuqtT','260TQjZwp','1407dAPzpg','2344108boYFzr','2558JvXLnW','295kJFTqO','3837248IxjHIb','27756oASzOS','5635651BqFLwo'];a47_0x5489=function(){return _0x5a17ea;};return a47_0x5489();}import{createCommand}from'./commands/create.js';function a47_0x186f(_0x268b6f,_0x13ac28){_0x268b6f=_0x268b6f-0x75;const _0x5489a5=a47_0x5489();let _0x186f6c=_0x5489a5[_0x268b6f];return _0x186f6c;}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];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5aba27,_0x172d68){var _0x1a78fe=a48_0x531d,_0x3cccde=_0x5aba27();while(!![]){try{var _0x344418=parseInt(_0x1a78fe(0x1de))/0x1+parseInt(_0x1a78fe(0x1cf))/0x2+-parseInt(_0x1a78fe(0x1dd))/0x3*(parseInt(_0x1a78fe(0x1d3))/0x4)+-parseInt(_0x1a78fe(0x1d8))/0x5+parseInt(_0x1a78fe(0x1d6))/0x6*(parseInt(_0x1a78fe(0x1d1))/0x7)+-parseInt(_0x1a78fe(0x1cd))/0x8*(-parseInt(_0x1a78fe(0x1ce))/0x9)+-parseInt(_0x1a78fe(0x1d4))/0xa*(-parseInt(_0x1a78fe(0x1d7))/0xb);if(_0x344418===_0x172d68)break;else _0x3cccde['push'](_0x3cccde['shift']());}catch(_0x32ecbc){_0x3cccde['push'](_0x3cccde['shift']());}}}(a48_0x42cb,0xbb781));function a48_0x42cb(){var _0x392e5c=['some','6cQGzjY','20922NwJhXF','5728120WcmUog','ossPath','object','length','SKILL.md','79005jAhdZn','1184909NeGELL','path','string','442192BDcTGA','18YMNnSZ','508684HXitfA','files','1244033BsNSIz','isArray','228cCJXbv','8870CmysVs'];a48_0x42cb=function(){return _0x392e5c;};return a48_0x42cb();}function a48_0x531d(_0x185533,_0xa87051){_0x185533=_0x185533-0x1cc;var _0x42cb71=a48_0x42cb();var _0x531d96=_0x42cb71[_0x185533];return _0x531d96;}export function isPackageBackedManifest(_0x5db38f){var _0x568449=a48_0x531d;return!!_0x5db38f&&typeof _0x5db38f==='object'&&!Array[_0x568449(0x1d2)](_0x5db38f)&&typeof _0x5db38f[_0x568449(0x1d9)]===_0x568449(0x1cc)&&_0x5db38f['ossPath'][_0x568449(0x1db)]>0x0&&Array[_0x568449(0x1d2)](_0x5db38f[_0x568449(0x1d0)]);}export function isMultiFileManifest(_0x2fe0b2){var _0x100580=a48_0x531d;return!!_0x2fe0b2&&typeof _0x2fe0b2===_0x100580(0x1da)&&!Array[_0x100580(0x1d2)](_0x2fe0b2)&&Array['isArray'](_0x2fe0b2[_0x100580(0x1d0)])&&_0x2fe0b2[_0x100580(0x1d0)][_0x100580(0x1d5)](_0x4522ec=>_0x4522ec[_0x100580(0x1df)]!==_0x100580(0x1dc));}
|
|
@@ -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(_0x561b79,_0x1e11d7){const _0x5e4cd7=a49_0x5168,_0x5af214=_0x561b79();while(!![]){try{const _0x2c483a=parseInt(_0x5e4cd7(0x99))/0x1+-parseInt(_0x5e4cd7(0x8a))/0x2+parseInt(_0x5e4cd7(0x9d))/0x3*(parseInt(_0x5e4cd7(0x88))/0x4)+parseInt(_0x5e4cd7(0x7c))/0x5+-parseInt(_0x5e4cd7(0x8b))/0x6*(-parseInt(_0x5e4cd7(0x7b))/0x7)+parseInt(_0x5e4cd7(0x95))/0x8+parseInt(_0x5e4cd7(0x6e))/0x9*(-parseInt(_0x5e4cd7(0x9c))/0xa);if(_0x2c483a===_0x1e11d7)break;else _0x5af214['push'](_0x5af214['shift']());}catch(_0x5023b5){_0x5af214['push'](_0x5af214['shift']());}}}(a49_0x3974,0xb9fbc));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';function a49_0x5168(_0x313b77,_0xe555c8){_0x313b77=_0x313b77-0x6d;const _0x3974d5=a49_0x3974();let _0x516880=_0x3974d5[_0x313b77];return _0x516880;}import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x1df068){const _0x3d744c=a49_0x5168,{getRuntimeSkillByCode:_0x34d620,validateRuntimeSkillPublish:_0x2dac5a}=await import(_0x3d744c(0x70)),{readPushDirectory:_0x13e753,resolvePushDirectoryIdentity:_0x14edc0}=await import('../../skills/runtime-skill-sync.js');if(!_0x1df068['accessKey'])throw CliErrors['authRequired']();const _0x686d18=resolvePushScope(_0x1df068),_0x10f50e=validateSkillDirectory(_0x1df068[_0x3d744c(0x8e)](_0x3d744c(0x80)));throwIfSkillValidationFailed(_0x10f50e);const _0x43b8b0=_0x14edc0(_0x10f50e[_0x3d744c(0x80)],_0x1df068[_0x3d744c(0x92)],remoteFirstMetadataOptions()),_0x26312b=await _0x34d620(_0x1df068[_0x3d744c(0x92)],_0x43b8b0[_0x3d744c(0x90)]);throwIfBuiltinPushTarget(_0x26312b);if(_0x686d18===_0x3d744c(0x8f)){const _0x442934=_0x13e753(_0x10f50e[_0x3d744c(0x80)],_0x1df068['appCode'],remoteMissingCompanyReadOptions()),_0x5e143a=await _0x2dac5a(_0x1df068['appCode'],_0x442934[_0x3d744c(0x73)],{'visibility':_0x3d744c(0x9f)});return{'method':_0x3d744c(0x71),'url':_0x3d744c(0x8d)+_0x1df068[_0x3d744c(0x92)]+'/publish/validate','body':{'skillCode':_0x442934['skillCode'],'visibility':_0x3d744c(0x9f),'valid':_0x5e143a[_0x3d744c(0xa6)],'errors':_0x5e143a[_0x3d744c(0x7d)],'warnings':_0x5e143a[_0x3d744c(0x85)],'resolvedSlug':_0x5e143a['resolvedSlug'],'resolvedVersion':_0x5e143a[_0x3d744c(0x9b)]},'description':'Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'};}if(_0x26312b&&_0x26312b[_0x3d744c(0x83)]!==_0x3d744c(0xa9))throw CliErrors[_0x3d744c(0xa4)](_0x3d744c(0x76)+_0x43b8b0[_0x3d744c(0x90)]+_0x3d744c(0xa3)+(_0x26312b[_0x3d744c(0x83)]??_0x3d744c(0xa7))+'\x22.');const _0x420c01=_0x13e753(_0x10f50e['dir'],_0x1df068[_0x3d744c(0x92)],_0x26312b?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions());return{'method':_0x3d744c(0x71),'url':'/api/cli/v1/skills/'+_0x1df068[_0x3d744c(0x92)]+_0x3d744c(0xa0),'body':{'skillCode':_0x420c01[_0x3d744c(0x90)],'visibility':_0x3d744c(0x98),'files':_0x420c01['input'][_0x3d744c(0x9a)]?.[_0x3d744c(0x9a)][_0x3d744c(0x84)](_0x858ca3=>_0x858ca3['path'])??[]},'description':_0x3d744c(0x77)};}function a49_0x3974(){const _0x4f0e17=['POST','../../skills/runtime-skill-sync.js','input','version','confirm-warnings','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','Preview\x20a\x20personal\x20Skill\x20push\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','publishInput','appcode','status','60781urIPhi','7065950arolCQ','errors','Company','\x20Skill\x20','dir','payload','\x20for\x20review','scope','map','warnings','(unknown)','join','1192MWqArJ','Personal','204354GVPOYI','174nqQJXm','existing','/api/cli/v1/skills/','str','company','skillCode','metadata','appCode','Submitted\x20company\x20Skill\x20','bool','6469728OQQEcX','Review\x20the\x20warnings\x20and\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit:\x20','submitted','PRIVATE','257550DHkwEO','files','resolvedVersion','20PFsbbV','7986OlrYOl','trim','NAMESPACE_ONLY','/publish','Company\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','accessKey','\x20has\x20scope=\x22','validation','authRequired','valid','unknown','Created\x20personal\x20Skill\x20','personal','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','11972583zrImPa','savedSkill','../../core/api-client.js'];a49_0x3974=function(){return _0x4f0e17;};return a49_0x3974();}export async function skillPushExecute(_0x784af8){const _0x3f5ce9=a49_0x5168,{createPersonalRuntimeSkill:_0x3c1820,downloadRuntimeSkillPackage:_0x42f687,getRuntimeSkillByCode:_0x49d069,publishCompanyRuntimeSkill:_0x473877,updatePersonalRuntimeSkill:_0x36a80d,validateRuntimeSkillPublish:_0x4463aa}=await import(_0x3f5ce9(0x70)),{verifyRuntimeSkillPackage:_0x45af6a,verifyRuntimeSkillBundle:_0x237179,readPushDirectory:_0x5bffee,refreshPushDirectoryMetadataFromRemote:_0x1fab2b,recordPushedRuntimeSkill:_0x46cde3,resolvePushDirectoryIdentity:_0x45fb53}=await import(_0x3f5ce9(0x72));if(!_0x784af8[_0x3f5ce9(0xa2)])throw CliErrors[_0x3f5ce9(0xa5)]();const _0x513e64=resolvePushScope(_0x784af8),_0x43eac8=validateSkillDirectory(_0x784af8[_0x3f5ce9(0x8e)]('dir'));throwIfSkillValidationFailed(_0x43eac8);const _0x356e8b=_0x43eac8[_0x3f5ce9(0x80)];let _0x561c7e;if(_0x513e64===_0x3f5ce9(0x8f)){const _0x38935b=_0x45fb53(_0x356e8b,_0x784af8['appCode'],remoteFirstMetadataOptions()),_0x2598e0=await _0x49d069(_0x784af8['appCode'],_0x38935b['skillCode']);throwIfBuiltinPushTarget(_0x2598e0);if(_0x2598e0)_0x1fab2b(_0x356e8b,_0x2598e0,_0x784af8['appCode']);const _0x3a1656=_0x5bffee(_0x356e8b,_0x784af8[_0x3f5ce9(0x92)],_0x2598e0?{'targetScope':'company','ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x561c7e={'scope':_0x3f5ce9(0x8f),'payload':_0x3a1656,'publishInput':_0x3a1656['input'],'remoteForPreflight':_0x2598e0,'warnings':[]};}else{const _0x2b6275=_0x784af8[_0x3f5ce9(0x8e)](_0x3f5ce9(0x79))[_0x3f5ce9(0x9e)](),_0x5c96ca=Boolean(_0x2b6275),_0x1e18af=allowRetargetArgs(_0x5c96ca),_0x14f76d=_0x45fb53(_0x356e8b,_0x784af8['appCode'],{...remoteFirstMetadataOptions(),..._0x1e18af[0x0]}),_0x55d9ce=await _0x49d069(_0x784af8[_0x3f5ce9(0x92)],_0x14f76d[_0x3f5ce9(0x90)]);throwIfBuiltinPushTarget(_0x55d9ce);if(_0x55d9ce){if(_0x55d9ce[_0x3f5ce9(0x83)]!=='personal'){if(_0x5c96ca)throw CliErrors[_0x3f5ce9(0xa4)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x14f76d['skillCode']+_0x3f5ce9(0xa3)+(_0x55d9ce[_0x3f5ce9(0x83)]??_0x3f5ce9(0xa7))+'\x22.');_0x1fab2b(_0x356e8b,_0x55d9ce,_0x784af8[_0x3f5ce9(0x92)]);}else!_0x5c96ca&&_0x1fab2b(_0x356e8b,_0x55d9ce,_0x784af8[_0x3f5ce9(0x92)]);}const _0x206bfb=_0x5bffee(_0x356e8b,_0x784af8[_0x3f5ce9(0x92)],_0x55d9ce?remotePersonalReadOptions(_0x5c96ca,_0x1e18af[0x0]):remoteMissingPersonalReadOptions(_0x1e18af[0x0])),_0x2e7361=_0x55d9ce?.['scope']==='personal'&&_0x55d9ce['skillCode']===_0x206bfb[_0x3f5ce9(0x90)]?_0x55d9ce:undefined,_0x4af093=_0x5c96ca&&_0x2e7361?withRetargetExistingMetadata(_0x206bfb[_0x3f5ce9(0x73)],_0x2e7361,{'preferInputSkillName':Boolean(_0x206bfb['frontmatterDisplayName'])}):_0x206bfb[_0x3f5ce9(0x73)],_0x12bafa=_0x5c96ca?buildRetargetWarning(_0x14f76d[_0x3f5ce9(0x91)],_0x784af8[_0x3f5ce9(0x92)]):[];_0x561c7e={'scope':_0x3f5ce9(0xa9),'payload':_0x206bfb,'publishInput':_0x4af093,'remoteForPreflight':_0x2e7361,'existing':_0x2e7361,'warnings':[..._0x43eac8[_0x3f5ce9(0x85)],..._0x12bafa]};}const _0xf3c2a9=await runRemoteContentPreflight({'scope':_0x561c7e[_0x3f5ce9(0x83)],'remote':_0x561c7e['remoteForPreflight'],'publishInput':_0x561c7e[_0x3f5ce9(0x78)],'skillCode':_0x561c7e[_0x3f5ce9(0x81)]['skillCode'],'appCode':_0x784af8['appCode'],'downloadRuntimeSkillPackage':_0x42f687,'verifyRuntimeSkillBundle':_0x237179});if(_0xf3c2a9[_0x3f5ce9(0x7a)]==='identical')return _0x561c7e[_0x3f5ce9(0x83)]==='company'?_0x46cde3(_0x356e8b,_0xf3c2a9[_0x3f5ce9(0x6f)],_0x784af8['appCode'],{'scope':_0x3f5ce9(0x8f)}):_0x46cde3(_0x356e8b,_0xf3c2a9[_0x3f5ce9(0x6f)],_0x784af8[_0x3f5ce9(0x92)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0xf3c2a9[_0x3f5ce9(0x6f)]),'scope':_0x561c7e[_0x3f5ce9(0x83)],..._0x561c7e[_0x3f5ce9(0x83)]===_0x3f5ce9(0xa9)?{'warnings':_0x561c7e[_0x3f5ce9(0x85)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x561c7e[_0x3f5ce9(0x83)])+_0x3f5ce9(0x7f)+_0x561c7e[_0x3f5ce9(0x81)][_0x3f5ce9(0x90)]+_0x3f5ce9(0x6d)};if(_0x561c7e['scope']==='company'){const _0x1e8a88=await _0x4463aa(_0x784af8[_0x3f5ce9(0x92)],_0x561c7e[_0x3f5ce9(0x78)],{'visibility':_0x3f5ce9(0x9f)});throwIfPublishValidationFailed(_0x561c7e[_0x3f5ce9(0x81)]['skillCode'],_0x1e8a88);const _0x357b4c=_0x784af8[_0x3f5ce9(0x94)](_0x3f5ce9(0x75))||_0x784af8['bool']('confirmWarnings');if(_0x1e8a88[_0x3f5ce9(0x85)]['length']>0x0&&!_0x357b4c)throw CliErrors[_0x3f5ce9(0xa4)](_0x3f5ce9(0xa1)+_0x561c7e[_0x3f5ce9(0x81)]['skillCode']+'.',_0x3f5ce9(0x96)+_0x1e8a88[_0x3f5ce9(0x85)][_0x3f5ce9(0x87)](';\x20'));const _0x4a55a7=await _0x473877(_0x784af8[_0x3f5ce9(0x92)],_0x561c7e[_0x3f5ce9(0x78)],{'confirmWarnings':_0x357b4c});return _0x46cde3(_0x356e8b,{..._0x4a55a7,'files':_0x561c7e['publishInput'][_0x3f5ce9(0x9a)]},_0x784af8[_0x3f5ce9(0x92)],{'scope':_0x3f5ce9(0x8f)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4a55a7),'scope':'company','reviewState':_0x3f5ce9(0x97),'submittedForReview':!![],'validation':{'warnings':_0x1e8a88[_0x3f5ce9(0x85)]}},'message':_0x3f5ce9(0x93)+_0x561c7e[_0x3f5ce9(0x81)][_0x3f5ce9(0x90)]+'\x20version\x20'+(_0x4a55a7[_0x3f5ce9(0x74)]??_0x3f5ce9(0x86))+_0x3f5ce9(0x82)};}const _0x1b3d44=_0x561c7e[_0x3f5ce9(0x8c)]?await _0x36a80d(_0x561c7e['payload'][_0x3f5ce9(0x90)],_0x784af8[_0x3f5ce9(0x92)],_0x561c7e[_0x3f5ce9(0x78)]):await _0x3c1820(_0x784af8[_0x3f5ce9(0x92)],_0x561c7e['publishInput']);let _0x3765d8=_0x1b3d44;if(isMultiFileManifest(_0x561c7e[_0x3f5ce9(0x78)][_0x3f5ce9(0x9a)])){const _0x2a2cd3=await _0x42f687('personal',_0x1b3d44[_0x3f5ce9(0x90)]||_0x561c7e[_0x3f5ce9(0x81)]['skillCode'],_0x784af8[_0x3f5ce9(0x92)]);_0x237179(_0x561c7e[_0x3f5ce9(0x78)]['files'],_0x2a2cd3),_0x3765d8={..._0x1b3d44,'files':_0x561c7e['publishInput'][_0x3f5ce9(0x9a)]};}else{if(isPackageBackedManifest(_0x1b3d44['files'])){const _0x4cf9cf=await _0x42f687(_0x3f5ce9(0xa9),_0x1b3d44[_0x3f5ce9(0x90)]||_0x561c7e[_0x3f5ce9(0x81)]['skillCode'],_0x784af8['appCode']);_0x45af6a(_0x1b3d44[_0x3f5ce9(0x9a)],_0x4cf9cf);}}return _0x46cde3(_0x356e8b,_0x3765d8,_0x784af8['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1b3d44),'warnings':_0x561c7e[_0x3f5ce9(0x85)]},'message':_0x561c7e[_0x3f5ce9(0x8c)]?'Updated\x20personal\x20Skill\x20'+_0x561c7e[_0x3f5ce9(0x81)][_0x3f5ce9(0x90)]:_0x3f5ce9(0xa8)+_0x561c7e['payload']['skillCode']};}function scopeLabel(_0x332ea1){const _0x5c216b=a49_0x5168;return _0x332ea1===_0x5c216b(0x8f)?_0x5c216b(0x7e):_0x5c216b(0x89);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1b7f36,_0x52b2ed){const _0xe0f68a=a50_0x3a86,_0x4e46f1=_0x1b7f36();while(!![]){try{const _0x43aaff=-parseInt(_0xe0f68a(0x174))/0x1+-parseInt(_0xe0f68a(0x16b))/0x2*(-parseInt(_0xe0f68a(0x15a))/0x3)+-parseInt(_0xe0f68a(0x153))/0x4*(-parseInt(_0xe0f68a(0x14d))/0x5)+-parseInt(_0xe0f68a(0x172))/0x6*(-parseInt(_0xe0f68a(0x169))/0x7)+parseInt(_0xe0f68a(0x15b))/0x8*(parseInt(_0xe0f68a(0x164))/0x9)+-parseInt(_0xe0f68a(0x161))/0xa*(-parseInt(_0xe0f68a(0x15f))/0xb)+-parseInt(_0xe0f68a(0x158))/0xc*(parseInt(_0xe0f68a(0x157))/0xd);if(_0x43aaff===_0x52b2ed)break;else _0x4e46f1['push'](_0x4e46f1['shift']());}catch(_0x5e5a90){_0x4e46f1['push'](_0x4e46f1['shift']());}}}(a50_0x168a,0x31ec1));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x4342a7){const _0x76c5f0=a50_0x3a86,_0x20e326=_0x4342a7['str']('scope')||'personal';if(_0x20e326===_0x76c5f0(0x154)||_0x20e326===_0x76c5f0(0x150))return _0x20e326;throw CliErrors['validation'](_0x76c5f0(0x16c)+_0x20e326+'\x22.');}export function allowRetargetArgs(_0x24fe63){return _0x24fe63?[{'allowAppCodeRetarget':!![]}]:[];}function a50_0x3a86(_0x39108a,_0xc139ca){_0x39108a=_0x39108a-0x14c;const _0x168ac2=a50_0x168a();let _0x3a8682=_0x168ac2[_0x39108a];return _0x3a8682;}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x36f33f=a50_0x3a86;return{'targetScope':_0x36f33f(0x150),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}function a50_0x168a(){const _0x2bf2e9=['397742lHaJWq','verifyRuntimeSkillBundle','445205bDTzsZ','validation','join','company','different','not-applicable','4UdtNrl','personal','skill-metadata-appcode-retargeted','downloadRuntimeSkillPackage','304694oVeWgT','348VTuPDv','remote','36813OoPmgt','34704ytXGpV','builtin','scope','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','3742255vlbltW','files','10mgZYoz','publishInput','SkillHub\x20validation\x20returned\x20invalid.','405UQqYWQ','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','\x20cannot\x20be\x20pushed.','lovrabet.skill.json','identical','1313326TXvzoG','skillCode','46xoYIJg','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','\x20after\x20successful\x20push.','Local\x20Skill\x20metadata\x20appCode\x20','errors','(unknown)','length','12PmdAQr','appCode'];a50_0x168a=function(){return _0x2bf2e9;};return a50_0x168a();}export function remoteMissingPersonalReadOptions(_0x41eec5={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x41eec5};}export function remotePersonalReadOptions(_0x4c354a,_0x4b0e25={}){return{'ignoreInvalidMetadata':!![],..._0x4c354a?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x4b0e25};}export function throwIfBuiltinPushTarget(_0x181f01){const _0x5615ec=a50_0x3a86;if(_0x181f01?.[_0x5615ec(0x15d)]!==_0x5615ec(0x15c))return;throw CliErrors[_0x5615ec(0x14e)]('Builtin\x20Skill\x20'+(_0x181f01[_0x5615ec(0x16a)]??_0x5615ec(0x170))+_0x5615ec(0x166),'Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.');}export function throwIfPublishValidationFailed(_0x2599b1,_0x5b6f9d){const _0x34ce05=a50_0x3a86;if(_0x5b6f9d['valid']&&_0x5b6f9d[_0x34ce05(0x16f)][_0x34ce05(0x171)]===0x0)return;const _0xc38f87=_0x5b6f9d['errors'][_0x34ce05(0x171)]>0x0?_0x5b6f9d[_0x34ce05(0x16f)][_0x34ce05(0x14f)](';\x20'):_0x34ce05(0x163);throw CliErrors[_0x34ce05(0x14e)]('Company\x20Skill\x20push\x20validation\x20failed\x20for\x20'+_0x2599b1+'.',_0xc38f87);}export function buildRetargetWarning(_0x4bf8b1,_0xb41450){const _0x3a86f4=a50_0x3a86;if(!_0x4bf8b1?.['appCode']||_0x4bf8b1['appCode']===_0xb41450)return[];return[{'level':'warning','ruleId':_0x3a86f4(0x155),'file':_0x3a86f4(0x167),'message':_0x3a86f4(0x16e)+_0x4bf8b1['appCode']+_0x3a86f4(0x165)+_0xb41450+_0x3a86f4(0x16d),'suggestion':_0x3a86f4(0x15e)}];}export async function runRemoteContentPreflight(_0x88d5f0){const _0x1b8e61=a50_0x3a86;if(!_0x88d5f0[_0x1b8e61(0x159)]||_0x88d5f0[_0x1b8e61(0x159)]['scope']!==_0x88d5f0[_0x1b8e61(0x15d)]||!_0x88d5f0[_0x1b8e61(0x162)][_0x1b8e61(0x160)])return{'status':_0x1b8e61(0x152)};const _0x20f5f2=_0x88d5f0[_0x1b8e61(0x159)]['skillCode']||_0x88d5f0['skillCode'];if(!_0x20f5f2)return{'status':_0x1b8e61(0x152)};const _0x220763=await _0x88d5f0[_0x1b8e61(0x156)](_0x88d5f0[_0x1b8e61(0x15d)],_0x20f5f2,_0x88d5f0[_0x1b8e61(0x173)],_0x88d5f0['remote']['version']);try{_0x88d5f0[_0x1b8e61(0x14c)](_0x88d5f0[_0x1b8e61(0x162)][_0x1b8e61(0x160)],_0x220763);}catch{return{'status':_0x1b8e61(0x151)};}return{'status':_0x1b8e61(0x168),'savedSkill':{..._0x88d5f0[_0x1b8e61(0x159)],'content':_0x88d5f0[_0x1b8e61(0x162)]['content'],'files':_0x88d5f0[_0x1b8e61(0x162)][_0x1b8e61(0x160)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x301cf0,_0x1cd0b6){const _0xd24044=a51_0x4e9d,_0x22192e=_0x301cf0();while(!![]){try{const _0x2bcd1e=parseInt(_0xd24044(0x1c5))/0x1+-parseInt(_0xd24044(0x1bb))/0x2*(-parseInt(_0xd24044(0x1b9))/0x3)+-parseInt(_0xd24044(0x1b6))/0x4*(parseInt(_0xd24044(0x1bd))/0x5)+-parseInt(_0xd24044(0x1be))/0x6+-parseInt(_0xd24044(0x1b1))/0x7*(-parseInt(_0xd24044(0x1c2))/0x8)+-parseInt(_0xd24044(0x1c1))/0x9*(parseInt(_0xd24044(0x1b0))/0xa)+parseInt(_0xd24044(0x1bf))/0xb*(parseInt(_0xd24044(0x1b8))/0xc);if(_0x2bcd1e===_0x1cd0b6)break;else _0x22192e['push'](_0x22192e['shift']());}catch(_0x36c466){_0x22192e['push'](_0x22192e['shift']());}}}(a51_0x1362,0x63566));function a51_0x4e9d(_0x41c1f9,_0x4f7c35){_0x41c1f9=_0x41c1f9-0x1af;const _0x1362b9=a51_0x1362();let _0x4e9d1d=_0x1362b9[_0x41c1f9];return _0x4e9d1d;}function a51_0x1362(){const _0x240fbd=['133554zwGvSG','11qzYTVS','tags','6025005zLVCHX','72mYLjhD','warning','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','147139cbluSv','sourceSessionId','skillName','10wiHbSz','21560PlxDqo','appCode','preferInputSkillName','isArray','skill-metadata-appcode-retargeted','52044fixtrv','lovrabet.skill.json','10900572lmTvMP','39fXmfHP','version','90436WwoEPE','description','220nnKbkT'];a51_0x1362=function(){return _0x240fbd;};return a51_0x1362();}export function withRetargetExistingMetadata(_0xbc30bc,_0x21c41e,_0x4140e0={}){const _0x12d994=a51_0x4e9d,_0x55146c=_0x4140e0[_0x12d994(0x1b3)]?_0xbc30bc[_0x12d994(0x1af)]??_0x21c41e['skillName']:_0x21c41e['skillName']??_0xbc30bc[_0x12d994(0x1af)];return{..._0xbc30bc,'skillName':_0x55146c,'description':_0x21c41e[_0x12d994(0x1bc)]??_0xbc30bc[_0x12d994(0x1bc)],'tags':Array[_0x12d994(0x1b4)](_0x21c41e[_0x12d994(0x1c0)])?_0x21c41e[_0x12d994(0x1c0)]:_0xbc30bc[_0x12d994(0x1c0)],'version':_0x21c41e['version']??_0xbc30bc[_0x12d994(0x1ba)],'sourceSessionId':_0x21c41e[_0x12d994(0x1c6)]??_0xbc30bc[_0x12d994(0x1c6)]};}export function buildRetargetWarning(_0x50db42,_0x43501b){const _0x16372d=a51_0x4e9d;if(!_0x50db42?.[_0x16372d(0x1b2)]||_0x50db42[_0x16372d(0x1b2)]===_0x43501b)return[];return[{'level':_0x16372d(0x1c3),'ruleId':_0x16372d(0x1b5),'file':_0x16372d(0x1b7),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x50db42[_0x16372d(0x1b2)]+_0x16372d(0x1c4)+_0x43501b+'\x20after\x20successful\x20push.','suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a6118,_0x286b4b){const _0x4dfc6c=a52_0x2a81,_0x6ae7f3=_0x2a6118();while(!![]){try{const _0x573aee=parseInt(_0x4dfc6c(0x1f7))/0x1+parseInt(_0x4dfc6c(0x1eb))/0x2+-parseInt(_0x4dfc6c(0x1f5))/0x3*(parseInt(_0x4dfc6c(0x1f9))/0x4)+-parseInt(_0x4dfc6c(0x1ee))/0x5+-parseInt(_0x4dfc6c(0x1f3))/0x6*(parseInt(_0x4dfc6c(0x1f0))/0x7)+-parseInt(_0x4dfc6c(0x1ec))/0x8*(parseInt(_0x4dfc6c(0x1f8))/0x9)+-parseInt(_0x4dfc6c(0x1f1))/0xa*(-parseInt(_0x4dfc6c(0x1ed))/0xb);if(_0x573aee===_0x286b4b)break;else _0x6ae7f3['push'](_0x6ae7f3['shift']());}catch(_0xee4f0){_0x6ae7f3['push'](_0x6ae7f3['shift']());}}}(a52_0x4402,0x9136b));function a52_0x2a81(_0x153bdc,_0x597de3){_0x153bdc=_0x153bdc-0x1ea;const _0x440270=a52_0x4402();let _0x2a816b=_0x440270[_0x153bdc];return _0x2a816b;}import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x432cdf){const _0x297781=a52_0x2a81,_0x4add0c=_0x432cdf['trim']();if(!_0x4add0c||_0x4add0c===_0x297781(0x1f6))return[_0x297781(0x1ea),_0x297781(0x1f4)];if(_0x4add0c==='personal'||_0x4add0c==='company')return[_0x4add0c];throw CliErrors[_0x297781(0x1fb)](_0x297781(0x1fa)+_0x432cdf);}export function normalizeListScope(_0x300fad){const _0x50ac70=a52_0x2a81,_0x7e1d5b=_0x300fad[_0x50ac70(0x1f2)]();if(!_0x7e1d5b)return _0x50ac70(0x1f6);if(_0x7e1d5b===_0x50ac70(0x1ea)||_0x7e1d5b===_0x50ac70(0x1f4)||_0x7e1d5b===_0x50ac70(0x1f6))return _0x7e1d5b;throw CliErrors['validation'](_0x50ac70(0x1ef)+_0x300fad);}export function shouldListScope(_0x2fa9da,_0x317e97){const _0x47fe21=a52_0x2a81;if(_0x2fa9da===_0x47fe21(0x1f6))return!![];return _0x2fa9da===_0x317e97;}function a52_0x4402(){const _0x23db5e=['1834987Xhcuiz','1070SNyPGB','trim','6tWhRaA','company','9zpXyQN','all','1079731BbCrWw','29439GRQtEa','507156sCJNdc','Unsupported\x20Skill\x20sync\x20scope:\x20','validation','personal','277902bUNUGT','1272lItvbd','149897evYfYk','4596895lryEAN','Unsupported\x20Skill\x20list\x20scope:\x20'];a52_0x4402=function(){return _0x23db5e;};return a52_0x4402();}export function listScopeToRuntimeScopes(_0x450209){const _0x224b9e=a52_0x2a81;if(_0x450209==='all')return[_0x224b9e(0x1ea),_0x224b9e(0x1f4)];return[_0x450209==='company'?_0x224b9e(0x1f4):_0x450209];}export function listScopeToRemoteScope(_0x7044db){return _0x7044db;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a53_0x2904(_0x537050,_0x4d9202){_0x537050=_0x537050-0x1ef;var _0x8a21c5=a53_0x8a21();var _0x2904d2=_0x8a21c5[_0x537050];return _0x2904d2;}(function(_0x2d0305,_0x336fd2){var _0x484c3a=a53_0x2904,_0x1cfba5=_0x2d0305();while(!![]){try{var _0x3c9fed=-parseInt(_0x484c3a(0x1f5))/0x1*(-parseInt(_0x484c3a(0x208))/0x2)+-parseInt(_0x484c3a(0x206))/0x3+-parseInt(_0x484c3a(0x1f7))/0x4*(parseInt(_0x484c3a(0x1f6))/0x5)+parseInt(_0x484c3a(0x1fc))/0x6*(parseInt(_0x484c3a(0x201))/0x7)+-parseInt(_0x484c3a(0x1ef))/0x8*(-parseInt(_0x484c3a(0x1ff))/0x9)+parseInt(_0x484c3a(0x207))/0xa*(-parseInt(_0x484c3a(0x1f2))/0xb)+parseInt(_0x484c3a(0x1fd))/0xc;if(_0x3c9fed===_0x336fd2)break;else _0x1cfba5['push'](_0x1cfba5['shift']());}catch(_0x4d3333){_0x1cfba5['push'](_0x1cfba5['shift']());}}}(a53_0x8a21,0x85df8));function a53_0x8a21(){var _0x30bc64=['7FIHXcF','status','skillName','cacheDir','dir','1661019hhFHWj','671090LxOsOd','2OepuFZ','32lDqsXp','readonly','appCode','22MnyLGl','linkedPaths','tags','1030055kNyeka','835TVAGRi','15348AZbXqF','skillMdPath','pulledAt','scope','version','3828252FFEnlC','2131836szNcUL','metadataPath','70344ZQlsJr','treeHash'];a53_0x8a21=function(){return _0x30bc64;};return a53_0x8a21();}export function summarizeRuntimeSkill(_0x4a5079){var _0x5725d0=a53_0x2904;return{'id':_0x4a5079['id'],'skillCode':_0x4a5079['skillCode'],'skillName':_0x4a5079[_0x5725d0(0x203)],'scope':_0x4a5079[_0x5725d0(0x1fa)],'version':_0x4a5079['version'],'readonly':_0x4a5079[_0x5725d0(0x1f0)]};}export function summarizeLocalRuntimeSkill(_0x2747d8){var _0x43abf9=a53_0x2904;return{'id':_0x2747d8['id'],'skillCode':_0x2747d8['skillCode'],'skillName':_0x2747d8['skillName'],'scope':_0x2747d8[_0x43abf9(0x1fa)],'appCode':_0x2747d8[_0x43abf9(0x1f1)],'version':_0x2747d8[_0x43abf9(0x1fb)],'status':_0x2747d8[_0x43abf9(0x202)],'readonly':_0x2747d8[_0x43abf9(0x1f0)],'tags':_0x2747d8[_0x43abf9(0x1f4)],'dir':_0x2747d8[_0x43abf9(0x205)],'cacheDir':_0x2747d8[_0x43abf9(0x204)],'skillMdPath':_0x2747d8[_0x43abf9(0x1f8)],'metadataPath':_0x2747d8[_0x43abf9(0x1fe)],'linkedPaths':_0x2747d8[_0x43abf9(0x1f3)],'contentHash':_0x2747d8['contentHash'],'treeHash':_0x2747d8[_0x43abf9(0x200)],'pulledAt':_0x2747d8[_0x43abf9(0x1f9)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x29d7df=a54_0x5735;(function(_0x241892,_0x2efd43){const _0x4c53ce=a54_0x5735,_0x2c5c30=_0x241892();while(!![]){try{const _0x53b91e=parseInt(_0x4c53ce(0x146))/0x1+parseInt(_0x4c53ce(0x129))/0x2*(parseInt(_0x4c53ce(0x141))/0x3)+-parseInt(_0x4c53ce(0x13c))/0x4*(parseInt(_0x4c53ce(0x138))/0x5)+-parseInt(_0x4c53ce(0x14b))/0x6*(parseInt(_0x4c53ce(0x147))/0x7)+-parseInt(_0x4c53ce(0x13e))/0x8+-parseInt(_0x4c53ce(0x139))/0x9+parseInt(_0x4c53ce(0x14c))/0xa;if(_0x53b91e===_0x2efd43)break;else _0x2c5c30['push'](_0x2c5c30['shift']());}catch(_0x4c3733){_0x2c5c30['push'](_0x2c5c30['shift']());}}}(a54_0x512a,0xf226a));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a54_0x29d7df(0x13f),a54_0x29d7df(0x137),a54_0x29d7df(0x12c)];export const DEFAULT_SKILL_TARGET=a54_0x29d7df(0x134);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function a54_0x512a(){const _0x5423f2=['\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','208434woDeMe','14132570kOUzcB','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','test','Unsupported\x20Skill\x20type:\x20','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','\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','timestamp','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','946796gZGpmT','type','SKILL.md','trainer','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','trim','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','\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','skillName','.agents/skills','Use\x20one\x20of:\x20','validation','read','419855cgeekR','9603NKeANk','Invalid\x20Skill\x20name:\x20','#\x20Output\x20Contract\x0a\x0a','56lgHDgZ','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','8400592HrbNiS','write','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','6ibAoYc','references/runtime-contract.md','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','references/output-contract.md','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','1970180bevuFS','224gLUymU','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','\x0a\x20\x20created:\x20\x22'];a54_0x512a=function(){return _0x5423f2;};return a54_0x512a();}export const RUNTIME_CONTRACT_FILE=a54_0x29d7df(0x142);export const OUTPUT_CONTRACT_FILE=a54_0x29d7df(0x144);export function validateSkillName(_0x37b9d7){const _0x251fd0=a54_0x29d7df,_0xdc9f63=_0x37b9d7[_0x251fd0(0x130)]();if(!SKILL_NAME_PATTERN[_0x251fd0(0x14e)](_0xdc9f63))throw CliErrors['validation'](_0x251fd0(0x13a)+_0x37b9d7+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.');return _0xdc9f63;}export function normalizeSkillTemplateType(_0x21902c){const _0x1ad3af=a54_0x29d7df,_0x8b5167=(_0x21902c||_0x1ad3af(0x13f))[_0x1ad3af(0x130)]()||'write';if(SKILL_TYPES['includes'](_0x8b5167))return _0x8b5167;throw CliErrors[_0x1ad3af(0x136)](_0x1ad3af(0x124)+_0x21902c,_0x1ad3af(0x135)+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x3ac7be){const _0x3a600e=a54_0x29d7df,_0x1a554d=validateSkillName(_0x3ac7be[_0x3a600e(0x133)]),_0x13b9dd=normalizeSkillTemplateType(_0x3ac7be[_0x3a600e(0x12a)]),_0x14e813=_0x3ac7be[_0x3a600e(0x127)]??new Date()['toISOString']();return{'skillName':_0x1a554d,'type':_0x13b9dd,'files':[{'path':_0x3a600e(0x12b),'content':renderSkillMd(_0x1a554d,_0x13b9dd,_0x14e813)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x1a554d,_0x13b9dd)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x1a554d,_0x13b9dd)}]};}function renderSkillMd(_0x41e4ff,_0x5f45a3,_0xae343e){const _0x20fba0=a54_0x29d7df,_0x1b2d30=typeWorkflow(_0x5f45a3);return'---\x0aname:\x20'+_0x41e4ff+_0x20fba0(0x13d)+_0x5f45a3+_0x20fba0(0x149)+_0xae343e+_0x20fba0(0x140)+_0x41e4ff+_0x20fba0(0x143)+_0x1b2d30+'\x0a\x0a'+businessStateSection(_0x5f45a3)+_0x20fba0(0x126);}function renderRuntimeContract(_0x177917,_0x322b7a){const _0x4df9d1=a54_0x29d7df,_0x268d0e=_0x322b7a===_0x4df9d1(0x13f)?_0x4df9d1(0x131):'';return _0x4df9d1(0x12f)+_0x177917+'\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='+_0x322b7a+'\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'+_0x268d0e+_0x4df9d1(0x132);}function renderOutputContract(_0x542ec4,_0x47ca86){const _0x2c4ee7=a54_0x29d7df,_0x339969=_0x47ca86===_0x2c4ee7(0x13f)?_0x2c4ee7(0x14d):_0x47ca86+_0x2c4ee7(0x14a);return _0x2c4ee7(0x13b)+_0x542ec4+_0x2c4ee7(0x125)+_0x339969+_0x2c4ee7(0x128);}function typeWorkflow(_0x31adcf){const _0x547a69=a54_0x29d7df;if(_0x31adcf===_0x547a69(0x137))return _0x547a69(0x148);if(_0x31adcf===_0x547a69(0x12c))return _0x547a69(0x12e);return _0x547a69(0x145);}function a54_0x5735(_0x3e453a,_0x3c8850){_0x3e453a=_0x3e453a-0x124;const _0x512a05=a54_0x512a();let _0x5735fa=_0x512a05[_0x3e453a];return _0x5735fa;}function businessStateSection(_0x49641a){const _0x238f88=a54_0x29d7df;if(_0x49641a!==_0x238f88(0x13f))return'';return _0x238f88(0x12d);}
|