@lovrabet/lovrabet-cli 2.1.12 → 2.1.13-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/function-name-adapter.js +1 -0
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x35ac1c=a40_0x47ce;(function(_0x48f12b,_0x535de3){const _0xd6f46a=a40_0x47ce,_0x1d4e60=_0x48f12b();while(!![]){try{const _0x1d1126=-parseInt(_0xd6f46a(0xc1))/0x1+-parseInt(_0xd6f46a(0x9e))/0x2+-parseInt(_0xd6f46a(0x7d))/0x3*(parseInt(_0xd6f46a(0xb3))/0x4)+-parseInt(_0xd6f46a(0x8c))/0x5*(parseInt(_0xd6f46a(0xa6))/0x6)+parseInt(_0xd6f46a(0xa3))/0x7*(parseInt(_0xd6f46a(0x84))/0x8)+parseInt(_0xd6f46a(0x75))/0x9*(parseInt(_0xd6f46a(0xa9))/0xa)+parseInt(_0xd6f46a(0x87))/0xb*(parseInt(_0xd6f46a(0x94))/0xc);if(_0x1d1126===_0x535de3)break;else _0x1d4e60['push'](_0x1d4e60['shift']());}catch(_0x549fe7){_0x1d4e60['push'](_0x1d4e60['shift']());}}}(a40_0x2498,0xae122));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_0x35ac1c(0x80);export function getServiceRegistryPath(_0x5aa61f={}){const _0x1d0dcb=a40_0x35ac1c;return resolve(_0x5aa61f[_0x1d0dcb(0x82)]??homedir(),PRODUCT_CONFIG[_0x1d0dcb(0x71)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x39d207={}){const _0x251a10=a40_0x35ac1c,_0xaf3237=getServiceRegistryPath(_0x39d207);if(!existsSync(_0xaf3237))return emptyServiceRegistry();try{const _0x5df828=readFileSync(_0xaf3237,_0x251a10(0xac));if(!_0x5df828[_0x251a10(0xb1)]())return emptyServiceRegistry();const _0x1cc57f=JSON['parse'](_0x5df828);if(_0x1cc57f['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation'](_0x251a10(0x85)+String(_0x1cc57f[_0x251a10(0x7f)]),_0x251a10(0x90)+_0xaf3237+'.');if(!Array[_0x251a10(0xb8)](_0x1cc57f[_0x251a10(0x8a)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1cc57f[_0x251a10(0x7e)],'services':_0x1cc57f[_0x251a10(0x8a)]};}catch(_0x19c7aa){if(_0x19c7aa instanceof Error&&_0x19c7aa['name']===_0x251a10(0x91))throw _0x19c7aa;throw CliErrors[_0x251a10(0x8d)](_0x251a10(0x9c)+_0xaf3237,_0x251a10(0x88));}}function a40_0x2498(){const _0x453d2f=['28mBoKeO','commandCount','Cannot\x20write\x20service\x20registry:\x20','manifest','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','isArray','startsWith','.tmp','update','errors','].manifest','ENOENT','registryIndex','missing','1399009zqNAFX','sort','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','hex','Unsupported\x20schemaVersion:\x20','sha256','now','homeDirName','code','normalizedManifest','parse','1980KpzgIr','command','localeCompare','reduce','map','importedAt','description','].manifest.','9081xOyWeD','updatedAt','schemaVersion','service.json','version','homeDir','digest','1443896cjPdJQ','Unsupported\x20service\x20registry\x20schemaVersion:\x20','service','99gvlwFz','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','commands','services','Local\x20service\x20not\x20found:\x20','1572490cEAmpy','validation','report','serviceCode','Remove\x20or\x20migrate\x20','CliError','length','empty','2196804lgnmBh','file','cliPath','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','source','Service\x20manifest\x20file\x20not\x20found:\x20','slice','Invalid\x20service\x20registry\x20JSON:\x20','$.services[','163162PUicRl','flatMap','findIndex','toISOString','invalid','28OqzXZS','filePath','find','6gPXOYT','services\x20must\x20be\x20an\x20array','warnings','7260OiJkTA','sourceHash','message','utf8','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','manifests','target','stringify','trim','push'];a40_0x2498=function(){return _0x453d2f;};return a40_0x2498();}export function writeServiceRegistry(_0x5a4e29,_0x2f8a02={}){const _0x56f812=a40_0x35ac1c,_0x376750=getServiceRegistryPath(_0x2f8a02),_0xea096b=dirname(_0x376750);!existsSync(_0xea096b)&&mkdirSync(_0xea096b,{'recursive':!![]});const _0x1ccf54=_0x376750+_0x56f812(0xba);try{writeFileSync(_0x1ccf54,JSON[_0x56f812(0xb0)](_0x5a4e29,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x1ccf54,_0x376750);}catch(_0x37a9fc){try{unlinkSync(_0x1ccf54);}catch{}if(_0x37a9fc?.[_0x56f812(0x72)]===_0x56f812(0xbe))throw CliErrors[_0x56f812(0x8d)](_0x56f812(0xb5)+_0x376750);throw _0x37a9fc;}return _0x376750;}export function loadServiceManifestFromFile(_0x2d1184){const _0x31d3bf=a40_0x35ac1c,_0x279ac7=resolve(_0x2d1184);if(!existsSync(_0x279ac7))throw CliErrors[_0x31d3bf(0x8d)](_0x31d3bf(0x9a)+_0x2d1184);let _0x3076b5;const _0x4b9289=readFileSync(_0x279ac7,'utf8');try{_0x3076b5=JSON[_0x31d3bf(0x74)](_0x4b9289);}catch{throw CliErrors[_0x31d3bf(0x8d)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x2d1184,_0x31d3bf(0x98));}const _0x3ecd90=sha256(_0x4b9289),_0x375d6a=extractLoadedServiceManifests(_0x3076b5,_0x3ecd90),_0x41013b=aggregateValidationReports(_0x375d6a),_0x4d8366=_0x375d6a[0x0];return{'filePath':_0x279ac7,'hash':_0x3ecd90,'kind':isServiceRegistryLike(_0x3076b5)?'registry':_0x31d3bf(0xb6),'manifest':_0x4d8366?.[_0x31d3bf(0xb6)]??_0x3076b5,'report':_0x41013b,'normalizedManifest':_0x375d6a[_0x31d3bf(0x92)]===0x1?_0x4d8366?.['normalizedManifest']:undefined,'manifests':_0x375d6a};}export function importServiceManifest(_0x199334,_0x1e3c87={}){const _0x23a3dd=a40_0x35ac1c,_0x49b273=loadServiceManifestFromFile(_0x199334);if(!_0x49b273[_0x23a3dd(0x8e)]['ok'])throw CliErrors[_0x23a3dd(0x8d)](formatValidationFailure(_0x49b273['report']),_0x23a3dd(0x97));if(_0x49b273[_0x23a3dd(0xae)]['length']===0x0)throw CliErrors[_0x23a3dd(0x8d)](_0x23a3dd(0xc3),_0x23a3dd(0xb7));const _0x26a496=readServiceRegistry(_0x1e3c87),_0x7df858=(_0x1e3c87[_0x23a3dd(0x70)]??(()=>new Date()))()[_0x23a3dd(0xa1)](),_0x39ead2=[];let _0x41565e=0x0,_0x1da9ac=0x0;for(const _0x4f83b7 of _0x49b273['manifests']){if(!_0x4f83b7[_0x23a3dd(0x73)])continue;const _0x3fffd0=_0x4f83b7[_0x23a3dd(0x73)]['service'][_0x23a3dd(0x72)],_0x13449d={'serviceCode':_0x3fffd0,'version':_0x4f83b7[_0x23a3dd(0x73)][_0x23a3dd(0x81)],'importedAt':_0x7df858,'source':{'type':_0x23a3dd(0x95),'path':_0x49b273[_0x23a3dd(0xa4)],'hash':_0x4f83b7[_0x23a3dd(0xaa)]},'manifest':_0x4f83b7[_0x23a3dd(0xb6)],'normalizedManifest':_0x4f83b7[_0x23a3dd(0x73)]},_0x1ee0e1=_0x26a496[_0x23a3dd(0x8a)]['findIndex'](_0x3c88e1=>_0x3c88e1[_0x23a3dd(0x8f)]===_0x3fffd0);_0x1ee0e1>=0x0?(_0x26a496['services'][_0x1ee0e1]=_0x13449d,_0x1da9ac++):(_0x26a496[_0x23a3dd(0x8a)]['push'](_0x13449d),_0x41565e++),_0x39ead2[_0x23a3dd(0xb2)](_0x13449d);}_0x26a496[_0x23a3dd(0x8a)][_0x23a3dd(0xc2)]((_0x597b05,_0x151963)=>_0x597b05[_0x23a3dd(0x8f)][_0x23a3dd(0x77)](_0x151963[_0x23a3dd(0x8f)])),_0x26a496[_0x23a3dd(0x7e)]=_0x7df858;const _0x2d5ce9=writeServiceRegistry(_0x26a496,_0x1e3c87);return{'registryPath':_0x2d5ce9,'entry':_0x39ead2[0x0],'replaced':_0x39ead2[_0x23a3dd(0x92)]===0x1?_0x1da9ac===0x1:_0x1da9ac>0x0,'entries':_0x39ead2,'imported':_0x41565e,'updated':_0x1da9ac,'serviceCount':_0x26a496[_0x23a3dd(0x8a)][_0x23a3dd(0x92)]};}export function exportServiceManifest(_0x2060b6,_0xa6de70,_0x22599f={}){const _0x588011=a40_0x35ac1c,_0x16a21f=getServiceRegistryPath(_0x22599f),_0x108468=getLocalServiceEntry(_0x2060b6,_0x22599f);if(!_0x108468)throw CliErrors[_0x588011(0x8d)](_0x588011(0x8b)+_0x2060b6,_0x588011(0xad));const _0x487ca6=resolve(_0xa6de70),_0x17d20c=dirname(_0x487ca6);return!existsSync(_0x17d20c)&&mkdirSync(_0x17d20c,{'recursive':!![]}),writeFileSync(_0x487ca6,JSON[_0x588011(0xb0)](_0x108468[_0x588011(0xb6)],null,0x2)+'\x0a',{'encoding':_0x588011(0xac),'mode':0x180}),{'registryPath':_0x16a21f,'filePath':_0x487ca6,'entry':_0x108468};}export function removeServiceManifest(_0x227474,_0x15ae5a={}){const _0x2ecd50=a40_0x35ac1c,_0x56036e=readServiceRegistry(_0x15ae5a),_0x366ec8=_0x227474[_0x2ecd50(0xb1)](),_0x53fdbb=_0x56036e[_0x2ecd50(0x8a)][_0x2ecd50(0xa0)](_0x5777f4=>_0x5777f4[_0x2ecd50(0x8f)]===_0x366ec8);if(_0x53fdbb<0x0)throw CliErrors[_0x2ecd50(0x8d)]('Local\x20service\x20not\x20found:\x20'+_0x366ec8,_0x2ecd50(0xad));const [_0x5ac25c]=_0x56036e[_0x2ecd50(0x8a)]['splice'](_0x53fdbb,0x1),_0x29b1df=(_0x15ae5a[_0x2ecd50(0x70)]??(()=>new Date()))()['toISOString']();_0x56036e['updatedAt']=_0x29b1df;const _0x2570e7=writeServiceRegistry(_0x56036e,_0x15ae5a);return{'registryPath':_0x2570e7,'entry':_0x5ac25c,'serviceCount':_0x56036e[_0x2ecd50(0x8a)][_0x2ecd50(0x92)]};}export function listLocalServices(_0x50c108={}){return readServiceRegistry(_0x50c108)['services'];}export function getLocalServiceEntry(_0x319767,_0xc9c599={}){const _0x118209=a40_0x35ac1c;return readServiceRegistry(_0xc9c599)['services'][_0x118209(0xa5)](_0x2cb0d1=>_0x2cb0d1[_0x118209(0x8f)]===_0x319767[_0x118209(0xb1)]());}export function listLocalServiceTrees(_0x2dfd2c={}){const _0x3caa16=a40_0x35ac1c;return readServiceRegistry(_0x2dfd2c)[_0x3caa16(0x8a)]['map'](_0x47e517=>_0x47e517[_0x3caa16(0x73)]);}export function inspectServiceRegistry(_0x4e861a={}){const _0x366cf1=a40_0x35ac1c,_0x42e521=getServiceRegistryPath(_0x4e861a);if(!existsSync(_0x42e521))return emptyServiceRegistryInspection(_0x42e521,_0x366cf1(0xc0),![]);try{const _0x42bf84=readFileSync(_0x42e521,_0x366cf1(0xac));if(!_0x42bf84[_0x366cf1(0xb1)]())return emptyServiceRegistryInspection(_0x42e521,_0x366cf1(0x93),!![]);const _0x36220d=JSON[_0x366cf1(0x74)](_0x42bf84);if(_0x36220d[_0x366cf1(0x7f)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x42e521,_0x366cf1(0xa2),!![]),'schemaVersion':_0x36220d[_0x366cf1(0x7f)],'message':_0x366cf1(0x6e)+String(_0x36220d[_0x366cf1(0x7f)])};if(!Array[_0x366cf1(0xb8)](_0x36220d[_0x366cf1(0x8a)]))return{...emptyServiceRegistryInspection(_0x42e521,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x36220d[_0x366cf1(0x7e)],'message':_0x366cf1(0xa7)};const _0x5c24b0=_0x36220d[_0x366cf1(0x8a)][_0x366cf1(0x79)](summarizeLocalServiceEntry);return{'registryPath':_0x42e521,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x36220d[_0x366cf1(0x7e)],'serviceCount':_0x5c24b0[_0x366cf1(0x92)],'commandCount':_0x5c24b0[_0x366cf1(0x78)]((_0x2503e4,_0x46748a)=>_0x2503e4+_0x46748a[_0x366cf1(0xb4)],0x0),'services':_0x5c24b0};}catch(_0x466acb){return{...emptyServiceRegistryInspection(_0x42e521,'invalid',!![]),'message':_0x466acb instanceof Error?_0x466acb[_0x366cf1(0xab)]:String(_0x466acb)};}}export function formatValidationFailure(_0x3f82a8){const _0x149606=a40_0x35ac1c,_0x52d688=_0x3f82a8[_0x149606(0xbc)]['map'](_0x3220b3=>_0x3220b3['path']+':\x20'+_0x3220b3['message']);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x52d688['join']('\x0a');}function extractLoadedServiceManifests(_0x4179a5,_0x62b427){const _0x378513=a40_0x35ac1c;if(!isServiceRegistryLike(_0x4179a5)){const _0x2cd381=_0x4179a5,_0x56e946=validateServiceTreeManifest(_0x2cd381);return[{'manifest':_0x2cd381,'report':_0x56e946,'normalizedManifest':_0x56e946['ok']?normalizeServiceTreeManifest(_0x2cd381):undefined,'sourceHash':_0x62b427}];}return _0x4179a5[_0x378513(0x8a)]['map']((_0x86cfe3,_0x5019d9)=>{const _0x6d3b77=_0x378513,_0x548fca=isObjectRecord(_0x86cfe3)?_0x86cfe3[_0x6d3b77(0xb6)]:undefined,_0x46918d=validateServiceTreeManifest(_0x548fca),_0x39df26=isObjectRecord(_0x86cfe3)&&typeof _0x86cfe3[_0x6d3b77(0x8f)]==='string'?_0x86cfe3[_0x6d3b77(0x8f)]:undefined;return{'manifest':_0x548fca,'report':_0x46918d,'normalizedManifest':_0x46918d['ok']?normalizeServiceTreeManifest(_0x548fca):undefined,'sourceHash':sha256(JSON[_0x6d3b77(0xb0)](_0x548fca,null,0x2)+'\x0a'),'registryIndex':_0x5019d9,'registryServiceCode':_0x39df26};});}function aggregateValidationReports(_0x5374ad){const _0x2e9e55=a40_0x35ac1c,_0x233650=_0x5374ad[_0x2e9e55(0x9f)](_0x5c8d81=>_0x5c8d81[_0x2e9e55(0xbf)]===undefined?_0x5c8d81['report'][_0x2e9e55(0xbc)]:_0x5c8d81[_0x2e9e55(0x8e)][_0x2e9e55(0xbc)]['map'](_0xe9893b=>({..._0xe9893b,'path':prefixRegistryIssuePath(_0x5c8d81['registryIndex'],_0xe9893b['path'])}))),_0x4272c2=_0x5374ad[_0x2e9e55(0x9f)](_0x4e2c9c=>_0x4e2c9c[_0x2e9e55(0xbf)]===undefined?_0x4e2c9c[_0x2e9e55(0x8e)][_0x2e9e55(0xa8)]:_0x4e2c9c[_0x2e9e55(0x8e)][_0x2e9e55(0xa8)][_0x2e9e55(0x79)](_0x231661=>({..._0x231661,'path':prefixRegistryIssuePath(_0x4e2c9c[_0x2e9e55(0xbf)],_0x231661['path'])})));return{'ok':_0x233650[_0x2e9e55(0x92)]===0x0,'errors':_0x233650,'warnings':_0x4272c2};}function prefixRegistryIssuePath(_0x3c4d07,_0x5dbf95){const _0x46e23f=a40_0x35ac1c;if(_0x5dbf95==='$')return _0x46e23f(0x9d)+_0x3c4d07+_0x46e23f(0xbd);if(_0x5dbf95['startsWith']('$.'))return _0x46e23f(0x9d)+_0x3c4d07+_0x46e23f(0xbd)+_0x5dbf95['slice'](0x1);if(_0x5dbf95[_0x46e23f(0xb9)]('$['))return _0x46e23f(0x9d)+_0x3c4d07+_0x46e23f(0xbd)+_0x5dbf95[_0x46e23f(0x9b)](0x1);return'$.services['+_0x3c4d07+_0x46e23f(0x7c)+_0x5dbf95;}function isServiceRegistryLike(_0x5e9253){const _0x66c654=a40_0x35ac1c;return isObjectRecord(_0x5e9253)&&_0x5e9253[_0x66c654(0x7f)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x66c654(0xb8)](_0x5e9253[_0x66c654(0x8a)]);}function isObjectRecord(_0x3114f3){return Boolean(_0x3114f3)&&typeof _0x3114f3==='object'&&!Array['isArray'](_0x3114f3);}function emptyServiceRegistryInspection(_0xa9b0f4,_0xc7bd2c,_0xe0a909){return{'registryPath':_0xa9b0f4,'exists':_0xe0a909,'status':_0xc7bd2c,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function a40_0x47ce(_0x3a0385,_0x434dfa){_0x3a0385=_0x3a0385-0x6d;const _0x2498b6=a40_0x2498();let _0x47cead=_0x2498b6[_0x3a0385];return _0x47cead;}function summarizeLocalServiceEntry(_0x2a7b72){const _0x14b842=a40_0x35ac1c,_0x2c6b8d=_0x2a7b72[_0x14b842(0x73)],_0x1b6cb3=_0x2c6b8d[_0x14b842(0x89)][_0x14b842(0x79)](_0x80f6ba=>({'path':_0x80f6ba[_0x14b842(0x96)],'description':_0x80f6ba[_0x14b842(0x7b)],'risk':_0x80f6ba['risk'],'targetKind':_0x80f6ba[_0x14b842(0xaf)]['kind'],'targetCommand':_0x80f6ba[_0x14b842(0xaf)][_0x14b842(0x76)]}));return{'serviceCode':_0x2a7b72['serviceCode'],'name':_0x2c6b8d[_0x14b842(0x86)]['name'],'description':_0x2c6b8d[_0x14b842(0x86)]['description'],'version':_0x2a7b72[_0x14b842(0x81)],'importedAt':_0x2a7b72[_0x14b842(0x7a)],'source':_0x2a7b72[_0x14b842(0x99)],'commandCount':_0x1b6cb3[_0x14b842(0x92)],'commands':_0x1b6cb3};}function sha256(_0x57aae1){const _0x3b63dd=a40_0x35ac1c;return createHash(_0x3b63dd(0x6f))[_0x3b63dd(0xbb)](_0x57aae1)[_0x3b63dd(0x83)](_0x3b63dd(0x6d));}
|
|
1
|
+
(function(_0xd72c2e,_0x5501c6){const _0x19fd2c=a41_0x3b36,_0x549ca8=_0xd72c2e();while(!![]){try{const _0x5922a3=parseInt(_0x19fd2c(0x1cf))/0x1*(parseInt(_0x19fd2c(0x1c5))/0x2)+parseInt(_0x19fd2c(0x1f8))/0x3*(parseInt(_0x19fd2c(0x1f0))/0x4)+parseInt(_0x19fd2c(0x1aa))/0x5+parseInt(_0x19fd2c(0x1d0))/0x6*(parseInt(_0x19fd2c(0x1ad))/0x7)+-parseInt(_0x19fd2c(0x1d8))/0x8*(parseInt(_0x19fd2c(0x1ca))/0x9)+-parseInt(_0x19fd2c(0x1e4))/0xa*(-parseInt(_0x19fd2c(0x1ee))/0xb)+-parseInt(_0x19fd2c(0x1b4))/0xc*(parseInt(_0x19fd2c(0x1c4))/0xd);if(_0x5922a3===_0x5501c6)break;else _0x549ca8['push'](_0x549ca8['shift']());}catch(_0x103844){_0x549ca8['push'](_0x549ca8['shift']());}}}(a41_0x2332,0x23d8e));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';function a41_0x3b36(_0x29fdf9,_0x943e7f){_0x29fdf9=_0x29fdf9-0x1a9;const _0x2332ad=a41_0x2332();let _0x3b366c=_0x2332ad[_0x29fdf9];return _0x3b366c;}import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x195a3d={}){const _0x16fd8d=a41_0x3b36;return resolve(_0x195a3d[_0x16fd8d(0x1d7)]??homedir(),PRODUCT_CONFIG[_0x16fd8d(0x1de)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x2d7a65={}){const _0x46d20c=a41_0x3b36,_0x3e6087=getServiceRegistryPath(_0x2d7a65);if(!existsSync(_0x3e6087))return emptyServiceRegistry();try{const _0x48ee8a=readFileSync(_0x3e6087,_0x46d20c(0x1d4));if(!_0x48ee8a[_0x46d20c(0x1d2)]())return emptyServiceRegistry();const _0x366164=JSON['parse'](_0x48ee8a);if(_0x366164['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x46d20c(0x1bc)](_0x46d20c(0x1eb)+String(_0x366164['schemaVersion']),_0x46d20c(0x1c1)+_0x3e6087+'.');if(!Array[_0x46d20c(0x1bb)](_0x366164[_0x46d20c(0x1fa)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x366164[_0x46d20c(0x1fc)],'services':_0x366164[_0x46d20c(0x1fa)]};}catch(_0x3d3972){if(_0x3d3972 instanceof Error&&_0x3d3972[_0x46d20c(0x1dd)]===_0x46d20c(0x1e6))throw _0x3d3972;throw CliErrors[_0x46d20c(0x1bc)](_0x46d20c(0x1be)+_0x3e6087,_0x46d20c(0x1e5));}}export function writeServiceRegistry(_0x2c041f,_0x347c97={}){const _0x5277b6=a41_0x3b36,_0x5d8167=getServiceRegistryPath(_0x347c97),_0x2b98f7=dirname(_0x5d8167);!existsSync(_0x2b98f7)&&mkdirSync(_0x2b98f7,{'recursive':!![]});const _0xba507e=_0x5d8167+_0x5277b6(0x1f9);try{writeFileSync(_0xba507e,JSON[_0x5277b6(0x1f2)](_0x2c041f,null,0x2)+'\x0a',{'encoding':_0x5277b6(0x1d4),'mode':0x180}),renameSync(_0xba507e,_0x5d8167);}catch(_0x1feebf){try{unlinkSync(_0xba507e);}catch{}if(_0x1feebf?.[_0x5277b6(0x1d5)]==='ENOENT')throw CliErrors[_0x5277b6(0x1bc)](_0x5277b6(0x1f7)+_0x5d8167);throw _0x1feebf;}return _0x5d8167;}export function loadServiceManifestFromFile(_0x115048){const _0x18a156=a41_0x3b36,_0x51b8e2=resolve(_0x115048);if(!existsSync(_0x51b8e2))throw CliErrors[_0x18a156(0x1bc)](_0x18a156(0x1dc)+_0x115048);let _0x4b8a24;const _0x24615e=readFileSync(_0x51b8e2,_0x18a156(0x1d4));try{_0x4b8a24=JSON[_0x18a156(0x1e1)](_0x24615e);}catch{throw CliErrors[_0x18a156(0x1bc)](_0x18a156(0x1b6)+_0x115048,_0x18a156(0x1e7));}const _0x3ebb4e=sha256(_0x24615e),_0x15ad2d=extractLoadedServiceManifests(_0x4b8a24,_0x3ebb4e),_0x2dbf4c=aggregateValidationReports(_0x15ad2d),_0x27155f=_0x15ad2d[0x0];return{'filePath':_0x51b8e2,'hash':_0x3ebb4e,'kind':isServiceRegistryLike(_0x4b8a24)?_0x18a156(0x1ba):'manifest','manifest':_0x27155f?.[_0x18a156(0x1ff)]??_0x4b8a24,'report':_0x2dbf4c,'normalizedManifest':_0x15ad2d['length']===0x1?_0x27155f?.[_0x18a156(0x1ab)]:undefined,'manifests':_0x15ad2d};}export function importServiceManifest(_0x4d6b8d,_0x4d5b72={}){const _0x1a239d=a41_0x3b36,_0x1c0e6c=loadServiceManifestFromFile(_0x4d6b8d);if(!_0x1c0e6c[_0x1a239d(0x1e2)]['ok'])throw CliErrors[_0x1a239d(0x1bc)](formatValidationFailure(_0x1c0e6c[_0x1a239d(0x1e2)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x1c0e6c['manifests'][_0x1a239d(0x1da)]===0x0)throw CliErrors[_0x1a239d(0x1bc)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x1a239d(0x1c2));const _0x4ed6df=readServiceRegistry(_0x4d5b72),_0x4347d8=(_0x4d5b72[_0x1a239d(0x1c3)]??(()=>new Date()))()[_0x1a239d(0x1e8)](),_0x15d3af=[];let _0x1dd016=0x0,_0x46365a=0x0;for(const _0xa90883 of _0x1c0e6c[_0x1a239d(0x1b8)]){if(!_0xa90883['normalizedManifest'])continue;const _0xa1ed50=_0xa90883[_0x1a239d(0x1ab)]['service'][_0x1a239d(0x1d5)],_0x5a75ab={'serviceCode':_0xa1ed50,'version':_0xa90883[_0x1a239d(0x1ab)]['version'],'importedAt':_0x4347d8,'source':{'type':'file','path':_0x1c0e6c[_0x1a239d(0x1c0)],'hash':_0xa90883[_0x1a239d(0x1c8)]},'manifest':_0xa90883[_0x1a239d(0x1ff)],'normalizedManifest':_0xa90883['normalizedManifest']},_0x636e8a=_0x4ed6df[_0x1a239d(0x1fa)][_0x1a239d(0x1ea)](_0x11248f=>_0x11248f[_0x1a239d(0x1e3)]===_0xa1ed50);_0x636e8a>=0x0?(_0x4ed6df[_0x1a239d(0x1fa)][_0x636e8a]=_0x5a75ab,_0x46365a++):(_0x4ed6df['services']['push'](_0x5a75ab),_0x1dd016++),_0x15d3af['push'](_0x5a75ab);}_0x4ed6df['services'][_0x1a239d(0x1b3)]((_0x1142e0,_0x351685)=>_0x1142e0[_0x1a239d(0x1e3)]['localeCompare'](_0x351685[_0x1a239d(0x1e3)])),_0x4ed6df[_0x1a239d(0x1fc)]=_0x4347d8;const _0x5ca49b=writeServiceRegistry(_0x4ed6df,_0x4d5b72);return{'registryPath':_0x5ca49b,'entry':_0x15d3af[0x0],'replaced':_0x15d3af[_0x1a239d(0x1da)]===0x1?_0x46365a===0x1:_0x46365a>0x0,'entries':_0x15d3af,'imported':_0x1dd016,'updated':_0x46365a,'serviceCount':_0x4ed6df['services'][_0x1a239d(0x1da)]};}export function exportServiceManifest(_0x5b14c4,_0x388d2e,_0x138389={}){const _0x50689a=a41_0x3b36,_0x9811d8=getServiceRegistryPath(_0x138389),_0x3c4803=getLocalServiceEntry(_0x5b14c4,_0x138389);if(!_0x3c4803)throw CliErrors[_0x50689a(0x1bc)](_0x50689a(0x1b7)+_0x5b14c4,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x31407f=resolve(_0x388d2e),_0x55bb78=dirname(_0x31407f);return!existsSync(_0x55bb78)&&mkdirSync(_0x55bb78,{'recursive':!![]}),writeFileSync(_0x31407f,JSON[_0x50689a(0x1f2)](_0x3c4803[_0x50689a(0x1ff)],null,0x2)+'\x0a',{'encoding':_0x50689a(0x1d4),'mode':0x180}),{'registryPath':_0x9811d8,'filePath':_0x31407f,'entry':_0x3c4803};}export function removeServiceManifest(_0x1a5fdb,_0x2affa1={}){const _0x47660c=a41_0x3b36,_0x1d00c5=readServiceRegistry(_0x2affa1),_0x406e2a=_0x1a5fdb[_0x47660c(0x1d2)](),_0x1ef56e=_0x1d00c5[_0x47660c(0x1fa)][_0x47660c(0x1ea)](_0x2b4ce6=>_0x2b4ce6[_0x47660c(0x1e3)]===_0x406e2a);if(_0x1ef56e<0x0)throw CliErrors['validation']('Local\x20service\x20not\x20found:\x20'+_0x406e2a,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x420522]=_0x1d00c5[_0x47660c(0x1fa)]['splice'](_0x1ef56e,0x1),_0xad70c2=(_0x2affa1[_0x47660c(0x1c3)]??(()=>new Date()))()[_0x47660c(0x1e8)]();_0x1d00c5[_0x47660c(0x1fc)]=_0xad70c2;const _0x51d994=writeServiceRegistry(_0x1d00c5,_0x2affa1);return{'registryPath':_0x51d994,'entry':_0x420522,'serviceCount':_0x1d00c5['services'][_0x47660c(0x1da)]};}export function listLocalServices(_0x219bf6={}){const _0x23cac4=a41_0x3b36;return readServiceRegistry(_0x219bf6)[_0x23cac4(0x1fa)];}export function getLocalServiceEntry(_0x1154b9,_0xf7d68e={}){const _0x385f75=a41_0x3b36;return readServiceRegistry(_0xf7d68e)[_0x385f75(0x1fa)][_0x385f75(0x1d1)](_0xc3c275=>_0xc3c275[_0x385f75(0x1e3)]===_0x1154b9['trim']());}export function listLocalServiceTrees(_0x488c51={}){const _0x4c55ee=a41_0x3b36;return readServiceRegistry(_0x488c51)[_0x4c55ee(0x1fa)][_0x4c55ee(0x1ac)](_0x42e6f7=>_0x42e6f7[_0x4c55ee(0x1ab)]);}export function inspectServiceRegistry(_0x30b146={}){const _0x25d4ce=a41_0x3b36,_0x91f80e=getServiceRegistryPath(_0x30b146);if(!existsSync(_0x91f80e))return emptyServiceRegistryInspection(_0x91f80e,_0x25d4ce(0x1fd),![]);try{const _0x19512a=readFileSync(_0x91f80e,_0x25d4ce(0x1d4));if(!_0x19512a[_0x25d4ce(0x1d2)]())return emptyServiceRegistryInspection(_0x91f80e,'empty',!![]);const _0x5e79ae=JSON[_0x25d4ce(0x1e1)](_0x19512a);if(_0x5e79ae[_0x25d4ce(0x1af)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x91f80e,_0x25d4ce(0x1f4),!![]),'schemaVersion':_0x5e79ae[_0x25d4ce(0x1af)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x5e79ae[_0x25d4ce(0x1af)])};if(!Array[_0x25d4ce(0x1bb)](_0x5e79ae[_0x25d4ce(0x1fa)]))return{...emptyServiceRegistryInspection(_0x91f80e,_0x25d4ce(0x1f4),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e79ae[_0x25d4ce(0x1fc)],'message':_0x25d4ce(0x1f3)};const _0x48a9b2=_0x5e79ae[_0x25d4ce(0x1fa)][_0x25d4ce(0x1ac)](summarizeLocalServiceEntry);return{'registryPath':_0x91f80e,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e79ae[_0x25d4ce(0x1fc)],'serviceCount':_0x48a9b2[_0x25d4ce(0x1da)],'commandCount':_0x48a9b2['reduce']((_0x460595,_0x2fd932)=>_0x460595+_0x2fd932[_0x25d4ce(0x1f5)],0x0),'services':_0x48a9b2};}catch(_0x104df4){return{...emptyServiceRegistryInspection(_0x91f80e,_0x25d4ce(0x1f4),!![]),'message':_0x104df4 instanceof Error?_0x104df4[_0x25d4ce(0x1e0)]:String(_0x104df4)};}}export function formatValidationFailure(_0x243c5a){const _0x175541=a41_0x3b36,_0x5de03d=_0x243c5a[_0x175541(0x1c6)][_0x175541(0x1ac)](_0x6a9f83=>_0x6a9f83['path']+':\x20'+_0x6a9f83[_0x175541(0x1e0)]);return _0x175541(0x1ae)+_0x5de03d[_0x175541(0x1f1)]('\x0a');}function extractLoadedServiceManifests(_0x317e31,_0x5e10dc){if(!isServiceRegistryLike(_0x317e31)){const _0x411b92=_0x317e31,{manifest:_0x2ea883,errors:_0x5afbf7}=adaptServiceTreeManifestForLegacyFramework(_0x411b92),_0x1eb32a=validateServiceTreeManifest(_0x2ea883),_0x35edbd=mergeValidationErrors(_0x1eb32a,_0x5afbf7);return[{'manifest':_0x411b92,'report':_0x35edbd,'normalizedManifest':_0x35edbd['ok']?normalizeServiceTreeManifest(_0x2ea883):undefined,'sourceHash':_0x5e10dc}];}return _0x317e31['services']['map']((_0x2d469d,_0x2482e6)=>{const _0x4a9bfe=a41_0x3b36,_0xf2936b=isObjectRecord(_0x2d469d)?_0x2d469d[_0x4a9bfe(0x1ff)]:undefined,{manifest:_0x44ec31,errors:_0x57055d}=adaptServiceTreeManifestForLegacyFramework(_0xf2936b),_0x4b7383=validateServiceTreeManifest(_0x44ec31),_0x423eb7=mergeValidationErrors(_0x4b7383,_0x57055d),_0x209c4e=isObjectRecord(_0x2d469d)&&typeof _0x2d469d['serviceCode']===_0x4a9bfe(0x1db)?_0x2d469d[_0x4a9bfe(0x1e3)]:undefined;return{'manifest':_0xf2936b,'report':_0x423eb7,'normalizedManifest':_0x423eb7['ok']?normalizeServiceTreeManifest(_0x44ec31):undefined,'sourceHash':sha256(JSON[_0x4a9bfe(0x1f2)](_0xf2936b,null,0x2)+'\x0a'),'registryIndex':_0x2482e6,'registryServiceCode':_0x209c4e};});}function mergeValidationErrors(_0x26b31b,_0x5e0f81){const _0x2778a7=a41_0x3b36,_0x13c422=_0x26b31b[_0x2778a7(0x1c6)][_0x2778a7(0x1ac)](_0x2c2b55=>_0x2c2b55[_0x2778a7(0x1e0)]===_0x2778a7(0x1cd)?{..._0x2c2b55,'message':_0x2778a7(0x1d9)}:_0x2c2b55),_0x576b66=[..._0x5e0f81,..._0x13c422];return{'ok':_0x576b66[_0x2778a7(0x1da)]===0x0,'errors':_0x576b66,'warnings':_0x26b31b[_0x2778a7(0x1c9)]};}function aggregateValidationReports(_0x121e10){const _0x516911=a41_0x3b36,_0x29b093=_0x121e10[_0x516911(0x1ce)](_0x3c7598=>_0x3c7598[_0x516911(0x1b0)]===undefined?_0x3c7598[_0x516911(0x1e2)][_0x516911(0x1c6)]:_0x3c7598[_0x516911(0x1e2)][_0x516911(0x1c6)][_0x516911(0x1ac)](_0x2e1016=>({..._0x2e1016,'path':prefixRegistryIssuePath(_0x3c7598[_0x516911(0x1b0)],_0x2e1016[_0x516911(0x1b5)])}))),_0x22ee53=_0x121e10[_0x516911(0x1ce)](_0x2447ab=>_0x2447ab[_0x516911(0x1b0)]===undefined?_0x2447ab[_0x516911(0x1e2)]['warnings']:_0x2447ab[_0x516911(0x1e2)][_0x516911(0x1c9)]['map'](_0x48d0de=>({..._0x48d0de,'path':prefixRegistryIssuePath(_0x2447ab[_0x516911(0x1b0)],_0x48d0de[_0x516911(0x1b5)])})));return{'ok':_0x29b093[_0x516911(0x1da)]===0x0,'errors':_0x29b093,'warnings':_0x22ee53};}function prefixRegistryIssuePath(_0x5a76e6,_0x5661d4){const _0x32c925=a41_0x3b36;if(_0x5661d4==='$')return'$.services['+_0x5a76e6+_0x32c925(0x1d6);if(_0x5661d4[_0x32c925(0x1a9)]('$.'))return _0x32c925(0x1fe)+_0x5a76e6+_0x32c925(0x1d6)+_0x5661d4['slice'](0x1);if(_0x5661d4['startsWith']('$['))return _0x32c925(0x1fe)+_0x5a76e6+_0x32c925(0x1d6)+_0x5661d4[_0x32c925(0x1e9)](0x1);return _0x32c925(0x1fe)+_0x5a76e6+_0x32c925(0x1f6)+_0x5661d4;}function isServiceRegistryLike(_0x5a7e4f){const _0x3ea791=a41_0x3b36;return isObjectRecord(_0x5a7e4f)&&_0x5a7e4f[_0x3ea791(0x1af)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x5a7e4f[_0x3ea791(0x1fa)]);}function isObjectRecord(_0x3f5a50){const _0x29db9f=a41_0x3b36;return Boolean(_0x3f5a50)&&typeof _0x3f5a50===_0x29db9f(0x1b2)&&!Array[_0x29db9f(0x1bb)](_0x3f5a50);}function a41_0x2332(){const _0x2b7ccf=['.tmp','services','kind','updatedAt','missing','$.services[','manifest','startsWith','391995LiFBub','normalizedManifest','map','7DEuKWd','Service\x20manifest\x20validation\x20failed:\x0a','schemaVersion','registryIndex','target','object','sort','12HwwcIi','path','Invalid\x20service\x20manifest\x20JSON:\x20','Local\x20service\x20not\x20found:\x20','manifests','sha256','registry','isArray','validation','update','Invalid\x20service\x20registry\x20JSON:\x20','digest','filePath','Remove\x20or\x20migrate\x20','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','now','7980622SoKIUp','2TDkOUe','errors','cliPath','sourceHash','warnings','1269jsBdLR','description','hex','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','flatMap','228265bTzkuy','1717254AcEpKN','find','trim','command','utf8','code','].manifest','homeDir','1064WhAbdr','bff\x20target\x20requires\x20functionName.','length','string','Service\x20manifest\x20file\x20not\x20found:\x20','name','homeDirName','source','message','parse','report','serviceCode','570lBvINa','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','CliError','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','toISOString','slice','findIndex','Unsupported\x20service\x20registry\x20schemaVersion:\x20','service','risk','7447HNqPzJ','importedAt','16916tKZiqs','join','stringify','services\x20must\x20be\x20an\x20array','invalid','commandCount','].manifest.','Cannot\x20write\x20service\x20registry:\x20','105KbToJs'];a41_0x2332=function(){return _0x2b7ccf;};return a41_0x2332();}function emptyServiceRegistryInspection(_0x5f4de9,_0x58d704,_0xc8f169){return{'registryPath':_0x5f4de9,'exists':_0xc8f169,'status':_0x58d704,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x50f35c){const _0x4e60c2=a41_0x3b36,_0x56ec84=_0x50f35c[_0x4e60c2(0x1ab)],_0x33cb1d=_0x56ec84['commands']['map'](_0x4df816=>({'path':_0x4df816[_0x4e60c2(0x1c7)],'description':_0x4df816['description'],'risk':_0x4df816[_0x4e60c2(0x1ed)],'targetKind':_0x4df816['target'][_0x4e60c2(0x1fb)],'targetCommand':_0x4df816[_0x4e60c2(0x1b1)][_0x4e60c2(0x1d3)]}));return{'serviceCode':_0x50f35c[_0x4e60c2(0x1e3)],'name':_0x56ec84[_0x4e60c2(0x1ec)][_0x4e60c2(0x1dd)],'description':_0x56ec84[_0x4e60c2(0x1ec)][_0x4e60c2(0x1cb)],'version':_0x50f35c['version'],'importedAt':_0x50f35c[_0x4e60c2(0x1ef)],'source':_0x50f35c[_0x4e60c2(0x1df)],'commandCount':_0x33cb1d[_0x4e60c2(0x1da)],'commands':_0x33cb1d};}function sha256(_0x3198b0){const _0x16a4bf=a41_0x3b36;return createHash(_0x16a4bf(0x1b9))[_0x16a4bf(0x1bd)](_0x3198b0)[_0x16a4bf(0x1bf)](_0x16a4bf(0x1cc));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x3f8fef=a42_0x4c94;(function(_0x1cc537,_0x4bb4d0){const _0x17bd11=a42_0x4c94,_0x3ab2c9=_0x1cc537();while(!![]){try{const _0x455574=-parseInt(_0x17bd11(0x10a))/0x1*(-parseInt(_0x17bd11(0xfb))/0x2)+-parseInt(_0x17bd11(0xf3))/0x3*(-parseInt(_0x17bd11(0x10b))/0x4)+parseInt(_0x17bd11(0xec))/0x5+parseInt(_0x17bd11(0xf5))/0x6*(-parseInt(_0x17bd11(0xf2))/0x7)+-parseInt(_0x17bd11(0xf1))/0x8*(-parseInt(_0x17bd11(0xf6))/0x9)+parseInt(_0x17bd11(0xfe))/0xa+-parseInt(_0x17bd11(0xf7))/0xb;if(_0x455574===_0x4bb4d0)break;else _0x3ab2c9['push'](_0x3ab2c9['shift']());}catch(_0x441db4){_0x3ab2c9['push'](_0x3ab2c9['shift']());}}}(a42_0x13ec,0xd3122));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';function a42_0x13ec(){const _0x34c2ae=['create','9167620Byrrye','rendered','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','validation','path','Created\x20local\x20Skill\x20draft\x20','WRITE','skillName','Skill\x20directory\x20already\x20exists:\x20','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','name','utf8','476382wrNDNB','34388ghINJS','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','Refusing\x20to\x20overwrite\x20symlink:\x20','write','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','568070vPBEiV','str','type','skillDir','target','8EwzKGs','588hdTNYz','357CsdGeh','isSymbolicLink','65382QzNIFr','4458339XYDPdf','24178462ZOEsVa','skill','files','trim','6vWYUpx','bool'];a42_0x13ec=function(){return _0x34c2ae;};return a42_0x13ec();}import{dirname,resolve}from'node:path';function a42_0x4c94(_0xf980ae,_0x3bd971){_0xf980ae=_0xf980ae-0xeb;const _0x13ecf5=a42_0x13ec();let _0x4c94a9=_0x13ecf5[_0xf980ae];return _0x4c94a9;}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':a42_0x3f8fef(0xf8),'command':a42_0x3f8fef(0xfd),'description':a42_0x3f8fef(0x107),'risk':a42_0x3f8fef(0x10e),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x38d164){const _0x520cba=a42_0x3f8fef,_0x5347fc=buildSkillCreatePlan(_0x38d164[_0x520cba(0xed)](_0x520cba(0x108)),_0x38d164[_0x520cba(0xed)](_0x520cba(0xee)),_0x38d164[_0x520cba(0xed)](_0x520cba(0xf0)));return{'method':_0x520cba(0x104),'url':_0x5347fc[_0x520cba(0xef)],'body':{'skillName':_0x5347fc[_0x520cba(0xff)][_0x520cba(0x105)],'type':_0x5347fc[_0x520cba(0xff)][_0x520cba(0xee)],'selfContained':!![],'files':_0x5347fc[_0x520cba(0xff)][_0x520cba(0xf9)]['map'](_0xc2fabd=>_0xc2fabd[_0x520cba(0x102)])},'description':_0x520cba(0xeb)};},async 'execute'(_0x3d4fdc){const _0x12be25=a42_0x3f8fef,_0x2828e1=buildSkillCreatePlan(_0x3d4fdc['str'](_0x12be25(0x108)),_0x3d4fdc[_0x12be25(0xed)](_0x12be25(0xee)),_0x3d4fdc[_0x12be25(0xed)](_0x12be25(0xf0)));return writeSkillDraft(_0x2828e1,_0x3d4fdc[_0x12be25(0xfc)]('force')),{'ok':!![],'data':{'skillName':_0x2828e1[_0x12be25(0xff)][_0x12be25(0x105)],'type':_0x2828e1[_0x12be25(0xff)][_0x12be25(0xee)],'dir':_0x2828e1[_0x12be25(0xef)],'files':_0x2828e1[_0x12be25(0xff)]['files']['map'](_0x27a68f=>_0x27a68f[_0x12be25(0x102)])},'message':_0x12be25(0x103)+_0x2828e1[_0x12be25(0xff)][_0x12be25(0x105)]};}};function buildSkillCreatePlan(_0x143597,_0x15b451,_0x5efc9d){const _0x49ef0a=renderSkillTemplate({'skillName':_0x143597,'type':_0x15b451}),_0x5b5863=resolve(normalizeSkillTarget(_0x5efc9d));return{'rendered':_0x49ef0a,'targetRoot':_0x5b5863,'skillDir':resolve(_0x5b5863,_0x49ef0a['skillName'])};}function normalizeSkillTarget(_0x2af300){const _0x160685=a42_0x3f8fef;return(_0x2af300||DEFAULT_SKILL_TARGET)[_0x160685(0xfa)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4f99d5,_0x1b0376){const _0x1c762a=a42_0x3f8fef;if(existsSync(_0x4f99d5['skillDir'])){const _0x23537e=lstatSync(_0x4f99d5['skillDir']);if(!_0x23537e['isDirectory']()||_0x23537e['isSymbolicLink']())throw CliErrors[_0x1c762a(0x101)](_0x1c762a(0x10c)+_0x4f99d5[_0x1c762a(0xef)]);if(!_0x1b0376)throw CliErrors[_0x1c762a(0x101)](_0x1c762a(0x106)+_0x4f99d5[_0x1c762a(0xef)],_0x1c762a(0x100));}for(const _0x82d96e of _0x4f99d5[_0x1c762a(0xff)][_0x1c762a(0xf9)]){const _0x2fb90d=resolve(_0x4f99d5['skillDir'],_0x82d96e[_0x1c762a(0x102)]),_0x2ab124=dirname(_0x2fb90d);mkdirSync(_0x2ab124,{'recursive':!![]});if(existsSync(_0x2fb90d)&&lstatSync(_0x2fb90d)[_0x1c762a(0xf4)]())throw CliErrors['validation'](_0x1c762a(0x10d)+_0x2fb90d);writeFileSync(_0x2fb90d,_0x82d96e['content'],_0x1c762a(0x109));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x39567c=a43_0x1cd4;(function(_0x1819c6,_0x1bd684){const _0x40c617=a43_0x1cd4,_0x324458=_0x1819c6();while(!![]){try{const _0x1be84c=-parseInt(_0x40c617(0xec))/0x1+parseInt(_0x40c617(0xed))/0x2+-parseInt(_0x40c617(0xf6))/0x3+-parseInt(_0x40c617(0xe8))/0x4+parseInt(_0x40c617(0xe3))/0x5+-parseInt(_0x40c617(0xef))/0x6+-parseInt(_0x40c617(0xf2))/0x7*(-parseInt(_0x40c617(0xee))/0x8);if(_0x1be84c===_0x1bd684)break;else _0x324458['push'](_0x324458['shift']());}catch(_0x5ef85a){_0x324458['push'](_0x324458['shift']());}}}(a43_0x5010,0xa9efd));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a43_0x1cd4(_0x4b7dd1,_0xc9f151){_0x4b7dd1=_0x4b7dd1-0xde;const _0x5010bd=a43_0x5010();let _0x1cd4c9=_0x5010bd[_0x4b7dd1];return _0x1cd4c9;}import{summarizeRuntimeSkill}from'../summary.js';function a43_0x5010(){const _0x20834d=['version','reduce','../../../core/api-client.js','skillCode','envName','length','production','removed','includes','bool','company','1605910PZTUQA','authRequired','map','skipped','force','3714152FmkAUd','accessKey','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','unchanged','357016qrAUPJ','700228joKxbG','8MAVccK','936000fhCyKe','updated','write','14477099yWCXYW','appCode','personal','code','1805514IyDKhu','\x20personal\x20and\x20','filter','trim','skill','scope','action','push','str','install','Installed\x20','created','flatMap'];a43_0x5010=function(){return _0x20834d;};return a43_0x5010();}export const installCommand={'service':a43_0x39567c(0xfa),'command':a43_0x39567c(0xff),'description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':a43_0x39567c(0xf1),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x5ef2c0){return syncRuntimeSkills(_0x5ef2c0);}};async function syncRuntimeSkills(_0x14d728){const _0x4bc2c8=a43_0x39567c,{downloadRuntimeSkillPackage:_0x1e5aa4,listRuntimeSkills:_0x3fed8b}=await import(_0x4bc2c8(0x105)),{linkEffectiveRuntimeSkills:_0x19354a,materializeRuntimeSkill:_0x3f4fd8,pruneStaleRuntimeSkillCache:_0x213b3a,pruneStaleRuntimeSkillLinks:_0x12e2f5}=await import('../../../skills/runtime-skill-sync.js'),_0x4f868c=_0x14d728[_0x4bc2c8(0xfe)](_0x4bc2c8(0xf5)),_0x4bd7bf=normalizeSyncScopes(_0x14d728[_0x4bc2c8(0xfe)](_0x4bc2c8(0xfb))),_0x2914d4=_0x14d728[_0x4bc2c8(0x107)]??_0x4bc2c8(0xde),_0x51147c=_0x14d728[_0x4bc2c8(0xe9)],_0x19e24d=_0x14d728[_0x4bc2c8(0xe1)](_0x4bc2c8(0xe7));if(!_0x51147c)throw CliErrors[_0x4bc2c8(0xe4)](_0x4bc2c8(0xea));const _0x405f30=await Promise['all'](_0x4bd7bf[_0x4bc2c8(0xe5)](_0x27842f=>_0x3fed8b({'appCode':_0x14d728[_0x4bc2c8(0xf3)],'scope':_0x27842f,'code':_0x4f868c['trim']()||undefined}))),_0x2ee2dd=_0x4bd7bf[_0x4bc2c8(0xe0)]('personal')?_0x405f30[_0x4bc2c8(0x102)]((_0x377e70,_0x5afec0)=>_0x4bd7bf[_0x5afec0]===_0x4bc2c8(0xf4)?_0x377e70[_0x4bc2c8(0xf4)]:[]):[],_0x43b83e=_0x4bd7bf[_0x4bc2c8(0xe0)](_0x4bc2c8(0xe2))?_0x405f30[_0x4bc2c8(0x102)]((_0x5e9968,_0x551237)=>_0x4bd7bf[_0x551237]==='company'?_0x5e9968[_0x4bc2c8(0xe2)]:[]):[],_0x3cfe4e=new Set([..._0x2ee2dd[_0x4bc2c8(0xe5)](_0x435d5f=>_0x435d5f[_0x4bc2c8(0x106)]?.[_0x4bc2c8(0xf9)]())['filter'](_0xe20652=>Boolean(_0xe20652)),..._0x43b83e[_0x4bc2c8(0xe5)](_0x5c376d=>_0x5c376d[_0x4bc2c8(0x106)]?.[_0x4bc2c8(0xf9)]())[_0x4bc2c8(0xf8)](_0x47cc14=>Boolean(_0x47cc14))]),_0x297553=_0x4f868c[_0x4bc2c8(0xf9)]()?[_0x4f868c[_0x4bc2c8(0xf9)]()]:undefined,_0x47df4e=_0x4bd7bf['length']===0x2&&_0x4bd7bf[_0x4bc2c8(0xe0)]('personal')&&_0x4bd7bf[_0x4bc2c8(0xe0)](_0x4bc2c8(0xe2)),_0x33b141=_0x47df4e?_0x12e2f5(_0x14d728[_0x4bc2c8(0xf3)],_0x3cfe4e,{},_0x297553):[],_0x1d57bf=_0x213b3a({'env':_0x2914d4,'accessKey':_0x51147c,'appCode':_0x14d728[_0x4bc2c8(0xf3)],'activeSkillCodes':_0x3cfe4e,'pruneSkillCodes':_0x297553,'scopes':_0x4bd7bf}),_0x1e934d=[];for(const _0x317ee5 of _0x2ee2dd){_0x1e934d[_0x4bc2c8(0xfd)](_0x3f4fd8(_0x317ee5,_0x4bc2c8(0xf4),{'env':_0x2914d4,'accessKey':_0x51147c,'appCode':_0x14d728[_0x4bc2c8(0xf3)],'force':_0x19e24d,'packageBytes':await downloadSkillPackage(_0x317ee5,_0x4bc2c8(0xf4),_0x14d728[_0x4bc2c8(0xf3)],_0x1e5aa4)}));}for(const _0x2ee984 of _0x43b83e){_0x1e934d[_0x4bc2c8(0xfd)](_0x3f4fd8(_0x2ee984,_0x4bc2c8(0xe2),{'env':_0x2914d4,'accessKey':_0x51147c,'appCode':_0x14d728[_0x4bc2c8(0xf3)],'force':_0x19e24d,'packageBytes':await downloadSkillPackage(_0x2ee984,_0x4bc2c8(0xe2),_0x14d728[_0x4bc2c8(0xf3)],_0x1e5aa4)}));}const _0x104e89=_0x19354a(_0x1e934d,_0x14d728[_0x4bc2c8(0xf3)]),_0x132e94=countLinkActions(_0x104e89);return{'ok':!![],'data':{'appCode':_0x14d728['appCode'],'personal':_0x2ee2dd[_0x4bc2c8(0x108)],'company':_0x43b83e[_0x4bc2c8(0x108)],'materialized':_0x1e934d[_0x4bc2c8(0x108)],'links':{'total':_0x104e89[_0x4bc2c8(0x108)],'created':_0x132e94[_0x4bc2c8(0x101)]??0x0,'updated':_0x132e94[_0x4bc2c8(0xf0)]??0x0,'unchanged':_0x132e94[_0x4bc2c8(0xeb)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x33b141[_0x4bc2c8(0xf8)](_0x1ac37d=>_0x1ac37d[_0x4bc2c8(0xfc)]===_0x4bc2c8(0xdf))[_0x4bc2c8(0x108)],'cacheDirs':_0x1d57bf[_0x4bc2c8(0xf8)](_0x49b5b9=>_0x49b5b9[_0x4bc2c8(0xfc)]===_0x4bc2c8(0xdf))[_0x4bc2c8(0x108)],'skipped':[..._0x33b141,..._0x1d57bf][_0x4bc2c8(0xf8)](_0x5359fb=>_0x5359fb[_0x4bc2c8(0xfc)]===_0x4bc2c8(0xe6))[_0x4bc2c8(0x108)]},'skills':{'personal':_0x2ee2dd[_0x4bc2c8(0xe5)](summarizeRuntimeSkill),'company':_0x43b83e[_0x4bc2c8(0xe5)](summarizeRuntimeSkill)}},'message':_0x4bc2c8(0x100)+_0x2ee2dd['length']+_0x4bc2c8(0xf7)+_0x43b83e[_0x4bc2c8(0x108)]+'\x20company\x20Skill(s).'};}async function downloadSkillPackage(_0x2a6da5,_0x158055,_0x378269,_0x210e41){const _0x1a5d06=a43_0x39567c,_0x26b607=_0x2a6da5[_0x1a5d06(0x103)]?.[_0x1a5d06(0xf9)]();return _0x26b607?_0x210e41(_0x158055,_0x2a6da5[_0x1a5d06(0x106)],_0x378269,_0x26b607):_0x210e41(_0x158055,_0x2a6da5['skillCode'],_0x378269);}function countLinkActions(_0x4fae35){const _0x28b61a=a43_0x39567c;return _0x4fae35[_0x28b61a(0x104)]((_0x5caa41,_0x4210ba)=>{const _0x4ae28b=_0x28b61a;return _0x5caa41[_0x4210ba[_0x4ae28b(0xfc)]]=(_0x5caa41[_0x4210ba[_0x4ae28b(0xfc)]]??0x0)+0x1,_0x5caa41;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x48804b=a44_0x8766;function a44_0x5690(){const _0x3cced7=['filter','company','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','893518DVWKNf','\x20local\x20Skill(s).','9QDWCMb','4CfRzPX','4943288IevADb','scope','skill','read','builtin','156381AvaHtj','remote','code','production','11759680PgNplH','authRequired','\x20remote\x20Skill(s).','641286ZrSVDL','bool','6185641tLZBXX','767455dALGEw','length','accessKey','list','Listed\x20','map','36adweoz','str','trim','personal','appCode','envName','../../../skills/runtime-skill-sync.js'];a44_0x5690=function(){return _0x3cced7;};return a44_0x5690();}(function(_0x3f59e3,_0x129d6c){const _0x409f42=a44_0x8766,_0x42c22c=_0x3f59e3();while(!![]){try{const _0x343264=parseInt(_0x409f42(0x19d))/0x1+parseInt(_0x409f42(0x1ad))/0x2+-parseInt(_0x409f42(0x1a6))/0x3*(parseInt(_0x409f42(0x1a0))/0x4)+-parseInt(_0x409f42(0x1b0))/0x5*(parseInt(_0x409f42(0x1b6))/0x6)+parseInt(_0x409f42(0x1af))/0x7+parseInt(_0x409f42(0x1a1))/0x8*(parseInt(_0x409f42(0x19f))/0x9)+-parseInt(_0x409f42(0x1aa))/0xa;if(_0x343264===_0x129d6c)break;else _0x42c22c['push'](_0x42c22c['shift']());}catch(_0x46a75f){_0x42c22c['push'](_0x42c22c['shift']());}}}(a44_0x5690,0x8a5a6));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';function a44_0x8766(_0x2a8192,_0x34a999){_0x2a8192=_0x2a8192-0x195;const _0x5690a0=a44_0x5690();let _0x876693=_0x5690a0[_0x2a8192];return _0x876693;}export const listCommand={'service':a44_0x48804b(0x1a3),'command':a44_0x48804b(0x1b3),'description':a44_0x48804b(0x19c),'risk':a44_0x48804b(0x1a4),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0xb8d09a){const _0x2e0707=a44_0x48804b,_0x57b924=_0xb8d09a[_0x2e0707(0x1b7)](_0x2e0707(0x1a8)),_0x53c62e=normalizeListScope(_0xb8d09a[_0x2e0707(0x1b7)](_0x2e0707(0x1a2)));if(_0xb8d09a[_0x2e0707(0x1ae)]('local')){const _0x3bfbd4=_0xb8d09a[_0x2e0707(0x1b2)];if(!_0x3bfbd4)throw CliErrors[_0x2e0707(0x1ab)]();const {listLocalRuntimeSkills:_0x325a60}=await import(_0x2e0707(0x199)),_0x1070f6=_0x325a60({'env':_0xb8d09a[_0x2e0707(0x198)]??_0x2e0707(0x1a9),'accessKey':_0x3bfbd4,'appCode':_0xb8d09a[_0x2e0707(0x197)],'scopes':listScopeToRuntimeScopes(_0x53c62e),'code':_0x57b924[_0x2e0707(0x195)]()||undefined}),_0x5523bd=groupLocalRuntimeSkills(_0x1070f6);return{'ok':!![],'data':{'appCode':_0xb8d09a['appCode'],'source':'local','scope':_0x53c62e,'total':_0x1070f6[_0x2e0707(0x1b1)],'personal':_0x5523bd[_0x2e0707(0x196)][_0x2e0707(0x1b1)],'company':_0x5523bd['company'][_0x2e0707(0x1b1)],'items':_0x1070f6['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x5523bd[_0x2e0707(0x196)]['map'](summarizeLocalRuntimeSkill),'company':_0x5523bd['company']['map'](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x1070f6[_0x2e0707(0x1b1)]+_0x2e0707(0x19e)};}const {listRuntimeSkills:_0x2137c3}=await import('../../../core/api-client.js'),_0x3a914d=await _0x2137c3({'appCode':_0xb8d09a[_0x2e0707(0x197)],'scope':listScopeToRemoteScope(_0x53c62e),'code':_0x57b924['trim']()||undefined}),_0x333fba=shouldListScope(_0x53c62e,'personal')?_0x3a914d['personal']??[]:[],_0x298ab7=shouldListScope(_0x53c62e,'company')?_0x3a914d['company']??[]:[],_0x188a8c=[..._0x333fba,..._0x298ab7];return{'ok':!![],'data':{'appCode':_0xb8d09a[_0x2e0707(0x197)],'source':_0x2e0707(0x1a7),'scope':_0x53c62e,'total':_0x188a8c[_0x2e0707(0x1b1)],'personal':_0x333fba[_0x2e0707(0x1b1)],'company':_0x298ab7[_0x2e0707(0x1b1)],'items':_0x188a8c[_0x2e0707(0x1b5)](summarizeRuntimeSkill),'skills':{'personal':_0x333fba[_0x2e0707(0x1b5)](summarizeRuntimeSkill),'company':_0x298ab7[_0x2e0707(0x1b5)](summarizeRuntimeSkill)}},'message':_0x2e0707(0x1b4)+_0x188a8c[_0x2e0707(0x1b1)]+_0x2e0707(0x1ac)};}};function groupLocalRuntimeSkills(_0x516fb3){const _0x41b7e1=a44_0x48804b;return{'personal':_0x516fb3[_0x41b7e1(0x19a)](_0x25ab3d=>_0x25ab3d[_0x41b7e1(0x1a2)]===_0x41b7e1(0x196)),'company':_0x516fb3[_0x41b7e1(0x19a)](_0x341c08=>_0x341c08['scope']===_0x41b7e1(0x19b)),'builtin':_0x516fb3[_0x41b7e1(0x19a)](_0x14c297=>_0x14c297[_0x41b7e1(0x1a2)]===_0x41b7e1(0x1a5))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a45_0x21f6(_0x37821c,_0x2c2877){_0x37821c=_0x37821c-0x1bb;const _0x476385=a45_0x4763();let _0x21f6a3=_0x476385[_0x37821c];return _0x21f6a3;}const a45_0x43a09f=a45_0x21f6;(function(_0x1195de,_0x557438){const _0x78535b=a45_0x21f6,_0x492aab=_0x1195de();while(!![]){try{const _0x1b407a=parseInt(_0x78535b(0x1bc))/0x1*(parseInt(_0x78535b(0x1bf))/0x2)+parseInt(_0x78535b(0x1c4))/0x3+-parseInt(_0x78535b(0x1c2))/0x4+-parseInt(_0x78535b(0x1bd))/0x5+-parseInt(_0x78535b(0x1c1))/0x6+parseInt(_0x78535b(0x1c3))/0x7+parseInt(_0x78535b(0x1c0))/0x8*(parseInt(_0x78535b(0x1c5))/0x9);if(_0x1b407a===_0x557438)break;else _0x492aab['push'](_0x492aab['shift']());}catch(_0x2c5fe3){_0x492aab['push'](_0x492aab['shift']());}}}(a45_0x4763,0x47658));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':'skill','command':a45_0x43a09f(0x1bb),'description':a45_0x43a09f(0x1be),'risk':'write','flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};function a45_0x4763(){const _0x9a3720=['1725588JeOUFE','push','18511Ljqbcg','2671440FJMMhN','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','48SeDDxu','8rMWmhJ','3485904ObpGsh','989216stNCmZ','3842244oWuYkU','1410384HGmPlF'];a45_0x4763=function(){return _0x9a3720;};return a45_0x4763();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x426471=a46_0x48fb;(function(_0x1dd0d2,_0x1b5503){const _0x16383d=a46_0x48fb,_0x56ab60=_0x1dd0d2();while(!![]){try{const _0x2f9ec2=-parseInt(_0x16383d(0x147))/0x1*(-parseInt(_0x16383d(0x14c))/0x2)+parseInt(_0x16383d(0x158))/0x3+parseInt(_0x16383d(0x157))/0x4*(parseInt(_0x16383d(0x14e))/0x5)+parseInt(_0x16383d(0x14a))/0x6+parseInt(_0x16383d(0x14b))/0x7*(parseInt(_0x16383d(0x14d))/0x8)+-parseInt(_0x16383d(0x150))/0x9+-parseInt(_0x16383d(0x149))/0xa*(parseInt(_0x16383d(0x146))/0xb);if(_0x2f9ec2===_0x1b5503)break;else _0x56ab60['push'](_0x56ab60['shift']());}catch(_0x1fc2cf){_0x56ab60['push'](_0x56ab60['shift']());}}}(a46_0x1f40,0x20473));function a46_0x48fb(_0x5636a7,_0x2b404c){_0x5636a7=_0x5636a7-0x144;const _0x1f400c=a46_0x1f40();let _0x48fb1f=_0x1f400c[_0x5636a7];return _0x48fb1f;}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a46_0x1f40(){const _0x1afc30=['415203owaOdP','skill','warnings','22CRBuJQ','2mvKarA','type','2479970HsXvhV','498612bwQUOC','91gAPylm','235226YwmKPK','149944ttEcWU','35smUEDv','dir','2056626Cgabzx','Skill\x20validation\x20passed.','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','str','strict','validate','bool','89332NJKeck'];a46_0x1f40=function(){return _0x1afc30;};return a46_0x1f40();}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a46_0x426471(0x144),'command':a46_0x426471(0x155),'description':a46_0x426471(0x152),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x41e9f7){const _0x38782f=a46_0x426471,_0xa5cf03=_0x41e9f7[_0x38782f(0x156)](_0x38782f(0x154)),_0x497867=validateSkillDirectory(_0x41e9f7[_0x38782f(0x153)]('dir'),{'strict':_0xa5cf03});return throwIfSkillValidationFailed(_0x497867,_0xa5cf03),{'ok':!![],'data':{'dir':_0x497867[_0x38782f(0x14f)],'type':_0x497867[_0x38782f(0x148)],'errors':_0x497867['errors'],'warnings':_0x497867[_0x38782f(0x145)]},'message':_0x38782f(0x151)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0xc1b88e=a47_0x4a64;(function(_0x507e4b,_0x2272a7){const _0xa23b9b=a47_0x4a64,_0x2d2455=_0x507e4b();while(!![]){try{const _0x3b9995=parseInt(_0xa23b9b(0xa9))/0x1+parseInt(_0xa23b9b(0xb1))/0x2+parseInt(_0xa23b9b(0xad))/0x3*(-parseInt(_0xa23b9b(0xaa))/0x4)+parseInt(_0xa23b9b(0xc5))/0x5+-parseInt(_0xa23b9b(0xbe))/0x6+parseInt(_0xa23b9b(0xae))/0x7+parseInt(_0xa23b9b(0xb4))/0x8*(-parseInt(_0xa23b9b(0xba))/0x9);if(_0x3b9995===_0x2272a7)break;else _0x2d2455['push'](_0x2d2455['shift']());}catch(_0x49fade){_0x2d2455['push'](_0x2d2455['shift']());}}}(a47_0x1750,0x3c93a));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a47_0xc1b88e(0xc3),'type':a47_0xc1b88e(0xb0),'description':'Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code'};export const SCOPE_FLAG={'name':a47_0xc1b88e(0xc2),'type':'string','description':a47_0xc1b88e(0xc4),'enum':['all','personal',a47_0xc1b88e(0xb8)]};export const PUSH_SCOPE_FLAG={'name':a47_0xc1b88e(0xc2),'type':a47_0xc1b88e(0xb0),'description':a47_0xc1b88e(0xb5),'default':a47_0xc1b88e(0xc0),'enum':[a47_0xc1b88e(0xc0),a47_0xc1b88e(0xb8)]};function a47_0x1750(){const _0x3ab5db=['56YDOLUD','type','write','31767BueUqQ','944237gOTRrv','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','string','348162lqzhLJ','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','2503240nciDAr','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','boolean','dir','company','local','9XbeuaV','Local\x20Skill\x20directory\x20containing\x20SKILL.md','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','name','597000zcWemC','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','personal','confirm-warnings','scope','code','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','1048055uOJMUZ','Skill\x20template\x20type','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','290190dAKAfK'];a47_0x1750=function(){return _0x3ab5db;};return a47_0x1750();}export const LIST_SCOPE_FLAG={'name':a47_0xc1b88e(0xc2),'type':'string','description':a47_0xc1b88e(0xb3),'enum':['all',a47_0xc1b88e(0xc0),a47_0xc1b88e(0xb8)]};export const LOCAL_FLAG={'name':a47_0xc1b88e(0xb9),'type':a47_0xc1b88e(0xb6),'description':a47_0xc1b88e(0xaf)};function a47_0x4a64(_0x29c521,_0x3b0915){_0x29c521=_0x29c521-0xa7;const _0x17500b=a47_0x1750();let _0x4a64a5=_0x17500b[_0x29c521];return _0x4a64a5;}export const DIR_FLAG={'name':a47_0xc1b88e(0xb7),'type':a47_0xc1b88e(0xb0),'required':!![],'description':a47_0xc1b88e(0xbb)};export const CREATE_NAME_FLAG={'name':a47_0xc1b88e(0xbd),'type':a47_0xc1b88e(0xb0),'required':!![],'description':'Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','pattern':{'regex':SKILL_NAME_PATTERN,'description':a47_0xc1b88e(0xa8)}};export const TYPE_FLAG={'name':a47_0xc1b88e(0xab),'type':a47_0xc1b88e(0xb0),'description':a47_0xc1b88e(0xa7),'default':a47_0xc1b88e(0xac),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':'target','type':a47_0xc1b88e(0xb0),'description':a47_0xc1b88e(0xb2),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':'force','type':a47_0xc1b88e(0xb6),'description':a47_0xc1b88e(0xbc)};export const CONFIRM_WARNINGS_FLAG={'name':a47_0xc1b88e(0xc1),'type':a47_0xc1b88e(0xb6),'description':a47_0xc1b88e(0xbf)};export const STRICT_FLAG={'name':'strict','type':a47_0xc1b88e(0xb6),'description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x2e65(){const _0x5d465e=['295HmCNff','37428inlFDx','4596210LOgHEo','12nAGpEt','684mSfSni','58808aoWhyW','1441314PHanHN','675732YNpssP','69712VuLiLt','1151115wsLIvv'];a48_0x2e65=function(){return _0x5d465e;};return a48_0x2e65();}function a48_0x2b9b(_0x3a207c,_0xf280a4){_0x3a207c=_0x3a207c-0x1e7;const _0x2e6597=a48_0x2e65();let _0x2b9b31=_0x2e6597[_0x3a207c];return _0x2b9b31;}(function(_0x25774e,_0x1f0a91){const _0x5a8810=a48_0x2b9b,_0x342f3a=_0x25774e();while(!![]){try{const _0x49464d=-parseInt(_0x5a8810(0x1e8))/0x1*(-parseInt(_0x5a8810(0x1ed))/0x2)+parseInt(_0x5a8810(0x1e9))/0x3+-parseInt(_0x5a8810(0x1eb))/0x4*(parseInt(_0x5a8810(0x1ea))/0x5)+parseInt(_0x5a8810(0x1e7))/0x6+parseInt(_0x5a8810(0x1f0))/0x7+parseInt(_0x5a8810(0x1ef))/0x8*(-parseInt(_0x5a8810(0x1ee))/0x9)+parseInt(_0x5a8810(0x1ec))/0xa;if(_0x49464d===_0x1f0a91)break;else _0x342f3a['push'](_0x342f3a['shift']());}catch(_0x3cabc5){_0x342f3a['push'](_0x342f3a['shift']());}}}(a48_0x2e65,0x72987));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x43f2(){var _0x5a3180=['13941wPfroB','object','2648ZgvTcK','1930248OFbQUh','44MmkQmh','length','934FlTnKH','2959860vZCDJR','2091817zszDuX','isArray','319268FBYJPi','string','path','some','788lNaTQM','5hYtldF','ossPath','SKILL.md','1111551bOJMtq','files'];a49_0x43f2=function(){return _0x5a3180;};return a49_0x43f2();}function a49_0x1c4b(_0x36abe8,_0x534a9a){_0x36abe8=_0x36abe8-0xd6;var _0x43f2a5=a49_0x43f2();var _0x1c4bef=_0x43f2a5[_0x36abe8];return _0x1c4bef;}(function(_0x3215b2,_0x10a775){var _0x31c605=a49_0x1c4b,_0x28f9e5=_0x3215b2();while(!![]){try{var _0x20453a=-parseInt(_0x31c605(0xd6))/0x1*(parseInt(_0x31c605(0xde))/0x2)+-parseInt(_0x31c605(0xe2))/0x3+parseInt(_0x31c605(0xda))/0x4*(-parseInt(_0x31c605(0xdf))/0x5)+-parseInt(_0x31c605(0xe7))/0x6+-parseInt(_0x31c605(0xd8))/0x7+parseInt(_0x31c605(0xe6))/0x8*(parseInt(_0x31c605(0xe4))/0x9)+parseInt(_0x31c605(0xd7))/0xa*(parseInt(_0x31c605(0xe8))/0xb);if(_0x20453a===_0x10a775)break;else _0x28f9e5['push'](_0x28f9e5['shift']());}catch(_0x1ba2c3){_0x28f9e5['push'](_0x28f9e5['shift']());}}}(a49_0x43f2,0x3ef02));export function isPackageBackedManifest(_0x2a3513){var _0x1dc463=a49_0x1c4b;return!!_0x2a3513&&typeof _0x2a3513===_0x1dc463(0xe5)&&!Array['isArray'](_0x2a3513)&&typeof _0x2a3513[_0x1dc463(0xe0)]===_0x1dc463(0xdb)&&_0x2a3513[_0x1dc463(0xe0)][_0x1dc463(0xe9)]>0x0&&Array[_0x1dc463(0xd9)](_0x2a3513[_0x1dc463(0xe3)]);}export function isMultiFileManifest(_0x1ee33e){var _0x313cfe=a49_0x1c4b;return!!_0x1ee33e&&typeof _0x1ee33e===_0x313cfe(0xe5)&&!Array[_0x313cfe(0xd9)](_0x1ee33e)&&Array[_0x313cfe(0xd9)](_0x1ee33e[_0x313cfe(0xe3)])&&_0x1ee33e[_0x313cfe(0xe3)][_0x313cfe(0xdd)](_0x78554=>_0x78554[_0x313cfe(0xdc)]!==_0x313cfe(0xe1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x26479e,_0x3429b2){const _0x12ffa9=a49_0x101f,_0x36a8ea=_0x26479e();while(!![]){try{const _0x344b4a=-parseInt(_0x12ffa9(0x110))/0x1*(-parseInt(_0x12ffa9(0x10b))/0x2)+-parseInt(_0x12ffa9(0x112))/0x3*(-parseInt(_0x12ffa9(0x124))/0x4)+parseInt(_0x12ffa9(0x10d))/0x5+-parseInt(_0x12ffa9(0xf4))/0x6+-parseInt(_0x12ffa9(0x125))/0x7+-parseInt(_0x12ffa9(0x11a))/0x8+parseInt(_0x12ffa9(0xf7))/0x9*(parseInt(_0x12ffa9(0x115))/0xa);if(_0x344b4a===_0x3429b2)break;else _0x36a8ea['push'](_0x36a8ea['shift']());}catch(_0x3ca173){_0x36a8ea['push'](_0x36a8ea['shift']());}}}(a49_0x4927,0xda6e9));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x27b3e8){const _0x450e13=a49_0x101f,{getRuntimeSkillByCode:_0x377d0c,validateRuntimeSkillPublish:_0x1a5d06}=await import(_0x450e13(0x11d)),{readPushDirectory:_0x45d29e,resolvePushDirectoryIdentity:_0x322a9c}=await import('../../skills/runtime-skill-sync.js');if(!_0x27b3e8[_0x450e13(0x100)])throw CliErrors[_0x450e13(0xfa)]();const _0x32b068=resolvePushScope(_0x27b3e8),_0x21bd37=validateSkillDirectory(_0x27b3e8['str']('dir'));throwIfSkillValidationFailed(_0x21bd37);const _0x59e36e=_0x322a9c(_0x21bd37[_0x450e13(0xf6)],_0x27b3e8[_0x450e13(0x118)],remoteFirstMetadataOptions()),_0x257272=await _0x377d0c(_0x27b3e8[_0x450e13(0x118)],_0x59e36e['skillCode']);throwIfBuiltinPushTarget(_0x257272);if(_0x32b068===_0x450e13(0x123)){const _0x5bb95c=_0x45d29e(_0x21bd37[_0x450e13(0xf6)],_0x27b3e8['appCode'],remoteMissingCompanyReadOptions()),_0x464d56=await _0x1a5d06(_0x27b3e8[_0x450e13(0x118)],_0x5bb95c[_0x450e13(0x10e)],{'visibility':_0x450e13(0xfc)});return{'method':_0x450e13(0x11b),'url':_0x450e13(0x103)+_0x27b3e8['appCode']+'/publish/validate','body':{'skillCode':_0x5bb95c[_0x450e13(0x105)],'visibility':_0x450e13(0xfc),'valid':_0x464d56[_0x450e13(0xf8)],'errors':_0x464d56['errors'],'warnings':_0x464d56[_0x450e13(0x108)],'resolvedSlug':_0x464d56['resolvedSlug'],'resolvedVersion':_0x464d56[_0x450e13(0x11e)]},'description':_0x450e13(0xff)};}if(_0x257272&&_0x257272['scope']!==_0x450e13(0x121))throw CliErrors[_0x450e13(0x126)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x59e36e[_0x450e13(0x105)]+'\x20has\x20scope=\x22'+(_0x257272[_0x450e13(0x101)]??_0x450e13(0xf3))+'\x22.');const _0xab4f08=_0x45d29e(_0x21bd37[_0x450e13(0xf6)],_0x27b3e8[_0x450e13(0x118)],_0x257272?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x3e40a2=await _0x1a5d06(_0x27b3e8['appCode'],_0xab4f08['input'],{'visibility':'PRIVATE'});return{'method':_0x450e13(0x11b),'url':_0x450e13(0x103)+_0x27b3e8[_0x450e13(0x118)]+'/publish/validate','body':{'skillCode':_0xab4f08[_0x450e13(0x105)],'visibility':_0x450e13(0xf5),'valid':_0x3e40a2['valid'],'errors':_0x3e40a2['errors'],'warnings':_0x3e40a2[_0x450e13(0x108)],'resolvedSlug':_0x3e40a2[_0x450e13(0x119)],'resolvedVersion':_0x3e40a2[_0x450e13(0x11e)]},'description':_0x450e13(0x127)};}function a49_0x101f(_0x173608,_0x2ed19e){_0x173608=_0x173608-0xf3;const _0x4927d2=a49_0x4927();let _0x101fbe=_0x4927d2[_0x173608];return _0x101fbe;}export async function skillPushExecute(_0x26fbe5){const _0x380a8f=a49_0x101f,{createPersonalRuntimeSkill:_0x385fa3,downloadRuntimeSkillPackage:_0x3f4601,getRuntimeSkillByCode:_0x38e90,publishCompanyRuntimeSkill:_0x595b81,updatePersonalRuntimeSkill:_0x5dd4c0,validateRuntimeSkillPublish:_0x3007ef}=await import('../../core/api-client.js'),{verifyRuntimeSkillPackage:_0xa3aa74,verifyRuntimeSkillBundle:_0x61b277,readPushDirectory:_0x57a50c,refreshPushDirectoryMetadataFromRemote:_0x17a7b4,recordPushedRuntimeSkill:_0xebf734,resolvePushDirectoryIdentity:_0x4aa3fa}=await import(_0x380a8f(0x129));if(!_0x26fbe5['accessKey'])throw CliErrors[_0x380a8f(0xfa)]();const _0x1e51c0=resolvePushScope(_0x26fbe5),_0x161ddd=_0x26fbe5[_0x380a8f(0x113)](_0x380a8f(0x122))||_0x26fbe5['bool'](_0x380a8f(0x106)),_0x19542a=validateSkillDirectory(_0x26fbe5[_0x380a8f(0x128)](_0x380a8f(0xf6)));throwIfSkillValidationFailed(_0x19542a);const _0x42614c=_0x19542a['dir'];let _0x548837;if(_0x1e51c0==='company'){const _0x44d610=_0x4aa3fa(_0x42614c,_0x26fbe5[_0x380a8f(0x118)],remoteFirstMetadataOptions()),_0x1ec01a=await _0x38e90(_0x26fbe5[_0x380a8f(0x118)],_0x44d610[_0x380a8f(0x105)]);throwIfBuiltinPushTarget(_0x1ec01a);if(_0x1ec01a)_0x17a7b4(_0x42614c,_0x1ec01a,_0x26fbe5[_0x380a8f(0x118)]);const _0x5de4f1=_0x57a50c(_0x42614c,_0x26fbe5[_0x380a8f(0x118)],_0x1ec01a?{'targetScope':_0x380a8f(0x123),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x548837={'scope':_0x380a8f(0x123),'payload':_0x5de4f1,'publishInput':_0x5de4f1[_0x380a8f(0x10e)],'remoteForPreflight':_0x1ec01a,'warnings':[]};}else{const _0x584b0=_0x26fbe5[_0x380a8f(0x128)](_0x380a8f(0x104))[_0x380a8f(0x10a)](),_0x3fe1b7=Boolean(_0x584b0),_0x135401=allowRetargetArgs(_0x3fe1b7),_0x36a14c=_0x4aa3fa(_0x42614c,_0x26fbe5['appCode'],{...remoteFirstMetadataOptions(),..._0x135401[0x0]}),_0x16d4f8=await _0x38e90(_0x26fbe5['appCode'],_0x36a14c[_0x380a8f(0x105)]);throwIfBuiltinPushTarget(_0x16d4f8);if(_0x16d4f8){if(_0x16d4f8[_0x380a8f(0x101)]!==_0x380a8f(0x121)){if(_0x3fe1b7)throw CliErrors[_0x380a8f(0x126)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x36a14c[_0x380a8f(0x105)]+_0x380a8f(0x107)+(_0x16d4f8[_0x380a8f(0x101)]??_0x380a8f(0xf3))+'\x22.');_0x17a7b4(_0x42614c,_0x16d4f8,_0x26fbe5[_0x380a8f(0x118)]);}else!_0x3fe1b7&&_0x17a7b4(_0x42614c,_0x16d4f8,_0x26fbe5['appCode']);}const _0x2abd20=_0x57a50c(_0x42614c,_0x26fbe5[_0x380a8f(0x118)],_0x16d4f8?remotePersonalReadOptions(_0x3fe1b7,_0x135401[0x0]):remoteMissingPersonalReadOptions(_0x135401[0x0])),_0xa36b8b=_0x16d4f8?.['scope']===_0x380a8f(0x121)&&_0x16d4f8[_0x380a8f(0x105)]===_0x2abd20[_0x380a8f(0x105)]?_0x16d4f8:undefined,_0x531a1a=_0x3fe1b7&&_0xa36b8b?withRetargetExistingMetadata(_0x2abd20[_0x380a8f(0x10e)],_0xa36b8b,{'preferInputSkillName':Boolean(_0x2abd20['frontmatterDisplayName'])}):_0x2abd20[_0x380a8f(0x10e)],_0x8780a3=_0x3fe1b7?buildRetargetWarning(_0x36a14c['metadata'],_0x26fbe5[_0x380a8f(0x118)]):[];_0x548837={'scope':_0x380a8f(0x121),'payload':_0x2abd20,'publishInput':_0x531a1a,'remoteForPreflight':_0xa36b8b,'existing':_0xa36b8b,'warnings':[..._0x19542a['warnings'],..._0x8780a3]};}const _0x24cfc0=await runRemoteContentPreflight({'scope':_0x548837[_0x380a8f(0x101)],'remote':_0x548837[_0x380a8f(0x114)],'publishInput':_0x548837[_0x380a8f(0x111)],'skillCode':_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],'appCode':_0x26fbe5[_0x380a8f(0x118)],'downloadRuntimeSkillPackage':_0x3f4601,'verifyRuntimeSkillBundle':_0x61b277});if(_0x24cfc0[_0x380a8f(0x117)]===_0x380a8f(0xf9))return _0x548837[_0x380a8f(0x101)]==='company'?_0xebf734(_0x42614c,_0x24cfc0[_0x380a8f(0xfe)],_0x26fbe5[_0x380a8f(0x118)],{'scope':_0x380a8f(0x123)}):_0xebf734(_0x42614c,_0x24cfc0[_0x380a8f(0xfe)],_0x26fbe5[_0x380a8f(0x118)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x24cfc0['savedSkill']),'scope':_0x548837[_0x380a8f(0x101)],..._0x548837['scope']===_0x380a8f(0x121)?{'warnings':_0x548837[_0x380a8f(0x108)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x548837[_0x380a8f(0x101)])+_0x380a8f(0x11f)+_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x548837[_0x380a8f(0x101)]===_0x380a8f(0x123)){const _0x292133=await _0x3007ef(_0x26fbe5[_0x380a8f(0x118)],_0x548837[_0x380a8f(0x111)],{'visibility':_0x380a8f(0xfc)});throwIfPublishValidationFailed('company',_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],_0x292133),throwIfUnconfirmedPublishWarnings('company',_0x548837[_0x380a8f(0x116)]['skillCode'],_0x292133[_0x380a8f(0x108)],_0x161ddd);const _0x371330=await _0x595b81(_0x26fbe5[_0x380a8f(0x118)],_0x548837[_0x380a8f(0x111)],{'confirmWarnings':_0x161ddd});return _0xebf734(_0x42614c,{..._0x371330,'files':_0x548837[_0x380a8f(0x111)][_0x380a8f(0x120)]},_0x26fbe5['appCode'],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x371330),'scope':_0x380a8f(0x123),'reviewState':_0x380a8f(0x109),'submittedForReview':!![],'validation':{'warnings':_0x292133[_0x380a8f(0x108)]}},'message':'Submitted\x20company\x20Skill\x20'+_0x548837[_0x380a8f(0x116)]['skillCode']+_0x380a8f(0x102)+(_0x371330[_0x380a8f(0x10f)]??_0x380a8f(0x11c))+'\x20for\x20review'};}const _0x22900d=await _0x3007ef(_0x26fbe5['appCode'],_0x548837[_0x380a8f(0x111)],{'visibility':_0x380a8f(0xf5)});throwIfPublishValidationFailed(_0x380a8f(0x121),_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],_0x22900d),throwIfUnconfirmedPublishWarnings(_0x380a8f(0x121),_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],_0x22900d[_0x380a8f(0x108)],_0x161ddd);const _0x3bc30a={'confirmWarnings':_0x161ddd},_0x475699=_0x548837[_0x380a8f(0x10c)]?await _0x5dd4c0(_0x548837[_0x380a8f(0x116)]['skillCode'],_0x26fbe5[_0x380a8f(0x118)],_0x548837[_0x380a8f(0x111)],_0x3bc30a):await _0x385fa3(_0x26fbe5[_0x380a8f(0x118)],_0x548837[_0x380a8f(0x111)],_0x3bc30a);let _0x465415=_0x475699;if(isMultiFileManifest(_0x548837[_0x380a8f(0x111)][_0x380a8f(0x120)])){const _0x1f52a3=await _0x3f4601('personal',_0x475699[_0x380a8f(0x105)]||_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],_0x26fbe5[_0x380a8f(0x118)]);_0x61b277(_0x548837[_0x380a8f(0x111)][_0x380a8f(0x120)],_0x1f52a3),_0x465415={..._0x475699,'files':_0x548837[_0x380a8f(0x111)][_0x380a8f(0x120)]};}else{if(isPackageBackedManifest(_0x475699[_0x380a8f(0x120)])){const _0x5dde13=await _0x3f4601(_0x380a8f(0x121),_0x475699['skillCode']||_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)],_0x26fbe5['appCode']);_0xa3aa74(_0x475699[_0x380a8f(0x120)],_0x5dde13);}}return _0xebf734(_0x42614c,_0x465415,_0x26fbe5[_0x380a8f(0x118)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x475699),'warnings':_0x548837[_0x380a8f(0x108)],'validation':{'warnings':_0x22900d['warnings']}},'message':_0x548837[_0x380a8f(0x10c)]?_0x380a8f(0xfd)+_0x548837[_0x380a8f(0x116)][_0x380a8f(0x105)]:_0x380a8f(0xfb)+_0x548837[_0x380a8f(0x116)]['skillCode']};}function scopeLabel(_0x5ab9aa){const _0x2c21f1=a49_0x101f;return _0x5ab9aa===_0x2c21f1(0x123)?_0x2c21f1(0x12a):'Personal';}function a49_0x4927(){const _0x2525fd=['version','81877IfpSAx','publishInput','13521NlvRSB','bool','remoteForPreflight','280SGBKxf','payload','status','appCode','resolvedSlug','5358552SKLftw','POST','(unknown)','../../core/api-client.js','resolvedVersion','\x20Skill\x20','files','personal','confirm-warnings','company','152iDrVmO','4798346PGajbg','validation','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','str','../../skills/runtime-skill-sync.js','Company','unknown','7900458reKQKg','PRIVATE','dir','99585achsBN','valid','identical','authRequired','Created\x20personal\x20Skill\x20','NAMESPACE_ONLY','Updated\x20personal\x20Skill\x20','savedSkill','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','accessKey','scope','\x20version\x20','/api/cli/v1/skills/','appcode','skillCode','confirmWarnings','\x20has\x20scope=\x22','warnings','submitted','trim','42hMJTQX','existing','6831170eaPnNj','input'];a49_0x4927=function(){return _0x2525fd;};return a49_0x4927();}
|
|
1
|
+
(function(_0x42b066,_0x43d1c8){const _0x4e26fd=a50_0x5105,_0x3f010e=_0x42b066();while(!![]){try{const _0x33a641=parseInt(_0x4e26fd(0x1d4))/0x1+parseInt(_0x4e26fd(0x1ef))/0x2+-parseInt(_0x4e26fd(0x1e8))/0x3*(-parseInt(_0x4e26fd(0x1d0))/0x4)+parseInt(_0x4e26fd(0x1e9))/0x5*(-parseInt(_0x4e26fd(0x1bd))/0x6)+parseInt(_0x4e26fd(0x1c3))/0x7+parseInt(_0x4e26fd(0x1f0))/0x8*(parseInt(_0x4e26fd(0x1eb))/0x9)+-parseInt(_0x4e26fd(0x1f1))/0xa;if(_0x33a641===_0x43d1c8)break;else _0x3f010e['push'](_0x3f010e['shift']());}catch(_0x27d01f){_0x3f010e['push'](_0x3f010e['shift']());}}}(a50_0x5ba6,0xd5fd2));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';function a50_0x5105(_0xdb16c4,_0x33c672){_0xdb16c4=_0xdb16c4-0x1bb;const _0x5ba6e6=a50_0x5ba6();let _0x51053e=_0x5ba6e6[_0xdb16c4];return _0x51053e;}import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';function a50_0x5ba6(){const _0x253cdc=['remoteForPreflight','NAMESPACE_ONLY','resolvedVersion','skillCode','unknown','Company','/publish/validate','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','files','\x20has\x20scope=\x22','resolvedSlug','existing','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','company','/api/cli/v1/skills/','status','PRIVATE','dir','input','72vNqLKK','593000fJQtug','appCode','18TOBRUj','warnings','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','Created\x20personal\x20Skill\x20','453356AObhOy','2831496jzznUH','25350910DgiPCD','metadata','validation','version','frontmatterDisplayName','savedSkill','6PedSxX','../../core/api-client.js','publishInput','bool','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','\x20for\x20review','4577874JnAdmc','accessKey','trim','authRequired','errors','identical','Updated\x20personal\x20Skill\x20','payload','../../skills/runtime-skill-sync.js','str','personal','scope','submitted','253864NTKwNp','\x20version\x20','Personal','POST','418471dgHUzB'];a50_0x5ba6=function(){return _0x253cdc;};return a50_0x5ba6();}export async function skillPushDryRun(_0x4671a8){const _0x287499=a50_0x5105,{getRuntimeSkillByCode:_0x25d3ea,validateRuntimeSkillPublish:_0x1f450d}=await import('../../core/api-client.js'),{readPushDirectory:_0x4597d2,resolvePushDirectoryIdentity:_0x19cc71}=await import(_0x287499(0x1cb));if(!_0x4671a8[_0x287499(0x1c4)])throw CliErrors[_0x287499(0x1c6)]();const _0x3ab7bb=resolvePushScope(_0x4671a8),_0xd0dbd8=validateSkillDirectory(_0x4671a8[_0x287499(0x1cc)]('dir'));throwIfSkillValidationFailed(_0xd0dbd8);const _0x249ed9=_0x19cc71(_0xd0dbd8[_0x287499(0x1e6)],_0x4671a8['appCode'],remoteFirstMetadataOptions()),_0x1a3b3d=await _0x25d3ea(_0x4671a8['appCode'],_0x249ed9['skillCode']);throwIfBuiltinPushTarget(_0x1a3b3d);if(_0x3ab7bb===_0x287499(0x1e2)){const _0x2868b9=_0x4597d2(_0xd0dbd8['dir'],_0x4671a8['appCode'],remoteMissingCompanyReadOptions()),_0x503d70=await _0x1f450d(_0x4671a8[_0x287499(0x1ea)],_0x2868b9[_0x287499(0x1e7)],{'visibility':_0x287499(0x1d6)});return{'method':_0x287499(0x1d3),'url':_0x287499(0x1e3)+_0x4671a8[_0x287499(0x1ea)]+_0x287499(0x1db),'body':{'skillCode':_0x2868b9['skillCode'],'visibility':_0x287499(0x1d6),'valid':_0x503d70['valid'],'errors':_0x503d70['errors'],'warnings':_0x503d70[_0x287499(0x1ec)],'resolvedSlug':_0x503d70['resolvedSlug'],'resolvedVersion':_0x503d70[_0x287499(0x1d7)]},'description':_0x287499(0x1dc)};}if(_0x1a3b3d&&_0x1a3b3d[_0x287499(0x1ce)]!=='personal')throw CliErrors[_0x287499(0x1f3)](_0x287499(0x1c1)+_0x249ed9[_0x287499(0x1d8)]+'\x20has\x20scope=\x22'+(_0x1a3b3d[_0x287499(0x1ce)]??_0x287499(0x1d9))+'\x22.');const _0x5ec211=_0x4597d2(_0xd0dbd8['dir'],_0x4671a8['appCode'],_0x1a3b3d?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x19bd9a=await _0x1f450d(_0x4671a8[_0x287499(0x1ea)],_0x5ec211[_0x287499(0x1e7)],{'visibility':_0x287499(0x1e5)});return{'method':_0x287499(0x1d3),'url':_0x287499(0x1e3)+_0x4671a8['appCode']+_0x287499(0x1db),'body':{'skillCode':_0x5ec211[_0x287499(0x1d8)],'visibility':_0x287499(0x1e5),'valid':_0x19bd9a['valid'],'errors':_0x19bd9a[_0x287499(0x1c7)],'warnings':_0x19bd9a[_0x287499(0x1ec)],'resolvedSlug':_0x19bd9a[_0x287499(0x1df)],'resolvedVersion':_0x19bd9a['resolvedVersion']},'description':_0x287499(0x1e1)};}export async function skillPushExecute(_0x1a6bbd){const _0x3ce69e=a50_0x5105,{createPersonalRuntimeSkill:_0x4218ac,downloadRuntimeSkillPackage:_0x482c1b,getRuntimeSkillByCode:_0x3b3278,publishCompanyRuntimeSkill:_0x48e865,updatePersonalRuntimeSkill:_0x3271d8,validateRuntimeSkillPublish:_0x290a74}=await import(_0x3ce69e(0x1be)),{verifyRuntimeSkillPackage:_0xa17212,verifyRuntimeSkillBundle:_0x15e00a,readPushDirectory:_0x1d12e8,refreshPushDirectoryMetadataFromRemote:_0x134307,recordPushedRuntimeSkill:_0x101b61,resolvePushDirectoryIdentity:_0x5d4b77}=await import(_0x3ce69e(0x1cb));if(!_0x1a6bbd[_0x3ce69e(0x1c4)])throw CliErrors[_0x3ce69e(0x1c6)]();const _0x2fcb40=resolvePushScope(_0x1a6bbd),_0x303b78=_0x1a6bbd[_0x3ce69e(0x1c0)]('confirm-warnings')||_0x1a6bbd['bool']('confirmWarnings'),_0x26ca40=validateSkillDirectory(_0x1a6bbd['str'](_0x3ce69e(0x1e6)));throwIfSkillValidationFailed(_0x26ca40);const _0x591d06=_0x26ca40[_0x3ce69e(0x1e6)];let _0x22e0b2;if(_0x2fcb40==='company'){const _0x278c73=_0x5d4b77(_0x591d06,_0x1a6bbd[_0x3ce69e(0x1ea)],remoteFirstMetadataOptions()),_0x125f2e=await _0x3b3278(_0x1a6bbd[_0x3ce69e(0x1ea)],_0x278c73[_0x3ce69e(0x1d8)]);throwIfBuiltinPushTarget(_0x125f2e);if(_0x125f2e)_0x134307(_0x591d06,_0x125f2e,_0x1a6bbd['appCode']);const _0x1ec9a7=_0x1d12e8(_0x591d06,_0x1a6bbd[_0x3ce69e(0x1ea)],_0x125f2e?{'targetScope':_0x3ce69e(0x1e2),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x22e0b2={'scope':'company','payload':_0x1ec9a7,'publishInput':_0x1ec9a7[_0x3ce69e(0x1e7)],'remoteForPreflight':_0x125f2e,'warnings':[]};}else{const _0x59b528=_0x1a6bbd[_0x3ce69e(0x1cc)]('appcode')[_0x3ce69e(0x1c5)](),_0x5d6f3f=Boolean(_0x59b528),_0x71ede6=allowRetargetArgs(_0x5d6f3f),_0x2d339=_0x5d4b77(_0x591d06,_0x1a6bbd['appCode'],{...remoteFirstMetadataOptions(),..._0x71ede6[0x0]}),_0x5c26a3=await _0x3b3278(_0x1a6bbd['appCode'],_0x2d339['skillCode']);throwIfBuiltinPushTarget(_0x5c26a3);if(_0x5c26a3){if(_0x5c26a3[_0x3ce69e(0x1ce)]!==_0x3ce69e(0x1cd)){if(_0x5d6f3f)throw CliErrors[_0x3ce69e(0x1f3)](_0x3ce69e(0x1c1)+_0x2d339[_0x3ce69e(0x1d8)]+_0x3ce69e(0x1de)+(_0x5c26a3[_0x3ce69e(0x1ce)]??'unknown')+'\x22.');_0x134307(_0x591d06,_0x5c26a3,_0x1a6bbd[_0x3ce69e(0x1ea)]);}else!_0x5d6f3f&&_0x134307(_0x591d06,_0x5c26a3,_0x1a6bbd[_0x3ce69e(0x1ea)]);}const _0x4ca64b=_0x1d12e8(_0x591d06,_0x1a6bbd[_0x3ce69e(0x1ea)],_0x5c26a3?remotePersonalReadOptions(_0x5d6f3f,_0x71ede6[0x0]):remoteMissingPersonalReadOptions(_0x71ede6[0x0])),_0x2c1d3d=_0x5c26a3?.[_0x3ce69e(0x1ce)]===_0x3ce69e(0x1cd)&&_0x5c26a3[_0x3ce69e(0x1d8)]===_0x4ca64b[_0x3ce69e(0x1d8)]?_0x5c26a3:undefined,_0x25bd03=_0x5d6f3f&&_0x2c1d3d?withRetargetExistingMetadata(_0x4ca64b[_0x3ce69e(0x1e7)],_0x2c1d3d,{'preferInputSkillName':Boolean(_0x4ca64b[_0x3ce69e(0x1bb)])}):_0x4ca64b[_0x3ce69e(0x1e7)],_0x2d11b6=_0x5d6f3f?buildRetargetWarning(_0x2d339[_0x3ce69e(0x1f2)],_0x1a6bbd[_0x3ce69e(0x1ea)]):[];_0x22e0b2={'scope':'personal','payload':_0x4ca64b,'publishInput':_0x25bd03,'remoteForPreflight':_0x2c1d3d,'existing':_0x2c1d3d,'warnings':[..._0x26ca40['warnings'],..._0x2d11b6]};}const _0x675a86=await runRemoteContentPreflight({'scope':_0x22e0b2[_0x3ce69e(0x1ce)],'remote':_0x22e0b2[_0x3ce69e(0x1d5)],'publishInput':_0x22e0b2[_0x3ce69e(0x1bf)],'skillCode':_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)],'appCode':_0x1a6bbd[_0x3ce69e(0x1ea)],'downloadRuntimeSkillPackage':_0x482c1b,'verifyRuntimeSkillBundle':_0x15e00a});if(_0x675a86[_0x3ce69e(0x1e4)]===_0x3ce69e(0x1c8))return _0x22e0b2['scope']===_0x3ce69e(0x1e2)?_0x101b61(_0x591d06,_0x675a86[_0x3ce69e(0x1bc)],_0x1a6bbd[_0x3ce69e(0x1ea)],{'scope':'company'}):_0x101b61(_0x591d06,_0x675a86[_0x3ce69e(0x1bc)],_0x1a6bbd[_0x3ce69e(0x1ea)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x675a86['savedSkill']),'scope':_0x22e0b2[_0x3ce69e(0x1ce)],..._0x22e0b2['scope']===_0x3ce69e(0x1cd)?{'warnings':_0x22e0b2['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x22e0b2[_0x3ce69e(0x1ce)])+'\x20Skill\x20'+_0x22e0b2[_0x3ce69e(0x1ca)]['skillCode']+_0x3ce69e(0x1ed)};if(_0x22e0b2[_0x3ce69e(0x1ce)]===_0x3ce69e(0x1e2)){const _0x40cc8f=await _0x290a74(_0x1a6bbd['appCode'],_0x22e0b2[_0x3ce69e(0x1bf)],{'visibility':'NAMESPACE_ONLY'});throwIfPublishValidationFailed('company',_0x22e0b2['payload'][_0x3ce69e(0x1d8)],_0x40cc8f),throwIfUnconfirmedPublishWarnings('company',_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)],_0x40cc8f['warnings'],_0x303b78);const _0x3b2586=await _0x48e865(_0x1a6bbd[_0x3ce69e(0x1ea)],_0x22e0b2[_0x3ce69e(0x1bf)],{'confirmWarnings':_0x303b78});return _0x101b61(_0x591d06,{..._0x3b2586,'files':_0x22e0b2[_0x3ce69e(0x1bf)]['files']},_0x1a6bbd[_0x3ce69e(0x1ea)],{'scope':_0x3ce69e(0x1e2)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3b2586),'scope':_0x3ce69e(0x1e2),'reviewState':_0x3ce69e(0x1cf),'submittedForReview':!![],'validation':{'warnings':_0x40cc8f[_0x3ce69e(0x1ec)]}},'message':'Submitted\x20company\x20Skill\x20'+_0x22e0b2['payload']['skillCode']+_0x3ce69e(0x1d1)+(_0x3b2586[_0x3ce69e(0x1f4)]??'(unknown)')+_0x3ce69e(0x1c2)};}const _0x201a5d=await _0x290a74(_0x1a6bbd[_0x3ce69e(0x1ea)],_0x22e0b2[_0x3ce69e(0x1bf)],{'visibility':'PRIVATE'});throwIfPublishValidationFailed(_0x3ce69e(0x1cd),_0x22e0b2['payload'][_0x3ce69e(0x1d8)],_0x201a5d),throwIfUnconfirmedPublishWarnings(_0x3ce69e(0x1cd),_0x22e0b2[_0x3ce69e(0x1ca)]['skillCode'],_0x201a5d[_0x3ce69e(0x1ec)],_0x303b78);const _0x294cd6={'confirmWarnings':_0x303b78},_0x5b7b5e=_0x22e0b2[_0x3ce69e(0x1e0)]?await _0x3271d8(_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)],_0x1a6bbd['appCode'],_0x22e0b2[_0x3ce69e(0x1bf)],_0x294cd6):await _0x4218ac(_0x1a6bbd[_0x3ce69e(0x1ea)],_0x22e0b2[_0x3ce69e(0x1bf)],_0x294cd6);let _0x27b033=_0x5b7b5e;if(isMultiFileManifest(_0x22e0b2[_0x3ce69e(0x1bf)][_0x3ce69e(0x1dd)])){const _0x2c790d=await _0x482c1b(_0x3ce69e(0x1cd),_0x5b7b5e[_0x3ce69e(0x1d8)]||_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)],_0x1a6bbd[_0x3ce69e(0x1ea)]);_0x15e00a(_0x22e0b2[_0x3ce69e(0x1bf)]['files'],_0x2c790d),_0x27b033={..._0x5b7b5e,'files':_0x22e0b2[_0x3ce69e(0x1bf)][_0x3ce69e(0x1dd)]};}else{if(isPackageBackedManifest(_0x5b7b5e['files'])){const _0x237291=await _0x482c1b('personal',_0x5b7b5e[_0x3ce69e(0x1d8)]||_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)],_0x1a6bbd[_0x3ce69e(0x1ea)]);_0xa17212(_0x5b7b5e[_0x3ce69e(0x1dd)],_0x237291);}}return _0x101b61(_0x591d06,_0x27b033,_0x1a6bbd[_0x3ce69e(0x1ea)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5b7b5e),'warnings':_0x22e0b2[_0x3ce69e(0x1ec)],'validation':{'warnings':_0x201a5d['warnings']}},'message':_0x22e0b2[_0x3ce69e(0x1e0)]?_0x3ce69e(0x1c9)+_0x22e0b2[_0x3ce69e(0x1ca)][_0x3ce69e(0x1d8)]:_0x3ce69e(0x1ee)+_0x22e0b2[_0x3ce69e(0x1ca)]['skillCode']};}function scopeLabel(_0x2f00a6){const _0x4ef6e9=a50_0x5105;return _0x2f00a6==='company'?_0x4ef6e9(0x1da):_0x4ef6e9(0x1d2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x165cbe,_0x54b8ee){const _0x14f92a=a51_0x2c60,_0x4afa81=_0x165cbe();while(!![]){try{const _0x1a03be=-parseInt(_0x14f92a(0x178))/0x1*(-parseInt(_0x14f92a(0x18f))/0x2)+parseInt(_0x14f92a(0x18e))/0x3+-parseInt(_0x14f92a(0x18d))/0x4*(-parseInt(_0x14f92a(0x183))/0x5)+-parseInt(_0x14f92a(0x172))/0x6*(-parseInt(_0x14f92a(0x168))/0x7)+-parseInt(_0x14f92a(0x175))/0x8+-parseInt(_0x14f92a(0x16c))/0x9+parseInt(_0x14f92a(0x182))/0xa;if(_0x1a03be===_0x54b8ee)break;else _0x4afa81['push'](_0x4afa81['shift']());}catch(_0x13e361){_0x4afa81['push'](_0x4afa81['shift']());}}}(a51_0x7d3e,0xbfa8a));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x3c97c7){const _0x2b91b2=a51_0x2c60,_0x5045df=_0x3c97c7[_0x2b91b2(0x17d)](_0x2b91b2(0x176))||'personal';if(_0x5045df==='personal'||_0x5045df==='company')return _0x5045df;throw CliErrors[_0x2b91b2(0x16b)](_0x2b91b2(0x186)+_0x5045df+'\x22.');}function a51_0x7d3e(){const _0x3d29d9=['2415681fJApMc','5114DPzFbf','publishInput','Local\x20Skill\x20metadata\x20appCode\x20','appCode','valid','skillCode','7JLaqNu','errors','different','validation','9311049welNwt','skill-metadata-appcode-retargeted','verifyRuntimeSkillBundle','warning','warnings','files','188190spBGpP','\x20cannot\x20be\x20pushed.','company','1415944tglkcB','scope','Builtin\x20Skill\x20','79LPbOpK','\x20Skill\x20push\x20validation\x20failed\x20for\x20','identical','length','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','str','join','not-applicable','Review\x20each\x20warning\x20before\x20continuing.','version','6520570TpXThA','191210LFhbtM','(unknown)','SkillHub\x20validation\x20returned\x20invalid.','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','Company','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','Warnings:\x20','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','remote','downloadRuntimeSkillPackage','32RJCZuF'];a51_0x7d3e=function(){return _0x3d29d9;};return a51_0x7d3e();}function a51_0x2c60(_0x265300,_0x40e7c5){_0x265300=_0x265300-0x163;const _0x7d3e13=a51_0x7d3e();let _0x2c60e8=_0x7d3e13[_0x265300];return _0x2c60e8;}export function allowRetargetArgs(_0x1d2619){return _0x1d2619?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x3ceb66=a51_0x2c60;return{'targetScope':_0x3ceb66(0x174),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x4ecb02={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x4ecb02};}export function remotePersonalReadOptions(_0x21dd61,_0x18acc3={}){return{'ignoreInvalidMetadata':!![],..._0x21dd61?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x18acc3};}export function throwIfBuiltinPushTarget(_0xa5f050){const _0x237d58=a51_0x2c60;if(_0xa5f050?.[_0x237d58(0x176)]!=='builtin')return;throw CliErrors[_0x237d58(0x16b)](_0x237d58(0x177)+(_0xa5f050[_0x237d58(0x167)]??_0x237d58(0x184))+_0x237d58(0x173),_0x237d58(0x17c));}export function throwIfPublishValidationFailed(_0x3827e8,_0x120ba6,_0x15e58c){const _0x36a591=a51_0x2c60;if(_0x15e58c['errors'][_0x36a591(0x17b)]===0x0&&(_0x15e58c[_0x36a591(0x166)]||_0x15e58c[_0x36a591(0x170)][_0x36a591(0x17b)]>0x0))return;const _0x3e3994=_0x15e58c[_0x36a591(0x169)]['length']>0x0?_0x15e58c['errors'][_0x36a591(0x17e)](';\x20'):_0x36a591(0x185),_0x20e5a0=_0x3827e8==='company'?_0x36a591(0x187):'Personal';throw CliErrors[_0x36a591(0x16b)](_0x20e5a0+_0x36a591(0x179)+_0x120ba6+'.',_0x3e3994);}export function throwIfUnconfirmedPublishWarnings(_0x12bd2a,_0x94872,_0x49663a,_0x41519c){const _0x587bce=a51_0x2c60;if(_0x49663a[_0x587bce(0x17b)]===0x0||_0x41519c)return;const _0x43c13e=_0x12bd2a===_0x587bce(0x174)?'Company':'Personal';throw CliErrors['validation'](_0x43c13e+_0x587bce(0x18a)+_0x94872+'.',[_0x587bce(0x180),'Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.',_0x587bce(0x189)+_0x49663a['join'](';\x20')]['join']('\x20'));}export function buildRetargetWarning(_0x408b22,_0x4518cf){const _0x2c9d06=a51_0x2c60;if(!_0x408b22?.['appCode']||_0x408b22[_0x2c9d06(0x165)]===_0x4518cf)return[];return[{'level':_0x2c9d06(0x16f),'ruleId':_0x2c9d06(0x16d),'file':'lovrabet.skill.json','message':_0x2c9d06(0x164)+_0x408b22[_0x2c9d06(0x165)]+_0x2c9d06(0x188)+_0x4518cf+'\x20after\x20successful\x20push.','suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}export async function runRemoteContentPreflight(_0x24fc44){const _0x235aeb=a51_0x2c60;if(!_0x24fc44[_0x235aeb(0x18b)]||_0x24fc44[_0x235aeb(0x18b)][_0x235aeb(0x176)]!==_0x24fc44[_0x235aeb(0x176)]||!_0x24fc44[_0x235aeb(0x163)][_0x235aeb(0x171)])return{'status':'not-applicable'};const _0x54ce3d=_0x24fc44[_0x235aeb(0x18b)][_0x235aeb(0x167)]||_0x24fc44[_0x235aeb(0x167)];if(!_0x54ce3d)return{'status':_0x235aeb(0x17f)};const _0x384f60=await _0x24fc44[_0x235aeb(0x18c)](_0x24fc44[_0x235aeb(0x176)],_0x54ce3d,_0x24fc44['appCode'],_0x24fc44[_0x235aeb(0x18b)][_0x235aeb(0x181)]);try{_0x24fc44[_0x235aeb(0x16e)](_0x24fc44[_0x235aeb(0x163)][_0x235aeb(0x171)],_0x384f60);}catch{return{'status':_0x235aeb(0x16a)};}return{'status':_0x235aeb(0x17a),'savedSkill':{..._0x24fc44[_0x235aeb(0x18b)],'content':_0x24fc44['publishInput']['content'],'files':_0x24fc44[_0x235aeb(0x163)][_0x235aeb(0x171)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4953fc,_0x2126bc){const _0x3cd250=a52_0x2a39,_0x7b598f=_0x4953fc();while(!![]){try{const _0x29bc61=-parseInt(_0x3cd250(0x82))/0x1*(parseInt(_0x3cd250(0x8b))/0x2)+parseInt(_0x3cd250(0x8f))/0x3*(-parseInt(_0x3cd250(0x7d))/0x4)+-parseInt(_0x3cd250(0x8d))/0x5+-parseInt(_0x3cd250(0x89))/0x6*(parseInt(_0x3cd250(0x8e))/0x7)+parseInt(_0x3cd250(0x86))/0x8*(-parseInt(_0x3cd250(0x7e))/0x9)+parseInt(_0x3cd250(0x85))/0xa+parseInt(_0x3cd250(0x8c))/0xb;if(_0x29bc61===_0x2126bc)break;else _0x7b598f['push'](_0x7b598f['shift']());}catch(_0x3a4e6d){_0x7b598f['push'](_0x7b598f['shift']());}}}(a52_0x3127,0xcac9a));function a52_0x3127(){const _0x31cbf6=['lovrabet.skill.json','8041290LghOQr','isArray','2AfKDaZ','30867892JRRZYN','1645340DqFpeC','7NaaSZi','3500823WOwgbr','version','skill-metadata-appcode-retargeted','description','4eWWlbi','9CeDZty','appCode','skillName','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','337419GlBBzs','tags','\x20after\x20successful\x20push.','16248220LHxdtn','3413864vsgUjT','sourceSessionId'];a52_0x3127=function(){return _0x31cbf6;};return a52_0x3127();}export function withRetargetExistingMetadata(_0x4da344,_0x3890ac,_0x3fba84={}){const _0x3001c5=a52_0x2a39,_0x29cc32=_0x3fba84['preferInputSkillName']?_0x4da344['skillName']??_0x3890ac['skillName']:_0x3890ac[_0x3001c5(0x80)]??_0x4da344[_0x3001c5(0x80)];return{..._0x4da344,'skillName':_0x29cc32,'description':_0x3890ac[_0x3001c5(0x7c)]??_0x4da344[_0x3001c5(0x7c)],'tags':Array[_0x3001c5(0x8a)](_0x3890ac['tags'])?_0x3890ac[_0x3001c5(0x83)]:_0x4da344['tags'],'version':_0x3890ac[_0x3001c5(0x7a)]??_0x4da344['version'],'sourceSessionId':_0x3890ac[_0x3001c5(0x87)]??_0x4da344['sourceSessionId']};}function a52_0x2a39(_0x439b8c,_0x233f57){_0x439b8c=_0x439b8c-0x7a;const _0x3127cd=a52_0x3127();let _0x2a3908=_0x3127cd[_0x439b8c];return _0x2a3908;}export function buildRetargetWarning(_0x510772,_0x53d8f8){const _0x54c9f8=a52_0x2a39;if(!_0x510772?.[_0x54c9f8(0x7f)]||_0x510772[_0x54c9f8(0x7f)]===_0x53d8f8)return[];return[{'level':'warning','ruleId':_0x54c9f8(0x7b),'file':_0x54c9f8(0x88),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x510772[_0x54c9f8(0x7f)]+_0x54c9f8(0x81)+_0x53d8f8+_0x54c9f8(0x84),'suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x41b224,_0x176a67){const _0x32aff5=a53_0xb4e7,_0x33928b=_0x41b224();while(!![]){try{const _0x1aa8c7=-parseInt(_0x32aff5(0x1eb))/0x1*(-parseInt(_0x32aff5(0x1f3))/0x2)+parseInt(_0x32aff5(0x1ed))/0x3+-parseInt(_0x32aff5(0x1f8))/0x4*(-parseInt(_0x32aff5(0x1f4))/0x5)+-parseInt(_0x32aff5(0x1ea))/0x6*(parseInt(_0x32aff5(0x1e8))/0x7)+parseInt(_0x32aff5(0x1ec))/0x8*(-parseInt(_0x32aff5(0x1f1))/0x9)+parseInt(_0x32aff5(0x1ef))/0xa+-parseInt(_0x32aff5(0x1f7))/0xb;if(_0x1aa8c7===_0x176a67)break;else _0x33928b['push'](_0x33928b['shift']());}catch(_0x53f75a){_0x33928b['push'](_0x33928b['shift']());}}}(a53_0x1cc7,0x318d4));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x431004){const _0x207b5c=a53_0xb4e7,_0x4bd216=_0x431004[_0x207b5c(0x1f6)]();if(!_0x4bd216||_0x4bd216===_0x207b5c(0x1f2))return['personal',_0x207b5c(0x1ee)];if(_0x4bd216===_0x207b5c(0x1f5)||_0x4bd216===_0x207b5c(0x1ee))return[_0x4bd216];throw CliErrors[_0x207b5c(0x1f0)](_0x207b5c(0x1e9)+_0x431004);}function a53_0x1cc7(){const _0x32584f=['1176759nMRJbG','all','580666UtdxGR','9005bohgre','personal','trim','1890856uBuihK','36ynSAtU','7RhtvXD','Unsupported\x20Skill\x20sync\x20scope:\x20','430506ZcHYOv','1zpVEJY','8TpMoat','607311YTzvkT','company','683830aEpEbf','validation'];a53_0x1cc7=function(){return _0x32584f;};return a53_0x1cc7();}export function normalizeListScope(_0x311c35){const _0x307761=a53_0xb4e7,_0x1a62d2=_0x311c35[_0x307761(0x1f6)]();if(!_0x1a62d2)return _0x307761(0x1f2);if(_0x1a62d2===_0x307761(0x1f5)||_0x1a62d2==='company'||_0x1a62d2===_0x307761(0x1f2))return _0x1a62d2;throw CliErrors[_0x307761(0x1f0)]('Unsupported\x20Skill\x20list\x20scope:\x20'+_0x311c35);}function a53_0xb4e7(_0x285115,_0x2a4f77){_0x285115=_0x285115-0x1e8;const _0x1cc7d9=a53_0x1cc7();let _0xb4e768=_0x1cc7d9[_0x285115];return _0xb4e768;}export function shouldListScope(_0x40d727,_0x44781c){const _0x186d46=a53_0xb4e7;if(_0x40d727===_0x186d46(0x1f2))return!![];return _0x40d727===_0x44781c;}export function listScopeToRuntimeScopes(_0x323ed0){const _0x5665b6=a53_0xb4e7;if(_0x323ed0===_0x5665b6(0x1f2))return[_0x5665b6(0x1f5),_0x5665b6(0x1ee)];return[_0x323ed0===_0x5665b6(0x1ee)?_0x5665b6(0x1ee):_0x323ed0];}export function listScopeToRemoteScope(_0x4630e7){return _0x4630e7;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a92e3,_0xf40cd8){var _0x2cdde6=a54_0x4b2d,_0x733816=_0x2a92e3();while(!![]){try{var _0x4ad3f4=-parseInt(_0x2cdde6(0x1cb))/0x1*(-parseInt(_0x2cdde6(0x1ce))/0x2)+-parseInt(_0x2cdde6(0x1d5))/0x3+-parseInt(_0x2cdde6(0x1cc))/0x4*(parseInt(_0x2cdde6(0x1cd))/0x5)+-parseInt(_0x2cdde6(0x1d0))/0x6+-parseInt(_0x2cdde6(0x1d3))/0x7*(parseInt(_0x2cdde6(0x1ca))/0x8)+parseInt(_0x2cdde6(0x1d8))/0x9*(-parseInt(_0x2cdde6(0x1c9))/0xa)+parseInt(_0x2cdde6(0x1c7))/0xb;if(_0x4ad3f4===_0xf40cd8)break;else _0x733816['push'](_0x733816['shift']());}catch(_0x50fe7a){_0x733816['push'](_0x733816['shift']());}}}(a54_0x89a1,0xaf8a5));export function summarizeRuntimeSkill(_0x472ad2){var _0x1701ef=a54_0x4b2d;return{'id':_0x472ad2['id'],'skillCode':_0x472ad2[_0x1701ef(0x1da)],'skillName':_0x472ad2[_0x1701ef(0x1d9)],'scope':_0x472ad2[_0x1701ef(0x1c8)],'version':_0x472ad2[_0x1701ef(0x1d6)],'readonly':_0x472ad2[_0x1701ef(0x1c5)]};}export function summarizeLocalRuntimeSkill(_0x169bab){var _0x426e09=a54_0x4b2d;return{'id':_0x169bab['id'],'skillCode':_0x169bab[_0x426e09(0x1da)],'skillName':_0x169bab[_0x426e09(0x1d9)],'scope':_0x169bab[_0x426e09(0x1c8)],'appCode':_0x169bab[_0x426e09(0x1c6)],'version':_0x169bab['version'],'status':_0x169bab[_0x426e09(0x1d7)],'readonly':_0x169bab[_0x426e09(0x1c5)],'tags':_0x169bab['tags'],'dir':_0x169bab[_0x426e09(0x1dc)],'cacheDir':_0x169bab['cacheDir'],'skillMdPath':_0x169bab[_0x426e09(0x1d1)],'metadataPath':_0x169bab[_0x426e09(0x1d4)],'linkedPaths':_0x169bab['linkedPaths'],'contentHash':_0x169bab[_0x426e09(0x1cf)],'treeHash':_0x169bab[_0x426e09(0x1db)],'pulledAt':_0x169bab[_0x426e09(0x1d2)]};}function a54_0x4b2d(_0x48b427,_0x4a6f5c){_0x48b427=_0x48b427-0x1c5;var _0x89a141=a54_0x89a1();var _0x4b2d17=_0x89a141[_0x48b427];return _0x4b2d17;}function a54_0x89a1(){var _0x11f6c5=['50804908uvRAzj','scope','10DJmwCo','10404472WbJuZP','973957NVuxGi','914548svpWzw','15nSjVvH','2GurvJq','contentHash','5647602nDqJmW','skillMdPath','pulledAt','7nZVXXQ','metadataPath','2874234lAlZIr','version','status','8889813sUYkMA','skillName','skillCode','treeHash','dir','readonly','appCode'];a54_0x89a1=function(){return _0x11f6c5;};return a54_0x89a1();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x243534=a55_0x548f;(function(_0x13ba89,_0x258b2c){const _0x759b20=a55_0x548f,_0x982a25=_0x13ba89();while(!![]){try{const _0x4d0550=-parseInt(_0x759b20(0x1ca))/0x1*(parseInt(_0x759b20(0x1e3))/0x2)+parseInt(_0x759b20(0x1e1))/0x3+parseInt(_0x759b20(0x1e9))/0x4*(-parseInt(_0x759b20(0x1bf))/0x5)+parseInt(_0x759b20(0x1dc))/0x6+parseInt(_0x759b20(0x1cd))/0x7*(parseInt(_0x759b20(0x1cc))/0x8)+parseInt(_0x759b20(0x1da))/0x9+parseInt(_0x759b20(0x1c3))/0xa*(-parseInt(_0x759b20(0x1de))/0xb);if(_0x4d0550===_0x258b2c)break;else _0x982a25['push'](_0x982a25['shift']());}catch(_0x4a3028){_0x982a25['push'](_0x982a25['shift']());}}}(a55_0x29d4,0x9a39a));function a55_0x29d4(){const _0x118c12=['timestamp','2480751rYGslW','skillName','2bpssdl','type','Unsupported\x20Skill\x20type:\x20','Use\x20one\x20of:\x20','---\x0aname:\x20','test','2308LhExBC','8760lZIPuq','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','\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','1440HBwphH','references/runtime-contract.md','validation','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','\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','toISOString','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','226731ihHYwI','references/output-contract.md','232SJOlyd','142933ymUoLe','join','\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','#\x20Output\x20Contract\x0a\x0a','write','Invalid\x20Skill\x20name:\x20','SKILL.md','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','read','trim','\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\x20\x20created:\x20\x22','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','3682719UpzNbo','\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=','412380EvvHdD','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','2112LqNjaI','trainer'];a55_0x29d4=function(){return _0x118c12;};return a55_0x29d4();}import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a55_0x243534(0x1d1),a55_0x243534(0x1d5),a55_0x243534(0x1df)];export const DEFAULT_SKILL_TARGET='.agents/skills';export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a55_0x243534(0x1c4);export const OUTPUT_CONTRACT_FILE=a55_0x243534(0x1cb);export function validateSkillName(_0x3ae5c1){const _0x5a54f8=a55_0x243534,_0x2965cd=_0x3ae5c1[_0x5a54f8(0x1d6)]();if(!SKILL_NAME_PATTERN[_0x5a54f8(0x1e8)](_0x2965cd))throw CliErrors['validation'](_0x5a54f8(0x1d2)+_0x3ae5c1+_0x5a54f8(0x1d4),_0x5a54f8(0x1c6));return _0x2965cd;}export function normalizeSkillTemplateType(_0x41804b){const _0x305549=a55_0x243534,_0x4c9eea=(_0x41804b||_0x305549(0x1d1))['trim']()||'write';if(SKILL_TYPES['includes'](_0x4c9eea))return _0x4c9eea;throw CliErrors[_0x305549(0x1c5)](_0x305549(0x1e5)+_0x41804b,_0x305549(0x1e6)+SKILL_TYPES[_0x305549(0x1ce)](',\x20')+'.');}export function renderSkillTemplate(_0x5b7a48){const _0xeea039=a55_0x243534,_0x94b186=validateSkillName(_0x5b7a48[_0xeea039(0x1e2)]),_0x7a99af=normalizeSkillTemplateType(_0x5b7a48[_0xeea039(0x1e4)]),_0x3fd480=_0x5b7a48[_0xeea039(0x1e0)]??new Date()[_0xeea039(0x1c8)]();return{'skillName':_0x94b186,'type':_0x7a99af,'files':[{'path':_0xeea039(0x1d3),'content':renderSkillMd(_0x94b186,_0x7a99af,_0x3fd480)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x94b186,_0x7a99af)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x94b186,_0x7a99af)}]};}function renderSkillMd(_0x4fa1c5,_0x53005c,_0x125bcb){const _0x1c0479=a55_0x243534,_0x3ba7af=typeWorkflow(_0x53005c);return _0x1c0479(0x1e7)+_0x4fa1c5+_0x1c0479(0x1c0)+_0x53005c+_0x1c0479(0x1d8)+_0x125bcb+_0x1c0479(0x1c1)+_0x4fa1c5+_0x1c0479(0x1cf)+_0x3ba7af+'\x0a\x0a'+businessStateSection(_0x53005c)+'\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a';}function renderRuntimeContract(_0x494f13,_0x15e4e6){const _0x31dcb3=a55_0x243534,_0x24788d=_0x15e4e6==='write'?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return _0x31dcb3(0x1c9)+_0x494f13+_0x31dcb3(0x1db)+_0x15e4e6+_0x31dcb3(0x1c7)+_0x24788d+_0x31dcb3(0x1c2);}function renderOutputContract(_0xef2567,_0x4db87b){const _0x31b1e6=a55_0x243534,_0x561835=_0x4db87b===_0x31b1e6(0x1d1)?_0x31b1e6(0x1dd):_0x4db87b+'\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。';return _0x31b1e6(0x1d0)+_0xef2567+_0x31b1e6(0x1d7)+_0x561835+_0x31b1e6(0x1d9);}function a55_0x548f(_0x5798f0,_0x42b90c){_0x5798f0=_0x5798f0-0x1bf;const _0x29d49b=a55_0x29d4();let _0x548fe5=_0x29d49b[_0x5798f0];return _0x548fe5;}function typeWorkflow(_0x3e50b8){const _0x341ba3=a55_0x243534;if(_0x3e50b8===_0x341ba3(0x1d5))return'1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。';if(_0x3e50b8===_0x341ba3(0x1df))return'1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】';return'1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】';}function businessStateSection(_0x3740a8){const _0x2fdfa8=a55_0x243534;if(_0x3740a8!==_0x2fdfa8(0x1d1))return'';return'##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】';}
|